summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--AUTHORS.md7
-rw-r--r--COPYRIGHT.txt40
-rw-r--r--SConstruct46
-rw-r--r--compat.py31
-rw-r--r--core/SCsub4
-rw-r--r--core/allocators.h2
-rw-r--r--core/array.cpp2
-rw-r--r--core/array.h2
-rw-r--r--core/bind/core_bind.cpp8
-rw-r--r--core/bind/core_bind.h2
-rw-r--r--core/class_db.cpp42
-rw-r--r--core/class_db.h165
-rw-r--r--core/color.cpp14
-rw-r--r--core/color.h6
-rw-r--r--core/command_queue_mt.cpp2
-rw-r--r--core/command_queue_mt.h2
-rw-r--r--core/compressed_translation.cpp2
-rw-r--r--core/compressed_translation.h2
-rw-r--r--core/core_string_names.cpp2
-rw-r--r--core/core_string_names.h2
-rw-r--r--core/dictionary.cpp14
-rw-r--r--core/dictionary.h2
-rw-r--r--core/dvector.cpp2
-rw-r--r--core/dvector.h2
-rw-r--r--core/engine.cpp2
-rw-r--r--core/engine.h2
-rw-r--r--core/error_list.h2
-rw-r--r--core/error_macros.cpp2
-rw-r--r--core/error_macros.h2
-rw-r--r--core/event_queue.cpp2
-rw-r--r--core/event_queue.h2
-rw-r--r--core/func_ref.cpp2
-rw-r--r--core/func_ref.h2
-rw-r--r--core/global_constants.cpp2
-rw-r--r--core/global_constants.h2
-rw-r--r--core/hash_map.h92
-rw-r--r--core/hashfuncs.h2
-rw-r--r--core/helper/math_fieldwise.cpp4
-rw-r--r--core/helper/math_fieldwise.h4
-rw-r--r--core/helper/value_evaluator.h2
-rw-r--r--core/image.cpp14
-rw-r--r--core/image.h3
-rw-r--r--core/input_map.cpp2
-rw-r--r--core/input_map.h2
-rw-r--r--core/int_types.h2
-rw-r--r--core/io/compression.cpp2
-rw-r--r--core/io/compression.h2
-rw-r--r--core/io/config_file.cpp2
-rw-r--r--core/io/config_file.h2
-rw-r--r--core/io/file_access_buffered.cpp2
-rw-r--r--core/io/file_access_buffered.h2
-rw-r--r--core/io/file_access_buffered_fa.h2
-rw-r--r--core/io/file_access_compressed.cpp2
-rw-r--r--core/io/file_access_compressed.h12
-rw-r--r--core/io/file_access_encrypted.cpp6
-rw-r--r--core/io/file_access_encrypted.h4
-rw-r--r--core/io/file_access_memory.cpp2
-rw-r--r--core/io/file_access_memory.h2
-rw-r--r--core/io/file_access_network.cpp6
-rw-r--r--core/io/file_access_network.h6
-rw-r--r--core/io/file_access_pack.cpp2
-rw-r--r--core/io/file_access_pack.h2
-rw-r--r--core/io/file_access_zip.cpp2
-rw-r--r--core/io/file_access_zip.h2
-rw-r--r--core/io/http_client.cpp2
-rw-r--r--core/io/http_client.h2
-rw-r--r--core/io/image_loader.cpp2
-rw-r--r--core/io/image_loader.h2
-rw-r--r--core/io/ip.cpp2
-rw-r--r--core/io/ip.h2
-rw-r--r--core/io/ip_address.cpp2
-rw-r--r--core/io/ip_address.h2
-rw-r--r--core/io/json.cpp2
-rw-r--r--core/io/json.h2
-rw-r--r--core/io/marshalls.cpp16
-rw-r--r--core/io/marshalls.h2
-rw-r--r--core/io/networked_multiplayer_peer.cpp2
-rw-r--r--core/io/networked_multiplayer_peer.h2
-rw-r--r--core/io/packet_peer.cpp2
-rw-r--r--core/io/packet_peer.h2
-rw-r--r--core/io/packet_peer_udp.cpp2
-rw-r--r--core/io/packet_peer_udp.h2
-rw-r--r--core/io/pck_packer.cpp2
-rw-r--r--core/io/pck_packer.h2
-rw-r--r--core/io/resource_format_binary.cpp91
-rw-r--r--core/io/resource_format_binary.h4
-rw-r--r--core/io/resource_import.cpp28
-rw-r--r--core/io/resource_import.h5
-rw-r--r--core/io/resource_loader.cpp109
-rw-r--r--core/io/resource_loader.h10
-rw-r--r--core/io/resource_saver.cpp2
-rw-r--r--core/io/resource_saver.h2
-rw-r--r--core/io/stream_peer.cpp2
-rw-r--r--core/io/stream_peer.h2
-rw-r--r--core/io/stream_peer_ssl.cpp2
-rw-r--r--core/io/stream_peer_ssl.h2
-rw-r--r--core/io/stream_peer_tcp.cpp2
-rw-r--r--core/io/stream_peer_tcp.h2
-rw-r--r--core/io/tcp_server.cpp2
-rw-r--r--core/io/tcp_server.h2
-rw-r--r--core/io/translation_loader_po.cpp6
-rw-r--r--core/io/translation_loader_po.h2
-rw-r--r--core/io/xml_parser.cpp4
-rw-r--r--core/io/xml_parser.h4
-rw-r--r--core/io/zip_io.h2
-rw-r--r--core/list.h6
-rw-r--r--core/make_binders.py24
-rw-r--r--core/map.h2
-rw-r--r--core/math/a_star.cpp2
-rw-r--r--core/math/a_star.h4
-rw-r--r--core/math/audio_frame.cpp2
-rw-r--r--core/math/audio_frame.h2
-rw-r--r--core/math/bsp_tree.cpp2
-rw-r--r--core/math/bsp_tree.h2
-rw-r--r--core/math/camera_matrix.cpp16
-rw-r--r--core/math/camera_matrix.h2
-rw-r--r--core/math/face3.cpp4
-rw-r--r--core/math/face3.h2
-rw-r--r--core/math/geometry.cpp2
-rw-r--r--core/math/geometry.h31
-rw-r--r--core/math/math_2d.cpp29
-rw-r--r--core/math/math_2d.h3
-rw-r--r--core/math/math_defs.h2
-rw-r--r--core/math/math_funcs.cpp7
-rw-r--r--core/math/math_funcs.h2
-rw-r--r--core/math/matrix3.cpp70
-rw-r--r--core/math/matrix3.h7
-rw-r--r--core/math/octree.h25
-rw-r--r--core/math/plane.cpp2
-rw-r--r--core/math/plane.h2
-rw-r--r--core/math/quat.cpp92
-rw-r--r--core/math/quat.h2
-rw-r--r--core/math/quick_hull.cpp12
-rw-r--r--core/math/quick_hull.h2
-rw-r--r--core/math/rect3.cpp2
-rw-r--r--core/math/rect3.h40
-rw-r--r--core/math/transform.cpp2
-rw-r--r--core/math/transform.h32
-rw-r--r--core/math/triangle_mesh.cpp2
-rw-r--r--core/math/triangle_mesh.h2
-rw-r--r--core/math/triangulate.cpp2
-rw-r--r--core/math/triangulate.h2
-rw-r--r--core/math/vector3.cpp47
-rw-r--r--core/math/vector3.h2
-rw-r--r--core/message_queue.cpp43
-rw-r--r--core/message_queue.h4
-rw-r--r--core/method_bind.cpp48
-rw-r--r--core/method_bind.h79
-rw-r--r--core/method_ptrcall.h2
-rw-r--r--core/node_path.cpp2
-rw-r--r--core/node_path.h2
-rw-r--r--core/object.cpp268
-rw-r--r--core/object.h72
-rw-r--r--core/ordered_hash_map.h315
-rw-r--r--core/os/copymem.h2
-rw-r--r--core/os/dir_access.cpp2
-rw-r--r--core/os/dir_access.h2
-rw-r--r--core/os/file_access.cpp2
-rw-r--r--core/os/file_access.h2
-rw-r--r--core/os/input.cpp2
-rw-r--r--core/os/input.h2
-rw-r--r--core/os/input_event.cpp102
-rw-r--r--core/os/input_event.h9
-rw-r--r--core/os/keyboard.cpp2
-rw-r--r--core/os/keyboard.h2
-rw-r--r--core/os/main_loop.cpp2
-rw-r--r--core/os/main_loop.h2
-rw-r--r--core/os/memory.cpp2
-rw-r--r--core/os/memory.h2
-rw-r--r--core/os/mutex.cpp2
-rw-r--r--core/os/mutex.h2
-rw-r--r--core/os/os.cpp7
-rw-r--r--core/os/os.h2
-rw-r--r--core/os/power.h2
-rw-r--r--core/os/rw_lock.cpp2
-rw-r--r--core/os/rw_lock.h2
-rw-r--r--core/os/semaphore.cpp2
-rw-r--r--core/os/semaphore.h2
-rw-r--r--core/os/shell.cpp2
-rw-r--r--core/os/shell.h2
-rw-r--r--core/os/thread.cpp2
-rw-r--r--core/os/thread.h2
-rw-r--r--core/os/thread_dummy.cpp2
-rw-r--r--core/os/thread_dummy.h2
-rw-r--r--core/os/thread_safe.cpp2
-rw-r--r--core/os/thread_safe.h2
-rw-r--r--core/packed_data_container.cpp10
-rw-r--r--core/packed_data_container.h2
-rw-r--r--core/pair.h12
-rw-r--r--core/path_remap.cpp2
-rw-r--r--core/path_remap.h2
-rw-r--r--core/pool_allocator.cpp8
-rw-r--r--core/pool_allocator.h2
-rw-r--r--core/print_string.cpp2
-rw-r--r--core/print_string.h2
-rw-r--r--core/project_settings.cpp44
-rw-r--r--core/project_settings.h4
-rw-r--r--core/ref_ptr.cpp4
-rw-r--r--core/ref_ptr.h2
-rw-r--r--core/reference.cpp45
-rw-r--r--core/reference.h49
-rw-r--r--core/register_core_types.cpp2
-rw-r--r--core/register_core_types.h2
-rw-r--r--core/resource.cpp2
-rw-r--r--core/resource.h2
-rw-r--r--core/rid.cpp2
-rw-r--r--core/rid.h2
-rw-r--r--core/ring_buffer.h2
-rw-r--r--core/safe_refcount.cpp2
-rw-r--r--core/safe_refcount.h2
-rw-r--r--core/script_debugger_local.cpp2
-rw-r--r--core/script_debugger_local.h2
-rw-r--r--core/script_debugger_remote.cpp2
-rw-r--r--core/script_debugger_remote.h2
-rw-r--r--core/script_language.cpp7
-rw-r--r--core/script_language.h4
-rw-r--r--core/self_list.h2
-rw-r--r--core/set.h2
-rw-r--r--core/simple_type.h2
-rw-r--r--core/sort.h2
-rw-r--r--core/string_db.cpp2
-rw-r--r--core/string_db.h2
-rw-r--r--core/translation.cpp2
-rw-r--r--core/translation.h2
-rw-r--r--core/type_info.h96
-rw-r--r--core/typedefs.h2
-rw-r--r--core/ucaps.h2
-rw-r--r--core/undo_redo.cpp30
-rw-r--r--core/undo_redo.h2
-rw-r--r--core/ustring.cpp357
-rw-r--r--core/ustring.h2
-rw-r--r--core/variant.cpp6
-rw-r--r--core/variant.h2
-rw-r--r--core/variant_call.cpp8
-rw-r--r--core/variant_construct_string.cpp2
-rw-r--r--core/variant_op.cpp2
-rw-r--r--core/variant_parser.cpp4
-rw-r--r--core/variant_parser.h2
-rw-r--r--core/vector.h2
-rw-r--r--core/version.h2
-rw-r--r--core/vmap.h8
-rw-r--r--core/vset.h9
-rw-r--r--doc/base/classes.xml9892
-rw-r--r--drivers/SCsub1
-rw-r--r--drivers/alsa/audio_driver_alsa.cpp21
-rw-r--r--drivers/alsa/audio_driver_alsa.h3
-rw-r--r--drivers/convex_decomp/b2d_decompose.cpp4
-rw-r--r--drivers/convex_decomp/b2d_decompose.h2
-rw-r--r--drivers/gl_context/context_gl.cpp2
-rw-r--r--drivers/gl_context/context_gl.h2
-rw-r--r--drivers/gles2/rasterizer_gles2.cpp10766
-rw-r--r--drivers/gles2/rasterizer_gles2.h1686
-rw-r--r--drivers/gles2/rasterizer_instance_gles2.cpp40
-rw-r--r--drivers/gles2/rasterizer_instance_gles2.h41
-rw-r--r--drivers/gles2/shader_compiler_gles2.cpp939
-rw-r--r--drivers/gles2/shader_compiler_gles2.h134
-rw-r--r--drivers/gles2/shader_gles2.cpp736
-rw-r--r--drivers/gles2/shader_gles2.h359
-rw-r--r--drivers/gles2/shaders/SCsub12
-rw-r--r--drivers/gles2/shaders/blur.glsl51
-rw-r--r--drivers/gles2/shaders/canvas.glsl391
-rw-r--r--drivers/gles2/shaders/canvas_shadow.glsl62
-rw-r--r--drivers/gles2/shaders/copy.glsl557
-rw-r--r--drivers/gles2/shaders/material.glsl1326
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.cpp15
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.h2
-rw-r--r--drivers/gles3/rasterizer_gles3.cpp7
-rw-r--r--drivers/gles3/rasterizer_gles3.h2
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp41
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.h54
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp51
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.h25
-rw-r--r--drivers/gles3/shader_compiler_gles3.cpp8
-rw-r--r--drivers/gles3/shader_compiler_gles3.h2
-rw-r--r--drivers/gles3/shader_gles3.cpp2
-rw-r--r--drivers/gles3/shader_gles3.h2
-rw-r--r--drivers/gles3/shaders/SCsub2
-rw-r--r--drivers/gles3/shaders/canvas.glsl24
-rw-r--r--drivers/gles3/shaders/scene.glsl20
-rw-r--r--drivers/gles3/shaders/ssao_blur.glsl7
-rw-r--r--drivers/png/image_loader_png.cpp6
-rw-r--r--drivers/png/image_loader_png.h2
-rw-r--r--drivers/png/resource_saver_png.cpp4
-rw-r--r--drivers/png/resource_saver_png.h2
-rw-r--r--drivers/pulseaudio/audio_driver_pulseaudio.cpp46
-rw-r--r--drivers/pulseaudio/audio_driver_pulseaudio.h3
-rw-r--r--drivers/register_driver_types.cpp2
-rw-r--r--drivers/register_driver_types.h2
-rw-r--r--drivers/rtaudio/audio_driver_rtaudio.cpp85
-rw-r--r--drivers/rtaudio/audio_driver_rtaudio.h2
-rw-r--r--drivers/unix/SCsub2
-rw-r--r--drivers/unix/dir_access_unix.cpp14
-rw-r--r--drivers/unix/dir_access_unix.h2
-rw-r--r--drivers/unix/file_access_unix.cpp2
-rw-r--r--drivers/unix/file_access_unix.h2
-rw-r--r--drivers/unix/ip_unix.cpp2
-rw-r--r--drivers/unix/ip_unix.h2
-rw-r--r--drivers/unix/mutex_posix.cpp2
-rw-r--r--drivers/unix/mutex_posix.h2
-rw-r--r--drivers/unix/os_unix.cpp6
-rw-r--r--drivers/unix/os_unix.h2
-rw-r--r--drivers/unix/packet_peer_udp_posix.cpp6
-rw-r--r--drivers/unix/packet_peer_udp_posix.h2
-rw-r--r--drivers/unix/rw_lock_posix.cpp2
-rw-r--r--drivers/unix/rw_lock_posix.h2
-rw-r--r--drivers/unix/semaphore_posix.cpp2
-rw-r--r--drivers/unix/semaphore_posix.h2
-rw-r--r--drivers/unix/socket_helpers.h2
-rw-r--r--drivers/unix/stream_peer_tcp_posix.cpp2
-rw-r--r--drivers/unix/stream_peer_tcp_posix.h2
-rw-r--r--drivers/unix/tcp_server_posix.cpp4
-rw-r--r--drivers/unix/tcp_server_posix.h2
-rw-r--r--drivers/unix/thread_posix.cpp17
-rw-r--r--drivers/unix/thread_posix.h5
-rw-r--r--drivers/wasapi/SCsub (renamed from drivers/gles2/SCsub)3
-rw-r--r--drivers/wasapi/audio_driver_wasapi.cpp364
-rw-r--r--drivers/wasapi/audio_driver_wasapi.h (renamed from main/tests/test_sound.cpp)95
-rw-r--r--drivers/windows/dir_access_windows.cpp2
-rw-r--r--drivers/windows/dir_access_windows.h2
-rw-r--r--drivers/windows/file_access_windows.cpp2
-rw-r--r--drivers/windows/file_access_windows.h2
-rw-r--r--drivers/windows/mutex_windows.cpp2
-rw-r--r--drivers/windows/mutex_windows.h2
-rw-r--r--drivers/windows/rw_lock_windows.cpp2
-rw-r--r--drivers/windows/rw_lock_windows.h2
-rw-r--r--drivers/windows/semaphore_windows.cpp2
-rw-r--r--drivers/windows/semaphore_windows.h2
-rw-r--r--drivers/windows/shell_windows.cpp2
-rw-r--r--drivers/windows/shell_windows.h2
-rw-r--r--drivers/windows/thread_windows.cpp2
-rw-r--r--drivers/windows/thread_windows.h2
-rw-r--r--drivers/xaudio2/audio_driver_xaudio2.cpp2
-rw-r--r--drivers/xaudio2/audio_driver_xaudio2.h2
-rw-r--r--editor/SCsub40
-rw-r--r--editor/animation_editor.cpp20
-rw-r--r--editor/animation_editor.h2
-rw-r--r--editor/array_property_edit.cpp8
-rw-r--r--editor/array_property_edit.h2
-rw-r--r--editor/call_dialog.cpp342
-rw-r--r--editor/call_dialog.h86
-rw-r--r--editor/code_editor.cpp39
-rw-r--r--editor/code_editor.h4
-rw-r--r--editor/collada/collada.cpp16
-rw-r--r--editor/collada/collada.h2
-rw-r--r--editor/connections_dialog.cpp32
-rw-r--r--editor/connections_dialog.h2
-rw-r--r--editor/create_dialog.cpp2
-rw-r--r--editor/create_dialog.h2
-rw-r--r--editor/dependency_editor.cpp6
-rw-r--r--editor/dependency_editor.h2
-rw-r--r--editor/doc/doc_data.cpp283
-rw-r--r--editor/doc/doc_data.h6
-rw-r--r--editor/doc/doc_dump.cpp2
-rw-r--r--editor/doc/doc_dump.h2
-rw-r--r--editor/doc_code_font.h2
-rw-r--r--editor/doc_font.h2
-rw-r--r--editor/doc_title_font.h2
-rw-r--r--editor/editor_about.cpp2
-rw-r--r--editor/editor_about.h2
-rw-r--r--editor/editor_asset_installer.cpp14
-rw-r--r--editor/editor_asset_installer.h2
-rw-r--r--editor/editor_audio_buses.cpp75
-rw-r--r--editor/editor_audio_buses.h6
-rw-r--r--editor/editor_autoload_settings.cpp4
-rw-r--r--editor/editor_autoload_settings.h2
-rw-r--r--editor/editor_data.cpp6
-rw-r--r--editor/editor_data.h9
-rw-r--r--editor/editor_dir_dialog.cpp126
-rw-r--r--editor/editor_dir_dialog.h9
-rw-r--r--editor/editor_export.cpp2206
-rw-r--r--editor/editor_export.h4
-rw-r--r--editor/editor_file_dialog.cpp30
-rw-r--r--editor/editor_file_dialog.h2
-rw-r--r--editor/editor_file_system.cpp60
-rw-r--r--editor/editor_file_system.h5
-rw-r--r--editor/editor_fonts.cpp80
-rw-r--r--editor/editor_fonts.h2
-rw-r--r--editor/editor_help.cpp290
-rw-r--r--editor/editor_help.h5
-rw-r--r--editor/editor_initialize_ssl.cpp2
-rw-r--r--editor/editor_initialize_ssl.h2
-rw-r--r--editor/editor_log.cpp2
-rw-r--r--editor/editor_log.h2
-rw-r--r--editor/editor_name_dialog.cpp2
-rw-r--r--editor/editor_name_dialog.h2
-rw-r--r--editor/editor_node.cpp1367
-rw-r--r--editor/editor_node.h96
-rw-r--r--editor/editor_path.cpp16
-rw-r--r--editor/editor_path.h2
-rw-r--r--editor/editor_plugin.cpp326
-rw-r--r--editor/editor_plugin.h60
-rw-r--r--editor/editor_plugin_settings.cpp2
-rw-r--r--editor/editor_plugin_settings.h2
-rw-r--r--editor/editor_profiler.cpp2
-rw-r--r--editor/editor_profiler.h2
-rw-r--r--editor/editor_reimport_dialog.cpp149
-rw-r--r--editor/editor_reimport_dialog.h54
-rw-r--r--editor/editor_resource_preview.cpp16
-rw-r--r--editor/editor_resource_preview.h2
-rw-r--r--editor/editor_run.cpp2
-rw-r--r--editor/editor_run.h2
-rw-r--r--editor/editor_run_native.cpp6
-rw-r--r--editor/editor_run_native.h2
-rw-r--r--editor/editor_run_script.cpp8
-rw-r--r--editor/editor_run_script.h6
-rw-r--r--editor/editor_scale.cpp2
-rw-r--r--editor/editor_scale.h2
-rw-r--r--editor/editor_settings.cpp62
-rw-r--r--editor/editor_settings.h7
-rw-r--r--editor/editor_sub_scene.cpp2
-rw-r--r--editor/editor_sub_scene.h2
-rw-r--r--editor/editor_themes.cpp326
-rw-r--r--editor/editor_themes.h2
-rw-r--r--editor/export_template_manager.cpp73
-rw-r--r--editor/export_template_manager.h4
-rw-r--r--editor/file_type_cache.cpp2
-rw-r--r--editor/file_type_cache.h2
-rw-r--r--editor/fileserver/editor_file_server.cpp2
-rw-r--r--editor/fileserver/editor_file_server.h2
-rw-r--r--editor/filesystem_dock.cpp82
-rw-r--r--editor/filesystem_dock.h3
-rw-r--r--editor/groups_editor.cpp4
-rw-r--r--editor/groups_editor.h2
-rw-r--r--editor/icons/SCsub44
-rw-r--r--editor/icons/dark/icon_2_d.svg5
-rw-r--r--editor/icons/dark/icon_3_d.svg5
-rw-r--r--editor/icons/dark/icon_GUI_checked.svg5
-rw-r--r--editor/icons/dark/icon_GUI_dropdown.svg7
-rw-r--r--editor/icons/dark/icon_GUI_hslider_bg.svg5
-rw-r--r--editor/icons/dark/icon_GUI_hsplitter.svg5
-rw-r--r--editor/icons/dark/icon_GUI_mini_tab_menu.svg7
-rw-r--r--editor/icons/dark/icon_GUI_option_arrow.svg5
-rw-r--r--editor/icons/dark/icon_GUI_play_button_group.svg5
-rw-r--r--editor/icons/dark/icon_GUI_progress_bar.svg5
-rw-r--r--editor/icons/dark/icon_GUI_progress_fill.svg5
-rw-r--r--editor/icons/dark/icon_GUI_radio_checked.svg6
-rw-r--r--editor/icons/dark/icon_GUI_radio_unchecked.svg5
-rw-r--r--editor/icons/dark/icon_GUI_scroll_bg.svg1
-rw-r--r--editor/icons/dark/icon_GUI_scroll_grabber.svg5
-rw-r--r--editor/icons/dark/icon_GUI_scroll_grabber_hl.svg5
-rw-r--r--editor/icons/dark/icon_GUI_scroll_grabber_pressed.svg5
-rw-r--r--editor/icons/dark/icon_GUI_slider_grabber.svg5
-rw-r--r--editor/icons/dark/icon_GUI_slider_grabber_hl.svg6
-rw-r--r--editor/icons/dark/icon_GUI_spinbox_updown.svg5
-rw-r--r--editor/icons/dark/icon_GUI_tab_menu.svg7
-rw-r--r--editor/icons/dark/icon_GUI_toggle_off.svg5
-rw-r--r--editor/icons/dark/icon_GUI_toggle_on.svg5
-rw-r--r--editor/icons/dark/icon_GUI_tree_arrow_down.svg5
-rw-r--r--editor/icons/dark/icon_GUI_tree_arrow_right.svg5
-rw-r--r--editor/icons/dark/icon_GUI_unchecked.svg5
-rw-r--r--editor/icons/dark/icon_GUI_vslider_bg.svg5
-rw-r--r--editor/icons/dark/icon_GUI_vsplit_bg.svg5
-rw-r--r--editor/icons/dark/icon_GUI_vsplitter.svg5
-rw-r--r--editor/icons/dark/icon_accept_dialog.svg5
-rw-r--r--editor/icons/dark/icon_add.svg5
-rw-r--r--editor/icons/dark/icon_anchor.svg5
-rw-r--r--editor/icons/dark/icon_animated_sprite.svg7
-rw-r--r--editor/icons/dark/icon_animated_sprite_3d.svg7
-rw-r--r--editor/icons/dark/icon_animation.svg5
-rw-r--r--editor/icons/dark/icon_animation_player.svg5
-rw-r--r--editor/icons/dark/icon_animation_tree_player.svg5
-rw-r--r--editor/icons/dark/icon_area.svg5
-rw-r--r--editor/icons/dark/icon_area_2d.svg5
-rw-r--r--editor/icons/dark/icon_arrow_left.svg5
-rw-r--r--editor/icons/dark/icon_arrow_right.svg5
-rw-r--r--editor/icons/dark/icon_arrow_up.svg5
-rw-r--r--editor/icons/dark/icon_asset_lib.svg5
-rw-r--r--editor/icons/dark/icon_atlas_texture.svg5
-rw-r--r--editor/icons/dark/icon_audio_bus_bypass.svg5
-rw-r--r--editor/icons/dark/icon_audio_bus_layout.svg12
-rw-r--r--editor/icons/dark/icon_audio_bus_mute.svg5
-rw-r--r--editor/icons/dark/icon_audio_bus_solo.svg5
-rw-r--r--editor/icons/dark/icon_audio_effect_amplify.svg12
-rw-r--r--editor/icons/dark/icon_audio_stream_gibberish.svg5
-rw-r--r--editor/icons/dark/icon_audio_stream_player.svg13
-rw-r--r--editor/icons/dark/icon_audio_stream_player_2_d.svg13
-rw-r--r--editor/icons/dark/icon_audio_stream_player_3_d.svg13
-rw-r--r--editor/icons/dark/icon_audio_stream_sample.svg12
-rw-r--r--editor/icons/dark/icon_auto_play.svg5
-rw-r--r--editor/icons/dark/icon_back.svg5
-rw-r--r--editor/icons/dark/icon_back_buffer_copy.svg5
-rw-r--r--editor/icons/dark/icon_bake.svg5
-rw-r--r--editor/icons/dark/icon_baked_light.svg5
-rw-r--r--editor/icons/dark/icon_baked_light_instance.svg5
-rw-r--r--editor/icons/dark/icon_baked_light_sampler.svg5
-rw-r--r--editor/icons/dark/icon_bit_map.svg5
-rw-r--r--editor/icons/dark/icon_bitmap_font.svg5
-rw-r--r--editor/icons/dark/icon_blend.svg5
-rw-r--r--editor/icons/dark/icon_bone.svg5
-rw-r--r--editor/icons/dark/icon_bone_attachment.svg5
-rw-r--r--editor/icons/dark/icon_bone_track.svg5
-rw-r--r--editor/icons/dark/icon_bool.svg5
-rw-r--r--editor/icons/dark/icon_box_shape.svg7
-rw-r--r--editor/icons/dark/icon_bus_vu_db.svg12
-rw-r--r--editor/icons/dark/icon_bus_vu_empty.svg13
-rw-r--r--editor/icons/dark/icon_bus_vu_frozen.svg12
-rw-r--r--editor/icons/dark/icon_bus_vu_full.svg12
-rw-r--r--editor/icons/dark/icon_button.svg5
-rw-r--r--editor/icons/dark/icon_button_group.svg5
-rw-r--r--editor/icons/dark/icon_camera.svg5
-rw-r--r--editor/icons/dark/icon_camera_2d.svg5
-rw-r--r--editor/icons/dark/icon_canvas_item.svg5
-rw-r--r--editor/icons/dark/icon_canvas_item_material.svg11
-rw-r--r--editor/icons/dark/icon_canvas_item_shader.svg11
-rw-r--r--editor/icons/dark/icon_canvas_item_shader_graph.svg19
-rw-r--r--editor/icons/dark/icon_canvas_layer.svg5
-rw-r--r--editor/icons/dark/icon_canvas_modulate.svg8
-rw-r--r--editor/icons/dark/icon_capsule_mesh.svg5
-rw-r--r--editor/icons/dark/icon_capsule_shape.svg6
-rw-r--r--editor/icons/dark/icon_capsule_shape_2d.svg5
-rw-r--r--editor/icons/dark/icon_center_container.svg5
-rw-r--r--editor/icons/dark/icon_check_box.svg5
-rw-r--r--editor/icons/dark/icon_check_button.svg5
-rw-r--r--editor/icons/dark/icon_checkerboard.svg6
-rw-r--r--editor/icons/dark/icon_circle_shape_2d.svg5
-rw-r--r--editor/icons/dark/icon_class_list.svg11
-rw-r--r--editor/icons/dark/icon_close.svg5
-rw-r--r--editor/icons/dark/icon_collapse.svg5
-rw-r--r--editor/icons/dark/icon_collision_2d.svg5
-rw-r--r--editor/icons/dark/icon_collision_polygon.svg5
-rw-r--r--editor/icons/dark/icon_collision_shape.svg7
-rw-r--r--editor/icons/dark/icon_collision_shape_2d.svg5
-rw-r--r--editor/icons/dark/icon_color.svg24
-rw-r--r--editor/icons/dark/icon_color_pick.svg5
-rw-r--r--editor/icons/dark/icon_color_picker.svg5
-rw-r--r--editor/icons/dark/icon_color_picker_button.svg7
-rw-r--r--editor/icons/dark/icon_color_ramp.svg11
-rw-r--r--editor/icons/dark/icon_color_rect.svg11
-rw-r--r--editor/icons/dark/icon_concave_polygon_shape.svg12
-rw-r--r--editor/icons/dark/icon_concave_polygon_shape_2d.svg5
-rw-r--r--editor/icons/dark/icon_cone_twist_joint.svg7
-rw-r--r--editor/icons/dark/icon_confirmation_dialog.svg5
-rw-r--r--editor/icons/dark/icon_connect.svg7
-rw-r--r--editor/icons/dark/icon_connection_and_groups.svg5
-rw-r--r--editor/icons/dark/icon_container.svg5
-rw-r--r--editor/icons/dark/icon_control.svg5
-rw-r--r--editor/icons/dark/icon_control_align_bottom_center.svg7
-rw-r--r--editor/icons/dark/icon_control_align_bottom_left.svg7
-rw-r--r--editor/icons/dark/icon_control_align_bottom_right.svg7
-rw-r--r--editor/icons/dark/icon_control_align_bottom_wide.svg7
-rw-r--r--editor/icons/dark/icon_control_align_center.svg7
-rw-r--r--editor/icons/dark/icon_control_align_center_left.svg5
-rw-r--r--editor/icons/dark/icon_control_align_center_right.svg5
-rw-r--r--editor/icons/dark/icon_control_align_left_center.svg7
-rw-r--r--editor/icons/dark/icon_control_align_left_wide.svg7
-rw-r--r--editor/icons/dark/icon_control_align_right_center.svg7
-rw-r--r--editor/icons/dark/icon_control_align_right_wide.svg7
-rw-r--r--editor/icons/dark/icon_control_align_top_center.svg7
-rw-r--r--editor/icons/dark/icon_control_align_top_left.svg7
-rw-r--r--editor/icons/dark/icon_control_align_top_right.svg7
-rw-r--r--editor/icons/dark/icon_control_align_top_wide.svg7
-rw-r--r--editor/icons/dark/icon_control_align_wide.svg7
-rw-r--r--editor/icons/dark/icon_control_hcenter_wide.svg7
-rw-r--r--editor/icons/dark/icon_control_vcenter_wide.svg7
-rw-r--r--editor/icons/dark/icon_convex_polygon_shape.svg9
-rw-r--r--editor/icons/dark/icon_convex_polygon_shape_2d.svg5
-rw-r--r--editor/icons/dark/icon_copy_node_path.svg6
-rw-r--r--editor/icons/dark/icon_create_new_scene_from.svg8
-rw-r--r--editor/icons/dark/icon_cube_map.svg10
-rw-r--r--editor/icons/dark/icon_cube_mesh.svg5
-rw-r--r--editor/icons/dark/icon_curve.svg6
-rw-r--r--editor/icons/dark/icon_curve_2d.svg5
-rw-r--r--editor/icons/dark/icon_curve_3d.svg5
-rw-r--r--editor/icons/dark/icon_curve_close.svg11
-rw-r--r--editor/icons/dark/icon_curve_constant.svg5
-rw-r--r--editor/icons/dark/icon_curve_create.svg10
-rw-r--r--editor/icons/dark/icon_curve_curve.svg9
-rw-r--r--editor/icons/dark/icon_curve_delete.svg9
-rw-r--r--editor/icons/dark/icon_curve_edit.svg9
-rw-r--r--editor/icons/dark/icon_curve_in.svg5
-rw-r--r--editor/icons/dark/icon_curve_in_out.svg5
-rw-r--r--editor/icons/dark/icon_curve_linear.svg5
-rw-r--r--editor/icons/dark/icon_curve_out.svg5
-rw-r--r--editor/icons/dark/icon_curve_out_in.svg5
-rw-r--r--editor/icons/dark/icon_curve_texture.svg5
-rw-r--r--editor/icons/dark/icon_cylinder_mesh.svg5
-rw-r--r--editor/icons/dark/icon_damped_spring_joint_2d.svg6
-rw-r--r--editor/icons/dark/icon_debug.svg14
-rw-r--r--editor/icons/dark/icon_debug_continue.svg9
-rw-r--r--editor/icons/dark/icon_debug_next.svg12
-rw-r--r--editor/icons/dark/icon_debug_step.svg13
-rw-r--r--editor/icons/dark/icon_default_project_icon.svg33
-rw-r--r--editor/icons/dark/icon_dependency_changed.svg6
-rw-r--r--editor/icons/dark/icon_dependency_changed_hl.svg5
-rw-r--r--editor/icons/dark/icon_dependency_local_changed.svg6
-rw-r--r--editor/icons/dark/icon_dependency_local_changed_hl.svg5
-rw-r--r--editor/icons/dark/icon_dependency_ok.svg6
-rw-r--r--editor/icons/dark/icon_dependency_ok_hl.svg5
-rw-r--r--editor/icons/dark/icon_directional_light.svg5
-rw-r--r--editor/icons/dark/icon_distraction_free.svg9
-rw-r--r--editor/icons/dark/icon_duplicate.svg5
-rw-r--r--editor/icons/dark/icon_dynamic_font.svg6
-rw-r--r--editor/icons/dark/icon_dynamic_font_data.svg6
-rw-r--r--editor/icons/dark/icon_edit.svg5
-rw-r--r--editor/icons/dark/icon_edit_key.svg6
-rw-r--r--editor/icons/dark/icon_edit_pivot.svg5
-rw-r--r--editor/icons/dark/icon_edit_resource.svg5
-rw-r--r--editor/icons/dark/icon_editor_3d_handle.svg6
-rw-r--r--editor/icons/dark/icon_editor_control_anchor.svg8
-rw-r--r--editor/icons/dark/icon_editor_handle.svg6
-rw-r--r--editor/icons/dark/icon_editor_pivot.svg6
-rw-r--r--editor/icons/dark/icon_editor_plugin.svg9
-rw-r--r--editor/icons/dark/icon_environment.svg8
-rw-r--r--editor/icons/dark/icon_error.svg5
-rw-r--r--editor/icons/dark/icon_error_sign.svg7
-rw-r--r--editor/icons/dark/icon_event_player.svg8
-rw-r--r--editor/icons/dark/icon_favorites.svg5
-rw-r--r--editor/icons/dark/icon_file_big.svg7
-rw-r--r--editor/icons/dark/icon_file_dialog.svg5
-rw-r--r--editor/icons/dark/icon_file_list.svg5
-rw-r--r--editor/icons/dark/icon_file_server.svg7
-rw-r--r--editor/icons/dark/icon_file_server_active.svg7
-rw-r--r--editor/icons/dark/icon_file_thumbnail.svg5
-rw-r--r--editor/icons/dark/icon_fixed_material.svg5
-rw-r--r--editor/icons/dark/icon_fixed_spatial_material.svg11
-rw-r--r--editor/icons/dark/icon_folder.svg5
-rw-r--r--editor/icons/dark/icon_folder_big.svg5
-rw-r--r--editor/icons/dark/icon_font.svg13
-rw-r--r--editor/icons/dark/icon_forward.svg5
-rw-r--r--editor/icons/dark/icon_g_d_native_library.svg5
-rw-r--r--editor/icons/dark/icon_g_d_script.svg5
-rw-r--r--editor/icons/dark/icon_g_i_probe.svg5
-rw-r--r--editor/icons/dark/icon_g_i_probe_data.svg5
-rw-r--r--editor/icons/dark/icon_generic_6_d_o_f_joint.svg5
-rw-r--r--editor/icons/dark/icon_gizmo_directional_light.svg5
-rw-r--r--editor/icons/dark/icon_gizmo_light.svg5
-rw-r--r--editor/icons/dark/icon_gizmo_listener.svg7
-rw-r--r--editor/icons/dark/icon_gizmo_spatial_sample_player.svg5
-rw-r--r--editor/icons/dark/icon_gizmo_spatial_stream_player.svg5
-rw-r--r--editor/icons/dark/icon_godot.svg33
-rw-r--r--editor/icons/dark/icon_gradient.svg11
-rw-r--r--editor/icons/dark/icon_gradient_texture.svg19
-rw-r--r--editor/icons/dark/icon_graph_comment.svg5
-rw-r--r--editor/icons/dark/icon_graph_cube_uniform.svg5
-rw-r--r--editor/icons/dark/icon_graph_curve_map.svg6
-rw-r--r--editor/icons/dark/icon_graph_default_texture.svg5
-rw-r--r--editor/icons/dark/icon_graph_edit.svg6
-rw-r--r--editor/icons/dark/icon_graph_input.svg5
-rw-r--r--editor/icons/dark/icon_graph_node.svg6
-rw-r--r--editor/icons/dark/icon_graph_rgb.svg12
-rw-r--r--editor/icons/dark/icon_graph_rgb_op.svg11
-rw-r--r--editor/icons/dark/icon_graph_rgb_uniform.svg12
-rw-r--r--editor/icons/dark/icon_graph_scalar.svg5
-rw-r--r--editor/icons/dark/icon_graph_scalar_interp.svg5
-rw-r--r--editor/icons/dark/icon_graph_scalar_op.svg8
-rw-r--r--editor/icons/dark/icon_graph_scalar_uniform.svg5
-rw-r--r--editor/icons/dark/icon_graph_scalars_to_vec.svg11
-rw-r--r--editor/icons/dark/icon_graph_texscreen.svg6
-rw-r--r--editor/icons/dark/icon_graph_texture_uniform.svg5
-rw-r--r--editor/icons/dark/icon_graph_time.svg7
-rw-r--r--editor/icons/dark/icon_graph_vec_dp.svg7
-rw-r--r--editor/icons/dark/icon_graph_vec_interp.svg5
-rw-r--r--editor/icons/dark/icon_graph_vec_length.svg7
-rw-r--r--editor/icons/dark/icon_graph_vec_op.svg5
-rw-r--r--editor/icons/dark/icon_graph_vec_scalar_op.svg6
-rw-r--r--editor/icons/dark/icon_graph_vec_to_scalars.svg11
-rw-r--r--editor/icons/dark/icon_graph_vecs_to_xform.svg11
-rw-r--r--editor/icons/dark/icon_graph_vector.svg5
-rw-r--r--editor/icons/dark/icon_graph_vector_uniform.svg6
-rw-r--r--editor/icons/dark/icon_graph_xform.svg11
-rw-r--r--editor/icons/dark/icon_graph_xform_mult.svg7
-rw-r--r--editor/icons/dark/icon_graph_xform_scalar_func.svg10
-rw-r--r--editor/icons/dark/icon_graph_xform_to_vecs.svg11
-rw-r--r--editor/icons/dark/icon_graph_xform_uniform.svg5
-rw-r--r--editor/icons/dark/icon_graph_xform_vec_func.svg10
-rw-r--r--editor/icons/dark/icon_graph_xform_vec_imult.svg7
-rw-r--r--editor/icons/dark/icon_graph_xform_vec_mult.svg7
-rw-r--r--editor/icons/dark/icon_grid.svg5
-rw-r--r--editor/icons/dark/icon_grid_container.svg5
-rw-r--r--editor/icons/dark/icon_grid_map.svg5
-rw-r--r--editor/icons/dark/icon_groove_joint_2d.svg5
-rw-r--r--editor/icons/dark/icon_group.svg6
-rw-r--r--editor/icons/dark/icon_groups.svg7
-rw-r--r--editor/icons/dark/icon_gui_close.svg5
-rw-r--r--editor/icons/dark/icon_h_box_container.svg7
-rw-r--r--editor/icons/dark/icon_h_button_array.svg5
-rw-r--r--editor/icons/dark/icon_h_scroll_bar.svg5
-rw-r--r--editor/icons/dark/icon_h_separator.svg7
-rw-r--r--editor/icons/dark/icon_h_slider.svg5
-rw-r--r--editor/icons/dark/icon_h_split_container.svg8
-rw-r--r--editor/icons/dark/icon_h_t_t_p_request.svg6
-rw-r--r--editor/icons/dark/icon_headphones.svg11
-rw-r--r--editor/icons/dark/icon_help.svg5
-rw-r--r--editor/icons/dark/icon_help_search.svg7
-rw-r--r--editor/icons/dark/icon_hidden.svg5
-rw-r--r--editor/icons/dark/icon_hinge_joint.svg5
-rw-r--r--editor/icons/dark/icon_history.svg8
-rw-r--r--editor/icons/dark/icon_hsize.svg5
-rw-r--r--editor/icons/dark/icon_image.svg5
-rw-r--r--editor/icons/dark/icon_image_texture.svg5
-rw-r--r--editor/icons/dark/icon_immediate_geometry.svg5
-rw-r--r--editor/icons/dark/icon_import_check.svg5
-rw-r--r--editor/icons/dark/icon_import_fail.svg5
-rw-r--r--editor/icons/dark/icon_instance.svg6
-rw-r--r--editor/icons/dark/icon_instance_options.svg6
-rw-r--r--editor/icons/dark/icon_integer.svg7
-rw-r--r--editor/icons/dark/icon_interp_cubic.svg5
-rw-r--r--editor/icons/dark/icon_interp_linear.svg5
-rw-r--r--editor/icons/dark/icon_interp_raw.svg5
-rw-r--r--editor/icons/dark/icon_interp_wrap_clamp.svg9
-rw-r--r--editor/icons/dark/icon_interp_wrap_loop.svg10
-rw-r--r--editor/icons/dark/icon_interpolated_camera.svg5
-rw-r--r--editor/icons/dark/icon_invalid_key.svg5
-rw-r--r--editor/icons/dark/icon_inverse_kinematics.svg12
-rw-r--r--editor/icons/dark/icon_item_list.svg14
-rw-r--r--editor/icons/dark/icon_joy_axis.svg7
-rw-r--r--editor/icons/dark/icon_joy_button.svg6
-rw-r--r--editor/icons/dark/icon_joypad.svg5
-rw-r--r--editor/icons/dark/icon_key.svg7
-rw-r--r--editor/icons/dark/icon_key_hover.svg5
-rw-r--r--editor/icons/dark/icon_key_invalid.svg5
-rw-r--r--editor/icons/dark/icon_key_next.svg6
-rw-r--r--editor/icons/dark/icon_key_selected.svg5
-rw-r--r--editor/icons/dark/icon_key_value.svg5
-rw-r--r--editor/icons/dark/icon_key_xform.svg5
-rw-r--r--editor/icons/dark/icon_keyboard.svg7
-rw-r--r--editor/icons/dark/icon_kinematic_body.svg5
-rw-r--r--editor/icons/dark/icon_kinematic_body_2d.svg5
-rw-r--r--editor/icons/dark/icon_label.svg5
-rw-r--r--editor/icons/dark/icon_large_texture.svg5
-rw-r--r--editor/icons/dark/icon_light_2d.svg5
-rw-r--r--editor/icons/dark/icon_light_occluder_2d.svg11
-rw-r--r--editor/icons/dark/icon_line_2d.svg5
-rw-r--r--editor/icons/dark/icon_line_edit.svg6
-rw-r--r--editor/icons/dark/icon_line_shape_2d.svg7
-rw-r--r--editor/icons/dark/icon_link_button.svg6
-rw-r--r--editor/icons/dark/icon_list_select.svg6
-rw-r--r--editor/icons/dark/icon_listener.svg8
-rw-r--r--editor/icons/dark/icon_load.svg5
-rw-r--r--editor/icons/dark/icon_lock.svg8
-rw-r--r--editor/icons/dark/icon_loop.svg5
-rw-r--r--editor/icons/dark/icon_loop_interpolation.svg10
-rw-r--r--editor/icons/dark/icon_main_play.svg5
-rw-r--r--editor/icons/dark/icon_margin_container.svg6
-rw-r--r--editor/icons/dark/icon_material_preview_cube.svg8
-rw-r--r--editor/icons/dark/icon_material_preview_cube_off.svg9
-rw-r--r--editor/icons/dark/icon_material_preview_light_1.svg5
-rw-r--r--editor/icons/dark/icon_material_preview_light_1_off.svg5
-rw-r--r--editor/icons/dark/icon_material_preview_light_2.svg5
-rw-r--r--editor/icons/dark/icon_material_preview_light_2_off.svg6
-rw-r--r--editor/icons/dark/icon_material_preview_sphere.svg5
-rw-r--r--editor/icons/dark/icon_material_preview_sphere_off.svg5
-rw-r--r--editor/icons/dark/icon_matrix.svg19
-rw-r--r--editor/icons/dark/icon_menu_button.svg6
-rw-r--r--editor/icons/dark/icon_mesh.svg5
-rw-r--r--editor/icons/dark/icon_mesh_instance.svg13
-rw-r--r--editor/icons/dark/icon_mesh_library.svg5
-rw-r--r--editor/icons/dark/icon_mini_aabb.svg10
-rw-r--r--editor/icons/dark/icon_mini_array.svg13
-rw-r--r--editor/icons/dark/icon_mini_basis.svg19
-rw-r--r--editor/icons/dark/icon_mini_boolean.svg13
-rw-r--r--editor/icons/dark/icon_mini_color.svg7
-rw-r--r--editor/icons/dark/icon_mini_color_array.svg14
-rw-r--r--editor/icons/dark/icon_mini_dictionary.svg16
-rw-r--r--editor/icons/dark/icon_mini_float.svg15
-rw-r--r--editor/icons/dark/icon_mini_float_array.svg13
-rw-r--r--editor/icons/dark/icon_mini_image.svg17
-rw-r--r--editor/icons/dark/icon_mini_input.svg15
-rw-r--r--editor/icons/dark/icon_mini_int_array.svg8
-rw-r--r--editor/icons/dark/icon_mini_integer.svg14
-rw-r--r--editor/icons/dark/icon_mini_matrix3.svg19
-rw-r--r--editor/icons/dark/icon_mini_object.svg11
-rw-r--r--editor/icons/dark/icon_mini_path.svg14
-rw-r--r--editor/icons/dark/icon_mini_plane.svg12
-rw-r--r--editor/icons/dark/icon_mini_quat.svg12
-rw-r--r--editor/icons/dark/icon_mini_raw_array.svg9
-rw-r--r--editor/icons/dark/icon_mini_rect2.svg19
-rw-r--r--editor/icons/dark/icon_mini_rid.svg14
-rw-r--r--editor/icons/dark/icon_mini_string.svg12
-rw-r--r--editor/icons/dark/icon_mini_string_array.svg10
-rw-r--r--editor/icons/dark/icon_mini_transform.svg7
-rw-r--r--editor/icons/dark/icon_mini_transform2D.svg10
-rw-r--r--editor/icons/dark/icon_mini_variant.svg14
-rw-r--r--editor/icons/dark/icon_mini_vector2.svg15
-rw-r--r--editor/icons/dark/icon_mini_vector2_array.svg12
-rw-r--r--editor/icons/dark/icon_mini_vector3.svg15
-rw-r--r--editor/icons/dark/icon_mini_vector3_array.svg12
-rw-r--r--editor/icons/dark/icon_mirror_x.svg7
-rw-r--r--editor/icons/dark/icon_mirror_y.svg5
-rw-r--r--editor/icons/dark/icon_mouse.svg5
-rw-r--r--editor/icons/dark/icon_move_down.svg6
-rw-r--r--editor/icons/dark/icon_move_point.svg7
-rw-r--r--editor/icons/dark/icon_move_up.svg6
-rw-r--r--editor/icons/dark/icon_multi_edit.svg8
-rw-r--r--editor/icons/dark/icon_multi_line.svg10
-rw-r--r--editor/icons/dark/icon_multi_mesh.svg5
-rw-r--r--editor/icons/dark/icon_multi_mesh_instance.svg6
-rw-r--r--editor/icons/dark/icon_multi_script.svg6
-rw-r--r--editor/icons/dark/icon_native_script.svg5
-rw-r--r--editor/icons/dark/icon_navigation.svg5
-rw-r--r--editor/icons/dark/icon_navigation_2d.svg5
-rw-r--r--editor/icons/dark/icon_navigation_mesh.svg5
-rw-r--r--editor/icons/dark/icon_navigation_mesh_instance.svg8
-rw-r--r--editor/icons/dark/icon_navigation_polygon.svg8
-rw-r--r--editor/icons/dark/icon_navigation_polygon_instance.svg6
-rw-r--r--editor/icons/dark/icon_new.svg8
-rw-r--r--editor/icons/dark/icon_nine_patch_rect.svg12
-rw-r--r--editor/icons/dark/icon_node.svg5
-rw-r--r--editor/icons/dark/icon_node_2d.svg5
-rw-r--r--editor/icons/dark/icon_node_warning.svg7
-rw-r--r--editor/icons/dark/icon_non_favorite.svg5
-rw-r--r--editor/icons/dark/icon_object.svg6
-rw-r--r--editor/icons/dark/icon_occluder_polygon_2d.svg6
-rw-r--r--editor/icons/dark/icon_omni_light.svg5
-rw-r--r--editor/icons/dark/icon_option_button.svg6
-rw-r--r--editor/icons/dark/icon_override.svg6
-rw-r--r--editor/icons/dark/icon_packed_data_container.svg13
-rw-r--r--editor/icons/dark/icon_packed_scene.svg8
-rw-r--r--editor/icons/dark/icon_panel.svg5
-rw-r--r--editor/icons/dark/icon_panel_container.svg5
-rw-r--r--editor/icons/dark/icon_panels_1.svg5
-rw-r--r--editor/icons/dark/icon_panels_2.svg6
-rw-r--r--editor/icons/dark/icon_panels_2_alt.svg6
-rw-r--r--editor/icons/dark/icon_panels_3.svg7
-rw-r--r--editor/icons/dark/icon_panels_3_alt.svg7
-rw-r--r--editor/icons/dark/icon_panels_4.svg8
-rw-r--r--editor/icons/dark/icon_panorama_sky.svg14
-rw-r--r--editor/icons/dark/icon_parallax_background.svg15
-rw-r--r--editor/icons/dark/icon_parallax_layer.svg8
-rw-r--r--editor/icons/dark/icon_particle_attractor_2d.svg9
-rw-r--r--editor/icons/dark/icon_particles.svg11
-rw-r--r--editor/icons/dark/icon_particles_2d.svg5
-rw-r--r--editor/icons/dark/icon_particles_material.svg11
-rw-r--r--editor/icons/dark/icon_path.svg7
-rw-r--r--editor/icons/dark/icon_path_2d.svg7
-rw-r--r--editor/icons/dark/icon_path_follow.svg7
-rw-r--r--editor/icons/dark/icon_path_follow_2d.svg7
-rw-r--r--editor/icons/dark/icon_pause.svg5
-rw-r--r--editor/icons/dark/icon_pin.svg8
-rw-r--r--editor/icons/dark/icon_pin_joint.svg8
-rw-r--r--editor/icons/dark/icon_pin_joint_2d.svg5
-rw-r--r--editor/icons/dark/icon_pin_pressed.svg8
-rw-r--r--editor/icons/dark/icon_plane.svg5
-rw-r--r--editor/icons/dark/icon_plane_mesh.svg5
-rw-r--r--editor/icons/dark/icon_plane_shape.svg5
-rw-r--r--editor/icons/dark/icon_play.svg5
-rw-r--r--editor/icons/dark/icon_play_backwards.svg5
-rw-r--r--editor/icons/dark/icon_play_custom.svg6
-rw-r--r--editor/icons/dark/icon_play_scene.svg8
-rw-r--r--editor/icons/dark/icon_play_start.svg8
-rw-r--r--editor/icons/dark/icon_play_start_backwards.svg8
-rw-r--r--editor/icons/dark/icon_polygon_2_d.svg5
-rw-r--r--editor/icons/dark/icon_polygon_path_finder.svg5
-rw-r--r--editor/icons/dark/icon_popup.svg5
-rw-r--r--editor/icons/dark/icon_popup_dialog.svg5
-rw-r--r--editor/icons/dark/icon_popup_menu.svg6
-rw-r--r--editor/icons/dark/icon_popup_panel.svg6
-rw-r--r--editor/icons/dark/icon_portal.svg5
-rw-r--r--editor/icons/dark/icon_position_2d.svg5
-rw-r--r--editor/icons/dark/icon_position_3d.svg5
-rw-r--r--editor/icons/dark/icon_prism_mesh.svg5
-rw-r--r--editor/icons/dark/icon_procedural_sky.svg14
-rw-r--r--editor/icons/dark/icon_progress_1.svg12
-rw-r--r--editor/icons/dark/icon_progress_2.svg12
-rw-r--r--editor/icons/dark/icon_progress_3.svg12
-rw-r--r--editor/icons/dark/icon_progress_4.svg12
-rw-r--r--editor/icons/dark/icon_progress_5.svg12
-rw-r--r--editor/icons/dark/icon_progress_6.svg12
-rw-r--r--editor/icons/dark/icon_progress_7.svg12
-rw-r--r--editor/icons/dark/icon_progress_8.svg12
-rw-r--r--editor/icons/dark/icon_progress_bar.svg8
-rw-r--r--editor/icons/dark/icon_proximity_group.svg11
-rw-r--r--editor/icons/dark/icon_quad.svg5
-rw-r--r--editor/icons/dark/icon_quad_mesh.svg5
-rw-r--r--editor/icons/dark/icon_quat.svg6
-rw-r--r--editor/icons/dark/icon_range.svg9
-rw-r--r--editor/icons/dark/icon_rating_no_star.svg7
-rw-r--r--editor/icons/dark/icon_rating_star.svg5
-rw-r--r--editor/icons/dark/icon_ray_cast.svg6
-rw-r--r--editor/icons/dark/icon_ray_cast_2d.svg5
-rw-r--r--editor/icons/dark/icon_ray_shape.svg9
-rw-r--r--editor/icons/dark/icon_ray_shape_2d.svg6
-rw-r--r--editor/icons/dark/icon_rayito.svg6
-rw-r--r--editor/icons/dark/icon_real.svg11
-rw-r--r--editor/icons/dark/icon_rectangle_shape_2d.svg5
-rw-r--r--editor/icons/dark/icon_reference_rect.svg12
-rw-r--r--editor/icons/dark/icon_reflection_probe.svg5
-rw-r--r--editor/icons/dark/icon_region_edit.svg13
-rw-r--r--editor/icons/dark/icon_reload.svg6
-rw-r--r--editor/icons/dark/icon_reload_small.svg6
-rw-r--r--editor/icons/dark/icon_remote.svg7
-rw-r--r--editor/icons/dark/icon_remote_transform.svg8
-rw-r--r--editor/icons/dark/icon_remote_transform_2d.svg8
-rw-r--r--editor/icons/dark/icon_remove.svg7
-rw-r--r--editor/icons/dark/icon_rename.svg5
-rw-r--r--editor/icons/dark/icon_reparent.svg6
-rw-r--r--editor/icons/dark/icon_resource_preloader.svg8
-rw-r--r--editor/icons/dark/icon_rich_text_label.svg11
-rw-r--r--editor/icons/dark/icon_rigid_body.svg6
-rw-r--r--editor/icons/dark/icon_rigid_body_2d.svg13
-rw-r--r--editor/icons/dark/icon_room.svg5
-rw-r--r--editor/icons/dark/icon_room_bounds.svg5
-rw-r--r--editor/icons/dark/icon_rotate_0.svg6
-rw-r--r--editor/icons/dark/icon_rotate_180.svg9
-rw-r--r--editor/icons/dark/icon_rotate_270.svg10
-rw-r--r--editor/icons/dark/icon_rotate_90.svg8
-rw-r--r--editor/icons/dark/icon_sample_library.svg6
-rw-r--r--editor/icons/dark/icon_save.svg7
-rw-r--r--editor/icons/dark/icon_script.svg7
-rw-r--r--editor/icons/dark/icon_script_create.svg8
-rw-r--r--editor/icons/dark/icon_script_remove.svg8
-rw-r--r--editor/icons/dark/icon_scroll_bar.svg7
-rw-r--r--editor/icons/dark/icon_scroll_container.svg9
-rw-r--r--editor/icons/dark/icon_search.svg6
-rw-r--r--editor/icons/dark/icon_segment_shape_2d.svg5
-rw-r--r--editor/icons/dark/icon_shader.svg11
-rw-r--r--editor/icons/dark/icon_short_cut.svg6
-rw-r--r--editor/icons/dark/icon_signal.svg9
-rw-r--r--editor/icons/dark/icon_skeleton.svg8
-rw-r--r--editor/icons/dark/icon_slider_joint.svg10
-rw-r--r--editor/icons/dark/icon_slot.svg7
-rw-r--r--editor/icons/dark/icon_snap.svg10
-rw-r--r--editor/icons/dark/icon_sort.svg5
-rw-r--r--editor/icons/dark/icon_sound_room_params.svg9
-rw-r--r--editor/icons/dark/icon_spatial.svg5
-rw-r--r--editor/icons/dark/icon_spatial_material.svg11
-rw-r--r--editor/icons/dark/icon_spatial_sample_player.svg5
-rw-r--r--editor/icons/dark/icon_spatial_stream_player.svg5
-rw-r--r--editor/icons/dark/icon_sphere_mesh.svg5
-rw-r--r--editor/icons/dark/icon_sphere_shape.svg6
-rw-r--r--editor/icons/dark/icon_spin_box.svg8
-rw-r--r--editor/icons/dark/icon_spot_light.svg5
-rw-r--r--editor/icons/dark/icon_sprite.svg5
-rw-r--r--editor/icons/dark/icon_sprite_3d.svg5
-rw-r--r--editor/icons/dark/icon_sprite_frames.svg11
-rw-r--r--editor/icons/dark/icon_static_body.svg5
-rw-r--r--editor/icons/dark/icon_static_body_2d.svg6
-rw-r--r--editor/icons/dark/icon_stop.svg5
-rw-r--r--editor/icons/dark/icon_stream_player.svg5
-rw-r--r--editor/icons/dark/icon_stream_texture.svg5
-rw-r--r--editor/icons/dark/icon_string.svg5
-rw-r--r--editor/icons/dark/icon_style_box_empty.svg10
-rw-r--r--editor/icons/dark/icon_style_box_flat.svg11
-rw-r--r--editor/icons/dark/icon_style_box_texture.svg11
-rw-r--r--editor/icons/dark/icon_tab_container.svg5
-rw-r--r--editor/icons/dark/icon_tabs.svg5
-rw-r--r--editor/icons/dark/icon_test_cube.svg7
-rw-r--r--editor/icons/dark/icon_text_edit.svg6
-rw-r--r--editor/icons/dark/icon_texture_button.svg7
-rw-r--r--editor/icons/dark/icon_texture_progress.svg8
-rw-r--r--editor/icons/dark/icon_texture_rect.svg6
-rw-r--r--editor/icons/dark/icon_theme.svg11
-rw-r--r--editor/icons/dark/icon_thumbnail_wait.svg5
-rw-r--r--editor/icons/dark/icon_tile_map.svg5
-rw-r--r--editor/icons/dark/icon_tile_set.svg5
-rw-r--r--editor/icons/dark/icon_timer.svg8
-rw-r--r--editor/icons/dark/icon_tool_button.svg11
-rw-r--r--editor/icons/dark/icon_tool_move.svg5
-rw-r--r--editor/icons/dark/icon_tool_pan.svg13
-rw-r--r--editor/icons/dark/icon_tool_rotate.svg5
-rw-r--r--editor/icons/dark/icon_tool_scale.svg5
-rw-r--r--editor/icons/dark/icon_tool_select.svg7
-rw-r--r--editor/icons/dark/icon_tools.svg5
-rw-r--r--editor/icons/dark/icon_touch_screen_button.svg5
-rw-r--r--editor/icons/dark/icon_track_add_key.svg5
-rw-r--r--editor/icons/dark/icon_track_add_key_hl.svg6
-rw-r--r--editor/icons/dark/icon_track_continuous.svg5
-rw-r--r--editor/icons/dark/icon_track_discrete.svg7
-rw-r--r--editor/icons/dark/icon_track_trigger.svg9
-rw-r--r--editor/icons/dark/icon_translation.svg5
-rw-r--r--editor/icons/dark/icon_transpose.svg12
-rw-r--r--editor/icons/dark/icon_tree.svg13
-rw-r--r--editor/icons/dark/icon_tween.svg5
-rw-r--r--editor/icons/dark/icon_unbone.svg5
-rw-r--r--editor/icons/dark/icon_ungroup.svg6
-rw-r--r--editor/icons/dark/icon_unlock.svg7
-rw-r--r--editor/icons/dark/icon_uv.svg5
-rw-r--r--editor/icons/dark/icon_v_box_container.svg5
-rw-r--r--editor/icons/dark/icon_v_button_array.svg6
-rw-r--r--editor/icons/dark/icon_v_scroll_bar.svg5
-rw-r--r--editor/icons/dark/icon_v_separator.svg5
-rw-r--r--editor/icons/dark/icon_v_slider.svg10
-rw-r--r--editor/icons/dark/icon_v_split_container.svg8
-rw-r--r--editor/icons/dark/icon_variant.svg16
-rw-r--r--editor/icons/dark/icon_vector.svg6
-rw-r--r--editor/icons/dark/icon_vector2.svg5
-rw-r--r--editor/icons/dark/icon_vehicle_body.svg7
-rw-r--r--editor/icons/dark/icon_vehicle_wheel.svg6
-rw-r--r--editor/icons/dark/icon_video_player.svg7
-rw-r--r--editor/icons/dark/icon_viewport.svg5
-rw-r--r--editor/icons/dark/icon_viewport_container.svg5
-rw-r--r--editor/icons/dark/icon_viewport_sprite.svg10
-rw-r--r--editor/icons/dark/icon_viewport_texture.svg5
-rw-r--r--editor/icons/dark/icon_visibility_enabler.svg9
-rw-r--r--editor/icons/dark/icon_visibility_enabler_2d.svg9
-rw-r--r--editor/icons/dark/icon_visibility_notifier.svg7
-rw-r--r--editor/icons/dark/icon_visibility_notifier_2d.svg5
-rw-r--r--editor/icons/dark/icon_visible.svg6
-rw-r--r--editor/icons/dark/icon_visual_script.svg6
-rw-r--r--editor/icons/dark/icon_visual_shader_port.svg5
-rw-r--r--editor/icons/dark/icon_vu_empty.svg13
-rw-r--r--editor/icons/dark/icon_vu_full.svg12
-rw-r--r--editor/icons/dark/icon_warning.svg5
-rw-r--r--editor/icons/dark/icon_window_dialog.svg5
-rw-r--r--editor/icons/dark/icon_world.svg6
-rw-r--r--editor/icons/dark/icon_world_2d.svg5
-rw-r--r--editor/icons/dark/icon_world_environment.svg8
-rw-r--r--editor/icons/dark/icon_y_sort.svg8
-rw-r--r--editor/icons/dark/icon_zoom.svg5
-rw-r--r--editor/icons/dark/icon_zoom_less.svg5
-rw-r--r--editor/icons/dark/icon_zoom_more.svg12
-rw-r--r--editor/icons/dark/icon_zoom_reset.svg10
-rw-r--r--editor/icons/icon_array_mesh.svg5
-rw-r--r--editor/icons/icon_audio_effect_amplify.svg2
-rw-r--r--editor/icons/icon_clear.svg5
-rw-r--r--editor/icons/icon_collision_polygon_2d.svg (renamed from editor/icons/icon_collision_2d.svg)0
-rw-r--r--editor/icons/icon_cube_mesh.svg2
-rw-r--r--editor/icons/icon_file_big_broken.svg7
-rw-r--r--editor/icons/icon_file_big_dead.svg7
-rw-r--r--editor/icons/icon_file_broken.svg7
-rw-r--r--editor/icons/icon_gizmo_camera.svg5
-rw-r--r--editor/icons/icon_gizmo_directional_light.svg2
-rw-r--r--editor/icons/icon_gizmo_g_i_probe.svg5
-rw-r--r--editor/icons/icon_gizmo_particles.svg5
-rw-r--r--editor/icons/icon_gizmo_reflection_probe.svg5
-rw-r--r--editor/icons/icon_gizmo_spatial_sample_player.svg2
-rw-r--r--editor/icons/icon_gizmo_spot_light.svg5
-rw-r--r--editor/icons/icon_gui_close_dark.svg5
-rw-r--r--editor/icons/icon_gui_close_light.svg5
-rw-r--r--editor/icons/icon_move_down.svg5
-rw-r--r--editor/icons/icon_move_up.svg5
-rw-r--r--editor/icons/icon_multi_mesh.svg2
-rw-r--r--editor/icons/icon_multi_mesh_instance.svg5
-rw-r--r--editor/icons/icon_navigation_mesh_instance.svg3
-rw-r--r--editor/icons/icon_packed_data_container.svg10
-rw-r--r--editor/icons/icon_particle_attractor_2d.svg8
-rw-r--r--editor/icons/icon_particles.svg10
-rw-r--r--editor/icons/icon_reflection_probe.svg6
-rw-r--r--editor/icons/icon_sprite_frames.svg10
-rw-r--r--editor/icons/icon_tile_set.svg2
-rw-r--r--editor/icons/icon_tool_button.svg8
-rw-r--r--editor/icons/icon_transpose.svg11
-rw-r--r--editor/icons/icon_tree.svg9
-rw-r--r--editor/icons/icon_v_slider.svg7
-rw-r--r--editor/icons/icon_v_split_container.svg7
-rw-r--r--editor/icons/icon_vehicle_body.svg6
-rw-r--r--editor/icons/icon_viewport_sprite.svg5
-rw-r--r--editor/icons/icon_visibility_enabler.svg8
-rw-r--r--editor/icons/icon_visibility_enabler_2d.svg8
-rw-r--r--editor/icons/icon_visibility_notifier.svg6
-rw-r--r--editor/icons/icon_visible.svg5
-rw-r--r--editor/icons/icon_world_environment.svg8
-rw-r--r--editor/icons/icon_y_sort.svg7
-rw-r--r--editor/import/editor_import_collada.cpp436
-rw-r--r--editor/import/editor_import_collada.h2
-rw-r--r--editor/import/editor_import_plugin.cpp2
-rw-r--r--editor/import/editor_import_plugin.h2
-rw-r--r--editor/import/editor_scene_importer_gltf.cpp7
-rw-r--r--editor/import/resource_importer_csv_translation.cpp26
-rw-r--r--editor/import/resource_importer_csv_translation.h2
-rw-r--r--editor/import/resource_importer_obj.cpp2
-rw-r--r--editor/import/resource_importer_obj.h2
-rw-r--r--editor/import/resource_importer_scene.cpp259
-rw-r--r--editor/import/resource_importer_scene.h4
-rw-r--r--editor/import/resource_importer_texture.cpp6
-rw-r--r--editor/import/resource_importer_texture.h2
-rw-r--r--editor/import/resource_importer_wav.cpp4
-rw-r--r--editor/import/resource_importer_wav.h2
-rw-r--r--editor/import_dock.cpp28
-rw-r--r--editor/import_dock.h5
-rw-r--r--editor/inspector_dock.cpp51
-rw-r--r--editor/inspector_dock.h63
-rw-r--r--editor/io_plugins/SCsub5
-rw-r--r--editor/io_plugins/editor_atlas.cpp153
-rw-r--r--editor/io_plugins/editor_atlas.h41
-rw-r--r--editor/io_plugins/editor_bitmask_import_plugin.cpp388
-rw-r--r--editor/io_plugins/editor_bitmask_import_plugin.h71
-rw-r--r--editor/io_plugins/editor_export_scene.cpp143
-rw-r--r--editor/io_plugins/editor_export_scene.h45
-rw-r--r--editor/io_plugins/editor_font_import_plugin.cpp1705
-rw-r--r--editor/io_plugins/editor_font_import_plugin.h59
-rw-r--r--editor/io_plugins/editor_mesh_import_plugin.cpp594
-rw-r--r--editor/io_plugins/editor_mesh_import_plugin.h60
-rw-r--r--editor/io_plugins/editor_sample_import_plugin.cpp930
-rw-r--r--editor/io_plugins/editor_sample_import_plugin.h75
-rw-r--r--editor/io_plugins/editor_scene_import_plugin.cpp2998
-rw-r--r--editor/io_plugins/editor_scene_import_plugin.h201
-rw-r--r--editor/io_plugins/editor_scene_importer_fbxconv.cpp1137
-rw-r--r--editor/io_plugins/editor_scene_importer_fbxconv.h112
-rw-r--r--editor/io_plugins/editor_texture_import_plugin.cpp1896
-rw-r--r--editor/io_plugins/editor_texture_import_plugin.h175
-rw-r--r--editor/io_plugins/editor_translation_import_plugin.cpp480
-rw-r--r--editor/io_plugins/editor_translation_import_plugin.h57
-rw-r--r--editor/multi_node_edit.cpp2
-rw-r--r--editor/multi_node_edit.h2
-rw-r--r--editor/node_dock.cpp5
-rw-r--r--editor/node_dock.h2
-rw-r--r--editor/output_strings.cpp2
-rw-r--r--editor/output_strings.h2
-rw-r--r--editor/pane_drag.cpp2
-rw-r--r--editor/pane_drag.h2
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp83
-rw-r--r--editor/plugins/animation_player_editor_plugin.h2
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp47
-rw-r--r--editor/plugins/animation_tree_editor_plugin.h2
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp (renamed from editor/asset_library_editor_plugin.cpp)4
-rw-r--r--editor/plugins/asset_library_editor_plugin.h (renamed from editor/asset_library_editor_plugin.h)2
-rw-r--r--editor/plugins/baked_light_baker.cpp2732
-rw-r--r--editor/plugins/baked_light_baker.h382
-rw-r--r--editor/plugins/baked_light_baker_cmpxchg.cpp105
-rw-r--r--editor/plugins/baked_light_editor_plugin.cpp377
-rw-r--r--editor/plugins/baked_light_editor_plugin.h118
-rw-r--r--editor/plugins/camera_editor_plugin.cpp8
-rw-r--r--editor/plugins/camera_editor_plugin.h2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp517
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h27
-rw-r--r--editor/plugins/collision_polygon_2d_editor_plugin.cpp23
-rw-r--r--editor/plugins/collision_polygon_2d_editor_plugin.h2
-rw-r--r--editor/plugins/collision_polygon_editor_plugin.cpp24
-rw-r--r--editor/plugins/collision_polygon_editor_plugin.h2
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp22
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.h2
-rw-r--r--editor/plugins/cube_grid_theme_editor_plugin.cpp129
-rw-r--r--editor/plugins/cube_grid_theme_editor_plugin.h2
-rw-r--r--editor/plugins/curve_editor_plugin.cpp18
-rw-r--r--editor/plugins/curve_editor_plugin.h2
-rw-r--r--editor/plugins/editor_preview_plugins.cpp20
-rw-r--r--editor/plugins/editor_preview_plugins.h5
-rw-r--r--editor/plugins/gi_probe_editor_plugin.cpp4
-rw-r--r--editor/plugins/gi_probe_editor_plugin.h2
-rw-r--r--editor/plugins/gradient_editor_plugin.cpp6
-rw-r--r--editor/plugins/gradient_editor_plugin.h4
-rw-r--r--editor/plugins/item_list_editor_plugin.cpp12
-rw-r--r--editor/plugins/item_list_editor_plugin.h2
-rw-r--r--editor/plugins/light_occluder_2d_editor_plugin.cpp19
-rw-r--r--editor/plugins/light_occluder_2d_editor_plugin.h2
-rw-r--r--editor/plugins/line_2d_editor_plugin.cpp8
-rw-r--r--editor/plugins/line_2d_editor_plugin.h2
-rw-r--r--editor/plugins/material_editor_plugin.cpp10
-rw-r--r--editor/plugins/material_editor_plugin.h9
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp4
-rw-r--r--editor/plugins/mesh_editor_plugin.h2
-rw-r--r--editor/plugins/mesh_instance_editor_plugin.cpp6
-rw-r--r--editor/plugins/mesh_instance_editor_plugin.h2
-rw-r--r--editor/plugins/multimesh_editor_plugin.cpp23
-rw-r--r--editor/plugins/multimesh_editor_plugin.h2
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.cpp23
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.h2
-rw-r--r--editor/plugins/particles_2d_editor_plugin.cpp11
-rw-r--r--editor/plugins/particles_2d_editor_plugin.h2
-rw-r--r--editor/plugins/particles_editor_plugin.cpp10
-rw-r--r--editor/plugins/particles_editor_plugin.h2
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp223
-rw-r--r--editor/plugins/path_2d_editor_plugin.h2
-rw-r--r--editor/plugins/path_editor_plugin.cpp10
-rw-r--r--editor/plugins/path_editor_plugin.h2
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp48
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.h2
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp5
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.h2
-rw-r--r--editor/plugins/rich_text_editor_plugin.cpp151
-rw-r--r--editor/plugins/rich_text_editor_plugin.h90
-rw-r--r--editor/plugins/sample_editor_plugin.cpp452
-rw-r--r--editor/plugins/sample_editor_plugin.h93
-rw-r--r--editor/plugins/sample_library_editor_plugin.cpp547
-rw-r--r--editor/plugins/sample_library_editor_plugin.h108
-rw-r--r--editor/plugins/sample_player_editor_plugin.cpp202
-rw-r--r--editor/plugins/sample_player_editor_plugin.h91
-rw-r--r--editor/plugins/script_editor_plugin.cpp362
-rw-r--r--editor/plugins/script_editor_plugin.h13
-rw-r--r--editor/plugins/script_text_editor.cpp36
-rw-r--r--editor/plugins/script_text_editor.h6
-rw-r--r--editor/plugins/shader_editor_plugin.cpp131
-rw-r--r--editor/plugins/shader_editor_plugin.h11
-rw-r--r--editor/plugins/shader_graph_editor_plugin.cpp57
-rw-r--r--editor/plugins/shader_graph_editor_plugin.h11
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp440
-rw-r--r--editor/plugins/spatial_editor_plugin.h15
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp78
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.h4
-rw-r--r--editor/plugins/stream_editor_plugin.cpp150
-rw-r--r--editor/plugins/stream_editor_plugin.h85
-rw-r--r--editor/plugins/style_box_editor_plugin.cpp6
-rw-r--r--editor/plugins/style_box_editor_plugin.h2
-rw-r--r--editor/plugins/texture_editor_plugin.cpp14
-rw-r--r--editor/plugins/texture_editor_plugin.h2
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp23
-rw-r--r--editor/plugins/texture_region_editor_plugin.h2
-rw-r--r--editor/plugins/theme_editor_plugin.cpp12
-rw-r--r--editor/plugins/theme_editor_plugin.h2
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp16
-rw-r--r--editor/plugins/tile_map_editor_plugin.h2
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp22
-rw-r--r--editor/plugins/tile_set_editor_plugin.h2
-rw-r--r--editor/progress_dialog.cpp2
-rw-r--r--editor/progress_dialog.h2
-rw-r--r--editor/project_export.cpp7
-rw-r--r--editor/project_export.h2
-rw-r--r--editor/project_manager.cpp36
-rw-r--r--editor/project_manager.h4
-rw-r--r--editor/project_settings_editor.cpp101
-rw-r--r--editor/project_settings_editor.h18
-rw-r--r--editor/property_editor.cpp401
-rw-r--r--editor/property_editor.h11
-rw-r--r--editor/property_selector.cpp10
-rw-r--r--editor/property_selector.h2
-rw-r--r--editor/pvrtc_compress.cpp2
-rw-r--r--editor/pvrtc_compress.h2
-rw-r--r--editor/quick_open.cpp2
-rw-r--r--editor/quick_open.h2
-rw-r--r--editor/register_exporters.h2
-rw-r--r--editor/reparent_dialog.cpp2
-rw-r--r--editor/reparent_dialog.h2
-rw-r--r--editor/resources_dock.cpp378
-rw-r--r--editor/resources_dock.h99
-rw-r--r--editor/run_settings_dialog.cpp3
-rw-r--r--editor/run_settings_dialog.h2
-rw-r--r--editor/scene_tree_dock.cpp200
-rw-r--r--editor/scene_tree_dock.h21
-rw-r--r--editor/scene_tree_editor.cpp12
-rw-r--r--editor/scene_tree_editor.h2
-rw-r--r--editor/script_create_dialog.cpp14
-rw-r--r--editor/script_create_dialog.h2
-rw-r--r--editor/script_editor_debugger.cpp21
-rw-r--r--editor/script_editor_debugger.h2
-rw-r--r--editor/settings_config_dialog.cpp4
-rw-r--r--editor/settings_config_dialog.h2
-rw-r--r--editor/spatial_editor_gizmos.cpp687
-rw-r--r--editor/spatial_editor_gizmos.h70
-rw-r--r--editor/translations/ar.po1313
-rw-r--r--editor/translations/bg.po1538
-rw-r--r--editor/translations/bn.po1575
-rw-r--r--editor/translations/ca.po1538
-rw-r--r--editor/translations/cs.po1466
-rw-r--r--editor/translations/da.po1405
-rw-r--r--editor/translations/de.po2040
-rw-r--r--editor/translations/de_CH.po1385
-rw-r--r--editor/translations/editor.pot1305
-rw-r--r--editor/translations/el.po1893
-rw-r--r--editor/translations/es.po1705
-rw-r--r--editor/translations/es_AR.po1901
-rw-r--r--editor/translations/fa.po1417
-rw-r--r--editor/translations/fi.po1473
-rw-r--r--editor/translations/fr.po1764
-rw-r--r--editor/translations/hu.po1305
-rw-r--r--editor/translations/id.po1445
-rw-r--r--editor/translations/it.po1929
-rw-r--r--editor/translations/ja.po5123
-rw-r--r--editor/translations/ko.po1567
-rw-r--r--editor/translations/nb.po1338
-rw-r--r--editor/translations/nl.po1500
-rw-r--r--editor/translations/pl.po1548
-rw-r--r--editor/translations/pr.po1417
-rw-r--r--editor/translations/pt_BR.po1687
-rw-r--r--editor/translations/pt_PT.po1342
-rw-r--r--editor/translations/ru.po1867
-rw-r--r--editor/translations/sk.po1335
-rw-r--r--editor/translations/sl.po1342
-rw-r--r--editor/translations/th.po2018
-rw-r--r--editor/translations/tr.po1613
-rw-r--r--editor/translations/ur_PK.po1321
-rw-r--r--editor/translations/zh_CN.po1807
-rw-r--r--editor/translations/zh_HK.po1705
-rw-r--r--editor/translations/zh_TW.po1384
-rw-r--r--main/SCsub11
-rw-r--r--main/input_default.cpp55
-rw-r--r--main/input_default.h2
-rw-r--r--main/main.cpp57
-rw-r--r--main/main.h5
-rw-r--r--main/performance.cpp6
-rw-r--r--main/performance.h2
-rw-r--r--main/tests/test_containers.cpp92
-rw-r--r--main/tests/test_containers.h43
-rw-r--r--main/tests/test_gdscript.cpp12
-rw-r--r--main/tests/test_gdscript.h2
-rw-r--r--main/tests/test_gui.cpp104
-rw-r--r--main/tests/test_gui.h2
-rw-r--r--main/tests/test_image.cpp2
-rw-r--r--main/tests/test_image.h2
-rw-r--r--main/tests/test_io.cpp62
-rw-r--r--main/tests/test_io.h2
-rw-r--r--main/tests/test_main.cpp29
-rw-r--r--main/tests/test_main.h2
-rw-r--r--main/tests/test_math.cpp151
-rw-r--r--main/tests/test_math.h2
-rw-r--r--main/tests/test_ordered_hash_map.cpp171
-rw-r--r--main/tests/test_ordered_hash_map.h (renamed from main/tests/test_sound.h)12
-rw-r--r--main/tests/test_physics.cpp157
-rw-r--r--main/tests/test_physics.h2
-rw-r--r--main/tests/test_physics_2d.cpp2
-rw-r--r--main/tests/test_physics_2d.h2
-rw-r--r--main/tests/test_render.cpp2
-rw-r--r--main/tests/test_render.h2
-rw-r--r--main/tests/test_shader_lang.cpp8
-rw-r--r--main/tests/test_shader_lang.h2
-rw-r--r--main/tests/test_string.cpp2
-rw-r--r--main/tests/test_string.h2
-rw-r--r--methods.py112
-rw-r--r--misc/dist/ios_xcode/godot_ios/main.m2
-rwxr-xr-xmisc/hooks/pre-commit-clang-format4
-rw-r--r--misc/scripts/addheader.py2
-rw-r--r--misc/scripts/svgs_2_pngs.py139
-rw-r--r--modules/dds/register_types.cpp2
-rw-r--r--modules/dds/register_types.h2
-rw-r--r--modules/dds/texture_loader_dds.cpp2
-rw-r--r--modules/dds/texture_loader_dds.h2
-rw-r--r--modules/enet/networked_multiplayer_enet.cpp2
-rw-r--r--modules/enet/networked_multiplayer_enet.h2
-rw-r--r--modules/enet/register_types.cpp2
-rw-r--r--modules/enet/register_types.h2
-rw-r--r--modules/etc/SCsub6
-rw-r--r--modules/etc/image_etc.cpp4
-rw-r--r--modules/etc/image_etc.h2
-rw-r--r--modules/etc/register_types.cpp2
-rw-r--r--modules/etc/register_types.h2
-rw-r--r--modules/etc/texture_loader_pkm.cpp2
-rw-r--r--modules/etc/texture_loader_pkm.h2
-rw-r--r--modules/freetype/SCsub3
-rw-r--r--modules/freetype/register_types.cpp2
-rw-r--r--modules/freetype/register_types.h2
-rw-r--r--modules/freetype/uwpdef.h2
-rw-r--r--modules/gdnative/gdnative.cpp38
-rw-r--r--modules/gdnative/gdnative.h19
-rw-r--r--modules/gdnative/godot/array.cpp16
-rw-r--r--modules/gdnative/godot/array.h4
-rw-r--r--modules/gdnative/godot/basis.cpp20
-rw-r--r--modules/gdnative/godot/basis.h8
-rw-r--r--modules/gdnative/godot/color.cpp2
-rw-r--r--modules/gdnative/godot/color.h2
-rw-r--r--modules/gdnative/godot/dictionary.cpp2
-rw-r--r--modules/gdnative/godot/dictionary.h4
-rw-r--r--modules/gdnative/godot/gdnative.cpp2
-rw-r--r--modules/gdnative/godot/gdnative.h4
-rw-r--r--modules/gdnative/godot/node_path.cpp2
-rw-r--r--modules/gdnative/godot/node_path.h4
-rw-r--r--modules/gdnative/godot/plane.cpp2
-rw-r--r--modules/gdnative/godot/plane.h2
-rw-r--r--modules/gdnative/godot/pool_arrays.cpp16
-rw-r--r--modules/gdnative/godot/pool_arrays.h16
-rw-r--r--modules/gdnative/godot/quat.cpp2
-rw-r--r--modules/gdnative/godot/quat.h2
-rw-r--r--modules/gdnative/godot/rect2.cpp2
-rw-r--r--modules/gdnative/godot/rect2.h2
-rw-r--r--modules/gdnative/godot/rect3.cpp2
-rw-r--r--modules/gdnative/godot/rect3.h2
-rw-r--r--modules/gdnative/godot/rid.cpp4
-rw-r--r--modules/gdnative/godot/rid.h4
-rw-r--r--modules/gdnative/godot/string.cpp4
-rw-r--r--modules/gdnative/godot/string.h6
-rw-r--r--modules/gdnative/godot/transform.cpp2
-rw-r--r--modules/gdnative/godot/transform.h2
-rw-r--r--modules/gdnative/godot/transform2d.cpp2
-rw-r--r--modules/gdnative/godot/transform2d.h2
-rw-r--r--modules/gdnative/godot/variant.cpp2
-rw-r--r--modules/gdnative/godot/variant.h4
-rw-r--r--modules/gdnative/godot/vector2.cpp2
-rw-r--r--modules/gdnative/godot/vector2.h2
-rw-r--r--modules/gdnative/godot/vector3.cpp2
-rw-r--r--modules/gdnative/godot/vector3.h2
-rw-r--r--modules/gdnative/register_types.cpp2
-rw-r--r--modules/gdnative/register_types.h2
-rw-r--r--modules/gdscript/gd_compiler.cpp4
-rw-r--r--modules/gdscript/gd_compiler.h15
-rw-r--r--modules/gdscript/gd_editor.cpp488
-rw-r--r--modules/gdscript/gd_function.cpp34
-rw-r--r--modules/gdscript/gd_function.h2
-rw-r--r--modules/gdscript/gd_functions.cpp34
-rw-r--r--modules/gdscript/gd_functions.h2
-rw-r--r--modules/gdscript/gd_parser.cpp32
-rw-r--r--modules/gdscript/gd_parser.h6
-rw-r--r--modules/gdscript/gd_script.cpp122
-rw-r--r--modules/gdscript/gd_script.h4
-rw-r--r--modules/gdscript/gd_tokenizer.cpp52
-rw-r--r--modules/gdscript/gd_tokenizer.h2
-rw-r--r--modules/gdscript/register_types.cpp105
-rw-r--r--modules/gdscript/register_types.h2
-rw-r--r--modules/gridmap/grid_map.cpp940
-rw-r--r--modules/gridmap/grid_map.h89
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp528
-rw-r--r--modules/gridmap/grid_map_editor_plugin.h20
-rw-r--r--modules/gridmap/register_types.cpp2
-rw-r--r--modules/gridmap/register_types.h2
-rw-r--r--modules/hdr/image_loader_hdr.cpp4
-rw-r--r--modules/hdr/image_loader_hdr.h4
-rw-r--r--modules/hdr/register_types.cpp2
-rw-r--r--modules/hdr/register_types.h2
-rw-r--r--modules/jpg/image_loader_jpegd.cpp2
-rw-r--r--modules/jpg/image_loader_jpegd.h2
-rw-r--r--modules/jpg/register_types.cpp2
-rw-r--r--modules/jpg/register_types.h2
-rw-r--r--modules/nativescript/api_generator.cpp84
-rw-r--r--modules/nativescript/api_generator.h2
-rw-r--r--modules/nativescript/godot_nativescript.cpp2
-rw-r--r--modules/nativescript/godot_nativescript.h6
-rw-r--r--modules/nativescript/nativescript.cpp10
-rw-r--r--modules/nativescript/nativescript.h2
-rw-r--r--modules/nativescript/register_types.cpp2
-rw-r--r--modules/nativescript/register_types.h2
-rw-r--r--modules/ogg/register_types.cpp2
-rw-r--r--modules/ogg/register_types.h2
-rw-r--r--modules/openssl/SCsub2
-rw-r--r--modules/openssl/register_types.cpp2
-rw-r--r--modules/openssl/register_types.h2
-rw-r--r--modules/openssl/stream_peer_openssl.cpp21
-rw-r--r--modules/openssl/stream_peer_openssl.h2
-rw-r--r--modules/opus/audio_stream_opus.cpp2
-rw-r--r--modules/opus/audio_stream_opus.h2
-rw-r--r--modules/opus/register_types.cpp2
-rw-r--r--modules/opus/register_types.h2
-rw-r--r--modules/pbm/bitmap_loader_pbm.cpp2
-rw-r--r--modules/pbm/bitmap_loader_pbm.h2
-rw-r--r--modules/pbm/register_types.cpp2
-rw-r--r--modules/pbm/register_types.h2
-rw-r--r--modules/pvr/register_types.cpp2
-rw-r--r--modules/pvr/register_types.h2
-rw-r--r--modules/pvr/texture_loader_pvr.cpp2
-rw-r--r--modules/pvr/texture_loader_pvr.h2
-rw-r--r--modules/regex/SCsub50
-rw-r--r--modules/regex/regex.cpp1562
-rw-r--r--modules/regex/regex.h49
-rw-r--r--modules/regex/register_types.cpp2
-rw-r--r--modules/regex/register_types.h2
-rw-r--r--modules/register_module_types.h2
-rw-r--r--modules/squish/image_compress_squish.cpp8
-rw-r--r--modules/squish/image_compress_squish.h2
-rw-r--r--modules/squish/register_types.cpp2
-rw-r--r--modules/squish/register_types.h2
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.cpp7
-rw-r--r--modules/stb_vorbis/audio_stream_ogg_vorbis.h5
-rw-r--r--modules/stb_vorbis/register_types.cpp2
-rw-r--r--modules/stb_vorbis/register_types.h2
-rw-r--r--modules/stb_vorbis/resource_importer_ogg_vorbis.cpp2
-rw-r--r--modules/stb_vorbis/resource_importer_ogg_vorbis.h2
-rw-r--r--modules/svg/SCsub7
-rw-r--r--modules/svg/image_loader_svg.cpp53
-rw-r--r--modules/svg/image_loader_svg.h9
-rw-r--r--modules/svg/register_types.cpp2
-rw-r--r--modules/svg/register_types.h2
-rw-r--r--modules/tga/image_loader_tga.cpp14
-rw-r--r--modules/tga/image_loader_tga.h4
-rw-r--r--modules/tga/register_types.cpp2
-rw-r--r--modules/tga/register_types.h2
-rw-r--r--modules/theora/register_types.cpp2
-rw-r--r--modules/theora/register_types.h2
-rw-r--r--modules/theora/video_stream_theora.cpp153
-rw-r--r--modules/theora/video_stream_theora.h2
-rw-r--r--modules/tinyexr/image_loader_tinyexr.cpp4
-rw-r--r--modules/tinyexr/image_loader_tinyexr.h4
-rw-r--r--modules/tinyexr/register_types.cpp2
-rw-r--r--modules/tinyexr/register_types.h2
-rw-r--r--modules/visual_script/register_types.cpp2
-rw-r--r--modules/visual_script/register_types.h2
-rw-r--r--modules/visual_script/visual_script.cpp24
-rw-r--r--modules/visual_script/visual_script.h2
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.cpp2
-rw-r--r--modules/visual_script/visual_script_builtin_funcs.h2
-rw-r--r--modules/visual_script/visual_script_editor.cpp125
-rw-r--r--modules/visual_script/visual_script_editor.h2
-rw-r--r--modules/visual_script/visual_script_expression.cpp4
-rw-r--r--modules/visual_script/visual_script_expression.h2
-rw-r--r--modules/visual_script/visual_script_flow_control.cpp2
-rw-r--r--modules/visual_script/visual_script_flow_control.h2
-rw-r--r--modules/visual_script/visual_script_func_nodes.cpp33
-rw-r--r--modules/visual_script/visual_script_func_nodes.h2
-rw-r--r--modules/visual_script/visual_script_nodes.cpp27
-rw-r--r--modules/visual_script/visual_script_nodes.h4
-rw-r--r--modules/visual_script/visual_script_yield_nodes.cpp15
-rw-r--r--modules/visual_script/visual_script_yield_nodes.h2
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.cpp2
-rw-r--r--modules/vorbis/audio_stream_ogg_vorbis.h2
-rw-r--r--modules/vorbis/register_types.cpp2
-rw-r--r--modules/vorbis/register_types.h2
-rw-r--r--modules/webm/register_types.cpp2
-rw-r--r--modules/webm/register_types.h2
-rw-r--r--modules/webm/video_stream_webm.cpp4
-rw-r--r--modules/webm/video_stream_webm.h4
-rw-r--r--modules/webp/image_loader_webp.cpp2
-rw-r--r--modules/webp/image_loader_webp.h2
-rw-r--r--modules/webp/register_types.cpp2
-rw-r--r--modules/webp/register_types.h2
-rw-r--r--platform/android/SCsub11
-rw-r--r--platform/android/audio_driver_jandroid.cpp2
-rw-r--r--platform/android/audio_driver_jandroid.h2
-rw-r--r--platform/android/audio_driver_opensl.cpp129
-rw-r--r--platform/android/audio_driver_opensl.h2
-rw-r--r--platform/android/detect.py26
-rw-r--r--platform/android/dir_access_android.cpp2
-rw-r--r--platform/android/dir_access_android.h2
-rw-r--r--platform/android/dir_access_jandroid.cpp2
-rw-r--r--platform/android/dir_access_jandroid.h2
-rw-r--r--platform/android/export/export.cpp2039
-rw-r--r--platform/android/export/export.h2
-rw-r--r--platform/android/file_access_android.cpp2
-rw-r--r--platform/android/file_access_android.h2
-rw-r--r--platform/android/file_access_jandroid.cpp2
-rw-r--r--platform/android/file_access_jandroid.h2
-rw-r--r--platform/android/globals/global_defaults.cpp2
-rw-r--r--platform/android/globals/global_defaults.h2
-rw-r--r--platform/android/godot_android.cpp33
-rw-r--r--platform/android/java/src/org/godotengine/godot/Dictionary.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/Godot.java257
-rw-r--r--platform/android/java/src/org/godotengine/godot/GodotDownloaderAlarmReceiver.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/GodotIO.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/GodotLib.java7
-rw-r--r--platform/android/java/src/org/godotengine/godot/GodotPaymentV3.java4
-rw-r--r--platform/android/java/src/org/godotengine/godot/GodotView.java96
-rw-r--r--platform/android/java/src/org/godotengine/godot/input/GodotEditText.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/input/GodotTextInputWrapper.java45
-rw-r--r--platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/payments/GenericConsumeTask.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/payments/HandlePurchaseTask.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/payments/PaymentsCache.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/payments/PurchaseTask.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/utils/Crypt.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/utils/CustomSSLSocketFactory.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java2
-rw-r--r--platform/android/java/src/org/godotengine/godot/utils/RequestParams.java2
-rw-r--r--platform/android/java_class_wrapper.cpp4
-rw-r--r--platform/android/java_class_wrapper.h2
-rw-r--r--platform/android/java_glue.cpp246
-rw-r--r--platform/android/java_glue.h5
-rw-r--r--platform/android/os_android.cpp40
-rw-r--r--platform/android/os_android.h7
-rw-r--r--platform/android/platform_config.h2
-rw-r--r--platform/android/power_android.cpp2
-rw-r--r--platform/android/power_android.h2
-rw-r--r--platform/android/thread_jandroid.cpp17
-rw-r--r--platform/android/thread_jandroid.h5
-rw-r--r--platform/haiku/audio_driver_media_kit.cpp2
-rw-r--r--platform/haiku/audio_driver_media_kit.h2
-rw-r--r--platform/haiku/context_gl_haiku.cpp2
-rw-r--r--platform/haiku/context_gl_haiku.h2
-rw-r--r--platform/haiku/godot_haiku.cpp2
-rw-r--r--platform/haiku/haiku_application.cpp2
-rw-r--r--platform/haiku/haiku_application.h2
-rw-r--r--platform/haiku/haiku_direct_window.cpp2
-rw-r--r--platform/haiku/haiku_direct_window.h2
-rw-r--r--platform/haiku/haiku_gl_view.cpp2
-rw-r--r--platform/haiku/haiku_gl_view.h2
-rw-r--r--platform/haiku/key_mapping_haiku.cpp2
-rw-r--r--platform/haiku/key_mapping_haiku.h2
-rw-r--r--platform/haiku/os_haiku.cpp11
-rw-r--r--platform/haiku/os_haiku.h2
-rw-r--r--platform/haiku/platform_config.h2
-rw-r--r--platform/haiku/power_haiku.cpp2
-rw-r--r--platform/haiku/power_haiku.h2
-rw-r--r--platform/iphone/app_delegate.h2
-rw-r--r--platform/iphone/app_delegate.mm2
-rw-r--r--platform/iphone/audio_driver_iphone.cpp2
-rw-r--r--platform/iphone/audio_driver_iphone.h2
-rw-r--r--platform/iphone/detect.py8
-rw-r--r--platform/iphone/export/export.cpp2
-rw-r--r--platform/iphone/export/export.h2
-rw-r--r--platform/iphone/game_center.h2
-rw-r--r--platform/iphone/game_center.mm2
-rw-r--r--platform/iphone/gl_view.h2
-rw-r--r--platform/iphone/gl_view.mm2
-rw-r--r--platform/iphone/globals/global_defaults.cpp2
-rw-r--r--platform/iphone/globals/global_defaults.h2
-rw-r--r--platform/iphone/godot_iphone.cpp2
-rw-r--r--platform/iphone/icloud.h4
-rw-r--r--platform/iphone/icloud.mm4
-rw-r--r--platform/iphone/in_app_store.h2
-rw-r--r--platform/iphone/in_app_store.mm2
-rw-r--r--platform/iphone/ios.h2
-rw-r--r--platform/iphone/ios.mm2
-rw-r--r--platform/iphone/main.m2
-rw-r--r--platform/iphone/os_iphone.cpp2
-rw-r--r--platform/iphone/os_iphone.h6
-rw-r--r--platform/iphone/platform_config.h2
-rw-r--r--platform/iphone/platform_refcount.h2
-rw-r--r--platform/iphone/power_iphone.cpp2
-rw-r--r--platform/iphone/power_iphone.h2
-rw-r--r--platform/iphone/sem_iphone.cpp2
-rw-r--r--platform/iphone/sem_iphone.h2
-rw-r--r--platform/iphone/view_controller.h2
-rw-r--r--platform/iphone/view_controller.mm2
-rw-r--r--platform/javascript/audio_driver_javascript.cpp2
-rw-r--r--platform/javascript/audio_driver_javascript.h2
-rw-r--r--platform/javascript/audio_server_javascript.cpp4
-rw-r--r--platform/javascript/audio_server_javascript.h4
-rw-r--r--platform/javascript/detect.py2
-rw-r--r--platform/javascript/dom_keys.h2
-rw-r--r--platform/javascript/export/export.cpp2
-rw-r--r--platform/javascript/export/export.h2
-rw-r--r--platform/javascript/javascript_eval.cpp2
-rw-r--r--platform/javascript/javascript_eval.h2
-rw-r--r--platform/javascript/javascript_main.cpp2
-rw-r--r--platform/javascript/os_javascript.cpp2
-rw-r--r--platform/javascript/os_javascript.h2
-rw-r--r--platform/javascript/platform_config.h2
-rw-r--r--platform/javascript/power_javascript.cpp2
-rw-r--r--platform/javascript/power_javascript.h2
-rw-r--r--platform/osx/audio_driver_osx.cpp28
-rw-r--r--platform/osx/audio_driver_osx.h7
-rw-r--r--platform/osx/detect.py10
-rw-r--r--platform/osx/dir_access_osx.h2
-rw-r--r--platform/osx/dir_access_osx.mm2
-rw-r--r--platform/osx/export/export.cpp2
-rw-r--r--platform/osx/export/export.h2
-rw-r--r--platform/osx/godot_main_osx.mm2
-rw-r--r--platform/osx/joypad_osx.cpp2
-rw-r--r--platform/osx/joypad_osx.h4
-rw-r--r--platform/osx/os_osx.h4
-rw-r--r--platform/osx/os_osx.mm42
-rw-r--r--platform/osx/platform_config.h2
-rw-r--r--platform/osx/power_osx.cpp4
-rw-r--r--platform/osx/power_osx.h2
-rw-r--r--platform/osx/sem_osx.cpp2
-rw-r--r--platform/osx/sem_osx.h2
-rw-r--r--platform/server/godot_server.cpp2
-rw-r--r--platform/server/os_server.cpp2
-rw-r--r--platform/server/os_server.h2
-rw-r--r--platform/server/platform_config.h2
-rw-r--r--platform/uwp/app.cpp2
-rw-r--r--platform/uwp/app.h2
-rw-r--r--platform/uwp/detect.py4
-rw-r--r--platform/uwp/export/export.cpp42
-rw-r--r--platform/uwp/export/export.h2
-rw-r--r--platform/uwp/gl_context_egl.cpp2
-rw-r--r--platform/uwp/gl_context_egl.h2
-rw-r--r--platform/uwp/joypad_uwp.cpp8
-rw-r--r--platform/uwp/joypad_uwp.h2
-rw-r--r--platform/uwp/os_uwp.cpp2
-rw-r--r--platform/uwp/os_uwp.h2
-rw-r--r--platform/uwp/platform_config.h2
-rw-r--r--platform/uwp/power_uwp.cpp2
-rw-r--r--platform/uwp/power_uwp.h2
-rw-r--r--platform/uwp/thread_uwp.cpp2
-rw-r--r--platform/uwp/thread_uwp.h2
-rw-r--r--platform/windows/context_gl_win.cpp2
-rw-r--r--platform/windows/context_gl_win.h2
-rw-r--r--platform/windows/ctxgl_procaddr.cpp2
-rw-r--r--platform/windows/ctxgl_procaddr.h2
-rw-r--r--platform/windows/detect.py4
-rw-r--r--platform/windows/export/export.cpp2
-rw-r--r--platform/windows/export/export.h2
-rw-r--r--platform/windows/godot_win.cpp9
-rw-r--r--platform/windows/joypad.cpp4
-rw-r--r--platform/windows/joypad.h4
-rw-r--r--platform/windows/key_mapping_win.cpp2
-rw-r--r--platform/windows/key_mapping_win.h2
-rw-r--r--platform/windows/lang_table.h2
-rw-r--r--platform/windows/os_windows.cpp5
-rw-r--r--platform/windows/os_windows.h6
-rw-r--r--platform/windows/packet_peer_udp_winsock.cpp2
-rw-r--r--platform/windows/packet_peer_udp_winsock.h2
-rw-r--r--platform/windows/platform_config.h2
-rw-r--r--platform/windows/power_windows.cpp2
-rw-r--r--platform/windows/power_windows.h2
-rw-r--r--platform/windows/stream_peer_winsock.cpp2
-rw-r--r--platform/windows/stream_peer_winsock.h2
-rw-r--r--platform/windows/tcp_server_winsock.cpp2
-rw-r--r--platform/windows/tcp_server_winsock.h2
-rw-r--r--platform/x11/context_gl_x11.cpp2
-rw-r--r--platform/x11/context_gl_x11.h2
-rw-r--r--platform/x11/detect.py9
-rw-r--r--platform/x11/export/export.cpp22
-rw-r--r--platform/x11/export/export.h2
-rw-r--r--platform/x11/godot_x11.cpp6
-rw-r--r--platform/x11/joypad_linux.cpp2
-rw-r--r--platform/x11/joypad_linux.h2
-rw-r--r--platform/x11/key_mapping_x11.cpp2
-rw-r--r--platform/x11/key_mapping_x11.h2
-rw-r--r--platform/x11/os_x11.cpp34
-rw-r--r--platform/x11/os_x11.h2
-rw-r--r--platform/x11/platform_config.h2
-rw-r--r--platform/x11/power_x11.cpp15
-rw-r--r--platform/x11/power_x11.h2
-rw-r--r--scene/2d/animated_sprite.cpp2
-rw-r--r--scene/2d/animated_sprite.h2
-rw-r--r--scene/2d/area_2d.cpp18
-rw-r--r--scene/2d/area_2d.h2
-rw-r--r--scene/2d/audio_stream_player_2d.cpp12
-rw-r--r--scene/2d/back_buffer_copy.cpp2
-rw-r--r--scene/2d/back_buffer_copy.h2
-rw-r--r--scene/2d/camera_2d.cpp4
-rw-r--r--scene/2d/camera_2d.h2
-rw-r--r--scene/2d/canvas_item.cpp28
-rw-r--r--scene/2d/canvas_item.h6
-rw-r--r--scene/2d/canvas_modulate.cpp2
-rw-r--r--scene/2d/canvas_modulate.h2
-rw-r--r--scene/2d/collision_object_2d.cpp2
-rw-r--r--scene/2d/collision_object_2d.h2
-rw-r--r--scene/2d/collision_polygon_2d.cpp13
-rw-r--r--scene/2d/collision_polygon_2d.h2
-rw-r--r--scene/2d/collision_shape_2d.cpp6
-rw-r--r--scene/2d/collision_shape_2d.h2
-rw-r--r--scene/2d/joints_2d.cpp14
-rw-r--r--scene/2d/joints_2d.h2
-rw-r--r--scene/2d/light_2d.cpp6
-rw-r--r--scene/2d/light_2d.h3
-rw-r--r--scene/2d/light_occluder_2d.cpp2
-rw-r--r--scene/2d/light_occluder_2d.h2
-rw-r--r--scene/2d/line_2d.cpp2
-rw-r--r--scene/2d/line_2d.h2
-rw-r--r--scene/2d/line_builder.cpp4
-rw-r--r--scene/2d/line_builder.h2
-rw-r--r--scene/2d/navigation2d.cpp88
-rw-r--r--scene/2d/navigation2d.h6
-rw-r--r--scene/2d/navigation_polygon.cpp10
-rw-r--r--scene/2d/navigation_polygon.h2
-rw-r--r--scene/2d/node_2d.cpp4
-rw-r--r--scene/2d/node_2d.h2
-rw-r--r--scene/2d/parallax_background.cpp4
-rw-r--r--scene/2d/parallax_background.h2
-rw-r--r--scene/2d/parallax_layer.cpp23
-rw-r--r--scene/2d/parallax_layer.h2
-rw-r--r--scene/2d/particles_2d.cpp2
-rw-r--r--scene/2d/particles_2d.h2
-rw-r--r--scene/2d/path_2d.cpp13
-rw-r--r--scene/2d/path_2d.h2
-rw-r--r--scene/2d/path_texture.cpp2
-rw-r--r--scene/2d/path_texture.h2
-rw-r--r--scene/2d/physics_body_2d.cpp49
-rw-r--r--scene/2d/physics_body_2d.h2
-rw-r--r--scene/2d/polygon_2d.cpp2
-rw-r--r--scene/2d/polygon_2d.h2
-rw-r--r--scene/2d/position_2d.cpp2
-rw-r--r--scene/2d/position_2d.h2
-rw-r--r--scene/2d/ray_cast_2d.cpp18
-rw-r--r--scene/2d/ray_cast_2d.h2
-rw-r--r--scene/2d/remote_transform_2d.cpp10
-rw-r--r--scene/2d/remote_transform_2d.h2
-rw-r--r--scene/2d/screen_button.cpp6
-rw-r--r--scene/2d/screen_button.h2
-rw-r--r--scene/2d/sprite.cpp10
-rw-r--r--scene/2d/sprite.h2
-rw-r--r--scene/2d/tile_map.cpp42
-rw-r--r--scene/2d/tile_map.h9
-rw-r--r--scene/2d/visibility_notifier_2d.cpp18
-rw-r--r--scene/2d/visibility_notifier_2d.h2
-rw-r--r--scene/2d/y_sort.cpp2
-rw-r--r--scene/2d/y_sort.h2
-rw-r--r--scene/3d/area.cpp18
-rw-r--r--scene/3d/area.h2
-rw-r--r--scene/3d/arvr_nodes.cpp14
-rw-r--r--scene/3d/arvr_nodes.h2
-rw-r--r--scene/3d/audio_stream_player_3d.cpp15
-rw-r--r--scene/3d/bone_attachment.cpp14
-rw-r--r--scene/3d/bone_attachment.h2
-rw-r--r--scene/3d/camera.cpp17
-rw-r--r--scene/3d/camera.h2
-rw-r--r--scene/3d/character_camera.cpp718
-rw-r--r--scene/3d/character_camera.h167
-rw-r--r--scene/3d/collision_object.cpp3
-rw-r--r--scene/3d/collision_object.h2
-rw-r--r--scene/3d/collision_polygon.cpp6
-rw-r--r--scene/3d/collision_polygon.h2
-rw-r--r--scene/3d/collision_shape.cpp11
-rw-r--r--scene/3d/collision_shape.h4
-rw-r--r--scene/3d/gi_probe.cpp11
-rw-r--r--scene/3d/gi_probe.h2
-rw-r--r--scene/3d/immediate_geometry.cpp2
-rw-r--r--scene/3d/immediate_geometry.h4
-rw-r--r--scene/3d/interpolated_camera.cpp10
-rw-r--r--scene/3d/interpolated_camera.h2
-rw-r--r--scene/3d/light.cpp8
-rw-r--r--scene/3d/light.h5
-rw-r--r--scene/3d/listener.cpp2
-rw-r--r--scene/3d/listener.h2
-rw-r--r--scene/3d/mesh_instance.cpp12
-rw-r--r--scene/3d/mesh_instance.h2
-rw-r--r--scene/3d/multimesh_instance.cpp2
-rw-r--r--scene/3d/multimesh_instance.h2
-rw-r--r--scene/3d/navigation.cpp4
-rw-r--r--scene/3d/navigation.h2
-rw-r--r--scene/3d/navigation_mesh.cpp12
-rw-r--r--scene/3d/navigation_mesh.h2
-rw-r--r--scene/3d/particles.cpp2
-rw-r--r--scene/3d/particles.h2
-rw-r--r--scene/3d/path.cpp23
-rw-r--r--scene/3d/path.h2
-rw-r--r--scene/3d/physics_body.cpp21
-rw-r--r--scene/3d/physics_body.h2
-rw-r--r--scene/3d/physics_joint.cpp304
-rw-r--r--scene/3d/physics_joint.h71
-rw-r--r--scene/3d/portal.cpp5
-rw-r--r--scene/3d/portal.h6
-rw-r--r--scene/3d/position_3d.cpp2
-rw-r--r--scene/3d/position_3d.h2
-rw-r--r--scene/3d/proximity_group.cpp2
-rw-r--r--scene/3d/proximity_group.h2
-rw-r--r--scene/3d/ray_cast.cpp6
-rw-r--r--scene/3d/ray_cast.h2
-rw-r--r--scene/3d/reflection_probe.cpp2
-rw-r--r--scene/3d/reflection_probe.h2
-rw-r--r--scene/3d/remote_transform.cpp13
-rw-r--r--scene/3d/remote_transform.h2
-rw-r--r--scene/3d/room_instance.cpp9
-rw-r--r--scene/3d/room_instance.h7
-rw-r--r--scene/3d/scenario_fx.cpp2
-rw-r--r--scene/3d/scenario_fx.h2
-rw-r--r--scene/3d/skeleton.cpp8
-rw-r--r--scene/3d/skeleton.h2
-rw-r--r--scene/3d/spatial.cpp60
-rw-r--r--scene/3d/spatial.h3
-rw-r--r--scene/3d/spatial_indexer.cpp166
-rw-r--r--scene/3d/spatial_indexer.h84
-rw-r--r--scene/3d/sprite_3d.cpp282
-rw-r--r--scene/3d/sprite_3d.h33
-rw-r--r--scene/3d/vehicle_body.cpp14
-rw-r--r--scene/3d/vehicle_body.h2
-rw-r--r--scene/3d/visibility_notifier.cpp10
-rw-r--r--scene/3d/visibility_notifier.h2
-rw-r--r--scene/3d/visual_instance.cpp31
-rw-r--r--scene/3d/visual_instance.h5
-rw-r--r--scene/SCsub1
-rw-r--r--scene/animation/animation_cache.cpp6
-rw-r--r--scene/animation/animation_cache.h2
-rw-r--r--scene/animation/animation_player.cpp28
-rw-r--r--scene/animation/animation_player.h2
-rw-r--r--scene/animation/animation_tree_player.cpp12
-rw-r--r--scene/animation/animation_tree_player.h4
-rw-r--r--scene/animation/tween.cpp26
-rw-r--r--scene/animation/tween.h2
-rw-r--r--scene/animation/tween_interpolaters.cpp2
-rw-r--r--scene/audio/audio_player.cpp19
-rw-r--r--scene/audio/audio_player.h2
-rw-r--r--scene/gui/base_button.cpp3
-rw-r--r--scene/gui/base_button.h2
-rw-r--r--scene/gui/box_container.cpp10
-rw-r--r--scene/gui/box_container.h2
-rw-r--r--scene/gui/button.cpp2
-rw-r--r--scene/gui/button.h2
-rw-r--r--scene/gui/button_group.cpp4
-rw-r--r--scene/gui/button_group.h2
-rw-r--r--scene/gui/center_container.cpp6
-rw-r--r--scene/gui/center_container.h2
-rw-r--r--scene/gui/check_box.cpp2
-rw-r--r--scene/gui/check_box.h4
-rw-r--r--scene/gui/check_button.cpp2
-rw-r--r--scene/gui/check_button.h2
-rw-r--r--scene/gui/color_picker.cpp11
-rw-r--r--scene/gui/color_picker.h2
-rw-r--r--scene/gui/color_rect.cpp2
-rw-r--r--scene/gui/color_rect.h2
-rw-r--r--scene/gui/container.cpp8
-rw-r--r--scene/gui/container.h2
-rw-r--r--scene/gui/control.cpp82
-rw-r--r--scene/gui/control.h4
-rw-r--r--scene/gui/dialogs.cpp10
-rw-r--r--scene/gui/dialogs.h2
-rw-r--r--scene/gui/file_dialog.cpp2
-rw-r--r--scene/gui/file_dialog.h2
-rw-r--r--scene/gui/gradient_edit.cpp2
-rw-r--r--scene/gui/gradient_edit.h2
-rw-r--r--scene/gui/graph_edit.cpp166
-rw-r--r--scene/gui/graph_edit.h2
-rw-r--r--scene/gui/graph_node.cpp12
-rw-r--r--scene/gui/graph_node.h2
-rw-r--r--scene/gui/grid_container.cpp8
-rw-r--r--scene/gui/grid_container.h2
-rw-r--r--scene/gui/item_list.cpp6
-rw-r--r--scene/gui/item_list.h2
-rw-r--r--scene/gui/label.cpp28
-rw-r--r--scene/gui/label.h2
-rw-r--r--scene/gui/line_edit.cpp2
-rw-r--r--scene/gui/line_edit.h2
-rw-r--r--scene/gui/link_button.cpp2
-rw-r--r--scene/gui/link_button.h2
-rw-r--r--scene/gui/margin_container.cpp6
-rw-r--r--scene/gui/margin_container.h2
-rw-r--r--scene/gui/menu_button.cpp4
-rw-r--r--scene/gui/menu_button.h2
-rw-r--r--scene/gui/option_button.cpp2
-rw-r--r--scene/gui/option_button.h2
-rw-r--r--scene/gui/panel.cpp2
-rw-r--r--scene/gui/panel.h2
-rw-r--r--scene/gui/panel_container.cpp6
-rw-r--r--scene/gui/panel_container.h2
-rw-r--r--scene/gui/patch_9_rect.cpp12
-rw-r--r--scene/gui/patch_9_rect.h6
-rw-r--r--scene/gui/popup.cpp19
-rw-r--r--scene/gui/popup.h2
-rw-r--r--scene/gui/popup_menu.cpp12
-rw-r--r--scene/gui/popup_menu.h2
-rw-r--r--scene/gui/progress_bar.cpp2
-rw-r--r--scene/gui/progress_bar.h2
-rw-r--r--scene/gui/range.cpp4
-rw-r--r--scene/gui/range.h2
-rw-r--r--scene/gui/reference_rect.cpp2
-rw-r--r--scene/gui/reference_rect.h2
-rw-r--r--scene/gui/rich_text_label.cpp2
-rw-r--r--scene/gui/rich_text_label.h2
-rw-r--r--scene/gui/scroll_bar.cpp140
-rw-r--r--scene/gui/scroll_bar.h2
-rw-r--r--scene/gui/scroll_container.cpp8
-rw-r--r--scene/gui/scroll_container.h2
-rw-r--r--scene/gui/separator.cpp2
-rw-r--r--scene/gui/separator.h2
-rw-r--r--scene/gui/shortcut.cpp (renamed from scene/gui/input_action.cpp)62
-rw-r--r--scene/gui/shortcut.h (renamed from scene/gui/input_action.h)10
-rw-r--r--scene/gui/slider.cpp2
-rw-r--r--scene/gui/slider.h2
-rw-r--r--scene/gui/spin_box.cpp2
-rw-r--r--scene/gui/spin_box.h2
-rw-r--r--scene/gui/split_container.cpp4
-rw-r--r--scene/gui/split_container.h2
-rw-r--r--scene/gui/tab_container.cpp12
-rw-r--r--scene/gui/tab_container.h2
-rw-r--r--scene/gui/tabs.cpp2
-rw-r--r--scene/gui/tabs.h2
-rw-r--r--scene/gui/text_edit.cpp81
-rw-r--r--scene/gui/text_edit.h5
-rw-r--r--scene/gui/texture_button.cpp2
-rw-r--r--scene/gui/texture_button.h2
-rw-r--r--scene/gui/texture_progress.cpp2
-rw-r--r--scene/gui/texture_progress.h2
-rw-r--r--scene/gui/texture_rect.cpp2
-rw-r--r--scene/gui/texture_rect.h2
-rw-r--r--scene/gui/tool_button.cpp2
-rw-r--r--scene/gui/tool_button.h2
-rw-r--r--scene/gui/tree.cpp64
-rw-r--r--scene/gui/tree.h22
-rw-r--r--scene/gui/video_player.cpp47
-rw-r--r--scene/gui/video_player.h15
-rw-r--r--scene/gui/viewport_container.cpp10
-rw-r--r--scene/gui/viewport_container.h2
-rw-r--r--scene/io/SCsub7
-rw-r--r--scene/io/resource_format_image.cpp266
-rw-r--r--scene/io/resource_format_image.h55
-rw-r--r--scene/io/resource_format_wav.cpp277
-rw-r--r--scene/io/resource_format_wav.h46
-rw-r--r--scene/main/canvas_layer.cpp4
-rw-r--r--scene/main/canvas_layer.h2
-rw-r--r--scene/main/http_request.cpp2
-rw-r--r--scene/main/http_request.h2
-rw-r--r--scene/main/instance_placeholder.cpp2
-rw-r--r--scene/main/instance_placeholder.h2
-rwxr-xr-xscene/main/node.cpp129
-rw-r--r--scene/main/node.h4
-rw-r--r--scene/main/resource_preloader.cpp2
-rw-r--r--scene/main/resource_preloader.h2
-rw-r--r--scene/main/scene_tree.cpp50
-rw-r--r--scene/main/scene_tree.h7
-rwxr-xr-xscene/main/timer.cpp2
-rwxr-xr-xscene/main/timer.h2
-rw-r--r--scene/main/viewport.cpp207
-rw-r--r--scene/main/viewport.h17
-rw-r--r--scene/register_scene_types.cpp231
-rw-r--r--scene/register_scene_types.h2
-rw-r--r--scene/resources/animation.cpp52
-rw-r--r--scene/resources/animation.h2
-rw-r--r--scene/resources/audio_stream_resampled.cpp388
-rw-r--r--scene/resources/audio_stream_resampled.h166
-rw-r--r--scene/resources/audio_stream_sample.cpp2
-rw-r--r--scene/resources/audio_stream_sample.h2
-rw-r--r--scene/resources/bit_mask.cpp2
-rw-r--r--scene/resources/bit_mask.h2
-rw-r--r--scene/resources/bounds.cpp2
-rw-r--r--scene/resources/bounds.h2
-rw-r--r--scene/resources/box_shape.cpp2
-rw-r--r--scene/resources/box_shape.h2
-rw-r--r--scene/resources/canvas.cpp2
-rw-r--r--scene/resources/canvas.h2
-rw-r--r--scene/resources/capsule_shape.cpp2
-rw-r--r--scene/resources/capsule_shape.h2
-rw-r--r--scene/resources/capsule_shape_2d.cpp2
-rw-r--r--scene/resources/capsule_shape_2d.h2
-rw-r--r--scene/resources/circle_shape_2d.cpp2
-rw-r--r--scene/resources/circle_shape_2d.h2
-rw-r--r--scene/resources/color_ramp.cpp2
-rw-r--r--scene/resources/color_ramp.h9
-rw-r--r--scene/resources/concave_polygon_shape.cpp2
-rw-r--r--scene/resources/concave_polygon_shape.h2
-rw-r--r--scene/resources/concave_polygon_shape_2d.cpp2
-rw-r--r--scene/resources/concave_polygon_shape_2d.h2
-rw-r--r--scene/resources/convex_polygon_shape.cpp2
-rw-r--r--scene/resources/convex_polygon_shape.h2
-rw-r--r--scene/resources/convex_polygon_shape_2d.cpp2
-rw-r--r--scene/resources/convex_polygon_shape_2d.h2
-rw-r--r--scene/resources/curve.cpp341
-rw-r--r--scene/resources/curve.h52
-rw-r--r--scene/resources/default_theme/default_theme.cpp5
-rw-r--r--scene/resources/default_theme/default_theme.h4
-rw-r--r--scene/resources/dynamic_font.cpp2
-rw-r--r--scene/resources/dynamic_font.h2
-rw-r--r--scene/resources/dynamic_font_stb.cpp2
-rw-r--r--scene/resources/dynamic_font_stb.h2
-rw-r--r--scene/resources/environment.cpp10
-rw-r--r--scene/resources/environment.h2
-rw-r--r--scene/resources/font.cpp7
-rw-r--r--scene/resources/font.h2
-rw-r--r--scene/resources/gibberish_stream.cpp337
-rw-r--r--scene/resources/gibberish_stream.h118
-rw-r--r--scene/resources/material.cpp102
-rw-r--r--scene/resources/material.h21
-rw-r--r--scene/resources/mesh.cpp3
-rw-r--r--scene/resources/mesh.h2
-rw-r--r--scene/resources/mesh_data_tool.cpp2
-rw-r--r--scene/resources/mesh_data_tool.h2
-rw-r--r--scene/resources/mesh_library.cpp65
-rw-r--r--scene/resources/mesh_library.h16
-rw-r--r--scene/resources/multimesh.cpp2
-rw-r--r--scene/resources/multimesh.h2
-rw-r--r--scene/resources/packed_scene.cpp93
-rw-r--r--scene/resources/packed_scene.h2
-rw-r--r--scene/resources/plane_shape.cpp2
-rw-r--r--scene/resources/plane_shape.h2
-rw-r--r--scene/resources/polygon_path_finder.cpp2
-rw-r--r--scene/resources/polygon_path_finder.h2
-rw-r--r--scene/resources/primitive_meshes.cpp2
-rw-r--r--scene/resources/primitive_meshes.h2
-rw-r--r--scene/resources/ray_shape.cpp2
-rw-r--r--scene/resources/ray_shape.h2
-rw-r--r--scene/resources/rectangle_shape_2d.cpp2
-rw-r--r--scene/resources/rectangle_shape_2d.h2
-rw-r--r--scene/resources/room.cpp5
-rw-r--r--scene/resources/room.h6
-rw-r--r--scene/resources/scene_format_text.cpp11
-rw-r--r--scene/resources/scene_format_text.h4
-rw-r--r--scene/resources/segment_shape_2d.cpp2
-rw-r--r--scene/resources/segment_shape_2d.h2
-rw-r--r--scene/resources/shader.cpp2
-rw-r--r--scene/resources/shader.h2
-rw-r--r--scene/resources/shader_graph.cpp77
-rw-r--r--scene/resources/shader_graph.h3
-rw-r--r--scene/resources/shape.cpp4
-rw-r--r--scene/resources/shape.h2
-rw-r--r--scene/resources/shape_2d.cpp2
-rw-r--r--scene/resources/shape_2d.h2
-rw-r--r--scene/resources/shape_line_2d.cpp2
-rw-r--r--scene/resources/shape_line_2d.h2
-rw-r--r--scene/resources/sky_box.cpp2
-rw-r--r--scene/resources/sky_box.h2
-rw-r--r--scene/resources/space_2d.cpp2
-rw-r--r--scene/resources/space_2d.h2
-rw-r--r--scene/resources/sphere_shape.cpp2
-rw-r--r--scene/resources/sphere_shape.h2
-rw-r--r--scene/resources/style_box.cpp32
-rw-r--r--scene/resources/style_box.h14
-rw-r--r--scene/resources/surface_tool.cpp17
-rw-r--r--scene/resources/surface_tool.h4
-rw-r--r--scene/resources/texture.cpp6
-rw-r--r--scene/resources/texture.h2
-rw-r--r--scene/resources/theme.cpp11
-rw-r--r--scene/resources/theme.h2
-rw-r--r--scene/resources/tile_set.cpp2
-rw-r--r--scene/resources/tile_set.h2
-rw-r--r--scene/resources/video_stream.cpp2
-rw-r--r--scene/resources/video_stream.h3
-rw-r--r--scene/resources/world.cpp4
-rw-r--r--scene/resources/world.h2
-rw-r--r--scene/resources/world_2d.cpp2
-rw-r--r--scene/resources/world_2d.h2
-rw-r--r--scene/scene_string_names.cpp2
-rw-r--r--scene/scene_string_names.h2
-rw-r--r--servers/arvr/arvr_interface.cpp2
-rw-r--r--servers/arvr/arvr_interface.h2
-rw-r--r--servers/arvr/arvr_positional_tracker.cpp2
-rw-r--r--servers/arvr/arvr_positional_tracker.h2
-rw-r--r--servers/arvr_server.cpp2
-rw-r--r--servers/arvr_server.h2
-rw-r--r--servers/audio/audio_driver_dummy.cpp19
-rw-r--r--servers/audio/audio_driver_dummy.h5
-rw-r--r--servers/audio/audio_effect.cpp2
-rw-r--r--servers/audio/audio_effect.h2
-rw-r--r--servers/audio/audio_filter_sw.cpp2
-rw-r--r--servers/audio/audio_filter_sw.h2
-rw-r--r--servers/audio/audio_rb_resampler.cpp66
-rw-r--r--servers/audio/audio_rb_resampler.h2
-rw-r--r--servers/audio/audio_stream.cpp2
-rw-r--r--servers/audio/audio_stream.h2
-rw-r--r--servers/audio/effects/audio_effect_amplify.cpp2
-rw-r--r--servers/audio/effects/audio_effect_amplify.h2
-rw-r--r--servers/audio/effects/audio_effect_chorus.cpp4
-rw-r--r--servers/audio/effects/audio_effect_chorus.h2
-rw-r--r--servers/audio/effects/audio_effect_compressor.cpp2
-rw-r--r--servers/audio/effects/audio_effect_compressor.h2
-rw-r--r--servers/audio/effects/audio_effect_delay.cpp2
-rw-r--r--servers/audio/effects/audio_effect_delay.h2
-rw-r--r--servers/audio/effects/audio_effect_distortion.cpp2
-rw-r--r--servers/audio/effects/audio_effect_distortion.h2
-rw-r--r--servers/audio/effects/audio_effect_eq.cpp2
-rw-r--r--servers/audio/effects/audio_effect_eq.h2
-rw-r--r--servers/audio/effects/audio_effect_filter.cpp2
-rw-r--r--servers/audio/effects/audio_effect_filter.h2
-rw-r--r--servers/audio/effects/audio_effect_limiter.cpp2
-rw-r--r--servers/audio/effects/audio_effect_limiter.h2
-rw-r--r--servers/audio/effects/audio_effect_panner.cpp2
-rw-r--r--servers/audio/effects/audio_effect_panner.h2
-rw-r--r--servers/audio/effects/audio_effect_phaser.cpp2
-rw-r--r--servers/audio/effects/audio_effect_phaser.h2
-rw-r--r--servers/audio/effects/audio_effect_pitch_shift.cpp2
-rw-r--r--servers/audio/effects/audio_effect_pitch_shift.h2
-rw-r--r--servers/audio/effects/audio_effect_reverb.cpp2
-rw-r--r--servers/audio/effects/audio_effect_reverb.h2
-rw-r--r--servers/audio/effects/audio_effect_stereo_enhance.cpp2
-rw-r--r--servers/audio/effects/audio_effect_stereo_enhance.h2
-rw-r--r--servers/audio/effects/eq.cpp2
-rw-r--r--servers/audio/effects/eq.h2
-rw-r--r--servers/audio/effects/reverb.cpp2
-rw-r--r--servers/audio/effects/reverb.h2
-rw-r--r--servers/audio/reverb_sw.cpp2
-rw-r--r--servers/audio/reverb_sw.h2
-rw-r--r--servers/audio/voice_rb_sw.h2
-rw-r--r--servers/audio_server.cpp29
-rw-r--r--servers/audio_server.h5
-rw-r--r--servers/physics/area_pair_sw.cpp2
-rw-r--r--servers/physics/area_pair_sw.h2
-rw-r--r--servers/physics/area_sw.cpp2
-rw-r--r--servers/physics/area_sw.h2
-rw-r--r--servers/physics/body_pair_sw.cpp26
-rw-r--r--servers/physics/body_pair_sw.h2
-rw-r--r--servers/physics/body_sw.cpp2
-rw-r--r--servers/physics/body_sw.h2
-rw-r--r--servers/physics/broad_phase_basic.cpp11
-rw-r--r--servers/physics/broad_phase_basic.h2
-rw-r--r--servers/physics/broad_phase_octree.cpp2
-rw-r--r--servers/physics/broad_phase_octree.h2
-rw-r--r--servers/physics/broad_phase_sw.cpp2
-rw-r--r--servers/physics/broad_phase_sw.h2
-rw-r--r--servers/physics/collision_object_sw.cpp2
-rw-r--r--servers/physics/collision_object_sw.h2
-rw-r--r--servers/physics/collision_solver_sat.cpp2
-rw-r--r--servers/physics/collision_solver_sat.h2
-rw-r--r--servers/physics/collision_solver_sw.cpp4
-rw-r--r--servers/physics/collision_solver_sw.h2
-rw-r--r--servers/physics/constraint_sw.h2
-rw-r--r--servers/physics/gjk_epa.cpp8
-rw-r--r--servers/physics/gjk_epa.h2
-rw-r--r--servers/physics/joints/cone_twist_joint_sw.cpp2
-rw-r--r--servers/physics/joints/cone_twist_joint_sw.h2
-rw-r--r--servers/physics/joints/generic_6dof_joint_sw.cpp2
-rw-r--r--servers/physics/joints/generic_6dof_joint_sw.h2
-rw-r--r--servers/physics/joints/hinge_joint_sw.cpp2
-rw-r--r--servers/physics/joints/hinge_joint_sw.h2
-rw-r--r--servers/physics/joints/jacobian_entry_sw.h2
-rw-r--r--servers/physics/joints/pin_joint_sw.cpp2
-rw-r--r--servers/physics/joints/pin_joint_sw.h2
-rw-r--r--servers/physics/joints/slider_joint_sw.cpp2
-rw-r--r--servers/physics/joints/slider_joint_sw.h2
-rw-r--r--servers/physics/joints_sw.h2
-rw-r--r--servers/physics/physics_server_sw.cpp114
-rw-r--r--servers/physics/physics_server_sw.h14
-rw-r--r--servers/physics/shape_sw.cpp129
-rw-r--r--servers/physics/shape_sw.h2
-rw-r--r--servers/physics/space_sw.cpp27
-rw-r--r--servers/physics/space_sw.h2
-rw-r--r--servers/physics/step_sw.cpp2
-rw-r--r--servers/physics/step_sw.h2
-rw-r--r--servers/physics_2d/area_2d_sw.cpp2
-rw-r--r--servers/physics_2d/area_2d_sw.h2
-rw-r--r--servers/physics_2d/area_pair_2d_sw.cpp2
-rw-r--r--servers/physics_2d/area_pair_2d_sw.h2
-rw-r--r--servers/physics_2d/body_2d_sw.cpp2
-rw-r--r--servers/physics_2d/body_2d_sw.h2
-rw-r--r--servers/physics_2d/body_pair_2d_sw.cpp2
-rw-r--r--servers/physics_2d/body_pair_2d_sw.h2
-rw-r--r--servers/physics_2d/broad_phase_2d_basic.cpp2
-rw-r--r--servers/physics_2d/broad_phase_2d_basic.h2
-rw-r--r--servers/physics_2d/broad_phase_2d_hash_grid.cpp6
-rw-r--r--servers/physics_2d/broad_phase_2d_hash_grid.h2
-rw-r--r--servers/physics_2d/broad_phase_2d_sw.cpp2
-rw-r--r--servers/physics_2d/broad_phase_2d_sw.h2
-rw-r--r--servers/physics_2d/collision_object_2d_sw.cpp2
-rw-r--r--servers/physics_2d/collision_object_2d_sw.h2
-rw-r--r--servers/physics_2d/collision_solver_2d_sat.cpp187
-rw-r--r--servers/physics_2d/collision_solver_2d_sat.h2
-rw-r--r--servers/physics_2d/collision_solver_2d_sw.cpp2
-rw-r--r--servers/physics_2d/collision_solver_2d_sw.h2
-rw-r--r--servers/physics_2d/constraint_2d_sw.h2
-rw-r--r--servers/physics_2d/joints_2d_sw.cpp120
-rw-r--r--servers/physics_2d/joints_2d_sw.h43
-rw-r--r--servers/physics_2d/physics_2d_server_sw.cpp5
-rw-r--r--servers/physics_2d/physics_2d_server_sw.h3
-rw-r--r--servers/physics_2d/physics_2d_server_wrap_mt.cpp2
-rw-r--r--servers/physics_2d/physics_2d_server_wrap_mt.h2
-rw-r--r--servers/physics_2d/shape_2d_sw.cpp3
-rw-r--r--servers/physics_2d/shape_2d_sw.h2
-rw-r--r--servers/physics_2d/space_2d_sw.cpp78
-rw-r--r--servers/physics_2d/space_2d_sw.h2
-rw-r--r--servers/physics_2d/step_2d_sw.cpp2
-rw-r--r--servers/physics_2d/step_2d_sw.h2
-rw-r--r--servers/physics_2d_server.cpp2
-rw-r--r--servers/physics_2d_server.h2
-rw-r--r--servers/physics_server.cpp4
-rw-r--r--servers/physics_server.h37
-rw-r--r--servers/register_server_types.cpp2
-rw-r--r--servers/register_server_types.h2
-rw-r--r--servers/server_wrap_mt_common.h2
-rw-r--r--servers/visual/rasterizer.cpp614
-rw-r--r--servers/visual/rasterizer.h1049
-rw-r--r--servers/visual/shader_language.cpp49
-rw-r--r--servers/visual/shader_language.h19
-rw-r--r--servers/visual/shader_types.cpp260
-rw-r--r--servers/visual/shader_types.h6
-rw-r--r--servers/visual/visual_server_canvas.cpp30
-rw-r--r--servers/visual/visual_server_canvas.h2
-rw-r--r--servers/visual/visual_server_global.cpp2
-rw-r--r--servers/visual/visual_server_global.h2
-rw-r--r--servers/visual/visual_server_light_baker.cpp2
-rw-r--r--servers/visual/visual_server_light_baker.h2
-rw-r--r--servers/visual/visual_server_raster.cpp7743
-rw-r--r--servers/visual/visual_server_raster.h22
-rw-r--r--servers/visual/visual_server_scene.cpp662
-rw-r--r--servers/visual/visual_server_scene.h46
-rw-r--r--servers/visual/visual_server_viewport.cpp33
-rw-r--r--servers/visual/visual_server_viewport.h2
-rw-r--r--servers/visual/visual_server_wrap_mt.cpp2
-rw-r--r--servers/visual/visual_server_wrap_mt.h21
-rw-r--r--servers/visual_server.cpp42
-rw-r--r--servers/visual_server.h33
-rw-r--r--thirdparty/README.md83
-rw-r--r--thirdparty/enet/enet/godot.h2
-rw-r--r--thirdparty/enet/godot.cpp2
-rw-r--r--thirdparty/fonts/DroidSans.ttfbin190044 -> 0 bytes
-rw-r--r--thirdparty/fonts/DroidSansArabic.ttfbin35908 -> 0 bytes
-rw-r--r--thirdparty/fonts/DroidSansHebrew.ttfbin23076 -> 0 bytes
-rw-r--r--thirdparty/fonts/LICENSE.Noto.txt92
-rw-r--r--thirdparty/fonts/NotoNaskhArabicUI_Regular.ttfbin0 -> 256116 bytes
-rw-r--r--thirdparty/fonts/NotoSansHebrew_Regular.ttfbin0 -> 27124 bytes
-rw-r--r--thirdparty/fonts/NotoSansThaiUI_Regular.ttf (renamed from thirdparty/fonts/DroidSansThai.ttf)bin36028 -> 34852 bytes
-rw-r--r--thirdparty/fonts/NotoSansUI_Regular.ttfbin0 -> 305888 bytes
-rw-r--r--thirdparty/fonts/source_code_pro.otfbin140088 -> 145556 bytes
-rw-r--r--thirdparty/libpng/arm/filter_neon.S2
-rw-r--r--thirdparty/libpng/png.c22
-rw-r--r--thirdparty/libpng/png.h33
-rw-r--r--thirdparty/libpng/pngconf.h2
-rw-r--r--thirdparty/libpng/pngerror.c2
-rw-r--r--thirdparty/libpng/pngget.c15
-rw-r--r--thirdparty/libpng/pnginfo.h5
-rw-r--r--thirdparty/libpng/pnglibconf.h4
-rw-r--r--thirdparty/libpng/pngpread.c5
-rw-r--r--thirdparty/libpng/pngpriv.h14
-rw-r--r--thirdparty/libpng/pngread.c13
-rw-r--r--thirdparty/libpng/pngrtran.c2
-rw-r--r--thirdparty/libpng/pngrutil.c147
-rw-r--r--thirdparty/libpng/pngset.c23
-rw-r--r--thirdparty/libpng/pngstruct.h5
-rw-r--r--thirdparty/libpng/pngwrite.c13
-rw-r--r--thirdparty/libpng/pngwutil.c17
-rw-r--r--thirdparty/misc/stb_truetype.h1485
-rw-r--r--thirdparty/misc/stb_vorbis.c114
-rw-r--r--thirdparty/nanosvg/README.md2
-rw-r--r--thirdparty/nanosvg/nanosvg.cc (renamed from thirdparty/nanosvg/src/nanosvg.cc)0
-rw-r--r--thirdparty/nanosvg/nanosvg.h (renamed from thirdparty/nanosvg/src/nanosvg.h)0
-rw-r--r--thirdparty/nanosvg/nanosvgrast.h (renamed from thirdparty/nanosvg/src/nanosvgrast.h)0
-rw-r--r--thirdparty/pcre2/AUTHORS36
-rw-r--r--thirdparty/pcre2/LICENCE83
-rw-r--r--thirdparty/pcre2/src/config.h359
-rw-r--r--thirdparty/pcre2/src/pcre2.h771
-rw-r--r--thirdparty/pcre2/src/pcre2_auto_possess.c1293
-rw-r--r--thirdparty/pcre2/src/pcre2_chartables.c198
-rw-r--r--thirdparty/pcre2/src/pcre2_compile.c9517
-rw-r--r--thirdparty/pcre2/src/pcre2_config.c218
-rw-r--r--thirdparty/pcre2/src/pcre2_context.c391
-rw-r--r--thirdparty/pcre2/src/pcre2_dfa_match.c3628
-rw-r--r--thirdparty/pcre2/src/pcre2_error.c325
-rw-r--r--thirdparty/pcre2/src/pcre2_find_bracket.c218
-rw-r--r--thirdparty/pcre2/src/pcre2_internal.h1940
-rw-r--r--thirdparty/pcre2/src/pcre2_intmodedep.h862
-rw-r--r--thirdparty/pcre2/src/pcre2_jit_compile.c11501
-rw-r--r--thirdparty/pcre2/src/pcre2_jit_match.c189
-rw-r--r--thirdparty/pcre2/src/pcre2_jit_misc.c227
-rw-r--r--thirdparty/pcre2/src/pcre2_jit_test.c1735
-rw-r--r--thirdparty/pcre2/src/pcre2_maketables.c157
-rw-r--r--thirdparty/pcre2/src/pcre2_match.c7238
-rw-r--r--thirdparty/pcre2/src/pcre2_match_data.c147
-rw-r--r--thirdparty/pcre2/src/pcre2_newline.c243
-rw-r--r--thirdparty/pcre2/src/pcre2_ord2utf.c120
-rw-r--r--thirdparty/pcre2/src/pcre2_pattern_info.c410
-rw-r--r--thirdparty/pcre2/src/pcre2_printint.c832
-rw-r--r--thirdparty/pcre2/src/pcre2_serialize.c265
-rw-r--r--thirdparty/pcre2/src/pcre2_string_utils.c201
-rw-r--r--thirdparty/pcre2/src/pcre2_study.c1625
-rw-r--r--thirdparty/pcre2/src/pcre2_substitute.c858
-rw-r--r--thirdparty/pcre2/src/pcre2_substring.c542
-rw-r--r--thirdparty/pcre2/src/pcre2_tables.c765
-rw-r--r--thirdparty/pcre2/src/pcre2_ucd.c3747
-rw-r--r--thirdparty/pcre2/src/pcre2_ucp.h268
-rw-r--r--thirdparty/pcre2/src/pcre2_valid_utf.c398
-rw-r--r--thirdparty/pcre2/src/pcre2_xclass.c271
-rw-r--r--thirdparty/pcre2/src/sljit/sljitConfig.h145
-rw-r--r--thirdparty/pcre2/src/sljit/sljitConfigInternal.h724
-rw-r--r--thirdparty/pcre2/src/sljit/sljitExecAllocator.c312
-rw-r--r--thirdparty/pcre2/src/sljit/sljitLir.c2067
-rw-r--r--thirdparty/pcre2/src/sljit/sljitLir.h1269
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeARM_32.c2583
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeARM_64.c2062
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeARM_T2_32.c2102
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeMIPS_32.c368
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeMIPS_64.c471
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeMIPS_common.c2147
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativePPC_32.c271
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativePPC_64.c423
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativePPC_common.c2393
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeSPARC_32.c166
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeSPARC_common.c1450
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeTILEGX-encoder.c10159
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeTILEGX_64.c2563
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeX86_32.c550
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeX86_64.c725
-rw-r--r--thirdparty/pcre2/src/sljit/sljitNativeX86_common.c3030
-rw-r--r--thirdparty/pcre2/src/sljit/sljitUtils.c337
-rw-r--r--thirdparty/zstd/PATENTS33
-rw-r--r--thirdparty/zstd/README.md153
-rw-r--r--thirdparty/zstd/common/bitstream.h81
-rw-r--r--thirdparty/zstd/common/compiler.h85
-rw-r--r--thirdparty/zstd/common/error_private.c18
-rw-r--r--thirdparty/zstd/common/error_private.h8
-rw-r--r--thirdparty/zstd/common/fse.h16
-rw-r--r--thirdparty/zstd/common/fse_decompress.c25
-rw-r--r--thirdparty/zstd/common/huf.h11
-rw-r--r--thirdparty/zstd/common/mem.h12
-rw-r--r--thirdparty/zstd/common/pool.c88
-rw-r--r--thirdparty/zstd/common/pool.h20
-rw-r--r--thirdparty/zstd/common/threading.h11
-rw-r--r--thirdparty/zstd/common/xxhash.c50
-rw-r--r--thirdparty/zstd/common/zstd_common.c8
-rw-r--r--thirdparty/zstd/common/zstd_errors.h62
-rw-r--r--thirdparty/zstd/common/zstd_internal.h107
-rw-r--r--thirdparty/zstd/compress/fse_compress.c26
-rw-r--r--thirdparty/zstd/compress/huf_compress.c7
-rw-r--r--thirdparty/zstd/compress/zstd_compress.c618
-rw-r--r--thirdparty/zstd/compress/zstd_opt.h234
-rw-r--r--thirdparty/zstd/compress/zstdmt_compress.c379
-rw-r--r--thirdparty/zstd/compress/zstdmt_compress.h19
-rw-r--r--thirdparty/zstd/decompress/huf_decompress.c32
-rw-r--r--thirdparty/zstd/decompress/zstd_decompress.c203
-rw-r--r--thirdparty/zstd/zstd.h30
2317 files changed, 151705 insertions, 93230 deletions
diff --git a/.gitignore b/.gitignore
index 497d8b50d2..0cccfa97a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,6 +34,9 @@ platform/android/java/assets
.deps/*
.dirstamp
+# Gprof output
+gmon.out
+
# Vim temp files
*.swo
*.swp
@@ -44,6 +47,10 @@ platform/android/java/assets
*.files
*.includes
+# Eclipse CDT files
+.cproject
+.settings/
+
# Misc
.DS_Store
diff --git a/AUTHORS.md b/AUTHORS.md
index 84b0754929..bf833d1435 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -47,11 +47,13 @@ name is available.
Geequlim
Gen (dbsGen)
George Marques (vnen)
+ Gilles Roudiere (groud)
Guilherme Felipe (guilhermefelipecgs)
Hein-Pieter van Braam (hpvb)
Hubert Jarosz (Marqin)
Hugo Locurcio (Calinou)
Ignacio Etcheverry (neikeq)
+ Indah Sylvia (ISylvox)
J08nY
Jakub Grzesik (kubecz3k)
Johan Manuel (29jm)
@@ -77,18 +79,21 @@ name is available.
Ramesh Ravone (RameshRavone)
Ray Koopa (RayKoopa)
Rémi Verschelde (akien-mga)
+ Ruslan Mustakov (endragor)
+ Saniko (sanikoyes)
SaracenOne
Theo Hallenius (TheoXD)
Thomas Herzog (karroffel)
Timo (toger5)
V. Vamsi Krishna (vkbsb)
Vinzenz Feenstra (vinzenz)
+ Wilson E. Alvarez (Rubonnek)
Zher Huei Lee (leezh)
ZuBsPaCe
박한얼 (volzhs)
+ bruvzg
est31
marynate
mrezai
romulox-x
- sanikoyes
yg2f (SuperUserNameMan)
diff --git a/COPYRIGHT.txt b/COPYRIGHT.txt
index b36f2b1134..13edd896ef 100644
--- a/COPYRIGHT.txt
+++ b/COPYRIGHT.txt
@@ -43,7 +43,7 @@ Source: https://github.com/godotengine/godot
Files: *
Comment: Godot Engine
Copyright: 2007-2017, Juan Linietsky, Ariel Manzur.
- 2014-2017, Godot Engine contributors (cf. AUTHORS.md)
+ 2014-2017, Godot Engine contributors.
License: Expat
Files: ./icon.png
@@ -51,7 +51,7 @@ Files: ./icon.png
./logo.png
./logo.svg
Comment: Godot Engine logo
-Copyright: Andrea Calabró
+Copyright: 2017, Andrea Calabró
License: CC-BY-3.0
Files: ./platform/android/android_native_app_glue.c
@@ -92,7 +92,7 @@ Files: ./platform/android/power_android.cpp
Comment: Simple DirectMedia Layer
Copyright: 1997-2017, Sam Lantinga
2007-2017, Juan Linietsky, Ariel Manzur.
- 2014-2017, Godot Engine contributors (cf. AUTHORS.md)
+ 2014-2017, Godot Engine contributors.
License: Expat and Zlib
Files: ./servers/physics/gjk_epa.cpp
@@ -108,7 +108,7 @@ Files: ./servers/physics/gjk_epa.cpp
Comment: Bullet Continuous Collision Detection and Physics Library
Copyright: 2003-2008, Erwin Coumans
2007-2017, Juan Linietsky, Ariel Manzur.
- 2014-2017, Godot Engine contributors (cf. AUTHORS.md)
+ 2014-2017, Godot Engine contributors.
License: Expat and Zlib
Files: ./servers/physics/joints/cone_twist_joint_sw.cpp
@@ -116,7 +116,7 @@ Files: ./servers/physics/joints/cone_twist_joint_sw.cpp
Comment: Bullet Continuous Collision Detection and Physics Library
Copyright: 2007, Starbreeze Studios
2007-2017, Juan Linietsky, Ariel Manzur.
- 2014-2017, Godot Engine contributors (cf. AUTHORS.md)
+ 2014-2017, Godot Engine contributors.
License: Expat and Zlib
Files: ./thirdparty/b2d_convexdecomp/
@@ -135,11 +135,21 @@ Comment: ENet
Copyright: 2002-2016, Lee Salzman
License: Expat
+Files: ./thirdparty/etc2comp/
+Comment: Etc2Comp
+Copyright: 2015, Etc2Comp Authors
+License: Apache-2.0
+
Files: ./thirdparty/fonts/DroidSans*.ttf
Comment: DroidSans font
Copyright: 2008, The Android Open Source Project
License: Apache-2.0
+Files: ./thirdparty/fonts/NotoSans*.ttf
+Comment: Noto Sans font
+Copyright: 2012, Google Inc.
+License: OFL-1.1
+
Files: ./thirdparty/fonts/source_code_pro.otf
Comment: Source Code Pro font
Copyright: 2010, 2012, Adobe Systems Incorporated
@@ -147,7 +157,7 @@ License: OFL-1.1
Files: ./thirdparty/freetype/
Comment: The FreeType Project
-Copyright: 1996-2016, David Turner, Robert Wilhelm, and Werner Lemberg.
+Copyright: 1996-2017, David Turner, Robert Wilhelm, and Werner Lemberg.
License: FTL
Files: ./thirdparty/glad/
@@ -268,7 +278,7 @@ License: BSD-3-clause
Files: ./thirdparty/misc/stb_truetype.h
./thirdparty/misc/stb_vorbis.c
Comment: stb libraries
-Copyright: 2007-2015, Sean Barrett
+Copyright: 2007-2017, Sean Barrett
License: public-domain
Files: ./thirdparty/misc/triangulator.cpp
@@ -295,6 +305,11 @@ Copyright: 2001-2011, Xiph.Org, Skype Limited, Octasic,
Erik de Castro Lopo
License: BSD-3-clause
+Files: ./thirdparty/nanosvg/
+Comment: NanoSVG
+Copyright: 2013-2014, Mikko Mononen
+License: Zlib
+
Files: ./thirdparty/pvrtccompressor/
Comment: PvrTcCompressor
Copyright: 2014, Jeffrey Lim.
@@ -321,6 +336,11 @@ Comment: zlib
Copyright: 1995-2017, Jean-loup Gailly and Mark Adler
License: Zlib
+Files: ./thirdparty/zstd/
+Comment: Zstandard
+Copyright: 2016-2017, Facebook, Inc.
+License: BSD-3-Clause
+
License: Apache-2.0
@@ -372,9 +392,9 @@ License: BSD-3-clause
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
.
- 3. Neither the name of the University nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
+ 3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
diff --git a/SConstruct b/SConstruct
index 45765976cd..9a3ee03ed5 100644
--- a/SConstruct
+++ b/SConstruct
@@ -167,6 +167,7 @@ opts.Add('builtin_libvpx', "Use the builtin libvpx library (yes/no)", 'yes')
opts.Add('builtin_libwebp', "Use the builtin libwebp library (yes/no)", 'yes')
opts.Add('builtin_openssl', "Use the builtin openssl library (yes/no)", 'yes')
opts.Add('builtin_opus', "Use the builtin opus library (yes/no)", 'yes')
+opts.Add('builtin_pcre2', "Use the builtin pcre2 library (yes/no)", 'yes')
opts.Add('builtin_squish', "Use the builtin squish library (yes/no)", 'yes')
opts.Add('builtin_zlib', "Use the builtin zlib library (yes/no)", 'yes')
@@ -265,17 +266,17 @@ if selected_platform in platform_list:
CCFLAGS = env.get('CCFLAGS', '')
env['CCFLAGS'] = ''
- env.Append(CCFLAGS=string.split(str(CCFLAGS)))
+ env.Append(CCFLAGS=str(CCFLAGS).split())
CFLAGS = env.get('CFLAGS', '')
env['CFLAGS'] = ''
- env.Append(CFLAGS=string.split(str(CFLAGS)))
+ env.Append(CFLAGS=str(CFLAGS).split())
LINKFLAGS = env.get('LINKFLAGS', '')
env['LINKFLAGS'] = ''
- env.Append(LINKFLAGS=string.split(str(LINKFLAGS)))
+ env.Append(LINKFLAGS=str(LINKFLAGS).split())
flag_list = platform_flags[selected_platform]
for f in flag_list:
@@ -409,44 +410,7 @@ if selected_platform in platform_list:
# Microsoft Visual Studio Project Generation
if (env['vsproj']) == "yes":
-
- AddToVSProject(env.core_sources)
- AddToVSProject(env.main_sources)
- AddToVSProject(env.modules_sources)
- AddToVSProject(env.scene_sources)
- AddToVSProject(env.servers_sources)
- AddToVSProject(env.editor_sources)
-
- # this env flag won't work, it needs to be set in env_base=Environment(MSVC_VERSION='9.0')
- # Even then, SCons still seems to ignore it and builds with the latest MSVC...
- # That said, it's not needed to be set so far but I'm leaving it here so that this comment
- # has a purpose.
- # env['MSVS_VERSION']='9.0'
-
- # Calls a CMD with /C(lose) and /V(delayed environment variable expansion) options.
- # And runs vcvarsall bat for the proper architecture and scons for proper configuration
- env['MSVSBUILDCOM'] = 'cmd /V /C set "plat=$(PlatformTarget)" ^& (if "$(PlatformTarget)"=="x64" (set "plat=x86_amd64")) ^& set "tools=yes" ^& (if "$(Configuration)"=="release" (set "tools=no")) ^& call "$(VCInstallDir)vcvarsall.bat" !plat! ^& scons platform=windows target=$(Configuration) tools=!tools! -j2'
- env['MSVSREBUILDCOM'] = 'cmd /V /C set "plat=$(PlatformTarget)" ^& (if "$(PlatformTarget)"=="x64" (set "plat=x86_amd64")) ^& set "tools=yes" ^& (if "$(Configuration)"=="release" (set "tools=no")) & call "$(VCInstallDir)vcvarsall.bat" !plat! ^& scons platform=windows target=$(Configuration) tools=!tools! vsproj=yes -j2'
- env['MSVSCLEANCOM'] = 'cmd /V /C set "plat=$(PlatformTarget)" ^& (if "$(PlatformTarget)"=="x64" (set "plat=x86_amd64")) ^& set "tools=yes" ^& (if "$(Configuration)"=="release" (set "tools=no")) ^& call "$(VCInstallDir)vcvarsall.bat" !plat! ^& scons --clean platform=windows target=$(Configuration) tools=!tools! -j2'
-
- # 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
- # project. Do not modify without knowing what you are doing.
- debug_variants = ['debug|Win32'] + ['debug|x64']
- release_variants = ['release|Win32'] + ['release|x64']
- release_debug_variants = ['release_debug|Win32'] + ['release_debug|x64']
- variants = debug_variants + release_variants + release_debug_variants
- debug_targets = ['bin\\godot.windows.tools.32.exe'] + ['bin\\godot.windows.tools.64.exe']
- release_targets = ['bin\\godot.windows.opt.32.exe'] + ['bin\\godot.windows.opt.64.exe']
- release_debug_targets = ['bin\\godot.windows.opt.tools.32.exe'] + ['bin\\godot.windows.opt.tools.64.exe']
- targets = debug_targets + release_targets + release_debug_targets
- msvproj = env.MSVSProject(target=['#godot' + env['MSVSPROJECTSUFFIX']],
- incs=env.vs_incs,
- srcs=env.vs_srcs,
- runfile=targets,
- buildtarget=targets,
- auto_build_solution=1,
- variant=variants)
+ methods.generate_vs_project(env, GetOption("num_jobs"))
else:
diff --git a/compat.py b/compat.py
new file mode 100644
index 0000000000..7338c479fb
--- /dev/null
+++ b/compat.py
@@ -0,0 +1,31 @@
+import sys
+
+if sys.version_info < (3,):
+ def isbasestring(s):
+ return isinstance(s, basestring)
+ def open_utf8(filename, mode):
+ return open(filename, mode)
+ def byte_to_str(x):
+ return str(ord(x))
+ import cStringIO
+ def StringIO():
+ return cStringIO.StringIO()
+ def encode_utf8(x):
+ return x
+ def iteritems(d):
+ return d.iteritems()
+else:
+ def isbasestring(s):
+ return isinstance(s, (str, bytes))
+ def open_utf8(filename, mode):
+ return open(filename, mode, encoding="utf-8")
+ def byte_to_str(x):
+ return str(x)
+ import io
+ def StringIO():
+ return io.StringIO()
+ import codecs
+ def encode_utf8(x):
+ return codecs.utf_8_encode(x)[0]
+ def iteritems(d):
+ return iter(d.items())
diff --git a/core/SCsub b/core/SCsub
index 4c541d7269..c1e57f6840 100644
--- a/core/SCsub
+++ b/core/SCsub
@@ -18,7 +18,7 @@ gd_cpp = '#include "project_settings.h"\n'
gd_cpp += gd_inc
gd_cpp += "void ProjectSettings::register_global_defaults() {\n" + gd_call + "\n}\n"
-f = open("global_defaults.gen.cpp", "wb")
+f = open("global_defaults.gen.cpp", "w")
f.write(gd_cpp)
f.close()
@@ -47,7 +47,7 @@ if ("SCRIPT_AES256_ENCRYPTION_KEY" in os.environ):
txt = "0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0"
print("Invalid AES256 encryption key, not 64 bits hex: " + e)
-f = open("script_encryption_key.gen.cpp", "wb")
+f = open("script_encryption_key.gen.cpp", "w")
f.write("#include \"project_settings.h\"\nuint8_t script_encryption_key[32]={" + txt + "};\n")
f.close()
diff --git a/core/allocators.h b/core/allocators.h
index 3735a7746e..0b891b76a9 100644
--- a/core/allocators.h
+++ b/core/allocators.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/array.cpp b/core/array.cpp
index 21dab2ba90..c35bf5bf0c 100644
--- a/core/array.cpp
+++ b/core/array.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/array.h b/core/array.h
index 589d52886f..777116ab56 100644
--- a/core/array.h
+++ b/core/array.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 5f534f63a8..0f217c8235 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -568,7 +568,7 @@ Dictionary _OS::get_time(bool utc) const {
}
/**
- * Get a epoch time value from a dictionary of time values
+ * Get an epoch time value from a dictionary of time values
* @p datetime must be populated with the following keys:
* day, hour, minute, month, second, year. (dst is ignored).
*
@@ -1705,7 +1705,7 @@ Variant _File::get_var() const {
ERR_FAIL_COND_V(!f, Variant());
uint32_t len = get_32();
PoolVector<uint8_t> buff = get_buffer(len);
- ERR_FAIL_COND_V(buff.size() != len, Variant());
+ ERR_FAIL_COND_V((uint32_t)buff.size() != len, Variant());
PoolVector<uint8_t>::Read r = buff.read();
@@ -2354,7 +2354,7 @@ Variant _ClassDB::instance(const StringName &p_class) const {
if (!obj)
return Variant();
- Reference *r = obj->cast_to<Reference>();
+ Reference *r = Object::cast_to<Reference>(obj);
if (r) {
return REF(r);
} else {
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index fc280bd7ef..1a3782c471 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/class_db.cpp b/core/class_db.cpp
index 6cd7586a54..f5ddd9c761 100644
--- a/core/class_db.cpp
+++ b/core/class_db.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -46,11 +46,6 @@
#ifdef DEBUG_METHODS_ENABLED
-ParamDef::ParamDef(const Variant &p_variant)
- : used(true),
- val(p_variant) {
-}
-
MethodDefinition D_METHOD(const char *p_name) {
MethodDefinition md;
@@ -538,11 +533,14 @@ void ClassDB::get_method_list(StringName p_class, List<MethodInfo> *p_methods, b
minfo.arguments.push_back(method->get_argument_info(i));
}
- if (method->get_argument_type(-1) != Variant::NIL) {
- minfo.return_val = method->get_argument_info(-1);
+ minfo.return_val = method->get_return_info();
+ minfo.flags = method->get_hint_flags();
+
+ for (int i = 0; i < method->get_argument_count(); i++) {
+ if (method->has_default_argument(i))
+ minfo.default_arguments.push_back(method->get_default_argument(i));
}
- minfo.flags = method->get_hint_flags();
p_methods->push_back(minfo);
}
@@ -600,14 +598,22 @@ void ClassDB::bind_integer_constant(const StringName &p_class, const StringName
type->constant_map[p_name] = p_constant;
#ifdef DEBUG_METHODS_ENABLED
- List<StringName> *constants_list = type->enum_map.getptr(p_enum);
- if (constants_list) {
- constants_list->push_back(p_name);
- } else {
- List<StringName> new_list;
- new_list.push_back(p_name);
- type->enum_map[p_enum] = new_list;
+ String enum_name = p_enum;
+ if (enum_name != String()) {
+ if (enum_name.find(".") != -1) {
+ enum_name = enum_name.get_slicec('.', 1);
+ }
+
+ List<StringName> *constants_list = type->enum_map.getptr(enum_name);
+
+ if (constants_list) {
+ constants_list->push_back(p_name);
+ } else {
+ List<StringName> new_list;
+ new_list.push_back(p_name);
+ type->enum_map[enum_name] = new_list;
+ }
}
type->constant_order.push_back(p_name);
@@ -680,7 +686,7 @@ StringName ClassDB::get_integer_constant_enum(const StringName &p_class, const S
List<StringName> &constants_list = type->enum_map.get(*k);
const List<StringName>::Element *found = constants_list.find(p_name);
if (found)
- return found->get();
+ return *k;
}
if (p_no_inheritance)
@@ -858,7 +864,7 @@ void ClassDB::add_property(StringName p_class, const PropertyInfo &p_pinfo, cons
MethodBind *mb_get = NULL;
if (p_getter) {
- MethodBind *mb_get = get_method(p_class, p_getter);
+ mb_get = get_method(p_class, p_getter);
#ifdef DEBUG_METHODS_ENABLED
if (!mb_get) {
diff --git a/core/class_db.h b/core/class_db.h
index 8d9192adcc..f6b97748b0 100644
--- a/core/class_db.h
+++ b/core/class_db.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -38,29 +38,6 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
-struct ParamHint {
-
- String name;
- PropertyHint hint;
- String hint_text;
- Variant default_val;
-
- ParamHint(const String &p_name = "", PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_text = "", const Variant &p_default_val = Variant())
- : name(p_name),
- hint(p_hint),
- hint_text(p_hint_text),
- default_val(p_default_val) {
- }
-};
-
-struct ParamDef {
- bool used;
- Variant val;
- _FORCE_INLINE_ ParamDef() { used = false; }
- ParamDef(const Variant &p_variant);
-};
-
-//#define DEFVAL( m_defval ) ParamDef(m_defval)
#define DEFVAL(m_defval) (m_defval)
//#define SIMPLE_METHODDEF
@@ -181,27 +158,6 @@ public:
static void _add_class() {
_add_class2(T::get_class_static(), T::get_parent_class_static());
-#if 0
- GLOBAL_LOCK_FUNCTION;
-
- StringName name = T::get_class_static();
-
- ERR_FAIL_COND(types.has(name));
-
- types[name]=TypeInfo();
- TypeInfo &ti=types[name];
- ti.name=name;
- ti.inherits=T::get_parent_class_static();
-
- if (ti.inherits) {
-
- ERR_FAIL_COND( !types.has(ti.inherits) ); //it MUST be registered.
- ti.inherits_ptr = &types[ti.inherits];
-
- } else {
- ti.inherits_ptr=NULL;
- }
-#endif
}
template <class T>
@@ -252,102 +208,6 @@ public:
static uint64_t get_api_hash(APIType p_api);
-#if 0
- template<class N, class M>
- static MethodBind* bind_method(N p_method_name, M p_method,
- //default arguments
- ParamDef d1=ParamDef(),
- ParamDef d2=ParamDef(),
- ParamDef d3=ParamDef(),
- ParamDef d4=ParamDef(),
- ParamDef d5=ParamDef()
- ) {
-
- return bind_methodf(METHOD_FLAGS_DEFAULT,p_method_name, p_method, d1,d2,d3,d4,d5);
- }
-
-
-
- template<class N, class M>
- static MethodBind* bind_methodf(uint32_t p_flags, N p_method_name, M p_method,
-
-
- //default arguments
- const ParamDef &d1=ParamDef(),
- const ParamDef &d2=ParamDef(),
- const ParamDef &d3=ParamDef(),
- const ParamDef &d4=ParamDef(),
- const ParamDef &d5=ParamDef()
- ) {
-
- GLOBAL_LOCK_FUNCTION;
-
- MethodDefinition method_name=p_method_name;
-
- MethodBind *bind = create_method_bind(p_method);
- bind->set_name(method_name.name);
- ERR_FAIL_COND_V(!bind,NULL);
-
- String instance_type=bind->get_instance_type();
-
- TypeInfo *type=types.getptr(instance_type);
- if (!type) {
- memdelete(bind);
- ERR_FAIL_COND_V(!type,NULL);
- }
-
- if (type->method_map.has(method_name.name)) {
- memdelete(bind);
- // overloading not supported
- ERR_EXPLAIN("Method already bound: "+instance_type+"::"+method_name.name);
- ERR_FAIL_V(NULL);
- }
- bind->set_argument_names(method_name.args);
- type->method_map[method_name.name]=bind;
-
- Vector<Variant> defvals;
-
-#define PARSE_DEFVAL(m_defval) \
- if (d##m_defval.used) \
- defvals.insert(0, d##m_defval.val); \
- else \
- goto set_defvals;
-
-
- PARSE_DEFVAL(1);
- PARSE_DEFVAL(2);
- PARSE_DEFVAL(3);
- PARSE_DEFVAL(4);
- PARSE_DEFVAL(5);
- set_defvals:
-
- bind->set_default_arguments(defvals);
- bind->set_hint_flags(p_flags);
-
- return bind;
-#undef PARSE_DEFVAL
- }
-#else
-
-#if 0
- template<class N, class M>
- static MethodBind* bind_method(N p_method_name, M p_method,
- //default arguments
- const ParamDef &d1=ParamDef(),
- const ParamDef &d2=ParamDef(),
- const ParamDef &d3=ParamDef(),
- const ParamDef &d4=ParamDef(),
- const ParamDef &d5=ParamDef()
- ) {
-
- MethodDefinition method_name=p_method_name;
-
- MethodBind *bind = create_method_bind(p_method);
-
- return bind_methodfi(METHOD_FLAGS_DEFAULT,bind,method_name,d1,d2,d3,d4,d5); //use static function, much smaller binary usage
- }
-#endif
-
template <class N, class M>
static MethodBind *bind_method(N p_method_name, M p_method) {
@@ -410,26 +270,6 @@ public:
return bind_methodfi(METHOD_FLAGS_DEFAULT, bind, p_method_name, ptr, 6);
}
-#if 0
- template<class N, class M>
- static MethodBind* bind_methodf(uint32_t p_flags, N p_method_name, M p_method,
-
- const ParamDef& d1=ParamDef(),
- const ParamDef& d2=ParamDef(),
- const ParamDef& d3=ParamDef(),
- const ParamDef& d4=ParamDef(),
- const ParamDef& d5=ParamDef()
- ) {
-
- MethodDefinition method_name=p_method_name;
-
- MethodBind *bind = create_method_bind(p_method);
-
- return bind_methodfi(p_flags,bind,method_name,d1,d2,d3,d4,d5); //use static function, much smaller binary usage
- }
-#endif
-
-#endif
template <class M>
static MethodBind *bind_vararg_method(uint32_t p_flags, StringName p_name, M p_method, const MethodInfo &p_info = MethodInfo(), const Vector<Variant> &p_default_args = Vector<Variant>()) {
@@ -457,7 +297,8 @@ public:
}
type->method_map[p_name] = bind;
#ifdef DEBUG_METHODS_ENABLED
- bind->set_return_type("Variant");
+ // FIXME: <reduz> set_return_type is no longer in MethodBind, so I guess it should be moved to vararg method bind
+ //bind->set_return_type("Variant");
type->method_order.push_back(p_name);
#endif
diff --git a/core/color.cpp b/core/color.cpp
index 22a5504431..ab264d31d4 100644
--- a/core/color.cpp
+++ b/core/color.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -47,6 +47,18 @@ uint32_t Color::to_ARGB32() const {
return c;
}
+uint32_t Color::to_ABGR32() const {
+ uint32_t c = (uint8_t)(a * 255);
+ c <<= 8;
+ c |= (uint8_t)(b * 255);
+ c <<= 8;
+ c |= (uint8_t)(g * 255);
+ c <<= 8;
+ c |= (uint8_t)(r * 255);
+
+ return c;
+}
+
uint32_t Color::to_32() const {
uint32_t c = (uint8_t)(a * 255);
diff --git a/core/color.h b/core/color.h
index 9074a0e6d6..cd5510cf01 100644
--- a/core/color.h
+++ b/core/color.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -53,6 +53,7 @@ struct Color {
uint32_t to_32() const;
uint32_t to_ARGB32() const;
+ uint32_t to_ABGR32() const;
float gray() const;
float get_h() const;
float get_s() const;
@@ -148,8 +149,7 @@ struct Color {
b < 0.0031308 ? 12.92 * b : (1.0 + 0.055) * Math::pow(b, 1.0f / 2.4f) - 0.055, a);
}
- static Color
- hex(uint32_t p_hex);
+ static Color hex(uint32_t p_hex);
static Color html(const String &p_color);
static bool html_is_valid(const String &p_color);
static Color named(const String &p_name);
diff --git a/core/command_queue_mt.cpp b/core/command_queue_mt.cpp
index c9edd1d47b..8e2aa24c22 100644
--- a/core/command_queue_mt.cpp
+++ b/core/command_queue_mt.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/command_queue_mt.h b/core/command_queue_mt.h
index c3e44f731f..f99e16da15 100644
--- a/core/command_queue_mt.h
+++ b/core/command_queue_mt.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/compressed_translation.cpp b/core/compressed_translation.cpp
index 172249c5d7..74565d2e32 100644
--- a/core/compressed_translation.cpp
+++ b/core/compressed_translation.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/compressed_translation.h b/core/compressed_translation.h
index c010491b3a..acccf95743 100644
--- a/core/compressed_translation.h
+++ b/core/compressed_translation.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/core_string_names.cpp b/core/core_string_names.cpp
index 2f5a684373..ef9346253f 100644
--- a/core/core_string_names.cpp
+++ b/core/core_string_names.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/core_string_names.h b/core/core_string_names.h
index 40f76aa9c0..2eb2b703ae 100644
--- a/core/core_string_names.h
+++ b/core/core_string_names.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/dictionary.cpp b/core/dictionary.cpp
index 1fe45aff94..bb2e892951 100644
--- a/core/dictionary.cpp
+++ b/core/dictionary.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -200,17 +200,6 @@ uint32_t Dictionary::hash() const {
Array Dictionary::keys() const {
-#if 0
- Array karr;
- karr.resize(size());
- const Variant *K = NULL;
- int idx = 0;
- while ((K = next(K))) {
- karr[idx++] = (*K);
- }
- return karr;
-#else
-
Array varr;
varr.resize(size());
if (_p->variant_map.empty())
@@ -228,7 +217,6 @@ Array Dictionary::keys() const {
}
return varr;
-#endif
}
Array Dictionary::values() const {
diff --git a/core/dictionary.h b/core/dictionary.h
index 27caba916f..c8177d5648 100644
--- a/core/dictionary.h
+++ b/core/dictionary.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/dvector.cpp b/core/dvector.cpp
index 4bbe1aafd9..185cecd531 100644
--- a/core/dvector.cpp
+++ b/core/dvector.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/dvector.h b/core/dvector.h
index 66af42f7e2..1b81ceec5e 100644
--- a/core/dvector.h
+++ b/core/dvector.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/engine.cpp b/core/engine.cpp
index c8218e47ac..d73693dc12 100644
--- a/core/engine.cpp
+++ b/core/engine.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/engine.h b/core/engine.h
index c46ae1cb64..6f46ec8923 100644
--- a/core/engine.h
+++ b/core/engine.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/error_list.h b/core/error_list.h
index 14ef7bbc18..bc65ad0ee4 100644
--- a/core/error_list.h
+++ b/core/error_list.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/error_macros.cpp b/core/error_macros.cpp
index afbff6c52d..5919d38375 100644
--- a/core/error_macros.cpp
+++ b/core/error_macros.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/error_macros.h b/core/error_macros.h
index 6c803951a1..005b0e32a3 100644
--- a/core/error_macros.h
+++ b/core/error_macros.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/event_queue.cpp b/core/event_queue.cpp
index c5257d5f6b..12f9942a07 100644
--- a/core/event_queue.cpp
+++ b/core/event_queue.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/event_queue.h b/core/event_queue.h
index a6c436909d..af1a760945 100644
--- a/core/event_queue.h
+++ b/core/event_queue.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/func_ref.cpp b/core/func_ref.cpp
index 5622a03665..d9a8f6bcdb 100644
--- a/core/func_ref.cpp
+++ b/core/func_ref.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/func_ref.h b/core/func_ref.h
index e60d5bd771..b9b1988ede 100644
--- a/core/func_ref.h
+++ b/core/func_ref.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/global_constants.cpp b/core/global_constants.cpp
index cd9a302ba6..224ee0e0aa 100644
--- a/core/global_constants.cpp
+++ b/core/global_constants.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/global_constants.h b/core/global_constants.h
index ad639d0afa..350018e336 100644
--- a/core/global_constants.h
+++ b/core/global_constants.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/hash_map.h b/core/hash_map.h
index 2d7249e2fc..37391a4c83 100644
--- a/core/hash_map.h
+++ b/core/hash_map.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -102,17 +102,31 @@ public:
}
};
-private:
- struct Entry {
+ struct Element {
+ private:
+ friend class HashMap;
uint32_t hash;
- Entry *next;
+ Element *next;
+ Element() { next = 0; }
Pair pair;
- Entry() { next = 0; }
+ public:
+ const TKey &key() const {
+ return pair.key;
+ }
+
+ TData &value() {
+ return pair.data;
+ }
+
+ const TData &value() const {
+ return pair.value();
+ }
};
- Entry **hash_table;
+private:
+ Element **hash_table;
uint8_t hash_table_power;
uint32_t elements;
@@ -120,7 +134,7 @@ private:
ERR_FAIL_COND(hash_table);
- hash_table = memnew_arr(Entry *, (1 << MIN_HASH_TABLE_POWER));
+ hash_table = memnew_arr(Element *, (1 << MIN_HASH_TABLE_POWER));
hash_table_power = MIN_HASH_TABLE_POWER;
elements = 0;
@@ -168,7 +182,7 @@ private:
if (new_hash_table_power == -1)
return;
- Entry **new_hash_table = memnew_arr(Entry *, (1 << new_hash_table_power));
+ Element **new_hash_table = memnew_arr(Element *, (1 << new_hash_table_power));
if (!new_hash_table) {
ERR_PRINT("Out of Memory");
@@ -184,7 +198,7 @@ private:
while (hash_table[i]) {
- Entry *se = hash_table[i];
+ Element *se = hash_table[i];
hash_table[i] = se->next;
int new_pos = se->hash & ((1 << new_hash_table_power) - 1);
se->next = new_hash_table[new_pos];
@@ -199,12 +213,12 @@ private:
}
/* I want to have only one function.. */
- _FORCE_INLINE_ const Entry *get_entry(const TKey &p_key) const {
+ _FORCE_INLINE_ const Element *get_element(const TKey &p_key) const {
uint32_t hash = Hasher::hash(p_key);
uint32_t index = hash & ((1 << hash_table_power) - 1);
- Entry *e = hash_table[index];
+ Element *e = hash_table[index];
while (e) {
@@ -221,10 +235,10 @@ private:
return NULL;
}
- Entry *create_entry(const TKey &p_key) {
+ Element *create_element(const TKey &p_key) {
- /* if entry doesn't exist, create it */
- Entry *e = memnew(Entry);
+ /* if element doesn't exist, create it */
+ Element *e = memnew(Element);
ERR_FAIL_COND_V(!e, NULL); /* out of memory */
uint32_t hash = Hasher::hash(p_key);
uint32_t index = hash & ((1 << hash_table_power) - 1);
@@ -248,7 +262,7 @@ private:
if (!p_t.hash_table || p_t.hash_table_power == 0)
return; /* not copying from empty table */
- hash_table = memnew_arr(Entry *, 1 << p_t.hash_table_power);
+ hash_table = memnew_arr(Element *, 1 << p_t.hash_table_power);
hash_table_power = p_t.hash_table_power;
elements = p_t.elements;
@@ -256,11 +270,11 @@ private:
hash_table[i] = NULL;
- const Entry *e = p_t.hash_table[i];
+ const Element *e = p_t.hash_table[i];
while (e) {
- Entry *le = memnew(Entry); /* local entry */
+ Element *le = memnew(Element); /* local element */
*le = *e; /* copy data */
@@ -274,30 +288,30 @@ private:
}
public:
- void set(const TKey &p_key, const TData &p_data) {
-
- set(Pair(p_key, p_data));
+ Element *set(const TKey &p_key, const TData &p_data) {
+ return set(Pair(p_key, p_data));
}
- void set(const Pair &p_pair) {
+ Element *set(const Pair &p_pair) {
- Entry *e = NULL;
+ Element *e = NULL;
if (!hash_table)
make_hash_table(); // if no table, make one
else
- e = const_cast<Entry *>(get_entry(p_pair.key));
+ e = const_cast<Element *>(get_element(p_pair.key));
/* if we made it up to here, the pair doesn't exist, create and assign */
if (!e) {
- e = create_entry(p_pair.key);
+ e = create_element(p_pair.key);
if (!e)
- return;
+ return NULL;
check_hash_table(); // perform mantenience routine
}
e->pair.data = p_pair.data;
+ return e;
}
bool has(const TKey &p_key) const {
@@ -335,7 +349,7 @@ public:
if (!hash_table)
return NULL;
- Entry *e = const_cast<Entry *>(get_entry(p_key));
+ Element *e = const_cast<Element *>(get_element(p_key));
if (e)
return &e->pair.data;
@@ -348,7 +362,7 @@ public:
if (!hash_table)
return NULL;
- const Entry *e = const_cast<Entry *>(get_entry(p_key));
+ const Element *e = const_cast<Element *>(get_element(p_key));
if (e)
return &e->pair.data;
@@ -370,7 +384,7 @@ public:
uint32_t hash = p_custom_hash;
uint32_t index = hash & ((1 << hash_table_power) - 1);
- Entry *e = hash_table[index];
+ Element *e = hash_table[index];
while (e) {
@@ -396,7 +410,7 @@ public:
uint32_t hash = p_custom_hash;
uint32_t index = hash & ((1 << hash_table_power) - 1);
- const Entry *e = hash_table[index];
+ const Element *e = hash_table[index];
while (e) {
@@ -425,8 +439,8 @@ public:
uint32_t hash = Hasher::hash(p_key);
uint32_t index = hash & ((1 << hash_table_power) - 1);
- Entry *e = hash_table[index];
- Entry *p = NULL;
+ Element *e = hash_table[index];
+ Element *p = NULL;
while (e) {
/* checking hash first avoids comparing key, which may take longer */
@@ -463,16 +477,16 @@ public:
}
inline TData &operator[](const TKey &p_key) { //assignment
- Entry *e = NULL;
+ Element *e = NULL;
if (!hash_table)
make_hash_table(); // if no table, make one
else
- e = const_cast<Entry *>(get_entry(p_key));
+ e = const_cast<Element *>(get_element(p_key));
/* if we made it up to here, the pair doesn't exist, create */
if (!e) {
- e = create_entry(p_key);
+ e = create_element(p_key);
CRASH_COND(!e);
check_hash_table(); // perform mantenience routine
}
@@ -510,14 +524,14 @@ public:
} else { /* get the next key */
- const Entry *e = get_entry(*p_key);
+ const Element *e = get_element(*p_key);
ERR_FAIL_COND_V(!e, NULL); /* invalid key supplied */
if (e->next) {
/* if there is a "next" in the list, return that */
return &e->next->pair.key;
} else {
- /* go to next entries */
+ /* go to next elements */
uint32_t index = e->hash & ((1 << hash_table_power) - 1);
index++;
for (int i = index; i < (1 << hash_table_power); i++) {
@@ -552,7 +566,7 @@ public:
while (hash_table[i]) {
- Entry *e = hash_table[i];
+ Element *e = hash_table[i];
hash_table[i] = e->next;
memdelete(e);
}
@@ -582,7 +596,7 @@ public:
return;
for (int i = 0; i < (1 << hash_table_power); i++) {
- Entry *e = hash_table[i];
+ Element *e = hash_table[i];
while (e) {
*p_pairs = &e->pair;
p_pairs++;
@@ -596,7 +610,7 @@ public:
return;
for (int i = 0; i < (1 << hash_table_power); i++) {
- Entry *e = hash_table[i];
+ Element *e = hash_table[i];
while (e) {
p_keys->push_back(e->pair.key);
e = e->next;
diff --git a/core/hashfuncs.h b/core/hashfuncs.h
index 8392984565..56d40f1dd7 100644
--- a/core/hashfuncs.h
+++ b/core/hashfuncs.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/helper/math_fieldwise.cpp b/core/helper/math_fieldwise.cpp
index 5545c2d642..228611f8b3 100644
--- a/core/helper/math_fieldwise.cpp
+++ b/core/helper/math_fieldwise.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* fieldwise.cpp */
+/* math_fieldwise.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/helper/math_fieldwise.h b/core/helper/math_fieldwise.h
index 58489fd3bb..400df040a4 100644
--- a/core/helper/math_fieldwise.h
+++ b/core/helper/math_fieldwise.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* fieldwise.h */
+/* math_fieldwise.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/helper/value_evaluator.h b/core/helper/value_evaluator.h
index e32697ca95..bb234de989 100644
--- a/core/helper/value_evaluator.h
+++ b/core/helper/value_evaluator.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/image.cpp b/core/image.cpp
index 91572e44e4..4d1f32c360 100644
--- a/core/image.cpp
+++ b/core/image.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -343,6 +343,11 @@ int Image::get_height() const {
return height;
}
+Vector2 Image::get_size() const {
+
+ return Vector2(width, height);
+}
+
bool Image::has_mipmaps() const {
return mipmaps;
@@ -1251,9 +1256,9 @@ void Image::create(const char **p_xpm) {
if (*line_ptr == '#') {
line_ptr++;
- uint8_t col_r;
- uint8_t col_g;
- uint8_t col_b;
+ uint8_t col_r = 0;
+ uint8_t col_g = 0;
+ uint8_t col_b = 0;
//uint8_t col_a=255;
for (int i = 0; i < 6; i++) {
@@ -2215,6 +2220,7 @@ void Image::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_width"), &Image::get_width);
ClassDB::bind_method(D_METHOD("get_height"), &Image::get_height);
+ ClassDB::bind_method(D_METHOD("get_size"), &Image::get_size);
ClassDB::bind_method(D_METHOD("has_mipmaps"), &Image::has_mipmaps);
ClassDB::bind_method(D_METHOD("get_format"), &Image::get_format);
ClassDB::bind_method(D_METHOD("get_data"), &Image::get_data);
diff --git a/core/image.h b/core/image.h
index 7acc4744e9..27df65a898 100644
--- a/core/image.h
+++ b/core/image.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -177,6 +177,7 @@ private:
public:
int get_width() const; ///< Get image width
int get_height() const; ///< Get image height
+ Vector2 get_size() const;
bool has_mipmaps() const;
int get_mipmap_count() const;
diff --git a/core/input_map.cpp b/core/input_map.cpp
index 8435882325..82a2eaddae 100644
--- a/core/input_map.cpp
+++ b/core/input_map.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/input_map.h b/core/input_map.h
index ba93e61f5f..18e6b04d4e 100644
--- a/core/input_map.h
+++ b/core/input_map.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/int_types.h b/core/int_types.h
index 973e0c749d..e9bcc88ee8 100644
--- a/core/int_types.h
+++ b/core/int_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/compression.cpp b/core/io/compression.cpp
index 139383710c..44fa65e11d 100644
--- a/core/io/compression.cpp
+++ b/core/io/compression.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/compression.h b/core/io/compression.h
index 5eb7806d7b..22d8109d4f 100644
--- a/core/io/compression.h
+++ b/core/io/compression.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp
index edd090adf2..daa6b01d6e 100644
--- a/core/io/config_file.cpp
+++ b/core/io/config_file.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/config_file.h b/core/io/config_file.h
index 75a3a519a6..8ed8a069e4 100644
--- a/core/io/config_file.h
+++ b/core/io/config_file.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/file_access_buffered.cpp b/core/io/file_access_buffered.cpp
index 126ec7575e..859f2e3f8c 100644
--- a/core/io/file_access_buffered.cpp
+++ b/core/io/file_access_buffered.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/file_access_buffered.h b/core/io/file_access_buffered.h
index 0ad2d0e929..d3137058fb 100644
--- a/core/io/file_access_buffered.h
+++ b/core/io/file_access_buffered.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/file_access_buffered_fa.h b/core/io/file_access_buffered_fa.h
index 362589adf1..9e41834561 100644
--- a/core/io/file_access_buffered_fa.h
+++ b/core/io/file_access_buffered_fa.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/file_access_compressed.cpp b/core/io/file_access_compressed.cpp
index 959a5dc86f..70430ca5d3 100644
--- a/core/io/file_access_compressed.cpp
+++ b/core/io/file_access_compressed.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/file_access_compressed.h b/core/io/file_access_compressed.h
index 340c298a0f..ba84c9767c 100644
--- a/core/io/file_access_compressed.h
+++ b/core/io/file_access_compressed.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -37,11 +37,11 @@ class FileAccessCompressed : public FileAccess {
Compression::Mode cmode;
bool writing;
- int write_pos;
+ uint32_t write_pos;
uint8_t *write_ptr;
- int write_buffer_size;
- int write_max;
- int block_size;
+ uint32_t write_buffer_size;
+ uint32_t write_max;
+ uint32_t block_size;
mutable bool read_eof;
mutable bool at_end;
@@ -57,7 +57,7 @@ class FileAccessCompressed : public FileAccess {
mutable int read_block_size;
mutable int read_pos;
Vector<ReadBlock> read_blocks;
- int read_total;
+ uint32_t read_total;
String magic;
mutable Vector<uint8_t> buffer;
diff --git a/core/io/file_access_encrypted.cpp b/core/io/file_access_encrypted.cpp
index f2b33a01bb..12503f3be4 100644
--- a/core/io/file_access_encrypted.cpp
+++ b/core/io/file_access_encrypted.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -73,14 +73,14 @@ Error FileAccessEncrypted::open_and_parse(FileAccess *p_base, const Vector<uint8
length = p_base->get_64();
base = p_base->get_pos();
ERR_FAIL_COND_V(p_base->get_len() < base + length, ERR_FILE_CORRUPT);
- int ds = length;
+ uint32_t ds = length;
if (ds % 16) {
ds += 16 - (ds % 16);
}
data.resize(ds);
- int blen = p_base->get_buffer(data.ptr(), ds);
+ uint32_t blen = p_base->get_buffer(data.ptr(), ds);
ERR_FAIL_COND_V(blen != ds, ERR_FILE_CORRUPT);
aes256_context ctx;
diff --git a/core/io/file_access_encrypted.h b/core/io/file_access_encrypted.h
index 2bd3c52661..74d00a5a8f 100644
--- a/core/io/file_access_encrypted.h
+++ b/core/io/file_access_encrypted.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -48,7 +48,7 @@ private:
size_t base;
size_t length;
Vector<uint8_t> data;
- mutable size_t pos;
+ mutable int pos;
mutable bool eofed;
public:
diff --git a/core/io/file_access_memory.cpp b/core/io/file_access_memory.cpp
index 8e719568e5..5b186b7798 100644
--- a/core/io/file_access_memory.cpp
+++ b/core/io/file_access_memory.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/file_access_memory.h b/core/io/file_access_memory.h
index ea858c547e..7feb16461b 100644
--- a/core/io/file_access_memory.h
+++ b/core/io/file_access_memory.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/file_access_network.cpp b/core/io/file_access_network.cpp
index aa67479d7e..d8b8c8c200 100644
--- a/core/io/file_access_network.cpp
+++ b/core/io/file_access_network.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -244,14 +244,14 @@ FileAccessNetworkClient::~FileAccessNetworkClient() {
memdelete(sem);
}
-void FileAccessNetwork::_set_block(size_t p_offset, const Vector<uint8_t> &p_block) {
+void FileAccessNetwork::_set_block(int p_offset, const Vector<uint8_t> &p_block) {
int page = p_offset / page_size;
ERR_FAIL_INDEX(page, pages.size());
if (page < pages.size() - 1) {
ERR_FAIL_COND(p_block.size() != page_size);
} else {
- ERR_FAIL_COND((p_block.size() != (total_size % page_size)));
+ ERR_FAIL_COND((p_block.size() != (int)(total_size % page_size)));
}
buffer_mutex->lock();
diff --git a/core/io/file_access_network.h b/core/io/file_access_network.h
index 1e85756122..cd5046f007 100644
--- a/core/io/file_access_network.h
+++ b/core/io/file_access_network.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -97,7 +97,7 @@ class FileAccessNetwork : public FileAccess {
mutable int last_page;
mutable uint8_t *last_page_buff;
- uint32_t page_size;
+ int page_size;
int read_ahead;
int max_pages;
@@ -121,7 +121,7 @@ class FileAccessNetwork : public FileAccess {
friend class FileAccessNetworkClient;
void _queue_page(int p_page) const;
void _respond(size_t p_len, Error p_status);
- void _set_block(size_t p_offset, const Vector<uint8_t> &p_block);
+ void _set_block(int p_offset, const Vector<uint8_t> &p_block);
public:
enum Command {
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp
index c3bcfc840b..e36ff28220 100644
--- a/core/io/file_access_pack.cpp
+++ b/core/io/file_access_pack.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/file_access_pack.h b/core/io/file_access_pack.h
index 25473131d6..758e9afa8e 100644
--- a/core/io/file_access_pack.h
+++ b/core/io/file_access_pack.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp
index d748d5c773..8c99ef2983 100644
--- a/core/io/file_access_zip.cpp
+++ b/core/io/file_access_zip.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/file_access_zip.h b/core/io/file_access_zip.h
index c9cc2dac79..2a8ec3fca5 100644
--- a/core/io/file_access_zip.h
+++ b/core/io/file_access_zip.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp
index 1c35c6edeb..dd56db9bf9 100644
--- a/core/io/http_client.cpp
+++ b/core/io/http_client.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/http_client.h b/core/io/http_client.h
index cc5f1ed935..023370ae81 100644
--- a/core/io/http_client.h
+++ b/core/io/http_client.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/image_loader.cpp b/core/io/image_loader.cpp
index 7b5b4a13ea..637b95ccf8 100644
--- a/core/io/image_loader.cpp
+++ b/core/io/image_loader.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/image_loader.h b/core/io/image_loader.h
index f79d9789bf..17a89603fa 100644
--- a/core/io/image_loader.h
+++ b/core/io/image_loader.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/ip.cpp b/core/io/ip.cpp
index 0e2b5ed519..60a44b2128 100644
--- a/core/io/ip.cpp
+++ b/core/io/ip.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/ip.h b/core/io/ip.h
index 66a4a48da2..04c6811792 100644
--- a/core/io/ip.h
+++ b/core/io/ip.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/ip_address.cpp b/core/io/ip_address.cpp
index ea3041945c..da74f6c116 100644
--- a/core/io/ip_address.cpp
+++ b/core/io/ip_address.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/ip_address.h b/core/io/ip_address.h
index da16622a9b..205efd9a0e 100644
--- a/core/io/ip_address.h
+++ b/core/io/ip_address.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/json.cpp b/core/io/json.cpp
index d537061c5b..2e9170bc34 100644
--- a/core/io/json.cpp
+++ b/core/io/json.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/json.h b/core/io/json.h
index 75df15a077..893a88e264 100644
--- a/core/io/json.h
+++ b/core/io/json.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index e701a89c78..0834d6c321 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -333,14 +333,14 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
len -= 12;
buf += 12;
- int total = namecount + subnamecount;
+ uint32_t total = namecount + subnamecount;
if (flags & 2)
total++;
if (r_len)
(*r_len) += 12;
- for (int i = 0; i < total; i++) {
+ for (uint32_t i = 0; i < total; i++) {
ERR_FAIL_COND_V((int)len < 4, ERR_INVALID_DATA);
strlen = decode_uint32(buf);
@@ -463,8 +463,8 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
obj->set(str, value);
}
- if (obj->cast_to<Reference>()) {
- REF ref = REF(obj->cast_to<Reference>());
+ if (Object::cast_to<Reference>(obj)) {
+ REF ref = REF(Object::cast_to<Reference>(obj));
r_variant = ref;
} else {
r_variant = obj;
@@ -566,7 +566,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
if (count) {
data.resize(count);
PoolVector<uint8_t>::Write w = data.write();
- for (int i = 0; i < count; i++) {
+ for (uint32_t i = 0; i < count; i++) {
w[i] = buf[i];
}
@@ -597,7 +597,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
//const int*rbuf=(const int*)buf;
data.resize(count);
PoolVector<int>::Write w = data.write();
- for (int i = 0; i < count; i++) {
+ for (uint32_t i = 0; i < count; i++) {
w[i] = decode_uint32(&buf[i * 4]);
}
@@ -624,7 +624,7 @@ Error decode_variant(Variant &r_variant, const uint8_t *p_buffer, int p_len, int
//const float*rbuf=(const float*)buf;
data.resize(count);
PoolVector<float>::Write w = data.write();
- for (int i = 0; i < count; i++) {
+ for (uint32_t i = 0; i < count; i++) {
w[i] = decode_float(&buf[i * 4]);
}
diff --git a/core/io/marshalls.h b/core/io/marshalls.h
index 234ae3b183..5541e52a89 100644
--- a/core/io/marshalls.h
+++ b/core/io/marshalls.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/networked_multiplayer_peer.cpp b/core/io/networked_multiplayer_peer.cpp
index 402526a52c..dea6fab350 100644
--- a/core/io/networked_multiplayer_peer.cpp
+++ b/core/io/networked_multiplayer_peer.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/networked_multiplayer_peer.h b/core/io/networked_multiplayer_peer.h
index bd951912f9..efaea46b84 100644
--- a/core/io/networked_multiplayer_peer.h
+++ b/core/io/networked_multiplayer_peer.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp
index ca00b8b480..16c73c26e7 100644
--- a/core/io/packet_peer.cpp
+++ b/core/io/packet_peer.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/packet_peer.h b/core/io/packet_peer.h
index 597119f7f4..b08d44ad8a 100644
--- a/core/io/packet_peer.h
+++ b/core/io/packet_peer.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/packet_peer_udp.cpp b/core/io/packet_peer_udp.cpp
index d1729819a8..2773d2a5a3 100644
--- a/core/io/packet_peer_udp.cpp
+++ b/core/io/packet_peer_udp.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/packet_peer_udp.h b/core/io/packet_peer_udp.h
index 007b810b67..5a2b54774f 100644
--- a/core/io/packet_peer_udp.h
+++ b/core/io/packet_peer_udp.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/pck_packer.cpp b/core/io/pck_packer.cpp
index 28382ab419..f1f5b6f538 100644
--- a/core/io/pck_packer.cpp
+++ b/core/io/pck_packer.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/pck_packer.h b/core/io/pck_packer.h
index ddfa093a6b..c0a6acd859 100644
--- a/core/io/pck_packer.h
+++ b/core/io/pck_packer.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp
index fd8928b8a0..084d8ffcab 100644
--- a/core/io/resource_format_binary.cpp
+++ b/core/io/resource_format_binary.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,12 +28,14 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "resource_format_binary.h"
-#include "image.h"
-#include "io/file_access_compressed.h"
-#include "io/marshalls.h"
-#include "os/dir_access.h"
-#include "project_settings.h"
-#include "version.h"
+
+#include "core/image.h"
+#include "core/io/file_access_compressed.h"
+#include "core/io/marshalls.h"
+#include "core/os/dir_access.h"
+#include "core/project_settings.h"
+#include "core/version.h"
+
//#define print_bl(m_what) print_line(m_what)
#define print_bl(m_what)
@@ -100,7 +102,7 @@ StringName ResourceInteractiveLoaderBinary::_get_string() {
uint32_t id = f->get_32();
if (id & 0x80000000) {
- uint32_t len = id & 0x7FFFFFFF;
+ int len = id & 0x7FFFFFFF;
if (len > str_buf.size()) {
str_buf.resize(len);
}
@@ -334,9 +336,9 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
} break;
case OBJECT_EXTERNAL_RESOURCE_INDEX: {
//new file format, just refers to an index in the external list
- uint32_t erindex = f->get_32();
+ int erindex = f->get_32();
- if (erindex >= external_resources.size()) {
+ if (erindex < 0 || erindex >= external_resources.size()) {
WARN_PRINT("Broken external resource! (index out of size");
r_v = Variant();
} else {
@@ -713,7 +715,7 @@ Error ResourceInteractiveLoaderBinary::poll() {
}
ERR_FAIL_COND_V(!obj, ERR_FILE_CORRUPT);
- Resource *r = obj->cast_to<Resource>();
+ Resource *r = Object::cast_to<Resource>(obj);
if (!r) {
error = ERR_FILE_CORRUPT;
memdelete(obj); //bye
@@ -876,7 +878,7 @@ void ResourceInteractiveLoaderBinary::open(FileAccess *p_f) {
if (ver_format > FORMAT_VERSION || ver_major > VERSION_MAJOR) {
f->close();
- ERR_EXPLAIN("File Format '" + itos(FORMAT_VERSION) + "." + itos(ver_major) + "." + itos(ver_minor) + "' is too new! Please upgrade to a a new engine version: " + local_path);
+ ERR_EXPLAIN("File Format '" + itos(FORMAT_VERSION) + "." + itos(ver_major) + "." + itos(ver_minor) + "' is too new! Please upgrade to a new engine version: " + local_path);
ERR_FAIL();
}
@@ -1003,7 +1005,7 @@ ResourceInteractiveLoaderBinary::~ResourceInteractiveLoaderBinary() {
memdelete(f);
}
-Ref<ResourceInteractiveLoader> ResourceFormatLoaderBinary::load_interactive(const String &p_path, Error *r_error) {
+Ref<ResourceInteractiveLoader> ResourceFormatLoaderBinary::load_interactive(const String &p_path, const String &p_original_path, Error *r_error) {
if (r_error)
*r_error = ERR_FILE_CANT_OPEN;
@@ -1017,7 +1019,8 @@ Ref<ResourceInteractiveLoader> ResourceFormatLoaderBinary::load_interactive(cons
}
Ref<ResourceInteractiveLoaderBinary> ria = memnew(ResourceInteractiveLoaderBinary);
- ria->local_path = ProjectSettings::get_singleton()->localize_path(p_path);
+ String path = p_original_path != "" ? p_original_path : p_path;
+ ria->local_path = ProjectSettings::get_singleton()->localize_path(path);
ria->res_path = ria->local_path;
//ria->set_local_path( Globals::get_singleton()->localize_path(p_path) );
ria->open(f);
@@ -1114,6 +1117,9 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons
memdelete(f);
}
ERR_FAIL_COND_V(!fw, ERR_CANT_CREATE);
+
+ uint8_t magic[4] = { 'R', 'S', 'R', 'C' };
+ fw->store_buffer(magic, 4);
}
bool big_endian = f->get_32();
@@ -1175,7 +1181,7 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons
memdelete(f);
memdelete(fw);
- ERR_EXPLAIN("File Format '" + itos(FORMAT_VERSION) + "." + itos(ver_major) + "." + itos(ver_minor) + "' is too new! Please upgrade to a a new engine version: " + local_path);
+ ERR_EXPLAIN("File Format '" + itos(FORMAT_VERSION) + "." + itos(ver_major) + "." + itos(ver_minor) + "' is too new! Please upgrade to a new engine version: " + local_path);
ERR_FAIL_V(ERR_FILE_UNRECOGNIZED);
}
@@ -1715,54 +1721,6 @@ void ResourceFormatSaverBinaryInstance::_find_resources(const Variant &p_variant
default: {}
}
}
-#if 0
-Error ResourceFormatSaverBinary::_save_obj(const Object *p_object,SavedObject *so) {
-
- //use classic way
- List<PropertyInfo> property_list;
- p_object->get_property_list( &property_list );
-
- for(List<PropertyInfo>::Element *E=property_list.front();E;E=E->next()) {
-
- if (skip_editor && E->get().name.begins_with("__editor"))
- continue;
- if (E->get().usage&PROPERTY_USAGE_STORAGE || (bundle_resources && E->get().usage&PROPERTY_USAGE_BUNDLE)) {
-
- SavedObject::SavedProperty sp;
- sp.name_idx=get_string_index(E->get().name);
- sp.value = p_object->get(E->get().name);
- _find_resources(sp.value);
- so->properties.push_back(sp);
- }
- }
-
- return OK;
-
-}
-
-
-
-Error ResourceFormatSaverBinary::save(const Object *p_object,const Variant &p_meta) {
-
- ERR_FAIL_COND_V(!f,ERR_UNCONFIGURED);
- ERR_EXPLAIN("write_object should supply either an object, a meta, or both");
- ERR_FAIL_COND_V(!p_object && p_meta.get_type()==Variant::NIL, ERR_INVALID_PARAMETER);
-
- SavedObject *so = memnew( SavedObject );
-
- if (p_object)
- so->type=p_object->get_type();
-
- _find_resources(p_meta);
- so->meta=p_meta;
- Error err = _save_obj(p_object,so);
- ERR_FAIL_COND_V( err, ERR_INVALID_DATA );
-
- saved_objects.push_back(so);
-
- return OK;
-}
-#endif
void ResourceFormatSaverBinaryInstance::save_unicode_string(const String &p_string) {
@@ -1798,7 +1756,6 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p
}
ERR_FAIL_COND_V(err, err);
- FileAccessRef _fref(f);
relative_paths = p_flags & ResourceSaver::FLAG_RELATIVE_PATHS;
skip_editor = p_flags & ResourceSaver::FLAG_OMIT_EDITOR_PROPERTIES;
@@ -1810,7 +1767,6 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p
takeover_paths = false;
local_path = p_path.get_base_dir();
- //bin_meta_idx = get_string_index("__bin_meta__"); //is often used, so create
_find_resources(p_resource, true);
@@ -1836,7 +1792,6 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p
return ERR_CANT_CREATE;
}
- //f->store_32(saved_resources.size()+external_resources.size()); // load steps -not needed
save_unicode_string(p_resource->get_class());
uint64_t md_at = f->get_pos();
f->store_64(0); //offset to impoty metadata
@@ -1875,7 +1830,6 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p
f->store_32(strings.size()); //string table size
for (int i = 0; i < strings.size(); i++) {
- //print_bl("saving string: "+strings[i]);
save_unicode_string(strings[i]);
}
@@ -1944,9 +1898,8 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p
}
Vector<uint64_t> ofs_table;
- //int saved_idx=0;
- //now actually save the resources
+ //now actually save the resources
for (List<ResourceData>::Element *E = resources.front(); E; E = E->next()) {
ResourceData &rd = E->get();
diff --git a/core/io/resource_format_binary.h b/core/io/resource_format_binary.h
index 1c66344e3e..ab77c2c9d3 100644
--- a/core/io/resource_format_binary.h
+++ b/core/io/resource_format_binary.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -101,7 +101,7 @@ public:
class ResourceFormatLoaderBinary : public ResourceFormatLoader {
public:
- virtual Ref<ResourceInteractiveLoader> load_interactive(const String &p_path, Error *r_error = NULL);
+ virtual Ref<ResourceInteractiveLoader> load_interactive(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
diff --git a/core/io/resource_import.cpp b/core/io/resource_import.cpp
index 7033dbe5fb..be486a86a3 100644
--- a/core/io/resource_import.cpp
+++ b/core/io/resource_import.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -32,13 +32,17 @@
#include "os/os.h"
#include "variant_parser.h"
-Error ResourceFormatImporter::_get_path_and_type(const String &p_path, PathAndType &r_path_and_type) const {
+Error ResourceFormatImporter::_get_path_and_type(const String &p_path, PathAndType &r_path_and_type, bool *r_valid) const {
Error err;
FileAccess *f = FileAccess::open(p_path + ".import", FileAccess::READ, &err);
- if (!f)
+ if (!f) {
+ if (r_valid) {
+ *r_valid = false;
+ }
return err;
+ }
VariantParser::StreamFile stream;
stream.f = f;
@@ -47,6 +51,10 @@ Error ResourceFormatImporter::_get_path_and_type(const String &p_path, PathAndTy
Variant value;
VariantParser::Tag next_tag;
+ if (r_valid) {
+ *r_valid = true;
+ }
+
int lines = 0;
String error_text;
bool path_found = false; //first match must have priority
@@ -79,6 +87,10 @@ Error ResourceFormatImporter::_get_path_and_type(const String &p_path, PathAndTy
path_found = true; //first match must have priority
} else if (assign == "type") {
r_path_and_type.type = value;
+ } else if (assign == "valid") {
+ if (r_valid) {
+ *r_valid = value;
+ }
}
} else if (next_tag.name != "remap") {
@@ -107,7 +119,7 @@ RES ResourceFormatImporter::load(const String &p_path, const String &p_original_
return RES();
}
- RES res = ResourceLoader::load(pat.path, pat.type, false, r_error);
+ RES res = ResourceLoader::_load(pat.path, p_path, pat.type, false, r_error);
#ifdef TOOLS_ENABLED
if (res.is_valid()) {
@@ -245,6 +257,14 @@ void ResourceFormatImporter::get_internal_resource_path_list(const String &p_pat
memdelete(f);
}
+bool ResourceFormatImporter::is_import_valid(const String &p_path) const {
+
+ bool valid = true;
+ PathAndType pat;
+ _get_path_and_type(p_path, pat, &valid);
+ return valid;
+}
+
String ResourceFormatImporter::get_resource_type(const String &p_path) const {
PathAndType pat;
diff --git a/core/io/resource_import.h b/core/io/resource_import.h
index 67fd870178..b10255fbab 100644
--- a/core/io/resource_import.h
+++ b/core/io/resource_import.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -40,7 +40,7 @@ class ResourceFormatImporter : public ResourceFormatLoader {
String type;
};
- Error _get_path_and_type(const String &p_path, PathAndType &r_path_and_type) const;
+ Error _get_path_and_type(const String &p_path, PathAndType &r_path_and_type, bool *r_valid = NULL) const;
static ResourceFormatImporter *singleton;
@@ -54,6 +54,7 @@ public:
virtual bool recognize_path(const String &p_path, const String &p_for_type = String()) const;
virtual bool handles_type(const String &p_type) const;
virtual String get_resource_type(const String &p_path) const;
+ virtual bool is_import_valid(const String &p_path) const;
virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false);
virtual bool can_be_imported(const String &p_path) const;
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index 5347cd6ee1..4f266df43e 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -109,10 +109,10 @@ public:
ResourceInteractiveLoaderDefault() {}
};
-Ref<ResourceInteractiveLoader> ResourceFormatLoader::load_interactive(const String &p_path, Error *r_error) {
+Ref<ResourceInteractiveLoader> ResourceFormatLoader::load_interactive(const String &p_path, const String &p_original_path, Error *r_error) {
//either this
- Ref<Resource> res = load(p_path, p_path, r_error);
+ Ref<Resource> res = load(p_path, p_original_path, r_error);
if (res.is_null())
return Ref<ResourceInteractiveLoader>();
@@ -126,7 +126,7 @@ RES ResourceFormatLoader::load(const String &p_path, const String &p_original_pa
String path = p_path;
//or this must be implemented
- Ref<ResourceInteractiveLoader> ril = load_interactive(p_path, r_error);
+ Ref<ResourceInteractiveLoader> ril = load_interactive(p_path, p_original_path, r_error);
if (!ril.is_valid())
return RES();
ril->set_local_path(p_original_path);
@@ -157,6 +157,34 @@ void ResourceFormatLoader::get_dependencies(const String &p_path, List<String> *
///////////////////////////////////
+RES ResourceLoader::_load(const String &p_path, const String &p_original_path, const String &p_type_hint, bool p_no_cache, Error *r_error) {
+
+ bool found = false;
+
+ // Try all loaders and pick the first match for the type hint
+ for (int i = 0; i < loader_count; i++) {
+
+ if (!loader[i]->recognize_path(p_path, p_type_hint)) {
+ continue;
+ }
+ found = true;
+ RES res = loader[i]->load(p_path, p_original_path != String() ? p_original_path : p_path, r_error);
+ if (res.is_null()) {
+ continue;
+ }
+
+ return res;
+ }
+
+ if (found) {
+ ERR_EXPLAIN("Failed loading resource: " + p_path);
+ } else {
+ ERR_EXPLAIN("No loader found for resource: " + p_path);
+ }
+ ERR_FAIL_V(RES());
+ return RES();
+}
+
RES ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p_no_cache, Error *r_error) {
if (r_error)
@@ -183,45 +211,29 @@ RES ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p
if (OS::get_singleton()->is_stdout_verbose())
print_line("load resource: " + path);
- bool found = false;
- // Try all loaders and pick the first match for the type hint
- for (int i = 0; i < loader_count; i++) {
+ RES res = _load(path, local_path, p_type_hint, p_no_cache, r_error);
- if (!loader[i]->recognize_path(path, p_type_hint)) {
- continue;
- }
- found = true;
- RES res = loader[i]->load(path, path, r_error);
- if (res.is_null()) {
- continue;
- }
- if (!p_no_cache)
- res->set_path(local_path);
+ if (res.is_null()) {
+ return RES();
+ }
+ if (!p_no_cache)
+ res->set_path(local_path);
- if (xl_remapped)
- res->set_as_translation_remapped(true);
+ if (xl_remapped)
+ res->set_as_translation_remapped(true);
#ifdef TOOLS_ENABLED
- res->set_edited(false);
- if (timestamp_on_load) {
- uint64_t mt = FileAccess::get_modified_time(path);
- //printf("mt %s: %lli\n",remapped_path.utf8().get_data(),mt);
- res->set_last_modified_time(mt);
- }
-#endif
-
- return res;
+ res->set_edited(false);
+ if (timestamp_on_load) {
+ uint64_t mt = FileAccess::get_modified_time(path);
+ //printf("mt %s: %lli\n",remapped_path.utf8().get_data(),mt);
+ res->set_last_modified_time(mt);
}
+#endif
- if (found) {
- ERR_EXPLAIN("Failed loading resource: " + path);
- } else {
- ERR_EXPLAIN("No loader found for resource: " + path);
- }
- ERR_FAIL_V(RES());
- return RES();
+ return res;
}
Ref<ResourceInteractiveLoader> ResourceLoader::load_interactive(const String &p_path, const String &p_type_hint, bool p_no_cache, Error *r_error) {
@@ -262,7 +274,7 @@ Ref<ResourceInteractiveLoader> ResourceLoader::load_interactive(const String &p_
if (!loader[i]->recognize_path(path, p_type_hint))
continue;
found = true;
- Ref<ResourceInteractiveLoader> ril = loader[i]->load_interactive(path, r_error);
+ Ref<ResourceInteractiveLoader> ril = loader[i]->load_interactive(path, local_path, r_error);
if (ril.is_null())
continue;
if (!p_no_cache)
@@ -296,6 +308,31 @@ void ResourceLoader::add_resource_format_loader(ResourceFormatLoader *p_format_l
}
}
+bool ResourceLoader::is_import_valid(const String &p_path) {
+
+ String path = _path_remap(p_path);
+
+ String local_path;
+ if (path.is_rel_path())
+ local_path = "res://" + path;
+ else
+ local_path = ProjectSettings::get_singleton()->localize_path(path);
+
+ for (int i = 0; i < loader_count; i++) {
+
+ if (!loader[i]->recognize_path(local_path))
+ continue;
+ /*
+ if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint))
+ continue;
+ */
+
+ return loader[i]->is_import_valid(p_path);
+ }
+
+ return false; //not found
+}
+
void ResourceLoader::get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types) {
String path = _path_remap(p_path);
diff --git a/core/io/resource_loader.h b/core/io/resource_loader.h
index e6687800d7..a71a568569 100644
--- a/core/io/resource_loader.h
+++ b/core/io/resource_loader.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -57,7 +57,7 @@ public:
class ResourceFormatLoader {
public:
- virtual Ref<ResourceInteractiveLoader> load_interactive(const String &p_path, Error *r_error = NULL);
+ virtual Ref<ResourceInteractiveLoader> load_interactive(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual RES load(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions(List<String> *p_extensions) const = 0;
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
@@ -66,6 +66,7 @@ public:
virtual String get_resource_type(const String &p_path) const = 0;
virtual void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false);
virtual Error rename_dependencies(const String &p_path, const Map<String, String> &p_map) { return OK; }
+ virtual bool is_import_valid(const String &p_path) const { return true; }
virtual ~ResourceFormatLoader() {}
};
@@ -95,6 +96,10 @@ class ResourceLoader {
static SelfList<Resource>::List remapped_list;
+ friend class ResourceFormatImporter;
+ //internal load function
+ static RES _load(const String &p_path, const String &p_original_path, const String &p_type_hint, bool p_no_cache, Error *r_error);
+
public:
static Ref<ResourceInteractiveLoader> load_interactive(const String &p_path, const String &p_type_hint = "", bool p_no_cache = false, Error *r_error = NULL);
static RES load(const String &p_path, const String &p_type_hint = "", bool p_no_cache = false, Error *r_error = NULL);
@@ -104,6 +109,7 @@ public:
static String get_resource_type(const String &p_path);
static void get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types = false);
static Error rename_dependencies(const String &p_path, const Map<String, String> &p_map);
+ static bool is_import_valid(const String &p_path);
static void set_timestamp_on_load(bool p_timestamp) { timestamp_on_load = p_timestamp; }
diff --git a/core/io/resource_saver.cpp b/core/io/resource_saver.cpp
index 314259b2e9..e6187c9e3c 100644
--- a/core/io/resource_saver.cpp
+++ b/core/io/resource_saver.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/resource_saver.h b/core/io/resource_saver.h
index f7fbcc1fb8..3fdd00133a 100644
--- a/core/io/resource_saver.h
+++ b/core/io/resource_saver.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp
index 7042700d92..1006158003 100644
--- a/core/io/stream_peer.cpp
+++ b/core/io/stream_peer.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/stream_peer.h b/core/io/stream_peer.h
index d0748a8c9e..1ee997c123 100644
--- a/core/io/stream_peer.h
+++ b/core/io/stream_peer.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/stream_peer_ssl.cpp b/core/io/stream_peer_ssl.cpp
index 24f6473330..d1fe214343 100644
--- a/core/io/stream_peer_ssl.cpp
+++ b/core/io/stream_peer_ssl.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/stream_peer_ssl.h b/core/io/stream_peer_ssl.h
index a81ae24e4a..bcbbeb0d48 100644
--- a/core/io/stream_peer_ssl.h
+++ b/core/io/stream_peer_ssl.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/stream_peer_tcp.cpp b/core/io/stream_peer_tcp.cpp
index ae5603aa31..0e047a8f32 100644
--- a/core/io/stream_peer_tcp.cpp
+++ b/core/io/stream_peer_tcp.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/stream_peer_tcp.h b/core/io/stream_peer_tcp.h
index 53c21a93fd..45c93c2d36 100644
--- a/core/io/stream_peer_tcp.h
+++ b/core/io/stream_peer_tcp.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/tcp_server.cpp b/core/io/tcp_server.cpp
index 29a80ecc19..a4364fa17c 100644
--- a/core/io/tcp_server.cpp
+++ b/core/io/tcp_server.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/tcp_server.h b/core/io/tcp_server.h
index b4ff3246ad..a7276401e4 100644
--- a/core/io/tcp_server.h
+++ b/core/io/tcp_server.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/translation_loader_po.cpp b/core/io/translation_loader_po.cpp
index 1a670b0ab0..92af247823 100644
--- a/core/io/translation_loader_po.cpp
+++ b/core/io/translation_loader_po.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -51,8 +51,8 @@ RES TranslationLoaderPO::load_translation(FileAccess *f, Error *r_error, const S
Ref<Translation> translation = Ref<Translation>(memnew(Translation));
int line = 1;
- bool skip_this;
- bool skip_next;
+ bool skip_this = false;
+ bool skip_next = false;
while (true) {
diff --git a/core/io/translation_loader_po.h b/core/io/translation_loader_po.h
index a731e4e0d6..a14238f1df 100644
--- a/core/io/translation_loader_po.h
+++ b/core/io/translation_loader_po.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/io/xml_parser.cpp b/core/io/xml_parser.cpp
index d8b69b0951..3a4be7cd13 100644
--- a/core/io/xml_parser.cpp
+++ b/core/io/xml_parser.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -385,7 +385,7 @@ void XMLParser::_bind_methods() {
Error XMLParser::read() {
// if not end reached, parse the node
- if (P && (P - data) < length - 1 && *P != 0) {
+ if (P && (P - data) < (int64_t)length - 1 && *P != 0) {
_parse_current_node();
return OK;
}
diff --git a/core/io/xml_parser.h b/core/io/xml_parser.h
index 297211ecc6..26616ed94a 100644
--- a/core/io/xml_parser.h
+++ b/core/io/xml_parser.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -67,7 +67,7 @@ public:
private:
char *data;
char *P;
- int length;
+ uint64_t length;
void unescape(String &p_str);
Vector<String> special_characters;
String node_name;
diff --git a/core/io/zip_io.h b/core/io/zip_io.h
index 88e680c0e0..8cf971ee08 100644
--- a/core/io/zip_io.h
+++ b/core/io/zip_io.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/list.h b/core/list.h
index df69b1dc40..a67287a9ab 100644
--- a/core/list.h
+++ b/core/list.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -180,7 +180,7 @@ private:
public:
/**
- * return an const iterator to the beginning of the list.
+ * return a const iterator to the beginning of the list.
*/
_FORCE_INLINE_ const Element *front() const {
@@ -195,7 +195,7 @@ public:
};
/**
- * return an const iterator to the last member of the list.
+ * return a const iterator to the last member of the list.
*/
_FORCE_INLINE_ const Element *back() const {
diff --git a/core/make_binders.py b/core/make_binders.py
index a5cdb78443..6468c029f0 100644
--- a/core/make_binders.py
+++ b/core/make_binders.py
@@ -16,12 +16,11 @@ public:
$
return Variant::NIL;
}
- virtual StringName _gen_argument_type_name(int p_arg) const { return _gen_argument_type_hint(p_arg); }
- StringName _gen_argument_type_hint(int p_argument) const {
- $ifret if (p_argument==-1) return GetTypeInfo<R>::get_class_name();$
- $arg if (p_argument==(@-1)) return GetTypeInfo<P@>::get_class_name();
+ virtual PropertyInfo _gen_argument_type_info(int p_argument) const {
+ $ifret if (p_argument==-1) return GetTypeInfo<R>::get_class_info();$
+ $arg if (p_argument==(@-1)) return GetTypeInfo<P@>::get_class_info();
$
- return StringName();
+ return PropertyInfo();
}
#endif
virtual String get_instance_class() const {
@@ -30,7 +29,7 @@ public:
virtual Variant call(Object* p_object,const Variant** p_args,int p_arg_count, Variant::CallError& r_error) {
- T *instance=p_object->cast_to<T>();
+ T *instance=Object::cast_to<T>(p_object);
r_error.error=Variant::CallError::CALL_OK;
#ifdef DEBUG_METHODS_ENABLED
@@ -58,7 +57,7 @@ public:
#ifdef PTRCALL_ENABLED
virtual void ptrcall(Object*p_object,const void** p_args,void *r_ret) {
- T *instance=p_object->cast_to<T>();
+ T *instance=Object::cast_to<T>(p_object);
$ifret PtrToArg<R>::encode( $ (instance->*method)($arg, PtrToArg<P@>::convert(p_args[@-1])$) $ifret ,r_ret)$ ;
}
#endif
@@ -104,14 +103,13 @@ public:
return Variant::NIL;
}
- virtual StringName _gen_argument_type_name(int p_arg) const { return _gen_argument_type_hint(p_arg); }
-
- StringName _gen_argument_type_hint(int p_argument) const {
- $ifret if (p_argument==-1) return GetTypeInfo<R>::get_class_name();$
- $arg if (p_argument==(@-1)) return GetTypeInfo<P@>::get_class_name();
+ virtual PropertyInfo _gen_argument_type_info(int p_argument) const {
+ $ifret if (p_argument==-1) return GetTypeInfo<R>::get_class_info();$
+ $arg if (p_argument==(@-1)) return GetTypeInfo<P@>::get_class_info();
$
- return StringName();
+ return PropertyInfo();
}
+
#endif
virtual String get_instance_class() const {
return type_name;
diff --git a/core/map.h b/core/map.h
index ef0f75fc9b..75a38a3440 100644
--- a/core/map.h
+++ b/core/map.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp
index 04e4383f03..21516ac768 100644
--- a/core/math/a_star.cpp
+++ b/core/math/a_star.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/a_star.h b/core/math/a_star.h
index ebf1407c17..75b860d0a4 100644
--- a/core/math/a_star.h
+++ b/core/math/a_star.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* a_star.h */
+/* a_star.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/audio_frame.cpp b/core/math/audio_frame.cpp
index 30a50c8add..555d3536df 100644
--- a/core/math/audio_frame.cpp
+++ b/core/math/audio_frame.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/audio_frame.h b/core/math/audio_frame.h
index d54f622197..cfc7331767 100644
--- a/core/math/audio_frame.h
+++ b/core/math/audio_frame.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/bsp_tree.cpp b/core/math/bsp_tree.cpp
index e22bc2b05e..be950568cf 100644
--- a/core/math/bsp_tree.cpp
+++ b/core/math/bsp_tree.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/bsp_tree.h b/core/math/bsp_tree.h
index 8296e57943..2e762ba4de 100644
--- a/core/math/bsp_tree.h
+++ b/core/math/bsp_tree.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/camera_matrix.cpp b/core/math/camera_matrix.cpp
index a1666ccd8b..0512cdd798 100644
--- a/core/math/camera_matrix.cpp
+++ b/core/math/camera_matrix.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -180,19 +180,7 @@ void CameraMatrix::set_orthogonal(real_t p_size, real_t p_aspect, real_t p_znear
}
void CameraMatrix::set_frustum(real_t p_left, real_t p_right, real_t p_bottom, real_t p_top, real_t p_near, real_t p_far) {
-#if 0
- ///@TODO, give a check to this. I'm not sure if it's working.
- set_identity();
- matrix[0][0]=(2*p_near) / (p_right-p_left);
- matrix[0][2]=(p_right+p_left) / (p_right-p_left);
- matrix[1][1]=(2*p_near) / (p_top-p_bottom);
- matrix[1][2]=(p_top+p_bottom) / (p_top-p_bottom);
- matrix[2][2]=-(p_far+p_near) / ( p_far-p_near);
- matrix[2][3]=-(2*p_far*p_near) / (p_far-p_near);
- matrix[3][2]=-1;
- matrix[3][3]=0;
-#else
real_t *te = &matrix[0][0];
real_t x = 2 * p_near / (p_right - p_left);
real_t y = 2 * p_near / (p_top - p_bottom);
@@ -218,8 +206,6 @@ void CameraMatrix::set_frustum(real_t p_left, real_t p_right, real_t p_bottom, r
te[13] = 0;
te[14] = d;
te[15] = 0;
-
-#endif
}
real_t CameraMatrix::get_z_far() const {
diff --git a/core/math/camera_matrix.h b/core/math/camera_matrix.h
index 4be8ffab8c..175d0cdb1b 100644
--- a/core/math/camera_matrix.h
+++ b/core/math/camera_matrix.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/face3.cpp b/core/math/face3.cpp
index 0e292500bf..e1b172e491 100644
--- a/core/math/face3.cpp
+++ b/core/math/face3.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -296,7 +296,7 @@ void Face3::get_support(const Vector3 &p_normal, const Transform &p_transform, V
/** FIND SUPPORT VERTEX **/
int vert_support_idx = -1;
- real_t support_max;
+ real_t support_max = 0;
for (int i = 0; i < 3; i++) {
diff --git a/core/math/face3.h b/core/math/face3.h
index 3d02ae4014..8e4a25fb7a 100644
--- a/core/math/face3.h
+++ b/core/math/face3.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp
index 9a5811244a..7c8fb6f17d 100644
--- a/core/math/geometry.cpp
+++ b/core/math/geometry.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/geometry.h b/core/math/geometry.h
index 909d8164c3..cd069bd7a3 100644
--- a/core/math/geometry.h
+++ b/core/math/geometry.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -105,7 +105,7 @@ public:
}
static void get_closest_points_between_segments(const Vector3 &p1, const Vector3 &p2, const Vector3 &q1, const Vector3 &q2, Vector3 &c1, Vector3 &c2) {
-#if 1
+
//do the function 'd' as defined by pb. I think is is dot product of some sort
#define d_of(m, n, o, p) ((m.x - n.x) * (o.x - p.x) + (m.y - n.y) * (o.y - p.y) + (m.z - n.z) * (o.z - p.z))
@@ -120,33 +120,6 @@ public:
if (mub > 1) mub = 1;
c1 = p1.linear_interpolate(p2, mua);
c2 = q1.linear_interpolate(q2, mub);
-#else
- //this is broken do not use
- Vector3 u = p2 - p1;
- Vector3 v = q2 - q1;
- Vector3 w = p1 - q1;
- float a = u.dot(u);
- float b = u.dot(v);
- float c = v.dot(v); // always >= 0
- float d = u.dot(w);
- float e = v.dot(w);
- float D = a * c - b * b; // always >= 0
- float sc, tc;
-
- // compute the line parameters of the two closest points
- if (D < CMP_EPSILON) { // the lines are almost parallel
- sc = 0.0;
- tc = (b > c ? d / b : e / c); // use the largest denominator
- } else {
- sc = (b * e - c * d) / D;
- tc = (a * e - b * d) / D;
- }
-
- c1 = w + sc * u;
- c2 = w + tc * v;
-// get the difference of the two closest points
-//Vector dP = w + (sc * u) - (tc * v); // = L1(sc) - L2(tc)
-#endif
}
static real_t get_closest_distance_between_segments(const Vector3 &p_from_a, const Vector3 &p_to_a, const Vector3 &p_from_b, const Vector3 &p_to_b) {
diff --git a/core/math/math_2d.cpp b/core/math/math_2d.cpp
index 956cfe5258..c77fe96ff2 100644
--- a/core/math/math_2d.cpp
+++ b/core/math/math_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -205,33 +205,6 @@ Vector2 Vector2::clamped(real_t p_len) const {
return v;
}
-Vector2 Vector2::cubic_interpolate_soft(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_t) const {
-#if 0
- k[0] = ((*this) (vi[0] + 1, vi[1], vi[2])) - ((*this) (vi[0],
- vi[1],vi[2])); //fk = a0
- k[1] = (((*this) (vi[0] + 1, vi[1], vi[2])) - ((*this) ((int) (v(0) -
- 1), vi[1],vi[2])))*0.5; //dk = a1
- k[2] = (((*this) ((int) (v(0) + 2), vi[1], vi[2])) - ((*this) (vi[0],
- vi[1],vi[2])))*0.5; //dk+1
- k[3] = k[0]*3 - k[1]*2 - k[2];//a2
- k[4] = k[1] + k[2] - k[0]*2;//a3
-
- //ip = a3(t-tk)³ + a2(t-tk)² + a1(t-tk) + a0
- //
- //a3 = dk + dk+1 - Dk
- //a2 = 3Dk - 2dk - dk+1
- //a1 = dk
- //a0 = fk
- //
- //dk = (fk+1 - fk-1)*0.5
- //Dk = (fk+1 - fk)
-
- real_t dk =
-#endif
-
- return Vector2();
-}
-
Vector2 Vector2::cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_t) const {
Vector2 p0 = p_pre_a;
diff --git a/core/math/math_2d.h b/core/math/math_2d.h
index 6fea6c8adb..d215df8a43 100644
--- a/core/math/math_2d.h
+++ b/core/math/math_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -113,7 +113,6 @@ struct Vector2 {
_FORCE_INLINE_ static Vector2 linear_interpolate(const Vector2 &p_a, const Vector2 &p_b, real_t p_t);
_FORCE_INLINE_ Vector2 linear_interpolate(const Vector2 &p_b, real_t p_t) const;
Vector2 cubic_interpolate(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_t) const;
- Vector2 cubic_interpolate_soft(const Vector2 &p_b, const Vector2 &p_pre_a, const Vector2 &p_post_b, real_t p_t) const;
Vector2 slide(const Vector2 &p_normal) const;
Vector2 bounce(const Vector2 &p_normal) const;
diff --git a/core/math/math_defs.h b/core/math/math_defs.h
index 3d9eb63e11..904cbc1abc 100644
--- a/core/math/math_defs.h
+++ b/core/math/math_defs.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/math_funcs.cpp b/core/math/math_funcs.cpp
index 9f5a9c193a..6fb688f16b 100644
--- a/core/math/math_funcs.cpp
+++ b/core/math/math_funcs.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,16 +28,13 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "math_funcs.h"
+
#include "core/os/os.h"
pcg32_random_t Math::default_pcg = { 12047754176567800795ULL, PCG_DEFAULT_INC_64 };
#define PHI 0x9e3779b9
-#if 0
-static uint32_t Q[4096];
-#endif
-
// TODO: we should eventually expose pcg.inc too
uint32_t Math::rand_from_seed(uint64_t *seed) {
pcg32_random_t pcg = { *seed, PCG_DEFAULT_INC_64 };
diff --git a/core/math/math_funcs.h b/core/math/math_funcs.h
index 2ce9a88622..9651e37f3e 100644
--- a/core/math/math_funcs.h
+++ b/core/math/math_funcs.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/matrix3.cpp b/core/math/matrix3.cpp
index ec82bd30d4..9732a1ff37 100644
--- a/core/math/matrix3.cpp
+++ b/core/math/matrix3.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -107,6 +107,13 @@ bool Basis::is_orthogonal() const {
return is_equal_approx(id, m);
}
+bool Basis::is_diagonal() const {
+ return (
+ Math::is_equal_approx(elements[0][1], 0) && Math::is_equal_approx(elements[0][2], 0) &&
+ Math::is_equal_approx(elements[1][0], 0) && Math::is_equal_approx(elements[1][2], 0) &&
+ Math::is_equal_approx(elements[2][0], 0) && Math::is_equal_approx(elements[2][1], 0));
+}
+
bool Basis::is_rotation() const {
return Math::is_equal_approx(determinant(), 1) && is_orthogonal();
}
@@ -241,12 +248,13 @@ Vector3 Basis::get_scale() const {
// This may lead to confusion for some users though.
//
// The convention we use here is to absorb the sign flip into the scaling matrix.
- // The same convention is also used in other similar functions such as set_scale,
- // get_rotation_axis_angle, get_rotation, set_rotation_axis_angle, set_rotation_euler, ...
+ // The same convention is also used in other similar functions such as get_rotation_axis_angle, get_rotation, ...
//
// A proper way to get rid of this issue would be to store the scaling values (or at least their signs)
// as a part of Basis. However, if we go that path, we need to disable direct (write) access to the
// matrix elements.
+ //
+ // The rotation part of this decomposition is returned by get_rotation* functions.
real_t det_sign = determinant() > 0 ? 1 : -1;
return det_sign * Vector3(
Vector3(elements[0][0], elements[1][0], elements[2][0]).length(),
@@ -254,15 +262,24 @@ Vector3 Basis::get_scale() const {
Vector3(elements[0][2], elements[1][2], elements[2][2]).length());
}
-// Sets scaling while preserving rotation.
-// This requires some care when working with matrices with negative determinant,
-// since we're using a particular convention for "polar" decomposition in get_scale and get_rotation.
-// For details, see the explanation in get_scale.
-void Basis::set_scale(const Vector3 &p_scale) {
- Vector3 e = get_euler();
- Basis(); // reset to identity
- scale(p_scale);
- rotate(e);
+// Decomposes a Basis into a rotation-reflection matrix (an element of the group O(3)) and a positive scaling matrix as B = O.S.
+// Returns the rotation-reflection matrix via reference argument, and scaling information is returned as a Vector3.
+// This (internal) function is too specıfıc and named too ugly to expose to users, and probably there's no need to do so.
+Vector3 Basis::rotref_posscale_decomposition(Basis &rotref) const {
+#ifdef MATH_CHECKS
+ ERR_FAIL_COND_V(determinant() == 0, Vector3());
+
+ Basis m = transposed() * (*this);
+ ERR_FAIL_COND_V(m.is_diagonal() == false, Vector3());
+#endif
+ Vector3 scale = get_scale();
+ Basis inv_scale = Basis().scaled(scale.inverse()); // this will also absorb the sign of scale
+ rotref = (*this) * inv_scale;
+
+#ifdef MATH_CHECKS
+ ERR_FAIL_COND_V(rotref.is_orthogonal() == false, Vector3());
+#endif
+ return scale.abs();
}
// Multiplies the matrix from left by the rotation matrix: M -> R.M
@@ -316,28 +333,6 @@ void Basis::get_rotation_axis_angle(Vector3 &p_axis, real_t &p_angle) const {
m.get_axis_angle(p_axis, p_angle);
}
-// Sets rotation while preserving scaling.
-// This requires some care when working with matrices with negative determinant,
-// since we're using a particular convention for "polar" decomposition in get_scale and get_rotation.
-// For details, see the explanation in get_scale.
-void Basis::set_rotation_euler(const Vector3 &p_euler) {
- Vector3 s = get_scale();
- Basis(); // reset to identity
- scale(s);
- rotate(p_euler);
-}
-
-// Sets rotation while preserving scaling.
-// This requires some care when working with matrices with negative determinant,
-// since we're using a particular convention for "polar" decomposition in get_scale and get_rotation.
-// For details, see the explanation in get_scale.
-void Basis::set_rotation_axis_angle(const Vector3 &p_axis, real_t p_angle) {
- Vector3 s = get_scale();
- Basis(); // reset to identity
- scale(s);
- rotate(p_axis, p_angle);
-}
-
// get_euler_xyz returns a vector containing the Euler angles in the format
// (a1,a2,a3), where a3 is the angle of the first rotation, and a1 is the last
// (following the convention they are commonly defined in the literature).
@@ -364,8 +359,9 @@ Vector3 Basis::get_euler_xyz() const {
euler.y = Math::asin(elements[0][2]);
if (euler.y < Math_PI * 0.5) {
if (euler.y > -Math_PI * 0.5) {
- //if rotation is Y-only, return a proper -pi,pi range like in x or z for the same case.
+ // is this a pure Y rotation?
if (elements[1][0] == 0.0 && elements[0][1] == 0.0 && elements[1][2] == 0 && elements[2][1] == 0 && elements[1][1] == 1) {
+ // return the simplest form
euler.x = 0;
euler.y = atan2(elements[0][2], elements[0][0]);
euler.z = 0;
@@ -432,7 +428,9 @@ Vector3 Basis::get_euler_yxz() const {
if (m12 < 1) {
if (m12 > -1) {
- if (elements[1][0] == 0 && elements[0][1] == 0 && elements[0][2] == 0 && elements[2][0] == 0 && elements[0][0] == 1) { // use pure x rotation
+ // is this a pure X rotation?
+ if (elements[1][0] == 0 && elements[0][1] == 0 && elements[0][2] == 0 && elements[2][0] == 0 && elements[0][0] == 1) {
+ // return the simplest form
euler.x = atan2(-m12, elements[1][1]);
euler.y = 0;
euler.z = 0;
diff --git a/core/math/matrix3.h b/core/math/matrix3.h
index 74e6564578..9c9080ac46 100644
--- a/core/math/matrix3.h
+++ b/core/math/matrix3.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -81,8 +81,7 @@ public:
Vector3 get_rotation() const;
void get_rotation_axis_angle(Vector3 &p_axis, real_t &p_angle) const;
- void set_rotation_euler(const Vector3 &p_euler);
- void set_rotation_axis_angle(const Vector3 &p_axis, real_t p_angle);
+ Vector3 rotref_posscale_decomposition(Basis &rotref) const;
Vector3 get_euler_xyz() const;
void set_euler_xyz(const Vector3 &p_euler);
@@ -99,7 +98,6 @@ public:
Basis scaled(const Vector3 &p_scale) const;
Vector3 get_scale() const;
- void set_scale(const Vector3 &p_scale);
// transposed dot products
_FORCE_INLINE_ real_t tdotx(const Vector3 &v) const {
@@ -132,6 +130,7 @@ public:
void set_orthogonal_index(int p_index);
bool is_orthogonal() const;
+ bool is_diagonal() const;
bool is_rotation() const;
operator String() const;
diff --git a/core/math/octree.h b/core/math/octree.h
index 2e37056030..95a67943fd 100644
--- a/core/math/octree.h
+++ b/core/math/octree.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -851,28 +851,6 @@ void Octree<T, use_pairs, AL>::move(OctreeElementID p_id, const Rect3 &p_aabb) {
ERR_FAIL_COND(!E);
Element &e = E->get();
-#if 0
-
- pass++;
- if (!e.aabb.has_no_surface()) {
- _remove_element(&e);
- }
-
- e.aabb=p_aabb;
-
- if (!e.aabb.has_no_surface()) {
- _ensure_valid_root(p_aabb);
-
- _insert_element(&e,root);
- if (use_pairs)
- _element_check_pairs(&e);
-
- }
-
- _optimize();
-
-#else
-
bool old_has_surf = !e.aabb.has_no_surface();
bool new_has_surf = !p_aabb.has_no_surface();
@@ -979,7 +957,6 @@ void Octree<T, use_pairs, AL>::move(OctreeElementID p_id, const Rect3 &p_aabb) {
}
_optimize();
-#endif
}
template <class T, bool use_pairs, class AL>
diff --git a/core/math/plane.cpp b/core/math/plane.cpp
index 17928d07c3..08395ed07b 100644
--- a/core/math/plane.cpp
+++ b/core/math/plane.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/plane.h b/core/math/plane.h
index 73d584e553..559a735817 100644
--- a/core/math/plane.h
+++ b/core/math/plane.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/quat.cpp b/core/math/quat.cpp
index 5984cdf657..cebc5b9522 100644
--- a/core/math/quat.cpp
+++ b/core/math/quat.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -139,48 +139,6 @@ Quat Quat::inverse() const {
Quat Quat::slerp(const Quat &q, const real_t &t) const {
-#if 0
-
-
- Quat dst=q;
- Quat src=*this;
-
- src.normalize();
- dst.normalize();
-
- real_t cosine = dst.dot(src);
-
- if (cosine < 0 && true) {
- cosine = -cosine;
- dst = -dst;
- } else {
- dst = dst;
- }
-
- if (Math::abs(cosine) < 1 - CMP_EPSILON) {
- // Standard case (slerp)
- real_t sine = Math::sqrt(1 - cosine*cosine);
- real_t angle = Math::atan2(sine, cosine);
- real_t inv_sine = 1.0 / sine;
- real_t coeff_0 = Math::sin((1.0 - t) * angle) * inv_sine;
- real_t coeff_1 = Math::sin(t * angle) * inv_sine;
- Quat ret= src * coeff_0 + dst * coeff_1;
-
- return ret;
- } else {
- // There are two situations:
- // 1. "rkP" and "q" are very close (cosine ~= +1), so we can do a linear
- // interpolation safely.
- // 2. "rkP" and "q" are almost invedste of each other (cosine ~= -1), there
- // are an infinite number of possibilities interpolation. but we haven't
- // have method to fix this case, so just use linear interpolation here.
- Quat ret = src * (1.0 - t) + dst *t;
- // taking the complement requires renormalisation
- ret.normalize();
- return ret;
- }
-#else
-
Quat to1;
real_t omega, cosom, sinom, scale0, scale1;
@@ -221,7 +179,6 @@ Quat Quat::slerp(const Quat &q, const real_t &t) const {
scale0 * y + scale1 * to1.y,
scale0 * z + scale1 * to1.z,
scale0 * w + scale1 * to1.w);
-#endif
}
Quat Quat::slerpni(const Quat &q, const real_t &t) const {
@@ -241,53 +198,6 @@ Quat Quat::slerpni(const Quat &q, const real_t &t) const {
invFactor * from.y + newFactor * q.y,
invFactor * from.z + newFactor * q.z,
invFactor * from.w + newFactor * q.w);
-
-#if 0
- real_t to1[4];
- real_t omega, cosom, sinom, scale0, scale1;
-
-
- // calc cosine
- cosom = x * q.x + y * q.y + z * q.z
- + w * q.w;
-
-
- // adjust signs (if necessary)
- if ( cosom <0.0 && false) {
- cosom = -cosom;to1[0] = - q.x;
- to1[1] = - q.y;
- to1[2] = - q.z;
- to1[3] = - q.w;
- } else {
- to1[0] = q.x;
- to1[1] = q.y;
- to1[2] = q.z;
- to1[3] = q.w;
- }
-
-
- // calculate coefficients
-
- if ( (1.0 - cosom) > CMP_EPSILON ) {
- // standard case (slerp)
- omega = Math::acos(cosom);
- sinom = Math::sin(omega);
- scale0 = Math::sin((1.0 - t) * omega) / sinom;
- scale1 = Math::sin(t * omega) / sinom;
- } else {
- // "from" and "to" quaternions are very close
- // ... so we can do a linear interpolation
- scale0 = 1.0 - t;
- scale1 = t;
- }
- // calculate final values
- return Quat(
- scale0 * x + scale1 * to1[0],
- scale0 * y + scale1 * to1[1],
- scale0 * z + scale1 * to1[2],
- scale0 * w + scale1 * to1[3]
- );
-#endif
}
Quat Quat::cubic_slerp(const Quat &q, const Quat &prep, const Quat &postq, const real_t &t) const {
diff --git a/core/math/quat.h b/core/math/quat.h
index 0e378eb4e4..9668f8c7a3 100644
--- a/core/math/quat.h
+++ b/core/math/quat.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/quick_hull.cpp b/core/math/quick_hull.cpp
index 54b97ac38c..e0137b6921 100644
--- a/core/math/quick_hull.cpp
+++ b/core/math/quick_hull.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -76,7 +76,7 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me
int simplex[4];
{
- real_t max, min;
+ real_t max = 0, min = 0;
for (int i = 0; i < p_points.size(); i++) {
@@ -99,7 +99,7 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me
//third vertex is one most further away from the line
{
- real_t maxd;
+ real_t maxd = 0;
Vector3 rel12 = p_points[simplex[0]] - p_points[simplex[1]];
for (int i = 0; i < p_points.size(); i++) {
@@ -121,7 +121,7 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me
//fourth vertex is the one most further away from the plane
{
- real_t maxd;
+ real_t maxd = 0;
Plane p(p_points[simplex[0]], p_points[simplex[1]], p_points[simplex[2]]);
for (int i = 0; i < p_points.size(); i++) {
@@ -389,8 +389,8 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me
for (int i = 0; i < f.indices.size(); i++) {
- uint32_t a = E->get().indices[i];
- uint32_t b = E->get().indices[(i + 1) % f.indices.size()];
+ int a = E->get().indices[i];
+ int b = E->get().indices[(i + 1) % f.indices.size()];
Edge e(a, b);
Map<Edge, RetFaceConnect>::Element *F = ret_edges.find(e);
diff --git a/core/math/quick_hull.h b/core/math/quick_hull.h
index 49600649e3..47ed22615b 100644
--- a/core/math/quick_hull.h
+++ b/core/math/quick_hull.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/rect3.cpp b/core/math/rect3.cpp
index 973607f565..6f01000f61 100644
--- a/core/math/rect3.cpp
+++ b/core/math/rect3.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/rect3.h b/core/math/rect3.h
index 4890a19d99..c3a2f5fbfb 100644
--- a/core/math/rect3.h
+++ b/core/math/rect3.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -189,8 +189,6 @@ Vector3 Rect3::get_endpoint(int p_point) const {
bool Rect3::intersects_convex_shape(const Plane *p_planes, int p_plane_count) const {
-#if 1
-
Vector3 half_extents = size * 0.5;
Vector3 ofs = position + half_extents;
@@ -206,42 +204,6 @@ bool Rect3::intersects_convex_shape(const Plane *p_planes, int p_plane_count) co
}
return true;
-#else
- //cache all points to check against!
- // #warning should be easy to optimize, just use the same as when taking the support and use only that point
- Vector3 points[8] = {
- Vector3(position.x, position.y, position.z),
- Vector3(position.x, position.y, position.z + size.z),
- Vector3(position.x, position.y + size.y, position.z),
- Vector3(position.x, position.y + size.y, position.z + size.z),
- Vector3(position.x + size.x, position.y, position.z),
- Vector3(position.x + size.x, position.y, position.z + size.z),
- Vector3(position.x + size.x, position.y + size.y, position.z),
- Vector3(position.x + size.x, position.y + size.y, position.z + size.z),
- };
-
- for (int i = 0; i < p_plane_count; i++) { //for each plane
-
- const Plane &plane = p_planes[i];
- bool all_points_over = true;
- //test if it has all points over!
-
- for (int j = 0; j < 8; j++) {
-
- if (!plane.is_point_over(points[j])) {
-
- all_points_over = false;
- break;
- }
- }
-
- if (all_points_over) {
-
- return false;
- }
- }
- return true;
-#endif
}
bool Rect3::has_point(const Vector3 &p_point) const {
diff --git a/core/math/transform.cpp b/core/math/transform.cpp
index 3a86fbfc6c..60df69a509 100644
--- a/core/math/transform.cpp
+++ b/core/math/transform.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/transform.h b/core/math/transform.h
index 48467f2ed7..566bf482a9 100644
--- a/core/math/transform.h
+++ b/core/math/transform.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -154,8 +154,7 @@ _FORCE_INLINE_ Plane Transform::xform_inv(const Plane &p_plane) const {
}
_FORCE_INLINE_ Rect3 Transform::xform(const Rect3 &p_aabb) const {
-/* define vertices */
-#if 1
+ /* define vertices */
Vector3 x = basis.get_axis(0) * p_aabb.size.x;
Vector3 y = basis.get_axis(1) * p_aabb.size.y;
Vector3 z = basis.get_axis(2) * p_aabb.size.z;
@@ -171,31 +170,8 @@ _FORCE_INLINE_ Rect3 Transform::xform(const Rect3 &p_aabb) const {
new_aabb.expand_to(pos + y + z);
new_aabb.expand_to(pos + x + y + z);
return new_aabb;
-#else
-
- Vector3 vertices[8] = {
- Vector3(p_aabb.position.x + p_aabb.size.x, p_aabb.position.y + p_aabb.size.y, p_aabb.position.z + p_aabb.size.z),
- Vector3(p_aabb.position.x + p_aabb.size.x, p_aabb.position.y + p_aabb.size.y, p_aabb.position.z),
- Vector3(p_aabb.position.x + p_aabb.size.x, p_aabb.position.y, p_aabb.position.z + p_aabb.size.z),
- Vector3(p_aabb.position.x + p_aabb.size.x, p_aabb.position.y, p_aabb.position.z),
- Vector3(p_aabb.position.x, p_aabb.position.y + p_aabb.size.y, p_aabb.position.z + p_aabb.size.z),
- Vector3(p_aabb.position.x, p_aabb.position.y + p_aabb.size.y, p_aabb.position.z),
- Vector3(p_aabb.position.x, p_aabb.position.y, p_aabb.position.z + p_aabb.size.z),
- Vector3(p_aabb.position.x, p_aabb.position.y, p_aabb.position.z)
- };
-
- AABB ret;
-
- ret.pos = xform(vertices[0]);
-
- for (int i = 1; i < 8; i++) {
-
- ret.expand_to(xform(vertices[i]));
- }
-
- return ret;
-#endif
}
+
_FORCE_INLINE_ Rect3 Transform::xform_inv(const Rect3 &p_aabb) const {
/* define vertices */
@@ -222,4 +198,4 @@ _FORCE_INLINE_ Rect3 Transform::xform_inv(const Rect3 &p_aabb) const {
return ret;
}
-#endif
+#endif // TRANSFORM_H
diff --git a/core/math/triangle_mesh.cpp b/core/math/triangle_mesh.cpp
index 1df3c8c298..614104f698 100644
--- a/core/math/triangle_mesh.cpp
+++ b/core/math/triangle_mesh.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/triangle_mesh.h b/core/math/triangle_mesh.h
index 166f10c577..2bf67fffcb 100644
--- a/core/math/triangle_mesh.h
+++ b/core/math/triangle_mesh.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/triangulate.cpp b/core/math/triangulate.cpp
index 4a5d0a078e..b20f2e06d5 100644
--- a/core/math/triangulate.cpp
+++ b/core/math/triangulate.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/triangulate.h b/core/math/triangulate.h
index 3f0ad00033..21e148249e 100644
--- a/core/math/triangulate.h
+++ b/core/math/triangulate.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/math/vector3.cpp b/core/math/vector3.cpp
index efffacb36e..144234f4d1 100644
--- a/core/math/vector3.cpp
+++ b/core/math/vector3.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -125,51 +125,6 @@ Vector3 Vector3::cubic_interpolate(const Vector3 &p_b, const Vector3 &p_pre_a, c
return out;
}
-#if 0
-Vector3 Vector3::cubic_interpolate(const Vector3& p_b,const Vector3& p_pre_a, const Vector3& p_post_b,real_t p_t) const {
-
- Vector3 p0=p_pre_a;
- Vector3 p1=*this;
- Vector3 p2=p_b;
- Vector3 p3=p_post_b;
-
- if (true) {
-
- real_t ab = p0.distance_to(p1);
- real_t bc = p1.distance_to(p2);
- real_t cd = p2.distance_to(p3);
-
- //if (ab>bc) {
- if (ab>0)
- p0 = p1+(p0-p1)*(bc/ab);
- //}
-
- //if (cd>bc) {
- if (cd>0)
- p3 = p2+(p3-p2)*(bc/cd);
- //}
- }
-
- real_t t = p_t;
- real_t t2 = t * t;
- real_t t3 = t2 * t;
-
- Vector3 out;
- out.x = 0.5 * ( ( 2.0 * p1.x ) +
- ( -p0.x + p2.x ) * t +
- ( 2.0 * p0.x - 5.0 * p1.x + 4 * p2.x - p3.x ) * t2 +
- ( -p0.x + 3.0 * p1.x - 3.0 * p2.x + p3.x ) * t3 );
- out.y = 0.5 * ( ( 2.0 * p1.y ) +
- ( -p0.y + p2.y ) * t +
- ( 2.0 * p0.y - 5.0 * p1.y + 4 * p2.y - p3.y ) * t2 +
- ( -p0.y + 3.0 * p1.y - 3.0 * p2.y + p3.y ) * t3 );
- out.z = 0.5 * ( ( 2.0 * p1.z ) +
- ( -p0.z + p2.z ) * t +
- ( 2.0 * p0.z - 5.0 * p1.z + 4 * p2.z - p3.z ) * t2 +
- ( -p0.z + 3.0 * p1.z - 3.0 * p2.z + p3.z ) * t3 );
- return out;
-}
-#endif
Vector3::operator String() const {
return (rtos(x) + ", " + rtos(y) + ", " + rtos(z));
diff --git a/core/math/vector3.h b/core/math/vector3.h
index c58a86fbdb..74c822fcd7 100644
--- a/core/math/vector3.h
+++ b/core/math/vector3.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/message_queue.cpp b/core/message_queue.cpp
index 564069d8bb..040fb69805 100644
--- a/core/message_queue.cpp
+++ b/core/message_queue.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -240,47 +240,6 @@ void MessageQueue::statistics() {
}
}
-bool MessageQueue::print() {
-#if 0
- uint32_t read_pos=0;
- while (read_pos < buffer_end ) {
- Message *message = (Message*)&buffer[ read_pos ];
-
- Object *target = ObjectDB::get_instance(message->instance_ID);
- String cname;
- String cfunc;
-
- if (target==NULL) {
- //object was deleted
- //WARN_PRINT("Object was deleted while awaiting a callback")
- //should it print a warning?
- } else if (message->notification>=0) {
-
- // messages don't expect a return value
- cfunc="notification # "+itos(message->notification);
- cname=target->get_type();
-
- } else if (!message->target.empty()) {
-
- cfunc="property: "+message->target;
- cname=target->get_type();
-
-
- } else if (message->target) {
-
- cfunc=String(message->target)+"()";
- cname=target->get_type();
- }
-
-
- read_pos+=sizeof(Message);
- if (message->type!=TYPE_NOTIFICATION)
- read_pos+=sizeof(Variant)*message->args;
- }
-#endif
- return false;
-}
-
int MessageQueue::get_max_buffer_usage() const {
return buffer_max_used;
diff --git a/core/message_queue.h b/core/message_queue.h
index 843ab17d94..193d2b6907 100644
--- a/core/message_queue.h
+++ b/core/message_queue.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -33,6 +33,7 @@
#include "object.h"
#include "os/mutex.h"
#include "os/thread_safe.h"
+
class MessageQueue {
_THREAD_SAFE_CLASS_
@@ -85,7 +86,6 @@ public:
Error push_notification(Object *p_object, int p_notification);
Error push_set(Object *p_object, const StringName &p_prop, const Variant &p_value);
- bool print();
void statistics();
void flush();
diff --git a/core/method_bind.cpp b/core/method_bind.cpp
index 6792b62703..8cace0bbaa 100644
--- a/core/method_bind.cpp
+++ b/core/method_bind.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -36,31 +36,16 @@
#ifdef DEBUG_METHODS_ENABLED
PropertyInfo MethodBind::get_argument_info(int p_argument) const {
- if (p_argument >= 0) {
+ ERR_FAIL_INDEX_V(p_argument, get_argument_count(), PropertyInfo());
- String name = p_argument < arg_names.size() ? String(arg_names[p_argument]) : String("arg" + itos(p_argument));
- PropertyInfo pi(get_argument_type(p_argument), name);
-
- if (!is_vararg() && pi.type == Variant::OBJECT) {
- StringName type_hint = arg_type_hints[p_argument];
-
- if (type_hint != StringName()) {
- pi.hint = PROPERTY_HINT_RESOURCE_TYPE;
- pi.hint_string = type_hint.operator String();
- }
- }
- return pi;
+ PropertyInfo info = _gen_argument_type_info(p_argument);
+ info.name = p_argument < arg_names.size() ? String(arg_names[p_argument]) : String("arg" + itos(p_argument));
+ return info;
+}
- } else {
+PropertyInfo MethodBind::get_return_info() const {
- Variant::Type at = get_argument_type(-1);
- if (at == Variant::OBJECT && ret_type)
- return PropertyInfo(at, "ret", PROPERTY_HINT_RESOURCE_TYPE, ret_type);
- else
- return PropertyInfo(at, "ret");
- }
-
- return PropertyInfo();
+ return _gen_argument_type_info(-1);
}
#endif
@@ -91,16 +76,6 @@ Vector<StringName> MethodBind::get_argument_names() const {
return arg_names;
}
-void MethodBind::set_argument_type_hints(const Vector<StringName> &p_type_hints) {
-
- arg_type_hints = p_type_hints;
-}
-
-Vector<StringName> MethodBind::get_argument_type_hints() const {
-
- return arg_type_hints;
-}
-
#endif
void MethodBind::set_default_arguments(const Vector<Variant> &p_defargs) {
@@ -114,18 +89,13 @@ void MethodBind::_generate_argument_types(int p_count) {
set_argument_count(p_count);
Variant::Type *argt = memnew_arr(Variant::Type, p_count + 1);
-
- arg_type_hints.resize(p_count);
-
argt[0] = _gen_argument_type(-1); // return type
- set_return_type(_gen_argument_type_hint(-1));
for (int i = 0; i < p_count; i++) {
argt[i + 1] = _gen_argument_type(i);
- arg_type_hints[i] = _gen_argument_type_hint(i);
}
- set_argument_types(argt);
+ argument_types = argt;
}
#endif
diff --git a/core/method_bind.h b/core/method_bind.h
index 157a67ca20..3c43f86b54 100644
--- a/core/method_bind.h
+++ b/core/method_bind.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -188,23 +188,22 @@ class MethodBind {
Vector<Variant> default_arguments;
int default_argument_count;
int argument_count;
-#ifdef DEBUG_METHODS_ENABLED
- Vector<StringName> arg_names;
- Vector<StringName> arg_type_hints;
- Variant::Type *argument_types;
- StringName ret_type;
-#endif
+
bool _const;
bool _returns;
protected:
+#ifdef DEBUG_METHODS_ENABLED
+ Variant::Type *argument_types;
+ Vector<StringName> arg_names;
+#endif
void _set_const(bool p_const);
void _set_returns(bool p_returns);
#ifdef DEBUG_METHODS_ENABLED
virtual Variant::Type _gen_argument_type(int p_arg) const = 0;
- virtual StringName _gen_argument_type_hint(int p_arg) const = 0;
+ virtual PropertyInfo _gen_argument_type_info(int p_arg) const = 0;
void _generate_argument_types(int p_count);
- void set_argument_types(Variant::Type *p_types) { argument_types = p_types; }
+
#endif
void set_argument_count(int p_count) { argument_count = p_count; }
@@ -234,9 +233,6 @@ public:
#ifdef DEBUG_METHODS_ENABLED
- _FORCE_INLINE_ void set_return_type(const StringName &p_type) { ret_type = p_type; }
- _FORCE_INLINE_ StringName get_return_type() const { return ret_type; }
-
_FORCE_INLINE_ Variant::Type get_argument_type(int p_argument) const {
ERR_FAIL_COND_V(p_argument < -1 || p_argument > argument_count, Variant::NIL);
@@ -244,12 +240,11 @@ public:
}
PropertyInfo get_argument_info(int p_argument) const;
+ PropertyInfo get_return_info() const;
- void set_argument_names(const Vector<StringName> &p_names);
+ void set_argument_names(const Vector<StringName> &p_names); //set by class, db, cant be inferred otherwise
Vector<StringName> get_argument_names() const;
- void set_argument_type_hints(const Vector<StringName> &p_type_hints);
- Vector<StringName> get_argument_type_hints() const;
#endif
void set_hint_flags(uint32_t p_hint) { hint_flags = p_hint; }
uint32_t get_hint_flags() const { return hint_flags | (is_const() ? METHOD_FLAG_CONST : 0) | (is_vararg() ? METHOD_FLAG_VARARG : 0); }
@@ -257,28 +252,6 @@ public:
_FORCE_INLINE_ int get_argument_count() const { return argument_count; };
-#if 0
- _FORCE_INLINE_ Variant call_safe(const Variant** p_args,int p_arg_count, Variant::CallError& r_error) {
-
- r_error.error=Variant::CallError::CALL_OK;
- check_call( p_args, &errorarg );
- if (!err)
- return call(p_object, VARIANT_ARG_PASS );
-
- VARIANT_ARGPTRS
- String errstr;
- String methodname = get_instance_type()+"::"+name;
- if (err==CALL_ERROR_ARGUMENT_TYPE) {
- errstr="Invalid Argument to call: '"+methodname+"'. Cannot convert argument "+itos(errorarg+1)+" from "+Variant::get_type_name(get_argument_type(errorarg))+" to "+Variant::get_type_name(argptr[errorarg]->get_type())+".";
- }
- if (err==CALL_ERROR_EXTRA_ARGUMENT) {
- errstr="Invalid call. Member function '"+methodname+"' takes "+itos(get_argument_count())+" argument, but argument "+itos(errorarg+1)+" was received.";
- }
-
- ERR_PRINT(errstr.ascii().get_data());
- return Variant();
- }
-#endif
virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Variant::CallError &r_error) = 0;
#ifdef PTRCALL_ENABLED
@@ -305,18 +278,36 @@ public:
protected:
NativeCall call_method;
+#ifdef DEBUG_METHODS_ENABLED
+ MethodInfo arguments;
+
+#endif
public:
- virtual Variant::Type _gen_argument_type(int p_arg) const {
+#ifdef DEBUG_METHODS_ENABLED
- return Variant::NIL;
+ virtual PropertyInfo _gen_argument_type_info(int p_arg) const {
+
+ if (p_arg < 0) {
+ return arguments.return_val;
+ } else if (p_arg < arguments.arguments.size()) {
+ return arguments.arguments[p_arg];
+ } else {
+ return PropertyInfo(Variant::NIL, "arg_" + itos(p_arg), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT);
+ }
+ }
+
+ virtual Variant::Type _gen_argument_type(int p_arg) const {
+ return _gen_argument_type_info(p_arg).type;
}
- virtual StringName _gen_argument_type_hint(int p_arg) const {
+#else
- return "Variant";
+ virtual Variant::Type _gen_argument_type(int p_arg) const {
+ return Variant::NIL;
}
+#endif
virtual Variant call(Object *p_object, const Variant **p_args, int p_arg_count, Variant::CallError &r_error) {
T *instance = static_cast<T *>(p_object);
@@ -341,7 +332,9 @@ public:
set_argument_names(names);
}
- set_argument_types(at);
+ argument_types = at;
+ arguments = p_info;
+ arguments.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
#endif
}
@@ -376,7 +369,7 @@ MethodBind *create_vararg_method_bind(Variant (T::*p_method)(const Variant **, i
// tale of an amazing hack.. //
-// if you declare an nonexistent class..
+// if you declare a nonexistent class..
class __UnexistingClass;
#include "method_bind.gen.inc"
diff --git a/core/method_ptrcall.h b/core/method_ptrcall.h
index d8755fd98b..2875eb912f 100644
--- a/core/method_ptrcall.h
+++ b/core/method_ptrcall.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/node_path.cpp b/core/node_path.cpp
index ad2eae859d..15f950f605 100644
--- a/core/node_path.cpp
+++ b/core/node_path.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/node_path.h b/core/node_path.h
index 31446ab9b4..eb5b9eb6cf 100644
--- a/core/node_path.h
+++ b/core/node_path.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/object.cpp b/core/object.cpp
index a43a9c85b1..23e32a214a 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -65,6 +65,7 @@ PropertyInfo::operator Dictionary() const {
Dictionary d;
d["name"] = name;
+ d["class_name"] = class_name;
d["type"] = type;
d["hint"] = hint;
d["hint_string"] = hint_string;
@@ -82,6 +83,9 @@ PropertyInfo PropertyInfo::from_dict(const Dictionary &p_dict) {
if (p_dict.has("name"))
pi.name = p_dict["name"];
+ if (p_dict.has("class_name"))
+ pi.class_name = p_dict["class_name"];
+
if (p_dict.has("hint"))
pi.hint = PropertyHint(int(p_dict["hint"]));
@@ -270,6 +274,63 @@ MethodInfo::MethodInfo(Variant::Type ret, const String &p_name, const PropertyIn
arguments.push_back(p_param5);
}
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name)
+ : name(p_name),
+ flags(METHOD_FLAG_NORMAL),
+ id(0) {
+ return_val = p_ret;
+}
+
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1)
+ : name(p_name),
+ flags(METHOD_FLAG_NORMAL),
+ id(0) {
+ return_val = p_ret;
+ arguments.push_back(p_param1);
+}
+
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2)
+ : name(p_name),
+ flags(METHOD_FLAG_NORMAL),
+ id(0) {
+ return_val = p_ret;
+ arguments.push_back(p_param1);
+ arguments.push_back(p_param2);
+}
+
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3)
+ : name(p_name),
+ flags(METHOD_FLAG_NORMAL),
+ id(0) {
+ return_val = p_ret;
+ arguments.push_back(p_param1);
+ arguments.push_back(p_param2);
+ arguments.push_back(p_param3);
+}
+
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4)
+ : name(p_name),
+ flags(METHOD_FLAG_NORMAL),
+ id(0) {
+ return_val = p_ret;
+ arguments.push_back(p_param1);
+ arguments.push_back(p_param2);
+ arguments.push_back(p_param3);
+ arguments.push_back(p_param4);
+}
+
+MethodInfo::MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5)
+ : name(p_name),
+ flags(METHOD_FLAG_NORMAL),
+ id(0) {
+ return_val = p_ret;
+ arguments.push_back(p_param1);
+ arguments.push_back(p_param2);
+ arguments.push_back(p_param3);
+ arguments.push_back(p_param4);
+ arguments.push_back(p_param5);
+}
+
Object::Connection::operator Variant() const {
Dictionary d;
@@ -338,35 +399,6 @@ void Object::get_valid_parents_static(List<String> *p_parents) {
}
void Object::_get_valid_parents_static(List<String> *p_parents) {
}
-#if 0
-//old style set, deprecated
-
-void Object::set(const String& p_name, const Variant& p_value) {
-
- _setv(p_name,p_value);
-
- /*
- if (!_use_builtin_script())
- return;
- */
-
- bool success;
- ClassDB::set_property(this,p_name,p_value,success);
- if (success) {
- return;
- }
-
- if (p_name=="__meta__") {
- metadata=p_value;
- } else if (p_name=="script") {
- set_script(p_value);
- } else if (script_instance) {
- script_instance->set(p_name,p_value);
- }
-
-
-}
-#endif
void Object::set(const StringName &p_name, const Variant &p_value, bool *r_valid) {
@@ -485,34 +517,6 @@ Variant Object::get(const StringName &p_name, bool *r_valid) const {
}
}
-#if 0
-//old style get, deprecated
-Variant Object::get(const String& p_name) const {
-
- Variant ret=_getv(p_name);
- if (ret.get_type()!=Variant::NIL)
- return ret;
-
- bool success;
- ClassDB::get_property(const_cast<Object*>(this),p_name,ret,success);
- if (success) {
- return ret;
- }
-
- if (p_name=="__meta__")
- return metadata;
- else if (p_name=="script")
- return script;
-
- if (script_instance) {
- return script_instance->get(p_name);
- }
-
- return Variant();
-
-}
-#endif
-
void Object::get_property_list(List<PropertyInfo> *p_list, bool p_reversed) const {
if (script_instance && p_reversed) {
@@ -592,22 +596,6 @@ Variant Object::_call_deferred_bind(const Variant **p_args, int p_argcount, Vari
return Variant();
}
-#if 0
-Variant Object::_call_bind(const StringName& p_name, const Variant& p_arg1, const Variant& p_arg2, const Variant& p_arg3, const Variant& p_arg4) {
-
- ERR_FAIL_COND_V(p_argcount<1,Variant());
-
- return call(p_name, p_arg1, p_arg2, p_arg3, p_arg4);
-};
-
-
-
-
-void Object::_call_deferred_bind(const StringName& p_name, const Variant& p_arg1, const Variant& p_arg2, const Variant& p_arg3, const Variant& p_arg4) {
-
- call_deferred(p_name, p_arg1, p_arg2, p_arg3, p_arg4);
-};
-#endif
#ifdef DEBUG_ENABLED
static bool _test_call_error(const StringName &p_func, const Variant::CallError &error) {
@@ -650,7 +638,7 @@ void Object::call_multilevel(const StringName &p_method, const Variant **p_args,
if (p_method == CoreStringNames::get_singleton()->_free) {
#ifdef DEBUG_ENABLED
- if (cast_to<Reference>()) {
+ if (Object::cast_to<Reference>(this)) {
ERR_EXPLAIN("Can't 'free' a reference.");
ERR_FAIL();
return;
@@ -760,54 +748,6 @@ Variant Object::callv(const StringName &p_method, const Array &p_args) {
}
Variant Object::call(const StringName &p_name, VARIANT_ARG_DECLARE) {
-#if 0
- if (p_name==CoreStringNames::get_singleton()->_free) {
-#ifdef DEBUG_ENABLED
- if (cast_to<Reference>()) {
- ERR_EXPLAIN("Can't 'free' a reference.");
- ERR_FAIL_V(Variant());
- }
-#endif
- //must be here, must be before everything,
- memdelete(this);
- return Variant();
- }
-
- VARIANT_ARGPTRS;
-
- int argc=0;
- for(int i=0;i<VARIANT_ARG_MAX;i++) {
- if (argptr[i]->get_type()==Variant::NIL)
- break;
- argc++;
- }
-
- Variant::CallError error;
-
- Variant ret;
-
- if (script_instance) {
- ret = script_instance->call(p_name,argptr,argc,error);
- if (_test_call_error(p_name,error))
- return ret;
- }
-
- MethodBind *method=ClassDB::get_method(get_type_name(),p_name);
-
- if (method) {
-
-
- Variant ret = method->call(this,argptr,argc,error);
- if (_test_call_error(p_name,error))
- return ret;
-
- return ret;
- } else {
-
- }
-
- return Variant();
-#else
VARIANT_ARGPTRS;
@@ -822,52 +762,9 @@ Variant Object::call(const StringName &p_name, VARIANT_ARG_DECLARE) {
Variant ret = call(p_name, argptr, argc, error);
return ret;
-
-#endif
}
void Object::call_multilevel(const StringName &p_name, VARIANT_ARG_DECLARE) {
-#if 0
- if (p_name==CoreStringNames::get_singleton()->_free) {
-#ifdef DEBUG_ENABLED
- if (cast_to<Reference>()) {
- ERR_EXPLAIN("Can't 'free' a reference.");
- ERR_FAIL();
- return;
- }
-#endif
- //must be here, must be before everything,
- memdelete(this);
- return;
- }
-
- VARIANT_ARGPTRS;
-
- int argc=0;
- for(int i=0;i<VARIANT_ARG_MAX;i++) {
- if (argptr[i]->get_type()==Variant::NIL)
- break;
- argc++;
- }
-
- Variant::CallError error;
-
- if (script_instance) {
- script_instance->call(p_name,argptr,argc,error);
- _test_call_error(p_name,error);
-
- }
-
- MethodBind *method=ClassDB::get_method(get_type_name(),p_name);
-
- if (method) {
-
- method->call(this,argptr,argc,error);
- _test_call_error(p_name,error);
-
- }
-
-#else
VARIANT_ARGPTRS;
@@ -880,8 +777,6 @@ void Object::call_multilevel(const StringName &p_name, VARIANT_ARG_DECLARE) {
//Variant::CallError error;
call_multilevel(p_name, argptr, argc);
-
-#endif
}
Variant Object::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
@@ -896,7 +791,7 @@ Variant Object::call(const StringName &p_method, const Variant **p_args, int p_a
r_error.error = Variant::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS;
return Variant();
}
- if (cast_to<Reference>()) {
+ if (Object::cast_to<Reference>(this)) {
r_error.argument = 0;
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
ERR_EXPLAIN("Can't 'free' a reference.");
@@ -1126,22 +1021,6 @@ struct _ObjectSignalDisconnectData {
StringName method;
};
-#if 0
-void Object::_emit_signal(const StringName& p_name,const Array& p_pargs){
-
- Variant args[VARIANT_ARG_MAX];
-
- int count = p_pargs.size();
-
- for(int i=0;i<count;i++) {
- args[i]=p_pargs[i];
- }
-
- emit_signal(p_name,VARIANT_ARGS_FROM_ARRAY(args));
-}
-
-#endif
-
Variant Object::_emit_signal(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
r_error.error = Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
@@ -1310,21 +1189,7 @@ void Object::_add_user_signal(const String &p_name, const Array &p_args) {
add_user_signal(mi);
}
-#if 0
-void Object::_emit_signal(const StringName& p_name,const Array& p_pargs){
-
- Variant args[VARIANT_ARG_MAX];
-
- int count = p_pargs.size();
-
- for(int i=0;i<count;i++) {
- args[i]=p_pargs[i];
- }
-
- emit_signal(p_name,VARIANT_ARGS_FROM_ARRAY(args));
-}
-#endif
Array Object::_get_signal_list() const {
List<MethodInfo> signal_list;
@@ -1338,6 +1203,7 @@ Array Object::_get_signal_list() const {
return ret;
}
+
Array Object::_get_signal_connection_list(const String &p_signal) const {
List<Connection> conns;
@@ -1468,7 +1334,7 @@ Error Object::connect(const StringName &p_signal, Object *p_to_object, const Str
Signal::Target target(p_to_object->get_instance_id(), p_to_method);
if (s->slot_map.has(target)) {
- ERR_EXPLAIN("Signal '" + p_signal + "'' already connected to given method '" + p_to_method + "' in that object.");
+ ERR_EXPLAIN("Signal '" + p_signal + "' is already connected to given method '" + p_to_method + "' in that object.");
ERR_FAIL_COND_V(s->slot_map.has(target), ERR_INVALID_PARAMETER);
}
@@ -1720,7 +1586,7 @@ void Object::_bind_methods() {
ADD_SIGNAL(MethodInfo("script_changed"));
BIND_VMETHOD(MethodInfo("_notification", PropertyInfo(Variant::INT, "what")));
- BIND_VMETHOD(MethodInfo("_set:bool", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::NIL, "value")));
+ BIND_VMETHOD(MethodInfo(Variant::BOOL, "_set", PropertyInfo(Variant::STRING, "property"), PropertyInfo(Variant::NIL, "value")));
#ifdef TOOLS_ENABLED
MethodInfo miget("_get", PropertyInfo(Variant::STRING, "property"));
miget.return_val.name = "Variant";
diff --git a/core/object.h b/core/object.h
index 8a858b5b00..6e1ed4308e 100644
--- a/core/object.h
+++ b/core/object.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -107,6 +107,8 @@ enum PropertyUsageFlags {
PROPERTY_USAGE_ANIMATE_AS_TRIGGER = 32768,
PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED = 65536,
PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE = 1 << 17,
+ PROPERTY_USAGE_CLASS_IS_ENUM = 1 << 18,
+ PROPERTY_USAGE_NIL_IS_VARIANT = 1 << 19,
PROPERTY_USAGE_DEFAULT = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK,
PROPERTY_USAGE_DEFAULT_INTL = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK | PROPERTY_USAGE_INTERNATIONALIZED,
@@ -126,6 +128,7 @@ struct PropertyInfo {
Variant::Type type;
String name;
+ StringName class_name; //for classes
PropertyHint hint;
String hint_string;
uint32_t usage;
@@ -145,13 +148,27 @@ struct PropertyInfo {
hint(PROPERTY_HINT_NONE),
usage(PROPERTY_USAGE_DEFAULT) {
}
- PropertyInfo(Variant::Type p_type, const String p_name, PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_string = "", uint32_t p_usage = PROPERTY_USAGE_DEFAULT)
+ PropertyInfo(Variant::Type p_type, const String p_name, PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_string = "", uint32_t p_usage = PROPERTY_USAGE_DEFAULT, const StringName &p_class_name = StringName())
: type(p_type),
name(p_name),
hint(p_hint),
hint_string(p_hint_string),
usage(p_usage) {
+
+ if (hint == PROPERTY_HINT_RESOURCE_TYPE) {
+ class_name = hint_string;
+ } else {
+ class_name = p_class_name;
+ }
}
+ PropertyInfo(const StringName &p_class_name)
+ : type(Variant::OBJECT),
+ hint(PROPERTY_HINT_NONE),
+ usage(PROPERTY_USAGE_DEFAULT) {
+
+ class_name = p_class_name;
+ }
+
bool operator<(const PropertyInfo &p_info) const {
return name < p_info.name;
}
@@ -168,6 +185,7 @@ struct MethodInfo {
uint32_t flags;
int id;
+ inline bool operator==(const MethodInfo &p_method) const { return id == p_method.id; }
inline bool operator<(const MethodInfo &p_method) const { return id == p_method.id ? (name < p_method.name) : (id < p_method.id); }
operator Dictionary() const;
@@ -187,6 +205,12 @@ struct MethodInfo {
MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3);
MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4);
MethodInfo(Variant::Type ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5);
+ MethodInfo(const PropertyInfo &p_ret, const String &p_name);
+ MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1);
+ MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2);
+ MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3);
+ MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4);
+ MethodInfo(const PropertyInfo &p_ret, const String &p_name, const PropertyInfo &p_param1, const PropertyInfo &p_param2, const PropertyInfo &p_param3, const PropertyInfo &p_param4, const PropertyInfo &p_param5);
};
// old cast_to
@@ -541,46 +565,46 @@ public:
void add_change_receptor(Object *p_receptor);
void remove_change_receptor(Object *p_receptor);
-// TODO: ensure 'this' is never NULL since it's UB, but by now, avoid warning flood
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wundefined-bool-conversion"
-#endif
-
template <class T>
- T *cast_to() {
-
+ static T *cast_to(Object *p_object) {
+#ifdef DEBUG_ENABLED
+ // TODO there are some legitimate reasons to pass NULL as p_object.
+ // we need to figure out how to deal with that in debug mode.
+ // This code will return NULL for a NULL input in release mode also.
+ ERR_FAIL_COND_V(p_object == NULL, NULL);
+#endif
#ifndef NO_SAFE_CAST
- return SAFE_CAST<T *>(this);
+ return dynamic_cast<T *>(p_object);
#else
- if (!this)
+ if (!p_object)
return NULL;
- if (is_class_ptr(T::get_class_ptr_static()))
- return static_cast<T *>(this);
+ if (p_object->is_class_ptr(T::get_class_ptr_static()))
+ return static_cast<T *>(p_object);
else
return NULL;
#endif
}
template <class T>
- const T *cast_to() const {
-
+ static const T *cast_to(const Object *p_object) {
+#ifdef DEBUG_ENABLED
+ // TODO there are some legitimate reasons to pass NULL as p_object.
+ // we need to figure out how to deal with that in debug mode.
+ // This code will return NULL for a NULL input in release mode also.
+ ERR_FAIL_COND_V(p_object == NULL, NULL);
+#endif
#ifndef NO_SAFE_CAST
- return SAFE_CAST<const T *>(this);
+ return dynamic_cast<const T *>(p_object);
#else
- if (!this)
+ if (!p_object)
return NULL;
- if (is_class_ptr(T::get_class_ptr_static()))
- return static_cast<const T *>(this);
+ if (p_object->is_class_ptr(T::get_class_ptr_static()))
+ return static_cast<const T *>(p_object);
else
return NULL;
#endif
}
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
-
enum {
NOTIFICATION_POSTINITIALIZE = 0,
diff --git a/core/ordered_hash_map.h b/core/ordered_hash_map.h
new file mode 100644
index 0000000000..3e619d2b2e
--- /dev/null
+++ b/core/ordered_hash_map.h
@@ -0,0 +1,315 @@
+/*************************************************************************/
+/* ordered_hash_map.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#ifndef ORDERED_HASH_MAP_H
+#define ORDERED_HASH_MAP_H
+
+#include "hash_map.h"
+#include "list.h"
+#include "pair.h"
+
+/**
+ * A hash map which allows to iterate elements in insertion order.
+ * Insertion, lookup, deletion have O(1) complexity.
+ * The API aims to be consistent with Map rather than HashMap, because the
+ * former is more frequently used and is more coherent with the rest of the
+ * codebase.
+ * Deletion during iteration is safe and will preserve the order.
+ */
+template <class K, class V, class Hasher = HashMapHasherDefault, class Comparator = HashMapComparatorDefault<K>, uint8_t MIN_HASH_TABLE_POWER = 3, uint8_t RELATIONSHIP = 8>
+class OrderedHashMap {
+ typedef List<Pair<const K *, V> > InternalList;
+ typedef HashMap<K, typename InternalList::Element *, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP> InternalMap;
+
+ InternalList list;
+ InternalMap map;
+
+public:
+ class Element {
+ friend class OrderedHashMap<K, V, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP>;
+
+ typename InternalList::Element *list_element;
+ typename InternalList::Element *next_element;
+ typename InternalList::Element *prev_element;
+
+ Element(typename InternalList::Element *p_element) {
+ list_element = p_element;
+
+ if (list_element) {
+ next_element = list_element->next();
+ prev_element = list_element->prev();
+ }
+ }
+
+ public:
+ _FORCE_INLINE_ Element()
+ : list_element(NULL), next_element(NULL), prev_element(NULL) {
+ }
+
+ Element next() const {
+ return Element(next_element);
+ }
+
+ Element prev() const {
+ return Element(prev_element);
+ }
+
+ Element(const Element &other)
+ : list_element(other.list_element),
+ prev_element(other.prev_element),
+ next_element(other.next_element) {
+ }
+
+ Element &operator=(const Element &other) {
+ list_element = other.list_element;
+ next_element = other.next_element;
+ prev_element = other.prev_element;
+ return *this;
+ }
+
+ friend bool operator==(const Element &, const Element &);
+ friend bool operator!=(const Element &, const Element &);
+
+ operator bool() const {
+ return (list_element != NULL);
+ }
+
+ const K &key() const {
+ CRASH_COND(!list_element);
+ return *(list_element->get().first);
+ };
+
+ V &value() {
+ CRASH_COND(!list_element);
+ return list_element->get().second;
+ };
+
+ const V &value() const {
+ CRASH_COND(!list_element);
+ return list_element->get().second;
+ };
+
+ V &get() {
+ CRASH_COND(!list_element);
+ return list_element->get().second;
+ };
+
+ const V &get() const {
+ CRASH_COND(!list_element);
+ return list_element->get().second;
+ };
+ };
+
+ class ConstElement {
+ friend class OrderedHashMap<K, V, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP>;
+
+ const typename InternalList::Element *list_element;
+
+ ConstElement(const typename InternalList::Element *p_element)
+ : list_element(p_element) {
+ }
+
+ public:
+ _FORCE_INLINE_ ConstElement()
+ : list_element(NULL) {
+ }
+
+ ConstElement(const ConstElement &other)
+ : list_element(other.list_element) {
+ }
+
+ ConstElement &operator=(const ConstElement &other) {
+ list_element = other.list_element;
+ return *this;
+ }
+
+ ConstElement next() const {
+ return ConstElement(list_element ? list_element->next() : NULL);
+ }
+
+ ConstElement prev() const {
+ return ConstElement(list_element ? list_element->prev() : NULL);
+ }
+
+ friend bool operator==(const ConstElement &, const ConstElement &);
+ friend bool operator!=(const ConstElement &, const ConstElement &);
+
+ operator bool() const {
+ return (list_element != NULL);
+ }
+
+ const K &key() const {
+ CRASH_COND(!list_element);
+ return *(list_element->get().first);
+ };
+
+ const V &value() const {
+ CRASH_COND(!list_element);
+ return list_element->get().second;
+ };
+
+ const V &get() const {
+ CRASH_COND(!list_element);
+ return list_element->get().second;
+ };
+ };
+
+ ConstElement find(const K &p_key) const {
+ typename InternalList::Element **list_element = map.getptr(p_key);
+ if (list_element) {
+ return ConstElement(*list_element);
+ }
+ return ConstElement(NULL);
+ }
+
+ Element find(const K &p_key) {
+ typename InternalList::Element **list_element = map.getptr(p_key);
+ if (list_element) {
+ return Element(*list_element);
+ }
+ return Element(NULL);
+ }
+
+ Element insert(const K &p_key, const V &p_value) {
+ typename InternalList::Element **list_element = map.getptr(p_key);
+ if (list_element) {
+ (*list_element)->get().second = p_value;
+ return Element(*list_element);
+ }
+ typename InternalList::Element *new_element = list.push_back(Pair<const K *, V>(NULL, p_value));
+ typename InternalMap::Element *e = map.set(p_key, new_element);
+ new_element->get().first = &e->key();
+
+ return Element(new_element);
+ }
+
+ void erase(Element &p_element) {
+ map.erase(p_element.key());
+ list.erase(p_element.list_element);
+ p_element.list_element = NULL;
+ }
+
+ bool erase(const K &p_key) {
+ typename InternalList::Element **list_element = map.getptr(p_key);
+ if (list_element) {
+ list.erase(*list_element);
+ map.erase(p_key);
+ return true;
+ }
+ return false;
+ }
+
+ inline bool has(const K &p_key) const {
+ return map.has(p_key);
+ }
+
+ const V &operator[](const K &p_key) const {
+ ConstElement e = find(p_key);
+ CRASH_COND(!e);
+ return e.value();
+ }
+
+ V &operator[](const K &p_key) {
+ Element e = find(p_key);
+ if (!e) {
+ // consistent with Map behaviour
+ e = insert(p_key, V());
+ }
+ return e.value();
+ }
+
+ inline Element front() {
+ return Element(list.front());
+ }
+
+ inline Element back() {
+ return Element(list.back());
+ }
+
+ inline ConstElement front() const {
+ return ConstElement(list.front());
+ }
+
+ inline ConstElement back() const {
+ return ConstElement(list.back());
+ }
+
+ inline bool empty() const { return list.empty(); }
+ inline int size() const { return list.size(); }
+
+ void clear() {
+ map.clear();
+ list.clear();
+ }
+
+private:
+ void _copy_from(const OrderedHashMap &p_map) {
+ for (ConstElement E = p_map.front(); E; E = E.next()) {
+ insert(E.key(), E.value());
+ }
+ }
+
+public:
+ void operator=(const OrderedHashMap &p_map) {
+ _copy_from(p_map);
+ }
+
+ OrderedHashMap(const OrderedHashMap &p_map) {
+ _copy_from(p_map);
+ }
+
+ _FORCE_INLINE_ OrderedHashMap() {
+ }
+};
+
+template <class K, class V, class Hasher, class Comparator, uint8_t MIN_HASH_TABLE_POWER, uint8_t RELATIONSHIP>
+bool operator==(const typename OrderedHashMap<K, V, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP>::Element &first,
+ const typename OrderedHashMap<K, V, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP>::Element &second) {
+ return (first.list_element == second.list_element);
+}
+
+template <class K, class V, class Hasher, class Comparator, uint8_t MIN_HASH_TABLE_POWER, uint8_t RELATIONSHIP>
+bool operator!=(const typename OrderedHashMap<K, V, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP>::Element &first,
+ const typename OrderedHashMap<K, V, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP>::Element &second) {
+ return (first.list_element != second.list_element);
+}
+
+template <class K, class V, class Hasher, class Comparator, uint8_t MIN_HASH_TABLE_POWER, uint8_t RELATIONSHIP>
+bool operator==(const typename OrderedHashMap<K, V, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP>::ConstElement &first,
+ const typename OrderedHashMap<K, V, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP>::ConstElement &second) {
+ return (first.list_element == second.list_element);
+}
+
+template <class K, class V, class Hasher, class Comparator, uint8_t MIN_HASH_TABLE_POWER, uint8_t RELATIONSHIP>
+bool operator!=(const typename OrderedHashMap<K, V, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP>::ConstElement &first,
+ const typename OrderedHashMap<K, V, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP>::ConstElement &second) {
+ return (first.list_element != second.list_element);
+}
+
+#endif // ORDERED_HASH_MAP_H \ No newline at end of file
diff --git a/core/os/copymem.h b/core/os/copymem.h
index 3ad2403f9c..789dce76e7 100644
--- a/core/os/copymem.h
+++ b/core/os/copymem.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp
index 391ae78c85..f24d6d16ca 100644
--- a/core/os/dir_access.cpp
+++ b/core/os/dir_access.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/dir_access.h b/core/os/dir_access.h
index 4bee229555..6ad8b4c49b 100644
--- a/core/os/dir_access.h
+++ b/core/os/dir_access.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp
index 9d1fefc925..b969b58bfb 100644
--- a/core/os/file_access.cpp
+++ b/core/os/file_access.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/file_access.h b/core/os/file_access.h
index beed7551fb..8393f0530b 100644
--- a/core/os/file_access.h
+++ b/core/os/file_access.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/input.cpp b/core/os/input.cpp
index 81ca31da25..65752662d7 100644
--- a/core/os/input.cpp
+++ b/core/os/input.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/input.h b/core/os/input.h
index 6759c624e3..f98b97e647 100644
--- a/core/os/input.h
+++ b/core/os/input.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp
index cb38eb67b6..88037859aa 100644
--- a/core/os/input_event.cpp
+++ b/core/os/input_event.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,11 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "input_event.h"
+
#include "input_map.h"
#include "os/keyboard.h"
-/**
- *
- */
void InputEvent::set_id(uint32_t p_id) {
id = p_id;
@@ -99,25 +97,6 @@ bool InputEvent::is_action_type() const {
return false;
}
-#if 0
-if (String(p_method) == "is_action" && p_argidx == 0) {
-
- List<PropertyInfo> pinfo;
- ProjectSettings::get_singleton()->get_property_list(&pinfo);
-
- for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
- const PropertyInfo &pi = E->get();
-
- if (!pi.name.begins_with("input/"))
- continue;
-
- String name = pi.name.substr(pi.name.find("/") + 1, pi.name.length());
- result.insert("\"" + name + "\"");
- }
-
-} else
-#endif
-
void InputEvent::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_id", "id"), &InputEvent::set_id);
@@ -483,6 +462,38 @@ bool InputEventMouseButton::action_match(const Ref<InputEvent> &p_event) const {
return mb->button_index == button_index;
}
+String InputEventMouseButton::as_text() const {
+
+ String button_index_string = "";
+ switch (get_button_index()) {
+ case BUTTON_LEFT:
+ button_index_string = "BUTTON_LEFT";
+ break;
+ case BUTTON_RIGHT:
+ button_index_string = "BUTTON_RIGHT";
+ break;
+ case BUTTON_MIDDLE:
+ button_index_string = "BUTTON_MIDDLE";
+ break;
+ case BUTTON_WHEEL_UP:
+ button_index_string = "BUTTON_WHEEL_UP";
+ break;
+ case BUTTON_WHEEL_DOWN:
+ button_index_string = "BUTTON_WHEEL_DOWN";
+ break;
+ case BUTTON_WHEEL_LEFT:
+ button_index_string = "BUTTON_WHEEL_LEFT";
+ break;
+ case BUTTON_WHEEL_RIGHT:
+ button_index_string = "BUTTON_WHEEL_RIGHT";
+ break;
+ default:
+ button_index_string = itos(get_button_index());
+ break;
+ }
+ return "InputEventMouseButton : button_index=" + button_index_string + ", pressed=" + (pressed ? "true" : "false") + ", position=(" + String(get_position()) + "), button_mask=" + itos(get_button_mask()) + ", doubleclick=" + (doubleclick ? "true" : "false");
+}
+
void InputEventMouseButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_factor", "factor"), &InputEventMouseButton::set_factor);
@@ -559,6 +570,26 @@ Ref<InputEvent> InputEventMouseMotion::xformed_by(const Transform2D &p_xform, co
return mm;
}
+String InputEventMouseMotion::as_text() const {
+
+ String button_mask_string = "";
+ switch (get_button_mask()) {
+ case BUTTON_MASK_LEFT:
+ button_mask_string = "BUTTON_MASK_LEFT";
+ break;
+ case BUTTON_MASK_MIDDLE:
+ button_mask_string = "BUTTON_MASK_MIDDLE";
+ break;
+ case BUTTON_MASK_RIGHT:
+ button_mask_string = "BUTTON_MASK_RIGHT";
+ break;
+ default:
+ button_mask_string = itos(get_button_mask());
+ break;
+ }
+ return "InputEventMouseMotion : button_mask=" + button_mask_string + ", position=(" + String(get_position()) + "), relative=(" + String(get_relative()) + "), speed=(" + String(get_speed()) + ")";
+}
+
void InputEventMouseMotion::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_relative", "relative"), &InputEventMouseMotion::set_relative);
@@ -609,6 +640,11 @@ bool InputEventJoypadMotion::action_match(const Ref<InputEvent> &p_event) const
return (axis == jm->axis && (axis_value < 0) == (jm->axis_value < 0));
}
+String InputEventJoypadMotion::as_text() const {
+
+ return "InputEventJoypadMotion : axis=" + itos(axis) + ", axis_value=" + String(Variant(axis_value));
+}
+
void InputEventJoypadMotion::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_axis", "axis"), &InputEventJoypadMotion::set_axis);
@@ -665,6 +701,11 @@ bool InputEventJoypadButton::action_match(const Ref<InputEvent> &p_event) const
return button_index == jb->button_index;
}
+String InputEventJoypadButton::as_text() const {
+
+ return "InputEventJoypadButton : button_index=" + itos(button_index) + ", pressed=" + (pressed ? "true" : "false") + ", pressure=" + String(Variant(pressure));
+}
+
void InputEventJoypadButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_button_index", "button_index"), &InputEventJoypadButton::set_button_index);
@@ -730,6 +771,11 @@ Ref<InputEvent> InputEventScreenTouch::xformed_by(const Transform2D &p_xform, co
return st;
}
+String InputEventScreenTouch::as_text() const {
+
+ return "InputEventScreenTouch : index=" + itos(index) + ", pressed=" + (pressed ? "true" : "false") + ", position=(" + String(get_position()) + ")";
+}
+
void InputEventScreenTouch::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_index", "index"), &InputEventScreenTouch::set_index);
@@ -808,6 +854,11 @@ Ref<InputEvent> InputEventScreenDrag::xformed_by(const Transform2D &p_xform, con
return sd;
}
+String InputEventScreenDrag::as_text() const {
+
+ return "InputEventScreenDrag : index=" + itos(index) + ", position=(" + String(get_position()) + "), relative=(" + String(get_relative()) + "), speed=(" + String(get_speed()) + ")";
+}
+
void InputEventScreenDrag::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_index", "index"), &InputEventScreenDrag::set_index);
@@ -857,6 +908,11 @@ bool InputEventAction::is_action(const StringName &p_action) const {
return action == p_action;
}
+String InputEventAction::as_text() const {
+
+ return "InputEventAction : action=" + action + ", pressed=(" + (pressed ? "true" : "false");
+}
+
void InputEventAction::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_action", "action"), &InputEventAction::set_action);
diff --git a/core/os/input_event.h b/core/os/input_event.h
index d1fd7cc90f..5dc0f91d5f 100644
--- a/core/os/input_event.h
+++ b/core/os/input_event.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -307,6 +307,7 @@ public:
virtual bool action_match(const Ref<InputEvent> &p_event) const;
virtual bool is_action_type() const { return true; }
+ virtual String as_text() const;
InputEventMouseButton();
};
@@ -328,6 +329,7 @@ public:
Vector2 get_speed() const;
virtual Ref<InputEvent> xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const;
+ virtual String as_text() const;
InputEventMouseMotion();
};
@@ -352,6 +354,7 @@ public:
virtual bool action_match(const Ref<InputEvent> &p_event) const;
virtual bool is_action_type() const { return true; }
+ virtual String as_text() const;
InputEventJoypadMotion();
};
@@ -378,6 +381,7 @@ public:
virtual bool action_match(const Ref<InputEvent> &p_event) const;
virtual bool is_action_type() const { return true; }
+ virtual String as_text() const;
InputEventJoypadButton();
};
@@ -402,6 +406,7 @@ public:
virtual bool is_pressed() const;
virtual Ref<InputEvent> xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const;
+ virtual String as_text() const;
InputEventScreenTouch();
};
@@ -431,6 +436,7 @@ public:
Vector2 get_speed() const;
virtual Ref<InputEvent> xformed_by(const Transform2D &p_xform, const Vector2 &p_local_ofs = Vector2()) const;
+ virtual String as_text() const;
InputEventScreenDrag();
};
@@ -455,6 +461,7 @@ public:
virtual bool is_action(const StringName &p_action) const;
virtual bool is_action_type() const { return true; }
+ virtual String as_text() const;
InputEventAction();
};
diff --git a/core/os/keyboard.cpp b/core/os/keyboard.cpp
index 9b3e376ea6..30e7d5e791 100644
--- a/core/os/keyboard.cpp
+++ b/core/os/keyboard.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/keyboard.h b/core/os/keyboard.h
index 1ef26de183..509ff23a93 100644
--- a/core/os/keyboard.h
+++ b/core/os/keyboard.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp
index 6d07e2a39c..b146d370f1 100644
--- a/core/os/main_loop.cpp
+++ b/core/os/main_loop.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/main_loop.h b/core/os/main_loop.h
index a0125ec13c..fd76d8454f 100644
--- a/core/os/main_loop.h
+++ b/core/os/main_loop.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/memory.cpp b/core/os/memory.cpp
index acc960acd9..74d5cbbea1 100644
--- a/core/os/memory.cpp
+++ b/core/os/memory.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/memory.h b/core/os/memory.h
index e1d7138ad5..f8b3da579b 100644
--- a/core/os/memory.h
+++ b/core/os/memory.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/mutex.cpp b/core/os/mutex.cpp
index 134d313bdf..d3edc2c423 100644
--- a/core/os/mutex.cpp
+++ b/core/os/mutex.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/mutex.h b/core/os/mutex.h
index 80a30b0b26..9e353df33d 100644
--- a/core/os/mutex.h
+++ b/core/os/mutex.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 3a06a3fa8f..764f7fe6e6 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -64,12 +64,13 @@ void OS::debug_break(){
void OS::print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type) {
- const char *err_type;
+ const char *err_type = "**ERROR**";
switch (p_type) {
case ERR_ERROR: err_type = "**ERROR**"; break;
case ERR_WARNING: err_type = "**WARNING**"; break;
case ERR_SCRIPT: err_type = "**SCRIPT ERROR**"; break;
case ERR_SHADER: err_type = "**SHADER ERROR**"; break;
+ default: ERR_PRINT("Unknown error type"); break;
}
if (p_rationale && *p_rationale)
@@ -171,7 +172,7 @@ static FileAccess *_OSPRF = NULL;
static void _OS_printres(Object *p_obj) {
- Resource *res = p_obj->cast_to<Resource>();
+ Resource *res = Object::cast_to<Resource>(p_obj);
if (!res)
return;
diff --git a/core/os/os.h b/core/os/os.h
index 0fcf465655..258708eea2 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/power.h b/core/os/power.h
index dbf4c75c59..59a091012e 100644
--- a/core/os/power.h
+++ b/core/os/power.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/rw_lock.cpp b/core/os/rw_lock.cpp
index 0427374de4..d0ad249afa 100644
--- a/core/os/rw_lock.cpp
+++ b/core/os/rw_lock.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/rw_lock.h b/core/os/rw_lock.h
index 253bd260ee..c13eb8147c 100644
--- a/core/os/rw_lock.h
+++ b/core/os/rw_lock.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/semaphore.cpp b/core/os/semaphore.cpp
index ce75186001..ea0a02ae22 100644
--- a/core/os/semaphore.cpp
+++ b/core/os/semaphore.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/semaphore.h b/core/os/semaphore.h
index f2be966979..c169e0212e 100644
--- a/core/os/semaphore.h
+++ b/core/os/semaphore.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/shell.cpp b/core/os/shell.cpp
index 9bf2d4466d..07e4924c38 100644
--- a/core/os/shell.cpp
+++ b/core/os/shell.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/shell.h b/core/os/shell.h
index 33044ee10e..7cb95dd5c8 100644
--- a/core/os/shell.h
+++ b/core/os/shell.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/thread.cpp b/core/os/thread.cpp
index bd565334c3..af8ae847dc 100644
--- a/core/os/thread.cpp
+++ b/core/os/thread.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/thread.h b/core/os/thread.h
index 1103f67ff2..697494708e 100644
--- a/core/os/thread.h
+++ b/core/os/thread.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/thread_dummy.cpp b/core/os/thread_dummy.cpp
index 88c111297d..39b5bdd9b8 100644
--- a/core/os/thread_dummy.cpp
+++ b/core/os/thread_dummy.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/thread_dummy.h b/core/os/thread_dummy.h
index 64941a71f8..56e7061eee 100644
--- a/core/os/thread_dummy.h
+++ b/core/os/thread_dummy.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/thread_safe.cpp b/core/os/thread_safe.cpp
index 486e072985..a49d412254 100644
--- a/core/os/thread_safe.cpp
+++ b/core/os/thread_safe.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/os/thread_safe.h b/core/os/thread_safe.h
index 0cecf33cc2..f9a1d0f62b 100644
--- a/core/os/thread_safe.h
+++ b/core/os/thread_safe.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/packed_data_container.cpp b/core/packed_data_container.cpp
index eb4aeb758a..ad8438e416 100644
--- a/core/packed_data_container.cpp
+++ b/core/packed_data_container.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -61,7 +61,7 @@ Variant PackedDataContainer::_iter_init_ofs(const Array &p_iter, uint32_t p_offs
Variant PackedDataContainer::_iter_next_ofs(const Array &p_iter, uint32_t p_offset) {
Array ref = p_iter;
- uint32_t size = _size(p_offset);
+ int size = _size(p_offset);
if (ref.size() != 1)
return false;
int pos = ref[0];
@@ -74,7 +74,7 @@ Variant PackedDataContainer::_iter_next_ofs(const Array &p_iter, uint32_t p_offs
Variant PackedDataContainer::_iter_get_ofs(const Variant &p_iter, uint32_t p_offset) {
- uint32_t size = _size(p_offset);
+ int size = _size(p_offset);
int pos = p_iter;
if (pos < 0 || pos >= size)
return Variant();
@@ -164,7 +164,7 @@ Variant PackedDataContainer::_key_at_ofs(uint32_t p_ofs, const Variant &p_key, b
if (p_key.is_num()) {
int idx = p_key;
- uint32_t len = decode_uint32(r + 4);
+ int len = decode_uint32(r + 4);
if (idx < 0 || idx >= len) {
err = true;
return Variant();
@@ -183,7 +183,7 @@ Variant PackedDataContainer::_key_at_ofs(uint32_t p_ofs, const Variant &p_key, b
uint32_t len = decode_uint32(r + 4);
bool found = false;
- for (int i = 0; i < len; i++) {
+ for (uint32_t i = 0; i < len; i++) {
uint32_t khash = decode_uint32(r + 8 + i * 12 + 0);
if (khash == hash) {
Variant key = _get_at_ofs(decode_uint32(r + 8 + i * 12 + 4), rd.ptr(), err);
diff --git a/core/packed_data_container.h b/core/packed_data_container.h
index bab994fc94..e6a674d7ce 100644
--- a/core/packed_data_container.h
+++ b/core/packed_data_container.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/pair.h b/core/pair.h
index d517339ddf..535c3355b6 100644
--- a/core/pair.h
+++ b/core/pair.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -44,6 +44,16 @@ struct Pair {
};
template <class F, class S>
+bool operator==(const Pair<F, S> &pair, const Pair<F, S> &other) {
+ return (pair.first == other.first) && (pair.second == other.second);
+}
+
+template <class F, class S>
+bool operator!=(const Pair<F, S> &pair, const Pair<F, S> &other) {
+ return (pair.first != other.first) || (pair.second != other.second);
+}
+
+template <class F, class S>
struct PairSort {
bool operator()(const Pair<F, S> &A, const Pair<F, S> &B) const {
diff --git a/core/path_remap.cpp b/core/path_remap.cpp
index c5961213e8..d8fa2748bc 100644
--- a/core/path_remap.cpp
+++ b/core/path_remap.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/path_remap.h b/core/path_remap.h
index 95249c6334..04da4c1510 100644
--- a/core/path_remap.h
+++ b/core/path_remap.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/pool_allocator.cpp b/core/pool_allocator.cpp
index d563925f3b..c5f6d0dde0 100644
--- a/core/pool_allocator.cpp
+++ b/core/pool_allocator.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -339,9 +339,9 @@ Error PoolAllocator::resize(ID p_mem, int p_new_size) {
ERR_FAIL_COND_V(e->lock, ERR_ALREADY_IN_USE);
}
- int alloc_size = aligned(p_new_size);
+ uint32_t alloc_size = aligned(p_new_size);
- if (aligned(e->len) == alloc_size) {
+ if ((uint32_t)aligned(e->len) == alloc_size) {
e->len = p_new_size;
mt_unlock();
@@ -374,7 +374,7 @@ Error PoolAllocator::resize(ID p_mem, int p_new_size) {
}
//no need to move stuff around, it fits before the next block
- int next_pos;
+ uint32_t next_pos;
if (entry_indices_pos + 1 == entry_count) {
next_pos = pool_size; // - static_area_size;
} else {
diff --git a/core/pool_allocator.h b/core/pool_allocator.h
index f62e410e66..12de4d58e8 100644
--- a/core/pool_allocator.h
+++ b/core/pool_allocator.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/print_string.cpp b/core/print_string.cpp
index 4a4c8093ca..92a04cbf0b 100644
--- a/core/print_string.cpp
+++ b/core/print_string.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/print_string.h b/core/print_string.h
index c4cd610856..9f8420c31a 100644
--- a/core/print_string.h
+++ b/core/print_string.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/project_settings.cpp b/core/project_settings.cpp
index 4a1b35ea4a..a74917162b 100644
--- a/core/project_settings.cpp
+++ b/core/project_settings.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* globals.cpp */
+/* project_settings.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -733,46 +733,6 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust
}
return OK;
-
-#if 0
- Error err = file->open(dst_file,FileAccess::WRITE);
- if (err) {
- memdelete(file);
- ERR_EXPLAIN("Couldn't save project.godot");
- ERR_FAIL_COND_V(err,err)
- }
-
-
- for(Map<String,List<String> >::Element *E=props.front();E;E=E->next()) {
-
- if (E!=props.front())
- file->store_string("\n");
-
- if (E->key()!="")
- file->store_string("["+E->key()+"]\n\n");
- for(List<String>::Element *F=E->get().front();F;F=F->next()) {
-
- String key = F->get();
- if (E->key()!="")
- key=E->key()+"/"+key;
- Variant value;
-
- if (p_custom.has(key))
- value=p_custom[key];
- else
- value = get(key);
-
- file->store_string(F->get()+"="+_encode_variant(value)+"\n");
-
- }
- }
-
- file->close();
- memdelete(file);
-
-
- return OK;
-#endif
}
Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default) {
diff --git a/core/project_settings.h b/core/project_settings.h
index cee3b3b5f3..718ab2a011 100644
--- a/core/project_settings.h
+++ b/core/project_settings.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* globals.h */
+/* project_settings.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/ref_ptr.cpp b/core/ref_ptr.cpp
index c2128fd45d..4a27b523fb 100644
--- a/core/ref_ptr.cpp
+++ b/core/ref_ptr.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -69,7 +69,7 @@ RID RefPtr::get_rid() const {
Ref<Reference> *ref = reinterpret_cast<Ref<Reference> *>(&data[0]);
if (ref->is_null())
return RID();
- Resource *res = (*ref)->cast_to<Resource>();
+ Resource *res = Object::cast_to<Resource>(ref->ptr());
if (res)
return res->get_rid();
return RID();
diff --git a/core/ref_ptr.h b/core/ref_ptr.h
index b76bbab7fa..bb98f0507a 100644
--- a/core/ref_ptr.h
+++ b/core/ref_ptr.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/reference.cpp b/core/reference.cpp
index e9629ee7c0..bb70628cbe 100644
--- a/core/reference.cpp
+++ b/core/reference.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -98,7 +98,7 @@ Variant WeakRef::get_ref() const {
Object *obj = ObjectDB::get_instance(ref);
if (!obj)
return Variant();
- Reference *r = obj->cast_to<Reference>();
+ Reference *r = cast_to<Reference>(obj);
if (r) {
return REF(r);
@@ -124,44 +124,3 @@ void WeakRef::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_ref"), &WeakRef::get_ref);
}
-#if 0
-
-Reference * RefBase::get_reference_from_ref(const RefBase &p_base) {
-
- return p_base.get_reference();
-}
-void RefBase::ref_inc(Reference *p_reference) {
-
- p_reference->refcount.ref();
-}
-bool RefBase::ref_dec(Reference *p_reference) {
-
- bool ref = p_reference->refcount.unref();
- return ref;
-}
-
-Reference *RefBase::first_ref(Reference *p_reference) {
-
- if (p_reference->refcount.ref()) {
-
- // this may fail in the scenario of two threads assigning the pointer for the FIRST TIME
- // at the same time, which is never likely to happen (would be crazy to do)
- // so don't do it.
-
- if (p_reference->refcount_init.get()>0) {
- p_reference->refcount_init.unref();
- p_reference->refcount.unref(); // first referencing is already 1, so compensate for the ref above
- }
-
- return p_reference;
- } else {
-
- return 0;
- }
-
-}
-char * RefBase::get_refptr_data(const RefPtr &p_refptr) const {
-
- return p_refptr.data;
-}
-#endif
diff --git a/core/reference.h b/core/reference.h
index 69250a4701..ca3ae60418 100644
--- a/core/reference.h
+++ b/core/reference.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -59,25 +59,10 @@ public:
~Reference();
};
-#if 0
-class RefBase {
-protected:
- void ref_inc(Reference *p_reference);
- bool ref_dec(Reference *p_reference);
- Reference *first_ref(Reference *p_reference);
- Reference * get_reference_from_ref(const RefBase &p_base);
- virtual Reference * get_reference() const=0;
- char * get_refptr_data(const RefPtr &p_refptr) const;
-public:
-
- virtual ~RefBase() {}
-};
-#endif
-
template <class T>
class Ref {
- T *reference;
+ T *reference = NULL;
void ref(const Ref &p_from) {
@@ -151,20 +136,10 @@ public:
return refptr;
};
-#if 0
- // go to RefPtr
- operator RefPtr() const {
-
- return get_ref_ptr();
- }
-#endif
-
-#if 1
operator Variant() const {
return Variant(get_ref_ptr());
}
-#endif
void operator=(const Ref &p_from) {
@@ -180,7 +155,7 @@ public:
return;
}
Ref r;
- r.reference = refb->cast_to<T>();
+ r.reference = Object::cast_to<T>(refb);
ref(r);
r.reference = NULL;
}
@@ -194,7 +169,7 @@ public:
return;
}
Ref r;
- r.reference = refb->cast_to<T>();
+ r.reference = Object::cast_to<T>(refb);
ref(r);
r.reference = NULL;
}
@@ -209,7 +184,7 @@ public:
return;
}
Ref r;
- r.reference = refb->cast_to<T>();
+ r.reference = Object::cast_to<T>(refb);
ref(r);
r.reference = NULL;
}
@@ -230,7 +205,7 @@ public:
return;
}
Ref r;
- r.reference = refb->cast_to<T>();
+ r.reference = Object::cast_to<T>(refb);
ref(r);
r.reference = NULL;
}
@@ -254,7 +229,7 @@ public:
return;
}
Ref r;
- r.reference = refb->cast_to<T>();
+ r.reference = Object::cast_to<T>(refb);
ref(r);
r.reference = NULL;
}
@@ -269,7 +244,7 @@ public:
return;
}
Ref r;
- r.reference = refb->cast_to<T>();
+ r.reference = Object::cast_to<T>(refb);
ref(r);
r.reference = NULL;
}
@@ -382,8 +357,8 @@ template <class T>
struct GetTypeInfo<Ref<T> > {
enum { VARIANT_TYPE = Variant::OBJECT };
- static inline StringName get_class_name() {
- return T::get_class_static();
+ static inline PropertyInfo get_class_info() {
+ return PropertyInfo(Variant::OBJECT, String(), PROPERTY_HINT_RESOURCE_TYPE, T::get_class_static());
}
};
@@ -391,8 +366,8 @@ template <class T>
struct GetTypeInfo<const Ref<T> &> {
enum { VARIANT_TYPE = Variant::OBJECT };
- static inline StringName get_class_name() {
- return T::get_class_static();
+ static inline PropertyInfo get_class_info() {
+ return PropertyInfo(Variant::OBJECT, String(), PROPERTY_HINT_RESOURCE_TYPE, T::get_class_static());
}
};
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index e5441093ac..27c31127a4 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/register_core_types.h b/core/register_core_types.h
index 794c45dff0..cf84d70930 100644
--- a/core/register_core_types.h
+++ b/core/register_core_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/resource.cpp b/core/resource.cpp
index a0b0fd24e1..37d42226b4 100644
--- a/core/resource.cpp
+++ b/core/resource.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/resource.h b/core/resource.h
index bbf233d53e..7dc3b67291 100644
--- a/core/resource.h
+++ b/core/resource.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/rid.cpp b/core/rid.cpp
index ca1d2be421..cb16715936 100644
--- a/core/rid.cpp
+++ b/core/rid.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/rid.h b/core/rid.h
index a93d7d912e..276375167e 100644
--- a/core/rid.h
+++ b/core/rid.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/ring_buffer.h b/core/ring_buffer.h
index 8b32bb5e10..6c882f1ef9 100644
--- a/core/ring_buffer.h
+++ b/core/ring_buffer.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/safe_refcount.cpp b/core/safe_refcount.cpp
index 971e9ad1d5..c330a983a7 100644
--- a/core/safe_refcount.cpp
+++ b/core/safe_refcount.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/safe_refcount.h b/core/safe_refcount.h
index ed0620c777..802d84cccc 100644
--- a/core/safe_refcount.h
+++ b/core/safe_refcount.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/script_debugger_local.cpp b/core/script_debugger_local.cpp
index d2ccf495ae..c2632da38b 100644
--- a/core/script_debugger_local.cpp
+++ b/core/script_debugger_local.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/script_debugger_local.h b/core/script_debugger_local.h
index d32edb503b..097c7c41f3 100644
--- a/core/script_debugger_local.h
+++ b/core/script_debugger_local.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp
index 9e4f4380c9..8875732b8e 100644
--- a/core/script_debugger_remote.cpp
+++ b/core/script_debugger_remote.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/script_debugger_remote.h b/core/script_debugger_remote.h
index cf75c0eb4a..b1ef88b812 100644
--- a/core/script_debugger_remote.h
+++ b/core/script_debugger_remote.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/script_language.cpp b/core/script_language.cpp
index 4664049145..bde80a30bc 100644
--- a/core/script_language.cpp
+++ b/core/script_language.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -54,6 +54,11 @@ void Script::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_source_code"), &Script::get_source_code);
ClassDB::bind_method(D_METHOD("set_source_code", "source"), &Script::set_source_code);
ClassDB::bind_method(D_METHOD("reload", "keep_state"), &Script::reload, DEFVAL(false));
+
+ 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 7aba3ec0f1..342d8c8072 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -207,7 +207,7 @@ public:
virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const = 0;
virtual Error open_in_external_editor(const Ref<Script> &p_script, int p_line, int p_col) { return ERR_UNAVAILABLE; }
- virtual 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; }
+ virtual Error complete_code(const String &p_code, const String &p_base_path, Object *p_owner, List<String> *r_options, bool &r_force, String &r_call_hint) { return ERR_UNAVAILABLE; }
struct LookupResult {
enum Type {
diff --git a/core/self_list.h b/core/self_list.h
index e229d5bf8e..053ab40162 100644
--- a/core/self_list.h
+++ b/core/self_list.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/set.h b/core/set.h
index 6e6f07508c..317e180869 100644
--- a/core/set.h
+++ b/core/set.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/simple_type.h b/core/simple_type.h
index b4a6dd1fa8..96e79966e0 100644
--- a/core/simple_type.h
+++ b/core/simple_type.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/sort.h b/core/sort.h
index 06c427f61e..a5e23f53df 100644
--- a/core/sort.h
+++ b/core/sort.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/string_db.cpp b/core/string_db.cpp
index c61fbba9b5..ef38491a6b 100644
--- a/core/string_db.cpp
+++ b/core/string_db.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/string_db.h b/core/string_db.h
index 18af9fb3a7..2bef29fab8 100644
--- a/core/string_db.h
+++ b/core/string_db.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/translation.cpp b/core/translation.cpp
index c38d5d8b4d..f1f9c72b85 100644
--- a/core/translation.cpp
+++ b/core/translation.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/translation.h b/core/translation.h
index 8630b8a478..cf59583ad6 100644
--- a/core/translation.h
+++ b/core/translation.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/type_info.h b/core/type_info.h
index 0603126996..da6047450c 100644
--- a/core/type_info.h
+++ b/core/type_info.h
@@ -41,9 +41,9 @@ template <class T, typename = void>
struct GetTypeInfo {
enum { VARIANT_TYPE = Variant::NIL };
- static inline StringName get_class_name() {
+ static inline PropertyInfo get_class_info() {
ERR_PRINT("GetTypeInfo fallback. Bug!");
- return StringName(); // Not "Nil", this is an error
+ return PropertyInfo(); // Not "Nil", this is an error
}
};
@@ -51,15 +51,15 @@ struct GetTypeInfo {
template <> \
struct GetTypeInfo<m_type> { \
enum { VARIANT_TYPE = m_var_type }; \
- static inline StringName get_class_name() { \
- return Variant::get_type_name((Variant::Type)VARIANT_TYPE); \
+ static inline PropertyInfo get_class_info() { \
+ return PropertyInfo((Variant::Type)VARIANT_TYPE, String()); \
} \
}; \
template <> \
struct GetTypeInfo<const m_type &> { \
enum { VARIANT_TYPE = m_var_type }; \
- static inline StringName get_class_name() { \
- return Variant::get_type_name((Variant::Type)VARIANT_TYPE); \
+ static inline PropertyInfo get_class_info() { \
+ return PropertyInfo((Variant::Type)VARIANT_TYPE, String()); \
} \
};
@@ -105,38 +105,52 @@ MAKE_TYPE_INFO(IP_Address, Variant::STRING)
class BSP_Tree;
MAKE_TYPE_INFO(BSP_Tree, Variant::DICTIONARY)
-#define MAKE_TYPE_INFO_WITH_NAME(m_type, m_var_type, m_class_name) \
- template <> \
- struct GetTypeInfo<m_type> { \
- enum { VARIANT_TYPE = m_var_type }; \
- static inline StringName get_class_name() { \
- return m_class_name; \
- } \
- }; \
- template <> \
- struct GetTypeInfo<const m_type &> { \
- enum { VARIANT_TYPE = m_var_type }; \
- static inline StringName get_class_name() { \
- return m_class_name; \
- } \
- };
+//for RefPtr
+template <>
+struct GetTypeInfo<RefPtr> {
+ enum { VARIANT_TYPE = Variant::OBJECT };
+ static inline PropertyInfo get_class_info() {
+ return PropertyInfo(Variant::OBJECT, String(), PROPERTY_HINT_RESOURCE_TYPE, "Reference");
+ }
+};
+template <>
+struct GetTypeInfo<const RefPtr &> {
+ enum { VARIANT_TYPE = Variant::OBJECT };
+ static inline PropertyInfo get_class_info() {
+ return PropertyInfo(Variant::OBJECT, String(), PROPERTY_HINT_RESOURCE_TYPE, "Reference");
+ }
+};
-MAKE_TYPE_INFO_WITH_NAME(RefPtr, Variant::OBJECT, "Reference")
-MAKE_TYPE_INFO_WITH_NAME(Variant, Variant::NIL, "Variant")
+//for variant
+template <>
+struct GetTypeInfo<Variant> {
+ enum { VARIANT_TYPE = Variant::NIL };
+ static inline PropertyInfo get_class_info() {
+ return PropertyInfo(Variant::NIL, String(), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT);
+ }
+};
+
+template <>
+struct GetTypeInfo<const Variant &> {
+ enum { VARIANT_TYPE = Variant::NIL };
+ static inline PropertyInfo get_class_info() {
+ return PropertyInfo(Variant::NIL, String(), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_NIL_IS_VARIANT);
+ }
+};
#define MAKE_TEMPLATE_TYPE_INFO(m_template, m_type, m_var_type) \
template <> \
struct GetTypeInfo<m_template<m_type> > { \
enum { VARIANT_TYPE = m_var_type }; \
- static inline StringName get_class_name() { \
- return Variant::get_type_name((Variant::Type)VARIANT_TYPE); \
+ static inline PropertyInfo get_class_info() { \
+ return PropertyInfo((Variant::Type)VARIANT_TYPE, String()); \
} \
}; \
template <> \
struct GetTypeInfo<const m_template<m_type> &> { \
enum { VARIANT_TYPE = m_var_type }; \
- static inline StringName get_class_name() { \
- return Variant::get_type_name((Variant::Type)VARIANT_TYPE); \
+ static inline PropertyInfo get_class_info() { \
+ return PropertyInfo((Variant::Type)VARIANT_TYPE, String()); \
} \
};
@@ -159,8 +173,8 @@ template <typename T>
struct GetTypeInfo<T *, typename EnableIf<TypeInherits<Object, T>::value>::type> {
enum { VARIANT_TYPE = Variant::OBJECT };
- static inline StringName get_class_name() {
- return T::get_class_static();
+ static inline PropertyInfo get_class_info() {
+ return PropertyInfo(StringName(T::get_class_static()));
}
};
@@ -168,16 +182,18 @@ template <typename T>
struct GetTypeInfo<const T *, typename EnableIf<TypeInherits<Object, T>::value>::type> {
enum { VARIANT_TYPE = Variant::OBJECT };
- static inline StringName get_class_name() {
- return T::get_class_static();
+ static inline PropertyInfo get_class_info() {
+ return PropertyInfo(StringName(T::get_class_static()));
}
};
-#define TEMPL_MAKE_ENUM_TYPE_INFO(m_enum, m_impl) \
- template <> \
- struct GetTypeInfo<m_impl> { \
- enum { VARIANT_TYPE = Variant::INT }; \
- static inline StringName get_class_name() { return "enum." #m_enum; } \
+#define TEMPL_MAKE_ENUM_TYPE_INFO(m_enum, m_impl) \
+ template <> \
+ struct GetTypeInfo<m_impl> { \
+ enum { VARIANT_TYPE = Variant::INT }; \
+ static inline PropertyInfo get_class_info() { \
+ return PropertyInfo(Variant::INT, String(), PROPERTY_HINT_NONE, String(), PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_CLASS_IS_ENUM, String(#m_enum).replace("::", ".")); \
+ } \
};
#define MAKE_ENUM_TYPE_INFO(m_enum) \
@@ -190,12 +206,18 @@ template <typename T>
inline StringName __constant_get_enum_name(T param, const String &p_constant) {
if (GetTypeInfo<T>::VARIANT_TYPE == Variant::NIL)
ERR_PRINTS("Missing VARIANT_ENUM_CAST for constant's enum: " + p_constant);
- return GetTypeInfo<T>::get_class_name();
+ return GetTypeInfo<T>::get_class_info().class_name;
}
+#define CLASS_INFO(m_type) \
+ (GetTypeInfo<m_type *>::VARIANT_TYPE != Variant::NIL ? \
+ GetTypeInfo<m_type *>::get_class_info() : \
+ GetTypeInfo<m_type>::get_class_info())
+
#else
#define MAKE_ENUM_TYPE_INFO(m_enum)
+#define CLASS_INFO(m_type)
#endif // DEBUG_METHODS_ENABLED
diff --git a/core/typedefs.h b/core/typedefs.h
index 34a1a93a3b..565e28020b 100644
--- a/core/typedefs.h
+++ b/core/typedefs.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/ucaps.h b/core/ucaps.h
index cd4a581a49..f6c42f37d6 100644
--- a/core/ucaps.h
+++ b/core/ucaps.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp
index bb70146396..4760047959 100644
--- a/core/undo_redo.cpp
+++ b/core/undo_redo.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -111,8 +111,8 @@ void UndoRedo::add_do_method(Object *p_object, const String &p_method, VARIANT_A
ERR_FAIL_COND((current_action + 1) >= actions.size());
Operation do_op;
do_op.object = p_object->get_instance_id();
- if (p_object->cast_to<Resource>())
- do_op.resref = Ref<Resource>(p_object->cast_to<Resource>());
+ if (Object::cast_to<Resource>(p_object))
+ do_op.resref = Ref<Resource>(Object::cast_to<Resource>(p_object));
do_op.type = Operation::TYPE_METHOD;
do_op.name = p_method;
@@ -135,8 +135,8 @@ void UndoRedo::add_undo_method(Object *p_object, const String &p_method, VARIANT
Operation undo_op;
undo_op.object = p_object->get_instance_id();
- if (p_object->cast_to<Resource>())
- undo_op.resref = Ref<Resource>(p_object->cast_to<Resource>());
+ if (Object::cast_to<Resource>(p_object))
+ undo_op.resref = Ref<Resource>(Object::cast_to<Resource>(p_object));
undo_op.type = Operation::TYPE_METHOD;
undo_op.name = p_method;
@@ -152,8 +152,8 @@ void UndoRedo::add_do_property(Object *p_object, const String &p_property, const
ERR_FAIL_COND((current_action + 1) >= actions.size());
Operation do_op;
do_op.object = p_object->get_instance_id();
- if (p_object->cast_to<Resource>())
- do_op.resref = Ref<Resource>(p_object->cast_to<Resource>());
+ if (Object::cast_to<Resource>(p_object))
+ do_op.resref = Ref<Resource>(Object::cast_to<Resource>(p_object));
do_op.type = Operation::TYPE_PROPERTY;
do_op.name = p_property;
@@ -171,8 +171,8 @@ void UndoRedo::add_undo_property(Object *p_object, const String &p_property, con
Operation undo_op;
undo_op.object = p_object->get_instance_id();
- if (p_object->cast_to<Resource>())
- undo_op.resref = Ref<Resource>(p_object->cast_to<Resource>());
+ if (Object::cast_to<Resource>(p_object))
+ undo_op.resref = Ref<Resource>(Object::cast_to<Resource>(p_object));
undo_op.type = Operation::TYPE_PROPERTY;
undo_op.name = p_property;
@@ -185,8 +185,8 @@ void UndoRedo::add_do_reference(Object *p_object) {
ERR_FAIL_COND((current_action + 1) >= actions.size());
Operation do_op;
do_op.object = p_object->get_instance_id();
- if (p_object->cast_to<Resource>())
- do_op.resref = Ref<Resource>(p_object->cast_to<Resource>());
+ if (Object::cast_to<Resource>(p_object))
+ do_op.resref = Ref<Resource>(Object::cast_to<Resource>(p_object));
do_op.type = Operation::TYPE_REFERENCE;
actions[current_action + 1].do_ops.push_back(do_op);
@@ -202,8 +202,8 @@ void UndoRedo::add_undo_reference(Object *p_object) {
Operation undo_op;
undo_op.object = p_object->get_instance_id();
- if (p_object->cast_to<Resource>())
- undo_op.resref = Ref<Resource>(p_object->cast_to<Resource>());
+ if (Object::cast_to<Resource>(p_object))
+ undo_op.resref = Ref<Resource>(Object::cast_to<Resource>(p_object));
undo_op.type = Operation::TYPE_REFERENCE;
actions[current_action + 1].undo_ops.push_back(undo_op);
@@ -270,7 +270,7 @@ void UndoRedo::_process_operation_list(List<Operation>::Element *E) {
obj->call(op.name, VARIANT_ARGS_FROM_ARRAY(op.args));
#ifdef TOOLS_ENABLED
- Resource *res = obj->cast_to<Resource>();
+ Resource *res = Object::cast_to<Resource>(obj);
if (res)
res->set_edited(true);
@@ -284,7 +284,7 @@ void UndoRedo::_process_operation_list(List<Operation>::Element *E) {
obj->set(op.name, op.args[0]);
#ifdef TOOLS_ENABLED
- Resource *res = obj->cast_to<Resource>();
+ Resource *res = Object::cast_to<Resource>(obj);
if (res)
res->set_edited(true);
#endif
diff --git a/core/undo_redo.h b/core/undo_redo.h
index 5b79f957da..84133c4eea 100644
--- a/core/undo_redo.h
+++ b/core/undo_redo.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/ustring.cpp b/core/ustring.cpp
index 0521966943..8273ed144b 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -588,7 +588,7 @@ String String::camelcase_to_underscore(bool lowercase) const {
const char a = 'a', z = 'z';
int start_index = 0;
- for (size_t i = 1; i < this->size(); i++) {
+ for (int i = 1; i < this->size(); i++) {
bool is_upper = cstr[i] >= A && cstr[i] <= Z;
bool is_number = cstr[i] >= '0' && cstr[i] <= '9';
bool are_next_2_lower = false;
@@ -1252,66 +1252,7 @@ String String::utf8(const char *p_utf8, int p_len) {
return ret;
};
-#if 0
-_FORCE_INLINE static int parse_utf8_char(const char *p_utf8,unsigned int *p_ucs4,int p_left) { //return len
-
-
- int len=0;
-
-/* Determine the number of characters in sequence */
- if ((*p_utf8 & 0x80)==0)
- len=1;
- else if ((*p_utf8 & 0xE0)==0xC0)
- len=2;
- else if ((*p_utf8 & 0xF0)==0xE0)
- len=3;
- else if ((*p_utf8 & 0xF8)==0xF0)
- len=4;
- else if ((*p_utf8 & 0xFC)==0xF8)
- len=5;
- else if ((*p_utf8 & 0xFE)==0xFC)
- len=6;
- else
- return -1; //invalid UTF8
-
- if (len>p_left)
- return -1; //not enough space
-
- if (len==2 && (*p_utf8&0x1E)==0) {
- //printf("overlong rejected\n");
- return -1; //reject overlong
- }
-
- /* Convert the first character */
-
- unsigned int unichar=0;
-
- if (len == 1)
- unichar=*p_utf8;
- else {
-
- unichar=(0xFF >> (len +1)) & *p_utf8;
- for (int i=1;i<len;i++) {
-
- if ((p_utf8[i] & 0xC0) != 0x80) {
- //printf("invalid utf8\n");
- return -1; //invalid utf8
- }
- if (unichar==0 && i==2 && ((p_utf8[i] & 0x7F) >> (7 - len)) == 0) {
- //printf("no overlong\n");
- return -1; //no overlong
- }
- unichar = (unichar << 6) | (p_utf8[i] & 0x3F);
- }
- }
-
- *p_ucs4=unichar;
-
- return len;
-
-}
-#endif
bool String::parse_utf8(const char *p_utf8, int p_len) {
#define _UNICERROR(m_err) print_line("unicode error: " + String(m_err));
@@ -1998,94 +1939,6 @@ double String::to_double(const char *p_str) {
#else
return built_in_strtod<char>(p_str);
#endif
-#if 0
-#if 0
-
-
- return atof(p_str);
-#else
- if (!p_str[0])
- return 0;
-///@todo make more exact so saving and loading does not lose precision
-
- double integer=0;
- double decimal=0;
- double decimal_mult=0.1;
- double sign=1.0;
- double exp=0;
- double exp_sign=1.0;
- int reading=READING_SIGN;
-
- const char *str=p_str;
-
- while(*str && reading!=READING_DONE) {
-
- CharType c=*(str++);
- switch(reading) {
- case READING_SIGN: {
- if (c>='0' && c<='9')
- reading=READING_INT;
- // let it fallthrough
- else if (c=='-') {
- sign=-1.0;
- reading=READING_INT;
- break;
- } else if (c=='.') {
- reading=READING_DEC;
- break;
- } else {
- break;
- }
- }
- case READING_INT: {
-
- if (c>='0' && c<='9') {
-
- integer*=10;
- integer+=c-'0';
- } else if (c=='.') {
- reading=READING_DEC;
- } else if (c=='e') {
- reading=READING_EXP;
- } else {
- reading=READING_DONE;
- }
-
- } break;
- case READING_DEC: {
-
- if (c>='0' && c<='9') {
-
- decimal+=(c-'0')*decimal_mult;
- decimal_mult*=0.1;
- } else if (c=='e') {
- reading=READING_EXP;
- } else {
- reading=READING_DONE;
- }
-
- } break;
- case READING_EXP: {
-
- if (c>='0' && c<='9') {
-
- exp*=10.0;
- exp+=(c-'0');
- } else if (c=='-' && exp==0) {
- exp_sign=-1.0;
- } else if (exp_sign>=0 && c=='+') {
- //redundant...
- exp_sign=1.0;
- } else {
- reading=READING_DONE;
- }
- } break;
- }
- }
-
- return sign*(integer+decimal)*Math::pow(10,exp_sign*exp);
-#endif
-#endif
}
float String::to_float() const {
@@ -2096,100 +1949,6 @@ float String::to_float() const {
double String::to_double(const CharType *p_str, const CharType **r_end) {
return built_in_strtod<CharType>(p_str, (CharType **)r_end);
-#if 0
-#if 0
- //ndef NO_USE_STDLIB
- return wcstod(p_str,p_len<0?NULL:p_str+p_len);
-#else
- if (p_len==0 || !p_str[0])
- return 0;
-///@todo make more exact so saving and loading does not lose precision
-
- double integer=0;
- double decimal=0;
- double decimal_mult=0.1;
- double sign=1.0;
- double exp=0;
- double exp_sign=1.0;
- int reading=READING_SIGN;
-
- const CharType *str=p_str;
- const CharType *limit=&p_str[p_len];
-
- while(reading!=READING_DONE && str!=limit) {
-
- CharType c=*(str++);
- switch(reading) {
- case READING_SIGN: {
- if (c>='0' && c<='9')
- reading=READING_INT;
- // let it fallthrough
- else if (c=='-') {
- sign=-1.0;
- reading=READING_INT;
- break;
- } else if (c=='.') {
- reading=READING_DEC;
- break;
- } else if (c==0) {
- reading=READING_DONE;
- break;
- } else {
- break;
- }
- }
- case READING_INT: {
-
- if (c>='0' && c<='9') {
-
- integer*=10;
- integer+=c-'0';
- } else if (c=='.') {
- reading=READING_DEC;
- } else if (c=='e' || c=='E') {
- reading=READING_EXP;
- } else {
- reading=READING_DONE;
- }
-
- } break;
- case READING_DEC: {
-
- if (c>='0' && c<='9') {
-
- decimal+=(c-'0')*decimal_mult;
- decimal_mult*=0.1;
- } else if (c=='e' || c=='E') {
- reading=READING_EXP;
- } else {
- reading=READING_DONE;
- }
-
- } break;
- case READING_EXP: {
-
- if (c>='0' && c<='9') {
-
- exp*=10.0;
- exp+=(c-'0');
- } else if (c=='-' && exp==0) {
- exp_sign=-1.0;
- } else if (exp_sign>=0 && c=='+') {
- //redundant...
- exp_sign=1.0;
- } else {
- reading=READING_DONE;
- }
- } break;
- }
- }
-
- if (r_end)
- *r_end=str-1;
-
- return sign*(integer+decimal)*Math::pow(10,exp_sign*exp);
-#endif
-#endif
}
int64_t String::to_int(const CharType *p_str, int p_len) {
@@ -2252,98 +2011,6 @@ double String::to_double() const {
#else
return built_in_strtod<CharType>(c_str());
#endif
-#if 0
-#ifndef NO_USE_STDLIB
-
- return atof(utf8().get_data());
-#else
-
- double integer=0;
- double decimal=0;
- double decimal_mult=0.1;
- double sign=1.0;
- double exp=0;
- double exp_sign=1.0;
- int reading=READING_SIGN;
-
- const CharType *str=&operator[](0);
-
- while(*str && reading!=READING_DONE) {
-
- CharType c=*(str++);
- switch(reading) {
- case READING_SIGN: {
- if (c>='0' && c<='9')
- reading=READING_INT;
- // let it fallthrough
- else if (c=='-') {
- sign=-1.0;
- reading=READING_INT;
- break;
- } else if (c=='.') {
- reading=READING_DEC;
- break;
- } else {
- break;
- }
- }
- case READING_INT: {
-
- if (c>='0' && c<='9') {
-
- integer*=10;
- integer+=c-'0';
- } else if (c=='.') {
- reading=READING_DEC;
- } else if (c=='e') {
- reading=READING_EXP;
- } else {
- reading=READING_DONE;
- }
-
- } break;
- case READING_DEC: {
-
- if (c>='0' && c<='9') {
-
- decimal+=(c-'0')*decimal_mult;
- decimal_mult*=0.1;
- } else if (c=='e') {
- reading=READING_EXP;
- } else {
- reading=READING_DONE;
- }
-
- } break;
- case READING_EXP: {
-
- if (c>='0' && c<='9') {
-
- exp*=10.0;
- exp+=(c-'0');
- } else if (c=='-' && exp==0) {
- exp_sign=-1.0;
- } else if (exp_sign>=0 && c=='+') {
- //redundant...
- exp_sign=1.0;
- } else {
- reading=READING_DONE;
- }
- } break;
- }
- }
-
- return sign*(integer+decimal)*Math::pow(10,exp_sign*exp);
-#endif
-#if 0
-
-
- double ret=sign*(integer+decimal)*Math::pow(10,exp_sign*exp);
-
- print_line(*this +" == "+rtos(ret));
- return ret;
-#endif
-#endif
}
bool operator==(const char *p_chr, const String &p_str) {
@@ -3988,12 +3655,12 @@ String String::sprintf(const Array &values, bool *error) const {
CharType *self = (CharType *)c_str();
bool in_format = false;
int value_index = 0;
- int min_chars;
- int min_decimals;
- bool in_decimals;
- bool pad_with_zeroes;
- bool left_justified;
- bool show_sign;
+ int min_chars = 0;
+ int min_decimals = 0;
+ bool in_decimals = false;
+ bool pad_with_zeroes = false;
+ bool left_justified = false;
+ bool show_sign = false;
*error = true;
@@ -4020,12 +3687,12 @@ String String::sprintf(const Array &values, bool *error) const {
}
int64_t value = values[value_index];
- int base;
+ int base = 16;
bool capitalize = false;
switch (c) {
case 'd': base = 10; break;
case 'o': base = 8; break;
- case 'x': base = 16; break;
+ case 'x': break;
case 'X':
base = 16;
capitalize = true;
@@ -4175,7 +3842,7 @@ String String::sprintf(const Array &values, bool *error) const {
}
break;
}
- case '.': { // Float separtor.
+ case '.': { // Float separator.
if (in_decimals) {
return "too many decimal points in format";
}
@@ -4184,7 +3851,7 @@ String String::sprintf(const Array &values, bool *error) const {
break;
}
- case '*': { // Dyanmic width, based on value.
+ case '*': { // Dynamic width, based on value.
if (value_index >= values.size()) {
return "not enough arguments for format string";
}
diff --git a/core/ustring.h b/core/ustring.h
index 1c61e12e85..ab4e325f2c 100644
--- a/core/ustring.h
+++ b/core/ustring.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/variant.cpp b/core/variant.cpp
index 51c4b70bdc..74f6b6a711 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -1764,14 +1764,14 @@ Variant::operator Object *() const {
Variant::operator Node *() const {
if (type == OBJECT)
- return _get_obj().obj ? _get_obj().obj->cast_to<Node>() : NULL;
+ return Object::cast_to<Node>(_get_obj().obj);
else
return NULL;
}
Variant::operator Control *() const {
if (type == OBJECT)
- return _get_obj().obj ? _get_obj().obj->cast_to<Control>() : NULL;
+ return Object::cast_to<Control>(_get_obj().obj);
else
return NULL;
}
diff --git a/core/variant.h b/core/variant.h
index 40de1a9bce..c44608ebfa 100644
--- a/core/variant.h
+++ b/core/variant.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index 59d31d2586..ad15f8f5cb 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -729,9 +729,6 @@ struct _VariantCall {
VCALL_PTR1R(Basis, scaled);
VCALL_PTR0R(Basis, get_scale);
VCALL_PTR0R(Basis, get_euler);
- VCALL_PTR1(Basis, set_scale);
- VCALL_PTR1(Basis, set_rotation_euler);
- VCALL_PTR2(Basis, set_rotation_axis_angle);
VCALL_PTR1R(Basis, tdotx);
VCALL_PTR1R(Basis, tdoty);
VCALL_PTR1R(Basis, tdotz);
@@ -1700,9 +1697,6 @@ void register_variant_methods() {
ADDFUNC0(BASIS, REAL, Basis, determinant, varray());
ADDFUNC2(BASIS, BASIS, Basis, rotated, VECTOR3, "axis", REAL, "phi", varray());
ADDFUNC1(BASIS, BASIS, Basis, scaled, VECTOR3, "scale", varray());
- ADDFUNC1(BASIS, NIL, Basis, set_scale, VECTOR3, "scale", varray());
- ADDFUNC1(BASIS, NIL, Basis, set_rotation_euler, VECTOR3, "euler", varray());
- ADDFUNC2(BASIS, NIL, Basis, set_rotation_axis_angle, VECTOR3, "axis", REAL, "angle", varray());
ADDFUNC0(BASIS, VECTOR3, Basis, get_scale, varray());
ADDFUNC0(BASIS, VECTOR3, Basis, get_euler, varray());
ADDFUNC1(BASIS, REAL, Basis, tdotx, VECTOR3, "with", varray());
diff --git a/core/variant_construct_string.cpp b/core/variant_construct_string.cpp
index fa8a393d08..ccbb70d689 100644
--- a/core/variant_construct_string.cpp
+++ b/core/variant_construct_string.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/variant_op.cpp b/core/variant_op.cpp
index 5fda6b1473..b6e114b853 100644
--- a/core/variant_op.cpp
+++ b/core/variant_op.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp
index 5aa71f6704..65c7b7cfec 100644
--- a/core/variant_parser.cpp
+++ b/core/variant_parser.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -742,7 +742,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return err;
if (token.type == TK_PARENTHESIS_CLOSE) {
- Reference *reference = obj->cast_to<Reference>();
+ Reference *reference = Object::cast_to<Reference>(obj);
if (reference) {
value = REF(reference);
} else {
diff --git a/core/variant_parser.h b/core/variant_parser.h
index acbe0e967f..524891cdfd 100644
--- a/core/variant_parser.h
+++ b/core/variant_parser.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/vector.h b/core/vector.h
index 966832ac50..03eaf65099 100644
--- a/core/vector.h
+++ b/core/vector.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/version.h b/core/version.h
index 43f6f1bbf9..436f30ef01 100644
--- a/core/version.h
+++ b/core/version.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/core/vmap.h b/core/vmap.h
index 66f935f58d..8165a919b6 100644
--- a/core/vmap.h
+++ b/core/vmap.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -60,9 +60,13 @@ class VMap {
int low = 0;
int high = _data.size() - 1;
- int middle;
const _Pair *a = &_data[0];
+ int middle = 0;
+#if DEBUG_ENABLED
+ if (low > high)
+ ERR_PRINT("low > high, this may be a bug");
+#endif
while (low <= high) {
middle = (low + high) / 2;
diff --git a/core/vset.h b/core/vset.h
index 73062e064c..67af6c1a4c 100644
--- a/core/vset.h
+++ b/core/vset.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -46,8 +46,13 @@ class VSet {
int low = 0;
int high = _data.size() - 1;
- int middle;
const T *a = &_data[0];
+ int middle = 0;
+
+#if DEBUG_ENABLED
+ if (low > high)
+ ERR_PRINT("low > high, this may be a bug");
+#endif
while (low <= high) {
middle = (low + high) / 2;
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index 26c0b81428..96d515de5e 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -61,7 +61,7 @@
</description>
</method>
<method name="assert">
- <return type="Nil">
+ <return type="void">
</return>
<argument index="0" name="condition" type="bool">
</argument>
@@ -262,7 +262,7 @@
</description>
</method>
<method name="funcref">
- <return type="FuncRef">
+ <return type="Object">
</return>
<argument index="0" name="instance" type="Object">
</argument>
@@ -275,7 +275,7 @@
<method name="hash">
<return type="int">
</return>
- <argument index="0" name="var:Variant" type="Variant">
+ <argument index="0" name="var" type="Variant">
</argument>
<description>
Hash the variable passed and return an integer.
@@ -299,6 +299,18 @@
Get an object by its ID.
</description>
</method>
+ <method name="inverse_lerp">
+ <return type="float">
+ </return>
+ <argument index="0" name="from" type="float">
+ </argument>
+ <argument index="1" name="to" type="float">
+ </argument>
+ <argument index="2" name="value" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="is_inf">
<return type="float">
</return>
@@ -317,6 +329,14 @@
Returns whether s is a NaN (Not-A-Number) value.
</description>
</method>
+ <method name="len">
+ <return type="int">
+ </return>
+ <argument index="0" name="var" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="lerp">
<return type="float">
</return>
@@ -340,7 +360,7 @@
</description>
</method>
<method name="load">
- <return type="Resource">
+ <return type="Object">
</return>
<argument index="0" name="path" type="String">
</argument>
@@ -418,64 +438,44 @@
Preload a resource from the filesystem. The resource is loaded during script parsing.
</description>
</method>
- <method name="print">
- <return type="Nil">
+ <method name="print" qualifiers="vararg">
+ <return type="void">
</return>
- <argument index="0" name="what" type="Variant">
- </argument>
- <argument index="1" name="..." type="Variant">
- </argument>
<description>
Print one or more arguments to strings in the best way possible to a console line.
</description>
</method>
<method name="print_stack">
- <return type="Nil">
+ <return type="void">
</return>
<description>
Print a stack track at code location, only works when running with debugger turned on.
</description>
</method>
- <method name="printerr">
- <return type="Nil">
+ <method name="printerr" qualifiers="vararg">
+ <return type="void">
</return>
- <argument index="0" name="what" type="Variant">
- </argument>
- <argument index="1" name="..." type="Variant">
- </argument>
<description>
Print one or more arguments to strings in the best way possible to standard error line.
</description>
</method>
- <method name="printraw">
- <return type="Nil">
+ <method name="printraw" qualifiers="vararg">
+ <return type="void">
</return>
- <argument index="0" name="what" type="Variant">
- </argument>
- <argument index="1" name="..." type="Variant">
- </argument>
<description>
Print one or more arguments to strings in the best way possible to console. No newline is added at the end.
</description>
</method>
- <method name="prints">
- <return type="Nil">
+ <method name="prints" qualifiers="vararg">
+ <return type="void">
</return>
- <argument index="0" name="what" type="Variant">
- </argument>
- <argument index="1" name="..." type="Variant">
- </argument>
<description>
Print one or more arguments to the console with a space between each argument.
</description>
</method>
- <method name="printt">
- <return type="Nil">
+ <method name="printt" qualifiers="vararg">
+ <return type="void">
</return>
- <argument index="0" name="what" type="Variant">
- </argument>
- <argument index="1" name="..." type="Variant">
- </argument>
<description>
Print one or more arguments to the console with a tab between each argument.
</description>
@@ -524,21 +524,35 @@
</description>
</method>
<method name="randomize">
- <return type="Nil">
+ <return type="void">
</return>
<description>
Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time.
</description>
</method>
- <method name="range">
+ <method name="range" qualifiers="vararg">
<return type="Array">
</return>
- <argument index="0" name="..." type="Variant">
- </argument>
<description>
Return an array with the given range. Range can be 1 argument N (0 to N-1), two arguments (initial, final-1) or three arguments (initial, final-1, increment).
</description>
</method>
+ <method name="range_lerp">
+ <return type="float">
+ </return>
+ <argument index="0" name="value" type="float">
+ </argument>
+ <argument index="1" name="istart" type="float">
+ </argument>
+ <argument index="2" name="istop" type="float">
+ </argument>
+ <argument index="3" name="ostart" type="float">
+ </argument>
+ <argument index="4" name="ostop" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="round">
<return type="float">
</return>
@@ -549,7 +563,7 @@
</description>
</method>
<method name="seed">
- <return type="Nil">
+ <return type="void">
</return>
<argument index="0" name="seed" type="int">
</argument>
@@ -604,13 +618,9 @@
Snap float value to a given step.
</description>
</method>
- <method name="str">
+ <method name="str" qualifiers="vararg">
<return type="String">
</return>
- <argument index="0" name="what" type="Variant">
- </argument>
- <argument index="1" name="..." type="Variant">
- </argument>
<description>
Convert one or more arguments to string in the best way possible.
</description>
@@ -645,7 +655,7 @@
<method name="to_json">
<return type="String">
</return>
- <argument index="0" name="var:Variant" type="Variant">
+ <argument index="0" name="var" type="Variant">
</argument>
<description>
Convert a Variant to json text.
@@ -669,7 +679,7 @@
</description>
</method>
<method name="validate_json">
- <return type="Variant">
+ <return type="String">
</return>
<argument index="0" name="json" type="String">
</argument>
@@ -696,7 +706,7 @@
</description>
</method>
<method name="weakref">
- <return type="WeakRef">
+ <return type="Object">
</return>
<argument index="0" name="obj" type="Object">
</argument>
@@ -719,13 +729,13 @@
</method>
</methods>
<constants>
- <constant name="PI" value="3.141593">
+ <constant name="PI" value="3.141593" enum="">
Constant that represents how many times the diameter of a circumference fits around its perimeter.
</constant>
- <constant name="INF" value="inf">
+ <constant name="INF" value="inf" enum="">
A positive infinity. (For negative infinity, use -INF).
</constant>
- <constant name="NAN" value="nan">
+ <constant name="NAN" value="nan" enum="">
Macro constant that expands to an expression of type float that represents a NaN.
The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0.
</constant>
@@ -742,6 +752,8 @@
<methods>
</methods>
<members>
+ <member name="ARVRServer" type="ARVRServer" setter="" getter="" brief="">
+ </member>
<member name="AudioServer" type="AudioServer" setter="" getter="" brief="">
[AudioServer] singleton
</member>
@@ -754,9 +766,6 @@
<member name="Geometry" type="Geometry" setter="" getter="" brief="">
[Geometry] singleton
</member>
- <member name="ProjectSettings" type="ProjectSettings" setter="" getter="" brief="">
- [ProjectSettings] singleton
- </member>
<member name="IP" type="IP" setter="" getter="" brief="">
[IP] singleton
</member>
@@ -781,6 +790,9 @@
<member name="PhysicsServer" type="PhysicsServer" setter="" getter="" brief="">
[PhysicsServer] singleton
</member>
+ <member name="ProjectSettings" type="ProjectSettings" setter="" getter="" brief="">
+ [ProjectSettings] singleton
+ </member>
<member name="ResourceLoader" type="ResourceLoader" setter="" getter="" brief="">
[ResourceLoader] singleton
</member>
@@ -831,7 +843,7 @@
<constant name="VALIGN_BOTTOM" value="2">
Vertical bottom alignment, usually for text-derived classes.
</constant>
- <constant name="SPKEY" value="16777216">
+ <constant name="SPKEY" value="16777216" enum="">
Scancodes with this bit applied are non printable.
</constant>
<constant name="KEY_ESCAPE" value="16777217">
@@ -1496,191 +1508,191 @@
</constant>
<constant name="KEY_MASK_GROUP_SWITCH" value="1073741824">
</constant>
- <constant name="BUTTON_LEFT" value="1">
+ <constant name="BUTTON_LEFT" value="1" enum="">
Left Mouse Button
</constant>
- <constant name="BUTTON_RIGHT" value="2">
+ <constant name="BUTTON_RIGHT" value="2" enum="">
Right Mouse Button
</constant>
- <constant name="BUTTON_MIDDLE" value="3">
+ <constant name="BUTTON_MIDDLE" value="3" enum="">
Middle Mouse Button
</constant>
- <constant name="BUTTON_WHEEL_UP" value="4">
+ <constant name="BUTTON_WHEEL_UP" value="4" enum="">
Mouse wheel up
</constant>
- <constant name="BUTTON_WHEEL_DOWN" value="5">
+ <constant name="BUTTON_WHEEL_DOWN" value="5" enum="">
Mouse wheel down
</constant>
- <constant name="BUTTON_WHEEL_LEFT" value="6">
+ <constant name="BUTTON_WHEEL_LEFT" value="6" enum="">
Mouse wheel left button
</constant>
- <constant name="BUTTON_WHEEL_RIGHT" value="7">
+ <constant name="BUTTON_WHEEL_RIGHT" value="7" enum="">
Mouse wheel right button
</constant>
- <constant name="BUTTON_MASK_LEFT" value="1">
+ <constant name="BUTTON_MASK_LEFT" value="1" enum="">
</constant>
- <constant name="BUTTON_MASK_RIGHT" value="2">
+ <constant name="BUTTON_MASK_RIGHT" value="2" enum="">
</constant>
- <constant name="BUTTON_MASK_MIDDLE" value="4">
+ <constant name="BUTTON_MASK_MIDDLE" value="4" enum="">
</constant>
- <constant name="JOY_BUTTON_0" value="0">
+ <constant name="JOY_BUTTON_0" value="0" enum="">
Joypad Button 0
</constant>
- <constant name="JOY_BUTTON_1" value="1">
+ <constant name="JOY_BUTTON_1" value="1" enum="">
Joypad Button 1
</constant>
- <constant name="JOY_BUTTON_2" value="2">
+ <constant name="JOY_BUTTON_2" value="2" enum="">
Joypad Button 2
</constant>
- <constant name="JOY_BUTTON_3" value="3">
+ <constant name="JOY_BUTTON_3" value="3" enum="">
Joypad Button 3
</constant>
- <constant name="JOY_BUTTON_4" value="4">
+ <constant name="JOY_BUTTON_4" value="4" enum="">
Joypad Button 4
</constant>
- <constant name="JOY_BUTTON_5" value="5">
+ <constant name="JOY_BUTTON_5" value="5" enum="">
Joypad Button 5
</constant>
- <constant name="JOY_BUTTON_6" value="6">
+ <constant name="JOY_BUTTON_6" value="6" enum="">
Joypad Button 6
</constant>
- <constant name="JOY_BUTTON_7" value="7">
+ <constant name="JOY_BUTTON_7" value="7" enum="">
Joypad Button 7
</constant>
- <constant name="JOY_BUTTON_8" value="8">
+ <constant name="JOY_BUTTON_8" value="8" enum="">
Joypad Button 8
</constant>
- <constant name="JOY_BUTTON_9" value="9">
+ <constant name="JOY_BUTTON_9" value="9" enum="">
Joypad Button 9
</constant>
- <constant name="JOY_BUTTON_10" value="10">
+ <constant name="JOY_BUTTON_10" value="10" enum="">
Joypad Button 10
</constant>
- <constant name="JOY_BUTTON_11" value="11">
+ <constant name="JOY_BUTTON_11" value="11" enum="">
Joypad Button 11
</constant>
- <constant name="JOY_BUTTON_12" value="12">
+ <constant name="JOY_BUTTON_12" value="12" enum="">
Joypad Button 12
</constant>
- <constant name="JOY_BUTTON_13" value="13">
+ <constant name="JOY_BUTTON_13" value="13" enum="">
Joypad Button 13
</constant>
- <constant name="JOY_BUTTON_14" value="14">
+ <constant name="JOY_BUTTON_14" value="14" enum="">
Joypad Button 14
</constant>
- <constant name="JOY_BUTTON_15" value="15">
+ <constant name="JOY_BUTTON_15" value="15" enum="">
Joypad Button 15
</constant>
- <constant name="JOY_BUTTON_MAX" value="16">
+ <constant name="JOY_BUTTON_MAX" value="16" enum="">
Joypad Button 16
</constant>
- <constant name="JOY_SONY_CIRCLE" value="1">
+ <constant name="JOY_SONY_CIRCLE" value="1" enum="">
DUALSHOCK circle button
</constant>
- <constant name="JOY_SONY_X" value="0">
+ <constant name="JOY_SONY_X" value="0" enum="">
DUALSHOCK X button
</constant>
- <constant name="JOY_SONY_SQUARE" value="2">
+ <constant name="JOY_SONY_SQUARE" value="2" enum="">
DUALSHOCK square button
</constant>
- <constant name="JOY_SONY_TRIANGLE" value="3">
+ <constant name="JOY_SONY_TRIANGLE" value="3" enum="">
DUALSHOCK triangle button
</constant>
- <constant name="JOY_XBOX_B" value="1">
+ <constant name="JOY_XBOX_B" value="1" enum="">
XBOX controller B button
</constant>
- <constant name="JOY_XBOX_A" value="0">
+ <constant name="JOY_XBOX_A" value="0" enum="">
XBOX controller A button
</constant>
- <constant name="JOY_XBOX_X" value="2">
+ <constant name="JOY_XBOX_X" value="2" enum="">
XBOX controller X button
</constant>
- <constant name="JOY_XBOX_Y" value="3">
+ <constant name="JOY_XBOX_Y" value="3" enum="">
XBOX controller Y button
</constant>
- <constant name="JOY_DS_A" value="1">
+ <constant name="JOY_DS_A" value="1" enum="">
</constant>
- <constant name="JOY_DS_B" value="0">
+ <constant name="JOY_DS_B" value="0" enum="">
</constant>
- <constant name="JOY_DS_X" value="3">
+ <constant name="JOY_DS_X" value="3" enum="">
</constant>
- <constant name="JOY_DS_Y" value="2">
+ <constant name="JOY_DS_Y" value="2" enum="">
</constant>
- <constant name="JOY_SELECT" value="10">
+ <constant name="JOY_SELECT" value="10" enum="">
Joypad Button Select
</constant>
- <constant name="JOY_START" value="11">
+ <constant name="JOY_START" value="11" enum="">
Joypad Button Start
</constant>
- <constant name="JOY_DPAD_UP" value="12">
+ <constant name="JOY_DPAD_UP" value="12" enum="">
Joypad DPad Up
</constant>
- <constant name="JOY_DPAD_DOWN" value="13">
+ <constant name="JOY_DPAD_DOWN" value="13" enum="">
Joypad DPad Down
</constant>
- <constant name="JOY_DPAD_LEFT" value="14">
+ <constant name="JOY_DPAD_LEFT" value="14" enum="">
Joypad DPad Left
</constant>
- <constant name="JOY_DPAD_RIGHT" value="15">
+ <constant name="JOY_DPAD_RIGHT" value="15" enum="">
Joypad DPad Right
</constant>
- <constant name="JOY_L" value="4">
+ <constant name="JOY_L" value="4" enum="">
Joypad Left Shoulder Button
</constant>
- <constant name="JOY_L2" value="6">
+ <constant name="JOY_L2" value="6" enum="">
Joypad Left Trigger
</constant>
- <constant name="JOY_L3" value="8">
+ <constant name="JOY_L3" value="8" enum="">
Joypad Left Stick Click
</constant>
- <constant name="JOY_R" value="5">
+ <constant name="JOY_R" value="5" enum="">
Joypad Right Shoulder Button
</constant>
- <constant name="JOY_R2" value="7">
+ <constant name="JOY_R2" value="7" enum="">
Joypad Right Trigger
</constant>
- <constant name="JOY_R3" value="9">
+ <constant name="JOY_R3" value="9" enum="">
Joypad Right Stick Click
</constant>
- <constant name="JOY_AXIS_0" value="0">
+ <constant name="JOY_AXIS_0" value="0" enum="">
Joypad Left Stick Horizontal Axis
</constant>
- <constant name="JOY_AXIS_1" value="1">
+ <constant name="JOY_AXIS_1" value="1" enum="">
Joypad Left Stick Vertical Axis
</constant>
- <constant name="JOY_AXIS_2" value="2">
+ <constant name="JOY_AXIS_2" value="2" enum="">
Joypad Right Stick Horizontal Axis
</constant>
- <constant name="JOY_AXIS_3" value="3">
+ <constant name="JOY_AXIS_3" value="3" enum="">
Joypad Right Stick Vertical Axis
</constant>
- <constant name="JOY_AXIS_4" value="4">
+ <constant name="JOY_AXIS_4" value="4" enum="">
</constant>
- <constant name="JOY_AXIS_5" value="5">
+ <constant name="JOY_AXIS_5" value="5" enum="">
</constant>
- <constant name="JOY_AXIS_6" value="6">
+ <constant name="JOY_AXIS_6" value="6" enum="">
Joypad Left Trigger Analog Axis
</constant>
- <constant name="JOY_AXIS_7" value="7">
+ <constant name="JOY_AXIS_7" value="7" enum="">
Joypad Right Trigger Analog Axis
</constant>
- <constant name="JOY_AXIS_MAX" value="8">
+ <constant name="JOY_AXIS_MAX" value="8" enum="">
</constant>
- <constant name="JOY_ANALOG_LX" value="0">
+ <constant name="JOY_ANALOG_LX" value="0" enum="">
Joypad Left Stick Horizontal Axis
</constant>
- <constant name="JOY_ANALOG_LY" value="1">
+ <constant name="JOY_ANALOG_LY" value="1" enum="">
Joypad Left Stick Vertical Axis
</constant>
- <constant name="JOY_ANALOG_RX" value="2">
+ <constant name="JOY_ANALOG_RX" value="2" enum="">
Joypad Right Stick Horizontal Axis
</constant>
- <constant name="JOY_ANALOG_RY" value="3">
+ <constant name="JOY_ANALOG_RY" value="3" enum="">
Joypad Right Stick Vertical Axis
</constant>
- <constant name="JOY_ANALOG_L2" value="6">
+ <constant name="JOY_ANALOG_L2" value="6" enum="">
</constant>
- <constant name="JOY_ANALOG_R2" value="7">
+ <constant name="JOY_ANALOG_R2" value="7" enum="">
</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.
@@ -1949,7 +1961,7 @@
</constant>
</constants>
</class>
-<class name="@Native" category="Core">
+<class name="@NativeScript" category="Core">
<brief_description>
</brief_description>
<description>
@@ -1969,6 +1981,542 @@
<constants>
</constants>
</class>
+<class name="ARVRAnchor" inherits="Spatial" category="Core">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <methods>
+ <method name="get_anchor_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_anchor_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_is_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_anchor_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="anchor_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="anchor_id" type="int" setter="set_anchor_id" getter="get_anchor_id" brief="">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
+<class name="ARVRCamera" inherits="Camera" category="Core">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
+<class name="ARVRController" inherits="Spatial" category="Core">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <methods>
+ <method name="get_controller_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_controller_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_is_active" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_joystick_axis" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="axis" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_joystick_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_button_pressed" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="button" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_controller_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="controller_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="controller_id" type="int" setter="set_controller_id" getter="get_controller_id" brief="">
+ </member>
+ </members>
+ <signals>
+ <signal name="button_pressed">
+ <argument index="0" name="button" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="button_release">
+ <argument index="0" name="button" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
+<class name="ARVRInterface" inherits="Reference" category="Core">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <methods>
+ <method name="get_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_recommended_render_targetsize">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="hmd_is_present">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="initialize">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_initialized">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_installed">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_primary">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_is_primary">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="supports_hmd">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="uninitialize">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="primary" type="bool" setter="set_is_primary" getter="is_primary" brief="">
+ </member>
+ </members>
+ <constants>
+ <constant name="EYE_MONO" value="0">
+ </constant>
+ <constant name="EYE_LEFT" value="1">
+ </constant>
+ <constant name="EYE_RIGHT" value="2">
+ </constant>
+ </constants>
+</class>
+<class name="ARVROrigin" inherits="Spatial" category="Core">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <methods>
+ <method name="get_world_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_world_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="world_scale" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" brief="">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
+<class name="ARVRPositionalTracker" inherits="Object" category="Core">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <methods>
+ <method name="get_joy_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_orientation" qualifiers="const">
+ <return type="Basis">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_position" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tracks_orientation" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tracks_position" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_transform" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="adjust_by_reference_frame" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_type" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
+<class name="ARVRScriptInterface" inherits="ARVRInterface" category="Core">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <methods>
+ <method name="_get_projection_for_eye" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="commit_for_eye" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="eye" type="int">
+ </argument>
+ <argument index="1" name="render_target" type="RID">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_recommended_render_targetsize" qualifiers="virtual">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_transform_for_eye" qualifiers="virtual">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="eye" type="int">
+ </argument>
+ <argument index="1" name="cam_transform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="hmd_is_present" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="initialize" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_initialized" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_installed" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_stereo" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="process" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="supports_hmd" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="uninitialize" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
+<class name="ARVRServer" inherits="Object" category="Core">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <methods>
+ <method name="add_interface">
+ <return type="void">
+ </return>
+ <argument index="0" name="arg0" type="ARVRInterface">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="find_interface" qualifiers="const">
+ <return type="ARVRInterface">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_interface" qualifiers="const">
+ <return type="ARVRInterface">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_interface_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_reference_frame" qualifiers="const">
+ <return type="Transform">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_tracker" qualifiers="const">
+ <return type="ARVRPositionalTracker">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_tracker_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_world_scale" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="remove_interface">
+ <return type="void">
+ </return>
+ <argument index="0" name="arg0" type="ARVRInterface">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="request_reference_frame">
+ <return type="void">
+ </return>
+ <argument index="0" name="ignore_tilt" type="bool">
+ </argument>
+ <argument index="1" name="keep_height" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_primary_interface">
+ <return type="void">
+ </return>
+ <argument index="0" name="arg0" type="ARVRInterface">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_world_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="arg0" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" brief="">
+ </member>
+ </members>
+ <signals>
+ <signal name="interface_added">
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="interface_removed">
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="tracker_added">
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="type" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ <signal name="tracker_removed">
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ <constant name="TRACKER_CONTROLLER" value="1">
+ </constant>
+ <constant name="TRACKER_BASESTATION" value="2">
+ </constant>
+ <constant name="TRACKER_ANCHOR" value="4">
+ </constant>
+ <constant name="TRACKER_UNKNOWN" value="128">
+ </constant>
+ <constant name="TRACKER_ANY_KNOWN" value="127">
+ </constant>
+ <constant name="TRACKER_ANY" value="255">
+ </constant>
+ </constants>
+</class>
<class name="AStar" inherits="Reference" category="Core">
<brief_description>
AStar class representation that uses vectors as edges.
@@ -1979,6 +2527,8 @@
</description>
<methods>
<method name="_compute_cost" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="from_id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
@@ -1987,6 +2537,8 @@
</description>
</method>
<method name="_estimate_cost" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="from_id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
@@ -1995,11 +2547,13 @@
</description>
</method>
<method name="add_point">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="pos" type="Vector3">
</argument>
- <argument index="2" name="weight_scale" type="float" default="1">
+ <argument index="2" name="weight_scale" type="float" default="null">
</argument>
<description>
Add a new point at the given position [code]pos[/code] with the given identifier [code]id[/code]. The [code]weight_scale[/code] has to be 1 or larger.
@@ -2017,22 +2571,28 @@
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clear all the points and segments from AStar instance.
</description>
</method>
<method name="connect_points">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
</argument>
- <argument index="2" name="bidirectional" type="bool" default="true">
+ <argument index="2" name="bidirectional" type="bool" default="null">
</argument>
<description>
Create a segment between points [code]id[/code] and [code]to_id[/code].
</description>
</method>
<method name="disconnect_points">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="to_id" type="int">
@@ -2115,6 +2675,8 @@
</description>
</method>
<method name="remove_point">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<description>
@@ -2140,7 +2702,7 @@
</argument>
<argument index="1" name="right" type="bool" default="false">
</argument>
- <argument index="2" name="action" type="String" default="&quot;&quot;">
+ <argument index="2" name="action" type="String" default="null">
</argument>
<description>
Add custom button to the dialog and return the created button.
@@ -2164,14 +2726,14 @@
</description>
</method>
<method name="get_label">
- <return type="Object">
+ <return type="Label">
</return>
<description>
Return the label used for built-in text.
</description>
</method>
<method name="get_ok">
- <return type="Object">
+ <return type="Button">
</return>
<description>
Return the OK Button.
@@ -2185,15 +2747,17 @@
</description>
</method>
<method name="register_text_enter">
- <return type="LineEdit">
+ <return type="void">
</return>
- <argument index="0" name="line_edit" type="Object">
+ <argument index="0" name="line_edit" type="Node">
</argument>
<description>
Register a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted.
</description>
</method>
<method name="set_hide_on_ok">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -2201,6 +2765,8 @@
</description>
</method>
<method name="set_text">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
<description>
@@ -2296,6 +2862,8 @@
</description>
</method>
<method name="play">
+ <return type="void">
+ </return>
<argument index="0" name="anim" type="String" default="&quot;&quot;">
</argument>
<description>
@@ -2303,6 +2871,8 @@
</description>
</method>
<method name="set_animation">
+ <return type="void">
+ </return>
<argument index="0" name="animation" type="String">
</argument>
<description>
@@ -2310,6 +2880,8 @@
</description>
</method>
<method name="set_centered">
+ <return type="void">
+ </return>
<argument index="0" name="centered" type="bool">
</argument>
<description>
@@ -2317,6 +2889,8 @@
</description>
</method>
<method name="set_flip_h">
+ <return type="void">
+ </return>
<argument index="0" name="flip_h" type="bool">
</argument>
<description>
@@ -2324,6 +2898,8 @@
</description>
</method>
<method name="set_flip_v">
+ <return type="void">
+ </return>
<argument index="0" name="flip_v" type="bool">
</argument>
<description>
@@ -2331,6 +2907,8 @@
</description>
</method>
<method name="set_frame">
+ <return type="void">
+ </return>
<argument index="0" name="frame" type="int">
</argument>
<description>
@@ -2338,6 +2916,8 @@
</description>
</method>
<method name="set_offset">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
@@ -2345,6 +2925,8 @@
</description>
</method>
<method name="set_sprite_frames">
+ <return type="void">
+ </return>
<argument index="0" name="sprite_frames" type="SpriteFrames">
</argument>
<description>
@@ -2352,6 +2934,8 @@
</description>
</method>
<method name="stop">
+ <return type="void">
+ </return>
<description>
Stop the current animation (does not reset the frame counter).
</description>
@@ -2425,6 +3009,8 @@
</description>
</method>
<method name="play">
+ <return type="void">
+ </return>
<argument index="0" name="anim" type="String" default="&quot;&quot;">
</argument>
<description>
@@ -2432,6 +3018,8 @@
</description>
</method>
<method name="set_animation">
+ <return type="void">
+ </return>
<argument index="0" name="animation" type="String">
</argument>
<description>
@@ -2439,6 +3027,8 @@
</description>
</method>
<method name="set_frame">
+ <return type="void">
+ </return>
<argument index="0" name="frame" type="int">
</argument>
<description>
@@ -2446,6 +3036,8 @@
</description>
</method>
<method name="set_sprite_frames">
+ <return type="void">
+ </return>
<argument index="0" name="sprite_frames" type="SpriteFrames">
</argument>
<description>
@@ -2453,6 +3045,8 @@
</description>
</method>
<method name="stop">
+ <return type="void">
+ </return>
<description>
Stop the current animation (does not reset the frame counter).
</description>
@@ -2490,15 +3084,17 @@
<method name="add_track">
<return type="int">
</return>
- <argument index="0" name="type" type="int">
+ <argument index="0" name="type" type="int" enum="Animation.TrackType">
</argument>
- <argument index="1" name="at_pos" type="int" default="-1">
+ <argument index="1" name="at_pos" type="int" default="null">
</argument>
<description>
Add a track to the Animation. The track type must be specified as any of the values in the TYPE_* enumeration.
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clear the animation (clear all tracks and reset all).
</description>
@@ -2576,6 +3172,8 @@
</description>
</method>
<method name="remove_track">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -2583,6 +3181,8 @@
</description>
</method>
<method name="set_length">
+ <return type="void">
+ </return>
<argument index="0" name="time_sec" type="float">
</argument>
<description>
@@ -2590,6 +3190,8 @@
</description>
</method>
<method name="set_loop">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -2597,6 +3199,8 @@
</description>
</method>
<method name="set_step">
+ <return type="void">
+ </return>
<argument index="0" name="size_sec" type="float">
</argument>
<description>
@@ -2610,7 +3214,7 @@
</argument>
<argument index="1" name="time" type="float">
</argument>
- <argument index="2" name="exact" type="bool" default="false">
+ <argument index="2" name="exact" type="bool" default="null">
</argument>
<description>
Find the key index by time in a given track. Optionally, only find it if the exact time is given.
@@ -2665,6 +3269,8 @@
</description>
</method>
<method name="track_get_key_value" qualifiers="const">
+ <return type="Variant">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
@@ -2692,13 +3298,15 @@
</description>
</method>
<method name="track_insert_key">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="time" type="float">
</argument>
<argument index="2" name="key" type="Variant">
</argument>
- <argument index="3" name="transition" type="float" default="1">
+ <argument index="3" name="transition" type="float" default="null">
</argument>
<description>
Insert a generic key in a given track.
@@ -2714,6 +3322,8 @@
</description>
</method>
<method name="track_move_down">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -2721,6 +3331,8 @@
</description>
</method>
<method name="track_move_up">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -2728,6 +3340,8 @@
</description>
</method>
<method name="track_remove_key">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
@@ -2737,6 +3351,8 @@
</description>
</method>
<method name="track_remove_key_at_pos">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="pos" type="float">
@@ -2746,6 +3362,8 @@
</description>
</method>
<method name="track_set_imported">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="imported" type="bool">
@@ -2755,6 +3373,8 @@
</description>
</method>
<method name="track_set_interpolation_loop_wrap">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="interpolation" type="bool">
@@ -2763,15 +3383,19 @@
</description>
</method>
<method name="track_set_interpolation_type">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="interpolation" type="int">
+ <argument index="1" name="interpolation" type="int" enum="Animation.InterpolationType">
</argument>
<description>
Set the interpolation type of a given track, from the INTERPOLATION_* enum.
</description>
</method>
<method name="track_set_key_transition">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="key_idx" type="int">
@@ -2783,6 +3407,8 @@
</description>
</method>
<method name="track_set_key_value">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="key" type="int">
@@ -2794,6 +3420,8 @@
</description>
</method>
<method name="track_set_path">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="path" type="NodePath">
@@ -2852,9 +3480,11 @@
</description>
</method>
<method name="value_track_set_update_mode">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="mode" type="int">
+ <argument index="1" name="mode" type="int" enum="Animation.UpdateMode">
</argument>
<description>
</description>
@@ -2907,6 +3537,8 @@
</description>
</method>
<method name="advance">
+ <return type="void">
+ </return>
<argument index="0" name="delta" type="float">
</argument>
<description>
@@ -2922,6 +3554,8 @@
</description>
</method>
<method name="animation_set_next">
+ <return type="void">
+ </return>
<argument index="0" name="anim_from" type="String">
</argument>
<argument index="1" name="anim_to" type="String">
@@ -2930,11 +3564,15 @@
</description>
</method>
<method name="clear_caches">
+ <return type="void">
+ </return>
<description>
The animation player creates caches for faster access to the nodes it will animate. However, if a specific node is removed, it may not notice it, so clear_caches will force the player to search for the nodes again.
</description>
</method>
<method name="clear_queue">
+ <return type="void">
+ </return>
<description>
If animations are queued to play, clear them.
</description>
@@ -3062,28 +3700,34 @@
</description>
</method>
<method name="play">
- <argument index="0" name="name" type="String" default="&quot;&quot;">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String" default="false">
</argument>
- <argument index="1" name="custom_blend" type="float" default="-1">
+ <argument index="1" name="custom_blend" type="float" default="1.0">
</argument>
- <argument index="2" name="custom_speed" type="float" default="1">
+ <argument index="2" name="custom_speed" type="float" default="-1">
</argument>
- <argument index="3" name="from_end" type="bool" default="false">
+ <argument index="3" name="from_end" type="bool" default="&quot;&quot;">
</argument>
<description>
Play a given animation by the animation name. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being true can play the animation backwards.
</description>
</method>
<method name="play_backwards">
- <argument index="0" name="name" type="String" default="&quot;&quot;">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String" default="-1">
</argument>
- <argument index="1" name="custom_blend" type="float" default="-1">
+ <argument index="1" name="custom_blend" type="float" default="&quot;&quot;">
</argument>
<description>
Play a given animation by the animation name in reverse.
</description>
</method>
<method name="queue">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -3091,6 +3735,8 @@
</description>
</method>
<method name="remove_animation">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -3098,6 +3744,8 @@
</description>
</method>
<method name="rename_animation">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="newname" type="String">
@@ -3107,15 +3755,19 @@
</description>
</method>
<method name="seek">
+ <return type="void">
+ </return>
<argument index="0" name="pos_sec" type="float">
</argument>
- <argument index="1" name="update" type="bool" default="false">
+ <argument index="1" name="update" type="bool" default="null">
</argument>
<description>
Seek the animation to a given position in time (in seconds). If 'update' is true, the animation will be updated too, otherwise it will be updated at process time.
</description>
</method>
<method name="set_active">
+ <return type="void">
+ </return>
<argument index="0" name="active" type="bool">
</argument>
<description>
@@ -3123,13 +3775,17 @@
</description>
</method>
<method name="set_animation_process_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="AnimationPlayer.AnimationProcessMode">
</argument>
<description>
Set the mode in which the animation player processes. By default, it processes on idle time (framerate dependent), but using fixed time works well for animating static collision bodies in 2D and 3D. See enum ANIMATION_PROCESS_*.
</description>
</method>
<method name="set_autoplay">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -3137,6 +3793,8 @@
</description>
</method>
<method name="set_blend_time">
+ <return type="void">
+ </return>
<argument index="0" name="anim_from" type="String">
</argument>
<argument index="1" name="anim_to" type="String">
@@ -3148,6 +3806,8 @@
</description>
</method>
<method name="set_current_animation">
+ <return type="void">
+ </return>
<argument index="0" name="anim" type="String">
</argument>
<description>
@@ -3155,6 +3815,8 @@
</description>
</method>
<method name="set_default_blend_time">
+ <return type="void">
+ </return>
<argument index="0" name="sec" type="float">
</argument>
<description>
@@ -3162,6 +3824,8 @@
</description>
</method>
<method name="set_root">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="NodePath">
</argument>
<description>
@@ -3169,6 +3833,8 @@
</description>
</method>
<method name="set_speed_scale">
+ <return type="void">
+ </return>
<argument index="0" name="speed" type="float">
</argument>
<description>
@@ -3176,6 +3842,8 @@
</description>
</method>
<method name="stop">
+ <return type="void">
+ </return>
<argument index="0" name="reset" type="bool" default="true">
</argument>
<description>
@@ -3183,6 +3851,8 @@
</description>
</method>
<method name="stop_all">
+ <return type="void">
+ </return>
<description>
Stop playback of animations (deprecated).
</description>
@@ -3191,7 +3861,7 @@
<members>
<member name="playback_default_blend_time" type="float" setter="set_default_blend_time" getter="get_default_blend_time" brief="">
</member>
- <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" brief="">
+ <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" brief="" enum="AnimationPlayer.AnimationProcessMode">
</member>
<member name="root_node" type="NodePath" setter="set_root" getter="get_root" brief="">
</member>
@@ -3239,7 +3909,9 @@
</description>
<methods>
<method name="add_node">
- <argument index="0" name="type" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="AnimationTreePlayer.NodeType">
</argument>
<argument index="1" name="id" type="String">
</argument>
@@ -3248,6 +3920,8 @@
</description>
</method>
<method name="advance">
+ <return type="void">
+ </return>
<argument index="0" name="delta" type="float">
</argument>
<description>
@@ -3270,6 +3944,8 @@
</description>
</method>
<method name="animation_node_set_animation">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="animation" type="Animation">
@@ -3279,6 +3955,8 @@
</description>
</method>
<method name="animation_node_set_filter_path">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="path" type="NodePath">
@@ -3289,6 +3967,8 @@
</description>
</method>
<method name="animation_node_set_master_animation">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="source" type="String">
@@ -3317,6 +3997,8 @@
</description>
</method>
<method name="blend2_node_set_amount">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="blend" type="float">
@@ -3325,6 +4007,8 @@
</description>
</method>
<method name="blend2_node_set_filter_path">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="path" type="NodePath">
@@ -3343,6 +4027,8 @@
</description>
</method>
<method name="blend3_node_set_amount">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="blend" type="float">
@@ -3359,6 +4045,8 @@
</description>
</method>
<method name="blend4_node_set_amount">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="blend" type="Vector2">
@@ -3379,6 +4067,8 @@
</description>
</method>
<method name="disconnect_nodes">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="dst_input_idx" type="int">
@@ -3425,6 +4115,8 @@
</description>
</method>
<method name="mix_node_set_amount">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="ratio" type="float">
@@ -3490,6 +4182,8 @@
</description>
</method>
<method name="node_set_pos">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="screen_pos" type="Vector2">
@@ -3546,6 +4240,8 @@
</description>
</method>
<method name="oneshot_node_set_autorestart">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="enable" type="bool">
@@ -3554,6 +4250,8 @@
</description>
</method>
<method name="oneshot_node_set_autorestart_delay">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="delay_sec" type="float">
@@ -3562,6 +4260,8 @@
</description>
</method>
<method name="oneshot_node_set_autorestart_random_delay">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="rand_sec" type="float">
@@ -3570,6 +4270,8 @@
</description>
</method>
<method name="oneshot_node_set_fadein_time">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="time_sec" type="float">
@@ -3578,6 +4280,8 @@
</description>
</method>
<method name="oneshot_node_set_fadeout_time">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="time_sec" type="float">
@@ -3586,6 +4290,8 @@
</description>
</method>
<method name="oneshot_node_set_filter_path">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="path" type="NodePath">
@@ -3596,50 +4302,68 @@
</description>
</method>
<method name="oneshot_node_start">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<description>
</description>
</method>
<method name="oneshot_node_stop">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<description>
</description>
</method>
<method name="recompute_caches">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="remove_node">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<description>
</description>
</method>
<method name="reset">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="set_active">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_animation_process_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="AnimationTreePlayer.AnimationProcessMode">
</argument>
<description>
</description>
</method>
<method name="set_base_path">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="NodePath">
</argument>
<description>
</description>
</method>
<method name="set_master_player">
+ <return type="void">
+ </return>
<argument index="0" name="nodepath" type="NodePath">
</argument>
<description>
@@ -3654,6 +4378,8 @@
</description>
</method>
<method name="timescale_node_set_scale">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="scale" type="float">
@@ -3662,6 +4388,8 @@
</description>
</method>
<method name="timeseek_node_seek">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="pos_sec" type="float">
@@ -3670,6 +4398,8 @@
</description>
</method>
<method name="transition_node_delete_input">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="input_idx" type="int">
@@ -3712,6 +4442,8 @@
</description>
</method>
<method name="transition_node_set_current">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="input_idx" type="int">
@@ -3720,6 +4452,8 @@
</description>
</method>
<method name="transition_node_set_input_auto_advance">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="input_idx" type="int">
@@ -3730,6 +4464,8 @@
</description>
</method>
<method name="transition_node_set_input_count">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="count" type="int">
@@ -3738,6 +4474,8 @@
</description>
</method>
<method name="transition_node_set_xfade_time">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="String">
</argument>
<argument index="1" name="time_sec" type="float">
@@ -3747,7 +4485,7 @@
</method>
</methods>
<members>
- <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" brief="">
+ <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" brief="" enum="AnimationTreePlayer.AnimationProcessMode">
</member>
</members>
<constants>
@@ -3936,7 +4674,7 @@
<method name="overlaps_area" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="area" type="Object">
+ <argument index="0" name="area" type="Node">
</argument>
<description>
Return whether the area passed is totally or partially inside this area.
@@ -3945,13 +4683,15 @@
<method name="overlaps_body" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="body" type="Object">
+ <argument index="0" name="body" type="Node">
</argument>
<description>
Return whether the body passed is totally or partially inside this area.
</description>
</method>
<method name="set_angular_damp">
+ <return type="void">
+ </return>
<argument index="0" name="angular_damp" type="float">
</argument>
<description>
@@ -3960,18 +4700,24 @@
</description>
</method>
<method name="set_audio_bus">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
</description>
</method>
<method name="set_audio_bus_override">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_collision_layer">
+ <return type="void">
+ </return>
<argument index="0" name="collision_layer" type="int">
</argument>
<description>
@@ -3981,6 +4727,8 @@
</description>
</method>
<method name="set_collision_layer_bit">
+ <return type="void">
+ </return>
<argument index="0" name="bit" type="int">
</argument>
<argument index="1" name="value" type="bool">
@@ -3990,6 +4738,8 @@
</description>
</method>
<method name="set_collision_mask">
+ <return type="void">
+ </return>
<argument index="0" name="collision_mask" type="int">
</argument>
<description>
@@ -3997,6 +4747,8 @@
</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">
@@ -4006,6 +4758,8 @@
</description>
</method>
<method name="set_gravity">
+ <return type="void">
+ </return>
<argument index="0" name="gravity" type="float">
</argument>
<description>
@@ -4014,6 +4768,8 @@
</description>
</method>
<method name="set_gravity_distance_scale">
+ <return type="void">
+ </return>
<argument index="0" name="distance_scale" type="float">
</argument>
<description>
@@ -4021,6 +4777,8 @@
</description>
</method>
<method name="set_gravity_is_point">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -4028,6 +4786,8 @@
</description>
</method>
<method name="set_gravity_vector">
+ <return type="void">
+ </return>
<argument index="0" name="vector" type="Vector3">
</argument>
<description>
@@ -4036,6 +4796,8 @@
</description>
</method>
<method name="set_linear_damp">
+ <return type="void">
+ </return>
<argument index="0" name="linear_damp" type="float">
</argument>
<description>
@@ -4044,6 +4806,8 @@
</description>
</method>
<method name="set_monitorable">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -4051,6 +4815,8 @@
</description>
</method>
<method name="set_monitoring">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -4058,33 +4824,43 @@
</description>
</method>
<method name="set_priority">
+ <return type="void">
+ </return>
<argument index="0" name="priority" type="float">
</argument>
<description>
- Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have an space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent.
+ Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have a space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent.
Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important.
</description>
</method>
<method name="set_reverb_amount">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_reverb_bus">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
</description>
</method>
<method name="set_reverb_uniformity">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_space_override_mode">
- <argument index="0" name="enable" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="int" enum="Area.SpaceOverride">
</argument>
<description>
Set the space override mode. This mode controls how an area affects gravity and damp.
@@ -4096,6 +4872,8 @@
</description>
</method>
<method name="set_use_reverb_bus">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -4127,7 +4905,7 @@
</member>
<member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring" brief="">
</member>
- <member name="priority" type="int" setter="set_priority" getter="get_priority" brief="">
+ <member name="priority" type="float" setter="set_priority" getter="get_priority" brief="">
</member>
<member name="reverb_bus_amount" type="float" setter="set_reverb_amount" getter="get_reverb_amount" brief="">
</member>
@@ -4137,7 +4915,7 @@
</member>
<member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity" brief="">
</member>
- <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" brief="">
+ <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" brief="" enum="Area.SpaceOverride">
</member>
</members>
<signals>
@@ -4364,7 +5142,7 @@
<method name="overlaps_area" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="area" type="Object">
+ <argument index="0" name="area" type="Node">
</argument>
<description>
Return whether the area passed is totally or partially inside this area.
@@ -4373,13 +5151,15 @@
<method name="overlaps_body" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="body" type="Object">
+ <argument index="0" name="body" type="Node">
</argument>
<description>
Return whether the body passed is totally or partially inside this area.
</description>
</method>
<method name="set_angular_damp">
+ <return type="void">
+ </return>
<argument index="0" name="angular_damp" type="float">
</argument>
<description>
@@ -4388,18 +5168,24 @@
</description>
</method>
<method name="set_audio_bus">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
</description>
</method>
<method name="set_audio_bus_override">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_collision_layer">
+ <return type="void">
+ </return>
<argument index="0" name="collision_layer" type="int">
</argument>
<description>
@@ -4409,6 +5195,8 @@
</description>
</method>
<method name="set_collision_layer_bit">
+ <return type="void">
+ </return>
<argument index="0" name="bit" type="int">
</argument>
<argument index="1" name="value" type="bool">
@@ -4418,6 +5206,8 @@
</description>
</method>
<method name="set_collision_mask">
+ <return type="void">
+ </return>
<argument index="0" name="collision_mask" type="int">
</argument>
<description>
@@ -4425,6 +5215,8 @@
</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">
@@ -4434,6 +5226,8 @@
</description>
</method>
<method name="set_gravity">
+ <return type="void">
+ </return>
<argument index="0" name="gravity" type="float">
</argument>
<description>
@@ -4442,6 +5236,8 @@
</description>
</method>
<method name="set_gravity_distance_scale">
+ <return type="void">
+ </return>
<argument index="0" name="distance_scale" type="float">
</argument>
<description>
@@ -4449,6 +5245,8 @@
</description>
</method>
<method name="set_gravity_is_point">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -4456,6 +5254,8 @@
</description>
</method>
<method name="set_gravity_vector">
+ <return type="void">
+ </return>
<argument index="0" name="vector" type="Vector2">
</argument>
<description>
@@ -4464,6 +5264,8 @@
</description>
</method>
<method name="set_linear_damp">
+ <return type="void">
+ </return>
<argument index="0" name="linear_damp" type="float">
</argument>
<description>
@@ -4472,6 +5274,8 @@
</description>
</method>
<method name="set_monitorable">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -4479,6 +5283,8 @@
</description>
</method>
<method name="set_monitoring">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -4486,15 +5292,19 @@
</description>
</method>
<method name="set_priority">
+ <return type="void">
+ </return>
<argument index="0" name="priority" type="float">
</argument>
<description>
- Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have an space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent.
+ Set the order in which the area is processed. Greater values mean the area gets processed first. This is useful for areas which have a space override different from AREA_SPACE_OVERRIDE_DISABLED or AREA_SPACE_OVERRIDE_COMBINE, as they replace values, and are thus order-dependent.
Areas with the same priority value get evaluated in an unpredictable order, and should be differentiated if evaluation order is to be important.
</description>
</method>
<method name="set_space_override_mode">
- <argument index="0" name="enable" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="int" enum="Area2D.SpaceOverride">
</argument>
<description>
Set the space override mode. This mode controls how an area affects gravity and damp.
@@ -4531,9 +5341,9 @@
</member>
<member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring" brief="">
</member>
- <member name="priority" type="int" setter="set_priority" getter="get_priority" brief="">
+ <member name="priority" type="float" setter="set_priority" getter="get_priority" brief="">
</member>
- <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" brief="">
+ <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" brief="" enum="Area2D.SpaceOverride">
</member>
</members>
<signals>
@@ -4874,19 +5684,23 @@
</description>
<methods>
<method name="add_blend_shape">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
</description>
</method>
<method name="add_surface_from_arrays">
- <argument index="0" name="primitive" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
</argument>
<argument index="1" name="arrays" type="Array">
</argument>
- <argument index="2" name="blend_shapes" type="Array" default="[]">
+ <argument index="2" name="blend_shapes" type="Array" default="null">
</argument>
- <argument index="3" name="compress_flags" type="int" default="97792">
+ <argument index="3" name="compress_flags" type="int" default="null">
</argument>
<description>
Create a new surface ([method get_surface_count] that will become surf_idx for this.
@@ -4894,10 +5708,14 @@
</description>
</method>
<method name="center_geometry">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="clear_blend_shapes">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -4935,16 +5753,22 @@
</description>
</method>
<method name="regen_normalmaps">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="set_blend_shape_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Mesh.BlendShapeMode">
</argument>
<description>
</description>
</method>
<method name="set_custom_aabb">
+ <return type="void">
+ </return>
<argument index="0" name="aabb" type="Rect3">
</argument>
<description>
@@ -5004,6 +5828,8 @@
</description>
</method>
<method name="surface_remove">
+ <return type="void">
+ </return>
<argument index="0" name="surf_idx" type="int">
</argument>
<description>
@@ -5011,6 +5837,8 @@
</description>
</method>
<method name="surface_set_material">
+ <return type="void">
+ </return>
<argument index="0" name="surf_idx" type="int">
</argument>
<argument index="1" name="material" type="Material">
@@ -5019,6 +5847,8 @@
</description>
</method>
<method name="surface_set_name">
+ <return type="void">
+ </return>
<argument index="0" name="surf_idx" type="int">
</argument>
<argument index="1" name="name" type="String">
@@ -5029,10 +5859,10 @@
</method>
</methods>
<constants>
- <constant name="NO_INDEX_ARRAY" value="-1">
+ <constant name="NO_INDEX_ARRAY" value="-1" enum="">
Default value used for index_array_len when no indices are present.
</constant>
- <constant name="ARRAY_WEIGHTS_SIZE" value="4">
+ <constant name="ARRAY_WEIGHTS_SIZE" value="4" enum="">
Amount of weights/bone indices per vertex (always 4).
</constant>
<constant name="ARRAY_VERTEX" value="0">
@@ -5062,6 +5892,8 @@
<constant name="ARRAY_INDEX" value="8">
Array of integers, used as indices referencing vertices. No index can be beyond the vertex array size.
</constant>
+ <constant name="ARRAY_MAX" value="9">
+ </constant>
<constant name="ARRAY_FORMAT_VERTEX" value="1">
Array format will include vertices (mandatory).
</constant>
@@ -5116,18 +5948,24 @@
</description>
</method>
<method name="set_atlas">
+ <return type="void">
+ </return>
<argument index="0" name="atlas" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_margin">
+ <return type="void">
+ </return>
<argument index="0" name="margin" type="Rect2">
</argument>
<description>
</description>
</method>
<method name="set_region">
+ <return type="void">
+ </return>
<argument index="0" name="region" type="Rect2">
</argument>
<description>
@@ -5142,12 +5980,6 @@
<member name="region" type="Rect2" setter="set_region" getter="get_region" brief="">
</member>
</members>
- <signals>
- <signal name="atlas_changed">
- <description>
- </description>
- </signal>
- </signals>
<constants>
</constants>
</class>
@@ -5184,6 +6016,8 @@
</description>
</method>
<method name="set_volume_db">
+ <return type="void">
+ </return>
<argument index="0" name="volume" type="float">
</argument>
<description>
@@ -5290,18 +6124,24 @@
</description>
</method>
<method name="set_dry">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_voice_count">
+ <return type="void">
+ </return>
<argument index="0" name="voices" type="int">
</argument>
<description>
</description>
</method>
<method name="set_voice_cutoff_hz">
+ <return type="void">
+ </return>
<argument index="0" name="voice_idx" type="int">
</argument>
<argument index="1" name="cutoff_hz" type="float">
@@ -5310,6 +6150,8 @@
</description>
</method>
<method name="set_voice_delay_ms">
+ <return type="void">
+ </return>
<argument index="0" name="voice_idx" type="int">
</argument>
<argument index="1" name="delay_ms" type="float">
@@ -5318,6 +6160,8 @@
</description>
</method>
<method name="set_voice_depth_ms">
+ <return type="void">
+ </return>
<argument index="0" name="voice_idx" type="int">
</argument>
<argument index="1" name="depth_ms" type="float">
@@ -5326,6 +6170,8 @@
</description>
</method>
<method name="set_voice_level_db">
+ <return type="void">
+ </return>
<argument index="0" name="voice_idx" type="int">
</argument>
<argument index="1" name="level_db" type="float">
@@ -5334,6 +6180,8 @@
</description>
</method>
<method name="set_voice_pan">
+ <return type="void">
+ </return>
<argument index="0" name="voice_idx" type="int">
</argument>
<argument index="1" name="pan" type="float">
@@ -5342,6 +6190,8 @@
</description>
</method>
<method name="set_voice_rate_hz">
+ <return type="void">
+ </return>
<argument index="0" name="voice_idx" type="int">
</argument>
<argument index="1" name="rate_hz" type="float">
@@ -5350,6 +6200,8 @@
</description>
</method>
<method name="set_wet">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
@@ -5464,42 +6316,56 @@
</description>
</method>
<method name="set_attack_us">
+ <return type="void">
+ </return>
<argument index="0" name="attack_us" type="float">
</argument>
<description>
</description>
</method>
<method name="set_gain">
+ <return type="void">
+ </return>
<argument index="0" name="gain" type="float">
</argument>
<description>
</description>
</method>
<method name="set_mix">
+ <return type="void">
+ </return>
<argument index="0" name="mix" type="float">
</argument>
<description>
</description>
</method>
<method name="set_ratio">
+ <return type="void">
+ </return>
<argument index="0" name="ratio" type="float">
</argument>
<description>
</description>
</method>
<method name="set_release_ms">
+ <return type="void">
+ </return>
<argument index="0" name="release_ms" type="float">
</argument>
<description>
</description>
</method>
<method name="set_sidechain">
+ <return type="void">
+ </return>
<argument index="0" name="sidechain" type="String">
</argument>
<description>
</description>
</method>
<method name="set_threshold">
+ <return type="void">
+ </return>
<argument index="0" name="threshold" type="float">
</argument>
<description>
@@ -5517,7 +6383,7 @@
</member>
<member name="release_ms" type="float" setter="set_release_ms" getter="get_release_ms" brief="">
</member>
- <member name="sidechain" type="float" setter="set_sidechain" getter="get_sidechain" brief="">
+ <member name="sidechain" type="String" setter="set_sidechain" getter="get_sidechain" brief="">
</member>
<member name="threshold" type="float" setter="set_threshold" getter="get_threshold" brief="">
</member>
@@ -5610,78 +6476,104 @@
</description>
</method>
<method name="set_dry">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_feedback_active">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_feedback_delay_ms">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_feedback_level_db">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_feedback_lowpass">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_tap1_active">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_tap1_delay_ms">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_tap1_level_db">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_tap1_pan">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_tap2_active">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_tap2_delay_ms">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_tap2_level_db">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_tap2_pan">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
@@ -5756,30 +6648,40 @@
</description>
</method>
<method name="set_drive">
+ <return type="void">
+ </return>
<argument index="0" name="drive" type="float">
</argument>
<description>
</description>
</method>
<method name="set_keep_hf_hz">
+ <return type="void">
+ </return>
<argument index="0" name="keep_hf_hz" type="float">
</argument>
<description>
</description>
</method>
<method name="set_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="AudioEffectDistortion.Mode">
</argument>
<description>
</description>
</method>
<method name="set_post_gain">
+ <return type="void">
+ </return>
<argument index="0" name="post_gain" type="float">
</argument>
<description>
</description>
</method>
<method name="set_pre_gain">
+ <return type="void">
+ </return>
<argument index="0" name="pre_gain" type="float">
</argument>
<description>
@@ -5791,7 +6693,7 @@
</member>
<member name="keep_hf_hz" type="float" setter="set_keep_hf_hz" getter="get_keep_hf_hz" brief="">
</member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="">
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="AudioEffectDistortion.Mode">
</member>
<member name="post_gain" type="float" setter="set_post_gain" getter="get_post_gain" brief="">
</member>
@@ -5822,6 +6724,8 @@
</description>
</method>
<method name="set_band_gain_db">
+ <return type="void">
+ </return>
<argument index="0" name="band_idx" type="int">
</argument>
<argument index="1" name="volume_db" type="float">
@@ -5894,24 +6798,32 @@
</description>
</method>
<method name="set_cutoff">
+ <return type="void">
+ </return>
<argument index="0" name="freq" type="float">
</argument>
<description>
</description>
</method>
<method name="set_db">
- <argument index="0" name="amount" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="amount" type="int" enum="AudioEffectFilter.FilterDB">
</argument>
<description>
</description>
</method>
<method name="set_gain">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_resonance">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
@@ -5921,7 +6833,7 @@
<members>
<member name="cutoff_hz" type="float" setter="set_cutoff" getter="get_cutoff" brief="">
</member>
- <member name="dB" type="int" setter="set_db" getter="get_db" brief="">
+ <member name="dB" type="int" setter="set_db" getter="get_db" brief="" enum="AudioEffectFilter.FilterDB">
</member>
<member name="gain" type="float" setter="set_gain" getter="get_gain" brief="">
</member>
@@ -5982,24 +6894,32 @@
</description>
</method>
<method name="set_ceiling_db">
+ <return type="void">
+ </return>
<argument index="0" name="ceiling" type="float">
</argument>
<description>
</description>
</method>
<method name="set_soft_clip_db">
+ <return type="void">
+ </return>
<argument index="0" name="soft_clip" type="float">
</argument>
<description>
</description>
</method>
<method name="set_soft_clip_ratio">
+ <return type="void">
+ </return>
<argument index="0" name="soft_clip" type="float">
</argument>
<description>
</description>
</method>
<method name="set_threshold_db">
+ <return type="void">
+ </return>
<argument index="0" name="threshold" type="float">
</argument>
<description>
@@ -6062,6 +6982,8 @@
</description>
</method>
<method name="set_pan">
+ <return type="void">
+ </return>
<argument index="0" name="cpanume" type="float">
</argument>
<description>
@@ -6112,30 +7034,40 @@
</description>
</method>
<method name="set_depth">
+ <return type="void">
+ </return>
<argument index="0" name="depth" type="float">
</argument>
<description>
</description>
</method>
<method name="set_feedback">
+ <return type="void">
+ </return>
<argument index="0" name="fbk" type="float">
</argument>
<description>
</description>
</method>
<method name="set_range_max_hz">
+ <return type="void">
+ </return>
<argument index="0" name="hz" type="float">
</argument>
<description>
</description>
</method>
<method name="set_range_min_hz">
+ <return type="void">
+ </return>
<argument index="0" name="hz" type="float">
</argument>
<description>
</description>
</method>
<method name="set_rate_hz">
+ <return type="void">
+ </return>
<argument index="0" name="hz" type="float">
</argument>
<description>
@@ -6170,6 +7102,8 @@
</description>
</method>
<method name="set_pitch_scale">
+ <return type="void">
+ </return>
<argument index="0" name="rate" type="float">
</argument>
<description>
@@ -6238,48 +7172,64 @@
</description>
</method>
<method name="set_damping">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_dry">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_hpf">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_predelay_feedback">
+ <return type="void">
+ </return>
<argument index="0" name="feedback" type="float">
</argument>
<description>
</description>
</method>
<method name="set_predelay_msec">
+ <return type="void">
+ </return>
<argument index="0" name="msec" type="float">
</argument>
<description>
</description>
</method>
<method name="set_room_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="float">
</argument>
<description>
</description>
</method>
<method name="set_spread">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_wet">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
@@ -6332,18 +7282,24 @@
</description>
</method>
<method name="set_pan_pullout">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_surround">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_time_pullout">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
@@ -6370,17 +7326,21 @@
</description>
<methods>
<method name="add_bus">
+ <return type="void">
+ </return>
<argument index="0" name="at_pos" type="int" default="-1">
</argument>
<description>
</description>
</method>
<method name="add_bus_effect">
+ <return type="void">
+ </return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect" type="AudioEffect">
</argument>
- <argument index="2" name="arg2" type="int" default="-1">
+ <argument index="2" name="at_pos" type="int" default="null">
</argument>
<description>
</description>
@@ -6408,12 +7368,10 @@
</description>
</method>
<method name="get_bus_effect_count">
+ <return type="int">
+ </return>
<argument index="0" name="bus_idx" type="int">
</argument>
- <argument index="1" name="arg1" type="Object">
- </argument>
- <argument index="2" name="arg2" type="int">
- </argument>
<description>
</description>
</method>
@@ -6516,10 +7474,14 @@
</description>
</method>
<method name="lock">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="move_bus">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="int">
</argument>
<argument index="1" name="to_index" type="int">
@@ -6528,12 +7490,16 @@
</description>
</method>
<method name="remove_bus">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="remove_bus_effect">
+ <return type="void">
+ </return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect_idx" type="int">
@@ -6542,6 +7508,8 @@
</description>
</method>
<method name="set_bus_bypass_effects">
+ <return type="void">
+ </return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="enable" type="bool">
@@ -6550,12 +7518,16 @@
</description>
</method>
<method name="set_bus_count">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="int">
</argument>
<description>
</description>
</method>
<method name="set_bus_effect_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect_idx" type="int">
@@ -6566,12 +7538,16 @@
</description>
</method>
<method name="set_bus_layout">
+ <return type="void">
+ </return>
<argument index="0" name="bus_layout" type="AudioBusLayout">
</argument>
<description>
</description>
</method>
<method name="set_bus_mute">
+ <return type="void">
+ </return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="enable" type="bool">
@@ -6580,6 +7556,8 @@
</description>
</method>
<method name="set_bus_name">
+ <return type="void">
+ </return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="name" type="String">
@@ -6588,6 +7566,8 @@
</description>
</method>
<method name="set_bus_send">
+ <return type="void">
+ </return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="send" type="String">
@@ -6596,6 +7576,8 @@
</description>
</method>
<method name="set_bus_solo">
+ <return type="void">
+ </return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="enable" type="bool">
@@ -6604,6 +7586,8 @@
</description>
</method>
<method name="set_bus_volume_db">
+ <return type="void">
+ </return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="volume_db" type="float">
@@ -6612,6 +7596,8 @@
</description>
</method>
<method name="swap_bus_effects">
+ <return type="void">
+ </return>
<argument index="0" name="bus_idx" type="int">
</argument>
<argument index="1" name="effect_idx" type="int">
@@ -6622,6 +7608,8 @@
</description>
</method>
<method name="unlock">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -6661,6 +7649,12 @@
<description>
</description>
</method>
+ <method name="get_loop_offset" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="has_loop" qualifiers="const">
<return type="bool">
</return>
@@ -6668,23 +7662,37 @@
</description>
</method>
<method name="set_data">
+ <return type="void">
+ </return>
<argument index="0" name="data" type="PoolByteArray">
</argument>
<description>
</description>
</method>
<method name="set_loop">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
+ <method name="set_loop_offset">
+ <return type="void">
+ </return>
+ <argument index="0" name="seconds" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
</methods>
<members>
<member name="data" type="PoolByteArray" setter="set_data" getter="get_data" brief="">
</member>
<member name="loop" type="bool" setter="set_loop" getter="has_loop" brief="">
</member>
+ <member name="loop_offset" type="float" setter="set_loop_offset" getter="get_loop_offset" brief="">
+ </member>
</members>
<constants>
</constants>
@@ -6724,7 +7732,7 @@
</description>
</method>
<method name="get_stream" qualifiers="const">
- <return type="Object">
+ <return type="AudioStream">
</return>
<description>
</description>
@@ -6748,48 +7756,64 @@
</description>
</method>
<method name="play">
- <argument index="0" name="from_pos" type="float" default="0">
+ <return type="void">
+ </return>
+ <argument index="0" name="from_pos" type="float" default="0.0">
</argument>
<description>
</description>
</method>
<method name="seek">
+ <return type="void">
+ </return>
<argument index="0" name="to_pos" type="float">
</argument>
<description>
</description>
</method>
<method name="set_autoplay">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_bus">
+ <return type="void">
+ </return>
<argument index="0" name="bus" type="String">
</argument>
<description>
</description>
</method>
<method name="set_mix_target">
- <argument index="0" name="mix_target" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mix_target" type="int" enum="AudioStreamPlayer.MixTarget">
</argument>
<description>
</description>
</method>
<method name="set_stream">
+ <return type="void">
+ </return>
<argument index="0" name="stream" type="AudioStream">
</argument>
<description>
</description>
</method>
<method name="set_volume_db">
+ <return type="void">
+ </return>
<argument index="0" name="volume_db" type="float">
</argument>
<description>
</description>
</method>
<method name="stop">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -6799,7 +7823,7 @@
</member>
<member name="bus" type="String" setter="set_bus" getter="get_bus" brief="">
</member>
- <member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" brief="">
+ <member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" brief="" enum="AudioStreamPlayer.MixTarget">
</member>
<member name="playing" type="bool" setter="_set_playing" getter="_is_active" brief="">
</member>
@@ -6808,6 +7832,12 @@
<member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" brief="">
</member>
</members>
+ <signals>
+ <signal name="finished">
+ <description>
+ </description>
+ </signal>
+ </signals>
<constants>
</constants>
</class>
@@ -6848,7 +7878,7 @@
</description>
</method>
<method name="get_stream" qualifiers="const">
- <return type="Object">
+ <return type="AudioStream">
</return>
<description>
</description>
@@ -6872,60 +7902,80 @@
</description>
</method>
<method name="play">
- <argument index="0" name="from_pos" type="float" default="0">
+ <return type="void">
+ </return>
+ <argument index="0" name="from_pos" type="float" default="0.0">
</argument>
<description>
</description>
</method>
<method name="seek">
+ <return type="void">
+ </return>
<argument index="0" name="to_pos" type="float">
</argument>
<description>
</description>
</method>
<method name="set_area_mask">
+ <return type="void">
+ </return>
<argument index="0" name="mask" type="int">
</argument>
<description>
</description>
</method>
<method name="set_attenuation">
+ <return type="void">
+ </return>
<argument index="0" name="curve" type="float">
</argument>
<description>
</description>
</method>
<method name="set_autoplay">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_bus">
+ <return type="void">
+ </return>
<argument index="0" name="bus" type="String">
</argument>
<description>
</description>
</method>
<method name="set_max_distance">
+ <return type="void">
+ </return>
<argument index="0" name="pixels" type="float">
</argument>
<description>
</description>
</method>
<method name="set_stream">
+ <return type="void">
+ </return>
<argument index="0" name="stream" type="AudioStream">
</argument>
<description>
</description>
</method>
<method name="set_volume_db">
+ <return type="void">
+ </return>
<argument index="0" name="volume_db" type="float">
</argument>
<description>
</description>
</method>
<method name="stop">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -6948,6 +7998,12 @@
<member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" brief="">
</member>
</members>
+ <signals>
+ <signal name="finished">
+ <description>
+ </description>
+ </signal>
+ </signals>
<constants>
</constants>
</class>
@@ -7030,7 +8086,7 @@
</description>
</method>
<method name="get_stream" qualifiers="const">
- <return type="Object">
+ <return type="AudioStream">
</return>
<description>
</description>
@@ -7066,114 +8122,152 @@
</description>
</method>
<method name="play">
- <argument index="0" name="from_pos" type="float" default="0">
+ <return type="void">
+ </return>
+ <argument index="0" name="from_pos" type="float" default="0.0">
</argument>
<description>
</description>
</method>
<method name="seek">
+ <return type="void">
+ </return>
<argument index="0" name="to_pos" type="float">
</argument>
<description>
</description>
</method>
<method name="set_area_mask">
+ <return type="void">
+ </return>
<argument index="0" name="mask" type="int">
</argument>
<description>
</description>
</method>
<method name="set_attenuation_filter_cutoff_hz">
+ <return type="void">
+ </return>
<argument index="0" name="degrees" type="float">
</argument>
<description>
</description>
</method>
<method name="set_attenuation_filter_db">
+ <return type="void">
+ </return>
<argument index="0" name="db" type="float">
</argument>
<description>
</description>
</method>
<method name="set_attenuation_model">
- <argument index="0" name="model" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="model" type="int" enum="AudioStreamPlayer3D.AttenuationModel">
</argument>
<description>
</description>
</method>
<method name="set_autoplay">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_bus">
+ <return type="void">
+ </return>
<argument index="0" name="bus" type="String">
</argument>
<description>
</description>
</method>
<method name="set_doppler_tracking">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="AudioStreamPlayer3D.DopplerTracking">
</argument>
<description>
</description>
</method>
<method name="set_emission_angle">
+ <return type="void">
+ </return>
<argument index="0" name="degrees" type="float">
</argument>
<description>
</description>
</method>
<method name="set_emission_angle_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_emission_angle_filter_attenuation_db">
+ <return type="void">
+ </return>
<argument index="0" name="db" type="float">
</argument>
<description>
</description>
</method>
<method name="set_max_db">
+ <return type="void">
+ </return>
<argument index="0" name="max_db" type="float">
</argument>
<description>
</description>
</method>
<method name="set_max_distance">
+ <return type="void">
+ </return>
<argument index="0" name="metres" type="float">
</argument>
<description>
</description>
</method>
<method name="set_out_of_range_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="AudioStreamPlayer3D.OutOfRangeMode">
</argument>
<description>
</description>
</method>
<method name="set_stream">
+ <return type="void">
+ </return>
<argument index="0" name="stream" type="AudioStream">
</argument>
<description>
</description>
</method>
<method name="set_unit_db">
+ <return type="void">
+ </return>
<argument index="0" name="unit_db" type="float">
</argument>
<description>
</description>
</method>
<method name="set_unit_size">
+ <return type="void">
+ </return>
<argument index="0" name="unit_size" type="float">
</argument>
<description>
</description>
</method>
<method name="stop">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -7185,13 +8279,13 @@
</member>
<member name="attenuation_filter_db" type="float" setter="set_attenuation_filter_db" getter="get_attenuation_filter_db" brief="">
</member>
- <member name="attenuation_model" type="int" setter="set_attenuation_model" getter="get_attenuation_model" brief="">
+ <member name="attenuation_model" type="int" setter="set_attenuation_model" getter="get_attenuation_model" brief="" enum="AudioStreamPlayer3D.AttenuationModel">
</member>
<member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" brief="">
</member>
<member name="bus" type="String" setter="set_bus" getter="get_bus" brief="">
</member>
- <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" brief="">
+ <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" brief="" enum="AudioStreamPlayer3D.DopplerTracking">
</member>
<member name="emission_angle_degrees" type="float" setter="set_emission_angle" getter="get_emission_angle" brief="">
</member>
@@ -7203,7 +8297,7 @@
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" brief="">
</member>
- <member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" brief="">
+ <member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" brief="" enum="AudioStreamPlayer3D.OutOfRangeMode">
</member>
<member name="playing" type="bool" setter="_set_playing" getter="_is_active" brief="">
</member>
@@ -7214,6 +8308,12 @@
<member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size" brief="">
</member>
</members>
+ <signals>
+ <signal name="finished">
+ <description>
+ </description>
+ </signal>
+ </signals>
<constants>
<constant name="ATTENUATION_INVERSE_DISTANCE" value="0">
</constant>
@@ -7240,7 +8340,7 @@
</description>
<methods>
<method name="get_audio_stream" qualifiers="const">
- <return type="Object">
+ <return type="AudioStream">
</return>
<description>
</description>
@@ -7252,12 +8352,16 @@
</description>
</method>
<method name="set_audio_stream">
- <argument index="0" name="stream" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="stream" type="AudioStream">
</argument>
<description>
</description>
</method>
<method name="set_random_pitch">
+ <return type="void">
+ </return>
<argument index="0" name="scale" type="float">
</argument>
<description>
@@ -7322,42 +8426,56 @@
</description>
</method>
<method name="set_data">
+ <return type="void">
+ </return>
<argument index="0" name="data" type="PoolByteArray">
</argument>
<description>
</description>
</method>
<method name="set_format">
- <argument index="0" name="format" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="format" type="int" enum="AudioStreamSample.Format">
</argument>
<description>
</description>
</method>
<method name="set_loop_begin">
+ <return type="void">
+ </return>
<argument index="0" name="loop_begin" type="int">
</argument>
<description>
</description>
</method>
<method name="set_loop_end">
+ <return type="void">
+ </return>
<argument index="0" name="loop_end" type="int">
</argument>
<description>
</description>
</method>
<method name="set_loop_mode">
- <argument index="0" name="loop_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="loop_mode" type="int" enum="AudioStreamSample.LoopMode">
</argument>
<description>
</description>
</method>
<method name="set_mix_rate">
+ <return type="void">
+ </return>
<argument index="0" name="mix_rate" type="int">
</argument>
<description>
</description>
</method>
<method name="set_stereo">
+ <return type="void">
+ </return>
<argument index="0" name="stereo" type="bool">
</argument>
<description>
@@ -7367,13 +8485,13 @@
<members>
<member name="data" type="PoolByteArray" setter="set_data" getter="get_data" brief="">
</member>
- <member name="format" type="int" setter="set_format" getter="get_format" brief="">
+ <member name="format" type="int" setter="set_format" getter="get_format" brief="" enum="AudioStreamSample.Format">
</member>
<member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin" brief="">
</member>
<member name="loop_end" type="int" setter="set_loop_end" getter="get_loop_end" brief="">
</member>
- <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" brief="">
+ <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" brief="" enum="AudioStreamSample.LoopMode">
</member>
<member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" brief="">
</member>
@@ -7406,13 +8524,17 @@
</description>
</method>
<method name="set_copy_mode">
- <argument index="0" name="copy_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="copy_mode" type="int" enum="BackBufferCopy.CopyMode">
</argument>
<description>
Set the copy mode of the BackBufferCopy (refer to constants section).
</description>
</method>
<method name="set_rect">
+ <return type="void">
+ </return>
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
@@ -7421,7 +8543,7 @@
</method>
</methods>
<members>
- <member name="copy_mode" type="int" setter="set_copy_mode" getter="get_copy_mode" brief="">
+ <member name="copy_mode" type="int" setter="set_copy_mode" getter="get_copy_mode" brief="" enum="BackBufferCopy.CopyMode">
</member>
<member name="rect" type="Rect2" setter="set_rect" getter="get_rect" brief="">
</member>
@@ -7447,11 +8569,15 @@
</description>
<methods>
<method name="_pressed" qualifiers="virtual">
+ <return type="void">
+ </return>
<description>
Called when button is pressed.
</description>
</method>
<method name="_toggled" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="pressed" type="bool">
</argument>
<description>
@@ -7466,7 +8592,7 @@
</description>
</method>
<method name="get_button_group" qualifiers="const">
- <return type="Object">
+ <return type="ButtonGroup">
</return>
<description>
</description>
@@ -7486,7 +8612,7 @@
</description>
</method>
<method name="get_shortcut" qualifiers="const">
- <return type="Object">
+ <return type="ShortCut">
</return>
<description>
</description>
@@ -7520,19 +8646,25 @@
</description>
</method>
<method name="set_action_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="BaseButton.ActionMode">
</argument>
<description>
Set the current mode of action, determining when the button is considered clicked (see the ACTION_MODE_* constants).
</description>
</method>
<method name="set_button_group">
- <argument index="0" name="button_group" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="button_group" type="ButtonGroup">
</argument>
<description>
</description>
</method>
<method name="set_disabled">
+ <return type="void">
+ </return>
<argument index="0" name="disabled" type="bool">
</argument>
<description>
@@ -7540,13 +8672,17 @@
</description>
</method>
<method name="set_enabled_focus_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Control.FocusMode">
</argument>
<description>
Sets the focus access mode to use when switching between enabled/disabled (see [method Control.set_focus_mode] and [method set_disabled]).
</description>
</method>
<method name="set_pressed">
+ <return type="void">
+ </return>
<argument index="0" name="pressed" type="bool">
</argument>
<description>
@@ -7554,12 +8690,16 @@
</description>
</method>
<method name="set_shortcut">
- <argument index="0" name="shortcut" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="shortcut" type="ShortCut">
</argument>
<description>
</description>
</method>
<method name="set_toggle_mode">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -7568,15 +8708,15 @@
</method>
</methods>
<members>
- <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" brief="">
+ <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" brief="" enum="BaseButton.ActionMode">
</member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" brief="">
</member>
- <member name="enabled_focus_mode" type="int" setter="set_enabled_focus_mode" getter="get_enabled_focus_mode" brief="">
+ <member name="enabled_focus_mode" type="int" setter="set_enabled_focus_mode" getter="get_enabled_focus_mode" brief="" enum="Control.FocusMode">
</member>
<member name="group" type="ButtonGroup" setter="set_button_group" getter="get_button_group" brief="">
</member>
- <member name="is_pressed" type="bool" setter="set_pressed" getter="is_pressed" brief="">
+ <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" brief="">
</member>
<member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut" brief="">
</member>
@@ -7741,29 +8881,6 @@
Introduce an additional scaling specified by the given 3D scaling factor. Only relevant when the matrix is being used as a part of [Transform].
</description>
</method>
- <method name="set_rotation_axis_angle">
- <argument index="0" name="axis" type="Vector3">
- </argument>
- <argument index="1" name="angle" type="float">
- </argument>
- <description>
- Changes only the rotation part of the [Basis] to a rotation around given axis by phi, while preserving the scaling part (as determined by get_scale).
- </description>
- </method>
- <method name="set_rotation_euler">
- <argument index="0" name="euler" type="Vector3">
- </argument>
- <description>
- Changes only the rotation part of the [Basis] to a rotation corresponding to given Euler angles, while preserving the scaling part (as determined by get_scale).
- </description>
- </method>
- <method name="set_scale">
- <argument index="0" name="scale" type="Vector3">
- </argument>
- <description>
- Changes only the scaling part of the Basis to the specified scaling, while preserving the rotation part (as determined by get_rotation).
- </description>
- </method>
<method name="tdotx">
<return type="float">
</return>
@@ -7835,13 +8952,17 @@
</description>
<methods>
<method name="create">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="create_from_image_alpha">
- <argument index="0" name="image" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="image" type="Image">
</argument>
<description>
</description>
@@ -7867,6 +8988,8 @@
</description>
</method>
<method name="set_bit">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector2">
</argument>
<argument index="1" name="bit" type="bool">
@@ -7875,6 +8998,8 @@
</description>
</method>
<method name="set_bit_rect">
+ <return type="void">
+ </return>
<argument index="0" name="p_rect" type="Rect2">
</argument>
<argument index="1" name="bit" type="bool">
@@ -7897,21 +9022,25 @@
</description>
<methods>
<method name="add_char">
+ <return type="void">
+ </return>
<argument index="0" name="character" type="int">
</argument>
<argument index="1" name="texture" type="int">
</argument>
<argument index="2" name="rect" type="Rect2">
</argument>
- <argument index="3" name="align" type="Vector2" default="Vector2(0, 0)">
+ <argument index="3" name="align" type="Vector2" default="null">
</argument>
- <argument index="4" name="advance" type="float" default="-1">
+ <argument index="4" name="advance" type="float" default="null">
</argument>
<description>
Add a character to the font, where [i]character[/i] is the unicode value, [i]texture[/i] is the texture index, [i]rect[/i] is the region in the texture (in pixels!), [i]align[/i] is the (optional) alignment for the character and [i]advance[/i] is the (optional) advance.
</description>
</method>
<method name="add_kerning_pair">
+ <return type="void">
+ </return>
<argument index="0" name="char_a" type="int">
</argument>
<argument index="1" name="char_b" type="int">
@@ -7923,6 +9052,8 @@
</description>
</method>
<method name="add_texture">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
@@ -7930,6 +9061,8 @@
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clear all the font data.
</description>
@@ -7947,14 +9080,14 @@
</return>
<argument index="0" name="char" type="int">
</argument>
- <argument index="1" name="next" type="int" default="0">
+ <argument index="1" name="next" type="int" default="null">
</argument>
<description>
Return the size of a character, optionally taking kerning into account if the next character is provided.
</description>
</method>
<method name="get_fallback" qualifiers="const">
- <return type="Object">
+ <return type="BitmapFont">
</return>
<description>
</description>
@@ -7985,6 +9118,8 @@
</description>
</method>
<method name="set_ascent">
+ <return type="void">
+ </return>
<argument index="0" name="px" type="float">
</argument>
<description>
@@ -7992,18 +9127,24 @@
</description>
</method>
<method name="set_distance_field_hint">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_fallback">
- <argument index="0" name="fallback" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="fallback" type="BitmapFont">
</argument>
<description>
</description>
</method>
<method name="set_height">
+ <return type="void">
+ </return>
<argument index="0" name="px" type="float">
</argument>
<description>
@@ -8045,6 +9186,8 @@
</description>
</method>
<method name="set_bone_name">
+ <return type="void">
+ </return>
<argument index="0" name="bone_name" type="String">
</argument>
<description>
@@ -8063,6 +9206,8 @@
</description>
<methods>
<method name="add_spacer">
+ <return type="void">
+ </return>
<argument index="0" name="begin" type="bool">
</argument>
<description>
@@ -8078,7 +9223,9 @@
</description>
</method>
<method name="set_alignment">
- <argument index="0" name="alignment" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="alignment" type="int" enum="BoxContainer.AlignMode">
</argument>
<description>
Set the alignment of children in the container(Must be one of ALIGN_BEGIN, ALIGN_CENTER or ALIGN_END).
@@ -8086,7 +9233,7 @@
</method>
</methods>
<members>
- <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" brief="">
+ <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" brief="" enum="BoxContainer.AlignMode">
</member>
</members>
<constants>
@@ -8117,6 +9264,8 @@
</description>
</method>
<method name="set_extents">
+ <return type="void">
+ </return>
<argument index="0" name="extents" type="Vector3">
</argument>
<description>
@@ -8175,6 +9324,8 @@
</description>
</method>
<method name="set_button_icon">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
@@ -8182,6 +9333,8 @@
</description>
</method>
<method name="set_clip_text">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -8189,6 +9342,8 @@
</description>
</method>
<method name="set_flat">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -8196,6 +9351,8 @@
</description>
</method>
<method name="set_text">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
<description>
@@ -8203,7 +9360,9 @@
</description>
</method>
<method name="set_text_align">
- <argument index="0" name="align" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="align" type="int" enum="Button.TextAlign">
</argument>
<description>
Set the text alignment policy, using one of the ALIGN_* constants.
@@ -8211,7 +9370,7 @@
</method>
</methods>
<members>
- <member name="align" type="int" setter="set_text_align" getter="get_text_align" brief="">
+ <member name="align" type="int" setter="set_text_align" getter="get_text_align" brief="" enum="Button.TextAlign">
</member>
<member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" brief="">
</member>
@@ -8290,6 +9449,8 @@
</description>
<methods>
<method name="clear_current">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -8382,6 +9543,8 @@
</description>
</method>
<method name="make_current">
+ <return type="void">
+ </return>
<description>
Make this camera the current Camera for the [Viewport] (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added.
</description>
@@ -8421,36 +9584,48 @@
</description>
</method>
<method name="set_cull_mask">
+ <return type="void">
+ </return>
<argument index="0" name="mask" type="int">
</argument>
<description>
</description>
</method>
<method name="set_doppler_tracking">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Camera.DopplerTracking">
</argument>
<description>
</description>
</method>
<method name="set_environment">
+ <return type="void">
+ </return>
<argument index="0" name="env" type="Environment">
</argument>
<description>
</description>
</method>
<method name="set_h_offset">
+ <return type="void">
+ </return>
<argument index="0" name="ofs" type="float">
</argument>
<description>
</description>
</method>
<method name="set_keep_aspect_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Camera.KeepAspect">
</argument>
<description>
</description>
</method>
<method name="set_orthogonal">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="float">
</argument>
<argument index="1" name="z_near" type="float">
@@ -8462,6 +9637,8 @@
</description>
</method>
<method name="set_perspective">
+ <return type="void">
+ </return>
<argument index="0" name="fov" type="float">
</argument>
<argument index="1" name="z_near" type="float">
@@ -8473,6 +9650,8 @@
</description>
</method>
<method name="set_v_offset">
+ <return type="void">
+ </return>
<argument index="0" name="ofs" type="float">
</argument>
<description>
@@ -8517,15 +9696,21 @@
</description>
<methods>
<method name="align">
+ <return type="void">
+ </return>
<description>
Align the camera to the tracked node
</description>
</method>
<method name="clear_current">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="force_update_scroll">
+ <return type="void">
+ </return>
<description>
Force the camera to update scroll immediately.
</description>
@@ -8550,7 +9735,7 @@
</description>
</method>
<method name="get_custom_viewport" qualifiers="const">
- <return type="Viewport">
+ <return type="Node">
</return>
<description>
</description>
@@ -8558,7 +9743,7 @@
<method name="get_drag_margin" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="margin" type="int">
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
Return the margins needed to drag the camera (see [method set_drag_margin]).
@@ -8579,7 +9764,7 @@
<method name="get_limit" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="margin" type="int">
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
Return the scrolling limit in pixels.
@@ -8660,30 +9845,40 @@
</description>
</method>
<method name="make_current">
+ <return type="void">
+ </return>
<description>
Make this the current 2D camera for the scene (viewport and layer), in case there's many cameras in the scene.
</description>
</method>
<method name="reset_smoothing">
+ <return type="void">
+ </return>
<description>
Set the camera's position immediately to its current smoothing destination.
This has no effect if smoothing is disabled.
</description>
</method>
<method name="set_anchor_mode">
- <argument index="0" name="anchor_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="anchor_mode" type="int" enum="Camera2D.AnchorMode">
</argument>
<description>
</description>
</method>
<method name="set_custom_viewport">
- <argument index="0" name="viewport" type="Viewport">
+ <return type="void">
+ </return>
+ <argument index="0" name="viewport" type="Node">
</argument>
<description>
</description>
</method>
<method name="set_drag_margin">
- <argument index="0" name="margin" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<argument index="1" name="drag_margin" type="float">
</argument>
@@ -8692,31 +9887,41 @@
</description>
</method>
<method name="set_enable_follow_smoothing">
+ <return type="void">
+ </return>
<argument index="0" name="follow_smoothing" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_follow_smoothing">
+ <return type="void">
+ </return>
<argument index="0" name="follow_smoothing" type="float">
</argument>
<description>
</description>
</method>
<method name="set_h_drag_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_h_offset">
+ <return type="void">
+ </return>
<argument index="0" name="ofs" type="float">
</argument>
<description>
</description>
</method>
<method name="set_limit">
- <argument index="0" name="margin" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<argument index="1" name="limit" type="int">
</argument>
@@ -8725,12 +9930,16 @@
</description>
</method>
<method name="set_limit_drawing_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="limit_drawing_enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_limit_smoothing_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="limit_smoothing_enabled" type="bool">
</argument>
<description>
@@ -8739,12 +9948,16 @@
</description>
</method>
<method name="set_margin_drawing_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="margin_drawing_enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_offset">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
@@ -8752,30 +9965,40 @@
</description>
</method>
<method name="set_rotating">
+ <return type="void">
+ </return>
<argument index="0" name="rotating" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_screen_drawing_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="screen_drawing_enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_v_drag_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_v_offset">
+ <return type="void">
+ </return>
<argument index="0" name="ofs" type="float">
</argument>
<description>
</description>
</method>
<method name="set_zoom">
+ <return type="void">
+ </return>
<argument index="0" name="zoom" type="Vector2">
</argument>
<description>
@@ -8783,7 +10006,7 @@
</method>
</methods>
<members>
- <member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" brief="">
+ <member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" brief="" enum="Camera2D.AnchorMode">
</member>
<member name="current" type="bool" setter="_set_current" getter="is_current" brief="">
</member>
@@ -8846,6 +10069,8 @@
</description>
<methods>
<method name="_draw" qualifiers="virtual">
+ <return type="void">
+ </return>
<description>
Called (if exists) to draw the canvas item.
</description>
@@ -8861,13 +10086,15 @@
</argument>
<argument index="3" name="next" type="String">
</argument>
- <argument index="4" name="modulate" type="Color" default="Color(1,1,1,1)">
+ <argument index="4" name="modulate" type="Color" default="null">
</argument>
<description>
Draw a string character using a custom font. Returns the advance, depending on the char width and kerning with an optional next char.
</description>
</method>
<method name="draw_circle">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector2">
</argument>
<argument index="1" name="radius" type="float">
@@ -8879,103 +10106,123 @@
</description>
</method>
<method name="draw_colored_polygon">
+ <return type="void">
+ </return>
<argument index="0" name="points" type="PoolVector2Array">
</argument>
<argument index="1" name="color" type="Color">
</argument>
- <argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array([])">
+ <argument index="2" name="uvs" type="PoolVector2Array" default="null">
</argument>
- <argument index="3" name="texture" type="Texture" default="NULL">
+ <argument index="3" name="texture" type="Texture" default="PoolVector2Array( )">
</argument>
- <argument index="4" name="normal_map" type="Texture" default="NULL">
+ <argument index="4" name="normal_map" type="Texture" default="null">
+ </argument>
+ <argument index="5" name="antialiased" type="bool" default="null">
</argument>
<description>
Draw a colored polygon of any amount of points, convex or concave.
</description>
</method>
<method name="draw_line">
+ <return type="void">
+ </return>
<argument index="0" name="from" type="Vector2">
</argument>
<argument index="1" name="to" type="Vector2">
</argument>
<argument index="2" name="color" type="Color">
</argument>
- <argument index="3" name="width" type="float" default="1">
+ <argument index="3" name="width" type="float" default="null">
</argument>
- <argument index="4" name="antialiased" type="bool" default="false">
+ <argument index="4" name="antialiased" type="bool" default="null">
</argument>
<description>
Draw a line from a 2D point to another, with a given color and width. It can be optionally antialiased.
</description>
</method>
<method name="draw_polygon">
+ <return type="void">
+ </return>
<argument index="0" name="points" type="PoolVector2Array">
</argument>
<argument index="1" name="colors" type="PoolColorArray">
</argument>
- <argument index="2" name="uvs" type="PoolVector2Array" default="PoolVector2Array([])">
+ <argument index="2" name="uvs" type="PoolVector2Array" default="null">
+ </argument>
+ <argument index="3" name="texture" type="Texture" default="PoolVector2Array( )">
</argument>
- <argument index="3" name="texture" type="Texture" default="NULL">
+ <argument index="4" name="normal_map" type="Texture" default="null">
</argument>
- <argument index="4" name="normal_map" type="Texture" default="NULL">
+ <argument index="5" name="antialiased" type="bool" default="null">
</argument>
<description>
Draw a polygon of any amount of points, convex or concave.
</description>
</method>
<method name="draw_polyline">
+ <return type="void">
+ </return>
<argument index="0" name="points" type="PoolVector2Array">
</argument>
<argument index="1" name="color" type="Color">
</argument>
- <argument index="2" name="width" type="float" default="1">
+ <argument index="2" name="width" type="float" default="null">
</argument>
- <argument index="3" name="antialiased" type="bool" default="false">
+ <argument index="3" name="antialiased" type="bool" default="null">
</argument>
<description>
</description>
</method>
<method name="draw_polyline_colors">
+ <return type="void">
+ </return>
<argument index="0" name="points" type="PoolVector2Array">
</argument>
<argument index="1" name="colors" type="PoolColorArray">
</argument>
- <argument index="2" name="width" type="float" default="1">
+ <argument index="2" name="width" type="float" default="null">
</argument>
- <argument index="3" name="antialiased" type="bool" default="false">
+ <argument index="3" name="antialiased" type="bool" default="null">
</argument>
<description>
</description>
</method>
<method name="draw_primitive">
+ <return type="void">
+ </return>
<argument index="0" name="points" type="PoolVector2Array">
</argument>
<argument index="1" name="colors" type="PoolColorArray">
</argument>
<argument index="2" name="uvs" type="PoolVector2Array">
</argument>
- <argument index="3" name="texture" type="Texture" default="NULL">
+ <argument index="3" name="texture" type="Texture" default="null">
</argument>
- <argument index="4" name="width" type="float" default="1">
+ <argument index="4" name="width" type="float" default="null">
</argument>
- <argument index="5" name="normal_map" type="Texture" default="NULL">
+ <argument index="5" name="normal_map" type="Texture" default="null">
</argument>
<description>
Draw a custom primitive, 1 point for a point, 2 points for a line, 3 points for a triangle and 4 points for a quad.
</description>
</method>
<method name="draw_rect">
+ <return type="void">
+ </return>
<argument index="0" name="rect" type="Rect2">
</argument>
<argument index="1" name="color" type="Color">
</argument>
- <argument index="2" name="filled" type="bool" default="true">
+ <argument index="2" name="filled" type="bool" default="null">
</argument>
<description>
Draw a colored rectangle.
</description>
</method>
<method name="draw_set_transform">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector2">
</argument>
<argument index="1" name="rot" type="float">
@@ -8987,27 +10234,33 @@
</description>
</method>
<method name="draw_set_transform_matrix">
+ <return type="void">
+ </return>
<argument index="0" name="xform" type="Transform2D">
</argument>
<description>
</description>
</method>
<method name="draw_string">
+ <return type="void">
+ </return>
<argument index="0" name="font" type="Font">
</argument>
<argument index="1" name="pos" type="Vector2">
</argument>
<argument index="2" name="text" type="String">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color(1,1,1,1)">
+ <argument index="3" name="modulate" type="Color" default="null">
</argument>
- <argument index="4" name="clip_w" type="int" default="-1">
+ <argument index="4" name="clip_w" type="int" default="null">
</argument>
<description>
Draw a string using a custom font.
</description>
</method>
<method name="draw_style_box">
+ <return type="void">
+ </return>
<argument index="0" name="style_box" type="StyleBox">
</argument>
<argument index="1" name="rect" type="Rect2">
@@ -9017,49 +10270,55 @@
</description>
</method>
<method name="draw_texture">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<argument index="1" name="pos" type="Vector2">
</argument>
- <argument index="2" name="modulate" type="Color" default="Color(1,1,1,1)">
+ <argument index="2" name="modulate" type="Color" default="null">
</argument>
- <argument index="3" name="normal_map" type="Texture" default="NULL">
+ <argument index="3" name="normal_map" type="Texture" default="null">
</argument>
<description>
Draw a texture at a given position.
</description>
</method>
<method name="draw_texture_rect">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<argument index="1" name="rect" type="Rect2">
</argument>
<argument index="2" name="tile" type="bool">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color(1,1,1,1)">
+ <argument index="3" name="modulate" type="Color" default="null">
</argument>
- <argument index="4" name="transpose" type="bool" default="false">
+ <argument index="4" name="transpose" type="bool" default="null">
</argument>
- <argument index="5" name="normal_map" type="Texture" default="NULL">
+ <argument index="5" name="normal_map" type="Texture" default="null">
</argument>
<description>
Draw a textured rectangle at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
</description>
</method>
<method name="draw_texture_rect_region">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<argument index="1" name="rect" type="Rect2">
</argument>
<argument index="2" name="src_rect" type="Rect2">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color(1,1,1,1)">
+ <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
- <argument index="4" name="transpose" type="bool" default="false">
+ <argument index="4" name="transpose" type="bool" default="null">
</argument>
- <argument index="5" name="normal_map" type="Texture" default="NULL">
+ <argument index="5" name="normal_map" type="Texture" default="null">
</argument>
- <argument index="6" name="clip_uv" type="bool" default="true">
+ <argument index="6" name="clip_uv" type="bool" default="null">
</argument>
<description>
Draw a textured rectangle region at a given position, optionally modulated by a color. Transpose swaps the x and y coordinates when reading the texture.
@@ -9073,6 +10332,8 @@
</description>
</method>
<method name="edit_rotate">
+ <return type="void">
+ </return>
<argument index="0" name="degrees" type="float">
</argument>
<description>
@@ -9080,12 +10341,16 @@
</description>
</method>
<method name="edit_set_rect">
+ <return type="void">
+ </return>
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
</description>
</method>
<method name="edit_set_state">
+ <return type="void">
+ </return>
<argument index="0" name="state" type="Variant">
</argument>
<description>
@@ -9212,13 +10477,15 @@
</description>
</method>
<method name="get_world_2d" qualifiers="const">
- <return type="Object">
+ <return type="World2D">
</return>
<description>
Get the [World2D] where this item is in.
</description>
</method>
<method name="hide">
+ <return type="void">
+ </return>
<description>
Hide the CanvasItem currently visible.
</description>
@@ -9271,14 +10538,16 @@
</description>
</method>
<method name="make_input_local" qualifiers="const">
- <return type="Object">
+ <return type="InputEvent">
</return>
- <argument index="0" name="event" type="Object">
+ <argument index="0" name="event" type="InputEvent">
</argument>
<description>
</description>
</method>
<method name="set_as_toplevel">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -9286,6 +10555,8 @@
</description>
</method>
<method name="set_draw_behind_parent">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -9293,6 +10564,8 @@
</description>
</method>
<method name="set_light_mask">
+ <return type="void">
+ </return>
<argument index="0" name="light_mask" type="int">
</argument>
<description>
@@ -9300,6 +10573,8 @@
</description>
</method>
<method name="set_material">
+ <return type="void">
+ </return>
<argument index="0" name="material" type="Material">
</argument>
<description>
@@ -9307,6 +10582,8 @@
</description>
</method>
<method name="set_modulate">
+ <return type="void">
+ </return>
<argument index="0" name="modulate" type="Color">
</argument>
<description>
@@ -9314,18 +10591,24 @@
</description>
</method>
<method name="set_notify_local_transform">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_notify_transform">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_self_modulate">
+ <return type="void">
+ </return>
<argument index="0" name="self_modulate" type="Color">
</argument>
<description>
@@ -9333,6 +10616,8 @@
</description>
</method>
<method name="set_use_parent_material">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -9340,7 +10625,9 @@
</description>
</method>
<method name="set_visible">
- <argument index="0" name="arg0" type="bool">
+ <return type="void">
+ </return>
+ <argument index="0" name="visible" type="bool">
</argument>
<description>
Set whether this item should be visible or not.
@@ -9348,11 +10635,15 @@
</description>
</method>
<method name="show">
+ <return type="void">
+ </return>
<description>
Show the CanvasItem currently hidden.
</description>
</method>
<method name="update">
+ <return type="void">
+ </return>
<description>
Queue the CanvasItem for update. [code]NOTIFICATION_DRAW[/code] will be called on idle time to request redraw.
</description>
@@ -9361,7 +10652,7 @@
<members>
<member name="light_mask" type="int" setter="set_light_mask" getter="get_light_mask" brief="">
</member>
- <member name="material" type="ShaderMaterial,CanvasItemMaterial" setter="set_material" getter="get_material" brief="">
+ <member name="material" type="Material" setter="set_material" getter="get_material" brief="">
</member>
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" brief="">
</member>
@@ -9414,19 +10705,19 @@
<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_DRAW" value="30">
+ <constant name="NOTIFICATION_DRAW" value="30" enum="">
CanvasItem is requested to draw.
</constant>
- <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="31">
+ <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="31" enum="">
Canvas item visibility has changed.
</constant>
- <constant name="NOTIFICATION_ENTER_CANVAS" value="32">
+ <constant name="NOTIFICATION_ENTER_CANVAS" value="32" enum="">
Canvas item has entered the canvas.
</constant>
- <constant name="NOTIFICATION_EXIT_CANVAS" value="33">
+ <constant name="NOTIFICATION_EXIT_CANVAS" value="33" enum="">
Canvas item has exited the canvas.
</constant>
- <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="29">
+ <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="29" enum="">
Canvas item transform has changed. Only received if requested.
</constant>
</constants>
@@ -9450,22 +10741,26 @@
</description>
</method>
<method name="set_blend_mode">
- <argument index="0" name="blend_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="blend_mode" type="int" enum="CanvasItemMaterial.BlendMode">
</argument>
<description>
</description>
</method>
<method name="set_light_mode">
- <argument index="0" name="light_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="light_mode" type="int" enum="CanvasItemMaterial.LightMode">
</argument>
<description>
</description>
</method>
</methods>
<members>
- <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" brief="">
+ <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" brief="" enum="CanvasItemMaterial.BlendMode">
</member>
- <member name="light_mode" type="int" setter="set_light_mode" getter="get_light_mode" brief="">
+ <member name="light_mode" type="int" setter="set_light_mode" getter="get_light_mode" brief="" enum="CanvasItemMaterial.LightMode">
</member>
</members>
<constants>
@@ -9496,7 +10791,7 @@
</description>
<methods>
<method name="get_custom_viewport" qualifiers="const">
- <return type="Viewport">
+ <return type="Node">
</return>
<description>
</description>
@@ -9551,12 +10846,16 @@
</description>
</method>
<method name="set_custom_viewport">
- <argument index="0" name="viewport" type="Viewport">
+ <return type="void">
+ </return>
+ <argument index="0" name="viewport" type="Node">
</argument>
<description>
</description>
</method>
<method name="set_layer">
+ <return type="void">
+ </return>
<argument index="0" name="layer" type="int">
</argument>
<description>
@@ -9564,6 +10863,8 @@
</description>
</method>
<method name="set_offset">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
@@ -9571,6 +10872,8 @@
</description>
</method>
<method name="set_rotation">
+ <return type="void">
+ </return>
<argument index="0" name="radians" type="float">
</argument>
<description>
@@ -9578,6 +10881,8 @@
</description>
</method>
<method name="set_rotationd">
+ <return type="void">
+ </return>
<argument index="0" name="degrees" type="float">
</argument>
<description>
@@ -9585,6 +10890,8 @@
</description>
</method>
<method name="set_scale">
+ <return type="void">
+ </return>
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
@@ -9592,6 +10899,8 @@
</description>
</method>
<method name="set_transform">
+ <return type="void">
+ </return>
<argument index="0" name="transform" type="Transform2D">
</argument>
<description>
@@ -9628,6 +10937,8 @@
</description>
</method>
<method name="set_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
@@ -9673,24 +10984,32 @@
</description>
</method>
<method name="set_mid_height">
+ <return type="void">
+ </return>
<argument index="0" name="mid_height" type="float">
</argument>
<description>
</description>
</method>
<method name="set_radial_segments">
+ <return type="void">
+ </return>
<argument index="0" name="segments" type="int">
</argument>
<description>
</description>
</method>
<method name="set_radius">
+ <return type="void">
+ </return>
<argument index="0" name="radius" type="float">
</argument>
<description>
</description>
</method>
<method name="set_rings">
+ <return type="void">
+ </return>
<argument index="0" name="rings" type="int">
</argument>
<description>
@@ -9733,6 +11052,8 @@
</description>
</method>
<method name="set_height">
+ <return type="void">
+ </return>
<argument index="0" name="height" type="float">
</argument>
<description>
@@ -9740,6 +11061,8 @@
</description>
</method>
<method name="set_radius">
+ <return type="void">
+ </return>
<argument index="0" name="radius" type="float">
</argument>
<description>
@@ -9779,6 +11102,8 @@
</description>
</method>
<method name="set_height">
+ <return type="void">
+ </return>
<argument index="0" name="height" type="float">
</argument>
<description>
@@ -9786,6 +11111,8 @@
</description>
</method>
<method name="set_radius">
+ <return type="void">
+ </return>
<argument index="0" name="radius" type="float">
</argument>
<description>
@@ -9818,6 +11145,8 @@
</description>
</method>
<method name="set_use_top_left">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -9936,6 +11265,8 @@
</description>
</method>
<method name="set_radius">
+ <return type="void">
+ </return>
<argument index="0" name="radius" type="float">
</argument>
<description>
@@ -9995,7 +11326,7 @@
</return>
<argument index="0" name="class" type="String">
</argument>
- <argument index="1" name="no_inheritance" type="bool" default="false">
+ <argument index="1" name="no_inheritance" type="bool" default="null">
</argument>
<description>
</description>
@@ -10005,7 +11336,7 @@
</return>
<argument index="0" name="class" type="String">
</argument>
- <argument index="1" name="no_inheritance" type="bool" default="false">
+ <argument index="1" name="no_inheritance" type="bool" default="null">
</argument>
<description>
</description>
@@ -10025,7 +11356,7 @@
</return>
<argument index="0" name="class" type="String">
</argument>
- <argument index="1" name="no_inheritance" type="bool" default="false">
+ <argument index="1" name="no_inheritance" type="bool" default="null">
</argument>
<description>
</description>
@@ -10045,7 +11376,7 @@
</return>
<argument index="0" name="class" type="String">
</argument>
- <argument index="1" name="no_inheritance" type="bool" default="false">
+ <argument index="1" name="no_inheritance" type="bool" default="null">
</argument>
<description>
</description>
@@ -10067,7 +11398,7 @@
</argument>
<argument index="1" name="method" type="String">
</argument>
- <argument index="2" name="no_inheritance" type="bool" default="false">
+ <argument index="2" name="no_inheritance" type="bool" default="null">
</argument>
<description>
</description>
@@ -10083,7 +11414,7 @@
</description>
</method>
<method name="class_set_property" qualifiers="const">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="object" type="Object">
</argument>
@@ -10153,6 +11484,8 @@
</description>
<methods>
<method name="_input_event" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="camera" type="Object">
</argument>
<argument index="1" name="event" type="InputEvent">
@@ -10166,12 +11499,6 @@
<description>
</description>
</method>
- <method name="get_capture_input_on_drag" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
<method name="create_shape_owner">
<return type="int">
</return>
@@ -10181,6 +11508,12 @@
Creates new holder for the shapes. Argument is a [CollisionShape] node. It will return owner_id which usually you will want to save for later use.
</description>
</method>
+ <method name="get_capture_input_on_drag" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_rid" qualifiers="const">
<return type="RID">
</return>
@@ -10194,14 +11527,80 @@
Shape owner is a node which is holding concrete shape resources. This method will return an array which is holding an integer numbers that are representing unique ID of each owner. You can use those ids when you are using others shape_owner methods.
</description>
</method>
+ <method name="is_ray_pickable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_shape_owner_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_shape_owner">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_capture_input_on_drag">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_ray_pickable">
+ <return type="void">
+ </return>
+ <argument index="0" name="ray_pickable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_find_owner" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="shape_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_add_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="shape" type="Shape">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="shape_owner_clear_shapes">
+ <return type="void">
+ </return>
<argument index="0" name="owner_id" type="int">
</argument>
<description>
Will remove all the shapes associated with given owner.
</description>
</method>
- <method name="shape_owner_get_shape">
+ <method name="shape_owner_get_owner" qualifiers="const">
+ <return type="Object">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_get_shape" qualifiers="const">
<return type="Shape">
</return>
<argument index="0" name="owner_id" type="int">
@@ -10212,7 +11611,7 @@
Will return a [Shape]. First argument owner_id is an integer that can be obtained from [method get_shape_owners]. Shape_id is a position of the shape inside owner; it's a value in range from 0 to [method shape_owner_get_shape_count].
</description>
</method>
- <method name="shape_owner_get_shape_count">
+ <method name="shape_owner_get_shape_count" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="owner_id" type="int">
@@ -10221,7 +11620,17 @@
Returns number of shapes to which given owner is associated to.
</description>
</method>
- <method name="shape_owner_get_transform">
+ <method name="shape_owner_get_shape_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="shape_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_get_transform" qualifiers="const">
<return type="Transform">
</return>
<argument index="0" name="owner_id" type="int">
@@ -10231,6 +11640,8 @@
</description>
</method>
<method name="shape_owner_remove_shape">
+ <return type="void">
+ </return>
<argument index="0" name="owner_id" type="int">
</argument>
<argument index="1" name="shape_id" type="int">
@@ -10239,20 +11650,22 @@
Removes related shape from the owner.
</description>
</method>
- <method name="is_ray_pickable" qualifiers="const">
- <return type="bool">
+ <method name="shape_owner_set_disabled">
+ <return type="void">
</return>
- <description>
- </description>
- </method>
- <method name="set_capture_input_on_drag">
- <argument index="0" name="enable" type="bool">
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="disabled" type="bool">
</argument>
<description>
</description>
</method>
- <method name="set_ray_pickable">
- <argument index="0" name="ray_pickable" type="bool">
+ <method name="shape_owner_set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="transform" type="Transform">
</argument>
<description>
</description>
@@ -10300,6 +11713,8 @@
</description>
<methods>
<method name="_input_event" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="viewport" type="Object">
</argument>
<argument index="1" name="event" type="InputEvent">
@@ -10332,14 +11747,82 @@
Shape owner is a node which is holding concrete shape resources. This method will return an array which is holding an integer numbers that are representing unique ID of each owner. You can use those ids when you are using others shape_owner methods.
</description>
</method>
+ <method name="is_pickable" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ Return whether this object is pickable.
+ </description>
+ </method>
+ <method name="is_shape_owner_disabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_shape_owner_one_way_collision_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="remove_shape_owner">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_pickable">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ Set whether this object is pickable. A pickable object can detect the mouse pointer enter/leave it and, if the mouse is inside it, report input events.
+ </description>
+ </method>
+ <method name="shape_find_owner" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="shape_index" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_add_shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="shape" type="Shape2D">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="shape_owner_clear_shapes">
+ <return type="void">
+ </return>
<argument index="0" name="owner_id" type="int">
</argument>
<description>
Will remove all the shapes associated with given owner.
</description>
</method>
- <method name="shape_owner_get_shape">
+ <method name="shape_owner_get_owner" qualifiers="const">
+ <return type="Object">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_get_shape" qualifiers="const">
<return type="Shape2D">
</return>
<argument index="0" name="owner_id" type="int">
@@ -10350,7 +11833,7 @@
Will return a [Shape2D]. First argument owner_id is an integer that can be obtained from [method get_shape_owners]. Shape_id is a position of the shape inside owner; it's a value in range from 0 to [method shape_owner_get_shape_count].
</description>
</method>
- <method name="shape_owner_get_shape_count">
+ <method name="shape_owner_get_shape_count" qualifiers="const">
<return type="int">
</return>
<argument index="0" name="owner_id" type="int">
@@ -10359,7 +11842,17 @@
Returns number of shapes to which given owner is associated to.
</description>
</method>
- <method name="shape_owner_get_transform">
+ <method name="shape_owner_get_shape_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="shape_id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_get_transform" qualifiers="const">
<return type="Transform2D">
</return>
<argument index="0" name="owner_id" type="int">
@@ -10369,6 +11862,8 @@
</description>
</method>
<method name="shape_owner_remove_shape">
+ <return type="void">
+ </return>
<argument index="0" name="owner_id" type="int">
</argument>
<argument index="1" name="shape_id" type="int">
@@ -10377,18 +11872,34 @@
Removes related shape from the owner.
</description>
</method>
- <method name="is_pickable" qualifiers="const">
- <return type="bool">
+ <method name="shape_owner_set_disabled">
+ <return type="void">
</return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="disabled" type="bool">
+ </argument>
<description>
- Return whether this object is pickable.
</description>
</method>
- <method name="set_pickable">
- <argument index="0" name="enabled" type="bool">
+ <method name="shape_owner_set_one_way_collision">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="shape_owner_set_transform">
+ <return type="void">
+ </return>
+ <argument index="0" name="owner_id" type="int">
+ </argument>
+ <argument index="1" name="transform" type="Transform2D">
</argument>
<description>
- Set whether this object is pickable. A pickable object can detect the mouse pointer enter/leave it and, if the mouse is inside it, report input events.
</description>
</method>
</methods>
@@ -10446,18 +11957,24 @@
</description>
</method>
<method name="set_depth">
+ <return type="void">
+ </return>
<argument index="0" name="depth" type="float">
</argument>
<description>
</description>
</method>
<method name="set_disabled">
+ <return type="void">
+ </return>
<argument index="0" name="disabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_polygon">
+ <return type="void">
+ </return>
<argument index="0" name="polygon" type="PoolVector2Array">
</argument>
<description>
@@ -10510,25 +12027,33 @@
</description>
</method>
<method name="set_build_mode">
- <argument index="0" name="build_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="build_mode" type="int" enum="CollisionPolygon2D.BuildMode">
</argument>
<description>
Set whether the polygon is to be a [ConvexPolygonShape2D] ([code]build_mode==0[/code]), or a [ConcavePolygonShape2D] ([code]build_mode==1[/code]).
</description>
</method>
<method name="set_disabled">
+ <return type="void">
+ </return>
<argument index="0" name="disabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_one_way_collision">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_polygon">
+ <return type="void">
+ </return>
<argument index="0" name="polygon" type="PoolVector2Array">
</argument>
<description>
@@ -10538,7 +12063,7 @@
</method>
</methods>
<members>
- <member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" brief="">
+ <member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" brief="" enum="CollisionPolygon2D.BuildMode">
</member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" brief="">
</member>
@@ -10557,7 +12082,7 @@
</description>
<methods>
<method name="get_shape" qualifiers="const">
- <return type="Object">
+ <return type="Shape">
</return>
<description>
</description>
@@ -10569,23 +12094,31 @@
</description>
</method>
<method name="make_convex_from_brothers">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="resource_changed">
- <argument index="0" name="resource" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="resource" type="Resource">
</argument>
<description>
</description>
</method>
<method name="set_disabled">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_shape">
- <argument index="0" name="shape" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="Shape">
</argument>
<description>
</description>
@@ -10609,7 +12142,7 @@
</description>
<methods>
<method name="get_shape" qualifiers="const">
- <return type="Object">
+ <return type="Shape2D">
</return>
<description>
Return this shape's [Shape2D].
@@ -10628,19 +12161,25 @@
</description>
</method>
<method name="set_disabled">
+ <return type="void">
+ </return>
<argument index="0" name="disabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_one_way_collision">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_shape">
- <argument index="0" name="shape" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="Shape2D">
</argument>
<description>
Set this shape's [Shape2D]. This will not appear as a node, but can be directly edited as a property.
@@ -10824,7 +12363,9 @@
</description>
<methods>
<method name="add_preset">
- <argument index="0" name="arg0" type="Color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
</argument>
<description>
Adds the current selected to color to a list of colors (presets), the presets will be displayed in the color picker and the user will be able to select them, notice that the presets list is only for this color picker.
@@ -10852,6 +12393,8 @@
</description>
</method>
<method name="set_edit_alpha">
+ <return type="void">
+ </return>
<argument index="0" name="show" type="bool">
</argument>
<description>
@@ -10859,6 +12402,8 @@
</description>
</method>
<method name="set_pick_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
@@ -10866,6 +12411,8 @@
</description>
</method>
<method name="set_raw_mode">
+ <return type="void">
+ </return>
<argument index="0" name="mode" type="bool">
</argument>
<description>
@@ -10933,6 +12480,8 @@
</description>
</method>
<method name="set_edit_alpha">
+ <return type="void">
+ </return>
<argument index="0" name="show" type="bool">
</argument>
<description>
@@ -10940,6 +12489,8 @@
</description>
</method>
<method name="set_pick_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
@@ -11001,6 +12552,8 @@
</description>
</method>
<method name="set_frame_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
@@ -11030,6 +12583,8 @@
</description>
</method>
<method name="set_faces">
+ <return type="void">
+ </return>
<argument index="0" name="faces" type="PoolVector3Array">
</argument>
<description>
@@ -11057,6 +12612,8 @@
</description>
</method>
<method name="set_segments">
+ <return type="void">
+ </return>
<argument index="0" name="segments" type="PoolVector2Array">
</argument>
<description>
@@ -11080,13 +12637,15 @@
<method name="get_param" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int">
+ <argument index="0" name="param" type="int" enum="ConeTwistJoint.Param">
</argument>
<description>
</description>
</method>
<method name="set_param">
- <argument index="0" name="param" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="ConeTwistJoint.Param">
</argument>
<argument index="1" name="value" type="float">
</argument>
@@ -11143,6 +12702,8 @@
</description>
<methods>
<method name="erase_section">
+ <return type="void">
+ </return>
<argument index="0" name="section" type="String">
</argument>
<description>
@@ -11171,7 +12732,7 @@
</argument>
<argument index="1" name="key" type="String">
</argument>
- <argument index="2" name="default" type="Variant" default="NULL">
+ <argument index="2" name="default" type="Variant" default="null">
</argument>
<description>
Return the current value for the specified section and key. If the section and/or the key do not exist, the method returns the value of the optional [i]default[/i] argument (and thus [code]NULL[/code] if not specified).
@@ -11198,7 +12759,7 @@
</description>
</method>
<method name="load">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="path" type="String">
</argument>
@@ -11207,7 +12768,7 @@
</description>
</method>
<method name="save">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="path" type="String">
</argument>
@@ -11217,6 +12778,8 @@
</description>
</method>
<method name="set_value">
+ <return type="void">
+ </return>
<argument index="0" name="section" type="String">
</argument>
<argument index="1" name="key" type="String">
@@ -11260,6 +12823,8 @@
</description>
<methods>
<method name="fit_child_in_rect">
+ <return type="void">
+ </return>
<argument index="0" name="child" type="Control">
</argument>
<argument index="1" name="rect" type="Rect2">
@@ -11269,6 +12834,8 @@
</description>
</method>
<method name="queue_sort">
+ <return type="void">
+ </return>
<description>
Queue resort of the contained children. This is called automatically anyway, but can be called upon request.
</description>
@@ -11282,7 +12849,7 @@
</signal>
</signals>
<constants>
- <constant name="NOTIFICATION_SORT_CHILDREN" value="50">
+ <constant name="NOTIFICATION_SORT_CHILDREN" value="50" enum="">
Notification for when sorting the children, it must be obeyed immediately.
</constant>
</constants>
@@ -11309,17 +12876,23 @@
</description>
</method>
<method name="_gui_input" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
</description>
</method>
<method name="accept_event">
+ <return type="void">
+ </return>
<description>
Handles the event, no other control will receive it and it will not be sent to nodes waiting on [method Node._unhandled_input] or [method Node._unhandled_key_input].
</description>
</method>
<method name="add_color_override">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="color" type="Color">
@@ -11328,6 +12901,8 @@
</description>
</method>
<method name="add_constant_override">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="constant" type="int">
@@ -11337,6 +12912,8 @@
</description>
</method>
<method name="add_font_override">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="font" type="Font">
@@ -11346,6 +12923,8 @@
</description>
</method>
<method name="add_icon_override">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="texture" type="Texture">
@@ -11355,6 +12934,8 @@
</description>
</method>
<method name="add_shader_override">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="shader" type="Shader">
@@ -11363,6 +12944,8 @@
</description>
</method>
<method name="add_style_override">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="stylebox" type="StyleBox">
@@ -11382,6 +12965,8 @@
</description>
</method>
<method name="drop_data" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector2">
</argument>
<argument index="1" name="data" type="Variant">
@@ -11390,17 +12975,19 @@
</description>
</method>
<method name="force_drag">
+ <return type="void">
+ </return>
<argument index="0" name="data" type="Variant">
</argument>
- <argument index="1" name="preview" type="Object">
+ <argument index="1" name="preview" type="Control">
</argument>
<description>
</description>
</method>
<method name="get_anchor" qualifiers="const">
- <return type="int">
+ <return type="float">
</return>
- <argument index="0" name="margin" type="int">
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
Return the anchor type (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM).
@@ -11417,7 +13004,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="String" default="null">
</argument>
<description>
</description>
@@ -11433,7 +13020,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="String" default="null">
</argument>
<description>
</description>
@@ -11441,7 +13028,7 @@
<method name="get_cursor_shape" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="pos" type="Vector2" default="Vector2(0, 0)">
+ <argument index="0" name="pos" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
Return the cursor shape at a certain position in the control.
@@ -11485,7 +13072,7 @@
<method name="get_focus_neighbour" qualifiers="const">
<return type="NodePath">
</return>
- <argument index="0" name="margin" type="int">
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
Return the forced neighbour for moving the input focus to. When pressing TAB or directional/joypad directions focus is moved to the next control in that direction. However, the neighbour to move to can be forced with this function.
@@ -11503,7 +13090,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="String" default="null">
</argument>
<description>
</description>
@@ -11540,7 +13127,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="String" default="null">
</argument>
<description>
</description>
@@ -11548,7 +13135,7 @@
<method name="get_margin" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="margin" type="int">
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
Return a margin offset. Margin can be one of (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Offset value being returned depends on the anchor mode.
@@ -11639,7 +13226,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="String" default="null">
</argument>
<description>
</description>
@@ -11654,7 +13241,7 @@
<method name="get_tooltip" qualifiers="const">
<return type="String">
</return>
- <argument index="0" name="atpos" type="Vector2" default="Vector2(0, 0)">
+ <argument index="0" name="atpos" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
Return the tooltip, which will appear when the cursor is resting over this control.
@@ -11674,10 +13261,14 @@
</description>
</method>
<method name="grab_click_focus">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="grab_focus">
+ <return type="void">
+ </return>
<description>
Steal the focus from another control and become the focused control (see [method set_focus_mode]).
</description>
@@ -11687,7 +13278,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="String" default="null">
</argument>
<description>
</description>
@@ -11705,7 +13296,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="String" default="null">
</argument>
<description>
</description>
@@ -11730,7 +13321,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="String" default="null">
</argument>
<description>
</description>
@@ -11748,7 +13339,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="String" default="null">
</argument>
<description>
</description>
@@ -11762,6 +13353,8 @@
</description>
</method>
<method name="has_point" qualifiers="virtual">
+ <return type="bool">
+ </return>
<argument index="0" name="point" type="Vector2">
</argument>
<description>
@@ -11772,7 +13365,7 @@
</return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="type" type="String" default="&quot;&quot;">
+ <argument index="1" name="type" type="String" default="null">
</argument>
<description>
</description>
@@ -11792,38 +13385,59 @@
</description>
</method>
<method name="minimum_size_changed">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="release_focus">
+ <return type="void">
+ </return>
<description>
Give up the focus, no other control will be able to receive keyboard input.
</description>
</method>
<method name="set_anchor">
- <argument index="0" name="margin" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="anchor" type="float">
</argument>
- <argument index="1" name="anchor_mode" type="int">
+ <argument index="2" name="keep_margin" type="bool" default="null">
</argument>
- <argument index="2" name="keep_margin" type="bool" default="false">
+ <argument index="3" name="push_opposite_anchor" type="bool" default="null">
</argument>
<description>
- Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM). Changing the anchor mode converts the current margin offset from the previous anchor mode to the new one, so margin offsets ([method set_margin]) must be done after setting anchors, or at the same time ([method set_anchor_and_margin])
- Additionally, [code]keep_margin[/code] controls whether margins should be left the same, or changed to keep the same position and size on-screen.
</description>
</method>
<method name="set_anchor_and_margin">
- <argument index="0" name="margin" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
- <argument index="1" name="anchor_mode" type="int">
+ <argument index="1" name="anchor" type="float">
</argument>
<argument index="2" name="offset" type="float">
</argument>
+ <argument index="3" name="push_opposite_anchor" type="bool" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_anchors_preset">
+ <return type="void">
+ </return>
+ <argument index="0" name="preset" type="int" enum="Control.LayoutPreset">
+ </argument>
+ <argument index="1" name="keep_margin" type="bool" default="null">
+ </argument>
<description>
- Change the anchor (ANCHOR_BEGIN, ANCHOR_END, ANCHOR_RATIO) type for a margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM), and also set its offset. This is a helper (see [method set_anchor] and [method set_margin]).
</description>
</method>
<method name="set_area_as_parent_rect">
+ <return type="void">
+ </return>
<argument index="0" name="margin" type="int" default="0">
</argument>
<description>
@@ -11831,6 +13445,8 @@
</description>
</method>
<method name="set_begin">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
@@ -11838,37 +13454,49 @@
</description>
</method>
<method name="set_clip_contents">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_custom_minimum_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_default_cursor_shape">
- <argument index="0" name="shape" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="int" enum="Control.CursorShape">
</argument>
<description>
Set the default cursor shape for this control. See enum CURSOR_* for the list of shapes.
</description>
</method>
<method name="set_drag_forwarding">
+ <return type="void">
+ </return>
<argument index="0" name="target" type="Control">
</argument>
<description>
</description>
</method>
<method name="set_drag_preview">
+ <return type="void">
+ </return>
<argument index="0" name="control" type="Control">
</argument>
<description>
</description>
</method>
<method name="set_end">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
@@ -11876,14 +13504,18 @@
</description>
</method>
<method name="set_focus_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Control.FocusMode">
</argument>
<description>
Set the focus access mode for the control (FOCUS_NONE, FOCUS_CLICK, FOCUS_ALL). Only one Control can be focused at the same time, and it will receive keyboard signals.
</description>
</method>
<method name="set_focus_neighbour">
- <argument index="0" name="margin" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<argument index="1" name="neighbour" type="NodePath">
</argument>
@@ -11892,6 +13524,8 @@
</description>
</method>
<method name="set_global_position">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
@@ -11899,12 +13533,16 @@
</description>
</method>
<method name="set_h_grow_direction">
- <argument index="0" name="direction" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="direction" type="int" enum="Control.GrowDirection">
</argument>
<description>
</description>
</method>
<method name="set_h_size_flags">
+ <return type="void">
+ </return>
<argument index="0" name="flags" type="int">
</argument>
<description>
@@ -11912,7 +13550,9 @@
</description>
</method>
<method name="set_margin">
- <argument index="0" name="margin" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<argument index="1" name="offset" type="float">
</argument>
@@ -11921,19 +13561,25 @@
</description>
</method>
<method name="set_mouse_filter">
- <argument index="0" name="filter" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="filter" type="int" enum="Control.MouseFilter">
</argument>
<description>
Set when the control is ignoring mouse events (even touchpad events send mouse events). (see the MOUSE_FILTER_* constants)
</description>
</method>
<method name="set_pivot_offset">
+ <return type="void">
+ </return>
<argument index="0" name="pivot_offset" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_position">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
@@ -11941,6 +13587,8 @@
</description>
</method>
<method name="set_rotation">
+ <return type="void">
+ </return>
<argument index="0" name="radians" type="float">
</argument>
<description>
@@ -11948,6 +13596,8 @@
</description>
</method>
<method name="set_rotation_deg">
+ <return type="void">
+ </return>
<argument index="0" name="degrees" type="float">
</argument>
<description>
@@ -11955,12 +13605,16 @@
</description>
</method>
<method name="set_scale">
+ <return type="void">
+ </return>
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="Vector2">
</argument>
<description>
@@ -11968,6 +13622,8 @@
</description>
</method>
<method name="set_stretch_ratio">
+ <return type="void">
+ </return>
<argument index="0" name="ratio" type="float">
</argument>
<description>
@@ -11975,6 +13631,8 @@
</description>
</method>
<method name="set_theme">
+ <return type="void">
+ </return>
<argument index="0" name="theme" type="Theme">
</argument>
<description>
@@ -11982,6 +13640,8 @@
</description>
</method>
<method name="set_tooltip">
+ <return type="void">
+ </return>
<argument index="0" name="tooltip" type="String">
</argument>
<description>
@@ -11989,12 +13649,16 @@
</description>
</method>
<method name="set_v_grow_direction">
- <argument index="0" name="direction" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="direction" type="int" enum="Control.GrowDirection">
</argument>
<description>
</description>
</method>
<method name="set_v_size_flags">
+ <return type="void">
+ </return>
<argument index="0" name="flags" type="int">
</argument>
<description>
@@ -12002,6 +13666,8 @@
</description>
</method>
<method name="show_modal">
+ <return type="void">
+ </return>
<argument index="0" name="exclusive" type="bool" default="false">
</argument>
<description>
@@ -12009,6 +13675,8 @@
</description>
</method>
<method name="warp_mouse">
+ <return type="void">
+ </return>
<argument index="0" name="to_pos" type="Vector2">
</argument>
<description>
@@ -12016,13 +13684,13 @@
</method>
</methods>
<members>
- <member name="anchor_bottom" type="int" setter="_set_anchor" getter="get_anchor" brief="">
+ <member name="anchor_bottom" type="float" setter="_set_anchor" getter="get_anchor" brief="">
</member>
- <member name="anchor_left" type="int" setter="_set_anchor" getter="get_anchor" brief="">
+ <member name="anchor_left" type="float" setter="_set_anchor" getter="get_anchor" brief="">
</member>
- <member name="anchor_right" type="int" setter="_set_anchor" getter="get_anchor" brief="">
+ <member name="anchor_right" type="float" setter="_set_anchor" getter="get_anchor" brief="">
</member>
- <member name="anchor_top" type="int" setter="_set_anchor" getter="get_anchor" brief="">
+ <member name="anchor_top" type="float" setter="_set_anchor" getter="get_anchor" brief="">
</member>
<member name="focus_neighbour_bottom" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour" brief="">
</member>
@@ -12032,21 +13700,21 @@
</member>
<member name="focus_neighbour_top" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour" brief="">
</member>
- <member name="grow_horizontal" type="int" setter="set_h_grow_direction" getter="get_h_grow_direction" brief="">
+ <member name="grow_horizontal" type="int" setter="set_h_grow_direction" getter="get_h_grow_direction" brief="" enum="Control.GrowDirection">
</member>
- <member name="grow_vertical" type="int" setter="set_v_grow_direction" getter="get_v_grow_direction" brief="">
+ <member name="grow_vertical" type="int" setter="set_v_grow_direction" getter="get_v_grow_direction" brief="" enum="Control.GrowDirection">
</member>
<member name="hint_tooltip" type="String" setter="set_tooltip" getter="_get_tooltip" brief="">
</member>
- <member name="margin_bottom" type="int" setter="set_margin" getter="get_margin" brief="">
+ <member name="margin_bottom" type="float" setter="set_margin" getter="get_margin" brief="">
</member>
- <member name="margin_left" type="int" setter="set_margin" getter="get_margin" brief="">
+ <member name="margin_left" type="float" setter="set_margin" getter="get_margin" brief="">
</member>
- <member name="margin_right" type="int" setter="set_margin" getter="get_margin" brief="">
+ <member name="margin_right" type="float" setter="set_margin" getter="get_margin" brief="">
</member>
- <member name="margin_top" type="int" setter="set_margin" getter="get_margin" brief="">
+ <member name="margin_top" type="float" setter="set_margin" getter="get_margin" brief="">
</member>
- <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" brief="">
+ <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" brief="" enum="Control.MouseFilter">
</member>
<member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" brief="">
</member>
@@ -12064,7 +13732,7 @@
</member>
<member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" brief="">
</member>
- <member name="size_flags_stretch_ratio" type="int" setter="set_stretch_ratio" getter="get_stretch_ratio" brief="">
+ <member name="size_flags_stretch_ratio" type="float" setter="set_stretch_ratio" getter="get_stretch_ratio" brief="">
</member>
<member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" brief="">
</member>
@@ -12119,14 +13787,6 @@
</signal>
</signals>
<constants>
- <constant name="ANCHOR_BEGIN" value="0">
- X is relative to MARGIN_LEFT, Y is relative to MARGIN_TOP.
- </constant>
- <constant name="ANCHOR_END" value="1">
- X is relative to -MARGIN_RIGHT, Y is relative to -MARGIN_BOTTOM.
- </constant>
- <constant name="ANCHOR_CENTER" value="2">
- </constant>
<constant name="FOCUS_NONE" value="0">
Control can't acquire focus.
</constant>
@@ -12136,25 +13796,25 @@
<constant name="FOCUS_ALL" value="2">
Control can acquire focus if clicked, or by pressing TAB/Directionals in the keyboard from another Control.
</constant>
- <constant name="NOTIFICATION_RESIZED" value="40">
+ <constant name="NOTIFICATION_RESIZED" value="40" enum="">
Control changed size (get_size() reports the new size).
</constant>
- <constant name="NOTIFICATION_MOUSE_ENTER" value="41">
+ <constant name="NOTIFICATION_MOUSE_ENTER" value="41" enum="">
Mouse pointer entered the area of the Control.
</constant>
- <constant name="NOTIFICATION_MOUSE_EXIT" value="42">
+ <constant name="NOTIFICATION_MOUSE_EXIT" value="42" enum="">
Mouse pointer exited the area of the Control.
</constant>
- <constant name="NOTIFICATION_FOCUS_ENTER" value="43">
+ <constant name="NOTIFICATION_FOCUS_ENTER" value="43" enum="">
Control gained focus.
</constant>
- <constant name="NOTIFICATION_FOCUS_EXIT" value="44">
+ <constant name="NOTIFICATION_FOCUS_EXIT" value="44" enum="">
Control lost focus.
</constant>
- <constant name="NOTIFICATION_THEME_CHANGED" value="45">
+ <constant name="NOTIFICATION_THEME_CHANGED" value="45" enum="">
Theme changed. Redrawing is desired.
</constant>
- <constant name="NOTIFICATION_MODAL_CLOSE" value="46">
+ <constant name="NOTIFICATION_MODAL_CLOSE" value="46" enum="">
Modal control was closed.
</constant>
<constant name="CURSOR_ARROW" value="0">
@@ -12191,6 +13851,38 @@
</constant>
<constant name="CURSOR_HELP" value="16">
</constant>
+ <constant name="PRESET_TOP_LEFT" value="0">
+ </constant>
+ <constant name="PRESET_TOP_RIGHT" value="1">
+ </constant>
+ <constant name="PRESET_BOTTOM_LEFT" value="2">
+ </constant>
+ <constant name="PRESET_BOTTOM_RIGHT" value="3">
+ </constant>
+ <constant name="PRESET_CENTER_LEFT" value="4">
+ </constant>
+ <constant name="PRESET_CENTER_TOP" value="5">
+ </constant>
+ <constant name="PRESET_CENTER_RIGHT" value="6">
+ </constant>
+ <constant name="PRESET_CENTER_BOTTOM" value="7">
+ </constant>
+ <constant name="PRESET_CENTER" value="8">
+ </constant>
+ <constant name="PRESET_LEFT_WIDE" value="9">
+ </constant>
+ <constant name="PRESET_TOP_WIDE" value="10">
+ </constant>
+ <constant name="PRESET_RIGHT_WIDE" value="11">
+ </constant>
+ <constant name="PRESET_BOTTOM_WIDE" value="12">
+ </constant>
+ <constant name="PRESET_VCENTER_WIDE" value="13">
+ </constant>
+ <constant name="PRESET_HCENTER_WIDE" value="14">
+ </constant>
+ <constant name="PRESET_WIDE" value="15">
+ </constant>
<constant name="SIZE_EXPAND" value="2">
</constant>
<constant name="SIZE_FILL" value="1">
@@ -12211,6 +13903,12 @@
</constant>
<constant name="GROW_DIRECTION_END" value="1">
</constant>
+ <constant name="ANCHOR_BEGIN" value="0">
+ X is relative to MARGIN_LEFT, Y is relative to MARGIN_TOP.
+ </constant>
+ <constant name="ANCHOR_END" value="1">
+ X is relative to -MARGIN_RIGHT, Y is relative to -MARGIN_BOTTOM.
+ </constant>
</constants>
</class>
<class name="ConvexPolygonShape" inherits="Shape" category="Core">
@@ -12228,6 +13926,8 @@
</description>
</method>
<method name="set_points">
+ <return type="void">
+ </return>
<argument index="0" name="points" type="PoolVector3Array">
</argument>
<description>
@@ -12235,7 +13935,7 @@
</method>
</methods>
<members>
- <member name="points" type="Array" setter="set_points" getter="get_points" brief="">
+ <member name="points" type="PoolVector3Array" setter="set_points" getter="get_points" brief="">
</member>
</members>
<constants>
@@ -12258,6 +13958,8 @@
</description>
</method>
<method name="set_point_cloud">
+ <return type="void">
+ </return>
<argument index="0" name="point_cloud" type="PoolVector2Array">
</argument>
<description>
@@ -12265,6 +13967,8 @@
</description>
</method>
<method name="set_points">
+ <return type="void">
+ </return>
<argument index="0" name="points" type="PoolVector2Array">
</argument>
<description>
@@ -12304,9 +14008,9 @@
</description>
</method>
<method name="get_side" qualifiers="const">
- <return type="Object">
+ <return type="Image">
</return>
- <argument index="0" name="side" type="int">
+ <argument index="0" name="side" type="int" enum="CubeMap.Side">
</argument>
<description>
</description>
@@ -12324,27 +14028,35 @@
</description>
</method>
<method name="set_flags">
+ <return type="void">
+ </return>
<argument index="0" name="flags" type="int">
</argument>
<description>
</description>
</method>
<method name="set_lossy_storage_quality">
+ <return type="void">
+ </return>
<argument index="0" name="quality" type="float">
</argument>
<description>
</description>
</method>
<method name="set_side">
- <argument index="0" name="side" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="side" type="int" enum="CubeMap.Side">
</argument>
- <argument index="1" name="image" type="Object">
+ <argument index="1" name="image" type="Image">
</argument>
<description>
</description>
</method>
<method name="set_storage">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="CubeMap.Storage">
</argument>
<description>
</description>
@@ -12410,24 +14122,32 @@
</description>
</method>
<method name="set_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_subdivide_depth">
+ <return type="void">
+ </return>
<argument index="0" name="divisions" type="int">
</argument>
<description>
</description>
</method>
<method name="set_subdivide_height">
+ <return type="void">
+ </return>
<argument index="0" name="divisions" type="int">
</argument>
<description>
</description>
</method>
<method name="set_subdivide_width">
+ <return type="void">
+ </return>
<argument index="0" name="subdivide" type="int">
</argument>
<description>
@@ -12435,7 +14155,7 @@
</method>
</methods>
<members>
- <member name="size" type="Vector2" setter="set_size" getter="get_size" brief="">
+ <member name="size" type="Vector3" setter="set_size" getter="get_size" brief="">
</member>
<member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" brief="">
</member>
@@ -12462,22 +14182,28 @@
</argument>
<argument index="2" name="right_tangent" type="float" default="0">
</argument>
- <argument index="3" name="left_mode" type="int" default="0">
+ <argument index="3" name="left_mode" type="int" enum="Curve.TangentMode" default="0">
</argument>
- <argument index="4" name="right_mode" type="int" default="0">
+ <argument index="4" name="right_mode" type="int" enum="Curve.TangentMode" default="null">
</argument>
<description>
</description>
</method>
<method name="bake">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="clean_dupes">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="clear_points">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -12556,38 +14282,50 @@
</description>
</method>
<method name="remove_point">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="set_bake_resolution">
+ <return type="void">
+ </return>
<argument index="0" name="resolution" type="int">
</argument>
<description>
</description>
</method>
<method name="set_max_value">
+ <return type="void">
+ </return>
<argument index="0" name="max" type="float">
</argument>
<description>
</description>
</method>
<method name="set_min_value">
+ <return type="void">
+ </return>
<argument index="0" name="min" type="float">
</argument>
<description>
</description>
</method>
<method name="set_point_left_mode">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="int">
</argument>
- <argument index="1" name="mode" type="int">
+ <argument index="1" name="mode" type="int" enum="Curve.TangentMode">
</argument>
<description>
</description>
</method>
<method name="set_point_left_tangent">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="int">
</argument>
<argument index="1" name="tangent" type="float">
@@ -12596,6 +14334,8 @@
</description>
</method>
<method name="set_point_offset">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="int">
</argument>
<argument index="1" name="offset" type="float">
@@ -12604,14 +14344,18 @@
</description>
</method>
<method name="set_point_right_mode">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="int">
</argument>
- <argument index="1" name="mode" type="int">
+ <argument index="1" name="mode" type="int" enum="Curve.TangentMode">
</argument>
<description>
</description>
</method>
<method name="set_point_right_tangent">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="int">
</argument>
<argument index="1" name="tangent" type="float">
@@ -12620,6 +14364,8 @@
</description>
</method>
<method name="set_point_value">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="int">
</argument>
<argument index="1" name="y" type="float">
@@ -12629,7 +14375,7 @@
</method>
</methods>
<members>
- <member name="_data" type="int" setter="_set_data" getter="_get_data" brief="">
+ <member name="_data" type="Array" setter="_set_data" getter="_get_data" brief="">
</member>
<member name="bake_resolution" type="int" setter="set_bake_resolution" getter="get_bake_resolution" brief="">
</member>
@@ -12657,13 +14403,15 @@
</description>
<methods>
<method name="add_point">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector2">
</argument>
- <argument index="1" name="in" type="Vector2" default="Vector2(0, 0)">
+ <argument index="1" name="in" type="Vector2" default="Vector2( 0, 0 )">
</argument>
- <argument index="2" name="out" type="Vector2" default="Vector2(0, 0)">
+ <argument index="2" name="out" type="Vector2" default="Vector2( 0, 0 )">
</argument>
- <argument index="3" name="atpos" type="int" default="-1">
+ <argument index="3" name="atpos" type="int" default="null">
</argument>
<description>
Adds a point to a curve, at position "pos", with control points "in" and "out".
@@ -12671,6 +14419,8 @@
</description>
</method>
<method name="clear_points">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -12746,7 +14496,7 @@
</return>
<argument index="0" name="offset" type="float">
</argument>
- <argument index="1" name="cubic" type="bool" default="false">
+ <argument index="1" name="cubic" type="bool" default="null">
</argument>
<description>
Returns a point within the curve at position "offset", where "offset" is measured as a pixel distance along the curve.
@@ -12764,6 +14514,8 @@
</description>
</method>
<method name="remove_point">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -12771,6 +14523,8 @@
</description>
</method>
<method name="set_bake_interval">
+ <return type="void">
+ </return>
<argument index="0" name="distance" type="float">
</argument>
<description>
@@ -12778,6 +14532,8 @@
</description>
</method>
<method name="set_point_in">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="pos" type="Vector2">
@@ -12787,6 +14543,8 @@
</description>
</method>
<method name="set_point_out">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="pos" type="Vector2">
@@ -12796,6 +14554,8 @@
</description>
</method>
<method name="set_point_pos">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="pos" type="Vector2">
@@ -12804,12 +14564,12 @@
Sets the position for the vertex "idx". If the index is out of bounds, the function sends an error to the console.
</description>
</method>
- <method name="tesselate" qualifiers="const">
+ <method name="tessellate" qualifiers="const">
<return type="PoolVector2Array">
</return>
- <argument index="0" name="max_stages" type="int" default="5">
+ <argument index="0" name="max_stages" type="int" default="4">
</argument>
- <argument index="1" name="tolerance_degrees" type="float" default="4">
+ <argument index="1" name="tolerance_degrees" type="float" default="5">
</argument>
<description>
Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
@@ -12820,7 +14580,7 @@
</method>
</methods>
<members>
- <member name="_data" type="int" setter="_set_data" getter="_get_data" brief="">
+ <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" brief="">
</member>
<member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval" brief="">
</member>
@@ -12838,13 +14598,15 @@
</description>
<methods>
<method name="add_point">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector3">
</argument>
- <argument index="1" name="in" type="Vector3" default="Vector3(0, 0, 0)">
+ <argument index="1" name="in" type="Vector3" default="Vector3( 0, 0, 0 )">
</argument>
- <argument index="2" name="out" type="Vector3" default="Vector3(0, 0, 0)">
+ <argument index="2" name="out" type="Vector3" default="Vector3( 0, 0, 0 )">
</argument>
- <argument index="3" name="atpos" type="int" default="-1">
+ <argument index="3" name="atpos" type="int" default="null">
</argument>
<description>
Adds a point to a curve, at position "pos", with control points "in" and "out".
@@ -12852,6 +14614,8 @@
</description>
</method>
<method name="clear_points">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -12943,7 +14707,7 @@
</return>
<argument index="0" name="offset" type="float">
</argument>
- <argument index="1" name="cubic" type="bool" default="false">
+ <argument index="1" name="cubic" type="bool" default="null">
</argument>
<description>
Returns a point within the curve at position "offset", where "offset" is measured as a distance in 3D units along the curve.
@@ -12961,6 +14725,8 @@
</description>
</method>
<method name="remove_point">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -12968,6 +14734,8 @@
</description>
</method>
<method name="set_bake_interval">
+ <return type="void">
+ </return>
<argument index="0" name="distance" type="float">
</argument>
<description>
@@ -12975,6 +14743,8 @@
</description>
</method>
<method name="set_point_in">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="pos" type="Vector3">
@@ -12984,6 +14754,8 @@
</description>
</method>
<method name="set_point_out">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="pos" type="Vector3">
@@ -12993,6 +14765,8 @@
</description>
</method>
<method name="set_point_pos">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="pos" type="Vector3">
@@ -13002,6 +14776,8 @@
</description>
</method>
<method name="set_point_tilt">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="tilt" type="float">
@@ -13011,12 +14787,12 @@
The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow], this tilt is an offset over the natural tilt the PathFollow calculates.
</description>
</method>
- <method name="tesselate" qualifiers="const">
+ <method name="tessellate" qualifiers="const">
<return type="PoolVector3Array">
</return>
- <argument index="0" name="max_stages" type="int" default="5">
+ <argument index="0" name="max_stages" type="int" default="4">
</argument>
- <argument index="1" name="tolerance_degrees" type="float" default="4">
+ <argument index="1" name="tolerance_degrees" type="float" default="5">
</argument>
<description>
Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts.
@@ -13027,7 +14803,7 @@
</method>
</methods>
<members>
- <member name="_data" type="int" setter="_set_data" getter="_get_data" brief="">
+ <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" brief="">
</member>
<member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval" brief="">
</member>
@@ -13048,12 +14824,16 @@
</description>
</method>
<method name="set_curve">
+ <return type="void">
+ </return>
<argument index="0" name="curve" type="Curve">
</argument>
<description>
</description>
</method>
<method name="set_width">
+ <return type="void">
+ </return>
<argument index="0" name="width" type="int">
</argument>
<description>
@@ -13106,30 +14886,40 @@
</description>
</method>
<method name="set_bottom_radius">
+ <return type="void">
+ </return>
<argument index="0" name="radius" type="float">
</argument>
<description>
</description>
</method>
<method name="set_height">
+ <return type="void">
+ </return>
<argument index="0" name="height" type="float">
</argument>
<description>
</description>
</method>
<method name="set_radial_segments">
+ <return type="void">
+ </return>
<argument index="0" name="segments" type="int">
</argument>
<description>
</description>
</method>
<method name="set_rings">
+ <return type="void">
+ </return>
<argument index="0" name="rings" type="int">
</argument>
<description>
</description>
</method>
<method name="set_top_radius">
+ <return type="void">
+ </return>
<argument index="0" name="radius" type="float">
</argument>
<description>
@@ -13188,6 +14978,8 @@
</description>
</method>
<method name="set_damping">
+ <return type="void">
+ </return>
<argument index="0" name="damping" type="float">
</argument>
<description>
@@ -13195,6 +14987,8 @@
</description>
</method>
<method name="set_length">
+ <return type="void">
+ </return>
<argument index="0" name="length" type="float">
</argument>
<description>
@@ -13202,6 +14996,8 @@
</description>
</method>
<method name="set_rest_length">
+ <return type="void">
+ </return>
<argument index="0" name="rest_length" type="float">
</argument>
<description>
@@ -13209,6 +15005,8 @@
</description>
</method>
<method name="set_stiffness">
+ <return type="void">
+ </return>
<argument index="0" name="stiffness" type="float">
</argument>
<description>
@@ -13327,22 +15125,28 @@
</description>
</method>
<method name="set_blend_splits">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_shadow_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="DirectionalLight.ShadowMode">
</argument>
<description>
</description>
</method>
</methods>
<members>
+ <member name="directional_shadow_bias_split_scale" type="float" setter="set_param" getter="get_param" brief="">
+ </member>
<member name="directional_shadow_blend_splits" type="bool" setter="set_blend_splits" getter="is_blend_splits_enabled" brief="">
</member>
- <member name="directional_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" brief="">
+ <member name="directional_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" brief="" enum="DirectionalLight.ShadowMode">
</member>
<member name="directional_shadow_normal_bias" type="float" setter="set_param" getter="get_param" brief="">
</member>
@@ -13387,7 +15191,7 @@
</description>
<methods>
<method name="change_dir">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="todir" type="String">
</argument>
@@ -13397,7 +15201,7 @@
</description>
</method>
<method name="copy">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="from" type="String">
</argument>
@@ -13491,12 +15295,14 @@
</description>
</method>
<method name="list_dir_end">
+ <return type="void">
+ </return>
<description>
Close the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] or not does not matter).
</description>
</method>
<method name="make_dir">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="path" type="String">
</argument>
@@ -13506,7 +15312,7 @@
</description>
</method>
<method name="make_dir_recursive">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="path" type="String">
</argument>
@@ -13516,7 +15322,7 @@
</description>
</method>
<method name="open">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="path" type="String">
</argument>
@@ -13526,7 +15332,7 @@
</description>
</method>
<method name="remove">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="path" type="String">
</argument>
@@ -13536,7 +15342,7 @@
</description>
</method>
<method name="rename">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="from" type="String">
</argument>
@@ -13558,6 +15364,8 @@
</description>
<methods>
<method name="add_fallback">
+ <return type="void">
+ </return>
<argument index="0" name="data" type="DynamicFontData">
</argument>
<description>
@@ -13610,12 +15418,16 @@
</description>
</method>
<method name="remove_fallback">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
</description>
</method>
<method name="set_fallback">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="data" type="DynamicFontData">
@@ -13624,18 +15436,24 @@
</description>
</method>
<method name="set_font_data">
+ <return type="void">
+ </return>
<argument index="0" name="data" type="DynamicFontData">
</argument>
<description>
</description>
</method>
<method name="set_size">
+ <return type="void">
+ </return>
<argument index="0" name="data" type="int">
</argument>
<description>
</description>
</method>
<method name="set_spacing">
+ <return type="void">
+ </return>
<argument index="0" name="type" type="int">
</argument>
<argument index="1" name="value" type="int">
@@ -13644,12 +15462,16 @@
</description>
</method>
<method name="set_use_filter">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_use_mipmaps">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -13698,6 +15520,8 @@
</description>
</method>
<method name="set_font_path">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="String">
</argument>
<description>
@@ -13718,12 +15542,16 @@
</description>
<methods>
<method name="add_filter">
+ <return type="void">
+ </return>
<argument index="0" name="filter" type="String">
</argument>
<description>
</description>
</method>
<method name="clear_filters">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -13770,6 +15598,8 @@
</description>
</method>
<method name="invalidate">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -13786,48 +15616,64 @@
</description>
</method>
<method name="set_access">
- <argument index="0" name="access" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="access" type="int" enum="EditorFileDialog.Access">
</argument>
<description>
</description>
</method>
<method name="set_current_dir">
+ <return type="void">
+ </return>
<argument index="0" name="dir" type="String">
</argument>
<description>
</description>
</method>
<method name="set_current_file">
+ <return type="void">
+ </return>
<argument index="0" name="file" type="String">
</argument>
<description>
</description>
</method>
<method name="set_current_path">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="String">
</argument>
<description>
</description>
</method>
<method name="set_disable_overwrite_warning">
+ <return type="void">
+ </return>
<argument index="0" name="disable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_display_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="EditorFileDialog.DisplayMode">
</argument>
<description>
</description>
</method>
<method name="set_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="EditorFileDialog.Mode">
</argument>
<description>
</description>
</method>
<method name="set_show_hidden_files">
+ <return type="void">
+ </return>
<argument index="0" name="show" type="bool">
</argument>
<description>
@@ -13920,16 +15766,22 @@
</description>
</method>
<method name="scan">
+ <return type="void">
+ </return>
<description>
Scan the filesystem for changes.
</description>
</method>
<method name="scan_sources">
+ <return type="void">
+ </return>
<description>
Check if the source of any imported resource changed.
</description>
</method>
<method name="update_file">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="String">
</argument>
<description>
@@ -13943,6 +15795,12 @@
Emitted if the filesystem changed.
</description>
</signal>
+ <signal name="resources_reimported">
+ <argument index="0" name="resources" type="PoolStringArray">
+ </argument>
+ <description>
+ </description>
+ </signal>
<signal name="sources_changed">
<argument index="0" name="exist" type="bool">
</argument>
@@ -13991,6 +15849,14 @@
<description>
</description>
</method>
+ <method name="get_file_import_is_valid" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="get_file_path" qualifiers="const">
<return type="String">
</return>
@@ -14026,7 +15892,7 @@
</description>
</method>
<method name="get_subdir">
- <return type="Object">
+ <return type="EditorFileSystemDirectory">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -14131,6 +15997,130 @@
<constants>
</constants>
</class>
+<class name="EditorInterface" inherits="Node" category="Core">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <methods>
+ <method name="edit_resource">
+ <return type="void">
+ </return>
+ <argument index="0" name="resource" type="Resource">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_base_control">
+ <return type="Control">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_edited_scene_root">
+ <return type="Node">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_editor_settings">
+ <return type="EditorSettings">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_editor_viewport">
+ <return type="Control">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_open_scenes" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_resource_filesystem">
+ <return type="EditorFileSystem">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_resource_previewer">
+ <return type="EditorResourcePreview">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_script_editor">
+ <return type="ScriptEditor">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_selection">
+ <return type="EditorSelection">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="inspect_object">
+ <return type="void">
+ </return>
+ <argument index="0" name="object" type="Object">
+ </argument>
+ <argument index="1" name="for_property" type="String" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="make_mesh_previews">
+ <return type="Array">
+ </return>
+ <argument index="0" name="arg0" type="Array">
+ </argument>
+ <argument index="1" name="arg1" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="open_scene_from_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="scene_filepath" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="reload_scene_from_path">
+ <return type="void">
+ </return>
+ <argument index="0" name="scene_filepath" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="save_scene">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="save_scene_as">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="with_preview" type="bool" default="null">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
<class name="EditorPlugin" inherits="Node" category="Core">
<brief_description>
Used by the editor to extend its functionality.
@@ -14151,7 +16141,9 @@
</description>
</method>
<method name="add_control_to_container">
- <argument index="0" name="container" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="container" type="int" enum="EditorPlugin.CustomControlContainer">
</argument>
<argument index="1" name="control" type="Control">
</argument>
@@ -14162,7 +16154,9 @@
</description>
</method>
<method name="add_control_to_dock">
- <argument index="0" name="slot" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="slot" type="int" enum="EditorPlugin.DockSlot">
</argument>
<argument index="1" name="control" type="Control">
</argument>
@@ -14173,6 +16167,8 @@
</description>
</method>
<method name="add_custom_type">
+ <return type="void">
+ </return>
<argument index="0" name="type" type="String">
</argument>
<argument index="1" name="base" type="String">
@@ -14189,26 +16185,34 @@
</description>
</method>
<method name="add_import_plugin">
- <argument index="0" name="arg0" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="importer" type="EditorImportPlugin">
</argument>
<description>
</description>
</method>
<method name="add_tool_submenu_item">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="submenu" type="PopupMenu">
+ <argument index="1" name="submenu" type="Object">
</argument>
<description>
</description>
</method>
<method name="apply_changes" qualifiers="virtual">
+ <return type="void">
+ </return>
<description>
This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency.
This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object.
</description>
</method>
<method name="clear" qualifiers="virtual">
+ <return type="void">
+ </return>
<description>
Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene.
</description>
@@ -14223,18 +16227,14 @@
</description>
</method>
<method name="edit" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="object" type="Object">
</argument>
<description>
This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object.
</description>
</method>
- <method name="edit_resource">
- <argument index="0" name="arg0" type="Object">
- </argument>
- <description>
- </description>
- </method>
<method name="forward_canvas_gui_input" qualifiers="virtual">
<return type="bool">
</return>
@@ -14246,6 +16246,8 @@
</description>
</method>
<method name="forward_draw_over_canvas" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="canvas_xform" type="Transform2D">
</argument>
<argument index="1" name="canvas" type="Control">
@@ -14266,13 +16268,6 @@
If you would like to always gets those input events then additionally use [method set_input_forwarding_always_enabled].
</description>
</method>
- <method name="get_base_control">
- <return type="Control">
- </return>
- <description>
- Get a base control where it's safe to place dialogs. Many plugins open dialogs and they need a control as a base to make sure they use the editor icons and theme.
- </description>
- </method>
<method name="get_breakpoints" qualifiers="virtual">
<return type="PoolStringArray">
</return>
@@ -14280,67 +16275,16 @@
This is for editors that edit script based objects. You can return a list of breakpoints in the format (script:line), for example: res://path_to_script.gd:25
</description>
</method>
- <method name="get_editor_settings">
- <return type="EditorSettings">
+ <method name="get_editor_interface">
+ <return type="EditorInterface">
</return>
<description>
- Get the general settings for the editor (the same window that appears in the Settings menu).
</description>
</method>
- <method name="get_edited_scene_root">
- <return type="Node">
- </return>
- <description>
- Returns root node of currently edited scene.
- </description>
- </method>
- <method name="get_editor_viewport">
- <return type="Control">
- </return>
- <description>
- Get the main editor control. Use this as a parent for main screens.
- </description>
- </method>
- <method name="get_name" qualifiers="virtual">
+ <method name="get_plugin_name" qualifiers="virtual">
<return type="String">
</return>
<description>
- Get the name of the editor plugin. For main scren plugins this is what will appear in the selector (which by default is 2D, 3D, Script).
- </description>
- </method>
- <method name="get_open_scenes">
- <return type="Array">
- </return>
- <description>
- Will return an Array of Strings which represent file paths to currently open scenes.
- </description>
- </method>
- <method name="get_resource_filesystem">
- <return type="EditorFileSystem">
- </return>
- <description>
- Get the filesystem cache for all resources in the project.
- </description>
- </method>
- <method name="get_resource_previewer">
- <return type="EditorResourcePreview">
- </return>
- <description>
- Get tool for generating resource previews.
- </description>
- </method>
- <method name="get_script_editor">
- <return type="ScriptEditor">
- </return>
- <description>
- Will return ScriptEditor object which contains informations about state of the scripts which are currently open by the editor.
- </description>
- </method>
- <method name="get_selection">
- <return type="EditorSelection">
- </return>
- <description>
- Get the object that handles the selection of nodes in the Scene Tree editor.
</description>
</method>
<method name="get_state" qualifiers="virtual">
@@ -14358,6 +16302,8 @@
</description>
</method>
<method name="get_window_layout" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="layout" type="ConfigFile">
</argument>
<description>
@@ -14381,25 +16327,22 @@
</description>
</method>
<method name="hide_bottom_panel">
+ <return type="void">
+ </return>
<description>
</description>
</method>
- <method name="inspect_object">
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="for_property" type="String" default="&quot;&quot;">
- </argument>
- <description>
- Inspect an object in the inspector.
- </description>
- </method>
<method name="make_bottom_panel_item_visible">
+ <return type="void">
+ </return>
<argument index="0" name="item" type="Control">
</argument>
<description>
</description>
</method>
<method name="make_visible" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="visible" type="bool">
</argument>
<description>
@@ -14407,26 +16350,16 @@
Remember that you have to manage the visibility of all your editor controls manually.
</description>
</method>
- <method name="open_scene_from_path">
- <argument index="0" name="scene_filepath" type="String">
- </argument>
- <description>
- Opens scene in editor. Do not use during plugin initialization. If you need, then use it together with [method Object.call_deferred].
- </description>
- </method>
<method name="queue_save_layout" qualifiers="const">
+ <return type="void">
+ </return>
<description>
Queue save the project's editor layout.
</description>
</method>
- <method name="reload_scene_from_path">
- <argument index="0" name="scene_filepath" type="String">
- </argument>
- <description>
- Reloads already loaded editor scene.
- </description>
- </method>
<method name="remove_control_from_bottom_panel">
+ <return type="void">
+ </return>
<argument index="0" name="control" type="Control">
</argument>
<description>
@@ -14434,6 +16367,8 @@
</description>
</method>
<method name="remove_control_from_docks">
+ <return type="void">
+ </return>
<argument index="0" name="control" type="Control">
</argument>
<description>
@@ -14441,6 +16376,8 @@
</description>
</method>
<method name="remove_custom_type">
+ <return type="void">
+ </return>
<argument index="0" name="type" type="String">
</argument>
<description>
@@ -14448,22 +16385,30 @@
</description>
</method>
<method name="remove_import_plugin">
- <argument index="0" name="arg0" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="importer" type="EditorImportPlugin">
</argument>
<description>
</description>
</method>
<method name="save_external_data" qualifiers="virtual">
+ <return type="void">
+ </return>
<description>
This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources.
</description>
</method>
<method name="set_input_event_forwarding_always_enabled">
+ <return type="void">
+ </return>
<description>
Use this method if you always want to receive inputs from 3D view screen inside [method forward_spatial_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene.
</description>
</method>
<method name="set_state" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="state" type="Dictionary">
</argument>
<description>
@@ -14471,6 +16416,8 @@
</description>
</method>
<method name="set_window_layout" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="layout" type="ConfigFile">
</argument>
<description>
@@ -14478,11 +16425,36 @@
</description>
</method>
<method name="update_canvas">
+ <return type="void">
+ </return>
<description>
Updates the control used to draw the edited scene over the 2D canvas. This is used together with [method forward_canvas_input_event].
</description>
</method>
</methods>
+ <signals>
+ <signal name="main_screen_changed">
+ <argument index="0" name="screen_name" type="String">
+ </argument>
+ <description>
+ Emitted when user change main screen view (2D, 3D, Script, AssetLib). Works also with screens which are defined by plugins.
+ </description>
+ </signal>
+ <signal name="scene_changed">
+ <argument index="0" name="scene_root" type="Object">
+ </argument>
+ <description>
+ Emitted when user change scene. The argument is a root node of freshly opened scene.
+ </description>
+ </signal>
+ <signal name="scene_closed">
+ <argument index="0" name="filepath" type="String">
+ </argument>
+ <description>
+ Emitted when user close scene. The argument is file path to a closed scene.
+ </description>
+ </signal>
+ </signals>
<constants>
<constant name="CONTAINER_TOOLBAR" value="0">
</constant>
@@ -14517,29 +16489,6 @@
<constant name="DOCK_SLOT_MAX" value="8">
</constant>
</constants>
- <signals>
- <signal name="main_screen_changed">
- <argument index="0" name="screen_name" type="String">
- </argument>
- <description>
- Emitted when user change main screen view (2D, 3D, Script, AssetLib). Works also with screens which are defined by plugins.
- </description>
- </signal>
- <signal name="scene_changed">
- <argument index="0" name="scene_root" type="Node">
- </argument>
- <description>
- Emitted when user change scene. The argument is a root node of freshly opened scene.
- </description>
- </signal>
- <signal name="scene_closed">
- <argument index="0" name="filepath" type="String">
- </argument>
- <description>
- Emitted when user close scene. The argument is file path to a closed scene.
- </description>
- </signal>
- </signals>
</class>
<class name="EditorResourcePreview" inherits="Node" category="Core">
<brief_description>
@@ -14550,6 +16499,8 @@
</description>
<methods>
<method name="add_preview_generator">
+ <return type="void">
+ </return>
<argument index="0" name="generator" type="EditorResourcePreviewGenerator">
</argument>
<description>
@@ -14557,6 +16508,8 @@
</description>
</method>
<method name="check_for_invalidation">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="String">
</argument>
<description>
@@ -14564,6 +16517,8 @@
</description>
</method>
<method name="queue_edited_resource_preview">
+ <return type="void">
+ </return>
<argument index="0" name="resource" type="Resource">
</argument>
<argument index="1" name="receiver" type="Object">
@@ -14577,6 +16532,8 @@
</description>
</method>
<method name="queue_resource_preview">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="String">
</argument>
<argument index="1" name="receiver" type="Object">
@@ -14590,6 +16547,8 @@
</description>
</method>
<method name="remove_preview_generator">
+ <return type="void">
+ </return>
<argument index="0" name="generator" type="EditorResourcePreviewGenerator">
</argument>
<description>
@@ -14661,17 +16620,27 @@
</description>
<methods>
<method name="_run" qualifiers="virtual">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="add_root_node">
- <argument index="0" name="node" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Node">
</argument>
<description>
</description>
</method>
+ <method name="get_editor_interface">
+ <return type="EditorInterface">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_scene">
- <return type="Object">
+ <return type="Node">
</return>
<description>
</description>
@@ -14689,6 +16658,8 @@
</description>
<methods>
<method name="add_node">
+ <return type="void">
+ </return>
<argument index="0" name="node" type="Node">
</argument>
<description>
@@ -14696,6 +16667,8 @@
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clear the selection.
</description>
@@ -14715,6 +16688,8 @@
</description>
</method>
<method name="remove_node">
+ <return type="void">
+ </return>
<argument index="0" name="node" type="Node">
</argument>
<description>
@@ -14747,6 +16722,8 @@
</description>
<methods>
<method name="add_property_info">
+ <return type="void">
+ </return>
<argument index="0" name="info" type="Dictionary">
</argument>
<description>
@@ -14767,6 +16744,8 @@
</description>
</method>
<method name="erase">
+ <return type="void">
+ </return>
<argument index="0" name="property" type="String">
</argument>
<description>
@@ -14784,7 +16763,7 @@
<return type="String">
</return>
<description>
- Get the specific project settings path. Projects all have an unique sub-directory inside the settings path where project specific settings are saved.
+ Get the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved.
</description>
</method>
<method name="get_recent_dirs" qualifiers="const">
@@ -14804,6 +16783,8 @@
</description>
</method>
<method name="set_favorite_dirs">
+ <return type="void">
+ </return>
<argument index="0" name="dirs" type="PoolStringArray">
</argument>
<description>
@@ -14811,6 +16792,8 @@
</description>
</method>
<method name="set_recent_dirs">
+ <return type="void">
+ </return>
<argument index="0" name="dirs" type="PoolStringArray">
</argument>
<description>
@@ -14836,12 +16819,16 @@
</description>
<methods>
<method name="add_collision_segments">
+ <return type="void">
+ </return>
<argument index="0" name="segments" type="PoolVector3Array">
</argument>
<description>
</description>
</method>
<method name="add_collision_triangles">
+ <return type="void">
+ </return>
<argument index="0" name="triangles" type="TriangleMesh">
</argument>
<description>
@@ -14849,11 +16836,13 @@
</description>
</method>
<method name="add_handles">
+ <return type="void">
+ </return>
<argument index="0" name="handles" type="PoolVector3Array">
</argument>
<argument index="1" name="billboard" type="bool" default="false">
</argument>
- <argument index="2" name="secondary" type="bool" default="false">
+ <argument index="2" name="secondary" type="bool" default="null">
</argument>
<description>
Add a list of handles (points) which can be used to deform the object being edited.
@@ -14861,46 +16850,55 @@
</description>
</method>
<method name="add_lines">
+ <return type="void">
+ </return>
<argument index="0" name="lines" type="PoolVector3Array">
</argument>
<argument index="1" name="material" type="Material">
</argument>
- <argument index="2" name="billboard" type="bool" default="false">
+ <argument index="2" name="billboard" type="bool" default="null">
</argument>
<description>
Add lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method redraw].
</description>
</method>
<method name="add_mesh">
- <argument index="0" name="mesh" type="Mesh">
+ <return type="void">
+ </return>
+ <argument index="0" name="mesh" type="ArrayMesh">
</argument>
<argument index="1" name="billboard" type="bool" default="false">
</argument>
- <argument index="2" name="skeleton" type="RID" default="[RID]">
+ <argument index="2" name="skeleton" type="RID" default="null">
</argument>
<description>
- Add a mesh to the gizmo, this is used for visualization. Call this function during [method redraw].
</description>
</method>
<method name="add_unscaled_billboard">
+ <return type="void">
+ </return>
<argument index="0" name="material" type="Material">
</argument>
- <argument index="1" name="default_scale" type="float" default="1">
+ <argument index="1" name="default_scale" type="float" default="null">
</argument>
<description>
Add an unscaled billboard for visualization. Call this function during [method redraw].
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="commit_handle" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="int">
</argument>
<argument index="1" name="restore" type="Variant">
</argument>
- <argument index="2" name="cancel" type="bool">
+ <argument index="2" name="cancel" type="bool" default="false">
</argument>
<description>
Commit a handle being edited (handles must have been prevously added by [method add_handles]).
@@ -14927,11 +16925,15 @@
</description>
</method>
<method name="redraw" qualifiers="virtual">
+ <return type="void">
+ </return>
<description>
This function is called when the Spatial this gizmo refers to changes (the [method Spatial.update_gizmo] is called).
</description>
</method>
<method name="set_handle" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="int">
</argument>
<argument index="1" name="camera" type="Camera">
@@ -14944,10 +16946,35 @@
</description>
</method>
<method name="set_spatial_node">
- <argument index="0" name="node" type="Spatial">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Node">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
+<class name="EncodedObjectAsID" inherits="Reference" category="Core">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <methods>
+ <method name="get_object_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_object_id">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
</argument>
<description>
- Call this function once and upon creation of the gizmo, otherwise no other function will work. The argument is the node being edited by the gizmo.
</description>
</method>
</methods>
@@ -15014,13 +17041,29 @@
"string" - major + minor + patch + status + revision in a single String
</description>
</method>
+ <method name="is_editor_hint" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="is_in_fixed_frame" qualifiers="const">
<return type="bool">
</return>
<description>
</description>
</method>
+ <method name="set_editor_hint">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_iterations_per_second">
+ <return type="void">
+ </return>
<argument index="0" name="iterations_per_second" type="int">
</argument>
<description>
@@ -15028,12 +17071,16 @@
</description>
</method>
<method name="set_target_fps">
+ <return type="void">
+ </return>
<argument index="0" name="target_fps" type="int">
</argument>
<description>
</description>
</method>
<method name="set_time_scale">
+ <return type="void">
+ </return>
<argument index="0" name="time_scale" type="float">
</argument>
<description>
@@ -15056,7 +17103,7 @@
</description>
</method>
<method name="get_adjustment_color_correction" qualifiers="const">
- <return type="Object">
+ <return type="Texture">
</return>
<description>
</description>
@@ -15254,7 +17301,7 @@
</description>
</method>
<method name="get_sky" qualifiers="const">
- <return type="CubeMap">
+ <return type="Sky">
</return>
<description>
</description>
@@ -15466,258 +17513,344 @@
</description>
</method>
<method name="set_adjustment_brightness">
+ <return type="void">
+ </return>
<argument index="0" name="brightness" type="float">
</argument>
<description>
</description>
</method>
<method name="set_adjustment_color_correction">
- <argument index="0" name="color_correction" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="color_correction" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_adjustment_contrast">
+ <return type="void">
+ </return>
<argument index="0" name="contrast" type="float">
</argument>
<description>
</description>
</method>
<method name="set_adjustment_enable">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_adjustment_saturation">
+ <return type="void">
+ </return>
<argument index="0" name="saturation" type="float">
</argument>
<description>
</description>
</method>
<method name="set_ambient_light_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_ambient_light_energy">
+ <return type="void">
+ </return>
<argument index="0" name="energy" type="float">
</argument>
<description>
</description>
</method>
<method name="set_ambient_light_sky_contribution">
+ <return type="void">
+ </return>
<argument index="0" name="energy" type="float">
</argument>
<description>
</description>
</method>
<method name="set_background">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Environment.BGMode">
</argument>
<description>
</description>
</method>
<method name="set_bg_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_bg_energy">
+ <return type="void">
+ </return>
<argument index="0" name="energy" type="float">
</argument>
<description>
</description>
</method>
<method name="set_canvas_max_layer">
+ <return type="void">
+ </return>
<argument index="0" name="layer" type="int">
</argument>
<description>
</description>
</method>
<method name="set_dof_blur_far_amount">
+ <return type="void">
+ </return>
<argument index="0" name="intensity" type="float">
</argument>
<description>
</description>
</method>
<method name="set_dof_blur_far_distance">
+ <return type="void">
+ </return>
<argument index="0" name="intensity" type="float">
</argument>
<description>
</description>
</method>
<method name="set_dof_blur_far_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_dof_blur_far_quality">
- <argument index="0" name="intensity" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="intensity" type="int" enum="Environment.DOFBlurQuality">
</argument>
<description>
</description>
</method>
<method name="set_dof_blur_far_transition">
+ <return type="void">
+ </return>
<argument index="0" name="intensity" type="float">
</argument>
<description>
</description>
</method>
<method name="set_dof_blur_near_amount">
+ <return type="void">
+ </return>
<argument index="0" name="intensity" type="float">
</argument>
<description>
</description>
</method>
<method name="set_dof_blur_near_distance">
+ <return type="void">
+ </return>
<argument index="0" name="intensity" type="float">
</argument>
<description>
</description>
</method>
<method name="set_dof_blur_near_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_dof_blur_near_quality">
- <argument index="0" name="level" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="level" type="int" enum="Environment.DOFBlurQuality">
</argument>
<description>
</description>
</method>
<method name="set_dof_blur_near_transition">
+ <return type="void">
+ </return>
<argument index="0" name="intensity" type="float">
</argument>
<description>
</description>
</method>
<method name="set_fog_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_fog_depth_begin">
+ <return type="void">
+ </return>
<argument index="0" name="distance" type="float">
</argument>
<description>
</description>
</method>
<method name="set_fog_depth_curve">
+ <return type="void">
+ </return>
<argument index="0" name="curve" type="float">
</argument>
<description>
</description>
</method>
<method name="set_fog_depth_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_fog_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_fog_height_curve">
+ <return type="void">
+ </return>
<argument index="0" name="curve" type="float">
</argument>
<description>
</description>
</method>
<method name="set_fog_height_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_fog_height_max">
+ <return type="void">
+ </return>
<argument index="0" name="height" type="float">
</argument>
<description>
</description>
</method>
<method name="set_fog_height_min">
+ <return type="void">
+ </return>
<argument index="0" name="height" type="float">
</argument>
<description>
</description>
</method>
<method name="set_fog_sun_amount">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_fog_sun_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_fog_transmit_curve">
+ <return type="void">
+ </return>
<argument index="0" name="curve" type="float">
</argument>
<description>
</description>
</method>
<method name="set_fog_transmit_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_glow_bicubic_upscale">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_glow_blend_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Environment.GlowBlendMode">
</argument>
<description>
</description>
</method>
<method name="set_glow_bloom">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_glow_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_glow_hdr_bleed_scale">
+ <return type="void">
+ </return>
<argument index="0" name="scale" type="float">
</argument>
<description>
</description>
</method>
<method name="set_glow_hdr_bleed_threshold">
+ <return type="void">
+ </return>
<argument index="0" name="threshold" type="float">
</argument>
<description>
</description>
</method>
<method name="set_glow_intensity">
+ <return type="void">
+ </return>
<argument index="0" name="intensity" type="float">
</argument>
<description>
</description>
</method>
<method name="set_glow_level">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="enabled" type="bool">
@@ -15726,157 +17859,209 @@
</description>
</method>
<method name="set_glow_strength">
+ <return type="void">
+ </return>
<argument index="0" name="strength" type="float">
</argument>
<description>
</description>
</method>
<method name="set_sky">
+ <return type="void">
+ </return>
<argument index="0" name="sky" type="Sky">
</argument>
<description>
</description>
</method>
<method name="set_sky_scale">
+ <return type="void">
+ </return>
<argument index="0" name="scale" type="float">
</argument>
<description>
</description>
</method>
<method name="set_ssao_bias">
+ <return type="void">
+ </return>
<argument index="0" name="bias" type="float">
</argument>
<description>
</description>
</method>
<method name="set_ssao_blur">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_ssao_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_ssao_direct_light_affect">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_ssao_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_ssao_intensity">
+ <return type="void">
+ </return>
<argument index="0" name="intensity" type="float">
</argument>
<description>
</description>
</method>
<method name="set_ssao_intensity2">
+ <return type="void">
+ </return>
<argument index="0" name="intensity" type="float">
</argument>
<description>
</description>
</method>
<method name="set_ssao_radius">
+ <return type="void">
+ </return>
<argument index="0" name="radius" type="float">
</argument>
<description>
</description>
</method>
<method name="set_ssao_radius2">
+ <return type="void">
+ </return>
<argument index="0" name="radius" type="float">
</argument>
<description>
</description>
</method>
<method name="set_ssr_depth_tolerance">
+ <return type="void">
+ </return>
<argument index="0" name="depth_tolerance" type="float">
</argument>
<description>
</description>
</method>
<method name="set_ssr_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_ssr_fade_in">
+ <return type="void">
+ </return>
<argument index="0" name="fade_in" type="float">
</argument>
<description>
</description>
</method>
<method name="set_ssr_fade_out">
+ <return type="void">
+ </return>
<argument index="0" name="fade_out" type="float">
</argument>
<description>
</description>
</method>
<method name="set_ssr_max_steps">
+ <return type="void">
+ </return>
<argument index="0" name="max_steps" type="int">
</argument>
<description>
</description>
</method>
<method name="set_ssr_rough">
+ <return type="void">
+ </return>
<argument index="0" name="rough" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_tonemap_auto_exposure">
+ <return type="void">
+ </return>
<argument index="0" name="auto_exposure" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_tonemap_auto_exposure_grey">
+ <return type="void">
+ </return>
<argument index="0" name="exposure_grey" type="float">
</argument>
<description>
</description>
</method>
<method name="set_tonemap_auto_exposure_max">
+ <return type="void">
+ </return>
<argument index="0" name="exposure_max" type="float">
</argument>
<description>
</description>
</method>
<method name="set_tonemap_auto_exposure_min">
+ <return type="void">
+ </return>
<argument index="0" name="exposure_min" type="float">
</argument>
<description>
</description>
</method>
<method name="set_tonemap_auto_exposure_speed">
+ <return type="void">
+ </return>
<argument index="0" name="exposure_speed" type="float">
</argument>
<description>
</description>
</method>
<method name="set_tonemap_exposure">
+ <return type="void">
+ </return>
<argument index="0" name="exposure" type="float">
</argument>
<description>
</description>
</method>
<method name="set_tonemap_white">
+ <return type="void">
+ </return>
<argument index="0" name="white" type="float">
</argument>
<description>
</description>
</method>
<method name="set_tonemapper">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Environment.ToneMapper">
</argument>
<description>
</description>
@@ -15915,7 +18100,7 @@
</member>
<member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy" brief="">
</member>
- <member name="background_mode" type="int" setter="set_background" getter="get_background" brief="">
+ <member name="background_mode" type="int" setter="set_background" getter="get_background" brief="" enum="Environment.BGMode">
</member>
<member name="background_sky" type="Sky" setter="set_sky" getter="get_sky" brief="">
</member>
@@ -15927,7 +18112,7 @@
</member>
<member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" brief="">
</member>
- <member name="dof_blur_far_quality" type="int" setter="set_dof_blur_far_quality" getter="get_dof_blur_far_quality" brief="">
+ <member name="dof_blur_far_quality" type="int" setter="set_dof_blur_far_quality" getter="get_dof_blur_far_quality" brief="" enum="Environment.DOFBlurQuality">
</member>
<member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" brief="">
</member>
@@ -15937,7 +18122,7 @@
</member>
<member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" brief="">
</member>
- <member name="dof_blur_near_quality" type="int" setter="set_dof_blur_near_quality" getter="get_dof_blur_near_quality" brief="">
+ <member name="dof_blur_near_quality" type="int" setter="set_dof_blur_near_quality" getter="get_dof_blur_near_quality" brief="" enum="Environment.DOFBlurQuality">
</member>
<member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" brief="">
</member>
@@ -15969,7 +18154,7 @@
</member>
<member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled" brief="">
</member>
- <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" brief="">
+ <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" brief="" enum="Environment.GlowBlendMode">
</member>
<member name="glow_bloom" type="float" setter="set_glow_bloom" getter="get_glow_bloom" brief="">
</member>
@@ -16029,7 +18214,7 @@
</member>
<member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure" brief="">
</member>
- <member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" brief="">
+ <member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" brief="" enum="Environment.ToneMapper">
</member>
<member name="tonemap_white" type="float" setter="set_tonemap_white" getter="get_tonemap_white" brief="">
</member>
@@ -16095,6 +18280,8 @@
</description>
<methods>
<method name="close">
+ <return type="void">
+ </return>
<description>
Close the currently opened file.
</description>
@@ -16183,7 +18370,7 @@
</description>
</method>
<method name="get_error" qualifiers="const">
- <return type="Error">
+ <return type="int">
</return>
<description>
Get the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [@Global Scope].
@@ -16258,6 +18445,8 @@
</description>
</method>
<method name="get_var" qualifiers="const">
+ <return type="Variant">
+ </return>
<description>
Get the next Variant value from the file.
</description>
@@ -16287,7 +18476,7 @@
</argument>
<argument index="1" name="mode_flags" type="int">
</argument>
- <argument index="2" name="compression_mode" type="int" default="0">
+ <argument index="2" name="compression_mode" type="int" default="null">
</argument>
<description>
Open a compressed file for reading or writing. The compression_mode can be set as one of the COMPRESSION_* constants.
@@ -16320,6 +18509,8 @@
</description>
</method>
<method name="seek">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="int">
</argument>
<description>
@@ -16327,6 +18518,8 @@
</description>
</method>
<method name="seek_end">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="int" default="0">
</argument>
<description>
@@ -16334,6 +18527,8 @@
</description>
</method>
<method name="set_endian_swap">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -16342,6 +18537,8 @@
</description>
</method>
<method name="store_16">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="int">
</argument>
<description>
@@ -16349,6 +18546,8 @@
</description>
</method>
<method name="store_32">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="int">
</argument>
<description>
@@ -16356,6 +18555,8 @@
</description>
</method>
<method name="store_64">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="int">
</argument>
<description>
@@ -16363,6 +18564,8 @@
</description>
</method>
<method name="store_8">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="int">
</argument>
<description>
@@ -16370,6 +18573,8 @@
</description>
</method>
<method name="store_buffer">
+ <return type="void">
+ </return>
<argument index="0" name="buffer" type="PoolByteArray">
</argument>
<description>
@@ -16377,6 +18582,8 @@
</description>
</method>
<method name="store_double">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="float">
</argument>
<description>
@@ -16384,6 +18591,8 @@
</description>
</method>
<method name="store_float">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="float">
</argument>
<description>
@@ -16391,6 +18600,8 @@
</description>
</method>
<method name="store_line">
+ <return type="void">
+ </return>
<argument index="0" name="line" type="String">
</argument>
<description>
@@ -16398,6 +18609,8 @@
</description>
</method>
<method name="store_pascal_string">
+ <return type="void">
+ </return>
<argument index="0" name="string" type="String">
</argument>
<description>
@@ -16405,6 +18618,8 @@
</description>
</method>
<method name="store_real">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="float">
</argument>
<description>
@@ -16412,6 +18627,8 @@
</description>
</method>
<method name="store_string">
+ <return type="void">
+ </return>
<argument index="0" name="string" type="String">
</argument>
<description>
@@ -16419,6 +18636,8 @@
</description>
</method>
<method name="store_var">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="Variant">
</argument>
<description>
@@ -16461,6 +18680,8 @@
</description>
<methods>
<method name="add_filter">
+ <return type="void">
+ </return>
<argument index="0" name="filter" type="String">
</argument>
<description>
@@ -16468,6 +18689,8 @@
</description>
</method>
<method name="clear_filters">
+ <return type="void">
+ </return>
<description>
Clear all the added filters in the dialog.
</description>
@@ -16521,6 +18744,8 @@
</description>
</method>
<method name="invalidate">
+ <return type="void">
+ </return>
<description>
Invalidate and update the current dialog content list.
</description>
@@ -16533,13 +18758,17 @@
</description>
</method>
<method name="set_access">
- <argument index="0" name="access" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="access" type="int" enum="FileDialog.Access">
</argument>
<description>
Set the file access permission of the dialog(Must be one of [ACCESS_RESOURCES], [ACCESS_USERDATA] or [ACCESS_FILESYSTEM]).
</description>
</method>
<method name="set_current_dir">
+ <return type="void">
+ </return>
<argument index="0" name="dir" type="String">
</argument>
<description>
@@ -16547,6 +18776,8 @@
</description>
</method>
<method name="set_current_file">
+ <return type="void">
+ </return>
<argument index="0" name="file" type="String">
</argument>
<description>
@@ -16554,6 +18785,8 @@
</description>
</method>
<method name="set_current_path">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="String">
</argument>
<description>
@@ -16561,19 +18794,25 @@
</description>
</method>
<method name="set_filters">
+ <return type="void">
+ </return>
<argument index="0" name="filters" type="PoolStringArray">
</argument>
<description>
</description>
</method>
<method name="set_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="FileDialog.Mode">
</argument>
<description>
Set the file dialog mode from the MODE_* enum.
</description>
</method>
<method name="set_show_hidden_files">
+ <return type="void">
+ </return>
<argument index="0" name="show" type="bool">
</argument>
<description>
@@ -16582,11 +18821,11 @@
</method>
</methods>
<members>
- <member name="access" type="int" setter="set_access" getter="get_access" brief="">
+ <member name="access" type="int" setter="set_access" getter="get_access" brief="" enum="FileDialog.Access">
</member>
<member name="filters" type="PoolStringArray" setter="set_filters" getter="get_filters" brief="">
</member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="">
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="FileDialog.Mode">
</member>
<member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" brief="">
</member>
@@ -16654,19 +18893,21 @@
Internationalized font and text drawing support.
</brief_description>
<description>
- Font contains an unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. TODO check wikipedia for graph of ascent/baseline/descent/height/etc.
+ Font contains a unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. TODO check wikipedia for graph of ascent/baseline/descent/height/etc.
</description>
<methods>
<method name="draw" qualifiers="const">
+ <return type="void">
+ </return>
<argument index="0" name="canvas_item" type="RID">
</argument>
<argument index="1" name="pos" type="Vector2">
</argument>
<argument index="2" name="string" type="String">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color(1,1,1,1)">
+ <argument index="3" name="modulate" type="Color" default="null">
</argument>
- <argument index="4" name="clip_w" type="int" default="-1">
+ <argument index="4" name="clip_w" type="int" default="null">
</argument>
<description>
Draw "string" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis.
@@ -16681,9 +18922,9 @@
</argument>
<argument index="2" name="char" type="int">
</argument>
- <argument index="3" name="next" type="int" default="-1">
+ <argument index="3" name="next" type="int" default="null">
</argument>
- <argument index="4" name="modulate" type="Color" default="Color(1,1,1,1)">
+ <argument index="4" name="modulate" type="Color" default="null">
</argument>
<description>
Draw character "char" into a canvas item using the font at a given "pos" position, with "modulate" color, and optionally kerning if "next" is passed. clipping the width. "pos" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character.
@@ -16726,6 +18967,8 @@
</description>
</method>
<method name="update_changes">
+ <return type="void">
+ </return>
<description>
After editing a font (changing size, ascent, char rects, etc.). Call this function to propagate changes to controls that might use it.
</description>
@@ -16750,6 +18993,8 @@
</description>
</method>
<method name="set_function">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -16757,6 +19002,8 @@
</description>
</method>
<method name="set_instance">
+ <return type="void">
+ </return>
<argument index="0" name="instance" type="Object">
</argument>
<description>
@@ -16788,7 +19035,7 @@
<method name="resume">
<return type="Variant">
</return>
- <argument index="0" name="arg" type="Variant" default="NULL">
+ <argument index="0" name="arg" type="Variant" default="null">
</argument>
<description>
Resume execution of the yielded function call.
@@ -16808,39 +19055,67 @@
<constants>
</constants>
</class>
-<class name="GDNativeClass" inherits="Reference" category="Core">
+<class name="GDNative" inherits="Reference" category="Core">
<brief_description>
</brief_description>
<description>
</description>
<methods>
- <method name="new">
+ <method name="call_native">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="procedure_name" type="String">
+ </argument>
+ <argument index="1" name="arguments" type="String">
+ </argument>
+ <argument index="2" name="arg2" type="Array">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_library">
+ <return type="GDNativeLibrary">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="initialize">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_library">
+ <return type="void">
+ </return>
+ <argument index="0" name="library" type="GDNativeLibrary">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="terminate">
+ <return type="bool">
+ </return>
<description>
</description>
</method>
</methods>
+ <members>
+ <member name="library" type="GDNativeLibrary" setter="set_library" getter="get_library" brief="">
+ </member>
+ </members>
<constants>
</constants>
</class>
-<class name="GDNativeLibrary" inherits="Resource" category="Core">
+<class name="GDNativeClass" inherits="Reference" category="Core">
<brief_description>
</brief_description>
<description>
</description>
<methods>
- <method name="get_platform_file" qualifiers="const">
- <return type="String">
+ <method name="new">
+ <return type="Variant">
</return>
- <argument index="0" name="platform" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_platform_file">
- <argument index="0" name="platform" type="String">
- </argument>
- <argument index="1" name="file" type="String">
- </argument>
<description>
</description>
</method>
@@ -16848,49 +19123,31 @@
<constants>
</constants>
</class>
-<class name="GDNativeScript" inherits="Script" category="Core">
+<class name="GDNativeLibrary" inherits="Resource" category="Core">
<brief_description>
</brief_description>
<description>
</description>
<methods>
- <method name="get_library" qualifiers="const">
- <return type="Object">
- </return>
- <description>
- </description>
- </method>
- <method name="get_script_name" qualifiers="const">
+ <method name="get_library_path" qualifiers="const">
<return type="String">
</return>
+ <argument index="0" name="platform" type="String">
+ </argument>
<description>
</description>
</method>
- <method name="new" qualifiers="vararg">
- <return type="Object">
+ <method name="set_library_path">
+ <return type="void">
</return>
- <description>
- </description>
- </method>
- <method name="set_library">
- <argument index="0" name="library" type="Object">
+ <argument index="0" name="platform" type="String">
</argument>
- <description>
- </description>
- </method>
- <method name="set_script_name">
- <argument index="0" name="script_name" type="String">
+ <argument index="1" name="path" type="String">
</argument>
<description>
</description>
</method>
</methods>
- <members>
- <member name="library" type="GDNativeLibrary" setter="set_library" getter="get_library" brief="">
- </member>
- <member name="script_name" type="String" setter="set_script_name" getter="get_script_name" brief="">
- </member>
- </members>
<constants>
</constants>
</class>
@@ -16923,14 +19180,18 @@
</description>
<methods>
<method name="bake">
- <argument index="0" name="from_node" type="Object" default="NULL">
+ <return type="void">
+ </return>
+ <argument index="0" name="from_node" type="Node" default="false">
</argument>
- <argument index="1" name="create_visual_debug" type="bool" default="false">
+ <argument index="1" name="create_visual_debug" type="bool" default="null">
</argument>
<description>
</description>
</method>
<method name="debug_bake">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -16965,7 +19226,7 @@
</description>
</method>
<method name="get_probe_data" qualifiers="const">
- <return type="Object">
+ <return type="GIProbeData">
</return>
<description>
</description>
@@ -16995,61 +19256,81 @@
</description>
</method>
<method name="set_bias">
+ <return type="void">
+ </return>
<argument index="0" name="max" type="float">
</argument>
<description>
</description>
</method>
<method name="set_compress">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_dynamic_range">
+ <return type="void">
+ </return>
<argument index="0" name="max" type="int">
</argument>
<description>
</description>
</method>
<method name="set_energy">
+ <return type="void">
+ </return>
<argument index="0" name="max" type="float">
</argument>
<description>
</description>
</method>
<method name="set_extents">
+ <return type="void">
+ </return>
<argument index="0" name="extents" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_interior">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_normal_bias">
+ <return type="void">
+ </return>
<argument index="0" name="max" type="float">
</argument>
<description>
</description>
</method>
<method name="set_probe_data">
- <argument index="0" name="data" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="data" type="GIProbeData">
</argument>
<description>
</description>
</method>
<method name="set_propagation">
+ <return type="void">
+ </return>
<argument index="0" name="max" type="float">
</argument>
<description>
</description>
</method>
<method name="set_subdiv">
- <argument index="0" name="subdiv" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="subdiv" type="int" enum="GIProbe.Subdiv">
</argument>
<description>
</description>
@@ -17074,7 +19355,7 @@
</member>
<member name="propagation" type="float" setter="set_propagation" getter="get_propagation" brief="">
</member>
- <member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" brief="">
+ <member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" brief="" enum="GIProbe.Subdiv">
</member>
</members>
<constants>
@@ -17161,66 +19442,88 @@
</description>
</method>
<method name="set_bias">
+ <return type="void">
+ </return>
<argument index="0" name="bias" type="float">
</argument>
<description>
</description>
</method>
<method name="set_bounds">
+ <return type="void">
+ </return>
<argument index="0" name="bounds" type="Rect3">
</argument>
<description>
</description>
</method>
<method name="set_cell_size">
+ <return type="void">
+ </return>
<argument index="0" name="cell_size" type="float">
</argument>
<description>
</description>
</method>
<method name="set_compress">
+ <return type="void">
+ </return>
<argument index="0" name="compress" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_dynamic_data">
+ <return type="void">
+ </return>
<argument index="0" name="dynamic_data" type="PoolIntArray">
</argument>
<description>
</description>
</method>
<method name="set_dynamic_range">
+ <return type="void">
+ </return>
<argument index="0" name="dynamic_range" type="int">
</argument>
<description>
</description>
</method>
<method name="set_energy">
+ <return type="void">
+ </return>
<argument index="0" name="energy" type="float">
</argument>
<description>
</description>
</method>
<method name="set_interior">
+ <return type="void">
+ </return>
<argument index="0" name="interior" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_normal_bias">
+ <return type="void">
+ </return>
<argument index="0" name="bias" type="float">
</argument>
<description>
</description>
</method>
<method name="set_propagation">
+ <return type="void">
+ </return>
<argument index="0" name="propagation" type="float">
</argument>
<description>
</description>
</method>
<method name="set_to_cell_xform">
+ <return type="void">
+ </return>
<argument index="0" name="to_cell_xform" type="Transform">
</argument>
<description>
@@ -17263,7 +19566,7 @@
<method name="get_flag_x" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="flag" type="int">
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
</argument>
<description>
</description>
@@ -17271,7 +19574,7 @@
<method name="get_flag_y" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="flag" type="int">
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
</argument>
<description>
</description>
@@ -17279,7 +19582,7 @@
<method name="get_flag_z" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="flag" type="int">
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
</argument>
<description>
</description>
@@ -17287,7 +19590,7 @@
<method name="get_param_x" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int">
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
</argument>
<description>
</description>
@@ -17295,7 +19598,7 @@
<method name="get_param_y" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int">
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
</argument>
<description>
</description>
@@ -17303,13 +19606,15 @@
<method name="get_param_z" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int">
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
</argument>
<description>
</description>
</method>
<method name="set_flag_x">
- <argument index="0" name="flag" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
</argument>
<argument index="1" name="value" type="bool">
</argument>
@@ -17317,7 +19622,9 @@
</description>
</method>
<method name="set_flag_y">
- <argument index="0" name="flag" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
</argument>
<argument index="1" name="value" type="bool">
</argument>
@@ -17325,7 +19632,9 @@
</description>
</method>
<method name="set_flag_z">
- <argument index="0" name="flag" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="Generic6DOFJoint.Flag">
</argument>
<argument index="1" name="value" type="bool">
</argument>
@@ -17333,7 +19642,9 @@
</description>
</method>
<method name="set_param_x">
- <argument index="0" name="param" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
</argument>
<argument index="1" name="value" type="float">
</argument>
@@ -17341,7 +19652,9 @@
</description>
</method>
<method name="set_param_y">
- <argument index="0" name="param" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
</argument>
<argument index="1" name="value" type="float">
</argument>
@@ -17349,7 +19662,9 @@
</description>
</method>
<method name="set_param_z">
- <argument index="0" name="param" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="Generic6DOFJoint.Param">
</argument>
<argument index="1" name="value" type="float">
</argument>
@@ -17527,7 +19842,7 @@
</argument>
<argument index="3" name="lats" type="int">
</argument>
- <argument index="4" name="axis" type="int" default="2">
+ <argument index="4" name="axis" type="int" enum="Vector3.Axis" default="null">
</argument>
<description>
</description>
@@ -17541,7 +19856,7 @@
</argument>
<argument index="2" name="sides" type="int">
</argument>
- <argument index="3" name="axis" type="int" default="2">
+ <argument index="3" name="axis" type="int" enum="Vector3.Axis" default="null">
</argument>
<description>
</description>
@@ -17653,6 +19968,8 @@
</description>
</method>
<method name="ray_intersects_triangle">
+ <return type="Variant">
+ </return>
<argument index="0" name="from" type="Vector3">
</argument>
<argument index="1" name="dir" type="Vector3">
@@ -17707,6 +20024,8 @@
</description>
</method>
<method name="segment_intersects_segment_2d">
+ <return type="Variant">
+ </return>
<argument index="0" name="from_a" type="Vector2">
</argument>
<argument index="1" name="to_a" type="Vector2">
@@ -17733,6 +20052,8 @@
</description>
</method>
<method name="segment_intersects_triangle">
+ <return type="Variant">
+ </return>
<argument index="0" name="from" type="Vector3">
</argument>
<argument index="1" name="to" type="Vector3">
@@ -17781,7 +20102,7 @@
<method name="get_flag" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="flag" type="int">
+ <argument index="0" name="flag" type="int" enum="GeometryInstance.Flags">
</argument>
<description>
</description>
@@ -17811,26 +20132,32 @@
</description>
</method>
<method name="get_material_override" qualifiers="const">
- <return type="Object">
+ <return type="Material">
</return>
<description>
Return the material override for the whole geometry.
</description>
</method>
<method name="set_cast_shadows_setting">
- <argument index="0" name="shadow_casting_setting" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="shadow_casting_setting" type="int" enum="GeometryInstance.ShadowCastingSetting">
</argument>
<description>
</description>
</method>
<method name="set_extra_cull_margin">
+ <return type="void">
+ </return>
<argument index="0" name="margin" type="float">
</argument>
<description>
</description>
</method>
<method name="set_flag">
- <argument index="0" name="flag" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="GeometryInstance.Flags">
</argument>
<argument index="1" name="value" type="bool">
</argument>
@@ -17838,31 +20165,41 @@
</description>
</method>
<method name="set_lod_max_distance">
+ <return type="void">
+ </return>
<argument index="0" name="mode" type="float">
</argument>
<description>
</description>
</method>
<method name="set_lod_max_hysteresis">
+ <return type="void">
+ </return>
<argument index="0" name="mode" type="float">
</argument>
<description>
</description>
</method>
<method name="set_lod_min_distance">
+ <return type="void">
+ </return>
<argument index="0" name="mode" type="float">
</argument>
<description>
</description>
</method>
<method name="set_lod_min_hysteresis">
+ <return type="void">
+ </return>
<argument index="0" name="mode" type="float">
</argument>
<description>
</description>
</method>
<method name="set_material_override">
- <argument index="0" name="material" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="material" type="Material">
</argument>
<description>
Set the material override for the whole geometry.
@@ -17870,188 +20207,36 @@
</method>
</methods>
<members>
- <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" brief="">
+ <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" brief="" enum="GeometryInstance.ShadowCastingSetting">
</member>
<member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin" brief="">
</member>
- <member name="lod_max_distance" type="int" setter="set_lod_max_distance" getter="get_lod_max_distance" brief="">
+ <member name="lod_max_distance" type="float" setter="set_lod_max_distance" getter="get_lod_max_distance" brief="">
</member>
- <member name="lod_max_hysteresis" type="int" setter="set_lod_max_hysteresis" getter="get_lod_max_hysteresis" brief="">
+ <member name="lod_max_hysteresis" type="float" setter="set_lod_max_hysteresis" getter="get_lod_max_hysteresis" brief="">
</member>
- <member name="lod_min_distance" type="int" setter="set_lod_min_distance" getter="get_lod_min_distance" brief="">
+ <member name="lod_min_distance" type="float" setter="set_lod_min_distance" getter="get_lod_min_distance" brief="">
</member>
- <member name="lod_min_hysteresis" type="int" setter="set_lod_min_hysteresis" getter="get_lod_min_hysteresis" brief="">
+ <member name="lod_min_hysteresis" type="float" setter="set_lod_min_hysteresis" getter="get_lod_min_hysteresis" brief="">
</member>
- <member name="material_override" type="ShaderMaterial,SpatialMaterial" setter="set_material_override" getter="get_material_override" brief="">
+ <member name="material_override" type="Material" setter="set_material_override" getter="get_material_override" brief="">
</member>
<member name="use_in_baked_light" type="bool" setter="set_flag" getter="get_flag" brief="">
</member>
- <member name="visible_in_all_rooms" type="bool" setter="set_flag" getter="get_flag" brief="">
- </member>
</members>
<constants>
- <constant name="FLAG_CAST_SHADOW" value="0">
+ <constant name="FLAG_MAX" value="1" enum="">
</constant>
- <constant name="FLAG_VISIBLE_IN_ALL_ROOMS" value="1">
+ <constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="">
</constant>
- <constant name="FLAG_MAX" value="3">
- </constant>
- <constant name="SHADOW_CASTING_SETTING_OFF" value="0">
- </constant>
- <constant name="SHADOW_CASTING_SETTING_ON" value="1">
+ <constant name="SHADOW_CASTING_SETTING_ON" value="1" enum="">
</constant>
- <constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2">
+ <constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2" enum="">
</constant>
- <constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3">
+ <constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3" enum="">
</constant>
</constants>
</class>
-<class name="ProjectSettings" inherits="Object" category="Core">
- <brief_description>
- Contains global variables accessible from everywhere.
- </brief_description>
- <description>
- Contains global variables accessible from everywhere. Use the normal [Object] API, such as "ProjectSettings.get(variable)", "ProjectSettings.set(variable,value)" or "ProjectSettings.has(variable)" to access them. Variables stored in project.godot are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options.
- </description>
- <methods>
- <method name="add_property_info">
- <argument index="0" name="hint" type="Dictionary">
- </argument>
- <description>
- Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@Global Scope]), and optionally hint:[int](see PROPERTY_HINT_* in [@Global Scope]), hint_string:[String].
- Example:
- [codeblock]
- ProjectSettings.set("category/property_name", 0)
-
- var property_info = {
- "name": "category/property_name",
- "type": TYPE_INT,
- "hint": PROPERTY_HINT_ENUM,
- "hint_string": "one,two,three"
- }
-
- ProjectSettings.add_property_info(property_info)
- [/codeblock]
- </description>
- </method>
- <method name="clear">
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Clear the whole configuration (not recommended, may break things).
- </description>
- </method>
- <method name="get_order" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Return the order of a configuration value (influences when saved to the config file).
- </description>
- </method>
- <method name="get_singleton" qualifiers="const">
- <return type="Object">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="globalize_path" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Convert a localized path (res://) to a full native OS path.
- </description>
- </method>
- <method name="has" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Return true if a configuration value is present.
- </description>
- </method>
- <method name="has_singleton" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="load_resource_pack">
- <return type="bool">
- </return>
- <argument index="0" name="pack" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="localize_path" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="path" type="String">
- </argument>
- <description>
- Convert a path to a localized path (res:// path).
- </description>
- </method>
- <method name="property_can_revert">
- <return type="bool">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="property_get_revert">
- <return type="Variant">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="save">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="save_custom">
- <return type="int">
- </return>
- <argument index="0" name="file" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_initial_value">
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="value" type="Variant">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_order">
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="pos" type="int">
- </argument>
- <description>
- Set the order of a configuration value (influences when saved to the config file).
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
<class name="Gradient" inherits="Resource" category="Core">
<brief_description>
Color interpolator node
@@ -18061,6 +20246,8 @@
</description>
<methods>
<method name="add_point">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="float">
</argument>
<argument index="1" name="color" type="Color">
@@ -18118,6 +20305,8 @@
</description>
</method>
<method name="remove_point">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="int">
</argument>
<description>
@@ -18125,6 +20314,8 @@
</description>
</method>
<method name="set_color">
+ <return type="void">
+ </return>
<argument index="0" name="point" type="int">
</argument>
<argument index="1" name="color" type="Color">
@@ -18134,6 +20325,8 @@
</description>
</method>
<method name="set_colors">
+ <return type="void">
+ </return>
<argument index="0" name="colors" type="PoolColorArray">
</argument>
<description>
@@ -18141,6 +20334,8 @@
</description>
</method>
<method name="set_offset">
+ <return type="void">
+ </return>
<argument index="0" name="point" type="int">
</argument>
<argument index="1" name="offset" type="float">
@@ -18150,6 +20345,8 @@
</description>
</method>
<method name="set_offsets">
+ <return type="void">
+ </return>
<argument index="0" name="offsets" type="PoolRealArray">
</argument>
<description>
@@ -18158,9 +20355,9 @@
</method>
</methods>
<members>
- <member name="colors" type="float" setter="set_colors" getter="get_colors" brief="">
+ <member name="colors" type="PoolColorArray" setter="set_colors" getter="get_colors" brief="">
</member>
- <member name="offsets" type="float" setter="set_offsets" getter="get_offsets" brief="">
+ <member name="offsets" type="PoolRealArray" setter="set_offsets" getter="get_offsets" brief="">
</member>
</members>
<constants>
@@ -18179,12 +20376,16 @@
</description>
</method>
<method name="set_gradient">
+ <return type="void">
+ </return>
<argument index="0" name="gradient" type="Gradient">
</argument>
<description>
</description>
</method>
<method name="set_width">
+ <return type="void">
+ </return>
<argument index="0" name="width" type="int">
</argument>
<description>
@@ -18205,12 +20406,12 @@
GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them.
</brief_description>
<description>
- GraphEdit manages the showing of GraphNodes it contains, as well as connections an disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNodes slots is disabled by default.
+ GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNodes slots is disabled by default.
It is greatly advised to enable low processor usage mode (see [method OS.set_low_processor_usage_mode]) when using GraphEdits.
</description>
<methods>
<method name="connect_node">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="from" type="String">
</argument>
@@ -18225,6 +20426,8 @@
</description>
</method>
<method name="disconnect_node">
+ <return type="void">
+ </return>
<argument index="0" name="from" type="String">
</argument>
<argument index="1" name="from_port" type="int">
@@ -18293,6 +20496,8 @@
</description>
</method>
<method name="set_right_disconnects">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -18300,30 +20505,40 @@
</description>
</method>
<method name="set_scroll_ofs">
+ <return type="void">
+ </return>
<argument index="0" name="ofs" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_selected">
- <argument index="0" name="node" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="node" type="Node">
</argument>
<description>
</description>
</method>
<method name="set_snap">
+ <return type="void">
+ </return>
<argument index="0" name="pixels" type="int">
</argument>
<description>
</description>
</method>
<method name="set_use_snap">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_zoom">
+ <return type="void">
+ </return>
<argument index="0" name="p_zoom" type="float">
</argument>
<description>
@@ -18440,11 +20655,15 @@
</description>
<methods>
<method name="clear_all_slots">
+ <return type="void">
+ </return>
<description>
Disable all input and output slots of the GraphNode.
</description>
</method>
<method name="clear_slot">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -18619,12 +20838,16 @@
</description>
</method>
<method name="set_comment">
+ <return type="void">
+ </return>
<argument index="0" name="comment" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_offset">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
@@ -18632,24 +20855,32 @@
</description>
</method>
<method name="set_overlay">
- <argument index="0" name="overlay" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="overlay" type="int" enum="GraphNode.Overlay">
</argument>
<description>
</description>
</method>
<method name="set_resizeable">
+ <return type="void">
+ </return>
<argument index="0" name="resizeable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_selected">
+ <return type="void">
+ </return>
<argument index="0" name="selected" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_show_close_button">
+ <return type="void">
+ </return>
<argument index="0" name="show" type="bool">
</argument>
<description>
@@ -18657,6 +20888,8 @@
</description>
</method>
<method name="set_slot">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="enable_left" type="bool">
@@ -18671,14 +20904,16 @@
</argument>
<argument index="6" name="color_right" type="Color">
</argument>
- <argument index="7" name="custom_left" type="Object" default="NULL">
+ <argument index="7" name="custom_left" type="Texture" default="null">
</argument>
- <argument index="8" name="custom_right" type="Object" default="NULL">
+ <argument index="8" name="custom_right" type="Texture" default="null">
</argument>
<description>
</description>
</method>
<method name="set_title">
+ <return type="void">
+ </return>
<argument index="0" name="title" type="String">
</argument>
<description>
@@ -18787,6 +21022,8 @@
</description>
</method>
<method name="set_columns">
+ <return type="void">
+ </return>
<argument index="0" name="columns" type="int">
</argument>
<description>
@@ -18813,95 +21050,9 @@
<description>
</description>
<methods>
- <method name="area_get_bounds" qualifiers="const">
- <return type="Rect3">
- </return>
- <argument index="0" name="area" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_name" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="area" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_portal_disable_color" qualifiers="const">
- <return type="Color">
- </return>
- <argument index="0" name="area" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_get_portal_disable_distance" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="area" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_is_exterior_portal" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="area" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_exterior_portal">
- <argument index="0" name="area" type="int">
- </argument>
- <argument index="1" name="enable" type="bool">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_name">
- <argument index="0" name="area" type="int">
- </argument>
- <argument index="1" name="name" type="String">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_portal_disable_color">
- <argument index="0" name="area" type="int">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="area_set_portal_disable_distance">
- <argument index="0" name="area" type="int">
- </argument>
- <argument index="1" name="distance" type="float">
- </argument>
- <description>
- </description>
- </method>
<method name="clear">
- <description>
- </description>
- </method>
- <method name="create_area">
- <return type="int">
+ <return type="void">
</return>
- <argument index="0" name="id" type="int">
- </argument>
- <argument index="1" name="area" type="Rect3">
- </argument>
- <description>
- </description>
- </method>
- <method name="erase_area">
- <argument index="0" name="area" type="int">
- </argument>
<description>
</description>
</method>
@@ -18930,7 +21081,7 @@
</description>
</method>
<method name="get_cell_size" qualifiers="const">
- <return type="float">
+ <return type="Vector3">
</return>
<description>
</description>
@@ -18971,19 +21122,17 @@
<description>
</description>
</method>
- <method name="get_unused_area_id" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
<method name="resource_changed">
- <argument index="0" name="resource" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="resource" type="Resource">
</argument>
<description>
</description>
</method>
<method name="set_cell_item">
+ <return type="void">
+ </return>
<argument index="0" name="x" type="int">
</argument>
<argument index="1" name="y" type="int">
@@ -18992,54 +21141,68 @@
</argument>
<argument index="3" name="item" type="int">
</argument>
- <argument index="4" name="orientation" type="int" default="0">
+ <argument index="4" name="orientation" type="int" default="null">
</argument>
<description>
</description>
</method>
<method name="set_cell_size">
- <argument index="0" name="size" type="float">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_center_x">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_center_y">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_center_z">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_clip">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
- <argument index="1" name="clipabove" type="bool" default="true">
+ <argument index="1" name="clipabove" type="bool" default="0">
</argument>
- <argument index="2" name="floor" type="int" default="0">
+ <argument index="2" name="floor" type="int" default="true">
</argument>
- <argument index="3" name="axis" type="int" default="0">
+ <argument index="3" name="axis" type="int" enum="Vector3.Axis" default="null">
</argument>
<description>
</description>
</method>
<method name="set_octant_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="int">
</argument>
<description>
</description>
</method>
<method name="set_theme">
+ <return type="void">
+ </return>
<argument index="0" name="theme" type="MeshLibrary">
</argument>
<description>
@@ -19047,7 +21210,7 @@
</method>
</methods>
<constants>
- <constant name="INVALID_CELL_ITEM" value="-1">
+ <constant name="INVALID_CELL_ITEM" value="-1" enum="">
</constant>
</constants>
</class>
@@ -19074,6 +21237,8 @@
</description>
</method>
<method name="set_initial_offset">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="float">
</argument>
<description>
@@ -19081,6 +21246,8 @@
</description>
</method>
<method name="set_length">
+ <return type="void">
+ </return>
<argument index="0" name="length" type="float">
</argument>
<description>
@@ -19133,6 +21300,8 @@
</theme_item>
<theme_item name="grabber_highlight" type="StyleBox">
</theme_item>
+ <theme_item name="grabber_pressed" type="StyleBox">
+ </theme_item>
<theme_item name="increment" type="Texture">
</theme_item>
<theme_item name="increment_highlight" type="Texture">
@@ -19223,20 +21392,22 @@
</description>
<methods>
<method name="close">
+ <return type="void">
+ </return>
<description>
Cloces the current connection, allows for reusal of [HTTPClient].
</description>
</method>
<method name="connect_to_host">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="host" type="String">
</argument>
<argument index="1" name="port" type="int">
</argument>
- <argument index="2" name="use_ssl" type="bool" default="false">
+ <argument index="2" name="use_ssl" type="bool" default="null">
</argument>
- <argument index="3" name="verify_host" type="bool" default="true">
+ <argument index="3" name="verify_host" type="bool" default="null">
</argument>
<description>
Connect to a host. This needs to be done before any requests are sent.
@@ -19310,7 +21481,7 @@
</description>
</method>
<method name="poll">
- <return type="Error">
+ <return type="int">
</return>
<description>
This needs to be called in order to have any request processed. Check results with [method get_status]
@@ -19340,13 +21511,13 @@
<method name="request">
<return type="int">
</return>
- <argument index="0" name="method" type="int">
+ <argument index="0" name="method" type="int" enum="HTTPClient.Method">
</argument>
<argument index="1" name="url" type="String">
</argument>
<argument index="2" name="headers" type="PoolStringArray">
</argument>
- <argument index="3" name="body" type="String" default="&quot;&quot;">
+ <argument index="3" name="body" type="String" default="null">
</argument>
<description>
Sends a request to the connected host. The url is what is normally behind the hostname, i.e. in [code]http://somehost.com/index.php[/code], url would be "index.php".
@@ -19363,7 +21534,7 @@
<method name="request_raw">
<return type="int">
</return>
- <argument index="0" name="method" type="int">
+ <argument index="0" name="method" type="int" enum="HTTPClient.Method">
</argument>
<argument index="1" name="url" type="String">
</argument>
@@ -19396,6 +21567,8 @@
</description>
</method>
<method name="set_blocking_mode">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -19403,6 +21576,8 @@
</description>
</method>
<method name="set_connection">
+ <return type="void">
+ </return>
<argument index="0" name="connection" type="StreamPeer">
</argument>
<description>
@@ -19410,6 +21585,8 @@
</description>
</method>
<method name="set_read_chunk_size">
+ <return type="void">
+ </return>
<argument index="0" name="bytes" type="int">
</argument>
<description>
@@ -19566,6 +21743,8 @@
</description>
<methods>
<method name="cancel_request">
+ <return type="void">
+ </return>
<description>
Cancel the current request.
</description>
@@ -19624,18 +21803,20 @@
</return>
<argument index="0" name="url" type="String">
</argument>
- <argument index="1" name="custom_headers" type="PoolStringArray" default="PoolStringArray([])">
+ <argument index="1" name="custom_headers" type="PoolStringArray" default="0">
</argument>
<argument index="2" name="ssl_validate_domain" type="bool" default="true">
</argument>
- <argument index="3" name="method" type="int" default="0">
+ <argument index="3" name="method" type="int" enum="HTTPClient.Method" default="PoolStringArray( )">
</argument>
- <argument index="4" name="request_data" type="String" default="&quot;&quot;">
+ <argument index="4" name="request_data" type="String" default="null">
</argument>
<description>
</description>
</method>
<method name="set_body_size_limit">
+ <return type="void">
+ </return>
<argument index="0" name="bytes" type="int">
</argument>
<description>
@@ -19643,6 +21824,8 @@
</description>
</method>
<method name="set_download_file">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="String">
</argument>
<description>
@@ -19650,6 +21833,8 @@
</description>
</method>
<method name="set_max_redirects">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="int">
</argument>
<description>
@@ -19657,6 +21842,8 @@
</description>
</method>
<method name="set_use_threads">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -19734,7 +21921,7 @@
<method name="get_flag" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="flag" type="int">
+ <argument index="0" name="flag" type="int" enum="HingeJoint.Flag">
</argument>
<description>
</description>
@@ -19742,13 +21929,15 @@
<method name="get_param" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int">
+ <argument index="0" name="param" type="int" enum="HingeJoint.Param">
</argument>
<description>
</description>
</method>
<method name="set_flag">
- <argument index="0" name="flag" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="HingeJoint.Flag">
</argument>
<argument index="1" name="enabled" type="bool">
</argument>
@@ -19756,7 +21945,9 @@
</description>
</method>
<method name="set_param">
- <argument index="0" name="param" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="HingeJoint.Param">
</argument>
<argument index="1" name="value" type="float">
</argument>
@@ -19822,12 +22013,16 @@
</description>
<methods>
<method name="clear_cache">
- <argument index="0" name="arg0" type="String" default="&quot;&quot;">
+ <return type="void">
+ </return>
+ <argument index="0" name="hostname" type="String" default="&quot;&quot;">
</argument>
<description>
</description>
</method>
<method name="erase_resolve_item">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<description>
@@ -19863,7 +22058,7 @@
</return>
<argument index="0" name="host" type="String">
</argument>
- <argument index="1" name="ip_type" type="int" default="3">
+ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="null">
</argument>
<description>
Resolve a given hostname, blocking. Resolved hostname is returned as an IPv4 or IPv6 depending on "ip_type".
@@ -19874,7 +22069,7 @@
</return>
<argument index="0" name="host" type="String">
</argument>
- <argument index="1" name="ip_type" type="int" default="3">
+ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="null">
</argument>
<description>
Create a queue item for resolving a given hostname to an IPv4 or IPv6 depending on "ip_type". The queue ID is returned, or RESOLVER_INVALID_ID on error.
@@ -19890,9 +22085,9 @@
</constant>
<constant name="RESOLVER_STATUS_ERROR" value="3">
</constant>
- <constant name="RESOLVER_MAX_QUERIES" value="32">
+ <constant name="RESOLVER_MAX_QUERIES" value="32" enum="">
</constant>
- <constant name="RESOLVER_INVALID_ID" value="-1">
+ <constant name="RESOLVER_INVALID_ID" value="-1" enum="">
</constant>
<constant name="TYPE_NONE" value="0">
</constant>
@@ -19923,6 +22118,8 @@
</description>
<methods>
<method name="blend_rect">
+ <return type="void">
+ </return>
<argument index="0" name="src" type="Image">
</argument>
<argument index="1" name="src_rect" type="Rect2">
@@ -19934,6 +22131,8 @@
</description>
</method>
<method name="blend_rect_mask">
+ <return type="void">
+ </return>
<argument index="0" name="src" type="Image">
</argument>
<argument index="1" name="mask" type="Image">
@@ -19947,6 +22146,8 @@
</description>
</method>
<method name="blit_rect">
+ <return type="void">
+ </return>
<argument index="0" name="src" type="Image">
</argument>
<argument index="1" name="src_rect" type="Rect2">
@@ -19958,6 +22159,8 @@
</description>
</method>
<method name="blit_rect_mask">
+ <return type="void">
+ </return>
<argument index="0" name="src" type="Image">
</argument>
<argument index="1" name="mask" type="Image">
@@ -19971,54 +22174,64 @@
</description>
</method>
<method name="clear_mipmaps">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="compress">
<return type="int">
</return>
- <argument index="0" name="mode" type="int">
+ <argument index="0" name="mode" type="int" enum="Image.CompressMode">
</argument>
- <argument index="1" name="arg1" type="int">
+ <argument index="1" name="source" type="int" enum="Image.CompressSource">
</argument>
- <argument index="2" name="arg2" type="float">
+ <argument index="2" name="lossy_quality" type="float">
</argument>
<description>
</description>
</method>
<method name="convert">
- <argument index="0" name="format" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="format" type="int" enum="Image.Format">
</argument>
<description>
</description>
</method>
<method name="copy_from">
+ <return type="void">
+ </return>
<argument index="0" name="src" type="Image">
</argument>
<description>
</description>
</method>
<method name="create">
+ <return type="void">
+ </return>
<argument index="0" name="width" type="int">
</argument>
<argument index="1" name="height" type="int">
</argument>
<argument index="2" name="use_mipmaps" type="bool">
</argument>
- <argument index="3" name="format" type="int">
+ <argument index="3" name="format" type="int" enum="Image.Format">
</argument>
<description>
Create an empty image of a specific size and format.
</description>
</method>
<method name="create_from_data">
+ <return type="void">
+ </return>
<argument index="0" name="width" type="int">
</argument>
<argument index="1" name="height" type="int">
</argument>
<argument index="2" name="use_mipmaps" type="bool">
</argument>
- <argument index="3" name="format" type="int">
+ <argument index="3" name="format" type="int" enum="Image.Format">
</argument>
<argument index="4" name="data" type="PoolByteArray">
</argument>
@@ -20026,6 +22239,8 @@
</description>
</method>
<method name="crop">
+ <return type="void">
+ </return>
<argument index="0" name="width" type="int">
</argument>
<argument index="1" name="height" type="int">
@@ -20046,10 +22261,14 @@
</description>
</method>
<method name="expand_x2_hq2x">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="fill">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
@@ -20057,14 +22276,20 @@
</description>
</method>
<method name="fix_alpha_edges">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="flip_x">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="flip_y">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -20122,6 +22347,12 @@
Return a new [Image] that is a copy of "area" in this [Image].
</description>
</method>
+ <method name="get_size" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_used_rect" qualifiers="const">
<return type="Rect2">
</return>
@@ -20170,28 +22401,38 @@
</description>
</method>
<method name="lock">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="normalmap_to_xy">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="premultiply_alpha">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="width" type="int">
</argument>
<argument index="1" name="height" type="int">
</argument>
- <argument index="2" name="interpolation" type="int" default="1">
+ <argument index="2" name="interpolation" type="int" enum="Image.Interpolation" default="null">
</argument>
<description>
</description>
</method>
<method name="resize_to_po2">
+ <return type="void">
+ </return>
<argument index="0" name="square" type="bool" default="false">
</argument>
<description>
@@ -20207,6 +22448,8 @@
</description>
</method>
<method name="set_pixel">
+ <return type="void">
+ </return>
<argument index="0" name="x" type="int">
</argument>
<argument index="1" name="y" type="int">
@@ -20217,14 +22460,20 @@
</description>
</method>
<method name="shrink_x2">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="srgb_to_linear">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="unlock">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -20349,13 +22598,15 @@
</description>
<methods>
<method name="create">
+ <return type="void">
+ </return>
<argument index="0" name="width" type="int">
</argument>
<argument index="1" name="height" type="int">
</argument>
- <argument index="2" name="format" type="int">
+ <argument index="2" name="format" type="int" enum="Image.Format">
</argument>
- <argument index="3" name="flags" type="int" default="7">
+ <argument index="3" name="flags" type="int" default="null">
</argument>
<description>
Create a new [ImageTexture] with "width" and "height".
@@ -20364,21 +22615,16 @@
</description>
</method>
<method name="create_from_image">
+ <return type="void">
+ </return>
<argument index="0" name="image" type="Image">
</argument>
- <argument index="1" name="flags" type="int" default="7">
+ <argument index="1" name="flags" type="int" default="null">
</argument>
<description>
Create a new [ImageTexture] from an [Image] with "flags" from [Texture].FLAG_*.
</description>
</method>
- <method name="get_data" qualifiers="const">
- <return type="Image">
- </return>
- <description>
- Return the [Image] of this [ImageTexture].
- </description>
- </method>
<method name="get_format" qualifiers="const">
<return type="int">
</return>
@@ -20401,6 +22647,8 @@
</description>
</method>
<method name="load">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="String">
</argument>
<description>
@@ -20408,6 +22656,8 @@
</description>
</method>
<method name="set_data">
+ <return type="void">
+ </return>
<argument index="0" name="image" type="Image">
</argument>
<description>
@@ -20415,6 +22665,8 @@
</description>
</method>
<method name="set_lossy_storage_quality">
+ <return type="void">
+ </return>
<argument index="0" name="quality" type="float">
</argument>
<description>
@@ -20422,13 +22674,17 @@
</description>
</method>
<method name="set_size_override">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_storage">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="ImageTexture.Storage">
</argument>
<description>
Set the storage type. One of [ImageTexture].STORAGE_*.
@@ -20455,19 +22711,23 @@
</description>
<methods>
<method name="add_sphere">
+ <return type="void">
+ </return>
<argument index="0" name="lats" type="int">
</argument>
<argument index="1" name="lons" type="int">
</argument>
<argument index="2" name="radius" type="float">
</argument>
- <argument index="3" name="add_uv" type="bool" default="true">
+ <argument index="3" name="add_uv" type="bool" default="null">
</argument>
<description>
- Simple helper to draw an uvsphere, with given latitudes, longitude and radius.
+ Simple helper to draw a uvsphere, with given latitudes, longitude and radius.
</description>
</method>
<method name="add_vertex">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector3">
</argument>
<description>
@@ -20475,9 +22735,11 @@
</description>
</method>
<method name="begin">
- <argument index="0" name="primitive" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
</argument>
- <argument index="1" name="texture" type="Texture" default="NULL">
+ <argument index="1" name="texture" type="Texture" default="null">
</argument>
<description>
Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references.
@@ -20485,16 +22747,22 @@
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clear everything that was drawn using begin/end.
</description>
</method>
<method name="end">
+ <return type="void">
+ </return>
<description>
Call this when done adding a batch of geometry, otherwise it can't be displayed.
</description>
</method>
<method name="set_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
@@ -20502,6 +22770,8 @@
</description>
</method>
<method name="set_normal">
+ <return type="void">
+ </return>
<argument index="0" name="normal" type="Vector3">
</argument>
<description>
@@ -20509,6 +22779,8 @@
</description>
</method>
<method name="set_tangent">
+ <return type="void">
+ </return>
<argument index="0" name="tangent" type="Plane">
</argument>
<description>
@@ -20516,6 +22788,8 @@
</description>
</method>
<method name="set_uv">
+ <return type="void">
+ </return>
<argument index="0" name="uv" type="Vector2">
</argument>
<description>
@@ -20523,6 +22797,8 @@
</description>
</method>
<method name="set_uv2">
+ <return type="void">
+ </return>
<argument index="0" name="uv" type="Vector2">
</argument>
<description>
@@ -20542,6 +22818,8 @@
</description>
<methods>
<method name="action_press">
+ <return type="void">
+ </return>
<argument index="0" name="action" type="String">
</argument>
<description>
@@ -20549,6 +22827,8 @@
</description>
</method>
<method name="action_release">
+ <return type="void">
+ </return>
<argument index="0" name="action" type="String">
</argument>
<description>
@@ -20556,9 +22836,11 @@
</description>
</method>
<method name="add_joy_mapping">
+ <return type="void">
+ </return>
<argument index="0" name="mapping" type="String">
</argument>
- <argument index="1" name="update_existing" type="bool" default="false">
+ <argument index="1" name="update_existing" type="bool" default="null">
</argument>
<description>
Add a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices.
@@ -20762,12 +23044,16 @@
</description>
</method>
<method name="parse_input_event">
- <argument index="0" name="event" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="event" type="InputEvent">
</argument>
<description>
</description>
</method>
<method name="remove_joy_mapping">
+ <return type="void">
+ </return>
<argument index="0" name="guid" type="String">
</argument>
<description>
@@ -20775,29 +23061,34 @@
</description>
</method>
<method name="set_custom_mouse_cursor">
- <argument index="0" name="image" type="Texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="image" type="Resource">
</argument>
- <argument index="1" name="hotspot" type="Vector2" default="Vector2(0, 0)">
+ <argument index="1" name="hotspot" type="Vector2" default="null">
</argument>
<description>
- Set a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified.
</description>
</method>
<method name="set_mouse_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Input.MouseMode">
</argument>
<description>
Set the mouse mode. See the constants for more information.
</description>
</method>
<method name="start_joy_vibration">
+ <return type="void">
+ </return>
<argument index="0" name="device" type="int">
</argument>
<argument index="1" name="weak_magnitude" type="float">
</argument>
<argument index="2" name="strong_magnitude" type="float">
</argument>
- <argument index="3" name="duration" type="float" default="0">
+ <argument index="3" name="duration" type="float" default="null">
</argument>
<description>
Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely).
@@ -20805,6 +23096,8 @@
</description>
</method>
<method name="stop_joy_vibration">
+ <return type="void">
+ </return>
<argument index="0" name="device" type="int">
</argument>
<description>
@@ -20812,6 +23105,8 @@
</description>
</method>
<method name="warp_mouse_pos">
+ <return type="void">
+ </return>
<argument index="0" name="to" type="Vector2">
</argument>
<description>
@@ -20936,12 +23231,16 @@
</description>
</method>
<method name="set_device">
+ <return type="void">
+ </return>
<argument index="0" name="device" type="int">
</argument>
<description>
</description>
</method>
<method name="set_id">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<description>
@@ -20960,7 +23259,7 @@
</return>
<argument index="0" name="xform" type="Transform2D">
</argument>
- <argument index="1" name="local_ofs" type="Vector2" default="Vector2(0, 0)">
+ <argument index="1" name="local_ofs" type="Vector2" default="null">
</argument>
<description>
</description>
@@ -20987,12 +23286,16 @@
</description>
</method>
<method name="set_action">
+ <return type="void">
+ </return>
<argument index="0" name="action" type="String">
</argument>
<description>
</description>
</method>
<method name="set_pressed">
+ <return type="void">
+ </return>
<argument index="0" name="pressed" type="bool">
</argument>
<description>
@@ -21028,18 +23331,24 @@
</description>
</method>
<method name="set_button_index">
+ <return type="void">
+ </return>
<argument index="0" name="button_index" type="int">
</argument>
<description>
</description>
</method>
<method name="set_pressed">
+ <return type="void">
+ </return>
<argument index="0" name="pressed" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_pressure">
+ <return type="void">
+ </return>
<argument index="0" name="pressure" type="float">
</argument>
<description>
@@ -21080,12 +23389,16 @@
</description>
</method>
<method name="set_axis">
+ <return type="void">
+ </return>
<argument index="0" name="axis" type="int">
</argument>
<description>
</description>
</method>
<method name="set_axis_value">
+ <return type="void">
+ </return>
<argument index="0" name="axis_value" type="float">
</argument>
<description>
@@ -21129,24 +23442,32 @@
</description>
</method>
<method name="set_echo">
+ <return type="void">
+ </return>
<argument index="0" name="echo" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_pressed">
+ <return type="void">
+ </return>
<argument index="0" name="pressed" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_scancode">
+ <return type="void">
+ </return>
<argument index="0" name="scancode" type="int">
</argument>
<description>
</description>
</method>
<method name="set_unicode">
+ <return type="void">
+ </return>
<argument index="0" name="unicode" type="int">
</argument>
<description>
@@ -21154,7 +23475,7 @@
</method>
</methods>
<members>
- <member name="echo" type="int" setter="set_echo" getter="is_echo" brief="">
+ <member name="echo" type="bool" setter="set_echo" getter="is_echo" brief="">
Echo state of the key, i.e. whether it's a repeat event or not.
</member>
<member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" brief="">
@@ -21196,18 +23517,24 @@
</description>
</method>
<method name="set_button_mask">
+ <return type="void">
+ </return>
<argument index="0" name="button_mask" type="int">
</argument>
<description>
</description>
</method>
<method name="set_global_position">
+ <return type="void">
+ </return>
<argument index="0" name="global_position" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_position">
+ <return type="void">
+ </return>
<argument index="0" name="position" type="Vector2">
</argument>
<description>
@@ -21254,24 +23581,32 @@
</description>
</method>
<method name="set_button_index">
+ <return type="void">
+ </return>
<argument index="0" name="button_index" type="int">
</argument>
<description>
</description>
</method>
<method name="set_doubleclick">
+ <return type="void">
+ </return>
<argument index="0" name="doubleclick" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_factor">
+ <return type="void">
+ </return>
<argument index="0" name="factor" type="float">
</argument>
<description>
</description>
</method>
<method name="set_pressed">
+ <return type="void">
+ </return>
<argument index="0" name="pressed" type="bool">
</argument>
<description>
@@ -21314,12 +23649,16 @@
</description>
</method>
<method name="set_relative">
+ <return type="void">
+ </return>
<argument index="0" name="relative" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_speed">
+ <return type="void">
+ </return>
<argument index="0" name="speed" type="Vector2">
</argument>
<description>
@@ -21369,24 +23708,32 @@
</description>
</method>
<method name="set_index">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="set_position">
+ <return type="void">
+ </return>
<argument index="0" name="position" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_relative">
+ <return type="void">
+ </return>
<argument index="0" name="relative" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_speed">
+ <return type="void">
+ </return>
<argument index="0" name="speed" type="Vector2">
</argument>
<description>
@@ -21430,18 +23777,24 @@
</description>
</method>
<method name="set_index">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="int">
</argument>
<description>
</description>
</method>
<method name="set_position">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_pressed">
+ <return type="void">
+ </return>
<argument index="0" name="pressed" type="bool">
</argument>
<description>
@@ -21500,30 +23853,40 @@
</description>
</method>
<method name="set_alt">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_command">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_control">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_metakey">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_shift">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -21558,18 +23921,22 @@
</description>
<methods>
<method name="action_add_event">
+ <return type="void">
+ </return>
<argument index="0" name="action" type="String">
</argument>
- <argument index="1" name="event" type="Object">
+ <argument index="1" name="event" type="InputEvent">
</argument>
<description>
Add an [InputEvent] to an action. This [InputEvent] will trigger the action.
</description>
</method>
<method name="action_erase_event">
+ <return type="void">
+ </return>
<argument index="0" name="action" type="String">
</argument>
- <argument index="1" name="event" type="Object">
+ <argument index="1" name="event" type="InputEvent">
</argument>
<description>
Remove an [InputEvent] from an action.
@@ -21580,13 +23947,15 @@
</return>
<argument index="0" name="action" type="String">
</argument>
- <argument index="1" name="event" type="Object">
+ <argument index="1" name="event" type="InputEvent">
</argument>
<description>
Whether an action has an [InputEvent] associated with it.
</description>
</method>
<method name="add_action">
+ <return type="void">
+ </return>
<argument index="0" name="action" type="String">
</argument>
<description>
@@ -21594,6 +23963,8 @@
</description>
</method>
<method name="erase_action">
+ <return type="void">
+ </return>
<argument index="0" name="action" type="String">
</argument>
<description>
@@ -21603,7 +23974,7 @@
<method name="event_is_action" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="event" type="Object">
+ <argument index="0" name="event" type="InputEvent">
</argument>
<argument index="1" name="action" type="String">
</argument>
@@ -21637,6 +24008,8 @@
</description>
</method>
<method name="load_from_globals">
+ <return type="void">
+ </return>
<description>
Clear the [InputMap] and load it anew from [ProjectSettings].
</description>
@@ -21670,7 +24043,9 @@
</description>
</method>
<method name="replace_by_instance">
- <argument index="0" name="custom_scene" type="PackedScene" default="NULL">
+ <return type="void">
+ </return>
+ <argument index="0" name="custom_scene" type="PackedScene" default="null">
</argument>
<description>
Replace this placeholder by the scene handed as an argument, or the original scene if no argument is given. As for all resources, the scene is loaded only if it's not loaded already. By manually loading the scene beforehand, delays caused by this function can be avoided.
@@ -21705,24 +24080,32 @@
</description>
</method>
<method name="set_interpolation_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="target_path" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_speed">
+ <return type="void">
+ </return>
<argument index="0" name="speed" type="float">
</argument>
<description>
</description>
</method>
<method name="set_target">
- <argument index="0" name="target" type="Camera">
+ <return type="void">
+ </return>
+ <argument index="0" name="target" type="Object">
</argument>
<description>
</description>
</method>
<method name="set_target_path">
+ <return type="void">
+ </return>
<argument index="0" name="target_path" type="NodePath">
</argument>
<description>
@@ -21752,20 +24135,24 @@
</description>
<methods>
<method name="add_icon_item">
+ <return type="void">
+ </return>
<argument index="0" name="icon" type="Texture">
</argument>
- <argument index="1" name="selectable" type="bool" default="true">
+ <argument index="1" name="selectable" type="bool" default="null">
</argument>
<description>
Adds an item to the item list with no text, only an icon.
</description>
</method>
<method name="add_item">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
- <argument index="1" name="icon" type="Texture" default="NULL">
+ <argument index="1" name="icon" type="Texture" default="null">
</argument>
- <argument index="2" name="selectable" type="bool" default="true">
+ <argument index="2" name="selectable" type="bool" default="null">
</argument>
<description>
Adds an item to the item list with specified text. Specify an icon of null for a list item with no icon.
@@ -21773,11 +24160,15 @@
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Remove all items from the list.
</description>
</method>
<method name="ensure_current_is_visible">
+ <return type="void">
+ </return>
<description>
Ensure selection is visible, adjusting the scroll position as necessary.
</description>
@@ -21819,7 +24210,7 @@
</return>
<argument index="0" name="pos" type="Vector2">
</argument>
- <argument index="1" name="exact" type="bool" default="false">
+ <argument index="1" name="exact" type="bool" default="null">
</argument>
<description>
Given a position within the control return the item (if any) at that point.
@@ -21910,12 +24301,18 @@
</description>
</method>
<method name="get_v_scroll">
- <return type="Object">
+ <return type="VScrollBar">
</return>
<description>
Returns the current vertical scroll bar for the List.
</description>
</method>
+ <method name="has_auto_height" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="is_item_disabled" qualifiers="const">
<return type="bool">
</return>
@@ -21944,7 +24341,7 @@
</description>
</method>
<method name="is_same_column_width" qualifiers="const">
- <return type="int">
+ <return type="bool">
</return>
<description>
Returns whether or not all columns of the list are of the same size.
@@ -21960,6 +24357,8 @@
</description>
</method>
<method name="remove_item">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -21967,9 +24366,11 @@
</description>
</method>
<method name="select">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="single" type="bool" default="true">
+ <argument index="1" name="single" type="bool" default="null">
</argument>
<description>
Select the item at the specified index.
@@ -21977,13 +24378,25 @@
</description>
</method>
<method name="set_allow_rmb_select">
+ <return type="void">
+ </return>
<argument index="0" name="allow" type="bool">
</argument>
<description>
Allow (or disallow) selection of (selectable) items in the list using right mouse button.
</description>
</method>
+ <method name="set_auto_height">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_fixed_column_width">
+ <return type="void">
+ </return>
<argument index="0" name="width" type="int">
</argument>
<description>
@@ -21991,24 +24404,32 @@
</description>
</method>
<method name="set_fixed_icon_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_icon_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="ItemList.IconMode">
</argument>
<description>
</description>
</method>
<method name="set_icon_scale">
+ <return type="void">
+ </return>
<argument index="0" name="scale" type="float">
</argument>
<description>
</description>
</method>
<method name="set_item_custom_bg_color">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="custom_bg_color" type="Color">
@@ -22017,6 +24438,8 @@
</description>
</method>
<method name="set_item_disabled">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="disabled" type="bool">
@@ -22027,6 +24450,8 @@
</description>
</method>
<method name="set_item_icon">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="icon" type="Texture">
@@ -22036,6 +24461,8 @@
</description>
</method>
<method name="set_item_icon_region">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="rect" type="Rect2">
@@ -22044,6 +24471,8 @@
</description>
</method>
<method name="set_item_metadata">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="metadata" type="Variant">
@@ -22053,6 +24482,8 @@
</description>
</method>
<method name="set_item_selectable">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="selectable" type="bool">
@@ -22062,6 +24493,8 @@
</description>
</method>
<method name="set_item_text">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="text" type="String">
@@ -22071,6 +24504,8 @@
</description>
</method>
<method name="set_item_tooltip">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="tooltip" type="String">
@@ -22080,6 +24515,8 @@
</description>
</method>
<method name="set_item_tooltip_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="enable" type="bool">
@@ -22089,6 +24526,8 @@
</description>
</method>
<method name="set_max_columns">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="int">
</argument>
<description>
@@ -22096,6 +24535,8 @@
</description>
</method>
<method name="set_max_text_lines">
+ <return type="void">
+ </return>
<argument index="0" name="lines" type="int">
</argument>
<description>
@@ -22103,6 +24544,8 @@
</description>
</method>
<method name="set_same_column_width">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -22110,17 +24553,23 @@
</description>
</method>
<method name="set_select_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="ItemList.SelectMode">
</argument>
<description>
</description>
</method>
<method name="sort_items_by_text">
+ <return type="void">
+ </return>
<description>
Sorts items in the list by their text.
</description>
</method>
<method name="unselect">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -22131,9 +24580,11 @@
<members>
<member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select" brief="">
</member>
+ <member name="auto_height" type="bool" setter="set_auto_height" getter="has_auto_height" brief="">
+ </member>
<member name="fixed_column_width" type="int" setter="set_fixed_column_width" getter="get_fixed_column_width" brief="">
</member>
- <member name="icon_mode" type="int" setter="set_icon_mode" getter="get_icon_mode" brief="">
+ <member name="icon_mode" type="int" setter="set_icon_mode" getter="get_icon_mode" brief="" enum="ItemList.IconMode">
</member>
<member name="icon_scale" type="float" setter="set_icon_scale" getter="get_icon_scale" brief="">
</member>
@@ -22145,7 +24596,7 @@
</member>
<member name="same_column_width" type="bool" setter="set_same_column_width" getter="is_same_column_width" brief="">
</member>
- <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" brief="">
+ <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" brief="" enum="ItemList.SelectMode">
</member>
</members>
<signals>
@@ -22256,24 +24707,32 @@
</description>
</method>
<method name="set_exclude_nodes_from_collision">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_node_a">
+ <return type="void">
+ </return>
<argument index="0" name="node" type="NodePath">
</argument>
<description>
</description>
</method>
<method name="set_node_b">
+ <return type="void">
+ </return>
<argument index="0" name="node" type="NodePath">
</argument>
<description>
</description>
</method>
<method name="set_solver_priority">
+ <return type="void">
+ </return>
<argument index="0" name="priority" type="int">
</argument>
<description>
@@ -22328,18 +24787,24 @@
</description>
</method>
<method name="set_bias">
+ <return type="void">
+ </return>
<argument index="0" name="bias" type="float">
</argument>
<description>
</description>
</method>
<method name="set_exclude_nodes_from_collision">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_node_a">
+ <return type="void">
+ </return>
<argument index="0" name="node" type="NodePath">
</argument>
<description>
@@ -22347,6 +24812,8 @@
</description>
</method>
<method name="set_node_b">
+ <return type="void">
+ </return>
<argument index="0" name="node" type="NodePath">
</argument>
<description>
@@ -22394,6 +24861,8 @@
</description>
</method>
<method name="get_collision_collider_metadata" qualifiers="const">
+ <return type="Variant">
+ </return>
<argument index="0" name="collision" type="int">
</argument>
<description>
@@ -22522,18 +24991,20 @@
</return>
<argument index="0" name="linear_velocity" type="Vector3">
</argument>
- <argument index="1" name="floor_normal" type="Vector3" default="Vector3(0, 0, 0)">
+ <argument index="1" name="floor_normal" type="Vector3" default="4">
</argument>
<argument index="2" name="slope_stop_min_velocity" type="float" default="0.05">
</argument>
- <argument index="3" name="max_bounces" type="int" default="4">
+ <argument index="3" name="max_bounces" type="int" default="Vector3( 0, 0, 0 )">
</argument>
- <argument index="4" name="floor_max_angle" type="float" default="0.785398">
+ <argument index="4" name="floor_max_angle" type="float" default="null">
</argument>
<description>
</description>
</method>
<method name="set_safe_margin">
+ <return type="void">
+ </return>
<argument index="0" name="pixels" type="float">
</argument>
<description>
@@ -22584,6 +25055,8 @@
</description>
</method>
<method name="get_collision_collider_metadata" qualifiers="const">
+ <return type="Variant">
+ </return>
<argument index="0" name="collision" type="int">
</argument>
<description>
@@ -22713,18 +25186,20 @@
</return>
<argument index="0" name="linear_velocity" type="Vector2">
</argument>
- <argument index="1" name="floor_normal" type="Vector2" default="Vector2(0, 0)">
+ <argument index="1" name="floor_normal" type="Vector2" default="4">
</argument>
<argument index="2" name="slope_stop_min_velocity" type="float" default="5">
</argument>
- <argument index="3" name="max_bounces" type="int" default="4">
+ <argument index="3" name="max_bounces" type="int" default="Vector2( 0, 0 )">
</argument>
- <argument index="4" name="floor_max_angle" type="float" default="0.785398">
+ <argument index="4" name="floor_max_angle" type="float" default="null">
</argument>
<description>
</description>
</method>
<method name="set_safe_margin">
+ <return type="void">
+ </return>
<argument index="0" name="pixels" type="float">
</argument>
<description>
@@ -22855,13 +25330,17 @@
</description>
</method>
<method name="set_align">
- <argument index="0" name="align" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="align" type="int" enum="Label.Align">
</argument>
<description>
Sets the alignment mode to any of the ALIGN_* enumeration values.
</description>
</method>
<method name="set_autowrap">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -22869,6 +25348,8 @@
</description>
</method>
<method name="set_clip_text">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -22876,6 +25357,8 @@
</description>
</method>
<method name="set_lines_skipped">
+ <return type="void">
+ </return>
<argument index="0" name="lines_skipped" type="int">
</argument>
<description>
@@ -22883,6 +25366,8 @@
</description>
</method>
<method name="set_max_lines_visible">
+ <return type="void">
+ </return>
<argument index="0" name="lines_visible" type="int">
</argument>
<description>
@@ -22890,6 +25375,8 @@
</description>
</method>
<method name="set_percent_visible">
+ <return type="void">
+ </return>
<argument index="0" name="percent_visible" type="float">
</argument>
<description>
@@ -22897,6 +25384,8 @@
</description>
</method>
<method name="set_text">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
<description>
@@ -22904,6 +25393,8 @@
</description>
</method>
<method name="set_uppercase">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -22911,13 +25402,17 @@
</description>
</method>
<method name="set_valign">
- <argument index="0" name="valign" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="valign" type="int" enum="Label.VAlign">
</argument>
<description>
Sets the vertical alignment mode to any of the VALIGN_* enumeration values.
</description>
</method>
<method name="set_visible_characters">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="int">
</argument>
<description>
@@ -22926,7 +25421,7 @@
</method>
</methods>
<members>
- <member name="align" type="int" setter="set_align" getter="get_align" brief="">
+ <member name="align" type="int" setter="set_align" getter="get_align" brief="" enum="Label.Align">
</member>
<member name="autowrap" type="bool" setter="set_autowrap" getter="has_autowrap" brief="">
</member>
@@ -22942,7 +25437,7 @@
</member>
<member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" brief="">
</member>
- <member name="valign" type="int" setter="set_valign" getter="get_valign" brief="">
+ <member name="valign" type="int" setter="set_valign" getter="get_valign" brief="" enum="Label.VAlign">
</member>
</members>
<constants>
@@ -22980,6 +25475,8 @@
</theme_item>
<theme_item name="line_spacing" type="int">
</theme_item>
+ <theme_item name="normal" type="StyleBox">
+ </theme_item>
<theme_item name="shadow_as_outline" type="int">
</theme_item>
<theme_item name="shadow_offset_x" type="int">
@@ -23009,6 +25506,8 @@
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clear the [LargeTexture].
</description>
@@ -23039,6 +25538,8 @@
</description>
</method>
<method name="set_piece_offset">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="ofs" type="Vector2">
@@ -23048,6 +25549,8 @@
</description>
</method>
<method name="set_piece_texture">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="texture" type="Texture">
@@ -23057,6 +25560,8 @@
</description>
</method>
<method name="set_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="Vector2">
</argument>
<description>
@@ -23094,7 +25599,7 @@
<method name="get_param" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int">
+ <argument index="0" name="param" type="int" enum="Light.Param">
</argument>
<description>
</description>
@@ -23105,6 +25610,12 @@
<description>
</description>
</method>
+ <method name="get_shadow_reverse_cull_face" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="has_shadow" qualifiers="const">
<return type="bool">
</return>
@@ -23124,31 +25635,41 @@
</description>
</method>
<method name="set_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_cull_mask">
+ <return type="void">
+ </return>
<argument index="0" name="cull_mask" type="int">
</argument>
<description>
</description>
</method>
<method name="set_editor_only">
+ <return type="void">
+ </return>
<argument index="0" name="editor_only" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_negative">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_param">
- <argument index="0" name="param" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="Light.Param">
</argument>
<argument index="1" name="value" type="float">
</argument>
@@ -23156,17 +25677,29 @@
</description>
</method>
<method name="set_shadow">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_shadow_color">
+ <return type="void">
+ </return>
<argument index="0" name="shadow_color" type="Color">
</argument>
<description>
</description>
</method>
+ <method name="set_shadow_reverse_cull_face">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
</methods>
<members>
<member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only" brief="">
@@ -23191,6 +25724,8 @@
</member>
<member name="shadow_max_distance" type="float" setter="set_param" getter="get_param" brief="">
</member>
+ <member name="shadow_reverse_cull_face" type="bool" setter="set_shadow_reverse_cull_face" getter="get_shadow_reverse_cull_face" brief="">
+ </member>
</members>
<constants>
<constant name="PARAM_ENERGY" value="0">
@@ -23219,7 +25754,7 @@
</constant>
<constant name="PARAM_SHADOW_BIAS" value="12">
</constant>
- <constant name="PARAM_MAX" value="13">
+ <constant name="PARAM_MAX" value="14">
</constant>
</constants>
</class>
@@ -23318,7 +25853,7 @@
</description>
</method>
<method name="get_texture" qualifiers="const">
- <return type="Object">
+ <return type="Texture">
</return>
<description>
Return the texture of the Light2D.
@@ -23373,6 +25908,8 @@
</description>
</method>
<method name="set_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
@@ -23380,12 +25917,16 @@
</description>
</method>
<method name="set_editor_only">
+ <return type="void">
+ </return>
<argument index="0" name="editor_only" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -23393,6 +25934,8 @@
</description>
</method>
<method name="set_energy">
+ <return type="void">
+ </return>
<argument index="0" name="energy" type="float">
</argument>
<description>
@@ -23400,6 +25943,8 @@
</description>
</method>
<method name="set_height">
+ <return type="void">
+ </return>
<argument index="0" name="height" type="float">
</argument>
<description>
@@ -23407,6 +25952,8 @@
</description>
</method>
<method name="set_item_cull_mask">
+ <return type="void">
+ </return>
<argument index="0" name="item_cull_mask" type="int">
</argument>
<description>
@@ -23414,6 +25961,8 @@
</description>
</method>
<method name="set_item_shadow_cull_mask">
+ <return type="void">
+ </return>
<argument index="0" name="item_shadow_cull_mask" type="int">
</argument>
<description>
@@ -23421,6 +25970,8 @@
</description>
</method>
<method name="set_layer_range_max">
+ <return type="void">
+ </return>
<argument index="0" name="layer" type="int">
</argument>
<description>
@@ -23428,6 +25979,8 @@
</description>
</method>
<method name="set_layer_range_min">
+ <return type="void">
+ </return>
<argument index="0" name="layer" type="int">
</argument>
<description>
@@ -23435,13 +25988,17 @@
</description>
</method>
<method name="set_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Light2D.Mode">
</argument>
<description>
Set the behaviour mode of the Light2D. Use constants defined in the constants section.
</description>
</method>
<method name="set_shadow_buffer_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="int">
</argument>
<description>
@@ -23449,6 +26006,8 @@
</description>
</method>
<method name="set_shadow_color">
+ <return type="void">
+ </return>
<argument index="0" name="shadow_color" type="Color">
</argument>
<description>
@@ -23456,6 +26015,8 @@
</description>
</method>
<method name="set_shadow_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -23463,31 +26024,41 @@
</description>
</method>
<method name="set_shadow_filter">
- <argument index="0" name="filter" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="filter" type="int" enum="Light2D.ShadowFilter">
</argument>
<description>
</description>
</method>
<method name="set_shadow_gradient_length">
+ <return type="void">
+ </return>
<argument index="0" name="multiplier" type="float">
</argument>
<description>
</description>
</method>
<method name="set_shadow_smooth">
+ <return type="void">
+ </return>
<argument index="0" name="smooth" type="float">
</argument>
<description>
</description>
</method>
<method name="set_texture">
- <argument index="0" name="texture" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
</argument>
<description>
Set the texture of the Light2D.
</description>
</method>
<method name="set_texture_offset">
+ <return type="void">
+ </return>
<argument index="0" name="texture_offset" type="Vector2">
</argument>
<description>
@@ -23495,6 +26066,8 @@
</description>
</method>
<method name="set_texture_scale">
+ <return type="void">
+ </return>
<argument index="0" name="texture_scale" type="float">
</argument>
<description>
@@ -23502,6 +26075,8 @@
</description>
</method>
<method name="set_z_range_max">
+ <return type="void">
+ </return>
<argument index="0" name="z" type="int">
</argument>
<description>
@@ -23509,6 +26084,8 @@
</description>
</method>
<method name="set_z_range_min">
+ <return type="void">
+ </return>
<argument index="0" name="z" type="int">
</argument>
<description>
@@ -23525,7 +26102,7 @@
</member>
<member name="energy" type="float" setter="set_energy" getter="get_energy" brief="">
</member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="">
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="Light2D.Mode">
</member>
<member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" brief="">
</member>
@@ -23541,15 +26118,13 @@
</member>
<member name="range_z_min" type="int" setter="set_z_range_min" getter="get_z_range_min" brief="">
</member>
- <member name="scale" type="float" setter="set_texture_scale" getter="get_texture_scale" brief="">
- </member>
<member name="shadow_buffer_size" type="int" setter="set_shadow_buffer_size" getter="get_shadow_buffer_size" brief="">
</member>
<member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" brief="">
</member>
<member name="shadow_enabled" type="bool" setter="set_shadow_enabled" getter="is_shadow_enabled" brief="">
</member>
- <member name="shadow_filter" type="float" setter="set_shadow_filter" getter="get_shadow_filter" brief="">
+ <member name="shadow_filter" type="int" setter="set_shadow_filter" getter="get_shadow_filter" brief="" enum="Light2D.ShadowFilter">
</member>
<member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth" brief="">
</member>
@@ -23559,6 +26134,8 @@
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
</member>
+ <member name="texture_scale" type="float" setter="set_texture_scale" getter="get_texture_scale" brief="">
+ </member>
</members>
<constants>
<constant name="MODE_ADD" value="0">
@@ -23598,6 +26175,8 @@
</description>
</method>
<method name="set_occluder_light_mask">
+ <return type="void">
+ </return>
<argument index="0" name="mask" type="int">
</argument>
<description>
@@ -23605,6 +26184,8 @@
</description>
</method>
<method name="set_occluder_polygon">
+ <return type="void">
+ </return>
<argument index="0" name="polygon" type="OccluderPolygon2D">
</argument>
<description>
@@ -23628,6 +26209,8 @@
</description>
<methods>
<method name="add_point">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
@@ -23652,7 +26235,7 @@
</description>
</method>
<method name="get_gradient" qualifiers="const">
- <return type="Object">
+ <return type="Gradient">
</return>
<description>
</description>
@@ -23696,7 +26279,7 @@
</description>
</method>
<method name="get_texture" qualifiers="const">
- <return type="Object">
+ <return type="Texture">
</return>
<description>
</description>
@@ -23714,42 +26297,56 @@
</description>
</method>
<method name="remove_point">
+ <return type="void">
+ </return>
<argument index="0" name="i" type="int">
</argument>
<description>
</description>
</method>
<method name="set_begin_cap_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="LineCapMode">
</argument>
<description>
</description>
</method>
<method name="set_default_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_end_cap_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="LineCapMode">
</argument>
<description>
</description>
</method>
<method name="set_gradient">
- <argument index="0" name="color" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Gradient">
</argument>
<description>
</description>
</method>
<method name="set_joint_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="LineJointMode">
</argument>
<description>
</description>
</method>
<method name="set_point_pos">
+ <return type="void">
+ </return>
<argument index="0" name="i" type="int">
</argument>
<argument index="1" name="pos" type="Vector2">
@@ -23758,36 +26355,48 @@
</description>
</method>
<method name="set_points">
+ <return type="void">
+ </return>
<argument index="0" name="points" type="PoolVector2Array">
</argument>
<description>
</description>
</method>
<method name="set_round_precision">
+ <return type="void">
+ </return>
<argument index="0" name="precision" type="int">
</argument>
<description>
</description>
</method>
<method name="set_sharp_limit">
+ <return type="void">
+ </return>
<argument index="0" name="limit" type="float">
</argument>
<description>
</description>
</method>
<method name="set_texture">
- <argument index="0" name="texture" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_texture_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="LineTextureMode">
</argument>
<description>
</description>
</method>
<method name="set_width">
+ <return type="void">
+ </return>
<argument index="0" name="width" type="float">
</argument>
<description>
@@ -23795,15 +26404,15 @@
</method>
</methods>
<members>
- <member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" brief="">
+ <member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" brief="" enum="LineCapMode">
</member>
<member name="default_color" type="Color" setter="set_default_color" getter="get_default_color" brief="">
</member>
- <member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" brief="">
+ <member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" brief="" enum="LineCapMode">
</member>
<member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient" brief="">
</member>
- <member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" brief="">
+ <member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" brief="" enum="LineJointMode">
</member>
<member name="points" type="PoolVector2Array" setter="set_points" getter="get_points" brief="">
</member>
@@ -23813,7 +26422,7 @@
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
</member>
- <member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" brief="">
+ <member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" brief="" enum="LineTextureMode">
</member>
<member name="width" type="float" setter="set_width" getter="get_width" brief="">
</member>
@@ -23846,6 +26455,8 @@
</description>
<methods>
<method name="append_at_cursor">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
<description>
@@ -23853,6 +26464,8 @@
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clear the [LineEdit] text.
</description>
@@ -23872,6 +26485,8 @@
</description>
</method>
<method name="cursor_set_blink_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -23879,6 +26494,8 @@
</description>
</method>
<method name="cursor_set_blink_speed">
+ <return type="void">
+ </return>
<argument index="0" name="blink_speed" type="float">
</argument>
<description>
@@ -23951,31 +26568,41 @@
</description>
</method>
<method name="menu_option">
+ <return type="void">
+ </return>
<argument index="0" name="option" type="int">
</argument>
<description>
</description>
</method>
<method name="select">
- <argument index="0" name="from" type="int" default="0">
+ <return type="void">
+ </return>
+ <argument index="0" name="from" type="int" default="-1">
</argument>
- <argument index="1" name="to" type="int" default="-1">
+ <argument index="1" name="to" type="int" default="0">
</argument>
<description>
</description>
</method>
<method name="select_all">
+ <return type="void">
+ </return>
<description>
Select the whole string.
</description>
</method>
<method name="set_align">
- <argument index="0" name="align" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="align" type="int" enum="LineEdit.Align">
</argument>
<description>
</description>
</method>
<method name="set_cursor_pos">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="int">
</argument>
<description>
@@ -23983,6 +26610,8 @@
</description>
</method>
<method name="set_editable">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -23990,12 +26619,16 @@
</description>
</method>
<method name="set_expand_to_text_length">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_max_length">
+ <return type="void">
+ </return>
<argument index="0" name="chars" type="int">
</argument>
<description>
@@ -24003,18 +26636,24 @@
</description>
</method>
<method name="set_placeholder">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
<description>
</description>
</method>
<method name="set_placeholder_alpha">
+ <return type="void">
+ </return>
<argument index="0" name="alpha" type="float">
</argument>
<description>
</description>
</method>
<method name="set_secret">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -24022,6 +26661,8 @@
</description>
</method>
<method name="set_text">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
<description>
@@ -24030,7 +26671,7 @@
</method>
</methods>
<members>
- <member name="align" type="int" setter="set_align" getter="get_align" brief="">
+ <member name="align" type="int" setter="set_align" getter="get_align" brief="" enum="LineEdit.Align">
</member>
<member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" brief="">
</member>
@@ -24040,7 +26681,7 @@
</member>
<member name="expand_to_len" type="bool" setter="set_expand_to_text_length" getter="get_expand_to_text_length" brief="">
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" brief="">
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" brief="" enum="Control.FocusMode">
</member>
<member name="max_length" type="int" setter="set_max_length" getter="get_max_length" brief="">
</member>
@@ -24137,6 +26778,8 @@
</description>
</method>
<method name="set_d">
+ <return type="void">
+ </return>
<argument index="0" name="d" type="float">
</argument>
<description>
@@ -24144,6 +26787,8 @@
</description>
</method>
<method name="set_normal">
+ <return type="void">
+ </return>
<argument index="0" name="normal" type="Vector2">
</argument>
<description>
@@ -24183,6 +26828,8 @@
</description>
</method>
<method name="set_text">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
<description>
@@ -24190,7 +26837,9 @@
</description>
</method>
<method name="set_underline_mode">
- <argument index="0" name="underline_mode" type="int">
+ <return type="void">
+ </return>
+ <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).
@@ -24200,7 +26849,7 @@
<members>
<member name="text" type="String" setter="set_text" getter="get_text" brief="">
</member>
- <member name="underline" type="int" setter="set_underline_mode" getter="get_underline_mode" brief="">
+ <member name="underline" type="int" setter="set_underline_mode" getter="get_underline_mode" brief="" enum="LinkButton.UnderlineMode">
</member>
</members>
<constants>
@@ -24234,6 +26883,8 @@
</description>
<methods>
<method name="clear_current">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -24250,6 +26901,8 @@
</description>
</method>
<method name="make_current">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -24266,6 +26919,8 @@
</description>
<methods>
<method name="_drop_files" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="files" type="PoolStringArray">
</argument>
<argument index="1" name="screen" type="int">
@@ -24274,38 +26929,52 @@
</description>
</method>
<method name="_finalize" qualifiers="virtual">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="_idle" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="delta" type="float">
</argument>
<description>
</description>
</method>
<method name="_initialize" qualifiers="virtual">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="_input_event" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="ev" type="InputEvent">
</argument>
<description>
</description>
</method>
<method name="_input_text" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
<description>
</description>
</method>
<method name="_iteration" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="delta" type="float">
</argument>
<description>
</description>
</method>
<method name="finish">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -24318,16 +26987,22 @@
</description>
</method>
<method name="init">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="input_event">
- <argument index="0" name="ev" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="ev" type="InputEvent">
</argument>
<description>
</description>
</method>
<method name="input_text">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
<description>
@@ -24343,19 +27018,23 @@
</method>
</methods>
<constants>
- <constant name="NOTIFICATION_WM_MOUSE_ENTER" value="2">
+ <constant name="NOTIFICATION_WM_MOUSE_ENTER" value="2" enum="">
+ </constant>
+ <constant name="NOTIFICATION_WM_MOUSE_EXIT" value="3" enum="">
</constant>
- <constant name="NOTIFICATION_WM_MOUSE_EXIT" value="3">
+ <constant name="NOTIFICATION_WM_FOCUS_IN" value="4" enum="">
</constant>
- <constant name="NOTIFICATION_WM_FOCUS_IN" value="4">
+ <constant name="NOTIFICATION_WM_FOCUS_OUT" value="5" enum="">
</constant>
- <constant name="NOTIFICATION_WM_FOCUS_OUT" value="5">
+ <constant name="NOTIFICATION_WM_QUIT_REQUEST" value="6" enum="">
</constant>
- <constant name="NOTIFICATION_WM_QUIT_REQUEST" value="6">
+ <constant name="NOTIFICATION_WM_UNFOCUS_REQUEST" value="8" enum="">
</constant>
- <constant name="NOTIFICATION_WM_UNFOCUS_REQUEST" value="8">
+ <constant name="NOTIFICATION_OS_MEMORY_WARNING" value="9" enum="">
</constant>
- <constant name="NOTIFICATION_OS_MEMORY_WARNING" value="9">
+ <constant name="NOTIFICATION_TRANSLATION_CHANGED" value="90" enum="">
+ </constant>
+ <constant name="NOTIFICATION_WM_ABOUT" value="91" enum="">
</constant>
</constants>
</class>
@@ -24453,18 +27132,40 @@
<description>
</description>
</method>
+ <method name="get_render_priority" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="set_next_pass">
+ <return type="void">
+ </return>
<argument index="0" name="next_pass" type="Material">
</argument>
<description>
</description>
</method>
+ <method name="set_render_priority">
+ <return type="void">
+ </return>
+ <argument index="0" name="priority" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
</methods>
<members>
<member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass" brief="">
</member>
+ <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" brief="">
+ </member>
</members>
<constants>
+ <constant name="RENDER_PRIORITY_MAX" value="127" enum="">
+ </constant>
+ <constant name="RENDER_PRIORITY_MIN" value="-128" enum="">
+ </constant>
</constants>
</class>
<class name="MenuButton" inherits="Button" category="Core">
@@ -24535,7 +27236,7 @@
</description>
</method>
<method name="create_outline" qualifiers="const">
- <return type="ArrayMesh">
+ <return type="Mesh">
</return>
<argument index="0" name="margin" type="float">
</argument>
@@ -24592,13 +27293,15 @@
</description>
<methods>
<method name="clear">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="commit_to_surface">
<return type="int">
</return>
- <argument index="0" name="mesh" type="Object">
+ <argument index="0" name="mesh" type="ArrayMesh">
</argument>
<description>
</description>
@@ -24606,7 +27309,7 @@
<method name="create_from_surface">
<return type="int">
</return>
- <argument index="0" name="mesh" type="Object">
+ <argument index="0" name="mesh" type="ArrayMesh">
</argument>
<argument index="1" name="surface" type="int">
</argument>
@@ -24694,7 +27397,7 @@
</description>
</method>
<method name="get_material" qualifiers="const">
- <return type="Object">
+ <return type="Material">
</return>
<description>
</description>
@@ -24794,6 +27497,8 @@
</description>
</method>
<method name="set_edge_meta">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="meta" type="Variant">
@@ -24802,6 +27507,8 @@
</description>
</method>
<method name="set_face_meta">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="meta" type="Variant">
@@ -24810,12 +27517,16 @@
</description>
</method>
<method name="set_material">
+ <return type="void">
+ </return>
<argument index="0" name="material" type="Material">
</argument>
<description>
</description>
</method>
<method name="set_vertex">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="vertex" type="Vector3">
@@ -24824,6 +27535,8 @@
</description>
</method>
<method name="set_vertex_bones">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="bones" type="PoolIntArray">
@@ -24832,6 +27545,8 @@
</description>
</method>
<method name="set_vertex_color">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="color" type="Color">
@@ -24840,6 +27555,8 @@
</description>
</method>
<method name="set_vertex_meta">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="meta" type="Variant">
@@ -24848,6 +27565,8 @@
</description>
</method>
<method name="set_vertex_normal">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="normal" type="Vector3">
@@ -24856,6 +27575,8 @@
</description>
</method>
<method name="set_vertex_tangent">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="tangent" type="Plane">
@@ -24864,6 +27585,8 @@
</description>
</method>
<method name="set_vertex_uv">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="uv" type="Vector2">
@@ -24872,6 +27595,8 @@
</description>
</method>
<method name="set_vertex_uv2">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="uv2" type="Vector2">
@@ -24880,6 +27605,8 @@
</description>
</method>
<method name="set_vertex_weights">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="weights" type="PoolRealArray">
@@ -24900,14 +27627,20 @@
</description>
<methods>
<method name="create_convex_collision">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="create_debug_tangents">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="create_trimesh_collision">
+ <return type="void">
+ </return>
<description>
This helper creates a [StaticBody] child [Node] using the mesh geometry as collision. It's mainly used for testing.
</description>
@@ -24934,6 +27667,8 @@
</description>
</method>
<method name="set_mesh">
+ <return type="void">
+ </return>
<argument index="0" name="mesh" type="Mesh">
</argument>
<description>
@@ -24941,12 +27676,16 @@
</description>
</method>
<method name="set_skeleton_path">
+ <return type="void">
+ </return>
<argument index="0" name="skeleton_path" type="NodePath">
</argument>
<description>
</description>
</method>
<method name="set_surface_material">
+ <return type="void">
+ </return>
<argument index="0" name="surface" type="int">
</argument>
<argument index="1" name="material" type="Material">
@@ -24973,11 +27712,15 @@
</description>
<methods>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clear the library.
</description>
</method>
<method name="create_item">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<description>
@@ -25017,8 +27760,16 @@
<description>
</description>
</method>
- <method name="get_item_shape" qualifiers="const">
- <return type="Shape">
+ <method name="get_item_preview" qualifiers="const">
+ <return type="Texture">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_item_shapes" qualifiers="const">
+ <return type="Array">
</return>
<argument index="0" name="id" type="int">
</argument>
@@ -25033,6 +27784,8 @@
</description>
</method>
<method name="remove_item">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<description>
@@ -25040,6 +27793,8 @@
</description>
</method>
<method name="set_item_mesh">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="mesh" type="Mesh">
@@ -25049,6 +27804,8 @@
</description>
</method>
<method name="set_item_name">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="name" type="String">
@@ -25058,6 +27815,8 @@
</description>
</method>
<method name="set_item_navmesh">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="navmesh" type="NavigationMesh">
@@ -25065,10 +27824,22 @@
<description>
</description>
</method>
- <method name="set_item_shape">
+ <method name="set_item_preview">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
- <argument index="1" name="shape" type="Shape">
+ <argument index="1" name="texture" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_item_shapes">
+ <return type="void">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <argument index="1" name="shapes" type="Array">
</argument>
<description>
</description>
@@ -25140,12 +27911,16 @@
</description>
</method>
<method name="set_color_format">
- <argument index="0" name="format" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="format" type="int" enum="MultiMesh.ColorFormat">
</argument>
<description>
</description>
</method>
<method name="set_instance_color">
+ <return type="void">
+ </return>
<argument index="0" name="instance" type="int">
</argument>
<argument index="1" name="color" type="Color">
@@ -25155,6 +27930,8 @@
</description>
</method>
<method name="set_instance_count">
+ <return type="void">
+ </return>
<argument index="0" name="count" type="int">
</argument>
<description>
@@ -25162,6 +27939,8 @@
</description>
</method>
<method name="set_instance_transform">
+ <return type="void">
+ </return>
<argument index="0" name="instance" type="int">
</argument>
<argument index="1" name="transform" type="Transform">
@@ -25171,6 +27950,8 @@
</description>
</method>
<method name="set_mesh">
+ <return type="void">
+ </return>
<argument index="0" name="mesh" type="Mesh">
</argument>
<description>
@@ -25178,7 +27959,9 @@
</description>
</method>
<method name="set_transform_format">
- <argument index="0" name="format" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="format" type="int" enum="MultiMesh.TransformFormat">
</argument>
<description>
</description>
@@ -25187,7 +27970,7 @@
<members>
<member name="color_array" type="PoolColorArray" setter="_set_color_array" getter="_get_color_array" brief="">
</member>
- <member name="color_format" type="int" setter="set_color_format" getter="get_color_format" brief="">
+ <member name="color_format" type="int" setter="set_color_format" getter="get_color_format" brief="" enum="MultiMesh.ColorFormat">
</member>
<member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count" brief="">
</member>
@@ -25195,7 +27978,7 @@
</member>
<member name="transform_array" type="PoolVector3Array" setter="_set_transform_array" getter="_get_transform_array" brief="">
</member>
- <member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" brief="">
+ <member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" brief="" enum="MultiMesh.TransformFormat">
</member>
</members>
<constants>
@@ -25220,17 +28003,19 @@
</description>
<methods>
<method name="get_multimesh" qualifiers="const">
- <return type="Object">
+ <return type="MultiMesh">
</return>
<description>
Return the [MultiMesh] that is used for instancing.
</description>
</method>
<method name="set_multimesh">
- <argument index="0" name="multimesh" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="multimesh" type="MultiMesh">
</argument>
<description>
- Set the [MultiMesh] to be instance.
+ Set the [MultiMesh] to be instanced.
</description>
</method>
</methods>
@@ -25250,18 +28035,22 @@
</description>
<methods>
<method name="lock">
+ <return type="void">
+ </return>
<description>
Lock this [Mutex], blocks until it is unlocked by the current owner.
</description>
</method>
<method name="try_lock">
- <return type="Error">
+ <return type="int">
</return>
<description>
Try locking this [Mutex], 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.
</description>
@@ -25270,6 +28059,56 @@
<constants>
</constants>
</class>
+<class name="NativeScript" inherits="Script" category="Core">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <methods>
+ <method name="get_class_name" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_library" qualifiers="const">
+ <return type="GDNativeLibrary">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="new" qualifiers="vararg">
+ <return type="Object">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_class_name">
+ <return type="void">
+ </return>
+ <argument index="0" name="class_name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_library">
+ <return type="void">
+ </return>
+ <argument index="0" name="library" type="GDNativeLibrary">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="class_name" type="String" setter="set_class_name" getter="get_class_name" brief="">
+ </member>
+ <member name="library" type="GDNativeLibrary" setter="set_library" getter="get_library" brief="">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
<class name="Navigation" inherits="Spatial" category="Core">
<brief_description>
</brief_description>
@@ -25307,7 +28146,7 @@
</argument>
<argument index="1" name="end" type="Vector3">
</argument>
- <argument index="2" name="use_collision" type="bool" default="false">
+ <argument index="2" name="use_collision" type="bool" default="null">
</argument>
<description>
</description>
@@ -25319,7 +28158,7 @@
</argument>
<argument index="1" name="end" type="Vector3">
</argument>
- <argument index="2" name="optimize" type="bool" default="true">
+ <argument index="2" name="optimize" type="bool" default="null">
</argument>
<description>
</description>
@@ -25337,18 +28176,22 @@
</argument>
<argument index="1" name="xform" type="Transform">
</argument>
- <argument index="2" name="owner" type="Object" default="NULL">
+ <argument index="2" name="owner" type="Object" default="null">
</argument>
<description>
</description>
</method>
<method name="navmesh_remove">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<description>
</description>
</method>
<method name="navmesh_set_transform">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="xform" type="Transform">
@@ -25357,6 +28200,8 @@
</description>
</method>
<method name="set_up_vector">
+ <return type="void">
+ </return>
<argument index="0" name="up" type="Vector3">
</argument>
<description>
@@ -25399,7 +28244,7 @@
</argument>
<argument index="1" name="end" type="Vector2">
</argument>
- <argument index="2" name="optimize" type="bool" default="true">
+ <argument index="2" name="optimize" type="bool" default="null">
</argument>
<description>
</description>
@@ -25411,18 +28256,22 @@
</argument>
<argument index="1" name="xform" type="Transform2D">
</argument>
- <argument index="2" name="owner" type="Object" default="NULL">
+ <argument index="2" name="owner" type="Object" default="null">
</argument>
<description>
</description>
</method>
<method name="navpoly_remove">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<description>
</description>
</method>
<method name="navpoly_set_transform">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="xform" type="Transform2D">
@@ -25441,12 +28290,24 @@
</description>
<methods>
<method name="add_polygon">
+ <return type="void">
+ </return>
<argument index="0" name="polygon" type="PoolIntArray">
</argument>
<description>
</description>
</method>
<method name="clear_polygons">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="create_from_mesh">
+ <return type="void">
+ </return>
+ <argument index="0" name="mesh" type="Mesh">
+ </argument>
<description>
</description>
</method>
@@ -25471,6 +28332,8 @@
</description>
</method>
<method name="set_vertices">
+ <return type="void">
+ </return>
<argument index="0" name="vertices" type="PoolVector3Array">
</argument>
<description>
@@ -25493,7 +28356,7 @@
</description>
<methods>
<method name="get_navigation_mesh" qualifiers="const">
- <return type="Object">
+ <return type="NavigationMesh">
</return>
<description>
</description>
@@ -25505,13 +28368,17 @@
</description>
</method>
<method name="set_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_navigation_mesh">
- <argument index="0" name="navmesh" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="navmesh" type="NavigationMesh">
</argument>
<description>
</description>
@@ -25533,12 +28400,16 @@
</description>
<methods>
<method name="add_outline">
+ <return type="void">
+ </return>
<argument index="0" name="outline" type="PoolVector2Array">
</argument>
<description>
</description>
</method>
<method name="add_outline_at_index">
+ <return type="void">
+ </return>
<argument index="0" name="outline" type="PoolVector2Array">
</argument>
<argument index="1" name="index" type="int">
@@ -25547,16 +28418,22 @@
</description>
</method>
<method name="add_polygon">
+ <return type="void">
+ </return>
<argument index="0" name="polygon" type="PoolIntArray">
</argument>
<description>
</description>
</method>
<method name="clear_outlines">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="clear_polygons">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -25595,16 +28472,22 @@
</description>
</method>
<method name="make_polygons_from_outlines">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="remove_outline">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
</description>
</method>
<method name="set_outline">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="outline" type="PoolVector2Array">
@@ -25613,6 +28496,8 @@
</description>
</method>
<method name="set_vertices">
+ <return type="void">
+ </return>
<argument index="0" name="vertices" type="PoolVector2Array">
</argument>
<description>
@@ -25624,7 +28509,7 @@
</member>
<member name="polygons" type="Array" setter="_set_polygons" getter="_get_polygons" brief="">
</member>
- <member name="vertices" type="PoolVector3Array" setter="set_vertices" getter="get_vertices" brief="">
+ <member name="vertices" type="PoolVector2Array" setter="set_vertices" getter="get_vertices" brief="">
</member>
</members>
<constants>
@@ -25649,12 +28534,16 @@
</description>
</method>
<method name="set_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_navigation_polygon">
+ <return type="void">
+ </return>
<argument index="0" name="navpoly" type="NavigationPolygon">
</argument>
<description>
@@ -25679,6 +28568,8 @@
</description>
<methods>
<method name="close_connection">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -25689,9 +28580,9 @@
</argument>
<argument index="1" name="port" type="int">
</argument>
- <argument index="2" name="in_bandwidth" type="int" default="0">
+ <argument index="2" name="in_bandwidth" type="int" default="null">
</argument>
- <argument index="3" name="out_bandwidth" type="int" default="0">
+ <argument index="3" name="out_bandwidth" type="int" default="null">
</argument>
<description>
</description>
@@ -25701,11 +28592,11 @@
</return>
<argument index="0" name="port" type="int">
</argument>
- <argument index="1" name="max_clients" type="int" default="32">
+ <argument index="1" name="max_clients" type="int" default="0">
</argument>
- <argument index="2" name="in_bandwidth" type="int" default="0">
+ <argument index="2" name="in_bandwidth" type="int" default="32">
</argument>
- <argument index="3" name="out_bandwidth" type="int" default="0">
+ <argument index="3" name="out_bandwidth" type="int" default="null">
</argument>
<description>
</description>
@@ -25717,13 +28608,17 @@
</description>
</method>
<method name="set_bind_ip">
+ <return type="void">
+ </return>
<argument index="0" name="ip" type="String">
</argument>
<description>
</description>
</method>
<method name="set_compression_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="NetworkedMultiplayerENet.CompressionMode">
</argument>
<description>
</description>
@@ -25773,23 +28668,31 @@
</description>
</method>
<method name="poll">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="set_refuse_new_connections">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_target_peer">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<description>
</description>
</method>
<method name="set_transfer_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="NetworkedMultiplayerPeer.TransferMode">
</argument>
<description>
</description>
@@ -25834,9 +28737,9 @@
</constant>
<constant name="CONNECTION_CONNECTED" value="2">
</constant>
- <constant name="TARGET_PEER_BROADCAST" value="0">
+ <constant name="TARGET_PEER_BROADCAST" value="0" enum="">
</constant>
- <constant name="TARGET_PEER_SERVER" value="1">
+ <constant name="TARGET_PEER_SERVER" value="1" enum="">
</constant>
</constants>
</class>
@@ -26012,12 +28915,6 @@
<description>
</description>
<methods>
- <method name="get_draw_center" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
<method name="get_h_axis_stretch_mode" qualifiers="const">
<return type="int">
</return>
@@ -26027,7 +28924,7 @@
<method name="get_patch_margin" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="margin" type="int">
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
</description>
@@ -26039,7 +28936,7 @@
</description>
</method>
<method name="get_texture" qualifiers="const">
- <return type="Object">
+ <return type="Texture">
</return>
<description>
</description>
@@ -26050,20 +28947,32 @@
<description>
</description>
</method>
+ <method name="is_draw_center_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="set_draw_center">
+ <return type="void">
+ </return>
<argument index="0" name="draw_center" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_h_axis_stretch_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="NinePatchRect.AxisStretchMode">
</argument>
<description>
</description>
</method>
<method name="set_patch_margin">
- <argument index="0" name="margin" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<argument index="1" name="value" type="int">
</argument>
@@ -26071,30 +28980,36 @@
</description>
</method>
<method name="set_region_rect">
+ <return type="void">
+ </return>
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
</description>
</method>
<method name="set_texture">
- <argument index="0" name="texture" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_v_axis_stretch_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="NinePatchRect.AxisStretchMode">
</argument>
<description>
</description>
</method>
</methods>
<members>
- <member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" brief="">
+ <member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" brief="" enum="NinePatchRect.AxisStretchMode">
</member>
- <member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" brief="">
+ <member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" brief="" enum="NinePatchRect.AxisStretchMode">
</member>
- <member name="draw_center" type="bool" setter="set_draw_center" getter="get_draw_center" brief="">
+ <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" brief="">
</member>
<member name="patch_margin_bottom" type="int" setter="set_patch_margin" getter="get_patch_margin" brief="">
</member>
@@ -26142,18 +29057,24 @@
</description>
<methods>
<method name="_enter_tree" qualifiers="virtual">
+ <return type="void">
+ </return>
<description>
Called when the node enters the [SceneTree] (e.g. upon instancing, scene changing or after calling [method add_child] in a script). If the node has children, its [method _enter_tree] callback will be called first, and then that of the children.
Corresponds to the NOTIFICATION_ENTER_TREE notification in [method Object._notification].
</description>
</method>
<method name="_exit_tree" qualifiers="virtual">
+ <return type="void">
+ </return>
<description>
Called when the node leaves the [SceneTree] (e.g. upon freeing, scene changing or after calling [method remove_child] in a script). If the node has children, its [method _exit_tree] callback will be called last, after all its children have left the tree.
Corresponds to the NOTIFICATION_EXIT_TREE notification in [method Object._notification].
</description>
</method>
<method name="_fixed_process" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="delta" type="float">
</argument>
<description>
@@ -26163,12 +29084,16 @@
</description>
</method>
<method name="_input" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
</description>
</method>
<method name="_process" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="delta" type="float">
</argument>
<description>
@@ -26178,27 +29103,35 @@
</description>
</method>
<method name="_ready" qualifiers="virtual">
+ <return type="void">
+ </return>
<description>
Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callback gets triggered first, and the node will receive the ready notification only afterwards.
Corresponds to the NOTIFICATION_READY notification in [method Object._notification].
</description>
</method>
<method name="_unhandled_input" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
</description>
</method>
<method name="_unhandled_key_input" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="event" type="InputEventKey">
</argument>
<description>
</description>
</method>
<method name="add_child">
+ <return type="void">
+ </return>
<argument index="0" name="node" type="Node">
</argument>
- <argument index="1" name="legible_unique_name" type="bool" default="false">
+ <argument index="1" name="legible_unique_name" type="bool" default="null">
</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.
@@ -26206,9 +29139,11 @@
</description>
</method>
<method name="add_to_group">
+ <return type="void">
+ </return>
<argument index="0" name="group" type="String">
</argument>
- <argument index="1" name="persistent" type="bool" default="false">
+ <argument index="1" name="persistent" type="bool" default="null">
</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]).
@@ -26238,7 +29173,7 @@
</argument>
<argument index="1" name="recursive" type="bool" default="true">
</argument>
- <argument index="2" name="owned" type="bool" default="true">
+ <argument index="2" name="owned" type="bool" default="null">
</argument>
<description>
Find a descendant of this node whose name matches [code]mask[/code] as in [method String.match] (i.e. case sensitive, but '*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names.
@@ -26406,7 +29341,7 @@
</description>
</method>
<method name="get_viewport" qualifiers="const">
- <return type="Object">
+ <return type="Viewport">
</return>
<description>
</description>
@@ -26518,6 +29453,8 @@
</description>
</method>
<method name="move_child">
+ <return type="void">
+ </return>
<argument index="0" name="child_node" type="Node">
</argument>
<argument index="1" name="to_pos" type="int">
@@ -26527,47 +29464,63 @@
</description>
</method>
<method name="print_stray_nodes">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="print_tree">
+ <return type="void">
+ </return>
<description>
Print the scene to stdout. Used mainly for debugging purposes.
</description>
</method>
- <method name="propagate_notification">
- <argument index="0" name="what" type="int">
- </argument>
- <description>
- Notify the current node and all its children recursively by calling notification() in all of them.
- </description>
- </method>
<method name="propagate_call">
+ <return type="void">
+ </return>
<argument index="0" name="method" type="String">
</argument>
- <argument index="1" name="args" type="Array" default="[]">
+ <argument index="1" name="args" type="Array" default="[ ]">
</argument>
- <argument index="2" name="parent_first" type="bool" default="false">
+ <argument index="2" name="parent_first" type="bool" default="null">
</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.
</description>
</method>
+ <method name="propagate_notification">
+ <return type="void">
+ </return>
+ <argument index="0" name="what" type="int">
+ </argument>
+ <description>
+ Notify the current node and all its children recursively by calling notification() in all of them.
+ </description>
+ </method>
<method name="queue_free">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="raise">
+ <return type="void">
+ </return>
<description>
Move this node to the top of the array of nodes of the parent node. This is often useful on GUIs ([Control]), because their order of drawing fully depends on their order in the tree.
</description>
</method>
<method name="remove_and_skip">
+ <return type="void">
+ </return>
<description>
Remove a node and set all its children as children of the parent node (if exists). All even subscriptions that pass by the removed node will be unsubscribed.
</description>
</method>
<method name="remove_child">
+ <return type="void">
+ </return>
<argument index="0" name="node" type="Node">
</argument>
<description>
@@ -26575,6 +29528,8 @@
</description>
</method>
<method name="remove_from_group">
+ <return type="void">
+ </return>
<argument index="0" name="group" type="String">
</argument>
<description>
@@ -26582,19 +29537,25 @@
</description>
</method>
<method name="replace_by">
+ <return type="void">
+ </return>
<argument index="0" name="node" type="Node">
</argument>
- <argument index="1" name="keep_data" type="bool" default="false">
+ <argument index="1" name="keep_data" type="bool" default="null">
</argument>
<description>
Replace a node in a scene by a given one. Subscriptions that pass through this node will be lost.
</description>
</method>
<method name="request_ready">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="rpc" qualifiers="vararg">
+ <return type="Variant">
+ </return>
<argument index="0" name="method" type="String">
</argument>
<description>
@@ -26602,15 +29563,19 @@
</description>
</method>
<method name="rpc_config">
+ <return type="void">
+ </return>
<argument index="0" name="method" type="String">
</argument>
- <argument index="1" name="mode" type="int">
+ <argument index="1" name="mode" type="int" enum="Node.RPCMode">
</argument>
<description>
Change the method's RPC mode (one of RPC_MODE_* constants).
</description>
</method>
<method name="rpc_id" qualifiers="vararg">
+ <return type="Variant">
+ </return>
<argument index="0" name="peer_id" type="int">
</argument>
<argument index="1" name="method" type="String">
@@ -26620,6 +29585,8 @@
</description>
</method>
<method name="rpc_unreliable" qualifiers="vararg">
+ <return type="Variant">
+ </return>
<argument index="0" name="method" type="String">
</argument>
<description>
@@ -26627,6 +29594,8 @@
</description>
</method>
<method name="rpc_unreliable_id" qualifiers="vararg">
+ <return type="Variant">
+ </return>
<argument index="0" name="peer_id" type="int">
</argument>
<argument index="1" name="method" type="String">
@@ -26636,6 +29605,8 @@
</description>
</method>
<method name="rset">
+ <return type="void">
+ </return>
<argument index="0" name="property" type="String">
</argument>
<argument index="1" name="value" type="Variant">
@@ -26645,15 +29616,19 @@
</description>
</method>
<method name="rset_config">
+ <return type="void">
+ </return>
<argument index="0" name="property" type="String">
</argument>
- <argument index="1" name="mode" type="int">
+ <argument index="1" name="mode" type="int" enum="Node.RPCMode">
</argument>
<description>
Change the property's RPC mode (one of RPC_MODE_* constants).
</description>
</method>
<method name="rset_id">
+ <return type="void">
+ </return>
<argument index="0" name="peer_id" type="int">
</argument>
<argument index="1" name="property" type="String">
@@ -26665,6 +29640,8 @@
</description>
</method>
<method name="rset_unreliable">
+ <return type="void">
+ </return>
<argument index="0" name="property" type="String">
</argument>
<argument index="1" name="value" type="Variant">
@@ -26674,6 +29651,8 @@
</description>
</method>
<method name="rset_unreliable_id">
+ <return type="void">
+ </return>
<argument index="0" name="peer_id" type="int">
</argument>
<argument index="1" name="property" type="String">
@@ -26685,12 +29664,16 @@
</description>
</method>
<method name="set_display_folded">
+ <return type="void">
+ </return>
<argument index="0" name="fold" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_filename">
+ <return type="void">
+ </return>
<argument index="0" name="filename" type="String">
</argument>
<description>
@@ -26698,6 +29681,8 @@
</description>
</method>
<method name="set_fixed_process">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -26705,12 +29690,16 @@
</description>
</method>
<method name="set_fixed_process_internal">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_name">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -26718,14 +29707,18 @@
</description>
</method>
<method name="set_network_master">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
- <argument index="1" name="recursive" type="bool" default="true">
+ <argument index="1" name="recursive" type="bool" default="null">
</argument>
<description>
</description>
</method>
<method name="set_owner">
+ <return type="void">
+ </return>
<argument index="0" name="owner" type="Node">
</argument>
<description>
@@ -26733,12 +29726,16 @@
</description>
</method>
<method name="set_pause_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Node.PauseMode">
</argument>
<description>
</description>
</method>
<method name="set_process">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -26746,6 +29743,8 @@
</description>
</method>
<method name="set_process_input">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -26753,12 +29752,16 @@
</description>
</method>
<method name="set_process_internal">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_process_unhandled_input">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -26766,12 +29769,16 @@
</description>
</method>
<method name="set_process_unhandled_key_input">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_scene_instance_load_placeholder">
+ <return type="void">
+ </return>
<argument index="0" name="load_placeholder" type="bool">
</argument>
<description>
@@ -26783,7 +29790,7 @@
</member>
<member name="editor/display_folded" type="bool" setter="set_display_folded" getter="is_displayed_folded" brief="">
</member>
- <member name="pause_mode" type="int" setter="set_pause_mode" getter="get_pause_mode" brief="">
+ <member name="pause_mode" type="int" setter="set_pause_mode" getter="get_pause_mode" brief="" enum="Node.PauseMode">
</member>
</members>
<signals>
@@ -26802,42 +29809,42 @@
</signal>
</signals>
<constants>
- <constant name="NOTIFICATION_ENTER_TREE" value="10">
+ <constant name="NOTIFICATION_ENTER_TREE" value="10" enum="">
</constant>
- <constant name="NOTIFICATION_EXIT_TREE" value="11">
+ <constant name="NOTIFICATION_EXIT_TREE" value="11" enum="">
</constant>
- <constant name="NOTIFICATION_MOVED_IN_PARENT" value="12">
+ <constant name="NOTIFICATION_MOVED_IN_PARENT" value="12" enum="">
</constant>
- <constant name="NOTIFICATION_READY" value="13">
+ <constant name="NOTIFICATION_READY" value="13" enum="">
</constant>
- <constant name="NOTIFICATION_FIXED_PROCESS" value="16">
+ <constant name="NOTIFICATION_FIXED_PROCESS" value="16" enum="">
</constant>
- <constant name="NOTIFICATION_PROCESS" value="17">
+ <constant name="NOTIFICATION_PROCESS" value="17" enum="">
Notification received every frame when the process flag is set (see [method set_process]).
</constant>
- <constant name="NOTIFICATION_PARENTED" value="18">
+ <constant name="NOTIFICATION_PARENTED" value="18" enum="">
Notification received when a node is set as a child of another node. Note that this doesn't mean that a node entered the Scene Tree.
</constant>
- <constant name="NOTIFICATION_UNPARENTED" value="19">
+ <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">
+ <constant name="NOTIFICATION_PAUSED" value="14" enum="">
</constant>
- <constant name="NOTIFICATION_UNPAUSED" value="15">
+ <constant name="NOTIFICATION_UNPAUSED" value="15" enum="">
</constant>
- <constant name="NOTIFICATION_INSTANCED" value="20">
+ <constant name="NOTIFICATION_INSTANCED" value="20" enum="">
</constant>
- <constant name="NOTIFICATION_DRAG_BEGIN" value="21">
+ <constant name="NOTIFICATION_DRAG_BEGIN" value="21" enum="">
</constant>
- <constant name="NOTIFICATION_DRAG_END" value="22">
+ <constant name="NOTIFICATION_DRAG_END" value="22" enum="">
</constant>
- <constant name="NOTIFICATION_PATH_CHANGED" value="23">
+ <constant name="NOTIFICATION_PATH_CHANGED" value="23" enum="">
</constant>
- <constant name="NOTIFICATION_TRANSLATION_CHANGED" value="24">
+ <constant name="NOTIFICATION_TRANSLATION_CHANGED" value="24" enum="">
</constant>
- <constant name="NOTIFICATION_INTERNAL_PROCESS" value="25">
+ <constant name="NOTIFICATION_INTERNAL_PROCESS" value="25" enum="">
</constant>
- <constant name="NOTIFICATION_INTERNAL_FIXED_PROCESS" value="26">
+ <constant name="NOTIFICATION_INTERNAL_FIXED_PROCESS" value="26" enum="">
</constant>
<constant name="RPC_MODE_DISABLED" value="0">
</constant>
@@ -26873,7 +29880,18 @@
Base node for 2D system. Node2D contains a position, rotation and scale, which is used to position and animate. It can alternatively be used with a custom 2D transform ([Transform2D]). A tree of Node2Ds allows complex hierarchies for animation and positioning.
</description>
<methods>
+ <method name="apply_scale">
+ <return type="void">
+ </return>
+ <argument index="0" name="ratio" type="Vector2">
+ </argument>
+ <description>
+ Apply the 'ratio' scale to the 2D node, according to its current scale value.
+ </description>
+ </method>
<method name="edit_set_pivot">
+ <return type="void">
+ </return>
<argument index="0" name="pivot" type="Vector2">
</argument>
<description>
@@ -26927,7 +29945,7 @@
<method name="get_relative_transform_to_parent" qualifiers="const">
<return type="Transform2D">
</return>
- <argument index="0" name="parent" type="Object">
+ <argument index="0" name="parent" type="Node">
</argument>
<description>
Return the transform [Transform2D] calculated relatively to the parent of this 2D node.
@@ -26962,6 +29980,8 @@
</description>
</method>
<method name="global_translate">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
@@ -26976,6 +29996,8 @@
</description>
</method>
<method name="look_at">
+ <return type="void">
+ </return>
<argument index="0" name="point" type="Vector2">
</argument>
<description>
@@ -26983,38 +30005,39 @@
</description>
</method>
<method name="move_local_x">
+ <return type="void">
+ </return>
<argument index="0" name="delta" type="float">
</argument>
- <argument index="1" name="scaled" type="bool" default="false">
+ <argument index="1" name="scaled" type="bool" default="null">
</argument>
<description>
Apply a local translation on X axis to the 2D node according to the 'delta' of the process. If 'scaled' is false, the movement is normalized.
</description>
</method>
<method name="move_local_y">
+ <return type="void">
+ </return>
<argument index="0" name="delta" type="float">
</argument>
- <argument index="1" name="scaled" type="bool" default="false">
+ <argument index="1" name="scaled" type="bool" default="null">
</argument>
<description>
Apply a local translation on Y axis to the 2D node according to the 'delta' of the process. If 'scaled' is false, the movement is normalized.
</description>
</method>
<method name="rotate">
+ <return type="void">
+ </return>
<argument index="0" name="radians" type="float">
</argument>
<description>
Apply a rotation (in radians) to the 2D node, starting from its current rotation.
</description>
</method>
- <method name="scale">
- <argument index="0" name="ratio" type="Vector2">
- </argument>
- <description>
- Apply the 'ratio' scale to the 2D node, according to its current scale value.
- </description>
- </method>
<method name="set_global_position">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
@@ -27022,6 +30045,8 @@
</description>
</method>
<method name="set_global_rotation">
+ <return type="void">
+ </return>
<argument index="0" name="radians" type="float">
</argument>
<description>
@@ -27029,6 +30054,8 @@
</description>
</method>
<method name="set_global_rotation_in_degrees">
+ <return type="void">
+ </return>
<argument index="0" name="degrees" type="float">
</argument>
<description>
@@ -27036,6 +30063,8 @@
</description>
</method>
<method name="set_global_scale">
+ <return type="void">
+ </return>
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
@@ -27043,6 +30072,8 @@
</description>
</method>
<method name="set_global_transform">
+ <return type="void">
+ </return>
<argument index="0" name="xform" type="Transform2D">
</argument>
<description>
@@ -27050,6 +30081,8 @@
</description>
</method>
<method name="set_position">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
@@ -27057,6 +30090,8 @@
</description>
</method>
<method name="set_rotation">
+ <return type="void">
+ </return>
<argument index="0" name="radians" type="float">
</argument>
<description>
@@ -27064,6 +30099,8 @@
</description>
</method>
<method name="set_rotation_in_degrees">
+ <return type="void">
+ </return>
<argument index="0" name="degrees" type="float">
</argument>
<description>
@@ -27071,6 +30108,8 @@
</description>
</method>
<method name="set_scale">
+ <return type="void">
+ </return>
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
@@ -27078,6 +30117,8 @@
</description>
</method>
<method name="set_transform">
+ <return type="void">
+ </return>
<argument index="0" name="xform" type="Transform2D">
</argument>
<description>
@@ -27085,6 +30126,8 @@
</description>
</method>
<method name="set_z">
+ <return type="void">
+ </return>
<argument index="0" name="z" type="int">
</argument>
<description>
@@ -27092,13 +30135,33 @@
</description>
</method>
<method name="set_z_as_relative">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
Set the Z-index value as relative to the parent node of this 2D node. Thus, if this 2D node's Z-index value is 2 and its parent's effective Z-index is 3, then the effective Z-index value of this 2D node would be 3 + 2 = 5.
</description>
</method>
+ <method name="to_global" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="local_point" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="to_local" qualifiers="const">
+ <return type="Vector2">
+ </return>
+ <argument index="0" name="global_point" type="Vector2">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="translate">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
@@ -27107,13 +30170,13 @@
</method>
</methods>
<members>
- <member name="global_position" type="float" setter="set_global_position" getter="get_global_position" brief="">
+ <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" brief="">
</member>
<member name="global_rotation" type="float" setter="set_global_rotation" getter="get_global_rotation" brief="">
</member>
<member name="global_rotation_deg" type="float" setter="set_global_rotation_in_degrees" getter="get_global_rotation_in_degrees" brief="">
</member>
- <member name="global_scale" type="float" setter="set_global_scale" getter="get_global_scale" brief="">
+ <member name="global_scale" type="Vector2" setter="set_global_scale" getter="get_global_scale" brief="">
</member>
<member name="global_transform" type="Transform2D" setter="set_global_transform" getter="get_global_transform" brief="">
</member>
@@ -27220,9 +30283,11 @@
</description>
<methods>
<method name="alert">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
- <argument index="1" name="title" type="String" default="&quot;Alert!&quot;">
+ <argument index="1" name="title" type="String" default="null">
</argument>
<description>
Displays a modal dialog box utilizing the host OS.
@@ -27243,6 +30308,8 @@
</description>
</method>
<method name="delay_msec" qualifiers="const">
+ <return type="void">
+ </return>
<argument index="0" name="msec" type="int">
</argument>
<description>
@@ -27250,6 +30317,8 @@
</description>
</method>
<method name="delay_usec" qualifiers="const">
+ <return type="void">
+ </return>
<argument index="0" name="usec" type="int">
</argument>
<description>
@@ -27257,6 +30326,8 @@
</description>
</method>
<method name="dump_memory_to_file">
+ <return type="void">
+ </return>
<argument index="0" name="file" type="String">
</argument>
<description>
@@ -27265,6 +30336,8 @@
</description>
</method>
<method name="dump_resources_to_file">
+ <return type="void">
+ </return>
<argument index="0" name="file" type="String">
</argument>
<description>
@@ -27282,7 +30355,7 @@
</argument>
<argument index="2" name="blocking" type="bool">
</argument>
- <argument index="3" name="output" type="Array" default="[]">
+ <argument index="3" name="output" type="Array" default="null">
</argument>
<description>
Execute the binary file in given path, optionally blocking until it returns. A process ID is returned.
@@ -27469,7 +30542,7 @@
<method name="get_screen_dpi" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="screen" type="int" default="0">
+ <argument index="0" name="screen" type="int" default="-1">
</argument>
<description>
Returns the dots per inch density of the specified screen.
@@ -27493,7 +30566,7 @@
<method name="get_screen_position" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="screen" type="int" default="0">
+ <argument index="0" name="screen" type="int" default="-1">
</argument>
<description>
</description>
@@ -27501,7 +30574,7 @@
<method name="get_screen_size" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="screen" type="int" default="0">
+ <argument index="0" name="screen" type="int" default="-1">
</argument>
<description>
Returns the dimensions in pixels of the specified screen.
@@ -27529,7 +30602,7 @@
<method name="get_system_dir" qualifiers="const">
<return type="String">
</return>
- <argument index="0" name="dir" type="int">
+ <argument index="0" name="dir" type="int" enum="_OS.SystemDir">
</argument>
<description>
</description>
@@ -27623,6 +30696,8 @@
</description>
</method>
<method name="hide_virtual_keyboard">
+ <return type="void">
+ </return>
<description>
Hides the virtual keyboard if it is shown, does nothing otherwise.
</description>
@@ -27718,6 +30793,8 @@
</description>
</method>
<method name="native_video_pause">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -27736,47 +30813,65 @@
</description>
</method>
<method name="native_video_stop">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="native_video_unpause">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="print_all_resources">
+ <return type="void">
+ </return>
<argument index="0" name="tofile" type="String" default="&quot;&quot;">
</argument>
<description>
</description>
</method>
<method name="print_all_textures_by_size">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="print_resources_by_type">
+ <return type="void">
+ </return>
<argument index="0" name="types" type="PoolStringArray">
</argument>
<description>
</description>
</method>
<method name="print_resources_in_use">
+ <return type="void">
+ </return>
<argument index="0" name="short" type="bool" default="false">
</argument>
<description>
</description>
</method>
<method name="request_attention">
+ <return type="void">
+ </return>
<description>
Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX.
</description>
</method>
<method name="set_borderless_window">
+ <return type="void">
+ </return>
<argument index="0" name="borderless" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_clipboard">
+ <return type="void">
+ </return>
<argument index="0" name="clipboard" type="String">
</argument>
<description>
@@ -27784,30 +30879,40 @@
</description>
</method>
<method name="set_current_screen">
+ <return type="void">
+ </return>
<argument index="0" name="screen" type="int">
</argument>
<description>
</description>
</method>
<method name="set_exit_code">
+ <return type="void">
+ </return>
<argument index="0" name="code" type="int">
</argument>
<description>
</description>
</method>
<method name="set_icon">
- <argument index="0" name="icon" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="icon" type="Image">
</argument>
<description>
</description>
</method>
<method name="set_ime_position">
- <argument index="0" name="arg0" type="Vector2">
+ <return type="void">
+ </return>
+ <argument index="0" name="position" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_keep_screen_on">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -27815,6 +30920,8 @@
</description>
</method>
<method name="set_low_processor_usage_mode">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -27822,7 +30929,9 @@
</description>
</method>
<method name="set_screen_orientation">
- <argument index="0" name="orientation" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="orientation" type="int" enum="_OS.ScreenOrientation">
</argument>
<description>
Sets the current screen orientation, the argument value must be one of the SCREEN_ORIENTATION constants in this class.
@@ -27837,18 +30946,24 @@
</description>
</method>
<method name="set_use_file_access_save_and_swap">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_use_vsync">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_window_fullscreen">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -27856,6 +30971,8 @@
</description>
</method>
<method name="set_window_maximized">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -27863,6 +30980,8 @@
</description>
</method>
<method name="set_window_minimized">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -27870,6 +30989,8 @@
</description>
</method>
<method name="set_window_position">
+ <return type="void">
+ </return>
<argument index="0" name="position" type="Vector2">
</argument>
<description>
@@ -27877,6 +30998,8 @@
</description>
</method>
<method name="set_window_resizable">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -27884,6 +31007,8 @@
</description>
</method>
<method name="set_window_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="Vector2">
</argument>
<description>
@@ -27891,6 +31016,8 @@
</description>
</method>
<method name="set_window_title">
+ <return type="void">
+ </return>
<argument index="0" name="title" type="String">
</argument>
<description>
@@ -27906,6 +31033,8 @@
</description>
</method>
<method name="show_virtual_keyboard">
+ <return type="void">
+ </return>
<argument index="0" name="existing_text" type="String" default="&quot;&quot;">
</argument>
<description>
@@ -28007,6 +31136,8 @@
</description>
<methods>
<method name="_get" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="property" type="String">
</argument>
<description>
@@ -28021,10 +31152,14 @@
</description>
</method>
<method name="_init" qualifiers="virtual">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="_notification" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="what" type="int">
</argument>
<description>
@@ -28032,6 +31167,8 @@
</description>
</method>
<method name="_set" qualifiers="virtual">
+ <return type="bool">
+ </return>
<argument index="0" name="property" type="String">
</argument>
<argument index="1" name="value" type="Variant">
@@ -28041,9 +31178,11 @@
</description>
</method>
<method name="add_user_signal">
+ <return type="void">
+ </return>
<argument index="0" name="signal" type="String">
</argument>
- <argument index="1" name="arguments" type="Array" default="[]">
+ <argument index="1" name="arguments" type="Array" default="null">
</argument>
<description>
Add a user signal (can be added anytime). Arguments are optional, but can be added as an array of dictionaries, each containing "name" and "type" (from [@Global Scope] TYPE_*).
@@ -28058,6 +31197,8 @@
</description>
</method>
<method name="call_deferred" qualifiers="vararg">
+ <return type="Variant">
+ </return>
<argument index="0" name="method" type="String">
</argument>
<description>
@@ -28089,15 +31230,17 @@
</argument>
<argument index="2" name="method" type="String">
</argument>
- <argument index="3" name="binds" type="Array" default="[]">
+ <argument index="3" name="binds" type="Array" default="null">
</argument>
- <argument index="4" name="flags" type="int" default="0">
+ <argument index="4" name="flags" type="int" default="null">
</argument>
<description>
Connect a signal to a method at a target (member function). Binds are optional and are passed as extra arguments to the call. Flags specify optional deferred or one shot connections, see enum CONNECT_*. A signal can only be connected once to a method, and it will throw an error if already connected. If you want to avoid this, use [method is_connected] to check.
</description>
</method>
<method name="disconnect">
+ <return type="void">
+ </return>
<argument index="0" name="signal" type="String">
</argument>
<argument index="1" name="target" type="Object">
@@ -28109,12 +31252,16 @@
</description>
</method>
<method name="emit_signal" qualifiers="vararg">
+ <return type="Variant">
+ </return>
<argument index="0" name="signal" type="String">
</argument>
<description>
</description>
</method>
<method name="free">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -28182,7 +31329,7 @@
</description>
</method>
<method name="get_script" qualifiers="const">
- <return type="Script">
+ <return type="Reference">
</return>
<description>
Return the object script (or null if it doesn't have one).
@@ -28264,19 +31411,25 @@
</description>
</method>
<method name="notification">
+ <return type="void">
+ </return>
<argument index="0" name="what" type="int">
</argument>
- <argument index="1" name="reversed" type="bool" default="false">
+ <argument index="1" name="reversed" type="bool" default="null">
</argument>
<description>
Notify the object of something.
</description>
</method>
<method name="property_list_changed_notify">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="set">
+ <return type="void">
+ </return>
<argument index="0" name="property" type="String">
</argument>
<argument index="1" name="value" type="Variant">
@@ -28286,6 +31439,8 @@
</description>
</method>
<method name="set_block_signals">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -28293,6 +31448,8 @@
</description>
</method>
<method name="set_message_translation">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -28300,6 +31457,8 @@
</description>
</method>
<method name="set_meta">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="value" type="Variant">
@@ -28309,7 +31468,9 @@
</description>
</method>
<method name="set_script">
- <argument index="0" name="script" type="Script">
+ <return type="void">
+ </return>
+ <argument index="0" name="script" type="Reference">
</argument>
<description>
Set a script into the object, scripts extend the object functionality.
@@ -28332,10 +31493,10 @@
</signal>
</signals>
<constants>
- <constant name="NOTIFICATION_POSTINITIALIZE" value="0">
+ <constant name="NOTIFICATION_POSTINITIALIZE" value="0" enum="">
Called right when the object is initialized. Not available in script.
</constant>
- <constant name="NOTIFICATION_PREDELETE" value="1">
+ <constant name="NOTIFICATION_PREDELETE" value="1" enum="">
Called before the object is about to be deleted.
</constant>
<constant name="CONNECT_DEFERRED" value="1">
@@ -28374,18 +31535,24 @@
</description>
</method>
<method name="set_closed">
+ <return type="void">
+ </return>
<argument index="0" name="closed" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_cull_mode">
- <argument index="0" name="cull_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="cull_mode" type="int" enum="OccluderPolygon2D.CullMode">
</argument>
<description>
</description>
</method>
<method name="set_polygon">
+ <return type="void">
+ </return>
<argument index="0" name="polygon" type="PoolVector2Array">
</argument>
<description>
@@ -28395,7 +31562,7 @@
<members>
<member name="closed" type="bool" setter="set_closed" getter="is_closed" brief="">
</member>
- <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" brief="">
+ <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" brief="" enum="OccluderPolygon2D.CullMode">
</member>
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" brief="">
</member>
@@ -28430,13 +31597,17 @@
</description>
</method>
<method name="set_shadow_detail">
- <argument index="0" name="detail" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="detail" type="int" enum="OmniLight.ShadowDetail">
</argument>
<description>
</description>
</method>
<method name="set_shadow_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="OmniLight.ShadowMode">
</argument>
<description>
</description>
@@ -28447,9 +31618,9 @@
</member>
<member name="omni_range" type="float" setter="set_param" getter="get_param" brief="">
</member>
- <member name="omni_shadow_detail" type="int" setter="set_shadow_detail" getter="get_shadow_detail" brief="">
+ <member name="omni_shadow_detail" type="int" setter="set_shadow_detail" getter="get_shadow_detail" brief="" enum="OmniLight.ShadowDetail">
</member>
- <member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" brief="">
+ <member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" brief="" enum="OmniLight.ShadowMode">
</member>
</members>
<constants>
@@ -28464,6 +31635,8 @@
</description>
<methods>
<method name="add_icon_item">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<argument index="1" name="label" type="String">
@@ -28475,31 +31648,28 @@
</description>
</method>
<method name="add_item">
+ <return type="void">
+ </return>
<argument index="0" name="label" type="String">
</argument>
- <argument index="1" name="id" type="int" default="-1">
+ <argument index="1" name="id" type="int" default="null">
</argument>
<description>
Add an item, with text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end.
</description>
</method>
<method name="add_separator">
+ <return type="void">
+ </return>
<description>
Add a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end.
</description>
</method>
<method name="clear">
- <description>
- Clear all the items in the [OptionButton].
- </description>
- </method>
- <method name="get_item_id" qualifiers="const">
- <return type="int">
+ <return type="void">
</return>
- <argument index="0" name="idx" type="int">
- </argument>
<description>
- Return the ID of the item at index "idx".
+ Clear all the items in the [OptionButton].
</description>
</method>
<method name="get_item_count" qualifiers="const">
@@ -28518,6 +31688,15 @@
Return the icon of the item at index "idx".
</description>
</method>
+ <method name="get_item_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the ID of the item at index "idx".
+ </description>
+ </method>
<method name="get_item_metadata" qualifiers="const">
<return type="Variant">
</return>
@@ -28563,45 +31742,57 @@
</description>
</method>
<method name="remove_item">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
</description>
</method>
<method name="select">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
Select an item by index and make it the current item.
</description>
</method>
- <method name="set_item_id">
+ <method name="set_item_disabled">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="id" type="int">
+ <argument index="1" name="disabled" type="bool">
</argument>
<description>
- Set the ID of an item at index "idx".
</description>
</method>
- <method name="set_item_disabled">
+ <method name="set_item_icon">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="disabled" type="bool">
+ <argument index="1" name="texture" type="Texture">
</argument>
<description>
+ Set the icon of an item at index "idx".
</description>
</method>
- <method name="set_item_icon">
+ <method name="set_item_id">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="texture" type="Texture">
+ <argument index="1" name="id" type="int">
</argument>
<description>
- Set the icon of an item at index "idx".
+ Set the ID of an item at index "idx".
</description>
</method>
<method name="set_item_metadata">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="metadata" type="Variant">
@@ -28610,6 +31801,8 @@
</description>
</method>
<method name="set_item_text">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="text" type="String">
@@ -28712,6 +31905,8 @@
</description>
<methods>
<method name="generate">
+ <return type="void">
+ </return>
<argument index="0" name="from" type="Translation">
</argument>
<description>
@@ -28728,7 +31923,7 @@
</description>
<methods>
<method name="pack">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="value" type="Variant">
</argument>
@@ -28787,7 +31982,7 @@
<method name="instance" qualifiers="const">
<return type="Node">
</return>
- <argument index="0" name="edit_state" type="int" default="0">
+ <argument index="0" name="edit_state" type="int" enum="PackedScene.GenEditState" default="0">
</argument>
<description>
</description>
@@ -28838,7 +32033,7 @@
</description>
</method>
<method name="get_packet_error" qualifiers="const">
- <return type="Error">
+ <return type="int">
</return>
<description>
Return the error state of the last packet received (via [method get_packet] and [method get_var]).
@@ -28851,8 +32046,14 @@
Get a Variant.
</description>
</method>
+ <method name="is_object_decoding_allowed" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="put_packet">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="buffer" type="PoolByteArray">
</argument>
@@ -28869,6 +32070,14 @@
Send a Variant as a packet.
</description>
</method>
+ <method name="set_allow_object_decoding">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
</methods>
<constants>
</constants>
@@ -28881,11 +32090,41 @@
PacketStreamPeer provides a wrapper for working using packets over a stream. This allows for using packet based code with StreamPeers. PacketPeerStream implements a custom protocol over the StreamPeer, so the user should not read or write to the wrapped StreamPeer directly.
</description>
<methods>
+ <method name="get_input_buffer_max_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_output_buffer_max_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_input_buffer_max_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="max_size_bytes" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_output_buffer_max_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="max_size_bytes" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_stream_peer">
- <argument index="0" name="peer" type="StreamPeer">
+ <return type="void">
+ </return>
+ <argument index="0" name="peer" type="Reference">
</argument>
<description>
- Set the StreamPeer object to be wrapped
+ Set the [StreamPeer] object to be wrapped.
</description>
</method>
</methods>
@@ -28901,6 +32140,8 @@
</description>
<methods>
<method name="close">
+ <return type="void">
+ </return>
<description>
Close the UDP socket the [PacketPeerUDP] is currently listening on.
</description>
@@ -28927,13 +32168,13 @@
</description>
</method>
<method name="listen">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="port" type="int">
</argument>
<argument index="1" name="bind_address" type="String" default="&quot;*&quot;">
</argument>
- <argument index="2" name="recv_buf_size" type="int" default="65536">
+ <argument index="2" name="recv_buf_size" type="int" default="null">
</argument>
<description>
Make this [PacketPeerUDP] listen on the "port" binding to "bind_address" with a buffer size "recv_buf_size".
@@ -28954,7 +32195,7 @@
</description>
</method>
<method name="wait">
- <return type="Error">
+ <return type="int">
</return>
<description>
Wait for a packet to arrive on the listening port, see [method listen].
@@ -29013,6 +32254,8 @@
</description>
</method>
<method name="set_panorama">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
@@ -29076,6 +32319,8 @@
</description>
</method>
<method name="set_ignore_camera_zoom">
+ <return type="void">
+ </return>
<argument index="0" name="ignore" type="bool">
</argument>
<description>
@@ -29083,6 +32328,8 @@
</description>
</method>
<method name="set_limit_begin">
+ <return type="void">
+ </return>
<argument index="0" name="ofs" type="Vector2">
</argument>
<description>
@@ -29090,6 +32337,8 @@
</description>
</method>
<method name="set_limit_end">
+ <return type="void">
+ </return>
<argument index="0" name="ofs" type="Vector2">
</argument>
<description>
@@ -29097,6 +32346,8 @@
</description>
</method>
<method name="set_scroll_base_offset">
+ <return type="void">
+ </return>
<argument index="0" name="ofs" type="Vector2">
</argument>
<description>
@@ -29104,6 +32355,8 @@
</description>
</method>
<method name="set_scroll_base_scale">
+ <return type="void">
+ </return>
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
@@ -29111,6 +32364,8 @@
</description>
</method>
<method name="set_scroll_offset">
+ <return type="void">
+ </return>
<argument index="0" name="ofs" type="Vector2">
</argument>
<description>
@@ -29163,6 +32418,8 @@
</description>
</method>
<method name="set_mirroring">
+ <return type="void">
+ </return>
<argument index="0" name="mirror" type="Vector2">
</argument>
<description>
@@ -29170,12 +32427,16 @@
</description>
</method>
<method name="set_motion_offset">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_motion_scale">
+ <return type="void">
+ </return>
<argument index="0" name="scale" type="Vector2">
</argument>
<description>
@@ -29305,22 +32566,30 @@
</description>
</method>
<method name="restart">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="set_amount">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="int">
</argument>
<description>
</description>
</method>
<method name="set_draw_order">
- <argument index="0" name="order" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="order" type="int" enum="Particles.DrawOrder">
</argument>
<description>
</description>
</method>
<method name="set_draw_pass_mesh">
+ <return type="void">
+ </return>
<argument index="0" name="pass" type="int">
</argument>
<argument index="1" name="mesh" type="Mesh">
@@ -29329,78 +32598,104 @@
</description>
</method>
<method name="set_draw_passes">
+ <return type="void">
+ </return>
<argument index="0" name="passes" type="int">
</argument>
<description>
</description>
</method>
<method name="set_emitting">
+ <return type="void">
+ </return>
<argument index="0" name="emitting" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_explosiveness_ratio">
+ <return type="void">
+ </return>
<argument index="0" name="ratio" type="float">
</argument>
<description>
</description>
</method>
<method name="set_fixed_fps">
+ <return type="void">
+ </return>
<argument index="0" name="fps" type="int">
</argument>
<description>
</description>
</method>
<method name="set_fractional_delta">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_lifetime">
+ <return type="void">
+ </return>
<argument index="0" name="secs" type="float">
</argument>
<description>
</description>
</method>
<method name="set_one_shot">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_pre_process_time">
+ <return type="void">
+ </return>
<argument index="0" name="secs" type="float">
</argument>
<description>
</description>
</method>
<method name="set_process_material">
+ <return type="void">
+ </return>
<argument index="0" name="material" type="Material">
</argument>
<description>
</description>
</method>
<method name="set_randomness_ratio">
+ <return type="void">
+ </return>
<argument index="0" name="ratio" type="float">
</argument>
<description>
</description>
</method>
<method name="set_speed_scale">
+ <return type="void">
+ </return>
<argument index="0" name="scale" type="float">
</argument>
<description>
</description>
</method>
<method name="set_use_local_coordinates">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_visibility_aabb">
+ <return type="void">
+ </return>
<argument index="0" name="aabb" type="Rect3">
</argument>
<description>
@@ -29410,7 +32705,7 @@
<members>
<member name="amount" type="int" setter="set_amount" getter="get_amount" brief="">
</member>
- <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" brief="">
+ <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" brief="" enum="Particles.DrawOrder">
</member>
<member name="draw_pass_1" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh" brief="">
</member>
@@ -29438,7 +32733,7 @@
</member>
<member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" brief="">
</member>
- <member name="process_material" type="ShaderMaterial,ParticlesMaterial" setter="set_process_material" getter="get_process_material" brief="">
+ <member name="process_material" type="Material" setter="set_process_material" getter="get_process_material" brief="">
</member>
<member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" brief="">
</member>
@@ -29454,7 +32749,7 @@
</constant>
<constant name="DRAW_ORDER_VIEW_DEPTH" value="2">
</constant>
- <constant name="MAX_DRAW_PASSES" value="4">
+ <constant name="MAX_DRAW_PASSES" value="4" enum="">
</constant>
</constants>
</class>
@@ -29585,10 +32880,14 @@
</description>
</method>
<method name="restart">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="set_amount">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="int">
</argument>
<description>
@@ -29596,12 +32895,16 @@
</description>
</method>
<method name="set_draw_order">
- <argument index="0" name="order" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="order" type="int" enum="Particles2D.DrawOrder">
</argument>
<description>
</description>
</method>
<method name="set_emitting">
+ <return type="void">
+ </return>
<argument index="0" name="emitting" type="bool">
</argument>
<description>
@@ -29609,30 +32912,40 @@
</description>
</method>
<method name="set_explosiveness_ratio">
+ <return type="void">
+ </return>
<argument index="0" name="ratio" type="float">
</argument>
<description>
</description>
</method>
<method name="set_fixed_fps">
+ <return type="void">
+ </return>
<argument index="0" name="fps" type="int">
</argument>
<description>
</description>
</method>
<method name="set_fractional_delta">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_h_frames">
+ <return type="void">
+ </return>
<argument index="0" name="frames" type="int">
</argument>
<description>
</description>
</method>
<method name="set_lifetime">
+ <return type="void">
+ </return>
<argument index="0" name="secs" type="float">
</argument>
<description>
@@ -29640,60 +32953,80 @@
</description>
</method>
<method name="set_normal_map">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_one_shot">
+ <return type="void">
+ </return>
<argument index="0" name="secs" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_pre_process_time">
+ <return type="void">
+ </return>
<argument index="0" name="secs" type="float">
</argument>
<description>
</description>
</method>
<method name="set_process_material">
+ <return type="void">
+ </return>
<argument index="0" name="material" type="Material">
</argument>
<description>
</description>
</method>
<method name="set_randomness_ratio">
+ <return type="void">
+ </return>
<argument index="0" name="ratio" type="float">
</argument>
<description>
</description>
</method>
<method name="set_speed_scale">
+ <return type="void">
+ </return>
<argument index="0" name="scale" type="float">
</argument>
<description>
</description>
</method>
<method name="set_texture">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_use_local_coordinates">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_v_frames">
+ <return type="void">
+ </return>
<argument index="0" name="frames" type="int">
</argument>
<description>
</description>
</method>
<method name="set_visibility_rect">
+ <return type="void">
+ </return>
<argument index="0" name="aabb" type="Rect2">
</argument>
<description>
@@ -29703,7 +33036,7 @@
<members>
<member name="amount" type="int" setter="set_amount" getter="get_amount" brief="">
</member>
- <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" brief="">
+ <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" brief="" enum="Particles2D.DrawOrder">
</member>
<member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" brief="">
</member>
@@ -29725,7 +33058,7 @@
</member>
<member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" brief="">
</member>
- <member name="process_material" type="ShaderMaterial,ParticlesMaterial" setter="set_process_material" getter="get_process_material" brief="">
+ <member name="process_material" type="Material" setter="set_process_material" getter="get_process_material" brief="">
</member>
<member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" brief="">
</member>
@@ -29735,7 +33068,7 @@
</member>
<member name="v_frames" type="int" setter="set_v_frames" getter="get_v_frames" brief="">
</member>
- <member name="visibility_rect" type="Rect3" setter="set_visibility_rect" getter="get_visibility_rect" brief="">
+ <member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect" brief="">
</member>
</members>
<constants>
@@ -29808,7 +33141,7 @@
<method name="get_flag" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="flag" type="int">
+ <argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags">
</argument>
<description>
</description>
@@ -29828,7 +33161,7 @@
<method name="get_param" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int">
+ <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument>
<description>
</description>
@@ -29836,15 +33169,15 @@
<method name="get_param_randomness" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int">
+ <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument>
<description>
</description>
</method>
<method name="get_param_texture" qualifiers="const">
- <return type="Object">
+ <return type="Texture">
</return>
- <argument index="0" name="param" type="int">
+ <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument>
<description>
</description>
@@ -29874,61 +33207,81 @@
</description>
</method>
<method name="set_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_color_ramp">
+ <return type="void">
+ </return>
<argument index="0" name="ramp" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_emission_box_extents">
+ <return type="void">
+ </return>
<argument index="0" name="extents" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_emission_color_texture">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_emission_normal_texture">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_emission_point_count">
+ <return type="void">
+ </return>
<argument index="0" name="point_count" type="int">
</argument>
<description>
</description>
</method>
<method name="set_emission_point_texture">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_emission_shape">
- <argument index="0" name="shape" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="int" enum="ParticlesMaterial.EmissionShape">
</argument>
<description>
</description>
</method>
<method name="set_emission_sphere_radius">
+ <return type="void">
+ </return>
<argument index="0" name="radius" type="float">
</argument>
<description>
</description>
</method>
<method name="set_flag">
- <argument index="0" name="flag" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="ParticlesMaterial.Flags">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
@@ -29936,19 +33289,25 @@
</description>
</method>
<method name="set_flatness">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_gravity">
+ <return type="void">
+ </return>
<argument index="0" name="accel_vec" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_param">
- <argument index="0" name="param" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument>
<argument index="1" name="value" type="float">
</argument>
@@ -29956,7 +33315,9 @@
</description>
</method>
<method name="set_param_randomness">
- <argument index="0" name="param" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument>
<argument index="1" name="randomness" type="float">
</argument>
@@ -29964,32 +33325,42 @@
</description>
</method>
<method name="set_param_texture">
- <argument index="0" name="param" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter">
</argument>
- <argument index="1" name="texture" type="Object">
+ <argument index="1" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_spread">
+ <return type="void">
+ </return>
<argument index="0" name="degrees" type="float">
</argument>
<description>
</description>
</method>
<method name="set_trail_color_modifier">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="GradientTexture">
</argument>
<description>
</description>
</method>
<method name="set_trail_divisor">
+ <return type="void">
+ </return>
<argument index="0" name="divisor" type="int">
</argument>
<description>
</description>
</method>
<method name="set_trail_size_modifier">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="CurveTexture">
</argument>
<description>
@@ -29999,13 +33370,13 @@
<members>
<member name="angle" type="float" setter="set_param" getter="get_param" brief="">
</member>
- <member name="angle_curve" type="CurveTexture" setter="set_param_texture" getter="get_param_texture" brief="">
+ <member name="angle_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
</member>
<member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
</member>
<member name="angular_velocity" type="float" setter="set_param" getter="get_param" brief="">
</member>
- <member name="angular_velocity_curve" type="CurveTexture" setter="set_param_texture" getter="get_param_texture" brief="">
+ <member name="angular_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
</member>
<member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
</member>
@@ -30013,23 +33384,23 @@
</member>
<member name="anim_offset" type="float" setter="set_param" getter="get_param" brief="">
</member>
- <member name="anim_offset_curve" type="CurveTexture" setter="set_param_texture" getter="get_param_texture" brief="">
+ <member name="anim_offset_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
</member>
<member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
</member>
<member name="anim_speed" type="float" setter="set_param" getter="get_param" brief="">
</member>
- <member name="anim_speed_curve" type="CurveTexture" setter="set_param_texture" getter="get_param_texture" brief="">
+ <member name="anim_speed_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
</member>
<member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
</member>
<member name="color" type="Color" setter="set_color" getter="get_color" brief="">
</member>
- <member name="color_ramp" type="GradientTexture" setter="set_color_ramp" getter="get_color_ramp" brief="">
+ <member name="color_ramp" type="Texture" setter="set_color_ramp" getter="get_color_ramp" brief="">
</member>
<member name="damping" type="float" setter="set_param" getter="get_param" brief="">
</member>
- <member name="damping_curve" type="CurveTexture" setter="set_param_texture" getter="get_param_texture" brief="">
+ <member name="damping_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
</member>
<member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
</member>
@@ -30043,7 +33414,7 @@
</member>
<member name="emission_point_texture" type="Texture" setter="set_emission_point_texture" getter="get_emission_point_texture" brief="">
</member>
- <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" brief="">
+ <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" brief="" enum="ParticlesMaterial.EmissionShape">
</member>
<member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius" brief="">
</member>
@@ -30059,7 +33430,7 @@
</member>
<member name="hue_variation" type="float" setter="set_param" getter="get_param" brief="">
</member>
- <member name="hue_variation_curve" type="CurveTexture" setter="set_param_texture" getter="get_param_texture" brief="">
+ <member name="hue_variation_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
</member>
<member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
</member>
@@ -30069,25 +33440,25 @@
</member>
<member name="linear_accel" type="float" setter="set_param" getter="get_param" brief="">
</member>
- <member name="linear_accel_curve" type="CurveTexture" setter="set_param_texture" getter="get_param_texture" brief="">
+ <member name="linear_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
</member>
<member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
</member>
<member name="orbit_velocity" type="float" setter="set_param" getter="get_param" brief="">
</member>
- <member name="orbit_velocity_curve" type="CurveTexture" setter="set_param_texture" getter="get_param_texture" brief="">
+ <member name="orbit_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
</member>
<member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
</member>
<member name="radial_accel" type="float" setter="set_param" getter="get_param" brief="">
</member>
- <member name="radial_accel_curve" type="CurveTexture" setter="set_param_texture" getter="get_param_texture" brief="">
+ <member name="radial_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
</member>
<member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
</member>
<member name="scale" type="float" setter="set_param" getter="get_param" brief="">
</member>
- <member name="scale_curve" type="CurveTexture" setter="set_param_texture" getter="get_param_texture" brief="">
+ <member name="scale_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
</member>
<member name="scale_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
</member>
@@ -30095,7 +33466,7 @@
</member>
<member name="tangential_accel" type="float" setter="set_param" getter="get_param" brief="">
</member>
- <member name="tangential_accel_curve" type="CurveTexture" setter="set_param_texture" getter="get_param_texture" brief="">
+ <member name="tangential_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" brief="">
</member>
<member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" brief="">
</member>
@@ -30167,6 +33538,8 @@
</description>
</method>
<method name="set_curve">
+ <return type="void">
+ </return>
<argument index="0" name="curve" type="Curve3D">
</argument>
<description>
@@ -30197,6 +33570,8 @@
</description>
</method>
<method name="set_curve">
+ <return type="void">
+ </return>
<argument index="0" name="curve" type="Curve2D">
</argument>
<description>
@@ -30270,6 +33645,8 @@
</description>
</method>
<method name="set_cubic_interpolation">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -30279,6 +33656,8 @@
</description>
</method>
<method name="set_h_offset">
+ <return type="void">
+ </return>
<argument index="0" name="h_offset" type="float">
</argument>
<description>
@@ -30287,6 +33666,8 @@
</description>
</method>
<method name="set_loop">
+ <return type="void">
+ </return>
<argument index="0" name="loop" type="bool">
</argument>
<description>
@@ -30294,6 +33675,8 @@
</description>
</method>
<method name="set_offset">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="float">
</argument>
<description>
@@ -30301,13 +33684,17 @@
</description>
</method>
<method name="set_rotation_mode">
- <argument index="0" name="rotation_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="rotation_mode" type="int" enum="PathFollow.RotationMode">
</argument>
<description>
Allows or forbids rotation on one or more axes, per the constants below.
</description>
</method>
<method name="set_unit_offset">
+ <return type="void">
+ </return>
<argument index="0" name="unit_offset" type="float">
</argument>
<description>
@@ -30315,6 +33702,8 @@
</description>
</method>
<method name="set_v_offset">
+ <return type="void">
+ </return>
<argument index="0" name="v_offset" type="float">
</argument>
<description>
@@ -30396,6 +33785,8 @@
</description>
</method>
<method name="set_cubic_interpolation">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -30405,6 +33796,8 @@
</description>
</method>
<method name="set_h_offset">
+ <return type="void">
+ </return>
<argument index="0" name="h_offset" type="float">
</argument>
<description>
@@ -30413,6 +33806,8 @@
</description>
</method>
<method name="set_loop">
+ <return type="void">
+ </return>
<argument index="0" name="loop" type="bool">
</argument>
<description>
@@ -30420,6 +33815,8 @@
</description>
</method>
<method name="set_offset">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="float">
</argument>
<description>
@@ -30427,6 +33824,8 @@
</description>
</method>
<method name="set_rotate">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -30434,6 +33833,8 @@
</description>
</method>
<method name="set_unit_offset">
+ <return type="void">
+ </return>
<argument index="0" name="unit_offset" type="float">
</argument>
<description>
@@ -30441,6 +33842,8 @@
</description>
</method>
<method name="set_v_offset">
+ <return type="void">
+ </return>
<argument index="0" name="v_offset" type="float">
</argument>
<description>
@@ -30460,7 +33863,7 @@
<method name="get_monitor" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="monitor" type="int">
+ <argument index="0" name="monitor" type="int" enum="Performance.Monitor">
</argument>
<description>
</description>
@@ -30701,6 +34104,8 @@
</description>
</method>
<method name="integrate_forces">
+ <return type="void">
+ </return>
<description>
Call the built-in force integration code.
</description>
@@ -30713,6 +34118,8 @@
</description>
</method>
<method name="set_angular_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="velocity" type="float">
</argument>
<description>
@@ -30720,6 +34127,8 @@
</description>
</method>
<method name="set_linear_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="velocity" type="Vector2">
</argument>
<description>
@@ -30727,6 +34136,8 @@
</description>
</method>
<method name="set_sleep_state">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -30734,6 +34145,8 @@
</description>
</method>
<method name="set_transform">
+ <return type="void">
+ </return>
<argument index="0" name="transform" type="Transform2D">
</argument>
<description>
@@ -30779,7 +34192,7 @@
</return>
<argument index="0" name="shape" type="Physics2DShapeQueryParameters">
</argument>
- <argument index="1" name="max_results" type="int" default="32">
+ <argument index="1" name="max_results" type="int" default="null">
</argument>
<description>
Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time.
@@ -30808,13 +34221,13 @@
</return>
<argument index="0" name="point" type="Vector2">
</argument>
- <argument index="1" name="max_results" type="int" default="32">
+ <argument index="1" name="max_results" type="int" default="2147483647">
</argument>
- <argument index="2" name="exclude" type="Array" default="[]">
+ <argument index="2" name="exclude" type="Array" default="[ ]">
</argument>
- <argument index="3" name="collision_layer" type="int" default="2147483647">
+ <argument index="3" name="collision_layer" type="int" default="32">
</argument>
- <argument index="4" name="type_mask" type="int" default="15">
+ <argument index="4" name="type_mask" type="int" default="null">
</argument>
<description>
Check whether a point is inside any shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields:
@@ -30833,11 +34246,11 @@
</argument>
<argument index="1" name="to" type="Vector2">
</argument>
- <argument index="2" name="exclude" type="Array" default="[]">
+ <argument index="2" name="exclude" type="Array" default="[ ]">
</argument>
- <argument index="3" name="collision_layer" type="int" default="2147483647">
+ <argument index="3" name="collision_layer" type="int" default="null">
</argument>
- <argument index="4" name="type_mask" type="int" default="15">
+ <argument index="4" name="type_mask" type="int" default="null">
</argument>
<description>
Intersect a ray in a given space. The returned object is a dictionary with the following fields:
@@ -30857,7 +34270,7 @@
</return>
<argument index="0" name="shape" type="Physics2DShapeQueryParameters">
</argument>
- <argument index="1" name="max_results" type="int" default="32">
+ <argument index="1" name="max_results" type="int" default="null">
</argument>
<description>
Check the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields:
@@ -30900,17 +34313,21 @@
</description>
<methods>
<method name="area_add_shape">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="shape" type="RID">
</argument>
- <argument index="2" name="transform" type="Transform2D" default="((1, 0), (0, 1), (0, 0))">
+ <argument index="2" name="transform" type="Transform2D" default="null">
</argument>
<description>
Add a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
</description>
</method>
<method name="area_attach_object_instance_id">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="id" type="int">
@@ -30920,6 +34337,8 @@
</description>
</method>
<method name="area_clear_shapes">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<description>
@@ -30943,9 +34362,11 @@
</description>
</method>
<method name="area_get_param" qualifiers="const">
+ <return type="Variant">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="Physics2DServer.AreaParameter">
</argument>
<description>
Return an area parameter value.
@@ -31010,6 +34431,8 @@
</description>
</method>
<method name="area_remove_shape">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -31019,6 +34442,8 @@
</description>
</method>
<method name="area_set_collision_layer">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="layer" type="int">
@@ -31028,6 +34453,8 @@
</description>
</method>
<method name="area_set_collision_mask">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="mask" type="int">
@@ -31037,6 +34464,8 @@
</description>
</method>
<method name="area_set_monitor_callback">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="receiver" type="Object">
@@ -31053,9 +34482,11 @@
</description>
</method>
<method name="area_set_param">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="Physics2DServer.AreaParameter">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -31064,6 +34495,8 @@
</description>
</method>
<method name="area_set_shape">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -31075,6 +34508,8 @@
</description>
</method>
<method name="area_set_shape_disabled">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -31085,6 +34520,8 @@
</description>
</method>
<method name="area_set_shape_transform">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -31096,6 +34533,8 @@
</description>
</method>
<method name="area_set_space">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="space" type="RID">
@@ -31105,15 +34544,19 @@
</description>
</method>
<method name="area_set_space_override_mode">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
- <argument index="1" name="mode" type="int">
+ <argument index="1" name="mode" type="int" enum="Physics2DServer.AreaSpaceOverrideMode">
</argument>
<description>
Set the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE_*.
</description>
</method>
<method name="area_set_transform">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="transform" type="Transform2D">
@@ -31123,6 +34566,8 @@
</description>
</method>
<method name="body_add_collision_exception">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="excepted_body" type="RID">
@@ -31132,6 +34577,8 @@
</description>
</method>
<method name="body_add_force">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="offset" type="Vector2">
@@ -31143,17 +34590,21 @@
</description>
</method>
<method name="body_add_shape">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="shape" type="RID">
</argument>
- <argument index="2" name="transform" type="Transform2D" default="((1, 0), (0, 1), (0, 0))">
+ <argument index="2" name="transform" type="Transform2D" default="null">
</argument>
<description>
Add a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index.
</description>
</method>
<method name="body_apply_impulse">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="pos" type="Vector2">
@@ -31165,6 +34616,8 @@
</description>
</method>
<method name="body_attach_object_instance_id">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="id" type="int">
@@ -31174,6 +34627,8 @@
</description>
</method>
<method name="body_clear_shapes">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<description>
@@ -31183,9 +34638,9 @@
<method name="body_create">
<return type="RID">
</return>
- <argument index="0" name="mode" type="int" default="2">
+ <argument index="0" name="mode" type="int" enum="Physics2DServer.BodyMode" default="false">
</argument>
- <argument index="1" name="init_sleeping" type="bool" default="false">
+ <argument index="1" name="init_sleeping" type="bool" default="2">
</argument>
<description>
Create a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time.
@@ -31250,7 +34705,7 @@
</return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="Physics2DServer.BodyParameter">
</argument>
<description>
Return the value of a body parameter.
@@ -31277,6 +34732,8 @@
</description>
</method>
<method name="body_get_shape_metadata" qualifiers="const">
+ <return type="Variant">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -31306,9 +34763,11 @@
</description>
</method>
<method name="body_get_state" qualifiers="const">
+ <return type="Variant">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="state" type="int">
+ <argument index="1" name="state" type="int" enum="Physics2DServer.BodyState">
</argument>
<description>
Return a body state.
@@ -31324,6 +34783,8 @@
</description>
</method>
<method name="body_remove_collision_exception">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="excepted_body" type="RID">
@@ -31333,6 +34794,8 @@
</description>
</method>
<method name="body_remove_shape">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -31342,6 +34805,8 @@
</description>
</method>
<method name="body_set_axis_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="axis_velocity" type="Vector2">
@@ -31351,6 +34816,8 @@
</description>
</method>
<method name="body_set_collision_layer">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="layer" type="int">
@@ -31360,6 +34827,8 @@
</description>
</method>
<method name="body_set_collision_mask">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="mask" type="int">
@@ -31369,9 +34838,11 @@
</description>
</method>
<method name="body_set_continuous_collision_detection_mode">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="mode" type="int">
+ <argument index="1" name="mode" type="int" enum="Physics2DServer.CCDMode">
</argument>
<description>
Set the continuous collision detection mode from any of the CCD_MODE_* constants.
@@ -31379,19 +34850,23 @@
</description>
</method>
<method name="body_set_force_integration_callback">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
<argument index="2" name="method" type="String">
</argument>
- <argument index="3" name="userdata" type="Variant" default="NULL">
+ <argument index="3" name="userdata" type="Variant" default="null">
</argument>
<description>
Set the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force integration]).
</description>
</method>
<method name="body_set_max_contacts_reported">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="amount" type="int">
@@ -31401,15 +34876,19 @@
</description>
</method>
<method name="body_set_mode">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="mode" type="int">
+ <argument index="1" name="mode" type="int" enum="Physics2DServer.BodyMode">
</argument>
<description>
Set the body mode, from one of the constants BODY_MODE*.
</description>
</method>
<method name="body_set_omit_force_integration">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="enable" type="bool">
@@ -31419,9 +34898,11 @@
</description>
</method>
<method name="body_set_param">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="Physics2DServer.BodyParameter">
</argument>
<argument index="2" name="value" type="float">
</argument>
@@ -31430,6 +34911,8 @@
</description>
</method>
<method name="body_set_shape">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -31441,6 +34924,8 @@
</description>
</method>
<method name="body_set_shape_as_one_way_collision">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -31451,6 +34936,8 @@
</description>
</method>
<method name="body_set_shape_disabled">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -31461,6 +34948,8 @@
</description>
</method>
<method name="body_set_shape_metadata">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -31472,6 +34961,8 @@
</description>
</method>
<method name="body_set_shape_transform">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -31483,6 +34974,8 @@
</description>
</method>
<method name="body_set_space">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="space" type="RID">
@@ -31492,9 +34985,11 @@
</description>
</method>
<method name="body_set_state">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="state" type="int">
+ <argument index="1" name="state" type="int" enum="Physics2DServer.BodyState">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -31511,9 +35006,9 @@
</argument>
<argument index="2" name="motion" type="Vector2">
</argument>
- <argument index="3" name="margin" type="float" default="0.08">
+ <argument index="3" name="margin" type="float" default="null">
</argument>
- <argument index="4" name="result" type="Physics2DTestMotionResult" default="NULL">
+ <argument index="4" name="result" type="Physics2DTestMotionResult" default="null">
</argument>
<description>
Return whether a body can move from a given point in a given direction. Apart from the boolean return value, a [Physics2DTestMotionResult] can be passed to return additional information in.
@@ -31528,7 +35023,7 @@
</argument>
<argument index="2" name="body_a" type="RID">
</argument>
- <argument index="3" name="body_b" type="RID" default="[RID]">
+ <argument index="3" name="body_b" type="RID" default="null">
</argument>
<description>
Create a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself.
@@ -31539,16 +35034,18 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="Physics2DServer.DampedStringParam">
</argument>
<description>
Return the value of a damped spring joint parameter.
</description>
</method>
<method name="damped_string_joint_set_param">
+ <return type="void">
+ </return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="Physics2DServer.DampedStringParam">
</argument>
<argument index="2" name="value" type="float">
</argument>
@@ -31557,6 +35054,8 @@
</description>
</method>
<method name="free_rid">
+ <return type="void">
+ </return>
<argument index="0" name="rid" type="RID">
</argument>
<description>
@@ -31566,7 +35065,7 @@
<method name="get_process_info">
<return type="int">
</return>
- <argument index="0" name="process_info" type="int">
+ <argument index="0" name="process_info" type="int" enum="Physics2DServer.ProcessInfo">
</argument>
<description>
Return information about the current state of the 2D physics engine. The states are listed under the INFO_* constants.
@@ -31581,9 +35080,9 @@
</argument>
<argument index="2" name="anchor_b" type="Vector2">
</argument>
- <argument index="3" name="body_a" type="RID" default="[RID]">
+ <argument index="3" name="body_a" type="RID" default="null">
</argument>
- <argument index="4" name="body_b" type="RID" default="[RID]">
+ <argument index="4" name="body_b" type="RID" default="null">
</argument>
<description>
Create a groove joint between two bodies. If not specified, the bodyies are assumed to be the joint itself.
@@ -31594,7 +35093,7 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="Physics2DServer.JointParam">
</argument>
<description>
Return the value of a joint parameter.
@@ -31610,9 +35109,11 @@
</description>
</method>
<method name="joint_set_param">
+ <return type="void">
+ </return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="Physics2DServer.JointParam">
</argument>
<argument index="2" name="value" type="float">
</argument>
@@ -31627,13 +35128,15 @@
</argument>
<argument index="1" name="body_a" type="RID">
</argument>
- <argument index="2" name="body_b" type="RID" default="[RID]">
+ <argument index="2" name="body_b" type="RID" default="null">
</argument>
<description>
Create a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself.
</description>
</method>
<method name="set_active">
+ <return type="void">
+ </return>
<argument index="0" name="active" type="bool">
</argument>
<description>
@@ -31643,13 +35146,15 @@
<method name="shape_create">
<return type="RID">
</return>
- <argument index="0" name="type" type="int">
+ <argument index="0" name="type" type="int" enum="Physics2DServer.ShapeType">
</argument>
<description>
Create a shape of type SHAPE_*. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape].
</description>
</method>
<method name="shape_get_data" qualifiers="const">
+ <return type="Variant">
+ </return>
<argument index="0" name="shape" type="RID">
</argument>
<description>
@@ -31666,6 +35171,8 @@
</description>
</method>
<method name="shape_set_data">
+ <return type="void">
+ </return>
<argument index="0" name="shape" type="RID">
</argument>
<argument index="1" name="data" type="Variant">
@@ -31695,7 +35202,7 @@
</return>
<argument index="0" name="space" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="Physics2DServer.SpaceParameter">
</argument>
<description>
Return the value of a space parameter.
@@ -31711,6 +35218,8 @@
</description>
</method>
<method name="space_set_active">
+ <return type="void">
+ </return>
<argument index="0" name="space" type="RID">
</argument>
<argument index="1" name="active" type="bool">
@@ -31720,9 +35229,11 @@
</description>
</method>
<method name="space_set_param">
+ <return type="void">
+ </return>
<argument index="0" name="space" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="Physics2DServer.SpaceParameter">
</argument>
<argument index="2" name="value" type="float">
</argument>
@@ -31979,6 +35490,8 @@
</description>
</method>
<method name="set_collision_layer">
+ <return type="void">
+ </return>
<argument index="0" name="collision_layer" type="int">
</argument>
<description>
@@ -31986,6 +35499,8 @@
</description>
</method>
<method name="set_exclude">
+ <return type="void">
+ </return>
<argument index="0" name="exclude" type="Array">
</argument>
<description>
@@ -31993,6 +35508,8 @@
</description>
</method>
<method name="set_margin">
+ <return type="void">
+ </return>
<argument index="0" name="margin" type="float">
</argument>
<description>
@@ -32000,6 +35517,8 @@
</description>
</method>
<method name="set_motion">
+ <return type="void">
+ </return>
<argument index="0" name="motion" type="Vector2">
</argument>
<description>
@@ -32007,6 +35526,8 @@
</description>
</method>
<method name="set_object_type_mask">
+ <return type="void">
+ </return>
<argument index="0" name="object_type_mask" type="int">
</argument>
<description>
@@ -32014,13 +35535,17 @@
</description>
</method>
<method name="set_shape">
- <argument index="0" name="shape" type="Shape2D">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="Resource">
</argument>
<description>
Set the [Shape2D] that will be used for collision/intersection queries.
</description>
</method>
<method name="set_shape_rid">
+ <return type="void">
+ </return>
<argument index="0" name="shape" type="RID">
</argument>
<description>
@@ -32028,6 +35553,8 @@
</description>
</method>
<method name="set_transform">
+ <return type="void">
+ </return>
<argument index="0" name="transform" type="Transform2D">
</argument>
<description>
@@ -32159,9 +35686,12 @@
</description>
<methods>
<method name="add_collision_exception_with">
- <argument index="0" name="body" type="PhysicsBody">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="Node">
</argument>
<description>
+ Adds a body to the collision exception list. This list contains bodies that this body will not collide with.
</description>
</method>
<method name="get_collision_layer" qualifiers="const">
@@ -32193,18 +35723,25 @@
</description>
</method>
<method name="remove_collision_exception_with">
- <argument index="0" name="body" type="PhysicsBody">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="Node">
</argument>
<description>
+ Removes a body from the collision exception list.
</description>
</method>
<method name="set_collision_layer">
+ <return type="void">
+ </return>
<argument index="0" name="layer" type="int">
</argument>
<description>
</description>
</method>
<method name="set_collision_layer_bit">
+ <return type="void">
+ </return>
<argument index="0" name="bit" type="int">
</argument>
<argument index="1" name="value" type="bool">
@@ -32213,12 +35750,16 @@
</description>
</method>
<method name="set_collision_mask">
+ <return type="void">
+ </return>
<argument index="0" name="mask" type="int">
</argument>
<description>
</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">
@@ -32245,10 +35786,11 @@
</description>
<methods>
<method name="add_collision_exception_with">
- <argument index="0" name="body" type="PhysicsBody2D">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="Node">
</argument>
<description>
- Adds a body to the collision exception list. This list contains bodies that this body will not collide with.
</description>
</method>
<method name="get_collision_layer" qualifiers="const">
@@ -32284,13 +35826,16 @@
</description>
</method>
<method name="remove_collision_exception_with">
- <argument index="0" name="body" type="PhysicsBody2D">
+ <return type="void">
+ </return>
+ <argument index="0" name="body" type="Node">
</argument>
<description>
- Removes a body from the collision exception list.
</description>
</method>
<method name="set_collision_layer">
+ <return type="void">
+ </return>
<argument index="0" name="layer" type="int">
</argument>
<description>
@@ -32300,6 +35845,8 @@
</description>
</method>
<method name="set_collision_layer_bit">
+ <return type="void">
+ </return>
<argument index="0" name="bit" type="int">
</argument>
<argument index="1" name="value" type="bool">
@@ -32309,6 +35856,8 @@
</description>
</method>
<method name="set_collision_mask">
+ <return type="void">
+ </return>
<argument index="0" name="mask" type="int">
</argument>
<description>
@@ -32316,6 +35865,8 @@
</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">
@@ -32343,6 +35894,8 @@
</description>
<methods>
<method name="add_force">
+ <return type="void">
+ </return>
<argument index="0" name="force" type="Vector3">
</argument>
<argument index="1" name="pos" type="Vector3">
@@ -32351,6 +35904,8 @@
</description>
</method>
<method name="apply_impulse">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector3">
</argument>
<argument index="1" name="j" type="Vector3">
@@ -32359,6 +35914,8 @@
</description>
</method>
<method name="apply_torqe_impulse">
+ <return type="void">
+ </return>
<argument index="0" name="j" type="Vector3">
</argument>
<description>
@@ -32472,7 +36029,7 @@
<description>
</description>
</method>
- <method name="get_principal_inetria_axes" qualifiers="const">
+ <method name="get_principal_inertia_axes" qualifiers="const">
<return type="Basis">
</return>
<description>
@@ -32515,6 +36072,8 @@
</description>
</method>
<method name="integrate_forces">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -32525,24 +36084,32 @@
</description>
</method>
<method name="set_angular_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="velocity" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_linear_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="velocity" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_sleep_state">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_transform">
+ <return type="void">
+ </return>
<argument index="0" name="transform" type="Transform">
</argument>
<description>
@@ -32583,7 +36150,7 @@
</return>
<argument index="0" name="shape" type="PhysicsShapeQueryParameters">
</argument>
- <argument index="1" name="max_results" type="int" default="32">
+ <argument index="1" name="max_results" type="int" default="null">
</argument>
<description>
</description>
@@ -32603,11 +36170,11 @@
</argument>
<argument index="1" name="to" type="Vector3">
</argument>
- <argument index="2" name="exclude" type="Array" default="[]">
+ <argument index="2" name="exclude" type="Array" default="[ ]">
</argument>
- <argument index="3" name="collision_layer" type="int" default="2147483647">
+ <argument index="3" name="collision_layer" type="int" default="null">
</argument>
- <argument index="4" name="type_mask" type="int" default="15">
+ <argument index="4" name="type_mask" type="int" default="null">
</argument>
<description>
</description>
@@ -32617,7 +36184,7 @@
</return>
<argument index="0" name="shape" type="PhysicsShapeQueryParameters">
</argument>
- <argument index="1" name="max_results" type="int" default="32">
+ <argument index="1" name="max_results" type="int" default="null">
</argument>
<description>
</description>
@@ -32645,16 +36212,20 @@
</description>
<methods>
<method name="area_add_shape">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="shape" type="RID">
</argument>
- <argument index="2" name="transform" type="Transform" default="Transform()">
+ <argument index="2" name="transform" type="Transform" default="null">
</argument>
<description>
</description>
</method>
<method name="area_attach_object_instance_id">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="id" type="int">
@@ -32663,6 +36234,8 @@
</description>
</method>
<method name="area_clear_shapes">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<description>
@@ -32683,9 +36256,11 @@
</description>
</method>
<method name="area_get_param" qualifiers="const">
+ <return type="Variant">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="PhysicsServer.AreaParameter">
</argument>
<description>
</description>
@@ -32751,6 +36326,8 @@
</description>
</method>
<method name="area_remove_shape">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -32759,6 +36336,8 @@
</description>
</method>
<method name="area_set_collision_layer">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="layer" type="int">
@@ -32767,6 +36346,8 @@
</description>
</method>
<method name="area_set_collision_mask">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="mask" type="int">
@@ -32775,6 +36356,8 @@
</description>
</method>
<method name="area_set_monitor_callback">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="receiver" type="Object">
@@ -32785,9 +36368,11 @@
</description>
</method>
<method name="area_set_param">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="PhysicsServer.AreaParameter">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -32795,6 +36380,8 @@
</description>
</method>
<method name="area_set_ray_pickable">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="enable" type="bool">
@@ -32803,6 +36390,8 @@
</description>
</method>
<method name="area_set_shape">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -32813,6 +36402,8 @@
</description>
</method>
<method name="area_set_shape_transform">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -32823,6 +36414,8 @@
</description>
</method>
<method name="area_set_space">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="space" type="RID">
@@ -32831,14 +36424,18 @@
</description>
</method>
<method name="area_set_space_override_mode">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
- <argument index="1" name="mode" type="int">
+ <argument index="1" name="mode" type="int" enum="PhysicsServer.AreaSpaceOverrideMode">
</argument>
<description>
</description>
</method>
<method name="area_set_transform">
+ <return type="void">
+ </return>
<argument index="0" name="area" type="RID">
</argument>
<argument index="1" name="transform" type="Transform">
@@ -32847,6 +36444,8 @@
</description>
</method>
<method name="body_add_collision_exception">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="excepted_body" type="RID">
@@ -32855,16 +36454,20 @@
</description>
</method>
<method name="body_add_shape">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="shape" type="RID">
</argument>
- <argument index="2" name="transform" type="Transform" default="Transform()">
+ <argument index="2" name="transform" type="Transform" default="null">
</argument>
<description>
</description>
</method>
<method name="body_apply_impulse">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="pos" type="Vector3">
@@ -32875,6 +36478,8 @@
</description>
</method>
<method name="body_apply_torque_impulse">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="impulse" type="Vector3">
@@ -32883,6 +36488,8 @@
</description>
</method>
<method name="body_attach_object_instance_id">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="id" type="int">
@@ -32891,6 +36498,8 @@
</description>
</method>
<method name="body_clear_shapes">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<description>
@@ -32899,9 +36508,9 @@
<method name="body_create">
<return type="RID">
</return>
- <argument index="0" name="mode" type="int" default="2">
+ <argument index="0" name="mode" type="int" enum="PhysicsServer.BodyMode" default="false">
</argument>
- <argument index="1" name="init_sleeping" type="bool" default="false">
+ <argument index="1" name="init_sleeping" type="bool" default="2">
</argument>
<description>
</description>
@@ -32959,7 +36568,7 @@
</return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="PhysicsServer.BodyParameter">
</argument>
<description>
</description>
@@ -33001,9 +36610,11 @@
</description>
</method>
<method name="body_get_state" qualifiers="const">
+ <return type="Variant">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="state" type="int">
+ <argument index="1" name="state" type="int" enum="PhysicsServer.BodyState">
</argument>
<description>
</description>
@@ -33033,6 +36644,8 @@
</description>
</method>
<method name="body_remove_collision_exception">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="excepted_body" type="RID">
@@ -33041,6 +36654,8 @@
</description>
</method>
<method name="body_remove_shape">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -33049,14 +36664,18 @@
</description>
</method>
<method name="body_set_axis_lock">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="axis" type="int">
+ <argument index="1" name="axis" type="int" enum="PhysicsServer.BodyAxisLock">
</argument>
<description>
</description>
</method>
<method name="body_set_axis_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="axis_velocity" type="Vector3">
@@ -33065,6 +36684,8 @@
</description>
</method>
<method name="body_set_collision_layer">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="layer" type="int">
@@ -33073,6 +36694,8 @@
</description>
</method>
<method name="body_set_collision_mask">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="mask" type="int">
@@ -33081,6 +36704,8 @@
</description>
</method>
<method name="body_set_enable_continuous_collision_detection">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="enable" type="bool">
@@ -33089,18 +36714,22 @@
</description>
</method>
<method name="body_set_force_integration_callback">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="receiver" type="Object">
</argument>
<argument index="2" name="method" type="String">
</argument>
- <argument index="3" name="userdata" type="Variant" default="NULL">
+ <argument index="3" name="userdata" type="Variant" default="null">
</argument>
<description>
</description>
</method>
<method name="body_set_max_contacts_reported">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="amount" type="int">
@@ -33109,14 +36738,18 @@
</description>
</method>
<method name="body_set_mode">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="mode" type="int">
+ <argument index="1" name="mode" type="int" enum="PhysicsServer.BodyMode">
</argument>
<description>
</description>
</method>
<method name="body_set_omit_force_integration">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="enable" type="bool">
@@ -33125,9 +36758,11 @@
</description>
</method>
<method name="body_set_param">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="PhysicsServer.BodyParameter">
</argument>
<argument index="2" name="value" type="float">
</argument>
@@ -33135,6 +36770,8 @@
</description>
</method>
<method name="body_set_ray_pickable">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="enable" type="bool">
@@ -33143,6 +36780,8 @@
</description>
</method>
<method name="body_set_shape">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -33153,6 +36792,8 @@
</description>
</method>
<method name="body_set_shape_transform">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="shape_idx" type="int">
@@ -33163,6 +36804,8 @@
</description>
</method>
<method name="body_set_space">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
<argument index="1" name="space" type="RID">
@@ -33171,9 +36814,11 @@
</description>
</method>
<method name="body_set_state">
+ <return type="void">
+ </return>
<argument index="0" name="body" type="RID">
</argument>
- <argument index="1" name="state" type="int">
+ <argument index="1" name="state" type="int" enum="PhysicsServer.BodyState">
</argument>
<argument index="2" name="value" type="Variant">
</argument>
@@ -33185,15 +36830,17 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="PhysicsServer.ConeTwistJointParam">
</argument>
<description>
</description>
</method>
<method name="cone_twist_joint_set_param">
+ <return type="void">
+ </return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="PhysicsServer.ConeTwistJointParam">
</argument>
<argument index="2" name="value" type="float">
</argument>
@@ -33201,6 +36848,8 @@
</description>
</method>
<method name="free_rid">
+ <return type="void">
+ </return>
<argument index="0" name="rid" type="RID">
</argument>
<description>
@@ -33211,9 +36860,9 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="axis" type="int">
+ <argument index="1" name="axis" type="int" enum="Vector3.Axis">
</argument>
- <argument index="2" name="flag" type="int">
+ <argument index="2" name="flag" type="int" enum="PhysicsServer.G6DOFJointAxisFlag">
</argument>
<description>
</description>
@@ -33223,19 +36872,21 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="axis" type="int">
+ <argument index="1" name="axis" type="int" enum="Vector3.Axis">
</argument>
- <argument index="2" name="param" type="int">
+ <argument index="2" name="param" type="int" enum="PhysicsServer.G6DOFJointAxisParam">
</argument>
<description>
</description>
</method>
<method name="generic_6dof_joint_set_flag">
+ <return type="void">
+ </return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="axis" type="int">
+ <argument index="1" name="axis" type="int" enum="Vector3.Axis">
</argument>
- <argument index="2" name="flag" type="int">
+ <argument index="2" name="flag" type="int" enum="PhysicsServer.G6DOFJointAxisFlag">
</argument>
<argument index="3" name="enable" type="bool">
</argument>
@@ -33243,11 +36894,13 @@
</description>
</method>
<method name="generic_6dof_joint_set_param">
+ <return type="void">
+ </return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="axis" type="int">
+ <argument index="1" name="axis" type="int" enum="Vector3.Axis">
</argument>
- <argument index="2" name="param" type="int">
+ <argument index="2" name="param" type="int" enum="PhysicsServer.G6DOFJointAxisParam">
</argument>
<argument index="3" name="value" type="float">
</argument>
@@ -33257,7 +36910,7 @@
<method name="get_process_info">
<return type="int">
</return>
- <argument index="0" name="process_info" type="int">
+ <argument index="0" name="process_info" type="int" enum="PhysicsServer.ProcessInfo">
</argument>
<description>
</description>
@@ -33267,7 +36920,7 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="flag" type="int">
+ <argument index="1" name="flag" type="int" enum="PhysicsServer.HingeJointFlag">
</argument>
<description>
</description>
@@ -33277,15 +36930,17 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="PhysicsServer.HingeJointParam">
</argument>
<description>
</description>
</method>
<method name="hinge_joint_set_flag">
+ <return type="void">
+ </return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="flag" type="int">
+ <argument index="1" name="flag" type="int" enum="PhysicsServer.HingeJointFlag">
</argument>
<argument index="2" name="enabled" type="bool">
</argument>
@@ -33293,9 +36948,11 @@
</description>
</method>
<method name="hinge_joint_set_param">
+ <return type="void">
+ </return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="PhysicsServer.HingeJointParam">
</argument>
<argument index="2" name="value" type="float">
</argument>
@@ -33389,6 +37046,8 @@
</description>
</method>
<method name="joint_set_solver_priority">
+ <return type="void">
+ </return>
<argument index="0" name="joint" type="RID">
</argument>
<argument index="1" name="priority" type="int">
@@ -33417,12 +37076,14 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="PhysicsServer.PinJointParam">
</argument>
<description>
</description>
</method>
<method name="pin_joint_set_local_a">
+ <return type="void">
+ </return>
<argument index="0" name="joint" type="RID">
</argument>
<argument index="1" name="local_A" type="Vector3">
@@ -33431,6 +37092,8 @@
</description>
</method>
<method name="pin_joint_set_local_b">
+ <return type="void">
+ </return>
<argument index="0" name="joint" type="RID">
</argument>
<argument index="1" name="local_B" type="Vector3">
@@ -33439,9 +37102,11 @@
</description>
</method>
<method name="pin_joint_set_param">
+ <return type="void">
+ </return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="PhysicsServer.PinJointParam">
</argument>
<argument index="2" name="value" type="float">
</argument>
@@ -33449,6 +37114,8 @@
</description>
</method>
<method name="set_active">
+ <return type="void">
+ </return>
<argument index="0" name="active" type="bool">
</argument>
<description>
@@ -33457,12 +37124,14 @@
<method name="shape_create">
<return type="RID">
</return>
- <argument index="0" name="type" type="int">
+ <argument index="0" name="type" type="int" enum="PhysicsServer.ShapeType">
</argument>
<description>
</description>
</method>
<method name="shape_get_data" qualifiers="const">
+ <return type="Variant">
+ </return>
<argument index="0" name="shape" type="RID">
</argument>
<description>
@@ -33477,6 +37146,8 @@
</description>
</method>
<method name="shape_set_data">
+ <return type="void">
+ </return>
<argument index="0" name="shape" type="RID">
</argument>
<argument index="1" name="data" type="Variant">
@@ -33489,15 +37160,17 @@
</return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="PhysicsServer.SliderJointParam">
</argument>
<description>
</description>
</method>
<method name="slider_joint_set_param">
+ <return type="void">
+ </return>
<argument index="0" name="joint" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="PhysicsServer.SliderJointParam">
</argument>
<argument index="2" name="value" type="float">
</argument>
@@ -33523,7 +37196,7 @@
</return>
<argument index="0" name="space" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="PhysicsServer.SpaceParameter">
</argument>
<description>
</description>
@@ -33537,6 +37210,8 @@
</description>
</method>
<method name="space_set_active">
+ <return type="void">
+ </return>
<argument index="0" name="space" type="RID">
</argument>
<argument index="1" name="active" type="bool">
@@ -33545,9 +37220,11 @@
</description>
</method>
<method name="space_set_param">
+ <return type="void">
+ </return>
<argument index="0" name="space" type="RID">
</argument>
- <argument index="1" name="param" type="int">
+ <argument index="1" name="param" type="int" enum="PhysicsServer.SpaceParameter">
</argument>
<argument index="2" name="value" type="float">
</argument>
@@ -33828,42 +37505,56 @@
</description>
</method>
<method name="set_collision_layer">
+ <return type="void">
+ </return>
<argument index="0" name="collision_layer" type="int">
</argument>
<description>
</description>
</method>
<method name="set_exclude">
+ <return type="void">
+ </return>
<argument index="0" name="exclude" type="Array">
</argument>
<description>
</description>
</method>
<method name="set_margin">
+ <return type="void">
+ </return>
<argument index="0" name="margin" type="float">
</argument>
<description>
</description>
</method>
<method name="set_object_type_mask">
+ <return type="void">
+ </return>
<argument index="0" name="object_type_mask" type="int">
</argument>
<description>
</description>
</method>
<method name="set_shape">
- <argument index="0" name="shape" type="Shape">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="Resource">
</argument>
<description>
</description>
</method>
<method name="set_shape_rid">
+ <return type="void">
+ </return>
<argument index="0" name="shape" type="RID">
</argument>
<description>
</description>
</method>
<method name="set_transform">
+ <return type="void">
+ </return>
<argument index="0" name="transform" type="Transform">
</argument>
<description>
@@ -33931,13 +37622,15 @@
<method name="get_param" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int">
+ <argument index="0" name="param" type="int" enum="PinJoint.Param">
</argument>
<description>
</description>
</method>
<method name="set_param">
- <argument index="0" name="param" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="PinJoint.Param">
</argument>
<argument index="1" name="value" type="float">
</argument>
@@ -33977,6 +37670,8 @@
</description>
</method>
<method name="set_softness">
+ <return type="void">
+ </return>
<argument index="0" name="softness" type="float">
</argument>
<description>
@@ -34170,18 +37865,24 @@
</description>
</method>
<method name="set_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_subdivide_depth">
+ <return type="void">
+ </return>
<argument index="0" name="subdivide" type="int">
</argument>
<description>
</description>
</method>
<method name="set_subdivide_width">
+ <return type="void">
+ </return>
<argument index="0" name="subdivide" type="int">
</argument>
<description>
@@ -34212,6 +37913,8 @@
</description>
</method>
<method name="set_plane">
+ <return type="void">
+ </return>
<argument index="0" name="plane" type="Plane">
</argument>
<description>
@@ -34233,6 +37936,12 @@
A Polygon2D is defined by a set of n vertices connected together by line segments, meaning that the vertex 1 will be connected with vertex 2, vertex 2 with vertex 3 ..., vertex n-1 with vertex n and vertex n with vertex 1 in order to close the loop and define a polygon.
</description>
<methods>
+ <method name="get_antialiased" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_color" qualifiers="const">
<return type="Color">
</return>
@@ -34269,7 +37978,7 @@
</description>
</method>
<method name="get_texture" qualifiers="const">
- <return type="Object">
+ <return type="Texture">
</return>
<description>
Return the polygon texture
@@ -34310,7 +38019,17 @@
Return the list of vertex colors.
</description>
</method>
+ <method name="set_antialiased">
+ <return type="void">
+ </return>
+ <argument index="0" name="antialiased" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
@@ -34318,6 +38037,8 @@
</description>
</method>
<method name="set_invert">
+ <return type="void">
+ </return>
<argument index="0" name="invert" type="bool">
</argument>
<description>
@@ -34325,6 +38046,8 @@
</description>
</method>
<method name="set_invert_border">
+ <return type="void">
+ </return>
<argument index="0" name="invert_border" type="float">
</argument>
<description>
@@ -34332,6 +38055,8 @@
</description>
</method>
<method name="set_offset">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
@@ -34339,6 +38064,8 @@
</description>
</method>
<method name="set_polygon">
+ <return type="void">
+ </return>
<argument index="0" name="polygon" type="PoolVector2Array">
</argument>
<description>
@@ -34346,13 +38073,16 @@
</description>
</method>
<method name="set_texture">
- <argument index="0" name="texture" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
</argument>
<description>
- Set the polygon texture.
</description>
</method>
<method name="set_texture_offset">
+ <return type="void">
+ </return>
<argument index="0" name="texture_offset" type="Vector2">
</argument>
<description>
@@ -34360,6 +38090,8 @@
</description>
</method>
<method name="set_texture_rotation">
+ <return type="void">
+ </return>
<argument index="0" name="texture_rotation" type="float">
</argument>
<description>
@@ -34367,6 +38099,8 @@
</description>
</method>
<method name="set_texture_scale">
+ <return type="void">
+ </return>
<argument index="0" name="texture_scale" type="Vector2">
</argument>
<description>
@@ -34374,6 +38108,8 @@
</description>
</method>
<method name="set_uv">
+ <return type="void">
+ </return>
<argument index="0" name="uv" type="PoolVector2Array">
</argument>
<description>
@@ -34381,6 +38117,8 @@
</description>
</method>
<method name="set_vertex_colors">
+ <return type="void">
+ </return>
<argument index="0" name="vertex_colors" type="PoolColorArray">
</argument>
<description>
@@ -34390,6 +38128,8 @@
</method>
</methods>
<members>
+ <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" brief="">
+ </member>
<member name="color" type="Color" setter="set_color" getter="get_color" brief="">
</member>
<member name="invert_border" type="float" setter="set_invert_border" getter="get_invert_border" brief="">
@@ -34473,6 +38213,8 @@
</description>
</method>
<method name="set_point_penalty">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="penalty" type="float">
@@ -34481,6 +38223,8 @@
</description>
</method>
<method name="setup">
+ <return type="void">
+ </return>
<argument index="0" name="points" type="PoolVector2Array">
</argument>
<argument index="1" name="connections" type="PoolIntArray">
@@ -35180,27 +38924,35 @@
</description>
</method>
<method name="popup">
- <argument index="0" name="bounds" type="Rect2" default="Rect2(0, 0, 0, 0)">
+ <return type="void">
+ </return>
+ <argument index="0" name="bounds" type="Rect2" default="Rect2( 0, 0, 0, 0 )">
</argument>
<description>
Popup (show the control in modal form).
</description>
</method>
<method name="popup_centered">
- <argument index="0" name="size" type="Vector2" default="Vector2(0, 0)">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
Popup (show the control in modal form) in the center of the screen, at the current size, or at a size determined by "size".
</description>
</method>
<method name="popup_centered_minsize">
- <argument index="0" name="minsize" type="Vector2" default="Vector2(0, 0)">
+ <return type="void">
+ </return>
+ <argument index="0" name="minsize" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
Popup (show the control in modal form) in the center of the screen, ensuring the size is never smaller than [code]minsize[/code].
</description>
</method>
<method name="popup_centered_ratio">
+ <return type="void">
+ </return>
<argument index="0" name="ratio" type="float" default="0.75">
</argument>
<description>
@@ -35208,6 +38960,8 @@
</description>
</method>
<method name="set_exclusive">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -35232,10 +38986,10 @@
</signal>
</signals>
<constants>
- <constant name="NOTIFICATION_POST_POPUP" value="80">
+ <constant name="NOTIFICATION_POST_POPUP" value="80" enum="">
Notification sent right after the popup is shown.
</constant>
- <constant name="NOTIFICATION_POPUP_HIDE" value="81">
+ <constant name="NOTIFICATION_POPUP_HIDE" value="81" enum="">
Notification sent right after the popup is hidden.
</constant>
</constants>
@@ -35261,125 +39015,139 @@
</description>
<methods>
<method name="add_check_item">
+ <return type="void">
+ </return>
<argument index="0" name="label" type="String">
</argument>
<argument index="1" name="id" type="int" default="-1">
</argument>
- <argument index="2" name="accel" type="int" default="0">
+ <argument index="2" name="accel" type="int" default="null">
</argument>
<description>
Add a new checkable item with text "label". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
</description>
</method>
<method name="add_check_shortcut">
+ <return type="void">
+ </return>
<argument index="0" name="shortcut" type="ShortCut">
</argument>
<argument index="1" name="id" type="int" default="-1">
</argument>
- <argument index="2" name="global" type="bool" default="false">
+ <argument index="2" name="global" type="bool" default="null">
</argument>
<description>
</description>
</method>
<method name="add_icon_check_item">
- <argument index="0" name="texture" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
</argument>
<argument index="1" name="label" type="String">
</argument>
- <argument index="2" name="id" type="int" default="-1">
+ <argument index="2" name="id" type="int" default="null">
</argument>
- <argument index="3" name="accel" type="int" default="0">
+ <argument index="3" name="accel" type="int" default="null">
</argument>
<description>
- Add a new checkable item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
+ Add a new checkable item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be
+ created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually.
</description>
</method>
<method name="add_icon_check_shortcut">
- <argument index="0" name="texture" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
</argument>
<argument index="1" name="shortcut" type="ShortCut">
</argument>
- <argument index="2" name="id" type="int" default="-1">
+ <argument index="2" name="id" type="int" default="null">
</argument>
- <argument index="3" name="global" type="bool" default="false">
+ <argument index="3" name="global" type="bool" default="null">
</argument>
<description>
</description>
</method>
<method name="add_icon_item">
- <argument index="0" name="texture" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
</argument>
<argument index="1" name="label" type="String">
</argument>
- <argument index="2" name="id" type="int" default="-1">
+ <argument index="2" name="id" type="int" default="null">
</argument>
- <argument index="3" name="accel" type="int" default="0">
+ <argument index="3" name="accel" type="int" default="null">
</argument>
<description>
Add a new item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index.
</description>
</method>
<method name="add_icon_shortcut">
- <argument index="0" name="texture" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
</argument>
<argument index="1" name="shortcut" type="ShortCut">
</argument>
- <argument index="2" name="id" type="int" default="-1">
+ <argument index="2" name="id" type="int" default="null">
</argument>
- <argument index="3" name="global" type="bool" default="false">
+ <argument index="3" name="global" type="bool" default="null">
</argument>
<description>
</description>
</method>
<method name="add_item">
+ <return type="void">
+ </return>
<argument index="0" name="label" type="String">
</argument>
<argument index="1" name="id" type="int" default="-1">
</argument>
- <argument index="2" name="accel" type="int" default="0">
+ <argument index="2" name="accel" type="int" default="null">
</argument>
<description>
Add a new item with text "label". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index.
</description>
</method>
<method name="add_separator">
+ <return type="void">
+ </return>
<description>
Add a separator between items. Separators also occupy an index.
</description>
</method>
<method name="add_shortcut">
+ <return type="void">
+ </return>
<argument index="0" name="shortcut" type="ShortCut">
</argument>
<argument index="1" name="id" type="int" default="-1">
</argument>
- <argument index="2" name="global" type="bool" default="false">
+ <argument index="2" name="global" type="bool" default="null">
</argument>
<description>
</description>
</method>
<method name="add_submenu_item">
+ <return type="void">
+ </return>
<argument index="0" name="label" type="String">
</argument>
<argument index="1" name="submenu" type="String">
</argument>
- <argument index="2" name="id" type="int" default="-1">
+ <argument index="2" name="id" type="int" default="null">
</argument>
<description>
Adds an item with a submenu. The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. An id can optionally be provided, but if is isn't provided, one will be created from the index.
</description>
</method>
<method name="clear">
- <description>
- Clear the popup menu, in effect removing all items.
- </description>
- </method>
- <method name="get_item_id" qualifiers="const">
- <return type="int">
+ <return type="void">
</return>
- <argument index="0" name="idx" type="int">
- </argument>
<description>
- Return the id of the item at index "idx".
+ Clear the popup menu, in effect removing all items.
</description>
</method>
<method name="get_item_accelerator" qualifiers="const">
@@ -35399,7 +39167,7 @@
</description>
</method>
<method name="get_item_icon" qualifiers="const">
- <return type="Object">
+ <return type="Texture">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -35407,6 +39175,15 @@
Return the icon of the item at index "idx".
</description>
</method>
+ <method name="get_item_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Return the id of the item at index "idx".
+ </description>
+ </method>
<method name="get_item_index" qualifiers="const">
<return type="int">
</return>
@@ -35510,6 +39287,8 @@
</description>
</method>
<method name="remove_item">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -35517,6 +39296,8 @@
</description>
</method>
<method name="set_hide_on_checkable_item_selection">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -35524,22 +39305,17 @@
</description>
</method>
<method name="set_hide_on_item_selection">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
Sets whether or not the PopupMenu will hide on item selection.
</description>
</method>
- <method name="set_item_id">
- <argument index="0" name="idx" type="int">
- </argument>
- <argument index="1" name="id" type="int">
- </argument>
- <description>
- Set the id of the item at index "idx".
- </description>
- </method>
<method name="set_item_accelerator">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="accel" type="int">
@@ -35549,6 +39325,8 @@
</description>
</method>
<method name="set_item_as_checkable">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="enable" type="bool">
@@ -35558,6 +39336,8 @@
</description>
</method>
<method name="set_item_as_separator">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="enable" type="bool">
@@ -35567,6 +39347,8 @@
</description>
</method>
<method name="set_item_checked">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="checked" type="bool">
@@ -35576,6 +39358,8 @@
</description>
</method>
<method name="set_item_disabled">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="disabled" type="bool">
@@ -35585,15 +39369,29 @@
</description>
</method>
<method name="set_item_icon">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="icon" type="Texture">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_item_id">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="icon" type="Object">
+ <argument index="1" name="id" type="int">
</argument>
<description>
- Set the icon of the item at index "idx".
+ Set the id of the item at index "idx".
</description>
</method>
<method name="set_item_metadata">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="metadata" type="Variant">
@@ -35603,16 +39401,20 @@
</description>
</method>
<method name="set_item_shortcut">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="shortcut" type="ShortCut">
</argument>
- <argument index="2" name="global" type="bool" default="false">
+ <argument index="2" name="global" type="bool" default="null">
</argument>
<description>
</description>
</method>
<method name="set_item_submenu">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="submenu" type="String">
@@ -35622,6 +39424,8 @@
</description>
</method>
<method name="set_item_text">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="text" type="String">
@@ -35631,6 +39435,8 @@
</description>
</method>
<method name="set_item_tooltip">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<argument index="1" name="tooltip" type="String">
@@ -35639,6 +39445,8 @@
</description>
</method>
<method name="toggle_item_checked">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -35718,88 +39526,6 @@
</theme_item>
</theme_items>
</class>
-<class name="Portal" inherits="VisualInstance" category="Core">
- <brief_description>
- Portals provide virtual openings to rooms.
- </brief_description>
- <description>
- Portals provide virtual openings to [VisualInstance] nodes, so cameras can look at them from the outside. Note that portals are a visibility optimization technique, and are in no way related to the game of the same name (as in, they are not used for teleportation). For more information on how rooms and portals work, see [VisualInstance]. Portals are represented as 2D convex polygon shapes (in the X,Y local plane), and are placed on the surface of the areas occupied by a [VisualInstance], to indicate that the room can be accessed or looked-at through them. If two rooms are next to each other, and two similar portals in each of them share the same world position (and are parallel and opposed to each other), they will automatically "connect" and form "doors" (for example, the portals that connect a kitchen to a living room are placed in the door they share). Portals must always have a [VisualInstance] node as a parent, grandparent or far parent, or else they will not be active.
- </description>
- <methods>
- <method name="get_connect_range" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the range for auto-connecting two portals from different rooms sharing the same space.
- </description>
- </method>
- <method name="get_disable_distance" qualifiers="const">
- <return type="float">
- </return>
- <description>
- Return the distance threshold for disabling the portal. Every time that the portal goes beyond "distance", it disables itself, becoming the opaque color (see [method set_disabled_color]).
- </description>
- </method>
- <method name="get_disabled_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- Return the color for when the portal goes beyond the disable distance (see [method set_disable_distance]) and becomes disabled.
- </description>
- </method>
- <method name="get_shape" qualifiers="const">
- <return type="PoolVector2Array">
- </return>
- <description>
- Return the portal shape. The shape is an array of [Vector2] points, representing a convex polygon in the X,Y plane.
- </description>
- </method>
- <method name="is_enabled" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Return whether the portal is active. When disabled it causes the parent [VisualInstance] to not be visible any longer when looking through the portal.
- </description>
- </method>
- <method name="set_connect_range">
- <argument index="0" name="range" type="float">
- </argument>
- <description>
- Set the range for auto-connecting two portals from different rooms sharing the same space.
- </description>
- </method>
- <method name="set_disable_distance">
- <argument index="0" name="distance" type="float">
- </argument>
- <description>
- Set the distance threshold for disabling the portal. Every time that the portal goes beyond "distance", it disables itself, becoming the opaque color (see [method set_disabled_color]).
- </description>
- </method>
- <method name="set_disabled_color">
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- When the portal goes beyond the disable distance (see [method set_disable_distance]), it becomes opaque and displayed with color "color".
- </description>
- </method>
- <method name="set_enabled">
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Enable the portal (it is enabled by default though), disabling it will cause the parent [VisualInstance] to not be visible any longer when looking through the portal.
- </description>
- </method>
- <method name="set_shape">
- <argument index="0" name="points" type="PoolVector2Array">
- </argument>
- <description>
- Set the portal shape. The shape is an array of [Vector2] points, representing a convex polygon in the X,Y plane.
- </description>
- </method>
- </methods>
- <constants>
- </constants>
-</class>
<class name="Position2D" inherits="Node2D" category="Core">
<brief_description>
Generic 2D Position hint for editing.
@@ -35837,6 +39563,8 @@
</description>
</method>
<method name="set_material">
+ <return type="void">
+ </return>
<argument index="0" name="material" type="Material">
</argument>
<description>
@@ -35887,30 +39615,40 @@
</description>
</method>
<method name="set_left_to_right">
+ <return type="void">
+ </return>
<argument index="0" name="left_to_right" type="float">
</argument>
<description>
</description>
</method>
<method name="set_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_subdivide_depth">
+ <return type="void">
+ </return>
<argument index="0" name="segments" type="int">
</argument>
<description>
</description>
</method>
<method name="set_subdivide_height">
+ <return type="void">
+ </return>
<argument index="0" name="segments" type="int">
</argument>
<description>
</description>
</method>
<method name="set_subdivide_width">
+ <return type="void">
+ </return>
<argument index="0" name="segments" type="int">
</argument>
<description>
@@ -35920,7 +39658,7 @@
<members>
<member name="left_to_right" type="float" setter="set_left_to_right" getter="get_left_to_right" brief="">
</member>
- <member name="size" type="Vector2" setter="set_size" getter="get_size" brief="">
+ <member name="size" type="Vector3" setter="set_size" getter="get_size" brief="">
</member>
<member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" brief="">
</member>
@@ -36035,97 +39773,129 @@
</description>
</method>
<method name="set_ground_bottom_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_ground_curve">
+ <return type="void">
+ </return>
<argument index="0" name="curve" type="float">
</argument>
<description>
</description>
</method>
<method name="set_ground_energy">
+ <return type="void">
+ </return>
<argument index="0" name="energy" type="float">
</argument>
<description>
</description>
</method>
<method name="set_ground_horizon_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_sky_curve">
+ <return type="void">
+ </return>
<argument index="0" name="curve" type="float">
</argument>
<description>
</description>
</method>
<method name="set_sky_energy">
+ <return type="void">
+ </return>
<argument index="0" name="energy" type="float">
</argument>
<description>
</description>
</method>
<method name="set_sky_horizon_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_sky_top_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_sun_angle_max">
+ <return type="void">
+ </return>
<argument index="0" name="degrees" type="float">
</argument>
<description>
</description>
</method>
<method name="set_sun_angle_min">
+ <return type="void">
+ </return>
<argument index="0" name="degrees" type="float">
</argument>
<description>
</description>
</method>
<method name="set_sun_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_sun_curve">
+ <return type="void">
+ </return>
<argument index="0" name="curve" type="float">
</argument>
<description>
</description>
</method>
<method name="set_sun_energy">
+ <return type="void">
+ </return>
<argument index="0" name="energy" type="float">
</argument>
<description>
</description>
</method>
<method name="set_sun_latitude">
+ <return type="void">
+ </return>
<argument index="0" name="degrees" type="float">
</argument>
<description>
</description>
</method>
<method name="set_sun_longitude">
+ <return type="void">
+ </return>
<argument index="0" name="degrees" type="float">
</argument>
<description>
</description>
</method>
<method name="set_texture_size">
- <argument index="0" name="size" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="int" enum="ProceduralSky.TextureSize">
</argument>
<description>
</description>
@@ -36162,10 +39932,22 @@
</member>
<member name="sun_longitude" type="float" setter="set_sun_longitude" getter="get_sun_longitude" brief="">
</member>
- <member name="texture_size" type="int" setter="set_texture_size" getter="get_texture_size" brief="">
+ <member name="texture_size" type="int" setter="set_texture_size" getter="get_texture_size" brief="" enum="ProceduralSky.TextureSize">
</member>
</members>
<constants>
+ <constant name="TEXTURE_SIZE_256" value="0">
+ </constant>
+ <constant name="TEXTURE_SIZE_512" value="1">
+ </constant>
+ <constant name="TEXTURE_SIZE_1024" value="2">
+ </constant>
+ <constant name="TEXTURE_SIZE_2048" value="3">
+ </constant>
+ <constant name="TEXTURE_SIZE_4096" value="4">
+ </constant>
+ <constant name="TEXTURE_SIZE_MAX" value="5">
+ </constant>
</constants>
</class>
<class name="ProgressBar" inherits="Range" category="Core">
@@ -36183,6 +39965,8 @@
</description>
</method>
<method name="set_percent_visible">
+ <return type="void">
+ </return>
<argument index="0" name="visible" type="bool">
</argument>
<description>
@@ -36208,6 +39992,160 @@
</theme_item>
</theme_items>
</class>
+<class name="ProjectSettings" inherits="Object" category="Core">
+ <brief_description>
+ Contains global variables accessible from everywhere.
+ </brief_description>
+ <description>
+ Contains global variables accessible from everywhere. Use the normal [Object] API, such as "ProjectSettings.get(variable)", "ProjectSettings.set(variable,value)" or "ProjectSettings.has(variable)" to access them. Variables stored in project.godot are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options.
+ </description>
+ <methods>
+ <method name="add_property_info">
+ <return type="void">
+ </return>
+ <argument index="0" name="hint" type="Dictionary">
+ </argument>
+ <description>
+ Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@Global Scope]), and optionally hint:[int](see PROPERTY_HINT_* in [@Global Scope]), hint_string:[String].
+ Example:
+ [codeblock]
+ ProjectSettings.set("category/property_name", 0)
+
+ var property_info = {
+ "name": "category/property_name",
+ "type": TYPE_INT,
+ "hint": PROPERTY_HINT_ENUM,
+ "hint_string": "one,two,three"
+ }
+
+ ProjectSettings.add_property_info(property_info)
+ [/codeblock]
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Clear the whole configuration (not recommended, may break things).
+ </description>
+ </method>
+ <method name="get_order" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Return the order of a configuration value (influences when saved to the config file).
+ </description>
+ </method>
+ <method name="get_singleton" qualifiers="const">
+ <return type="Object">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="globalize_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Convert a localized path (res://) to a full native OS path.
+ </description>
+ </method>
+ <method name="has" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Return true if a configuration value is present.
+ </description>
+ </method>
+ <method name="has_singleton" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="load_resource_pack">
+ <return type="bool">
+ </return>
+ <argument index="0" name="pack" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="localize_path" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ Convert a path to a localized path (res:// path).
+ </description>
+ </method>
+ <method name="property_can_revert">
+ <return type="bool">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="property_get_revert">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="save">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="save_custom">
+ <return type="int">
+ </return>
+ <argument index="0" name="file" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_initial_value">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="value" type="Variant">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_order">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="pos" type="int">
+ </argument>
+ <description>
+ Set the order of a configuration value (influences when saved to the config file).
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
<class name="ProximityGroup" inherits="Spatial" category="Core">
<brief_description>
General purpose proximity-detection node.
@@ -36217,6 +40155,8 @@
</description>
<methods>
<method name="broadcast">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="parameters" type="Variant">
@@ -36231,18 +40171,24 @@
</description>
</method>
<method name="set_dispatch_mode">
+ <return type="void">
+ </return>
<argument index="0" name="mode" type="int">
</argument>
<description>
</description>
</method>
<method name="set_grid_radius">
+ <return type="void">
+ </return>
<argument index="0" name="radius" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_group_name">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -36509,6 +40455,8 @@
</description>
</method>
<method name="set_as_ratio">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="float">
</argument>
<description>
@@ -36516,18 +40464,24 @@
</description>
</method>
<method name="set_exp_ratio">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_max">
+ <return type="void">
+ </return>
<argument index="0" name="maximum" type="float">
</argument>
<description>
</description>
</method>
<method name="set_min">
+ <return type="void">
+ </return>
<argument index="0" name="minimum" type="float">
</argument>
<description>
@@ -36535,6 +40489,8 @@
</description>
</method>
<method name="set_page">
+ <return type="void">
+ </return>
<argument index="0" name="pagesize" type="float">
</argument>
<description>
@@ -36542,6 +40498,8 @@
</description>
</method>
<method name="set_step">
+ <return type="void">
+ </return>
<argument index="0" name="step" type="float">
</argument>
<description>
@@ -36549,24 +40507,32 @@
</description>
</method>
<method name="set_use_rounded_values">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_value">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="float">
</argument>
<description>
</description>
</method>
<method name="share">
- <argument index="0" name="with" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="with" type="Node">
</argument>
<description>
</description>
</method>
<method name="unshare">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -36619,6 +40585,8 @@
</description>
<methods>
<method name="add_exception">
+ <return type="void">
+ </return>
<argument index="0" name="node" type="Object">
</argument>
<description>
@@ -36626,17 +40594,23 @@
</description>
</method>
<method name="add_exception_rid">
+ <return type="void">
+ </return>
<argument index="0" name="rid" type="RID">
</argument>
<description>
</description>
</method>
<method name="clear_exceptions">
+ <return type="void">
+ </return>
<description>
Removes all collision exception for this ray.
</description>
</method>
<method name="force_raycast_update">
+ <return type="void">
+ </return>
<description>
Updates the collision information in case if this object's properties changed during the current frame (for example position, rotation or the cast_point). Note, [code]set_enabled[/code] is not required for this to work.
</description>
@@ -36705,6 +40679,8 @@
</description>
</method>
<method name="remove_exception">
+ <return type="void">
+ </return>
<argument index="0" name="node" type="Object">
</argument>
<description>
@@ -36712,12 +40688,16 @@
</description>
</method>
<method name="remove_exception_rid">
+ <return type="void">
+ </return>
<argument index="0" name="rid" type="RID">
</argument>
<description>
</description>
</method>
<method name="set_cast_to">
+ <return type="void">
+ </return>
<argument index="0" name="local_point" type="Vector3">
</argument>
<description>
@@ -36725,6 +40705,8 @@
</description>
</method>
<method name="set_collision_layer">
+ <return type="void">
+ </return>
<argument index="0" name="layer" type="int">
</argument>
<description>
@@ -36732,6 +40714,8 @@
</description>
</method>
<method name="set_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -36739,6 +40723,8 @@
</description>
</method>
<method name="set_type_mask">
+ <return type="void">
+ </return>
<argument index="0" name="mask" type="int">
</argument>
<description>
@@ -36774,6 +40760,8 @@
</description>
<methods>
<method name="add_exception">
+ <return type="void">
+ </return>
<argument index="0" name="node" type="Object">
</argument>
<description>
@@ -36781,17 +40769,23 @@
</description>
</method>
<method name="add_exception_rid">
+ <return type="void">
+ </return>
<argument index="0" name="rid" type="RID">
</argument>
<description>
</description>
</method>
<method name="clear_exceptions">
+ <return type="void">
+ </return>
<description>
Removes all collision exception for this ray.
</description>
</method>
<method name="force_raycast_update">
+ <return type="void">
+ </return>
<description>
Updates the collision information in case if this object's properties changed during the current frame (for example position, rotation or the cast_point). Note, [code]set_enabled[/code] is not required for this to work.
</description>
@@ -36867,6 +40861,8 @@
</description>
</method>
<method name="remove_exception">
+ <return type="void">
+ </return>
<argument index="0" name="node" type="Object">
</argument>
<description>
@@ -36874,12 +40870,16 @@
</description>
</method>
<method name="remove_exception_rid">
+ <return type="void">
+ </return>
<argument index="0" name="rid" type="RID">
</argument>
<description>
</description>
</method>
<method name="set_cast_to">
+ <return type="void">
+ </return>
<argument index="0" name="local_point" type="Vector2">
</argument>
<description>
@@ -36887,6 +40887,8 @@
</description>
</method>
<method name="set_collision_layer">
+ <return type="void">
+ </return>
<argument index="0" name="layer" type="int">
</argument>
<description>
@@ -36894,6 +40896,8 @@
</description>
</method>
<method name="set_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -36901,6 +40905,8 @@
</description>
</method>
<method name="set_exclude_parent_body">
+ <return type="void">
+ </return>
<argument index="0" name="mask" type="bool">
</argument>
<description>
@@ -36908,6 +40914,8 @@
</description>
</method>
<method name="set_type_mask">
+ <return type="void">
+ </return>
<argument index="0" name="mask" type="int">
</argument>
<description>
@@ -36943,6 +40951,8 @@
</description>
</method>
<method name="set_length">
+ <return type="void">
+ </return>
<argument index="0" name="length" type="float">
</argument>
<description>
@@ -36972,6 +40982,8 @@
</description>
</method>
<method name="set_length">
+ <return type="void">
+ </return>
<argument index="0" name="length" type="float">
</argument>
<description>
@@ -37349,6 +41361,8 @@
</description>
</method>
<method name="set_extents">
+ <return type="void">
+ </return>
<argument index="0" name="extents" type="Vector2">
</argument>
<description>
@@ -37378,6 +41392,8 @@
</description>
</method>
<method name="reference">
+ <return type="void">
+ </return>
<description>
Increase the internal reference counter. Use this only if you really know what you are doing.
</description>
@@ -37488,73 +41504,97 @@
</description>
</method>
<method name="set_as_interior">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_cull_mask">
+ <return type="void">
+ </return>
<argument index="0" name="layers" type="int">
</argument>
<description>
</description>
</method>
<method name="set_enable_box_projection">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_enable_shadows">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_extents">
+ <return type="void">
+ </return>
<argument index="0" name="extents" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_intensity">
+ <return type="void">
+ </return>
<argument index="0" name="intensity" type="float">
</argument>
<description>
</description>
</method>
<method name="set_interior_ambient">
+ <return type="void">
+ </return>
<argument index="0" name="ambient" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_interior_ambient_energy">
+ <return type="void">
+ </return>
<argument index="0" name="ambient_energy" type="float">
</argument>
<description>
</description>
</method>
<method name="set_interior_ambient_probe_contribution">
+ <return type="void">
+ </return>
<argument index="0" name="ambient_probe_contribution" type="float">
</argument>
<description>
</description>
</method>
<method name="set_max_distance">
+ <return type="void">
+ </return>
<argument index="0" name="max_distance" type="float">
</argument>
<description>
</description>
</method>
<method name="set_origin_offset">
+ <return type="void">
+ </return>
<argument index="0" name="origin_offset" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_update_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="ReflectionProbe.UpdateMode">
</argument>
<description>
</description>
@@ -37567,7 +41607,7 @@
</member>
<member name="enable_shadows" type="bool" setter="set_enable_shadows" getter="are_shadows_enabled" brief="">
</member>
- <member name="extents" type="Vector2" setter="set_extents" getter="get_extents" brief="">
+ <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" brief="">
</member>
<member name="intensity" type="float" setter="set_intensity" getter="get_intensity" brief="">
</member>
@@ -37581,9 +41621,9 @@
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" brief="">
</member>
- <member name="origin_offset" type="Vector2" setter="set_origin_offset" getter="get_origin_offset" brief="">
+ <member name="origin_offset" type="Vector3" setter="set_origin_offset" getter="get_origin_offset" brief="">
</member>
- <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" brief="">
+ <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" brief="" enum="ReflectionProbe.UpdateMode">
</member>
</members>
<constants>
@@ -37593,7 +41633,7 @@
</constant>
</constants>
</class>
-<class name="RegEx" inherits="Resource" category="Core">
+<class name="RegEx" inherits="Reference" category="Core">
<brief_description>
Simple regular expression matcher.
</brief_description>
@@ -37625,6 +41665,8 @@
</description>
<methods>
<method name="clear">
+ <return type="void">
+ </return>
<description>
This method resets the state of the object, as it was freshly created. Namely, it unassigns the regular expression of this object.
</description>
@@ -37669,11 +41711,11 @@
<method name="search" qualifiers="const">
<return type="RegExMatch">
</return>
- <argument index="0" name="text" type="String">
+ <argument index="0" name="subject" type="String">
</argument>
- <argument index="1" name="start" type="int" default="0">
+ <argument index="1" name="offset" type="int" default="0">
</argument>
- <argument index="2" name="end" type="int" default="-1">
+ <argument index="2" name="end" type="int" default="null">
</argument>
<description>
Searches the text for the compiled pattern. Returns a [RegExMatch] container of the first matching reult if found, otherwise null. The region to search within can be specified without modifying where the start and end anchor would be.
@@ -37682,25 +41724,21 @@
<method name="sub" qualifiers="const">
<return type="String">
</return>
- <argument index="0" name="text" type="String">
+ <argument index="0" name="subject" type="String">
</argument>
<argument index="1" name="replacement" type="String">
</argument>
<argument index="2" name="all" type="bool" default="false">
</argument>
- <argument index="3" name="start" type="int" default="0">
+ <argument index="3" name="offset" type="int" default="null">
</argument>
- <argument index="4" name="end" type="int" default="-1">
+ <argument index="4" name="end" type="int" default="null">
</argument>
<description>
Searches the text for the compiled pattern and replaces it with the specified string. Escapes and backreferences such as [code]\1[/code] and [code]\g&lt;name&gt;[/code] expanded and resolved. By default only the first instance is replaced but it can be changed for all instances (global replacement). The region to search within can be specified without modifying where the start and end anchor would be.
</description>
</method>
</methods>
- <members>
- <member name="pattern" type="String" setter="compile" getter="get_pattern" brief="">
- </member>
- </members>
<constants>
</constants>
</class>
@@ -37710,15 +41748,6 @@
<description>
</description>
<methods>
- <method name="expand" qualifiers="const">
- <return type="String">
- </return>
- <argument index="0" name="template" type="String">
- </argument>
- <description>
- Using results from the search, returns the specified string with escapes and backreferences such as [code]\1[/code] and [code]\g&lt;name&gt;[/code] expanded and resolved.
- </description>
- </method>
<method name="get_end" qualifiers="const">
<return type="int">
</return>
@@ -37728,13 +41757,6 @@
Returns the end position of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern).
</description>
</method>
- <method name="get_group_array" qualifiers="const">
- <return type="Array">
- </return>
- <description>
- Returns an array of the results of the numeric groups.
- </description>
- </method>
<method name="get_group_count" qualifiers="const">
<return type="int">
</return>
@@ -37742,15 +41764,8 @@
Returns the number of numeric capturing groups.
</description>
</method>
- <method name="get_name_dict" qualifiers="const">
- <return type="Dictionary">
- </return>
- <description>
- Returns a dictionary containing the named capturing groups and their results.
- </description>
- </method>
<method name="get_names" qualifiers="const">
- <return type="Array">
+ <return type="Dictionary">
</return>
<description>
Returns an array of names of named capturing groups.
@@ -37774,6 +41789,18 @@
Returns the result of the match in the string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern).
</description>
</method>
+ <method name="get_strings" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_subject" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ </description>
+ </method>
</methods>
<constants>
</constants>
@@ -37815,30 +41842,40 @@
</description>
</method>
<method name="set_remote_node">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="NodePath">
</argument>
<description>
</description>
</method>
<method name="set_update_position">
+ <return type="void">
+ </return>
<argument index="0" name="update_remote_position" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_update_rotation">
+ <return type="void">
+ </return>
<argument index="0" name="update_remote_rotation" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_update_scale">
+ <return type="void">
+ </return>
<argument index="0" name="update_remote_scale" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_use_global_coordinates">
+ <return type="void">
+ </return>
<argument index="0" name="use_global_coordinates" type="bool">
</argument>
<description>
@@ -37897,30 +41934,40 @@
</description>
</method>
<method name="set_remote_node">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="NodePath">
</argument>
<description>
</description>
</method>
<method name="set_update_position">
+ <return type="void">
+ </return>
<argument index="0" name="update_remote_position" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_update_rotation">
+ <return type="void">
+ </return>
<argument index="0" name="update_remote_rotation" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_update_scale">
+ <return type="void">
+ </return>
<argument index="0" name="update_remote_scale" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_use_global_coordinates">
+ <return type="void">
+ </return>
<argument index="0" name="use_global_coordinates" type="bool">
</argument>
<description>
@@ -37951,11 +41998,13 @@
</description>
<methods>
<method name="_setup_local_to_scene" qualifiers="virtual">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="duplicate" qualifiers="const">
- <return type="Object">
+ <return type="Resource">
</return>
<argument index="0" name="subresources" type="bool" default="false">
</argument>
@@ -37996,12 +42045,16 @@
</description>
</method>
<method name="set_local_to_scene">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_name">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -38009,6 +42062,8 @@
</description>
</method>
<method name="set_path">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="String">
</argument>
<description>
@@ -38016,10 +42071,14 @@
</description>
</method>
<method name="setup_local_to_scene">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="take_over_path">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="String">
</argument>
<description>
@@ -38073,7 +42132,7 @@
</description>
<methods>
<method name="get_resource">
- <return type="Object">
+ <return type="Resource">
</return>
<description>
Return the loaded resource (only if loaded). Otherwise, returns null.
@@ -38150,7 +42209,7 @@
</argument>
<argument index="1" name="type_hint" type="String" default="&quot;&quot;">
</argument>
- <argument index="2" name="p_no_cache" type="bool" default="false">
+ <argument index="2" name="p_no_cache" type="bool" default="null">
</argument>
<description>
</description>
@@ -38160,13 +42219,15 @@
</return>
<argument index="0" name="path" type="String">
</argument>
- <argument index="1" name="type_hint" type="String" default="&quot;&quot;">
+ <argument index="1" name="type_hint" type="String" default="null">
</argument>
<description>
Load a resource interactively, the returned object allows to load with high granularity.
</description>
</method>
<method name="set_abort_on_missing_resources">
+ <return type="void">
+ </return>
<argument index="0" name="abort" type="bool">
</argument>
<description>
@@ -38186,16 +42247,17 @@
</description>
<methods>
<method name="add_resource">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="resource" type="Object">
+ <argument index="1" name="resource" type="Resource">
</argument>
<description>
- Add a resource to the preloader. Set the text-id that will be used to identify it (retrieve it/erase it/etc).
</description>
</method>
<method name="get_resource" qualifiers="const">
- <return type="Object">
+ <return type="Resource">
</return>
<argument index="0" name="name" type="String">
</argument>
@@ -38220,6 +42282,8 @@
</description>
</method>
<method name="remove_resource">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -38227,6 +42291,8 @@
</description>
</method>
<method name="rename_resource">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="newname" type="String">
@@ -38254,7 +42320,7 @@
<method name="get_recognized_extensions">
<return type="PoolStringArray">
</return>
- <argument index="0" name="type" type="Object">
+ <argument index="0" name="type" type="Resource">
</argument>
<description>
Return the list of extensions available for saving a resource of a given type.
@@ -38267,7 +42333,7 @@
</argument>
<argument index="1" name="resource" type="Resource">
</argument>
- <argument index="2" name="flags" type="int" default="0">
+ <argument index="2" name="flags" type="int" default="null">
</argument>
<description>
Save a resource to disk, to a given path.
@@ -38298,12 +42364,16 @@
</description>
<methods>
<method name="add_image">
+ <return type="void">
+ </return>
<argument index="0" name="image" type="Texture">
</argument>
<description>
</description>
</method>
<method name="add_text">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
<description>
@@ -38318,6 +42388,8 @@
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -38396,6 +42468,8 @@
</description>
</method>
<method name="newline">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -38408,104 +42482,138 @@
</description>
</method>
<method name="pop">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="push_align">
- <argument index="0" name="align" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="align" type="int" enum="RichTextLabel.Align">
</argument>
<description>
</description>
</method>
<method name="push_cell">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="push_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="push_font">
+ <return type="void">
+ </return>
<argument index="0" name="font" type="Font">
</argument>
<description>
</description>
</method>
<method name="push_indent">
+ <return type="void">
+ </return>
<argument index="0" name="level" type="int">
</argument>
<description>
</description>
</method>
<method name="push_list">
- <argument index="0" name="type" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="RichTextLabel.ListType">
</argument>
<description>
</description>
</method>
<method name="push_meta">
+ <return type="void">
+ </return>
<argument index="0" name="data" type="Variant">
</argument>
<description>
</description>
</method>
<method name="push_table">
+ <return type="void">
+ </return>
<argument index="0" name="columns" type="int">
</argument>
<description>
</description>
</method>
<method name="push_underline">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="remove_line">
<return type="bool">
</return>
- <argument index="0" name="arg0" type="int">
+ <argument index="0" name="line" type="int">
</argument>
<description>
</description>
</method>
<method name="scroll_to_line">
+ <return type="void">
+ </return>
<argument index="0" name="line" type="int">
</argument>
<description>
</description>
</method>
<method name="set_bbcode">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
<description>
</description>
</method>
<method name="set_meta_underline">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_percent_visible">
+ <return type="void">
+ </return>
<argument index="0" name="percent_visible" type="float">
</argument>
<description>
</description>
</method>
<method name="set_scroll_active">
+ <return type="void">
+ </return>
<argument index="0" name="active" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_scroll_follow">
+ <return type="void">
+ </return>
<argument index="0" name="follow" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_selection_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -38513,12 +42621,16 @@
</description>
</method>
<method name="set_tab_size">
+ <return type="void">
+ </return>
<argument index="0" name="spaces" type="int">
</argument>
<description>
</description>
</method>
<method name="set_table_column_expand">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="expand" type="bool">
@@ -38529,18 +42641,24 @@
</description>
</method>
<method name="set_text">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
<description>
</description>
</method>
<method name="set_use_bbcode">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_visible_characters">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="int">
</argument>
<description>
@@ -38639,6 +42757,8 @@
</description>
<methods>
<method name="_integrate_forces" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="state" type="PhysicsDirectBodyState">
</argument>
<description>
@@ -38646,6 +42766,8 @@
</description>
</method>
<method name="apply_impulse">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector3">
</argument>
<argument index="1" name="impulse" type="Vector3">
@@ -38781,6 +42903,8 @@
</description>
</method>
<method name="set_angular_damp">
+ <return type="void">
+ </return>
<argument index="0" name="angular_damp" type="float">
</argument>
<description>
@@ -38788,6 +42912,8 @@
</description>
</method>
<method name="set_angular_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="angular_velocity" type="Vector3">
</argument>
<description>
@@ -38795,13 +42921,17 @@
</description>
</method>
<method name="set_axis_lock">
- <argument index="0" name="axis_lock" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="axis_lock" type="int" enum="RigidBody.AxisLock">
</argument>
<description>
Set the axis lock of the body, from the AXIS_LOCK_* enum. Axis lock stops the body from moving along the specified axis(X/Y/Z) and rotating along the other two axes.
</description>
</method>
<method name="set_axis_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="axis_velocity" type="Vector3">
</argument>
<description>
@@ -38809,6 +42939,8 @@
</description>
</method>
<method name="set_bounce">
+ <return type="void">
+ </return>
<argument index="0" name="bounce" type="float">
</argument>
<description>
@@ -38816,6 +42948,8 @@
</description>
</method>
<method name="set_can_sleep">
+ <return type="void">
+ </return>
<argument index="0" name="able_to_sleep" type="bool">
</argument>
<description>
@@ -38824,6 +42958,8 @@
</description>
</method>
<method name="set_contact_monitor">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -38831,6 +42967,8 @@
</description>
</method>
<method name="set_friction">
+ <return type="void">
+ </return>
<argument index="0" name="friction" type="float">
</argument>
<description>
@@ -38838,6 +42976,8 @@
</description>
</method>
<method name="set_gravity_scale">
+ <return type="void">
+ </return>
<argument index="0" name="gravity_scale" type="float">
</argument>
<description>
@@ -38845,6 +42985,8 @@
</description>
</method>
<method name="set_linear_damp">
+ <return type="void">
+ </return>
<argument index="0" name="linear_damp" type="float">
</argument>
<description>
@@ -38852,6 +42994,8 @@
</description>
</method>
<method name="set_linear_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="linear_velocity" type="Vector3">
</argument>
<description>
@@ -38859,6 +43003,8 @@
</description>
</method>
<method name="set_mass">
+ <return type="void">
+ </return>
<argument index="0" name="mass" type="float">
</argument>
<description>
@@ -38866,6 +43012,8 @@
</description>
</method>
<method name="set_max_contacts_reported">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="int">
</argument>
<description>
@@ -38873,13 +43021,17 @@
</description>
</method>
<method name="set_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="RigidBody.Mode">
</argument>
<description>
Set the body mode, from the MODE_* enum. This allows to change to a static body or a character body.
</description>
</method>
<method name="set_sleeping">
+ <return type="void">
+ </return>
<argument index="0" name="sleeping" type="bool">
</argument>
<description>
@@ -38887,6 +43039,8 @@
</description>
</method>
<method name="set_use_continuous_collision_detection">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -38895,6 +43049,8 @@
</description>
</method>
<method name="set_use_custom_integrator">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -38902,6 +43058,8 @@
</description>
</method>
<method name="set_weight">
+ <return type="void">
+ </return>
<argument index="0" name="weight" type="float">
</argument>
<description>
@@ -38914,7 +43072,7 @@
</member>
<member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" brief="">
</member>
- <member name="axis_lock" type="int" setter="set_axis_lock" getter="get_axis_lock" brief="">
+ <member name="axis_lock" type="int" setter="set_axis_lock" getter="get_axis_lock" brief="" enum="RigidBody.AxisLock">
</member>
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce" brief="">
</member>
@@ -38938,7 +43096,7 @@
</member>
<member name="mass" type="float" setter="set_mass" getter="get_mass" brief="">
</member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="">
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="RigidBody.Mode">
</member>
<member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" brief="">
</member>
@@ -39020,6 +43178,8 @@
</description>
<methods>
<method name="_integrate_forces" qualifiers="virtual">
+ <return type="void">
+ </return>
<argument index="0" name="state" type="Physics2DDirectBodyState">
</argument>
<description>
@@ -39027,6 +43187,8 @@
</description>
</method>
<method name="add_force">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector2">
</argument>
<argument index="1" name="force" type="Vector2">
@@ -39036,6 +43198,8 @@
</description>
</method>
<method name="apply_impulse">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector2">
</argument>
<argument index="1" name="impulse" type="Vector2">
@@ -39185,6 +43349,8 @@
</description>
</method>
<method name="set_angular_damp">
+ <return type="void">
+ </return>
<argument index="0" name="angular_damp" type="float">
</argument>
<description>
@@ -39192,6 +43358,8 @@
</description>
</method>
<method name="set_angular_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="angular_velocity" type="float">
</argument>
<description>
@@ -39199,6 +43367,8 @@
</description>
</method>
<method name="set_applied_force">
+ <return type="void">
+ </return>
<argument index="0" name="force" type="Vector2">
</argument>
<description>
@@ -39206,6 +43376,8 @@
</description>
</method>
<method name="set_applied_torque">
+ <return type="void">
+ </return>
<argument index="0" name="torque" type="float">
</argument>
<description>
@@ -39213,6 +43385,8 @@
</description>
</method>
<method name="set_axis_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="axis_velocity" type="Vector2">
</argument>
<description>
@@ -39220,6 +43394,8 @@
</description>
</method>
<method name="set_bounce">
+ <return type="void">
+ </return>
<argument index="0" name="bounce" type="float">
</argument>
<description>
@@ -39227,6 +43403,8 @@
</description>
</method>
<method name="set_can_sleep">
+ <return type="void">
+ </return>
<argument index="0" name="able_to_sleep" type="bool">
</argument>
<description>
@@ -39235,6 +43413,8 @@
</description>
</method>
<method name="set_contact_monitor">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -39242,7 +43422,9 @@
</description>
</method>
<method name="set_continuous_collision_detection_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="RigidBody2D.CCDMode">
</argument>
<description>
Set the continuous collision detection mode from the enum CCD_MODE_*.
@@ -39250,6 +43432,8 @@
</description>
</method>
<method name="set_friction">
+ <return type="void">
+ </return>
<argument index="0" name="friction" type="float">
</argument>
<description>
@@ -39257,6 +43441,8 @@
</description>
</method>
<method name="set_gravity_scale">
+ <return type="void">
+ </return>
<argument index="0" name="gravity_scale" type="float">
</argument>
<description>
@@ -39264,6 +43450,8 @@
</description>
</method>
<method name="set_inertia">
+ <return type="void">
+ </return>
<argument index="0" name="inertia" type="float">
</argument>
<description>
@@ -39271,6 +43459,8 @@
</description>
</method>
<method name="set_linear_damp">
+ <return type="void">
+ </return>
<argument index="0" name="linear_damp" type="float">
</argument>
<description>
@@ -39278,6 +43468,8 @@
</description>
</method>
<method name="set_linear_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="linear_velocity" type="Vector2">
</argument>
<description>
@@ -39285,6 +43477,8 @@
</description>
</method>
<method name="set_mass">
+ <return type="void">
+ </return>
<argument index="0" name="mass" type="float">
</argument>
<description>
@@ -39292,6 +43486,8 @@
</description>
</method>
<method name="set_max_contacts_reported">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="int">
</argument>
<description>
@@ -39299,13 +43495,17 @@
</description>
</method>
<method name="set_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="RigidBody2D.Mode">
</argument>
<description>
Set the body mode, from the MODE_* enum. This allows to change to a static body or a character body.
</description>
</method>
<method name="set_sleeping">
+ <return type="void">
+ </return>
<argument index="0" name="sleeping" type="bool">
</argument>
<description>
@@ -39313,6 +43513,8 @@
</description>
</method>
<method name="set_use_custom_integrator">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -39320,6 +43522,8 @@
</description>
</method>
<method name="set_weight">
+ <return type="void">
+ </return>
<argument index="0" name="weight" type="float">
</argument>
<description>
@@ -39333,7 +43537,7 @@
</argument>
<argument index="1" name="margin" type="float" default="0.08">
</argument>
- <argument index="2" name="result" type="Physics2DTestMotionResult" default="NULL">
+ <argument index="2" name="result" type="Physics2DTestMotionResult" default="null">
</argument>
<description>
Return whether the body would collide, if it tried to move in the given vector. This method allows two extra parameters: A margin, which increases slightly the size of the shapes involved in the collision detection, and an object of type [Physics2DTestMotionResult], which will store additional information about the collision (should there be one).
@@ -39353,7 +43557,7 @@
</member>
<member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" brief="">
</member>
- <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" brief="">
+ <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" brief="" enum="RigidBody2D.CCDMode">
</member>
<member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator" brief="">
</member>
@@ -39367,7 +43571,7 @@
</member>
<member name="mass" type="float" setter="set_mass" getter="get_mass" brief="">
</member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="">
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="RigidBody2D.Mode">
</member>
<member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" brief="">
</member>
@@ -39447,60 +43651,6 @@
</constant>
</constants>
</class>
-<class name="Room" inherits="VisualInstance" category="Core">
- <brief_description>
- Room data resource.
- </brief_description>
- <description>
- Room contains the data to define the bounds of a scene (using a BSP Tree). It is instanced by a [VisualInstance] node to create rooms. See that class documentation for more information about rooms.
- </description>
- <methods>
- <method name="get_room" qualifiers="const">
- <return type="Room">
- </return>
- <description>
- </description>
- </method>
- <method name="set_room">
- <argument index="0" name="room" type="Room">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="room/room" type="Area" setter="set_room" getter="get_room" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
-<class name="RoomBounds" inherits="Resource" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_geometry_hint" qualifiers="const">
- <return type="PoolVector3Array">
- </return>
- <description>
- </description>
- </method>
- <method name="set_geometry_hint">
- <argument index="0" name="triangles" type="PoolVector3Array">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="geometry_hint" type="PoolVector3Array" setter="set_geometry_hint" getter="get_geometry_hint" brief="">
- </member>
- </members>
- <constants>
- </constants>
-</class>
<class name="SceneState" inherits="Reference" category="Core">
<brief_description>
</brief_description>
@@ -39612,7 +43762,7 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="for_parent" type="bool" default="false">
+ <argument index="1" name="for_parent" type="bool" default="null">
</argument>
<description>
</description>
@@ -39678,6 +43828,8 @@
</description>
<methods>
<method name="call_group" qualifiers="vararg">
+ <return type="Variant">
+ </return>
<argument index="0" name="group" type="String">
</argument>
<argument index="1" name="method" type="String">
@@ -39686,6 +43838,8 @@
</description>
</method>
<method name="call_group_flags" qualifiers="vararg">
+ <return type="Variant">
+ </return>
<argument index="0" name="flags" type="int">
</argument>
<argument index="1" name="group" type="String">
@@ -39716,7 +43870,7 @@
</return>
<argument index="0" name="time_sec" type="float">
</argument>
- <argument index="1" name="pause_mode_process" type="bool" default="true">
+ <argument index="1" name="pause_mode_process" type="bool" default="null">
</argument>
<description>
</description>
@@ -39728,7 +43882,7 @@
</description>
</method>
<method name="get_edited_scene_root" qualifiers="const">
- <return type="Object">
+ <return type="Node">
</return>
<description>
</description>
@@ -39771,6 +43925,12 @@
<description>
</description>
</method>
+ <method name="get_rpc_sender_id" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="has_group" qualifiers="const">
<return type="bool">
</return>
@@ -39798,12 +43958,6 @@
<description>
</description>
</method>
- <method name="is_editor_hint" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- </description>
- </method>
<method name="is_input_handled">
<return type="bool">
</return>
@@ -39830,14 +43984,18 @@
</description>
</method>
<method name="notify_group">
- <argument index="0" name="call_flags" type="String">
+ <return type="void">
+ </return>
+ <argument index="0" name="group" type="String">
</argument>
- <argument index="1" name="group" type="int">
+ <argument index="1" name="notification" type="int">
</argument>
<description>
</description>
</method>
<method name="notify_group_flags">
+ <return type="void">
+ </return>
<argument index="0" name="call_flags" type="int">
</argument>
<argument index="1" name="group" type="String">
@@ -39848,12 +44006,16 @@
</description>
</method>
<method name="queue_delete">
+ <return type="void">
+ </return>
<argument index="0" name="obj" type="Object">
</argument>
<description>
</description>
</method>
<method name="quit">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -39864,52 +44026,60 @@
</description>
</method>
<method name="set_auto_accept_quit">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_current_scene">
+ <return type="void">
+ </return>
<argument index="0" name="child_node" type="Node">
</argument>
<description>
</description>
</method>
<method name="set_debug_collisions_hint">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_debug_navigation_hint">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_edited_scene_root">
- <argument index="0" name="scene" type="Object">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_editor_hint">
- <argument index="0" name="enable" type="bool">
+ <return type="void">
+ </return>
+ <argument index="0" name="scene" type="Node">
</argument>
<description>
</description>
</method>
<method name="set_group">
- <argument index="0" name="call_flags" type="String">
+ <return type="void">
+ </return>
+ <argument index="0" name="group" type="String">
</argument>
- <argument index="1" name="group" type="String">
+ <argument index="1" name="property" type="String">
</argument>
- <argument index="2" name="property" type="Variant">
+ <argument index="2" name="value" type="Variant">
</argument>
<description>
</description>
</method>
<method name="set_group_flags">
+ <return type="void">
+ </return>
<argument index="0" name="call_flags" type="int">
</argument>
<argument index="1" name="group" type="String">
@@ -39922,10 +44092,14 @@
</description>
</method>
<method name="set_input_as_handled">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="set_network_peer">
+ <return type="void">
+ </return>
<argument index="0" name="peer" type="NetworkedMultiplayerPeer">
</argument>
<description>
@@ -39933,24 +44107,32 @@
</description>
</method>
<method name="set_pause">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_refuse_new_network_connections">
+ <return type="void">
+ </return>
<argument index="0" name="refuse" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_screen_stretch">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="SceneTree.StretchMode">
</argument>
- <argument index="1" name="aspect" type="int">
+ <argument index="1" name="aspect" type="int" enum="SceneTree.StretchAspect">
</argument>
<argument index="2" name="minsize" type="Vector2">
</argument>
+ <argument index="3" name="shrink" type="int" default="null">
+ </argument>
<description>
</description>
</method>
@@ -40055,6 +44237,8 @@
</description>
</method>
<method name="set_time_left">
+ <return type="void">
+ </return>
<argument index="0" name="time" type="float">
</argument>
<description>
@@ -40085,6 +44269,12 @@
Return true if this script can be instance (ie not a library).
</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>
@@ -40092,6 +44282,14 @@
Return the script source code (if available).
</description>
</method>
+ <method name="has_script_signal" qualifiers="const">
+ <return type="bool">
+ </return>
+ <argument index="0" name="signal_name" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="has_source_code" qualifiers="const">
<return type="bool">
</return>
@@ -40108,6 +44306,12 @@
Return true if a given object uses an instance of this script.
</description>
</method>
+ <method name="is_tool" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="reload">
<return type="int">
</return>
@@ -40117,6 +44321,8 @@
</description>
</method>
<method name="set_source_code">
+ <return type="void">
+ </return>
<argument index="0" name="source" type="String">
</argument>
<description>
@@ -40127,6 +44333,46 @@
<constants>
</constants>
</class>
+<class name="ScriptEditor" inherits="PanelContainer" category="Core">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <methods>
+ <method name="get_current_script">
+ <return type="Script">
+ </return>
+ <description>
+ Returns a [Script] that is currently active in editor.
+ </description>
+ </method>
+ <method name="get_open_scripts" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ Returns an array with all [Script] objects which are currently open in editor.
+ </description>
+ </method>
+ </methods>
+ <signals>
+ <signal name="editor_script_changed">
+ <argument index="0" name="script" type="Object">
+ </argument>
+ <description>
+ Emitted when user changed active script. Argument is a freshly activated [Script].
+ </description>
+ </signal>
+ <signal name="script_close">
+ <argument index="0" name="script" type="Object">
+ </argument>
+ <description>
+ Emitted when editor is about to close the active script. Argument is a [Script] that is going to be closed.
+ </description>
+ </signal>
+ </signals>
+ <constants>
+ </constants>
+</class>
<class name="ScrollBar" inherits="Range" category="Core">
<brief_description>
Base class for scroll bars.
@@ -40142,6 +44388,8 @@
</description>
</method>
<method name="set_custom_step">
+ <return type="void">
+ </return>
<argument index="0" name="step" type="float">
</argument>
<description>
@@ -40152,6 +44400,12 @@
<member name="custom_step" type="float" setter="set_custom_step" getter="get_custom_step" brief="">
</member>
</members>
+ <signals>
+ <signal name="scrolling">
+ <description>
+ </description>
+ </signal>
+ </signals>
<constants>
</constants>
</class>
@@ -40192,6 +44446,8 @@
</description>
</method>
<method name="set_enable_h_scroll">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -40199,6 +44455,8 @@
</description>
</method>
<method name="set_enable_v_scroll">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -40206,6 +44464,8 @@
</description>
</method>
<method name="set_h_scroll">
+ <return type="void">
+ </return>
<argument index="0" name="val" type="int">
</argument>
<description>
@@ -40213,6 +44473,8 @@
</description>
</method>
<method name="set_v_scroll">
+ <return type="void">
+ </return>
<argument index="0" name="val" type="int">
</argument>
<description>
@@ -40229,44 +44491,6 @@
<constants>
</constants>
</class>
-<class name="ScriptEditor" inherits="PanelContainer" category="Core">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <methods>
- <method name="get_current_script">
- <return type="Script">
- </return>
- <description>
- Returns a [Script] that is currently active in editor.
- </description>
- </method>
- <method name="get_open_scripts">
- <return type="Array">
- </return>
- <description>
- Returns an array with all [Script] objects which are currently open in editor.
- </description>
- </method>
- </methods>
- <signals>
- <signal name="editor_script_changed">
- <argument index="0" name="script" type="Script">
- </argument>
- <description>
- Emitted when user changed active script. Argument is a freshly activated [Script].
- </description>
- </signal>
- <signal name="script_close">
- <argument index="0" name="script" type="Script">
- </argument>
- <description>
- Emitted when editor is about to close the active script. Argument is a [Script] that is going to be closed.
- </description>
- </signal>
- </signals>
-</class>
<class name="SegmentShape2D" inherits="Shape2D" category="Core">
<brief_description>
Segment Shape for 2D Collision Detection.
@@ -40290,6 +44514,8 @@
</description>
</method>
<method name="set_a">
+ <return type="void">
+ </return>
<argument index="0" name="a" type="Vector2">
</argument>
<description>
@@ -40297,6 +44523,8 @@
</description>
</method>
<method name="set_b">
+ <return type="void">
+ </return>
<argument index="0" name="b" type="Vector2">
</argument>
<description>
@@ -40322,14 +44550,14 @@
</description>
<methods>
<method name="post">
- <return type="Error">
+ <return type="int">
</return>
<description>
Lowers the [Semaphore], allowing one more thread in.
</description>
</method>
<method name="wait">
- <return type="Error">
+ <return type="int">
</return>
<description>
Tries to wait for the [Semaphore], if its value is zero, blocks until non-zero.
@@ -40388,12 +44616,16 @@
</description>
</method>
<method name="set_code">
+ <return type="void">
+ </return>
<argument index="0" name="code" type="String">
</argument>
<description>
</description>
</method>
<method name="set_default_texture_param">
+ <return type="void">
+ </return>
<argument index="0" name="param" type="String">
</argument>
<argument index="1" name="texture" type="Texture">
@@ -40436,12 +44668,16 @@
</description>
</method>
<method name="set_shader">
+ <return type="void">
+ </return>
<argument index="0" name="shader" type="Shader">
</argument>
<description>
</description>
</method>
<method name="set_shader_param">
+ <return type="void">
+ </return>
<argument index="0" name="param" type="String">
</argument>
<argument index="1" name="value" type="Variant">
@@ -40543,6 +44779,8 @@
</description>
</method>
<method name="set_custom_solver_bias">
+ <return type="void">
+ </return>
<argument index="0" name="bias" type="float">
</argument>
<description>
@@ -40591,6 +44829,8 @@
</description>
</method>
<method name="set_shortcut">
+ <return type="void">
+ </return>
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
@@ -40613,6 +44853,8 @@
</description>
<methods>
<method name="add_bone">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -40620,6 +44862,8 @@
</description>
</method>
<method name="bind_child_node_to_bone">
+ <return type="void">
+ </return>
<argument index="0" name="bone_idx" type="int">
</argument>
<argument index="1" name="node" type="Node">
@@ -40629,6 +44873,8 @@
</description>
</method>
<method name="clear_bones">
+ <return type="void">
+ </return>
<description>
Clear all the bones in this skeleton.
</description>
@@ -40727,6 +44973,8 @@
</description>
</method>
<method name="set_bone_custom_pose">
+ <return type="void">
+ </return>
<argument index="0" name="bone_idx" type="int">
</argument>
<argument index="1" name="custom_pose" type="Transform">
@@ -40735,6 +44983,8 @@
</description>
</method>
<method name="set_bone_disable_rest">
+ <return type="void">
+ </return>
<argument index="0" name="bone_idx" type="int">
</argument>
<argument index="1" name="disable" type="bool">
@@ -40743,6 +44993,8 @@
</description>
</method>
<method name="set_bone_global_pose">
+ <return type="void">
+ </return>
<argument index="0" name="bone_idx" type="int">
</argument>
<argument index="1" name="pose" type="Transform">
@@ -40751,6 +45003,8 @@
</description>
</method>
<method name="set_bone_parent">
+ <return type="void">
+ </return>
<argument index="0" name="bone_idx" type="int">
</argument>
<argument index="1" name="parent_idx" type="int">
@@ -40760,6 +45014,8 @@
</description>
</method>
<method name="set_bone_pose">
+ <return type="void">
+ </return>
<argument index="0" name="bone_idx" type="int">
</argument>
<argument index="1" name="pose" type="Transform">
@@ -40769,6 +45025,8 @@
</description>
</method>
<method name="set_bone_rest">
+ <return type="void">
+ </return>
<argument index="0" name="bone_idx" type="int">
</argument>
<argument index="1" name="rest" type="Transform">
@@ -40778,6 +45036,8 @@
</description>
</method>
<method name="unbind_child_node_from_bone">
+ <return type="void">
+ </return>
<argument index="0" name="bone_idx" type="int">
</argument>
<argument index="1" name="node" type="Node">
@@ -40787,6 +45047,8 @@
</description>
</method>
<method name="unparent_bone_and_rest">
+ <return type="void">
+ </return>
<argument index="0" name="bone_idx" type="int">
</argument>
<description>
@@ -40794,7 +45056,7 @@
</method>
</methods>
<constants>
- <constant name="NOTIFICATION_UPDATE_SKELETON" value="50">
+ <constant name="NOTIFICATION_UPDATE_SKELETON" value="50" enum="">
</constant>
</constants>
</class>
@@ -40811,26 +45073,34 @@
</description>
</method>
<method name="set_radiance_size">
- <argument index="0" name="size" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="int" enum="Sky.RadianceSize">
</argument>
<description>
</description>
</method>
</methods>
<members>
- <member name="radiance_size" type="int" setter="set_radiance_size" getter="get_radiance_size" brief="">
+ <member name="radiance_size" type="int" setter="set_radiance_size" getter="get_radiance_size" brief="" enum="Sky.RadianceSize">
</member>
</members>
<constants>
- <constant name="RADIANCE_SIZE_256" value="0">
+ <constant name="RADIANCE_SIZE_32" value="0">
+ </constant>
+ <constant name="RADIANCE_SIZE_64" value="1">
</constant>
- <constant name="RADIANCE_SIZE_512" value="1">
+ <constant name="RADIANCE_SIZE_128" value="2">
</constant>
- <constant name="RADIANCE_SIZE_1024" value="2">
+ <constant name="RADIANCE_SIZE_256" value="3">
</constant>
- <constant name="RADIANCE_SIZE_2048" value="3">
+ <constant name="RADIANCE_SIZE_512" value="4">
</constant>
- <constant name="RADIANCE_SIZE_MAX" value="4">
+ <constant name="RADIANCE_SIZE_1024" value="5">
+ </constant>
+ <constant name="RADIANCE_SIZE_2048" value="6">
+ </constant>
+ <constant name="RADIANCE_SIZE_MAX" value="7">
</constant>
</constants>
</class>
@@ -40863,12 +45133,16 @@
</description>
</method>
<method name="set_editable">
+ <return type="void">
+ </return>
<argument index="0" name="editable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_ticks">
+ <return type="void">
+ </return>
<argument index="0" name="count" type="int">
</argument>
<description>
@@ -40876,6 +45150,8 @@
</description>
</method>
<method name="set_ticks_on_borders">
+ <return type="void">
+ </return>
<argument index="0" name="ticks_on_border" type="bool">
</argument>
<description>
@@ -40886,7 +45162,7 @@
<members>
<member name="editable" type="bool" setter="set_editable" getter="is_editable" brief="">
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" brief="">
+ <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" brief="" enum="Control.FocusMode">
</member>
<member name="tick_count" type="int" setter="set_ticks" getter="get_ticks" brief="">
</member>
@@ -40905,13 +45181,15 @@
<method name="get_param" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="param" type="int">
+ <argument index="0" name="param" type="int" enum="SliderJoint.Param">
</argument>
<description>
</description>
</method>
<method name="set_param">
- <argument index="0" name="param" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="SliderJoint.Param">
</argument>
<argument index="1" name="value" type="float">
</argument>
@@ -41036,7 +45314,7 @@
</description>
</method>
<method name="get_parent_spatial" qualifiers="const">
- <return type="Object">
+ <return type="Spatial">
</return>
<description>
Return the parent [Spatial], or an empty [Object] if no parent exists or parent is not of type [Spatial].
@@ -41082,6 +45360,8 @@
</description>
</method>
<method name="global_rotate">
+ <return type="void">
+ </return>
<argument index="0" name="normal" type="Vector3">
</argument>
<argument index="1" name="radians" type="float">
@@ -41090,12 +45370,16 @@
</description>
</method>
<method name="global_translate">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="hide">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -41130,6 +45414,8 @@
</description>
</method>
<method name="look_at">
+ <return type="void">
+ </return>
<argument index="0" name="target" type="Vector3">
</argument>
<argument index="1" name="up" type="Vector3">
@@ -41138,6 +45424,8 @@
</description>
</method>
<method name="look_at_from_pos">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector3">
</argument>
<argument index="1" name="target" type="Vector3">
@@ -41148,10 +45436,14 @@
</description>
</method>
<method name="orthonormalize">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="rotate">
+ <return type="void">
+ </return>
<argument index="0" name="normal" type="Vector3">
</argument>
<argument index="1" name="radians" type="float">
@@ -41160,36 +45452,48 @@
</description>
</method>
<method name="rotate_x">
+ <return type="void">
+ </return>
<argument index="0" name="radians" type="float">
</argument>
<description>
</description>
</method>
<method name="rotate_y">
+ <return type="void">
+ </return>
<argument index="0" name="radians" type="float">
</argument>
<description>
</description>
</method>
<method name="rotate_z">
+ <return type="void">
+ </return>
<argument index="0" name="radians" type="float">
</argument>
<description>
</description>
</method>
<method name="set_as_toplevel">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_gizmo">
+ <return type="void">
+ </return>
<argument index="0" name="gizmo" type="SpatialGizmo">
</argument>
<description>
</description>
</method>
<method name="set_global_transform">
+ <return type="void">
+ </return>
<argument index="0" name="global" type="Transform">
</argument>
<description>
@@ -41197,28 +45501,38 @@
</description>
</method>
<method name="set_identity">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="set_ignore_transform_notification">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_notify_local_transform">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_notify_transform">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_rotation">
+ <return type="void">
+ </return>
<argument index="0" name="rotation_rad" type="Vector3">
</argument>
<description>
@@ -41226,6 +45540,8 @@
</description>
</method>
<method name="set_rotation_deg">
+ <return type="void">
+ </return>
<argument index="0" name="rotation_deg" type="Vector3">
</argument>
<description>
@@ -41233,12 +45549,16 @@
</description>
</method>
<method name="set_scale">
+ <return type="void">
+ </return>
<argument index="0" name="scale" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_transform">
+ <return type="void">
+ </return>
<argument index="0" name="local" type="Transform">
</argument>
<description>
@@ -41246,28 +45566,54 @@
</description>
</method>
<method name="set_translation">
+ <return type="void">
+ </return>
<argument index="0" name="translation" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_visible">
- <argument index="0" name="arg0" type="bool">
+ <return type="void">
+ </return>
+ <argument index="0" name="visible" type="bool">
</argument>
<description>
</description>
</method>
<method name="show">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="to_global" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="local_point" type="Vector3">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="to_local" qualifiers="const">
+ <return type="Vector3">
+ </return>
+ <argument index="0" name="global_point" type="Vector3">
+ </argument>
<description>
</description>
</method>
<method name="translate">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="update_gizmo">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -41295,14 +45641,14 @@
</signal>
</signals>
<constants>
- <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="29">
+ <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="29" enum="">
Spatial nodes receive this notification with their global transform changes. This means that either the current or a parent node changed its transform.
</constant>
- <constant name="NOTIFICATION_ENTER_WORLD" value="41">
+ <constant name="NOTIFICATION_ENTER_WORLD" value="41" enum="">
</constant>
- <constant name="NOTIFICATION_EXIT_WORLD" value="42">
+ <constant name="NOTIFICATION_EXIT_WORLD" value="42" enum="">
</constant>
- <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="43">
+ <constant name="NOTIFICATION_VISIBILITY_CHANGED" value="43" enum="">
</constant>
</constants>
</class>
@@ -41328,12 +45674,24 @@
<description>
</description>
</method>
+ <method name="get_alpha_scissor_threshold" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_anisotropy" qualifiers="const">
<return type="float">
</return>
<description>
</description>
</method>
+ <method name="get_ao_texture_channel" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_billboard_mode" qualifiers="const">
<return type="int">
</return>
@@ -41421,7 +45779,7 @@
<method name="get_feature" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="feature" type="int">
+ <argument index="0" name="feature" type="int" enum="SpatialMaterial.Feature">
</argument>
<description>
</description>
@@ -41429,7 +45787,7 @@
<method name="get_flag" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="arg0" type="int">
+ <argument index="0" name="flag" type="int" enum="SpatialMaterial.Flags">
</argument>
<description>
</description>
@@ -41452,6 +45810,12 @@
<description>
</description>
</method>
+ <method name="get_metallic_texture_channel" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_normal_scale" qualifiers="const">
<return type="float">
</return>
@@ -41488,6 +45852,12 @@
<description>
</description>
</method>
+ <method name="get_refraction_texture_channel" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_rim" qualifiers="const">
<return type="float">
</return>
@@ -41506,6 +45876,12 @@
<description>
</description>
</method>
+ <method name="get_roughness_texture_channel" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_specular" qualifiers="const">
<return type="float">
</return>
@@ -41527,7 +45903,7 @@
<method name="get_texture" qualifiers="const">
<return type="Texture">
</return>
- <argument index="0" name="param" type="Texture">
+ <argument index="0" name="param" type="int" enum="SpatialMaterial.TextureParam">
</argument>
<description>
</description>
@@ -41581,109 +45957,161 @@
</description>
</method>
<method name="set_albedo">
+ <return type="void">
+ </return>
<argument index="0" name="albedo" type="Color">
</argument>
<description>
</description>
</method>
+ <method name="set_alpha_scissor_threshold">
+ <return type="void">
+ </return>
+ <argument index="0" name="threshold" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_anisotropy">
+ <return type="void">
+ </return>
<argument index="0" name="anisotropy" type="float">
</argument>
<description>
</description>
</method>
+ <method name="set_ao_texture_channel">
+ <return type="void">
+ </return>
+ <argument index="0" name="channel" type="int" enum="SpatialMaterial.TextureChannel">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_billboard_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="SpatialMaterial.BillboardMode">
</argument>
<description>
</description>
</method>
<method name="set_blend_mode">
- <argument index="0" name="blend_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="blend_mode" type="int" enum="SpatialMaterial.BlendMode">
</argument>
<description>
</description>
</method>
<method name="set_clearcoat">
+ <return type="void">
+ </return>
<argument index="0" name="clearcoat" type="float">
</argument>
<description>
</description>
</method>
<method name="set_clearcoat_gloss">
+ <return type="void">
+ </return>
<argument index="0" name="clearcoat_gloss" type="float">
</argument>
<description>
</description>
</method>
<method name="set_cull_mode">
- <argument index="0" name="cull_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="cull_mode" type="int" enum="SpatialMaterial.CullMode">
</argument>
<description>
</description>
</method>
<method name="set_depth_deep_parallax">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_depth_deep_parallax_max_layers">
+ <return type="void">
+ </return>
<argument index="0" name="layer" type="int">
</argument>
<description>
</description>
</method>
<method name="set_depth_deep_parallax_min_layers">
+ <return type="void">
+ </return>
<argument index="0" name="layer" type="int">
</argument>
<description>
</description>
</method>
<method name="set_depth_draw_mode">
- <argument index="0" name="depth_draw_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="depth_draw_mode" type="int" enum="SpatialMaterial.DepthDrawMode">
</argument>
<description>
</description>
</method>
<method name="set_depth_scale">
+ <return type="void">
+ </return>
<argument index="0" name="depth_scale" type="float">
</argument>
<description>
</description>
</method>
<method name="set_detail_blend_mode">
- <argument index="0" name="detail_blend_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="detail_blend_mode" type="int" enum="SpatialMaterial.BlendMode">
</argument>
<description>
</description>
</method>
<method name="set_detail_uv">
- <argument index="0" name="detail_uv" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="detail_uv" type="int" enum="SpatialMaterial.DetailUV">
</argument>
<description>
</description>
</method>
<method name="set_diffuse_mode">
- <argument index="0" name="diffuse_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="diffuse_mode" type="int" enum="SpatialMaterial.DiffuseMode">
</argument>
<description>
</description>
</method>
<method name="set_emission">
+ <return type="void">
+ </return>
<argument index="0" name="emission" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_emission_energy">
+ <return type="void">
+ </return>
<argument index="0" name="emission_energy" type="float">
</argument>
<description>
</description>
</method>
<method name="set_feature">
- <argument index="0" name="feature" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="feature" type="int" enum="SpatialMaterial.Feature">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
@@ -41691,7 +46119,9 @@
</description>
</method>
<method name="set_flag">
- <argument index="0" name="flag" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="SpatialMaterial.Flags">
</argument>
<argument index="1" name="enable" type="bool">
</argument>
@@ -41699,140 +46129,210 @@
</description>
</method>
<method name="set_grow">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="float">
</argument>
<description>
</description>
</method>
<method name="set_grow_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_line_width">
+ <return type="void">
+ </return>
<argument index="0" name="line_width" type="float">
</argument>
<description>
</description>
</method>
<method name="set_metallic">
+ <return type="void">
+ </return>
<argument index="0" name="metallic" type="float">
</argument>
<description>
</description>
</method>
+ <method name="set_metallic_texture_channel">
+ <return type="void">
+ </return>
+ <argument index="0" name="channel" type="int" enum="SpatialMaterial.TextureChannel">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_normal_scale">
+ <return type="void">
+ </return>
<argument index="0" name="normal_scale" type="float">
</argument>
<description>
</description>
</method>
<method name="set_particles_anim_h_frames">
+ <return type="void">
+ </return>
<argument index="0" name="frames" type="int">
</argument>
<description>
</description>
</method>
<method name="set_particles_anim_loop">
+ <return type="void">
+ </return>
<argument index="0" name="frames" type="int">
</argument>
<description>
</description>
</method>
<method name="set_particles_anim_v_frames">
+ <return type="void">
+ </return>
<argument index="0" name="frames" type="int">
</argument>
<description>
</description>
</method>
<method name="set_point_size">
+ <return type="void">
+ </return>
<argument index="0" name="point_size" type="float">
</argument>
<description>
</description>
</method>
<method name="set_refraction">
+ <return type="void">
+ </return>
<argument index="0" name="refraction" type="float">
</argument>
<description>
</description>
</method>
+ <method name="set_refraction_texture_channel">
+ <return type="void">
+ </return>
+ <argument index="0" name="channel" type="int" enum="SpatialMaterial.TextureChannel">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_rim">
+ <return type="void">
+ </return>
<argument index="0" name="rim" type="float">
</argument>
<description>
</description>
</method>
<method name="set_rim_tint">
+ <return type="void">
+ </return>
<argument index="0" name="rim_tint" type="float">
</argument>
<description>
</description>
</method>
<method name="set_roughness">
+ <return type="void">
+ </return>
<argument index="0" name="roughness" type="float">
</argument>
<description>
</description>
</method>
+ <method name="set_roughness_texture_channel">
+ <return type="void">
+ </return>
+ <argument index="0" name="channel" type="int" enum="SpatialMaterial.TextureChannel">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_specular">
+ <return type="void">
+ </return>
<argument index="0" name="specular" type="float">
</argument>
<description>
</description>
</method>
<method name="set_specular_mode">
- <argument index="0" name="specular_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="specular_mode" type="int" enum="SpatialMaterial.SpecularMode">
</argument>
<description>
</description>
</method>
<method name="set_subsurface_scattering_strength">
+ <return type="void">
+ </return>
<argument index="0" name="strength" type="float">
</argument>
<description>
</description>
</method>
<method name="set_texture">
- <argument index="0" name="param" type="Texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="param" type="int" enum="SpatialMaterial.TextureParam">
</argument>
- <argument index="1" name="texture" type="Object">
+ <argument index="1" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_uv1_offset">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_uv1_scale">
+ <return type="void">
+ </return>
<argument index="0" name="scale" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_uv1_triplanar_blend_sharpness">
+ <return type="void">
+ </return>
<argument index="0" name="sharpness" type="float">
</argument>
<description>
</description>
</method>
<method name="set_uv2_offset">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_uv2_scale">
+ <return type="void">
+ </return>
<argument index="0" name="scale" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_uv2_triplanar_blend_sharpness">
+ <return type="void">
+ </return>
<argument index="0" name="sharpness" type="float">
</argument>
<description>
@@ -41856,6 +46356,8 @@
</member>
<member name="ao_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
</member>
+ <member name="ao_texture_channel" type="int" setter="set_ao_texture_channel" getter="get_ao_texture_channel" brief="" enum="SpatialMaterial.TextureChannel">
+ </member>
<member name="clearcoat" type="float" setter="set_clearcoat" getter="get_clearcoat" brief="">
</member>
<member name="clearcoat_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
@@ -41878,7 +46380,7 @@
</member>
<member name="detail_albedo" type="Texture" setter="set_texture" getter="get_texture" brief="">
</member>
- <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" brief="">
+ <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" brief="" enum="SpatialMaterial.BlendMode">
</member>
<member name="detail_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
</member>
@@ -41886,7 +46388,7 @@
</member>
<member name="detail_normal" type="Texture" setter="set_texture" getter="get_texture" brief="">
</member>
- <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" brief="">
+ <member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" brief="" enum="SpatialMaterial.DetailUV">
</member>
<member name="emission" type="Color" setter="set_emission" getter="get_emission" brief="">
</member>
@@ -41898,7 +46400,7 @@
</member>
<member name="flags_fixed_size" type="bool" setter="set_flag" getter="get_flag" brief="">
</member>
- <member name="flags_on_top" type="bool" setter="set_flag" getter="get_flag" brief="">
+ <member name="flags_no_depth_test" type="bool" setter="set_flag" getter="get_flag" brief="">
</member>
<member name="flags_transparent" type="bool" setter="set_feature" getter="get_feature" brief="">
</member>
@@ -41906,27 +46408,33 @@
</member>
<member name="flags_use_point_size" type="bool" setter="set_flag" getter="get_flag" brief="">
</member>
+ <member name="flags_vertex_lighting" type="bool" setter="set_flag" getter="get_flag" brief="">
+ </member>
<member name="metallic" type="float" setter="set_metallic" getter="get_metallic" brief="">
</member>
<member name="metallic_specular" type="float" setter="set_specular" getter="get_specular" brief="">
</member>
<member name="metallic_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
</member>
+ <member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" brief="" enum="SpatialMaterial.TextureChannel">
+ </member>
<member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
</member>
<member name="normal_scale" type="float" setter="set_normal_scale" getter="get_normal_scale" brief="">
</member>
<member name="normal_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
</member>
- <member name="params_billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" brief="">
+ <member name="params_alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold" brief="">
+ </member>
+ <member name="params_billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" brief="" enum="SpatialMaterial.BillboardMode">
</member>
- <member name="params_blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" brief="">
+ <member name="params_blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" brief="" enum="SpatialMaterial.BlendMode">
</member>
- <member name="params_cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" brief="">
+ <member name="params_cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" brief="" enum="SpatialMaterial.CullMode">
</member>
- <member name="params_depth_draw_mode" type="int" setter="set_depth_draw_mode" getter="get_depth_draw_mode" brief="">
+ <member name="params_depth_draw_mode" type="int" setter="set_depth_draw_mode" getter="get_depth_draw_mode" brief="" enum="SpatialMaterial.DepthDrawMode">
</member>
- <member name="params_diffuse_mode" type="int" setter="set_diffuse_mode" getter="get_diffuse_mode" brief="">
+ <member name="params_diffuse_mode" type="int" setter="set_diffuse_mode" getter="get_diffuse_mode" brief="" enum="SpatialMaterial.DiffuseMode">
</member>
<member name="params_grow" type="bool" setter="set_grow_enabled" getter="is_grow_enabled" brief="">
</member>
@@ -41936,11 +46444,13 @@
</member>
<member name="params_point_size" type="float" setter="set_point_size" getter="get_point_size" brief="">
</member>
- <member name="params_specular_mode" type="int" setter="set_specular_mode" getter="get_specular_mode" brief="">
+ <member name="params_specular_mode" type="int" setter="set_specular_mode" getter="get_specular_mode" brief="" enum="SpatialMaterial.SpecularMode">
+ </member>
+ <member name="params_use_alpha_scissor" type="bool" setter="set_flag" getter="get_flag" brief="">
</member>
<member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames" brief="">
</member>
- <member name="particles_anim_loop" type="bool" setter="set_particles_anim_loop" getter="get_particles_anim_loop" brief="">
+ <member name="particles_anim_loop" type="int" setter="set_particles_anim_loop" getter="get_particles_anim_loop" brief="">
</member>
<member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames" brief="">
</member>
@@ -41950,6 +46460,8 @@
</member>
<member name="refraction_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
</member>
+ <member name="refraction_texture_channel" type="int" setter="set_refraction_texture_channel" getter="get_refraction_texture_channel" brief="" enum="SpatialMaterial.TextureChannel">
+ </member>
<member name="rim" type="float" setter="set_rim" getter="get_rim" brief="">
</member>
<member name="rim_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
@@ -41962,6 +46474,8 @@
</member>
<member name="roughness_texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
</member>
+ <member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" brief="" enum="SpatialMaterial.TextureChannel">
+ </member>
<member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" brief="">
</member>
<member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength" brief="">
@@ -42074,17 +46588,27 @@
</constant>
<constant name="FLAG_UNSHADED" value="0">
</constant>
- <constant name="FLAG_ONTOP" value="1">
+ <constant name="FLAG_USE_VERTEX_LIGHTING" value="1">
+ </constant>
+ <constant name="FLAG_DISABLE_DEPTH_TEST" value="2">
+ </constant>
+ <constant name="FLAG_ALBEDO_FROM_VERTEX_COLOR" value="3">
+ </constant>
+ <constant name="FLAG_SRGB_VERTEX_COLOR" value="4">
+ </constant>
+ <constant name="FLAG_USE_POINT_SIZE" value="5">
</constant>
- <constant name="FLAG_ALBEDO_FROM_VERTEX_COLOR" value="2">
+ <constant name="FLAG_FIXED_SIZE" value="6">
</constant>
- <constant name="FLAG_SRGB_VERTEX_COLOR" value="3">
+ <constant name="FLAG_UV1_USE_TRIPLANAR" value="7">
</constant>
- <constant name="FLAG_USE_POINT_SIZE" value="4">
+ <constant name="FLAG_UV2_USE_TRIPLANAR" value="8">
</constant>
- <constant name="FLAG_FIXED_SIZE" value="5">
+ <constant name="FLAG_AO_ON_UV2" value="9">
</constant>
- <constant name="FLAG_MAX" value="9">
+ <constant name="FLAG_USE_ALPHA_SCISSOR" value="10">
+ </constant>
+ <constant name="FLAG_MAX" value="11">
</constant>
<constant name="DIFFUSE_LAMBERT" value="0">
</constant>
@@ -42114,6 +46638,16 @@
</constant>
<constant name="BILLBOARD_PARTICLES" value="3">
</constant>
+ <constant name="TEXTURE_CHANNEL_RED" value="0">
+ </constant>
+ <constant name="TEXTURE_CHANNEL_GREEN" value="1">
+ </constant>
+ <constant name="TEXTURE_CHANNEL_BLUE" value="2">
+ </constant>
+ <constant name="TEXTURE_CHANNEL_ALPHA" value="3">
+ </constant>
+ <constant name="TEXTURE_CHANNEL_GRAYSCALE" value="4">
+ </constant>
</constants>
</class>
<class name="SpatialVelocityTracker" inherits="Reference" category="Core">
@@ -42135,18 +46669,24 @@
</description>
</method>
<method name="reset">
+ <return type="void">
+ </return>
<argument index="0" name="position" type="Vector3">
</argument>
<description>
</description>
</method>
<method name="set_track_fixed_step">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="update_position">
+ <return type="void">
+ </return>
<argument index="0" name="position" type="Vector3">
</argument>
<description>
@@ -42193,30 +46733,40 @@
</description>
</method>
<method name="set_height">
+ <return type="void">
+ </return>
<argument index="0" name="height" type="float">
</argument>
<description>
</description>
</method>
<method name="set_is_hemisphere">
+ <return type="void">
+ </return>
<argument index="0" name="is_hemisphere" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_radial_segments">
+ <return type="void">
+ </return>
<argument index="0" name="radial_segments" type="int">
</argument>
<description>
</description>
</method>
<method name="set_radius">
+ <return type="void">
+ </return>
<argument index="0" name="radius" type="float">
</argument>
<description>
</description>
</method>
<method name="set_rings">
+ <return type="void">
+ </return>
<argument index="0" name="rings" type="int">
</argument>
<description>
@@ -42251,6 +46801,8 @@
</description>
</method>
<method name="set_radius">
+ <return type="void">
+ </return>
<argument index="0" name="radius" type="float">
</argument>
<description>
@@ -42273,7 +46825,7 @@
</description>
<methods>
<method name="get_line_edit">
- <return type="Object">
+ <return type="LineEdit">
</return>
<description>
</description>
@@ -42299,6 +46851,8 @@
</description>
</method>
<method name="set_editable">
+ <return type="void">
+ </return>
<argument index="0" name="editable" type="bool">
</argument>
<description>
@@ -42306,6 +46860,8 @@
</description>
</method>
<method name="set_prefix">
+ <return type="void">
+ </return>
<argument index="0" name="prefix" type="String">
</argument>
<description>
@@ -42313,6 +46869,8 @@
</description>
</method>
<method name="set_suffix">
+ <return type="void">
+ </return>
<argument index="0" name="suffix" type="String">
</argument>
<description>
@@ -42365,6 +46923,8 @@
</description>
</method>
<method name="set_collapsed">
+ <return type="void">
+ </return>
<argument index="0" name="collapsed" type="bool">
</argument>
<description>
@@ -42372,13 +46932,17 @@
</description>
</method>
<method name="set_dragger_visibility">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="SplitContainer.DraggerVisibility">
</argument>
<description>
Set visibility of the split dragger ([i]mode[/i] must be one of [DRAGGER_VISIBLE], [DRAGGER_HIDDEN] or [DRAGGER_HIDDEN_COLLAPSED]).
</description>
</method>
<method name="set_split_offset">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="int">
</argument>
<description>
@@ -42389,7 +46953,7 @@
<members>
<member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed" brief="">
</member>
- <member name="dragger_visibility" type="int" setter="set_dragger_visibility" getter="get_dragger_visibility" brief="">
+ <member name="dragger_visibility" type="int" setter="set_dragger_visibility" getter="get_dragger_visibility" brief="" enum="SplitContainer.DraggerVisibility">
</member>
<member name="split_offset" type="int" setter="set_split_offset" getter="get_split_offset" brief="">
</member>
@@ -42528,6 +47092,8 @@
</description>
</method>
<method name="set_centered">
+ <return type="void">
+ </return>
<argument index="0" name="centered" type="bool">
</argument>
<description>
@@ -42535,6 +47101,8 @@
</description>
</method>
<method name="set_flip_h">
+ <return type="void">
+ </return>
<argument index="0" name="flip_h" type="bool">
</argument>
<description>
@@ -42542,6 +47110,8 @@
</description>
</method>
<method name="set_flip_v">
+ <return type="void">
+ </return>
<argument index="0" name="flip_v" type="bool">
</argument>
<description>
@@ -42549,6 +47119,8 @@
</description>
</method>
<method name="set_frame">
+ <return type="void">
+ </return>
<argument index="0" name="frame" type="int">
</argument>
<description>
@@ -42556,6 +47128,8 @@
</description>
</method>
<method name="set_hframes">
+ <return type="void">
+ </return>
<argument index="0" name="hframes" type="int">
</argument>
<description>
@@ -42563,12 +47137,16 @@
</description>
</method>
<method name="set_normal_map">
+ <return type="void">
+ </return>
<argument index="0" name="normal_map" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_offset">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
@@ -42576,6 +47154,8 @@
</description>
</method>
<method name="set_region">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -42583,12 +47163,16 @@
</description>
</method>
<method name="set_region_filter_clip">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_region_rect">
+ <return type="void">
+ </return>
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
@@ -42596,6 +47180,8 @@
</description>
</method>
<method name="set_texture">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
@@ -42603,6 +47189,8 @@
</description>
</method>
<method name="set_vframes">
+ <return type="void">
+ </return>
<argument index="0" name="vframes" type="int">
</argument>
<description>
@@ -42692,36 +47280,48 @@
</description>
</method>
<method name="set_frame">
+ <return type="void">
+ </return>
<argument index="0" name="frame" type="int">
</argument>
<description>
</description>
</method>
<method name="set_hframes">
+ <return type="void">
+ </return>
<argument index="0" name="hframes" type="int">
</argument>
<description>
</description>
</method>
<method name="set_region">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_region_rect">
+ <return type="void">
+ </return>
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
</description>
</method>
<method name="set_texture">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_vframes">
+ <return type="void">
+ </return>
<argument index="0" name="vframes" type="int">
</argument>
<description>
@@ -42772,7 +47372,7 @@
<method name="get_draw_flag" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="flag" type="int">
+ <argument index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags">
</argument>
<description>
</description>
@@ -42826,25 +47426,33 @@
</description>
</method>
<method name="set_alpha_cut_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="SpriteBase3D.AlphaCutMode">
</argument>
<description>
</description>
</method>
<method name="set_axis">
- <argument index="0" name="axis" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="axis" type="int" enum="Vector3.Axis">
</argument>
<description>
</description>
</method>
<method name="set_centered">
+ <return type="void">
+ </return>
<argument index="0" name="centered" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_draw_flag">
- <argument index="0" name="flag" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags">
</argument>
<argument index="1" name="enabled" type="bool">
</argument>
@@ -42852,36 +47460,48 @@
</description>
</method>
<method name="set_flip_h">
+ <return type="void">
+ </return>
<argument index="0" name="flip_h" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_flip_v">
+ <return type="void">
+ </return>
<argument index="0" name="flip_v" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_modulate">
+ <return type="void">
+ </return>
<argument index="0" name="modulate" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_offset">
+ <return type="void">
+ </return>
<argument index="0" name="offset" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_opacity">
+ <return type="void">
+ </return>
<argument index="0" name="opacity" type="float">
</argument>
<description>
</description>
</method>
<method name="set_pixel_size">
+ <return type="void">
+ </return>
<argument index="0" name="pixel_size" type="float">
</argument>
<description>
@@ -42889,9 +47509,9 @@
</method>
</methods>
<members>
- <member name="alpha_cut" type="int" setter="set_alpha_cut_mode" getter="get_alpha_cut_mode" brief="">
+ <member name="alpha_cut" type="int" setter="set_alpha_cut_mode" getter="get_alpha_cut_mode" brief="" enum="SpriteBase3D.AlphaCutMode">
</member>
- <member name="axis" type="int" setter="set_axis" getter="get_axis" brief="">
+ <member name="axis" type="int" setter="set_axis" getter="get_axis" brief="" enum="Vector3.Axis">
</member>
<member name="centered" type="bool" setter="set_centered" getter="is_centered" brief="">
</member>
@@ -42940,28 +47560,36 @@
</description>
<methods>
<method name="add_animation">
+ <return type="void">
+ </return>
<argument index="0" name="anim" type="String">
</argument>
<description>
</description>
</method>
<method name="add_frame">
+ <return type="void">
+ </return>
<argument index="0" name="anim" type="String">
</argument>
- <argument index="1" name="frame" type="Object">
+ <argument index="1" name="frame" type="Texture">
</argument>
- <argument index="2" name="atpos" type="int" default="-1">
+ <argument index="2" name="atpos" type="int" default="null">
</argument>
<description>
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<argument index="0" name="anim" type="String">
</argument>
<description>
</description>
</method>
<method name="clear_all">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -42982,7 +47610,7 @@
</description>
</method>
<method name="get_frame" qualifiers="const">
- <return type="Object">
+ <return type="Texture">
</return>
<argument index="0" name="anim" type="String">
</argument>
@@ -43008,12 +47636,16 @@
</description>
</method>
<method name="remove_animation">
+ <return type="void">
+ </return>
<argument index="0" name="anim" type="String">
</argument>
<description>
</description>
</method>
<method name="remove_frame">
+ <return type="void">
+ </return>
<argument index="0" name="anim" type="String">
</argument>
<argument index="1" name="idx" type="int">
@@ -43022,6 +47654,8 @@
</description>
</method>
<method name="rename_animation">
+ <return type="void">
+ </return>
<argument index="0" name="anim" type="String">
</argument>
<argument index="1" name="newname" type="String">
@@ -43030,6 +47664,8 @@
</description>
</method>
<method name="set_animation_loop">
+ <return type="void">
+ </return>
<argument index="0" name="anim" type="String">
</argument>
<argument index="1" name="loop" type="bool">
@@ -43038,6 +47674,8 @@
</description>
</method>
<method name="set_animation_speed">
+ <return type="void">
+ </return>
<argument index="0" name="anim" type="String">
</argument>
<argument index="1" name="speed" type="float">
@@ -43046,11 +47684,13 @@
</description>
</method>
<method name="set_frame">
+ <return type="void">
+ </return>
<argument index="0" name="anim" type="String">
</argument>
<argument index="1" name="idx" type="int">
</argument>
- <argument index="2" name="txt" type="Object">
+ <argument index="2" name="txt" type="Texture">
</argument>
<description>
</description>
@@ -43104,6 +47744,8 @@
</description>
</method>
<method name="set_bounce">
+ <return type="void">
+ </return>
<argument index="0" name="bounce" type="float">
</argument>
<description>
@@ -43111,6 +47753,8 @@
</description>
</method>
<method name="set_constant_angular_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="vel" type="Vector3">
</argument>
<description>
@@ -43118,6 +47762,8 @@
</description>
</method>
<method name="set_constant_linear_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="vel" type="Vector3">
</argument>
<description>
@@ -43125,6 +47771,8 @@
</description>
</method>
<method name="set_friction">
+ <return type="void">
+ </return>
<argument index="0" name="friction" type="float">
</argument>
<description>
@@ -43184,6 +47832,8 @@
</description>
</method>
<method name="set_bounce">
+ <return type="void">
+ </return>
<argument index="0" name="bounce" type="float">
</argument>
<description>
@@ -43191,6 +47841,8 @@
</description>
</method>
<method name="set_constant_angular_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="vel" type="float">
</argument>
<description>
@@ -43198,6 +47850,8 @@
</description>
</method>
<method name="set_constant_linear_velocity">
+ <return type="void">
+ </return>
<argument index="0" name="vel" type="Vector2">
</argument>
<description>
@@ -43205,6 +47859,8 @@
</description>
</method>
<method name="set_friction">
+ <return type="void">
+ </return>
<argument index="0" name="friction" type="float">
</argument>
<description>
@@ -43343,7 +47999,7 @@
<argument index="0" name="bytes" type="int">
</argument>
<description>
- Get an utf8 string with byte-length "bytes" from the stream (this decodes the string sent as utf8).
+ Get a utf8 string with byte-length "bytes" from the stream (this decodes the string sent as utf8).
</description>
</method>
<method name="get_var">
@@ -43361,6 +48017,8 @@
</description>
</method>
<method name="put_16">
+ <return type="void">
+ </return>
<argument index="0" name="val" type="int">
</argument>
<description>
@@ -43368,6 +48026,8 @@
</description>
</method>
<method name="put_32">
+ <return type="void">
+ </return>
<argument index="0" name="val" type="int">
</argument>
<description>
@@ -43375,6 +48035,8 @@
</description>
</method>
<method name="put_64">
+ <return type="void">
+ </return>
<argument index="0" name="val" type="int">
</argument>
<description>
@@ -43382,6 +48044,8 @@
</description>
</method>
<method name="put_8">
+ <return type="void">
+ </return>
<argument index="0" name="val" type="int">
</argument>
<description>
@@ -43398,6 +48062,8 @@
</description>
</method>
<method name="put_double">
+ <return type="void">
+ </return>
<argument index="0" name="val" type="float">
</argument>
<description>
@@ -43405,6 +48071,8 @@
</description>
</method>
<method name="put_float">
+ <return type="void">
+ </return>
<argument index="0" name="val" type="float">
</argument>
<description>
@@ -43421,6 +48089,8 @@
</description>
</method>
<method name="put_u16">
+ <return type="void">
+ </return>
<argument index="0" name="val" type="int">
</argument>
<description>
@@ -43428,6 +48098,8 @@
</description>
</method>
<method name="put_u32">
+ <return type="void">
+ </return>
<argument index="0" name="val" type="int">
</argument>
<description>
@@ -43435,6 +48107,8 @@
</description>
</method>
<method name="put_u64">
+ <return type="void">
+ </return>
<argument index="0" name="val" type="int">
</argument>
<description>
@@ -43442,6 +48116,8 @@
</description>
</method>
<method name="put_u8">
+ <return type="void">
+ </return>
<argument index="0" name="val" type="int">
</argument>
<description>
@@ -43449,6 +48125,8 @@
</description>
</method>
<method name="put_utf8_string">
+ <return type="void">
+ </return>
<argument index="0" name="val" type="String">
</argument>
<description>
@@ -43456,6 +48134,8 @@
</description>
</method>
<method name="put_var">
+ <return type="void">
+ </return>
<argument index="0" name="val" type="Variant">
</argument>
<description>
@@ -43463,6 +48143,8 @@
</description>
</method>
<method name="set_big_endian">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -43480,6 +48162,8 @@
</description>
<methods>
<method name="clear">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -43508,18 +48192,24 @@
</description>
</method>
<method name="resize">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="int">
</argument>
<description>
</description>
</method>
<method name="seek">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="int">
</argument>
<description>
</description>
</method>
<method name="set_data_array">
+ <return type="void">
+ </return>
<argument index="0" name="data" type="PoolByteArray">
</argument>
<description>
@@ -43538,7 +48228,7 @@
</description>
<methods>
<method name="accept_stream">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="stream" type="StreamPeer">
</argument>
@@ -43546,19 +48236,21 @@
</description>
</method>
<method name="connect_to_stream">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="stream" type="StreamPeer">
</argument>
<argument index="1" name="validate_certs" type="bool" default="false">
</argument>
- <argument index="2" name="for_hostname" type="String" default="&quot;&quot;">
+ <argument index="2" name="for_hostname" type="String" default="null">
</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".
</description>
</method>
<method name="disconnect_from_stream">
+ <return type="void">
+ </return>
<description>
Disconnect from host.
</description>
@@ -43606,6 +48298,8 @@
</description>
</method>
<method name="disconnect_from_host">
+ <return type="void">
+ </return>
<description>
Disconnect from host.
</description>
@@ -44032,7 +48726,7 @@
<return type="int">
</return>
<description>
- Convert a string containing an hexadecimal number into an int.
+ Convert a string containing a hexadecimal number into an int.
</description>
</method>
<method name="insert">
@@ -44415,6 +49109,8 @@
</description>
<methods>
<method name="draw" qualifiers="const">
+ <return type="void">
+ </return>
<argument index="0" name="canvas_item" type="RID">
</argument>
<argument index="1" name="rect" type="Rect2">
@@ -44431,7 +49127,7 @@
<method name="get_default_margin" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="margin" type="int">
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
Return the default offset of the margin "margin" (see MARGIN_* enum) of a StyleBox, Controls that draw styleboxes with context inside need to know the margin, so the border of the stylebox is not occluded.
@@ -44440,7 +49136,7 @@
<method name="get_margin" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="margin" type="int">
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
Return the offset of margin "margin" (see MARGIN_* enum).
@@ -44461,7 +49157,9 @@
</description>
</method>
<method name="set_default_margin">
- <argument index="0" name="margin" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<argument index="1" name="offset" type="float">
</argument>
@@ -44514,6 +49212,12 @@
Stylebox of a single color. Displays the stylebox of a single color, alternatively a border with light/dark colors can be assigned.
</description>
<methods>
+ <method name="get_aa_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_bg_color" qualifiers="const">
<return type="Color">
</return>
@@ -44526,79 +49230,269 @@
<description>
</description>
</method>
- <method name="get_border_size" qualifiers="const">
+ <method name="get_border_color" qualifiers="const">
+ <return type="Color">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_border_width" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_border_width_min" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_corner_detail" qualifiers="const">
<return type="int">
</return>
<description>
</description>
</method>
- <method name="get_dark_color" qualifiers="const">
+ <method name="get_corner_radius" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="corner" type="int" enum="Corner">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_expand_margin" qualifiers="const">
+ <return type="float">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="get_shadow_color" qualifiers="const">
<return type="Color">
</return>
<description>
</description>
</method>
- <method name="get_draw_center" qualifiers="const">
+ <method name="get_shadow_size" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_anti_aliased" qualifiers="const">
<return type="bool">
</return>
<description>
</description>
</method>
- <method name="get_light_color" qualifiers="const">
- <return type="Color">
+ <method name="is_draw_center_enabled" qualifiers="const">
+ <return type="bool">
</return>
<description>
</description>
</method>
+ <method name="set_aa_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_anti_aliased">
+ <return type="void">
+ </return>
+ <argument index="0" name="anti_aliased" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_bg_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_border_blend">
+ <return type="void">
+ </return>
<argument index="0" name="blend" type="bool">
</argument>
<description>
</description>
</method>
- <method name="set_border_size">
- <argument index="0" name="size" type="int">
+ <method name="set_border_color">
+ <return type="void">
+ </return>
+ <argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
- <method name="set_dark_color">
- <argument index="0" name="color" type="Color">
+ <method name="set_border_width">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="width" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_border_width_all">
+ <return type="void">
+ </return>
+ <argument index="0" name="width" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_corner_detail">
+ <return type="void">
+ </return>
+ <argument index="0" name="detail" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_corner_radius">
+ <return type="void">
+ </return>
+ <argument index="0" name="corner" type="int" enum="Corner">
+ </argument>
+ <argument index="1" name="radius" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_corner_radius_all">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_corner_radius_individual">
+ <return type="void">
+ </return>
+ <argument index="0" name="radius_top_left" type="int">
+ </argument>
+ <argument index="1" name="radius_top_right" type="int">
+ </argument>
+ <argument index="2" name="radius_botton_right" type="int">
+ </argument>
+ <argument index="3" name="radius_bottom_left" type="int">
</argument>
<description>
</description>
</method>
<method name="set_draw_center">
- <argument index="0" name="size" type="bool">
+ <return type="void">
+ </return>
+ <argument index="0" name="draw_center" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_expand_margin">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
+ <argument index="1" name="size" type="float">
</argument>
<description>
</description>
</method>
- <method name="set_light_color">
+ <method name="set_expand_margin_all">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_expand_margin_individual">
+ <return type="void">
+ </return>
+ <argument index="0" name="size_left" type="float">
+ </argument>
+ <argument index="1" name="size_top" type="float">
+ </argument>
+ <argument index="2" name="size_right" type="float">
+ </argument>
+ <argument index="3" name="size_bottom" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_shadow_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
+ <method name="set_shadow_size">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
</methods>
<members>
+ <member name="anti_aliasing" type="bool" setter="set_anti_aliased" getter="is_anti_aliased" brief="">
+ </member>
+ <member name="anti_aliasing_size" type="int" setter="set_aa_size" getter="get_aa_size" brief="">
+ </member>
<member name="bg_color" type="Color" setter="set_bg_color" getter="get_bg_color" brief="">
</member>
<member name="border_blend" type="bool" setter="set_border_blend" getter="get_border_blend" brief="">
</member>
- <member name="border_size" type="int" setter="set_border_size" getter="get_border_size" brief="">
+ <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color" brief="">
+ </member>
+ <member name="border_width_bottom" type="int" setter="set_border_width" getter="get_border_width" brief="">
+ </member>
+ <member name="border_width_left" type="int" setter="set_border_width" getter="get_border_width" brief="">
+ </member>
+ <member name="border_width_right" type="int" setter="set_border_width" getter="get_border_width" brief="">
+ </member>
+ <member name="border_width_top" type="int" setter="set_border_width" getter="get_border_width" brief="">
+ </member>
+ <member name="corner_detail" type="int" setter="set_corner_detail" getter="get_corner_detail" brief="">
+ </member>
+ <member name="corner_radius_bottom_left" type="int" setter="set_corner_radius" getter="get_corner_radius" brief="">
</member>
- <member name="dark_color" type="Color" setter="set_dark_color" getter="get_dark_color" brief="">
+ <member name="corner_radius_bottom_right" type="int" setter="set_corner_radius" getter="get_corner_radius" brief="">
</member>
- <member name="draw_bg" type="bool" setter="set_draw_center" getter="get_draw_center" brief="">
+ <member name="corner_radius_top_left" type="int" setter="set_corner_radius" getter="get_corner_radius" brief="">
</member>
- <member name="light_color" type="Color" setter="set_light_color" getter="get_light_color" brief="">
+ <member name="corner_radius_top_right" type="int" setter="set_corner_radius" getter="get_corner_radius" brief="">
+ </member>
+ <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" brief="">
+ </member>
+ <member name="expand_margin_bottom" type="float" setter="set_expand_margin" getter="get_expand_margin" brief="">
+ </member>
+ <member name="expand_margin_left" type="float" setter="set_expand_margin" getter="get_expand_margin" brief="">
+ </member>
+ <member name="expand_margin_right" type="float" setter="set_expand_margin" getter="get_expand_margin" brief="">
+ </member>
+ <member name="expand_margin_top" type="float" setter="set_expand_margin" getter="get_expand_margin" brief="">
+ </member>
+ <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" brief="">
+ </member>
+ <member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size" brief="">
</member>
</members>
<constants>
@@ -44612,24 +49506,24 @@
Texture Based 3x3 scale style. This stylebox performs a 3x3 scaling of a texture, where only the center cell is fully stretched. This allows for the easy creation of bordered styles.
</description>
<methods>
- <method name="get_draw_center" qualifiers="const">
- <return type="bool">
+ <method name="get_expand_margin_size" qualifiers="const">
+ <return type="float">
</return>
+ <argument index="0" name="margin" type="int" enum="Margin">
+ </argument>
<description>
</description>
</method>
- <method name="get_expand_margin_size" qualifiers="const">
- <return type="float">
+ <method name="get_h_axis_stretch_mode" qualifiers="const">
+ <return type="int">
</return>
- <argument index="0" name="margin" type="int">
- </argument>
<description>
</description>
</method>
<method name="get_margin_size" qualifiers="const">
<return type="float">
</return>
- <argument index="0" name="margin" type="int">
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
</description>
@@ -44641,7 +49535,7 @@
</description>
</method>
<method name="get_normal_map" qualifiers="const">
- <return type="Texture">
+ <return type="Resource">
</return>
<description>
</description>
@@ -44653,27 +49547,75 @@
</description>
</method>
<method name="get_texture" qualifiers="const">
- <return type="Texture">
+ <return type="Resource">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_v_axis_stretch_mode" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="is_draw_center_enabled" qualifiers="const">
+ <return type="bool">
</return>
<description>
</description>
</method>
<method name="set_draw_center">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
+ <method name="set_expand_margin_all">
+ <return type="void">
+ </return>
+ <argument index="0" name="size" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_expand_margin_individual">
+ <return type="void">
+ </return>
+ <argument index="0" name="size_left" type="float">
+ </argument>
+ <argument index="1" name="size_top" type="float">
+ </argument>
+ <argument index="2" name="size_right" type="float">
+ </argument>
+ <argument index="3" name="size_bottom" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_expand_margin_size">
- <argument index="0" name="margin" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<argument index="1" name="size" type="float">
</argument>
<description>
</description>
</method>
+ <method name="set_h_axis_stretch_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="StyleBoxTexture.AxisStretchMode">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_margin_size">
- <argument index="0" name="margin" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<argument index="1" name="size" type="float">
</argument>
@@ -44681,32 +49623,52 @@
</description>
</method>
<method name="set_modulate">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
</description>
</method>
<method name="set_normal_map">
- <argument index="0" name="normal_map" type="Texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="normal_map" type="Resource">
</argument>
<description>
</description>
</method>
<method name="set_region_rect">
+ <return type="void">
+ </return>
<argument index="0" name="region" type="Rect2">
</argument>
<description>
</description>
</method>
<method name="set_texture">
- <argument index="0" name="texture" type="Texture">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Resource">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_v_axis_stretch_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="StyleBoxTexture.AxisStretchMode">
</argument>
<description>
</description>
</method>
</methods>
<members>
- <member name="draw_center" type="bool" setter="set_draw_center" getter="get_draw_center" brief="">
+ <member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" brief="" enum="StyleBoxTexture.AxisStretchMode">
+ </member>
+ <member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" brief="" enum="StyleBoxTexture.AxisStretchMode">
+ </member>
+ <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" brief="">
</member>
<member name="expand_margin_bottom" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" brief="">
</member>
@@ -44726,11 +49688,11 @@
</member>
<member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate" brief="">
</member>
- <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map" brief="">
+ <member name="normal_map" type="Resource" setter="set_normal_map" getter="get_normal_map" brief="">
</member>
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" brief="">
</member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
+ <member name="texture" type="Resource" setter="set_texture" getter="get_texture" brief="">
</member>
</members>
<signals>
@@ -44740,6 +49702,12 @@
</signal>
</signals>
<constants>
+ <constant name="AXIS_STRETCH_MODE_STRETCH" value="0">
+ </constant>
+ <constant name="AXIS_STRETCH_MODE_TILE" value="1">
+ </constant>
+ <constant name="AXIS_STRETCH_MODE_TILE_FIT" value="2">
+ </constant>
</constants>
</class>
<class name="SurfaceTool" inherits="Reference" category="Core">
@@ -44760,6 +49728,8 @@
</description>
<methods>
<method name="add_bones">
+ <return type="void">
+ </return>
<argument index="0" name="bones" type="PoolIntArray">
</argument>
<description>
@@ -44767,6 +49737,8 @@
</description>
</method>
<method name="add_color">
+ <return type="void">
+ </return>
<argument index="0" name="color" type="Color">
</argument>
<description>
@@ -44774,6 +49746,8 @@
</description>
</method>
<method name="add_index">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="int">
</argument>
<description>
@@ -44781,6 +49755,8 @@
</description>
</method>
<method name="add_normal">
+ <return type="void">
+ </return>
<argument index="0" name="normal" type="Vector3">
</argument>
<description>
@@ -44788,6 +49764,8 @@
</description>
</method>
<method name="add_smooth_group">
+ <return type="void">
+ </return>
<argument index="0" name="smooth" type="bool">
</argument>
<description>
@@ -44795,30 +49773,44 @@
</description>
</method>
<method name="add_tangent">
+ <return type="void">
+ </return>
<argument index="0" name="tangent" type="Plane">
</argument>
<description>
Specify a Tangent for the next Vertex to use.
</description>
</method>
+ <method name="add_to_format">
+ <return type="void">
+ </return>
+ <argument index="0" name="flags" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="add_triangle_fan">
+ <return type="void">
+ </return>
<argument index="0" name="vertexes" type="PoolVector3Array">
</argument>
- <argument index="1" name="uvs" type="PoolVector2Array" default="PoolVector2Array([])">
+ <argument index="1" name="uvs" type="PoolVector2Array" default="PoolVector3Array( )">
</argument>
- <argument index="2" name="colors" type="PoolColorArray" default="PoolColorArray([PoolColorArray])">
+ <argument index="2" name="colors" type="PoolColorArray" default="PoolVector2Array( )">
</argument>
- <argument index="3" name="uv2s" type="PoolVector2Array" default="PoolVector2Array([])">
+ <argument index="3" name="uv2s" type="PoolVector2Array" default="PoolColorArray( )">
</argument>
- <argument index="4" name="normals" type="PoolVector3Array" default="PoolVector3Array([])">
+ <argument index="4" name="normals" type="PoolVector3Array" default="PoolVector2Array( )">
</argument>
- <argument index="5" name="tangents" type="Array" default="[]">
+ <argument index="5" name="tangents" type="Array" default="null">
</argument>
<description>
Insert a triangle fan made of array data into [Mesh] being constructed.
</description>
</method>
<method name="add_uv">
+ <return type="void">
+ </return>
<argument index="0" name="uv" type="Vector2">
</argument>
<description>
@@ -44826,6 +49818,8 @@
</description>
</method>
<method name="add_uv2">
+ <return type="void">
+ </return>
<argument index="0" name="uv2" type="Vector2">
</argument>
<description>
@@ -44833,6 +49827,8 @@
</description>
</method>
<method name="add_vertex">
+ <return type="void">
+ </return>
<argument index="0" name="vertex" type="Vector3">
</argument>
<description>
@@ -44840,49 +49836,91 @@
</description>
</method>
<method name="add_weights">
+ <return type="void">
+ </return>
<argument index="0" name="weights" type="PoolRealArray">
</argument>
<description>
Specify weight value for next Vertex to use.
</description>
</method>
+ <method name="append_from">
+ <return type="void">
+ </return>
+ <argument index="0" name="existing" type="Mesh">
+ </argument>
+ <argument index="1" name="surface" type="int">
+ </argument>
+ <argument index="2" name="transform" type="Transform">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="begin">
- <argument index="0" name="primitive" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType">
</argument>
<description>
Called before adding any Vertices. Takes the primitive type as an argument (e.g. Mesh.PRIMITIVE_TRIANGLES).
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clear all information passed into the surface tool so far.
</description>
</method>
<method name="commit">
- <return type="Mesh">
+ <return type="ArrayMesh">
+ </return>
+ <argument index="0" name="existing" type="ArrayMesh" default="null">
+ </argument>
+ <description>
+ Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh].
+ </description>
+ </method>
+ <method name="create_from">
+ <return type="void">
</return>
- <argument index="0" name="existing" type="Mesh" default="NULL">
+ <argument index="0" name="existing" type="Mesh">
+ </argument>
+ <argument index="1" name="surface" type="int">
</argument>
<description>
- Returns a constructed [Mesh] from current information passed in. If an existing [Mesh] is passed in as an argument, will add an extra surface to the existing [Mesh].
</description>
</method>
<method name="deindex">
+ <return type="void">
+ </return>
<description>
Removes index array by expanding Vertex array.
</description>
</method>
<method name="generate_normals">
+ <return type="void">
+ </return>
<description>
Generates normals from Vertices so you do not have to do it manually.
</description>
</method>
+ <method name="generate_tangents">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="index">
+ <return type="void">
+ </return>
<description>
Shrinks Vertex array by creating an index array. Avoids reusing Vertices.
</description>
</method>
<method name="set_material">
+ <return type="void">
+ </return>
<argument index="0" name="material" type="Material">
</argument>
<description>
@@ -44913,7 +49951,7 @@
</return>
<argument index="0" name="port" type="int">
</argument>
- <argument index="1" name="bind_address" type="String" default="&quot;*&quot;">
+ <argument index="1" name="bind_address" type="String" default="null">
</argument>
<description>
Listen on the "port" binding to "bind_address".
@@ -44923,12 +49961,14 @@
</description>
</method>
<method name="stop">
+ <return type="void">
+ </return>
<description>
Stop listening.
</description>
</method>
<method name="take_connection">
- <return type="Object">
+ <return type="StreamPeerTCP">
</return>
<description>
If a connection is available, return a StreamPeerTCP with the connection/
@@ -45029,6 +50069,8 @@
</description>
</method>
<method name="set_current_tab">
+ <return type="void">
+ </return>
<argument index="0" name="tab_idx" type="int">
</argument>
<description>
@@ -45036,19 +50078,25 @@
</description>
</method>
<method name="set_popup">
- <argument index="0" name="popup" type="Popup">
+ <return type="void">
+ </return>
+ <argument index="0" name="popup" type="Node">
</argument>
<description>
</description>
</method>
<method name="set_tab_align">
- <argument index="0" name="align" type="int">
+ <return type="void">
+ </return>
+ <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.
</description>
</method>
<method name="set_tab_disabled">
+ <return type="void">
+ </return>
<argument index="0" name="tab_idx" type="int">
</argument>
<argument index="1" name="disabled" type="bool">
@@ -45057,6 +50105,8 @@
</description>
</method>
<method name="set_tab_icon">
+ <return type="void">
+ </return>
<argument index="0" name="tab_idx" type="int">
</argument>
<argument index="1" name="icon" type="Texture">
@@ -45066,6 +50116,8 @@
</description>
</method>
<method name="set_tab_title">
+ <return type="void">
+ </return>
<argument index="0" name="tab_idx" type="int">
</argument>
<argument index="1" name="title" type="String">
@@ -45075,6 +50127,8 @@
</description>
</method>
<method name="set_tabs_visible">
+ <return type="void">
+ </return>
<argument index="0" name="visible" type="bool">
</argument>
<description>
@@ -45085,7 +50139,7 @@
<members>
<member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab" brief="">
</member>
- <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" brief="">
+ <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" brief="" enum="TabContainer.TabAlign">
</member>
<member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible" brief="">
</member>
@@ -45160,14 +50214,18 @@
</description>
<methods>
<method name="add_tab">
- <argument index="0" name="title" type="String">
+ <return type="void">
+ </return>
+ <argument index="0" name="title" type="String" default="null">
</argument>
- <argument index="1" name="icon" type="Texture">
+ <argument index="1" name="icon" type="Texture" default="&quot;&quot;">
</argument>
<description>
</description>
</method>
<method name="ensure_tab_visible">
+ <return type="void">
+ </return>
<argument index="0" name="idx" type="int">
</argument>
<description>
@@ -45185,6 +50243,12 @@
<description>
</description>
</method>
+ <method name="get_tab_close_display_policy" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_tab_count" qualifiers="const">
<return type="int">
</return>
@@ -45207,7 +50271,7 @@
<description>
</description>
</method>
- <method name="get_tab_rect">
+ <method name="get_tab_rect" qualifiers="const">
<return type="Rect2">
</return>
<argument index="0" name="tab_idx" type="int">
@@ -45225,6 +50289,8 @@
</description>
</method>
<method name="move_tab">
+ <return type="void">
+ </return>
<argument index="0" name="from" type="int">
</argument>
<argument index="1" name="to" type="int">
@@ -45234,24 +50300,40 @@
</description>
</method>
<method name="remove_tab">
+ <return type="void">
+ </return>
<argument index="0" name="tab_idx" type="int">
</argument>
<description>
</description>
</method>
<method name="set_current_tab">
+ <return type="void">
+ </return>
<argument index="0" name="tab_idx" type="int">
</argument>
<description>
</description>
</method>
<method name="set_tab_align">
- <argument index="0" name="align" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="align" type="int" enum="Tabs.TabAlign">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_tab_close_display_policy">
+ <return type="void">
+ </return>
+ <argument index="0" name="policy" type="int" enum="Tabs.CloseButtonDisplayPolicy">
</argument>
<description>
</description>
</method>
<method name="set_tab_disabled">
+ <return type="void">
+ </return>
<argument index="0" name="tab_idx" type="int">
</argument>
<argument index="1" name="disabled" type="bool">
@@ -45260,6 +50342,8 @@
</description>
</method>
<method name="set_tab_icon">
+ <return type="void">
+ </return>
<argument index="0" name="tab_idx" type="int">
</argument>
<argument index="1" name="icon" type="Texture">
@@ -45268,6 +50352,8 @@
</description>
</method>
<method name="set_tab_title">
+ <return type="void">
+ </return>
<argument index="0" name="tab_idx" type="int">
</argument>
<argument index="1" name="title" type="String">
@@ -45279,6 +50365,8 @@
<members>
<member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab" brief="">
</member>
+ <member name="tab_close_display_policy" type="int" setter="set_tab_close_display_policy" getter="get_tab_close_display_policy" brief="" enum="Tabs.CloseButtonDisplayPolicy">
+ </member>
</members>
<signals>
<signal name="reposition_active_tab_request">
@@ -45299,6 +50387,12 @@
<description>
</description>
</signal>
+ <signal name="tab_clicked">
+ <argument index="0" name="tab" type="int">
+ </argument>
+ <description>
+ </description>
+ </signal>
<signal name="tab_close">
<argument index="0" name="tab" type="int">
</argument>
@@ -45319,12 +50413,16 @@
</constant>
<constant name="ALIGN_RIGHT" value="2">
</constant>
+ <constant name="ALIGN_MAX" value="3">
+ </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>
<theme_items>
<theme_item name="button" type="StyleBox">
@@ -45374,19 +50472,23 @@
</description>
<methods>
<method name="add_color_region">
+ <return type="void">
+ </return>
<argument index="0" name="begin_key" type="String">
</argument>
<argument index="1" name="end_key" type="String">
</argument>
<argument index="2" name="color" type="Color">
</argument>
- <argument index="3" name="line_only" type="bool" default="false">
+ <argument index="3" name="line_only" type="bool" default="null">
</argument>
<description>
Add color region (given the delimiters) and its colors.
</description>
</method>
<method name="add_keyword_color">
+ <return type="void">
+ </return>
<argument index="0" name="keyword" type="String">
</argument>
<argument index="1" name="color" type="Color">
@@ -45396,16 +50498,22 @@
</description>
</method>
<method name="clear_colors">
+ <return type="void">
+ </return>
<description>
Clear all the syntax coloring information.
</description>
</method>
<method name="clear_undo_history">
+ <return type="void">
+ </return>
<description>
Clear the undo history.
</description>
</method>
<method name="copy">
+ <return type="void">
+ </return>
<description>
Copy the current selection.
</description>
@@ -45446,6 +50554,8 @@
</description>
</method>
<method name="cursor_set_blink_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -45453,6 +50563,8 @@
</description>
</method>
<method name="cursor_set_blink_speed">
+ <return type="void">
+ </return>
<argument index="0" name="blink_speed" type="float">
</argument>
<description>
@@ -45460,6 +50572,8 @@
</description>
</method>
<method name="cursor_set_block_mode">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -45467,22 +50581,28 @@
</description>
</method>
<method name="cursor_set_column">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
- <argument index="1" name="adjust_viewport" type="bool" default="true">
+ <argument index="1" name="adjust_viewport" type="bool" default="null">
</argument>
<description>
</description>
</method>
<method name="cursor_set_line">
+ <return type="void">
+ </return>
<argument index="0" name="line" type="int">
</argument>
- <argument index="1" name="adjust_viewport" type="bool" default="true">
+ <argument index="1" name="adjust_viewport" type="bool" default="null">
</argument>
<description>
</description>
</method>
<method name="cut">
+ <return type="void">
+ </return>
<description>
Cut the current selection.
</description>
@@ -45551,6 +50671,12 @@
Return the whole text.
</description>
</method>
+ <method name="get_v_scroll_speed" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_word_under_cursor" qualifiers="const">
<return type="String">
</return>
@@ -45558,6 +50684,8 @@
</description>
</method>
<method name="insert_text_at_cursor">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
<description>
@@ -45585,6 +50713,12 @@
Returns true if line numbers are enabled.
</description>
</method>
+ <method name="is_smooth_scroll_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="is_syntax_coloring_enabled" qualifiers="const">
<return type="bool">
</return>
@@ -45593,17 +50727,23 @@
</description>
</method>
<method name="menu_option">
- <argument index="0" name="arg0" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="option" type="int">
</argument>
<description>
</description>
</method>
<method name="paste">
+ <return type="void">
+ </return>
<description>
Paste the current selection.
</description>
</method>
<method name="redo">
+ <return type="void">
+ </return>
<description>
Perform redo operation.
</description>
@@ -45611,19 +50751,21 @@
<method name="search" qualifiers="const">
<return type="PoolIntArray">
</return>
- <argument index="0" name="flags" type="String">
+ <argument index="0" name="key" type="String">
</argument>
- <argument index="1" name="from_line" type="int">
+ <argument index="1" name="flags" type="int">
</argument>
- <argument index="2" name="from_column" type="int">
+ <argument index="2" name="from_line" type="int">
</argument>
- <argument index="3" name="to_line" type="int">
+ <argument index="3" name="from_column" type="int">
</argument>
<description>
Perform a search inside the text. Search flags can be specified in the SEARCH_* enum.
</description>
</method>
<method name="select">
+ <return type="void">
+ </return>
<argument index="0" name="from_line" type="int">
</argument>
<argument index="1" name="from_column" type="int">
@@ -45637,11 +50779,15 @@
</description>
</method>
<method name="select_all">
+ <return type="void">
+ </return>
<description>
Select all the text.
</description>
</method>
<method name="set_highlight_all_occurrences">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -45649,6 +50795,8 @@
</description>
</method>
<method name="set_max_chars">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="int">
</argument>
<description>
@@ -45656,6 +50804,8 @@
</description>
</method>
<method name="set_readonly">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -45663,13 +50813,25 @@
</description>
</method>
<method name="set_show_line_numbers">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
Set to enable showing line numbers.
</description>
</method>
+ <method name="set_smooth_scroll_enable">
+ <return type="void">
+ </return>
+ <argument index="0" name="enable" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_syntax_coloring">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -45677,13 +50839,25 @@
</description>
</method>
<method name="set_text">
+ <return type="void">
+ </return>
<argument index="0" name="text" type="String">
</argument>
<description>
Set the entire text.
</description>
</method>
+ <method name="set_v_scroll_speed">
+ <return type="void">
+ </return>
+ <argument index="0" name="speed" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_wrap">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -45691,6 +50865,8 @@
</description>
</method>
<method name="undo">
+ <return type="void">
+ </return>
<description>
Perform undo operation.
</description>
@@ -45707,8 +50883,12 @@
</member>
<member name="show_line_numbers" type="bool" setter="set_show_line_numbers" getter="is_show_line_numbers_enabled" brief="">
</member>
+ <member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled" brief="">
+ </member>
<member name="syntax_highlighting" type="bool" setter="set_syntax_coloring" getter="is_syntax_coloring_enabled" brief="">
</member>
+ <member name="v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed" brief="">
+ </member>
</members>
<signals>
<signal name="breakpoint_toggled">
@@ -45840,53 +51020,65 @@
</description>
<methods>
<method name="draw" qualifiers="const">
+ <return type="void">
+ </return>
<argument index="0" name="canvas_item" type="RID">
</argument>
<argument index="1" name="pos" type="Vector2">
</argument>
- <argument index="2" name="modulate" type="Color" default="Color(1,1,1,1)">
+ <argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
- <argument index="3" name="transpose" type="bool" default="false">
+ <argument index="3" name="transpose" type="bool" default="null">
</argument>
- <argument index="4" name="normal_map" type="Texture" default="NULL">
+ <argument index="4" name="normal_map" type="Texture" default="null">
</argument>
<description>
</description>
</method>
<method name="draw_rect" qualifiers="const">
+ <return type="void">
+ </return>
<argument index="0" name="canvas_item" type="RID">
</argument>
<argument index="1" name="rect" type="Rect2">
</argument>
<argument index="2" name="tile" type="bool">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color(1,1,1,1)">
+ <argument index="3" name="modulate" type="Color" default="null">
</argument>
- <argument index="4" name="transpose" type="bool" default="false">
+ <argument index="4" name="transpose" type="bool" default="null">
</argument>
- <argument index="5" name="normal_map" type="Texture" default="NULL">
+ <argument index="5" name="normal_map" type="Texture" default="null">
</argument>
<description>
</description>
</method>
<method name="draw_rect_region" qualifiers="const">
+ <return type="void">
+ </return>
<argument index="0" name="canvas_item" type="RID">
</argument>
<argument index="1" name="rect" type="Rect2">
</argument>
<argument index="2" name="src_rect" type="Rect2">
</argument>
- <argument index="3" name="modulate" type="Color" default="Color(1,1,1,1)">
+ <argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
- <argument index="4" name="transpose" type="bool" default="false">
+ <argument index="4" name="transpose" type="bool" default="null">
</argument>
- <argument index="5" name="normal_map" type="Texture" default="NULL">
+ <argument index="5" name="normal_map" type="Texture" default="null">
</argument>
- <argument index="6" name="clip_uv" type="bool" default="true">
+ <argument index="6" name="clip_uv" type="bool" default="null">
</argument>
<description>
</description>
</method>
+ <method name="get_data" qualifiers="const">
+ <return type="Image">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_flags" qualifiers="const">
<return type="int">
</return>
@@ -45922,6 +51114,8 @@
</description>
</method>
<method name="set_flags">
+ <return type="void">
+ </return>
<argument index="0" name="flags" type="int">
</argument>
<description>
@@ -46011,49 +51205,65 @@
</description>
</method>
<method name="set_click_mask">
+ <return type="void">
+ </return>
<argument index="0" name="mask" type="BitMap">
</argument>
<description>
</description>
</method>
<method name="set_disabled_texture">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_expand">
+ <return type="void">
+ </return>
<argument index="0" name="p_expand" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_focused_texture">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_hover_texture">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_normal_texture">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_pressed_texture">
+ <return type="void">
+ </return>
<argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_stretch_mode">
- <argument index="0" name="p_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="p_mode" type="int" enum="TextureButton.StretchMode">
</argument>
<description>
</description>
@@ -46062,7 +51272,7 @@
<members>
<member name="expand" type="bool" setter="set_expand" getter="get_expand" brief="">
</member>
- <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" brief="">
+ <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" brief="" enum="TextureButton.StretchMode">
</member>
<member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask" brief="">
</member>
@@ -46114,7 +51324,7 @@
<description>
</description>
</method>
- <method name="get_nine_patch_stretch">
+ <method name="get_nine_patch_stretch" qualifiers="const">
<return type="bool">
</return>
<description>
@@ -46122,13 +51332,13 @@
</description>
</method>
<method name="get_over_texture" qualifiers="const">
- <return type="Object">
+ <return type="Texture">
</return>
<description>
</description>
</method>
<method name="get_progress_texture" qualifiers="const">
- <return type="Object">
+ <return type="Texture">
</return>
<description>
</description>
@@ -46148,31 +51358,37 @@
<method name="get_stretch_margin" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="margin" type="int">
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
<description>
Return nine-patch texture offset for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM).
</description>
</method>
<method name="get_under_texture" qualifiers="const">
- <return type="Object">
+ <return type="Texture">
</return>
<description>
</description>
</method>
<method name="set_fill_degrees">
+ <return type="void">
+ </return>
<argument index="0" name="mode" type="float">
</argument>
<description>
</description>
</method>
<method name="set_fill_mode">
+ <return type="void">
+ </return>
<argument index="0" name="mode" type="int">
</argument>
<description>
</description>
</method>
<method name="set_nine_patch_stretch">
+ <return type="void">
+ </return>
<argument index="0" name="stretch" type="bool">
</argument>
<description>
@@ -46180,40 +51396,52 @@
</description>
</method>
<method name="set_over_texture">
- <argument index="0" name="tex" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="tex" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_progress_texture">
- <argument index="0" name="tex" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="tex" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_radial_center_offset">
+ <return type="void">
+ </return>
<argument index="0" name="mode" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_radial_initial_angle">
+ <return type="void">
+ </return>
<argument index="0" name="mode" type="float">
</argument>
<description>
</description>
</method>
<method name="set_stretch_margin">
- <argument index="0" name="margin" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="margin" type="int" enum="Margin">
</argument>
- <argument index="1" name="size" type="int">
+ <argument index="1" name="value" type="int">
</argument>
<description>
Set nine-patch texture offset for a given margin (MARGIN_LEFT, MARGIN_TOP, MARGIN_RIGHT, MARGIN_BOTTOM).
</description>
</method>
<method name="set_under_texture">
- <argument index="0" name="tex" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="tex" type="Texture">
</argument>
<description>
</description>
@@ -46222,27 +51450,27 @@
<members>
<member name="fill_mode" type="int" setter="set_fill_mode" getter="get_fill_mode" brief="">
</member>
+ <member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch" brief="">
+ </member>
<member name="radial_center_offset" type="Vector2" setter="set_radial_center_offset" getter="get_radial_center_offset" brief="">
</member>
<member name="radial_fill_degrees" type="float" setter="set_fill_degrees" getter="get_fill_degrees" brief="">
</member>
<member name="radial_initial_angle" type="float" setter="set_radial_initial_angle" getter="get_radial_initial_angle" brief="">
</member>
- <member name="texture_over" type="Texture" setter="set_over_texture" getter="get_over_texture" brief="">
- </member>
- <member name="texture_progress" type="Texture" setter="set_progress_texture" getter="get_progress_texture" brief="">
- </member>
- <member name="texture_under" type="Texture" setter="set_under_texture" getter="get_under_texture" brief="">
- </member>
- <member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch" brief="">
+ <member name="stretch_margin_bottom" type="int" setter="set_stretch_margin" getter="get_stretch_margin" brief="">
</member>
<member name="stretch_margin_left" type="int" setter="set_stretch_margin" getter="get_stretch_margin" brief="">
</member>
+ <member name="stretch_margin_right" type="int" setter="set_stretch_margin" getter="get_stretch_margin" brief="">
+ </member>
<member name="stretch_margin_top" type="int" setter="set_stretch_margin" getter="get_stretch_margin" brief="">
</member>
- <member name="stretch_margin_right" type="int" setter="set_stretch_margin" getter="get_stretch_margin" brief="">
+ <member name="texture_over" type="Texture" setter="set_over_texture" getter="get_over_texture" brief="">
</member>
- <member name="stretch_margin_bottom" type="int" setter="set_stretch_margin" getter="get_stretch_margin" brief="">
+ <member name="texture_progress" type="Texture" setter="set_progress_texture" getter="get_progress_texture" brief="">
+ </member>
+ <member name="texture_under" type="Texture" setter="set_under_texture" getter="get_under_texture" brief="">
</member>
</members>
<constants>
@@ -46275,7 +51503,7 @@
</description>
</method>
<method name="get_texture" qualifiers="const">
- <return type="Object">
+ <return type="Texture">
</return>
<description>
</description>
@@ -46287,19 +51515,25 @@
</description>
</method>
<method name="set_expand">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_stretch_mode">
- <argument index="0" name="stretch_mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="stretch_mode" type="int" enum="TextureRect.StretchMode">
</argument>
<description>
</description>
</method>
<method name="set_texture">
- <argument index="0" name="texture" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
@@ -46308,7 +51542,7 @@
<members>
<member name="expand" type="bool" setter="set_expand" getter="has_expand" brief="">
</member>
- <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" brief="">
+ <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" brief="" enum="TextureRect.StretchMode">
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture" brief="">
</member>
@@ -46342,6 +51576,8 @@
</description>
<methods>
<method name="clear_color">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="type" type="String">
@@ -46350,6 +51586,8 @@
</description>
</method>
<method name="clear_constant">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="type" type="String">
@@ -46358,6 +51596,8 @@
</description>
</method>
<method name="clear_font">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="type" type="String">
@@ -46366,6 +51606,8 @@
</description>
</method>
<method name="clear_icon">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="type" type="String">
@@ -46374,6 +51616,8 @@
</description>
</method>
<method name="clear_stylebox">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="type" type="String">
@@ -46382,6 +51626,8 @@
</description>
</method>
<method name="copy_default_theme">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -46422,7 +51668,7 @@
</description>
</method>
<method name="get_default_font" qualifiers="const">
- <return type="Object">
+ <return type="Font">
</return>
<description>
</description>
@@ -46546,6 +51792,8 @@
</description>
</method>
<method name="set_color">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="type" type="String">
@@ -46556,6 +51804,8 @@
</description>
</method>
<method name="set_constant">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="type" type="String">
@@ -46566,12 +51816,16 @@
</description>
</method>
<method name="set_default_font">
- <argument index="0" name="font" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="font" type="Font">
</argument>
<description>
</description>
</method>
<method name="set_font">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="type" type="String">
@@ -46582,6 +51836,8 @@
</description>
</method>
<method name="set_icon">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="type" type="String">
@@ -46592,6 +51848,8 @@
</description>
</method>
<method name="set_stylebox">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="type" type="String">
@@ -46632,15 +51890,15 @@
</description>
</method>
<method name="start">
- <return type="Error">
+ <return type="int">
</return>
<argument index="0" name="instance" type="Object">
</argument>
<argument index="1" name="method" type="String">
</argument>
- <argument index="2" name="userdata" type="Variant" default="NULL">
+ <argument index="2" name="userdata" type="Variant" default="null">
</argument>
- <argument index="3" name="priority" type="int" default="1">
+ <argument index="3" name="priority" type="int" default="null">
</argument>
<description>
Start a new [Thread], it will run "method" on object "instance" using "userdata" as an argument and running with "priority", one of PRIORITY_* enum.
@@ -46674,6 +51932,8 @@
</description>
<methods>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clear all cells.
</description>
@@ -46825,6 +52085,14 @@
Return an array of all cells containing a tile from the tileset (i.e. a tile index different from -1).
</description>
</method>
+ <method name="get_used_cells_by_id" qualifiers="const">
+ <return type="Array">
+ </return>
+ <argument index="0" name="id" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="get_used_rect">
<return type="Rect2">
</return>
@@ -46876,7 +52144,7 @@
</return>
<argument index="0" name="mappos" type="Vector2">
</argument>
- <argument index="1" name="ignore_half_ofs" type="bool" default="false">
+ <argument index="1" name="ignore_half_ofs" type="bool" default="null">
</argument>
<description>
Return the absolute world position corresponding to the tilemap (grid-based) coordinates given as an argument.
@@ -46884,17 +52152,19 @@
</description>
</method>
<method name="set_cell">
+ <return type="void">
+ </return>
<argument index="0" name="x" type="int">
</argument>
<argument index="1" name="y" type="int">
</argument>
<argument index="2" name="tile" type="int">
</argument>
- <argument index="3" name="flip_x" type="bool" default="false">
+ <argument index="3" name="flip_x" type="bool" default="null">
</argument>
- <argument index="4" name="flip_y" type="bool" default="false">
+ <argument index="4" name="flip_y" type="bool" default="null">
</argument>
- <argument index="5" name="transpose" type="bool" default="false">
+ <argument index="5" name="transpose" type="bool" default="null">
</argument>
<description>
Set the tile index for the cell referenced by its grid-based X and Y coordinates.
@@ -46903,6 +52173,8 @@
</description>
</method>
<method name="set_cell_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="Vector2">
</argument>
<description>
@@ -46910,15 +52182,17 @@
</description>
</method>
<method name="set_cellv">
+ <return type="void">
+ </return>
<argument index="0" name="pos" type="Vector2">
</argument>
<argument index="1" name="tile" type="int">
</argument>
<argument index="2" name="flip_x" type="bool" default="false">
</argument>
- <argument index="3" name="flip_y" type="bool" default="false">
+ <argument index="3" name="flip_y" type="bool" default="null">
</argument>
- <argument index="4" name="transpose" type="bool" default="false">
+ <argument index="4" name="transpose" type="bool" default="null">
</argument>
<description>
Set the tile index for the cell referenced by a Vector2 of grid-based coordinates.
@@ -46927,6 +52201,8 @@
</description>
</method>
<method name="set_center_x">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -46934,6 +52210,8 @@
</description>
</method>
<method name="set_center_y">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -46941,6 +52219,8 @@
</description>
</method>
<method name="set_collision_bounce">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="float">
</argument>
<description>
@@ -46948,6 +52228,8 @@
</description>
</method>
<method name="set_collision_friction">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="float">
</argument>
<description>
@@ -46955,6 +52237,8 @@
</description>
</method>
<method name="set_collision_layer">
+ <return type="void">
+ </return>
<argument index="0" name="layer" type="int">
</argument>
<description>
@@ -46963,6 +52247,8 @@
</description>
</method>
<method name="set_collision_layer_bit">
+ <return type="void">
+ </return>
<argument index="0" name="bit" type="int">
</argument>
<argument index="1" name="value" type="bool">
@@ -46971,6 +52257,8 @@
</description>
</method>
<method name="set_collision_mask">
+ <return type="void">
+ </return>
<argument index="0" name="mask" type="int">
</argument>
<description>
@@ -46979,6 +52267,8 @@
</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">
@@ -46987,6 +52277,8 @@
</description>
</method>
<method name="set_collision_use_kinematic">
+ <return type="void">
+ </return>
<argument index="0" name="use_kinematic" type="bool">
</argument>
<description>
@@ -46994,6 +52286,8 @@
</description>
</method>
<method name="set_custom_transform">
+ <return type="void">
+ </return>
<argument index="0" name="custom_transform" type="Transform2D">
</argument>
<description>
@@ -47001,27 +52295,35 @@
</description>
</method>
<method name="set_half_offset">
- <argument index="0" name="half_offset" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="half_offset" type="int" enum="TileMap.HalfOffset">
</argument>
<description>
- Set an half offset on the X coordinate, Y coordinate, or none (use HALF_OFFSET_* constants as argument).
+ Set a half offset on the X coordinate, Y coordinate, or none (use HALF_OFFSET_* constants as argument).
Half offset sets every other tile off by a half tile size in the specified direction.
</description>
</method>
<method name="set_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="TileMap.Mode">
</argument>
<description>
Set the orientation mode as square, isometric or custom (use MODE_* constants as argument).
</description>
</method>
<method name="set_occluder_light_mask">
+ <return type="void">
+ </return>
<argument index="0" name="mask" type="int">
</argument>
<description>
</description>
</method>
<method name="set_quadrant_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="int">
</argument>
<description>
@@ -47030,13 +52332,17 @@
</description>
</method>
<method name="set_tile_origin">
- <argument index="0" name="origin" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="origin" type="int" enum="TileMap.TileOrigin">
</argument>
<description>
Set the tile origin to the tile center or its top-left corner (use TILE_ORIGIN_* constants as argument).
</description>
</method>
<method name="set_tileset">
+ <return type="void">
+ </return>
<argument index="0" name="tileset" type="TileSet">
</argument>
<description>
@@ -47044,6 +52350,8 @@
</description>
</method>
<method name="set_y_sort_mode">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -47064,13 +52372,13 @@
<members>
<member name="cell_custom_transform" type="Transform2D" setter="set_custom_transform" getter="get_custom_transform" brief="">
</member>
- <member name="cell_half_offset" type="int" setter="set_half_offset" getter="get_half_offset" brief="">
+ <member name="cell_half_offset" type="int" setter="set_half_offset" getter="get_half_offset" brief="" enum="TileMap.HalfOffset">
</member>
<member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size" brief="">
</member>
<member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size" brief="">
</member>
- <member name="cell_tile_origin" type="int" setter="set_tile_origin" getter="get_tile_origin" brief="">
+ <member name="cell_tile_origin" type="int" setter="set_tile_origin" getter="get_tile_origin" brief="" enum="TileMap.TileOrigin">
</member>
<member name="cell_y_sort" type="bool" setter="set_y_sort_mode" getter="is_y_sort_mode_enabled" brief="">
</member>
@@ -47084,11 +52392,11 @@
</member>
<member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic" brief="">
</member>
- <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="">
+ <member name="mode" type="int" setter="set_mode" getter="get_mode" brief="" enum="TileMap.Mode">
</member>
<member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" brief="">
</member>
- <member name="tile_data" type="Object" setter="_set_tile_data" getter="_get_tile_data" brief="">
+ <member name="tile_data" type="PoolIntArray" setter="_set_tile_data" getter="_get_tile_data" brief="">
</member>
<member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset" brief="">
</member>
@@ -47101,7 +52409,7 @@
</signal>
</signals>
<constants>
- <constant name="INVALID_CELL" value="-1">
+ <constant name="INVALID_CELL" value="-1" enum="">
Returned when a cell doesn't exist.
</constant>
<constant name="MODE_SQUARE" value="0">
@@ -47142,11 +52450,15 @@
</description>
<methods>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clear all tiles.
</description>
</method>
<method name="create_tile">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<description>
@@ -47177,6 +52489,8 @@
</description>
</method>
<method name="remove_tile">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<description>
@@ -47184,13 +52498,15 @@
</description>
</method>
<method name="tile_add_shape">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="shape" type="Shape2D">
</argument>
<argument index="2" name="shape_transform" type="Transform2D">
</argument>
- <argument index="3" name="one_way" type="bool" default="false">
+ <argument index="3" name="one_way" type="bool" default="null">
</argument>
<description>
</description>
@@ -47332,6 +52648,8 @@
</description>
</method>
<method name="tile_set_light_occluder">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="light_occluder" type="OccluderPolygon2D">
@@ -47341,6 +52659,8 @@
</description>
</method>
<method name="tile_set_material">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="material" type="ShaderMaterial">
@@ -47350,6 +52670,8 @@
</description>
</method>
<method name="tile_set_name">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="name" type="String">
@@ -47359,6 +52681,8 @@
</description>
</method>
<method name="tile_set_navigation_polygon">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="navigation_polygon" type="NavigationPolygon">
@@ -47368,6 +52692,8 @@
</description>
</method>
<method name="tile_set_navigation_polygon_offset">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="navigation_polygon_offset" type="Vector2">
@@ -47377,6 +52703,8 @@
</description>
</method>
<method name="tile_set_normal_map">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="normal_map" type="Texture">
@@ -47385,6 +52713,8 @@
</description>
</method>
<method name="tile_set_occluder_offset">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="occluder_offset" type="Vector2">
@@ -47394,6 +52724,8 @@
</description>
</method>
<method name="tile_set_region">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="region" type="Rect2">
@@ -47403,6 +52735,8 @@
</description>
</method>
<method name="tile_set_shape">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="shape_id" type="int">
@@ -47413,6 +52747,8 @@
</description>
</method>
<method name="tile_set_shape_one_way">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="shape_id" type="int">
@@ -47423,6 +52759,8 @@
</description>
</method>
<method name="tile_set_shape_transform">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="shape_id" type="int">
@@ -47433,6 +52771,8 @@
</description>
</method>
<method name="tile_set_shapes">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="shapes" type="Array">
@@ -47442,6 +52782,8 @@
</description>
</method>
<method name="tile_set_texture">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="texture" type="Texture">
@@ -47451,6 +52793,8 @@
</description>
</method>
<method name="tile_set_texture_offset">
+ <return type="void">
+ </return>
<argument index="0" name="id" type="int">
</argument>
<argument index="1" name="texture_offset" type="Vector2">
@@ -47520,6 +52864,8 @@
</description>
</method>
<method name="set_autostart">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -47527,6 +52873,8 @@
</description>
</method>
<method name="set_one_shot">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -47534,6 +52882,8 @@
</description>
</method>
<method name="set_paused">
+ <return type="void">
+ </return>
<argument index="0" name="paused" type="bool">
</argument>
<description>
@@ -47541,13 +52891,17 @@
</description>
</method>
<method name="set_timer_process_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Timer.TimerProcessMode">
</argument>
<description>
Set the timer's processing mode (fixed or idle, use TIMER_PROCESS_* constants as argument).
</description>
</method>
<method name="set_wait_time">
+ <return type="void">
+ </return>
<argument index="0" name="time_sec" type="float">
</argument>
<description>
@@ -47555,11 +52909,15 @@
</description>
</method>
<method name="start">
+ <return type="void">
+ </return>
<description>
Start the timer.
</description>
</method>
<method name="stop">
+ <return type="void">
+ </return>
<description>
Stop (cancel) the timer.
</description>
@@ -47570,7 +52928,7 @@
</member>
<member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot" brief="">
</member>
- <member name="process_mode" type="int" setter="set_timer_process_mode" getter="get_timer_process_mode" brief="">
+ <member name="process_mode" type="int" setter="set_timer_process_mode" getter="get_timer_process_mode" brief="" enum="Timer.TimerProcessMode">
</member>
<member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time" brief="">
</member>
@@ -47638,25 +52996,25 @@
</description>
</method>
<method name="get_bitmask" qualifiers="const">
- <return type="Object">
+ <return type="BitMap">
</return>
<description>
</description>
</method>
<method name="get_shape" qualifiers="const">
- <return type="Object">
+ <return type="Shape2D">
</return>
<description>
</description>
</method>
<method name="get_texture" qualifiers="const">
- <return type="Object">
+ <return type="Texture">
</return>
<description>
</description>
</method>
<method name="get_texture_pressed" qualifiers="const">
- <return type="Object">
+ <return type="Texture">
</return>
<description>
</description>
@@ -47692,55 +53050,73 @@
</description>
</method>
<method name="set_action">
+ <return type="void">
+ </return>
<argument index="0" name="action" type="String">
</argument>
<description>
</description>
</method>
<method name="set_bitmask">
- <argument index="0" name="bitmask" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="bitmask" type="BitMap">
</argument>
<description>
</description>
</method>
<method name="set_passby_press">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_shape">
- <argument index="0" name="shape" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="shape" type="Shape2D">
</argument>
<description>
</description>
</method>
<method name="set_shape_centered">
+ <return type="void">
+ </return>
<argument index="0" name="bool" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_shape_visible">
+ <return type="void">
+ </return>
<argument index="0" name="bool" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_texture">
- <argument index="0" name="texture" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_texture_pressed">
- <argument index="0" name="texture_pressed" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture_pressed" type="Texture">
</argument>
<description>
</description>
</method>
<method name="set_visibility_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="TouchScreenButton.VisibilityMode">
</argument>
<description>
</description>
@@ -47763,7 +53139,7 @@
</member>
<member name="shape_visible" type="bool" setter="set_shape_visible" getter="is_shape_visible" brief="">
</member>
- <member name="visibility_mode" type="int" setter="set_visibility_mode" getter="get_visibility_mode" brief="">
+ <member name="visibility_mode" type="int" setter="set_visibility_mode" getter="get_visibility_mode" brief="" enum="TouchScreenButton.VisibilityMode">
</member>
</members>
<signals>
@@ -47847,6 +53223,16 @@
Returns the inverse of the transfrom, under the assumption that the transformation is composed of rotation, scaling and translation.
</description>
</method>
+ <method name="interpolate_with">
+ <return type="Transform">
+ </return>
+ <argument index="0" name="transform" type="Transform">
+ </argument>
+ <argument index="1" name="weight" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="inverse">
<return type="Transform">
</return>
@@ -48014,9 +53400,9 @@
<method name="interpolate_with">
<return type="Transform2D">
</return>
- <argument index="0" name="m" type="Transform2D">
+ <argument index="0" name="transform" type="Transform2D">
</argument>
- <argument index="1" name="c" type="float">
+ <argument index="1" name="weight" type="float">
</argument>
<description>
</description>
@@ -48094,6 +53480,8 @@
</description>
<methods>
<method name="add_message">
+ <return type="void">
+ </return>
<argument index="0" name="src_message" type="String">
</argument>
<argument index="1" name="xlated_message" type="String">
@@ -48103,6 +53491,8 @@
</description>
</method>
<method name="erase_message">
+ <return type="void">
+ </return>
<argument index="0" name="src_message" type="String">
</argument>
<description>
@@ -48139,6 +53529,8 @@
</description>
</method>
<method name="set_locale">
+ <return type="void">
+ </return>
<argument index="0" name="locale" type="String">
</argument>
<description>
@@ -48163,12 +53555,16 @@
</description>
<methods>
<method name="add_translation">
+ <return type="void">
+ </return>
<argument index="0" name="translation" type="Translation">
</argument>
<description>
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<description>
</description>
</method>
@@ -48179,12 +53575,16 @@
</description>
</method>
<method name="remove_translation">
+ <return type="void">
+ </return>
<argument index="0" name="translation" type="Translation">
</argument>
<description>
</description>
</method>
<method name="set_locale">
+ <return type="void">
+ </return>
<argument index="0" name="locale" type="String">
</argument>
<description>
@@ -48229,24 +53629,34 @@
</description>
</method>
<method name="clear">
+ <return type="void">
+ </return>
<description>
Clear the tree. This erases all of the items.
</description>
</method>
<method name="create_item">
- <return type="TreeItem">
+ <return type="Object">
</return>
- <argument index="0" name="parent" type="TreeItem" default="NULL">
+ <argument index="0" name="parent" type="Object" default="null">
</argument>
<description>
Create an item in the tree and add it as the last child of [code]parent[/code]. If parent is not given, it will be added as the last child of the root, or it'll the be the root itself if the tree is empty.
</description>
</method>
<method name="ensure_cursor_is_visible">
+ <return type="void">
+ </return>
<description>
Make the current selected item visible. This will scroll the tree to make sure the selected item is in sight.
</description>
</method>
+ <method name="get_allow_reselect" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_allow_rmb_select" qualifiers="const">
<return type="bool">
</return>
@@ -48319,9 +53729,9 @@
<method name="get_item_area_rect" qualifiers="const">
<return type="Rect2">
</return>
- <argument index="0" name="item" type="TreeItem">
+ <argument index="0" name="item" type="Object">
</argument>
- <argument index="1" name="column" type="int" default="-1">
+ <argument index="1" name="column" type="int" default="null">
</argument>
<description>
Get the rectangle area of the the specified item. If column is specified, only get the position and size of that column, otherwise get the rectangle containing all columns.
@@ -48339,7 +53749,7 @@
<method name="get_next_selected">
<return type="TreeItem">
</return>
- <argument index="0" name="from" type="TreeItem">
+ <argument index="0" name="from" type="Object">
</argument>
<description>
Get the next selected item after the given one.
@@ -48380,21 +53790,24 @@
Get the column number of the current selection.
</description>
</method>
- <method name="get_single_select_cell_editing_only_when_already_selected" qualifiers="const">
+ <method name="is_folding_hidden" qualifiers="const">
<return type="bool">
</return>
<description>
- Get whether the editing of a cell should only happen when it is already selected.
+ Get whether the folding arrow is hidden.
</description>
</method>
- <method name="is_folding_hidden" qualifiers="const">
- <return type="bool">
+ <method name="set_allow_reselect">
+ <return type="void">
</return>
+ <argument index="0" name="allow" type="bool">
+ </argument>
<description>
- Get whether the folding arrow is hidden.
</description>
</method>
<method name="set_allow_rmb_select">
+ <return type="void">
+ </return>
<argument index="0" name="allow" type="bool">
</argument>
<description>
@@ -48402,6 +53815,8 @@
</description>
</method>
<method name="set_column_expand">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="expand" type="bool">
@@ -48411,6 +53826,8 @@
</description>
</method>
<method name="set_column_min_width">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="min_width" type="int">
@@ -48420,6 +53837,8 @@
</description>
</method>
<method name="set_column_title">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="title" type="String">
@@ -48429,6 +53848,8 @@
</description>
</method>
<method name="set_column_titles_visible">
+ <return type="void">
+ </return>
<argument index="0" name="visible" type="bool">
</argument>
<description>
@@ -48436,6 +53857,8 @@
</description>
</method>
<method name="set_columns">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="int">
</argument>
<description>
@@ -48443,6 +53866,8 @@
</description>
</method>
<method name="set_drop_mode_flags">
+ <return type="void">
+ </return>
<argument index="0" name="flags" type="int">
</argument>
<description>
@@ -48450,6 +53875,8 @@
</description>
</method>
<method name="set_hide_folding">
+ <return type="void">
+ </return>
<argument index="0" name="hide" type="bool">
</argument>
<description>
@@ -48457,6 +53884,8 @@
</description>
</method>
<method name="set_hide_root">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -48464,19 +53893,14 @@
</description>
</method>
<method name="set_select_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Tree.SelectMode">
</argument>
<description>
Set the selection mode. Use one of the [code]SELECT_*[/code] constants.
</description>
</method>
- <method name="set_single_select_cell_editing_only_when_already_selected">
- <argument index="0" name="enable" type="bool">
- </argument>
- <description>
- Set whether the editing of a cell should only happen when it is already selected.
- </description>
- </method>
</methods>
<signals>
<signal name="button_pressed">
@@ -48540,6 +53964,10 @@
Emitted when an item is editted.
</description>
</signal>
+ <signal name="item_rmb_edited">
+ <description>
+ </description>
+ </signal>
<signal name="item_rmb_selected">
<argument index="0" name="pos" type="Vector2">
</argument>
@@ -48663,38 +54091,48 @@
</description>
<methods>
<method name="add_button">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="button" type="Texture">
</argument>
<argument index="2" name="button_idx" type="int" default="-1">
</argument>
- <argument index="3" name="disabled" type="bool" default="false">
+ <argument index="3" name="disabled" type="bool" default="null">
</argument>
- <argument index="4" name="tooltip" type="String" default="&quot;&quot;">
+ <argument index="4" name="tooltip" type="String" default="null">
</argument>
<description>
</description>
</method>
<method name="clear_custom_bg_color">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<description>
</description>
</method>
<method name="clear_custom_color">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<description>
</description>
</method>
<method name="deselect">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<description>
</description>
</method>
<method name="erase_button">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="button_idx" type="int">
@@ -48775,6 +54213,8 @@
</description>
</method>
<method name="get_metadata" qualifiers="const">
+ <return type="Variant">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<description>
@@ -48913,15 +54353,19 @@
</description>
</method>
<method name="move_to_bottom">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="move_to_top">
+ <return type="void">
+ </return>
<description>
</description>
</method>
<method name="remove_child">
- <return type="TreeItem">
+ <return type="void">
</return>
<argument index="0" name="child" type="Object">
</argument>
@@ -48929,12 +54373,16 @@
</description>
</method>
<method name="select">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<description>
</description>
</method>
<method name="set_button">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="button_idx" type="int">
@@ -48945,14 +54393,18 @@
</description>
</method>
<method name="set_cell_mode">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
- <argument index="1" name="mode" type="int">
+ <argument index="1" name="mode" type="int" enum="TreeItem.TreeCellMode">
</argument>
<description>
</description>
</method>
<method name="set_checked">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="checked" type="bool">
@@ -48961,12 +54413,16 @@
</description>
</method>
<method name="set_collapsed">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_custom_as_button">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="enable" type="bool">
@@ -48975,16 +54431,20 @@
</description>
</method>
<method name="set_custom_bg_color">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="color" type="Color">
</argument>
- <argument index="2" name="just_outline" type="bool" default="false">
+ <argument index="2" name="just_outline" type="bool" default="null">
</argument>
<description>
</description>
</method>
<method name="set_custom_color">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="color" type="Color">
@@ -48993,6 +54453,8 @@
</description>
</method>
<method name="set_custom_draw">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="object" type="Object">
@@ -49003,12 +54465,16 @@
</description>
</method>
<method name="set_disable_folding">
+ <return type="void">
+ </return>
<argument index="0" name="disable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_editable">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="enabled" type="bool">
@@ -49017,6 +54483,8 @@
</description>
</method>
<method name="set_expand_right">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="enable" type="bool">
@@ -49025,6 +54493,8 @@
</description>
</method>
<method name="set_icon">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="texture" type="Texture">
@@ -49033,6 +54503,8 @@
</description>
</method>
<method name="set_icon_max_width">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="width" type="int">
@@ -49041,6 +54513,8 @@
</description>
</method>
<method name="set_icon_region">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="region" type="Rect2">
@@ -49049,6 +54523,8 @@
</description>
</method>
<method name="set_metadata">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="meta" type="Variant">
@@ -49057,6 +54533,8 @@
</description>
</method>
<method name="set_range">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="value" type="float">
@@ -49065,6 +54543,8 @@
</description>
</method>
<method name="set_range_config">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="min" type="float">
@@ -49073,12 +54553,14 @@
</argument>
<argument index="3" name="step" type="float">
</argument>
- <argument index="4" name="expr" type="bool" default="false">
+ <argument index="4" name="expr" type="bool" default="null">
</argument>
<description>
</description>
</method>
<method name="set_selectable">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="selectable" type="bool">
@@ -49087,6 +54569,8 @@
</description>
</method>
<method name="set_text">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="text" type="String">
@@ -49095,14 +54579,18 @@
</description>
</method>
<method name="set_text_align">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
- <argument index="1" name="text_align" type="int">
+ <argument index="1" name="text_align" type="int" enum="TreeItem.TextAlign">
</argument>
<description>
</description>
</method>
<method name="set_tooltip">
+ <return type="void">
+ </return>
<argument index="0" name="column" type="int">
</argument>
<argument index="1" name="tooltip" type="String">
@@ -49167,11 +54655,11 @@
</argument>
<argument index="5" name="duration" type="float">
</argument>
- <argument index="6" name="trans_type" type="int">
+ <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
</argument>
- <argument index="7" name="ease_type" type="int">
+ <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
</argument>
- <argument index="8" name="delay" type="float" default="0">
+ <argument index="8" name="delay" type="float" default="null">
</argument>
<description>
Follow [code]method[/code] of [code]object[/code] and apply the returned value on [code]target_method[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] later. Methods are animated by calling them with consequitive values.
@@ -49193,11 +54681,11 @@
</argument>
<argument index="5" name="duration" type="float">
</argument>
- <argument index="6" name="trans_type" type="int">
+ <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
</argument>
- <argument index="7" name="ease_type" type="int">
+ <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
</argument>
- <argument index="8" name="delay" type="float" default="0">
+ <argument index="8" name="delay" type="float" default="null">
</argument>
<description>
Follow [code]property[/code] of [code]object[/code] and apply it on [code]target_property[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Note that [code]target:target_property[/code] would equal [code]object:property[/code] at the end of the tween.
@@ -49234,15 +54722,15 @@
</argument>
<argument index="2" name="callback" type="String">
</argument>
- <argument index="3" name="arg1" type="Variant" default="NULL">
+ <argument index="3" name="arg1" type="Variant" default="null">
</argument>
- <argument index="4" name="arg2" type="Variant" default="NULL">
+ <argument index="4" name="arg2" type="Variant" default="null">
</argument>
- <argument index="5" name="arg3" type="Variant" default="NULL">
+ <argument index="5" name="arg3" type="Variant" default="null">
</argument>
- <argument index="6" name="arg4" type="Variant" default="NULL">
+ <argument index="6" name="arg4" type="Variant" default="null">
</argument>
- <argument index="7" name="arg5" type="Variant" default="NULL">
+ <argument index="7" name="arg5" type="Variant" default="null">
</argument>
<description>
Call [code]callback[/code] of [code]object[/code] after [code]duration[/code]. [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback.
@@ -49257,15 +54745,15 @@
</argument>
<argument index="2" name="callback" type="String">
</argument>
- <argument index="3" name="arg1" type="Variant" default="NULL">
+ <argument index="3" name="arg1" type="Variant" default="null">
</argument>
- <argument index="4" name="arg2" type="Variant" default="NULL">
+ <argument index="4" name="arg2" type="Variant" default="null">
</argument>
- <argument index="5" name="arg3" type="Variant" default="NULL">
+ <argument index="5" name="arg3" type="Variant" default="null">
</argument>
- <argument index="6" name="arg4" type="Variant" default="NULL">
+ <argument index="6" name="arg4" type="Variant" default="null">
</argument>
- <argument index="7" name="arg5" type="Variant" default="NULL">
+ <argument index="7" name="arg5" type="Variant" default="null">
</argument>
<description>
Call [code]callback[/code] of [code]object[/code] after [code]duration[/code] on the main thread (similar to [methog Object.call_deferred). [code]arg1[/code]-[code]arg5[/code] are arguments to be passed to the callback.
@@ -49284,11 +54772,11 @@
</argument>
<argument index="4" name="duration" type="float">
</argument>
- <argument index="5" name="trans_type" type="int">
+ <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType">
</argument>
- <argument index="6" name="ease_type" type="int">
+ <argument index="6" name="ease_type" type="int" enum="Tween.EaseType">
</argument>
- <argument index="7" name="delay" type="float" default="0">
+ <argument index="7" name="delay" type="float" default="null">
</argument>
<description>
Animate [code]method[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecuitive values.
@@ -49308,11 +54796,11 @@
</argument>
<argument index="4" name="duration" type="float">
</argument>
- <argument index="5" name="trans_type" type="int">
+ <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType">
</argument>
- <argument index="6" name="ease_type" type="int">
+ <argument index="6" name="ease_type" type="int" enum="Tween.EaseType">
</argument>
- <argument index="7" name="delay" type="float" default="0">
+ <argument index="7" name="delay" type="float" default="null">
</argument>
<description>
Animate [code]property[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later.
@@ -49338,7 +54826,7 @@
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
+ <argument index="1" name="key" type="String" default="null">
</argument>
<description>
Stop animating and completely remove a tween, given its object and property/method pair. Passing empty String as key will remove all tweens for given object.
@@ -49356,7 +54844,7 @@
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
+ <argument index="1" name="key" type="String" default="null">
</argument>
<description>
Resets a tween to the initial value (the one given, not the one before the tween), given its object and property/method pair. Passing empty String as key will reset all tweens for given object.
@@ -49374,7 +54862,7 @@
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
+ <argument index="1" name="key" type="String" default="null">
</argument>
<description>
Continue animating a stopped tween, given its object and property/method pair. Passing empty String as key will resume all tweens for given object.
@@ -49397,6 +54885,8 @@
</description>
</method>
<method name="set_active">
+ <return type="void">
+ </return>
<argument index="0" name="active" type="bool">
</argument>
<description>
@@ -49404,6 +54894,8 @@
</description>
</method>
<method name="set_repeat">
+ <return type="void">
+ </return>
<argument index="0" name="repeat" type="bool">
</argument>
<description>
@@ -49411,6 +54903,8 @@
</description>
</method>
<method name="set_speed_scale">
+ <return type="void">
+ </return>
<argument index="0" name="speed" type="float">
</argument>
<description>
@@ -49418,7 +54912,9 @@
</description>
</method>
<method name="set_tween_process_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Tween.TweenProcessMode">
</argument>
<description>
Set whether the Tween uses [code]_process[/code] or [code]_fixed_process[/code] (accepts TWEEN_PROCESS_IDLE and TWEEN_PROCESS_FIXED constants, respectively).
@@ -49436,7 +54932,7 @@
</return>
<argument index="0" name="object" type="Object">
</argument>
- <argument index="1" name="key" type="String" default="&quot;&quot;">
+ <argument index="1" name="key" type="String" default="null">
</argument>
<description>
Stop animating a tween, given its object and property/method pair. Passing empty String as key will stop all tweens for given object.
@@ -49464,11 +54960,11 @@
</argument>
<argument index="5" name="duration" type="float">
</argument>
- <argument index="6" name="trans_type" type="int">
+ <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
</argument>
- <argument index="7" name="ease_type" type="int">
+ <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
</argument>
- <argument index="8" name="delay" type="float" default="0">
+ <argument index="8" name="delay" type="float" default="null">
</argument>
<description>
Animate [code]method[/code] of [code]object[/code] from the value returned by [code]initial.initial_method[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecuitive values.
@@ -49490,11 +54986,11 @@
</argument>
<argument index="5" name="duration" type="float">
</argument>
- <argument index="6" name="trans_type" type="int">
+ <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType">
</argument>
- <argument index="7" name="ease_type" type="int">
+ <argument index="7" name="ease_type" type="int" enum="Tween.EaseType">
</argument>
- <argument index="8" name="delay" type="float" default="0">
+ <argument index="8" name="delay" type="float" default="null">
</argument>
<description>
Animate [code]property[/code] of [code]object[/code] from the current value of the [code]initial_val[/code] property of [code]initial[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later.
@@ -49510,7 +55006,7 @@
</method>
</methods>
<members>
- <member name="playback_process_mode" type="int" setter="set_tween_process_mode" getter="get_tween_process_mode" brief="">
+ <member name="playback_process_mode" type="int" setter="set_tween_process_mode" getter="get_tween_process_mode" brief="" enum="Tween.TweenProcessMode">
</member>
</members>
<signals>
@@ -49569,7 +55065,7 @@
Means that the animation is interpolated with a quadratic (to the power of 2) function.
</constant>
<constant name="TRANS_EXPO" value="5">
- Means that the animation is interpolated with a exponential (some number to the power of x) function.
+ Means that the animation is interpolated with an exponential (some number to the power of x) function.
</constant>
<constant name="TRANS_ELASTIC" value="6">
Means that the animation is interpolated with elasticity, wiggling around the edges.
@@ -49610,6 +55106,8 @@
</description>
<methods>
<method name="add_do_method" qualifiers="vararg">
+ <return type="Variant">
+ </return>
<argument index="0" name="object" type="Object">
</argument>
<argument index="1" name="method" type="String">
@@ -49618,6 +55116,8 @@
</description>
</method>
<method name="add_do_property">
+ <return type="void">
+ </return>
<argument index="0" name="object" type="Object">
</argument>
<argument index="1" name="property" type="String">
@@ -49629,6 +55129,8 @@
</description>
</method>
<method name="add_do_reference">
+ <return type="void">
+ </return>
<argument index="0" name="object" type="Object">
</argument>
<description>
@@ -49636,6 +55138,8 @@
</description>
</method>
<method name="add_undo_method" qualifiers="vararg">
+ <return type="Variant">
+ </return>
<argument index="0" name="object" type="Object">
</argument>
<argument index="1" name="method" type="String">
@@ -49644,6 +55148,8 @@
</description>
</method>
<method name="add_undo_property">
+ <return type="void">
+ </return>
<argument index="0" name="object" type="Object">
</argument>
<argument index="1" name="property" type="String">
@@ -49655,6 +55161,8 @@
</description>
</method>
<method name="add_undo_reference">
+ <return type="void">
+ </return>
<argument index="0" name="object" type="Object">
</argument>
<description>
@@ -49662,19 +55170,25 @@
</description>
</method>
<method name="clear_history">
+ <return type="void">
+ </return>
<description>
Clear the undo/redo history and associated references.
</description>
</method>
<method name="commit_action">
+ <return type="void">
+ </return>
<description>
Commit the action. All 'do' methods/properties are called/set when this function is called.
</description>
</method>
<method name="create_action">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="merge_mode" type="int" default="0">
+ <argument index="1" name="merge_mode" type="int" enum="UndoRedo.MergeMode" default="null">
</argument>
<description>
Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property] and [method add_undo_property].
@@ -49740,6 +55254,8 @@
</theme_item>
<theme_item name="grabber_highlight" type="StyleBox">
</theme_item>
+ <theme_item name="grabber_pressed" type="StyleBox">
+ </theme_item>
<theme_item name="increment" type="Texture">
</theme_item>
<theme_item name="increment_highlight" type="Texture">
@@ -49780,6 +55296,8 @@
<constants>
</constants>
<theme_items>
+ <theme_item name="focus" type="StyleBox">
+ </theme_item>
<theme_item name="grabber" type="Texture">
</theme_item>
<theme_item name="grabber_disabled" type="Texture">
@@ -50285,13 +55803,13 @@
</member>
</members>
<constants>
- <constant name="AXIS_X" value="0">
+ <constant name="AXIS_X" value="0" enum="">
Enumerated value for the X axis. Returned by functions like max_axis or min_axis.
</constant>
- <constant name="AXIS_Y" value="1">
+ <constant name="AXIS_Y" value="1" enum="">
Enumerated value for the Y axis.
</constant>
- <constant name="AXIS_Z" value="2">
+ <constant name="AXIS_Z" value="2" enum="">
Enumerated value for the Z axis.
</constant>
</constants>
@@ -50345,30 +55863,40 @@
</description>
</method>
<method name="set_brake">
+ <return type="void">
+ </return>
<argument index="0" name="brake" type="float">
</argument>
<description>
</description>
</method>
<method name="set_engine_force">
+ <return type="void">
+ </return>
<argument index="0" name="engine_force" type="float">
</argument>
<description>
</description>
</method>
<method name="set_friction">
+ <return type="void">
+ </return>
<argument index="0" name="friction" type="float">
</argument>
<description>
</description>
</method>
<method name="set_mass">
+ <return type="void">
+ </return>
<argument index="0" name="mass" type="float">
</argument>
<description>
</description>
</method>
<method name="set_steering">
+ <return type="void">
+ </return>
<argument index="0" name="steering" type="float">
</argument>
<description>
@@ -50470,66 +55998,88 @@
</description>
</method>
<method name="set_damping_compression">
+ <return type="void">
+ </return>
<argument index="0" name="length" type="float">
</argument>
<description>
</description>
</method>
<method name="set_damping_relaxation">
+ <return type="void">
+ </return>
<argument index="0" name="length" type="float">
</argument>
<description>
</description>
</method>
<method name="set_friction_slip">
+ <return type="void">
+ </return>
<argument index="0" name="length" type="float">
</argument>
<description>
</description>
</method>
<method name="set_radius">
+ <return type="void">
+ </return>
<argument index="0" name="length" type="float">
</argument>
<description>
</description>
</method>
<method name="set_roll_influence">
+ <return type="void">
+ </return>
<argument index="0" name="roll_influence" type="float">
</argument>
<description>
</description>
</method>
<method name="set_suspension_max_force">
+ <return type="void">
+ </return>
<argument index="0" name="length" type="float">
</argument>
<description>
</description>
</method>
<method name="set_suspension_rest_length">
+ <return type="void">
+ </return>
<argument index="0" name="length" type="float">
</argument>
<description>
</description>
</method>
<method name="set_suspension_stiffness">
+ <return type="void">
+ </return>
<argument index="0" name="length" type="float">
</argument>
<description>
</description>
</method>
<method name="set_suspension_travel">
+ <return type="void">
+ </return>
<argument index="0" name="length" type="float">
</argument>
<description>
</description>
</method>
<method name="set_use_as_steering">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_use_as_traction">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -50656,11 +56206,15 @@
</description>
</method>
<method name="play">
+ <return type="void">
+ </return>
<description>
Start the video playback.
</description>
</method>
<method name="set_audio_track">
+ <return type="void">
+ </return>
<argument index="0" name="track" type="int">
</argument>
<description>
@@ -50668,6 +56222,8 @@
</description>
</method>
<method name="set_autoplay">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -50675,6 +56231,8 @@
</description>
</method>
<method name="set_buffering_msec">
+ <return type="void">
+ </return>
<argument index="0" name="msec" type="int">
</argument>
<description>
@@ -50682,6 +56240,8 @@
</description>
</method>
<method name="set_expand">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -50689,6 +56249,8 @@
</description>
</method>
<method name="set_paused">
+ <return type="void">
+ </return>
<argument index="0" name="paused" type="bool">
</argument>
<description>
@@ -50696,6 +56258,8 @@
</description>
</method>
<method name="set_stream">
+ <return type="void">
+ </return>
<argument index="0" name="stream" type="VideoStream">
</argument>
<description>
@@ -50703,6 +56267,8 @@
</description>
</method>
<method name="set_volume">
+ <return type="void">
+ </return>
<argument index="0" name="volume" type="float">
</argument>
<description>
@@ -50710,6 +56276,8 @@
</description>
</method>
<method name="set_volume_db">
+ <return type="void">
+ </return>
<argument index="0" name="db" type="float">
</argument>
<description>
@@ -50717,6 +56285,8 @@
</description>
</method>
<method name="stop">
+ <return type="void">
+ </return>
<description>
Stop the video playback.
</description>
@@ -50762,11 +56332,6 @@
Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw.
</description>
<methods>
- <method name="clear">
- <description>
- Clear the viewport manually.
- </description>
- </method>
<method name="find_world" qualifiers="const">
<return type="World">
</return>
@@ -50795,11 +56360,10 @@
Get the canvas transform of the viewport.
</description>
</method>
- <method name="get_clear_on_new_frame" qualifiers="const">
- <return type="bool">
+ <method name="get_clear_mode" qualifiers="const">
+ <return type="int">
</return>
<description>
- Return whether automatic clearing of the render target on each frame is enabled.
</description>
</method>
<method name="get_debug_draw" qualifiers="const">
@@ -50852,7 +56416,7 @@
<method name="get_render_info">
<return type="int">
</return>
- <argument index="0" name="info" type="int">
+ <argument index="0" name="info" type="int" enum="Viewport.RenderInfo">
</argument>
<description>
</description>
@@ -50962,7 +56526,9 @@
</description>
</method>
<method name="input">
- <argument index="0" name="local_event" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="local_event" type="InputEvent">
</argument>
<description>
</description>
@@ -51016,6 +56582,8 @@
</description>
</method>
<method name="set_as_audio_listener">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -51023,6 +56591,8 @@
</description>
</method>
<method name="set_as_audio_listener_2d">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -51030,37 +56600,49 @@
</description>
</method>
<method name="set_attach_to_screen_rect">
+ <return type="void">
+ </return>
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
</description>
</method>
<method name="set_canvas_transform">
+ <return type="void">
+ </return>
<argument index="0" name="xform" type="Transform2D">
</argument>
<description>
Set the canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]\ s. This is relative to the global canvas transform of the viewport.
</description>
</method>
- <method name="set_clear_on_new_frame">
- <argument index="0" name="enable" type="bool">
+ <method name="set_clear_mode">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Viewport.ClearMode">
</argument>
<description>
</description>
</method>
<method name="set_debug_draw">
- <argument index="0" name="debug_draw" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="debug_draw" type="int" enum="Viewport.DebugDraw">
</argument>
<description>
</description>
</method>
<method name="set_disable_3d">
+ <return type="void">
+ </return>
<argument index="0" name="disable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_disable_input">
+ <return type="void">
+ </return>
<argument index="0" name="disable" type="bool">
</argument>
<description>
@@ -51068,6 +56650,8 @@
</description>
</method>
<method name="set_global_canvas_transform">
+ <return type="void">
+ </return>
<argument index="0" name="xform" type="Transform2D">
</argument>
<description>
@@ -51075,18 +56659,24 @@
</description>
</method>
<method name="set_hdr">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_msaa">
- <argument index="0" name="msaa" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="msaa" type="int" enum="Viewport.MSAA">
</argument>
<description>
</description>
</method>
<method name="set_physics_object_picking">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -51094,20 +56684,26 @@
</description>
</method>
<method name="set_shadow_atlas_quadrant_subdiv">
+ <return type="void">
+ </return>
<argument index="0" name="quadrant" type="int">
</argument>
- <argument index="1" name="subdiv" type="int">
+ <argument index="1" name="subdiv" type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv">
</argument>
<description>
</description>
</method>
<method name="set_shadow_atlas_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="int">
</argument>
<description>
</description>
</method>
<method name="set_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="Vector2">
</argument>
<description>
@@ -51115,17 +56711,21 @@
</description>
</method>
<method name="set_size_override">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
- <argument index="1" name="size" type="Vector2" default="Vector2(-1, -1)">
+ <argument index="1" name="size" type="Vector2" default="Vector2( -1, -1 )">
</argument>
- <argument index="2" name="margin" type="Vector2" default="Vector2(0, 0)">
+ <argument index="2" name="margin" type="Vector2" default="null">
</argument>
<description>
Set the size override of the viewport. If the enable parameter is true, it would use the override, otherwise it would use the default size. If the size parameter is equal to [code](-1, -1)[/code], it won't update the size.
</description>
</method>
<method name="set_size_override_stretch">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
@@ -51133,6 +56733,8 @@
</description>
</method>
<method name="set_transparent_background">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -51140,19 +56742,33 @@
</description>
</method>
<method name="set_update_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="Viewport.UpdateMode">
</argument>
<description>
Set when the render target would be updated, using the [code]UPDATE_*[/code] constants
</description>
</method>
<method name="set_usage">
- <argument index="0" name="usage" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="usage" type="int" enum="Viewport.Usage">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_use_arvr">
+ <return type="void">
+ </return>
+ <argument index="0" name="use" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_use_own_world">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -51160,6 +56776,8 @@
</description>
</method>
<method name="set_vflip">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -51167,6 +56785,8 @@
</description>
</method>
<method name="set_world">
+ <return type="void">
+ </return>
<argument index="0" name="world" type="World">
</argument>
<description>
@@ -51174,23 +56794,37 @@
</description>
</method>
<method name="set_world_2d">
+ <return type="void">
+ </return>
<argument index="0" name="world_2d" type="World2D">
</argument>
<description>
</description>
</method>
<method name="unhandled_input">
- <argument index="0" name="local_event" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="local_event" type="InputEvent">
</argument>
<description>
</description>
</method>
<method name="update_worlds">
+ <return type="void">
+ </return>
<description>
Force update of the 2D and 3D worlds.
</description>
</method>
+ <method name="use_arvr">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="warp_mouse">
+ <return type="void">
+ </return>
<argument index="0" name="to_pos" type="Vector2">
</argument>
<description>
@@ -51199,11 +56833,13 @@
</method>
</methods>
<members>
+ <member name="arvr" type="bool" setter="set_use_arvr" getter="use_arvr" brief="">
+ </member>
<member name="audio_listener_enable_2d" type="bool" setter="set_as_audio_listener_2d" getter="is_audio_listener_2d" brief="">
</member>
<member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener" getter="is_audio_listener" brief="">
</member>
- <member name="debug_draw" type="int" setter="set_debug_draw" getter="get_debug_draw" brief="">
+ <member name="debug_draw" type="int" setter="set_debug_draw" getter="get_debug_draw" brief="" enum="Viewport.DebugDraw">
</member>
<member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled" brief="">
</member>
@@ -51211,33 +56847,33 @@
</member>
<member name="hdr" type="bool" setter="set_hdr" getter="get_hdr" brief="">
</member>
- <member name="msaa" type="int" setter="set_msaa" getter="get_msaa" brief="">
+ <member name="msaa" type="int" setter="set_msaa" getter="get_msaa" brief="" enum="Viewport.MSAA">
</member>
<member name="own_world" type="bool" setter="set_use_own_world" getter="is_using_own_world" brief="">
</member>
<member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" brief="">
</member>
- <member name="render_target_clear_on_new_frame" type="bool" setter="set_clear_on_new_frame" getter="get_clear_on_new_frame" brief="">
+ <member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" brief="" enum="Viewport.ClearMode">
</member>
- <member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" brief="">
+ <member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" brief="" enum="Viewport.UpdateMode">
</member>
<member name="render_target_v_flip" type="bool" setter="set_vflip" getter="get_vflip" brief="">
</member>
- <member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" brief="">
+ <member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" brief="" enum="Viewport.ShadowAtlasQuadrantSubdiv">
</member>
- <member name="shadow_atlas_quad_1" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" brief="">
+ <member name="shadow_atlas_quad_1" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" brief="" enum="Viewport.ShadowAtlasQuadrantSubdiv">
</member>
- <member name="shadow_atlas_quad_2" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" brief="">
+ <member name="shadow_atlas_quad_2" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" brief="" enum="Viewport.ShadowAtlasQuadrantSubdiv">
</member>
- <member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" brief="">
+ <member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" brief="" enum="Viewport.ShadowAtlasQuadrantSubdiv">
</member>
<member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" brief="">
</member>
- <member name="size" type="Rect2" setter="set_size" getter="get_size" brief="">
+ <member name="size" type="Vector2" setter="set_size" getter="get_size" brief="">
</member>
<member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background" brief="">
</member>
- <member name="usage" type="int" setter="set_usage" getter="get_usage" brief="">
+ <member name="usage" type="int" setter="set_usage" getter="get_usage" brief="" enum="Viewport.Usage">
</member>
<member name="world" type="World" setter="set_world" getter="get_world" brief="">
</member>
@@ -51324,6 +56960,8 @@
</description>
</method>
<method name="set_stretch">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -51350,6 +56988,8 @@
</description>
</method>
<method name="set_viewport_path_in_scene">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="NodePath">
</argument>
<description>
@@ -51374,14 +57014,16 @@
<method name="is_enabler_enabled" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="enabler" type="int">
+ <argument index="0" name="enabler" type="int" enum="VisibilityEnabler.Enabler">
</argument>
<description>
Returns whether the specified enabler was set to true or not.
</description>
</method>
<method name="set_enabler">
- <argument index="0" name="enabler" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabler" type="int" enum="VisibilityEnabler.Enabler">
</argument>
<argument index="1" name="enabled" type="bool">
</argument>
@@ -51418,14 +57060,16 @@
<method name="is_enabler_enabled" qualifiers="const">
<return type="bool">
</return>
- <argument index="0" name="enabler" type="int">
+ <argument index="0" name="enabler" type="int" enum="VisibilityEnabler2D.Enabler">
</argument>
<description>
Returns whether the specified enabler was set to true or not.
</description>
</method>
<method name="set_enabler">
- <argument index="0" name="enabler" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabler" type="int" enum="VisibilityEnabler2D.Enabler">
</argument>
<argument index="1" name="enabled" type="bool">
</argument>
@@ -51493,6 +57137,8 @@
</description>
</method>
<method name="set_aabb">
+ <return type="void">
+ </return>
<argument index="0" name="rect" type="Rect3">
</argument>
<description>
@@ -51556,6 +57202,8 @@
</description>
</method>
<method name="set_rect">
+ <return type="void">
+ </return>
<argument index="0" name="rect" type="Rect2">
</argument>
<description>
@@ -51621,12 +57269,16 @@
</description>
</method>
<method name="set_base">
+ <return type="void">
+ </return>
<argument index="0" name="base" type="RID">
</argument>
<description>
</description>
</method>
<method name="set_layer_mask">
+ <return type="void">
+ </return>
<argument index="0" name="mask" type="int">
</argument>
<description>
@@ -51647,47 +57299,57 @@
</description>
<methods>
<method name="add_custom_signal">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
</description>
</method>
<method name="add_function">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
</description>
</method>
<method name="add_node">
+ <return type="void">
+ </return>
<argument index="0" name="func" type="String">
</argument>
<argument index="1" name="id" type="int">
</argument>
- <argument index="2" name="node" type="Object">
+ <argument index="2" name="node" type="VisualScriptNode">
</argument>
- <argument index="3" name="pos" type="Vector2" default="Vector2(0, 0)">
+ <argument index="3" name="pos" type="Vector2" default="null">
</argument>
<description>
</description>
</method>
<method name="add_variable">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="default_value" type="Variant" default="NULL">
+ <argument index="1" name="default_value" type="Variant" default="null">
</argument>
- <argument index="2" name="export" type="bool" default="false">
+ <argument index="2" name="export" type="bool" default="null">
</argument>
<description>
</description>
</method>
<method name="custom_signal_add_argument">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="type" type="int">
+ <argument index="1" name="type" type="int" enum="Variant.Type">
</argument>
<argument index="2" name="argname" type="String">
</argument>
- <argument index="3" name="index" type="int" default="-1">
+ <argument index="3" name="index" type="int" default="null">
</argument>
<description>
</description>
@@ -51721,14 +57383,18 @@
</description>
</method>
<method name="custom_signal_remove_argument">
- <argument index="0" name="argidx" type="String">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="arg1" type="int">
+ <argument index="1" name="argidx" type="int">
</argument>
<description>
</description>
</method>
<method name="custom_signal_set_argument_name">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="argidx" type="int">
@@ -51739,16 +57405,20 @@
</description>
</method>
<method name="custom_signal_set_argument_type">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="argidx" type="int">
</argument>
- <argument index="2" name="type" type="int">
+ <argument index="2" name="type" type="int" enum="Variant.Type">
</argument>
<description>
</description>
</method>
<method name="custom_signal_swap_argument">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="argidx" type="int">
@@ -51759,6 +57429,8 @@
</description>
</method>
<method name="data_connect">
+ <return type="void">
+ </return>
<argument index="0" name="func" type="String">
</argument>
<argument index="1" name="from_node" type="int">
@@ -51773,6 +57445,8 @@
</description>
</method>
<method name="data_disconnect">
+ <return type="void">
+ </return>
<argument index="0" name="func" type="String">
</argument>
<argument index="1" name="from_node" type="int">
@@ -51797,13 +57471,13 @@
<method name="get_function_scroll" qualifiers="const">
<return type="Vector2">
</return>
- <argument index="0" name="arg0" type="String">
+ <argument index="0" name="name" type="String">
</argument>
<description>
</description>
</method>
<method name="get_node" qualifiers="const">
- <return type="Object">
+ <return type="VisualScriptNode">
</return>
<argument index="0" name="func" type="String">
</argument>
@@ -51823,6 +57497,8 @@
</description>
</method>
<method name="get_variable_default_value" qualifiers="const">
+ <return type="Variant">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -51909,18 +57585,24 @@
</description>
</method>
<method name="remove_custom_signal">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
</description>
</method>
<method name="remove_function">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
</description>
</method>
<method name="remove_node">
+ <return type="void">
+ </return>
<argument index="0" name="func" type="String">
</argument>
<argument index="1" name="id" type="int">
@@ -51929,12 +57611,16 @@
</description>
</method>
<method name="remove_variable">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
</description>
</method>
<method name="rename_custom_signal">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="new_name" type="String">
@@ -51943,6 +57629,8 @@
</description>
</method>
<method name="rename_function">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="new_name" type="String">
@@ -51951,6 +57639,8 @@
</description>
</method>
<method name="rename_variable">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="new_name" type="String">
@@ -51959,6 +57649,8 @@
</description>
</method>
<method name="sequence_connect">
+ <return type="void">
+ </return>
<argument index="0" name="func" type="String">
</argument>
<argument index="1" name="from_node" type="int">
@@ -51971,6 +57663,8 @@
</description>
</method>
<method name="sequence_disconnect">
+ <return type="void">
+ </return>
<argument index="0" name="func" type="String">
</argument>
<argument index="1" name="from_node" type="int">
@@ -51983,20 +57677,26 @@
</description>
</method>
<method name="set_function_scroll">
- <argument index="0" name="ofs" type="String">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
</argument>
- <argument index="1" name="arg1" type="Vector2">
+ <argument index="1" name="ofs" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_instance_base_type">
+ <return type="void">
+ </return>
<argument index="0" name="type" type="String">
</argument>
<description>
</description>
</method>
<method name="set_node_pos">
+ <return type="void">
+ </return>
<argument index="0" name="func" type="String">
</argument>
<argument index="1" name="id" type="int">
@@ -52007,6 +57707,8 @@
</description>
</method>
<method name="set_variable_default_value">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="value" type="Variant">
@@ -52015,6 +57717,8 @@
</description>
</method>
<method name="set_variable_export">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="enable" type="bool">
@@ -52023,6 +57727,8 @@
</description>
</method>
<method name="set_variable_info">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<argument index="1" name="value" type="Dictionary">
@@ -52067,12 +57773,16 @@
</description>
</method>
<method name="set_basic_type">
- <argument index="0" name="name" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="int" enum="Variant.Type">
</argument>
<description>
</description>
</method>
<method name="set_basic_type_constant">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -52080,9 +57790,9 @@
</method>
</methods>
<members>
- <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" brief="">
+ <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" brief="" enum="Variant.Type">
</member>
- <member name="constant" type="String" setter="set_basic_type_constant" getter="get_basic_type_constant" brief="">
+ <member name="constant/constant" type="String" setter="set_basic_type_constant" getter="get_basic_type_constant" brief="">
</member>
</members>
<constants>
@@ -52101,14 +57811,16 @@
</description>
</method>
<method name="set_func">
- <argument index="0" name="which" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="which" type="int" enum="VisualScriptBuiltinFunc.BuiltinFunc">
</argument>
<description>
</description>
</method>
</methods>
<members>
- <member name="function" type="int" setter="set_func" getter="get_func" brief="">
+ <member name="function" type="int" setter="set_func" getter="get_func" brief="" enum="VisualScriptBuiltinFunc.BuiltinFunc">
</member>
</members>
<constants>
@@ -52133,12 +57845,16 @@
</description>
</method>
<method name="set_base_type">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
</description>
</method>
<method name="set_class_constant">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -52148,7 +57864,7 @@
<members>
<member name="base_type" type="String" setter="set_base_type" getter="get_base_type" brief="">
</member>
- <member name="constant" type="String" setter="set_class_constant" getter="get_class_constant" brief="">
+ <member name="constant/constant" type="String" setter="set_class_constant" getter="get_class_constant" brief="">
</member>
</members>
<constants>
@@ -52179,18 +57895,24 @@
</description>
</method>
<method name="set_description">
+ <return type="void">
+ </return>
<argument index="0" name="description" type="String">
</argument>
<description>
</description>
</method>
<method name="set_size">
+ <return type="void">
+ </return>
<argument index="0" name="size" type="Vector2">
</argument>
<description>
</description>
</method>
<method name="set_title">
+ <return type="void">
+ </return>
<argument index="0" name="title" type="String">
</argument>
<description>
@@ -52237,12 +57959,16 @@
</description>
</method>
<method name="set_constant_type">
- <argument index="0" name="type" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
</argument>
<description>
</description>
</method>
<method name="set_constant_value">
+ <return type="void">
+ </return>
<argument index="0" name="value" type="Variant">
</argument>
<description>
@@ -52250,9 +57976,9 @@
</method>
</methods>
<members>
- <member name="type" type="int" setter="set_constant_type" getter="get_constant_type" brief="">
+ <member name="type" type="int" setter="set_constant_type" getter="get_constant_type" brief="" enum="Variant.Type">
</member>
- <member name="value" type="Nil" setter="set_constant_value" getter="get_constant_value" brief="">
+ <member name="value" type="Variant" setter="set_constant_value" getter="get_constant_value" brief="">
</member>
</members>
<constants>
@@ -52277,13 +58003,17 @@
</description>
</method>
<method name="set_constructor">
+ <return type="void">
+ </return>
<argument index="0" name="constructor" type="Dictionary">
</argument>
<description>
</description>
</method>
<method name="set_constructor_type">
- <argument index="0" name="type" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
</argument>
<description>
</description>
@@ -52292,7 +58022,7 @@
<members>
<member name="constructor" type="Dictionary" setter="set_constructor" getter="get_constructor" brief="">
</member>
- <member name="type" type="int" setter="set_constructor_type" getter="get_constructor_type" brief="">
+ <member name="type" type="int" setter="set_constructor_type" getter="get_constructor_type" brief="" enum="Variant.Type">
</member>
</members>
<constants>
@@ -52414,15 +58144,15 @@
</constant>
<constant name="START_MODE_RESUME_YIELD" value="2">
</constant>
- <constant name="STEP_PUSH_STACK_BIT" value="16777216">
+ <constant name="STEP_PUSH_STACK_BIT" value="16777216" enum="">
</constant>
- <constant name="STEP_GO_BACK_BIT" value="33554432">
+ <constant name="STEP_GO_BACK_BIT" value="33554432" enum="">
</constant>
- <constant name="STEP_NO_ADVANCE_BIT" value="67108864">
+ <constant name="STEP_NO_ADVANCE_BIT" value="67108864" enum="">
</constant>
- <constant name="STEP_EXIT_FUNCTION_BIT" value="134217728">
+ <constant name="STEP_EXIT_FUNCTION_BIT" value="134217728" enum="">
</constant>
- <constant name="STEP_YIELD_BIT" value="268435456">
+ <constant name="STEP_YIELD_BIT" value="268435456" enum="">
</constant>
</constants>
</class>
@@ -52439,7 +58169,9 @@
</description>
</method>
<method name="set_deconstruct_type">
- <argument index="0" name="type" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
</argument>
<description>
</description>
@@ -52448,7 +58180,7 @@
<members>
<member name="elem_cache" type="Array" setter="_set_elem_cache" getter="_get_elem_cache" brief="">
</member>
- <member name="type" type="int" setter="set_deconstruct_type" getter="get_deconstruct_type" brief="">
+ <member name="type" type="int" setter="set_deconstruct_type" getter="get_deconstruct_type" brief="" enum="Variant.Type">
</member>
</members>
<constants>
@@ -52467,6 +58199,8 @@
</description>
</method>
<method name="set_signal">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -52493,6 +58227,8 @@
</description>
</method>
<method name="set_singleton">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -52500,7 +58236,7 @@
</method>
</methods>
<members>
- <member name="constant" type="String" setter="set_singleton" getter="get_singleton" brief="">
+ <member name="constant/constant" type="String" setter="set_singleton" getter="get_singleton" brief="">
</member>
</members>
<constants>
@@ -52593,60 +58329,80 @@
</description>
</method>
<method name="set_base_path">
+ <return type="void">
+ </return>
<argument index="0" name="base_path" type="NodePath">
</argument>
<description>
</description>
</method>
<method name="set_base_script">
+ <return type="void">
+ </return>
<argument index="0" name="base_script" type="String">
</argument>
<description>
</description>
</method>
<method name="set_base_type">
+ <return type="void">
+ </return>
<argument index="0" name="base_type" type="String">
</argument>
<description>
</description>
</method>
<method name="set_basic_type">
- <argument index="0" name="basic_type" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="basic_type" type="int" enum="Variant.Type">
</argument>
<description>
</description>
</method>
<method name="set_call_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="VisualScriptFunctionCall.CallMode">
</argument>
<description>
</description>
</method>
<method name="set_function">
+ <return type="void">
+ </return>
<argument index="0" name="function" type="String">
</argument>
<description>
</description>
</method>
<method name="set_rpc_call_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="VisualScriptFunctionCall.RPCCallMode">
</argument>
<description>
</description>
</method>
<method name="set_singleton">
+ <return type="void">
+ </return>
<argument index="0" name="singleton" type="String">
</argument>
<description>
</description>
</method>
<method name="set_use_default_args">
+ <return type="void">
+ </return>
<argument index="0" name="amount" type="int">
</argument>
<description>
</description>
</method>
<method name="set_validate">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
@@ -52660,15 +58416,15 @@
</member>
<member name="base_type" type="String" setter="set_base_type" getter="get_base_type" brief="">
</member>
- <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" brief="">
+ <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" brief="" enum="Variant.Type">
</member>
- <member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" brief="">
+ <member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" brief="" enum="VisualScriptFunctionCall.CallMode">
</member>
<member name="function" type="String" setter="set_function" getter="get_function" brief="">
</member>
<member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path" brief="">
</member>
- <member name="rpc_call_mode" type="int" setter="set_rpc_call_mode" getter="get_rpc_call_mode" brief="">
+ <member name="rpc_call_mode" type="int" setter="set_rpc_call_mode" getter="get_rpc_call_mode" brief="" enum="VisualScriptFunctionCall.RPCCallMode">
</member>
<member name="singleton" type="String" setter="set_singleton" getter="get_singleton" brief="">
</member>
@@ -52695,6 +58451,8 @@
</description>
<methods>
<method name="connect_to_signal">
+ <return type="void">
+ </return>
<argument index="0" name="obj" type="Object">
</argument>
<argument index="1" name="signals" type="String">
@@ -52711,9 +58469,9 @@
</description>
</method>
<method name="resume">
- <return type="Array">
+ <return type="Variant">
</return>
- <argument index="0" name="args" type="Array" default="NULL">
+ <argument index="0" name="args" type="Array" default="null">
</argument>
<description>
</description>
@@ -52735,6 +58493,8 @@
</description>
</method>
<method name="set_global_constant">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="int">
</argument>
<description>
@@ -52742,7 +58502,7 @@
</method>
</methods>
<members>
- <member name="constant" type="int" setter="set_global_constant" getter="get_global_constant" brief="">
+ <member name="constant/constant" type="int" setter="set_global_constant" getter="get_global_constant" brief="">
</member>
</members>
<constants>
@@ -52787,12 +58547,16 @@
</description>
</method>
<method name="set_action_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="VisualScriptInputAction.Mode">
</argument>
<description>
</description>
</method>
<method name="set_action_name">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -52802,7 +58566,7 @@
<members>
<member name="action" type="String" setter="set_action_name" getter="get_action_name" brief="">
</member>
- <member name="mode" type="int" setter="set_action_mode" getter="get_action_mode" brief="">
+ <member name="mode" type="int" setter="set_action_mode" getter="get_action_mode" brief="" enum="VisualScriptInputAction.Mode">
</member>
</members>
<constants>
@@ -52837,20 +58601,24 @@
</description>
</method>
<method name="set_var_name">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
</description>
</method>
<method name="set_var_type">
- <argument index="0" name="type" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
</argument>
<description>
</description>
</method>
</methods>
<members>
- <member name="type" type="int" setter="set_var_type" getter="get_var_type" brief="">
+ <member name="type" type="int" setter="set_var_type" getter="get_var_type" brief="" enum="Variant.Type">
</member>
<member name="var_name" type="String" setter="set_var_name" getter="get_var_name" brief="">
</member>
@@ -52877,20 +58645,24 @@
</description>
</method>
<method name="set_var_name">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
</description>
</method>
<method name="set_var_type">
- <argument index="0" name="type" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
</argument>
<description>
</description>
</method>
</methods>
<members>
- <member name="type" type="int" setter="set_var_type" getter="get_var_type" brief="">
+ <member name="type" type="int" setter="set_var_type" getter="get_var_type" brief="" enum="Variant.Type">
</member>
<member name="var_name" type="String" setter="set_var_name" getter="get_var_name" brief="">
</member>
@@ -52911,14 +58683,16 @@
</description>
</method>
<method name="set_math_constant">
- <argument index="0" name="which" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="which" type="int" enum="VisualScriptMathConstant.MathConstant">
</argument>
<description>
</description>
</method>
</methods>
<members>
- <member name="constant" type="int" setter="set_math_constant" getter="get_math_constant" brief="">
+ <member name="constant/constant" type="int" setter="set_math_constant" getter="get_math_constant" brief="" enum="VisualScriptMathConstant.MathConstant">
</member>
</members>
<constants>
@@ -52945,6 +58719,8 @@
</description>
</method>
<method name="set_default_input_value">
+ <return type="void">
+ </return>
<argument index="0" name="port_idx" type="int">
</argument>
<argument index="1" name="value" type="Variant">
@@ -52985,22 +58761,26 @@
</description>
</method>
<method name="set_operator">
- <argument index="0" name="op" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="op" type="int" enum="Variant.Operator">
</argument>
<description>
</description>
</method>
<method name="set_typed">
- <argument index="0" name="type" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
</argument>
<description>
</description>
</method>
</methods>
<members>
- <member name="operator" type="int" setter="set_operator" getter="get_operator" brief="">
+ <member name="operator" type="int" setter="set_operator" getter="get_operator" brief="" enum="Variant.Operator">
</member>
- <member name="type" type="int" setter="set_typed" getter="get_typed" brief="">
+ <member name="type" type="int" setter="set_typed" getter="get_typed" brief="" enum="Variant.Type">
</member>
</members>
<constants>
@@ -53013,13 +58793,15 @@
</description>
<methods>
<method name="get_preload" qualifiers="const">
- <return type="Object">
+ <return type="Resource">
</return>
<description>
</description>
</method>
<method name="set_preload">
- <argument index="0" name="resource" type="Object">
+ <return type="void">
+ </return>
+ <argument index="0" name="resource" type="Resource">
</argument>
<description>
</description>
@@ -53081,42 +58863,56 @@
</description>
</method>
<method name="set_base_path">
+ <return type="void">
+ </return>
<argument index="0" name="base_path" type="NodePath">
</argument>
<description>
</description>
</method>
<method name="set_base_script">
+ <return type="void">
+ </return>
<argument index="0" name="base_script" type="String">
</argument>
<description>
</description>
</method>
<method name="set_base_type">
+ <return type="void">
+ </return>
<argument index="0" name="base_type" type="String">
</argument>
<description>
</description>
</method>
<method name="set_basic_type">
- <argument index="0" name="basic_type" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="basic_type" type="int" enum="Variant.Type">
</argument>
<description>
</description>
</method>
<method name="set_call_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="VisualScriptPropertyGet.CallMode">
</argument>
<description>
</description>
</method>
<method name="set_index">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="String">
</argument>
<description>
</description>
</method>
<method name="set_property">
+ <return type="void">
+ </return>
<argument index="0" name="property" type="String">
</argument>
<description>
@@ -53128,7 +58924,7 @@
</member>
<member name="base_type" type="String" setter="set_base_type" getter="get_base_type" brief="">
</member>
- <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" brief="">
+ <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" brief="" enum="Variant.Type">
</member>
<member name="index" type="String" setter="set_index" getter="get_index" brief="">
</member>
@@ -53136,9 +58932,9 @@
</member>
<member name="property" type="String" setter="set_property" getter="get_property" brief="">
</member>
- <member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" brief="">
+ <member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" brief="" enum="VisualScriptPropertyGet.CallMode">
</member>
- <member name="type_cache" type="int" setter="_set_type_cache" getter="_get_type_cache" brief="">
+ <member name="type_cache" type="int" setter="_set_type_cache" getter="_get_type_cache" brief="" enum="Variant.Type">
</member>
</members>
<constants>
@@ -53205,48 +59001,64 @@
</description>
</method>
<method name="set_assign_op">
- <argument index="0" name="assign_op" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="assign_op" type="int" enum="VisualScriptPropertySet.AssignOp">
</argument>
<description>
</description>
</method>
<method name="set_base_path">
+ <return type="void">
+ </return>
<argument index="0" name="base_path" type="NodePath">
</argument>
<description>
</description>
</method>
<method name="set_base_script">
+ <return type="void">
+ </return>
<argument index="0" name="base_script" type="String">
</argument>
<description>
</description>
</method>
<method name="set_base_type">
+ <return type="void">
+ </return>
<argument index="0" name="base_type" type="String">
</argument>
<description>
</description>
</method>
<method name="set_basic_type">
- <argument index="0" name="basic_type" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="basic_type" type="int" enum="Variant.Type">
</argument>
<description>
</description>
</method>
<method name="set_call_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="VisualScriptPropertySet.CallMode">
</argument>
<description>
</description>
</method>
<method name="set_index">
+ <return type="void">
+ </return>
<argument index="0" name="index" type="String">
</argument>
<description>
</description>
</method>
<method name="set_property">
+ <return type="void">
+ </return>
<argument index="0" name="property" type="String">
</argument>
<description>
@@ -53254,13 +59066,13 @@
</method>
</methods>
<members>
- <member name="assign_op" type="int" setter="set_assign_op" getter="get_assign_op" brief="">
+ <member name="assign_op" type="int" setter="set_assign_op" getter="get_assign_op" brief="" enum="VisualScriptPropertySet.AssignOp">
</member>
<member name="base_script" type="String" setter="set_base_script" getter="get_base_script" brief="">
</member>
<member name="base_type" type="String" setter="set_base_type" getter="get_base_type" brief="">
</member>
- <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" brief="">
+ <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" brief="" enum="Variant.Type">
</member>
<member name="index" type="String" setter="set_index" getter="get_index" brief="">
</member>
@@ -53268,9 +59080,9 @@
</member>
<member name="property" type="String" setter="set_property" getter="get_property" brief="">
</member>
- <member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" brief="">
+ <member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" brief="" enum="VisualScriptPropertySet.CallMode">
</member>
- <member name="type_cache" type="int" setter="_set_type_cache" getter="_get_type_cache" brief="">
+ <member name="type_cache" type="Dictionary" setter="_set_type_cache" getter="_get_type_cache" brief="">
</member>
</members>
<constants>
@@ -53295,6 +59107,8 @@
</description>
</method>
<method name="set_resource_path">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="String">
</argument>
<description>
@@ -53327,13 +59141,17 @@
</description>
</method>
<method name="set_enable_return_value">
+ <return type="void">
+ </return>
<argument index="0" name="enable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_return_type">
- <argument index="0" name="type" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
</argument>
<description>
</description>
@@ -53342,7 +59160,7 @@
<members>
<member name="return_enabled" type="bool" setter="set_enable_return_value" getter="is_return_value_enabled" brief="">
</member>
- <member name="return_type" type="int" setter="set_return_type" getter="get_return_type" brief="">
+ <member name="return_type" type="int" setter="set_return_type" getter="get_return_type" brief="" enum="Variant.Type">
</member>
</members>
<constants>
@@ -53361,6 +59179,8 @@
</description>
</method>
<method name="set_node_path">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="NodePath">
</argument>
<description>
@@ -53397,14 +59217,16 @@
</description>
</method>
<method name="set_typed">
- <argument index="0" name="type" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="int" enum="Variant.Type">
</argument>
<description>
</description>
</method>
</methods>
<members>
- <member name="type" type="int" setter="set_typed" getter="get_typed" brief="">
+ <member name="type" type="int" setter="set_typed" getter="get_typed" brief="" enum="Variant.Type">
</member>
</members>
<constants>
@@ -53433,6 +59255,8 @@
</description>
</method>
<method name="set_steps">
+ <return type="void">
+ </return>
<argument index="0" name="steps" type="int">
</argument>
<description>
@@ -53453,6 +59277,8 @@
</description>
<methods>
<method name="_subcall" qualifiers="virtual">
+ <return type="Variant">
+ </return>
<argument index="0" name="arguments" type="Variant">
</argument>
<description>
@@ -53491,12 +59317,16 @@
</description>
</method>
<method name="set_base_script">
+ <return type="void">
+ </return>
<argument index="0" name="path" type="String">
</argument>
<description>
</description>
</method>
<method name="set_base_type">
+ <return type="void">
+ </return>
<argument index="0" name="type" type="String">
</argument>
<description>
@@ -53525,6 +59355,8 @@
</description>
</method>
<method name="set_variable">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -53551,6 +59383,8 @@
</description>
</method>
<method name="set_variable">
+ <return type="void">
+ </return>
<argument index="0" name="name" type="String">
</argument>
<description>
@@ -53593,20 +59427,24 @@
</description>
</method>
<method name="set_wait_time">
+ <return type="void">
+ </return>
<argument index="0" name="sec" type="float">
</argument>
<description>
</description>
</method>
<method name="set_yield_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="VisualScriptYield.YieldMode">
</argument>
<description>
</description>
</method>
</methods>
<members>
- <member name="mode" type="int" setter="set_yield_mode" getter="get_yield_mode" brief="">
+ <member name="mode" type="int" setter="set_yield_mode" getter="get_yield_mode" brief="" enum="VisualScriptYield.YieldMode">
</member>
<member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time" brief="">
</member>
@@ -53651,24 +59489,32 @@
</description>
</method>
<method name="set_base_path">
+ <return type="void">
+ </return>
<argument index="0" name="base_path" type="NodePath">
</argument>
<description>
</description>
</method>
<method name="set_base_type">
+ <return type="void">
+ </return>
<argument index="0" name="base_type" type="String">
</argument>
<description>
</description>
</method>
<method name="set_call_mode">
- <argument index="0" name="mode" type="int">
+ <return type="void">
+ </return>
+ <argument index="0" name="mode" type="int" enum="VisualScriptYieldSignal.CallMode">
</argument>
<description>
</description>
</method>
<method name="set_signal">
+ <return type="void">
+ </return>
<argument index="0" name="signal" type="String">
</argument>
<description>
@@ -53678,7 +59524,7 @@
<members>
<member name="base_type" type="String" setter="set_base_type" getter="get_base_type" brief="">
</member>
- <member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" brief="">
+ <member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" brief="" enum="VisualScriptYieldSignal.CallMode">
</member>
<member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path" brief="">
</member>
@@ -53703,6 +59549,12 @@
The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed.
</description>
<methods>
+ <method name="force_draw">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="texture_create">
<return type="RID">
</return>
@@ -53712,9 +59564,9 @@
<method name="texture_create_from_image">
<return type="RID">
</return>
- <argument index="0" name="arg0" type="Object">
+ <argument index="0" name="image" type="Image">
</argument>
- <argument index="1" name="arg1" type="int" default="7">
+ <argument index="1" name="flags" type="int" default="null">
</argument>
<description>
</description>
@@ -53722,7 +59574,7 @@
<method name="texture_get_flags" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="arg0" type="RID">
+ <argument index="0" name="texture" type="RID">
</argument>
<description>
</description>
@@ -53730,7 +59582,7 @@
<method name="texture_get_height" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="arg0" type="RID">
+ <argument index="0" name="texture" type="RID">
</argument>
<description>
</description>
@@ -53738,20 +59590,24 @@
<method name="texture_get_width" qualifiers="const">
<return type="int">
</return>
- <argument index="0" name="arg0" type="RID">
+ <argument index="0" name="texture" type="RID">
</argument>
<description>
</description>
</method>
<method name="texture_set_flags">
- <argument index="0" name="arg0" type="RID">
+ <return type="void">
+ </return>
+ <argument index="0" name="texture" type="RID">
</argument>
- <argument index="1" name="arg1" type="int">
+ <argument index="1" name="flags" type="int">
</argument>
<description>
</description>
</method>
<method name="texture_set_shrink_all_x2_on_set_data">
+ <return type="void">
+ </return>
<argument index="0" name="shrink" type="bool">
</argument>
<description>
@@ -53770,7 +59626,7 @@
</description>
<methods>
<method name="get_ref" qualifiers="const">
- <return type="Object">
+ <return type="Variant">
</return>
<description>
Returns the [Object] this weakref is referring to.
@@ -53809,12 +59665,16 @@
</description>
</method>
<method name="set_resizable">
+ <return type="void">
+ </return>
<argument index="0" name="resizable" type="bool">
</argument>
<description>
</description>
</method>
<method name="set_title">
+ <return type="void">
+ </return>
<argument index="0" name="title" type="String">
</argument>
<description>
@@ -53890,12 +59750,16 @@
</description>
</method>
<method name="set_environment">
+ <return type="void">
+ </return>
<argument index="0" name="env" type="Environment">
</argument>
<description>
</description>
</method>
<method name="set_fallback_environment">
+ <return type="void">
+ </return>
<argument index="0" name="env" type="Environment">
</argument>
<description>
@@ -53960,6 +59824,8 @@
</description>
</method>
<method name="set_environment">
+ <return type="void">
+ </return>
<argument index="0" name="env" type="Environment">
</argument>
<description>
@@ -54111,6 +59977,8 @@
</description>
</method>
<method name="skip_section">
+ <return type="void">
+ </return>
<description>
Skips the current section. If the node contains other elements, they will be ignored and the cursor will go to the closing of the current element.
</description>
@@ -54156,6 +60024,8 @@
</description>
</method>
<method name="set_sort_enabled">
+ <return type="void">
+ </return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
diff --git a/drivers/SCsub b/drivers/SCsub
index 73a3f7898a..b8bba91378 100644
--- a/drivers/SCsub
+++ b/drivers/SCsub
@@ -16,6 +16,7 @@ SConscript('alsa/SCsub')
SConscript('pulseaudio/SCsub')
if (env["platform"] == "windows"):
SConscript("rtaudio/SCsub")
+ SConscript("wasapi/SCsub")
if (env["xaudio2"] == "yes"):
SConscript("xaudio2/SCsub")
diff --git a/drivers/alsa/audio_driver_alsa.cpp b/drivers/alsa/audio_driver_alsa.cpp
index a6b9748129..216100bac6 100644
--- a/drivers/alsa/audio_driver_alsa.cpp
+++ b/drivers/alsa/audio_driver_alsa.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -31,6 +31,7 @@
#ifdef ALSA_ENABLED
+#include "os/os.h"
#include "project_settings.h"
#include <errno.h>
@@ -44,7 +45,7 @@ Error AudioDriverALSA::init() {
samples_in = NULL;
samples_out = NULL;
- mix_rate = GLOBAL_DEF("audio/mix_rate", 44100);
+ mix_rate = GLOBAL_DEF("audio/mix_rate", DEFAULT_MIX_RATE);
speaker_mode = SPEAKER_MODE_STEREO;
channels = 2;
@@ -86,19 +87,25 @@ Error AudioDriverALSA::init() {
status = snd_pcm_hw_params_set_rate_near(pcm_handle, hwparams, &mix_rate, NULL);
CHECK_FAIL(status < 0);
- int latency = GLOBAL_DEF("audio/output_latency", 25);
- buffer_size = closest_power_of_2(latency * mix_rate / 1000);
+ // In ALSA the period size seems to be the one that will determine the actual latency
+ // Ref: https://www.alsa-project.org/main/index.php/FramesPeriods
+ unsigned int periods = 2;
+ int latency = GLOBAL_DEF("audio/output_latency", DEFAULT_OUTPUT_LATENCY);
+ buffer_frames = closest_power_of_2(latency * mix_rate / 1000);
+ buffer_size = buffer_frames * periods;
+ period_size = buffer_frames;
// set buffer size from project settings
status = snd_pcm_hw_params_set_buffer_size_near(pcm_handle, hwparams, &buffer_size);
CHECK_FAIL(status < 0);
- // make period size 1/8
- period_size = buffer_size >> 3;
status = snd_pcm_hw_params_set_period_size_near(pcm_handle, hwparams, &period_size, NULL);
CHECK_FAIL(status < 0);
- unsigned int periods = 2;
+ if (OS::get_singleton()->is_stdout_verbose()) {
+ print_line("audio buffer frames: " + itos(period_size) + " calculated latency: " + itos(period_size * 1000 / mix_rate) + "ms");
+ }
+
status = snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &periods, NULL);
CHECK_FAIL(status < 0);
diff --git a/drivers/alsa/audio_driver_alsa.h b/drivers/alsa/audio_driver_alsa.h
index 9e9413f3d9..c76ec0da61 100644
--- a/drivers/alsa/audio_driver_alsa.h
+++ b/drivers/alsa/audio_driver_alsa.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -51,6 +51,7 @@ class AudioDriverALSA : public AudioDriver {
unsigned int mix_rate;
SpeakerMode speaker_mode;
+ snd_pcm_uframes_t buffer_frames;
snd_pcm_uframes_t buffer_size;
snd_pcm_uframes_t period_size;
int channels;
diff --git a/drivers/convex_decomp/b2d_decompose.cpp b/drivers/convex_decomp/b2d_decompose.cpp
index d9011b8eab..97d312983f 100644
--- a/drivers/convex_decomp/b2d_decompose.cpp
+++ b/drivers/convex_decomp/b2d_decompose.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* b2d_decompose.cpp */
+/* b2d_decompose.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/convex_decomp/b2d_decompose.h b/drivers/convex_decomp/b2d_decompose.h
index 3a064e08d3..a87f5a656c 100644
--- a/drivers/convex_decomp/b2d_decompose.h
+++ b/drivers/convex_decomp/b2d_decompose.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/gl_context/context_gl.cpp b/drivers/gl_context/context_gl.cpp
index 935391d58e..a453eef227 100644
--- a/drivers/gl_context/context_gl.cpp
+++ b/drivers/gl_context/context_gl.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/gl_context/context_gl.h b/drivers/gl_context/context_gl.h
index c8eb0f93b4..399657eb52 100644
--- a/drivers/gl_context/context_gl.h
+++ b/drivers/gl_context/context_gl.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp
deleted file mode 100644
index 75d5d01890..0000000000
--- a/drivers/gles2/rasterizer_gles2.cpp
+++ /dev/null
@@ -1,10766 +0,0 @@
-/*************************************************************************/
-/* rasterizer_gles2.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifdef GLES2_ENABLED
-
-#include "rasterizer_gles2.h"
-#include "gl_context/context_gl.h"
-#include "os/os.h"
-#include "project_settings.h"
-#include "servers/visual/particle_system_sw.h"
-#include "servers/visual/shader_language.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef GLEW_ENABLED
-#define _GL_HALF_FLOAT_OES 0x140B
-#else
-#define _GL_HALF_FLOAT_OES 0x8D61
-#endif
-
-#define _GL_RGBA16F_EXT 0x881A
-#define _GL_RGB16F_EXT 0x881B
-#define _GL_RG16F_EXT 0x822F
-#define _GL_R16F_EXT 0x822D
-#define _GL_R32F_EXT 0x822E
-
-#define _GL_RED_EXT 0x1903
-#define _GL_RG_EXT 0x8227
-#define _GL_R8_EXT 0x8229
-#define _GL_RG8_EXT 0x822B
-
-#define _DEPTH_COMPONENT24_OES 0x81A6
-
-#ifdef GLEW_ENABLED
-#define _glClearDepth glClearDepth
-#else
-#define _glClearDepth glClearDepthf
-#endif
-
-#define _GL_SRGB_EXT 0x8C40
-#define _GL_SRGB_ALPHA_EXT 0x8C42
-
-#define _GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
-#define _GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
-
-//#define DEBUG_OPENGL
-
-#ifdef DEBUG_OPENGL
-
-#define DEBUG_TEST_ERROR(m_section) \
- { \
- print_line("AT: " + String(m_section)); \
- glFlush(); \
- uint32_t err = glGetError(); \
- if (err) { \
- print_line("OpenGL Error #" + itos(err) + " at: " + m_section); \
- } \
- }
-
-#else
-
-#define DEBUG_TEST_ERROR(m_section)
-
-#endif
-
-static RasterizerGLES2 *_singleton = NULL;
-
-#ifdef GLES_NO_CLIENT_ARRAYS
-static float GlobalVertexBuffer[MAX_POLYGON_VERTICES * 8] = { 0 };
-#endif
-
-static const GLenum prim_type[] = { GL_POINTS, GL_LINES, GL_TRIANGLES, GL_TRIANGLE_FAN };
-
-_FORCE_INLINE_ static void _set_color_attrib(const Color &p_color) {
-
- GLfloat c[4] = { p_color.r, p_color.g, p_color.b, p_color.a };
- glVertexAttrib4fv(VS::ARRAY_COLOR, c);
-}
-
-static _FORCE_INLINE_ uint16_t make_half_float(float f) {
-
- union {
- float fv;
- uint32_t ui;
- } ci;
- ci.fv = f;
-
- unsigned int x = ci.ui;
- unsigned int sign = (unsigned short)(x >> 31);
- unsigned int mantissa;
- unsigned int exp;
- uint16_t hf;
-
- // get mantissa
- mantissa = x & ((1 << 23) - 1);
- // get exponent bits
- exp = x & (0xFF << 23);
- if (exp >= 0x47800000) {
- // check if the original single precision float number is a NaN
- if (mantissa && (exp == (0xFF << 23))) {
- // we have a single precision NaN
- mantissa = (1 << 23) - 1;
- } else {
- // 16-bit half-float representation stores number as Inf
- mantissa = 0;
- }
- hf = (((uint16_t)sign) << 15) | (uint16_t)((0x1F << 10)) |
- (uint16_t)(mantissa >> 13);
- }
- // check if exponent is <= -15
- else if (exp <= 0x38000000) {
-
- /*// store a denorm half-float value or zero
- exp = (0x38000000 - exp) >> 23;
- mantissa >>= (14 + exp);
-
- hf = (((uint16_t)sign) << 15) | (uint16_t)(mantissa);
- */
- hf = 0; //denormals do not work for 3D, convert to zero
- } else {
- hf = (((uint16_t)sign) << 15) |
- (uint16_t)((exp - 0x38000000) >> 13) |
- (uint16_t)(mantissa >> 13);
- }
-
- return hf;
-}
-
-void RasterizerGLES2::_draw_primitive(int p_points, const Vector3 *p_vertices, const Vector3 *p_normals, const Color *p_colors, const Vector3 *p_uvs, const Plane *p_tangents, int p_instanced) {
-
- ERR_FAIL_COND(!p_vertices);
- ERR_FAIL_COND(p_points < 1 || p_points > 4);
-
- bool quad = false;
-
- GLenum type;
- switch (p_points) {
-
- case 1: type = GL_POINTS; break;
- case 2: type = GL_LINES; break;
- case 4: quad = true; p_points = 3;
- case 3: type = GL_TRIANGLES; break;
- };
-
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-
- GLfloat vert_array[18];
- GLfloat normal_array[18];
- GLfloat color_array[24];
- GLfloat tangent_array[24];
- GLfloat uv_array[18];
-
- glEnableVertexAttribArray(VS::ARRAY_VERTEX);
- glVertexAttribPointer(VS::ARRAY_VERTEX, 3, GL_FLOAT, false, 0, vert_array);
-
- for (int i = 0; i < p_points; i++) {
-
- vert_array[i * 3 + 0] = p_vertices[i].x;
- vert_array[i * 3 + 1] = p_vertices[i].y;
- vert_array[i * 3 + 2] = p_vertices[i].z;
- if (quad) {
- int idx = 2 + i;
- if (idx == 4)
- idx = 0;
- vert_array[9 + i * 3 + 0] = p_vertices[idx].x;
- vert_array[9 + i * 3 + 1] = p_vertices[idx].y;
- vert_array[9 + i * 3 + 2] = p_vertices[idx].z;
- }
- }
-
- if (p_normals) {
- glEnableVertexAttribArray(VS::ARRAY_NORMAL);
- glVertexAttribPointer(VS::ARRAY_NORMAL, 3, GL_FLOAT, false, 0, normal_array);
- for (int i = 0; i < p_points; i++) {
-
- normal_array[i * 3 + 0] = p_normals[i].x;
- normal_array[i * 3 + 1] = p_normals[i].y;
- normal_array[i * 3 + 2] = p_normals[i].z;
- if (quad) {
- int idx = 2 + i;
- if (idx == 4)
- idx = 0;
- normal_array[9 + i * 3 + 0] = p_normals[idx].x;
- normal_array[9 + i * 3 + 1] = p_normals[idx].y;
- normal_array[9 + i * 3 + 2] = p_normals[idx].z;
- }
- }
- } else {
- glDisableVertexAttribArray(VS::ARRAY_NORMAL);
- }
-
- if (p_colors) {
- glEnableVertexAttribArray(VS::ARRAY_COLOR);
- glVertexAttribPointer(VS::ARRAY_COLOR, 4, GL_FLOAT, false, 0, color_array);
- for (int i = 0; i < p_points; i++) {
-
- color_array[i * 4 + 0] = p_colors[i].r;
- color_array[i * 4 + 1] = p_colors[i].g;
- color_array[i * 4 + 2] = p_colors[i].b;
- color_array[i * 4 + 3] = p_colors[i].a;
- if (quad) {
- int idx = 2 + i;
- if (idx == 4)
- idx = 0;
- color_array[12 + i * 4 + 0] = p_colors[idx].r;
- color_array[12 + i * 4 + 1] = p_colors[idx].g;
- color_array[12 + i * 4 + 2] = p_colors[idx].b;
- color_array[12 + i * 4 + 3] = p_colors[idx].a;
- }
- }
- } else {
- glDisableVertexAttribArray(VS::ARRAY_COLOR);
- }
-
- if (p_tangents) {
- glEnableVertexAttribArray(VS::ARRAY_TANGENT);
- glVertexAttribPointer(VS::ARRAY_TANGENT, 4, GL_FLOAT, false, 0, tangent_array);
- for (int i = 0; i < p_points; i++) {
-
- tangent_array[i * 4 + 0] = p_tangents[i].normal.x;
- tangent_array[i * 4 + 1] = p_tangents[i].normal.y;
- tangent_array[i * 4 + 2] = p_tangents[i].normal.z;
- tangent_array[i * 4 + 3] = p_tangents[i].d;
- if (quad) {
- int idx = 2 + i;
- if (idx == 4)
- idx = 0;
- tangent_array[12 + i * 4 + 0] = p_tangents[idx].normal.x;
- tangent_array[12 + i * 4 + 1] = p_tangents[idx].normal.y;
- tangent_array[12 + i * 4 + 2] = p_tangents[idx].normal.z;
- tangent_array[12 + i * 4 + 3] = p_tangents[idx].d;
- }
- }
- } else {
- glDisableVertexAttribArray(VS::ARRAY_TANGENT);
- }
-
- if (p_uvs) {
-
- glEnableVertexAttribArray(VS::ARRAY_TEX_UV);
- glVertexAttribPointer(VS::ARRAY_TEX_UV, 3, GL_FLOAT, false, 0, uv_array);
- for (int i = 0; i < p_points; i++) {
-
- uv_array[i * 3 + 0] = p_uvs[i].x;
- uv_array[i * 3 + 1] = p_uvs[i].y;
- uv_array[i * 3 + 2] = p_uvs[i].z;
- if (quad) {
- int idx = 2 + i;
- if (idx == 4)
- idx = 0;
- uv_array[9 + i * 3 + 0] = p_uvs[idx].x;
- uv_array[9 + i * 3 + 1] = p_uvs[idx].y;
- uv_array[9 + i * 3 + 2] = p_uvs[idx].z;
- }
- }
-
- } else {
- glDisableVertexAttribArray(VS::ARRAY_TEX_UV);
- }
-
- /*
- if (p_instanced>1)
- glDrawArraysInstanced(type,0,p_points,p_instanced);
- else
- */
-
- glDrawArrays(type, 0, quad ? 6 : p_points);
-};
-
-/* TEXTURE API */
-#define _EXT_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
-#define _EXT_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
-#define _EXT_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
-#define _EXT_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
-
-#define _EXT_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT 0x8A54
-#define _EXT_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT 0x8A55
-#define _EXT_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT 0x8A56
-#define _EXT_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT 0x8A57
-
-#define _EXT_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
-#define _EXT_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
-#define _EXT_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
-
-#define _EXT_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70
-#define _EXT_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71
-#define _EXT_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
-#define _EXT_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73
-
-#define _EXT_COMPRESSED_RED_RGTC1_EXT 0x8DBB
-#define _EXT_COMPRESSED_RED_RGTC1 0x8DBB
-#define _EXT_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
-#define _EXT_COMPRESSED_RG_RGTC2 0x8DBD
-#define _EXT_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
-#define _EXT_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC
-#define _EXT_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
-#define _EXT_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE
-#define _EXT_ETC1_RGB8_OES 0x8D64
-
-#define _EXT_SLUMINANCE_NV 0x8C46
-#define _EXT_SLUMINANCE_ALPHA_NV 0x8C44
-#define _EXT_SRGB8_NV 0x8C41
-#define _EXT_SLUMINANCE8_NV 0x8C47
-#define _EXT_SLUMINANCE8_ALPHA8_NV 0x8C45
-
-#define _EXT_COMPRESSED_SRGB_S3TC_DXT1_NV 0x8C4C
-#define _EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV 0x8C4D
-#define _EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV 0x8C4E
-#define _EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV 0x8C4F
-
-#define _EXT_ATC_RGB_AMD 0x8C92
-#define _EXT_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
-#define _EXT_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
-
-/* TEXTURE API */
-
-Ref<Image> RasterizerGLES2::_get_gl_image_and_format(const Ref<Image> &p_image, Image::Format p_format, uint32_t p_flags, GLenum &r_gl_format, GLenum &r_gl_internal_format, int &r_gl_components, bool &r_has_alpha_cache, bool &r_compressed) {
-
- r_has_alpha_cache = false;
- r_compressed = false;
- r_gl_format = 0;
- Ref<Image> image = p_image;
-
- switch (p_format) {
-
- case Image::FORMAT_L8: {
- r_gl_components = 1;
- r_gl_format = GL_LUMINANCE;
- r_gl_internal_format = (srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_SLUMINANCE_NV : GL_LUMINANCE;
-
- } break;
- case Image::FORMAT_INTENSITY: {
-
- if (!image.empty())
- image.convert(Image::FORMAT_RGBA8);
- r_gl_components = 4;
- r_gl_format = GL_RGBA;
- r_gl_internal_format = (srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _GL_SRGB_ALPHA_EXT : GL_RGBA;
- r_has_alpha_cache = true;
- } break;
- case Image::FORMAT_LA8: {
-
- //image.convert(Image::FORMAT_RGBA8);
- r_gl_components = 2;
- r_gl_format = GL_LUMINANCE_ALPHA;
- r_gl_internal_format = (srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_SLUMINANCE_ALPHA_NV : GL_LUMINANCE_ALPHA;
- r_has_alpha_cache = true;
- } break;
-
- case Image::FORMAT_INDEXED: {
-
- if (!image.empty())
- image.convert(Image::FORMAT_RGB8);
- r_gl_components = 3;
- r_gl_format = GL_RGB;
- r_gl_internal_format = (srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _GL_SRGB_EXT : GL_RGB;
-
- } break;
-
- case Image::FORMAT_INDEXED_ALPHA: {
-
- if (!image.empty())
- image.convert(Image::FORMAT_RGBA8);
- r_gl_components = 4;
-
- if (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) {
-
- if (srgb_supported) {
- r_gl_format = GL_RGBA;
- r_gl_internal_format = _GL_SRGB_ALPHA_EXT;
- } else {
- r_gl_internal_format = GL_RGBA;
- if (!image.empty())
- image.srgb_to_linear();
- }
- } else {
- r_gl_internal_format = GL_RGBA;
- }
- r_has_alpha_cache = true;
-
- } break;
- case Image::FORMAT_RGB8: {
-
- r_gl_components = 3;
-
- if (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) {
-
- if (srgb_supported) {
- r_gl_internal_format = _GL_SRGB_EXT;
- r_gl_format = GL_RGB;
- } else {
- r_gl_internal_format = GL_RGB;
- if (!image.empty())
- image.srgb_to_linear();
- }
- } else {
- r_gl_internal_format = GL_RGB;
- }
- } break;
- case Image::FORMAT_RGBA8: {
-
- r_gl_components = 4;
- if (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) {
-
- if (srgb_supported) {
- r_gl_internal_format = _GL_SRGB_ALPHA_EXT;
- r_gl_format = GL_RGBA;
- //r_gl_internal_format=GL_RGBA;
- } else {
- r_gl_internal_format = GL_RGBA;
- if (!image.empty())
- image.srgb_to_linear();
- }
- } else {
- r_gl_internal_format = GL_RGBA;
- }
-
- r_has_alpha_cache = true;
- } break;
- case Image::FORMAT_DXT1: {
-
- if (!s3tc_supported || (!s3tc_srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) {
-
- if (!image.empty()) {
- image.decompress();
- }
- r_gl_components = 4;
- if (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) {
-
- if (srgb_supported) {
- r_gl_format = GL_RGBA;
- r_gl_internal_format = _GL_SRGB_ALPHA_EXT;
- } else {
- r_gl_internal_format = GL_RGBA;
- if (!image.empty())
- image.srgb_to_linear();
- }
- } else {
- r_gl_internal_format = GL_RGBA;
- }
- r_has_alpha_cache = true;
-
- } else {
-
- r_gl_components = 1; //doesn't matter much
- r_gl_internal_format = (srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV : _EXT_COMPRESSED_RGBA_S3TC_DXT1_EXT;
- r_compressed = true;
- };
-
- } break;
- case Image::FORMAT_DXT3: {
-
- if (!s3tc_supported || (!s3tc_srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) {
-
- if (!image.empty()) {
- image.decompress();
- }
- r_gl_components = 4;
- if (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) {
-
- if (srgb_supported) {
- r_gl_format = GL_RGBA;
- r_gl_internal_format = _GL_SRGB_ALPHA_EXT;
- } else {
- r_gl_internal_format = GL_RGBA;
- if (!image.empty())
- image.srgb_to_linear();
- }
- } else {
- r_gl_internal_format = GL_RGBA;
- }
- r_has_alpha_cache = true;
-
- } else {
- r_gl_components = 1; //doesn't matter much
- r_gl_internal_format = (srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV : _EXT_COMPRESSED_RGBA_S3TC_DXT3_EXT;
-
- r_has_alpha_cache = true;
- r_compressed = true;
- };
-
- } break;
- case Image::FORMAT_DXT5: {
-
- if (!s3tc_supported || (!s3tc_srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) {
-
- if (!image.empty()) {
- image.decompress();
- }
- r_gl_components = 4;
- if (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) {
-
- if (srgb_supported) {
- r_gl_format = GL_RGBA;
- r_gl_internal_format = _GL_SRGB_ALPHA_EXT;
- } else {
- r_gl_internal_format = GL_RGBA;
- if (!image.empty())
- image.srgb_to_linear();
- }
- } else {
- r_gl_internal_format = GL_RGBA;
- }
- r_has_alpha_cache = true;
-
- } else {
- r_gl_components = 1; //doesn't matter much
- r_gl_internal_format = (srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV : _EXT_COMPRESSED_RGBA_S3TC_DXT5_EXT;
- r_has_alpha_cache = true;
- r_compressed = true;
- };
-
- } break;
- case Image::FORMAT_ATI1: {
-
- if (!latc_supported) {
-
- if (!image.empty()) {
- image.decompress();
- }
- r_gl_components = 4;
- if (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) {
-
- if (srgb_supported) {
- r_gl_format = GL_RGBA;
- r_gl_internal_format = _GL_SRGB_ALPHA_EXT;
- } else {
- r_gl_internal_format = GL_RGBA;
- if (!image.empty())
- image.srgb_to_linear();
- }
- } else {
- r_gl_internal_format = GL_RGBA;
- }
- r_has_alpha_cache = true;
-
- } else {
-
- r_gl_internal_format = _EXT_COMPRESSED_LUMINANCE_LATC1_EXT;
- r_gl_components = 1; //doesn't matter much
- r_compressed = true;
- };
-
- } break;
- case Image::FORMAT_ATI2: {
-
- if (!latc_supported) {
-
- if (!image.empty()) {
- image.decompress();
- }
- r_gl_components = 4;
- if (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) {
-
- if (srgb_supported) {
- r_gl_format = GL_RGBA;
- r_gl_internal_format = _GL_SRGB_ALPHA_EXT;
- } else {
- r_gl_internal_format = GL_RGBA;
- if (!image.empty())
- image.srgb_to_linear();
- }
- } else {
- r_gl_internal_format = GL_RGBA;
- }
- r_has_alpha_cache = true;
-
- } else {
- r_gl_internal_format = _EXT_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT;
- r_gl_components = 1; //doesn't matter much
- r_compressed = true;
- };
- } break;
- case Image::FORMAT_PVRTC2: {
-
- if (!pvr_supported || (!pvr_srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) {
-
- if (!image.empty()) {
- image.decompress();
- }
- r_gl_components = 4;
- if (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) {
-
- if (srgb_supported) {
- r_gl_format = GL_RGBA;
- r_gl_internal_format = _GL_SRGB_ALPHA_EXT;
- } else {
- r_gl_internal_format = GL_RGBA;
- if (!image.empty())
- image.srgb_to_linear();
- }
- } else {
- r_gl_internal_format = GL_RGBA;
- }
- r_has_alpha_cache = true;
-
- } else {
-
- r_gl_internal_format = (srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_PVRTC_2BPPV1_EXT : _EXT_COMPRESSED_RGB_PVRTC_2BPPV1_IMG;
- r_gl_components = 1; //doesn't matter much
- r_compressed = true;
- }
-
- } break;
- case Image::FORMAT_PVRTC2A: {
-
- if (!pvr_supported || (!pvr_srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) {
-
- if (!image.empty())
- image.decompress();
- r_gl_components = 4;
- if (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) {
-
- if (srgb_supported) {
- r_gl_format = GL_RGBA;
- r_gl_internal_format = _GL_SRGB_ALPHA_EXT;
- } else {
- r_gl_internal_format = GL_RGBA;
- if (!image.empty())
- image.srgb_to_linear();
- }
- } else {
- r_gl_internal_format = GL_RGBA;
- }
- r_has_alpha_cache = true;
-
- } else {
-
- r_gl_internal_format = (srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_ALPHA_PVRTC_2BPPV1_EXT : _EXT_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;
- r_gl_components = 1; //doesn't matter much
- r_compressed = true;
- }
-
- } break;
- case Image::FORMAT_PVRTC4: {
-
- if (!pvr_supported || (!pvr_srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) {
-
- if (!image.empty())
- image.decompress();
- r_gl_components = 4;
- if (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) {
-
- if (srgb_supported) {
- r_gl_format = GL_RGBA;
- r_gl_internal_format = _GL_SRGB_ALPHA_EXT;
- } else {
- r_gl_internal_format = GL_RGBA;
- if (!image.empty())
- image.srgb_to_linear();
- }
- } else {
- r_gl_internal_format = GL_RGBA;
- }
- r_has_alpha_cache = true;
- } else {
-
- r_gl_internal_format = (srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_PVRTC_4BPPV1_EXT : _EXT_COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
- r_gl_components = 1; //doesn't matter much
- r_compressed = true;
- }
-
- } break;
- case Image::FORMAT_PVRTC4A: {
-
- if (!pvr_supported || (!pvr_srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR)) {
-
- if (!image.empty())
- image.decompress();
- r_gl_components = 4;
- if (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) {
-
- if (srgb_supported) {
- r_gl_format = GL_RGBA;
- r_gl_internal_format = _GL_SRGB_ALPHA_EXT;
- } else {
- r_gl_internal_format = GL_RGBA;
- if (!image.empty())
- image.srgb_to_linear();
- }
- } else {
- r_gl_internal_format = GL_RGBA;
- }
- r_has_alpha_cache = true;
-
- } else {
- r_gl_internal_format = (srgb_supported && p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) ? _EXT_COMPRESSED_SRGB_ALPHA_PVRTC_4BPPV1_EXT : _EXT_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
- r_gl_components = 1; //doesn't matter much
- r_compressed = true;
- }
-
- } break;
- case Image::FORMAT_ETC: {
-
- if (!etc_supported || p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) {
-
- if (!image.empty()) {
- image.decompress();
- }
- r_gl_components = 3;
- if (p_flags & VS::TEXTURE_FLAG_CONVERT_TO_LINEAR) {
-
- if (srgb_supported) {
- r_gl_format = GL_RGB;
- r_gl_internal_format = _GL_SRGB_EXT;
- } else {
- r_gl_internal_format = GL_RGB;
- if (!image.empty())
- image.srgb_to_linear();
- }
- } else {
- r_gl_internal_format = GL_RGB;
- }
- r_gl_internal_format = GL_RGB;
-
- } else {
-
- r_gl_internal_format = _EXT_ETC1_RGB8_OES;
- r_gl_components = 1; //doesn't matter much
- r_compressed = true;
- }
-
- } break;
- case Image::FORMAT_ATC: {
-
- if (!atitc_supported) {
-
- if (!image.empty()) {
- image.decompress();
- }
- r_gl_components = 3;
- r_gl_internal_format = GL_RGB;
-
- } else {
-
- r_gl_internal_format = _EXT_ATC_RGB_AMD;
- r_gl_components = 1; //doesn't matter much
- r_compressed = true;
- }
-
- } break;
- case Image::FORMAT_ATC_ALPHA_EXPLICIT: {
-
- if (!atitc_supported) {
-
- if (!image.empty()) {
- image.decompress();
- }
- r_gl_components = 4;
- r_gl_internal_format = GL_RGBA;
-
- } else {
-
- r_gl_internal_format = _EXT_ATC_RGBA_EXPLICIT_ALPHA_AMD;
- r_gl_components = 1; //doesn't matter much
- r_compressed = true;
- }
-
- } break;
- case Image::FORMAT_ATC_ALPHA_INTERPOLATED: {
-
- if (!atitc_supported) {
-
- if (!image.empty()) {
- image.decompress();
- }
- r_gl_components = 4;
- r_gl_internal_format = GL_RGBA;
-
- } else {
-
- r_gl_internal_format = _EXT_ATC_RGBA_INTERPOLATED_ALPHA_AMD;
- r_gl_components = 1; //doesn't matter much
- r_compressed = true;
- }
-
- } break;
- case Image::FORMAT_YUV_422:
- case Image::FORMAT_YUV_444: {
-
- if (!image.empty())
- image.convert(Image::FORMAT_RGB8);
- r_gl_internal_format = GL_RGB;
- r_gl_components = 3;
-
- } break;
-
- default: {
-
- ERR_FAIL_V(Image());
- }
- }
-
- if (r_gl_format == 0) {
- r_gl_format = r_gl_internal_format;
- }
-
- return image;
-}
-
-static const GLenum _cube_side_enum[6] = {
-
- GL_TEXTURE_CUBE_MAP_NEGATIVE_X,
- GL_TEXTURE_CUBE_MAP_POSITIVE_X,
- GL_TEXTURE_CUBE_MAP_NEGATIVE_Y,
- GL_TEXTURE_CUBE_MAP_POSITIVE_Y,
- GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,
- GL_TEXTURE_CUBE_MAP_POSITIVE_Z,
-
-};
-
-RID RasterizerGLES2::texture_create() {
-
- Texture *texture = memnew(Texture);
- ERR_FAIL_COND_V(!texture, RID());
- glGenTextures(1, &texture->tex_id);
- texture->active = false;
- texture->total_data_size = 0;
-
- return texture_owner.make_rid(texture);
-}
-
-void RasterizerGLES2::texture_allocate(RID p_texture, int p_width, int p_height, Image::Format p_format, uint32_t p_flags) {
-
- bool has_alpha_cache;
- int components;
- GLenum format;
- GLenum internal_format;
- bool compressed;
-
- int po2_width = next_power_of_2(p_width);
- int po2_height = next_power_of_2(p_height);
-
- if (p_flags & VS::TEXTURE_FLAG_VIDEO_SURFACE) {
- p_flags &= ~VS::TEXTURE_FLAG_MIPMAPS; // no mipies for video
- }
-
- Texture *texture = texture_owner.get(p_texture);
- ERR_FAIL_COND(!texture);
- texture->width = p_width;
- texture->height = p_height;
- texture->format = p_format;
- texture->flags = p_flags;
- texture->target = (p_flags & VS::TEXTURE_FLAG_CUBEMAP) ? GL_TEXTURE_CUBE_MAP : GL_TEXTURE_2D;
-
- _get_gl_image_and_format(Image(), texture->format, texture->flags, format, internal_format, components, has_alpha_cache, compressed);
-
- bool scale_textures = !compressed && !(p_flags & VS::TEXTURE_FLAG_VIDEO_SURFACE) && (!npo2_textures_available || p_flags & VS::TEXTURE_FLAG_MIPMAPS);
-
- if (scale_textures) {
- texture->alloc_width = po2_width;
- texture->alloc_height = po2_height;
- //print_line("scale because npo2: "+itos(npo2_textures_available)+" mm: "+itos(p_format&VS::TEXTURE_FLAG_MIPMAPS)+" "+itos(p_mipmap_count) );
- } else {
-
- texture->alloc_width = texture->width;
- texture->alloc_height = texture->height;
- };
-
- if (!(p_flags & VS::TEXTURE_FLAG_VIDEO_SURFACE) && shrink_textures_x2) {
- texture->alloc_height = MAX(1, texture->alloc_height / 2);
- texture->alloc_width = MAX(1, texture->alloc_width / 2);
- }
-
- texture->gl_components_cache = components;
- texture->gl_format_cache = format;
- texture->gl_internal_format_cache = internal_format;
- texture->format_has_alpha = has_alpha_cache;
- texture->compressed = compressed;
- texture->has_alpha = false; //by default it doesn't have alpha unless something with alpha is blitteds
- texture->data_size = 0;
- texture->mipmaps = 0;
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(texture->target, texture->tex_id);
-
- if (p_flags & VS::TEXTURE_FLAG_VIDEO_SURFACE) {
- //prealloc if video
- glTexImage2D(texture->target, 0, internal_format, p_width, p_height, 0, format, GL_UNSIGNED_BYTE, NULL);
- }
-
- texture->active = true;
-}
-
-void RasterizerGLES2::texture_set_data(RID p_texture, const Image &p_image, VS::CubeMapSide p_cube_side) {
-
- Texture *texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND(!texture);
- ERR_FAIL_COND(!texture->active);
- ERR_FAIL_COND(texture->render_target);
- ERR_FAIL_COND(texture->format != p_image.get_format());
- ERR_FAIL_COND(p_image.empty());
-
- int components;
- GLenum format;
- GLenum internal_format;
- bool alpha;
- bool compressed;
-
- if (keep_copies && !(texture->flags & VS::TEXTURE_FLAG_VIDEO_SURFACE) && !(use_reload_hooks && texture->reloader)) {
- texture->image[p_cube_side] = p_image;
- }
-
- Image img = _get_gl_image_and_format(p_image, p_image.get_format(), texture->flags, format, internal_format, components, alpha, compressed);
-
- if (texture->alloc_width != img.get_width() || texture->alloc_height != img.get_height()) {
-
- if (texture->alloc_width == img.get_width() / 2 && texture->alloc_height == img.get_height() / 2) {
-
- img.shrink_x2();
- } else if (img.get_format() <= Image::FORMAT_INDEXED_ALPHA) {
-
- img.resize(texture->alloc_width, texture->alloc_height, Image::INTERPOLATE_BILINEAR);
- }
- };
-
- if (!(texture->flags & VS::TEXTURE_FLAG_VIDEO_SURFACE) && img.detect_alpha() == Image::ALPHA_BLEND) {
- texture->has_alpha = true;
- }
-
- GLenum blit_target = (texture->target == GL_TEXTURE_CUBE_MAP) ? _cube_side_enum[p_cube_side] : GL_TEXTURE_2D;
-
- texture->data_size = img.get_data().size();
- PoolVector<uint8_t>::Read read = img.get_data().read();
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(texture->target, texture->tex_id);
-
- texture->ignore_mipmaps = compressed && img.get_mipmaps() == 0;
-
- if (texture->flags & VS::TEXTURE_FLAG_MIPMAPS && !texture->ignore_mipmaps)
- glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, use_fast_texture_filter ? GL_LINEAR_MIPMAP_NEAREST : GL_LINEAR_MIPMAP_LINEAR);
- else {
- if (texture->flags & VS::TEXTURE_FLAG_FILTER) {
- glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- } else {
- glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- }
- }
-
- if (texture->flags & VS::TEXTURE_FLAG_FILTER) {
-
- glTexParameteri(texture->target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Linear Filtering
-
- } else {
-
- glTexParameteri(texture->target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); // raw Filtering
- }
-
- bool force_clamp_to_edge = !(texture->flags & VS::TEXTURE_FLAG_MIPMAPS && !texture->ignore_mipmaps) && (next_power_of_2(texture->alloc_height) != texture->alloc_height || next_power_of_2(texture->alloc_width) != texture->alloc_width);
-
- if (!force_clamp_to_edge && (texture->flags & VS::TEXTURE_FLAG_REPEAT || texture->flags & VS::TEXTURE_FLAG_MIRRORED_REPEAT) && texture->target != GL_TEXTURE_CUBE_MAP) {
-
- if (texture->flags & VS::TEXTURE_FLAG_MIRRORED_REPEAT) {
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT);
- } else {
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- }
- } else {
-
- //glTexParameterf( texture->target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE );
- glTexParameterf(texture->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(texture->target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- }
-
- if (use_anisotropic_filter) {
-
- if (texture->flags & VS::TEXTURE_FLAG_ANISOTROPIC_FILTER) {
-
- glTexParameterf(texture->target, _GL_TEXTURE_MAX_ANISOTROPY_EXT, anisotropic_level);
- } else {
- glTexParameterf(texture->target, _GL_TEXTURE_MAX_ANISOTROPY_EXT, 1);
- }
- }
-
- int mipmaps = (texture->flags & VS::TEXTURE_FLAG_MIPMAPS && img.get_mipmaps() > 0) ? img.get_mipmaps() + 1 : 1;
-
- int w = img.get_width();
- int h = img.get_height();
-
- int tsize = 0;
- for (int i = 0; i < mipmaps; i++) {
-
- int size, ofs;
- img.get_mipmap_offset_and_size(i, ofs, size);
-
- //print_line("mipmap: "+itos(i)+" size: "+itos(size)+" w: "+itos(mm_w)+", h: "+itos(mm_h));
-
- if (texture->compressed) {
- glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
- glCompressedTexImage2D(blit_target, i, format, w, h, 0, size, &read[ofs]);
-
- } else {
- glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- if (texture->flags & VS::TEXTURE_FLAG_VIDEO_SURFACE) {
- glTexSubImage2D(blit_target, i, 0, 0, w, h, format, GL_UNSIGNED_BYTE, &read[ofs]);
- } else {
- glTexImage2D(blit_target, i, internal_format, w, h, 0, format, GL_UNSIGNED_BYTE, &read[ofs]);
- }
- }
- tsize += size;
-
- w = MAX(1, w >> 1);
- h = MAX(1, h >> 1);
- }
-
- _rinfo.texture_mem -= texture->total_data_size;
- texture->total_data_size = tsize;
- _rinfo.texture_mem += texture->total_data_size;
-
- //printf("texture: %i x %i - size: %i - total: %i\n",texture->width,texture->height,tsize,_rinfo.texture_mem);
-
- if (texture->flags & VS::TEXTURE_FLAG_MIPMAPS && mipmaps == 1 && !texture->ignore_mipmaps) {
- //generate mipmaps if they were requested and the image does not contain them
- glGenerateMipmap(texture->target);
- }
-
- texture->mipmaps = mipmaps;
-
- if (mipmaps > 1) {
-
- //glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, mipmaps-1 ); - assumed to have all, always
- }
-
- //texture_set_flags(p_texture,texture->flags);
-}
-
-Image RasterizerGLES2::texture_get_data(RID p_texture, VS::CubeMapSide p_cube_side) const {
-
- Texture *texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture, Image());
- ERR_FAIL_COND_V(!texture->active, Image());
- ERR_FAIL_COND_V(texture->data_size == 0, Image());
- ERR_FAIL_COND_V(texture->render_target, Image());
-
- return texture->image[p_cube_side];
-
-#if 0
-
- Texture * texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture,Image());
- ERR_FAIL_COND_V(!texture->active,Image());
- ERR_FAIL_COND_V(texture->data_size==0,Image());
-
- PoolVector<uint8_t> data;
- GLenum format,type=GL_UNSIGNED_BYTE;
- Image::Format fmt;
- int pixelsize=0;
- int pixelshift=0;
- int minw=1,minh=1;
- bool compressed=false;
-
- fmt=texture->format;
-
- switch(texture->format) {
-
- case Image::FORMAT_L8: {
-
- format=GL_LUMINANCE;
- type=GL_UNSIGNED_BYTE;
- data.resize(texture->alloc_width*texture->alloc_height);
- pixelsize=1;
-
- } break;
- case Image::FORMAT_INTENSITY: {
- return Image();
- } break;
- case Image::FORMAT_LA8: {
-
- format=GL_LUMINANCE_ALPHA;
- type=GL_UNSIGNED_BYTE;
- pixelsize=2;
-
- } break;
- case Image::FORMAT_RGB8: {
- format=GL_RGB;
- type=GL_UNSIGNED_BYTE;
- pixelsize=3;
- } break;
- case Image::FORMAT_RGBA8: {
-
- format=GL_RGBA;
- type=GL_UNSIGNED_BYTE;
- pixelsize=4;
- } break;
- case Image::FORMAT_INDEXED: {
-
- format=GL_RGB;
- type=GL_UNSIGNED_BYTE;
- fmt=Image::FORMAT_RGB8;
- pixelsize=3;
- } break;
- case Image::FORMAT_INDEXED_ALPHA: {
-
- format=GL_RGBA;
- type=GL_UNSIGNED_BYTE;
- fmt=Image::FORMAT_RGBA8;
- pixelsize=4;
-
- } break;
- case Image::FORMAT_DXT1: {
-
- pixelsize=1; //doesn't matter much
- format=GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
- compressed=true;
- pixelshift=1;
- minw=minh=4;
-
- } break;
- case Image::FORMAT_DXT3: {
- pixelsize=1; //doesn't matter much
- format=GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
- compressed=true;
- minw=minh=4;
-
- } break;
- case Image::FORMAT_DXT5: {
-
- pixelsize=1; //doesn't matter much
- format=GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
- compressed=true;
- minw=minh=4;
-
- } break;
- case Image::FORMAT_ATI1: {
-
- format=GL_COMPRESSED_RED_RGTC1;
- pixelsize=1; //doesn't matter much
- compressed=true;
- pixelshift=1;
- minw=minh=4;
-
- } break;
- case Image::FORMAT_ATI2: {
-
- format=GL_COMPRESSED_RG_RGTC2;
- pixelsize=1; //doesn't matter much
- compressed=true;
- minw=minh=4;
-
- } break;
-
- default:{}
- }
-
- data.resize(texture->data_size);
- PoolVector<uint8_t>::Write wb = data.write();
-
- glActiveTexture(GL_TEXTURE0);
- int ofs=0;
- glBindTexture(texture->target,texture->tex_id);
-
- int w=texture->alloc_width;
- int h=texture->alloc_height;
- for(int i=0;i<texture->mipmaps+1;i++) {
-
- if (compressed) {
-
- glPixelStorei(GL_PACK_ALIGNMENT, 4);
- glGetCompressedTexImage(texture->target,i,&wb[ofs]);
-
- } else {
- glPixelStorei(GL_PACK_ALIGNMENT, 1);
- glGetTexImage(texture->target,i,format,type,&wb[ofs]);
- }
-
- int size = (w*h*pixelsize)>>pixelshift;
- ofs+=size;
-
- w=MAX(minw,w>>1);
- h=MAX(minh,h>>1);
-
- }
-
-
- wb=PoolVector<uint8_t>::Write();
-
- Image img(texture->alloc_width,texture->alloc_height,texture->mipmaps,fmt,data);
-
- if (texture->format<Image::FORMAT_INDEXED && (texture->alloc_width!=texture->width || texture->alloc_height!=texture->height))
- img.resize(texture->width,texture->height);
-
- return img;
-#endif
-}
-
-void RasterizerGLES2::texture_set_flags(RID p_texture, uint32_t p_flags) {
-
- Texture *texture = texture_owner.get(p_texture);
- ERR_FAIL_COND(!texture);
- if (texture->render_target) {
-
- p_flags &= VS::TEXTURE_FLAG_FILTER; //can change only filter
- }
-
- bool had_mipmaps = texture->flags & VS::TEXTURE_FLAG_MIPMAPS;
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(texture->target, texture->tex_id);
- uint32_t cube = texture->flags & VS::TEXTURE_FLAG_CUBEMAP;
- texture->flags = p_flags | cube; // can't remove a cube from being a cube
-
- bool force_clamp_to_edge = !(p_flags & VS::TEXTURE_FLAG_MIPMAPS && !texture->ignore_mipmaps) && (next_power_of_2(texture->alloc_height) != texture->alloc_height || next_power_of_2(texture->alloc_width) != texture->alloc_width);
-
- if (!force_clamp_to_edge && (texture->flags & VS::TEXTURE_FLAG_REPEAT || texture->flags & VS::TEXTURE_FLAG_MIRRORED_REPEAT) && texture->target != GL_TEXTURE_CUBE_MAP) {
-
- if (texture->flags & VS::TEXTURE_FLAG_MIRRORED_REPEAT) {
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT);
- } else {
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- }
- } else {
- //glTexParameterf( texture->target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE );
- glTexParameterf(texture->target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(texture->target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- }
-
- if (use_anisotropic_filter) {
-
- if (texture->flags & VS::TEXTURE_FLAG_ANISOTROPIC_FILTER) {
-
- glTexParameterf(texture->target, _GL_TEXTURE_MAX_ANISOTROPY_EXT, anisotropic_level);
- } else {
- glTexParameterf(texture->target, _GL_TEXTURE_MAX_ANISOTROPY_EXT, 1);
- }
- }
-
- if (texture->flags & VS::TEXTURE_FLAG_MIPMAPS && !texture->ignore_mipmaps) {
- if (!had_mipmaps && texture->mipmaps == 1) {
- glGenerateMipmap(texture->target);
- }
- glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, use_fast_texture_filter ? GL_LINEAR_MIPMAP_NEAREST : GL_LINEAR_MIPMAP_LINEAR);
-
- } else {
- if (texture->flags & VS::TEXTURE_FLAG_FILTER) {
- glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- } else {
- glTexParameteri(texture->target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- }
- }
-
- if (texture->flags & VS::TEXTURE_FLAG_FILTER) {
-
- glTexParameteri(texture->target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Linear Filtering
-
- } else {
-
- glTexParameteri(texture->target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); // raw Filtering
- }
-}
-uint32_t RasterizerGLES2::texture_get_flags(RID p_texture) const {
-
- Texture *texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture, 0);
-
- return texture->flags;
-}
-Image::Format RasterizerGLES2::texture_get_format(RID p_texture) const {
-
- Texture *texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture, Image::FORMAT_L8);
-
- return texture->format;
-}
-uint32_t RasterizerGLES2::texture_get_width(RID p_texture) const {
-
- Texture *texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture, 0);
-
- return texture->width;
-}
-uint32_t RasterizerGLES2::texture_get_height(RID p_texture) const {
-
- Texture *texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture, 0);
-
- return texture->height;
-}
-
-bool RasterizerGLES2::texture_has_alpha(RID p_texture) const {
-
- Texture *texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND_V(!texture, 0);
-
- return texture->has_alpha;
-}
-
-void RasterizerGLES2::texture_set_size_override(RID p_texture, int p_width, int p_height) {
-
- Texture *texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND(!texture);
- ERR_FAIL_COND(texture->render_target);
-
- ERR_FAIL_COND(p_width <= 0 || p_width > 16384);
- ERR_FAIL_COND(p_height <= 0 || p_height > 16384);
- //real texture size is in alloc width and height
- texture->width = p_width;
- texture->height = p_height;
-}
-
-void RasterizerGLES2::texture_set_reload_hook(RID p_texture, ObjectID p_owner, const StringName &p_function) const {
-
- Texture *texture = texture_owner.get(p_texture);
-
- ERR_FAIL_COND(!texture);
- ERR_FAIL_COND(texture->render_target);
-
- texture->reloader = p_owner;
- texture->reloader_func = p_function;
- if (use_reload_hooks && p_owner && keep_copies) {
-
- for (int i = 0; i < 6; i++)
- texture->image[i] = Image();
- }
-}
-
-GLuint RasterizerGLES2::_texture_get_name(RID p_tex) {
-
- Texture *texture = texture_owner.get(p_tex);
- ERR_FAIL_COND_V(!texture, 0);
-
- return texture->tex_id;
-};
-
-void RasterizerGLES2::texture_set_path(RID p_texture, const String &p_path) {
- Texture *texture = texture_owner.get(p_texture);
- ERR_FAIL_COND(!texture);
-
- texture->path = p_path;
-}
-
-String RasterizerGLES2::texture_get_path(RID p_texture) const {
-
- Texture *texture = texture_owner.get(p_texture);
- ERR_FAIL_COND_V(!texture, String());
- return texture->path;
-}
-void RasterizerGLES2::texture_debug_usage(List<VS::TextureInfo> *r_info) {
-
- List<RID> textures;
- texture_owner.get_owned_list(&textures);
-
- for (List<RID>::Element *E = textures.front(); E; E = E->next()) {
-
- Texture *t = texture_owner.get(E->get());
- if (!t)
- continue;
- VS::TextureInfo tinfo;
- tinfo.path = t->path;
- tinfo.format = t->format;
- tinfo.size.x = t->alloc_width;
- tinfo.size.y = t->alloc_height;
- tinfo.bytes = t->total_data_size;
- r_info->push_back(tinfo);
- }
-}
-
-void RasterizerGLES2::texture_set_shrink_all_x2_on_set_data(bool p_enable) {
-
- shrink_textures_x2 = p_enable;
-}
-
-/* SHADER API */
-
-RID RasterizerGLES2::shader_create(VS::ShaderMode p_mode) {
-
- Shader *shader = memnew(Shader);
- shader->mode = p_mode;
- RID rid = shader_owner.make_rid(shader);
- shader_set_mode(rid, p_mode);
- _shader_make_dirty(shader);
-
- return rid;
-}
-
-void RasterizerGLES2::shader_set_mode(RID p_shader, VS::ShaderMode p_mode) {
-
- ERR_FAIL_INDEX(p_mode, 3);
- Shader *shader = shader_owner.get(p_shader);
- ERR_FAIL_COND(!shader);
- if (shader->custom_code_id && p_mode == shader->mode)
- return;
-
- if (shader->custom_code_id) {
-
- switch (shader->mode) {
- case VS::SHADER_MATERIAL: {
- material_shader.free_custom_shader(shader->custom_code_id);
- } break;
- case VS::SHADER_CANVAS_ITEM: {
- canvas_shader.free_custom_shader(shader->custom_code_id);
- } break;
- }
-
- shader->custom_code_id = 0;
- }
-
- shader->mode = p_mode;
-
- switch (shader->mode) {
- case VS::SHADER_MATERIAL: {
- shader->custom_code_id = material_shader.create_custom_shader();
- } break;
- case VS::SHADER_CANVAS_ITEM: {
- shader->custom_code_id = canvas_shader.create_custom_shader();
- } break;
- }
- _shader_make_dirty(shader);
-}
-VS::ShaderMode RasterizerGLES2::shader_get_mode(RID p_shader) const {
-
- Shader *shader = shader_owner.get(p_shader);
- ERR_FAIL_COND_V(!shader, VS::SHADER_MATERIAL);
- return shader->mode;
-}
-
-void RasterizerGLES2::shader_set_code(RID p_shader, const String &p_vertex, const String &p_fragment, const String &p_light, int p_vertex_ofs, int p_fragment_ofs, int p_light_ofs) {
-
- Shader *shader = shader_owner.get(p_shader);
- ERR_FAIL_COND(!shader);
-
-#ifdef DEBUG_ENABLED
- if (shader->vertex_code == p_vertex && shader->fragment_code == p_fragment && shader->light_code == p_light)
- return;
-#endif
- shader->fragment_code = p_fragment;
- shader->vertex_code = p_vertex;
- shader->light_code = p_light;
- shader->fragment_line = p_fragment_ofs;
- shader->vertex_line = p_vertex_ofs;
- shader->light_line = p_light_ofs;
- _shader_make_dirty(shader);
-}
-
-String RasterizerGLES2::shader_get_vertex_code(RID p_shader) const {
-
- Shader *shader = shader_owner.get(p_shader);
- ERR_FAIL_COND_V(!shader, String());
- return shader->vertex_code;
-}
-
-String RasterizerGLES2::shader_get_fragment_code(RID p_shader) const {
-
- Shader *shader = shader_owner.get(p_shader);
- ERR_FAIL_COND_V(!shader, String());
- return shader->fragment_code;
-}
-
-String RasterizerGLES2::shader_get_light_code(RID p_shader) const {
-
- Shader *shader = shader_owner.get(p_shader);
- ERR_FAIL_COND_V(!shader, String());
- return shader->light_code;
-}
-
-void RasterizerGLES2::_shader_make_dirty(Shader *p_shader) {
-
- if (p_shader->dirty_list.in_list())
- return;
-
- _shader_dirty_list.add(&p_shader->dirty_list);
-}
-
-void RasterizerGLES2::shader_get_param_list(RID p_shader, List<PropertyInfo> *p_param_list) const {
-
- Shader *shader = shader_owner.get(p_shader);
- ERR_FAIL_COND(!shader);
-
- if (shader->dirty_list.in_list())
- _update_shader(shader); // ok should be not anymore dirty
-
- Map<int, StringName> order;
-
- for (Map<StringName, ShaderLanguage::Uniform>::Element *E = shader->uniforms.front(); E; E = E->next()) {
-
- order[E->get().order] = E->key();
- }
-
- for (Map<int, StringName>::Element *E = order.front(); E; E = E->next()) {
-
- PropertyInfo pi;
- ShaderLanguage::Uniform &u = shader->uniforms[E->get()];
- pi.name = E->get();
- switch (u.type) {
-
- case ShaderLanguage::TYPE_VOID:
- case ShaderLanguage::TYPE_BOOL:
- case ShaderLanguage::TYPE_FLOAT:
- case ShaderLanguage::TYPE_VEC2:
- case ShaderLanguage::TYPE_VEC3:
- case ShaderLanguage::TYPE_MAT3:
- case ShaderLanguage::TYPE_MAT4:
- case ShaderLanguage::TYPE_VEC4:
- pi.type = u.default_value.get_type();
- break;
- case ShaderLanguage::TYPE_TEXTURE:
- pi.type = Variant::_RID;
- pi.hint = PROPERTY_HINT_RESOURCE_TYPE;
- pi.hint_string = "Texture";
- break;
- case ShaderLanguage::TYPE_CUBEMAP:
- pi.type = Variant::_RID;
- pi.hint = PROPERTY_HINT_RESOURCE_TYPE;
- pi.hint_string = "CubeMap";
- break;
- };
-
- p_param_list->push_back(pi);
- }
-}
-
-void RasterizerGLES2::shader_set_default_texture_param(RID p_shader, const StringName &p_name, RID p_texture) {
-
- Shader *shader = shader_owner.get(p_shader);
- ERR_FAIL_COND(!shader);
- ERR_FAIL_COND(p_texture.is_valid() && !texture_owner.owns(p_texture));
-
- if (p_texture.is_valid())
- shader->default_textures[p_name] = p_texture;
- else
- shader->default_textures.erase(p_name);
-
- _shader_make_dirty(shader);
-}
-
-RID RasterizerGLES2::shader_get_default_texture_param(RID p_shader, const StringName &p_name) const {
- const Shader *shader = shader_owner.get(p_shader);
- ERR_FAIL_COND_V(!shader, RID());
-
- const Map<StringName, RID>::Element *E = shader->default_textures.find(p_name);
- if (!E)
- return RID();
- return E->get();
-}
-
-Variant RasterizerGLES2::shader_get_default_param(RID p_shader, const StringName &p_name) {
-
- Shader *shader = shader_owner.get(p_shader);
- ERR_FAIL_COND_V(!shader, Variant());
-
- //update shader params if necessary
- //make sure the shader is compiled and everything
- //so the actual parameters can be properly retrieved!
- if (shader->dirty_list.in_list()) {
- _update_shader(shader);
- }
- if (shader->valid && shader->uniforms.has(p_name))
- return shader->uniforms[p_name].default_value;
-
- return Variant();
-}
-
-/* COMMON MATERIAL API */
-
-RID RasterizerGLES2::material_create() {
-
- RID material = material_owner.make_rid(memnew(Material));
- return material;
-}
-
-void RasterizerGLES2::material_set_shader(RID p_shader_material, RID p_shader) {
-
- Material *material = material_owner.get(p_shader_material);
- ERR_FAIL_COND(!material);
- if (material->shader == p_shader)
- return;
- material->shader = p_shader;
- material->shader_version = 0;
-}
-
-RID RasterizerGLES2::material_get_shader(RID p_shader_material) const {
-
- Material *material = material_owner.get(p_shader_material);
- ERR_FAIL_COND_V(!material, RID());
- return material->shader;
-}
-
-void RasterizerGLES2::material_set_param(RID p_material, const StringName &p_param, const Variant &p_value) {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND(!material);
-
- Map<StringName, Material::UniformData>::Element *E = material->shader_params.find(p_param);
- if (E) {
-
- if (p_value.get_type() == Variant::NIL) {
-
- material->shader_params.erase(E);
- material->shader_version = 0; //get default!
- } else {
- E->get().value = p_value;
- E->get().inuse = true;
- }
- } else {
-
- if (p_value.get_type() == Variant::NIL)
- return;
-
- Material::UniformData ud;
- ud.index = -1;
- ud.value = p_value;
- ud.istexture = p_value.get_type() == Variant::_RID; /// cache it being texture
- ud.inuse = true;
- material->shader_params[p_param] = ud; //may be got at some point, or erased
- }
-}
-Variant RasterizerGLES2::material_get_param(RID p_material, const StringName &p_param) const {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND_V(!material, Variant());
-
- if (material->shader.is_valid()) {
- //update shader params if necessary
- //make sure the shader is compiled and everything
- //so the actual parameters can be properly retrieved!
- material->shader_cache = shader_owner.get(material->shader);
- if (!material->shader_cache) {
- //invalidate
- material->shader = RID();
- material->shader_cache = NULL;
- } else {
-
- if (material->shader_cache->dirty_list.in_list())
- _update_shader(material->shader_cache);
- if (material->shader_cache->valid && material->shader_cache->version != material->shader_version) {
- //validate
- _update_material_shader_params(material);
- }
- }
- }
-
- if (material->shader_params.has(p_param) && material->shader_params[p_param].inuse)
- return material->shader_params[p_param].value;
- else
- return Variant();
-}
-
-void RasterizerGLES2::material_set_flag(RID p_material, VS::MaterialFlag p_flag, bool p_enabled) {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND(!material);
- ERR_FAIL_INDEX(p_flag, VS::MATERIAL_FLAG_MAX);
-
- material->flags[p_flag] = p_enabled;
-}
-bool RasterizerGLES2::material_get_flag(RID p_material, VS::MaterialFlag p_flag) const {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND_V(!material, false);
- ERR_FAIL_INDEX_V(p_flag, VS::MATERIAL_FLAG_MAX, false);
- return material->flags[p_flag];
-}
-
-void RasterizerGLES2::material_set_depth_draw_mode(RID p_material, VS::MaterialDepthDrawMode p_mode) {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND(!material);
- material->depth_draw_mode = p_mode;
-}
-
-VS::MaterialDepthDrawMode RasterizerGLES2::material_get_depth_draw_mode(RID p_material) const {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND_V(!material, VS::MATERIAL_DEPTH_DRAW_ALWAYS);
- return material->depth_draw_mode;
-}
-
-void RasterizerGLES2::material_set_blend_mode(RID p_material, VS::MaterialBlendMode p_mode) {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND(!material);
- material->blend_mode = p_mode;
-}
-VS::MaterialBlendMode RasterizerGLES2::material_get_blend_mode(RID p_material) const {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND_V(!material, VS::MATERIAL_BLEND_MODE_ADD);
- return material->blend_mode;
-}
-
-void RasterizerGLES2::material_set_line_width(RID p_material, float p_line_width) {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND(!material);
- material->line_width = p_line_width;
-}
-float RasterizerGLES2::material_get_line_width(RID p_material) const {
-
- Material *material = material_owner.get(p_material);
- ERR_FAIL_COND_V(!material, 0);
-
- return material->line_width;
-}
-
-/* MESH API */
-
-RID RasterizerGLES2::mesh_create() {
-
- return mesh_owner.make_rid(memnew(Mesh));
-}
-
-void RasterizerGLES2::mesh_add_surface(RID p_mesh, VS::PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes, bool p_alpha_sort) {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND(!mesh);
-
- ERR_FAIL_INDEX(p_primitive, VS::PRIMITIVE_MAX);
- ERR_FAIL_COND(p_arrays.size() != VS::ARRAY_MAX);
-
- uint32_t format = 0;
-
- // validation
- int index_array_len = 0;
- int array_len = 0;
-
- for (int i = 0; i < p_arrays.size(); i++) {
-
- if (p_arrays[i].get_type() == Variant::NIL)
- continue;
-
- format |= (1 << i);
-
- if (i == VS::ARRAY_VERTEX) {
-
- array_len = Vector3Array(p_arrays[i]).size();
- ERR_FAIL_COND(array_len == 0);
- } else if (i == VS::ARRAY_INDEX) {
-
- index_array_len = IntArray(p_arrays[i]).size();
- }
- }
-
- ERR_FAIL_COND((format & VS::ARRAY_FORMAT_VERTEX) == 0); // mandatory
-
- ERR_FAIL_COND(mesh->morph_target_count != p_blend_shapes.size());
- if (mesh->morph_target_count) {
- //validate format for morphs
- for (int i = 0; i < p_blend_shapes.size(); i++) {
-
- uint32_t bsformat = 0;
- Array arr = p_blend_shapes[i];
- for (int j = 0; j < arr.size(); j++) {
-
- if (arr[j].get_type() != Variant::NIL)
- bsformat |= (1 << j);
- }
-
- ERR_FAIL_COND((bsformat) != (format & (VS::ARRAY_FORMAT_BONES - 1)));
- }
- }
-
- Surface *surface = memnew(Surface);
- ERR_FAIL_COND(!surface);
-
- bool use_VBO = true; //glGenBuffersARB!=NULL; // TODO detect if it's in there
- if ((!use_hw_skeleton_xform && format & VS::ARRAY_FORMAT_WEIGHTS) || mesh->morph_target_count > 0) {
-
- use_VBO = false;
- }
-
- //surface->packed=pack_arrays && use_VBO;
-
- int total_elem_size = 0;
-
- for (int i = 0; i < VS::ARRAY_MAX; i++) {
-
- Surface::ArrayData &ad = surface->array[i];
- ad.size = 0;
- ad.ofs = 0;
- int elem_size = 0;
- int elem_count = 0;
- bool valid_local = true;
- GLenum datatype;
- bool normalize = false;
- bool bind = false;
-
- if (!(format & (1 << i))) // no array
- continue;
-
- switch (i) {
-
- case VS::ARRAY_VERTEX: {
-
- if (use_VBO && use_half_float) {
- elem_size = 3 * sizeof(int16_t); // vertex
- datatype = _GL_HALF_FLOAT_OES;
- } else {
-
- elem_size = 3 * sizeof(GLfloat); // vertex
- datatype = GL_FLOAT;
- }
- bind = true;
- elem_count = 3;
-
- } break;
- case VS::ARRAY_NORMAL: {
-
- if (use_VBO) {
- elem_size = 4 * sizeof(int8_t); // vertex
- datatype = GL_BYTE;
- normalize = true;
- } else {
- elem_size = 3 * sizeof(GLfloat); // vertex
- datatype = GL_FLOAT;
- }
- bind = true;
- elem_count = 3;
- } break;
- case VS::ARRAY_TANGENT: {
- if (use_VBO) {
- elem_size = 4 * sizeof(int8_t); // vertex
- datatype = GL_BYTE;
- normalize = true;
- } else {
- elem_size = 4 * sizeof(GLfloat); // vertex
- datatype = GL_FLOAT;
- }
- bind = true;
- elem_count = 4;
-
- } break;
- case VS::ARRAY_COLOR: {
-
- elem_size = 4 * sizeof(uint8_t); /* RGBA */
- datatype = GL_UNSIGNED_BYTE;
- elem_count = 4;
- bind = true;
- normalize = true;
- } break;
- case VS::ARRAY_TEX_UV:
- case VS::ARRAY_TEX_UV2: {
- if (use_VBO && use_half_float) {
- elem_size = 2 * sizeof(int16_t); // vertex
- datatype = _GL_HALF_FLOAT_OES;
- } else {
- elem_size = 2 * sizeof(GLfloat); // vertex
- datatype = GL_FLOAT;
- }
- bind = true;
- elem_count = 2;
-
- } break;
- case VS::ARRAY_WEIGHTS: {
-
- if (use_VBO) {
-
- elem_size = VS::ARRAY_WEIGHTS_SIZE * sizeof(GLushort);
- valid_local = false;
- bind = true;
- normalize = true;
- datatype = GL_UNSIGNED_SHORT;
- elem_count = 4;
-
- } else {
- elem_size = VS::ARRAY_WEIGHTS_SIZE * sizeof(GLfloat);
- valid_local = false;
- bind = false;
- datatype = GL_FLOAT;
- elem_count = 4;
- }
-
- } break;
- case VS::ARRAY_BONES: {
-
- if (use_VBO) {
- elem_size = VS::ARRAY_WEIGHTS_SIZE * sizeof(GLubyte);
- valid_local = false;
- bind = true;
- datatype = GL_UNSIGNED_BYTE;
- elem_count = 4;
- } else {
-
- elem_size = VS::ARRAY_WEIGHTS_SIZE * sizeof(GLushort);
- valid_local = false;
- bind = false;
- datatype = GL_UNSIGNED_SHORT;
- elem_count = 4;
- }
-
- } break;
- case VS::ARRAY_INDEX: {
-
- if (index_array_len <= 0) {
- ERR_PRINT("index_array_len==NO_INDEX_ARRAY");
- break;
- }
- /* determine wether using 16 or 32 bits indices */
- if (array_len > (1 << 16)) {
-
- elem_size = 4;
- datatype = GL_UNSIGNED_INT;
- } else {
- elem_size = 2;
- datatype = GL_UNSIGNED_SHORT;
- }
-
- /*
- if (use_VBO) {
-
- glGenBuffers(1,&surface->index_id);
- ERR_FAIL_COND(surface->index_id==0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,surface->index_id);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER,index_array_len*elem_size,NULL,GL_STATIC_DRAW);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,0); //unbind
- } else {
- surface->index_array_local = (uint8_t*)memalloc(index_array_len*elem_size);
- };
-*/
- surface->index_array_len = index_array_len; // only way it can exist
- ad.ofs = 0;
- ad.size = elem_size;
-
- continue;
- } break;
- default: {
- ERR_FAIL();
- }
- }
-
- ad.ofs = total_elem_size;
- ad.size = elem_size;
- ad.datatype = datatype;
- ad.normalize = normalize;
- ad.bind = bind;
- ad.count = elem_count;
- total_elem_size += elem_size;
- if (valid_local) {
- surface->local_stride += elem_size;
- surface->morph_format |= (1 << i);
- }
- }
-
- surface->stride = total_elem_size;
- surface->array_len = array_len;
- surface->format = format;
- surface->primitive = p_primitive;
- surface->morph_target_count = mesh->morph_target_count;
- surface->configured_format = 0;
- surface->mesh = mesh;
- if (keep_copies) {
- surface->data = p_arrays;
- surface->morph_data = p_blend_shapes;
- }
-
- uint8_t *array_ptr = NULL;
- uint8_t *index_array_ptr = NULL;
- PoolVector<uint8_t> array_pre_vbo;
- PoolVector<uint8_t>::Write vaw;
- PoolVector<uint8_t> index_array_pre_vbo;
- PoolVector<uint8_t>::Write iaw;
-
- /* create pointers */
- if (use_VBO) {
-
- array_pre_vbo.resize(surface->array_len * surface->stride);
- vaw = array_pre_vbo.write();
- array_ptr = vaw.ptr();
-
- if (surface->index_array_len) {
-
- index_array_pre_vbo.resize(surface->index_array_len * surface->array[VS::ARRAY_INDEX].size);
- iaw = index_array_pre_vbo.write();
- index_array_ptr = iaw.ptr();
- }
-
- _surface_set_arrays(surface, array_ptr, index_array_ptr, p_arrays, true);
-
- } else {
-
- surface->array_local = (uint8_t *)memalloc(surface->array_len * surface->stride);
- array_ptr = (uint8_t *)surface->array_local;
- if (surface->index_array_len) {
- surface->index_array_local = (uint8_t *)memalloc(index_array_len * surface->array[VS::ARRAY_INDEX].size);
- index_array_ptr = (uint8_t *)surface->index_array_local;
- }
-
- _surface_set_arrays(surface, array_ptr, index_array_ptr, p_arrays, true);
-
- if (mesh->morph_target_count) {
-
- surface->morph_targets_local = memnew_arr(Surface::MorphTarget, mesh->morph_target_count);
- for (int i = 0; i < mesh->morph_target_count; i++) {
-
- surface->morph_targets_local[i].array = memnew_arr(uint8_t, surface->local_stride * surface->array_len);
- surface->morph_targets_local[i].configured_format = surface->morph_format;
- _surface_set_arrays(surface, surface->morph_targets_local[i].array, NULL, p_blend_shapes[i], false);
- }
- }
- }
-
- /* create buffers!! */
- if (use_VBO) {
- glGenBuffers(1, &surface->vertex_id);
- ERR_FAIL_COND(surface->vertex_id == 0);
- glBindBuffer(GL_ARRAY_BUFFER, surface->vertex_id);
- glBufferData(GL_ARRAY_BUFFER, surface->array_len * surface->stride, array_ptr, GL_STATIC_DRAW);
- glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind
- if (surface->index_array_len) {
-
- glGenBuffers(1, &surface->index_id);
- ERR_FAIL_COND(surface->index_id == 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, surface->index_id);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, index_array_len * surface->array[VS::ARRAY_INDEX].size, index_array_ptr, GL_STATIC_DRAW);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); //unbind
- }
- }
-
- mesh->surfaces.push_back(surface);
-}
-
-Error RasterizerGLES2::_surface_set_arrays(Surface *p_surface, uint8_t *p_mem, uint8_t *p_index_mem, const Array &p_arrays, bool p_main) {
-
- uint32_t stride = p_main ? p_surface->stride : p_surface->local_stride;
-
- for (int ai = 0; ai < VS::ARRAY_MAX; ai++) {
- if (ai >= p_arrays.size())
- break;
- if (p_arrays[ai].get_type() == Variant::NIL)
- continue;
- Surface::ArrayData &a = p_surface->array[ai];
-
- switch (ai) {
-
- case VS::ARRAY_VERTEX: {
-
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::VECTOR3_ARRAY, ERR_INVALID_PARAMETER);
-
- PoolVector<Vector3> array = p_arrays[ai];
- ERR_FAIL_COND_V(array.size() != p_surface->array_len, ERR_INVALID_PARAMETER);
-
- PoolVector<Vector3>::Read read = array.read();
- const Vector3 *src = read.ptr();
-
- // setting vertices means regenerating the AABB
- AABB aabb;
-
- float scale = 1;
-
- if (p_surface->array[VS::ARRAY_VERTEX].datatype == _GL_HALF_FLOAT_OES) {
-
- for (int i = 0; i < p_surface->array_len; i++) {
-
- uint16_t vector[3] = { make_half_float(src[i].x), make_half_float(src[i].y), make_half_float(src[i].z) };
-
- copymem(&p_mem[a.ofs + i * stride], vector, a.size);
-
- if (i == 0) {
-
- aabb = AABB(src[i], Vector3());
- } else {
-
- aabb.expand_to(src[i]);
- }
- }
-
- } else {
- for (int i = 0; i < p_surface->array_len; i++) {
-
- GLfloat vector[3] = { src[i].x, src[i].y, src[i].z };
-
- copymem(&p_mem[a.ofs + i * stride], vector, a.size);
-
- if (i == 0) {
-
- aabb = AABB(src[i], Vector3());
- } else {
-
- aabb.expand_to(src[i]);
- }
- }
- }
-
- if (p_main) {
- p_surface->aabb = aabb;
- p_surface->vertex_scale = scale;
- }
-
- } break;
- case VS::ARRAY_NORMAL: {
-
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::VECTOR3_ARRAY, ERR_INVALID_PARAMETER);
-
- PoolVector<Vector3> array = p_arrays[ai];
- ERR_FAIL_COND_V(array.size() != p_surface->array_len, ERR_INVALID_PARAMETER);
-
- PoolVector<Vector3>::Read read = array.read();
- const Vector3 *src = read.ptr();
-
- // setting vertices means regenerating the AABB
-
- if (p_surface->array[VS::ARRAY_NORMAL].datatype == GL_BYTE) {
-
- for (int i = 0; i < p_surface->array_len; i++) {
-
- GLbyte vector[4] = {
- CLAMP(src[i].x * 127, -128, 127),
- CLAMP(src[i].y * 127, -128, 127),
- CLAMP(src[i].z * 127, -128, 127),
- 0,
- };
-
- copymem(&p_mem[a.ofs + i * stride], vector, a.size);
- }
-
- } else {
- for (int i = 0; i < p_surface->array_len; i++) {
-
- GLfloat vector[3] = { src[i].x, src[i].y, src[i].z };
- copymem(&p_mem[a.ofs + i * stride], vector, a.size);
- }
- }
-
- } break;
- case VS::ARRAY_TANGENT: {
-
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::REAL_ARRAY, ERR_INVALID_PARAMETER);
-
- PoolVector<real_t> array = p_arrays[ai];
-
- ERR_FAIL_COND_V(array.size() != p_surface->array_len * 4, ERR_INVALID_PARAMETER);
-
- PoolVector<real_t>::Read read = array.read();
- const real_t *src = read.ptr();
-
- if (p_surface->array[VS::ARRAY_TANGENT].datatype == GL_BYTE) {
-
- for (int i = 0; i < p_surface->array_len; i++) {
-
- GLbyte xyzw[4] = {
- CLAMP(src[i * 4 + 0] * 127, -128, 127),
- CLAMP(src[i * 4 + 1] * 127, -128, 127),
- CLAMP(src[i * 4 + 2] * 127, -128, 127),
- CLAMP(src[i * 4 + 3] * 127, -128, 127)
- };
-
- copymem(&p_mem[a.ofs + i * stride], xyzw, a.size);
- }
-
- } else {
- for (int i = 0; i < p_surface->array_len; i++) {
-
- GLfloat xyzw[4] = {
- src[i * 4 + 0],
- src[i * 4 + 1],
- src[i * 4 + 2],
- src[i * 4 + 3]
- };
-
- copymem(&p_mem[a.ofs + i * stride], xyzw, a.size);
- }
- }
-
- } break;
- case VS::ARRAY_COLOR: {
-
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::COLOR_ARRAY, ERR_INVALID_PARAMETER);
-
- PoolVector<Color> array = p_arrays[ai];
-
- ERR_FAIL_COND_V(array.size() != p_surface->array_len, ERR_INVALID_PARAMETER);
-
- PoolVector<Color>::Read read = array.read();
- const Color *src = read.ptr();
- bool alpha = false;
-
- for (int i = 0; i < p_surface->array_len; i++) {
-
- if (src[i].a < 0.98) // tolerate alpha a bit, for crappy exporters
- alpha = true;
-
- uint8_t colors[4];
-
- for (int j = 0; j < 4; j++) {
-
- colors[j] = CLAMP(int((src[i][j]) * 255.0), 0, 255);
- }
-
- copymem(&p_mem[a.ofs + i * stride], colors, a.size);
- }
-
- if (p_main)
- p_surface->has_alpha = alpha;
-
- } break;
- case VS::ARRAY_TEX_UV:
- case VS::ARRAY_TEX_UV2: {
-
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::VECTOR3_ARRAY && p_arrays[ai].get_type() != Variant::VECTOR2_ARRAY, ERR_INVALID_PARAMETER);
-
- PoolVector<Vector2> array = p_arrays[ai];
-
- ERR_FAIL_COND_V(array.size() != p_surface->array_len, ERR_INVALID_PARAMETER);
-
- PoolVector<Vector2>::Read read = array.read();
-
- const Vector2 *src = read.ptr();
- float scale = 1.0;
-
- if (p_surface->array[ai].datatype == _GL_HALF_FLOAT_OES) {
-
- for (int i = 0; i < p_surface->array_len; i++) {
-
- uint16_t uv[2] = { make_half_float(src[i].x), make_half_float(src[i].y) };
- copymem(&p_mem[a.ofs + i * stride], uv, a.size);
- }
-
- } else {
- for (int i = 0; i < p_surface->array_len; i++) {
-
- GLfloat uv[2] = { src[i].x, src[i].y };
-
- copymem(&p_mem[a.ofs + i * stride], uv, a.size);
- }
- }
-
- if (p_main) {
-
- if (ai == VS::ARRAY_TEX_UV) {
-
- p_surface->uv_scale = scale;
- }
- if (ai == VS::ARRAY_TEX_UV2) {
-
- p_surface->uv2_scale = scale;
- }
- }
-
- } break;
- case VS::ARRAY_WEIGHTS: {
-
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::REAL_ARRAY, ERR_INVALID_PARAMETER);
-
- PoolVector<real_t> array = p_arrays[ai];
-
- ERR_FAIL_COND_V(array.size() != p_surface->array_len * VS::ARRAY_WEIGHTS_SIZE, ERR_INVALID_PARAMETER);
-
- PoolVector<real_t>::Read read = array.read();
-
- const real_t *src = read.ptr();
-
- if (p_surface->array[VS::ARRAY_WEIGHTS].datatype == GL_UNSIGNED_SHORT) {
-
- for (int i = 0; i < p_surface->array_len; i++) {
-
- GLushort data[VS::ARRAY_WEIGHTS_SIZE];
- for (int j = 0; j < VS::ARRAY_WEIGHTS_SIZE; j++) {
- data[j] = CLAMP(src[i * VS::ARRAY_WEIGHTS_SIZE + j] * 65535, 0, 65535);
- }
-
- copymem(&p_mem[a.ofs + i * stride], data, a.size);
- }
- } else {
-
- for (int i = 0; i < p_surface->array_len; i++) {
-
- GLfloat data[VS::ARRAY_WEIGHTS_SIZE];
- for (int j = 0; j < VS::ARRAY_WEIGHTS_SIZE; j++) {
- data[j] = src[i * VS::ARRAY_WEIGHTS_SIZE + j];
- }
-
- copymem(&p_mem[a.ofs + i * stride], data, a.size);
- }
- }
-
- } break;
- case VS::ARRAY_BONES: {
-
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::REAL_ARRAY, ERR_INVALID_PARAMETER);
-
- PoolVector<int> array = p_arrays[ai];
-
- ERR_FAIL_COND_V(array.size() != p_surface->array_len * VS::ARRAY_WEIGHTS_SIZE, ERR_INVALID_PARAMETER);
-
- PoolVector<int>::Read read = array.read();
-
- const int *src = read.ptr();
-
- p_surface->max_bone = 0;
-
- if (p_surface->array[VS::ARRAY_BONES].datatype == GL_UNSIGNED_BYTE) {
-
- for (int i = 0; i < p_surface->array_len; i++) {
-
- GLubyte data[VS::ARRAY_WEIGHTS_SIZE];
- for (int j = 0; j < VS::ARRAY_WEIGHTS_SIZE; j++) {
- data[j] = CLAMP(src[i * VS::ARRAY_WEIGHTS_SIZE + j], 0, 255);
- p_surface->max_bone = MAX(data[j], p_surface->max_bone);
- }
-
- copymem(&p_mem[a.ofs + i * stride], data, a.size);
- }
-
- } else {
- for (int i = 0; i < p_surface->array_len; i++) {
-
- GLushort data[VS::ARRAY_WEIGHTS_SIZE];
- for (int j = 0; j < VS::ARRAY_WEIGHTS_SIZE; j++) {
- data[j] = src[i * VS::ARRAY_WEIGHTS_SIZE + j];
- p_surface->max_bone = MAX(data[j], p_surface->max_bone);
- }
-
- copymem(&p_mem[a.ofs + i * stride], data, a.size);
- }
- }
-
- } break;
- case VS::ARRAY_INDEX: {
-
- ERR_FAIL_COND_V(p_surface->index_array_len <= 0, ERR_INVALID_DATA);
- ERR_FAIL_COND_V(p_arrays[ai].get_type() != Variant::INT_ARRAY, ERR_INVALID_PARAMETER);
-
- PoolVector<int> indices = p_arrays[ai];
- ERR_FAIL_COND_V(indices.size() == 0, ERR_INVALID_PARAMETER);
- ERR_FAIL_COND_V(indices.size() != p_surface->index_array_len, ERR_INVALID_PARAMETER);
-
- /* determine wether using 16 or 32 bits indices */
-
- PoolVector<int>::Read read = indices.read();
- const int *src = read.ptr();
-
- for (int i = 0; i < p_surface->index_array_len; i++) {
-
- if (a.size == 2) {
- uint16_t v = src[i];
-
- copymem(&p_index_mem[i * a.size], &v, a.size);
- } else {
- uint32_t v = src[i];
-
- copymem(&p_index_mem[i * a.size], &v, a.size);
- }
- }
-
- } break;
-
- default: { ERR_FAIL_V(ERR_INVALID_PARAMETER); }
- }
-
- p_surface->configured_format |= (1 << ai);
- }
-
- if (p_surface->format & VS::ARRAY_FORMAT_BONES) {
- //create AABBs for each detected bone
- int total_bones = p_surface->max_bone + 1;
- if (p_main) {
- p_surface->skeleton_bone_aabb.resize(total_bones);
- p_surface->skeleton_bone_used.resize(total_bones);
- for (int i = 0; i < total_bones; i++)
- p_surface->skeleton_bone_used[i] = false;
- }
- PoolVector<Vector3> vertices = p_arrays[VS::ARRAY_VERTEX];
- PoolVector<int> bones = p_arrays[VS::ARRAY_BONES];
- PoolVector<float> weights = p_arrays[VS::ARRAY_WEIGHTS];
-
- bool any_valid = false;
-
- if (vertices.size() && bones.size() == vertices.size() * 4 && weights.size() == bones.size()) {
- //print_line("MAKING SKELETHONG");
- int vs = vertices.size();
- PoolVector<Vector3>::Read rv = vertices.read();
- PoolVector<int>::Read rb = bones.read();
- PoolVector<float>::Read rw = weights.read();
-
- Vector<bool> first;
- first.resize(total_bones);
- for (int i = 0; i < total_bones; i++) {
- first[i] = p_main;
- }
- AABB *bptr = p_surface->skeleton_bone_aabb.ptr();
- bool *fptr = first.ptr();
- bool *usedptr = p_surface->skeleton_bone_used.ptr();
-
- for (int i = 0; i < vs; i++) {
-
- Vector3 v = rv[i];
- for (int j = 0; j < 4; j++) {
-
- int idx = rb[i * 4 + j];
- float w = rw[i * 4 + j];
- if (w == 0)
- continue; //break;
- ERR_FAIL_INDEX_V(idx, total_bones, ERR_INVALID_DATA);
-
- if (fptr[idx]) {
- bptr[idx].pos = v;
- fptr[idx] = false;
- any_valid = true;
- } else {
- bptr[idx].expand_to(v);
- }
- usedptr[idx] = true;
- }
- }
- }
-
- if (p_main && !any_valid) {
-
- p_surface->skeleton_bone_aabb.clear();
- p_surface->skeleton_bone_used.clear();
- }
- }
-
- return OK;
-}
-
-void RasterizerGLES2::mesh_add_custom_surface(RID p_mesh, const Variant &p_dat) {
-
- ERR_EXPLAIN("OpenGL Rasterizer does not support custom surfaces. Running on wrong platform?");
- ERR_FAIL();
-}
-
-Array RasterizerGLES2::mesh_get_surface_arrays(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, Array());
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Array());
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V(!surface, Array());
-
- return surface->data;
-}
-Array RasterizerGLES2::mesh_get_surface_morph_arrays(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, Array());
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Array());
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V(!surface, Array());
-
- return surface->morph_data;
-}
-
-void RasterizerGLES2::mesh_set_morph_target_count(RID p_mesh, int p_amount) {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND(!mesh);
- ERR_FAIL_COND(mesh->surfaces.size() != 0);
-
- mesh->morph_target_count = p_amount;
-}
-
-int RasterizerGLES2::mesh_get_morph_target_count(RID p_mesh) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, -1);
-
- return mesh->morph_target_count;
-}
-
-void RasterizerGLES2::mesh_set_morph_target_mode(RID p_mesh, VS::MorphTargetMode p_mode) {
-
- ERR_FAIL_INDEX(p_mode, 2);
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND(!mesh);
-
- mesh->morph_target_mode = p_mode;
-}
-
-VS::MorphTargetMode RasterizerGLES2::mesh_get_morph_target_mode(RID p_mesh) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, VS::MORPH_MODE_NORMALIZED);
-
- return mesh->morph_target_mode;
-}
-
-void RasterizerGLES2::mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material, bool p_owned) {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND(!mesh);
- ERR_FAIL_INDEX(p_surface, mesh->surfaces.size());
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND(!surface);
-
- if (surface->material_owned && surface->material.is_valid())
- free(surface->material);
-
- surface->material_owned = p_owned;
-
- surface->material = p_material;
-}
-
-RID RasterizerGLES2::mesh_surface_get_material(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, RID());
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), RID());
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V(!surface, RID());
-
- return surface->material;
-}
-
-int RasterizerGLES2::mesh_surface_get_array_len(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, -1);
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), -1);
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V(!surface, -1);
-
- return surface->array_len;
-}
-int RasterizerGLES2::mesh_surface_get_array_index_len(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, -1);
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), -1);
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V(!surface, -1);
-
- return surface->index_array_len;
-}
-uint32_t RasterizerGLES2::mesh_surface_get_format(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, 0);
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), 0);
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V(!surface, 0);
-
- return surface->format;
-}
-VS::PrimitiveType RasterizerGLES2::mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, VS::PRIMITIVE_POINTS);
- ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), VS::PRIMITIVE_POINTS);
- Surface *surface = mesh->surfaces[p_surface];
- ERR_FAIL_COND_V(!surface, VS::PRIMITIVE_POINTS);
-
- return surface->primitive;
-}
-
-void RasterizerGLES2::mesh_remove_surface(RID p_mesh, int p_index) {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND(!mesh);
- ERR_FAIL_INDEX(p_index, mesh->surfaces.size());
- Surface *surface = mesh->surfaces[p_index];
- ERR_FAIL_COND(!surface);
-
- if (surface->vertex_id)
- glDeleteBuffers(1, &surface->vertex_id);
- if (surface->index_id)
- glDeleteBuffers(1, &surface->index_id);
-
- if (mesh->morph_target_count) {
- for (int i = 0; i < mesh->morph_target_count; i++)
- memfree(surface->morph_targets_local[i].array);
- memfree(surface->morph_targets_local);
- }
-
- memdelete(mesh->surfaces[p_index]);
- mesh->surfaces.remove(p_index);
-}
-int RasterizerGLES2::mesh_get_surface_count(RID p_mesh) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, -1);
-
- return mesh->surfaces.size();
-}
-
-AABB RasterizerGLES2::mesh_get_aabb(RID p_mesh, RID p_skeleton) const {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, AABB());
-
- if (mesh->custom_aabb != AABB())
- return mesh->custom_aabb;
-
- Skeleton *sk = NULL;
- if (p_skeleton.is_valid())
- sk = skeleton_owner.get(p_skeleton);
-
- AABB aabb;
- if (sk && sk->bones.size() != 0) {
-
- for (int i = 0; i < mesh->surfaces.size(); i++) {
-
- AABB laabb;
- if (mesh->surfaces[i]->format & VS::ARRAY_FORMAT_BONES && mesh->surfaces[i]->skeleton_bone_aabb.size()) {
-
- int bs = mesh->surfaces[i]->skeleton_bone_aabb.size();
- const AABB *skbones = mesh->surfaces[i]->skeleton_bone_aabb.ptr();
- const bool *skused = mesh->surfaces[i]->skeleton_bone_used.ptr();
-
- int sbs = sk->bones.size();
- ERR_CONTINUE(bs > sbs);
- Skeleton::Bone *skb = sk->bones.ptr();
-
- bool first = true;
- for (int j = 0; j < bs; j++) {
-
- if (!skused[j])
- continue;
- AABB baabb = skb[j].transform_aabb(skbones[j]);
- if (first) {
- laabb = baabb;
- first = false;
- } else {
- laabb.merge_with(baabb);
- }
- }
-
- } else {
-
- laabb = mesh->surfaces[i]->aabb;
- }
-
- if (i == 0)
- aabb = laabb;
- else
- aabb.merge_with(laabb);
- }
- } else {
-
- for (int i = 0; i < mesh->surfaces.size(); i++) {
-
- if (i == 0)
- aabb = mesh->surfaces[i]->aabb;
- else
- aabb.merge_with(mesh->surfaces[i]->aabb);
- }
- }
-
- return aabb;
-}
-
-void RasterizerGLES2::mesh_set_custom_aabb(RID p_mesh, const AABB &p_aabb) {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND(!mesh);
-
- mesh->custom_aabb = p_aabb;
-}
-
-AABB RasterizerGLES2::mesh_get_custom_aabb(RID p_mesh) const {
-
- const Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND_V(!mesh, AABB());
-
- return mesh->custom_aabb;
-}
-/* MULTIMESH API */
-
-RID RasterizerGLES2::multimesh_create() {
-
- return multimesh_owner.make_rid(memnew(MultiMesh));
-}
-
-void RasterizerGLES2::multimesh_set_instance_count(RID p_multimesh, int p_count) {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND(!multimesh);
-
- //multimesh->elements.clear(); // make sure to delete everything, so it "fails" in all implementations
-
- if (use_texture_instancing) {
-
- if (next_power_of_2(p_count) != next_power_of_2(multimesh->elements.size())) {
- if (multimesh->tex_id) {
- glDeleteTextures(1, &multimesh->tex_id);
- multimesh->tex_id = 0;
- }
-
- if (p_count) {
-
- uint32_t po2 = next_power_of_2(p_count);
- if (po2 & 0xAAAAAAAA) {
- //half width
-
- multimesh->tw = Math::sqrt(po2 * 2);
- multimesh->th = multimesh->tw / 2;
- } else {
-
- multimesh->tw = Math::sqrt(po2);
- multimesh->th = multimesh->tw;
- }
- multimesh->tw *= 4;
- if (multimesh->th == 0)
- multimesh->th = 1;
-
- glGenTextures(1, &multimesh->tex_id);
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, multimesh->tex_id);
-
-#ifdef GLEW_ENABLED
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, multimesh->tw, multimesh->th, 0, GL_RGBA, GL_FLOAT, NULL);
-#else
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, multimesh->tw, multimesh->th, 0, GL_RGBA, GL_FLOAT, NULL);
-#endif
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- //multimesh->pixel_size=1.0/ps;
-
- glBindTexture(GL_TEXTURE_2D, 0);
- }
- }
-
- if (!multimesh->dirty_list.in_list()) {
- _multimesh_dirty_list.add(&multimesh->dirty_list);
- }
- }
-
- multimesh->elements.resize(p_count);
-}
-int RasterizerGLES2::multimesh_get_instance_count(RID p_multimesh) const {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND_V(!multimesh, -1);
-
- return multimesh->elements.size();
-}
-
-void RasterizerGLES2::multimesh_set_mesh(RID p_multimesh, RID p_mesh) {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND(!multimesh);
-
- multimesh->mesh = p_mesh;
-}
-void RasterizerGLES2::multimesh_set_aabb(RID p_multimesh, const AABB &p_aabb) {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND(!multimesh);
- multimesh->aabb = p_aabb;
-}
-void RasterizerGLES2::multimesh_instance_set_transform(RID p_multimesh, int p_index, const Transform &p_transform) {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND(!multimesh);
- ERR_FAIL_INDEX(p_index, multimesh->elements.size());
- MultiMesh::Element &e = multimesh->elements[p_index];
-
- e.matrix[0] = p_transform.basis.elements[0][0];
- e.matrix[1] = p_transform.basis.elements[1][0];
- e.matrix[2] = p_transform.basis.elements[2][0];
- e.matrix[3] = 0;
- e.matrix[4] = p_transform.basis.elements[0][1];
- e.matrix[5] = p_transform.basis.elements[1][1];
- e.matrix[6] = p_transform.basis.elements[2][1];
- e.matrix[7] = 0;
- e.matrix[8] = p_transform.basis.elements[0][2];
- e.matrix[9] = p_transform.basis.elements[1][2];
- e.matrix[10] = p_transform.basis.elements[2][2];
- e.matrix[11] = 0;
- e.matrix[12] = p_transform.origin.x;
- e.matrix[13] = p_transform.origin.y;
- e.matrix[14] = p_transform.origin.z;
- e.matrix[15] = 1;
-
- if (!multimesh->dirty_list.in_list()) {
- _multimesh_dirty_list.add(&multimesh->dirty_list);
- }
-}
-void RasterizerGLES2::multimesh_instance_set_color(RID p_multimesh, int p_index, const Color &p_color) {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND(!multimesh)
- ERR_FAIL_INDEX(p_index, multimesh->elements.size());
- MultiMesh::Element &e = multimesh->elements[p_index];
- e.color[0] = CLAMP(p_color.r * 255, 0, 255);
- e.color[1] = CLAMP(p_color.g * 255, 0, 255);
- e.color[2] = CLAMP(p_color.b * 255, 0, 255);
- e.color[3] = CLAMP(p_color.a * 255, 0, 255);
-
- if (!multimesh->dirty_list.in_list()) {
- _multimesh_dirty_list.add(&multimesh->dirty_list);
- }
-}
-
-RID RasterizerGLES2::multimesh_get_mesh(RID p_multimesh) const {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND_V(!multimesh, RID());
-
- return multimesh->mesh;
-}
-AABB RasterizerGLES2::multimesh_get_aabb(RID p_multimesh) const {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND_V(!multimesh, AABB());
-
- return multimesh->aabb;
-}
-
-Transform RasterizerGLES2::multimesh_instance_get_transform(RID p_multimesh, int p_index) const {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND_V(!multimesh, Transform());
-
- ERR_FAIL_INDEX_V(p_index, multimesh->elements.size(), Transform());
- MultiMesh::Element &e = multimesh->elements[p_index];
-
- Transform tr;
-
- tr.basis.elements[0][0] = e.matrix[0];
- tr.basis.elements[1][0] = e.matrix[1];
- tr.basis.elements[2][0] = e.matrix[2];
- tr.basis.elements[0][1] = e.matrix[4];
- tr.basis.elements[1][1] = e.matrix[5];
- tr.basis.elements[2][1] = e.matrix[6];
- tr.basis.elements[0][2] = e.matrix[8];
- tr.basis.elements[1][2] = e.matrix[9];
- tr.basis.elements[2][2] = e.matrix[10];
- tr.origin.x = e.matrix[12];
- tr.origin.y = e.matrix[13];
- tr.origin.z = e.matrix[14];
-
- return tr;
-}
-Color RasterizerGLES2::multimesh_instance_get_color(RID p_multimesh, int p_index) const {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND_V(!multimesh, Color());
- ERR_FAIL_INDEX_V(p_index, multimesh->elements.size(), Color());
- MultiMesh::Element &e = multimesh->elements[p_index];
- Color c;
- c.r = e.color[0] / 255.0;
- c.g = e.color[1] / 255.0;
- c.b = e.color[2] / 255.0;
- c.a = e.color[3] / 255.0;
-
- return c;
-}
-
-void RasterizerGLES2::multimesh_set_visible_instances(RID p_multimesh, int p_visible) {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND(!multimesh);
- multimesh->visible = p_visible;
-}
-
-int RasterizerGLES2::multimesh_get_visible_instances(RID p_multimesh) const {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND_V(!multimesh, -1);
- return multimesh->visible;
-}
-
-/* IMMEDIATE API */
-
-RID RasterizerGLES2::immediate_create() {
-
- Immediate *im = memnew(Immediate);
- return immediate_owner.make_rid(im);
-}
-
-void RasterizerGLES2::immediate_begin(RID p_immediate, VS::PrimitiveType p_rimitive, RID p_texture) {
-
- Immediate *im = immediate_owner.get(p_immediate);
- ERR_FAIL_COND(!im);
- ERR_FAIL_COND(im->building);
-
- Immediate::Chunk ic;
- ic.texture = p_texture;
- ic.primitive = p_rimitive;
- im->chunks.push_back(ic);
- im->mask = 0;
- im->building = true;
-}
-void RasterizerGLES2::immediate_vertex(RID p_immediate, const Vector3 &p_vertex) {
-
- Immediate *im = immediate_owner.get(p_immediate);
- ERR_FAIL_COND(!im);
- ERR_FAIL_COND(!im->building);
-
- Immediate::Chunk *c = &im->chunks.back()->get();
-
- if (c->vertices.empty() && im->chunks.size() == 1) {
-
- im->aabb.pos = p_vertex;
- im->aabb.size = Vector3();
- } else {
- im->aabb.expand_to(p_vertex);
- }
-
- if (im->mask & VS::ARRAY_FORMAT_NORMAL)
- c->normals.push_back(chunk_normal);
- if (im->mask & VS::ARRAY_FORMAT_TANGENT)
- c->tangents.push_back(chunk_tangent);
- if (im->mask & VS::ARRAY_FORMAT_COLOR)
- c->colors.push_back(chunk_color);
- if (im->mask & VS::ARRAY_FORMAT_TEX_UV)
- c->uvs.push_back(chunk_uv);
- if (im->mask & VS::ARRAY_FORMAT_TEX_UV2)
- c->uvs2.push_back(chunk_uv2);
- im->mask |= VS::ARRAY_FORMAT_VERTEX;
- c->vertices.push_back(p_vertex);
-}
-
-void RasterizerGLES2::immediate_normal(RID p_immediate, const Vector3 &p_normal) {
-
- Immediate *im = immediate_owner.get(p_immediate);
- ERR_FAIL_COND(!im);
- ERR_FAIL_COND(!im->building);
-
- im->mask |= VS::ARRAY_FORMAT_NORMAL;
- chunk_normal = p_normal;
-}
-void RasterizerGLES2::immediate_tangent(RID p_immediate, const Plane &p_tangent) {
-
- Immediate *im = immediate_owner.get(p_immediate);
- ERR_FAIL_COND(!im);
- ERR_FAIL_COND(!im->building);
-
- im->mask |= VS::ARRAY_FORMAT_TANGENT;
- chunk_tangent = p_tangent;
-}
-void RasterizerGLES2::immediate_color(RID p_immediate, const Color &p_color) {
-
- Immediate *im = immediate_owner.get(p_immediate);
- ERR_FAIL_COND(!im);
- ERR_FAIL_COND(!im->building);
-
- im->mask |= VS::ARRAY_FORMAT_COLOR;
- chunk_color = p_color;
-}
-void RasterizerGLES2::immediate_uv(RID p_immediate, const Vector2 &tex_uv) {
-
- Immediate *im = immediate_owner.get(p_immediate);
- ERR_FAIL_COND(!im);
- ERR_FAIL_COND(!im->building);
-
- im->mask |= VS::ARRAY_FORMAT_TEX_UV;
- chunk_uv = tex_uv;
-}
-void RasterizerGLES2::immediate_uv2(RID p_immediate, const Vector2 &tex_uv) {
-
- Immediate *im = immediate_owner.get(p_immediate);
- ERR_FAIL_COND(!im);
- ERR_FAIL_COND(!im->building);
-
- im->mask |= VS::ARRAY_FORMAT_TEX_UV2;
- chunk_uv2 = tex_uv;
-}
-
-void RasterizerGLES2::immediate_end(RID p_immediate) {
-
- Immediate *im = immediate_owner.get(p_immediate);
- ERR_FAIL_COND(!im);
- ERR_FAIL_COND(!im->building);
-
- im->building = false;
-}
-void RasterizerGLES2::immediate_clear(RID p_immediate) {
-
- Immediate *im = immediate_owner.get(p_immediate);
- ERR_FAIL_COND(!im);
- ERR_FAIL_COND(im->building);
-
- im->chunks.clear();
-}
-
-AABB RasterizerGLES2::immediate_get_aabb(RID p_immediate) const {
-
- Immediate *im = immediate_owner.get(p_immediate);
- ERR_FAIL_COND_V(!im, AABB());
- return im->aabb;
-}
-
-void RasterizerGLES2::immediate_set_material(RID p_immediate, RID p_material) {
-
- Immediate *im = immediate_owner.get(p_immediate);
- ERR_FAIL_COND(!im);
- im->material = p_material;
-}
-
-RID RasterizerGLES2::immediate_get_material(RID p_immediate) const {
-
- const Immediate *im = immediate_owner.get(p_immediate);
- ERR_FAIL_COND_V(!im, RID());
- return im->material;
-}
-
-/* PARTICLES API */
-
-RID RasterizerGLES2::particles_create() {
-
- Particles *particles = memnew(Particles);
- ERR_FAIL_COND_V(!particles, RID());
- return particles_owner.make_rid(particles);
-}
-
-void RasterizerGLES2::particles_set_amount(RID p_particles, int p_amount) {
-
- ERR_FAIL_COND(p_amount < 1);
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
- particles->data.amount = p_amount;
-}
-
-int RasterizerGLES2::particles_get_amount(RID p_particles) const {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, -1);
- return particles->data.amount;
-}
-
-void RasterizerGLES2::particles_set_emitting(RID p_particles, bool p_emitting) {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
- particles->data.emitting = p_emitting;
-}
-bool RasterizerGLES2::particles_is_emitting(RID p_particles) const {
-
- const Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, false);
- return particles->data.emitting;
-}
-
-void RasterizerGLES2::particles_set_visibility_aabb(RID p_particles, const AABB &p_visibility) {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
- particles->data.visibility_aabb = p_visibility;
-}
-
-void RasterizerGLES2::particles_set_emission_half_extents(RID p_particles, const Vector3 &p_half_extents) {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
-
- particles->data.emission_half_extents = p_half_extents;
-}
-Vector3 RasterizerGLES2::particles_get_emission_half_extents(RID p_particles) const {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, Vector3());
-
- return particles->data.emission_half_extents;
-}
-
-void RasterizerGLES2::particles_set_emission_base_velocity(RID p_particles, const Vector3 &p_base_velocity) {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
-
- particles->data.emission_base_velocity = p_base_velocity;
-}
-
-Vector3 RasterizerGLES2::particles_get_emission_base_velocity(RID p_particles) const {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, Vector3());
-
- return particles->data.emission_base_velocity;
-}
-
-void RasterizerGLES2::particles_set_emission_points(RID p_particles, const PoolVector<Vector3> &p_points) {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
-
- particles->data.emission_points = p_points;
-}
-
-PoolVector<Vector3> RasterizerGLES2::particles_get_emission_points(RID p_particles) const {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, PoolVector<Vector3>());
-
- return particles->data.emission_points;
-}
-
-void RasterizerGLES2::particles_set_gravity_normal(RID p_particles, const Vector3 &p_normal) {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
-
- particles->data.gravity_normal = p_normal;
-}
-Vector3 RasterizerGLES2::particles_get_gravity_normal(RID p_particles) const {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, Vector3());
-
- return particles->data.gravity_normal;
-}
-
-AABB RasterizerGLES2::particles_get_visibility_aabb(RID p_particles) const {
-
- const Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, AABB());
- return particles->data.visibility_aabb;
-}
-
-void RasterizerGLES2::particles_set_variable(RID p_particles, VS::ParticleVariable p_variable, float p_value) {
-
- ERR_FAIL_INDEX(p_variable, VS::PARTICLE_VAR_MAX);
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
- particles->data.particle_vars[p_variable] = p_value;
-}
-float RasterizerGLES2::particles_get_variable(RID p_particles, VS::ParticleVariable p_variable) const {
-
- const Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, -1);
- return particles->data.particle_vars[p_variable];
-}
-
-void RasterizerGLES2::particles_set_randomness(RID p_particles, VS::ParticleVariable p_variable, float p_randomness) {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
- particles->data.particle_randomness[p_variable] = p_randomness;
-}
-float RasterizerGLES2::particles_get_randomness(RID p_particles, VS::ParticleVariable p_variable) const {
-
- const Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, -1);
- return particles->data.particle_randomness[p_variable];
-}
-
-void RasterizerGLES2::particles_set_color_phases(RID p_particles, int p_phases) {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
- ERR_FAIL_COND(p_phases < 0 || p_phases > VS::MAX_PARTICLE_COLOR_PHASES);
- particles->data.color_phase_count = p_phases;
-}
-int RasterizerGLES2::particles_get_color_phases(RID p_particles) const {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, -1);
- return particles->data.color_phase_count;
-}
-
-void RasterizerGLES2::particles_set_color_phase_pos(RID p_particles, int p_phase, float p_pos) {
-
- ERR_FAIL_INDEX(p_phase, VS::MAX_PARTICLE_COLOR_PHASES);
- if (p_pos < 0.0)
- p_pos = 0.0;
- if (p_pos > 1.0)
- p_pos = 1.0;
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
- particles->data.color_phases[p_phase].pos = p_pos;
-}
-float RasterizerGLES2::particles_get_color_phase_pos(RID p_particles, int p_phase) const {
-
- ERR_FAIL_INDEX_V(p_phase, VS::MAX_PARTICLE_COLOR_PHASES, -1.0);
-
- const Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, -1);
- return particles->data.color_phases[p_phase].pos;
-}
-
-void RasterizerGLES2::particles_set_color_phase_color(RID p_particles, int p_phase, const Color &p_color) {
-
- ERR_FAIL_INDEX(p_phase, VS::MAX_PARTICLE_COLOR_PHASES);
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
- particles->data.color_phases[p_phase].color = p_color;
-
- //update alpha
- particles->has_alpha = false;
- for (int i = 0; i < VS::MAX_PARTICLE_COLOR_PHASES; i++) {
- if (particles->data.color_phases[i].color.a < 0.99)
- particles->has_alpha = true;
- }
-}
-
-Color RasterizerGLES2::particles_get_color_phase_color(RID p_particles, int p_phase) const {
-
- ERR_FAIL_INDEX_V(p_phase, VS::MAX_PARTICLE_COLOR_PHASES, Color());
-
- const Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, Color());
- return particles->data.color_phases[p_phase].color;
-}
-
-void RasterizerGLES2::particles_set_attractors(RID p_particles, int p_attractors) {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
- ERR_FAIL_COND(p_attractors < 0 || p_attractors > VisualServer::MAX_PARTICLE_ATTRACTORS);
- particles->data.attractor_count = p_attractors;
-}
-int RasterizerGLES2::particles_get_attractors(RID p_particles) const {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, -1);
- return particles->data.attractor_count;
-}
-
-void RasterizerGLES2::particles_set_attractor_pos(RID p_particles, int p_attractor, const Vector3 &p_pos) {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
- ERR_FAIL_INDEX(p_attractor, particles->data.attractor_count);
- particles->data.attractors[p_attractor].pos = p_pos;
-}
-Vector3 RasterizerGLES2::particles_get_attractor_pos(RID p_particles, int p_attractor) const {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, Vector3());
- ERR_FAIL_INDEX_V(p_attractor, particles->data.attractor_count, Vector3());
- return particles->data.attractors[p_attractor].pos;
-}
-
-void RasterizerGLES2::particles_set_attractor_strength(RID p_particles, int p_attractor, float p_force) {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
- ERR_FAIL_INDEX(p_attractor, particles->data.attractor_count);
- particles->data.attractors[p_attractor].force = p_force;
-}
-
-float RasterizerGLES2::particles_get_attractor_strength(RID p_particles, int p_attractor) const {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, 0);
- ERR_FAIL_INDEX_V(p_attractor, particles->data.attractor_count, 0);
- return particles->data.attractors[p_attractor].force;
-}
-
-void RasterizerGLES2::particles_set_material(RID p_particles, RID p_material, bool p_owned) {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
- if (particles->material_owned && particles->material.is_valid())
- free(particles->material);
-
- particles->material_owned = p_owned;
-
- particles->material = p_material;
-}
-RID RasterizerGLES2::particles_get_material(RID p_particles) const {
-
- const Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, RID());
- return particles->material;
-}
-
-void RasterizerGLES2::particles_set_use_local_coordinates(RID p_particles, bool p_enable) {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
- particles->data.local_coordinates = p_enable;
-}
-
-bool RasterizerGLES2::particles_is_using_local_coordinates(RID p_particles) const {
-
- const Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, false);
- return particles->data.local_coordinates;
-}
-bool RasterizerGLES2::particles_has_height_from_velocity(RID p_particles) const {
-
- const Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, false);
- return particles->data.height_from_velocity;
-}
-
-void RasterizerGLES2::particles_set_height_from_velocity(RID p_particles, bool p_enable) {
-
- Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND(!particles);
- particles->data.height_from_velocity = p_enable;
-}
-
-AABB RasterizerGLES2::particles_get_aabb(RID p_particles) const {
-
- const Particles *particles = particles_owner.get(p_particles);
- ERR_FAIL_COND_V(!particles, AABB());
- return particles->data.visibility_aabb;
-}
-
-/* SKELETON API */
-
-RID RasterizerGLES2::skeleton_create() {
-
- Skeleton *skeleton = memnew(Skeleton);
- ERR_FAIL_COND_V(!skeleton, RID());
- return skeleton_owner.make_rid(skeleton);
-}
-void RasterizerGLES2::skeleton_resize(RID p_skeleton, int p_bones) {
-
- Skeleton *skeleton = skeleton_owner.get(p_skeleton);
- ERR_FAIL_COND(!skeleton);
- if (p_bones == skeleton->bones.size()) {
- return;
- };
- if (use_hw_skeleton_xform) {
-
- if (next_power_of_2(p_bones) != next_power_of_2(skeleton->bones.size())) {
- if (skeleton->tex_id) {
- glDeleteTextures(1, &skeleton->tex_id);
- skeleton->tex_id = 0;
- }
-
- if (p_bones) {
-
- glGenTextures(1, &skeleton->tex_id);
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, skeleton->tex_id);
- int ps = next_power_of_2(p_bones * 3);
-#ifdef GLEW_ENABLED
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, ps, 1, 0, GL_RGBA, GL_FLOAT, skel_default.ptr());
-#else
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, ps, 1, 0, GL_RGBA, GL_FLOAT, skel_default.ptr());
-#endif
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- skeleton->pixel_size = 1.0 / ps;
-
- glBindTexture(GL_TEXTURE_2D, 0);
- }
- }
-
- if (!skeleton->dirty_list.in_list()) {
- _skeleton_dirty_list.add(&skeleton->dirty_list);
- }
- }
- skeleton->bones.resize(p_bones);
-}
-int RasterizerGLES2::skeleton_get_bone_count(RID p_skeleton) const {
-
- Skeleton *skeleton = skeleton_owner.get(p_skeleton);
- ERR_FAIL_COND_V(!skeleton, -1);
- return skeleton->bones.size();
-}
-void RasterizerGLES2::skeleton_bone_set_transform(RID p_skeleton, int p_bone, const Transform &p_transform) {
-
- Skeleton *skeleton = skeleton_owner.get(p_skeleton);
- ERR_FAIL_COND(!skeleton);
- ERR_FAIL_INDEX(p_bone, skeleton->bones.size());
-
- Skeleton::Bone &b = skeleton->bones[p_bone];
-
- b.mtx[0][0] = p_transform.basis[0][0];
- b.mtx[0][1] = p_transform.basis[1][0];
- b.mtx[0][2] = p_transform.basis[2][0];
- b.mtx[1][0] = p_transform.basis[0][1];
- b.mtx[1][1] = p_transform.basis[1][1];
- b.mtx[1][2] = p_transform.basis[2][1];
- b.mtx[2][0] = p_transform.basis[0][2];
- b.mtx[2][1] = p_transform.basis[1][2];
- b.mtx[2][2] = p_transform.basis[2][2];
- b.mtx[3][0] = p_transform.origin[0];
- b.mtx[3][1] = p_transform.origin[1];
- b.mtx[3][2] = p_transform.origin[2];
-
- if (skeleton->tex_id) {
- if (!skeleton->dirty_list.in_list()) {
- _skeleton_dirty_list.add(&skeleton->dirty_list);
- }
- }
-}
-
-Transform RasterizerGLES2::skeleton_bone_get_transform(RID p_skeleton, int p_bone) {
-
- Skeleton *skeleton = skeleton_owner.get(p_skeleton);
- ERR_FAIL_COND_V(!skeleton, Transform());
- ERR_FAIL_INDEX_V(p_bone, skeleton->bones.size(), Transform());
-
- const Skeleton::Bone &b = skeleton->bones[p_bone];
-
- Transform t;
- t.basis[0][0] = b.mtx[0][0];
- t.basis[1][0] = b.mtx[0][1];
- t.basis[2][0] = b.mtx[0][2];
- t.basis[0][1] = b.mtx[1][0];
- t.basis[1][1] = b.mtx[1][1];
- t.basis[2][1] = b.mtx[1][2];
- t.basis[0][2] = b.mtx[2][0];
- t.basis[1][2] = b.mtx[2][1];
- t.basis[2][2] = b.mtx[2][2];
- t.origin[0] = b.mtx[3][0];
- t.origin[1] = b.mtx[3][1];
- t.origin[2] = b.mtx[3][2];
-
- return t;
-}
-
-/* LIGHT API */
-
-RID RasterizerGLES2::light_create(VS::LightType p_type) {
-
- Light *light = memnew(Light);
- light->type = p_type;
- return light_owner.make_rid(light);
-}
-
-VS::LightType RasterizerGLES2::light_get_type(RID p_light) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, VS::LIGHT_OMNI);
- return light->type;
-}
-
-void RasterizerGLES2::light_set_color(RID p_light, VS::LightColor p_type, const Color &p_color) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
- ERR_FAIL_INDEX(p_type, 3);
- light->colors[p_type] = p_color;
-}
-Color RasterizerGLES2::light_get_color(RID p_light, VS::LightColor p_type) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, Color());
- ERR_FAIL_INDEX_V(p_type, 3, Color());
- return light->colors[p_type];
-}
-
-void RasterizerGLES2::light_set_shadow(RID p_light, bool p_enabled) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
- light->shadow_enabled = p_enabled;
-}
-
-bool RasterizerGLES2::light_has_shadow(RID p_light) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, false);
- return light->shadow_enabled;
-}
-
-void RasterizerGLES2::light_set_volumetric(RID p_light, bool p_enabled) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
- light->volumetric_enabled = p_enabled;
-}
-bool RasterizerGLES2::light_is_volumetric(RID p_light) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, false);
- return light->volumetric_enabled;
-}
-
-void RasterizerGLES2::light_set_projector(RID p_light, RID p_texture) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
- light->projector = p_texture;
-}
-RID RasterizerGLES2::light_get_projector(RID p_light) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, RID());
- return light->projector;
-}
-
-void RasterizerGLES2::light_set_var(RID p_light, VS::LightParam p_var, float p_value) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
- ERR_FAIL_INDEX(p_var, VS::LIGHT_PARAM_MAX);
-
- light->vars[p_var] = p_value;
-}
-float RasterizerGLES2::light_get_var(RID p_light, VS::LightParam p_var) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, 0);
-
- ERR_FAIL_INDEX_V(p_var, VS::LIGHT_PARAM_MAX, 0);
-
- return light->vars[p_var];
-}
-
-void RasterizerGLES2::light_set_operator(RID p_light, VS::LightOp p_op){
-
-};
-
-VS::LightOp RasterizerGLES2::light_get_operator(RID p_light) const {
-
- return VS::LightOp();
-};
-
-void RasterizerGLES2::light_omni_set_shadow_mode(RID p_light, VS::LightOmniShadowMode p_mode) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
-
- light->omni_shadow_mode = p_mode;
-}
-VS::LightOmniShadowMode RasterizerGLES2::light_omni_get_shadow_mode(RID p_light) const {
-
- const Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, VS::LIGHT_OMNI_SHADOW_DEFAULT);
-
- return light->omni_shadow_mode;
-}
-
-void RasterizerGLES2::light_directional_set_shadow_mode(RID p_light, VS::LightDirectionalShadowMode p_mode) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
-
- light->directional_shadow_mode = p_mode;
-}
-
-VS::LightDirectionalShadowMode RasterizerGLES2::light_directional_get_shadow_mode(RID p_light) const {
-
- const Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, VS::LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL);
-
- return light->directional_shadow_mode;
-}
-
-void RasterizerGLES2::light_directional_set_shadow_param(RID p_light, VS::LightDirectionalShadowParam p_param, float p_value) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND(!light);
-
- light->directional_shadow_param[p_param] = p_value;
-}
-
-float RasterizerGLES2::light_directional_get_shadow_param(RID p_light, VS::LightDirectionalShadowParam p_param) const {
-
- const Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, 0);
- return light->directional_shadow_param[p_param];
-}
-
-AABB RasterizerGLES2::light_get_aabb(RID p_light) const {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, AABB());
-
- switch (light->type) {
-
- case VS::LIGHT_SPOT: {
-
- float len = light->vars[VS::LIGHT_PARAM_RADIUS];
- float size = Math::tan(Math::deg2rad(light->vars[VS::LIGHT_PARAM_SPOT_ANGLE])) * len;
- return AABB(Vector3(-size, -size, -len), Vector3(size * 2, size * 2, len));
- } break;
- case VS::LIGHT_OMNI: {
-
- float r = light->vars[VS::LIGHT_PARAM_RADIUS];
- return AABB(-Vector3(r, r, r), Vector3(r, r, r) * 2);
- } break;
- case VS::LIGHT_DIRECTIONAL: {
-
- return AABB();
- } break;
- default: {}
- }
-
- ERR_FAIL_V(AABB());
-}
-
-RID RasterizerGLES2::light_instance_create(RID p_light) {
-
- Light *light = light_owner.get(p_light);
- ERR_FAIL_COND_V(!light, RID());
-
- LightInstance *light_instance = memnew(LightInstance);
-
- light_instance->light = p_light;
- light_instance->base = light;
- light_instance->last_pass = 0;
-
- return light_instance_owner.make_rid(light_instance);
-}
-void RasterizerGLES2::light_instance_set_transform(RID p_light_instance, const Transform &p_transform) {
-
- LightInstance *lighti = light_instance_owner.get(p_light_instance);
- ERR_FAIL_COND(!lighti);
- lighti->transform = p_transform;
-}
-
-Rasterizer::ShadowType RasterizerGLES2::light_instance_get_shadow_type(RID p_light_instance, bool p_far) const {
-
- LightInstance *lighti = light_instance_owner.get(p_light_instance);
- ERR_FAIL_COND_V(!lighti, Rasterizer::SHADOW_NONE);
-
- switch (lighti->base->type) {
-
- case VS::LIGHT_DIRECTIONAL: {
- switch (lighti->base->directional_shadow_mode) {
- case VS::LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL: {
- return SHADOW_ORTHOGONAL;
- } break;
- case VS::LIGHT_DIRECTIONAL_SHADOW_PERSPECTIVE: {
- return SHADOW_PSM;
- } break;
- case VS::LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS:
- case VS::LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS: {
- return SHADOW_PSSM;
- } break;
- }
-
- } break;
- case VS::LIGHT_OMNI: return SHADOW_DUAL_PARABOLOID; break;
- case VS::LIGHT_SPOT: return SHADOW_SIMPLE; break;
- }
-
- return Rasterizer::SHADOW_NONE;
-}
-
-int RasterizerGLES2::light_instance_get_shadow_passes(RID p_light_instance) const {
-
- LightInstance *lighti = light_instance_owner.get(p_light_instance);
- ERR_FAIL_COND_V(!lighti, 0);
-
- if (lighti->base->type == VS::LIGHT_DIRECTIONAL && lighti->base->directional_shadow_mode == VS::LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS) {
-
- return 4; // dp4
- } else if (lighti->base->type == VS::LIGHT_OMNI || (lighti->base->type == VS::LIGHT_DIRECTIONAL && lighti->base->directional_shadow_mode == VS::LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS)) {
- return 2; // dp
- } else
- return 1;
-}
-
-bool RasterizerGLES2::light_instance_get_pssm_shadow_overlap(RID p_light_instance) const {
-
- return shadow_filter >= SHADOW_FILTER_ESM;
-}
-
-void RasterizerGLES2::light_instance_set_shadow_transform(RID p_light_instance, int p_index, const CameraMatrix &p_camera, const Transform &p_transform, float p_split_near, float p_split_far) {
-
- LightInstance *lighti = light_instance_owner.get(p_light_instance);
- ERR_FAIL_COND(!lighti);
-
- ERR_FAIL_COND(lighti->base->type != VS::LIGHT_DIRECTIONAL);
- //ERR_FAIL_INDEX(p_index,1);
-
- lighti->custom_projection[p_index] = p_camera;
- lighti->custom_transform[p_index] = p_transform;
- lighti->shadow_split[p_index] = 1.0 / p_split_far;
-#if 0
- if (p_index==0) {
- lighti->custom_projection=p_camera;
- lighti->custom_transform=p_transform;
- //Plane p(0,0,-p_split_far,1);
- //p=camera_projection.xform4(p);
- //lighti->shadow_split=p.normal.z/p.d;
- lighti->shadow_split=1.0/p_split_far;
-
- //lighti->shadow_split=-p_split_far;
- } else {
-
- lighti->custom_projection2=p_camera;
- lighti->custom_transform2=p_transform;
- lighti->shadow_split2=p_split_far;
-
- }
-#endif
-}
-
-int RasterizerGLES2::light_instance_get_shadow_size(RID p_light_instance, int p_index) const {
-
- LightInstance *lighti = light_instance_owner.get(p_light_instance);
- ERR_FAIL_COND_V(!lighti, 1);
- ERR_FAIL_COND_V(!lighti->near_shadow_buffer, 256);
- return lighti->near_shadow_buffer->size / 2;
-}
-
-void RasterizerGLES2::shadow_clear_near() {
-
- for (int i = 0; i < near_shadow_buffers.size(); i++) {
-
- if (near_shadow_buffers[i].owner)
- near_shadow_buffers[i].owner->clear_near_shadow_buffers();
- }
-}
-
-bool RasterizerGLES2::shadow_allocate_near(RID p_light) {
-
- if (!use_shadow_mapping || !use_framebuffers)
- return false;
-
- LightInstance *li = light_instance_owner.get(p_light);
- ERR_FAIL_COND_V(!li, false);
- ERR_FAIL_COND_V(li->near_shadow_buffer, false);
-
- int skip = 0;
- if (framebuffer.active) {
-
- int sc = framebuffer.scale;
- while (sc > 1) {
- sc /= 2;
- skip++;
- }
- }
-
- for (int i = 0; i < near_shadow_buffers.size(); i++) {
-
- if (skip > 0) {
- skip--;
- continue;
- }
-
- if (near_shadow_buffers[i].owner != NULL)
- continue;
-
- near_shadow_buffers[i].owner = li;
- li->near_shadow_buffer = &near_shadow_buffers[i];
- return true;
- }
-
- return false;
-}
-
-bool RasterizerGLES2::shadow_allocate_far(RID p_light) {
-
- return false;
-}
-
-/* PARTICLES INSTANCE */
-
-RID RasterizerGLES2::particles_instance_create(RID p_particles) {
-
- ERR_FAIL_COND_V(!particles_owner.owns(p_particles), RID());
- ParticlesInstance *particles_instance = memnew(ParticlesInstance);
- ERR_FAIL_COND_V(!particles_instance, RID());
- particles_instance->particles = p_particles;
- return particles_instance_owner.make_rid(particles_instance);
-}
-
-void RasterizerGLES2::particles_instance_set_transform(RID p_particles_instance, const Transform &p_transform) {
-
- ParticlesInstance *particles_instance = particles_instance_owner.get(p_particles_instance);
- ERR_FAIL_COND(!particles_instance);
- particles_instance->transform = p_transform;
-}
-
-RID RasterizerGLES2::viewport_data_create() {
-
- ViewportData *vd = memnew(ViewportData);
-
- glActiveTexture(GL_TEXTURE0);
- glGenFramebuffers(1, &vd->lum_fbo);
- glBindFramebuffer(GL_FRAMEBUFFER, vd->lum_fbo);
-
- GLuint format_luminance = use_fp16_fb ? _GL_RG_EXT : GL_RGBA;
- GLuint format_luminance_type = use_fp16_fb ? (full_float_fb_supported ? GL_FLOAT : _GL_HALF_FLOAT_OES) : GL_UNSIGNED_BYTE;
- GLuint format_luminance_components = use_fp16_fb ? _GL_RG_EXT : GL_RGBA;
-
- glGenTextures(1, &vd->lum_color);
- glBindTexture(GL_TEXTURE_2D, vd->lum_color);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- /*
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- */
- glTexImage2D(GL_TEXTURE_2D, 0, format_luminance, 1, 1, 0,
- format_luminance_components, format_luminance_type, NULL);
-
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
- GL_TEXTURE_2D, vd->lum_color, 0);
-
- GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
-
- glBindFramebuffer(GL_FRAMEBUFFER, base_framebuffer);
- DEBUG_TEST_ERROR("Viewport Data Init");
- if (status != GL_FRAMEBUFFER_COMPLETE) {
- WARN_PRINT("Can't create framebuffer for vd");
- }
-
- return viewport_data_owner.make_rid(vd);
-}
-
-RID RasterizerGLES2::render_target_create() {
-
- RenderTarget *rt = memnew(RenderTarget);
- rt->fbo = 0;
- rt->width = 0;
- rt->height = 0;
- rt->last_pass = 0;
-
- Texture *texture = memnew(Texture);
- texture->active = false;
- texture->total_data_size = 0;
- texture->render_target = rt;
- texture->ignore_mipmaps = true;
- rt->texture_ptr = texture;
- rt->texture = texture_owner.make_rid(texture);
- rt->texture_ptr->active = false;
- return render_target_owner.make_rid(rt);
-}
-void RasterizerGLES2::render_target_set_size(RID p_render_target, int p_width, int p_height) {
-
- RenderTarget *rt = render_target_owner.get(p_render_target);
-
- if (p_width == rt->width && p_height == rt->height)
- return;
-
- if (rt->width != 0 && rt->height != 0) {
-
- glDeleteFramebuffers(1, &rt->fbo);
- glDeleteRenderbuffers(1, &rt->depth);
- glDeleteTextures(1, &rt->color);
-
- rt->fbo = 0;
- rt->depth = 0;
- rt->color = 0;
- rt->width = 0;
- rt->height = 0;
- rt->texture_ptr->tex_id = 0;
- rt->texture_ptr->active = false;
- }
-
- if (p_width == 0 || p_height == 0)
- return;
-
- rt->width = p_width;
- rt->height = p_height;
-
- //fbo
- glGenFramebuffers(1, &rt->fbo);
- glBindFramebuffer(GL_FRAMEBUFFER, rt->fbo);
-
- //depth
- if (!low_memory_2d) {
- glGenRenderbuffers(1, &rt->depth);
- glBindRenderbuffer(GL_RENDERBUFFER, rt->depth);
-
- glRenderbufferStorage(GL_RENDERBUFFER, use_depth24 ? _DEPTH_COMPONENT24_OES : GL_DEPTH_COMPONENT16, rt->width, rt->height);
-
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rt->depth);
- }
-
- //color
- glGenTextures(1, &rt->color);
- glBindTexture(GL_TEXTURE_2D, rt->color);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, rt->width, rt->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-
- if (rt->texture_ptr->flags & VS::TEXTURE_FLAG_FILTER) {
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- } else {
-
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- }
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, rt->color, 0);
-
- rt->texture_ptr->tex_id = rt->color;
- rt->texture_ptr->active = true;
- rt->texture_ptr->width = p_width;
- rt->texture_ptr->height = p_height;
-
-#
- GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
-
- if (status != GL_FRAMEBUFFER_COMPLETE) {
-
- glDeleteRenderbuffers(1, &rt->fbo);
- glDeleteTextures(1, &rt->depth);
- glDeleteTextures(1, &rt->color);
- rt->fbo = 0;
- rt->width = 0;
- rt->height = 0;
- rt->color = 0;
- rt->depth = 0;
- rt->texture_ptr->tex_id = 0;
- rt->texture_ptr->active = false;
- WARN_PRINT("Could not create framebuffer!!");
- }
-
- glBindFramebuffer(GL_FRAMEBUFFER, base_framebuffer);
-}
-
-RID RasterizerGLES2::render_target_get_texture(RID p_render_target) const {
-
- const RenderTarget *rt = render_target_owner.get(p_render_target);
- ERR_FAIL_COND_V(!rt, RID());
- return rt->texture;
-}
-bool RasterizerGLES2::render_target_renedered_in_frame(RID p_render_target) {
-
- RenderTarget *rt = render_target_owner.get(p_render_target);
- ERR_FAIL_COND_V(!rt, false);
- return rt->last_pass == frame;
-}
-
-/* RENDER API */
-/* all calls (inside begin/end shadow) are always warranted to be in the following order: */
-
-void RasterizerGLES2::begin_frame() {
-
- _update_framebuffer();
-
- glDepthFunc(GL_LEQUAL);
- glFrontFace(GL_CW);
-
-//fragment_lighting=Globals::get_singleton()->get("rasterizer/use_fragment_lighting");
-#ifdef TOOLS_ENABLED
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_PIXEL_SNAP, GLOBAL_DEF("rendering/use_2d_pixel_snap", false));
- shadow_filter = ShadowFilterTechnique(int(ProjectSettings::get_singleton()->get("rasterizer/shadow_filter")));
-#endif
-
- canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_PCF5, shadow_filter == SHADOW_FILTER_PCF5);
- canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_PCF13, shadow_filter == SHADOW_FILTER_PCF13);
- canvas_shader.set_conditional(CanvasShaderGLES2::SHADOW_ESM, shadow_filter == SHADOW_FILTER_ESM);
-
- window_size = Size2(OS::get_singleton()->get_video_mode().width, OS::get_singleton()->get_video_mode().height);
-
- double time = (OS::get_singleton()->get_ticks_usec() / 1000); // get msec
- time /= 1000.0; // make secs
- time_delta = time - last_time;
- last_time = time;
- frame++;
-
- _rinfo.vertex_count = 0;
- _rinfo.object_count = 0;
- _rinfo.mat_change_count = 0;
- _rinfo.shader_change_count = 0;
- _rinfo.ci_draw_commands = 0;
- _rinfo.surface_count = 0;
- _rinfo.draw_calls = 0;
-
- _update_fixed_materials();
- while (_shader_dirty_list.first()) {
-
- _update_shader(_shader_dirty_list.first()->self());
- }
-
- while (_skeleton_dirty_list.first()) {
-
- Skeleton *s = _skeleton_dirty_list.first()->self();
-
- float *sk_float = (float *)skinned_buffer;
- for (int i = 0; i < s->bones.size(); i++) {
-
- float *m = &sk_float[i * 12];
- const Skeleton::Bone &b = s->bones[i];
- m[0] = b.mtx[0][0];
- m[1] = b.mtx[1][0];
- m[2] = b.mtx[2][0];
- m[3] = b.mtx[3][0];
-
- m[4] = b.mtx[0][1];
- m[5] = b.mtx[1][1];
- m[6] = b.mtx[2][1];
- m[7] = b.mtx[3][1];
-
- m[8] = b.mtx[0][2];
- m[9] = b.mtx[1][2];
- m[10] = b.mtx[2][2];
- m[11] = b.mtx[3][2];
- }
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, s->tex_id);
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, next_power_of_2(s->bones.size() * 3), 1, GL_RGBA, GL_FLOAT, sk_float);
- _skeleton_dirty_list.remove(_skeleton_dirty_list.first());
- }
-
- while (_multimesh_dirty_list.first()) {
-
- MultiMesh *s = _multimesh_dirty_list.first()->self();
-
- float *sk_float = (float *)skinned_buffer;
- for (int i = 0; i < s->elements.size(); i++) {
-
- float *m = &sk_float[i * 16];
- const float *im = s->elements[i].matrix;
- for (int j = 0; j < 16; j++) {
- m[j] = im[j];
- }
- }
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, s->tex_id);
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, s->tw, s->th, GL_RGBA, GL_FLOAT, sk_float);
- _multimesh_dirty_list.remove(_multimesh_dirty_list.first());
- }
-
- draw_next_frame = false;
- //material_shader.set_uniform_default(MaterialShaderGLES2::SCREENZ_SCALE, Math::fmod(time, 3600.0));
- /* nehe ?*/
-
- //glClearColor(0,0,1,1);
- //glClear(GL_COLOR_BUFFER_BIT); //should not clear if anything else cleared..
-}
-
-void RasterizerGLES2::capture_viewport(Image *r_capture) {
-#if 0
- PoolVector<uint8_t> pixels;
- pixels.resize(viewport.width*viewport.height*3);
- PoolVector<uint8_t>::Write w = pixels.write();
-#ifdef GLEW_ENABLED
- glReadBuffer(GL_COLOR_ATTACHMENT0);
-#endif
- glPixelStorei(GL_PACK_ALIGNMENT, 1);
- if (current_rt)
- glReadPixels( 0, 0, viewport.width, viewport.height,GL_RGB,GL_UNSIGNED_BYTE,w.ptr() );
- else
- glReadPixels( viewport.x, window_size.height-(viewport.height+viewport.y), viewport.width,viewport.height,GL_RGB,GL_UNSIGNED_BYTE,w.ptr());
-
- glPixelStorei(GL_PACK_ALIGNMENT, 4);
-
- w=PoolVector<uint8_t>::Write();
-
- r_capture->create(viewport.width,viewport.height,0,Image::FORMAT_RGB8,pixels);
-#else
-
- PoolVector<uint8_t> pixels;
- pixels.resize(viewport.width * viewport.height * 4);
- PoolVector<uint8_t>::Write w = pixels.write();
- glPixelStorei(GL_PACK_ALIGNMENT, 4);
-
- //uint64_t time = OS::get_singleton()->get_ticks_usec();
-
- if (current_rt) {
-#ifdef GLEW_ENABLED
- glReadBuffer(GL_COLOR_ATTACHMENT0);
-#endif
- glReadPixels(0, 0, viewport.width, viewport.height, GL_RGBA, GL_UNSIGNED_BYTE, w.ptr());
- } else {
- // back?
- glReadPixels(viewport.x, window_size.height - (viewport.height + viewport.y), viewport.width, viewport.height, GL_RGBA, GL_UNSIGNED_BYTE, w.ptr());
- }
-
- bool flip = current_rt == NULL;
-
- if (flip) {
- uint32_t *imgptr = (uint32_t *)w.ptr();
- for (int y = 0; y < (viewport.height / 2); y++) {
-
- uint32_t *ptr1 = &imgptr[y * viewport.width];
- uint32_t *ptr2 = &imgptr[(viewport.height - y - 1) * viewport.width];
-
- for (int x = 0; x < viewport.width; x++) {
-
- uint32_t tmp = ptr1[x];
- ptr1[x] = ptr2[x];
- ptr2[x] = tmp;
- }
- }
- }
-
- w = PoolVector<uint8_t>::Write();
- r_capture->create(viewport.width, viewport.height, 0, Image::FORMAT_RGBA8, pixels);
-//r_capture->flip_y();
-
-#endif
-}
-
-void RasterizerGLES2::clear_viewport(const Color &p_color) {
-
- if (current_rt || using_canvas_bg) {
-
- glScissor(0, 0, viewport.width, viewport.height);
- } else {
- glScissor(viewport.x, window_size.height - (viewport.height + viewport.y), viewport.width, viewport.height);
- }
-
- glEnable(GL_SCISSOR_TEST);
- glClearColor(p_color.r, p_color.g, p_color.b, p_color.a);
- glClear(GL_COLOR_BUFFER_BIT); //should not clear if anything else cleared..
- glDisable(GL_SCISSOR_TEST);
-};
-
-void RasterizerGLES2::set_render_target(RID p_render_target, bool p_transparent_bg, bool p_vflip) {
-
- if (!p_render_target.is_valid()) {
- glBindFramebuffer(GL_FRAMEBUFFER, base_framebuffer);
- current_rt = NULL;
- current_rt_vflip = false;
-
- } else {
- RenderTarget *rt = render_target_owner.get(p_render_target);
- ERR_FAIL_COND(!rt);
- ERR_FAIL_COND(rt->fbo == 0);
- glBindFramebuffer(GL_FRAMEBUFFER, rt->fbo);
- current_rt = rt;
- current_rt_transparent = p_transparent_bg;
- current_rt_vflip = !p_vflip;
- }
-}
-
-void RasterizerGLES2::set_viewport(const VS::ViewportRect &p_viewport) {
-
- viewport = p_viewport;
- //viewport.width/=2;
- //viewport.height/=2;
- //print_line("viewport: "+itos(p_viewport.x)+","+itos(p_viewport.y)+","+itos(p_viewport.width)+","+itos(p_viewport.height));
-
- if (current_rt) {
-
- glViewport(0, 0, viewport.width, viewport.height);
- } else {
- glViewport(viewport.x, window_size.height - (viewport.height + viewport.y), viewport.width, viewport.height);
- }
-}
-
-void RasterizerGLES2::begin_scene(RID p_viewport_data, RID p_env, VS::ScenarioDebugMode p_debug) {
-
- current_debug = p_debug;
- opaque_render_list.clear();
- alpha_render_list.clear();
- light_instance_count = 0;
- current_env = p_env.is_valid() ? environment_owner.get(p_env) : NULL;
- scene_pass++;
- last_light_id = 0;
- directional_light_count = 0;
- lights_use_shadow = false;
- texscreen_used = false;
- current_vd = viewport_data_owner.get(p_viewport_data);
- if (current_debug == VS::SCENARIO_DEBUG_WIREFRAME) {
-#ifdef GLEW_ENABLED
- glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
-#endif
- }
-
- //set state
-
- glCullFace(GL_FRONT);
- cull_front = true;
-};
-
-void RasterizerGLES2::begin_shadow_map(RID p_light_instance, int p_shadow_pass) {
-
- ERR_FAIL_COND(shadow);
- shadow = light_instance_owner.get(p_light_instance);
- shadow_pass = p_shadow_pass;
- ERR_FAIL_COND(!shadow);
-
- opaque_render_list.clear();
- alpha_render_list.clear();
- //pre_zpass_render_list.clear();
- light_instance_count = 0;
-
- glCullFace(GL_FRONT);
- cull_front = true;
-}
-
-void RasterizerGLES2::set_camera(const Transform &p_world, const CameraMatrix &p_projection, bool p_ortho_hint) {
-
- camera_transform = p_world;
- if (current_rt && current_rt_vflip) {
- camera_transform.basis.set_axis(1, -camera_transform.basis.get_axis(1));
- }
- camera_transform_inverse = camera_transform.inverse();
- camera_projection = p_projection;
- camera_plane = Plane(camera_transform.origin, -camera_transform.basis.get_axis(2));
- camera_z_near = camera_projection.get_z_near();
- camera_z_far = camera_projection.get_z_far();
- camera_projection.get_viewport_size(camera_vp_size.x, camera_vp_size.y);
- camera_ortho = p_ortho_hint;
-}
-
-void RasterizerGLES2::add_light(RID p_light_instance) {
-
-#define LIGHT_FADE_THRESHOLD 0.05
-
- ERR_FAIL_COND(light_instance_count >= MAX_SCENE_LIGHTS);
-
- LightInstance *li = light_instance_owner.get(p_light_instance);
- ERR_FAIL_COND(!li);
-
- switch (li->base->type) {
-
- case VS::LIGHT_DIRECTIONAL: {
-
- ERR_FAIL_COND(directional_light_count >= RenderList::MAX_LIGHTS);
- directional_lights[directional_light_count++] = li;
-
- if (li->base->shadow_enabled) {
- CameraMatrix bias;
- bias.set_light_bias();
-
- int passes = light_instance_get_shadow_passes(p_light_instance);
-
- for (int i = 0; i < passes; i++) {
- Transform modelview = Transform(camera_transform_inverse * li->custom_transform[i]).inverse();
- li->shadow_projection[i] = bias * li->custom_projection[i] * modelview;
- }
-
- lights_use_shadow = true;
- }
- } break;
- case VS::LIGHT_OMNI: {
-
- if (li->base->shadow_enabled) {
- li->shadow_projection[0] = Transform(camera_transform_inverse * li->transform).inverse();
- lights_use_shadow = true;
- }
- } break;
- case VS::LIGHT_SPOT: {
-
- if (li->base->shadow_enabled) {
- CameraMatrix bias;
- bias.set_light_bias();
- Transform modelview = Transform(camera_transform_inverse * li->transform).inverse();
- li->shadow_projection[0] = bias * li->projection * modelview;
- lights_use_shadow = true;
- }
- } break;
- }
-
- /* make light hash */
-
- // actually, not really a hash, but helps to sort the lights
- // and avoid recompiling redudant shader versions
-
- li->last_pass = scene_pass;
- li->sort_key = light_instance_count;
-
- light_instances[light_instance_count++] = li;
-}
-
-void RasterizerGLES2::_update_shader(Shader *p_shader) const {
-
- _shader_dirty_list.remove(&p_shader->dirty_list);
-
- p_shader->valid = false;
-
- p_shader->uniforms.clear();
- Vector<StringName> uniform_names;
-
- String vertex_code;
- String vertex_globals;
- ShaderCompilerGLES2::Flags vertex_flags;
- ShaderCompilerGLES2::Flags fragment_flags;
- ShaderCompilerGLES2::Flags light_flags;
-
- if (p_shader->mode == VS::SHADER_MATERIAL) {
- Error err = shader_precompiler.compile(p_shader->vertex_code, ShaderLanguage::SHADER_MATERIAL_VERTEX, vertex_code, vertex_globals, vertex_flags, &p_shader->uniforms);
- if (err) {
- return; //invalid
- }
- } else if (p_shader->mode == VS::SHADER_CANVAS_ITEM) {
-
- Error err = shader_precompiler.compile(p_shader->vertex_code, ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX, vertex_code, vertex_globals, vertex_flags, &p_shader->uniforms);
- if (err) {
- return; //invalid
- }
- }
-
- //print_line("compiled vertex: "+vertex_code);
- //print_line("compiled vertex globals: "+vertex_globals);
-
- //print_line("UCV: "+itos(p_shader->uniforms.size()));
- String fragment_code;
- String fragment_globals;
-
- if (p_shader->mode == VS::SHADER_MATERIAL) {
- Error err = shader_precompiler.compile(p_shader->fragment_code, ShaderLanguage::SHADER_MATERIAL_FRAGMENT, fragment_code, fragment_globals, fragment_flags, &p_shader->uniforms);
- if (err) {
- return; //invalid
- }
- } else if (p_shader->mode == VS::SHADER_CANVAS_ITEM) {
- Error err = shader_precompiler.compile(p_shader->fragment_code, ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT, fragment_code, fragment_globals, fragment_flags, &p_shader->uniforms);
- if (err) {
- return; //invalid
- }
- }
-
- String light_code;
- String light_globals;
-
- if (p_shader->mode == VS::SHADER_MATERIAL) {
-
- Error err = shader_precompiler.compile(p_shader->light_code, (ShaderLanguage::SHADER_MATERIAL_LIGHT), light_code, light_globals, light_flags, &p_shader->uniforms);
- if (err) {
- return; //invalid
- }
- } else if (p_shader->mode == VS::SHADER_CANVAS_ITEM) {
- Error err = shader_precompiler.compile(p_shader->light_code, (ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT), light_code, light_globals, light_flags, &p_shader->uniforms);
- if (err) {
- return; //invalid
- }
- }
-
- fragment_globals += light_globals; //both fragment anyway
-
- //print_line("compiled fragment: "+fragment_code);
- //("compiled fragment globals: "+fragment_globals);
-
- //print_line("UCF: "+itos(p_shader->uniforms.size()));
-
- int first_tex_index = 0xFFFFF;
- p_shader->first_texture = StringName();
-
- for (Map<StringName, ShaderLanguage::Uniform>::Element *E = p_shader->uniforms.front(); E; E = E->next()) {
-
- uniform_names.push_back("_" + String(E->key()));
- if (E->get().type == ShaderLanguage::TYPE_TEXTURE && E->get().order < first_tex_index) {
- p_shader->first_texture = E->key();
- first_tex_index = E->get().order;
- }
- }
-
- bool uses_time = false;
-
- if (p_shader->mode == VS::SHADER_MATERIAL) {
- //print_line("setting code to id.. "+itos(p_shader->custom_code_id));
- Vector<const char *> enablers;
- if (fragment_flags.use_color_interp || vertex_flags.use_color_interp)
- enablers.push_back("#define ENABLE_COLOR_INTERP\n");
- if (fragment_flags.use_uv_interp || vertex_flags.use_uv_interp)
- enablers.push_back("#define ENABLE_UV_INTERP\n");
- if (fragment_flags.use_uv2_interp || vertex_flags.use_uv2_interp)
- enablers.push_back("#define ENABLE_UV2_INTERP\n");
- if (fragment_flags.use_tangent_interp || vertex_flags.use_tangent_interp || fragment_flags.uses_normalmap)
- enablers.push_back("#define ENABLE_TANGENT_INTERP\n");
- if (fragment_flags.use_var1_interp || vertex_flags.use_var1_interp)
- enablers.push_back("#define ENABLE_VAR1_INTERP\n");
- if (fragment_flags.use_var2_interp || vertex_flags.use_var2_interp)
- enablers.push_back("#define ENABLE_VAR2_INTERP\n");
- if (fragment_flags.uses_texscreen) {
- enablers.push_back("#define ENABLE_TEXSCREEN\n");
- }
- if (fragment_flags.uses_screen_uv) {
- enablers.push_back("#define ENABLE_SCREEN_UV\n");
- }
- if (fragment_flags.uses_discard) {
- enablers.push_back("#define ENABLE_DISCARD\n");
- }
- if (fragment_flags.uses_normalmap) {
- enablers.push_back("#define ENABLE_NORMALMAP\n");
- }
- if (light_flags.uses_light) {
- enablers.push_back("#define USE_LIGHT_SHADER_CODE\n");
- }
- if (light_flags.uses_shadow_color) {
- enablers.push_back("#define USE_OUTPUT_SHADOW_COLOR\n");
- }
- if (light_flags.uses_time || fragment_flags.uses_time || vertex_flags.uses_time) {
- enablers.push_back("#define USE_TIME\n");
- uses_time = true;
- }
- if (vertex_flags.vertex_code_writes_position) {
- enablers.push_back("#define VERTEX_SHADER_WRITE_POSITION\n");
- }
-
- material_shader.set_custom_shader_code(p_shader->custom_code_id, vertex_code, vertex_globals, fragment_code, light_code, fragment_globals, uniform_names, enablers);
- } else if (p_shader->mode == VS::SHADER_CANVAS_ITEM) {
-
- Vector<const char *> enablers;
-
- if (light_flags.uses_time || fragment_flags.uses_time || vertex_flags.uses_time) {
- enablers.push_back("#define USE_TIME\n");
- uses_time = true;
- }
- if (fragment_flags.uses_normal) {
- enablers.push_back("#define NORMAL_USED\n");
- }
- if (fragment_flags.uses_normalmap) {
- enablers.push_back("#define USE_NORMALMAP\n");
- }
-
- if (light_flags.uses_light) {
- enablers.push_back("#define USE_LIGHT_SHADER_CODE\n");
- }
- if (fragment_flags.use_var1_interp || vertex_flags.use_var1_interp)
- enablers.push_back("#define ENABLE_VAR1_INTERP\n");
- if (fragment_flags.use_var2_interp || vertex_flags.use_var2_interp)
- enablers.push_back("#define ENABLE_VAR2_INTERP\n");
- if (fragment_flags.uses_texscreen) {
- enablers.push_back("#define ENABLE_TEXSCREEN\n");
- }
- if (fragment_flags.uses_screen_uv) {
- enablers.push_back("#define ENABLE_SCREEN_UV\n");
- }
- if (fragment_flags.uses_texpixel_size) {
- enablers.push_back("#define USE_TEXPIXEL_SIZE\n");
- }
- if (light_flags.uses_shadow_color) {
- enablers.push_back("#define USE_OUTPUT_SHADOW_COLOR\n");
- }
-
- if (vertex_flags.uses_worldvec) {
- enablers.push_back("#define USE_WORLD_VEC\n");
- }
- canvas_shader.set_custom_shader_code(p_shader->custom_code_id, vertex_code, vertex_globals, fragment_code, light_code, fragment_globals, uniform_names, enablers);
-
- //postprocess_shader.set_custom_shader_code(p_shader->custom_code_id,vertex_code, vertex_globals,fragment_code, fragment_globals,uniform_names);
- }
-
- p_shader->valid = true;
- p_shader->has_alpha = fragment_flags.uses_alpha || fragment_flags.uses_texscreen;
- p_shader->writes_vertex = vertex_flags.vertex_code_writes_vertex;
- p_shader->uses_discard = fragment_flags.uses_discard;
- p_shader->has_texscreen = fragment_flags.uses_texscreen;
- p_shader->has_screen_uv = fragment_flags.uses_screen_uv;
- p_shader->can_zpass = !fragment_flags.uses_discard && !vertex_flags.vertex_code_writes_vertex;
- p_shader->uses_normal = fragment_flags.uses_normal || light_flags.uses_normal;
- p_shader->uses_time = uses_time;
- p_shader->uses_texpixel_size = fragment_flags.uses_texpixel_size;
- p_shader->version++;
-}
-
-void RasterizerGLES2::_add_geometry(const Geometry *p_geometry, const InstanceData *p_instance, const Geometry *p_geometry_cmp, const GeometryOwner *p_owner, int p_material) {
-
- Material *m = NULL;
- RID m_src = p_instance->material_override.is_valid() ? p_instance->material_override : (p_material >= 0 ? p_instance->materials[p_material] : p_geometry->material);
-
-#ifdef DEBUG_ENABLED
- if (current_debug == VS::SCENARIO_DEBUG_OVERDRAW) {
- m_src = overdraw_material;
- }
-
-#endif
-
- if (m_src)
- m = material_owner.get(m_src);
-
- if (!m) {
- m = material_owner.get(default_material);
- }
-
- ERR_FAIL_COND(!m);
-
- if (m->last_pass != frame) {
-
- if (m->shader.is_valid()) {
-
- m->shader_cache = shader_owner.get(m->shader);
- if (m->shader_cache) {
-
- if (!m->shader_cache->valid) {
- m->shader_cache = NULL;
- } else {
- if (m->shader_cache->has_texscreen)
- texscreen_used = true;
- }
- } else {
- m->shader = RID();
- }
-
- } else {
- m->shader_cache = NULL;
- }
-
- m->last_pass = frame;
- }
-
- RenderList *render_list = NULL;
-
- bool has_base_alpha = (m->shader_cache && m->shader_cache->has_alpha);
- bool has_blend_alpha = m->blend_mode != VS::MATERIAL_BLEND_MODE_MIX || m->flags[VS::MATERIAL_FLAG_ONTOP];
- bool has_alpha = has_base_alpha || has_blend_alpha;
-
- if (shadow) {
-
- if (has_blend_alpha || (has_base_alpha && m->depth_draw_mode != VS::MATERIAL_DEPTH_DRAW_OPAQUE_PRE_PASS_ALPHA))
- return; //bye
-
- if (!m->shader_cache || (!m->shader_cache->writes_vertex && !m->shader_cache->uses_discard && m->depth_draw_mode != VS::MATERIAL_DEPTH_DRAW_OPAQUE_PRE_PASS_ALPHA)) {
- //shader does not use discard and does not write a vertex position, use generic material
- if (p_instance->cast_shadows == VS::SHADOW_CASTING_SETTING_DOUBLE_SIDED)
- m = shadow_mat_double_sided_ptr;
- else
- m = shadow_mat_ptr;
- if (m->last_pass != frame) {
-
- if (m->shader.is_valid()) {
-
- m->shader_cache = shader_owner.get(m->shader);
- if (m->shader_cache) {
-
- if (!m->shader_cache->valid)
- m->shader_cache = NULL;
- } else {
- m->shader = RID();
- }
-
- } else {
- m->shader_cache = NULL;
- }
-
- m->last_pass = frame;
- }
- }
-
- render_list = &opaque_render_list;
- /* notyet
- if (!m->shader_cache || m->shader_cache->can_zpass)
- render_list = &alpha_render_list;
- } else {
- render_list = &opaque_render_list;
- }*/
-
- } else {
- if (has_alpha) {
- render_list = &alpha_render_list;
- } else {
- render_list = &opaque_render_list;
- }
- }
-
- RenderList::Element *e = render_list->add_element();
-
- if (!e)
- return;
-
- e->geometry = p_geometry;
- e->geometry_cmp = p_geometry_cmp;
- e->material = m;
- e->instance = p_instance;
- if (camera_ortho) {
- e->depth = camera_plane.distance_to(p_instance->transform.origin);
- } else {
- e->depth = camera_transform.origin.distance_to(p_instance->transform.origin);
- }
- e->owner = p_owner;
- e->light_type = 0;
- e->additive = false;
- e->additive_ptr = &e->additive;
- e->sort_flags = 0;
-
- if (p_instance->skeleton.is_valid()) {
- e->skeleton = skeleton_owner.get(p_instance->skeleton);
- if (!e->skeleton)
- const_cast<InstanceData *>(p_instance)->skeleton = RID();
- else
- e->sort_flags |= RenderList::SORT_FLAG_SKELETON;
- } else {
- e->skeleton = NULL;
- }
-
- if (e->geometry->type == Geometry::GEOMETRY_MULTISURFACE)
- e->sort_flags |= RenderList::SORT_FLAG_INSTANCING;
-
- e->mirror = p_instance->mirror;
- if (m->flags[VS::MATERIAL_FLAG_INVERT_FACES])
- e->mirror = !e->mirror;
-
- //e->light_type=0xFF; // no lights!
- e->light_type = 3; //light type 3 is no light?
- e->light = 0xFFFF;
-
- if (!shadow && !has_blend_alpha && has_alpha && m->depth_draw_mode == VS::MATERIAL_DEPTH_DRAW_OPAQUE_PRE_PASS_ALPHA) {
-
- //if nothing exists, add this element as opaque too
- RenderList::Element *oe = opaque_render_list.add_element();
-
- if (!oe)
- return;
-
- memcpy(oe, e, sizeof(RenderList::Element));
- oe->additive_ptr = &oe->additive;
- }
-
- if (shadow || m->flags[VS::MATERIAL_FLAG_UNSHADED] || current_debug == VS::SCENARIO_DEBUG_SHADELESS) {
-
- e->light_type = 0x7F; //unshaded is zero
- } else {
-
- bool duplicate = false;
-
- for (int i = 0; i < directional_light_count; i++) {
- uint16_t sort_key = directional_lights[i]->sort_key;
- uint8_t light_type = VS::LIGHT_DIRECTIONAL;
- if (directional_lights[i]->base->shadow_enabled) {
- light_type |= 0x8;
- if (directional_lights[i]->base->directional_shadow_mode == VS::LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS)
- light_type |= 0x10;
- else if (directional_lights[i]->base->directional_shadow_mode == VS::LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS)
- light_type |= 0x30;
- }
-
- RenderList::Element *ec;
- if (duplicate) {
-
- ec = render_list->add_element();
- memcpy(ec, e, sizeof(RenderList::Element));
- } else {
-
- ec = e;
- duplicate = true;
- }
-
- ec->light_type = light_type;
- ec->light = sort_key;
- ec->additive_ptr = &e->additive;
- }
-
- const RID *liptr = p_instance->light_instances.ptr();
- int ilc = p_instance->light_instances.size();
-
- for (int i = 0; i < ilc; i++) {
-
- LightInstance *li = light_instance_owner.get(liptr[i]);
- if (!li || li->last_pass != scene_pass) //lit by light not in visible scene
- continue;
- uint8_t light_type = li->base->type | 0x40; //penalty to ensure directionals always go first
- if (li->base->shadow_enabled) {
- light_type |= 0x8;
- }
- uint16_t sort_key = li->sort_key;
-
- RenderList::Element *ec;
- if (duplicate) {
-
- ec = render_list->add_element();
- memcpy(ec, e, sizeof(RenderList::Element));
- } else {
-
- duplicate = true;
- ec = e;
- }
-
- ec->light_type = light_type;
- ec->light = sort_key;
- ec->additive_ptr = &e->additive;
- }
- }
-
- DEBUG_TEST_ERROR("Add Geometry");
-}
-
-void RasterizerGLES2::add_mesh(const RID &p_mesh, const InstanceData *p_data) {
-
- Mesh *mesh = mesh_owner.get(p_mesh);
- ERR_FAIL_COND(!mesh);
-
- int ssize = mesh->surfaces.size();
-
- for (int i = 0; i < ssize; i++) {
-
- int mat_idx = p_data->materials[i].is_valid() ? i : -1;
- Surface *s = mesh->surfaces[i];
- _add_geometry(s, p_data, s, NULL, mat_idx);
- }
-
- mesh->last_pass = frame;
-}
-
-void RasterizerGLES2::add_multimesh(const RID &p_multimesh, const InstanceData *p_data) {
-
- MultiMesh *multimesh = multimesh_owner.get(p_multimesh);
- ERR_FAIL_COND(!multimesh);
-
- if (!multimesh->mesh.is_valid())
- return;
- if (multimesh->elements.empty())
- return;
-
- Mesh *mesh = mesh_owner.get(multimesh->mesh);
- ERR_FAIL_COND(!mesh);
-
- int surf_count = mesh->surfaces.size();
- if (multimesh->last_pass != scene_pass) {
-
- multimesh->cache_surfaces.resize(surf_count);
- for (int i = 0; i < surf_count; i++) {
-
- multimesh->cache_surfaces[i].material = mesh->surfaces[i]->material;
- multimesh->cache_surfaces[i].has_alpha = mesh->surfaces[i]->has_alpha;
- multimesh->cache_surfaces[i].surface = mesh->surfaces[i];
- }
-
- multimesh->last_pass = scene_pass;
- }
-
- for (int i = 0; i < surf_count; i++) {
-
- _add_geometry(&multimesh->cache_surfaces[i], p_data, multimesh->cache_surfaces[i].surface, multimesh);
- }
-}
-
-void RasterizerGLES2::add_immediate(const RID &p_immediate, const InstanceData *p_data) {
-
- Immediate *immediate = immediate_owner.get(p_immediate);
- ERR_FAIL_COND(!immediate);
-
- _add_geometry(immediate, p_data, immediate, NULL);
-}
-
-void RasterizerGLES2::add_particles(const RID &p_particle_instance, const InstanceData *p_data) {
-
- //print_line("adding particles");
- ParticlesInstance *particles_instance = particles_instance_owner.get(p_particle_instance);
- ERR_FAIL_COND(!particles_instance);
- Particles *p = particles_owner.get(particles_instance->particles);
- ERR_FAIL_COND(!p);
-
- _add_geometry(p, p_data, p, particles_instance);
- draw_next_frame = true;
-}
-
-Color RasterizerGLES2::_convert_color(const Color &p_color) {
-
- if (current_env && current_env->fx_enabled[VS::ENV_FX_SRGB])
- return p_color.to_linear();
- else
- return p_color;
-}
-
-void RasterizerGLES2::_set_cull(bool p_front, bool p_reverse_cull) {
-
- bool front = p_front;
- if (p_reverse_cull)
- front = !front;
-
- if (front != cull_front) {
-
- glCullFace(front ? GL_FRONT : GL_BACK);
- cull_front = front;
- }
-}
-
-_FORCE_INLINE_ void RasterizerGLES2::_update_material_shader_params(Material *p_material) const {
-
- Map<StringName, Material::UniformData> old_mparams = p_material->shader_params;
- Map<StringName, Material::UniformData> &mparams = p_material->shader_params;
- mparams.clear();
- int idx = 0;
- for (Map<StringName, ShaderLanguage::Uniform>::Element *E = p_material->shader_cache->uniforms.front(); E; E = E->next()) {
-
- Material::UniformData ud;
-
- bool keep = true; //keep material value
-
- Map<StringName, Material::UniformData>::Element *OLD = old_mparams.find(E->key());
- bool has_old = OLD;
- bool old_inuse = has_old && old_mparams[E->key()].inuse;
-
- ud.istexture = (E->get().type == ShaderLanguage::TYPE_TEXTURE || E->get().type == ShaderLanguage::TYPE_CUBEMAP);
-
- if (!has_old || !old_inuse) {
- keep = false;
- } else if (OLD->get().value.get_type() != E->value().default_value.get_type()) {
-
- if (OLD->get().value.get_type() == Variant::INT && E->get().type == ShaderLanguage::TYPE_FLOAT) {
- //handle common mistake using shaders (feeding ints instead of float)
- OLD->get().value = float(OLD->get().value);
- keep = true;
- } else if (!ud.istexture && E->value().default_value.get_type() != Variant::NIL) {
-
- keep = false;
- }
- //type changed between old and new
- /* if (old_mparams[E->key()].value.get_type()==Variant::OBJECT) {
- if (E->value().default_value.get_type()!=Variant::_RID) //hackfor textures
- keep=false;
- } else if (!old_mparams[E->key()].value.is_num() || !E->value().default_value.get_type())
- keep=false;*/
-
- //value is invalid because type differs and default is not null
- ;
- }
-
- if (keep) {
- ud.value = old_mparams[E->key()].value;
-
- //print_line("KEEP: "+String(E->key()));
- } else {
- if (ud.istexture && p_material->shader_cache->default_textures.has(E->key()))
- ud.value = p_material->shader_cache->default_textures[E->key()];
- else
- ud.value = E->value().default_value;
- old_inuse = false; //if reverted to default, obviously did not work
-
- /*
- print_line("NEW: "+String(E->key())+" because: hasold-"+itos(old_mparams.has(E->key())));
- if (old_mparams.has(E->key()))
- print_line(" told "+Variant::get_type_name(old_mparams[E->key()].value.get_type())+" tnew "+Variant::get_type_name(E->value().default_value.get_type()));
- */
- }
-
- ud.index = idx++;
- ud.inuse = old_inuse;
- mparams[E->key()] = ud;
- }
-
- p_material->shader_version = p_material->shader_cache->version;
-}
-
-bool RasterizerGLES2::_setup_material(const Geometry *p_geometry, const Material *p_material, bool p_no_const_light, bool p_opaque_pass) {
-
- if (p_material->flags[VS::MATERIAL_FLAG_DOUBLE_SIDED]) {
- glDisable(GL_CULL_FACE);
- } else {
- glEnable(GL_CULL_FACE);
- }
-
- //glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
-
- /*
- if (p_material->flags[VS::MATERIAL_FLAG_WIREFRAME])
- glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
- else
- glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
- */
-
- if (p_material->line_width)
- glLineWidth(p_material->line_width);
-
- //all goes to false by default
- material_shader.set_conditional(MaterialShaderGLES2::USE_SHADOW_PASS, shadow != NULL);
- material_shader.set_conditional(MaterialShaderGLES2::USE_SHADOW_PCF, shadow_filter == SHADOW_FILTER_PCF5 || shadow_filter == SHADOW_FILTER_PCF13);
- material_shader.set_conditional(MaterialShaderGLES2::USE_SHADOW_PCF_HQ, shadow_filter == SHADOW_FILTER_PCF13);
- material_shader.set_conditional(MaterialShaderGLES2::USE_SHADOW_ESM, shadow_filter == SHADOW_FILTER_ESM);
- material_shader.set_conditional(MaterialShaderGLES2::USE_LIGHTMAP_ON_UV2, p_material->flags[VS::MATERIAL_FLAG_LIGHTMAP_ON_UV2]);
- material_shader.set_conditional(MaterialShaderGLES2::USE_COLOR_ATTRIB_SRGB_TO_LINEAR, p_material->flags[VS::MATERIAL_FLAG_COLOR_ARRAY_SRGB] && current_env && current_env->fx_enabled[VS::ENV_FX_SRGB]);
-
- if (p_opaque_pass && p_material->depth_draw_mode == VS::MATERIAL_DEPTH_DRAW_OPAQUE_PRE_PASS_ALPHA && p_material->shader_cache && p_material->shader_cache->has_alpha) {
-
- material_shader.set_conditional(MaterialShaderGLES2::ENABLE_CLIP_ALPHA, true);
- } else {
- material_shader.set_conditional(MaterialShaderGLES2::ENABLE_CLIP_ALPHA, false);
- }
-
- if (!shadow) {
-
- bool depth_test = !p_material->flags[VS::MATERIAL_FLAG_ONTOP];
- bool depth_write = p_material->depth_draw_mode != VS::MATERIAL_DEPTH_DRAW_NEVER && (p_opaque_pass || p_material->depth_draw_mode == VS::MATERIAL_DEPTH_DRAW_ALWAYS);
- //bool depth_write=!p_material->hints[VS::MATERIAL_HINT_NO_DEPTH_DRAW] && (p_opaque_pass || !p_material->hints[VS::MATERIAL_HINT_NO_DEPTH_DRAW_FOR_ALPHA]);
-
- if (current_depth_mask != depth_write) {
- current_depth_mask = depth_write;
- glDepthMask(depth_write);
- }
-
- if (current_depth_test != depth_test) {
-
- current_depth_test = depth_test;
- if (depth_test)
- glEnable(GL_DEPTH_TEST);
- else
- glDisable(GL_DEPTH_TEST);
- }
-
- material_shader.set_conditional(MaterialShaderGLES2::USE_FOG, current_env && current_env->fx_enabled[VS::ENV_FX_FOG]);
- //glDepthMask( true );
- }
-
- DEBUG_TEST_ERROR("Pre Shader Bind");
-
- bool rebind = false;
-
- if (p_material->shader_cache && p_material->shader_cache->valid) {
-
- /*
- // reduce amount of conditional compilations
- for(int i=0;i<_tex_version_count;i++)
- material_shader.set_conditional((MaterialShaderGLES2::Conditionals)_tex_version[i],false);
- */
-
- //material_shader.set_custom_shader(p_material->shader_cache->custom_code_id);
-
- if (p_material->shader_version != p_material->shader_cache->version) {
- //shader changed somehow, must update uniforms
-
- _update_material_shader_params((Material *)p_material);
- }
- material_shader.set_custom_shader(p_material->shader_cache->custom_code_id);
- rebind = material_shader.bind();
-
- DEBUG_TEST_ERROR("Shader Bind");
-
- //set uniforms!
- int texcoord = 0;
- for (Map<StringName, Material::UniformData>::Element *E = p_material->shader_params.front(); E; E = E->next()) {
-
- if (E->get().index < 0)
- continue;
- //print_line(String(E->key())+": "+E->get().value);
- if (E->get().istexture) {
- //clearly a texture..
- RID rid = E->get().value;
- int loc = material_shader.get_custom_uniform_location(E->get().index); //should be automatic..
-
- Texture *t = NULL;
- if (rid.is_valid()) {
-
- t = texture_owner.get(rid);
- if (!t) {
- E->get().value = RID(); //nullify, invalid texture
- rid = RID();
- }
- }
-
- glActiveTexture(GL_TEXTURE0 + texcoord);
- glUniform1i(loc, texcoord); //TODO - this could happen automatically on compile...
- if (t) {
- if (t->render_target)
- t->render_target->last_pass = frame;
- if (E->key() == p_material->shader_cache->first_texture) {
- tc0_idx = texcoord;
- tc0_id_cache = t->tex_id;
- }
- glBindTexture(t->target, t->tex_id);
- } else
- glBindTexture(GL_TEXTURE_2D, white_tex); //no texture
- texcoord++;
-
- } else if (E->get().value.get_type() == Variant::COLOR) {
- Color c = E->get().value;
- material_shader.set_custom_uniform(E->get().index, _convert_color(c));
- } else {
- material_shader.set_custom_uniform(E->get().index, E->get().value);
- }
- }
-
- if (p_material->shader_cache->has_texscreen && framebuffer.active) {
- material_shader.set_uniform(MaterialShaderGLES2::TEXSCREEN_SCREEN_MULT, Vector2(float(viewport.width) / framebuffer.width, float(viewport.height) / framebuffer.height));
- material_shader.set_uniform(MaterialShaderGLES2::TEXSCREEN_SCREEN_CLAMP, Color(0, 0, float(viewport.width) / framebuffer.width, float(viewport.height) / framebuffer.height));
- material_shader.set_uniform(MaterialShaderGLES2::TEXSCREEN_TEX, texcoord);
- glActiveTexture(GL_TEXTURE0 + texcoord);
- glBindTexture(GL_TEXTURE_2D, framebuffer.sample_color);
- }
- if (p_material->shader_cache->has_screen_uv) {
- material_shader.set_uniform(MaterialShaderGLES2::SCREEN_UV_MULT, Vector2(1.0 / viewport.width, 1.0 / viewport.height));
- }
- DEBUG_TEST_ERROR("Material arameters");
-
- if (p_material->shader_cache->uses_time) {
- material_shader.set_uniform(MaterialShaderGLES2::TIME, Math::fmod(last_time, shader_time_rollback));
- draw_next_frame = true;
- }
- //if uses TIME - draw_next_frame=true
-
- } else {
-
- material_shader.set_custom_shader(0);
- rebind = material_shader.bind();
-
- DEBUG_TEST_ERROR("Shader bind2");
- }
-
- if (shadow) {
-
- float zofs = shadow->base->vars[VS::LIGHT_PARAM_SHADOW_Z_OFFSET];
- float zslope = shadow->base->vars[VS::LIGHT_PARAM_SHADOW_Z_SLOPE_SCALE];
- if (shadow_pass >= 1 && shadow->base->type == VS::LIGHT_DIRECTIONAL) {
- float m = Math::pow(shadow->base->directional_shadow_param[VS::LIGHT_DIRECTIONAL_SHADOW_PARAM_PSSM_ZOFFSET_SCALE], shadow_pass);
- zofs *= m;
- zslope *= m;
- }
- material_shader.set_uniform(MaterialShaderGLES2::SHADOW_Z_OFFSET, zofs);
- material_shader.set_uniform(MaterialShaderGLES2::SHADOW_Z_SLOPE_SCALE, zslope);
- if (shadow->base->type == VS::LIGHT_OMNI)
- material_shader.set_uniform(MaterialShaderGLES2::DUAL_PARABOLOID, shadow->dp);
- DEBUG_TEST_ERROR("Shadow uniforms");
- }
-
- if (current_env && current_env->fx_enabled[VS::ENV_FX_FOG]) {
-
- Color col_begin = current_env->fx_param[VS::ENV_FX_PARAM_FOG_BEGIN_COLOR];
- Color col_end = current_env->fx_param[VS::ENV_FX_PARAM_FOG_END_COLOR];
- col_begin = _convert_color(col_begin);
- col_end = _convert_color(col_end);
- float from = current_env->fx_param[VS::ENV_FX_PARAM_FOG_BEGIN];
- float zf = camera_z_far;
- float curve = current_env->fx_param[VS::ENV_FX_PARAM_FOG_ATTENUATION];
- material_shader.set_uniform(MaterialShaderGLES2::FOG_PARAMS, Vector3(from, zf, curve));
- material_shader.set_uniform(MaterialShaderGLES2::FOG_COLOR_BEGIN, Vector3(col_begin.r, col_begin.g, col_begin.b));
- material_shader.set_uniform(MaterialShaderGLES2::FOG_COLOR_END, Vector3(col_end.r, col_end.g, col_end.b));
- }
-
- //material_shader.set_uniform(MaterialShaderGLES2::TIME,Math::fmod(last_time,300.0));
- //if uses TIME - draw_next_frame=true
-
- return rebind;
-}
-
-void RasterizerGLES2::_setup_light(uint16_t p_light) {
-
- if (shadow)
- return;
-
- if (p_light == 0xFFFF)
- return;
-
- enum {
- VL_LIGHT_POS,
- VL_LIGHT_DIR,
- VL_LIGHT_ATTENUATION,
- VL_LIGHT_SPOT_ATTENUATION,
- VL_LIGHT_DIFFUSE,
- VL_LIGHT_SPECULAR,
- VL_LIGHT_MAX
- };
-
- static const MaterialShaderGLES2::Uniforms light_uniforms[VL_LIGHT_MAX] = {
- MaterialShaderGLES2::LIGHT_POS,
- MaterialShaderGLES2::LIGHT_DIRECTION,
- MaterialShaderGLES2::LIGHT_ATTENUATION,
- MaterialShaderGLES2::LIGHT_SPOT_ATTENUATION,
- MaterialShaderGLES2::LIGHT_DIFFUSE,
- MaterialShaderGLES2::LIGHT_SPECULAR,
- };
-
- GLfloat light_data[VL_LIGHT_MAX][3];
- memset(light_data, 0, (VL_LIGHT_MAX)*3 * sizeof(GLfloat));
-
- LightInstance *li = light_instances[p_light];
- Light *l = li->base;
-
- Color col_diffuse = _convert_color(l->colors[VS::LIGHT_COLOR_DIFFUSE]);
- Color col_specular = _convert_color(l->colors[VS::LIGHT_COLOR_SPECULAR]);
-
- for (int j = 0; j < 3; j++) {
- light_data[VL_LIGHT_DIFFUSE][j] = col_diffuse[j];
- light_data[VL_LIGHT_SPECULAR][j] = col_specular[j];
- }
-
- if (l->type != VS::LIGHT_OMNI) {
-
- Vector3 dir = -li->transform.get_basis().get_axis(2);
- dir = camera_transform_inverse.basis.xform(dir).normalized();
- for (int j = 0; j < 3; j++)
- light_data[VL_LIGHT_DIR][j] = dir[j];
- }
-
- if (l->type != VS::LIGHT_DIRECTIONAL) {
-
- Vector3 pos = li->transform.get_origin();
- pos = camera_transform_inverse.xform(pos);
- for (int j = 0; j < 3; j++)
- light_data[VL_LIGHT_POS][j] = pos[j];
- }
-
- if (li->near_shadow_buffer) {
-
- glActiveTexture(GL_TEXTURE0 + max_texture_units - 1);
- glBindTexture(GL_TEXTURE_2D, li->near_shadow_buffer->depth);
-
- material_shader.set_uniform(MaterialShaderGLES2::SHADOW_MATRIX, li->shadow_projection[0]);
- material_shader.set_uniform(MaterialShaderGLES2::SHADOW_TEXEL_SIZE, Vector2(1.0, 1.0) / li->near_shadow_buffer->size);
- material_shader.set_uniform(MaterialShaderGLES2::SHADOW_TEXTURE, max_texture_units - 1);
- if (shadow_filter == SHADOW_FILTER_ESM)
- material_shader.set_uniform(MaterialShaderGLES2::ESM_MULTIPLIER, float(li->base->vars[VS::LIGHT_PARAM_SHADOW_ESM_MULTIPLIER]));
-
- if (li->base->type == VS::LIGHT_DIRECTIONAL) {
-
- if (li->base->directional_shadow_mode == VS::LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS) {
-
- material_shader.set_uniform(MaterialShaderGLES2::SHADOW_MATRIX2, li->shadow_projection[1]);
- material_shader.set_uniform(MaterialShaderGLES2::LIGHT_PSSM_SPLIT, Vector3(li->shadow_split[0], li->shadow_split[1], li->shadow_split[2]));
- } else if (li->base->directional_shadow_mode == VS::LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS) {
-
- material_shader.set_uniform(MaterialShaderGLES2::SHADOW_MATRIX2, li->shadow_projection[1]);
- material_shader.set_uniform(MaterialShaderGLES2::SHADOW_MATRIX3, li->shadow_projection[2]);
- material_shader.set_uniform(MaterialShaderGLES2::SHADOW_MATRIX4, li->shadow_projection[3]);
- material_shader.set_uniform(MaterialShaderGLES2::LIGHT_PSSM_SPLIT, Vector3(li->shadow_split[0], li->shadow_split[1], li->shadow_split[2]));
- }
- //print_line("shadow split: "+rtos(li->shadow_split));
- }
-
- material_shader.set_uniform(MaterialShaderGLES2::SHADOW_DARKENING, li->base->vars[VS::LIGHT_PARAM_SHADOW_DARKENING]);
- //matrix
- }
-
- light_data[VL_LIGHT_ATTENUATION][0] = l->vars[VS::LIGHT_PARAM_ENERGY];
-
- if (l->type == VS::LIGHT_DIRECTIONAL) {
- light_data[VL_LIGHT_ATTENUATION][1] = l->directional_shadow_param[VS::LIGHT_DIRECTIONAL_SHADOW_PARAM_MAX_DISTANCE];
- } else {
- light_data[VL_LIGHT_ATTENUATION][1] = l->vars[VS::LIGHT_PARAM_RADIUS];
- }
-
- light_data[VL_LIGHT_ATTENUATION][2] = l->vars[VS::LIGHT_PARAM_ATTENUATION];
-
- light_data[VL_LIGHT_SPOT_ATTENUATION][0] = Math::cos(Math::deg2rad(l->vars[VS::LIGHT_PARAM_SPOT_ANGLE]));
- light_data[VL_LIGHT_SPOT_ATTENUATION][1] = l->vars[VS::LIGHT_PARAM_SPOT_ATTENUATION];
-
- //int uf = material_shader.get_uniform(MaterialShaderGLES2::LIGHT_PARAMS);
- for (int i = 0; i < VL_LIGHT_MAX; i++) {
- glUniform3f(material_shader.get_uniform(light_uniforms[i]), light_data[i][0], light_data[i][1], light_data[i][2]);
- }
-}
-
-template <bool USE_NORMAL, bool USE_TANGENT, bool INPLACE>
-void RasterizerGLES2::_skeleton_xform(const uint8_t *p_src_array, int p_src_stride, uint8_t *p_dst_array, int p_dst_stride, int p_elements, const uint8_t *p_src_bones, const uint8_t *p_src_weights, const Skeleton::Bone *p_bone_xforms) {
-
- uint32_t basesize = 3;
- if (USE_NORMAL)
- basesize += 3;
- if (USE_TANGENT)
- basesize += 4;
-
- uint32_t extra = (p_dst_stride - basesize * 4);
- const int dstvec_size = 3 + (USE_NORMAL ? 3 : 0) + (USE_TANGENT ? 4 : 0);
- float dstcopy[dstvec_size];
-
- for (int i = 0; i < p_elements; i++) {
-
- uint32_t ss = p_src_stride * i;
- uint32_t ds = p_dst_stride * i;
- const uint16_t *bi = (const uint16_t *)&p_src_bones[ss];
- const float *bw = (const float *)&p_src_weights[ss];
- const float *src_vec = (const float *)&p_src_array[ss];
- float *dst_vec;
- if (INPLACE)
- dst_vec = dstcopy;
- else
- dst_vec = (float *)&p_dst_array[ds];
-
- dst_vec[0] = 0.0;
- dst_vec[1] = 0.0;
- dst_vec[2] = 0.0;
- //conditionals simply removed by optimizer
- if (USE_NORMAL) {
-
- dst_vec[3] = 0.0;
- dst_vec[4] = 0.0;
- dst_vec[5] = 0.0;
-
- if (USE_TANGENT) {
-
- dst_vec[6] = 0.0;
- dst_vec[7] = 0.0;
- dst_vec[8] = 0.0;
- dst_vec[9] = src_vec[9];
- }
- } else {
-
- if (USE_TANGENT) {
-
- dst_vec[3] = 0.0;
- dst_vec[4] = 0.0;
- dst_vec[5] = 0.0;
- dst_vec[6] = src_vec[6];
- }
- }
-
-#define _XFORM_BONE(m_idx) \
- if (bw[m_idx] == 0) \
- goto end; \
- p_bone_xforms[bi[m_idx]].transform_add_mul3(&src_vec[0], &dst_vec[0], bw[m_idx]); \
- if (USE_NORMAL) { \
- p_bone_xforms[bi[m_idx]].transform3_add_mul3(&src_vec[3], &dst_vec[3], bw[m_idx]); \
- if (USE_TANGENT) { \
- p_bone_xforms[bi[m_idx]].transform3_add_mul3(&src_vec[6], &dst_vec[6], bw[m_idx]); \
- } \
- } else { \
- if (USE_TANGENT) { \
- p_bone_xforms[bi[m_idx]].transform3_add_mul3(&src_vec[3], &dst_vec[3], bw[m_idx]); \
- } \
- }
-
- _XFORM_BONE(0);
- _XFORM_BONE(1);
- _XFORM_BONE(2);
- _XFORM_BONE(3);
-
- end:
-
- if (INPLACE) {
-
- const uint8_t *esp = (const uint8_t *)dstcopy;
- uint8_t *edp = (uint8_t *)&p_dst_array[ds];
-
- for (uint32_t j = 0; j < dstvec_size * 4; j++) {
-
- edp[j] = esp[j];
- }
-
- } else {
- //copy extra stuff
- const uint8_t *esp = (const uint8_t *)&src_vec[basesize];
- uint8_t *edp = (uint8_t *)&dst_vec[basesize];
-
- for (uint32_t j = 0; j < extra; j++) {
-
- edp[j] = esp[j];
- }
- }
- }
-}
-
-Error RasterizerGLES2::_setup_geometry(const Geometry *p_geometry, const Material *p_material, const Skeleton *p_skeleton, const float *p_morphs) {
-
- switch (p_geometry->type) {
-
- case Geometry::GEOMETRY_MULTISURFACE:
- case Geometry::GEOMETRY_SURFACE: {
-
- const Surface *surf = NULL;
- if (p_geometry->type == Geometry::GEOMETRY_SURFACE)
- surf = static_cast<const Surface *>(p_geometry);
- else if (p_geometry->type == Geometry::GEOMETRY_MULTISURFACE)
- surf = static_cast<const MultiMeshSurface *>(p_geometry)->surface;
-
- if (surf->format != surf->configured_format) {
- if (OS::get_singleton()->is_stdout_verbose()) {
-
- print_line("has format: " + itos(surf->format));
- print_line("configured format: " + itos(surf->configured_format));
- }
- ERR_EXPLAIN("Missing arrays (not set) in surface");
- }
- ERR_FAIL_COND_V(surf->format != surf->configured_format, ERR_UNCONFIGURED);
- uint8_t *base = 0;
- int stride = surf->stride;
- bool use_VBO = (surf->array_local == 0);
- _setup_geometry_vinfo = surf->array_len;
-
- bool skeleton_valid = p_skeleton && (surf->format & VS::ARRAY_FORMAT_BONES) && (surf->format & VS::ARRAY_FORMAT_WEIGHTS) && !p_skeleton->bones.empty() && p_skeleton->bones.size() > surf->max_bone;
- /*
- if (surf->packed) {
- float scales[4]={surf->vertex_scale,surf->uv_scale,surf->uv2_scale,0.0};
- glVertexAttrib4fv( 7, scales );
- } else {
- glVertexAttrib4f( 7, 1,1,1,1 );
-
- }*/
-
- if (!use_VBO) {
-
- DEBUG_TEST_ERROR("Draw NO VBO");
-
- base = surf->array_local;
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- bool can_copy_to_local = surf->local_stride * surf->array_len <= skinned_buffer_size;
- if (p_morphs && surf->stride * surf->array_len > skinned_buffer_size)
- can_copy_to_local = false;
-
- if (!can_copy_to_local)
- skeleton_valid = false;
-
- /* compute morphs */
-
- if (p_morphs && surf->morph_target_count && can_copy_to_local) {
-
- base = skinned_buffer;
- stride = surf->local_stride;
-
- //copy all first
- float coef = 1.0;
-
- for (int i = 0; i < surf->morph_target_count; i++) {
- if (surf->mesh->morph_target_mode == VS::MORPH_MODE_NORMALIZED)
- coef -= p_morphs[i];
- ERR_FAIL_COND_V(surf->morph_format != surf->morph_targets_local[i].configured_format, ERR_INVALID_DATA);
- }
-
- int16_t coeffp = CLAMP(coef * 255, 0, 255);
-
- for (int i = 0; i < VS::ARRAY_MAX - 1; i++) {
-
- const Surface::ArrayData &ad = surf->array[i];
- if (ad.size == 0)
- continue;
-
- int ofs = ad.ofs;
- int src_stride = surf->stride;
- int dst_stride = skeleton_valid ? surf->stride : surf->local_stride;
- int count = surf->array_len;
-
- if (!skeleton_valid && i >= VS::ARRAY_MAX - 3)
- break;
-
- switch (i) {
-
- case VS::ARRAY_VERTEX:
- case VS::ARRAY_NORMAL:
- case VS::ARRAY_TANGENT: {
-
- for (int k = 0; k < count; k++) {
-
- const float *src = (const float *)&surf->array_local[ofs + k * src_stride];
- float *dst = (float *)&base[ofs + k * dst_stride];
-
- dst[0] = src[0] * coef;
- dst[1] = src[1] * coef;
- dst[2] = src[2] * coef;
- };
-
- } break;
- case VS::ARRAY_COLOR: {
-
- for (int k = 0; k < count; k++) {
-
- const uint8_t *src = (const uint8_t *)&surf->array_local[ofs + k * src_stride];
- uint8_t *dst = (uint8_t *)&base[ofs + k * dst_stride];
-
- dst[0] = (src[0] * coeffp) >> 8;
- dst[1] = (src[1] * coeffp) >> 8;
- dst[2] = (src[2] * coeffp) >> 8;
- dst[3] = (src[3] * coeffp) >> 8;
- }
-
- } break;
- case VS::ARRAY_TEX_UV:
- case VS::ARRAY_TEX_UV2: {
-
- for (int k = 0; k < count; k++) {
-
- const float *src = (const float *)&surf->array_local[ofs + k * src_stride];
- float *dst = (float *)&base[ofs + k * dst_stride];
-
- dst[0] = src[0] * coef;
- dst[1] = src[1] * coef;
- }
-
- } break;
- case VS::ARRAY_BONES:
- case VS::ARRAY_WEIGHTS: {
-
- for (int k = 0; k < count; k++) {
-
- const float *src = (const float *)&surf->array_local[ofs + k * src_stride];
- float *dst = (float *)&base[ofs + k * dst_stride];
-
- dst[0] = src[0];
- dst[1] = src[1];
- dst[2] = src[2];
- dst[3] = src[3];
- }
-
- } break;
- }
- }
-
- for (int j = 0; j < surf->morph_target_count; j++) {
-
- for (int i = 0; i < VS::ARRAY_MAX - 3; i++) {
-
- const Surface::ArrayData &ad = surf->array[i];
- if (ad.size == 0)
- continue;
-
- int ofs = ad.ofs;
- int src_stride = surf->local_stride;
- int dst_stride = skeleton_valid ? surf->stride : surf->local_stride;
- int count = surf->array_len;
- const uint8_t *morph = surf->morph_targets_local[j].array;
- float w = p_morphs[j];
- int16_t wfp = CLAMP(w * 255, 0, 255);
-
- switch (i) {
-
- case VS::ARRAY_VERTEX:
- case VS::ARRAY_NORMAL:
- case VS::ARRAY_TANGENT: {
-
- for (int k = 0; k < count; k++) {
-
- const float *src_morph = (const float *)&morph[ofs + k * src_stride];
- float *dst = (float *)&base[ofs + k * dst_stride];
-
- dst[0] += src_morph[0] * w;
- dst[1] += src_morph[1] * w;
- dst[2] += src_morph[2] * w;
- }
-
- } break;
- case VS::ARRAY_COLOR: {
- for (int k = 0; k < count; k++) {
-
- const uint8_t *src = (const uint8_t *)&morph[ofs + k * src_stride];
- uint8_t *dst = (uint8_t *)&base[ofs + k * dst_stride];
-
- dst[0] = (src[0] * wfp) >> 8;
- dst[1] = (src[1] * wfp) >> 8;
- dst[2] = (src[2] * wfp) >> 8;
- dst[3] = (src[3] * wfp) >> 8;
- }
-
- } break;
- case VS::ARRAY_TEX_UV:
- case VS::ARRAY_TEX_UV2: {
-
- for (int k = 0; k < count; k++) {
-
- const float *src_morph = (const float *)&morph[ofs + k * src_stride];
- float *dst = (float *)&base[ofs + k * dst_stride];
-
- dst[0] += src_morph[0] * w;
- dst[1] += src_morph[1] * w;
- }
-
- } break;
- }
- }
- }
-
- if (skeleton_valid) {
-
- const uint8_t *src_weights = &surf->array_local[surf->array[VS::ARRAY_WEIGHTS].ofs];
- const uint8_t *src_bones = &surf->array_local[surf->array[VS::ARRAY_BONES].ofs];
- const Skeleton::Bone *skeleton = &p_skeleton->bones[0];
-
- if (surf->format & VS::ARRAY_FORMAT_NORMAL && surf->format & VS::ARRAY_FORMAT_TANGENT)
- _skeleton_xform<true, true, true>(base, surf->stride, base, surf->stride, surf->array_len, src_bones, src_weights, skeleton);
- else if (surf->format & (VS::ARRAY_FORMAT_NORMAL))
- _skeleton_xform<true, false, true>(base, surf->stride, base, surf->stride, surf->array_len, src_bones, src_weights, skeleton);
- else if (surf->format & (VS::ARRAY_FORMAT_TANGENT))
- _skeleton_xform<false, true, true>(base, surf->stride, base, surf->stride, surf->array_len, src_bones, src_weights, skeleton);
- else
- _skeleton_xform<false, false, true>(base, surf->stride, base, surf->stride, surf->array_len, src_bones, src_weights, skeleton);
- }
-
- stride = skeleton_valid ? surf->stride : surf->local_stride;
-
-#if 0
- {
- //in-place skeleton tansformation, only used for morphs, slow.
- //should uptimize some day....
-
- const uint8_t *src_weights=&surf->array_local[surf->array[VS::ARRAY_WEIGHTS].ofs];
- const uint8_t *src_bones=&surf->array_local[surf->array[VS::ARRAY_BONES].ofs];
- int src_stride = surf->stride;
- int count = surf->array_len;
- const Transform *skeleton = &p_skeleton->bones[0];
-
- for(int i=0;i<VS::ARRAY_MAX-1;i++) {
-
- const Surface::ArrayData& ad=surf->array[i];
- if (ad.size==0)
- continue;
-
- int ofs = ad.ofs;
-
-
- switch(i) {
-
- case VS::ARRAY_VERTEX: {
- for(int k=0;k<count;k++) {
-
- float *ptr= (float*)&base[ofs+k*stride];
- const GLfloat* weights = reinterpret_cast<const GLfloat*>(&src_weights[k*src_stride]);
- const GLfloat *bones = reinterpret_cast<const GLfloat*>(&src_bones[k*src_stride]);
-
- Vector3 src( ptr[0], ptr[1], ptr[2] );
- Vector3 dst;
- for(int j=0;j<VS::ARRAY_WEIGHTS_SIZE;j++) {
-
- float w = weights[j];
- if (w==0)
- break;
-
- //print_line("accum "+itos(i)+" += "+rtos(Math::ftoi(bones[j]))+" * "+skeleton[ Math::ftoi(bones[j]) ]+" * "+rtos(w));
- int bidx = Math::fast_ftoi(bones[j]);
- dst+=skeleton[ bidx ].xform(src) * w;
- }
-
- ptr[0]=dst.x;
- ptr[1]=dst.y;
- ptr[2]=dst.z;
-
- } break;
-
- } break;
- case VS::ARRAY_NORMAL:
- case VS::ARRAY_TANGENT: {
- for(int k=0;k<count;k++) {
-
- float *ptr= (float*)&base[ofs+k*stride];
- const GLfloat* weights = reinterpret_cast<const GLfloat*>(&src_weights[k*src_stride]);
- const GLfloat *bones = reinterpret_cast<const GLfloat*>(&src_bones[k*src_stride]);
-
- Vector3 src( ptr[0], ptr[1], ptr[2] );
- Vector3 dst;
- for(int j=0;j<VS::ARRAY_WEIGHTS_SIZE;j++) {
-
- float w = weights[j];
- if (w==0)
- break;
-
- //print_line("accum "+itos(i)+" += "+rtos(Math::ftoi(bones[j]))+" * "+skeleton[ Math::ftoi(bones[j]) ]+" * "+rtos(w));
- int bidx=Math::fast_ftoi(bones[j]);
- dst+=skeleton[ bidx ].basis.xform(src) * w;
- }
-
- ptr[0]=dst.x;
- ptr[1]=dst.y;
- ptr[2]=dst.z;
-
- } break;
-
- } break;
- }
- }
- }
-#endif
-
- } else if (skeleton_valid) {
-
- base = skinned_buffer;
- //copy stuff and get it ready for the skeleton
-
- int dst_stride = surf->stride - (surf->array[VS::ARRAY_BONES].size + surf->array[VS::ARRAY_WEIGHTS].size);
- const uint8_t *src_weights = &surf->array_local[surf->array[VS::ARRAY_WEIGHTS].ofs];
- const uint8_t *src_bones = &surf->array_local[surf->array[VS::ARRAY_BONES].ofs];
- const Skeleton::Bone *skeleton = &p_skeleton->bones[0];
-
- if (surf->format & VS::ARRAY_FORMAT_NORMAL && surf->format & VS::ARRAY_FORMAT_TANGENT)
- _skeleton_xform<true, true, false>(surf->array_local, surf->stride, base, dst_stride, surf->array_len, src_bones, src_weights, skeleton);
- else if (surf->format & (VS::ARRAY_FORMAT_NORMAL))
- _skeleton_xform<true, false, false>(surf->array_local, surf->stride, base, dst_stride, surf->array_len, src_bones, src_weights, skeleton);
- else if (surf->format & (VS::ARRAY_FORMAT_TANGENT))
- _skeleton_xform<false, true, false>(surf->array_local, surf->stride, base, dst_stride, surf->array_len, src_bones, src_weights, skeleton);
- else
- _skeleton_xform<false, false, false>(surf->array_local, surf->stride, base, dst_stride, surf->array_len, src_bones, src_weights, skeleton);
-
- stride = dst_stride;
- }
-
- } else {
-
- glBindBuffer(GL_ARRAY_BUFFER, surf->vertex_id);
- };
-
- for (int i = 0; i < (VS::ARRAY_MAX - 1); i++) {
-
- const Surface::ArrayData &ad = surf->array[i];
-
- /*
- if (!gl_texcoord_shader[i])
- continue;
- */
-
- if (ad.size == 0 || !ad.bind) {
- glDisableVertexAttribArray(i);
- if (i == VS::ARRAY_COLOR) {
- _set_color_attrib(Color(1, 1, 1, 1));
- };
- //print_line("disable: "+itos(i));
- continue; // this one is disabled.
- }
-
- glEnableVertexAttribArray(i);
- //print_line("set: "+itos(i)+" - count: "+itos(ad.count)+" datatype: "+itos(ad.datatype)+" ofs: "+itos(ad.ofs)+" stride: "+itos(stride)+" total len: "+itos(surf->array_len));
- glVertexAttribPointer(i, ad.count, ad.datatype, ad.normalize, stride, &base[ad.ofs]);
- }
-#ifdef GLEW_ENABLED
- //"desktop" opengl needs this.
- if (surf->primitive == VS::PRIMITIVE_POINTS) {
- glEnable(GL_POINT_SPRITE);
- glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
-
- } else {
- glDisable(GL_POINT_SPRITE);
- glDisable(GL_VERTEX_PROGRAM_POINT_SIZE);
- }
-#endif
- } break;
-
- default: break;
- };
-
- return OK;
-};
-
-static const GLenum gl_primitive[] = {
- GL_POINTS,
- GL_LINES,
- GL_LINE_STRIP,
- GL_LINE_LOOP,
- GL_TRIANGLES,
- GL_TRIANGLE_STRIP,
- GL_TRIANGLE_FAN
-};
-
-void RasterizerGLES2::_render(const Geometry *p_geometry, const Material *p_material, const Skeleton *p_skeleton, const GeometryOwner *p_owner, const Transform &p_xform) {
-
- _rinfo.object_count++;
-
- switch (p_geometry->type) {
-
- case Geometry::GEOMETRY_SURFACE: {
-
- Surface *s = (Surface *)p_geometry;
-
- _rinfo.vertex_count += s->array_len;
-
- if (s->index_array_len > 0) {
-
- if (s->index_array_local) {
-
- //print_line("LOCAL F: "+itos(s->format)+" C: "+itos(s->index_array_len)+" VC: "+itos(s->array_len));
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
- glDrawElements(gl_primitive[s->primitive], s->index_array_len, (s->array_len > (1 << 16)) ? GL_UNSIGNED_INT : GL_UNSIGNED_SHORT, s->index_array_local);
-
- } else {
- //print_line("indices: "+itos(s->index_array_local) );
-
- //print_line("VBO F: "+itos(s->format)+" C: "+itos(s->index_array_len)+" VC: "+itos(s->array_len));
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, s->index_id);
- glDrawElements(gl_primitive[s->primitive], s->index_array_len, (s->array_len > (1 << 16)) ? GL_UNSIGNED_INT : GL_UNSIGNED_SHORT, 0);
- }
-
- } else {
-
- glDrawArrays(gl_primitive[s->primitive], 0, s->array_len);
- };
-
- _rinfo.draw_calls++;
- } break;
-
- case Geometry::GEOMETRY_MULTISURFACE: {
-
- material_shader.bind_uniforms();
- Surface *s = static_cast<const MultiMeshSurface *>(p_geometry)->surface;
- const MultiMesh *mm = static_cast<const MultiMesh *>(p_owner);
- int element_count = mm->elements.size();
-
- if (element_count == 0)
- return;
-
- if (mm->visible >= 0) {
- element_count = MIN(element_count, mm->visible);
- }
-
- const MultiMesh::Element *elements = &mm->elements[0];
-
- _rinfo.vertex_count += s->array_len * element_count;
-
- _rinfo.draw_calls += element_count;
-
- if (use_texture_instancing) {
- //this is probably the fastest all around way if vertex texture fetch is supported
-
- float twd = (1.0 / mm->tw) * 4.0;
- float thd = 1.0 / mm->th;
- float parm[3] = { 0.0, 01.0, (1.0f / mm->tw) };
- glActiveTexture(GL_TEXTURE0 + max_texture_units - 2);
- glDisableVertexAttribArray(6);
- glBindTexture(GL_TEXTURE_2D, mm->tex_id);
- material_shader.set_uniform(MaterialShaderGLES2::INSTANCE_MATRICES, GL_TEXTURE0 + max_texture_units - 2);
-
- if (s->index_array_len > 0) {
-
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, s->index_id);
- for (int i = 0; i < element_count; i++) {
- parm[0] = (i % (mm->tw >> 2)) * twd;
- parm[1] = (i / (mm->tw >> 2)) * thd;
- glVertexAttrib3fv(6, parm);
- glDrawElements(gl_primitive[s->primitive], s->index_array_len, (s->array_len > (1 << 16)) ? GL_UNSIGNED_INT : GL_UNSIGNED_SHORT, 0);
- }
-
- } else {
-
- for (int i = 0; i < element_count; i++) {
- //parm[0]=(i%(mm->tw>>2))*twd;
- //parm[1]=(i/(mm->tw>>2))*thd;
- glVertexAttrib3fv(6, parm);
- glDrawArrays(gl_primitive[s->primitive], 0, s->array_len);
- }
- };
-
- } else if (use_attribute_instancing) {
- //if not, using attributes instead of uniforms can be really fast in forward rendering architectures
- if (s->index_array_len > 0) {
-
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, s->index_id);
- for (int i = 0; i < element_count; i++) {
- glVertexAttrib4fv(8, &elements[i].matrix[0]);
- glVertexAttrib4fv(9, &elements[i].matrix[4]);
- glVertexAttrib4fv(10, &elements[i].matrix[8]);
- glVertexAttrib4fv(11, &elements[i].matrix[12]);
- glDrawElements(gl_primitive[s->primitive], s->index_array_len, (s->array_len > (1 << 16)) ? GL_UNSIGNED_INT : GL_UNSIGNED_SHORT, 0);
- }
-
- } else {
-
- for (int i = 0; i < element_count; i++) {
- glVertexAttrib4fv(8, &elements[i].matrix[0]);
- glVertexAttrib4fv(9, &elements[i].matrix[4]);
- glVertexAttrib4fv(10, &elements[i].matrix[8]);
- glVertexAttrib4fv(11, &elements[i].matrix[12]);
- glDrawArrays(gl_primitive[s->primitive], 0, s->array_len);
- }
- };
-
- } else {
-
- //nothing to do, slow path (hope no hardware has to use it... but you never know)
-
- if (s->index_array_len > 0) {
-
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, s->index_id);
- for (int i = 0; i < element_count; i++) {
-
- glUniformMatrix4fv(material_shader.get_uniform_location(MaterialShaderGLES2::INSTANCE_TRANSFORM), 1, false, elements[i].matrix);
- glDrawElements(gl_primitive[s->primitive], s->index_array_len, (s->array_len > (1 << 16)) ? GL_UNSIGNED_INT : GL_UNSIGNED_SHORT, 0);
- }
-
- } else {
-
- for (int i = 0; i < element_count; i++) {
- glUniformMatrix4fv(material_shader.get_uniform_location(MaterialShaderGLES2::INSTANCE_TRANSFORM), 1, false, elements[i].matrix);
- glDrawArrays(gl_primitive[s->primitive], 0, s->array_len);
- }
- };
- }
- } break;
- case Geometry::GEOMETRY_IMMEDIATE: {
-
- bool restore_tex = false;
- const Immediate *im = static_cast<const Immediate *>(p_geometry);
- if (im->building) {
- return;
- }
-
- glBindBuffer(GL_ARRAY_BUFFER, 0);
-
- for (const List<Immediate::Chunk>::Element *E = im->chunks.front(); E; E = E->next()) {
-
- const Immediate::Chunk &c = E->get();
- if (c.vertices.empty()) {
- continue;
- }
- for (int i = 0; i < c.vertices.size(); i++)
-
- if (c.texture.is_valid() && texture_owner.owns(c.texture)) {
-
- const Texture *t = texture_owner.get(c.texture);
- glActiveTexture(GL_TEXTURE0 + tc0_idx);
- glBindTexture(t->target, t->tex_id);
- restore_tex = true;
-
- } else if (restore_tex) {
-
- glActiveTexture(GL_TEXTURE0 + tc0_idx);
- glBindTexture(GL_TEXTURE_2D, tc0_id_cache);
- restore_tex = false;
- }
-
- if (!c.normals.empty()) {
-
- glEnableVertexAttribArray(VS::ARRAY_NORMAL);
- glVertexAttribPointer(VS::ARRAY_NORMAL, 3, GL_FLOAT, false, sizeof(Vector3), c.normals.ptr());
-
- } else {
-
- glDisableVertexAttribArray(VS::ARRAY_NORMAL);
- }
-
- if (!c.tangents.empty()) {
-
- glEnableVertexAttribArray(VS::ARRAY_TANGENT);
- glVertexAttribPointer(VS::ARRAY_TANGENT, 4, GL_FLOAT, false, sizeof(Plane), c.tangents.ptr());
-
- } else {
-
- glDisableVertexAttribArray(VS::ARRAY_TANGENT);
- }
-
- if (!c.colors.empty()) {
-
- glEnableVertexAttribArray(VS::ARRAY_COLOR);
- glVertexAttribPointer(VS::ARRAY_COLOR, 4, GL_FLOAT, false, sizeof(Color), c.colors.ptr());
-
- } else {
-
- glDisableVertexAttribArray(VS::ARRAY_COLOR);
- _set_color_attrib(Color(1, 1, 1, 1));
- }
-
- if (!c.uvs.empty()) {
-
- glEnableVertexAttribArray(VS::ARRAY_TEX_UV);
- glVertexAttribPointer(VS::ARRAY_TEX_UV, 2, GL_FLOAT, false, sizeof(Vector2), c.uvs.ptr());
-
- } else {
-
- glDisableVertexAttribArray(VS::ARRAY_TEX_UV);
- }
-
- if (!c.uvs2.empty()) {
-
- glEnableVertexAttribArray(VS::ARRAY_TEX_UV2);
- glVertexAttribPointer(VS::ARRAY_TEX_UV2, 2, GL_FLOAT, false, sizeof(Vector2), c.uvs2.ptr());
-
- } else {
-
- glDisableVertexAttribArray(VS::ARRAY_TEX_UV2);
- }
-
- glEnableVertexAttribArray(VS::ARRAY_VERTEX);
- glVertexAttribPointer(VS::ARRAY_VERTEX, 3, GL_FLOAT, false, sizeof(Vector3), c.vertices.ptr());
- glDrawArrays(gl_primitive[c.primitive], 0, c.vertices.size());
- }
-
- if (restore_tex) {
-
- glActiveTexture(GL_TEXTURE0 + tc0_idx);
- glBindTexture(GL_TEXTURE_2D, tc0_id_cache);
- restore_tex = false;
- }
-
- } break;
- case Geometry::GEOMETRY_PARTICLES: {
-
- //print_line("particulinas");
- const Particles *particles = static_cast<const Particles *>(p_geometry);
- ERR_FAIL_COND(!p_owner);
- ParticlesInstance *particles_instance = (ParticlesInstance *)p_owner;
-
- ParticleSystemProcessSW &pp = particles_instance->particles_process;
- float td = time_delta; //MIN(time_delta,1.0/10.0);
- pp.process(&particles->data, particles_instance->transform, td);
- ERR_EXPLAIN("A parameter in the particle system is not correct.");
- ERR_FAIL_COND(!pp.valid);
-
- Transform camera;
- if (shadow)
- camera = shadow->transform;
- else
- camera = camera_transform;
-
- particle_draw_info.prepare(&particles->data, &pp, particles_instance->transform, camera);
- _rinfo.draw_calls += particles->data.amount;
-
- _rinfo.vertex_count += 4 * particles->data.amount;
-
- {
- static const Vector3 points[4] = {
- Vector3(-1.0, 1.0, 0),
- Vector3(1.0, 1.0, 0),
- Vector3(1.0, -1.0, 0),
- Vector3(-1.0, -1.0, 0)
- };
- static const Vector3 uvs[4] = {
- Vector3(0.0, 0.0, 0.0),
- Vector3(1.0, 0.0, 0.0),
- Vector3(1.0, 1.0, 0.0),
- Vector3(0, 1.0, 0.0)
- };
- static const Vector3 normals[4] = {
- Vector3(0, 0, 1),
- Vector3(0, 0, 1),
- Vector3(0, 0, 1),
- Vector3(0, 0, 1)
- };
-
- static const Plane tangents[4] = {
- Plane(Vector3(1, 0, 0), 0),
- Plane(Vector3(1, 0, 0), 0),
- Plane(Vector3(1, 0, 0), 0),
- Plane(Vector3(1, 0, 0), 0)
- };
-
- for (int i = 0; i < particles->data.amount; i++) {
-
- ParticleSystemDrawInfoSW::ParticleDrawInfo &pinfo = *particle_draw_info.draw_info_order[i];
- if (!pinfo.data->active)
- continue;
-
- material_shader.set_uniform(MaterialShaderGLES2::WORLD_TRANSFORM, pinfo.transform);
- _set_color_attrib(pinfo.color);
- _draw_primitive(4, points, normals, NULL, uvs, tangents);
- }
- }
-
- } break;
- default: break;
- };
-};
-
-void RasterizerGLES2::_setup_shader_params(const Material *p_material) {
-
-#if 0
- int idx=0;
- int tex_idx=0;
- for(Map<StringName,Variant>::Element *E=p_material->shader_cache->params.front();E;E=E->next(),idx++) {
-
- Variant v; //
- v = E->get();
- const Map<StringName,Variant>::Element *F=p_material->shader_params.find(E->key());
- if (F)
- v=F->get();
-
- switch(v.get_type() ) {
- case Variant::OBJECT:
- case Variant::_RID: {
-
- RID tex=v;
- if (!tex.is_valid())
- break;
-
- Texture *texture = texture_owner.get(tex);
- if (!texture)
- break;
- glUniform1i( material_shader.get_custom_uniform_location(idx), tex_idx);
- glActiveTexture(tex_idx);
- glBindTexture(texture->target,texture->tex_id);
-
- } break;
- case Variant::COLOR: {
-
- Color c=v;
- material_shader.set_custom_uniform(idx,Vector3(c.r,c.g,c.b));
- } break;
- default: {
-
- material_shader.set_custom_uniform(idx,v);
- } break;
- }
-
- }
-#endif
-}
-
-void RasterizerGLES2::_setup_skeleton(const Skeleton *p_skeleton) {
-
- material_shader.set_conditional(MaterialShaderGLES2::USE_SKELETON, p_skeleton != NULL);
- if (p_skeleton && p_skeleton->tex_id) {
-
- glActiveTexture(GL_TEXTURE0 + max_texture_units - 2);
- glBindTexture(GL_TEXTURE_2D, p_skeleton->tex_id);
- }
-}
-
-void RasterizerGLES2::_render_list_forward(RenderList *p_render_list, const Transform &p_view_transform, const Transform &p_view_transform_inverse, const CameraMatrix &p_projection, bool p_reverse_cull, bool p_fragment_light, bool p_alpha_pass) {
-
- if (current_rt && current_rt_vflip) {
- //p_reverse_cull=!p_reverse_cull;
- glFrontFace(GL_CCW);
- }
-
- const Material *prev_material = NULL;
- uint16_t prev_light = 0x777E;
- const Geometry *prev_geometry_cmp = NULL;
- uint8_t prev_light_type = 0xEF;
- const Skeleton *prev_skeleton = NULL;
- uint8_t prev_sort_flags = 0xFF;
- const BakedLightData *prev_baked_light = NULL;
- RID prev_baked_light_texture;
- const float *prev_morph_values = NULL;
- int prev_receive_shadows_state = -1;
-
- material_shader.set_conditional(MaterialShaderGLES2::USE_VERTEX_LIGHTING, !shadow && !p_fragment_light);
- material_shader.set_conditional(MaterialShaderGLES2::USE_FRAGMENT_LIGHTING, !shadow && p_fragment_light);
- material_shader.set_conditional(MaterialShaderGLES2::USE_SKELETON, false);
-
- if (shadow) {
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_TYPE_DIRECTIONAL, false);
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_TYPE_OMNI, false);
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_TYPE_SPOT, false);
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_USE_SHADOW, false);
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_USE_PSSM, false);
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_USE_PSSM4, false);
- material_shader.set_conditional(MaterialShaderGLES2::SHADELESS, false);
- material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_OCTREE, false);
- material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_LIGHTMAP, false);
- //material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_TEXTURE,false);
- }
-
- bool stores_glow = !shadow && (current_env && current_env->fx_enabled[VS::ENV_FX_GLOW]) && !p_alpha_pass;
- float sampled_light_dp_multiplier = 1.0;
-
- bool prev_blend = false;
- glDisable(GL_BLEND);
- for (int i = 0; i < p_render_list->element_count; i++) {
-
- RenderList::Element *e = p_render_list->elements[i];
- const Material *material = e->material;
- uint16_t light = e->light;
- uint8_t light_type = e->light_type;
- uint8_t sort_flags = e->sort_flags;
- const Skeleton *skeleton = e->skeleton;
- const Geometry *geometry_cmp = e->geometry_cmp;
- const BakedLightData *baked_light = e->instance->baked_light;
- const float *morph_values = e->instance->morph_values.ptr();
- int receive_shadows_state = e->instance->receive_shadows == true ? 1 : 0;
-
- bool rebind = false;
- bool bind_baked_light_octree = false;
- bool bind_baked_lightmap = false;
- bool additive = false;
- bool bind_dp_sampler = false;
-
- if (!shadow) {
-
- if (texscreen_used && !texscreen_copied && material->shader_cache && material->shader_cache->valid && material->shader_cache->has_texscreen) {
- texscreen_copied = true;
- _copy_to_texscreen();
-
- //force reset state
- prev_material = NULL;
- prev_light = 0x777E;
- prev_geometry_cmp = NULL;
- prev_light_type = 0xEF;
- prev_skeleton = NULL;
- prev_sort_flags = 0xFF;
- prev_morph_values = NULL;
- prev_receive_shadows_state = -1;
- glEnable(GL_BLEND);
- glDepthMask(GL_TRUE);
- glEnable(GL_DEPTH_TEST);
- glDisable(GL_SCISSOR_TEST);
- }
-
- if (light_type != prev_light_type || receive_shadows_state != prev_receive_shadows_state) {
-
- if (material->flags[VS::MATERIAL_FLAG_UNSHADED] || current_debug == VS::SCENARIO_DEBUG_SHADELESS) {
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_TYPE_DIRECTIONAL, false);
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_TYPE_OMNI, false);
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_TYPE_SPOT, false);
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_USE_SHADOW, false);
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_USE_PSSM, false);
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_USE_PSSM4, false);
- material_shader.set_conditional(MaterialShaderGLES2::SHADELESS, true);
- } else {
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_TYPE_DIRECTIONAL, (light_type & 0x3) == VS::LIGHT_DIRECTIONAL);
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_TYPE_OMNI, (light_type & 0x3) == VS::LIGHT_OMNI);
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_TYPE_SPOT, (light_type & 0x3) == VS::LIGHT_SPOT);
- if (receive_shadows_state == 1) {
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_USE_SHADOW, (light_type & 0x8));
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_USE_PSSM, (light_type & 0x10));
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_USE_PSSM4, (light_type & 0x20));
- } else {
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_USE_SHADOW, false);
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_USE_PSSM, false);
- material_shader.set_conditional(MaterialShaderGLES2::LIGHT_USE_PSSM4, false);
- }
- material_shader.set_conditional(MaterialShaderGLES2::SHADELESS, false);
- }
-
- rebind = true;
- }
-
- if (!*e->additive_ptr) {
-
- additive = false;
- *e->additive_ptr = true;
- } else {
- additive = true;
- }
-
- if (stores_glow)
- material_shader.set_conditional(MaterialShaderGLES2::USE_GLOW, !additive);
-
- bool desired_blend = false;
- VS::MaterialBlendMode desired_blend_mode = VS::MATERIAL_BLEND_MODE_MIX;
-
- if (additive) {
- desired_blend = true;
- desired_blend_mode = VS::MATERIAL_BLEND_MODE_ADD;
- } else {
- desired_blend = p_alpha_pass;
- desired_blend_mode = material->blend_mode;
- }
-
- if (prev_blend != desired_blend) {
-
- if (desired_blend) {
- glEnable(GL_BLEND);
- if (!current_rt || !current_rt_transparent)
- glColorMask(1, 1, 1, 0);
- } else {
- glDisable(GL_BLEND);
- glColorMask(1, 1, 1, 1);
- }
-
- prev_blend = desired_blend;
- }
-
- if (desired_blend && desired_blend_mode != current_blend_mode) {
-
- switch (desired_blend_mode) {
-
- case VS::MATERIAL_BLEND_MODE_MIX: {
- glBlendEquation(GL_FUNC_ADD);
- if (current_rt && current_rt_transparent) {
- glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
- } else {
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
-
- } break;
- case VS::MATERIAL_BLEND_MODE_ADD: {
-
- glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(p_alpha_pass ? GL_SRC_ALPHA : GL_ONE, GL_ONE);
-
- } break;
- case VS::MATERIAL_BLEND_MODE_SUB: {
-
- glBlendEquation(GL_FUNC_REVERSE_SUBTRACT);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE);
- } break;
- case VS::MATERIAL_BLEND_MODE_MUL: {
- glBlendEquation(GL_FUNC_ADD);
- if (current_rt && current_rt_transparent) {
- glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
- } else {
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
-
- } break;
- }
-
- current_blend_mode = desired_blend_mode;
- }
-
- material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_OCTREE, false);
- material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_LIGHTMAP, false);
- material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_DP_SAMPLER, false);
-
- material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_COLOR, false);
-
- if (material->flags[VS::MATERIAL_FLAG_UNSHADED] == false && current_debug != VS::SCENARIO_DEBUG_SHADELESS) {
-
- if (baked_light != NULL) {
- if (baked_light->realtime_color_enabled) {
- float realtime_energy = baked_light->realtime_energy;
- material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_COLOR, true);
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_COLOR, Vector3(baked_light->realtime_color.r * realtime_energy, baked_light->realtime_color.g * realtime_energy, baked_light->realtime_color.b * realtime_energy));
- }
- }
-
- if (e->instance->sampled_light.is_valid()) {
-
- SampledLight *sl = sampled_light_owner.get(e->instance->sampled_light);
- if (sl) {
-
- baked_light = NULL; //can't mix
- material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_DP_SAMPLER, true);
- glActiveTexture(GL_TEXTURE0 + max_texture_units - 3);
- glBindTexture(GL_TEXTURE_2D, sl->texture); //bind the texture
- sampled_light_dp_multiplier = sl->multiplier;
- bind_dp_sampler = true;
- }
- }
-
- if (!additive && baked_light) {
-
- if (baked_light->mode == VS::BAKED_LIGHT_OCTREE && baked_light->octree_texture.is_valid() && e->instance->baked_light_octree_xform) {
- material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_OCTREE, true);
- bind_baked_light_octree = true;
- if (prev_baked_light != baked_light) {
- Texture *tex = texture_owner.get(baked_light->octree_texture);
- if (tex) {
-
- glActiveTexture(GL_TEXTURE0 + max_texture_units - 3);
- glBindTexture(tex->target, tex->tex_id); //bind the texture
- }
- if (baked_light->light_texture.is_valid()) {
- Texture *texl = texture_owner.get(baked_light->light_texture);
- if (texl) {
- glActiveTexture(GL_TEXTURE0 + max_texture_units - 4);
- glBindTexture(texl->target, texl->tex_id); //bind the light texture
- }
- }
- }
- } else if (baked_light->mode == VS::BAKED_LIGHT_LIGHTMAPS) {
-
- int lightmap_idx = e->instance->baked_lightmap_id;
-
- material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_LIGHTMAP, false);
- bind_baked_lightmap = false;
-
- if (baked_light->lightmaps.has(lightmap_idx)) {
-
- RID texid = baked_light->lightmaps[lightmap_idx];
-
- if (prev_baked_light != baked_light || texid != prev_baked_light_texture) {
-
- Texture *tex = texture_owner.get(texid);
- if (tex) {
-
- glActiveTexture(GL_TEXTURE0 + max_texture_units - 3);
- glBindTexture(tex->target, tex->tex_id); //bind the texture
- }
-
- prev_baked_light_texture = texid;
- }
-
- if (texid.is_valid()) {
- material_shader.set_conditional(MaterialShaderGLES2::ENABLE_AMBIENT_LIGHTMAP, true);
- bind_baked_lightmap = true;
- }
- }
- }
- }
-
- if (int(prev_baked_light != NULL) ^ int(baked_light != NULL)) {
- rebind = true;
- }
- }
- }
-
- if (sort_flags != prev_sort_flags) {
-
- if (sort_flags & RenderList::SORT_FLAG_INSTANCING) {
- material_shader.set_conditional(MaterialShaderGLES2::USE_UNIFORM_INSTANCING, !use_texture_instancing && !use_attribute_instancing);
- material_shader.set_conditional(MaterialShaderGLES2::USE_ATTRIBUTE_INSTANCING, use_attribute_instancing);
- material_shader.set_conditional(MaterialShaderGLES2::USE_TEXTURE_INSTANCING, use_texture_instancing);
- } else {
- material_shader.set_conditional(MaterialShaderGLES2::USE_UNIFORM_INSTANCING, false);
- material_shader.set_conditional(MaterialShaderGLES2::USE_ATTRIBUTE_INSTANCING, false);
- material_shader.set_conditional(MaterialShaderGLES2::USE_TEXTURE_INSTANCING, false);
- }
- rebind = true;
- }
-
- if (use_hw_skeleton_xform && (skeleton != prev_skeleton || morph_values != prev_morph_values)) {
- if (!prev_skeleton || !skeleton)
- rebind = true; //went from skeleton <-> no skeleton, needs rebind
-
- if (morph_values == NULL)
- _setup_skeleton(skeleton);
- else
- _setup_skeleton(NULL);
- }
-
- if (material != prev_material || rebind) {
-
- rebind = _setup_material(e->geometry, material, additive, !p_alpha_pass);
-
- DEBUG_TEST_ERROR("Setup material");
- _rinfo.mat_change_count++;
- //_setup_material_overrides(e->material,NULL,material_overrides);
- //_setup_material_skeleton(material,skeleton);
- } else {
-
- if (prev_skeleton != skeleton) {
- //_setup_material_skeleton(material,skeleton);
- };
- }
-
- if (geometry_cmp != prev_geometry_cmp || prev_skeleton != skeleton) {
-
- _setup_geometry(e->geometry, material, e->skeleton, e->instance->morph_values.ptr());
- _rinfo.surface_count++;
- DEBUG_TEST_ERROR("Setup geometry");
- };
-
- if (i == 0 || light != prev_light || rebind) {
- if (e->light != 0xFFFF) {
- _setup_light(e->light);
- }
- }
-
- if (bind_baked_light_octree && (baked_light != prev_baked_light || rebind)) {
-
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_OCTREE_INVERSE_TRANSFORM, *e->instance->baked_light_octree_xform);
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_OCTREE_LATTICE_SIZE, baked_light->octree_lattice_size);
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_OCTREE_LATTICE_DIVIDE, baked_light->octree_lattice_divide);
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_OCTREE_STEPS, baked_light->octree_steps);
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_OCTREE_TEX, max_texture_units - 3);
- if (baked_light->light_texture.is_valid()) {
-
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_OCTREE_LIGHT_TEX, max_texture_units - 4);
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_OCTREE_LIGHT_PIX_SIZE, baked_light->light_tex_pixel_size);
- } else {
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_OCTREE_LIGHT_TEX, max_texture_units - 3);
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_OCTREE_LIGHT_PIX_SIZE, baked_light->octree_tex_pixel_size);
- }
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_OCTREE_MULTIPLIER, baked_light->texture_multiplier);
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_OCTREE_PIX_SIZE, baked_light->octree_tex_pixel_size);
- }
-
- if (bind_baked_lightmap && (baked_light != prev_baked_light || rebind)) {
-
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_LIGHTMAP, max_texture_units - 3);
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_LIGHTMAP_MULTIPLIER, baked_light->lightmap_multiplier);
- }
-
- if (bind_dp_sampler) {
-
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_DP_SAMPLER_MULTIPLIER, sampled_light_dp_multiplier);
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_DP_SAMPLER, max_texture_units - 3);
- }
-
- _set_cull(e->mirror, p_reverse_cull);
-
- if (i == 0 || rebind) {
- material_shader.set_uniform(MaterialShaderGLES2::CAMERA_INVERSE_TRANSFORM, p_view_transform_inverse);
- material_shader.set_uniform(MaterialShaderGLES2::PROJECTION_TRANSFORM, p_projection);
- if (!shadow) {
-
- if (!additive && current_env && current_env->fx_enabled[VS::ENV_FX_AMBIENT_LIGHT]) {
- Color ambcolor = _convert_color(current_env->fx_param[VS::ENV_FX_PARAM_AMBIENT_LIGHT_COLOR]);
- float ambnrg = current_env->fx_param[VS::ENV_FX_PARAM_AMBIENT_LIGHT_ENERGY];
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_LIGHT, Vector3(ambcolor.r * ambnrg, ambcolor.g * ambnrg, ambcolor.b * ambnrg));
- } else {
- material_shader.set_uniform(MaterialShaderGLES2::AMBIENT_LIGHT, Vector3());
- }
- }
-
- _rinfo.shader_change_count++;
- }
-
- if (skeleton != prev_skeleton || rebind) {
- if (skeleton && morph_values == NULL) {
- material_shader.set_uniform(MaterialShaderGLES2::SKELETON_MATRICES, max_texture_units - 2);
- material_shader.set_uniform(MaterialShaderGLES2::SKELTEX_PIXEL_SIZE, skeleton->pixel_size);
- }
- }
-
- if (e->instance->billboard || e->instance->billboard_y || e->instance->depth_scale) {
-
- Transform xf = e->instance->transform;
- if (e->instance->depth_scale) {
-
- if (p_projection.matrix[3][3]) {
- //orthogonal matrix, try to do about the same
- //with viewport size
- //real_t w = Math::abs( 1.0/(2.0*(p_projection.matrix[0][0])) );
- real_t h = Math::abs(1.0 / (2.0 * p_projection.matrix[1][1]));
- float sc = (h * 2.0); //consistent with Y-fov
- xf.basis.scale(Vector3(sc, sc, sc));
- } else {
- //just scale by depth
- real_t sc = -camera_plane.distance_to(xf.origin);
- xf.basis.scale(Vector3(sc, sc, sc));
- }
- }
-
- if (e->instance->billboard) {
-
- Vector3 scale = xf.basis.get_scale();
-
- if (current_rt && current_rt_vflip) {
- xf.set_look_at(xf.origin, xf.origin + p_view_transform.get_basis().get_axis(2), -p_view_transform.get_basis().get_axis(1));
- } else {
- xf.set_look_at(xf.origin, xf.origin + p_view_transform.get_basis().get_axis(2), p_view_transform.get_basis().get_axis(1));
- }
-
- xf.basis.scale(scale);
- }
-
- if (e->instance->billboard_y) {
-
- Vector3 scale = xf.basis.get_scale();
- Vector3 look_at = p_view_transform.get_origin();
- look_at.y = 0.0;
- Vector3 look_at_norm = look_at.normalized();
-
- if (current_rt && current_rt_vflip) {
- xf.set_look_at(xf.origin, xf.origin + look_at_norm, Vector3(0.0, -1.0, 0.0));
- } else {
- xf.set_look_at(xf.origin, xf.origin + look_at_norm, Vector3(0.0, 1.0, 0.0));
- }
- xf.basis.scale(scale);
- }
- material_shader.set_uniform(MaterialShaderGLES2::WORLD_TRANSFORM, xf);
-
- } else {
- material_shader.set_uniform(MaterialShaderGLES2::WORLD_TRANSFORM, e->instance->transform);
- }
-
- material_shader.set_uniform(MaterialShaderGLES2::NORMAL_MULT, e->mirror ? -1.0 : 1.0);
- material_shader.set_uniform(MaterialShaderGLES2::CONST_LIGHT_MULT, additive ? 0.0 : 1.0);
-
- _render(e->geometry, material, skeleton, e->owner, e->instance->transform);
- DEBUG_TEST_ERROR("Rendering");
-
- prev_material = material;
- prev_skeleton = skeleton;
- prev_geometry_cmp = geometry_cmp;
- prev_light = e->light;
- prev_light_type = e->light_type;
- prev_sort_flags = sort_flags;
- prev_baked_light = baked_light;
- prev_morph_values = morph_values;
- prev_receive_shadows_state = receive_shadows_state;
- }
-
- //print_line("shaderchanges: "+itos(p_alpha_pass)+": "+itos(_rinfo.shader_change_count));
-
- if (current_rt && current_rt_vflip) {
- glFrontFace(GL_CW);
- }
-};
-
-void RasterizerGLES2::_copy_to_texscreen() {
-
- //what am i missing?
- glDisable(GL_CULL_FACE);
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_SCISSOR_TEST);
-#ifdef GLEW_ENABLED
- glDisable(GL_POINT_SPRITE);
- glDisable(GL_VERTEX_PROGRAM_POINT_SIZE);
-#endif
- glDisable(GL_BLEND);
- glBlendEquation(GL_FUNC_ADD);
- if (current_rt && current_rt_transparent) {
- glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
- } else {
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
- //glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-
- for (int i = 0; i < VS::ARRAY_MAX; i++) {
- glDisableVertexAttribArray(i);
- }
-
- glActiveTexture(GL_TEXTURE0);
-
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.sample_fbo);
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, framebuffer.color);
- copy_shader.bind();
- _copy_screen_quad();
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.fbo);
-}
-
-void RasterizerGLES2::_copy_screen_quad() {
-
- Vector2 dst_pos[4] = {
- Vector2(-1, 1),
- Vector2(1, 1),
- Vector2(1, -1),
- Vector2(-1, -1)
- };
-
- Size2 uvscale(
- (viewport.width / float(framebuffer.scale)) / framebuffer.width,
- (viewport.height / float(framebuffer.scale)) / framebuffer.height);
-
- Vector2 src_uv[4] = {
- Vector2(0, 1) * uvscale,
- Vector2(1, 1) * uvscale,
- Vector2(1, 0) * uvscale,
- Vector2(0, 0) * uvscale
- };
-
- Vector2 full_uv[4] = {
- Vector2(0, 1),
- Vector2(1, 1),
- Vector2(1, 0),
- Vector2(0, 0)
- };
-
- _draw_gui_primitive2(4, dst_pos, NULL, src_uv, full_uv);
-}
-
-void RasterizerGLES2::_process_glow_bloom() {
-
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.blur[0].fbo);
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, framebuffer.color);
- copy_shader.set_conditional(CopyShaderGLES2::USE_GLOW_COPY, true);
- if (current_vd && current_env->fx_enabled[VS::ENV_FX_HDR]) {
-
- copy_shader.set_conditional(CopyShaderGLES2::USE_HDR, true);
- }
-
- copy_shader.bind();
- copy_shader.set_uniform(CopyShaderGLES2::BLOOM, float(current_env->fx_param[VS::ENV_FX_PARAM_GLOW_BLOOM]));
- copy_shader.set_uniform(CopyShaderGLES2::BLOOM_THRESHOLD, float(current_env->fx_param[VS::ENV_FX_PARAM_GLOW_BLOOM_THRESHOLD]));
- glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::SOURCE), 0);
-
- if (current_vd && current_env->fx_enabled[VS::ENV_FX_HDR]) {
- glActiveTexture(GL_TEXTURE2);
- glBindTexture(GL_TEXTURE_2D, current_vd->lum_color);
- glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::HDR_SOURCE), 2);
- copy_shader.set_uniform(CopyShaderGLES2::TONEMAP_EXPOSURE, float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_EXPOSURE]));
- copy_shader.set_uniform(CopyShaderGLES2::TONEMAP_WHITE, float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_WHITE]));
- //copy_shader.set_uniform(CopyShaderGLES2::TONEMAP_WHITE,1.0);
- copy_shader.set_uniform(CopyShaderGLES2::HDR_GLOW_THRESHOLD, float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_GLOW_THRESHOLD]));
- copy_shader.set_uniform(CopyShaderGLES2::HDR_GLOW_SCALE, float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_GLOW_SCALE]));
-
- glActiveTexture(GL_TEXTURE0);
- }
-
- glViewport(0, 0, framebuffer.blur_size, framebuffer.blur_size);
- _copy_screen_quad();
-
- copy_shader.set_conditional(CopyShaderGLES2::USE_GLOW_COPY, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_HDR, false);
- int passes = current_env->fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_PASSES];
- Vector2 psize(1.0 / framebuffer.blur_size, 1.0 / framebuffer.blur_size);
- float pscale = current_env->fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_SCALE];
- float pmag = current_env->fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_STRENGTH];
-
- for (int i = 0; i < passes; i++) {
-
- static const Vector2 src_uv[4] = {
- Vector2(0, 1),
- Vector2(1, 1),
- Vector2(1, 0),
- Vector2(0, 0)
- };
- static const Vector2 dst_pos[4] = {
- Vector2(-1, 1),
- Vector2(1, 1),
- Vector2(1, -1),
- Vector2(-1, -1)
- };
-
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.blur[1].fbo);
- glBindTexture(GL_TEXTURE_2D, framebuffer.blur[0].color);
- copy_shader.set_conditional(CopyShaderGLES2::BLUR_V_PASS, true);
- copy_shader.set_conditional(CopyShaderGLES2::BLUR_H_PASS, false);
- copy_shader.bind();
- copy_shader.set_uniform(CopyShaderGLES2::PIXEL_SIZE, psize);
- copy_shader.set_uniform(CopyShaderGLES2::PIXEL_SCALE, pscale);
- copy_shader.set_uniform(CopyShaderGLES2::BLUR_MAGNITUDE, pmag);
-
- _draw_gui_primitive(4, dst_pos, NULL, src_uv);
-
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.blur[0].fbo);
- glBindTexture(GL_TEXTURE_2D, framebuffer.blur[1].color);
- copy_shader.set_conditional(CopyShaderGLES2::BLUR_V_PASS, false);
- copy_shader.set_conditional(CopyShaderGLES2::BLUR_H_PASS, true);
- copy_shader.bind();
- copy_shader.set_uniform(CopyShaderGLES2::PIXEL_SIZE, psize);
- copy_shader.set_uniform(CopyShaderGLES2::PIXEL_SCALE, pscale);
- copy_shader.set_uniform(CopyShaderGLES2::BLUR_MAGNITUDE, pmag);
-
- _draw_gui_primitive(4, dst_pos, NULL, src_uv);
- }
-
- copy_shader.set_conditional(CopyShaderGLES2::BLUR_V_PASS, false);
- copy_shader.set_conditional(CopyShaderGLES2::BLUR_H_PASS, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_HDR, false);
-
- //blur it
-}
-
-void RasterizerGLES2::_process_hdr() {
-
- if (framebuffer.luminance.empty()) {
- return;
- }
-
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.luminance[0].fbo);
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, framebuffer.color);
- copy_shader.set_conditional(CopyShaderGLES2::USE_HDR_COPY, true);
- copy_shader.bind();
- glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::SOURCE), 0);
- glViewport(0, 0, framebuffer.luminance[0].size, framebuffer.luminance[0].size);
- _copy_screen_quad();
-
- copy_shader.set_conditional(CopyShaderGLES2::USE_HDR_COPY, false);
- //int passes = current_env->fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_PASSES];
-
- copy_shader.set_conditional(CopyShaderGLES2::USE_HDR_REDUCE, true);
- copy_shader.bind();
-
- for (int i = 1; i < framebuffer.luminance.size(); i++) {
-
- static const Vector2 src_uv[4] = {
- Vector2(0, 1),
- Vector2(1, 1),
- Vector2(1, 0),
- Vector2(0, 0)
- };
- static const Vector2 dst_pos[4] = {
- Vector2(-1, 1),
- Vector2(1, 1),
- Vector2(1, -1),
- Vector2(-1, -1)
- };
-
- Vector2 psize(1.0 / framebuffer.luminance[i - 1].size, 1.0 / framebuffer.luminance[i - 1].size);
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.luminance[i].fbo);
- glBindTexture(GL_TEXTURE_2D, framebuffer.luminance[i - 1].color);
- glViewport(0, 0, framebuffer.luminance[i].size, framebuffer.luminance[i].size);
- glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::SOURCE), 0);
-
- if (framebuffer.luminance[i].size == 1) {
- //last step
- copy_shader.set_conditional(CopyShaderGLES2::USE_HDR_STORE, true);
- copy_shader.bind();
- glActiveTexture(GL_TEXTURE1);
- glBindTexture(GL_TEXTURE_2D, current_vd->lum_color);
- glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::SOURCE_VD_LUM), 1);
- copy_shader.set_uniform(CopyShaderGLES2::HDR_TIME_DELTA, time_delta);
- copy_shader.set_uniform(CopyShaderGLES2::HDR_EXP_ADJ_SPEED, float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_EXPOSURE_ADJUST_SPEED]));
- copy_shader.set_uniform(CopyShaderGLES2::MIN_LUMINANCE, float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_MIN_LUMINANCE]));
- copy_shader.set_uniform(CopyShaderGLES2::MAX_LUMINANCE, float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_MAX_LUMINANCE]));
- glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::SOURCE), 0);
-
- //swap them
- SWAP(current_vd->lum_color, framebuffer.luminance[i].color);
- SWAP(current_vd->lum_fbo, framebuffer.luminance[i].fbo);
- }
-
- copy_shader.set_uniform(CopyShaderGLES2::PIXEL_SIZE, psize);
-
- _draw_gui_primitive(4, dst_pos, NULL, src_uv);
- }
-
- copy_shader.set_conditional(CopyShaderGLES2::USE_HDR_REDUCE, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_HDR_STORE, false);
-
- draw_next_frame = true;
-}
-
-void RasterizerGLES2::_draw_tex_bg() {
-
- glDepthMask(GL_TRUE);
- glEnable(GL_DEPTH_TEST);
- glDisable(GL_CULL_FACE);
- glDisable(GL_BLEND);
- glColorMask(1, 1, 1, 1);
-
- RID texture;
-
- if (current_env->bg_mode == VS::ENV_BG_TEXTURE) {
- texture = current_env->bg_param[VS::ENV_BG_PARAM_TEXTURE];
- } else {
- texture = current_env->bg_param[VS::ENV_BG_PARAM_CUBEMAP];
- }
-
- if (!texture_owner.owns(texture)) {
- return;
- }
-
- Texture *t = texture_owner.get(texture);
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(t->target, t->tex_id);
-
- copy_shader.set_conditional(CopyShaderGLES2::USE_ENERGY, true);
-
- if (current_env->bg_mode == VS::ENV_BG_TEXTURE) {
- copy_shader.set_conditional(CopyShaderGLES2::USE_CUBEMAP, false);
-
- } else {
- copy_shader.set_conditional(CopyShaderGLES2::USE_CUBEMAP, true);
- }
-
- copy_shader.set_conditional(CopyShaderGLES2::USE_CUSTOM_ALPHA, true);
-
- copy_shader.bind();
-
- if (current_env->bg_mode == VS::ENV_BG_TEXTURE) {
- glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::SOURCE), 0);
- } else {
- glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::SOURCE_CUBE), 0);
- }
-
- float nrg = float(current_env->bg_param[VS::ENV_BG_PARAM_ENERGY]);
- if (current_env->fx_enabled[VS::ENV_FX_HDR] && !use_fp16_fb)
- nrg *= 0.25; //go down a quarter for hdr
- copy_shader.set_uniform(CopyShaderGLES2::ENERGY, nrg);
- copy_shader.set_uniform(CopyShaderGLES2::CUSTOM_ALPHA, float(current_env->bg_param[VS::ENV_BG_PARAM_GLOW]));
-
- float flip_sign = (current_env->bg_mode == VS::ENV_BG_TEXTURE && current_rt && current_rt_vflip) ? -1 : 1;
-
- Vector3 vertices[4] = {
- Vector3(-1, -1 * flip_sign, 1),
- Vector3(1, -1 * flip_sign, 1),
- Vector3(1, 1 * flip_sign, 1),
- Vector3(-1, 1 * flip_sign, 1)
- };
-
- Vector3 src_uv[4] = {
- Vector3(0, 1, 0),
- Vector3(1, 1, 0),
- Vector3(1, 0, 0),
- Vector3(0, 0, 0)
- };
-
- if (current_env->bg_mode == VS::ENV_BG_TEXTURE) {
-
- //regular texture
- //adjust aspect
-
- float aspect_t = t->width / float(t->height);
- float aspect_v = viewport.width / float(viewport.height);
-
- if (aspect_v > aspect_t) {
- //wider than texture
- for (int i = 0; i < 4; i++) {
- src_uv[i].y = (src_uv[i].y - 0.5) * (aspect_t / aspect_v) + 0.5;
- }
-
- } else {
- //narrower than texture
- for (int i = 0; i < 4; i++) {
- src_uv[i].x = (src_uv[i].x - 0.5) * (aspect_v / aspect_t) + 0.5;
- }
- }
-
- float scale = current_env->bg_param[VS::ENV_BG_PARAM_SCALE];
- for (int i = 0; i < 4; i++) {
-
- src_uv[i].x *= scale;
- src_uv[i].y *= scale;
- }
- } else {
-
- //skybox uv vectors
- float vw, vh, zn;
- camera_projection.get_viewport_size(vw, vh);
- zn = camera_projection.get_z_near();
-
- float scale = current_env->bg_param[VS::ENV_BG_PARAM_SCALE];
-
- for (int i = 0; i < 4; i++) {
-
- Vector3 uv = src_uv[i];
- uv.x = (uv.x * 2.0 - 1.0) * vw * scale;
- uv.y = -(uv.y * 2.0 - 1.0) * vh * scale;
- uv.z = -zn;
- src_uv[i] = camera_transform.basis.xform(uv).normalized();
- src_uv[i].z = -src_uv[i].z;
- }
- }
-
- _draw_primitive(4, vertices, NULL, NULL, src_uv);
-
- copy_shader.set_conditional(CopyShaderGLES2::USE_ENERGY, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_RGBE, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_CUBEMAP, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_CUSTOM_ALPHA, false);
-}
-
-void RasterizerGLES2::end_scene() {
-
- glEnable(GL_BLEND);
- glDepthMask(GL_TRUE);
- glEnable(GL_DEPTH_TEST);
- glDisable(GL_SCISSOR_TEST);
-
- bool use_fb = false;
-
- if (framebuffer.active) {
-
- //detect when to use the framebuffer object
- if (using_canvas_bg || texscreen_used || framebuffer.scale != 1) {
- use_fb = true;
- } else if (current_env) {
- use_fb = false;
- for (int i = 0; i < VS::ENV_FX_MAX; i++) {
-
- if (i == VS::ENV_FX_FOG) //does not need fb
- continue;
-
- if (current_env->fx_enabled[i]) {
- use_fb = true;
- break;
- }
- }
- }
- }
-
- if (use_fb) {
-
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.fbo);
- glViewport(0, 0, viewport.width / framebuffer.scale, viewport.height / framebuffer.scale);
- glScissor(0, 0, viewport.width / framebuffer.scale, viewport.height / framebuffer.scale);
-
- material_shader.set_conditional(MaterialShaderGLES2::USE_8BIT_HDR, !use_fp16_fb && current_env && current_env->fx_enabled[VS::ENV_FX_HDR]);
-
- } else {
- if (current_rt) {
- glScissor(0, 0, viewport.width, viewport.height);
- } else {
- glScissor(viewport.x, window_size.height - (viewport.height + viewport.y), viewport.width, viewport.height);
- }
- }
-
- glEnable(GL_SCISSOR_TEST);
- _glClearDepth(1.0);
-
- bool draw_tex_background = false;
-
- if (current_debug == VS::SCENARIO_DEBUG_OVERDRAW) {
-
- glClearColor(0, 0, 0, 1);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- } else if (current_rt && current_rt_transparent) {
-
- glClearColor(0, 0, 0, 0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- } else if (current_env) {
-
- switch (current_env->bg_mode) {
-
- case VS::ENV_BG_CANVAS:
- case VS::ENV_BG_KEEP: {
- //copy from framebuffer if framebuffer
- glClear(GL_DEPTH_BUFFER_BIT);
- } break;
- case VS::ENV_BG_DEFAULT_COLOR:
- case VS::ENV_BG_COLOR: {
-
- Color bgcolor;
- if (current_env->bg_mode == VS::ENV_BG_COLOR)
- bgcolor = current_env->bg_param[VS::ENV_BG_PARAM_COLOR];
- else
- bgcolor = ProjectSettings::get_singleton()->get("render/default_clear_color");
- bgcolor = _convert_color(bgcolor);
- float a = use_fb ? float(current_env->bg_param[VS::ENV_BG_PARAM_GLOW]) : 1.0;
- glClearColor(bgcolor.r, bgcolor.g, bgcolor.b, a);
- _glClearDepth(1.0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- } break;
- case VS::ENV_BG_TEXTURE:
- case VS::ENV_BG_CUBEMAP: {
-
- glClear(GL_DEPTH_BUFFER_BIT);
- draw_tex_background = true;
- } break;
- }
- } else {
-
- Color c = _convert_color(Color(0.3, 0.3, 0.3));
- glClearColor(c.r, c.g, c.b, 0.0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- }
-
- glDisable(GL_SCISSOR_TEST);
-
- //material_shader.set_uniform_camera(MaterialShaderGLES2::PROJECTION_MATRIX, camera_projection);
-
- /*
- printf("setting projection to ");
- for (int i=0; i<16; i++) {
- printf("%f, ", ((float*)camera_projection.matrix)[i]);
- };
- printf("\n");
-
- print_line(String("setting camera to ")+camera_transform_inverse);
- */
- //material_shader.set_uniform_default(MaterialShaderGLES2::CAMERA_INVERSE, camera_transform_inverse);
-
- current_depth_test = true;
- current_depth_mask = true;
- texscreen_copied = false;
- glBlendEquation(GL_FUNC_ADD);
- if (current_rt && current_rt_transparent) {
- glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
- } else {
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
- glDisable(GL_BLEND);
- current_blend_mode = VS::MATERIAL_BLEND_MODE_MIX;
-
- //material_shader.set_conditional(MaterialShaderGLES2::USE_GLOW,current_env && current_env->fx_enabled[VS::ENV_FX_GLOW]);
- opaque_render_list.sort_mat_light_type_flags();
- _render_list_forward(&opaque_render_list, camera_transform, camera_transform_inverse, camera_projection, false, fragment_lighting);
-
- if (draw_tex_background) {
-
- //most 3D vendors recommend drawing a texture bg or skybox here,
- //after opaque geometry has been drawn
- //so the zbuffer can get rid of most pixels
- _draw_tex_bg();
- }
-
- glBlendEquation(GL_FUNC_ADD);
- if (current_rt && current_rt_transparent) {
- glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
- } else {
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
- glDisable(GL_BLEND);
- current_blend_mode = VS::MATERIAL_BLEND_MODE_MIX;
- material_shader.set_conditional(MaterialShaderGLES2::USE_GLOW, false);
- if (current_env && current_env->fx_enabled[VS::ENV_FX_GLOW]) {
- glColorMask(1, 1, 1, 0); //don't touch alpha
- }
-
- alpha_render_list.sort_z();
- _render_list_forward(&alpha_render_list, camera_transform, camera_transform_inverse, camera_projection, false, fragment_lighting, true);
- glColorMask(1, 1, 1, 1);
-
- //material_shader.set_conditional( MaterialShaderGLES2::USE_FOG,false);
-
- DEBUG_TEST_ERROR("Drawing Scene");
-
-#ifdef GLEW_ENABLED
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
-#endif
-
- if (use_fb) {
-
- for (int i = 0; i < VS::ARRAY_MAX; i++) {
- glDisableVertexAttribArray(i);
- }
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
- glDisable(GL_BLEND);
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_CULL_FACE);
- glDisable(GL_SCISSOR_TEST);
- glDepthMask(false);
-
- if (current_env && current_env->fx_enabled[VS::ENV_FX_HDR]) {
-
- int hdr_tm = current_env->fx_param[VS::ENV_FX_PARAM_HDR_TONEMAPPER];
- switch (hdr_tm) {
- case VS::ENV_FX_HDR_TONE_MAPPER_LINEAR: {
-
- } break;
- case VS::ENV_FX_HDR_TONE_MAPPER_LOG: {
- copy_shader.set_conditional(CopyShaderGLES2::USE_LOG_TONEMAPPER, true);
-
- } break;
- case VS::ENV_FX_HDR_TONE_MAPPER_REINHARDT: {
- copy_shader.set_conditional(CopyShaderGLES2::USE_REINHARDT_TONEMAPPER, true);
- } break;
- case VS::ENV_FX_HDR_TONE_MAPPER_REINHARDT_AUTOWHITE: {
-
- copy_shader.set_conditional(CopyShaderGLES2::USE_REINHARDT_TONEMAPPER, true);
- copy_shader.set_conditional(CopyShaderGLES2::USE_AUTOWHITE, true);
- } break;
- }
-
- _process_hdr();
- }
- if (current_env && current_env->fx_enabled[VS::ENV_FX_GLOW]) {
- _process_glow_bloom();
- int glow_transfer_mode = current_env->fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_BLEND_MODE];
- if (glow_transfer_mode == 1)
- copy_shader.set_conditional(CopyShaderGLES2::USE_GLOW_SCREEN, true);
- if (glow_transfer_mode == 2)
- copy_shader.set_conditional(CopyShaderGLES2::USE_GLOW_SOFTLIGHT, true);
- }
-
- glBindFramebuffer(GL_FRAMEBUFFER, current_rt ? current_rt->fbo : base_framebuffer);
-
- Size2 size;
- if (current_rt) {
- glBindFramebuffer(GL_FRAMEBUFFER, current_rt->fbo);
- glViewport(0, 0, viewport.width, viewport.height);
- size = Size2(viewport.width, viewport.height);
- } else {
- glBindFramebuffer(GL_FRAMEBUFFER, base_framebuffer);
- glViewport(viewport.x, window_size.height - (viewport.height + viewport.y), viewport.width, viewport.height);
- size = Size2(viewport.width, viewport.height);
- }
-
- //time to copy!!!
- copy_shader.set_conditional(CopyShaderGLES2::USE_BCS, current_env && current_env->fx_enabled[VS::ENV_FX_BCS]);
- copy_shader.set_conditional(CopyShaderGLES2::USE_SRGB, current_env && current_env->fx_enabled[VS::ENV_FX_SRGB]);
- copy_shader.set_conditional(CopyShaderGLES2::USE_GLOW, current_env && current_env->fx_enabled[VS::ENV_FX_GLOW]);
- copy_shader.set_conditional(CopyShaderGLES2::USE_HDR, current_env && current_env->fx_enabled[VS::ENV_FX_HDR]);
- copy_shader.set_conditional(CopyShaderGLES2::USE_NO_ALPHA, true);
- copy_shader.set_conditional(CopyShaderGLES2::USE_FXAA, current_env && current_env->fx_enabled[VS::ENV_FX_FXAA]);
-
- copy_shader.bind();
- //copy_shader.set_uniform(CopyShaderGLES2::SOURCE,0);
-
- if (current_env && current_env->fx_enabled[VS::ENV_FX_GLOW]) {
-
- glActiveTexture(GL_TEXTURE1);
- glBindTexture(GL_TEXTURE_2D, framebuffer.blur[0].color);
- glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::GLOW_SOURCE), 1);
- }
-
- if (current_env && current_env->fx_enabled[VS::ENV_FX_HDR]) {
-
- glActiveTexture(GL_TEXTURE2);
- glBindTexture(GL_TEXTURE_2D, current_vd->lum_color);
- glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::HDR_SOURCE), 2);
- copy_shader.set_uniform(CopyShaderGLES2::TONEMAP_EXPOSURE, float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_EXPOSURE]));
- copy_shader.set_uniform(CopyShaderGLES2::TONEMAP_WHITE, float(current_env->fx_param[VS::ENV_FX_PARAM_HDR_WHITE]));
- }
-
- if (current_env && current_env->fx_enabled[VS::ENV_FX_FXAA])
- copy_shader.set_uniform(CopyShaderGLES2::PIXEL_SIZE, Size2(1.0 / size.x, 1.0 / size.y));
-
- if (current_env && current_env->fx_enabled[VS::ENV_FX_BCS]) {
-
- Vector3 bcs;
- bcs.x = current_env->fx_param[VS::ENV_FX_PARAM_BCS_BRIGHTNESS];
- bcs.y = current_env->fx_param[VS::ENV_FX_PARAM_BCS_CONTRAST];
- bcs.z = current_env->fx_param[VS::ENV_FX_PARAM_BCS_SATURATION];
- copy_shader.set_uniform(CopyShaderGLES2::BCS, bcs);
- }
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, framebuffer.color);
- glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::SOURCE), 0);
-
- _copy_screen_quad();
-
- copy_shader.set_conditional(CopyShaderGLES2::USE_BCS, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_SRGB, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_GLOW, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_HDR, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_NO_ALPHA, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_FXAA, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_GLOW_SCREEN, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_GLOW_SOFTLIGHT, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_REINHARDT_TONEMAPPER, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_AUTOWHITE, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_LOG_TONEMAPPER, false);
-
- material_shader.set_conditional(MaterialShaderGLES2::USE_8BIT_HDR, false);
-
- if (current_env && current_env->fx_enabled[VS::ENV_FX_HDR] && GLOBAL_DEF("rasterizer/debug_hdr", false)) {
- _debug_luminances();
- }
- }
-
- current_env = NULL;
- current_debug = VS::SCENARIO_DEBUG_DISABLED;
- if (GLOBAL_DEF("rasterizer/debug_shadow_maps", false)) {
- _debug_shadows();
- }
- //_debug_luminances();
- //_debug_samplers();
-
- if (using_canvas_bg) {
- using_canvas_bg = false;
- glColorMask(1, 1, 1, 1); //don't touch alpha
- }
-}
-void RasterizerGLES2::end_shadow_map() {
-
- ERR_FAIL_COND(!shadow);
-
- glDisable(GL_BLEND);
- glDisable(GL_SCISSOR_TEST);
- glDisable(GL_DITHER);
- glEnable(GL_DEPTH_TEST);
- glDepthMask(true);
-
- ShadowBuffer *sb = shadow->near_shadow_buffer;
-
- ERR_FAIL_COND(!sb);
-
- glBindFramebuffer(GL_FRAMEBUFFER, sb->fbo);
-
- if (!use_rgba_shadowmaps)
- glColorMask(0, 0, 0, 0);
-
- //glEnable(GL_POLYGON_OFFSET_FILL);
- //glPolygonOffset( 8.0f, 16.0f);
-
- CameraMatrix cm;
- float z_near, z_far;
- Transform light_transform;
-
- float dp_direction = 0.0;
- bool flip_facing = false;
- Rect2 vp_rect;
-
- switch (shadow->base->type) {
-
- case VS::LIGHT_DIRECTIONAL: {
-
- if (shadow->base->directional_shadow_mode == VS::LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS) {
-
- cm = shadow->custom_projection[shadow_pass];
- light_transform = shadow->custom_transform[shadow_pass];
-
- if (shadow_pass == 0) {
-
- vp_rect = Rect2(0, sb->size / 2, sb->size / 2, sb->size / 2);
- glViewport(0, sb->size / 2, sb->size / 2, sb->size / 2);
- glScissor(0, sb->size / 2, sb->size / 2, sb->size / 2);
- } else if (shadow_pass == 1) {
-
- vp_rect = Rect2(0, 0, sb->size / 2, sb->size / 2);
- glViewport(0, 0, sb->size / 2, sb->size / 2);
- glScissor(0, 0, sb->size / 2, sb->size / 2);
-
- } else if (shadow_pass == 2) {
-
- vp_rect = Rect2(sb->size / 2, sb->size / 2, sb->size / 2, sb->size / 2);
- glViewport(sb->size / 2, sb->size / 2, sb->size / 2, sb->size / 2);
- glScissor(sb->size / 2, sb->size / 2, sb->size / 2, sb->size / 2);
- } else if (shadow_pass == 3) {
-
- vp_rect = Rect2(sb->size / 2, 0, sb->size / 2, sb->size / 2);
- glViewport(sb->size / 2, 0, sb->size / 2, sb->size / 2);
- glScissor(sb->size / 2, 0, sb->size / 2, sb->size / 2);
- }
-
- glEnable(GL_SCISSOR_TEST);
-
- } else if (shadow->base->directional_shadow_mode == VS::LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS) {
-
- if (shadow_pass == 0) {
-
- cm = shadow->custom_projection[0];
- light_transform = shadow->custom_transform[0];
- vp_rect = Rect2(0, sb->size / 2, sb->size, sb->size / 2);
- glViewport(0, sb->size / 2, sb->size, sb->size / 2);
- glScissor(0, sb->size / 2, sb->size, sb->size / 2);
- } else {
-
- cm = shadow->custom_projection[1];
- light_transform = shadow->custom_transform[1];
- vp_rect = Rect2(0, 0, sb->size, sb->size / 2);
- glViewport(0, 0, sb->size, sb->size / 2);
- glScissor(0, 0, sb->size, sb->size / 2);
- }
-
- glEnable(GL_SCISSOR_TEST);
-
- } else {
- cm = shadow->custom_projection[0];
- light_transform = shadow->custom_transform[0];
- vp_rect = Rect2(0, 0, sb->size, sb->size);
- glViewport(0, 0, sb->size, sb->size);
- }
-
- z_near = cm.get_z_near();
- z_far = cm.get_z_far();
-
- _glClearDepth(1.0f);
- glClearColor(1, 1, 1, 1);
-
- if (use_rgba_shadowmaps)
- glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- else
- glClear(GL_DEPTH_BUFFER_BIT);
-
- glDisable(GL_SCISSOR_TEST);
-
- } break;
- case VS::LIGHT_OMNI: {
-
- material_shader.set_conditional(MaterialShaderGLES2::USE_DUAL_PARABOLOID, true);
- dp_direction = shadow_pass ? 1.0 : -1.0;
- flip_facing = (shadow_pass == 1);
- light_transform = shadow->transform;
- z_near = 0;
- z_far = shadow->base->vars[VS::LIGHT_PARAM_RADIUS];
- shadow->dp.x = 1.0 / z_far;
- shadow->dp.y = dp_direction;
-
- if (shadow_pass == 0) {
- vp_rect = Rect2(0, sb->size / 2, sb->size, sb->size / 2);
- glViewport(0, sb->size / 2, sb->size, sb->size / 2);
- glScissor(0, sb->size / 2, sb->size, sb->size / 2);
- } else {
- vp_rect = Rect2(0, 0, sb->size, sb->size / 2);
- glViewport(0, 0, sb->size, sb->size / 2);
- glScissor(0, 0, sb->size, sb->size / 2);
- }
- glEnable(GL_SCISSOR_TEST);
- shadow->projection = cm;
-
- glClearColor(1, 1, 1, 1);
- _glClearDepth(1.0f);
- if (use_rgba_shadowmaps)
- glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- else
- glClear(GL_DEPTH_BUFFER_BIT);
- glDisable(GL_SCISSOR_TEST);
-
- } break;
- case VS::LIGHT_SPOT: {
-
- float far = shadow->base->vars[VS::LIGHT_PARAM_RADIUS];
- ERR_FAIL_COND(far <= 0);
- float near = far / 200.0;
- if (near < 0.05)
- near = 0.05;
-
- float angle = shadow->base->vars[VS::LIGHT_PARAM_SPOT_ANGLE];
-
- cm.set_perspective(angle * 2.0, 1.0, near, far);
-
- shadow->projection = cm; // cache
- light_transform = shadow->transform;
- z_near = cm.get_z_near();
- z_far = cm.get_z_far();
-
- glViewport(0, 0, sb->size, sb->size);
- vp_rect = Rect2(0, 0, sb->size, sb->size);
- _glClearDepth(1.0f);
- glClearColor(1, 1, 1, 1);
- if (use_rgba_shadowmaps)
- glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
- else
- glClear(GL_DEPTH_BUFFER_BIT);
-
- } break;
- }
-
- Transform light_transform_inverse = light_transform.affine_inverse();
-
- opaque_render_list.sort_mat_geom();
- _render_list_forward(&opaque_render_list, light_transform, light_transform_inverse, cm, flip_facing, false);
-
- material_shader.set_conditional(MaterialShaderGLES2::USE_DUAL_PARABOLOID, false);
-
- //if (!use_rgba_shadowmaps)
-
- if (shadow_filter == SHADOW_FILTER_ESM) {
-
- copy_shader.set_conditional(CopyShaderGLES2::USE_RGBA_DEPTH, use_rgba_shadowmaps);
- copy_shader.set_conditional(CopyShaderGLES2::USE_HIGHP_SOURCE, !use_rgba_shadowmaps);
-
- Vector2 psize(1.0 / sb->size, 1.0 / sb->size);
- float pscale = 1.0;
- int passes = shadow->base->vars[VS::LIGHT_PARAM_SHADOW_BLUR_PASSES];
- glDisable(GL_BLEND);
- glDisable(GL_CULL_FACE);
-#ifdef GLEW_ENABLED
- glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
-#endif
-
- for (int i = 0; i < VS::ARRAY_MAX; i++) {
- glDisableVertexAttribArray(i);
- }
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
- glDisable(GL_SCISSOR_TEST);
-
- if (!use_rgba_shadowmaps) {
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(GL_ALWAYS);
- glDepthMask(true);
- } else {
- glDisable(GL_DEPTH_TEST);
- }
-
- for (int i = 0; i < passes; i++) {
-
- Vector2 src_sb_uv[4] = {
- (vp_rect.pos + Vector2(0, vp_rect.size.y)) / sb->size,
- (vp_rect.pos + vp_rect.size) / sb->size,
- (vp_rect.pos + Vector2(vp_rect.size.x, 0)) / sb->size,
- (vp_rect.pos) / sb->size
- };
- /*
- Vector2 src_uv[4]={
- Vector2( 0, 1),
- Vector2( 1, 1),
- Vector2( 1, 0),
- Vector2( 0, 0)
- };
-*/
- static const Vector2 dst_pos[4] = {
- Vector2(-1, 1),
- Vector2(1, 1),
- Vector2(1, -1),
- Vector2(-1, -1)
- };
-
- glBindFramebuffer(GL_FRAMEBUFFER, blur_shadow_buffer.fbo);
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, sb->depth);
-#ifdef GLEW_ENABLED
-//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE);
-#endif
-
- copy_shader.set_conditional(CopyShaderGLES2::SHADOW_BLUR_V_PASS, true);
- copy_shader.set_conditional(CopyShaderGLES2::SHADOW_BLUR_H_PASS, false);
-
- copy_shader.bind();
- copy_shader.set_uniform(CopyShaderGLES2::PIXEL_SIZE, psize);
- copy_shader.set_uniform(CopyShaderGLES2::PIXEL_SCALE, pscale);
- copy_shader.set_uniform(CopyShaderGLES2::BLUR_MAGNITUDE, 1);
- //copy_shader.set_uniform(CopyShaderGLES2::SOURCE,0);
- glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::SOURCE), 0);
-
- _draw_gui_primitive(4, dst_pos, NULL, src_sb_uv);
-
- Vector2 src_bb_uv[4] = {
- (vp_rect.pos + Vector2(0, vp_rect.size.y)) / blur_shadow_buffer.size,
- (vp_rect.pos + vp_rect.size) / blur_shadow_buffer.size,
- (vp_rect.pos + Vector2(vp_rect.size.x, 0)) / blur_shadow_buffer.size,
- (vp_rect.pos) / blur_shadow_buffer.size,
- };
-
- glBindFramebuffer(GL_FRAMEBUFFER, sb->fbo);
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, blur_shadow_buffer.depth);
-#ifdef GLEW_ENABLED
-
-//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE);
-#endif
-
- copy_shader.set_conditional(CopyShaderGLES2::SHADOW_BLUR_V_PASS, false);
- copy_shader.set_conditional(CopyShaderGLES2::SHADOW_BLUR_H_PASS, true);
- copy_shader.bind();
- copy_shader.set_uniform(CopyShaderGLES2::PIXEL_SIZE, psize);
- copy_shader.set_uniform(CopyShaderGLES2::PIXEL_SCALE, pscale);
- copy_shader.set_uniform(CopyShaderGLES2::BLUR_MAGNITUDE, 1);
- glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::SOURCE), 0);
-
- _draw_gui_primitive(4, dst_pos, NULL, src_bb_uv);
- }
-
- glDepthFunc(GL_LEQUAL);
- copy_shader.set_conditional(CopyShaderGLES2::USE_RGBA_DEPTH, false);
- copy_shader.set_conditional(CopyShaderGLES2::USE_HIGHP_SOURCE, false);
- copy_shader.set_conditional(CopyShaderGLES2::SHADOW_BLUR_V_PASS, false);
- copy_shader.set_conditional(CopyShaderGLES2::SHADOW_BLUR_H_PASS, false);
- }
-
- DEBUG_TEST_ERROR("Drawing Shadow");
- shadow = NULL;
- glBindFramebuffer(GL_FRAMEBUFFER, current_rt ? current_rt->fbo : base_framebuffer);
- glColorMask(1, 1, 1, 1);
- //glDisable(GL_POLYGON_OFFSET_FILL);
-}
-
-void RasterizerGLES2::_debug_draw_shadow(GLuint tex, const Rect2 &p_rect) {
-
- Transform2D modelview;
- modelview.translate(p_rect.pos.x, p_rect.pos.y);
- canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX, modelview);
- glBindTexture(GL_TEXTURE_2D, tex);
-
- Vector3 coords[4] = {
- Vector3(p_rect.pos.x, p_rect.pos.y, 0),
- Vector3(p_rect.pos.x + p_rect.size.width,
- p_rect.pos.y, 0),
- Vector3(p_rect.pos.x + p_rect.size.width,
- p_rect.pos.y + p_rect.size.height, 0),
- Vector3(p_rect.pos.x,
- p_rect.pos.y + p_rect.size.height, 0)
- };
-
- Vector3 texcoords[4] = {
- Vector3(0.0f, 0.0f, 0),
- Vector3(1.0f, 0.0f, 0),
- Vector3(1.0f, 1.0f, 0),
- Vector3(0.0f, 1.0f, 0),
- };
-
- _draw_primitive(4, coords, 0, 0, texcoords);
- //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);
-}
-
-void RasterizerGLES2::_debug_draw_shadows_type(Vector<ShadowBuffer> &p_shadows, Point2 &ofs) {
-
- Size2 debug_size(128, 128);
- //Size2 debug_size(512,512);
-
- int useblur = shadow_filter == SHADOW_FILTER_ESM ? 1 : 0;
- for (int i = 0; i < p_shadows.size() + useblur; i++) {
-
- ShadowBuffer *sb = i == p_shadows.size() ? &blur_shadow_buffer : &p_shadows[i];
-
- if (!sb->owner && i != p_shadows.size())
- continue;
-
- _debug_draw_shadow(sb->depth, Rect2(ofs, debug_size));
- ofs.x += debug_size.x;
- if ((ofs.x + debug_size.x) > viewport.width) {
-
- ofs.x = 0;
- ofs.y += debug_size.y;
- }
- }
-}
-
-void RasterizerGLES2::_debug_luminances() {
-
- canvas_shader.set_conditional(CanvasShaderGLES2::DEBUG_ENCODED_32, !use_fp16_fb);
- canvas_begin();
- glDisable(GL_BLEND);
- canvas_shader.bind();
-
- Size2 debug_size(128, 128);
- Size2 ofs;
-
- for (int i = 0; i <= framebuffer.luminance.size(); i++) {
-
- if (i == framebuffer.luminance.size()) {
- if (!current_vd)
- break;
- _debug_draw_shadow(current_vd->lum_color, Rect2(ofs, debug_size));
- } else {
- _debug_draw_shadow(framebuffer.luminance[i].color, Rect2(ofs, debug_size));
- }
- ofs.x += debug_size.x / 2;
- if ((ofs.x + debug_size.x) > viewport.width) {
-
- ofs.x = 0;
- ofs.y += debug_size.y;
- }
- }
-
- canvas_shader.set_conditional(CanvasShaderGLES2::DEBUG_ENCODED_32, false);
-}
-
-void RasterizerGLES2::_debug_samplers() {
- canvas_shader.set_conditional(CanvasShaderGLES2::DEBUG_ENCODED_32, false);
- canvas_begin();
- glDisable(GL_BLEND);
- _set_color_attrib(Color(1, 1, 1, 1));
- canvas_shader.bind();
-
- List<RID> samplers;
- sampled_light_owner.get_owned_list(&samplers);
-
- Size2 debug_size(128, 128);
- Size2 ofs;
-
- for (List<RID>::Element *E = samplers.front(); E; E = E->next()) {
-
- SampledLight *sl = sampled_light_owner.get(E->get());
-
- _debug_draw_shadow(sl->texture, Rect2(ofs, debug_size));
-
- ofs.x += debug_size.x / 2;
- if ((ofs.x + debug_size.x) > viewport.width) {
-
- ofs.x = 0;
- ofs.y += debug_size.y;
- }
- }
-}
-void RasterizerGLES2::_debug_shadows() {
-
- canvas_begin();
- glDisable(GL_BLEND);
- Size2 ofs;
-
- /*
- for(int i=0;i<16;i++) {
- glActiveTexture(GL_TEXTURE0+i);
- //glDisable(GL_TEXTURE_2D);
- }
- glActiveTexture(GL_TEXTURE0);
- //glEnable(GL_TEXTURE_2D);
- */
-
- _debug_draw_shadows_type(near_shadow_buffers, ofs);
- //_debug_draw_shadows_type(far_shadow_buffers,ofs);
-}
-
-void RasterizerGLES2::end_frame() {
-
- //print_line("VTX: "+itos(_rinfo.vertex_count)+" OBJ: "+itos(_rinfo.object_count)+" MAT: "+itos(_rinfo.mat_change_count)+" SHD: "+itos(_rinfo.shader_change_count)+" CI: "+itos(_rinfo.ci_draw_commands));
-
- //print_line("TOTAL VTX: "+itos(_rinfo.vertex_count));
- OS::get_singleton()->swap_buffers();
-}
-
-void RasterizerGLES2::flush_frame() {
-
- glFlush();
-}
-
-/* CANVAS API */
-
-void RasterizerGLES2::begin_canvas_bg() {
-
- if (framebuffer.active) {
- using_canvas_bg = true;
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.fbo);
- glViewport(0, 0, viewport.width, viewport.height);
- } else {
- using_canvas_bg = false;
- }
-}
-
-void RasterizerGLES2::canvas_begin() {
-
- if (using_canvas_bg) {
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.fbo);
- glColorMask(1, 1, 1, 0); //don't touch alpha
- }
-
- glDisable(GL_CULL_FACE);
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_SCISSOR_TEST);
-#ifdef GLEW_ENABLED
- glDisable(GL_POINT_SPRITE);
- glDisable(GL_VERTEX_PROGRAM_POINT_SIZE);
-#endif
- glEnable(GL_BLEND);
- glBlendEquation(GL_FUNC_ADD);
- if (current_rt && current_rt_transparent) {
- glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
- } else {
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
- //glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
- glLineWidth(1.0);
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
- for (int i = 0; i < VS::ARRAY_MAX; i++) {
- glDisableVertexAttribArray(i);
- }
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, white_tex);
- canvas_tex = RID();
- //material_shader.unbind();
- canvas_shader.unbind();
- canvas_shader.set_custom_shader(0);
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_MODULATE, false);
- canvas_shader.bind();
- canvas_shader.set_uniform(CanvasShaderGLES2::TEXTURE, 0);
- canvas_use_modulate = false;
- _set_color_attrib(Color(1, 1, 1));
- canvas_transform = Transform();
- canvas_transform.translate(-(viewport.width / 2.0f), -(viewport.height / 2.0f), 0.0f);
- float csy = 1.0;
- if (current_rt && current_rt_vflip)
- csy = -1.0;
-
- canvas_transform.scale(Vector3(2.0f / viewport.width, csy * -2.0f / viewport.height, 1.0f));
- canvas_shader.set_uniform(CanvasShaderGLES2::PROJECTION_MATRIX, canvas_transform);
- canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX, Transform2D());
- canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX, Transform2D());
-
- canvas_opacity = 1.0;
- canvas_blend_mode = VS::MATERIAL_BLEND_MODE_MIX;
- canvas_texscreen_used = false;
- uses_texpixel_size = false;
-
- canvas_last_material = NULL;
-}
-
-void RasterizerGLES2::canvas_disable_blending() {
-
- glDisable(GL_BLEND);
-}
-
-void RasterizerGLES2::canvas_set_opacity(float p_opacity) {
-
- canvas_opacity = p_opacity;
-}
-
-void RasterizerGLES2::canvas_set_blend_mode(VS::MaterialBlendMode p_mode) {
-
- if (p_mode == canvas_blend_mode)
- return;
- switch (p_mode) {
-
- case VS::MATERIAL_BLEND_MODE_MIX: {
- glBlendEquation(GL_FUNC_ADD);
- if (current_rt && current_rt_transparent) {
- glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
- } else {
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
-
- } break;
- case VS::MATERIAL_BLEND_MODE_ADD: {
-
- glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE);
-
- } break;
- case VS::MATERIAL_BLEND_MODE_SUB: {
-
- glBlendEquation(GL_FUNC_REVERSE_SUBTRACT);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE);
- } break;
- case VS::MATERIAL_BLEND_MODE_MUL: {
- glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(GL_DST_COLOR, GL_ZERO);
- } break;
- case VS::MATERIAL_BLEND_MODE_PREMULT_ALPHA: {
- glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
- } break;
- }
-
- canvas_blend_mode = p_mode;
-}
-
-void RasterizerGLES2::canvas_begin_rect(const Transform2D &p_transform) {
-
- canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX, p_transform);
- canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX, Transform2D());
-}
-
-void RasterizerGLES2::canvas_set_clip(bool p_clip, const Rect2 &p_rect) {
-
- if (p_clip) {
-
- glEnable(GL_SCISSOR_TEST);
- //glScissor(viewport.x+p_rect.pos.x,viewport.y+ (viewport.height-(p_rect.pos.y+p_rect.size.height)),
-
- int x = p_rect.pos.x;
- int y = window_size.height - (p_rect.pos.y + p_rect.size.y);
- int w = p_rect.size.x;
- int h = p_rect.size.y;
-
- glScissor(x, y, w, h);
-
- } else {
-
- glDisable(GL_SCISSOR_TEST);
- }
-}
-
-void RasterizerGLES2::canvas_end_rect() {
-
- //glPopMatrix();
-}
-
-RasterizerGLES2::Texture *RasterizerGLES2::_bind_canvas_texture(const RID &p_texture) {
-
- if (p_texture == canvas_tex && !rebind_texpixel_size) {
- if (canvas_tex.is_valid()) {
- Texture *texture = texture_owner.get(p_texture);
- return texture;
- }
- return NULL;
- }
-
- rebind_texpixel_size = false;
-
- if (p_texture.is_valid()) {
-
- Texture *texture = texture_owner.get(p_texture);
- if (!texture) {
- canvas_tex = RID();
- glBindTexture(GL_TEXTURE_2D, white_tex);
-
- return NULL;
- }
-
- if (texture->render_target)
- texture->render_target->last_pass = frame;
-
- glBindTexture(GL_TEXTURE_2D, texture->tex_id);
- canvas_tex = p_texture;
- if (uses_texpixel_size) {
- canvas_shader.set_uniform(CanvasShaderGLES2::TEXPIXEL_SIZE, Size2(1.0 / texture->width, 1.0 / texture->height));
- }
- return texture;
-
- } else {
-
- glBindTexture(GL_TEXTURE_2D, white_tex);
- canvas_tex = p_texture;
- }
-
- return NULL;
-}
-
-void RasterizerGLES2::canvas_draw_line(const Point2 &p_from, const Point2 &p_to, const Color &p_color, float p_width, bool p_antialiased) {
-
- _bind_canvas_texture(RID());
- Color c = p_color;
- c.a *= canvas_opacity;
- _set_color_attrib(c);
-
- Vector3 verts[2] = {
- Vector3(p_from.x, p_from.y, 0),
- Vector3(p_to.x, p_to.y, 0)
- };
-
-#ifdef GLEW_ENABLED
- if (p_antialiased)
- glEnable(GL_LINE_SMOOTH);
-#endif
- glLineWidth(p_width);
- _draw_primitive(2, verts, 0, 0, 0);
-
-#ifdef GLEW_ENABLED
- if (p_antialiased)
- glDisable(GL_LINE_SMOOTH);
-#endif
-
- _rinfo.ci_draw_commands++;
-}
-
-void RasterizerGLES2::_draw_gui_primitive(int p_points, const Vector2 *p_vertices, const Color *p_colors, const Vector2 *p_uvs) {
-
- static const GLenum prim[5] = { GL_POINTS, GL_POINTS, GL_LINES, GL_TRIANGLES, GL_TRIANGLE_FAN };
-
-//#define GLES_USE_PRIMITIVE_BUFFER
-
-#ifndef GLES_NO_CLIENT_ARRAYS
-
- glEnableVertexAttribArray(VS::ARRAY_VERTEX);
- glVertexAttribPointer(VS::ARRAY_VERTEX, 2, GL_FLOAT, false, sizeof(Vector2), p_vertices);
-
- if (p_colors) {
-
- glEnableVertexAttribArray(VS::ARRAY_COLOR);
- glVertexAttribPointer(VS::ARRAY_COLOR, 4, GL_FLOAT, false, sizeof(Color), p_colors);
- } else {
- glDisableVertexAttribArray(VS::ARRAY_COLOR);
- }
-
- if (p_uvs) {
-
- glEnableVertexAttribArray(VS::ARRAY_TEX_UV);
- glVertexAttribPointer(VS::ARRAY_TEX_UV, 2, GL_FLOAT, false, sizeof(Vector2), p_uvs);
- } else {
- glDisableVertexAttribArray(VS::ARRAY_TEX_UV);
- }
-
- glDrawArrays(prim[p_points], 0, p_points);
-
-#else
-
- glBindBuffer(GL_ARRAY_BUFFER, gui_quad_buffer);
- float b[32];
- int ofs = 0;
- glEnableVertexAttribArray(VS::ARRAY_VERTEX);
- glVertexAttribPointer(VS::ARRAY_VERTEX, 2, GL_FLOAT, false, sizeof(float) * 2, ((float *)0) + ofs);
- for (int i = 0; i < p_points; i++) {
- b[ofs++] = p_vertices[i].x;
- b[ofs++] = p_vertices[i].y;
- }
-
- if (p_colors) {
-
- glEnableVertexAttribArray(VS::ARRAY_COLOR);
- glVertexAttribPointer(VS::ARRAY_COLOR, 4, GL_FLOAT, false, sizeof(float) * 4, ((float *)0) + ofs);
- for (int i = 0; i < p_points; i++) {
- b[ofs++] = p_colors[i].r;
- b[ofs++] = p_colors[i].g;
- b[ofs++] = p_colors[i].b;
- b[ofs++] = p_colors[i].a;
- }
-
- } else {
- glDisableVertexAttribArray(VS::ARRAY_COLOR);
- }
-
- if (p_uvs) {
-
- glEnableVertexAttribArray(VS::ARRAY_TEX_UV);
- glVertexAttribPointer(VS::ARRAY_TEX_UV, 2, GL_FLOAT, false, sizeof(float) * 2, ((float *)0) + ofs);
- for (int i = 0; i < p_points; i++) {
- b[ofs++] = p_uvs[i].x;
- b[ofs++] = p_uvs[i].y;
- }
-
- } else {
- glDisableVertexAttribArray(VS::ARRAY_TEX_UV);
- }
-
- glBufferSubData(GL_ARRAY_BUFFER, 0, ofs * 4, &b[0]);
- glDrawArrays(prim[p_points], 0, p_points);
- glBindBuffer(GL_ARRAY_BUFFER, 0);
-
-#endif
- _rinfo.ci_draw_commands++;
-}
-
-void RasterizerGLES2::_draw_gui_primitive2(int p_points, const Vector2 *p_vertices, const Color *p_colors, const Vector2 *p_uvs, const Vector2 *p_uvs2) {
-
- static const GLenum prim[5] = { GL_POINTS, GL_POINTS, GL_LINES, GL_TRIANGLES, GL_TRIANGLE_FAN };
-
- glEnableVertexAttribArray(VS::ARRAY_VERTEX);
- glVertexAttribPointer(VS::ARRAY_VERTEX, 2, GL_FLOAT, false, sizeof(Vector2), p_vertices);
- if (p_colors) {
-
- glEnableVertexAttribArray(VS::ARRAY_COLOR);
- glVertexAttribPointer(VS::ARRAY_COLOR, 4, GL_FLOAT, false, sizeof(Color), p_colors);
- } else {
- glDisableVertexAttribArray(VS::ARRAY_COLOR);
- }
-
- if (p_uvs) {
-
- glEnableVertexAttribArray(VS::ARRAY_TEX_UV);
- glVertexAttribPointer(VS::ARRAY_TEX_UV, 2, GL_FLOAT, false, sizeof(Vector2), p_uvs);
- } else {
- glDisableVertexAttribArray(VS::ARRAY_TEX_UV);
- }
-
- if (p_uvs2) {
-
- glEnableVertexAttribArray(VS::ARRAY_TEX_UV2);
- glVertexAttribPointer(VS::ARRAY_TEX_UV2, 2, GL_FLOAT, false, sizeof(Vector2), p_uvs2);
- } else {
- glDisableVertexAttribArray(VS::ARRAY_TEX_UV2);
- }
-
- glDrawArrays(prim[p_points], 0, p_points);
- _rinfo.ci_draw_commands++;
-}
-
-void RasterizerGLES2::_draw_textured_quad(const Rect2 &p_rect, const Rect2 &p_src_region, const Size2 &p_tex_size, bool p_h_flip, bool p_v_flip, bool p_transpose) {
-
- Vector2 texcoords[4] = {
- Vector2(p_src_region.pos.x / p_tex_size.width,
- p_src_region.pos.y / p_tex_size.height),
-
- Vector2((p_src_region.pos.x + p_src_region.size.width) / p_tex_size.width,
- p_src_region.pos.y / p_tex_size.height),
-
- Vector2((p_src_region.pos.x + p_src_region.size.width) / p_tex_size.width,
- (p_src_region.pos.y + p_src_region.size.height) / p_tex_size.height),
-
- Vector2(p_src_region.pos.x / p_tex_size.width,
- (p_src_region.pos.y + p_src_region.size.height) / p_tex_size.height)
- };
-
- if (p_transpose) {
- SWAP(texcoords[1], texcoords[3]);
- }
- if (p_h_flip) {
- SWAP(texcoords[0], texcoords[1]);
- SWAP(texcoords[2], texcoords[3]);
- }
- if (p_v_flip) {
- SWAP(texcoords[1], texcoords[2]);
- SWAP(texcoords[0], texcoords[3]);
- }
-
- Vector2 coords[4] = {
- Vector2(p_rect.pos.x, p_rect.pos.y),
- Vector2(p_rect.pos.x + p_rect.size.width, p_rect.pos.y),
- Vector2(p_rect.pos.x + p_rect.size.width, p_rect.pos.y + p_rect.size.height),
- Vector2(p_rect.pos.x, p_rect.pos.y + p_rect.size.height)
- };
-
- _draw_gui_primitive(4, coords, 0, texcoords);
- _rinfo.ci_draw_commands++;
-}
-
-void RasterizerGLES2::_draw_quad(const Rect2 &p_rect) {
-
- Vector2 coords[4] = {
- Vector2(p_rect.pos.x, p_rect.pos.y),
- Vector2(p_rect.pos.x + p_rect.size.width, p_rect.pos.y),
- Vector2(p_rect.pos.x + p_rect.size.width, p_rect.pos.y + p_rect.size.height),
- Vector2(p_rect.pos.x, p_rect.pos.y + p_rect.size.height)
- };
-
- _draw_gui_primitive(4, coords, 0, 0);
- _rinfo.ci_draw_commands++;
-}
-
-void RasterizerGLES2::canvas_draw_rect(const Rect2 &p_rect, int p_flags, const Rect2 &p_source, RID p_texture, const Color &p_modulate) {
-
- Color m = p_modulate;
- m.a *= canvas_opacity;
- _set_color_attrib(m);
- Texture *texture = _bind_canvas_texture(p_texture);
-
- if (texture) {
-
- bool untile = false;
-
- if (p_flags & CANVAS_RECT_TILE && !(texture->flags & VS::TEXTURE_FLAG_REPEAT)) {
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- untile = true;
- }
-
- if (!(p_flags & CANVAS_RECT_REGION)) {
-
- Rect2 region = Rect2(0, 0, texture->width, texture->height);
- _draw_textured_quad(p_rect, region, region.size, p_flags & CANVAS_RECT_FLIP_H, p_flags & CANVAS_RECT_FLIP_V, p_flags & CANVAS_RECT_TRANSPOSE);
-
- } else {
-
- _draw_textured_quad(p_rect, p_source, Size2(texture->width, texture->height), p_flags & CANVAS_RECT_FLIP_H, p_flags & CANVAS_RECT_FLIP_V, p_flags & CANVAS_RECT_TRANSPOSE);
- }
-
- if (untile) {
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- }
-
- } else {
-
- //glDisable(GL_TEXTURE_2D);
- _draw_quad(p_rect);
- //print_line("rect: "+p_rect);
- }
-
- _rinfo.ci_draw_commands++;
-}
-
-void RasterizerGLES2::canvas_draw_style_box(const Rect2 &p_rect, const Rect2 &p_src_region, RID p_texture, const float *p_margins, bool p_draw_center, const Color &p_modulate) {
-
- Color m = p_modulate;
- m.a *= canvas_opacity;
- _set_color_attrib(m);
-
- Texture *texture = _bind_canvas_texture(p_texture);
- ERR_FAIL_COND(!texture);
-
- Rect2 region = p_src_region;
- if (region.size.width <= 0)
- region.size.width = texture->width;
- if (region.size.height <= 0)
- region.size.height = texture->height;
- /* CORNERS */
- _draw_textured_quad( // top left
- Rect2(p_rect.pos, Size2(p_margins[MARGIN_LEFT], p_margins[MARGIN_TOP])),
- Rect2(region.pos, Size2(p_margins[MARGIN_LEFT], p_margins[MARGIN_TOP])),
- Size2(texture->width, texture->height));
-
- _draw_textured_quad( // top right
- Rect2(Point2(p_rect.pos.x + p_rect.size.width - p_margins[MARGIN_RIGHT], p_rect.pos.y), Size2(p_margins[MARGIN_RIGHT], p_margins[MARGIN_TOP])),
- Rect2(Point2(region.pos.x + region.size.width - p_margins[MARGIN_RIGHT], region.pos.y), Size2(p_margins[MARGIN_RIGHT], p_margins[MARGIN_TOP])),
- Size2(texture->width, texture->height));
-
- _draw_textured_quad( // bottom left
- Rect2(Point2(p_rect.pos.x, p_rect.pos.y + p_rect.size.height - p_margins[MARGIN_BOTTOM]), Size2(p_margins[MARGIN_LEFT], p_margins[MARGIN_BOTTOM])),
- Rect2(Point2(region.pos.x, region.pos.y + region.size.height - p_margins[MARGIN_BOTTOM]), Size2(p_margins[MARGIN_LEFT], p_margins[MARGIN_BOTTOM])),
- Size2(texture->width, texture->height));
-
- _draw_textured_quad( // bottom right
- Rect2(Point2(p_rect.pos.x + p_rect.size.width - p_margins[MARGIN_RIGHT], p_rect.pos.y + p_rect.size.height - p_margins[MARGIN_BOTTOM]), Size2(p_margins[MARGIN_RIGHT], p_margins[MARGIN_BOTTOM])),
- Rect2(Point2(region.pos.x + region.size.width - p_margins[MARGIN_RIGHT], region.pos.y + region.size.height - p_margins[MARGIN_BOTTOM]), Size2(p_margins[MARGIN_RIGHT], p_margins[MARGIN_BOTTOM])),
- Size2(texture->width, texture->height));
-
- Rect2 rect_center(p_rect.pos + Point2(p_margins[MARGIN_LEFT], p_margins[MARGIN_TOP]), Size2(p_rect.size.width - p_margins[MARGIN_LEFT] - p_margins[MARGIN_RIGHT], p_rect.size.height - p_margins[MARGIN_TOP] - p_margins[MARGIN_BOTTOM]));
-
- Rect2 src_center(Point2(region.pos.x + p_margins[MARGIN_LEFT], region.pos.y + p_margins[MARGIN_TOP]), Size2(region.size.width - p_margins[MARGIN_LEFT] - p_margins[MARGIN_RIGHT], region.size.height - p_margins[MARGIN_TOP] - p_margins[MARGIN_BOTTOM]));
-
- _draw_textured_quad( // top
- Rect2(Point2(rect_center.pos.x, p_rect.pos.y), Size2(rect_center.size.width, p_margins[MARGIN_TOP])),
- Rect2(Point2(src_center.pos.x, region.pos.y), Size2(src_center.size.width, p_margins[MARGIN_TOP])),
- Size2(texture->width, texture->height));
-
- _draw_textured_quad( // bottom
- Rect2(Point2(rect_center.pos.x, rect_center.pos.y + rect_center.size.height), Size2(rect_center.size.width, p_margins[MARGIN_BOTTOM])),
- Rect2(Point2(src_center.pos.x, src_center.pos.y + src_center.size.height), Size2(src_center.size.width, p_margins[MARGIN_BOTTOM])),
- Size2(texture->width, texture->height));
-
- _draw_textured_quad( // left
- Rect2(Point2(p_rect.pos.x, rect_center.pos.y), Size2(p_margins[MARGIN_LEFT], rect_center.size.height)),
- Rect2(Point2(region.pos.x, region.pos.y + p_margins[MARGIN_TOP]), Size2(p_margins[MARGIN_LEFT], src_center.size.height)),
- Size2(texture->width, texture->height));
-
- _draw_textured_quad( // right
- Rect2(Point2(rect_center.pos.x + rect_center.size.width, rect_center.pos.y), Size2(p_margins[MARGIN_RIGHT], rect_center.size.height)),
- Rect2(Point2(src_center.pos.x + src_center.size.width, region.pos.y + p_margins[MARGIN_TOP]), Size2(p_margins[MARGIN_RIGHT], src_center.size.height)),
- Size2(texture->width, texture->height));
-
- if (p_draw_center) {
-
- _draw_textured_quad(
- rect_center,
- src_center,
- Size2(texture->width, texture->height));
- }
-
- _rinfo.ci_draw_commands++;
-}
-
-void RasterizerGLES2::canvas_draw_primitive(const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture, float p_width) {
-
- ERR_FAIL_COND(p_points.size() < 1);
- _set_color_attrib(Color(1, 1, 1, canvas_opacity));
- _bind_canvas_texture(p_texture);
- _draw_gui_primitive(p_points.size(), p_points.ptr(), p_colors.ptr(), p_uvs.ptr());
-
- _rinfo.ci_draw_commands++;
-}
-
-void RasterizerGLES2::canvas_draw_polygon(int p_vertex_count, const int *p_indices, const Vector2 *p_vertices, const Vector2 *p_uvs, const Color *p_colors, const RID &p_texture, bool p_singlecolor) {
-
- bool do_colors = false;
- Color m;
- if (p_singlecolor) {
- m = *p_colors;
- m.a *= canvas_opacity;
- _set_color_attrib(m);
- } else if (!p_colors) {
- m = Color(1, 1, 1, canvas_opacity);
- _set_color_attrib(m);
- } else
- do_colors = true;
-
- Texture *texture = _bind_canvas_texture(p_texture);
-
-#ifndef GLES_NO_CLIENT_ARRAYS
- glEnableVertexAttribArray(VS::ARRAY_VERTEX);
- glVertexAttribPointer(VS::ARRAY_VERTEX, 2, GL_FLOAT, false, sizeof(Vector2), p_vertices);
- if (do_colors) {
-
- glEnableVertexAttribArray(VS::ARRAY_COLOR);
- glVertexAttribPointer(VS::ARRAY_COLOR, 4, GL_FLOAT, false, sizeof(Color), p_colors);
- } else {
- glDisableVertexAttribArray(VS::ARRAY_COLOR);
- }
-
- if (texture && p_uvs) {
-
- glEnableVertexAttribArray(VS::ARRAY_TEX_UV);
- glVertexAttribPointer(VS::ARRAY_TEX_UV, 2, GL_FLOAT, false, sizeof(Vector2), p_uvs);
- } else {
- glDisableVertexAttribArray(VS::ARRAY_TEX_UV);
- }
-
- if (p_indices) {
-#ifdef GLEW_ENABLED
- glDrawElements(GL_TRIANGLES, p_vertex_count, GL_UNSIGNED_INT, p_indices);
-#else
- static const int _max_draw_poly_indices = 16 * 1024; // change this size if needed!!!
- ERR_FAIL_COND(p_vertex_count > _max_draw_poly_indices);
- static uint16_t _draw_poly_indices[_max_draw_poly_indices];
- for (int i = 0; i < p_vertex_count; i++) {
- _draw_poly_indices[i] = p_indices[i];
- };
- glDrawElements(GL_TRIANGLES, p_vertex_count, GL_UNSIGNED_SHORT, _draw_poly_indices);
-#endif
- } else {
- glDrawArrays(GL_TRIANGLES, 0, p_vertex_count);
- }
-
-#else //WebGL specific impl.
- glBindBuffer(GL_ARRAY_BUFFER, gui_quad_buffer);
- float *b = GlobalVertexBuffer;
- int ofs = 0;
- if (p_vertex_count > MAX_POLYGON_VERTICES) {
- print_line("Too many vertices to render");
- return;
- }
- glEnableVertexAttribArray(VS::ARRAY_VERTEX);
- glVertexAttribPointer(VS::ARRAY_VERTEX, 2, GL_FLOAT, false, sizeof(float) * 2, ((float *)0) + ofs);
- for (int i = 0; i < p_vertex_count; i++) {
- b[ofs++] = p_vertices[i].x;
- b[ofs++] = p_vertices[i].y;
- }
-
- if (p_colors && do_colors) {
-
- glEnableVertexAttribArray(VS::ARRAY_COLOR);
- glVertexAttribPointer(VS::ARRAY_COLOR, 4, GL_FLOAT, false, sizeof(float) * 4, ((float *)0) + ofs);
- for (int i = 0; i < p_vertex_count; i++) {
- b[ofs++] = p_colors[i].r;
- b[ofs++] = p_colors[i].g;
- b[ofs++] = p_colors[i].b;
- b[ofs++] = p_colors[i].a;
- }
-
- } else {
- glDisableVertexAttribArray(VS::ARRAY_COLOR);
- }
-
- if (p_uvs) {
-
- glEnableVertexAttribArray(VS::ARRAY_TEX_UV);
- glVertexAttribPointer(VS::ARRAY_TEX_UV, 2, GL_FLOAT, false, sizeof(float) * 2, ((float *)0) + ofs);
- for (int i = 0; i < p_vertex_count; i++) {
- b[ofs++] = p_uvs[i].x;
- b[ofs++] = p_uvs[i].y;
- }
-
- } else {
- glDisableVertexAttribArray(VS::ARRAY_TEX_UV);
- }
-
- glBufferSubData(GL_ARRAY_BUFFER, 0, ofs * 4, &b[0]);
-
- //bind the indices buffer.
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indices_buffer);
-
- static const int _max_draw_poly_indices = 16 * 1024; // change this size if needed!!!
- ERR_FAIL_COND(p_vertex_count > _max_draw_poly_indices);
- static uint16_t _draw_poly_indices[_max_draw_poly_indices];
- for (int i = 0; i < p_vertex_count; i++) {
- _draw_poly_indices[i] = p_indices[i];
- //OS::get_singleton()->print("ind: %d ", p_indices[i]);
- };
-
- //copy the data to GPU.
- glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, p_vertex_count * sizeof(uint16_t), &_draw_poly_indices[0]);
-
- //draw the triangles.
- glDrawElements(GL_TRIANGLES, p_vertex_count, GL_UNSIGNED_SHORT, 0);
-
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-#endif
-
- _rinfo.ci_draw_commands++;
-};
-
-void RasterizerGLES2::canvas_set_transform(const Transform2D &p_transform) {
-
- canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX, p_transform);
-
- //canvas_transform = Variant(p_transform);
-}
-
-RID RasterizerGLES2::canvas_light_occluder_create() {
-
- CanvasOccluder *co = memnew(CanvasOccluder);
- co->index_id = 0;
- co->vertex_id = 0;
- co->len = 0;
-
- return canvas_occluder_owner.make_rid(co);
-}
-
-void RasterizerGLES2::canvas_light_occluder_set_polylines(RID p_occluder, const PoolVector<Vector2> &p_lines) {
-
- CanvasOccluder *co = canvas_occluder_owner.get(p_occluder);
- ERR_FAIL_COND(!co);
-
- co->lines = p_lines;
-
- if (p_lines.size() != co->len) {
-
- if (co->index_id)
- glDeleteBuffers(1, &co->index_id);
- if (co->vertex_id)
- glDeleteBuffers(1, &co->vertex_id);
-
- co->index_id = 0;
- co->vertex_id = 0;
- co->len = 0;
- }
-
- if (p_lines.size()) {
-
- PoolVector<float> geometry;
- PoolVector<uint16_t> indices;
- int lc = p_lines.size();
-
- geometry.resize(lc * 6);
- indices.resize(lc * 3);
-
- PoolVector<float>::Write vw = geometry.write();
- PoolVector<uint16_t>::Write iw = indices.write();
-
- PoolVector<Vector2>::Read lr = p_lines.read();
-
- const int POLY_HEIGHT = 16384;
-
- for (int i = 0; i < lc / 2; i++) {
-
- vw[i * 12 + 0] = lr[i * 2 + 0].x;
- vw[i * 12 + 1] = lr[i * 2 + 0].y;
- vw[i * 12 + 2] = POLY_HEIGHT;
-
- vw[i * 12 + 3] = lr[i * 2 + 1].x;
- vw[i * 12 + 4] = lr[i * 2 + 1].y;
- vw[i * 12 + 5] = POLY_HEIGHT;
-
- vw[i * 12 + 6] = lr[i * 2 + 1].x;
- vw[i * 12 + 7] = lr[i * 2 + 1].y;
- vw[i * 12 + 8] = -POLY_HEIGHT;
-
- vw[i * 12 + 9] = lr[i * 2 + 0].x;
- vw[i * 12 + 10] = lr[i * 2 + 0].y;
- vw[i * 12 + 11] = -POLY_HEIGHT;
-
- iw[i * 6 + 0] = i * 4 + 0;
- iw[i * 6 + 1] = i * 4 + 1;
- iw[i * 6 + 2] = i * 4 + 2;
-
- iw[i * 6 + 3] = i * 4 + 2;
- iw[i * 6 + 4] = i * 4 + 3;
- iw[i * 6 + 5] = i * 4 + 0;
- }
-
- //if same buffer len is being set, just use BufferSubData to avoid a pipeline flush
-
- if (!co->vertex_id) {
- glGenBuffers(1, &co->vertex_id);
- glBindBuffer(GL_ARRAY_BUFFER, co->vertex_id);
- glBufferData(GL_ARRAY_BUFFER, lc * 6 * sizeof(real_t), vw.ptr(), GL_STATIC_DRAW);
- } else {
-
- glBindBuffer(GL_ARRAY_BUFFER, co->vertex_id);
- glBufferSubData(GL_ARRAY_BUFFER, 0, lc * 6 * sizeof(real_t), vw.ptr());
- }
-
- glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind
-
- if (!co->index_id) {
-
- glGenBuffers(1, &co->index_id);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, co->index_id);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, lc * 3 * sizeof(uint16_t), iw.ptr(), GL_STATIC_DRAW);
- } else {
-
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, co->index_id);
- glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, lc * 3 * sizeof(uint16_t), iw.ptr());
- }
-
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); //unbind
-
- co->len = lc;
- }
-}
-
-RID RasterizerGLES2::canvas_light_shadow_buffer_create(int p_width) {
-
- CanvasLightShadow *cls = memnew(CanvasLightShadow);
- if (p_width > max_texture_size)
- p_width = max_texture_size;
-
- cls->size = p_width;
- glActiveTexture(GL_TEXTURE0);
-
- glGenFramebuffers(1, &cls->fbo);
- glBindFramebuffer(GL_FRAMEBUFFER, cls->fbo);
-
- // Create a render buffer
- glGenRenderbuffers(1, &cls->rbo);
- glBindRenderbuffer(GL_RENDERBUFFER, cls->rbo);
-
- // Create a texture for storing the depth
- glGenTextures(1, &cls->depth);
- glBindTexture(GL_TEXTURE_2D, cls->depth);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- // Remove artifact on the edges of the shadowmap
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
- cls->height = 16;
-
- //print_line("ERROR? "+itos(glGetError()));
- if (read_depth_supported) {
-
- // We'll use a depth texture to store the depths in the shadow map
- glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, cls->size, cls->height, 0,
- GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
-
-#ifdef GLEW_ENABLED
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-#endif
-
- // Attach the depth texture to FBO depth attachment point
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
- GL_TEXTURE_2D, cls->depth, 0);
-
-#ifdef GLEW_ENABLED
- glDrawBuffer(GL_NONE);
-#endif
-
- } else {
- // We'll use a RGBA texture into which we pack the depth info
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, cls->size, cls->height, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-
- // Attach the RGBA texture to FBO color attachment point
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
- GL_TEXTURE_2D, cls->depth, 0);
- cls->rgba = cls->depth;
-
- // Allocate 16-bit depth buffer
- glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, cls->size, cls->height);
-
- // Attach the render buffer as depth buffer - will be ignored
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
- GL_RENDERBUFFER, cls->rbo);
- }
-
- GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
-//printf("errnum: %x\n",status);
-#ifdef GLEW_ENABLED
- if (read_depth_supported) {
- //glDrawBuffer(GL_BACK);
- }
-#endif
- glBindFramebuffer(GL_FRAMEBUFFER, base_framebuffer);
- DEBUG_TEST_ERROR("2D Shadow Buffer Init");
- ERR_FAIL_COND_V(status != GL_FRAMEBUFFER_COMPLETE, RID());
-
-#ifdef GLEW_ENABLED
- if (read_depth_supported) {
- //glDrawBuffer(GL_BACK);
- }
-#endif
-
- return canvas_light_shadow_owner.make_rid(cls);
-}
-
-void RasterizerGLES2::canvas_light_shadow_buffer_update(RID p_buffer, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, CanvasLightOccluderInstance *p_occluders, CameraMatrix *p_xform_cache) {
-
- CanvasLightShadow *cls = canvas_light_shadow_owner.get(p_buffer);
- ERR_FAIL_COND(!cls);
-
- glDisable(GL_BLEND);
- glDisable(GL_SCISSOR_TEST);
- glDisable(GL_DITHER);
- glDisable(GL_CULL_FACE);
- glDepthFunc(GL_LEQUAL);
- glEnable(GL_DEPTH_TEST);
- glDepthMask(true);
-
- glBindFramebuffer(GL_FRAMEBUFFER, cls->fbo);
-
- if (!use_rgba_shadowmaps)
- glColorMask(0, 0, 0, 0);
-
- glEnableVertexAttribArray(VS::ARRAY_VERTEX);
- canvas_shadow_shader.bind();
-
- glViewport(0, 0, cls->size, cls->height);
- _glClearDepth(1.0f);
- glClearColor(1, 1, 1, 1);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- VS::CanvasOccluderPolygonCullMode cull = VS::CANVAS_OCCLUDER_POLYGON_CULL_DISABLED;
-
- for (int i = 0; i < 4; i++) {
-
- //make sure it remains orthogonal, makes easy to read angle later
-
- Transform light;
- light.origin[0] = p_light_xform[2][0];
- light.origin[1] = p_light_xform[2][1];
- light.basis[0][0] = p_light_xform[0][0];
- light.basis[0][1] = p_light_xform[1][0];
- light.basis[1][0] = p_light_xform[0][1];
- light.basis[1][1] = p_light_xform[1][1];
-
- //light.basis.scale(Vector3(to_light.elements[0].length(),to_light.elements[1].length(),1));
-
- / //p_near=1;
- CameraMatrix projection;
- {
- real_t fov = 90;
- real_t near = p_near;
- real_t far = p_far;
- real_t aspect = 1.0;
-
- real_t ymax = near * Math::tan(Math::deg2rad(fov * 0.5));
- real_t ymin = -ymax;
- real_t xmin = ymin * aspect;
- real_t xmax = ymax * aspect;
-
- projection.set_frustum(xmin, xmax, ymin, ymax, near, far);
- }
-
- Vector3 cam_target = Matrix3(Vector3(0, 0, Math_PI * 2 * (i / 4.0))).xform(Vector3(0, 1, 0));
- projection = projection * CameraMatrix(Transform().looking_at(cam_target, Vector3(0, 0, -1)).affine_inverse());
-
- canvas_shadow_shader.set_uniform(CanvasShadowShaderGLES2::PROJECTION_MATRIX, projection);
- canvas_shadow_shader.set_uniform(CanvasShadowShaderGLES2::LIGHT_MATRIX, light);
-
- if (i == 0)
- *p_xform_cache = projection;
-
- glViewport(0, (cls->height / 4) * i, cls->size, cls->height / 4);
-
- CanvasLightOccluderInstance *instance = p_occluders;
-
- while (instance) {
-
- CanvasOccluder *cc = canvas_occluder_owner.get(instance->polygon_buffer);
- if (!cc || cc->len == 0 || !(p_light_mask & instance->light_mask)) {
-
- instance = instance->next;
- continue;
- }
-
- canvas_shadow_shader.set_uniform(CanvasShadowShaderGLES2::WORLD_MATRIX, instance->xform_cache);
- if (cull != instance->cull_cache) {
-
- cull = instance->cull_cache;
- switch (cull) {
- case VS::CANVAS_OCCLUDER_POLYGON_CULL_DISABLED: {
-
- glDisable(GL_CULL_FACE);
-
- } break;
- case VS::CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE: {
-
- glEnable(GL_CULL_FACE);
- glCullFace(GL_FRONT);
- } break;
- case VS::CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE: {
-
- glEnable(GL_CULL_FACE);
- glCullFace(GL_BACK);
-
- } break;
- }
- }
- /*
- if (i==0) {
- for(int i=0;i<cc->lines.size();i++) {
- Vector2 p = instance->xform_cache.xform(cc->lines.get(i));
- Plane pp(Vector3(p.x,p.y,0),1);
- pp.normal = light.xform(pp.normal);
- pp = projection.xform4(pp);
- print_line(itos(i)+": "+pp.normal/pp.d);
- //pp=light_mat.xform4(pp);
- //print_line(itos(i)+": "+pp.normal/pp.d);
- }
- }
-*/
- glBindBuffer(GL_ARRAY_BUFFER, cc->vertex_id);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, cc->index_id);
- glVertexAttribPointer(VS::ARRAY_VERTEX, 3, GL_FLOAT, false, 0, 0);
- glDrawElements(GL_TRIANGLES, cc->len * 3, GL_UNSIGNED_SHORT, 0);
-
- instance = instance->next;
- }
- }
-
- glDisableVertexAttribArray(VS::ARRAY_VERTEX);
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-
- if (shadow_filter == SHADOW_FILTER_ESM) {
-//blur the buffer
-#if 0
- //this is ignord, it did not make any difference..
- if (read_depth_supported) {
- glDepthFunc(GL_ALWAYS);
- } else {
- glDisable(GL_DEPTH_TEST);
- glDepthMask(false);
- }
- glDisable(GL_CULL_FACE);
- glViewport(0, 0, cls->size,cls->height);
-
- int passes=1;
- CanvasLightShadow *blur = canvas_light_shadow_owner.get(canvas_shadow_blur);
-
- copy_shader.set_conditional(CopyShaderGLES2::SHADOW_BLUR_H_PASS,true);
- copy_shader.bind();
- copy_shader.set_uniform(CopyShaderGLES2::PIXEL_SCALE,1);
- copy_shader.set_uniform(CopyShaderGLES2::BLUR_MAGNITUDE,1);
- glUniform1i(copy_shader.get_uniform_location(CopyShaderGLES2::SOURCE),0);
-
- for(int i=0;i<passes;i++) {
-
- glBindFramebuffer(GL_FRAMEBUFFER, blur->fbo);
- glActiveTexture(GL_TEXTURE0);
-
- if (read_depth_supported)
- glBindTexture(GL_TEXTURE_2D,cls->depth);
- else
- glBindTexture(GL_TEXTURE_2D,cls->rgba);
-
-
- {
- Vector2 src_sb_uv[4]={
- Vector2( 0, 1),
- Vector2( 1, 1),
- Vector2( 1, 0),
- Vector2( 0, 0)
- };
- static const Vector2 dst_pos[4]={
- Vector2(-1, 1),
- Vector2( 1, 1),
- Vector2( 1,-1),
- Vector2(-1,-1)
- };
-
-
-
- copy_shader.set_uniform(CopyShaderGLES2::PIXEL_SIZE,Vector2(1.0,1.0)/cls->size);
- _draw_gui_primitive(4,dst_pos,NULL,src_sb_uv);
- }
-
- glActiveTexture(GL_TEXTURE0);
- if (read_depth_supported)
- glBindTexture(GL_TEXTURE_2D,blur->depth);
- else
- glBindTexture(GL_TEXTURE_2D,blur->rgba);
-
- glBindFramebuffer(GL_FRAMEBUFFER, cls->fbo);
-
- {
- float hlimit = float(cls->size) / blur->size;
- //hlimit*=2.0;
- Vector2 src_sb_uv[4]={
- Vector2( 0, 1),
- Vector2( hlimit, 1),
- Vector2( hlimit, 0),
- Vector2( 0, 0)
- };
- static const Vector2 dst_pos[4]={
- Vector2(-1, 1),
- Vector2( 1, 1),
- Vector2( 1,-1),
- Vector2(-1,-1)
- };
-
-
- copy_shader.set_uniform(CopyShaderGLES2::PIXEL_SIZE,Vector2(1.0,1.0)/blur->size);
- _draw_gui_primitive(4,dst_pos,NULL,src_sb_uv);
- }
-
- }
- copy_shader.set_conditional(CopyShaderGLES2::SHADOW_BLUR_H_PASS,false);
- glDepthFunc(GL_LEQUAL);
-#endif
- }
-
- glBindFramebuffer(GL_FRAMEBUFFER, current_rt ? current_rt->fbo : base_framebuffer);
- glColorMask(1, 1, 1, 1);
-}
-
-void RasterizerGLES2::canvas_debug_viewport_shadows(CanvasLight *p_lights_with_shadow) {
-
- CanvasLight *light = p_lights_with_shadow;
-
- canvas_begin(); //reset
-
- int h = 10;
- int w = viewport.width;
- int ofs = h;
-
- //print_line(" debug lights ");
- while (light) {
-
- //print_line("debug light");
- if (light->shadow_buffer.is_valid()) {
-
- //print_line("sb is valid");
- CanvasLightShadow *sb = canvas_light_shadow_owner.get(light->shadow_buffer);
- if (sb) {
- glActiveTexture(GL_TEXTURE0);
- if (read_depth_supported)
- glBindTexture(GL_TEXTURE_2D, sb->depth);
- else
- glBindTexture(GL_TEXTURE_2D, sb->rgba);
- _draw_textured_quad(Rect2(h, ofs, w - h * 2, h), Rect2(0, 0, sb->size, 10), Size2(sb->size, 10), false, false);
- ofs += h * 2;
- }
- }
-
- light = light->shadows_next_ptr;
- }
-}
-
-void RasterizerGLES2::_canvas_normal_set_flip(const Vector2 &p_flip) {
-
- if (p_flip == normal_flip)
- return;
- normal_flip = p_flip;
- canvas_shader.set_uniform(CanvasShaderGLES2::NORMAL_FLIP, normal_flip);
-}
-
-template <bool use_normalmap>
-void RasterizerGLES2::_canvas_item_render_commands(CanvasItem *p_item, CanvasItem *current_clip, bool &reclip) {
-
- int cc = p_item->commands.size();
- CanvasItem::Command **commands = p_item->commands.ptr();
-
- for (int i = 0; i < cc; i++) {
-
- CanvasItem::Command *c = commands[i];
-
- switch (c->type) {
- case CanvasItem::Command::TYPE_LINE: {
-
- CanvasItem::CommandLine *line = static_cast<CanvasItem::CommandLine *>(c);
- canvas_draw_line(line->from, line->to, line->color, line->width, line->antialiased);
- } break;
- case CanvasItem::Command::TYPE_RECT: {
-
- CanvasItem::CommandRect *rect = static_cast<CanvasItem::CommandRect *>(c);
-//canvas_draw_rect(rect->rect,rect->region,rect->source,rect->flags&CanvasItem::CommandRect::FLAG_TILE,rect->flags&CanvasItem::CommandRect::FLAG_FLIP_H,rect->flags&CanvasItem::CommandRect::FLAG_FLIP_V,rect->texture,rect->modulate);
-#if 0
- int flags=0;
-
- if (rect->flags&CanvasItem::CommandRect::FLAG_REGION) {
- flags|=Rasterizer::CANVAS_RECT_REGION;
- }
- if (rect->flags&CanvasItem::CommandRect::FLAG_TILE) {
- flags|=Rasterizer::CANVAS_RECT_TILE;
- }
- if (rect->flags&CanvasItem::CommandRect::FLAG_FLIP_H) {
-
- flags|=Rasterizer::CANVAS_RECT_FLIP_H;
- }
- if (rect->flags&CanvasItem::CommandRect::FLAG_FLIP_V) {
-
- flags|=Rasterizer::CANVAS_RECT_FLIP_V;
- }
-#else
-
- int flags = rect->flags;
-#endif
- if (use_normalmap)
- _canvas_normal_set_flip(Vector2((flags & CANVAS_RECT_FLIP_H) ? -1 : 1, (flags & CANVAS_RECT_FLIP_V) ? -1 : 1));
- canvas_draw_rect(rect->rect, flags, rect->source, rect->texture, rect->modulate);
-
- } break;
- case CanvasItem::Command::TYPE_STYLE: {
-
- CanvasItem::CommandStyle *style = static_cast<CanvasItem::CommandStyle *>(c);
- if (use_normalmap)
- _canvas_normal_set_flip(Vector2(1, 1));
- canvas_draw_style_box(style->rect, style->source, style->texture, style->margin, style->draw_center, style->color);
-
- } break;
- case CanvasItem::Command::TYPE_PRIMITIVE: {
-
- if (use_normalmap)
- _canvas_normal_set_flip(Vector2(1, 1));
- CanvasItem::CommandPrimitive *primitive = static_cast<CanvasItem::CommandPrimitive *>(c);
- canvas_draw_primitive(primitive->points, primitive->colors, primitive->uvs, primitive->texture, primitive->width);
- } break;
- case CanvasItem::Command::TYPE_POLYGON: {
-
- if (use_normalmap)
- _canvas_normal_set_flip(Vector2(1, 1));
- CanvasItem::CommandPolygon *polygon = static_cast<CanvasItem::CommandPolygon *>(c);
- canvas_draw_polygon(polygon->count, polygon->indices.ptr(), polygon->points.ptr(), polygon->uvs.ptr(), polygon->colors.ptr(), polygon->texture, polygon->colors.size() == 1);
-
- } break;
-
- case CanvasItem::Command::TYPE_POLYGON_PTR: {
-
- if (use_normalmap)
- _canvas_normal_set_flip(Vector2(1, 1));
- CanvasItem::CommandPolygonPtr *polygon = static_cast<CanvasItem::CommandPolygonPtr *>(c);
- canvas_draw_polygon(polygon->count, polygon->indices, polygon->points, polygon->uvs, polygon->colors, polygon->texture, false);
- } break;
- case CanvasItem::Command::TYPE_CIRCLE: {
-
- CanvasItem::CommandCircle *circle = static_cast<CanvasItem::CommandCircle *>(c);
- static const int numpoints = 32;
- Vector2 points[numpoints + 1];
- points[numpoints] = circle->pos;
- int indices[numpoints * 3];
-
- for (int i = 0; i < numpoints; i++) {
-
- points[i] = circle->pos + Vector2(Math::sin(i * Math_PI * 2.0 / numpoints), Math::cos(i * Math_PI * 2.0 / numpoints)) * circle->radius;
- indices[i * 3 + 0] = i;
- indices[i * 3 + 1] = (i + 1) % numpoints;
- indices[i * 3 + 2] = numpoints;
- }
- canvas_draw_polygon(numpoints * 3, indices, points, NULL, &circle->color, RID(), true);
- //canvas_draw_circle(circle->indices.size(),circle->indices.ptr(),circle->points.ptr(),circle->uvs.ptr(),circle->colors.ptr(),circle->texture,circle->colors.size()==1);
- } break;
- case CanvasItem::Command::TYPE_TRANSFORM: {
-
- CanvasItem::CommandTransform *transform = static_cast<CanvasItem::CommandTransform *>(c);
- canvas_set_transform(transform->xform);
- } break;
- case CanvasItem::Command::TYPE_BLEND_MODE: {
-
- CanvasItem::CommandBlendMode *bm = static_cast<CanvasItem::CommandBlendMode *>(c);
- canvas_set_blend_mode(bm->blend_mode);
-
- } break;
- case CanvasItem::Command::TYPE_CLIP_IGNORE: {
-
- CanvasItem::CommandClipIgnore *ci = static_cast<CanvasItem::CommandClipIgnore *>(c);
- if (current_clip) {
-
- if (ci->ignore != reclip) {
- if (ci->ignore) {
-
- glDisable(GL_SCISSOR_TEST);
- reclip = true;
- } else {
-
- glEnable(GL_SCISSOR_TEST);
- //glScissor(viewport.x+current_clip->final_clip_rect.pos.x,viewport.y+ (viewport.height-(current_clip->final_clip_rect.pos.y+current_clip->final_clip_rect.size.height)),
- //current_clip->final_clip_rect.size.width,current_clip->final_clip_rect.size.height);
-
- int x;
- int y;
- int w;
- int h;
-
- if (current_rt) {
- x = current_clip->final_clip_rect.pos.x;
- y = current_clip->final_clip_rect.pos.y;
- w = current_clip->final_clip_rect.size.x;
- h = current_clip->final_clip_rect.size.y;
- } else {
- x = current_clip->final_clip_rect.pos.x;
- y = window_size.height - (current_clip->final_clip_rect.pos.y + current_clip->final_clip_rect.size.y);
- w = current_clip->final_clip_rect.size.x;
- h = current_clip->final_clip_rect.size.y;
- }
-
- glScissor(x, y, w, h);
-
- reclip = false;
- }
- }
- }
-
- } break;
- }
- }
-}
-
-void RasterizerGLES2::_canvas_item_setup_shader_params(ShaderMaterial *material, Shader *p_shader) {
-
- if (canvas_shader.bind())
- rebind_texpixel_size = true;
-
- if (material->shader_version != p_shader->version) {
- //todo optimize uniforms
- material->shader_version = p_shader->version;
- }
-
- if (p_shader->has_texscreen && framebuffer.active) {
-
- int x = viewport.x;
- int y = window_size.height - (viewport.height + viewport.y);
-
- canvas_shader.set_uniform(CanvasShaderGLES2::TEXSCREEN_SCREEN_MULT, Vector2(float(viewport.width) / framebuffer.width, float(viewport.height) / framebuffer.height));
- canvas_shader.set_uniform(CanvasShaderGLES2::TEXSCREEN_SCREEN_CLAMP, Color(float(x) / framebuffer.width, float(y) / framebuffer.height, float(x + viewport.width) / framebuffer.width, float(y + viewport.height) / framebuffer.height));
- canvas_shader.set_uniform(CanvasShaderGLES2::TEXSCREEN_TEX, max_texture_units - 1);
- glActiveTexture(GL_TEXTURE0 + max_texture_units - 1);
- glBindTexture(GL_TEXTURE_2D, framebuffer.sample_color);
- if (framebuffer.scale == 1 && !canvas_texscreen_used) {
-#ifdef GLEW_ENABLED
- if (current_rt) {
- glReadBuffer(GL_COLOR_ATTACHMENT0);
- } else {
- glReadBuffer(GL_BACK);
- }
-#endif
- if (current_rt) {
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, viewport.x, viewport.y, viewport.x, viewport.y, viewport.width, viewport.height);
- canvas_shader.set_uniform(CanvasShaderGLES2::TEXSCREEN_SCREEN_CLAMP, Color(float(x) / framebuffer.width, float(viewport.y) / framebuffer.height, float(x + viewport.width) / framebuffer.width, float(y + viewport.height) / framebuffer.height));
- //window_size.height-(viewport.height+viewport.y)
- } else {
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x, y, x, y, viewport.width, viewport.height);
- }
-
- canvas_texscreen_used = true;
- }
-
- glActiveTexture(GL_TEXTURE0);
- }
-
- if (p_shader->has_screen_uv) {
- canvas_shader.set_uniform(CanvasShaderGLES2::SCREEN_UV_MULT, Vector2(1.0 / viewport.width, 1.0 / viewport.height));
- }
-
- uses_texpixel_size = p_shader->uses_texpixel_size;
-}
-
-void RasterizerGLES2::_canvas_item_setup_shader_uniforms(ShaderMaterial *material, Shader *p_shader) {
-
- //this can be optimized..
- int tex_id = 1;
- int idx = 0;
- for (Map<StringName, ShaderLanguage::Uniform>::Element *E = p_shader->uniforms.front(); E; E = E->next()) {
-
- Map<StringName, Variant>::Element *F = material->shader_param.find(E->key());
-
- if ((E->get().type == ShaderLanguage::TYPE_TEXTURE || E->get().type == ShaderLanguage::TYPE_CUBEMAP)) {
-
- RID rid;
- if (F) {
- rid = F->get();
- }
-
- if (!rid.is_valid()) {
-
- Map<StringName, RID>::Element *DT = p_shader->default_textures.find(E->key());
- if (DT) {
- rid = DT->get();
- }
- }
-
- if (rid.is_valid()) {
-
- int loc = canvas_shader.get_custom_uniform_location(idx); //should be automatic..
-
- glActiveTexture(GL_TEXTURE0 + tex_id);
- Texture *t = texture_owner.get(rid);
- if (!t)
- glBindTexture(GL_TEXTURE_2D, white_tex);
- else
- glBindTexture(t->target, t->tex_id);
-
- glUniform1i(loc, tex_id);
- tex_id++;
- }
- } else {
- Variant &v = F ? F->get() : E->get().default_value;
- canvas_shader.set_custom_uniform(idx, v);
- }
-
- idx++;
- }
-
- if (tex_id > 1) {
- glActiveTexture(GL_TEXTURE0);
- }
-
- if (p_shader->uses_time) {
- canvas_shader.set_uniform(CanvasShaderGLES2::TIME, Math::fmod(last_time, shader_time_rollback));
- draw_next_frame = true;
- }
- //if uses TIME - draw_next_frame=true
-}
-
-void RasterizerGLES2::canvas_render_items(CanvasItem *p_item_list, int p_z, const Color &p_modulate, CanvasLight *p_light) {
-
- CanvasItem *current_clip = NULL;
- Shader *shader_cache = NULL;
-
- bool rebind_shader = true;
-
- canvas_opacity = 1.0;
- canvas_use_modulate = p_modulate != Color(1, 1, 1, 1);
- canvas_modulate = p_modulate;
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_MODULATE, canvas_use_modulate);
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_DISTANCE_FIELD, false);
-
- bool reset_modulate = false;
- bool prev_distance_field = false;
-
- while (p_item_list) {
-
- CanvasItem *ci = p_item_list;
-
- if (ci->vp_render) {
- if (draw_viewport_func) {
- draw_viewport_func(ci->vp_render->owner, ci->vp_render->udata, ci->vp_render->rect);
- }
- memdelete(ci->vp_render);
- ci->vp_render = NULL;
- canvas_last_material = NULL;
- canvas_use_modulate = p_modulate != Color(1, 1, 1, 1);
- canvas_modulate = p_modulate;
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_MODULATE, canvas_use_modulate);
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_DISTANCE_FIELD, false);
- prev_distance_field = false;
- rebind_shader = true;
- reset_modulate = true;
- }
-
- if (prev_distance_field != ci->distance_field) {
-
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_DISTANCE_FIELD, ci->distance_field);
- prev_distance_field = ci->distance_field;
- rebind_shader = true;
- }
-
- if (current_clip != ci->final_clip_owner) {
-
- current_clip = ci->final_clip_owner;
-
- //setup clip
- if (current_clip) {
-
- glEnable(GL_SCISSOR_TEST);
- //glScissor(viewport.x+current_clip->final_clip_rect.pos.x,viewport.y+ (viewport.height-(current_clip->final_clip_rect.pos.y+current_clip->final_clip_rect.size.height)),
- //current_clip->final_clip_rect.size.width,current_clip->final_clip_rect.size.height);
-
- /* int x = viewport.x+current_clip->final_clip_rect.pos.x;
- int y = window_size.height-(viewport.y+current_clip->final_clip_rect.pos.y+current_clip->final_clip_rect.size.y);
- int w = current_clip->final_clip_rect.size.x;
- int h = current_clip->final_clip_rect.size.y;
-*/
- int x;
- int y;
- int w;
- int h;
-
- if (current_rt) {
- x = current_clip->final_clip_rect.pos.x;
- y = current_clip->final_clip_rect.pos.y;
- w = current_clip->final_clip_rect.size.x;
- h = current_clip->final_clip_rect.size.y;
- } else {
- x = current_clip->final_clip_rect.pos.x;
- y = window_size.height - (current_clip->final_clip_rect.pos.y + current_clip->final_clip_rect.size.y);
- w = current_clip->final_clip_rect.size.x;
- h = current_clip->final_clip_rect.size.y;
- }
-
- glScissor(x, y, w, h);
-
- } else {
-
- glDisable(GL_SCISSOR_TEST);
- }
- }
-
- if (ci->copy_back_buffer && framebuffer.active && framebuffer.scale == 1) {
-
- Rect2 rect;
- int x, y;
-
- if (ci->copy_back_buffer->full) {
-
- x = viewport.x;
- y = window_size.height - (viewport.height + viewport.y);
- } else {
- x = viewport.x + ci->copy_back_buffer->screen_rect.pos.x;
- y = window_size.height - (viewport.y + ci->copy_back_buffer->screen_rect.pos.y + ci->copy_back_buffer->screen_rect.size.y);
- }
- glActiveTexture(GL_TEXTURE0 + max_texture_units - 1);
- glBindTexture(GL_TEXTURE_2D, framebuffer.sample_color);
-
-#ifdef GLEW_ENABLED
- if (current_rt) {
- glReadBuffer(GL_COLOR_ATTACHMENT0);
- } else {
- glReadBuffer(GL_BACK);
- }
-#endif
- if (current_rt) {
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, viewport.x, viewport.y, viewport.x, viewport.y, viewport.width, viewport.height);
- //window_size.height-(viewport.height+viewport.y)
- } else {
- glCopyTexSubImage2D(GL_TEXTURE_2D, 0, x, y, x, y, viewport.width, viewport.height);
- }
-
- canvas_texscreen_used = true;
- glActiveTexture(GL_TEXTURE0);
- }
-
- //begin rect
- CanvasItem *material_owner = ci->material_owner ? ci->material_owner : ci;
- ShaderMaterial *material = material_owner->material;
-
- if (material != canvas_last_material || rebind_shader) {
-
- Shader *shader = NULL;
- if (material && material->shader.is_valid()) {
- shader = shader_owner.get(material->shader);
- if (shader && !shader->valid) {
- shader = NULL;
- }
- }
-
- shader_cache = shader;
-
- if (shader) {
- canvas_shader.set_custom_shader(shader->custom_code_id);
- _canvas_item_setup_shader_params(material, shader);
- } else {
- shader_cache = NULL;
- canvas_shader.set_custom_shader(0);
- canvas_shader.bind();
- uses_texpixel_size = false;
- }
-
- canvas_shader.set_uniform(CanvasShaderGLES2::PROJECTION_MATRIX, canvas_transform);
- if (canvas_use_modulate)
- reset_modulate = true;
- canvas_last_material = material;
- rebind_shader = false;
- }
-
- if (material && shader_cache) {
-
- _canvas_item_setup_shader_uniforms(material, shader_cache);
- }
-
- bool unshaded = (material && material->shading_mode == VS::CANVAS_ITEM_SHADING_UNSHADED) || ci->blend_mode != VS::MATERIAL_BLEND_MODE_MIX;
-
- if (unshaded) {
- canvas_shader.set_uniform(CanvasShaderGLES2::MODULATE, Color(1, 1, 1, 1));
- reset_modulate = true;
- } else if (reset_modulate) {
- canvas_shader.set_uniform(CanvasShaderGLES2::MODULATE, canvas_modulate);
- reset_modulate = false;
- }
-
- canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX, ci->final_transform);
- canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX, Transform2D());
-
- bool reclip = false;
-
- if (ci == p_item_list || ci->blend_mode != canvas_blend_mode) {
-
- switch (ci->blend_mode) {
-
- case VS::MATERIAL_BLEND_MODE_MIX: {
- glBlendEquation(GL_FUNC_ADD);
- if (current_rt && current_rt_transparent) {
- glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
- } else {
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
-
- } break;
- case VS::MATERIAL_BLEND_MODE_ADD: {
-
- glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE);
-
- } break;
- case VS::MATERIAL_BLEND_MODE_SUB: {
-
- glBlendEquation(GL_FUNC_REVERSE_SUBTRACT);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE);
- } break;
- case VS::MATERIAL_BLEND_MODE_MUL: {
- glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(GL_DST_COLOR, GL_ZERO);
- } break;
- case VS::MATERIAL_BLEND_MODE_PREMULT_ALPHA: {
- glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
- } break;
- }
-
- canvas_blend_mode = ci->blend_mode;
- }
-
- canvas_opacity = ci->final_opacity;
-
- if (unshaded || (p_modulate.a > 0.001 && (!material || material->shading_mode != VS::CANVAS_ITEM_SHADING_ONLY_LIGHT) && !ci->light_masked))
- _canvas_item_render_commands<false>(ci, current_clip, reclip);
-
- if (canvas_blend_mode == VS::MATERIAL_BLEND_MODE_MIX && p_light && !unshaded) {
-
- CanvasLight *light = p_light;
- bool light_used = false;
- VS::CanvasLightMode mode = VS::CANVAS_LIGHT_MODE_ADD;
-
- while (light) {
-
- if (ci->light_mask & light->item_mask && p_z >= light->z_min && p_z <= light->z_max && ci->global_rect_cache.intersects_transformed(light->xform_cache, light->rect_cache)) {
-
- //intersects this light
-
- if (!light_used || mode != light->mode) {
-
- mode = light->mode;
-
- switch (mode) {
-
- case VS::CANVAS_LIGHT_MODE_ADD: {
- glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE);
-
- } break;
- case VS::CANVAS_LIGHT_MODE_SUB: {
- glBlendEquation(GL_FUNC_REVERSE_SUBTRACT);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE);
- } break;
- case VS::CANVAS_LIGHT_MODE_MIX:
- case VS::CANVAS_LIGHT_MODE_MASK: {
- glBlendEquation(GL_FUNC_ADD);
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-
- } break;
- }
- }
-
- if (!light_used) {
-
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_LIGHTING, true);
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_MODULATE, false);
- light_used = true;
- normal_flip = Vector2(1, 1);
- }
-
- bool has_shadow = light->shadow_buffer.is_valid() && ci->light_mask & light->item_shadow_mask;
-
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_SHADOWS, has_shadow);
-
- bool light_rebind = canvas_shader.bind();
-
- if (light_rebind) {
-
- if (material && shader_cache) {
- _canvas_item_setup_shader_params(material, shader_cache);
- _canvas_item_setup_shader_uniforms(material, shader_cache);
- }
-
- canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX, ci->final_transform);
- canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX, Transform2D());
- canvas_shader.set_uniform(CanvasShaderGLES2::PROJECTION_MATRIX, canvas_transform);
- if (canvas_use_modulate)
- canvas_shader.set_uniform(CanvasShaderGLES2::MODULATE, canvas_modulate);
- canvas_shader.set_uniform(CanvasShaderGLES2::NORMAL_FLIP, Vector2(1, 1));
- canvas_shader.set_uniform(CanvasShaderGLES2::SHADOWPIXEL_SIZE, 1.0 / light->shadow_buffer_size);
- }
-
- canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_MATRIX, light->light_shader_xform);
- canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_POS, light->light_shader_pos);
- canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_COLOR, Color(light->color.r * light->energy, light->color.g * light->energy, light->color.b * light->energy, light->color.a));
- canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_HEIGHT, light->height);
- canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_LOCAL_MATRIX, light->xform_cache.affine_inverse());
- canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_OUTSIDE_ALPHA, light->mode == VS::CANVAS_LIGHT_MODE_MASK ? 1.0 : 0.0);
-
- if (has_shadow) {
-
- CanvasLightShadow *cls = canvas_light_shadow_owner.get(light->shadow_buffer);
- glActiveTexture(GL_TEXTURE0 + max_texture_units - 3);
- if (read_depth_supported)
- glBindTexture(GL_TEXTURE_2D, cls->depth);
- else
- glBindTexture(GL_TEXTURE_2D, cls->rgba);
-
- canvas_shader.set_uniform(CanvasShaderGLES2::SHADOW_TEXTURE, max_texture_units - 3);
- canvas_shader.set_uniform(CanvasShaderGLES2::SHADOW_MATRIX, light->shadow_matrix_cache);
- canvas_shader.set_uniform(CanvasShaderGLES2::SHADOW_ESM_MULTIPLIER, light->shadow_esm_mult);
- canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_SHADOW_COLOR, light->shadow_color);
- }
-
- glActiveTexture(GL_TEXTURE0 + max_texture_units - 2);
- canvas_shader.set_uniform(CanvasShaderGLES2::LIGHT_TEXTURE, max_texture_units - 2);
- Texture *t = texture_owner.get(light->texture);
- if (!t) {
- glBindTexture(GL_TEXTURE_2D, white_tex);
- } else {
-
- glBindTexture(t->target, t->tex_id);
- }
-
- glActiveTexture(GL_TEXTURE0);
- _canvas_item_render_commands<true>(ci, current_clip, reclip); //redraw using light
- }
-
- light = light->next_ptr;
- }
-
- if (light_used) {
-
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_LIGHTING, false);
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_MODULATE, canvas_use_modulate);
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_SHADOWS, false);
-
- canvas_shader.bind();
-
- if (material && shader_cache) {
- _canvas_item_setup_shader_params(material, shader_cache);
- _canvas_item_setup_shader_uniforms(material, shader_cache);
- }
-
- canvas_shader.set_uniform(CanvasShaderGLES2::MODELVIEW_MATRIX, ci->final_transform);
- canvas_shader.set_uniform(CanvasShaderGLES2::EXTRA_MATRIX, Transform2D());
- if (canvas_use_modulate)
- canvas_shader.set_uniform(CanvasShaderGLES2::MODULATE, canvas_modulate);
-
- glBlendEquation(GL_FUNC_ADD);
- if (current_rt && current_rt_transparent) {
- glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
- } else {
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
- }
- }
- }
-
- if (reclip) {
-
- glEnable(GL_SCISSOR_TEST);
- //glScissor(viewport.x+current_clip->final_clip_rect.pos.x,viewport.y+ (viewport.height-(current_clip->final_clip_rect.pos.y+current_clip->final_clip_rect.size.height)),
- //current_clip->final_clip_rect.size.width,current_clip->final_clip_rect.size.height);
-
- int x;
- int y;
- int w;
- int h;
-
- if (current_rt) {
- x = current_clip->final_clip_rect.pos.x;
- y = current_clip->final_clip_rect.pos.y;
- w = current_clip->final_clip_rect.size.x;
- h = current_clip->final_clip_rect.size.y;
- } else {
- x = current_clip->final_clip_rect.pos.x;
- y = window_size.height - (current_clip->final_clip_rect.pos.y + current_clip->final_clip_rect.size.y);
- w = current_clip->final_clip_rect.size.x;
- h = current_clip->final_clip_rect.size.y;
- }
-
- glScissor(x, y, w, h);
- }
-
- p_item_list = p_item_list->next;
- }
-
- if (current_clip) {
- glDisable(GL_SCISSOR_TEST);
- }
-}
-
-/* ENVIRONMENT */
-
-RID RasterizerGLES2::environment_create() {
-
- Environment *env = memnew(Environment);
- return environment_owner.make_rid(env);
-}
-
-void RasterizerGLES2::environment_set_background(RID p_env, VS::EnvironmentBG p_bg) {
-
- ERR_FAIL_INDEX(p_bg, VS::ENV_BG_MAX);
- Environment *env = environment_owner.get(p_env);
- ERR_FAIL_COND(!env);
- env->bg_mode = p_bg;
-}
-
-VS::EnvironmentBG RasterizerGLES2::environment_get_background(RID p_env) const {
-
- const Environment *env = environment_owner.get(p_env);
- ERR_FAIL_COND_V(!env, VS::ENV_BG_MAX);
- return env->bg_mode;
-}
-
-void RasterizerGLES2::environment_set_background_param(RID p_env, VS::EnvironmentBGParam p_param, const Variant &p_value) {
-
- ERR_FAIL_INDEX(p_param, VS::ENV_BG_PARAM_MAX);
- Environment *env = environment_owner.get(p_env);
- ERR_FAIL_COND(!env);
- env->bg_param[p_param] = p_value;
-}
-Variant RasterizerGLES2::environment_get_background_param(RID p_env, VS::EnvironmentBGParam p_param) const {
-
- ERR_FAIL_INDEX_V(p_param, VS::ENV_BG_PARAM_MAX, Variant());
- const Environment *env = environment_owner.get(p_env);
- ERR_FAIL_COND_V(!env, Variant());
- return env->bg_param[p_param];
-}
-
-void RasterizerGLES2::environment_set_enable_fx(RID p_env, VS::EnvironmentFx p_effect, bool p_enabled) {
-
- ERR_FAIL_INDEX(p_effect, VS::ENV_FX_MAX);
- Environment *env = environment_owner.get(p_env);
- ERR_FAIL_COND(!env);
- env->fx_enabled[p_effect] = p_enabled;
-}
-bool RasterizerGLES2::environment_is_fx_enabled(RID p_env, VS::EnvironmentFx p_effect) const {
-
- ERR_FAIL_INDEX_V(p_effect, VS::ENV_FX_MAX, false);
- const Environment *env = environment_owner.get(p_env);
- ERR_FAIL_COND_V(!env, false);
- return env->fx_enabled[p_effect];
-}
-
-void RasterizerGLES2::environment_fx_set_param(RID p_env, VS::EnvironmentFxParam p_param, const Variant &p_value) {
-
- ERR_FAIL_INDEX(p_param, VS::ENV_FX_PARAM_MAX);
- Environment *env = environment_owner.get(p_env);
- ERR_FAIL_COND(!env);
- env->fx_param[p_param] = p_value;
-}
-Variant RasterizerGLES2::environment_fx_get_param(RID p_env, VS::EnvironmentFxParam p_param) const {
-
- ERR_FAIL_INDEX_V(p_param, VS::ENV_FX_PARAM_MAX, Variant());
- const Environment *env = environment_owner.get(p_env);
- ERR_FAIL_COND_V(!env, Variant());
- return env->fx_param[p_param];
-}
-
-RID RasterizerGLES2::sampled_light_dp_create(int p_width, int p_height) {
-
- SampledLight *slight = memnew(SampledLight);
- slight->w = p_width;
- slight->h = p_height;
- slight->multiplier = 1.0;
- slight->is_float = float_linear_supported;
-
- glActiveTexture(GL_TEXTURE0);
- glGenTextures(1, &slight->texture);
- glBindTexture(GL_TEXTURE_2D, slight->texture);
- // for debug, but glitchy
- //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- // Remove artifact on the edges of the shadowmap
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
- if (slight->is_float) {
-#ifdef GLEW_ENABLED
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, p_width, p_height, 0, GL_RGBA, GL_FLOAT, NULL);
-#else
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, p_width, p_height, 0, GL_RGBA, GL_FLOAT, NULL);
-#endif
- } else {
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, p_width, p_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- }
-
- return sampled_light_owner.make_rid(slight);
-}
-
-void RasterizerGLES2::sampled_light_dp_update(RID p_sampled_light, const Color *p_data, float p_multiplier) {
-
- SampledLight *slight = sampled_light_owner.get(p_sampled_light);
- ERR_FAIL_COND(!slight);
-
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, slight->texture);
-
- if (slight->is_float) {
-
-#ifdef GLEW_ENABLED
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, slight->w, slight->h, GL_RGBA, GL_FLOAT, p_data);
-#else
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, slight->w, slight->h, GL_RGBA, GL_FLOAT, p_data);
-#endif
-
- } else {
- //convert to bytes
- uint8_t *tex8 = (uint8_t *)alloca(slight->w * slight->h * 4);
- const float *src = (const float *)p_data;
-
- for (int i = 0; i < slight->w * slight->h * 4; i++) {
-
- tex8[i] = Math::fast_ftoi(CLAMP(src[i] * 255.0, 0.0, 255.0));
- }
-
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, slight->w, slight->h, GL_RGBA, GL_UNSIGNED_BYTE, p_data);
- }
-
- slight->multiplier = p_multiplier;
-}
-
-/*MISC*/
-
-bool RasterizerGLES2::is_texture(const RID &p_rid) const {
-
- return texture_owner.owns(p_rid);
-}
-bool RasterizerGLES2::is_material(const RID &p_rid) const {
-
- return material_owner.owns(p_rid);
-}
-bool RasterizerGLES2::is_mesh(const RID &p_rid) const {
-
- return mesh_owner.owns(p_rid);
-}
-bool RasterizerGLES2::is_immediate(const RID &p_rid) const {
-
- return immediate_owner.owns(p_rid);
-}
-bool RasterizerGLES2::is_multimesh(const RID &p_rid) const {
-
- return multimesh_owner.owns(p_rid);
-}
-bool RasterizerGLES2::is_particles(const RID &p_beam) const {
-
- return particles_owner.owns(p_beam);
-}
-
-bool RasterizerGLES2::is_light(const RID &p_rid) const {
-
- return light_owner.owns(p_rid);
-}
-bool RasterizerGLES2::is_light_instance(const RID &p_rid) const {
-
- return light_instance_owner.owns(p_rid);
-}
-bool RasterizerGLES2::is_particles_instance(const RID &p_rid) const {
-
- return particles_instance_owner.owns(p_rid);
-}
-bool RasterizerGLES2::is_skeleton(const RID &p_rid) const {
-
- return skeleton_owner.owns(p_rid);
-}
-bool RasterizerGLES2::is_environment(const RID &p_rid) const {
-
- return environment_owner.owns(p_rid);
-}
-bool RasterizerGLES2::is_shader(const RID &p_rid) const {
-
- return shader_owner.owns(p_rid);
-}
-
-bool RasterizerGLES2::is_canvas_light_occluder(const RID &p_rid) const {
-
- return false;
-}
-
-void RasterizerGLES2::free(const RID &p_rid) {
- if (texture_owner.owns(p_rid)) {
-
- // delete the texture
- Texture *texture = texture_owner.get(p_rid);
-
- //glDeleteTextures( 1,&texture->tex_id );
- _rinfo.texture_mem -= texture->total_data_size;
- texture_owner.free(p_rid);
- memdelete(texture);
-
- } else if (shader_owner.owns(p_rid)) {
-
- // delete the texture
- Shader *shader = shader_owner.get(p_rid);
-
- switch (shader->mode) {
- case VS::SHADER_MATERIAL: {
- material_shader.free_custom_shader(shader->custom_code_id);
- } break;
- case VS::SHADER_POST_PROCESS: {
- //postprocess_shader.free_custom_shader(shader->custom_code_id);
- } break;
- }
-
- if (shader->dirty_list.in_list())
- _shader_dirty_list.remove(&shader->dirty_list);
-
- //material_shader.free_custom_shader(shader->custom_code_id);
- shader_owner.free(p_rid);
- memdelete(shader);
-
- } else if (material_owner.owns(p_rid)) {
-
- Material *material = material_owner.get(p_rid);
- ERR_FAIL_COND(!material);
-
- _free_fixed_material(p_rid); //just in case
- material_owner.free(p_rid);
- memdelete(material);
-
- } else if (mesh_owner.owns(p_rid)) {
-
- Mesh *mesh = mesh_owner.get(p_rid);
- ERR_FAIL_COND(!mesh);
- for (int i = 0; i < mesh->surfaces.size(); i++) {
-
- Surface *surface = mesh->surfaces[i];
- if (surface->array_local != 0) {
- memfree(surface->array_local);
- };
- if (surface->index_array_local != 0) {
- memfree(surface->index_array_local);
- };
-
- if (mesh->morph_target_count > 0) {
-
- for (int i = 0; i < mesh->morph_target_count; i++) {
-
- memdelete_arr(surface->morph_targets_local[i].array);
- }
- memdelete_arr(surface->morph_targets_local);
- surface->morph_targets_local = NULL;
- }
-
- if (surface->vertex_id)
- glDeleteBuffers(1, &surface->vertex_id);
- if (surface->index_id)
- glDeleteBuffers(1, &surface->index_id);
-
- memdelete(surface);
- };
-
- mesh->surfaces.clear();
-
- mesh_owner.free(p_rid);
- memdelete(mesh);
-
- } else if (multimesh_owner.owns(p_rid)) {
-
- MultiMesh *multimesh = multimesh_owner.get(p_rid);
- ERR_FAIL_COND(!multimesh);
-
- if (multimesh->tex_id) {
- glDeleteTextures(1, &multimesh->tex_id);
- }
-
- multimesh_owner.free(p_rid);
- memdelete(multimesh);
-
- } else if (immediate_owner.owns(p_rid)) {
-
- Immediate *immediate = immediate_owner.get(p_rid);
- ERR_FAIL_COND(!immediate);
-
- immediate_owner.free(p_rid);
- memdelete(immediate);
- } else if (particles_owner.owns(p_rid)) {
-
- Particles *particles = particles_owner.get(p_rid);
- ERR_FAIL_COND(!particles);
-
- particles_owner.free(p_rid);
- memdelete(particles);
- } else if (particles_instance_owner.owns(p_rid)) {
-
- ParticlesInstance *particles_isntance = particles_instance_owner.get(p_rid);
- ERR_FAIL_COND(!particles_isntance);
-
- particles_instance_owner.free(p_rid);
- memdelete(particles_isntance);
-
- } else if (skeleton_owner.owns(p_rid)) {
-
- Skeleton *skeleton = skeleton_owner.get(p_rid);
- ERR_FAIL_COND(!skeleton);
-
- if (skeleton->dirty_list.in_list())
- _skeleton_dirty_list.remove(&skeleton->dirty_list);
- if (skeleton->tex_id) {
- glDeleteTextures(1, &skeleton->tex_id);
- }
- skeleton_owner.free(p_rid);
- memdelete(skeleton);
-
- } else if (light_owner.owns(p_rid)) {
-
- Light *light = light_owner.get(p_rid);
- ERR_FAIL_COND(!light)
-
- light_owner.free(p_rid);
- memdelete(light);
-
- } else if (light_instance_owner.owns(p_rid)) {
-
- LightInstance *light_instance = light_instance_owner.get(p_rid);
- ERR_FAIL_COND(!light_instance);
- light_instance->clear_shadow_buffers();
- light_instance_owner.free(p_rid);
- memdelete(light_instance);
-
- } else if (environment_owner.owns(p_rid)) {
-
- Environment *env = environment_owner.get(p_rid);
- ERR_FAIL_COND(!env);
-
- environment_owner.free(p_rid);
- memdelete(env);
-
- } else if (viewport_data_owner.owns(p_rid)) {
-
- ViewportData *viewport_data = viewport_data_owner.get(p_rid);
- ERR_FAIL_COND(!viewport_data);
- glDeleteFramebuffers(1, &viewport_data->lum_fbo);
- glDeleteTextures(1, &viewport_data->lum_color);
- viewport_data_owner.free(p_rid);
- memdelete(viewport_data);
-
- } else if (render_target_owner.owns(p_rid)) {
-
- RenderTarget *render_target = render_target_owner.get(p_rid);
- ERR_FAIL_COND(!render_target);
- render_target_set_size(p_rid, 0, 0); //clears framebuffer
- texture_owner.free(render_target->texture);
- memdelete(render_target->texture_ptr);
- render_target_owner.free(p_rid);
- memdelete(render_target);
- } else if (sampled_light_owner.owns(p_rid)) {
-
- SampledLight *sampled_light = sampled_light_owner.get(p_rid);
- ERR_FAIL_COND(!sampled_light);
- glDeleteTextures(1, &sampled_light->texture);
- sampled_light_owner.free(p_rid);
- memdelete(sampled_light);
- } else if (canvas_occluder_owner.owns(p_rid)) {
-
- CanvasOccluder *co = canvas_occluder_owner.get(p_rid);
- if (co->index_id)
- glDeleteBuffers(1, &co->index_id);
- if (co->vertex_id)
- glDeleteBuffers(1, &co->vertex_id);
-
- canvas_occluder_owner.free(p_rid);
- memdelete(co);
-
- } else if (canvas_light_shadow_owner.owns(p_rid)) {
-
- CanvasLightShadow *cls = canvas_light_shadow_owner.get(p_rid);
- glDeleteFramebuffers(1, &cls->fbo);
- glDeleteRenderbuffers(1, &cls->rbo);
- glDeleteTextures(1, &cls->depth);
- /*
- if (!read_depth_supported) {
- glDeleteTextures(1,&cls->rgba);
- }
- */
-
- canvas_light_shadow_owner.free(p_rid);
- memdelete(cls);
- };
-}
-
-bool RasterizerGLES2::ShadowBuffer::init(int p_size, bool p_use_depth) {
-
- size = p_size;
- // Create a framebuffer object
- glGenFramebuffers(1, &fbo);
- glBindFramebuffer(GL_FRAMEBUFFER, fbo);
-
- // Create a render buffer
- glGenRenderbuffers(1, &rbo);
- glBindRenderbuffer(GL_RENDERBUFFER, rbo);
-
- // Create a texture for storing the depth
- glGenTextures(1, &depth);
- glBindTexture(GL_TEXTURE_2D, depth);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-
- // Remove artifact on the edges of the shadowmap
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
- //print_line("ERROR? "+itos(glGetError()));
- if (p_use_depth) {
-
- // We'll use a depth texture to store the depths in the shadow map
- glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, size, size, 0,
- GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
-
-#ifdef GLEW_ENABLED
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-#endif
-
- // Attach the depth texture to FBO depth attachment point
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
- GL_TEXTURE_2D, depth, 0);
-
-#ifdef GLEW_ENABLED
- glDrawBuffer(GL_NONE);
-#endif
- } else {
- // We'll use a RGBA texture into which we pack the depth info
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL);
-
- // Attach the RGBA texture to FBO color attachment point
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
- GL_TEXTURE_2D, depth, 0);
-
- // Allocate 16-bit depth buffer
- glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, size, size);
-
- // Attach the render buffer as depth buffer - will be ignored
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
- GL_RENDERBUFFER, rbo);
- }
-
-#if 0
-
- if (!p_use_depth) {
-
-
- print_line("try no depth!");
-
- glGenTextures(1, &rgba);
- glBindTexture(GL_TEXTURE_2D, rgba);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, rgba, 0);
-/*
- glGenRenderbuffers(1, &depth);
- glBindRenderbuffer(GL_RENDERBUFFER, depth);
- glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, p_size, p_size);
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, depth);
-*/
- glGenTextures(1, &depth);
- glBindTexture(GL_TEXTURE_2D, depth);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16, size, size, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, depth, 0);
-
- } else {
-
- //glGenRenderbuffers(1, &rbo);
- //glBindRenderbuffer(GL_RENDERBUFFER, rbo);
-
- glGenTextures(1, &depth);
- glBindTexture(GL_TEXTURE_2D, depth);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, size, size, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, depth, 0);
-
- }
-
-#endif
- GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
-//printf("errnum: %x\n",status);
-#ifdef GLEW_ENABLED
- if (p_use_depth) {
- //glDrawBuffer(GL_BACK);
- }
-#endif
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
- DEBUG_TEST_ERROR("Shadow Buffer Init");
- ERR_FAIL_COND_V(status != GL_FRAMEBUFFER_COMPLETE, false);
-
-#ifdef GLEW_ENABLED
- if (p_use_depth) {
- //glDrawBuffer(GL_BACK);
- }
-#endif
-
-#if 0
- glGenFramebuffers(1, &fbo_blur);
- glBindFramebuffer(GL_FRAMEBUFFER, fbo_blur);
-
- glGenRenderbuffers(1, &rbo_blur);
- glBindRenderbuffer(GL_RENDERBUFFER, rbo_blur);
-
- glGenTextures(1, &blur);
- glBindTexture(GL_TEXTURE_2D, blur);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
-
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- //glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16, size, size, 0,
- //GL_DEPTH_COMPONENT16, GL_UNSIGNED_SHORT, NULL);
-
- // Attach the RGBA texture to FBO color attachment point
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
- GL_TEXTURE_2D, blur, 0);
-
- // Allocate 16-bit depth buffer
- /*
- glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, size, size);
-
- // Attach the render buffer as depth buffer - will be ignored
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
- GL_RENDERBUFFER, rbo_blur);
- */
- status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
- OS::get_singleton()->print("Status: %x\n",status);
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
- DEBUG_TEST_ERROR("Shadow Blur Buffer Init");
- ERR_FAIL_COND_V( status != GL_FRAMEBUFFER_COMPLETE,false );
-#endif
-
- return true;
-}
-
-void RasterizerGLES2::_update_framebuffer() {
-
- if (!use_framebuffers)
- return;
-
- int scale = GLOBAL_DEF("rasterizer/framebuffer_shrink", 1);
- if (scale < 1)
- scale = 1;
-
- int dwidth = OS::get_singleton()->get_video_mode().width / scale;
- int dheight = OS::get_singleton()->get_video_mode().height / scale;
-
- if (framebuffer.fbo && dwidth == framebuffer.width && dheight == framebuffer.height)
- return;
-
- bool use_fbo = true;
-
- if (framebuffer.fbo != 0) {
-
- glDeleteFramebuffers(1, &framebuffer.fbo);
-#if 0
- glDeleteTextures(1,&framebuffer.depth);
-#else
- glDeleteRenderbuffers(1, &framebuffer.depth);
-
-#endif
- glDeleteTextures(1, &framebuffer.color);
-
- for (int i = 0; i < framebuffer.luminance.size(); i++) {
-
- glDeleteTextures(1, &framebuffer.luminance[i].color);
- glDeleteFramebuffers(1, &framebuffer.luminance[i].fbo);
- }
-
- for (int i = 0; i < 3; i++) {
-
- glDeleteTextures(1, &framebuffer.blur[i].color);
- glDeleteFramebuffers(1, &framebuffer.blur[i].fbo);
- }
-
- glDeleteTextures(1, &framebuffer.sample_color);
- glDeleteFramebuffers(1, &framebuffer.sample_fbo);
- framebuffer.luminance.clear();
- framebuffer.blur_size = 0;
- framebuffer.fbo = 0;
- }
-
-#ifdef TOOLS_ENABLED
- framebuffer.active = use_fbo;
-#else
- framebuffer.active = use_fbo && !low_memory_2d;
-#endif
- framebuffer.width = dwidth;
- framebuffer.height = dheight;
- framebuffer.scale = scale;
-
- if (!framebuffer.active)
- return;
-
- glGenFramebuffers(1, &framebuffer.fbo);
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.fbo);
-
-//print_line("generating fbo, id: "+itos(framebuffer.fbo));
-//depth
-
-// Create a render buffer
-
-#if 0
- glGenTextures(1, &framebuffer.depth);
- glBindTexture(GL_TEXTURE_2D, framebuffer.depth);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, framebuffer.width, framebuffer.height, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE );
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, framebuffer.depth, 0);
-
-#else
-
- glGenRenderbuffers(1, &framebuffer.depth);
- glBindRenderbuffer(GL_RENDERBUFFER, framebuffer.depth);
-
- glRenderbufferStorage(GL_RENDERBUFFER, use_depth24 ? _DEPTH_COMPONENT24_OES : GL_DEPTH_COMPONENT16, framebuffer.width, framebuffer.height);
-
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, framebuffer.depth);
-
-#endif
- //color
-
- //GLuint format_rgba = use_fp16_fb?_GL_RGBA16F_EXT:GL_RGBA;
- GLuint format_rgba = GL_RGBA;
- GLuint format_type = use_fp16_fb ? _GL_HALF_FLOAT_OES : GL_UNSIGNED_BYTE;
- GLuint format_internal = GL_RGBA;
-
- if (use_16bits_fbo) {
- format_type = GL_UNSIGNED_SHORT_5_6_5;
- format_rgba = GL_RGB;
- format_internal = GL_RGB;
- }
- /*GLuint format_luminance = use_fp16_fb?GL_RGB16F:GL_RGBA;
- GLuint format_luminance_type = use_fp16_fb?(use_fu_GL_HALF_FLOAT_OES):GL_UNSIGNED_BYTE;
- GLuint format_luminance_components = use_fp16_fb?GL_RGB:GL_RGBA;*/
-
- GLuint format_luminance = use_fp16_fb ? _GL_RG_EXT : GL_RGBA;
- GLuint format_luminance_type = use_fp16_fb ? (full_float_fb_supported ? GL_FLOAT : _GL_HALF_FLOAT_OES) : GL_UNSIGNED_BYTE;
- GLuint format_luminance_components = use_fp16_fb ? _GL_RG_EXT : GL_RGBA;
-
- glGenTextures(1, &framebuffer.color);
- glBindTexture(GL_TEXTURE_2D, framebuffer.color);
- glTexImage2D(GL_TEXTURE_2D, 0, format_rgba, framebuffer.width, framebuffer.height, 0, format_internal, format_type, NULL);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, framebuffer.color, 0);
-#
- GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
-
- if (status != GL_FRAMEBUFFER_COMPLETE) {
-
- glDeleteFramebuffers(1, &framebuffer.fbo);
-#if 0
- glDeleteTextures(1,&framebuffer.depth);
-#else
- glDeleteRenderbuffers(1, &framebuffer.depth);
-
-#endif
- glDeleteTextures(1, &framebuffer.color);
- framebuffer.fbo = 0;
- framebuffer.active = false;
- //print_line("**************** NO FAMEBUFFEEEERRRR????");
- WARN_PRINT(String("Could not create framebuffer!!, code: " + itos(status)).ascii().get_data());
- }
-
- //sample
-
- glGenFramebuffers(1, &framebuffer.sample_fbo);
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.sample_fbo);
- glGenTextures(1, &framebuffer.sample_color);
- glBindTexture(GL_TEXTURE_2D, framebuffer.sample_color);
- glTexImage2D(GL_TEXTURE_2D, 0, format_rgba, framebuffer.width, framebuffer.height, 0, format_internal, format_type, NULL);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, framebuffer.sample_color, 0);
-#
- status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
-
- if (status != GL_FRAMEBUFFER_COMPLETE) {
-
- glDeleteFramebuffers(1, &framebuffer.fbo);
-#if 0
- glDeleteTextures(1,&framebuffer.depth);
-#else
- glDeleteRenderbuffers(1, &framebuffer.depth);
-
-#endif
- glDeleteTextures(1, &framebuffer.color);
- glDeleteTextures(1, &framebuffer.sample_color);
- glDeleteFramebuffers(1, &framebuffer.sample_fbo);
- framebuffer.fbo = 0;
- framebuffer.active = false;
- //print_line("**************** NO FAMEBUFFEEEERRRR????");
- WARN_PRINT("Could not create framebuffer!!");
- }
- //blur
-
- int size = GLOBAL_DEF("rasterizer/blur_buffer_size", 256);
-
- if (size != framebuffer.blur_size) {
-
- for (int i = 0; i < 3; i++) {
-
- if (framebuffer.blur[i].fbo) {
- glDeleteFramebuffers(1, &framebuffer.blur[i].fbo);
- glDeleteTextures(1, &framebuffer.blur[i].color);
- framebuffer.blur[i].fbo = 0;
- framebuffer.blur[i].color = 0;
- }
- }
-
- framebuffer.blur_size = size;
-
- for (int i = 0; i < 3; i++) {
-
- glGenFramebuffers(1, &framebuffer.blur[i].fbo);
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.blur[i].fbo);
-
- glGenTextures(1, &framebuffer.blur[i].color);
- glBindTexture(GL_TEXTURE_2D, framebuffer.blur[i].color);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glTexImage2D(GL_TEXTURE_2D, 0, format_rgba, size, size, 0,
- format_internal, format_type, NULL);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
- GL_TEXTURE_2D, framebuffer.blur[i].color, 0);
-
- GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
-
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
- DEBUG_TEST_ERROR("Shadow Buffer Init");
- ERR_CONTINUE(status != GL_FRAMEBUFFER_COMPLETE);
- }
- }
-
- // luminance
-
- int base_size = GLOBAL_DEF("rasterizer/luminance_buffer_size", 81);
-
- if (framebuffer.luminance.empty() || framebuffer.luminance[0].size != base_size) {
-
- for (int i = 0; i < framebuffer.luminance.size(); i++) {
-
- glDeleteFramebuffers(1, &framebuffer.luminance[i].fbo);
- glDeleteTextures(1, &framebuffer.luminance[i].color);
- }
-
- framebuffer.luminance.clear();
-
- while (base_size > 0) {
-
- FrameBuffer::Luminance lb;
- lb.size = base_size;
-
- glGenFramebuffers(1, &lb.fbo);
- glBindFramebuffer(GL_FRAMEBUFFER, lb.fbo);
-
- glGenTextures(1, &lb.color);
- glBindTexture(GL_TEXTURE_2D, lb.color);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glTexImage2D(GL_TEXTURE_2D, 0, format_luminance, lb.size, lb.size, 0,
- format_luminance_components, format_luminance_type, NULL);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
- GL_TEXTURE_2D, lb.color, 0);
-
- GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
-
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
-
- base_size /= 3;
-
- DEBUG_TEST_ERROR("Shadow Buffer Init");
- ERR_CONTINUE(status != GL_FRAMEBUFFER_COMPLETE);
-
- framebuffer.luminance.push_back(lb);
- }
- }
-}
-
-void RasterizerGLES2::set_base_framebuffer(GLuint p_id, Vector2 p_size) {
-
- base_framebuffer = p_id;
-
- if (p_size.x != 0) {
- window_size = p_size;
- };
-}
-
-#if 0
-void RasterizerGLES2::_update_blur_buffer() {
-
- int size = GLOBAL_DEF("rasterizer/blur_buffer_size",256);
- if (size!=framebuffer.blur_size) {
-
- for(int i=0;i<3;i++) {
-
- if (framebuffer.blur[i].fbo) {
- glDeleteFramebuffers(1,&framebuffer.blur[i].fbo);
- glDeleteTextures(1,&framebuffer.blur[i].color);
- framebuffer.blur[i].fbo=0;
- framebuffer.blur[i].color=0;
- }
- }
-
- framebuffer.blur_size=size;
-
- for(int i=0;i<3;i++) {
-
- glGenFramebuffers(1, &framebuffer.blur[i].fbo);
- glBindFramebuffer(GL_FRAMEBUFFER, framebuffer.blur[i].fbo);
-
- glGenTextures(1, &framebuffer.blur[i].color);
- glBindTexture(GL_TEXTURE_2D, framebuffer.blur[i].color);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, NULL);
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
- GL_TEXTURE_2D, framebuffer.blur[i].color, 0);
-
-
- GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
-
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
- DEBUG_TEST_ERROR("Shadow Buffer Init");
- ERR_CONTINUE( status != GL_FRAMEBUFFER_COMPLETE );
-
-
- }
-
- }
-
-
-
-
-
-}
-#endif
-
-bool RasterizerGLES2::_test_depth_shadow_buffer() {
-
- int size = 16;
-
- GLuint fbo;
- GLuint rbo;
- GLuint depth;
-
- glActiveTexture(GL_TEXTURE0);
-
- glGenFramebuffers(1, &fbo);
- glBindFramebuffer(GL_FRAMEBUFFER, fbo);
-
- // Create a render buffer
- glGenRenderbuffers(1, &rbo);
- glBindRenderbuffer(GL_RENDERBUFFER, rbo);
-
- // Create a texture for storing the depth
- glGenTextures(1, &depth);
- glBindTexture(GL_TEXTURE_2D, depth);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- // Remove artifact on the edges of the shadowmap
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-
- // We'll use a depth texture to store the depths in the shadow map
- glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, size, size, 0,
- GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL);
-
-#ifdef GLEW_ENABLED
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-#endif
-
- // Attach the depth texture to FBO depth attachment point
- glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,
- GL_TEXTURE_2D, depth, 0);
-
- GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
-
- glDeleteFramebuffers(1, &fbo);
- glDeleteRenderbuffers(1, &rbo);
- glDeleteTextures(1, &depth);
-
- return status == GL_FRAMEBUFFER_COMPLETE;
-}
-
-void RasterizerGLES2::init() {
-
- if (OS::get_singleton()->is_stdout_verbose()) {
- print_line("Using GLES2 video driver");
- }
-
-#ifdef GLEW_ENABLED
- GLuint res = glewInit();
- ERR_FAIL_COND(res != GLEW_OK);
- if (OS::get_singleton()->is_stdout_verbose()) {
- print_line(String("GLES2: Using GLEW ") + (const char *)glewGetString(GLEW_VERSION));
- }
-
- // Godot makes use of functions from ARB_framebuffer_object extension which is not implemented by all drivers.
- // On the other hand, these drivers might implement the older EXT_framebuffer_object extension
- // with which current source code is backward compatible.
-
- bool framebuffer_object_is_supported = glewIsSupported("GL_ARB_framebuffer_object");
-
- if (!framebuffer_object_is_supported) {
- WARN_PRINT("GL_ARB_framebuffer_object not supported by your graphics card.");
-
- if (glewIsSupported("GL_EXT_framebuffer_object")) {
- // falling-back to the older EXT function if present
- WARN_PRINT("Falling-back to GL_EXT_framebuffer_object.");
-
- glIsRenderbuffer = glIsRenderbufferEXT;
- glBindRenderbuffer = glBindRenderbufferEXT;
- glDeleteRenderbuffers = glDeleteRenderbuffersEXT;
- glGenRenderbuffers = glGenRenderbuffersEXT;
- glRenderbufferStorage = glRenderbufferStorageEXT;
- glGetRenderbufferParameteriv = glGetRenderbufferParameterivEXT;
- glIsFramebuffer = glIsFramebufferEXT;
- glBindFramebuffer = glBindFramebufferEXT;
- glDeleteFramebuffers = glDeleteFramebuffersEXT;
- glGenFramebuffers = glGenFramebuffersEXT;
- glCheckFramebufferStatus = glCheckFramebufferStatusEXT;
- glFramebufferTexture1D = glFramebufferTexture1DEXT;
- glFramebufferTexture2D = glFramebufferTexture2DEXT;
- glFramebufferTexture3D = glFramebufferTexture3DEXT;
- glFramebufferRenderbuffer = glFramebufferRenderbufferEXT;
- glGetFramebufferAttachmentParameteriv = glGetFramebufferAttachmentParameterivEXT;
- glGenerateMipmap = glGenerateMipmapEXT;
-
- framebuffer_object_is_supported = true;
- } else {
- ERR_PRINT("Framebuffer Object is not supported by your graphics card.");
- }
- }
-
- // Check for GL 2.1 compatibility, if not bail out
- if (!(glewIsSupported("GL_VERSION_2_1") && framebuffer_object_is_supported)) {
- ERR_PRINT("Your system's graphic drivers seem not to support OpenGL 2.1 / GLES 2.0, sorry :(\n"
- "Try a drivers update, buy a new GPU or try software rendering on Linux; Godot is now going to terminate.");
- OS::get_singleton()->alert("Your system's graphic drivers seem not to support OpenGL 2.1 / GLES 2.0, sorry :(\n"
- "Godot Engine will self-destruct as soon as you acknowledge this error message.",
- "Fatal error: Insufficient OpenGL / GLES drivers");
- exit(1);
- }
-#endif
-
- scene_pass = 1;
-
- if (extensions.size() == 0) {
-
- set_extensions((const char *)glGetString(GL_EXTENSIONS));
- }
-
- GLint tmp = 0;
- glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &tmp);
- //print_line("GL_MAX_VERTEX_ATTRIBS "+itos(tmp));
-
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(GL_LEQUAL);
- glFrontFace(GL_CW);
- //glEnable(GL_TEXTURE_2D);
-
- default_material = create_default_material();
-
- material_shader.init();
- canvas_shader.init();
- copy_shader.init();
- canvas_shadow_shader.init();
-
-#ifdef GLEW_ENABLED
- material_shader.set_conditional(MaterialShaderGLES2::USE_GLES_OVER_GL, true);
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_GLES_OVER_GL, true);
- canvas_shadow_shader.set_conditional(CanvasShadowShaderGLES2::USE_GLES_OVER_GL, true);
- copy_shader.set_conditional(CopyShaderGLES2::USE_GLES_OVER_GL, true);
-#endif
-
-#ifdef ANGLE_ENABLED
- // Fix for ANGLE
- material_shader.set_conditional(MaterialShaderGLES2::DISABLE_FRONT_FACING, true);
-#endif
-
- shadow = NULL;
- shadow_pass = 0;
-
- framebuffer.fbo = 0;
- framebuffer.width = 0;
- framebuffer.height = 0;
- //framebuffer.buff16=false;
- //framebuffer.blur[0].fbo=false;
- //framebuffer.blur[1].fbo=false;
- framebuffer.active = false;
-
- //do a single initial clear
- glClearColor(0, 0, 0, 1);
- //glClearDepth(1.0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- glGenTextures(1, &white_tex);
- unsigned char whitetexdata[8 * 8 * 3];
- for (int i = 0; i < 8 * 8 * 3; i++) {
- whitetexdata[i] = 255;
- }
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, white_tex);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 8, 8, 0, GL_RGB, GL_UNSIGNED_BYTE, whitetexdata);
- glGenerateMipmap(GL_TEXTURE_2D);
- glBindTexture(GL_TEXTURE_2D, 0);
-
-#ifdef GLEW_ENABLED
-
- pvr_supported = false;
- etc_supported = false;
- use_depth24 = true;
- s3tc_supported = true;
- atitc_supported = false;
- //use_texture_instancing=false;
- //use_attribute_instancing=true;
- use_texture_instancing = false;
- use_attribute_instancing = true;
- full_float_fb_supported = true;
- srgb_supported = true;
- latc_supported = true;
- s3tc_srgb_supported = true;
- use_anisotropic_filter = true;
- float_linear_supported = true;
-
- GLint vtf;
- glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &vtf);
- float_supported = extensions.has("GL_OES_texture_float") || extensions.has("GL_ARB_texture_float");
- use_hw_skeleton_xform = vtf > 0 && float_supported;
-
- read_depth_supported = _test_depth_shadow_buffer();
- use_rgba_shadowmaps = !read_depth_supported;
- //print_line("read depth support? "+itos(read_depth_supported));
-
- glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &anisotropic_level);
- anisotropic_level = MIN(anisotropic_level, float(GLOBAL_DEF("rasterizer/anisotropic_filter_level", 4.0)));
-#ifdef OSX_ENABLED
- use_rgba_shadowmaps = true;
- use_fp16_fb = false;
-#else
-
-#endif
- use_half_float = true;
-
-#else
-
- for (Set<String>::Element *E = extensions.front(); E; E = E->next()) {
- print_line(E->get());
- }
- read_depth_supported = extensions.has("GL_OES_depth_texture");
- use_rgba_shadowmaps = !read_depth_supported;
- if (shadow_filter >= SHADOW_FILTER_ESM && !extensions.has("GL_EXT_frag_depth")) {
- use_rgba_shadowmaps = true; //no other way, go back to rgba
- }
- pvr_supported = extensions.has("GL_IMG_texture_compression_pvrtc");
- pvr_srgb_supported = extensions.has("GL_EXT_pvrtc_sRGB");
- etc_supported = extensions.has("GL_OES_compressed_ETC1_RGB8_texture");
- use_depth24 = extensions.has("GL_OES_depth24");
- s3tc_supported = extensions.has("GL_EXT_texture_compression_dxt1") || extensions.has("GL_EXT_texture_compression_s3tc") || extensions.has("WEBGL_compressed_texture_s3tc");
- use_half_float = extensions.has("GL_OES_vertex_half_float");
- atitc_supported = extensions.has("GL_AMD_compressed_ATC_texture");
-
- srgb_supported = extensions.has("GL_EXT_sRGB");
-#ifndef ANGLE_ENABLED
- s3tc_srgb_supported = s3tc_supported && extensions.has("GL_EXT_texture_compression_s3tc");
-#else
- s3tc_srgb_supported = s3tc_supported;
-#endif
- latc_supported = extensions.has("GL_EXT_texture_compression_latc");
- anisotropic_level = 1.0;
- use_anisotropic_filter = extensions.has("GL_EXT_texture_filter_anisotropic");
- if (use_anisotropic_filter) {
- glGetFloatv(_GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &anisotropic_level);
- anisotropic_level = MIN(anisotropic_level, float(GLOBAL_DEF("rasterizer/anisotropic_filter_level", 4.0)));
- }
-
- print_line("S3TC: " + itos(s3tc_supported) + " ATITC: " + itos(atitc_supported));
-
- GLint vtf;
- glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &vtf);
- float_supported = extensions.has("GL_OES_texture_float") || extensions.has("GL_ARB_texture_float");
- use_hw_skeleton_xform = vtf > 0 && float_supported;
- float_linear_supported = extensions.has("GL_OES_texture_float_linear");
-
- /*
- if (extensions.has("GL_QCOM_tiled_rendering"))
- use_hw_skeleton_xform=false;
- */
- GLint mva;
- glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &mva);
- if (vtf == 0 && mva > 8) {
- //tegra 3, mali 400
- use_attribute_instancing = true;
- use_texture_instancing = false;
- } else if (vtf > 0 && extensions.has("GL_OES_texture_float")) {
- //use_texture_instancing=true;
- use_texture_instancing = false; // i don't get it, uniforms are faster.
- use_attribute_instancing = false;
-
- } else {
-
- use_texture_instancing = false;
- use_attribute_instancing = false;
- }
-
- if (use_fp16_fb) {
- use_fp16_fb = extensions.has("GL_OES_texture_half_float") && extensions.has("GL_EXT_color_buffer_half_float") && extensions.has("GL_EXT_texture_rg");
- }
-
- full_float_fb_supported = extensions.has("GL_EXT_color_buffer_float");
-
-//etc_supported=false;
-
-#endif
-
- //use_rgba_shadowmaps=true;
-
- glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &max_texture_units);
- glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
- //read_depth_supported=false;
-
- canvas_shadow_blur = canvas_light_shadow_buffer_create(max_texture_size);
-
- {
- //shadowmaps
-
- //don't use a shadowbuffer too big in GLES, this should be the maximum
- int max_shadow_size = GLOBAL_DEF("rasterizer/max_shadow_buffer_size", 1024);
- int smsize = max_shadow_size;
- while (smsize >= 16) {
-
- ShadowBuffer sb;
- bool s = sb.init(smsize, !use_rgba_shadowmaps);
- if (s)
- near_shadow_buffers.push_back(sb);
- smsize /= 2;
- }
-
- blur_shadow_buffer.init(max_shadow_size, !use_rgba_shadowmaps);
-
- //material_shader
- material_shader.set_conditional(MaterialShaderGLES2::USE_DEPTH_SHADOWS, !use_rgba_shadowmaps);
- canvas_shadow_shader.set_conditional(CanvasShadowShaderGLES2::USE_DEPTH_SHADOWS, !use_rgba_shadowmaps);
- }
-
- shadow_material = material_create(); //empty with nothing
- shadow_mat_ptr = material_owner.get(shadow_material);
-
- // Now create a second shadow material for double-sided shadow instances
- shadow_material_double_sided = material_create();
- shadow_mat_double_sided_ptr = material_owner.get(shadow_material_double_sided);
- shadow_mat_double_sided_ptr->flags[VS::MATERIAL_FLAG_DOUBLE_SIDED] = true;
-
- overdraw_material = create_overdraw_debug_material();
- copy_shader.set_conditional(CopyShaderGLES2::USE_8BIT_HDR, !use_fp16_fb);
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_DEPTH_SHADOWS, read_depth_supported);
-
- canvas_shader.set_conditional(CanvasShaderGLES2::USE_PIXEL_SNAP, GLOBAL_DEF("rendering/use_2d_pixel_snap", false));
-
- npo2_textures_available = true;
- //fragment_lighting=false;
- _rinfo.texture_mem = 0;
- current_env = NULL;
- current_rt = NULL;
- current_vd = NULL;
- current_debug = VS::SCENARIO_DEBUG_DISABLED;
- camera_ortho = false;
-
- glGenBuffers(1, &gui_quad_buffer);
- glBindBuffer(GL_ARRAY_BUFFER, gui_quad_buffer);
-#ifdef GLES_NO_CLIENT_ARRAYS //WebGL specific implementation.
- glBufferData(GL_ARRAY_BUFFER, 8 * MAX_POLYGON_VERTICES, NULL, GL_DYNAMIC_DRAW);
-#else
- glBufferData(GL_ARRAY_BUFFER, 128, NULL, GL_DYNAMIC_DRAW);
-#endif
- glBindBuffer(GL_ARRAY_BUFFER, 0); //unbind
-
-#ifdef GLES_NO_CLIENT_ARRAYS //webgl indices buffer
- glGenBuffers(1, &indices_buffer);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indices_buffer);
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, 16 * 1024, NULL, GL_DYNAMIC_DRAW);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); // unbind
-#endif
-
- shader_time_rollback = GLOBAL_DEF("rasterizer/shader_time_rollback", 300);
-
- using_canvas_bg = false;
- _update_framebuffer();
- DEBUG_TEST_ERROR("Initializing");
-}
-
-void RasterizerGLES2::finish() {
-
- free(default_material);
- free(shadow_material);
- free(shadow_material_double_sided);
- free(canvas_shadow_blur);
- free(overdraw_material);
-}
-
-int RasterizerGLES2::get_render_info(VS::RenderInfo p_info) {
-
- switch (p_info) {
-
- case VS::INFO_OBJECTS_IN_FRAME: {
-
- return _rinfo.object_count;
- } break;
- case VS::INFO_VERTICES_IN_FRAME: {
-
- return _rinfo.vertex_count;
- } break;
- case VS::INFO_MATERIAL_CHANGES_IN_FRAME: {
-
- return _rinfo.mat_change_count;
- } break;
- case VS::INFO_SHADER_CHANGES_IN_FRAME: {
-
- return _rinfo.shader_change_count;
- } break;
- case VS::INFO_DRAW_CALLS_IN_FRAME: {
-
- return _rinfo.draw_calls;
- } break;
- case VS::INFO_SURFACE_CHANGES_IN_FRAME: {
-
- return _rinfo.surface_count;
- } break;
- case VS::INFO_USAGE_VIDEO_MEM_TOTAL: {
-
- return 0;
- } break;
- case VS::INFO_VIDEO_MEM_USED: {
-
- return get_render_info(VS::INFO_TEXTURE_MEM_USED) + get_render_info(VS::INFO_VERTEX_MEM_USED);
- } break;
- case VS::INFO_TEXTURE_MEM_USED: {
-
- return _rinfo.texture_mem;
- } break;
- case VS::INFO_VERTEX_MEM_USED: {
-
- return 0;
- } break;
- }
-
- return 0;
-}
-
-void RasterizerGLES2::set_extensions(const char *p_strings) {
-
- Vector<String> strings = String(p_strings).split(" ", false);
- for (int i = 0; i < strings.size(); i++) {
-
- extensions.insert(strings[i]);
- //print_line(strings[i]);
- }
-}
-
-bool RasterizerGLES2::needs_to_draw_next_frame() const {
-
- return draw_next_frame;
-}
-
-bool RasterizerGLES2::has_feature(VS::Features p_feature) const {
-
- switch (p_feature) {
- case VS::FEATURE_SHADERS: return true;
- case VS::FEATURE_NEEDS_RELOAD_HOOK: return use_reload_hooks;
- default: return false;
- }
-}
-
-void RasterizerGLES2::reload_vram() {
-
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(GL_LEQUAL);
- glFrontFace(GL_CW);
-
- //do a single initial clear
- glClearColor(0, 0, 0, 1);
- //glClearDepth(1.0);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- glGenTextures(1, &white_tex);
- unsigned char whitetexdata[8 * 8 * 3];
- for (int i = 0; i < 8 * 8 * 3; i++) {
- whitetexdata[i] = 255;
- }
- glActiveTexture(GL_TEXTURE0);
- glBindTexture(GL_TEXTURE_2D, white_tex);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 8, 8, 0, GL_RGB, GL_UNSIGNED_BYTE, whitetexdata);
- glGenerateMipmap(GL_TEXTURE_2D);
- glBindTexture(GL_TEXTURE_2D, 0);
-
- List<RID> textures;
- texture_owner.get_owned_list(&textures);
- keep_copies = false;
- for (List<RID>::Element *E = textures.front(); E; E = E->next()) {
-
- RID tid = E->get();
- Texture *t = texture_owner.get(tid);
- ERR_CONTINUE(!t);
- t->tex_id = 0;
- t->data_size = 0;
- glGenTextures(1, &t->tex_id);
- t->active = false;
- if (t->render_target)
- continue;
- texture_allocate(tid, t->width, t->height, t->format, t->flags);
- bool had_image = false;
- for (int i = 0; i < 6; i++) {
- if (!t->image[i].empty()) {
- texture_set_data(tid, t->image[i], VS::CubeMapSide(i));
- had_image = true;
- }
- }
-
- if (!had_image && t->reloader) {
- Object *rl = ObjectDB::get_instance(t->reloader);
- if (rl)
- rl->call(t->reloader_func, tid);
- }
- }
- keep_copies = true;
-
- List<RID> render_targets;
- render_target_owner.get_owned_list(&render_targets);
- for (List<RID>::Element *E = render_targets.front(); E; E = E->next()) {
- RenderTarget *rt = render_target_owner.get(E->get());
-
- int w = rt->width;
- int h = rt->height;
- rt->width = 0;
- rt->height = 0;
- render_target_set_size(E->get(), w, h);
- }
-
- List<RID> meshes;
- mesh_owner.get_owned_list(&meshes);
- for (List<RID>::Element *E = meshes.front(); E; E = E->next()) {
-
- Mesh *mesh = mesh_owner.get(E->get());
- Vector<Surface *> surfaces = mesh->surfaces;
- mesh->surfaces.clear();
- for (int i = 0; i < surfaces.size(); i++) {
- mesh_add_surface(E->get(), surfaces[i]->primitive, surfaces[i]->data, surfaces[i]->morph_data, surfaces[i]->alpha_sort);
- mesh_surface_set_material(E->get(), i, surfaces[i]->material);
-
- if (surfaces[i]->array_local != 0) {
- memfree(surfaces[i]->array_local);
- };
- if (surfaces[i]->index_array_local != 0) {
- memfree(surfaces[i]->index_array_local);
- };
-
- memdelete(surfaces[i]);
- }
- }
-
- List<RID> skeletons;
- skeleton_owner.get_owned_list(&skeletons);
- for (List<RID>::Element *E = skeletons.front(); E; E = E->next()) {
-
- Skeleton *sk = skeleton_owner.get(E->get());
- if (!sk->tex_id)
- continue; //does not use hw transform, leave alone
-
- Vector<Skeleton::Bone> bones = sk->bones;
- sk->bones.clear();
- sk->tex_id = 0;
- sk->pixel_size = 1.0;
- skeleton_resize(E->get(), bones.size());
- sk->bones = bones;
- }
-
- List<RID> multimeshes;
- multimesh_owner.get_owned_list(&multimeshes);
- for (List<RID>::Element *E = multimeshes.front(); E; E = E->next()) {
-
- MultiMesh *mm = multimesh_owner.get(E->get());
- if (!mm->tex_id)
- continue; //does not use hw transform, leave alone
-
- Vector<MultiMesh::Element> elements = mm->elements;
- mm->elements.clear();
-
- mm->tw = 1;
- mm->th = 1;
- mm->tex_id = 0;
- mm->last_pass = 0;
- mm->visible = -1;
-
- multimesh_set_instance_count(E->get(), elements.size());
- mm->elements = elements;
- }
-
- if (framebuffer.fbo != 0) {
-
- framebuffer.fbo = 0;
- framebuffer.depth = 0;
- framebuffer.color = 0;
-
- for (int i = 0; i < 3; i++) {
- framebuffer.blur[i].fbo = 0;
- framebuffer.blur[i].color = 0;
- }
-
- framebuffer.luminance.clear();
- }
-
- for (int i = 0; i < near_shadow_buffers.size(); i++) {
- near_shadow_buffers[i].init(near_shadow_buffers[i].size, !use_rgba_shadowmaps);
- }
-
- blur_shadow_buffer.init(near_shadow_buffers[0].size, !use_rgba_shadowmaps);
-
- canvas_shader.clear_caches();
- material_shader.clear_caches();
- blur_shader.clear_caches();
- copy_shader.clear_caches();
-
- List<RID> shaders;
- shader_owner.get_owned_list(&shaders);
- for (List<RID>::Element *E = shaders.front(); E; E = E->next()) {
-
- Shader *s = shader_owner.get(E->get());
- s->custom_code_id = 0;
- s->version = 1;
- s->valid = false;
- shader_set_mode(E->get(), s->mode);
- }
-
- List<RID> materials;
- material_owner.get_owned_list(&materials);
- for (List<RID>::Element *E = materials.front(); E; E = E->next()) {
-
- Material *m = material_owner.get(E->get());
- RID shader = m->shader;
- m->shader_version = 0;
- material_set_shader(E->get(), shader);
- }
-}
-
-void RasterizerGLES2::set_use_framebuffers(bool p_use) {
-
- use_framebuffers = p_use;
-}
-
-RasterizerGLES2 *RasterizerGLES2::get_singleton() {
-
- return _singleton;
-};
-
-int RasterizerGLES2::RenderList::max_elements = RenderList::DEFAULT_MAX_ELEMENTS;
-
-void RasterizerGLES2::set_force_16_bits_fbo(bool p_force) {
-
- use_16bits_fbo = p_force;
-}
-
-RasterizerGLES2::RasterizerGLES2(bool p_compress_arrays, bool p_keep_ram_copy, bool p_default_fragment_lighting, bool p_use_reload_hooks) {
-
- _singleton = this;
- shrink_textures_x2 = false;
- RenderList::max_elements = GLOBAL_DEF("rasterizer/max_render_elements", (int)RenderList::DEFAULT_MAX_ELEMENTS);
- if (RenderList::max_elements > 64000)
- RenderList::max_elements = 64000;
- if (RenderList::max_elements < 1024)
- RenderList::max_elements = 1024;
-
- opaque_render_list.init();
- alpha_render_list.init();
-
- skinned_buffer_size = GLOBAL_DEF("rasterizer/skeleton_buffer_size_kb", DEFAULT_SKINNED_BUFFER_SIZE);
- if (skinned_buffer_size < 256)
- skinned_buffer_size = 256;
- if (skinned_buffer_size > 16384)
- skinned_buffer_size = 16384;
- skinned_buffer_size *= 1024;
- skinned_buffer = memnew_arr(uint8_t, skinned_buffer_size);
-
- keep_copies = p_keep_ram_copy;
- use_reload_hooks = p_use_reload_hooks;
- pack_arrays = p_compress_arrays;
- p_default_fragment_lighting = false;
- fragment_lighting = GLOBAL_DEF("rasterizer/use_fragment_lighting", true);
- read_depth_supported = true; //todo check for extension
- shadow_filter = ShadowFilterTechnique((int)(GLOBAL_DEF("rasterizer/shadow_filter", SHADOW_FILTER_PCF5)));
- ProjectSettings::get_singleton()->set_custom_property_info("rasterizer/shadow_filter", PropertyInfo(Variant::INT, "rasterizer/shadow_filter", PROPERTY_HINT_ENUM, "None,PCF5,PCF13,ESM"));
- use_fp16_fb = bool(GLOBAL_DEF("rasterizer/fp16_framebuffer", true));
- use_shadow_mapping = true;
- use_fast_texture_filter = !bool(GLOBAL_DEF("rasterizer/trilinear_mipmap_filter", true));
- low_memory_2d = bool(GLOBAL_DEF("rasterizer/low_memory_2d_mode", false));
- skel_default.resize(1024 * 4);
- for (int i = 0; i < 1024 / 3; i++) {
-
- float *ptr = skel_default.ptr();
- ptr += i * 4 * 4;
- ptr[0] = 1.0;
- ptr[1] = 0.0;
- ptr[2] = 0.0;
- ptr[3] = 0.0;
-
- ptr[4] = 0.0;
- ptr[5] = 1.0;
- ptr[6] = 0.0;
- ptr[7] = 0.0;
-
- ptr[8] = 0.0;
- ptr[9] = 0.0;
- ptr[10] = 1.0;
- ptr[12] = 0.0;
- }
-
- base_framebuffer = 0;
- frame = 0;
- draw_next_frame = false;
- use_framebuffers = true;
- framebuffer.active = false;
- tc0_id_cache = 0;
- tc0_idx = 0;
- use_16bits_fbo = false;
-};
-
-void RasterizerGLES2::restore_framebuffer() {
-
- glBindFramebuffer(GL_FRAMEBUFFER, base_framebuffer);
-}
-
-RasterizerGLES2::~RasterizerGLES2() {
-
- memdelete_arr(skinned_buffer);
-};
-
-#endif
diff --git a/drivers/gles2/rasterizer_gles2.h b/drivers/gles2/rasterizer_gles2.h
deleted file mode 100644
index ca6a0fce26..0000000000
--- a/drivers/gles2/rasterizer_gles2.h
+++ /dev/null
@@ -1,1686 +0,0 @@
-/*************************************************************************/
-/* rasterizer_gles2.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef RASTERIZER_GLES2_H
-#define RASTERIZER_GLES2_H
-
-#include "servers/visual/rasterizer.h"
-
-#define MAX_POLYGON_VERTICES 4096 //used for WebGL canvas_draw_polygon call.
-
-#ifdef GLES2_ENABLED
-
-#include "camera_matrix.h"
-#include "image.h"
-#include "list.h"
-#include "map.h"
-#include "rid.h"
-#include "self_list.h"
-#include "servers/visual_server.h"
-#include "sort.h"
-
-#include "platform_config.h"
-#ifndef GLES2_INCLUDE_H
-#include <GLES2/gl2.h>
-#else
-#include GLES2_INCLUDE_H
-#endif
-
-#include "drivers/gles2/shader_compiler_gles2.h"
-#include "drivers/gles2/shaders/blur.glsl.h"
-#include "drivers/gles2/shaders/canvas.glsl.h"
-#include "drivers/gles2/shaders/canvas_shadow.glsl.h"
-#include "drivers/gles2/shaders/copy.glsl.h"
-#include "drivers/gles2/shaders/material.glsl.h"
-#include "servers/visual/particle_system_sw.h"
-
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-class RasterizerGLES2 : public Rasterizer {
-
- enum {
-
- MAX_SCENE_LIGHTS = 2048,
- LIGHT_SPOT_BIT = 0x80,
- DEFAULT_SKINNED_BUFFER_SIZE = 2048, // 10k vertices
- MAX_HW_LIGHTS = 1,
- };
-
- uint8_t *skinned_buffer;
- int skinned_buffer_size;
- bool pvr_supported;
- bool pvr_srgb_supported;
- bool s3tc_supported;
- bool s3tc_srgb_supported;
- bool latc_supported;
- bool etc_supported;
- bool atitc_supported;
- bool npo2_textures_available;
- bool read_depth_supported;
- bool use_framebuffers;
- bool full_float_fb_supported;
- bool use_shadow_mapping;
- bool use_fp16_fb;
- bool srgb_supported;
- bool float_supported;
- bool float_linear_supported;
- bool use_16bits_fbo;
-
- ShadowFilterTechnique shadow_filter;
-
- bool use_shadow_esm;
- bool use_shadow_pcf;
- bool use_hw_skeleton_xform;
- bool use_depth24;
- bool use_texture_instancing;
- bool use_attribute_instancing;
- bool use_rgba_shadowmaps;
- bool use_anisotropic_filter;
- float anisotropic_level;
-
- bool use_half_float;
- bool low_memory_2d;
-
- bool shrink_textures_x2;
-
- Vector<float> skel_default;
-
- Image _get_gl_image_and_format(const Image &p_image, Image::Format p_format, uint32_t p_flags, GLenum &r_gl_format, GLenum &r_gl_internal_format, int &r_gl_components, bool &r_has_alpha_cache, bool &r_compressed);
-
- struct RenderTarget;
-
- struct Texture {
-
- String path;
- uint32_t flags;
- int width, height;
- int alloc_width, alloc_height;
- Image::Format format;
-
- GLenum target;
- GLenum gl_format_cache;
- GLenum gl_internal_format_cache;
- int gl_components_cache;
- int data_size; //original data size, useful for retrieving back
- bool has_alpha;
- bool format_has_alpha;
- bool compressed;
- bool disallow_mipmaps;
- int total_data_size;
- bool ignore_mipmaps;
-
- ObjectID reloader;
- StringName reloader_func;
- Image image[6];
-
- int mipmaps;
-
- bool active;
- GLuint tex_id;
-
- RenderTarget *render_target;
-
- Texture() {
-
- ignore_mipmaps = false;
- render_target = NULL;
- flags = width = height = 0;
- tex_id = 0;
- data_size = 0;
- format = Image::FORMAT_L8;
- gl_components_cache = 0;
- format_has_alpha = false;
- has_alpha = false;
- active = false;
- disallow_mipmaps = false;
- compressed = false;
- total_data_size = 0;
- target = GL_TEXTURE_2D;
- mipmaps = 0;
-
- reloader = 0;
- }
-
- ~Texture() {
-
- if (tex_id != 0) {
-
- glDeleteTextures(1, &tex_id);
- }
- }
- };
-
- mutable RID_Owner<Texture> texture_owner;
-
- struct Shader {
-
- String vertex_code;
- String fragment_code;
- String light_code;
- int vertex_line;
- int fragment_line;
- int light_line;
- VS::ShaderMode mode;
-
- uint32_t custom_code_id;
- uint32_t version;
-
- bool valid;
- bool has_alpha;
- bool can_zpass;
- bool has_texscreen;
- bool has_screen_uv;
- bool writes_vertex;
- bool uses_discard;
- bool uses_time;
- bool uses_normal;
- bool uses_texpixel_size;
-
- Map<StringName, ShaderLanguage::Uniform> uniforms;
- StringName first_texture;
-
- Map<StringName, RID> default_textures;
-
- SelfList<Shader> dirty_list;
-
- Shader()
- : dirty_list(this) {
-
- valid = false;
- custom_code_id = 0;
- has_alpha = false;
- version = 1;
- vertex_line = 0;
- fragment_line = 0;
- light_line = 0;
- can_zpass = true;
- has_texscreen = false;
- has_screen_uv = false;
- writes_vertex = false;
- uses_discard = false;
- uses_time = false;
- uses_normal = false;
- }
- };
-
- mutable RID_Owner<Shader> shader_owner;
- mutable SelfList<Shader>::List _shader_dirty_list;
- _FORCE_INLINE_ void _shader_make_dirty(Shader *p_shader);
- void _update_shader(Shader *p_shader) const;
-
- struct Material {
-
- bool flags[VS::MATERIAL_FLAG_MAX];
-
- VS::MaterialBlendMode blend_mode;
- VS::MaterialDepthDrawMode depth_draw_mode;
-
- float line_width;
- bool has_alpha;
-
- mutable uint32_t shader_version;
-
- RID shader; // shader material
- Shader *shader_cache;
-
- struct UniformData {
-
- bool inuse;
- bool istexture;
- Variant value;
- int index;
- };
-
- mutable Map<StringName, UniformData> shader_params;
-
- uint64_t last_pass;
-
- Material() {
-
- for (int i = 0; i < VS::MATERIAL_FLAG_MAX; i++)
- flags[i] = false;
- flags[VS::MATERIAL_FLAG_VISIBLE] = true;
-
- line_width = 1;
- has_alpha = false;
- depth_draw_mode = VS::MATERIAL_DEPTH_DRAW_OPAQUE_ONLY;
- blend_mode = VS::MATERIAL_BLEND_MODE_MIX;
- last_pass = 0;
- shader_version = 0;
- shader_cache = NULL;
- }
- };
-
- _FORCE_INLINE_ void _update_material_shader_params(Material *p_material) const;
- mutable RID_Owner<Material> material_owner;
-
- struct Geometry {
-
- enum Type {
- GEOMETRY_INVALID,
- GEOMETRY_SURFACE,
- GEOMETRY_IMMEDIATE,
- GEOMETRY_PARTICLES,
- GEOMETRY_MULTISURFACE,
- };
-
- Type type;
- RID material;
- bool has_alpha;
- bool material_owned;
-
- Geometry() {
- has_alpha = false;
- material_owned = false;
- }
- virtual ~Geometry(){};
- };
-
- struct GeometryOwner {
-
- virtual ~GeometryOwner() {}
- };
-
- struct Mesh;
-
- struct Surface : public Geometry {
-
- struct ArrayData {
-
- uint32_t ofs, size, datatype, count;
- bool normalize;
- bool bind;
-
- ArrayData() {
- ofs = 0;
- size = 0;
- count = 0;
- datatype = 0;
- normalize = 0;
- bind = false;
- }
- };
-
- Mesh *mesh;
-
- Array data;
- Array morph_data;
- ArrayData array[VS::ARRAY_MAX];
- // support for vertex array objects
- GLuint array_object_id;
- // support for vertex buffer object
- GLuint vertex_id; // 0 means, unconfigured
- GLuint index_id; // 0 means, unconfigured
- // no support for the above, array in localmem.
- uint8_t *array_local;
- uint8_t *index_array_local;
- Vector<AABB> skeleton_bone_aabb;
- Vector<bool> skeleton_bone_used;
-
- //bool packed;
-
- struct MorphTarget {
- uint32_t configured_format;
- uint8_t *array;
- };
-
- MorphTarget *morph_targets_local;
- int morph_target_count;
- AABB aabb;
-
- int array_len;
- int index_array_len;
- int max_bone;
-
- float vertex_scale;
- float uv_scale;
- float uv2_scale;
-
- bool alpha_sort;
-
- VS::PrimitiveType primitive;
-
- uint32_t format;
- uint32_t configured_format;
-
- int stride;
- int local_stride;
- uint32_t morph_format;
-
- bool active;
-
- Point2 uv_min;
- Point2 uv_max;
-
- Surface() {
-
- array_len = 0;
- local_stride = 0;
- morph_format = 0;
- type = GEOMETRY_SURFACE;
- primitive = VS::PRIMITIVE_POINTS;
- index_array_len = 0;
- vertex_scale = 1.0;
- uv_scale = 1.0;
- uv2_scale = 1.0;
-
- alpha_sort = false;
-
- format = 0;
- stride = 0;
- morph_targets_local = 0;
- morph_target_count = 0;
-
- array_local = index_array_local = 0;
- vertex_id = index_id = 0;
-
- active = false;
- //packed=false;
- }
-
- ~Surface() {
- }
- };
-
- struct Mesh {
-
- bool active;
- Vector<Surface *> surfaces;
- int morph_target_count;
- VS::MorphTargetMode morph_target_mode;
- AABB custom_aabb;
-
- mutable uint64_t last_pass;
- Mesh() {
- morph_target_mode = VS::MORPH_MODE_NORMALIZED;
- morph_target_count = 0;
- last_pass = 0;
- active = false;
- }
- };
- mutable RID_Owner<Mesh> mesh_owner;
-
- Error _surface_set_arrays(Surface *p_surface, uint8_t *p_mem, uint8_t *p_index_mem, const Array &p_arrays, bool p_main);
-
- struct MultiMesh;
-
- struct MultiMeshSurface : public Geometry {
-
- Surface *surface;
- MultiMeshSurface() { type = GEOMETRY_MULTISURFACE; }
- };
-
- struct MultiMesh : public GeometryOwner {
-
- struct Element {
-
- float matrix[16];
- uint8_t color[4];
- Element() {
- matrix[0] = 1;
- matrix[1] = 0;
- matrix[2] = 0;
- matrix[3] = 0;
-
- matrix[4] = 0;
- matrix[5] = 1;
- matrix[6] = 0;
- matrix[7] = 0;
-
- matrix[8] = 0;
- matrix[9] = 0;
- matrix[10] = 1;
- matrix[11] = 0;
-
- matrix[12] = 0;
- matrix[13] = 0;
- matrix[14] = 0;
- matrix[15] = 1;
- };
- };
-
- AABB aabb;
- RID mesh;
- int visible;
-
- //IDirect3DVertexBuffer9* instance_buffer;
- Vector<Element> elements;
- Vector<MultiMeshSurface> cache_surfaces;
- mutable uint64_t last_pass;
- GLuint tex_id;
- int tw;
- int th;
-
- SelfList<MultiMesh> dirty_list;
-
- MultiMesh()
- : dirty_list(this) {
-
- tw = 1;
- th = 1;
- tex_id = 0;
- last_pass = 0;
- visible = -1;
- }
- };
-
- mutable RID_Owner<MultiMesh> multimesh_owner;
- mutable SelfList<MultiMesh>::List _multimesh_dirty_list;
-
- struct Immediate : public Geometry {
-
- struct Chunk {
-
- RID texture;
- VS::PrimitiveType primitive;
- Vector<Vector3> vertices;
- Vector<Vector3> normals;
- Vector<Plane> tangents;
- Vector<Color> colors;
- Vector<Vector2> uvs;
- Vector<Vector2> uvs2;
- };
-
- List<Chunk> chunks;
- bool building;
- int mask;
- AABB aabb;
-
- Immediate() {
- type = GEOMETRY_IMMEDIATE;
- building = false;
- }
- };
-
- mutable RID_Owner<Immediate> immediate_owner;
-
- struct Particles : public Geometry {
-
- ParticleSystemSW data; // software particle system
-
- Particles() {
- type = GEOMETRY_PARTICLES;
- }
- };
-
- mutable RID_Owner<Particles> particles_owner;
-
- struct ParticlesInstance : public GeometryOwner {
-
- RID particles;
-
- ParticleSystemProcessSW particles_process;
- Transform transform;
-
- ParticlesInstance() {}
- };
-
- mutable RID_Owner<ParticlesInstance> particles_instance_owner;
- ParticleSystemDrawInfoSW particle_draw_info;
-
- struct Skeleton {
-
- struct Bone {
-
- float mtx[4][4]; //used
-
- Bone() {
- for (int i = 0; i < 4; i++) {
- for (int j = 0; j < 4; j++) {
-
- mtx[i][j] = (i == j) ? 1 : 0;
- }
- }
- }
-
- _ALWAYS_INLINE_ void transform_add_mul3(const float *p_src, float *r_dst, float p_weight) const {
-
- r_dst[0] += ((mtx[0][0] * p_src[0]) + (mtx[1][0] * p_src[1]) + (mtx[2][0] * p_src[2]) + mtx[3][0]) * p_weight;
- r_dst[1] += ((mtx[0][1] * p_src[0]) + (mtx[1][1] * p_src[1]) + (mtx[2][1] * p_src[2]) + mtx[3][1]) * p_weight;
- r_dst[2] += ((mtx[0][2] * p_src[0]) + (mtx[1][2] * p_src[1]) + (mtx[2][2] * p_src[2]) + mtx[3][2]) * p_weight;
- }
- _ALWAYS_INLINE_ void transform3_add_mul3(const float *p_src, float *r_dst, float p_weight) const {
-
- r_dst[0] += ((mtx[0][0] * p_src[0]) + (mtx[1][0] * p_src[1]) + (mtx[2][0] * p_src[2])) * p_weight;
- r_dst[1] += ((mtx[0][1] * p_src[0]) + (mtx[1][1] * p_src[1]) + (mtx[2][1] * p_src[2])) * p_weight;
- r_dst[2] += ((mtx[0][2] * p_src[0]) + (mtx[1][2] * p_src[1]) + (mtx[2][2] * p_src[2])) * p_weight;
- }
-
- _ALWAYS_INLINE_ AABB transform_aabb(const AABB &p_aabb) const {
-
- float vertices[8][3] = {
- { p_aabb.pos.x + p_aabb.size.x, p_aabb.pos.y + p_aabb.size.y, p_aabb.pos.z + p_aabb.size.z },
- { p_aabb.pos.x + p_aabb.size.x, p_aabb.pos.y + p_aabb.size.y, p_aabb.pos.z },
- { p_aabb.pos.x + p_aabb.size.x, p_aabb.pos.y, p_aabb.pos.z + p_aabb.size.z },
- { p_aabb.pos.x + p_aabb.size.x, p_aabb.pos.y, p_aabb.pos.z },
- { p_aabb.pos.x, p_aabb.pos.y + p_aabb.size.y, p_aabb.pos.z + p_aabb.size.z },
- { p_aabb.pos.x, p_aabb.pos.y + p_aabb.size.y, p_aabb.pos.z },
- { p_aabb.pos.x, p_aabb.pos.y, p_aabb.pos.z + p_aabb.size.z },
- { p_aabb.pos.x, p_aabb.pos.y, p_aabb.pos.z }
- };
-
- AABB ret;
-
- for (int i = 0; i < 8; i++) {
-
- Vector3 xv(
-
- ((mtx[0][0] * vertices[i][0]) + (mtx[1][0] * vertices[i][1]) + (mtx[2][0] * vertices[i][2]) + mtx[3][0]),
- ((mtx[0][1] * vertices[i][0]) + (mtx[1][1] * vertices[i][1]) + (mtx[2][1] * vertices[i][2]) + mtx[3][1]),
- ((mtx[0][2] * vertices[i][0]) + (mtx[1][2] * vertices[i][1]) + (mtx[2][2] * vertices[i][2]) + mtx[3][2]));
-
- if (i == 0)
- ret.pos = xv;
- else
- ret.expand_to(xv);
- }
-
- return ret;
- }
- };
-
- GLuint tex_id;
- float pixel_size; //for texture
- Vector<Bone> bones;
-
- SelfList<Skeleton> dirty_list;
-
- Skeleton()
- : dirty_list(this) {
- tex_id = 0;
- pixel_size = 1.0;
- }
- };
-
- mutable RID_Owner<Skeleton> skeleton_owner;
- mutable SelfList<Skeleton>::List _skeleton_dirty_list;
-
- template <bool USE_NORMAL, bool USE_TANGENT, bool INPLACE>
- void _skeleton_xform(const uint8_t *p_src_array, int p_src_stride, uint8_t *p_dst_array, int p_dst_stride, int p_elements, const uint8_t *p_src_bones, const uint8_t *p_src_weights, const Skeleton::Bone *p_bone_xforms);
-
- struct Light {
-
- VS::LightType type;
- float vars[VS::LIGHT_PARAM_MAX];
- Color colors[3];
- bool shadow_enabled;
- RID projector;
- bool volumetric_enabled;
- Color volumetric_color;
- VS::LightOmniShadowMode omni_shadow_mode;
- VS::LightDirectionalShadowMode directional_shadow_mode;
- float directional_shadow_param[3];
-
- Light() {
-
- vars[VS::LIGHT_PARAM_SPOT_ATTENUATION] = 1;
- vars[VS::LIGHT_PARAM_SPOT_ANGLE] = 45;
- vars[VS::LIGHT_PARAM_ATTENUATION] = 1.0;
- vars[VS::LIGHT_PARAM_ENERGY] = 1.0;
- vars[VS::LIGHT_PARAM_RADIUS] = 1.0;
- vars[VS::LIGHT_PARAM_SHADOW_DARKENING] = 0.0;
- vars[VS::LIGHT_PARAM_SHADOW_Z_OFFSET] = 0.2;
- vars[VS::LIGHT_PARAM_SHADOW_Z_SLOPE_SCALE] = 1.4;
- vars[VS::LIGHT_PARAM_SHADOW_ESM_MULTIPLIER] = 60.0;
- vars[VS::LIGHT_PARAM_SHADOW_BLUR_PASSES] = 1;
- colors[VS::LIGHT_COLOR_DIFFUSE] = Color(1, 1, 1);
- colors[VS::LIGHT_COLOR_SPECULAR] = Color(1, 1, 1);
- shadow_enabled = false;
- volumetric_enabled = false;
-
- directional_shadow_param[VS::LIGHT_DIRECTIONAL_SHADOW_PARAM_PSSM_SPLIT_WEIGHT] = 0.5;
- directional_shadow_param[VS::LIGHT_DIRECTIONAL_SHADOW_PARAM_MAX_DISTANCE] = 0;
- directional_shadow_param[VS::LIGHT_DIRECTIONAL_SHADOW_PARAM_PSSM_ZOFFSET_SCALE] = 2.0;
- omni_shadow_mode = VS::LIGHT_OMNI_SHADOW_DEFAULT;
- directional_shadow_mode = VS::LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL;
- }
- };
-
- struct Environment {
-
- VS::EnvironmentBG bg_mode;
- Variant bg_param[VS::ENV_BG_PARAM_MAX];
- bool fx_enabled[VS::ENV_FX_MAX];
- Variant fx_param[VS::ENV_FX_PARAM_MAX];
-
- Environment() {
-
- bg_mode = VS::ENV_BG_DEFAULT_COLOR;
- bg_param[VS::ENV_BG_PARAM_COLOR] = Color(0, 0, 0);
- bg_param[VS::ENV_BG_PARAM_TEXTURE] = RID();
- bg_param[VS::ENV_BG_PARAM_CUBEMAP] = RID();
- bg_param[VS::ENV_BG_PARAM_ENERGY] = 1.0;
- bg_param[VS::ENV_BG_PARAM_SCALE] = 1.0;
- bg_param[VS::ENV_BG_PARAM_GLOW] = 0.0;
- bg_param[VS::ENV_BG_PARAM_CANVAS_MAX_LAYER] = 0;
-
- for (int i = 0; i < VS::ENV_FX_MAX; i++)
- fx_enabled[i] = false;
-
- fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_PASSES] = 1;
- fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_SCALE] = 1.0;
- fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_STRENGTH] = 1.0;
- fx_param[VS::ENV_FX_PARAM_GLOW_BLUR_BLEND_MODE] = 0;
- fx_param[VS::ENV_FX_PARAM_GLOW_BLOOM] = 0.0;
- fx_param[VS::ENV_FX_PARAM_GLOW_BLOOM_THRESHOLD] = 0.5;
- fx_param[VS::ENV_FX_PARAM_DOF_BLUR_PASSES] = 1;
- fx_param[VS::ENV_FX_PARAM_DOF_BLUR_BEGIN] = 100.0;
- fx_param[VS::ENV_FX_PARAM_DOF_BLUR_RANGE] = 10.0;
- fx_param[VS::ENV_FX_PARAM_HDR_TONEMAPPER] = VS::ENV_FX_HDR_TONE_MAPPER_LINEAR;
- fx_param[VS::ENV_FX_PARAM_HDR_EXPOSURE] = 0.4;
- fx_param[VS::ENV_FX_PARAM_HDR_WHITE] = 1.0;
- fx_param[VS::ENV_FX_PARAM_HDR_GLOW_THRESHOLD] = 0.95;
- fx_param[VS::ENV_FX_PARAM_HDR_GLOW_SCALE] = 0.2;
- fx_param[VS::ENV_FX_PARAM_HDR_MIN_LUMINANCE] = 0.4;
- fx_param[VS::ENV_FX_PARAM_HDR_MAX_LUMINANCE] = 8.0;
- fx_param[VS::ENV_FX_PARAM_HDR_EXPOSURE_ADJUST_SPEED] = 0.5;
- fx_param[VS::ENV_FX_PARAM_FOG_BEGIN] = 100.0;
- fx_param[VS::ENV_FX_PARAM_FOG_ATTENUATION] = 1.0;
- fx_param[VS::ENV_FX_PARAM_FOG_BEGIN_COLOR] = Color(0, 0, 0);
- fx_param[VS::ENV_FX_PARAM_FOG_END_COLOR] = Color(0, 0, 0);
- fx_param[VS::ENV_FX_PARAM_FOG_BG] = true;
- fx_param[VS::ENV_FX_PARAM_BCS_BRIGHTNESS] = 1.0;
- fx_param[VS::ENV_FX_PARAM_BCS_CONTRAST] = 1.0;
- fx_param[VS::ENV_FX_PARAM_BCS_SATURATION] = 1.0;
- }
- };
-
- mutable RID_Owner<Environment> environment_owner;
-
- struct SampledLight {
-
- int w, h;
- GLuint texture;
- float multiplier;
- bool is_float;
- };
-
- mutable RID_Owner<SampledLight> sampled_light_owner;
-
- struct ViewportData {
-
- //1x1 fbo+texture for storing previous HDR value
- GLuint lum_fbo;
- GLuint lum_color;
-
- ViewportData() {
- lum_fbo = 0;
- lum_color = 0;
- }
- };
-
- mutable RID_Owner<ViewportData> viewport_data_owner;
-
- struct RenderTarget {
-
- Texture *texture_ptr;
- RID texture;
- GLuint fbo;
- GLuint color;
- GLuint depth;
- int width, height;
- uint64_t last_pass;
- };
-
- mutable RID_Owner<RenderTarget> render_target_owner;
-
- struct ShadowBuffer;
-
- struct LightInstance {
-
- struct SplitInfo {
-
- CameraMatrix camera;
- Transform transform;
- float near;
- float far;
- };
-
- RID light;
- Light *base;
- Transform transform;
- CameraMatrix projection;
-
- Transform custom_transform[4];
- CameraMatrix custom_projection[4];
-
- Vector3 light_vector;
- Vector3 spot_vector;
- float linear_att;
-
- uint64_t shadow_pass;
- uint64_t last_pass;
- uint16_t sort_key;
-
- Vector2 dp;
-
- CameraMatrix shadow_projection[4];
- float shadow_split[4];
-
- ShadowBuffer *near_shadow_buffer;
-
- void clear_shadow_buffers() {
-
- clear_near_shadow_buffers();
- }
-
- void clear_near_shadow_buffers() {
-
- if (near_shadow_buffer) {
- near_shadow_buffer->owner = NULL;
- near_shadow_buffer = NULL;
- }
- }
-
- LightInstance() {
- shadow_pass = 0;
- last_pass = 0;
- sort_key = 0;
- near_shadow_buffer = NULL;
- }
- };
- mutable RID_Owner<Light> light_owner;
- mutable RID_Owner<LightInstance> light_instance_owner;
-
- LightInstance *light_instances[MAX_SCENE_LIGHTS];
- LightInstance *directional_lights[4];
- int light_instance_count;
- int directional_light_count;
- int last_light_id;
- bool current_depth_test;
- bool current_depth_mask;
- VS::MaterialBlendMode current_blend_mode;
- bool use_fast_texture_filter;
- int max_texture_size;
-
- bool fragment_lighting;
- RID shadow_material;
- RID shadow_material_double_sided;
- Material *shadow_mat_ptr;
- Material *shadow_mat_double_sided_ptr;
-
- int max_texture_units;
- GLuint base_framebuffer;
-
- GLuint gui_quad_buffer;
- GLuint indices_buffer;
-
- struct RenderList {
-
- enum {
- DEFAULT_MAX_ELEMENTS = 4096,
- MAX_LIGHTS = 4,
- SORT_FLAG_SKELETON = 1,
- SORT_FLAG_INSTANCING = 2,
- };
-
- static int max_elements;
-
- struct Element {
-
- float depth;
- const InstanceData *instance;
- const Skeleton *skeleton;
- const Geometry *geometry;
- const Geometry *geometry_cmp;
- const Material *material;
- const GeometryOwner *owner;
- bool *additive_ptr;
- bool additive;
- bool mirror;
- union {
-#ifdef BIG_ENDIAN_ENABLED
- struct {
- uint8_t sort_flags;
- uint8_t light_type;
- uint16_t light;
- };
-#else
- struct {
- uint16_t light;
- uint8_t light_type;
- uint8_t sort_flags;
- };
-#endif
- uint32_t sort_key;
- };
- };
-
- Element *_elements;
- Element **elements;
- int element_count;
-
- void clear() {
-
- element_count = 0;
- }
-
- struct SortZ {
-
- _FORCE_INLINE_ bool operator()(const Element *A, const Element *B) const {
-
- return A->depth > B->depth;
- }
- };
-
- void sort_z() {
-
- SortArray<Element *, SortZ> sorter;
- sorter.sort(elements, element_count);
- }
-
- struct SortMatGeom {
-
- _FORCE_INLINE_ bool operator()(const Element *A, const Element *B) const {
- // TODO move to a single uint64 (one comparison)
- if (A->material->shader_cache == B->material->shader_cache) {
- if (A->material == B->material) {
-
- return A->geometry_cmp < B->geometry_cmp;
- } else {
-
- return (A->material < B->material);
- }
- } else {
-
- return A->material->shader_cache < B->material->shader_cache;
- }
- }
- };
-
- void sort_mat_geom() {
-
- SortArray<Element *, SortMatGeom> sorter;
- sorter.sort(elements, element_count);
- }
-
- struct SortMatLight {
-
- _FORCE_INLINE_ bool operator()(const Element *A, const Element *B) const {
-
- if (A->geometry_cmp == B->geometry_cmp) {
-
- if (A->material == B->material) {
-
- return A->light < B->light;
- } else {
-
- return (A->material < B->material);
- }
- } else {
-
- return (A->geometry_cmp < B->geometry_cmp);
- }
- }
- };
-
- void sort_mat_light() {
-
- SortArray<Element *, SortMatLight> sorter;
- sorter.sort(elements, element_count);
- }
-
- struct SortMatLightType {
-
- _FORCE_INLINE_ bool operator()(const Element *A, const Element *B) const {
-
- if (A->light_type == B->light_type) {
- if (A->material->shader_cache == B->material->shader_cache) {
- if (A->material == B->material) {
-
- return (A->geometry_cmp < B->geometry_cmp);
- } else {
-
- return (A->material < B->material);
- }
- } else {
-
- return (A->material->shader_cache < B->material->shader_cache);
- }
- } else {
-
- return A->light_type < B->light_type;
- }
- }
- };
-
- void sort_mat_light_type() {
-
- SortArray<Element *, SortMatLightType> sorter;
- sorter.sort(elements, element_count);
- }
-
- struct SortMatLightTypeFlags {
-
- _FORCE_INLINE_ bool operator()(const Element *A, const Element *B) const {
-
- if (A->sort_key == B->sort_key) {
- if (A->material->shader_cache == B->material->shader_cache) {
- if (A->material == B->material) {
-
- return (A->geometry_cmp < B->geometry_cmp);
- } else {
-
- return (A->material < B->material);
- }
- } else {
-
- return (A->material->shader_cache < B->material->shader_cache);
- }
- } else {
-
- return A->sort_key < B->sort_key; //one is null and one is not
- }
- }
- };
-
- void sort_mat_light_type_flags() {
-
- SortArray<Element *, SortMatLightTypeFlags> sorter;
- sorter.sort(elements, element_count);
- }
- _FORCE_INLINE_ Element *add_element() {
-
- if (element_count >= max_elements)
- return NULL;
- elements[element_count] = &_elements[element_count];
- return elements[element_count++];
- }
-
- void init() {
-
- element_count = 0;
- elements = memnew_arr(Element *, max_elements);
- _elements = memnew_arr(Element, max_elements);
- for (int i = 0; i < max_elements; i++)
- elements[i] = &_elements[i]; // assign elements
- }
-
- RenderList() {
- }
- ~RenderList() {
- memdelete_arr(elements);
- memdelete_arr(_elements);
- }
- };
-
- RenderList opaque_render_list;
- RenderList alpha_render_list;
-
- RID default_material;
-
- CameraMatrix camera_projection;
- Transform camera_transform;
- Transform camera_transform_inverse;
- float camera_z_near;
- float camera_z_far;
- Size2 camera_vp_size;
- bool camera_ortho;
- Set<String> extensions;
- bool texscreen_copied;
- bool texscreen_used;
-
- Plane camera_plane;
-
- void _add_geometry(const Geometry *p_geometry, const InstanceData *p_instance, const Geometry *p_geometry_cmp, const GeometryOwner *p_owner, int p_material = -1);
- void _render_list_forward(RenderList *p_render_list, const Transform &p_view_transform, const Transform &p_view_transform_inverse, const CameraMatrix &p_projection, bool p_reverse_cull = false, bool p_fragment_light = false, bool p_alpha_pass = false);
-
- //void _setup_light(LightInstance* p_instance, int p_idx);
- void _setup_light(uint16_t p_light);
-
- _FORCE_INLINE_ void _setup_shader_params(const Material *p_material);
- bool _setup_material(const Geometry *p_geometry, const Material *p_material, bool p_no_const_light, bool p_opaque_pass);
- void _setup_skeleton(const Skeleton *p_skeleton);
-
- Error _setup_geometry(const Geometry *p_geometry, const Material *p_material, const Skeleton *p_skeleton, const float *p_morphs);
- void _render(const Geometry *p_geometry, const Material *p_material, const Skeleton *p_skeleton, const GeometryOwner *p_owner, const Transform &p_xform);
-
- /***********/
- /* SHADOWS */
- /***********/
-
- struct ShadowBuffer {
-
- int size;
- GLuint fbo;
- GLuint rbo;
- GLuint depth;
- GLuint rgba; //for older devices
-#if 0
- GLuint fbo_blur;
- GLuint rbo_blur;
- GLuint blur;
-#endif
-
- LightInstance *owner;
- bool init(int p_size, bool p_use_depth);
- ShadowBuffer() {
- size = 0;
- depth = 0;
- owner = NULL;
- }
- };
-
- Vector<ShadowBuffer> near_shadow_buffers;
- ShadowBuffer blur_shadow_buffer;
-
- Vector<ShadowBuffer> far_shadow_buffers;
-
- LightInstance *shadow;
- int shadow_pass;
-
- float shadow_near_far_split_size_ratio;
- bool _allocate_shadow_buffers(LightInstance *p_instance, Vector<ShadowBuffer> &p_buffers);
- void _debug_draw_shadow(GLuint tex, const Rect2 &p_rect);
- void _debug_draw_shadows_type(Vector<ShadowBuffer> &p_shadows, Point2 &ofs);
- void _debug_shadows();
- void _debug_luminances();
- void _debug_samplers();
-
- /***********/
- /* FBOs */
- /***********/
-
- struct FrameBuffer {
-
- GLuint fbo;
- GLuint color;
- GLuint depth;
-
- int width, height;
- int scale;
- bool active;
-
- int blur_size;
-
- struct Blur {
-
- GLuint fbo;
- GLuint color;
-
- Blur() {
- fbo = 0;
- color = 0;
- }
- } blur[3];
-
- struct Luminance {
-
- int size;
- GLuint fbo;
- GLuint color;
-
- Luminance() {
- fbo = 0;
- color = 0;
- size = 0;
- }
- };
-
- Vector<Luminance> luminance;
-
- GLuint sample_fbo;
- GLuint sample_color;
-
- FrameBuffer() {
- blur_size = 0;
- }
-
- } framebuffer;
-
- void _update_framebuffer();
- void _process_glow_and_bloom();
- //void _update_blur_buffer();
-
- /*********/
- /* FRAME */
- /*********/
-
- struct _Rinfo {
-
- int texture_mem;
- int vertex_count;
- int object_count;
- int mat_change_count;
- int surface_count;
- int shader_change_count;
- int ci_draw_commands;
- int draw_calls;
-
- } _rinfo;
-
- /*******************/
- /* CANVAS OCCLUDER */
- /*******************/
-
- struct CanvasOccluder {
-
- GLuint vertex_id; // 0 means, unconfigured
- GLuint index_id; // 0 means, unconfigured
- DVector<Vector2> lines;
- int len;
- };
-
- RID_Owner<CanvasOccluder> canvas_occluder_owner;
-
- /***********************/
- /* CANVAS LIGHT SHADOW */
- /***********************/
-
- struct CanvasLightShadow {
-
- int size;
- int height;
- GLuint fbo;
- GLuint rbo;
- GLuint depth;
- GLuint rgba; //for older devices
-
- GLuint blur;
- };
-
- RID_Owner<CanvasLightShadow> canvas_light_shadow_owner;
-
- RID canvas_shadow_blur;
-
- /* ETC */
-
- RenderTarget *current_rt;
- bool current_rt_transparent;
- bool current_rt_vflip;
- ViewportData *current_vd;
-
- GLuint white_tex;
- RID canvas_tex;
- float canvas_opacity;
- Color canvas_modulate;
- bool canvas_use_modulate;
- bool uses_texpixel_size;
- bool rebind_texpixel_size;
- Transform canvas_transform;
- ShaderMaterial *canvas_last_material;
- bool canvas_texscreen_used;
- Vector2 normal_flip;
- _FORCE_INLINE_ void _canvas_normal_set_flip(const Vector2 &p_flip);
-
- _FORCE_INLINE_ Texture *_bind_canvas_texture(const RID &p_texture);
- VS::MaterialBlendMode canvas_blend_mode;
-
- int _setup_geometry_vinfo;
-
- bool pack_arrays;
- bool keep_copies;
- bool use_reload_hooks;
- bool cull_front;
- bool lights_use_shadow;
- _FORCE_INLINE_ void _set_cull(bool p_front, bool p_reverse_cull = false);
- _FORCE_INLINE_ Color _convert_color(const Color &p_color);
-
- void _process_glow_bloom();
- void _process_hdr();
- void _draw_tex_bg();
-
- bool using_canvas_bg;
- Size2 window_size;
- VS::ViewportRect viewport;
- double last_time;
- double time_delta;
- uint64_t frame;
- uint64_t scene_pass;
- bool draw_next_frame;
- Environment *current_env;
- VS::ScenarioDebugMode current_debug;
- RID overdraw_material;
- float shader_time_rollback;
-
- mutable MaterialShaderGLES2 material_shader;
- mutable CanvasShaderGLES2 canvas_shader;
- BlurShaderGLES2 blur_shader;
- CopyShaderGLES2 copy_shader;
- mutable CanvasShadowShaderGLES2 canvas_shadow_shader;
-
- mutable ShaderCompilerGLES2 shader_precompiler;
-
- void _draw_primitive(int p_points, const Vector3 *p_vertices, const Vector3 *p_normals, const Color *p_colors, const Vector3 *p_uvs, const Plane *p_tangents = NULL, int p_instanced = 1);
- _FORCE_INLINE_ void _draw_gui_primitive(int p_points, const Vector2 *p_vertices, const Color *p_colors, const Vector2 *p_uvs);
- _FORCE_INLINE_ void _draw_gui_primitive2(int p_points, const Vector2 *p_vertices, const Color *p_colors, const Vector2 *p_uvs, const Vector2 *p_uvs2);
- void _draw_textured_quad(const Rect2 &p_rect, const Rect2 &p_src_region, const Size2 &p_tex_size, bool p_h_flip = false, bool p_v_flip = false, bool p_transpose = false);
- void _draw_quad(const Rect2 &p_rect);
- void _copy_screen_quad();
- void _copy_to_texscreen();
-
- bool _test_depth_shadow_buffer();
-
- Vector3 chunk_vertex;
- Vector3 chunk_normal;
- Plane chunk_tangent;
- Color chunk_color;
- Vector2 chunk_uv;
- Vector2 chunk_uv2;
- GLuint tc0_id_cache;
- GLuint tc0_idx;
-
- template <bool use_normalmap>
- _FORCE_INLINE_ void _canvas_item_render_commands(CanvasItem *p_item, CanvasItem *current_clip, bool &reclip);
- _FORCE_INLINE_ void _canvas_item_setup_shader_params(ShaderMaterial *material, Shader *p_shader);
- _FORCE_INLINE_ void _canvas_item_setup_shader_uniforms(ShaderMaterial *material, Shader *p_shader);
-
-public:
- /* TEXTURE API */
-
- virtual RID texture_create();
- virtual void texture_allocate(RID p_texture, int p_width, int p_height, Image::Format p_format, uint32_t p_flags = VS::TEXTURE_FLAGS_DEFAULT);
- virtual void texture_set_data(RID p_texture, const Image &p_image, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT);
- virtual Image texture_get_data(RID p_texture, VS::CubeMapSide p_cube_side = VS::CUBEMAP_LEFT) const;
- virtual void texture_set_flags(RID p_texture, uint32_t p_flags);
- virtual uint32_t texture_get_flags(RID p_texture) const;
- virtual Image::Format texture_get_format(RID p_texture) const;
- virtual uint32_t texture_get_width(RID p_texture) const;
- virtual uint32_t texture_get_height(RID p_texture) const;
- virtual bool texture_has_alpha(RID p_texture) const;
- virtual void texture_set_size_override(RID p_texture, int p_width, int p_height);
- virtual void texture_set_reload_hook(RID p_texture, ObjectID p_owner, const StringName &p_function) const;
-
- virtual void texture_set_path(RID p_texture, const String &p_path);
- virtual String texture_get_path(RID p_texture) const;
- virtual void texture_debug_usage(List<VS::TextureInfo> *r_info);
-
- virtual void texture_set_shrink_all_x2_on_set_data(bool p_enable);
-
- GLuint _texture_get_name(RID p_tex);
-
- /* SHADER API */
-
- virtual RID shader_create(VS::ShaderMode p_mode = VS::SHADER_MATERIAL);
-
- virtual void shader_set_mode(RID p_shader, VS::ShaderMode p_mode);
- virtual VS::ShaderMode shader_get_mode(RID p_shader) const;
-
- virtual void shader_set_code(RID p_shader, const String &p_vertex, const String &p_fragment, const String &p_light, int p_vertex_ofs = 0, int p_fragment_ofs = 0, int p_light_ofs = 0);
- virtual String shader_get_fragment_code(RID p_shader) const;
- virtual String shader_get_vertex_code(RID p_shader) const;
- virtual String shader_get_light_code(RID p_shader) const;
-
- virtual void shader_get_param_list(RID p_shader, List<PropertyInfo> *p_param_list) const;
-
- virtual void shader_set_default_texture_param(RID p_shader, const StringName &p_name, RID p_texture);
- virtual RID shader_get_default_texture_param(RID p_shader, const StringName &p_name) const;
-
- virtual Variant shader_get_default_param(RID p_shader, const StringName &p_name);
-
- /* COMMON MATERIAL API */
-
- virtual RID material_create();
-
- virtual void material_set_shader(RID p_shader_material, RID p_shader);
- virtual RID material_get_shader(RID p_shader_material) const;
-
- virtual void material_set_param(RID p_material, const StringName &p_param, const Variant &p_value);
- virtual Variant material_get_param(RID p_material, const StringName &p_param) const;
-
- virtual void material_set_flag(RID p_material, VS::MaterialFlag p_flag, bool p_enabled);
- virtual bool material_get_flag(RID p_material, VS::MaterialFlag p_flag) const;
-
- virtual void material_set_depth_draw_mode(RID p_material, VS::MaterialDepthDrawMode p_mode);
- virtual VS::MaterialDepthDrawMode material_get_depth_draw_mode(RID p_material) const;
-
- virtual void material_set_blend_mode(RID p_material, VS::MaterialBlendMode p_mode);
- virtual VS::MaterialBlendMode material_get_blend_mode(RID p_material) const;
-
- virtual void material_set_line_width(RID p_material, float p_line_width);
- virtual float material_get_line_width(RID p_material) const;
-
- /* MESH API */
-
- virtual RID mesh_create();
-
- virtual void mesh_add_surface(RID p_mesh, VS::PrimitiveType p_primitive, const Array &p_arrays, const Array &p_blend_shapes = Array(), bool p_alpha_sort = false);
- virtual Array mesh_get_surface_arrays(RID p_mesh, int p_surface) const;
- virtual Array mesh_get_surface_morph_arrays(RID p_mesh, int p_surface) const;
- virtual void mesh_add_custom_surface(RID p_mesh, const Variant &p_dat);
-
- virtual void mesh_set_morph_target_count(RID p_mesh, int p_amount);
- virtual int mesh_get_morph_target_count(RID p_mesh) const;
-
- virtual void mesh_set_morph_target_mode(RID p_mesh, VS::MorphTargetMode p_mode);
- virtual VS::MorphTargetMode mesh_get_morph_target_mode(RID p_mesh) const;
-
- virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material, bool p_owned = false);
- virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const;
-
- virtual int mesh_surface_get_array_len(RID p_mesh, int p_surface) const;
- virtual int mesh_surface_get_array_index_len(RID p_mesh, int p_surface) const;
- virtual uint32_t mesh_surface_get_format(RID p_mesh, int p_surface) const;
- virtual VS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const;
-
- virtual void mesh_remove_surface(RID p_mesh, int p_index);
- virtual int mesh_get_surface_count(RID p_mesh) const;
-
- virtual AABB mesh_get_aabb(RID p_mesh, RID p_skeleton = RID()) const;
-
- virtual void mesh_set_custom_aabb(RID p_mesh, const AABB &p_aabb);
- virtual AABB mesh_get_custom_aabb(RID p_mesh) const;
-
- /* MULTIMESH API */
-
- virtual RID multimesh_create();
-
- virtual void multimesh_set_instance_count(RID p_multimesh, int p_count);
- virtual int multimesh_get_instance_count(RID p_multimesh) const;
-
- virtual void multimesh_set_mesh(RID p_multimesh, RID p_mesh);
- virtual void multimesh_set_aabb(RID p_multimesh, const AABB &p_aabb);
- virtual void multimesh_instance_set_transform(RID p_multimesh, int p_index, const Transform &p_transform);
- virtual void multimesh_instance_set_color(RID p_multimesh, int p_index, const Color &p_color);
-
- virtual RID multimesh_get_mesh(RID p_multimesh) const;
- virtual AABB multimesh_get_aabb(RID p_multimesh) const;
-
- virtual Transform multimesh_instance_get_transform(RID p_multimesh, int p_index) const;
- virtual Color multimesh_instance_get_color(RID p_multimesh, int p_index) const;
-
- virtual void multimesh_set_visible_instances(RID p_multimesh, int p_visible);
- virtual int multimesh_get_visible_instances(RID p_multimesh) const;
-
- /* IMMEDIATE API */
-
- virtual RID immediate_create();
- virtual void immediate_begin(RID p_immediate, VS::PrimitiveType p_rimitive, RID p_texture = RID());
- virtual void immediate_vertex(RID p_immediate, const Vector3 &p_vertex);
- virtual void immediate_normal(RID p_immediate, const Vector3 &p_normal);
- virtual void immediate_tangent(RID p_immediate, const Plane &p_tangent);
- virtual void immediate_color(RID p_immediate, const Color &p_color);
- virtual void immediate_uv(RID p_immediate, const Vector2 &tex_uv);
- virtual void immediate_uv2(RID p_immediate, const Vector2 &tex_uv);
- virtual void immediate_end(RID p_immediate);
- virtual void immediate_clear(RID p_immediate);
- virtual AABB immediate_get_aabb(RID p_immediate) const;
- virtual void immediate_set_material(RID p_immediate, RID p_material);
- virtual RID immediate_get_material(RID p_immediate) const;
-
- /* PARTICLES API */
-
- virtual RID particles_create();
-
- virtual void particles_set_amount(RID p_particles, int p_amount);
- virtual int particles_get_amount(RID p_particles) const;
-
- virtual void particles_set_emitting(RID p_particles, bool p_emitting);
- virtual bool particles_is_emitting(RID p_particles) const;
-
- virtual void particles_set_visibility_aabb(RID p_particles, const AABB &p_visibility);
- virtual AABB particles_get_visibility_aabb(RID p_particles) const;
-
- virtual void particles_set_emission_half_extents(RID p_particles, const Vector3 &p_half_extents);
- virtual Vector3 particles_get_emission_half_extents(RID p_particles) const;
-
- virtual void particles_set_emission_base_velocity(RID p_particles, const Vector3 &p_base_velocity);
- virtual Vector3 particles_get_emission_base_velocity(RID p_particles) const;
-
- virtual void particles_set_emission_points(RID p_particles, const DVector<Vector3> &p_points);
- virtual DVector<Vector3> particles_get_emission_points(RID p_particles) const;
-
- virtual void particles_set_gravity_normal(RID p_particles, const Vector3 &p_normal);
- virtual Vector3 particles_get_gravity_normal(RID p_particles) const;
-
- virtual void particles_set_variable(RID p_particles, VS::ParticleVariable p_variable, float p_value);
- virtual float particles_get_variable(RID p_particles, VS::ParticleVariable p_variable) const;
-
- virtual void particles_set_randomness(RID p_particles, VS::ParticleVariable p_variable, float p_randomness);
- virtual float particles_get_randomness(RID p_particles, VS::ParticleVariable p_variable) const;
-
- virtual void particles_set_color_phase_pos(RID p_particles, int p_phase, float p_pos);
- virtual float particles_get_color_phase_pos(RID p_particles, int p_phase) const;
-
- virtual void particles_set_color_phases(RID p_particles, int p_phases);
- virtual int particles_get_color_phases(RID p_particles) const;
-
- virtual void particles_set_color_phase_color(RID p_particles, int p_phase, const Color &p_color);
- virtual Color particles_get_color_phase_color(RID p_particles, int p_phase) const;
-
- virtual void particles_set_attractors(RID p_particles, int p_attractors);
- virtual int particles_get_attractors(RID p_particles) const;
-
- virtual void particles_set_attractor_pos(RID p_particles, int p_attractor, const Vector3 &p_pos);
- virtual Vector3 particles_get_attractor_pos(RID p_particles, int p_attractor) const;
-
- virtual void particles_set_attractor_strength(RID p_particles, int p_attractor, float p_force);
- virtual float particles_get_attractor_strength(RID p_particles, int p_attractor) const;
-
- virtual void particles_set_material(RID p_particles, RID p_material, bool p_owned = false);
- virtual RID particles_get_material(RID p_particles) const;
-
- virtual AABB particles_get_aabb(RID p_particles) const;
-
- virtual void particles_set_height_from_velocity(RID p_particles, bool p_enable);
- virtual bool particles_has_height_from_velocity(RID p_particles) const;
-
- virtual void particles_set_use_local_coordinates(RID p_particles, bool p_enable);
- virtual bool particles_is_using_local_coordinates(RID p_particles) const;
-
- /* SKELETON API */
-
- virtual RID skeleton_create();
- virtual void skeleton_resize(RID p_skeleton, int p_bones);
- virtual int skeleton_get_bone_count(RID p_skeleton) const;
- virtual void skeleton_bone_set_transform(RID p_skeleton, int p_bone, const Transform &p_transform);
- virtual Transform skeleton_bone_get_transform(RID p_skeleton, int p_bone);
-
- /* LIGHT API */
-
- virtual RID light_create(VS::LightType p_type);
- virtual VS::LightType light_get_type(RID p_light) const;
-
- virtual void light_set_color(RID p_light, VS::LightColor p_type, const Color &p_color);
- virtual Color light_get_color(RID p_light, VS::LightColor p_type) const;
-
- virtual void light_set_shadow(RID p_light, bool p_enabled);
- virtual bool light_has_shadow(RID p_light) const;
-
- virtual void light_set_volumetric(RID p_light, bool p_enabled);
- virtual bool light_is_volumetric(RID p_light) const;
-
- virtual void light_set_projector(RID p_light, RID p_texture);
- virtual RID light_get_projector(RID p_light) const;
-
- virtual void light_set_var(RID p_light, VS::LightParam p_var, float p_value);
- virtual float light_get_var(RID p_light, VS::LightParam p_var) const;
-
- virtual void light_set_operator(RID p_light, VS::LightOp p_op);
- virtual VS::LightOp light_get_operator(RID p_light) const;
-
- virtual void light_omni_set_shadow_mode(RID p_light, VS::LightOmniShadowMode p_mode);
- virtual VS::LightOmniShadowMode light_omni_get_shadow_mode(RID p_light) const;
-
- virtual void light_directional_set_shadow_mode(RID p_light, VS::LightDirectionalShadowMode p_mode);
- virtual VS::LightDirectionalShadowMode light_directional_get_shadow_mode(RID p_light) const;
- virtual void light_directional_set_shadow_param(RID p_light, VS::LightDirectionalShadowParam p_param, float p_value);
- virtual float light_directional_get_shadow_param(RID p_light, VS::LightDirectionalShadowParam p_param) const;
-
- virtual AABB light_get_aabb(RID p_light) const;
-
- virtual RID light_instance_create(RID p_light);
- virtual void light_instance_set_transform(RID p_light_instance, const Transform &p_transform);
-
- virtual ShadowType light_instance_get_shadow_type(RID p_light_instance, bool p_far = false) const;
- virtual int light_instance_get_shadow_passes(RID p_light_instance) const;
- virtual bool light_instance_get_pssm_shadow_overlap(RID p_light_instance) const;
- virtual void light_instance_set_shadow_transform(RID p_light_instance, int p_index, const CameraMatrix &p_camera, const Transform &p_transform, float p_split_near = 0, float p_split_far = 0);
- virtual int light_instance_get_shadow_size(RID p_light_instance, int p_index = 0) const;
-
- virtual void shadow_clear_near();
- virtual bool shadow_allocate_near(RID p_light);
- virtual bool shadow_allocate_far(RID p_light);
-
- /* SHADOW */
-
- virtual RID particles_instance_create(RID p_particles);
- virtual void particles_instance_set_transform(RID p_particles_instance, const Transform &p_transform);
-
- /* VIEWPORT */
-
- virtual RID viewport_data_create();
-
- virtual RID render_target_create();
- virtual void render_target_set_size(RID p_render_target, int p_width, int p_height);
- virtual RID render_target_get_texture(RID p_render_target) const;
- virtual bool render_target_renedered_in_frame(RID p_render_target);
-
- /* RENDER API */
- /* all calls (inside begin/end shadow) are always warranted to be in the following order: */
-
- virtual void begin_frame();
-
- virtual void set_viewport(const VS::ViewportRect &p_viewport);
- virtual void set_render_target(RID p_render_target, bool p_transparent_bg = false, bool p_vflip = false);
- virtual void clear_viewport(const Color &p_color);
- virtual void capture_viewport(Image *r_capture);
-
- virtual void begin_scene(RID p_viewport_data, RID p_env, VS::ScenarioDebugMode p_debug);
-
- virtual void begin_shadow_map(RID p_light_instance, int p_shadow_pass);
-
- virtual void set_camera(const Transform &p_world, const CameraMatrix &p_projection, bool p_ortho_hint);
-
- virtual void add_light(RID p_light_instance); ///< all "add_light" calls happen before add_geometry calls
-
- typedef Map<StringName, Variant> ParamOverrideMap;
-
- virtual void add_mesh(const RID &p_mesh, const InstanceData *p_data);
- virtual void add_multimesh(const RID &p_multimesh, const InstanceData *p_data);
- virtual void add_immediate(const RID &p_immediate, const InstanceData *p_data);
- virtual void add_particles(const RID &p_particle_instance, const InstanceData *p_data);
-
- virtual void end_scene();
- virtual void end_shadow_map();
-
- virtual void end_frame();
-
- /* CANVAS API */
-
- virtual void begin_canvas_bg();
-
- virtual void canvas_begin();
- virtual void canvas_disable_blending();
-
- virtual void canvas_set_opacity(float p_opacity);
- virtual void canvas_set_blend_mode(VS::MaterialBlendMode p_mode);
- virtual void canvas_begin_rect(const Transform2D &p_transform);
- virtual void canvas_set_clip(bool p_clip, const Rect2 &p_rect);
- virtual void canvas_end_rect();
- virtual void canvas_draw_line(const Point2 &p_from, const Point2 &p_to, const Color &p_color, float p_width, bool p_antialiased);
- virtual void canvas_draw_rect(const Rect2 &p_rect, int p_flags, const Rect2 &p_source, RID p_texture, const Color &p_modulate);
- virtual void canvas_draw_style_box(const Rect2 &p_rect, const Rect2 &p_src_region, RID p_texture, const float *p_margins, bool p_draw_center = true, const Color &p_modulate = Color(1, 1, 1));
- virtual void canvas_draw_primitive(const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs, RID p_texture, float p_width);
- virtual void canvas_draw_polygon(int p_vertex_count, const int *p_indices, const Vector2 *p_vertices, const Vector2 *p_uvs, const Color *p_colors, const RID &p_texture, bool p_singlecolor);
- virtual void canvas_set_transform(const Transform2D &p_transform);
-
- virtual void canvas_render_items(CanvasItem *p_item_list, int p_z, const Color &p_modulate, CanvasLight *p_light);
- virtual void canvas_debug_viewport_shadows(CanvasLight *p_lights_with_shadow);
-
- /* CANVAS LIGHT SHADOW */
-
- //buffer
- virtual RID canvas_light_shadow_buffer_create(int p_width);
- virtual void canvas_light_shadow_buffer_update(RID p_buffer, const Transform2D &p_light_xform, int p_light_mask, float p_near, float p_far, CanvasLightOccluderInstance *p_occluders, CameraMatrix *p_xform_cache);
-
- //occluder
- virtual RID canvas_light_occluder_create();
- virtual void canvas_light_occluder_set_polylines(RID p_occluder, const DVector<Vector2> &p_lines);
-
- /* ENVIRONMENT */
-
- virtual RID environment_create();
-
- virtual void environment_set_background(RID p_env, VS::EnvironmentBG p_bg);
- virtual VS::EnvironmentBG environment_get_background(RID p_env) const;
-
- virtual void environment_set_background_param(RID p_env, VS::EnvironmentBGParam p_param, const Variant &p_value);
- virtual Variant environment_get_background_param(RID p_env, VS::EnvironmentBGParam p_param) const;
-
- virtual void environment_set_enable_fx(RID p_env, VS::EnvironmentFx p_effect, bool p_enabled);
- virtual bool environment_is_fx_enabled(RID p_env, VS::EnvironmentFx p_effect) const;
-
- virtual void environment_fx_set_param(RID p_env, VS::EnvironmentFxParam p_param, const Variant &p_value);
- virtual Variant environment_fx_get_param(RID p_env, VS::EnvironmentFxParam p_param) const;
-
- /* SAMPLED LIGHT */
- virtual RID sampled_light_dp_create(int p_width, int p_height);
- virtual void sampled_light_dp_update(RID p_sampled_light, const Color *p_data, float p_multiplier);
-
- /*MISC*/
-
- virtual bool is_texture(const RID &p_rid) const;
- virtual bool is_material(const RID &p_rid) const;
- virtual bool is_mesh(const RID &p_rid) const;
- virtual bool is_immediate(const RID &p_rid) const;
- virtual bool is_multimesh(const RID &p_rid) const;
- virtual bool is_particles(const RID &p_beam) const;
-
- virtual bool is_light(const RID &p_rid) const;
- virtual bool is_light_instance(const RID &p_rid) const;
- virtual bool is_particles_instance(const RID &p_rid) const;
- virtual bool is_skeleton(const RID &p_rid) const;
- virtual bool is_environment(const RID &p_rid) const;
- virtual bool is_shader(const RID &p_rid) const;
-
- virtual bool is_canvas_light_occluder(const RID &p_rid) const;
-
- virtual void free(const RID &p_rid);
-
- virtual void init();
- virtual void finish();
-
- virtual int get_render_info(VS::RenderInfo p_info);
-
- void set_base_framebuffer(GLuint p_id, Vector2 p_size = Vector2(0, 0));
-
- virtual void flush_frame(); //not necessary in most cases
- void set_extensions(const char *p_strings);
-
- virtual bool needs_to_draw_next_frame() const;
-
- void set_use_framebuffers(bool p_use);
- void reload_vram();
-
- virtual bool has_feature(VS::Features p_feature) const;
-
- virtual void restore_framebuffer();
-
- static RasterizerGLES2 *get_singleton();
-
- virtual void set_force_16_bits_fbo(bool p_force);
-
- RasterizerGLES2(bool p_compress_arrays = false, bool p_keep_ram_copy = true, bool p_default_fragment_lighting = true, bool p_use_reload_hooks = false);
- virtual ~RasterizerGLES2();
-};
-
-#endif
-#endif
diff --git a/drivers/gles2/rasterizer_instance_gles2.cpp b/drivers/gles2/rasterizer_instance_gles2.cpp
deleted file mode 100644
index 8aedd4def0..0000000000
--- a/drivers/gles2/rasterizer_instance_gles2.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*************************************************************************/
-/* rasterizer_instance_gles2.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "rasterizer_instance_gles2.h"
-#include "rasterizer_gles2.h"
-
-#ifdef GLES2_ENABLED
-
-Rasterizer *instance_RasterizerGLES2() {
-
- return memnew(RasterizerGLES2);
-}
-
-#endif
diff --git a/drivers/gles2/rasterizer_instance_gles2.h b/drivers/gles2/rasterizer_instance_gles2.h
deleted file mode 100644
index 09e9716b50..0000000000
--- a/drivers/gles2/rasterizer_instance_gles2.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*************************************************************************/
-/* rasterizer_instance_gles2.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef RASTERIZER_INSTANCE_GLES2_H
-#define RASTERIZER_INSTANCE_GLES2_H
-
-#include "servers/visual/rasterizer.h"
-
-#ifdef GLES2_ENABLED
-
-Rasterizer *instance_RasterizerGLES2();
-
-#endif
-
-#endif // RASTERIZER_INSTANCE_gles2_H
diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp
deleted file mode 100644
index 778d28fb99..0000000000
--- a/drivers/gles2/shader_compiler_gles2.cpp
+++ /dev/null
@@ -1,939 +0,0 @@
-/*************************************************************************/
-/* shader_compiler_gles2.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "shader_compiler_gles2.h"
-#include "print_string.h"
-
-#include "stdio.h"
-
-//#define DEBUG_SHADER_ENABLED
-
-typedef ShaderLanguage SL;
-
-struct CodeGLSL2 {
-
- String code;
-};
-
-static String _mktab(int p_level) {
-
- String tb;
- for (int i = 0; i < p_level; i++) {
- tb += "\t";
- }
-
- return tb;
-}
-
-static String _typestr(SL::DataType p_type) {
-
- switch (p_type) {
-
- case SL::TYPE_VOID: return "void";
- case SL::TYPE_BOOL: return "bool";
- case SL::TYPE_FLOAT: return "float";
- case SL::TYPE_VEC2: return "vec2";
- case SL::TYPE_VEC3: return "vec3";
- case SL::TYPE_VEC4: return "vec4";
- case SL::TYPE_MAT2: return "mat2";
- case SL::TYPE_MAT3: return "mat3";
- case SL::TYPE_MAT4: return "mat4";
- case SL::TYPE_TEXTURE: return "sampler2D";
- case SL::TYPE_CUBEMAP: return "samplerCube";
- }
-
- return "";
-}
-
-static String _mknum(float p_num) {
- return String::num_real(p_num);
-}
-
-static String _opstr(SL::Operator p_op) {
-
- switch (p_op) {
- case SL::OP_ASSIGN: return "=";
- case SL::OP_ADD: return "+";
- case SL::OP_SUB: return "-";
- case SL::OP_MUL: return "*";
- case SL::OP_DIV: return "/";
- case SL::OP_ASSIGN_ADD: return "+=";
- case SL::OP_ASSIGN_SUB: return "-=";
- case SL::OP_ASSIGN_MUL: return "*=";
- case SL::OP_ASSIGN_DIV: return "/=";
- case SL::OP_NEG: return "-";
- case SL::OP_NOT: return "!";
- case SL::OP_CMP_EQ: return "==";
- case SL::OP_CMP_NEQ: return "!=";
- case SL::OP_CMP_LEQ: return "<=";
- case SL::OP_CMP_GEQ: return ">=";
- case SL::OP_CMP_LESS: return "<";
- case SL::OP_CMP_GREATER: return ">";
- case SL::OP_CMP_OR: return "||";
- case SL::OP_CMP_AND: return "&&";
- default: return "";
- }
-
- return "";
-}
-
-//#ifdef DEBUG_SHADER_ENABLED
-#if 1
-#define ENDL "\n"
-#else
-#define ENDL ""
-#endif
-
-String ShaderCompilerGLES2::dump_node_code(SL::Node *p_node, int p_level, bool p_assign_left) {
-
- String code;
-
- switch (p_node->type) {
-
- case SL::Node::TYPE_PROGRAM: {
-
- SL::ProgramNode *pnode = (SL::ProgramNode *)p_node;
-
- code += dump_node_code(pnode->body, p_level);
- } break;
- case SL::Node::TYPE_FUNCTION: {
-
- } break;
- case SL::Node::TYPE_BLOCK: {
- SL::BlockNode *bnode = (SL::BlockNode *)p_node;
-
- //variables
- code += "{" ENDL;
- for (Map<StringName, SL::DataType>::Element *E = bnode->variables.front(); E; E = E->next()) {
-
- code += _mktab(p_level) + _typestr(E->value()) + " " + replace_string(E->key()) + ";" ENDL;
- }
-
- for (int i = 0; i < bnode->statements.size(); i++) {
-
- code += _mktab(p_level) + dump_node_code(bnode->statements[i], p_level) + ";" ENDL;
- }
-
- code += "}" ENDL;
-
- } break;
- case SL::Node::TYPE_VARIABLE: {
- SL::VariableNode *vnode = (SL::VariableNode *)p_node;
-
- if (type == ShaderLanguage::SHADER_MATERIAL_VERTEX) {
-
- if (vnode->name == vname_vertex && p_assign_left) {
- vertex_code_writes_vertex = true;
- }
- if (vnode->name == vname_position && p_assign_left) {
- vertex_code_writes_position = true;
- }
- if (vnode->name == vname_color_interp) {
- flags->use_color_interp = true;
- }
- if (vnode->name == vname_uv_interp) {
- flags->use_uv_interp = true;
- }
- if (vnode->name == vname_uv2_interp) {
- flags->use_uv2_interp = true;
- }
- if (vnode->name == vname_var1_interp) {
- flags->use_var1_interp = true;
- }
- if (vnode->name == vname_var2_interp) {
- flags->use_var2_interp = true;
- }
- if (vnode->name == vname_tangent_interp || vnode->name == vname_binormal_interp) {
- flags->use_tangent_interp = true;
- }
- }
-
- if (type == ShaderLanguage::SHADER_MATERIAL_FRAGMENT) {
-
- if (vnode->name == vname_discard) {
- uses_discard = true;
- }
- if (vnode->name == vname_normalmap) {
- uses_normalmap = true;
- }
- if (vnode->name == vname_screen_uv) {
- uses_screen_uv = true;
- }
- if (vnode->name == vname_diffuse_alpha && p_assign_left) {
- uses_alpha = true;
- }
- if (vnode->name == vname_color_interp) {
- flags->use_color_interp = true;
- }
- if (vnode->name == vname_uv_interp) {
- flags->use_uv_interp = true;
- }
- if (vnode->name == vname_uv2_interp) {
- flags->use_uv2_interp = true;
- }
- if (vnode->name == vname_var1_interp) {
- flags->use_var1_interp = true;
- }
- if (vnode->name == vname_var2_interp) {
- flags->use_var2_interp = true;
- }
- if (vnode->name == vname_tangent_interp || vnode->name == vname_binormal_interp) {
- flags->use_tangent_interp = true;
- }
- }
- if (type == ShaderLanguage::SHADER_MATERIAL_LIGHT) {
-
- if (vnode->name == vname_light) {
- uses_light = true;
- }
-
- if (vnode->name == vname_shadow) {
- uses_shadow_color = true;
- }
- }
- if (type == ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX) {
-
- if (vnode->name == vname_var1_interp) {
- flags->use_var1_interp = true;
- }
- if (vnode->name == vname_var2_interp) {
- flags->use_var2_interp = true;
- }
- if (vnode->name == vname_world_vec) {
- uses_worldvec = true;
- }
- }
-
- if (type == ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT) {
-
- if (vnode->name == vname_texpixel_size) {
- uses_texpixel_size = true;
- }
- if (vnode->name == vname_normal) {
- uses_normal = true;
- }
- if (vnode->name == vname_normalmap || vnode->name == vname_normalmap_depth) {
- uses_normalmap = true;
- uses_normal = true;
- }
-
- if (vnode->name == vname_screen_uv) {
- uses_screen_uv = true;
- }
-
- if (vnode->name == vname_var1_interp) {
- flags->use_var1_interp = true;
- }
- if (vnode->name == vname_var2_interp) {
- flags->use_var2_interp = true;
- }
- }
-
- if (type == ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT) {
-
- if (vnode->name == vname_light) {
- uses_light = true;
- }
-
- if (vnode->name == vname_normal) {
- uses_normal = true;
- }
-
- if (vnode->name == vname_shadow) {
- uses_shadow_color = true;
- }
- }
-
- if (vnode->name == vname_time) {
- uses_time = true;
- }
- code = replace_string(vnode->name);
-
- } break;
- case SL::Node::TYPE_CONSTANT: {
- SL::ConstantNode *cnode = (SL::ConstantNode *)p_node;
- switch (cnode->datatype) {
-
- case SL::TYPE_BOOL: code = cnode->value.operator bool() ? "true" : "false"; break;
- case SL::TYPE_FLOAT:
- code = _mknum(cnode->value);
- break; //force zeros, so GLSL doesn't confuse with integer.
- case SL::TYPE_VEC2: {
- Vector2 v = cnode->value;
- code = "vec2(" + _mknum(v.x) + ", " + _mknum(v.y) + ")";
- } break;
- case SL::TYPE_VEC3: {
- Vector3 v = cnode->value;
- code = "vec3(" + _mknum(v.x) + ", " + _mknum(v.y) + ", " + _mknum(v.z) + ")";
- } break;
- case SL::TYPE_VEC4: {
- Plane v = cnode->value;
- code = "vec4(" + _mknum(v.normal.x) + ", " + _mknum(v.normal.y) + ", " + _mknum(v.normal.z) + ", " + _mknum(v.d) + ")";
- } break;
- case SL::TYPE_MAT2: {
- Transform2D x = cnode->value;
- code = "mat2( vec2(" + _mknum(x[0][0]) + ", " + _mknum(x[0][1]) + "), vec2(" + _mknum(x[1][0]) + ", " + _mknum(x[1][1]) + "))";
- } break;
- case SL::TYPE_MAT3: {
- Basis x = cnode->value;
- code = "mat3( vec3(" + _mknum(x.get_axis(0).x) + ", " + _mknum(x.get_axis(0).y) + ", " + _mknum(x.get_axis(0).z) + "), vec3(" + _mknum(x.get_axis(1).x) + ", " + _mknum(x.get_axis(1).y) + ", " + _mknum(x.get_axis(1).z) + "), vec3(" + _mknum(x.get_axis(2).x) + ", " + _mknum(x.get_axis(2).y) + ", " + _mknum(x.get_axis(2).z) + "))";
- } break;
- case SL::TYPE_MAT4: {
- Transform x = cnode->value;
- code = "mat4( vec4(" + _mknum(x.basis.get_axis(0).x) + ", " + _mknum(x.basis.get_axis(0).y) + ", " + _mknum(x.basis.get_axis(0).z) + ",0.0), vec4(" + _mknum(x.basis.get_axis(1).x) + ", " + _mknum(x.basis.get_axis(1).y) + ", " + _mknum(x.basis.get_axis(1).z) + ",0.0), vec4(" + _mknum(x.basis.get_axis(2).x) + ", " + _mknum(x.basis.get_axis(2).y) + ", " + _mknum(x.basis.get_axis(2).z) + ",0.0), vec4(" + _mknum(x.origin.x) + ", " + _mknum(x.origin.y) + ", " + _mknum(x.origin.z) + ",1.0))";
- } break;
- default: code = "<error: " + Variant::get_type_name(cnode->value.get_type()) + " (" + itos(cnode->datatype) + ">";
- }
-
- } break;
- case SL::Node::TYPE_OPERATOR: {
- SL::OperatorNode *onode = (SL::OperatorNode *)p_node;
-
- switch (onode->op) {
-
- case SL::OP_ASSIGN_MUL: {
-
- if (onode->arguments[0]->get_datatype() == SL::TYPE_VEC3 && onode->arguments[1]->get_datatype() == SL::TYPE_MAT4) {
-
- String mul_l = dump_node_code(onode->arguments[0], p_level, true);
- String mul_r = dump_node_code(onode->arguments[1], p_level);
- code = mul_l + "=(vec4(" + mul_l + ",1.0)*(" + mul_r + ")).xyz";
- break;
- } else if (onode->arguments[0]->get_datatype() == SL::TYPE_MAT4 && onode->arguments[1]->get_datatype() == SL::TYPE_VEC3) {
-
- String mul_l = dump_node_code(onode->arguments[0], p_level, true);
- String mul_r = dump_node_code(onode->arguments[1], p_level);
- code = mul_l + "=((" + mul_l + ")*vec4(" + mul_r + ",1.0)).xyz";
- break;
- } else if (onode->arguments[0]->get_datatype() == SL::TYPE_VEC2 && onode->arguments[1]->get_datatype() == SL::TYPE_MAT4) {
-
- String mul_l = dump_node_code(onode->arguments[0], p_level, true);
- String mul_r = dump_node_code(onode->arguments[1], p_level);
- code = mul_l + "=(vec4(" + mul_l + ",0.0,1.0)*(" + mul_r + ")).xy";
- break;
- } else if (onode->arguments[0]->get_datatype() == SL::TYPE_MAT4 && onode->arguments[1]->get_datatype() == SL::TYPE_VEC2) {
-
- String mul_l = dump_node_code(onode->arguments[0], p_level, true);
- String mul_r = dump_node_code(onode->arguments[1], p_level);
- code = mul_l + "=((" + mul_l + ")*vec4(" + mul_r + ",0.0,1.0)).xy";
- break;
- } else if (onode->arguments[0]->get_datatype() == SL::TYPE_VEC2 && onode->arguments[1]->get_datatype() == SL::TYPE_MAT3) {
- String mul_l = dump_node_code(onode->arguments[0], p_level, true);
- String mul_r = dump_node_code(onode->arguments[1], p_level);
- code = mul_l + "=((" + mul_l + ")*vec3(" + mul_r + ",1.0)).xy";
- break;
- }
- };
- case SL::OP_ASSIGN:
- case SL::OP_ASSIGN_ADD:
- case SL::OP_ASSIGN_SUB:
- case SL::OP_ASSIGN_DIV:
- code = "(" + dump_node_code(onode->arguments[0], p_level, true) + _opstr(onode->op) + dump_node_code(onode->arguments[1], p_level) + ")";
- break;
-
- case SL::OP_MUL:
-
- if (onode->arguments[0]->get_datatype() == SL::TYPE_MAT4 && onode->arguments[1]->get_datatype() == SL::TYPE_VEC3) {
-
- code = "(" + dump_node_code(onode->arguments[0], p_level) + "*vec4(" + dump_node_code(onode->arguments[1], p_level) + ",1.0)).xyz";
- break;
- } else if (onode->arguments[0]->get_datatype() == SL::TYPE_VEC3 && onode->arguments[1]->get_datatype() == SL::TYPE_MAT4) {
-
- code = "(vec4(" + dump_node_code(onode->arguments[0], p_level) + ",1.0)*" + dump_node_code(onode->arguments[1], p_level) + ").xyz";
- break;
- } else if (onode->arguments[0]->get_datatype() == SL::TYPE_MAT4 && onode->arguments[1]->get_datatype() == SL::TYPE_VEC2) {
-
- code = "(" + dump_node_code(onode->arguments[0], p_level) + "*vec4(" + dump_node_code(onode->arguments[1], p_level) + ",0.0,1.0)).xy";
- break;
- } else if (onode->arguments[0]->get_datatype() == SL::TYPE_VEC2 && onode->arguments[1]->get_datatype() == SL::TYPE_MAT4) {
-
- code = "(vec4(" + dump_node_code(onode->arguments[0], p_level) + ",0.0,1.0)*" + dump_node_code(onode->arguments[1], p_level) + ").xy";
- break;
- } else if (onode->arguments[0]->get_datatype() == SL::TYPE_MAT3 && onode->arguments[1]->get_datatype() == SL::TYPE_VEC2) {
-
- code = "(" + dump_node_code(onode->arguments[0], p_level) + "*vec3(" + dump_node_code(onode->arguments[1], p_level) + ",1.0)).xy";
- break;
- } else if (onode->arguments[0]->get_datatype() == SL::TYPE_VEC2 && onode->arguments[1]->get_datatype() == SL::TYPE_MAT3) {
-
- code = "(vec3(" + dump_node_code(onode->arguments[0], p_level) + ",1.0)*" + dump_node_code(onode->arguments[1], p_level) + ").xy";
- break;
- }
-
- case SL::OP_ADD:
- case SL::OP_SUB:
- case SL::OP_DIV:
- case SL::OP_CMP_EQ:
- case SL::OP_CMP_NEQ:
- case SL::OP_CMP_LEQ:
- case SL::OP_CMP_GEQ:
- case SL::OP_CMP_LESS:
- case SL::OP_CMP_GREATER:
- case SL::OP_CMP_OR:
- case SL::OP_CMP_AND:
- //handle binary
- code = "(" + dump_node_code(onode->arguments[0], p_level) + _opstr(onode->op) + dump_node_code(onode->arguments[1], p_level) + ")";
- break;
- case SL::OP_NEG:
- case SL::OP_NOT:
- //handle unary
- code = _opstr(onode->op) + dump_node_code(onode->arguments[0], p_level);
- break;
- case SL::OP_CONSTRUCT:
- case SL::OP_CALL: {
- String callfunc = dump_node_code(onode->arguments[0], p_level);
-
- code = callfunc + "(";
- /*if (callfunc=="mat4") {
- //fix constructor for mat4
- for(int i=1;i<onode->arguments.size();i++) {
- if (i>1)
- code+=", ";
- //transform
- code+="vec4( "+dump_node_code(onode->arguments[i],p_level)+(i==4?",1.0)":",0.0)");
-
- }
- } else*/ if (callfunc == "tex") {
-
- code = "texture2D( " + dump_node_code(onode->arguments[1], p_level) + "," + dump_node_code(onode->arguments[2], p_level) + ")";
- break;
- } else if (callfunc == "texcube") {
-
- code = "(textureCube( " + dump_node_code(onode->arguments[1], p_level) + ",(" + dump_node_code(onode->arguments[2], p_level) + ")).xyz";
- break;
- } else if (callfunc == "texscreen") {
- //create the call to sample the screen, and clamp it
- uses_texscreen = true;
- code = "(texture2D( texscreen_tex, clamp((" + dump_node_code(onode->arguments[1], p_level) + ").xy*texscreen_screen_mult,texscreen_screen_clamp.xy,texscreen_screen_clamp.zw))).rgb";
- //code="(texture2D( screen_texture, ("+dump_node_code(onode->arguments[1],p_level)+").xy).rgb";
- break;
- } else if (callfunc == "texpos") {
- //create the call to sample the screen, and clamp it
- uses_texpos = true;
- code = "get_texpos(" + dump_node_code(onode->arguments[1], p_level) + "";
- //code="get_texpos(gl_ProjectionMatrixInverse * texture2D( depth_texture, clamp(("+dump_node_code(onode->arguments[1],p_level)+").xy,vec2(0.0),vec2(1.0))*gl_LightSource[5].specular.zw+gl_LightSource[5].specular.xy)";
- //code="(texture2D( screen_texture, ("+dump_node_code(onode->arguments[1],p_level)+").xy).rgb";
- break;
- } else if (custom_h && callfunc == "cosh_custom") {
-
- if (!cosh_used) {
- global_code =
- "float cosh_custom(float val)\n"
- "{\n"
- " float tmp = exp(val);\n"
- " float cosH = (tmp + 1.0 / tmp) / 2.0;\n"
- " return cosH;\n"
- "}\n" +
- global_code;
- cosh_used = true;
- }
- code = "cosh_custom(" + dump_node_code(onode->arguments[1], p_level) + "";
- } else if (custom_h && callfunc == "sinh_custom") {
-
- if (!sinh_used) {
- global_code =
- "float sinh_custom(float val)\n"
- "{\n"
- " float tmp = exp(val);\n"
- " float sinH = (tmp - 1.0 / tmp) / 2.0;\n"
- " return sinH;\n"
- "}\n" +
- global_code;
- sinh_used = true;
- }
- code = "sinh_custom(" + dump_node_code(onode->arguments[1], p_level) + "";
- } else if (custom_h && callfunc == "tanh_custom") {
-
- if (!tanh_used) {
- global_code =
- "float tanh_custom(float val)\n"
- "{\n"
- " float tmp = exp(val);\n"
- " float tanH = (tmp - 1.0 / tmp) / (tmp + 1.0 / tmp);\n"
- " return tanH;\n"
- "}\n" +
- global_code;
- tanh_used = true;
- }
- code = "tanh_custom(" + dump_node_code(onode->arguments[1], p_level) + "";
-
- } else {
-
- for (int i = 1; i < onode->arguments.size(); i++) {
- if (i > 1)
- code += ", ";
- //transform
- code += dump_node_code(onode->arguments[i], p_level);
- }
- }
- code += ")";
- break;
- } break;
- default: {}
- }
-
- } break;
- case SL::Node::TYPE_CONTROL_FLOW: {
- SL::ControlFlowNode *cfnode = (SL::ControlFlowNode *)p_node;
- if (cfnode->flow_op == SL::FLOW_OP_IF) {
-
- code += "if (" + dump_node_code(cfnode->statements[0], p_level) + ") {" ENDL;
- code += dump_node_code(cfnode->statements[1], p_level + 1);
- if (cfnode->statements.size() == 3) {
-
- code += "} else {" ENDL;
- code += dump_node_code(cfnode->statements[2], p_level + 1);
- }
-
- code += "}" ENDL;
-
- } else if (cfnode->flow_op == SL::FLOW_OP_RETURN) {
-
- if (cfnode->statements.size()) {
- code = "return " + dump_node_code(cfnode->statements[0], p_level);
- } else {
- code = "return";
- }
- }
-
- } break;
- case SL::Node::TYPE_MEMBER: {
- SL::MemberNode *mnode = (SL::MemberNode *)p_node;
- String m;
- if (mnode->basetype == SL::TYPE_MAT4) {
- if (mnode->name == "x")
- m = "[0]";
- else if (mnode->name == "y")
- m = "[1]";
- else if (mnode->name == "z")
- m = "[2]";
- else if (mnode->name == "w")
- m = "[3]";
- } else if (mnode->basetype == SL::TYPE_MAT2) {
- if (mnode->name == "x")
- m = "[0]";
- else if (mnode->name == "y")
- m = "[1]";
-
- } else if (mnode->basetype == SL::TYPE_MAT3) {
- if (mnode->name == "x")
- m = "[0]";
- else if (mnode->name == "y")
- m = "[1]";
- else if (mnode->name == "z")
- m = "[2]";
-
- } else {
- m = "." + mnode->name;
- }
- code = dump_node_code(mnode->owner, p_level) + m;
-
- } break;
- }
-
- return code;
-}
-
-Error ShaderCompilerGLES2::compile_node(SL::ProgramNode *p_program) {
-
- // feed the local replace table and global code
- global_code = "";
-
- // uniforms first!
-
- int ubase = 0;
- if (uniforms)
- ubase = uniforms->size();
- for (Map<StringName, SL::Uniform>::Element *E = p_program->uniforms.front(); E; E = E->next()) {
-
- String uline = "uniform " + _typestr(E->get().type) + " _" + E->key().operator String() + ";" ENDL;
-
- global_code += uline;
- if (uniforms) {
- /*
- if (uniforms->has(E->key())) {
- //repeated uniform, error
- ERR_EXPLAIN("Uniform already exists from other shader: "+String(E->key()));
- ERR_FAIL_COND_V(uniforms->has(E->key()),ERR_ALREADY_EXISTS);
- }
- */
- SL::Uniform u = E->get();
- u.order += ubase;
- uniforms->insert(E->key(), u);
- }
- }
-
- for (int i = 0; i < p_program->functions.size(); i++) {
-
- SL::FunctionNode *fnode = p_program->functions[i].function;
-
- StringName funcname = fnode->name;
- String newfuncname = replace_string(funcname);
-
- String header;
- header = _typestr(fnode->return_type) + " " + newfuncname + "(";
- for (int i = 0; i < fnode->arguments.size(); i++) {
-
- if (i > 0)
- header += ", ";
- header += _typestr(fnode->arguments[i].type) + " " + replace_string(fnode->arguments[i].name);
- }
-
- header += ") {" ENDL;
- String fcode = header;
- fcode += dump_node_code(fnode->body, 1);
- fcode += "}" ENDL;
- global_code += fcode;
- }
-
- /* for(Map<StringName,SL::DataType>::Element *E=p_program->preexisting_variables.front();E;E=E->next()) {
-
- StringName varname=E->key();
- String newvarname=replace_string(varname);
- global_code+="uniform "+_typestr(E->get())+" "+newvarname+";" ENDL;
- }*/
-
- code = dump_node_code(p_program, 0);
-
-#ifdef DEBUG_SHADER_ENABLED
-
- print_line("GLOBAL CODE:\n\n");
- print_line(global_code);
- global_code = global_code.replace("\n", "");
- print_line("CODE:\n\n");
- print_line(code);
- code = code.replace("\n", "");
-#endif
-
- return OK;
-}
-
-Error ShaderCompilerGLES2::create_glsl_120_code(void *p_str, SL::ProgramNode *p_program) {
-
- ShaderCompilerGLES2 *compiler = (ShaderCompilerGLES2 *)p_str;
- return compiler->compile_node(p_program);
-}
-
-String ShaderCompilerGLES2::replace_string(const StringName &p_string) {
-
- Map<StringName, StringName>::Element *E = NULL;
- E = replace_table.find(p_string);
- if (E)
- return E->get();
-
- E = mode_replace_table[type].find(p_string);
- if (E)
- return E->get();
-
- return "_" + p_string.operator String();
-}
-
-Error ShaderCompilerGLES2::compile(const String &p_code, ShaderLanguage::ShaderType p_type, String &r_code_line, String &r_globals_line, Flags &r_flags, Map<StringName, ShaderLanguage::Uniform> *r_uniforms) {
-
- uses_texscreen = false;
- uses_texpos = false;
- uses_alpha = false;
- uses_discard = false;
- uses_screen_uv = false;
- uses_light = false;
- uses_time = false;
- uses_normalmap = false;
- uses_normal = false;
- uses_texpixel_size = false;
- uses_worldvec = false;
- vertex_code_writes_vertex = false;
- vertex_code_writes_position = false;
- uses_shadow_color = false;
- uniforms = r_uniforms;
- flags = &r_flags;
- r_flags.use_color_interp = false;
- r_flags.use_uv_interp = false;
- r_flags.use_uv2_interp = false;
- r_flags.use_tangent_interp = false;
- r_flags.use_var1_interp = false;
- r_flags.use_var2_interp = false;
- r_flags.uses_normalmap = false;
- r_flags.uses_normal = false;
- sinh_used = false;
- tanh_used = false;
- cosh_used = false;
-
- String error;
- int errline, errcol;
-
- type = p_type;
- Error err = SL::compile(p_code, p_type, create_glsl_120_code, this, &error, &errline, &errcol);
-
- if (err) {
- print_line("***Error precompiling shader: " + error);
- print_line("error " + itos(errline) + ":" + itos(errcol));
- return err;
- }
-
- r_flags.uses_alpha = uses_alpha;
- r_flags.uses_texscreen = uses_texscreen;
- r_flags.uses_texpos = uses_texpos;
- r_flags.vertex_code_writes_vertex = vertex_code_writes_vertex;
- r_flags.vertex_code_writes_position = vertex_code_writes_position;
- r_flags.uses_discard = uses_discard;
- r_flags.uses_screen_uv = uses_screen_uv;
- r_flags.uses_light = uses_light;
- r_flags.uses_time = uses_time;
- r_flags.uses_normalmap = uses_normalmap;
- r_flags.uses_normal = uses_normal;
- r_flags.uses_texpixel_size = uses_texpixel_size;
- r_flags.uses_worldvec = uses_worldvec;
- r_flags.uses_shadow_color = uses_shadow_color;
- r_code_line = code;
- r_globals_line = global_code;
- return OK;
-}
-
-ShaderCompilerGLES2::ShaderCompilerGLES2() {
-
-#ifdef GLEW_ENABLED
- //use custom functions because they are not supported in GLSL120
- custom_h = true;
-#else
- custom_h = false;
-#endif
-
- replace_table["bool"] = "bool";
- replace_table["float"] = "float";
- replace_table["vec2"] = "vec2";
- replace_table["vec3"] = "vec3";
- replace_table["vec4"] = "vec4";
- replace_table["mat2"] = "mat2";
- replace_table["mat3"] = "mat3";
- replace_table["mat4"] = "mat4";
- replace_table["texture"] = "sampler2D";
- replace_table["cubemap"] = "samplerCube";
-
- replace_table["sin"] = "sin";
- replace_table["cos"] = "cos";
- replace_table["tan"] = "tan";
- replace_table["asin"] = "asin";
- replace_table["acos"] = "acos";
- replace_table["atan"] = "atan";
- replace_table["atan2"] = "atan";
-
- if (custom_h) {
- replace_table["sinh"] = "sinh_custom";
- replace_table["cosh"] = "cosh_custom";
- replace_table["tanh"] = "tanh_custom";
- } else {
- replace_table["sinh"] = "sinh";
- replace_table["cosh"] = "cosh";
- replace_table["tanh"] = "tanh";
- }
-
- replace_table["pow"] = "pow";
- replace_table["exp"] = "exp";
- replace_table["log"] = "log";
- replace_table["sqrt"] = "sqrt";
- replace_table["abs"] = "abs";
- replace_table["sign"] = "sign";
- replace_table["floor"] = "floor";
- replace_table["trunc"] = "trunc";
-#ifdef GLEW_ENABLED
- replace_table["round"] = "roundfix";
-#else
- replace_table["round"] = "round";
-#endif
- replace_table["ceil"] = "ceil";
- replace_table["fract"] = "fract";
- replace_table["mod"] = "mod";
- replace_table["min"] = "min";
- replace_table["max"] = "max";
- replace_table["clamp"] = "clamp";
- replace_table["mix"] = "mix";
- replace_table["step"] = "step";
- replace_table["smoothstep"] = "smoothstep";
- replace_table["length"] = "length";
- replace_table["distance"] = "distance";
- replace_table["dot"] = "dot";
- replace_table["cross"] = "cross";
- replace_table["normalize"] = "normalize";
- replace_table["reflect"] = "reflect";
- replace_table["refract"] = "refract";
- replace_table["tex"] = "tex";
- replace_table["texa"] = "texa";
- replace_table["tex2"] = "tex2";
- replace_table["texcube"] = "textureCube";
- replace_table["texscreen"] = "texscreen";
- replace_table["texpos"] = "texpos";
-
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SRC_VERTEX"] = "vertex_in.xyz";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SRC_NORMAL"] = "normal_in";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SRC_TANGENT"] = "tangent_in";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SRC_BINORMALF"] = "binormalf";
-
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["POSITION"] = "gl_Position";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["VERTEX"] = "vertex_interp";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["NORMAL"] = "normal_interp";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["TANGENT"] = "tangent_interp";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["BINORMAL"] = "binormal_interp";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["UV"] = "uv_interp.xy";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["UV2"] = "uv_interp.zw";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["COLOR"] = "color_interp";
- //@TODO convert to glsl stuff
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SPEC_EXP"] = "vertex_specular_exp";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["WORLD_MATRIX"] = "world_transform";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["INV_CAMERA_MATRIX"] = "camera_inverse_transform";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["PROJECTION_MATRIX"] = "projection_transform";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["MODELVIEW_MATRIX"] = "modelview";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["POINT_SIZE"] = "gl_PointSize";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["VAR1"] = "var1_interp";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["VAR2"] = "var2_interp";
-
- //mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SCREEN_POS"]="SCREEN_POS";
- //mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SCREEN_SIZE"]="SCREEN_SIZE";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["INSTANCE_ID"] = "instance_id";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["TIME"] = "time";
-
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["VERTEX"] = "vertex";
- //mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["POSITION"]="IN_POSITION";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["NORMAL"] = "normal";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["TANGENT"] = "tangent";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["POSITION"] = "gl_Position";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["BINORMAL"] = "binormal";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["NORMALMAP"] = "normalmap";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["NORMALMAP_DEPTH"] = "normaldepth";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["VAR1"] = "var1_interp";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["VAR2"] = "var2_interp";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["UV"] = "uv";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["UV2"] = "uv2";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["SCREEN_UV"] = "screen_uv";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["VAR1"] = "var1_interp";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["VAR2"] = "var2_interp";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["COLOR"] = "color";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["DIFFUSE"] = "diffuse.rgb";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["DIFFUSE_ALPHA"] = "diffuse";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["SPECULAR"] = "specular";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["EMISSION"] = "emission";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["SHADE_PARAM"] = "shade_param";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["SPEC_EXP"] = "specular_exp";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["GLOW"] = "glow";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["DISCARD"] = "discard_";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["POINT_COORD"] = "gl_PointCoord";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["INV_CAMERA_MATRIX"] = "camera_inverse_transform";
-
- //mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["SCREEN_POS"]="SCREEN_POS";
- //mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["SCREEN_TEXEL_SIZE"]="SCREEN_TEXEL_SIZE";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_FRAGMENT]["TIME"] = "time";
-
- //////////////
-
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["NORMAL"] = "normal";
- //mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["POSITION"]="IN_POSITION";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["LIGHT_DIR"] = "light_dir";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["LIGHT_DIFFUSE"] = "light_diffuse";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["LIGHT_SPECULAR"] = "light_specular";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["EYE_VEC"] = "eye_vec";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["DIFFUSE"] = "mdiffuse";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["SPECULAR"] = "specular";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["SPECULAR_EXP"] = "specular_exp";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["SHADE_PARAM"] = "shade_param";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["LIGHT"] = "light";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["POINT_COORD"] = "gl_PointCoord";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["TIME"] = "time";
- mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["SHADOW"] = "shadow_color";
-
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["SRC_VERTEX"] = "src_vtx";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["VERTEX"] = "outvec.xy";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["WORLD_VERTEX"] = "outvec.xy";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["UV"] = "uv_interp";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["COLOR"] = "color_interp";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["VAR1"] = "var1_interp";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["VAR2"] = "var2_interp";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["POINT_SIZE"] = "gl_PointSize";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["WORLD_MATRIX"] = "modelview_matrix";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["PROJECTION_MATRIX"] = "projection_matrix";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["EXTRA_MATRIX"] = "extra_matrix";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["TIME"] = "time";
-
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["POSITION"] = "gl_Position";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["NORMAL"] = "normal";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["NORMALMAP"] = "normal_map";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["NORMALMAP_DEPTH"] = "normal_depth";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["UV"] = "uv_interp";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["SRC_COLOR"] = "color_interp";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["COLOR"] = "color";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["TEXTURE"] = "texture";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["TEXTURE_PIXEL_SIZE"] = "texpixel_size";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["VAR1"] = "var1_interp";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["VAR2"] = "var2_interp";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["SCREEN_UV"] = "screen_uv";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["POINT_COORD"] = "gl_PointCoord";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT]["TIME"] = "time";
-
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["POSITION"] = "gl_Position";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["NORMAL"] = "normal";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["UV"] = "uv_interp";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["COLOR"] = "color";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["TEXTURE"] = "texture";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["TEXTURE_PIXEL_SIZE"] = "texpixel_size";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["VAR1"] = "var1_interp";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["VAR2"] = "var2_interp";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["LIGHT_VEC"] = "light_vec";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["LIGHT_HEIGHT"] = "light_height";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["LIGHT_COLOR"] = "light";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["LIGHT_SHADOW"] = "light_shadow_color";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["LIGHT_UV"] = "light_uv";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["LIGHT"] = "light_out";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["SHADOW"] = "shadow_color";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["SCREEN_UV"] = "screen_uv";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["POINT_COORD"] = "gl_PointCoord";
- mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT]["TIME"] = "time";
-
- //mode_replace_table[2]["SCREEN_POS"]="SCREEN_POS";
- //mode_replace_table[2]["SCREEN_TEXEL_SIZE"]="SCREEN_TEXEL_SIZE";
-
- out_vertex_name = "VERTEX";
-
- vname_discard = "DISCARD";
- vname_screen_uv = "SCREEN_UV";
- vname_diffuse_alpha = "DIFFUSE_ALPHA";
- vname_color_interp = "COLOR";
- vname_uv_interp = "UV";
- vname_uv2_interp = "UV2";
- vname_tangent_interp = "TANGENT";
- vname_binormal_interp = "BINORMAL";
- vname_var1_interp = "VAR1";
- vname_var2_interp = "VAR2";
- vname_vertex = "VERTEX";
- vname_position = "POSITION";
- vname_light = "LIGHT";
- vname_time = "TIME";
- vname_normalmap = "NORMALMAP";
- vname_normalmap_depth = "NORMALMAP_DEPTH";
- vname_normal = "NORMAL";
- vname_texpixel_size = "TEXTURE_PIXEL_SIZE";
- vname_world_vec = "WORLD_VERTEX";
- vname_shadow = "SHADOW";
-}
diff --git a/drivers/gles2/shader_compiler_gles2.h b/drivers/gles2/shader_compiler_gles2.h
deleted file mode 100644
index 02f9e58978..0000000000
--- a/drivers/gles2/shader_compiler_gles2.h
+++ /dev/null
@@ -1,134 +0,0 @@
-/*************************************************************************/
-/* shader_compiler_gles2.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef SHADER_COMPILER_GLES2_H
-#define SHADER_COMPILER_GLES2_H
-
-#include "servers/visual/shader_language.h"
-class ShaderCompilerGLES2 {
-
- class Uniform;
-
-public:
- struct Flags;
-
-private:
- ShaderLanguage::ProgramNode *program_node;
- String dump_node_code(ShaderLanguage::Node *p_node, int p_level, bool p_assign_left = false);
- Error compile_node(ShaderLanguage::ProgramNode *p_program);
- static Error create_glsl_120_code(void *p_str, ShaderLanguage::ProgramNode *p_program);
-
- bool uses_light;
- bool uses_texscreen;
- bool uses_texpos;
- bool uses_alpha;
- bool uses_discard;
- bool uses_time;
- bool uses_screen_uv;
- bool uses_normalmap;
- bool uses_normal;
- bool uses_texpixel_size;
- bool uses_worldvec;
- bool vertex_code_writes_vertex;
- bool vertex_code_writes_position;
- bool uses_shadow_color;
-
- bool sinh_used;
- bool tanh_used;
- bool cosh_used;
-
- bool custom_h;
-
- Flags *flags;
-
- StringName vname_discard;
- StringName vname_screen_uv;
- StringName vname_diffuse_alpha;
- StringName vname_color_interp;
- StringName vname_uv_interp;
- StringName vname_uv2_interp;
- StringName vname_tangent_interp;
- StringName vname_binormal_interp;
- StringName vname_var1_interp;
- StringName vname_var2_interp;
- StringName vname_vertex;
- StringName vname_position;
- StringName vname_light;
- StringName vname_time;
- StringName vname_normalmap;
- StringName vname_normalmap_depth;
- StringName vname_normal;
- StringName vname_texpixel_size;
- StringName vname_world_vec;
- StringName vname_shadow;
-
- Map<StringName, ShaderLanguage::Uniform> *uniforms;
-
- StringName out_vertex_name;
-
- String global_code;
- String code;
- ShaderLanguage::ShaderType type;
-
- String replace_string(const StringName &p_string);
-
- Map<StringName, StringName> mode_replace_table[9];
- Map<StringName, StringName> replace_table;
-
-public:
- struct Flags {
-
- bool uses_alpha;
- bool uses_texscreen;
- bool uses_texpos;
- bool uses_normalmap;
- bool vertex_code_writes_vertex;
- bool vertex_code_writes_position;
- bool uses_discard;
- bool uses_screen_uv;
- bool use_color_interp;
- bool use_uv_interp;
- bool use_uv2_interp;
- bool use_tangent_interp;
- bool use_var1_interp;
- bool use_var2_interp;
- bool uses_light;
- bool uses_time;
- bool uses_normal;
- bool uses_texpixel_size;
- bool uses_worldvec;
- bool uses_shadow_color;
- };
-
- Error compile(const String &p_code, ShaderLanguage::ShaderType p_type, String &r_code_line, String &r_globals_line, Flags &r_flags, Map<StringName, ShaderLanguage::Uniform> *r_uniforms = NULL);
-
- ShaderCompilerGLES2();
-};
-
-#endif // SHADER_COMPILERL_GL_H
diff --git a/drivers/gles2/shader_gles2.cpp b/drivers/gles2/shader_gles2.cpp
deleted file mode 100644
index 8764ae3895..0000000000
--- a/drivers/gles2/shader_gles2.cpp
+++ /dev/null
@@ -1,736 +0,0 @@
-/*************************************************************************/
-/* shader_gles2.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "shader_gles2.h"
-
-#ifdef GLES2_ENABLED
-#include "print_string.h"
-
-//#define DEBUG_OPENGL
-
-#ifdef DEBUG_OPENGL
-
-#define DEBUG_TEST_ERROR(m_section) \
- { \
- uint32_t err = glGetError(); \
- if (err) { \
- print_line("OpenGL Error #" + itos(err) + " at: " + m_section); \
- } \
- }
-#else
-
-#define DEBUG_TEST_ERROR(m_section)
-
-#endif
-
-ShaderGLES2 *ShaderGLES2::active = NULL;
-
-//#define DEBUG_SHADER
-
-#ifdef DEBUG_SHADER
-
-#define DEBUG_PRINT(m_text) print_line(m_text);
-
-#else
-
-#define DEBUG_PRINT(m_text)
-
-#endif
-
-void ShaderGLES2::bind_uniforms() {
-
- if (!uniforms_dirty) {
- return;
- };
-
- // upload default uniforms
- const Map<uint32_t, Variant>::Element *E = uniform_defaults.front();
-
- while (E) {
- int idx = E->key();
- int location = version->uniform_location[idx];
-
- if (location < 0) {
- E = E->next();
- continue;
- }
-
- const Variant &v = E->value();
- _set_uniform_variant(location, v);
- //print_line("uniform "+itos(location)+" value "+v+ " type "+Variant::get_type_name(v.get_type()));
- E = E->next();
- };
-
- const Map<uint32_t, CameraMatrix>::Element *C = uniform_cameras.front();
- while (C) {
-
- int location = version->uniform_location[C->key()];
- if (location < 0) {
- C = C->next();
- continue;
- }
-
- glUniformMatrix4fv(location, 1, false, &(C->get().matrix[0][0]));
- C = C->next();
- };
-
- uniforms_dirty = false;
-};
-
-GLint ShaderGLES2::get_uniform_location(int p_index) const {
-
- ERR_FAIL_COND_V(!version, -1);
-
- return version->uniform_location[p_index];
-};
-
-bool ShaderGLES2::bind() {
-
- if (active != this || !version || new_conditional_version.key != conditional_version.key) {
- conditional_version = new_conditional_version;
- version = get_current_version();
- } else {
-
- return false;
- }
-
- ERR_FAIL_COND_V(!version, false);
-
- glUseProgram(version->id);
-
- DEBUG_TEST_ERROR("Use Program");
-
- active = this;
- uniforms_dirty = true;
- /*
- * why on earth is this code here?
- for (int i=0;i<texunit_pair_count;i++) {
-
- glUniform1i(texunit_pairs[i].location, texunit_pairs[i].index);
- DEBUG_TEST_ERROR("Uniform 1 i");
- }
-
-*/
- return true;
-}
-
-void ShaderGLES2::unbind() {
-
- version = NULL;
- glUseProgram(0);
- uniforms_dirty = true;
- active = NULL;
-}
-
-static String _fix_error_code_line(const String &p_error, int p_code_start, int p_offset) {
-
- int last_find_pos = -1;
- // NVIDIA
- String error = p_error;
- while ((last_find_pos = p_error.find("(", last_find_pos + 1)) != -1) {
-
- int end_pos = last_find_pos + 1;
-
- while (true) {
-
- if (p_error[end_pos] >= '0' && p_error[end_pos] <= '9') {
-
- end_pos++;
- continue;
- } else if (p_error[end_pos] == ')') {
- break;
- } else {
-
- end_pos = -1;
- break;
- }
- }
-
- if (end_pos == -1)
- continue;
-
- String numstr = error.substr(last_find_pos + 1, (end_pos - last_find_pos) - 1);
- String begin = error.substr(0, last_find_pos + 1);
- String end = error.substr(end_pos, error.length());
- int num = numstr.to_int() + p_code_start - p_offset;
- error = begin + itos(num) + end;
- }
-
- // ATI
- last_find_pos = -1;
- while ((last_find_pos = p_error.find("ERROR: ", last_find_pos + 1)) != -1) {
-
- last_find_pos += 6;
- int end_pos = last_find_pos + 1;
-
- while (true) {
-
- if (p_error[end_pos] >= '0' && p_error[end_pos] <= '9') {
-
- end_pos++;
- continue;
- } else if (p_error[end_pos] == ':') {
- break;
- } else {
-
- end_pos = -1;
- break;
- }
- }
- continue;
- if (end_pos == -1)
- continue;
-
- String numstr = error.substr(last_find_pos + 1, (end_pos - last_find_pos) - 1);
- print_line("numstr: " + numstr);
- String begin = error.substr(0, last_find_pos + 1);
- String end = error.substr(end_pos, error.length());
- int num = numstr.to_int() + p_code_start - p_offset;
- error = begin + itos(num) + end;
- }
- return error;
-}
-
-ShaderGLES2::Version *ShaderGLES2::get_current_version() {
-
- Version *_v = version_map.getptr(conditional_version);
-
- if (_v) {
-
- if (conditional_version.code_version != 0) {
- CustomCode *cc = custom_code_map.getptr(conditional_version.code_version);
- ERR_FAIL_COND_V(!cc, _v);
- if (cc->version == _v->code_version)
- return _v;
- } else {
- return _v;
- }
- }
-
- if (!_v)
- version_map[conditional_version] = Version();
-
- Version &v = version_map[conditional_version];
-
- if (!_v) {
-
- v.uniform_location = memnew_arr(GLint, uniform_count);
-
- } else {
- if (v.ok) {
- //bye bye shaders
- glDeleteShader(v.vert_id);
- glDeleteShader(v.frag_id);
- glDeleteProgram(v.id);
- v.id = 0;
- }
- }
-
- v.ok = false;
- /* SETUP CONDITIONALS */
-
- Vector<const char *> strings;
-#ifdef GLEW_ENABLED
- strings.push_back("#version 120\n"); //ATI requieres this before anything
-#endif
- int define_line_ofs = 1;
-
- for (int j = 0; j < conditional_count; j++) {
-
- bool enable = ((1 << j) & conditional_version.version);
- strings.push_back(enable ? conditional_defines[j] : "");
- if (enable)
- define_line_ofs++;
-
- if (enable) {
- DEBUG_PRINT(conditional_defines[j]);
- }
- }
-
- //keep them around during the function
- CharString code_string;
- CharString code_string2;
- CharString code_globals;
-
- //print_line("code version? "+itos(conditional_version.code_version));
-
- CustomCode *cc = NULL;
-
- if (conditional_version.code_version > 0) {
- //do custom code related stuff
-
- ERR_FAIL_COND_V(!custom_code_map.has(conditional_version.code_version), NULL);
- cc = &custom_code_map[conditional_version.code_version];
- v.code_version = cc->version;
- define_line_ofs += 2;
- }
-
- /* CREATE PROGRAM */
-
- v.id = glCreateProgram();
-
- ERR_FAIL_COND_V(v.id == 0, NULL);
-
- /* VERTEX SHADER */
-
- if (cc) {
- for (int i = 0; i < cc->custom_defines.size(); i++) {
-
- strings.push_back(cc->custom_defines[i]);
- DEBUG_PRINT("CD #" + itos(i) + ": " + String(cc->custom_defines[i]));
- }
- }
-
- int strings_base_size = strings.size();
-#if 0
- if (cc) {
-
- String _code_string = "#define VERTEX_SHADER_CODE "+cc->vertex+"\n";
- String _code_globals = "#define VERTEX_SHADER_GLOBALS "+cc->vertex_globals+"\n";
-
- code_string=_code_string.ascii();
- code_globals=_code_globals.ascii();
- DEBUG_PRINT( code_globals.get_data() );
- DEBUG_PRINT( code_string.get_data() );
- strings.push_back(code_globals);
- strings.push_back(code_string);
- }
-#endif
-
- strings.push_back(vertex_code0.get_data());
- if (cc) {
- code_globals = cc->vertex_globals.ascii();
- strings.push_back(code_globals.get_data());
- }
- strings.push_back(vertex_code1.get_data());
-
- if (cc) {
- code_string = cc->vertex.ascii();
- strings.push_back(code_string.get_data());
- }
-
- strings.push_back(vertex_code2.get_data());
-#ifdef DEBUG_SHADER
-
- DEBUG_PRINT("\nVertex Code:\n\n" + String(code_string.get_data()));
- for (int i = 0; i < strings.size(); i++) {
-
- //print_line("vert strings "+itos(i)+":"+String(strings[i]));
- }
-#endif
-
- v.vert_id = glCreateShader(GL_VERTEX_SHADER);
- glShaderSource(v.vert_id, strings.size(), &strings[0], NULL);
- glCompileShader(v.vert_id);
-
- GLint status;
-
- glGetShaderiv(v.vert_id, GL_COMPILE_STATUS, &status);
- if (status == GL_FALSE) {
- // error compiling
- GLsizei iloglen;
- glGetShaderiv(v.vert_id, GL_INFO_LOG_LENGTH, &iloglen);
-
- if (iloglen < 0) {
-
- glDeleteShader(v.vert_id);
- glDeleteProgram(v.id);
- v.id = 0;
-
- ERR_PRINT("NO LOG, WTF");
- } else {
-
- if (iloglen == 0) {
-
- iloglen = 4096; //buggy driver (Adreno 220+....)
- }
-
- char *ilogmem = (char *)Memory::alloc_static(iloglen + 1);
- ilogmem[iloglen] = 0;
- glGetShaderInfoLog(v.vert_id, iloglen, &iloglen, ilogmem);
-
- String err_string = get_shader_name() + ": Vertex Program Compilation Failed:\n";
-
- err_string += ilogmem;
- err_string = _fix_error_code_line(err_string, vertex_code_start, define_line_ofs);
- ERR_PRINT(err_string.ascii().get_data());
- Memory::free_static(ilogmem);
- glDeleteShader(v.vert_id);
- glDeleteProgram(v.id);
- v.id = 0;
- }
-
- ERR_FAIL_V(NULL);
- }
-
- /* FRAGMENT SHADER */
-
- strings.resize(strings_base_size);
-#if 0
- if (cc) {
-
- String _code_string = "#define FRAGMENT_SHADER_CODE "+cc->fragment+"\n";
- String _code_globals = "#define FRAGMENT_SHADER_GLOBALS "+cc->fragment_globals+"\n";
-
- code_string=_code_string.ascii();
- code_globals=_code_globals.ascii();
- DEBUG_PRINT( code_globals.get_data() );
- DEBUG_PRINT( code_string.get_data() );
- strings.push_back(code_globals);
- strings.push_back(code_string);
- }
-#endif
-
- strings.push_back(fragment_code0.get_data());
- if (cc) {
- code_globals = cc->fragment_globals.ascii();
- strings.push_back(code_globals.get_data());
- }
- strings.push_back(fragment_code1.get_data());
-
- if (cc) {
- code_string = cc->fragment.ascii();
- strings.push_back(code_string.get_data());
- }
-
- strings.push_back(fragment_code2.get_data());
-
- if (cc) {
- code_string2 = cc->light.ascii();
- strings.push_back(code_string2.get_data());
- }
-
- strings.push_back(fragment_code3.get_data());
-
-#ifdef DEBUG_SHADER
- DEBUG_PRINT("\nFragment Code:\n\n" + String(code_string.get_data()));
- for (int i = 0; i < strings.size(); i++) {
-
- //print_line("frag strings "+itos(i)+":"+String(strings[i]));
- }
-#endif
-
- v.frag_id = glCreateShader(GL_FRAGMENT_SHADER);
- glShaderSource(v.frag_id, strings.size(), &strings[0], NULL);
- glCompileShader(v.frag_id);
-
- glGetShaderiv(v.frag_id, GL_COMPILE_STATUS, &status);
- if (status == GL_FALSE) {
- // error compiling
- GLsizei iloglen;
- glGetShaderiv(v.frag_id, GL_INFO_LOG_LENGTH, &iloglen);
-
- if (iloglen < 0) {
-
- glDeleteShader(v.frag_id);
- glDeleteShader(v.vert_id);
- glDeleteProgram(v.id);
- v.id = 0;
- ERR_PRINT("NO LOG, WTF");
- } else {
-
- if (iloglen == 0) {
-
- iloglen = 4096; //buggy driver (Adreno 220+....)
- }
-
- char *ilogmem = (char *)Memory::alloc_static(iloglen + 1);
- ilogmem[iloglen] = 0;
- glGetShaderInfoLog(v.frag_id, iloglen, &iloglen, ilogmem);
-
- String err_string = get_shader_name() + ": Fragment Program Compilation Failed:\n";
-
- err_string += ilogmem;
- err_string = _fix_error_code_line(err_string, fragment_code_start, define_line_ofs);
- ERR_PRINT(err_string.ascii().get_data());
- Memory::free_static(ilogmem);
- glDeleteShader(v.frag_id);
- glDeleteShader(v.vert_id);
- glDeleteProgram(v.id);
- v.id = 0;
- }
-
- ERR_FAIL_V(NULL);
- }
-
- glAttachShader(v.id, v.frag_id);
- glAttachShader(v.id, v.vert_id);
-
- // bind attributes before linking
- for (int i = 0; i < attribute_pair_count; i++) {
-
- glBindAttribLocation(v.id, attribute_pairs[i].index, attribute_pairs[i].name);
- }
-
- glLinkProgram(v.id);
-
- glGetProgramiv(v.id, GL_LINK_STATUS, &status);
-
- if (status == GL_FALSE) {
- // error linking
- GLsizei iloglen;
- glGetProgramiv(v.id, GL_INFO_LOG_LENGTH, &iloglen);
-
- if (iloglen < 0) {
-
- glDeleteShader(v.frag_id);
- glDeleteShader(v.vert_id);
- glDeleteProgram(v.id);
- v.id = 0;
- ERR_FAIL_COND_V(iloglen <= 0, NULL);
- }
-
- if (iloglen == 0) {
-
- iloglen = 4096; //buggy driver (Adreno 220+....)
- }
-
- char *ilogmem = (char *)Memory::alloc_static(iloglen + 1);
- ilogmem[iloglen] = 0;
- glGetProgramInfoLog(v.id, iloglen, &iloglen, ilogmem);
-
- String err_string = get_shader_name() + ": Program LINK FAILED:\n";
-
- err_string += ilogmem;
- err_string = _fix_error_code_line(err_string, fragment_code_start, define_line_ofs);
- ERR_PRINT(err_string.ascii().get_data());
- Memory::free_static(ilogmem);
- glDeleteShader(v.frag_id);
- glDeleteShader(v.vert_id);
- glDeleteProgram(v.id);
- v.id = 0;
-
- ERR_FAIL_V(NULL);
- }
-
- /* UNIFORMS */
-
- glUseProgram(v.id);
-
- //print_line("uniforms: ");
- for (int j = 0; j < uniform_count; j++) {
-
- v.uniform_location[j] = glGetUniformLocation(v.id, uniform_names[j]);
- //print_line("uniform "+String(uniform_names[j])+" location "+itos(v.uniform_location[j]));
- }
-
- // set texture uniforms
- for (int i = 0; i < texunit_pair_count; i++) {
-
- GLint loc = glGetUniformLocation(v.id, texunit_pairs[i].name);
- if (loc >= 0)
- glUniform1i(loc, texunit_pairs[i].index);
- }
-
- if (cc) {
-
- v.custom_uniform_locations.resize(cc->custom_uniforms.size());
- for (int i = 0; i < cc->custom_uniforms.size(); i++) {
-
- v.custom_uniform_locations[i] = glGetUniformLocation(v.id, String(cc->custom_uniforms[i]).ascii().get_data());
- }
- }
-
- glUseProgram(0);
-
- v.ok = true;
-
- return &v;
-}
-
-GLint ShaderGLES2::get_uniform_location(const String &p_name) const {
-
- ERR_FAIL_COND_V(!version, -1);
- return glGetUniformLocation(version->id, p_name.ascii().get_data());
-}
-
-void ShaderGLES2::setup(const char **p_conditional_defines, int p_conditional_count, const char **p_uniform_names, int p_uniform_count, const AttributePair *p_attribute_pairs, int p_attribute_count, const TexUnitPair *p_texunit_pairs, int p_texunit_pair_count, const char *p_vertex_code, const char *p_fragment_code, int p_vertex_code_start, int p_fragment_code_start) {
-
- ERR_FAIL_COND(version);
- conditional_version.key = 0;
- new_conditional_version.key = 0;
- uniform_count = p_uniform_count;
- conditional_count = p_conditional_count;
- conditional_defines = p_conditional_defines;
- uniform_names = p_uniform_names;
- vertex_code = p_vertex_code;
- fragment_code = p_fragment_code;
- texunit_pairs = p_texunit_pairs;
- texunit_pair_count = p_texunit_pair_count;
- vertex_code_start = p_vertex_code_start;
- fragment_code_start = p_fragment_code_start;
- attribute_pairs = p_attribute_pairs;
- attribute_pair_count = p_attribute_count;
-
- //split vertex and shader code (thank you, retarded shader compiler programmers from you know what company).
- {
- String globals_tag = "\nVERTEX_SHADER_GLOBALS";
- String code_tag = "\nVERTEX_SHADER_CODE";
- String code = vertex_code;
- int cpos = code.find(globals_tag);
- if (cpos == -1) {
- vertex_code0 = code.ascii();
- } else {
- vertex_code0 = code.substr(0, cpos).ascii();
- code = code.substr(cpos + globals_tag.length(), code.length());
-
- cpos = code.find(code_tag);
-
- if (cpos == -1) {
- vertex_code1 = code.ascii();
- } else {
-
- vertex_code1 = code.substr(0, cpos).ascii();
- vertex_code2 = code.substr(cpos + code_tag.length(), code.length()).ascii();
- }
- }
- }
-
- {
- String globals_tag = "\nFRAGMENT_SHADER_GLOBALS";
- String code_tag = "\nFRAGMENT_SHADER_CODE";
- String light_code_tag = "\nLIGHT_SHADER_CODE";
- String code = fragment_code;
- int cpos = code.find(globals_tag);
- if (cpos == -1) {
- fragment_code0 = code.ascii();
- } else {
- fragment_code0 = code.substr(0, cpos).ascii();
- code = code.substr(cpos + globals_tag.length(), code.length());
-
- cpos = code.find(code_tag);
-
- if (cpos == -1) {
- fragment_code1 = code.ascii();
- } else {
-
- fragment_code1 = code.substr(0, cpos).ascii();
- String code2 = code.substr(cpos + code_tag.length(), code.length());
-
- cpos = code2.find(light_code_tag);
- if (cpos == -1) {
- fragment_code2 = code2.ascii();
- } else {
-
- fragment_code2 = code2.substr(0, cpos).ascii();
- fragment_code3 = code2.substr(cpos + light_code_tag.length(), code2.length()).ascii();
- }
- }
- }
- }
-}
-
-void ShaderGLES2::finish() {
-
- const VersionKey *V = NULL;
- while ((V = version_map.next(V))) {
-
- Version &v = version_map[*V];
- glDeleteShader(v.vert_id);
- glDeleteShader(v.frag_id);
- glDeleteProgram(v.id);
- memdelete_arr(v.uniform_location);
- }
-}
-
-void ShaderGLES2::clear_caches() {
-
- const VersionKey *V = NULL;
- while ((V = version_map.next(V))) {
-
- Version &v = version_map[*V];
- glDeleteShader(v.vert_id);
- glDeleteShader(v.frag_id);
- glDeleteProgram(v.id);
- memdelete_arr(v.uniform_location);
- }
-
- version_map.clear();
-
- custom_code_map.clear();
- version = NULL;
- last_custom_code = 1;
- uniforms_dirty = true;
-}
-
-uint32_t ShaderGLES2::create_custom_shader() {
-
- custom_code_map[last_custom_code] = CustomCode();
- custom_code_map[last_custom_code].version = 1;
- return last_custom_code++;
-}
-
-void ShaderGLES2::set_custom_shader_code(uint32_t p_code_id, const String &p_vertex, const String &p_vertex_globals, const String &p_fragment, const String &p_light, const String &p_fragment_globals, const Vector<StringName> &p_uniforms, const Vector<const char *> &p_custom_defines) {
-
- ERR_FAIL_COND(!custom_code_map.has(p_code_id));
- CustomCode *cc = &custom_code_map[p_code_id];
-
- cc->vertex = p_vertex;
- cc->vertex_globals = p_vertex_globals;
- cc->fragment = p_fragment;
- cc->fragment_globals = p_fragment_globals;
- cc->light = p_light;
- cc->custom_uniforms = p_uniforms;
- cc->custom_defines = p_custom_defines;
- cc->version++;
-}
-
-void ShaderGLES2::set_custom_shader(uint32_t p_code_id) {
-
- new_conditional_version.code_version = p_code_id;
-}
-
-void ShaderGLES2::free_custom_shader(uint32_t p_code_id) {
-
- /* if (! custom_code_map.has( p_code_id )) {
- print_line("no code id "+itos(p_code_id));
- } else {
- print_line("freed code id "+itos(p_code_id));
-
- }*/
-
- ERR_FAIL_COND(!custom_code_map.has(p_code_id));
- if (conditional_version.code_version == p_code_id)
- conditional_version.code_version = 0; //bye
-
- custom_code_map.erase(p_code_id);
-}
-
-ShaderGLES2::ShaderGLES2() {
- version = NULL;
- last_custom_code = 1;
- uniforms_dirty = true;
-}
-
-ShaderGLES2::~ShaderGLES2() {
-
- finish();
-}
-
-#endif
diff --git a/drivers/gles2/shader_gles2.h b/drivers/gles2/shader_gles2.h
deleted file mode 100644
index 32b979807d..0000000000
--- a/drivers/gles2/shader_gles2.h
+++ /dev/null
@@ -1,359 +0,0 @@
-/*************************************************************************/
-/* shader_gles2.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef SHADER_GLES2_H
-#define SHADER_GLES2_H
-
-#ifdef GLES2_ENABLED
-
-#include "platform_config.h"
-#ifndef GLES2_INCLUDE_H
-#include <GLES2/gl2.h>
-#else
-#include GLES2_INCLUDE_H
-#endif
-
-#include "camera_matrix.h"
-#include "hash_map.h"
-#include "map.h"
-#include "variant.h"
-
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-
-class ShaderGLES2 {
-protected:
- struct Enum {
-
- uint64_t mask;
- uint64_t shift;
- const char *defines[16];
- };
-
- struct EnumValue {
-
- uint64_t set_mask;
- uint64_t clear_mask;
- };
-
- struct AttributePair {
-
- const char *name;
- int index;
- };
-
- struct UniformPair {
- const char *name;
- Variant::Type type_hint;
- };
-
- struct TexUnitPair {
-
- const char *name;
- int index;
- };
-
- bool uniforms_dirty;
-
-private:
- //@TODO Optimize to a fixed set of shader pools and use a LRU
- int uniform_count;
- int texunit_pair_count;
- int conditional_count;
- int vertex_code_start;
- int fragment_code_start;
- int attribute_pair_count;
-
- struct CustomCode {
-
- String vertex;
- String vertex_globals;
- String fragment;
- String fragment_globals;
- String light;
- uint32_t version;
- Vector<StringName> custom_uniforms;
- Vector<const char *> custom_defines;
- };
-
- struct Version {
-
- GLuint id;
- GLuint vert_id;
- GLuint frag_id;
- GLint *uniform_location;
- Vector<GLint> custom_uniform_locations;
- uint32_t code_version;
- bool ok;
- Version() {
- code_version = 0;
- ok = false;
- uniform_location = NULL;
- }
- };
-
- Version *version;
-
- union VersionKey {
-
- struct {
- uint32_t version;
- uint32_t code_version;
- };
- uint64_t key;
- bool operator==(const VersionKey &p_key) const { return key == p_key.key; }
- bool operator<(const VersionKey &p_key) const { return key < p_key.key; }
- };
-
- struct VersionKeyHash {
-
- static _FORCE_INLINE_ uint32_t hash(const VersionKey &p_key) { return HashMapHasherDefault::hash(p_key.key); };
- };
-
- //this should use a way more cachefriendly version..
- HashMap<VersionKey, Version, VersionKeyHash> version_map;
-
- HashMap<uint32_t, CustomCode> custom_code_map;
- uint32_t last_custom_code;
-
- VersionKey conditional_version;
- VersionKey new_conditional_version;
-
- virtual String get_shader_name() const = 0;
-
- const char **conditional_defines;
- const char **uniform_names;
- const AttributePair *attribute_pairs;
- const TexUnitPair *texunit_pairs;
- const char *vertex_code;
- const char *fragment_code;
- CharString fragment_code0;
- CharString fragment_code1;
- CharString fragment_code2;
- CharString fragment_code3;
-
- CharString vertex_code0;
- CharString vertex_code1;
- CharString vertex_code2;
-
- Version *get_current_version();
-
- static ShaderGLES2 *active;
-
- _FORCE_INLINE_ void _set_uniform_variant(GLint p_uniform, const Variant &p_value) {
-
- if (p_uniform < 0)
- return; // do none
- switch (p_value.get_type()) {
-
- case Variant::BOOL:
- case Variant::INT: /* {
-
- int val=p_value;
- glUniform1i( p_uniform, val );
- } break; */
- case Variant::REAL: {
-
- real_t val = p_value;
- glUniform1f(p_uniform, val);
- } break;
- case Variant::COLOR: {
-
- Color val = p_value;
- glUniform4f(p_uniform, val.r, val.g, val.b, val.a);
- } break;
- case Variant::VECTOR2: {
-
- Vector2 val = p_value;
- glUniform2f(p_uniform, val.x, val.y);
- } break;
- case Variant::VECTOR3: {
-
- Vector3 val = p_value;
- glUniform3f(p_uniform, val.x, val.y, val.z);
- } break;
- case Variant::PLANE: {
-
- Plane val = p_value;
- glUniform4f(p_uniform, val.normal.x, val.normal.y, val.normal.z, val.d);
- } break;
- case Variant::QUAT: {
-
- Quat val = p_value;
- glUniform4f(p_uniform, val.x, val.y, val.z, val.w);
- } break;
-
- case Variant::MATRIX32: {
-
- Transform2D tr = p_value;
- GLfloat matrix[16] = { /* build a 16x16 matrix */
- tr.elements[0][0],
- tr.elements[0][1],
- 0,
- 0,
- tr.elements[1][0],
- tr.elements[1][1],
- 0,
- 0,
- 0,
- 0,
- 1,
- 0,
- tr.elements[2][0],
- tr.elements[2][1],
- 0,
- 1
- };
-
- glUniformMatrix4fv(p_uniform, 1, false, matrix);
-
- } break;
- case Variant::MATRIX3:
- case Variant::TRANSFORM: {
-
- Transform tr = p_value;
- GLfloat matrix[16] = { /* build a 16x16 matrix */
- tr.basis.elements[0][0],
- tr.basis.elements[1][0],
- tr.basis.elements[2][0],
- 0,
- tr.basis.elements[0][1],
- tr.basis.elements[1][1],
- tr.basis.elements[2][1],
- 0,
- tr.basis.elements[0][2],
- tr.basis.elements[1][2],
- tr.basis.elements[2][2],
- 0,
- tr.origin.x,
- tr.origin.y,
- tr.origin.z,
- 1
- };
-
- glUniformMatrix4fv(p_uniform, 1, false, matrix);
- } break;
- default: { ERR_FAIL(); } // do nothing
- }
- }
-
- Map<uint32_t, Variant> uniform_defaults;
- Map<uint32_t, CameraMatrix> uniform_cameras;
-
-protected:
- _FORCE_INLINE_ int _get_uniform(int p_which) const;
- _FORCE_INLINE_ void _set_conditional(int p_which, bool p_value);
-
- void setup(const char **p_conditional_defines, int p_conditional_count, const char **p_uniform_names, int p_uniform_count, const AttributePair *p_attribute_pairs, int p_attribute_count, const TexUnitPair *p_texunit_pairs, int p_texunit_pair_count, const char *p_vertex_code, const char *p_fragment_code, int p_vertex_code_start, int p_fragment_code_start);
-
- ShaderGLES2();
-
-public:
- enum {
- CUSTOM_SHADER_DISABLED = 0
- };
-
- GLint get_uniform_location(const String &p_name) const;
- GLint get_uniform_location(int p_index) const;
-
- static _FORCE_INLINE_ ShaderGLES2 *get_active() { return active; };
- bool bind();
- void unbind();
- void bind_uniforms();
-
- inline GLuint get_program() const { return version ? version->id : 0; }
-
- void clear_caches();
-
- uint32_t create_custom_shader();
- void set_custom_shader_code(uint32_t p_code_id, const String &p_vertex, const String &p_vertex_globals, const String &p_fragment, const String &p_light, const String &p_fragment_globals, const Vector<StringName> &p_uniforms, const Vector<const char *> &p_custom_defines);
- void set_custom_shader(uint32_t p_code_id);
- void free_custom_shader(uint32_t p_code_id);
-
- void set_uniform_default(int p_idx, const Variant &p_value) {
-
- if (p_value.get_type() == Variant::NIL) {
-
- uniform_defaults.erase(p_idx);
- } else {
-
- uniform_defaults[p_idx] = p_value;
- }
- uniforms_dirty = true;
- };
-
- uint32_t get_version() const { return new_conditional_version.version; }
-
- void set_uniform_camera(int p_idx, const CameraMatrix &p_mat) {
-
- uniform_cameras[p_idx] = p_mat;
- uniforms_dirty = true;
- };
-
- _FORCE_INLINE_ void set_custom_uniform(int p_idx, const Variant &p_value) {
-
- ERR_FAIL_COND(!version);
- ERR_FAIL_INDEX(p_idx, version->custom_uniform_locations.size());
- _set_uniform_variant(version->custom_uniform_locations[p_idx], p_value);
- }
-
- _FORCE_INLINE_ GLint get_custom_uniform_location(int p_idx) {
-
- ERR_FAIL_COND_V(!version, -1);
- ERR_FAIL_INDEX_V(p_idx, version->custom_uniform_locations.size(), -1);
- return version->custom_uniform_locations[p_idx];
- }
-
- virtual void init() = 0;
- void finish();
-
- virtual ~ShaderGLES2();
-};
-
-// called a lot, made inline
-
-int ShaderGLES2::_get_uniform(int p_which) const {
-
- ERR_FAIL_INDEX_V(p_which, uniform_count, -1);
- ERR_FAIL_COND_V(!version, -1);
- return version->uniform_location[p_which];
-}
-
-void ShaderGLES2::_set_conditional(int p_which, bool p_value) {
-
- ERR_FAIL_INDEX(p_which, conditional_count);
- if (p_value)
- new_conditional_version.version |= (1 << p_which);
- else
- new_conditional_version.version &= ~(1 << p_which);
-}
-
-#endif
-#endif
diff --git a/drivers/gles2/shaders/SCsub b/drivers/gles2/shaders/SCsub
deleted file mode 100644
index bf4ec9485d..0000000000
--- a/drivers/gles2/shaders/SCsub
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env python
-
-Import('env')
-
-if env['BUILDERS'].has_key('GLSL120GLES'):
- env.GLSL120GLES('material.glsl')
- env.GLSL120GLES('canvas.glsl')
- env.GLSL120GLES('canvas_shadow.glsl')
- env.GLSL120GLES('blur.glsl')
- env.GLSL120GLES('copy.glsl')
-
-Export('env')
diff --git a/drivers/gles2/shaders/blur.glsl b/drivers/gles2/shaders/blur.glsl
deleted file mode 100644
index b68a55aee7..0000000000
--- a/drivers/gles2/shaders/blur.glsl
+++ /dev/null
@@ -1,51 +0,0 @@
-[vertex]
-
-#ifdef USE_GLES_OVER_GL
-#define mediump
-#define highp
-#else
-precision mediump float;
-precision mediump int;
-#endif
-
-attribute highp vec4 vertex_attrib; // attrib:0
-attribute vec2 uv_in; // attrib:4
-
-varying vec2 uv_out;
-
-
-
-void main() {
-
- color_interp = color_attrib;
- uv_interp = uv_attrib;
- vec4 outvec = vec4(vertex, 1.0);
- outvec = extra_matrix * outvec;
- outvec = modelview_matrix * outvec;
- gl_Position = projection_matrix * outvec;
-}
-
-[fragment]
-
-#ifdef USE_GLES_OVER_GL
-#define mediump
-#define highp
-#else
-precision mediump float;
-precision mediump int;
-#endif
-
- // texunit:0
-uniform sampler2D texture;
-varying vec2 uv_out;
-
-
-void main() {
-
- vec4 color = color_interp;
-
- color *= texture2D( texture, uv_interp );
-
- gl_FragColor = color;
-}
-
diff --git a/drivers/gles2/shaders/canvas.glsl b/drivers/gles2/shaders/canvas.glsl
deleted file mode 100644
index 4b8c553b60..0000000000
--- a/drivers/gles2/shaders/canvas.glsl
+++ /dev/null
@@ -1,391 +0,0 @@
-[vertex]
-
-#ifdef USE_GLES_OVER_GL
-#define mediump
-#define highp
-#else
-precision mediump float;
-precision mediump int;
-#endif
-
-uniform highp mat4 projection_matrix;
-uniform highp mat4 modelview_matrix;
-uniform highp mat4 extra_matrix;
-attribute highp vec3 vertex; // attrib:0
-attribute vec4 color_attrib; // attrib:3
-attribute highp vec2 uv_attrib; // attrib:4
-
-varying vec2 uv_interp;
-varying vec4 color_interp;
-
-#if defined(USE_TIME)
-uniform float time;
-#endif
-
-
-#ifdef USE_LIGHTING
-
-uniform highp mat4 light_matrix;
-uniform highp mat4 light_local_matrix;
-uniform vec2 light_pos;
-varying vec4 light_uv_interp;
-
-varying vec4 local_rot;
-uniform vec2 normal_flip;
-
-#ifdef USE_SHADOWS
-varying highp vec2 pos;
-#endif
-
-#endif
-
-#if defined(ENABLE_VAR1_INTERP)
-varying vec4 var1_interp;
-#endif
-
-#if defined(ENABLE_VAR2_INTERP)
-varying vec4 var2_interp;
-#endif
-
-//uniform bool snap_pixels;
-
-VERTEX_SHADER_GLOBALS
-
-void main() {
-
- color_interp = color_attrib;
- uv_interp = uv_attrib;
- highp vec4 outvec = vec4(vertex, 1.0);
-{
- vec2 src_vtx=outvec.xy;
-VERTEX_SHADER_CODE
-
-}
-#if !defined(USE_WORLD_VEC)
- outvec = extra_matrix * outvec;
- outvec = modelview_matrix * outvec;
-#endif
-
-
-
-#ifdef USE_PIXEL_SNAP
-
- outvec.xy=floor(outvec.xy+0.5);
-#endif
-
-
- gl_Position = projection_matrix * outvec;
-
-#ifdef USE_LIGHTING
-
- light_uv_interp.xy = (light_matrix * outvec).xy;
- light_uv_interp.zw =(light_local_matrix * outvec).xy;
-#ifdef USE_SHADOWS
- pos=outvec.xy;
-#endif
-
- local_rot.xy=normalize( (modelview_matrix * ( extra_matrix * vec4(1.0,0.0,0.0,0.0) )).xy )*normal_flip.x;
- local_rot.zw=normalize( (modelview_matrix * ( extra_matrix * vec4(0.0,1.0,0.0,0.0) )).xy )*normal_flip.y;
-
-#endif
-
-}
-
-[fragment]
-
-#ifdef USE_GLES_OVER_GL
-#define mediump
-#define highp
-#else
-precision mediump float;
-precision mediump int;
-#endif
-
-
-uniform sampler2D texture; // texunit:0
-uniform sampler2D normal_texture; // texunit:0
-
-varying vec2 uv_interp;
-varying vec4 color_interp;
-
-#ifdef MOMO
-
-#endif
-
-#if defined(ENABLE_SCREEN_UV)
-
-uniform vec2 screen_uv_mult;
-
-#endif
-
-#if defined(ENABLE_TEXSCREEN)
-
-uniform vec2 texscreen_screen_mult;
-uniform vec4 texscreen_screen_clamp;
-uniform sampler2D texscreen_tex;
-
-#endif
-
-
-#if defined(ENABLE_VAR1_INTERP)
-varying vec4 var1_interp;
-#endif
-
-#if defined(ENABLE_VAR2_INTERP)
-varying vec4 var2_interp;
-#endif
-
-#if defined(USE_TIME)
-uniform float time;
-#endif
-
-#ifdef USE_MODULATE
-
-uniform vec4 modulate;
-
-#endif
-
-#ifdef USE_LIGHTING
-
-uniform sampler2D light_texture;
-uniform vec4 light_color;
-uniform vec4 light_shadow_color;
-uniform float light_height;
-varying vec4 light_uv_interp;
-uniform float light_outside_alpha;
-
-varying vec4 local_rot;
-
-#ifdef USE_SHADOWS
-
-uniform highp sampler2D shadow_texture;
-uniform float shadow_attenuation;
-
-uniform highp mat4 shadow_matrix;
-varying highp vec2 pos;
-uniform float shadowpixel_size;
-
-#ifdef SHADOW_ESM
-uniform float shadow_esm_multiplier;
-#endif
-
-#endif
-
-#endif
-
-#if defined(USE_TEXPIXEL_SIZE)
-uniform vec2 texpixel_size;
-#endif
-
-
-FRAGMENT_SHADER_GLOBALS
-
-
-void main() {
-
- vec4 color = color_interp;
-
-#ifdef USE_DISTANCE_FIELD
- const float smoothing = 1.0/32.0;
- float distance = textureLod(texture, uv_interp,0.0).a;
- color.a = smoothstep(0.5 - smoothing, 0.5 + smoothing, distance) * color.a;
-#else
- color *= texture2D( texture, uv_interp );
-
-#endif
-
- vec3 normal;
- normal.xy = textureLod( normal_texture, uv_interp, 0.0 ).xy * 2.0 - 1.0;
- normal.z = sqrt(1.0-dot(normal.xy,normal.xy));
-
-#if defined(ENABLE_SCREEN_UV)
- vec2 screen_uv = gl_FragCoord.xy*screen_uv_mult;
-#endif
-
-
-{
-#if defined(USE_NORMALMAP)
- vec3 normal_map=vec3(0.0,0.0,1.0);
- float normal_depth=1.0;
-#endif
-
-FRAGMENT_SHADER_CODE
-
-#if defined(USE_NORMALMAP)
- normal = mix(vec3(0.0,0.0,1.0), normal_map * vec3(2.0,-2.0,1.0) - vec3( 1.0, -1.0, 0.0 ), normal_depth );
-#endif
-
-}
-#ifdef DEBUG_ENCODED_32
- highp float enc32 = dot( color,highp vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0,1) );
- color = vec4(vec3(enc32),1.0);
-#endif
-
-#ifdef USE_MODULATE
-
- color*=modulate;
-#endif
-
-
-#ifdef USE_LIGHTING
-
- vec2 light_vec = light_uv_interp.zw;; //for shadow and normal mapping
-
- normal.xy = mat2(local_rot.xy,local_rot.zw) * normal.xy;
-
- float att=1.0;
-
- vec2 light_uv = light_uv_interp.xy;
- vec4 light = texture2D(light_texture,light_uv) * light_color;
-#if defined(USE_OUTPUT_SHADOW_COLOR)
- vec4 shadow_color=vec4(0.0,0.0,0.0,0.0);
-#endif
-
- if (any(lessThan(light_uv_interp.xy,vec2(0.0,0.0))) || any(greaterThanEqual(light_uv_interp.xy,vec2(1.0,1.0)))) {
- color.a*=light_outside_alpha; //invisible
-
- } else {
-
-#if defined(USE_LIGHT_SHADER_CODE)
-//light is written by the light shader
- {
- vec4 light_out=light*color;
-LIGHT_SHADER_CODE
- color=light_out;
- }
-
-#else
-
- vec3 light_normal = normalize(vec3(light_vec,-light_height));
- light*=max(dot(-light_normal,normal),0.0);
-
- color*=light;
-/*
-#ifdef USE_NORMAL
- color.xy=local_rot.xy;//normal.xy;
- color.zw=vec2(0.0,1.0);
-#endif
-*/
-
-//light shader code
-#endif
-
-
-#ifdef USE_SHADOWS
-
- float angle_to_light = -atan(light_vec.x,light_vec.y);
- float PI = 3.14159265358979323846264;
- /*int i = int(mod(floor((angle_to_light+7.0*PI/6.0)/(4.0*PI/6.0))+1.0, 3.0)); // +1 pq os indices estao em ordem 2,0,1 nos arrays
- float ang*/
-
- float su,sz;
-
- float abs_angle = abs(angle_to_light);
- vec2 point;
- float sh;
- if (abs_angle<45.0*PI/180.0) {
- point = light_vec;
- sh=0.0+(1.0/8.0);
- } else if (abs_angle>135.0*PI/180.0) {
- point = -light_vec;
- sh = 0.5+(1.0/8.0);
- } else if (angle_to_light>0.0) {
-
- point = vec2(light_vec.y,-light_vec.x);
- sh = 0.25+(1.0/8.0);
- } else {
-
- point = vec2(-light_vec.y,light_vec.x);
- sh = 0.75+(1.0/8.0);
-
- }
-
-
- highp vec4 s = shadow_matrix * vec4(point,0.0,1.0);
- s.xyz/=s.w;
- su=s.x*0.5+0.5;
- sz=s.z*0.5+0.5;
-
- highp float shadow_attenuation=0.0;
-
-#ifdef USE_DEPTH_SHADOWS
-
-#define SHADOW_DEPTH(m_tex,m_uv) (texture2D((m_tex),(m_uv)).r)
-
-#else
-
-//#define SHADOW_DEPTH(m_tex,m_uv) dot(texture2D((m_tex),(m_uv)),highp vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0,1) )
-#define SHADOW_DEPTH(m_tex,m_uv) dot(texture2D((m_tex),(m_uv)),vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0,1) )
-
-#endif
-
-
-
-#ifdef SHADOW_PCF5
-
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su,sh))<sz?0.0:1.0;
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su+shadowpixel_size,sh))<sz?0.0:1.0;
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su+shadowpixel_size*2.0,sh))<sz?0.0:1.0;
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su-shadowpixel_size,sh))<sz?0.0:1.0;
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su-shadowpixel_size*2.0,sh))<sz?0.0:1.0;
- shadow_attenuation/=5.0;
-
-#endif
-
-#ifdef SHADOW_PCF13
-
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su,sh))<sz?0.0:1.0;
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su+shadowpixel_size,sh))<sz?0.0:1.0;
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su+shadowpixel_size*2.0,sh))<sz?0.0:1.0;
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su+shadowpixel_size*3.0,sh))<sz?0.0:1.0;
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su+shadowpixel_size*4.0,sh))<sz?0.0:1.0;
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su+shadowpixel_size*5.0,sh))<sz?0.0:1.0;
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su+shadowpixel_size*6.0,sh))<sz?0.0:1.0;
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su-shadowpixel_size*2.0,sh))<sz?0.0:1.0;
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su-shadowpixel_size*3.0,sh))<sz?0.0:1.0;
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su-shadowpixel_size*4.0,sh))<sz?0.0:1.0;
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su-shadowpixel_size*5.0,sh))<sz?0.0:1.0;
- shadow_attenuation += SHADOW_DEPTH(shadow_texture,vec2(su-shadowpixel_size*6.0,sh))<sz?0.0:1.0;
- shadow_attenuation/=13.0;
-
-#endif
-
-#ifdef SHADOW_ESM
-
-
- {
- float unnormalized = su/shadowpixel_size;
- float fractional = fract(unnormalized);
- unnormalized = floor(unnormalized);
- float zc = SHADOW_DEPTH(shadow_texture,vec2((unnormalized-0.5)*shadowpixel_size,sh));
- float zn = SHADOW_DEPTH(shadow_texture,vec2((unnormalized+0.5)*shadowpixel_size,sh));
- float z = mix(zc,zn,fractional);
- shadow_attenuation=clamp(exp(shadow_esm_multiplier* ( z - sz )),0.0,1.0);
- }
-
-#endif
-
-#if !defined(SHADOW_PCF5) && !defined(SHADOW_PCF13) && !defined(SHADOW_ESM)
-
- shadow_attenuation = SHADOW_DEPTH(shadow_texture,vec2(su+shadowpixel_size,sh))<sz?0.0:1.0;
-
-#endif
-
-#if defined(USE_OUTPUT_SHADOW_COLOR)
- color=mix(shadow_color,color,shadow_attenuation);
-#else
- //color*=shadow_attenuation;
- color=mix(light_shadow_color,color,shadow_attenuation);
-#endif
-//use shadows
-#endif
- }
-
-//use lighting
-#endif
- //color.rgb*=color.a;
- gl_FragColor = color;
-
-
-}
-
diff --git a/drivers/gles2/shaders/canvas_shadow.glsl b/drivers/gles2/shaders/canvas_shadow.glsl
deleted file mode 100644
index 40cf321dce..0000000000
--- a/drivers/gles2/shaders/canvas_shadow.glsl
+++ /dev/null
@@ -1,62 +0,0 @@
-[vertex]
-
-#ifdef USE_GLES_OVER_GL
-#define mediump
-#define highp
-#else
-precision mediump float;
-precision mediump int;
-#endif
-
-uniform highp mat4 projection_matrix;
-uniform highp mat4 light_matrix;
-uniform highp mat4 world_matrix;
-
-attribute highp vec3 vertex; // attrib:0
-
-#ifndef USE_DEPTH_SHADOWS
-
-varying vec4 position_interp;
-
-#endif
-
-
-void main() {
-
- gl_Position = projection_matrix * (light_matrix * (world_matrix * vec4(vertex,1.0)));
-
-#ifndef USE_DEPTH_SHADOWS
- position_interp = gl_Position;
-#endif
-
-}
-
-[fragment]
-
-#ifdef USE_GLES_OVER_GL
-#define mediump
-#define highp
-#else
-precision mediump float;
-precision mediump int;
-#endif
-
-#ifndef USE_DEPTH_SHADOWS
-
-varying vec4 position_interp;
-
-#endif
-
-void main() {
-
-#ifdef USE_DEPTH_SHADOWS
-
-#else
- highp float depth = ((position_interp.z / position_interp.w) + 1.0) * 0.5 + 0.0;//bias;
- highp vec4 comp = fract(depth * vec4(256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0));
- comp -= comp.xxyz * vec4(0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0);
- gl_FragColor = comp;
-#endif
-
-}
-
diff --git a/drivers/gles2/shaders/copy.glsl b/drivers/gles2/shaders/copy.glsl
deleted file mode 100644
index 23680ffe91..0000000000
--- a/drivers/gles2/shaders/copy.glsl
+++ /dev/null
@@ -1,557 +0,0 @@
-[vertex]
-
-#ifdef USE_GLES_OVER_GL
-#define mediump
-#define highp
-#else
-precision mediump float;
-precision mediump int;
-#endif
-
-attribute highp vec4 vertex_attrib; // attrib:0
-#ifdef USE_CUBEMAP
-attribute vec3 cube_in; // attrib:4
-#else
-attribute vec2 uv_in; // attrib:4
-#endif
-attribute vec2 uv2_in; // attrib:5
-
-
-#ifdef USE_CUBEMAP
-varying vec3 cube_interp;
-#else
-varying vec2 uv_interp;
-#endif
-
-varying vec2 uv2_interp;
-
-void main() {
-
-#ifdef USE_CUBEMAP
- cube_interp = cube_in;
-#else
- uv_interp = uv_in;
-#endif
- uv2_interp = uv2_in;
- gl_Position = vertex_attrib;
-}
-
-[fragment]
-
-#ifdef USE_GLES_OVER_GL
-#define mediump
-#define highp
-#else
-precision mediump float;
-precision mediump int;
-#endif
-
-
-
-float sRGB_gamma_correct(float c){
- float a = 0.055;
- if(c < 0.0031308)
- return 12.92*c;
- else
- return (1.0+a)*pow(c, 1.0/2.4) - a;
-}
-
-#define LUM_RANGE 4.0
-
-
-#ifdef USE_ARRAY
-uniform sampler2DArray source;
-#elif defined(USE_CUBEMAP)
-varying vec3 cube_interp;
-uniform samplerCube source_cube;
-#else
-varying vec2 uv_interp;
-#ifdef HIGHP_SOURCE
-uniform highp sampler2D source;
-#else
-uniform sampler2D source;
-#endif
-#endif
-varying vec2 uv2_interp;
-
-
-#ifdef USE_DEPTH
-uniform highp sampler2D source_depth; //texunit:1
-#endif
-
-#ifdef USE_GLOW
-
-uniform sampler2D glow_source;
-
-#endif
-
-
-#if defined(USE_HDR) && defined(USE_GLOW_COPY)
-uniform highp float hdr_glow_threshold;
-uniform highp float hdr_glow_scale;
-#endif
-
-#ifdef USE_HDR
-
-uniform sampler2D hdr_source;
-uniform highp float tonemap_exposure;
-uniform highp float tonemap_white;
-#endif
-
-#ifdef USE_BCS
-
-uniform vec3 bcs;
-
-#endif
-
-#ifdef USE_GLOW_COPY
-
-uniform float bloom;
-uniform float bloom_threshold;
-
-#endif
-
-#if defined(SHADOW_BLUR_V_PASS) || defined(SHADOW_BLUR_H_PASS) || defined(BLUR_V_PASS) || defined(BLUR_H_PASS) || defined(USE_HDR_REDUCE)
-
-uniform vec2 pixel_size;
-uniform float pixel_scale;
-uniform float blur_magnitude;
-
-#ifdef USE_HDR_STORE
-
-uniform highp float hdr_time_delta;
-uniform highp float hdr_exp_adj_speed;
-uniform highp float min_luminance;
-uniform highp float max_luminance;
-uniform sampler2D source_vd_lum;
-
-#endif
-
-//endif
-#elif defined(USE_FXAA)
-
-uniform vec2 pixel_size;
-
-#endif
-
-#ifdef USE_ENERGY
-
-uniform highp float energy;
-
-#endif
-
-#ifdef USE_CUSTOM_ALPHA
-uniform float custom_alpha;
-#endif
-
-
-void main() {
-
- //vec4 color = color_interp;
-
-
-#ifdef USE_ARRAY
- highp vec4 color = textureLod( source, vec3(uv_interp,0.0),0.0 );
-#elif defined(USE_CUBEMAP)
- highp vec4 color = textureCube( source_cube, normalize(cube_interp) );
-
-#else
- highp vec4 color = texture2D( source, uv_interp );
-#endif
-
-
-
-#endif
-
-#ifdef USE_FXAA
-
-#define FXAA_REDUCE_MIN (1.0/ 128.0)
-#define FXAA_REDUCE_MUL (1.0 / 8.0)
-#define FXAA_SPAN_MAX 8.0
-
- {
- vec3 rgbNW = texture2D(source, uv_interp + vec2(-1.0, -1.0) * pixel_size).xyz;
- vec3 rgbNE = texture2D(source, uv_interp + vec2(1.0, -1.0) * pixel_size).xyz;
- vec3 rgbSW = texture2D(source, uv_interp + vec2(-1.0, 1.0) * pixel_size).xyz;
- vec3 rgbSE = texture2D(source, uv_interp + vec2(1.0, 1.0) * pixel_size).xyz;
- vec3 rgbM = color.rgb;
- vec3 luma = vec3(0.299, 0.587, 0.114);
- float lumaNW = dot(rgbNW, luma);
- float lumaNE = dot(rgbNE, luma);
- float lumaSW = dot(rgbSW, luma);
- float lumaSE = dot(rgbSE, luma);
- float lumaM = dot(rgbM, luma);
- float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));
- float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));
-
- vec2 dir;
- dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));
- dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));
-
- float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *
- (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);
-
- float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);
- dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),
- max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),
- dir * rcpDirMin)) * pixel_size;
-
- vec3 rgbA = 0.5 * (
- texture2D(source, uv_interp + dir * (1.0 / 3.0 - 0.5)).xyz +
- texture2D(source, uv_interp + dir * (2.0 / 3.0 - 0.5)).xyz);
- vec3 rgbB = rgbA * 0.5 + 0.25 * (
- texture2D(source, uv_interp + dir * -0.5).xyz +
- texture2D(source, uv_interp + dir * 0.5).xyz);
-
- float lumaB = dot(rgbB, luma);
- if ((lumaB < lumaMin) || (lumaB > lumaMax))
- color.rgb = rgbA;
- else
- color.rgb = rgbB;
- }
-
-#endif
- //color.rg=uv_interp;
-
-#ifdef USE_BCS
-
- color.rgb = mix(vec3(0.0),color.rgb,bcs.x);
- color.rgb = mix(vec3(0.5),color.rgb,bcs.y);
- color.rgb = mix(vec3(dot(vec3(1.0),color.rgb)*0.33333),color.rgb,bcs.z);
-
-#endif
-
-#ifdef BLUR_V_PASS
-
- color+=texture2D(source,uv_interp+vec2(0.0,pixel_size.y*-3.0)*pixel_scale);
- color+=texture2D(source,uv_interp+vec2(0.0,pixel_size.y*-2.0)*pixel_scale);
- color+=texture2D(source,uv_interp+vec2(0.0,pixel_size.y*-1.0)*pixel_scale);
- color+=texture2D(source,uv_interp+vec2(0.0,pixel_size.y*1.0)*pixel_scale);
- color+=texture2D(source,uv_interp+vec2(0.0,pixel_size.y*2.0)*pixel_scale);
- color+=texture2D(source,uv_interp+vec2(0.0,pixel_size.y*3.0)*pixel_scale);
-
- color*=(1.0/7.0)*blur_magnitude;
-
-#endif
-
-#ifdef BLUR_H_PASS
-
-
- color+=texture2D(source,uv_interp+vec2(pixel_size.x*-3.0,0.0)*pixel_scale);
- color+=texture2D(source,uv_interp+vec2(pixel_size.x*-2.0,0.0)*pixel_scale);
- color+=texture2D(source,uv_interp+vec2(pixel_size.x*-1.0,0.0)*pixel_scale);
- color+=texture2D(source,uv_interp+vec2(pixel_size.x*1.0,0.0)*pixel_scale);
- color+=texture2D(source,uv_interp+vec2(pixel_size.x*2.0,0.0)*pixel_scale);
- color+=texture2D(source,uv_interp+vec2(pixel_size.x*3.0,0.0)*pixel_scale);
-
- color*=(1.0/7.0)*blur_magnitude;
-
-#endif
-
-#ifdef SHADOW_BLUR_V_PASS
-
-#ifdef USE_RGBA_DEPTH
-
-#define VEC42DEPTH(m_vec4) dot(m_vec4,vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0,1))
-
- highp float depth = VEC42DEPTH(color)*0.383;
- depth+=VEC42DEPTH(texture2D(source,uv_interp+vec2(0.0,pixel_size.y*-3.0)*pixel_scale))*0.006;
- depth+=VEC42DEPTH(texture2D(source,uv_interp+vec2(0.0,pixel_size.y*-2.0)*pixel_scale))*0.061;
- depth+=VEC42DEPTH(texture2D(source,uv_interp+vec2(0.0,pixel_size.y*-1.0)*pixel_scale))*0.242;
- depth+=VEC42DEPTH(texture2D(source,uv_interp+vec2(0.0,pixel_size.y*1.0)*pixel_scale))*0.242;
- depth+=VEC42DEPTH(texture2D(source,uv_interp+vec2(0.0,pixel_size.y*2.0)*pixel_scale))*0.061;
- depth+=VEC42DEPTH(texture2D(source,uv_interp+vec2(0.0,pixel_size.y*3.0)*pixel_scale))*0.006;
- highp vec4 comp = fract(depth * vec4(256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0));
- comp -= comp.xxyz * vec4(0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0);
- color=comp;
-
-#else
-
- highp float depth = color.r*0.383;
- depth+=texture2D(source,uv_interp+vec2(0.0,pixel_size.y*-3.0)*pixel_scale).r*0.006;
- depth+=texture2D(source,uv_interp+vec2(0.0,pixel_size.y*-2.0)*pixel_scale).r*0.061;
- depth+=texture2D(source,uv_interp+vec2(0.0,pixel_size.y*-1.0)*pixel_scale).r*0.242;
- depth+=texture2D(source,uv_interp+vec2(0.0,pixel_size.y*1.0)*pixel_scale).r*0.242;
- depth+=texture2D(source,uv_interp+vec2(0.0,pixel_size.y*2.0)*pixel_scale).r*0.061;
- depth+=texture2D(source,uv_interp+vec2(0.0,pixel_size.y*3.0)*pixel_scale).r*0.006;
-
-#ifdef USE_GLES_OVER_GL
- gl_FragDepth = depth;
-
-#else
- gl_FragDepthEXT = depth;
-#endif
-
- return;
-#endif
-
-#endif
-
-#ifdef SHADOW_BLUR_H_PASS
-
-
-#ifdef USE_RGBA_DEPTH
-
-#define VEC42DEPTH(m_vec4) dot(m_vec4,vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0,1))
-
- highp float depth = VEC42DEPTH(color)*0.383;
- depth+=VEC42DEPTH(texture2D(source,uv_interp+vec2(pixel_size.x*-3.0,0.0)*pixel_scale))*0.006;
- depth+=VEC42DEPTH(texture2D(source,uv_interp+vec2(pixel_size.x*-2.0,0.0)*pixel_scale))*0.061;
- depth+=VEC42DEPTH(texture2D(source,uv_interp+vec2(pixel_size.x*-1.0,0.0)*pixel_scale))*0.242;
- depth+=VEC42DEPTH(texture2D(source,uv_interp+vec2(pixel_size.x*1.0,0.0)*pixel_scale))*0.242;
- depth+=VEC42DEPTH(texture2D(source,uv_interp+vec2(pixel_size.x*2.0,0.0)*pixel_scale))*0.061;
- depth+=VEC42DEPTH(texture2D(source,uv_interp+vec2(pixel_size.x*3.0,0.0)*pixel_scale))*0.006;
- highp vec4 comp = fract(depth * vec4(256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0));
- comp -= comp.xxyz * vec4(0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0);
- color=comp;
-#else
-
-
- highp float depth = color.r*0.383;
- depth+=texture2D(source,uv_interp+vec2(pixel_size.x*-3.0,0.0)*pixel_scale).r*0.006;
- depth+=texture2D(source,uv_interp+vec2(pixel_size.x*-2.0,0.0)*pixel_scale).r*0.061;
- depth+=texture2D(source,uv_interp+vec2(pixel_size.x*-1.0,0.0)*pixel_scale).r*0.242;
- depth+=texture2D(source,uv_interp+vec2(pixel_size.x*1.0,0.0)*pixel_scale).r*0.242;
- depth+=texture2D(source,uv_interp+vec2(pixel_size.x*2.0,0.0)*pixel_scale).r*0.061;
- depth+=texture2D(source,uv_interp+vec2(pixel_size.x*3.0,0.0)*pixel_scale).r*0.006;
-
-#ifdef USE_GLES_OVER_GL
- gl_FragDepth = depth;
-#else
- gl_FragDepthEXT = depth;
-#endif
-
- return;
-
-#endif
-
-#endif
-
-#ifdef USE_HDR
-
- highp float white_mult = 1.0;
-
-#ifdef USE_8BIT_HDR
- highp vec4 _mult = vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0,1);
- highp float hdr_lum = dot(texture2D( hdr_source, vec2(0.0) ), _mult );
- color.rgb*=LUM_RANGE;
- hdr_lum*=LUM_RANGE; //restore to full range
-#else
-
- highp vec2 lv = texture2D( hdr_source, vec2(0.0) ).rg;
- highp float hdr_lum = lv.r;
-#ifdef USE_AUTOWHITE
- white_mult=lv.g;
-#endif
-
-#endif
-
-#ifdef USE_REINHARDT_TONEMAPPER
- float src_lum = dot(color.rgb,vec3(0.3, 0.58, 0.12));
- float lp = tonemap_exposure/hdr_lum*src_lum;
- float white = tonemap_white;
-#ifdef USE_AUTOWHITE
- white_mult = (white_mult + 1.0 * white_mult);
- white_mult*=white_mult;
- white*=white_mult;
-#endif
- lp = ( lp * ( 1.0 + ( lp / ( white) ) ) ) / ( 1.0 + lp );
- color.rgb*=lp;
-
-#else
-
-#ifdef USE_LOG_TONEMAPPER
- color.rgb = tonemap_exposure * log(color.rgb+1.0)/log(hdr_lum+1.0);
-#else
- highp float tone_scale = tonemap_exposure / hdr_lum; //only linear supported
- color.rgb*=tone_scale;
-#endif
-
-#endif
-
-#endif
-
-
-#ifdef USE_GLOW_COPY
-
- highp vec3 glowcol = color.rgb*color.a+step(bloom_threshold,dot(vec3(0.3333,0.3333,0.3333),color.rgb))*bloom*color.rgb;
-
-#ifdef USE_HDR
- highp float collum = max(color.r,max(color.g,color.b));
- glowcol+=color.rgb*max(collum-hdr_glow_threshold,0.0)*hdr_glow_scale;
-#endif
- color.rgb=glowcol;
- color.a=0.0;
-
-#endif
-
-
-#ifdef USE_GLOW
-
- vec4 glow = texture2D( glow_source, uv2_interp );
-
-#ifdef USE_GLOW_SCREEN
-
- color.rgb = clamp((color.rgb + glow.rgb) - (color.rgb * glow.rgb), 0.0, 1.0);
-
-#endif
-
-#ifdef USE_GLOW_SOFTLIGHT
-
- {
-
- glow.rgb = (glow.rgb * 0.5) + 0.5;
- color.r = (glow.r <= 0.5) ? (color.r - (1.0 - 2.0 * glow.r) * color.r * (1.0 - color.r)) : (((glow.r > 0.5) && (color.r <= 0.25)) ? (color.r + (2.0 * glow.r - 1.0) * (4.0 * color.r * (4.0 * color.r + 1.0) * (color.r - 1.0) + 7.0 * color.r)) : (color.r + (2.0 * glow.r - 1.0) * (sqrt(color.r) - color.r)));
- color.g = (glow.g <= 0.5) ? (color.g - (1.0 - 2.0 * glow.g) * color.g * (1.0 - color.g)) : (((glow.g > 0.5) && (color.g <= 0.25)) ? (color.g + (2.0 * glow.g - 1.0) * (4.0 * color.g * (4.0 * color.g + 1.0) * (color.g - 1.0) + 7.0 * color.g)) : (color.g + (2.0 * glow.g - 1.0) * (sqrt(color.g) - color.g)));
- color.b = (glow.b <= 0.5) ? (color.b - (1.0 - 2.0 * glow.b) * color.b * (1.0 - color.b)) : (((glow.b > 0.5) && (color.b <= 0.25)) ? (color.b + (2.0 * glow.b - 1.0) * (4.0 * color.b * (4.0 * color.b + 1.0) * (color.b - 1.0) + 7.0 * color.b)) : (color.b + (2.0 * glow.b - 1.0) * (sqrt(color.b) - color.b)));
- }
-
-#endif
-
-#if !defined(USE_GLOW_SCREEN) && !defined(USE_GLOW_SOFTLIGHT)
- color.rgb+=glow.rgb;
-#endif
-
-
-
-#endif
-
-#ifdef USE_SRGB
-
-#if 0
- //this was fast, but was commented out because it looked kind of shitty, might it be fixable?
-
- { //i have my doubts about how fast this is
-
- color.rgb = min(color.rgb,vec3(1.0)); //clamp just in case
- vec3 S1 = sqrt(color.rgb);
- vec3 S2 = sqrt(S1);
- vec3 S3 = sqrt(S2);
- color.rgb = 0.662002687 * S1 + 0.684122060 * S2 - 0.323583601 * S3 - 0.225411470 * color.rgb;
- }
-#else
-
- color.r=sRGB_gamma_correct(color.r);
- color.g=sRGB_gamma_correct(color.g);
- color.b=sRGB_gamma_correct(color.b);
-
-#endif
-
-#endif
-
-#ifdef USE_HDR_COPY
-
- //highp float lum = dot(color.rgb,highp vec3(1.0/3.0,1.0/3.0,1.0/3.0));
- //highp float lum = max(color.r,max(color.g,color.b));
- highp float lum = dot(color.rgb,vec3(0.3, 0.58, 0.12));
-
- //lum=log(lum+0.0001); //everyone does it
-
-#ifdef USE_8BIT_HDR
- highp vec4 comp = fract(lum * vec4(256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0));
- comp -= comp.xxyz * vec4(0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0);
- color=comp;
-#else
- color.rgb=vec3(lum);
-#endif
-
-
-#endif
-
-#ifdef USE_HDR_REDUCE
-
-#ifdef USE_8BIT_HDR
- highp vec4 _multcv = vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0, 1.0);
- highp float lum_accum = dot(color,_multcv );
- lum_accum += dot(texture2D( source, uv_interp+vec2(-pixel_size.x,-pixel_size.y) ),_multcv );
- lum_accum += dot(texture2D( source, uv_interp+vec2(0.0,-pixel_size.y) ),_multcv );
- lum_accum += dot(texture2D( source, uv_interp+vec2(pixel_size.x,-pixel_size.y) ),_multcv );
- lum_accum += dot(texture2D( source, uv_interp+vec2(-pixel_size.x,0.0) ),_multcv );
- lum_accum += dot(texture2D( source, uv_interp+vec2(pixel_size.x,0.0) ),_multcv );
- lum_accum += dot(texture2D( source, uv_interp+vec2(-pixel_size.x,pixel_size.y) ),_multcv );
- lum_accum += dot(texture2D( source, uv_interp+vec2(0.0,pixel_size.y) ),_multcv );
- lum_accum += dot(texture2D( source, uv_interp+vec2(pixel_size.x,pixel_size.y) ),_multcv );
- lum_accum/=9.0;
-#else
-
- highp float lum_accum = color.r;
- highp float lum_max = color.g;
-
-#define LUM_REDUCE(m_uv) \
- {\
- vec2 val = texture2D( source, uv_interp+m_uv ).rg;\
- lum_accum+=val.x;\
- lum_max=max(val.y,lum_max);\
- }
-
- LUM_REDUCE( vec2(-pixel_size.x,-pixel_size.y) );
- LUM_REDUCE( vec2(0.0,-pixel_size.y) );
- LUM_REDUCE( vec2(pixel_size.x,-pixel_size.y) );
- LUM_REDUCE( vec2(-pixel_size.x,0.0) );
- LUM_REDUCE( vec2(pixel_size.x,0.0) );
- LUM_REDUCE( vec2(-pixel_size.x,pixel_size.y) );
- LUM_REDUCE( vec2(0.0,pixel_size.y) );
- LUM_REDUCE( vec2(pixel_size.x,pixel_size.y) );
- lum_accum/=9.0;
-
-#endif
-
-#ifdef USE_HDR_STORE
-
- //lum_accum=exp(lum_accum);
-
-#ifdef USE_8BIT_HDR
-
- highp float vd_lum = dot(texture2D( source_vd_lum, vec2(0.0) ), _multcv );
- lum_accum = clamp( vd_lum + (lum_accum-vd_lum)*hdr_time_delta*hdr_exp_adj_speed,min_luminance*(1.0/LUM_RANGE),max_luminance*(1.0/LUM_RANGE));
-#else
- highp float vd_lum=texture2D( source_vd_lum, vec2(0.0) ).r;
- lum_accum = clamp( vd_lum + (lum_accum-vd_lum)*hdr_time_delta*hdr_exp_adj_speed,min_luminance,max_luminance);
-#endif
-
-#endif
-
-#ifdef USE_8BIT_HDR
- highp vec4 comp = fract(lum_accum * vec4(256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0));
- comp -= comp.xxyz * vec4(0.0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0);
- color=comp;
-#else
-#ifdef USE_AUTOWHITE
- color.r=lum_accum;
- color.g=lum_max;
-#else
- color.rgb=vec3(lum_accum);
-#endif
-
-
-#endif
-
-#endif
-
-
-
-#ifdef USE_RGBE
-
- color.rgb = pow(color.rgb,color.a*255.0-(8.0+128.0));
-#endif
-
-#ifdef USE_ENERGY
- color.rgb*=energy;
-#endif
-
-#ifdef USE_NO_ALPHA
- color.a=1.0;
-#endif
-
-#ifdef USE_CUSTOM_ALPHA
- color.a=custom_alpha;
-#endif
-
-
- gl_FragColor = color;
-
-#ifdef USE_DEPTH
- gl_FragDepth = texture(source_depth,uv_interp).r;
-#endif
-
-}
diff --git a/drivers/gles2/shaders/material.glsl b/drivers/gles2/shaders/material.glsl
deleted file mode 100644
index 704a22c5d1..0000000000
--- a/drivers/gles2/shaders/material.glsl
+++ /dev/null
@@ -1,1326 +0,0 @@
-[vertex]
-
-
-#ifdef USE_GLES_OVER_GL
-#define mediump
-#define highp
-#define roundfix( m_val ) floor( (m_val) + 0.5 )
-#else
-precision mediump float;
-precision mediump int;
-#endif
-
-
-
-/*
-from VisualServer:
-
-ARRAY_VERTEX=0,
-ARRAY_NORMAL=1,
-ARRAY_TANGENT=2,
-ARRAY_COLOR=3,
-ARRAY_TEX_UV=4,
-ARRAY_TEX_UV2=5,
-ARRAY_BONES=6,
-ARRAY_WEIGHTS=7,
-ARRAY_INDEX=8,
-*/
-
-//hack to use uv if no uv present so it works with lightmap
-#ifdef ENABLE_AMBIENT_LIGHTMAP
-
-#ifdef USE_LIGHTMAP_ON_UV2
-
-#ifndef ENABLE_UV2_INTERP
-#define ENABLE_UV2_INTERP
-#endif
-
-#else
-
-#ifndef ENABLE_UV_INTERP
-#define ENABLE_UV_INTERP
-#endif
-
-#endif
-
-#endif
-
-
-/* INPUT ATTRIBS */
-
-attribute highp vec4 vertex_attrib; // attrib:0
-attribute vec3 normal_attrib; // attrib:1
-attribute vec4 tangent_attrib; // attrib:2
-attribute vec4 color_attrib; // attrib:3
-attribute vec2 uv_attrib; // attrib:4
-attribute vec2 uv2_attrib; // attrib:5
-
-uniform float normal_mult;
-
-#ifdef USE_SKELETON
-attribute vec4 bone_indices; // attrib:6
-attribute vec4 bone_weights; // attrib:7
-uniform highp sampler2D skeleton_matrices;
-uniform highp float skeltex_pixel_size;
-#endif
-
-#ifdef USE_ATTRIBUTE_INSTANCING
-
-attribute highp vec4 instance_row0; // attrib:8
-attribute highp vec4 instance_row1; // attrib:9
-attribute highp vec4 instance_row2; // attrib:10
-attribute highp vec4 instance_row3; // attrib:11
-
-#endif
-
-#ifdef USE_TEXTURE_INSTANCING
-
-attribute highp vec3 instance_uv; // attrib:6
-uniform highp sampler2D instance_matrices;
-
-#endif
-
-uniform highp mat4 world_transform;
-uniform highp mat4 camera_inverse_transform;
-uniform highp mat4 projection_transform;
-
-#ifdef USE_UNIFORM_INSTANCING
-//shittiest form of instancing (but most compatible)
-uniform highp mat4 instance_transform;
-#endif
-
-/* Varyings */
-
-varying vec3 vertex_interp;
-varying vec3 normal_interp;
-
-#if defined(ENABLE_COLOR_INTERP)
-varying vec4 color_interp;
-#endif
-
-#if defined(ENABLE_UV_INTERP)
-varying vec2 uv_interp;
-#endif
-
-#if defined(ENABLE_UV2_INTERP)
-varying vec2 uv2_interp;
-#endif
-
-#if defined(ENABLE_VAR1_INTERP)
-varying vec4 var1_interp;
-#endif
-
-#if defined(ENABLE_VAR2_INTERP)
-varying vec4 var2_interp;
-#endif
-
-#if defined(ENABLE_TANGENT_INTERP)
-varying vec3 tangent_interp;
-varying vec3 binormal_interp;
-#endif
-
-#ifdef ENABLE_AMBIENT_OCTREE
-
-uniform highp mat4 ambient_octree_inverse_transform;
-varying highp vec3 ambient_octree_coords;
-
-#endif
-
-#ifdef USE_FOG
-
-varying vec4 fog_interp;
-uniform highp vec3 fog_params;
-uniform vec3 fog_color_begin;
-uniform vec3 fog_color_end;
-
-#endif
-
-#ifdef USE_VERTEX_LIGHTING
-
-uniform vec3 light_pos;
-uniform vec3 light_direction;
-uniform vec3 light_attenuation;
-uniform vec3 light_spot_attenuation;
-uniform vec3 light_diffuse;
-uniform vec3 light_specular;
-
-
-
-#endif
-
-varying vec4 diffuse_interp;
-varying vec3 specular_interp;
-//intended for static branching
-//pretty much all meaningful platforms support
-//static branching
-
-uniform float time;
-uniform float instance_id;
-
-uniform vec3 ambient_light;
-
-#if !defined(USE_DEPTH_SHADOWS) && defined(USE_SHADOW_PASS)
-
-varying vec4 position_interp;
-
-#endif
-
-#ifdef LIGHT_USE_SHADOW
-
-uniform highp mat4 shadow_matrix;
-varying highp vec4 shadow_coord;
-#ifdef LIGHT_USE_PSSM
-uniform highp mat4 shadow_matrix2;
-varying highp vec4 shadow_coord2;
-#endif
-#ifdef LIGHT_USE_PSSM4
-uniform highp mat4 shadow_matrix3;
-varying highp vec4 shadow_coord3;
-uniform highp mat4 shadow_matrix4;
-varying highp vec4 shadow_coord4;
-#endif
-
-
-#endif
-
-#ifdef USE_SHADOW_PASS
-
-uniform highp float shadow_z_offset;
-uniform highp float shadow_z_slope_scale;
-
-#endif
-
-#ifdef USE_DUAL_PARABOLOID
-uniform highp vec2 dual_paraboloid;
-varying float dp_clip;
-#endif
-
-
-
-VERTEX_SHADER_GLOBALS
-
-
-
-
-void main() {
-#ifdef USE_UNIFORM_INSTANCING
-
- highp mat4 modelview = (camera_inverse_transform * (world_transform * instance_transform));
-#ifdef ENABLE_AMBIENT_OCTREE
- highp mat4 ambient_octree_transform = (ambient_octree_inverse_transform * (world_transform * instance_transform));
-#endif
-
-#else
-
-#ifdef USE_ATTRIBUTE_INSTANCING
-
- highp mat4 minst=mat4(instance_row0,instance_row1,instance_row2,instance_row3);
- highp mat4 modelview = (camera_inverse_transform * (world_transform * minst));
-#ifdef ENABLE_AMBIENT_OCTREE
- highp mat4 ambient_octree_transform = (ambient_octree_inverse_transform * (world_transform * minst));
-#endif
-
-#else
-
-#ifdef USE_TEXTURE_INSTANCING
-
- highp vec2 ins_ofs=vec2(instance_uv.z,0.0);
-
- highp mat4 minst=mat4(
- texture2D(instance_matrices,instance_uv.xy),
- texture2D(instance_matrices,instance_uv.xy+ins_ofs),
- texture2D(instance_matrices,instance_uv.xy+ins_ofs*2.0),
- texture2D(instance_matrices,instance_uv.xy+ins_ofs*3.0)
- );
-
- /*highp mat4 minst=mat4(
- vec4(1.0,0.0,0.0,0.0),
- vec4(0.0,1.0,0.0,0.0),
- vec4(0.0,0.0,1.0,0.0),
- vec4(0.0,0.0,0.0,1.0)
- );*/
-
- highp mat4 modelview = (camera_inverse_transform * (world_transform * minst));
-#ifdef ENABLE_AMBIENT_OCTREE
- highp mat4 ambient_octree_transform = (ambient_octree_inverse_transform * (world_transform * minst));
-#endif
-
-#else
- highp mat4 modelview = (camera_inverse_transform * world_transform);
-#ifdef ENABLE_AMBIENT_OCTREE
- highp mat4 ambient_octree_transform = (ambient_octree_inverse_transform * world_transform);
-#endif
-
-#endif
-
-#endif
-
-#endif
- highp vec4 vertex_in = vertex_attrib; // vec4(vertex_attrib.xyz * data_attrib.x,1.0);
- vec3 normal_in = normal_attrib;
- normal_in*=normal_mult;
-#if defined(ENABLE_TANGENT_INTERP)
- vec3 tangent_in = tangent_attrib.xyz;
- tangent_in*=normal_mult;
- float binormalf = tangent_attrib.a;
-#endif
-
-#ifdef USE_SKELETON
-
- {
- //skeleton transform
- highp mat4 m=mat4(texture2D(skeleton_matrices,vec2((bone_indices.x*3.0+0.0)*skeltex_pixel_size,0.0)),texture2D(skeleton_matrices,vec2((bone_indices.x*3.0+1.0)*skeltex_pixel_size,0.0)),texture2D(skeleton_matrices,vec2((bone_indices.x*3.0+2.0)*skeltex_pixel_size,0.0)),vec4(0.0,0.0,0.0,1.0))*bone_weights.x;
- m+=mat4(texture2D(skeleton_matrices,vec2((bone_indices.y*3.0+0.0)*skeltex_pixel_size,0.0)),texture2D(skeleton_matrices,vec2((bone_indices.y*3.0+1.0)*skeltex_pixel_size,0.0)),texture2D(skeleton_matrices,vec2((bone_indices.y*3.0+2.0)*skeltex_pixel_size,0.0)),vec4(0.0,0.0,0.0,1.0))*bone_weights.y;
- m+=mat4(texture2D(skeleton_matrices,vec2((bone_indices.z*3.0+0.0)*skeltex_pixel_size,0.0)),texture2D(skeleton_matrices,vec2((bone_indices.z*3.0+1.0)*skeltex_pixel_size,0.0)),texture2D(skeleton_matrices,vec2((bone_indices.z*3.0+2.0)*skeltex_pixel_size,0.0)),vec4(0.0,0.0,0.0,1.0))*bone_weights.z;
- m+=mat4(texture2D(skeleton_matrices,vec2((bone_indices.w*3.0+0.0)*skeltex_pixel_size,0.0)),texture2D(skeleton_matrices,vec2((bone_indices.w*3.0+1.0)*skeltex_pixel_size,0.0)),texture2D(skeleton_matrices,vec2((bone_indices.w*3.0+2.0)*skeltex_pixel_size,0.0)),vec4(0.0,0.0,0.0,1.0))*bone_weights.w;
-
- vertex_in = vertex_in * m;
- normal_in = (vec4(normal_in,0.0) * m).xyz;
-#if defined(ENABLE_TANGENT_INTERP)
- tangent_in = (vec4(tangent_in,0.0) * m).xyz;
-#endif
- }
-
-#endif
-
-#ifdef ENABLE_AMBIENT_OCTREE
-
- ambient_octree_coords = (ambient_octree_transform * vertex_in).xyz;
-#endif
-
- vertex_interp = (modelview * vertex_in).xyz;
- normal_interp = normalize((modelview * vec4(normal_in,0.0)).xyz);
-
-#if defined(ENABLE_COLOR_INTERP)
-#ifdef USE_COLOR_ATTRIB_SRGB_TO_LINEAR
-
- color_interp = vec4(
- color_attrib.r<0.04045 ? color_attrib.r * (1.0 / 12.92) : pow((color_attrib.r + 0.055) * (1.0 / (1 + 0.055)), 2.4),
- color_attrib.g<0.04045 ? color_attrib.g * (1.0 / 12.92) : pow((color_attrib.g + 0.055) * (1.0 / (1 + 0.055)), 2.4),
- color_attrib.b<0.04045 ? color_attrib.b * (1.0 / 12.92) : pow((color_attrib.b + 0.055) * (1.0 / (1 + 0.055)), 2.4),
- color_attrib.a
- );
-#else
- color_interp = color_attrib;
-#endif
-#endif
-
-#if defined(ENABLE_TANGENT_INTERP)
- tangent_interp=normalize((modelview * vec4(tangent_in,0.0)).xyz);
- binormal_interp = normalize( cross(normal_interp,tangent_interp) * binormalf );
-#endif
-
-#if defined(ENABLE_UV_INTERP)
- uv_interp = uv_attrib;
-#endif
-#if defined(ENABLE_UV2_INTERP)
- uv2_interp = uv2_attrib;
-#endif
-
- float vertex_specular_exp = 40.0; //material_specular.a;
-
-
-
-VERTEX_SHADER_CODE
-
-
-#ifdef USE_DUAL_PARABOLOID
-//for dual paraboloid shadow mapping
- highp vec3 vtx = vertex_interp;
- vtx.z*=dual_paraboloid.y; //side to affect
- vtx.z+=0.01;
- dp_clip=vtx.z;
- highp float len=length( vtx );
- vtx=normalize(vtx);
- vtx.xy/=1.0+vtx.z;
- vtx.z = len*dual_paraboloid.x; // it's a reciprocal(len - z_near) / (z_far - z_near);
- vtx+=normalize(vtx)*0.025;
- vtx.z = vtx.z * 2.0 - 1.0; // fit to clipspace
- vertex_interp=vtx;
-
- //vertex_interp.w = z_clip;
-
-#endif
-
-#ifdef USE_SHADOW_PASS
-
- float z_ofs = shadow_z_offset;
- z_ofs += (1.0-abs(normal_interp.z))*shadow_z_slope_scale;
- vertex_interp.z-=z_ofs;
-#endif
-
-#ifdef LIGHT_USE_SHADOW
-
- shadow_coord = shadow_matrix * vec4(vertex_interp,1.0);
- shadow_coord.xyz/=shadow_coord.w;
-
-#ifdef LIGHT_USE_PSSM
- shadow_coord.y*=0.5;
- shadow_coord.y+=0.5;
- shadow_coord2 = shadow_matrix2 * vec4(vertex_interp,1.0);
- shadow_coord2.xyz/=shadow_coord2.w;
- shadow_coord2.y*=0.5;
-#endif
-#ifdef LIGHT_USE_PSSM4
- shadow_coord.x*=0.5;
- shadow_coord2.x*=0.5;
-
- shadow_coord3 = shadow_matrix3 * vec4(vertex_interp,1.0);
- shadow_coord3.xyz/=shadow_coord3.w;
- shadow_coord3.xy*=vec2(0.5);
- shadow_coord3.xy+=vec2(0.5);
-
- shadow_coord4 = shadow_matrix4 * vec4(vertex_interp,1.0);
- shadow_coord4.xyz/=shadow_coord4.w;
- shadow_coord4.xy*=vec2(0.5);
- shadow_coord4.x+=0.5;
-
-#endif
-
-#endif
-
-#ifdef USE_FOG
-
- fog_interp.a = pow( clamp( (length(vertex_interp)-fog_params.x)/(fog_params.y-fog_params.x), 0.0, 1.0 ), fog_params.z );
- fog_interp.rgb = mix( fog_color_begin, fog_color_end, fog_interp.a );
-#endif
-
-#ifndef VERTEX_SHADER_WRITE_POSITION
-//vertex shader might write a position
- gl_Position = projection_transform * vec4(vertex_interp,1.0);
-#endif
-
-
-
-#if !defined(USE_DEPTH_SHADOWS) && defined(USE_SHADOW_PASS)
-
- position_interp=gl_Position;
-
-#endif
-
-
-#ifdef USE_VERTEX_LIGHTING
-
- vec3 eye_vec = -normalize(vertex_interp);
-
-#ifdef LIGHT_TYPE_DIRECTIONAL
-
- vec3 light_dir = -light_direction;
- float attenuation = light_attenuation.r;
-
-
-#endif
-
-#ifdef LIGHT_TYPE_OMNI
- vec3 light_dir = light_pos-vertex_interp;
- float radius = light_attenuation.g;
- float dist = min(length(light_dir),radius);
- light_dir=normalize(light_dir);
- float attenuation = pow( max(1.0 - dist/radius, 0.0), light_attenuation.b ) * light_attenuation.r;
-
-#endif
-
-#ifdef LIGHT_TYPE_SPOT
-
- vec3 light_dir = light_pos-vertex_interp;
- float radius = light_attenuation.g;
- float dist = min(length(light_dir),radius);
- light_dir=normalize(light_dir);
- float attenuation = pow( max(1.0 - dist/radius, 0.0), light_attenuation.b ) * light_attenuation.r;
- vec3 spot_dir = light_direction;
- float spot_cutoff=light_spot_attenuation.r;
- float scos = max(dot(-light_dir, spot_dir),spot_cutoff);
- float rim = (1.0 - scos) / (1.0 - spot_cutoff);
- attenuation *= 1.0 - pow( rim, light_spot_attenuation.g);
-
-
-#endif
-
-#if defined(LIGHT_TYPE_DIRECTIONAL) || defined(LIGHT_TYPE_OMNI) || defined(LIGHT_TYPE_SPOT)
-
- //process_shade(normal_interp,light_dir,eye_vec,vertex_specular_exp,attenuation,diffuse_interp,specular_interp);
- {
- float NdotL = max(0.0,dot( normal_interp, light_dir ));
- vec3 half_vec = normalize(light_dir + eye_vec);
- float eye_light = max(dot(normal_interp, half_vec),0.0);
- diffuse_interp.rgb=light_diffuse * NdotL * attenuation;
- diffuse_interp.a=attenuation;
- if (NdotL > 0.0) {
- specular_interp=light_specular * pow( eye_light, vertex_specular_exp ) * attenuation;
- } else {
- specular_interp=vec3(0.0);
- }
- }
-
-#else
-
-#ifdef SHADELESS
-
- diffuse_interp=vec4(vec3(1.0),0.0);
- specular_interp=vec3(0.0);
-# else
-
- diffuse_interp=vec4(0.0);
- specular_interp=vec3(0.0);
-# endif
-
-#endif
-
-
-
-
-#endif
-
-
-}
-
-
-[fragment]
-
-
-#ifdef USE_GLES_OVER_GL
-#define mediump
-#define highp
-#define roundfix( m_val ) floor( (m_val) + 0.5 )
-#else
-
-precision mediump float;
-precision mediump int;
-
-#endif
-
-
-//hack to use uv if no uv present so it works with lightmap
-#ifdef ENABLE_AMBIENT_LIGHTMAP
-
-#ifdef USE_LIGHTMAP_ON_UV2
-
-#ifndef ENABLE_UV2_INTERP
-#define ENABLE_UV2_INTERP
-#endif
-
-#else
-
-#ifndef ENABLE_UV_INTERP
-#define ENABLE_UV_INTERP
-#endif
-
-#endif
-
-#endif
-
-
-/* Varyings */
-
-#if defined(ENABLE_COLOR_INTERP)
-varying vec4 color_interp;
-#endif
-
-#if defined(ENABLE_UV_INTERP)
-varying vec2 uv_interp;
-#endif
-
-#if defined(ENABLE_UV2_INTERP)
-varying vec2 uv2_interp;
-#endif
-
-#if defined(ENABLE_TANGENT_INTERP)
-varying vec3 tangent_interp;
-varying vec3 binormal_interp;
-#endif
-
-#if defined(ENABLE_VAR1_INTERP)
-varying vec4 var1_interp;
-#endif
-
-#if defined(ENABLE_VAR2_INTERP)
-varying vec4 var2_interp;
-#endif
-
-#ifdef LIGHT_USE_PSSM
-uniform vec3 light_pssm_split;
-#endif
-
-varying vec3 vertex_interp;
-varying vec3 normal_interp;
-
-#ifdef USE_FOG
-
-varying vec4 fog_interp;
-
-#endif
-
-/* Material Uniforms */
-
-#ifdef USE_VERTEX_LIGHTING
-
-varying vec4 diffuse_interp;
-varying vec3 specular_interp;
-
-#endif
-
-#if !defined(USE_DEPTH_SHADOWS) && defined(USE_SHADOW_PASS)
-
-varying vec4 position_interp;
-
-#endif
-
-
-
-uniform vec3 light_pos;
-uniform vec3 light_direction;
-uniform vec3 light_attenuation;
-uniform vec3 light_spot_attenuation;
-uniform vec3 light_diffuse;
-uniform vec3 light_specular;
-
-uniform vec3 ambient_light;
-
-
-#ifdef USE_FRAGMENT_LIGHTING
-
-
-
-# ifdef USE_DEPTH_SHADOWS
-# else
-# endif
-
-#endif
-
-uniform float const_light_mult;
-uniform float time;
-
-#ifdef ENABLE_AMBIENT_OCTREE
-
-varying highp vec3 ambient_octree_coords;
-uniform highp float ambient_octree_lattice_size;
-uniform highp vec2 ambient_octree_pix_size;
-uniform highp vec2 ambient_octree_light_pix_size;
-uniform highp float ambient_octree_lattice_divide;
-uniform highp sampler2D ambient_octree_tex;
-uniform highp sampler2D ambient_octree_light_tex;
-uniform float ambient_octree_multiplier;
-uniform int ambient_octree_steps;
-
-#endif
-
-#ifdef ENABLE_AMBIENT_LIGHTMAP
-
-uniform highp sampler2D ambient_lightmap;
-uniform float ambient_lightmap_multiplier;
-
-#endif
-
-#ifdef ENABLE_AMBIENT_DP_SAMPLER
-
-uniform highp sampler2D ambient_dp_sampler;
-uniform float ambient_dp_sampler_multiplier;
-
-#endif
-
-#ifdef ENABLE_AMBIENT_COLOR
-
-uniform vec3 ambient_color;
-
-#endif
-
-FRAGMENT_SHADER_GLOBALS
-
-
-
-#ifdef LIGHT_USE_SHADOW
-
-varying highp vec4 shadow_coord;
-#ifdef LIGHT_USE_PSSM
-varying highp vec4 shadow_coord2;
-#endif
-#ifdef LIGHT_USE_PSSM4
-varying highp vec4 shadow_coord3;
-varying highp vec4 shadow_coord4;
-#endif
-
-uniform highp sampler2D shadow_texture;
-uniform highp vec2 shadow_texel_size;
-
-uniform float shadow_darkening;
-
-#ifdef USE_DEPTH_SHADOWS
-
-#define SHADOW_DEPTH(m_tex,m_uv) (texture2D((m_tex),(m_uv)).z)
-
-#else
-
-//#define SHADOW_DEPTH(m_tex,m_uv) dot(texture2D((m_tex),(m_uv)),highp vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0,1) )
-#define SHADOW_DEPTH(m_tex,m_uv) dot(texture2D((m_tex),(m_uv)),vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0,1) )
-
-#endif
-
-#ifdef USE_SHADOW_PCF
-
-
-#ifdef USE_SHADOW_PCF_HQ
-
-
-float SAMPLE_SHADOW_TEX( highp vec2 coord, highp float refdepth) {
-
- float avg=(SHADOW_DEPTH(shadow_texture,coord) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(shadow_texel_size.x,0.0)) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(-shadow_texel_size.x,0.0)) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(0.0,shadow_texel_size.y)) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(0.0,-shadow_texel_size.y)) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(shadow_texel_size.x,shadow_texel_size.y)) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(-shadow_texel_size.x,shadow_texel_size.y)) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(shadow_texel_size.x,-shadow_texel_size.y)) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(-shadow_texel_size.x,-shadow_texel_size.y)) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(shadow_texel_size.x*2.0,0.0)) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(-shadow_texel_size.x*2.0,0.0)) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(0.0,shadow_texel_size.y*2.0)) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(0.0,-shadow_texel_size.y*2.0)) < refdepth ? 0.0 : 1.0);
- return avg*(1.0/13.0);
-}
-
-#else
-
-float SAMPLE_SHADOW_TEX( highp vec2 coord, highp float refdepth) {
-
- float avg=(SHADOW_DEPTH(shadow_texture,coord) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(shadow_texel_size.x,0.0)) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(-shadow_texel_size.x,0.0)) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(0.0,shadow_texel_size.y)) < refdepth ? 0.0 : 1.0);
- avg+=(SHADOW_DEPTH(shadow_texture,coord+vec2(0.0,-shadow_texel_size.y)) < refdepth ? 0.0 : 1.0);
- return avg*0.2;
-}
-
-#endif
-
-
-
-
-/*
- 16x averaging
-float SAMPLE_SHADOW_TEX( highp vec2 coord, highp float refdepth) {
-
- vec2 offset = vec2(
- lessThan(vec2(0.25),fract(gl_FragCoord.xy * 0.5))
- );
- offset.y += offset.x; // y ^= x in floating point
-
- if (offset.y > 1.1)
- offset.y = 0.0;
- float avg = step( refdepth, SHADOW_DEPTH(shadow_texture, coord+ (offset + vec2(-1.5, 0.5))*shadow_texel_size) );
- avg+=step(refdepth, SHADOW_DEPTH(shadow_texture, coord+ (offset + vec2(0.5, 0.5))*shadow_texel_size) );
- avg+=step(refdepth, SHADOW_DEPTH(shadow_texture, coord+ (offset + vec2(-1.5, -1.5))*shadow_texel_size) );
- avg+=step(refdepth, SHADOW_DEPTH(shadow_texture, coord+ (offset + vec2(0.5, -1.5))*shadow_texel_size) );
- return avg * 0.25;
-}
-*/
-
-/*
-float SAMPLE_SHADOW_TEX( highp vec2 coord, highp float refdepth) {
-
- vec2 offset = vec2(
- lessThan(vec2(0.25),fract(gl_FragCoord.xy * 0.5))
- );
- offset.y += offset.x; // y ^= x in floating point
-
- if (offset.y > 1.1)
- offset.y = 0.0;
- return step( refdepth, SHADOW_DEPTH(shadow_texture, coord+ offset*shadow_texel_size) );
-
-}
-
-*/
-/* simple pcf4 */
-//#define SAMPLE_SHADOW_TEX(m_coord,m_depth) ((step(m_depth,SHADOW_DEPTH(shadow_texture,m_coord))+step(m_depth,SHADOW_DEPTH(shadow_texture,m_coord+vec2(0.0,shadow_texel_size.y)))+step(m_depth,SHADOW_DEPTH(shadow_texture,m_coord+vec2(shadow_texel_size.x,0.0)))+step(m_depth,SHADOW_DEPTH(shadow_texture,m_coord+shadow_texel_size)))/4.0)
-
-#endif
-
-#ifdef USE_SHADOW_ESM
-
-uniform float esm_multiplier;
-
-float SAMPLE_SHADOW_TEX(vec2 p_uv,float p_depth) {
-
-#if defined (USE_DEPTH_SHADOWS)
- //these only are used if interpolation exists
- highp float occluder = SHADOW_DEPTH(shadow_texture, p_uv);
-#else
- vec2 unnormalized = p_uv/shadow_texel_size;
- vec2 fractional = fract(unnormalized);
- unnormalized = floor(unnormalized);
-
- vec4 exponent;
- exponent.x = SHADOW_DEPTH(shadow_texture, (unnormalized + vec2( -0.5, 0.5 )) * shadow_texel_size );
- exponent.y = SHADOW_DEPTH(shadow_texture, (unnormalized + vec2( 0.5, 0.5 )) * shadow_texel_size );
- exponent.z = SHADOW_DEPTH(shadow_texture, (unnormalized + vec2( 0.5, -0.5 )) * shadow_texel_size );
- exponent.w = SHADOW_DEPTH(shadow_texture, (unnormalized + vec2( -0.5, -0.5 )) * shadow_texel_size );
-
- highp float occluder = (exponent.w + (exponent.x - exponent.w) * fractional.y);
- occluder = occluder + ((exponent.z + (exponent.y - exponent.z) * fractional.y) - occluder)*fractional.x;
-#endif
- return clamp(exp(esm_multiplier* ( occluder - p_depth )),0.0,1.0);
-
-}
-
-
-#endif
-
-#if !defined(USE_SHADOW_PCF) && !defined(USE_SHADOW_ESM)
-
-#define SAMPLE_SHADOW_TEX(m_coord,m_depth) (SHADOW_DEPTH(shadow_texture,m_coord) < m_depth ? 0.0 : 1.0)
-
-#endif
-
-
-#endif
-
-#ifdef USE_DUAL_PARABOLOID
-
-varying float dp_clip;
-
-#endif
-
-uniform highp mat4 camera_inverse_transform;
-
-#if defined(ENABLE_TEXSCREEN)
-
-uniform vec2 texscreen_screen_mult;
-uniform vec4 texscreen_screen_clamp;
-uniform sampler2D texscreen_tex;
-
-#endif
-
-#if defined(ENABLE_SCREEN_UV)
-
-uniform vec2 screen_uv_mult;
-
-#endif
-
-void main() {
-
-#ifdef USE_DUAL_PARABOLOID
- if (dp_clip<0.0)
- discard;
-#endif
-
- //lay out everything, whathever is unused is optimized away anyway
- vec3 vertex = vertex_interp;
- vec4 diffuse = vec4(0.9,0.9,0.9,1.0);
- vec3 specular = vec3(0.0,0.0,0.0);
- vec3 emission = vec3(0.0,0.0,0.0);
- float specular_exp=1.0;
- float glow=0.0;
- float shade_param=0.0;
-#ifdef DISABLE_FRONT_FACING
- float side=float(1)*2.0-1.0;
-#else
- float side=float(gl_FrontFacing)*2.0-1.0;
-#endif
-#if defined(ENABLE_TANGENT_INTERP)
- vec3 binormal = normalize(binormal_interp)*side;
- vec3 tangent = normalize(tangent_interp)*side;
-#endif
- //vec3 normal = abs(normalize(normal_interp))*side;
- vec3 normal = normalize(normal_interp)*side;
-#if defined(ENABLE_SCREEN_UV)
- vec2 screen_uv = gl_FragCoord.xy*screen_uv_mult;
-#endif
-
-#if defined(ENABLE_UV_INTERP)
- vec2 uv = uv_interp;
-#endif
-
-#if defined(ENABLE_UV2_INTERP)
- vec2 uv2 = uv2_interp;
-#endif
-
-#if defined(ENABLE_COLOR_INTERP)
- vec4 color = color_interp;
-#endif
-
-#if defined(ENABLE_NORMALMAP)
-
- vec3 normalmap = vec3(0.0);
-#endif
-
- float normaldepth=1.0;
-
-
-
-#if defined(ENABLE_DISCARD)
- bool discard_=false;
-#endif
-
-{
-
-
-FRAGMENT_SHADER_CODE
-
-}
-
-#if defined(ENABLE_NORMALMAP)
-
- normal = normalize( mix(normal_interp,tangent_interp * normalmap.x + binormal_interp * normalmap.y + normal_interp * normalmap.z,normaldepth) ) * side;
-
-#endif
-
-#if defined(ENABLE_DISCARD)
- if (discard_) {
- //easy to eliminate dead code
- discard;
- }
-#endif
-
-#ifdef ENABLE_CLIP_ALPHA
- if (diffuse.a<0.99) {
- //used for doublepass and shadowmapping
- discard;
- }
-#endif
-
- float shadow_attenuation = 1.0;
-
-#ifdef ENABLE_AMBIENT_LIGHTMAP
-
- vec3 ambientmap_color = vec3(0.0,0.0,0.0);
- vec2 ambientmap_uv = vec2(0.0,0.0);
-
-#ifdef USE_LIGHTMAP_ON_UV2
-
- ambientmap_uv = uv2_interp;
-
-#else
-
- ambientmap_uv = uv_interp;
-
-#endif
-
- vec4 amcol = texture2D(ambient_lightmap,ambientmap_uv);
- shadow_attenuation=amcol.a;
- ambientmap_color = amcol.rgb;
- ambientmap_color*=ambient_lightmap_multiplier;
- ambientmap_color*=diffuse.rgb;
-
-
-
-#endif
-
-
-#ifdef ENABLE_AMBIENT_OCTREE
-
- vec3 ambientmap_color = vec3(0.0,0.0,0.0);
-
-
- {
-
- //read position from initial lattice grid
- highp vec3 lattice_pos = floor(ambient_octree_coords*ambient_octree_lattice_size);
- highp vec2 octant_uv = highp vec2(lattice_pos.x+ambient_octree_lattice_size*lattice_pos.z,lattice_pos.y);
- octant_uv=(octant_uv*highp vec2(2.0,4.0)+highp vec2(0.0,4.0));
- highp float ld = 1.0/ambient_octree_lattice_size;
-
-
- //go down the octree
-
- for(int i=0;i<ambient_octree_steps;i++) {
-
-
- highp vec3 sub=mod(ambient_octree_coords,ld);
- ld*=0.5;
- highp vec3 s = step(ld,sub);
- octant_uv+=s.xy;
- octant_uv.y+=s.z*2.0;
- octant_uv=(octant_uv+0.5)*ambient_octree_pix_size;
- highp vec4 new_uv = texture2D(ambient_octree_tex,octant_uv);
- octant_uv=floor(highp vec2( dot(new_uv.xy,highp vec2(65280.0,255.0)), dot(new_uv.zw,highp vec2(65280.0,255.0)) )+0.5);//+ambient_octree_pix_size*0.5;
-
- }
-
- //sample color
- octant_uv=(octant_uv+0.5)*ambient_octree_light_pix_size;
- highp vec3 sub=(mod(ambient_octree_coords,ld)/ld);
- octant_uv.xy+=sub.xy*ambient_octree_light_pix_size.xy;
- vec3 col_up=texture2D(ambient_octree_light_tex,octant_uv).rgb;
- octant_uv.y+=ambient_octree_light_pix_size.y*2.0;
- vec3 col_down=texture2D(ambient_octree_light_tex,octant_uv).rgb;
- ambientmap_color=mix(col_up,col_down,sub.z)*ambient_octree_multiplier;
-
- ambientmap_color*=diffuse.rgb;
-
- }
-
-#endif
-
-
-
-#ifdef ENABLE_AMBIENT_DP_SAMPLER
-
- vec3 ambientmap_color = vec3(0.0,0.0,0.0);
-
- {
-
- vec3 dp_normal = normalize((vec4(normal,0) * camera_inverse_transform).xyz);
- vec2 ambient_uv = (dp_normal.xy / (1.0+abs(dp_normal.z)))*0.5+0.5; //dual paraboloid
- ambient_uv.y*=0.5;
- if (dp_normal.z<0) {
-
- ambient_uv.y=(0.5-ambient_uv.y)+0.5;
-
- }
-
- ambientmap_color = texture2D(ambient_dp_sampler,ambient_uv ).rgb * ambient_dp_sampler_multiplier;
- ambientmap_color*=diffuse.rgb;
- }
-
-#endif
-
-
-
-
-#ifdef LIGHT_USE_SHADOW
-#ifdef LIGHT_TYPE_DIRECTIONAL
-
- float shadow_fade_exponent=5.0; //hardcoded for now
- float shadow_fade=pow(length(vertex_interp)/light_attenuation.g,shadow_fade_exponent);
-
-// optimization - skip shadows outside visible range
- if(shadow_fade<1.0){
-
-#ifdef LIGHT_USE_PSSM
-
-
- //if (vertex_interp.z > light_pssm_split) {
-#if 0
- highp vec3 splane = vec3(0.0,0.0,0.0);
-
- if (gl_FragCoord.w > light_pssm_split.x) {
-
- splane = shadow_coord.xyz;
- splane.y+=1.0;
- } else {
- splane = shadow_coord2.xyz;
- }
- splane.y*=0.5;
- shadow_attenuation=SAMPLE_SHADOW_TEX(splane.xy,splane.z);
-
-#else
-/*
- float sa_a = SAMPLE_SHADOW_TEX(shadow_coord.xy,shadow_coord.z);
- float sa_b = SAMPLE_SHADOW_TEX(shadow_coord2.xy,shadow_coord2.z);
- if (gl_FragCoord.w > light_pssm_split.x) {
- shadow_attenuation=sa_a;
- } else {
- shadow_attenuation=sa_b;
- }
-*/
-
- vec2 pssm_coord;
- float pssm_z;
-
-#if defined(LIGHT_USE_PSSM) && defined(USE_SHADOW_ESM)
-#define USE_PSSM_BLEND
- float pssm_blend;
- vec2 pssm_coord_2;
- float pssm_z_2;
- vec3 light_pssm_split_inv = 1.0/light_pssm_split;
- float w_inv = 1.0/gl_FragCoord.w;
-#endif
-
-#ifdef LIGHT_USE_PSSM4
-
-
- if (gl_FragCoord.w > light_pssm_split.y) {
-
- if (gl_FragCoord.w > light_pssm_split.x) {
- pssm_coord=shadow_coord.xy;
- pssm_z=shadow_coord.z;
-#if defined(USE_PSSM_BLEND)
- pssm_coord_2=shadow_coord2.xy;
- pssm_z_2=shadow_coord2.z;
- pssm_blend=smoothstep(0.0,light_pssm_split_inv.x,w_inv);
-#endif
-
- } else {
- pssm_coord=shadow_coord2.xy;
- pssm_z=shadow_coord2.z;
-#if defined(USE_PSSM_BLEND)
- pssm_coord_2=shadow_coord3.xy;
- pssm_z_2=shadow_coord3.z;
- pssm_blend=smoothstep(light_pssm_split_inv.x,light_pssm_split_inv.y,w_inv);
-#endif
-
- }
- } else {
-
-
- if (gl_FragCoord.w > light_pssm_split.z) {
- pssm_coord=shadow_coord3.xy;
- pssm_z=shadow_coord3.z;
-#if defined(USE_PSSM_BLEND)
- pssm_coord_2=shadow_coord4.xy;
- pssm_z_2=shadow_coord4.z;
- pssm_blend=smoothstep(light_pssm_split_inv.y,light_pssm_split_inv.z,w_inv);
-#endif
-
- } else {
- pssm_coord=shadow_coord4.xy;
- pssm_z=shadow_coord4.z;
-#if defined(USE_PSSM_BLEND)
- pssm_coord_2=shadow_coord4.xy;
- pssm_z_2=shadow_coord4.z;
- pssm_blend=0.0;
-#endif
-
- }
- }
-
-#else
-
- if (gl_FragCoord.w > light_pssm_split.x) {
- pssm_coord=shadow_coord.xy;
- pssm_z=shadow_coord.z;
-#if defined(USE_PSSM_BLEND)
- pssm_coord_2=shadow_coord2.xy;
- pssm_z_2=shadow_coord2.z;
- pssm_blend=smoothstep(0.0,light_pssm_split_inv.x,w_inv);
-#endif
-
- } else {
- pssm_coord=shadow_coord2.xy;
- pssm_z=shadow_coord2.z;
-#if defined(USE_PSSM_BLEND)
- pssm_coord_2=shadow_coord2.xy;
- pssm_z_2=shadow_coord2.z;
- pssm_blend=0.0;
-#endif
-
- }
-
-#endif
-
- //one one sample
- shadow_attenuation=SAMPLE_SHADOW_TEX(pssm_coord,pssm_z);
-#if defined(USE_PSSM_BLEND)
- shadow_attenuation=mix(shadow_attenuation,SAMPLE_SHADOW_TEX(pssm_coord_2,pssm_z_2),pssm_blend);
-#endif
-
-
-#endif
-
-#else
-
- shadow_attenuation=SAMPLE_SHADOW_TEX(shadow_coord.xy,shadow_coord.z);
-#endif
-
- shadow_attenuation=mix(shadow_attenuation,1.0,shadow_fade);
- }else{
- shadow_attenuation=1.0;
- };
-
-#endif
-
-#ifdef LIGHT_TYPE_OMNI
-
- vec3 splane=shadow_coord.xyz;///shadow_coord.w;
- float shadow_len=length(splane);
- splane=normalize(splane);
- float vofs=0.0;
-
- if (splane.z>=0.0) {
-
- splane.z+=1.0;
- } else {
-
- splane.z=1.0 - splane.z;
- vofs=0.5;
- }
- splane.xy/=splane.z;
- splane.xy=splane.xy * 0.5 + 0.5;
- float lradius = light_attenuation.g;
- splane.z = shadow_len / lradius;
- splane.y=clamp(splane.y,0.0,1.0)*0.5+vofs;
-
- shadow_attenuation=SAMPLE_SHADOW_TEX(splane.xy,splane.z);
-#endif
-
-#ifdef LIGHT_TYPE_SPOT
-
- shadow_attenuation=SAMPLE_SHADOW_TEX(shadow_coord.xy,shadow_coord.z);
-#endif
-
- shadow_attenuation=mix(shadow_attenuation,1.0,shadow_darkening);
-#endif
-
-
-#ifdef USE_FRAGMENT_LIGHTING
-
- vec3 eye_vec = -normalize(vertex);
-
-#ifdef LIGHT_TYPE_DIRECTIONAL
-
- vec3 light_dir = -light_direction;
- float attenuation = light_attenuation.r;
-
-
-#endif
-
-#ifdef LIGHT_TYPE_OMNI
-
- vec3 light_dir = light_pos-vertex;
- float radius = light_attenuation.g;
- float dist = min(length(light_dir),radius);
- light_dir=normalize(light_dir);
- float attenuation = pow( max(1.0 - dist/radius, 0.0), light_attenuation.b ) * light_attenuation.r;
-
-#endif
-
-
-#ifdef LIGHT_TYPE_SPOT
-
- vec3 light_dir = light_pos-vertex;
- float radius = light_attenuation.g;
- float dist = min(length(light_dir),radius);
- light_dir=normalize(light_dir);
- float attenuation = pow( max(1.0 - dist/radius, 0.0), light_attenuation.b ) * light_attenuation.r;
- vec3 spot_dir = light_direction;
- float spot_cutoff=light_spot_attenuation.r;
- float scos = max(dot(-light_dir, spot_dir),spot_cutoff);
- float rim = (1.0 - scos) / (1.0 - spot_cutoff);
- attenuation *= 1.0 - pow( rim, light_spot_attenuation.g);
-
-#endif
-
-# if defined(LIGHT_TYPE_DIRECTIONAL) || defined(LIGHT_TYPE_OMNI) || defined (LIGHT_TYPE_SPOT)
-
- {
-
- vec3 mdiffuse = diffuse.rgb;
- vec3 light;
-
-#if defined(USE_OUTPUT_SHADOW_COLOR)
- vec3 shadow_color=vec3(0.0,0.0,0.0);
-#endif
-
-#if defined(USE_LIGHT_SHADER_CODE)
-//light is written by the light shader
-{
-
-LIGHT_SHADER_CODE
-
-}
-#else
-//traditional lambert + blinn
- float NdotL = max(0.0,dot( normal, light_dir ));
- vec3 half_vec = normalize(light_dir + eye_vec);
- float eye_light = max(dot(normal, half_vec),0.0);
-
- light = light_diffuse * mdiffuse * NdotL;
- if (NdotL > 0.0) {
- light+=specular * light_specular * pow( eye_light, specular_exp );
- }
-#endif
- diffuse.rgb = const_light_mult * ambient_light *diffuse.rgb + light * attenuation * shadow_attenuation;
-
-#if defined(USE_OUTPUT_SHADOW_COLOR)
- diffuse.rgb += light * shadow_color * attenuation * (1.0 - shadow_attenuation);
-#endif
-
-#ifdef USE_FOG
-
- diffuse.rgb = mix(diffuse.rgb,fog_interp.rgb,fog_interp.a);
-
-# if defined(LIGHT_TYPE_OMNI) || defined (LIGHT_TYPE_SPOT)
- diffuse.rgb = mix(mix(vec3(0.0),diffuse.rgb,attenuation),diffuse.rgb,const_light_mult);
-# endif
-
-
-#endif
-
-
- }
-
-
-# endif
-
-# if !defined(LIGHT_TYPE_DIRECTIONAL) && !defined(LIGHT_TYPE_OMNI) && !defined (LIGHT_TYPE_SPOT)
-//none
-#ifndef SHADELESS
- diffuse.rgb=ambient_light *diffuse.rgb;
-#endif
-
-# endif
-
- diffuse.rgb+=const_light_mult*emission;
-
-#endif
-
-
-
-
-#ifdef USE_VERTEX_LIGHTING
-
- vec3 ambient = const_light_mult*ambient_light*diffuse.rgb;
-# if defined(LIGHT_TYPE_OMNI) || defined (LIGHT_TYPE_SPOT)
- //ambient*=diffuse_interp.a; //attenuation affects ambient too
-
-# endif
-
- //diffuse.rgb=(diffuse.rgb * diffuse_interp.rgb + specular * specular_interp)*shadow_attenuation + ambient;
- //diffuse.rgb+=emission * const_light_mult;
- diffuse.rgb=(diffuse.rgb * diffuse_interp.rgb + specular * specular_interp)*shadow_attenuation + ambient;
- diffuse.rgb+=emission * const_light_mult;
-
-#ifdef USE_FOG
-
- diffuse.rgb = mix(diffuse.rgb,fog_interp.rgb,fog_interp.a);
-
-# if defined(LIGHT_TYPE_OMNI) || defined (LIGHT_TYPE_SPOT)
- diffuse.rgb = mix(mix(vec3(0.0),diffuse.rgb,diffuse_interp.a),diffuse.rgb,const_light_mult);
-# endif
-
-#endif
-
-#endif
-
-
-#if defined(ENABLE_AMBIENT_OCTREE) || defined(ENABLE_AMBIENT_LIGHTMAP) || defined(ENABLE_AMBIENT_DP_SAMPLER)
-#if defined(ENABLE_AMBIENT_COLOR)
- ambientmap_color*=ambient_color;
-#endif
- diffuse.rgb+=ambientmap_color;
-#endif
-
-
-#ifdef USE_SHADOW_PASS
-
-#ifdef USE_DEPTH_SHADOWS
-
- //do nothing, depth is just written
-#else
- // pack depth to rgba
- //highp float bias = 0.0005;
- highp float depth = ((position_interp.z / position_interp.w) + 1.0) * 0.5 + 0.0;//bias;
- highp vec4 comp = fract(depth * vec4(256.0 * 256.0 * 256.0, 256.0 * 256.0, 256.0, 1.0));
- comp -= comp.xxyz * vec4(0, 1.0 / 256.0, 1.0 / 256.0, 1.0 / 256.0);
- gl_FragColor = comp;
-
-#endif
-
-#else
-
-
-
-#ifdef USE_GLOW
-
- diffuse.a=glow;
-#endif
-
-#ifdef USE_8BIT_HDR
- diffuse.rgb*=0.25;
-#endif
-
- gl_FragColor = diffuse;
-#endif
-}
-
-
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp
index 376a208559..ff0741f425 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.cpp
+++ b/drivers/gles3/rasterizer_canvas_gles3.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -574,6 +574,7 @@ void RasterizerCanvasGLES3::_canvas_item_render_commands(Item *p_item, Item *cur
Size2 texpixel_size(1.0 / texture->width, 1.0 / texture->height);
Rect2 src_rect = (rect->flags & CANVAS_RECT_REGION) ? Rect2(rect->source.position * texpixel_size, rect->source.size * texpixel_size) : Rect2(0, 0, 1, 1);
+ Rect2 dst_rect = Rect2(rect->rect.position, rect->rect.size);
if (rect->flags & CANVAS_RECT_FLIP_H) {
src_rect.size.x *= -1;
@@ -584,12 +585,12 @@ void RasterizerCanvasGLES3::_canvas_item_render_commands(Item *p_item, Item *cur
}
if (rect->flags & CANVAS_RECT_TRANSPOSE) {
- //err..
+ dst_rect.size.x *= -1; // Encoding in the dst_rect.z uniform
}
state.canvas_shader.set_uniform(CanvasShaderGLES3::COLOR_TEXPIXEL_SIZE, texpixel_size);
- state.canvas_shader.set_uniform(CanvasShaderGLES3::DST_RECT, Color(rect->rect.position.x, rect->rect.position.y, rect->rect.size.x, rect->rect.size.y));
+ state.canvas_shader.set_uniform(CanvasShaderGLES3::DST_RECT, Color(dst_rect.position.x, dst_rect.position.y, dst_rect.size.x, dst_rect.size.y));
state.canvas_shader.set_uniform(CanvasShaderGLES3::SRC_RECT, Color(src_rect.position.x, src_rect.position.y, src_rect.size.x, src_rect.size.y));
state.canvas_shader.set_uniform(CanvasShaderGLES3::CLIP_RECT_UV, (rect->flags & CANVAS_RECT_CLIP_UV) ? true : false);
@@ -1214,11 +1215,7 @@ void RasterizerCanvasGLES3::canvas_render_items(Item *p_item_list, int p_z, cons
last_blend_mode = blend_mode;
}
- state.canvas_item_modulate = unshaded ? ci->final_modulate : Color(
- ci->final_modulate.r * p_modulate.r,
- ci->final_modulate.g * p_modulate.g,
- ci->final_modulate.b * p_modulate.b,
- ci->final_modulate.a * p_modulate.a);
+ state.canvas_item_modulate = unshaded ? ci->final_modulate : Color(ci->final_modulate.r * p_modulate.r, ci->final_modulate.g * p_modulate.g, ci->final_modulate.b * p_modulate.b, ci->final_modulate.a * p_modulate.a);
state.final_transform = ci->final_transform;
state.extra_matrix = Transform2D();
@@ -1287,6 +1284,7 @@ void RasterizerCanvasGLES3::canvas_render_items(Item *p_item_list, int p_z, cons
case VS::CANVAS_LIGHT_FILTER_NONE: state.canvas_shader.set_conditional(CanvasShaderGLES3::SHADOW_FILTER_NEAREST, true); break;
case VS::CANVAS_LIGHT_FILTER_PCF3: state.canvas_shader.set_conditional(CanvasShaderGLES3::SHADOW_FILTER_PCF3, true); break;
case VS::CANVAS_LIGHT_FILTER_PCF5: state.canvas_shader.set_conditional(CanvasShaderGLES3::SHADOW_FILTER_PCF5, true); break;
+ case VS::CANVAS_LIGHT_FILTER_PCF7: state.canvas_shader.set_conditional(CanvasShaderGLES3::SHADOW_FILTER_PCF7, true); break;
case VS::CANVAS_LIGHT_FILTER_PCF9: state.canvas_shader.set_conditional(CanvasShaderGLES3::SHADOW_FILTER_PCF9, true); break;
case VS::CANVAS_LIGHT_FILTER_PCF13: state.canvas_shader.set_conditional(CanvasShaderGLES3::SHADOW_FILTER_PCF13, true); break;
}
@@ -1337,6 +1335,7 @@ void RasterizerCanvasGLES3::canvas_render_items(Item *p_item_list, int p_z, cons
state.canvas_shader.set_conditional(CanvasShaderGLES3::SHADOW_FILTER_NEAREST, false);
state.canvas_shader.set_conditional(CanvasShaderGLES3::SHADOW_FILTER_PCF3, false);
state.canvas_shader.set_conditional(CanvasShaderGLES3::SHADOW_FILTER_PCF5, false);
+ state.canvas_shader.set_conditional(CanvasShaderGLES3::SHADOW_FILTER_PCF7, false);
state.canvas_shader.set_conditional(CanvasShaderGLES3::SHADOW_FILTER_PCF9, false);
state.canvas_shader.set_conditional(CanvasShaderGLES3::SHADOW_FILTER_PCF13, false);
diff --git a/drivers/gles3/rasterizer_canvas_gles3.h b/drivers/gles3/rasterizer_canvas_gles3.h
index 29f889cc88..bf07b8b08b 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.h
+++ b/drivers/gles3/rasterizer_canvas_gles3.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp
index e025992c0b..d1c8ccfe21 100644
--- a/drivers/gles3/rasterizer_gles3.cpp
+++ b/drivers/gles3/rasterizer_gles3.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -247,11 +247,8 @@ void RasterizerGLES3::set_current_render_target(RID p_render_target) {
if (p_render_target.is_valid()) {
RasterizerStorageGLES3::RenderTarget *rt = storage->render_target_owner.getornull(p_render_target);
- if (!rt) {
- storage->frame.current_rt = NULL;
- }
- ERR_FAIL_COND(!rt);
storage->frame.current_rt = rt;
+ ERR_FAIL_COND(!rt);
storage->frame.clear_request = false;
glViewport(0, 0, rt->width, rt->height);
diff --git a/drivers/gles3/rasterizer_gles3.h b/drivers/gles3/rasterizer_gles3.h
index 4bc267ec7e..4bfec09bf3 100644
--- a/drivers/gles3/rasterizer_gles3.h
+++ b/drivers/gles3/rasterizer_gles3.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 05cfba726c..6bef039dd1 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* rasterizer_storage_gles3.cpp */
+/* rasterizer_scene_gles3.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -247,7 +247,7 @@ bool RasterizerSceneGLES3::_shadow_atlas_find_shadow(ShadowAtlas *shadow_atlas,
int qidx = p_in_quadrants[i];
- if (shadow_atlas->quadrants[qidx].subdivision == p_current_subdiv) {
+ if (shadow_atlas->quadrants[qidx].subdivision == (uint32_t)p_current_subdiv) {
return false;
}
@@ -257,7 +257,7 @@ bool RasterizerSceneGLES3::_shadow_atlas_find_shadow(ShadowAtlas *shadow_atlas,
int found_free_idx = -1; //found a free one
int found_used_idx = -1; //found existing one, must steal it
- uint64_t min_pass; // pass of the existing one, try to use the least recently used one (LRU fashion)
+ uint64_t min_pass = 0; // pass of the existing one, try to use the least recently used one (LRU fashion)
for (int j = 0; j < sc; j++) {
if (!sarr[j].owner.is_valid()) {
@@ -349,7 +349,7 @@ bool RasterizerSceneGLES3::shadow_atlas_update_light(RID p_atlas, RID p_light_in
uint32_t q = (key >> ShadowAtlas::QUADRANT_SHIFT) & 0x3;
uint32_t s = key & ShadowAtlas::SHADOW_INDEX_MASK;
- bool should_realloc = shadow_atlas->quadrants[q].subdivision != best_subdiv && (shadow_atlas->quadrants[q].shadows[s].alloc_tick - tick > shadow_atlas_realloc_tolerance_msec);
+ bool should_realloc = shadow_atlas->quadrants[q].subdivision != (uint32_t)best_subdiv && (shadow_atlas->quadrants[q].shadows[s].alloc_tick - tick > shadow_atlas_realloc_tolerance_msec);
bool should_redraw = shadow_atlas->quadrants[q].shadows[s].version != p_light_version;
if (!should_realloc) {
@@ -554,7 +554,7 @@ void RasterizerSceneGLES3::reflection_atlas_set_subdivision(RID p_ref_atlas, int
ReflectionAtlas *reflection_atlas = reflection_atlas_owner.getornull(p_ref_atlas);
ERR_FAIL_COND(!reflection_atlas);
- uint32_t subdiv = next_power_of_2(p_subdiv);
+ int subdiv = next_power_of_2(p_subdiv);
if (subdiv & 0xaaaaaaaa) { //sqrt(subdiv) must be integer
subdiv <<= 1;
}
@@ -1100,15 +1100,15 @@ bool RasterizerSceneGLES3::_setup_material(RasterizerStorageGLES3::Material *p_m
state.current_line_width = p_material->line_width;
}
- if (state.current_depth_test != (!p_material->shader->spatial.ontop)) {
- if (p_material->shader->spatial.ontop) {
+ if (state.current_depth_test != (!p_material->shader->spatial.no_depth_test)) {
+ if (p_material->shader->spatial.no_depth_test) {
glDisable(GL_DEPTH_TEST);
} else {
glEnable(GL_DEPTH_TEST);
}
- state.current_depth_test = !p_material->shader->spatial.ontop;
+ state.current_depth_test = !p_material->shader->spatial.no_depth_test;
}
if (state.current_depth_draw != p_material->shader->spatial.depth_draw_mode) {
@@ -2194,8 +2194,8 @@ void RasterizerSceneGLES3::_add_geometry(RasterizerStorageGLES3::Geometry *p_geo
void RasterizerSceneGLES3::_add_geometry_with_material(RasterizerStorageGLES3::Geometry *p_geometry, InstanceBase *p_instance, RasterizerStorageGLES3::GeometryOwner *p_owner, RasterizerStorageGLES3::Material *p_material, bool p_shadow) {
- bool has_base_alpha = (p_material->shader->spatial.uses_alpha && !p_material->shader->spatial.uses_alpha_scissor) || p_material->shader->spatial.uses_screen_texture || p_material->shader->spatial.unshaded;
- bool has_blend_alpha = p_material->shader->spatial.blend_mode != RasterizerStorageGLES3::Shader::Spatial::BLEND_MODE_MIX || p_material->shader->spatial.ontop;
+ bool has_base_alpha = (p_material->shader->spatial.uses_alpha && !p_material->shader->spatial.uses_alpha_scissor) || p_material->shader->spatial.uses_screen_texture;
+ bool has_blend_alpha = p_material->shader->spatial.blend_mode != RasterizerStorageGLES3::Shader::Spatial::BLEND_MODE_MIX;
bool has_alpha = has_base_alpha || has_blend_alpha;
bool shadow = false;
@@ -2267,7 +2267,7 @@ void RasterizerSceneGLES3::_add_geometry_with_material(RasterizerStorageGLES3::G
}
e->sort_key |= uint64_t(e->material->index) << RenderList::SORT_KEY_MATERIAL_INDEX_SHIFT;
- e->sort_key |= uint64_t(e->instance->depth_layer) << RenderList::SORT_KEY_DEPTH_LAYER_SHIFT;
+ e->sort_key |= uint64_t(e->instance->depth_layer) << RenderList::SORT_KEY_OPAQUE_DEPTH_LAYER_SHIFT;
if (!has_blend_alpha && has_alpha && p_material->shader->spatial.depth_draw_mode == RasterizerStorageGLES3::Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS) {
@@ -2283,6 +2283,8 @@ void RasterizerSceneGLES3::_add_geometry_with_material(RasterizerStorageGLES3::G
if (e->instance->gi_probe_instances.size()) {
e->sort_key |= SORT_KEY_GI_PROBES_FLAG;
}
+
+ e->sort_key |= uint64_t(p_material->render_priority + 128) << RenderList::SORT_KEY_PRIORITY_SHIFT;
}
/*
@@ -2700,7 +2702,7 @@ void RasterizerSceneGLES3::_setup_lights(RID *p_light_cull_result, int p_light_c
uint32_t quadrant = (key >> ShadowAtlas::QUADRANT_SHIFT) & 0x3;
uint32_t shadow = key & ShadowAtlas::SHADOW_INDEX_MASK;
- ERR_CONTINUE(shadow >= shadow_atlas->quadrants[quadrant].shadows.size());
+ ERR_CONTINUE(shadow >= (uint32_t)shadow_atlas->quadrants[quadrant].shadows.size());
uint32_t atlas_size = shadow_atlas->size;
uint32_t quadrant_size = atlas_size >> 1;
@@ -2787,7 +2789,7 @@ void RasterizerSceneGLES3::_setup_lights(RID *p_light_cull_result, int p_light_c
uint32_t quadrant = (key >> ShadowAtlas::QUADRANT_SHIFT) & 0x3;
uint32_t shadow = key & ShadowAtlas::SHADOW_INDEX_MASK;
- ERR_CONTINUE(shadow >= shadow_atlas->quadrants[quadrant].shadows.size());
+ ERR_CONTINUE(shadow >= (uint32_t)shadow_atlas->quadrants[quadrant].shadows.size());
uint32_t atlas_size = shadow_atlas->size;
uint32_t quadrant_size = atlas_size >> 1;
@@ -3259,6 +3261,8 @@ void RasterizerSceneGLES3::_render_mrts(Environment *env, const CameraMatrix &p_
state.ssao_blur_shader.set_uniform(SsaoBlurShaderGLES3::CAMERA_Z_NEAR, p_cam_projection.get_z_near());
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);
+
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, storage->frame.current_rt->effects.ssao.blur_red[i]);
glActiveTexture(GL_TEXTURE1);
@@ -4280,7 +4284,7 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
glEnable(GL_DEPTH_TEST);
glDisable(GL_SCISSOR_TEST);
- render_list.sort_by_reverse_depth(true);
+ render_list.sort_by_reverse_depth_and_priority(true);
if (state.directional_light_count == 0) {
directional_light = NULL;
@@ -4443,9 +4447,10 @@ void RasterizerSceneGLES3::render_shadow(RID p_light, RID p_shadow_atlas, int p_
}
}
+ float bias_mult = Math::lerp(1.0f, light_instance->shadow_transform[p_pass].bias_scale, light->param[VS::LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE]);
zfar = light->param[VS::LIGHT_PARAM_RANGE];
- bias = light->param[VS::LIGHT_PARAM_SHADOW_BIAS] * light_instance->shadow_transform[p_pass].bias_scale;
- normal_bias = light->param[VS::LIGHT_PARAM_SHADOW_NORMAL_BIAS] * light_instance->shadow_transform[p_pass].bias_scale;
+ bias = light->param[VS::LIGHT_PARAM_SHADOW_BIAS] * bias_mult;
+ normal_bias = light->param[VS::LIGHT_PARAM_SHADOW_NORMAL_BIAS] * bias_mult;
fbo = directional_shadow.fbo;
vp_height = directional_shadow.size;
@@ -4464,7 +4469,7 @@ void RasterizerSceneGLES3::render_shadow(RID p_light, RID p_shadow_atlas, int p_
uint32_t quadrant = (key >> ShadowAtlas::QUADRANT_SHIFT) & 0x3;
uint32_t shadow = key & ShadowAtlas::SHADOW_INDEX_MASK;
- ERR_FAIL_INDEX(shadow, shadow_atlas->quadrants[quadrant].shadows.size());
+ ERR_FAIL_INDEX((int)shadow, shadow_atlas->quadrants[quadrant].shadows.size());
uint32_t quadrant_size = shadow_atlas->size >> 1;
diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h
index 94781c53e8..5503dba5c4 100644
--- a/drivers/gles3/rasterizer_scene_gles3.h
+++ b/drivers/gles3/rasterizer_scene_gles3.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -108,7 +108,7 @@ public:
TonemapShaderGLES3 tonemap_shader;
struct SceneDataUBO {
-
+ //this is a std140 compatible struct. Please read the OpenGL 3.3 Specificaiton spec before doing any changes
float projection_matrix[16];
float camera_inverse_matrix[16];
float camera_matrix[16];
@@ -133,12 +133,12 @@ public:
float subsurface_scatter_width;
float ambient_occlusion_affect_light;
- bool fog_depth_enabled;
+ uint32_t fog_depth_enabled;
float fog_depth_begin;
float fog_depth_curve;
- bool fog_transmit_enabled;
+ uint32_t fog_transmit_enabled;
float fog_transmit_curve;
- bool fog_height_enabled;
+ uint32_t fog_height_enabled;
float fog_height_min;
float fog_height_max;
float fog_height_curve;
@@ -244,7 +244,7 @@ public:
GLuint fbo_id[6];
GLuint cubemap;
- int size;
+ uint32_t size;
};
Vector<ShadowCubeMap> shadow_cubemaps;
@@ -531,7 +531,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_radius2, float p_intensity2, float p_intensity, 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, bool p_blur);
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);
@@ -645,17 +645,25 @@ public:
MAX_LIGHTS = 4096,
MAX_REFLECTIONS = 1024,
- SORT_KEY_DEPTH_LAYER_SHIFT = 60,
+ SORT_KEY_PRIORITY_SHIFT = 56,
+ SORT_KEY_PRIORITY_MASK = 0xFF,
+ //depth layer for opaque (56-52)
+ SORT_KEY_OPAQUE_DEPTH_LAYER_SHIFT = 52,
+ SORT_KEY_OPAQUE_DEPTH_LAYER_MASK = 0xF,
//64 bits unsupported in MSVC
-#define SORT_KEY_UNSHADED_FLAG (uint64_t(1) << 59)
-#define SORT_KEY_NO_DIRECTIONAL_FLAG (uint64_t(1) << 58)
-#define SORT_KEY_GI_PROBES_FLAG (uint64_t(1) << 57)
-#define SORT_KEY_VERTEX_LIT_FLAG (uint64_t(1) << 56)
- SORT_KEY_SHADING_SHIFT = 56,
+#define SORT_KEY_UNSHADED_FLAG (uint64_t(1) << 51)
+#define SORT_KEY_NO_DIRECTIONAL_FLAG (uint64_t(1) << 50)
+#define SORT_KEY_GI_PROBES_FLAG (uint64_t(1) << 49)
+#define SORT_KEY_VERTEX_LIT_FLAG (uint64_t(1) << 48)
+ SORT_KEY_SHADING_SHIFT = 48,
SORT_KEY_SHADING_MASK = 15,
- SORT_KEY_MATERIAL_INDEX_SHIFT = 40,
- SORT_KEY_GEOMETRY_INDEX_SHIFT = 20,
- SORT_KEY_GEOMETRY_TYPE_SHIFT = 15,
+ //48-32 material index
+ SORT_KEY_MATERIAL_INDEX_SHIFT = 32,
+ //32-12 geometry index
+ SORT_KEY_GEOMETRY_INDEX_SHIFT = 12,
+ //bits 12-8 geometry type
+ SORT_KEY_GEOMETRY_TYPE_SHIFT = 8,
+ //bits 0-7 for flags
SORT_KEY_CULL_DISABLED_FLAG = 4,
SORT_KEY_SKELETON_FLAG = 2,
SORT_KEY_MIRROR_FLAG = 1
@@ -721,16 +729,22 @@ public:
}
}
- struct SortByReverseDepth {
+ struct SortByReverseDepthAndPriority {
_FORCE_INLINE_ bool operator()(const Element *A, const Element *B) const {
- return A->instance->depth > B->instance->depth;
+ uint32_t layer_A = uint32_t(A->sort_key >> SORT_KEY_PRIORITY_SHIFT);
+ uint32_t layer_B = uint32_t(B->sort_key >> SORT_KEY_PRIORITY_SHIFT);
+ if (layer_A == layer_B) {
+ return A->instance->depth > B->instance->depth;
+ } else {
+ return layer_A < layer_B;
+ }
}
};
- void sort_by_reverse_depth(bool p_alpha) { //used for alpha
+ void sort_by_reverse_depth_and_priority(bool p_alpha) { //used for alpha
- SortArray<Element *, SortByReverseDepth> sorter;
+ SortArray<Element *, SortByReverseDepthAndPriority> sorter;
if (p_alpha) {
sorter.sort(&elements[max_elements - alpha_element_count], alpha_element_count);
} else {
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index 68731308a9..91ba3aa702 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -1599,7 +1599,7 @@ void RasterizerStorageGLES3::_update_shader(Shader *p_shader) const {
p_shader->spatial.uses_alpha_scissor = false;
p_shader->spatial.uses_discard = false;
p_shader->spatial.unshaded = false;
- p_shader->spatial.ontop = false;
+ p_shader->spatial.no_depth_test = false;
p_shader->spatial.uses_sss = false;
p_shader->spatial.uses_vertex_lighting = false;
p_shader->spatial.uses_screen_texture = false;
@@ -1621,7 +1621,7 @@ void RasterizerStorageGLES3::_update_shader(Shader *p_shader) const {
shaders.actions_scene.render_mode_values["cull_disabled"] = Pair<int *, int>(&p_shader->spatial.cull_mode, Shader::Spatial::CULL_MODE_DISABLED);
shaders.actions_scene.render_mode_flags["unshaded"] = &p_shader->spatial.unshaded;
- shaders.actions_scene.render_mode_flags["ontop"] = &p_shader->spatial.ontop;
+ shaders.actions_scene.render_mode_flags["depth_test_disable"] = &p_shader->spatial.no_depth_test;
shaders.actions_scene.render_mode_flags["vertex_lighting"] = &p_shader->spatial.uses_vertex_lighting;
@@ -1948,6 +1948,17 @@ void RasterizerStorageGLES3::material_remove_instance_owner(RID p_material, Rast
}
}
+void RasterizerStorageGLES3::material_set_render_priority(RID p_material, int priority) {
+
+ ERR_FAIL_COND(priority < VS::MATERIAL_RENDER_PRIORITY_MIN);
+ ERR_FAIL_COND(priority > VS::MATERIAL_RENDER_PRIORITY_MAX);
+
+ Material *material = material_owner.get(p_material);
+ ERR_FAIL_COND(!material);
+
+ material->render_priority = priority;
+}
+
_FORCE_INLINE_ static void _fill_std140_variant_ubo_value(ShaderLanguage::DataType type, const Variant &value, uint8_t *data, bool p_linear_color) {
switch (type) {
case ShaderLanguage::TYPE_BOOL: {
@@ -3963,7 +3974,7 @@ Color RasterizerStorageGLES3::multimesh_instance_get_color(RID p_multimesh, int
ERR_FAIL_COND_V(multimesh->color_format == VS::MULTIMESH_COLOR_NONE, Color());
int stride = multimesh->color_floats + multimesh->xform_floats;
- float *dataptr = &multimesh->data[stride * p_index + multimesh->color_floats];
+ float *dataptr = &multimesh->data[stride * p_index + multimesh->xform_floats];
if (multimesh->color_format == VS::MULTIMESH_COLOR_8BIT) {
union {
@@ -3971,6 +3982,8 @@ Color RasterizerStorageGLES3::multimesh_instance_get_color(RID p_multimesh, int
float colf;
} cu;
+ cu.colf = dataptr[0];
+
return Color::hex(BSWAP32(cu.colu));
} else if (multimesh->color_format == VS::MULTIMESH_COLOR_FLOAT) {
@@ -4448,6 +4461,7 @@ RID RasterizerStorageGLES3::light_create(VS::LightType p_type) {
light->param[VS::LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET] = 0.3;
light->param[VS::LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET] = 0.6;
light->param[VS::LIGHT_PARAM_SHADOW_NORMAL_BIAS] = 0.1;
+ light->param[VS::LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE] = 0.1;
light->color = Color(1, 1, 1, 1);
light->shadow = false;
@@ -4854,35 +4868,6 @@ float RasterizerStorageGLES3::reflection_probe_get_origin_max_distance(RID p_pro
return reflection_probe->max_distance;
}
-/* ROOM API */
-
-RID RasterizerStorageGLES3::room_create() {
-
- return RID();
-}
-void RasterizerStorageGLES3::room_add_bounds(RID p_room, const PoolVector<Vector2> &p_convex_polygon, float p_height, const Transform &p_transform) {
-}
-void RasterizerStorageGLES3::room_clear_bounds(RID p_room) {
-}
-
-/* PORTAL API */
-
-// portals are only (x/y) points, forming a convex shape, which its clockwise
-// order points outside. (z is 0);
-
-RID RasterizerStorageGLES3::portal_create() {
-
- return RID();
-}
-void RasterizerStorageGLES3::portal_set_shape(RID p_portal, const Vector<Point2> &p_shape) {
-}
-void RasterizerStorageGLES3::portal_set_enabled(RID p_portal, bool p_enabled) {
-}
-void RasterizerStorageGLES3::portal_set_disable_distance(RID p_portal, float p_distance) {
-}
-void RasterizerStorageGLES3::portal_set_disabled_color(RID p_portal, const Color &p_color) {
-}
-
RID RasterizerStorageGLES3::gi_probe_create() {
GIProbe *gip = memnew(GIProbe);
diff --git a/drivers/gles3/rasterizer_storage_gles3.h b/drivers/gles3/rasterizer_storage_gles3.h
index f612d9e879..f75b77aabe 100644
--- a/drivers/gles3/rasterizer_storage_gles3.h
+++ b/drivers/gles3/rasterizer_storage_gles3.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -444,7 +444,7 @@ public:
bool uses_alpha;
bool uses_alpha_scissor;
bool unshaded;
- bool ontop;
+ bool no_depth_test;
bool uses_vertex;
bool uses_discard;
bool uses_sss;
@@ -502,6 +502,7 @@ public:
SelfList<Material> dirty_list;
Vector<RID> textures;
float line_width;
+ int render_priority;
RID next_pass;
@@ -523,6 +524,7 @@ public:
ubo_id = 0;
ubo_size = 0;
last_pass = 0;
+ render_priority = 0;
}
};
@@ -550,6 +552,8 @@ public:
virtual void material_add_instance_owner(RID p_material, RasterizerScene::InstanceBase *p_instance);
virtual void material_remove_instance_owner(RID p_material, RasterizerScene::InstanceBase *p_instance);
+ virtual void material_set_render_priority(RID p_material, int priority);
+
void _update_material(Material *material);
void update_dirty_materials();
@@ -953,23 +957,6 @@ public:
virtual float reflection_probe_get_origin_max_distance(RID p_probe) const;
virtual bool reflection_probe_renders_shadows(RID p_probe) const;
- /* ROOM API */
-
- virtual RID room_create();
- virtual void room_add_bounds(RID p_room, const PoolVector<Vector2> &p_convex_polygon, float p_height, const Transform &p_transform);
- virtual void room_clear_bounds(RID p_room);
-
- /* PORTAL API */
-
- // portals are only (x/y) points, forming a convex shape, which its clockwise
- // order points outside. (z is 0);
-
- virtual RID portal_create();
- virtual void portal_set_shape(RID p_portal, const Vector<Point2> &p_shape);
- virtual void portal_set_enabled(RID p_portal, bool p_enabled);
- virtual void portal_set_disable_distance(RID p_portal, float p_distance);
- virtual void portal_set_disabled_color(RID p_portal, const Color &p_color);
-
/* GI PROBE API */
struct GIProbe : public Instantiable {
diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp
index c014caee8d..c308e9eddb 100644
--- a/drivers/gles3/shader_compiler_gles3.cpp
+++ b/drivers/gles3/shader_compiler_gles3.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -608,6 +608,9 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener
} else {
code = "return;";
}
+ } else if (cfnode->flow_op == SL::FLOW_OP_DISCARD) {
+
+ code = "discard;";
}
} break;
@@ -626,13 +629,11 @@ Error ShaderCompilerGLES3::compile(VS::ShaderMode p_mode, const String &p_code,
Error err = parser.compile(p_code, ShaderTypes::get_singleton()->get_functions(p_mode), ShaderTypes::get_singleton()->get_modes(p_mode), ShaderTypes::get_singleton()->get_types());
if (err != OK) {
-#if 1
Vector<String> shader = p_code.split("\n");
for (int i = 0; i < shader.size(); i++) {
print_line(itos(i) + " " + shader[i]);
}
-#endif
_err_print_error(NULL, p_path.utf8().get_data(), parser.get_error_line(), parser.get_error_text().utf8().get_data(), ERR_HANDLER_SHADER);
return err;
@@ -754,7 +755,6 @@ ShaderCompilerGLES3::ShaderCompilerGLES3() {
actions[VS::SHADER_SPATIAL].renames["SSS_STRENGTH"] = "sss_strength";
actions[VS::SHADER_SPATIAL].renames["AO"] = "ao";
actions[VS::SHADER_SPATIAL].renames["EMISSION"] = "emission";
- actions[VS::SHADER_SPATIAL].renames["DISCARD"] = "_discard";
//actions[VS::SHADER_SPATIAL].renames["SCREEN_UV"]=ShaderLanguage::TYPE_VEC2;
actions[VS::SHADER_SPATIAL].renames["POINT_COORD"] = "gl_PointCoord";
actions[VS::SHADER_SPATIAL].renames["INSTANCE_CUSTOM"] = "instance_custom";
diff --git a/drivers/gles3/shader_compiler_gles3.h b/drivers/gles3/shader_compiler_gles3.h
index e79fdb3ba3..46bb6b1b9e 100644
--- a/drivers/gles3/shader_compiler_gles3.h
+++ b/drivers/gles3/shader_compiler_gles3.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp
index 20956ad644..d4ef256a33 100644
--- a/drivers/gles3/shader_gles3.cpp
+++ b/drivers/gles3/shader_gles3.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/gles3/shader_gles3.h b/drivers/gles3/shader_gles3.h
index 6a399a74cc..3be0e86496 100644
--- a/drivers/gles3/shader_gles3.h
+++ b/drivers/gles3/shader_gles3.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/gles3/shaders/SCsub b/drivers/gles3/shaders/SCsub
index 0c69c8cf74..f1811fa7b5 100644
--- a/drivers/gles3/shaders/SCsub
+++ b/drivers/gles3/shaders/SCsub
@@ -2,7 +2,7 @@
Import('env')
-if env['BUILDERS'].has_key('GLES3_GLSL'):
+if 'GLES3_GLSL' in env['BUILDERS']:
env.GLES3_GLSL('copy.glsl');
env.GLES3_GLSL('resolve.glsl');
env.GLES3_GLSL('canvas.glsl');
diff --git a/drivers/gles3/shaders/canvas.glsl b/drivers/gles3/shaders/canvas.glsl
index f0dc14c35a..3bcfd24383 100644
--- a/drivers/gles3/shaders/canvas.glsl
+++ b/drivers/gles3/shaders/canvas.glsl
@@ -116,9 +116,12 @@ void main() {
#ifdef USE_TEXTURE_RECT
-
- uv_interp = src_rect.xy + abs(src_rect.zw) * vertex;
- highp vec4 outvec = vec4(dst_rect.xy + dst_rect.zw * mix(vertex,vec2(1.0,1.0)-vertex,lessThan(src_rect.zw,vec2(0.0,0.0))),0.0,1.0);
+ if (dst_rect.z < 0) { // Transpose is encoded as negative dst_rect.z
+ uv_interp = src_rect.xy + abs(src_rect.zw) * vertex.yx;
+ } else {
+ uv_interp = src_rect.xy + abs(src_rect.zw) * vertex;
+ }
+ highp vec4 outvec = vec4(dst_rect.xy + abs(dst_rect.zw) * mix(vertex,vec2(1.0,1.0)-vertex,lessThan(src_rect.zw,vec2(0.0,0.0))),0.0,1.0);
#else
uv_interp = uv_attrib;
@@ -572,6 +575,18 @@ FRAGMENT_SHADER_CODE
#ifdef SHADOW_FILTER_PCF5
+ SHADOW_TEST(su+shadowpixel_size*2.0);
+ SHADOW_TEST(su+shadowpixel_size);
+ SHADOW_TEST(su);
+ SHADOW_TEST(su-shadowpixel_size);
+ SHADOW_TEST(su-shadowpixel_size*2.0);
+ shadow_attenuation/=5.0;
+
+#endif
+
+
+#ifdef SHADOW_FILTER_PCF7
+
SHADOW_TEST(su+shadowpixel_size*3.0);
SHADOW_TEST(su+shadowpixel_size*2.0);
SHADOW_TEST(su+shadowpixel_size);
@@ -579,7 +594,7 @@ FRAGMENT_SHADER_CODE
SHADOW_TEST(su-shadowpixel_size);
SHADOW_TEST(su-shadowpixel_size*2.0);
SHADOW_TEST(su-shadowpixel_size*3.0);
- shadow_attenuation/=5.0;
+ shadow_attenuation/=7.0;
#endif
@@ -635,4 +650,3 @@ FRAGMENT_SHADER_CODE
frag_color = color;
}
-
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index e6476bd6b6..ef4925895c 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -1559,10 +1559,6 @@ void main() {
vec2 screen_uv = gl_FragCoord.xy*screen_pixel_size;
#endif
-#if defined(ENABLE_DISCARD)
- bool discard_=false;
-#endif
-
#if defined (ENABLE_SSS)
float sss_strength=0.0;
#endif
@@ -1603,13 +1599,6 @@ FRAGMENT_SHADER_CODE
#endif
-#if defined(ENABLE_DISCARD)
- if (discard_) {
- //easy to eliminate dead code
- discard;
- }
-#endif
-
#ifdef ENABLE_CLIP_ALPHA
if (albedo.a<0.99) {
//used for doublepass and shadowmapping
@@ -1969,6 +1958,13 @@ FRAGMENT_SHADER_CODE
#ifdef USE_MULTIPLE_RENDER_TARGETS
+
+#ifdef SHADELESS
+ diffuse_buffer=vec4(albedo.rgb,0.0);
+ specular_buffer=vec4(0.0);
+
+#else
+
#if defined(ENABLE_AO)
float ambient_scale=0.0; // AO is supplied by material
@@ -1984,6 +1980,7 @@ FRAGMENT_SHADER_CODE
diffuse_buffer=vec4(emission+diffuse_light+ambient_light,ambient_scale);
specular_buffer=vec4(specular_light,metallic);
+#endif //SHADELESS
normal_mr_buffer=vec4(normalize(normal)*0.5+0.5,roughness);
@@ -1991,6 +1988,7 @@ FRAGMENT_SHADER_CODE
sss_buffer = sss_strength;
#endif
+
#else //USE_MULTIPLE_RENDER_TARGETS
diff --git a/drivers/gles3/shaders/ssao_blur.glsl b/drivers/gles3/shaders/ssao_blur.glsl
index ce4154f50c..c7c978dc37 100644
--- a/drivers/gles3/shaders/ssao_blur.glsl
+++ b/drivers/gles3/shaders/ssao_blur.glsl
@@ -56,6 +56,8 @@ uniform ivec2 axis;
uniform float camera_z_far;
uniform float camera_z_near;
+uniform ivec2 screen_size;
+
void main() {
ivec2 ssC = ivec2(gl_FragCoord.xy);
@@ -83,6 +85,7 @@ void main() {
float totalWeight = BASE;
sum *= totalWeight;
+ ivec2 clamp_limit = screen_size - ivec2(1);
for (int r = -R; r <= R; ++r) {
// We already handled the zero case above. This loop should be unrolled and the static branch optimized out,
@@ -90,8 +93,8 @@ void main() {
if (r != 0) {
ivec2 ppos = ssC + axis * (r * SCALE);
- float value = texelFetch(source_ssao, ppos, 0).r;
- float temp_depth = texelFetch(source_depth, ssC, 0).r;
+ 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;
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));
diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp
index 30ec8cd036..246d4d7650 100644
--- a/drivers/png/image_loader_png.cpp
+++ b/drivers/png/image_loader_png.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -216,8 +216,8 @@ void ImageLoaderPNG::get_recognized_extensions(List<String> *p_extensions) const
struct PNGReadStatus {
- int offset;
- int size;
+ uint32_t offset;
+ uint32_t size;
const unsigned char *image;
};
diff --git a/drivers/png/image_loader_png.h b/drivers/png/image_loader_png.h
index c11e25e1a4..fe14108194 100644
--- a/drivers/png/image_loader_png.h
+++ b/drivers/png/image_loader_png.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp
index 4f1f318aee..98a3f21245 100644
--- a/drivers/png/resource_saver_png.cpp
+++ b/drivers/png/resource_saver_png.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -187,7 +187,7 @@ bool ResourceSaverPNG::recognize(const RES &p_resource) const {
}
void ResourceSaverPNG::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const {
- if (p_resource->cast_to<Texture>()) {
+ if (Object::cast_to<Texture>(*p_resource)) {
p_extensions->push_back("png");
}
}
diff --git a/drivers/png/resource_saver_png.h b/drivers/png/resource_saver_png.h
index 31ec35c192..a9ff6db86a 100644
--- a/drivers/png/resource_saver_png.h
+++ b/drivers/png/resource_saver_png.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
index 5acf9bf46e..1798c84d85 100644
--- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp
+++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -33,6 +33,7 @@
#include <pulse/error.h>
+#include "os/os.h"
#include "project_settings.h"
Error AudioDriverPulseAudio::init() {
@@ -44,7 +45,7 @@ Error AudioDriverPulseAudio::init() {
samples_in = NULL;
samples_out = NULL;
- mix_rate = GLOBAL_DEF("audio/mix_rate", 44100);
+ mix_rate = GLOBAL_DEF("audio/mix_rate", DEFAULT_MIX_RATE);
speaker_mode = SPEAKER_MODE_STEREO;
channels = 2;
@@ -53,12 +54,17 @@ Error AudioDriverPulseAudio::init() {
spec.channels = channels;
spec.rate = mix_rate;
- int latency = GLOBAL_DEF("audio/output_latency", 25);
- buffer_size = closest_power_of_2(latency * mix_rate / 1000);
+ int latency = GLOBAL_DEF("audio/output_latency", DEFAULT_OUTPUT_LATENCY);
+ buffer_frames = closest_power_of_2(latency * mix_rate / 1000);
+ buffer_size = buffer_frames * channels;
+
+ if (OS::get_singleton()->is_stdout_verbose()) {
+ print_line("audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms");
+ }
pa_buffer_attr attr;
- // set to appropriate buffer size from global settings
- attr.tlength = buffer_size;
+ // set to appropriate buffer length (in bytes) from global settings
+ attr.tlength = buffer_size * sizeof(int16_t);
// set them to be automatically chosen
attr.prebuf = (uint32_t)-1;
attr.maxlength = (uint32_t)-1;
@@ -80,8 +86,8 @@ Error AudioDriverPulseAudio::init() {
ERR_FAIL_COND_V(pulse == NULL, ERR_CANT_OPEN);
}
- samples_in = memnew_arr(int32_t, buffer_size * channels);
- samples_out = memnew_arr(int16_t, buffer_size * channels);
+ samples_in = memnew_arr(int32_t, buffer_size);
+ samples_out = memnew_arr(int16_t, buffer_size);
mutex = Mutex::create();
thread = Thread::create(AudioDriverPulseAudio::thread_func, this);
@@ -106,18 +112,18 @@ void AudioDriverPulseAudio::thread_func(void *p_udata) {
while (!ad->exit_thread) {
if (!ad->active) {
- for (unsigned int i = 0; i < ad->buffer_size * ad->channels; i++) {
+ for (unsigned int i = 0; i < ad->buffer_size; i++) {
ad->samples_out[i] = 0;
}
} else {
ad->lock();
- ad->audio_server_process(ad->buffer_size, ad->samples_in);
+ ad->audio_server_process(ad->buffer_frames, ad->samples_in);
ad->unlock();
- for (unsigned int i = 0; i < ad->buffer_size * ad->channels; i++) {
+ for (unsigned int i = 0; i < ad->buffer_size; i++) {
ad->samples_out[i] = ad->samples_in[i] >> 16;
}
}
@@ -125,7 +131,7 @@ void AudioDriverPulseAudio::thread_func(void *p_udata) {
// pa_simple_write always consumes the entire buffer
int error_code;
- int byte_size = ad->buffer_size * sizeof(int16_t) * ad->channels;
+ int byte_size = ad->buffer_size * sizeof(int16_t);
if (pa_simple_write(ad->pulse, ad->samples_out, byte_size, &error_code) < 0) {
// can't recover here
fprintf(stderr, "PulseAudio failed and can't recover: %s\n", pa_strerror(error_code));
@@ -175,13 +181,20 @@ void AudioDriverPulseAudio::finish() {
exit_thread = true;
Thread::wait_to_finish(thread);
- if (pulse)
+ if (pulse) {
pa_simple_free(pulse);
+ pulse = NULL;
+ }
if (samples_in) {
memdelete_arr(samples_in);
+ samples_in = NULL;
+ }
+
+ if (samples_out) {
memdelete_arr(samples_out);
- };
+ samples_out = NULL;
+ }
memdelete(thread);
if (mutex) {
@@ -194,10 +207,15 @@ void AudioDriverPulseAudio::finish() {
AudioDriverPulseAudio::AudioDriverPulseAudio() {
+ samples_in = NULL;
+ samples_out = NULL;
mutex = NULL;
thread = NULL;
pulse = NULL;
latency = 0;
+ buffer_frames = 0;
+ buffer_size = 0;
+ channels = 0;
}
AudioDriverPulseAudio::~AudioDriverPulseAudio() {
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.h b/drivers/pulseaudio/audio_driver_pulseaudio.h
index 3ce031e616..9ae0b7e50c 100644
--- a/drivers/pulseaudio/audio_driver_pulseaudio.h
+++ b/drivers/pulseaudio/audio_driver_pulseaudio.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -51,6 +51,7 @@ class AudioDriverPulseAudio : public AudioDriver {
unsigned int mix_rate;
SpeakerMode speaker_mode;
+ unsigned int buffer_frames;
unsigned int buffer_size;
int channels;
diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp
index ca2f03c75a..ffe7d77a4a 100644
--- a/drivers/register_driver_types.cpp
+++ b/drivers/register_driver_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/register_driver_types.h b/drivers/register_driver_types.h
index 63c50f6720..f02db428ce 100644
--- a/drivers/register_driver_types.h
+++ b/drivers/register_driver_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/rtaudio/audio_driver_rtaudio.cpp b/drivers/rtaudio/audio_driver_rtaudio.cpp
index 8466f55afc..ae5fdd28b6 100644
--- a/drivers/rtaudio/audio_driver_rtaudio.cpp
+++ b/drivers/rtaudio/audio_driver_rtaudio.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -104,78 +104,42 @@ Error AudioDriverRtAudio::init() {
RtAudio::StreamOptions options;
// set the desired numberOfBuffers
- unsigned int target_number_of_buffers = 4;
- options.numberOfBuffers = target_number_of_buffers;
-
- //options.
- //RtAudioStreamFlags flags; /*!< A bit-mask of stream flags (RTAUDIO_NONINTERLEAVED, RTAUDIO_MINIMIZE_LATENCY, RTAUDIO_HOG_DEVICE). *///
- //unsigned int numberOfBuffers; /*!< Number of stream buffers. */
- //std::string streamName; /*!< A stream name (currently used only in Jack). */
- //int priority; /*!< Scheduling priority of callback thread (only used with flag RTAUDIO_SCHEDULE_REALTIME). */
+ options.numberOfBuffers = 4;
parameters.firstChannel = 0;
- mix_rate = GLOBAL_DEF("audio/mix_rate", 44100);
+ mix_rate = GLOBAL_DEF("audio/mix_rate", DEFAULT_MIX_RATE);
- int latency = GLOBAL_DEF("audio/output_latency", 25);
- // calculate desired buffer_size, taking the desired numberOfBuffers into account (latency depends on numberOfBuffers*buffer_size)
- unsigned int buffer_size = closest_power_of_2(latency * mix_rate / 1000 / target_number_of_buffers);
+ int latency = GLOBAL_DEF("audio/output_latency", DEFAULT_OUTPUT_LATENCY);
+ unsigned int buffer_frames = closest_power_of_2(latency * mix_rate / 1000);
if (OS::get_singleton()->is_stdout_verbose()) {
- print_line("audio buffer size: " + itos(buffer_size));
+ print_line("audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms");
}
short int tries = 2;
- while (true) {
- while (true) {
- switch (speaker_mode) {
- case SPEAKER_MODE_STEREO: parameters.nChannels = 2; break;
- case SPEAKER_SURROUND_51: parameters.nChannels = 6; break;
- case SPEAKER_SURROUND_71: parameters.nChannels = 8; break;
- };
-
- try {
- dac->openStream(&parameters, NULL, RTAUDIO_SINT32, mix_rate, &buffer_size, &callback, this, &options);
- active = true;
-
- break;
- } catch (RtAudioError &e) {
- // try with less channels
- ERR_PRINT("Unable to open audio, retrying with fewer channels..");
-
- switch (speaker_mode) {
- case SPEAKER_MODE_STEREO: speaker_mode = SPEAKER_MODE_STEREO; break;
- case SPEAKER_SURROUND_51: speaker_mode = SPEAKER_SURROUND_51; break;
- case SPEAKER_SURROUND_71: speaker_mode = SPEAKER_SURROUND_71; break;
- };
- }
- }
+ while (tries >= 0) {
+ switch (speaker_mode) {
+ case SPEAKER_MODE_STEREO: parameters.nChannels = 2; break;
+ case SPEAKER_SURROUND_51: parameters.nChannels = 6; break;
+ case SPEAKER_SURROUND_71: parameters.nChannels = 8; break;
+ };
- // compare actual numberOfBuffers with the desired one. If not equal, close and reopen the stream with adjusted buffer size, so the desired output_latency is still correct
- if (target_number_of_buffers != options.numberOfBuffers) {
- if (tries <= 0) {
- ERR_EXPLAIN("RtAudio: Unable to set correct number of buffers.");
- ERR_FAIL_V(ERR_UNAVAILABLE);
- break;
- }
+ try {
+ dac->openStream(&parameters, NULL, RTAUDIO_SINT32, mix_rate, &buffer_frames, &callback, this, &options);
+ active = true;
- try {
- dac->closeStream();
- active = false;
- } catch (RtAudioError &e) {
- ERR_PRINT(e.what());
- ERR_FAIL_V(ERR_UNAVAILABLE);
- break;
+ break;
+ } catch (RtAudioError &e) {
+ // try with less channels
+ ERR_PRINT("Unable to open audio, retrying with fewer channels..");
+
+ switch (speaker_mode) {
+ case SPEAKER_SURROUND_51: speaker_mode = SPEAKER_MODE_STEREO; break;
+ case SPEAKER_SURROUND_71: speaker_mode = SPEAKER_SURROUND_51; break;
}
- if (OS::get_singleton()->is_stdout_verbose())
- print_line("RtAudio: Desired number of buffers (" + itos(target_number_of_buffers) + ") not available. Using " + itos(options.numberOfBuffers) + " instead. Reopening stream with adjusted buffer_size.");
- // new buffer size dependent on the ratio between set and actual numberOfBuffers
- buffer_size = buffer_size / (options.numberOfBuffers / target_number_of_buffers);
- target_number_of_buffers = options.numberOfBuffers;
tries--;
- } else {
- break;
}
}
@@ -231,9 +195,10 @@ void AudioDriverRtAudio::finish() {
AudioDriverRtAudio::AudioDriverRtAudio() {
+ active = false;
mutex = NULL;
dac = NULL;
- mix_rate = 44100;
+ mix_rate = DEFAULT_MIX_RATE;
speaker_mode = SPEAKER_MODE_STEREO;
}
diff --git a/drivers/rtaudio/audio_driver_rtaudio.h b/drivers/rtaudio/audio_driver_rtaudio.h
index c2a18b2731..858a51eb73 100644
--- a/drivers/rtaudio/audio_driver_rtaudio.h
+++ b/drivers/rtaudio/audio_driver_rtaudio.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/SCsub b/drivers/unix/SCsub
index 96efc91b7a..5ced44dfda 100644
--- a/drivers/unix/SCsub
+++ b/drivers/unix/SCsub
@@ -8,7 +8,7 @@ g_set_p += 'String OS_Unix::get_global_settings_path() const {\n'
g_set_p += '\treturn "' + env["unix_global_settings_path"] + '";\n'
g_set_p += '}\n'
g_set_p += '#endif'
-f = open("os_unix_global_settings_path.gen.cpp", "wb")
+f = open("os_unix_global_settings_path.gen.cpp", "w")
f.write(g_set_p)
f.close()
diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp
index cf54f3fea0..ddc3b2ed33 100644
--- a/drivers/unix/dir_access_unix.cpp
+++ b/drivers/unix/dir_access_unix.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -194,21 +194,9 @@ Error DirAccessUnix::make_dir(String p_dir) {
p_dir = fix_path(p_dir);
-#if 1
-
- bool success = (mkdir(p_dir.utf8().get_data(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) == 0);
- int err = errno;
-
-#else
- char real_current_dir_name[2048];
- getcwd(real_current_dir_name, 2048);
- chdir(current_dir.utf8().get_data()); //ascii since this may be unicode or wathever the host os wants
-
bool success = (mkdir(p_dir.utf8().get_data(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) == 0);
int err = errno;
- chdir(real_current_dir_name);
-#endif
if (success) {
return OK;
};
diff --git a/drivers/unix/dir_access_unix.h b/drivers/unix/dir_access_unix.h
index e4b294a802..ea0df2fa3f 100644
--- a/drivers/unix/dir_access_unix.h
+++ b/drivers/unix/dir_access_unix.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp
index e2f04aec63..d5a66d9a1c 100644
--- a/drivers/unix/file_access_unix.cpp
+++ b/drivers/unix/file_access_unix.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/file_access_unix.h b/drivers/unix/file_access_unix.h
index 3c4b9c0c25..6e5110431f 100644
--- a/drivers/unix/file_access_unix.h
+++ b/drivers/unix/file_access_unix.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp
index f55b75c1d9..77c942c673 100644
--- a/drivers/unix/ip_unix.cpp
+++ b/drivers/unix/ip_unix.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/ip_unix.h b/drivers/unix/ip_unix.h
index 952d3a8771..1f3b885635 100644
--- a/drivers/unix/ip_unix.h
+++ b/drivers/unix/ip_unix.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/mutex_posix.cpp b/drivers/unix/mutex_posix.cpp
index 94cfcf78e3..c8fe9e0749 100644
--- a/drivers/unix/mutex_posix.cpp
+++ b/drivers/unix/mutex_posix.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/mutex_posix.h b/drivers/unix/mutex_posix.h
index b3c0cbe051..20d546c72a 100644
--- a/drivers/unix/mutex_posix.h
+++ b/drivers/unix/mutex_posix.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 0f4e8f757c..75c8a153f6 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -315,7 +315,9 @@ OS::TimeZoneInfo OS_Unix::get_time_zone_info() const {
void OS_Unix::delay_usec(uint32_t p_usec) const {
- usleep(p_usec);
+ struct timespec rem = { p_usec / 1000000, (p_usec % 1000000) * 1000 };
+ while (nanosleep(&rem, &rem) == EINTR) {
+ }
}
uint64_t OS_Unix::get_ticks_usec() const {
diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h
index 115bdc2d65..19e79728fb 100644
--- a/drivers/unix/os_unix.h
+++ b/drivers/unix/os_unix.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/packet_peer_udp_posix.cpp b/drivers/unix/packet_peer_udp_posix.cpp
index b21990a866..61d2737555 100644
--- a/drivers/unix/packet_peer_udp_posix.cpp
+++ b/drivers/unix/packet_peer_udp_posix.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -73,8 +73,8 @@ Error PacketPeerUDPPosix::get_packet(const uint8_t **r_buffer, int &r_buffer_siz
if (queue_count == 0)
return ERR_UNAVAILABLE;
- uint32_t size;
- uint8_t type;
+ uint32_t size = 0;
+ uint8_t type = IP::TYPE_NONE;
rb.read(&type, 1, true);
if (type == IP::TYPE_IPV4) {
uint8_t ip[4];
diff --git a/drivers/unix/packet_peer_udp_posix.h b/drivers/unix/packet_peer_udp_posix.h
index d8b08818b0..e580d336b2 100644
--- a/drivers/unix/packet_peer_udp_posix.h
+++ b/drivers/unix/packet_peer_udp_posix.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/rw_lock_posix.cpp b/drivers/unix/rw_lock_posix.cpp
index 25bc8f0bd3..ab2d6495bd 100644
--- a/drivers/unix/rw_lock_posix.cpp
+++ b/drivers/unix/rw_lock_posix.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/rw_lock_posix.h b/drivers/unix/rw_lock_posix.h
index f8199aeb54..40b41ce171 100644
--- a/drivers/unix/rw_lock_posix.h
+++ b/drivers/unix/rw_lock_posix.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/semaphore_posix.cpp b/drivers/unix/semaphore_posix.cpp
index 8b553194db..093c6b663a 100644
--- a/drivers/unix/semaphore_posix.cpp
+++ b/drivers/unix/semaphore_posix.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/semaphore_posix.h b/drivers/unix/semaphore_posix.h
index c7a7f9bd87..e33de78545 100644
--- a/drivers/unix/semaphore_posix.h
+++ b/drivers/unix/semaphore_posix.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/socket_helpers.h b/drivers/unix/socket_helpers.h
index 5fa727a9b9..3fc0144294 100644
--- a/drivers/unix/socket_helpers.h
+++ b/drivers/unix/socket_helpers.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/stream_peer_tcp_posix.cpp b/drivers/unix/stream_peer_tcp_posix.cpp
index 30843e4947..3bc2397e6f 100644
--- a/drivers/unix/stream_peer_tcp_posix.cpp
+++ b/drivers/unix/stream_peer_tcp_posix.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/stream_peer_tcp_posix.h b/drivers/unix/stream_peer_tcp_posix.h
index 3f28f82b50..4c3504714c 100644
--- a/drivers/unix/stream_peer_tcp_posix.h
+++ b/drivers/unix/stream_peer_tcp_posix.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/tcp_server_posix.cpp b/drivers/unix/tcp_server_posix.cpp
index a8554d07a3..5062a74b63 100644
--- a/drivers/unix/tcp_server_posix.cpp
+++ b/drivers/unix/tcp_server_posix.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -165,7 +165,7 @@ Ref<StreamPeerTCP> TCPServerPosix::take_connection() {
Ref<StreamPeerTCPPosix> conn = memnew(StreamPeerTCPPosix);
IP_Address ip;
- int port;
+ int port = 0;
_set_ip_addr_port(ip, port, &their_addr);
conn->set_socket(fd, ip, port, sock_type);
diff --git a/drivers/unix/tcp_server_posix.h b/drivers/unix/tcp_server_posix.h
index 947050ab8a..a10bafcafe 100644
--- a/drivers/unix/tcp_server_posix.h
+++ b/drivers/unix/tcp_server_posix.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/unix/thread_posix.cpp b/drivers/unix/thread_posix.cpp
index 3b895ff9c1..5908246929 100644
--- a/drivers/unix/thread_posix.cpp
+++ b/drivers/unix/thread_posix.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -36,8 +36,18 @@
#include <pthread_np.h>
#endif
+#include "core/safe_refcount.h"
#include "os/memory.h"
+static pthread_key_t _create_thread_id_key() {
+ pthread_key_t key;
+ pthread_key_create(&key, NULL);
+ return key;
+}
+
+pthread_key_t ThreadPosix::thread_id_key = _create_thread_id_key();
+Thread::ID ThreadPosix::next_thread_id = 0;
+
Thread::ID ThreadPosix::get_id() const {
return id;
@@ -51,7 +61,8 @@ Thread *ThreadPosix::create_thread_posix() {
void *ThreadPosix::thread_callback(void *userdata) {
ThreadPosix *t = reinterpret_cast<ThreadPosix *>(userdata);
- t->id = (ID)pthread_self();
+ t->id = atomic_increment(&next_thread_id);
+ pthread_setspecific(thread_id_key, (void *)t->id);
ScriptServer::thread_enter(); //scripts may need to attach a stack
@@ -77,7 +88,7 @@ Thread *ThreadPosix::create_func_posix(ThreadCreateCallback p_callback, void *p_
}
Thread::ID ThreadPosix::get_thread_id_func_posix() {
- return (ID)pthread_self();
+ return (ID)pthread_getspecific(thread_id_key);
}
void ThreadPosix::wait_to_finish_func_posix(Thread *p_thread) {
diff --git a/drivers/unix/thread_posix.h b/drivers/unix/thread_posix.h
index 21e1d290a9..d6a41ed119 100644
--- a/drivers/unix/thread_posix.h
+++ b/drivers/unix/thread_posix.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -42,6 +42,9 @@
class ThreadPosix : public Thread {
+ static pthread_key_t thread_id_key;
+ static ID next_thread_id;
+
pthread_t pthread;
pthread_attr_t pthread_attr;
ThreadCreateCallback callback;
diff --git a/drivers/gles2/SCsub b/drivers/wasapi/SCsub
index dedd794dba..233593b0f9 100644
--- a/drivers/gles2/SCsub
+++ b/drivers/wasapi/SCsub
@@ -2,8 +2,7 @@
Import('env')
+# Driver source files
env.add_source_files(env.drivers_sources, "*.cpp")
-SConscript("shaders/SCsub")
-
Export('env')
diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp
new file mode 100644
index 0000000000..29d1e5deed
--- /dev/null
+++ b/drivers/wasapi/audio_driver_wasapi.cpp
@@ -0,0 +1,364 @@
+/*************************************************************************/
+/* audio_driver_wasapi.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#ifdef WASAPI_ENABLED
+
+#include "audio_driver_wasapi.h"
+
+#include "os/os.h"
+#include "project_settings.h"
+
+const CLSID CLSID_MMDeviceEnumerator = __uuidof(MMDeviceEnumerator);
+const IID IID_IMMDeviceEnumerator = __uuidof(IMMDeviceEnumerator);
+const IID IID_IAudioClient = __uuidof(IAudioClient);
+const IID IID_IAudioRenderClient = __uuidof(IAudioRenderClient);
+
+Error AudioDriverWASAPI::init_device() {
+
+ WAVEFORMATEX *pwfex;
+ IMMDeviceEnumerator *enumerator = NULL;
+ IMMDevice *device = NULL;
+
+ CoInitialize(NULL);
+
+ HRESULT hr = CoCreateInstance(CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, IID_IMMDeviceEnumerator, (void **)&enumerator);
+ ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN);
+
+ hr = enumerator->GetDefaultAudioEndpoint(eRender, eConsole, &device);
+ ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN);
+
+ hr = device->Activate(IID_IAudioClient, CLSCTX_ALL, NULL, (void **)&audio_client);
+ ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN);
+
+ hr = audio_client->GetMixFormat(&pwfex);
+ ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN);
+
+ // Since we're using WASAPI Shared Mode we can't control any of these, we just tag along
+ channels = pwfex->nChannels;
+ mix_rate = pwfex->nSamplesPerSec;
+ format_tag = pwfex->wFormatTag;
+ bits_per_sample = pwfex->wBitsPerSample;
+
+ switch (channels) {
+ case 2: // Stereo
+ case 6: // Surround 5.1
+ case 8: // Surround 7.1
+ break;
+
+ default:
+ ERR_PRINT("WASAPI: Unsupported number of channels");
+ ERR_FAIL_V(ERR_CANT_OPEN);
+ break;
+ }
+
+ if (format_tag == WAVE_FORMAT_EXTENSIBLE) {
+ WAVEFORMATEXTENSIBLE *wfex = (WAVEFORMATEXTENSIBLE *)pwfex;
+
+ if (wfex->SubFormat == KSDATAFORMAT_SUBTYPE_PCM) {
+ format_tag = WAVE_FORMAT_PCM;
+ } else if (wfex->SubFormat == KSDATAFORMAT_SUBTYPE_IEEE_FLOAT) {
+ format_tag = WAVE_FORMAT_IEEE_FLOAT;
+ } else {
+ ERR_PRINT("WASAPI: Format not supported");
+ ERR_FAIL_V(ERR_CANT_OPEN);
+ }
+ } else {
+ if (format_tag != WAVE_FORMAT_PCM && format_tag != WAVE_FORMAT_IEEE_FLOAT) {
+ ERR_PRINT("WASAPI: Format not supported");
+ ERR_FAIL_V(ERR_CANT_OPEN);
+ }
+ }
+
+ hr = audio_client->Initialize(AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_EVENTCALLBACK, 0, 0, pwfex, NULL);
+ ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN);
+
+ event = CreateEvent(NULL, FALSE, FALSE, NULL);
+ ERR_FAIL_COND_V(event == NULL, ERR_CANT_OPEN);
+
+ hr = audio_client->SetEventHandle(event);
+ ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN);
+
+ hr = audio_client->GetService(IID_IAudioRenderClient, (void **)&render_client);
+ ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN);
+
+ UINT32 max_frames;
+ hr = audio_client->GetBufferSize(&max_frames);
+ ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN);
+
+ // Due to WASAPI Shared Mode we have no control of the buffer size
+ buffer_frames = max_frames;
+
+ // Sample rate is independent of channels (ref: https://stackoverflow.com/questions/11048825/audio-sample-frequency-rely-on-channels)
+ buffer_size = buffer_frames * channels;
+ samples_in.resize(buffer_size);
+
+ if (OS::get_singleton()->is_stdout_verbose()) {
+ print_line("audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms");
+ }
+
+ return OK;
+}
+
+Error AudioDriverWASAPI::finish_device() {
+
+ if (audio_client) {
+ if (active) {
+ audio_client->Stop();
+ active = false;
+ }
+ }
+
+ if (render_client) {
+ render_client->Release();
+ render_client = NULL;
+ }
+
+ if (audio_client) {
+ audio_client->Release();
+ audio_client = NULL;
+ }
+
+ return OK;
+}
+
+Error AudioDriverWASAPI::init() {
+
+ Error err = init_device();
+ ERR_FAIL_COND_V(err != OK, err);
+
+ active = false;
+ exit_thread = false;
+ thread_exited = false;
+
+ mutex = Mutex::create(true);
+ thread = Thread::create(thread_func, this);
+
+ return OK;
+}
+
+Error AudioDriverWASAPI::reopen() {
+ Error err = finish_device();
+ if (err != OK) {
+ ERR_PRINT("WASAPI: finish_device error");
+ } else {
+ err = init_device();
+ if (err != OK) {
+ ERR_PRINT("WASAPI: init_device error");
+ } else {
+ start();
+ }
+ }
+
+ return err;
+}
+
+int AudioDriverWASAPI::get_mix_rate() const {
+
+ return mix_rate;
+}
+
+AudioDriver::SpeakerMode AudioDriverWASAPI::get_speaker_mode() const {
+
+ return SPEAKER_MODE_STEREO;
+}
+
+void AudioDriverWASAPI::thread_func(void *p_udata) {
+
+ AudioDriverWASAPI *ad = (AudioDriverWASAPI *)p_udata;
+
+ while (!ad->exit_thread) {
+ if (ad->active) {
+ ad->lock();
+
+ ad->audio_server_process(ad->buffer_frames, ad->samples_in.ptr());
+
+ ad->unlock();
+ } else {
+ for (unsigned int i = 0; i < ad->buffer_size; i++) {
+ ad->samples_in[i] = 0;
+ }
+ }
+
+ unsigned int left_frames = ad->buffer_frames;
+ unsigned int buffer_idx = 0;
+ while (left_frames > 0) {
+ WaitForSingleObject(ad->event, 1000);
+
+ UINT32 cur_frames;
+ HRESULT hr = ad->audio_client->GetCurrentPadding(&cur_frames);
+ if (hr == S_OK) {
+ // Check how much frames are available on the WASAPI buffer
+ UINT32 avail_frames = ad->buffer_frames - cur_frames;
+ UINT32 write_frames = avail_frames > left_frames ? left_frames : avail_frames;
+
+ BYTE *buffer = NULL;
+ hr = ad->render_client->GetBuffer(write_frames, &buffer);
+ if (hr == S_OK) {
+ // We're using WASAPI Shared Mode so we must convert the buffer
+
+ if (ad->format_tag == WAVE_FORMAT_PCM) {
+ switch (ad->bits_per_sample) {
+ case 8:
+ for (unsigned int i = 0; i < write_frames * ad->channels; i++) {
+ ((int8_t *)buffer)[i] = ad->samples_in[buffer_idx++] >> 24;
+ }
+ break;
+
+ case 16:
+ for (unsigned int i = 0; i < write_frames * ad->channels; i++) {
+ ((int16_t *)buffer)[i] = ad->samples_in[buffer_idx++] >> 16;
+ }
+ break;
+
+ case 24:
+ for (unsigned int i = 0; i < write_frames * ad->channels; i++) {
+ int32_t sample = ad->samples_in[buffer_idx++];
+ ((int8_t *)buffer)[i * 3 + 2] = sample >> 24;
+ ((int8_t *)buffer)[i * 3 + 1] = sample >> 16;
+ ((int8_t *)buffer)[i * 3 + 0] = sample >> 8;
+ }
+ break;
+
+ case 32:
+ for (unsigned int i = 0; i < write_frames * ad->channels; i++) {
+ ((int32_t *)buffer)[i] = ad->samples_in[buffer_idx++];
+ }
+ break;
+ }
+ } else if (ad->format_tag == WAVE_FORMAT_IEEE_FLOAT) {
+ for (unsigned int i = 0; i < write_frames * ad->channels; i++) {
+ ((float *)buffer)[i] = (ad->samples_in[buffer_idx++] >> 16) / 32768.f;
+ }
+ } else {
+ ERR_PRINT("WASAPI: Unknown format tag");
+ ad->exit_thread = true;
+ }
+
+ hr = ad->render_client->ReleaseBuffer(write_frames, 0);
+ if (hr != S_OK) {
+ ERR_PRINT("WASAPI: Release buffer error");
+ }
+
+ left_frames -= write_frames;
+ } else if (hr == AUDCLNT_E_DEVICE_INVALIDATED) {
+ // Device is not valid anymore, reopen it
+
+ Error err = ad->reopen();
+ if (err != OK) {
+ ad->exit_thread = true;
+ } else {
+ // We reopened the device and samples_in may have resized, so invalidate the current left_frames
+ left_frames = 0;
+ }
+ } else {
+ ERR_PRINT("WASAPI: Get buffer error");
+ ad->exit_thread = true;
+ }
+ } else if (hr == AUDCLNT_E_DEVICE_INVALIDATED) {
+ // Device is not valid anymore, reopen it
+
+ Error err = ad->reopen();
+ if (err != OK) {
+ ad->exit_thread = true;
+ } else {
+ // We reopened the device and samples_in may have resized, so invalidate the current left_frames
+ left_frames = 0;
+ }
+ } else {
+ ERR_PRINT("WASAPI: GetCurrentPadding error");
+ }
+ }
+ }
+
+ ad->thread_exited = true;
+}
+
+void AudioDriverWASAPI::start() {
+
+ HRESULT hr = audio_client->Start();
+ if (hr != S_OK) {
+ ERR_PRINT("WASAPI: Start failed");
+ } else {
+ active = true;
+ }
+}
+
+void AudioDriverWASAPI::lock() {
+
+ if (mutex)
+ mutex->lock();
+}
+
+void AudioDriverWASAPI::unlock() {
+
+ if (mutex)
+ mutex->unlock();
+}
+
+void AudioDriverWASAPI::finish() {
+
+ if (thread) {
+ exit_thread = true;
+ Thread::wait_to_finish(thread);
+
+ memdelete(thread);
+ thread = NULL;
+ }
+
+ finish_device();
+
+ if (mutex) {
+ memdelete(mutex);
+ mutex = NULL;
+ }
+}
+
+AudioDriverWASAPI::AudioDriverWASAPI() {
+
+ audio_client = NULL;
+ render_client = NULL;
+ mutex = NULL;
+ thread = NULL;
+
+ format_tag = 0;
+ bits_per_sample = 0;
+
+ samples_in.clear();
+
+ buffer_size = 0;
+ channels = 0;
+ mix_rate = 0;
+ buffer_frames = 0;
+
+ thread_exited = false;
+ exit_thread = false;
+ active = false;
+}
+
+#endif
diff --git a/main/tests/test_sound.cpp b/drivers/wasapi/audio_driver_wasapi.h
index d8737f6c8d..fab8ab3250 100644
--- a/main/tests/test_sound.cpp
+++ b/drivers/wasapi/audio_driver_wasapi.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* test_sound.cpp */
+/* audio_driver_wasapi.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -27,73 +27,62 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "test_sound.h"
-#include "math_funcs.h"
-#include "os/main_loop.h"
-#include "servers/visual_server.h"
+#ifndef AUDIO_DRIVER_WASAPI_H
+#define AUDIO_DRIVER_WASAPI_H
-#include "io/resource_loader.h"
-#include "os/os.h"
-#include "print_string.h"
-#include "servers/audio_server.h"
-
-#if 0
-namespace TestSound {
-
-
-class TestMainLoop : public MainLoop {
-
- bool quit;
- Ref<Sample> sample;
-
-public:
- virtual void input_event(const InputEvent& p_event) {
-
-
- }
- virtual void request_quit() {
+#ifdef WASAPI_ENABLED
- quit=true;
- }
+#include "core/os/mutex.h"
+#include "core/os/thread.h"
+#include "servers/audio_server.h"
- virtual void init() {
+#include <audioclient.h>
+#include <mmdeviceapi.h>
+#include <windows.h>
- List<String> cmdline = OS::get_singleton()->get_cmdline_args();
- quit=false;
- if (cmdline.size()) {
+class AudioDriverWASAPI : public AudioDriver {
- sample=ResourceLoader::load(cmdline.back()->get());
- ERR_FAIL_COND(sample.is_null());
- print_line("Sample loaded OK");
- }
+ HANDLE event;
+ IAudioClient *audio_client;
+ IAudioRenderClient *render_client;
+ Mutex *mutex;
+ Thread *thread;
- RID voice = AudioServer::get_singleton()->voice_create();
- AudioServer::get_singleton()->voice_play( voice, sample->get_rid() );
+ WORD format_tag;
+ WORD bits_per_sample;
+ Vector<int32_t> samples_in;
- }
+ unsigned int buffer_size;
+ unsigned int channels;
+ int mix_rate;
+ int buffer_frames;
- virtual bool idle(float p_time) {
- return false;
- }
+ bool thread_exited;
+ mutable bool exit_thread;
+ bool active;
+ static void thread_func(void *p_udata);
- virtual bool iteration(float p_time) {
+ Error init_device();
+ Error finish_device();
+ Error reopen();
- return quit;
+public:
+ virtual const char *get_name() const {
+ return "WASAPI";
}
- virtual void finish() {
- }
+ virtual Error init();
+ virtual void start();
+ virtual int get_mix_rate() const;
+ virtual SpeakerMode get_speaker_mode() const;
+ virtual void lock();
+ virtual void unlock();
+ virtual void finish();
+ AudioDriverWASAPI();
};
-
-MainLoop* test() {
-
- return memnew( TestMainLoop );
-
-}
-
-}
+#endif // AUDIO_DRIVER_WASAPI_H
#endif
diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp
index 76665f0203..6d6a6027d9 100644
--- a/drivers/windows/dir_access_windows.cpp
+++ b/drivers/windows/dir_access_windows.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/windows/dir_access_windows.h b/drivers/windows/dir_access_windows.h
index a352415fd6..cb0fffdd47 100644
--- a/drivers/windows/dir_access_windows.h
+++ b/drivers/windows/dir_access_windows.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp
index bb133b9899..30c8332fa3 100644
--- a/drivers/windows/file_access_windows.cpp
+++ b/drivers/windows/file_access_windows.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/windows/file_access_windows.h b/drivers/windows/file_access_windows.h
index de5fc2bc09..6956e7855a 100644
--- a/drivers/windows/file_access_windows.h
+++ b/drivers/windows/file_access_windows.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/windows/mutex_windows.cpp b/drivers/windows/mutex_windows.cpp
index 7d9bc22e51..d862d528e3 100644
--- a/drivers/windows/mutex_windows.cpp
+++ b/drivers/windows/mutex_windows.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/windows/mutex_windows.h b/drivers/windows/mutex_windows.h
index 2e000a43f5..2f436b5754 100644
--- a/drivers/windows/mutex_windows.h
+++ b/drivers/windows/mutex_windows.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/windows/rw_lock_windows.cpp b/drivers/windows/rw_lock_windows.cpp
index e2213be9c1..5cbedeba2f 100644
--- a/drivers/windows/rw_lock_windows.cpp
+++ b/drivers/windows/rw_lock_windows.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/windows/rw_lock_windows.h b/drivers/windows/rw_lock_windows.h
index eb030d6029..15911c21e7 100644
--- a/drivers/windows/rw_lock_windows.h
+++ b/drivers/windows/rw_lock_windows.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/windows/semaphore_windows.cpp b/drivers/windows/semaphore_windows.cpp
index 3a5c0b054c..c88329d56c 100644
--- a/drivers/windows/semaphore_windows.cpp
+++ b/drivers/windows/semaphore_windows.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/windows/semaphore_windows.h b/drivers/windows/semaphore_windows.h
index 90aacc7e26..8e242ae148 100644
--- a/drivers/windows/semaphore_windows.h
+++ b/drivers/windows/semaphore_windows.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/windows/shell_windows.cpp b/drivers/windows/shell_windows.cpp
index 17ff9fe962..139a8756fb 100644
--- a/drivers/windows/shell_windows.cpp
+++ b/drivers/windows/shell_windows.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/windows/shell_windows.h b/drivers/windows/shell_windows.h
index d94c5812d1..de4fdc4d73 100644
--- a/drivers/windows/shell_windows.h
+++ b/drivers/windows/shell_windows.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/windows/thread_windows.cpp b/drivers/windows/thread_windows.cpp
index 01ddf42649..2ff4715b1c 100644
--- a/drivers/windows/thread_windows.cpp
+++ b/drivers/windows/thread_windows.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/windows/thread_windows.h b/drivers/windows/thread_windows.h
index 143825039c..2c3a325f88 100644
--- a/drivers/windows/thread_windows.h
+++ b/drivers/windows/thread_windows.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/xaudio2/audio_driver_xaudio2.cpp b/drivers/xaudio2/audio_driver_xaudio2.cpp
index 42c4c40300..1bd338ead9 100644
--- a/drivers/xaudio2/audio_driver_xaudio2.cpp
+++ b/drivers/xaudio2/audio_driver_xaudio2.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/drivers/xaudio2/audio_driver_xaudio2.h b/drivers/xaudio2/audio_driver_xaudio2.h
index 7c1d31b57c..27ef2ebcb8 100644
--- a/drivers/xaudio2/audio_driver_xaudio2.h
+++ b/drivers/xaudio2/audio_driver_xaudio2.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/SCsub b/editor/SCsub
index fd56c9d772..172447147c 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -4,6 +4,7 @@ Import('env')
env.editor_sources = []
import os
+from compat import encode_utf8, byte_to_str, open_utf8
def make_certs_header(target, source, env):
@@ -11,7 +12,7 @@ def make_certs_header(target, source, env):
src = source[0].srcnode().abspath
dst = target[0].srcnode().abspath
f = open(src, "rb")
- g = open(dst, "wb")
+ g = open_utf8(dst, "w")
buf = f.read()
decomp_size = len(buf)
import zlib
@@ -24,7 +25,7 @@ def make_certs_header(target, source, env):
g.write("static const int _certs_uncompressed_size=" + str(decomp_size) + ";\n")
g.write("static const unsigned char _certs_compressed[]={\n")
for i in range(len(buf)):
- g.write(str(ord(buf[i])) + ",\n")
+ g.write(byte_to_str(buf[i]) + ",\n")
g.write("};\n")
g.write("#endif")
@@ -32,20 +33,20 @@ def make_certs_header(target, source, env):
def make_doc_header(target, source, env):
dst = target[0].srcnode().abspath
- g = open(dst, "wb")
+ g = open_utf8(dst, "w")
buf = ""
docbegin = ""
docend = ""
for s in source:
src = s.srcnode().abspath
- f = open(src, "rb")
+ f = open_utf8(src, "r")
content = f.read()
buf += content[content.find("<class"): content.rfind("</doc>")]
if len(docbegin) == 0:
docbegin = content[0: content.find("<class")]
if len(docend) == 0:
docend = content[content.rfind("</doc>"): len(buf)]
- buf = docbegin + buf + docend
+ buf = encode_utf8(docbegin + buf + docend)
decomp_size = len(buf)
import zlib
buf = zlib.compress(buf)
@@ -57,7 +58,7 @@ def make_doc_header(target, source, env):
g.write("static const int _doc_data_uncompressed_size=" + str(decomp_size) + ";\n")
g.write("static const unsigned char _doc_data_compressed[]={\n")
for i in range(len(buf)):
- g.write(str(ord(buf[i])) + ",\n")
+ g.write(byte_to_str(buf[i]) + ",\n")
g.write("};\n")
g.write("#endif")
@@ -66,7 +67,7 @@ def make_fonts_header(target, source, env):
dst = target[0].srcnode().abspath
- g = open(dst, "wb")
+ g = open_utf8(dst, "w")
g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
g.write("#ifndef _EDITOR_FONTS_H\n")
@@ -75,7 +76,6 @@ def make_fonts_header(target, source, env):
# saving uncompressed, since freetype will reference from memory pointer
xl_names = []
for i in range(len(source)):
- print("Appending font: " + source[i].srcnode().abspath)
f = open(source[i].srcnode().abspath, "rb")
buf = f.read()
import os.path
@@ -85,7 +85,7 @@ def make_fonts_header(target, source, env):
g.write("static const int _font_" + name + "_size=" + str(len(buf)) + ";\n")
g.write("static const unsigned char _font_" + name + "[]={\n")
for i in range(len(buf)):
- g.write(str(ord(buf[i])) + ",\n")
+ g.write(byte_to_str(buf[i]) + ",\n")
g.write("};\n")
@@ -96,7 +96,7 @@ def make_translations_header(target, source, env):
dst = target[0].srcnode().abspath
- g = open(dst, "wb")
+ g = open_utf8(dst, "w")
g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
g.write("#ifndef _EDITOR_TRANSLATIONS_H\n")
@@ -110,7 +110,6 @@ def make_translations_header(target, source, env):
xl_names = []
for i in range(len(sorted_paths)):
- print("Appending translation: " + sorted_paths[i])
f = open(sorted_paths[i], "rb")
buf = f.read()
decomp_size = len(buf)
@@ -121,7 +120,7 @@ def make_translations_header(target, source, env):
#g.write("static const int _translation_"+name+"_uncompressed_size="+str(decomp_size)+";\n")
g.write("static const unsigned char _translation_" + name + "_compressed[]={\n")
for i in range(len(buf)):
- g.write(str(ord(buf[i])) + ",\n")
+ g.write(byte_to_str(buf[i]) + ",\n")
g.write("};\n")
@@ -148,8 +147,8 @@ def make_authors_header(target, source, env):
src = source[0].srcnode().abspath
dst = target[0].srcnode().abspath
- f = open(src, "rb")
- g = open(dst, "wb")
+ f = open_utf8(src, "r")
+ g = open_utf8(dst, "w")
g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
g.write("#ifndef _EDITOR_AUTHORS_H\n")
@@ -190,9 +189,9 @@ def make_license_header(target, source, env):
src_copyright = source[0].srcnode().abspath
src_license = source[1].srcnode().abspath
dst = target[0].srcnode().abspath
- f = open(src_license, "rb")
- fc = open(src_copyright, "rb")
- g = open(dst, "wb")
+ f = open_utf8(src_license, "r")
+ fc = open_utf8(src_copyright, "r")
+ g = open_utf8(dst, "w")
g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
g.write("#ifndef _EDITOR_LICENSE_H\n")
@@ -353,10 +352,10 @@ if (env["tools"] == "yes"):
reg_exporters = 'void register_exporters() {\n'
for e in env.platform_exporters:
env.editor_sources.append("#platform/" + e + "/export/export.cpp")
- reg_exporters += '\tregister_' + e + '_exporter();\n'
+ reg_exporters += '\tregister_' + e + '_exporter();\n'
reg_exporters_inc += '#include "platform/' + e + '/export/export.h"\n'
reg_exporters += '}\n'
- f = open("register_exporters.gen.cpp", "wb")
+ f = open_utf8("register_exporters.gen.cpp", "w")
f.write(reg_exporters_inc)
f.write(reg_exporters)
f.close()
@@ -381,14 +380,12 @@ if (env["tools"] == "yes"):
# Translations
tlist = glob.glob(path + "/translations/*.po")
- print("translations: ", tlist)
env.Depends('#editor/translations.gen.h', tlist)
env.Command('#editor/translations.gen.h', tlist, make_translations_header)
# Fonts
flist = glob.glob(path + "/../thirdparty/fonts/*.ttf")
flist.append(glob.glob(path + "/../thirdparty/fonts/*.otf"))
- print("fonts: ", flist)
env.Depends('#editor/builtin_fonts.gen.h', flist)
env.Command('#editor/builtin_fonts.gen.h', flist, make_fonts_header)
@@ -408,7 +405,6 @@ if (env["tools"] == "yes"):
SConscript('fileserver/SCsub')
SConscript('icons/SCsub')
SConscript('import/SCsub')
- SConscript('io_plugins/SCsub')
SConscript('plugins/SCsub')
lib = env.Library("editor", env.editor_sources)
diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp
index ed80be9e17..702adf0c68 100644
--- a/editor/animation_editor.cpp
+++ b/editor/animation_editor.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -38,6 +38,7 @@
#include "pair.h"
#include "scene/gui/separator.h"
#include "scene/main/viewport.h"
+
/* Missing to fix:
*Set
@@ -1646,7 +1647,7 @@ PropertyInfo AnimationKeyEditor::_find_hint_for_track(int p_idx, NodePath &r_bas
List<PropertyInfo> pinfo;
if (res.is_valid())
res->get_property_list(&pinfo);
- else
+ else if (node)
node->get_property_list(&pinfo);
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
@@ -2684,17 +2685,6 @@ void AnimationKeyEditor::_track_editor_gui_input(const Ref<InputEvent> &p_input)
Point2 mpos = mm->get_position() - ofs;
if (mpos.y < h) {
-#if 0
- //seek
- //int zoomw = settings_limit-name_limit;
- float scale = _get_zoom_scale();
- float pos = h_scroll->get_val() + (mpos.y-name_limit) / scale;
- if (pos<0 )
- pos=0;
- if (pos>=animation->get_length())
- pos=animation->get_length();
- timeline->set_val(pos);
-#endif
return;
}
@@ -3249,9 +3239,9 @@ void AnimationKeyEditor::insert_value_key(const String &p_property, const Varian
//let's build a node path
ERR_FAIL_COND(history->get_path_size() == 0);
Object *obj = ObjectDB::get_instance(history->get_path_object(0));
- ERR_FAIL_COND(!obj || !obj->cast_to<Node>());
+ ERR_FAIL_COND(!Object::cast_to<Node>(obj));
- Node *node = obj->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(obj);
String path = root->get_path_to(node);
diff --git a/editor/animation_editor.h b/editor/animation_editor.h
index 9eacafb021..c16072502b 100644
--- a/editor/animation_editor.h
+++ b/editor/animation_editor.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/array_property_edit.cpp b/editor/array_property_edit.cpp
index 06d7d5fdc8..bcf1600b36 100644
--- a/editor/array_property_edit.cpp
+++ b/editor/array_property_edit.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -273,11 +273,7 @@ void ArrayPropertyEdit::edit(Object *p_obj, const StringName &p_prop, const Stri
Node *ArrayPropertyEdit::get_node() {
- Object *o = ObjectDB::get_instance(obj);
- if (!o)
- return NULL;
-
- return o->cast_to<Node>();
+ return Object::cast_to<Node>(ObjectDB::get_instance(obj));
}
void ArrayPropertyEdit::_bind_methods() {
diff --git a/editor/array_property_edit.h b/editor/array_property_edit.h
index 1bc82e22a1..c028c45b04 100644
--- a/editor/array_property_edit.h
+++ b/editor/array_property_edit.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/call_dialog.cpp b/editor/call_dialog.cpp
deleted file mode 100644
index 32b9fc1254..0000000000
--- a/editor/call_dialog.cpp
+++ /dev/null
@@ -1,342 +0,0 @@
-/*************************************************************************/
-/* call_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "call_dialog.h"
-
-#if 0
-#include "class_db.h"
-#include "print_string.h"
-#include "scene/gui/label.h"
-
-
-class CallDialogParams : public Object {
-
- GDCLASS( CallDialogParams, Object );
-public:
-
- bool _set(const StringName& p_name, const Variant& p_value) {
-
- values[p_name]=p_value;
- return true;
- }
-
- bool _get(const StringName& p_name,Variant &r_ret) const {
-
- if (values.has(p_name)) {
- r_ret=values[p_name];
- return true;
- }
- return false;
- }
-
- void _get_property_list( List<PropertyInfo> *p_list) const {
-
- for(int i=0;i<method.arguments.size();i++)
- p_list->push_back(method.arguments[i]);
- }
-
- MethodInfo method;
- HashMap<String,Variant> values;
-
- CallDialogParams() {}
-};
-
-
-void CallDialog::_notification(int p_what) {
-
- if (p_what==NOTIFICATION_READY) {
-
- call->connect("pressed", this,"_call");
- cancel->connect("pressed", this,"_cancel");
- //filter->get_path()->connect("text_changed", this,"_text_changed");
- _update_method_list();
- }
-
- if (p_what==NOTIFICATION_EXIT_TREE) {
-
- call->disconnect("pressed", this,"_call");
- cancel->disconnect("pressed", this,"_cancel");
-
- //filter->get_path()->connect("text_changed", this,"_text_changed");
- _update_method_list();
- }
-
- if (p_what==NOTIFICATION_DRAW) {
-
- RID ci = get_canvas_item();
- get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size()));
- }
-}
-
-
-void CallDialog::_call() {
-
- if (!tree->get_selected())
- return;
-
- TreeItem* item=tree->get_selected();
- ERR_FAIL_COND(!item);
- int idx=item->get_metadata(0);
- ERR_FAIL_INDEX(idx,methods.size());
- MethodInfo &m = methods[idx];
-
- Variant args[VARIANT_ARG_MAX];
-
- for(int i=0;i<VARIANT_ARG_MAX;i++) {
-
- if (i>=m.arguments.size())
- continue;
-
- if (call_params->values.has(m.arguments[i].name))
- args[i]=call_params->values[m.arguments[i].name];
- }
-
- Variant ret = object->call(m.name,args[0],args[1],args[2],args[3],args[4]);
- if (ret.get_type()!=Variant::NIL)
- return_value->set_text(ret);
- else
- return_value->set_text("");
-}
-
-void CallDialog::_cancel() {
-
- hide();
-}
-
-
-void CallDialog::_item_selected() {
-
- TreeItem* item=tree->get_selected();
- ERR_FAIL_COND(!item);
-
- if (item->get_metadata(0).get_type()==Variant::NIL) {
-
- call->set_disabled(true);
- return;
- }
-
- call->set_disabled(false);
-
- int idx=item->get_metadata(0);
- ERR_FAIL_INDEX(idx,methods.size());
-
- MethodInfo &m = methods[idx];
-
- call_params->values.clear();
- call_params->method=m;
-
- property_editor->edit(call_params);
- property_editor->update_tree();
-
-
-}
-
-void CallDialog::_update_method_list() {
-
- tree->clear();
- if (!object)
- return;
-
- TreeItem *root = tree->create_item();
-
- List<MethodInfo> method_list;
- object->get_method_list(&method_list);
- method_list.sort();
- methods.clear();
-
- List<String> inheritance_list;
-
- String type = object->get_class();
-
- while(type!="") {
- inheritance_list.push_back( type );
- type=ClassDB::get_parent_class(type);
- }
-
- TreeItem *selected_item=NULL;
-
- for(int i=0;i<inheritance_list.size();i++) {
-
- String type=inheritance_list[i];
- String parent_type=ClassDB::get_parent_class(type);
-
- TreeItem *type_item=NULL;
-
- List<MethodInfo>::Element *N,*E=method_list.front();
-
- while(E) {
-
- N=E->next();
-
- if (parent_type!="" && ClassDB::get_method(parent_type,E->get().name)!=NULL) {
- E=N;
- continue;
- }
-
- if (!type_item) {
- type_item=tree->create_item(root);
- type_item->set_text(0,type);
- if (has_icon(type,"EditorIcons"))
- type_item->set_icon(0,get_icon(type,"EditorIcons"));
- }
-
- TreeItem *method_item = tree->create_item(type_item);
- method_item->set_text(0,E->get().name);
- method_item->set_metadata(0,methods.size());
- if (E->get().name==selected)
- selected_item=method_item;
- methods.push_back( E->get() );
-
- method_list.erase(E);
- E=N;
- }
- }
-
-
-
- if (selected_item)
- selected_item->select(0);
-}
-
-void CallDialog::_bind_methods() {
-
- ClassDB::bind_method("_call",&CallDialog::_call);
- ClassDB::bind_method("_cancel",&CallDialog::_cancel);
- ClassDB::bind_method("_item_selected", &CallDialog::_item_selected);
-
-}
-
-void CallDialog::set_object(Object *p_object,StringName p_selected) {
-
- object=p_object;
- selected=p_selected;
- property_editor->edit(NULL);
- call->set_disabled(true);
- return_value->clear();
-
- _update_method_list();
- method_label->set_text(vformat(TTR("Method List For '%s':"),p_object->get_class()));
-}
-
-CallDialog::CallDialog() {
-
- object=NULL;
-
- call = memnew( Button );
- call->set_anchor( MARGIN_LEFT, ANCHOR_END );
- call->set_anchor( MARGIN_TOP, ANCHOR_END );
- call->set_anchor( MARGIN_RIGHT, ANCHOR_END );
- call->set_anchor( MARGIN_BOTTOM, ANCHOR_END );
- call->set_begin( Point2( -70, -29 ) );
- call->set_end( Point2( -15, -15 ) );
- call->set_text(TTR("Call"));
-
- add_child(call);
-
- cancel = memnew( Button );
- cancel->set_anchor( MARGIN_TOP, ANCHOR_END );
- cancel->set_anchor( MARGIN_BOTTOM, ANCHOR_END );
- cancel->set_begin( Point2( -15, 29 ) );
- cancel->set_end( Point2( 70, -15 ) );
- cancel->set_text(TTR("Close"));
-
- add_child(cancel);
-
- tree = memnew( Tree );
-
- tree->set_anchor( MARGIN_BOTTOM, ANCHOR_END );
- tree->set_begin( Point2( 20,50 ) );
- tree->set_margin(MARGIN_BOTTOM, -44 );
- tree->set_margin(MARGIN_RIGHT, 0.5 );
- tree->set_select_mode( Tree::SELECT_ROW );
- add_child(tree);
-
- tree->connect("item_selected", this,"_item_selected");
- tree->set_hide_root(true);
-
- property_editor = memnew( PropertyEditor );
-
- property_editor->set_anchor_and_margin( MARGIN_RIGHT, ANCHOR_END, -15 );
- property_editor->set_anchor_and_margin( MARGIN_TOP, ANCHOR_BEGIN, 50 );
- //property_editor->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 );
- property_editor->set_anchor_and_margin( MARGIN_BOTTOM, ANCHOR_END, -90 );
- property_editor->get_scene_tree()->set_hide_root( true );
- property_editor->hide_top_label();
-
- add_child(property_editor);
- method_label = memnew(Label);
- method_label->set_position(Point2( 15,25));
- method_label->set_text(TTR("Method List:"));
-
- add_child(method_label);
-
- Label *label = memnew( Label );
- //label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 );
- label->set_anchor_and_margin( MARGIN_TOP, ANCHOR_BEGIN, 25 );
- label->set_text(TTR("Arguments:"));
-
- add_child(label);
-
- return_label = memnew( Label );
- //return_label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 );
- return_label->set_anchor_and_margin( MARGIN_TOP, ANCHOR_END, -85 );
- return_label->set_text(TTR("Return:"));
-
- add_child(return_label);
-
- return_value = memnew( LineEdit );
- //return_value->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 );
- return_value->set_anchor_and_margin( MARGIN_RIGHT, ANCHOR_END, -15 );
- return_value->set_anchor_and_margin( MARGIN_TOP, ANCHOR_END, -65 );
-
- add_child(return_value);
-
- /*
- label = memnew( Label );
- label->set_anchor( MARGIN_TOP, ANCHOR_END );
- label->set_anchor( MARGIN_BOTTOM, ANCHOR_END );
-
- label->set_begin( Point2( 15,54) );
- label->set_end( Point2( 16,44) );
- label->set_text("Parameters:");
-
- add_child(label);
- */
-
-
- call_params = memnew( CallDialogParams );
- set_as_toplevel(true);
-}
-
-
-CallDialog::~CallDialog()
-{
- memdelete(call_params);
-}
-#endif
diff --git a/editor/call_dialog.h b/editor/call_dialog.h
deleted file mode 100644
index ab833c8dd3..0000000000
--- a/editor/call_dialog.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*************************************************************************/
-/* call_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef CALL_DIALOG_H
-#define CALL_DIALOG_H
-
-#include "editor/property_editor.h"
-#include "scene/gui/button.h"
-#include "scene/gui/label.h"
-#include "scene/gui/line_edit.h"
-#include "scene/gui/popup.h"
-#include "scene/gui/tree.h"
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-
-#if 0
-
-class CallDialogParams;
-
-class CallDialog : public Popup {
-
- GDCLASS( CallDialog, Popup );
-
-
- Label* method_label;
- Tree *tree;
- Button *call;
- Button *cancel;
-
- CallDialogParams *call_params;
- PropertyEditor *property_editor;
-
- Label *return_label;
- LineEdit *return_value;
- Object *object;
- StringName selected;
-
- Vector<MethodInfo> methods;
-
-
- void _item_selected();
- void _update_method_list();
- void _call();
- void _cancel();
-
-protected:
- static void _bind_methods();
- void _notification(int p_what);
-public:
-
- void set_object(Object *p_object,StringName p_selected="");
-
- CallDialog();
- ~CallDialog();
-
-};
-
-#endif
-#endif
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 4575bfcb08..8c153d2745 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -30,6 +30,7 @@
#include "code_editor.h"
#include "editor/editor_scale.h"
+#include "editor_node.h"
#include "editor_settings.h"
#include "os/keyboard.h"
#include "scene/gui/margin_container.h"
@@ -91,6 +92,13 @@ void FindReplaceBar::_notification(int p_what) {
} else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
set_process_unhandled_input(is_visible_in_tree());
+ } else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
+
+ find_prev->set_icon(get_icon("MoveUp", "EditorIcons"));
+ find_next->set_icon(get_icon("MoveDown", "EditorIcons"));
+ hide_button->set_normal_texture(get_icon("Close", "EditorIcons"));
+ hide_button->set_hover_texture(get_icon("CloseHover", "EditorIcons"));
+ hide_button->set_pressed_texture(get_icon("Close", "EditorIcons"));
}
}
@@ -544,9 +552,7 @@ FindReplaceBar::FindReplaceBar() {
error_label = memnew(Label);
search_options->add_child(error_label);
- error_label->add_color_override("font_color", Color(1, 1, 0, 1));
- error_label->add_color_override("font_color_shadow", Color(0, 0, 0, 1));
- error_label->add_constant_override("shadow_as_outline", 1);
+ error_label->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("error_color", "Editor"));
search_options->add_spacer();
@@ -875,7 +881,6 @@ FindReplaceDialog::FindReplaceDialog() {
search_text = memnew(LineEdit);
vb->add_margin_child(TTR("Search"), search_text);
search_text->connect("text_entered", this, "_search_text_entered");
- //search_text->set_self_opacity(0.7);
replace_label = memnew(Label);
replace_label->set_text(TTR("Replace By"));
@@ -887,7 +892,7 @@ FindReplaceDialog::FindReplaceDialog() {
replace_text->set_anchor(MARGIN_RIGHT, ANCHOR_END);
replace_text->set_begin(Point2(15, 132));
replace_text->set_end(Point2(-15, 135));
- //replace_text->set_self_opacity(0.7);
+
replace_mc->add_child(replace_text);
replace_text->connect("text_entered", this, "_replace_text_entered");
@@ -944,9 +949,7 @@ FindReplaceDialog::FindReplaceDialog() {
error_label = memnew(Label);
error_label->set_align(Label::ALIGN_CENTER);
- error_label->add_color_override("font_color", Color(1, 0.4, 0.3));
- error_label->add_color_override("font_color_shadow", Color(0, 0, 0, 0.2));
- error_label->add_constant_override("shadow_as_outline", 1);
+ error_label->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("error_color", "Editor"));
vb->add_child(error_label);
@@ -1036,8 +1039,9 @@ void CodeTextEditor::_complete_request() {
List<String> entries;
String ctext = text_editor->get_text_for_completion();
_code_complete_script(ctext, &entries);
+ bool forced = false;
if (code_complete_func) {
- code_complete_func(code_complete_ud, ctext, &entries);
+ code_complete_func(code_complete_ud, ctext, &entries, forced);
}
// print_line("COMPLETE: "+p_request);
if (entries.size() == 0)
@@ -1050,7 +1054,7 @@ void CodeTextEditor::_complete_request() {
strs[i++] = E->get();
}
- text_editor->code_complete(strs);
+ text_editor->code_complete(strs, forced);
}
void CodeTextEditor::_font_resize_timeout() {
@@ -1075,6 +1079,7 @@ void CodeTextEditor::update_editor_settings() {
text_editor->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/cursor/scroll_past_end_of_file"));
text_editor->set_indent_using_spaces(EditorSettings::get_singleton()->get("text_editor/indent/type"));
text_editor->set_indent_size(EditorSettings::get_singleton()->get("text_editor/indent/size"));
+ text_editor->set_auto_indent(EditorSettings::get_singleton()->get("text_editor/indent/auto_indent"));
text_editor->set_draw_tabs(EditorSettings::get_singleton()->get("text_editor/indent/draw_tabs"));
text_editor->set_show_line_numbers(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_line_numbers"));
text_editor->set_line_numbers_zero_padded(EditorSettings::get_singleton()->get("text_editor/line_numbers/line_numbers_zero_padded"));
@@ -1092,12 +1097,7 @@ void CodeTextEditor::update_editor_settings() {
void CodeTextEditor::set_error(const String &p_error) {
- if (p_error != "") {
- error->set_text(p_error);
- error->show();
- } else {
- error->hide();
- }
+ error->set_text(p_error);
}
void CodeTextEditor::_update_font() {
@@ -1222,12 +1222,10 @@ CodeTextEditor::CodeTextEditor() {
error = memnew(Label);
status_bar->add_child(error);
- error->hide();
error->set_clip_text(true); //do not change, or else very long errors can push the whole container to the right
error->set_valign(Label::VALIGN_CENTER);
- error->add_color_override("font_color", Color(1, 0.7, 0.6, 0.9));
+ error->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("error_color", "Editor"));
error->set_h_size_flags(SIZE_EXPAND_FILL); //required for it to display, given now it's clipping contents, do not touch
- //status_bar->add_spacer();
Label *line_txt = memnew(Label);
status_bar->add_child(line_txt);
@@ -1267,6 +1265,7 @@ CodeTextEditor::CodeTextEditor() {
cs.push_back(".");
cs.push_back(",");
cs.push_back("(");
+ cs.push_back("=");
cs.push_back("$");
text_editor->set_completion(true, cs);
idle->connect("timeout", this, "_text_changed_idle_timeout");
diff --git a/editor/code_editor.h b/editor/code_editor.h
index 8d48c56503..410dd99878 100644
--- a/editor/code_editor.h
+++ b/editor/code_editor.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -186,7 +186,7 @@ public:
FindReplaceDialog();
};
-typedef void (*CodeTextEditorCodeCompleteFunc)(void *p_ud, const String &p_code, List<String> *r_options);
+typedef void (*CodeTextEditorCodeCompleteFunc)(void *p_ud, const String &p_code, List<String> *r_options, bool &r_forced);
class CodeTextEditor : public VBoxContainer {
diff --git a/editor/collada/collada.cpp b/editor/collada/collada.cpp
index 169c34782d..4986d97e8f 100644
--- a/editor/collada/collada.cpp
+++ b/editor/collada/collada.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -31,7 +31,7 @@
#include "collada.h"
-#include "stdio.h"
+#include <stdio.h>
//#define DEBUG_DEFAULT_ANIMATION
//#define DEBUG_COLLADA
@@ -671,15 +671,7 @@ void Collada::_parse_effect_material(XMLParser &parser, Effect &effect, String &
}
} else if (what == "shininess") {
-#if 1
effect.shininess = _parse_param(parser);
-#else
-
- parser.read();
- float shininess = parser.get_node_data().to_double();
- effect.shininess = shininess;
- COLLADA_PRINT("shininess: " + rtos(shininess));
-#endif
}
} else if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END && (parser.get_node_name() == "constant" ||
parser.get_node_name() == "lambert" ||
@@ -2505,7 +2497,7 @@ void Collada::_optimize() {
for (int i = 0; i < vs.root_nodes.size(); i++) {
_create_skeletons(&vs.root_nodes[i]);
}
-#if 1
+
for (int i = 0; i < vs.root_nodes.size(); i++) {
_merge_skeletons(&vs, vs.root_nodes[i]);
}
@@ -2531,7 +2523,7 @@ void Collada::_optimize() {
mgeom.pop_front();
}
}
-#endif
+
for (int i = 0; i < vs.root_nodes.size(); i++) {
_find_morph_nodes(&vs, vs.root_nodes[i]);
}
diff --git a/editor/collada/collada.h b/editor/collada/collada.h
index f94f9ed197..d41a72d7c5 100644
--- a/editor/collada/collada.h
+++ b/editor/collada/collada.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index 47c2cb5536..b4c2ac95cc 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -113,33 +113,7 @@ void ConnectDialog::_tree_node_selected() {
make_callback->hide();
else
make_callback->show();
-#if 0
- List<MethodInfo> methods;
- current->get_method_list(&methods);
- for (List<MethodInfo>::Element *E=methods.front();E;E=E->next()) {
-
- if (E->get().name.length() && E->get().name[0]=='_')
- continue; // hidden method, not show!
-
- if (ClassDB::has_method(node->get_type(),"Node") || ClassDB::has_method(node->get_type(),"Control",true))
- continue; //avoid too much unnecessary stuff
-
- String method=E->get().name+"(";
- for(int i=0;i<E->get().arguments.size();i++) {
-
- if (i!=0)
- method+=", ";
- method+=Variant::get_type_name(E->get().arguments[i].type);
- if (E->get().arguments[i].name.length()) {
- method+=" ";
- method+=E->get().arguments[i].name;
- }
- }
- method+=")";
- //dst_method_list->get_popup()->add_item(method);
- }
-#endif
dst_path->set_text(node->get_path_to(current));
}
@@ -664,7 +638,7 @@ void ConnectionsDock::update_tree() {
if (!(c.flags & CONNECT_PERSIST))
continue;
- Node *target = c.target->cast_to<Node>();
+ Node *target = Object::cast_to<Node>(c.target);
if (!target)
continue;
@@ -800,7 +774,7 @@ ConnectionsDock::ConnectionsDock(EditorNode *p_editor) {
tree->set_v_size_flags(SIZE_EXPAND_FILL);
connect_button = memnew(Button);
- connect_button->set_text("Connect");
+ connect_button->set_text(TTR("Connect"));
HBoxContainer *hb = memnew(HBoxContainer);
vbc->add_child(hb);
hb->add_spacer();
diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h
index 849bb880d4..53f4d857bf 100644
--- a/editor/connections_dialog.h
+++ b/editor/connections_dialog.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 1089068344..344cb87aa6 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/create_dialog.h b/editor/create_dialog.h
index 02ce762726..31f106ea22 100644
--- a/editor/create_dialog.h
+++ b/editor/create_dialog.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index 3533c0993f..890c3d8091 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -50,7 +50,7 @@ void DependencyEditor::_searched(const String &p_path) {
void DependencyEditor::_load_pressed(Object *p_item, int p_cell, int p_button) {
- TreeItem *ti = p_item->cast_to<TreeItem>();
+ TreeItem *ti = Object::cast_to<TreeItem>(p_item);
String fname = ti->get_text(0);
replacing = ti->get_text(1);
@@ -626,7 +626,7 @@ void OrphanResourcesDialog::_delete_confirm() {
void OrphanResourcesDialog::_button_pressed(Object *p_item, int p_column, int p_id) {
- TreeItem *ti = p_item->cast_to<TreeItem>();
+ TreeItem *ti = Object::cast_to<TreeItem>(p_item);
String path = ti->get_metadata(0);
dep_edit->edit(path);
diff --git a/editor/dependency_editor.h b/editor/dependency_editor.h
index 5fdd2b72a8..4dfb9de268 100644
--- a/editor/dependency_editor.h
+++ b/editor/dependency_editor.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp
index 69d7475f4c..6848c43b68 100644
--- a/editor/doc/doc_data.cpp
+++ b/editor/doc/doc_data.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -163,6 +163,43 @@ void DocData::remove_from(const DocData &p_data) {
}
}
+static void return_doc_from_retinfo(DocData::MethodDoc &p_method, const PropertyInfo &p_retinfo) {
+
+ if (p_retinfo.type == Variant::INT && p_retinfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
+ p_method.return_enum = p_retinfo.class_name;
+ p_method.return_type = "int";
+ } else if (p_retinfo.class_name != StringName()) {
+ p_method.return_type = p_retinfo.class_name;
+ } else if (p_retinfo.hint == PROPERTY_HINT_RESOURCE_TYPE) {
+ p_method.return_type = p_retinfo.hint_string;
+ } else if (p_retinfo.type == Variant::NIL && p_retinfo.usage & PROPERTY_USAGE_NIL_IS_VARIANT) {
+ p_method.return_type = "Variant";
+ } else if (p_retinfo.type == Variant::NIL) {
+ p_method.return_type = "void";
+ } else {
+ p_method.return_type = Variant::get_type_name(p_retinfo.type);
+ }
+}
+
+static void argument_doc_from_arginfo(DocData::ArgumentDoc &p_argument, const PropertyInfo &p_arginfo) {
+
+ p_argument.name = p_arginfo.name;
+
+ if (p_arginfo.type == Variant::INT && p_arginfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
+ p_argument.enumeration = p_arginfo.class_name;
+ p_argument.type = "int";
+ } else if (p_arginfo.class_name != StringName()) {
+ p_argument.type = p_arginfo.class_name;
+ } else if (p_arginfo.hint == PROPERTY_HINT_RESOURCE_TYPE) {
+ p_argument.type = p_arginfo.hint_string;
+ } else if (p_arginfo.type == Variant::NIL) {
+ // Parameters cannot be void, so PROPERTY_USAGE_NIL_IS_VARIANT is not necessary
+ p_argument.type = "Variant";
+ } else {
+ p_argument.type = Variant::get_type_name(p_arginfo.type);
+ }
+}
+
void DocData::generate(bool p_basic_types) {
List<StringName> classes;
@@ -196,10 +233,40 @@ void DocData::generate(bool p_basic_types) {
prop.name = E->get().name;
prop.setter = setter;
prop.getter = getter;
- if (E->get().type == Variant::OBJECT && E->get().hint == PROPERTY_HINT_RESOURCE_TYPE)
- prop.type = E->get().hint_string;
- else
- prop.type = Variant::get_type_name(E->get().type);
+
+ bool found_type = false;
+ if (getter != StringName()) {
+ MethodBind *mb = ClassDB::get_method(name, getter);
+ if (mb) {
+ PropertyInfo retinfo = mb->get_return_info();
+
+ found_type = true;
+ if (retinfo.type == Variant::INT && retinfo.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
+ prop.enumeration = retinfo.class_name;
+ prop.type = "int";
+ } else if (retinfo.class_name != StringName()) {
+ prop.type = retinfo.class_name;
+ } else if (retinfo.hint == PROPERTY_HINT_RESOURCE_TYPE) {
+
+ prop.type = retinfo.hint_string;
+ } else if (retinfo.type == Variant::NIL && retinfo.usage & PROPERTY_USAGE_NIL_IS_VARIANT) {
+
+ prop.type = "Variant";
+ } else if (retinfo.type == Variant::NIL) {
+ prop.type = "void";
+ } else {
+ prop.type = Variant::get_type_name(retinfo.type);
+ }
+ }
+ }
+
+ if (!found_type) {
+
+ if (E->get().type == Variant::OBJECT && E->get().hint == PROPERTY_HINT_RESOURCE_TYPE)
+ prop.type = E->get().hint_string;
+ else
+ prop.type = Variant::get_type_name(E->get().type);
+ }
c.properties.push_back(prop);
}
@@ -217,15 +284,13 @@ void DocData::generate(bool p_basic_types) {
method.name = E->get().name;
- MethodBind *m = ClassDB::get_method(name, E->get().name);
-
if (E->get().flags & METHOD_FLAG_VIRTUAL)
method.qualifiers = "virtual";
+
if (E->get().flags & METHOD_FLAG_CONST) {
if (method.qualifiers != "")
method.qualifiers += " ";
method.qualifiers += "const";
-
} else if (E->get().flags & METHOD_FLAG_VARARG) {
if (method.qualifiers != "")
method.qualifiers += " ";
@@ -234,122 +299,23 @@ void DocData::generate(bool p_basic_types) {
for (int i = -1; i < E->get().arguments.size(); i++) {
- PropertyInfo arginfo;
-
if (i == -1) {
-
- arginfo = E->get().return_val;
#ifdef DEBUG_METHODS_ENABLED
- if (m && m->get_return_type() != StringName())
- method.return_type = m->get_return_type();
- else if (method.name.find(":") != -1) {
- method.return_type = method.name.get_slice(":", 1);
- method.name = method.name.get_slice(":", 0);
-
- } else if (arginfo.type != Variant::NIL) // {
+ return_doc_from_retinfo(method, E->get().return_val);
#endif
- method.return_type = (arginfo.hint == PROPERTY_HINT_RESOURCE_TYPE) ? arginfo.hint_string : Variant::get_type_name(arginfo.type);
- //}
-
} else {
- ArgumentDoc argument;
-
- arginfo = E->get().arguments[i];
+ const PropertyInfo &arginfo = E->get().arguments[i];
- String type_name;
-
- if (arginfo.name.find(":") != -1) {
- type_name = arginfo.name.get_slice(":", 1);
- arginfo.name = arginfo.name.get_slice(":", 0);
-
- } else if (arginfo.hint == PROPERTY_HINT_RESOURCE_TYPE) {
- type_name = arginfo.hint_string;
- } else if (arginfo.type == Variant::NIL)
- type_name = "Variant";
- else
- type_name = Variant::get_type_name(arginfo.type);
-
- if (arginfo.type == Variant::OBJECT) {
-
- //print_line("validate: "+cname+"::"+method.name);
- }
-
- if (m && m->has_default_argument(i)) {
- Variant default_arg = m->get_default_argument(i);
- String default_arg_text = m->get_default_argument(i);
-
- switch (default_arg.get_type()) {
-
- case Variant::NIL:
- default_arg_text = "NULL";
- break;
- // atomic types
- case Variant::BOOL:
- if (bool(default_arg))
- default_arg_text = "true";
- else
- default_arg_text = "false";
- break;
- case Variant::INT:
- case Variant::REAL:
- //keep it
- break;
- case Variant::STRING:
- case Variant::NODE_PATH:
- default_arg_text = "\"" + default_arg_text + "\"";
- break;
- case Variant::TRANSFORM:
- if (default_arg.operator Transform() == Transform()) {
- default_arg_text = "";
- }
-
- default_arg_text = Variant::get_type_name(default_arg.get_type()) + "(" + default_arg_text + ")";
- break;
-
- case Variant::RECT3:
- case Variant::COLOR:
- case Variant::PLANE:
- case Variant::POOL_BYTE_ARRAY:
- case Variant::POOL_INT_ARRAY:
- case Variant::POOL_REAL_ARRAY:
- case Variant::POOL_STRING_ARRAY:
- case Variant::POOL_VECTOR2_ARRAY:
- case Variant::POOL_VECTOR3_ARRAY:
- case Variant::POOL_COLOR_ARRAY:
- default_arg_text = Variant::get_type_name(default_arg.get_type()) + "(" + default_arg_text + ")";
- break;
- case Variant::VECTOR2:
- case Variant::RECT2:
- case Variant::VECTOR3:
- case Variant::QUAT:
- case Variant::BASIS:
- default_arg_text = Variant::get_type_name(default_arg.get_type()) + default_arg_text;
- break;
- case Variant::OBJECT:
- if (default_arg.is_zero()) {
- default_arg_text = "NULL";
- break;
- }
- case Variant::DICTIONARY: // 20
- case Variant::ARRAY:
- case Variant::_RID:
-
- default: {}
- }
-
- argument.type = type_name;
- argument.name = arginfo.name;
- argument.default_value = default_arg_text;
- } else {
+ ArgumentDoc argument;
- argument.type = type_name;
- argument.name = arginfo.name;
- }
+ argument_doc_from_arginfo(argument, arginfo);
- if (arginfo.type == Variant::OBJECT) {
+ int darg_idx = i - (E->get().arguments.size() - E->get().default_arguments.size());
- //print_line("validate: "+cname+"::"+method.name);
+ if (darg_idx >= 0) {
+ Variant default_arg = E->get().default_arguments[darg_idx];
+ argument.default_value = default_arg.get_construct_string();
}
method.arguments.push_back(argument);
@@ -404,6 +370,7 @@ void DocData::generate(bool p_basic_types) {
ConstantDoc constant;
constant.name = E->get();
constant.value = itos(ClassDB::get_integer_constant(name, E->get()));
+ constant.enumeration = ClassDB::get_integer_constant_enum(name, E->get());
c.constants.push_back(constant);
}
@@ -500,26 +467,26 @@ void DocData::generate(bool p_basic_types) {
for (int i = 0; i < mi.arguments.size(); i++) {
- ArgumentDoc arg;
- PropertyInfo pi = mi.arguments[i];
+ PropertyInfo arginfo = mi.arguments[i];
- arg.name = pi.name;
- //print_line("arg name: "+arg.name);
- if (pi.type == Variant::NIL)
- arg.type = "var";
+ ArgumentDoc ad;
+ ad.name = arginfo.name;
+
+ if (arginfo.type == Variant::NIL)
+ ad.type = "var";
else
- arg.type = Variant::get_type_name(pi.type);
+ ad.type = Variant::get_type_name(arginfo.type);
+
int defarg = mi.default_arguments.size() - mi.arguments.size() + i;
if (defarg >= 0)
- arg.default_value = mi.default_arguments[defarg];
+ ad.default_value = mi.default_arguments[defarg];
- method.arguments.push_back(arg);
+ method.arguments.push_back(ad);
}
if (mi.return_val.type == Variant::NIL) {
if (mi.return_val.name != "")
method.return_type = "var";
-
} else {
method.return_type = Variant::get_type_name(mi.return_val.type);
}
@@ -565,6 +532,7 @@ void DocData::generate(bool p_basic_types) {
ConstantDoc cd;
cd.name = GlobalConstants::get_global_constant_name(i);
cd.value = itos(GlobalConstants::get_global_constant_value(i));
+ cd.enumeration = GlobalConstants::get_global_constant_enum(i);
c.constants.push_back(cd);
}
@@ -607,26 +575,19 @@ void DocData::generate(bool p_basic_types) {
MethodInfo &mi = E->get();
MethodDoc md;
md.name = mi.name;
- if (mi.return_val.name != "")
- md.return_type = mi.return_val.name;
- else if (mi.name.find(":") != -1) {
- md.return_type = mi.name.get_slice(":", 1);
- md.name = mi.name.get_slice(":", 0);
- } else
- md.return_type = Variant::get_type_name(mi.return_val.type);
- for (int i = 0; i < mi.arguments.size(); i++) {
-
- PropertyInfo &pi = mi.arguments[i];
+ if (mi.flags & METHOD_FLAG_VARARG) {
+ if (md.qualifiers != "")
+ md.qualifiers += " ";
+ md.qualifiers += "vararg";
+ }
- ArgumentDoc ad;
- ad.name = pi.name;
+ return_doc_from_retinfo(md, mi.return_val);
- if (pi.type == Variant::NIL)
- ad.type = "Variant";
- else
- ad.type = Variant::get_type_name(pi.type);
+ for (int i = 0; i < mi.arguments.size(); i++) {
+ ArgumentDoc ad;
+ argument_doc_from_arginfo(ad, mi.arguments[i]);
md.arguments.push_back(ad);
}
@@ -673,6 +634,9 @@ static Error _parse_methods(Ref<XMLParser> &parser, Vector<DocData::MethodDoc> &
ERR_FAIL_COND_V(!parser->has_attribute("type"), ERR_FILE_CORRUPT);
method.return_type = parser->get_attribute_value("type");
+ if (parser->has_attribute("enum")) {
+ method.return_enum = parser->get_attribute_value("enum");
+ }
} else if (name == "argument") {
DocData::ArgumentDoc argument;
@@ -680,6 +644,9 @@ static Error _parse_methods(Ref<XMLParser> &parser, Vector<DocData::MethodDoc> &
argument.name = parser->get_attribute_value("name");
ERR_FAIL_COND_V(!parser->has_attribute("type"), ERR_FILE_CORRUPT);
argument.type = parser->get_attribute_value("type");
+ if (parser->has_attribute("enum")) {
+ argument.enumeration = parser->get_attribute_value("enum");
+ }
method.arguments.push_back(argument);
@@ -803,7 +770,8 @@ Error DocData::_load(Ref<XMLParser> parser) {
prop.getter = parser->get_attribute_value("getter");
if (parser->has_attribute("brief"))
prop.brief_description = parser->get_attribute_value("brief").xml_unescape();
-
+ if (parser->has_attribute("enum"))
+ prop.enumeration = parser->get_attribute_value("enum");
parser->read();
if (parser->get_node_type() == XMLParser::NODE_TEXT)
prop.description = parser->get_node_data().strip_edges();
@@ -861,6 +829,9 @@ Error DocData::_load(Ref<XMLParser> parser) {
constant.name = parser->get_attribute_value("name");
ERR_FAIL_COND_V(!parser->has_attribute("value"), ERR_FILE_CORRUPT);
constant.value = parser->get_attribute_value("value");
+ if (parser->has_attribute("enum")) {
+ constant.enumeration = parser->get_attribute_value("enum");
+ }
parser->read();
if (parser->get_node_type() == XMLParser::NODE_TEXT)
constant.description = parser->get_node_data().strip_edges();
@@ -948,17 +919,27 @@ Error DocData::save(const String &p_path) {
if (m.return_type != "") {
- _write_string(f, 3, "<return type=\"" + m.return_type + "\">");
+ String enum_text;
+ if (m.return_enum != String()) {
+ enum_text = " enum=\"" + m.return_enum + "\"";
+ }
+ _write_string(f, 3, "<return type=\"" + m.return_type + "\"" + enum_text + ">");
_write_string(f, 3, "</return>");
}
for (int j = 0; j < m.arguments.size(); j++) {
ArgumentDoc &a = m.arguments[j];
+
+ String enum_text;
+ if (a.enumeration != String()) {
+ enum_text = " enum=\"" + a.enumeration + "\"";
+ }
+
if (a.default_value != "")
- _write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\" default=\"" + a.default_value.xml_escape(true) + "\">");
+ _write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\"" + enum_text + " default=\"" + a.default_value.xml_escape(true) + "\">");
else
- _write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\">");
+ _write_string(f, 3, "<argument index=\"" + itos(j) + "\" name=\"" + a.name.xml_escape() + "\" type=\"" + a.type.xml_escape() + "\"" + enum_text + ">");
_write_string(f, 3, "</argument>");
}
@@ -980,8 +961,12 @@ Error DocData::save(const String &p_path) {
for (int i = 0; i < c.properties.size(); i++) {
+ String enum_text;
+ if (c.properties[i].enumeration != String()) {
+ enum_text = " enum=\"" + c.properties[i].enumeration + "\"";
+ }
PropertyDoc &p = c.properties[i];
- _write_string(f, 2, "<member name=\"" + p.name + "\" type=\"" + p.type + "\" setter=\"" + p.setter + "\" getter=\"" + p.getter + "\" brief=\"" + p.brief_description.xml_escape(true) + "\">");
+ _write_string(f, 2, "<member name=\"" + p.name + "\" type=\"" + p.type + "\" setter=\"" + p.setter + "\" getter=\"" + p.getter + "\" brief=\"" + p.brief_description.xml_escape(true) + "\"" + enum_text + ">");
if (p.description != "")
_write_string(f, 3, p.description.xml_escape());
_write_string(f, 2, "</member>");
@@ -1021,7 +1006,11 @@ Error DocData::save(const String &p_path) {
for (int i = 0; i < c.constants.size(); i++) {
ConstantDoc &k = c.constants[i];
- _write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"" + k.value + "\">");
+ if (k.enumeration != String()) {
+ _write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"" + k.value + "\">");
+ } else {
+ _write_string(f, 2, "<constant name=\"" + k.name + "\" value=\"" + k.value + "\" enum=\"" + k.enumeration + "\">");
+ }
if (k.description != "")
_write_string(f, 3, k.description.xml_escape());
_write_string(f, 2, "</constant>");
diff --git a/editor/doc/doc_data.h b/editor/doc/doc_data.h
index 41dfae428a..efb4ea3040 100644
--- a/editor/doc/doc_data.h
+++ b/editor/doc/doc_data.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -40,6 +40,7 @@ public:
String name;
String type;
+ String enumeration;
String default_value;
};
@@ -47,6 +48,7 @@ public:
String name;
String return_type;
+ String return_enum;
String qualifiers;
String description;
Vector<ArgumentDoc> arguments;
@@ -59,6 +61,7 @@ public:
String name;
String value;
+ String enumeration;
String description;
};
@@ -66,6 +69,7 @@ public:
String name;
String type;
+ String enumeration;
String brief_description;
String description;
String setter, getter;
diff --git a/editor/doc/doc_dump.cpp b/editor/doc/doc_dump.cpp
index 79a8f79a7c..2ba7e3c779 100644
--- a/editor/doc/doc_dump.cpp
+++ b/editor/doc/doc_dump.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/doc/doc_dump.h b/editor/doc/doc_dump.h
index 300ce916ee..4764a0e0d4 100644
--- a/editor/doc/doc_dump.h
+++ b/editor/doc/doc_dump.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/doc_code_font.h b/editor/doc_code_font.h
index 8fbfa7b1d6..e962351daf 100644
--- a/editor/doc_code_font.h
+++ b/editor/doc_code_font.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/doc_font.h b/editor/doc_font.h
index a3d41bb8ef..4ec8c39db2 100644
--- a/editor/doc_font.h
+++ b/editor/doc_font.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/doc_title_font.h b/editor/doc_title_font.h
index 14da323aa7..dd1bb7ca8e 100644
--- a/editor/doc_title_font.h
+++ b/editor/doc_title_font.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp
index fd90c766fd..8bd7bfb4bd 100644
--- a/editor/editor_about.cpp
+++ b/editor/editor_about.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_about.h b/editor/editor_about.h
index 0bde94531a..d7047c03a3 100644
--- a/editor/editor_about.h
+++ b/editor/editor_about.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index 6c05a9ef80..a8eee24fe2 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -89,7 +89,7 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
unzFile pkg = unzOpen2(p_path.utf8().get_data(), &io);
if (!pkg) {
- error->set_text("Error opening package file, not in zip format.");
+ error->set_text(TTR("Error opening package file, not in zip format."));
return;
}
@@ -221,7 +221,7 @@ void EditorAssetInstaller::ok_pressed() {
unzFile pkg = unzOpen2(package_path.utf8().get_data(), &io);
if (!pkg) {
- error->set_text("Error opening package file, not in zip format.");
+ error->set_text(TTR("Error opening package file, not in zip format."));
return;
}
@@ -229,7 +229,7 @@ void EditorAssetInstaller::ok_pressed() {
Vector<String> failed_files;
- ProgressDialog::get_singleton()->add_task("uncompress", "Uncompressing Assets", status_map.size());
+ ProgressDialog::get_singleton()->add_task("uncompress", TTR("Uncompressing Assets"), status_map.size());
int idx = 0;
while (ret == UNZ_OK) {
@@ -304,7 +304,7 @@ void EditorAssetInstaller::ok_pressed() {
EditorNode::get_singleton()->show_warning(msg);
} else {
if (EditorNode::get_singleton() != NULL)
- EditorNode::get_singleton()->show_warning("Package Installed Successfully!", "Success!");
+ EditorNode::get_singleton()->show_warning(TTR("Package Installed Successfully!"), TTR("Success!"));
}
EditorFileSystem::get_singleton()->scan_changes();
}
@@ -325,8 +325,8 @@ EditorAssetInstaller::EditorAssetInstaller() {
error = memnew(AcceptDialog);
add_child(error);
- get_ok()->set_text("Install");
- set_title("Package Installer");
+ get_ok()->set_text(TTR("Install"));
+ set_title(TTR("Package Installer"));
updating = false;
diff --git a/editor/editor_asset_installer.h b/editor/editor_asset_installer.h
index e74bd6925b..cda1b4d2b5 100644
--- a/editor/editor_asset_installer.h
+++ b/editor/editor_asset_installer.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 282055be4a..6937f74316 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -70,11 +70,14 @@ void EditorAudioBus::_notification(int p_what) {
float real_peak[2] = { -100, -100 };
bool activity_found = false;
- int cc;
+ int cc = 0;
switch (AudioServer::get_singleton()->get_speaker_mode()) {
case AudioServer::SPEAKER_MODE_STEREO: cc = 1; break;
case AudioServer::SPEAKER_SURROUND_51: cc = 4; break;
case AudioServer::SPEAKER_SURROUND_71: cc = 5; break;
+ default:
+ ERR_PRINT("Unknown speaker_mode");
+ break;
}
for (int i = 0; i < cc; i++) {
@@ -128,7 +131,7 @@ void EditorAudioBus::update_send() {
send->clear();
if (get_index() == 0) {
send->set_disabled(true);
- send->set_text("Speakers");
+ send->set_text(TTR("Speakers"));
} else {
send->set_disabled(false);
StringName current_send = AudioServer::get_singleton()->get_bus_send(get_index());
@@ -183,7 +186,7 @@ void EditorAudioBus::update_bus() {
add->set_cell_mode(0, TreeItem::CELL_MODE_CUSTOM);
add->set_editable(0, true);
add->set_selectable(0, false);
- add->set_text(0, "Add Effect");
+ add->set_text(0, TTR("Add Effect"));
update_send();
@@ -221,7 +224,7 @@ void EditorAudioBus::_name_changed(const String &p_new_name) {
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
StringName current = AudioServer::get_singleton()->get_bus_name(get_index());
- ur->create_action("Rename Audio Bus");
+ ur->create_action(TTR("Rename Audio Bus"));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_name", get_index(), attempt);
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_name", get_index(), current);
@@ -264,7 +267,7 @@ void EditorAudioBus::_solo_toggled() {
updating_bus = true;
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Toggle Audio Bus Solo");
+ ur->create_action(TTR("Toggle Audio Bus Solo"));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_solo", get_index(), solo->is_pressed());
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_solo", get_index(), AudioServer::get_singleton()->is_bus_solo(get_index()));
ur->add_do_method(buses, "_update_bus", get_index());
@@ -278,7 +281,7 @@ void EditorAudioBus::_mute_toggled() {
updating_bus = true;
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Toggle Audio Bus Mute");
+ ur->create_action(TTR("Toggle Audio Bus Mute"));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_mute", get_index(), mute->is_pressed());
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_mute", get_index(), AudioServer::get_singleton()->is_bus_mute(get_index()));
ur->add_do_method(buses, "_update_bus", get_index());
@@ -292,7 +295,7 @@ void EditorAudioBus::_bypass_toggled() {
updating_bus = true;
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Toggle Audio Bus Bypass Effects");
+ ur->create_action(TTR("Toggle Audio Bus Bypass Effects"));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_bypass_effects", get_index(), bypass->is_pressed());
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_bypass_effects", get_index(), AudioServer::get_singleton()->is_bus_bypassing_effects(get_index()));
ur->add_do_method(buses, "_update_bus", get_index());
@@ -356,7 +359,7 @@ void EditorAudioBus::_effect_edited() {
updating_bus = true;
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Select Audio Bus Send");
+ ur->create_action(TTR("Select Audio Bus Send"));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_effect_enabled", get_index(), index, effect->is_checked(0));
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_effect_enabled", get_index(), index, AudioServer::get_singleton()->is_bus_effect_enabled(get_index(), index));
ur->add_do_method(buses, "_update_bus", get_index());
@@ -376,14 +379,14 @@ void EditorAudioBus::_effect_add(int p_which) {
Object *fx = ClassDB::instance(name);
ERR_FAIL_COND(!fx);
- AudioEffect *afx = fx->cast_to<AudioEffect>();
+ AudioEffect *afx = Object::cast_to<AudioEffect>(fx);
ERR_FAIL_COND(!afx);
Ref<AudioEffect> afxr = Ref<AudioEffect>(afx);
afxr->set_name(effect_options->get_item_text(p_which));
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Add Audio Bus Effect");
+ ur->create_action(TTR("Add Audio Bus Effect"));
ur->add_do_method(AudioServer::get_singleton(), "add_bus_effect", get_index(), afxr, -1);
ur->add_undo_method(AudioServer::get_singleton(), "remove_bus_effect", get_index(), AudioServer::get_singleton()->get_bus_effect_count(get_index()));
ur->add_do_method(buses, "_update_bus", get_index());
@@ -403,12 +406,13 @@ void EditorAudioBus::_gui_input(const Ref<InputEvent> &p_event) {
if (mb.is_valid() && mb->get_button_index() == 2 && mb->is_pressed()) {
Vector2 pos = Vector2(mb->get_position().x, mb->get_position().y);
- delete_popup->set_position(get_global_position() + pos);
- delete_popup->popup();
+ bus_popup->set_position(get_global_position() + pos);
+ bus_popup->set_item_disabled(1, get_index() == 0);
+ bus_popup->popup();
}
}
-void EditorAudioBus::_delete_pressed(int p_option) {
+void EditorAudioBus::_bus_popup_pressed(int p_option) {
if (p_option == 1) {
emit_signal("delete_request");
@@ -526,7 +530,7 @@ void EditorAudioBus::drop_data_fw(const Point2 &p_point, const Variant &p_data,
bool enabled = AudioServer::get_singleton()->is_bus_effect_enabled(bus, effect);
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Move Bus Effect");
+ ur->create_action(TTR("Move Bus Effect"));
ur->add_do_method(AudioServer::get_singleton(), "remove_bus_effect", bus, effect);
ur->add_do_method(AudioServer::get_singleton(), "add_bus_effect", get_index(), AudioServer::get_singleton()->get_bus_effect(bus, effect), paste_at);
@@ -567,7 +571,7 @@ void EditorAudioBus::_delete_effect_pressed(int p_option) {
int index = item->get_metadata(0);
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Delete Bus Effect");
+ ur->create_action(TTR("Delete Bus Effect"));
ur->add_do_method(AudioServer::get_singleton(), "remove_bus_effect", get_index(), index);
ur->add_undo_method(AudioServer::get_singleton(), "add_bus_effect", get_index(), AudioServer::get_singleton()->get_bus_effect(get_index(), index), index);
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_effect_enabled", get_index(), index, AudioServer::get_singleton()->is_bus_effect_enabled(get_index(), index));
@@ -604,7 +608,7 @@ void EditorAudioBus::_bind_methods() {
ClassDB::bind_method("_effect_selected", &EditorAudioBus::_effect_selected);
ClassDB::bind_method("_effect_add", &EditorAudioBus::_effect_add);
ClassDB::bind_method("_gui_input", &EditorAudioBus::_gui_input);
- ClassDB::bind_method("_delete_pressed", &EditorAudioBus::_delete_pressed);
+ ClassDB::bind_method("_bus_popup_pressed", &EditorAudioBus::_bus_popup_pressed);
ClassDB::bind_method("get_drag_data_fw", &EditorAudioBus::get_drag_data_fw);
ClassDB::bind_method("can_drop_data_fw", &EditorAudioBus::can_drop_data_fw);
ClassDB::bind_method("drop_data_fw", &EditorAudioBus::drop_data_fw);
@@ -735,14 +739,13 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses) {
effect_options->set_item_icon(effect_options->get_item_count() - 1, icon);
}
- delete_popup = bus_options->get_popup();
- delete_popup->add_item("Duplicate");
- delete_popup->add_item("Delete");
- add_child(delete_popup);
- delete_popup->connect("index_pressed", this, "_delete_pressed");
+ bus_popup = bus_options->get_popup();
+ bus_popup->add_item(TTR("Duplicate"));
+ bus_popup->add_item(TTR("Delete"));
+ bus_popup->connect("index_pressed", this, "_bus_popup_pressed");
delete_effect_popup = memnew(PopupMenu);
- delete_effect_popup->add_item("Delete Effect");
+ delete_effect_popup->add_item(TTR("Delete Effect"));
add_child(delete_effect_popup);
delete_effect_popup->connect("index_pressed", this, "_delete_effect_pressed");
}
@@ -840,7 +843,7 @@ void EditorAudioBuses::_add_bus() {
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
//need to simulate new name, so we can undi :(
- ur->create_action("Add Audio Bus");
+ ur->create_action(TTR("Add Audio Bus"));
ur->add_do_method(AudioServer::get_singleton(), "set_bus_count", AudioServer::get_singleton()->get_bus_count() + 1);
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_count", AudioServer::get_singleton()->get_bus_count());
ur->add_do_method(this, "_update_buses");
@@ -865,16 +868,16 @@ void EditorAudioBuses::_update_sends() {
void EditorAudioBuses::_delete_bus(Object *p_which) {
- EditorAudioBus *bus = p_which->cast_to<EditorAudioBus>();
+ EditorAudioBus *bus = Object::cast_to<EditorAudioBus>(p_which);
int index = bus->get_index();
if (index == 0) {
- EditorNode::get_singleton()->show_warning("Master bus can't be deleted!");
+ EditorNode::get_singleton()->show_warning(TTR("Master bus can't be deleted!"));
return;
}
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Delete Audio Bus");
+ ur->create_action(TTR("Delete Audio Bus"));
ur->add_do_method(AudioServer::get_singleton(), "remove_bus", index);
ur->add_undo_method(AudioServer::get_singleton(), "add_bus", index);
ur->add_undo_method(AudioServer::get_singleton(), "set_bus_name", index, AudioServer::get_singleton()->get_bus_name(index));
@@ -897,7 +900,7 @@ void EditorAudioBuses::_duplicate_bus(int p_which) {
int add_at_pos = p_which + 1;
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Duplicate Audio Bus");
+ ur->create_action(TTR("Duplicate Audio Bus"));
ur->add_do_method(AudioServer::get_singleton(), "add_bus", add_at_pos);
ur->add_do_method(AudioServer::get_singleton(), "set_bus_name", add_at_pos, AudioServer::get_singleton()->get_bus_name(p_which) + " Copy");
ur->add_do_method(AudioServer::get_singleton(), "set_bus_volume_db", add_at_pos, AudioServer::get_singleton()->get_bus_volume_db(p_which));
@@ -922,7 +925,7 @@ void EditorAudioBuses::_request_drop_end() {
drop_end = memnew(EditorAudioBusDrop);
bus_hb->add_child(drop_end);
- drop_end->set_custom_minimum_size(bus_hb->get_child(0)->cast_to<Control>()->get_size());
+ drop_end->set_custom_minimum_size(Object::cast_to<Control>(bus_hb->get_child(0))->get_size());
drop_end->connect("dropped", this, "_drop_at_index", varray(), CONNECT_DEFERRED);
}
}
@@ -932,7 +935,7 @@ void EditorAudioBuses::_drop_at_index(int p_bus, int p_index) {
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
//need to simulate new name, so we can undi :(
- ur->create_action("Move Audio Bus");
+ ur->create_action(TTR("Move Audio Bus"));
ur->add_do_method(AudioServer::get_singleton(), "move_bus", p_bus, p_index);
int final_pos;
if (p_index == p_bus) {
@@ -993,7 +996,7 @@ void EditorAudioBuses::_load_default_layout() {
Ref<AudioBusLayout> state = ResourceLoader::load("res://default_bus_layout.tres");
if (state.is_null()) {
- EditorNode::get_singleton()->show_warning("There is no 'res://default_bus_layout.tres' file.");
+ EditorNode::get_singleton()->show_warning(TTR("There is no 'res://default_bus_layout.tres' file."));
return;
}
@@ -1010,7 +1013,7 @@ void EditorAudioBuses::_file_dialog_callback(const String &p_string) {
if (file_dialog->get_mode() == EditorFileDialog::MODE_OPEN_FILE) {
Ref<AudioBusLayout> state = ResourceLoader::load(p_string);
if (state.is_null()) {
- EditorNode::get_singleton()->show_warning("Invalid file, not an audio bus layout.");
+ EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout."));
return;
}
@@ -1144,7 +1147,7 @@ void EditorAudioBuses::open_layout(const String &p_path) {
Ref<AudioBusLayout> state = ResourceLoader::load(p_path);
if (state.is_null()) {
- EditorNode::get_singleton()->show_warning("Invalid file, not an audio bus layout.");
+ EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout."));
return;
}
@@ -1158,9 +1161,9 @@ void EditorAudioBuses::open_layout(const String &p_path) {
void AudioBusesEditorPlugin::edit(Object *p_node) {
- if (p_node->cast_to<AudioBusLayout>()) {
+ if (Object::cast_to<AudioBusLayout>(p_node)) {
- String path = p_node->cast_to<AudioBusLayout>()->get_path();
+ String path = Object::cast_to<AudioBusLayout>(p_node)->get_path();
if (path.is_resource_file()) {
audio_bus_editor->open_layout(path);
}
@@ -1169,7 +1172,7 @@ void AudioBusesEditorPlugin::edit(Object *p_node) {
bool AudioBusesEditorPlugin::handles(Object *p_node) const {
- return (p_node->cast_to<AudioBusLayout>() != NULL);
+ return (Object::cast_to<AudioBusLayout>(p_node) != NULL);
}
void AudioBusesEditorPlugin::make_visible(bool p_visible) {
diff --git a/editor/editor_audio_buses.h b/editor/editor_audio_buses.h
index ef7f5e0adf..e04ba7b89d 100644
--- a/editor/editor_audio_buses.h
+++ b/editor/editor_audio_buses.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -66,7 +66,7 @@ class EditorAudioBus : public PanelContainer {
OptionButton *send;
PopupMenu *effect_options;
- PopupMenu *delete_popup;
+ PopupMenu *bus_popup;
PopupMenu *delete_effect_popup;
Button *solo;
@@ -78,7 +78,7 @@ class EditorAudioBus : public PanelContainer {
bool updating_bus;
void _gui_input(const Ref<InputEvent> &p_event);
- void _delete_pressed(int p_option);
+ void _bus_popup_pressed(int p_option);
void _name_changed(const String &p_new_name);
void _name_focus_exit() { _name_changed(track_name->get_text()); }
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index 0d7874818c..82a7fa734a 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -238,7 +238,7 @@ void EditorAutoloadSettings::_autoload_edited() {
void EditorAutoloadSettings::_autoload_button_pressed(Object *p_item, int p_column, int p_button) {
- TreeItem *ti = p_item->cast_to<TreeItem>();
+ TreeItem *ti = Object::cast_to<TreeItem>(p_item);
String name = "autoload/" + ti->get_text(0);
diff --git a/editor/editor_autoload_settings.h b/editor/editor_autoload_settings.h
index 9f8e3526b4..2e0ce8835e 100644
--- a/editor/editor_autoload_settings.h
+++ b/editor/editor_autoload_settings.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index 51fb1554c1..2cb5340b8b 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -75,7 +75,7 @@ void EditorHistory::_add_object(ObjectID p_object, const String &p_property, int
Object *obj = ObjectDB::get_instance(p_object);
ERR_FAIL_COND(!obj);
- Reference *r = obj->cast_to<Reference>();
+ Reference *r = Object::cast_to<Reference>(obj);
Obj o;
if (r)
o.ref = REF(r);
@@ -141,7 +141,7 @@ ObjectID EditorHistory::get_history_obj(int p_obj) const {
return history[p_obj].path[history[p_obj].level].object;
}
-bool EditorHistory::is_at_begining() const {
+bool EditorHistory::is_at_beginning() const {
return current <= 0;
}
bool EditorHistory::is_at_end() const {
diff --git a/editor/editor_data.h b/editor/editor_data.h
index a601b5019d..33a4091a65 100644
--- a/editor/editor_data.h
+++ b/editor/editor_data.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -74,7 +74,7 @@ class EditorHistory {
void _add_object(ObjectID p_object, const String &p_property, int p_level_change);
public:
- bool is_at_begining() const;
+ bool is_at_beginning() const;
bool is_at_end() const;
void add_object(ObjectID p_object);
@@ -236,10 +236,7 @@ public:
T *get_node_editor_data(Node *p_node) {
if (!selection.has(p_node))
return NULL;
- Object *obj = selection[p_node];
- if (!obj)
- return NULL;
- return obj->cast_to<T>();
+ return Object::cast_to<T>(selection[p_node]);
}
void add_editor_plugin(Object *p_object);
diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp
index b64f5f1c69..cfb3abfd1d 100644
--- a/editor/editor_dir_dialog.cpp
+++ b/editor/editor_dir_dialog.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -31,50 +31,40 @@
#include "editor/editor_file_system.h"
#include "editor/editor_settings.h"
+#include "editor_scale.h"
#include "os/keyboard.h"
#include "os/os.h"
-
-void EditorDirDialog::_update_dir(TreeItem *p_item) {
+void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p_dir, const String &p_select_path) {
updating = true;
- p_item->clear_children();
- DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
- String cdir = p_item->get_metadata(0);
-
- da->change_dir(cdir);
- da->list_dir_begin();
- String p = da->get_next();
- List<String> dirs;
- bool ishidden;
- bool show_hidden = EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files");
+ String path = p_dir->get_path();
- while (p != "") {
+ p_item->set_metadata(0, p_dir->get_path());
+ p_item->set_icon(0, get_icon("Folder", "EditorIcons"));
- ishidden = da->current_is_hidden();
+ if (!p_item->get_parent()) {
+ p_item->set_text(0, "res://");
+ } else {
- if (show_hidden || !ishidden) {
- if (da->current_is_dir() && !p.begins_with(".")) {
- dirs.push_back(p);
- }
+ if (!opened_paths.has(path) && (p_select_path == String() || !p_select_path.begins_with(path))) {
+ p_item->set_collapsed(true);
}
- p = da->get_next();
+
+ p_item->set_text(0, p_dir->get_name());
}
- dirs.sort();
+ //this should be handled by EditorFileSystem already
+ //bool show_hidden = EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files");
+ updating = false;
+ for (int i = 0; i < p_dir->get_subdir_count(); i++) {
- for (List<String>::Element *E = dirs.front(); E; E = E->next()) {
TreeItem *ti = tree->create_item(p_item);
- ti->set_text(0, E->get());
- ti->set_icon(0, get_icon("Folder", "EditorIcons"));
- ti->set_collapsed(true);
+ _update_dir(ti, p_dir->get_subdir(i));
}
-
- memdelete(da);
- updating = false;
}
-void EditorDirDialog::reload() {
+void EditorDirDialog::reload(const String &p_with_path) {
if (!is_visible_in_tree()) {
must_reload = true;
@@ -83,10 +73,7 @@ void EditorDirDialog::reload() {
tree->clear();
TreeItem *root = tree->create_item();
- root->set_metadata(0, "res://");
- root->set_icon(0, get_icon("Folder", "EditorIcons"));
- root->set_text(0, "/");
- _update_dir(root);
+ _update_dir(root, EditorFileSystem::get_singleton()->get_filesystem(), p_with_path);
_item_collapsed(root);
must_reload = false;
}
@@ -94,6 +81,7 @@ void EditorDirDialog::reload() {
void EditorDirDialog::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
+ EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "reload");
reload();
if (!tree->is_connected("item_collapsed", this, "_item_collapsed")) {
@@ -105,6 +93,10 @@ void EditorDirDialog::_notification(int p_what) {
}
}
+ if (p_what == NOTIFICATION_EXIT_TREE) {
+ EditorFileSystem::get_singleton()->disconnect("filesystem_changed", this, "reload");
+ }
+
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
if (must_reload && is_visible_in_tree()) {
reload();
@@ -114,59 +106,15 @@ void EditorDirDialog::_notification(int p_what) {
void EditorDirDialog::_item_collapsed(Object *p_item) {
- TreeItem *item = p_item->cast_to<TreeItem>();
+ TreeItem *item = Object::cast_to<TreeItem>(p_item);
- if (updating || item->is_collapsed())
+ if (updating)
return;
- TreeItem *ci = item->get_children();
- while (ci) {
-
- String p = ci->get_metadata(0);
- if (p == "") {
- String pp = item->get_metadata(0);
- ci->set_metadata(0, pp.plus_file(ci->get_text(0)));
- _update_dir(ci);
- }
- ci = ci->get_next();
- }
-}
-
-void EditorDirDialog::set_current_path(const String &p_path) {
-
- reload();
- String p = p_path;
- if (p.begins_with("res://"))
- p = p.replace_first("res://", "");
-
- Vector<String> dirs = p.split("/", false);
-
- TreeItem *r = tree->get_root();
- for (int i = 0; i < dirs.size(); i++) {
-
- String d = dirs[i];
- TreeItem *p = r->get_children();
- while (p) {
-
- if (p->get_text(0) == d)
- break;
- p = p->get_next();
- }
-
- ERR_FAIL_COND(!p);
- String pp = p->get_metadata(0);
- if (pp == "") {
- p->set_metadata(0, String(r->get_metadata(0)).plus_file(d));
- _update_dir(p);
- }
- updating = true;
- p->set_collapsed(false);
- updating = false;
- _item_collapsed(p);
- r = p;
- }
-
- r->select(0);
+ if (item->is_collapsed())
+ opened_paths.erase(item->get_metadata(0));
+ else
+ opened_paths.insert(item->get_metadata(0));
}
void EditorDirDialog::ok_pressed() {
@@ -184,7 +132,7 @@ void EditorDirDialog::_make_dir() {
TreeItem *ti = tree->get_selected();
if (!ti) {
- mkdirerr->set_text("Please select a base directory first");
+ mkdirerr->set_text(TTR("Please select a base directory first"));
mkdirerr->popup_centered_minsize();
return;
}
@@ -201,14 +149,16 @@ void EditorDirDialog::_make_dir_confirm() {
String dir = ti->get_metadata(0);
- DirAccess *d = DirAccess::open(dir);
+ DirAccessRef d = DirAccess::open(dir);
ERR_FAIL_COND(!d);
Error err = d->make_dir(makedirname->get_text());
if (err != OK) {
- mkdirerr->popup_centered_minsize(Size2(250, 80));
+ mkdirerr->popup_centered_minsize(Size2(250, 80) * EDSCALE);
} else {
- set_current_path(dir.plus_file(makedirname->get_text()));
+ opened_paths.insert(dir);
+ //reload(dir.plus_file(makedirname->get_text()));
+ EditorFileSystem::get_singleton()->scan_changes(); //we created a dir, so rescan changes
}
makedirname->set_text(""); // reset label
}
@@ -218,7 +168,7 @@ void EditorDirDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("_item_collapsed"), &EditorDirDialog::_item_collapsed);
ClassDB::bind_method(D_METHOD("_make_dir"), &EditorDirDialog::_make_dir);
ClassDB::bind_method(D_METHOD("_make_dir_confirm"), &EditorDirDialog::_make_dir_confirm);
- ClassDB::bind_method(D_METHOD("reload"), &EditorDirDialog::reload);
+ ClassDB::bind_method(D_METHOD("reload"), &EditorDirDialog::reload, DEFVAL(""));
ADD_SIGNAL(MethodInfo("dir_selected", PropertyInfo(Variant::STRING, "dir")));
}
diff --git a/editor/editor_dir_dialog.h b/editor/editor_dir_dialog.h
index 0fdb71b0a1..8aa685947b 100644
--- a/editor/editor_dir_dialog.h
+++ b/editor/editor_dir_dialog.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -30,6 +30,7 @@
#ifndef EDITOR_DIR_DIALOG_H
#define EDITOR_DIR_DIALOG_H
+#include "editor/editor_file_system.h"
#include "os/dir_access.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/tree.h"
@@ -42,12 +43,13 @@ class EditorDirDialog : public ConfirmationDialog {
AcceptDialog *mkdirerr;
Button *makedir;
+ Set<String> opened_paths;
Tree *tree;
bool updating;
void _item_collapsed(Object *p_item);
- void _update_dir(TreeItem *p_item);
+ void _update_dir(TreeItem *p_item, EditorFileSystemDirectory *p_dir, const String &p_select_path = String());
void _make_dir();
void _make_dir_confirm();
@@ -61,8 +63,7 @@ protected:
static void _bind_methods();
public:
- void set_current_path(const String &p_path);
- void reload();
+ void reload(const String &p_path = "");
EditorDirDialog();
};
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 14d713bb36..915fb7e5db 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* editor_import_export.cpp */
+/* editor_export.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -1169,2205 +1169,3 @@ void EditorExportPlatformPC::get_platform_features(List<String> *r_features) {
EditorExportPlatformPC::EditorExportPlatformPC() {
}
-
-////////
-
-#if 0
-#include "editor/editor_file_system.h"
-#include "editor/plugins/script_editor_plugin.h"
-#include "editor_node.h"
-#include "editor_settings.h"
-#include "io/config_file.h"
-#include "io/md5.h"
-#include "io/resource_loader.h"
-#include "io/resource_saver.h"
-#include "io/zip_io.h"
-#include "io_plugins/editor_texture_import_plugin.h"
-#include "os/dir_access.h"
-#include "os/file_access.h"
-#include "project_settings.h"
-#include "script_language.h"
-#include "version.h"
-
-
-String EditorImportPlugin::validate_source_path(const String& p_path) {
-
- String gp = ProjectSettings::get_singleton()->globalize_path(p_path);
- String rp = ProjectSettings::get_singleton()->get_resource_path();
- if (!rp.ends_with("/"))
- rp+="/";
-
- return rp.path_to_file(gp);
-}
-
-String EditorImportPlugin::expand_source_path(const String& p_path) {
-
- if (p_path.is_rel_path()) {
- return ProjectSettings::get_singleton()->get_resource_path().plus_file(p_path).simplify_path();
- } else {
- return p_path;
- }
-}
-
-
-String EditorImportPlugin::_validate_source_path(const String& p_path) {
-
- return validate_source_path(p_path);
-}
-
-String EditorImportPlugin::_expand_source_path(const String& p_path) {
-
- return expand_source_path(p_path);
-}
-
-void EditorImportPlugin::_bind_methods() {
-
-
- ClassDB::bind_method(D_METHOD("validate_source_path","path"),&EditorImportPlugin::_validate_source_path);
- ClassDB::bind_method(D_METHOD("expand_source_path","path"),&EditorImportPlugin::_expand_source_path);
-
- ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::STRING,"get_name"));
- ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::STRING,"get_visible_name"));
- ClassDB::add_virtual_method(get_class_static(),MethodInfo("import_dialog",PropertyInfo(Variant::STRING,"from")));
- ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::INT,"import",PropertyInfo(Variant::STRING,"path"),PropertyInfo(Variant::OBJECT,"from",PROPERTY_HINT_RESOURCE_TYPE,"ResourceImportMetadata")));
- ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::POOL_BYTE_ARRAY,"custom_export",PropertyInfo(Variant::STRING,"path"),PropertyInfo(Variant::OBJECT,"platform",PROPERTY_HINT_RESOURCE_TYPE,"EditorExportPlatform")));
- ClassDB::add_virtual_method(get_class_static(),MethodInfo("import_from_drop",PropertyInfo(Variant::POOL_STRING_ARRAY,"files"),PropertyInfo(Variant::STRING,"dest_path")));
- ClassDB::add_virtual_method(get_class_static(),MethodInfo("reimport_multiple_files",PropertyInfo(Variant::POOL_STRING_ARRAY,"files")));
- ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"can_reimport_multiple_files"));
-
- //BIND_VMETHOD( mi );
-}
-
-String EditorImportPlugin::get_name() const {
-
- if (get_script_instance() && get_script_instance()->has_method("get_name")) {
- return get_script_instance()->call("get_name");
- }
-
- ERR_FAIL_V("");
-}
-
-String EditorImportPlugin::get_visible_name() const {
-
- if (get_script_instance() && get_script_instance()->has_method("get_visible_name")) {
- return get_script_instance()->call("get_visible_name");
- }
-
- ERR_FAIL_V("");
-}
-
-
-void EditorImportPlugin::import_dialog(const String& p_from) {
-
- if (get_script_instance() && get_script_instance()->has_method("import_dialog")) {
- get_script_instance()->call("import_dialog",p_from);
- return;
- }
-
- ERR_FAIL();
-
-}
-
-Error EditorImportPlugin::import(const String& p_path, const Ref<ResourceImportMetadata>& p_from) {
-
- if (get_script_instance() && get_script_instance()->has_method("import")) {
- return Error(get_script_instance()->call("import",p_path,p_from).operator int());
- }
-
- ERR_FAIL_V(ERR_UNAVAILABLE);
-}
-
-Vector<uint8_t> EditorImportPlugin::custom_export(const String& p_path, const Ref<EditorExportPlatform> &p_platform) {
-
- if (get_script_instance() && get_script_instance()->has_method("custom_export")) {
- get_script_instance()->call("custom_export",p_path,p_platform);
- }
-
- return Vector<uint8_t>();
-}
-
-bool EditorImportPlugin::can_reimport_multiple_files() const {
-
- if (get_script_instance() && get_script_instance()->has_method("can_reimport_multiple_files")) {
- return get_script_instance()->call("can_reimport_multiple_files");
- }
-
- return false;
-}
-void EditorImportPlugin::reimport_multiple_files(const Vector<String>& p_list) {
-
- if (get_script_instance() && get_script_instance()->has_method("reimport_multiple_files")) {
- get_script_instance()->call("reimport_multiple_files",p_list);
- }
-
-}
-
-void EditorImportPlugin::import_from_drop(const Vector<String>& p_drop, const String &p_dest_path) {
-
- if (get_script_instance() && get_script_instance()->has_method("import_from_drop")) {
- get_script_instance()->call("import_from_drop",p_drop,p_dest_path);
- }
-
-}
-
-EditorImportPlugin::EditorImportPlugin() {
-
-
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-
-
-void EditorExportPlugin::_bind_methods() {
-
- MethodInfo mi = MethodInfo("custom_export:Variant",PropertyInfo(Variant::STRING,"name"),PropertyInfo(Variant::OBJECT,"platform",PROPERTY_HINT_RESOURCE_TYPE,"EditorExportPlatform"));
- mi.return_val.type=Variant::POOL_BYTE_ARRAY;
-
- BIND_VMETHOD( mi );
-}
-
-
-Vector<uint8_t> EditorExportPlugin::custom_export(String& p_path,const Ref<EditorExportPlatform> &p_platform) {
-
- if (get_script_instance()) {
-
- Variant d = get_script_instance()->call("custom_export",p_path,p_platform);
- if (d.get_type()==Variant::NIL)
- return Vector<uint8_t>();
- if (d.get_type()==Variant::POOL_BYTE_ARRAY)
- return d;
-
- ERR_FAIL_COND_V(d.get_type()!=Variant::DICTIONARY,Vector<uint8_t>());
- Dictionary dict=d;
- ERR_FAIL_COND_V(!dict.has("name"),Vector<uint8_t>());
- ERR_FAIL_COND_V(!dict.has("data"),Vector<uint8_t>());
- p_path=dict["name"];
- return dict["data"];
- }
-
- return Vector<uint8_t>();
-
-}
-
-
-EditorExportPlugin::EditorExportPlugin() {
-
-
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////////////////
-
-
-
-static void _add_to_list(EditorFileSystemDirectory *p_efsd,Set<StringName>& r_list) {
-
- for(int i=0;i<p_efsd->get_subdir_count();i++) {
-
- _add_to_list(p_efsd->get_subdir(i),r_list);
- }
-
- for(int i=0;i<p_efsd->get_file_count();i++) {
- r_list.insert(p_efsd->get_file_path(i));
- }
-}
-
-
-struct __EESortDepCmp {
-
- _FORCE_INLINE_ bool operator()(const StringName& p_l,const StringName& p_r) const {
- return p_l.operator String() < p_r.operator String();
- }
-};
-
-
-
-
-static void _edit_files_with_filter(DirAccess *da,const List<String>& p_filters,Set<StringName>& r_list,bool exclude) {
-
-
- List<String> files;
- List<String> dirs;
-
- da->list_dir_begin();
-
- String f = da->get_next();
- while(f!="") {
-
- print_line("HOHO: "+f);
- if (da->current_is_dir())
- dirs.push_back(f);
- else
- files.push_back(f);
-
- f=da->get_next();
- }
-
- String r = da->get_current_dir().replace("\\","/");
- if (!r.ends_with("/"))
- r+="/";
-
- print_line("AT: "+r);
-
- for(List<String>::Element *E=files.front();E;E=E->next()) {
- String fullpath=r+E->get();
- for(const List<String>::Element *F=p_filters.front();F;F=F->next()) {
-
- if (fullpath.matchn(F->get())) {
- String act = TTR("Added:")+" ";
-
- if (!exclude) {
- r_list.insert(fullpath);
- } else {
- act = TTR("Removed:")+" ";
- r_list.erase(fullpath);
- }
-
-
- print_line(act+fullpath);
- }
- }
- }
-
- da->list_dir_end();
-
- for(List<String>::Element *E=dirs.front();E;E=E->next()) {
- if (E->get().begins_with("."))
- continue;
- da->change_dir(E->get());
- _edit_files_with_filter(da,p_filters,r_list,exclude);
- da->change_dir("..");
- }
-
-}
-
-static void _edit_filter_list(Set<StringName>& r_list,const String& p_filter,bool exclude) {
-
- if (p_filter=="")
- return;
- Vector<String> split = p_filter.split(",");
- List<String> filters;
- for(int i=0;i<split.size();i++) {
- String f = split[i].strip_edges();
- if (f.empty())
- continue;
- filters.push_back(f);
- }
-
- DirAccess *da = DirAccess::open("res://");
- ERR_FAIL_NULL(da);
- _edit_files_with_filter(da,filters,r_list,exclude);
- memdelete(da);
-}
-
-static void _add_filter_to_list(Set<StringName>& r_list,const String& p_filter) {
- _edit_filter_list(r_list,p_filter,false);
-}
-
-static void _remove_filter_from_list(Set<StringName>& r_list,const String& p_filter) {
- _edit_filter_list(r_list,p_filter,true);
-}
-
-bool EditorExportPlatform::_set(const StringName& p_name, const Variant& p_value) {
-
- String n = p_name;
-
- if (n=="debug/debugging_enabled") {
- set_debugging_enabled(p_value);
- } else {
- return false;
- }
-
- return true;
-
-}
-
-bool EditorExportPlatform::_get(const StringName& p_name,Variant &r_ret) const {
-
- String n = p_name;
-
- if (n=="debug/debugging_enabled") {
- r_ret=is_debugging_enabled();
- } else {
- return false;
- }
-
- return true;
-
-}
-
-void EditorExportPlatform::_get_property_list( List<PropertyInfo> *p_list) const {
-
- p_list->push_front( PropertyInfo( Variant::BOOL, "debug/debugging_enabled"));
-}
-
-Vector<uint8_t> EditorExportPlatform::get_exported_file_default(String& p_fname) const {
-
- FileAccess *f = FileAccess::open(p_fname,FileAccess::READ);
- ERR_FAIL_COND_V(!f,Vector<uint8_t>());
- Vector<uint8_t> ret;
- ret.resize(f->get_len());
- int rbs = f->get_buffer(ret.ptr(),ret.size());
- memdelete(f);
- return ret;
-}
-
-Vector<uint8_t> EditorExportPlatform::get_exported_file(String& p_fname) const {
-
- Ref<EditorExportPlatform> ep=EditorImportExport::get_singleton()->get_export_platform(get_name());
-
- for(int i=0;i<EditorImportExport::get_singleton()->get_export_plugin_count();i++) {
-
- Vector<uint8_t> data = EditorImportExport::get_singleton()->get_export_plugin(i)->custom_export(p_fname,ep);
- if (data.size())
- return data;
-
- }
-
-
- return get_exported_file_default(p_fname);
-
-
-}
-
-Vector<StringName> EditorExportPlatform::get_dependencies(bool p_bundles) const {
-
-
- Set<StringName> exported;
-
- if (FileAccess::exists("res://project.godot"))
- exported.insert("res://project.godot");
-
- if (EditorImportExport::get_singleton()->get_export_filter()!=EditorImportExport::EXPORT_SELECTED) {
-
- String filter;
- if (EditorImportExport::get_singleton()->get_export_filter()==EditorImportExport::EXPORT_ALL) {
- _add_filter_to_list(exported,"*");
- } else {
- _add_to_list(EditorFileSystem::get_singleton()->get_filesystem(),exported);
- String cf = EditorImportExport::get_singleton()->get_export_custom_filter();
- if (cf!="")
- cf+=",";
- cf+="*.flags";
- _add_filter_to_list(exported,cf);
-
- cf = EditorImportExport::get_singleton()->get_export_custom_filter_exclude();
- _remove_filter_from_list(exported,cf);
- }
-
-
- } else {
-
-
- Map<String,Map<String,String> > remapped_paths;
-
- Set<String> scene_extensions;
- Set<String> resource_extensions;
-
- {
-
- List<String> l;
- /*
- SceneLoader::get_recognized_extensions(&l);
- for(List<String>::Element *E=l.front();E;E=E->next()) {
- scene_extensions.insert(E->get());
- }
- */
- ResourceLoader::get_recognized_extensions_for_type("",&l);
- for(List<String>::Element *E=l.front();E;E=E->next()) {
-
- resource_extensions.insert(E->get());
- }
- }
-
-
- List<StringName> toexport;
-
- EditorImportExport::get_singleton()->get_export_file_list(&toexport);
-
- print_line("TO EXPORT: "+itos(toexport.size()));
-
-
- for (List<StringName>::Element *E=toexport.front();E;E=E->next()) {
-
- print_line("DEP: "+String(E->get()));
- exported.insert(E->get());
- if (p_bundles && EditorImportExport::get_singleton()->get_export_file_action(E->get())==EditorImportExport::ACTION_BUNDLE) {
- print_line("NO BECAUSE OF BUNDLE!");
- continue; //no dependencies needed to be copied
- }
-
- List<String> testsubs;
- testsubs.push_back(E->get());
-
- while(testsubs.size()) {
- //recursive subdep search!
- List<String> deplist;
- ResourceLoader::get_dependencies(testsubs.front()->get(),&deplist);
- testsubs.pop_front();
-
- List<String> subdeps;
-
- for (List<String>::Element *F=deplist.front();F;F=F->next()) {
-
- StringName dep = F->get();
-
- if (exported.has(dep) || EditorImportExport::get_singleton()->get_export_file_action(dep)!=EditorImportExport::ACTION_NONE)
- continue; //dependency added or to be added
- print_line(" SUBDEP: "+String(dep));
-
- exported.insert(dep);
- testsubs.push_back(dep);
- }
- }
- }
- String cf = EditorImportExport::get_singleton()->get_export_custom_filter();
- if (cf!="")
- cf+=",";
- cf+="*.flags";
- _add_filter_to_list(exported,cf);
-
- cf = EditorImportExport::get_singleton()->get_export_custom_filter_exclude();
- _remove_filter_from_list(exported,cf);
-
-
- }
-
- Vector<StringName> ret;
- ret.resize(exported.size());
-
-
- int idx=0;
- for(Set<StringName>::Element *E=exported.front();E;E=E->next()) {
-
- ret[idx++]=E->get();
-
- }
-
- SortArray<StringName,__EESortDepCmp> sort; //some platforms work better if this is sorted
- sort.sort(ret.ptr(),ret.size());
-
- return ret;
-
-}
-
-///////////////////////////////////////
-
-
-
-bool EditorExportPlatform::is_debugging_enabled() const {
-
- return debugging_enabled;
-}
-
-void EditorExportPlatform::set_debugging_enabled(bool p_enabled) {
-
- debugging_enabled = p_enabled;
-}
-
-bool EditorExportPlatformPC::_set(const StringName& p_name, const Variant& p_value) {
-
- String n = p_name;
-
- if (n=="custom_binary/release") {
-
- custom_release_binary=p_value;
- } else if (n=="custom_binary/debug") {
-
- custom_debug_binary=p_value;
- } else if (n=="resources/pack_mode") {
-
- export_mode=ExportMode(int(p_value));
- } else if (n=="resources/bundle_dependencies_(for_optical_disc)") {
-
- bundle=p_value;
- } else if (n=="binary/64_bits") {
-
- use64=p_value;
- } else
- return false;
-
- return true;
-
-}
-
-bool EditorExportPlatformPC::_get(const StringName& p_name,Variant &r_ret) const {
-
- String n = p_name;
-
- if (n=="custom_binary/release") {
-
- r_ret=custom_release_binary;
- } else if (n=="custom_binary/debug") {
-
- r_ret=custom_debug_binary;
- } else if (n=="resources/pack_mode") {
-
- r_ret=export_mode;
- } else if (n=="resources/bundle_dependencies_(for_optical_disc)") {
-
- r_ret=bundle;
- } else if (n=="binary/64_bits") {
-
- r_ret=use64;
- } else
- return false;
-
- return true;
-
-}
-
-void EditorExportPlatformPC::_get_property_list( List<PropertyInfo> *p_list) const {
-
- p_list->push_back( PropertyInfo( Variant::STRING, "custom_binary/debug", PROPERTY_HINT_GLOBAL_FILE,binary_extension));
- p_list->push_back( PropertyInfo( Variant::STRING, "custom_binary/release", PROPERTY_HINT_GLOBAL_FILE,binary_extension));
- p_list->push_back( PropertyInfo( Variant::INT, "resources/pack_mode", PROPERTY_HINT_ENUM,"Pack into executable,Pack into binary file (.pck),Pack into archive file (.zip)"));
- p_list->push_back( PropertyInfo( Variant::BOOL, "resources/bundle_dependencies_(for_optical_disc)"));
- p_list->push_back( PropertyInfo( Variant::BOOL, "binary/64_bits"));
-}
-
-
-
-static void _exp_add_dep(Map<StringName,List<StringName> > &deps,const StringName& p_path) {
-
-
- if (deps.has(p_path))
- return; //already done
-
- deps.insert(p_path,List<StringName>());
-
- List<StringName> &deplist=deps[p_path];
- Set<StringName> depset;
-
- List<String> dl;
- ResourceLoader::get_dependencies(p_path,&dl);
-
- //added in order so child dependencies are always added bfore parent dependencies
- for (List<String>::Element *E=dl.front();E;E=E->next()) {
-
-
- if (!deps.has(E->get()))
- _exp_add_dep(deps,E->get());
-
- for(List<StringName>::Element *F=deps[E->get()].front();F;F=F->next()) {
-
-
- if (!depset.has(F->get())) {
- depset.insert(F->get());
- deplist.push_back(F->get());
- }
- }
-
- if (!depset.has(E->get())) {
- depset.insert(E->get());
- deplist.push_back(E->get());
- }
-
- }
-}
-
-
-
-Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func, void* p_udata,bool p_make_bundles) {
-
-/* ALL FILES AND DEPENDENCIES */
-
- Vector<StringName> files=get_dependencies(p_make_bundles);
-
- Map<StringName,List<StringName> > deps;
-
- if (false) {
- for(int i=0;i<files.size();i++) {
-
- _exp_add_dep(deps,files[i]);
-
- }
- }
-
-
-
-/* GROUP ATLAS */
-
-
- List<StringName> groups;
-
- EditorImportExport::get_singleton()->image_export_get_groups(&groups);
-
- Map<StringName,StringName> remap_files;
- Set<StringName> saved;
-
- int counter=0;
-
- for(List<StringName>::Element *E=groups.front();E;E=E->next()) {
-
- if (!EditorImportExport::get_singleton()->image_export_group_get_make_atlas(E->get()))
- continue; //uninterested, only process for atlas!
-
- List<StringName> atlas_images;
- EditorImportExport::get_singleton()->image_export_get_images_in_group(E->get(),&atlas_images);
- atlas_images.sort_custom<StringName::AlphCompare>();
-
- for (List<StringName>::Element *F=atlas_images.front();F;) {
-
- List<StringName>::Element *N=F->next();
-
- if (!FileAccess::exists(F->get())) {
- atlas_images.erase(F);
- }
-
- F=N;
-
- }
-
- if (atlas_images.size()<=1)
- continue;
-
- int group_format=0;
- float group_lossy_quality=EditorImportExport::get_singleton()->image_export_group_get_lossy_quality(E->get());
- int group_shrink=EditorImportExport::get_singleton()->image_export_group_get_shrink(E->get());
- group_shrink*=EditorImportExport::get_singleton()->get_export_image_shrink();
-
- switch(EditorImportExport::get_singleton()->image_export_group_get_image_action(E->get())) {
- case EditorImportExport::IMAGE_ACTION_KEEP:
- case EditorImportExport::IMAGE_ACTION_NONE: {
-
- switch(EditorImportExport::get_singleton()->get_export_image_action()) {
- case EditorImportExport::IMAGE_ACTION_NONE: {
-
- group_format=EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSLESS; //?
-
- } break; //use default
- case EditorImportExport::IMAGE_ACTION_COMPRESS_DISK: {
- group_format=EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSY;
- } break; //use default
- case EditorImportExport::IMAGE_ACTION_COMPRESS_RAM: {
- group_format=EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_RAM;
- } break; //use default
- }
-
- group_lossy_quality=EditorImportExport::get_singleton()->get_export_image_quality();
-
- } break; //use default
- case EditorImportExport::IMAGE_ACTION_COMPRESS_DISK: {
- group_format=EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSY;
- } break; //use default
- case EditorImportExport::IMAGE_ACTION_COMPRESS_RAM: {
- group_format=EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_RAM;
- } break; //use default
- }
-
- String image_list_md5;
-
- {
- MD5_CTX ctx;
- MD5Init(&ctx);
- for (List<StringName>::Element *F=atlas_images.front();F;F=F->next()) {
-
- String p = F->get();
- MD5Update(&ctx,(unsigned char*)p.utf8().get_data(),p.utf8().length());
-
- }
-
- MD5Final(&ctx);
- image_list_md5=String::md5(ctx.digest);
- }
- //ok see if cached
- String md5;
- bool atlas_valid=true;
- String atlas_name;
-
- {
- MD5_CTX ctx;
- MD5Init(&ctx);
- String path = ProjectSettings::get_singleton()->get_resource_path()+"::"+String(E->get())+"::"+get_name();
- MD5Update(&ctx,(unsigned char*)path.utf8().get_data(),path.utf8().length());
- MD5Final(&ctx);
- md5 = String::md5(ctx.digest);
- }
-
- FileAccess *f=NULL;
-
- if (!FileAccess::exists(EditorSettings::get_singleton()->get_settings_path()+"/tmp/atlas-"+md5)) {
- print_line("NO MD5 INVALID");
- atlas_valid=false;
- }
-
- if (atlas_valid)
- f=FileAccess::open(EditorSettings::get_singleton()->get_settings_path()+"/tmp/atlas-"+md5,FileAccess::READ);
-
- if (atlas_valid) {
- //compare options
- /*Dictionary options;
- options.parse_json(f->get_line());
- if (!options.has("lossy_quality") || float(options["lossy_quality"])!=group_lossy_quality)
- atlas_valid=false;
- else if (!options.has("shrink") || int(options["shrink"])!=group_shrink)
- atlas_valid=false;
- else if (!options.has("image_format") || int(options["image_format"])!=group_format)
- atlas_valid=false;
-
- if (!atlas_valid)
- print_line("JSON INVALID");
-*/
- }
-
-
- if (atlas_valid) {
- //check md5 of list of image /names/
- if (f->get_line().strip_edges()!=image_list_md5) {
- atlas_valid=false;
- print_line("IMAGE MD5 INVALID!");
- }
-
- }
-
- Vector<Rect2> rects;
- bool resave_deps=false;
-
- if (atlas_valid) {
-
- //check if images were not modified
- for (List<StringName>::Element *F=atlas_images.front();F;F=F->next()) {
-
- Vector<String> slices = f->get_line().strip_edges().split("::");
-
- if (slices.size()!=10) {
- atlas_valid=false;
- print_line("CAN'T SLICE IN 10");
- break;
- }
- uint64_t mod_time = slices[0].to_int64();
- uint64_t file_mod_time = FileAccess::get_modified_time(F->get());
- if (mod_time!=file_mod_time) {
-
- String image_md5 = slices[1];
- String file_md5 = FileAccess::get_md5(F->get());
-
- if (image_md5!=file_md5) {
- atlas_valid=false;
- print_line("IMAGE INVALID "+slices[0]);
- break;
- } else {
- resave_deps=true;
- }
- }
-
- if (atlas_valid) {
- //push back region and margin
- rects.push_back(Rect2(slices[2].to_float(),slices[3].to_float(),slices[4].to_float(),slices[5].to_float()));
- rects.push_back(Rect2(slices[6].to_float(),slices[7].to_float(),slices[8].to_float(),slices[9].to_float()));
- }
- }
-
- }
-
- if (f) {
- memdelete(f);
- f=NULL;
- }
-
- print_line("ATLAS VALID? "+itos(atlas_valid)+" RESAVE DEPS? "+itos(resave_deps));
- if (!atlas_valid) {
- rects.clear();
- //oh well, atlas is not valid. need to make new one....
-
- String dst_file = EditorSettings::get_singleton()->get_settings_path()+"/tmp/atlas-"+md5+".tex";
- Ref<ResourceImportMetadata> imd = memnew( ResourceImportMetadata );
- //imd->set_editor();
-
-
- for (List<StringName>::Element *F=atlas_images.front();F;F=F->next()) {
-
- imd->add_source(EditorImportPlugin::validate_source_path(F->get()),FileAccess::get_md5(F->get()));
-
- }
-
-
- imd->set_option("format",group_format);
-
-
- int flags=0;
-
- if (ProjectSettings::get_singleton()->get("image_loader/filter"))
- flags|=EditorTextureImportPlugin::IMAGE_FLAG_FILTER;
- if (!ProjectSettings::get_singleton()->get("image_loader/gen_mipmaps"))
- flags|=EditorTextureImportPlugin::IMAGE_FLAG_NO_MIPMAPS;
- if (!ProjectSettings::get_singleton()->get("image_loader/repeat"))
- flags|=EditorTextureImportPlugin::IMAGE_FLAG_REPEAT;
-
- flags|=EditorTextureImportPlugin::IMAGE_FLAG_FIX_BORDER_ALPHA;
-
- imd->set_option("flags",flags);
- imd->set_option("quality",group_lossy_quality);
- imd->set_option("atlas",true);
- imd->set_option("crop",true);
- imd->set_option("shrink",group_shrink);
-
-
-
- Ref<EditorTextureImportPlugin> plugin = EditorImportExport::get_singleton()->get_import_plugin_by_name("texture");
- Error err = plugin->import2(dst_file,imd,get_image_compression(),true);
- if (err) {
-
- EditorNode::add_io_error(TTR("Error saving atlas:")+" "+dst_file.get_file());
- return ERR_CANT_CREATE;
- }
-
- ERR_FAIL_COND_V(imd->get_option("rects")==Variant(),ERR_BUG);
-
- Array r_rects=imd->get_option("rects");
- rects.resize(r_rects.size());
- for(int i=0;i<r_rects.size();i++) {
- //get back region and margins
- rects[i]=r_rects[i];
- }
-
-
- resave_deps=true;
- }
-
-
- //atlas is valid (or it was just saved i guess), create the atex files and save them
-
- if (resave_deps) {
- f=FileAccess::open(EditorSettings::get_singleton()->get_settings_path()+"/tmp/atlas-"+md5,FileAccess::WRITE);
- Dictionary options;
- options["lossy_quality"]=group_lossy_quality;
- options["shrink"]=EditorImportExport::get_singleton()->image_export_group_get_shrink(E->get());
- options["image_format"]=group_format;
- //f->store_line(options.to_json());
- f->store_line(image_list_md5);
- }
-
- //go through all ATEX files
-
- {
- Ref<ImageTexture> atlas = memnew( ImageTexture ); //fake atlas!
- String atlas_path="res://atlas-"+md5+".tex";
- atlas->set_path(atlas_path);
- int idx=0;
- for (List<StringName>::Element *F=atlas_images.front();F;F=F->next()) {
-
- String p = F->get();
- Ref<AtlasTexture> atex = memnew(AtlasTexture);
- atex->set_atlas(atlas);
- Rect2 region=rects[idx++];
- Rect2 margin=rects[idx++];
- atex->set_region(region);
- atex->set_margin(margin);
-
- String path = EditorSettings::get_singleton()->get_settings_path()+"/tmp/tmpatlas.atlastex";
- Error err = ResourceSaver::save(path,atex);
- if (err!=OK) {
- EditorNode::add_io_error(TTR("Could not save atlas subtexture:")+" "+path);
- return ERR_CANT_CREATE;
- }
- Vector<uint8_t> data = FileAccess::get_file_as_array(path);
- String dst_path = F->get().operator String().get_basename()+".atlastex";
- err = p_func(p_udata,dst_path,data,counter++,files.size());
- saved.insert(dst_path);
- if (err)
- return err;
-
- if (f) {
- //recreating deps..
- String depline;
- //depline=String(F->get())+"::"+itos(FileAccess::get_modified_time(F->get()))+"::"+FileAccess::get_md5(F->get()); name unnecessary by top md5
- depline=itos(FileAccess::get_modified_time(F->get()))+"::"+FileAccess::get_md5(F->get());
- depline+="::"+itos(region.pos.x)+"::"+itos(region.pos.y)+"::"+itos(region.size.x)+"::"+itos(region.size.y);
- depline+="::"+itos(margin.pos.x)+"::"+itos(margin.pos.y)+"::"+itos(margin.size.x)+"::"+itos(margin.size.y);
- f->store_line(depline);
- }
-
- remap_files[F->get()]=dst_path;
- }
-
- Vector<uint8_t> atlas_data = FileAccess::get_file_as_array(EditorSettings::get_singleton()->get_settings_path()+"/tmp/atlas-"+md5+".tex");
- Error err = p_func(p_udata,atlas_path,atlas_data,counter,files.size());
- saved.insert(atlas_path);
- if (err)
- return err;
-
- }
-
-
- if (f) {
- memdelete(f);
- }
-
- }
-
-
- StringName engine_cfg="res://project.godot";
- StringName boot_splash;
- {
- String splash=ProjectSettings::get_singleton()->get("application/boot_splash"); //avoid splash from being converted
- splash=splash.strip_edges();
- if (splash!=String()) {
- if (!splash.begins_with("res://"))
- splash="res://"+splash;
- splash=splash.simplify_path();
- boot_splash=splash;
- }
- }
- StringName custom_cursor;
- {
- String splash=ProjectSettings::get_singleton()->get("display/custom_mouse_cursor"); //avoid splash from being converted
- splash=splash.strip_edges();
- if (splash!=String()) {
- if (!splash.begins_with("res://"))
- splash="res://"+splash;
- splash=splash.simplify_path();
- custom_cursor=splash;
- }
- }
-
-
-
-
- for(int i=0;i<files.size();i++) {
-
- if (remap_files.has(files[i]) || files[i]==engine_cfg) //gonna be remapped (happened before!)
- continue; //from atlas?
- String src=files[i];
- Vector<uint8_t> buf;
-
- if (src==boot_splash || src==custom_cursor)
- buf = get_exported_file_default(src); //bootsplash must be kept if used
- else
- buf = get_exported_file(src);
-
- ERR_CONTINUE( saved.has(src) );
-
- Error err = p_func(p_udata,src,buf,counter++,files.size());
- if (err)
- return err;
-
- saved.insert(src);
- if (src!=String(files[i]))
- remap_files[files[i]]=src;
-
- }
-
-
- {
-
- //make binary project.godot config
- Map<String,Variant> custom;
-
-
- if (remap_files.size()) {
- Vector<String> remapsprop;
- for(Map<StringName,StringName>::Element *E=remap_files.front();E;E=E->next()) {
- print_line("REMAP: "+String(E->key())+" -> "+E->get());
- remapsprop.push_back(E->key());
- remapsprop.push_back(E->get());
- }
-
- custom["remap/all"]=remapsprop;
- }
-
- //add presaved dependencies
- for(Map<StringName,List<StringName> >::Element *E=deps.front();E;E=E->next()) {
-
- if (E->get().size()==0)
- continue; //no deps
- String key;
- Vector<StringName> deps;
- //if bundle continue (when bundles supported obviously)
-
- if (remap_files.has(E->key())) {
- key=remap_files[E->key()];
- } else {
- key=E->key();
- }
-
- deps.resize(E->get().size());
- int i=0;
-
- for(List<StringName>::Element *F=E->get().front();F;F=F->next()) {
- deps[i++]=F->get();
- print_line(" -"+String(F->get()));
- }
-
- NodePath prop(deps,true,String()); //seems best to use this for performance
-
- custom["deps/"+key.md5_text()]=prop;
-
- }
-
- String remap_file="project.binary";
- String engine_cfb =EditorSettings::get_singleton()->get_settings_path()+"/tmp/tmp"+remap_file;
- ProjectSettings::get_singleton()->save_custom(engine_cfb,custom);
- Vector<uint8_t> data = FileAccess::get_file_as_array(engine_cfb);
-
- Error err = p_func(p_udata,"res://"+remap_file,data,counter,files.size());
- if (err)
- return err;
-
- }
-
- return OK;
-}
-
-static int _get_pad(int p_alignment, int p_n) {
-
- int rest = p_n % p_alignment;
- int pad = 0;
- if (rest > 0) {
- pad = p_alignment - rest;
- };
-
- return pad;
-};
-
-void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags) {
-
- String host = EditorSettings::get_singleton()->get("network/debug/remote_host");
- int remote_port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
-
- if (p_flags&EXPORT_REMOTE_DEBUG_LOCALHOST)
- host="localhost";
-
- if (p_flags&EXPORT_DUMB_CLIENT) {
- int port = EditorSettings::get_singleton()->get("filesystem/file_server/port");
- String passwd = EditorSettings::get_singleton()->get("filesystem/file_server/password");
- r_flags.push_back("--remote-fs");
- r_flags.push_back(host+":"+itos(port));
- if (passwd!="") {
- r_flags.push_back("--remote-fs-password");
- r_flags.push_back(passwd);
- }
- }
-
- if (p_flags&EXPORT_REMOTE_DEBUG) {
-
- r_flags.push_back("--remote-debug");
-
- r_flags.push_back(host+":"+String::num(remote_port));
-
- List<String> breakpoints;
- ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
-
-
- if (breakpoints.size()) {
-
- r_flags.push_back("--breakpoints");
- String bpoints;
- for(const List<String>::Element *E=breakpoints.front();E;E=E->next()) {
-
- bpoints+=E->get().replace(" ","%20");
- if (E->next())
- bpoints+=",";
- }
-
- r_flags.push_back(bpoints);
- }
-
- }
-
- if (p_flags&EXPORT_VIEW_COLLISONS) {
-
- r_flags.push_back("--debug-collisions");
- }
-
- if (p_flags&EXPORT_VIEW_NAVIGATION) {
-
- r_flags.push_back("--debug-navigation");
- }
-
-
-}
-
-Error EditorExportPlatform::save_pack_file(void *p_userdata,const String& p_path, const Vector<uint8_t>& p_data,int p_file,int p_total) {
-
-
- PackData *pd = (PackData*)p_userdata;
-
- CharString cs=p_path.utf8();
- pd->f->store_32(cs.length());
- pd->f->store_buffer((uint8_t*)cs.get_data(),cs.length());
- TempData td;
- td.pos=pd->f->get_pos();
- td.ofs=pd->ftmp->get_pos();
- td.size=p_data.size();
- pd->file_ofs.push_back(td);
- pd->f->store_64(0); //ofs
- pd->f->store_64(0); //size
- {
- MD5_CTX ctx;
- MD5Init(&ctx);
- MD5Update(&ctx,(unsigned char*)p_data.ptr(),p_data.size());
- MD5Final(&ctx);
- pd->f->store_buffer(ctx.digest,16);
- }
- pd->ep->step(TTR("Storing File:")+" "+p_path,2+p_file*100/p_total,false);
- pd->count++;
- pd->ftmp->store_buffer(p_data.ptr(),p_data.size());
- if (pd->alignment > 1) {
-
- int pad = _get_pad(pd->alignment, pd->ftmp->get_pos());
- for (int i=0; i<pad; i++) {
-
- pd->ftmp->store_8(0);
- };
- };
- return OK;
-
-}
-
-Error EditorExportPlatform::save_zip_file(void *p_userdata,const String& p_path, const Vector<uint8_t>& p_data,int p_file,int p_total) {
-
-
- String path=p_path.replace_first("res://","");
-
- ZipData *zd = (ZipData*)p_userdata;
-
- zipFile zip=(zipFile)zd->zip;
-
- zipOpenNewFileInZip(zip,
- path.utf8().get_data(),
- NULL,
- NULL,
- 0,
- NULL,
- 0,
- NULL,
- Z_DEFLATED,
- Z_DEFAULT_COMPRESSION);
-
- zipWriteInFileInZip(zip,p_data.ptr(),p_data.size());
- zipCloseFileInZip(zip);
-
- zd->ep->step(TTR("Storing File:")+" "+p_path,2+p_file*100/p_total,false);
- zd->count++;
- return OK;
-
-}
-
-Error EditorExportPlatform::save_zip(const String& p_path, bool p_make_bundles) {
-
- EditorProgress ep("savezip",TTR("Packing"),102);
-
- //FileAccess *tmp = FileAccess::open(tmppath,FileAccess::WRITE);
-
- FileAccess *src_f;
- zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
- zipFile zip=zipOpen2(p_path.utf8().get_data(),APPEND_STATUS_CREATE,NULL,&io);
-
- ZipData zd;
- zd.count=0;
- zd.ep=&ep;
- zd.zip=zip;
-
-
- Error err = export_project_files(save_zip_file,&zd,p_make_bundles);
-
- zipClose(zip,NULL);
-
- return err;
-}
-
-Error EditorExportPlatform::save_pack(FileAccess *dst,bool p_make_bundles, int p_alignment) {
-
- EditorProgress ep("savepack",TTR("Packing"),102);
-
- String tmppath = EditorSettings::get_singleton()->get_settings_path()+"/tmp/packtmp";
- FileAccess *tmp = FileAccess::open(tmppath,FileAccess::WRITE);
- uint64_t ofs_begin = dst->get_pos();
-
- dst->store_32(0x43504447); //GDPK
- dst->store_32(0); //pack version
- dst->store_32(VERSION_MAJOR);
- dst->store_32(VERSION_MINOR);
- dst->store_32(0); //hmph
- for(int i=0;i<16;i++) {
- //reserved
- dst->store_32(0);
- }
-
- size_t fcountpos = dst->get_pos();
- dst->store_32(0);
-
- PackData pd;
- pd.ep=&ep;
- pd.f=dst;
- pd.ftmp=tmp;
- pd.count=0;
- pd.alignment = p_alignment;
- Error err = export_project_files(save_pack_file,&pd,p_make_bundles);
- memdelete(tmp);
- if (err)
- return err;
-
- if (p_alignment > 1) {
- int pad = _get_pad(p_alignment, dst->get_pos());
- for (int i=0; i<pad; i++) {
-
- dst->store_8(0);
- };
- };
-
- size_t ofsplus = dst->get_pos();
- //append file
-
- tmp = FileAccess::open(tmppath,FileAccess::READ);
-
- ERR_FAIL_COND_V(!tmp,ERR_CANT_OPEN;)
- const int bufsize=16384;
- uint8_t buf[bufsize];
-
- while(true) {
-
- int got = tmp->get_buffer(buf,bufsize);
- if (got<=0)
- break;
- dst->store_buffer(buf,got);
- }
-
- memdelete(tmp);
-
- dst->store_64(dst->get_pos()-ofs_begin);
- dst->store_32(0x43504447); //GDPK
-
- //fix offsets
-
- dst->seek(fcountpos);
- dst->store_32(pd.count);
- for(int i=0;i<pd.file_ofs.size();i++) {
-
- dst->seek(pd.file_ofs[i].pos);
- dst->store_64(pd.file_ofs[i].ofs+ofsplus);
- dst->store_64(pd.file_ofs[i].size);
- }
-
- return OK;
-}
-
-EditorExportPlatform::EditorExportPlatform() {
-
- debugging_enabled = true;
-}
-
-Error EditorExportPlatformPC::export_project(const String& p_path, bool p_debug, int p_flags) {
-
-
-
- EditorProgress ep("export",vformat(TTR("Exporting for %s"),get_name()),102);
-
- const int BUFSIZE = 32768;
-
-
-
- ep.step(TTR("Setting Up.."),0);
-
- String exe_path="";
-
- if (p_debug)
- exe_path=custom_debug_binary;
- else
- exe_path=custom_release_binary;
-
- if (exe_path=="") {
- String fname;
- if (use64) {
- if (p_debug)
- fname=debug_binary64;
- else
- fname=release_binary64;
- } else {
- if (p_debug)
- fname=debug_binary32;
- else
- fname=release_binary32;
- }
- String err="";
- exe_path=find_export_template(fname,&err);
- if (exe_path=="") {
- EditorNode::add_io_error(err);
- return ERR_FILE_CANT_READ;
- }
- }
-
- FileAccess *src_exe=FileAccess::open(exe_path,FileAccess::READ);
- if (!src_exe) {
-
- EditorNode::add_io_error("Couldn't read source executable at:\n "+exe_path);
- return ERR_FILE_CANT_READ;
- }
-
- FileAccess *dst=FileAccess::open(p_path,FileAccess::WRITE);
- if (!dst) {
-
- EditorNode::add_io_error("Can't copy executable file to:\n "+p_path);
- return ERR_FILE_CANT_WRITE;
- }
-
- uint8_t buff[32768];
-
- while(true) {
-
- int c = src_exe->get_buffer(buff,BUFSIZE);
- if (c>0) {
-
- dst->store_buffer(buff,c);
- } else {
- break;
- }
- }
-
- String dstfile = p_path.replace_first("res://","").replace("\\","/");
- if (export_mode!=EXPORT_EXE) {
-
- String dstfile_extension=export_mode==EXPORT_ZIP?".zip":".pck";
- if (dstfile.find("/")!=-1)
- dstfile=dstfile.get_base_dir()+"/data"+dstfile_extension;
- else
- dstfile="data"+dstfile_extension;
- if (export_mode==EXPORT_PACK) {
-
- memdelete(dst);
-
- dst=FileAccess::open(dstfile,FileAccess::WRITE);
- if (!dst) {
-
- EditorNode::add_io_error("Can't write data pack to:\n "+p_path);
- return ERR_FILE_CANT_WRITE;
- }
- }
- }
-
-
-
- memdelete(src_exe);
-
- Error err = export_mode==EXPORT_ZIP?save_zip(dstfile,bundle):save_pack(dst,bundle);
- memdelete(dst);
- return err;
-}
-
-void EditorExportPlatformPC::set_binary_extension(const String& p_extension) {
-
- binary_extension=p_extension;
-}
-
-EditorExportPlatformPC::EditorExportPlatformPC() {
-
- export_mode=EXPORT_PACK;
- use64=true;
-}
-
-
-
-
-
-
-
-
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////
-
-
-EditorImportExport* EditorImportExport::singleton=NULL;
-
-void EditorImportExport::add_import_plugin(const Ref<EditorImportPlugin>& p_plugin) {
-
- // Need to make sure the name is unique if we are going to lookup by it
- ERR_FAIL_COND(by_idx.has(p_plugin->get_name()));
-
- by_idx[ p_plugin->get_name() ]=plugins.size();
- plugins.push_back(p_plugin);
-}
-
-void EditorImportExport::remove_import_plugin(const Ref<EditorImportPlugin>& p_plugin) {
-
- String plugin_name = p_plugin->get_name();
-
- // Keep the indices the same
- // Find the index of the target plugin
- ERR_FAIL_COND(!by_idx.has(plugin_name));
- int idx = by_idx[plugin_name];
- int last_idx = plugins.size() - 1;
-
- // Swap the last plugin and the target one
- SWAP(plugins[idx], plugins[last_idx]);
-
- // Update the index of the old last one
- by_idx[plugins[idx]->get_name()] = idx;
-
- // Remove the target plugin's by_idx entry
- by_idx.erase(plugin_name);
-
- // Erase the plugin
- plugins.remove(last_idx);
-}
-
-int EditorImportExport::get_import_plugin_count() const{
-
- return plugins.size();
-}
-Ref<EditorImportPlugin> EditorImportExport::get_import_plugin(int p_idx) const{
-
- ERR_FAIL_INDEX_V(p_idx,plugins.size(),Ref<EditorImportPlugin>());
- return plugins[p_idx];
-
-}
-
-
-
-Ref<EditorImportPlugin> EditorImportExport::get_import_plugin_by_name(const String& p_string) const{
-
- ERR_FAIL_COND_V( !by_idx.has(p_string), Ref<EditorImportPlugin>());
- return plugins[ by_idx[p_string] ];
-}
-
-void EditorImportExport::add_export_plugin(const Ref<EditorExportPlugin>& p_plugin) {
-
- ERR_FAIL_COND( p_plugin.is_null() );
-
- export_plugins.push_back(p_plugin);
-}
-
-void EditorImportExport::remove_export_plugin(const Ref<EditorExportPlugin>& p_plugin) {
-
- ERR_FAIL_COND( p_plugin.is_null() );
- export_plugins.erase(p_plugin);
-}
-
-int EditorImportExport::get_export_plugin_count() const{
-
- return export_plugins.size();
-}
-Ref<EditorExportPlugin> EditorImportExport::get_export_plugin(int p_idx) const{
-
- ERR_FAIL_INDEX_V(p_idx,export_plugins.size(),Ref<EditorExportPlugin>());
- return export_plugins[p_idx];
-}
-
-void EditorImportExport::set_export_file_action(const StringName& p_file, FileAction p_action) {
-
- if (p_action==ACTION_NONE) {
-
- files.erase(p_file);
- } else {
-
- files[p_file]=p_action;
- }
-
-}
-
-EditorImportExport::FileAction EditorImportExport::get_export_file_action(const StringName& p_file) const{
-
-
- if (files.has(p_file))
- return files[p_file];
-
-
- return ACTION_NONE;
-}
-
-void EditorImportExport::get_export_file_list(List<StringName> *p_files){
-
-
- for (Map<StringName,FileAction>::Element *E=files.front();E;E=E->next()) {
-
- p_files->push_back(E->key());
- }
-
-}
-
-void EditorImportExport::add_export_platform(const Ref<EditorExportPlatform>& p_export) {
-
- exporters[p_export->get_name()]=p_export;
-}
-
-
-void EditorImportExport::get_export_platforms(List<StringName> *r_platforms) {
-
- for (Map<StringName,Ref<EditorExportPlatform> >::Element *E=exporters.front();E;E=E->next()) {
-
- r_platforms->push_back(E->key());
- }
-}
-
-Ref<EditorExportPlatform> EditorImportExport::get_export_platform(const StringName& p_platform) {
-
- if (exporters.has(p_platform)) {
- return exporters[p_platform];
- } else {
- return Ref<EditorExportPlatform>();
- }
-}
-
-
-bool EditorImportExport::poll_export_platforms() {
-
- bool changed=false;
- for (Map<StringName,Ref<EditorExportPlatform> >::Element *E=exporters.front();E;E=E->next()) {
-
- if (E->get()->poll_devices())
- changed=true;
- }
-
- return changed;
-
-}
-
-void EditorImportExport::set_export_filter(ExportFilter p_enable) {
-
- export_filter=p_enable;
-}
-
-EditorImportExport::ExportFilter EditorImportExport::get_export_filter() const{
-
- return export_filter;
-}
-
-void EditorImportExport::set_export_custom_filter(const String& p_custom_filter){
- export_custom_filter=p_custom_filter;
-}
-void EditorImportExport::set_export_custom_filter_exclude(const String& p_custom_filter){
- export_custom_filter_exclude=p_custom_filter;
-}
-String EditorImportExport::get_export_custom_filter() const{
- return export_custom_filter;
-}
-String EditorImportExport::get_export_custom_filter_exclude() const{
- return export_custom_filter_exclude;
-}
-
-void EditorImportExport::set_export_image_action(ImageAction p_action) {
-
- image_action=p_action;
-}
-
-EditorImportExport::ImageAction EditorImportExport::get_export_image_action() const{
-
- return image_action;
-}
-
-void EditorImportExport::set_export_image_shrink(float p_shrink) {
-
- image_shrink=p_shrink;
-}
-
-float EditorImportExport::get_export_image_shrink() const{
-
- return image_shrink;
-}
-
-
-void EditorImportExport::set_export_image_quality(float p_quality){
-
- image_action_compress_quality=p_quality;
-}
-
-float EditorImportExport::get_export_image_quality() const{
-
- return image_action_compress_quality;
-}
-
-void EditorImportExport::image_export_group_create(const StringName& p_name) {
-
- ERR_FAIL_COND(image_groups.has(p_name));
- ImageGroup ig;
- ig.action=IMAGE_ACTION_NONE; //default
- ig.make_atlas=false;
- ig.shrink=1;
- ig.lossy_quality=0.7;
- image_groups[p_name]=ig;
-
-
-}
-
-
-bool EditorImportExport::image_export_has_group(const StringName& p_name) const {
-
- return image_groups.has(p_name);
-}
-void EditorImportExport::image_export_get_groups(List<StringName> *r_name) const {
-
- for (Map<StringName,ImageGroup>::Element *E=image_groups.front();E;E=E->next()) {
-
- r_name->push_back(E->key());
- }
-}
-
-void EditorImportExport::image_export_group_remove(const StringName& p_name){
-
- ERR_FAIL_COND(!image_groups.has(p_name));
- image_groups.erase(p_name);
-}
-void EditorImportExport::image_export_group_set_image_action(const StringName& p_export_group,ImageAction p_action){
-
- ERR_FAIL_COND(!image_groups.has(p_export_group));
- image_groups[p_export_group].action=p_action;
-
-}
-EditorImportExport::ImageAction EditorImportExport::image_export_group_get_image_action(const StringName& p_export_group) const{
-
- ERR_FAIL_COND_V(!image_groups.has(p_export_group),IMAGE_ACTION_NONE);
- return image_groups[p_export_group].action;
-
-}
-void EditorImportExport::image_export_group_set_make_atlas(const StringName& p_export_group,bool p_make){
-
- ERR_FAIL_COND(!image_groups.has(p_export_group));
- image_groups[p_export_group].make_atlas=p_make;
-
-}
-bool EditorImportExport::image_export_group_get_make_atlas(const StringName& p_export_group) const{
-
- ERR_FAIL_COND_V(!image_groups.has(p_export_group),false);
- return image_groups[p_export_group].make_atlas;
-
-}
-void EditorImportExport::image_export_group_set_shrink(const StringName& p_export_group,float p_amount){
- ERR_FAIL_COND(!image_groups.has(p_export_group));
- image_groups[p_export_group].shrink=p_amount;
-
-}
-float EditorImportExport::image_export_group_get_shrink(const StringName& p_export_group) const{
-
- ERR_FAIL_COND_V(!image_groups.has(p_export_group),1);
- return image_groups[p_export_group].shrink;
-
-}
-
-void EditorImportExport::image_export_group_set_lossy_quality(const StringName& p_export_group,float p_amount){
- ERR_FAIL_COND(!image_groups.has(p_export_group));
- image_groups[p_export_group].lossy_quality=p_amount;
-
-}
-float EditorImportExport::image_export_group_get_lossy_quality(const StringName& p_export_group) const{
-
- ERR_FAIL_COND_V(!image_groups.has(p_export_group),1);
- return image_groups[p_export_group].lossy_quality;
-
-}
-
-StringName EditorImportExport::image_get_export_group(const StringName& p_image) const {
-
- if (image_group_files.has(p_image))
- return image_group_files[p_image];
- else
- return StringName();
-
-}
-
-void EditorImportExport::image_add_to_export_group(const StringName& p_image,const StringName& p_export_group) {
-
-
- bool emptygroup = String(p_export_group)==String();
- ERR_FAIL_COND(!emptygroup && !image_groups.has(p_export_group));
-
- if (emptygroup)
- image_group_files.erase(p_image);
- else
- image_group_files[p_image]=p_export_group;
-}
-
-void EditorImportExport::image_export_get_images_in_group(const StringName& p_group,List<StringName> *r_images) const {
-
- for (Map<StringName,StringName>::Element *E=image_group_files.front();E;E=E->next()) {
-
- if (p_group==E->get())
- r_images->push_back(E->key());
- }
-}
-
-void EditorImportExport::set_convert_text_scenes(bool p_convert) {
-
- convert_text_scenes=p_convert;
-}
-
-bool EditorImportExport::get_convert_text_scenes() const{
-
- return convert_text_scenes;
-}
-
-
-void EditorImportExport::load_config() {
-
- Ref<ConfigFile> cf = memnew( ConfigFile );
-
- Error err = cf->load("res://export.cfg");
- if (err!=OK)
- return; //no export config to be loaded!
-
-
- export_custom_filter=cf->get_value("export_filter","filter");
- export_custom_filter_exclude=cf->get_value("export_filter","filter_exclude");
- String t=cf->get_value("export_filter","type");
- if (t=="selected")
- export_filter=EXPORT_SELECTED;
- else if (t=="resources")
- export_filter=EXPORT_RESOURCES;
- else if (t=="all")
- export_filter=EXPORT_ALL;
-
- if (cf->has_section("convert_images")) {
-
- String ci = "convert_images";
- String action = cf->get_value(ci,"action");
- if (action=="none")
- image_action=IMAGE_ACTION_NONE;
- else if (action=="compress_ram")
- image_action=IMAGE_ACTION_COMPRESS_RAM;
- else if (action=="compress_disk")
- image_action=IMAGE_ACTION_COMPRESS_DISK;
-
- image_action_compress_quality = cf->get_value(ci,"compress_quality");
- if (cf->has_section_key(ci,"shrink"))
- image_shrink = cf->get_value(ci,"shrink");
- else
- image_shrink=1;
- String formats=cf->get_value(ci,"formats");
- Vector<String> f = formats.split(",");
- image_formats.clear();
- for(int i=0;i<f.size();i++) {
- image_formats.insert(f[i].strip_edges());
- }
- }
-
- if (cf->has_section("convert_scenes")) {
-
- convert_text_scenes = cf->get_value("convert_scenes","convert_text_scenes");
- }
-
-
- if (cf->has_section("export_filter_files")) {
-
-
- String eff = "export_filter_files";
- List<String> k;
- cf->get_section_keys(eff,&k);
- for(List<String>::Element *E=k.front();E;E=E->next()) {
-
- String val = cf->get_value(eff,E->get());
- if (val=="copy") {
- files[E->get()]=ACTION_COPY;
- } else if (val=="bundle") {
- files[E->get()]=ACTION_BUNDLE;
- }
- }
- }
-
- List<String> sect;
-
- cf->get_sections(&sect);
-
- for(List<String>::Element *E=sect.front();E;E=E->next()) {
-
- String s = E->get();
- if (!s.begins_with("platform:"))
- continue;
- String p = s.substr(s.find(":")+1,s.length());
-
- if (!exporters.has(p))
- continue;
-
- Ref<EditorExportPlatform> ep = exporters[p];
- if (!ep.is_valid()) {
- continue;
- }
- List<String> keys;
- cf->get_section_keys(s,&keys);
- for(List<String>::Element *F=keys.front();F;F=F->next()) {
- ep->set(F->get(),cf->get_value(s,F->get()));
- }
- }
-
- //save image groups
-
- if (cf->has_section("image_groups")) {
-
- sect.clear();
- cf->get_section_keys("image_groups",&sect);
- for(List<String>::Element *E=sect.front();E;E=E->next()) {
-
- Dictionary d = cf->get_value("image_groups",E->get());
- ImageGroup g;
- g.action=IMAGE_ACTION_NONE;
- g.make_atlas=false;
- g.lossy_quality=0.7;
- g.shrink=1;
-
- if (d.has("action")) {
- String action=d["action"];
- if (action=="compress_ram")
- g.action=IMAGE_ACTION_COMPRESS_RAM;
- else if (action=="compress_disk")
- g.action=IMAGE_ACTION_COMPRESS_DISK;
- else if (action=="keep")
- g.action=IMAGE_ACTION_KEEP;
- }
-
- if (d.has("atlas"))
- g.make_atlas=d["atlas"];
- if (d.has("lossy_quality"))
- g.lossy_quality=d["lossy_quality"];
- if (d.has("shrink")) {
-
- g.shrink=d["shrink"];
- g.shrink=CLAMP(g.shrink,1,8);
- }
-
- image_groups[E->get()]=g;
-
- }
-
- if (cf->has_section_key("image_group_files","files")) {
-
- Vector<String> sa=cf->get_value("image_group_files","files");
- if (sa.size()%2==0) {
- for(int i=0;i<sa.size();i+=2) {
- image_group_files[sa[i]]=sa[i+1];
- }
- }
- }
-
- }
-
-
- if (cf->has_section("script")) {
-
- if (cf->has_section_key("script","action")) {
-
- String action = cf->get_value("script","action");
- if (action=="compile")
- script_action=SCRIPT_ACTION_COMPILE;
- else if (action=="encrypt")
- script_action=SCRIPT_ACTION_ENCRYPT;
- else
- script_action=SCRIPT_ACTION_NONE;
-
- }
-
- if (cf->has_section_key("script","encrypt_key")) {
-
- script_key = cf->get_value("script","encrypt_key");
- }
- }
-
- if (cf->has_section("convert_samples")) {
-
- if (cf->has_section_key("convert_samples","action")) {
- String action = cf->get_value("convert_samples","action");
- if (action=="none") {
- sample_action=SAMPLE_ACTION_NONE;
- } else if (action=="compress_ram") {
- sample_action=SAMPLE_ACTION_COMPRESS_RAM;
- }
- }
-
- if (cf->has_section_key("convert_samples","max_hz"))
- sample_action_max_hz=cf->get_value("convert_samples","max_hz");
-
- if (cf->has_section_key("convert_samples","trim"))
- sample_action_trim=cf->get_value("convert_samples","trim");
- }
-
-
-
-}
-
-
-
-
-
-void EditorImportExport::save_config() {
-
- Ref<ConfigFile> cf = memnew( ConfigFile );
-
- switch(export_filter) {
- case EXPORT_SELECTED: cf->set_value("export_filter","type","selected"); break;
- case EXPORT_RESOURCES: cf->set_value("export_filter","type","resources"); break;
- case EXPORT_ALL: cf->set_value("export_filter","type","all"); break;
- }
-
- cf->set_value("export_filter","filter",export_custom_filter);
- cf->set_value("export_filter", "filter_exclude",export_custom_filter_exclude);
-
- String file_action_section = "export_filter_files";
-
- for (Map<StringName,FileAction>::Element *E=files.front();E;E=E->next()) {
-
- String f=E->key();
- String a;
- switch (E->get()) {
- case ACTION_NONE: {}
- case ACTION_COPY: a="copy"; break;
- case ACTION_BUNDLE: a="bundle"; break;
- }
-
- cf->set_value(file_action_section,f,a);
- }
-
-
- for (Map<StringName,Ref<EditorExportPlatform> >::Element *E=exporters.front();E;E=E->next()) {
-
- String pname = "platform:"+String(E->key());
-
- Ref<EditorExportPlatform> ep = E->get();
-
- List<PropertyInfo> pl;
- ep->get_property_list(&pl);
-
- for (List<PropertyInfo>::Element *F=pl.front();F;F=F->next()) {
-
- cf->set_value(pname,F->get().name,ep->get(F->get().name));
- }
-
- }
-
- switch(image_action) {
- case IMAGE_ACTION_NONE: cf->set_value("convert_images","action","none"); break;
- case IMAGE_ACTION_COMPRESS_RAM: cf->set_value("convert_images","action","compress_ram"); break;
- case IMAGE_ACTION_COMPRESS_DISK: cf->set_value("convert_images","action","compress_disk"); break;
- }
-
- cf->set_value("convert_images","shrink",image_shrink);
- cf->set_value("convert_images","compress_quality",image_action_compress_quality);
-
- String formats;
- for(Set<String>::Element *E=image_formats.front();E;E=E->next()) {
-
- if (E!=image_formats.front())
- formats+=",";
- formats+=E->get();
- }
-
- cf->set_value("convert_images","formats",formats);
-
- //save image groups
-
- for(Map<StringName,ImageGroup>::Element *E=image_groups.front();E;E=E->next()) {
-
- Dictionary d;
- switch(E->get().action) {
- case IMAGE_ACTION_NONE: d["action"]="default"; break;
- case IMAGE_ACTION_COMPRESS_RAM: d["action"]="compress_ram"; break;
- case IMAGE_ACTION_COMPRESS_DISK: d["action"]="compress_disk"; break;
- case IMAGE_ACTION_KEEP: d["action"]="keep"; break;
- }
-
-
- d["atlas"]=E->get().make_atlas;
- d["shrink"]=E->get().shrink;
- d["lossy_quality"]=E->get().lossy_quality;
- cf->set_value("image_groups",E->key(),d);
-
- }
-
- if (image_groups.size() && image_group_files.size()){
-
- Vector<String> igfkeys;
- igfkeys.resize(image_group_files.size());
- int idx=0;
- for (Map<StringName,StringName>::Element *E=image_group_files.front();E;E=E->next()) {
- igfkeys[idx++]=E->key();
- }
- igfkeys.sort();
-
- Vector<String> igfsave;
- igfsave.resize(image_group_files.size()*2);
- idx=0;
- for (int i=0;i<igfkeys.size();++i) {
-
- igfsave[idx++]=igfkeys[i];
- igfsave[idx++]=image_group_files[igfkeys[i]];
- }
- cf->set_value("image_group_files","files",igfsave);
- }
-
- switch(script_action) {
- case SCRIPT_ACTION_NONE: cf->set_value("script","action","none"); break;
- case SCRIPT_ACTION_COMPILE: cf->set_value("script","action","compile"); break;
- case SCRIPT_ACTION_ENCRYPT: cf->set_value("script","action","encrypt"); break;
- }
-
- cf->set_value("convert_scenes","convert_text_scenes",convert_text_scenes);
-
- cf->set_value("script","encrypt_key",script_key);
-
- switch(sample_action) {
- case SAMPLE_ACTION_NONE: cf->set_value("convert_samples","action","none"); break;
- case SAMPLE_ACTION_COMPRESS_RAM: cf->set_value("convert_samples","action","compress_ram"); break;
- }
-
- cf->set_value("convert_samples","max_hz",sample_action_max_hz);
- cf->set_value("convert_samples","trim",sample_action_trim);
-
- cf->save("res://export.cfg");
-
-}
-
-
-void EditorImportExport::script_set_action(ScriptAction p_action) {
-
- script_action=p_action;
-}
-
-EditorImportExport::ScriptAction EditorImportExport::script_get_action() const{
-
- return script_action;
-}
-
-void EditorImportExport::script_set_encryption_key(const String& p_key){
-
- script_key=p_key;
-}
-String EditorImportExport::script_get_encryption_key() const{
-
- return script_key;
-}
-
-
-void EditorImportExport::sample_set_action(SampleAction p_action) {
-
- sample_action=p_action;
-}
-
-EditorImportExport::SampleAction EditorImportExport::sample_get_action() const{
-
- return sample_action;
-}
-
-void EditorImportExport::sample_set_max_hz(int p_hz){
-
- sample_action_max_hz=p_hz;
-}
-int EditorImportExport::sample_get_max_hz() const{
-
- return sample_action_max_hz;
-}
-
-void EditorImportExport::sample_set_trim(bool p_trim){
-
- sample_action_trim=p_trim;
-}
-bool EditorImportExport::sample_get_trim() const{
-
- return sample_action_trim;
-}
-
-PoolVector<String> EditorImportExport::_get_export_file_list() {
-
- PoolVector<String> fl;
- for (Map<StringName,FileAction>::Element *E=files.front();E;E=E->next()) {
-
- fl.push_back(E->key());
- }
-
- return fl;
-}
-
-PoolVector<String> EditorImportExport::_get_export_platforms() {
-
- PoolVector<String> ep;
- for (Map<StringName,Ref<EditorExportPlatform> >::Element *E=exporters.front();E;E=E->next()) {
-
- ep.push_back(E->key());
- }
-
- return ep;
-
-}
-
-void EditorImportExport::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("add_import_plugin","plugin"),&EditorImportExport::add_import_plugin);
- ClassDB::bind_method(D_METHOD("remove_import_plugin","plugin"),&EditorImportExport::remove_import_plugin);
- ClassDB::bind_method(D_METHOD("get_import_plugin_count"),&EditorImportExport::get_import_plugin_count);
- ClassDB::bind_method(D_METHOD("get_import_plugin","idx"),&EditorImportExport::get_import_plugin);
- ClassDB::bind_method(D_METHOD("get_import_plugin_by_name","name"),&EditorImportExport::get_import_plugin_by_name);
-
- ClassDB::bind_method(D_METHOD("add_export_plugin","plugin"),&EditorImportExport::add_export_plugin);
- ClassDB::bind_method(D_METHOD("remove_export_plugin","plugin"),&EditorImportExport::remove_export_plugin);
- ClassDB::bind_method(D_METHOD("get_export_plugin_count"),&EditorImportExport::get_export_plugin_count);
- ClassDB::bind_method(D_METHOD("get_export_plugin","idx"),&EditorImportExport::get_export_plugin);
-
- ClassDB::bind_method(D_METHOD("set_export_file_action","file","action"),&EditorImportExport::set_export_file_action);
- ClassDB::bind_method(D_METHOD("get_export_file_action","file"),&EditorImportExport::get_export_file_action);
- ClassDB::bind_method(D_METHOD("get_export_file_list"),&EditorImportExport::_get_export_file_list);
-
- ClassDB::bind_method(D_METHOD("add_export_platform","platform"),&EditorImportExport::add_export_platform);
- //ClassDB::bind_method(D_METHOD("remove_export_platform","platform"),&EditorImportExport::add_export_platform);
- ClassDB::bind_method(D_METHOD("get_export_platform","name"),&EditorImportExport::get_export_platform);
- ClassDB::bind_method(D_METHOD("get_export_platforms"),&EditorImportExport::_get_export_platforms);
-
- ClassDB::bind_method(D_METHOD("set_export_filter","filter"),&EditorImportExport::set_export_filter);
- ClassDB::bind_method(D_METHOD("get_export_filter"),&EditorImportExport::get_export_filter);
-
- ClassDB::bind_method(D_METHOD("set_export_custom_filter","filter"),&EditorImportExport::set_export_custom_filter);
- ClassDB::bind_method(D_METHOD("get_export_custom_filter"),&EditorImportExport::get_export_custom_filter);
-
- ClassDB::bind_method(D_METHOD("set_export_custom_filter_exclude","filter_exclude"),&EditorImportExport::set_export_custom_filter_exclude);
- ClassDB::bind_method(D_METHOD("get_export_custom_filter_exclude"),&EditorImportExport::get_export_custom_filter_exclude);
-
-
- ClassDB::bind_method(D_METHOD("image_export_group_create"),&EditorImportExport::image_export_group_create);
- ClassDB::bind_method(D_METHOD("image_export_group_remove"),&EditorImportExport::image_export_group_remove);
- ClassDB::bind_method(D_METHOD("image_export_group_set_image_action"),&EditorImportExport::image_export_group_set_image_action);
- ClassDB::bind_method(D_METHOD("image_export_group_set_make_atlas"),&EditorImportExport::image_export_group_set_make_atlas);
- ClassDB::bind_method(D_METHOD("image_export_group_set_shrink"),&EditorImportExport::image_export_group_set_shrink);
- ClassDB::bind_method(D_METHOD("image_export_group_get_image_action"),&EditorImportExport::image_export_group_get_image_action);
- ClassDB::bind_method(D_METHOD("image_export_group_get_make_atlas"),&EditorImportExport::image_export_group_get_make_atlas);
- ClassDB::bind_method(D_METHOD("image_export_group_get_shrink"),&EditorImportExport::image_export_group_get_shrink);
- ClassDB::bind_method(D_METHOD("image_add_to_export_group"),&EditorImportExport::image_add_to_export_group);
- ClassDB::bind_method(D_METHOD("script_set_action"),&EditorImportExport::script_set_action);
- ClassDB::bind_method(D_METHOD("script_set_encryption_key"),&EditorImportExport::script_set_encryption_key);
- ClassDB::bind_method(D_METHOD("script_get_action"),&EditorImportExport::script_get_action);
- ClassDB::bind_method(D_METHOD("script_get_encryption_key"),&EditorImportExport::script_get_encryption_key);
-
-
-
- BIND_ENUM_CONSTANT( ACTION_NONE );
- BIND_ENUM_CONSTANT( ACTION_COPY );
- BIND_ENUM_CONSTANT( ACTION_BUNDLE );
-
- BIND_ENUM_CONSTANT( EXPORT_SELECTED );
- BIND_ENUM_CONSTANT( EXPORT_RESOURCES );
- BIND_ENUM_CONSTANT( EXPORT_ALL );
-
- BIND_ENUM_CONSTANT( IMAGE_ACTION_NONE );
- BIND_ENUM_CONSTANT( IMAGE_ACTION_COMPRESS_DISK );
- BIND_ENUM_CONSTANT( IMAGE_ACTION_COMPRESS_RAM );
- BIND_ENUM_CONSTANT( IMAGE_ACTION_KEEP );
-
- BIND_ENUM_CONSTANT( SCRIPT_ACTION_NONE );
- BIND_ENUM_CONSTANT( SCRIPT_ACTION_COMPILE );
- BIND_ENUM_CONSTANT( SCRIPT_ACTION_ENCRYPT );
-};
-
-
-
-EditorImportExport::EditorImportExport() {
-
- export_filter=EXPORT_RESOURCES;
- singleton=this;
- image_action=IMAGE_ACTION_NONE;
- image_action_compress_quality=0.7;
- image_formats.insert("png");
- image_shrink=1;
-
-
- script_action=SCRIPT_ACTION_COMPILE;
-
- sample_action=SAMPLE_ACTION_NONE;
- sample_action_max_hz=44100;
- sample_action_trim=false;
-
- convert_text_scenes=true;
-
-}
-
-
-
-EditorImportExport::~EditorImportExport() {
-
-
-
-}
-#endif
diff --git a/editor/editor_export.h b/editor/editor_export.h
index df42b0d95d..3b99c68c85 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* editor_import_export.h */
+/* editor_export.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 26dbc27136..abcdc0b64c 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -53,6 +53,7 @@ void EditorFileDialog::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
+ //_update_icons
mode_thumbnails->set_icon(get_icon("FileThumbnail", "EditorIcons"));
mode_list->set_icon(get_icon("FileList", "EditorIcons"));
dir_prev->set_icon(get_icon("ArrowLeft", "EditorIcons"));
@@ -92,6 +93,23 @@ void EditorFileDialog::_notification(int p_what) {
if (show_hidden_files != show_hidden)
set_show_hidden_files(show_hidden);
set_display_mode((DisplayMode)EditorSettings::get_singleton()->get("filesystem/file_dialog/display_mode").operator int());
+
+ //_update_icons
+ mode_thumbnails->set_icon(get_icon("FileThumbnail", "EditorIcons"));
+ mode_list->set_icon(get_icon("FileList", "EditorIcons"));
+ dir_prev->set_icon(get_icon("ArrowLeft", "EditorIcons"));
+ dir_next->set_icon(get_icon("ArrowRight", "EditorIcons"));
+ dir_up->set_icon(get_icon("ArrowUp", "EditorIcons"));
+ refresh->set_icon(get_icon("Reload", "EditorIcons"));
+ favorite->set_icon(get_icon("Favorites", "EditorIcons"));
+
+ fav_up->set_icon(get_icon("MoveUp", "EditorIcons"));
+ fav_down->set_icon(get_icon("MoveDown", "EditorIcons"));
+ fav_rm->set_icon(get_icon("RemoveSmall", "EditorIcons"));
+
+ Theme::get_default()->clear_icon("ResizedFile", "EditorIcons");
+ Theme::get_default()->clear_icon("ResizedFolder", "EditorIcons");
+ update_file_list();
}
}
@@ -809,27 +827,27 @@ void EditorFileDialog::set_mode(Mode p_mode) {
case MODE_OPEN_FILE:
get_ok()->set_text(TTR("Open"));
- set_title("Open a File");
+ set_title(TTR("Open a File"));
makedir->hide();
break;
case MODE_OPEN_FILES:
get_ok()->set_text(TTR("Open"));
- set_title("Open File(s)");
+ set_title(TTR("Open File(s)"));
makedir->hide();
break;
case MODE_OPEN_DIR:
get_ok()->set_text(TTR("Open"));
- set_title("Open a Directory");
+ set_title(TTR("Open a Directory"));
makedir->show();
break;
case MODE_OPEN_ANY:
get_ok()->set_text(TTR("Open"));
- set_title("Open a File or Directory");
+ set_title(TTR("Open a File or Directory"));
makedir->show();
break;
case MODE_SAVE_FILE:
get_ok()->set_text(TTR("Save"));
- set_title("Save a File");
+ set_title(TTR("Save a File"));
makedir->show();
break;
}
diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h
index f44193c70b..3b22189014 100644
--- a/editor/editor_file_dialog.h
+++ b/editor/editor_file_dialog.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 9d194e0501..6e12a8fd02 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -118,6 +118,12 @@ Vector<String> EditorFileSystemDirectory::get_file_deps(int p_idx) const {
return files[p_idx]->deps;
}
+bool EditorFileSystemDirectory::get_file_import_is_valid(int p_idx) const {
+
+ ERR_FAIL_INDEX_V(p_idx, files.size(), false);
+ return files[p_idx]->import_valid;
+}
+
StringName EditorFileSystemDirectory::get_file_type(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, files.size(), "");
@@ -142,6 +148,7 @@ void EditorFileSystemDirectory::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_file", "idx"), &EditorFileSystemDirectory::get_file);
ClassDB::bind_method(D_METHOD("get_file_path", "idx"), &EditorFileSystemDirectory::get_file_path);
ClassDB::bind_method(D_METHOD("get_file_type", "idx"), &EditorFileSystemDirectory::get_file_type);
+ ClassDB::bind_method(D_METHOD("get_file_import_is_valid", "idx"), &EditorFileSystemDirectory::get_file_import_is_valid);
ClassDB::bind_method(D_METHOD("get_name"), &EditorFileSystemDirectory::get_name);
ClassDB::bind_method(D_METHOD("get_path"), &EditorFileSystemDirectory::get_path);
ClassDB::bind_method(D_METHOD("get_parent"), &EditorFileSystemDirectory::get_parent);
@@ -181,7 +188,7 @@ void EditorFileSystem::_scan_filesystem() {
String project = ProjectSettings::get_singleton()->get_resource_path();
- String fscache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("filesystem_cache2");
+ String fscache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("filesystem_cache3");
FileAccess *f = FileAccess::open(fscache, FileAccess::READ);
if (f) {
@@ -201,7 +208,7 @@ void EditorFileSystem::_scan_filesystem() {
} else {
Vector<String> split = l.split("::");
- ERR_CONTINUE(split.size() != 5);
+ ERR_CONTINUE(split.size() != 6);
String name = split[0];
String file;
@@ -212,8 +219,9 @@ void EditorFileSystem::_scan_filesystem() {
fc.type = split[1];
fc.modification_time = split[2].to_int64();
fc.import_modification_time = split[3].to_int64();
+ fc.import_valid = split[4].to_int64() != 0;
- String deps = split[4].strip_edges();
+ String deps = split[5].strip_edges();
if (deps.length()) {
Vector<String> dp = deps.split("<>");
for (int i = 0; i < dp.size(); i++) {
@@ -230,7 +238,7 @@ void EditorFileSystem::_scan_filesystem() {
memdelete(f);
}
- String update_cache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("filesystem_update2");
+ String update_cache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("filesystem_update3");
print_line("try to see fs update2");
if (FileAccess::exists(update_cache)) {
@@ -282,7 +290,7 @@ void EditorFileSystem::_scan_filesystem() {
}
void EditorFileSystem::_save_filesystem_cache() {
- String fscache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("filesystem_cache2");
+ String fscache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("filesystem_cache3");
FileAccess *f = FileAccess::open(fscache, FileAccess::WRITE);
_save_filesystem_cache(filesystem, f);
@@ -622,6 +630,7 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
fi->deps = fc->deps;
fi->modified_time = fc->modification_time;
fi->import_modified_time = fc->import_modification_time;
+ fi->import_valid = fc->import_valid;
if (fc->type == String()) {
fi->type = ResourceLoader::get_resource_type(path);
//there is also the chance that file type changed due to reimport, must probably check this somehow here (or kind of note it for next time in another file?)
@@ -648,6 +657,7 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
print_line("import extension tried resource type for " + path + " and its " + fi->type);
fi->modified_time = 0;
fi->import_modified_time = 0;
+ fi->import_valid = ResourceLoader::is_import_valid(path);
ItemAction ia;
ia.action = ItemAction::ACTION_FILE_REIMPORT;
@@ -663,6 +673,7 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
fi->modified_time = fc->modification_time;
fi->deps = fc->deps;
fi->import_modified_time = 0;
+ fi->import_valid = true;
} else {
//new or modified time
fi->type = ResourceLoader::get_resource_type(path);
@@ -670,6 +681,7 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir, DirAccess
print_line("regular import tried resource type for " + path + " and its " + fi->type);
fi->modified_time = mt;
fi->import_modified_time = 0;
+ fi->import_valid = true;
}
}
@@ -766,6 +778,7 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir, const
fi->modified_time = FileAccess::get_modified_time(path);
fi->import_modified_time = 0;
fi->type = ResourceLoader::get_resource_type(path);
+ fi->import_valid = ResourceLoader::is_import_valid(path);
{
ItemAction ia;
@@ -1036,7 +1049,7 @@ void EditorFileSystem::_save_filesystem_cache(EditorFileSystemDirectory *p_dir,
for (int i = 0; i < p_dir->files.size(); i++) {
- String s = p_dir->files[i]->file + "::" + p_dir->files[i]->type + "::" + itos(p_dir->files[i]->modified_time) + "::" + itos(p_dir->files[i]->import_modified_time);
+ String s = p_dir->files[i]->file + "::" + p_dir->files[i]->type + "::" + itos(p_dir->files[i]->modified_time) + "::" + itos(p_dir->files[i]->import_modified_time) + "::" + itos(p_dir->files[i]->import_valid);
s += "::";
for (int j = 0; j < p_dir->files[i]->deps.size(); j++) {
@@ -1217,7 +1230,7 @@ EditorFileSystemDirectory *EditorFileSystem::get_filesystem_path(const String &p
void EditorFileSystem::_save_late_updated_files() {
//files that already existed, and were modified, need re-scanning for dependencies upon project restart. This is done via saving this special file
- String fscache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("filesystem_update2");
+ String fscache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("filesystem_update3");
FileAccessRef f = FileAccess::open(fscache, FileAccess::WRITE);
for (Set<String>::Element *E = late_update_files.front(); E; E = E->next()) {
f->store_line(E->get());
@@ -1281,6 +1294,7 @@ void EditorFileSystem::update_file(const String &p_file) {
EditorFileSystemDirectory::FileInfo *fi = memnew(EditorFileSystemDirectory::FileInfo);
fi->file = p_file.get_file();
fi->import_modified_time = 0;
+ fi->import_valid = ResourceLoader::is_import_valid(p_file);
if (idx == fs->files.size()) {
fs->files.push_back(fi);
@@ -1301,6 +1315,7 @@ void EditorFileSystem::update_file(const String &p_file) {
fs->files[cpos]->type = type;
fs->files[cpos]->modified_time = FileAccess::get_modified_time(p_file);
fs->files[cpos]->deps = _get_dependencies(p_file);
+ fs->files[cpos]->import_valid = ResourceLoader::is_import_valid(p_file);
//if (FileAccess::exists(p_file+".import")) {
// fs->files[cpos]->import_modified_time=FileAccess::get_modified_time(p_file+".import");
//}
@@ -1368,7 +1383,7 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
}
}
- if (load_default && ProjectSettings::get_singleton()->get("importer_defaults/" + importer->get_importer_name())) {
+ if (load_default && ProjectSettings::get_singleton()->has("importer_defaults/" + importer->get_importer_name())) {
//use defaults if exist
Dictionary d = ProjectSettings::get_singleton()->get("importer_defaults/" + importer->get_importer_name());
List<Variant> v;
@@ -1404,19 +1419,26 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
f->store_line("type=\"" + importer->get_resource_type() + "\"");
}
- if (importer->get_save_extension() == "") {
- //no path
- } else if (import_variants.size()) {
- //import with variants
- for (List<String>::Element *E = import_variants.front(); E; E = E->next()) {
+ if (err == OK) {
- String path = base_path.c_escape() + "." + E->get() + "." + importer->get_save_extension();
+ if (importer->get_save_extension() == "") {
+ //no path
+ } else if (import_variants.size()) {
+ //import with variants
+ for (List<String>::Element *E = import_variants.front(); E; E = E->next()) {
- f->store_line("path." + E->get() + "=\"" + path + "\"");
+ String path = base_path.c_escape() + "." + E->get() + "." + importer->get_save_extension();
+
+ f->store_line("path." + E->get() + "=\"" + path + "\"");
+ }
+ } else {
+
+ f->store_line("path=\"" + base_path + "." + importer->get_save_extension() + "\"");
}
+
} else {
- f->store_line("path=\"" + base_path + "." + importer->get_save_extension() + "\"");
+ f->store_line("valid=false");
}
f->store_line("");
@@ -1455,6 +1477,7 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
fs->files[cpos]->import_modified_time = FileAccess::get_modified_time(p_file + ".import");
fs->files[cpos]->deps = _get_dependencies(p_file);
fs->files[cpos]->type = importer->get_resource_type();
+ fs->files[cpos]->import_valid = ResourceLoader::is_import_valid(p_file);
//if file is currently up, maybe the source it was loaded from changed, so import math must be updated for it
//to reload properly
@@ -1486,6 +1509,8 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
if (!is_scanning()) {
emit_signal("filesystem_changed");
}
+
+ emit_signal("resources_reimported", p_files);
}
void EditorFileSystem::_bind_methods() {
@@ -1501,6 +1526,7 @@ void EditorFileSystem::_bind_methods() {
ADD_SIGNAL(MethodInfo("filesystem_changed"));
ADD_SIGNAL(MethodInfo("sources_changed", PropertyInfo(Variant::BOOL, "exist")));
+ ADD_SIGNAL(MethodInfo("resources_reimported", PropertyInfo(Variant::POOL_STRING_ARRAY, "resources")));
}
void EditorFileSystem::_update_extensions() {
diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h
index fd62b06d07..cee3219b43 100644
--- a/editor/editor_file_system.h
+++ b/editor/editor_file_system.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -54,6 +54,7 @@ class EditorFileSystemDirectory : public Object {
StringName type;
uint64_t modified_time;
uint64_t import_modified_time;
+ bool import_valid;
Vector<String> deps;
bool verified; //used for checking changes
};
@@ -83,6 +84,7 @@ public:
String get_file_path(int p_idx) const;
StringName get_file_type(int p_idx) const;
Vector<String> get_file_deps(int p_idx) const;
+ bool get_file_import_is_valid(int p_idx) const;
EditorFileSystemDirectory *get_parent();
@@ -153,6 +155,7 @@ class EditorFileSystem : public Node {
uint64_t modification_time;
uint64_t import_modification_time;
Vector<String> deps;
+ bool import_valid;
};
HashMap<String, FileCache> file_cache;
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp
index 4a85b4e2ef..22a9c84d21 100644
--- a/editor/editor_fonts.cpp
+++ b/editor/editor_fonts.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -65,52 +65,52 @@ static Ref<BitmapFont> make_font(int p_height, int p_ascent, int p_valign, int p
return font;
}
-#define MAKE_FALLBACKS(m_name) \
- m_name->add_fallback(DroidSansFallback); \
- m_name->add_fallback(DroidSansJapanese); \
- m_name->add_fallback(DroidSansArabic); \
- m_name->add_fallback(DroidSansHebrew); \
- m_name->add_fallback(DroidSansThai);
-
-#define MAKE_DROID_SANS(m_name, m_size) \
- Ref<DynamicFont> m_name; \
- m_name.instance(); \
- m_name->set_size(m_size); \
- m_name->set_font_data(DroidSans); \
+#define MAKE_FALLBACKS(m_name) \
+ m_name->add_fallback(FontArabic); \
+ m_name->add_fallback(FontHebrew); \
+ m_name->add_fallback(FontThai); \
+ m_name->add_fallback(FontJapanese); \
+ m_name->add_fallback(FontFallback);
+
+#define MAKE_DEFAULT_FONT(m_name, m_size) \
+ Ref<DynamicFont> m_name; \
+ m_name.instance(); \
+ m_name->set_size(m_size); \
+ m_name->set_font_data(DefaultFont); \
MAKE_FALLBACKS(m_name);
void editor_register_fonts(Ref<Theme> p_theme) {
/* Droid Sans */
- Ref<DynamicFontData> DroidSans;
- DroidSans.instance();
- DroidSans->set_font_ptr(_font_DroidSans, _font_DroidSans_size);
- DroidSans->set_force_autohinter(true); //just looks better..i think?
+ Ref<DynamicFontData> DefaultFont;
+ DefaultFont.instance();
+ DefaultFont->set_font_ptr(_font_NotoSansUI_Regular, _font_NotoSansUI_Regular_size);
+ DefaultFont->set_force_autohinter(true); //just looks better..i think?
- Ref<DynamicFontData> DroidSansFallback;
- DroidSansFallback.instance();
- DroidSansFallback->set_font_ptr(_font_DroidSansFallback, _font_DroidSansFallback_size);
- DroidSansFallback->set_force_autohinter(true); //just looks better..i think?
+ Ref<DynamicFontData> FontFallback;
+ FontFallback.instance();
+ FontFallback->set_font_ptr(_font_DroidSansFallback, _font_DroidSansFallback_size);
+ FontFallback->set_force_autohinter(true); //just looks better..i think?
- Ref<DynamicFontData> DroidSansJapanese;
- DroidSansJapanese.instance();
- DroidSansJapanese->set_font_ptr(_font_DroidSansJapanese, _font_DroidSansJapanese_size);
- DroidSansJapanese->set_force_autohinter(true); //just looks better..i think?
+ Ref<DynamicFontData> FontJapanese;
+ FontJapanese.instance();
+ FontJapanese->set_font_ptr(_font_DroidSansJapanese, _font_DroidSansJapanese_size);
+ FontJapanese->set_force_autohinter(true); //just looks better..i think?
- Ref<DynamicFontData> DroidSansArabic;
- DroidSansArabic.instance();
- DroidSansArabic->set_font_ptr(_font_DroidSansArabic, _font_DroidSansArabic_size);
- DroidSansArabic->set_force_autohinter(true); //just looks better..i think?
+ Ref<DynamicFontData> FontArabic;
+ FontArabic.instance();
+ FontArabic->set_font_ptr(_font_NotoNaskhArabicUI_Regular, _font_NotoNaskhArabicUI_Regular_size);
+ FontArabic->set_force_autohinter(true); //just looks better..i think?
- Ref<DynamicFontData> DroidSansHebrew;
- DroidSansHebrew.instance();
- DroidSansHebrew->set_font_ptr(_font_DroidSansHebrew, _font_DroidSansHebrew_size);
- DroidSansHebrew->set_force_autohinter(true); //just looks better..i think?
+ Ref<DynamicFontData> FontHebrew;
+ FontHebrew.instance();
+ FontHebrew->set_font_ptr(_font_NotoSansHebrew_Regular, _font_NotoSansHebrew_Regular_size);
+ FontHebrew->set_force_autohinter(true); //just looks better..i think?
- Ref<DynamicFontData> DroidSansThai;
- DroidSansThai.instance();
- DroidSansThai->set_font_ptr(_font_DroidSansThai, _font_DroidSansThai_size);
- DroidSansThai->set_force_autohinter(true); //just looks better..i think?
+ Ref<DynamicFontData> FontThai;
+ FontThai.instance();
+ FontThai->set_font_ptr(_font_NotoSansThaiUI_Regular, _font_NotoSansThaiUI_Regular_size);
+ FontThai->set_force_autohinter(true); //just looks better..i think?
/* Source Code Pro */
@@ -119,7 +119,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
dfmono->set_font_ptr(_font_source_code_pro, _font_source_code_pro_size);
//dfd->set_force_autohinter(true); //just looks better..i think?
- MAKE_DROID_SANS(df, int(EditorSettings::get_singleton()->get("interface/font_size")) * EDSCALE);
+ MAKE_DEFAULT_FONT(df, int(EditorSettings::get_singleton()->get("interface/font_size")) * EDSCALE);
p_theme->set_default_theme_font(df);
@@ -127,9 +127,9 @@ void editor_register_fonts(Ref<Theme> p_theme) {
//Ref<BitmapFont> doc_title_font = make_font(_bi_font_doc_title_font_height,_bi_font_doc_title_font_ascent,0,_bi_font_doc_title_font_charcount,_bi_font_doc_title_font_characters,p_theme->get_icon("DocTitleFont","EditorIcons"));
//Ref<BitmapFont> doc_code_font = make_font(_bi_font_doc_code_font_height,_bi_font_doc_code_font_ascent,0,_bi_font_doc_code_font_charcount,_bi_font_doc_code_font_characters,p_theme->get_icon("DocCodeFont","EditorIcons"));
- MAKE_DROID_SANS(df_title, int(EDITOR_DEF("text_editor/help/help_title_font_size", 18)) * EDSCALE);
+ MAKE_DEFAULT_FONT(df_title, int(EDITOR_DEF("text_editor/help/help_title_font_size", 18)) * EDSCALE);
- MAKE_DROID_SANS(df_doc, int(EDITOR_DEF("text_editor/help/help_font_size", 16)) * EDSCALE);
+ MAKE_DEFAULT_FONT(df_doc, int(EDITOR_DEF("text_editor/help/help_font_size", 16)) * EDSCALE);
p_theme->set_font("doc", "EditorFonts", df_doc);
p_theme->set_font("doc_title", "EditorFonts", df_title);
diff --git a/editor/editor_fonts.h b/editor/editor_fonts.h
index 1698093cca..6a55876fd0 100644
--- a/editor/editor_fonts.h
+++ b/editor/editor_fonts.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 89d70ee926..0e22f0d386 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -263,19 +263,22 @@ void EditorHelpSearch::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
+ //_update_icons
search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
connect("confirmed", this, "_confirmed");
_update_search();
- }
-
- if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
+ } else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
if (is_visible_in_tree()) {
search_box->call_deferred("grab_focus"); // still not visible
search_box->select_all();
}
+ } else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
+
+ //_update_icons
+ search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
}
}
@@ -294,7 +297,6 @@ EditorHelpSearch::EditorHelpSearch() {
VBoxContainer *vbc = memnew(VBoxContainer);
add_child(vbc);
- HBoxContainer *sb_hb = memnew(HBoxContainer);
search_box = memnew(LineEdit);
vbc->add_child(search_box);
search_box->connect("text_changed", this, "_text_changed");
@@ -386,6 +388,7 @@ void EditorHelpIndex::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
+ //_update_icons
search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
_update_class_list();
@@ -394,6 +397,10 @@ void EditorHelpIndex::_notification(int p_what) {
} else if (p_what == NOTIFICATION_POST_POPUP) {
search_box->call_deferred("grab_focus");
+ } else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
+
+ //_update_icons
+ search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
}
}
@@ -531,49 +538,6 @@ void EditorHelp::_search(const String &) {
prev_search = stext;
}
-#if 0
-void EditorHelp::_button_pressed(int p_idx) {
-
- if (p_idx==PAGE_CLASS_LIST) {
-
- //edited_class->set_pressed(false);
- //class_list_button->set_pressed(true);
- //tabs->set_current_tab(PAGE_CLASS_LIST);
-
- } else if (p_idx==PAGE_CLASS_DESC) {
-
- //edited_class->set_pressed(true);
- //class_list_button->set_pressed(false);
- //tabs->set_current_tab(PAGE_CLASS_DESC);
-
- } else if (p_idx==PAGE_CLASS_PREV) {
-
- if (history_pos<2)
- return;
- history_pos--;
- ERR_FAIL_INDEX(history_pos-1,history.size());
- _goto_desc(history[history_pos-1].c,false,history[history_pos-1].scroll);
- _update_history_buttons();
-
-
- } else if (p_idx==PAGE_CLASS_NEXT) {
-
- if (history_pos>=history.size())
- return;
-
- history_pos++;
- ERR_FAIL_INDEX(history_pos-1,history.size());
- _goto_desc(history[history_pos-1].c,false,history[history_pos-1].scroll);
- _update_history_buttons();
-
- } else if (p_idx==PAGE_SEARCH) {
-
- _search("");
- }
-}
-
-#endif
-
void EditorHelp::_class_list_select(const String &p_select) {
_goto_desc(p_select);
@@ -582,7 +546,18 @@ void EditorHelp::_class_list_select(const String &p_select) {
void EditorHelp::_class_desc_select(const String &p_select) {
//print_line("LINK: "+p_select);
- if (p_select.begins_with("#")) {
+ if (p_select.begins_with("$")) { //enum
+ //_goto_desc(p_select.substr(1,p_select.length()));
+ String select = p_select.substr(1, p_select.length());
+ String class_name;
+ if (select.find(".") != -1) {
+ class_name = select.get_slice(".", 0);
+ } else {
+ class_name = "@Global Scope";
+ }
+ emit_signal("go_to_help", "class_enum:" + class_name + ":" + select);
+ return;
+ } else if (p_select.begins_with("#")) {
//_goto_desc(p_select.substr(1,p_select.length()));
emit_signal("go_to_help", "class_name:" + p_select.substr(1, p_select.length()));
return;
@@ -614,16 +589,28 @@ void EditorHelp::_class_desc_input(const Ref<InputEvent> &p_input) {
set_focused();
}
-void EditorHelp::_add_type(const String &p_type) {
+void EditorHelp::_add_type(const String &p_type, const String &p_enum) {
String t = p_type;
if (t == "")
t = "void";
- bool can_ref = (t != "int" && t != "real" && t != "bool" && t != "void");
+ bool can_ref = (t != "int" && t != "real" && t != "bool" && t != "void") || p_enum != String();
+ if (p_enum != String()) {
+ if (p_enum.get_slice_count(".") > 1) {
+ t = p_enum.get_slice(".", 1);
+ } else {
+ t = p_enum.get_slice(".", 0);
+ }
+ }
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/base_type_color"));
- if (can_ref)
- class_desc->push_meta("#" + t); //class
+ if (can_ref) {
+ if (p_enum == "") {
+ class_desc->push_meta("#" + t); //class
+ } else {
+ class_desc->push_meta("$" + p_enum); //class
+ }
+ }
class_desc->add_text(t);
if (can_ref)
class_desc->pop();
@@ -782,7 +769,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->push_cell();
class_desc->push_align(RichTextLabel::ALIGN_RIGHT);
class_desc->push_font(doc_code_font);
- _add_type(cd.properties[i].type);
+ _add_type(cd.properties[i].type, cd.properties[i].enumeration);
class_desc->add_text(" ");
class_desc->pop();
class_desc->pop();
@@ -870,12 +857,14 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
for (int i = 0; i < methods.size(); i++) {
+ bool is_vararg = methods[i].qualifiers.find("vararg") != -1;
+
class_desc->push_cell();
method_line[methods[i].name] = class_desc->get_line_count() - 2; //gets overridden if description
class_desc->push_align(RichTextLabel::ALIGN_RIGHT);
class_desc->push_font(doc_code_font);
- _add_type(methods[i].return_type);
+ _add_type(methods[i].return_type, methods[i].return_enum);
//class_desc->add_text(" ");
class_desc->pop(); //align
class_desc->pop(); //font
@@ -893,13 +882,13 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
if (methods[i].description != "")
class_desc->pop();
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
- class_desc->add_text(methods[i].arguments.size() ? "( " : "(");
+ class_desc->add_text(methods[i].arguments.size() || is_vararg ? "( " : "(");
class_desc->pop();
for (int j = 0; j < methods[i].arguments.size(); j++) {
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
if (j > 0)
class_desc->add_text(", ");
- _add_type(methods[i].arguments[j].type);
+ _add_type(methods[i].arguments[j].type, methods[i].arguments[j].enumeration);
class_desc->add_text(" ");
_add_text(methods[i].arguments[j].name);
if (methods[i].arguments[j].default_value != "") {
@@ -913,17 +902,18 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->pop();
}
- if (methods[i].qualifiers.find("vararg") != -1) {
+ if (is_vararg) {
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
- class_desc->add_text(",");
+ if (methods[i].arguments.size())
+ class_desc->add_text(", ");
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
- class_desc->add_text(" ... ");
+ class_desc->add_text("...");
class_desc->pop();
class_desc->pop();
}
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
- class_desc->add_text(methods[i].arguments.size() ? " )" : ")");
+ class_desc->add_text(methods[i].arguments.size() || is_vararg ? " )" : ")");
class_desc->pop();
if (methods[i].qualifiers != "") {
@@ -1048,44 +1038,133 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
if (cd.constants.size()) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
- class_desc->push_font(doc_title_font);
- class_desc->add_text(TTR("Constants:"));
- class_desc->pop();
- class_desc->pop();
- class_desc->push_indent(1);
-
- class_desc->add_newline();
- //class_desc->add_newline();
+ Map<String, Vector<DocData::ConstantDoc> > enums;
+ Vector<DocData::ConstantDoc> constants;
for (int i = 0; i < cd.constants.size(); i++) {
- constant_line[cd.constants[i].name] = class_desc->get_line_count() - 2;
- class_desc->push_font(doc_code_font);
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/base_type_color"));
- _add_text(cd.constants[i].name);
+ if (cd.constants[i].enumeration != String()) {
+ if (!enums.has(cd.constants[i].enumeration)) {
+ enums[cd.constants[i].enumeration] = Vector<DocData::ConstantDoc>();
+ }
+
+ enums[cd.constants[i].enumeration].push_back(cd.constants[i]);
+ } else {
+
+ constants.push_back(cd.constants[i]);
+ }
+ }
+
+ if (enums.size()) {
+
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->push_font(doc_title_font);
+ class_desc->add_text(TTR("Enumerations:"));
class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
- class_desc->add_text(" = ");
class_desc->pop();
+ class_desc->push_indent(1);
+
+ class_desc->add_newline();
+ //class_desc->add_newline();
+
+ for (Map<String, Vector<DocData::ConstantDoc> >::Element *E = enums.front(); E; E = E->next()) {
+
+ enum_line[E->key()] = class_desc->get_line_count() - 2;
+
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->add_text(TTR("enum "));
+ class_desc->pop();
+ class_desc->push_font(doc_code_font);
+ String e = E->key();
+ if (e.get_slice_count(".")) {
+ e = e.get_slice(".", 1);
+ }
+
+ class_desc->add_text(e);
+ class_desc->pop();
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->add_text(":");
+ class_desc->pop();
+ class_desc->add_newline();
+
+ class_desc->push_indent(1);
+ Vector<DocData::ConstantDoc> enum_list = E->get();
+
+ for (int i = 0; i < enum_list.size(); i++) {
+
+ class_desc->push_font(doc_code_font);
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/base_type_color"));
+ _add_text(enum_list[i].name);
+ class_desc->pop();
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->add_text(" = ");
+ class_desc->pop();
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ _add_text(enum_list[i].value);
+ class_desc->pop();
+ class_desc->pop();
+ if (enum_list[i].description != "") {
+ class_desc->push_font(doc_font);
+ class_desc->add_text(" ");
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color"));
+ _add_text(enum_list[i].description);
+ class_desc->pop();
+ class_desc->pop();
+ }
+
+ class_desc->add_newline();
+ }
+
+ class_desc->pop();
+
+ class_desc->add_newline();
+ }
+
+ class_desc->pop();
+ class_desc->add_newline();
+ }
+
+ if (constants.size()) {
+
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
- _add_text(cd.constants[i].value);
+ class_desc->push_font(doc_title_font);
+ class_desc->add_text(TTR("Constants:"));
class_desc->pop();
class_desc->pop();
- if (cd.constants[i].description != "") {
- class_desc->push_font(doc_font);
- class_desc->add_text(" ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color"));
- _add_text(cd.constants[i].description);
+ class_desc->push_indent(1);
+
+ class_desc->add_newline();
+ //class_desc->add_newline();
+
+ for (int i = 0; i < constants.size(); i++) {
+
+ constant_line[constants[i].name] = class_desc->get_line_count() - 2;
+ class_desc->push_font(doc_code_font);
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/base_type_color"));
+ _add_text(constants[i].name);
+ class_desc->pop();
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->add_text(" = ");
+ class_desc->pop();
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ _add_text(constants[i].value);
class_desc->pop();
class_desc->pop();
+ if (constants[i].description != "") {
+ class_desc->push_font(doc_font);
+ class_desc->add_text(" ");
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color"));
+ _add_text(constants[i].description);
+ class_desc->pop();
+ class_desc->pop();
+ }
+
+ class_desc->add_newline();
}
+ class_desc->pop();
class_desc->add_newline();
}
-
- class_desc->pop();
- class_desc->add_newline();
}
if (cd.description != "") {
@@ -1126,7 +1205,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
method_line[cd.properties[i].name] = class_desc->get_line_count() - 2;
class_desc->push_font(doc_code_font);
- _add_type(cd.properties[i].type);
+ _add_type(cd.properties[i].type, cd.properties[i].enumeration);
class_desc->add_text(" ");
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
@@ -1201,23 +1280,25 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
for (int i = 0; i < methods.size(); i++) {
+ bool is_vararg = methods[i].qualifiers.find("vararg") != -1;
+
method_line[methods[i].name] = class_desc->get_line_count() - 2;
class_desc->push_font(doc_code_font);
- _add_type(methods[i].return_type);
+ _add_type(methods[i].return_type, methods[i].return_enum);
class_desc->add_text(" ");
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
_add_text(methods[i].name);
class_desc->pop();
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
- class_desc->add_text(methods[i].arguments.size() ? "( " : "(");
+ class_desc->add_text(methods[i].arguments.size() || is_vararg ? "( " : "(");
class_desc->pop();
for (int j = 0; j < methods[i].arguments.size(); j++) {
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
if (j > 0)
class_desc->add_text(", ");
- _add_type(methods[i].arguments[j].type);
+ _add_type(methods[i].arguments[j].type, methods[i].arguments[j].enumeration);
class_desc->add_text(" ");
_add_text(methods[i].arguments[j].name);
if (methods[i].arguments[j].default_value != "") {
@@ -1231,8 +1312,18 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->pop();
}
+ if (is_vararg) {
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ if (methods[i].arguments.size())
+ class_desc->add_text(", ");
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->add_text("...");
+ class_desc->pop();
+ class_desc->pop();
+ }
+
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
- class_desc->add_text(methods[i].arguments.size() ? " )" : ")");
+ class_desc->add_text(methods[i].arguments.size() || is_vararg ? " )" : ")");
class_desc->pop();
if (methods[i].qualifiers != "") {
@@ -1295,6 +1386,11 @@ void EditorHelp::_help_callback(const String &p_topic) {
if (property_line.has(name))
line = property_line[name];
+ } else if (what == "class_enum") {
+
+ print_line("go to enum:");
+ if (enum_line.has(name))
+ line = enum_line[name];
} else if (what == "class_theme_item") {
if (theme_property_line.has(name))
@@ -1743,8 +1839,20 @@ void EditorHelpBit::_go_to_help(String p_what) {
void EditorHelpBit::_meta_clicked(String p_select) {
+ print_line("got meta " + p_select);
//print_line("LINK: "+p_select);
- if (p_select.begins_with("#")) {
+ if (p_select.begins_with("$")) { //enum
+ //_goto_desc(p_select.substr(1,p_select.length()));
+ String select = p_select.substr(1, p_select.length());
+ String class_name;
+ if (select.find(".") != -1) {
+ class_name = select.get_slice(".", 0);
+ } else {
+ class_name = "@Global";
+ }
+ _go_to_help("class_enum:" + class_name + ":" + select);
+ return;
+ } else if (p_select.begins_with("#")) {
//_goto_desc(p_select.substr(1,p_select.length()));
_go_to_help("class_name:" + p_select.substr(1, p_select.length()));
return;
diff --git a/editor/editor_help.h b/editor/editor_help.h
index 6d9be3db6f..30a535a535 100644
--- a/editor/editor_help.h
+++ b/editor/editor_help.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -123,6 +123,7 @@ class EditorHelp : public VBoxContainer {
Map<String, int> property_line;
Map<String, int> theme_property_line;
Map<String, int> constant_line;
+ Map<String, int> enum_line;
int description_line;
RichTextLabel *class_desc;
@@ -141,7 +142,7 @@ class EditorHelp : public VBoxContainer {
bool scroll_locked;
//void _button_pressed(int p_idx);
- void _add_type(const String &p_type);
+ void _add_type(const String &p_type, const String &p_enum = String());
void _class_list_select(const String &p_select);
void _class_desc_select(const String &p_select);
diff --git a/editor/editor_initialize_ssl.cpp b/editor/editor_initialize_ssl.cpp
index 290ade277e..4bc194a47c 100644
--- a/editor/editor_initialize_ssl.cpp
+++ b/editor/editor_initialize_ssl.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_initialize_ssl.h b/editor/editor_initialize_ssl.h
index fb289f5dfd..cad219c56b 100644
--- a/editor/editor_initialize_ssl.h
+++ b/editor/editor_initialize_ssl.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index c5e15b97b0..a1f416a17c 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_log.h b/editor/editor_log.h
index 1c180df5f7..fd919fd692 100644
--- a/editor/editor_log.h
+++ b/editor/editor_log.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_name_dialog.cpp b/editor/editor_name_dialog.cpp
index 74bb526ccc..9f3593c269 100644
--- a/editor/editor_name_dialog.cpp
+++ b/editor/editor_name_dialog.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_name_dialog.h b/editor/editor_name_dialog.h
index 57586951d1..2ec8c67169 100644
--- a/editor/editor_name_dialog.h
+++ b/editor/editor_name_dialog.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 86964b3ca0..6b5db7572a 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -29,102 +29,85 @@
/*************************************************************************/
#include "editor_node.h"
-#include "animation_editor.h"
-#include "bind/core_bind.h"
-#include "class_db.h"
+#include "core/bind/core_bind.h"
+#include "core/class_db.h"
+#include "core/io/config_file.h"
#include "core/io/resource_loader.h"
#include "core/io/resource_saver.h"
-#include "editor_file_system.h"
-#include "editor_help.h"
-#include "editor_settings.h"
-#include "editor_themes.h"
-#include "io/config_file.h"
-#include "io/stream_peer_ssl.h"
-#include "io/zip_io.h"
+#include "core/io/stream_peer_ssl.h"
+#include "core/io/zip_io.h"
+#include "core/message_queue.h"
+#include "core/os/file_access.h"
+#include "core/os/input.h"
+#include "core/os/keyboard.h"
+#include "core/os/os.h"
+#include "core/path_remap.h"
+#include "core/print_string.h"
+#include "core/project_settings.h"
+#include "core/translation.h"
+#include "core/version.h"
#include "main/input_default.h"
-#include "message_queue.h"
-#include "os/file_access.h"
-#include "os/input.h"
-#include "os/keyboard.h"
-#include "os/os.h"
-#include "path_remap.h"
-#include "print_string.h"
-#include "project_settings.h"
-#include "pvrtc_compress.h"
-#include "register_exporters.h"
#include "scene/resources/packed_scene.h"
#include "servers/physics_2d_server.h"
-#include "translation.h"
-#include "version.h"
+
+#include "editor/animation_editor.h"
+#include "editor/editor_audio_buses.h"
+#include "editor/editor_file_system.h"
+#include "editor/editor_help.h"
+#include "editor/editor_initialize_ssl.h"
+#include "editor/editor_settings.h"
+#include "editor/editor_themes.h"
+#include "editor/import/editor_import_collada.h"
+#include "editor/import/editor_scene_importer_gltf.h"
+#include "editor/import/resource_importer_csv_translation.h"
+#include "editor/import/resource_importer_obj.h"
+#include "editor/import/resource_importer_scene.h"
+#include "editor/import/resource_importer_texture.h"
+#include "editor/import/resource_importer_wav.h"
+#include "editor/plugins/animation_player_editor_plugin.h"
+#include "editor/plugins/animation_tree_editor_plugin.h"
+#include "editor/plugins/asset_library_editor_plugin.h"
+#include "editor/plugins/camera_editor_plugin.h"
+#include "editor/plugins/canvas_item_editor_plugin.h"
+#include "editor/plugins/collision_polygon_2d_editor_plugin.h"
+#include "editor/plugins/collision_polygon_editor_plugin.h"
+#include "editor/plugins/collision_shape_2d_editor_plugin.h"
+#include "editor/plugins/cube_grid_theme_editor_plugin.h"
+#include "editor/plugins/curve_editor_plugin.h"
+#include "editor/plugins/editor_preview_plugins.h"
+#include "editor/plugins/gi_probe_editor_plugin.h"
+#include "editor/plugins/gradient_editor_plugin.h"
+#include "editor/plugins/item_list_editor_plugin.h"
+#include "editor/plugins/light_occluder_2d_editor_plugin.h"
+#include "editor/plugins/line_2d_editor_plugin.h"
+#include "editor/plugins/material_editor_plugin.h"
+#include "editor/plugins/mesh_editor_plugin.h"
+#include "editor/plugins/mesh_instance_editor_plugin.h"
+#include "editor/plugins/multimesh_editor_plugin.h"
+#include "editor/plugins/navigation_polygon_editor_plugin.h"
+#include "editor/plugins/particles_2d_editor_plugin.h"
+#include "editor/plugins/particles_editor_plugin.h"
+#include "editor/plugins/path_2d_editor_plugin.h"
+#include "editor/plugins/path_editor_plugin.h"
+#include "editor/plugins/polygon_2d_editor_plugin.h"
+#include "editor/plugins/resource_preloader_editor_plugin.h"
+#include "editor/plugins/script_editor_plugin.h"
+#include "editor/plugins/script_text_editor.h"
+#include "editor/plugins/shader_editor_plugin.h"
+#include "editor/plugins/shader_graph_editor_plugin.h"
+#include "editor/plugins/spatial_editor_plugin.h"
+#include "editor/plugins/sprite_frames_editor_plugin.h"
+#include "editor/plugins/style_box_editor_plugin.h"
+#include "editor/plugins/texture_editor_plugin.h"
+#include "editor/plugins/texture_region_editor_plugin.h"
+#include "editor/plugins/theme_editor_plugin.h"
+#include "editor/plugins/tile_map_editor_plugin.h"
+#include "editor/plugins/tile_set_editor_plugin.h"
+#include "editor/pvrtc_compress.h"
+#include "editor/register_exporters.h"
+#include "editor/script_editor_debugger.h"
+
#include <stdio.h>
-// plugins
-#include "asset_library_editor_plugin.h"
-#include "import/resource_importer_csv_translation.h"
-#include "import/resource_importer_obj.h"
-#include "import/resource_importer_scene.h"
-#include "import/resource_importer_texture.h"
-#include "import/resource_importer_wav.h"
-#include "plugins/animation_player_editor_plugin.h"
-#include "plugins/animation_tree_editor_plugin.h"
-#include "plugins/baked_light_editor_plugin.h"
-#include "plugins/camera_editor_plugin.h"
-#include "plugins/canvas_item_editor_plugin.h"
-#include "plugins/collision_polygon_2d_editor_plugin.h"
-#include "plugins/collision_polygon_editor_plugin.h"
-#include "plugins/collision_shape_2d_editor_plugin.h"
-#include "plugins/cube_grid_theme_editor_plugin.h"
-#include "plugins/curve_editor_plugin.h"
-#include "plugins/gi_probe_editor_plugin.h"
-#include "plugins/gradient_editor_plugin.h"
-#include "plugins/item_list_editor_plugin.h"
-#include "plugins/light_occluder_2d_editor_plugin.h"
-#include "plugins/line_2d_editor_plugin.h"
-#include "plugins/material_editor_plugin.h"
-#include "plugins/mesh_editor_plugin.h"
-#include "plugins/mesh_instance_editor_plugin.h"
-#include "plugins/multimesh_editor_plugin.h"
-#include "plugins/navigation_polygon_editor_plugin.h"
-#include "plugins/particles_2d_editor_plugin.h"
-#include "plugins/particles_editor_plugin.h"
-#include "plugins/path_2d_editor_plugin.h"
-#include "plugins/path_editor_plugin.h"
-#include "plugins/polygon_2d_editor_plugin.h"
-#include "plugins/resource_preloader_editor_plugin.h"
-#include "plugins/rich_text_editor_plugin.h"
-#include "plugins/sample_editor_plugin.h"
-#include "plugins/sample_library_editor_plugin.h"
-#include "plugins/sample_player_editor_plugin.h"
-#include "plugins/script_editor_plugin.h"
-#include "plugins/script_text_editor.h"
-#include "plugins/shader_editor_plugin.h"
-#include "plugins/shader_graph_editor_plugin.h"
-#include "plugins/spatial_editor_plugin.h"
-#include "plugins/sprite_frames_editor_plugin.h"
-#include "plugins/stream_editor_plugin.h"
-#include "plugins/style_box_editor_plugin.h"
-#include "plugins/texture_editor_plugin.h"
-#include "plugins/texture_region_editor_plugin.h"
-#include "plugins/theme_editor_plugin.h"
-#include "plugins/tile_map_editor_plugin.h"
-#include "plugins/tile_set_editor_plugin.h"
-// end
-#include "editor_settings.h"
-#include "import/editor_import_collada.h"
-#include "import/editor_scene_importer_gltf.h"
-#include "io_plugins/editor_bitmask_import_plugin.h"
-#include "io_plugins/editor_export_scene.h"
-#include "io_plugins/editor_font_import_plugin.h"
-#include "io_plugins/editor_mesh_import_plugin.h"
-#include "io_plugins/editor_sample_import_plugin.h"
-#include "io_plugins/editor_scene_import_plugin.h"
-#include "io_plugins/editor_scene_importer_fbxconv.h"
-#include "io_plugins/editor_texture_import_plugin.h"
-#include "io_plugins/editor_translation_import_plugin.h"
-
-#include "editor_audio_buses.h"
-#include "editor_initialize_ssl.h"
-#include "plugins/editor_preview_plugins.h"
-#include "script_editor_debugger.h"
EditorNode *EditorNode::singleton = NULL;
@@ -223,18 +206,6 @@ void EditorNode::_notification(int p_what) {
}
if (p_what == NOTIFICATION_PROCESS) {
-//force the whole tree viewport
-#if 0
- {
- Rect2 grect = scene_root_base->get_global_rect();
- Rect2 grectsrp = scene_root_parent->get_global_rect();
- if (grect!=grectsrp) {
- scene_root_parent->set_position(grect.pos);
- scene_root_parent->set_size(grect.size);
- }
- }
-
-#endif
if (opening_prev && !confirmation->is_visible())
opening_prev = false;
@@ -249,8 +220,6 @@ void EditorNode::_notification(int p_what) {
last_checked_version = editor_data.get_undo_redo().get_version();
}
- //get_root_node()->set_rect(viewport->get_global_rect());
-
//update the circle
uint64_t frame = Engine::get_singleton()->get_frames_drawn();
uint32_t tick = OS::get_singleton()->get_ticks_msec();
@@ -280,14 +249,10 @@ void EditorNode::_notification(int p_what) {
Engine::get_singleton()->set_editor_hint(true);
get_tree()->get_root()->set_disable_3d(true);
- //MessageQueue::get_singleton()->push_call(this,"_get_scene_metadata");
get_tree()->get_root()->set_as_audio_listener(false);
get_tree()->get_root()->set_as_audio_listener_2d(false);
get_tree()->set_auto_accept_quit(false);
get_tree()->connect("files_dropped", this, "_dropped_files");
- //VisualServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport(),false);
-
- //import_monitor->scan_changes();
}
if (p_what == NOTIFICATION_EXIT_TREE) {
@@ -302,25 +267,6 @@ void EditorNode::_notification(int p_what) {
_editor_select(EDITOR_3D);
_update_debug_options();
-
- /*
- if (defer_optimize!="") {
- Error ok = save_optimized_copy(defer_optimize,defer_optimize_preset);
- defer_optimize_preset="";
- if (ok!=OK)
- OS::get_singleton()->set_exit_code(255);
- get_scene()->quit();
- }
-*/
-
- /* // moved to "_sources_changed"
- if (export_defer.platform!="") {
-
- project_export_settings->export_platform(export_defer.platform,export_defer.path,export_defer.debug,export_defer.password,true);
- export_defer.platform="";
- }
-
- */
}
if (p_what == MainLoop::NOTIFICATION_WM_FOCUS_IN) {
@@ -350,6 +296,35 @@ void EditorNode::_notification(int p_what) {
scene_tabs->set_min_width(0);
}
_update_scene_tabs();
+
+ //_update_icons
+ for (int i = 0; i < singleton->main_editor_buttons.size(); i++) {
+ main_editor_buttons[i]->set_icon(gui_base->get_icon(singleton->main_editor_buttons[i]->get_name(), "EditorIcons"));
+ }
+ play_button->set_icon(gui_base->get_icon("MainPlay", "EditorIcons"));
+ play_scene_button->set_icon(gui_base->get_icon("PlayScene", "EditorIcons"));
+ play_custom_scene_button->set_icon(gui_base->get_icon("PlayCustom", "EditorIcons"));
+ pause_button->set_icon(gui_base->get_icon("Pause", "EditorIcons"));
+ stop_button->set_icon(gui_base->get_icon("Stop", "EditorIcons"));
+
+ prev_scene->set_icon(gui_base->get_icon("PrevScene", "EditorIcons"));
+ distraction_free->set_icon(gui_base->get_icon("DistractionFree", "EditorIcons"));
+
+ resource_new_button->set_icon(gui_base->get_icon("New", "EditorIcons"));
+ resource_load_button->set_icon(gui_base->get_icon("Load", "EditorIcons"));
+ resource_save_button->set_icon(gui_base->get_icon("Save", "EditorIcons"));
+
+ property_back->set_icon(gui_base->get_icon("Back", "EditorIcons"));
+ property_forward->set_icon(gui_base->get_icon("Forward", "EditorIcons"));
+ editor_history_menu->set_icon(gui_base->get_icon("History", "EditorIcons"));
+
+ search_button->set_icon(gui_base->get_icon("Search", "EditorIcons"));
+ object_menu->set_icon(gui_base->get_icon("Tools", "EditorIcons"));
+ // clear_button->set_icon(gui_base->get_icon("Close", "EditorIcons")); dont have access to that node. needs to become a class property
+ update_menu->set_icon(gui_base->get_icon("Collapse", "EditorIcons"));
+ dock_tab_move_left->set_icon(theme->get_icon("Back", "EditorIcons"));
+ dock_tab_move_right->set_icon(theme->get_icon("Forward", "EditorIcons"));
+ update_menu->set_icon(gui_base->get_icon("Progress1", "EditorIcons"));
}
}
@@ -391,13 +366,12 @@ void EditorNode::_fs_changed() {
}
{
-
//reload changed resources
List<Ref<Resource> > changed;
List<Ref<Resource> > cached;
ResourceCache::get_cached_resources(&cached);
- //this should probably be done in a thread..
+ // FIXME: This should be done in a thread.
for (List<Ref<Resource> >::Element *E = cached.front(); E; E = E->next()) {
if (!E->get()->editor_can_reload_from_file())
@@ -408,30 +382,29 @@ void EditorNode::_fs_changed() {
continue;
if (E->get()->get_import_path() != String()) {
- //imported resource
+//this is an imported resource, will be reloaded if reimported via the _resources_reimported() callback
+//imported resource
+#if 0
uint64_t mt = FileAccess::get_modified_time(E->get()->get_import_path());
- print_line("testing modified: " + E->get()->get_import_path() + " " + itos(mt) + " vs " + itos(E->get()->get_import_last_modified_time()));
if (mt != E->get()->get_import_last_modified_time()) {
print_line("success");
changed.push_back(E->get());
}
+#endif
+ continue;
+ }
- } else {
- uint64_t mt = FileAccess::get_modified_time(E->get()->get_path());
+ uint64_t mt = FileAccess::get_modified_time(E->get()->get_path());
- if (mt != E->get()->get_last_modified_time()) {
- changed.push_back(E->get());
- }
+ if (mt != E->get()->get_last_modified_time()) {
+ changed.push_back(E->get());
}
}
if (changed.size()) {
- //EditorProgress ep("reload_res","Reload Modified Resources",changed.size());
int idx = 0;
for (List<Ref<Resource> >::Element *E = changed.front(); E; E = E->next()) {
-
- //ep.step(E->get()->get_path(),idx++);
E->get()->reload_from_file();
}
}
@@ -440,6 +413,33 @@ void EditorNode::_fs_changed() {
_mark_unsaved_scenes();
}
+void EditorNode::_resources_reimported(const Vector<String> &p_resources) {
+ print_line("reimporting");
+ List<String> scenes; //will load later
+
+ for (int i = 0; i < p_resources.size(); i++) {
+ String file_type = ResourceLoader::get_resource_type(p_resources[i]);
+ if (file_type == "PackedScene") {
+ scenes.push_back(p_resources[i]);
+ //reload later if needed, first go with normal resources
+ continue;
+ }
+
+ if (!ResourceCache::has(p_resources[i])) {
+ continue; //not loaded, no need to reload
+ }
+ //reload normally
+ Resource *resource = ResourceCache::get(p_resources[i]);
+ if (resource) {
+ resource->reload_from_file();
+ }
+ }
+
+ for (List<String>::Element *E = scenes.front(); E; E = E->next()) {
+ reload_scene(E->get());
+ }
+}
+
void EditorNode::_sources_changed(bool p_exist) {
if (waiting_for_first_scan) {
@@ -521,8 +521,6 @@ void EditorNode::open_resource(const String &p_type) {
file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
}
- //file->set_current_path(current_path);
-
file->popup_centered_ratio();
current_option = RESOURCE_LOAD;
}
@@ -533,10 +531,6 @@ void EditorNode::save_resource_in_path(const Ref<Resource> &p_resource, const St
int flg = 0;
if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources"))
flg |= ResourceSaver::FLAG_COMPRESS;
- /*
- if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative"))
- flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
- */
String path = ProjectSettings::get_singleton()->localize_path(p_path);
Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
@@ -546,7 +540,6 @@ void EditorNode::save_resource_in_path(const Ref<Resource> &p_resource, const St
accept->popup_centered_minsize();
return;
}
- //EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type());
((Resource *)p_resource.ptr())->set_path(path);
emit_signal("resource_saved", p_resource);
@@ -582,8 +575,6 @@ void EditorNode::save_resource_as(const Ref<Resource> &p_resource, const String
preferred.push_back(extensions[i]);
}
- //file->set_current_path(current_path);
-
if (p_at_path != String()) {
file->set_current_dir(p_at_path);
@@ -627,12 +618,11 @@ void EditorNode::_menu_confirm_current() {
_menu_option_confirm(current_option, true);
}
-void EditorNode::_dialog_display_file_error(String p_file, Error p_error) {
+void EditorNode::_dialog_display_save_error(String p_file, Error p_error) {
if (p_error) {
current_option = -1;
- //accept->"()->hide();
accept->get_ok()->set_text(TTR("I see.."));
switch (p_error) {
@@ -655,6 +645,41 @@ void EditorNode::_dialog_display_file_error(String p_file, Error p_error) {
}
}
+void EditorNode::_dialog_display_load_error(String p_file, Error p_error) {
+
+ if (p_error) {
+
+ current_option = -1;
+ accept->get_ok()->set_text(TTR("I see.."));
+
+ switch (p_error) {
+
+ case ERR_CANT_OPEN: {
+
+ accept->set_text(vformat(TTR("Can't open '%s'."), p_file.get_file()));
+ } break;
+ case ERR_PARSE_ERROR: {
+
+ accept->set_text(vformat(TTR("Error while parsing '%s'."), p_file.get_file()));
+ } break;
+ case ERR_FILE_CORRUPT: {
+
+ accept->set_text(vformat(TTR("Unexpected end of file '%s'."), p_file.get_file()));
+ } break;
+ case ERR_FILE_NOT_FOUND: {
+
+ accept->set_text(vformat(TTR("Missing '%s' or its dependencies."), p_file.get_file()));
+ } break;
+ default: {
+
+ accept->set_text(vformat(TTR("Error while loading '%s'."), p_file.get_file()));
+ } break;
+ }
+
+ accept->popup_centered_minsize();
+ }
+}
+
void EditorNode::_get_scene_metadata(const String &p_file) {
Node *scene = editor_data.get_edited_scene_root();
@@ -736,8 +761,6 @@ bool EditorNode::_find_and_save_resource(RES p_res, Map<RES, bool> &processed, i
bool subchanged = _find_and_save_edited_subresources(p_res.ptr(), processed, flags);
- //print_line("checking if edited: "+p_res->get_type()+" :: "+p_res->get_name()+" :: "+p_res->get_path()+" :: "+itos(changed)+" :: SR "+itos(subchanged));
-
if (p_res->get_path().is_resource_file()) {
if (changed || subchanged) {
//save
@@ -782,8 +805,6 @@ bool EditorNode::_find_and_save_edited_subresources(Object *obj, Map<RES, bool>
RES res = v;
if (_find_and_save_resource(res, processed, flags))
ret_changed = true;
-
- //_find_resources(v);
}
} break;
@@ -836,11 +857,11 @@ void EditorNode::_find_node_types(Node *p_node, int &count_2d, int &count_3d) {
void EditorNode::_save_scene_with_preview(String p_file) {
- int c2d = 0;
- int c3d = 0;
-
EditorProgress save("save", TTR("Saving Scene"), 4);
save.step(TTR("Analyzing"), 0);
+
+ int c2d = 0;
+ int c3d = 0;
_find_node_types(editor_data.get_edited_scene_root(), c2d, c3d);
RID viewport;
@@ -911,9 +932,8 @@ void EditorNode::_save_scene(String p_file, int idx) {
if (!scene) {
current_option = -1;
- //accept->get_cancel()->hide();
accept->get_ok()->set_text(TTR("I see.."));
- accept->set_text("This operation can't be done without a tree root.");
+ accept->set_text(TTR("This operation can't be done without a tree root."));
accept->popup_centered_minsize();
return;
}
@@ -930,7 +950,7 @@ void EditorNode::_save_scene(String p_file, int idx) {
// we must update it, but also let the previous scene state go, as
// old version still work for referencing changes in instanced or inherited scenes
- sdata = Ref<PackedScene>(ResourceCache::get(p_file)->cast_to<PackedScene>());
+ sdata = Ref<PackedScene>(Object::cast_to<PackedScene>(ResourceCache::get(p_file)));
if (sdata.is_valid())
sdata->recreate_state();
else
@@ -943,7 +963,6 @@ void EditorNode::_save_scene(String p_file, int idx) {
if (err != OK) {
current_option = -1;
- //accept->get_cancel()->hide();
accept->get_ok()->set_text(TTR("I see.."));
accept->set_text(TTR("Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."));
accept->popup_centered_minsize();
@@ -958,10 +977,6 @@ void EditorNode::_save_scene(String p_file, int idx) {
int flg = 0;
if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources"))
flg |= ResourceSaver::FLAG_COMPRESS;
- /*
- if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative"))
- flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
- */
flg |= ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
err = ResourceSaver::save(p_file, sdata, flg);
@@ -970,7 +985,6 @@ void EditorNode::_save_scene(String p_file, int idx) {
editor_data.save_editor_external_data();
if (err == OK) {
scene->set_filename(ProjectSettings::get_singleton()->localize_path(p_file));
- //EditorFileSystem::get_singleton()->update_file(p_file,sdata->get_type());
if (idx < 0 || idx == editor_data.get_edited_scene())
set_current_version(editor_data.get_undo_redo().get_version());
else
@@ -979,7 +993,7 @@ void EditorNode::_save_scene(String p_file, int idx) {
_update_scene_tabs();
} else {
- _dialog_display_file_error(p_file, err);
+ _dialog_display_save_error(p_file, err);
}
}
@@ -988,12 +1002,10 @@ void EditorNode::_save_all_scenes() {
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
Node *scene = editor_data.get_edited_scene_root(i);
if (scene && scene->get_filename() != "") {
- // save in background if in the script editor
- if (i != editor_data.get_edited_scene() || _get_current_main_editor() == EDITOR_SCRIPT) {
+ if (i != editor_data.get_edited_scene())
_save_scene(scene->get_filename(), i);
- } else {
+ else
_save_scene_with_preview(scene->get_filename());
- }
} // else: ignore new scenes
}
@@ -1023,106 +1035,6 @@ void EditorNode::_mark_unsaved_scenes() {
_update_scene_tabs();
}
-void EditorNode::_import_action(const String &p_action) {
-#if 0
- import_confirmation->hide();
-
- if (p_action=="re-import") {
- _import(_tmp_import_path);
- }
- if (p_action=="update") {
-
- Node *src = EditorImport::import_scene(_tmp_import_path);
-
- if (!src) {
-
- current_option=-1;
- //accept->get_cancel()->hide();
- accept->get_ok()->set_text("Ugh");
- accept->set_text("Error importing scene.");
- accept->popup_centered(Size2(300,70));
- return;
- }
-
- //as soon as the scene is imported, version hashes must be generated for comparison against saved scene
- EditorImport::generate_version_hashes(src);
-
-
- Node *dst = SceneLoader::load(editor_data.get_imported_scene(ProjectSettings::get_singleton()->localize_path(_tmp_import_path)));
-
- if (!dst) {
-
- memdelete(src);
- //accept->get_cancel()->hide();
- accept->get_ok()->set_text("Ugh");
- accept->set_text("Error load scene to update.");
- accept->popup_centered(Size2(300,70));
- return;
- }
-
- List<EditorImport::Conflict> conflicts;
- EditorImport::check_conflicts(src,dst,&conflicts);
-
- bool conflicted=false;
- for (List<EditorImport::Conflict>::Element *E=conflicts.front();E;E=E->next()) {
-
-
- if (E->get().status==EditorImport::Conflict::STATUS_CONFLICT) {
-
- conflicted=true;
- break;
- }
- }
-
- if (conflicted) {
- import_conflicts_dialog->popup(src,dst,conflicts);
- return;
- }
-
- _import_with_conflicts(src,dst,conflicts);
- //not conflicted, just reimport!
-
- }
-#endif
-}
-
-void EditorNode::_import(const String &p_file) {
-
-#if 0
- Node *new_scene = EditorImport::import_scene(p_file);
-
- if (!new_scene) {
-
- current_option=-1;
- //accept->get_cancel()->hide();
- accept->get_ok()->set_text("Ugh");
- accept->set_text("Error importing scene.");
- accept->popup_centered(Size2(300,70));
- return;
- }
-
- //as soon as the scene is imported, version hashes must be generated for comparison against saved scene
- EditorImport::generate_version_hashes(new_scene);
-
- Node *old_scene = edited_scene;
- _hide_top_editors();
- set_edited_scene(NULL);
- editor_data.clear_editor_states();
- if (old_scene) {
- memdelete(old_scene);
- }
-
- set_edited_scene(new_scene);
- scene_tree_dock->set_selected(new_scene);
- //_get_scene_metadata();
-
- editor_data.get_undo_redo().clear_history();
- saved_version=editor_data.get_undo_redo().get_version();
- _update_title();
-
-#endif
-}
-
void EditorNode::_dialog_action(String p_file) {
switch (current_option) {
@@ -1133,7 +1045,6 @@ void EditorNode::_dialog_action(String p_file) {
if (res.is_null()) {
current_option = -1;
- //accept->get_cancel()->hide();
accept->get_ok()->set_text("ok :(");
accept->set_text(TTR("Failed to load resource."));
return;
@@ -1156,29 +1067,6 @@ void EditorNode::_dialog_action(String p_file) {
//would be nice to show the project manager opened with the highlighted field..
_run(false, ""); // automatically run the project
} break;
- case FILE_SAVE_OPTIMIZED: {
-
- } break;
- case FILE_RUN_SCRIPT: {
-
- Ref<Script> scr = ResourceLoader::load(p_file, "Script", true);
- if (scr.is_null()) {
- add_io_error("Script Failed to Load:\n" + p_file);
- return;
- }
- if (!scr->is_tool()) {
-
- add_io_error("Script is not tool, will not be able to run:\n" + p_file);
- return;
- }
-
- Ref<EditorScript> es = memnew(EditorScript);
- es->set_script(scr.get_ref_ptr());
- es->set_editor(this);
- es->_run();
-
- get_undo_redo()->clear_history();
- } break;
case FILE_CLOSE:
case FILE_CLOSE_ALL_AND_QUIT:
case FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER:
@@ -1190,9 +1078,8 @@ void EditorNode::_dialog_action(String p_file) {
if (file->get_mode() == EditorFileDialog::MODE_SAVE_FILE) {
- //_save_scene(p_file);
_save_default_environment();
- if (scene_idx != editor_data.get_edited_scene() || _get_current_main_editor() == EDITOR_SCRIPT)
+ if (scene_idx != editor_data.get_edited_scene())
_save_scene(p_file, scene_idx);
else
_save_scene_with_preview(p_file);
@@ -1206,10 +1093,8 @@ void EditorNode::_dialog_action(String p_file) {
case FILE_SAVE_AND_RUN: {
if (file->get_mode() == EditorFileDialog::MODE_SAVE_FILE) {
- //_save_scene(p_file);
_save_default_environment();
_save_scene_with_preview(p_file);
- _call_build();
_run(true);
}
} break;
@@ -1222,7 +1107,6 @@ void EditorNode::_dialog_action(String p_file) {
if (ml.is_null()) {
current_option = -1;
- //accept->get_cancel()->hide();
accept->get_ok()->set_text(TTR("I see.."));
accept->set_text(TTR("Can't load MeshLibrary for merging!"));
accept->popup_centered_minsize();
@@ -1255,7 +1139,6 @@ void EditorNode::_dialog_action(String p_file) {
if (ml.is_null()) {
if (file_export_lib_merge->is_pressed()) {
current_option = -1;
- //accept->get_cancel()->hide();
accept->get_ok()->set_text(TTR("I see.."));
accept->set_text(TTR("Can't load TileSet for merging!"));
accept->popup_centered_minsize();
@@ -1281,19 +1164,15 @@ void EditorNode::_dialog_action(String p_file) {
}
} break;
- // case SETTINGS_LOAD_EXPORT_TEMPLATES: {
-
- // } break;
-
case RESOURCE_SAVE:
case RESOURCE_SAVE_AS: {
uint32_t current = editor_history.get_current();
Object *current_obj = current > 0 ? ObjectDB::get_instance(current) : NULL;
- ERR_FAIL_COND(!current_obj->cast_to<Resource>())
+ ERR_FAIL_COND(!Object::cast_to<Resource>(current_obj))
- RES current_res = RES(current_obj->cast_to<Resource>());
+ RES current_res = RES(Object::cast_to<Resource>(current_obj));
save_resource_in_path(current_res, p_file);
@@ -1360,8 +1239,6 @@ void EditorNode::_dialog_action(String p_file) {
default: { //save scene?
if (file->get_mode() == EditorFileDialog::MODE_SAVE_FILE) {
-
- //_save_scene(p_file);
_save_scene_with_preview(p_file);
}
@@ -1428,8 +1305,8 @@ void EditorNode::_prepare_history() {
icon = base_icon;
String text;
- if (obj->cast_to<Resource>()) {
- Resource *r = obj->cast_to<Resource>();
+ if (Object::cast_to<Resource>(obj)) {
+ Resource *r = Object::cast_to<Resource>(obj);
if (r->get_path().is_resource_file())
text = r->get_path().get_file();
else if (r->get_name() != String()) {
@@ -1437,8 +1314,8 @@ void EditorNode::_prepare_history() {
} else {
text = r->get_class();
}
- } else if (obj->cast_to<Node>()) {
- text = obj->cast_to<Node>()->get_name();
+ } else if (Object::cast_to<Node>(obj)) {
+ text = Object::cast_to<Node>(obj)->get_name();
} else {
text = obj->get_class();
}
@@ -1472,20 +1349,6 @@ void EditorNode::_save_default_environment() {
}
}
-void EditorNode::_imported(Node *p_node) {
-
- /*
- Node *scene = editor_data.get_edited_scene_root();
- add_edited_scene(p_node);
-
- if (scene) {
- String path = scene->get_filename();
- p_node->set_filename(path);
- memdelete(scene);
- }
-*/
-}
-
void EditorNode::_hide_top_editors() {
_display_top_editors(false);
@@ -1510,7 +1373,7 @@ void EditorNode::_edit_current() {
uint32_t current = editor_history.get_current();
Object *current_obj = current > 0 ? ObjectDB::get_instance(current) : NULL;
- property_back->set_disabled(editor_history.is_at_begining());
+ property_back->set_disabled(editor_history.is_at_beginning());
property_forward->set_disabled(editor_history.is_at_end());
this->current = current_obj;
@@ -1536,21 +1399,17 @@ void EditorNode::_edit_current() {
if (is_resource) {
- Resource *current_res = current_obj->cast_to<Resource>();
+ Resource *current_res = Object::cast_to<Resource>(current_obj);
ERR_FAIL_COND(!current_res);
scene_tree_dock->set_selected(NULL);
property_editor->edit(current_res);
node_dock->set_node(NULL);
object_menu->set_disabled(false);
EditorNode::get_singleton()->get_import_dock()->set_edit_path(current_res->get_path());
- //resources_dock->add_resource(Ref<Resource>(current_res));
-
- //top_pallete->set_current_tab(1);
} else if (is_node) {
- Node *current_node = current_obj->cast_to<Node>();
+ Node *current_node = Object::cast_to<Node>(current_obj);
ERR_FAIL_COND(!current_node);
- // ERR_FAIL_COND(!current_node->is_inside_tree());
property_editor->edit(current_node);
if (current_node->is_inside_tree()) {
@@ -1562,14 +1421,10 @@ void EditorNode::_edit_current() {
}
object_menu->get_popup()->clear();
- //top_pallete->set_current_tab(0);
-
} else {
property_editor->edit(current_obj);
node_dock->set_node(NULL);
- //scene_tree_dock->set_selected(current_node);
- //object_menu->get_popup()->clear();
}
/* Take care of PLUGIN EDITOR */
@@ -1624,15 +1479,6 @@ void EditorNode::_edit_current() {
_hide_top_editors();
}
- /*
- if (!plugin || plugin->has_main_screen()) {
- // remove the OVER plugin if exists
- if (editor_plugin_over)
- editor_plugin_over->make_visible(false);
- editor_plugin_over=NULL;
- }
-*/
- /* Take care of OBJECT MENU */
object_menu->set_disabled(false);
@@ -1677,9 +1523,6 @@ void EditorNode::_edit_current() {
}
}
- //p->add_separator();
- //p->add_item("All Methods",OBJECT_CALL_METHOD);
-
update_keying();
}
@@ -1688,7 +1531,7 @@ void EditorNode::_resource_created() {
Object *c = create_dialog->instance_selected();
ERR_FAIL_COND(!c);
- Resource *r = c->cast_to<Resource>();
+ Resource *r = Object::cast_to<Resource>(c);
ERR_FAIL_COND(!r);
REF res(r);
@@ -1716,7 +1559,6 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
play_button->set_pressed(false);
play_button->set_icon(gui_base->get_icon("MainPlay", "EditorIcons"));
- //pause_button->set_pressed(false);
play_scene_button->set_pressed(false);
play_scene_button->set_icon(gui_base->get_icon("PlayScene", "EditorIcons"));
play_custom_scene_button->set_pressed(false);
@@ -1732,7 +1574,6 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
if (!scene) {
current_option = -1;
- //accept->get_cancel()->hide();
accept->get_ok()->set_text(TTR("I see.."));
accept->set_text(TTR("There is no defined scene to run."));
accept->popup_centered_minsize();
@@ -1741,8 +1582,6 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
if (scene->get_filename() == "") {
current_option = -1;
- //accept->get_cancel()->hide();
- /**/
_menu_option_confirm(FILE_SAVE_BEFORE_RUN, false);
return;
}
@@ -1759,7 +1598,6 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
if (main_scene == "") {
current_option = -1;
- //accept->get_cancel()->hide();
pick_main_scene->set_text(TTR("No main scene has ever been defined, select one?\nYou can change it later in \"Project Settings\" under the 'application' category."));
pick_main_scene->popup_centered_minsize();
return;
@@ -1768,7 +1606,6 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
if (!FileAccess::exists(main_scene)) {
current_option = -1;
- //accept->get_cancel()->hide();
pick_main_scene->set_text(vformat(TTR("Selected scene '%s' does not exist, select a valid one?\nYou can change it later in \"Project Settings\" under the 'application' category."), main_scene));
pick_main_scene->popup_centered_minsize();
return;
@@ -1777,7 +1614,6 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
if (ResourceLoader::get_resource_type(main_scene) != "PackedScene") {
current_option = -1;
- //accept->get_cancel()->hide();
pick_main_scene->set_text(vformat(TTR("Selected scene '%s' is not a scene file, select a valid one?\nYou can change it later in \"Project Settings\" under the 'application' category."), main_scene));
pick_main_scene->popup_centered_minsize();
return;
@@ -1795,14 +1631,12 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
if (scene->get_filename() == "") {
current_option = -1;
- //accept->get_cancel()->hide();
accept->get_ok()->set_text(TTR("I see.."));
accept->set_text(TTR("Current scene was never saved, please save it prior to running."));
accept->popup_centered_minsize();
return;
}
- //_save_scene(scene->get_filename());
_save_scene_with_preview(scene->get_filename());
}
}
@@ -1810,6 +1644,9 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
editor_data.save_editor_external_data();
}
+ if (!_call_build())
+ return;
+
if (bool(EDITOR_DEF("run/output/always_clear_output_on_play", true))) {
log->clear();
}
@@ -1828,7 +1665,6 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
if (error != OK) {
current_option = -1;
- //confirmation->get_cancel()->hide();
accept->get_ok()->set_text(TTR("I see.."));
accept->set_text(TTR("Could not start subprocess!"));
accept->popup_centered_minsize();
@@ -1853,23 +1689,12 @@ void EditorNode::_run(bool p_current, const String &p_custom) {
void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
- //print_line("option "+itos(p_option)+" confirm "+itos(p_confirmed));
if (!p_confirmed) //this may be a hack..
current_option = (MenuOptions)p_option;
switch (p_option) {
case FILE_NEW_SCENE: {
- // TODO: Drop such obsolete commented code
- /*
- if (!p_confirmed) {
- confirmation->get_ok()->set_text("Yes");
- //confirmation->get_cancel()->show();
- confirmation->set_text("Start a New Scene? (Current will be lost)");
- confirmation->popup_centered_minsize();
- break;
- }*/
-
int idx = editor_data.add_edited_scene(-1);
_scene_tab_changed(idx);
editor_data.clear_editor_states();
@@ -1878,9 +1703,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
case FILE_NEW_INHERITED_SCENE:
case FILE_OPEN_SCENE: {
- //print_tree();
file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- //not for now?
List<String> extensions;
ResourceLoader::get_recognized_extensions_for_type("PackedScene", &extensions);
file->clear_filters();
@@ -1889,7 +1712,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
}
- //file->set_current_path(current_path);
Node *scene = editor_data.get_edited_scene_root();
if (scene) {
file->set_current_path(scene->get_filename());
@@ -1910,10 +1732,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
quick_open->set_title(TTR("Quick Open Script.."));
} break;
- case FILE_RUN_SCRIPT: {
-
- file_script->popup_centered_ratio();
- } break;
case FILE_OPEN_PREV: {
if (previous_scenes.empty())
@@ -1943,12 +1761,10 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
Node *scene = editor_data.get_edited_scene_root(scene_idx);
if (scene && scene->get_filename() != "") {
- // save in background if in the script editor
- if (scene_idx != editor_data.get_edited_scene() || _get_current_main_editor() == EDITOR_SCRIPT) {
+ if (scene_idx != editor_data.get_edited_scene())
_save_scene(scene->get_filename(), scene_idx);
- } else {
+ else
_save_scene_with_preview(scene->get_filename());
- }
if (scene_idx != -1)
_discard_changes();
@@ -1967,7 +1783,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
current_option = -1;
//confirmation->get_cancel()->hide();
accept->get_ok()->set_text(TTR("I see.."));
- accept->set_text("This operation can't be done without a tree root.");
+ accept->set_text(TTR("This operation can't be done without a tree root."));
accept->popup_centered_minsize();
break;
}
@@ -2023,44 +1839,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
_menu_option_confirm(FILE_SAVE_AND_RUN, false);
} break;
- case FILE_SAVE_OPTIMIZED: {
-#if 0
- Node *scene = editor_data.get_edited_scene_root();
- if (!scene) {
-
- current_option=-1;
- //confirmation->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("This operation can't be done without a tree root.");
- accept->popup_centered(Size2(300,70));
- break;
- }
-
-
-
- //file->set_current_path(current_path);
-
- String cpath;
- if (scene->get_filename()!="") {
- cpath = scene->get_filename();
-
- String fn = cpath.substr(0,cpath.length() - cpath.extension().size());
- String ext=cpath.extension();
- cpath=fn+".optimized.scn";
- optimized_save->set_optimized_scene(cpath);
- optimized_save->popup_centered(Size2(500,143));
- } else {
- current_option=-1;
- //confirmation->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("Please save the scene first.");
- accept->popup_centered(Size2(300,70));
- break;
-
- }
-#endif
- } break;
-
case FILE_EXPORT_PROJECT: {
project_export->popup_export();
@@ -2073,7 +1851,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
current_option = -1;
//confirmation->get_cancel()->hide();
accept->get_ok()->set_text(TTR("I see.."));
- accept->set_text("This operation can't be done without a scene.");
+ accept->set_text(TTR("This operation can't be done without a scene."));
accept->popup_centered_minsize();
break;
}
@@ -2116,9 +1894,8 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
if (!editor_data.get_edited_scene_root()) {
current_option = -1;
- //accept->get_cancel()->hide();
accept->get_ok()->set_text(TTR("I see.."));
- accept->set_text("This operation can't be done without a selected node.");
+ accept->set_text(TTR("This operation can't be done without a selected node."));
accept->popup_centered_minsize();
break;
}
@@ -2205,61 +1982,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
scene_tabs->set_current_tab(cur_idx);
} break;
-
-#if 0
- case NODE_EXTERNAL_INSTANCE: {
-
-
- if (!edited_scene) {
-
- current_option=-1;
- //accept->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("This operation can't be done without a selected node.");
- accept->popup_centered(Size2(300,70));
- break;
- }
-
- Node *parent = scene_tree_editor->get_selected();
-
- if (!parent) {
-
- current_option=-1;
- //confirmation->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("This operation can't be done without a selected node.");
- accept->popup_centered(Size2(300,70));
- break;
- }
-
- Node*instanced_scene=SceneLoader::load(external_file,true);
-
- if (!instanced_scene) {
-
- current_option=-1;
- //accept->get_cancel()->hide();
- accept->get_ok()->set_text("Ugh");
- accept->set_text("Error loading scene from "+external_file);
- accept->popup_centered(Size2(300,70));
- return;
- }
-
- instanced_scene->generate_instance_state();
- instanced_scene->set_filename( ProjectSettings::get_singleton()->localize_path(external_file) );
-
- editor_data.get_undo_redo().create_action("Instance Scene");
- editor_data.get_undo_redo().add_do_method(parent,"add_child",instanced_scene);
- editor_data.get_undo_redo().add_do_method(instanced_scene,"set_owner",edited_scene);
- editor_data.get_undo_redo().add_do_reference(instanced_scene);
- editor_data.get_undo_redo().add_undo_method(parent,"remove_child",instanced_scene);
- editor_data.get_undo_redo().commit_action();
-
- //parent->add_child(instanced_scene);
- //instanced_scene->set_owner(edited_scene);
- _last_instanced_scene=instanced_scene;
-
- } break;
-#endif
case RESOURCE_NEW: {
create_dialog->popup_create(true);
@@ -2273,9 +1995,9 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
uint32_t current = editor_history.get_current();
Object *current_obj = current > 0 ? ObjectDB::get_instance(current) : NULL;
- ERR_FAIL_COND(!current_obj->cast_to<Resource>())
+ ERR_FAIL_COND(!Object::cast_to<Resource>(current_obj))
- RES current_res = RES(current_obj->cast_to<Resource>());
+ RES current_res = RES(Object::cast_to<Resource>(current_obj));
save_resource(current_res);
@@ -2285,9 +2007,9 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
uint32_t current = editor_history.get_current();
Object *current_obj = current > 0 ? ObjectDB::get_instance(current) : NULL;
- ERR_FAIL_COND(!current_obj->cast_to<Resource>())
+ ERR_FAIL_COND(!Object::cast_to<Resource>(current_obj))
- RES current_res = RES(current_obj->cast_to<Resource>());
+ RES current_res = RES(Object::cast_to<Resource>(current_obj));
save_resource_as(current_res);
@@ -2297,9 +2019,9 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
uint32_t current = editor_history.get_current();
Object *current_obj = current > 0 ? ObjectDB::get_instance(current) : NULL;
- ERR_FAIL_COND(!current_obj->cast_to<Resource>())
+ ERR_FAIL_COND(!Object::cast_to<Resource>(current_obj))
- RES current_res = RES(current_obj->cast_to<Resource>());
+ RES current_res = RES(Object::cast_to<Resource>(current_obj));
current_res->set_path("");
_edit_current();
} break;
@@ -2308,9 +2030,9 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
uint32_t current = editor_history.get_current();
Object *current_obj = current > 0 ? ObjectDB::get_instance(current) : NULL;
- ERR_FAIL_COND(!current_obj->cast_to<Resource>())
+ ERR_FAIL_COND(!Object::cast_to<Resource>(current_obj))
- RES current_res = RES(current_obj->cast_to<Resource>());
+ RES current_res = RES(Object::cast_to<Resource>(current_obj));
EditorSettings::get_singleton()->set_resource_clipboard(current_res);
@@ -2384,7 +2106,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case RUN_PLAY: {
_menu_option_confirm(RUN_STOP, true);
- _call_build();
_run(false);
} break;
@@ -2414,7 +2135,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
play_scene_button->set_icon(gui_base->get_icon("PlayScene", "EditorIcons"));
play_custom_scene_button->set_pressed(false);
play_custom_scene_button->set_icon(gui_base->get_icon("PlayCustom", "EditorIcons"));
- //pause_button->set_pressed(false);
if (bool(EDITOR_DEF("run/output/always_close_output_on_stop", true))) {
for (int i = 0; i < bottom_panel_items.size(); i++) {
if (bottom_panel_items[i].control == log) {
@@ -2430,7 +2150,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
_save_default_environment();
_menu_option_confirm(RUN_STOP, true);
- _call_build();
_run(true);
} break;
@@ -2442,7 +2161,10 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
}
if (run_native->is_deploy_debug_remote_enabled()) {
_menu_option_confirm(RUN_STOP, true);
- _call_build();
+
+ if (!_call_build())
+ break; // build failed
+
emit_signal("play_pressed");
editor_run.run_native_notify();
}
@@ -2503,19 +2225,14 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case RUN_FILE_SERVER: {
- //file_server
bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_FILE_SERVER));
if (ischecked) {
file_server->stop();
run_native->set_deploy_dumb(false);
- //debug_menu->set_icon(gui_base->get_icon("FileServer","EditorIcons"));
- //debug_menu->get_popup()->set_item_text( debug_menu->get_popup()->get_item_index(RUN_FILE_SERVER),"Enable File Server");
} else {
file_server->start();
run_native->set_deploy_dumb(true);
- //debug_menu->set_icon(gui_base->get_icon("FileServerActive","EditorIcons"));
- //debug_menu->get_popup()->set_item_text( debug_menu->get_popup()->get_item_index(RUN_FILE_SERVER),"Disable File Server");
}
debug_menu->get_popup()->set_item_checked(debug_menu->get_popup()->get_item_index(RUN_FILE_SERVER), !ischecked);
@@ -2530,14 +2247,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_live_debug", !ischecked);
} break;
-
- /*case RUN_DEPLOY_DUMB_CLIENTS: {
-
- bool ischecked = debug_menu->get_popup()->is_item_checked( debug_menu->get_popup()->get_item_index(RUN_DEPLOY_DUMB_CLIENTS));
- debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(RUN_DEPLOY_DUMB_CLIENTS),!ischecked);
- run_native->set_deploy_dumb(!ischecked);
-
- } break;*/
case RUN_DEPLOY_REMOTE_DEBUG: {
bool ischecked = debug_menu->get_popup()->is_item_checked(debug_menu->get_popup()->get_item_index(RUN_DEPLOY_REMOTE_DEBUG));
@@ -2578,25 +2287,31 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
update_menu->get_popup()->set_item_checked(0, true);
update_menu->get_popup()->set_item_checked(1, false);
OS::get_singleton()->set_low_processor_usage_mode(false);
+ EditorSettings::get_singleton()->set_project_metadata("editor_options", "update_always", true);
+
+ current_option = -1;
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("This option is deprecated. Situations where refresh must be forced are now considered a bug. Please report."));
+ accept->popup_centered_minsize();
} break;
case SETTINGS_UPDATE_CHANGES: {
update_menu->get_popup()->set_item_checked(0, false);
update_menu->get_popup()->set_item_checked(1, true);
OS::get_singleton()->set_low_processor_usage_mode(true);
+ EditorSettings::get_singleton()->set_project_metadata("editor_options", "update_always", false);
} break;
case SETTINGS_UPDATE_SPINNER_HIDE: {
+
update_menu->set_icon(gui_base->get_icon("Collapse", "EditorIcons"));
update_menu->get_popup()->toggle_item_checked(3);
+ bool checked = update_menu->get_popup()->is_item_checked(3);
+ EditorSettings::get_singleton()->set_project_metadata("editor_options", "update_spinner_hide", checked);
} break;
case SETTINGS_PREFERENCES: {
settings_config_dialog->popup_edit_settings();
} break;
- case SETTINGS_OPTIMIZED_PRESETS: {
-
- //optimized_presets->popup_centered_ratio();
- } break;
case SETTINGS_MANAGE_EXPORT_TEMPLATES: {
export_template_manager->popup_manager();
@@ -2609,9 +2324,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
} break;
case SETTINGS_PICK_MAIN_SCENE: {
- //print_tree();
file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- //not for now?
List<String> extensions;
ResourceLoader::get_recognized_extensions_for_type("PackedScene", &extensions);
file->clear_filters();
@@ -2620,7 +2333,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
}
- //file->set_current_path(current_path);
Node *scene = editor_data.get_edited_scene_root();
if (scene) {
file->set_current_path(scene->get_filename());
@@ -2650,56 +2362,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
case HELP_ABOUT: {
about->popup_centered_minsize(Size2(780, 500) * EDSCALE);
} break;
- case SOURCES_REIMPORT: {
-
- //reimport_dialog->popup_reimport();
- } break;
- case DEPENDENCY_LOAD_CHANGED_IMAGES: {
-
- } break;
- case DEPENDENCY_UPDATE_IMPORTED: {
-
- /*
- bool editing_changed = _find_editing_changed_scene(get_edited_scene());
-
- import_reload_fn="";
-
- if (editing_changed) {
- if (unsaved_cache && !bool(EDITOR_DEF("import/ask_save_before_reimport",false))) {
- if (!p_confirmed) {
-
-
- confirmation->get_ok()->set_text("Open");
- //confirmation->get_cancel()->show();
- confirmation->set_text("Current scene changed, save and re-import ?");
- confirmation->popup_centered(Size2(300,70));
- break;
-
- }
- }
-
- Node *scene = get_edited_scene();
-
- if (scene->get_filename()=="") {
-
- current_option=-1;
- //accept->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("Can't import if edited scene was not saved."); //i don't think this code will ever run
- accept->popup_centered(Size2(300,70));
- break;
-
- }
-
-
- import_reload_fn = scene->get_filename();
- _save_scene(import_reload_fn);
-
- }
-
-*/
-
- } break;
default: {
@@ -2864,7 +2526,7 @@ void EditorNode::add_editor_plugin(EditorPlugin *p_editor) {
tb->set_toggle_mode(true);
tb->connect("pressed", singleton, "_editor_select", varray(singleton->main_editor_buttons.size()));
tb->set_text(p_editor->get_name());
- tb->set_icon(p_editor->get_base_control()->get_icon(p_editor->get_name(), "EditorIcons"));
+ tb->set_icon(singleton->gui_base->get_icon(p_editor->get_name(), "EditorIcons"));
tb->set_name(p_editor->get_name());
singleton->main_editor_buttons.push_back(tb);
singleton->main_editor_button_vb->add_child(tb);
@@ -2944,12 +2606,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("Unable to enable addon plugin at: '" + addon_path + "' parsing of config failed.");
+ show_warning(TTR("Unable to enable addon plugin at: '") + addon_path + TTR("' parsing of config failed."));
return;
}
if (!cf->has_section_key("plugin", "script")) {
- show_warning("Unable to find script field for addon plugin at: 'res://addons/" + p_addon + "''.");
+ show_warning(TTR("Unable to find script field for addon plugin at: 'res://addons/") + p_addon + "''.");
return;
}
@@ -2959,18 +2621,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("Unable to load addon script from path: '" + path + "'.");
+ show_warning(TTR("Unable to load addon script from path: '") + path + "'.");
return;
}
//could check inheritance..
if (String(script->get_instance_base_type()) != "EditorPlugin") {
- show_warning("Unable to load addon script from path: '" + path + "' Base type is not EditorPlugin.");
+ show_warning(TTR("Unable to load addon script from path: '") + path + "' Base type is not EditorPlugin.");
return;
}
if (!script->is_tool()) {
- show_warning("Unable to load addon script from path: '" + path + "' Script is not in tool mode.");
+ show_warning(TTR("Unable to load addon script from path: '") + path + "' Script is not in tool mode.");
return;
}
@@ -3008,18 +2670,9 @@ void EditorNode::_remove_edited_scene() {
editor_data.get_undo_redo().clear_history();
_update_title();
_update_scene_tabs();
-
- /*
- if (editor_data.get_edited_scene_count()==1) {
- //make new scene appear saved
- set_current_version(editor_data.get_undo_redo().get_version());
- unsaved_cache=false;
- }
- */
}
void EditorNode::_remove_scene(int index) {
- //printf("Attempting to remove scene %d (current is %d)\n", index, editor_data.get_edited_scene());
if (editor_data.get_edited_scene() == index) {
//Scene to remove is current scene
@@ -3038,8 +2691,8 @@ void EditorNode::set_edited_scene(Node *p_scene) {
}
get_editor_data().set_edited_scene_root(p_scene);
- if (p_scene && p_scene->cast_to<Popup>())
- p_scene->cast_to<Popup>()->show(); //show popups
+ if (Object::cast_to<Popup>(p_scene))
+ Object::cast_to<Popup>(p_scene)->show(); //show popups
scene_tree_dock->set_edited_scene(p_scene);
if (get_tree())
get_tree()->set_edited_scene_root(p_scene);
@@ -3068,7 +2721,6 @@ Dictionary EditorNode::_get_main_scene_state() {
state["property_edit_offset"] = get_property_editor()->get_scene_tree()->get_vscroll_bar()->get_value();
state["saved_version"] = saved_version;
state["node_filter"] = scene_tree_dock->get_filter();
- //print_line(" getting main tab: "+itos(state["main_tab"]));
return state;
}
@@ -3077,32 +2729,8 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
if (get_edited_scene() != p_for_scene && p_for_scene != NULL)
return; //not for this scene
- //print_line("set current 7 ");
changing_scene = false;
-#if 0
- if (p_state.has("main_tab")) {
- int idx = p_state["main_tab"];
-
-
- print_line("comes with tab: "+itos(idx));
- int current=-1;
- for(int i=0;i<editor_table.size();i++) {
- if (editor_plugin_screen==editor_table[i]) {
- current=i;
- break;
- }
- }
-
-
- if (idx<2 && current<2) {
- //only set tab for 2D and 3D
- _editor_select(idx);
- //print_line(" setting main tab: "+itos(p_state["main_tab"]));
- }
- }
-#else
-
if (get_edited_scene()) {
int current = -1;
@@ -3125,7 +2753,6 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
}
}
}
-#endif
if (p_state.has("scene_tree_offset"))
scene_tree_dock->get_tree_editor()->get_scene_tree()->get_vscroll_bar()->set_value(p_state["scene_tree_offset"]);
@@ -3134,16 +2761,12 @@ void EditorNode::_set_main_scene_state(Dictionary p_state, Node *p_for_scene) {
if (p_state.has("node_filter"))
scene_tree_dock->set_filter(p_state["node_filter"]);
- //print_line("set current 8 ");
//this should only happen at the very end
- //changing_scene=true; //avoid script change from opening editor
ScriptEditor::get_singleton()->get_debugger()->update_live_edit_root();
ScriptEditor::get_singleton()->set_scene_root_script(editor_data.get_scene_root_script(editor_data.get_edited_scene()));
editor_data.notify_edited_scene_changed();
-
- //changing_scene=false;
}
void EditorNode::set_current_version(uint64_t p_version) {
@@ -3175,17 +2798,13 @@ void EditorNode::set_current_scene(int p_idx) {
scene_root->remove_child(get_editor_data().get_edited_scene_root());
}
- //print_line("set current 2 ");
-
editor_selection->clear();
editor_data.set_edited_scene(p_idx);
Node *new_scene = editor_data.get_edited_scene_root();
- if (new_scene && new_scene->cast_to<Popup>())
- new_scene->cast_to<Popup>()->show(); //show popups
-
- //print_line("set current 3 ");
+ if (Object::cast_to<Popup>(new_scene))
+ Object::cast_to<Popup>(new_scene)->show(); //show popups
scene_tree_dock->set_edited_scene(new_scene);
if (get_tree())
@@ -3195,25 +2814,11 @@ void EditorNode::set_current_scene(int p_idx) {
if (new_scene->get_parent() != scene_root)
scene_root->add_child(new_scene);
}
- //print_line("set current 4 ");
Dictionary state = editor_data.restore_edited_scene_state(editor_selection, &editor_history);
_edit_current();
- /*if (!unsaved) {
- saved_version=editor_data.get_undo_redo().get_version();
- if (p_backwards)
- saved_version--;
- else
- saved_version++;
- print_line("was saved, updating version");
- } else {
- saved_version=state["saved_version"];
- }*/
- //_set_main_scene_state(state);
-
call_deferred("_set_main_scene_state", state, get_edited_scene()); //do after everything else is done setting up
- //print_line("set current 6 ");
}
bool EditorNode::is_scene_open(const String &p_path) {
@@ -3264,7 +2869,6 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
if (!lpath.begins_with("res://")) {
current_option = -1;
- //accept->get_cancel()->hide();
accept->get_ok()->set_text(TTR("Ugh"));
accept->set_text(TTR("Error loading scene, it must be inside the project path. Use 'Import' to open the scene, then save it inside the project path."));
accept->popup_centered_minsize();
@@ -3274,8 +2878,6 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
int prev = editor_data.get_edited_scene();
int idx = editor_data.add_edited_scene(-1);
- //print_line("load scene callback");
- //set_current_scene(idx);
if (!editor_data.get_edited_scene_root() && editor_data.get_edited_scene_count() == 2) {
_remove_edited_scene();
@@ -3285,14 +2887,12 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
dependency_errors.clear();
- Ref<PackedScene> sdata = ResourceLoader::load(lpath, "", true);
+ print_line("actually loading it");
+ Error err;
+ Ref<PackedScene> sdata = ResourceLoader::load(lpath, "", true, &err);
if (!sdata.is_valid()) {
- current_option = -1;
- //accept->get_cancel()->hide();
- accept->get_ok()->set_text(TTR("Ugh"));
- accept->set_text(TTR("Error loading scene."));
- accept->popup_centered_minsize();
+ _dialog_display_load_error(lpath, err);
opening_prev = false;
if (prev != -1) {
@@ -3333,7 +2933,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
if (ResourceCache::has(lpath)) {
//used from somewhere else? no problem! update state and replace sdata
- Ref<PackedScene> ps = Ref<PackedScene>(ResourceCache::get(lpath)->cast_to<PackedScene>());
+ Ref<PackedScene> ps = Ref<PackedScene>(Object::cast_to<PackedScene>(ResourceCache::get(lpath)));
if (ps.is_valid()) {
ps->replace_state(sdata->get_state());
ps->set_last_modified_time(sdata->get_last_modified_time());
@@ -3349,11 +2949,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
if (!new_scene) {
sdata.unref();
- current_option = -1;
- //accept->get_cancel()->hide();
- accept->get_ok()->set_text(TTR("Ugh"));
- accept->set_text(TTR("Error loading scene."));
- accept->popup_centered_minsize();
+ _dialog_display_load_error(lpath, ERR_FILE_NOT_FOUND);
opening_prev = false;
if (prev != -1) {
set_current_scene(prev);
@@ -3362,46 +2958,18 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
return ERR_FILE_NOT_FOUND;
}
- //guess not needed in the end?
- //new_scene->clear_internal_tree_resource_paths(); //make sure no internal tree paths to internal resources exist
-
- /*
- Node *old_scene = edited_scene;
- _hide_top_editors();
- set_edited_scene(NULL);
- editor_data.clear_editor_states();
- if (old_scene) {
- if (!opening_prev && old_scene->get_filename()!="") {
- previous_scenes.push_back(old_scene->get_filename());
- }
- memdelete(old_scene);
- }
-*/
-
if (p_set_inherited) {
Ref<SceneState> state = sdata->get_state();
state->set_path(lpath);
new_scene->set_scene_inherited_state(state);
new_scene->set_filename(String());
- /*
- if (new_scene->get_scene_instance_state().is_valid())
- new_scene->get_scene_instance_state()->set_path(String());
- */
}
new_scene->set_scene_instance_state(Ref<SceneState>());
set_edited_scene(new_scene);
_get_scene_metadata(p_scene);
- /*
- editor_data.set_edited_scene_root(new_scene);
- scene_tree_dock->set_selected(new_scene, true);
- property_editor->edit(new_scene);
- editor_data.set_edited_scene_root(new_scene);
-*/
-
- //editor_data.get_undo_redo().clear_history();
saved_version = editor_data.get_undo_redo().get_version();
_update_title();
_update_scene_tabs();
@@ -3412,8 +2980,6 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
ScriptEditor::get_singleton()->get_debugger()->update_live_edit_root();
- //top_pallete->set_current_tab(0); //always go to scene
-
push_item(new_scene);
return OK;
@@ -3422,8 +2988,6 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
void EditorNode::open_request(const String &p_path) {
load_scene(p_path); // as it will be opened in separate tab
- //external_file=p_path;
- //_menu_option_confirm(FILE_EXTERNAL_OPEN_SCENE,false);
}
void EditorNode::request_instance_scene(const String &p_path) {
@@ -3461,7 +3025,7 @@ void EditorNode::_property_keyed(const String &p_keyed, const Variant &p_value,
void EditorNode::_transform_keyed(Object *sp, const String &p_sub, const Transform &p_key) {
- Spatial *s = sp->cast_to<Spatial>();
+ Spatial *s = Object::cast_to<Spatial>(sp);
if (!s)
return;
AnimationPlayerEditor::singleton->get_key_editor()->insert_transform_key(s, p_sub, p_key);
@@ -3469,8 +3033,6 @@ void EditorNode::_transform_keyed(Object *sp, const String &p_sub, const Transfo
void EditorNode::update_keying() {
- //print_line("KR: "+itos(p_enabled));
-
bool valid = false;
if (AnimationPlayerEditor::singleton->get_key_editor()->has_keying()) {
@@ -3478,7 +3040,7 @@ void EditorNode::update_keying() {
if (editor_history.get_path_size() >= 1) {
Object *obj = ObjectDB::get_instance(editor_history.get_path_object(0));
- if (obj && obj->cast_to<Node>()) {
+ if (Object::cast_to<Node>(obj)) {
valid = true;
}
@@ -3492,57 +3054,15 @@ void EditorNode::update_keying() {
void EditorNode::_close_messages() {
- //left_split->set_dragger_visible(false);
old_split_ofs = center_split->get_split_offset();
center_split->set_split_offset(0);
- //scene_root_parent->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_END,0);
}
void EditorNode::_show_messages() {
- //left_split->set_dragger_visible(true);
center_split->set_split_offset(old_split_ofs);
- //scene_root_parent->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_END,log->get_margin(MARGIN_TOP));
}
-#if 0
-void EditorNode::animation_panel_make_visible(bool p_visible) {
-
- if (!p_visible) {
- animation_panel->hide();
- } else {
- animation_panel->show();
- }
-
- int idx = settings_menu->get_popup()->get_item_index(SETTINGS_SHOW_ANIMATION);
- settings_menu->get_popup()->set_item_checked(idx,p_visible);
-}
-
-
-void EditorNode::animation_editor_make_visible(bool p_visible) {
-
- if (p_visible) {
-
- animation_editor->show();
- animation_vb->get_parent_control()->minimum_size_changed();
- //pd_anim->show();
- top_split->set_collapsed(false);
-
- //scene_root_parent->set_margin(MARGIN_TOP,animation_editor->get_margin(MARGIN_BOTTOM));
- } else {
- //pd_anim->hide();
- animation_editor->hide();
- //scene_root_parent->set_margin(MARGIN_TOP,0);
- if (!animation_vb->get_parent_control())
- return;
- animation_vb->get_parent_control()->minimum_size_changed();
- top_split->set_collapsed(true);
- }
-
- animation_editor->set_keying(p_visible);
-
-}
-#endif
void EditorNode::_add_to_recent_scenes(const String &p_scene) {
String base = "_" + ProjectSettings::get_singleton()->get_resource_path().replace("\\", "::").replace("/", "::");
@@ -3571,44 +3091,6 @@ void EditorNode::_open_recent_scene(int p_idx) {
load_scene(path);
}
-void EditorNode::_save_optimized() {
-
-//save_optimized_copy(optimized_save->get_optimized_scene(),optimized_save->get_preset());
-#if 0
- String path = optimized_save->get_optimized_scene();
-
- uint32_t flags=0;
-
- String platform="all";
- Ref<EditorOptimizedSaver> saver=editor_data.get_optimized_saver(optimized_save->get_preset());
-
- if (saver->is_bundle_scenes_enabled())
- flags|=SceneSaver::FLAG_BUNDLE_INSTANCED_SCENES;
- if (saver->is_bundle_resources_enabled())
- flags|=SceneSaver::FLAG_BUNDLE_RESOURCES;
- if (saver->is_remove_editor_data_enabled())
- flags|=SceneSaver::FLAG_OMIT_EDITOR_PROPERTIES;
- if (saver->is_big_endian_data_enabled())
- flags|=SceneSaver::FLAG_SAVE_BIG_ENDIAN;
-
- platform=saver->get_target_platform();
-
- Error err = SceneSaver::save(path,get_edited_scene(),flags,saver);
-
- if (err) {
-
- //accept->"()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("Error saving optimized scene: "+path);
- accept->popup_centered(Size2(300,70));
- return;
-
- }
-
- project_settings->add_remapped_path(ProjectSettings::get_singleton()->localize_path(get_edited_scene()->get_filename()),ProjectSettings::get_singleton()->localize_path(path),platform);
-#endif
-}
-
void EditorNode::_update_recent_scenes() {
String base = "_" + ProjectSettings::get_singleton()->get_resource_path().replace("\\", "::").replace("/", "::");
@@ -3637,7 +3119,6 @@ void EditorNode::_quick_opened() {
void EditorNode::_quick_run() {
- _call_build();
_run(false, quick_run->get_selected());
}
@@ -3648,33 +3129,7 @@ void EditorNode::notify_child_process_exited() {
editor_run.stop();
}
-bool EditorNode::_find_editing_changed_scene(Node *p_from) {
- /*
- if (!p_from)
- return false;
-
- if (p_from->get_filename()!="") {
-
- StringName fn = p_from->get_filename();
- for(int i=0;i<import_monitor->get_changes().size();i++) {
-
- if (fn==import_monitor->get_changes()[i])
- return true;
- }
- }
-
- for(int i=0;i<p_from->get_child_count();i++) {
-
- if (_find_editing_changed_scene(p_from->get_child(i)))
- return true;
- }
-*/
- return false;
-}
-
void EditorNode::add_io_error(const String &p_error) {
- //CharString err_ut = p_error.utf8();
- //ERR_PRINT(!err_ut.get_data());
_load_error_notify(singleton, p_error);
}
@@ -3714,12 +3169,9 @@ void EditorNode::register_editor_types() {
ClassDB::register_class<EditorPlugin>();
ClassDB::register_class<EditorImportPlugin>();
- // ClassDB::register_class<EditorExportPlugin>();
- // ClassDB::register_class<EditorScenePostImport>();
ClassDB::register_class<EditorScript>();
ClassDB::register_class<EditorSelection>();
ClassDB::register_class<EditorFileDialog>();
- //ClassDB::register_type<EditorImportExport>();
ClassDB::register_class<EditorSettings>();
ClassDB::register_class<EditorSpatialGizmo>();
ClassDB::register_class<EditorResourcePreview>();
@@ -3727,9 +3179,12 @@ void EditorNode::register_editor_types() {
ClassDB::register_class<EditorFileSystem>();
ClassDB::register_class<EditorFileSystemDirectory>();
ClassDB::register_virtual_class<ScriptEditor>();
+ ClassDB::register_virtual_class<EditorInterface>();
- //ClassDB::register_type<EditorImporter>();
- //ClassDB::register_type<EditorPostImport>();
+ // FIXME: Is this stuff obsolete, or should it be ported to new APIs?
+ //ClassDB::register_class<EditorExportPlugin>();
+ //ClassDB::register_class<EditorScenePostImport>();
+ //ClassDB::register_type<EditorImportExport>();
}
void EditorNode::unregister_editor_types() {
@@ -4167,21 +3622,6 @@ void EditorNode::_update_dock_slots_visibility() {
}
}
-void EditorNode::_update_top_menu_visibility() {
-
- return; // I think removing top menu is too much
- /*
- if (distraction_free->is_pressed()) {
- play_cc->hide();
- menu_hb->hide();
- scene_tabs->hide();
- } else {
- play_cc->show();
- menu_hb->show();
- scene_tabs->show();
- }*/
-}
-
void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String &p_section) {
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
@@ -4200,7 +3640,7 @@ void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String
for (int k = 0; k < DOCK_SLOT_MAX; k++) {
if (!dock_slot[k]->has_node(name))
continue;
- node = dock_slot[k]->get_node(name)->cast_to<Control>();
+ node = Object::cast_to<Control>(dock_slot[k]->get_node(name));
if (!node)
continue;
atidx = k;
@@ -4429,27 +3869,20 @@ void EditorNode::_thumbnail_done(const String &p_path, const Ref<Texture> &p_pre
void EditorNode::_scene_tab_changed(int p_tab) {
tab_preview_panel->hide();
- //print_line("set current 1 ");
bool unsaved = (saved_version != editor_data.get_undo_redo().get_version());
- //print_line("version: "+itos(editor_data.get_undo_redo().get_version())+", saved "+itos(saved_version));
if (p_tab == editor_data.get_edited_scene())
return; //pointless
uint64_t next_scene_version = editor_data.get_scene_version(p_tab);
- //print_line("scene tab changed???");
editor_data.get_undo_redo().create_action(TTR("Switch Scene Tab"));
editor_data.get_undo_redo().add_do_method(this, "set_current_version", unsaved ? saved_version : 0);
editor_data.get_undo_redo().add_do_method(this, "set_current_scene", p_tab);
- //editor_data.get_undo_redo().add_do_method(scene_tabs,"set_current_tab",p_tab);
- //editor_data.get_undo_redo().add_do_method(scene_tabs,"ensure_tab_visible",p_tab);
editor_data.get_undo_redo().add_do_method(this, "set_current_version", next_scene_version == 0 ? editor_data.get_undo_redo().get_version() + 1 : next_scene_version);
editor_data.get_undo_redo().add_undo_method(this, "set_current_version", next_scene_version);
editor_data.get_undo_redo().add_undo_method(this, "set_current_scene", editor_data.get_edited_scene());
- //editor_data.get_undo_redo().add_undo_method(scene_tabs,"set_current_tab",editor_data.get_edited_scene());
- //editor_data.get_undo_redo().add_undo_method(scene_tabs,"ensure_tab_visible",p_tab,editor_data.get_edited_scene());
editor_data.get_undo_redo().add_undo_method(this, "set_current_version", saved_version);
editor_data.get_undo_redo().commit_action();
}
@@ -4630,7 +4063,6 @@ void EditorNode::set_distraction_free_mode(bool p_enter) {
} else {
set_docks_visible(true);
}
- _update_top_menu_visibility();
}
bool EditorNode::get_distraction_free_mode() const {
@@ -4763,11 +4195,14 @@ Variant EditorNode::drag_files_and_dirs(const Vector<String> &p_files, Control *
void EditorNode::_dropped_files(const Vector<String> &p_files, int p_screen) {
+ /*
String cur_path = filesystem_dock->get_current_path();
- // for(int i=0;i<EditorImportExport::get_singleton()->get_import_plugin_count();i++) {
- // EditorImportExport::get_singleton()->get_import_plugin(i)->import_from_drop(p_files,cur_path);
- // }
+ for(int i=0;i<EditorImportExport::get_singleton()->get_import_plugin_count();i++) {
+ EditorImportExport::get_singleton()->get_import_plugin(i)->import_from_drop(p_files,cur_path);
+ }
+ */
}
+
void EditorNode::_file_access_close_error_notify(const String &p_str) {
add_io_error("Unable to write to file '" + p_str + "', file in use, locked or lacking permissions.");
@@ -4775,30 +4210,25 @@ void EditorNode::_file_access_close_error_notify(const String &p_str) {
void EditorNode::reload_scene(const String &p_path) {
- //first of all, reload textures as they might have changed on disk
+ //first of all, reload internal textures, materials, meshes, etc. as they might have changed on disk
+ print_line("reloading: " + p_path);
List<Ref<Resource> > cached;
ResourceCache::get_cached_resources(&cached);
List<Ref<Resource> > to_clear; //clear internal resources from previous scene from being used
for (List<Ref<Resource> >::Element *E = cached.front(); E; E = E->next()) {
- if (E->get()->get_path().begins_with(p_path + "::")) //subresources of existing scene
+ if (E->get()->get_path().find("::") != -1) {
+ print_line(E->get()->get_path());
+ }
+ if (E->get()->get_path().begins_with(p_path + "::")) { //subresources of existing scene
to_clear.push_back(E->get());
-
- if (!E->get()->cast_to<Texture>())
- continue;
- if (!E->get()->get_path().is_resource_file() && !E->get()->get_path().is_abs_path())
- continue;
- if (!FileAccess::exists(E->get()->get_path()))
- continue;
- uint64_t mt = FileAccess::get_modified_time(E->get()->get_path());
- if (mt != E->get()->get_last_modified_time()) {
- E->get()->reload_from_file();
}
}
//so reload reloads everything, clear subresources of previous scene
while (to_clear.front()) {
+ print_line("bye bye: " + to_clear.front()->get()->get_path());
to_clear.front()->get()->set_path("");
to_clear.pop_front();
}
@@ -4830,7 +4260,8 @@ void EditorNode::reload_scene(const String &p_path) {
//remove scene
_remove_scene(scene_idx);
//reload scene
- load_scene(p_path);
+
+ load_scene(p_path, true, false, true, true);
//adjust index so tab is back a the previous position
editor_data.move_edited_scene_to_index(scene_idx);
get_undo_redo()->clear_history();
@@ -4859,13 +4290,16 @@ void EditorNode::add_build_callback(EditorBuildCallback p_callback) {
build_callbacks[build_callback_count++] = p_callback;
}
-EditorPluginInitializeCallback EditorNode::build_callbacks[EditorNode::MAX_BUILD_CALLBACKS];
+EditorBuildCallback EditorNode::build_callbacks[EditorNode::MAX_BUILD_CALLBACKS];
-void EditorNode::_call_build() {
+bool EditorNode::_call_build() {
for (int i = 0; i < build_callback_count; i++) {
- build_callbacks[i]();
+ if (!build_callbacks[i]())
+ return false;
}
+
+ return true;
}
void EditorNode::_inherit_imported(const String &p_action) {
@@ -4926,13 +4360,13 @@ void EditorNode::_dim_timeout() {
void EditorNode::_check_gui_base_size() {
if (gui_base->get_size().width > 1200 * EDSCALE) {
for (int i = 0; i < singleton->main_editor_button_vb->get_child_count(); i++) {
- ToolButton *btn = singleton->main_editor_button_vb->get_child(i)->cast_to<ToolButton>();
+ ToolButton *btn = Object::cast_to<ToolButton>(singleton->main_editor_button_vb->get_child(i));
if (btn == singleton->distraction_free) continue;
btn->set_text(btn->get_name());
}
} else {
for (int i = 0; i < singleton->main_editor_button_vb->get_child_count(); i++) {
- ToolButton *btn = singleton->main_editor_button_vb->get_child(i)->cast_to<ToolButton>();
+ ToolButton *btn = Object::cast_to<ToolButton>(singleton->main_editor_button_vb->get_child(i));
if (btn == singleton->distraction_free) continue;
btn->set_text("");
}
@@ -4955,7 +4389,6 @@ void EditorNode::_bind_methods() {
ClassDB::bind_method("_editor_select", &EditorNode::_editor_select);
ClassDB::bind_method("_node_renamed", &EditorNode::_node_renamed);
ClassDB::bind_method("edit_node", &EditorNode::edit_node);
- ClassDB::bind_method("_imported", &EditorNode::_imported);
ClassDB::bind_method("_unhandled_input", &EditorNode::_unhandled_input);
ClassDB::bind_method("_get_scene_metadata", &EditorNode::_get_scene_metadata);
@@ -4972,14 +4405,7 @@ void EditorNode::_bind_methods() {
ClassDB::bind_method("_quick_run", &EditorNode::_quick_run);
ClassDB::bind_method("_resource_created", &EditorNode::_resource_created);
-
- ClassDB::bind_method("_import_action", &EditorNode::_import_action);
- //ClassDB::bind_method("_import",&EditorNode::_import);
- //ClassDB::bind_method("_import_conflicts_solved",&EditorNode::_import_conflicts_solved);
ClassDB::bind_method("_open_recent_scene", &EditorNode::_open_recent_scene);
- //ClassDB::bind_method("_open_recent_scene_confirm",&EditorNode::_open_recent_scene_confirm);
-
- ClassDB::bind_method("_save_optimized", &EditorNode::_save_optimized);
ClassDB::bind_method("stop_child_process", &EditorNode::stop_child_process);
@@ -5019,8 +4445,6 @@ void EditorNode::_bind_methods() {
ClassDB::bind_method("_dropped_files", &EditorNode::_dropped_files);
ClassDB::bind_method("_toggle_distraction_free_mode", &EditorNode::_toggle_distraction_free_mode);
- // ClassDB::bind_method(D_METHOD("add_editor_import_plugin", "plugin"), &EditorNode::add_editor_import_plugin);
- //ClassDB::bind_method(D_METHOD("remove_editor_import_plugin", "plugin"), &EditorNode::remove_editor_import_plugin);
ClassDB::bind_method(D_METHOD("get_gui_base"), &EditorNode::get_gui_base);
ClassDB::bind_method(D_METHOD("_bottom_panel_switch"), &EditorNode::_bottom_panel_switch);
@@ -5029,6 +4453,8 @@ void EditorNode::_bind_methods() {
ClassDB::bind_method(D_METHOD("_dim_timeout"), &EditorNode::_dim_timeout);
ClassDB::bind_method(D_METHOD("_check_gui_base_size"), &EditorNode::_check_gui_base_size);
+ ClassDB::bind_method(D_METHOD("_resources_reimported"), &EditorNode::_resources_reimported);
+
ADD_SIGNAL(MethodInfo("play_pressed"));
ADD_SIGNAL(MethodInfo("pause_pressed"));
ADD_SIGNAL(MethodInfo("stop_pressed"));
@@ -5056,7 +4482,7 @@ EditorNode::EditorNode() {
ResourceLoader::clear_translation_remaps(); //no remaps using during editor
editor_initialize_certificates(); //for asset sharing
- InputDefault *id = Input::get_singleton()->cast_to<InputDefault>();
+ InputDefault *id = Object::cast_to<InputDefault>(Input::get_singleton());
if (id) {
@@ -5200,7 +4626,6 @@ EditorNode::EditorNode() {
menu_hb = memnew(HBoxContainer);
main_vbox->add_child(menu_hb);
- //left
left_l_hsplit = memnew(HSplitContainer);
main_vbox->add_child(left_l_hsplit);
@@ -5224,19 +4649,14 @@ EditorNode::EditorNode() {
left_r_vsplit->add_child(dock_slot[DOCK_SLOT_LEFT_UR]);
dock_slot[DOCK_SLOT_LEFT_BR] = memnew(TabContainer);
left_r_vsplit->add_child(dock_slot[DOCK_SLOT_LEFT_BR]);
- //left_r_vsplit->hide();
- //dock_slot[DOCK_SLOT_LEFT_UR]->hide();
- //dock_slot[DOCK_SLOT_LEFT_BR]->hide();
main_hsplit = memnew(HSplitContainer);
left_r_hsplit->add_child(main_hsplit);
- //main_split->set_v_size_flags(Control::SIZE_EXPAND_FILL);
VBoxContainer *center_vb = memnew(VBoxContainer);
main_hsplit->add_child(center_vb);
center_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
center_split = memnew(VSplitContainer);
- //main_hsplit->add_child(center_split);
center_split->set_v_size_flags(Control::SIZE_EXPAND_FILL);
center_split->set_collapsed(false);
center_vb->add_child(center_split);
@@ -5250,9 +4670,6 @@ EditorNode::EditorNode() {
right_l_vsplit->add_child(dock_slot[DOCK_SLOT_RIGHT_UL]);
dock_slot[DOCK_SLOT_RIGHT_BL] = memnew(TabContainer);
right_l_vsplit->add_child(dock_slot[DOCK_SLOT_RIGHT_BL]);
- //right_l_vsplit->hide();
- //dock_slot[DOCK_SLOT_RIGHT_UL]->hide();
- //dock_slot[DOCK_SLOT_RIGHT_BL]->hide();
right_r_vsplit = memnew(VSplitContainer);
right_hsplit->add_child(right_r_vsplit);
@@ -5284,7 +4701,6 @@ EditorNode::EditorNode() {
dock_tab_move_left->set_icon(theme->get_icon("Back", "EditorIcons"));
dock_tab_move_left->set_focus_mode(Control::FOCUS_NONE);
dock_tab_move_left->connect("pressed", this, "_dock_move_left");
- //dock_tab_move_left->set_h_size_flags(Control::SIZE_EXPAND_FILL);
dock_hb->add_child(dock_tab_move_left);
dock_hb->add_spacer();
dock_tab_move_right = memnew(ToolButton);
@@ -5292,7 +4708,6 @@ EditorNode::EditorNode() {
dock_tab_move_right->set_focus_mode(Control::FOCUS_NONE);
dock_tab_move_right->connect("pressed", this, "_dock_move_right");
- //dock_tab_move_right->set_h_size_flags(Control::SIZE_EXPAND_FILL);
dock_hb->add_child(dock_tab_move_right);
dock_vb->add_child(dock_hb);
@@ -5374,36 +4789,20 @@ EditorNode::EditorNode() {
scene_root_parent = memnew(PanelContainer);
scene_root_parent->set_custom_minimum_size(Size2(0, 80) * EDSCALE);
scene_root_parent->add_style_override("panel", gui_base->get_stylebox("Content", "EditorStyles"));
- // sc->add_style_override("panel", gui_base->get_stylebox("Background", "EditorStyles"));
- //Ref<StyleBox> sp = scene_root_parent->get_stylebox("panel","TabContainer");
- //scene_root_parent->add_style_override("panel",sp);
-
- /*scene_root_parent->set_anchor( MARGIN_RIGHT, Control::ANCHOR_END );
- scene_root_parent->set_anchor( MARGIN_BOTTOM, Control::ANCHOR_END );
- scene_root_parent->set_begin( Point2( 0, 0) );
- scene_root_parent->set_end( Point2( 0,80 ) );*/
srt->add_child(scene_root_parent);
scene_root_parent->set_v_size_flags(Control::SIZE_EXPAND_FILL);
scene_root = memnew(Viewport);
scene_root->set_disable_3d(true);
- //scene_root_base->add_child(scene_root);
- //scene_root->set_meta("_editor_disable_input",true);
VisualServer::get_singleton()->viewport_set_hide_scenario(scene_root->get_viewport_rid(), true);
scene_root->set_disable_input(true);
scene_root->set_as_audio_listener_2d(true);
- //scene_root->set_size_override(true,Size2(ProjectSettings::get_singleton()->get("display/width"),ProjectSettings::get_singleton()->get("display/height")));
-
- //scene_root->set_world_2d( Ref<World2D>( memnew( World2D )) );
viewport = memnew(VBoxContainer);
viewport->set_v_size_flags(Control::SIZE_EXPAND_FILL);
viewport->add_constant_override("separation", 0);
- /*for(int i=0;i<4;i++) {
- viewport->set_margin(Margin(i),sp->get_margin(Margin(i)));
- }*/
scene_root_parent->add_child(viewport);
PanelContainer *top_region = memnew(PanelContainer);
@@ -5412,9 +4811,14 @@ EditorNode::EditorNode() {
top_region->add_child(left_menu_hb);
menu_hb->add_child(top_region);
+ {
+ Control *sp = memnew(Control);
+ sp->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
+ menu_hb->add_child(sp);
+ }
+
file_menu = memnew(MenuButton);
file_menu->set_text(TTR("Scene"));
- //file_menu->set_icon(gui_base->get_icon("Save","EditorIcons"));
left_menu_hb->add_child(file_menu);
file_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles"));
@@ -5422,12 +4826,43 @@ EditorNode::EditorNode() {
prev_scene->set_icon(gui_base->get_icon("PrevScene", "EditorIcons"));
prev_scene->set_tooltip(TTR("Go to previously opened scene."));
prev_scene->set_disabled(true);
- //left_menu_hb->add_child( prev_scene );
prev_scene->connect("pressed", this, "_menu_option", make_binds(FILE_OPEN_PREV));
gui_base->add_child(prev_scene);
prev_scene->set_position(Point2(3, 24));
prev_scene->hide();
+ accept = memnew(AcceptDialog);
+ gui_base->add_child(accept);
+ accept->connect("confirmed", this, "_menu_confirm_current");
+
+ project_export = memnew(ProjectExportDialog);
+ gui_base->add_child(project_export);
+
+ dependency_error = memnew(DependencyErrorDialog);
+ gui_base->add_child(dependency_error);
+
+ dependency_fixer = memnew(DependencyEditor);
+ gui_base->add_child(dependency_fixer);
+
+ settings_config_dialog = memnew(EditorSettingsDialog);
+ gui_base->add_child(settings_config_dialog);
+
+ project_settings = memnew(ProjectSettingsEditor(&editor_data));
+ gui_base->add_child(project_settings);
+
+ run_settings_dialog = memnew(RunSettingsDialog);
+ gui_base->add_child(run_settings_dialog);
+
+ export_template_manager = memnew(ExportTemplateManager);
+ gui_base->add_child(export_template_manager);
+
+ about = memnew(EditorAbout);
+ about->get_logo()->set_texture(gui_base->get_icon("Logo", "EditorIcons"));
+ gui_base->add_child(about);
+
+ warning = memnew(AcceptDialog);
+ gui_base->add_child(warning);
+
ED_SHORTCUT("editor/next_tab", TTR("Next tab"), KEY_MASK_CMD + KEY_TAB);
ED_SHORTCUT("editor/prev_tab", TTR("Previous tab"), KEY_MASK_CMD + KEY_MASK_SHIFT + KEY_TAB);
ED_SHORTCUT("editor/filter_files", TTR("Filter Files.."), KEY_MASK_ALT + KEY_MASK_CMD + KEY_P);
@@ -5454,7 +4889,6 @@ EditorNode::EditorNode() {
pm_export->set_name("Export");
p->add_child(pm_export);
p->add_submenu_item(TTR("Convert To.."), "Export");
- pm_export->add_separator();
pm_export->add_shortcut(ED_SHORTCUT("editor/convert_to_MeshLibrary", TTR("MeshLibrary..")), FILE_EXPORT_MESH_LIBRARY);
pm_export->add_shortcut(ED_SHORTCUT("editor/convert_to_TileSet", TTR("TileSet..")), FILE_EXPORT_TILESET);
pm_export->connect("id_pressed", this, "_menu_option");
@@ -5470,11 +4904,6 @@ EditorNode::EditorNode() {
p->add_child(recent_scenes);
recent_scenes->connect("id_pressed", this, "_open_recent_scene");
- {
- Control *sp = memnew(Control);
- sp->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
- menu_hb->add_child(sp);
- }
p->add_separator();
p->add_item(TTR("Quit"), FILE_QUIT, KEY_MASK_CMD + KEY_Q);
@@ -5488,7 +4917,7 @@ EditorNode::EditorNode() {
p->add_item(TTR("Project Settings"), RUN_SETTINGS);
p->add_separator();
p->connect("id_pressed", this, "_menu_option");
- p->add_item(TTR("Run Script"), FILE_RUN_SCRIPT, KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_R);
+ //p->add_item(TTR("Run Script"), FILE_RUN_SCRIPT, KEY_MASK_SHIFT + KEY_MASK_CMD + KEY_R);
p->add_item(TTR("Export"), FILE_EXPORT_PROJECT);
PopupMenu *tool_menu = memnew(PopupMenu);
@@ -5508,7 +4937,6 @@ EditorNode::EditorNode() {
PanelContainer *editor_region = memnew(PanelContainer);
main_editor_button_vb = memnew(HBoxContainer);
editor_region->add_child(main_editor_button_vb);
-
menu_hb->add_spacer();
menu_hb->add_child(editor_region);
@@ -5540,12 +4968,9 @@ EditorNode::EditorNode() {
left_menu_hb->add_child(settings_menu);
settings_menu->set_text(TTR("Editor"));
settings_menu->add_style_override("hover", gui_base->get_stylebox("MenuHover", "EditorStyles"));
- //settings_menu->set_anchor(MARGIN_RIGHT,ANCHOR_END);
p = settings_menu->get_popup();
- //p->add_item("Export Settings",SETTINGS_EXPORT_PREFERENCES);
p->add_item(TTR("Editor Settings"), SETTINGS_PREFERENCES);
- //p->add_item("Optimization Presets",SETTINGS_OPTIMIZED_PRESETS);
p->add_separator();
editor_layouts = memnew(PopupMenu);
editor_layouts->set_name("Layouts");
@@ -5581,7 +5006,7 @@ EditorNode::EditorNode() {
play_cc->set_margin(MARGIN_TOP, 5);
play_button_panel = memnew(PanelContainer);
- play_button_panel->add_style_override("panel", gui_base->get_stylebox("PlayButtonPanel", "EditorStyles"));
+ // play_button_panel->add_style_override("panel", gui_base->get_stylebox("PlayButtonPanel", "EditorStyles"));
play_cc->add_child(play_button_panel);
HBoxContainer *play_hb = memnew(HBoxContainer);
@@ -5600,7 +5025,6 @@ EditorNode::EditorNode() {
pause_button->set_toggle_mode(true);
pause_button->set_icon(gui_base->get_icon("Pause", "EditorIcons"));
pause_button->set_focus_mode(Control::FOCUS_NONE);
- //pause_button->connect("pressed", this,"_menu_option",make_binds(RUN_PAUSE));
pause_button->set_tooltip(TTR("Pause the scene"));
pause_button->set_disabled(true);
play_hb->add_child(pause_button);
@@ -5608,7 +5032,6 @@ EditorNode::EditorNode() {
stop_button = memnew(ToolButton);
play_hb->add_child(stop_button);
- //stop_button->set_toggle_mode(true);
stop_button->set_focus_mode(Control::FOCUS_NONE);
stop_button->set_icon(gui_base->get_icon("Stop", "EditorIcons"));
stop_button->connect("pressed", this, "_menu_option", make_binds(RUN_STOP));
@@ -5643,23 +5066,8 @@ EditorNode::EditorNode() {
play_custom_scene_button->set_shortcut(ED_SHORTCUT("editor/play_custom_scene", TTR("Play Custom Scene"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_F5));
progress_hb = memnew(BackgroundProgress);
- //menu_hb->add_child(progress_hb);
-
- {
- Control *sp = memnew(Control);
- sp->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
- //menu_hb->add_child(sp);
- }
- {
- Control *sp = memnew(Control);
- sp->set_custom_minimum_size(Size2(30, 0) * EDSCALE);
- //menu_hb->add_child(sp);
- }
-
- top_region = memnew(PanelContainer);
HBoxContainer *right_menu_hb = memnew(HBoxContainer);
- //top_region->add_child(right_menu_hb);
menu_hb->add_child(right_menu_hb);
layout_dialog = memnew(EditorNameDialog);
@@ -5678,16 +5086,16 @@ EditorNode::EditorNode() {
p->add_check_item(TTR("Update Changes"), SETTINGS_UPDATE_CHANGES);
p->add_separator();
p->add_check_item(TTR("Disable Update Spinner"), SETTINGS_UPDATE_SPINNER_HIDE);
- p->set_item_checked(1, true);
+ int update_always = EditorSettings::get_singleton()->get_project_metadata("editor_options", "update_always", false);
+ int hide_spinner = EditorSettings::get_singleton()->get_project_metadata("editor_options", "update_spinner_hide", false);
+ _menu_option(update_always ? SETTINGS_UPDATE_ALWAYS : SETTINGS_UPDATE_CHANGES);
+ if (hide_spinner) {
+ _menu_option(SETTINGS_UPDATE_SPINNER_HIDE);
+ }
scene_tree_dock = memnew(SceneTreeDock(this, scene_root, editor_selection, editor_data));
scene_tree_dock->set_name(TTR("Scene"));
dock_slot[DOCK_SLOT_RIGHT_UL]->add_child(scene_tree_dock);
-#if 0
- resources_dock = memnew( ResourcesDock(this) );
- resources_dock->set_name("Resources");
- dock_slot[DOCK_SLOT_RIGHT_BL]->add_child(resources_dock);
-#endif
dock_slot[DOCK_SLOT_LEFT_BR]->hide();
VBoxContainer *prop_editor_base = memnew(VBoxContainer);
@@ -5749,8 +5157,8 @@ EditorNode::EditorNode() {
editor_history_menu->get_popup()->connect("id_pressed", this, "_select_history");
prop_editor_hb = memnew(HBoxContainer); //again...
-
prop_editor_base->add_child(prop_editor_hb);
+
editor_path = memnew(EditorPath(&editor_history));
editor_path->set_h_size_flags(Control::SIZE_EXPAND_FILL);
prop_editor_hb->add_child(editor_path);
@@ -5811,7 +5219,6 @@ EditorNode::EditorNode() {
bool use_single_dock_column = (OS::get_singleton()->get_screen_size(OS::get_singleton()->get_current_screen()).x < 1200);
node_dock = memnew(NodeDock);
- //node_dock->set_undoredo(&editor_data.get_undo_redo());
if (use_single_dock_column) {
dock_slot[DOCK_SLOT_RIGHT_UL]->add_child(node_dock);
} else {
@@ -5855,31 +5262,17 @@ EditorNode::EditorNode() {
bottom_panel_vb = memnew(VBoxContainer);
bottom_panel->add_child(bottom_panel_vb);
- //bottom_panel_vb->set_v_size_flags(Control::SIZE_EXPAND_FILL);
bottom_panel_hb = memnew(HBoxContainer);
bottom_panel_vb->add_child(bottom_panel_hb);
log = memnew(EditorLog);
-
add_bottom_panel_item(TTR("Output"), log);
- //left_split->set_dragger_visible(false);
-
old_split_ofs = 0;
center_split->connect("resized", this, "_vp_resized");
- /*PanelContainer *bottom_pc = memnew( PanelContainer );
- srt->add_child(bottom_pc);
- bottom_hb = memnew( HBoxContainer );
- bottom_pc->add_child(bottom_hb);*/
-
- //center_vb->add_child( log->get_button() );
- //log->get_button()->set_h_size_flags(Control::SIZE_EXPAND_FILL);
-
- //progress_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
-
orphan_resources = memnew(OrphanResourcesDialog);
gui_base->add_child(orphan_resources);
@@ -5893,60 +5286,6 @@ EditorNode::EditorNode() {
save_confirmation->connect("confirmed", this, "_menu_confirm_current");
save_confirmation->connect("custom_action", this, "_discard_changes");
- accept = memnew(AcceptDialog);
- gui_base->add_child(accept);
- accept->connect("confirmed", this, "_menu_confirm_current");
-
- //optimized_save = memnew( OptimizedSaveDialog(&editor_data) );
- //gui_base->add_child(optimized_save);
- //optimized_save->connect("confirmed",this,"_save_optimized");
-
- project_export = memnew(ProjectExportDialog);
- gui_base->add_child(project_export);
-
- //project_export_settings = memnew( ProjectExportDialog(this) );
- //gui_base->add_child(project_export_settings);
-
- //optimized_presets = memnew( OptimizedPresetsDialog(&editor_data) );
- //gui_base->add_child(optimized_presets);
- //optimized_presets->connect("confirmed",this,"_presets_optimized");
-
- //import_subscene = memnew( EditorSubScene );
- //gui_base->add_child(import_subscene);
-
- dependency_error = memnew(DependencyErrorDialog);
- gui_base->add_child(dependency_error);
-
- dependency_fixer = memnew(DependencyEditor);
- gui_base->add_child(dependency_fixer);
-
- settings_config_dialog = memnew(EditorSettingsDialog);
- gui_base->add_child(settings_config_dialog);
-
- project_settings = memnew(ProjectSettingsEditor(&editor_data));
- gui_base->add_child(project_settings);
-
- import_confirmation = memnew(ConfirmationDialog);
- import_confirmation->get_ok()->set_text(TTR("Re-Import"));
- import_confirmation->add_button(TTR("Update"), !OS::get_singleton()->get_swap_ok_cancel(), "update");
- import_confirmation->get_label()->set_align(Label::ALIGN_CENTER);
- import_confirmation->connect("confirmed", this, "_import_action", make_binds("re-import"));
- import_confirmation->connect("custom_action", this, "_import_action");
- gui_base->add_child(import_confirmation);
-
- run_settings_dialog = memnew(RunSettingsDialog);
- gui_base->add_child(run_settings_dialog);
-
- export_template_manager = memnew(ExportTemplateManager);
- gui_base->add_child(export_template_manager);
-
- about = memnew(EditorAbout);
- about->get_logo()->set_texture(gui_base->get_icon("Logo", "EditorIcons"));
- gui_base->add_child(about);
-
- warning = memnew(AcceptDialog);
- gui_base->add_child(warning);
-
file_templates = memnew(FileDialog);
file_templates->set_title(TTR("Import Templates From ZIP File"));
@@ -5993,9 +5332,6 @@ EditorNode::EditorNode() {
gui_base->add_child(file_script);
file_script->connect("file_selected", this, "_dialog_action");
- //reimport_dialog = memnew( EditorReImportDialog );
- //gui_base->add_child(reimport_dialog);
-
property_forward->connect("pressed", this, "_property_editor_forward");
property_back->connect("pressed", this, "_property_editor_back");
@@ -6027,14 +5363,19 @@ EditorNode::EditorNode() {
} else {
WARN_PRINT("Asset Library not available, as it requires SSL to work.");
}
+
+ //add interface before adding plugins
+
+ editor_interface = memnew(EditorInterface);
+ add_child(editor_interface);
+
//more visually meaningful to have this later
raise_bottom_panel_item(AnimationPlayerEditor::singleton);
add_editor_plugin(memnew(ShaderEditorPlugin(this)));
- /* add_editor_plugin( memnew( ShaderGraphEditorPlugin(this,true) ) );
- add_editor_plugin( memnew( ShaderGraphEditorPlugin(this,false) ) );
+ // FIXME: Disabled for Godot 3.0 as made incompatible, it needs to be ported to the new API.
+ //add_editor_plugin(memnew(ShaderGraphEditorPlugin(this)));
- add_editor_plugin( memnew( ShaderEditorPlugin(this,false) ) );*/
add_editor_plugin(memnew(CameraEditorPlugin(this)));
add_editor_plugin(memnew(ThemeEditorPlugin(this)));
add_editor_plugin(memnew(MultiMeshEditorPlugin(this)));
@@ -6045,7 +5386,6 @@ EditorNode::EditorNode() {
add_editor_plugin(memnew(ParticlesEditorPlugin(this)));
add_editor_plugin(memnew(ResourcePreloaderEditorPlugin(this)));
add_editor_plugin(memnew(ItemListEditorPlugin(this)));
- //add_editor_plugin( memnew( RichTextEditorPlugin(this) ) );
add_editor_plugin(memnew(CollisionPolygonEditorPlugin(this)));
add_editor_plugin(memnew(CollisionPolygon2DEditorPlugin(this)));
add_editor_plugin(memnew(TileSetEditorPlugin(this)));
@@ -6064,9 +5404,12 @@ EditorNode::EditorNode() {
add_editor_plugin(memnew(CollisionShape2DEditorPlugin(this)));
add_editor_plugin(memnew(CurveEditorPlugin(this)));
add_editor_plugin(memnew(TextureEditorPlugin(this)));
- add_editor_plugin(memnew(AudioBusesEditorPlugin(audio_bus_editor)));
- //add_editor_plugin( memnew( MaterialEditorPlugin(this) ) );
add_editor_plugin(memnew(MeshEditorPlugin(this)));
+ add_editor_plugin(memnew(AudioBusesEditorPlugin(audio_bus_editor)));
+
+ // FIXME: Disabled as (according to reduz) users were complaining that it gets in the way
+ // Waiting for PropertyEditor rewrite (planned for 3.1) to be refactored.
+ //add_editor_plugin(memnew(MaterialEditorPlugin(this)));
for (int i = 0; i < EditorPlugins::get_plugin_count(); i++)
add_editor_plugin(EditorPlugins::create(i, this));
@@ -6079,6 +5422,7 @@ EditorNode::EditorNode() {
resource_preview->add_preview_generator(Ref<EditorPackedScenePreviewPlugin>(memnew(EditorPackedScenePreviewPlugin)));
resource_preview->add_preview_generator(Ref<EditorMaterialPreviewPlugin>(memnew(EditorMaterialPreviewPlugin)));
resource_preview->add_preview_generator(Ref<EditorScriptPreviewPlugin>(memnew(EditorScriptPreviewPlugin)));
+ // FIXME: Needs to be rewritten for AudioStream in Godot 3.0+
//resource_preview->add_preview_generator( Ref<EditorSamplePreviewPlugin>( memnew(EditorSamplePreviewPlugin )));
resource_preview->add_preview_generator(Ref<EditorMeshPreviewPlugin>(memnew(EditorMeshPreviewPlugin)));
resource_preview->add_preview_generator(Ref<EditorBitmapPreviewPlugin>(memnew(EditorBitmapPreviewPlugin)));
@@ -6091,7 +5435,6 @@ EditorNode::EditorNode() {
editor_plugins_over = memnew(EditorPluginList);
editor_plugins_force_input_forwarding = memnew(EditorPluginList);
- //force_top_viewport(true);
_edit_current();
current = NULL;
@@ -6099,41 +5442,18 @@ EditorNode::EditorNode() {
Physics2DServer::get_singleton()->set_active(false); // no physics by default if editor
ScriptServer::set_scripting_enabled(false); // no scripting by default if editor
- //ProjectSettings::get_singleton()->set("render/room_cull_enabled",false);
-
reference_resource_mem = true;
save_external_resources_mem = true;
set_process(true);
- OS::get_singleton()->set_low_processor_usage_mode(true);
-
- if (0) { //not sure if i want this to happen after all
-
- //store project name in ssettings
- String project_name;
- //figure it out from path
- project_name = ProjectSettings::get_singleton()->get_resource_path().replace("\\", "/");
- print_line("path: " + project_name);
- if (project_name.length() && project_name[project_name.length() - 1] == '/')
- project_name = project_name.substr(0, project_name.length() - 1);
-
- project_name = project_name.replace("/", "::");
-
- if (project_name != "") {
- EditorSettings::get_singleton()->set("projects/" + project_name, ProjectSettings::get_singleton()->get_resource_path());
- EditorSettings::get_singleton()->raise_order("projects/" + project_name);
- EditorSettings::get_singleton()->save();
- }
- }
open_imported = memnew(ConfirmationDialog);
open_imported->get_ok()->set_text(TTR("Open Anyway"));
- new_inherited_button = open_imported->add_button("New Inherited", !OS::get_singleton()->get_swap_ok_cancel(), "inherit");
+ new_inherited_button = open_imported->add_button(TTR("New Inherited"), !OS::get_singleton()->get_swap_ok_cancel(), "inherit");
open_imported->connect("confirmed", this, "_open_imported");
open_imported->connect("custom_action", this, "_inherit_imported");
gui_base->add_child(open_imported);
- //edited_scene=NULL;
saved_version = 1;
unsaved_cache = true;
_last_instanced_scene = NULL;
@@ -6154,19 +5474,15 @@ EditorNode::EditorNode() {
set_process_unhandled_input(true);
_playing_edited = false;
- //Panel *errors = memnew( Panel );
load_errors = memnew(RichTextLabel);
- //load_errors->set_readonly(true);
load_error_dialog = memnew(AcceptDialog);
load_error_dialog->add_child(load_errors);
load_error_dialog->set_title(TTR("Load Errors"));
- //load_error_dialog->set_child_rect(load_errors);
gui_base->add_child(load_error_dialog);
- //EditorImport::add_importer( Ref<EditorImporterCollada>( memnew(EditorImporterCollada )));
-
EditorFileSystem::get_singleton()->connect("sources_changed", this, "_sources_changed");
EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "_fs_changed");
+ EditorFileSystem::get_singleton()->connect("resources_reimported", this, "_resources_reimported");
{
List<StringName> tl;
@@ -6184,12 +5500,9 @@ EditorNode::EditorNode() {
pick_main_scene = memnew(ConfirmationDialog);
gui_base->add_child(pick_main_scene);
- pick_main_scene->get_ok()->set_text("Select");
+ pick_main_scene->get_ok()->set_text(TTR("Select"));
pick_main_scene->connect("confirmed", this, "_menu_option", varray(SETTINGS_PICK_MAIN_SCENE));
- //Ref<ImageTexture> it = gui_base->get_icon("logo","Icons");
- //OS::get_singleton()->set_icon( it->get_data() );
-
for (int i = 0; i < _init_callbacks.size(); i++)
_init_callbacks[i]();
@@ -6200,7 +5513,6 @@ EditorNode::EditorNode() {
import_dock->initialize_import_options();
{
-
_initializing_addons = true;
Vector<String> addons;
if (ProjectSettings::get_singleton()->has("editor_plugins/enabled")) {
@@ -6242,6 +5554,7 @@ EditorNode::~EditorNode() {
memdelete(editor_plugins_over);
memdelete(editor_plugins_force_input_forwarding);
memdelete(file_server);
+ memdelete(progress_hb);
EditorSettings::destroy();
}
diff --git a/editor/editor_node.h b/editor/editor_node.h
index 385d97ecc3..c3ceee350a 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -30,21 +30,38 @@
#ifndef EDITOR_NODE_H
#define EDITOR_NODE_H
-#include "editor/call_dialog.h"
#include "editor/connections_dialog.h"
#include "editor/create_dialog.h"
#include "editor/editor_about.h"
#include "editor/editor_data.h"
+#include "editor/editor_export.h"
+#include "editor/editor_log.h"
+#include "editor/editor_name_dialog.h"
#include "editor/editor_path.h"
+#include "editor/editor_plugin.h"
+#include "editor/editor_resource_preview.h"
#include "editor/editor_run.h"
+#include "editor/editor_run_native.h"
+#include "editor/editor_run_script.h"
+#include "editor/editor_scale.h"
+#include "editor/editor_sub_scene.h"
#include "editor/export_template_manager.h"
+#include "editor/fileserver/editor_file_server.h"
#include "editor/filesystem_dock.h"
#include "editor/groups_editor.h"
#include "editor/import_dock.h"
#include "editor/node_dock.h"
+#include "editor/pane_drag.h"
+#include "editor/progress_dialog.h"
+#include "editor/project_export.h"
+#include "editor/project_settings_editor.h"
#include "editor/property_editor.h"
+#include "editor/quick_open.h"
#include "editor/reparent_dialog.h"
+#include "editor/run_settings_dialog.h"
+#include "editor/scene_tree_dock.h"
#include "editor/scene_tree_editor.h"
+#include "editor/script_create_dialog.h"
#include "editor/settings_config_dialog.h"
#include "scene/gui/center_container.h"
#include "scene/gui/control.h"
@@ -56,45 +73,19 @@
#include "scene/gui/separator.h"
#include "scene/gui/split_container.h"
#include "scene/gui/tab_container.h"
+#include "scene/gui/tabs.h"
#include "scene/gui/texture_progress.h"
#include "scene/gui/tool_button.h"
#include "scene/gui/tree.h"
-
-#include "editor/pane_drag.h"
-
-#include "editor/editor_log.h"
-#include "editor/editor_run_script.h"
-#include "editor/project_export.h"
-#include "editor/project_settings_editor.h"
-#include "editor/resources_dock.h"
-#include "editor/run_settings_dialog.h"
-#include "editor/scene_tree_dock.h"
-#include "editor/script_create_dialog.h"
-
-#include "editor/editor_name_dialog.h"
-#include "editor/editor_plugin.h"
-#include "editor/editor_run_native.h"
-#include "editor/editor_sub_scene.h"
-#include "editor/project_export.h"
-#include "editor/quick_open.h"
-#include "editor_export.h"
-#include "editor_reimport_dialog.h"
-#include "scene/gui/tabs.h"
-
-#include "editor_resource_preview.h"
-#include "fileserver/editor_file_server.h"
#include "scene/gui/viewport_container.h"
-#include "progress_dialog.h"
-
-#include "editor_scale.h"
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
typedef void (*EditorNodeInitCallback)();
typedef void (*EditorPluginInitializeCallback)();
-typedef void (*EditorBuildCallback)();
+typedef bool (*EditorBuildCallback)();
class EditorPluginList;
@@ -138,7 +129,6 @@ private:
FILE_OPEN_OLD_SCENE,
FILE_QUICK_OPEN_SCENE,
FILE_QUICK_OPEN_SCRIPT,
- FILE_RUN_SCRIPT,
FILE_OPEN_PREV,
FILE_CLOSE,
FILE_CLOSE_ALL_AND_QUIT,
@@ -170,7 +160,6 @@ private:
RUN_SETTINGS,
RUN_PROJECT_MANAGER,
RUN_FILE_SERVER,
- //RUN_DEPLOY_DUMB_CLIENTS,
RUN_LIVE_DEBUG,
RUN_DEBUG_COLLISONS,
RUN_DEBUG_NAVIGATION,
@@ -181,7 +170,6 @@ private:
SETTINGS_UPDATE_SPINNER_HIDE,
SETTINGS_EXPORT_PREFERENCES,
SETTINGS_PREFERENCES,
- SETTINGS_OPTIMIZED_PRESETS,
SETTINGS_LAYOUT_SAVE,
SETTINGS_LAYOUT_DELETE,
SETTINGS_LAYOUT_DEFAULT,
@@ -189,9 +177,6 @@ private:
SETTINGS_PICK_MAIN_SCENE,
SETTINGS_TOGGLE_FULLSCREN,
SETTINGS_HELP,
- SOURCES_REIMPORT,
- DEPENDENCY_LOAD_CHANGED_IMAGES,
- DEPENDENCY_UPDATE_IMPORTED,
SCENE_TAB_CLOSE,
HELP_CLASSES,
@@ -209,11 +194,8 @@ private:
TOOL_MENU_BASE = 1000
};
- //Node *edited_scene; //scene being edited
Viewport *scene_root; //root of the scene being edited
- //Ref<ResourceImportMetadata> scene_import_metadata;
-
PanelContainer *scene_root_parent;
Control *theme_base;
Control *gui_base;
@@ -247,7 +229,6 @@ private:
HBoxContainer *bottom_hb;
Control *vp_base;
PaneDrag *pd;
- //PaneDrag *pd_anim;
CenterContainer *play_cc;
HBoxContainer *menu_hb;
@@ -269,19 +250,16 @@ private:
ToolButton *play_custom_scene_button;
ToolButton *search_button;
TextureProgress *audio_vu;
- //MenuButton *fileserver_menu;
RichTextLabel *load_errors;
AcceptDialog *load_error_dialog;
- //Control *scene_root_base;
Ref<Theme> theme;
PopupMenu *recent_scenes;
Button *property_back;
Button *property_forward;
SceneTreeDock *scene_tree_dock;
- //ResourcesDock *resources_dock;
PropertyEditor *property_editor;
NodeDock *node_dock;
ImportDock *import_dock;
@@ -294,7 +272,6 @@ private:
CreateDialog *create_dialog;
- //CallDialog *call_dialog;
ConfirmationDialog *confirmation;
ConfirmationDialog *save_confirmation;
ConfirmationDialog *import_confirmation;
@@ -308,7 +285,6 @@ private:
PopupMenu *editor_layouts;
EditorNameDialog *layout_dialog;
- //OptimizedPresetsDialog *optimized_presets;
EditorSettingsDialog *settings_config_dialog;
RunSettingsDialog *run_settings_dialog;
ProjectSettingsEditor *project_settings;
@@ -343,8 +319,6 @@ private:
Vector<ToolButton *> main_editor_buttons;
Vector<EditorPlugin *> editor_table;
- // EditorReImportDialog *reimport_dialog;
-
ProgressDialog *progress_dialog;
BackgroundProgress *progress_hb;
@@ -402,7 +376,6 @@ private:
EditorData editor_data;
EditorRun editor_run;
EditorSelection *editor_selection;
- // ProjectExport *project_export;
ProjectExportDialog *project_export;
EditorResourcePreview *resource_preview;
@@ -420,6 +393,8 @@ private:
HBoxContainer *bottom_panel_hb;
VBoxContainer *bottom_panel_vb;
+ EditorInterface *editor_interface;
+
void _bottom_panel_switch(bool p_enable, int p_idx);
String external_file;
@@ -429,10 +404,10 @@ private:
void _dialog_action(String p_file);
void _edit_current();
- void _dialog_display_file_error(String p_file, Error p_error);
+ void _dialog_display_save_error(String p_file, Error p_error);
+ void _dialog_display_load_error(String p_file, Error p_error);
int current_option;
- //void _animation_visibility_toggle();
void _resource_created();
void _resource_selected(const RES &p_res, const String &p_property = "");
void _menu_option(int p_option);
@@ -447,8 +422,8 @@ private:
void _prepare_history();
void _fs_changed();
+ void _resources_reimported(const Vector<String> &p_resources);
void _sources_changed(bool p_exist);
- void _imported(Node *p_node);
void _node_renamed();
void _editor_select_next();
@@ -489,7 +464,6 @@ private:
void _update_recent_scenes();
void _open_recent_scene(int p_idx);
void _dropped_files(const Vector<String> &p_files, int p_screen);
- //void _open_recent_scene_confirm();
String _recent_scene;
bool convert_old;
@@ -500,8 +474,6 @@ private:
bool has_main_screen() const { return true; }
- bool _find_editing_changed_scene(Node *p_from);
-
String import_reload_fn;
Set<FileDialog *> file_dialogs;
@@ -578,7 +550,6 @@ private:
void _save_docks_to_config(Ref<ConfigFile> p_layout, const String &p_section);
void _load_docks_from_config(Ref<ConfigFile> p_layout, const String &p_section);
void _update_dock_slots_visibility();
- void _update_top_menu_visibility();
void _update_layouts_menu();
void _layout_menu_option(int p_id);
@@ -605,7 +576,7 @@ private:
static EditorPluginInitializeCallback plugin_init_callbacks[MAX_INIT_CALLBACKS];
void _save_default_environment();
- void _call_build();
+ bool _call_build();
static int build_callback_count;
static EditorBuildCallback build_callbacks[MAX_BUILD_CALLBACKS];
@@ -699,10 +670,6 @@ public:
static EditorLog *get_log() { return singleton->log; }
Control *get_viewport();
- //void animation_editor_make_visible(bool p_visible);
- //void hide_animation_player_editors();
- //void animation_panel_make_visible(bool p_visible);
-
void set_edited_scene(Node *p_scene);
Node *get_edited_scene() { return editor_data.get_edited_scene_root(); }
@@ -762,7 +729,12 @@ public:
static void progress_task_step_bg(const String &p_task, int p_step = -1);
static void progress_end_task_bg(const String &p_task);
- void save_scene(String p_file) { _save_scene(p_file); }
+ void save_scene_to_path(String p_file, bool p_with_preview = true) {
+ if (p_with_preview)
+ _save_scene_with_preview(p_file);
+ else
+ _save_scene(p_file);
+ }
bool is_scene_in_use(const String &p_path);
@@ -853,4 +825,4 @@ struct EditorProgressBG {
~EditorProgressBG() { EditorNode::progress_end_task_bg(task); }
};
-#endif
+#endif // EDITOR_NODE_H
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp
index fdac68ea1f..0587939a1a 100644
--- a/editor/editor_path.cpp
+++ b/editor/editor_path.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -139,9 +139,9 @@ void EditorPath::_notification(int p_what) {
if (left < 0)
continue;
String name;
- if (obj->cast_to<Resource>()) {
+ if (Object::cast_to<Resource>(obj)) {
- Resource *r = obj->cast_to<Resource>();
+ Resource *r = Object::cast_to<Resource>(obj);
if (r->get_path().is_resource_file())
name = r->get_path().get_file();
else
@@ -149,18 +149,18 @@ void EditorPath::_notification(int p_what) {
if (name == "")
name = r->get_class();
- } else if (obj->cast_to<Node>()) {
+ } else if (Object::cast_to<Node>(obj)) {
- name = obj->cast_to<Node>()->get_name();
- } else if (obj->cast_to<Resource>() && obj->cast_to<Resource>()->get_name() != "") {
- name = obj->cast_to<Resource>()->get_name();
+ name = Object::cast_to<Node>(obj)->get_name();
+ } else if (Object::cast_to<Resource>(obj) && Object::cast_to<Resource>(obj)->get_name() != "") {
+ name = Object::cast_to<Resource>(obj)->get_name();
} else {
name = obj->get_class();
}
set_tooltip(obj->get_class());
- label_font->draw(ci, Point2i(ofs, (size.height - label_font->get_height()) / 2 + label_font->get_ascent()), name, Color(1, 1, 1), left);
+ label_font->draw(ci, Point2i(ofs, (size.height - label_font->get_height()) / 2 + label_font->get_ascent()), name, get_color("font_color", "Label"), left);
} else {
//add arrow
diff --git a/editor/editor_path.h b/editor/editor_path.h
index 7b73e7ebb6..c79968c5e3 100644
--- a/editor/editor_path.h
+++ b/editor/editor_path.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index f8ed18bba4..86acfcc50e 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -32,55 +32,133 @@
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor_resource_preview.h"
+#include "main/main.h"
#include "plugins/canvas_item_editor_plugin.h"
#include "plugins/spatial_editor_plugin.h"
#include "scene/3d/camera.h"
#include "scene/gui/popup_menu.h"
+#include "servers/visual_server.h"
+Array EditorInterface::_make_mesh_previews(const Array &p_meshes, int p_preview_size) {
-void EditorPlugin::add_custom_type(const String &p_type, const String &p_base, const Ref<Script> &p_script, const Ref<Texture> &p_icon) {
+ Vector<Ref<Mesh> > meshes;
- EditorNode::get_editor_data().add_custom_type(p_type, p_base, p_script, p_icon);
-}
+ for (int i = 0; i < p_meshes.size(); i++) {
+ meshes.push_back(p_meshes[i]);
+ }
-void EditorPlugin::remove_custom_type(const String &p_type) {
+ Vector<Ref<Texture> > textures = make_mesh_previews(meshes, p_preview_size);
+ Array ret;
+ for (int i = 0; i < textures.size(); i++) {
+ ret.push_back(textures[i]);
+ }
- EditorNode::get_editor_data().remove_custom_type(p_type);
+ return ret;
}
-ToolButton *EditorPlugin::add_control_to_bottom_panel(Control *p_control, const String &p_title) {
+Vector<Ref<Texture> > EditorInterface::make_mesh_previews(const Vector<Ref<Mesh> > &p_meshes, int p_preview_size) {
- return EditorNode::get_singleton()->add_bottom_panel_item(p_title, p_control);
-}
+ int size = p_preview_size;
-void EditorPlugin::add_control_to_dock(DockSlot p_slot, Control *p_control) {
+ RID scenario = VS::get_singleton()->scenario_create();
- ERR_FAIL_NULL(p_control);
- EditorNode::get_singleton()->add_control_to_dock(EditorNode::DockSlot(p_slot), p_control);
-}
+ RID viewport = VS::get_singleton()->viewport_create();
+ VS::get_singleton()->viewport_set_update_mode(viewport, VS::VIEWPORT_UPDATE_ALWAYS);
+ VS::get_singleton()->viewport_set_vflip(viewport, true);
+ VS::get_singleton()->viewport_set_scenario(viewport, scenario);
+ VS::get_singleton()->viewport_set_size(viewport, size, size);
+ VS::get_singleton()->viewport_set_transparent_background(viewport, true);
+ VS::get_singleton()->viewport_set_active(viewport, true);
+ RID viewport_texture = VS::get_singleton()->viewport_get_texture(viewport);
-void EditorPlugin::remove_control_from_docks(Control *p_control) {
+ RID camera = VS::get_singleton()->camera_create();
+ VS::get_singleton()->viewport_attach_camera(viewport, camera);
+ VS::get_singleton()->camera_set_transform(camera, Transform(Basis(), Vector3(0, 0, 3)));
+ //VS::get_singleton()->camera_set_perspective(camera,45,0.1,10);
+ VS::get_singleton()->camera_set_orthogonal(camera, 1.0, 0.01, 1000.0);
- ERR_FAIL_NULL(p_control);
- EditorNode::get_singleton()->remove_control_from_dock(p_control);
-}
+ RID light = VS::get_singleton()->light_create(VS::LIGHT_DIRECTIONAL);
+ RID light_instance = VS::get_singleton()->instance_create2(light, scenario);
+ VS::get_singleton()->instance_set_transform(light_instance, Transform().looking_at(Vector3(-1, -1, -1), Vector3(0, 1, 0)));
-void EditorPlugin::remove_control_from_bottom_panel(Control *p_control) {
+ RID light2 = VS::get_singleton()->light_create(VS::LIGHT_DIRECTIONAL);
+ VS::get_singleton()->light_set_color(light2, Color(0.7, 0.7, 0.7));
+ //VS::get_singleton()->light_set_color(light2, VS::LIGHT_COLOR_SPECULAR, Color(0.0, 0.0, 0.0));
+ RID light_instance2 = VS::get_singleton()->instance_create2(light2, scenario);
- ERR_FAIL_NULL(p_control);
- EditorNode::get_singleton()->remove_bottom_panel_item(p_control);
+ VS::get_singleton()->instance_set_transform(light_instance2, Transform().looking_at(Vector3(0, 1, 0), Vector3(0, 0, 1)));
+
+ //sphere = VS::get_singleton()->mesh_create();
+ RID mesh_instance = VS::get_singleton()->instance_create();
+ VS::get_singleton()->instance_set_scenario(mesh_instance, scenario);
+
+ EditorProgress ep("mlib", TTR("Creating Mesh Previews"), p_meshes.size());
+
+ Vector<Ref<Texture> > textures;
+
+ for (int i = 0; i < p_meshes.size(); i++) {
+
+ Ref<Mesh> mesh = p_meshes[i];
+ if (!mesh.is_valid()) {
+ textures.push_back(Ref<Texture>());
+ continue;
+ }
+ Rect3 aabb = mesh->get_aabb();
+ print_line("aabb: " + aabb);
+ Vector3 ofs = aabb.position + aabb.size * 0.5;
+ aabb.position -= ofs;
+ Transform xform;
+ xform.basis = Basis().rotated(Vector3(0, 1, 0), -Math_PI * 0.25);
+ xform.basis = Basis().rotated(Vector3(1, 0, 0), Math_PI * 0.25) * xform.basis;
+ Rect3 rot_aabb = xform.xform(aabb);
+ print_line("rot_aabb: " + rot_aabb);
+ float m = MAX(rot_aabb.size.x, rot_aabb.size.y) * 0.5;
+ if (m == 0)
+ continue;
+ m = 1.0 / m;
+ m *= 0.5;
+ print_line("scale: " + rtos(m));
+ xform.basis.scale(Vector3(m, m, m));
+ xform.origin = -xform.basis.xform(ofs); //-ofs*m;
+ xform.origin.z -= rot_aabb.size.z * 2;
+ RID inst = VS::get_singleton()->instance_create2(mesh->get_rid(), scenario);
+ VS::get_singleton()->instance_set_transform(inst, xform);
+ ep.step(TTR("Thumbnail.."), i);
+ Main::iteration();
+ Main::iteration();
+ Ref<Image> img = VS::get_singleton()->texture_get_data(viewport_texture);
+ ERR_CONTINUE(!img.is_valid() || img->empty());
+ Ref<ImageTexture> it(memnew(ImageTexture));
+ it->create_from_image(img);
+
+ //print_line("loaded image, size: "+rtos(m)+" dist: "+rtos(dist)+" empty?"+itos(img.empty())+" w: "+itos(it->get_width())+" h: "+itos(it->get_height()));
+ VS::get_singleton()->free(inst);
+
+ textures.push_back(it);
+ }
+
+ VS::get_singleton()->free(mesh_instance);
+ VS::get_singleton()->free(viewport);
+ VS::get_singleton()->free(light);
+ VS::get_singleton()->free(light_instance);
+ VS::get_singleton()->free(light2);
+ VS::get_singleton()->free(light_instance2);
+ VS::get_singleton()->free(camera);
+ VS::get_singleton()->free(scenario);
+
+ return textures;
}
-Control *EditorPlugin::get_editor_viewport() {
+Control *EditorInterface::get_editor_viewport() {
return EditorNode::get_singleton()->get_viewport();
}
-void EditorPlugin::edit_resource(const Ref<Resource> &p_resource) {
+void EditorInterface::edit_resource(const Ref<Resource> &p_resource) {
EditorNode::get_singleton()->edit_resource(p_resource);
}
-void EditorPlugin::open_scene_from_path(const String &scene_path) {
+void EditorInterface::open_scene_from_path(const String &scene_path) {
if (EditorNode::get_singleton()->is_changing_scene()) {
return;
@@ -89,7 +167,7 @@ void EditorPlugin::open_scene_from_path(const String &scene_path) {
EditorNode::get_singleton()->open_request(scene_path);
}
-void EditorPlugin::reload_scene_from_path(const String &scene_path) {
+void EditorInterface::reload_scene_from_path(const String &scene_path) {
if (EditorNode::get_singleton()->is_changing_scene()) {
return;
@@ -98,6 +176,130 @@ void EditorPlugin::reload_scene_from_path(const String &scene_path) {
EditorNode::get_singleton()->reload_scene(scene_path);
}
+Node *EditorInterface::get_edited_scene_root() {
+ return EditorNode::get_singleton()->get_edited_scene();
+}
+
+Array EditorInterface::get_open_scenes() const {
+
+ Array ret;
+ Vector<EditorData::EditedScene> scenes = EditorNode::get_singleton()->get_editor_data().get_edited_scenes();
+
+ int scns_amount = scenes.size();
+ for (int idx_scn = 0; idx_scn < scns_amount; idx_scn++) {
+ if (scenes[idx_scn].root == NULL)
+ continue;
+ ret.push_back(scenes[idx_scn].root->get_filename());
+ }
+ return ret;
+}
+
+ScriptEditor *EditorInterface::get_script_editor() {
+ return ScriptEditor::get_singleton();
+}
+
+void EditorInterface::inspect_object(Object *p_obj, const String &p_for_property) {
+
+ EditorNode::get_singleton()->push_item(p_obj, p_for_property);
+}
+
+EditorFileSystem *EditorInterface::get_resource_file_system() {
+ return EditorFileSystem::get_singleton();
+}
+
+EditorSelection *EditorInterface::get_selection() {
+ return EditorNode::get_singleton()->get_editor_selection();
+}
+
+EditorSettings *EditorInterface::get_editor_settings() {
+ return EditorSettings::get_singleton();
+}
+
+EditorResourcePreview *EditorInterface::get_resource_previewer() {
+ return EditorResourcePreview::get_singleton();
+}
+
+Control *EditorInterface::get_base_control() {
+
+ return EditorNode::get_singleton()->get_gui_base();
+}
+
+Error EditorInterface::save_scene() {
+ if (!get_edited_scene_root())
+ return ERR_CANT_CREATE;
+ if (get_edited_scene_root()->get_filename() == String())
+ return ERR_CANT_CREATE;
+
+ save_scene_as(get_edited_scene_root()->get_filename());
+ return OK;
+}
+
+void EditorInterface::save_scene_as(const String &p_scene, bool p_with_preview) {
+
+ EditorNode::get_singleton()->save_scene_to_path(p_scene, p_with_preview);
+}
+
+EditorInterface *EditorInterface::singleton = NULL;
+
+void EditorInterface::_bind_methods() {
+
+ ClassDB::bind_method(D_METHOD("inspect_object", "object", "for_property"), &EditorInterface::inspect_object, DEFVAL(String()));
+ ClassDB::bind_method(D_METHOD("get_selection"), &EditorInterface::get_selection);
+ ClassDB::bind_method(D_METHOD("get_editor_settings"), &EditorInterface::get_editor_settings);
+ ClassDB::bind_method(D_METHOD("get_script_editor"), &EditorInterface::get_script_editor);
+ ClassDB::bind_method(D_METHOD("get_base_control"), &EditorInterface::get_base_control);
+ ClassDB::bind_method(D_METHOD("edit_resource", "resource"), &EditorInterface::edit_resource);
+ ClassDB::bind_method(D_METHOD("open_scene_from_path", "scene_filepath"), &EditorInterface::open_scene_from_path);
+ ClassDB::bind_method(D_METHOD("reload_scene_from_path", "scene_filepath"), &EditorInterface::reload_scene_from_path);
+ ClassDB::bind_method(D_METHOD("get_open_scenes"), &EditorInterface::get_open_scenes);
+ ClassDB::bind_method(D_METHOD("get_edited_scene_root"), &EditorInterface::get_edited_scene_root);
+ ClassDB::bind_method(D_METHOD("get_resource_previewer"), &EditorInterface::get_resource_previewer);
+ ClassDB::bind_method(D_METHOD("get_resource_filesystem"), &EditorInterface::get_resource_file_system);
+ ClassDB::bind_method(D_METHOD("get_editor_viewport"), &EditorInterface::get_editor_viewport);
+ ClassDB::bind_method(D_METHOD("make_mesh_previews"), &EditorInterface::_make_mesh_previews);
+
+ ClassDB::bind_method(D_METHOD("save_scene"), &EditorInterface::save_scene);
+ ClassDB::bind_method(D_METHOD("save_scene_as", "path", "with_preview"), &EditorInterface::save_scene_as, DEFVAL(true));
+}
+
+EditorInterface::EditorInterface() {
+ singleton = this;
+}
+
+///////////////////////////////////////////
+void EditorPlugin::add_custom_type(const String &p_type, const String &p_base, const Ref<Script> &p_script, const Ref<Texture> &p_icon) {
+
+ EditorNode::get_editor_data().add_custom_type(p_type, p_base, p_script, p_icon);
+}
+
+void EditorPlugin::remove_custom_type(const String &p_type) {
+
+ EditorNode::get_editor_data().remove_custom_type(p_type);
+}
+
+ToolButton *EditorPlugin::add_control_to_bottom_panel(Control *p_control, const String &p_title) {
+
+ return EditorNode::get_singleton()->add_bottom_panel_item(p_title, p_control);
+}
+
+void EditorPlugin::add_control_to_dock(DockSlot p_slot, Control *p_control) {
+
+ ERR_FAIL_NULL(p_control);
+ EditorNode::get_singleton()->add_control_to_dock(EditorNode::DockSlot(p_slot), p_control);
+}
+
+void EditorPlugin::remove_control_from_docks(Control *p_control) {
+
+ ERR_FAIL_NULL(p_control);
+ EditorNode::get_singleton()->remove_control_from_dock(p_control);
+}
+
+void EditorPlugin::remove_control_from_bottom_panel(Control *p_control) {
+
+ ERR_FAIL_NULL(p_control);
+ EditorNode::get_singleton()->remove_bottom_panel_item(p_control);
+}
+
void EditorPlugin::add_control_to_container(CustomControlContainer p_location, Control *p_control) {
switch (p_location) {
@@ -155,7 +357,7 @@ void EditorPlugin::add_tool_menu_item(const String &p_name, Object *p_handler, c
void EditorPlugin::add_tool_submenu_item(const String &p_name, Object *p_submenu) {
ERR_FAIL_NULL(p_submenu);
- PopupMenu *submenu = p_submenu->cast_to<PopupMenu>();
+ PopupMenu *submenu = Object::cast_to<PopupMenu>(p_submenu);
ERR_FAIL_NULL(submenu);
//EditorNode::get_singleton()->add_tool_submenu_item(p_name, submenu);
}
@@ -171,28 +373,6 @@ void EditorPlugin::set_input_event_forwarding_always_enabled() {
always_input_forwarding_list->add_plugin(this);
}
-Node *EditorPlugin::get_edited_scene_root() {
- return EditorNode::get_singleton()->get_edited_scene();
-}
-
-Array EditorPlugin::get_open_scenes() const {
-
- Array ret;
- Vector<EditorData::EditedScene> scenes = EditorNode::get_singleton()->get_editor_data().get_edited_scenes();
-
- int scns_amount = scenes.size();
- for (int idx_scn = 0; idx_scn < scns_amount; idx_scn++) {
- if (scenes[idx_scn].root == NULL)
- continue;
- ret.push_back(scenes[idx_scn].root->get_filename());
- }
- return ret;
-}
-
-ScriptEditor *EditorPlugin::get_script_editor() {
- return ScriptEditor::get_singleton();
-}
-
void EditorPlugin::notify_scene_changed(const Node *scn_root) {
if (scn_root == NULL) return;
emit_signal("scene_changed", scn_root);
@@ -369,23 +549,6 @@ void EditorPlugin::queue_save_layout() const {
EditorNode::get_singleton()->save_layout();
}
-EditorSelection *EditorPlugin::get_selection() {
- return EditorNode::get_singleton()->get_editor_selection();
-}
-
-EditorSettings *EditorPlugin::get_editor_settings() {
- return EditorSettings::get_singleton();
-}
-
-EditorResourcePreview *EditorPlugin::get_resource_previewer() {
- return EditorResourcePreview::get_singleton();
-}
-
-Control *EditorPlugin::get_base_control() {
-
- return EditorNode::get_singleton()->get_gui_base();
-}
-
void EditorPlugin::make_bottom_panel_item_visible(Control *p_item) {
EditorNode::get_singleton()->make_bottom_panel_item_visible(p_item);
@@ -396,13 +559,8 @@ void EditorPlugin::hide_bottom_panel() {
EditorNode::get_singleton()->hide_bottom_panel();
}
-void EditorPlugin::inspect_object(Object *p_obj, const String &p_for_property) {
-
- EditorNode::get_singleton()->push_item(p_obj, p_for_property);
-}
-
-EditorFileSystem *EditorPlugin::get_resource_file_system() {
- return EditorFileSystem::get_singleton();
+EditorInterface *EditorPlugin::get_editor_interface() {
+ return EditorInterface::get_singleton();
}
void EditorPlugin::_bind_methods() {
@@ -417,36 +575,24 @@ void EditorPlugin::_bind_methods() {
//ClassDB::bind_method(D_METHOD("remove_tool_menu_item", "name"),&EditorPlugin::remove_tool_menu_item);
ClassDB::bind_method(D_METHOD("add_custom_type", "type", "base", "script", "icon"), &EditorPlugin::add_custom_type);
ClassDB::bind_method(D_METHOD("remove_custom_type", "type"), &EditorPlugin::remove_custom_type);
- ClassDB::bind_method(D_METHOD("get_editor_viewport"), &EditorPlugin::get_editor_viewport);
- ClassDB::bind_method(D_METHOD("get_resource_previewer"), &EditorPlugin::get_resource_previewer);
- ClassDB::bind_method(D_METHOD("get_resource_filesystem"), &EditorPlugin::get_resource_file_system);
-
- ClassDB::bind_method(D_METHOD("inspect_object", "object", "for_property"), &EditorPlugin::inspect_object, DEFVAL(String()));
ClassDB::bind_method(D_METHOD("update_canvas"), &EditorPlugin::update_canvas);
ClassDB::bind_method(D_METHOD("make_bottom_panel_item_visible", "item"), &EditorPlugin::make_bottom_panel_item_visible);
ClassDB::bind_method(D_METHOD("hide_bottom_panel"), &EditorPlugin::hide_bottom_panel);
- ClassDB::bind_method(D_METHOD("get_base_control"), &EditorPlugin::get_base_control);
ClassDB::bind_method(D_METHOD("get_undo_redo"), &EditorPlugin::_get_undo_redo);
- ClassDB::bind_method(D_METHOD("get_selection"), &EditorPlugin::get_selection);
- ClassDB::bind_method(D_METHOD("get_editor_settings"), &EditorPlugin::get_editor_settings);
- ClassDB::bind_method(D_METHOD("get_script_editor"), &EditorPlugin::get_script_editor);
ClassDB::bind_method(D_METHOD("queue_save_layout"), &EditorPlugin::queue_save_layout);
- ClassDB::bind_method(D_METHOD("edit_resource", "resource"), &EditorPlugin::edit_resource);
- ClassDB::bind_method(D_METHOD("open_scene_from_path", "scene_filepath"), &EditorPlugin::open_scene_from_path);
- ClassDB::bind_method(D_METHOD("reload_scene_from_path", "scene_filepath"), &EditorPlugin::reload_scene_from_path);
ClassDB::bind_method(D_METHOD("add_import_plugin", "importer"), &EditorPlugin::add_import_plugin);
ClassDB::bind_method(D_METHOD("remove_import_plugin", "importer"), &EditorPlugin::remove_import_plugin);
ClassDB::bind_method(D_METHOD("set_input_event_forwarding_always_enabled"), &EditorPlugin::set_input_event_forwarding_always_enabled);
- ClassDB::bind_method(D_METHOD("get_open_scenes"), &EditorPlugin::get_open_scenes);
- ClassDB::bind_method(D_METHOD("get_edited_scene_root"), &EditorPlugin::get_edited_scene_root);
+
+ ClassDB::bind_method(D_METHOD("get_editor_interface"), &EditorPlugin::get_editor_interface);
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "forward_canvas_gui_input", PropertyInfo(Variant::TRANSFORM2D, "canvas_xform"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
- ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_draw_over_canvas", PropertyInfo(Variant::TRANSFORM2D, "canvas_xform"), PropertyInfo(Variant::OBJECT, "canvas:Control")));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo("forward_draw_over_canvas", PropertyInfo(Variant::TRANSFORM2D, "canvas_xform"), PropertyInfo(Variant::OBJECT, "canvas", PROPERTY_HINT_RESOURCE_TYPE, "Control")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "forward_spatial_gui_input", PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera"), PropertyInfo(Variant::OBJECT, "event", PROPERTY_HINT_RESOURCE_TYPE, "InputEvent")));
- MethodInfo gizmo = MethodInfo(Variant::OBJECT, "create_spatial_gizmo", PropertyInfo(Variant::OBJECT, "for_spatial:Spatial"));
+ MethodInfo gizmo = MethodInfo(Variant::OBJECT, "create_spatial_gizmo", PropertyInfo(Variant::OBJECT, "for_spatial", PROPERTY_HINT_RESOURCE_TYPE, "Spatial"));
gizmo.return_val.hint = PROPERTY_HINT_RESOURCE_TYPE;
gizmo.return_val.hint_string = "EditorSpatialGizmo";
ClassDB::add_virtual_method(get_class_static(), gizmo);
@@ -464,9 +610,9 @@ void EditorPlugin::_bind_methods() {
ClassDB::add_virtual_method(get_class_static(), MethodInfo("set_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile")));
ClassDB::add_virtual_method(get_class_static(), MethodInfo("get_window_layout", PropertyInfo(Variant::OBJECT, "layout", PROPERTY_HINT_RESOURCE_TYPE, "ConfigFile")));
- ADD_SIGNAL(MethodInfo("scene_changed", PropertyInfo(Variant::OBJECT, "scene_root:Node")));
- ADD_SIGNAL(MethodInfo("scene_closed", PropertyInfo(Variant::STRING, "filepath:String")));
- ADD_SIGNAL(MethodInfo("main_screen_changed", PropertyInfo(Variant::STRING, "screen_name:String")));
+ ADD_SIGNAL(MethodInfo("scene_changed", PropertyInfo(Variant::OBJECT, "scene_root", PROPERTY_HINT_RESOURCE_TYPE, "Node")));
+ ADD_SIGNAL(MethodInfo("scene_closed", PropertyInfo(Variant::STRING, "filepath")));
+ ADD_SIGNAL(MethodInfo("main_screen_changed", PropertyInfo(Variant::STRING, "screen_name")));
BIND_ENUM_CONSTANT(CONTAINER_TOOLBAR);
BIND_ENUM_CONSTANT(CONTAINER_SPATIAL_EDITOR_MENU);
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index 77c5501b25..99328f8149 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -55,6 +55,44 @@ class EditorFileSystem;
class EditorToolAddons;
class ScriptEditor;
+class EditorInterface : public Node {
+ GDCLASS(EditorInterface, Node)
+protected:
+ static void _bind_methods();
+ static EditorInterface *singleton;
+
+ Array _make_mesh_previews(const Array &p_meshes, int p_preview_size);
+
+public:
+ static EditorInterface *get_singleton() { return singleton; }
+
+ Control *get_editor_viewport();
+ void edit_resource(const Ref<Resource> &p_resource);
+ void open_scene_from_path(const String &scene_path);
+ void reload_scene_from_path(const String &scene_path);
+
+ Node *get_edited_scene_root();
+ Array get_open_scenes() const;
+ ScriptEditor *get_script_editor();
+
+ void inspect_object(Object *p_obj, const String &p_for_property = String());
+
+ EditorSelection *get_selection();
+ //EditorImportExport *get_import_export();
+ EditorSettings *get_editor_settings();
+ EditorResourcePreview *get_resource_previewer();
+ EditorFileSystem *get_resource_file_system();
+
+ Control *get_base_control();
+
+ Error save_scene();
+ void save_scene_as(const String &p_scene, bool p_with_preview = true);
+
+ Vector<Ref<Texture> > make_mesh_previews(const Vector<Ref<Mesh> > &p_meshes, int p_preview_size);
+
+ EditorInterface();
+};
+
class EditorPlugin : public Node {
GDCLASS(EditorPlugin, Node);
@@ -105,10 +143,6 @@ public:
void add_control_to_dock(DockSlot p_slot, Control *p_control);
void remove_control_from_docks(Control *p_control);
void remove_control_from_bottom_panel(Control *p_control);
- Control *get_editor_viewport();
- void edit_resource(const Ref<Resource> &p_resource);
- void open_scene_from_path(const String &scene_path);
- void reload_scene_from_path(const String &scene_path);
void add_tool_menu_item(const String &p_name, Object *p_handler, const String &p_callback, const Variant &p_ud = Variant());
void add_tool_submenu_item(const String &p_name, Object *p_submenu);
@@ -117,10 +151,6 @@ public:
void set_input_event_forwarding_always_enabled();
bool is_input_event_forwarding_always_enabled() { return input_event_forwarding_always_enabled; }
- Node *get_edited_scene_root();
- Array get_open_scenes() const;
- ScriptEditor *get_script_editor();
-
void notify_main_screen_changed(const String &screen_name);
void notify_scene_changed(const Node *scn_root);
void notify_scene_closed(const String &scene_filepath);
@@ -146,23 +176,15 @@ public:
virtual void get_window_layout(Ref<ConfigFile> p_layout);
virtual void edited_scene_changed() {} // if changes are pending in editor, apply them
- void update_canvas();
+ EditorInterface *get_editor_interface();
- virtual void inspect_object(Object *p_obj, const String &p_for_property = String());
+ void update_canvas();
void queue_save_layout() const;
- Control *get_base_control();
-
void make_bottom_panel_item_visible(Control *p_item);
void hide_bottom_panel();
- EditorSelection *get_selection();
- //EditorImportExport *get_import_export();
- EditorSettings *get_editor_settings();
- EditorResourcePreview *get_resource_previewer();
- EditorFileSystem *get_resource_file_system();
-
virtual void restore_global_state();
virtual void save_global_state();
diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp
index 712a3ac001..6732d7048f 100644
--- a/editor/editor_plugin_settings.cpp
+++ b/editor/editor_plugin_settings.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_plugin_settings.h b/editor/editor_plugin_settings.h
index 472be4c007..f24b2b8781 100644
--- a/editor/editor_plugin_settings.h
+++ b/editor/editor_plugin_settings.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp
index 78bc99caae..6b972262b9 100644
--- a/editor/editor_profiler.cpp
+++ b/editor/editor_profiler.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_profiler.h b/editor/editor_profiler.h
index 4998d45a89..e2d781f125 100644
--- a/editor/editor_profiler.h
+++ b/editor/editor_profiler.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_reimport_dialog.cpp b/editor/editor_reimport_dialog.cpp
deleted file mode 100644
index 4b71f7046f..0000000000
--- a/editor/editor_reimport_dialog.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-/*************************************************************************/
-/* editor_reimport_dialog.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "editor_reimport_dialog.h"
-
-#include "editor_file_system.h"
-#include "editor_node.h"
-
-#if 0
-void EditorReImportDialog::popup_reimport() {
-
- if (EditorFileSystem::get_singleton()->is_scanning()) {
- error->set_text(TTR("Please wait for scan to complete."));
- error->popup_centered_minsize();
- return;
- }
-
- tree->clear();
- items.clear();
- List<String> ril;
- EditorFileSystem::get_singleton()->get_changed_sources(&ril);
-
- scene_must_save=false;
-
-
- TreeItem *root = tree->create_item();
- for(List<String>::Element *E=ril.front();E;E=E->next()) {
-
- TreeItem *item = tree->create_item(root);
- item->set_cell_mode(0,TreeItem::CELL_MODE_CHECK);
- item->set_metadata(0,E->get());
- item->set_text(0,E->get().replace_first("res://",""));
- item->set_tooltip(0,E->get());
- item->set_checked(0,true);
- item->set_editable(0,true);
- items.push_back(item);
-
- String name = E->get();
-
- if (EditorFileSystem::get_singleton()->get_file_type(name)=="PackedScene" && EditorNode::get_singleton()->is_scene_in_use(name)) {
-
- scene_must_save=true;
- }
- }
-
-
- if (scene_must_save) {
- if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->get_filename()=="") {
-
- error->set_text(TTR("Current scene must be saved to re-import."));
- error->popup_centered_minsize();
- get_ok()->set_text(TTR("Re-Import"));
- get_ok()->set_disabled(true);
- return;
-
- }
- get_ok()->set_disabled(false);
- get_ok()->set_text(TTR("Save & Re-Import"));
- } else {
- get_ok()->set_text(TTR("Re-Import"));
- get_ok()->set_disabled(false);
- }
-
- popup_centered(Size2(600,400));
-
-
-}
-
-
-void EditorReImportDialog::ok_pressed() {
-
- if (EditorFileSystem::get_singleton()->is_scanning()) {
- error->set_text(TTR("Please wait for scan to complete."));
- error->popup_centered_minsize();
- return;
- }
-
-
-
- EditorProgress ep("reimport",TTR("Re-Importing"),items.size());
- String reload_fname;
- if (scene_must_save && EditorNode::get_singleton()->get_edited_scene()) {
- reload_fname = EditorNode::get_singleton()->get_edited_scene()->get_filename();
- EditorNode::get_singleton()->save_scene(reload_fname);
- EditorNode::get_singleton()->clear_scene();
- }
-
- for(int i=0;i<items.size();i++) {
-
- String it = items[i]->get_metadata(0);
- ep.step(items[i]->get_text(0),i);
- print_line("reload import from: "+it);
- Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(it);
- ERR_CONTINUE(rimd.is_null());
- String editor = rimd->get_editor();
- Ref<EditorImportPlugin> eip = EditorImportExport::get_singleton()->get_import_plugin_by_name(editor);
- ERR_CONTINUE(eip.is_null());
- Error err = eip->import(it,rimd);
- if (err!=OK) {
- EditorNode::add_io_error("Error Importing:\n "+it);
- }
-
- }
- if (reload_fname!="") {
- EditorNode::get_singleton()->load_scene(reload_fname);
- }
-
- EditorFileSystem::get_singleton()->scan_sources();
-}
-
-EditorReImportDialog::EditorReImportDialog() {
-
- tree = memnew( Tree );
- add_child(tree);
- tree->set_hide_root(true);
- //set_child_rect(tree);
- set_title(TTR("Re-Import Changed Resources"));
- error = memnew( AcceptDialog);
- add_child(error);
- scene_must_save=false;
-
-}
-#endif
diff --git a/editor/editor_reimport_dialog.h b/editor/editor_reimport_dialog.h
deleted file mode 100644
index b067630ded..0000000000
--- a/editor/editor_reimport_dialog.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*************************************************************************/
-/* editor_reimport_dialog.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef EDITOR_REIMPORT_DIALOG_H
-#define EDITOR_REIMPORT_DIALOG_H
-
-#if 0
-#include "scene/gui/dialogs.h"
-#include "scene/gui/tree.h"
-
-class EditorReImportDialog : public ConfirmationDialog {
-
- GDCLASS(EditorReImportDialog,ConfirmationDialog);
-
- Tree *tree;
- Vector<TreeItem*> items;
- AcceptDialog *error;
- bool scene_must_save;
-
- void ok_pressed();
-public:
-
- void popup_reimport();
- EditorReImportDialog();
-};
-
-#endif // EDITOR_REIMPORT_DIALOG_H
-#endif
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index dcfe68b286..437ad5ac3f 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -69,8 +69,8 @@ Ref<Texture> EditorResourcePreviewGenerator::generate_from_path(const String &p_
void EditorResourcePreviewGenerator::_bind_methods() {
ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::BOOL, "handles", PropertyInfo(Variant::STRING, "type")));
- ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::OBJECT, "generate:Texture", PropertyInfo(Variant::OBJECT, "from", PROPERTY_HINT_RESOURCE_TYPE, "Resource")));
- ClassDB::add_virtual_method(get_class_static(), MethodInfo(Variant::OBJECT, "generate_from_path:Texture", PropertyInfo(Variant::STRING, "path", PROPERTY_HINT_FILE)));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(CLASS_INFO(Texture), "generate", PropertyInfo(Variant::OBJECT, "from", PROPERTY_HINT_RESOURCE_TYPE, "Resource")));
+ ClassDB::add_virtual_method(get_class_static(), MethodInfo(CLASS_INFO(Texture), "generate_from_path", PropertyInfo(Variant::STRING, "path", PROPERTY_HINT_FILE)));
}
EditorResourcePreviewGenerator::EditorResourcePreviewGenerator() {
@@ -180,11 +180,13 @@ void EditorResourcePreview::_thread() {
if (cache.has(item.path)) {
//already has it because someone loaded it, just let it know it's ready
+ String path = item.path;
if (item.resource.is_valid()) {
- item.path += ":" + itos(cache[item.path].last_hash); //keep last hash (see description of what this is in condition below)
+ path += ":" + itos(cache[item.path].last_hash); //keep last hash (see description of what this is in condition below)
}
- _preview_ready(item.path, cache[item.path].preview, item.id, item.function, item.userdata);
+ print_line("cached: " + item.path);
+ _preview_ready(path, cache[item.path].preview, item.id, item.function, item.userdata);
preview_mutex->unlock();
} else {
@@ -199,12 +201,16 @@ void EditorResourcePreview::_thread() {
if (item.resource.is_valid()) {
+ print_line("generated: " + item.path);
+
texture = _generate_preview(item, String());
//adding hash to the end of path (should be ID:<objid>:<hash>) because of 5 argument limit to call_deferred
_preview_ready(item.path + ":" + itos(item.resource->hash_edited_version()), texture, item.id, item.function, item.userdata);
} else {
+ print_line("from file: " + item.path);
+
String temp_path = EditorSettings::get_singleton()->get_settings_path().plus_file("tmp");
String cache_base = ProjectSettings::get_singleton()->globalize_path(item.path).md5_text();
cache_base = temp_path.plus_file("resthumb-" + cache_base);
diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h
index cedd571194..60eaee9c5e 100644
--- a/editor/editor_resource_preview.h
+++ b/editor/editor_resource_preview.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp
index 9a0731eb55..e377fa1a8e 100644
--- a/editor/editor_run.cpp
+++ b/editor/editor_run.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_run.h b/editor/editor_run.h
index aa698ffad1..3745a76ea3 100644
--- a/editor/editor_run.h
+++ b/editor/editor_run.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp
index 52b7e6992d..95700915d5 100644
--- a/editor/editor_run_native.cpp
+++ b/editor/editor_run_native.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -80,7 +80,7 @@ void EditorRunNative::_notification(int p_what) {
} else {
mb->get_popup()->clear();
mb->show();
- mb->set_tooltip("Select device from the list");
+ mb->set_tooltip(TTR("Select device from the list"));
for (int i = 0; i < dc; i++) {
mb->get_popup()->add_icon_item(get_icon("Play", "EditorIcons"), eep->get_device_name(i));
mb->get_popup()->set_item_tooltip(mb->get_popup()->get_item_count() - 1, eep->get_device_info(i).strip_edges());
@@ -118,7 +118,7 @@ void EditorRunNative::_run_native(int p_idx, int p_platform) {
}
if (preset.is_null()) {
- EditorNode::get_singleton()->show_warning("No runnable export preset found for this platform.\nPlease add a runnable preset in the export menu.");
+ EditorNode::get_singleton()->show_warning(TTR("No runnable export preset found for this platform.\nPlease add a runnable preset in the export menu."));
return;
}
diff --git a/editor/editor_run_native.h b/editor/editor_run_native.h
index 9dcfd88eb8..de0cec7f34 100644
--- a/editor/editor_run_native.h
+++ b/editor/editor_run_native.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_run_script.cpp b/editor/editor_run_script.cpp
index 8bd1b8f4fd..87eba78a3e 100644
--- a/editor/editor_run_script.cpp
+++ b/editor/editor_run_script.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -46,6 +46,11 @@ void EditorScript::add_root_node(Node *p_node) {
//editor->set_edited_scene(p_node);
}
+EditorInterface *EditorScript::get_editor_interface() {
+
+ return EditorInterface::get_singleton();
+}
+
Node *EditorScript::get_scene() {
if (!editor) {
@@ -83,6 +88,7 @@ void EditorScript::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_root_node", "node"), &EditorScript::add_root_node);
ClassDB::bind_method(D_METHOD("get_scene"), &EditorScript::get_scene);
+ ClassDB::bind_method(D_METHOD("get_editor_interface"), &EditorScript::get_editor_interface);
BIND_VMETHOD(MethodInfo("_run"));
}
diff --git a/editor/editor_run_script.h b/editor/editor_run_script.h
index 2c3b4b85ce..52905ccc86 100644
--- a/editor/editor_run_script.h
+++ b/editor/editor_run_script.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -30,8 +30,8 @@
#ifndef EDITOR_RUN_SCRIPT_H
#define EDITOR_RUN_SCRIPT_H
+#include "editor_plugin.h"
#include "reference.h"
-
class EditorNode;
class EditorScript : public Reference {
@@ -45,7 +45,7 @@ protected:
public:
void add_root_node(Node *p_node);
Node *get_scene();
-
+ EditorInterface *get_editor_interface();
virtual void _run();
void set_editor(EditorNode *p_editor);
diff --git a/editor/editor_scale.cpp b/editor/editor_scale.cpp
index 1238cbb405..6b4d6192f5 100644
--- a/editor/editor_scale.cpp
+++ b/editor/editor_scale.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_scale.h b/editor/editor_scale.h
index 953be2ef81..a47539dc31 100644
--- a/editor/editor_scale.h
+++ b/editor/editor_scale.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 358d575764..9c9eef848a 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -29,23 +29,23 @@
/*************************************************************************/
#include "editor_settings.h"
-#include "editor_node.h"
-#include "io/compression.h"
-#include "io/config_file.h"
-#include "io/file_access_memory.h"
-#include "io/resource_loader.h"
-#include "io/resource_saver.h"
-#include "io/translation_loader_po.h"
-#include "os/dir_access.h"
-#include "os/file_access.h"
-#include "os/keyboard.h"
-#include "os/os.h"
-#include "project_settings.h"
+#include "core/io/compression.h"
+#include "core/io/config_file.h"
+#include "core/io/file_access_memory.h"
+#include "core/io/resource_loader.h"
+#include "core/io/resource_saver.h"
+#include "core/io/translation_loader_po.h"
+#include "core/os/dir_access.h"
+#include "core/os/file_access.h"
+#include "core/os/keyboard.h"
+#include "core/os/os.h"
+#include "core/project_settings.h"
+#include "core/version.h"
+#include "editor/editor_node.h"
+#include "editor/translations.gen.h"
#include "scene/main/node.h"
#include "scene/main/scene_tree.h"
#include "scene/main/viewport.h"
-#include "translations.gen.h"
-#include "version.h"
Ref<EditorSettings> EditorSettings::singleton = NULL;
@@ -93,6 +93,7 @@ bool EditorSettings::_set(const StringName &p_name, const Variant &p_value) {
emit_signal("settings_changed");
return true;
}
+
bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const {
_THREAD_SAFE_METHOD_
@@ -216,6 +217,12 @@ Variant _EDITOR_DEF(const String &p_var, const Variant &p_default) {
return p_default;
}
+Variant _EDITOR_GET(const String &p_var) {
+
+ ERR_FAIL_COND_V(!EditorSettings::get_singleton()->has(p_var), Variant())
+ return EditorSettings::get_singleton()->get(p_var);
+}
+
static Dictionary _get_builtin_script_templates() {
Dictionary templates;
@@ -246,13 +253,14 @@ static void _create_script_templates(const String &p_path) {
dir->change_dir(p_path);
for (int i = 0; i < keys.size(); i++) {
if (!dir->file_exists(keys[i])) {
- file->reopen(p_path.plus_file((String)keys[i]), FileAccess::WRITE);
- ERR_FAIL_COND(!file);
+ Error err = file->reopen(p_path.plus_file((String)keys[i]), FileAccess::WRITE);
+ ERR_FAIL_COND(err != OK);
file->store_string(templates[keys[i]]);
file->close();
}
}
+ memdelete(dir);
memdelete(file);
}
@@ -266,7 +274,6 @@ void EditorSettings::create() {
String config_path;
String config_dir;
- //String config_file="editor_settings.xml";
Ref<ConfigFile> extra_config = memnew(ConfigFile);
String exe_path = OS::get_singleton()->get_executable_path().get_base_dir();
@@ -280,6 +287,7 @@ void EditorSettings::create() {
self_contained = true;
extra_config->load(exe_path + "/_sc_");
}
+ memdelete(d);
if (self_contained) {
// editor is self contained
@@ -562,7 +570,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("interface/quit_confirmation", true);
set("interface/theme/preset", 0);
- hints["interface/theme/preset"] = PropertyInfo(Variant::INT, "interface/theme/preset", PROPERTY_HINT_ENUM, "Default,Grey,Godot 2,Arc,Custom", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/theme/preset"] = PropertyInfo(Variant::INT, "interface/theme/preset", PROPERTY_HINT_ENUM, "Default,Grey,Godot 2,Arc,Light,Custom", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ set("interface/theme/icon_and_font_color", 0);
+ hints["interface/theme/icon_and_font_color"] = PropertyInfo(Variant::INT, "interface/theme/icon_and_font_color", PROPERTY_HINT_ENUM, "Auto,Dark,Light", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
set("interface/theme/base_color", Color::html("#323b4f"));
hints["interface/theme/highlight_color"] = PropertyInfo(Variant::COLOR, "interface/theme/highlight_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
set("interface/theme/highlight_color", Color::html("#699ce8"));
@@ -583,7 +593,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("filesystem/directories/autoscan_project_path", "");
hints["filesystem/directories/autoscan_project_path"] = PropertyInfo(Variant::STRING, "filesystem/directories/autoscan_project_path", PROPERTY_HINT_GLOBAL_DIR);
- set("filesystem/directories/default_project_path", "");
+ set("filesystem/directories/default_project_path", OS::get_singleton()->has_environment("HOME") ? OS::get_singleton()->get_environment("HOME") : OS::get_singleton()->get_system_dir(OS::SYSTEM_DIR_DOCUMENTS));
hints["filesystem/directories/default_project_path"] = PropertyInfo(Variant::STRING, "filesystem/directories/default_project_path", PROPERTY_HINT_GLOBAL_DIR);
set("filesystem/directories/default_project_export_path", "");
hints["global/default_project_export_path"] = PropertyInfo(Variant::STRING, "global/default_project_export_path", PROPERTY_HINT_GLOBAL_DIR);
@@ -606,6 +616,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
hints["text_editor/indent/type"] = PropertyInfo(Variant::INT, "text_editor/indent/type", PROPERTY_HINT_ENUM, "Tabs,Spaces");
set("text_editor/indent/size", 4);
hints["text_editor/indent/size"] = PropertyInfo(Variant::INT, "text_editor/indent/size", PROPERTY_HINT_RANGE, "1, 64, 1"); // size of 0 crashes.
+ set("text_editor/indent/auto_indent", true);
set("text_editor/indent/convert_indent_on_save", false);
set("text_editor/indent/draw_tabs", true);
@@ -638,7 +649,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("text_editor/files/maximum_recent_files", 20);
hints["text_editor/files/maximum_recent_files"] = PropertyInfo(Variant::INT, "text_editor/files/maximum_recent_files", PROPERTY_HINT_RANGE, "1, 200, 0");
- //set("docks/scene_tree/display_old_action_buttons",false);
set("docks/scene_tree/start_create_dialog_fully_expanded", false);
set("docks/scene_tree/draw_relationship_lines", false);
set("docks/scene_tree/relationship_line_color", Color::html("464646"));
@@ -667,6 +677,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("editors/3d/warped_mouse_panning", true);
set("editors/3d/orbit_sensitivity", 0.4);
+ set("editors/3d/freelook_inertia", 3);
set("editors/3d/freelook_base_speed", 1);
@@ -686,6 +697,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("editors/2d/pan_speed", 20);
set("editors/poly_editor/point_grab_radius", 8);
+ set("editors/poly_editor/show_previous_outline", true);
set("run/window_placement/rect", 1);
hints["run/window_placement/rect"] = PropertyInfo(Variant::INT, "run/window_placement/rect", PROPERTY_HINT_ENUM, "Top Left,Centered,Custom Position,Force Maximized,Force Fullscreen");
@@ -699,8 +711,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("filesystem/on_save/compress_binary_resources", true);
set("filesystem/on_save/save_modified_external_resources", true);
- //set("filesystem/on_save/save_paths_as_relative",false);
- //set("filesystem/on_save/save_paths_without_extension",false);
set("text_editor/tools/create_signal_callbacks", true);
@@ -804,10 +814,7 @@ void EditorSettings::notify_changes() {
_THREAD_SAFE_METHOD_
- SceneTree *sml = NULL;
-
- if (OS::get_singleton()->get_main_loop())
- sml = OS::get_singleton()->get_main_loop()->cast_to<SceneTree>();
+ SceneTree *sml = Object::cast_to<SceneTree>(OS::get_singleton()->get_main_loop());
if (!sml) {
return;
@@ -1148,7 +1155,6 @@ void EditorSettings::_bind_methods() {
EditorSettings::EditorSettings() {
- //singleton=this;
last_order = 0;
optimize_save = true;
save_changed_setting = true;
@@ -1178,8 +1184,6 @@ EditorSettings::EditorSettings() {
}
EditorSettings::~EditorSettings() {
-
- //singleton=NULL;
}
Ref<ShortCut> ED_GET_SHORTCUT(const String &p_path) {
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index a99d7e0ad5..177ec4760d 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -35,7 +35,7 @@
#include "core/io/config_file.h"
#include "os/thread_safe.h"
#include "resource.h"
-#include "scene/gui/input_action.h"
+#include "scene/gui/shortcut.h"
#include "translation.h"
class EditorPlugin;
@@ -180,6 +180,9 @@ public:
#define EDITOR_DEF(m_var, m_val) _EDITOR_DEF(m_var, Variant(m_val))
Variant _EDITOR_DEF(const String &p_var, const Variant &p_default);
+#define EDITOR_GET(m_var) _EDITOR_GET(m_var)
+Variant _EDITOR_GET(const String &p_var);
+
#define ED_IS_SHORTCUT(p_name, p_ev) (EditorSettings::get_singleton()->is_shortcut(p_name, p_ev))
Ref<ShortCut> ED_SHORTCUT(const String &p_path, const String &p_name, uint32_t p_keycode = 0);
Ref<ShortCut> ED_GET_SHORTCUT(const String &p_path);
diff --git a/editor/editor_sub_scene.cpp b/editor/editor_sub_scene.cpp
index c107d3687e..b81dfd3f46 100644
--- a/editor/editor_sub_scene.cpp
+++ b/editor/editor_sub_scene.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_sub_scene.h b/editor/editor_sub_scene.h
index 3a11a13b53..13ce19bbb2 100644
--- a/editor/editor_sub_scene.h
+++ b/editor/editor_sub_scene.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index f628a23d5f..8943d5f0dc 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -86,15 +86,17 @@ static Ref<StyleBoxFlat> change_border_color(Ref<StyleBoxFlat> p_style, Color p_
return style;
}
-#define HIGHLIGHT_COLOR_LIGHT highlight_color.linear_interpolate(Color(1, 1, 1, 1), 0.3)
-#define HIGHLIGHT_COLOR_DARK highlight_color.linear_interpolate(Color(0, 0, 0, 1), 0.5)
+Ref<ImageTexture> editor_generate_icon(int p_index, bool dark_theme = true, Dictionary *p_colors = NULL) {
-Ref<ImageTexture> editor_generate_icon(int p_index, bool dark_theme = true) {
Ref<ImageTexture> icon = memnew(ImageTexture);
Ref<Image> img = memnew(Image);
- ImageLoaderSVG::create_image_from_string(img, dark_theme ? editor_icons_sources[p_index] : editor_icons_sources_dark[p_index], EDSCALE, true);
- if ((EDSCALE - (float)((int)EDSCALE)) > 0.0)
+ // dumb gizmo check
+ bool is_gizmo = String(editor_icons_names[p_index]).begins_with("Gizmo");
+
+ ImageLoaderSVG::create_image_from_string(img, editor_icons_sources[p_index], EDSCALE, true, dark_theme ? NULL : p_colors);
+
+ if ((EDSCALE - (float)((int)EDSCALE)) > 0.0 || is_gizmo)
icon->create_from_image(img); // in this case filter really helps
else
icon->create_from_image(img, 0);
@@ -102,19 +104,74 @@ Ref<ImageTexture> editor_generate_icon(int p_index, bool dark_theme = true) {
return icon;
}
-void editor_register_icons(Ref<Theme> p_theme, bool dark_theme = true) {
+#ifndef ADD_CONVERT_COLOR
+#define ADD_CONVERT_COLOR(dictionary, old_color, new_color) dictionary[Color::html(old_color)] = Color::html(new_color)
+#endif
+
+void editor_register_and_generate_icons(Ref<Theme> p_theme, bool dark_theme = true) {
#ifdef SVG_ENABLED
- print_line(rtos(EDSCALE));
+
+ Dictionary dark_icon_color_dictionary;
+ //convert color: FROM TO
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#e0e0e0", "#4f4f4f"); // common icon color
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ffffff", "#000000"); // white
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#b4b4b4", "#000000"); // script darker color
+
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#cea4f1", "#bb6dff"); // animation
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#fc9c9c", "#ff5f5f"); // spatial
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#a5b7f3", "#6d90ff"); // 2d
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#708cea", "#0843ff"); // 2d dark
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#a5efac", "#29d739"); // control
+
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ff8484", "#ff3333"); // error
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#84ffb1", "#00db50"); // success
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ffd684", "#ffad07"); // warning
+
+ // rainbow
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ff7070", "#ff2929"); // red
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ffeb70", "#ffe337"); // yellow
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#9dff70", "#74ff34"); // green
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#70ffb9", "#2cff98"); // aqua
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#70deff", "#22ccff"); // blue
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#9f70ff", "#702aff"); // purple
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ff70ac", "#ff2781"); // pink
+
+ // audio gradient
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ff8484", "#ff4040"); // red
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#e1dc7a", "#d6cf4b"); // yellow
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#84ffb1", "#00f010"); // green
+
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ffd684", "#fea900"); // mesh (orange)
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#40a2ff", "#68b6ff"); // shape (blue)
+
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#84c2ff", "#5caeff"); // selection (blue)
+
+ ADD_CONVERT_COLOR(dark_icon_color_dictionary, "#ea686c", "#e3383d"); // key xform (red)
+
+ List<String> exceptions;
+ exceptions.push_back("EditorPivot");
+ exceptions.push_back("EditorHandle");
+ exceptions.push_back("Editor3DHandle");
+ exceptions.push_back("Godot");
+ exceptions.push_back("PanoramaSky");
+ exceptions.push_back("ProceduralSky");
+ exceptions.push_back("EditorControlAnchor");
+ exceptions.push_back("DefaultProjectIcon");
clock_t begin_time = clock();
for (int i = 0; i < editor_icons_count; i++) {
-
- Ref<ImageTexture> icon = editor_generate_icon(i, dark_theme);
+ List<String>::Element *is_exception = exceptions.find(editor_icons_names[i]);
+ if (is_exception) {
+ exceptions.erase(is_exception);
+ }
+ Ref<ImageTexture> icon = editor_generate_icon(i, dark_theme, is_exception ? NULL : &dark_icon_color_dictionary);
p_theme->set_icon(editor_icons_names[i], "EditorIcons", icon);
}
+
clock_t end_time = clock();
+
double time_d = (double)(end_time - begin_time) / CLOCKS_PER_SEC;
print_line("SVG_GENERATION TIME: " + rtos(time_d));
#else
@@ -122,19 +179,22 @@ void editor_register_icons(Ref<Theme> p_theme, bool dark_theme = true) {
#endif
}
+#define HIGHLIGHT_COLOR_FONT highlight_color.linear_interpolate(dark_theme ? Color(1, 1, 1, 1) : Color(0, 0, 0, 1), 0.5)
+#define HIGHLIGHT_COLOR_BG highlight_color.linear_interpolate(dark_theme ? Color(0, 0, 0, 1) : Color(1, 1, 1, 1), 0.5)
+
Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Ref<Theme> theme = Ref<Theme>(memnew(Theme));
- editor_register_fonts(theme);
-
const float default_contrast = 0.25;
- // Define colors
+ //Theme settings
Color highlight_color = EDITOR_DEF("interface/theme/highlight_color", Color::html("#000000"));
Color base_color = EDITOR_DEF("interface/theme/base_color", Color::html("#000000"));
float contrast = EDITOR_DEF("interface/theme/contrast", default_contrast);
+
int preset = EDITOR_DEF("interface/theme/preset", 0);
+ int icon_font_color_setting = EDITOR_DEF("interface/theme/icon_and_font_color", 0);
bool highlight_tabs = EDITOR_DEF("interface/theme/highlight_tabs", false);
int border_size = EDITOR_DEF("interface/theme/border_size", 1);
@@ -159,45 +219,40 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
base_color = Color::html("#383c4a");
contrast = 0.25;
} break;
+ case 4: { // Light
+ highlight_color = Color::html("#2070ff");
+ base_color = Color::html("#ffffff");
+ contrast = 0.08;
+ } break;
}
+ //Colors
+ int AUTO_COLOR = 0;
+ int LIGHT_COLOR = 2;
+ bool dark_theme = (icon_font_color_setting == AUTO_COLOR && ((base_color.r + base_color.g + base_color.b) / 3.0) < 0.5) || icon_font_color_setting == LIGHT_COLOR;
+
Color dark_color_1 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast);
Color dark_color_2 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 1.5);
Color dark_color_3 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 2);
- Color light_color_1 = base_color.linear_interpolate(Color(1, 1, 1, 1), contrast);
- Color light_color_2 = base_color.linear_interpolate(Color(1, 1, 1, 1), contrast * 1.5);
+ Color contrast_color_1 = base_color.linear_interpolate((dark_theme ? Color(1, 1, 1, 1) : Color(0, 0, 0, 1)), 0.3);
+ Color contrast_color_2 = base_color.linear_interpolate((dark_theme ? Color(1, 1, 1, 1) : Color(0, 0, 0, 1)), 0.5);
- const int border_width = CLAMP(border_size, 0, 3) * EDSCALE;
+ Color font_color = dark_theme ? Color(1, 1, 1) : Color(0, 0, 0);
+ Color font_color_disabled = dark_theme ? Color(0.6, 0.6, 0.6) : Color(0.45, 0.45, 0.45);
- Color title_color_hl = base_color;
- if (highlight_tabs)
- title_color_hl = base_color.linear_interpolate(Color(1, 1, 1, 1), contrast / default_contrast / 10);
- bool dark_bg = ((title_color_hl.r + title_color_hl.g + title_color_hl.b) / 3.0) < 0.5;
- Color title_color_hl_text_color = dark_bg ? Color(1, 1, 1, 0.9) : Color(0, 0, 0, 0.9);
-
- bool dark_theme = ((base_color.r + base_color.g + base_color.b) / 3.0) < 0.5;
Color separator_color = dark_theme ? Color(1, 1, 1, 0.1) : Color(0, 0, 0, 0.1);
- // the resolution or the dark theme parameter has not changed, so we do not regenerate the icons
- if (p_theme != NULL && fabs(p_theme->get_constant("scale", "Editor") - EDSCALE) < 0.00001 && p_theme->get_constant("dark_theme", "Editor") == dark_theme) {
- for (int i = 0; i < editor_icons_count; i++) {
- theme->set_icon(editor_icons_names[i], "EditorIcons", p_theme->get_icon(editor_icons_names[i], "EditorIcons"));
- }
- } else {
- editor_register_icons(theme, dark_theme);
- }
-
- theme->set_constant("scale", "Editor", EDSCALE);
- theme->set_constant("dark_theme", "Editor", dark_theme);
+ Color tab_color = highlight_tabs ? base_color.linear_interpolate(font_color, contrast) : base_color;
+ const int border_width = CLAMP(border_size, 0, 3) * EDSCALE;
theme->set_color("highlight_color", "Editor", highlight_color);
theme->set_color("base_color", "Editor", base_color);
theme->set_color("dark_color_1", "Editor", dark_color_1);
theme->set_color("dark_color_2", "Editor", dark_color_2);
theme->set_color("dark_color_3", "Editor", dark_color_3);
- theme->set_color("light_color_1", "Editor", light_color_1);
- theme->set_color("light_color_2", "Editor", light_color_2);
+ theme->set_color("contrast_color_1", "Editor", contrast_color_1);
+ theme->set_color("contrast_color_2", "Editor", contrast_color_2);
Color success_color = highlight_color.linear_interpolate(Color(.6, 1, .6), 0.8);
Color warning_color = highlight_color.linear_interpolate(Color(1, 1, .2), 0.8);
@@ -206,25 +261,32 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("warning_color", "Editor", warning_color);
theme->set_color("error_color", "Editor", error_color);
- // Checkbox icon
- theme->set_icon("checked", "CheckBox", theme->get_icon("GuiChecked", "EditorIcons"));
- theme->set_icon("unchecked", "CheckBox", theme->get_icon("GuiUnchecked", "EditorIcons"));
- theme->set_icon("checked", "PopupMenu", theme->get_icon("GuiChecked", "EditorIcons"));
- theme->set_icon("unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons"));
- theme->set_icon("radio_checked", "CheckBox", theme->get_icon("GuiRadioChecked", "EditorIcons"));
- theme->set_icon("radio_unchecked", "CheckBox", theme->get_icon("GuiRadioUnchecked", "EditorIcons"));
- theme->set_icon("radio_checked", "PopupMenu", theme->get_icon("GuiChecked", "EditorIcons"));
- theme->set_icon("radio_unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons"));
+ theme->set_constant("scale", "Editor", EDSCALE);
+ theme->set_constant("dark_theme", "Editor", dark_theme);
+
+ //Register icons + font
+
+ // the resolution and the icon color (dark_theme bool) has not changed, so we do not regenerate the icons
+ if (p_theme != NULL && fabs(p_theme->get_constant("scale", "Editor") - EDSCALE) < 0.00001 && p_theme->get_constant("dark_theme", "Editor") == dark_theme) {
+ // register already generated icons
+ for (int i = 0; i < editor_icons_count; i++) {
+ theme->set_icon(editor_icons_names[i], "EditorIcons", p_theme->get_icon(editor_icons_names[i], "EditorIcons"));
+ }
+ } else {
+ editor_register_and_generate_icons(theme, dark_theme);
+ }
+
+ editor_register_fonts(theme);
// Editor background
Ref<StyleBoxFlat> style_panel = make_flat_stylebox(dark_color_2, 4, 4, 4, 4);
theme->set_stylebox("Background", "EditorStyles", style_panel);
// Focus
- Ref<StyleBoxFlat> focus_sbt = make_flat_stylebox(light_color_1, 4, 4, 4, 4);
- focus_sbt->set_filled(false);
+ Ref<StyleBoxFlat> focus_sbt = make_flat_stylebox(contrast_color_1, 4, 4, 4, 4);
+ focus_sbt->set_draw_center(false);
focus_sbt->set_border_width_all(1 * EDSCALE);
- focus_sbt = change_border_color(focus_sbt, light_color_2);
+ focus_sbt = change_border_color(focus_sbt, contrast_color_2);
theme->set_stylebox("Focus", "EditorStyles", focus_sbt);
// Menu
@@ -233,17 +295,19 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("MenuPanel", "EditorStyles", style_menu);
// Play button group
- theme->set_stylebox("PlayButtonPanel", "EditorStyles", make_stylebox(theme->get_icon("GuiPlayButtonGroup", "EditorIcons"), 16, 16, 16, 16, 8, 4, 8, 4));
+ theme->set_stylebox("PlayButtonPanel", "EditorStyles", make_empty_stylebox(8, 4, 8, 4)); //make_stylebox(theme->get_icon("GuiPlayButtonGroup", "EditorIcons"), 16, 16, 16, 16, 8, 4, 8, 4));
+ //MenuButton
Ref<StyleBoxFlat> style_menu_hover_border = make_flat_stylebox(highlight_color, 4, 4, 4, 4);
Ref<StyleBoxFlat> style_menu_hover_bg = make_flat_stylebox(dark_color_2, 4, 4, 4, 4);
- style_menu_hover_border->set_filled(false);
+ style_menu_hover_border->set_draw_center(false);
style_menu_hover_border->set_border_width(MARGIN_BOTTOM, border_width);
+ style_menu_hover_border->set_border_color_all(highlight_color);
style_menu_hover_border->set_expand_margin_size(MARGIN_BOTTOM, border_width);
theme->set_stylebox("normal", "MenuButton", style_menu);
- theme->set_stylebox("hover", "MenuButton", style_menu);
+ theme->set_stylebox("hover", "MenuButton", style_menu_hover_border);
theme->set_stylebox("pressed", "MenuButton", style_menu);
theme->set_stylebox("focus", "MenuButton", style_menu);
theme->set_stylebox("disabled", "MenuButton", style_menu);
@@ -260,58 +324,60 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("focus", "ToolButton", style_menu);
theme->set_stylebox("disabled", "ToolButton", style_menu);
- theme->set_color("font_color_hover", "MenuButton", HIGHLIGHT_COLOR_LIGHT);
- theme->set_color("font_color_hover", "ToolButton", HIGHLIGHT_COLOR_LIGHT);
+ theme->set_color("font_color", "MenuButton", font_color);
+ theme->set_color("font_color_hover", "MenuButton", HIGHLIGHT_COLOR_FONT);
+ theme->set_color("font_color", "ToolButton", font_color);
+ theme->set_color("font_color_hover", "ToolButton", HIGHLIGHT_COLOR_FONT);
theme->set_color("font_color_pressed", "ToolButton", highlight_color);
theme->set_stylebox("MenuHover", "EditorStyles", style_menu_hover_border);
// Content of each tab
Ref<StyleBoxFlat> style_content_panel = make_flat_stylebox(base_color, 4, 5, 4, 4);
- style_content_panel->set_border_color_all(title_color_hl);
+ style_content_panel->set_border_color_all(base_color);
style_content_panel->set_border_width_all(border_width);
Ref<StyleBoxFlat> style_content_panel_vp = make_flat_stylebox(base_color, border_width, 5, border_width, border_width);
- style_content_panel_vp->set_border_color_all(title_color_hl);
+ style_content_panel_vp->set_border_color_all(base_color);
style_content_panel_vp->set_border_width_all(border_width);
theme->set_stylebox("panel", "TabContainer", style_content_panel);
theme->set_stylebox("Content", "EditorStyles", style_content_panel_vp);
Ref<StyleBoxFlat> style_button_type = make_flat_stylebox(dark_color_1, 6, 4, 6, 4);
- style_button_type->set_filled(true);
+ style_button_type->set_draw_center(true);
style_button_type->set_border_width_all(border_width);
- style_button_type->set_border_color_all(light_color_1);
+ style_button_type->set_border_color_all(contrast_color_2);
- Ref<StyleBoxFlat> style_button_type_disabled = change_border_color(style_button_type, dark_color_2);
+ Ref<StyleBoxFlat> style_button_type_disabled = change_border_color(style_button_type, contrast_color_1);
- Color button_font_color = light_color_1.linear_interpolate(Color(1, 1, 1, 1), .6);
+ Color button_font_color = contrast_color_1.linear_interpolate(font_color, .6);
// Button
theme->set_stylebox("normal", "Button", style_button_type);
- theme->set_stylebox("hover", "Button", change_border_color(style_button_type, HIGHLIGHT_COLOR_LIGHT));
+ theme->set_stylebox("hover", "Button", change_border_color(style_button_type, HIGHLIGHT_COLOR_FONT));
theme->set_stylebox("pressed", "Button", change_border_color(style_button_type, highlight_color));
theme->set_stylebox("focus", "Button", change_border_color(style_button_type, highlight_color));
theme->set_stylebox("disabled", "Button", style_button_type_disabled);
theme->set_color("font_color", "Button", button_font_color);
-
- theme->set_color("font_color_hover", "Button", HIGHLIGHT_COLOR_LIGHT);
+ theme->set_color("font_color_hover", "Button", HIGHLIGHT_COLOR_FONT);
theme->set_color("font_color_pressed", "Button", highlight_color);
- theme->set_color("icon_color_hover", "Button", HIGHLIGHT_COLOR_LIGHT);
+ theme->set_color("font_color_disabled", "Button", font_color_disabled);
+ theme->set_color("icon_color_hover", "Button", HIGHLIGHT_COLOR_FONT);
// make icon color value bigger because icon image is not complete white
theme->set_color("icon_color_pressed", "Button", Color(highlight_color.r * 1.15, highlight_color.g * 1.15, highlight_color.b * 1.15, highlight_color.a));
// OptionButton
Ref<StyleBoxFlat> style_option_button = make_flat_stylebox(dark_color_1, 4, 4, 4, 4);
style_option_button->set_border_width_all(border_width);
- style_option_button->set_border_color_all(light_color_1);
- theme->set_stylebox("hover", "OptionButton", change_border_color(style_button_type, HIGHLIGHT_COLOR_LIGHT));
- theme->set_stylebox("pressed", "OptionButton", change_border_color(style_button_type, highlight_color));
+ theme->set_stylebox("hover", "OptionButton", change_border_color(style_button_type, contrast_color_1));
+ theme->set_stylebox("pressed", "OptionButton", change_border_color(style_button_type, HIGHLIGHT_COLOR_FONT));
theme->set_stylebox("focus", "OptionButton", change_border_color(style_button_type, highlight_color));
theme->set_stylebox("disabled", "OptionButton", style_button_type_disabled);
theme->set_stylebox("normal", "OptionButton", style_button_type);
theme->set_color("font_color", "OptionButton", button_font_color);
- theme->set_color("font_color_hover", "OptionButton", HIGHLIGHT_COLOR_LIGHT);
+ theme->set_color("font_color_hover", "OptionButton", HIGHLIGHT_COLOR_FONT);
theme->set_color("font_color_pressed", "OptionButton", highlight_color);
- theme->set_color("icon_color_hover", "OptionButton", HIGHLIGHT_COLOR_LIGHT);
+ theme->set_color("font_color_disabled", "OptionButton", font_color_disabled);
+ theme->set_color("icon_color_hover", "OptionButton", HIGHLIGHT_COLOR_FONT);
theme->set_icon("arrow", "OptionButton", theme->get_icon("GuiOptionArrow", "EditorIcons"));
theme->set_constant("arrow_margin", "OptionButton", 4);
theme->set_constant("modulate_arrow", "OptionButton", true);
@@ -319,19 +385,45 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// CheckButton
theme->set_icon("on", "CheckButton", theme->get_icon("GuiToggleOn", "EditorIcons"));
theme->set_icon("off", "CheckButton", theme->get_icon("GuiToggleOff", "EditorIcons"));
+ theme->set_color("font_color", "CheckButton", button_font_color);
+ theme->set_color("font_color_hover", "CheckButton", HIGHLIGHT_COLOR_FONT);
+ theme->set_color("font_color_pressed", "CheckButton", highlight_color);
+ theme->set_color("font_color_disabled", "CheckButton", font_color_disabled);
+ theme->set_color("icon_color_hover", "CheckButton", HIGHLIGHT_COLOR_FONT);
+
+ // Checkbox
+ theme->set_icon("checked", "CheckBox", theme->get_icon("GuiChecked", "EditorIcons"));
+ theme->set_icon("unchecked", "CheckBox", theme->get_icon("GuiUnchecked", "EditorIcons"));
+ theme->set_icon("radio_checked", "CheckBox", theme->get_icon("GuiRadioChecked", "EditorIcons"));
+ theme->set_icon("radio_unchecked", "CheckBox", theme->get_icon("GuiRadioUnchecked", "EditorIcons"));
+
+ theme->set_color("font_color", "CheckBox", button_font_color);
+ theme->set_color("font_color_hover", "CheckBox", HIGHLIGHT_COLOR_FONT);
+ theme->set_color("font_color_pressed", "CheckBox", highlight_color);
+ theme->set_color("font_color_disabled", "CheckBox", font_color_disabled);
+ theme->set_color("icon_color_hover", "CheckBox", HIGHLIGHT_COLOR_FONT);
// PopupMenu
Ref<StyleBoxFlat> style_popup_menu = make_flat_stylebox(dark_color_1, 8, 8, 8, 8);
style_popup_menu->set_border_width_all(MAX(EDSCALE, border_width));
- style_popup_menu->set_border_color_all(light_color_1);
+ style_popup_menu->set_border_color_all(contrast_color_1);
theme->set_stylebox("panel", "PopupMenu", style_popup_menu);
theme->set_stylebox("separator", "PopupMenu", make_line_stylebox(separator_color, MAX(EDSCALE, border_width), 8 - MAX(EDSCALE, border_width)));
+ theme->set_color("font_color", "PopupMenu", font_color);
+ theme->set_color("font_color_hover", "PopupMenu", HIGHLIGHT_COLOR_FONT);
+ theme->set_color("font_color_accel", "PopupMenu", font_color);
+ theme->set_color("font_color_disabled", "PopupMenu", font_color_disabled);
+ theme->set_icon("checked", "PopupMenu", theme->get_icon("GuiChecked", "EditorIcons"));
+ theme->set_icon("unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons"));
+ theme->set_icon("radio_checked", "PopupMenu", theme->get_icon("GuiChecked", "EditorIcons"));
+ theme->set_icon("radio_unchecked", "PopupMenu", theme->get_icon("GuiUnchecked", "EditorIcons"));
// Tree & ItemList background
Ref<StyleBoxFlat> style_tree_bg = make_flat_stylebox(dark_color_1, 2, 4, 2, 4);
style_tree_bg->set_border_width_all(border_width);
style_tree_bg->set_border_color_all(dark_color_3);
theme->set_stylebox("bg", "Tree", style_tree_bg);
+
// Script background
Ref<StyleBoxFlat> style_script_bg = make_flat_stylebox(dark_color_1, 0, 0, 0, 0);
style_script_bg->set_border_width_all(border_width);
@@ -348,21 +440,23 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("custom_button", "Tree", make_empty_stylebox());
theme->set_stylebox("custom_button_pressed", "Tree", make_empty_stylebox());
theme->set_stylebox("custom_button_hover", "Tree", style_button_type);
- theme->set_color("custom_button_font_highlight", "Tree", HIGHLIGHT_COLOR_LIGHT);
+ theme->set_color("custom_button_font_highlight", "Tree", HIGHLIGHT_COLOR_FONT);
+ theme->set_color("font_color", "Tree", font_color_disabled);
+ theme->set_color("font_color_selected", "Tree", font_color);
- Ref<StyleBox> style_tree_btn = make_flat_stylebox(light_color_1, 2, 4, 2, 4);
+ Ref<StyleBox> style_tree_btn = make_flat_stylebox(contrast_color_1, 2, 4, 2, 4);
theme->set_stylebox("button_pressed", "Tree", style_tree_btn);
- Ref<StyleBoxFlat> style_tree_focus = make_flat_stylebox(HIGHLIGHT_COLOR_DARK, 2, 2, 2, 2);
+ Ref<StyleBoxFlat> style_tree_focus = make_flat_stylebox(HIGHLIGHT_COLOR_BG, 2, 2, 2, 2);
theme->set_stylebox("selected_focus", "Tree", style_tree_focus);
- Ref<StyleBoxFlat> style_tree_selected = make_flat_stylebox(HIGHLIGHT_COLOR_DARK, 2, 2, 2, 2);
+ Ref<StyleBoxFlat> style_tree_selected = make_flat_stylebox(HIGHLIGHT_COLOR_BG, 2, 2, 2, 2);
theme->set_stylebox("selected", "Tree", style_tree_selected);
- Ref<StyleBoxFlat> style_tree_cursor = make_flat_stylebox(HIGHLIGHT_COLOR_DARK, 4, 4, 4, 4);
- style_tree_cursor->set_filled(false);
+ Ref<StyleBoxFlat> style_tree_cursor = make_flat_stylebox(HIGHLIGHT_COLOR_BG, 4, 4, 4, 4);
+ style_tree_cursor->set_draw_center(false);
style_tree_cursor->set_border_width_all(border_width);
- style_tree_cursor->set_border_color_all(light_color_1);
+ style_tree_cursor->set_border_color_all(contrast_color_1);
Ref<StyleBoxFlat> style_tree_title = make_flat_stylebox(dark_color_3, 4, 4, 4, 4);
theme->set_stylebox("cursor", "Tree", style_tree_cursor);
@@ -371,11 +465,14 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("title_button_hover", "Tree", style_tree_title);
theme->set_stylebox("title_button_pressed", "Tree", style_tree_title);
- theme->set_color("prop_category", "Editor", dark_color_1.linear_interpolate(Color(1, 1, 1, 1), 0.12));
- theme->set_color("prop_section", "Editor", dark_color_1.linear_interpolate(Color(1, 1, 1, 1), 0.09));
- theme->set_color("prop_subsection", "Editor", dark_color_1.linear_interpolate(Color(1, 1, 1, 1), 0.06));
- theme->set_color("fg_selected", "Editor", HIGHLIGHT_COLOR_DARK);
- theme->set_color("fg_error", "Editor", theme->get_color("error_color", "Editor"));
+ Color prop_category_color = dark_theme ? dark_color_1.linear_interpolate(Color(1, 1, 1, 1), 0.12) : dark_color_1.linear_interpolate(Color(0, 0, 0, 1), 0.2);
+ Color prop_section_color = dark_theme ? dark_color_1.linear_interpolate(Color(1, 1, 1, 1), 0.09) : dark_color_1.linear_interpolate(Color(0, 1, 0, 1), 0.1);
+ Color prop_subsection_color = dark_theme ? dark_color_1.linear_interpolate(Color(1, 1, 1, 1), 0.06) : dark_color_1.linear_interpolate(Color(0, 0, 0, 1), 0.1);
+ theme->set_color("prop_category", "Editor", prop_category_color);
+ theme->set_color("prop_section", "Editor", prop_section_color);
+ theme->set_color("prop_subsection", "Editor", prop_subsection_color);
+ theme->set_color("fg_selected", "Editor", HIGHLIGHT_COLOR_BG);
+ theme->set_color("fg_error", "Editor", error_color);
theme->set_color("drop_position_color", "Tree", highlight_color);
// ItemList
@@ -384,9 +481,9 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
style_itemlist_bg->set_border_color_all(dark_color_3);
Ref<StyleBoxFlat> style_itemlist_cursor = make_flat_stylebox(highlight_color, 0, 0, 0, 0);
- style_itemlist_cursor->set_filled(false);
+ style_itemlist_cursor->set_draw_center(false);
style_itemlist_cursor->set_border_width_all(border_width);
- style_itemlist_cursor->set_border_color_all(HIGHLIGHT_COLOR_DARK);
+ style_itemlist_cursor->set_border_color_all(HIGHLIGHT_COLOR_BG);
theme->set_stylebox("cursor", "ItemList", style_itemlist_cursor);
theme->set_stylebox("cursor_unfocused", "ItemList", style_itemlist_cursor);
theme->set_stylebox("selected_focus", "ItemList", style_tree_focus);
@@ -394,21 +491,24 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("bg_focus", "ItemList", focus_sbt);
theme->set_stylebox("bg", "ItemList", style_itemlist_bg);
theme->set_constant("vseparation", "ItemList", 5 * EDSCALE);
+ theme->set_color("font_color", "ItemList", font_color);
- Ref<StyleBoxFlat> style_tab_fg = make_flat_stylebox(title_color_hl, 15, 5, 15, 5);
- Ref<StyleBoxFlat> style_tab_bg = make_flat_stylebox(base_color, 15, 5, 15, 5);
- style_tab_bg->set_filled(false);
+ Ref<StyleBoxFlat> style_tab_fg = make_flat_stylebox(tab_color, 15, 5, 15, 5);
+ Ref<StyleBoxFlat> style_tab_bg = make_flat_stylebox(tab_color, 15, 5, 15, 5);
+ style_tab_bg->set_draw_center(false);
// Tabs & TabContainer
theme->set_stylebox("tab_fg", "TabContainer", style_tab_fg);
theme->set_stylebox("tab_bg", "TabContainer", style_tab_bg);
theme->set_stylebox("tab_fg", "Tabs", style_tab_fg);
theme->set_stylebox("tab_bg", "Tabs", style_tab_bg);
- theme->set_color("font_color_fg", "TabContainer", title_color_hl_text_color);
- theme->set_color("font_color_bg", "TabContainer", light_color_2);
+ theme->set_color("font_color_fg", "TabContainer", font_color);
+ theme->set_color("font_color_bg", "TabContainer", font_color_disabled);
+ theme->set_color("font_color_fg", "Tabs", font_color);
+ theme->set_color("font_color_bg", "Tabs", font_color_disabled);
theme->set_icon("menu", "TabContainer", theme->get_icon("GuiTabMenu", "EditorIcons"));
theme->set_icon("menu_hl", "TabContainer", theme->get_icon("GuiTabMenu", "EditorIcons"));
- theme->set_stylebox("SceneTabFG", "EditorStyles", make_flat_stylebox(title_color_hl, 10, 5, 10, 5));
+ theme->set_stylebox("SceneTabFG", "EditorStyles", make_flat_stylebox(base_color, 10, 5, 10, 5));
theme->set_stylebox("SceneTabBG", "EditorStyles", make_empty_stylebox(6, 5, 6, 5));
theme->set_icon("close", "Tabs", theme->get_icon("GuiClose", "EditorIcons"));
theme->set_stylebox("button_pressed", "Tabs", style_menu);
@@ -424,21 +524,23 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
Ref<StyleBoxFlat> style_tab_fg_debugger = make_flat_stylebox(dark_color_2, 10, 5, 10, 5);
Ref<StyleBoxFlat> style_tab_bg_debugger = make_flat_stylebox(dark_color_2, 10, 5, 10, 5);
- style_tab_bg_debugger->set_filled(false);
+ style_tab_bg_debugger->set_draw_center(false);
theme->set_stylebox("DebuggerTabFG", "EditorStyles", style_tab_fg_debugger);
theme->set_stylebox("DebuggerTabBG", "EditorStyles", style_tab_bg_debugger);
// LineEdit
- Ref<StyleBoxFlat> style_lineedit = style_button_type;
- style_lineedit = change_border_color(style_lineedit, light_color_1);
- Ref<StyleBoxFlat> style_lineedit_disabled = change_border_color(style_lineedit, dark_color_1);
- style_lineedit_disabled->set_bg_color(Color(0, 0, 0, .1));
- Ref<StyleBoxFlat> style_lineedit_focus = change_border_color(style_lineedit, highlight_color);
- theme->set_stylebox("normal", "LineEdit", style_lineedit);
- theme->set_stylebox("focus", "LineEdit", style_lineedit_focus);
- theme->set_stylebox("read_only", "LineEdit", style_lineedit_disabled);
- theme->set_color("read_only", "LineEdit", dark_color_1);
+ Ref<StyleBoxFlat> style_line_edit = make_flat_stylebox(dark_color_1, 6, 4, 6, 4);
+ style_line_edit = change_border_color(style_line_edit, contrast_color_1);
+ Ref<StyleBoxFlat> style_line_edit_disabled = change_border_color(style_line_edit, dark_color_1);
+ style_line_edit_disabled->set_bg_color(Color(0, 0, 0, .1));
+ Ref<StyleBoxFlat> style_line_edit_focus = change_border_color(style_line_edit, highlight_color);
+ theme->set_stylebox("normal", "LineEdit", style_line_edit);
+ theme->set_stylebox("focus", "LineEdit", style_line_edit_focus);
+ theme->set_stylebox("read_only", "LineEdit", style_line_edit_disabled);
+ theme->set_color("read_only", "LineEdit", font_color_disabled);
+ theme->set_color("font_color", "LineEdit", font_color);
+ theme->set_color("cursor_color", "LineEdit", font_color);
// TextEdit
Ref<StyleBoxFlat> style_textedit_normal(memnew(StyleBoxFlat));
@@ -464,11 +566,11 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// WindowDialog
Ref<StyleBoxFlat> style_window = make_flat_stylebox(dark_color_2, 4, 4, 4, 4);
style_window->set_border_width_all(MAX(EDSCALE, border_width));
- style_window->set_border_color_all(title_color_hl);
+ style_window->set_border_color_all(base_color);
style_window->set_border_width(MARGIN_TOP, 24 * EDSCALE);
style_window->set_expand_margin_size(MARGIN_TOP, 24 * EDSCALE);
theme->set_stylebox("panel", "WindowDialog", style_window);
- theme->set_color("title_color", "WindowDialog", title_color_hl_text_color);
+ theme->set_color("title_color", "WindowDialog", font_color);
theme->set_icon("close", "WindowDialog", theme->get_icon("GuiClose", "EditorIcons"));
theme->set_icon("close_highlight", "WindowDialog", theme->get_icon("GuiClose", "EditorIcons"));
theme->set_constant("close_h_ofs", "WindowDialog", 22 * EDSCALE);
@@ -512,20 +614,25 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("grabber_highlight", "VSlider", theme->get_icon("GuiSliderGrabberHl", "EditorIcons"));
//RichTextLabel
+ theme->set_color("font_color", "RichTextLabel", font_color);
theme->set_stylebox("focus", "RichTextLabel", make_empty_stylebox());
// Panel
theme->set_stylebox("panel", "Panel", style_panel);
+ // Label
+ theme->set_color("font_color", "Label", font_color);
+
// TooltipPanel
Ref<StyleBoxFlat> style_tooltip = make_flat_stylebox(Color(1, 1, 1, 0.8), 8, 8, 8, 8);
style_tooltip->set_border_width_all(border_width);
- style_tooltip->set_border_color_all(Color(1, 1, 1, 0.9));
+ style_tooltip->set_border_color_all(HIGHLIGHT_COLOR_FONT);
+ theme->set_color("font_color", "TooltipPanel", font_color);
theme->set_stylebox("panel", "TooltipPanel", style_tooltip);
// PopupPanel
Ref<StyleBoxFlat> style_dock_select = make_flat_stylebox(base_color);
- style_dock_select->set_border_color_all(light_color_1);
+ style_dock_select->set_border_color_all(contrast_color_1);
style_dock_select->set_expand_margin_size_all(2);
style_dock_select->set_border_width_all(2);
theme->set_stylebox("panel", "PopupPanel", style_dock_select);
@@ -536,14 +643,15 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
// ProgressBar
theme->set_stylebox("bg", "ProgressBar", make_stylebox(theme->get_icon("GuiProgressBar", "EditorIcons"), 4, 4, 4, 4, 0, 0, 0, 0));
theme->set_stylebox("fg", "ProgressBar", make_stylebox(theme->get_icon("GuiProgressFill", "EditorIcons"), 6, 6, 6, 6, 2, 1, 2, 1));
-
- // theme->set_font("font", "ProgressBar", default_font);
-
- // theme->set_color("font_color", "ProgressBar", control_font_color_hover);
- theme->set_color("font_color_shadow", "ProgressBar", Color(0, 0, 0));
+ theme->set_color("font_color", "ProgressBar", font_color);
// GraphEdit
theme->set_stylebox("bg", "GraphEdit", make_flat_stylebox(dark_color_2, 4, 4, 4, 4));
+ theme->set_color("grid_major", "GraphEdit", Color(font_color.r, font_color.g, font_color.b, 0.2));
+ theme->set_color("grid_minor", "GraphEdit", Color(font_color_disabled.r, font_color_disabled.g, font_color_disabled.b, 0.2));
+ theme->set_icon("minus", "GraphEdit", theme->get_icon("ZoomLess", "EditorIcons"));
+ theme->set_icon("more", "GraphEdit", theme->get_icon("ZoomMore", "EditorIcons"));
+ theme->set_icon("reset", "GraphEdit", theme->get_icon("ZoomReset", "EditorIcons"));
// GraphNode
Ref<StyleBoxFlat> graphsb = make_flat_stylebox(Color(0, 0, 0, 0.3), 16, 24, 16, 5);
@@ -568,7 +676,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_stylebox("commentfocus", "GraphNode", graphsbcommentselected);
// FileDialog
- Color disable_color = light_color_2;
+ Color disable_color = contrast_color_2;
disable_color.a = 0.7;
theme->set_color("files_disabled", "FileDialog", disable_color);
diff --git a/editor/editor_themes.h b/editor/editor_themes.h
index 8a652ba6f1..a644c5936f 100644
--- a/editor/editor_themes.h
+++ b/editor/editor_themes.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index 5ff9b795d7..147d5f90c6 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -313,77 +313,6 @@ void ExportTemplateManager::_bind_methods() {
ClassDB::bind_method("_uninstall_template", &ExportTemplateManager::_uninstall_template);
ClassDB::bind_method("_uninstall_template_confirm", &ExportTemplateManager::_uninstall_template_confirm);
ClassDB::bind_method("_install_from_file", &ExportTemplateManager::_install_from_file);
-
-#if 0
- FileAccess *fa = NULL;
- zlib_filefunc_def io = zipio_create_io_from_file(&fa);
-
- unzFile pkg = unzOpen2(p_file.utf8().get_data(), &io);
- if (!pkg) {
-
- current_option = -1;
- //confirmation->get_cancel()->hide();
- accept->get_ok()->set_text(TTR("I see.."));
- accept->set_text(TTR("Can't open export templates zip."));
- accept->popup_centered_minsize();
- return;
- }
- int ret = unzGoToFirstFile(pkg);
-
- int fc = 0; //count them
-
- while (ret == UNZ_OK) {
- fc++;
- ret = unzGoToNextFile(pkg);
- }
-
- ret = unzGoToFirstFile(pkg);
-
- EditorProgress p("ltask", TTR("Loading Export Templates"), fc);
-
- fc = 0;
-
- while (ret == UNZ_OK) {
-
- //get filename
- unz_file_info info;
- char fname[16384];
- ret = unzGetCurrentFileInfo(pkg, &info, fname, 16384, NULL, 0, NULL, 0);
-
- String file = fname;
-
- Vector<uint8_t> data;
- data.resize(info.uncompressed_size);
-
- //read
- ret = unzOpenCurrentFile(pkg);
- ret = unzReadCurrentFile(pkg, data.ptr(), data.size());
- unzCloseCurrentFile(pkg);
-
- print_line(fname);
- /*
- for(int i=0;i<512;i++) {
- print_line(itos(data[i]));
- }
- */
-
- file = file.get_file();
-
- p.step(TTR("Importing:") + " " + file, fc);
-
- FileAccess *f = FileAccess::open(EditorSettings::get_singleton()->get_settings_path() + "/templates/" + file, FileAccess::WRITE);
-
- ERR_CONTINUE(!f);
- f->store_buffer(data.ptr(), data.size());
-
- memdelete(f);
-
- ret = unzGoToNextFile(pkg);
- fc++;
- }
-
- unzClose(pkg);
-#endif
}
ExportTemplateManager::ExportTemplateManager() {
diff --git a/editor/export_template_manager.h b/editor/export_template_manager.h
index 480c73e123..c77f85688f 100644
--- a/editor/export_template_manager.h
+++ b/editor/export_template_manager.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* export_template_manager.cpp */
+/* export_template_manager.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/file_type_cache.cpp b/editor/file_type_cache.cpp
index 728e80bba7..c8b21acb36 100644
--- a/editor/file_type_cache.cpp
+++ b/editor/file_type_cache.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/file_type_cache.h b/editor/file_type_cache.h
index a434384eb4..307e8e27bb 100644
--- a/editor/file_type_cache.h
+++ b/editor/file_type_cache.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/fileserver/editor_file_server.cpp b/editor/fileserver/editor_file_server.cpp
index 7e168c54be..ba90beee22 100644
--- a/editor/fileserver/editor_file_server.cpp
+++ b/editor/fileserver/editor_file_server.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/fileserver/editor_file_server.h b/editor/fileserver/editor_file_server.h
index 01b84627b7..32c28b4358 100644
--- a/editor/fileserver/editor_file_server.h
+++ b/editor/fileserver/editor_file_server.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 7413b05aac..04036f410a 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -199,11 +199,33 @@ void FileSystemDock::_notification(int p_what) {
int new_mode = int(EditorSettings::get_singleton()->get("docks/filesystem/display_mode"));
+ //_update_icons
+
+ button_reload->set_icon(get_icon("Reload", "EditorIcons"));
+ button_favorite->set_icon(get_icon("Favorites", "EditorIcons"));
+ button_back->set_icon(get_icon("Filesystem", "EditorIcons"));
+ if (display_mode == DISPLAY_THUMBNAILS) {
+ button_display_mode->set_icon(get_icon("FileList", "EditorIcons"));
+ } else {
+ button_display_mode->set_icon(get_icon("FileThumbnail", "EditorIcons"));
+ }
+
+ search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
+
+ button_hist_next->set_icon(get_icon("Forward", "EditorIcons"));
+ button_hist_prev->set_icon(get_icon("Back", "EditorIcons"));
+
+ Theme::get_default()->clear_icon("ResizedFolder", "EditorIcons");
+ Theme::get_default()->clear_icon("ResizedFile", "EditorIcons");
+
if (new_mode != display_mode) {
set_display_mode(new_mode);
} else {
_update_files(true);
}
+
+ _update_tree();
+
} break;
}
}
@@ -367,6 +389,7 @@ void FileSystemDock::_search(EditorFileSystemDirectory *p_path, List<FileInfo> *
fi.name = file;
fi.type = p_path->get_file_type(i);
fi.path = p_path->get_file_path(i);
+ fi.import_broken = !p_path->get_file_import_is_valid(i);
fi.import_status = 0;
matches->push_back(fi);
@@ -401,6 +424,7 @@ void FileSystemDock::_update_files(bool p_keep_selection) {
thumbnail_size *= EDSCALE;
Ref<Texture> folder_thumbnail;
Ref<Texture> file_thumbnail;
+ Ref<Texture> file_thumbnail_broken;
bool use_thumbnails = (display_mode == DISPLAY_THUMBNAILS);
bool use_folders = search_box->get_text().length() == 0 && split_mode;
@@ -434,8 +458,18 @@ void FileSystemDock::_update_files(bool p_keep_selection) {
Theme::get_default()->set_icon("ResizedFile", "EditorIcons", resized_file);
}
+ if (!has_icon("ResizedFileBroken", "EditorIcons")) {
+ Ref<ImageTexture> file = get_icon("FileBigBroken", "EditorIcons");
+ Ref<Image> img = file->get_data();
+ img->resize(thumbnail_size, thumbnail_size);
+ Ref<ImageTexture> resized_file = Ref<ImageTexture>(memnew(ImageTexture));
+ resized_file->create_from_image(img, 0);
+ Theme::get_default()->set_icon("ResizedFileBroken", "EditorIcons", resized_file);
+ }
+
file_thumbnail = get_icon("ResizedFile", "EditorIcons");
+ file_thumbnail_broken = get_icon("ResizedFileBroken", "EditorIcons");
} else {
files->set_icon_mode(ItemList::ICON_MODE_LEFT);
@@ -496,6 +530,7 @@ void FileSystemDock::_update_files(bool p_keep_selection) {
fi.name = efd->get_file(i);
fi.path = path.plus_file(fi.name);
fi.type = efd->get_file_type(i);
+ fi.import_broken = !efd->get_file_import_is_valid(i);
fi.import_status = 0;
filelist.push_back(fi);
@@ -511,41 +546,40 @@ void FileSystemDock::_update_files(bool p_keep_selection) {
StringName type = E->get().type;
Ref<Texture> type_icon;
+ Ref<Texture> big_icon = file_thumbnail;
String tooltip = fname;
- if (E->get().import_status == 0) {
+ if (!E->get().import_broken) {
if (has_icon(type, ei)) {
type_icon = get_icon(type, ei);
} else {
type_icon = get_icon(oi, ei);
}
- } else if (E->get().import_status == 1) {
- type_icon = get_icon("DependencyOk", "EditorIcons");
- } else if (E->get().import_status == 2) {
- type_icon = get_icon("DependencyChanged", "EditorIcons");
- tooltip + "\nStatus: Needs Re-Import";
- } else if (E->get().import_status == 3) {
+ } else {
type_icon = get_icon("ImportFail", "EditorIcons");
- tooltip + "\nStatus: Missing Dependencies";
+ big_icon = file_thumbnail_broken;
+ tooltip += TTR("\nStatus: Import of file failed. Please fix file and reimport manually.");
}
if (E->get().sources.size()) {
for (int i = 0; i < E->get().sources.size(); i++) {
- tooltip += "\nSource: " + E->get().sources[i];
+ tooltip += TTR("\nSource: ") + E->get().sources[i];
}
}
if (use_thumbnails) {
- files->add_item(fname, file_thumbnail, true);
+ files->add_item(fname, big_icon, true);
files->set_item_metadata(files->get_item_count() - 1, fp);
files->set_item_tag_icon(files->get_item_count() - 1, type_icon);
Array udata;
udata.resize(2);
udata[0] = files->get_item_count() - 1;
udata[1] = fname;
- EditorResourcePreview::get_singleton()->queue_resource_preview(fp, this, "_thumbnail_done", udata);
+ if (!E->get().import_broken) {
+ EditorResourcePreview::get_singleton()->queue_resource_preview(fp, this, "_thumbnail_done", udata);
+ }
} else {
files->add_item(fname, type_icon, true);
files->set_item_metadata(files->get_item_count() - 1, fp);
@@ -729,7 +763,7 @@ void FileSystemDock::_rename_operation(const String &p_to_path) {
return;
}
if (FileAccess::exists(p_to_path)) {
- EditorNode::get_singleton()->show_warning("Target file exists, can't overwrite. Delete first.");
+ EditorNode::get_singleton()->show_warning(TTR("Target file exists, can't overwrite. Delete first."));
return;
}
@@ -794,7 +828,12 @@ void FileSystemDock::_move_operation(const String &p_to_path) {
//make list of remaps
Map<String, String> renames;
String repfrom = path == "res://" ? path : String(path + "/");
- String repto = p_to_path == "res://" ? p_to_path : String(p_to_path + "/");
+ String repto = p_to_path;
+ if (!repto.ends_with("/")) {
+ repto += "/";
+ }
+
+ print_line("reprfrom: " + repfrom + " repto " + repto);
for (int i = 0; i < move_files.size(); i++) {
renames[move_files[i]] = move_files[i].replace_first(repfrom, repto);
@@ -818,7 +857,7 @@ void FileSystemDock::_move_operation(const String &p_to_path) {
print_line("remapping: " + E->get());
if (err != OK) {
- EditorNode::get_singleton()->add_io_error("Can't rename deps for:\n" + E->get() + "\n");
+ EditorNode::get_singleton()->add_io_error(TTR("Can't rename deps for:\n") + E->get() + "\n");
}
}
@@ -832,7 +871,14 @@ void FileSystemDock::_move_operation(const String &p_to_path) {
Error err = da->rename(move_files[i], to);
print_line("moving file " + move_files[i] + " to " + to);
if (err != OK) {
- EditorNode::get_singleton()->add_io_error("Error moving file:\n" + move_files[i] + "\n");
+ EditorNode::get_singleton()->add_io_error(TTR("Error moving file:\n") + move_files[i] + "\n");
+ }
+ if (FileAccess::exists(move_files[i] + ".import")) { //move imported files too
+ //@todo should remove the files in .import folder
+ err = da->rename(move_files[i] + ".import", to + ".import");
+ if (err != OK) {
+ EditorNode::get_singleton()->add_io_error(TTR("Error moving file:\n") + move_files[i] + ".import\n");
+ }
}
}
@@ -850,7 +896,7 @@ void FileSystemDock::_move_operation(const String &p_to_path) {
Error err = da->rename(mdir, to);
print_line("moving dir " + mdir + " to " + to);
if (err != OK) {
- EditorNode::get_singleton()->add_io_error("Error moving dir:\n" + move_dirs[i] + "\n");
+ EditorNode::get_singleton()->add_io_error(TTR("Error moving dir:\n") + move_dirs[i] + "\n");
}
}
@@ -1755,7 +1801,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
scanning_vb = memnew(VBoxContainer);
Label *slabel = memnew(Label);
- slabel->set_text("Scanning Files,\nPlease Wait..");
+ slabel->set_text(TTR("Scanning Files,\nPlease Wait.."));
slabel->set_align(Label::ALIGN_CENTER);
scanning_vb->add_child(slabel);
scanning_progress = memnew(ProgressBar);
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index 2ec0c38815..a35b145085 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -169,6 +169,7 @@ private:
StringName type;
int import_status; //0 not imported, 1 - ok, 2- must reimport, 3- broken
Vector<String> sources;
+ bool import_broken;
bool operator<(const FileInfo &fi) const {
return name < fi.name;
diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp
index ea1827f16f..dcb96f3531 100644
--- a/editor/groups_editor.cpp
+++ b/editor/groups_editor.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -65,7 +65,7 @@ void GroupsEditor::_remove_group(Object *p_item, int p_column, int p_id) {
if (!node)
return;
- TreeItem *ti = p_item->cast_to<TreeItem>();
+ TreeItem *ti = Object::cast_to<TreeItem>(p_item);
if (!ti)
return;
diff --git a/editor/groups_editor.h b/editor/groups_editor.h
index acbe60c21f..c9b37a405d 100644
--- a/editor/groups_editor.h
+++ b/editor/groups_editor.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/icons/SCsub b/editor/icons/SCsub
index 86c51a50f3..534a8186a5 100644
--- a/editor/icons/SCsub
+++ b/editor/icons/SCsub
@@ -1,63 +1,42 @@
#!/usr/bin/env python
Import('env')
-
+from compat import StringIO
def make_editor_icons_action(target, source, env):
import os
- import cStringIO
dst = target[0].srcnode().abspath
svg_icons = source
- whites = cStringIO.StringIO()
- darks = cStringIO.StringIO()
+ icons_string = StringIO()
for f in svg_icons:
fname = str(f)
- whites.write('\t"')
- darks.write('\t"')
+ icons_string.write('\t"')
with open(fname, 'rb') as svgf:
b = svgf.read(1)
while(len(b) == 1):
- whites.write("\\" + str(hex(ord(b)))[1:])
- b = svgf.read(1)
- try:
- with open(os.path.dirname(fname) + "/dark/" + os.path.basename(fname), 'rb') as svgf:
+ icons_string.write("\\" + str(hex(ord(b)))[1:])
b = svgf.read(1)
- while(len(b) == 1):
- darks.write("\\" + str(hex(ord(b)))[1:])
- b = svgf.read(1)
- except IOError:
- with open(fname, 'rb') as svgf:
- b = svgf.read(1)
- while(len(b) == 1):
- darks.write("\\" + str(hex(ord(b)))[1:])
- b = svgf.read(1)
- whites.write('"')
- darks.write('"')
+ icons_string.write('"')
if fname != svg_icons[-1]:
- whites.write(",")
- darks.write(",")
- whites.write('\n')
- darks.write('\n')
+ icons_string.write(",")
+ icons_string.write('\n')
- s = cStringIO.StringIO()
+ s = StringIO()
s.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
s.write("#ifndef _EDITOR_ICONS_H\n")
s.write("#define _EDITOR_ICONS_H\n")
s.write("static const int editor_icons_count = %s;\n" % len(svg_icons))
s.write("static const char *editor_icons_sources[] = {\n")
- s.write(whites.getvalue())
- s.write('};\n\n')
- s.write("static const char *editor_icons_sources_dark[] = {\n")
- s.write(darks.getvalue())
+ s.write(icons_string.getvalue())
s.write('};\n\n')
s.write("static const char *editor_icons_names[] = {\n")
for f in svg_icons:
@@ -75,12 +54,11 @@ def make_editor_icons_action(target, source, env):
s.write("#endif\n")
- f = open(dst, "wb")
+ f = open(dst, "w")
f.write(s.getvalue())
f.close()
s.close()
- whites.close()
- darks.close()
+ icons_string.close()
make_editor_icons_builder = Builder(action=make_editor_icons_action,
suffix='.h',
diff --git a/editor/icons/dark/icon_2_d.svg b/editor/icons/dark/icon_2_d.svg
deleted file mode 100644
index 2f2bfbff8a..0000000000
--- a/editor/icons/dark/icon_2_d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3.9844 1.002a1.0001 1.0001 0 0 0 -0.69141 0.29102l-2 2a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l0.29297-0.29297v8.5859h8.5859l-0.29297 0.29297a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l2-2a1.0001 1.0001 0 0 0 0 -1.4141l-2-2a1 1 0 0 0 -0.7207 -0.29102 1 1 0 0 0 -0.69336 0.29102 1 1 0 0 0 0 1.4141l0.29297 0.29297h-6.5859v-6.5859l0.29297 0.29297a1 1 0 0 0 1.4141 0 1 1 0 0 0 0 -1.4141l-2-2a1.0001 1.0001 0 0 0 -0.72266 -0.29102z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_3_d.svg b/editor/icons/dark/icon_3_d.svg
deleted file mode 100644
index be55e1d90f..0000000000
--- a/editor/icons/dark/icon_3_d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3.9902 1.002a1.0001 1.0001 0 0 0 -0.69141 0.29102l-2 2a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l0.29297-0.29297v8.5859h8.5859l-0.29297 0.29297a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l2-2a1.0001 1.0001 0 0 0 0 -1.4141l-2-2a1 1 0 0 0 -0.72266 -0.29102 1 1 0 0 0 -0.69141 0.29102 1 1 0 0 0 0 1.4141l0.29297 0.29297h-5.1719l5.5859-5.5859v0.41602a1 1 0 0 0 1 1 1 1 0 0 0 1 -1v-2.8301a1.0001 1.0001 0 0 0 -1 -1h-2.8301a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h0.41602l-5.5859 5.5859v-5.1719l0.29297 0.29297a1 1 0 0 0 1.4141 0 1 1 0 0 0 0 -1.4141l-2-2a1.0001 1.0001 0 0 0 -0.72266 -0.29102z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_checked.svg b/editor/icons/dark/icon_GUI_checked.svg
deleted file mode 100644
index 5ae9a8c57c..0000000000
--- a/editor/icons/dark/icon_GUI_checked.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 15.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m4 2c-1.1046 0-2 0.89543-2 2v8c0 1.1046 0.89543 2 2 2h8c1.1046 0 2-0.89543 2-2v-8c0-1.1046-0.89543-2-2-2h-8zm7.293 2.293l1.4141 1.4141-6.707 6.707-2.707-2.707 1.4141-1.4141 1.293 1.293 5.293-5.293z" fill="#4f4f4f" fill-opacity=".78431"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_dropdown.svg b/editor/icons/dark/icon_GUI_dropdown.svg
deleted file mode 100644
index 9115b5d83f..0000000000
--- a/editor/icons/dark/icon_GUI_dropdown.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)" fill="#000000" fill-opacity=".58824" stroke-linejoin="round" stroke-opacity=".39216" stroke-width="2">
-<circle cx="7.5" cy="1040.9" r="1.5"/>
-<circle cx="7.5" cy="1045.9" r="1.5"/>
-<circle cx="7.5" cy="1050.9" r="1.5"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_hslider_bg.svg b/editor/icons/dark/icon_GUI_hslider_bg.svg
deleted file mode 100644
index e298d06c4c..0000000000
--- a/editor/icons/dark/icon_GUI_hslider_bg.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 15.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="1" y="1041.4" width="14" height="6" ry="0" fill-opacity=".39216" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".32549" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_hsplitter.svg b/editor/icons/dark/icon_GUI_hsplitter.svg
deleted file mode 100644
index 73f3f483d8..0000000000
--- a/editor/icons/dark/icon_GUI_hsplitter.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="8" height="64" version="1.1" viewBox="0 0 8 64" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -988.36)">
-<path d="m4 990.36v60" fill="none" stroke="#000000" stroke-linecap="round" stroke-opacity=".39216" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_mini_tab_menu.svg b/editor/icons/dark/icon_GUI_mini_tab_menu.svg
deleted file mode 100644
index 44236ebab9..0000000000
--- a/editor/icons/dark/icon_GUI_mini_tab_menu.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="6" height="16" version="1.1" viewBox="0 0 6 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#000000" fill-opacity=".39216">
-<circle cx="3" cy="1038.4" r="2"/>
-<circle cx="3" cy="1044.4" r="2"/>
-<circle cx="3" cy="1050.4" r="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_option_arrow.svg b/editor/icons/dark/icon_GUI_option_arrow.svg
deleted file mode 100644
index 2942998a8d..0000000000
--- a/editor/icons/dark/icon_GUI_option_arrow.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="12" height="12" version="1.1" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path d="m10 1043.4c-0.26378 0.01-0.5144 0.1165-0.69726 0.3067l-3.293 3.2929-3.293-3.2929c-0.18826-0.1936-0.44679-0.3028-0.7168-0.3028-0.89742 2e-4 -1.3404 1.0909-0.69727 1.7168l4 4c0.39053 0.3904 1.0235 0.3904 1.4141 0l4-4c0.65734-0.6321 0.19491-1.7422-0.7168-1.7207z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#000000" fill-opacity=".78431" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_play_button_group.svg b/editor/icons/dark/icon_GUI_play_button_group.svg
deleted file mode 100644
index 1d67816b3a..0000000000
--- a/editor/icons/dark/icon_GUI_play_button_group.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="32" height="32" version="1.1" viewBox="0 0 32 31.999998" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1020.4)">
-<circle cx="16" cy="1036.4" r="14" fill-opacity=".19608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_progress_bar.svg b/editor/icons/dark/icon_GUI_progress_bar.svg
deleted file mode 100644
index b052cfb50e..0000000000
--- a/editor/icons/dark/icon_GUI_progress_bar.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 15.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m2 1036.4c-1.0907-2e-4 -2 0.9073-2 1.998v12.002c0 1.0907 0.9093 2 2 2h12c1.0907 0 2-0.9093 2-2v-12c0-1.0907-0.9093-1.9978-2-1.998zm0 2h12v11.998h-12z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" fill-opacity=".39216" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_progress_fill.svg b/editor/icons/dark/icon_GUI_progress_fill.svg
deleted file mode 100644
index 91e6722c33..0000000000
--- a/editor/icons/dark/icon_GUI_progress_fill.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 15.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="4" y="1040.4" width="8" height="8" ry=".99999" fill="#4f4f4f" fill-opacity=".39216"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_radio_checked.svg b/editor/icons/dark/icon_GUI_radio_checked.svg
deleted file mode 100644
index 5b5fd23a78..0000000000
--- a/editor/icons/dark/icon_GUI_radio_checked.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 15.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<circle cx="8" cy="1044.4" r="5" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".78431" stroke-width="2"/>
-<circle cx="8" cy="1044.4" r="3" fill="#4f4f4f" fill-opacity=".78431"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_radio_unchecked.svg b/editor/icons/dark/icon_GUI_radio_unchecked.svg
deleted file mode 100644
index f3deacc992..0000000000
--- a/editor/icons/dark/icon_GUI_radio_unchecked.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 15.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<circle cx="8" cy="1044.4" r="5" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".78431" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_scroll_bg.svg b/editor/icons/dark/icon_GUI_scroll_bg.svg
deleted file mode 100644
index 302368b19a..0000000000
--- a/editor/icons/dark/icon_GUI_scroll_bg.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="12" height="12" version="1.1" viewBox="0 0 12 11.999999" xmlns="http://www.w3.org/2000/svg"></svg>
diff --git a/editor/icons/dark/icon_GUI_scroll_grabber.svg b/editor/icons/dark/icon_GUI_scroll_grabber.svg
deleted file mode 100644
index bf1bc19523..0000000000
--- a/editor/icons/dark/icon_GUI_scroll_grabber.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="12" height="12" version="1.1" viewBox="0 0 12 11.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<circle cx="6" cy="1046.4" r="2" fill="#000000" fill-opacity=".27451"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_scroll_grabber_hl.svg b/editor/icons/dark/icon_GUI_scroll_grabber_hl.svg
deleted file mode 100644
index e165cf3cfb..0000000000
--- a/editor/icons/dark/icon_GUI_scroll_grabber_hl.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="12" height="12" version="1.1" viewBox="0 0 12 11.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<circle cx="6" cy="1046.4" r="3" fill="#f9f9f9" fill-opacity=".73"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_scroll_grabber_pressed.svg b/editor/icons/dark/icon_GUI_scroll_grabber_pressed.svg
deleted file mode 100644
index 729289e756..0000000000
--- a/editor/icons/dark/icon_GUI_scroll_grabber_pressed.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="12" height="12" version="1.1" viewBox="0 0 12 11.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<circle cx="6" cy="1046.4" r="3" d="m 8.9999952,1046.3623 c 0,1.6569 -1.3431436,3 -2.9999952,3 -1.6568516,0 -2.9999952,-1.3431 -2.9999952,-3 0,-1.6568 1.3431436,-3 2.9999952,-3 1.6568516,0 2.9999952,1.3432 2.9999952,3 z" fill="#afafaf" fill-opacity=".72941"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_slider_grabber.svg b/editor/icons/dark/icon_GUI_slider_grabber.svg
deleted file mode 100644
index 63332d7da9..0000000000
--- a/editor/icons/dark/icon_GUI_slider_grabber.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 15.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<circle cx="8" cy="1044.4" r="3" fill="#000000" fill-opacity=".78431" stroke-linejoin="round" stroke-opacity=".39216" stroke-width="3"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_slider_grabber_hl.svg b/editor/icons/dark/icon_GUI_slider_grabber_hl.svg
deleted file mode 100644
index 5ba266ce06..0000000000
--- a/editor/icons/dark/icon_GUI_slider_grabber_hl.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 15.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm0 2a5 5 0 0 1 0.5 0.025391 5 5 0 0 1 0.49414 0.074219 5 5 0 0 1 0.48438 0.12305 5 5 0 0 1 0.46875 0.17188 5 5 0 0 1 0.44922 0.2168 5 5 0 0 1 0.42578 0.26172 5 5 0 0 1 0.39844 0.30273 5 5 0 0 1 0.36524 0.33984 5 5 0 0 1 0.33008 0.37695 5 5 0 0 1 0.29102 0.40625 5 5 0 0 1 0.24805 0.43359 5 5 0 0 1 0.20508 0.45508 5 5 0 0 1 0.1582 0.47461 5 5 0 0 1 0.10938 0.48828 5 5 0 0 1 0.060547 0.49609 5 5 0 0 1 0.011719 0.35352 5 5 0 0 1 -0.025391 0.5 5 5 0 0 1 -0.074218 0.49414 5 5 0 0 1 -0.12305 0.48438 5 5 0 0 1 -0.17188 0.46875 5 5 0 0 1 -0.2168 0.44922 5 5 0 0 1 -0.26172 0.42578 5 5 0 0 1 -0.30273 0.39844 5 5 0 0 1 -0.33984 0.36524 5 5 0 0 1 -0.37695 0.33008 5 5 0 0 1 -0.40625 0.29102 5 5 0 0 1 -0.43359 0.24805 5 5 0 0 1 -0.45508 0.20508 5 5 0 0 1 -0.47461 0.1582 5 5 0 0 1 -0.48828 0.10938 5 5 0 0 1 -0.49609 0.060547 5 5 0 0 1 -0.35352 0.011719 5 5 0 0 1 -0.5 -0.025391 5 5 0 0 1 -0.49414 -0.074218 5 5 0 0 1 -0.48438 -0.12305 5 5 0 0 1 -0.46875 -0.17188 5 5 0 0 1 -0.44922 -0.2168 5 5 0 0 1 -0.42578 -0.26172 5 5 0 0 1 -0.39844 -0.30273 5 5 0 0 1 -0.36523 -0.33984 5 5 0 0 1 -0.33008 -0.37695 5 5 0 0 1 -0.29102 -0.40625 5 5 0 0 1 -0.24805 -0.43359 5 5 0 0 1 -0.20508 -0.45508 5 5 0 0 1 -0.1582 -0.47461 5 5 0 0 1 -0.10938 -0.48828 5 5 0 0 1 -0.060547 -0.49609 5 5 0 0 1 -0.011719 -0.35352 5 5 0 0 1 0.025391 -0.5 5 5 0 0 1 0.074219 -0.49414 5 5 0 0 1 0.12305 -0.48438 5 5 0 0 1 0.17188 -0.46875 5 5 0 0 1 0.2168 -0.44922 5 5 0 0 1 0.26172 -0.42578 5 5 0 0 1 0.30273 -0.39844 5 5 0 0 1 0.33984 -0.36523 5 5 0 0 1 0.37695 -0.33008 5 5 0 0 1 0.40625 -0.29102 5 5 0 0 1 0.43359 -0.24805 5 5 0 0 1 0.45508 -0.20508 5 5 0 0 1 0.47461 -0.1582 5 5 0 0 1 0.48828 -0.10938 5 5 0 0 1 0.49609 -0.060547 5 5 0 0 1 0.35352 -0.011719z" fill="#4f4f4f"/>
-<circle cx="8" cy="1044.4" r="3" fill="#000000" fill-opacity=".58824" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".32549" stroke-width="3"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_spinbox_updown.svg b/editor/icons/dark/icon_GUI_spinbox_updown.svg
deleted file mode 100644
index 94d2044284..0000000000
--- a/editor/icons/dark/icon_GUI_spinbox_updown.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7.9844 1.002a1.0001 1.0001 0 0 0 -0.69141 0.29102l-4 4a1.0001 1.0001 0 1 0 1.4141 1.4141l3.293-3.293 3.293 3.293a1.0001 1.0001 0 1 0 1.4141 -1.4141l-4-4a1.0001 1.0001 0 0 0 -0.72266 -0.29102zm4.0059 7.9844a1.0001 1.0001 0 0 0 -0.69726 0.30664l-3.293 3.293-3.293-3.293a1.0001 1.0001 0 0 0 -0.7168 -0.30273 1.0001 1.0001 0 0 0 -0.69727 1.7168l4 4a1.0001 1.0001 0 0 0 1.4141 0l4-4a1.0001 1.0001 0 0 0 -0.7168 -1.7207z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" fill-opacity=".78431" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_tab_menu.svg b/editor/icons/dark/icon_GUI_tab_menu.svg
deleted file mode 100644
index 7075713425..0000000000
--- a/editor/icons/dark/icon_GUI_tab_menu.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#000000" fill-opacity=".39216">
-<circle cx="8" cy="1038.4" r="2"/>
-<circle cx="8" cy="1044.4" r="2"/>
-<circle cx="8" cy="1050.4" r="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_toggle_off.svg b/editor/icons/dark/icon_GUI_toggle_off.svg
deleted file mode 100644
index bf479e62d7..0000000000
--- a/editor/icons/dark/icon_GUI_toggle_off.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="64" height="32" version="1.1" viewBox="0 0 64 31.999998" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1020.4)">
-<path transform="translate(0 1020.4)" d="m24 4.002c-6.6307 0-12 5.3654-12 11.996v0.003906c0 6.6307 5.3693 12 12 12h16c6.6307 0 12-5.3693 12-12v-0.003906c0-6.6307-5.3693-11.996-12-11.996h-16zm0 2h16c5.5573 0 10 4.4388 10 9.9961v0.003906c0 5.5573-4.4427 10-10 10h-16c-5.5573 0-10-4.4427-10-10v-0.003906c0-5.5573 4.4427-9.9961 10-9.9961zm7 4.9961a1.0001 1.0001 0 0 0 -1 1v8a1 1 0 0 0 1 1 1 1 0 0 0 1 -1v-3h2a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-2v-2h4a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-5zm9 0a1.0001 1.0001 0 0 0 -1 1v4 4a1 1 0 0 0 1 1 1 1 0 0 0 1 -1v-3h2a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-2v-2h4a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-5zm-17 0.003906c-2.7496 0-5 2.2504-5 5s2.2504 5 5 5 5-2.2504 5-5-2.2504-5-5-5zm0 2c1.6687 0 3 1.3313 3 3s-1.3313 3-3 3-3-1.3313-3-3 1.3313-3 3-3z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" fill-opacity=".78431" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_toggle_on.svg b/editor/icons/dark/icon_GUI_toggle_on.svg
deleted file mode 100644
index b81391c88d..0000000000
--- a/editor/icons/dark/icon_GUI_toggle_on.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="64" height="32" version="1.1" viewBox="0 0 64 31.999998" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1020.4)">
-<path transform="translate(0 1020.4)" d="m24 4.002c-6.6307 0-12 5.3654-12 11.996 0 6.6307 5.3693 12 12 12h16c6.6307 0 12-5.3693 12-12 0-6.6307-5.3693-11.996-12-11.996h-16zm17 6.9961a1 1 0 0 1 1 1v8a1.0001 1.0001 0 0 1 -1.752 0.66211l-5.248-6v5.3379a1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1v-8a1.0001 1.0001 0 0 1 1.752 -0.6582l5.248 6v-5.3418a1 1 0 0 1 1 -1zm-15 0.003906c2.7496 0 5 2.2504 5 5s-2.2504 5-5 5-5-2.2504-5-5 2.2504-5 5-5zm0 2c-1.6687 0-3 1.3313-3 3s1.3313 3 3 3 3-1.3313 3-3-1.3313-3-3-3z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" fill-opacity=".78431" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_tree_arrow_down.svg b/editor/icons/dark/icon_GUI_tree_arrow_down.svg
deleted file mode 100644
index fc071c84ca..0000000000
--- a/editor/icons/dark/icon_GUI_tree_arrow_down.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="12" height="12" version="1.1" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path d="m3 1045.4 3 3 3-3" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".39216" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_tree_arrow_right.svg b/editor/icons/dark/icon_GUI_tree_arrow_right.svg
deleted file mode 100644
index ffd84f5774..0000000000
--- a/editor/icons/dark/icon_GUI_tree_arrow_right.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="12" height="12" version="1.1" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path d="m4 1049.4 3-3-3-3" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".39216" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_unchecked.svg b/editor/icons/dark/icon_GUI_unchecked.svg
deleted file mode 100644
index cbf3bd3dc0..0000000000
--- a/editor/icons/dark/icon_GUI_unchecked.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 15.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m4 2a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2v-8a2 2 0 0 0 -2 -2h-8zm0.80078 2h6.3984a0.8 0.8 0 0 1 0.80078 0.80078v6.3984a0.8 0.8 0 0 1 -0.80078 0.80078h-6.3984a0.8 0.8 0 0 1 -0.80078 -0.80078v-6.3984a0.8 0.8 0 0 1 0.80078 -0.80078z" fill="#4f4f4f" fill-opacity=".78431"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_vslider_bg.svg b/editor/icons/dark/icon_GUI_vslider_bg.svg
deleted file mode 100644
index 99d01420b6..0000000000
--- a/editor/icons/dark/icon_GUI_vslider_bg.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 15.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="6" y="1037.4" width="4" height="14" ry="0" fill-opacity=".39216" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".32549" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_vsplit_bg.svg b/editor/icons/dark/icon_GUI_vsplit_bg.svg
deleted file mode 100644
index 8294c44611..0000000000
--- a/editor/icons/dark/icon_GUI_vsplit_bg.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="8" height="8" version="1.1" viewBox="0 0 8 7.9999995" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<rect y="1044.4" width="8" height="8" fill-opacity=".098039"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_GUI_vsplitter.svg b/editor/icons/dark/icon_GUI_vsplitter.svg
deleted file mode 100644
index 002108a24a..0000000000
--- a/editor/icons/dark/icon_GUI_vsplitter.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="64" height="8" version="1.1" viewBox="0 0 64 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<path d="m2 1048.4h60" fill="none" stroke="#000000" stroke-linecap="round" stroke-opacity=".39216" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_accept_dialog.svg b/editor/icons/dark/icon_accept_dialog.svg
deleted file mode 100644
index ad33c8e97f..0000000000
--- a/editor/icons/dark/icon_accept_dialog.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.8954-2 2v1h14v-1c0-1.1046-0.89543-2-2-2zm9 1h1v1h-1zm-11 3v8c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.8954 2-2v-8zm9.4746 1.6367 1.4141 1.4141-4.9492 4.9492-2.8281-2.8281 1.4141-1.4141 1.4141 1.4141z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_add.svg b/editor/icons/dark/icon_add.svg
deleted file mode 100644
index 762c95df8f..0000000000
--- a/editor/icons/dark/icon_add.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1v6h-6v2h6v6h2v-6h6v-2h-6v-6h-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_anchor.svg b/editor/icons/dark/icon_anchor.svg
deleted file mode 100644
index 1c00b027d8..0000000000
--- a/editor/icons/dark/icon_anchor.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a3 3 0 0 0 -3 3 3 3 0 0 0 2 2.8262v0.17383h-2v2h2v3.8984a5 5 0 0 1 -3.8281 -3.6035l-1.9336 0.51758a7 7 0 0 0 6.7617 5.1875 7 7 0 0 0 6.7617 -5.1875l-1.9375-0.51953a5 5 0 0 1 -3.8242 3.6035v-3.8965h2v-2h-2v-0.17578a3 3 0 0 0 2 -2.8242 3 3 0 0 0 -3 -3zm0 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_animated_sprite.svg b/editor/icons/dark/icon_animated_sprite.svg
deleted file mode 100644
index a90181fa45..0000000000
--- a/editor/icons/dark/icon_animated_sprite.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#6d90ff">
-<path transform="translate(0 1036.4)" d="m10.5 0a5.5 5.5 0 0 0 -5.3301 4.1699 5.5 5.5 0 0 1 1.3301 -0.16992 5.5 5.5 0 0 1 5.5 5.5 5.5 5.5 0 0 1 -0.16992 1.3301 5.5 5.5 0 0 0 4.1699 -5.3301 5.5 5.5 0 0 0 -5.5 -5.5z" fill-opacity=".39216"/>
-<path transform="translate(0 1036.4)" d="m8.5 2a5.5 5.5 0 0 0 -4.7559 2.748 5.5 5.5 0 0 1 2.7559 -0.74805 5.5 5.5 0 0 1 5.5 5.5 5.5 5.5 0 0 1 -0.74414 2.752 5.5 5.5 0 0 0 2.7441 -4.752 5.5 5.5 0 0 0 -5.5 -5.5z" fill-opacity=".58824"/>
-<path transform="translate(0 1036.4)" d="m6.5 4a5.5 5.5 0 0 0 -5.5 5.5 5.5 5.5 0 0 0 5.5 5.5 5.5 5.5 0 0 0 5.5 -5.5 5.5 5.5 0 0 0 -5.5 -5.5zm-2.5 4a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm5 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm-5 3h5a2.5 2 0 0 1 -1.25 1.7324 2.5 2 0 0 1 -2.5 0 2.5 2 0 0 1 -1.25 -1.7324z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_animated_sprite_3d.svg b/editor/icons/dark/icon_animated_sprite_3d.svg
deleted file mode 100644
index 40dad30a7e..0000000000
--- a/editor/icons/dark/icon_animated_sprite_3d.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff5f5f">
-<path transform="translate(0 1036.4)" d="m10.5 0a5.5 5.5 0 0 0 -5.3301 4.1699 5.5 5.5 0 0 1 1.3301 -0.16992 5.5 5.5 0 0 1 5.5 5.5 5.5 5.5 0 0 1 -0.16992 1.3301 5.5 5.5 0 0 0 4.1699 -5.3301 5.5 5.5 0 0 0 -5.5 -5.5z" fill-opacity=".39216"/>
-<path transform="translate(0 1036.4)" d="m8.5 2a5.5 5.5 0 0 0 -4.7559 2.748 5.5 5.5 0 0 1 2.7559 -0.74805 5.5 5.5 0 0 1 5.5 5.5 5.5 5.5 0 0 1 -0.74414 2.752 5.5 5.5 0 0 0 2.7441 -4.752 5.5 5.5 0 0 0 -5.5 -5.5z" fill-opacity=".58824"/>
-<path transform="translate(0 1036.4)" d="m6.5 4a5.5 5.5 0 0 0 -5.5 5.5 5.5 5.5 0 0 0 5.5 5.5 5.5 5.5 0 0 0 5.5 -5.5 5.5 5.5 0 0 0 -5.5 -5.5zm-2.5 4a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm5 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm-5 3h5a2.5 2 0 0 1 -1.25 1.7324 2.5 2 0 0 1 -2.5 0 2.5 2 0 0 1 -1.25 -1.7324z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_animation.svg b/editor/icons/dark/icon_animation.svg
deleted file mode 100644
index 39b7a44d02..0000000000
--- a/editor/icons/dark/icon_animation.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 2a6 6 0 0 0 -6 6 6 6 0 0 0 6 6 6 6 0 0 0 4 -1.5352v1.5352h0.001953a2 2 0 0 0 0.26562 1 2 2 0 0 0 1.7324 1h1v-1-1h-0.5a0.5 0.49999 0 0 1 -0.5 -0.5v-0.5-5a6 6 0 0 0 -6 -6zm0 1a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm3.4414 2a1 1 0 0 1 0.88867 0.5 1 1 0 0 1 -0.36523 1.3652 1 1 0 0 1 -1.3672 -0.36523 1 1 0 0 1 0.36719 -1.3652 1 1 0 0 1 0.47656 -0.13477zm-6.9531 0.0019531a1 1 0 0 1 0.54688 0.13281 1 1 0 0 1 0.36719 1.3652 1 1 0 0 1 -1.3672 0.36523 1 1 0 0 1 -0.36523 -1.3652 1 1 0 0 1 0.81836 -0.49805zm0.023438 3.998a1 1 0 0 1 0.89062 0.5 1 1 0 0 1 -0.36719 1.3652 1 1 0 0 1 -1.3652 -0.36523 1 1 0 0 1 0.36523 -1.3652 1 1 0 0 1 0.47656 -0.13477zm6.9043 0.0019531a1 1 0 0 1 0.54883 0.13281 1 1 0 0 1 0.36523 1.3652 1 1 0 0 1 -1.3652 0.36523 1 1 0 0 1 -0.36719 -1.3652 1 1 0 0 1 0.81836 -0.49805zm-3.416 1.998a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_animation_player.svg b/editor/icons/dark/icon_animation_player.svg
deleted file mode 100644
index 4de8694a9b..0000000000
--- a/editor/icons/dark/icon_animation_player.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m1 1037.4v14h1.1667v-2h1.8333v2h8v-2h2v2h1v-14h-1v2h-2v-2h-8v2h-1.8333v-2zm1.1667 4h1.8333v2h-1.8333zm9.8333 0h2v2h-2zm-9.8333 4h1.8333v2h-1.8333zm9.8333 0h2v2h-2z" fill="#bb6dff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_animation_tree_player.svg b/editor/icons/dark/icon_animation_tree_player.svg
deleted file mode 100644
index c475b16127..0000000000
--- a/editor/icons/dark/icon_animation_tree_player.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 1v14h1.166v-2h1.834v2h8v-2h2v2h1v-14h-1v2h-2v-2h-8v2h-1.834v-2h-1.166zm4 3h2v1 1h1 3v2h-2v1 1h1 1v2h-1-2a1.0001 1.0001 0 0 1 -1 -1v-1-2h-1a1.0001 1.0001 0 0 1 -1 -1v-1-1-1zm-2.834 1h1.834v2h-1.834v-2zm9.834 0h2v2h-2v-2zm-9.834 4h1.834v2h-1.834v-2zm9.834 0h2v2h-2v-2z" fill="#bb6dff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_area.svg b/editor/icons/dark/icon_area.svg
deleted file mode 100644
index ebea4e4008..0000000000
--- a/editor/icons/dark/icon_area.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 1v2 2h2v-2h2v-2h-4zm10 0v2h2v2h2v-4h-4zm-7 3v2 4 2h8v-2-6h-8zm2 2h4v4h-4v-4zm-5 5v2 2h2 2v-2h-2v-2h-2zm12 0v2h-2v2h4v-2-2h-2z" fill="#ff5f5f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_area_2d.svg b/editor/icons/dark/icon_area_2d.svg
deleted file mode 100644
index f8d5cddef4..0000000000
--- a/editor/icons/dark/icon_area_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 1v2 2h2v-2h2v-2h-4zm10 0v2h2v2h2v-4h-4zm-7 3v2 4 2h8v-2-6h-8zm2 2h4v4h-4v-4zm-5 5v2 2h2 2v-2h-2v-2h-2zm12 0v2h-2v2h4v-2-2h-2z" fill="#6d90ff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_arrow_left.svg b/editor/icons/dark/icon_arrow_left.svg
deleted file mode 100644
index 12d9360c51..0000000000
--- a/editor/icons/dark/icon_arrow_left.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7.9863 3.002a1 1 0 0 0 -0.69336 0.29102l-4 4a1.0001 1.0001 0 0 0 0 1.4141l4 4a1 1 0 0 0 1.4141 0 1 1 0 0 0 0 -1.4141l-2.293-2.293h4.5859a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-4.5859l2.293-2.293a1 1 0 0 0 0 -1.4141 1 1 0 0 0 -0.7207 -0.29102z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" fill-opacity=".99608" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_arrow_right.svg b/editor/icons/dark/icon_arrow_right.svg
deleted file mode 100644
index ca3b4a0267..0000000000
--- a/editor/icons/dark/icon_arrow_right.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 3.002a1 1 0 0 0 -0.69336 0.29102 1 1 0 0 0 0 1.4141l2.293 2.293h-4.5859c-0.55228 0-1 0.4477-1 1s0.44772 1 1 1h4.5859l-2.293 2.293a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l4-4a1.0001 1.0001 0 0 0 0 -1.4141l-4-4a1 1 0 0 0 -0.7207 -0.29102z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" fill-opacity=".99608" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_arrow_up.svg b/editor/icons/dark/icon_arrow_up.svg
deleted file mode 100644
index 08e77d2c65..0000000000
--- a/editor/icons/dark/icon_arrow_up.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m2.9875 1044.4a1.0001 1.0001 0 0 0 1.7168 0.6972l2.293-2.2929v4.5859a1.0001 1.0001 0 1 0 2 0v-4.5859l2.293 2.2929a1.0001 1.0001 0 1 0 1.4141 -1.414l-3.9141-3.9141a1.0001 1.0001 0 0 0 -1.5859 0 1.0001 1.0001 0 0 0 -0.00391 0.01l-3.9102 3.9102a1.0001 1.0001 0 0 0 -0.30273 0.7168z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" fill-opacity=".99608" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_asset_lib.svg b/editor/icons/dark/icon_asset_lib.svg
deleted file mode 100644
index b9ef0db316..0000000000
--- a/editor/icons/dark/icon_asset_lib.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1c-1.6569 0-3 1.3431-3 3v2h-4v7c0 1.108 0.89199 2 2 2h10c1.108 0 2-0.89199 2-2v-7h-4v-2c0-1.6569-1.3431-3-3-3zm0 2c0.55228 0 1 0.44772 1 1v2h-2v-2c0-0.55228 0.44772-1 1-1z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_atlas_texture.svg b/editor/icons/dark/icon_atlas_texture.svg
deleted file mode 100644
index 1d2de12446..0000000000
--- a/editor/icons/dark/icon_atlas_texture.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m6 1037.4-5 2v12l5-2 4 2 5-2v-12l-5 2zm0 2 4 2v8l-4-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_audio_bus_bypass.svg b/editor/icons/dark/icon_audio_bus_bypass.svg
deleted file mode 100644
index d683928e27..0000000000
--- a/editor/icons/dark/icon_audio_bus_bypass.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m6.9707 2c-0.25474 0.01-0.49715 0.11122-0.67773 0.29102l-2.707 2.707h-1.5859c-0.55226 1e-4 -0.99994 0.4477-1 1v4c5.52e-5 0.5523 0.44774 0.9999 1 1h1.5859l2.707 2.707c0.63002 0.6296 1.7067 0.18367 1.707-0.70703v-10c-9.424e-4 -0.5631-0.46642-1.0144-1.0293-0.99805zm3.0293 5v1 1h4v-1-1h-4z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_audio_bus_layout.svg b/editor/icons/dark/icon_audio_bus_layout.svg
deleted file mode 100644
index c6fa4b21ee..0000000000
--- a/editor/icons/dark/icon_audio_bus_layout.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="8" x2="8" y1="1" y2="15" gradientUnits="userSpaceOnUse">
-<stop stop-color="#ff4040" offset="0"/>
-<stop stop-color="#d6cf4b" offset=".5"/>
-<stop stop-color="#00f010" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1c-1.108 0-2 0.89199-2 2v10c0 1.108 0.89199 2 2 2h2c1.108 0 2-0.89199 2-2v-10c0-1.108-0.89199-2-2-2h-2zm8 0c-1.108 0-2 0.89199-2 2v10c0 1.108 0.89199 2 2 2h2c1.108 0 2-0.89199 2-2v-10c0-1.108-0.89199-2-2-2h-2zm-8 1h2c0.55401 0 1 0.44599 1 1v10c0 0.55401-0.44599 1-1 1h-2c-0.55401 0-1-0.44599-1-1v-10c0-0.55401 0.44599-1 1-1z" fill="url(#a)"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_audio_bus_mute.svg b/editor/icons/dark/icon_audio_bus_mute.svg
deleted file mode 100644
index 3f8f0888cc..0000000000
--- a/editor/icons/dark/icon_audio_bus_mute.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m6.9707 2c-0.25474 0.01-0.49715 0.11122-0.67773 0.29102l-2.707 2.707h-1.5859c-0.55226 1e-4 -0.99994 0.4477-1 1v4c5.52e-5 0.5523 0.44774 0.9999 1 1h1.5859l2.707 2.707c0.63002 0.6296 1.7067 0.18367 1.707-0.70703v-10c-9.424e-4 -0.5631-0.46642-1.0144-1.0293-0.99805zm4.0195 2.9902a1.0001 1.0001 0 0 0 -0.69726 1.7168l1.293 1.293-1.293 1.293a1.0001 1.0001 0 1 0 1.4141 1.4141l1.293-1.293 1.293 1.293a1.0001 1.0001 0 1 0 1.4141 -1.4141l-1.293-1.293 1.293-1.293a1.0001 1.0001 0 0 0 -0.72656 -1.7148 1.0001 1.0001 0 0 0 -0.6875 0.30078l-1.293 1.293-1.293-1.293a1.0001 1.0001 0 0 0 -0.7168 -0.30273z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_audio_bus_solo.svg b/editor/icons/dark/icon_audio_bus_solo.svg
deleted file mode 100644
index c4a3f16c04..0000000000
--- a/editor/icons/dark/icon_audio_bus_solo.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m6.9707 2c-0.25474 0.01-0.49715 0.11122-0.67773 0.29102l-2.707 2.707h-1.5859c-0.55226 1e-4 -0.99994 0.4477-1 1v4c5.52e-5 0.5523 0.44774 0.9999 1 1h1.5859l2.707 2.707c0.63002 0.6296 1.7067 0.18367 1.707-0.70703v-10c-9.424e-4 -0.5631-0.46642-1.0144-1.0293-0.99805zm8.0293 2a3 3 0 0 0 -3 3v2a1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 3 -3v-2a1 1 0 0 1 1 -1h1v-2h-1z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_audio_effect_amplify.svg b/editor/icons/dark/icon_audio_effect_amplify.svg
deleted file mode 100644
index 3a37ae26fd..0000000000
--- a/editor/icons/dark/icon_audio_effect_amplify.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="9" x2="9" y1="1037.4" y2="1051.4" gradientTransform="translate(0 -1036.4)" gradientUnits="userSpaceOnUse">
-<stop stop-color="#ff4040" offset="0"/>
-<stop stop-color="#d6cf4b" offset=".5"/>
-<stop stop-color="#00f010" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m15 1-14 7h14zm-13 9v1h2v-1zm2 1v1h-2v-1h-1v4h1v-2h2v2h1v-4zm2-1v5h1v-4h1v4h1v-4h1v-1zm4 1v4h1v-4zm2-1v5h1v-2h2v-3zm1 1h1v1h-1z" fill="url(#a)"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_audio_stream_gibberish.svg b/editor/icons/dark/icon_audio_stream_gibberish.svg
deleted file mode 100644
index 69704c1bbc..0000000000
--- a/editor/icons/dark/icon_audio_stream_gibberish.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 2a2 2 0 0 0 -2 2v5a2 2 0 0 0 2 2h3v3l3-3h4a2 2 0 0 0 2 -2v-5a2 2 0 0 0 -2 -2h-10zm0 4h2v1h-2v-1zm5 0a1 1 0 0 1 1 1v1a1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1v-1a1 1 0 0 1 1 -1zm3 0h2v1h-2v-1z" fill="#4f4f4f" fill-opacity=".99216"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_audio_stream_player.svg b/editor/icons/dark/icon_audio_stream_player.svg
deleted file mode 100644
index 76fb1d8308..0000000000
--- a/editor/icons/dark/icon_audio_stream_player.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="8" x2="8" y1="1" y2="15" gradientUnits="userSpaceOnUse">
-<stop stop-color="#ff4040" offset="0"/>
-<stop stop-color="#d6cf4b" offset=".5"/>
-<stop stop-color="#00f010" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1036.4)" shape-rendering="auto">
-<path d="m10.023 1044.4c-0.56139-0.013-1.0235 0.4264-1.0234 0.9724v5.0542c6.911e-4 0.7482 0.83361 1.2154 1.5 0.8414l4-2.5262c0.66694-0.3743 0.66694-1.3104 0-1.6847l-4-2.5261c-0.14505-0.082-0.30893-0.1269-0.47656-0.131z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-<path transform="translate(0 1036.4)" d="m11.971 1.002a1.0001 1.0001 0 0 0 -0.24609 0.037109l-7 2a1.0001 1.0001 0 0 0 -0.72461 0.96094v5.5508a2.5 2.5 0 0 0 -0.5 -0.050781 2.5 2.5 0 0 0 -2.5 2.5 2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0 2.4961 -2.4121 1.0001 1.0001 0 0 0 0.0039062 -0.087891v-7.2441l5-1.4277v3.1719l2-1v-3.5a1.0001 1.0001 0 0 0 -1.0293 -0.99805z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="url(#a)" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_audio_stream_player_2_d.svg b/editor/icons/dark/icon_audio_stream_player_2_d.svg
deleted file mode 100644
index 09b137d901..0000000000
--- a/editor/icons/dark/icon_audio_stream_player_2_d.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="8" x2="8" y1="1" y2="15" gradientUnits="userSpaceOnUse">
-<stop stop-color="#ff4040" offset="0"/>
-<stop stop-color="#d6cf4b" offset=".5"/>
-<stop stop-color="#00f010" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1036.4)" shape-rendering="auto">
-<path d="m10.023 1044.4c-0.56139-0.013-1.0235 0.4264-1.0234 0.9724v5.0542c6.911e-4 0.7482 0.83361 1.2154 1.5 0.8414l4-2.5262c0.66694-0.3743 0.66694-1.3104 0-1.6847l-4-2.5261c-0.14505-0.082-0.30893-0.1269-0.47656-0.131z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#6d90ff" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-<path transform="translate(0 1036.4)" d="m11.971 1.002a1.0001 1.0001 0 0 0 -0.24609 0.037109l-7 2a1.0001 1.0001 0 0 0 -0.72461 0.96094v5.5508a2.5 2.5 0 0 0 -0.5 -0.050781 2.5 2.5 0 0 0 -2.5 2.5 2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0 2.4961 -2.4121 1.0001 1.0001 0 0 0 0.0039062 -0.087891v-7.2441l5-1.4277v3.1719l2-1v-3.5a1.0001 1.0001 0 0 0 -1.0293 -0.99805z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="url(#a)" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_audio_stream_player_3_d.svg b/editor/icons/dark/icon_audio_stream_player_3_d.svg
deleted file mode 100644
index aa2da200da..0000000000
--- a/editor/icons/dark/icon_audio_stream_player_3_d.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="8" x2="8" y1="1" y2="15" gradientUnits="userSpaceOnUse">
-<stop stop-color="#ff4040" offset="0"/>
-<stop stop-color="#d6cf4b" offset=".5"/>
-<stop stop-color="#00f010" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1036.4)" shape-rendering="auto">
-<path d="m10.023 1044.4c-0.56139-0.013-1.0235 0.4264-1.0234 0.9724v5.0542c6.911e-4 0.7482 0.83361 1.2154 1.5 0.8414l4-2.5262c0.66694-0.3743 0.66694-1.3104 0-1.6847l-4-2.5261c-0.14505-0.082-0.30893-0.1269-0.47656-0.131z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#ff5f5f" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-<path transform="translate(0 1036.4)" d="m11.971 1.002a1.0001 1.0001 0 0 0 -0.24609 0.037109l-7 2a1.0001 1.0001 0 0 0 -0.72461 0.96094v5.5508a2.5 2.5 0 0 0 -0.5 -0.050781 2.5 2.5 0 0 0 -2.5 2.5 2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0 2.4961 -2.4121 1.0001 1.0001 0 0 0 0.0039062 -0.087891v-7.2441l5-1.4277v3.1719l2-1v-3.5a1.0001 1.0001 0 0 0 -1.0293 -0.99805z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="url(#a)" image-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_audio_stream_sample.svg b/editor/icons/dark/icon_audio_stream_sample.svg
deleted file mode 100644
index 7d99e5405e..0000000000
--- a/editor/icons/dark/icon_audio_stream_sample.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="8" x2="8" y1="1" y2="15" gradientUnits="userSpaceOnUse">
-<stop stop-color="#ff4040" offset="0"/>
-<stop stop-color="#d6cf4b" offset=".5"/>
-<stop stop-color="#00f010" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m11.971 1.002c-0.08326 0.00207-0.16593 0.014541-0.24609 0.037109l-7 2c-0.42881 0.12287-0.7244 0.51487-0.72461 0.96094v5.5508c-0.16454-0.033679-0.33205-0.050692-0.5-0.050781-1.3807 0-2.5 1.1193-2.5 2.5-4.75e-6 1.3807 1.1193 2.5 2.5 2.5 1.3456-0.0013 2.4488-1.0674 2.4961-2.4121 0.0025906-0.029226 0.003894-0.058551 0.0039062-0.087891v-7.2441l5-1.4277v3.1719l2-1v-3.5c-9.16e-4 -0.56314-0.4664-1.0145-1.0293-0.99805zm-1.4707 6.998c-0.277 0-0.5 0.223-0.5 0.5v5c0 0.277 0.223 0.5 0.5 0.5s0.5-0.223 0.5-0.5v-5c0-0.277-0.223-0.5-0.5-0.5zm2 1c-0.277 0-0.5 0.223-0.5 0.5v3c0 0.277 0.223 0.5 0.5 0.5s0.5-0.223 0.5-0.5v-3c0-0.277-0.223-0.5-0.5-0.5zm-4 1c-0.277 0-0.5 0.223-0.5 0.5v1c0 0.277 0.223 0.5 0.5 0.5s0.5-0.223 0.5-0.5v-1c0-0.277-0.223-0.5-0.5-0.5zm6 0c-0.277 0-0.5 0.223-0.5 0.5v1c0 0.277 0.223 0.5 0.5 0.5s0.5-0.223 0.5-0.5v-1c0-0.277-0.223-0.5-0.5-0.5z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="url(#a)" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_auto_play.svg b/editor/icons/dark/icon_auto_play.svg
deleted file mode 100644
index 1842a2784c..0000000000
--- a/editor/icons/dark/icon_auto_play.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 2a1.0001 1.0001 0 0 0 -1 1v10a1.0001 1.0001 0 0 0 1 1h8a1.0001 1.0001 0 0 0 0.78125 -0.375l4-5a1.0001 1.0001 0 0 0 0 -1.248l-4-5a1.0001 1.0001 0 0 0 -0.78125 -0.37695h-8zm1 2h6.5195l3.1992 4-3.1992 4h-6.5195v-8zm3 1c-1.1046 0-2 0.8954-2 2v4h1v-2h2v2h1v-4c0-1.1046-0.89543-2-2-2zm0 1a1 1 0 0 1 1 1v1h-2v-1a1 1 0 0 1 1 -1zm3 0v4l2-2-2-2z" color="#000000" color-rendering="auto" fill="#4f4f4f" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_back.svg b/editor/icons/dark/icon_back.svg
deleted file mode 100644
index b28962f321..0000000000
--- a/editor/icons/dark/icon_back.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="8" height="16" version="1.1" viewBox="0 0 8 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m6 1038.4-4 6 4 6" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_back_buffer_copy.svg b/editor/icons/dark/icon_back_buffer_copy.svg
deleted file mode 100644
index 601c1446df..0000000000
--- a/editor/icons/dark/icon_back_buffer_copy.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 1v11h5v-2h-3v-7h6v-2zm6 3v11h8v-11zm2 2h4v7h-4z" fill="#6d90ff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_bake.svg b/editor/icons/dark/icon_bake.svg
deleted file mode 100644
index ec1cbc66ae..0000000000
--- a/editor/icons/dark/icon_bake.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1v2h12v-2h-12zm-1 3v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-9h-14zm2 1h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm-9 2h10v6h-10v-6zm3 1v1h4v-1h-4z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_baked_light.svg b/editor/icons/dark/icon_baked_light.svg
deleted file mode 100644
index d6c6bbf903..0000000000
--- a/editor/icons/dark/icon_baked_light.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1v2h12v-2h-12zm-1 3v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-9h-14zm2 1h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm-9 2h10v6h-10v-6zm3 1v1h4v-1h-4z" fill="#ff5f5f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_baked_light_instance.svg b/editor/icons/dark/icon_baked_light_instance.svg
deleted file mode 100644
index d6c6bbf903..0000000000
--- a/editor/icons/dark/icon_baked_light_instance.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1v2h12v-2h-12zm-1 3v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-9h-14zm2 1h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm-9 2h10v6h-10v-6zm3 1v1h4v-1h-4z" fill="#ff5f5f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_baked_light_sampler.svg b/editor/icons/dark/icon_baked_light_sampler.svg
deleted file mode 100644
index a2db34b648..0000000000
--- a/editor/icons/dark/icon_baked_light_sampler.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1v2h12v-2h-12zm-1 3v9a2 2 0 0 0 2 2h4v-2h-4v-6h4 6 2v-3h-14zm2 1h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm3 0h1v1h-1v-1zm-6 3v1h1v-1h-1zm4 1a1 1 0 0 0 -1 1v4a1 1 0 0 0 1 1h4a1 1 0 0 0 1 -1v-4a1 1 0 0 0 -1 -1h-4zm3 1a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm-2 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#ff5f5f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_bit_map.svg b/editor/icons/dark/icon_bit_map.svg
deleted file mode 100644
index beed73c550..0000000000
--- a/editor/icons/dark/icon_bit_map.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 1v2h2v-2h-2zm2 2v2h2v-2h-2zm2 0h2v-2h-2v2zm2 0v2h2v-2h-2zm2 0h2v-2h-2v2zm2 0v2h2v-2h-2zm2 0h2v-2h-2v2zm0 2v2h2v-2h-2zm0 2h-2v2h2v-2zm0 2v2h2v-2h-2zm0 2h-2v2h2v-2zm0 2v2h2v-2h-2zm-2 0h-2v2h2v-2zm-2 0v-2h-2v2h2zm-2 0h-2v2h2v-2zm-2 0v-2h-2v2h2zm-2 0h-2v2h2v-2zm0-2v-2h-2v2h2zm0-2h2v-2h-2v2zm0-2v-2h-2v2h2zm2 0h2v-2h-2v2zm2 0v2h2v-2h-2zm2 0h2v-2h-2v2zm0 2v2h2v-2h-2zm-2 0h-2v2h2v-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_bitmap_font.svg b/editor/icons/dark/icon_bitmap_font.svg
deleted file mode 100644
index 8d38bf7699..0000000000
--- a/editor/icons/dark/icon_bitmap_font.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m1 1037.4v4h1v-1h1v-1h4v10h-1v1h-1v1h6v-1h-1v-1h-1v-10h4v1h1v1h1v-4z" fill="#5caeff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_blend.svg b/editor/icons/dark/icon_blend.svg
deleted file mode 100644
index 9e9b7259ed..0000000000
--- a/editor/icons/dark/icon_blend.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m9 1v2h2.5859l-3.5859 3.5859-4.293-4.293-1.4141 1.4141 4.293 4.293-4.293 4.293 1.4141 1.4141 4.293-4.293 3.5859 3.5859h-2.5859v2h5a1.0001 1.0001 0 0 0 1 -1v-5h-2v2.5859l-3.5859-3.5859 3.5859-3.5859v2.5859h2v-5a1.0001 1.0001 0 0 0 -1 -1h-5z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" fill-opacity=".99608" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_bone.svg b/editor/icons/dark/icon_bone.svg
deleted file mode 100644
index 43deb5fc4a..0000000000
--- a/editor/icons/dark/icon_bone.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m10.478 1037.4a2.4664 2.4663 0 0 0 -1.7804 0.7205 2.4664 2.4663 0 0 0 -0.31408 3.1041l-3.559 3.5608a2.4664 2.4663 0 0 0 -3.1023 0.3121 2.4664 2.4663 0 0 0 0 3.4876 2.4664 2.4663 0 0 0 1.397 0.6955 2.4664 2.4663 0 0 0 0.69561 1.397 2.4664 2.4663 0 0 0 3.4877 0 2.4664 2.4663 0 0 0 0.31408 -3.1041l3.5609-3.5608a2.4664 2.4663 0 0 0 3.1004 -0.3102 2.4664 2.4663 0 0 0 0 -3.4875 2.4664 2.4663 0 0 0 -1.397 -0.6974 2.4664 2.4663 0 0 0 -0.69561 -1.3971 2.4664 2.4663 0 0 0 -1.7072 -0.7205z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_bone_attachment.svg b/editor/icons/dark/icon_bone_attachment.svg
deleted file mode 100644
index 7209cf603b..0000000000
--- a/editor/icons/dark/icon_bone_attachment.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m10.478 1037.4a2.4664 2.4663 0 0 0 -1.7804 0.7205 2.4664 2.4663 0 0 0 -0.31408 3.1041l-3.559 3.5608a2.4664 2.4663 0 0 0 -3.1023 0.3121 2.4664 2.4663 0 0 0 0 3.4876 2.4664 2.4663 0 0 0 1.397 0.6955 2.4664 2.4663 0 0 0 0.69561 1.397 2.4664 2.4663 0 0 0 3.4877 0 2.4664 2.4663 0 0 0 0.31408 -3.1041l3.5609-3.5608a2.4664 2.4663 0 0 0 3.1004 -0.3102 2.4664 2.4663 0 0 0 0 -3.4875 2.4664 2.4663 0 0 0 -1.397 -0.6974 2.4664 2.4663 0 0 0 -0.69561 -1.3971 2.4664 2.4663 0 0 0 -1.7072 -0.7205z" fill="#ff5f5f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_bone_track.svg b/editor/icons/dark/icon_bone_track.svg
deleted file mode 100644
index 850826ea5e..0000000000
--- a/editor/icons/dark/icon_bone_track.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m10.478 1037.4a2.4664 2.4663 0 0 0 -1.7804 0.7205 2.4664 2.4663 0 0 0 -0.31408 3.1041l-3.559 3.5608a2.4664 2.4663 0 0 0 -3.1023 0.3121 2.4664 2.4663 0 0 0 0 3.4876 2.4664 2.4663 0 0 0 1.397 0.6955 2.4664 2.4663 0 0 0 0.69561 1.397 2.4664 2.4663 0 0 0 3.4877 0 2.4664 2.4663 0 0 0 0.31408 -3.1041l3.5609-3.5608a2.4664 2.4663 0 0 0 3.1004 -0.3102 2.4664 2.4663 0 0 0 0 -3.4875 2.4664 2.4663 0 0 0 -1.397 -0.6974 2.4664 2.4663 0 0 0 -0.69561 -1.3971 2.4664 2.4663 0 0 0 -1.7072 -0.7205z" fill="#bb6dff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_bool.svg b/editor/icons/dark/icon_bool.svg
deleted file mode 100644
index 56fcba5833..0000000000
--- a/editor/icons/dark/icon_bool.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m0 4v4 4h2a3 3 0 0 0 2.5 -1.3457 3 3 0 0 0 2.5 1.3457 3 3 0 0 0 2 -0.76758 3 3 0 0 0 2 0.76758 3 3 0 0 0 2.5 -1.3457 3 3 0 0 0 2.5 1.3457v-2a1 1 0 0 1 -1 -1v-5h-2v2.7695a3 3 0 0 0 -2 -0.76953 3 3 0 0 0 -2 0.76758 3 3 0 0 0 -2 -0.76758 3 3 0 0 0 -2.5 1.3457 3 3 0 0 0 -2.5 -1.3457v-2h-2zm2 4a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v-2zm5 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm4 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#cf68ea"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_box_shape.svg b/editor/icons/dark/icon_box_shape.svg
deleted file mode 100644
index b11edb16ca..0000000000
--- a/editor/icons/dark/icon_box_shape.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill-rule="evenodd">
-<path transform="translate(0 1036.4)" d="m8 1l-7 3v8l7 3 7-3v-8l-7-3z" fill="#2998ff"/>
-<path d="m8 1051.4-7-3v-8l7 3z" fill="#68b6ff"/>
-<path d="m1 1040.4 7 3 7-3-7-3z" fill="#a2d2ff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_bus_vu_db.svg b/editor/icons/dark/icon_bus_vu_db.svg
deleted file mode 100644
index 83163a2c28..0000000000
--- a/editor/icons/dark/icon_bus_vu_db.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="32" height="128" version="1.1" viewBox="0 0 32 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="16" x2="16" y2="128" gradientUnits="userSpaceOnUse">
-<stop stop-color="#ff4040" offset="0"/>
-<stop stop-color="#d6cf4b" offset=".5"/>
-<stop stop-color="#00f010" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -924.36)">
-<path transform="translate(0 924.36)" d="m1.5 0c-0.831 0-1.5 0.669-1.5 1.5 0 0.831 0.669 1.5 1.5 1.5h2c0.831 0 1.5-0.669 1.5-1.5 0-0.831-0.669-1.5-1.5-1.5h-2zm0 7c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5 1.5-0.669 1.5-1.5-0.669-1.5-1.5-1.5zm22.5 3.75c-1.5 0-3 1.3056-3 3.25-0.01912 1.3523 2.0191 1.3523 2 0 0-1.0556 0.5-1.25 1-1.25s1 0.19444 1 1.25c0 0.59157-0.35893 1.156-1.1914 1.8633-0.83248 0.70724-2.0616 1.4518-3.3574 2.3008-0.82974 0.54516-0.44398 1.8356 0.54883 1.8359h5c1.3523 0.01912 1.3523-2.0191 0-2h-1.7852c0.28375-0.20667 0.63106-0.39443 0.88867-0.61328 1.0302-0.87519 1.8965-1.9783 1.8965-3.3867 0-1.9444-1.5-3.25-3-3.25zm-7.0293 0.25195c-0.14519 0.0037-0.28782 0.03907-0.41797 0.10352l-2 1c-1.1924 0.59646-0.29787 2.3855 0.89453 1.7891l0.55273-0.27539v5.3809c-0.01913 1.3523 2.0191 1.3523 2 0v-7c-9.16e-4 -0.56314-0.4664-1.0145-1.0293-0.99805zm-15.471 2.998c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5h2c0.831 0 1.5-0.669 1.5-1.5s-0.669-1.5-1.5-1.5h-2zm0 7c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5 1.5-0.669 1.5-1.5-0.669-1.5-1.5-1.5zm21.5 3c-0.554 0-1 0.446-1 1v1 2h-0.92969c-0.02343-8.24e-4 -0.046882-8.24e-4 -0.070312 0-1.0702 0-2.0626 0.57318-2.5977 1.5-0.5351 0.92681-0.5351 2.0732 0 3 0.5351 0.92681 1.5275 1.5 2.5977 1.5h2c0.554 0 1-0.446 1-1v-8c0-0.554-0.446-1-1-1zm4 0c-0.554 0-1 0.446-1 1v8c0 0.554 0.446 1 1 1h2c1.0702 0 2.0626-0.57319 2.5977-1.5 0.5351-0.92682 0.5351-2.0732 0-3-0.10504-0.18193-0.23173-0.34698-0.36914-0.5 0.1378-0.15331 0.26385-0.31764 0.36914-0.5 0.5351-0.92682 0.5351-2.0732 0-3-0.5351-0.92682-1.5275-1.5-2.5977-1.5h-2zm-14 1c-1.6447 0-3 1.3553-3 3v3c0 1.6447 1.3553 3 3 3s3-1.3553 3-3v-3c0-1.6447-1.3553-3-3-3zm15 1h1c0.35887 0 0.6858 0.18921 0.86523 0.5 0.17944 0.31079 0.17944 0.68921 0 1-0.17943 0.31079-0.50636 0.5-0.86523 0.5h-0.070312-0.92969v-2zm-15 1c0.5713 0 1 0.4287 1 1v3c0 0.5713-0.4287 1-1 1s-1-0.4287-1-1v-3c0-0.5713 0.4287-1 1-1zm-11.5 1c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5h2c0.831 0 1.5-0.669 1.5-1.5s-0.669-1.5-1.5-1.5h-2zm19.5 2h1v2h-0.92969c-0.02343-8.24e-4 -0.046882-8.24e-4 -0.070312 0-0.35887 0-0.6858-0.18921-0.86523-0.5-0.17944-0.31079-0.17944-0.68921 0-1 0.17943-0.31079 0.50636-0.5 0.86523-0.5zm7 0h1c0.35887 0 0.6858 0.18921 0.86523 0.5 0.17944 0.31079 0.17944 0.68921 0 1-0.17943 0.31079-0.50636 0.5-0.86523 0.5h-1v-2zm-26.5 5c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5 1.5-0.669 1.5-1.5-0.669-1.5-1.5-1.5zm22.5 2.75c-1.5 0-3 1.3056-3 3.25-0.01912 1.3523 2.0191 1.3523 2 0 0-1.0556 0.5-1.25 1-1.25s1 0.19444 1 1.25c0 0.59157-0.35893 1.156-1.1914 1.8633-0.83248 0.70724-2.0616 1.4518-3.3574 2.3008-0.82974 0.54516-0.44398 1.8356 0.54883 1.8359h5c1.3523 0.01913 1.3523-2.0191 0-2h-1.7852c0.28375-0.20667 0.63106-0.39443 0.88867-0.61328 1.0302-0.87519 1.8965-1.9783 1.8965-3.3867 0-1.9444-1.5-3.25-3-3.25zm-7.0293 0.25195c-0.14519 0.0037-0.28782 0.03907-0.41797 0.10352l-2 1c-1.1924 0.59646-0.29787 2.3855 0.89453 1.7891l0.55273-0.27539v5.3809c-0.01913 1.3523 2.0191 1.3523 2 0v-7c-9.16e-4 -0.56314-0.4664-1.0145-1.0293-0.99805zm-15.471 3.998c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5h2c0.831 0 1.5-0.669 1.5-1.5s-0.669-1.5-1.5-1.5h-2zm7.5 1v2h3v-2h-3zm-7 6c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5 1.5-0.669 1.5-1.5-0.669-1.5-1.5-1.5zm15.986 3.75c-1.5 0-3 1.3056-3 3.25-0.01913 1.3523 2.0191 1.3523 2 0 0-1.0556 0.5-1.25 1-1.25s1 0.19444 1 1.25c0 0.59157-0.35893 1.156-1.1914 1.8633s-2.0616 1.4518-3.3574 2.3008c-0.82974 0.54516-0.44398 1.8356 0.54883 1.8359h5c1.3523 0.01913 1.3523-2.0191 0-2h-1.7871c0.2841-0.20689 0.63273-0.39419 0.89062-0.61328 1.0302-0.87519 1.8965-1.9783 1.8965-3.3867 0-1.9444-1.5-3.25-3-3.25zm7.0469 0.23828c-0.36561-0.0093-0.70715 0.18167-0.89062 0.49805l-3 5c-0.39877 0.66633 0.080888 1.5131 0.85742 1.5137h3v1c-0.01912 1.3523 2.0191 1.3523 2 0v-2c-5.5e-5 -0.55226-0.44774-0.99994-1-1h-2.2324l2.0898-3.4844c0.40768-0.65656-0.05163-1.5077-0.82422-1.5273zm-23.533 3.0117c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5h2c0.831 0 1.5-0.669 1.5-1.5s-0.669-1.5-1.5-1.5h-2zm7.5 2v2h3v-2h-3zm-7.5 5c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5 1.5-0.669 1.5-1.5-0.669-1.5-1.5-1.5zm24.547 4.9961c-0.12355-0.0037-0.24673 0.01547-0.36328 0.05664 0 0-0.98349 0.3331-1.8906 1.2402-0.90714 0.90717-1.793 2.457-1.793 4.707-6.13e-4 0.07218 0.006604 0.14421 0.021484 0.21484 0.11389 1.5445 1.4072 2.7852 2.9785 2.7852 1.645 0 3-1.355 3-3 0-1.645-1.355-3-3-3-0.01533 0-0.029642 0.003706-0.044922 0.003906 0.084-0.10099 0.16695-0.21188 0.25195-0.29688 0.59286-0.59287 1.1094-0.75781 1.1094-0.75781 1.0726-0.33926 0.85487-1.9171-0.26953-1.9531zm-9.0605 0.005859c-1.0407 0.006928-2.0405 0.55674-2.584 1.498a1 1 0 0 0 0.36523 1.3672 1 1 0 0 0 1.3672 -0.36719c0.24596-0.42602 0.74477-0.6077 1.207-0.43945 0.46226 0.16824 0.728 0.62882 0.64258 1.1133-0.085422 0.48445-0.49245 0.82617-0.98438 0.82617a1 1 0 0 0 -1 1 1 1 0 0 0 1 1c0.49193 0 0.89896 0.34368 0.98438 0.82812 0.085422 0.48446-0.18032 0.94508-0.64258 1.1133-0.46226 0.1683-0.96107-0.015436-1.207-0.44141-0.27644-0.47871-0.88884-0.6423-1.3672-0.36523-0.47752 0.27639-0.64095 0.88733-0.36523 1.3652 0.72462 1.2553 2.2612 1.816 3.623 1.3203 1.3618-0.4956 2.1813-1.9126 1.9297-3.3398-0.1003-0.56884-0.37254-1.0676-0.74023-1.4746 0.37098-0.40777 0.63937-0.91234 0.74023-1.4844 0.25166-1.4272-0.56786-2.8442-1.9297-3.3398-0.34046-0.12392-0.69218-0.182-1.0391-0.17969zm-15.486 1.998c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5h2c0.831 0 1.5-0.669 1.5-1.5s-0.669-1.5-1.5-1.5h-2zm7.5 2v2h3v-2h-3zm16 1c0.56413 0 1 0.43587 1 1s-0.43587 1-1 1-1-0.43587-1-1 0.43587-1 1-1zm-23.5 4c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5 1.5-0.669 1.5-1.5-0.669-1.5-1.5-1.5zm16.533 3.9883c-0.36561-0.0093-0.70715 0.18167-0.89062 0.49805l-3 5c-0.39877 0.66633 0.080888 1.5131 0.85742 1.5137h3v1c-0.01912 1.3523 2.0191 1.3523 2 0v-2c-5.5e-5 -0.55226-0.44774-0.99994-1-1h-2.2324l2.0898-3.4844c0.40768-0.65656-0.05163-1.5077-0.82422-1.5273zm6.9668 0.011719c-1.645 0-3 1.355-3 3 0 0.769 0.30369 1.4666 0.78711 2-0.48282 0.53332-0.78711 1.2315-0.78711 2 0 1.645 1.355 3 3 3s3-1.355 3-3c0-0.76846-0.30429-1.4667-0.78711-2 0.48342-0.53345 0.78711-1.231 0.78711-2 0-1.645-1.355-3-3-3zm0 2c0.56413 0 1 0.4359 1 1 0 0.5642-0.43587 1-1 1s-1-0.4358-1-1c0-0.5641 0.43587-1 1-1zm-23.5 1c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5h2c0.831 0 1.5-0.669 1.5-1.5s-0.669-1.5-1.5-1.5h-2zm7.5 2v2h3v-2h-3zm16 1c0.56413 0 1 0.4359 1 1 0 0.5642-0.43587 1-1 1s-1-0.4358-1-1c0-0.5641 0.43587-1 1-1zm-23.5 4c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5 1.5-0.669 1.5-1.5-0.669-1.5-1.5-1.5zm16.447 3.9824c-0.08995 0.0063-0.17865 0.024647-0.26367 0.054687 0 0-0.98349 0.33509-1.8906 1.2422-0.90714 0.9068-1.793 2.457-1.793 4.707-6.13e-4 0.0722 0.006604 0.14421 0.021484 0.21484 0.11389 1.5445 1.4072 2.7852 2.9785 2.7852 1.645 0 3-1.355 3-3 0-1.6451-1.355-3-3-3-0.01533 0-0.029642 0.003706-0.044922 0.003906 0.084-0.10099 0.16695-0.21187 0.25195-0.29688 0.59286-0.5929 1.1094-0.75781 1.1094-0.75781 1.0726-0.33926 0.85487-1.9171-0.26953-1.9531-0.03318-0.0017-0.066429-0.0017-0.099609 0zm7.0527 0.017578c-1.6447 0-3 1.3553-3 3v3c0 1.6447 1.3553 3 3 3s3-1.3553 3-3v-3c0-1.6447-1.3553-3-3-3zm0 2c0.5713 0 1 0.4287 1 1v3c0 0.5713-0.4287 1-1 1s-1-0.4287-1-1v-3c0-0.5713 0.4287-1 1-1zm-23.5 1c-0.831 0-1.5 0.669-1.5 1.5 0 0.831 0.669 1.5 1.5 1.5h2c0.831 0 1.5-0.669 1.5-1.5 0-0.831-0.669-1.5-1.5-1.5h-2zm15.5 1.9863c0.56413 0 1 0.4358 1 1 0 0.5641-0.43587 1-1 1s-1-0.4359-1-1c0-0.5642 0.43587-1 1-1zm-8 0.013672v2h3v-2h-3zm-7.5 5c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5 1.5-0.669 1.5-1.5-0.669-1.5-1.5-1.5zm22.5 3.75c-1.5 0-3 1.3056-3 3.25-0.01912 1.3523 2.0191 1.3523 2 0 0-1.0555 0.5-1.25 1-1.25s1 0.1945 1 1.25c0 0.5916-0.35893 1.1561-1.1914 1.8633-0.83248 0.7072-2.0616 1.4518-3.3574 2.3008-0.82975 0.54515-0.44398 1.8356 0.54883 1.8359h5c1.3523 0.0191 1.3523-2.0191 0-2h-1.7852c0.28375-0.2066 0.63106-0.39438 0.88867-0.61328 1.0302-0.8751 1.8965-1.9782 1.8965-3.3867 0-1.9444-1.5-3.25-3-3.25zm-10 0.25c-1.3523-0.0191-1.3523 2.0191 0 2h3.3828l-3.2773 6.5527c-0.59596 1.1926 1.1931 2.0871 1.7891 0.89454l4-8c0.33239-0.66495-0.15113-1.4472-0.89453-1.4473h-5zm-12.5 3c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5h2c0.831 0 1.5-0.669 1.5-1.5s-0.669-1.5-1.5-1.5h-2zm7.5 2v2h3v-2h-3zm-7.5 5c-0.831 0-1.5 0.669-1.5 1.5s0.669 1.5 1.5 1.5 1.5-0.669 1.5-1.5-0.669-1.5-1.5-1.5z" fill="url(#a)"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_bus_vu_empty.svg b/editor/icons/dark/icon_bus_vu_empty.svg
deleted file mode 100644
index 15d8274461..0000000000
--- a/editor/icons/dark/icon_bus_vu_empty.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="16" height="128" version="1.1" viewBox="0 0 16 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="8" x2="8" y1="2" y2="126" gradientTransform="translate(0 924.36)" gradientUnits="userSpaceOnUse">
-<stop stop-color="#ff4040" offset="0"/>
-<stop stop-color="#d6cf4b" offset=".5"/>
-<stop stop-color="#00f010" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -924.36)">
-<path d="m3 926.36c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 5c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1z" fill="url(#a)"/>
-<path transform="translate(0 924.36)" d="m3 2c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 5c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10z" fill-opacity=".19608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_bus_vu_frozen.svg b/editor/icons/dark/icon_bus_vu_frozen.svg
deleted file mode 100644
index 99884d33fc..0000000000
--- a/editor/icons/dark/icon_bus_vu_frozen.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="128" version="1.1" viewBox="0 0 16 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="8" x2="8" y1="2" y2="126" gradientUnits="userSpaceOnUse">
-<stop stop-color="#62aeff" offset="0"/>
-<stop stop-color="#75d1e6" offset=".5"/>
-<stop stop-color="#84ffee" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -924.36)">
-<path transform="translate(0 924.36)" d="m3 2c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 5c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10z" fill="url(#a)" opacity=".7"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_bus_vu_full.svg b/editor/icons/dark/icon_bus_vu_full.svg
deleted file mode 100644
index 1187841d71..0000000000
--- a/editor/icons/dark/icon_bus_vu_full.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="128" version="1.1" viewBox="0 0 16 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="8" x2="8" y1="2" y2="126" gradientUnits="userSpaceOnUse">
-<stop stop-color="#ff4040" offset="0"/>
-<stop stop-color="#d6cf4b" offset=".5"/>
-<stop stop-color="#00f010" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -924.36)">
-<path transform="translate(0 924.36)" d="m3 2c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 5c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10zm0 3c-0.554 0-1 0.446-1 1s0.446 1 1 1h10c0.554 0 1-0.446 1-1s-0.446-1-1-1h-10z" fill="url(#a)"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_button.svg b/editor/icons/dark/icon_button.svg
deleted file mode 100644
index 078f47b396..0000000000
--- a/editor/icons/dark/icon_button.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1v3.1328l-1.4453-0.96484-1.1094 1.6641 3 2a1.0001 1.0001 0 0 0 1.1094 0l3-2-1.1094-1.6641-1.4453 0.96484v-3.1328h-2zm-1.5 8c-0.831 0-1.5 0.669-1.5 1.5v1.5h-2v2h12v-2h-2v-1.5c0-0.831-0.669-1.5-1.5-1.5h-5z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_button_group.svg b/editor/icons/dark/icon_button_group.svg
deleted file mode 100644
index ceb9d3ada8..0000000000
--- a/editor/icons/dark/icon_button_group.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m4 1c-0.554 0-1 0.446-1 1v12c0 0.554 0.446 1 1 1h8c0.554 0 1-0.446 1-1v-12c0-0.554-0.446-1-1-1h-8zm1 1h2c0.554 0 1 0.446 1 1s-0.446 1-1 1h-2c-0.554 0-1-0.446-1-1s0.446-1 1-1zm6 0c0.55228 0 1 0.44772 1 1s-0.44772 1-1 1-1-0.44772-1-1 0.44772-1 1-1zm-5 4a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2zm5 0c0.55228 0 1 0.44772 1 1s-0.44772 1-1 1-1-0.44772-1-1 0.44772-1 1-1zm0 4c0.55228 0 1 0.44772 1 1s-0.44772 1-1 1-1-0.44772-1-1 0.44772-1 1-1zm-7 2h1v2h-1v-2zm2 0h1v2h-1v-2zm2 0h1v2h-1v-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_camera.svg b/editor/icons/dark/icon_camera.svg
deleted file mode 100644
index ee80e38cf2..0000000000
--- a/editor/icons/dark/icon_camera.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m9 1038.4a3 3 0 0 0 -2.9883 2.7774 3 3 0 0 0 -2.0117 -0.7774 3 3 0 0 0 -3 3 3 3 0 0 0 2 2.8243v2.1757c0 0.554 0.44599 1 1 1h6c0.55401 0 1-0.446 1-1v-1l3 2v-6l-3 2v-1.7695a3 3 0 0 0 1 -2.2305 3 3 0 0 0 -3 -3z" fill="#ff5f5f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_camera_2d.svg b/editor/icons/dark/icon_camera_2d.svg
deleted file mode 100644
index 978f5b8964..0000000000
--- a/editor/icons/dark/icon_camera_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m9 1038.4a3 3 0 0 0 -2.9883 2.7774 3 3 0 0 0 -2.0117 -0.7774 3 3 0 0 0 -3 3 3 3 0 0 0 2 2.8243v2.1757c0 0.554 0.44599 1 1 1h6c0.55401 0 1-0.446 1-1v-1l3 2v-6l-3 2v-1.7695a3 3 0 0 0 1 -2.2305 3 3 0 0 0 -3 -3z" fill="#6d90ff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_canvas_item.svg b/editor/icons/dark/icon_canvas_item.svg
deleted file mode 100644
index a8c9910867..0000000000
--- a/editor/icons/dark/icon_canvas_item.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m2.9208 1046.4c-0.26373 0.3-0.4204 0.7296-0.4204 1.2383 0 1.6277-3.1381-0.1781-0.33757 2.6703 0.88382 0.899 2.6544 0.6701 3.5382-0.2288 0.88384-0.899 0.88382-2.3565 0-3.2554-1.1002-1.1191-2.2001-1.0845-2.7803-0.4244zm2.3802-1.6103 2.4005 2.4416 6.8014-6.9177c0.66286-0.6742 0.66286-1.7673 0-2.4415-0.66288-0.6741-1.7376-0.6741-2.4005 0z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_canvas_item_material.svg b/editor/icons/dark/icon_canvas_item_material.svg
deleted file mode 100644
index 821d882471..0000000000
--- a/editor/icons/dark/icon_canvas_item_material.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3.1035 3a7 7 0 0 0 -1.418 2h12.631a7 7 0 0 0 -1.4277 -2h-9.7852z" fill="#ffe337"/>
-<path transform="translate(0 1036.4)" d="m1.6855 5a7 7 0 0 0 -0.60547 2h13.842a7 7 0 0 0 -0.60547 -2h-12.631z" fill="#74ff34"/>
-<path transform="translate(0 1036.4)" d="m1.0801 7a7 7 0 0 0 -0.080078 1 7 7 0 0 0 0.078125 1h13.842a7 7 0 0 0 0.080078 -1 7 7 0 0 0 -0.078125 -1h-13.842z" fill="#2cff98"/>
-<path transform="translate(0 1036.4)" d="m1.0781 9a7 7 0 0 0 0.60547 2h12.631a7 7 0 0 0 0.60547 -2h-13.842z" fill="#22ccff"/>
-<path transform="translate(0 1036.4)" d="m3.1113 13a7 7 0 0 0 4.8887 2 7 7 0 0 0 4.8965 -2h-9.7852z" fill="#ff2781"/>
-<path transform="translate(0 1036.4)" d="m1.6836 11a7 7 0 0 0 1.4277 2h9.7852a7 7 0 0 0 1.418 -2h-12.631z" fill="#702aff"/>
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -4.8965 2h9.7852a7 7 0 0 0 -4.8887 -2z" fill="#ff2929"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_canvas_item_shader.svg b/editor/icons/dark/icon_canvas_item_shader.svg
deleted file mode 100644
index f1dbc569f4..0000000000
--- a/editor/icons/dark/icon_canvas_item_shader.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m13.303 1c-0.4344 0-0.86973 0.16881-1.2012 0.50586l-1.4688 1.4941h4.3418c0.082839-0.52789-0.072596-1.0872-0.47266-1.4941-0.33144-0.33705-0.76482-0.50586-1.1992-0.50586z" fill="#ff2929"/>
-<path transform="translate(0 1036.4)" d="m10.633 3l-1.9668 2h4.8008l1.0352-1.0527c0.2628-0.2673 0.41824-0.60049 0.47266-0.94727h-4.3418z" fill="#ffe337"/>
-<path transform="translate(0 1036.4)" d="m8.666 5l-1.9648 2h4.7988l1.9668-2h-4.8008z" fill="#74ff34"/>
-<path transform="translate(0 1036.4)" d="m6.7012 7l-1.4004 1.4238 0.56641 0.57617h3.668l1.9648-2h-4.7988z" fill="#2cff98"/>
-<path transform="translate(0 1036.4)" d="m5.8672 9l1.834 1.8652 1.834-1.8652h-3.668zm-1.752 0.57812c-0.48501-0.048725-0.90521 0.12503-1.1953 0.45508-0.21472 0.24426-0.35243 0.57797-0.39844 0.9668h3.5625c-0.10223-0.1935-0.22224-0.37965-0.38281-0.54297-0.55011-0.55955-1.1009-0.83018-1.5859-0.87891z" fill="#22ccff"/>
-<path transform="translate(0 1036.4)" d="m1.3242 13c0.18414 0.24071 0.43707 0.53374 0.83789 0.94141 0.88382 0.899 2.6552 0.67038 3.5391-0.22852 0.20747-0.21103 0.36064-0.45476 0.4707-0.71289h-4.8477z" fill="#ff2781"/>
-<path transform="translate(0 1036.4)" d="m2.5215 11c-0.0105 0.088737-0.021484 0.17696-0.021484 0.27148 0 1.3947-2.2782 0.28739-1.1758 1.7285h4.8477c0.27363-0.64173 0.24047-1.3785-0.087891-2h-3.5625z" fill="#702aff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_canvas_item_shader_graph.svg b/editor/icons/dark/icon_canvas_item_shader_graph.svg
deleted file mode 100644
index 015765c775..0000000000
--- a/editor/icons/dark/icon_canvas_item_shader_graph.svg
+++ /dev/null
@@ -1,19 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<defs>
-<clipPath id="a">
-<path d="m8.0625 1025.9a3.375 3 0 0 0 -3.375 3 3.375 3 0 0 0 1.6875 2.5957v9.8115a3.375 3 0 0 0 -1.6875 2.5928 3.375 3 0 0 0 3.375 3 3.375 3 0 0 0 3.375 -3 3.375 3 0 0 0 -1.6875 -2.5957v-8.7832l11.931 10.605a3.375 3 0 0 0 -0.11865 0.7735 3.375 3 0 0 0 3.375 3 3.375 3 0 0 0 3.375 -3 3.375 3 0 0 0 -3.375 -3 3.375 3 0 0 0 -0.87341 0.1025l-11.928-10.602h9.8844a3.375 3 0 0 0 2.9169 1.5 3.375 3 0 0 0 3.375 -3 3.375 3 0 0 0 -3.375 -3 3.375 3 0 0 0 -2.9202 1.5h-11.038a3.375 3 0 0 0 -2.9169 -1.5z" fill="#000000"/>
-</clipPath>
-</defs>
-<g transform="translate(0 -1036.4)">
-<g transform="matrix(.59259 0 0 .66667 -1.7778 353.45)" clip-path="url(#a)">
-<rect x="3" y="1025.9" width="27" height="3" fil#ff2929070"/>
-<rect x="3" y="1028.9" width="27" height="3" fil#ffe337b70"/>
-<rect x="3" y="1031.9" width="27" height="3" fil#74ff34f70"/>
-<rect x="3" y="1034.9" width="27" height="3" fil#2cff98fb9"/>
-<rect x="3" y="1037.9" width="27" height="3" fil#22ccffeff"/>
-<rect x="3" y="1043.9" width="27" height="3" fil#ff27810ac"/>
-<rect x="3" y="1040.9" width="27" height="3" fil#702aff0ff"/>
-</g>
-<ellipse cx="3" cy="1039.4" r="2" fill="#6e6e6e"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_canvas_layer.svg b/editor/icons/dark/icon_canvas_layer.svg
deleted file mode 100644
index 6a12976100..0000000000
--- a/editor/icons/dark/icon_canvas_layer.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2v6h1v-6a1 1 0 0 1 1 -1h6v-1h-6zm10.303 0c-0.4344 0-0.86973 0.16881-1.2012 0.50586l-6.8008 6.918 2.4004 2.4414 6.8008-6.918c0.66286-0.6742 0.66286-1.7672 0-2.4414-0.33144-0.33705-0.76482-0.50586-1.1992-0.50586zm0.69727 6v6a1 1 0 0 1 -1 1h-6v1h6a2 2 0 0 0 2 -2v-6h-1zm-9.8848 2.5781c-0.48501-0.048725-0.90521 0.12503-1.1953 0.45508-0.26373 0.3-0.41992 0.72958-0.41992 1.2383 0 1.6277-3.1385-0.17848-0.33789 2.6699 0.88382 0.899 2.6552 0.67038 3.5391-0.22852 0.88384-0.899 0.88382-2.357 0-3.2559-0.55011-0.55955-1.1009-0.83018-1.5859-0.87891z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_canvas_modulate.svg b/editor/icons/dark/icon_canvas_modulate.svg
deleted file mode 100644
index 997992ef85..0000000000
--- a/editor/icons/dark/icon_canvas_modulate.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m1 1037.4v14h14v-14zm2 2h10v10h-10z" fill="#6d90ff"/>
-<path d="m12 1048.4h-5l5-5z" fill="#70bfff" fill-rule="evenodd"/>
-<path d="m4 1040.4h5l-5 5z" fill="#ff2929" fill-rule="evenodd"/>
-<path d="m4 1048.4v-3l5-5h3v3l-5 5z" fill="#7aff70" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_capsule_mesh.svg b/editor/icons/dark/icon_capsule_mesh.svg
deleted file mode 100644
index 512a307b9c..0000000000
--- a/editor/icons/dark/icon_capsule_mesh.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m8 1037.4c-2.7527 0-5 2.2419-5 4.9903v4.0175c0 2.7484 2.2473 4.9922 5 4.9922 2.7527 0 5-2.2438 5-4.9922v-4.0175c0-2.7484-2.2473-4.9903-5-4.9903zm-1.0059 2.1264v4.8576c-0.66556-0.1047-1.2973-0.372-1.9941-0.6618v-1.3222c0-1.3474 0.79838-2.4648 1.9941-2.8736zm2.0118 0c1.1957 0.4088 1.9941 1.5262 1.9941 2.8736v1.3451c-0.68406 0.3054-1.3142 0.5732-1.9941 0.6663zm-4.0059 6.334c0.67836 0.2231 1.3126 0.447 1.9941 0.5264v2.8848c-1.1957-0.4092-1.9941-1.5242-1.9941-2.8716zm6 0.03v0.5094c0 1.3474-0.79838 2.4619-1.9941 2.8711v-2.8711c0.68606-0.068 1.3207-0.2828 1.9941-0.5094z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#fea900" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_capsule_shape.svg b/editor/icons/dark/icon_capsule_shape.svg
deleted file mode 100644
index 2940816d60..0000000000
--- a/editor/icons/dark/icon_capsule_shape.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m8 1037.4c-2.7527 0-5 2.2419-5 4.9903v4.0175c0 2.7484 2.2473 4.9922 5 4.9922 2.7527 0 5-2.2438 5-4.9922v-4.0175c0-2.7484-2.2473-4.9903-5-4.9903z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#68b6ff" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-<circle cx="6.5" cy="1040.9" r="1.5" fill="#a2d2ff" stroke-width="0"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_capsule_shape_2d.svg b/editor/icons/dark/icon_capsule_shape_2d.svg
deleted file mode 100644
index 3549a289e0..0000000000
--- a/editor/icons/dark/icon_capsule_shape_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1c-2.77 0-5 2.23-5 5v4c0 2.77 2.23 5 5 5s5-2.23 5-5v-4c0-2.77-2.23-5-5-5zm0 2c1.662 0 3 1.338 3 3v4c0 1.662-1.338 3-3 3s-3-1.338-3-3v-4c0-1.662 1.338-3 3-3z" fill="#68b6ff" stroke-width="0"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_center_container.svg b/editor/icons/dark/icon_center_container.svg
deleted file mode 100644
index 6c847f1db9..0000000000
--- a/editor/icons/dark/icon_center_container.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2h-10zm0 2h10v10h-10v-10zm3 1l2 2 2-2h-4zm-2 2v4l2-2-2-2zm8 0l-2 2 2 2v-4zm-4 4l-2 2h4l-2-2z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_check_box.svg b/editor/icons/dark/icon_check_box.svg
deleted file mode 100644
index 0b7bbdb8a6..0000000000
--- a/editor/icons/dark/icon_check_box.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 2c-1.1046 0-2 0.89543-2 2v9c0 1.1046 0.89543 2 2 2h9c1.1046 0 2-0.89543 2-2v-4.9277l-2 2v2.9277h-9v-9h6.5859l2-2zm9.3633 2.0508-4.9492 4.9492-1.4141-1.4141-1.4141 1.4141 2.8281 2.8281 6.3633-6.3633z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_check_button.svg b/editor/icons/dark/icon_check_button.svg
deleted file mode 100644
index c49beca262..0000000000
--- a/editor/icons/dark/icon_check_button.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m5 4a4 4 0 0 0 -4 4 4 4 0 0 0 4 4h6a4 4 0 0 0 4 -4 4 4 0 0 0 -4 -4h-6zm0 2h2.541a4 4 0 0 0 -0.54102 2 4 4 0 0 0 0.54102 2h-2.541a2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_checkerboard.svg b/editor/icons/dark/icon_checkerboard.svg
deleted file mode 100644
index dcb8adb2d7..0000000000
--- a/editor/icons/dark/icon_checkerboard.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -988.36)" fill="#000000" stroke-linecap="round" stroke-linejoin="round">
-<rect y="988.36" width="64" height="64" fill-opacity=".19608" stroke-width="2"/>
-<path transform="translate(0 988.36)" d="m0 0v16h16v-16h-16zm16 16v16h16v-16h-16zm16 0h16v-16h-16v16zm16 0v16h16v-16h-16zm0 16h-16v16h16v-16zm0 16v16h16v-16h-16zm-16 0h-16v16h16v-16zm-16 0v-16h-16v16h16z" fill-opacity=".39216" stroke-width="8"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_circle_shape_2d.svg b/editor/icons/dark/icon_circle_shape_2d.svg
deleted file mode 100644
index bfe5aec81a..0000000000
--- a/editor/icons/dark/icon_circle_shape_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m8 1038.4a6 6 0 0 0 -6 6 6 6 0 0 0 6 6 6 6 0 0 0 6 -6 6 6 0 0 0 -6 -6z" fill="none" stroke="#68b6ff" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_class_list.svg b/editor/icons/dark/icon_class_list.svg
deleted file mode 100644
index 84c80faded..0000000000
--- a/editor/icons/dark/icon_class_list.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<rect x="1" y="1038.4" width="5" height=".99998"/>
-<rect x="6" y="1037.4" width="6" height="3"/>
-<rect x="3" y="1038.4" width="1" height="11"/>
-<rect x="4" y="1043.4" width="5" height="1"/>
-<rect x="9" y="1042.4" width="6" height="3"/>
-<rect x="4" y="1048.4" width="5" height="1"/>
-<rect x="9" y="1047.4" width="6" height="3"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_close.svg b/editor/icons/dark/icon_close.svg
deleted file mode 100644
index 351bdc5547..0000000000
--- a/editor/icons/dark/icon_close.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3.7578 2.3438l-1.4141 1.4141 4.2422 4.2422-4.2422 4.2422 1.4141 1.4141 4.2422-4.2422 4.2422 4.2422 1.4141-1.4141-4.2422-4.2422 4.2422-4.2422-1.4141-1.4141-4.2422 4.2422-4.2422-4.2422z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_collapse.svg b/editor/icons/dark/icon_collapse.svg
deleted file mode 100644
index 7c9be68c44..0000000000
--- a/editor/icons/dark/icon_collapse.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m2 1040.4v3.9375l6 5.0625 6-5.0625v-3.9375h-12z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_collision_2d.svg b/editor/icons/dark/icon_collision_2d.svg
deleted file mode 100644
index a1e6d9fbef..0000000000
--- a/editor/icons/dark/icon_collision_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m14 1050.4h-12v-12h12l-6 6z" fill="none" stroke="#6d90ff" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_collision_polygon.svg b/editor/icons/dark/icon_collision_polygon.svg
deleted file mode 100644
index 7b46cf030e..0000000000
--- a/editor/icons/dark/icon_collision_polygon.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m14 1050.4h-12v-12h12l-6 6z" fill="none" stroke="#ff5f5f" stroke-linejoin="round" stroke-opacity=".99608" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_collision_shape.svg b/editor/icons/dark/icon_collision_shape.svg
deleted file mode 100644
index 340b182cf5..0000000000
--- a/editor/icons/dark/icon_collision_shape.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<g transform="translate(0 1.1802e-5)" stroke="#ff5f5f" stroke-opacity=".99608">
-<path d="m8 1050.4-6-3v-6l6-3 6 3v6z" fill="none" stroke="#ff5f5f" stroke-linejoin="round" stroke-opacity=".99608" stroke-width="2"/>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_collision_shape_2d.svg b/editor/icons/dark/icon_collision_shape_2d.svg
deleted file mode 100644
index 5e672ab1a8..0000000000
--- a/editor/icons/dark/icon_collision_shape_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m14 1050.4h-12v-12h12z" fill="none" stroke="#6d90ff" stroke-linejoin="round" stroke-opacity=".98824" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_color.svg b/editor/icons/dark/icon_color.svg
deleted file mode 100644
index 4a6b354849..0000000000
--- a/editor/icons/dark/icon_color.svg
+++ /dev/null
@@ -1,24 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<defs>
-<clipPath id="a">
-<path d="m8 1037.4a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm0 3a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4z" fill="#000000"/>
-</clipPath>
-</defs>
-<g transform="translate(0 -1036.4)">
-<circle cx="8" cy="1044.4" r="8" fil#000000fff"/>
-<g clip-path="url(#a)">
-<path d="m6.1883 1037.6a7 7 0 0 1 3.6235 0l-1.8117 6.7615z" fill="#f00"/>
-<path transform="matrix(.86603 .5 -.5 .86603 0 0)" d="m527.3 893.68a7 7 0 0 1 3.6235 0l-1.8117 6.7615z" fill="#ff4d00"/>
-<path transform="matrix(.5 .86603 -.86603 .5 0 0)" d="m906.63 508.49a7 7 0 0 1 3.6235 0l-1.8117 6.7615z" fill="#f90"/>
-<path transform="rotate(90)" d="m1042.6-14.761a7 7 0 0 1 3.6235 0l-1.8117 6.7615z" fill="#ffca00"/>
-<path transform="matrix(-.5 .86603 -.86603 -.5 0 0)" d="m898.63-535.87a7 7 0 0 1 3.6235 0l-1.8117 6.7615z" fill="#ff0"/>
-<path transform="matrix(-.86603 .5 -.5 -.86603 0 0)" d="m513.44-915.21a7 7 0 0 1 3.6235 0l-1.8117 6.7615z" fill="#9fff00"/>
-<path transform="scale(-1)" d="m-9.8118-1051.1a7 7 0 0 1 3.6235 0l-1.8117 6.7615z" fill="#0f0"/>
-<path transform="matrix(-.86603 -.5 .5 -.86603 0 0)" d="m-530.92-907.21a7 7 0 0 1 3.6235 0l-1.8117 6.7615z" fill="#0fa"/>
-<path transform="matrix(-.5 -.86603 .86603 -.5 0 0)" d="m-910.26-522.01a7 7 0 0 1 3.6235 0l-1.8117 6.7615z" fill="#00f"/>
-<path transform="rotate(-90)" d="m-1046.2 1.2385a7 7 0 0 1 3.6235 1e-7l-1.8118 6.7615z" fill="#9000ff"/>
-<path transform="matrix(.5 -.86603 .86603 .5 0 0)" d="m-902.26 522.35a7 7 0 0 1 3.6235 0l-1.8117 6.7615z" fill="#f0e"/>
-<path transform="matrix(.86603 -.5 .5 .86603 0 0)" d="m-517.06 901.68a7 7 0 0 1 3.6235 0l-1.8117 6.7615z" fill="#ff009a"/>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_color_pick.svg b/editor/icons/dark/icon_color_pick.svg
deleted file mode 100644
index e2a9f30853..0000000000
--- a/editor/icons/dark/icon_color_pick.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m13.051 0.97852a2 2 0 0 0 -1.4434 0.58594l-1.4141 1.4141-1.416-1.4141-1.4141 1.4141 1.4141 1.4141-7.0703 7.0723-0.35352 1.7676-0.35352 1.7676 1.7676-0.35352 1.7676-0.35352 7.0723-7.0703 1.4141 1.4141 1.4141-1.4141-1.4141-1.416 1.4141-1.4141a2 2 0 0 0 0 -2.8281 2 2 0 0 0 -1.3848 -0.58594zm-3.5664 4.1211l1.416 1.416-7.0723 7.0703-0.70703-0.70703-0.70703-0.70703 7.0703-7.0723z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_color_picker.svg b/editor/icons/dark/icon_color_picker.svg
deleted file mode 100644
index 775678e644..0000000000
--- a/editor/icons/dark/icon_color_picker.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m13.051 0.97852a2 2 0 0 0 -1.4434 0.58594l-1.4141 1.4141-1.416-1.4141-1.4141 1.4141 1.4141 1.4141-7.0703 7.0723-0.35352 1.7676-0.35352 1.7676 1.7676-0.35352 1.7676-0.35352 7.0723-7.0703 1.4141 1.4141 1.4141-1.4141-1.4141-1.416 1.4141-1.4141a2 2 0 0 0 0 -2.8281 2 2 0 0 0 -1.3848 -0.58594zm-3.5664 4.1211l1.416 1.416-7.0723 7.0703-0.70703-0.70703-0.70703-0.70703 7.0703-7.0723z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_color_picker_button.svg b/editor/icons/dark/icon_color_picker_button.svg
deleted file mode 100644
index 3b0643ef4c..0000000000
--- a/editor/icons/dark/icon_color_picker_button.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m13.051 0.97852a2 2 0 0 0 -1.4434 0.58594l-1.4141 1.4141-1.416-1.4141-1.4141 1.4141 1.4141 1.4141-7.0703 7.0723-0.35352 1.7676-0.35352 1.7676 1.7676-0.35352 1.7676-0.35352 7.0723-7.0703 1.4141 1.4141 1.4141-1.4141-1.4141-1.416 1.4141-1.4141a2 2 0 0 0 0 -2.8281 2 2 0 0 0 -1.3848 -0.58594zm-3.5664 4.1211 1.416 1.416-7.0723 7.0703-0.70703-0.70703-0.70703-0.70703 7.0703-7.0723z" fill="#29d739"/>
-<path transform="translate(0 1036.4)" d="m1 3v6.3438l4.9492-4.9512-1.3926-1.3926h-3.5566zm14 6.4863l-1.5137 1.5137h-0.92969l-0.94922-0.94922-2.9492 2.9492h6.3418v-3.5137z" fill="#29d739"/>
-<path transform="translate(0 1036.4)" d="m10.658 11l-2 2h6.3418v-2h-1.5137-0.92969-1.8984z" fill-opacity=".078431"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_color_ramp.svg b/editor/icons/dark/icon_color_ramp.svg
deleted file mode 100644
index d05355d8c7..0000000000
--- a/editor/icons/dark/icon_color_ramp.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="4" x2="30" y1="14" y2="14" gradientTransform="matrix(.51852 0 0 .7 -.55556 1034.6)" gradientUnits="userSpaceOnUse">
-<stop stop-color="#afff68" offset="0"/>
-<stop stop-color="#ff6b6b" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1036.4)">
-<path d="m1 1051.4h14v-14z" fill="url(#a)"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_color_rect.svg b/editor/icons/dark/icon_color_rect.svg
deleted file mode 100644
index ca913c123e..0000000000
--- a/editor/icons/dark/icon_color_rect.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="1" y="1037.4" width="2" height="14" fill="#29d739"/>
-<rect x="1" y="1049.4" width="14" height="2" fill="#29d739"/>
-<rect x="1" y="1037.4" width="14" height="2" fill="#29d739"/>
-<rect x="13" y="1037.4" width="2" height="14" fill="#29d739"/>
-<path d="m12 1048.4h-4.8l4.8-4.8z" fill="#70bfff" fill-rule="evenodd"/>
-<path d="m4 1040.4h4.8l-4.8 4.8z" fill="#ff2929" fill-rule="evenodd"/>
-<path d="m4 1048.4v-3.2l4.8-4.8h3.2v3.2l-4.8 4.8z" fill="#7aff70" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_concave_polygon_shape.svg b/editor/icons/dark/icon_concave_polygon_shape.svg
deleted file mode 100644
index 0df696f8b7..0000000000
--- a/editor/icons/dark/icon_concave_polygon_shape.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill-rule="evenodd">
-<path transform="translate(0 1036.4)" d="m8 1l-7 3v8l7 3 7-3v-8l-7-3z" fill="#2998ff"/>
-<path d="m8 1037.4-7 3v8l7 3 7-3v-8l-7-3z" fill="#2998ff"/>
-<path d="m3 1041.4v6l5 2 5-2v-6l-5-2z" fill="#2998ff"/>
-<path d="m8 1049.4 5-2-5-2-5 2z" fill="#a2d2ff"/>
-<path d="m8 1045.4 5 2v-6l-5-2z" fill="#68b6ff"/>
-<path transform="translate(0 1036.4)" d="m8 1-7 3 2 1 5-2 5 2 2-1z" fill="#a2d2ff"/>
-<path transform="translate(0 1036.4)" d="m1 4v8l7 3v-2l-5-2v-6z" fill="#68b6ff"/>
-<path transform="translate(0 1036.4)" d="m15 4-2 1v6l-5 2v2l7-3z" fill="#2998ff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_concave_polygon_shape_2d.svg b/editor/icons/dark/icon_concave_polygon_shape_2d.svg
deleted file mode 100644
index 3264e69ffc..0000000000
--- a/editor/icons/dark/icon_concave_polygon_shape_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m14 1050.4h-12v-12l6 6 6-6z" fill="none" stroke="#68b6ff" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_cone_twist_joint.svg b/editor/icons/dark/icon_cone_twist_joint.svg
deleted file mode 100644
index 1ec0abb830..0000000000
--- a/editor/icons/dark/icon_cone_twist_joint.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="none" stroke="#ff5f5f" stroke-linecap="round" stroke-width="2">
-<path transform="translate(0 1036.4)" d="m8 2l-6 9a6 3 0 0 0 3 2.5977 6 3 0 0 0 6 0 6 3 0 0 0 3 -2.5977l-6-9z" stroke-linejoin="round"/>
-<ellipse cx="8" cy="1047.4" rx="6" ry="3" stroke-linejoin="round"/>
-<path d="m8 1039.4v8"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_confirmation_dialog.svg b/editor/icons/dark/icon_confirmation_dialog.svg
deleted file mode 100644
index 0520d3101f..0000000000
--- a/editor/icons/dark/icon_confirmation_dialog.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.8954-2 2v1h14v-1c0-1.1046-0.89543-2-2-2h-10zm9 1h1v1h-1v-1zm-11 3v8c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.8954 2-2v-8h-14zm6.9863 1.002c0.34689-0.0022844 0.6986 0.055762 1.0391 0.17969 1.3618 0.4956 2.1813 1.9126 1.9297 3.3398-0.19105 1.0835-0.96172 1.9461-1.9551 2.3008v0.17773h-1-1v-0.8418a1.0001 1.0001 0 0 1 1 -1.1582c0.49193 0 0.89895-0.34177 0.98438-0.82617 0.085424-0.4845-0.18031-0.94508-0.64258-1.1133-0.46227-0.1683-0.96106 0.013453-1.207 0.43945a1.0002 1.0002 0 0 1 -1.7324 -1c0.54346-0.94148 1.5433-1.4912 2.584-1.498zm-0.98633 6.998h2v1h-2v-1z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_connect.svg b/editor/icons/dark/icon_connect.svg
deleted file mode 100644
index 1c96a195f0..0000000000
--- a/editor/icons/dark/icon_connect.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<circle cx="4" cy="1048.4" r="2" fill="#4f4f4f"/>
-<path d="m4 1043.4a5 5 0 0 1 5 5" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-<path d="m4 1039.4a9 9 0 0 1 9 9" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_connection_and_groups.svg b/editor/icons/dark/icon_connection_and_groups.svg
deleted file mode 100644
index 2ae14d9bdd..0000000000
--- a/editor/icons/dark/icon_connection_and_groups.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 0v1 5 1h12v-1-6h-11-1zm1 1h10v5h-10v-5zm2.5 1a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5 -1.5 1.5 1.5 0 0 0 -1.5 -1.5zm5 0a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5 -1.5 1.5 1.5 0 0 0 -1.5 -1.5zm-0.5 7a2 2 0 0 0 -2 2v1h-6v1h6v1a2 2 0 0 0 2 2h2v-1h2v-1h-2v-3h2v-1h-2v-1h-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_container.svg b/editor/icons/dark/icon_container.svg
deleted file mode 100644
index 07382b3bf7..0000000000
--- a/editor/icons/dark/icon_container.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2h2v-2zm2 0v2h2v-2h-2zm4 0v2h2v-2h-2zm4 0v2h2c0-1.1046-0.89543-2-2-2zm-12 4v2h2v-2h-2zm12 0v2h2v-2h-2zm-12 4v2h2v-2h-2zm12 0v2h2v-2h-2zm-12 4c0 1.1046 0.89543 2 2 2v-2h-2zm4 0v2h2v-2h-2zm4 0v2h2v-2h-2zm4 0v2c1.1046 0 2-0.89543 2-2h-2z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control.svg b/editor/icons/dark/icon_control.svg
deleted file mode 100644
index 94518d5d75..0000000000
--- a/editor/icons/dark/icon_control.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 2a6 6 0 0 0 -6 6 6 6 0 0 0 6 6 6 6 0 0 0 6 -6 6 6 0 0 0 -6 -6zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_bottom_center.svg b/editor/icons/dark/icon_control_align_bottom_center.svg
deleted file mode 100644
index 9d1219078e..0000000000
--- a/editor/icons/dark/icon_control_align_bottom_center.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect x="6" y="1046.4" width="4" height="4" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_bottom_left.svg b/editor/icons/dark/icon_control_align_bottom_left.svg
deleted file mode 100644
index fc8e7adb3e..0000000000
--- a/editor/icons/dark/icon_control_align_bottom_left.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect x="2" y="1046.4" width="4" height="4" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_bottom_right.svg b/editor/icons/dark/icon_control_align_bottom_right.svg
deleted file mode 100644
index 9a9bc0f2ec..0000000000
--- a/editor/icons/dark/icon_control_align_bottom_right.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect x="10" y="1046.4" width="4" height="4" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_bottom_wide.svg b/editor/icons/dark/icon_control_align_bottom_wide.svg
deleted file mode 100644
index 111ea52be7..0000000000
--- a/editor/icons/dark/icon_control_align_bottom_wide.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect x="2" y="1046.4" width="12" height="4" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_center.svg b/editor/icons/dark/icon_control_align_center.svg
deleted file mode 100644
index 5dd012c389..0000000000
--- a/editor/icons/dark/icon_control_align_center.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect x="6" y="1042.4" width="4" height="4" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_center_left.svg b/editor/icons/dark/icon_control_align_center_left.svg
deleted file mode 100644
index 38542419cf..0000000000
--- a/editor/icons/dark/icon_control_align_center_left.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="2" y="1042.4" width="6" height="4" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_center_right.svg b/editor/icons/dark/icon_control_align_center_right.svg
deleted file mode 100644
index 371436a6ad..0000000000
--- a/editor/icons/dark/icon_control_align_center_right.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="8" y="1042.4" width="6" height="4" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_left_center.svg b/editor/icons/dark/icon_control_align_left_center.svg
deleted file mode 100644
index dbf11be914..0000000000
--- a/editor/icons/dark/icon_control_align_left_center.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect x="2" y="1042.4" width="4" height="4" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_left_wide.svg b/editor/icons/dark/icon_control_align_left_wide.svg
deleted file mode 100644
index 7020a8a406..0000000000
--- a/editor/icons/dark/icon_control_align_left_wide.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect x="2" y="1038.4" width="4" height="12" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_right_center.svg b/editor/icons/dark/icon_control_align_right_center.svg
deleted file mode 100644
index 2ce0ebdf30..0000000000
--- a/editor/icons/dark/icon_control_align_right_center.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect x="10" y="1042.4" width="4" height="4" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_right_wide.svg b/editor/icons/dark/icon_control_align_right_wide.svg
deleted file mode 100644
index 0c1713cfe8..0000000000
--- a/editor/icons/dark/icon_control_align_right_wide.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect x="10" y="1038.4" width="4" height="12" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_top_center.svg b/editor/icons/dark/icon_control_align_top_center.svg
deleted file mode 100644
index 4b13ab28b9..0000000000
--- a/editor/icons/dark/icon_control_align_top_center.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect x="6" y="1038.4" width="4" height="3.9999" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_top_left.svg b/editor/icons/dark/icon_control_align_top_left.svg
deleted file mode 100644
index cd06aaad82..0000000000
--- a/editor/icons/dark/icon_control_align_top_left.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect x="2" y="1038.4" width="4" height="3.9999" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_top_right.svg b/editor/icons/dark/icon_control_align_top_right.svg
deleted file mode 100644
index 3bbbb89eca..0000000000
--- a/editor/icons/dark/icon_control_align_top_right.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect x="10" y="1038.4" width="4" height="3.9999" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_top_wide.svg b/editor/icons/dark/icon_control_align_top_wide.svg
deleted file mode 100644
index d704d5cc81..0000000000
--- a/editor/icons/dark/icon_control_align_top_wide.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect x="2" y="1038.4" width="12" height="3.9999" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_align_wide.svg b/editor/icons/dark/icon_control_align_wide.svg
deleted file mode 100644
index 683504128c..0000000000
--- a/editor/icons/dark/icon_control_align_wide.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_hcenter_wide.svg b/editor/icons/dark/icon_control_hcenter_wide.svg
deleted file mode 100644
index c96ba7ca11..0000000000
--- a/editor/icons/dark/icon_control_hcenter_wide.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect x="2" y="1042.4" width="12" height="4" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_control_vcenter_wide.svg b/editor/icons/dark/icon_control_vcenter_wide.svg
deleted file mode 100644
index 892bfcc50d..0000000000
--- a/editor/icons/dark/icon_control_vcenter_wide.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#919191"/>
-<rect x="2" y="1038.4" width="12" height="12" fill="#474747"/>
-<rect transform="rotate(90)" x="1038.4" y="-10" width="12" height="4" fill="#d6d6d6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_convex_polygon_shape.svg b/editor/icons/dark/icon_convex_polygon_shape.svg
deleted file mode 100644
index 143780da53..0000000000
--- a/editor/icons/dark/icon_convex_polygon_shape.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<g fill-rule="evenodd">
-<path transform="translate(0 1036.4)" d="m8 1l-7 3v8l7 3 7-3-7-11z" fill="#2998ff"/>
-<path d="m8 1051.4-7-3v-8l7 3z" fill="#68b6ff"/>
-<path transform="translate(0 1036.4)" d="m8 1-7 3 7 11 7-3z" fill="#2998ff"/>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_convex_polygon_shape_2d.svg b/editor/icons/dark/icon_convex_polygon_shape_2d.svg
deleted file mode 100644
index 5bd177d1c6..0000000000
--- a/editor/icons/dark/icon_convex_polygon_shape_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m14 1050.4h-12v-6l6-6 6 6z" fill="none" stroke="#68b6ff" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_copy_node_path.svg b/editor/icons/dark/icon_copy_node_path.svg
deleted file mode 100644
index 6716a34f02..0000000000
--- a/editor/icons/dark/icon_copy_node_path.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<circle cx="3" cy="1048.4" rx="1" ry="1"/>
-<path transform="translate(0 1036.4)" d="m2 1c-0.55226 1e-4 -0.99994 0.4477-1 1v12c5.52e-5 0.5523 0.44774 0.9999 1 1h12c0.55226-1e-4 0.99994-0.4477 1-1v-8l-5-5h-8zm1 2h6v3c0 0.554 0.44599 1 1 1h3v6h-10v-10zm3 5l-2 4h2l2-4h-2zm4 0l-2 4h2l2-4h-2z" fill-opacity=".78431"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_create_new_scene_from.svg b/editor/icons/dark/icon_create_new_scene_from.svg
deleted file mode 100644
index 5b09b402b0..0000000000
--- a/editor/icons/dark/icon_create_new_scene_from.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 7v6c0 1.1046 0.89543 2 2 2h7v-1h-2v-4h2v-2h4v2h1v-3z" fill="#4f4f4f"/>
-<path d="m0.71129 1040.4 0.28871 1.9791l2.2438-0.3273-0.81826-1.9018-1.7143 0.25zm3.6933-0.5387 0.81826 1.9018 1.9791-0.2887-0.81826-1.9018-1.9791 0.2887zm3.9581-0.5775 0.81826 1.9018 1.9791-0.2887-0.81826-1.9018-1.9791 0.2887zm3.9581-0.5774 0.81826 1.9018 1.7143-0.25-0.28871-1.9791-2.2438 0.3273z" fill="#4f4f4f"/>
-<circle cx="-14" cy="1047.4" r="0" fill="#4f4f4f"/>
-<path d="m13 1049.4h2v-2h-2v-2h-2v2h-2v2h2v2h2z" fill="#00f010" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_cube_map.svg b/editor/icons/dark/icon_cube_map.svg
deleted file mode 100644
index 39c1debecd..0000000000
--- a/editor/icons/dark/icon_cube_map.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1042.4" width="4" height="4" fill="#00f010"/>
-<rect x="4" y="1042.4" width="4" height="4" fill="#ff4040"/>
-<rect x="8" y="1042.4" width="4" height="4" fill="#00f010"/>
-<rect x="12" y="1042.4" width="4" height="4" fill="#ff4040"/>
-<rect x="4" y="1038.4" width="4" height="4" fill="#5caeff"/>
-<rect x="4" y="1046.4" width="4" height="4" fill="#5caeff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_cube_mesh.svg b/editor/icons/dark/icon_cube_mesh.svg
deleted file mode 100644
index cf5589e942..0000000000
--- a/editor/icons/dark/icon_cube_mesh.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 14.999999 14.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1037.4)">
-<path d="m7.5 1038.2-6.5625 3.2804v6.772l0.49015 0.246 6.0723 3.0344 6.5625-3.2804v-6.772zm0 1.9831 3.6926 1.8463-3.6926 1.8463-3.6926-1.8463zm-4.7889 3.2804 3.9022 1.9502v3.6944l-3.9022-1.952zm9.5779 0v3.6926l-3.9022 1.952v-3.6944z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#fea900" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_curve.svg b/editor/icons/dark/icon_curve.svg
deleted file mode 100644
index 9cc935c38f..0000000000
--- a/editor/icons/dark/icon_curve.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="none" stroke="#4f4f4f" stroke-width="2">
-<path d="m2 1038.4v12h12" stroke-linecap="square" stroke-opacity=".32549"/>
-<path d="m2 1050.4c8 0 12-4 12-12" stroke-linecap="round"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_curve_2d.svg b/editor/icons/dark/icon_curve_2d.svg
deleted file mode 100644
index 9697918d32..0000000000
--- a/editor/icons/dark/icon_curve_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m14 1037.4c-3.1667 0-5.1045 0.854-6.082 2.3203-0.97757 1.4664-0.91797 3.1797-0.91797 4.6797s-0.059601 2.7867-0.58203 3.5703c-0.52243 0.7837-1.5846 1.4297-4.418 1.4297a1.0001 1.0001 0 1 0 0 2c3.1667 0 5.1045-0.8539 6.082-2.3203 0.97757-1.4663 0.91797-3.1797 0.91797-4.6797s0.059601-2.7866 0.58203-3.5703c0.52243-0.7836 1.5846-1.4297 4.418-1.4297a1.0001 1.0001 0 1 0 0 -2z" color="#000000" color-rendering="auto" fill="#4f4f4f" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_curve_3d.svg b/editor/icons/dark/icon_curve_3d.svg
deleted file mode 100644
index 9aa63ff537..0000000000
--- a/editor/icons/dark/icon_curve_3d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m8.0039 1037.4a1.0001 1.0001 0 0 0 -0.45117 0.1113l-6 3a1.0001 1.0001 0 0 0 0 1.7891l6 3a1.0001 1.0001 0 0 0 0.89453 0l4.5527-2.2754v3.7636l-5 2.5-5.5527-2.7773a1.0001 1.0001 0 0 0 -0.89453 1.7891l6 3a1.0001 1.0001 0 0 0 0.89453 0l6-3a1.0001 1.0001 0 0 0 0.55273 -0.8946v-6a1.0001 1.0001 0 0 0 -1.4473 -0.8945l-5.5527 2.7773-3.7637-1.8828 4.2109-2.1054a1.0001 1.0001 0 0 0 -0.44336 -1.9004z" color="#000000" color-rendering="auto" fill="#4f4f4f" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_curve_close.svg b/editor/icons/dark/icon_curve_close.svg
deleted file mode 100644
index 42817f31b0..0000000000
--- a/editor/icons/dark/icon_curve_close.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m5 1049.4c-2-9-1-10 8-8" fill="none" stroke="#4f4f4f"/>
-<circle cx="5" cy="1041.4" r="2" fill="#f5f5f5"/>
-<rect x="8" y="1044.4" width="2" height="2" fill="#5caeff"/>
-<circle cx="5" cy="1049.4" r="2" fill="#f5f5f5"/>
-<circle cx="13" cy="1041.4" r="2" fill="#f5f5f5"/>
-<rect x="6" y="1046.4" width="2" height="2" fill="#5caeff"/>
-<rect x="10" y="1042.4" width="2" height="2" fill="#5caeff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_curve_constant.svg b/editor/icons/dark/icon_curve_constant.svg
deleted file mode 100644
index 08436b14e8..0000000000
--- a/editor/icons/dark/icon_curve_constant.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="12" height="12" version="1.1" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path d="m2 1046.4h8" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_curve_create.svg b/editor/icons/dark/icon_curve_create.svg
deleted file mode 100644
index 8b2f7edb51..0000000000
--- a/editor/icons/dark/icon_curve_create.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m5 1049.4c-2-9-1-10 8-8" fill="none" stroke="#4f4f4f"/>
-<circle cx="5" cy="1041.4" r="2" fill="#00f010"/>
-<circle cx="5" cy="1049.4" r="2" fill="#f5f5f5"/>
-<circle cx="13" cy="1041.4" r="2" fill="#f5f5f5"/>
-<rect x="8" y="1047.4" width="8" height="2" fill="#00f010"/>
-<rect transform="rotate(90)" x="1044.4" y="-13" width="8" height="2" fill="#00f010"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_curve_curve.svg b/editor/icons/dark/icon_curve_curve.svg
deleted file mode 100644
index fdbf9409e5..0000000000
--- a/editor/icons/dark/icon_curve_curve.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m5 1049.4c-2-9-1-10 8-8" fill="none" stroke="#4f4f4f"/>
-<circle cx="5" cy="1041.4" r="2" fill="#5caeff"/>
-<circle cx="5" cy="1049.4" r="2" fill="#f5f5f5"/>
-<circle cx="13" cy="1041.4" r="2" fill="#f5f5f5"/>
-<path d="m1 1045.4 8-8" fill="#5caeff" fill-rule="evenodd" stroke="#5caeff" stroke-width="1px"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_curve_delete.svg b/editor/icons/dark/icon_curve_delete.svg
deleted file mode 100644
index c666b5f6d1..0000000000
--- a/editor/icons/dark/icon_curve_delete.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m5 1049.4c-2-9-1-10 8-8" fill="none" stroke="#4f4f4f"/>
-<circle cx="5" cy="1041.4" r="2" fill="#ff4040"/>
-<circle cx="5" cy="1049.4" r="2" fill="#f5f5f5"/>
-<circle cx="13" cy="1041.4" r="2" fill="#f5f5f5"/>
-<path d="m8.4645 1046.2 2.1213 2.1213-2.1213 2.1213 1.4142 1.4142l2.1213-2.1213 2.1213 2.1213 1.4142-1.4142-2.1213-2.1213 2.1213-2.1213-1.4142-1.4142-2.1213 2.1213-2.1213-2.1213-1.4142 1.4142z" fill="#ff4040"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_curve_edit.svg b/editor/icons/dark/icon_curve_edit.svg
deleted file mode 100644
index f24840f054..0000000000
--- a/editor/icons/dark/icon_curve_edit.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m5 1049.4c-2-9-1-10 8-8" fill="none" stroke="#4f4f4f"/>
-<circle cx="5" cy="1041.4" r="2" fill="#5caeff"/>
-<circle cx="5" cy="1049.4" r="2" fill="#f5f5f5"/>
-<circle cx="13" cy="1041.4" r="2" fill="#f5f5f5"/>
-<path d="m16 1047.7-8-3.291 3.291 8 0.9471-2.8201 1.8836 1.8835 0.9418-0.9418-1.8836-1.8835z" fill="#5caeff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_curve_in.svg b/editor/icons/dark/icon_curve_in.svg
deleted file mode 100644
index a79664642e..0000000000
--- a/editor/icons/dark/icon_curve_in.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="12" height="12" version="1.1" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path d="m2 1050.4c5 0 8-3 8-8" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_curve_in_out.svg b/editor/icons/dark/icon_curve_in_out.svg
deleted file mode 100644
index c1b4db7787..0000000000
--- a/editor/icons/dark/icon_curve_in_out.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="12" height="12" version="1.1" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path d="m2 1050.4c5 0 3-8 8-8" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_curve_linear.svg b/editor/icons/dark/icon_curve_linear.svg
deleted file mode 100644
index 21770628a9..0000000000
--- a/editor/icons/dark/icon_curve_linear.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="12" height="12" version="1.1" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path d="m2 1050.4 8-8" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_curve_out.svg b/editor/icons/dark/icon_curve_out.svg
deleted file mode 100644
index 69cbef8bce..0000000000
--- a/editor/icons/dark/icon_curve_out.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="12" height="12" version="1.1" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path d="m2 1050.4c0-5 3-8 8-8" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_curve_out_in.svg b/editor/icons/dark/icon_curve_out_in.svg
deleted file mode 100644
index 833deed675..0000000000
--- a/editor/icons/dark/icon_curve_out_in.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="12" height="12" version="1.1" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path d="m2 1050.4c0-5 8-3 8-8" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_curve_texture.svg b/editor/icons/dark/icon_curve_texture.svg
deleted file mode 100644
index 3648f5c73b..0000000000
--- a/editor/icons/dark/icon_curve_texture.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1c-0.55228 0-1 0.44772-1 1v9.1602c0.32185-0.10966 0.66-0.16382 1-0.16016 0.33117 0 0.66575-0.007902 1-0.013672v-7.9863h10v1.1348c0.29007-0.10393 0.59442-0.16256 0.90234-0.17383 0.37315-0.012796 0.74541 0.044169 1.0977 0.16797v-2.1289c0-0.55228-0.44772-1-1-1h-12zm7 4v1h-1v1h-2v1h-1v1h-1v1h2 2 0.39062c1.1119-0.56677 1.9678-1.4538 2.6094-3.4727v-0.52734h-1v-1h-1zm4.9668 0.98828a1.0001 1.0001 0 0 0 -0.92774 0.73828c-0.92743 3.246-2.6356 4.6825-4.6523 5.4668-2.0168 0.7843-4.3867 0.80664-6.3867 0.80664a1.0001 1.0001 0 1 0 0 2c2 0 4.6301 0.023994 7.1133-0.94141 2.4832-0.9657 4.7751-3.0292 5.8477-6.7832a1.0001 1.0001 0 0 0 -0.99414 -1.2871z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_cylinder_mesh.svg b/editor/icons/dark/icon_cylinder_mesh.svg
deleted file mode 100644
index 01b6571884..0000000000
--- a/editor/icons/dark/icon_cylinder_mesh.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 14.999999 14.999999" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1037.4)">
-<path transform="matrix(.9375 0 0 .9375 0 1037.4)" d="m8 1c-1.7469 0-3.328 0.22648-4.5586 0.63672-0.61528 0.20512-1.1471 0.45187-1.5898 0.80078s-0.85156 0.88101-0.85156 1.5625v8c0 0.68149 0.40884 1.2155 0.85156 1.5645s0.97457 0.59577 1.5898 0.80078c1.2306 0.41024 2.8117 0.63477 4.5586 0.63477s3.328-0.22453 4.5586-0.63477c0.61527-0.20501 1.1471-0.45187 1.5898-0.80078 0.44272-0.34891 0.85156-0.88296 0.85156-1.5645v-8c0-0.68149-0.40884-1.2136-0.85156-1.5625-0.44272-0.34891-0.97457-0.59566-1.5898-0.80078-1.2306-0.41024-2.8117-0.63672-4.5586-0.63672zm0 2c1.5668 0 2.9867 0.22145 3.9277 0.53516 0.46368 0.15456 0.80138 0.33741 0.96875 0.4668-0.16752 0.12928-0.50546 0.3105-0.96875 0.46484-0.94102 0.31371-2.361 0.5332-3.9277 0.5332s-2.9867-0.2195-3.9277-0.5332c-0.46329-0.15435-0.80123-0.33556-0.96875-0.46484 0.16737-0.12939 0.50507-0.31224 0.96875-0.4668 0.94102-0.31371 2.361-0.53516 3.9277-0.53516zm-5 3.1875c0.1468 0.059071 0.2835 0.12512 0.44141 0.17773 1.2306 0.41024 2.8117 0.63477 4.5586 0.63477s3.328-0.22453 4.5586-0.63477c0.15791-0.052617 0.29461-0.11866 0.44141-0.17773v5.8125c-0.16752 0.12928-0.60898 0.31245-1.0723 0.4668-0.94102 0.31371-2.361 0.5332-3.9277 0.5332s-2.9867-0.2195-3.9277-0.5332c-0.46329-0.15435-0.90474-0.33752-1.0723-0.4668z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#fea900" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_damped_spring_joint_2d.svg b/editor/icons/dark/icon_damped_spring_joint_2d.svg
deleted file mode 100644
index b3a8e89ef9..0000000000
--- a/editor/icons/dark/icon_damped_spring_joint_2d.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill-opacity=".98824">
-<path transform="translate(0 1036.4)" d="m4 3v2l8 3v-2zm0 5v2l8 3v-2z" fill="#0843ff"/>
-<path transform="translate(0 1036.4)" d="m4 3v2l8-2v-2zm0 5v2l8-2v-2zm0 5v2l8-2v-2z" fill="#6d90ff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_debug.svg b/editor/icons/dark/icon_debug.svg
deleted file mode 100644
index 3819c10c18..0000000000
--- a/editor/icons/dark/icon_debug.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="scale(1,-1)" d="m10.828-1039.5a4 4 0 0 1 -2.8284 1.1716 4 4 0 0 1 -2.8284 -1.1716" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-<ellipse cx="8" cy="1047.4" rx="3.6445" ry="1.6348" fill="none" stroke-width="0"/>
-<circle cx="8" cy="1047.4" r="4" fill="#4f4f4f" stroke-width="0"/>
-<path d="m5 1047.4h-3" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-width="2"/>
-<path d="m10 1047.4h4" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-width="2"/>
-<path d="m6 1045.4c-2 0-3-2-3-3" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-width="2"/>
-<path d="m10 1045.4c2 0 3-2 3-3" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-width="2"/>
-<path d="m6 1049.4c-1 0-2 1-3 2" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-width="2"/>
-<path d="m10 1049.4c1 0 2 1 3 2" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-width="2"/>
-<circle cx="8" cy="1043.4" r="2" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_debug_continue.svg b/editor/icons/dark/icon_debug_continue.svg
deleted file mode 100644
index 94c14d80dd..0000000000
--- a/editor/icons/dark/icon_debug_continue.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="5" y="1043.4" width="6" height="2" fill="#ff4040"/>
-<g transform="matrix(-.71429 0 0 .88889 2.4999 121.82)" fill="#ff4040">
-<path transform="matrix(0 1.4412 1.2943 0 1331.1 1030.7)" d="m8.1225-1036.6h-3.1225-3.1225l1.5612-2.7042 1.5612-2.7041 1.5612 2.7041z" fill="#ff4040"/>
-</g>
-<circle cx="4" cy="1044.4" r="3" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_debug_next.svg b/editor/icons/dark/icon_debug_next.svg
deleted file mode 100644
index 2c1a7d2496..0000000000
--- a/editor/icons/dark/icon_debug_next.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect transform="rotate(90)" x="1037.4" y="-5" width="10" height="2" fill="#ff4040"/>
-<g transform="matrix(0 -.57144 -.66666 0 695.91 1041.4)" fill="#ff4040">
-<path transform="matrix(0 1.4412 1.2943 0 1331.1 1030.7)" d="m8.1225-1036.6h-3.1225-3.1225l1.5612-2.7042 1.5612-2.7041 1.5612 2.7041z" fill="#ff4040"/>
-</g>
-<rect x="7" y="1037.4" width="8" height="2" fill="#4f4f4f"/>
-<rect x="9" y="1041.4" width="6" height="2" fill="#4f4f4f"/>
-<rect x="9" y="1045.4" width="6" height="2" fill="#4f4f4f"/>
-<rect x="7" y="1049.4" width="8" height="2" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_debug_step.svg b/editor/icons/dark/icon_debug_step.svg
deleted file mode 100644
index ca708b5f35..0000000000
--- a/editor/icons/dark/icon_debug_step.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect transform="rotate(90)" x="1037.4" y="-3" width="10" height="2" fill="#ff4040"/>
-<g transform="matrix(-.57144 0 0 .66666 -2.0001 354.46)" fill="#ff4040">
-<path transform="matrix(0 1.4412 1.2943 0 1331.1 1030.7)" d="m8.1225-1036.6h-3.1225-3.1225l1.5612-2.7042 1.5612-2.7041 1.5612 2.7041z" fill="#ff4040"/>
-</g>
-<rect x="7" y="1037.4" width="8" height="2" fill="#4f4f4f"/>
-<rect x="9" y="1041.4" width="6" height="2" fill="#4f4f4f"/>
-<rect x="9" y="1045.4" width="6" height="2" fill="#4f4f4f"/>
-<rect x="7" y="1049.4" width="8" height="2" fill="#4f4f4f"/>
-<rect transform="rotate(90)" x="1045.4" y="-4" width="2" height="3" fill="#ff4040"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_default_project_icon.svg b/editor/icons/dark/icon_default_project_icon.svg
deleted file mode 100644
index d16d137550..0000000000
--- a/editor/icons/dark/icon_default_project_icon.svg
+++ /dev/null
@@ -1,33 +0,0 @@
-<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -988.36)">
-<path transform="translate(0 988.36)" d="m8 0c-4.432 0-8 3.568-8 8v48c0 4.432 3.568 8 8 8h48c4.432 0 8-3.568 8-8v-48c0-4.432-3.568-8-8-8z" fill="#355570" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-<path transform="translate(0 988.36)" d="m8 0c-4.432 0-8 3.568-8 8v48c0 4.432 3.568 8 8 8h48c4.432 0 8-3.568 8-8v-48c0-4.432-3.568-8-8-8zm0 2h48c3.324 0 6 2.676 6 6v48c0 3.324-2.676 6-6 6h-48c-3.324 0-6-2.676-6-6v-48c0-3.324 2.676-6 6-6z" fill-opacity=".19608" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-<path transform="translate(0 988.36)" d="m27.254 10c-2.1314 0.47383-4.2401 1.134-6.2168 2.1289 0.04521 1.7455 0.15796 3.4164 0.38672 5.1152-0.76768 0.4919-1.574 0.91443-2.291 1.4902-0.72854 0.5604-1.4731 1.0965-2.1328 1.752-1.3179-0.8716-2.7115-1.691-4.1484-2.4141-1.549 1.667-2.9985 3.4672-4.1816 5.4805 0.89011 1.4399 1.8209 2.7894 2.8242 4.0703h0.027343v9.9453 1.2617 1.1504l-0.009765 1.6309h-0.001953c0.0031 0.7321 0.011718 1.5356 0.011718 1.6953 0 7.1942 9.1264 10.652 20.465 10.691h0.013672 0.013672c11.338-0.04 20.461-3.4972 20.461-10.691 0-0.1626 0.010282-0.96271 0.013672-1.6953h-0.001953l-0.011719-1.6309v-0.98633l0.003907-0.001953v-11.369h0.027343c1.0035-1.2809 1.9337-2.6304 2.8242-4.0703-1.1827-2.0133-2.6327-3.8135-4.1816-5.4805-1.4366 0.7231-2.8325 1.5425-4.1504 2.4141-0.65947-0.6555-1.4013-1.1916-2.1309-1.752-0.71682-0.5758-1.5248-0.99833-2.291-1.4902 0.22813-1.6988 0.3413-3.3697 0.38672-5.1152-1.977-0.99494-4.0863-1.6551-6.2188-2.1289-0.85139 1.4309-1.6285 2.9812-2.3066 4.4961-0.80409-0.1344-1.613-0.18571-2.4219-0.19531h-0.015625-0.015625c-0.81037 0.01-1.6176 0.060513-2.4219 0.19531-0.67768-1.5149-1.4559-3.0652-2.3086-4.4961z" fill="#fff" stroke="#fff" stroke-linejoin="round" stroke-width="3"/>
-<g transform="matrix(.050279 0 0 .050279 6.2574 989.54)" stroke-width=".32031">
-<g transform="matrix(4.1626 0 0 -4.1626 919.24 771.67)">
-<path d="m0 0s-0.325 1.994-0.515 1.976l-36.182-3.491c-2.879-0.278-5.115-2.574-5.317-5.459l-0.994-14.247-27.992-1.997-1.904 12.912c-0.424 2.872-2.932 5.037-5.835 5.037h-38.188c-2.902 0-5.41-2.165-5.834-5.037l-1.905-12.912-27.992 1.997-0.994 14.247c-0.202 2.886-2.438 5.182-5.317 5.46l-36.2 3.49c-0.187 0.018-0.324-1.978-0.511-1.978l-0.049-7.83 30.658-4.944 1.004-14.374c0.203-2.91 2.551-5.263 5.463-5.472l38.551-2.75c0.146-0.01 0.29-0.016 0.434-0.016 2.897 0 5.401 2.166 5.825 5.038l1.959 13.286h28.005l1.959-13.286c0.423-2.871 2.93-5.037 5.831-5.037 0.142 0 0.284 5e-3 0.423 0.015l38.556 2.75c2.911 0.209 5.26 2.562 5.463 5.472l1.003 14.374 30.645 4.966z" fill="#fff"/>
-</g>
-<g transform="matrix(4.1626 0 0 -4.1626 104.7 525.91)">
-<path d="m0 0v-59.041c0.108-1e-3 0.216-5e-3 0.323-0.015l36.196-3.49c1.896-0.183 3.382-1.709 3.514-3.609l1.116-15.978 31.574-2.253 2.175 14.747c0.282 1.912 1.922 3.329 3.856 3.329h38.188c1.933 0 3.573-1.417 3.855-3.329l2.175-14.747 31.575 2.253 1.115 15.978c0.133 1.9 1.618 3.425 3.514 3.609l36.182 3.49c0.107 0.01 0.214 0.014 0.322 0.015v4.711l0.015 5e-3v54.325h0.134c4.795 6.12 9.232 12.569 13.487 19.449-5.651 9.62-12.575 18.217-19.976 26.182-6.864-3.455-13.531-7.369-19.828-11.534-3.151 3.132-6.7 5.694-10.186 8.372-3.425 2.751-7.285 4.768-10.946 7.118 1.09 8.117 1.629 16.108 1.846 24.448-9.446 4.754-19.519 7.906-29.708 10.17-4.068-6.837-7.788-14.241-11.028-21.479-3.842 0.642-7.702 0.88-11.567 0.926v6e-3c-0.027 0-0.052-6e-3 -0.075-6e-3 -0.024 0-0.049 6e-3 -0.073 6e-3v-6e-3c-3.872-0.046-7.729-0.284-11.572-0.926-3.238 7.238-6.956 14.642-11.03 21.479-10.184-2.264-20.258-5.416-29.703-10.17 0.216-8.34 0.755-16.331 1.848-24.448-3.668-2.35-7.523-4.367-10.949-7.118-3.481-2.678-7.036-5.24-10.188-8.372-6.297 4.165-12.962 8.079-19.828 11.534-7.401-7.965-14.321-16.562-19.974-26.182 4.253-6.88 8.693-13.329 13.487-19.449z" fill="#478cbf"/>
-</g>
-<g transform="matrix(4.1626 0 0 -4.1626 784.07 817.24)">
-<path d="m0 0-1.121-16.063c-0.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-0.094-7e-3 -0.188-0.01-0.281-0.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-0.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936 0.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c0.015-3.498 0.06-7.33 0.06-8.093 0-34.374 43.605-50.896 97.781-51.086h0.133c54.176 0.19 97.766 16.712 97.766 51.086 0 0.777 0.047 4.593 0.063 8.093z" fill="#478cbf"/>
-</g>
-<g transform="matrix(4.1626 0 0 -4.1626 389.21 625.67)">
-<path d="m0 0c0-12.052-9.765-21.815-21.813-21.815-12.042 0-21.81 9.763-21.81 21.815 0 12.044 9.768 21.802 21.81 21.802 12.048 0 21.813-9.758 21.813-21.802" fill="#fff"/>
-</g>
-<g transform="matrix(4.1626 0 0 -4.1626 367.37 631.06)">
-<path d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479" fill="#414042"/>
-</g>
-<g transform="matrix(4.1626 0 0 -4.1626 511.99 724.74)">
-<path d="m0 0c-3.878 0-7.021 2.858-7.021 6.381v20.081c0 3.52 3.143 6.381 7.021 6.381s7.028-2.861 7.028-6.381v-20.081c0-3.523-3.15-6.381-7.028-6.381" fill="#fff"/>
-</g>
-<g transform="matrix(4.1626 0 0 -4.1626 634.79 625.67)">
-<path d="m0 0c0-12.052 9.765-21.815 21.815-21.815 12.041 0 21.808 9.763 21.808 21.815 0 12.044-9.767 21.802-21.808 21.802-12.05 0-21.815-9.758-21.815-21.802" fill="#fff"/>
-</g>
-<g transform="matrix(4.1626 0 0 -4.1626 656.64 631.06)">
-<path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" fill="#414042"/>
-</g>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_dependency_changed.svg b/editor/icons/dark/icon_dependency_changed.svg
deleted file mode 100644
index bba1f032ca..0000000000
--- a/editor/icons/dark/icon_dependency_changed.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-1 2h2v7h-2v-7zm0 8h2v2h-2v-2z" fill="#ff4040"/>
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-1 2h2v7h-2v-7zm0 8h2v2h-2v-2z" fill-opacity=".23529"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_dependency_changed_hl.svg b/editor/icons/dark/icon_dependency_changed_hl.svg
deleted file mode 100644
index b8c45153ca..0000000000
--- a/editor/icons/dark/icon_dependency_changed_hl.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-1 2h2v7h-2v-7zm0 8h2v2h-2v-2z" fill="#ff4040"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_dependency_local_changed.svg b/editor/icons/dark/icon_dependency_local_changed.svg
deleted file mode 100644
index e6021b9a80..0000000000
--- a/editor/icons/dark/icon_dependency_local_changed.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -3 3.8672v0.13281h-2v-2h1a2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2 2 2 0 0 0 -2 2h-2a4 4 0 0 1 4 -4zm-1 9h2v2h-2v-2z" fill="#fea900"/>
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -3 3.8672v0.13281h-2v-2h1a2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2 2 2 0 0 0 -2 2h-2a4 4 0 0 1 4 -4zm-1 9h2v2h-2v-2z" fill-opacity=".23529"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_dependency_local_changed_hl.svg b/editor/icons/dark/icon_dependency_local_changed_hl.svg
deleted file mode 100644
index 89d9c663cb..0000000000
--- a/editor/icons/dark/icon_dependency_local_changed_hl.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -3 3.8672v0.13281h-2v-2h1a2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2 2 2 0 0 0 -2 2h-2a4 4 0 0 1 4 -4zm-1 9h2v2h-2v-2z" fill="#fea900"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_dependency_ok.svg b/editor/icons/dark/icon_dependency_ok.svg
deleted file mode 100644
index aecdbb63ba..0000000000
--- a/editor/icons/dark/icon_dependency_ok.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm3.1816 3.9297l1.4141 1.4141-4.2422 4.2422-0.70703 0.70703-0.70703 0.70703-3.5352-3.5352 1.4141-1.4141 2.1211 2.1211 4.2422-4.2422z" fill="#00f010"/>
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm3.1816 3.9297l1.4141 1.4141-4.2422 4.2422-0.70703 0.70703-0.70703 0.70703-3.5352-3.5352 1.4141-1.4141 2.1211 2.1211 4.2422-4.2422z" fill-opacity=".23529"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_dependency_ok_hl.svg b/editor/icons/dark/icon_dependency_ok_hl.svg
deleted file mode 100644
index 8de94755b1..0000000000
--- a/editor/icons/dark/icon_dependency_ok_hl.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm3.1816 3.9297l1.4141 1.4141-4.2422 4.2422-0.70703 0.70703-0.70703 0.70703-3.5352-3.5352 1.4141-1.4141 2.1211 2.1211 4.2422-4.2422z" fill="#00f010"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_directional_light.svg b/editor/icons/dark/icon_directional_light.svg
deleted file mode 100644
index a595465534..0000000000
--- a/editor/icons/dark/icon_directional_light.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1v3h2v-3h-2zm-2.5352 2.0508l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm7.0703 0l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm-3.5352 1.9492c-1.6569 0-3 1.3432-3 3s1.3431 3 3 3 3-1.3432 3-3-1.3431-3-3-3zm-7 2v2h3v-2h-3zm11 0v2h3v-2h-3zm-7.5352 3.1211l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm7.0703 0l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm-4.5352 1.8789v3h2v-3h-2z" fill="#ff5f5f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_distraction_free.svg b/editor/icons/dark/icon_distraction_free.svg
deleted file mode 100644
index 2ec6f20fd2..0000000000
--- a/editor/icons/dark/icon_distraction_free.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path transform="translate(0 1036.4)" d="m3.7578 2.3438l-1.4141 1.4141 2.9492 2.9492 1.4141-1.4141-2.9492-2.9492zm8.4844 0l-2.9492 2.9492 1.4141 1.4141 2.9492-2.9492-1.4141-1.4141zm-6.9492 6.9492l-2.9492 2.9492 1.4141 1.4141 2.9492-2.9492-1.4141-1.4141zm5.4141 0l-1.4141 1.4141 2.9492 2.9492 1.4141-1.4141-2.9492-2.9492z"/>
-<path d="m1 1051.4v-5l5 5z" fill-rule="evenodd"/>
-<path d="m15 1051.4v-5l-5 5z" fill-rule="evenodd"/>
-<path d="m15 1037.4v5l-5-5z" fill-rule="evenodd"/>
-<path d="m1 1037.4v5l5-5z" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_duplicate.svg b/editor/icons/dark/icon_duplicate.svg
deleted file mode 100644
index 9bb1e24b30..0000000000
--- a/editor/icons/dark/icon_duplicate.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m5 1v11h9v-6h-5v-5h-4zm5 0v4h4l-4-4zm-8 3v11h2 8v-2h-8v-9h-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_dynamic_font.svg b/editor/icons/dark/icon_dynamic_font.svg
deleted file mode 100644
index a7fb18c9cc..0000000000
--- a/editor/icons/dark/icon_dynamic_font.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m1 1037.4v2 1h1a1 1 0 0 1 1 -1h2v6a1 1 0 0 1 -1 1v1h1 2 1v-1a1 1 0 0 1 -1 -1v-6h2a1 1 0 0 1 1 1h1v-1-2h-4-2-4z" fill="#4f4f4f"/>
-<path transform="translate(0 1036.4)" d="m4 5v2 1h1a1 1 0 0 1 1 -1h2v6a1 1 0 0 1 -1 1v1h1 2 1v-1a1 1 0 0 1 -1 -1v-6h2a1 1 0 0 1 1 1h1v-1-2h-4-2-4z" fill="#5caeff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_dynamic_font_data.svg b/editor/icons/dark/icon_dynamic_font_data.svg
deleted file mode 100644
index 9655726f11..0000000000
--- a/editor/icons/dark/icon_dynamic_font_data.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 1v2 1h1a1 1 0 0 1 1 -1h2v6a1 1 0 0 1 -1 1v1h1 2 1v-1a1 1 0 0 1 -1 -1v-6h2a1 1 0 0 1 1 1h1v-1-2h-4-2-4zm0 5v2h2v-2h-2zm0 3v2h2v-2h-2zm0 3v2h2v-2h-2zm3 0v2h2v-2h-2z" fill="#4f4f4f"/>
-<path transform="translate(0 1036.4)" d="m4 5v2 1h1a1 1 0 0 1 1 -1h2v6a1 1 0 0 1 -1 1v1h1 2 1v-1a1 1 0 0 1 -1 -1v-6h2a1 1 0 0 1 1 1h1v-1-2h-4-2-4z" fill="#ff4040"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_edit.svg b/editor/icons/dark/icon_edit.svg
deleted file mode 100644
index 5d03cdfa29..0000000000
--- a/editor/icons/dark/icon_edit.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m1.7071 1047.8-0.70711 3.5356l3.5355-0.7071 7.7782-7.7782-2.8284-2.8284zm9.1924-9.1924 2.8284 2.8285 1.4142-1.4142-2.8284-2.8285z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_edit_key.svg b/editor/icons/dark/icon_edit_key.svg
deleted file mode 100644
index ad4e626ace..0000000000
--- a/editor/icons/dark/icon_edit_key.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m1.7071 1047.8-0.70711 3.5356l3.5355-0.7071 7.7782-7.7782-2.8284-2.8284zm9.1924-9.1924 2.8284 2.8285 1.4142-1.4142-2.8284-2.8285z"/>
-<ellipse cx="3.5" cy="1039.9" rx="2.5" ry="2.5"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_edit_pivot.svg b/editor/icons/dark/icon_edit_pivot.svg
deleted file mode 100644
index bac968e3a2..0000000000
--- a/editor/icons/dark/icon_edit_pivot.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1v4h2v-4h-2zm-6 6v2h4v-2h-4zm10 0v0.61328l3.3711 1.3867h0.62891v-2h-4zm-3 1l3.291 8 0.94726-2.8203 1.8828 1.8828 0.94336-0.94141-1.8848-1.8828 2.8203-0.94726-8-3.291zm-1 3v4h2v-0.625l-1.3887-3.375h-0.61133z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_edit_resource.svg b/editor/icons/dark/icon_edit_resource.svg
deleted file mode 100644
index 996b1bf7d6..0000000000
--- a/editor/icons/dark/icon_edit_resource.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<path transform="translate(0 1044.4)" d="m3.9902-0.0097656a1.0001 1.0001 0 0 0 -0.69727 1.7168l1.293 1.293h-3.5859v2h3.5859l-1.293 1.293a1.0001 1.0001 0 1 0 1.4141 1.4141l3-3a1.0001 1.0001 0 0 0 0 -1.4141l-3-3a1.0001 1.0001 0 0 0 -0.7168 -0.30273z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" fill-opacity=".78431" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_editor_3d_handle.svg b/editor/icons/dark/icon_editor_3d_handle.svg
deleted file mode 100644
index 189baf3dad..0000000000
--- a/editor/icons/dark/icon_editor_3d_handle.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<circle cx="8" cy="1044.4" r="7" fill="#fff"/>
-<circle cx="8" cy="1044.4" r="5" fill="#ff8484"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_editor_control_anchor.svg b/editor/icons/dark/icon_editor_control_anchor.svg
deleted file mode 100644
index eeee2c182f..0000000000
--- a/editor/icons/dark/icon_editor_control_anchor.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8.832 6.1445a4 4 0 0 1 -2.6914 2.6855l9.8594 7.1699-7.168-9.8555z" fill="#a5efac" fill-rule="evenodd"/>
-<ellipse cx="3" cy="1039.4" r="2" fill="#6e6e6e"/>
-<ellipse cx="4" cy="1040.4" rx="4" ry="4" fill="#a5efac" style="paint-order:fill markers stroke"/>
-<circle cx="5" cy="1041.4" r="0" fill="#a5efac" style="paint-order:fill markers stroke"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_editor_handle.svg b/editor/icons/dark/icon_editor_handle.svg
deleted file mode 100644
index 7e58aaa803..0000000000
--- a/editor/icons/dark/icon_editor_handle.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<ellipse cx="4" cy="1048.4" rx="4" ry="4" fill="#fff"/>
-<ellipse cx="4" cy="1048.4" rx="2.8572" ry="2.8571" fill="#ff8484"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_editor_pivot.svg b/editor/icons/dark/icon_editor_pivot.svg
deleted file mode 100644
index d59d2d804d..0000000000
--- a/editor/icons/dark/icon_editor_pivot.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m6 0v6h-6v4h6v6h4v-6h6v-4h-6v-6h-4zm1 7h2v2h-2v-2z" fill="#fff" fill-opacity=".70588"/>
-<path transform="translate(0 1036.4)" d="m7 1v5h2v-5h-2zm-6 6v2h5v-2h-5zm9 0v2h5v-2h-5zm-3 3v5h2v-5h-2z" fill="#ff8484" fill-opacity=".58824"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_editor_plugin.svg b/editor/icons/dark/icon_editor_plugin.svg
deleted file mode 100644
index 7c91902998..0000000000
--- a/editor/icons/dark/icon_editor_plugin.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f" fill-opacity=".99608">
-<path d="m2 1038.4v8h8v-8z" fill-rule="evenodd" stroke="#4f4f4f" stroke-linejoin="round" stroke-opacity=".99608" stroke-width="2"/>
-<circle cx="13" cy="1042.4" r="2"/>
-<circle cx="6" cy="1049.4" r="2"/>
-<rect x="5" y="1046.4" width="2" height="2"/>
-<rect x="10" y="1041.4" width="2" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_environment.svg b/editor/icons/dark/icon_environment.svg
deleted file mode 100644
index 833346bd28..0000000000
--- a/editor/icons/dark/icon_environment.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="none" stroke="#4f4f4f">
-<circle cx="8" cy="1044.4" r="6" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-<path d="m2 1044.4c4.5932 1.582 8.3985 1.0627 12 0" stroke-width="1.5"/>
-<path d="m8 1038.4c-3 4-3 8 0 12" stroke-width="1.5"/>
-<path d="m8 1038.4c3 4 3 8 0 12" stroke-width="1.5"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_error.svg b/editor/icons/dark/icon_error.svg
deleted file mode 100644
index ae74328509..0000000000
--- a/editor/icons/dark/icon_error.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<rect x="2.2204e-16" y="1044.4" width="8" height="8" ry="4" fill="#ff4040"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_error_sign.svg b/editor/icons/dark/icon_error_sign.svg
deleted file mode 100644
index ae384978a5..0000000000
--- a/editor/icons/dark/icon_error_sign.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="32" height="32" version="1.1" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1020.4)">
-<path d="m10 1048.4h12l6-6v-12l-6-6h-12l-6 6v12z" fill="#ff4040" fill-rule="evenodd"/>
-<rect x="14" y="1028.4" width="4" height="9" fill="#000000"/>
-<rect x="14" y="1040.4" width="4" height="4" fil#000000fff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_event_player.svg b/editor/icons/dark/icon_event_player.svg
deleted file mode 100644
index 2d13800c91..0000000000
--- a/editor/icons/dark/icon_event_player.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path transform="translate(0 1036.4)" d="m1 1v14h14v-14h-14zm2 2h10v10h-10v-10z"/>
-<path transform="translate(0 1036.4)" d="m5 3v6h2v-6h-2zm4 0v6h2v-6h-2z"/>
-<rect x="5" y="1039.4" width="1" height="10"/>
-<rect x="9" y="1039.4" width="1" height="10"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_favorites.svg b/editor/icons/dark/icon_favorites.svg
deleted file mode 100644
index 3343ca69ec..0000000000
--- a/editor/icons/dark/icon_favorites.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m8 1038.1-2.3741 4.0973-4.6259 1.0978l3.2361 3.4074-0.35866 4.6735 4.1389-1.9766 4.1572 1.9421-0.39534-4.6532 3.2218-3.3932-4.6259-1.0978-2.3741-4.0973z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_file_big.svg b/editor/icons/dark/icon_file_big.svg
deleted file mode 100644
index 52c224f6a5..0000000000
--- a/editor/icons/dark/icon_file_big.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -988.36)">
-<g transform="translate(0 -1.6949e-5)">
-<path transform="translate(0 988.36)" d="m14 5c-2.1987 0-4 1.8013-4 4v46c0 2.1987 1.8013 4 4 4h36c2.1987 0 4-1.8013 4-4v-33h-0.007812c0.00212-0.24832-0.079273-0.50098-0.28516-0.70703l-16-16c-0.18786-0.18693-0.44246-0.28939-0.70703-0.28906v-0.0039062h-23zm0 2h22v2 10c0 2.1987 1.8013 4 4 4h10 2v32c0 1.1253-0.87472 2-2 2h-36c-1.1253 0-2-0.8747-2-2v-46c0-1.1253 0.87472-2 2-2z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#000000" fill-opacity=".58824" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_file_dialog.svg b/editor/icons/dark/icon_file_dialog.svg
deleted file mode 100644
index 542894b906..0000000000
--- a/editor/icons/dark/icon_file_dialog.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.8954-2 2v1h14v-1c0-1.1046-0.89543-2-2-2zm9 1h1v1h-1zm-11 3v8c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.8954 2-2v-8zm3 2h3c1 0 1 2 2 2h3v4h-8z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_file_list.svg b/editor/icons/dark/icon_file_list.svg
deleted file mode 100644
index 12678c2873..0000000000
--- a/editor/icons/dark/icon_file_list.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 2v2h2v-2h-2zm4 0v2h8v-2h-8zm-4 5v2h2v-2h-2zm4 0v2h8v-2h-8zm-4 5v2h2v-2h-2zm4 0v2h8v-2h-8z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_file_server.svg b/editor/icons/dark/icon_file_server.svg
deleted file mode 100644
index 02bc363c19..0000000000
--- a/editor/icons/dark/icon_file_server.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#c5c5c5">
-<path transform="translate(0 1036.4)" d="m1 8v3h14v-3h-14zm1 1h1v1h-1v-1zm2 0h1v1h-1v-1zm-3 3v3h14v-3h-14zm1 1h1v1h-1v-1zm2 0h1v1h-1v-1z"/>
-<rect x="5" y="1038.4" width="6" height="4"/>
-<rect x="5" y="1037.4" width="3" height="1"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_file_server_active.svg b/editor/icons/dark/icon_file_server_active.svg
deleted file mode 100644
index ccb9b97336..0000000000
--- a/editor/icons/dark/icon_file_server_active.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#00f010">
-<path transform="translate(0 1036.4)" d="m1 8v3h14v-3h-14zm1 1h1v1h-1v-1zm2 0h1v1h-1v-1zm-3 3v3h14v-3h-14zm1 1h1v1h-1v-1zm2 0h1v1h-1v-1z"/>
-<rect x="5" y="1038.4" width="6" height="4"/>
-<rect x="5" y="1037.4" width="3" height="1"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_file_thumbnail.svg b/editor/icons/dark/icon_file_thumbnail.svg
deleted file mode 100644
index bd1d4d2fc3..0000000000
--- a/editor/icons/dark/icon_file_thumbnail.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 2v5h5v-5h-5zm7 0v5h5v-5h-5zm-7 7v5h5v-5h-5zm7 0v5h5v-5h-5z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_fixed_material.svg b/editor/icons/dark/icon_fixed_material.svg
deleted file mode 100644
index 47cf9189d6..0000000000
--- a/editor/icons/dark/icon_fixed_material.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m8 1037.4a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-2 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_fixed_spatial_material.svg b/editor/icons/dark/icon_fixed_spatial_material.svg
deleted file mode 100644
index 4e634280bf..0000000000
--- a/editor/icons/dark/icon_fixed_spatial_material.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -4.8887 2h2.8887 6.8965a7 7 0 0 0 -4.8965 -2z" fill="#ff2929"/>
-<path transform="translate(0 1036.4)" d="m3.1113 3a7 7 0 0 0 -1.4277 2h2.3164a2 2 0 0 1 2 -2h-2.8887zm2.8887 0a2 2 0 0 1 2 2h6.3145a7 7 0 0 0 -1.418 -2h-6.8965z" fill="#ffe337"/>
-<path transform="translate(0 1036.4)" d="m1.6836 5a7 7 0 0 0 -0.60547 2h4.9219a2 2 0 0 1 -2 -2h-2.3164zm4.3164 2h8.9199a7 7 0 0 0 -0.60547 -2h-6.3145a2 2 0 0 1 -2 2z" fill="#74ff34"/>
-<path transform="translate(0 1036.4)" d="m1.0781 7a7 7 0 0 0 -0.078125 1 7 7 0 0 0 0.080078 1h13.842a7 7 0 0 0 0.078125 -1 7 7 0 0 0 -0.080078 -1h-8.9199-4.9219z" fill="#2cff98"/>
-<path transform="translate(0 1036.4)" d="m1.0801 9a7 7 0 0 0 0.60547 2h12.631a7 7 0 0 0 0.60547 -2h-13.842z" fill="#22ccff"/>
-<path transform="translate(0 1036.4)" d="m3.1035 13a7 7 0 0 0 4.8965 2 7 7 0 0 0 4.8887 -2h-9.7852z" fill="#ff2781"/>
-<path transform="translate(0 1036.4)" d="m1.6855 11a7 7 0 0 0 1.418 2h9.7852a7 7 0 0 0 1.4277 -2h-12.631z" fill="#702aff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_folder.svg b/editor/icons/dark/icon_folder.svg
deleted file mode 100644
index a127f00ae1..0000000000
--- a/editor/icons/dark/icon_folder.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 2a1 1 0 0 0 -1 1v2 6 2a1 1 0 0 0 1 1h12a1 1 0 0 0 1 -1v-7a1 1 0 0 0 -1 -1h-4a1 1 0 0 1 -1 -1v-1a1 1 0 0 0 -1 -1h-6z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_folder_big.svg b/editor/icons/dark/icon_folder_big.svg
deleted file mode 100644
index 440907e33b..0000000000
--- a/editor/icons/dark/icon_folder_big.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -988.36)">
-<path transform="translate(0 988.36)" d="m13 11.996a5.0039 5.0039 0 0 0 -5.0039 5.0039 5.0039 5.0039 0 0 0 0.0039062 0.11719v2.8828 8 22.92a5.0039 5.0039 0 0 0 -0.0039062 0.076172 5.0039 5.0039 0 0 0 5.0039 5.0039h37.996a5.0039 5.0039 0 0 0 5.0039 -5.0039v-25.916a5.0039 5.0039 0 0 0 0.003906 -0.076172 5.0039 5.0039 0 0 0 -5.0039 -5.0039h-11v-0.039062a3.5 3.5 0 0 1 -0.5 0.039062 3.5 3.5 0 0 1 -3.5 -3.5v0.38281a5.0039 5.0039 0 0 0 -5 -4.8867 5.0039 5.0039 0 0 0 -0.11719 0.003906h-17.807a5.0039 5.0039 0 0 0 -0.076172 -0.003906zm23 4.5039a3.5 3.5 0 0 1 0.041016 -0.5h-0.041016v0.5z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_font.svg b/editor/icons/dark/icon_font.svg
deleted file mode 100644
index f89b408383..0000000000
--- a/editor/icons/dark/icon_font.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<rect x="1" y="1037.4" width="14" height="2"/>
-<rect x="7" y="1037.4" width="2" height="14"/>
-<rect x="5" y="1050.4" width="6" height="1"/>
-<rect transform="rotate(90)" x="1037.4" y="-2" width="4" height="1"/>
-<rect transform="rotate(90)" x="1037.4" y="-15" width="4" height="1"/>
-<path transform="translate(0 1036.4)" d="m2 3v2a2 2 0 0 1 2 -2h-2z"/>
-<path transform="translate(0 1036.4)" d="m12 3a2 2 0 0 1 2 2v-2h-2z"/>
-<path d="m5 1050.4a2 2 0 0 0 2 -2v2h-2z"/>
-<path d="m11 1050.4a2 2 0 0 1 -2 -2v2h2z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_forward.svg b/editor/icons/dark/icon_forward.svg
deleted file mode 100644
index a02f36d314..0000000000
--- a/editor/icons/dark/icon_forward.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="8" height="16" version="1.1" viewBox="0 0 8 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m2 1038.4 4 6-4 6" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_g_d_native_library.svg b/editor/icons/dark/icon_g_d_native_library.svg
deleted file mode 100644
index 24a18eceb0..0000000000
--- a/editor/icons/dark/icon_g_d_native_library.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1l-0.56445 2.2578a5 5 0 0 0 -0.68945 0.2793l-1.9883-1.1934-1.4141 1.4141 1.1953 1.9941a5 5 0 0 0 -0.28516 0.68555l-2.2539 0.5625v2l2.2578 0.56445a5 5 0 0 0 0.2793 0.6875l-1.1934 1.9902 1.4141 1.4141 1.9941-1.1953a5 5 0 0 0 0.68555 0.28516l0.5625 2.2539v-5.2695a2 2 0 0 1 -1 -1.7305 2 2 0 0 1 1 -1.7285v-0.27148h1 4.5762a5 5 0 0 0 -0.11328 -0.25195l1.1934-1.9902-1.4141-1.4141-1.9941 1.1953a5 5 0 0 0 -0.68555 -0.28516l-0.5625-2.2539h-2zm2 7v1 5 1h5c0.55228 0 1-0.4477 1-1v-5c0-0.5523-0.44772-1-1-1v4l-1-1-1 1v-4h-3z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_g_d_script.svg b/editor/icons/dark/icon_g_d_script.svg
deleted file mode 100644
index 07718e87b2..0000000000
--- a/editor/icons/dark/icon_g_d_script.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1l-0.56445 2.2578a5 5 0 0 0 -0.68945 0.2793l-1.9883-1.1934-1.4141 1.4141 1.1953 1.9941a5 5 0 0 0 -0.28516 0.68555l-2.2539 0.5625v2l2.2578 0.56445a5 5 0 0 0 0.2793 0.6875l-1.1934 1.9902 1.4141 1.4141 1.9941-1.1953a5 5 0 0 0 0.68555 0.28516l0.5625 2.2539h2l0.56445-2.2578a5 5 0 0 0 0.6875 -0.2793l1.9902 1.1934 1.4141-1.4141-1.1953-1.9941a5 5 0 0 0 0.28516 -0.68555l2.2539-0.5625v-2l-2.2578-0.56445a5 5 0 0 0 -0.2793 -0.6875l1.1934-1.9902-1.4141-1.4141-1.9941 1.1953a5 5 0 0 0 -0.68555 -0.28516l-0.5625-2.2539h-2zm1 5a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_g_i_probe.svg b/editor/icons/dark/icon_g_i_probe.svg
deleted file mode 100644
index d88cc782ad..0000000000
--- a/editor/icons/dark/icon_g_i_probe.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1a1.0001 1.0001 0 0 0 -1 1v12a1.0001 1.0001 0 0 0 1 1h4v-2h-3v-10h9v-2h-10zm9 3a4 4 0 0 0 -4 4 4 4 0 0 0 2 3.459v0.54102c0 0.55401 0.44599 1 1 1h2c0.55401 0 1-0.44599 1-1v-0.54102a4 4 0 0 0 2 -3.459 4 4 0 0 0 -4 -4zm0 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2zm-1 8v1h2v-1h-2z" fill="#ff5f5f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_g_i_probe_data.svg b/editor/icons/dark/icon_g_i_probe_data.svg
deleted file mode 100644
index a7c8253448..0000000000
--- a/editor/icons/dark/icon_g_i_probe_data.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1a1.0001 1.0001 0 0 0 -1 1v12a1.0001 1.0001 0 0 0 1 1h4v-2h-3v-10h9v-2h-10zm2 3v2h2v-2h-2zm7 0a4 4 0 0 0 -4 4 4 4 0 0 0 2 3.459v0.54102c0 0.55401 0.44599 1 1 1h2c0.55401 0 1-0.44599 1-1v-0.54102a4 4 0 0 0 2 -3.459 4 4 0 0 0 -4 -4zm0 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2zm-7 1v2h2v-2h-2zm0 3v2h2v-2h-2zm6 4v1h2v-1h-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_generic_6_d_o_f_joint.svg b/editor/icons/dark/icon_generic_6_d_o_f_joint.svg
deleted file mode 100644
index e5671afa84..0000000000
--- a/editor/icons/dark/icon_generic_6_d_o_f_joint.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a1 1 0 0 0 -1 1v4.8828l-3.5527-1.7773a1 1 0 0 0 -0.48438 -0.10352 1 1 0 0 0 -0.85742 0.55078 1 1 0 0 0 0.44727 1.3418l3.2109 1.6055-3.2109 1.6055a1 1 0 0 0 -0.44727 1.3418 1 1 0 0 0 1.3418 0.44726l3.5527-1.7773v3.8828a1 1 0 0 0 1 1 1 1 0 0 0 1 -1v-3.8828l3.5527 1.7773a1 1 0 0 0 1.3418 -0.44726 1 1 0 0 0 -0.44726 -1.3418l-3.2109-1.6055 3.2109-1.6055a1 1 0 0 0 0.44726 -1.3418 1 1 0 0 0 -0.88672 -0.55273 1 1 0 0 0 -0.45508 0.10547l-3.5527 1.7773v-4.8828a1 1 0 0 0 -1 -1z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#ff5f5f" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_gizmo_directional_light.svg b/editor/icons/dark/icon_gizmo_directional_light.svg
deleted file mode 100644
index a8739a5a78..0000000000
--- a/editor/icons/dark/icon_gizmo_directional_light.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -924.36)">
-<path transform="translate(0 924.36)" d="m64 4a8 8 0 0 0 -8 8v12a8 8 0 0 0 8 8 8 8 0 0 0 8 -8v-12a8 8 0 0 0 -8 -8zm-36.887 15.23a8 8 0 0 0 -5.5391 2.3438 8 8 0 0 0 0 11.312l8.4844 8.4863a8 8 0 0 0 11.314 0 8 8 0 0 0 0 -11.314l-8.4863-8.4844a8 8 0 0 0 -5.7734 -2.3438zm73.539 0a8 8 0 0 0 -5.5391 2.3438l-8.4863 8.4844a8 8 0 0 0 0 11.314 8 8 0 0 0 11.314 0l8.4844-8.4863a8 8 0 0 0 0 -11.312 8 8 0 0 0 -5.7734 -2.3438zm-36.652 20.77a24 24 0 0 0 -24 24 24 24 0 0 0 24 24 24 24 0 0 0 24 -24 24 24 0 0 0 -24 -24zm-52 16a8 8 0 0 0 -8 8 8 8 0 0 0 8 8h12a8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8h-12zm92 0a8 8 0 0 0 -8 8 8 8 0 0 0 8 8h12a8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8h-12zm-68.4 28.285a8 8 0 0 0 -5.541 2.3418l-8.4844 8.4863a8 8 0 0 0 0 11.312 8 8 0 0 0 11.312 0l8.4863-8.4844a8 8 0 0 0 0 -11.314 8 8 0 0 0 -5.7734 -2.3418zm56.568 0a8 8 0 0 0 -5.541 2.3418 8 8 0 0 0 0 11.314l8.4863 8.4844a8 8 0 0 0 11.312 0 8 8 0 0 0 0 -11.312l-8.4844-8.4863a8 8 0 0 0 -5.7734 -2.3418zm-28.168 11.715a8 8 0 0 0 -8 8v12a8 8 0 0 0 8 8 8 8 0 0 0 8 -8v-12a8 8 0 0 0 -8 -8z" fill="#f7f5cf"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_gizmo_light.svg b/editor/icons/dark/icon_gizmo_light.svg
deleted file mode 100644
index c411d13dc7..0000000000
--- a/editor/icons/dark/icon_gizmo_light.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -924.36)">
-<path transform="translate(0 924.36)" d="m64 6a40 40 0 0 0 -40 40 40 40 0 0 0 24 36.607v15.393a8 8 0 0 0 8 8h16a8 8 0 0 0 8 -8v-15.363a40 40 0 0 0 24 -36.637 40 40 0 0 0 -40 -40zm0 12a28 28 0 0 1 28 28 28 28 0 0 1 -28 28 28 28 0 0 1 -28 -28 28 28 0 0 1 28 -28zm-8 96v8h16v-8h-16z" fill="#f7f5cf"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_gizmo_listener.svg b/editor/icons/dark/icon_gizmo_listener.svg
deleted file mode 100644
index adb6aebaec..0000000000
--- a/editor/icons/dark/icon_gizmo_listener.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -924.36)">
-<g transform="matrix(2 0 0 2 -16 -1040.4)">
-<path transform="matrix(.5 0 0 .5 8 982.36)" d="m48 8a40 39.998 0 0 0 -40 39.998h16a24 23.999 0 0 1 24 -23.998 24 23.999 0 0 1 24 23.998c0 13.999-4.33 18.859-9.1211 22.852-2.3955 1.9962-5.0363 3.5302-7.8125 5.5352-1.3881 1.0024-2.8661 2.126-4.3047 3.9414-1.4385 1.8152-2.7617 4.6719-2.7617 7.6719 0 10.221-2.5383 12.59-5.1172 14.137-2.5789 1.5472-6.8828 1.8594-10.883 1.8594v0.00195h-8v16h8v-0.00195c4 0 11.696 0.31158 19.117-4.1406 7.0602-4.236 12.198-13.279 12.695-26 0.1835-0.1636 0.14883-0.15489 0.62109-0.49609 1.7238-1.245 5.083-3.2112 8.6875-6.2148 7.209-6.0072 14.879-17.145 14.879-35.145a40 39.998 0 0 0 -40 -39.998zm63.426 8l-13.906 8.0312a48 47.998 0 0 1 6.4844 23.967 48 47.998 0 0 1 -6.4688 23.984l13.891 8.0137a64 63.997 0 0 0 0 -63.996z" fill="#f7f5cf"/>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_gizmo_spatial_sample_player.svg b/editor/icons/dark/icon_gizmo_spatial_sample_player.svg
deleted file mode 100644
index d40fe230ac..0000000000
--- a/editor/icons/dark/icon_gizmo_spatial_sample_player.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -924.36)">
-<path transform="translate(0 924.36)" d="m63.883 12.004a4.0004 4.0004 0 0 0 -2.7109 1.168l-30.828 30.83h-14.344a4.0004 4.0004 0 0 0 -4 4v32a4.0004 4.0004 0 0 0 4 4h14.344l30.828 30.828a4.0004 4.0004 0 0 0 6.8281 -2.8281v-96.002a4.0004 4.0004 0 0 0 -4.1172 -3.9961zm46.117 5.9961a6 6 0 0 0 -6 6v80a6 6 0 0 0 6 6 6 6 0 0 0 6 -6v-80a6 6 0 0 0 -6 -6zm-24 24a6 6 0 0 0 -6 6v32h0.34961a6 6 0 0 0 5.6504 4 6 6 0 0 0 5.6484 -4h0.35156v-32a6 6 0 0 0 -6 -6z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_gizmo_spatial_stream_player.svg b/editor/icons/dark/icon_gizmo_spatial_stream_player.svg
deleted file mode 100644
index 2cf3966364..0000000000
--- a/editor/icons/dark/icon_gizmo_spatial_stream_player.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -924.36)">
-<path d="m99.766 934.36a8.0008 8.0011 0 0 0 -1.9609 0.296l-56 16a8.0008 8.0011 0 0 0 -5.8047 7.6964v48.119a18 18.001 0 0 0 -2 -0.116 18 18.001 0 0 0 -18 18.001 18 18.001 0 0 0 18 18.001 18 18.001 0 0 0 17.875 -16.001h0.125v-2-59.963l40-11.43v37.517a18 18.001 0 0 0 -2 -0.124 18 18.001 0 0 0 -18 18.001 18 18.001 0 0 0 18 18 18 18.001 0 0 0 17.875 -16h0.125v-2-66.003a8.0008 8.0011 0 0 0 -8.2344 -7.9924z" color="#000000" color-rendering="auto" fill="#f7f5cf" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_godot.svg b/editor/icons/dark/icon_godot.svg
deleted file mode 100644
index 32a1eeb6ec..0000000000
--- a/editor/icons/dark/icon_godot.svg
+++ /dev/null
@@ -1,33 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<g transform="matrix(.017241 0 0 .017241 -.82759 1033.7)" stroke-width=".32031">
-<g transform="matrix(4.1626 0 0 -4.1626 919.24 771.67)">
-<path d="m0 0s-0.325 1.994-0.515 1.976l-36.182-3.491c-2.879-0.278-5.115-2.574-5.317-5.459l-0.994-14.247-27.992-1.997-1.904 12.912c-0.424 2.872-2.932 5.037-5.835 5.037h-38.188c-2.902 0-5.41-2.165-5.834-5.037l-1.905-12.912-27.992 1.997-0.994 14.247c-0.202 2.886-2.438 5.182-5.317 5.46l-36.2 3.49c-0.187 0.018-0.324-1.978-0.511-1.978l-0.049-7.83 30.658-4.944 1.004-14.374c0.203-2.91 2.551-5.263 5.463-5.472l38.551-2.75c0.146-0.01 0.29-0.016 0.434-0.016 2.897 0 5.401 2.166 5.825 5.038l1.959 13.286h28.005l1.959-13.286c0.423-2.871 2.93-5.037 5.831-5.037 0.142 0 0.284 5e-3 0.423 0.015l38.556 2.75c2.911 0.209 5.26 2.562 5.463 5.472l1.003 14.374 30.645 4.966z" fill="#fff"/>
-</g>
-<g transform="matrix(4.1626 0 0 -4.1626 104.7 525.91)">
-<path d="m0 0v-59.041c0.108-1e-3 0.216-5e-3 0.323-0.015l36.196-3.49c1.896-0.183 3.382-1.709 3.514-3.609l1.116-15.978 31.574-2.253 2.175 14.747c0.282 1.912 1.922 3.329 3.856 3.329h38.188c1.933 0 3.573-1.417 3.855-3.329l2.175-14.747 31.575 2.253 1.115 15.978c0.133 1.9 1.618 3.425 3.514 3.609l36.182 3.49c0.107 0.01 0.214 0.014 0.322 0.015v4.711l0.015 5e-3v54.325h0.134c4.795 6.12 9.232 12.569 13.487 19.449-5.651 9.62-12.575 18.217-19.976 26.182-6.864-3.455-13.531-7.369-19.828-11.534-3.151 3.132-6.7 5.694-10.186 8.372-3.425 2.751-7.285 4.768-10.946 7.118 1.09 8.117 1.629 16.108 1.846 24.448-9.446 4.754-19.519 7.906-29.708 10.17-4.068-6.837-7.788-14.241-11.028-21.479-3.842 0.642-7.702 0.88-11.567 0.926v6e-3c-0.027 0-0.052-6e-3 -0.075-6e-3 -0.024 0-0.049 6e-3 -0.073 6e-3v-6e-3c-3.872-0.046-7.729-0.284-11.572-0.926-3.238 7.238-6.956 14.642-11.03 21.479-10.184-2.264-20.258-5.416-29.703-10.17 0.216-8.34 0.755-16.331 1.848-24.448-3.668-2.35-7.523-4.367-10.949-7.118-3.481-2.678-7.036-5.24-10.188-8.372-6.297 4.165-12.962 8.079-19.828 11.534-7.401-7.965-14.321-16.562-19.974-26.182 4.253-6.88 8.693-13.329 13.487-19.449z" fill="#478cbf"/>
-</g>
-<g transform="matrix(4.1626 0 0 -4.1626 784.07 817.24)">
-<path d="m0 0-1.121-16.063c-0.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-0.094-7e-3 -0.188-0.01-0.281-0.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-0.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936 0.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c0.015-3.498 0.06-7.33 0.06-8.093 0-34.374 43.605-50.896 97.781-51.086h0.133c54.176 0.19 97.766 16.712 97.766 51.086 0 0.777 0.047 4.593 0.063 8.093z" fill="#478cbf"/>
-</g>
-<g transform="matrix(4.1626 0 0 -4.1626 389.21 625.67)">
-<path d="m0 0c0-12.052-9.765-21.815-21.813-21.815-12.042 0-21.81 9.763-21.81 21.815 0 12.044 9.768 21.802 21.81 21.802 12.048 0 21.813-9.758 21.813-21.802" fill="#fff"/>
-</g>
-<g transform="matrix(4.1626 0 0 -4.1626 367.37 631.06)">
-<path d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479" fill="#414042"/>
-</g>
-<g transform="matrix(4.1626 0 0 -4.1626 511.99 724.74)">
-<path d="m0 0c-3.878 0-7.021 2.858-7.021 6.381v20.081c0 3.52 3.143 6.381 7.021 6.381s7.028-2.861 7.028-6.381v-20.081c0-3.523-3.15-6.381-7.028-6.381" fill="#fff"/>
-</g>
-<g transform="matrix(4.1626 0 0 -4.1626 634.79 625.67)">
-<path d="m0 0c0-12.052 9.765-21.815 21.815-21.815 12.041 0 21.808 9.763 21.808 21.815 0 12.044-9.767 21.802-21.808 21.802-12.05 0-21.815-9.758-21.815-21.802" fill="#fff"/>
-</g>
-<g transform="matrix(4.1626 0 0 -4.1626 656.64 631.06)">
-<path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" fill="#414042"/>
-</g>
-</g>
-<path d="m4 1041.4a3 3 0 0 0 -3 3 3 3 0 0 0 3 3 3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3zm0 1a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z"/>
-<path d="m12 1041.4a3 3 0 0 0 -3 3 3 3 0 0 0 3 3 3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3zm0 1a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z"/>
-<rect x="6" y="1043.4" width="4" height="1" ry="0"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_gradient.svg b/editor/icons/dark/icon_gradient.svg
deleted file mode 100644
index 0fac616d58..0000000000
--- a/editor/icons/dark/icon_gradient.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="10" x2="10" y1="1" y2="15" gradientUnits="userSpaceOnUse">
-<stop stop-color="#4f4f4f" offset="0"/>
-<stop stop-color="#4f4f4f" stop-opacity="0" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1c-0.55228 0-1 0.44772-1 1v12c0 0.55228 0.44772 1 1 1h12c0.55228 0 1-0.44772 1-1v-12c0-0.55228-0.44772-1-1-1z" fill="url(#a)"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_gradient_texture.svg b/editor/icons/dark/icon_gradient_texture.svg
deleted file mode 100644
index d98f4c01a0..0000000000
--- a/editor/icons/dark/icon_gradient_texture.svg
+++ /dev/null
@@ -1,19 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="10" x2="10" y1="1" y2="15" gradientUnits="userSpaceOnUse">
-<stop stop-color="#4f4f4f" offset="0"/>
-<stop stop-color="#4f4f4f" stop-opacity="0" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1 -1v-12a1 1 0 0 0 -1 -1h-12zm1 2h10v8h-10v-8z" fill="url(#a)"/>
-<rect x="6" y="1043.4" width="2" height="1" fill="#4f4f4f"/>
-<rect x="6" y="1044.4" width="2" height="2" fill="#4f4f4f"/>
-<rect x="4" y="1045.4" width="2" height="1" fill="#4f4f4f"/>
-<rect x="8" y="1044.4" width="2" height="2" fill="#4f4f4f"/>
-<rect x="10" y="1044.4" width="2" height="2" fill="#4f4f4f"/>
-<rect x="8" y="1042.4" width="3" height="2" fill="#4f4f4f"/>
-<rect x="9" y="1041.4" width="1" height="1" fill="#4f4f4f"/>
-<rect x="5" y="1044.4" width="1" height="1" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_comment.svg b/editor/icons/dark/icon_graph_comment.svg
deleted file mode 100644
index f3faab0c54..0000000000
--- a/editor/icons/dark/icon_graph_comment.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path transform="translate(0 1038.4)" d="m3 1v2h-2v2h2v4h-2v2h2v2h2v-2h4v2h2v-2h2v-2h-2v-4h2v-2h-2v-2h-2v2h-4v-2h-2zm2 4h4v4h-4v-4z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_cube_uniform.svg b/editor/icons/dark/icon_graph_cube_uniform.svg
deleted file mode 100644
index a7ef1499b5..0000000000
--- a/editor/icons/dark/icon_graph_cube_uniform.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path transform="translate(0 1038.4)" d="m2 0c-1.1046 0-2 0.8954-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.8954 2-2v-10c0-1.1046-0.89543-2-2-2h-10zm4.9727 2a0.71438 0.71438 0 0 1 0.34766 0.074219l4.2852 2.1426a0.71438 0.71438 0 0 1 0.39453 0.64062v4.2852a0.71438 0.71438 0 0 1 -0.39453 0.63867l-4.2852 2.1426a0.71438 0.71438 0 0 1 -0.64062 0l-4.2852-2.1426a0.71438 0.71438 0 0 1 -0.39453 -0.63867v-4.2852a0.71438 0.71438 0 0 1 0.39453 -0.64062l4.2852-2.1426a0.71438 0.71438 0 0 1 0.29297 -0.074219zm0.027344 1.5137l-2.6895 1.3438 2.6895 1.3438 2.6895-1.3438-2.6895-1.3438zm-3.5723 2.498v2.6895l2.8574 1.4277v-2.6875l-2.8574-1.4297zm7.1445 0l-2.8574 1.4297v2.6875l2.8574-1.4277v-2.6895z" fill="#eac968"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_curve_map.svg b/editor/icons/dark/icon_graph_curve_map.svg
deleted file mode 100644
index a5a3184926..0000000000
--- a/editor/icons/dark/icon_graph_curve_map.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path d="m2 1049.4c8 0 9 0 9-9" fill="none" stroke="#f6f6f6" stroke-linecap="round" stroke-width="2"/>
-<path transform="translate(0 1038.4)" d="m11 4a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2zm-5 5a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2z" fill="#68d0ea"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_default_texture.svg b/editor/icons/dark/icon_graph_default_texture.svg
deleted file mode 100644
index 0a1a0e9673..0000000000
--- a/editor/icons/dark/icon_graph_default_texture.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path transform="translate(0 1038.4)" d="m2 2v10h10v-10h-10zm9 2v5h-8l2-3 2 2 4-4z" fill="#eae068"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_edit.svg b/editor/icons/dark/icon_graph_edit.svg
deleted file mode 100644
index 0abd546971..0000000000
--- a/editor/icons/dark/icon_graph_edit.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -1 -1.7305v-5.8555l4.793 4.793 1.4141-1.4141-4.793-4.793h5.8574a2 2 0 0 0 1.7285 1 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm10.656 6.9297l-0.70703 0.70703 1.4141 1.4141 0.70703-0.70703-1.4141-1.4141zm-1.4141 1.4141l-3.8887 3.8887-0.35352 1.7676 1.7676-0.35352 3.8887-3.8887-1.4141-1.4141z" fill="#29d739"/>
-<ellipse cx="3" cy="1039.4" r="2" fill="#6e6e6e"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_input.svg b/editor/icons/dark/icon_graph_input.svg
deleted file mode 100644
index c5034ecd2c..0000000000
--- a/editor/icons/dark/icon_graph_input.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<circle cx="7" cy="1045.4" r="6" fill="#f6f6f6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_node.svg b/editor/icons/dark/icon_graph_node.svg
deleted file mode 100644
index bdeeefb8e4..0000000000
--- a/editor/icons/dark/icon_graph_node.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -1 -1.7305v-5.8555l4.0859 4.0859 1.4141-1.4141-4.0859-4.0859h5.8574a2 2 0 0 0 1.7285 1 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm9.5 9a2.5 2.5 0 0 0 -2.5 2.5 2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0 2.5 -2.5 2.5 2.5 0 0 0 -2.5 -2.5z" fill="#29d739"/>
-<ellipse cx="3" cy="1039.4" r="2" fill="#6e6e6e"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_rgb.svg b/editor/icons/dark/icon_graph_rgb.svg
deleted file mode 100644
index c7f2402382..0000000000
--- a/editor/icons/dark/icon_graph_rgb.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)" fill-opacity=".39216">
-<path d="m7 1039.4a4 4 0 0 0 -4 4 4 4 0 0 0 0.03906 0.5195 4 4 0 0 0 -2.0391 3.4805 4 4 0 0 0 4 4 4 4 0 0 0 1.998 -0.541 4 4 0 0 0 2.002 0.541 4 4 0 0 0 4 -4 4 4 0 0 0 -2.0371 -3.4824 4 4 0 0 0 0.03711 -0.5176 4 4 0 0 0 -4 -4z" fill="#000000"/>
-<path d="m7 1040.4a3 3 0 0 0 -3 3 3 3 0 0 0 0.21094 1.1055 3 3 0 0 0 -2.2109 2.8945 3 3 0 0 0 3 3 3 3 0 0 0 2 -0.7676 3 3 0 0 0 2 0.7676 3 3 0 0 0 3 -3 3 3 0 0 0 -2.2148 -2.8906 3 3 0 0 0 0.21484 -1.1094 3 3 0 0 0 -3 -3z" fil#000000fff"/>
-<circle cx="7" cy="1043.4" r="3" fill="#f00"/>
-<circle cx="5" cy="1047.4" r="3" fill="#00f"/>
-<circle cx="9" cy="1047.4" r="3" fill="#0f0"/>
-<circle cx="7" cy="1043.4" r="3" fill="#f00"/>
-<circle cx="5" cy="1047.4" r="3" fill="#00f"/>
-<circle cx="9" cy="1047.4" r="3" fill="#0f0"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_rgb_op.svg b/editor/icons/dark/icon_graph_rgb_op.svg
deleted file mode 100644
index 8ec7782b47..0000000000
--- a/editor/icons/dark/icon_graph_rgb_op.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path d="m4 1050.4h6v-10h-6z" fill="#000000" fill-rule="evenodd" strok#000000fff" stroke-linejoin="round" stroke-width="2"/>
-<rect x="1" y="1041.4" width="2" height="2" #000000="#fff"/>
-<rect x="1" y="1047.4" width="2" height="#000000ill="#fff"/>
-<rect x="11" y="1044.4" width="2" heigh#000000" fill="#fff"/>
-<rect x="5" y="1041.4" width="4" height="2" fill="#ff4646" fill-opacity=".86275"/>
-<rect x="5" y="1044.4" width="4" height="2" fill="#46ff46" fill-opacity=".86275"/>
-<rect x="5" y="1047.4" width="4" height="2" fill="#4646ff" fill-opacity=".86275"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_rgb_uniform.svg b/editor/icons/dark/icon_graph_rgb_uniform.svg
deleted file mode 100644
index fb740429e5..0000000000
--- a/editor/icons/dark/icon_graph_rgb_uniform.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path d="m2 1038.4c-1.1046 0-2 0.8954-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.8954 2-2v-10c0-1.1046-0.89543-2-2-2z" fill="#000000"/>
-<path transform="translate(0 1038.4)" d="m7 2a3 3 0 0 0 -3 3 3 3 0 0 0 0.21094 1.1055 3 3 0 0 0 -2.2109 2.8945 3 3 0 0 0 3 3 3 3 0 0 0 2 -0.76758 3 3 0 0 0 2 0.76758 3 3 0 0 0 3 -3 3 3 0 0 0 -2.2148 -2.8906 3 3 0 0 0 0.21484 -1.1094 3 3 0 0 0 -3 -3z" fil#000000fff" fill-opacity=".39216"/>
-<circle cx="7" cy="1043.4" r="3" fill="#f00" fill-opacity=".39216"/>
-<circle cx="5" cy="1047.4" r="3" fill="#00f" fill-opacity=".39216"/>
-<circle cx="9" cy="1047.4" r="3" fill="#0f0" fill-opacity=".39216"/>
-<circle cx="7" cy="1043.4" r="3" fill="#f00" fill-opacity=".39216"/>
-<circle cx="5" cy="1047.4" r="3" fill="#00f" fill-opacity=".39216"/>
-<circle cx="9" cy="1047.4" r="3" fill="#0f0" fill-opacity=".39216"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_scalar.svg b/editor/icons/dark/icon_graph_scalar.svg
deleted file mode 100644
index ba921a961c..0000000000
--- a/editor/icons/dark/icon_graph_scalar.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path transform="translate(0 1038.4)" d="m6 2c-1.6569 0-3 1.3431-3 3s1.3431 3 3 3h2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1h-5v2h5c1.6569 0 3-1.3431 3-3s-1.3431-3-3-3h-2a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h5v-2h-5z" fill="#cf68ea"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_scalar_interp.svg b/editor/icons/dark/icon_graph_scalar_interp.svg
deleted file mode 100644
index edfbe36066..0000000000
--- a/editor/icons/dark/icon_graph_scalar_interp.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path d="m2 1050.4 10-10" fill="none" stroke="#cf68ea" stroke-linecap="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_scalar_op.svg b/editor/icons/dark/icon_graph_scalar_op.svg
deleted file mode 100644
index 34f7d9b2b1..0000000000
--- a/editor/icons/dark/icon_graph_scalar_op.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)" fill="#cf68ea">
-<path transform="translate(0 1038.4)" d="m4 1c-0.55226 1e-4 -0.99994 0.4477-1 1v10c5.52e-5 0.5523 0.44774 0.9999 1 1h6c0.55226-1e-4 0.99994-0.4477 1-1v-10c-5.5e-5 -0.5523-0.44774-0.9999-1-1zm1 3 4 3-4 3z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<rect x="1" y="1041.4" width="2" height="2"/>
-<rect x="1" y="1047.4" width="2" height="2"/>
-<rect x="11" y="1044.4" width="2" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_scalar_uniform.svg b/editor/icons/dark/icon_graph_scalar_uniform.svg
deleted file mode 100644
index d2ee2ec827..0000000000
--- a/editor/icons/dark/icon_graph_scalar_uniform.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path transform="translate(0 1038.4)" d="m2 0a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10a2 2 0 0 0 -2 -2h-10zm4 2h5v2h-5a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h2c1.6569 0 3 1.3431 3 3s-1.3431 3-3 3h-5v-2h5a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-2c-1.6569 0-3-1.3431-3-3s1.3431-3 3-3z" fill="#cf68ea"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_scalars_to_vec.svg b/editor/icons/dark/icon_graph_scalars_to_vec.svg
deleted file mode 100644
index bd3bc0424a..0000000000
--- a/editor/icons/dark/icon_graph_scalars_to_vec.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="1" x2="13.014" y1="7" y2="7" gradientUnits="userSpaceOnUse">
-<stop stop-color="#cf68ea" offset="0"/>
-<stop stop-color="#b8ea68" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1038.4)">
-<path transform="translate(0 1038.4)" d="m1.9902 0.99023a1.0001 1.0001 0 0 0 -0.69727 1.7168l3.293 3.293h-2.5859a1.0001 1.0001 0 1 0 0 2h2.5859l-3.293 3.293a1.0001 1.0001 0 1 0 1.4141 1.4141l4.707-4.707h4.5859a1.0001 1.0001 0 1 0 0 -2h-4.5859l-4.707-4.707a1.0001 1.0001 0 0 0 -0.7168 -0.30273z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="url(#a)" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_texscreen.svg b/editor/icons/dark/icon_graph_texscreen.svg
deleted file mode 100644
index 6c26332203..0000000000
--- a/editor/icons/dark/icon_graph_texscreen.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path d="m2 1041.4h10v8h-10z" fill="none" stroke="#f6f6f6" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-<rect x="3" y="1042.4" width="8" height="1" fill="#f6f6f6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_texture_uniform.svg b/editor/icons/dark/icon_graph_texture_uniform.svg
deleted file mode 100644
index 9e72743432..0000000000
--- a/editor/icons/dark/icon_graph_texture_uniform.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path transform="translate(0 1038.4)" d="m2 0c-1.1046 0-2 0.8954-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.8954 2-2v-10c0-1.1046-0.89543-2-2-2h-10zm0 2h10v10h-10v-10zm9 2l-4 4-2-2-2 3h8v-5z" fill="#eae068"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_time.svg b/editor/icons/dark/icon_graph_time.svg
deleted file mode 100644
index 6227b53c62..0000000000
--- a/editor/icons/dark/icon_graph_time.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)" fill="#f6f6f6">
-<rect x="6" y="1042.4" width="2" height="4"/>
-<rect x="6" y="1044.4" width="4" height="2"/>
-<path transform="translate(0 1038.4)" d="m7 0a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm0 2a5 5 0 0 1 5 5 5 5 0 0 1 -5 5 5 5 0 0 1 -5 -5 5 5 0 0 1 5 -5z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_vec_dp.svg b/editor/icons/dark/icon_graph_vec_dp.svg
deleted file mode 100644
index 0b24b47895..0000000000
--- a/editor/icons/dark/icon_graph_vec_dp.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path d="m1 1042.4 2 6 2-6" fill="none" stroke="#b8ea68" stroke-linejoin="round" stroke-width="2"/>
-<circle cx="7" cy="1046.4" r="1" fill="#b8ea68"/>
-<path d="m9 1042.4 2 6 2-6" fill="none" stroke="#b8ea68" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_vec_interp.svg b/editor/icons/dark/icon_graph_vec_interp.svg
deleted file mode 100644
index a3df7ff93d..0000000000
--- a/editor/icons/dark/icon_graph_vec_interp.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path d="m2 1050.4 10-10" fill="none" stroke="#b8ea68" stroke-linecap="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_vec_length.svg b/editor/icons/dark/icon_graph_vec_length.svg
deleted file mode 100644
index cd2a39312a..0000000000
--- a/editor/icons/dark/icon_graph_vec_length.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<rect y="1039.4" width="2" height="12" fill="#b8ea68"/>
-<rect x="12" y="1039.4" width="2" height="12" fill="#b8ea68"/>
-<path d="m5 1043.4 2 5 2-5" fill="none" stroke="#b8ea68" stroke-linecap="square" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_vec_op.svg b/editor/icons/dark/icon_graph_vec_op.svg
deleted file mode 100644
index 2792d63378..0000000000
--- a/editor/icons/dark/icon_graph_vec_op.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path transform="translate(0 1038.4)" d="m4 1c-0.55226 1e-4 -0.99994 0.4477-1 1v1h-2v2h2v4h-2v2h2v1c5.52e-5 0.5523 0.44774 0.9999 1 1h6c0.55226-1e-4 0.99994-0.4477 1-1v-4h2v-2h-2v-4c-5.5e-5 -0.5523-0.44774-0.9999-1-1h-6zm1 3l4 3-4 3v-6z" color="#000000" color-rendering="auto" fill="#b8ea68" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_vec_scalar_op.svg b/editor/icons/dark/icon_graph_vec_scalar_op.svg
deleted file mode 100644
index effcb596a1..0000000000
--- a/editor/icons/dark/icon_graph_vec_scalar_op.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)" fill-rule="evenodd" shape-rendering="auto">
-<path transform="translate(0 1038.4)" d="m3 7v2h-2v2h2v1c5.52e-5 0.5523 0.44774 0.9999 1 1h6c0.55226-1e-4 0.99994-0.4477 1-1v-4h2v-1h-4l-4 3v-3h-2z" color="#000000" color-rendering="auto" fill="#cf68ea" image-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<path d="m3 1045.4v-2h-2v-2h2v-1c5.52e-5 -0.5523 0.44774-0.9999 1-1h6c0.55226 1e-4 0.99994 0.4477 1 1v4h2v1h-4l-4-3v3h-2z" color="#000000" color-rendering="auto" fill="#b8ea68" image-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_vec_to_scalars.svg b/editor/icons/dark/icon_graph_vec_to_scalars.svg
deleted file mode 100644
index 2ecacb8434..0000000000
--- a/editor/icons/dark/icon_graph_vec_to_scalars.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="1" x2="13.014" y1="7" y2="7" gradientTransform="matrix(-1 0 0 1 14 1038.4)" gradientUnits="userSpaceOnUse">
-<stop stop-color="#cf68ea" offset="0"/>
-<stop stop-color="#b8ea68" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1038.4)">
-<path d="m12.01 1039.4a1.0001 1.0001 0 0 1 0.69726 1.7168l-3.293 3.293h2.5859a1.0001 1.0001 0 1 1 0 2h-2.5859l3.293 3.293a1.0001 1.0001 0 1 1 -1.4141 1.414l-4.707-4.707h-4.5859a1.0001 1.0001 0 1 1 0 -2h4.5859l4.707-4.707a1.0001 1.0001 0 0 1 0.7168 -0.3028z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="url(#a)" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_vecs_to_xform.svg b/editor/icons/dark/icon_graph_vecs_to_xform.svg
deleted file mode 100644
index 8bd533fbf0..0000000000
--- a/editor/icons/dark/icon_graph_vecs_to_xform.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="1" x2="13.014" y1="7" y2="7" gradientTransform="translate(.00074682 1038.4)" gradientUnits="userSpaceOnUse">
-<stop stop-color="#b8ea68" offset="0"/>
-<stop stop-color="#e3383d" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1038.4)">
-<path d="m1.991 1039.4a1.0001 1.0001 0 0 0 -0.69726 1.7168l3.293 3.293h-2.5859a1.0001 1.0001 0 1 0 0 2h2.5859l-3.293 3.293a1.0001 1.0001 0 1 0 1.4141 1.414l4.707-4.707h4.5859a1.0001 1.0001 0 1 0 0 -2h-4.5859l-4.707-4.707a1.0001 1.0001 0 0 0 -0.7168 -0.3028z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="url(#a)" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_vector.svg b/editor/icons/dark/icon_graph_vector.svg
deleted file mode 100644
index 81772fa4f5..0000000000
--- a/editor/icons/dark/icon_graph_vector.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path d="m8 1038.4v2h-5v2h5v2l3-3zm-3.6562 5.6289-1.7148 1.0293 0.51367 0.8574 3 5c0.3885 0.647 1.3263 0.647 1.7148 0l3-5 0.51367-0.8574-1.7148-1.0293-0.51367 0.8574-2.1426 3.5703-2.1426-3.5703z" color="#000000" color-rendering="auto" fill="#b8ea68" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_vector_uniform.svg b/editor/icons/dark/icon_graph_vector_uniform.svg
deleted file mode 100644
index 66f31bf5dd..0000000000
--- a/editor/icons/dark/icon_graph_vector_uniform.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path transform="translate(0 1038.4)" d="m2 0c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2zm6 0 3 3-3 3v-2h-5v-2h5zm-3.6562 5.6289 0.51367 0.85742 2.1426 3.5703 2.1426-3.5703 0.51367-0.85742l1.7148 1.0293-0.51367 0.85742-3 5c-0.3885 0.64706-1.3263 0.64706-1.7148 0l-3-5-0.51367-0.85742z" fill="#b8ea68"/>
-<path transform="translate(0 1038.4)" d="m23 0v2h-5v2h5v2l3-3zm-3.6562 5.6289-1.7148 1.0293 0.51367 0.85742 3 5c0.3885 0.64706 1.3263 0.64706 1.7148 0l3-5 0.51367-0.85742-1.7148-1.0293-0.51367 0.85742-2.1426 3.5703-2.1426-3.5703z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_xform.svg b/editor/icons/dark/icon_graph_xform.svg
deleted file mode 100644
index 0554285612..0000000000
--- a/editor/icons/dark/icon_graph_xform.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<rect x="1" y="1039.4" width="1" height="12" fill="#e3383d"/>
-<rect x="1" y="1039.4" width="3" height="1" fill="#e3383d"/>
-<rect x="1" y="1050.4" width="3" height="1" fill="#e3383d"/>
-<rect x="10" y="1050.4" width="3" height="1" fill="#e3383d"/>
-<rect x="10" y="1039.4" width="3" height="1" fill="#e3383d"/>
-<rect x="12" y="1039.4" width="1" height="12" fill="#e3383d"/>
-<path d="m4 1049.4v-7l3 3 3-3v7" fill="none" stroke="#e3383d" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_xform_mult.svg b/editor/icons/dark/icon_graph_xform_mult.svg
deleted file mode 100644
index 0e2da7f7c0..0000000000
--- a/editor/icons/dark/icon_graph_xform_mult.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path d="m1 1049.4v-7l2 3 2-3v7" fill="none" stroke="#e3383d" stroke-linejoin="round" stroke-width="2"/>
-<path d="m9 1049.4v-7l2 3 2-3v7" fill="none" stroke="#e3383d" stroke-linejoin="round" stroke-width="2"/>
-<circle cx="7" cy="1045.4" r="1" fill="#e3383d"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_xform_scalar_func.svg b/editor/icons/dark/icon_graph_xform_scalar_func.svg
deleted file mode 100644
index 350d9e98d7..0000000000
--- a/editor/icons/dark/icon_graph_xform_scalar_func.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)" fill="#cf68ea">
-<rect x="6" y="1042.4" width="2" height="5"/>
-<path transform="translate(0 1038.4)" d="m9.0703 1a3 3 0 0 0 -1.5703 0.40234 3 3 0 0 0 -1.5 2.5977h2a1 1 0 0 1 1 -1 1 1 0 0 1 1 1h2a3 3 0 0 0 -1.5 -2.5977 3 3 0 0 0 -1.4297 -0.40234z"/>
-<rect x="10" y="1042.4" width="2" height="1"/>
-<path transform="translate(0 1038.4)" d="m2 10a3 3 0 0 0 1.5 2.5977 3 3 0 0 0 3 0 3 3 0 0 0 1.5 -2.5977h-2a1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1h-2z"/>
-<rect transform="scale(1,-1)" x="6" y="-1048.4" width="2" height="1"/>
-<rect x="4" y="1044.4" width="6" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_xform_to_vecs.svg b/editor/icons/dark/icon_graph_xform_to_vecs.svg
deleted file mode 100644
index 6fb5953b95..0000000000
--- a/editor/icons/dark/icon_graph_xform_to_vecs.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="1" x2="13.014" y1="7" y2="7" gradientTransform="matrix(-1 0 0 1 14 1038.4)" gradientUnits="userSpaceOnUse">
-<stop stop-color="#b8ea68" offset="0"/>
-<stop stop-color="#e3383d" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1038.4)">
-<path d="m12.01 1039.4a1.0001 1.0001 0 0 1 0.69726 1.7168l-3.293 3.293h2.5859a1.0001 1.0001 0 1 1 0 2h-2.5859l3.293 3.293a1.0001 1.0001 0 1 1 -1.4141 1.414l-4.707-4.707h-4.5859a1.0001 1.0001 0 1 1 0 -2h4.5859l4.707-4.707a1.0001 1.0001 0 0 1 0.7168 -0.3028z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="url(#a)" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_xform_uniform.svg b/editor/icons/dark/icon_graph_xform_uniform.svg
deleted file mode 100644
index 9fd8eca5b0..0000000000
--- a/editor/icons/dark/icon_graph_xform_uniform.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path transform="translate(0 1038.4)" d="m2 0c-1.1046 0-2 0.8954-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.8954 2-2v-10c0-1.1046-0.89543-2-2-2h-10zm-1 1h1 2v1h-2v10h2v1h-2-1v-1-10-1zm9 0h3v11 1h-3v-1h2v-10h-2v-1zm-0.029297 2a1.0001 1.0001 0 0 1 1.0293 1v7h-2v-4.5859l-1.293 1.293a1.0001 1.0001 0 0 1 -1.4141 0l-1.293-1.293v4.5859h-2v-7a1.0001 1.0001 0 0 1 0.98438 -0.99805 1.0001 1.0001 0 0 1 0.72266 0.29102l2.293 2.293 2.293-2.293a1.0001 1.0001 0 0 1 0.67773 -0.29297z" fill="#e3383d"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_xform_vec_func.svg b/editor/icons/dark/icon_graph_xform_vec_func.svg
deleted file mode 100644
index 29bff80cd5..0000000000
--- a/editor/icons/dark/icon_graph_xform_vec_func.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)" fill="#b8ea68">
-<rect x="6" y="1042.4" width="2" height="5"/>
-<path transform="translate(0 1038.4)" d="m9.0703 1a3 3 0 0 0 -1.5703 0.40234 3 3 0 0 0 -1.5 2.5977h2a1 1 0 0 1 1 -1 1 1 0 0 1 1 1h2a3 3 0 0 0 -1.5 -2.5977 3 3 0 0 0 -1.4297 -0.40234z"/>
-<rect x="10" y="1042.4" width="2" height="1"/>
-<path transform="translate(0 1038.4)" d="m2 10a3 3 0 0 0 1.5 2.5977 3 3 0 0 0 3 0 3 3 0 0 0 1.5 -2.5977h-2a1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1h-2z"/>
-<rect transform="scale(1,-1)" x="6" y="-1048.4" width="2" height="1"/>
-<rect x="4" y="1044.4" width="6" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_xform_vec_imult.svg b/editor/icons/dark/icon_graph_xform_vec_imult.svg
deleted file mode 100644
index 39d0ea4646..0000000000
--- a/editor/icons/dark/icon_graph_xform_vec_imult.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path d="m1 1042.4 2 6 2-6" fill="none" stroke="#b8ea68" stroke-linejoin="round" stroke-width="2"/>
-<circle cx="7" cy="1046.4" r="1" fill="#b8ea68"/>
-<path d="m9 1049.4v-7l2 3 2-3v7" fill="none" stroke="#e3383d" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_graph_xform_vec_mult.svg b/editor/icons/dark/icon_graph_xform_vec_mult.svg
deleted file mode 100644
index 5f59622855..0000000000
--- a/editor/icons/dark/icon_graph_xform_vec_mult.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)">
-<path d="m9 1042.4 2 6 2-6" fill="none" stroke="#b8ea68" stroke-linejoin="round" stroke-width="2"/>
-<circle cx="7" cy="1046.4" r="1" fill="#b8ea68"/>
-<path d="m1 1049.4v-7l2 3 2-3v7" fill="none" stroke="#e3383d" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_grid.svg b/editor/icons/dark/icon_grid.svg
deleted file mode 100644
index b4c7be4678..0000000000
--- a/editor/icons/dark/icon_grid.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 1v2 10 2h2 12v-2-12h-12-2zm2 2h2v2h-2v-2zm4 0h2v2h-2v-2zm4 0h2v2h-2v-2zm-8 4h2v2h-2v-2zm4 0h2v2h-2v-2zm4 0h2v2h-2v-2zm-8 4h2v2h-2v-2zm4 0h2v2h-2v-2zm4 0h2v2h-2v-2z" fill="#6d90ff" fill-opacity=".98824"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_grid_container.svg b/editor/icons/dark/icon_grid_container.svg
deleted file mode 100644
index c16949a03a..0000000000
--- a/editor/icons/dark/icon_grid_container.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2h-10zm0 2h2v2h-2v-2zm4 0h2v2h-2v-2zm4 0h2v2h-2v-2zm-8 4h2v2h-2v-2zm4 0h2v2h-2v-2zm4 0h2v2h-2v-2zm-8 4h2v2h-2v-2zm4 0h2v2h-2v-2zm4 0h2v2h-2v-2z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_grid_map.svg b/editor/icons/dark/icon_grid_map.svg
deleted file mode 100644
index a84cdf9994..0000000000
--- a/editor/icons/dark/icon_grid_map.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1-6 3v8l6 3 6-3v-2l-2-1-4 2-2-1v-4l2-1v-2l2-1zm4 2-2 1v2l2 1 2-1v-2z" fill="#ff5f5f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_groove_joint_2d.svg b/editor/icons/dark/icon_groove_joint_2d.svg
deleted file mode 100644
index a84c735300..0000000000
--- a/editor/icons/dark/icon_groove_joint_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m15 1037.4h-5v6h-5v2h5v6h5zm-7 0h-7v14h7v-4h-5v-6h5z" fill="#6d90ff" fill-opacity=".98824"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_group.svg b/editor/icons/dark/icon_group.svg
deleted file mode 100644
index 324de52572..0000000000
--- a/editor/icons/dark/icon_group.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1v6h-6v8h8v-6h6v-8zm2 2h4v4h-4z" fill="#4f4f4f" fill-opacity=".39216"/>
-<path transform="translate(0 1036.4)" d="m1 1v2c0 2.34e-5 0.446 0 1 0s1 2.34e-5 1 0v-2c0-2.341e-5 -0.446 0-1 0s-1-2.341e-5 -1 0zm12 0v2c0 2.34e-5 0.446 0 1 0s1 2.34e-5 1 0v-2c0-2.341e-5 -0.446 0-1 0s-1-2.341e-5 -1 0zm-12 12v2c0 2.3e-5 0.446 0 1 0s1 2.3e-5 1 0v-2c0-2.3e-5 -0.446 0-1 0s-1-2.3e-5 -1 0zm12 0v2c0 2.3e-5 0.446 0 1 0s1 2.3e-5 1 0v-2c0-2.3e-5 -0.446 0-1 0s-1-2.3e-5 -1 0z" fill="#000000"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_groups.svg b/editor/icons/dark/icon_groups.svg
deleted file mode 100644
index cb94b0e4d3..0000000000
--- a/editor/icons/dark/icon_groups.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="1" y="1040.4" width="14" height="8" fill="none" stroke="#4f4f4f" stroke-linejoin="round" stroke-width="2"/>
-<ellipse cx="5" cy="1044.4" rx="2" ry="2" fill="#4f4f4f"/>
-<ellipse cx="11" cy="1044.4" rx="2" ry="2" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_gui_close.svg b/editor/icons/dark/icon_gui_close.svg
deleted file mode 100644
index 822c59653e..0000000000
--- a/editor/icons/dark/icon_gui_close.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3.7578 2.3438l-1.4141 1.4141 4.2422 4.2422-4.2422 4.2422 1.4141 1.4141 4.2422-4.2422 4.2422 4.2422 1.4141-1.4141-4.2422-4.2422 4.2422-4.2422-1.4141-1.4141-4.2422 4.2422-4.2422-4.2422z" fill="#000000" fill-opacity=".89804"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_h_box_container.svg b/editor/icons/dark/icon_h_box_container.svg
deleted file mode 100644
index b42fb42236..0000000000
--- a/editor/icons/dark/icon_h_box_container.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2zm0 2h10v10h-10z"/>
-<rect x="5" y="1039.4" width="2" height="10"/>
-<rect x="9" y="1039.4" width="2" height="10"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_h_button_array.svg b/editor/icons/dark/icon_h_button_array.svg
deleted file mode 100644
index 99888a9c02..0000000000
--- a/editor/icons/dark/icon_h_button_array.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m4 1v3.1328l-1.4453-0.96484-1.1094 1.6641 3 2c0.3359 0.2239 0.77347 0.2239 1.1094 0l3-2-1.1094-1.6641-1.4453 0.96484v-3.1328h-2zm8 4v2h-2v2h2v2h2v-2h2v-2h-2v-2h-2zm-8.5 4c-0.831 0-1.5 0.669-1.5 1.5v0.5 1h-1v2h8v-2h-1v-1-0.5c0-0.831-0.669-1.5-1.5-1.5h-3z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_h_scroll_bar.svg b/editor/icons/dark/icon_h_scroll_bar.svg
deleted file mode 100644
index 69da81e86f..0000000000
--- a/editor/icons/dark/icon_h_scroll_bar.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m15 1041.4c0-1.108-0.892-2-2-2h-10c-1.108 0-2 0.892-2 2v6c0 1.108 0.892 2 2 2h10c1.108 0 2-0.892 2-2zm-1 2.9883a1.0001 1.0001 0 0 1 -0.168 0.5664l-2 3a1.0001 1.0001 0 1 1 -1.664 -1.1094l1.6289-2.4453-1.6289-2.4453a1.0001 1.0001 0 1 1 1.664 -1.1094l2 3a1.0001 1.0001 0 0 1 0.168 0.543zm-7.9922-2.9981a1.0001 1.0001 0 0 1 -0.1758 0.5645l-1.6308 2.4453 1.6308 2.4453a1.0001 1.0001 0 1 1 -1.664 1.1094l-2-3a1.0001 1.0001 0 0 1 0 -1.1094l2-3a1.0001 1.0001 0 0 1 1.8398 0.5449z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_h_separator.svg b/editor/icons/dark/icon_h_separator.svg
deleted file mode 100644
index 8b6f12a5aa..0000000000
--- a/editor/icons/dark/icon_h_separator.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<rect x="5" y="1038.4" width="6" height="3"/>
-<rect transform="matrix(0,-1,-1,0,0,0)" x="-1045.4" y="-15" width="2" height="14"/>
-<rect x="5" y="1047.4" width="6" height="3"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_h_slider.svg b/editor/icons/dark/icon_h_slider.svg
deleted file mode 100644
index 8c34f93206..0000000000
--- a/editor/icons/dark/icon_h_slider.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 3c-0.55228 0-1 0.44772-1 1v2c0 0.55228 0.44772 1 1 1s1-0.44772 1-1v-2c0-0.55228-0.44772-1-1-1zm12 0c-0.55228 0-1 0.44772-1 1v2c0 0.55228 0.44772 1 1 1s1-0.44772 1-1v-2c0-0.55228-0.44772-1-1-1zm-6 1c-0.55228 0-1 0.44772-1 1s0.44772 1 1 1 1-0.44772 1-1-0.44772-1-1-1zm5 5c-1.1046 0-2 0.89543-2 2 0 1.1046 0.89543 2 2 2 1.0099-3.37e-4 1.8611-0.75351 1.9844-1.7559 0.04003-0.16104 0.03936-0.32952-2e-3 -0.49024-0.12404-1.0008-0.97388-1.7527-1.9824-1.7539zm-11 1c-1.3523-0.019125-1.3523 2.0191 0 2h7.1309c-0.085635-0.32648-0.1296-0.66248-0.13086-1 0.00189-0.3376 0.046518-0.67361 0.13281-1z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#29d739" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_h_split_container.svg b/editor/icons/dark/icon_h_split_container.svg
deleted file mode 100644
index 7ca7c5567f..0000000000
--- a/editor/icons/dark/icon_h_split_container.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2zm0 2h10v10h-10z"/>
-<rect x="7" y="1039.4" width="2" height="10"/>
-<path d="m9 1042.4v4l2-2z"/>
-<path d="m7 1042.4-2 2 2 2z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_h_t_t_p_request.svg b/editor/icons/dark/icon_h_t_t_p_request.svg
deleted file mode 100644
index 115d88bae8..0000000000
--- a/editor/icons/dark/icon_h_t_t_p_request.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m1 10v2 1 2h1v-2h1v2h1v-5h-1v2h-1v-2h-1zm4 0v1h1v4h1v-4h1v-1h-3zm4 0v1h1v4h1v-4h1v-1h-3zm4 0v2 1 2h1v-2h1 1v-1-2h-2-1zm1 1h1v1h-1v-1z"/>
-<path transform="translate(0 1036.4)" d="m4 1l-3 4h2v3h2v-3h2l-3-4zm7 0v3h-2l3 4 3-4h-2v-3h-2z" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_headphones.svg b/editor/icons/dark/icon_headphones.svg
deleted file mode 100644
index f0c0fd8812..0000000000
--- a/editor/icons/dark/icon_headphones.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m1 1046.4v3h2v2h2v-5h-4z"/>
-<path d="m11 1046.4v5h2v-2h2v-3h-4z"/>
-<path d="m8 1037.4a7 7 0 0 0 -7 7h2a5 5 0 0 1 5 -5 5 5 0 0 1 5 5h2a7 7 0 0 0 -7 -7z"/>
-<rect x="1" y="1044.4" width="2" height="2"/>
-<rect x="13" y="1044.4" width="2" height="2"/>
-<circle cx="3" cy="1049.4" r="2"/>
-<circle transform="scale(-1,1)" cx="-13" cy="1049.4" r="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_help.svg b/editor/icons/dark/icon_help.svg
deleted file mode 100644
index 3c294f92b6..0000000000
--- a/editor/icons/dark/icon_help.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m5.0293 1c-0.99969-0.010925-2.0096 0.31165-3.0293 1v7c2.0172-1.3529 4.0167-1.3136 6 0 1.9833-1.3136 3.9828-1.3529 6 0v-7c-1.0197-0.68835-2.0296-1.0109-3.0293-1-0.6613 0.007227-1.3175 0.1735-1.9707 0.46289v4.5371h-1v-4c-0.98156-0.64465-1.971-0.98908-2.9707-1zm-5.0293 9v6h2a3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3h-2zm5 3a3 3 0 0 0 3 3 3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3 3 3 0 0 0 -3 3zm6 0a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v-2h-1a3 3 0 0 0 -3 3zm-9-1a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v-2zm6 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#4f4f4f" fill-opacity=".58824" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".32549" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_help_search.svg b/editor/icons/dark/icon_help_search.svg
deleted file mode 100644
index 2fea4e2b7d..0000000000
--- a/editor/icons/dark/icon_help_search.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" stroke-width="2">
-<path transform="translate(0 1036.4)" d="m0 10v6h2c1.6569 0 3-1.3431 3-3s-1.3431-3-3-3zm5 3c0 1.6569 1.3431 3 3 3s3-1.3431 3-3-1.3431-3-3-3-3 1.3431-3 3zm6 0c0 1.6569 1.3431 3 3 3h1v-2h-1c-0.55228-1e-5 -0.99999-0.44772-1-1 1e-5 -0.55228 0.44772-0.99999 1-1h1v-2h-1c-1.6569 0-3 1.3431-3 3zm-9-1c0.55228 0 1 0.44772 1 1s-0.44772 1-1 1zm6 0c0.55228 1e-5 0.99999 0.44772 1 1-9.6e-6 0.55228-0.44772 0.99999-1 1-0.55228-1e-5 -0.99999-0.44772-1-1 9.6e-6 -0.55228 0.44772-0.99999 1-1z" fill="#4f4f4f" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".32549"/>
-<path d="m9 1036.4a4 4 0 0 0 -4 4 4 4 0 0 0 4 4 4 4 0 0 0 4 -4 4 4 0 0 0 -4 -4zm0 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z" fill="#4f4f4f" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".32549"/>
-<path d="m7 1042.4-3 3" fill="none" stroke="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_hidden.svg b/editor/icons/dark/icon_hidden.svg
deleted file mode 100644
index e726d8863e..0000000000
--- a/editor/icons/dark/icon_hidden.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2.9609 7.7266l-1.9219 0.54883c0.31999 1.12 0.8236 2.0593 1.4316 2.8398l-0.83398 0.83398 1.4141 1.4141 0.84375-0.84375c0.98585 0.74762 2.0766 1.2067 3.1055 1.3867v1.0938h2v-1.0938c1.0288-0.17998 2.1196-0.6391 3.1055-1.3867l0.84375 0.84375 1.4141-1.4141-0.83398-0.83398c0.60804-0.78055 1.1117-1.7199 1.4316-2.8398l-1.9219-0.54883c-0.8756 3.0646-3.5391 4.2734-5.0391 4.2734s-4.1635-1.2088-5.0391-4.2734z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_hinge_joint.svg b/editor/icons/dark/icon_hinge_joint.svg
deleted file mode 100644
index b7eddfe22b..0000000000
--- a/editor/icons/dark/icon_hinge_joint.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7.2832 1.3281a1.0001 1.0001 0 0 0 -0.88086 0.51172l-3.6895 6.3906c0.40599-0.13877 0.83411-0.23047 1.2871-0.23047 0.37043 0 0.72206 0.067873 1.0625 0.16211l3.0723-5.3223a1.0001 1.0001 0 0 0 -0.85156 -1.5117zm-3.2832 7.6719a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h10a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-7.1738a3 3 0 0 0 0.17383 -1 3 3 0 0 0 -3 -3zm0 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#ff5f5f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_history.svg b/editor/icons/dark/icon_history.svg
deleted file mode 100644
index 03c0f199d4..0000000000
--- a/editor/icons/dark/icon_history.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4 -4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6 -6 6 6 0 0 0 -6 -6z"/>
-<path transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)" d="m4.118 1048.3-1.6771-0.9683-1.6771-0.9682 1.6771-0.9683 1.6771-0.9682-1e-7 1.9365z"/>
-<rect x="8" y="1041.4" width="2" height="4"/>
-<rect x="8" y="1043.4" width="4" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_hsize.svg b/editor/icons/dark/icon_hsize.svg
deleted file mode 100644
index 0b5e1c15bb..0000000000
--- a/editor/icons/dark/icon_hsize.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m4 7v-2l-3 3 3 3v-2h8v2l3-3-3-3v2z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_image.svg b/editor/icons/dark/icon_image.svg
deleted file mode 100644
index 6a01dd6138..0000000000
--- a/editor/icons/dark/icon_image.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1 -1v-12a1 1 0 0 0 -1 -1h-12zm1 2h10v8h-10v-8zm6 2l-1.5 2.5-0.70117 1.168-0.099609-0.16797-0.89844-1.5-0.90039 1.5-0.90039 1.5h1.8008 0.19922 1.5996 1.4004 3l-1.5-2.5-1.5-2.5z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_image_texture.svg b/editor/icons/dark/icon_image_texture.svg
deleted file mode 100644
index 8805df28b9..0000000000
--- a/editor/icons/dark/icon_image_texture.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1 -1v-12a1 1 0 0 0 -1 -1h-12zm1 2h10v8h-10v-8zm6 2v1h-1v1h-2v1h-1v1h-1v1h2 2 2 2v-2h-1v-2h-1v-1h-1z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_immediate_geometry.svg b/editor/icons/dark/icon_immediate_geometry.svg
deleted file mode 100644
index 60b0f8ea36..0000000000
--- a/editor/icons/dark/icon_immediate_geometry.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m2.9208 1046.4c-0.26373 0.3-0.4204 0.7296-0.4204 1.2383 0 1.6277-3.1381-0.1781-0.33757 2.6703 0.88382 0.899 2.6544 0.6701 3.5382-0.2288 0.88384-0.899 0.88382-2.3565 0-3.2554-1.1002-1.1191-2.2001-1.0845-2.7803-0.4244zm2.3802-1.6103 2.4005 2.4416 6.8014-6.9177c0.66286-0.6742 0.66286-1.7673 0-2.4415-0.66288-0.6741-1.7376-0.6741-2.4005 0z" fill="#ff5f5f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_import_check.svg b/editor/icons/dark/icon_import_check.svg
deleted file mode 100644
index 758572899a..0000000000
--- a/editor/icons/dark/icon_import_check.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m2 1044.4 4 4 8-8" fill="none" stroke="#00f010" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_import_fail.svg b/editor/icons/dark/icon_import_fail.svg
deleted file mode 100644
index f7179e1e90..0000000000
--- a/editor/icons/dark/icon_import_fail.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2.9902 1.9902a1.0001 1.0001 0 0 0 -0.69727 1.7168l4.293 4.293-4.293 4.293a1.0001 1.0001 0 1 0 1.4141 1.4141l4.293-4.293 4.293 4.293a1.0001 1.0001 0 1 0 1.4141 -1.4141l-4.293-4.293 4.293-4.293a1.0001 1.0001 0 0 0 -0.72656 -1.7148 1.0001 1.0001 0 0 0 -0.6875 0.30078l-4.293 4.293-4.293-4.293a1.0001 1.0001 0 0 0 -0.7168 -0.30273z" color="#000000" color-rendering="auto" fill="#ff4040" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_instance.svg b/editor/icons/dark/icon_instance.svg
deleted file mode 100644
index 46446b617f..0000000000
--- a/editor/icons/dark/icon_instance.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m5 1047.4 6-6" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-width="2"/>
-<path transform="translate(0 1036.4)" d="m11 1c-2.1973 0-4 1.8027-4 4 0 0.35477 0.062329 0.69321 0.15039 1.0215l2.3945-2.3945c0.36302-0.38506 0.87563-0.62695 1.4551-0.62695 1.1164 0 2 0.8836 2 2 0 0.57388-0.23667 1.0829-0.61523 1.4453l-2.4043 2.4043c0.32773 0.087749 0.66541 0.15039 1.0195 0.15039 2.1973 0 4-1.8027 4-4s-1.8027-4-4-4zm-6 6c-2.1973 0-4 1.8027-4 4s1.8027 4 4 4 4-1.8027 4-4c0-0.35412-0.062641-0.6918-0.15039-1.0195l-2.4043 2.4043c-0.36245 0.37857-0.87143 0.61523-1.4453 0.61523-1.1164 0-2-0.8836-2-2 0-0.57944 0.24189-1.0921 0.62695-1.4551l2.3945-2.3945c-0.32827-0.088062-0.66671-0.15039-1.0215-0.15039z" color="#000000" color-rendering="auto" fill="#4f4f4f" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_instance_options.svg b/editor/icons/dark/icon_instance_options.svg
deleted file mode 100644
index 50444dab54..0000000000
--- a/editor/icons/dark/icon_instance_options.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path transform="translate(0 1036.4)" d="m1 7v6c0 1.1046 0.89543 2 2 2h12v-8h-14zm4 2h6l-3 4-3-4z"/>
-<path d="m0.71129 1040.4 0.28871 1.9791l2.2438-0.3273-0.81826-1.9018-1.7143 0.25zm3.6933-0.5387 0.81826 1.9018 1.9791-0.2887-0.81826-1.9018-1.9791 0.2887zm3.9581-0.5775 0.81826 1.9018 1.9791-0.2887-0.81826-1.9018-1.9791 0.2887zm3.9581-0.5774 0.81826 1.9018 1.7143-0.25-0.28871-1.9791-2.2438 0.3273z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_integer.svg b/editor/icons/dark/icon_integer.svg
deleted file mode 100644
index bcd952f635..0000000000
--- a/editor/icons/dark/icon_integer.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)" fill="#cf68ea">
-<rect x="6" y="1040.4" width="2" height="10"/>
-<rect x="4" y="1039.4" width="6" height="2"/>
-<rect x="4" y="1049.4" width="6" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_interp_cubic.svg b/editor/icons/dark/icon_interp_cubic.svg
deleted file mode 100644
index 35726ce1e9..0000000000
--- a/editor/icons/dark/icon_interp_cubic.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="8" version="1.1" viewBox="0 0 16 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<path d="m2 1050.4c3 0 3-4 6-4s3 4 6 4" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_interp_linear.svg b/editor/icons/dark/icon_interp_linear.svg
deleted file mode 100644
index adc3d8212b..0000000000
--- a/editor/icons/dark/icon_interp_linear.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="8" version="1.1" viewBox="0 0 16 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<path d="m2 1050.4 6-4 6 4" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_interp_raw.svg b/editor/icons/dark/icon_interp_raw.svg
deleted file mode 100644
index 46b8b86467..0000000000
--- a/editor/icons/dark/icon_interp_raw.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="8" version="1.1" viewBox="0 0 16 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<path d="m2 1050.4h3v-4h6v4h3" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_interp_wrap_clamp.svg b/editor/icons/dark/icon_interp_wrap_clamp.svg
deleted file mode 100644
index 699266a7c0..0000000000
--- a/editor/icons/dark/icon_interp_wrap_clamp.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="8" version="1.1" viewBox="0 0 16 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<rect x="1" y="1045.4" width="2" height="6" rx="1.7383e-5" ry="1.7383e-5" fill="#4f4f4f"/>
-<rect x="13" y="1045.4" width="2" height="6" rx="1.7383e-5" ry="1.7383e-5" fill="#4f4f4f"/>
-<path d="m5 1048.4h6" fill="none" stroke="#4f4f4f" stroke-width="2"/>
-<path d="m6 1046.4-2 2 2 2" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-<path d="m10 1046.4 2 2-2 2" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_interp_wrap_loop.svg b/editor/icons/dark/icon_interp_wrap_loop.svg
deleted file mode 100644
index a537d02cb4..0000000000
--- a/editor/icons/dark/icon_interp_wrap_loop.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="16" height="8" version="1.1" viewBox="0 0 16 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)" fill="#4f4f4f">
-<path transform="translate(0 1044.4)" d="m12 1v2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v2a3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3z"/>
-<path transform="translate(0 1044.4)" d="m4 1a3 3 0 0 0 -3 3 3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1v-2z"/>
-<rect x="9" y="1045.4" width="3" height="2" rx="6.5185e-6" ry="1.7383e-5"/>
-<rect x="4" y="1049.4" width="3" height="2" rx="6.5185e-6" ry="1.7383e-5"/>
-<path d="m7 1048.4v4l3-2z" fill-rule="evenodd"/>
-<path d="m9 1044.4v4l-3-2z" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_interpolated_camera.svg b/editor/icons/dark/icon_interpolated_camera.svg
deleted file mode 100644
index 4627633dde..0000000000
--- a/editor/icons/dark/icon_interpolated_camera.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m9 0a3 3 0 0 0 -2.9883 2.7773 3 3 0 0 0 -2.0117 -0.77734 3 3 0 0 0 -3 3 3 3 0 0 0 2 2.8242v2.1758c0 0.554 0.44599 1 1 1h6c0.55401 0 1-0.446 1-1v-1l3 2v-6l-3 2v-1.7695a3 3 0 0 0 1 -2.2305 3 3 0 0 0 -3 -3zm-6 12v4h1v-4h-1zm3 0v4h1v-1h1a1 1 0 0 0 1 -1v-1a1 1 0 0 0 -1 -1h-1-1zm5 0a1 1 0 0 0 -1 1v2a1 1 0 0 0 1 1h1a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-1zm-4 1h1v1h-1v-1zm4 0h1v2h-1v-2z" fill="#ff5f5f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_invalid_key.svg b/editor/icons/dark/icon_invalid_key.svg
deleted file mode 100644
index 0ff88aa9ee..0000000000
--- a/editor/icons/dark/icon_invalid_key.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<path d="m0.46447 1046.2 2.1213 2.1213-2.1213 2.1213 1.4142 1.4142l2.1213-2.1213 2.1213 2.1213 1.4142-1.4142-2.1213-2.1213 2.1213-2.1213-1.4142-1.4142-2.1213 2.1213-2.1213-2.1213-1.4142 1.4142z" fill="#ff4040"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_inverse_kinematics.svg b/editor/icons/dark/icon_inverse_kinematics.svg
deleted file mode 100644
index 724d98a6f0..0000000000
--- a/editor/icons/dark/icon_inverse_kinematics.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m3 1039.4v12" fill="none" stroke="#ff5f5f" stroke-width="2"/>
-<circle cx="3" cy="1039.4" r="2" fill="#ff5f5f"/>
-<path d="m10 1039.4h-7" fill="#ff5f5f" fill-rule="evenodd" stroke="#ff5f5f" stroke-width="2"/>
-<circle cx="11" cy="1039.4" r="2" fill="#ff5f5f"/>
-<rect x="8" y="1044.4" width="6" height="2" fill="#ff5f5f"/>
-<path d="m11 1039.4v6" fill="none" stroke="#ff5f5f" stroke-width="2"/>
-<path d="m10 1046.4v4l-3-2 1-2z" fill="#ff5f5f" fill-rule="evenodd"/>
-<path d="m12 1046.4v4l3-2-1-2z" fill="#ff5f5f" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_item_list.svg b/editor/icons/dark/icon_item_list.svg
deleted file mode 100644
index d5de68a6bf..0000000000
--- a/editor/icons/dark/icon_item_list.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2zm0 2h10v10h-10z"/>
-<rect x="4" y="1040.4" width="2" height="2"/>
-<rect x="7" y="1040.4" width="2" height="2"/>
-<rect x="10" y="1040.4" width="2" height="2"/>
-<rect x="4" y="1043.4" width="2" height="2"/>
-<rect x="7" y="1043.4" width="2" height="2"/>
-<rect x="10" y="1043.4" width="2" height="2"/>
-<rect x="4" y="1046.4" width="2" height="2"/>
-<rect x="7" y="1046.4" width="2" height="2"/>
-<rect x="10" y="1046.4" width="2" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_joy_axis.svg b/editor/icons/dark/icon_joy_axis.svg
deleted file mode 100644
index e1d9171dbe..0000000000
--- a/editor/icons/dark/icon_joy_axis.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="27" y="1038.4" width="7" height="14" fill="#000000" fill-opacity=".99608"/>
-<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h12v-14h-12zm4 2h2a1 1 0 0 1 1 1v2h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2h-2a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1h2v-2a1 1 0 0 1 1 -1z" fil#4f4f4f0e0" fill-opacity=".99608"/>
-<circle cx="8" cy="1044.4" r="1" fil#4f4f4f0e0"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_joy_button.svg b/editor/icons/dark/icon_joy_button.svg
deleted file mode 100644
index fd7ca29b77..0000000000
--- a/editor/icons/dark/icon_joy_button.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill-opacity=".99608">
-<rect x="27" y="1038.4" width="7" height="14" fill="#000000"/>
-<path transform="translate(0 1036.4)" d="m1 1v14h12c1.1046 0 2-0.8954 2-2v-10c0-1.1046-0.89543-2-2-2h-12zm7 1a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2zm-4 4a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2zm8 0a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2zm-4 4a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z" fil#4f4f4f0e0"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_joypad.svg b/editor/icons/dark/icon_joypad.svg
deleted file mode 100644
index a6d739c31b..0000000000
--- a/editor/icons/dark/icon_joypad.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 3c-0.55226 5.52e-5 -0.99994 0.44774-1 1v8c5.52e-5 0.55226 0.44774 0.99994 1 1h14c0.55226-5.5e-5 0.99994-0.44774 1-1v-8c-5.5e-5 -0.55226-0.44774-0.99994-1-1h-14zm2 2h2v2h2v2h-2v2h-2v-2h-2v-2h2v-2zm10.5 0a1.5 1.5 0 0 1 1.5 1.5 1.5 1.5 0 0 1 -1.5 1.5 1.5 1.5 0 0 1 -1.5 -1.5 1.5 1.5 0 0 1 1.5 -1.5zm-3 3a1.5 1.5 0 0 1 1.5 1.5 1.5 1.5 0 0 1 -1.5 1.5 1.5 1.5 0 0 1 -1.5 -1.5 1.5 1.5 0 0 1 1.5 -1.5z" color="#000000" color-rendering="auto" fill="#4f4f4f" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_key.svg b/editor/icons/dark/icon_key.svg
deleted file mode 100644
index a6fb20d1ef..0000000000
--- a/editor/icons/dark/icon_key.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m11 4a4 4 0 0 0 -4 4 4 4 0 0 0 4 4 4 4 0 0 0 4 -4 4 4 0 0 0 -4 -4zm0 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z"/>
-<rect x="1" y="1043.4" width="8" height="2"/>
-<rect x="2" y="1045.4" width="3" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_key_hover.svg b/editor/icons/dark/icon_key_hover.svg
deleted file mode 100644
index c38951eae0..0000000000
--- a/editor/icons/dark/icon_key_hover.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<rect transform="rotate(-45)" x="-741.53" y="741.08" width="6.1027" height="6.1027" ry=".76286" fill="#000000"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_key_invalid.svg b/editor/icons/dark/icon_key_invalid.svg
deleted file mode 100644
index 0ff88aa9ee..0000000000
--- a/editor/icons/dark/icon_key_invalid.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<path d="m0.46447 1046.2 2.1213 2.1213-2.1213 2.1213 1.4142 1.4142l2.1213-2.1213 2.1213 2.1213 1.4142-1.4142-2.1213-2.1213 2.1213-2.1213-1.4142-1.4142-2.1213 2.1213-2.1213-2.1213-1.4142 1.4142z" fill="#ff4040"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_key_next.svg b/editor/icons/dark/icon_key_next.svg
deleted file mode 100644
index f3ff31f8f9..0000000000
--- a/editor/icons/dark/icon_key_next.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m11 9v2h-2v2h2v2h2v-2h2v-2h-2v-2h-2z" fill="#00f010"/>
-<path transform="translate(0 1036.4)" d="m11 1a4 4 0 0 0 -3.8691 3h-6.1309v2h1v2h3v-2h2.1328a4 4 0 0 0 2.8672 2.8691v-0.86914h3.6387a4 4 0 0 0 1.3613 -3 4 4 0 0 0 -4 -4zm0 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_key_selected.svg b/editor/icons/dark/icon_key_selected.svg
deleted file mode 100644
index 9d16649c67..0000000000
--- a/editor/icons/dark/icon_key_selected.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<rect transform="rotate(-45)" x="-741.53" y="741.08" width="6.1027" height="6.1027" ry=".76286" fill="#5caeff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_key_value.svg b/editor/icons/dark/icon_key_value.svg
deleted file mode 100644
index 7309f498dd..0000000000
--- a/editor/icons/dark/icon_key_value.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<rect transform="rotate(-45)" x="-741.53" y="741.08" width="6.1027" height="6.1027" ry=".76286" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_key_xform.svg b/editor/icons/dark/icon_key_xform.svg
deleted file mode 100644
index 6161195b33..0000000000
--- a/editor/icons/dark/icon_key_xform.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<rect transform="rotate(-45)" x="-741.53" y="741.08" width="6.1027" height="6.1027" ry=".76286" fill="#e3383d"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_keyboard.svg b/editor/icons/dark/icon_keyboard.svg
deleted file mode 100644
index c8d0d6d4b9..0000000000
--- a/editor/icons/dark/icon_keyboard.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m1 4v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-9h-1v9a0.99998 0.99998 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1v-9h-1z" fill="#4f4f4f"/>
-<rect x="27" y="1038.4" width="7" height="14" fill="#000000"/>
-<path transform="translate(0 1036.4)" d="m4 2a1 1 0 0 0 -1 1v9.084a1 0.91667 0 0 0 1 0.91602h8a1 0.91667 0 0 0 1 -0.91602v-9.084a1 1 0 0 0 -1 -1h-8zm1 2h2v3l2-3h2l-2 3 2 4h-2l-2-4v4h-2v-7z" fil#4f4f4f0e0"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_kinematic_body.svg b/editor/icons/dark/icon_kinematic_body.svg
deleted file mode 100644
index a2c85ab7d0..0000000000
--- a/editor/icons/dark/icon_kinematic_body.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m4 4v1h1v-1h-1zm1 1v1h-1v1h-1v1h-1v1 2h1v-2h1v1 1h1v-1h5v1h1v-2h1v2h1v-2-1h-1v-1h-1v-1h-1v-1h-1v1h-3v-1h-1zm5 0h1v-1h-1v1zm0 6h-2v1h2v-1zm-5 0v1h2v-1h-2zm0-4h1v1h-1v-1zm4 0h1v1h-1v-1z" fill="#ff5f5f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_kinematic_body_2d.svg b/editor/icons/dark/icon_kinematic_body_2d.svg
deleted file mode 100644
index c32e0318fa..0000000000
--- a/editor/icons/dark/icon_kinematic_body_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m4 4v1h1v-1h-1zm1 1v1h-1v1h-1v1h-1v1 2h1v-2h1v1 1h1v-1h5v1h1v-2h1v2h1v-2-1h-1v-1h-1v-1h-1v-1h-1v1h-3v-1h-1zm5 0h1v-1h-1v1zm0 6h-2v1h2v-1zm-5 0v1h2v-1h-2zm0-4h1v1h-1v-1zm4 0h1v1h-1v-1z" fill="#6d90ff" fill-opacity=".98824"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_label.svg b/editor/icons/dark/icon_label.svg
deleted file mode 100644
index 0142250c0a..0000000000
--- a/editor/icons/dark/icon_label.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m6 3a1.0001 1.0001 0 0 0 -0.70703 0.29297l-4 4a1.0001 1.0001 0 0 0 0 1.4141l4 4a1.0001 1.0001 0 0 0 0.70703 0.29297h8a1.0001 1.0001 0 0 0 1 -1v-8a1.0001 1.0001 0 0 0 -1 -1h-8zm-1 4a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" color="#000000" color-rendering="auto" fill="#29d739" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_large_texture.svg b/editor/icons/dark/icon_large_texture.svg
deleted file mode 100644
index 0bb85cbc23..0000000000
--- a/editor/icons/dark/icon_large_texture.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 1v1 2h1v-2h2v-1h-3zm11 0v1h2v2h1v-3h-3zm-3 5v1h-1v1h-2v1h-1v1h-1v1h2 2 2 2v-2h-1v-1-1h-1v-1h-1zm-8 6v2 1h3v-1h-2v-2h-1zm13 0v2h-2v1h3v-1-2h-1z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_light_2d.svg b/editor/icons/dark/icon_light_2d.svg
deleted file mode 100644
index 814b2325f4..0000000000
--- a/editor/icons/dark/icon_light_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a5 5 0 0 0 -5 5 5 5 0 0 0 3 4.5762v2.4238h4v-2.4199a5 5 0 0 0 3 -4.5801 5 5 0 0 0 -5 -5zm0 2a3 3 0 0 1 3 3 3 3 0 0 1 -3 3 3 3 0 0 1 -3 -3 3 3 0 0 1 3 -3zm-1 11v1h2v-1h-2z" fill="#6d90ff" fill-opacity=".98824"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_light_occluder_2d.svg b/editor/icons/dark/icon_light_occluder_2d.svg
deleted file mode 100644
index 71099c655b..0000000000
--- a/editor/icons/dark/icon_light_occluder_2d.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#6d90ff" fill-opacity=".98824">
-<rect x="1" y="1039.4" width="14" height="2"/>
-<rect x="1" y="1042.4" width="14" height="2"/>
-<rect x="1" y="1045.4" width="14" height="2"/>
-<rect x="1" y="1048.4" width="14" height="2"/>
-<rect x="2" y="1037.4" width="1" height="14"/>
-<rect x="13" y="1037.4" width="1" height="14"/>
-<rect x="1" y="1037.4" width="14" height=".99998"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_line_2d.svg b/editor/icons/dark/icon_line_2d.svg
deleted file mode 100644
index 319d6bdea7..0000000000
--- a/editor/icons/dark/icon_line_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m2 1045.4 3 4 3-10 3 6 3-2" fill="none" stroke="#6d90ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_line_edit.svg b/editor/icons/dark/icon_line_edit.svg
deleted file mode 100644
index 0daf666e27..0000000000
--- a/editor/icons/dark/icon_line_edit.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<path transform="translate(0 1036.4)" d="m1 11c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2h-2-10-2z"/>
-<rect x="2" y="1040.4" width="2" height="5"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_line_shape_2d.svg b/editor/icons/dark/icon_line_shape_2d.svg
deleted file mode 100644
index f6c036bb2e..0000000000
--- a/editor/icons/dark/icon_line_shape_2d.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" stroke="#68b6ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
-<path d="m1 1037.4 14 14" fill="#68b6ff" fill-rule="evenodd" stroke-opacity=".39216"/>
-<path d="m3 1039.4 10 10" fill="none" stroke-opacity=".58824"/>
-<path d="m5 1041.4 6 6" fill="none"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_link_button.svg b/editor/icons/dark/icon_link_button.svg
deleted file mode 100644
index c8d7e1e5c5..0000000000
--- a/editor/icons/dark/icon_link_button.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<path transform="translate(0 1036.4)" d="m6 7a0.99998 0.99998 0 0 0 -1 1 0.99998 0.99998 0 0 0 1 1h4a0.99998 0.99998 0 0 0 1 -1 0.99998 0.99998 0 0 0 -1 -1h-4z"/>
-<path transform="translate(0 1036.4)" d="m6 3a5 5 0 0 0 -4.3301 2.5 5 5 0 0 0 0 5 5 5 0 0 0 4.3301 2.5h1v-2h-1a3 3 0 0 1 -3 -3 3 3 0 0 1 3 -3h1v-2h-1zm3 0v2h1a3 3 0 0 1 3 3 3 3 0 0 1 -3 3h-1v2h1a5 5 0 0 0 4.3301 -2.5 5 5 0 0 0 0 -5 5 5 0 0 0 -4.3301 -2.5h-1z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_list_select.svg b/editor/icons/dark/icon_list_select.svg
deleted file mode 100644
index c0fe4dd763..0000000000
--- a/editor/icons/dark/icon_list_select.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path transform="translate(0 1036.4)" d="m1 1v14h8.2578l-0.82227-2h-5.4355v-2h4.6113l-0.82227-2h-3.7891v-2h3.8867a1.5002 1.5002 0 0 1 1.0977 -0.49805v-0.0019531a1.5002 1.5002 0 0 1 0.58594 0.11133l0.94531 0.38867h0.48438v0.19922l2 0.82227v-7.0215h-11zm2 2h7v2h-7v-2zm7.7559 7.7559l0.52344 1.2734a1.5002 1.5002 0 0 1 0.48047 -0.26953 1.5002 1.5002 0 0 1 0.24023 -0.43945v-0.050781l-1.2441-0.51367z" fill-opacity=".99608"/>
-<path d="m16 1047.7-8-3.291 3.291 8 0.9471-2.8201 1.8836 1.8835 0.9418-0.9418-1.8836-1.8835z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_listener.svg b/editor/icons/dark/icon_listener.svg
deleted file mode 100644
index 5450428686..0000000000
--- a/editor/icons/dark/icon_listener.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m13.928 1038.4-1.7383 1.0039a6 6 0 0 1 0.81055 2.9961 6 6 0 0 1 -0.80859 2.998l1.7363 1.002a8 8 0 0 0 0 -8z" fill="#ff5f5f"/>
-<rect x="3" y="1049.4" width="1" height="2" fill="#ff5f5f"/>
-<path transform="translate(0 1036.4)" d="m6 1a5 5 0 0 0 -5 5h2a3 3 0 0 1 3 -3 3 3 0 0 1 3 3h2a5 5 0 0 0 -5 -5z" fill="#ff5f5f"/>
-<path d="m10 1042.4c0 4-3 4-3 5 0 3-2 3-3 3" fill="none" stroke="#ff5f5f" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_load.svg b/editor/icons/dark/icon_load.svg
deleted file mode 100644
index 6cee92ad23..0000000000
--- a/editor/icons/dark/icon_load.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 2c-1.1046 0-2 0.8954-2 2v9c0 1.1046 0.89543 2 2 2h9c1.1046 0 1.8184-0.91043 2-2l1-6c0.003977-0.18354-0.042648-0.3412-0.13477-0.5-0.17849-0.30916-0.50825-0.49972-0.86523-0.5h-8c-0.35698 2.824e-4 -0.68674 0.19084-0.86523 0.5-0.092118 0.1588-0.13874 0.3399-0.13477 0.52344l-1 5.9766c-0.091144 0.54473-0.44772 1-1 1s-1-0.4477-1-1v-9c0-0.5523 0.44772-1 1-1h2c0.55228 0 1 0.4477 1 1a1 1 0 0 0 0.29297 0.70703 1 1 0 0 0 0.70703 0.29297h4 1a1 1 0 0 0 -0.29297 -0.70703 1 1 0 0 0 -0.70703 -0.29297h-4c0-1.1046-0.89543-2-2-2h-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_lock.svg b/editor/icons/dark/icon_lock.svg
deleted file mode 100644
index ea400fbec0..0000000000
--- a/editor/icons/dark/icon_lock.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path transform="translate(0 1036.4)" d="m2 8v7h12v-7h-12zm5 2h2v3h-2v-3z"/>
-<path transform="translate(0 1036.4)" d="m8 1a5 5 0 0 0 -5 5h2a3 3 0 0 1 3 -3 3 3 0 0 1 3 3h2a5 5 0 0 0 -5 -5z"/>
-<rect x="3" y="1042.4" width="2" height="2"/>
-<rect x="11" y="1042.4" width="2" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_loop.svg b/editor/icons/dark/icon_loop.svg
deleted file mode 100644
index 988ce491f6..0000000000
--- a/editor/icons/dark/icon_loop.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1v2h-2a5 5 0 0 0 -5 5 5 5 0 0 0 1.0039 2.9961l1.4355-1.4355a3 3 0 0 1 -0.43945 -1.5605 3 3 0 0 1 3 -3h2v2l2-1.5 2-1.5-2-1.5-2-1.5zm5.9961 4.0039l-1.4355 1.4355a3 3 0 0 1 0.43945 1.5605 3 3 0 0 1 -3 3h-2v-2l-2 1.5-2 1.5 2 1.5 2 1.5v-2h2a5 5 0 0 0 5 -5 5 5 0 0 0 -1.0039 -2.9961z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_loop_interpolation.svg b/editor/icons/dark/icon_loop_interpolation.svg
deleted file mode 100644
index dfda7d39ba..0000000000
--- a/editor/icons/dark/icon_loop_interpolation.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f" fill-opacity=".99608">
-<circle cx="3" cy="1048.4" r="2"/>
-<path transform="translate(0 1036.4)" d="m4 3a2 2 0 0 0 -1.7324 1 2 2 0 0 0 -0.26562 1h-0.0019531v0.046875 6.9531h2v-5-2h2v-2h-2z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<path d="m6 1037.4v6l4-3z" fill-rule="evenodd"/>
-<circle cx="13" cy="1040.4" r="2"/>
-<path transform="translate(0 1036.4)" d="m12 4v5 2h-2v2h2a2 2 0 0 0 1.7324 -1 2 2 0 0 0 0.26562 -1h0.001953v-7h-2z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<path d="m10 1045.4v6l-4-3z" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_main_play.svg b/editor/icons/dark/icon_main_play.svg
deleted file mode 100644
index 531d704dac..0000000000
--- a/editor/icons/dark/icon_main_play.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m4 1048.4v-8l7 4z" fill="#4f4f4f" fill-rule="evenodd" stroke="#4f4f4f" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_margin_container.svg b/editor/icons/dark/icon_margin_container.svg
deleted file mode 100644
index 71fddc2e95..0000000000
--- a/editor/icons/dark/icon_margin_container.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2zm0 2h10v10h-10z"/>
-<path d="m4 1042.4v4l2-2z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_material_preview_cube.svg b/editor/icons/dark/icon_material_preview_cube.svg
deleted file mode 100644
index 90ee4fa933..0000000000
--- a/editor/icons/dark/icon_material_preview_cube.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill-rule="evenodd">
-<path transform="translate(0 1036.4)" d="m8 1l-7 3v8l7 3 7-3v-8l-7-3z" fill="#d5d5d5"/>
-<path d="m1 1040.4 7 3 7-3-7-3z" fill="#000000"/>
-<path d="m8 1051.4-7-3v-8l7 3z" fil#4f4f4f0e0"/>
-<path d="m8 1051.4 7-3v-8l-7 3z" fill="#d5d5d5"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_material_preview_cube_off.svg b/editor/icons/dark/icon_material_preview_cube_off.svg
deleted file mode 100644
index 45c013103b..0000000000
--- a/editor/icons/dark/icon_material_preview_cube_off.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill-rule="evenodd">
-<path transform="translate(0 1036.4)" d="m8 1l-7 3v8l7 3 7-3v-8l-7-3z" fill="#d5d5d5"/>
-<path d="m1 1040.4 7 3 7-3-7-3z" fill="#000000"/>
-<path d="m8 1051.4-7-3v-8l7 3z" fil#4f4f4f0e0"/>
-<path d="m8 1051.4 7-3v-8l-7 3z" fill="#d5d5d5"/>
-<path d="m8 1037.4-7 3v8l7 3 7-3v-8l-7-3z" fill-opacity=".23529"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_material_preview_light_1.svg b/editor/icons/dark/icon_material_preview_light_1.svg
deleted file mode 100644
index 8028b1e798..0000000000
--- a/editor/icons/dark/icon_material_preview_light_1.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1v2h2v-2h-2zm-3.2422 1.3438l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm8.4844 0l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm-4.2422 1.6562a4 4 0 0 0 -4 4 4 4 0 0 0 4 4 4 4 0 0 0 4 -4 4 4 0 0 0 -4 -4zm-1 1h2v1 5h-1v-5h-1v-1zm-6 2v2h2v-2h-2zm12 0v2h2v-2h-2zm-9.2422 3.8281l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm8.4844 0l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm-5.2422 2.1719v2h2v-2h-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_material_preview_light_1_off.svg b/editor/icons/dark/icon_material_preview_light_1_off.svg
deleted file mode 100644
index 63a2094e67..0000000000
--- a/editor/icons/dark/icon_material_preview_light_1_off.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1v2h2v-2h-2zm-3.2422 1.3438l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm8.4844 0l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm-4.2422 1.6562a4 4 0 0 0 -4 4 4 4 0 0 0 4 4 4 4 0 0 0 4 -4 4 4 0 0 0 -4 -4zm-1 1h2v1 5h-1v-5h-1v-1zm-6 2v2h2v-2h-2zm12 0v2h2v-2h-2zm-9.2422 3.8281l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm8.4844 0l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm-5.2422 2.1719v2h2v-2h-2z" fill-opacity=".23529"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_material_preview_light_2.svg b/editor/icons/dark/icon_material_preview_light_2.svg
deleted file mode 100644
index 745f943a17..0000000000
--- a/editor/icons/dark/icon_material_preview_light_2.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1v2h2v-2h-2zm-3.2422 1.3438l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm8.4844 0l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm-4.2422 1.6562a4 4 0 0 0 -4 4 4 4 0 0 0 4 4 4 4 0 0 0 4 -4 4 4 0 0 0 -4 -4zm-1 1h2v2 1h-2v1h2v1h-2-1v-2-1h2v-1h-1v-1zm-6 2v2h2v-2h-2zm12 0v2h2v-2h-2zm-9.2422 3.8281l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm8.4844 0l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm-5.2422 2.1719v2h2v-2h-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_material_preview_light_2_off.svg b/editor/icons/dark/icon_material_preview_light_2_off.svg
deleted file mode 100644
index 283cad0011..0000000000
--- a/editor/icons/dark/icon_material_preview_light_2_off.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1v2h2v-2h-2zm-3.2422 1.3438l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm8.4844 0l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm-4.2422 1.6562a4 4 0 0 0 -4 4 4 4 0 0 0 4 4 4 4 0 0 0 4 -4 4 4 0 0 0 -4 -4zm-1 1h2v2 1h-2v1h2v1h-2-1v-2-1h2v-1h-1v-1zm-6 2v2h2v-2h-2zm12 0v2h2v-2h-2zm-9.2422 3.8281l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm8.4844 0l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm-5.2422 2.1719v2h2v-2h-2z" fill="#4f4f4f"/>
-<path transform="translate(0 1036.4)" d="m7 1v2h2v-2h-2zm-3.2422 1.3438l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm8.4844 0l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm-4.2422 1.6562a4 4 0 0 0 -4 4 4 4 0 0 0 4 4 4 4 0 0 0 4 -4 4 4 0 0 0 -4 -4zm-1 1h2v2 1h-2v1h2v1h-2-1v-2-1h2v-1h-1v-1zm-6 2v2h2v-2h-2zm12 0v2h2v-2h-2zm-9.2422 3.8281l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm8.4844 0l-1.4141 1.4141 1.4141 1.4141 1.4141-1.4141-1.4141-1.4141zm-5.2422 2.1719v2h2v-2h-2z" fill-opacity=".23529"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_material_preview_sphere.svg b/editor/icons/dark/icon_material_preview_sphere.svg
deleted file mode 100644
index a1bf99f984..0000000000
--- a/editor/icons/dark/icon_material_preview_sphere.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-2 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_material_preview_sphere_off.svg b/editor/icons/dark/icon_material_preview_sphere_off.svg
deleted file mode 100644
index 57e38534ab..0000000000
--- a/editor/icons/dark/icon_material_preview_sphere_off.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-2 2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2 2 2 0 0 1 -2 -2 2 2 0 0 1 2 -2z" fill-opacity=".23529"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_matrix.svg b/editor/icons/dark/icon_matrix.svg
deleted file mode 100644
index 5e10864279..0000000000
--- a/editor/icons/dark/icon_matrix.svg
+++ /dev/null
@@ -1,19 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)" fill="#e3383d">
-<rect x="1" y="1039.4" width="1" height="12"/>
-<rect x="1" y="1039.4" width="3" height="1"/>
-<rect x="1" y="1050.4" width="3" height="1"/>
-<rect x="10" y="1050.4" width="3" height="1"/>
-<rect x="10" y="1039.4" width="3" height="1"/>
-<rect x="12" y="1039.4" width="1" height="12"/>
-<rect x="3" y="1041.4" width="2" height="2"/>
-<rect x="6" y="1041.4" width="2" height="2"/>
-<rect x="9" y="1041.4" width="2" height="2"/>
-<rect x="3" y="1044.4" width="2" height="2"/>
-<rect x="6" y="1044.4" width="2" height="2"/>
-<rect x="9" y="1044.4" width="2" height="2"/>
-<rect x="3" y="1047.4" width="2" height="2"/>
-<rect x="6" y="1047.4" width="2" height="2"/>
-<rect x="9" y="1047.4" width="2" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_menu_button.svg b/editor/icons/dark/icon_menu_button.svg
deleted file mode 100644
index 752e45f761..0000000000
--- a/editor/icons/dark/icon_menu_button.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<path transform="translate(0 1036.4)" d="m1 1v4h14v-4h-14zm5 1h4l-2 2-2-2z"/>
-<path transform="translate(0 1036.4)" d="m2 6a1 1 0 0 0 -1 1v7a1 1 0 0 0 1 1h12a1 1 0 0 0 1 -1v-7a1 1 0 0 0 -1 -1h-12zm1 2h10v2h-10v-2zm0 3h10v2h-10v-2z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mesh.svg b/editor/icons/dark/icon_mesh.svg
deleted file mode 100644
index 455d34b0cb..0000000000
--- a/editor/icons/dark/icon_mesh.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h6.541a2 2 0 0 0 1.7285 1 2 2 0 0 0 2 -2 2 2 0 0 0 -1.0312 -1.75h0.03125v-6.5215a2 2 0 0 0 1 -1.7285 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm2.4141 3h5.8574a2 2 0 0 0 0.72852 0.73047v5.8555l-6.5859-6.5859zm-1.4141 1.4141l6.5859 6.5859h-5.8574a2 2 0 0 0 -0.72852 -0.73047v-5.8555z" fill="#fea900"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mesh_instance.svg b/editor/icons/dark/icon_mesh_instance.svg
deleted file mode 100644
index 7233e5099e..0000000000
--- a/editor/icons/dark/icon_mesh_instance.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<circle cx="3" cy="1049.4" r="2" fill="#ff5f5f" fill-opacity=".99608"/>
-<rect x="2" y="1039.4" width="2" height="8.5" fill="#ff5f5f" fill-opacity=".99608"/>
-<circle cx="3" cy="1039.4" r="2" fill="#ff5f5f" fill-opacity=".99608"/>
-<rect transform="rotate(90)" x="1038.4" y="-11.5" width="2" height="8.5" fill="#ff5f5f" fill-opacity=".99608"/>
-<circle cx="13" cy="1039.4" r="2" fill="#ff5f5f" fill-opacity=".99608"/>
-<rect x="12" y="1039.1" width="2" height="8.5" fill="#ff5f5f" fill-opacity=".99608"/>
-<circle cx="13" cy="1049.4" r="2" fill="#ff5f5f" fill-opacity=".99608"/>
-<rect transform="rotate(90)" x="1048.4" y="-12.25" width="2" height="8.5" fill="#ff5f5f" fill-opacity=".99608"/>
-<path d="m3 1039.4 10 10" fill="none" stroke="#ff5f5f" stroke-opacity=".99608" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mesh_library.svg b/editor/icons/dark/icon_mesh_library.svg
deleted file mode 100644
index 4c74ec127a..0000000000
--- a/editor/icons/dark/icon_mesh_library.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h2.2695v-2h-2.2715a2 2 0 0 0 -0.72852 -0.73047v-5.8555l3 3v-0.41406a2.0002 2.0002 0 0 1 0.80859 -1.6055l-2.3945-2.3945h5.8574a2 2 0 0 0 0.72852 0.73047v1.2695a2.0002 2.0002 0 0 1 0.99805 0.27148 2.0002 2.0002 0 0 1 1.002 -0.27148v-1.2715a2 2 0 0 0 1 -1.7285 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm6 7v1 5 1h5c0.55228 0 1-0.4477 1-1v-5c0-0.5523-0.44772-1-1-1v4l-1-1-1 1v-4h-3z" fill="#fea900"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_aabb.svg b/editor/icons/dark/icon_mini_aabb.svg
deleted file mode 100644
index d9c710ee1c..0000000000
--- a/editor/icons/dark/icon_mini_aabb.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path d="m5 1041.4a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h2v-6h-2zm0 2v2a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#ee7991"/>
-<path d="m3 1046.4a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h2v-6h-2zm0 2v2a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#f39bad"/>
-<path d="m13 1043.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1v-2z" fill="#ee7991"/>
-<path d="m13 1049.4a3 3 0 0 0 3 -3h-2a1 1 0 0 1 -1 1v2z" fill="#ee7991"/>
-<rect transform="matrix(0,1,1,0,0,0)" x="1041.4" y="11" width="8" height="2" fill="#ee7991"/>
-<path d="m8 1044.4v8h2a3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3v-2h-2zm2 4a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v-2z" fill="#f39bad"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_array.svg b/editor/icons/dark/icon_mini_array.svg
deleted file mode 100644
index 08ab2e77f8..0000000000
--- a/editor/icons/dark/icon_mini_array.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)" fill="#4f4f4f">
-<rect x="11" y="1047.4" width="2" height="3"/>
-<path d="m14 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z"/>
-<rect x="7" y="1047.4" width="2" height="3"/>
-<path d="m10 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z"/>
-<path d="m4 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<path d="m4 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z"/>
-<rect transform="scale(1,-1)" x="4" y="-1050.4" width="2" height="6"/>
-<rect x="10" y="1044.4" width="1" height="2"/>
-<rect x="14" y="1044.4" width="1" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_basis.svg b/editor/icons/dark/icon_mini_basis.svg
deleted file mode 100644
index e0dc132d12..0000000000
--- a/editor/icons/dark/icon_mini_basis.svg
+++ /dev/null
@@ -1,19 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<rect transform="scale(-1,1)" x="-2" y="1044.4" width="2" height="6" fill="#e3ec69"/>
-<rect transform="scale(-1,1)" x="-2" y="1044.4" width="1" height="2" fill="#e3ec69"/>
-<path d="m2 1044.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1z" fill="#e3ec69"/>
-<path d="m2 1050.4a3 3 0 0 0 3 -3h-2a1 1 0 0 1 -1 1z" fill="#e3ec69"/>
-<rect transform="scale(-1,1)" x="-2" y="1042.4" width="2" height="3.9999" fill="#e3ec69"/>
-<rect transform="scale(-1,1)" x="-9" y="1044.4" width="2" height="2" fill="#e3ec69"/>
-<path d="m7 1048.4a2 2 0 0 1 -1.7321 -1 2 2 0 0 1 0 -2 2 2 0 0 1 1.7321 -1" fill="#e3ec69"/>
-<path transform="scale(-1,1)" d="m-7 1050.4a2 2 0 0 1 -1.7321 -1 2 2 0 0 1 0 -2 2 2 0 0 1 1.7321 -1" fill="#e3ec69"/>
-<rect transform="scale(-1,1)" x="-7" y="1048.4" width="2" height="2" fill="#e3ec69"/>
-<rect x="10" y="1046.4" width="2" height="3.9999" fill="#eef39f"/>
-<rect x="10" y="1042.4" width="2" height="2" fill="#eef39f"/>
-<rect transform="scale(-1,1)" x="-16" y="1044.4" width="2" height="2" fill="#e3ec69"/>
-<path d="m14 1048.4a2 2 0 0 1 -1.7321 -1 2 2 0 0 1 0 -2 2 2 0 0 1 1.7321 -1" fill="#e3ec69"/>
-<path transform="scale(-1,1)" d="m-14 1050.4a2 2 0 0 1 -1.7321 -1 2 2 0 0 1 0 -2 2 2 0 0 1 1.7321 -1" fill="#e3ec69"/>
-<rect transform="scale(-1,1)" x="-14" y="1048.4" width="2" height="2" fill="#e3ec69"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_boolean.svg b/editor/icons/dark/icon_mini_boolean.svg
deleted file mode 100644
index b8861c9f17..0000000000
--- a/editor/icons/dark/icon_mini_boolean.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)" fill="#8da6f0">
-<rect transform="scale(-1,1)" x="-2" y="1044.4" width="2" height="6"/>
-<rect transform="scale(-1,1)" x="-2" y="1044.4" width="1" height="2"/>
-<path d="m2 1044.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1v-2z"/>
-<rect transform="scale(1,-1)" x="13" y="-1047.4" width="2" height="5"/>
-<path d="m2 1050.4a3 3 0 0 0 3 -3h-2a1 1 0 0 1 -1 1v2z"/>
-<rect transform="scale(-1,1)" x="-2" y="1042.4" width="2" height="3.9999"/>
-<path d="m16 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<path d="m7 1044.4a3 3 0 0 0 -3 3 3 3 0 0 0 3 3 3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3zm0 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z"/>
-<path d="m11 1044.4a3 3 0 0 0 -3 3 3 3 0 0 0 3 3 3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3zm0 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_color.svg b/editor/icons/dark/icon_mini_color.svg
deleted file mode 100644
index 77526c4a3c..0000000000
--- a/editor/icons/dark/icon_mini_color.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path transform="translate(0 1040.4)" d="m4 4a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v-2h-1z" fill="#ff2929"/>
-<path transform="translate(0 1040.4)" d="m14 4a3 3 0 0 0 -3 3v3h2v-3a1 1 0 0 1 1 -1h1v-2h-1z" fill="#70bfff"/>
-<path transform="translate(0 1040.4)" d="m6 2v5a3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1v-5h-2z" fill="#7aff70"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_color_array.svg b/editor/icons/dark/icon_mini_color_array.svg
deleted file mode 100644
index 12494655ce..0000000000
--- a/editor/icons/dark/icon_mini_color_array.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<rect y="1050.4" width="4" height="2" fill="#4f4f4f"/>
-<rect y="1040.4" width="2" height="12" fill="#4f4f4f"/>
-<rect y="1040.4" width="4" height="2" fill="#4f4f4f"/>
-<rect transform="scale(-1,1)" x="-16" y="1050.4" width="4" height="2" fill="#4f4f4f"/>
-<rect transform="scale(-1,1)" x="-16" y="1040.4" width="2" height="12" fill="#4f4f4f"/>
-<rect transform="scale(-1,1)" x="-16" y="1040.4" width="4" height="2" fill="#4f4f4f"/>
-<path transform="translate(0 1040.4)" d="m6 3.5a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h1v-2h-1a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1h1v-2h-1z" fill="#ff2929"/>
-<rect x="10" y="1046.9" width="2" height="3" fill="#70bfff"/>
-<path d="m13 1043.9a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z" fill="#70bfff"/>
-<path transform="translate(0 1040.4)" d="m7 1.5v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-5h-2z" fill="#7aff70"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_dictionary.svg b/editor/icons/dark/icon_mini_dictionary.svg
deleted file mode 100644
index eb68709c4f..0000000000
--- a/editor/icons/dark/icon_mini_dictionary.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)" fill="#77edb1">
-<rect transform="scale(1,-1)" x="13" y="-1047.4" width="2" height="5"/>
-<rect transform="scale(1,-1)" x="15" y="-1046.4" width="1" height="2"/>
-<path d="m16 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<path d="m11 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z"/>
-<path d="m11 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<rect x="6" y="1046.4" width="2" height="3.9999"/>
-<rect x="6" y="1042.4" width="2" height="2"/>
-<path d="m3 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z"/>
-<path d="m3 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<rect x="3" y="1042.4" width="2" height="8"/>
-<rect x="11" y="1044.4" width="1" height="2"/>
-<rect x="11" y="1048.4" width="1" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_float.svg b/editor/icons/dark/icon_mini_float.svg
deleted file mode 100644
index 2eb71fd85e..0000000000
--- a/editor/icons/dark/icon_mini_float.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)" fill="#61daf4">
-<rect y="1045.4" width="2" height="5"/>
-<rect x="2" y="1046.4" width="2" height="2"/>
-<path d="m3 1042.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z"/>
-<rect transform="scale(1,-1)" x="6" y="-1047.4" width="2" height="5"/>
-<path d="m9 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<rect transform="scale(1,-1)" x="12" y="-1047.4" width="2" height="5"/>
-<path d="m15 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<rect x="9" y="1048.4" width="1" height="2"/>
-<rect x="14" y="1044.4" width="2" height="2"/>
-<rect x="15" y="1048.4" width="1" height="2"/>
-<rect x="3" y="1042.4" width="1" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_float_array.svg b/editor/icons/dark/icon_mini_float_array.svg
deleted file mode 100644
index 7d08903461..0000000000
--- a/editor/icons/dark/icon_mini_float_array.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<rect y="1050.4" width="4" height="2" fill="#4f4f4f"/>
-<rect y="1040.4" width="2" height="12" fill="#4f4f4f"/>
-<rect y="1040.4" width="4" height="2" fill="#4f4f4f"/>
-<rect transform="scale(-1,1)" x="-16" y="1050.4" width="4" height="2" fill="#4f4f4f"/>
-<rect transform="scale(-1,1)" x="-16" y="1040.4" width="2" height="12" fill="#4f4f4f"/>
-<rect transform="scale(-1,1)" x="-16" y="1040.4" width="4" height="2" fill="#4f4f4f"/>
-<path d="m6 1042.4a3 3 0 0 0 -3 3v5h2v-2h1v-2h-1v-1a1 1 0 0 1 1 -1v-2z" fill="#61daf4"/>
-<path d="m10 1042.4v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2h-2z" fill="#61daf4"/>
-<path d="m7 1042.4v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-5h-2z" fill="#c6f2fb"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_image.svg b/editor/icons/dark/icon_mini_image.svg
deleted file mode 100644
index a3f273078c..0000000000
--- a/editor/icons/dark/icon_mini_image.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)" fill="#93f1b9">
-<rect y="1045.4" width="2" height="3.9999"/>
-<rect x="3" y="1043.4" width="2" height="6"/>
-<path d="m5 1043.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1v-2z"/>
-<rect x="6" y="1046.4" width="2" height="3"/>
-<rect y="1041.4" width="2" height="2"/>
-<rect x="6" y="1043.4" width="2" height="6"/>
-<path d="m8 1043.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1v-2z"/>
-<rect x="9" y="1046.4" width="2" height="3"/>
-<path d="m14 1049.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<path d="m14 1043.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z"/>
-<rect transform="scale(1,-1)" x="14" y="-1049.4" width="2" height="6"/>
-<path d="m13 1052.4a3 3 0 0 0 3 -3h-2a1 1 0 0 1 -1 1v2z"/>
-<rect x="12" y="1050.4" width="1" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_input.svg b/editor/icons/dark/icon_mini_input.svg
deleted file mode 100644
index c64db97127..0000000000
--- a/editor/icons/dark/icon_mini_input.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)" fill="#adf18f">
-<path d="m10 1050.4a3 3 0 0 0 3 -3h-2a1 1 0 0 1 -1 1v2z"/>
-<path d="m10 1044.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1v-2z"/>
-<rect transform="scale(-1)" x="-10" y="-1052.4" width="2" height="8"/>
-<rect y="1046.4" width="2" height="3.9999"/>
-<rect x="3" y="1044.4" width="2" height="6"/>
-<path d="m5 1044.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1v-2z"/>
-<rect x="6" y="1047.4" width="2" height="3"/>
-<rect y="1042.4" width="2" height="2"/>
-<rect transform="scale(1,-1)" x="13" y="-1047.4" width="2" height="5"/>
-<rect transform="scale(1,-1)" x="15" y="-1046.4" width="1" height="2"/>
-<path d="m16 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_int_array.svg b/editor/icons/dark/icon_mini_int_array.svg
deleted file mode 100644
index 625252bba2..0000000000
--- a/editor/icons/dark/icon_mini_int_array.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path transform="translate(0 1040.4)" d="m0 0v2 8 2h2 2v-2h-2v-8h2v-2h-4zm12 0v2h2v8h-2v2h4v-2-8-2h-2-2z" fill="#4f4f4f"/>
-<path transform="translate(0 1040.4)" d="m3 2v2h2v-2h-2zm0 4v4h2v-4h-2z" fill="#7dc6ef"/>
-<path transform="translate(0 1040.4)" d="m5 4v6h2v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3 -3h-2z" fill="#c8e7f9"/>
-<path transform="translate(0 1040.4)" d="m10 2v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2h-2z" fill="#7dc6ef"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_integer.svg b/editor/icons/dark/icon_mini_integer.svg
deleted file mode 100644
index 05d09d9823..0000000000
--- a/editor/icons/dark/icon_mini_integer.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)" fill="#7dc6ef">
-<rect x="1" y="1046.4" width="2" height="3.9999"/>
-<rect x="4" y="1044.4" width="2" height="6"/>
-<path d="m7 1044.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1v-2z"/>
-<rect x="8" y="1047.4" width="2" height="3"/>
-<rect x="1" y="1042.4" width="2" height="2"/>
-<rect transform="scale(1,-1)" x="12" y="-1047.4" width="2" height="5"/>
-<rect transform="scale(1,-1)" x="14" y="-1046.4" width="2" height="2"/>
-<path d="m15 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<rect x="5" y="1044.4" width="2" height="2"/>
-<rect transform="scale(1,-1)" x="15" y="-1050.4" width="1" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_matrix3.svg b/editor/icons/dark/icon_mini_matrix3.svg
deleted file mode 100644
index e0dc132d12..0000000000
--- a/editor/icons/dark/icon_mini_matrix3.svg
+++ /dev/null
@@ -1,19 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<rect transform="scale(-1,1)" x="-2" y="1044.4" width="2" height="6" fill="#e3ec69"/>
-<rect transform="scale(-1,1)" x="-2" y="1044.4" width="1" height="2" fill="#e3ec69"/>
-<path d="m2 1044.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1z" fill="#e3ec69"/>
-<path d="m2 1050.4a3 3 0 0 0 3 -3h-2a1 1 0 0 1 -1 1z" fill="#e3ec69"/>
-<rect transform="scale(-1,1)" x="-2" y="1042.4" width="2" height="3.9999" fill="#e3ec69"/>
-<rect transform="scale(-1,1)" x="-9" y="1044.4" width="2" height="2" fill="#e3ec69"/>
-<path d="m7 1048.4a2 2 0 0 1 -1.7321 -1 2 2 0 0 1 0 -2 2 2 0 0 1 1.7321 -1" fill="#e3ec69"/>
-<path transform="scale(-1,1)" d="m-7 1050.4a2 2 0 0 1 -1.7321 -1 2 2 0 0 1 0 -2 2 2 0 0 1 1.7321 -1" fill="#e3ec69"/>
-<rect transform="scale(-1,1)" x="-7" y="1048.4" width="2" height="2" fill="#e3ec69"/>
-<rect x="10" y="1046.4" width="2" height="3.9999" fill="#eef39f"/>
-<rect x="10" y="1042.4" width="2" height="2" fill="#eef39f"/>
-<rect transform="scale(-1,1)" x="-16" y="1044.4" width="2" height="2" fill="#e3ec69"/>
-<path d="m14 1048.4a2 2 0 0 1 -1.7321 -1 2 2 0 0 1 0 -2 2 2 0 0 1 1.7321 -1" fill="#e3ec69"/>
-<path transform="scale(-1,1)" d="m-14 1050.4a2 2 0 0 1 -1.7321 -1 2 2 0 0 1 0 -2 2 2 0 0 1 1.7321 -1" fill="#e3ec69"/>
-<rect transform="scale(-1,1)" x="-14" y="1048.4" width="2" height="2" fill="#e3ec69"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_object.svg b/editor/icons/dark/icon_mini_object.svg
deleted file mode 100644
index 8cbbfa2808..0000000000
--- a/editor/icons/dark/icon_mini_object.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)" fill="#79f3e8">
-<path d="m8 1050.4a3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3v-2h-2v8h2zm0-2v-2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1z"/>
-<path d="m3 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<path d="m3 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z"/>
-<path d="m15 1044.4v5a3 3 0 0 1 -3 3v-2a1 1 0 0 0 1 -1v-5h2z"/>
-<path d="m3 1050.4a3 3 0 0 0 3 -3h-2a1 1 0 0 1 -1 1v2z"/>
-<path d="m3 1044.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1v-2z"/>
-<rect x="11" y="1050.4" width="1" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_path.svg b/editor/icons/dark/icon_mini_path.svg
deleted file mode 100644
index d09f56e753..0000000000
--- a/editor/icons/dark/icon_mini_path.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)" fill="#6993ec">
-<rect transform="scale(1,-1)" x="6" y="-1047.4" width="2" height="5"/>
-<rect transform="scale(1,-1)" x="8" y="-1046.4" width="2" height="2"/>
-<path d="m9 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<rect transform="scale(1,-1)" x="11" y="-1050.4" width="2" height="8"/>
-<path d="m13 1044.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1v-2z"/>
-<rect transform="scale(1,-1)" x="14" y="-1050.4" width="2" height="3"/>
-<path d="m2 1048.4a3 3 0 0 0 3 -3h-2a1 1 0 0 1 -1 1v2z"/>
-<path d="m2 1042.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1v-2z"/>
-<rect transform="scale(-1)" x="-2" y="-1050.4" width="2" height="8"/>
-<rect transform="scale(1,-1)" x="9" y="-1050.4" width="1" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_plane.svg b/editor/icons/dark/icon_mini_plane.svg
deleted file mode 100644
index 5d2ee937c0..0000000000
--- a/editor/icons/dark/icon_mini_plane.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)" fill="#f77070">
-<path d="m3 1048.4a3 3 0 0 0 3 -3h-2a1 1 0 0 1 -1 1v2z"/>
-<path d="m3 1042.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1v-2z"/>
-<rect transform="scale(-1)" x="-3" y="-1050.4" width="2" height="8"/>
-<rect transform="scale(1,-1)" x="7" y="-1047.4" width="2" height="5"/>
-<path d="m10 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<rect x="11" y="1044.4" width="2" height="6"/>
-<path d="m13 1044.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1v-2z"/>
-<rect x="14" y="1047.4" width="2" height="3"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_quat.svg b/editor/icons/dark/icon_mini_quat.svg
deleted file mode 100644
index 7baaf44089..0000000000
--- a/editor/icons/dark/icon_mini_quat.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path d="m3 1049.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z" fill="#ec69a3"/>
-<path d="m3 1043.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z" fill="#ec69a3"/>
-<rect transform="scale(1,-1)" x="3" y="-1051.4" width="2" height="8" fill="#ec69a3"/>
-<rect transform="scale(1,-1)" x="13" y="-1046.4" width="2" height="5" fill="#ec69a3"/>
-<rect transform="scale(1,-1)" x="15" y="-1045.4" width="1" height="2" fill="#ec69a3"/>
-<path d="m16 1049.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z" fill="#ec69a3"/>
-<path d="m4 1043.4v3a3 3 0 0 0 3 3h2v-6h-2v4a1 1 0 0 1 -1 -1v-3h-2z" fill="#f298c0"/>
-<path transform="translate(0 1040.4)" d="m11 3a3 3 0 0 0 -3 3 3 3 0 0 0 3 3h2v-6h-2zm0 2v2a1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z" fill="#ec69a3"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_raw_array.svg b/editor/icons/dark/icon_mini_raw_array.svg
deleted file mode 100644
index 57a225a19b..0000000000
--- a/editor/icons/dark/icon_mini_raw_array.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path transform="translate(0 1040.4)" d="m0 0v2 8 2h4v-2h-2v-8h2v-2h-2-2zm12 0v2h2v8h-2v2h4v-2-8-2h-2-2z" fill="#4f4f4f"/>
-<rect x="2" y="1046.4" width="2" height="3" fill="#69ec9e"/>
-<rect x="5" y="1043.4" width="1" height="2" fill="#69ec9e"/>
-<path d="m5 1043.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z" fill="#69ec9e"/>
-<path d="m6 1049.4v-6h2v4a1 1 0 0 0 1 -1v-3h2v3 1a1 1 0 0 0 1 -1v-3h2v3a3 3 0 0 1 -3 3h-2v-0.1758a3 3 0 0 1 -1 0.1758h-2z" fill="#aaf4c8"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_rect2.svg b/editor/icons/dark/icon_mini_rect2.svg
deleted file mode 100644
index d9e9413185..0000000000
--- a/editor/icons/dark/icon_mini_rect2.svg
+++ /dev/null
@@ -1,19 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)" fill="#f191a5">
-<rect y="1047.4" width="2" height="3"/>
-<path d="m3 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z"/>
-<rect transform="scale(1,-1)" x="13" y="-1047.4" width="2" height="5"/>
-<rect transform="scale(1,-1)" x="15" y="-1046.4" width="1" height="2"/>
-<path d="m16 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<path d="m7 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z"/>
-<rect transform="scale(1,-1)" x="7" y="-1050.4" width="1" height="2"/>
-<path d="m7 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<rect x="12" y="1044.4" width="1" height="2"/>
-<path d="m12 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z"/>
-<rect transform="scale(1,-1)" x="12" y="-1050.4" width="1" height="2"/>
-<path d="m12 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<path d="m7 1044.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1v-2z"/>
-<rect x="6" y="1046.4" width="2" height="1"/>
-<rect transform="scale(1,-1)" x="3" y="-1046.4" width="1" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_rid.svg b/editor/icons/dark/icon_mini_rid.svg
deleted file mode 100644
index 3fe12d0819..0000000000
--- a/editor/icons/dark/icon_mini_rid.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)" fill="#69ec9a">
-<rect x="1" y="1047.4" width="2" height="3"/>
-<rect x="7" y="1042.4" width="2" height="1.9999"/>
-<rect x="7" y="1046.4" width="2" height="4"/>
-<rect x="4" y="1044.4" width="1" height="2"/>
-<path d="m4 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z"/>
-<path d="m13 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z"/>
-<path d="m13 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<rect x="14" y="1042.4" width="2" height="8"/>
-<rect x="13" y="1044.4" width="1" height="2"/>
-<rect x="13" y="1048.4" width="1" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_string.svg b/editor/icons/dark/icon_mini_string.svg
deleted file mode 100644
index 7212058fe6..0000000000
--- a/editor/icons/dark/icon_mini_string.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)" fill="#6ba7ec">
-<path d="m5 1042.4a3 3 0 0 0 -3 3v2a1 1 0 0 1 -1 1v2a3 3 0 0 0 3 -3v-2a1 1 0 0 1 1 -1v-2z"/>
-<rect transform="scale(1,-1)" x="7" y="-1047.4" width="2" height="5"/>
-<rect transform="scale(1,-1)" x="9" y="-1046.4" width="2" height="2"/>
-<path d="m10 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<path transform="translate(0 1040.4)" d="m15 4a3 3 0 0 0 -3 3v3h2v-3a1 1 0 0 1 1 -1h1v-2h-1z"/>
-<rect y="1048.4" width="1" height="2"/>
-<rect x="5" y="1042.4" width="1" height="2"/>
-<rect transform="scale(1,-1)" x="10" y="-1050.4" width="1" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_string_array.svg b/editor/icons/dark/icon_mini_string_array.svg
deleted file mode 100644
index b64221bd70..0000000000
--- a/editor/icons/dark/icon_mini_string_array.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path transform="translate(0 1040.4)" d="m0 0v2 8 2h2 2v-2h-2v-8h2v-2h-2-2zm12 0v2h2v8h-2v2h4v-2-10h-4z" fill="#4f4f4f"/>
-<path d="m7 1042.4a3 3 0 0 0 -3 3v2a1 1 0 0 1 -1 1v2a3 3 0 0 0 3 -3v-2a1 1 0 0 1 1 -1v-2z" fill="#6ba7ec"/>
-<path d="m14 1044.4a3 3 0 0 0 -3 3v3h2v-3a1 1 0 0 1 1 -1v-2z" fill="#6ba7ec"/>
-<path d="m8 1042.4v5a3 3 0 0 0 3 3v-2a1 1 0 0 1 -1 -1v-1h1v-2h-1v-2h-2z" fill="#b5d3f6"/>
-<rect x="7" y="1042.4" width="1" height="2" fill="#6ba7ec"/>
-<rect x="2" y="1048.4" width="1" height="2" fill="#6ba7ec"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_transform.svg b/editor/icons/dark/icon_mini_transform.svg
deleted file mode 100644
index 43c4bb4a8f..0000000000
--- a/editor/icons/dark/icon_mini_transform.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path d="m4 1042.4-0.9082 2.1816-1.0918-2.1816h-2l2 4-2 4h2l0.9082-2.1816 1.0918 2.1816h2l-2-4 2-4z" fill="#f6a86e"/>
-<path d="m9 1042.4a3 3 0 0 0 -3 3v5h2v-2h1v-2h-1v-1a1 1 0 0 1 1 -1h1v-2h-1z" fill="#f8bf95"/>
-<path transform="translate(0 1040.4)" d="m10 4v2 2 2h2v-2l1 1 1-1v2h2v-2-2-2h-2l-1 2-1-2h-2z" fill="#f6a86e"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_transform2D.svg b/editor/icons/dark/icon_mini_transform2D.svg
deleted file mode 100644
index 38921ea85a..0000000000
--- a/editor/icons/dark/icon_mini_transform2D.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<rect x="5" y="1048.4" width="5" height="2" fill="#ddf4aa"/>
-<path d="m7 1050.4a2 2 0 0 1 -1.7321 -1 2 2 0 0 1 0 -2 2 2 0 0 1 1.7321 -1" fill="#ddf4aa"/>
-<path d="m7 1042.4v2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v2a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -2.5977 -1.5z" fill="#ddf4aa"/>
-<rect y="1042.4" width="6" height="2" fill="#c4ec69"/>
-<rect x="2" y="1043.4" width="2" height="7" fill="#c4ec69"/>
-<path transform="translate(0 1040.4)" d="m10 2v8h2a4 4 0 0 0 3.4648 -2 4 4 0 0 0 0 -4 4 4 0 0 0 -3.4648 -2h-2zm2 2a2 2 0 0 1 1.7324 1 2 2 0 0 1 0 2 2 2 0 0 1 -1.7324 1v-4z" fill="#c4ec69"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_variant.svg b/editor/icons/dark/icon_mini_variant.svg
deleted file mode 100644
index aeb23ed2bc..0000000000
--- a/editor/icons/dark/icon_mini_variant.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)" fill="#69ecbd">
-<rect x="3" y="1044.4" width="2" height="6"/>
-<rect x="6" y="1044.4" width="2" height="6"/>
-<rect x="3" y="1044.4" width="1" height="2"/>
-<path d="m3 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z"/>
-<path d="m14 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<rect transform="scale(1,-1)" x="14" y="-1052.4" width="2" height="8"/>
-<rect transform="scale(1,-1)" x="11" y="-1047.4" width="2" height="3"/>
-<path d="m3 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z"/>
-<path d="m8 1044.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1v-2z"/>
-<rect x="9" y="1047.4" width="2" height="3"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_vector2.svg b/editor/icons/dark/icon_mini_vector2.svg
deleted file mode 100644
index 7abc73c41f..0000000000
--- a/editor/icons/dark/icon_mini_vector2.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path d="m3 1050.4a3 3 0 0 0 3 -3h-2a1 1 0 0 1 -1 1v2z" fill="#bd91f1"/>
-<rect x="4" y="1044.4" width="2" height="3" fill="#bd91f1"/>
-<rect x="11" y="1048.4" width="5" height="2" fill="#dcc5f8"/>
-<rect x="1" y="1044.4" width="2" height="6" fill="#bd91f1"/>
-<rect x="9" y="1044.4" width="1" height="2" fill="#bd91f1"/>
-<path d="m9 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z" fill="#bd91f1"/>
-<rect transform="scale(1,-1)" x="9" y="-1050.4" width="1" height="2" fill="#bd91f1"/>
-<path d="m9 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z" fill="#bd91f1"/>
-<path d="m13 1050.4a2 2 0 0 1 -1.7321 -1 2 2 0 0 1 0 -2 2 2 0 0 1 1.7321 -1" fill="#dcc5f8"/>
-<path d="m13 1042.4v2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v2a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -2.5977 -1.5z" fill="#dcc5f8"/>
-<rect x="12" y="1042.4" width="1" height="2" fill="#dcc5f8"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_vector2_array.svg b/editor/icons/dark/icon_mini_vector2_array.svg
deleted file mode 100644
index 18af4c551d..0000000000
--- a/editor/icons/dark/icon_mini_vector2_array.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<rect y="1050.4" width="4" height="2" fill="#4f4f4f"/>
-<rect y="1040.4" width="2" height="12" fill="#4f4f4f"/>
-<rect y="1040.4" width="4" height="2" fill="#4f4f4f"/>
-<rect transform="scale(-1,1)" x="-16" y="1050.4" width="4" height="2" fill="#4f4f4f"/>
-<rect transform="scale(-1,1)" x="-16" y="1040.4" width="2" height="12" fill="#4f4f4f"/>
-<rect transform="scale(-1,1)" x="-16" y="1040.4" width="4" height="2" fill="#4f4f4f"/>
-<path transform="translate(0 1040.4)" d="m3 3v6h2a3 3 0 0 0 3 -3v-3h-2v3a1 1 0 0 1 -1 1v-4h-2z" fill="#bd91f1"/>
-<path d="m9 1042.4v2h1a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 2 2 0 0 0 -1.7324 1 2 2 0 0 0 -0.26562 1h-0.00195v0.047 1.9531h2 3v-2h-3a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -2.5977 -1.5001h-1z" fill="#dcc5f8"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_vector3.svg b/editor/icons/dark/icon_mini_vector3.svg
deleted file mode 100644
index 88b6f1f53c..0000000000
--- a/editor/icons/dark/icon_mini_vector3.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path d="m3.0004 1050.4a3 3 0 0 0 3 -3h-2a1 1 0 0 1 -1 1v2z" fill="#e286f0"/>
-<rect x="4.0004" y="1044.4" width="2" height="3" fill="#e286f0"/>
-<rect x="1.0004" y="1044.4" width="2" height="6" fill="#e286f0"/>
-<rect x="9.0004" y="1044.4" width="1" height="2" fill="#e286f0"/>
-<path d="m9.0004 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1v-2z" fill="#e286f0"/>
-<rect transform="scale(1,-1)" x="9.0004" y="-1050.4" width="1" height="2" fill="#e286f0"/>
-<path d="m9.0004 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1v2z" fill="#e286f0"/>
-<path transform="translate(0 1040.4)" d="m13 2v1a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v2a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -0.36328 -0.5h-2.2344z" fill="#eeb9f6"/>
-<rect x="12" y="1042.4" width="3.9996" height="2" fill="#eeb9f6"/>
-<path d="m13 1045.4v2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v2a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -2.5977 -1.5z" fill="#eeb9f6"/>
-<rect x="12" y="1049.4" width="1" height="2" fill="#eeb9f6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mini_vector3_array.svg b/editor/icons/dark/icon_mini_vector3_array.svg
deleted file mode 100644
index ffa2be67ec..0000000000
--- a/editor/icons/dark/icon_mini_vector3_array.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<rect y="1050.4" width="4" height="2" fill="#4f4f4f"/>
-<rect y="1040.4" width="2" height="12" fill="#4f4f4f"/>
-<rect y="1040.4" width="4" height="2" fill="#4f4f4f"/>
-<rect transform="scale(-1,1)" x="-16" y="1050.4" width="4" height="2" fill="#4f4f4f"/>
-<rect transform="scale(-1,1)" x="-16" y="1040.4" width="2" height="12" fill="#4f4f4f"/>
-<rect transform="scale(-1,1)" x="-16" y="1040.4" width="4" height="2" fill="#4f4f4f"/>
-<path transform="translate(0 1040.4)" d="m3 3v6h2a3 3 0 0 0 3 -3v-3h-2v3a1 1 0 0 1 -1 1v-4h-2z" fill="#e286f0"/>
-<path transform="translate(0 1040.4)" d="m8 1v2h1 1a1 1 0 0 1 -1 1v2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1h-1v2h1a3 3 0 0 0 2.5977 -1.5 3 3 0 0 0 0 -3 3 3 0 0 0 -0.36523 -0.50195 3 3 0 0 0 0.36523 -0.49805 3 3 0 0 0 0.39844 -1.5h0.003906v-2h-0.76562-2.2344-1z" fill="#eeb9f6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mirror_x.svg b/editor/icons/dark/icon_mirror_x.svg
deleted file mode 100644
index 3e80728396..0000000000
--- a/editor/icons/dark/icon_mirror_x.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="none" stroke="#4f4f4f" stroke-opacity=".99608" stroke-width="2">
-<path d="m4 1042.4-2 2 2 2" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="m2 1044.4h11"/>
-<path d="m12 1042.4 2 2-2 2" stroke-linecap="round" stroke-linejoin="round"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mirror_y.svg b/editor/icons/dark/icon_mirror_y.svg
deleted file mode 100644
index 3070219228..0000000000
--- a/editor/icons/dark/icon_mirror_y.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m11.012 1048.4a1.0001 1.0001 0 0 0 -1.7168 -0.6973l-0.29297 0.293v-7.1719l0.29297 0.293a1.0001 1.0001 0 0 0 1.7148 -0.7266 1.0001 1.0001 0 0 0 -0.30078 -0.6875l-2-2a1.0001 1.0001 0 0 0 -1.4141 0l-2 2a1.0001 1.0001 0 1 0 1.4141 1.4141l0.29297-0.293v7.1719l-0.29297-0.293a1.0001 1.0001 0 1 0 -1.4141 1.4141l2 2a1.0001 1.0001 0 0 0 1.4141 0l2-2a1.0001 1.0001 0 0 0 0.30273 -0.7168z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" fill-opacity=".99608" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_mouse.svg b/editor/icons/dark/icon_mouse.svg
deleted file mode 100644
index f7490f337e..0000000000
--- a/editor/icons/dark/icon_mouse.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1.1016a5 5 0 0 0 -4 4.8984h4v-4.8984zm2 0.0039063v4.8945h4a5 5 0 0 0 -4 -4.8945zm-6 6.8945v2a5 5 0 0 0 5 5 5 5 0 0 0 5 -5v-2h-10z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_move_down.svg b/editor/icons/dark/icon_move_down.svg
deleted file mode 100644
index 437ae2146f..0000000000
--- a/editor/icons/dark/icon_move_down.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-opacity=".99608" stroke-width="2">
-<path d="m4 1045.3 4 5 4-5" stroke-linejoin="round"/>
-<path d="m8 1038.3v11"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_move_point.svg b/editor/icons/dark/icon_move_point.svg
deleted file mode 100644
index 23ffbdfe8d..0000000000
--- a/editor/icons/dark/icon_move_point.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 1.2129 -0.10742l-2.5996-6.3203a1.5002 1.5002 0 0 1 1.3711 -2.0703v-0.0019531a1.5002 1.5002 0 0 1 0.58594 0.11133l6.3184 2.5996a7 7 0 0 0 0.11133 -1.2109 7 7 0 0 0 -7 -7zm2.7559 9.7559l0.52344 1.2734a1.5002 1.5002 0 0 1 0.48047 -0.26953 1.5002 1.5002 0 0 1 0.26953 -0.47852l-1.2734-0.52539z" fill="#000000"/>
-<path transform="translate(0 1036.4)" d="m8 3a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 0.42578 -0.021484l-1.8125-4.4063a1.5002 1.5002 0 0 1 1.3711 -2.0703v-0.0019531a1.5002 1.5002 0 0 1 0.58594 0.11133l4.4082 1.8125a5 5 0 0 0 0.021484 -0.42383 5 5 0 0 0 -5 -5zm2.7559 7.7559l0.44336 1.0801a5 5 0 0 0 0.63867 -0.63281l-1.082-0.44727z" fil#ff4040484"/>
-<path d="m16 1047.7-8-3.291 3.291 8 0.9471-2.8201 1.8836 1.8835 0.9418-0.9418-1.8836-1.8835z" fil#4f4f4f0e0"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_move_up.svg b/editor/icons/dark/icon_move_up.svg
deleted file mode 100644
index cf948b75a4..0000000000
--- a/editor/icons/dark/icon_move_up.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-opacity=".99608" stroke-width="2">
-<path d="m4 1043.4 4-5 4 5" stroke-linejoin="round"/>
-<path d="m8 1050.4v-11"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_multi_edit.svg b/editor/icons/dark/icon_multi_edit.svg
deleted file mode 100644
index a22bf3b8cf..0000000000
--- a/editor/icons/dark/icon_multi_edit.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m1.7071 1047.8-0.70711 3.5356l3.5355-0.7071 7.7782-7.7782-2.8284-2.8284zm9.1924-9.1924 2.8284 2.8285 1.4142-1.4142-2.8284-2.8285z"/>
-<rect x="1" y="1037.4" width="2" height="2"/>
-<rect x="1" y="1041.4" width="2" height="2"/>
-<rect x="5" y="1037.4" width="2" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_multi_line.svg b/editor/icons/dark/icon_multi_line.svg
deleted file mode 100644
index 0dda39baad..0000000000
--- a/editor/icons/dark/icon_multi_line.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<rect x="10" y="1037.4" width="5" height="1.9999"/>
-<rect transform="rotate(90)" x="1037.4" y="-8" width="2" height="7"/>
-<rect x="1" y="1041.4" width="11" height="1.9999"/>
-<rect x="1" y="1045.4" width="4" height="1.9999"/>
-<rect x="7" y="1045.4" width="8" height="1.9999"/>
-<rect x="1" y="1049.4" width="13" height="1.9999"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_multi_mesh.svg b/editor/icons/dark/icon_multi_mesh.svg
deleted file mode 100644
index 50504f9924..0000000000
--- a/editor/icons/dark/icon_multi_mesh.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h1.2695v-1-1h-1.2715a2 2 0 0 0 -0.72852 -0.73047v-5.8555l3.5859 3.5859h1.4141v-1-0.41406l-3.5859-3.5859h5.8574a2 2 0 0 0 0.72852 0.72656v1.2734h2v-1.2695a2 2 0 0 0 1 -1.7305 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm8 7v1.5859 1.4141h-1.4141-1.5859v1 1h3v1 2h2v-1-2h2 1v-2h-2-1v-3h-1-1z" fill="#fea900"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_multi_mesh_instance.svg b/editor/icons/dark/icon_multi_mesh_instance.svg
deleted file mode 100644
index 563ec70f32..0000000000
--- a/editor/icons/dark/icon_multi_mesh_instance.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff5f5f" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h1.2695v-1-1h-1.2715a2 2 0 0 0 -0.72852 -0.73047v-5.8555l3.5859 3.5859h1.4141v-1-0.41406l-3.5859-3.5859h5.8574a2 2 0 0 0 0.72852 0.72656v1.2734h2v-1.2695a2 2 0 0 0 1 -1.7305 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm9 7v2.5859l-1-1v1.4141h-1.4141l1 1h-2.5859v1h1 2v1h0.27148a2 2 0 0 0 1.7285 1v-2h2a2 2 0 0 0 -1.0312 -1.75h0.03125v-0.25h-1v-3h-1z"/>
-<path d="m11 1044.4v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_multi_script.svg b/editor/icons/dark/icon_multi_script.svg
deleted file mode 100644
index a9b577de86..0000000000
--- a/editor/icons/dark/icon_multi_script.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path transform="translate(0 1036.4)" d="m7 1l-0.56445 2.2578a5 5 0 0 0 -0.68945 0.2793l-1.9883-1.1934-1.4141 1.4141 1.1953 1.9941a5 5 0 0 0 -0.28516 0.68555l-2.2539 0.5625v2l2.2578 0.56445a5 5 0 0 0 0.2793 0.6875l-1.1934 1.9902 1.4141 1.4141 1.2422-0.74414v-4.9121h1a2 2 0 0 1 2 -2v-1h4.9121l0.74414-1.2422-1.4141-1.4141-1.9941 1.1953a5 5 0 0 0 -0.68555 -0.28516l-0.5625-2.2539h-2z"/>
-<path d="m10 1043.4v3h-3v2h3v3h2v-3h3v-2h-3v-3z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_native_script.svg b/editor/icons/dark/icon_native_script.svg
deleted file mode 100644
index 3b88105c24..0000000000
--- a/editor/icons/dark/icon_native_script.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1l-0.56445 2.2578a5 5 0 0 0 -0.68945 0.2793l-1.9883-1.1934-1.4141 1.4141 1.1953 1.9941a5 5 0 0 0 -0.28516 0.68555l-2.2539 0.5625h3v1 1h2v-0.95117a2 2 0 0 1 0 -0.048828 2 2 0 0 1 2 -2 2 2 0 0 1 2 2v1h5v-2l-2.2578-0.56445a5 5 0 0 0 -0.2793 -0.6875l1.1934-1.9902-1.4141-1.4141-1.9941 1.1953a5 5 0 0 0 -0.68555 -0.28516l-0.5625-2.2539h-2zm-6 7v4 4h2a3 3 0 0 0 3 -3 3 3 0 0 0 -3 -3v-2h-2zm6 0v2h2v-2h-2zm3 2v6h2v-4a1 1 0 0 1 1 1v3h2v-3a3 3 0 0 0 -3 -3h-2zm-7 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1v-2zm4 0v4h2v-4h-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_navigation.svg b/editor/icons/dark/icon_navigation.svg
deleted file mode 100644
index 21f2d5e73c..0000000000
--- a/editor/icons/dark/icon_navigation.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m3 1050.4 5-2 5 2-5-12-5 12z" fill="#ff5f5f" fill-opacity=".99608" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_navigation_2d.svg b/editor/icons/dark/icon_navigation_2d.svg
deleted file mode 100644
index 0f945f3402..0000000000
--- a/editor/icons/dark/icon_navigation_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m3 1050.4 5-2 5 2-5-12-5 12z" fill="#6d90ff" fill-opacity=".98824" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_navigation_mesh.svg b/editor/icons/dark/icon_navigation_mesh.svg
deleted file mode 100644
index 84fa175033..0000000000
--- a/editor/icons/dark/icon_navigation_mesh.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h2.5078l0.75-2h-3.2598a2 2 0 0 0 -0.72852 -0.73047v-5.8555l4.6973 4.6973 0.77148-2.0566-4.0547-4.0547h5.8574a2 2 0 0 0 0.72852 0.73047v0.27148a2.0002 2.0002 0 0 1 0.023438 0 2.0002 2.0002 0 0 1 1.8496 1.2969l0.12695 0.33789v-1.9082a2 2 0 0 0 1 -1.7285 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm9 6l-3 8 3-2 3 2-3-8z" fill="#fea900"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_navigation_mesh_instance.svg b/editor/icons/dark/icon_navigation_mesh_instance.svg
deleted file mode 100644
index 295bef078f..0000000000
--- a/editor/icons/dark/icon_navigation_mesh_instance.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff5f5f" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h2.5078l0.75-2h-3.2598a2 2 0 0 0 -0.72852 -0.73047v-5.8555l4.6973 4.6973 0.77148-2.0566-4.0547-4.0547h5.8574a2 2 0 0 0 0.72852 0.73047v0.27148a2.0002 2.0002 0 0 1 0.023438 0 2.0002 2.0002 0 0 1 1.8496 1.2969l0.12695 0.33789v-1.9082a2 2 0 0 0 1 -1.7285 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1z"/>
-<path d="m15 1051.4-3-8-3 8 3-2z" fill-rule="evenodd"/>
-<rect x="12" y="1040.4" width="2" height="1"/>
-<rect x="12" y="1040.4" width="2" height="1"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_navigation_polygon.svg b/editor/icons/dark/icon_navigation_polygon.svg
deleted file mode 100644
index e3c5183d7b..0000000000
--- a/editor/icons/dark/icon_navigation_polygon.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<g fill="#4f4f4f" fill-rule="evenodd">
-<path transform="translate(0 1036.4)" d="m2 1a1.0001 1.0001 0 0 0 -1 1v12a1.0001 1.0001 0 0 0 1 1h4.9023a2.1002 2.1002 0 0 1 0.13086 -0.73633l0.47461-1.2637h-4.5078v-10h8.5859l-4.293 4.293a1.0001 1.0001 0 0 0 0 1.4141l1.3262 1.3262 1.4141-3.7695a2.1002 2.1002 0 0 1 1.9922 -1.3613 2.1002 2.1002 0 0 1 0.43555 0.050781l2.2461-2.2461a1.0001 1.0001 0 0 0 -0.70703 -1.707h-12z" color="#000000" color-rendering="auto" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<path d="m15 1051.4-3-8-3 8 3-2z"/>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_navigation_polygon_instance.svg b/editor/icons/dark/icon_navigation_polygon_instance.svg
deleted file mode 100644
index 955fb00c62..0000000000
--- a/editor/icons/dark/icon_navigation_polygon_instance.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#6d90ff" fill-opacity=".98824" fill-rule="evenodd">
-<path transform="translate(0 1036.4)" d="m2 1a1.0001 1.0001 0 0 0 -1 1v12a1.0001 1.0001 0 0 0 1 1h4.9023a2.1002 2.1002 0 0 1 0.13086 -0.73633l0.47461-1.2637h-4.5078v-10h8.5859l-4.293 4.293a1.0001 1.0001 0 0 0 0 1.4141l1.3262 1.3262 1.4141-3.7695a2.1002 2.1002 0 0 1 1.9922 -1.3613 2.1002 2.1002 0 0 1 0.43555 0.050781l2.2461-2.2461a1.0001 1.0001 0 0 0 -0.70703 -1.707h-12z" color="#000000" color-rendering="auto" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<path d="m15 1051.4-3-8-3 8 3-2z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_new.svg b/editor/icons/dark/icon_new.svg
deleted file mode 100644
index 0c8652f1f7..0000000000
--- a/editor/icons/dark/icon_new.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<g transform="translate(0 -1.6949e-5)">
-<path transform="translate(0 1036.4)" d="m2 1v14h8v-1h-2v-4h2v-2h4v-2h-5v-5zm8 0v4h4z" fill="#4f4f4f"/>
-<path d="m11 1045.4v2h-2v2h2v2h2v-2h2v-2h-2v-2z" fill="#00f010"/>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_nine_patch_rect.svg b/editor/icons/dark/icon_nine_patch_rect.svg
deleted file mode 100644
index 0e4a063196..0000000000
--- a/editor/icons/dark/icon_nine_patch_rect.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<rect x="1" y="1037.4" width="2" height="14"/>
-<rect x="1" y="1049.4" width="14" height="2"/>
-<rect x="1" y="1037.4" width="14" height="2"/>
-<rect x="13" y="1037.4" width="2" height="14"/>
-<rect x="1" y="1041.4" width="14" height=".99998"/>
-<rect x="1" y="1046.4" width="14" height=".99998"/>
-<rect transform="rotate(90)" x="1037.4" y="-6" width="14" height=".99998"/>
-<rect transform="rotate(90)" x="1037.4" y="-11" width="14" height=".99998"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_node.svg b/editor/icons/dark/icon_node.svg
deleted file mode 100644
index c5e246e01a..0000000000
--- a/editor/icons/dark/icon_node.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 2a6 6 0 0 0 -6 6 6 6 0 0 0 6 6 6 6 0 0 0 6 -6 6 6 0 0 0 -6 -6zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_node_2d.svg b/editor/icons/dark/icon_node_2d.svg
deleted file mode 100644
index 55bc880d18..0000000000
--- a/editor/icons/dark/icon_node_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 2a6 6 0 0 0 -6 6 6 6 0 0 0 6 6 6 6 0 0 0 6 -6 6 6 0 0 0 -6 -6zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4z" fill="#6d90ff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_node_warning.svg b/editor/icons/dark/icon_node_warning.svg
deleted file mode 100644
index 981af7e3ba..0000000000
--- a/editor/icons/dark/icon_node_warning.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<g transform="translate(0 -1.6949e-5)">
-<path transform="translate(0 1036.4)" d="m8.0293 2.002a1.0001 1.0001 0 0 0 -0.88672 0.48438l-6 10a1.0001 1.0001 0 0 0 0.85742 1.5137h12a1.0001 1.0001 0 0 0 0.85742 -1.5137l-6-10a1.0001 1.0001 0 0 0 -0.82812 -0.48438zm-1.0293 2.998h2v5h-2v-5zm0 6h2v2h-2v-2z" color="#000000" color-rendering="auto" fill="#fea900" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_non_favorite.svg b/editor/icons/dark/icon_non_favorite.svg
deleted file mode 100644
index 07090d3e1c..0000000000
--- a/editor/icons/dark/icon_non_favorite.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1.7246l-2.375 4.0977-4.625 1.0977 3.2363 3.4063-0.35938 4.6738 4.1387-1.9766 4.1582 1.9414-0.39648-4.6523 3.2227-3.3926-4.625-1.0977-2.375-4.0977zm0 2.2754l1.6582 2.7773 3.2324 0.74414-2.25 2.3008 0.27539 3.1543-2.9043-1.3164-2.8926 1.3398 0.25195-3.168-2.2617-2.3105 3.2324-0.74414 1.6582-2.7773z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_object.svg b/editor/icons/dark/icon_object.svg
deleted file mode 100644
index e52f4b7513..0000000000
--- a/editor/icons/dark/icon_object.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f" fill-rule="evenodd">
-<path d="m8 1043.9v6l6-3v-6z"/>
-<path transform="translate(0 1036.4)" d="m7.9629 1.002a1.0001 1.0001 0 0 0 -0.41016 0.10352l-6 3a1.0001 1.0001 0 0 0 -0.55273 0.89453v6a1.0001 1.0001 0 0 0 0.55273 0.89453l6 3a1.0001 1.0001 0 0 0 0.89453 0l6-3a1.0001 1.0001 0 0 0 0.55273 -0.89453v-6a1.0001 1.0001 0 0 0 -0.55273 -0.89453l-6-3a1.0001 1.0001 0 0 0 -0.48438 -0.10352zm0.037109 2.1172l3.7637 1.8809-3.7637 1.8828-3.7637-1.8828 3.7637-1.8809zm-5 3.498l4 2v3.7656l-4-2v-3.7656zm10 0v3.7656l-4 2v-3.7656l4-2z" color="#000000" color-rendering="auto" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_occluder_polygon_2d.svg b/editor/icons/dark/icon_occluder_polygon_2d.svg
deleted file mode 100644
index dce4d0e3cd..0000000000
--- a/editor/icons/dark/icon_occluder_polygon_2d.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill-rule="evenodd">
-<path d="m1 1045.4 6 6h8v-8l-6-6h-8z" fill="#3552b1"/>
-<path d="m1 1037.4h8l-3 4 3 4h-8z" fill="#6d90ff" fill-opacity=".98824"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_omni_light.svg b/editor/icons/dark/icon_omni_light.svg
deleted file mode 100644
index 56d9191cce..0000000000
--- a/editor/icons/dark/icon_omni_light.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a5 5 0 0 0 -5 5 5 5 0 0 0 3 4.5762v2.4238h4v-2.4199a5 5 0 0 0 3 -4.5801 5 5 0 0 0 -5 -5zm0 2a3 3 0 0 1 3 3 3 3 0 0 1 -3 3 3 3 0 0 1 -3 -3 3 3 0 0 1 3 -3zm-1 11v1h2v-1h-2z" fill="#ff5f5f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_option_button.svg b/editor/icons/dark/icon_option_button.svg
deleted file mode 100644
index 5e9114af48..0000000000
--- a/editor/icons/dark/icon_option_button.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 3c-1.1046 0-2 0.89543-2 2v6c0 1.1046 0.89543 2 2 2h5 1 1 2 1c1.1046 0 2-0.89543 2-2v-6c0-1.1046-0.89543-2-2-2h-1-2-1-1-5zm8 2.9863a1.0001 1.0001 0 0 1 0.7168 1.7207l-3 3a1.0001 1.0001 0 0 1 -1.4141 0l-3-3a1.0001 1.0001 0 0 1 0.69727 -1.7168 1.0001 1.0001 0 0 1 0.7168 0.30273l2.293 2.293 2.293-2.293a1.0001 1.0001 0 0 1 0.69727 -0.30664z" fill="#29d739"/>
-<rect x="4" y="1042.4" width="4" height="4" fill="none"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_override.svg b/editor/icons/dark/icon_override.svg
deleted file mode 100644
index 34a1aabccd..0000000000
--- a/editor/icons/dark/icon_override.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m5 1c-1.108 0-2 0.89199-2 2v1h4v-1h2v1h4v-1c0-1.108-0.89199-2-2-2h-6z" fill="#4f4f4f"/>
-<path transform="translate(0 1036.4)" d="m3 6c-1.108 0-2 0.89199-2 2v5c0 1.108 0.89199 2 2 2h10c1.108 0 2-0.89199 2-2v-5c0-1.108-0.89199-2-2-2h-4v3h2l-3 4-3-4h2v-3h-4z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_packed_data_container.svg b/editor/icons/dark/icon_packed_data_container.svg
deleted file mode 100644
index 6f306165e5..0000000000
--- a/editor/icons/dark/icon_packed_data_container.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m2 1038.4v12h12v-12z" fill="none" stroke="#4f4f4f" stroke-linejoin="round" stroke-width="2"/>
-<rect x="4" y="1040.4" width="2" height="2" fill="#4f4f4f"/>
-<rect x="4" y="1043.4" width="2" height="2" fill="#4f4f4f"/>
-<rect x="4" y="1046.4" width="2" height="2" fill="#4f4f4f"/>
-<rect x="7" y="1040.4" width="2" height="2" fill="#4f4f4f"/>
-<rect x="7" y="1043.4" width="2" height="2" fill="#4f4f4f"/>
-<rect x="7" y="1046.4" width="2" height="2" fill="#4f4f4f"/>
-<rect x="10" y="1040.4" width="2" height="2" fill="#4f4f4f"/>
-<rect x="10" y="1043.4" width="2" height="2" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_packed_scene.svg b/editor/icons/dark/icon_packed_scene.svg
deleted file mode 100644
index 08efa2b833..0000000000
--- a/editor/icons/dark/icon_packed_scene.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path transform="translate(0 1036.4)" d="m1 7v6h2v2h12v-8h-14z"/>
-<path d="m0.71129 1040.4 0.28871 1.9791l2.2438-0.3273-0.81826-1.9018-1.7143 0.25zm3.6933-0.5387 0.81826 1.9018 1.9791-0.2887-0.81826-1.9018-1.9791 0.2887zm3.9581-0.5775 0.81826 1.9018 1.9791-0.2887-0.81826-1.9018-1.9791 0.2887zm3.9581-0.5774 0.81826 1.9018 1.7143-0.25-0.28871-1.9791-2.2438 0.3273z"/>
-<circle cx="3" cy="1049.4" r="2"/>
-<circle cx="13" cy="1049.4" r="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_panel.svg b/editor/icons/dark/icon_panel.svg
deleted file mode 100644
index c86f6a129d..0000000000
--- a/editor/icons/dark/icon_panel.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_panel_container.svg b/editor/icons/dark/icon_panel_container.svg
deleted file mode 100644
index 14dd0a8bd8..0000000000
--- a/editor/icons/dark/icon_panel_container.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2zm0 2h10v10h-10z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_panels_1.svg b/editor/icons/dark/icon_panels_1.svg
deleted file mode 100644
index bfad85ecb9..0000000000
--- a/editor/icons/dark/icon_panels_1.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect y="1036.4" width="16" height="16" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_panels_2.svg b/editor/icons/dark/icon_panels_2.svg
deleted file mode 100644
index 9ae6c02c96..0000000000
--- a/editor/icons/dark/icon_panels_2.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<rect y="1036.4" width="16" height="7"/>
-<rect y="1045.4" width="16" height="7"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_panels_2_alt.svg b/editor/icons/dark/icon_panels_2_alt.svg
deleted file mode 100644
index 9d5a02d2a3..0000000000
--- a/editor/icons/dark/icon_panels_2_alt.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<rect x="9" y="1036.4" width="7" height="16"/>
-<rect y="1036.4" width="7" height="16"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_panels_3.svg b/editor/icons/dark/icon_panels_3.svg
deleted file mode 100644
index dddf33f324..0000000000
--- a/editor/icons/dark/icon_panels_3.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<rect y="1036.4" width="16" height="7"/>
-<rect x="9" y="1045.4" width="7" height="7"/>
-<rect y="1045.4" width="7" height="7"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_panels_3_alt.svg b/editor/icons/dark/icon_panels_3_alt.svg
deleted file mode 100644
index 9885f5de09..0000000000
--- a/editor/icons/dark/icon_panels_3_alt.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<rect y="1045.4" width="7" height="7"/>
-<rect x="9" y="1036.4" width="7" height="16"/>
-<rect y="1036.4" width="7" height="7"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_panels_4.svg b/editor/icons/dark/icon_panels_4.svg
deleted file mode 100644
index 28090e61d7..0000000000
--- a/editor/icons/dark/icon_panels_4.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<rect x="9" y="1045.4" width="7" height="7"/>
-<rect y="1045.4" width="7" height="7"/>
-<rect x="9" y="1036.4" width="7" height="7"/>
-<rect y="1036.4" width="7" height="7"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_panorama_sky.svg b/editor/icons/dark/icon_panorama_sky.svg
deleted file mode 100644
index f3da955dbd..0000000000
--- a/editor/icons/dark/icon_panorama_sky.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="8" x2="8" y1="1038.4" y2="1050.4" gradientTransform="matrix(1.0096 0 0 1.0227 -.0096153 -22.593)" gradientUnits="userSpaceOnUse">
-<stop stop-color="#1ec3ff" offset="0"/>
-<stop stop-color="#b2e1ff" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1037.4)">
-<path d="m1 1039.4c4.2749 2.6091 10.765 2.7449 14 0v12c-3.5849-2.6849-9.7929-2.6544-14 0z" fill="url(#a)" stroke-width="15.242"/>
-<rect x="2" y="1046.4" width="3" height="2" ry="1" fill="#fff"/>
-<rect x="8" y="1044.4" width="4" height="2" ry="1" fill="#fff"/>
-<rect x="10" y="1043.4" width="4" height="2" ry="1" fill="#fff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_parallax_background.svg b/editor/icons/dark/icon_parallax_background.svg
deleted file mode 100644
index fa2ebc1ce7..0000000000
--- a/editor/icons/dark/icon_parallax_background.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<ellipse cx="3" cy="1039.4" r="2" fill="#6e6e6e"/>
-<path d="m1 1039.4a1 1 0 0 1 1 -1v1z" fill="#4f4f4f" fill-opacity=".99608"/>
-<path transform="scale(-1,1)" d="m-15 1039.4a1 1 0 0 1 1 -1v1z" fill="#4f4f4f" fill-opacity=".99608"/>
-<rect x="2" y="1038.4" width="12" height="1" fill="#4f4f4f" fill-opacity=".99608"/>
-<rect x="2" y="1049.4" width="12" height="1" fill="#4f4f4f" fill-opacity=".99608"/>
-<path transform="scale(1,-1)" d="m1-1049.4a1 1 0 0 1 1 -1v1z" fill="#4f4f4f" fill-opacity=".99608"/>
-<path transform="scale(-1)" d="m-15-1049.4a1 1 0 0 1 1 -1v1z" fill="#4f4f4f" fill-opacity=".99608"/>
-<rect x="1" y="1039.4" width="1" height="10" fill="#4f4f4f" fill-opacity=".99608"/>
-<rect x="14" y="1039.4" width="1" height="10" fill="#4f4f4f" fill-opacity=".99608"/>
-<path d="m7 1041.4-3 3 3 3z" fill="#4f4f4f" fill-opacity=".99608" fill-rule="evenodd"/>
-<path d="m9 1041.4 3 3-3 3z" fill="#4f4f4f" fill-opacity=".99608" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_parallax_layer.svg b/editor/icons/dark/icon_parallax_layer.svg
deleted file mode 100644
index 038eac75c2..0000000000
--- a/editor/icons/dark/icon_parallax_layer.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<ellipse cx="3" cy="1039.4" r="2" fill="#6e6e6e"/>
-<path d="m7 1041.4-3 3 3 3z" fill="#6d90ff" fill-opacity=".98824" fill-rule="evenodd"/>
-<path d="m9 1041.4 3 3-3 3z" fill="#6d90ff" fill-opacity=".98824" fill-rule="evenodd"/>
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2zm0 1h10c0.55228 9.6e-6 0.99999 0.44772 1 1v10c-1e-5 0.55228-0.44772 0.99999-1 1h-10c-0.55228-1e-5 -0.99999-0.44772-1-1v-10c9.6e-6 -0.55228 0.44772-0.99999 1-1z" fill="#6d90ff" fill-opacity=".98824"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_particle_attractor_2d.svg b/editor/icons/dark/icon_particle_attractor_2d.svg
deleted file mode 100644
index 48e1979f13..0000000000
--- a/editor/icons/dark/icon_particle_attractor_2d.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#6d90ff" fill-opacity=".98824">
-<path transform="translate(0 1036.4)" d="m8 1a3 7 0 0 0 -3 7 3 7 0 0 0 3 7 3 7 0 0 0 3 -7 3 7 0 0 0 -3 -7zm0 1a2 6 0 0 1 2 6 2 6 0 0 1 -2 6 2 6 0 0 1 -2 -6 2 6 0 0 1 2 -6z"/>
-<path d="m1 1044.4a7 3 0 0 0 7 3 7 3 0 0 0 7 -3 7 3 0 0 0 -7 -3 7 3 0 0 0 -7 3zm1 0a6 2 0 0 1 6 -2 6 2 0 0 1 6 2 6 2 0 0 1 -6 2 6 2 0 0 1 -6 -2z"/>
-<path d="m3.0503 1049.3a3 7 45 0 0 7.0711 -2.8284 3 7 45 0 0 2.8284 -7.071 3 7 45 0 0 -7.0711 2.8284 3 7 45 0 0 -2.8284 7.071zm0.70711-0.7071a2 6 45 0 1 2.8284 -5.6568 2 6 45 0 1 5.6569 -2.8284 2 6 45 0 1 -2.8284 5.6568 2 6 45 0 1 -5.6569 2.8284z"/>
-<path d="m12.95 1049.3a7 3 45 0 0 -2.8284 -7.071 7 3 45 0 0 -7.071 -2.8284 7 3 45 0 0 2.8284 7.071 7 3 45 0 0 7.071 2.8284zm-0.7071-0.7071a6 2 45 0 1 -5.6568 -2.8284 6 2 45 0 1 -2.8284 -5.6568 6 2 45 0 1 5.6568 2.8284 6 2 45 0 1 2.8284 5.6568z"/>
-<circle cx="8" cy="1044.4" r="1"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_particles.svg b/editor/icons/dark/icon_particles.svg
deleted file mode 100644
index b5d0558eae..0000000000
--- a/editor/icons/dark/icon_particles.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff5f5f" fill-opacity=".99608">
-<circle cx="4" cy="1044.4" r="3"/>
-<ellipse cx="8" cy="1042.4" rx="4.5" ry="5"/>
-<path d="m4 1047.4h8v-4h-8z" fill-rule="evenodd"/>
-<circle cx="12" cy="1044.4" r="3"/>
-<circle cx="4" cy="1049.4" r="1"/>
-<circle cx="12" cy="1049.4" r="1"/>
-<circle cx="8" cy="1050.4" r="1"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_particles_2d.svg b/editor/icons/dark/icon_particles_2d.svg
deleted file mode 100644
index 6ac8c29d15..0000000000
--- a/editor/icons/dark/icon_particles_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a4.5 5 0 0 0 -4.4141 4.0312 3 3 0 0 0 -2.5859 2.9688 3 3 0 0 0 3 3h8a3 3 0 0 0 3 -3 3 3 0 0 0 -2.5898 -2.9668 4.5 5 0 0 0 -4.4102 -4.0332zm-4 11a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1zm8 0a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1zm-4 1a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1z" fill="#6d90ff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_particles_material.svg b/editor/icons/dark/icon_particles_material.svg
deleted file mode 100644
index 5aabbb0252..0000000000
--- a/editor/icons/dark/icon_particles_material.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a4.5 5 0 0 0 -3.5938 2h7.1816a4.5 5 0 0 0 -3.5879 -2z" fill="#ff2929"/>
-<path transform="translate(0 1036.4)" d="m4.4062 3a4.5 5 0 0 0 -0.81445 2h8.8105a4.5 5 0 0 0 -0.81445 -2h-7.1816z" fill="#ffe337"/>
-<path transform="translate(0 1036.4)" d="m3.5918 5a4.5 5 0 0 0 -0.0058594 0.03125 3 3 0 0 0 -2.4121 1.9688h13.65a3 3 0 0 0 -2.4141 -1.9668 4.5 5 0 0 0 -0.007812 -0.033203h-8.8105z" fill="#74ff34"/>
-<path transform="translate(0 1036.4)" d="m1.1738 7a3 3 0 0 0 -0.17383 1 3 3 0 0 0 0.17578 1h13.65a3 3 0 0 0 0.17383 -1 3 3 0 0 0 -0.17578 -1h-13.65z" fill="#2cff98"/>
-<path transform="translate(0 1036.4)" d="m1.1758 9a3 3 0 0 0 2.8242 2h8a3 3 0 0 0 2.8262 -2h-13.65z" fill="#22ccff"/>
-<path transform="translate(0 1036.4)" d="m3 13a1 1 0 0 0 1 1 1 1 0 0 0 1 -1h-2zm5 0a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1zm3 0a1 1 0 0 0 1 1 1 1 0 0 0 1 -1h-2z" fill="#ff2781"/>
-<path transform="translate(0 1036.4)" d="m4 12a1 1 0 0 0 -1 1h2a1 1 0 0 0 -1 -1zm8 0a1 1 0 0 0 -1 1h2a1 1 0 0 0 -1 -1z" fill="#702aff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_path.svg b/editor/icons/dark/icon_path.svg
deleted file mode 100644
index 86c7fac35a..0000000000
--- a/editor/icons/dark/icon_path.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<circle cx="3" cy="1049.4" r="2" fill="#ff5f5f" fill-opacity=".99608"/>
-<circle cx="13" cy="1039.4" r="2" fill="#ff5f5f" fill-opacity=".99608"/>
-<path d="m3 1049.4c0-9 10-1 10-10" fill="none" stroke="#ff5f5f" stroke-opacity=".99608" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_path_2d.svg b/editor/icons/dark/icon_path_2d.svg
deleted file mode 100644
index 06b6caa954..0000000000
--- a/editor/icons/dark/icon_path_2d.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#6d90ff" fill-opacity=".98824">
-<circle cx="3" cy="1049.4" r="2"/>
-<circle cx="13" cy="1039.4" r="2"/>
-<path d="m12 1039.4c0 2.0648-0.49246 2.8244-1.1367 3.2754-0.64426 0.451-1.7129 0.6055-2.9629 0.7305s-2.6814 0.2205-3.9121 1.082c-1.2307 0.8615-1.9883 2.4769-1.9883 4.9121h2c0-2.0648 0.49246-2.8224 1.1367-3.2734 0.64426-0.451 1.7129-0.6055 2.9629-0.7305s2.6814-0.2205 3.9121-1.082c1.2307-0.8615 1.9883-2.4789 1.9883-4.9141h-2z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_path_follow.svg b/editor/icons/dark/icon_path_follow.svg
deleted file mode 100644
index c5b8176b75..0000000000
--- a/editor/icons/dark/icon_path_follow.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff5f5f" fill-opacity=".99608">
-<circle cx="3" cy="1049.4" r="2"/>
-<path d="m12 1039.4c0 2.0648-0.49246 2.8244-1.1367 3.2754-0.64426 0.451-1.7129 0.6055-2.9629 0.7305s-2.6814 0.2205-3.9121 1.082c-1.2307 0.8615-1.9883 2.4769-1.9883 4.9121h2c0-2.0648 0.49246-2.8224 1.1367-3.2734 0.64426-0.451 1.7129-0.6055 2.9629-0.7305s2.6814-0.2205 3.9121-1.082c1.2307-0.8615 1.9883-2.4789 1.9883-4.9141h-2z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<path d="m10 1040.4h6l-3-4z" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_path_follow_2d.svg b/editor/icons/dark/icon_path_follow_2d.svg
deleted file mode 100644
index e296fad421..0000000000
--- a/editor/icons/dark/icon_path_follow_2d.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#6d90ff" fill-opacity=".98824">
-<circle cx="3" cy="1049.4" r="2"/>
-<path d="m12 1039.4c0 2.0648-0.49246 2.8244-1.1367 3.2754-0.64426 0.451-1.7129 0.6055-2.9629 0.7305s-2.6814 0.2205-3.9121 1.082c-1.2307 0.8615-1.9883 2.4769-1.9883 4.9121h2c0-2.0648 0.49246-2.8224 1.1367-3.2734 0.64426-0.451 1.7129-0.6055 2.9629-0.7305s2.6814-0.2205 3.9121-1.082c1.2307-0.8615 1.9883-2.4789 1.9883-4.9141h-2z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<path d="m10 1040.4h6l-3-4z" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_pause.svg b/editor/icons/dark/icon_pause.svg
deleted file mode 100644
index 344cf12aa1..0000000000
--- a/editor/icons/dark/icon_pause.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m4 3a1.0001 1.0001 0 0 0 -1 1v8a1.0001 1.0001 0 0 0 1 1h2a1 1 0 0 0 1 -1v-8a1 1 0 0 0 -1 -1h-2zm6 0a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h2a1.0001 1.0001 0 0 0 1 -1v-8a1.0001 1.0001 0 0 0 -1 -1h-2z" color="#000000" color-rendering="auto" fill="#4f4f4f" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_pin.svg b/editor/icons/dark/icon_pin.svg
deleted file mode 100644
index c9988452de..0000000000
--- a/editor/icons/dark/icon_pin.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m3 1046.4h10l-2-3h-6z" fill-rule="evenodd"/>
-<path transform="translate(0 1036.4)" d="m4 1v1l1 1v3h6v-3l1-1v-1h-8z" fill-rule="evenodd"/>
-<rect x="7" y="1047.4" width="2" height="2"/>
-<path d="m7 1049.4 1 2 1-2h-2z" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_pin_joint.svg b/editor/icons/dark/icon_pin_joint.svg
deleted file mode 100644
index 1a2b5dedb2..0000000000
--- a/editor/icons/dark/icon_pin_joint.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff5f5f">
-<path d="m1.9289 1043.3 7.0711 7.071l0.70711-3.5355-4.2426-4.2426z" fill-rule="evenodd"/>
-<path d="m9 1037.6-0.70711 0.7071v1.4142l-2.1213 2.1214 4.2426 4.2426 2.1213-2.1213h1.4142l0.70711-0.7071-5.6569-5.6569z" fill-rule="evenodd"/>
-<rect transform="matrix(.70711 .70711 -.70711 .70711 0 0)" x="743.08" y="737.35" width="2" height="2"/>
-<path d="m2.636 1048.2-0.70711 2.1213 2.1213-0.7071-1.4142-1.4142z" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_pin_joint_2d.svg b/editor/icons/dark/icon_pin_joint_2d.svg
deleted file mode 100644
index 0afd1c1541..0000000000
--- a/editor/icons/dark/icon_pin_joint_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m9 1.2715l-0.70703 0.70703v1.4141l-2.1211 2.123 4.2422 4.2422 2.1211-2.1211h1.4141l0.70703-0.70703-5.6562-5.6582zm-3.5352 4.9512l-3.5352 0.70703 7.0703 7.0703 0.70703-3.5352-4.2422-4.2422zm-1.4141 4.2422l-1.4141 1.4141-0.70703 2.1211 2.1211-0.70703 1.4141-1.4141-1.4141-1.4141z" fill="#6d90ff" fill-opacity=".98824" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_pin_pressed.svg b/editor/icons/dark/icon_pin_pressed.svg
deleted file mode 100644
index c9988452de..0000000000
--- a/editor/icons/dark/icon_pin_pressed.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m3 1046.4h10l-2-3h-6z" fill-rule="evenodd"/>
-<path transform="translate(0 1036.4)" d="m4 1v1l1 1v3h6v-3l1-1v-1h-8z" fill-rule="evenodd"/>
-<rect x="7" y="1047.4" width="2" height="2"/>
-<path d="m7 1049.4 1 2 1-2h-2z" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_plane.svg b/editor/icons/dark/icon_plane.svg
deleted file mode 100644
index 3e597419e2..0000000000
--- a/editor/icons/dark/icon_plane.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m1 1044.4 7 3 7-3-7-3z" fill="#4f4f4f" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_plane_mesh.svg b/editor/icons/dark/icon_plane_mesh.svg
deleted file mode 100644
index d90b6dd31e..0000000000
--- a/editor/icons/dark/icon_plane_mesh.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m2 1048.4h12l-3-8h-6z" fill="none" stroke="#fea900" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_plane_shape.svg b/editor/icons/dark/icon_plane_shape.svg
deleted file mode 100644
index 27395b6a42..0000000000
--- a/editor/icons/dark/icon_plane_shape.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m1 1044.4 7 3 7-3-7-3z" fill="#a2d2ff" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_play.svg b/editor/icons/dark/icon_play.svg
deleted file mode 100644
index 531d704dac..0000000000
--- a/editor/icons/dark/icon_play.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m4 1048.4v-8l7 4z" fill="#4f4f4f" fill-rule="evenodd" stroke="#4f4f4f" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_play_backwards.svg b/editor/icons/dark/icon_play_backwards.svg
deleted file mode 100644
index 2dd2d63fe7..0000000000
--- a/editor/icons/dark/icon_play_backwards.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m12 1048.4v-8l-7 4z" fill="#4f4f4f" fill-rule="evenodd" stroke="#4f4f4f" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_play_custom.svg b/editor/icons/dark/icon_play_custom.svg
deleted file mode 100644
index bdb0138d6d..0000000000
--- a/editor/icons/dark/icon_play_custom.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path transform="translate(0 1036.4)" d="m1 7v6a2 2 0 0 0 2 2h12v-8h-14zm3 1h4v1h4v5h-4-4v-5-1z"/>
-<path d="m0.71129 1040.4 0.28871 1.9791l2.2438-0.3273-0.81826-1.9018-1.7143 0.25zm3.6933-0.5387 0.81826 1.9018 1.9791-0.2887-0.81826-1.9018-1.9791 0.2887zm3.9581-0.5775 0.81826 1.9018 1.9791-0.2887-0.81826-1.9018-1.9791 0.2887zm3.9581-0.5774 0.81826 1.9018 1.7143-0.25-0.28871-1.9791-2.2438 0.3273z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_play_scene.svg b/editor/icons/dark/icon_play_scene.svg
deleted file mode 100644
index 4f0279b07c..0000000000
--- a/editor/icons/dark/icon_play_scene.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path transform="translate(0 1036.4)" d="m1 7v6h2v2h12v-8h-14zm5 1l5 3-5 3v-6z"/>
-<path d="m0.71129 1040.4 0.28871 1.9791l2.2438-0.3273-0.81826-1.9018-1.7143 0.25zm3.6933-0.5387 0.81826 1.9018 1.9791-0.2887-0.81826-1.9018-1.9791 0.2887zm3.9581-0.5775 0.81826 1.9018 1.9791-0.2887-0.81826-1.9018-1.9791 0.2887zm3.9581-0.5774 0.81826 1.9018 1.7143-0.25-0.28871-1.9791-2.2438 0.3273z"/>
-<circle cx="3" cy="1049.4" r="2"/>
-<circle cx="13" cy="1049.4" r="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_play_start.svg b/editor/icons/dark/icon_play_start.svg
deleted file mode 100644
index 2b917aab27..0000000000
--- a/editor/icons/dark/icon_play_start.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m7.0001 1048.4v-8l7 4z" fill-rule="evenodd" stroke="#4f4f4f" stroke-linejoin="round" stroke-width="2"/>
-<path d="m3 1039.4c0.55226 1e-4 0.99994 0.4477 1 1v8c-5.5e-5 0.5523-0.44774 0.9999-1 1h-1v-1h-1v-8h1v-1z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<circle transform="scale(-1,1)" cx="-2" cy="1040.4" r="1"/>
-<circle transform="scale(-1,1)" cx="-2" cy="1048.4" r="1"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_play_start_backwards.svg b/editor/icons/dark/icon_play_start_backwards.svg
deleted file mode 100644
index 8fb7563169..0000000000
--- a/editor/icons/dark/icon_play_start_backwards.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m8.9999 1048.4v-8l-7 4z" fill-rule="evenodd" stroke="#4f4f4f" stroke-linejoin="round" stroke-width="2"/>
-<path d="m13 1039.4c-0.55226 1e-4 -0.99994 0.4477-1 1v8c5.5e-5 0.5523 0.44774 0.9999 1 1h1v-1h1v-8h-1v-1z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<circle cx="14" cy="1040.4" r="1"/>
-<circle cx="14" cy="1048.4" r="1"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_polygon_2_d.svg b/editor/icons/dark/icon_polygon_2_d.svg
deleted file mode 100644
index e1b5bc82aa..0000000000
--- a/editor/icons/dark/icon_polygon_2_d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m14 1050.4h-12v-12h12l-6 6z" fill="none" stroke="#6d90ff" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_polygon_path_finder.svg b/editor/icons/dark/icon_polygon_path_finder.svg
deleted file mode 100644
index d8e836b13b..0000000000
--- a/editor/icons/dark/icon_polygon_path_finder.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1c-0.55226 5.52e-5 -0.99994 0.44774-1 1v1h2v-2h-1zm3 0v2h2v-2h-2zm4 0v2h2v-2h-2zm4 0v2h1.4141l0.29297-0.29297c0.62956-0.62999 0.18361-1.7067-0.70703-1.707h-1zm-12 4v2h2v-2h-2zm11 2l-3 8 3-2 3 2-3-8zm-11 2v2h2v-2h-2zm0 4v1c5.52e-5 0.55226 0.44774 0.99994 1 1h1v-2h-2zm4 0v2h1.9023c-7.835e-4 -0.2513 0.043539-0.50069 0.13086-0.73633l0.47461-1.2637h-2.5078z" color="#000000" color-rendering="auto" fill="#4f4f4f" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_popup.svg b/editor/icons/dark/icon_popup.svg
deleted file mode 100644
index 1aa7da9c64..0000000000
--- a/editor/icons/dark/icon_popup.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2h-10zm4 2h2v6h-2v-6zm0 8h2v2h-2v-2z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_popup_dialog.svg b/editor/icons/dark/icon_popup_dialog.svg
deleted file mode 100644
index 5b6988d099..0000000000
--- a/editor/icons/dark/icon_popup_dialog.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.8954-2 2v1h14v-1c0-1.1046-0.89543-2-2-2h-10zm9 1h1v1h-1v-1zm-11 3v8c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.8954 2-2v-8h-14zm6 1h2v5h-2v-5zm0 6h2v2h-2v-2z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_popup_menu.svg b/editor/icons/dark/icon_popup_menu.svg
deleted file mode 100644
index 1f8f15f252..0000000000
--- a/editor/icons/dark/icon_popup_menu.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<path transform="translate(0 1036.4)" d="m2 6a1 1 0 0 0 -1 1v7a1 1 0 0 0 1 1h12a1 1 0 0 0 1 -1v-7a1 1 0 0 0 -1 -1h-12zm1 2h10v2h-10v-2zm0 3h10v2h-10v-2z"/>
-<path transform="translate(0 1036.4)" d="m1 1v4h6v-4h-6zm1 1h4l-2 2-2-2z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_popup_panel.svg b/editor/icons/dark/icon_popup_panel.svg
deleted file mode 100644
index 7955c624b3..0000000000
--- a/editor/icons/dark/icon_popup_panel.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<path transform="translate(0 1036.4)" d="m2 6c-0.55228 0-1 0.44772-1 1v7c0 0.55228 0.44772 1 1 1h12c0.55228 0 1-0.44772 1-1v-7c0-0.55228-0.44772-1-1-1z"/>
-<path transform="translate(0 1036.4)" d="m1 1v4h6v-4h-6zm1 1h4l-2 2-2-2z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_portal.svg b/editor/icons/dark/icon_portal.svg
deleted file mode 100644
index 58aa904305..0000000000
--- a/editor/icons/dark/icon_portal.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a5 7 0 0 0 -5 7 5 7 0 0 0 5 7 5 7 0 0 0 5 -7 5 7 0 0 0 -5 -7zm0 2a3 5 0 0 1 3 5 3 5 0 0 1 -3 5 3 5 0 0 1 -3 -5 3 5 0 0 1 3 -5z" fill="#ff5f5f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_position_2d.svg b/editor/icons/dark/icon_position_2d.svg
deleted file mode 100644
index 35bcb9b389..0000000000
--- a/editor/icons/dark/icon_position_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1v4h2v-4h-2zm-6 6v2h4v-2h-4zm10 0v2h4v-2h-4zm-4 4v4h2v-4h-2z" fill="#6d90ff" fill-opacity=".98824"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_position_3d.svg b/editor/icons/dark/icon_position_3d.svg
deleted file mode 100644
index 89cbe40ffc..0000000000
--- a/editor/icons/dark/icon_position_3d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1v4h2v-4h-2zm-6 6v2h4v-2h-4zm10 0v2h4v-2h-4zm-4 4v4h2v-4h-2z" fill="#ff5f5f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_prism_mesh.svg b/editor/icons/dark/icon_prism_mesh.svg
deleted file mode 100644
index c2a64904e9..0000000000
--- a/editor/icons/dark/icon_prism_mesh.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7.9824 1.002a1.0001 1.0001 0 0 0 -0.81445 0.44336l-5.9727 8.9609-0.027344 0.039062a1 1 0 0 0 -0.0625 0.10742 1 1 0 0 0 0.44727 1.3418l6 3a1.0001 1.0001 0 0 0 0.89453 0l6-3a1 1 0 0 0 0.44726 -1.3418 1 1 0 0 0 -0.0625 -0.10742l-6-9a1.0001 1.0001 0 0 0 -0.84961 -0.44336zm-0.98242 4.3008v7.0801l-3.5391-1.7715 3.5391-5.3086zm2 0l3.5391 5.3086-3.5391 1.7715v-7.0801z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#fea900" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_procedural_sky.svg b/editor/icons/dark/icon_procedural_sky.svg
deleted file mode 100644
index b3bc927409..0000000000
--- a/editor/icons/dark/icon_procedural_sky.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x1="8" x2="8" y1="1040.4" y2="1050.4" gradientUnits="userSpaceOnUse">
-<stop stop-color="#1ec3ff" offset="0"/>
-<stop stop-color="#b2e1ff" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1037.4)">
-<path d="m8 1040.4a7 7 0 0 0 -7 7 7 7 0 0 0 0.68555 3h12.631a7 7 0 0 0 0.68359 -3 7 7 0 0 0 -7 -7z" fill="url(#a)"/>
-<rect x="2" y="1047.4" width="3" height="2" ry="1" fill="#fff"/>
-<rect x="7" y="1045.4" width="4" height="2" ry="1" fill="#fff"/>
-<rect x="9" y="1044.4" width="4" height="2" ry="1" fill="#fff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_progress_1.svg b/editor/icons/dark/icon_progress_1.svg
deleted file mode 100644
index 8b2d9e8b45..0000000000
--- a/editor/icons/dark/icon_progress_1.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m9 1037.4v3.0547a4 4 0 0 1 1.0273 0.4258l2.1582-2.1582a7 7 0 0 0 -3.1855 -1.3223z" fill-opacity=".99608"/>
-<path d="m7 1037.4a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273 -0.4277v-3.0508z" fill-opacity=".19608"/>
-<path d="m2.4004 1040.2a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 0.42578 -1.0273l-2.1582-2.1582z" fill-opacity=".19608"/>
-<path d="m13.6 1040.2-2.1582 2.1582a4 4 0 0 1 0.42774 1.0273h3.0508a7 7 0 0 0 -1.3203 -3.1855z" fill-opacity=".19608"/>
-<path d="m1.0801 1045.4a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -0.42773 -1.0273h-3.0508z" fill-opacity=".19608"/>
-<path d="m11.867 1045.4a4 4 0 0 1 -0.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223 -3.1855h-3.0547z" fill-opacity=".19608"/>
-<path d="m5.9727 1047.8-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273 -0.4258z" fill-opacity=".19608"/>
-<path d="m10.027 1047.8a4 4 0 0 1 -1.0273 0.4277v3.0508a7 7 0 0 0 3.1855 -1.3203l-2.1582-2.1582z" fill-opacity=".19608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_progress_2.svg b/editor/icons/dark/icon_progress_2.svg
deleted file mode 100644
index 8f7c358ba1..0000000000
--- a/editor/icons/dark/icon_progress_2.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m9 1037.4v3.0547a4 4 0 0 1 1.0273 0.4258l2.1582-2.1582a7 7 0 0 0 -3.1855 -1.3223z" fill-opacity=".19608"/>
-<path d="m7 1037.4a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273 -0.4277v-3.0508z" fill-opacity=".19608"/>
-<path d="m2.4004 1040.2a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 0.42578 -1.0273l-2.1582-2.1582z" fill-opacity=".19608"/>
-<path d="m13.6 1040.2-2.1582 2.1582a4 4 0 0 1 0.42774 1.0273h3.0508a7 7 0 0 0 -1.3203 -3.1855z" fill-opacity=".99608"/>
-<path d="m1.0801 1045.4a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -0.42773 -1.0273h-3.0508z" fill-opacity=".19608"/>
-<path d="m11.867 1045.4a4 4 0 0 1 -0.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223 -3.1855h-3.0547z" fill-opacity=".19608"/>
-<path d="m5.9727 1047.8-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273 -0.4258z" fill-opacity=".19608"/>
-<path d="m10.027 1047.8a4 4 0 0 1 -1.0273 0.4277v3.0508a7 7 0 0 0 3.1855 -1.3203l-2.1582-2.1582z" fill-opacity=".19608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_progress_3.svg b/editor/icons/dark/icon_progress_3.svg
deleted file mode 100644
index 78bd84d642..0000000000
--- a/editor/icons/dark/icon_progress_3.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m9 1037.4v3.0547a4 4 0 0 1 1.0273 0.4258l2.1582-2.1582a7 7 0 0 0 -3.1855 -1.3223z" fill-opacity=".19608"/>
-<path d="m7 1037.4a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273 -0.4277v-3.0508z" fill-opacity=".19608"/>
-<path d="m2.4004 1040.2a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 0.42578 -1.0273l-2.1582-2.1582z" fill-opacity=".19608"/>
-<path d="m13.6 1040.2-2.1582 2.1582a4 4 0 0 1 0.42774 1.0273h3.0508a7 7 0 0 0 -1.3203 -3.1855z" fill-opacity=".19608"/>
-<path d="m1.0801 1045.4a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -0.42773 -1.0273h-3.0508z" fill-opacity=".19608"/>
-<path d="m11.867 1045.4a4 4 0 0 1 -0.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223 -3.1855h-3.0547z" fill-opacity=".99608"/>
-<path d="m5.9727 1047.8-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273 -0.4258z" fill-opacity=".19608"/>
-<path d="m10.027 1047.8a4 4 0 0 1 -1.0273 0.4277v3.0508a7 7 0 0 0 3.1855 -1.3203l-2.1582-2.1582z" fill-opacity=".19608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_progress_4.svg b/editor/icons/dark/icon_progress_4.svg
deleted file mode 100644
index 7283ad79cb..0000000000
--- a/editor/icons/dark/icon_progress_4.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m9 1037.4v3.0547a4 4 0 0 1 1.0273 0.4258l2.1582-2.1582a7 7 0 0 0 -3.1855 -1.3223z" fill-opacity=".19608"/>
-<path d="m7 1037.4a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273 -0.4277v-3.0508z" fill-opacity=".19608"/>
-<path d="m2.4004 1040.2a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 0.42578 -1.0273l-2.1582-2.1582z" fill-opacity=".19608"/>
-<path d="m13.6 1040.2-2.1582 2.1582a4 4 0 0 1 0.42774 1.0273h3.0508a7 7 0 0 0 -1.3203 -3.1855z" fill-opacity=".19608"/>
-<path d="m1.0801 1045.4a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -0.42773 -1.0273h-3.0508z" fill-opacity=".19608"/>
-<path d="m11.867 1045.4a4 4 0 0 1 -0.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223 -3.1855h-3.0547z" fill-opacity=".19608"/>
-<path d="m5.9727 1047.8-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273 -0.4258z" fill-opacity=".19608"/>
-<path d="m10.027 1047.8a4 4 0 0 1 -1.0273 0.4277v3.0508a7 7 0 0 0 3.1855 -1.3203l-2.1582-2.1582z" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_progress_5.svg b/editor/icons/dark/icon_progress_5.svg
deleted file mode 100644
index 2651292260..0000000000
--- a/editor/icons/dark/icon_progress_5.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m9 1037.4v3.0547a4 4 0 0 1 1.0273 0.4258l2.1582-2.1582a7 7 0 0 0 -3.1855 -1.3223z" fill-opacity=".19608"/>
-<path d="m7 1037.4a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273 -0.4277v-3.0508z" fill-opacity=".19608"/>
-<path d="m2.4004 1040.2a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 0.42578 -1.0273l-2.1582-2.1582z" fill-opacity=".19608"/>
-<path d="m13.6 1040.2-2.1582 2.1582a4 4 0 0 1 0.42774 1.0273h3.0508a7 7 0 0 0 -1.3203 -3.1855z" fill-opacity=".19608"/>
-<path d="m1.0801 1045.4a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -0.42773 -1.0273h-3.0508z" fill-opacity=".19608"/>
-<path d="m11.867 1045.4a4 4 0 0 1 -0.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223 -3.1855h-3.0547z" fill-opacity=".19608"/>
-<path d="m5.9727 1047.8-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273 -0.4258z" fill-opacity=".99608"/>
-<path d="m10.027 1047.8a4 4 0 0 1 -1.0273 0.4277v3.0508a7 7 0 0 0 3.1855 -1.3203l-2.1582-2.1582z" fill-opacity=".19608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_progress_6.svg b/editor/icons/dark/icon_progress_6.svg
deleted file mode 100644
index 1b44ececc5..0000000000
--- a/editor/icons/dark/icon_progress_6.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m9 1037.4v3.0547a4 4 0 0 1 1.0273 0.4258l2.1582-2.1582a7 7 0 0 0 -3.1855 -1.3223z" fill-opacity=".19608"/>
-<path d="m7 1037.4a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273 -0.4277v-3.0508z" fill-opacity=".19608"/>
-<path d="m2.4004 1040.2a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 0.42578 -1.0273l-2.1582-2.1582z" fill-opacity=".19608"/>
-<path d="m13.6 1040.2-2.1582 2.1582a4 4 0 0 1 0.42774 1.0273h3.0508a7 7 0 0 0 -1.3203 -3.1855z" fill-opacity=".19608"/>
-<path d="m1.0801 1045.4a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -0.42773 -1.0273h-3.0508z" fill-opacity=".99608"/>
-<path d="m11.867 1045.4a4 4 0 0 1 -0.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223 -3.1855h-3.0547z" fill-opacity=".19608"/>
-<path d="m5.9727 1047.8-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273 -0.4258z" fill-opacity=".19608"/>
-<path d="m10.027 1047.8a4 4 0 0 1 -1.0273 0.4277v3.0508a7 7 0 0 0 3.1855 -1.3203l-2.1582-2.1582z" fill-opacity=".19608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_progress_7.svg b/editor/icons/dark/icon_progress_7.svg
deleted file mode 100644
index 7560a605fb..0000000000
--- a/editor/icons/dark/icon_progress_7.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m9 1037.4v3.0547a4 4 0 0 1 1.0273 0.4258l2.1582-2.1582a7 7 0 0 0 -3.1855 -1.3223z" fill-opacity=".19608"/>
-<path d="m7 1037.4a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273 -0.4277v-3.0508z" fill-opacity=".19608"/>
-<path d="m2.4004 1040.2a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 0.42578 -1.0273l-2.1582-2.1582z" fill-opacity=".99608"/>
-<path d="m13.6 1040.2-2.1582 2.1582a4 4 0 0 1 0.42774 1.0273h3.0508a7 7 0 0 0 -1.3203 -3.1855z" fill-opacity=".19608"/>
-<path d="m1.0801 1045.4a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -0.42773 -1.0273h-3.0508z" fill-opacity=".19608"/>
-<path d="m11.867 1045.4a4 4 0 0 1 -0.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223 -3.1855h-3.0547z" fill-opacity=".19608"/>
-<path d="m5.9727 1047.8-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273 -0.4258z" fill-opacity=".19608"/>
-<path d="m10.027 1047.8a4 4 0 0 1 -1.0273 0.4277v3.0508a7 7 0 0 0 3.1855 -1.3203l-2.1582-2.1582z" fill-opacity=".19608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_progress_8.svg b/editor/icons/dark/icon_progress_8.svg
deleted file mode 100644
index d98826dfba..0000000000
--- a/editor/icons/dark/icon_progress_8.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m9 1037.4v3.0547a4 4 0 0 1 1.0273 0.4258l2.1582-2.1582a7 7 0 0 0 -3.1855 -1.3223z" fill-opacity=".19608"/>
-<path d="m7 1037.4a7 7 0 0 0 -3.1855 1.3203l2.1582 2.1582a4 4 0 0 1 1.0273 -0.4277v-3.0508z" fill-opacity=".99608"/>
-<path d="m2.4004 1040.2a7 7 0 0 0 -1.3223 3.1855h3.0547a4 4 0 0 1 0.42578 -1.0273l-2.1582-2.1582z" fill-opacity=".19608"/>
-<path d="m13.6 1040.2-2.1582 2.1582a4 4 0 0 1 0.42774 1.0273h3.0508a7 7 0 0 0 -1.3203 -3.1855z" fill-opacity=".19608"/>
-<path d="m1.0801 1045.4a7 7 0 0 0 1.3203 3.1855l2.1582-2.1582a4 4 0 0 1 -0.42773 -1.0273h-3.0508z" fill-opacity=".19608"/>
-<path d="m11.867 1045.4a4 4 0 0 1 -0.42578 1.0273l2.1582 2.1582a7 7 0 0 0 1.3223 -3.1855h-3.0547z" fill-opacity=".19608"/>
-<path d="m5.9727 1047.8-2.1582 2.1582a7 7 0 0 0 3.1855 1.3223v-3.0547a4 4 0 0 1 -1.0273 -0.4258z" fill-opacity=".19608"/>
-<path d="m10.027 1047.8a4 4 0 0 1 -1.0273 0.4277v3.0508a7 7 0 0 0 3.1855 -1.3203l-2.1582-2.1582z" fill-opacity=".19608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_progress_bar.svg b/editor/icons/dark/icon_progress_bar.svg
deleted file mode 100644
index 3da8ff43b8..0000000000
--- a/editor/icons/dark/icon_progress_bar.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<path transform="translate(0 1036.4)" d="m3 3c-1.1046 0-2 0.89543-2 2v6c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-6c0-1.1046-0.89543-2-2-2zm0 2h10v6h-10z"/>
-<rect x="4" y="1042.4" width="1" height="4"/>
-<rect x="6" y="1042.4" width="1" height="4"/>
-<rect x="8" y="1042.4" width="1" height="4"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_proximity_group.svg b/editor/icons/dark/icon_proximity_group.svg
deleted file mode 100644
index 32145798e3..0000000000
--- a/editor/icons/dark/icon_proximity_group.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff5f5f" fill-opacity=".99608">
-<rect x="1" y="1037.4" width="2" height="14"/>
-<rect x="1" y="1037.4" width="14" height="2"/>
-<rect transform="scale(-1)" x="-15" y="-1051.4" width="2" height="14"/>
-<rect transform="scale(-1)" x="-15" y="-1051.4" width="14" height="2"/>
-<circle cx="10.5" cy="1041.9" r="1.5"/>
-<circle cx="5.5" cy="1046.9" r="1.5"/>
-<circle cx="10.5" cy="1046.9" r="1.5"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_quad.svg b/editor/icons/dark/icon_quad.svg
deleted file mode 100644
index 6d8c149558..0000000000
--- a/editor/icons/dark/icon_quad.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 1v2 10 2h2 12v-2-12h-12-2zm3.4141 2h8.5859v8.5859l-8.5859-8.5859zm-1.4141 1.4141l8.5859 8.5859h-8.5859v-8.5859z" fill="#ff5f5f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_quad_mesh.svg b/editor/icons/dark/icon_quad_mesh.svg
deleted file mode 100644
index cf7ba9ac0d..0000000000
--- a/editor/icons/dark/icon_quad_mesh.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m15 1037.4v14h-14v-14zm-2 2h-8.5859l8.5859 8.5859zm-10 1.4141v8.5859h8.5859z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#fea900" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_quat.svg b/editor/icons/dark/icon_quat.svg
deleted file mode 100644
index c5c9006d66..0000000000
--- a/editor/icons/dark/icon_quat.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path transform="translate(0 1036.4)" d="m7 1v6h2v-6h-2zm0 12v2h2v-2h-2z"/>
-<path d="m11 1039.8v2.0137a5 2 0 0 1 2 1.5957 5 2 0 0 1 -5 2 5 2 0 0 1 -5 -2 5 2 0 0 1 2 -1.5977v-2.0097a7 4 0 0 0 -4 3.6074 7 4 0 0 0 7 4 7 4 0 0 0 7 -4 7 4 0 0 0 -4 -3.6094z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_range.svg b/editor/icons/dark/icon_range.svg
deleted file mode 100644
index e19ab80f7d..0000000000
--- a/editor/icons/dark/icon_range.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<rect x="1" y="1039.4" width="2" height="10"/>
-<rect x="1" y="1043.4" width="13" height="2"/>
-<rect x="13" y="1039.4" width="2" height="10"/>
-<rect x="5" y="1041.4" width="2" height="6"/>
-<rect x="9" y="1041.4" width="2" height="6"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_rating_no_star.svg b/editor/icons/dark/icon_rating_no_star.svg
deleted file mode 100644
index d81408b637..0000000000
--- a/editor/icons/dark/icon_rating_no_star.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<g fill="#c3ae65">
-<path transform="translate(0 1036.4)" d="m8 1.7246-2.375 4.0977-4.625 1.0977 3.2363 3.4063-0.35938 4.6738 4.1387-1.9766 4.1582 1.9414-0.39648-4.6523 3.2227-3.3926-4.625-1.0977z" fill="#fea900" fill-opacity=".58824"/>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_rating_star.svg b/editor/icons/dark/icon_rating_star.svg
deleted file mode 100644
index 3a1e344d4b..0000000000
--- a/editor/icons/dark/icon_rating_star.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m8 1038.1-2.3741 4.0973-4.6259 1.0978l3.2361 3.4074-0.35866 4.6735 4.1389-1.9766 4.1572 1.9421-0.39534-4.6532 3.2218-3.3932-4.6259-1.0978-2.3741-4.0973z" fill="#fea900"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_ray_cast.svg b/editor/icons/dark/icon_ray_cast.svg
deleted file mode 100644
index 656c02d018..0000000000
--- a/editor/icons/dark/icon_ray_cast.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff5f5f" fill-opacity=".99608">
-<rect x="7" y="1037.4" width="2" height="9"/>
-<path d="m4 1046.4h8l-4 5z" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_ray_cast_2d.svg b/editor/icons/dark/icon_ray_cast_2d.svg
deleted file mode 100644
index 434d8cc62a..0000000000
--- a/editor/icons/dark/icon_ray_cast_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1v9h-3l4 5 4-5h-3v-9h-2z" fill="#6d90ff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_ray_shape.svg b/editor/icons/dark/icon_ray_shape.svg
deleted file mode 100644
index 4591b0a3f9..0000000000
--- a/editor/icons/dark/icon_ray_shape.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill-rule="evenodd">
-<path d="m8 1051.4-2-2v-7l2 2z" fill="#a2d2ff"/>
-<path d="m8 1047.9-2-1.5v-4l2 2z" fill="#2998ff"/>
-<path d="m8 1037.4-6 5 6 4z" fill="#a2d2ff"/>
-<path d="m8 1051.4 2-2v-7l-2 2z" fill="#2998ff"/>
-<path d="m8 1037.4 6 5-6 4z" fill="#2998ff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_ray_shape_2d.svg b/editor/icons/dark/icon_ray_shape_2d.svg
deleted file mode 100644
index 89533b8407..0000000000
--- a/editor/icons/dark/icon_ray_shape_2d.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="none" stroke="#68b6ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
-<path d="m8 1038.4v12"/>
-<path d="m5 1047.4 3 3 3-3"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_rayito.svg b/editor/icons/dark/icon_rayito.svg
deleted file mode 100644
index 4e1e90eaf9..0000000000
--- a/editor/icons/dark/icon_rayito.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#fea900">
-<rect transform="matrix(1 0 -.14142 .98995 0 0)" x="152.19" y="1047.9" width="7" height="7.0711"/>
-<path d="m6 1043.4h8l-9 8z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_real.svg b/editor/icons/dark/icon_real.svg
deleted file mode 100644
index 68f477f727..0000000000
--- a/editor/icons/dark/icon_real.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)" fill="#cf68ea">
-<rect x="3" y="1040.4" width="2" height="11"/>
-<rect x="3" y="1039.4" width="4" height="2"/>
-<path transform="translate(0 1038.4)" d="m7 1v2a2 2 0 0 1 2 2 2 2 0 0 1 -2 2v2a4 4 0 0 0 4 -4 4 4 0 0 0 -4 -4z"/>
-<rect x="3" y="1045.4" width="4" height="2"/>
-<rect transform="rotate(90)" x="1049.4" y="-12" width="2" height="2"/>
-<path transform="translate(0 1038.4)" d="m8 7v2a2 2 0 0 1 2 2h2a4 4 0 0 0 -4 -4z"/>
-<rect transform="rotate(90)" x="1045.4" y="-8" width="2" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_rectangle_shape_2d.svg b/editor/icons/dark/icon_rectangle_shape_2d.svg
deleted file mode 100644
index d5cf89f5dc..0000000000
--- a/editor/icons/dark/icon_rectangle_shape_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="2" y="1040.4" width="12" height="8" rx="1.7383e-5" ry="1.7383e-5" color="#000000" fill="none" stroke="#68b6ff" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_reference_rect.svg b/editor/icons/dark/icon_reference_rect.svg
deleted file mode 100644
index 0bc52b44c8..0000000000
--- a/editor/icons/dark/icon_reference_rect.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<rect x="1" y="1037.4" width="2" height="2"/>
-<rect x="13" y="1037.4" width="2" height="2"/>
-<rect x="4" y="1037.4" width="8" height="2"/>
-<rect x="4" y="1049.4" width="8" height="2"/>
-<rect x="13" y="1049.4" width="2" height="2"/>
-<rect x="1" y="1049.4" width="2" height="2"/>
-<rect transform="rotate(90)" x="1040.4" y="-3" width="8" height="2"/>
-<rect transform="rotate(90)" x="1040.4" y="-15" width="8" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_reflection_probe.svg b/editor/icons/dark/icon_reflection_probe.svg
deleted file mode 100644
index daafbff1ea..0000000000
--- a/editor/icons/dark/icon_reflection_probe.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7.9629 1.002a1.0001 1.0001 0 0 0 -0.41016 0.10352l-6 3a1.0001 1.0001 0 0 0 -0.55273 0.89453v6a1.0001 1.0001 0 0 0 0.55273 0.89453l6 3a1.0001 1.0001 0 0 0 0.89453 0l6-3a1.0001 1.0001 0 0 0 0.55273 -0.89453v-6a1.0001 1.0001 0 0 0 -0.55273 -0.89453l-6-3a1.0001 1.0001 0 0 0 -0.48438 -0.10352zm-0.96289 2.6172v8.7637l-4-2v-4.7637l4-2zm2 0l4 2v4.7637l-4 2v-8.7637z" color="#000000" color-rendering="auto" fill="#ff5f5f" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_region_edit.svg b/editor/icons/dark/icon_region_edit.svg
deleted file mode 100644
index 4cd5fcb8ad..0000000000
--- a/editor/icons/dark/icon_region_edit.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<rect x="6" y="1042.4" width="6" height="6"/>
-<rect x="6" y="1037.4" width="6" height="4" fill-opacity=".32549"/>
-<rect x="1" y="1037.4" width="4" height="4" fill-opacity=".32549"/>
-<rect x="1" y="1042.4" width="4" height="6" fill-opacity=".32549"/>
-<rect x="1" y="1049.4" width="4" height="2" fill-opacity=".32549"/>
-<rect x="6" y="1049.4" width="6" height="2" fill-opacity=".32549"/>
-<rect x="13" y="1042.4" width="2" height="6" fill-opacity=".32549"/>
-<rect x="13" y="1037.4" width="2" height="4" fill-opacity=".32549"/>
-<rect x="13" y="1049.4" width="2" height="2" fill-opacity=".32549"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_reload.svg b/editor/icons/dark/icon_reload.svg
deleted file mode 100644
index 4c5f0e7dbc..0000000000
--- a/editor/icons/dark/icon_reload.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m9 2a6 6 0 0 0 -6 6h2a4 4 0 0 1 4 -4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6 -6 6 6 0 0 0 -6 -6z"/>
-<path transform="matrix(0 -1.1926 1.5492 0 -1617 1049.3)" d="m4.118 1048.3-1.6771-0.9683-1.6771-0.9682 1.6771-0.9683 1.6771-0.9682-1e-7 1.9365z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_reload_small.svg b/editor/icons/dark/icon_reload_small.svg
deleted file mode 100644
index 5de3537136..0000000000
--- a/editor/icons/dark/icon_reload_small.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="14" height="14" version="1.1" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1038.4)" fill="#4f4f4f" fill-opacity=".99608">
-<path d="m8 1039.4a6 6 0 0 0 -6 6h2a4 4 0 0 1 4 -4 4 4 0 0 1 4 4 4 4 0 0 1 -4 4v2a6 6 0 0 0 6 -6 6 6 0 0 0 -6 -6z"/>
-<path transform="matrix(0 -1.1926 1.5492 0 -1618 1050.3)" d="m4.118 1048.3-1.6771-0.9683-1.6771-0.9682 1.6771-0.9683 1.6771-0.9682-1e-7 1.9365z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_remote.svg b/editor/icons/dark/icon_remote.svg
deleted file mode 100644
index 5381ba07da..0000000000
--- a/editor/icons/dark/icon_remote.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<circle cx="8" cy="1043.4" r="2"/>
-<rect x="7" y="1044.4" width="2" height="7"/>
-<path transform="translate(0 1036.4)" d="m8.0879 1a6 6 0 0 0 -4.3301 1.7578 6 6 0 0 0 0 8.4844l1.416-1.416a4 4 0 0 1 -1.1738 -2.8262 4 4 0 0 1 4 -4 4 4 0 0 1 4 4 4 4 0 0 1 -1.1738 2.8262l1.416 1.416a6 6 0 0 0 0 -8.4844 6 6 0 0 0 -4.1543 -1.7578z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_remote_transform.svg b/editor/icons/dark/icon_remote_transform.svg
deleted file mode 100644
index cfeadc9bd2..0000000000
--- a/editor/icons/dark/icon_remote_transform.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m12 1047.4a4 4 0 0 1 -2 3.4641 4 4 0 0 1 -4 0 4 4 0 0 1 -2 -3.4641h4z" fill="#ff5f5f"/>
-<rect x="7" y="1045.4" width="2" height="4" ry="1" fill="#ff5f5f"/>
-<path d="m1.9378 1041.9a7 7 0 0 1 6.0622 -3.5 7 7 0 0 1 6.0622 3.5" fill="none" stroke="#ff5f5f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-<path d="m5.1022 1044.6a3 3 0 0 1 2.8978 -2.2235 3 3 0 0 1 2.8978 2.2235" fill="none" stroke="#ff5f5f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_remote_transform_2d.svg b/editor/icons/dark/icon_remote_transform_2d.svg
deleted file mode 100644
index 443a21382b..0000000000
--- a/editor/icons/dark/icon_remote_transform_2d.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m12 1047.4a4 4 0 0 1 -2 3.4641 4 4 0 0 1 -4 0 4 4 0 0 1 -2 -3.4641h4z" fill="#6d90ff" fill-opacity=".98824"/>
-<rect x="7" y="1045.4" width="2" height="4" ry="1" fill="#6d90ff" fill-opacity=".98824"/>
-<path d="m1.9378 1041.9a7 7 0 0 1 6.0622 -3.5 7 7 0 0 1 6.0622 3.5" fill="none" stroke="#6d90ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-<path d="m5.1022 1044.6a3 3 0 0 1 2.8978 -2.2235 3 3 0 0 1 2.8978 2.2235" fill="none" stroke="#6d90ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_remove.svg b/editor/icons/dark/icon_remove.svg
deleted file mode 100644
index 4d461e251e..0000000000
--- a/editor/icons/dark/icon_remove.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m2 5v8a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2v-8h-12zm1 2h2v6h-2v-6zm4 0h2v6h-2v-6zm4 0h2v6h-2v-6z"/>
-<rect x="1" y="1038.4" width="14" height="2"/>
-<rect x="5" y="1037.4" width="6" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_rename.svg b/editor/icons/dark/icon_rename.svg
deleted file mode 100644
index 3c013a4e3b..0000000000
--- a/editor/icons/dark/icon_rename.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m5 2v2h2v8h-2v2h2c0.55228 0 1-0.4477 1-1 0 0.5523 0.44772 1 1 1h2v-2h-2v-8h2v-2h-2c-0.55228 0-1 0.44772-1 1 0-0.55228-0.44772-1-1-1h-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_reparent.svg b/editor/icons/dark/icon_reparent.svg
deleted file mode 100644
index 03094ad341..0000000000
--- a/editor/icons/dark/icon_reparent.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 2a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v5.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h6.541a2 2 0 0 0 1.7285 1 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -0.72852 -0.73047v-5.541a2 2 0 0 0 1 -1.7285 2 2 0 0 0 -2 -2z" fill="#4f4f4f"/>
-<path transform="translate(0 1036.4)" d="m9 1l-4 3 4 3v-2a3 3 0 0 1 3 3v2h2v-2a5 5 0 0 0 -5 -5v-2z" fill="#00f010"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_resource_preloader.svg b/editor/icons/dark/icon_resource_preloader.svg
deleted file mode 100644
index c7d0b1b542..0000000000
--- a/editor/icons/dark/icon_resource_preloader.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<g fill="#4f4f4f" fill-rule="evenodd">
-<path transform="translate(0 1036.4)" d="m7.9629 1.002a1.0001 1.0001 0 0 0 -0.41016 0.10352l-6 3a1.0001 1.0001 0 0 0 -0.55273 0.89453v6a1.0001 1.0001 0 0 0 0.55273 0.89453l6 3a1.0001 1.0001 0 0 0 0.89453 0l6-3a1.0001 1.0001 0 0 0 0.55273 -0.89453v-6a1.0001 1.0001 0 0 0 -0.55273 -0.89453l-6-3a1.0001 1.0001 0 0 0 -0.48438 -0.10352zm0.037109 2.1172l3.7637 1.8809-3.7637 1.8828-3.7637-1.8828 3.7637-1.8809zm-5 3.5l4 2v3.7637l-4-2v-3.7637zm10 0v3.7637l-4 2v-3.7637l4-2z" color="#000000" color-rendering="auto" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<path d="m11 1042.4-6-3-3 2 6 3z"/>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_rich_text_label.svg b/editor/icons/dark/icon_rich_text_label.svg
deleted file mode 100644
index 531909d92f..0000000000
--- a/editor/icons/dark/icon_rich_text_label.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<rect x="1" y="1037.4" width="8" height="2"/>
-<rect x="1" y="1041.4" width="2" height="2"/>
-<rect x="5" y="1041.4" width="4" height="2"/>
-<rect x="1" y="1045.4" width="8" height="2"/>
-<rect x="1" y="1049.4" width="4" height="2"/>
-<rect x="7" y="1049.4" width="2" height="2"/>
-<path d="m12 1048.4h-2l3 3 3-3h-2v-8h2l-3-3-3 3h2z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_rigid_body.svg b/editor/icons/dark/icon_rigid_body.svg
deleted file mode 100644
index 87fff0b0e4..0000000000
--- a/editor/icons/dark/icon_rigid_body.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff5f5f" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 0.035156 0.69922 7 7 0 0 0 0.27734 1.3691 7 7 0 0 0 0.91016 1.8848 7 7 0 0 0 0.30273 0.4082c7.85e-4 -0.00256 0.0011667-0.005252 0.0019532-0.007812a7 7 0 0 0 5.4727 2.6465 7 7 0 0 0 3.2422 -0.80273c0.001375 3.93e-4 0.002531 0.00156 0.003906 0.001953a7 7 0 0 0 0.035156 -0.021485 7 7 0 0 0 0.42578 -0.25 7 7 0 0 0 0.16992 -0.10352 7 7 0 0 0 0.36914 -0.26953 7 7 0 0 0 0.20508 -0.15625 7 7 0 0 0 0.3418 -0.30859 7 7 0 0 0 0.16406 -0.1543 7 7 0 0 0 0.33008 -0.36133 7 7 0 0 0 0.14062 -0.16016 7 7 0 0 0 0.27734 -0.37305 7 7 0 0 0 0.13867 -0.19531 7 7 0 0 0 0.21875 -0.36133 7 7 0 0 0 0.14258 -0.25 7 7 0 0 0 0.15625 -0.33398 7 7 0 0 0 0.13867 -0.31055 7 7 0 0 0 0.10742 -0.30859 7 7 0 0 0 0.11914 -0.35352 7 7 0 0 0 0.087891 -0.36914 7 7 0 0 0 0.066406 -0.29297 7 7 0 0 0 0.056641 -0.40039 7 7 0 0 0 0.037109 -0.3125 7 7 0 0 0 0.025391 -0.55273 7 7 0 0 0 -4.3848 -6.4883 7 7 0 0 0 -0.007812 -0.0039063 7 7 0 0 0 -0.001953 0 7 7 0 0 0 -0.61523 -0.21289 7 7 0 0 0 -0.044922 -0.015625 7 7 0 0 0 -0.0058594 -0.0019531 7 7 0 0 0 -0.55078 -0.13086 7 7 0 0 0 -0.14062 -0.03125 7 7 0 0 0 -0.55078 -0.072266 7 7 0 0 0 -0.14258 -0.017578 7 7 0 0 0 -0.55469 -0.025391zm1.9512 1.334a6 6 0 0 1 4.0488 5.666h-7a2 2 0 0 1 -0.94922 1.6992c1.345 2.0268 2.6013 3.2645 3.8965 3.9688a6 6 0 0 1 -1.9473 0.33203 6 6 0 0 1 -5.0547 -2.7695c0.23771-0.5785 0.50336-1.1403 0.82617-1.6563a2 2 0 0 1 -0.77148 -1.5742h-1a6 6 0 0 1 1.123 -3.4863c0.14632 0.65093 0.35776 1.2833 0.68359 1.8848a2 2 0 0 1 1.1934 -0.39844 2 2 0 0 1 1.0508 0.30078c1.3464-2.0289 2.6038-3.2631 3.9004-3.9668z"/>
-<circle cx="5" cy="1044.4" r="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_rigid_body_2d.svg b/editor/icons/dark/icon_rigid_body_2d.svg
deleted file mode 100644
index 5e88969b81..0000000000
--- a/editor/icons/dark/icon_rigid_body_2d.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m8 1037.4a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm0 1a6 6 0 0 1 6 6 6 6 0 0 1 -6 6 6 6 0 0 1 -6 -6 6 6 0 0 1 6 -6z" fill="#6d90ff" fill-opacity=".98824"/>
-<path d="m8 1037.4a7 7 0 0 0 -5.0879 2.2051c0.10495 1.1207 0.35417 2.1959 0.89453 3.1933a2 2 0 0 1 1.1934 -0.3984 2 2 0 0 1 1.0508 0.3008c1.7873-2.6932 3.4181-3.9904 5.1914-4.4981a7 7 0 0 0 -3.2422 -0.8027zm-7 7a7 7 0 0 0 1.5254 4.3613c0.30281-0.9877 0.71628-1.9403 1.2461-2.7871a2 2 0 0 1 -0.77148 -1.5742h-2zm6 0a2 2 0 0 1 -0.94922 1.6992c1.7887 2.6953 3.4204 3.9932 5.1953 4.5a7 7 0 0 0 3.7539 -6.1992h-8z" fill="#6d90ff" fill-opacity=".98824"/>
-<circle cx="5" cy="1044.4" r="2" fill="#6d90ff" fill-opacity=".98824"/>
-<path d="m45 1037.4a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm0 1a6 6 0 0 1 6 6 6 6 0 0 1 -6 6 6 6 0 0 1 -6 -6 6 6 0 0 1 6 -6z" fill="#6d90ff" fill-opacity=".98824"/>
-<path d="m38 1044.4c5 0.01 9 0.01 14 0-2-2.9934-5-4-7-4s-5 1.0066-7 4z" fill="#6d90ff" fill-opacity=".98824" fill-rule="evenodd"/>
-<path d="m38 1044.4c0 3.866 3.134 7 7 7s7-3.134 7-7c-2 2.9933-5 4-7 4s-5-1.0067-7-4z" fill="#a3b6f2"/>
-<path d="m-9 1037.4a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm0 1a6 6 0 0 1 6 6 6 6 0 0 1 -6 6 6 6 0 0 1 -6 -6 6 6 0 0 1 6 -6z" fill="#a3b6f2"/>
-<circle cx="-9" cy="1044.4" r="2" fill="#a3b6f2"/>
-<path d="m-9 1037.4a7 7 0 0 0 -3.5 0.9375l3.5 6.0625 3.5-6.0625a7 7 0 0 0 -3.5 -0.9375zm0 7 3.5 6.0625a7 7 0 0 0 2.5625 -2.5625 7 7 0 0 0 0.9375 -3.5h-7zh-7a7 7 0 0 0 0.9375 3.5 7 7 0 0 0 2.5625 2.5625l3.5-6.0625z" fill="#a3b6f2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_room.svg b/editor/icons/dark/icon_room.svg
deleted file mode 100644
index d5d32f35d0..0000000000
--- a/editor/icons/dark/icon_room.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7.9629 1.002a1.0001 1.0001 0 0 0 -0.41016 0.10352l-6 3a1.0001 1.0001 0 0 0 -0.55273 0.89453v6a1.0001 1.0001 0 0 0 0.55273 0.89453l6 3a1.0001 1.0001 0 0 0 0.89453 0l6-3a1.0001 1.0001 0 0 0 0.55273 -0.89453v-6a1.0001 1.0001 0 0 0 -0.55273 -0.89453l-6-3a1.0001 1.0001 0 0 0 -0.48438 -0.10352zm1.0371 2.6172l4 2v3.7637l-4-2v-3.7637zm-1 5.5l3.7637 1.8809-3.7637 1.8828-3.7637-1.8828 3.7637-1.8809z" color="#000000" color-rendering="auto" fill="#ff5f5f" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_room_bounds.svg b/editor/icons/dark/icon_room_bounds.svg
deleted file mode 100644
index 505b10aebf..0000000000
--- a/editor/icons/dark/icon_room_bounds.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 1v1 1h1v-1h1v-1h-1-1zm12 0v1h1v1h1v-1-1h-1-1zm-5.0371 0.0019531a1.0001 1.0001 0 0 0 -0.41016 0.10352l-6 3a1.0001 1.0001 0 0 0 -0.55273 0.89453v6a1.0001 1.0001 0 0 0 0.55273 0.89453l6 3a1.0001 1.0001 0 0 0 0.89453 0l6-3a1.0001 1.0001 0 0 0 0.55273 -0.89453v-6a1.0001 1.0001 0 0 0 -0.55273 -0.89453l-6-3a1.0001 1.0001 0 0 0 -0.48438 -0.10352zm1.0371 2.6172l4 2v3.7637l-4-2v-3.7637zm-1 5.5l3.7637 1.8809-3.7637 1.8828-3.7637-1.8828 3.7637-1.8809zm-7 3.8809v1 1h1 1v-1h-1v-1h-1zm13 0v1h-1v1h1 1v-1-1h-1z" color="#000000" color-rendering="auto" fill="#4f4f4f" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_rotate_0.svg b/editor/icons/dark/icon_rotate_0.svg
deleted file mode 100644
index 0afebb7d1e..0000000000
--- a/editor/icons/dark/icon_rotate_0.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<rect x="7" y="1038.4" width="2" height="7"/>
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm0 2a5 5 0 0 1 5 5 5 5 0 0 1 -5 5 5 5 0 0 1 -5 -5 5 5 0 0 1 5 -5z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_rotate_180.svg b/editor/icons/dark/icon_rotate_180.svg
deleted file mode 100644
index e6d2d8806a..0000000000
--- a/editor/icons/dark/icon_rotate_180.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m8 1038.4a6 6 0 0 1 6 6h-6z"/>
-<rect x="7" y="1038.4" width="2" height="7"/>
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm0 2a5 5 0 0 1 5 5 5 5 0 0 1 -5 5 5 5 0 0 1 -5 -5 5 5 0 0 1 5 -5z"/>
-<rect transform="scale(-1)" x="-9" y="-1050.4" width="2" height="7"/>
-<path d="m14 1044.4a6 6 0 0 1 -6 6v-6z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_rotate_270.svg b/editor/icons/dark/icon_rotate_270.svg
deleted file mode 100644
index 0b1ac39651..0000000000
--- a/editor/icons/dark/icon_rotate_270.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m8 1038.4a6 6 0 0 1 6 6h-6z"/>
-<rect x="7" y="1038.4" width="2" height="7"/>
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm0 2a5 5 0 0 1 5 5 5 5 0 0 1 -5 5 5 5 0 0 1 -5 -5 5 5 0 0 1 5 -5z"/>
-<rect transform="rotate(-90)" x="-1045.4" y="2" width="2" height="7"/>
-<path d="m8 1050.4a6 6 0 0 1 -6 -6h6z"/>
-<path d="m14 1044.4a6 6 0 0 1 -6 6v-6z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_rotate_90.svg b/editor/icons/dark/icon_rotate_90.svg
deleted file mode 100644
index 513ef5388c..0000000000
--- a/editor/icons/dark/icon_rotate_90.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m8 1038.4a6 6 0 0 1 6 6h-6z"/>
-<rect x="7" y="1038.4" width="2" height="7"/>
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm0 2a5 5 0 0 1 5 5 5 5 0 0 1 -5 5 5 5 0 0 1 -5 -5 5 5 0 0 1 5 -5z"/>
-<rect transform="rotate(90)" x="1043.4" y="-14" width="2" height="7"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_sample_library.svg b/editor/icons/dark/icon_sample_library.svg
deleted file mode 100644
index 5292330aef..0000000000
--- a/editor/icons/dark/icon_sample_library.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff4040">
-<path transform="translate(0 1036.4)" d="m9 8v1 5 1h5c0.55228 0 1-0.44772 1-1v-5c0-0.55228-0.44772-1-1-1v4l-1-1-1 1v-4z"/>
-<path d="m7.0215 1037.4a1.0001 1.0001 0 0 0 -1 0.875l-0.58984 4.7226-0.52344-1.0468a1.0001 1.0001 0 0 0 -0.89453 -0.5528h-2a1.0001 1.0001 0 1 0 0 2h1.3828l1.7227 3.4473a1.0001 1.0001 0 0 0 1.8867 -0.3223l0.58984-4.7226 0.52344 1.0449a1.0001 1.0001 0 0 0 0.89453 0.5527h3a1.0001 1.0001 0 1 0 0 -2h-2.3809l-1.7246-3.4472a1.0001 1.0001 0 0 0 -0.88672 -0.5508z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_save.svg b/editor/icons/dark/icon_save.svg
deleted file mode 100644
index 831cb8b614..0000000000
--- a/editor/icons/dark/icon_save.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-8l-4-4zh8v6h-8zm5 8c1.1046 0 2 0.89543 2 2 0 1.1046-0.89543 2-2 2s-2-0.89543-2-2c0-1.1046 0.89543-2 2-2z"/>
-<rect x="4" y="1037.4" width="3" height="5"/>
-<path d="m11 1037.4h1l3 3v2h-4z" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_script.svg b/editor/icons/dark/icon_script.svg
deleted file mode 100644
index 04c70b6985..0000000000
--- a/editor/icons/dark/icon_script.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m6 1v1a1 1 0 0 0 -1 1v10h-1v-2h-2v2a1 1 0 0 0 0.5 0.86523 1 1 0 0 0 0.5 0.13477v1h7a2 2 0 0 0 2 -2v-8h3v-2a2 2 0 0 0 -2 -2h-7z" fill="#4f4f4f"/>
-<path transform="translate(0 1036.4)" d="m6 1c-1.1046 0-2 0.89543-2 2v7h-2-1v1 2c0 1.1046 0.89543 2 2 2s2-0.89543 2-2v-10c0-0.55228 0.44772-1 1-1s1 0.44772 1 1v1 1 1h1 4v-1h-4v-1-1c0-1.1046-0.89543-2-2-2zm-4 10h2v2c0 0.55228-0.44772 1-1 1s-1-0.44772-1-1v-2z" fill="#000000"/>
-<circle cx="3" cy="1048.4" rx="1" ry="1" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_script_create.svg b/editor/icons/dark/icon_script_create.svg
deleted file mode 100644
index aa9d692d14..0000000000
--- a/editor/icons/dark/icon_script_create.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m6 1v1c-0.55228 0-1 0.44772-1 1v10h-1v-2h-2v2c2.826e-4 0.35698 0.19084 0.68674 0.5 0.86523 0.15194 0.088045 0.32439 0.13452 0.5 0.13477v1h5 1v-1h-1v-4h2v-2h2v-3h3v-2c0-1.1046-0.89543-2-2-2h-7z" fill="#4f4f4f"/>
-<path transform="translate(0 1036.4)" d="m6 1c-1.1046 0-2 0.89543-2 2v7h-2-1v1 2c0 1.1046 0.89543 2 2 2s2-0.89543 2-2v-10c0-0.55228 0.44772-1 1-1s1 0.44772 1 1v1 1 1h1 4v-1h-4v-1-1c0-1.1046-0.89543-2-2-2zm-4 10h2v2c0 0.55228-0.44772 1-1 1s-1-0.44772-1-1v-2z" fill="#000000"/>
-<circle cx="3" cy="1048.4" rx="1" ry="1" fill="#4f4f4f"/>
-<path d="m13 1049.4h2v-2h-2v-2h-2v2h-2v2h2v2h2z" fill="#00f010" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_script_remove.svg b/editor/icons/dark/icon_script_remove.svg
deleted file mode 100644
index d619a3f94f..0000000000
--- a/editor/icons/dark/icon_script_remove.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m6 1v1c-0.55228 0-1 0.44772-1 1v10h-1v-2h-2v2c2.826e-4 0.35698 0.19084 0.68674 0.5 0.86523 0.15194 0.088045 0.32439 0.13452 0.5 0.13477v1h5.6348l-1.584-1.584 1.4141-1.4141-1.4141-1.416 3.5352-3.5352 1.4141 1.4141v-0.46484-3h3v-2c0-1.1046-0.89543-2-2-2h-7z" fill="#4f4f4f"/>
-<path transform="translate(0 1036.4)" d="m6 1c-1.1046 0-2 0.89543-2 2v7h-2-1v1 2c0 1.1046 0.89543 2 2 2s2-0.89543 2-2v-10c0-0.55228 0.44772-1 1-1s1 0.44772 1 1v1 1 1h1 4v-1h-4v-1-1c0-1.1046-0.89543-2-2-2zm-4 10h2v2c0 0.55228-0.44772 1-1 1s-1-0.44772-1-1v-2z" fill="#000000"/>
-<circle cx="3" cy="1048.4" rx="1" ry="1" fill="#4f4f4f"/>
-<path d="m13.414 1048.4 1.4142-1.4142-1.4142-1.4142l-1.4142 1.4142-1.4142-1.4142-1.4142 1.4142 1.4142 1.4142-1.4142 1.4142 1.4142 1.4142 1.4142-1.4142 1.4142 1.4142 1.4142-1.4142z" fill="#ff4040" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_scroll_bar.svg b/editor/icons/dark/icon_scroll_bar.svg
deleted file mode 100644
index 45a37b576a..0000000000
--- a/editor/icons/dark/icon_scroll_bar.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 3c-1.1046 0-2 0.89543-2 2v6c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-6c0-1.1046-0.89543-2-2-2zm0 2h10v6h-10z" fill="#29d739"/>
-<rect x="4" y="1042.4" width="4" height="4" fill="none"/>
-<rect x="4" y="1042.4" width="4" height="4" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_scroll_container.svg b/editor/icons/dark/icon_scroll_container.svg
deleted file mode 100644
index 3c4d3ce47d..0000000000
--- a/editor/icons/dark/icon_scroll_container.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2zm0 2h10v10h-10z"/>
-<path d="m10 1042.4v4l2-2z"/>
-<path d="m6 1042.4v4l-2-2z"/>
-<path d="m6 1042.4h4l-2-2z"/>
-<path d="m6 1046.4h4l-2 2z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_search.svg b/editor/icons/dark/icon_search.svg
deleted file mode 100644
index 13ebcd817c..0000000000
--- a/editor/icons/dark/icon_search.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f" fill-opacity=".99608">
-<path d="m6 1037.4a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 5 -5 5 5 0 0 0 -5 -5zm0 2a3 3 0 0 1 3 3 3 3 0 0 1 -3 3 3 3 0 0 1 -3 -3 3 3 0 0 1 3 -3z"/>
-<rect transform="matrix(.70711 -.70711 .70711 .70711 0 0)" x="-733.82" y="745.3" width="2" height="7"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_segment_shape_2d.svg b/editor/icons/dark/icon_segment_shape_2d.svg
deleted file mode 100644
index beb1dd3d3f..0000000000
--- a/editor/icons/dark/icon_segment_shape_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m2 1050.4 12-12" color="#000000" fill="none" stroke="#68b6ff" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_shader.svg b/editor/icons/dark/icon_shader.svg
deleted file mode 100644
index 46fd13c5b3..0000000000
--- a/editor/icons/dark/icon_shader.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1c-0.55226 1e-4 -0.99994 0.4477-1 1v1h2 6 3l-2-2h-8z" fill="#ff2929"/>
-<path transform="translate(0 1036.4)" d="m1 3v2h2v-2h-2zm8 0v2h5l-2-2h-3z" fill="#ffe337"/>
-<path transform="translate(0 1036.4)" d="m1 5v2h2v-2h-2zm8 0v1c0 0.554 0.44599 1 1 1h3 2v-1l-1-1h-5z" fill="#74ff34"/>
-<path transform="translate(0 1036.4)" d="m1 7v2h2v-2h-2zm12 0v2h2v-2h-2z" fill="#2cff98"/>
-<path transform="translate(0 1036.4)" d="m1 9v2h2v-2h-2zm12 0v2h2v-2h-2z" fill="#22ccff"/>
-<path transform="translate(0 1036.4)" d="m1 13v1c5.52e-5 0.5523 0.44774 0.9999 1 1h12c0.55226-1e-4 0.99994-0.4477 1-1v-1h-2-10-2z" fill="#ff2781"/>
-<path transform="translate(0 1036.4)" d="m1 11v2h2v-2h-2zm12 0v2h2v-2h-2z" fill="#702aff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_short_cut.svg b/editor/icons/dark/icon_short_cut.svg
deleted file mode 100644
index 204b53f9db..0000000000
--- a/editor/icons/dark/icon_short_cut.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m4 2c-0.55228 0-1 0.4477-1 1v9.084c4.015e-4 0.506 0.448 0.91602 1 0.91602h8c0.552 0 0.9996-0.41002 1-0.91602v-9.084c0-0.5523-0.44772-1-1-1h-8zm-3 2v9a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-9h-1v9a0.99998 0.99998 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1v-9h-1zm6 0h3l-1 3h2l-4 4 1-3h-2l1-4z" fill="#4f4f4f"/>
-<rect x="27" y="1038.4" width="7" height="14" fill="#000000"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_signal.svg b/editor/icons/dark/icon_signal.svg
deleted file mode 100644
index c764bdc1a7..0000000000
--- a/editor/icons/dark/icon_signal.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff4040">
-<rect x="5" y="1043.4" width="6" height="2"/>
-<path transform="matrix(0 1.281 -.9245 0 -948.3 1038)" d="m8.1225-1036.6h-3.1225-3.1225l1.5612-2.7042 1.5612-2.7041 1.5612 2.7041z"/>
-<rect x="1" y="1039.4" width="2" height="10"/>
-<rect x="3" y="1047.4" width="4" height="2"/>
-<rect x="3" y="1039.4" width="4" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_skeleton.svg b/editor/icons/dark/icon_skeleton.svg
deleted file mode 100644
index cfd23a5e51..0000000000
--- a/editor/icons/dark/icon_skeleton.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff5f5f" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m6 2a4 4 0 0 0 -4 4 4 4 0 0 0 3 3.8691v-0.86914h1v1h1v-1h1 1v1h1v-1h1v0.86719a4 4 0 0 0 3 -3.8672 4 4 0 0 0 -4 -4h-4zm-1 3a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm6 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm-4 2h2v1h-2v-1z"/>
-<path transform="translate(0 1036.4)" d="m4 9v4h1v-4h-1zm7 0v4h1v-4h-1zm-5 3v1 2h4v-2-1h-1v1h-2v-1h-1z"/>
-<path d="m8 1049.4a2 2 0 0 1 -1 1.732 2 2 0 0 1 -2 0 2 2 0 0 1 -1 -1.732h2z"/>
-<path d="m12 1049.4a2 2 0 0 1 -1 1.732 2 2 0 0 1 -2 0 2 2 0 0 1 -1 -1.732h2z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_slider_joint.svg b/editor/icons/dark/icon_slider_joint.svg
deleted file mode 100644
index c46855342e..0000000000
--- a/editor/icons/dark/icon_slider_joint.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m3 1051.4h5l-1-4z" fill="#ff5f5f" fill-opacity=".99608"/>
-<path d="m6 1048.4 9-9v3l-8 8z" fill="#fb9b9b"/>
-<path d="m10 1040.4-9 9v-3l8-8z" fill="#fb9b9b"/>
-<path d="m13 1037.4h-5l1 4z" fill="#ff5f5f" fill-opacity=".99608"/>
-<path d="m10 1038.4h-5" fill="none" stroke="#fb9b9b" stroke-linecap="round" stroke-width="2"/>
-<path d="m11 1050.4h-5" fill="none" stroke="#fb9b9b" stroke-linecap="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_slot.svg b/editor/icons/dark/icon_slot.svg
deleted file mode 100644
index 9e8a5038e3..0000000000
--- a/editor/icons/dark/icon_slot.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#00f010">
-<rect x="1" y="1043.4" width="6" height="2"/>
-<path transform="matrix(0 1.281 -.9245 0 -952.3 1038)" d="m8.1225-1036.6h-3.1225-3.1225l1.5612-2.7042 1.5612-2.7041 1.5612 2.7041z"/>
-<path d="m15 1039.4v10h-2-4v-2h4v-6h-4v-2h4 2z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_snap.svg b/editor/icons/dark/icon_snap.svg
deleted file mode 100644
index 7c3e75f7cd..0000000000
--- a/editor/icons/dark/icon_snap.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m3 1036.4v3h-3v2h3v4h-3v2h3v3h2v-3-2-4h4 2 3v-2h-3v-3h-2v3h-4v-3h-2z" fill="#f3f3f3"/>
-<path d="m11 1043.4a4 4 0 0 0 -4 4h2a2 2 0 0 1 2 -2 2 2 0 0 1 2 2h2a4 4 0 0 0 -4 -4z" fill="#ff4040"/>
-<rect x="7" y="1047.4" width="2" height="2" fill="#ff4040"/>
-<rect x="13" y="1047.4" width="2" height="2" fill="#ff4040"/>
-<rect x="7" y="1049.4" width="2" height="2" fill="#000000"/>
-<rect x="13" y="1049.4" width="2" height="2" fil#000000fff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_sort.svg b/editor/icons/dark/icon_sort.svg
deleted file mode 100644
index 87bab3cad7..0000000000
--- a/editor/icons/dark/icon_sort.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m9 1v2h6v-2h-6zm-5.0156 0.0019531a1.0001 1.0001 0 0 0 -0.69141 0.29102l-2 2a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l0.29297-0.29297v7.1719l-0.29297-0.29297a1 1 0 0 0 -0.7207 -0.29102 1 1 0 0 0 -0.69336 0.29102 1 1 0 0 0 0 1.4141l2 2a1.0001 1.0001 0 0 0 1.4141 0l2-2a1 1 0 0 0 0 -1.4141 1 1 0 0 0 -1.4141 0l-0.29297 0.29297v-7.1719l0.29297 0.29297a1 1 0 0 0 1.4141 0 1 1 0 0 0 0 -1.4141l-2-2a1.0001 1.0001 0 0 0 -0.72266 -0.29102zm5.0156 5.998v2h4v-2h-4zm0 6v2h2v-2h-2z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#4f4f4f" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_sound_room_params.svg b/editor/icons/dark/icon_sound_room_params.svg
deleted file mode 100644
index f9c6624284..0000000000
--- a/editor/icons/dark/icon_sound_room_params.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path d="m8 1037.4-4 5h-3v4h3l4 5v-14z"/>
-<path d="m13 1039.4v10h1v-10h-1z"/>
-<path d="m10 1039.4v10h1v-10h-1z"/>
-<rect x="9" y="1041.4" width="3" height="1"/>
-<rect x="12" y="1046.4" width="3" height="1"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_spatial.svg b/editor/icons/dark/icon_spatial.svg
deleted file mode 100644
index b89620314b..0000000000
--- a/editor/icons/dark/icon_spatial.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 2a6 6 0 0 0 -6 6 6 6 0 0 0 6 6 6 6 0 0 0 6 -6 6 6 0 0 0 -6 -6zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4z" fill="#ff5f5f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_spatial_material.svg b/editor/icons/dark/icon_spatial_material.svg
deleted file mode 100644
index 57b6fd360d..0000000000
--- a/editor/icons/dark/icon_spatial_material.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7.9629 1.002a1.0001 1.0001 0 0 0 -0.41016 0.10352l-3.7891 1.8945h8.4727l-3.7891-1.8945a1.0001 1.0001 0 0 0 -0.48438 -0.10352z" fill="#ff2929"/>
-<path transform="translate(0 1036.4)" d="m3.7637 3l-2.2109 1.1055a1.0001 1.0001 0 0 0 -0.55273 0.89453h3.2363l3.7637-1.8809 3.7637 1.8809h3.2363a1.0001 1.0001 0 0 0 -0.55273 -0.89453l-2.2109-1.1055h-8.4727z" fill="#ffe337"/>
-<path transform="translate(0 1036.4)" d="m1 5v2h2v-0.38086l0.76172 0.38086h8.4766l0.76172-0.38086v0.38086h2v-2h-3.2363l-3.7637 1.8828-3.7637-1.8828h-3.2363z" fill="#74ff34"/>
-<path transform="translate(0 1036.4)" d="m1 7v2h2v-2h-2zm2.7617 0l3.2383 1.6191v0.38086h2v-0.38086l3.2383-1.6191h-8.4766zm9.2383 0v2h2v-2h-2z" fill="#2cff98"/>
-<path transform="translate(0 1036.4)" d="m1 9v2h3.2344l-1.2344-0.61719v-1.3828h-2zm6 0v2h2v-2h-2zm6 0v1.3828l-1.2344 0.61719h3.2344v-2h-2z" fill="#22ccff"/>
-<path transform="translate(0 1036.4)" d="m3.7637 13l3.7891 1.8945a1.0001 1.0001 0 0 0 0.48438 0.10547 1.0001 1.0001 0 0 0 0.41016 -0.10547l3.7891-1.8945h-8.4727z" fill="#ff2781"/>
-<path transform="translate(0 1036.4)" d="m1 11a1.0001 1.0001 0 0 0 0.55273 0.89453l2.2109 1.1055h8.4727l2.2109-1.1055a1.0001 1.0001 0 0 0 0.55273 -0.89453h-3.2344l-2.7656 1.3828v-1.3828h-2v1.3828l-2.7656-1.3828h-3.2344z" fill="#702aff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_spatial_sample_player.svg b/editor/icons/dark/icon_spatial_sample_player.svg
deleted file mode 100644
index e0925fdd7a..0000000000
--- a/editor/icons/dark/icon_spatial_sample_player.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1l-4 5h-3v4h3l4 5v-14zm5 2v10h1v-10h-1zm-3 3v5h1v-5h-1z" fill="#ff5f5f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_spatial_stream_player.svg b/editor/icons/dark/icon_spatial_stream_player.svg
deleted file mode 100644
index 60c5749bb8..0000000000
--- a/editor/icons/dark/icon_spatial_stream_player.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m5 2c-0.55228 0-1 0.44772-1 1v1 7h-2c-0.55228 0-1 0.44772-1 1v2c0 0.55228 0.44772 1 1 1h2 1c0.55228 0 1-0.44772 1-1v-3-7h6v5h-2c-0.55228 0-1 0.44772-1 1v2c0 0.55228 0.44772 1 1 1h3c0.55228 0 1-0.44772 1-1v-3-6c0-0.55228-0.44772-1-1-1h-7z" fill="#ff5f5f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_sphere_mesh.svg b/editor/icons/dark/icon_sphere_mesh.svg
deleted file mode 100644
index 317741595e..0000000000
--- a/editor/icons/dark/icon_sphere_mesh.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1c-3.8541 0-7 3.1459-7 7 0 3.8542 3.1459 7 7 7 3.8541 0 7-3.1458 7-7 0-3.8541-3.1459-7-7-7zm-1 2.0977v4.8711c-1.2931-0.071342-2.6061-0.29819-3.9434-0.69141 0.30081-2.0978 1.8852-3.7665 3.9434-4.1797zm2 0c2.0549 0.41253 3.637 2.0767 3.9414 4.1699-1.3046 0.36677-2.6158 0.60259-3.9414 0.6875v-4.8574zm3.7852 6.2812c-0.50864 1.7788-1.9499 3.1531-3.7852 3.5215v-2.9512c1.2792-0.072301 2.5419-0.26704 3.7852-0.57031zm-9.5645 0.017578c1.2733 0.31892 2.5337 0.50215 3.7793 0.5625v2.9414c-1.8291-0.36719-3.266-1.7339-3.7793-3.5039z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#fea900" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_sphere_shape.svg b/editor/icons/dark/icon_sphere_shape.svg
deleted file mode 100644
index f2995ae96a..0000000000
--- a/editor/icons/dark/icon_sphere_shape.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<circle cx="8" cy="1044.4" r="7" fill="#68b6ff"/>
-<circle cx="6" cy="1041.4" r="2" fill="#a2d2ff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_spin_box.svg b/editor/icons/dark/icon_spin_box.svg
deleted file mode 100644
index 2d0376e280..0000000000
--- a/editor/icons/dark/icon_spin_box.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<path transform="translate(0 1036.4)" d="m3 3c-1.1046 0-2 0.89543-2 2v6c0 1.1046 0.89543 2 2 2h7v-2h-7v-6h7v-2z"/>
-<rect x="8" y="1041.4" width="2" height="6"/>
-<path d="m11 1043.4h4l-2-3z" fill-rule="evenodd"/>
-<path d="m11 1045.4h4l-2 3z" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_spot_light.svg b/editor/icons/dark/icon_spot_light.svg
deleted file mode 100644
index 9e333acce0..0000000000
--- a/editor/icons/dark/icon_spot_light.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m6 1a1 1 0 0 0 -1 1v3.6934c-1.7861 0.86608-3 2.4605-3 4.3066h4a2 2 0 0 0 2 2 2 2 0 0 0 2 -2h4c0-1.8462-1.2139-3.4406-3-4.3066v-3.6934a1 1 0 0 0 -1 -1h-4zm-1.0977 9.6348l-1.7324 1 1 1.7305 1.7324-1-1-1.7305zm6.1953 0l-1 1.7305 1.7324 1 1-1.7305-1.7324-1zm-4.0977 2.3652v2h2v-2h-2z" fill="#ff5f5f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_sprite.svg b/editor/icons/dark/icon_sprite.svg
deleted file mode 100644
index 7c7f7dde76..0000000000
--- a/editor/icons/dark/icon_sprite.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-4 5a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm8 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm-7 3h6a3 3 0 0 1 -1.5 2.5977 3 3 0 0 1 -3 0 3 3 0 0 1 -1.5 -2.5977z" fill="#6d90ff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_sprite_3d.svg b/editor/icons/dark/icon_sprite_3d.svg
deleted file mode 100644
index 9f6d4f9fe5..0000000000
--- a/editor/icons/dark/icon_sprite_3d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-4 5a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm8 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm-7 3h6a3 3 0 0 1 -1.5 2.5977 3 3 0 0 1 -3 0 3 3 0 0 1 -1.5 -2.5977z" fill="#ff5f5f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_sprite_frames.svg b/editor/icons/dark/icon_sprite_frames.svg
deleted file mode 100644
index e4f85236b4..0000000000
--- a/editor/icons/dark/icon_sprite_frames.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<rect x="10" y="1046.4" width="2" height="2"/>
-<rect x="13" y="1046.4" width="2" height="2"/>
-<rect x="10" y="1049.4" width="2" height="2"/>
-<rect x="13" y="1049.4" width="2" height="2"/>
-<path transform="translate(0 1036.4)" d="m6 1a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 5 -5 5 5 0 0 0 -5 -5zm-3 4a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm6 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm-1.0039 2.4922a0.50005 0.50005 0 0 1 0.35742 0.86133c-0.61785 0.6179-1.4924 0.89648-2.3535 0.89648s-1.7357-0.27858-2.3535-0.89648a0.50005 0.50005 0 0 1 0.34766 -0.85742 0.50005 0.50005 0 0 1 0.35938 0.15039c0.38215 0.3822 1.0076 0.60352 1.6465 0.60352s1.2643-0.22132 1.6465-0.60352a0.50005 0.50005 0 0 1 0.34961 -0.1543z"/>
-<rect x="13" y="1043.4" width="2" height="2"/>
-<rect x="7" y="1049.4" width="2" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_static_body.svg b/editor/icons/dark/icon_static_body.svg
deleted file mode 100644
index 04944fd5c8..0000000000
--- a/editor/icons/dark/icon_static_body.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -1.4141 0.58594 2 2 0 0 0 -0.58594 1.4141v10a2 2 0 0 0 0.58594 1.4141 2 2 0 0 0 1.4141 0.58594h10a2 2 0 0 0 2 -2v-10a2 2 0 0 0 -2 -2h-10zm0 1h10a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1v-10a1 1 0 0 1 1 -1zm0 1v2h2v-2h-2zm8 0v2h2v-2h-2zm-8 8v2h2v-2h-2zm8 0v2h2v-2h-2z" fill="#ff5f5f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_static_body_2d.svg b/editor/icons/dark/icon_static_body_2d.svg
deleted file mode 100644
index 36a63281d2..0000000000
--- a/editor/icons/dark/icon_static_body_2d.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="29" y="1042.4" width="1" height="1" fill="#fefeff"/>
-<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -1.4141 0.58594 2 2 0 0 0 -0.58594 1.4141v10a2 2 0 0 0 0.58594 1.4141 2 2 0 0 0 1.4141 0.58594h10a2 2 0 0 0 2 -2v-10a2 2 0 0 0 -2 -2h-10zm0 1h10a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-10a1 1 0 0 1 -1 -1v-10a1 1 0 0 1 1 -1zm0 1v2h2v-2h-2zm8 0v2h2v-2h-2zm-8 8v2h2v-2h-2zm8 0v2h2v-2h-2z" fill="#6d90ff" fill-opacity=".98824"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_stop.svg b/editor/icons/dark/icon_stop.svg
deleted file mode 100644
index 1b856b5153..0000000000
--- a/editor/icons/dark/icon_stop.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m4 1048.4v-8h8v8z" fill="#4f4f4f" fill-rule="evenodd" stroke="#4f4f4f" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_stream_player.svg b/editor/icons/dark/icon_stream_player.svg
deleted file mode 100644
index b9592a6cd8..0000000000
--- a/editor/icons/dark/icon_stream_player.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m5 2c-0.55228 0-1 0.44772-1 1v1 7h-2c-0.55228 0-1 0.44772-1 1v2c0 0.55228 0.44772 1 1 1h2 1c0.55228 0 1-0.44772 1-1v-3-7h6v5h-2c-0.55228 0-1 0.44772-1 1v2c0 0.55228 0.44772 1 1 1h3c0.55228 0 1-0.44772 1-1v-3-6c0-0.55228-0.44772-1-1-1h-7z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_stream_texture.svg b/editor/icons/dark/icon_stream_texture.svg
deleted file mode 100644
index 1a78b5b41a..0000000000
--- a/editor/icons/dark/icon_stream_texture.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h6v-2h2v-2h-2-5v-8h5v-2h-6zm6 2v2h2v-2h-2zm2 0h2v-2h-2v2zm2 0v2h2v-2h-2zm0 2h-2v2h2v-2zm0 2v2h2v-2h-2zm0 2h-2v2h2v-2zm0 2v2h2v-2h-2zm0 2h-2v2h2v-2zm-2-4v-2h-2v-1h-1v1h-1v1h-1v1h-1v1h2 2v-1h2z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_string.svg b/editor/icons/dark/icon_string.svg
deleted file mode 100644
index 9bb7518995..0000000000
--- a/editor/icons/dark/icon_string.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m5 1v2h2v10h-2v2h2a1 1 0 0 0 1 -1 1 1 0 0 0 1 1h2v-2h-2v-10h2v-2h-2a1 1 0 0 0 -1 1 1 1 0 0 0 -1 -1h-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_style_box_empty.svg b/editor/icons/dark/icon_style_box_empty.svg
deleted file mode 100644
index c3791985cf..0000000000
--- a/editor/icons/dark/icon_style_box_empty.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1c-0.55226 1e-4 -0.99994 0.4477-1 1v1h2v-2h-1zm3 0v2h2v-2h-2zm4 0v2h2v-2h-2zm4 0v2h2v-1c-5.5e-5 -0.5523-0.44774-0.9999-1-1h-1z" fill="#ff2929"/>
-<path transform="translate(0 1036.4)" d="m1 5v2h2v-2h-2zm12 0v0.23242c0.31584 0.1783 0.57817 0.43795 0.75977 0.75195 0.19142 0.33153 0.43699 0.67036 0.69922 1.0156h0.54102v-2h-2z" fill="#74ff34"/>
-<path transform="translate(0 1036.4)" d="m12 7c-0.43047 0.7456-0.94451 1.3867-1.4355 2h2.8711c-0.49104-0.6133-1.0051-1.2544-1.4355-2zm2.459 0c0.17438 0.2296 0.352 0.46082 0.54102 0.69922v-0.69922h-0.54102z" fill="#2cff98"/>
-<path transform="translate(0 1036.4)" d="m1 9v2h2v-2h-2zm9.5645 0c-0.55248 0.69003-1.0583 1.3421-1.334 2h5.5391c-0.2757-0.65786-0.78151-1.31-1.334-2h-2.8711z" fill="#22ccff"/>
-<path transform="translate(0 1036.4)" d="m1 13v1c5.52e-5 0.5523 0.44774 0.9999 1 1h1v-2h-2zm4 0v2h2v-2h-2zm4.1836 0c0.41312 1.1628 1.5119 2 2.8164 2s2.4033-0.83718 2.8164-2h-5.6328z" fill="#ff2781"/>
-<path transform="translate(0 1036.4)" d="m9.2305 11c-0.13656 0.32585-0.23047 0.65576-0.23047 1 0 0.35235 0.07201 0.68593 0.18359 1h5.6328c0.11158-0.31407 0.18359-0.64765 0.18359-1 0-0.34424-0.093909-0.67415-0.23047-1h-5.5391z" fill="#702aff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_style_box_flat.svg b/editor/icons/dark/icon_style_box_flat.svg
deleted file mode 100644
index f0270c7cc5..0000000000
--- a/editor/icons/dark/icon_style_box_flat.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1c-0.55226 1e-4 -0.99994 0.4477-1 1v1h14v-1c-5.5e-5 -0.5523-0.44774-0.9999-1-1h-12z" fill="#ff2929"/>
-<path transform="translate(0 1036.4)" d="m1 3v2h14v-2h-14z" fill="#ffe337"/>
-<path transform="translate(0 1036.4)" d="m1 5v2h8.582c0.25686-0.33847 0.49465-0.66934 0.68555-1 0.33885-0.5859 0.95103-0.96109 1.627-0.99609 0.7512-0.04 1.4613 0.34489 1.8379 0.99609 0.18899 0.32737 0.42831 0.66049 0.68555 1h0.58203v-2h-14z" fill="#74ff34"/>
-<path transform="translate(0 1036.4)" d="m1 7v2h7.0547c0.14116-0.20345 0.28508-0.40233 0.42383-0.58398 0.38601-0.5053 0.76348-0.96794 1.1035-1.416h-8.582zm11 0c-0.43047 0.7456-0.94451 1.3867-1.4355 2h2.8711c-0.49104-0.6133-1.0051-1.2544-1.4355-2zm2.418 0c0.18626 0.24583 0.37928 0.49419 0.58203 0.75v-0.75h-0.58203z" fill="#2cff98"/>
-<path transform="translate(0 1036.4)" d="m1 9v2h6.1172c0.17955-0.78395 0.54577-1.4354 0.9375-2h-7.0547zm9.5645 0c-0.55248 0.69003-1.0583 1.3421-1.334 2h5.5391c-0.2757-0.65786-0.78151-1.31-1.334-2h-2.8711z" fill="#22ccff"/>
-<path transform="translate(0 1036.4)" d="m1 13v1c5.52e-5 0.5523 0.44774 0.9999 1 1h6.0371c-0.44511-0.58388-0.76161-1.2639-0.91992-2h-6.1172zm8.1836 0c0.41312 1.1628 1.5119 2 2.8164 2s2.4033-0.83718 2.8164-2h-5.6328z" fill="#ff2781"/>
-<path transform="translate(0 1036.4)" d="m1 11v2h6.1172c-0.06966-0.3239-0.11719-0.65596-0.11719-1 0-0.35655 0.045474-0.68688 0.11719-1h-6.1172zm8.2305 0c-0.13656 0.32585-0.23047 0.65576-0.23047 1 0 0.35235 0.07201 0.68593 0.18359 1h5.6328c0.11158-0.31407 0.18359-0.64765 0.18359-1 0-0.34424-0.093909-0.67415-0.23047-1h-5.5391z" fill="#702aff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_style_box_texture.svg b/editor/icons/dark/icon_style_box_texture.svg
deleted file mode 100644
index 36fdd7f66b..0000000000
--- a/editor/icons/dark/icon_style_box_texture.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1a1.0001 1.0001 0 0 0 -1 1v1h2 10 2v-1a1.0001 1.0001 0 0 0 -1 -1h-12z" fill="#ff2929"/>
-<path transform="translate(0 1036.4)" d="m1 3v2h2v-2h-2zm12 0v2h2v-2h-2zm-4 1v1h1v-1h-1z" fill="#ffe337"/>
-<path transform="translate(0 1036.4)" d="m1 5v2h2v-2h-2zm7 0v1h-2v1h3.543c0.26215-0.34438 0.50373-0.68039 0.69727-1.0156a2.0315 2.0315 0 0 1 0.75977 -0.75195v-0.23242h-1-1-1zm5 0v0.23242a2.0315 2.0315 0 0 1 0.75977 0.75195c0.19142 0.33153 0.43699 0.67033 0.69922 1.0156h0.54102v-2h-2z" fill="#74ff34"/>
-<path transform="translate(0 1036.4)" d="m1 7v2h2v-2h-2zm4 0v1h-1v1h4.0156c0.14585-0.2113 0.29419-0.41592 0.4375-0.60352 0.38121-0.49904 0.75394-0.95521 1.0898-1.3965h-3.543-1zm7 0c-0.43047 0.7456-0.94451 1.3867-1.4355 2h2.8711c-0.49104-0.6133-1.0051-1.2544-1.4355-2zm2.459 0c0.17438 0.22962 0.352 0.46082 0.54102 0.69922v-0.69922h-0.54102z" fill="#2cff98"/>
-<path transform="translate(0 1036.4)" d="m1 9v2h2v-2h-2zm9.5645 0c-0.55248 0.69003-1.0583 1.3421-1.334 2h5.5391c-0.2757-0.65786-0.78151-1.31-1.334-2h-2.8711z" fill="#22ccff"/>
-<path transform="translate(0 1036.4)" d="m1 13v1a1.0001 1.0001 0 0 0 1 1h5.998c-0.4429-0.5864-0.77294-1.2592-0.92578-2h-4.0723-2zm8.1836 0c0.41312 1.1628 1.5119 2 2.8164 2s2.4033-0.83718 2.8164-2h-5.6328z" fill="#ff2781"/>
-<path transform="translate(0 1036.4)" d="m1 11v2h2v-2h-2zm8.2305 0c-0.13656 0.32585-0.23047 0.65576-0.23047 1 0 0.35235 0.07201 0.68593 0.18359 1h5.6328c0.11158-0.31407 0.18359-0.64765 0.18359-1 0-0.34424-0.093909-0.67415-0.23047-1h-5.5391z" fill="#702aff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_tab_container.svg b/editor/icons/dark/icon_tab_container.svg
deleted file mode 100644
index d47e1522c6..0000000000
--- a/editor/icons/dark/icon_tab_container.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2h-10zm0 2h5v2 2h5v6h-10v-10zm7 0h3v2h-3v-2z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_tabs.svg b/editor/icons/dark/icon_tabs.svg
deleted file mode 100644
index b8bfdefa90..0000000000
--- a/editor/icons/dark/icon_tabs.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m5 4c-1.108 0-1.8178 0.9071-2 2l-1 6h-1v2h4 6 4v-2h-2l-1-6c-0.18216-1.0929-0.89199-2-2-2h-5z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_test_cube.svg b/editor/icons/dark/icon_test_cube.svg
deleted file mode 100644
index e6d3ac88f2..0000000000
--- a/editor/icons/dark/icon_test_cube.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<g transform="translate(0 1.1802e-5)" stroke="#ff5f5f" stroke-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m7.9629 1.002a1.0001 1.0001 0 0 0 -0.41016 0.10352l-6 3a1.0001 1.0001 0 0 0 -0.55273 0.89453v6a1.0001 1.0001 0 0 0 0.55273 0.89453l6 3a1.0001 1.0001 0 0 0 0.89453 0l6-3a1.0001 1.0001 0 0 0 0.55273 -0.89453v-6a1.0001 1.0001 0 0 0 -0.55273 -0.89453l-6-3a1.0001 1.0001 0 0 0 -0.48438 -0.10352zm0.037109 2.1172l3.7637 1.8809-3.7637 1.8828-3.7637-1.8828 3.7637-1.8809zm-5 3.5l4 2v3.7637l-4-2v-3.7637zm10 0v3.7637l-4 2v-3.7637l4-2z" color="#000000" color-rendering="auto" fill="#ff5f5f" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" stroke="none" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_text_edit.svg b/editor/icons/dark/icon_text_edit.svg
deleted file mode 100644
index 7c449830b1..0000000000
--- a/editor/icons/dark/icon_text_edit.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="29" y="1042.4" width="1" height="1" fill="#fefeff"/>
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.8954-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.8954 2-2v-10c0-1.1046-0.89543-2-2-2h-10zm0 2h10v10h-10v-10zm1 1v4h1v-4h-1z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_texture_button.svg b/editor/icons/dark/icon_texture_button.svg
deleted file mode 100644
index 1de3da6cda..0000000000
--- a/editor/icons/dark/icon_texture_button.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 3v8h14v-8h-1-12-1zm8 2h1v1h1v2h1v2h-2-2-2-2v-1h1v-1h1v-1h2v-1h1v-1z" fill="#29d739"/>
-<rect transform="scale(1,-1)" x="1" y="-1049.4" width="14" height="2.0001" fill="#29d739"/>
-<rect transform="scale(1,-1)" x="1" y="-1049.4" width="14" height="2.0001" fill-opacity=".078431"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_texture_progress.svg b/editor/icons/dark/icon_texture_progress.svg
deleted file mode 100644
index 17aae8239a..0000000000
--- a/editor/icons/dark/icon_texture_progress.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<path transform="translate(0 1036.4)" d="m3 3c-1.1046 0-2 0.89543-2 2v6c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-6c0-1.1046-0.89543-2-2-2zm0 2h10v6h-10z"/>
-<rect x="4" y="1042.4" width="1" height="2"/>
-<rect x="6" y="1043.4" width="1" height="3"/>
-<rect x="8" y="1042.4" width="1" height="4"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_texture_rect.svg b/editor/icons/dark/icon_texture_rect.svg
deleted file mode 100644
index 540c237f28..0000000000
--- a/editor/icons/dark/icon_texture_rect.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="2" y="1038.4" width="12" height="12" fill="none" stroke="#29d739" stroke-linecap="round" stroke-width="2"/>
-<path d="m9 1042.4v1h-1v1h-2v1h-1v1h-1v1h2 2 2 2v-2h-1v-2h-1v-1h-1z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_theme.svg b/editor/icons/dark/icon_theme.svg
deleted file mode 100644
index 4d5c017f14..0000000000
--- a/editor/icons/dark/icon_theme.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1l-0.5 2h3l-0.5-2h-2zm-3.2422 1.3438l-0.65625 0.65625h1.75l-1.0938-0.65625zm8.4844 0l-1.0957 0.65625h1.752l-0.65625-0.65625z" fill="#ff2929"/>
-<path transform="translate(0 1036.4)" d="m3.1016 3l-0.75781 0.75781 0.74414 1.2422h9.8242l0.74414-1.2422-0.75781-0.75781h-1.752l-0.89844 0.53906a5 5 0 0 0 -0.68555 -0.28516l-0.0625-0.25391h-3l-0.064453 0.25781a5 5 0 0 0 -0.68945 0.2793l-0.89453-0.53711h-1.75z" fill="#ffe337"/>
-<path transform="translate(0 1036.4)" d="m3.0879 5l0.45117 0.75195a5 5 0 0 0 -0.28516 0.68555l-2.2539 0.5625h5.2695a2 2 0 0 1 1.7305 -1 2 2 0 0 1 1.7285 1h5.2715l-2.2578-0.56445a5 5 0 0 0 -0.2793 -0.6875l0.44922-0.74805h-9.8242z" fill="#74ff34"/>
-<path transform="translate(0 1036.4)" d="m1 7v2h5.2715a2 2 0 0 1 -0.27148 -1 2 2 0 0 1 0.26953 -1h-5.2695zm8.7285 0a2 2 0 0 1 0.27148 1 2 2 0 0 1 -0.26953 1h5.2695v-2h-5.2715z" fill="#2cff98"/>
-<path transform="translate(0 1036.4)" d="m1 9l2.2578 0.56445a5 5 0 0 0 0.2793 0.6875l-0.44922 0.74805h9.8242l-0.45117-0.75195a5 5 0 0 0 0.28516 -0.68555l2.2539-0.5625h-5.2695a2 2 0 0 1 -1.7305 1 2 2 0 0 1 -1.7285 -1h-5.2715z" fill="#22ccff"/>
-<path transform="translate(0 1036.4)" d="m3.1016 13l0.65625 0.65625 1.0957-0.65625h-1.752zm3.3984 0l0.5 2h2l0.5-2h-3zm4.6484 0l1.0938 0.65625 0.65625-0.65625h-1.75z" fill="#ff2781"/>
-<path transform="translate(0 1036.4)" d="m3.0879 11l-0.74414 1.2422 0.75781 0.75781h1.752l0.89844-0.53906a5 5 0 0 0 0.68555 0.28516l0.0625 0.25391h3l0.064453-0.25781a5 5 0 0 0 0.6875 -0.2793l0.89648 0.53711h1.75l0.75781-0.75781-0.74414-1.2422h-9.8242z" fill="#702aff"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_thumbnail_wait.svg b/editor/icons/dark/icon_thumbnail_wait.svg
deleted file mode 100644
index 833e6f7f69..0000000000
--- a/editor/icons/dark/icon_thumbnail_wait.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -988.36)">
-<path transform="translate(0 988.36)" d="m8 0c-4.432 0-8 3.568-8 8v48c0 4.432 3.568 8 8 8h48c4.432 0 8-3.568 8-8v-48c0-4.432-3.568-8-8-8h-48zm0 2h48c3.324 0 6 2.676 6 6v48c0 3.324-2.676 6-6 6h-48c-3.324 0-6-2.676-6-6v-48c0-3.324 2.676-6 6-6zm-0.013672 5.002a1 1 0 0 0 -0.69336 0.29102 1 1 0 0 0 0 1.4141l8 8a1 1 0 0 0 1.4141 0 1 1 0 0 0 0 -1.4141l-8-8a1 1 0 0 0 -0.7207 -0.29102zm48 0a1 1 0 0 0 -0.69336 0.29102l-8 8a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l8-8a1 1 0 0 0 0 -1.4141 1 1 0 0 0 -0.7207 -0.29102zm-33.986 10.998a2.0002 2.0002 0 0 0 -0.37891 0.039062c-0.005702 0.001087-0.011894 8.19e-4 -0.017578 0.001954-0.01402 0.002798-0.027106 0.006677-0.041016 0.009765a2.0002 2.0002 0 0 0 -0.30859 0.095703c-0.024592 0.009869-0.048174 0.020446-0.072265 0.03125a2.0002 2.0002 0 0 0 -0.24609 0.13281c-0.021344 0.013452-0.043669 0.024834-0.064453 0.039062-0.008816 0.006036-0.016678 0.013359-0.025391 0.019532a2.0002 2.0002 0 0 0 -0.21484 0.17578c-0.0215 0.020231-0.04387 0.039386-0.064453 0.060547a2.0002 2.0002 0 0 0 -0.001953 0.001953 2.0002 2.0002 0 0 0 -0.18555 0.22461c-0.017788 0.024669-0.036063 0.048717-0.052734 0.074219a2.0002 2.0002 0 0 0 -0.14258 0.26562c-0.013621 0.029909-0.026892 0.059158-0.039063 0.089844a2.0002 2.0002 0 0 0 -0.09375 0.30078c-0.004203 0.018931-0.008053 0.037509-0.011719 0.056641a2.0002 2.0002 0 0 0 -0.039062 0.38086c0 3 1.9339 5.2454 3.7461 7.3164 1.5217 1.7392 2.8322 3.2888 3.75 4.6836-0.91778 1.3948-2.2283 2.9444-3.75 4.6836-1.8122 2.071-3.7461 4.3164-3.7461 7.3164a2.0002 2.0002 0 0 0 0.041016 0.4043 2.0002 2.0002 0 0 0 0.10547 0.3418c0.008774 0.021862 0.017831 0.042985 0.027344 0.064453a2.0002 2.0002 0 0 0 0.14648 0.27344c0.010017 0.015513 0.018867 0.031664 0.029297 0.046875l0.001953 0.001953a2.0002 2.0002 0 0 0 0.19336 0.23633c0.020231 0.0215 0.039386 0.04387 0.060547 0.064453a2.0002 2.0002 0 0 0 0.001953 0.001953 2.0002 2.0002 0 0 0 0.23438 0.19336c0.021387 0.01522 0.042447 0.030536 0.064453 0.044922a2.0002 2.0002 0 0 0 0.27734 0.15039c0.019743 0.008822 0.038513 0.019147 0.058594 0.027343a2.0002 2.0002 0 0 0 0.33789 0.10352c0.005331 0.001131 0.010278 0.002818 0.015625 0.003906a2.0002 2.0002 0 0 0 0.009766 0 2.0002 2.0002 0 0 0 0.39453 0.041016h20a2.0002 2.0002 0 0 0 0.4043 -0.041016 2.0002 2.0002 0 0 0 0.375 -0.11523 2.0002 2.0002 0 0 0 0.29297 -0.1582c0.018831-0.011984 0.038248-0.022566 0.05664-0.035156a2.0002 2.0002 0 0 0 0.021485 -0.015625 2.0002 2.0002 0 0 0 0.23633 -0.19531c0.013296-0.012808 0.028079-0.023939 0.041015-0.037109a2.0002 2.0002 0 0 0 0.20508 -0.25c0.012127-0.017168 0.025518-0.033217 0.03711-0.050782a2.0002 2.0002 0 0 0 0.15234 -0.28125c0.01106-0.024605 0.021165-0.049089 0.03125-0.074218a2.0002 2.0002 0 0 0 0.097656 -0.31445c0.003563-0.016291 0.0066-0.03239 0.009766-0.048829a2.0002 2.0002 0 0 0 0.039062 -0.38281c0-3-1.9339-5.2454-3.7461-7.3164-1.5217-1.7392-2.8322-3.2888-3.75-4.6836 0.91778-1.3948 2.2283-2.9444 3.75-4.6836 1.8122-2.071 3.7461-4.3164 3.7461-7.3164a2.0002 2.0002 0 0 0 -0.041016 -0.4043v-0.001953a2.0002 2.0002 0 0 0 -0.10156 -0.32617c-0.011965-0.03044-0.023719-0.060163-0.03711-0.089844a2.0002 2.0002 0 0 0 -0.13476 -0.25c-0.011984-0.018831-0.022566-0.038248-0.035156-0.05664a2.0002 2.0002 0 0 0 -0.023438 -0.03125 2.0002 2.0002 0 0 0 -0.1582 -0.19336c-0.025026-0.027154-0.049686-0.054353-0.076172-0.080078a2.0002 2.0002 0 0 0 -0.027344 -0.02539 2.0002 2.0002 0 0 0 -0.18945 -0.1543c-0.031037-0.022641-0.061384-0.04555-0.09375-0.066407l-0.001953-0.001953a2.0002 2.0002 0 0 0 -0.24219 -0.13086c-0.031326-0.014467-0.061564-0.030098-0.09375-0.042969a2.0002 2.0002 0 0 0 -0.29883 -0.091797c-0.021554-0.004877-0.042636-0.009492-0.064453-0.013672a2.0002 2.0002 0 0 0 -0.38086 -0.039062h-20zm3.1758 4h13.648c-0.4756 0.8814-0.611 1.5782-1.5781 2.6836-1.6878 1.929-3.7966 3.9449-5.0352 6.4219a2.0002 2.0002 0 0 0 -0.20898 0.89453h-0.003906a2.0002 2.0002 0 0 0 -0.20898 -0.89453c-1.2385-2.477-3.3473-4.4929-5.0352-6.4219-0.96713-1.1054-1.1025-1.8022-1.5781-2.6836zm-9.1895 25.002a1 1 0 0 0 -0.69336 0.29102l-8 8a1 1 0 0 0 0 1.4141 1 1 0 0 0 1.4141 0l8-8a1 1 0 0 0 0 -1.4141 1 1 0 0 0 -0.7207 -0.29102zm32 0a1 1 0 0 0 -0.69336 0.29102 1 1 0 0 0 0 1.4141l8 8a1 1 0 0 0 1.4141 0 1 1 0 0 0 0 -1.4141l-8-8a1 1 0 0 0 -0.7207 -0.29102z" fill="#4f4f4f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_tile_map.svg b/editor/icons/dark/icon_tile_map.svg
deleted file mode 100644
index 9de80deff8..0000000000
--- a/editor/icons/dark/icon_tile_map.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 1v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-12 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-12 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-12 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-12 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2z" fill="#6d90ff" fill-opacity=".98824"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_tile_set.svg b/editor/icons/dark/icon_tile_set.svg
deleted file mode 100644
index 547af99872..0000000000
--- a/editor/icons/dark/icon_tile_set.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 1v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-12 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-12 3v2h2v-2h-2zm3 0v2h2v-2h-2zm5 1v1 5 1h5c0.55228 0 1-0.44772 1-1v-5c0-0.55228-0.44772-1-1-1v4l-1-1-1 1v-4h-3zm-8 2v2h2v-2h-2zm3 0v2h2v-2h-2zm-3 3v2h2v-2h-2zm3 0v2h2v-2h-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_timer.svg b/editor/icons/dark/icon_timer.svg
deleted file mode 100644
index 9efb856c7d..0000000000
--- a/editor/icons/dark/icon_timer.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="2" y="1037.4" width="12" height="2" ry="1" fill="#4f4f4f"/>
-<rect x="2" y="1049.4" width="12" height="2" ry="1" fill="#4f4f4f"/>
-<path d="m3 1050.4h10l-3-6h-4z" fill="#4f4f4f"/>
-<path d="m3 1038.4h10c0 2-3 4-4 6 1 2 4 4 4 6h-10c0-2 3-4 4-6-1-2-4-4-4-6z" fill="none" stroke="#4f4f4f" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_tool_button.svg b/editor/icons/dark/icon_tool_button.svg
deleted file mode 100644
index db3fdb8c84..0000000000
--- a/editor/icons/dark/icon_tool_button.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="2" y="1047.4" width="6" height="4" ry="1.5" fill="#29d739"/>
-<rect x="1" y="1049.4" width="8" height="2" ry="0" fill="#29d739"/>
-<path d="m2 1042.4 3 2 3-2" fill="none" stroke="#29d739" stroke-linejoin="round" stroke-width="2"/>
-<path d="m5 1039.4v5" fill="none" stroke="#29d739" stroke-width="2"/>
-<g transform="translate(9,-1)" fill="#29d739">
-<path d="m2 1038.5c-1.1979 0.4235-1.999 1.5557-2 2.8262 9.552e-4 1.2705 0.80214 2.4027 2 2.8262v7.1738c0 0.554 0.446 1 1 1s1-0.446 1-1v-7.1758c1.1972-0.4232 1.9982-1.5544 2-2.8242-0.00178-1.2698-0.80282-2.401-2-2.8242v2.8242c0 0.5523-0.44772 1-1 1s-1-0.4477-1-1z" fill="#29d739"/>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_tool_move.svg b/editor/icons/dark/icon_tool_move.svg
deleted file mode 100644
index e5452a5691..0000000000
--- a/editor/icons/dark/icon_tool_move.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7.9844 1.002a1.0001 1.0001 0 0 0 -0.69141 0.29102l-2 2 1.4141 1.4141 1.293-1.293 1.293 1.293 1.4141-1.4141-2-2a1.0001 1.0001 0 0 0 -0.72266 -0.29102zm-4.6914 4.291l-2 2a1.0001 1.0001 0 0 0 0 1.4141l2 2 1.4141-1.4141-1.293-1.293 1.293-1.293-1.4141-1.4141zm9.4141 0l-1.4141 1.4141 1.293 1.293-1.293 1.293 1.4141 1.4141 2-2a1.0001 1.0001 0 0 0 0 -1.4141l-2-2zm-4.707 0.70703a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2zm-1.293 5.293l-1.4141 1.4141 2 2a1.0001 1.0001 0 0 0 1.4141 0l2-2-1.4141-1.4141-1.293 1.293-1.293-1.293z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_tool_pan.svg b/editor/icons/dark/icon_tool_pan.svg
deleted file mode 100644
index c072e57b00..0000000000
--- a/editor/icons/dark/icon_tool_pan.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m6 8v7h6v-2h2v-5h-8z"/>
-<rect x="6" y="1039.4" width="2" height="8"/>
-<rect x="9" y="1038.4" width="2" height="8"/>
-<rect x="12" y="1040.4" width="2" height="8"/>
-<circle cx="7" cy="1039.4" r="1"/>
-<circle cx="10" cy="1038.4" r="1"/>
-<circle cx="13" cy="1040.4" r="1"/>
-<circle cx="12" cy="1049.4" r="2"/>
-<path d="m3.5251 1045.6c-0.52015-0.3803-1.1943-0.4556-1.6499 0-0.45566 0.4556-0.45564 1.1943-2.36e-5 1.6499l4.1248 4.1248 1.6499-2.7593z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_tool_rotate.svg b/editor/icons/dark/icon_tool_rotate.svg
deleted file mode 100644
index 39a208bb2b..0000000000
--- a/editor/icons/dark/icon_tool_rotate.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m8.0879 1.002a7 7 0 0 0 -0.30469 0.0019531 7 7 0 0 0 -0.69727 0.056641 7 7 0 0 0 -5.9512 5.5742 7 7 0 0 0 1.9707 6.3652h-1.1055v2h4a1.0001 1.0001 0 0 0 0.9707 -1.2422l-1-4-1.9414 0.48633 0.28125 1.1211a5 5 0 0 1 -1.3105 -3.3652 5 5 0 0 1 5 -5 5 5 0 0 1 5 5 5 5 0 0 1 -1.4668 3.5332l1.416 1.416a7 7 0 0 0 1.3281 -8.0449 7 7 0 0 0 -6.1895 -3.9023zm-0.087891 4.998a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2z" fill="#4f4f4f" fill-opacity=".99608" stroke-width="0"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_tool_scale.svg b/editor/icons/dark/icon_tool_scale.svg
deleted file mode 100644
index 823baf4dda..0000000000
--- a/editor/icons/dark/icon_tool_scale.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m9 1a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h2.5859l-1.293 1.293 1.4141 1.4141 1.293-1.293v2.5859a1 1 0 0 0 1 1 1 1 0 0 0 1 -1v-5a1.0001 1.0001 0 0 0 -1 -1h-5zm-1 5a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2zm-6 2a1 1 0 0 0 -1 1v5a1.0001 1.0001 0 0 0 1 1h5a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-2.5859l1.293-1.293-1.4141-1.4141-1.293 1.293v-2.5859a1 1 0 0 0 -1 -1z" fill="#4f4f4f" fill-opacity=".99608" stroke-width="0"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_tool_select.svg b/editor/icons/dark/icon_tool_select.svg
deleted file mode 100644
index cd2a4c9e28..0000000000
--- a/editor/icons/dark/icon_tool_select.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<g transform="translate(-26.001 -9.8683)">
-<path d="m40.001 1053.2-12-4.9365 4.9365 12 1.4207-4.2301 2.8254 2.8252 1.4127-1.4127-2.8254-2.8252z" fill="#4f4f4f"/>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_tools.svg b/editor/icons/dark/icon_tools.svg
deleted file mode 100644
index 70da072dec..0000000000
--- a/editor/icons/dark/icon_tools.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m4 1l-1 2 1 2v4h-2v3 0.5c0 1.385 1.115 2.5 2.5 2.5s2.5-1.115 2.5-2.5v-1-2.5h-2v-4l1-2-1-2h-1zm6 0.17383a3 3 0 0 0 -2 2.8262 3 3 0 0 0 2 2.8262v6.1738 1c0 0.554 0.446 1 1 1s1-0.446 1-1v-4-3.1758a3 3 0 0 0 2 -2.8242 3 3 0 0 0 -2 -2.8242v2.8242a1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1v-2.8262z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_touch_screen_button.svg b/editor/icons/dark/icon_touch_screen_button.svg
deleted file mode 100644
index b6b86bf781..0000000000
--- a/editor/icons/dark/icon_touch_screen_button.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1a1 1 0 0 0 -1 1v2a1 1 0 0 0 1 1h2v-1h-1-1v-2h8v2h-2v1h2a1 1 0 0 0 1 -1v-2a1 1 0 0 0 -1 -1h-8zm4 2a1 1 0 0 0 -1 1v7 0.033203l-2.4746-1.8086c-0.52015-0.3803-1.1948-0.4556-1.6504 0-0.45566 0.4556-0.45561 1.1948 0 1.6504l4.125 4.125h6c1.1046 0 2-0.8954 2-2v-5h-6v-4a1 1 0 0 0 -1 -1z" fill="#6d90ff" fill-opacity=".98824"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_track_add_key.svg b/editor/icons/dark/icon_track_add_key.svg
deleted file mode 100644
index 91e4230cbe..0000000000
--- a/editor/icons/dark/icon_track_add_key.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<path transform="translate(0 1044.4)" d="m3 0v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2z" fill="#00f010"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_track_add_key_hl.svg b/editor/icons/dark/icon_track_add_key_hl.svg
deleted file mode 100644
index f710873b43..0000000000
--- a/editor/icons/dark/icon_track_add_key_hl.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<path transform="translate(0 1044.4)" d="m3 0v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2z" fill="#00f010"/>
-<path transform="translate(0 1044.4)" d="m3 0v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2z" fill="#000000" fill-opacity=".42424"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_track_continuous.svg b/editor/icons/dark/icon_track_continuous.svg
deleted file mode 100644
index a7b9b13a4c..0000000000
--- a/editor/icons/dark/icon_track_continuous.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="8" version="1.1" viewBox="0 0 16 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<path d="m2 1050.4c6 0 6-4 12-4" fill="none" stroke="#4f4f4f" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_track_discrete.svg b/editor/icons/dark/icon_track_discrete.svg
deleted file mode 100644
index 0a5c875c40..0000000000
--- a/editor/icons/dark/icon_track_discrete.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="8" version="1.1" viewBox="0 0 16 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)" fill="#4f4f4f">
-<circle cx="2" cy="1050.4" r="1"/>
-<circle cx="8" cy="1048.4" r="1"/>
-<circle cx="14" cy="1046.4" r="1"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_track_trigger.svg b/editor/icons/dark/icon_track_trigger.svg
deleted file mode 100644
index 439ef84961..0000000000
--- a/editor/icons/dark/icon_track_trigger.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="8" version="1.1" viewBox="0 0 16 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)" fill="#4f4f4f">
-<circle cx="11" cy="1048.4" r="1"/>
-<circle cx="14" cy="1046.4" r="1"/>
-<rect x="1" y="1045.4" width="6" height="2"/>
-<rect x="3" y="1047.4" width="2" height="4"/>
-<circle cx="8" cy="1050.4" r="1"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_translation.svg b/editor/icons/dark/icon_translation.svg
deleted file mode 100644
index 131ed1b2d3..0000000000
--- a/editor/icons/dark/icon_translation.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m2 1v14h10a2 2 0 0 0 2 -2v-10a2 2 0 0 0 -2 -2v5 2l-2-2-2 2v-2-5h-6z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_transpose.svg b/editor/icons/dark/icon_transpose.svg
deleted file mode 100644
index 551c83137a..0000000000
--- a/editor/icons/dark/icon_transpose.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<rect x="1" y="1037.4" width="2" height="14"/>
-<rect x="1" y="1037.4" width="14" height="2"/>
-<rect x="1" y="1049.4" width="7" height="2"/>
-<rect x="6" y="1037.4" width="2" height="14"/>
-<rect x="1" y="1042.4" width="14" height="2"/>
-<rect transform="rotate(90)" x="1037.4" y="-15" width="7" height="2"/>
-<path d="m15 1051.4h-5l5-5z" fill-rule="evenodd"/>
-<rect x="8" y="1039.4" width="5" height="3"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_tree.svg b/editor/icons/dark/icon_tree.svg
deleted file mode 100644
index 27855a9e6d..0000000000
--- a/editor/icons/dark/icon_tree.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="20" y="1042.4" width="1" height="1" fill="#fefeff"/>
-<rect x="29" y="1042.4" width="1" height="1" fill="#fefeff"/>
-<rect x="1" y="1037.4" width="14" height="2" fill="#29d739"/>
-<rect x="6" y="1041.4" width="9" height="2" fill="#29d739"/>
-<rect x="7" y="1045.4" width="8" height="2" fill="#29d739"/>
-<rect x="7" y="1049.4" width="8" height="2" fill="#29d739"/>
-<path d="m2 1038.4v4h4" fill="none" stroke="#29d739" stroke-linejoin="round" stroke-width="2"/>
-<path d="m6 1042.4v4h3" fill="none" stroke="#29d739" stroke-linejoin="round" stroke-width="2"/>
-<path d="m2 1040.4v10h7" fill="none" stroke="#29d739" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_tween.svg b/editor/icons/dark/icon_tween.svg
deleted file mode 100644
index 1d553c7a53..0000000000
--- a/editor/icons/dark/icon_tween.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7 1v2h6v6h2v-8h-8zm-1 4l1.793 1.793-4.793 4.793v-4.5859h-2v8h8v-2h-4.5859l4.793-4.793 1.793 1.793v-5h-5z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#bb6dff" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_unbone.svg b/editor/icons/dark/icon_unbone.svg
deleted file mode 100644
index 1d1fee54cc..0000000000
--- a/editor/icons/dark/icon_unbone.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m10.479 1a2.4664 2.4663 0 0 0 -1.7813 0.7207 2.4664 2.4663 0 0 0 -0.31445 3.1035l-1.0723 1.0723 2.791 2.791 1.0762-1.0742a2.4664 2.4663 0 0 0 3.0996 -0.31055 2.4664 2.4663 0 0 0 0 -3.4883 2.4664 2.4663 0 0 0 -1.3965 -0.69727 2.4664 2.4663 0 0 0 -0.69531 -1.3965 2.4664 2.4663 0 0 0 -1.707 -0.7207zm-4.582 6.3105l-1.0723 1.0742a2.4664 2.4663 0 0 0 -3.1016 0.3125 2.4664 2.4663 0 0 0 0 3.4883 2.4664 2.4663 0 0 0 1.3965 0.69531 2.4664 2.4663 0 0 0 0.69531 1.3965 2.4664 2.4663 0 0 0 3.4883 0 2.4664 2.4663 0 0 0 0.31445 -3.1035l1.0703-1.0723-2.791-2.791z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_ungroup.svg b/editor/icons/dark/icon_ungroup.svg
deleted file mode 100644
index 7bebe96e76..0000000000
--- a/editor/icons/dark/icon_ungroup.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m7 1037.4v6h-6v8h8v-6h6v-8zm2 2h4v4h-4z" fill="#4f4f4f" fill-opacity=".39216"/>
-<path transform="translate(0 1036.4)" d="m7 1v2c0 2.34e-5 0.446 0 1 0s1 2.34e-5 1 0v-2c0-2.341e-5 -0.446 0-1 0s-1-2.341e-5 -1 0zm6 0v2c0 2.34e-5 0.446 0 1 0s1 2.34e-5 1 0v-2c0-2.341e-5 -0.446 0-1 0s-1-2.341e-5 -1 0zm-12 6v2c0 2.34e-5 0.446 0 1 0s1 2.34e-5 1 0v-2c0-2.34e-5 -0.446 0-1 0s-1-2.34e-5 -1 0zm6 0v2c0 2.34e-5 0.446 0 1 0s1 2.34e-5 1 0v-2c0-2.34e-5 -0.446 0-1 0s-1-2.34e-5 -1 0zm6 0v2c0 2.34e-5 0.446 0 1 0s1 2.34e-5 1 0v-2c0-2.34e-5 -0.446 0-1 0s-1-2.34e-5 -1 0zm-12 6v2c0 2.3e-5 0.446 0 1 0s1 2.3e-5 1 0v-2c0-2.3e-5 -0.446 0-1 0s-1-2.3e-5 -1 0zm6 0v2c0 2.3e-5 0.446 0 1 0s1 2.3e-5 1 0v-2c0-2.3e-5 -0.446 0-1 0s-1-2.3e-5 -1 0z" fill="#000000"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_unlock.svg b/editor/icons/dark/icon_unlock.svg
deleted file mode 100644
index 1eb65383a5..0000000000
--- a/editor/icons/dark/icon_unlock.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path transform="translate(0 1036.4)" d="m2 8v7h12v-7h-12zm5 2h2v3h-2v-3z"/>
-<path transform="translate(0 1036.4)" d="m8 1c-0.87738 0.001545-1.7389 0.23394-2.498 0.67383l1 1.7324c0.45506-0.26449 0.97171-0.40459 1.498-0.40625 1.6569 0 3 1.3431 3 3h2c0-2.7614-2.2386-5-5-5z"/>
-<rect x="11" y="1042.4" width="2" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_uv.svg b/editor/icons/dark/icon_uv.svg
deleted file mode 100644
index 15e76053e0..0000000000
--- a/editor/icons/dark/icon_uv.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 5v4a3 3 0 0 0 1.5 2.5977 3 3 0 0 0 3 0 3 3 0 0 0 1.5 -2.5977v-4h-2v4a1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1v-4h-2zm8 0l2 7h1 1 1l2-7h-2l-1.5 5.25-1.5-5.25h-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_v_box_container.svg b/editor/icons/dark/icon_v_box_container.svg
deleted file mode 100644
index 8cabe8a4a1..0000000000
--- a/editor/icons/dark/icon_v_box_container.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m15 1039.4c0-1.1046-0.89543-2-2-2h-10c-1.1046 0-2 0.8954-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.8954 2-2v-10zm-2 0v2h-10v-2h10zm0 4v2h-10v-2h10zm0 4v2h-10v-2h10z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_v_button_array.svg b/editor/icons/dark/icon_v_button_array.svg
deleted file mode 100644
index 9c2e5cecc6..0000000000
--- a/editor/icons/dark/icon_v_button_array.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<path transform="translate(0 1036.4)" d="m7 1v2.1328l-1.4453-0.96484-1.1094 1.6641 3 2c0.3359 0.2239 0.77347 0.2239 1.1094 0l3-2-1.1094-1.6641-1.4453 0.96484v-2.1328h-2zm-0.5 6c-0.831 0-1.5 0.669-1.5 1.5v0.5h-1v2h2v-2h4v2h2v-2h-1v-0.5c0-0.831-0.669-1.5-1.5-1.5h-3z"/>
-<path d="m7 1046.4v2h-2v2h2v2h2v-2h2v-2h-2v-2z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_v_scroll_bar.svg b/editor/icons/dark/icon_v_scroll_bar.svg
deleted file mode 100644
index 3ea3a124c6..0000000000
--- a/editor/icons/dark/icon_v_scroll_bar.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m5 1c-1.108 0-2 0.89199-2 2v10c0 1.108 0.89199 2 2 2h6c1.108 0 2-0.89199 2-2v-10c0-1.108-0.89199-2-2-2h-6zm2.9883 1a1.0001 1.0001 0 0 1 0.56641 0.16797l3 2a1.0001 1.0001 0 1 1 -1.1094 1.6641l-2.4453-1.6289-2.4453 1.6289a1.0001 1.0001 0 1 1 -1.1094 -1.6641l3-2a1.0001 1.0001 0 0 1 0.54297 -0.16797zm-2.998 7.9922a1.0001 1.0001 0 0 1 0.56445 0.17578l2.4453 1.6309 2.4453-1.6309a1.0001 1.0001 0 1 1 1.1094 1.6641l-3 2a1.0001 1.0001 0 0 1 -1.1094 0l-3-2a1.0001 1.0001 0 0 1 0.54492 -1.8398z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_v_separator.svg b/editor/icons/dark/icon_v_separator.svg
deleted file mode 100644
index c9d6b879a4..0000000000
--- a/editor/icons/dark/icon_v_separator.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m2 1047.4h3v-6h-3v6zm5 4h2v-14h-2v14zm4-4h3v-6h-3v6z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_v_slider.svg b/editor/icons/dark/icon_v_slider.svg
deleted file mode 100644
index 0ef58d34e5..0000000000
--- a/editor/icons/dark/icon_v_slider.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m6 1050.4a1.0001 1.0001 0 1 1 -2 0v-2.1308a4 4 0 0 0 1 0.1308 4 4 0 0 0 1 -0.1328zm0-9.8691a4 4 0 0 0 -1 -0.1309 4 4 0 0 0 -1 0.1329v-2.1329a1.0001 1.0001 0 1 1 2 0z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#29d739" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-<circle transform="matrix(0,-1,-1,0,0,0)" cx="-1039.4" cy="-5" r="2" fill="#29d739"/>
-<path d="m12 1038.4h-2" fill="none" stroke="#29d739" stroke-linecap="round" stroke-width="2"/>
-<path d="m11 1044.4v0" fill="none" stroke="#29d739" stroke-linecap="round" stroke-width="2"/>
-<path d="m12 1050.4h-2" fill="none" stroke="#29d739" stroke-linecap="round" stroke-width="2"/>
-<path d="m6 1049.4h-2v-6.1308a4 4 0 0 0 1 0.1308 4 4 0 0 0 1 -0.1328z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_v_split_container.svg b/editor/icons/dark/icon_v_split_container.svg
deleted file mode 100644
index 4ad51b4fbe..0000000000
--- a/editor/icons/dark/icon_v_split_container.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#29d739">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2zm0 2h10v10h-10z"/>
-<rect transform="rotate(90)" x="1043.4" y="-13" width="2" height="10"/>
-<path d="m10 1045.4h-4l2 2z"/>
-<path d="m10 1043.4-2-2-2 2z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_variant.svg b/editor/icons/dark/icon_variant.svg
deleted file mode 100644
index dded24a52d..0000000000
--- a/editor/icons/dark/icon_variant.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<g transform="translate(0,-3)" fill="#4f4f4f">
-<rect x="3" y="1044.4" width="2" height="6"/>
-<rect x="6" y="1044.4" width="2" height="6"/>
-<rect x="3" y="1044.4" width="1" height="2"/>
-<path d="m3 1044.4a3 3 0 0 0 -3 3h2a1 1 0 0 1 1 -1z"/>
-<path d="m14 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1z"/>
-<rect transform="scale(1,-1)" x="14" y="-1052.4" width="2" height="8"/>
-<rect transform="scale(1,-1)" x="11" y="-1047.4" width="2" height="3"/>
-<path d="m3 1050.4a3 3 0 0 1 -3 -3h2a1 1 0 0 0 1 1z"/>
-<path d="m8 1044.4a3 3 0 0 1 3 3h-2a1 1 0 0 0 -1 -1z"/>
-<rect x="9" y="1047.4" width="2" height="3"/>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_vector.svg b/editor/icons/dark/icon_vector.svg
deleted file mode 100644
index dda46edeaa..0000000000
--- a/editor/icons/dark/icon_vector.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)" fill="none" stroke="#b8ea68" stroke-width="2">
-<path d="m7 1047.4-4 4"/>
-<path d="m7 1040.4v7h7"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_vector2.svg b/editor/icons/dark/icon_vector2.svg
deleted file mode 100644
index ab92e7bb60..0000000000
--- a/editor/icons/dark/icon_vector2.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1040.4)">
-<path d="m4 1041.4v9h9" fill="none" stroke="#b8ea68" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_vehicle_body.svg b/editor/icons/dark/icon_vehicle_body.svg
deleted file mode 100644
index 1afbe9229d..0000000000
--- a/editor/icons/dark/icon_vehicle_body.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff5f5f" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m5 3a1 1 0 0 0 -1 1l-1 3h-2v4h1.0508c0.23167-1.1411 1.2398-2 2.4492-2s2.2175 0.85893 2.4492 2h2.1016c0.23167-1.1411 1.2398-2 2.4492-2s2.2175 0.85893 2.4492 2h1.0508v-4h-4v-4h-6zm1 1h4v3h-4v-3z"/>
-<circle cx="4.5" cy="1047.9" r="1.5"/>
-<circle cx="11.5" cy="1047.9" r="1.5"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_vehicle_wheel.svg b/editor/icons/dark/icon_vehicle_wheel.svg
deleted file mode 100644
index 40f28709bc..0000000000
--- a/editor/icons/dark/icon_vehicle_wheel.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff5f5f" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm0 2a5 5 0 0 1 5 5 5 5 0 0 1 -5 5 5 5 0 0 1 -5 -5 5 5 0 0 1 5 -5z"/>
-<path transform="translate(0 1036.4)" d="m8 4a4 4 0 0 0 -4 4 4 4 0 0 0 4 4 4 4 0 0 0 4 -4 4 4 0 0 0 -4 -4zm0 1a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm-2 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm4 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm-2 2a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_video_player.svg b/editor/icons/dark/icon_video_player.svg
deleted file mode 100644
index 1cfd25eea3..0000000000
--- a/editor/icons/dark/icon_video_player.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="2" y="1038.4" width="12" height="12" ry="1" fill="none" stroke="#29d739" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-<path d="m6 1045.4v-4l4 2z" fill="#29d739" fill-rule="evenodd"/>
-<rect x="3" y="1047.4" width="10" height="2" ry="0" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_viewport.svg b/editor/icons/dark/icon_viewport.svg
deleted file mode 100644
index 6e583ca62f..0000000000
--- a/editor/icons/dark/icon_viewport.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 2c-0.5304 8.01e-5 -1.0391 0.21085-1.4141 0.58594-0.37509 0.37501-0.58586 0.88366-0.58594 1.4141v8c8.03e-5 0.5304 0.21085 1.0391 0.58594 1.4141 0.37501 0.37509 0.88366 0.58586 1.4141 0.58594h10c1.1046 0 2-0.89543 2-2v-8c0-1.1046-0.89543-2-2-2zm0 1h10c0.55228 9.6e-6 0.99999 0.44772 1 1v8c-1e-5 0.55228-0.44772 0.99999-1 1h-10c-0.55228-1e-5 -0.99999-0.44772-1-1v-8c9.6e-6 -0.55228 0.44772-0.99999 1-1z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_viewport_container.svg b/editor/icons/dark/icon_viewport_container.svg
deleted file mode 100644
index 3518756177..0000000000
--- a/editor/icons/dark/icon_viewport_container.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2zm0 2h10v10h-10zm3 1c-0.5304 1e-4 -1.0391 0.21084-1.4141 0.58594-0.37509 0.375-0.58586 0.88366-0.58594 1.4141v4c8e-5 0.5304 0.21085 1.0391 0.58594 1.4141 0.37501 0.3751 0.88366 0.58584 1.4141 0.58594h4c1.1046 0 2-0.8954 2-2v-4c0-1.1046-0.89543-2-2-2zm0 1h4c0.55228 0 0.99999 0.4477 1 1v4c-1e-5 0.5523-0.44772 1-1 1h-4c-0.55228 0-0.99999-0.4477-1-1v-4c1e-5 -0.5523 0.44772-1 1-1z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_viewport_sprite.svg b/editor/icons/dark/icon_viewport_sprite.svg
deleted file mode 100644
index e2addce984..0000000000
--- a/editor/icons/dark/icon_viewport_sprite.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="20" y="1042.4" width="1" height="1" fill="#fefeff"/>
-<rect x="29" y="1042.4" width="1" height="1" fill="#fefeff"/>
-<path transform="translate(0 1036.4)" d="m3 2c-0.5304 8.01e-5 -1.0391 0.21085-1.4141 0.58594-0.37509 0.37501-0.58586 0.88366-0.58594 1.4141v8c8.03e-5 0.5304 0.21085 1.0391 0.58594 1.4141 0.37501 0.37509 0.88366 0.58586 1.4141 0.58594h10c1.1046 0 2-0.89543 2-2v-8c0-1.1046-0.89543-2-2-2zm0 1h10c0.55228 9.6e-6 0.99999 0.44772 1 1v8c-1e-5 0.55228-0.44772 0.99999-1 1h-10c-0.55228-1e-5 -0.99999-0.44772-1-1v-8c9.6e-6 -0.55228 0.44772-0.99999 1-1z" fill="#6d90ff" fill-opacity=".98824"/>
-<rect x="4" y="1042.4" width="2" height="2" fill="#6d90ff" fill-opacity=".98824"/>
-<rect x="10" y="1042.4" width="2" height="2" fill="#6d90ff" fill-opacity=".98824"/>
-<rect x="4" y="1045.4" width="8" height="1" fill="#6d90ff" fill-opacity=".98824"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_viewport_texture.svg b/editor/icons/dark/icon_viewport_texture.svg
deleted file mode 100644
index c4e2a2dbda..0000000000
--- a/editor/icons/dark/icon_viewport_texture.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 2c-0.5304 8.01e-5 -1.0391 0.21085-1.4141 0.58594-0.37509 0.37501-0.58586 0.88366-0.58594 1.4141v8c8.03e-5 0.5304 0.21085 1.0391 0.58594 1.4141 0.37501 0.37509 0.88366 0.58586 1.4141 0.58594h10c1.1046 0 2-0.89543 2-2v-8c0-1.1046-0.89543-2-2-2h-10zm0 1h10c0.55228 9.6e-6 0.99999 0.44772 1 1v8c-1e-5 0.55228-0.44772 0.99999-1 1h-10c-0.55228-1e-5 -0.99999-0.44772-1-1v-8c9.6e-6 -0.55228 0.44772-0.99999 1-1zm6 3v1h-1v1h-2v1h-1v1h-1v1h2 2 2 2v-2h-1v-1-1h-1v-1h-1z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_visibility_enabler.svg b/editor/icons/dark/icon_visibility_enabler.svg
deleted file mode 100644
index 0bc3449b07..0000000000
--- a/editor/icons/dark/icon_visibility_enabler.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff5f5f" fill-opacity=".99608">
-<g transform="translate(-.00015202)">
-<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.00586 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0 -0.55273c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<circle cx="8" cy="1044.4" r="2"/>
-</g>
-<path transform="translate(0 1036.4)" d="m1 1v3h1v-2h2v-1h-3zm11 0v1h2v2h1v-3h-3zm-11 11v3h3v-1h-2v-2h-1zm13 0v2h-2v1h3v-3h-1z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_visibility_enabler_2d.svg b/editor/icons/dark/icon_visibility_enabler_2d.svg
deleted file mode 100644
index 23a66501f7..0000000000
--- a/editor/icons/dark/icon_visibility_enabler_2d.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#6d90ff" fill-opacity=".98824">
-<g transform="translate(-.00015202)">
-<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.00586 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0 -0.55273c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<circle cx="8" cy="1044.4" r="2"/>
-</g>
-<path transform="translate(0 1036.4)" d="m1 1v3h1v-2h2v-1h-3zm11 0v1h2v2h1v-3h-3zm-11 11v3h3v-1h-2v-2h-1zm13 0v2h-2v1h3v-3h-1z"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_visibility_notifier.svg b/editor/icons/dark/icon_visibility_notifier.svg
deleted file mode 100644
index d4c56afd65..0000000000
--- a/editor/icons/dark/icon_visibility_notifier.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#ff5f5f" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m8 3c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246 1.4907 0 3.2717-0.65207 4.7109-2h-0.71094-2v-0.54102a4 4 0 0 1 -2 0.54102 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4 4 4 0 0 1 2 0.54102v-2.1816c-0.68312-0.23834-1.3644-0.35938-2-0.35938zm0 4a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<rect x="12" y="1037.4" width="2" height="6"/>
-<rect transform="scale(1,-1)" x="12" y="-1047.4" width="2" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_visibility_notifier_2d.svg b/editor/icons/dark/icon_visibility_notifier_2d.svg
deleted file mode 100644
index c84c2dbfca..0000000000
--- a/editor/icons/dark/icon_visibility_notifier_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m12 1v6h2v-6h-2zm-4 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246 1.4907 0 3.2717-0.65207 4.7109-2h-0.71094-2v-0.54102a4 4 0 0 1 -2 0.54102 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4 4 4 0 0 1 2 0.54102v-2.1816c-0.68312-0.23834-1.3644-0.35938-2-0.35938zm0 4a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2zm4 2v2h2v-2h-2z" color="#000000" color-rendering="auto" fill="#6d90ff" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_visible.svg b/editor/icons/dark/icon_visible.svg
deleted file mode 100644
index 784cd15d1e..0000000000
--- a/editor/icons/dark/icon_visible.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0 -0.55273c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4z" color="#000000" color-rendering="auto" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<circle cx="8" cy="1044.4" r="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_visual_script.svg b/editor/icons/dark/icon_visual_script.svg
deleted file mode 100644
index 96fcca46ab..0000000000
--- a/editor/icons/dark/icon_visual_script.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<ellipse cx="3" cy="1039.4" r="2" fill="#6e6e6e"/>
-<path transform="translate(0 1036.4)" d="m7 1l-0.56445 2.2578a5 5 0 0 0 -0.68945 0.2793l-1.9883-1.1934-1.4141 1.4141 1.1953 1.9941a5 5 0 0 0 -0.28516 0.68555l-2.2539 0.5625v2h5.2715a2 2 0 0 1 -0.27148 -1 2 2 0 0 1 2 -2 2 2 0 0 1 2 2 2 2 0 0 1 -0.26953 1h5.2695v-2l-2.2578-0.56445a5 5 0 0 0 -0.2793 -0.6875l1.1934-1.9902-1.4141-1.4141-1.9941 1.1953a5 5 0 0 0 -0.68555 -0.28516l-0.5625-2.2539h-2zm-4 9v6h2a3 3 0 0 0 3 -3v-3h-2v3a1 1 0 0 1 -1 1v-4h-2zm8 0a2 2 0 0 0 -1.7324 1 2 2 0 0 0 0 2 2 2 0 0 0 1.7324 1h-2v2h2a2 2 0 0 0 1.7324 -1 2 2 0 0 0 0 -2 2 2 0 0 0 -1.7324 -1h2v-2h-2z" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_visual_shader_port.svg b/editor/icons/dark/icon_visual_shader_port.svg
deleted file mode 100644
index 0f5d00dbc4..0000000000
--- a/editor/icons/dark/icon_visual_shader_port.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="10" height="10" version="1.1" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1042.4)">
-<path d="m2 1051.4v-8l6 4z" fill="#f3f3f3" fill-rule="evenodd" stroke="#e4e4e4" stroke-linejoin="round" stroke-width="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_vu_empty.svg b/editor/icons/dark/icon_vu_empty.svg
deleted file mode 100644
index ae2163a386..0000000000
--- a/editor/icons/dark/icon_vu_empty.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="128" height="4" version="1.1" viewBox="0 0 128 4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x2="128" y1="2" y2="2" gradientUnits="userSpaceOnUse">
-<stop stop-color="#00f010" offset="0"/>
-<stop stop-color="#d6cf4b" offset=".5"/>
-<stop stop-color="#ff4040" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1048.4)">
-<path transform="translate(0 1048.4)" d="m2 0a2 2 0 0 0 -2 2 2 2 0 0 0 2 2h75 3 2 3 15v-4h-15-3-2-3-75zm100 0v4h24a2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2h-24z" fill="url(#a)"/>
-<path transform="translate(0 1048.4)" d="m2 0a2 2 0 0 0 -2 2 2 2 0 0 0 2 2h75 3 2 3 15v-4h-15-3-2-3-75zm100 0v4h24a2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2h-24z" fill-opacity=".23529"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_vu_full.svg b/editor/icons/dark/icon_vu_full.svg
deleted file mode 100644
index e4035026d7..0000000000
--- a/editor/icons/dark/icon_vu_full.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="128" height="4" version="1.1" viewBox="0 0 128 4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<defs>
-<linearGradient id="a" x2="128" y1="2" y2="2" gradientUnits="userSpaceOnUse">
-<stop stop-color="#00f010" offset="0"/>
-<stop stop-color="#d6cf4b" offset=".5"/>
-<stop stop-color="#ff4040" offset="1"/>
-</linearGradient>
-</defs>
-<g transform="translate(0 -1048.4)">
-<path transform="translate(0 1048.4)" d="m2 0a2 2 0 0 0 -2 2 2 2 0 0 0 2 2h75 3 2 3 15v-4h-15-3-2-3-75zm100 0v4h24a2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2h-24z" fill="url(#a)"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_warning.svg b/editor/icons/dark/icon_warning.svg
deleted file mode 100644
index 0dec9c7bd4..0000000000
--- a/editor/icons/dark/icon_warning.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="8" height="8" version="1.1" viewBox="0 0 8 8" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1044.4)">
-<rect y="1044.4" width="8" height="8" ry="4" fill="#fea900"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_window_dialog.svg b/editor/icons/dark/icon_window_dialog.svg
deleted file mode 100644
index 39d231df9a..0000000000
--- a/editor/icons/dark/icon_window_dialog.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.8954-2 2v1h14v-1c0-1.1046-0.89543-2-2-2h-10zm9 1h1v1h-1v-1zm-11 3v8c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.8954 2-2v-8h-14z" fill="#29d739"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_world.svg b/editor/icons/dark/icon_world.svg
deleted file mode 100644
index 92e3529efc..0000000000
--- a/editor/icons/dark/icon_world.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<circle cx="6" cy="1046.4" r="5"/>
-<circle cx="12" cy="1039.4" r="1"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_world_2d.svg b/editor/icons/dark/icon_world_2d.svg
deleted file mode 100644
index e728ed313c..0000000000
--- a/editor/icons/dark/icon_world_2d.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path d="m2 1037.4a1.0001 1.0001 0 0 0 -1 1v10a1.0001 1.0001 0 0 0 1 1c2.3667 0 3.9746 0.4629 5.7246 0.9629s3.6421 1.0371 6.2754 1.0371a1.0001 1.0001 0 0 0 1 -1v-10a1.0001 1.0001 0 0 0 -1 -1c-2.3667 0-3.9746-0.4609-5.7246-0.9609-1.75-0.5-3.6421-1.0391-6.2754-1.0391zm1 2.0957c1.7984 0.1158 3.2574 0.448 4.7246 0.8672 1.4977 0.4279 3.194 0.8188 5.2754 0.9414v8.002c-1.7985-0.1158-3.2574-0.448-4.7246-0.8672-1.4977-0.4279-3.194-0.8208-5.2754-0.9434v-8z" color="#000000" color-rendering="auto" fill="#4f4f4f" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_world_environment.svg b/editor/icons/dark/icon_world_environment.svg
deleted file mode 100644
index c80e78f178..0000000000
--- a/editor/icons/dark/icon_world_environment.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="none" stroke="#ff5f5f" stroke-opacity=".99608">
-<circle cx="8" cy="1044.4" r="6" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-<path d="m2 1044.4c4.5932 1.582 8.3985 1.0627 12 0" stroke-width="1.5"/>
-<path d="m8 1038.4c-3 4-3 8 0 12" stroke-width="1.5"/>
-<path d="m8 1038.4c3 4 3 8 0 12" stroke-width="1.5"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_y_sort.svg b/editor/icons/dark/icon_y_sort.svg
deleted file mode 100644
index 914ecfed0d..0000000000
--- a/editor/icons/dark/icon_y_sort.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#6d90ff" fill-opacity=".98824">
-<rect x="9" y="1038.4" width="6" height="2"/>
-<path d="m3 1048.4h-2l3 3 3-3h-2v-8h2l-3-3-3 3h2z"/>
-<rect x="9" y="1043.4" width="4" height="2"/>
-<rect x="9" y="1048.4" width="2" height="2"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_zoom.svg b/editor/icons/dark/icon_zoom.svg
deleted file mode 100644
index ac185d3c9e..0000000000
--- a/editor/icons/dark/icon_zoom.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m6 1a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 2.752 -0.83398l4.3184 4.3184 1.4141-1.4141-4.3184-4.3184a5 5 0 0 0 0.41016 -0.75195h-0.57617v-2h-1a3 3 0 0 1 -3 3 3 3 0 0 1 -3 -3 3 3 0 0 1 3 -3 3 3 0 0 1 2 0.76758v-1.7676h0.99023a5 5 0 0 0 -2.9902 -1zm5 0v2h-2v2h2v2h2v-2h2v-2h-2v-2h-2z" fill="#4f4f4f" fill-opacity=".99608"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_zoom_less.svg b/editor/icons/dark/icon_zoom_less.svg
deleted file mode 100644
index ea7190c4ca..0000000000
--- a/editor/icons/dark/icon_zoom_less.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<rect x="1" y="1043.4" width="14" height="1.9999" fill="#4f4f4f"/>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_zoom_more.svg b/editor/icons/dark/icon_zoom_more.svg
deleted file mode 100644
index 046b569c1a..0000000000
--- a/editor/icons/dark/icon_zoom_more.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<g transform="translate(-201.58 205.03)">
-<g transform="matrix(48.459 0 0 53.968 -126.63 -55836)">
-<g transform="translate(.51853 -.019888)" fill="#4f4f4f" fill-opacity=".99608">
-<rect x="6.3979" y="1050.1" width=".042995" height=".26205" rx="0" ry="0"/>
-<rect x="6.2806" y="1050.2" width=".28011" height=".040944" rx="0" ry="0"/>
-</g>
-</g>
-</g>
-</g>
-</svg>
diff --git a/editor/icons/dark/icon_zoom_reset.svg b/editor/icons/dark/icon_zoom_reset.svg
deleted file mode 100644
index bb262bca9d..0000000000
--- a/editor/icons/dark/icon_zoom_reset.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#4f4f4f">
-<rect x="3" y="1037.4" width="2" height="14"/>
-<rect x="12" y="1037.4" width="2" height="14"/>
-<rect x="7" y="1046.4" width="2" height="2"/>
-<rect x="7" y="1040.4" width="2" height="2"/>
-<path d="m1 1040.4 2-3h2v3z" fill-rule="evenodd"/>
-<path d="m10 1040.4 2-3h2v3z" fill-rule="evenodd"/>
-</g>
-</svg>
diff --git a/editor/icons/icon_array_mesh.svg b/editor/icons/icon_array_mesh.svg
new file mode 100644
index 0000000000..68890c4366
--- /dev/null
+++ b/editor/icons/icon_array_mesh.svg
@@ -0,0 +1,5 @@
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2zm10 0a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2zm-2 7v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2zm-8 3a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#ffd684" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_audio_effect_amplify.svg b/editor/icons/icon_audio_effect_amplify.svg
index 1cb9be9b10..20612bbaf3 100644
--- a/editor/icons/icon_audio_effect_amplify.svg
+++ b/editor/icons/icon_audio_effect_amplify.svg
@@ -7,6 +7,6 @@
</linearGradient>
</defs>
<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m15 1-14 7h14zm-13 9v1h2v-1zm2 1v1h-2v-1h-1v4h1v-2h2v2h1v-4zm2-1v5h1v-4h1v4h1v-4h1v-1zm4 1v4h1v-4zm2-1v5h1v-2h2v-3zm1 1h1v1h-1z" fill="url(#a)"/>
+<path transform="translate(0 1036.4)" d="m2 1v8h2v-2h2v-2h-2v-2h3v-2zm6 0 2 4-2 4h2l1-2 1 2h2l-2-4 2-4h-2l-1 2-1-2zm-6 9v1h2v-1zm2 1v1h-2v-1h-1v4h1v-2h2v2h1v-4zm2-1v5h1v-4h1v4h1v-4h1v-1zm4 1v4h1v-4zm2-1v5h1v-2h2v-3zm1 1h1v1h-1z" fill="url(#a)"/>
</g>
</svg>
diff --git a/editor/icons/icon_clear.svg b/editor/icons/icon_clear.svg
new file mode 100644
index 0000000000..533054e37b
--- /dev/null
+++ b/editor/icons/icon_clear.svg
@@ -0,0 +1,5 @@
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m8 1a1 1 0 0 0 -1 1v5h-2c-1.108 0-2 0.892-2 2v1h10v-1c0-1.108-0.892-2-2-2h-2v-5a1 1 0 0 0 -1 -1zm-5 10v4l10-1v-3h-10z" fill="#e0e0e0" fill-opacity=".99608"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_collision_2d.svg b/editor/icons/icon_collision_polygon_2d.svg
index 9d90a66c6f..9d90a66c6f 100644
--- a/editor/icons/icon_collision_2d.svg
+++ b/editor/icons/icon_collision_polygon_2d.svg
diff --git a/editor/icons/icon_cube_mesh.svg b/editor/icons/icon_cube_mesh.svg
index 0ed3e5e12f..45275216ab 100644
--- a/editor/icons/icon_cube_mesh.svg
+++ b/editor/icons/icon_cube_mesh.svg
@@ -1,5 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 14.999999 14.999999" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1037.4)">
-<path d="m7.5 1038.2-6.5625 3.2804v6.772l0.49015 0.246 6.0723 3.0344 6.5625-3.2804v-6.772zm0 1.9831 3.6926 1.8463-3.6926 1.8463-3.6926-1.8463zm-4.7889 3.2804 3.9022 1.9502v3.6944l-3.9022-1.952zm9.5779 0v3.6926l-3.9022 1.952v-3.6944z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#ffd684" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+<path d="m7.5 1038.2-6.5625 3.2804v6.772l6.5625 3.2804 6.5625-3.2804v-6.772zm0 1.9831 3.6926 1.8463-3.6926 1.8463-3.6926-1.8463zm-4.7889 3.2804 3.9022 1.9502v3.6944l-3.9022-1.952zm9.5779 0v3.6926l-3.9022 1.952v-3.6944z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#ffd684" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_file_big_broken.svg b/editor/icons/icon_file_big_broken.svg
new file mode 100644
index 0000000000..167bb1bb5f
--- /dev/null
+++ b/editor/icons/icon_file_big_broken.svg
@@ -0,0 +1,7 @@
+<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -988.36)">
+<g transform="translate(0 -1.6949e-5)">
+<path transform="translate(0 988.36)" d="m14 5c-2.1987 0-4 1.8013-4 4v26.172a1.0001 1.0001 0 0 0 1.707 0.70703l3.293-3.293 9.293 9.293a1.0001 1.0001 0 0 0 1.4141 0l9.293-9.293 9.293 9.293a1.0001 1.0001 0 0 0 1.4141 0l8-8a1.0001 1.0001 0 0 0 0.29297 -0.70703v-11.172a1.0001 1.0001 0 0 0 -0.29297 -0.70703l-16-16a1.0001 1.0001 0 0 0 -0.70703 -0.29297h-23zm0 2h22v12c0 2.1987 1.8013 4 4 4h12v9.7578l-7 7-9.293-9.293a1.0001 1.0001 0 0 0 -1.4141 0l-9.293 9.293-9.293-9.293a1.0001 1.0001 0 0 0 -1.4141 0l-2.293 2.293v-23.758c0-1.1253 0.87473-2 2-2zm0.98438 28.83a1.0001 1.0001 0 0 0 -0.69141 0.29297l-4 4a1.0001 1.0001 0 0 0 -0.29297 0.70703v14.17c0 2.1987 1.8013 4 4 4h36c2.1987 0 4-1.8013 4-4v-16.17a1.0001 1.0001 0 0 0 -1.707 -0.70703l-7.293 7.293-9.293-9.293a1.0001 1.0001 0 0 0 -1.4141 0l-9.293 9.293-9.293-9.293a1.0001 1.0001 0 0 0 -0.72266 -0.29297zm0.015625 2.4141l9.293 9.293a1.0001 1.0001 0 0 0 1.4141 0l9.293-9.293 9.293 9.293a1.0001 1.0001 0 0 0 1.4141 0l6.293-6.293v13.756c0 1.1253-0.87473 2-2 2h-36c-1.1253 0-2-0.87473-2-2v-13.756l3-3z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#ff8484" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+</g>
+</g>
+</svg>
diff --git a/editor/icons/icon_file_big_dead.svg b/editor/icons/icon_file_big_dead.svg
new file mode 100644
index 0000000000..c8aab912f1
--- /dev/null
+++ b/editor/icons/icon_file_big_dead.svg
@@ -0,0 +1,7 @@
+<svg width="64" height="64" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -988.36)">
+<g transform="translate(0 -1.6949e-5)">
+<path d="m14 993.36c-2.1987 0-4 1.8013-4 4v46c0 2.1987 1.8013 4 4 4h36c2.1987 0 4-1.8013 4-4v-33h-0.0078c2e-3 -0.2483-0.0793-0.501-0.28516-0.707l-16-16c-0.18788-0.18693-0.44247-0.28939-0.70704-0.28907v-4e-3zm0 2h22v12c0 2.1987 1.8013 4 4 4h12v32c0 1.1253-0.87472 2-2 2h-36c-1.1253 0-2-0.8747-2-2v-46c0-1.1253 0.87472-2 2-2zm2.9512 22.002a1 1 0 0 0 -0.60938 0.2461 1 1 0 0 0 -0.09375 1.4121l2.9238 3.3398-2.9238 3.3418a1 1 0 0 0 0.09375 1.4121 1 1 0 0 0 1.4102 -0.094l2.748-3.1407 2.748 3.1407a1 1 0 0 0 1.4102 0.094 1 1 0 0 0 0.09375 -1.4121l-2.9238-3.3418 2.9238-3.3398a1 1 0 0 0 -0.09375 -1.4121 1 1 0 0 0 -0.63867 -0.2461 1 1 0 0 0 -0.77148 0.3398l-2.748 3.1406-2.748-3.1406a1 1 0 0 0 -0.80078 -0.3398zm23 0a1 1 0 0 0 -0.60938 0.2461 1 1 0 0 0 -0.09375 1.4121l2.9238 3.3398-2.9238 3.3418a1 1 0 0 0 0.09375 1.4121 1 1 0 0 0 1.4102 -0.094l2.748-3.1407 2.748 3.1407a1 1 0 0 0 1.4102 0.094 1 1 0 0 0 0.09375 -1.4121l-2.9238-3.3418 2.9238-3.3398a1 1 0 0 0 -0.09375 -1.4121 1 1 0 0 0 -0.63867 -0.2461 1 1 0 0 0 -0.77148 0.3398l-2.748 3.1406-2.748-3.1406a1 1 0 0 0 -0.80078 -0.3398zm-18.951 13.998a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h3v3c0 2.7527 2.2473 5 5 5s5-2.2473 5-5v-3h9a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1zm5 2h6v3c0 1.6793-1.3207 3-3 3s-3-1.3207-3-3z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#ff8484" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+</g>
+</g>
+</svg>
diff --git a/editor/icons/icon_file_broken.svg b/editor/icons/icon_file_broken.svg
new file mode 100644
index 0000000000..f352eeb001
--- /dev/null
+++ b/editor/icons/icon_file_broken.svg
@@ -0,0 +1,7 @@
+<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -1036.4)">
+<g transform="translate(0 -1.6949e-5)">
+<path transform="translate(0 1036.4)" d="m2 1v8.5859l1.293-1.293a1.0001 1.0001 0 0 1 0.69141 -0.29102 1.0001 1.0001 0 0 1 0.72266 0.29102l2.293 2.293 2.293-2.293a1.0001 1.0001 0 0 1 1.4141 0l2.293 2.293 1-1v-3.5859h-5v-5h-7zm8 0v4h4l-4-4zm-6 9.4141l-2 2v2.5859h12v-2.5859l-0.29297 0.29297a1.0001 1.0001 0 0 1 -1.4141 0l-2.293-2.293-2.293 2.293a1.0001 1.0001 0 0 1 -1.4141 0l-2.293-2.293z" fill="#ff8484"/>
+</g>
+</g>
+</svg>
diff --git a/editor/icons/icon_gizmo_camera.svg b/editor/icons/icon_gizmo_camera.svg
new file mode 100644
index 0000000000..f6e5f885e7
--- /dev/null
+++ b/editor/icons/icon_gizmo_camera.svg
@@ -0,0 +1,5 @@
+<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -924.36)">
+<path d="m76 944.36a24 24 0 0 0 -23.906 22.219 24 24 0 0 0 -16.094 -6.2192 24 24 0 0 0 -24 24 24 24 0 0 0 16 22.594v17.406c0 4.432 3.5679 8 8 8h48c4.4321 0 8-3.568 8-8v-8l24 16v-48l-24 16v-14.156a24 24 0 0 0 8 -17.844 24 24 0 0 0 -24 -24z" fill="#f7f5cf"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_gizmo_directional_light.svg b/editor/icons/icon_gizmo_directional_light.svg
index a8739a5a78..f7fa732501 100644
--- a/editor/icons/icon_gizmo_directional_light.svg
+++ b/editor/icons/icon_gizmo_directional_light.svg
@@ -1,5 +1,5 @@
<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -924.36)">
-<path transform="translate(0 924.36)" d="m64 4a8 8 0 0 0 -8 8v12a8 8 0 0 0 8 8 8 8 0 0 0 8 -8v-12a8 8 0 0 0 -8 -8zm-36.887 15.23a8 8 0 0 0 -5.5391 2.3438 8 8 0 0 0 0 11.312l8.4844 8.4863a8 8 0 0 0 11.314 0 8 8 0 0 0 0 -11.314l-8.4863-8.4844a8 8 0 0 0 -5.7734 -2.3438zm73.539 0a8 8 0 0 0 -5.5391 2.3438l-8.4863 8.4844a8 8 0 0 0 0 11.314 8 8 0 0 0 11.314 0l8.4844-8.4863a8 8 0 0 0 0 -11.312 8 8 0 0 0 -5.7734 -2.3438zm-36.652 20.77a24 24 0 0 0 -24 24 24 24 0 0 0 24 24 24 24 0 0 0 24 -24 24 24 0 0 0 -24 -24zm-52 16a8 8 0 0 0 -8 8 8 8 0 0 0 8 8h12a8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8h-12zm92 0a8 8 0 0 0 -8 8 8 8 0 0 0 8 8h12a8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8h-12zm-68.4 28.285a8 8 0 0 0 -5.541 2.3418l-8.4844 8.4863a8 8 0 0 0 0 11.312 8 8 0 0 0 11.312 0l8.4863-8.4844a8 8 0 0 0 0 -11.314 8 8 0 0 0 -5.7734 -2.3418zm56.568 0a8 8 0 0 0 -5.541 2.3418 8 8 0 0 0 0 11.314l8.4863 8.4844a8 8 0 0 0 11.312 0 8 8 0 0 0 0 -11.312l-8.4844-8.4863a8 8 0 0 0 -5.7734 -2.3418zm-28.168 11.715a8 8 0 0 0 -8 8v12a8 8 0 0 0 8 8 8 8 0 0 0 8 -8v-12a8 8 0 0 0 -8 -8z" fill="#f7f5cf"/>
+<path transform="translate(0 924.36)" d="m64 8c-2.216 0-4 1.784-4 4v16c0 2.216 1.784 4 4 4s4-1.784 4-4v-16c0-2.216-1.784-4-4-4zm-36.77 15.227c-1.0225 0-2.0447 0.39231-2.8281 1.1758-1.5669 1.5669-1.5669 4.0893 0 5.6562l11.312 11.314c1.5669 1.5669 4.0913 1.5669 5.6582 0s1.5669-4.0913 0-5.6582l-11.314-11.312c-0.78348-0.78348-1.8056-1.1758-2.8281-1.1758zm73.539 0c-1.0225 0-2.0446 0.39231-2.8281 1.1758l-11.314 11.312c-1.5669 1.5669-1.5669 4.0913 0 5.6582s4.0913 1.5669 5.6582 0l11.313-11.314c1.5669-1.5669 1.5669-4.0893 0-5.6562-0.78348-0.78348-1.8056-1.1758-2.8281-1.1758zm-36.77 20.773c-11.046 1e-5 -20 8.9543-20 20 7e-6 11.046 8.9543 20 20 20s20-8.9543 20-20c-8e-6 -11.046-8.9543-20-20-20zm-52 16c-2.216 0-4 1.784-4 4s1.784 4 4 4h16c2.216 0 4-1.784 4-4s-1.784-4-4-4h-16zm88 0c-2.216 0-4 1.784-4 4s1.784 4 4 4h16c2.216 0 4-1.784 4-4s-1.784-4-4-4h-16zm-61.455 25.453c-1.0225 0-2.0466 0.39035-2.8301 1.1738l-11.312 11.314c-1.5669 1.5669-1.5669 4.0893 0 5.6563 1.5669 1.5669 4.0893 1.5669 5.6562 0l11.314-11.313c1.5669-1.5669 1.5669-4.0913 0-5.6582-0.78347-0.78347-1.8056-1.1738-2.8281-1.1738zm50.91 0c-1.0225 0-2.0447 0.39035-2.8281 1.1738-1.5669 1.5669-1.5669 4.0913 0 5.6582l11.314 11.313c1.5669 1.5669 4.0893 1.5669 5.6563 0 1.5669-1.567 1.5669-4.0893 0-5.6563l-11.313-11.314c-0.78347-0.78347-1.8076-1.1738-2.8301-1.1738zm-25.455 10.547c-2.216 0-4 1.784-4 4v16c0 2.216 1.784 4 4 4s4-1.784 4-4v-16c0-2.216-1.784-4-4-4z" fill="#f7f5cf"/>
</g>
</svg>
diff --git a/editor/icons/icon_gizmo_g_i_probe.svg b/editor/icons/icon_gizmo_g_i_probe.svg
new file mode 100644
index 0000000000..7d3adf4196
--- /dev/null
+++ b/editor/icons/icon_gizmo_g_i_probe.svg
@@ -0,0 +1,5 @@
+<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -924.36)">
+<path transform="translate(0 924.36)" d="m12 8a4.0004 4.0004 0 0 0 -4 4v104a4.0004 4.0004 0 0 0 4 4h60v-8h-56v-96h96v8h8v-12a4.0004 4.0004 0 0 0 -4 -4h-104zm27.715 17.951c-1.2324 0.086154-2.3996 0.76492-3.0664 1.9199l-0.14844 0.25781c-1.0669 1.848-0.43784 4.1948 1.4102 5.2617l10.648 6.1484c1.848 1.0669 4.1948 0.43784 5.2617-1.4102l0.14844-0.25781c1.0669-1.848 0.43784-4.1948-1.4102-5.2617l-10.648-6.1484c-0.693-0.4001-1.4558-0.56146-2.1953-0.50977zm52.285 2.0488a32 32 0 0 0 -32 32 32 32 0 0 0 16 27.668v8.332c0 4.432 3.568 8 8 8h16c4.432 0 8-3.568 8-8v-8.3223a32 32 0 0 0 16 -27.678 32 32 0 0 0 -32 -32zm0 12a20 20 0 0 1 20 20 20 20 0 0 1 -20 20 20 20 0 0 1 -20 -20 20 20 0 0 1 20 -20zm-60.148 16c-2.1339 0-3.8516 1.7177-3.8516 3.8516v0.29688c0 2.1339 1.7177 3.8516 3.8516 3.8516h12.297c2.1339 0 3.8516-1.7177 3.8516-3.8516v-0.29688c0-2.1339-1.7177-3.8516-3.8516-3.8516h-12.297zm18.902 23.951c-0.73947-0.051693-1.5023 0.10966-2.1953 0.50977l-10.648 6.1484c-1.848 1.0669-2.4771 3.4137-1.4102 5.2617l0.14844 0.25781c1.0669 1.848 3.4137 2.4771 5.2617 1.4102l10.648-6.1484c1.848-1.0669 2.4771-3.4137 1.4102-5.2617l-0.14844-0.25781c-0.66684-1.155-1.834-1.8338-3.0664-1.9199zm33.246 32.049v8h16v-8h-16z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_gizmo_particles.svg b/editor/icons/icon_gizmo_particles.svg
new file mode 100644
index 0000000000..05fc84619e
--- /dev/null
+++ b/editor/icons/icon_gizmo_particles.svg
@@ -0,0 +1,5 @@
+<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -924.36)">
+<path transform="translate(0 924.36)" d="m64 8a36 40 0 0 0 -35.311 32.256 24 24 0 0 0 -20.689 23.744 24 24 0 0 0 24 24h64a24 24 0 0 0 24 -24 24 24 0 0 0 -20.715 -23.746 36 40 0 0 0 -35.285 -32.254zm-32 88a8 8 0 0 0 -8 8 8 8 0 0 0 8 8 8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8zm64 0a8 8 0 0 0 -8 8 8 8 0 0 0 8 8 8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8zm-32 8a8 8 0 0 0 -8 8 8 8 0 0 0 8 8 8 8 0 0 0 8 -8 8 8 0 0 0 -8 -8z" fill="#f7f5cf"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_gizmo_reflection_probe.svg b/editor/icons/icon_gizmo_reflection_probe.svg
new file mode 100644
index 0000000000..6d80e73b8c
--- /dev/null
+++ b/editor/icons/icon_gizmo_reflection_probe.svg
@@ -0,0 +1,5 @@
+<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -924.36)">
+<path transform="translate(0 924.36)" d="m12 8a4.0004 4.0004 0 0 0 -4 4v24h8v-20h96v8h8v-12a4.0004 4.0004 0 0 0 -4 -4h-104zm76 28a4 4 0 0 0 -4 4 4 4 0 0 0 4 4h18.732l-42.957 50.119-44.947-44.947-5.6562 5.6582 48 48a4.0004 4.0004 0 0 0 5.8652 -0.22656l44.963-52.457v17.854a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-28a4.0004 4.0004 0 0 0 -4 -4h-28zm-80 52v28a4.0004 4.0004 0 0 0 4 4h104a4.0004 4.0004 0 0 0 4 -4v-28h-8v24h-96v-24h-8z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_gizmo_spatial_sample_player.svg b/editor/icons/icon_gizmo_spatial_sample_player.svg
index d40fe230ac..7dbb4744be 100644
--- a/editor/icons/icon_gizmo_spatial_sample_player.svg
+++ b/editor/icons/icon_gizmo_spatial_sample_player.svg
@@ -1,5 +1,5 @@
<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -924.36)">
-<path transform="translate(0 924.36)" d="m63.883 12.004a4.0004 4.0004 0 0 0 -2.7109 1.168l-30.828 30.83h-14.344a4.0004 4.0004 0 0 0 -4 4v32a4.0004 4.0004 0 0 0 4 4h14.344l30.828 30.828a4.0004 4.0004 0 0 0 6.8281 -2.8281v-96.002a4.0004 4.0004 0 0 0 -4.1172 -3.9961zm46.117 5.9961a6 6 0 0 0 -6 6v80a6 6 0 0 0 6 6 6 6 0 0 0 6 -6v-80a6 6 0 0 0 -6 -6zm-24 24a6 6 0 0 0 -6 6v32h0.34961a6 6 0 0 0 5.6504 4 6 6 0 0 0 5.6484 -4h0.35156v-32a6 6 0 0 0 -6 -6z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
+<path transform="translate(0 924.36)" d="m63.883 12.004c-1.0195 0.0295-1.9892 0.4473-2.7109 1.168l-30.828 30.83h-14.344c-2.209 2.21e-4 -3.9998 1.791-4 4v32c2.21e-4 2.209 1.791 3.9998 4 4h14.344l30.828 30.828c2.52 2.5182 6.8267 0.73442 6.8281-2.8281v-96.002c-0.0015-2.2541-1.8641-4.0619-4.1172-3.9961zm48.117 3.9961a4 4 0 0 0 -4 4v88a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-88a4 4 0 0 0 -4 -4zm-24 24a4 4 0 0 0 -4 4v40a4 4 0 0 0 4 4 4 4 0 0 0 4 -4v-40a4 4 0 0 0 -4 -4z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#f7f5cf" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_gizmo_spot_light.svg b/editor/icons/icon_gizmo_spot_light.svg
new file mode 100644
index 0000000000..9b4ddadd17
--- /dev/null
+++ b/editor/icons/icon_gizmo_spot_light.svg
@@ -0,0 +1,5 @@
+<svg width="128" height="128" version="1.1" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0 -924.36)">
+<path transform="translate(0 924.36)" d="m52 8c-4.432 0-8 3.568-8 8v12 16.875a40 36 0 0 0 -20 31.125h28a12 12 0 0 0 12 12 12 12 0 0 0 12 -12h28a40 36 0 0 0 -20 -31.141v-20.859-8c0-4.432-3.568-8-8-8h-24zm-11.969 78.006c-0.76793-0.053681-1.5596 0.1138-2.2793 0.5293l-10.393 6c-1.9191 1.108-2.5728 3.5457-1.4648 5.4648s3.5457 2.5728 5.4648 1.4648l10.393-6c1.9191-1.108 2.5709-3.5457 1.4629-5.4648-0.6925-1.1994-1.9037-1.9047-3.1836-1.9941zm47.938 0c-1.2799 0.08947-2.4911 0.7947-3.1836 1.9941-1.108 1.9191-0.45622 4.3568 1.4629 5.4648l10.393 6c1.9191 1.108 4.3568 0.45427 5.4648-1.4648s0.45427-4.3568-1.4648-5.4648l-10.393-6c-0.71967-0.4155-1.5114-0.58298-2.2793-0.5293zm-23.969 13.994c-2.216 0-4 1.784-4 4v12c0 2.216 1.784 4 4 4s4-1.784 4-4v-12c0-2.216-1.784-4-4-4z" fill="#f7f5cf" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.1082"/>
+</g>
+</svg>
diff --git a/editor/icons/icon_gui_close_dark.svg b/editor/icons/icon_gui_close_dark.svg
deleted file mode 100644
index e511a5d74a..0000000000
--- a/editor/icons/icon_gui_close_dark.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3.7578 2.3438l-1.4141 1.4141 4.2422 4.2422-4.2422 4.2422 1.4141 1.4141 4.2422-4.2422 4.2422 4.2422 1.4141-1.4141-4.2422-4.2422 4.2422-4.2422-1.4141-1.4141-4.2422 4.2422-4.2422-4.2422z" fill-opacity=".89804"/>
-</g>
-</svg>
diff --git a/editor/icons/icon_gui_close_light.svg b/editor/icons/icon_gui_close_light.svg
deleted file mode 100644
index ac023b7030..0000000000
--- a/editor/icons/icon_gui_close_light.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3.7578 2.3438l-1.4141 1.4141 4.2422 4.2422-4.2422 4.2422 1.4141 1.4141 4.2422-4.2422 4.2422 4.2422 1.4141-1.4141-4.2422-4.2422 4.2422-4.2422-1.4141-1.4141-4.2422 4.2422-4.2422-4.2422z" fill="#fff" fill-opacity=".89804"/>
-</g>
-</svg>
diff --git a/editor/icons/icon_move_down.svg b/editor/icons/icon_move_down.svg
index 28d0d161d8..466fa10205 100644
--- a/editor/icons/icon_move_down.svg
+++ b/editor/icons/icon_move_down.svg
@@ -1,6 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="none" stroke="#e0e0e0" stroke-linecap="round" stroke-opacity=".99608" stroke-width="2">
-<path d="m4 1045.3 4 5 4-5" stroke-linejoin="round"/>
-<path d="m8 1038.3v11"/>
+<g transform="translate(0 -1036.4)">
+<path d="m7.9964 1051.4a1.0002 1.0001 0 0 1 -0.77738 -0.377l-4.0002-5a1.0001 1 0 0 1 0.15626 -1.4043 1.0001 1 0 0 1 1.4063 0.1563l2.2189 2.7734v-5.1484a1.0001 1 0 0 1 1.0001 -1 1.0001 1 0 0 1 1.0001 1v5.1484l2.2189-2.7734a1.0001 1 0 0 1 1.4063 -0.1563 1.0001 1 0 0 1 0.15626 1.4043l-4.0002 5a1.0002 1.0001 0 0 1 -0.7852 0.377zm0.00391-12a1.0001 1 0 0 1 -1.0001 -1 1.0001 1 0 0 1 1.0001 -1 1.0001 1 0 0 1 1.0001 1 1.0001 1 0 0 1 -1.0001 1z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" fill-opacity=".99608" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_move_up.svg b/editor/icons/icon_move_up.svg
index cd61e66ee7..6e148216d2 100644
--- a/editor/icons/icon_move_up.svg
+++ b/editor/icons/icon_move_up.svg
@@ -1,6 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="none" stroke="#e0e0e0" stroke-linecap="round" stroke-opacity=".99608" stroke-width="2">
-<path d="m4 1043.4 4-5 4 5" stroke-linejoin="round"/>
-<path d="m8 1050.4v-11"/>
+<g transform="translate(0 -1036.4)">
+<path d="m7.9964 1037.4a1.0002 1.0001 0 0 0 -0.77739 0.377l-4.0002 5a1.0001 1 0 0 0 0.15626 1.4043 1.0001 1 0 0 0 1.4063 -0.1563l2.2189-2.7734v5.1484a1.0001 1 0 0 0 1.0001 1 1.0001 1 0 0 0 1.0001 -1v-5.1484l2.2189 2.7734a1.0001 1 0 0 0 1.4063 0.1563 1.0001 1 0 0 0 0.15626 -1.4043l-4.0002-5a1.0002 1.0001 0 0 0 -0.7852 -0.377zm0.00391 12a1.0001 1 0 0 0 -1.0001 1 1.0001 1 0 0 0 1.0001 1 1.0001 1 0 0 0 1.0001 -1 1.0001 1 0 0 0 -1.0001 -1z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" fill-opacity=".99608" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_multi_mesh.svg b/editor/icons/icon_multi_mesh.svg
index 09fcd9a1a8..2582ba9e51 100644
--- a/editor/icons/icon_multi_mesh.svg
+++ b/editor/icons/icon_multi_mesh.svg
@@ -1,5 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h1.2695v-1-1h-1.2715a2 2 0 0 0 -0.72852 -0.73047v-5.8555l3.5859 3.5859h1.4141v-1-0.41406l-3.5859-3.5859h5.8574a2 2 0 0 0 0.72852 0.72656v1.2734h2v-1.2695a2 2 0 0 0 1 -1.7305 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm8 7v1.5859 1.4141h-1.4141-1.5859v1 1h3v1 2h2v-1-2h2 1v-2h-2-1v-3h-1-1z" fill="#ffd684"/>
+<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2 5.649e-4 0.71397 0.38169 1.3735 1 1.7305v6.541c-0.61771 0.35663-0.99874 1.0152-1 1.7285 0 1.1046 0.89543 2 2 2 0.71397-5.65e-4 1.3735-0.38169 1.7305-1h1.2695v-2h-1.2715c-0.17478-0.30301-0.42598-0.55488-0.72852-0.73047v-5.8555l3.5859 3.5859h1.4141v-1.4141l-3.5859-3.5859h5.8574c0.17532 0.30158 0.42647 0.55205 0.72852 0.72656v1.2734h2v-1.2695c0.61831-0.35698 0.99944-1.0165 1-1.7305 0-1.1046-0.89543-2-2-2-0.71397 5.648e-4 -1.3735 0.38169-1.7305 1h-6.541c-0.35663-0.61771-1.0152-0.99874-1.7285-1zm8 7v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#ffd684"/>
</g>
</svg>
diff --git a/editor/icons/icon_multi_mesh_instance.svg b/editor/icons/icon_multi_mesh_instance.svg
index edade9469d..0140f1137b 100644
--- a/editor/icons/icon_multi_mesh_instance.svg
+++ b/editor/icons/icon_multi_mesh_instance.svg
@@ -1,6 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#fc9c9c" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h1.2695v-1-1h-1.2715a2 2 0 0 0 -0.72852 -0.73047v-5.8555l3.5859 3.5859h1.4141v-1-0.41406l-3.5859-3.5859h5.8574a2 2 0 0 0 0.72852 0.72656v1.2734h2v-1.2695a2 2 0 0 0 1 -1.7305 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm9 7v2.5859l-1-1v1.4141h-1.4141l1 1h-2.5859v1h1 2v1h0.27148a2 2 0 0 0 1.7285 1v-2h2a2 2 0 0 0 -1.0312 -1.75h0.03125v-0.25h-1v-3h-1z"/>
-<path d="m11 1044.4v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2z"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2 5.649e-4 0.71397 0.38169 1.3735 1 1.7305v6.541c-0.61771 0.35663-0.99874 1.0152-1 1.7285 0 1.1046 0.89543 2 2 2 0.71397-5.65e-4 1.3735-0.38169 1.7305-1h1.2695v-2h-1.2715c-0.17478-0.30301-0.42598-0.55488-0.72852-0.73047v-5.8555l3.5859 3.5859h1.4141v-1.4141l-3.5859-3.5859h5.8574c0.17532 0.30158 0.42647 0.55205 0.72852 0.72656v1.2734h2v-1.2695c0.61831-0.35698 0.99944-1.0165 1-1.7305 0-1.1046-0.89543-2-2-2-0.71397 5.648e-4 -1.3735 0.38169-1.7305 1h-6.541c-0.35663-0.61771-1.0152-0.99874-1.7285-1zm8 7v3h-3v2h3v3h2v-3h3v-2h-3v-3z" fill="#fc9c9c" fill-opacity=".99608"/>
</g>
</svg>
diff --git a/editor/icons/icon_navigation_mesh_instance.svg b/editor/icons/icon_navigation_mesh_instance.svg
index 909dbe458f..85c6292290 100644
--- a/editor/icons/icon_navigation_mesh_instance.svg
+++ b/editor/icons/icon_navigation_mesh_instance.svg
@@ -1,7 +1,6 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)" fill="#fc9c9c" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h2.5078l0.75-2h-3.2598a2 2 0 0 0 -0.72852 -0.73047v-5.8555l4.6973 4.6973 0.77148-2.0566-4.0547-4.0547h5.8574a2 2 0 0 0 0.72852 0.73047v0.27148a2.0002 2.0002 0 0 1 0.023438 0 2.0002 2.0002 0 0 1 1.8496 1.2969l0.12695 0.33789v-1.9082a2 2 0 0 0 1 -1.7285 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1z"/>
-<path d="m15 1051.4-3-8-3 8 3-2z" fill-rule="evenodd"/>
+<path transform="translate(0 1036.4)" d="m3 1a2 2 0 0 0 -2 2 2 2 0 0 0 1 1.7305v6.541a2 2 0 0 0 -1 1.7285 2 2 0 0 0 2 2 2 2 0 0 0 1.7305 -1h2.5078l0.75-2h-3.2598a2 2 0 0 0 -0.72852 -0.73047v-5.8555l4.6973 4.6973 0.77148-2.0566-4.0547-4.0547h5.8574a2 2 0 0 0 0.72852 0.73047v0.27148a2.0002 2.0002 0 0 1 0.023438 0 2.0002 2.0002 0 0 1 1.8496 1.2969l0.12695 0.33789v-1.9082a2 2 0 0 0 1 -1.7285 2 2 0 0 0 -2 -2 2 2 0 0 0 -1.7305 1h-6.541a2 2 0 0 0 -1.7285 -1zm9 6l-3 8 3-2 3 2-3-8z"/>
<rect x="12" y="1040.4" width="2" height="1"/>
<rect x="12" y="1040.4" width="2" height="1"/>
</g>
diff --git a/editor/icons/icon_packed_data_container.svg b/editor/icons/icon_packed_data_container.svg
index ea347ffe38..dd5aeafb86 100644
--- a/editor/icons/icon_packed_data_container.svg
+++ b/editor/icons/icon_packed_data_container.svg
@@ -1,13 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)">
-<path d="m2 1038.4v12h12v-12z" fill="none" stroke="#e0e0e0" stroke-linejoin="round" stroke-width="2"/>
-<rect x="4" y="1040.4" width="2" height="2" fill="#e0e0e0"/>
-<rect x="4" y="1043.4" width="2" height="2" fill="#e0e0e0"/>
-<rect x="4" y="1046.4" width="2" height="2" fill="#e0e0e0"/>
-<rect x="7" y="1040.4" width="2" height="2" fill="#e0e0e0"/>
-<rect x="7" y="1043.4" width="2" height="2" fill="#e0e0e0"/>
-<rect x="7" y="1046.4" width="2" height="2" fill="#e0e0e0"/>
-<rect x="10" y="1040.4" width="2" height="2" fill="#e0e0e0"/>
-<rect x="10" y="1043.4" width="2" height="2" fill="#e0e0e0"/>
+<path transform="translate(0 1036.4)" d="m2 1a1.0001 1.0001 0 0 0 -1 1v12a1.0001 1.0001 0 0 0 1 1h12a1.0001 1.0001 0 0 0 1 -1v-12a1.0001 1.0001 0 0 0 -1 -1h-12zm1 2h10v10h-10v-10zm1 1v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-6 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-6 3v2h2v-2h-2zm3 0v2h2v-2h-2z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#e0e0e0" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="filter-blend-mode:normal;filter-gaussianBlur-deviation:0;font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-east-asian:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_particle_attractor_2d.svg b/editor/icons/icon_particle_attractor_2d.svg
index c89742be04..1374304af0 100644
--- a/editor/icons/icon_particle_attractor_2d.svg
+++ b/editor/icons/icon_particle_attractor_2d.svg
@@ -1,9 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#a5b7f3" fill-opacity=".98824">
-<path transform="translate(0 1036.4)" d="m8 1a3 7 0 0 0 -3 7 3 7 0 0 0 3 7 3 7 0 0 0 3 -7 3 7 0 0 0 -3 -7zm0 1a2 6 0 0 1 2 6 2 6 0 0 1 -2 6 2 6 0 0 1 -2 -6 2 6 0 0 1 2 -6z"/>
-<path d="m1 1044.4a7 3 0 0 0 7 3 7 3 0 0 0 7 -3 7 3 0 0 0 -7 -3 7 3 0 0 0 -7 3zm1 0a6 2 0 0 1 6 -2 6 2 0 0 1 6 2 6 2 0 0 1 -6 2 6 2 0 0 1 -6 -2z"/>
-<path d="m3.0503 1049.3a3 7 45 0 0 7.0711 -2.8284 3 7 45 0 0 2.8284 -7.071 3 7 45 0 0 -7.0711 2.8284 3 7 45 0 0 -2.8284 7.071zm0.70711-0.7071a2 6 45 0 1 2.8284 -5.6568 2 6 45 0 1 5.6569 -2.8284 2 6 45 0 1 -2.8284 5.6568 2 6 45 0 1 -5.6569 2.8284z"/>
-<path d="m12.95 1049.3a7 3 45 0 0 -2.8284 -7.071 7 3 45 0 0 -7.071 -2.8284 7 3 45 0 0 2.8284 7.071 7 3 45 0 0 7.071 2.8284zm-0.7071-0.7071a6 2 45 0 1 -5.6568 -2.8284 6 2 45 0 1 -2.8284 -5.6568 6 2 45 0 1 5.6568 2.8284 6 2 45 0 1 2.8284 5.6568z"/>
-<circle cx="8" cy="1044.4" r="1"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m8 1a3 7 0 0 0 -2.0801 1.9668 7 3 45 0 0 -2.8691 0.083984 7 3 45 0 0 -0.080078 2.8633 7 3 0 0 0 -1.9707 2.0859 7 3 0 0 0 1.9668 2.0801 3 7 45 0 0 0.083984 2.8691 3 7 45 0 0 2.8633 0.080078 3 7 0 0 0 2.0859 1.9707 3 7 0 0 0 2.0801 -1.9668 7 3 45 0 0 2.8691 -0.083984 7 3 45 0 0 0.080078 -2.8633 7 3 0 0 0 1.9707 -2.0859 7 3 0 0 0 -1.9668 -2.0801 3 7 45 0 0 -0.083984 -2.8691 3 7 45 0 0 -2.8633 -0.080078 3 7 0 0 0 -2.0859 -1.9707zm0 1a2 6 0 0 1 1.2598 1.3438 3 7 45 0 0 -1.2578 0.75977 7 3 45 0 0 -1.2637 -0.75781 2 6 0 0 1 1.2617 -1.3457zm-3.6348 1.5293a6 2 45 0 1 1.2344 0.28906 3 7 0 0 0 -0.35352 1.4238 7 3 0 0 0 -1.4297 0.35742 6 2 45 0 1 -0.058594 -1.8418 6 2 45 0 1 0.60742 -0.22852zm7.0762 0.0039062a2 6 45 0 1 0.80078 0.22461 2 6 45 0 1 -0.060547 1.8418 7 3 0 0 0 -1.4238 -0.35352 3 7 0 0 0 -0.35742 -1.4297 2 6 45 0 1 1.041 -0.2832zm-4.998 0.70703a6 2 45 0 1 0.74023 0.4707 3 7 45 0 0 -0.41211 0.33984 7 3 0 0 0 -0.52344 0.048828 2 6 0 0 1 0.19531 -0.85938zm3.1152 0.0019531a2 6 0 0 1 0.18945 0.85547 7 3 0 0 0 -0.5293 -0.050781 7 3 45 0 0 -0.4043 -0.33594 2 6 45 0 1 0.74414 -0.46875zm-1.5586 1.7578a6 2 0 0 1 0.82031 0.021484 6 2 45 0 1 0.59375 0.56445 6 2 45 0 1 0.56445 0.59375 2 6 0 0 1 0.021484 0.82031 2 6 0 0 1 -0.021484 0.82031 2 6 45 0 1 -0.56445 0.59375 2 6 45 0 1 -0.59375 0.56445 6 2 0 0 1 -0.82031 0.021484 6 2 0 0 1 -0.82031 -0.021484 6 2 45 0 1 -0.59375 -0.56445 6 2 45 0 1 -0.56445 -0.59375 2 6 0 0 1 -0.021484 -0.82031 2 6 0 0 1 0.021484 -0.82031 2 6 45 0 1 0.56445 -0.59375 2 6 45 0 1 0.59375 -0.56445 6 2 0 0 1 0.82031 -0.021484zm2.9004 0.24805a6 2 0 0 1 0.85938 0.19531 2 6 45 0 1 -0.4707 0.74023 7 3 45 0 0 -0.33984 -0.41211 3 7 0 0 0 -0.048828 -0.52344zm-5.8027 0.0039062a3 7 0 0 0 -0.050781 0.5293 3 7 45 0 0 -0.33594 0.4043 6 2 45 0 1 -0.46875 -0.74414 6 2 0 0 1 0.85547 -0.18945zm7.5566 0.48633a6 2 0 0 1 1.3457 1.2617 6 2 0 0 1 -1.3438 1.2598 7 3 45 0 0 -0.75977 -1.2578 3 7 45 0 0 0.75781 -1.2637zm-9.3105 0.0019532a7 3 45 0 0 0.75977 1.2578 3 7 45 0 0 -0.75781 1.2637 6 2 0 0 1 -1.3457 -1.2617 6 2 0 0 1 1.3438 -1.2598zm4.6562 0.25977a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1zm3.2891 1.8145a6 2 45 0 1 0.46875 0.74414 6 2 0 0 1 -0.85547 0.18945 3 7 0 0 0 0.050781 -0.5293 3 7 45 0 0 0.33594 -0.4043zm-6.5781 0.0019531a7 3 45 0 0 0.33984 0.41211 3 7 0 0 0 0.048828 0.52344 6 2 0 0 1 -0.85938 -0.19531 2 6 45 0 1 0.4707 -0.74023zm-0.89258 1.584a7 3 0 0 0 1.4238 0.35352 3 7 0 0 0 0.35742 1.4297 2 6 45 0 1 -1.8418 0.058594 2 6 45 0 1 0.060547 -1.8418zm8.3652 0a6 2 45 0 1 0.058594 1.8418 6 2 45 0 1 -1.8418 -0.060547 3 7 0 0 0 0.35352 -1.4238 7 3 0 0 0 1.4297 -0.35742zm-2.4316 0.5a2 6 0 0 1 -0.19531 0.85938 6 2 45 0 1 -0.74023 -0.4707 3 7 45 0 0 0.41211 -0.33984 7 3 0 0 0 0.52344 -0.048828zm-3.5 0.001953a7 3 0 0 0 0.5293 0.050781 7 3 45 0 0 0.4043 0.33594 2 6 45 0 1 -0.74414 0.46875 2 6 0 0 1 -0.18945 -0.85547zm1.7461 0.99414a7 3 45 0 0 1.2637 0.75781 2 6 0 0 1 -1.2617 1.3457 2 6 0 0 1 -1.2598 -1.3438 3 7 45 0 0 1.2578 -0.75977z" fill="#a5b7f3" fill-opacity=".98824"/>
</g>
</svg>
diff --git a/editor/icons/icon_particles.svg b/editor/icons/icon_particles.svg
index f8a0ec46ec..ff58d4e47a 100644
--- a/editor/icons/icon_particles.svg
+++ b/editor/icons/icon_particles.svg
@@ -1,11 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#fc9c9c" fill-opacity=".99608">
-<circle cx="4" cy="1044.4" r="3"/>
-<ellipse cx="8" cy="1042.4" rx="4.5" ry="5"/>
-<path d="m4 1047.4h8v-4h-8z" fill-rule="evenodd"/>
-<circle cx="12" cy="1044.4" r="3"/>
-<circle cx="4" cy="1049.4" r="1"/>
-<circle cx="12" cy="1049.4" r="1"/>
-<circle cx="8" cy="1050.4" r="1"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m8 1a4.5 5 0 0 0 -4.4141 4.0312 3 3 0 0 0 -2.5859 2.9688 3 3 0 0 0 3 3h8a3 3 0 0 0 3 -3 3 3 0 0 0 -2.5898 -2.9668 4.5 5 0 0 0 -4.4102 -4.0332zm-4 11a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1zm8 0a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1zm-4 1a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1z" fill="#fc9c9c" fill-opacity=".99608"/>
</g>
</svg>
diff --git a/editor/icons/icon_reflection_probe.svg b/editor/icons/icon_reflection_probe.svg
index ab4ce54802..0a7f537737 100644
--- a/editor/icons/icon_reflection_probe.svg
+++ b/editor/icons/icon_reflection_probe.svg
@@ -1,5 +1,7 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m7.9629 1.002a1.0001 1.0001 0 0 0 -0.41016 0.10352l-6 3a1.0001 1.0001 0 0 0 -0.55273 0.89453v6a1.0001 1.0001 0 0 0 0.55273 0.89453l6 3a1.0001 1.0001 0 0 0 0.89453 0l6-3a1.0001 1.0001 0 0 0 0.55273 -0.89453v-6a1.0001 1.0001 0 0 0 -0.55273 -0.89453l-6-3a1.0001 1.0001 0 0 0 -0.48438 -0.10352zm-0.96289 2.6172v8.7637l-4-2v-4.7637l4-2zm2 0l4 2v4.7637l-4 2v-8.7637z" color="#000000" color-rendering="auto" fill="#fc9c9c" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
+<g transform="translate(0 -1036.4)" fill="none" stroke="#fc9c9c" stroke-linejoin="round" stroke-opacity=".99608" stroke-width="2">
+<path d="m2 1045.4v5h12v-4"/>
+<path d="m2 1040.4 5 6 7-7"/>
+<path d="m14 1043.4v-4h-4" stroke-linecap="round"/>
</g>
</svg>
diff --git a/editor/icons/icon_sprite_frames.svg b/editor/icons/icon_sprite_frames.svg
index 5147ccdb1e..e797819892 100644
--- a/editor/icons/icon_sprite_frames.svg
+++ b/editor/icons/icon_sprite_frames.svg
@@ -1,11 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#e0e0e0">
-<rect x="10" y="1046.4" width="2" height="2"/>
-<rect x="13" y="1046.4" width="2" height="2"/>
-<rect x="10" y="1049.4" width="2" height="2"/>
-<rect x="13" y="1049.4" width="2" height="2"/>
-<path transform="translate(0 1036.4)" d="m6 1a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 5 -5 5 5 0 0 0 -5 -5zm-3 4a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm6 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm-1.0039 2.4922a0.50005 0.50005 0 0 1 0.35742 0.86133c-0.61785 0.6179-1.4924 0.89648-2.3535 0.89648s-1.7357-0.27858-2.3535-0.89648a0.50005 0.50005 0 0 1 0.34766 -0.85742 0.50005 0.50005 0 0 1 0.35938 0.15039c0.38215 0.3822 1.0076 0.60352 1.6465 0.60352s1.2643-0.22132 1.6465-0.60352a0.50005 0.50005 0 0 1 0.34961 -0.1543z"/>
-<rect x="13" y="1043.4" width="2" height="2"/>
-<rect x="7" y="1049.4" width="2" height="2"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m6 1a5 5 0 0 0 -5 5 5 5 0 0 0 5 5 5 5 0 0 0 5 -5 5 5 0 0 0 -5 -5zm-3 4a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm6 0a1 1 0 0 1 1 1 1 1 0 0 1 -1 1 1 1 0 0 1 -1 -1 1 1 0 0 1 1 -1zm4 2v2h2v-2h-2zm-5.0039 0.49219a0.50005 0.50005 0 0 1 0.35742 0.86133c-0.61785 0.6179-1.4924 0.89648-2.3535 0.89648s-1.7357-0.27858-2.3535-0.89648a0.50005 0.50005 0 0 1 0.34766 -0.85742 0.50005 0.50005 0 0 1 0.35938 0.15039c0.38215 0.3822 1.0076 0.60352 1.6465 0.60352s1.2643-0.22132 1.6465-0.60352a0.50005 0.50005 0 0 1 0.34961 -0.1543zm2.0039 2.5078v2h2v-2h-2zm3 0v2h2v-2h-2zm-6 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2z" fill="#e0e0e0"/>
</g>
</svg>
diff --git a/editor/icons/icon_tile_set.svg b/editor/icons/icon_tile_set.svg
index c7be24ae62..935afea397 100644
--- a/editor/icons/icon_tile_set.svg
+++ b/editor/icons/icon_tile_set.svg
@@ -1,5 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 1v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-12 3v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm3 0v2h2v-2h-2zm-12 3v2h2v-2h-2zm3 0v2h2v-2h-2zm5 1v1 5 1h5c0.55228 0 1-0.44772 1-1v-5c0-0.55228-0.44772-1-1-1v4l-1-1-1 1v-4h-3zm-8 2v2h2v-2h-2zm3 0v2h2v-2h-2zm-3 3v2h2v-2h-2zm3 0v2h2v-2h-2z" fill="#e0e0e0"/>
+<path transform="translate(0 1036.4)" d="m1 1v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm-12 3v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm3 0v2h2v-2zm-12 3v2h2v-2zm3 0v2h2v-2zm5 1v7h5c0.55228 0 1-0.44772 1-1v-5c0-0.55228-0.44772-1-1-1v4l-1-1-1 1v-4zm-8 2v2h2v-2zm3 0v2h2v-2zm-3 3v2h2v-2zm3 0v2h2v-2z" fill="#e0e0e0"/>
</g>
</svg>
diff --git a/editor/icons/icon_tool_button.svg b/editor/icons/icon_tool_button.svg
index 25bc83e690..4f0c3797f8 100644
--- a/editor/icons/icon_tool_button.svg
+++ b/editor/icons/icon_tool_button.svg
@@ -1,11 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)">
-<rect x="2" y="1047.4" width="6" height="4" ry="1.5" fill="#a5efac"/>
-<rect x="1" y="1049.4" width="8" height="2" ry="0" fill="#a5efac"/>
-<path d="m2 1042.4 3 2 3-2" fill="none" stroke="#a5efac" stroke-linejoin="round" stroke-width="2"/>
-<path d="m5 1039.4v5" fill="none" stroke="#a5efac" stroke-width="2"/>
-<g transform="translate(9,-1)" fill="#a5efac">
-<path d="m2 1038.5c-1.1979 0.4235-1.999 1.5557-2 2.8262 9.552e-4 1.2705 0.80214 2.4027 2 2.8262v7.1738c0 0.554 0.446 1 1 1s1-0.446 1-1v-7.1758c1.1972-0.4232 1.9982-1.5544 2-2.8242-0.00178-1.2698-0.80282-2.401-2-2.8242v2.8242c0 0.5523-0.44772 1-1 1s-1-0.4477-1-1z" fill="#a5efac"/>
-</g>
+<path transform="translate(0 1036.4)" d="m11 1.1738c-1.1979 0.4235-1.999 1.5557-2 2.8262 9.552e-4 1.2705 0.80214 2.4027 2 2.8262v7.1738c0 0.554 0.446 1 1 1s1-0.446 1-1v-7.1758c1.1972-0.4232 1.9982-1.5544 2-2.8242-0.0018-1.2698-0.80282-2.401-2-2.8242v2.8242c0 0.5523-0.44772 1-1 1s-1-0.4477-1-1zm-7 1.8262v3.1328l-1.4453-0.96484-1.1094 1.6641 3 2c0.3359 0.22389 0.77347 0.22389 1.1094 0l3-2-1.1094-1.6641-1.4453 0.96484v-3.1328zm-0.5 8c-0.831 0-1.5 0.669-1.5 1.5v0.5h-1v2h8v-2h-1v-0.5c0-0.831-0.669-1.5-1.5-1.5z" fill="#a5efac"/>
</g>
</svg>
diff --git a/editor/icons/icon_transpose.svg b/editor/icons/icon_transpose.svg
index d92b37a7b1..7dd194d724 100644
--- a/editor/icons/icon_transpose.svg
+++ b/editor/icons/icon_transpose.svg
@@ -1,12 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#e0e0e0">
-<rect x="1" y="1037.4" width="2" height="14"/>
-<rect x="1" y="1037.4" width="14" height="2"/>
-<rect x="1" y="1049.4" width="7" height="2"/>
-<rect x="6" y="1037.4" width="2" height="14"/>
-<rect x="1" y="1042.4" width="14" height="2"/>
-<rect transform="rotate(90)" x="1037.4" y="-15" width="7" height="2"/>
-<path d="m15 1051.4h-5l5-5z" fill-rule="evenodd"/>
-<rect x="8" y="1039.4" width="5" height="3"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m1 1v14h7v-7h7v-7zm2 2h3v3h-3zm0 5h3v5h-3zm12 2-5 5h5z" fill="#e0e0e0"/>
</g>
</svg>
diff --git a/editor/icons/icon_tree.svg b/editor/icons/icon_tree.svg
index 093f9d2fc5..62efb9f94f 100644
--- a/editor/icons/icon_tree.svg
+++ b/editor/icons/icon_tree.svg
@@ -1,13 +1,6 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)">
-<rect x="20" y="1042.4" width="1" height="1" fill="#fefeff"/>
<rect x="29" y="1042.4" width="1" height="1" fill="#fefeff"/>
-<rect x="1" y="1037.4" width="14" height="2" fill="#a5efac"/>
-<rect x="6" y="1041.4" width="9" height="2" fill="#a5efac"/>
-<rect x="7" y="1045.4" width="8" height="2" fill="#a5efac"/>
-<rect x="7" y="1049.4" width="8" height="2" fill="#a5efac"/>
-<path d="m2 1038.4v4h4" fill="none" stroke="#a5efac" stroke-linejoin="round" stroke-width="2"/>
-<path d="m6 1042.4v4h3" fill="none" stroke="#a5efac" stroke-linejoin="round" stroke-width="2"/>
-<path d="m2 1040.4v10h7" fill="none" stroke="#a5efac" stroke-linejoin="round" stroke-width="2"/>
+<path transform="translate(0 1036.4)" d="m1 1v13c5.52e-5 0.55226 0.44774 0.99994 1 1h13v-2h-12v-6h2v3c5.52e-5 0.55226 0.44774 0.99994 1 1h9v-2h-8v-2h8v-2h-12v-2h12v-2z" fill="#a5efac"/>
</g>
</svg>
diff --git a/editor/icons/icon_v_slider.svg b/editor/icons/icon_v_slider.svg
index c016ebd814..2da5fc8dcd 100644
--- a/editor/icons/icon_v_slider.svg
+++ b/editor/icons/icon_v_slider.svg
@@ -1,10 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(0 -1036.4)">
-<path d="m6 1050.4a1.0001 1.0001 0 1 1 -2 0v-2.1308a4 4 0 0 0 1 0.1308 4 4 0 0 0 1 -0.1328zm0-9.8691a4 4 0 0 0 -1 -0.1309 4 4 0 0 0 -1 0.1329v-2.1329a1.0001 1.0001 0 1 1 2 0z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#a5efac" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
-<circle transform="matrix(0,-1,-1,0,0,0)" cx="-1039.4" cy="-5" r="2" fill="#a5efac"/>
-<path d="m12 1038.4h-2" fill="none" stroke="#a5efac" stroke-linecap="round" stroke-width="2"/>
-<path d="m11 1044.4v0" fill="none" stroke="#a5efac" stroke-linecap="round" stroke-width="2"/>
-<path d="m12 1050.4h-2" fill="none" stroke="#a5efac" stroke-linecap="round" stroke-width="2"/>
-<path d="m6 1049.4h-2v-6.1308a4 4 0 0 0 1 0.1308 4 4 0 0 0 1 -0.1328z" fill="#a5efac"/>
+<path transform="translate(0 1036.4)" d="m5.0156 0.98633a1.0001 1.0001 0 0 0 -0.25977 0.029297 2 2 0 0 0 -1.7559 1.9844 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -1.7539 -1.9824 1.0001 1.0001 0 0 0 -0.23047 -0.03125zm4.9844 0.013672a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-2zm-4 5.8672a4 4 0 0 1 -1 0.13281 4 4 0 0 1 -1 -0.13086v5 1.1309 1a1.0001 1.0001 0 1 0 2 0v-1-1.1328-5zm5 0.13281a1 1 0 0 0 -1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1zm-1 6a1 1 0 0 0 -1 1 1 1 0 0 0 1 1h2a1 1 0 0 0 1 -1 1 1 0 0 0 -1 -1h-2z" color="#000000" color-rendering="auto" dominant-baseline="auto" fill="#a5efac" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:normal;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-orientation:mixed;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_v_split_container.svg b/editor/icons/icon_v_split_container.svg
index d038edccc9..3f47d9cade 100644
--- a/editor/icons/icon_v_split_container.svg
+++ b/editor/icons/icon_v_split_container.svg
@@ -1,8 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#a5efac">
-<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2zm0 2h10v10h-10z"/>
-<rect transform="rotate(90)" x="1043.4" y="-13" width="2" height="10"/>
-<path d="m10 1045.4h-4l2 2z"/>
-<path d="m10 1043.4-2-2-2 2z"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m3 1c-1.1046 0-2 0.89543-2 2v10c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-10c0-1.1046-0.89543-2-2-2h-10zm0 2h10v4h-3l-2-2-2 2h-3v-4zm0 6h3l2 2 2-2h3v4h-10v-4z" fill="#a5efac"/>
</g>
</svg>
diff --git a/editor/icons/icon_vehicle_body.svg b/editor/icons/icon_vehicle_body.svg
index 6761355d0e..01eb1798eb 100644
--- a/editor/icons/icon_vehicle_body.svg
+++ b/editor/icons/icon_vehicle_body.svg
@@ -1,7 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#fc9c9c" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m5 3a1 1 0 0 0 -1 1l-1 3h-2v4h1.0508c0.23167-1.1411 1.2398-2 2.4492-2s2.2175 0.85893 2.4492 2h2.1016c0.23167-1.1411 1.2398-2 2.4492-2s2.2175 0.85893 2.4492 2h1.0508v-4h-4v-4h-6zm1 1h4v3h-4v-3z"/>
-<circle cx="4.5" cy="1047.9" r="1.5"/>
-<circle cx="11.5" cy="1047.9" r="1.5"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m5 3a1 1 0 0 0 -1 1l-1 3h-2v4h1.0508c0.23167-1.1411 1.2398-2 2.4492-2s2.2175 0.85893 2.4492 2h2.1016c0.23167-1.1411 1.2398-2 2.4492-2s2.2175 0.85893 2.4492 2h1.0508v-4h-4v-4h-6zm1 1h4v3h-4v-3zm-1.5 6a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5 -1.5 1.5 1.5 0 0 0 -1.5 -1.5zm7 0a1.5 1.5 0 0 0 -1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5 -1.5 1.5 1.5 0 0 0 -1.5 -1.5z" fill="#fc9c9c" fill-opacity=".99608"/>
</g>
</svg>
diff --git a/editor/icons/icon_viewport_sprite.svg b/editor/icons/icon_viewport_sprite.svg
index 2c8c356102..4b8bbeaeba 100644
--- a/editor/icons/icon_viewport_sprite.svg
+++ b/editor/icons/icon_viewport_sprite.svg
@@ -2,9 +2,6 @@
<g transform="translate(0 -1036.4)">
<rect x="20" y="1042.4" width="1" height="1" fill="#fefeff"/>
<rect x="29" y="1042.4" width="1" height="1" fill="#fefeff"/>
-<path transform="translate(0 1036.4)" d="m3 2c-0.5304 8.01e-5 -1.0391 0.21085-1.4141 0.58594-0.37509 0.37501-0.58586 0.88366-0.58594 1.4141v8c8.03e-5 0.5304 0.21085 1.0391 0.58594 1.4141 0.37501 0.37509 0.88366 0.58586 1.4141 0.58594h10c1.1046 0 2-0.89543 2-2v-8c0-1.1046-0.89543-2-2-2zm0 1h10c0.55228 9.6e-6 0.99999 0.44772 1 1v8c-1e-5 0.55228-0.44772 0.99999-1 1h-10c-0.55228-1e-5 -0.99999-0.44772-1-1v-8c9.6e-6 -0.55228 0.44772-0.99999 1-1z" fill="#a5b7f3" fill-opacity=".98824"/>
-<rect x="4" y="1042.4" width="2" height="2" fill="#a5b7f3" fill-opacity=".98824"/>
-<rect x="10" y="1042.4" width="2" height="2" fill="#a5b7f3" fill-opacity=".98824"/>
-<rect x="4" y="1045.4" width="8" height="1" fill="#a5b7f3" fill-opacity=".98824"/>
+<path transform="translate(0 1036.4)" d="m3 2c-0.5304 8.01e-5 -1.0391 0.21085-1.4141 0.58594-0.37509 0.37501-0.58586 0.88366-0.58594 1.4141v8c8.03e-5 0.5304 0.21085 1.0391 0.58594 1.4141 0.37501 0.37509 0.88366 0.58586 1.4141 0.58594h10c1.1046 0 2-0.89543 2-2v-8c0-1.1046-0.89543-2-2-2h-10zm0 1h10c0.55228 9.6e-6 0.99999 0.44772 1 1v8c-1e-5 0.55228-0.44772 0.99999-1 1h-10c-0.55228-1e-5 -0.99999-0.44772-1-1v-8c9.6e-6 -0.55228 0.44772-0.99999 1-1zm1 3v2h2v-2h-2zm6 0v2h2v-2h-2zm-6 3v1h8v-1h-8z" fill="#a5b7f3" fill-opacity=".98824"/>
</g>
</svg>
diff --git a/editor/icons/icon_visibility_enabler.svg b/editor/icons/icon_visibility_enabler.svg
index 3aa4c6d73f..868437108a 100644
--- a/editor/icons/icon_visibility_enabler.svg
+++ b/editor/icons/icon_visibility_enabler.svg
@@ -1,9 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#fc9c9c" fill-opacity=".99608">
-<g transform="translate(-.00015202)">
-<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.00586 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0 -0.55273c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<circle cx="8" cy="1044.4" r="2"/>
-</g>
-<path transform="translate(0 1036.4)" d="m1 1v3h1v-2h2v-1h-3zm11 0v1h2v2h1v-3h-3zm-11 11v3h3v-1h-2v-2h-1zm13 0v2h-2v1h3v-3h-1z"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m1 1v3h1v-2h2v-1h-3zm11 0v1h2v2h1v-3h-3zm-4 1c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0 -0.55273c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4zm0 2a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2zm-7 6v3h3v-1h-2v-2h-1zm13 0v2h-2v1h3v-3h-1z" color="#000000" color-rendering="auto" fill="#fc9c9c" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_visibility_enabler_2d.svg b/editor/icons/icon_visibility_enabler_2d.svg
index 15b54c0ba0..1cde98da61 100644
--- a/editor/icons/icon_visibility_enabler_2d.svg
+++ b/editor/icons/icon_visibility_enabler_2d.svg
@@ -1,9 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#a5b7f3" fill-opacity=".98824">
-<g transform="translate(-.00015202)">
-<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.00586 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0 -0.55273c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<circle cx="8" cy="1044.4" r="2"/>
-</g>
-<path transform="translate(0 1036.4)" d="m1 1v3h1v-2h2v-1h-3zm11 0v1h2v2h1v-3h-3zm-11 11v3h3v-1h-2v-2h-1zm13 0v2h-2v1h3v-3h-1z"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m1 1v3h1v-2h2v-1h-3zm11 0v1h2v2h1v-3h-3zm-4 1c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0 -0.55273c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4zm0 2a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2zm-7 6v3h3v-1h-2v-2h-1zm13 0v2h-2v1h3v-3h-1z" color="#000000" color-rendering="auto" fill="#a5b7f3" fill-opacity=".98824" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_visibility_notifier.svg b/editor/icons/icon_visibility_notifier.svg
index 807d03869c..2a631f9216 100644
--- a/editor/icons/icon_visibility_notifier.svg
+++ b/editor/icons/icon_visibility_notifier.svg
@@ -1,7 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#fc9c9c" fill-opacity=".99608">
-<path transform="translate(0 1036.4)" d="m8 3c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246 1.4907 0 3.2717-0.65207 4.7109-2h-0.71094-2v-0.54102a4 4 0 0 1 -2 0.54102 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4 4 4 0 0 1 2 0.54102v-2.1816c-0.68312-0.23834-1.3644-0.35938-2-0.35938zm0 4a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2z" color="#000000" color-rendering="auto" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<rect x="12" y="1037.4" width="2" height="6"/>
-<rect transform="scale(1,-1)" x="12" y="-1047.4" width="2" height="2"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m12 1v6h2v-6h-2zm-4 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246 1.4907 0 3.2717-0.65207 4.7109-2h-0.71094-2v-0.54102a4 4 0 0 1 -2 0.54102 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4 4 4 0 0 1 2 0.54102v-2.1816c-0.68312-0.23834-1.3644-0.35938-2-0.35938zm0 4a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2zm4 2v2h2v-2h-2z" color="#000000" color-rendering="auto" fill="#fc9c9c" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_visible.svg b/editor/icons/icon_visible.svg
index faa0eabb03..7d157d7b7f 100644
--- a/editor/icons/icon_visible.svg
+++ b/editor/icons/icon_visible.svg
@@ -1,6 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#e0e0e0">
-<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0 -0.55273c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4z" color="#000000" color-rendering="auto" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
-<circle cx="8" cy="1044.4" r="2"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m8 2c-2.5567 0-5.7907 1.9477-6.9551 5.7051a1.0001 1.0001 0 0 0 -0.0058594 0.57031c1.1244 3.9354 4.4609 5.7246 6.9609 5.7246s5.8365-1.7892 6.9609-5.7246a1.0001 1.0001 0 0 0 0 -0.55273c-1.1003-3.7876-4.4066-5.7227-6.9609-5.7227zm0 2a4 4 0 0 1 4 4 4 4 0 0 1 -4 4 4 4 0 0 1 -4 -4 4 4 0 0 1 4 -4zm0 2a2 2 0 0 0 -2 2 2 2 0 0 0 2 2 2 2 0 0 0 2 -2 2 2 0 0 0 -2 -2z" color="#000000" color-rendering="auto" fill="#e0e0e0" fill-opacity=".99608" fill-rule="evenodd" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="block-progression:tb;isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/>
</g>
</svg>
diff --git a/editor/icons/icon_world_environment.svg b/editor/icons/icon_world_environment.svg
index 823c6401be..d7dbd4d73e 100644
--- a/editor/icons/icon_world_environment.svg
+++ b/editor/icons/icon_world_environment.svg
@@ -1,8 +1,6 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="none" stroke="#fc9c9c" stroke-opacity=".99608">
-<circle cx="8" cy="1044.4" r="6" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
-<path d="m2 1044.4c4.5932 1.582 8.3985 1.0627 12 0" stroke-width="1.5"/>
-<path d="m8 1038.4c-3 4-3 8 0 12" stroke-width="1.5"/>
-<path d="m8 1038.4c3 4 3 8 0 12" stroke-width="1.5"/>
+<g transform="translate(0 -1036.4)" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
+<path transform="translate(0 1036.4)" d="m8 1a7 7 0 0 0 -7 7 7 7 0 0 0 7 7 7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm-1.7305 2.3125c-0.83125 1.5372-1.2685 3.1037-1.2695 4.6816-0.64057-0.11251-1.3005-0.27158-1.9766-0.47266a5 5 0 0 1 3.2461 -4.209zm3.4629 0.0039062a5 5 0 0 1 3.2383 4.1875c-0.65187 0.17448-1.3077 0.32867-1.9727 0.44922-0.00845-1.5627-0.44294-3.1141-1.2656-4.6367zm-1.7324 0.0078126c1.0126 1.593 1.5 3.1425 1.5 4.6758 0 0.054042-0.0066161 0.10803-0.0078125 0.16211-0.96392 0.096801-1.9566 0.1103-2.9844 0.027344-0.0016335-0.063192-0.0078125-0.12632-0.0078125-0.18945 0-1.5333 0.48744-3.0828 1.5-4.6758zm4.8789 5.7578a5 5 0 0 1 -3.1484 3.6055c0.57106-1.0564 0.95277-2.1268 1.1367-3.2051 0.68204-0.10905 1.3556-0.23789 2.0117-0.40039zm-9.7461 0.033203c0.68377 0.18153 1.3555 0.33345 2.0098 0.43164 0.18781 1.0551 0.56647 2.1026 1.125 3.1367a5 5 0 0 1 -3.1348 -3.5684zm6.168 0.55469c-0.22615 0.98866-0.65424 1.9884-1.3008 3.0059-0.63811-1.0042-1.0645-1.9908-1.293-2.9668 0.89027 0.054126 1.7517 0.029377 2.5938-0.039062z" fill="#fc9c9c" fill-opacity=".99608"/>
+<path transform="translate(0 1036.4)" d="m8 1v2.3242c1.0126 1.593 1.5 3.1425 1.5 4.6758 0 0.054042-0.0066161 0.10803-0.0078125 0.16211-0.4894 0.049148-0.98713 0.077552-1.4922 0.082031v1.4922c0.43915-0.0075968 0.87287-0.031628 1.3008-0.066406-0.22615 0.98866-0.65424 1.9884-1.3008 3.0059v2.3242a7 7 0 0 0 7 -7 7 7 0 0 0 -7 -7zm1.7324 2.3164a5 5 0 0 1 3.2383 4.1875c-0.65187 0.17448-1.3077 0.32867-1.9727 0.44922-0.00845-1.5627-0.44294-3.1141-1.2656-4.6367zm3.1465 5.7656a5 5 0 0 1 -3.1484 3.6055c0.57106-1.0564 0.95277-2.1268 1.1367-3.2051 0.68204-0.10905 1.3556-0.23789 2.0117-0.40039z" fill="#a5b7f3"/>
</g>
</svg>
diff --git a/editor/icons/icon_y_sort.svg b/editor/icons/icon_y_sort.svg
index 6ad296ba54..1b48f4b8e3 100644
--- a/editor/icons/icon_y_sort.svg
+++ b/editor/icons/icon_y_sort.svg
@@ -1,8 +1,5 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)" fill="#a5b7f3" fill-opacity=".98824">
-<rect x="9" y="1038.4" width="6" height="2"/>
-<path d="m3 1048.4h-2l3 3 3-3h-2v-8h2l-3-3-3 3h2z"/>
-<rect x="9" y="1043.4" width="4" height="2"/>
-<rect x="9" y="1048.4" width="2" height="2"/>
+<g transform="translate(0 -1036.4)">
+<path transform="translate(0 1036.4)" d="m4 1l-3 3h2v8h-2l3 3 3-3h-2v-8h2l-3-3zm5 1v2h6v-2h-6zm0 5v2h4v-2h-4zm0 5v2h2v-2h-2z" fill="#a5b7f3" fill-opacity=".98824"/>
</g>
</svg>
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp
index b3ccb5097e..b1991d755b 100644
--- a/editor/import/editor_import_collada.cpp
+++ b/editor/import/editor_import_collada.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -41,6 +41,8 @@
#include "scene/animation/animation_player.h"
#include "scene/resources/animation.h"
#include "scene/resources/packed_scene.h"
+#include "scene/resources/surface_tool.h"
+
#include <iostream>
struct ColladaImport {
@@ -320,7 +322,7 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Spatial *p_parent) {
} else {
//mesh since nothing else
node = memnew(MeshInstance);
- node->cast_to<MeshInstance>()->set_flag(GeometryInstance::FLAG_USE_BAKED_LIGHT, true);
+ Object::cast_to<MeshInstance>(node)->set_flag(GeometryInstance::FLAG_USE_BAKED_LIGHT, true);
}
} break;
case Collada::Node::TYPE_SKELETON: {
@@ -867,7 +869,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
int normal_pos = (normal_src->stride ? normal_src->stride : 3) * p.indices[src + normal_ofs];
ERR_FAIL_INDEX_V(normal_pos, normal_src->array.size(), ERR_INVALID_DATA);
vertex.normal = Vector3(normal_src->array[normal_pos + 0], normal_src->array[normal_pos + 1], normal_src->array[normal_pos + 2]);
- vertex.normal.snap(Vector3(0.001, 0.001, 0.001));
if (tangent_src && binormal_src) {
@@ -990,18 +991,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
}
}
- PoolVector<int> index_array;
- index_array.resize(indices_list.size());
- PoolVector<int>::Write index_arrayw = index_array.write();
-
- int iidx = 0;
- for (List<int>::Element *F = indices_list.front(); F; F = F->next()) {
-
- index_arrayw[iidx++] = F->get();
- }
-
- index_arrayw = PoolVector<int>::Write();
-
/*****************/
/* MAKE SURFACES */
/*****************/
@@ -1010,9 +999,6 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
Ref<SpatialMaterial> material;
- //find material
- Mesh::PrimitiveType primitive = Mesh::PRIMITIVE_TRIANGLES;
-
{
if (p_material_map.has(p.material)) {
@@ -1030,391 +1016,89 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
}
}
- PoolVector<Vector3> final_vertex_array;
- PoolVector<Vector3> final_normal_array;
- PoolVector<float> final_tangent_array;
- PoolVector<Color> final_color_array;
- PoolVector<Vector3> final_uv_array;
- PoolVector<Vector3> final_uv2_array;
- PoolVector<int> final_bone_array;
- PoolVector<float> final_weight_array;
-
- uint32_t final_format = 0;
-
- //create format
- final_format = Mesh::ARRAY_FORMAT_VERTEX | Mesh::ARRAY_FORMAT_INDEX;
+ Ref<SurfaceTool> surftool;
+ surftool.instance();
+ surftool->begin(Mesh::PRIMITIVE_TRIANGLES);
- if (normal_src) {
- final_format |= Mesh::ARRAY_FORMAT_NORMAL;
- if (uv_src && binormal_src && tangent_src) {
- final_format |= Mesh::ARRAY_FORMAT_TANGENT;
+ for (int k = 0; k < vertex_array.size(); k++) {
+ if (normal_src) {
+ surftool->add_normal(vertex_array[k].normal);
+ if (binormal_src && tangent_src) {
+ surftool->add_tangent(vertex_array[k].tangent);
+ }
}
- }
-
- if (color_src)
- final_format |= Mesh::ARRAY_FORMAT_COLOR;
- if (uv_src)
- final_format |= Mesh::ARRAY_FORMAT_TEX_UV;
- if (uv2_src)
- final_format |= Mesh::ARRAY_FORMAT_TEX_UV2;
-
- if (has_weights) {
- final_format |= Mesh::ARRAY_FORMAT_WEIGHTS;
- final_format |= Mesh::ARRAY_FORMAT_BONES;
- }
-
- //set arrays
-
- int vlen = vertex_array.size();
- { //vertices
-
- PoolVector<Vector3> varray;
- varray.resize(vertex_array.size());
-
- PoolVector<Vector3>::Write varrayw = varray.write();
-
- for (int k = 0; k < vlen; k++)
- varrayw[k] = vertex_array[k].vertex;
-
- varrayw = PoolVector<Vector3>::Write();
- final_vertex_array = varray;
- }
-
- if (uv_src) { //compute uv first, may be needed for computing tangent/bionrmal
- PoolVector<Vector3> uvarray;
- uvarray.resize(vertex_array.size());
- PoolVector<Vector3>::Write uvarrayw = uvarray.write();
-
- for (int k = 0; k < vlen; k++) {
- uvarrayw[k] = vertex_array[k].uv;
+ if (uv_src) {
+ surftool->add_uv(Vector2(vertex_array[k].uv.x, vertex_array[k].uv.y));
}
-
- uvarrayw = PoolVector<Vector3>::Write();
- final_uv_array = uvarray;
- }
-
- if (uv2_src) { //compute uv first, may be needed for computing tangent/bionrmal
- PoolVector<Vector3> uv2array;
- uv2array.resize(vertex_array.size());
- PoolVector<Vector3>::Write uv2arrayw = uv2array.write();
-
- for (int k = 0; k < vlen; k++) {
- uv2arrayw[k] = vertex_array[k].uv2;
+ if (uv2_src) {
+ surftool->add_uv2(Vector2(vertex_array[k].uv2.x, vertex_array[k].uv2.y));
}
-
- uv2arrayw = PoolVector<Vector3>::Write();
- final_uv2_array = uv2array;
- }
-
- if (normal_src) {
- PoolVector<Vector3> narray;
- narray.resize(vertex_array.size());
- PoolVector<Vector3>::Write narrayw = narray.write();
-
- for (int k = 0; k < vlen; k++) {
- narrayw[k] = vertex_array[k].normal;
+ if (color_src) {
+ surftool->add_color(vertex_array[k].color);
}
- narrayw = PoolVector<Vector3>::Write();
- final_normal_array = narray;
-
- /*
- PoolVector<Vector3> altnaray;
- _generate_normals(index_array,final_vertex_array,altnaray);
-
- for(int i=0;i<altnaray.size();i++)
- print_line(rtos(altnaray[i].dot(final_normal_array[i])));
- */
-
- } else if (primitive == Mesh::PRIMITIVE_TRIANGLES) {
- //generate normals (even if unused later)
-
- _generate_normals(index_array, final_vertex_array, final_normal_array);
- if (OS::get_singleton()->is_stdout_verbose())
- print_line("Collada: Triangle mesh lacks normals, so normals were generated.");
- final_format |= Mesh::ARRAY_FORMAT_NORMAL;
- }
-
- if (final_normal_array.size() && uv_src && binormal_src && tangent_src && !force_make_tangents) {
+ if (has_weights) {
+ Vector<float> weights;
+ Vector<int> bones;
+ weights.resize(VS::ARRAY_WEIGHTS_SIZE);
+ bones.resize(VS::ARRAY_WEIGHTS_SIZE);
+ //float sum=0.0;
+ for (int l = 0; l < VS::ARRAY_WEIGHTS_SIZE; l++) {
+ if (l < vertex_array[k].weights.size()) {
+ weights[l] = vertex_array[k].weights[l].weight;
+ bones[l] = vertex_array[k].weights[l].bone_idx;
+ //sum += vertex_array[k].weights[l].weight;
+ } else {
- PoolVector<real_t> tarray;
- tarray.resize(vertex_array.size() * 4);
- PoolVector<real_t>::Write tarrayw = tarray.write();
+ weights[l] = 0;
+ bones[l] = 0;
+ }
+ }
- for (int k = 0; k < vlen; k++) {
- tarrayw[k * 4 + 0] = vertex_array[k].tangent.normal.x;
- tarrayw[k * 4 + 1] = vertex_array[k].tangent.normal.y;
- tarrayw[k * 4 + 2] = vertex_array[k].tangent.normal.z;
- tarrayw[k * 4 + 3] = vertex_array[k].tangent.d;
+ surftool->add_bones(bones);
+ surftool->add_weights(weights);
}
- tarrayw = PoolVector<real_t>::Write();
-
- final_tangent_array = tarray;
- } else if (final_normal_array.size() && primitive == Mesh::PRIMITIVE_TRIANGLES && final_uv_array.size() && (force_make_tangents || (material.is_valid()))) {
- //if this uses triangles, there are uvs and the material is using a normalmap, generate tangents and binormals, because they WILL be needed
- //generate binormals/tangents
- _generate_tangents_and_binormals(index_array, final_vertex_array, final_uv_array, final_normal_array, final_tangent_array);
- final_format |= Mesh::ARRAY_FORMAT_TANGENT;
- if (OS::get_singleton()->is_stdout_verbose())
- print_line("Collada: Triangle mesh lacks tangents (And normalmap was used), so tangents were generated.");
+ surftool->add_vertex(vertex_array[k].vertex);
}
- if (color_src) {
- PoolVector<Color> colorarray;
- colorarray.resize(vertex_array.size());
- PoolVector<Color>::Write colorarrayw = colorarray.write();
-
- for (int k = 0; k < vlen; k++) {
- colorarrayw[k] = vertex_array[k].color;
- }
-
- colorarrayw = PoolVector<Color>::Write();
-
- final_color_array = colorarray;
+ for (List<int>::Element *E = indices_list.front(); E; E = E->next()) {
+ surftool->add_index(E->get());
}
- if (has_weights) {
- PoolVector<float> weightarray;
- PoolVector<int> bonearray;
-
- weightarray.resize(vertex_array.size() * 4);
- PoolVector<float>::Write weightarrayw = weightarray.write();
- bonearray.resize(vertex_array.size() * 4);
- PoolVector<int>::Write bonearrayw = bonearray.write();
-
- for (int k = 0; k < vlen; k++) {
- float sum = 0;
-
- for (int l = 0; l < VS::ARRAY_WEIGHTS_SIZE; l++) {
- if (l < vertex_array[k].weights.size()) {
- weightarrayw[k * VS::ARRAY_WEIGHTS_SIZE + l] = vertex_array[k].weights[l].weight;
- sum += weightarrayw[k * VS::ARRAY_WEIGHTS_SIZE + l];
- bonearrayw[k * VS::ARRAY_WEIGHTS_SIZE + l] = int(vertex_array[k].weights[l].bone_idx);
- //COLLADA_PRINT(itos(k)+": "+rtos(bonearrayw[k*VS::ARRAY_WEIGHTS_SIZE+l])+":"+rtos(weightarray[k*VS::ARRAY_WEIGHTS_SIZE+l]));
- } else {
-
- weightarrayw[k * VS::ARRAY_WEIGHTS_SIZE + l] = 0;
- bonearrayw[k * VS::ARRAY_WEIGHTS_SIZE + l] = 0;
- }
- }
- /*
- if (sum<0.8)
- COLLADA_PRINT("ERROR SUMMING INDEX "+itos(k)+" had weights: "+itos(vertex_array[k].weights.size()));
- */
- }
+ if (!normal_src) {
+ //should always be normals
+ surftool->generate_normals();
+ }
- weightarrayw = PoolVector<float>::Write();
- bonearrayw = PoolVector<int>::Write();
+ if ((!binormal_src || !tangent_src) && normal_src && uv_src && force_make_tangents) {
- final_weight_array = weightarray;
- final_bone_array = bonearray;
+ surftool->generate_tangents();
}
////////////////////////////
// FINALLY CREATE SUFRACE //
////////////////////////////
- Array d;
+ Array d = surftool->commit_to_arrays();
d.resize(VS::ARRAY_MAX);
- d[Mesh::ARRAY_INDEX] = index_array;
- d[Mesh::ARRAY_VERTEX] = final_vertex_array;
-
- if (final_normal_array.size())
- d[Mesh::ARRAY_NORMAL] = final_normal_array;
- if (final_tangent_array.size())
- d[Mesh::ARRAY_TANGENT] = final_tangent_array;
- if (final_uv_array.size())
- d[Mesh::ARRAY_TEX_UV] = final_uv_array;
- if (final_uv2_array.size())
- d[Mesh::ARRAY_TEX_UV2] = final_uv2_array;
- if (final_color_array.size())
- d[Mesh::ARRAY_COLOR] = final_color_array;
- if (final_weight_array.size())
- d[Mesh::ARRAY_WEIGHTS] = final_weight_array;
- if (final_bone_array.size())
- d[Mesh::ARRAY_BONES] = final_bone_array;
-
Array mr;
-////////////////////////////
-// THEN THE MORPH TARGETS //
-////////////////////////////
-#if 0
- if (p_morph_data) {
-
- //add morphie target
- ERR_FAIL_COND_V( !p_morph_data->targets.has("MORPH_TARGET"), ERR_INVALID_DATA );
- String mt = p_morph_data->targets["MORPH_TARGET"];
- ERR_FAIL_COND_V( !p_morph_data->sources.has(mt), ERR_INVALID_DATA);
- int morph_targets = p_morph_data->sources[mt].sarray.size();
- mr.resize(morph_targets);
-
- for(int j=0;j<morph_targets;j++) {
-
- Array mrt;
- mrt.resize(VS::ARRAY_MAX);
-
- String target = p_morph_data->sources[mt].sarray[j];
- ERR_FAIL_COND_V( !collada.state.mesh_data_map.has(target), ERR_INVALID_DATA );
- String name = collada.state.mesh_data_map[target].name;
- Collada::MeshData &md = collada.state.mesh_data_map[target];
-
- // collada in itself supports morphing everything. However, the spec is unclear and no examples or exporters that
- // morph anything but "POSITIONS" seem to exit. Because of this, normals and binormals/tangents have to be regenerated here,
- // which may result in inaccurate (but most of the time good enough) results.
-
- PoolVector<Vector3> vertices;
- vertices.resize(vlen);
-
- ERR_FAIL_COND_V( md.vertices.size() != 1, ERR_INVALID_DATA);
- String vertex_src_id=md.vertices.front()->key();
- ERR_FAIL_COND_V(!md.vertices[vertex_src_id].sources.has("POSITION"),ERR_INVALID_DATA);
- String position_src_id = md.vertices[vertex_src_id].sources["POSITION"];
-
- ERR_FAIL_COND_V(!md.sources.has(position_src_id),ERR_INVALID_DATA);
-
- const Collada::MeshData::Source *m=&md.sources[position_src_id];
-
- ERR_FAIL_COND_V( m->array.size() != vertex_src->array.size(), ERR_INVALID_DATA);
- int stride=m->stride;
- if (stride==0)
- stride=3;
-
-
- //read vertices from morph target
- PoolVector<Vector3>::Write vertw = vertices.write();
-
- for(int m_i=0;m_i<m->array.size()/stride;m_i++) {
-
- int pos = m_i*stride;
- Vector3 vtx( m->array[pos+0], m->array[pos+1], m->array[pos+2] );
-
-#ifndef NO_UP_AXIS_SWAP
- if (collada.state.up_axis==Vector3::AXIS_Z) {
-
- SWAP( vtx.z, vtx.y );
- vtx.z = -vtx.z;
-
- }
-#endif
-
- Collada::Vertex vertex;
- vertex.vertex=vtx;
- vertex.fix_unit_scale(collada);
- vtx=vertex.vertex;
-
- vtx = p_local_xform.xform(vtx);
-
-
- if (vertex_map.has(m_i)) { //vertex may no longer be here, don't bother converting
-
-
- for (Set<int> ::Element *E=vertex_map[m_i].front() ; E; E=E->next() ) {
-
- vertw[E->get()]=vtx;
- }
- }
- }
-
-
- //vertices are in place, now generate everything else
- vertw = PoolVector<Vector3>::Write();
- PoolVector<Vector3> normals;
- PoolVector<float> tangents;
- print_line("vertex source id: "+vertex_src_id);
- if(md.vertices[vertex_src_id].sources.has("NORMAL")){
- //has normals
- normals.resize(vlen);
- //std::cout << "has normals" << std::endl;
- String normal_src_id = md.vertices[vertex_src_id].sources["NORMAL"];
- //std::cout << "normals source: "<< normal_src_id.utf8().get_data() <<std::endl;
- ERR_FAIL_COND_V(!md.sources.has(normal_src_id),ERR_INVALID_DATA);
-
- const Collada::MeshData::Source *m=&md.sources[normal_src_id];
-
- ERR_FAIL_COND_V( m->array.size() != vertex_src->array.size(), ERR_INVALID_DATA);
- int stride=m->stride;
- if (stride==0)
- stride=3;
-
-
- //read normals from morph target
- PoolVector<Vector3>::Write vertw = normals.write();
-
- for(int m_i=0;m_i<m->array.size()/stride;m_i++) {
-
- int pos = m_i*stride;
- Vector3 vtx( m->array[pos+0], m->array[pos+1], m->array[pos+2] );
-
-#ifndef NO_UP_AXIS_SWAP
- if (collada.state.up_axis==Vector3::AXIS_Z) {
-
- SWAP( vtx.z, vtx.y );
- vtx.z = -vtx.z;
-
- }
-#endif
-
- Collada::Vertex vertex;
- vertex.vertex=vtx;
- vertex.fix_unit_scale(collada);
- vtx=vertex.vertex;
-
- vtx = p_local_xform.xform(vtx);
-
-
- if (vertex_map.has(m_i)) { //vertex may no longer be here, don't bother converting
-
-
- for (Set<int> ::Element *E=vertex_map[m_i].front() ; E; E=E->next() ) {
-
- vertw[E->get()]=vtx;
- }
- }
- }
-
- print_line("using built-in normals");
- }else{
- print_line("generating normals");
- _generate_normals(index_array,vertices,normals);//no normals
- }
- if (final_tangent_array.size() && final_uv_array.size()) {
-
- _generate_tangents_and_binormals(index_array,vertices,final_uv_array,normals,tangents);
-
- }
-
- mrt[Mesh::ARRAY_VERTEX]=vertices;
-
- mrt[Mesh::ARRAY_NORMAL]=normals;
- if (tangents.size())
- mrt[Mesh::ARRAY_TANGENT]=tangents;
- if (final_uv_array.size())
- mrt[Mesh::ARRAY_TEX_UV]=final_uv_array;
- if (final_uv2_array.size())
- mrt[Mesh::ARRAY_TEX_UV2]=final_uv2_array;
- if (final_color_array.size())
- mrt[Mesh::ARRAY_COLOR]=final_color_array;
-
- mr[j]=mrt;
-
- }
-
- }
+ ////////////////////////////
+ // THEN THE MORPH TARGETS //
+ ////////////////////////////
-#endif
for (int mi = 0; mi < p_morph_meshes.size(); mi++) {
//print_line("want surface "+itos(mi)+" has "+itos(p_morph_meshes[mi]->get_surface_count()));
Array a = p_morph_meshes[mi]->surface_get_arrays(surface);
//add valid weight and bone arrays if they exist, TODO check if they are unique to shape (generally not)
- if (final_weight_array.size())
- a[Mesh::ARRAY_WEIGHTS] = final_weight_array;
- if (final_bone_array.size())
- a[Mesh::ARRAY_BONES] = final_bone_array;
+ if (has_weights) {
+ a[Mesh::ARRAY_WEIGHTS] = d[Mesh::ARRAY_WEIGHTS];
+ a[Mesh::ARRAY_BONES] = d[Mesh::ARRAY_BONES];
+ }
a[Mesh::ARRAY_INDEX] = Variant();
//a.resize(Mesh::ARRAY_MAX); //no need for index
@@ -1448,9 +1132,9 @@ Error ColladaImport::_create_resources(Collada::Node *p_node) {
Spatial *node = node_map[p_node->id].node;
Collada::NodeGeometry *ng = static_cast<Collada::NodeGeometry *>(p_node);
- if (node->cast_to<Path>()) {
+ if (Object::cast_to<Path>(node)) {
- Path *path = node->cast_to<Path>();
+ Path *path = Object::cast_to<Path>(node);
String curve = ng->source;
@@ -1523,11 +1207,11 @@ Error ColladaImport::_create_resources(Collada::Node *p_node) {
}
}
- if (node->cast_to<MeshInstance>()) {
+ if (Object::cast_to<MeshInstance>(node)) {
Collada::NodeGeometry *ng = static_cast<Collada::NodeGeometry *>(p_node);
- MeshInstance *mi = node->cast_to<MeshInstance>();
+ MeshInstance *mi = Object::cast_to<MeshInstance>(node);
ERR_FAIL_COND_V(!mi, ERR_BUG);
@@ -1561,7 +1245,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node) {
}
ERR_FAIL_COND_V(!node_map.has(skname), ERR_INVALID_DATA);
NodeMap nmsk = node_map[skname];
- Skeleton *sk = nmsk.node->cast_to<Skeleton>();
+ Skeleton *sk = Object::cast_to<Skeleton>(nmsk.node);
ERR_FAIL_COND_V(!sk, ERR_INVALID_DATA);
ERR_FAIL_COND_V(!skeleton_bone_map.has(sk), ERR_INVALID_DATA);
Map<String, int> &bone_remap_map = skeleton_bone_map[sk];
@@ -2092,7 +1776,7 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
if (nm.bone >= 0) {
//make bone transform relative to rest (in case of skeleton)
- Skeleton *sk = nm.node->cast_to<Skeleton>();
+ Skeleton *sk = Object::cast_to<Skeleton>(nm.node);
if (sk) {
xform = sk->get_bone_rest(nm.bone).affine_inverse() * xform;
diff --git a/editor/import/editor_import_collada.h b/editor/import/editor_import_collada.h
index 2c60916d52..865a72739f 100644
--- a/editor/import/editor_import_collada.h
+++ b/editor/import/editor_import_collada.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp
index 4ebbcb1610..8af4ab63c7 100644
--- a/editor/import/editor_import_plugin.cpp
+++ b/editor/import/editor_import_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/import/editor_import_plugin.h b/editor/import/editor_import_plugin.h
index b60813db61..08d6de5531 100644
--- a/editor/import/editor_import_plugin.h
+++ b/editor/import/editor_import_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp
index 1c42bcef8a..21cf08f524 100644
--- a/editor/import/editor_scene_importer_gltf.cpp
+++ b/editor/import/editor_scene_importer_gltf.cpp
@@ -474,7 +474,7 @@ Error EditorSceneImporterGLTF::_decode_buffer_view(GLTFState &state, int p_buffe
int buffer_end = (stride * (count - 1)) + element_size;
ERR_FAIL_COND_V(buffer_end > bv.byte_length, ERR_PARSE_ERROR);
- ERR_FAIL_COND_V((offset + buffer_end) > buffer.size(), ERR_PARSE_ERROR);
+ ERR_FAIL_COND_V((int)(offset + buffer_end) > buffer.size(), ERR_PARSE_ERROR);
//fill everything as doubles
@@ -1216,7 +1216,7 @@ Error EditorSceneImporterGLTF::_parse_materials(GLTFState &state) {
if (bct.has("index")) {
Ref<Texture> t = _get_texture(state, bct["index"]);
material->set_texture(SpatialMaterial::TEXTURE_METALLIC, t);
- material->set_metallic_texture_channel(SpatialMaterial::TEXTURE_CHANNEL_RED);
+ material->set_metallic_texture_channel(SpatialMaterial::TEXTURE_CHANNEL_BLUE);
material->set_texture(SpatialMaterial::TEXTURE_ROUGHNESS, t);
material->set_roughness_texture_channel(SpatialMaterial::TEXTURE_CHANNEL_GREEN);
if (!mr.has("metallicFactor")) {
@@ -1243,6 +1243,7 @@ Error EditorSceneImporterGLTF::_parse_materials(GLTFState &state) {
Dictionary bct = d["occlusionTexture"];
if (bct.has("index")) {
material->set_texture(SpatialMaterial::TEXTURE_AMBIENT_OCCLUSION, _get_texture(state, bct["index"]));
+ material->set_ao_texture_channel(SpatialMaterial::TEXTURE_CHANNEL_RED);
material->set_feature(SpatialMaterial::FEATURE_AMBIENT_OCCLUSION, true);
}
}
@@ -1433,6 +1434,8 @@ Error EditorSceneImporterGLTF::_parse_cameras(GLTFState &state) {
}
print_line("total cameras: " + itos(state.cameras.size()));
+
+ return OK;
}
Error EditorSceneImporterGLTF::_parse_animations(GLTFState &state) {
diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp
index 9214b8f45e..4bbf5ba316 100644
--- a/editor/import/resource_importer_csv_translation.cpp
+++ b/editor/import/resource_importer_csv_translation.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -73,19 +73,26 @@ String ResourceImporterCSVTranslation::get_preset_name(int p_idx) const {
void ResourceImporterCSVTranslation::get_import_options(List<ImportOption> *r_options, int p_preset) const {
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "compress"), true));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "delimiter", PROPERTY_HINT_ENUM, "Comma,Semicolon,Tab"), 0));
}
Error ResourceImporterCSVTranslation::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files) {
bool compress = p_options["compress"];
+
+ String delimiter;
+ switch ((int)p_options["delimiter"]) {
+ case 0: delimiter = ","; break;
+ case 1: delimiter = ";"; break;
+ case 2: delimiter = "\t"; break;
+ }
+
FileAccessRef f = FileAccess::open(p_source_file, FileAccess::READ);
ERR_FAIL_COND_V(!f, ERR_INVALID_PARAMETER);
- Vector<String> line = f->get_csv_line();
- if (line.size() <= 1) {
- return ERR_PARSE_ERROR;
- }
+ Vector<String> line = f->get_csv_line(delimiter);
+ ERR_FAIL_COND_V(line.size() <= 1, ERR_PARSE_ERROR);
Vector<String> locales;
Vector<Ref<Translation> > translations;
@@ -93,9 +100,8 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const
for (int i = 1; i < line.size(); i++) {
String locale = line[i];
- if (!TranslationServer::is_locale_valid(locale)) {
- return ERR_PARSE_ERROR;
- }
+ ERR_EXPLAIN("Error importing CSV translation: '" + locale + "' is not a valid locale");
+ ERR_FAIL_COND_V(!TranslationServer::is_locale_valid(locale), ERR_PARSE_ERROR);
locales.push_back(locale);
Ref<Translation> translation;
@@ -104,7 +110,7 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const
translations.push_back(translation);
}
- line = f->get_csv_line();
+ line = f->get_csv_line(delimiter);
while (line.size() == locales.size() + 1) {
@@ -116,7 +122,7 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const
}
}
- line = f->get_csv_line();
+ line = f->get_csv_line(delimiter);
}
for (int i = 0; i < translations.size(); i++) {
diff --git a/editor/import/resource_importer_csv_translation.h b/editor/import/resource_importer_csv_translation.h
index 748c6264df..8919f4ed33 100644
--- a/editor/import/resource_importer_csv_translation.h
+++ b/editor/import/resource_importer_csv_translation.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp
index 8f86e64cf2..6a936649c3 100644
--- a/editor/import/resource_importer_obj.cpp
+++ b/editor/import/resource_importer_obj.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/import/resource_importer_obj.h b/editor/import/resource_importer_obj.h
index c8285ce6c9..247d58e148 100644
--- a/editor/import/resource_importer_obj.h
+++ b/editor/import/resource_importer_obj.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index 798f57f8c3..594728d2e0 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -171,41 +171,10 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
memdelete(p_node);
return NULL;
}
-#if 0
- if (p_node->cast_to<MeshInstance>()) {
-
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
-
- bool bb = false;
-
- if ((_teststr(name, "bb"))) {
- bb = true;
- } else if (mi->get_mesh().is_valid() && (_teststr(mi->get_mesh()->get_name(), "bb"))) {
- bb = true;
- }
- if (bb) {
- mi->set_flag(GeometryInstance::FLAG_BILLBOARD, true);
- if (mi->get_mesh().is_valid()) {
+ if (Object::cast_to<MeshInstance>(p_node)) {
- Ref<ArrayMesh> m = mi->get_mesh();
- for (int i = 0; i < m->get_surface_count(); i++) {
-
- Ref<SpatialMaterial> fm = m->surface_get_material(i);
- if (fm.is_valid()) {
- //fm->set_flag(Material::FLAG_UNSHADED,true);
- //fm->set_flag(Material::FLAG_DOUBLE_SIDED,true);
- //fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER);
- //fm->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA,true);
- }
- }
- }
- }
- }
-#endif
- if (p_node->cast_to<MeshInstance>()) {
-
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
+ MeshInstance *mi = Object::cast_to<MeshInstance>(p_node);
Ref<ArrayMesh> m = mi->get_mesh();
@@ -232,9 +201,9 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
}
}
- if (p_node->cast_to<AnimationPlayer>()) {
+ if (Object::cast_to<AnimationPlayer>(p_node)) {
//remove animations referencing non-importable nodes
- AnimationPlayer *ap = p_node->cast_to<AnimationPlayer>();
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node);
List<StringName> anims;
ap->get_animation_list(&anims);
@@ -256,133 +225,24 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
}
}
}
-#if 0
- if (p_node->cast_to<MeshInstance>()) {
-
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
-
- String str;
-
- if ((_teststr(name, "imp"))) {
- str = name;
- } else if (mi->get_mesh().is_valid() && (_teststr(mi->get_mesh()->get_name(), "imp"))) {
- str = mi->get_mesh()->get_name();
- }
-
- if (p_node->get_parent() && p_node->get_parent()->cast_to<MeshInstance>()) {
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
- MeshInstance *mip = p_node->get_parent()->cast_to<MeshInstance>();
- String d = str.substr(str.find("imp") + 3, str.length());
- if (d != "") {
- if ((d[0] < '0' || d[0] > '9'))
- d = d.substr(1, d.length());
- if (d.length() && d[0] >= '0' && d[0] <= '9') {
- float dist = d.to_double();
- mi->set_flag(GeometryInstance::FLAG_BILLBOARD, true);
- mi->set_flag(GeometryInstance::FLAG_BILLBOARD_FIX_Y, true);
- //mi->set_draw_range_begin(dist);
- //mi->set_draw_range_end(100000);
-
- //mip->set_draw_range_begin(0);
- //mip->set_draw_range_end(dist);
-
- if (mi->get_mesh().is_valid()) {
-
- Ref<ArrayMesh> m = mi->get_mesh();
- for (int i = 0; i < m->get_surface_count(); i++) {
-
- Ref<SpatialMaterial> fm = m->surface_get_material(i);
- if (fm.is_valid()) {
- //fm->set_flag(Material::FLAG_UNSHADED,true);
- //fm->set_flag(Material::FLAG_DOUBLE_SIDED,true);
- //fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER);
- //fm->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA,true);
- }
- }
- }
- }
- }
- }
- }
-
-#endif
-#if 0
- if (p_flags&SCENE_FLAG_CREATE_LODS && p_node->cast_to<MeshInstance>()) {
-
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
-
- String str;
-
- if ((_teststr(name,"lod"))) {
- str=name;
- } else if (mi->get_mesh().is_valid() && (_teststr(mi->get_mesh()->get_name(),"lod"))) {
- str=mi->get_mesh()->get_name();
-
- }
-
-
- if (p_node->get_parent() && p_node->get_parent()->cast_to<MeshInstance>()) {
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
- MeshInstance *mip = p_node->get_parent()->cast_to<MeshInstance>();
- String d=str.substr(str.find("lod")+3,str.length());
- if (d!="") {
- if ((d[0]<'0' || d[0]>'9'))
- d=d.substr(1,d.length());
- if (d.length() && d[0]>='0' && d[0]<='9') {
- float dist = d.to_double();
- /// mi->set_draw_range_begin(dist);
- // mi->set_draw_range_end(100000);
-
- // mip->set_draw_range_begin(0);
- // mip->set_draw_range_end(dist);
-
- /*if (mi->get_mesh().is_valid()) {
-
- Ref<ArrayMesh> m = mi->get_mesh();
- for(int i=0;i<m->get_surface_count();i++) {
-
- Ref<SpatialMaterial> fm = m->surface_get_material(i);
- if (fm.is_valid()) {
- fm->set_flag(Material::FLAG_UNSHADED,true);
- fm->set_flag(Material::FLAG_DOUBLE_SIDED,true);
- fm->set_hint(Material::HINT_NO_DEPTH_DRAW,true);
- fm->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA,true);
- }
- }
- }*/
- }
- }
- }
- }
-
-
- if (p_flags&SCENE_FLAG_DETECT_LIGHTMAP_LAYER && _teststr(name,"lm") && p_node->cast_to<MeshInstance>()) {
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
-
- String str=name;
- int layer = str.substr(str.find("lm")+3,str.length()).to_int();
- //mi->set_baked_light_texture_id(layer);
- }
-#endif
if (_teststr(name, "colonly")) {
if (isroot)
return p_node;
- if (p_node->cast_to<MeshInstance>()) {
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
+ if (MeshInstance *mi = Object::cast_to<MeshInstance>(p_node)) {
Node *col = mi->create_trimesh_collision_node();
ERR_FAIL_COND_V(!col, NULL);
col->set_name(_fixstr(name, "colonly"));
- col->cast_to<Spatial>()->set_transform(mi->get_transform());
+ Object::cast_to<Spatial>(col)->set_transform(mi->get_transform());
p_node->replace_by(col);
memdelete(p_node);
p_node = col;
- StaticBody *sb = col->cast_to<StaticBody>();
- CollisionShape *colshape = sb->get_child(0)->cast_to<CollisionShape>();
+ StaticBody *sb = Object::cast_to<StaticBody>(col);
+ CollisionShape *colshape = Object::cast_to<CollisionShape>(sb->get_child(0));
colshape->set_name("shape");
colshape->set_owner(p_node->get_owner());
} else if (p_node->has_meta("empty_draw_type")) {
@@ -390,7 +250,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
print_line(empty_draw_type);
StaticBody *sb = memnew(StaticBody);
sb->set_name(_fixstr(name, "colonly"));
- sb->cast_to<Spatial>()->set_transform(p_node->cast_to<Spatial>()->get_transform());
+ Object::cast_to<Spatial>(sb)->set_transform(Object::cast_to<Spatial>(p_node)->get_transform());
p_node->replace_by(sb);
memdelete(p_node);
CollisionShape *colshape = memnew(CollisionShape);
@@ -404,7 +264,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
rayShape->set_length(1);
colshape->set_shape(rayShape);
colshape->set_name("RayShape");
- sb->cast_to<Spatial>()->rotate_x(Math_PI / 2);
+ Object::cast_to<Spatial>(sb)->rotate_x(Math_PI / 2);
} else if (empty_draw_type == "IMAGE") {
PlaneShape *planeShape = memnew(PlaneShape);
colshape->set_shape(planeShape);
@@ -419,13 +279,13 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
colshape->set_owner(sb->get_owner());
}
- } else if (_teststr(name, "rigid") && p_node->cast_to<MeshInstance>()) {
+ } else if (_teststr(name, "rigid") && Object::cast_to<MeshInstance>(p_node)) {
if (isroot)
return p_node;
// get mesh instance and bounding box
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
+ MeshInstance *mi = Object::cast_to<MeshInstance>(p_node);
Rect3 aabb = mi->get_aabb();
// create a new rigid body collision node
@@ -436,12 +296,12 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
// remove node name postfix
col->set_name(_fixstr(name, "rigid"));
// get mesh instance xform matrix to the rigid body collision node
- col->cast_to<Spatial>()->set_transform(mi->get_transform());
+ Object::cast_to<Spatial>(col)->set_transform(mi->get_transform());
// save original node by duplicating it into a new instance and correcting the name
Node *mesh = p_node->duplicate();
mesh->set_name(_fixstr(name, "rigid"));
// reset the xform matrix of the duplicated node so it can inherit parent node xform
- mesh->cast_to<Spatial>()->set_transform(Transform(Basis()));
+ Object::cast_to<Spatial>(mesh)->set_transform(Transform(Basis()));
// reparent the new mesh node to the rigid body collision node
p_node->add_child(mesh);
mesh->set_owner(p_node->get_owner());
@@ -451,7 +311,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
p_node = col;
// create an alias for the rigid body collision node
- RigidBody *rb = col->cast_to<RigidBody>();
+ RigidBody *rb = Object::cast_to<RigidBody>(col);
// create a new Box collision shape and set the right extents
Ref<BoxShape> shape = memnew(BoxShape);
shape->set_extents(aabb.get_size() * 0.5);
@@ -462,9 +322,9 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
rb->add_child(colshape);
colshape->set_owner(p_node->get_owner());
- } else if (_teststr(name, "col") && p_node->cast_to<MeshInstance>()) {
+ } else if (_teststr(name, "col") && Object::cast_to<MeshInstance>(p_node)) {
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
+ MeshInstance *mi = Object::cast_to<MeshInstance>(p_node);
mi->set_name(_fixstr(name, "col"));
Node *col = mi->create_trimesh_collision_node();
@@ -473,19 +333,19 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
col->set_name("col");
p_node->add_child(col);
- StaticBody *sb = col->cast_to<StaticBody>();
- CollisionShape *colshape = sb->get_child(0)->cast_to<CollisionShape>();
+ StaticBody *sb = Object::cast_to<StaticBody>(col);
+ CollisionShape *colshape = Object::cast_to<CollisionShape>(sb->get_child(0));
colshape->set_name("shape");
col->add_child(colshape);
colshape->set_owner(p_node->get_owner());
sb->set_owner(p_node->get_owner());
- } else if (_teststr(name, "navmesh") && p_node->cast_to<MeshInstance>()) {
+ } else if (_teststr(name, "navmesh") && Object::cast_to<MeshInstance>(p_node)) {
if (isroot)
return p_node;
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
+ MeshInstance *mi = Object::cast_to<MeshInstance>(p_node);
Ref<ArrayMesh> mesh = mi->get_mesh();
ERR_FAIL_COND_V(mesh.is_null(), NULL);
@@ -495,7 +355,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
Ref<NavigationMesh> nmesh = memnew(NavigationMesh);
nmesh->create_from_mesh(mesh);
nmi->set_navigation_mesh(nmesh);
- nmi->cast_to<Spatial>()->set_transform(mi->get_transform());
+ Object::cast_to<Spatial>(nmi)->set_transform(mi->get_transform());
p_node->replace_by(nmi);
memdelete(p_node);
p_node = nmi;
@@ -505,7 +365,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
return p_node;
Node *owner = p_node->get_owner();
- Spatial *s = p_node->cast_to<Spatial>();
+ Spatial *s = Object::cast_to<Spatial>(p_node);
VehicleBody *bv = memnew(VehicleBody);
String n = _fixstr(p_node->get_name(), "vehicle");
bv->set_name(n);
@@ -525,7 +385,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
return p_node;
Node *owner = p_node->get_owner();
- Spatial *s = p_node->cast_to<Spatial>();
+ Spatial *s = Object::cast_to<Spatial>(p_node);
VehicleWheel *bv = memnew(VehicleWheel);
String n = _fixstr(p_node->get_name(), "wheel");
bv->set_name(n);
@@ -538,13 +398,13 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
s->set_transform(Transform());
p_node = bv;
-
- } else if (_teststr(name, "room") && p_node->cast_to<MeshInstance>()) {
+#if 0
+ } else if (_teststr(name, "room") && Object::cast_to<MeshInstance>(p_node)) {
if (isroot)
return p_node;
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
+ MeshInstance *mi = Object::cast_to<MeshInstance>(p_node);
PoolVector<Face3> faces = mi->get_faces(VisualInstance::FACES_SOLID);
BSP_Tree bsptree(faces);
@@ -567,7 +427,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
if (isroot)
return p_node;
- Spatial *dummy = p_node->cast_to<Spatial>();
+ Spatial *dummy = Object::cast_to<Spatial>(p_node);
ERR_FAIL_COND_V(!dummy, NULL);
Room *room = memnew(Room);
@@ -580,12 +440,12 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
//room->compute_room_from_subtree();
- } else if (_teststr(name, "portal") && p_node->cast_to<MeshInstance>()) {
+ } else if (_teststr(name, "portal") && Object::cast_to<MeshInstance>(p_node)) {
if (isroot)
return p_node;
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
+ MeshInstance *mi = Object::cast_to<MeshInstance>(p_node);
PoolVector<Face3> faces = mi->get_faces(VisualInstance::FACES_SOLID);
ERR_FAIL_COND_V(faces.size() == 0, NULL);
@@ -658,12 +518,12 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
p_node->replace_by(portal);
memdelete(p_node);
p_node = portal;
-
- } else if (p_node->cast_to<MeshInstance>()) {
+#endif
+ } else if (Object::cast_to<MeshInstance>(p_node)) {
//last attempt, maybe collision insde the mesh data
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
+ MeshInstance *mi = Object::cast_to<MeshInstance>(p_node);
Ref<ArrayMesh> mesh = mi->get_mesh();
if (!mesh.is_null()) {
@@ -682,38 +542,6 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Array
if (!shape.is_null())
collision_map[mesh] = shape;
}
-
- if (!shape.is_null()) {
-#if 0
- StaticBody* static_body = memnew( StaticBody );
- ERR_FAIL_COND_V(!static_body,NULL);
- static_body->set_name( String(mesh->get_name()) + "_col" );
- shape->set_name(static_body->get_name());
- static_body->add_shape(shape);
-
- mi->add_child(static_body);
- if (mi->get_owner())
- static_body->set_owner( mi->get_owner() );
-#endif
- }
- }
-
- for (int i = 0; i < mesh->get_surface_count(); i++) {
-
- Ref<SpatialMaterial> fm = mesh->surface_get_material(i);
- if (fm.is_valid()) {
- String name = fm->get_name();
- /* if (_teststr(name,"alpha")) {
- fm->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA,true);
- name=_fixstr(name,"alpha");
- }
-
- if (_teststr(name,"vcol")) {
- fm->set_fixed_flag(SpatialMaterial::FLAG_USE_COLOR_ARRAY,true);
- name=_fixstr(name,"vcol");
- }*/
- fm->set_name(name);
- }
}
}
}
@@ -728,7 +556,7 @@ void ResourceImporterScene::_create_clips(Node *scene, const Array &p_clips, boo
Node *n = scene->get_node(String("AnimationPlayer"));
ERR_FAIL_COND(!n);
- AnimationPlayer *anim = n->cast_to<AnimationPlayer>();
+ AnimationPlayer *anim = Object::cast_to<AnimationPlayer>(n);
ERR_FAIL_COND(!anim);
if (!anim->has_animation("default"))
@@ -847,7 +675,7 @@ void ResourceImporterScene::_filter_tracks(Node *scene, const String &p_text) {
return;
Node *n = scene->get_node(String("AnimationPlayer"));
ERR_FAIL_COND(!n);
- AnimationPlayer *anim = n->cast_to<AnimationPlayer>();
+ AnimationPlayer *anim = Object::cast_to<AnimationPlayer>(n);
ERR_FAIL_COND(!anim);
Vector<String> strings = p_text.split("\n");
@@ -954,7 +782,7 @@ void ResourceImporterScene::_optimize_animations(Node *scene, float p_max_lin_er
return;
Node *n = scene->get_node(String("AnimationPlayer"));
ERR_FAIL_COND(!n);
- AnimationPlayer *anim = n->cast_to<AnimationPlayer>();
+ AnimationPlayer *anim = Object::cast_to<AnimationPlayer>(n);
ERR_FAIL_COND(!anim);
List<StringName> anim_names;
@@ -1105,13 +933,13 @@ void ResourceImporterScene::get_import_options(List<ImportOption> *r_options, in
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "nodes/custom_script", PROPERTY_HINT_FILE, script_ext_hint), ""));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "nodes/storage", PROPERTY_HINT_ENUM, "Single Scene,Instanced Sub-Scenes"), scenes_out ? 1 : 0));
- r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "materials/location", PROPERTY_HINT_ENUM, "Node,Mesh"), meshes_out ? 1 : 0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "materials/location", PROPERTY_HINT_ENUM, "Node,Mesh"), (meshes_out || materials_out) ? 1 : 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "materials/storage", PROPERTY_HINT_ENUM, "Built-In,Files", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), materials_out ? 1 : 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "materials/keep_on_reimport"), materials_out ? true : false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "meshes/compress"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "meshes/ensure_tangents"), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "meshes/storage", PROPERTY_HINT_ENUM, "Built-In,Files"), meshes_out ? true : false));
- r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "external_files/store_in_subdir"), true));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "external_files/store_in_subdir"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/import", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), true));
r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "animation/fps", PROPERTY_HINT_RANGE, "1,120,1"), 15));
r_options->push_back(ImportOption(PropertyInfo(Variant::STRING, "animation/filter_script", PROPERTY_HINT_MULTILINE_TEXT), ""));
@@ -1196,10 +1024,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
String root_type = p_options["nodes/root_type"];
if (scene->get_class() != root_type) {
- Object *base = ClassDB::instance(root_type);
- Node *base_node = NULL;
- if (base)
- base_node = base->cast_to<Node>();
+ Node *base_node = base_node = Object::cast_to<Node>(ClassDB::instance(root_type));
if (base_node) {
@@ -1287,7 +1112,6 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
Ref<EditorScenePostImport> post_import_script;
if (post_import_script_path != "") {
- post_import_script_path = post_import_script_path; // FIXME: is there a good reason for this?
Ref<Script> scr = ResourceLoader::load(post_import_script_path);
if (!scr.is_valid()) {
EditorNode::add_io_error(TTR("Couldn't load post-import script:") + " " + post_import_script_path);
@@ -1343,7 +1167,8 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
memdelete(scene);
- EditorNode::get_singleton()->reload_scene(p_source_file);
+ //this is not the time to reimport, wait until import process is done, import file is saved, etc.
+ //EditorNode::get_singleton()->reload_scene(p_source_file);
return OK;
}
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index f404582d7e..9c3d5e7876 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -83,9 +83,9 @@ class ResourceImporterScene : public ResourceImporter {
static ResourceImporterScene *singleton;
enum Presets {
- PRESET_SINGLE_SCENE,
PRESET_SEPARATE_MATERIALS,
PRESET_SEPARATE_MESHES,
+ PRESET_SINGLE_SCENE,
PRESET_SEPARATE_MESHES_AND_MATERIALS,
PRESET_MULTIPLE_SCENES,
PRESET_MULTIPLE_SCENES_AND_MATERIALS,
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index 060e683077..ade3550daa 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -199,7 +199,7 @@ void ResourceImporterTexture::get_import_options(List<ImportOption> *r_options,
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "stream"), false));
r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "size_limit", PROPERTY_HINT_RANGE, "0,4096,1"), 0));
r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "detect_3d"), p_preset == PRESET_DETECT));
- r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "scale", PROPERTY_HINT_RANGE, "0.001,100,0.1"), 1.0));
+ r_options->push_back(ImportOption(PropertyInfo(Variant::REAL, "svg/scale", PROPERTY_HINT_RANGE, "0.001,100,0.1"), 1.0));
}
void ResourceImporterTexture::_save_stex(const Ref<Image> &p_image, const String &p_to_path, int p_compress_mode, float p_lossy_quality, Image::CompressMode p_vram_compression, bool p_mipmaps, int p_texture_flags, bool p_streamable, bool p_detect_3d, bool p_detect_srgb, bool p_force_rgbe, bool p_detect_normal, bool p_force_normal) {
@@ -357,7 +357,7 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
bool force_rgbe = int(p_options["compress/hdr_mode"]) == 1;
bool hdr_as_srgb = p_options["process/HDR_as_SRGB"];
int normal = p_options["compress/normal_map"];
- float scale = p_options["scale"];
+ float scale = p_options["svg/scale"];
Ref<Image> image;
image.instance();
diff --git a/editor/import/resource_importer_texture.h b/editor/import/resource_importer_texture.h
index 31bd0f29b0..b374a9bc04 100644
--- a/editor/import/resource_importer_texture.h
+++ b/editor/import/resource_importer_texture.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp
index 07f1f4dd9f..e2bacd70e4 100644
--- a/editor/import/resource_importer_wav.cpp
+++ b/editor/import/resource_importer_wav.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -129,7 +129,7 @@ Error ResourceImporterWAV::import(const String &p_source_file, const String &p_s
int format_freq = 0;
int loop_begin = 0;
int loop_end = 0;
- int frames;
+ int frames = 0;
Vector<float> data;
diff --git a/editor/import/resource_importer_wav.h b/editor/import/resource_importer_wav.h
index 6b4f86e641..f58392e820 100644
--- a/editor/import/resource_importer_wav.h
+++ b/editor/import/resource_importer_wav.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index a4f744aa84..112e3abcb5 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "import_dock.h"
+#include "editor_node.h"
class ImportDockParameters : public Object {
GDCLASS(ImportDockParameters, Object)
@@ -264,16 +265,14 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) {
void ImportDock::_preset_selected(int p_idx) {
- switch (p_idx) {
- case ITEM_SET_AS_DEFAULT: {
- List<ResourceImporter::ImportOption> options;
-
- params->importer->get_import_options(&options, p_idx);
+ int item_id = preset->get_popup()->get_item_id(p_idx);
+ switch (item_id) {
+ case ITEM_SET_AS_DEFAULT: {
Dictionary d;
- for (List<ResourceImporter::ImportOption>::Element *E = options.front(); E; E = E->next()) {
- d[E->get().option.name] = E->get().default_value;
+ for (const List<PropertyInfo>::Element *E = params->properties.front(); E; E = E->next()) {
+ d[E->get().name] = params->values[E->get().name];
}
ProjectSettings::get_singleton()->set("importer_defaults/" + params->importer->get_importer_name(), d);
@@ -350,6 +349,15 @@ void ImportDock::_reimport() {
EditorFileSystem::get_singleton()->emit_signal("filesystem_changed"); //it changed, so force emitting the signal
}
+void ImportDock::_notification(int p_what) {
+ switch (p_what) {
+
+ case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+
+ imported->add_style_override("normal", get_stylebox("normal", "LineEdit"));
+ } break;
+ }
+}
void ImportDock::_bind_methods() {
ClassDB::bind_method(D_METHOD("_reimport"), &ImportDock::_reimport);
@@ -365,8 +373,8 @@ void ImportDock::initialize_import_options() const {
ImportDock::ImportDock() {
- imported = memnew(LineEdit);
- imported->set_editable(false);
+ imported = memnew(Label);
+ imported->add_style_override("normal", EditorNode::get_singleton()->get_gui_base()->get_stylebox("normal", "LineEdit"));
add_child(imported);
HBoxContainer *hb = memnew(HBoxContainer);
add_margin_child(TTR("Import As:"), hb);
diff --git a/editor/import_dock.h b/editor/import_dock.h
index 4844fc07ea..029c458320 100644
--- a/editor/import_dock.h
+++ b/editor/import_dock.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -41,7 +41,7 @@ class ImportDockParameters;
class ImportDock : public VBoxContainer {
GDCLASS(ImportDock, VBoxContainer)
- LineEdit *imported;
+ Label *imported;
OptionButton *import_as;
MenuButton *preset;
PropertyEditor *import_opts;
@@ -65,6 +65,7 @@ class ImportDock : public VBoxContainer {
protected:
static void _bind_methods();
+ void _notification(int p_what);
public:
void set_edit_path(const String &p_path);
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
deleted file mode 100644
index a644558521..0000000000
--- a/editor/inspector_dock.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/*************************************************************************/
-/* inspector_dock.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "inspector_dock.h"
-
-#if 0
-void InspectorDock::_go_next() {
-
-
-}
-
-void InspectorDock::_go_prev() {
-
-
-}
-
-void InspectorDock::_bind_methods() {
-
-}
-
-InspectorDock::InspectorDock() {
-
-
-}
-#endif
diff --git a/editor/inspector_dock.h b/editor/inspector_dock.h
deleted file mode 100644
index cee18f2d49..0000000000
--- a/editor/inspector_dock.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*************************************************************************/
-/* inspector_dock.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef INSPECTOR_DOCK_H
-#define INSPECTOR_DOCK_H
-
-#include "property_editor.h"
-#include "scene/gui/box_container.h"
-
-//this is for now bundled in EditorNode, will be moved away here eventually
-
-#if 0
-class InspectorDock : public VBoxContainer
-{
- GDCLASS(InspectorDock,VBoxContainer);
-
- PropertyEditor *property_editor;
-
- EditorHistory editor_history;
-
- void _go_next();
- void _go_prev();
-
-protected:
-
- static void _bind_methods();
-public:
-
- EditorHistory &get_editor_history();
-
- PropertyEditor *get_property_editor();
-
- InspectorDock();
-};
-
-#endif
-#endif // INSPECTOR_DOCK_H
diff --git a/editor/io_plugins/SCsub b/editor/io_plugins/SCsub
deleted file mode 100644
index f1fa50148f..0000000000
--- a/editor/io_plugins/SCsub
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env python
-
-Import('env')
-Export('env')
-env.add_source_files(env.editor_sources, "*.cpp")
diff --git a/editor/io_plugins/editor_atlas.cpp b/editor/io_plugins/editor_atlas.cpp
deleted file mode 100644
index 42800ee80d..0000000000
--- a/editor/io_plugins/editor_atlas.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-/*************************************************************************/
-/* editor_atlas.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "editor_atlas.h"
-
-#include "print_string.h"
-
-struct _EditorAtlasWorkRect {
-
- Size2i s;
- Point2i p;
- int idx;
- _FORCE_INLINE_ bool operator<(const _EditorAtlasWorkRect &p_r) const { return s.width > p_r.s.width; };
-};
-
-struct _EditorAtlasWorkRectResult {
-
- Vector<_EditorAtlasWorkRect> result;
- int max_w;
- int max_h;
-};
-
-void EditorAtlas::fit(const Vector<Size2i> &p_rects, Vector<Point2i> &r_result, Size2i &r_size) {
-
- //super simple, almost brute force scanline stacking fitter
- //it's pretty basic for now, but it tries to make sure that the aspect ratio of the
- //resulting atlas is somehow square. This is necessary because video cards have limits
- //on texture size (usually 2048 or 4096), so the more square a texture, the more chances
- //it will work in every hardware.
- // for example, it will prioritize a 1024x1024 atlas (works everywhere) instead of a
- // 256x8192 atlas (won't work anywhere).
-
- ERR_FAIL_COND(p_rects.size() == 0);
-
- Vector<_EditorAtlasWorkRect> wrects;
- wrects.resize(p_rects.size());
- for (int i = 0; i < p_rects.size(); i++) {
- wrects[i].s = p_rects[i];
- wrects[i].idx = i;
- }
- wrects.sort();
- int widest = wrects[0].s.width;
-
- Vector<_EditorAtlasWorkRectResult> results;
-
- for (int i = 0; i <= 12; i++) {
-
- int w = 1 << i;
- int max_h = 0;
- int max_w = 0;
- if (w < widest)
- continue;
-
- Vector<int> hmax;
- hmax.resize(w);
- for (int j = 0; j < w; j++)
- hmax[j] = 0;
-
- //place them
- int ofs = 0;
-
- for (int j = 0; j < wrects.size(); j++) {
-
- if (ofs + wrects[j].s.width > w) {
-
- ofs = 0;
- }
-
- int from_y = 0;
- for (int k = 0; k < wrects[j].s.width; k++) {
-
- if (hmax[ofs + k] > from_y)
- from_y = hmax[ofs + k];
- }
-
- wrects[j].p.x = ofs;
- wrects[j].p.y = from_y;
-
- int end_h = from_y + wrects[j].s.height;
- int end_w = ofs + wrects[j].s.width;
-
- for (int k = 0; k < wrects[j].s.width; k++) {
-
- hmax[ofs + k] = end_h;
- }
-
- if (end_h > max_h)
- max_h = end_h;
-
- if (end_w > max_w)
- max_w = end_w;
-
- ofs += wrects[j].s.width;
- }
-
- _EditorAtlasWorkRectResult result;
- result.result = wrects;
- result.max_h = max_h;
- result.max_w = max_w;
- results.push_back(result);
- }
-
- //find the result with the best aspect ratio
-
- int best = -1;
- float best_aspect = 1e20;
-
- for (int i = 0; i < results.size(); i++) {
-
- float h = results[i].max_h;
- float w = results[i].max_w;
- float aspect = h > w ? h / w : w / h;
- if (aspect < best_aspect) {
- best = i;
- best_aspect = aspect;
- }
- }
-
- r_result.resize(p_rects.size());
-
- for (int i = 0; i < p_rects.size(); i++) {
-
- r_result[results[best].result[i].idx] = results[best].result[i].p;
- }
-
- r_size = Size2(results[best].max_w, results[best].max_h);
-}
diff --git a/editor/io_plugins/editor_atlas.h b/editor/io_plugins/editor_atlas.h
deleted file mode 100644
index 206897c8e5..0000000000
--- a/editor/io_plugins/editor_atlas.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*************************************************************************/
-/* editor_atlas.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef EDITOR_ATLAS_H
-#define EDITOR_ATLAS_H
-
-#include "math_2d.h"
-#include "vector.h"
-
-class EditorAtlas {
-public:
- static void fit(const Vector<Size2i> &p_rects, Vector<Point2i> &r_result, Size2i &r_size);
-};
-
-#endif // EDITOR_ATLAS_H
diff --git a/editor/io_plugins/editor_bitmask_import_plugin.cpp b/editor/io_plugins/editor_bitmask_import_plugin.cpp
deleted file mode 100644
index e508dc0a9d..0000000000
--- a/editor/io_plugins/editor_bitmask_import_plugin.cpp
+++ /dev/null
@@ -1,388 +0,0 @@
-/*************************************************************************/
-/* editor_bitmask_import_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "editor_bitmask_import_plugin.h"
-#if 0
-#include "editor/editor_dir_dialog.h"
-#include "editor/editor_file_dialog.h"
-#include "editor/editor_node.h"
-#include "editor/editor_settings.h"
-#include "editor/property_editor.h"
-#include "io/image_loader.h"
-#include "io/marshalls.h"
-#include "io/resource_saver.h"
-#include "os/file_access.h"
-
-class _EditorBitMaskImportOptions : public Object {
-
- GDCLASS(_EditorBitMaskImportOptions, Object);
-public:
-
- bool _set(const StringName& p_name, const Variant& p_value) {
-
- return false;
- }
-
- bool _get(const StringName& p_name, Variant &r_ret) const{
-
- return false;
- }
-
- void _get_property_list(List<PropertyInfo> *p_list) const{
-
- }
-
- static void _bind_methods() {
-
- ADD_SIGNAL(MethodInfo("changed"));
- }
-
-
- _EditorBitMaskImportOptions() {
-
- }
-
-};
-
-class EditorBitMaskImportDialog : public ConfirmationDialog {
-
- GDCLASS(EditorBitMaskImportDialog, ConfirmationDialog);
-
- EditorBitMaskImportPlugin *plugin;
-
- LineEdit *import_path;
- LineEdit *save_path;
- EditorFileDialog *file_select;
- EditorDirDialog *save_select;
- ConfirmationDialog *error_dialog;
- PropertyEditor *option_editor;
-
-public:
-
- void _choose_files(const Vector<String>& p_path) {
-
- String files;
- for (int i = 0; i<p_path.size(); i++) {
-
- if (i>0)
- files += ",";
- files += p_path[i];
- }
-
- import_path->set_text(files);
-
- }
- void _choose_save_dir(const String& p_path) {
-
- save_path->set_text(p_path);
- }
-
- void _browse() {
-
- file_select->popup_centered_ratio();
- }
-
- void _browse_target() {
-
- save_select->popup_centered_ratio();
-
- }
-
-
- void popup_import(const String& p_path) {
-
- popup_centered(Size2(400, 100)*EDSCALE);
- if (p_path != "") {
-
- Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_path);
- ERR_FAIL_COND(!rimd.is_valid());
-
- save_path->set_text(p_path.get_base_dir());
-
- String src = "";
- for (int i = 0; i<rimd->get_source_count(); i++) {
- if (i>0)
- src += ",";
- src += EditorImportPlugin::expand_source_path(rimd->get_source_path(i));
- }
- import_path->set_text(src);
- }
- }
-
-
- void _import() {
-
- Vector<String> bitmasks = import_path->get_text().split(",");
-
- if (bitmasks.size() == 0) {
- error_dialog->set_text(TTR("No bit masks to import!"));
- error_dialog->popup_centered(Size2(200, 100)*EDSCALE);
- }
-
- if (save_path->get_text().strip_edges() == "") {
- error_dialog->set_text(TTR("Target path is empty."));
- error_dialog->popup_centered_minsize();
- return;
- }
-
- if (!save_path->get_text().begins_with("res://")) {
- error_dialog->set_text(TTR("Target path must be a complete resource path."));
- error_dialog->popup_centered_minsize();
- return;
- }
-
- if (!DirAccess::exists(save_path->get_text())) {
- error_dialog->set_text(TTR("Target path must exist."));
- error_dialog->popup_centered_minsize();
- return;
- }
-
- for (int i = 0; i<bitmasks.size(); i++) {
-
- Ref<ResourceImportMetadata> imd = memnew(ResourceImportMetadata);
-
- imd->add_source(EditorImportPlugin::validate_source_path(bitmasks[i]));
-
- String dst = save_path->get_text();
- if (dst == "") {
- error_dialog->set_text(TTR("Save path is empty!"));
- error_dialog->popup_centered(Size2(200, 100)*EDSCALE);
- }
-
- dst = dst.plus_file(bitmasks[i].get_file().get_basename() + ".pbm");
-
- plugin->import(dst, imd);
- }
-
- hide();
-
- }
-
-
- void _notification(int p_what) {
-
- }
-
- static void _bind_methods() {
-
-
- ClassDB::bind_method("_choose_files", &EditorBitMaskImportDialog::_choose_files);
- ClassDB::bind_method("_choose_save_dir", &EditorBitMaskImportDialog::_choose_save_dir);
- ClassDB::bind_method("_import", &EditorBitMaskImportDialog::_import);
- ClassDB::bind_method("_browse", &EditorBitMaskImportDialog::_browse);
- ClassDB::bind_method("_browse_target", &EditorBitMaskImportDialog::_browse_target);
- //ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
- }
-
- EditorBitMaskImportDialog(EditorBitMaskImportPlugin *p_plugin) {
-
- plugin = p_plugin;
-
-
- set_title(TTR("Import BitMasks"));
-
- VBoxContainer *vbc = memnew(VBoxContainer);
- add_child(vbc);
- //set_child_rect(vbc);
-
-
- HBoxContainer *hbc = memnew(HBoxContainer);
- vbc->add_margin_child(TTR("Source Texture(s):"), hbc);
-
- import_path = memnew(LineEdit);
- import_path->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc->add_child(import_path);
-
- Button * import_choose = memnew(Button);
- import_choose->set_text(" .. ");
- hbc->add_child(import_choose);
-
- import_choose->connect("pressed", this, "_browse");
-
- hbc = memnew(HBoxContainer);
- vbc->add_margin_child(TTR("Target Path:"), hbc);
-
- save_path = memnew(LineEdit);
- save_path->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc->add_child(save_path);
-
- Button * save_choose = memnew(Button);
- save_choose->set_text(" .. ");
- hbc->add_child(save_choose);
-
- save_choose->connect("pressed", this, "_browse_target");
-
- file_select = memnew(EditorFileDialog);
- file_select->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
- add_child(file_select);
- file_select->set_mode(EditorFileDialog::MODE_OPEN_FILES);
- file_select->connect("files_selected", this, "_choose_files");
-
- List<String> extensions;
- ImageLoader::get_recognized_extensions(&extensions);
- file_select->clear_filters();
- for (int i = 0; i<extensions.size(); i++) {
-
- file_select->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
- }
-
- save_select = memnew(EditorDirDialog);
- add_child(save_select);
-
- //save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR);
- save_select->connect("dir_selected", this, "_choose_save_dir");
-
- get_ok()->connect("pressed", this, "_import");
- get_ok()->set_text(TTR("Import"));
-
-
- error_dialog = memnew(ConfirmationDialog);
- add_child(error_dialog);
- error_dialog->get_ok()->set_text(TTR("Accept"));
- //error_dialog->get_cancel()->hide();
-
- set_hide_on_ok(false);
- }
-
- ~EditorBitMaskImportDialog() {
- }
-
-};
-
-
-String EditorBitMaskImportPlugin::get_name() const {
-
- return "bitmask";
-}
-String EditorBitMaskImportPlugin::get_visible_name() const{
-
- return TTR("Bit Mask");
-}
-void EditorBitMaskImportPlugin::import_dialog(const String& p_from){
-
- dialog->popup_import(p_from);
-}
-Error EditorBitMaskImportPlugin::import(const String& p_path, const Ref<ResourceImportMetadata>& p_from){
-
- ERR_FAIL_COND_V(p_from->get_source_count() != 1, ERR_INVALID_PARAMETER);
-
- Ref<ResourceImportMetadata> from = p_from;
-
- String src_path = EditorImportPlugin::expand_source_path(from->get_source_path(0));
- Ref<ImageTexture> it = ResourceLoader::load(src_path);
- ERR_FAIL_COND_V(it.is_null(), ERR_CANT_OPEN);
-
- Ref<BitMap> target = memnew(BitMap);
- target->create_from_image_alpha(it.ptr()->get_data());
-
- from->set_source_md5(0, FileAccess::get_md5(src_path));
- from->set_editor(get_name());
- target->set_import_metadata(from);
-
-
- Error err = ResourceSaver::save(p_path, target);
-
- return err;
-
-}
-
-
-EditorBitMaskImportPlugin* EditorBitMaskImportPlugin::singleton = NULL;
-
-
-void EditorBitMaskImportPlugin::import_from_drop(const Vector<String>& p_drop, const String &p_dest_path) {
-
- Vector<String> files;
-
- List<String> valid_extensions;
- ImageLoader::get_recognized_extensions(&valid_extensions);
- for(int i=0;i<p_drop.size();i++) {
-
- String extension=p_drop[i].get_extension().to_lower();
-
- for (List<String>::Element *E=valid_extensions.front();E;E=E->next()) {
-
- if (E->get()==extension) {
- files.push_back(p_drop[i]);
- break;
- }
- }
- }
-
- if (files.size()) {
- import_dialog();
- dialog->_choose_files(files);
- dialog->_choose_save_dir(p_dest_path);
- }
-}
-
-void EditorBitMaskImportPlugin::reimport_multiple_files(const Vector<String>& p_list) {
-
- if (p_list.size() == 0)
- return;
-
- Vector<String> sources;
- for (int i = 0; i<p_list.size(); i++) {
- int idx;
- EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->find_file(p_list[i], &idx);
- if (efsd) {
- for (int j = 0; j<efsd->get_source_count(idx); j++) {
- String file = expand_source_path(efsd->get_source_file(idx, j));
- if (sources.find(file) == -1) {
- sources.push_back(file);
- }
-
- }
- }
- }
-
- if (sources.size()) {
-
- dialog->popup_import(p_list[0]);
- dialog->_choose_files(sources);
- dialog->_choose_save_dir(p_list[0].get_base_dir());
- }
-}
-
-bool EditorBitMaskImportPlugin::can_reimport_multiple_files() const {
-
- return true;
-}
-
-EditorBitMaskImportPlugin::EditorBitMaskImportPlugin(EditorNode* p_editor) {
-
- singleton = this;
- dialog = memnew(EditorBitMaskImportDialog(this));
- p_editor->get_gui_base()->add_child(dialog);
-}
-
-EditorBitMaskExportPlugin::EditorBitMaskExportPlugin() {
-
-}
-#endif
diff --git a/editor/io_plugins/editor_bitmask_import_plugin.h b/editor/io_plugins/editor_bitmask_import_plugin.h
deleted file mode 100644
index b31ee9c86a..0000000000
--- a/editor/io_plugins/editor_bitmask_import_plugin.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*************************************************************************/
-/* editor_bitmask_import_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef EDITOR_BITMASK_IMPORT_PLUGIN_H
-#define EDITOR_BITMASK_IMPORT_PLUGIN_H
-#if 0
-#include "editor/editor_import_export.h"
-#include "scene/resources/font.h"
-
-class EditorNode;
-class EditorBitMaskImportDialog;
-
-class EditorBitMaskImportPlugin : public EditorImportPlugin {
-
- GDCLASS(EditorBitMaskImportPlugin, EditorImportPlugin);
-
- EditorBitMaskImportDialog *dialog;
-public:
-
- static EditorBitMaskImportPlugin *singleton;
-
- virtual String get_name() const;
- virtual String get_visible_name() const;
- virtual void import_dialog(const String& p_from = "");
- virtual Error import(const String& p_path, const Ref<ResourceImportMetadata>& p_from);
- void import_from_drop(const Vector<String>& p_drop, const String &p_dest_path);
- virtual void reimport_multiple_files(const Vector<String>& p_list);
- virtual bool can_reimport_multiple_files() const;
-
-
- EditorBitMaskImportPlugin(EditorNode* p_editor);
-};
-
-class EditorBitMaskExportPlugin : public EditorExportPlugin {
-
- GDCLASS(EditorBitMaskExportPlugin, EditorExportPlugin);
-
-
-public:
-
- EditorBitMaskExportPlugin();
-};
-
-#endif
-#endif // EDITOR_SAMPLE_IMPORT_PLUGIN_H
diff --git a/editor/io_plugins/editor_export_scene.cpp b/editor/io_plugins/editor_export_scene.cpp
deleted file mode 100644
index 6392b4a715..0000000000
--- a/editor/io_plugins/editor_export_scene.cpp
+++ /dev/null
@@ -1,143 +0,0 @@
-/*************************************************************************/
-/* editor_export_scene.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "editor_export_scene.h"
-#if 0
-#include "editor/editor_settings.h"
-#include "io/resource_loader.h"
-#include "io/resource_saver.h"
-#include "os/dir_access.h"
-#include "os/file_access.h"
-#include "project_settings.h"
-#include "scene/resources/packed_scene.h"
-
-Vector<uint8_t> EditorSceneExportPlugin::custom_export(String& p_path,const Ref<EditorExportPlatform> &p_platform) {
-
- if (!EditorImportExport::get_singleton()->get_convert_text_scenes()) {
- return Vector<uint8_t>();
- }
-
-
- String extension = p_path.get_extension();
-
- //step 1 check if scene
-
- if (extension=="xml" || extension=="xres") {
-
- String type = ResourceLoader::get_resource_type(p_path);
-
- if (type!="PackedScene")
- return Vector<uint8_t>();
-
- } else if (extension!="tscn" && extension!="xscn") {
- return Vector<uint8_t>();
- }
-
- //step 2 check if cached
-
- uint64_t sd=0;
- String smd5;
- String gp = ProjectSettings::get_singleton()->globalize_path(p_path);
- String md5=gp.md5_text();
- String tmp_path = EditorSettings::get_singleton()->get_settings_path().plus_file("tmp/");
-
- bool valid=false;
- {
- //if existing, make sure it's valid
- FileAccessRef f = FileAccess::open(tmp_path+"scnexp-"+md5+".txt",FileAccess::READ);
- if (f) {
-
- uint64_t d = f->get_line().strip_edges().to_int64();
- sd = FileAccess::get_modified_time(p_path);
-
- if (d==sd) {
- valid=true;
- } else {
- String cmd5 = f->get_line().strip_edges();
- smd5 = FileAccess::get_md5(p_path);
- if (cmd5==smd5) {
- valid=true;
- }
- }
-
-
- }
- }
-
- if (!valid) {
- //cache failed, convert
- DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
-
- String copy = p_path+".convert."+extension;
-
- // a copy will allow loading the internal resources without conflicting with opened scenes
- da->copy(p_path,copy);
-
- //@todo for tscn use something more efficient
-
- Ref<PackedScene> copyres = ResourceLoader::load(copy,"PackedScene");
-
- da->remove(copy);
-
- memdelete(da);
-
- ERR_FAIL_COND_V(!copyres.is_valid(),Vector<uint8_t>());
-
- Error err = ResourceSaver::save(tmp_path+"scnexp-"+md5+".scn",copyres);
-
- copyres=Ref<PackedScene>();
-
- ERR_FAIL_COND_V(err!=OK,Vector<uint8_t>());
-
- FileAccessRef f = FileAccess::open(tmp_path+"scnexp-"+md5+".txt",FileAccess::WRITE);
-
- if (sd==0)
- sd = FileAccess::get_modified_time(p_path);
- if (smd5==String())
- smd5 = FileAccess::get_md5(p_path);
-
- f->store_line(String::num(sd));
- f->store_line(smd5);
- f->store_line(gp); //source path for reference
- }
-
-
- Vector<uint8_t> ret = FileAccess::get_file_as_array(tmp_path+"scnexp-"+md5+".scn");
-
- p_path+=".converted.scn";
-
- return ret;
-
-}
-
-
-EditorSceneExportPlugin::EditorSceneExportPlugin()
-{
-}
-#endif
diff --git a/editor/io_plugins/editor_export_scene.h b/editor/io_plugins/editor_export_scene.h
deleted file mode 100644
index d8fe21adfc..0000000000
--- a/editor/io_plugins/editor_export_scene.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*************************************************************************/
-/* editor_export_scene.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef EDITOR_EXPORT_SCENE_H
-#define EDITOR_EXPORT_SCENE_H
-
-#include "editor/editor_export.h"
-
-#if 0
-class EditorSceneExportPlugin : public EditorExportPlugin {
- GDCLASS( EditorSceneExportPlugin, EditorExportPlugin );
-public:
-
- virtual Vector<uint8_t> custom_export(String& p_path,const Ref<EditorExportPlatform> &p_platform);
-
- EditorSceneExportPlugin();
-};
-#endif
-#endif // EDITOR_EXPORT_SCENE_H
diff --git a/editor/io_plugins/editor_font_import_plugin.cpp b/editor/io_plugins/editor_font_import_plugin.cpp
deleted file mode 100644
index 25d8a5b7eb..0000000000
--- a/editor/io_plugins/editor_font_import_plugin.cpp
+++ /dev/null
@@ -1,1705 +0,0 @@
-/*************************************************************************/
-/* editor_font_import_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "editor_font_import_plugin.h"
-#if 0
-#include "editor/editor_file_dialog.h"
-#include "editor/editor_node.h"
-#include "editor_atlas.h"
-#include "io/image_loader.h"
-#include "io/resource_saver.h"
-#include "os/file_access.h"
-#include "scene/gui/dialogs.h"
-
-#ifdef FREETYPE_ENABLED
-#include <ft2build.h>
-#include FT_FREETYPE_H
-#endif
-
-
-class _EditorFontImportOptions : public Object {
-
- GDCLASS(_EditorFontImportOptions,Object);
-public:
-
- enum FontMode {
-
- FONT_BITMAP,
- FONT_DISTANCE_FIELD
- };
-
- enum ColorType {
- COLOR_WHITE,
- COLOR_CUSTOM,
- COLOR_GRADIENT_RANGE,
- COLOR_GRADIENT_IMAGE
- };
-
-
- int char_extra_spacing;
- int top_extra_spacing;
- int bottom_extra_spacing;
- int space_extra_spacing;
-
- enum CharacterSet {
-
- CHARSET_ASCII,
- CHARSET_LATIN,
- CHARSET_UNICODE,
- CHARSET_CUSTOM,
- CHARSET_CUSTOM_LATIN
- };
-
-
- FontMode font_mode;
-
- CharacterSet character_set;
- String custom_file;
-
- bool shadow;
- Vector2 shadow_offset;
- int shadow_radius;
- Color shadow_color;
- float shadow_transition;
-
- bool shadow2;
- Vector2 shadow2_offset;
- int shadow2_radius;
- Color shadow2_color;
- float shadow2_transition;
-
- ColorType color_type;
- Color color;
- Color gradient_begin;
- Color gradient_end;
- bool color_use_monochrome;
- String gradient_image;
-
- bool enable_filter;
- bool round_advance;
- bool premultiply_alpha;
-
-
-
- bool _set(const StringName& p_name, const Variant& p_value) {
-
- String n = p_name;
- if (n=="mode/mode") {
- font_mode=FontMode(int(p_value));
- _change_notify();
- } else if (n=="extra_space/char")
- char_extra_spacing=p_value;
- else if (n=="extra_space/space")
- space_extra_spacing=p_value;
- else if (n=="extra_space/top")
- top_extra_spacing=p_value;
- else if (n=="extra_space/bottom")
- bottom_extra_spacing=p_value;
-
- else if (n=="character_set/mode") {
- character_set=CharacterSet(int(p_value));
- _change_notify();
- } else if (n=="character_set/custom")
- custom_file=p_value;
-
- else if (n=="shadow/enabled") {
- shadow=p_value;
- _change_notify();
- }else if (n=="shadow/radius")
- shadow_radius=p_value;
- else if (n=="shadow/offset")
- shadow_offset=p_value;
- else if (n=="shadow/color")
- shadow_color=p_value;
- else if (n=="shadow/transition")
- shadow_transition=p_value;
-
- else if (n=="shadow2/enabled") {
- shadow2=p_value;
- _change_notify();
- }else if (n=="shadow2/radius")
- shadow2_radius=p_value;
- else if (n=="shadow2/offset")
- shadow2_offset=p_value;
- else if (n=="shadow2/color")
- shadow2_color=p_value;
- else if (n=="shadow2/transition")
- shadow2_transition=p_value;
-
- else if (n=="color/mode") {
- color_type=ColorType(int(p_value));
- _change_notify();
- }else if (n=="color/color")
- color=p_value;
- else if (n=="color/begin")
- gradient_begin=p_value;
- else if (n=="color/end")
- gradient_end=p_value;
- else if (n=="color/image")
- gradient_image=p_value;
- else if (n=="color/monochrome")
- color_use_monochrome=p_value;
- else if (n=="advanced/round_advance")
- round_advance=p_value;
- else if (n=="advanced/enable_filter")
- enable_filter=p_value;
- else if (n=="advanced/premultiply_alpha")
- premultiply_alpha=p_value;
- else
- return false;
-
- emit_signal("changed");
-
-
- return true;
-
- }
-
- bool _get(const StringName& p_name,Variant &r_ret) const{
-
- String n = p_name;
- if (n=="mode/mode")
- r_ret=font_mode;
- else if (n=="extra_space/char")
- r_ret=char_extra_spacing;
- else if (n=="extra_space/space")
- r_ret=space_extra_spacing;
- else if (n=="extra_space/top")
- r_ret=top_extra_spacing;
- else if (n=="extra_space/bottom")
- r_ret=bottom_extra_spacing;
-
- else if (n=="character_set/mode")
- r_ret=character_set;
- else if (n=="character_set/custom")
- r_ret=custom_file;
-
- else if (n=="shadow/enabled")
- r_ret=shadow;
- else if (n=="shadow/radius")
- r_ret=shadow_radius;
- else if (n=="shadow/offset")
- r_ret=shadow_offset;
- else if (n=="shadow/color")
- r_ret=shadow_color;
- else if (n=="shadow/transition")
- r_ret=shadow_transition;
-
- else if (n=="shadow2/enabled")
- r_ret=shadow2;
- else if (n=="shadow2/radius")
- r_ret=shadow2_radius;
- else if (n=="shadow2/offset")
- r_ret=shadow2_offset;
- else if (n=="shadow2/color")
- r_ret=shadow2_color;
- else if (n=="shadow2/transition")
- r_ret=shadow2_transition;
-
-
- else if (n=="color/mode")
- r_ret=color_type;
- else if (n=="color/color")
- r_ret=color;
- else if (n=="color/begin")
- r_ret=gradient_begin;
- else if (n=="color/end")
- r_ret=gradient_end;
- else if (n=="color/image")
- r_ret=gradient_image;
- else if (n=="color/monochrome")
- r_ret=color_use_monochrome;
- else if (n=="advanced/round_advance")
- r_ret=round_advance;
- else if (n=="advanced/enable_filter")
- r_ret=enable_filter;
- else if (n=="advanced/premultiply_alpha")
- r_ret=premultiply_alpha;
- else
- return false;
-
- return true;
-
- }
-
- void _get_property_list( List<PropertyInfo> *p_list) const{
-
-
- p_list->push_back(PropertyInfo(Variant::INT,"mode/mode",PROPERTY_HINT_ENUM,"Bitmap,Distance Field"));
-
- p_list->push_back(PropertyInfo(Variant::INT,"extra_space/char",PROPERTY_HINT_RANGE,"-64,64,1"));
- p_list->push_back(PropertyInfo(Variant::INT,"extra_space/space",PROPERTY_HINT_RANGE,"-64,64,1"));
- p_list->push_back(PropertyInfo(Variant::INT,"extra_space/top",PROPERTY_HINT_RANGE,"-64,64,1"));
- p_list->push_back(PropertyInfo(Variant::INT,"extra_space/bottom",PROPERTY_HINT_RANGE,"-64,64,1"));
- p_list->push_back(PropertyInfo(Variant::INT,"character_set/mode",PROPERTY_HINT_ENUM,"Ascii,Latin,Unicode,Custom,Custom&Latin"));
-
- if (character_set>=CHARSET_CUSTOM)
- p_list->push_back(PropertyInfo(Variant::STRING,"character_set/custom",PROPERTY_HINT_GLOBAL_FILE));
-
- int usage = PROPERTY_USAGE_DEFAULT;
-
- if (font_mode==FONT_DISTANCE_FIELD) {
- usage = PROPERTY_USAGE_NOEDITOR;
- }
-
- {
-
- p_list->push_back(PropertyInfo(Variant::BOOL,"shadow/enabled",PROPERTY_HINT_NONE,"",usage));
- if (shadow) {
- p_list->push_back(PropertyInfo(Variant::INT,"shadow/radius",PROPERTY_HINT_RANGE,"-64,64,1",usage));
- p_list->push_back(PropertyInfo(Variant::VECTOR2,"shadow/offset",PROPERTY_HINT_NONE,"",usage));
- p_list->push_back(PropertyInfo(Variant::COLOR,"shadow/color",PROPERTY_HINT_NONE,"",usage));
- p_list->push_back(PropertyInfo(Variant::REAL,"shadow/transition",PROPERTY_HINT_EXP_EASING,"",usage));
- }
-
- p_list->push_back(PropertyInfo(Variant::BOOL,"shadow2/enabled",PROPERTY_HINT_NONE,"",usage));
- if (shadow2) {
- p_list->push_back(PropertyInfo(Variant::INT,"shadow2/radius",PROPERTY_HINT_RANGE,"-64,64,1",usage));
- p_list->push_back(PropertyInfo(Variant::VECTOR2,"shadow2/offset",PROPERTY_HINT_NONE,"",usage));
- p_list->push_back(PropertyInfo(Variant::COLOR,"shadow2/color",PROPERTY_HINT_NONE,"",usage));
- p_list->push_back(PropertyInfo(Variant::REAL,"shadow2/transition",PROPERTY_HINT_EXP_EASING,"",usage));
- }
-
- p_list->push_back(PropertyInfo(Variant::INT,"color/mode",PROPERTY_HINT_ENUM,"White,Color,Gradient,Gradient Image",usage));
- if (color_type==COLOR_CUSTOM) {
- p_list->push_back(PropertyInfo(Variant::COLOR,"color/color",PROPERTY_HINT_NONE,"",usage));
-
- }
- if (color_type==COLOR_GRADIENT_RANGE) {
- p_list->push_back(PropertyInfo(Variant::COLOR,"color/begin",PROPERTY_HINT_NONE,"",usage));
- p_list->push_back(PropertyInfo(Variant::COLOR,"color/end",PROPERTY_HINT_NONE,"",usage));
- }
- if (color_type==COLOR_GRADIENT_IMAGE) {
- p_list->push_back(PropertyInfo(Variant::STRING,"color/image",PROPERTY_HINT_GLOBAL_FILE,"",usage));
- }
- p_list->push_back(PropertyInfo(Variant::BOOL,"color/monochrome",PROPERTY_HINT_NONE,"",usage));
- }
-
- p_list->push_back(PropertyInfo(Variant::BOOL,"advanced/round_advance"));
- p_list->push_back(PropertyInfo(Variant::BOOL,"advanced/enable_filter"));
- p_list->push_back(PropertyInfo(Variant::BOOL,"advanced/premultiply_alpha"));
-
- }
-
-
- static void _bind_methods() {
-
-
- ADD_SIGNAL( MethodInfo("changed"));
- }
-
-
- void reset() {
-
- char_extra_spacing=0;
- top_extra_spacing=0;
- bottom_extra_spacing=0;
- space_extra_spacing=0;
-
- character_set=CHARSET_LATIN;
-
- shadow=false;
- shadow_radius=2;
- shadow_color=Color(0,0,0,0.3);
- shadow_transition=1.0;
-
- shadow2=false;
- shadow2_radius=2;
- shadow2_color=Color(0,0,0,0.3);
- shadow2_transition=1.0;
-
- color_type=COLOR_WHITE;
- color=Color(1,1,1,1);
- gradient_begin=Color(1,1,1,1);
- gradient_end=Color(0.5,0.5,0.5,1);
- color_use_monochrome=false;
-
- font_mode=FONT_BITMAP;
- round_advance=true;
- enable_filter=true;
- premultiply_alpha=false;
-
- }
-
- _EditorFontImportOptions() {
-
- font_mode=FONT_BITMAP;
-
- char_extra_spacing=0;
- top_extra_spacing=0;
- bottom_extra_spacing=0;
- space_extra_spacing=0;
-
- character_set=CHARSET_LATIN;
-
- shadow=false;
- shadow_radius=2;
- shadow_color=Color(0,0,0,0.3);
- shadow_transition=1.0;
-
- shadow2=false;
- shadow2_radius=2;
- shadow2_color=Color(0,0,0,0.3);
- shadow2_transition=1.0;
-
- color_type=COLOR_WHITE;
- color=Color(1,1,1,1);
- gradient_begin=Color(1,1,1,1);
- gradient_end=Color(0.5,0.5,0.5,1);
- color_use_monochrome=false;
-
- round_advance=true;
- enable_filter=true;
- premultiply_alpha=false;
- }
-
-
-};
-
-
-class EditorFontImportDialog : public ConfirmationDialog {
-
- GDCLASS(EditorFontImportDialog, ConfirmationDialog);
-
-
- EditorLineEditFileChooser *source;
- EditorLineEditFileChooser *dest;
- SpinBox *font_size;
- LineEdit *test_string;
- ColorPickerButton *test_color;
- Label *test_label;
- PropertyEditor *prop_edit;
- Timer *timer;
- ConfirmationDialog *error_dialog;
-
-
- Ref<ResourceImportMetadata> get_rimd() {
-
- Ref<ResourceImportMetadata> imd = memnew( ResourceImportMetadata );
- List<PropertyInfo> pl;
- options->_get_property_list(&pl);
- for(List<PropertyInfo>::Element *E=pl.front();E;E=E->next()) {
-
- Variant v;
- String opt=E->get().name;
- options->_get(opt,v);
- if (opt=="color/image" || opt=="character_set/custom") {
- v = EditorImportPlugin::validate_source_path(v);
- }
- imd->set_option(opt,v);
- }
-
- String src_path = EditorImportPlugin::validate_source_path(source->get_line_edit()->get_text());
- //print_line("pre src path "+source->get_line_edit()->get_text());
- //print_line("src path "+src_path);
- imd->add_source(src_path);
- imd->set_option("font/size",font_size->get_value());
-
- return imd;
-
- }
-
- void _src_changed(String) {
- _prop_changed();
- }
-
- void _update_text2(String) {
- _update_text();
- }
- void _update_text3(Color) {
- _update_text();
- }
-
- void _update_text() {
-
- test_label->set_text("");
- test_label->set_text(test_string->get_text());
- test_label->add_color_override("font_color",test_color->get_pick_color());
- }
-
- void _update() {
-
- Ref<ResourceImportMetadata> imd = get_rimd();
- Ref<BitmapFont> font = plugin->generate_font(imd);
- test_label->add_font_override("font",font);
- _update_text();
- }
-
- void _font_size_changed(double) {
-
- _prop_changed();
- }
-
- void _prop_changed() {
-
- timer->start();
- }
-
- void _import_inc(String p_font) {
-
- Ref<BitmapFont> font = ResourceLoader::load(p_font);
- if (!font.is_valid())
- return;
- Ref<ImageTexture> tex = font->get_texture(0);
- if (tex.is_null())
- return;
- FileAccessRef f=FileAccess::open(p_font.get_basename()+".inc",FileAccess::WRITE);
- Vector<CharType> ck = font->get_char_keys();
-
- f->store_line("static const int _builtin_font_height="+itos(font->get_height())+";");
- f->store_line("static const int _builtin_font_ascent="+itos(font->get_ascent())+";");
- f->store_line("static const int _builtin_font_charcount="+itos(ck.size())+";");
- f->store_line("static const int _builtin_font_charrects["+itos(ck.size())+"][8]={");
- f->store_line("/* charidx , ofs_x, ofs_y, size_x, size_y, valign, halign, advance */");
-
- for(int i=0;i<ck.size();i++) {
- CharType k=ck[i];
- BitmapFont::Character c=font->get_character(k);
- f->store_line("{"+itos(k)+","+rtos(c.rect.pos.x)+","+rtos(c.rect.pos.y)+","+rtos(c.rect.size.x)+","+rtos(c.rect.size.y)+","+rtos(c.v_align)+","+rtos(c.h_align)+","+rtos(c.advance)+"},");
- }
- f->store_line("};");
-
- Vector<BitmapFont::KerningPairKey> kp=font->get_kerning_pair_keys();
- f->store_line("static const int _builtin_font_kerning_pair_count="+itos(kp.size())+";");
- f->store_line("static const int _builtin_font_kerning_pairs["+itos(kp.size())+"][3]={");
- for(int i=0;i<kp.size();i++) {
-
- int d = font->get_kerning_pair(kp[i].A,kp[i].B);
- f->store_line("{"+itos(kp[i].A)+","+itos(kp[i].B)+","+itos(d)+"},");
- }
-
- f->store_line("};");
- Image img = tex->get_data();
-
- f->store_line("static const int _builtin_font_img_width="+itos(img.get_width())+";");
- f->store_line("static const int _builtin_font_img_height="+itos(img.get_height())+";");
-
- String fname = p_font.get_basename()+".sv.png";
- ResourceSaver::save(fname,tex);
- Vector<uint8_t> data=FileAccess::get_file_as_array(fname);
-
-
- f->store_line("static const int _builtin_font_img_data_size="+itos(data.size())+";");
- f->store_line("static const unsigned char _builtin_font_img_data["+itos(data.size())+"]={");
-
-
-
- for(int i=0;i<data.size();i++) {
-
- f->store_line(itos(data[i])+",");
-
- }
- f->store_line("};");
-
- }
-
- void _import() {
-
- if (source->get_line_edit()->get_text()=="") {
- error_dialog->set_text(TTR("No source font file!"));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
- }
-
- if (dest->get_line_edit()->get_text()=="") {
- error_dialog->set_text(TTR("No target font resource!"));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
- }
-
- if (dest->get_line_edit()->get_text().get_file()==".font") {
- dest->get_line_edit()->set_text(dest->get_line_edit()->get_text().get_base_dir() + "/" + source->get_line_edit()->get_text().get_file().get_basename() + ".font" );
- }
-
- if (dest->get_line_edit()->get_text().get_extension() == dest->get_line_edit()->get_text()) {
- dest->get_line_edit()->set_text(dest->get_line_edit()->get_text() + ".font");
- }
-
- if (dest->get_line_edit()->get_text().get_extension().to_lower() != "font") {
- error_dialog->set_text(TTR("Invalid file extension.\nPlease use .font."));
- error_dialog->popup_centered(Size2(200,100));
- return;
- }
-
- Ref<ResourceImportMetadata> rimd = get_rimd();
-
- if (rimd.is_null()) {
- error_dialog->set_text(TTR("Can't load/process source font."));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
- }
-
- Error err = plugin->import(dest->get_line_edit()->get_text(),rimd);
-
- if (err!=OK) {
- error_dialog->set_text(TTR("Couldn't save font."));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
- }
-
- _import_inc(dest->get_line_edit()->get_text());
-
- hide();
- }
-
- EditorFontImportPlugin *plugin;
- _EditorFontImportOptions *options;
-
- static void _bind_methods() {
-
- ClassDB::bind_method("_update",&EditorFontImportDialog::_update);
- ClassDB::bind_method("_update_text",&EditorFontImportDialog::_update_text);
- ClassDB::bind_method("_update_text2",&EditorFontImportDialog::_update_text2);
- ClassDB::bind_method("_update_text3",&EditorFontImportDialog::_update_text3);
- ClassDB::bind_method("_prop_changed",&EditorFontImportDialog::_prop_changed);
- ClassDB::bind_method("_src_changed",&EditorFontImportDialog::_src_changed);
- ClassDB::bind_method("_font_size_changed",&EditorFontImportDialog::_font_size_changed);
- ClassDB::bind_method("_import",&EditorFontImportDialog::_import);
-
- }
-
-public:
-
- void _notification(int p_what) {
-
- if (p_what==NOTIFICATION_ENTER_TREE) {
- prop_edit->edit(options);
- _update_text();
- }
- }
-
- void popup_import(const String& p_path) {
-
- popup_centered(Size2(600,500)*EDSCALE);
-
- if (p_path!="") {
-
- Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_path);
- ERR_FAIL_COND(!rimd.is_valid());
-
- dest->get_line_edit()->set_text(p_path);
- List<String> opts;
- rimd->get_options(&opts);
- options->reset();
- for(List<String>::Element *E=opts.front();E;E=E->next()) {
-
- options->_set(E->get(),rimd->get_option(E->get()));
- }
-
- String src = "";
- for(int i=0;i<rimd->get_source_count();i++) {
- if (i>0)
- src+=",";
- src+=EditorImportPlugin::expand_source_path(rimd->get_source_path(i));
- }
- source->get_line_edit()->set_text(src);
-
- font_size->set_value(rimd->get_option("font/size"));
- }
- }
-
-
- void set_source_and_dest(const String& p_font,const String& p_dest) {
- source->get_line_edit()->set_text(p_font);
- dest->get_line_edit()->set_text(p_dest);
- _prop_changed();
- }
-
- EditorFontImportDialog(EditorFontImportPlugin *p_plugin) {
- plugin=p_plugin;
- VBoxContainer *vbc = memnew( VBoxContainer );
- add_child(vbc);
- //set_child_rect(vbc);
- HBoxContainer *hbc = memnew( HBoxContainer);
- vbc->add_child(hbc);
- VBoxContainer *vbl = memnew( VBoxContainer );
- hbc->add_child(vbl);
- hbc->set_v_size_flags(SIZE_EXPAND_FILL);
- vbl->set_h_size_flags(SIZE_EXPAND_FILL);
- VBoxContainer *vbr = memnew( VBoxContainer );
- hbc->add_child(vbr);
- vbr->set_h_size_flags(SIZE_EXPAND_FILL);
-
- source = memnew( EditorLineEditFileChooser );
- source->get_file_dialog()->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
- source->get_file_dialog()->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- source->get_file_dialog()->add_filter("*.ttf;TrueType");
- source->get_file_dialog()->add_filter("*.otf;OpenType");
- source->get_file_dialog()->add_filter("*.fnt;BMFont");
- source->get_line_edit()->connect("text_entered",this,"_src_changed");
-
- vbl->add_margin_child(TTR("Source Font:"),source);
- font_size = memnew( SpinBox );
- vbl->add_margin_child(TTR("Source Font Size:"),font_size);
- font_size->set_min(3);
- font_size->set_max(256);
- font_size->set_value(16);
- font_size->connect("value_changed",this,"_font_size_changed");
- dest = memnew( EditorLineEditFileChooser );
- //
- List<String> fl;
- Ref<BitmapFont> font= memnew(BitmapFont);
- dest->get_file_dialog()->add_filter("*.font ; Font" );
- /*
- ResourceSaver::get_recognized_extensions(font,&fl);
- for(List<String>::Element *E=fl.front();E;E=E->next()) {
- dest->get_file_dialog()->add_filter("*."+E->get());
- }
- */
-
- vbl->add_margin_child(TTR("Dest Resource:"),dest);
- HBoxContainer *testhb = memnew( HBoxContainer );
- test_string = memnew( LineEdit );
- test_string->set_text(TTR("The quick brown fox jumps over the lazy dog."));
- test_string->set_h_size_flags(SIZE_EXPAND_FILL);
- test_string->set_stretch_ratio(5);
-
- testhb->add_child(test_string);
- test_color = memnew( ColorPickerButton );
- test_color->set_pick_color(get_color("font_color","Label"));
- test_color->set_h_size_flags(SIZE_EXPAND_FILL);
- test_color->set_stretch_ratio(1);
- test_color->connect("color_changed",this,"_update_text3");
- testhb->add_child(test_color);
-
- vbl->add_spacer();
- vbl->add_margin_child(TTR("Test:")+" ",testhb);
- /*
- HBoxContainer *upd_hb = memnew( HBoxContainer );
- //vbl->add_child(upd_hb);
- upd_hb->add_spacer();
- Button *update = memnew( Button);
- upd_hb->add_child(update);
- update->set_text("Update");
- update->connect("pressed",this,"_update");
-*/
- options = memnew( _EditorFontImportOptions );
- prop_edit = memnew( PropertyEditor() );
- vbr->add_margin_child(TTR("Options:"),prop_edit,true);
- options->connect("changed",this,"_prop_changed");
-
- prop_edit->hide_top_label();
-
- Panel *panel = memnew( Panel );
- vbc->add_child(panel);
- test_label = memnew( Label );
- test_label->set_autowrap(true);
- panel->add_child(test_label);
- test_label->set_area_as_parent_rect();
- panel->set_v_size_flags(SIZE_EXPAND_FILL);
- test_string->connect("text_changed",this,"_update_text2");
- set_title(TTR("Font Import"));
- timer = memnew( Timer );
- add_child(timer);
- timer->connect("timeout",this,"_update");
- timer->set_wait_time(0.4);
- timer->set_one_shot(true);
-
- get_ok()->connect("pressed", this,"_import");
- get_ok()->set_text(TTR("Import"));
-
- error_dialog = memnew ( ConfirmationDialog );
- add_child(error_dialog);
- error_dialog->get_ok()->set_text(TTR("Accept"));
- set_hide_on_ok(false);
-
-
- }
-
- ~EditorFontImportDialog() {
- memdelete(options);
- }
-};
-
-
-///////////////////////////////////////
-
-
-
-struct _EditorFontData {
-
- Vector<uint8_t> bitmap;
- int width,height;
- int ofs_x; //offset to center, from ABOVE
- int ofs_y; //offset to beginning, from LEFT
- int valign; //vertical alignment
- int halign;
- float advance;
- int character;
- int glyph;
-
- int texture;
- Image blit;
- Point2i blit_ofs;
- //bool printable;
-
-};
-
-
-struct _EditorFontDataSort {
-
- bool operator()(const _EditorFontData *p_A,const _EditorFontData *p_B) const {
- return p_A->height > p_B->height;
- };
-};
-
-struct _EditorKerningKey {
-
- CharType A,B;
- bool operator<(const _EditorKerningKey& p_k) const { return (A==p_k.A)?(B<p_k.B):(A<p_k.A); }
-
-};
-
-
-static unsigned char get_SDF_radial(
- unsigned char *fontmap,
- int w, int h,
- int x, int y,
- int max_radius )
-{
- //hideous brute force method
- float d2 = max_radius*max_radius+1.0;
- unsigned char v = fontmap[x+y*w];
- for( int radius = 1; (radius <= max_radius) && (radius*radius < d2); ++radius )
- {
- int line, lo, hi;
- //north
- line = y - radius;
- if( (line >= 0) && (line < h) )
- {
- lo = x - radius;
- hi = x + radius;
- if( lo < 0 ) { lo = 0; }
- if( hi >= w ) { hi = w-1; }
- int idx = line * w + lo;
- for( int i = lo; i <= hi; ++i )
- {
- //check this pixel
- if( fontmap[idx] != v )
- {
- float nx = i - x;
- float ny = line - y;
- float nd2 = nx*nx+ny*ny;
- if( nd2 < d2 )
- {
- d2 = nd2;
- }
- }
- //move on
- ++idx;
- }
- }
- //south
- line = y + radius;
- if( (line >= 0) && (line < h) )
- {
- lo = x - radius;
- hi = x + radius;
- if( lo < 0 ) { lo = 0; }
- if( hi >= w ) { hi = w-1; }
- int idx = line * w + lo;
- for( int i = lo; i <= hi; ++i )
- {
- //check this pixel
- if( fontmap[idx] != v )
- {
- float nx = i - x;
- float ny = line - y;
- float nd2 = nx*nx+ny*ny;
- if( nd2 < d2 )
- {
- d2 = nd2;
- }
- }
- //move on
- ++idx;
- }
- }
- //west
- line = x - radius;
- if( (line >= 0) && (line < w) )
- {
- lo = y - radius + 1;
- hi = y + radius - 1;
- if( lo < 0 ) { lo = 0; }
- if( hi >= h ) { hi = h-1; }
- int idx = lo * w + line;
- for( int i = lo; i <= hi; ++i )
- {
- //check this pixel
- if( fontmap[idx] != v )
- {
- float nx = line - x;
- float ny = i - y;
- float nd2 = nx*nx+ny*ny;
- if( nd2 < d2 )
- {
- d2 = nd2;
- }
- }
- //move on
- idx += w;
- }
- }
- //east
- line = x + radius;
- if( (line >= 0) && (line < w) )
- {
- lo = y - radius + 1;
- hi = y + radius - 1;
- if( lo < 0 ) { lo = 0; }
- if( hi >= h ) { hi = h-1; }
- int idx = lo * w + line;
- for( int i = lo; i <= hi; ++i )
- {
- //check this pixel
- if( fontmap[idx] != v )
- {
- float nx = line - x;
- float ny = i - y;
- float nd2 = nx*nx+ny*ny;
- if( nd2 < d2 )
- {
- d2 = nd2;
- }
- }
- //move on
- idx += w;
- }
- }
- }
- d2 = sqrtf( d2 );
- if( v==0 )
- {
- d2 = -d2;
- }
- d2 *= 127.5 / max_radius;
- d2 += 127.5;
- if( d2 < 0.0 ) d2 = 0.0;
- if( d2 > 255.0 ) d2 = 255.0;
- return (unsigned char)(d2 + 0.5);
-}
-
-
-Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMetadata>& p_from, const String &p_existing) {
-
-
-
- Ref<ResourceImportMetadata> from = p_from;
- ERR_FAIL_COND_V(from->get_source_count()!=1,Ref<BitmapFont>());
-
- String src_path = EditorImportPlugin::expand_source_path(from->get_source_path(0));
-
- if (src_path.get_extension().to_lower()=="fnt") {
-
- if (ResourceLoader::load(src_path).is_valid()) {
- EditorNode::get_singleton()->show_warning(TTR("Path:")+" "+src_path+"\n"+TTR("This file is already a Godot font file, please supply a BMFont type file instead."));
- return Ref<BitmapFont>();
- }
-
- Ref<BitmapFont> font;
- font.instance();
- Error err = font->create_from_fnt(src_path);
- if (err) {
- EditorNode::get_singleton()->show_warning(TTR("Path:")+" "+src_path+"\n"+TTR("Failed opening as BMFont file."));
- return Ref<BitmapFont>();
- }
-
- return font;
- }
-
- int size = from->get_option("font/size");
-
-#ifdef FREETYPE_ENABLED
- FT_Library library; /* handle to library */
- FT_Face face; /* handle to face object */
-
- Vector<_EditorFontData*> font_data_list;
-
- int error = FT_Init_FreeType( &library );
-
- ERR_EXPLAIN(TTR("Error initializing FreeType."));
- ERR_FAIL_COND_V( error !=0, Ref<BitmapFont>() );
-
- print_line("loadfrom: "+src_path);
- error = FT_New_Face( library, src_path.utf8().get_data(),0,&face );
-
- if ( error == FT_Err_Unknown_File_Format ) {
- ERR_EXPLAIN(TTR("Unknown font format."));
- FT_Done_FreeType( library );
- } else if ( error ) {
-
- ERR_EXPLAIN(TTR("Error loading font."));
- FT_Done_FreeType( library );
-
- }
-
- ERR_FAIL_COND_V(error,Ref<BitmapFont>());
-
-
- int height=0;
- int ascent=0;
- int font_spacing=0;
-
- error = FT_Set_Char_Size(face,0,64*size,512,512);
-
- if ( error ) {
- FT_Done_FreeType( library );
- ERR_EXPLAIN(TTR("Invalid font size."));
- ERR_FAIL_COND_V( error,Ref<BitmapFont>() );
-
- }
-
- int font_mode = from->get_option("mode/mode");
-
- int scaler=(font_mode==_EditorFontImportOptions::FONT_DISTANCE_FIELD)?16:1;
-
- error = FT_Set_Pixel_Sizes(face,0,size*scaler);
-
- FT_GlyphSlot slot = face->glyph;
-
- //error = FT_Set_Charmap(face,ft_encoding_unicode ); /* encoding.. */
-
-
- /* PRINT CHARACTERS TO INDIVIDUAL BITMAPS */
-
-
- //int space_size=5; //size for space, if none found.. 5!
- //int min_valign=500; //some ridiculous number
-
- FT_ULong charcode;
- FT_UInt gindex;
-
- int max_up=-1324345; ///gibberish
- int max_down=124232;
-
- Map<_EditorKerningKey,int> kerning_map;
-
- charcode = FT_Get_First_Char( face, &gindex );
-
- Set<CharType> import_chars;
-
- int import_mode = from->get_option("character_set/mode");
- bool round_advance = from->get_option("advanced/round_advance");
-
- if (import_mode>=_EditorFontImportOptions::CHARSET_CUSTOM) {
-
- //load from custom text
- String path = from->get_option("character_set/custom");
-
- FileAccess *fa = FileAccess::open(EditorImportPlugin::expand_source_path(path),FileAccess::READ);
-
- if ( !fa ) {
-
- FT_Done_FreeType( library );
- ERR_EXPLAIN(TTR("Invalid font custom source."));
- ERR_FAIL_COND_V( !fa,Ref<BitmapFont>() );
-
- }
-
-
- while(!fa->eof_reached()) {
-
- String line = fa->get_line();
- for(int i=0;i<line.length();i++) {
- import_chars.insert(line[i]);
- }
- }
-
- if (import_mode==_EditorFontImportOptions::CHARSET_CUSTOM_LATIN) {
-
- for(int i=32;i<128;i++)
- import_chars.insert(i);
- }
-
- memdelete(fa);
- }
-
- int xsize=0;
- while ( gindex != 0 )
- {
-
- bool skip=false;
- error = FT_Load_Char( face, charcode, font_mode==_EditorFontImportOptions::FONT_BITMAP?FT_LOAD_RENDER:FT_LOAD_MONOCHROME );
- if (error) skip=true;
- else error = FT_Render_Glyph( face->glyph, font_mode==_EditorFontImportOptions::FONT_BITMAP?ft_render_mode_normal:ft_render_mode_mono );
- if (error) {
- skip=true;
- } else if (!skip) {
-
- switch(import_mode) {
-
- case _EditorFontImportOptions::CHARSET_ASCII: skip = charcode>127; break;
- case _EditorFontImportOptions::CHARSET_LATIN: skip = charcode>255 ;break;
- case _EditorFontImportOptions::CHARSET_UNICODE: break; //none
- case _EditorFontImportOptions::CHARSET_CUSTOM:
- case _EditorFontImportOptions::CHARSET_CUSTOM_LATIN: skip = !import_chars.has(charcode); break;
-
- }
- }
-
- if (charcode<=32) //??
- skip=true;
-
- if (skip) {
- charcode=FT_Get_Next_Char(face,charcode,&gindex);
- continue;
- }
-
- _EditorFontData * fdata = memnew( _EditorFontData );
-
-
- int w = slot->bitmap.width;
- int h = slot->bitmap.rows;
- int p = slot->bitmap.pitch;
-
- //print_line("W: "+itos(w)+" P: "+itos(slot->bitmap.pitch));
-
- if (font_mode==_EditorFontImportOptions::FONT_DISTANCE_FIELD) {
-
- //oversize the holding buffer so I can smooth it!
- int sw = w + scaler * 4;
- int sh = h + scaler * 4;
- //do the SDF
- int sdfw = sw / scaler;
- int sdfh = sh / scaler;
-
- fdata->width=sdfw;
- fdata->height=sdfh;
- } else {
- fdata->width=w;
- fdata->height=h;
- }
-
- fdata->character=charcode;
- fdata->glyph=FT_Get_Char_Index(face,charcode);
- if (charcode=='x')
- xsize=w/scaler;
-
-
-
- fdata->valign=slot->bitmap_top;
- fdata->halign=slot->bitmap_left;
-
- if (round_advance)
- fdata->advance=(slot->advance.x+(1<<5))>>6;
- else
- fdata->advance=slot->advance.x/float(1<<6);
-
- if (font_mode==_EditorFontImportOptions::FONT_DISTANCE_FIELD) {
-
- fdata->halign = fdata->halign / scaler - 1.5;
- fdata->valign = fdata->valign / scaler + 1.5;
- fdata->advance/=scaler;
-
- }
-
- fdata->advance+=font_spacing;
-
-
- if (charcode<127) {
- int top = fdata->valign;
- int hmax = h/scaler;
-
- if (top>max_up) {
-
- max_up=top;
- }
-
-
- if ( (top - hmax)<max_down ) {
-
- max_down=top - hmax;
- }
- }
-
- if (font_mode==_EditorFontImportOptions::FONT_DISTANCE_FIELD) {
-
-
- //oversize the holding buffer so I can smooth it!
- int sw = w + scaler * 4;
- int sh = h + scaler * 4;
-
- unsigned char *smooth_buf = new unsigned char[sw*sh];
-
- for( int i = 0; i < sw*sh; ++i ) {
- smooth_buf[i] = 0;
- }
-
- // copy the glyph into the buffer to be smoothed
- unsigned char *buf = slot->bitmap.buffer;
- for( int j = 0; j < h; ++j ) {
- for( int i = 0; i < w; ++i ) {
- smooth_buf[scaler*2+i+(j+scaler*2)*sw] = 255 * ((buf[j*p+(i>>3)] >> (7 - (i & 7))) & 1);
- }
- }
-
- // do the SDF
- int sdfw = fdata->width;
- int sdfh = fdata->height;
-
- fdata->bitmap.resize( sdfw*sdfh );
-
- for( int j = 0; j < sdfh; ++j ) {
- for( int i = 0; i < sdfw; ++i ) {
- int pd_idx = j*sdfw+i;
-
- //fdata->bitmap[j*slot->bitmap.width+i]=slot->bitmap.buffer[j*slot->bitmap.width+i];
-
- fdata->bitmap[pd_idx] =
- //get_SDF
- get_SDF_radial
- ( smooth_buf, sw, sh,
- i*scaler + (scaler >>1), j*scaler + (scaler >>1),
- 2*scaler );
-
- }
- }
-
- delete [] smooth_buf;
-
- } else {
- fdata->bitmap.resize( slot->bitmap.width*slot->bitmap.rows );
- for (int i=0;i<slot->bitmap.width;i++) {
- for (int j=0;j<slot->bitmap.rows;j++) {
-
- fdata->bitmap[j*slot->bitmap.width+i]=slot->bitmap.buffer[j*slot->bitmap.width+i];
- }
- }
- }
-
- font_data_list.push_back(fdata);
- charcode=FT_Get_Next_Char(face,charcode,&gindex);
-// printf("reading char %i\n",charcode);
- }
-
- /* SPACE */
-
- _EditorFontData *spd = memnew( _EditorFontData );
- spd->advance=0;
- spd->character=' ';
- spd->halign=0;
- spd->valign=0;
- spd->width=0;
- spd->height=0;
- spd->ofs_x=0;
- spd->ofs_y=0;
-
- if (!FT_Load_Char( face, ' ', FT_LOAD_RENDER ) && !FT_Render_Glyph( face->glyph, font_mode==_EditorFontImportOptions::FONT_BITMAP?ft_render_mode_normal:ft_render_mode_mono )) {
-
- spd->advance = slot->advance.x>>6; //round to nearest or store as float
- spd->advance/=scaler;
- spd->advance+=font_spacing;
- } else {
-
- spd->advance=xsize;
- spd->advance+=font_spacing;
- }
-
- font_data_list.push_back(spd);
-
- Set<CharType> exported;
- for (int i=0; i<font_data_list.size(); i++) {
- exported.insert(font_data_list[i]->character);
- };
- int missing = 0;
- for(Set<CharType>::Element *E=import_chars.front();E;E=E->next()) {
- CharType c = E->get();
- if (!exported.has(c)) {
- CharType str[2] = {c, 0};
- printf("** Warning: character %i (%ls) not exported\n", (int)c, str);
- ++missing;
- };
- };
- print_line("total_chars: "+itos(font_data_list.size()));
-
- /* KERNING */
-
-
- for(int i=0;i<font_data_list.size();i++) {
-
- if (font_data_list[i]->character>512)
- continue;
- for(int j=0;j<font_data_list.size();j++) {
-
- if (font_data_list[j]->character>512)
- continue;
-
- FT_Vector delta;
- FT_Get_Kerning( face, font_data_list[i]->glyph,font_data_list[j]->glyph, FT_KERNING_DEFAULT, &delta );
-
- if (delta.x!=0) {
-
- _EditorKerningKey kpk;
- kpk.A = font_data_list[i]->character;
- kpk.B = font_data_list[j]->character;
- int kern = ((-delta.x)+(1<<5))>>6;
-
- if (kern==0)
- continue;
- kerning_map[kpk]=kern/scaler;
- }
- }
- }
-
- height=max_up-max_down;
- ascent=max_up;
-
- /* FIND OUT WHAT THE FONT HEIGHT FOR THIS IS */
-
- /* ADJUST THE VALIGN FOR EACH CHARACTER */
-
- for (int i=0;i<(int)font_data_list.size();i++) {
-
- font_data_list[i]->valign=max_up-font_data_list[i]->valign;
- }
-
-
-
- /* ADD THE SPACEBAR CHARACTER */
-/*
- _EditorFontData * fdata = new _EditorFontData;
-
- fdata->character=32;
- fdata->bitmap=0;
- fdata->width=xsize;
- fdata->height=1;
- fdata->valign=0;
-
- font_data_list.push_back(fdata);
-*/
- /* SORT BY HEIGHT, SO THEY FIT BETTER ON THE TEXTURE */
-
- font_data_list.sort_custom<_EditorFontDataSort>();
- Color *color=memnew_arr(Color,height);
-
- int gradient_type=from->get_option("color/mode");
- switch(gradient_type) {
- case _EditorFontImportOptions::COLOR_WHITE: {
-
- for(int i=0;i<height;i++){
- color[i]=Color(1,1,1,1);
- }
-
- } break;
- case _EditorFontImportOptions::COLOR_CUSTOM: {
-
- Color cc = from->get_option("color/color");
- for(int i=0;i<height;i++){
- color[i]=cc;
- }
-
- } break;
- case _EditorFontImportOptions::COLOR_GRADIENT_RANGE: {
-
- Color src=from->get_option("color/begin");
- Color to=from->get_option("color/end");
- for(int i=0;i<height;i++){
- color[i]=src.linear_interpolate(to,i/float(height));
- }
-
- } break;
- case _EditorFontImportOptions::COLOR_GRADIENT_IMAGE: {
-
- String fp = EditorImportPlugin::expand_source_path(from->get_option("color/image"));
- Image img;
- Error err = ImageLoader::load_image(fp,&img);
- if (err==OK) {
-
- for(int i=0;i<height;i++){
- //color[i]=img.get_pixel(0,i*img.get_height()/height);
- }
- } else {
-
- for(int i=0;i<height;i++){
- color[i]=Color(1,1,1,1);
- }
- }
-
- } break;
- }
-
-
- for(int i=0;i<font_data_list.size();i++) {
-
- if (font_data_list[i]->bitmap.size()==0)
- continue;
-
- int margin[4]={0,0,0,0};
-
- if (from->get_option("shadow/enabled").operator bool()) {
- int r=from->get_option("shadow/radius");
- Point2i ofs=Point2(from->get_option("shadow/offset"));
- margin[ MARGIN_LEFT ] = MAX( r - ofs.x, 0);
- margin[ MARGIN_RIGHT ] = MAX( r + ofs.x, 0);
- margin[ MARGIN_TOP ] = MAX( r - ofs.y, 0);
- margin[ MARGIN_BOTTOM ] = MAX( r + ofs.y, 0);
-
- }
-
- if (from->get_option("shadow2/enabled").operator bool()) {
- int r=from->get_option("shadow2/radius");
- Point2i ofs=Point2(from->get_option("shadow2/offset"));
- margin[ MARGIN_LEFT ] = MAX( r - ofs.x, margin[ MARGIN_LEFT ]);
- margin[ MARGIN_RIGHT ] = MAX( r + ofs.x, margin[ MARGIN_RIGHT ]);
- margin[ MARGIN_TOP ] = MAX( r - ofs.y, margin[ MARGIN_TOP ]);
- margin[ MARGIN_BOTTOM ] = MAX( r + ofs.y, margin[ MARGIN_BOTTOM ]);
-
- }
-
- Size2i s;
- s.width=font_data_list[i]->width+margin[MARGIN_LEFT]+margin[MARGIN_RIGHT];
- s.height=font_data_list[i]->height+margin[MARGIN_TOP]+margin[MARGIN_BOTTOM];
- Point2i o;
- o.x=margin[MARGIN_LEFT];
- o.y=margin[MARGIN_TOP];
-
- int ow=font_data_list[i]->width;
- int oh=font_data_list[i]->height;
-
- PoolVector<uint8_t> pixels;
- pixels.resize(s.x*s.y*4);
-
- PoolVector<uint8_t>::Write w = pixels.write();
- //print_line("val: "+itos(font_data_list[i]->valign));
- for(int y=0;y<s.height;y++) {
-
- int yc=CLAMP(y-o.y+font_data_list[i]->valign,0,height-1);
- Color c=color[yc];
- c.a=0;
-
- for(int x=0;x<s.width;x++) {
-
- int ofs=y*s.x+x;
- w[ofs*4+0]=c.r*255.0;
- w[ofs*4+1]=c.g*255.0;
- w[ofs*4+2]=c.b*255.0;
- w[ofs*4+3]=c.a*255.0;
- }
- }
-
-
- for(int si=0;si<2;si++) {
-
-#define S_VAR(m_v) (String(si == 0 ? "shadow/" : "shadow2/") + m_v)
- if (from->get_option(S_VAR("enabled")).operator bool()) {
- int r = from->get_option(S_VAR("radius"));
-
- Color sc = from->get_option(S_VAR("color"));
- Point2i so=Point2(from->get_option(S_VAR("offset")));
-
- float tr = from->get_option(S_VAR("transition"));
- print_line("shadow enabled: "+itos(si));
-
- Vector<uint8_t> s2buf;
- s2buf.resize(s.x*s.y);
- uint8_t *wa=s2buf.ptr();
-
- for(int j=0;j<s.x*s.y;j++){
-
- wa[j]=0;
- }
-
- // blit shadowa
- for(int x=0;x<ow;x++) {
- for(int y=0;y<oh;y++) {
- int ofs = (o.y+y+so.y)*s.x+x+o.x+so.x;
- wa[ofs]=font_data_list[i]->bitmap[y*ow+x];
- }
- }
- //blur shadow2 with separatable convolution
-
- if (r>0) {
-
- Vector<uint8_t> pixels2;
- pixels2.resize(s2buf.size());
- uint8_t *w2=pixels2.ptr();
- //vert
- for(int x=0;x<s.width;x++) {
- for(int y=0;y<s.height;y++) {
-
- int ofs = y*s.width+x;
- int sum=wa[ofs];
-
- for(int k=1;k<=r;k++) {
-
- int ofs_d=MIN(y+k,s.height-1)*s.width+x;
- int ofs_u=MAX(y-k,0)*s.width+x;
- sum+=wa[ofs_d];
- sum+=wa[ofs_u];
- }
-
- w2[ofs]=sum/(r*2+1);
-
- }
- }
- //horiz
- for(int x=0;x<s.width;x++) {
- for(int y=0;y<s.height;y++) {
-
- int ofs = y*s.width+x;
- int sum=w2[ofs];
-
- for(int k=1;k<=r;k++) {
-
- int ofs_r=MIN(x+k,s.width-1)+s.width*y;
- int ofs_l=MAX(x-k,0)+s.width*y;
- sum+=w2[ofs_r];
- sum+=w2[ofs_l];
- }
-
- wa[ofs]=Math::pow(float(sum/(r*2+1))/255.0f,tr)*255.0f;
-
- }
- }
-
- }
-
- //blend back
-
- for(int j=0;j<s.x*s.y;j++){
- Color wd(w[j*4+0]/255.0,w[j*4+1]/255.0,w[j*4+2]/255.0,w[j*4+3]/255.0);
- Color ws(sc.r,sc.g,sc.b,sc.a*(wa[j]/255.0));
- Color b = wd.blend(ws);
-
- w[j*4+0]=b.r*255.0;
- w[j*4+1]=b.g*255.0;
- w[j*4+2]=b.b*255.0;
- w[j*4+3]=b.a*255.0;
-
- }
- }
- }
-
- for(int y=0;y<oh;y++) {
- int yc=CLAMP(y+font_data_list[i]->valign,0,height-1);
- Color sc=color[yc];
- for(int x=0;x<ow;x++) {
- int ofs = (o.y+y)*s.x+x+o.x;
- float c = font_data_list[i]->bitmap[y*ow+x]/255.0;
- Color src_col=sc;
- src_col.a*=c;
- Color dst_col(w[ofs*4+0]/255.0,w[ofs*4+1]/255.0,w[ofs*4+2]/255.0,w[ofs*4+3]/255.0);
- dst_col = dst_col.blend(src_col);
- w[ofs*4+0]=dst_col.r*255.0;
- w[ofs*4+1]=dst_col.g*255.0;
- w[ofs*4+2]=dst_col.b*255.0;
- w[ofs*4+3]=dst_col.a*255.0;
- }
- }
-
-
- w=PoolVector<uint8_t>::Write();
-
- Image img(s.width,s.height,0,Image::FORMAT_RGBA8,pixels);
-
- font_data_list[i]->blit=img;
- font_data_list[i]->blit_ofs=o;
-
- }
-
- //make atlas
- int spacing=2;
- Vector<Size2i> sizes;
- sizes.resize(font_data_list.size());
- for(int i=0;i<font_data_list.size();i++) {
-
- sizes[i]=Size2(font_data_list[i]->blit.get_width()+spacing*2,font_data_list[i]->blit.get_height()+spacing*2);
-
- }
- Vector<Point2i> res;
- Size2i res_size;
- EditorAtlas::fit(sizes,res,res_size);
- res_size.x=next_power_of_2(res_size.x);
- res_size.y=next_power_of_2(res_size.y);
- print_line("Atlas size: "+res_size);
-
- Image atlas(res_size.x,res_size.y,0,Image::FORMAT_RGBA8);
-
- for(int i=0;i<font_data_list.size();i++) {
-
- if (font_data_list[i]->bitmap.size()==0)
- continue;
- atlas.blit_rect(font_data_list[i]->blit,Rect2(0,0,font_data_list[i]->blit.get_width(),font_data_list[i]->blit.get_height()),res[i]+Size2(spacing,spacing));
- font_data_list[i]->ofs_x=res[i].x+spacing;
- font_data_list[i]->ofs_y=res[i].y+spacing;
-
-
- }
-
- if (from->has_option("advanced/premultiply_alpha") && bool(from->get_option("advanced/premultiply_alpha"))) {
-
- PoolVector<uint8_t> data = atlas.get_data();
- int dl = data.size();
- {
- PoolVector<uint8_t>::Write w = data.write();
-
- for(int i=0;i<dl;i+=4) {
-
- w[i+0]= uint8_t(int(w[i+0])*int(w[i+3])/255);
- w[i+1]= uint8_t(int(w[i+1])*int(w[i+3])/255);
- w[i+2]= uint8_t(int(w[i+2])*int(w[i+3])/255);
- }
- }
-
- atlas=Image(res_size.x,res_size.y,0,Image::FORMAT_RGBA8,data);
- }
-
- if (from->has_option("color/monochrome") && bool(from->get_option("color/monochrome"))) {
-
- atlas.convert(Image::FORMAT_LA8);
- }
-
-
- if (0) {
- //debug the texture
- Ref<ImageTexture> atlast = memnew( ImageTexture );
- atlast->create_from_image(atlas);
- //atlast->create_from_image(font_data_list[5]->blit);
- TextureRect *tf = memnew( TextureRect );
- tf->set_texture(atlast);
- dialog->add_child(tf);
- }
-
-
- /* CREATE FONT */
-
- int char_space = from->get_option("extra_space/char");
- int space_space = from->get_option("extra_space/space");
- int top_space = from->get_option("extra_space/top");
- int bottom_space = from->get_option("extra_space/bottom");
- bool enable_filter = from->get_option("advanced/enable_filter");
- if (from->has_option("advanced/disable_filter")){ // this is a compatibility check for a deprecated option
- enable_filter = !from->get_option("advanced/disable_filter");
- }
-
- Ref<BitmapFont> font;
-
- if (p_existing!=String() && ResourceCache::has(p_existing)) {
-
- font = Ref<BitmapFont>( ResourceCache::get(p_existing)->cast_to<BitmapFont>());
- }
-
- if (font.is_null()) {
- font = Ref<BitmapFont>( memnew( BitmapFont ) );
- }
-
- font->clear();
- font->set_height(height+bottom_space+top_space);
- font->set_ascent(ascent+top_space);
- font->set_distance_field_hint(font_mode==_EditorFontImportOptions::FONT_DISTANCE_FIELD);
-
- //register texures
- {
- Ref<ImageTexture> t = memnew(ImageTexture);
- int flags;
- if (!enable_filter)
- flags=0;
- else
- flags=Texture::FLAG_FILTER;
- t->create_from_image(atlas,flags);
- t->set_storage( ImageTexture::STORAGE_COMPRESS_LOSSLESS );
- font->add_texture(t);
-
- }
- //register characters
-
-
- for(int i=0;i<font_data_list.size();i++) {
- _EditorFontData *fd=font_data_list[i];
- int tex_idx=0;
-
- font->add_char(fd->character,tex_idx,Rect2( fd->ofs_x, fd->ofs_y, fd->blit.get_width(), fd->blit.get_height()),Point2(fd->halign-fd->blit_ofs.x,fd->valign-fd->blit_ofs.y+top_space), fd->advance+char_space+(fd->character==' '?space_space:0));
- memdelete(fd);
- }
-
- for(Map<_EditorKerningKey,int>::Element *E=kerning_map.front();E;E=E->next()) {
-
- font->add_kerning_pair(E->key().A,E->key().B,E->get());
- }
-
- FT_Done_FreeType( library );
-
- return font;
-#else
-
- return Ref<BitmapFont>();
-#endif
-}
-
-
-String EditorFontImportPlugin::get_name() const {
-
- return "font";
-}
-String EditorFontImportPlugin::get_visible_name() const{
-
- return TTR("Font");
-}
-void EditorFontImportPlugin::import_dialog(const String& p_from){
-
- dialog->popup_import(p_from);
-}
-Error EditorFontImportPlugin::import(const String& p_path, const Ref<ResourceImportMetadata>& p_from){
-
-
- Ref<BitmapFont> font = EditorFontImportPlugin::generate_font(p_from,p_path);
- if (!font.is_valid())
- return ERR_CANT_CREATE;
-
- Ref<ResourceImportMetadata> from=p_from;
- from->set_source_md5(0,FileAccess::get_md5(EditorImportPlugin::expand_source_path(from->get_source_path(0))));
- from->set_editor(get_name());
- font->set_import_metadata(from);
-
- return ResourceSaver::save(p_path,font);
-
-}
-
-void EditorFontImportPlugin::import_from_drop(const Vector<String>& p_drop, const String &p_dest_path) {
-
- for(int i=0;i<p_drop.size();i++) {
- String ext = p_drop[i].get_extension().to_lower();
- String file = p_drop[i].get_file();
- if (ext=="ttf" || ext=="otf" || ext=="fnt") {
-
- import_dialog();
- dialog->set_source_and_dest(p_drop[i],p_dest_path.plus_file(file.get_basename()+".font"));
- break;
- }
- }
-}
-
-
-EditorFontImportPlugin::EditorFontImportPlugin(EditorNode* p_editor) {
-
- dialog = memnew( EditorFontImportDialog(this) );
- p_editor->get_gui_base()->add_child(dialog);
-}
-#endif
diff --git a/editor/io_plugins/editor_font_import_plugin.h b/editor/io_plugins/editor_font_import_plugin.h
deleted file mode 100644
index d204b8ea97..0000000000
--- a/editor/io_plugins/editor_font_import_plugin.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*************************************************************************/
-/* editor_font_import_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef EDITOR_FONT_IMPORT_PLUGIN_H
-#define EDITOR_FONT_IMPORT_PLUGIN_H
-
-#include "editor/editor_export.h"
-#include "scene/resources/font.h"
-#if 0
-class EditorNode;
-class EditorFontImportDialog;
-
-class EditorFontImportPlugin : public EditorImportPlugin {
-
- GDCLASS(EditorFontImportPlugin,EditorImportPlugin);
-
- EditorFontImportDialog *dialog;
-public:
-
- Ref<BitmapFont> generate_font(const Ref<ResourceImportMetadata>& p_from,const String& p_existing=String()); //used by editor
-
- virtual String get_name() const;
- virtual String get_visible_name() const;
- virtual void import_dialog(const String& p_from="");
- virtual Error import(const String& p_path, const Ref<ResourceImportMetadata>& p_from);
- virtual void import_from_drop(const Vector<String>& p_drop,const String& p_dest_path);
-
-
- EditorFontImportPlugin(EditorNode* p_editor);
-};
-
-#endif // EDITOR_FONT_IMPORT_PLUGIN_H
-#endif
diff --git a/editor/io_plugins/editor_mesh_import_plugin.cpp b/editor/io_plugins/editor_mesh_import_plugin.cpp
deleted file mode 100644
index 0c9f3a3f37..0000000000
--- a/editor/io_plugins/editor_mesh_import_plugin.cpp
+++ /dev/null
@@ -1,594 +0,0 @@
-/*************************************************************************/
-/* editor_mesh_import_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "editor_mesh_import_plugin.h"
-
-#if 0
-
-#include "editor/editor_dir_dialog.h"
-#include "editor/editor_file_dialog.h"
-#include "editor/editor_node.h"
-#include "editor/property_editor.h"
-//#include "scene/resources/sample.h"
-#include "io/marshalls.h"
-#include "io/resource_saver.h"
-#include "os/file_access.h"
-#include "scene/resources/surface_tool.h"
-
-class _EditorMeshImportOptions : public Object {
-
- GDCLASS(_EditorMeshImportOptions,Object);
-public:
-
-
- bool generate_tangents;
- bool generate_normals;
- bool flip_faces;
- bool smooth_shading;
- bool weld_vertices;
- bool import_material;
- bool import_textures;
- float weld_tolerance;
-
-
- bool _set(const StringName& p_name, const Variant& p_value) {
-
- String n = p_name;
- if (n=="generate/tangents")
- generate_tangents=p_value;
- else if (n=="generate/normals")
- generate_normals=p_value;
- else if (n=="import/materials")
- import_material=p_value;
- else if (n=="import/textures")
- import_textures=p_value;
- else if (n=="force/flip_faces")
- flip_faces=p_value;
- else if (n=="force/smooth_shading")
- smooth_shading=p_value;
- else if (n=="force/weld_vertices")
- weld_vertices=p_value;
- else if (n=="force/weld_tolerance")
- weld_tolerance=p_value;
- else
- return false;
-
- return true;
-
- }
-
- bool _get(const StringName& p_name,Variant &r_ret) const{
-
- String n = p_name;
- if (n=="generate/tangents")
- r_ret=generate_tangents;
- else if (n=="generate/normals")
- r_ret=generate_normals;
- else if (n=="import/materials")
- r_ret=import_material;
- else if (n=="import/textures")
- r_ret=import_textures;
- else if (n=="force/flip_faces")
- r_ret=flip_faces;
- else if (n=="force/smooth_shading")
- r_ret=smooth_shading;
- else if (n=="force/weld_vertices")
- r_ret=weld_vertices;
- else if (n=="force/weld_tolerance")
- r_ret=weld_tolerance;
- else
- return false;
-
- return true;
-
- }
- void _get_property_list( List<PropertyInfo> *p_list) const{
-
- p_list->push_back(PropertyInfo(Variant::BOOL,"generate/tangents"));
- p_list->push_back(PropertyInfo(Variant::BOOL,"generate/normals"));
- //not for nowp
- //p_list->push_back(PropertyInfo(Variant::BOOL,"import/materials"));
- //p_list->push_back(PropertyInfo(Variant::BOOL,"import/textures"));
- p_list->push_back(PropertyInfo(Variant::BOOL,"force/flip_faces"));
- p_list->push_back(PropertyInfo(Variant::BOOL,"force/smooth_shading"));
- p_list->push_back(PropertyInfo(Variant::BOOL,"force/weld_vertices"));
- p_list->push_back(PropertyInfo(Variant::REAL,"force/weld_tolerance",PROPERTY_HINT_RANGE,"0.00001,16,0.00001"));
- //p_list->push_back(PropertyInfo(Variant::BOOL,"compress/enable"));
- //p_list->push_back(PropertyInfo(Variant::INT,"compress/bitrate",PROPERTY_HINT_ENUM,"64,96,128,192"));
-
-
- }
-
-
- static void _bind_methods() {
-
-
- ADD_SIGNAL( MethodInfo("changed"));
- }
-
-
- _EditorMeshImportOptions() {
-
- generate_tangents=true;
- generate_normals=false;
- flip_faces=false;
- smooth_shading=false;
- weld_vertices=true;
- weld_tolerance=0.0001;
- import_material=false;
- import_textures=false;
-
- }
-
-
-};
-
-class EditorMeshImportDialog : public ConfirmationDialog {
-
- GDCLASS(EditorMeshImportDialog,ConfirmationDialog);
-
- EditorMeshImportPlugin *plugin;
-
- LineEdit *import_path;
- LineEdit *save_path;
- EditorFileDialog *file_select;
- EditorDirDialog *save_select;
- AcceptDialog *error_dialog;
- PropertyEditor *option_editor;
-
- _EditorMeshImportOptions *options;
-
-
-public:
-
- void _choose_files(const Vector<String>& p_path) {
-
- String files;
- for(int i=0;i<p_path.size();i++) {
-
- if (i>0)
- files+=",";
- files+=p_path[i];
- }
- /*
- if (p_path.size()) {
- String srctex=p_path[0];
- String ipath = EditorImportDB::get_singleton()->find_source_path(srctex);
-
- if (ipath!="")
- save_path->set_text(ipath.get_base_dir());
- }*/
- import_path->set_text(files);
-
- }
- void _choose_save_dir(const String& p_path) {
-
- save_path->set_text(p_path);
- }
-
- void _browse() {
-
- file_select->popup_centered_ratio();
- }
-
- void _browse_target() {
-
- save_select->popup_centered_ratio();
- }
-
- void popup_import(const String& p_path) {
-
- popup_centered(Size2(400,400)*EDSCALE);
-
- if (p_path!="") {
-
- Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_path);
- ERR_FAIL_COND(!rimd.is_valid());
-
- save_path->set_text(p_path.get_base_dir());
- List<String> opts;
- rimd->get_options(&opts);
- for(List<String>::Element *E=opts.front();E;E=E->next()) {
-
- options->_set(E->get(),rimd->get_option(E->get()));
- }
-
- String src = "";
- for(int i=0;i<rimd->get_source_count();i++) {
- if (i>0)
- src+=",";
- src+=EditorImportPlugin::expand_source_path(rimd->get_source_path(i));
- }
- import_path->set_text(src);
- }
- }
-
- void _import() {
-
- Vector<String> meshes = import_path->get_text().split(",");
- if (meshes.size()==0) {
- error_dialog->set_text(TTR("No meshes to import!"));
- error_dialog->popup_centered_minsize();
- return;
- }
-
- String dst = save_path->get_text();
- if (dst=="") {
- error_dialog->set_text(TTR("Save path is empty!"));
- error_dialog->popup_centered_minsize();
- return;
- }
-
- for(int i=0;i<meshes.size();i++) {
-
- Ref<ResourceImportMetadata> imd = memnew( ResourceImportMetadata );
-
- List<PropertyInfo> pl;
- options->_get_property_list(&pl);
- for(List<PropertyInfo>::Element *E=pl.front();E;E=E->next()) {
-
- Variant v;
- String opt=E->get().name;
- options->_get(opt,v);
- imd->set_option(opt,v);
-
- }
-
- imd->add_source(EditorImportPlugin::validate_source_path(meshes[i]));
-
- String file_path = dst.plus_file(meshes[i].get_file().get_basename()+".mesh");
-
- plugin->import(file_path,imd);
- }
-
- hide();
- }
-
- void _notification(int p_what) {
-
-
- if (p_what==NOTIFICATION_ENTER_TREE) {
-
- option_editor->edit(options);
- }
- }
-
- static void _bind_methods() {
-
- ClassDB::bind_method("_choose_files",&EditorMeshImportDialog::_choose_files);
- ClassDB::bind_method("_choose_save_dir",&EditorMeshImportDialog::_choose_save_dir);
- ClassDB::bind_method("_import",&EditorMeshImportDialog::_import);
- ClassDB::bind_method("_browse",&EditorMeshImportDialog::_browse);
- ClassDB::bind_method("_browse_target",&EditorMeshImportDialog::_browse_target);
- }
-
- EditorMeshImportDialog(EditorMeshImportPlugin *p_plugin) {
-
- plugin=p_plugin;
-
- set_title(TTR("Single Mesh Import"));
- set_hide_on_ok(false);
-
- VBoxContainer *vbc = memnew( VBoxContainer );
- add_child(vbc);
- //set_child_rect(vbc);
-
- HBoxContainer *hbc = memnew( HBoxContainer );
- vbc->add_margin_child(TTR("Source Mesh(es):"),hbc);
-
- import_path = memnew( LineEdit );
- import_path->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc->add_child(import_path);
-
- Button * import_choose = memnew( Button );
- import_choose->set_text(" .. ");
- hbc->add_child(import_choose);
-
- import_choose->connect("pressed", this,"_browse");
-
- hbc = memnew( HBoxContainer );
- vbc->add_margin_child(TTR("Target Path:"),hbc);
-
- save_path = memnew( LineEdit );
- save_path->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc->add_child(save_path);
-
- Button * save_choose = memnew( Button );
- save_choose->set_text(" .. ");
- hbc->add_child(save_choose);
-
- save_choose->connect("pressed", this,"_browse_target");
-
- file_select = memnew( EditorFileDialog );
- file_select->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
- file_select->set_mode(EditorFileDialog::MODE_OPEN_FILES);
- file_select->add_filter("*.obj ; Wavefront OBJ");
- add_child(file_select);
- file_select->connect("files_selected", this,"_choose_files");
-
- save_select = memnew( EditorDirDialog );
- add_child(save_select);
- save_select->connect("dir_selected", this,"_choose_save_dir");
-
- get_ok()->connect("pressed", this,"_import");
- get_ok()->set_text(TTR("Import"));
-
- error_dialog = memnew( AcceptDialog );
- add_child(error_dialog);
-
- options = memnew( _EditorMeshImportOptions );
-
- option_editor = memnew( PropertyEditor );
- option_editor->hide_top_label();
- vbc->add_margin_child(TTR("Options:"),option_editor,true);
- }
-
- ~EditorMeshImportDialog() {
- memdelete(options);
- }
-
-};
-
-
-String EditorMeshImportPlugin::get_name() const {
-
- return "mesh";
-}
-String EditorMeshImportPlugin::get_visible_name() const{
-
- return TTR("Mesh");
-}
-void EditorMeshImportPlugin::import_dialog(const String& p_from){
-
- dialog->popup_import(p_from);
-}
-Error EditorMeshImportPlugin::import(const String& p_path, const Ref<ResourceImportMetadata>& p_from){
-
-
- ERR_FAIL_COND_V(p_from->get_source_count()!=1,ERR_INVALID_PARAMETER);
-
- Ref<ResourceImportMetadata> from=p_from;
-
- String src_path=EditorImportPlugin::expand_source_path(from->get_source_path(0));
- FileAccessRef f = FileAccess::open(src_path,FileAccess::READ);
- ERR_FAIL_COND_V(!f,ERR_CANT_OPEN);
-
- Ref<Mesh> mesh;
- Map<String,Ref<Material> > name_map;
-
- if (FileAccess::exists(p_path)) {
- mesh=ResourceLoader::load(p_path,"Mesh");
- if (mesh.is_valid()) {
- for(int i=0;i<mesh->get_surface_count();i++) {
-
- if (!mesh->surface_get_material(i).is_valid())
- continue;
- String name;
- if (mesh->surface_get_name(i)!="")
- name=mesh->surface_get_name(i);
- else
- name=vformat(TTR("Surface %d"),i+1);
-
- name_map[name]=mesh->surface_get_material(i);
- }
-
- while(mesh->get_surface_count()) {
- mesh->surface_remove(0);
- }
- }
- }
-
- if (!mesh.is_valid())
- mesh = Ref<Mesh>( memnew( Mesh ) );
-
-
- bool generate_normals=from->get_option("generate/normals");
- bool generate_tangents=from->get_option("generate/tangents");
- bool flip_faces=from->get_option("force/flip_faces");
- bool force_smooth=from->get_option("force/smooth_shading");
- bool weld_vertices=from->get_option("force/weld_vertices");
- float weld_tolerance=from->get_option("force/weld_tolerance");
- Vector<Vector3> vertices;
- Vector<Vector3> normals;
- Vector<Vector2> uvs;
- String name;
-
- Ref<SurfaceTool> surf_tool = memnew( SurfaceTool) ;
- surf_tool->begin(Mesh::PRIMITIVE_TRIANGLES);
- if (force_smooth)
- surf_tool->add_smooth_group(true);
- int has_index_data=false;
-
- while(true) {
-
-
- String l = f->get_line().strip_edges();
-
- if (l.begins_with("v ")) {
- //vertex
- Vector<String> v = l.split(" ",false);
- ERR_FAIL_COND_V(v.size()<4,ERR_INVALID_DATA);
- Vector3 vtx;
- vtx.x=v[1].to_float();
- vtx.y=v[2].to_float();
- vtx.z=v[3].to_float();
- vertices.push_back(vtx);
- } else if (l.begins_with("vt ")) {
- //uv
- Vector<String> v = l.split(" ",false);
- ERR_FAIL_COND_V(v.size()<3,ERR_INVALID_DATA);
- Vector2 uv;
- uv.x=v[1].to_float();
- uv.y=1.0-v[2].to_float();
- uvs.push_back(uv);
-
- } else if (l.begins_with("vn ")) {
- //normal
- Vector<String> v = l.split(" ",false);
- ERR_FAIL_COND_V(v.size()<4,ERR_INVALID_DATA);
- Vector3 nrm;
- nrm.x=v[1].to_float();
- nrm.y=v[2].to_float();
- nrm.z=v[3].to_float();
- normals.push_back(nrm);
- } if (l.begins_with("f ")) {
- //vertex
-
- has_index_data=true;
- Vector<String> v = l.split(" ",false);
- ERR_FAIL_COND_V(v.size()<4,ERR_INVALID_DATA);
-
- //not very fast, could be sped up
-
-
- Vector<String> face[3];
- face[0] = v[1].split("/");
- face[1] = v[2].split("/");
- ERR_FAIL_COND_V(face[0].size()==0,ERR_PARSE_ERROR);
- ERR_FAIL_COND_V(face[0].size()!=face[1].size(),ERR_PARSE_ERROR);
- for(int i=2;i<v.size()-1;i++) {
-
- face[2] = v[i+1].split("/");
- ERR_FAIL_COND_V(face[0].size()!=face[2].size(),ERR_PARSE_ERROR);
- for(int j=0;j<3;j++) {
-
- int idx=j;
-
- if (!flip_faces && idx<2) {
- idx=1^idx;
- }
-
-
- if (face[idx].size()==3) {
- int norm = face[idx][2].to_int()-1;
- ERR_FAIL_INDEX_V(norm,normals.size(),ERR_PARSE_ERROR);
- surf_tool->add_normal(normals[norm]);
- }
-
- if (face[idx].size()>=2 && face[idx][1]!=String()) {
-
- int uv = face[idx][1].to_int()-1;
- ERR_FAIL_INDEX_V(uv,uvs.size(),ERR_PARSE_ERROR);
- surf_tool->add_uv(uvs[uv]);
- }
-
- int vtx = face[idx][0].to_int()-1;
- ERR_FAIL_INDEX_V(vtx,vertices.size(),ERR_PARSE_ERROR);
-
- Vector3 vertex = vertices[vtx];
- if (weld_vertices)
- vertex=vertex.snapped(weld_tolerance);
- surf_tool->add_vertex(vertex);
- }
-
- face[1]=face[2];
- }
- } else if (l.begins_with("s ") && !force_smooth) { //smoothing
- String what = l.substr(2,l.length()).strip_edges();
- if (what=="off")
- surf_tool->add_smooth_group(false);
- else
- surf_tool->add_smooth_group(true);
-
- } else if (l.begins_with("o ") || f->eof_reached()) { //new surface or done
-
- if (has_index_data) {
- //new object/surface
- if (generate_normals || force_smooth)
- surf_tool->generate_normals();
- if (uvs.size() && (normals.size() || generate_normals) && generate_tangents)
- surf_tool->generate_tangents();
-
- surf_tool->index();
- mesh = surf_tool->commit(mesh);
- if (name=="")
- name=vformat(TTR("Surface %d"),mesh->get_surface_count()-1);
- mesh->surface_set_name(mesh->get_surface_count()-1,name);
- name="";
- surf_tool->clear();
- surf_tool->begin(Mesh::PRIMITIVE_TRIANGLES);
- if (force_smooth)
- surf_tool->add_smooth_group(true);
-
- has_index_data=false;
-
- if (f->eof_reached())
- break;
- }
-
- if (l.begins_with("o ")) //name
- name=l.substr(2,l.length()).strip_edges();
- }
- }
-
-
- from->set_source_md5(0,FileAccess::get_md5(src_path));
- from->set_editor(get_name());
- mesh->set_import_metadata(from);
-
- //re-apply materials if exist
- for(int i=0;i<mesh->get_surface_count();i++) {
-
- String n = mesh->surface_get_name(i);
- if (name_map.has(n))
- mesh->surface_set_material(i,name_map[n]);
- }
-
- Error err = ResourceSaver::save(p_path,mesh);
-
- return err;
-}
-
-
-void EditorMeshImportPlugin::import_from_drop(const Vector<String>& p_drop, const String &p_dest_path) {
-
-
- Vector<String> files;
- for(int i=0;i<p_drop.size();i++) {
- String ext = p_drop[i].get_extension().to_lower();
- String file = p_drop[i].get_file();
- if (ext=="obj") {
-
- files.push_back(p_drop[i]);
- }
- }
-
- if (files.size()) {
- import_dialog();
- dialog->_choose_files(files);
- dialog->_choose_save_dir(p_dest_path);
- }
-}
-
-EditorMeshImportPlugin::EditorMeshImportPlugin(EditorNode* p_editor) {
-
- dialog = memnew( EditorMeshImportDialog(this));
- p_editor->get_gui_base()->add_child(dialog);
-}
-#endif
diff --git a/editor/io_plugins/editor_mesh_import_plugin.h b/editor/io_plugins/editor_mesh_import_plugin.h
deleted file mode 100644
index 06fdc4195e..0000000000
--- a/editor/io_plugins/editor_mesh_import_plugin.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*************************************************************************/
-/* editor_mesh_import_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef EDITOR_MESH_IMPORT_PLUGIN_H
-#define EDITOR_MESH_IMPORT_PLUGIN_H
-
-#if 0
-#include "editor/editor_import_export.h"
-#include "scene/resources/font.h"
-
-class EditorNode;
-class EditorMeshImportDialog;
-
-class EditorMeshImportPlugin : public EditorImportPlugin {
-
- GDCLASS(EditorMeshImportPlugin,EditorImportPlugin);
-
- EditorMeshImportDialog *dialog;
-
-
-public:
-
- virtual String get_name() const;
- virtual String get_visible_name() const;
- virtual void import_dialog(const String& p_from="");
- virtual Error import(const String& p_path, const Ref<ResourceImportMetadata>& p_from);
- void import_from_drop(const Vector<String>& p_drop, const String &p_dest_path);
-
-
- EditorMeshImportPlugin(EditorNode* p_editor);
-};
-
-#endif
-#endif // EDITOR_MESH_IMPORT_PLUGIN_H
diff --git a/editor/io_plugins/editor_sample_import_plugin.cpp b/editor/io_plugins/editor_sample_import_plugin.cpp
deleted file mode 100644
index 0909b96cdc..0000000000
--- a/editor/io_plugins/editor_sample_import_plugin.cpp
+++ /dev/null
@@ -1,930 +0,0 @@
-/*************************************************************************/
-/* editor_sample_import_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "editor_sample_import_plugin.h"
-
-#include "editor/editor_dir_dialog.h"
-#include "editor/editor_file_dialog.h"
-#include "editor/editor_node.h"
-#include "editor/editor_settings.h"
-#include "editor/property_editor.h"
-#include "io/marshalls.h"
-#include "io/resource_saver.h"
-#include "os/file_access.h"
-
-#if 0
-
-class _EditorSampleImportOptions : public Object {
-
- GDCLASS(_EditorSampleImportOptions,Object);
-public:
-
- enum CompressMode {
- COMPRESS_MODE_DISABLED,
- COMPRESS_MODE_RAM,
- COMPRESS_MODE_DISK
- };
-
- enum CompressBitrate {
- COMPRESS_64,
- COMPRESS_96,
- COMPRESS_128,
- COMPRESS_192
- };
-
- bool force_8_bit;
- bool force_mono;
- bool force_rate;
- float force_rate_hz;
-
- bool edit_trim;
- bool edit_normalize;
- bool edit_loop;
-
- CompressMode compress_mode;
- CompressBitrate compress_bitrate;
-
-
- bool _set(const StringName& p_name, const Variant& p_value) {
-
- String n = p_name;
- if (n=="force/8_bit")
- force_8_bit=p_value;
- else if (n=="force/mono")
- force_mono=p_value;
- else if (n=="force/max_rate")
- force_rate=p_value;
- else if (n=="force/max_rate_hz")
- force_rate_hz=p_value;
- else if (n=="edit/trim")
- edit_trim=p_value;
- else if (n=="edit/normalize")
- edit_normalize=p_value;
- else if (n=="edit/loop")
- edit_loop=p_value;
- else if (n=="compress/mode")
- compress_mode=CompressMode(int(p_value));
- else if (n=="compress/bitrate")
- compress_bitrate=CompressBitrate(int(p_value));
- else
- return false;
-
- return true;
-
- }
-
- bool _get(const StringName& p_name,Variant &r_ret) const{
-
- String n = p_name;
- if (n=="force/8_bit")
- r_ret=force_8_bit;
- else if (n=="force/mono")
- r_ret=force_mono;
- else if (n=="force/max_rate")
- r_ret=force_rate;
- else if (n=="force/max_rate_hz")
- r_ret=force_rate_hz;
- else if (n=="edit/trim")
- r_ret=edit_trim;
- else if (n=="edit/normalize")
- r_ret=edit_normalize;
- else if (n=="edit/loop")
- r_ret=edit_loop;
- else if (n=="compress/mode")
- r_ret=compress_mode;
- else if (n=="compress/bitrate")
- r_ret=compress_bitrate;
- else
- return false;
-
- return true;
-
- }
- void _get_property_list( List<PropertyInfo> *p_list) const{
-
- p_list->push_back(PropertyInfo(Variant::BOOL,"force/8_bit"));
- p_list->push_back(PropertyInfo(Variant::BOOL,"force/mono"));
- p_list->push_back(PropertyInfo(Variant::BOOL,"force/max_rate"));
- p_list->push_back(PropertyInfo(Variant::REAL,"force/max_rate_hz",PROPERTY_HINT_EXP_RANGE,"11025,192000,1"));
- p_list->push_back(PropertyInfo(Variant::BOOL,"edit/trim"));
- p_list->push_back(PropertyInfo(Variant::BOOL,"edit/normalize"));
- p_list->push_back(PropertyInfo(Variant::BOOL,"edit/loop"));
- p_list->push_back(PropertyInfo(Variant::INT,"compress/mode",PROPERTY_HINT_ENUM,"Disabled,RAM (Ima-ADPCM)"));
- //p_list->push_back(PropertyInfo(Variant::INT,"compress/bitrate",PROPERTY_HINT_ENUM,"64,96,128,192"));
-
-
- }
-
-
- static void _bind_methods() {
-
-
- ADD_SIGNAL( MethodInfo("changed"));
- }
-
-
- _EditorSampleImportOptions() {
-
- force_8_bit=false;
- force_mono=false;
- force_rate=true;
- force_rate_hz=44100;
-
- edit_trim=true;
- edit_normalize=true;
- edit_loop=false;
-
- compress_mode=COMPRESS_MODE_RAM;
- compress_bitrate=COMPRESS_128;
- }
-
-
-};
-
-class EditorSampleImportDialog : public ConfirmationDialog {
-
- GDCLASS(EditorSampleImportDialog,ConfirmationDialog);
-
- EditorSampleImportPlugin *plugin;
-
- LineEdit *import_path;
- LineEdit *save_path;
- EditorFileDialog *file_select;
- EditorDirDialog *save_select;
- ConfirmationDialog *error_dialog;
- PropertyEditor *option_editor;
-
- _EditorSampleImportOptions *options;
-
-
-public:
-
- void _choose_files(const Vector<String>& p_path) {
-
- String files;
- for(int i=0;i<p_path.size();i++) {
-
- if (i>0)
- files+=",";
- files+=p_path[i];
- }
- /*
- if (p_path.size()) {
- String srctex=p_path[0];
- String ipath = EditorImportDB::get_singleton()->find_source_path(srctex);
-
- if (ipath!="")
- save_path->set_text(ipath.get_base_dir());
- }*/
- import_path->set_text(files);
-
- }
- void _choose_save_dir(const String& p_path) {
-
- save_path->set_text(p_path);
- }
-
- void _browse() {
-
- file_select->popup_centered_ratio();
- }
-
- void _browse_target() {
-
- save_select->popup_centered_ratio();
-
- }
-
-
- void popup_import(const String& p_path) {
-
- popup_centered(Size2(400,400)*EDSCALE);
- if (p_path!="") {
-
- Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_path);
- ERR_FAIL_COND(!rimd.is_valid());
-
- save_path->set_text(p_path.get_base_dir());
- List<String> opts;
- rimd->get_options(&opts);
- for(List<String>::Element *E=opts.front();E;E=E->next()) {
-
- options->_set(E->get(),rimd->get_option(E->get()));
- }
-
- String src = "";
- for(int i=0;i<rimd->get_source_count();i++) {
- if (i>0)
- src+=",";
- src+=EditorImportPlugin::expand_source_path(rimd->get_source_path(i));
- }
- import_path->set_text(src);
- }
- }
-
-
- void _import() {
-
- Vector<String> samples = import_path->get_text().split(",");
-
- if (samples.size()==0) {
- error_dialog->set_text(TTR("No samples to import!"));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- }
-
- if (save_path->get_text().strip_edges()=="") {
- error_dialog->set_text(TTR("Target path is empty."));
- error_dialog->popup_centered_minsize();
- return;
- }
-
- if (!save_path->get_text().begins_with("res://")) {
- error_dialog->set_text(TTR("Target path must be a complete resource path."));
- error_dialog->popup_centered_minsize();
- return;
- }
-
- if (!DirAccess::exists(save_path->get_text())) {
- error_dialog->set_text(TTR("Target path must exist."));
- error_dialog->popup_centered_minsize();
- return;
- }
-
- for(int i=0;i<samples.size();i++) {
-
- Ref<ResourceImportMetadata> imd = memnew( ResourceImportMetadata );
-
- List<PropertyInfo> pl;
- options->_get_property_list(&pl);
- for(List<PropertyInfo>::Element *E=pl.front();E;E=E->next()) {
-
- Variant v;
- String opt=E->get().name;
- options->_get(opt,v);
- imd->set_option(opt,v);
-
- }
-
- imd->add_source(EditorImportPlugin::validate_source_path(samples[i]));
-
- String dst = save_path->get_text();
- if (dst=="") {
- error_dialog->set_text(TTR("Save path is empty!"));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- }
-
- dst = dst.plus_file(samples[i].get_file().get_basename()+".sample");
-
- plugin->import(dst,imd);
- }
-
- hide();
-
- }
-
-
- void _notification(int p_what) {
-
-
- if (p_what==NOTIFICATION_ENTER_TREE) {
-
- option_editor->edit(options);
- }
- }
-
- static void _bind_methods() {
-
-
- ClassDB::bind_method("_choose_files",&EditorSampleImportDialog::_choose_files);
- ClassDB::bind_method("_choose_save_dir",&EditorSampleImportDialog::_choose_save_dir);
- ClassDB::bind_method("_import",&EditorSampleImportDialog::_import);
- ClassDB::bind_method("_browse",&EditorSampleImportDialog::_browse);
- ClassDB::bind_method("_browse_target",&EditorSampleImportDialog::_browse_target);
- //ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
- }
-
- EditorSampleImportDialog(EditorSampleImportPlugin *p_plugin) {
-
- plugin=p_plugin;
-
-
- set_title(TTR("Import Audio Samples"));
-
- VBoxContainer *vbc = memnew( VBoxContainer );
- add_child(vbc);
- //set_child_rect(vbc);
-
-
- HBoxContainer *hbc = memnew( HBoxContainer );
- vbc->add_margin_child(TTR("Source Sample(s):"),hbc);
-
- import_path = memnew( LineEdit );
- import_path->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc->add_child(import_path);
-
- Button * import_choose = memnew( Button );
- import_choose->set_text(" .. ");
- hbc->add_child(import_choose);
-
- import_choose->connect("pressed", this,"_browse");
-
- hbc = memnew( HBoxContainer );
- vbc->add_margin_child(TTR("Target Path:"),hbc);
-
- save_path = memnew( LineEdit );
- save_path->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc->add_child(save_path);
-
- Button * save_choose = memnew( Button );
- save_choose->set_text(" .. ");
- hbc->add_child(save_choose);
-
- save_choose->connect("pressed", this,"_browse_target");
-
- file_select = memnew(EditorFileDialog);
- file_select->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
- add_child(file_select);
- file_select->set_mode(EditorFileDialog::MODE_OPEN_FILES);
- file_select->connect("files_selected", this,"_choose_files");
- file_select->add_filter("*.wav ; MS Waveform");
- save_select = memnew( EditorDirDialog );
- add_child(save_select);
-
- //save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR);
- save_select->connect("dir_selected", this,"_choose_save_dir");
-
- get_ok()->connect("pressed", this,"_import");
- get_ok()->set_text(TTR("Import"));
-
-
- error_dialog = memnew ( ConfirmationDialog );
- add_child(error_dialog);
- error_dialog->get_ok()->set_text(TTR("Accept"));
- //error_dialog->get_cancel()->hide();
-
- set_hide_on_ok(false);
- options = memnew( _EditorSampleImportOptions );
-
- option_editor = memnew( PropertyEditor );
- option_editor->hide_top_label();
- vbc->add_margin_child(TTR("Options:"),option_editor,true);
- }
-
- ~EditorSampleImportDialog() {
- memdelete(options);
- }
-
-};
-
-
-String EditorSampleImportPlugin::get_name() const {
-
- return "sample";
-}
-String EditorSampleImportPlugin::get_visible_name() const{
-
- return TTR("Audio Sample");
-}
-void EditorSampleImportPlugin::import_dialog(const String& p_from){
-
- dialog->popup_import(p_from);
-}
-Error EditorSampleImportPlugin::import(const String& p_path, const Ref<ResourceImportMetadata>& p_from){
-
- ERR_FAIL_COND_V(p_from->get_source_count()!=1,ERR_INVALID_PARAMETER);
-
- Ref<ResourceImportMetadata> from=p_from;
-
- String src_path=EditorImportPlugin::expand_source_path(from->get_source_path(0));
- Ref<Sample> smp = ResourceLoader::load(src_path);
- ERR_FAIL_COND_V(smp.is_null(),ERR_CANT_OPEN);
-
-
- float rate = smp->get_mix_rate();
- bool is16 = smp->get_format()==Sample::FORMAT_PCM16;
- int chans = smp->is_stereo()?2:1;
- int len = smp->get_length();
- Sample::LoopFormat loop= smp->get_loop_format();
- int loop_beg = smp->get_loop_begin();
- int loop_end = smp->get_loop_end();
-
- print_line("Input Sample: ");
- print_line("\tlen: "+itos(len));
- print_line("\tchans: "+itos(chans));
- print_line("\t16bits: "+itos(is16));
- print_line("\trate: "+itos(rate));
- print_line("\tloop: "+itos(loop));
- print_line("\tloop begin: "+itos(loop_beg));
- print_line("\tloop end: "+itos(loop_end));
- Vector<float> data;
- data.resize(len*chans);
-
- {
- PoolVector<uint8_t> src_data = smp->get_data();
- PoolVector<uint8_t>::Read sr = src_data.read();
-
-
- for(int i=0;i<len*chans;i++) {
-
- float s=0;
- if (is16) {
-
- int16_t i16 = decode_uint16(&sr[i*2]);
- s=i16/32767.0;
- } else {
-
- int8_t i8 = sr[i];
- s=i8/127.0;
- }
- data[i]=s;
- }
- }
-
- //apply frequency limit
-
- bool limit_rate = from->get_option("force/max_rate");
- int limit_rate_hz = from->get_option("force/max_rate_hz");
- if (limit_rate && rate > limit_rate_hz) {
- //resampleeee!!!
- int new_data_len = len * limit_rate_hz / rate;
- Vector<float> new_data;
- new_data.resize( new_data_len * chans );
- for(int c=0;c<chans;c++) {
-
- for(int i=0;i<new_data_len;i++) {
-
- //simple cubic interpolation should be enough.
- float pos = float(i) * len / new_data_len;
- float mu = pos-Math::floor(pos);
- int ipos = int(Math::floor(pos));
-
- float y0=data[MAX(0,ipos-1)*chans+c];
- float y1=data[ipos*chans+c];
- float y2=data[MIN(len-1,ipos+1)*chans+c];
- float y3=data[MIN(len-1,ipos+2)*chans+c];
-
- float mu2 = mu*mu;
- float a0 = y3 - y2 - y0 + y1;
- float a1 = y0 - y1 - a0;
- float a2 = y2 - y0;
- float a3 = y1;
-
- float res=(a0*mu*mu2+a1*mu2+a2*mu+a3);
-
- new_data[i*chans+c]=res;
- }
- }
-
- if (loop) {
-
- loop_beg=loop_beg*new_data_len/len;
- loop_end=loop_end*new_data_len/len;
- }
- data=new_data;
- rate=limit_rate_hz;
- len=new_data_len;
- }
-
-
- bool normalize = from->get_option("edit/normalize");
-
- if (normalize) {
-
- float max=0;
- for(int i=0;i<data.size();i++) {
-
- float amp = Math::abs(data[i]);
- if (amp>max)
- max=amp;
- }
-
- if (max>0) {
-
- float mult=1.0/max;
- for(int i=0;i<data.size();i++) {
-
- data[i]*=mult;
- }
-
- }
- }
-
- bool trim = from->get_option("edit/trim");
-
- if (trim && !loop) {
-
- int first=0;
- int last=(len*chans)-1;
- bool found=false;
- float limit = Math::db2linear((float)-30);
- for(int i=0;i<data.size();i++) {
- float amp = Math::abs(data[i]);
-
- if (!found && amp > limit) {
- first=i;
- found=true;
- }
-
- if (found && amp > limit) {
- last=i;
- }
- }
-
- first/=chans;
- last/=chans;
-
- if (first<last) {
-
- Vector<float> new_data;
- new_data.resize((last-first+1)*chans);
- for(int i=first*chans;i<=last*chans;i++) {
- new_data[i-first*chans]=data[i];
- }
-
- data=new_data;
- len=data.size()/chans;
- }
-
- }
-
- bool make_loop = from->get_option("edit/loop");
-
- if (make_loop && !loop) {
-
- loop=Sample::LOOP_FORWARD;
- loop_beg=0;
- loop_end=len;
- }
-
- int compression = from->get_option("compress/mode");
- bool force_mono = from->get_option("force/mono");
-
-
- if (force_mono && chans==2) {
-
- Vector<float> new_data;
- new_data.resize(data.size()/2);
- for(int i=0;i<len;i++) {
- new_data[i]=(data[i*2+0]+data[i*2+1])/2.0;
- }
-
- data=new_data;
- chans=1;
- }
-
- bool force_8_bit = from->get_option("force/8_bit");
- if (force_8_bit) {
-
- is16=false;
- }
-
-
- PoolVector<uint8_t> dst_data;
- Sample::Format dst_format;
-
- if ( compression == _EditorSampleImportOptions::COMPRESS_MODE_RAM) {
-
- dst_format=Sample::FORMAT_IMA_ADPCM;
- if (chans==1) {
- _compress_ima_adpcm(data,dst_data);
- } else {
-
- print_line("INTERLEAAVE!");
-
-
-
- //byte interleave
- Vector<float> left;
- Vector<float> right;
-
- int tlen = data.size()/2;
- left.resize(tlen);
- right.resize(tlen);
-
- for(int i=0;i<tlen;i++) {
- left[i]=data[i*2+0];
- right[i]=data[i*2+1];
- }
-
- PoolVector<uint8_t> bleft;
- PoolVector<uint8_t> bright;
-
- _compress_ima_adpcm(left,bleft);
- _compress_ima_adpcm(right,bright);
-
- int dl = bleft.size();
- dst_data.resize( dl *2 );
-
- PoolVector<uint8_t>::Write w=dst_data.write();
- PoolVector<uint8_t>::Read rl=bleft.read();
- PoolVector<uint8_t>::Read rr=bright.read();
-
- for(int i=0;i<dl;i++) {
- w[i*2+0]=rl[i];
- w[i*2+1]=rr[i];
- }
- }
-
- //print_line("compressing ima-adpcm, resulting buffersize is "+itos(dst_data.size())+" from "+itos(data.size()));
-
- } else {
-
- dst_format=is16?Sample::FORMAT_PCM16:Sample::FORMAT_PCM8;
- dst_data.resize( data.size() * (is16?2:1));
- {
- PoolVector<uint8_t>::Write w = dst_data.write();
-
- int ds=data.size();
- for(int i=0;i<ds;i++) {
-
- if (is16) {
- int16_t v = CLAMP(data[i]*32767,-32768,32767);
- encode_uint16(v,&w[i*2]);
- } else {
- int8_t v = CLAMP(data[i]*127,-128,127);
- w[i]=v;
- }
- }
- }
- }
-
-
- Ref<Sample> target;
-
- if (ResourceCache::has(p_path)) {
-
- target = Ref<Sample>( ResourceCache::get(p_path)->cast_to<Sample>() );
- } else {
-
- target = smp;
- }
-
- target->create(dst_format,chans==2?true:false,len);
- target->set_data(dst_data);
- target->set_mix_rate(rate);
- target->set_loop_format(loop);
- target->set_loop_begin(loop_beg);
- target->set_loop_end(loop_end);
-
- from->set_source_md5(0,FileAccess::get_md5(src_path));
- from->set_editor(get_name());
- target->set_import_metadata(from);
-
-
- Error err = ResourceSaver::save(p_path,smp);
-
- return err;
-
-}
-
-void EditorSampleImportPlugin::_compress_ima_adpcm(const Vector<float>& p_data,PoolVector<uint8_t>& dst_data) {
-
-
- /*p_sample_data->data = (void*)malloc(len);
- xm_s8 *dataptr=(xm_s8*)p_sample_data->data;*/
-
- static const int16_t _ima_adpcm_step_table[89] = {
- 7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
- 19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
- 50, 55, 60, 66, 73, 80, 88, 97, 107, 118,
- 130, 143, 157, 173, 190, 209, 230, 253, 279, 307,
- 337, 371, 408, 449, 494, 544, 598, 658, 724, 796,
- 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066,
- 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358,
- 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899,
- 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
- };
-
- static const int8_t _ima_adpcm_index_table[16] = {
- -1, -1, -1, -1, 2, 4, 6, 8,
- -1, -1, -1, -1, 2, 4, 6, 8
- };
-
-
- int datalen = p_data.size();
- int datamax=datalen;
- if (datalen&1)
- datalen++;
-
- dst_data.resize(datalen/2+4);
- PoolVector<uint8_t>::Write w = dst_data.write();
-
-
- int i,step_idx=0,prev=0;
- uint8_t *out = w.ptr();
- //int16_t xm_prev=0;
- const float *in=p_data.ptr();
-
-
- /* initial value is zero */
- *(out++) =0;
- *(out++) =0;
- /* Table index initial value */
- *(out++) =0;
- /* unused */
- *(out++) =0;
-
- for (i=0;i<datalen;i++) {
- int step,diff,vpdiff,mask;
- uint8_t nibble;
- int16_t xm_sample;
-
- if (i>=datamax)
- xm_sample=0;
- else {
-
-
- xm_sample=CLAMP(in[i]*32767.0,-32768,32767);
- /*
- if (xm_sample==32767 || xm_sample==-32768)
- printf("clippy!\n",xm_sample);
- */
- }
-
- //xm_sample=xm_sample+xm_prev;
- //xm_prev=xm_sample;
-
- diff = (int)xm_sample - prev ;
-
- nibble=0 ;
- step = _ima_adpcm_step_table[ step_idx ];
- vpdiff = step >> 3 ;
- if (diff < 0) {
- nibble=8;
- diff=-diff ;
- }
- mask = 4 ;
- while (mask) {
-
- if (diff >= step) {
-
- nibble |= mask;
- diff -= step;
- vpdiff += step;
- }
-
- step >>= 1 ;
- mask >>= 1 ;
- };
-
- if (nibble&8)
- prev-=vpdiff ;
- else
- prev+=vpdiff ;
-
- if (prev > 32767) {
- //printf("%i,xms %i, prev %i,diff %i, vpdiff %i, clip up %i\n",i,xm_sample,prev,diff,vpdiff,prev);
- prev=32767;
- } else if (prev < -32768) {
- //printf("%i,xms %i, prev %i,diff %i, vpdiff %i, clip down %i\n",i,xm_sample,prev,diff,vpdiff,prev);
- prev = -32768 ;
- }
-
- step_idx += _ima_adpcm_index_table[nibble];
- if (step_idx< 0)
- step_idx= 0 ;
- else if (step_idx> 88)
- step_idx= 88 ;
-
-
- if (i&1) {
- *out|=nibble<<4;
- out++;
- } else {
- *out=nibble;
- }
- /*dataptr[i]=prev>>8;*/
- }
-
-}
-
-
-EditorSampleImportPlugin* EditorSampleImportPlugin::singleton=NULL;
-
-
-void EditorSampleImportPlugin::import_from_drop(const Vector<String>& p_drop, const String &p_dest_path) {
-
-
- Vector<String> files;
- for(int i=0;i<p_drop.size();i++) {
- String ext = p_drop[i].get_extension().to_lower();
-
- if (ext=="wav") {
-
- files.push_back(p_drop[i]);
- }
- }
-
- if (files.size()) {
- import_dialog();
- dialog->_choose_files(files);
- dialog->_choose_save_dir(p_dest_path);
- }
-}
-
-void EditorSampleImportPlugin::reimport_multiple_files(const Vector<String>& p_list) {
-
- if (p_list.size()==0)
- return;
-
- Vector<String> sources;
- for(int i=0;i<p_list.size();i++) {
- int idx;
- EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->find_file(p_list[i],&idx);
- if (efsd) {
- for(int j=0;j<efsd->get_source_count(idx);j++) {
- String file = expand_source_path(efsd->get_source_file(idx,j));
- if (sources.find(file)==-1) {
- sources.push_back(file);
- }
-
- }
- }
- }
-
- if (sources.size()) {
-
- dialog->popup_import(p_list[0]);
- dialog->_choose_files(sources);
- dialog->_choose_save_dir(p_list[0].get_base_dir());
- }
-}
-
-bool EditorSampleImportPlugin::can_reimport_multiple_files() const {
-
- return true;
-}
-
-EditorSampleImportPlugin::EditorSampleImportPlugin(EditorNode* p_editor) {
-
- singleton=this;
- dialog = memnew( EditorSampleImportDialog(this));
- p_editor->get_gui_base()->add_child(dialog);
-}
-
-Vector<uint8_t> EditorSampleExportPlugin::custom_export(String& p_path,const Ref<EditorExportPlatform> &p_platform) {
-
-
-
- if (EditorImportExport::get_singleton()->sample_get_action()==EditorImportExport::SAMPLE_ACTION_NONE || p_path.get_extension().to_lower()!="wav") {
-
- return Vector<uint8_t>();
- }
-
- Ref<ResourceImportMetadata> imd = memnew( ResourceImportMetadata );
-
- imd->add_source(EditorImportPlugin::validate_source_path(p_path));
-
- imd->set_option("force/8_bit",false);
- imd->set_option("force/mono",false);
- imd->set_option("force/max_rate",true);
- imd->set_option("force/max_rate_hz",EditorImportExport::get_singleton()->sample_get_max_hz());
- imd->set_option("edit/trim",EditorImportExport::get_singleton()->sample_get_trim());
- imd->set_option("edit/normalize",false);
- imd->set_option("edit/loop",false);
- imd->set_option("compress/mode",1);
-
- String savepath = EditorSettings::get_singleton()->get_settings_path().plus_file("tmp/smpconv.sample");
- Error err = EditorSampleImportPlugin::singleton->import(savepath,imd);
-
-
- ERR_FAIL_COND_V(err!=OK,Vector<uint8_t>());
-
- p_path=p_path.get_basename()+".converted.sample";
- return FileAccess::get_file_as_array(savepath);
-
-}
-
-
-
-EditorSampleExportPlugin::EditorSampleExportPlugin() {
-
-}
-
-#endif
diff --git a/editor/io_plugins/editor_sample_import_plugin.h b/editor/io_plugins/editor_sample_import_plugin.h
deleted file mode 100644
index 134868f8c2..0000000000
--- a/editor/io_plugins/editor_sample_import_plugin.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*************************************************************************/
-/* editor_sample_import_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef EDITOR_SAMPLE_IMPORT_PLUGIN_H
-#define EDITOR_SAMPLE_IMPORT_PLUGIN_H
-
-#if 0
-#include "editor/editor_import_export.h"
-#include "scene/resources/font.h"
-
-class EditorNode;
-class EditorSampleImportDialog;
-
-class EditorSampleImportPlugin : public EditorImportPlugin {
-
- GDCLASS(EditorSampleImportPlugin,EditorImportPlugin);
-
- EditorSampleImportDialog *dialog;
- void _compress_ima_adpcm(const Vector<float>& p_data,PoolVector<uint8_t>& dst_data);
-public:
-
- static EditorSampleImportPlugin *singleton;
-
- virtual String get_name() const;
- virtual String get_visible_name() const;
- virtual void import_dialog(const String& p_from="");
- virtual Error import(const String& p_path, const Ref<ResourceImportMetadata>& p_from);
- void import_from_drop(const Vector<String>& p_drop, const String &p_dest_path);
- virtual void reimport_multiple_files(const Vector<String>& p_list);
- virtual bool can_reimport_multiple_files() const;
-
-
- EditorSampleImportPlugin(EditorNode* p_editor);
-};
-
-class EditorSampleExportPlugin : public EditorExportPlugin {
-
- GDCLASS( EditorSampleExportPlugin, EditorExportPlugin);
-
-
-public:
-
- virtual Vector<uint8_t> custom_export(String& p_path,const Ref<EditorExportPlatform> &p_platform);
-
- EditorSampleExportPlugin();
-};
-
-#endif // EDITOR_SAMPLE_IMPORT_PLUGIN_H
-#endif
diff --git a/editor/io_plugins/editor_scene_import_plugin.cpp b/editor/io_plugins/editor_scene_import_plugin.cpp
deleted file mode 100644
index 1890ca906a..0000000000
--- a/editor/io_plugins/editor_scene_import_plugin.cpp
+++ /dev/null
@@ -1,2998 +0,0 @@
-/*************************************************************************/
-/* editor_scene_import_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "editor_scene_import_plugin.h"
-#if 0
-#include "editor/create_dialog.h"
-#include "editor/editor_node.h"
-#include "io/resource_saver.h"
-#include "os/file_access.h"
-#include "os/os.h"
-#include "project_settings.h"
-#include "scene/3d/body_shape.h"
-#include "scene/3d/mesh_instance.h"
-#include "scene/3d/navigation.h"
-#include "scene/3d/path.h"
-#include "scene/3d/physics_body.h"
-#include "scene/3d/portal.h"
-#include "scene/3d/room_instance.h"
-#include "scene/3d/vehicle_body.h"
-#include "scene/animation/animation_player.h"
-#include "scene/resources/box_shape.h"
-#include "scene/resources/packed_scene.h"
-#include "scene/resources/sphere_shape.h"
-#include <scene/resources/box_shape.h>
-#include <scene/resources/plane_shape.h>
-#include <scene/resources/ray_shape.h>
-
-
-
-
-EditorSceneImporter::EditorSceneImporter() {
-
-
-}
-
-void EditorScenePostImport::_bind_methods() {
-
- BIND_VMETHOD( MethodInfo("post_import",PropertyInfo(Variant::OBJECT,"scene")) );
-
-}
-
-Node *EditorScenePostImport::post_import(Node* p_scene) {
-
- if (get_script_instance())
- return get_script_instance()->call("post_import",p_scene);
-
- return p_scene;
-}
-
-EditorScenePostImport::EditorScenePostImport() {
-
-
-}
-
-
-/////////////////////////////
-
-
-class EditorImportAnimationOptions : public VBoxContainer {
-
- GDCLASS( EditorImportAnimationOptions, VBoxContainer );
-
-
-
- TreeItem *fps;
- TreeItem* optimize_linear_error;
- TreeItem* optimize_angular_error;
- TreeItem* optimize_max_angle;
-
- TreeItem *clips_base;
-
- TextEdit *filters;
- Vector<TreeItem*> clips;
-
- Tree *flags;
- Tree *clips_tree;
- Tree *optimization_tree;
- Vector<TreeItem*> items;
-
-
- bool updating;
- bool validating;
-
-
-
- void _changed();
- void _item_edited();
- void _button_action(Object *p_obj,int p_col,int p_id);
-
-protected:
- static void _bind_methods();
- void _notification(int p_what);
-
-public:
-
- void set_flags(uint32_t p_flags);
- uint32_t get_flags() const;
-
- void set_fps(int p_fps);
- int get_fps() const;
-
- void set_optimize_linear_error(float p_error);
- float get_optimize_linear_error() const;
-
- void set_optimize_angular_error(float p_error);
- float get_optimize_angular_error() const;
-
- void set_optimize_max_angle(float p_error);
- float get_optimize_max_angle() const;
-
- void setup_clips(const Array& p_clips);
- Array get_clips() const;
-
- void set_filter(const String& p_filter);
- String get_filter() const;
-
- EditorImportAnimationOptions();
-
-
-};
-
-////////////////////////////
-
-class EditorSceneImportDialog : public ConfirmationDialog {
-
- GDCLASS(EditorSceneImportDialog,ConfirmationDialog);
-
-
- struct FlagInfo {
- int value;
- const char *category;
- const char *text;
- bool defval;
- };
-
- static const FlagInfo scene_flag_names[];
-
- EditorImportTextureOptions *texture_options;
- EditorImportAnimationOptions *animation_options;
-
- EditorSceneImportPlugin *plugin;
-
- EditorNode *editor;
-
- LineEdit *import_path;
- LineEdit *save_path;
- LineEdit *script_path;
- Tree *import_options;
- EditorFileDialog *file_select;
- EditorFileDialog *script_select;
- EditorDirDialog *save_select;
- OptionButton *texture_action;
- CreateDialog *root_type_choose;
- LineEdit *root_node_name;
-
- ConfirmationDialog *confirm_open;
-
- ConfirmationDialog *confirm_import;
- RichTextLabel *missing_files;
-
- Vector<TreeItem*> scene_flags;
-
- Map<Ref<Mesh>,Ref<Shape> > collision_map;
- ConfirmationDialog *error_dialog;
-
- Button *root_type;
- CheckBox *root_default;
-
-
- void _root_default_pressed();
- void _root_type_pressed();
- void _set_root_type();
-
- void _choose_file(const String& p_path);
- void _choose_save_file(const String& p_path);
- void _choose_script(const String& p_path);
- void _browse();
- void _browse_target();
- void _browse_script();
- void _import(bool p_and_open=false);
- void _import_confirm();
-
- Ref<ResourceImportMetadata> wip_rimd;
- Node *wip_import;
- String wip_save_file;
- bool wip_blocked;
- bool wip_open;
-
- void _dialog_hid();
- void _open_and_import();
-
-
-protected:
-
- void _notification(int p_what);
- static void _bind_methods();
-public:
-
- void setup_popup(const String& p_from,const String& p_to_path) {
- _choose_file(p_from);
- _choose_save_file(p_to_path);
- }
-
- Error import(const String& p_from, const String& p_to, const String& p_preset);
- void popup_import(const String& p_from);
- EditorSceneImportDialog(EditorNode *p_editor,EditorSceneImportPlugin *p_plugin);
-};
-
-///////////////////////////////////
-
-
-static const char *anim_flag_names[]={
- "Detect Loop (-loop,-cycle)",
- "Keep Value Tracks",
- "Optimize",
- "Force All Tracks in All Clips",
- NULL
-};
-
-static const char *anim_flag_descript[]={
- "Set loop flag for animation names that\ncontain 'cycle' or 'loop' in the name.",
- "When merging an existing aimation,\nkeep the user-created value-tracks.",
- "Remove redundant keyframes in\n transform tacks.",
- "Some exporters will rely on default pose for some bones.\nThis forces those bones to have at least one animation key.",
- NULL
-};
-
-
-
-void EditorImportAnimationOptions::set_flags(uint32_t p_flags){
-
- updating=true;
- for(int i=0;i<items.size();i++) {
-
- items[i]->set_checked(0,p_flags&(1<<i));
- }
- updating=false;
-
-}
-uint32_t EditorImportAnimationOptions::get_flags() const{
-
- uint32_t f=0;
- for(int i=0;i<items.size();i++) {
-
- if (items[i]->is_checked(0))
- f|=(1<<i);
- }
-
- return f;
-}
-
-
-void EditorImportAnimationOptions::_changed() {
-
- if (updating)
- return;
- emit_signal("changed");
-}
-
-
-void EditorImportAnimationOptions::_button_action(Object *p_obj,int p_col,int p_id) {
-
- memdelete(p_obj);
-
-}
-
-
-void EditorImportAnimationOptions::_item_edited() {
-
- if (validating)
- return;
-
- if (clips.size()==0)
- return;
- validating=true;
- print_line("edited");
- TreeItem *item = clips_tree->get_edited();
- if (item==clips[clips.size()-1]) {
- //add new
- print_line("islast");
- if (item->get_text(0).find("<")!=-1 || item->get_text(0).find(">")!=-1) {
- validating=false;
- return; //fuckit
- }
-
- item->set_editable(1,true);
- item->set_editable(2,true);
- item->add_button(0,EditorNode::get_singleton()->get_gui_base()->get_icon("Del","EditorIcons"));
- item->set_cell_mode(1,TreeItem::CELL_MODE_RANGE);
- item->set_range_config(1,0,3600,0.01);
- item->set_range(1,0);
- item->set_editable(1,true);
- item->set_cell_mode(2,TreeItem::CELL_MODE_RANGE);
- item->set_range_config(2,0,3600,0.01);
- item->set_range(2,0);
- item->set_cell_mode(3,TreeItem::CELL_MODE_CHECK);
- item->set_editable(3,true);
-
- TreeItem *newclip = clips_tree->create_item(clips_base);
- newclip->set_text(0,"<new clip>");
- newclip->set_editable(0,true);
- newclip->set_editable(1,false);
- newclip->set_editable(2,false);
- clips.push_back(newclip);
-
-
-
- }
-
-
- //make name unique JUST IN CASE
- String name = item->get_text(0);
- name=name.replace("/","_").replace(":","_").strip_edges();
- if (name=="")
- name=TTR("New Clip");
-
- if (clips.size()>2) {
- int index=1;
- while(true) {
- bool valid = true;
- String try_name=name;
- if (index>1)
- try_name+=" "+itos(index);
-
- for(int i=0;i<clips.size()-1;i++) {
-
- if (clips[i]==item)
- continue;
- if (clips[i]->get_text(0)==try_name) {
- index++;
- valid=false;
- break;
- }
- }
-
- if (valid) {
- name=try_name;
- break;
- }
-
- }
- }
-
- if (item->get_text(0)!=name)
- item->set_text(0,name);
-
- validating=false;
-
-}
-
-void EditorImportAnimationOptions::_bind_methods() {
-
- ClassDB::bind_method("_changed",&EditorImportAnimationOptions::_changed);
- ClassDB::bind_method("_item_edited",&EditorImportAnimationOptions::_item_edited);
- ClassDB::bind_method("_button_action",&EditorImportAnimationOptions::_button_action);
- //ClassDB::bind_method("_changedp",&EditorImportAnimationOptions::_changedp);
-
- ADD_SIGNAL(MethodInfo("changed"));
-}
-
-
-void EditorImportAnimationOptions::_notification(int p_what) {
-
- if (p_what==NOTIFICATION_ENTER_TREE) {
-
- flags->connect("item_edited",this,"_changed");
- clips_tree->connect("item_edited",this,"_item_edited");
- clips_tree->connect("button_pressed",this,"_button_action",varray(),CONNECT_DEFERRED);
- //format->connect("item_selected",this,"_changedp");
- }
-}
-
-
-Array EditorImportAnimationOptions::get_clips() const {
-
- Array arr;
- for(int i=0;i<clips.size()-1;i++) {
-
- arr.push_back(clips[i]->get_text(0));
- arr.push_back(clips[i]->get_range(1));
- arr.push_back(clips[i]->get_range(2));
- arr.push_back(clips[i]->is_checked(3));
- }
-
- return arr;
-}
-
-
-void EditorImportAnimationOptions::setup_clips(const Array& p_clips) {
-
- ERR_FAIL_COND(p_clips.size()%4!=0);
- for(int i=0;i<clips.size();i++) {
-
- memdelete(clips[i]);
- }
-
-
- clips.clear();
-
- for(int i=0;i<p_clips.size();i+=4) {
-
- TreeItem *clip = clips_tree->create_item(clips_base);
- clip->set_text(0,p_clips[i]);
- clip->add_button(0,EditorNode::get_singleton()->get_gui_base()->get_icon("Del","EditorIcons"));
- clip->set_editable(0,true);
- clip->set_cell_mode(1,TreeItem::CELL_MODE_RANGE);
- clip->set_range_config(1,0,3600,0.01);
- clip->set_range(1,p_clips[i+1]);
- clip->set_editable(1,true);
- clip->set_cell_mode(2,TreeItem::CELL_MODE_RANGE);
- clip->set_range_config(2,0,3600,0.01);
- clip->set_range(2,p_clips[i+2]);
- clip->set_editable(2,true);
- clip->set_cell_mode(3,TreeItem::CELL_MODE_CHECK);
- clip->set_editable(3,true);
- clip->set_checked(3,p_clips[i+3]);
- clips.push_back(clip);
-
- }
-
- TreeItem *newclip = clips_tree->create_item(clips_base);
- newclip->set_text(0,"<new clip>");
- newclip->set_editable(0,true);
- newclip->set_editable(1,false);
- newclip->set_editable(2,false);
- newclip->set_editable(3,false);
- clips.push_back(newclip);
-
-}
-
-
-EditorImportAnimationOptions::EditorImportAnimationOptions() {
-
-
- updating=false;
- validating=false;
-
- TabContainer *tab= memnew(TabContainer);
- add_margin_child(TTR("Animation Options"),tab,true);
-
- flags = memnew( Tree );
- flags->set_hide_root(true);
- tab->add_child(flags);
- flags->set_name(TTR("Flags"));
- TreeItem *root = flags->create_item();
-
- const char ** fname=anim_flag_names;
- const char ** fdescr=anim_flag_descript;
-
- while( *fname ) {
-
- TreeItem*ti = flags->create_item(root);
- ti->set_cell_mode(0,TreeItem::CELL_MODE_CHECK);
- ti->set_text(0,*fname);
- ti->set_editable(0,true);
- ti->set_tooltip(0,*fdescr);
- items.push_back(ti);
- fname++;
- fdescr++;
- }
-
-
- TreeItem *fps_base = flags->create_item(root);
- fps_base->set_text(0,TTR("Bake FPS:"));
- fps_base->set_editable(0,false);
- fps = flags->create_item(fps_base);
- fps->set_cell_mode(0,TreeItem::CELL_MODE_RANGE);
- fps->set_editable(0,true);
- fps->set_range_config(0,1,120,1);
- fps->set_range(0,15);
-
- optimization_tree = memnew( Tree );
- optimization_tree->set_columns(2);
- tab->add_child(optimization_tree);
- optimization_tree->set_name(TTR("Optimizer"));
- optimization_tree->set_column_expand(0,true);
- optimization_tree->set_column_expand(1,false);
- optimization_tree->set_column_min_width(1,80);
- optimization_tree->set_hide_root(true);
-
-
- TreeItem *optimize_root = optimization_tree->create_item();
-
- optimize_linear_error = optimization_tree->create_item(optimize_root);
- optimize_linear_error->set_text(0,TTR("Max Linear Error"));
- optimize_linear_error->set_cell_mode(1,TreeItem::CELL_MODE_RANGE);
- optimize_linear_error->set_editable(1,true);
- optimize_linear_error->set_range_config(1,0,1,0.001);
- optimize_linear_error->set_range(1,0.05);
-
- optimize_angular_error = optimization_tree->create_item(optimize_root);
- optimize_angular_error->set_text(0,TTR("Max Angular Error"));
- optimize_angular_error->set_cell_mode(1,TreeItem::CELL_MODE_RANGE);
- optimize_angular_error->set_editable(1,true);
- optimize_angular_error->set_range_config(1,0,1,0.001);
- optimize_angular_error->set_range(1,0.01);
-
- optimize_max_angle = optimization_tree->create_item(optimize_root);
- optimize_max_angle->set_text(0,TTR("Max Angle"));
- optimize_max_angle->set_cell_mode(1,TreeItem::CELL_MODE_RANGE);
- optimize_max_angle->set_editable(1,true);
- optimize_max_angle->set_range_config(1,0,360,0.001);
- optimize_max_angle->set_range(1,int(180*0.125));
-
- clips_tree = memnew( Tree );
- clips_tree->set_hide_root(true);
- tab->add_child(clips_tree);
- clips_tree->set_name(TTR("Clips"));
-
- clips_tree->set_columns(4);
- clips_tree->set_column_expand(0,1);
- clips_tree->set_column_expand(1,0);
- clips_tree->set_column_expand(2,0);
- clips_tree->set_column_expand(3,0);
- clips_tree->set_column_min_width(1,60);
- clips_tree->set_column_min_width(2,60);
- clips_tree->set_column_min_width(3,40);
- clips_tree->set_column_titles_visible(true);
- clips_tree->set_column_title(0,TTR("Name"));
- clips_tree->set_column_title(1,TTR("Start(s)"));
- clips_tree->set_column_title(2,TTR("End(s)"));
- clips_tree->set_column_title(3,TTR("Loop"));
- clips_base =clips_tree->create_item(0);
-
-
- setup_clips(Array());
-
-
- filters = memnew( TextEdit );
- tab->add_child(filters);
- filters->set_name(TTR("Filters"));
-}
-
-
-
-void EditorImportAnimationOptions::set_fps(int p_fps) {
-
- fps->set_range(0,p_fps);
-}
-
-int EditorImportAnimationOptions::get_fps() const {
-
- return fps->get_range(0);
-}
-
-
-void EditorImportAnimationOptions::set_optimize_linear_error(float p_optimize_linear_error) {
-
- optimize_linear_error->set_range(1,p_optimize_linear_error);
-}
-
-float EditorImportAnimationOptions::get_optimize_linear_error() const {
-
- return optimize_linear_error->get_range(1);
-}
-
-void EditorImportAnimationOptions::set_optimize_angular_error(float p_optimize_angular_error) {
-
- optimize_angular_error->set_range(1,p_optimize_angular_error);
-}
-
-float EditorImportAnimationOptions::get_optimize_angular_error() const {
-
- return optimize_angular_error->get_range(1);
-}
-
-void EditorImportAnimationOptions::set_optimize_max_angle(float p_optimize_max_angle) {
-
- optimize_max_angle->set_range(1,p_optimize_max_angle);
-}
-
-float EditorImportAnimationOptions::get_optimize_max_angle() const {
-
- return optimize_max_angle->get_range(1);
-}
-
-
-void EditorImportAnimationOptions::set_filter(const String& p_filter) {
-
- filters->set_text(p_filter);
-}
-
-String EditorImportAnimationOptions::get_filter() const {
-
- return filters->get_text();
-}
-
-
-
-
-
-////////////////////////////////////////////////////////
-
-
-
-void EditorSceneImportDialog::_choose_file(const String& p_path) {
-#if 0
- StringName sn = EditorImportDB::get_singleton()->find_source_path(p_path);
- if (sn!=StringName()) {
-
- EditorImportDB::ImportScene isc;
- if (EditorImportDB::get_singleton()->get_scene(sn,isc)==OK) {
-
- save_path->set_text(String(sn).get_base_dir());
- texture_options->set_flags( isc.image_flags );
- texture_options->set_quality( isc.image_quality );
- texture_options->set_format( isc.image_format );
- animation_options->set_flags( isc.anim_flags );
- script_path->set_text( isc.import_script );
- uint32_t f = isc.flags;
- for(int i=0;i<scene_flags.size();i++) {
-
- scene_flags[i]->set_checked(0,f&(1<<i));
- }
- }
- } else {
-#endif
- save_path->set_text("");
- root_node_name->set_text("");
- //save_path->set_text(p_path.get_file().basename()+".scn");
-#if 0
- }
-#endif
-
- if (p_path!=String()) {
-
- String from_path = EditorFileSystem::get_singleton()->find_resource_from_source(EditorImportPlugin::validate_source_path(p_path));
- print_line("from path.."+from_path);
- if (from_path!=String()) {
- popup_import(from_path);
-
- }
- }
-
-
- import_path->set_text(p_path);
- if (root_node_name->get_text().size()==0){
- root_node_name->set_text(import_path->get_text().get_file().get_basename());
- }
-
-}
-void EditorSceneImportDialog::_choose_save_file(const String& p_path) {
-
- save_path->set_text(p_path);
-}
-
-void EditorSceneImportDialog::_choose_script(const String& p_path) {
-
- String p = ProjectSettings::get_singleton()->localize_path(p_path);
- if (!p.is_resource_file())
- p=ProjectSettings::get_singleton()->get_resource_path().path_to(p_path.get_base_dir())+p_path.get_file();
- script_path->set_text(p);
-
-}
-
-
-void EditorSceneImportDialog::_open_and_import() {
-
- bool unsaved=EditorNode::has_unsaved_changes();
-
- if (unsaved) {
-
- confirm_open->popup_centered_minsize(Size2(300,80)*EDSCALE);
- } else {
- _import(true);
- }
-}
-
-void EditorSceneImportDialog::_import(bool p_and_open) {
-
- wip_open=p_and_open;
-//' ImportMonitorBlock imb;
-
-
- if (import_path->get_text().strip_edges()=="") {
- error_dialog->set_text(TTR("Source path is empty."));
- error_dialog->popup_centered_minsize();
- return;
- }
-
- if (save_path->get_text().strip_edges()=="") {
- error_dialog->set_text(TTR("Target path is empty."));
- error_dialog->popup_centered_minsize();
- return;
- }
-
- if (!save_path->get_text().begins_with("res://")) {
- error_dialog->set_text(TTR("Target path must be a complete resource path."));
- error_dialog->popup_centered_minsize();
- return;
- }
-
- if (!DirAccess::exists(save_path->get_text())) {
- error_dialog->set_text(TTR("Target path must exist."));
- error_dialog->popup_centered_minsize();
- return;
- }
-
- String dst_path;
-
- if (texture_action->get_selected()==0)
- dst_path=save_path->get_text();//.get_base_dir();
- else
- dst_path=ProjectSettings::get_singleton()->get("import/shared_textures");
-
- uint32_t flags=0;
-
- for(int i=0;i<scene_flags.size();i++) {
-
- if (scene_flags[i]->is_checked(0)) {
- int md = scene_flags[i]->get_metadata(0);
- flags|=md;
- }
- }
-
-
-
-
-
- if (script_path->get_text()!="") {
- Ref<Script> scr = ResourceLoader::load(script_path->get_text());
- if (!scr.is_valid()) {
- error_dialog->set_text(TTR("Couldn't load post-import script."));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
- }
-
- Ref<EditorScenePostImport> pi = Ref<EditorScenePostImport>( memnew( EditorScenePostImport ) );
- pi->set_script(scr.get_ref_ptr());
- if (!pi->get_script_instance()) {
-
- error_dialog->set_text(TTR("Invalid/broken script for post-import."));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
- }
-
- }
-
-
- // Scenes should always be imported as binary format since vertex data is large and would take
- // up a lot of space and time to load if imported as text format (GH-5778)
- String save_file = save_path->get_text().plus_file(import_path->get_text().get_file().get_basename()+".scn");
- print_line("Saving to: "+save_file);
-
-
-
-
-
- Node *scene=NULL;
-
-
- Ref<ResourceImportMetadata> rim = memnew( ResourceImportMetadata );
-
- rim->add_source(EditorImportPlugin::validate_source_path(import_path->get_text()));
- rim->set_option("flags",flags);
- print_line("GET FLAGS: "+itos(texture_options->get_flags()));
- rim->set_option("texture_flags",texture_options->get_flags());
- rim->set_option("texture_format",texture_options->get_format());
- rim->set_option("texture_quality",texture_options->get_quality());
- rim->set_option("animation_flags",animation_options->get_flags());
- rim->set_option("animation_bake_fps",animation_options->get_fps());
- rim->set_option("animation_optimizer_linear_error",animation_options->get_optimize_linear_error());
- rim->set_option("animation_optimizer_angular_error",animation_options->get_optimize_angular_error());
- rim->set_option("animation_optimizer_max_angle",animation_options->get_optimize_max_angle());
- rim->set_option("animation_filters",animation_options->get_filter());
- rim->set_option("animation_clips",animation_options->get_clips());
- rim->set_option("post_import_script",script_path->get_text());
- rim->set_option("reimport",true);
- if (!root_default->is_pressed()) {
- rim->set_option("root_type",root_type->get_text());
- }
- if (root_node_name->get_text().size()==0) {
- root_node_name->set_text(import_path->get_text().get_file().get_basename());
- }
- rim->set_option("root_name",root_node_name->get_text());
-
- List<String> missing;
- Error err = plugin->import1(rim,&scene,&missing);
-
- if (err || !scene) {
-
- error_dialog->set_text(TTR("Error importing scene."));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
- }
-
- if (missing.size()) {
-
- missing_files->clear();
- for(List<String>::Element *E=missing.front();E;E=E->next()) {
-
- missing_files->add_text(E->get());
- missing_files->add_newline();
- }
- wip_import=scene;
- wip_rimd=rim;
- wip_save_file=save_file;
- confirm_import->popup_centered_ratio();
- return;
-
- } else {
-
- err = plugin->import2(scene,save_file,rim);
-
- if (err) {
-
- error_dialog->set_text(TTR("Error importing scene."));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
- }
- if (wip_open)
- EditorNode::get_singleton()->load_scene(save_file,false,false,false);
-
- }
-
- hide();
-
- /*
- editor->clear_scene();
-
- Error err = EditorImport::import_scene(import_path->get_text(),save_file,dst_path,flags,texture_options->get_format(),compression,texture_options->get_flags(),texture_options->get_quality(),animation_options->get_flags(), &scene,pi);
-
- if (err) {
-
- error_dialog->set_text("Error importing scene.");
- error_dialog->popup_centered(Size2(200,100));
- return;
- }
-
- editor->save_import_export();
- if (scene)
- editor->set_edited_scene(scene);
-
- hide();
- */
-};
-
-
-void EditorSceneImportDialog::_import_confirm() {
-
- wip_blocked=true;
- print_line("import confirm!");
- Error err = plugin->import2(wip_import,wip_save_file,wip_rimd);
- wip_blocked=false;
- wip_import=NULL;
- wip_rimd=Ref<ResourceImportMetadata>();
- confirm_import->hide();
- if (err) {
-
- wip_save_file="";
- error_dialog->set_text(TTR("Error importing scene."));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
- }
-
- if (wip_open)
- EditorNode::get_singleton()->load_scene(wip_save_file,false,false,false);
- wip_open=false;
- wip_save_file="";
-
- hide();
-
-}
-
-
-void EditorSceneImportDialog::_browse() {
-
- file_select->popup_centered_ratio();
-}
-
-void EditorSceneImportDialog::_browse_target() {
-
- save_select->popup_centered_ratio();
- if (save_path->get_text()!="")
- save_select->set_current_path(save_path->get_text());
-
-}
-
-void EditorSceneImportDialog::_browse_script() {
-
- script_select->popup_centered_ratio();
-
-}
-
-void EditorSceneImportDialog::popup_import(const String &p_from) {
-
- popup_centered(Size2(750,550)*EDSCALE);
- if (p_from!="") {
- Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_from);
- if (rimd.is_null())
- return;
-
- int flags = rimd->get_option("flags");
-
- for(int i=0;i<scene_flags.size();i++) {
-
- int md = scene_flags[i]->get_metadata(0);
- scene_flags[i]->set_checked(0,flags&md);
- }
-
- texture_options->set_flags(rimd->get_option("texture_flags"));
- texture_options->set_format(EditorTextureImportPlugin::ImageFormat(int(rimd->get_option("texture_format"))));
- texture_options->set_quality(rimd->get_option("texture_quality"));
- animation_options->set_flags(rimd->get_option("animation_flags"));
- if (rimd->has_option("animation_clips"))
- animation_options->setup_clips(rimd->get_option("animation_clips"));
- if (rimd->has_option("animation_filters"))
- animation_options->set_filter(rimd->get_option("animation_filters"));
- if (rimd->has_option("animation_bake_fps"))
- animation_options->set_fps(rimd->get_option("animation_bake_fps"));
- if (rimd->has_option("animation_optimizer_linear_error"))
- animation_options->set_optimize_linear_error(rimd->get_option("animation_optimizer_linear_error"));
- if (rimd->has_option("animation_optimizer_angular_error"))
- animation_options->set_optimize_angular_error(rimd->get_option("animation_optimizer_angular_error"));
- if (rimd->has_option("animation_optimizer_max_angle"))
- animation_options->set_optimize_max_angle(rimd->get_option("animation_optimizer_max_angle"));
-
- if (rimd->has_option("root_type")) {
- root_default->set_pressed(false);
- String type = rimd->get_option("root_type");
- root_type->set_text(type);
- root_type->set_disabled(false);
-
- if (has_icon(type,"EditorIcons")) {
- root_type->set_icon(get_icon(type,"EditorIcons"));
- } else {
- root_type->set_icon(get_icon("Object","EditorIcons"));
- }
-
- } else {
- root_default->set_pressed(true);
- root_type->set_disabled(true);
- }
- if (rimd->has_option("root_name")) {
- root_node_name->set_text(rimd->get_option("root_name"));
- } else {
- root_node_name->set_text(root_type->get_text()); // backward compatibility for 2.1 or before
- }
- script_path->set_text(rimd->get_option("post_import_script"));
-
- save_path->set_text(p_from.get_base_dir());
- import_path->set_text(EditorImportPlugin::expand_source_path(rimd->get_source_path(0)));
-
- }
-}
-
-
-void EditorSceneImportDialog::_notification(int p_what) {
-
-
- if (p_what==NOTIFICATION_ENTER_TREE) {
-
-
- List<String> extensions;
- file_select->clear_filters();
- root_type->set_icon(get_icon("Spatial","EditorIcons"));
- root_type->set_text("Spatial");
- root_type->set_disabled(true);
-
- for(int i=0;i<plugin->get_importers().size();i++) {
- plugin->get_importers()[i]->get_extensions(&extensions);
- }
-
-
- for(int i=0;i<extensions.size();i++) {
-
- file_select->add_filter("*."+extensions[i]+" ; "+extensions[i].to_upper());
- }
-
- extensions.clear();
-
- //EditorImport::get_import_extensions(&extensions)
- /* ResourceLoader::get_recognized_extensions_for_type("PackedScene",&extensions);
- save_select->clear_filters();
- for(int i=0;i<extensions.size();i++) {
-
- save_select->add_filter("*."+extensions[i]+" ; "+extensions[i].to_upper());
- }*/
-
-
- }
-}
-
-Error EditorSceneImportDialog::import(const String& p_from, const String& p_to, const String& p_preset) {
-
- import_path->set_text(p_from);
- save_path->set_text(p_to);
- script_path->set_text(p_preset);
-
- _import();
-
-
-
- return OK;
-}
-
-void EditorSceneImportDialog::_dialog_hid() {
-
- if (wip_blocked)
- return;
- print_line("DIALOGHID!");
- if (wip_import) {
- memdelete(wip_import);
- wip_import=NULL;
- wip_save_file="";
- wip_rimd=Ref<ResourceImportMetadata>();
- }
-}
-void EditorSceneImportDialog::_root_default_pressed() {
-
- root_type->set_disabled(root_default->is_pressed());
-}
-
-void EditorSceneImportDialog::_root_type_pressed() {
-
-
- root_type_choose->popup(false);
-}
-
-
-void EditorSceneImportDialog::_set_root_type() {
-
- String type = root_type_choose->get_selected_type();
- if (type==String())
- return;
- root_type->set_text(type);
- if (has_icon(type,"EditorIcons")) {
- root_type->set_icon(get_icon(type,"EditorIcons"));
- } else {
- root_type->set_icon(get_icon("Object","EditorIcons"));
- }
-}
-
-void EditorSceneImportDialog::_bind_methods() {
-
-
- ClassDB::bind_method("_choose_file",&EditorSceneImportDialog::_choose_file);
- ClassDB::bind_method("_choose_save_file",&EditorSceneImportDialog::_choose_save_file);
- ClassDB::bind_method("_choose_script",&EditorSceneImportDialog::_choose_script);
- ClassDB::bind_method("_import",&EditorSceneImportDialog::_import,DEFVAL(false));
- ClassDB::bind_method("_browse",&EditorSceneImportDialog::_browse);
- ClassDB::bind_method("_browse_target",&EditorSceneImportDialog::_browse_target);
- ClassDB::bind_method("_browse_script",&EditorSceneImportDialog::_browse_script);
- ClassDB::bind_method("_dialog_hid",&EditorSceneImportDialog::_dialog_hid);
- ClassDB::bind_method("_import_confirm",&EditorSceneImportDialog::_import_confirm);
- ClassDB::bind_method("_open_and_import",&EditorSceneImportDialog::_open_and_import);
- ClassDB::bind_method("_root_default_pressed",&EditorSceneImportDialog::_root_default_pressed);
- ClassDB::bind_method("_root_type_pressed",&EditorSceneImportDialog::_root_type_pressed);
- ClassDB::bind_method("_set_root_type",&EditorSceneImportDialog::_set_root_type);
-
-
- ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
-}
-
-
-
-const EditorSceneImportDialog::FlagInfo EditorSceneImportDialog::scene_flag_names[]={
-
- {EditorSceneImportPlugin::SCENE_FLAG_REMOVE_NOIMP,("Actions"),"Remove Nodes (-noimp)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_IMPORT_ANIMATIONS,("Actions"),"Import Animations",true},
- {EditorSceneImportPlugin::SCENE_FLAG_COMPRESS_GEOMETRY,("Actions"),"Compress Geometry",false},
- {EditorSceneImportPlugin::SCENE_FLAG_GENERATE_TANGENT_ARRAYS,("Actions"),"Force Generation of Tangent Arrays",false},
- {EditorSceneImportPlugin::SCENE_FLAG_LINEARIZE_DIFFUSE_TEXTURES,("Actions"),"SRGB->Linear Of Diffuse Textures",false},
- {EditorSceneImportPlugin::SCENE_FLAG_CONVERT_NORMALMAPS_TO_XY,("Actions"),"Convert Normal Maps to XY",true},
- {EditorSceneImportPlugin::SCENE_FLAG_SET_LIGHTMAP_TO_UV2_IF_EXISTS,("Actions"),"Set Material Lightmap to UV2 if Tex2Array Exists",true},
- {EditorSceneImportPlugin::SCENE_FLAG_MERGE_KEEP_MATERIALS,("Merge"),"Keep Materials after first import (delete them for re-import).",true},
- {EditorSceneImportPlugin::SCENE_FLAG_MERGE_KEEP_EXTRA_ANIM_TRACKS,("Merge"),"Keep user-added Animation tracks.",true},
- {EditorSceneImportPlugin::SCENE_FLAG_DETECT_ALPHA,("Materials"),"Set Alpha in Materials (-alpha)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_DETECT_VCOLOR,("Materials"),"Set Vert. Color in Materials (-vcol)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_COLLISIONS,("Create"),"Create Collisions and/or Rigid Bodies (-col,-colonly,-rigid,-rigidonly)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_PORTALS,("Create"),"Create Portals (-portal)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_ROOMS,("Create"),"Create Rooms (-room)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_SIMPLIFY_ROOMS,("Create"),"Simplify Rooms",false},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_BILLBOARDS,("Create"),"Create Billboards (-bb)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_IMPOSTORS,("Create"),"Create Impostors (-imp:dist)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_LODS,("Create"),"Create LODs (-lod:dist)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_CARS,("Create"),"Create Vehicles (-vehicle)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_WHEELS,("Create"),"Create Vehicle Wheels (-wheel)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_NAVMESH,("Create"),"Create Navigation Meshes (-navmesh)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_DETECT_LIGHTMAP_LAYER,("Create"),"Detect LightMap Layer (-lm:<int>).",true},
- {-1,NULL,NULL,false}
-};
-
-
-EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSceneImportPlugin *p_plugin) {
-
-
- editor=p_editor;
- plugin=p_plugin;
-
- set_title(TTR("Import 3D Scene"));
- HBoxContainer *import_hb = memnew( HBoxContainer );
- add_child(import_hb);
- //set_child_rect(import_hb);
-
- VBoxContainer *vbc = memnew( VBoxContainer );
- import_hb->add_child(vbc);
- vbc->set_h_size_flags(SIZE_EXPAND_FILL);
-
- HBoxContainer *hbc = memnew( HBoxContainer );
- vbc->add_margin_child(TTR("Source Scene:"),hbc);
-
- import_path = memnew( LineEdit );
- import_path->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc->add_child(import_path);
-
- Button * import_choose = memnew( Button );
- import_choose->set_text(" .. ");
- hbc->add_child(import_choose);
-
- import_choose->connect("pressed", this,"_browse");
-
- hbc = memnew( HBoxContainer );
- vbc->add_margin_child(TTR("Target Path:"),hbc);
-
- save_path = memnew( LineEdit );
- save_path->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc->add_child(save_path);
-
- Button * save_choose = memnew( Button );
- save_choose->set_text(" .. ");
- hbc->add_child(save_choose);
-
- save_choose->connect("pressed", this,"_browse_target");
-
- texture_action = memnew( OptionButton );
- texture_action->add_item(TTR("Same as Target Scene"));
- texture_action->add_item(TTR("Shared"));
- texture_action->select(0);
- vbc->add_margin_child(TTR("Target Texture Folder:"),texture_action);
-
- import_options = memnew( Tree );
- vbc->set_v_size_flags(SIZE_EXPAND_FILL);
- vbc->add_margin_child(TTR("Options:"),import_options,true);
-
- file_select = memnew(EditorFileDialog);
- file_select->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
- add_child(file_select);
-
-
- file_select->set_mode(EditorFileDialog::MODE_OPEN_FILE);
-
- file_select->connect("file_selected", this,"_choose_file");
-
- save_select = memnew(EditorDirDialog);
- add_child(save_select);
-
- //save_select->set_mode(EditorFileDialog::MODE_SAVE_FILE);
- save_select->connect("dir_selected", this,"_choose_save_file");
-
- get_ok()->connect("pressed", this,"_import");
- get_ok()->set_text(TTR("Import"));
-
- TreeItem *root = import_options->create_item(NULL);
- import_options->set_hide_root(true);
-
- const FlagInfo* fn=scene_flag_names;
-
- Map<String,TreeItem*> categories;
-
- while(fn->text) {
-
- String cat = fn->category;
- TreeItem *parent;
- if (!categories.has(cat)) {
- parent = import_options->create_item(root);
- parent->set_text(0,cat);
- categories[cat]=parent;
- } else {
- parent=categories[cat];
- }
-
- TreeItem *opt = import_options->create_item(parent);
- opt->set_cell_mode(0,TreeItem::CELL_MODE_CHECK);
- opt->set_checked(0,fn->defval);
- opt->set_editable(0,true);
- opt->set_text(0,fn->text);
- opt->set_metadata(0,fn->value);
-
- scene_flags.push_back(opt);
- fn++;
- }
-
- hbc = memnew( HBoxContainer );
- vbc->add_margin_child(TTR("Post-Process Script:"),hbc);
-
- script_path = memnew( LineEdit );
- script_path->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc->add_child(script_path);
-
- Button * script_choose = memnew( Button );
- script_choose->set_text(" .. ");
- hbc->add_child(script_choose);
-
- script_choose->connect("pressed", this,"_browse_script");
-
- script_select = memnew(EditorFileDialog);
- add_child(script_select);
- for(int i=0;i<ScriptServer::get_language_count();i++) {
-
- ScriptLanguage *sl=ScriptServer::get_language(i);
- String ext = sl->get_extension();
- if (ext=="")
- continue;
- script_select->add_filter("*."+ext+" ; "+sl->get_name());
- }
-
-
- script_select->set_mode(EditorFileDialog::MODE_OPEN_FILE);
-
- script_select->connect("file_selected", this,"_choose_script");
-
- error_dialog = memnew ( ConfirmationDialog );
- add_child(error_dialog);
- error_dialog->get_ok()->set_text(TTR("Accept"));
- //error_dialog->get_cancel()->hide();
-
-
- HBoxContainer *custom_root_hb = memnew( HBoxContainer );
- vbc->add_margin_child(TTR("Custom Root Node Type:"),custom_root_hb);
- root_type = memnew(Button);
- root_type->set_h_size_flags(SIZE_EXPAND_FILL);
- root_type->set_text_align(Button::ALIGN_LEFT);
- root_type->connect("pressed",this,"_root_type_pressed");
- custom_root_hb->add_child(root_type);
-
- root_default = memnew(CheckBox);
- root_default->set_text(TTR("Auto"));
- root_default->set_pressed(true);
- root_default->connect("pressed",this,"_root_default_pressed");
- custom_root_hb->add_child(root_default);
-
- root_node_name = memnew( LineEdit );
- root_node_name->set_h_size_flags(SIZE_EXPAND_FILL);
- vbc->add_margin_child(TTR("Root Node Name:"),root_node_name);
- /*
- this_import = memnew( OptionButton );
- this_import->add_item("Overwrite Existing Scene");
- this_import->add_item("Overwrite Existing, Keep Materials");
- this_import->add_item("Keep Existing, Merge with New");
- this_import->add_item("Keep Existing, Ignore New");
- vbc->add_margin_child("This Time:",this_import);
-
- next_import = memnew( OptionButton );
- next_import->add_item("Overwrite Existing Scene");
- next_import->add_item("Overwrite Existing, Keep Materials");
- next_import->add_item("Keep Existing, Merge with New");
- next_import->add_item("Keep Existing, Ignore New");
- vbc->add_margin_child("Next Time:",next_import);
-*/
- set_hide_on_ok(false);
-
- GLOBAL_DEF("import/shared_textures","res://");
- ProjectSettings::get_singleton()->set_custom_property_info("import/shared_textures",PropertyInfo(Variant::STRING,"import/shared_textures",PROPERTY_HINT_DIR));
-
- import_hb->add_constant_override("separation",30);
-
-
- VBoxContainer *ovb = memnew( VBoxContainer);
- ovb->set_h_size_flags(SIZE_EXPAND_FILL);
- import_hb->add_child(ovb);
-
- texture_options = memnew( EditorImportTextureOptions );
- ovb->add_child(texture_options);
- texture_options->set_v_size_flags(SIZE_EXPAND_FILL);
- //animation_options->set_flags(EditorImport::
- texture_options->set_format(EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_RAM);
- texture_options->set_flags( EditorTextureImportPlugin::IMAGE_FLAG_FIX_BORDER_ALPHA | EditorTextureImportPlugin::IMAGE_FLAG_REPEAT | EditorTextureImportPlugin::IMAGE_FLAG_FILTER );
-
-
- animation_options = memnew( EditorImportAnimationOptions );
- ovb->add_child(animation_options);
- animation_options->set_v_size_flags(SIZE_EXPAND_FILL);
- animation_options->set_flags(EditorSceneAnimationImportPlugin::ANIMATION_DETECT_LOOP|EditorSceneAnimationImportPlugin::ANIMATION_KEEP_VALUE_TRACKS|EditorSceneAnimationImportPlugin::ANIMATION_OPTIMIZE|EditorSceneAnimationImportPlugin::ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS);
-
-
- confirm_import = memnew( ConfirmationDialog );
- add_child(confirm_import);
- VBoxContainer *cvb = memnew( VBoxContainer );
- confirm_import->add_child(cvb);
- //confirm_import->set_child_rect(cvb);
-
- PanelContainer *pc = memnew( PanelContainer );
- pc->add_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_stylebox("normal","TextEdit"));
- //ec->add_child(pc);
- missing_files = memnew( RichTextLabel );
- cvb->add_margin_child(TTR("The Following Files are Missing:"),pc,true);
- pc->add_child(missing_files);
- confirm_import->get_ok()->set_text(TTR("Import Anyway"));
- confirm_import->get_cancel()->set_text(TTR("Cancel"));
- confirm_import->connect("popup_hide",this,"_dialog_hid");
- confirm_import->connect("confirmed",this,"_import_confirm");
- confirm_import->set_hide_on_ok(false);
-
- add_button(TTR("Import & Open"),!OS::get_singleton()->get_swap_ok_cancel())->connect("pressed",this,"_open_and_import");
-
- confirm_open = memnew( ConfirmationDialog );
- add_child(confirm_open);
- confirm_open->set_text(TTR("Edited scene has not been saved, open imported scene anyway?"));
- confirm_open->connect("confirmed",this,"_import",varray(true));
-
-
- wip_import=NULL;
- wip_blocked=false;
- wip_open=false;
- //texture_options->set_format(EditorImport::IMAGE_FORMAT_C);
-
- root_type_choose = memnew( CreateDialog );
- add_child(root_type_choose);
- root_type_choose->set_base_type("Node");
- root_type_choose->connect("create",this,"_set_root_type");
-}
-
-
-
-////////////////////////////////
-
-
-
-String EditorSceneImportPlugin::get_name() const {
-
- return "scene_3d";
-}
-
-String EditorSceneImportPlugin::get_visible_name() const{
-
- return TTR("Scene");
-}
-
-void EditorSceneImportPlugin::import_dialog(const String& p_from){
-
- dialog->popup_import(p_from);
-}
-
-
-//////////////////////////
-
-
-static bool _teststr(const String& p_what,const String& p_str) {
-
- if (p_what.findn("$"+p_str)!=-1) //blender and other stuff
- return true;
- if (p_what.to_lower().ends_with("-"+p_str)) //collada only supports "_" and "-" besides letters
- return true;
- if (p_what.to_lower().ends_with("_"+p_str)) //collada only supports "_" and "-" besides letters
- return true;
- return false;
-}
-
-static String _fixstr(const String& p_what,const String& p_str) {
-
- if (p_what.findn("$"+p_str)!=-1) //blender and other stuff
- return p_what.replace("$"+p_str,"");
- if (p_what.to_lower().ends_with("-"+p_str)) //collada only supports "_" and "-" besides letters
- return p_what.substr(0,p_what.length()-(p_str.length()+1));
- if (p_what.to_lower().ends_with("_"+p_str)) //collada only supports "_" and "-" besides letters
- return p_what.substr(0,p_what.length()-(p_str.length()+1));
- return p_what;
-}
-
-
-
-void EditorSceneImportPlugin::_find_resources(const Variant& p_var, Map<Ref<ImageTexture>, TextureRole> &image_map,int p_flags) {
-
-
- switch(p_var.get_type()) {
-
- case Variant::OBJECT: {
-
- Ref<Resource> res = p_var;
- if (res.is_valid()) {
-
- if (res->is_class("Texture") && !image_map.has(res)) {
-
- image_map.insert(res,TEXTURE_ROLE_DEFAULT);
-
-
- } else {
-
-
- List<PropertyInfo> pl;
- res->get_property_list(&pl);
- for(List<PropertyInfo>::Element *E=pl.front();E;E=E->next()) {
-
- if (E->get().type==Variant::OBJECT || E->get().type==Variant::ARRAY || E->get().type==Variant::DICTIONARY) {
- if (E->get().type==Variant::OBJECT && res->cast_to<SpatialMaterial>() && (E->get().name=="textures/diffuse" || E->get().name=="textures/detail" || E->get().name=="textures/emission")) {
-
- Ref<ImageTexture> tex =res->get(E->get().name);
- if (tex.is_valid()) {
-
- image_map.insert(tex,TEXTURE_ROLE_DIFFUSE);
- }
-
- } else if (E->get().type==Variant::OBJECT && res->cast_to<SpatialMaterial>() && (E->get().name=="textures/normal")) {
-
- Ref<ImageTexture> tex =res->get(E->get().name);
- if (tex.is_valid()) {
-
- image_map.insert(tex,TEXTURE_ROLE_NORMALMAP);
- /*
- if (p_flags&SCENE_FLAG_CONVERT_NORMALMAPS_TO_XY)
- res->cast_to<SpatialMaterial>()->set_fixed_flag(SpatialMaterial::FLAG_USE_XY_NORMALMAP,true);
- */
- }
-
-
- } else {
- _find_resources(res->get(E->get().name),image_map,p_flags);
- }
- }
- }
-
- }
- }
-
- } break;
- case Variant::DICTIONARY: {
-
- Dictionary d= p_var;
-
- List<Variant> keys;
- d.get_key_list(&keys);
-
- for(List<Variant>::Element *E=keys.front();E;E=E->next()) {
-
-
- _find_resources(E->get(),image_map,p_flags);
- _find_resources(d[E->get()],image_map,p_flags);
-
- }
-
-
- } break;
- case Variant::ARRAY: {
-
- Array a = p_var;
- for(int i=0;i<a.size();i++) {
-
- _find_resources(a[i],image_map,p_flags);
- }
-
- } break;
- default: {}
-
- }
-
-}
-
-
-Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>,Ref<Shape> > &collision_map,uint32_t p_flags,Map<Ref<ImageTexture>,TextureRole >& image_map) {
-
- // children first..
- for(int i=0;i<p_node->get_child_count();i++) {
-
-
- Node *r = _fix_node(p_node->get_child(i),p_root,collision_map,p_flags,image_map);
- if (!r) {
- print_line("was erased..");
- i--; //was erased
- }
- }
-
- String name = p_node->get_name();
-
- bool isroot = p_node==p_root;
-
-
- if (!isroot && p_flags&SCENE_FLAG_REMOVE_NOIMP && _teststr(name,"noimp")) {
-
- memdelete(p_node);
- return NULL;
- }
-
- {
-
- List<PropertyInfo> pl;
- p_node->get_property_list(&pl);
- for(List<PropertyInfo>::Element *E=pl.front();E;E=E->next()) {
-
- if (E->get().type==Variant::OBJECT || E->get().type==Variant::ARRAY || E->get().type==Variant::DICTIONARY) {
- _find_resources(p_node->get(E->get().name),image_map,p_flags);
- }
- }
-
- }
-
-
-
-
- if (p_flags&SCENE_FLAG_CREATE_BILLBOARDS && p_node->cast_to<MeshInstance>()) {
-
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
-
- bool bb=false;
-
- if ((_teststr(name,"bb"))) {
- bb=true;
- } else if (mi->get_mesh().is_valid() && (_teststr(mi->get_mesh()->get_name(),"bb"))) {
- bb=true;
-
- }
-
- if (bb) {
- mi->set_flag(GeometryInstance::FLAG_BILLBOARD,true);
- if (mi->get_mesh().is_valid()) {
-
- Ref<Mesh> m = mi->get_mesh();
- for(int i=0;i<m->get_surface_count();i++) {
-
- Ref<SpatialMaterial> fm = m->surface_get_material(i);
- if (fm.is_valid()) {
- //fm->set_flag(Material::FLAG_UNSHADED,true);
- //fm->set_flag(Material::FLAG_DOUBLE_SIDED,true);
- //fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER);
- //fm->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA,true);
- }
- }
- }
- }
- }
-
-
- if (p_flags&(SCENE_FLAG_DETECT_ALPHA|SCENE_FLAG_DETECT_VCOLOR|SCENE_FLAG_SET_LIGHTMAP_TO_UV2_IF_EXISTS) && p_node->cast_to<MeshInstance>()) {
-
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
-
- Ref<Mesh> m = mi->get_mesh();
-
- if (m.is_valid()) {
-
- for(int i=0;i<m->get_surface_count();i++) {
-
- Ref<SpatialMaterial> mat = m->surface_get_material(i);
- if (!mat.is_valid())
- continue;
-
- if (p_flags&SCENE_FLAG_DETECT_ALPHA && _teststr(mat->get_name(),"alpha")) {
-
- //mat->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA,true);
- //mat->set_name(_fixstr(mat->get_name(),"alpha"));
- }
- if (p_flags&SCENE_FLAG_DETECT_VCOLOR && _teststr(mat->get_name(),"vcol")) {
-
- //mat->set_fixed_flag(SpatialMaterial::FLAG_USE_COLOR_ARRAY,true);
- //mat->set_name(_fixstr(mat->get_name(),"vcol"));
- }
-
- if (p_flags&SCENE_FLAG_SET_LIGHTMAP_TO_UV2_IF_EXISTS && m->surface_get_format(i)&Mesh::ARRAY_FORMAT_TEX_UV2) {
- //mat->set_flag(Material::FLAG_LIGHTMAP_ON_UV2,true);
- }
-
- }
- }
- }
-
- if (p_flags&SCENE_FLAG_REMOVE_NOIMP && p_node->cast_to<AnimationPlayer>()) {
- //remove animations referencing non-importable nodes
- AnimationPlayer *ap = p_node->cast_to<AnimationPlayer>();
-
- List<StringName> anims;
- ap->get_animation_list(&anims);
- for(List<StringName>::Element *E=anims.front();E;E=E->next()) {
-
- Ref<Animation> anim=ap->get_animation(E->get());
- ERR_CONTINUE(anim.is_null());
- for(int i=0;i<anim->get_track_count();i++) {
- NodePath path = anim->track_get_path(i);
-
- for(int j=0;j<path.get_name_count();j++) {
- String node = path.get_name(j);
- if (_teststr(node,"noimp")) {
- anim->remove_track(i);
- i--;
- break;
- }
- }
- }
-
- }
- }
-
-
- if (p_flags&SCENE_FLAG_CREATE_IMPOSTORS && p_node->cast_to<MeshInstance>()) {
-
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
-
- String str;
-
- if ((_teststr(name,"imp"))) {
- str=name;
- } else if (mi->get_mesh().is_valid() && (_teststr(mi->get_mesh()->get_name(),"imp"))) {
- str=mi->get_mesh()->get_name();
-
- }
-
-
- if (p_node->get_parent() && p_node->get_parent()->cast_to<MeshInstance>()) {
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
- MeshInstance *mip = p_node->get_parent()->cast_to<MeshInstance>();
- String d=str.substr(str.find("imp")+3,str.length());
- if (d!="") {
- if ((d[0]<'0' || d[0]>'9'))
- d=d.substr(1,d.length());
- if (d.length() && d[0]>='0' && d[0]<='9') {
- float dist = d.to_double();
- mi->set_flag(GeometryInstance::FLAG_BILLBOARD,true);
- mi->set_flag(GeometryInstance::FLAG_BILLBOARD_FIX_Y,true);
- //mi->set_draw_range_begin(dist);
- //mi->set_draw_range_end(100000);
-
- //mip->set_draw_range_begin(0);
- //mip->set_draw_range_end(dist);
-
- if (mi->get_mesh().is_valid()) {
-
- Ref<Mesh> m = mi->get_mesh();
- for(int i=0;i<m->get_surface_count();i++) {
-
- Ref<SpatialMaterial> fm = m->surface_get_material(i);
- if (fm.is_valid()) {
- //fm->set_flag(Material::FLAG_UNSHADED,true);
- //fm->set_flag(Material::FLAG_DOUBLE_SIDED,true);
- //fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER);
- //fm->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA,true);
- }
- }
- }
- }
- }
- }
- }
-
- if (p_flags&SCENE_FLAG_CREATE_LODS && p_node->cast_to<MeshInstance>()) {
-
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
-
- String str;
-
- if ((_teststr(name,"lod"))) {
- str=name;
- } else if (mi->get_mesh().is_valid() && (_teststr(mi->get_mesh()->get_name(),"lod"))) {
- str=mi->get_mesh()->get_name();
-
- }
-
-
- if (p_node->get_parent() && p_node->get_parent()->cast_to<MeshInstance>()) {
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
- MeshInstance *mip = p_node->get_parent()->cast_to<MeshInstance>();
- String d=str.substr(str.find("lod")+3,str.length());
- if (d!="") {
- if ((d[0]<'0' || d[0]>'9'))
- d=d.substr(1,d.length());
- if (d.length() && d[0]>='0' && d[0]<='9') {
- float dist = d.to_double();
- /// mi->set_draw_range_begin(dist);
- // mi->set_draw_range_end(100000);
-
- // mip->set_draw_range_begin(0);
- // mip->set_draw_range_end(dist);
-
- /*if (mi->get_mesh().is_valid()) {
-
- Ref<Mesh> m = mi->get_mesh();
- for(int i=0;i<m->get_surface_count();i++) {
-
- Ref<SpatialMaterial> fm = m->surface_get_material(i);
- if (fm.is_valid()) {
- fm->set_flag(Material::FLAG_UNSHADED,true);
- fm->set_flag(Material::FLAG_DOUBLE_SIDED,true);
- fm->set_hint(Material::HINT_NO_DEPTH_DRAW,true);
- fm->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA,true);
- }
- }
- }*/
- }
- }
- }
- }
-
-
- if (p_flags&SCENE_FLAG_DETECT_LIGHTMAP_LAYER && _teststr(name,"lm") && p_node->cast_to<MeshInstance>()) {
-
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
-
- String str=name;
- int layer = str.substr(str.find("lm")+3,str.length()).to_int();
- //mi->set_baked_light_texture_id(layer);
- }
-
- bool is_rigid = _teststr(name, "rigidonly");
-
- if (p_flags & SCENE_FLAG_CREATE_COLLISIONS && (_teststr(name, "colonly") || is_rigid)) {
-
- if (isroot)
- return p_node;
-
- if (p_node->cast_to<MeshInstance>() && !is_rigid) {
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
- Node * col = mi->create_trimesh_collision_node();
- ERR_FAIL_COND_V(!col,NULL);
-
- col->set_name(_fixstr(name,"colonly"));
- col->cast_to<Spatial>()->set_transform(mi->get_transform());
- p_node->replace_by(col);
- memdelete(p_node);
- p_node=col;
-
- StaticBody *sb = col->cast_to<StaticBody>();
- CollisionShape *colshape = memnew( CollisionShape);
- colshape->set_shape(sb->get_shape(0));
- colshape->set_name("shape");
- sb->add_child(colshape);
- colshape->set_owner(p_node->get_owner());
- } else if (p_node->has_meta("empty_draw_type")) {
- String empty_draw_type = String(p_node->get_meta("empty_draw_type"));
- print_line(empty_draw_type);
- PhysicsBody *pb;
- if (is_rigid) {
- pb = memnew(RigidBody);
- pb->set_name(_fixstr(name, "rigidonly"));
- } else {
- pb = memnew(StaticBody);
- pb->set_name(_fixstr(name, "colonly"));
- }
- pb->cast_to<Spatial>()->set_transform(p_node->cast_to<Spatial>()->get_transform());
- p_node->replace_by(pb);
- memdelete(p_node);
- CollisionShape *colshape = memnew( CollisionShape);
- if (empty_draw_type == "CUBE") {
- BoxShape *boxShape = memnew( BoxShape);
- boxShape->set_extents(Vector3(1, 1, 1));
- colshape->set_shape(boxShape);
- colshape->set_name("BoxShape");
- } else if (empty_draw_type == "SINGLE_ARROW") {
- RayShape *rayShape = memnew( RayShape);
- rayShape->set_length(1);
- colshape->set_shape(rayShape);
- colshape->set_name("RayShape");
- pb->cast_to<Spatial>()->rotate_x(Math_PI / 2);
- } else if (empty_draw_type == "IMAGE") {
- PlaneShape *planeShape = memnew( PlaneShape);
- colshape->set_shape(planeShape);
- colshape->set_name("PlaneShape");
- } else {
- SphereShape *sphereShape = memnew( SphereShape);
- sphereShape->set_radius(1);
- colshape->set_shape(sphereShape);
- colshape->set_name("SphereShape");
- }
- pb->add_child(colshape);
- colshape->set_owner(pb->get_owner());
- }
-
- } else if (p_flags&SCENE_FLAG_CREATE_COLLISIONS && _teststr(name,"rigid") && p_node->cast_to<MeshInstance>()) {
-
- if (isroot)
- return p_node;
-
- // get mesh instance and bounding box
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
- Rect3 aabb = mi->get_aabb();
-
- // create a new rigid body collision node
- RigidBody * rigid_body = memnew( RigidBody );
- Node * col = rigid_body;
- ERR_FAIL_COND_V(!col,NULL);
-
- // remove node name postfix
- col->set_name(_fixstr(name,"rigid"));
- // get mesh instance xform matrix to the rigid body collision node
- col->cast_to<Spatial>()->set_transform(mi->get_transform());
- // save original node by duplicating it into a new instance and correcting the name
- Node * mesh = p_node->duplicate();
- mesh->set_name(_fixstr(name,"rigid"));
- // reset the xform matrix of the duplicated node so it can inherit parent node xform
- mesh->cast_to<Spatial>()->set_transform(Transform(Basis()));
- // reparent the new mesh node to the rigid body collision node
- p_node->add_child(mesh);
- mesh->set_owner(p_node->get_owner());
- // replace the original node with the rigid body collision node
- p_node->replace_by(col);
- memdelete(p_node);
- p_node=col;
-
- // create an alias for the rigid body collision node
- RigidBody *rb = col->cast_to<RigidBody>();
- // create a new Box collision shape and set the right extents
- Ref<BoxShape> shape = memnew( BoxShape );
- shape->set_extents(aabb.get_size() * 0.5);
- CollisionShape *colshape = memnew( CollisionShape);
- colshape->set_name("shape");
- colshape->set_shape(shape);
- // reparent the new collision shape to the rigid body collision node
- rb->add_child(colshape);
- colshape->set_owner(p_node->get_owner());
-
- } else if (p_flags&SCENE_FLAG_CREATE_COLLISIONS &&_teststr(name,"col") && p_node->cast_to<MeshInstance>()) {
-
-
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
-
- mi->set_name(_fixstr(name,"col"));
- Node *col= mi->create_trimesh_collision_node();
- ERR_FAIL_COND_V(!col,NULL);
-
- col->set_name("col");
- p_node->add_child(col);
-
- StaticBody *sb=col->cast_to<StaticBody>();
- CollisionShape *colshape = memnew( CollisionShape);
- colshape->set_shape(sb->get_shape(0));
- colshape->set_name("shape");
- col->add_child(colshape);
- colshape->set_owner(p_node->get_owner());
- sb->set_owner(p_node->get_owner());
-
- } else if (p_flags&SCENE_FLAG_CREATE_NAVMESH &&_teststr(name,"navmesh") && p_node->cast_to<MeshInstance>()) {
-
- if (isroot)
- return p_node;
-
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
-
- Ref<Mesh> mesh=mi->get_mesh();
- ERR_FAIL_COND_V(mesh.is_null(),NULL);
- NavigationMeshInstance *nmi = memnew( NavigationMeshInstance );
-
-
- nmi->set_name(_fixstr(name,"navmesh"));
- Ref<NavigationMesh> nmesh = memnew( NavigationMesh);
- nmesh->create_from_mesh(mesh);
- nmi->set_navigation_mesh(nmesh);
- nmi->cast_to<Spatial>()->set_transform(mi->get_transform());
- p_node->replace_by(nmi);
- memdelete(p_node);
- p_node=nmi;
- } else if (p_flags&SCENE_FLAG_CREATE_CARS &&_teststr(name,"vehicle")) {
-
- if (isroot)
- return p_node;
-
- Node *owner = p_node->get_owner();
- Spatial *s = p_node->cast_to<Spatial>();
- VehicleBody *bv = memnew( VehicleBody );
- String n = _fixstr(p_node->get_name(),"vehicle");
- bv->set_name(n);
- p_node->replace_by(bv);
- p_node->set_name(n);
- bv->add_child(p_node);
- bv->set_owner(owner);
- p_node->set_owner(owner);
- bv->set_transform(s->get_transform());
- s->set_transform(Transform());
-
- p_node=bv;
-
-
- } else if (p_flags&SCENE_FLAG_CREATE_CARS &&_teststr(name,"wheel")) {
-
- if (isroot)
- return p_node;
-
- Node *owner = p_node->get_owner();
- Spatial *s = p_node->cast_to<Spatial>();
- VehicleWheel *bv = memnew( VehicleWheel );
- String n = _fixstr(p_node->get_name(),"wheel");
- bv->set_name(n);
- p_node->replace_by(bv);
- p_node->set_name(n);
- bv->add_child(p_node);
- bv->set_owner(owner);
- p_node->set_owner(owner);
- bv->set_transform(s->get_transform());
- s->set_transform(Transform());
-
- p_node=bv;
-
- } else if (p_flags&SCENE_FLAG_CREATE_ROOMS && _teststr(name,"room") && p_node->cast_to<MeshInstance>()) {
-
-
- if (isroot)
- return p_node;
-
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
- PoolVector<Face3> faces = mi->get_faces(VisualInstance::FACES_SOLID);
-
-
- BSP_Tree bsptree(faces);
-
- Ref<RoomBounds> area = memnew( RoomBounds );
- //area->set_bounds(faces);
- //area->set_geometry_hint(faces);
-
-
- Room * room = memnew( Room );
- room->set_name(_fixstr(name,"room"));
- room->set_transform(mi->get_transform());
- room->set_room(area);
-
- p_node->replace_by(room);
- memdelete(p_node);
- p_node=room;
-
- } else if (p_flags&SCENE_FLAG_CREATE_ROOMS &&_teststr(name,"room")) {
-
- if (isroot)
- return p_node;
-
- Spatial *dummy = p_node->cast_to<Spatial>();
- ERR_FAIL_COND_V(!dummy,NULL);
-
- Room * room = memnew( Room );
- room->set_name(_fixstr(name,"room"));
- room->set_transform(dummy->get_transform());
-
- p_node->replace_by(room);
- memdelete(p_node);
- p_node=room;
-
- //room->compute_room_from_subtree();
-
- } else if (p_flags&SCENE_FLAG_CREATE_PORTALS &&_teststr(name,"portal") && p_node->cast_to<MeshInstance>()) {
-
- if (isroot)
- return p_node;
-
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
- PoolVector<Face3> faces = mi->get_faces(VisualInstance::FACES_SOLID);
-
- ERR_FAIL_COND_V(faces.size()==0,NULL);
- //step 1 compute the plane
- Set<Vector3> points;
- Plane plane;
-
- Vector3 center;
-
- for(int i=0;i<faces.size();i++) {
-
- Face3 f = faces.get(i);
- Plane p = f.get_plane();
- plane.normal+=p.normal;
- plane.d+=p.d;
-
- for(int i=0;i<3;i++) {
-
- Vector3 v = f.vertex[i].snapped(0.01);
- if (!points.has(v)) {
- points.insert(v);
- center+=v;
- }
- }
- }
-
- plane.normal.normalize();
- plane.d/=faces.size();
- center/=points.size();
-
- //step 2, create points
-
- Transform t;
- t.basis.from_z(plane.normal);
- t.basis.transpose();
- t.origin=center;
-
- Vector<Point2> portal_points;
-
- for(Set<Vector3>::Element *E=points.front();E;E=E->next()) {
-
- Vector3 local = t.xform_inv(E->get());
- portal_points.push_back(Point2(local.x,local.y));
- }
- // step 3 bubbly sort points
-
- int swaps=0;
-
- do {
- swaps=0;
-
- for(int i=0;i<portal_points.size()-1;i++) {
-
- float a = portal_points[i].angle();
- float b = portal_points[i+1].angle();
-
- if (a>b) {
- SWAP( portal_points[i], portal_points[i+1] );
- swaps++;
- }
-
- }
-
- } while(swaps);
-
-
- Portal *portal = memnew( Portal );
-
- portal->set_shape(portal_points);
- portal->set_transform( mi->get_transform() * t);
-
- p_node->replace_by(portal);
- memdelete(p_node);
- p_node=portal;
-
- } else if (p_node->cast_to<MeshInstance>()) {
-
- //last attempt, maybe collision insde the mesh data
-
- MeshInstance *mi = p_node->cast_to<MeshInstance>();
-
- Ref<Mesh> mesh = mi->get_mesh();
- if (!mesh.is_null()) {
-
- if (p_flags&SCENE_FLAG_CREATE_COLLISIONS && _teststr(mesh->get_name(),"col")) {
-
- mesh->set_name( _fixstr(mesh->get_name(),"col") );
- Ref<Shape> shape;
-
- if (collision_map.has(mesh)) {
- shape = collision_map[mesh];
-
- } else {
-
- shape = mesh->create_trimesh_shape();
- if (!shape.is_null())
- collision_map[mesh]=shape;
-
-
- }
-
- if (!shape.is_null()) {
-#if 0
- StaticBody* static_body = memnew( StaticBody );
- ERR_FAIL_COND_V(!static_body,NULL);
- static_body->set_name( String(mesh->get_name()) + "_col" );
- shape->set_name(static_body->get_name());
- static_body->add_shape(shape);
-
- mi->add_child(static_body);
- if (mi->get_owner())
- static_body->set_owner( mi->get_owner() );
-#endif
- }
-
- }
-
- for(int i=0;i<mesh->get_surface_count();i++) {
-
- Ref<SpatialMaterial> fm = mesh->surface_get_material(i);
- if (fm.is_valid()) {
- String name = fm->get_name();
- /* if (_teststr(name,"alpha")) {
- fm->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA,true);
- name=_fixstr(name,"alpha");
- }
-
- if (_teststr(name,"vcol")) {
- fm->set_fixed_flag(SpatialMaterial::FLAG_USE_COLOR_ARRAY,true);
- name=_fixstr(name,"vcol");
- }*/
- fm->set_name(name);
- }
- }
-
- }
-
- }
-
-
- return p_node;
-}
-
-#if 0
-
-Error EditorImport::import_scene(const String& p_path,const String& p_dest_path,const String& p_resource_path,uint32_t p_flags,ImageFormat p_image_format,ImageCompression p_image_compression,uint32_t p_image_flags,float p_quality,uint32_t animation_flags,Node **r_scene,Ref<EditorPostImport> p_post_import) {
-
-
-}
-#endif
-
-void EditorSceneImportPlugin::_tag_import_paths(Node *p_scene,Node *p_node) {
-
- if (p_scene!=p_node && p_node->get_owner()!=p_scene)
- return;
-
- NodePath path = p_scene->get_path_to(p_node);
- p_node->set_import_path( path );
-
- Spatial *snode=p_node->cast_to<Spatial>();
-
- if (snode) {
-
- snode->set_import_transform(snode->get_transform());
- }
-
- for(int i=0;i<p_node->get_child_count();i++) {
- _tag_import_paths(p_scene,p_node->get_child(i));
- }
-
-}
-
-Error EditorSceneImportPlugin::import1(const Ref<ResourceImportMetadata>& p_from,Node**r_node,List<String> *r_missing) {
-
- Ref<ResourceImportMetadata> from=p_from;
-
- ERR_FAIL_COND_V(from->get_source_count()!=1,ERR_INVALID_PARAMETER);
-
- String src_path=EditorImportPlugin::expand_source_path(from->get_source_path(0));
-
- Ref<EditorSceneImporter> importer;
- String ext=src_path.get_extension().to_lower();
-
-
- EditorProgress progress("import",TTR("Import Scene"),104);
- progress.step(TTR("Importing Scene.."),0);
-
- for(int i=0;i<importers.size();i++) {
-
- List<String> extensions;
- importers[i]->get_extensions(&extensions);
-
- for(List<String>::Element *E=extensions.front();E;E=E->next()) {
-
- if (E->get().to_lower()==ext) {
-
- importer = importers[i];
- break;
- }
- }
-
- if (importer.is_valid())
- break;
- }
-
- ERR_FAIL_COND_V(!importer.is_valid(),ERR_FILE_UNRECOGNIZED);
-
- int animation_flags=p_from->get_option("animation_flags");
- int scene_flags = from->get_option("flags");
- int fps = 24;
- if (from->has_option("animation_bake_fps"))
- fps=from->get_option("animation_bake_fps");
-
-
- Array clips;
- if (from->has_option("animation_clips"))
- clips=from->get_option("animation_clips");
-
- uint32_t import_flags=0;
- if (animation_flags&EditorSceneAnimationImportPlugin::ANIMATION_DETECT_LOOP)
- import_flags|=EditorSceneImporter::IMPORT_ANIMATION_DETECT_LOOP;
- if (animation_flags&EditorSceneAnimationImportPlugin::ANIMATION_KEEP_VALUE_TRACKS)
- import_flags |= EditorSceneImporter::IMPORT_ANIMATION_KEEP_VALUE_TRACKS;
- if (animation_flags&EditorSceneAnimationImportPlugin::ANIMATION_OPTIMIZE)
- import_flags|=EditorSceneImporter::IMPORT_ANIMATION_OPTIMIZE;
- if (animation_flags&EditorSceneAnimationImportPlugin::ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS)
- import_flags|=EditorSceneImporter::IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS;
- if (scene_flags&SCENE_FLAG_IMPORT_ANIMATIONS)
- import_flags|=EditorSceneImporter::IMPORT_ANIMATION;
- /*
- if (scene_flags&SCENE_FLAG_FAIL_ON_MISSING_IMAGES)
- import_flags|=EditorSceneImporter::IMPORT_FAIL_ON_MISSING_DEPENDENCIES;
- */
- if (scene_flags&SCENE_FLAG_GENERATE_TANGENT_ARRAYS)
- import_flags|=EditorSceneImporter::IMPORT_GENERATE_TANGENT_ARRAYS;
-
-
-
-
-
- Error err=OK;
- Node *scene = importer->import_scene(src_path,import_flags,fps,r_missing,&err);
- if (!scene || err!=OK) {
- return err;
- }
-
- if (from->has_option("root_type")) {
- String type = from->get_option("root_type");
- Object *base = ClassDB::instance(type);
- Node *base_node = NULL;
- if (base)
- base_node=base->cast_to<Node>();
-
- if (base_node) {
-
- scene->replace_by(base_node);
- memdelete(scene);
- scene=base_node;
- }
- }
-
- scene->set_name(from->get_option("root_name"));
- _tag_import_paths(scene,scene);
-
- *r_node=scene;
- return OK;
-}
-
-
-void EditorSceneImportPlugin::_create_clips(Node *scene, const Array& p_clips,bool p_bake_all) {
-
- if (!scene->has_node(String("AnimationPlayer")))
- return;
-
- Node* n = scene->get_node(String("AnimationPlayer"));
- ERR_FAIL_COND(!n);
- AnimationPlayer *anim = n->cast_to<AnimationPlayer>();
- ERR_FAIL_COND(!anim);
-
- if (!anim->has_animation("default"))
- return;
-
-
- Ref<Animation> default_anim = anim->get_animation("default");
-
- for(int i=0;i<p_clips.size();i+=4) {
-
- String name = p_clips[i];
- float from=p_clips[i+1];
- float to=p_clips[i+2];
- bool loop=p_clips[i+3];
- if (from>=to)
- continue;
-
- Ref<Animation> new_anim = memnew( Animation );
-
- for(int j=0;j<default_anim->get_track_count();j++) {
-
-
- List<float> keys;
- int kc = default_anim->track_get_key_count(j);
- int dtrack=-1;
- for(int k=0;k<kc;k++) {
-
- float kt = default_anim->track_get_key_time(j,k);
- if (kt>=from && kt<to) {
-
- //found a key within range, so create track
- if (dtrack==-1) {
- new_anim->add_track(default_anim->track_get_type(j));
- dtrack = new_anim->get_track_count()-1;
- new_anim->track_set_path(dtrack,default_anim->track_get_path(j));
-
- if (kt>(from+0.01) && k>0) {
-
- if (default_anim->track_get_type(j)==Animation::TYPE_TRANSFORM) {
- Quat q;
- Vector3 p;
- Vector3 s;
- default_anim->transform_track_interpolate(j,from,&p,&q,&s);
- new_anim->transform_track_insert_key(dtrack,0,p,q,s);
- }
- }
-
- }
-
- if (default_anim->track_get_type(j)==Animation::TYPE_TRANSFORM) {
- Quat q;
- Vector3 p;
- Vector3 s;
- default_anim->transform_track_get_key(j,k,&p,&q,&s);
- new_anim->transform_track_insert_key(dtrack,kt-from,p,q,s);
- }
-
- }
-
- if (dtrack!=-1 && kt>=to) {
-
- if (default_anim->track_get_type(j)==Animation::TYPE_TRANSFORM) {
- Quat q;
- Vector3 p;
- Vector3 s;
- default_anim->transform_track_interpolate(j,to,&p,&q,&s);
- new_anim->transform_track_insert_key(dtrack,to-from,p,q,s);
- }
- }
-
- }
-
- if (dtrack==-1 && p_bake_all) {
- new_anim->add_track(default_anim->track_get_type(j));
- dtrack = new_anim->get_track_count()-1;
- new_anim->track_set_path(dtrack,default_anim->track_get_path(j));
- if (default_anim->track_get_type(j)==Animation::TYPE_TRANSFORM) {
-
-
- Quat q;
- Vector3 p;
- Vector3 s;
- default_anim->transform_track_interpolate(j,from,&p,&q,&s);
- new_anim->transform_track_insert_key(dtrack,0,p,q,s);
- default_anim->transform_track_interpolate(j,to,&p,&q,&s);
- new_anim->transform_track_insert_key(dtrack,to-from,p,q,s);
- }
-
- }
- }
-
-
- new_anim->set_loop(loop);
- new_anim->set_length(to-from);
- anim->add_animation(name,new_anim);
- }
-
- anim->remove_animation("default"); //remove default (no longer needed)
-}
-
-void EditorSceneImportPlugin::_filter_anim_tracks(Ref<Animation> anim,Set<String> &keep) {
-
- Ref<Animation> a = anim;
- ERR_FAIL_COND(!a.is_valid());
-
- print_line("From Anim "+anim->get_name()+":");
-
- for(int j=0;j<a->get_track_count();j++) {
-
- String path = a->track_get_path(j);
-
- if (!keep.has(path)) {
-
- print_line("Remove: "+path);
- a->remove_track(j);
- j--;
- }
-
- }
-}
-
-
-void EditorSceneImportPlugin::_filter_tracks(Node *scene, const String& p_text) {
-
- if (!scene->has_node(String("AnimationPlayer")))
- return;
- Node* n = scene->get_node(String("AnimationPlayer"));
- ERR_FAIL_COND(!n);
- AnimationPlayer *anim = n->cast_to<AnimationPlayer>();
- ERR_FAIL_COND(!anim);
-
- Vector<String> strings = p_text.split("\n");
- for(int i=0;i<strings.size();i++) {
-
- strings[i]=strings[i].strip_edges();
- }
-
- List<StringName> anim_names;
- anim->get_animation_list(&anim_names);
- for(List<StringName>::Element *E=anim_names.front();E;E=E->next()) {
-
- String name = E->get();
- bool valid_for_this=false;
- bool valid=false;
-
- Set<String> keep;
- Set<String> keep_local;
-
-
- for(int i=0;i<strings.size();i++) {
-
-
- if (strings[i].begins_with("@")) {
-
- valid_for_this=false;
- for(Set<String>::Element *F=keep_local.front();F;F=F->next()) {
- keep.insert(F->get());
- }
- keep_local.clear();
-
- Vector<String> filters=strings[i].substr(1,strings[i].length()).split(",");
- for(int j=0;j<filters.size();j++) {
-
- String fname = filters[j].strip_edges();
- if (fname=="")
- continue;
- int fc = fname[0];
- bool plus;
- if (fc=='+')
- plus=true;
- else if (fc=='-')
- plus=false;
- else
- continue;
-
- String filter=fname.substr(1,fname.length()).strip_edges();
-
- if (!name.matchn(filter))
- continue;
- valid_for_this=plus;
- }
-
- if (valid_for_this)
- valid=true;
-
- } else if (valid_for_this) {
-
- Ref<Animation> a = anim->get_animation(name);
- if (!a.is_valid())
- continue;
-
- for(int j=0;j<a->get_track_count();j++) {
-
- String path = a->track_get_path(j);
-
- String tname = strings[i];
- if (tname=="")
- continue;
- int fc = tname[0];
- bool plus;
- if (fc=='+')
- plus=true;
- else if (fc=='-')
- plus=false;
- else
- continue;
-
- String filter=tname.substr(1,tname.length()).strip_edges();
-
- if (!path.matchn(filter))
- continue;
-
- if (plus)
- keep_local.insert(path);
- else if (!keep.has(path)) {
- keep_local.erase(path);
- }
- }
-
- }
-
- }
-
- if (valid) {
- for(Set<String>::Element *F=keep_local.front();F;F=F->next()) {
- keep.insert(F->get());
- }
- print_line("FILTERING ANIM: "+String(E->get()));
- _filter_anim_tracks(anim->get_animation(name),keep);
- } else {
- print_line("NOT FILTERING ANIM: "+String(E->get()));
-
- }
-
- }
-
-
-
-}
-
-void EditorSceneImportPlugin::_optimize_animations(Node *scene, float p_max_lin_error,float p_max_ang_error,float p_max_angle) {
-
- if (!scene->has_node(String("AnimationPlayer")))
- return;
- Node* n = scene->get_node(String("AnimationPlayer"));
- ERR_FAIL_COND(!n);
- AnimationPlayer *anim = n->cast_to<AnimationPlayer>();
- ERR_FAIL_COND(!anim);
-
-
- List<StringName> anim_names;
- anim->get_animation_list(&anim_names);
- for(List<StringName>::Element *E=anim_names.front();E;E=E->next()) {
-
- Ref<Animation> a = anim->get_animation(E->get());
- a->optimize(p_max_lin_error,p_max_ang_error,Math::deg2rad(p_max_angle));
- }
-}
-
-
-void EditorSceneImportPlugin::_find_resources_to_merge(Node *scene, Node *node, bool p_merge_material, Map<String, Ref<Material> > &materials, bool p_merge_anims, Map<String,Ref<Animation> >& merged_anims,Set<Ref<Mesh> > &tested_meshes) {
-
- if (node!=scene && node->get_owner()!=scene)
- return;
-
- String path = scene->get_path_to(node);
-
- if (p_merge_anims && node->cast_to<AnimationPlayer>()) {
-
- AnimationPlayer *ap = node->cast_to<AnimationPlayer>();
- List<StringName> anims;
- ap->get_animation_list(&anims);
- for (List<StringName>::Element *E=anims.front();E;E=E->next()) {
- Ref<Animation> anim = ap->get_animation(E->get());
- Ref<Animation> clone;
-
- bool has_user_tracks=false;
-
- for(int i=0;i<anim->get_track_count();i++) {
-
- if (!anim->track_is_imported(i)) {
- has_user_tracks=true;
- break;
- }
- }
-
- if (has_user_tracks) {
-
- clone = anim->duplicate();
- for(int i=0;i<clone->get_track_count();i++) {
- if (clone->track_is_imported(i)) {
- clone->remove_track(i);
- i--;
- }
- }
-
- merged_anims[path+"::"+String(E->get())]=clone;
- }
- }
- }
-
-
-
- if (p_merge_material && node->cast_to<MeshInstance>()) {
- MeshInstance *mi=node->cast_to<MeshInstance>();
- Ref<Mesh> mesh = mi->get_mesh();
- if (mesh.is_valid() && mesh->get_name()!=String() && !tested_meshes.has(mesh)) {
-
- for(int i=0;i<mesh->get_surface_count();i++) {
- Ref<Material> material = mesh->surface_get_material(i);
-
- if (material.is_valid()) {
-
- String sname = mesh->surface_get_name(i);
- if (sname=="")
- sname="surf_"+itos(i);
-
- sname=mesh->get_name()+":surf:"+sname;
- materials[sname]=material;
- }
- }
-
- tested_meshes.insert(mesh);
- }
-
- if (mesh.is_valid()) {
-
- for(int i=0;i<mesh->get_surface_count();i++) {
- Ref<Material> material = mi->get_surface_material(i);
- if (material.is_valid()) {
- String sname = mesh->surface_get_name(i);
- if (sname=="")
- sname="surf_"+itos(i);
-
- sname=path+":inst_surf:"+sname;
- materials[sname]=material;
- }
- }
-
- }
-
- Ref<Material> override = mi->get_material_override();
-
- if (override.is_valid()) {
-
- materials[path+":override"]=override;
- }
- }
-
-
-
- for(int i=0;i<node->get_child_count();i++) {
- _find_resources_to_merge(scene,node->get_child(i),p_merge_material,materials,p_merge_anims,merged_anims,tested_meshes);
- }
-
-}
-
-
-void EditorSceneImportPlugin::_merge_found_resources(Node *scene, Node *node, bool p_merge_material, const Map<String, Ref<Material> > &materials, bool p_merge_anims, const Map<String,Ref<Animation> >& merged_anims, Set<Ref<Mesh> > &tested_meshes) {
-
- if (node!=scene && node->get_owner()!=scene)
- return;
-
- String path = scene->get_path_to(node);
-
- print_line("at path: "+path);
-
- if (node->cast_to<AnimationPlayer>()) {
-
- AnimationPlayer *ap = node->cast_to<AnimationPlayer>();
- List<StringName> anims;
- ap->get_animation_list(&anims);
- for (List<StringName>::Element *E=anims.front();E;E=E->next()) {
- Ref<Animation> anim = ap->get_animation(E->get());
-
- String anim_path = path+"::"+String(E->get());
-
- if (merged_anims.has(anim_path)) {
-
- Ref<Animation> user_tracks = merged_anims[anim_path];
- for(int i=0;i<user_tracks->get_track_count();i++) {
-
- int idx = anim->get_track_count();
- anim->add_track(user_tracks->track_get_type(i));
- anim->track_set_path(idx,user_tracks->track_get_path(i));
- anim->track_set_interpolation_type(idx,user_tracks->track_get_interpolation_type(i));
- for(int j=0;j<user_tracks->track_get_key_count(i);j++) {
-
- float ofs = user_tracks->track_get_key_time(i,j);
- float trans = user_tracks->track_get_key_transition(i,j);
- Variant value = user_tracks->track_get_key_value(i,j);
-
- anim->track_insert_key(idx,ofs,value,trans);
- }
- }
- }
- }
- }
-
-
-
- if (node->cast_to<MeshInstance>()) {
- MeshInstance *mi=node->cast_to<MeshInstance>();
- Ref<Mesh> mesh = mi->get_mesh();
- if (mesh.is_valid() && mesh->get_name()!=String() && !tested_meshes.has(mesh)) {
-
- for(int i=0;i<mesh->get_surface_count();i++) {
-
- String sname = mesh->surface_get_name(i);
- if (sname=="")
- sname="surf_"+itos(i);
-
- sname=mesh->get_name()+":surf:"+sname;
-
-
- if (materials.has(sname)) {
-
- mesh->surface_set_material(i,materials[sname]);
- }
- }
-
- tested_meshes.insert(mesh);
- }
-
- if (mesh.is_valid()) {
-
- for(int i=0;i<mesh->get_surface_count();i++) {
-
- String sname = mesh->surface_get_name(i);
- if (sname=="")
- sname="surf_"+itos(i);
-
- sname=path+":inst_surf:"+sname;
-
-
- if (materials.has(sname)) {
-
- mi->set_surface_material(i,materials[sname]);
- }
- }
-
- }
-
-
- String opath = path+":override";
- if (materials.has(opath)) {
- mi->set_material_override(materials[opath]);
- }
-
- }
-
-
-
- for(int i=0;i<node->get_child_count();i++) {
- _merge_found_resources(scene,node->get_child(i),p_merge_material,materials,p_merge_anims,merged_anims,tested_meshes);
- }
-
-}
-
-Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, const Ref<ResourceImportMetadata>& p_from) {
-
- Error err=OK;
- Ref<ResourceImportMetadata> from=p_from;
- String src_path=EditorImportPlugin::expand_source_path(from->get_source_path(0));
- int animation_flags=p_from->get_option("animation_flags");
- Array animation_clips = p_from->get_option("animation_clips");
- String animation_filter = p_from->get_option("animation_filters");
- int scene_flags = from->get_option("flags");
- float anim_optimizer_linerr=0.05;
- float anim_optimizer_angerr=0.01;
- float anim_optimizer_maxang=22;
-
- if (from->has_option("animation_optimizer_linear_error"))
- anim_optimizer_linerr=from->get_option("animation_optimizer_linear_error");
- if (from->has_option("animation_optimizer_angular_error"))
- anim_optimizer_angerr=from->get_option("animation_optimizer_angular_error");
- if (from->has_option("animation_optimizer_max_angle"))
- anim_optimizer_maxang=from->get_option("animation_optimizer_max_angle");
-
- EditorProgress progress("import",TTR("Import Scene"),104);
- progress.step(TTR("Importing Scene.."),2);
-
-
- from->set_source_md5(0,FileAccess::get_md5(src_path));
- from->set_editor(get_name());
-
- from->set_option("reimport",false);
- String target_res_path=p_dest_path.get_base_dir();
-
- Map<Ref<Mesh>,Ref<Shape> > collision_map;
-
- Map< Ref<ImageTexture>,TextureRole > imagemap;
-
- scene=_fix_node(scene,scene,collision_map,scene_flags,imagemap);
- if (animation_flags&EditorSceneAnimationImportPlugin::ANIMATION_OPTIMIZE)
- _optimize_animations(scene,anim_optimizer_linerr,anim_optimizer_angerr,anim_optimizer_maxang);
- if (animation_clips.size())
- _create_clips(scene,animation_clips,animation_flags&EditorSceneAnimationImportPlugin::ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS);
-
- _filter_tracks(scene,animation_filter);
-
-
- if (scene_flags&(SCENE_FLAG_MERGE_KEEP_MATERIALS|SCENE_FLAG_MERGE_KEEP_EXTRA_ANIM_TRACKS) && FileAccess::exists(p_dest_path)) {
- //must merge!
-
- print_line("MUST MERGE");
- Ref<PackedScene> pscene = ResourceLoader::load(p_dest_path,"PackedScene",true);
- if (pscene.is_valid()) {
-
- Node *instance = pscene->instance();
- if (instance) {
- Map<String,Ref<Animation> > merged_anims;
- Map<String,Ref<Material> > merged_materials;
- Set<Ref<Mesh> > tested_meshes;
-
- _find_resources_to_merge(instance,instance,scene_flags&SCENE_FLAG_MERGE_KEEP_MATERIALS,merged_materials,scene_flags&SCENE_FLAG_MERGE_KEEP_EXTRA_ANIM_TRACKS,merged_anims,tested_meshes);
-
- tested_meshes.clear();
- _merge_found_resources(scene,scene,scene_flags&SCENE_FLAG_MERGE_KEEP_MATERIALS,merged_materials,scene_flags&SCENE_FLAG_MERGE_KEEP_EXTRA_ANIM_TRACKS,merged_anims,tested_meshes);
-
- memdelete(instance);
- }
-
- }
-
- }
-
- /// BEFORE ANYTHING, RUN SCRIPT
-
- progress.step(TTR("Running Custom Script.."),2);
-
- String post_import_script_path = from->get_option("post_import_script");
- Ref<EditorScenePostImport> post_import_script;
-
- if (post_import_script_path!="") {
- post_import_script_path = post_import_script_path;
- Ref<Script> scr = ResourceLoader::load(post_import_script_path);
- if (!scr.is_valid()) {
- EditorNode::add_io_error(TTR("Couldn't load post-import script:")+" "+post_import_script_path);
- } else {
-
- post_import_script = Ref<EditorScenePostImport>( memnew( EditorScenePostImport ) );
- post_import_script->set_script(scr.get_ref_ptr());
- if (!post_import_script->get_script_instance()) {
- EditorNode::add_io_error(TTR("Invalid/broken script for post-import (check console):")+" "+post_import_script_path);
- post_import_script.unref();
- return ERR_CANT_CREATE;
- }
- }
- }
-
-
- if (post_import_script.is_valid()) {
- scene = post_import_script->post_import(scene);
- if (!scene) {
- EditorNode::add_io_error(TTR("Error running post-import script:")+" "+post_import_script_path);
- return err;
- }
-
-
- }
-
-
- /// IMPORT IMAGES
-
-
- int idx=0;
-
- int image_format = from->get_option("texture_format");
- int image_flags = from->get_option("texture_flags");
- float image_quality = from->get_option("texture_quality");
-
- for (Map< Ref<ImageTexture>,TextureRole >::Element *E=imagemap.front();E;E=E->next()) {
-
- //texture could be converted to something more useful for 3D, that could load individual mipmaps and stuff
- //but not yet..
-
- Ref<ImageTexture> texture = E->key();
-
- ERR_CONTINUE(!texture.is_valid());
-
- String path = texture->get_path();
- String fname= path.get_file();
- String target_path = ProjectSettings::get_singleton()->localize_path(target_res_path.plus_file(fname));
- progress.step(TTR("Import Image:")+" "+fname,3+(idx)*100/imagemap.size());
-
- idx++;
-
- if (path==target_path) {
-
- EditorNode::add_io_error(TTR("Can't import a file over itself:")+" "+target_path);
- continue;
- }
-
- if (!target_path.begins_with("res://")) {
- EditorNode::add_io_error(vformat(TTR("Couldn't localize path: %s (already local)"),target_path));
- continue;
- }
-
-
- {
-
-
- target_path=target_path.get_basename()+".tex";
-
- Ref<ResourceImportMetadata> imd = memnew( ResourceImportMetadata );
-
- uint32_t flags = image_flags;
- if (E->get()==TEXTURE_ROLE_DIFFUSE && scene_flags&SCENE_FLAG_LINEARIZE_DIFFUSE_TEXTURES)
- flags|=EditorTextureImportPlugin::IMAGE_FLAG_CONVERT_TO_LINEAR;
-
- if (E->get()==TEXTURE_ROLE_NORMALMAP && scene_flags&SCENE_FLAG_CONVERT_NORMALMAPS_TO_XY)
- flags|=EditorTextureImportPlugin::IMAGE_FLAG_CONVERT_NORMAL_TO_XY;
-
- imd->set_option("flags",flags);
- imd->set_option("format",image_format);
- imd->set_option("quality",image_quality);
- imd->set_option("atlas",false);
- imd->add_source(EditorImportPlugin::validate_source_path(path));
-
-
- if (FileAccess::exists(target_path)) {
-
- Ref<ResourceImportMetadata> rimdex = ResourceLoader::load_import_metadata(target_path);
- if (rimdex.is_valid()) {
- //make sure the options are the same, otherwise re-import
- List<String> opts;
- imd->get_options(&opts);
- bool differ=false;
- for (List<String>::Element *E=opts.front();E;E=E->next()) {
- if (!(rimdex->get_option(E->get())==imd->get_option(E->get()))) {
- differ=true;
- break;
- }
- }
-
- if (!differ) {
- texture->set_path(target_path);
- continue; //already imported
- }
- }
- }
-
- EditorTextureImportPlugin::get_singleton()->import(target_path,imd);
-
- }
- }
-
-
-
- progress.step(TTR("Saving.."),104);
-
- Ref<PackedScene> packer = memnew( PackedScene );
- packer->pack(scene);
- //packer->set_path(p_dest_path); do not take over, let the changed files reload themselves
- packer->set_import_metadata(from);
-
- print_line("SAVING TO: "+p_dest_path);
- err = ResourceSaver::save(p_dest_path,packer); //do not take over, let the changed files reload themselves
-
- //EditorFileSystem::get_singleton()->update_resource(packer);
-
- memdelete(scene);
-
- /*
- scene->set_filename(p_dest_path);
- if (r_scene) {
- *r_scene=scene;
- } else {
- memdelete(scene);
- }
-
- String sp;
- if (p_post_import.is_valid() && !p_post_import->get_script().is_null()) {
- Ref<Script> scr = p_post_import->get_script();
- if (scr.is_valid())
- sp=scr->get_path();
- }
-
- String op=_getrelpath(p_path,p_dest_path);
-
- */
-
- EditorNode::get_singleton()->reload_scene(p_dest_path);
-
- return err;
-
-}
-
-
-Error EditorSceneImportPlugin::import(const String& p_dest_path, const Ref<ResourceImportMetadata>& p_from){
-
-
- Node *n=NULL;
- Error err = import1(p_from,&n);
- if (err!=OK) {
- if (n) {
- memdelete(n);
- }
- return err;
- }
- return import2(n,p_dest_path,p_from);
-}
-
-void EditorSceneImportPlugin::add_importer(const Ref<EditorSceneImporter>& p_importer) {
-
- importers.push_back(p_importer);
-}
-
-void EditorSceneImportPlugin::import_from_drop(const Vector<String>& p_drop,const String& p_dest_path) {
-
- List<String> extensions;
- for(int i=0;i<importers.size();i++) {
- importers[i]->get_extensions(&extensions);
- }
- //bool warn_compatible=false;
- for(int i=0;i<p_drop.size();i++) {
-
- String extension = p_drop[i].get_extension().to_lower();
-
- for(List<String>::Element *E=extensions.front();E;E=E->next()) {
-
- if (E->get()==extension) {
-
- dialog->popup_import(String());
- dialog->setup_popup(p_drop[i],p_dest_path);
- return;
- }
- }
- }
-
-}
-
-
-EditorSceneImportPlugin::EditorSceneImportPlugin(EditorNode* p_editor) {
-
- dialog = memnew( EditorSceneImportDialog(p_editor,this) );
- p_editor->get_gui_base()->add_child(dialog);
-}
-
-
-///////////////////////////////
-
-
-String EditorSceneAnimationImportPlugin::get_name() const {
-
- return "anim_3d";
-}
-String EditorSceneAnimationImportPlugin::get_visible_name() const{
-
-
- return TTR("3D Scene Animation");
-}
-void EditorSceneAnimationImportPlugin::import_dialog(const String& p_from){
-
-
-}
-Error EditorSceneAnimationImportPlugin::import(const String& p_path, const Ref<ResourceImportMetadata>& p_from){
-
- return OK;
-}
-
-EditorSceneAnimationImportPlugin::EditorSceneAnimationImportPlugin(EditorNode* p_editor) {
-
-
-}
-#endif
diff --git a/editor/io_plugins/editor_scene_import_plugin.h b/editor/io_plugins/editor_scene_import_plugin.h
deleted file mode 100644
index 44526deb8b..0000000000
--- a/editor/io_plugins/editor_scene_import_plugin.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*************************************************************************/
-/* editor_scene_import_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef EDITOR_SCENE_IMPORT_PLUGIN_H
-#define EDITOR_SCENE_IMPORT_PLUGIN_H
-#if 0
-#include "editor/editor_dir_dialog.h"
-#include "editor/editor_file_system.h"
-#include "editor/editor_import_export.h"
-#include "editor/io_plugins/editor_texture_import_plugin.h"
-#include "scene/gui/dialogs.h"
-#include "scene/gui/file_dialog.h"
-#include "scene/gui/label.h"
-#include "scene/gui/line_edit.h"
-#include "scene/gui/option_button.h"
-#include "scene/gui/progress_bar.h"
-#include "scene/gui/slider.h"
-#include "scene/gui/spin_box.h"
-#include "scene/gui/tree.h"
-#include "scene/resources/animation.h"
-#include "scene/resources/mesh.h"
-
-
-class EditorNode;
-class EditorSceneImportDialog;
-
-class EditorSceneImporter : public Reference {
-
- GDCLASS(EditorSceneImporter,Reference );
-public:
-
- enum ImportFlags {
- IMPORT_SCENE=1,
- IMPORT_ANIMATION=2,
- IMPORT_ANIMATION_DETECT_LOOP=4,
- IMPORT_ANIMATION_OPTIMIZE=8,
- IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS=16,
- IMPORT_ANIMATION_KEEP_VALUE_TRACKS=32,
- IMPORT_GENERATE_TANGENT_ARRAYS=256,
- IMPORT_FAIL_ON_MISSING_DEPENDENCIES=512
-
- };
-
- virtual uint32_t get_import_flags() const=0;
- virtual void get_extensions(List<String> *r_extensions) const=0;
- virtual Node* import_scene(const String& p_path,uint32_t p_flags,int p_bake_fps,List<String> *r_missing_deps,Error* r_err=NULL)=0;
- virtual Ref<Animation> import_animation(const String& p_path,uint32_t p_flags)=0;
-
-
-
- EditorSceneImporter();
-};
-
-/////////////////////////////////////////
-
-
-//Plugin for post processing scenes or images
-
-class EditorScenePostImport : public Reference {
-
- GDCLASS(EditorScenePostImport,Reference );
-protected:
-
- static void _bind_methods();
-public:
-
- virtual Node* post_import(Node* p_scene);
- EditorScenePostImport();
-};
-
-
-class EditorSceneImportPlugin : public EditorImportPlugin {
-
- GDCLASS(EditorSceneImportPlugin,EditorImportPlugin);
-
- EditorSceneImportDialog *dialog;
-
- Vector<Ref<EditorSceneImporter> > importers;
-
- enum TextureRole {
- TEXTURE_ROLE_DEFAULT,
- TEXTURE_ROLE_DIFFUSE,
- TEXTURE_ROLE_NORMALMAP
- };
-
- void _find_resources(const Variant& p_var,Map<Ref<ImageTexture>,TextureRole >& image_map,int p_flags);
- Node* _fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>,Ref<Shape> > &collision_map,uint32_t p_flags,Map<Ref<ImageTexture>,TextureRole >& image_map);
- void _create_clips(Node *scene, const Array& p_clips, bool p_bake_all);
- void _filter_anim_tracks(Ref<Animation> anim,Set<String> &keep);
- void _filter_tracks(Node *scene, const String& p_text);
- void _optimize_animations(Node *scene, float p_max_lin_error,float p_max_ang_error,float p_max_angle);
-
- void _tag_import_paths(Node *p_scene,Node *p_node);
-
- void _find_resources_to_merge(Node *scene, Node *node, bool p_merge_material, Map<String,Ref<Material> >&materials, bool p_merge_anims, Map<String,Ref<Animation> >& merged_anims, Set<Ref<Mesh> > &tested_meshes);
- void _merge_found_resources(Node *scene, Node *node, bool p_merge_material, const Map<String, Ref<Material> > &materials, bool p_merge_anims, const Map<String,Ref<Animation> >& merged_anims, Set<Ref<Mesh> > &tested_meshes);
-
-
-public:
-
- enum SceneFlags {
-
- SCENE_FLAG_CREATE_COLLISIONS=1<<0,
- SCENE_FLAG_CREATE_PORTALS=1<<1,
- SCENE_FLAG_CREATE_ROOMS=1<<2,
- SCENE_FLAG_SIMPLIFY_ROOMS=1<<3,
- SCENE_FLAG_CREATE_BILLBOARDS=1<<4,
- SCENE_FLAG_CREATE_IMPOSTORS=1<<5,
- SCENE_FLAG_CREATE_LODS=1<<6,
- SCENE_FLAG_CREATE_CARS=1<<8,
- SCENE_FLAG_CREATE_WHEELS=1<<9,
- SCENE_FLAG_DETECT_ALPHA=1<<15,
- SCENE_FLAG_DETECT_VCOLOR=1<<16,
- SCENE_FLAG_CREATE_NAVMESH=1<<17,
- SCENE_FLAG_DETECT_LIGHTMAP_LAYER=1<<18,
-
- SCENE_FLAG_MERGE_KEEP_MATERIALS=1<<20,
- SCENE_FLAG_MERGE_KEEP_EXTRA_ANIM_TRACKS=1<<21,
-
- SCENE_FLAG_REMOVE_NOIMP=1<<24,
- SCENE_FLAG_IMPORT_ANIMATIONS=1<<25,
- SCENE_FLAG_COMPRESS_GEOMETRY=1<<26,
- SCENE_FLAG_GENERATE_TANGENT_ARRAYS=1<<27,
- SCENE_FLAG_LINEARIZE_DIFFUSE_TEXTURES=1<<28,
- SCENE_FLAG_SET_LIGHTMAP_TO_UV2_IF_EXISTS=1<<29,
- SCENE_FLAG_CONVERT_NORMALMAPS_TO_XY=1<<30,
- };
-
-
-
- virtual String get_name() const;
- virtual String get_visible_name() const;
- virtual void import_dialog(const String& p_from="");
- virtual Error import(const String& p_path, const Ref<ResourceImportMetadata>& p_from);
-
- Error import1(const Ref<ResourceImportMetadata>& p_from,Node**r_node,List<String> *r_missing=NULL);
- Error import2(Node* p_scene,const String& p_path, const Ref<ResourceImportMetadata>& p_from);
-
- void add_importer(const Ref<EditorSceneImporter>& p_importer);
- const Vector<Ref<EditorSceneImporter> >& get_importers() { return importers; }
-
- virtual void import_from_drop(const Vector<String>& p_drop,const String& p_dest_path);
-
- EditorSceneImportPlugin(EditorNode* p_editor=NULL);
-
-
-};
-
-
-class EditorSceneAnimationImportPlugin : public EditorImportPlugin {
-
- GDCLASS(EditorSceneAnimationImportPlugin,EditorImportPlugin);
-public:
-
-
- enum AnimationFlags {
-
- ANIMATION_DETECT_LOOP=1,
- ANIMATION_KEEP_VALUE_TRACKS=2,
- ANIMATION_OPTIMIZE=4,
- ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS=8
- };
-
- virtual String get_name() const;
- virtual String get_visible_name() const;
- virtual void import_dialog(const String& p_from="");
- virtual Error import(const String& p_path, const Ref<ResourceImportMetadata>& p_from);
-
- EditorSceneAnimationImportPlugin(EditorNode* p_editor=NULL);
-
-
-};
-
-#endif
-#endif // EDITOR_SCENE_IMPORT_PLUGIN_H
diff --git a/editor/io_plugins/editor_scene_importer_fbxconv.cpp b/editor/io_plugins/editor_scene_importer_fbxconv.cpp
deleted file mode 100644
index 784ad8536e..0000000000
--- a/editor/io_plugins/editor_scene_importer_fbxconv.cpp
+++ /dev/null
@@ -1,1137 +0,0 @@
-/*************************************************************************/
-/* editor_scene_importer_fbxconv.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "editor_scene_importer_fbxconv.h"
-
-#include "editor/editor_settings.h"
-#include "os/file_access.h"
-#include "os/os.h"
-#include "scene/3d/mesh_instance.h"
-#include "scene/animation/animation_player.h"
-
-#if 0
-String EditorSceneImporterFBXConv::_id(const String& p_id) const {
-
- return p_id.replace(":","_").replace("/","_");
-}
-
-uint32_t EditorSceneImporterFBXConv::get_import_flags() const {
-
- return IMPORT_SCENE|IMPORT_ANIMATION;
-}
-void EditorSceneImporterFBXConv::get_extensions(List<String> *r_extensions) const{
-
- r_extensions->push_back("fbx");
- r_extensions->push_back("g3dj");
-}
-
-
-Color EditorSceneImporterFBXConv::_get_color(const Array& a) {
-
- if (a.size()<3)
- return Color();
- Color c;
- c.r=a[0];
- c.g=a[1];
- c.b=a[2];
- if (a.size()>=4)
- c.a=a[3];
- return c;
-
-}
-
-Transform EditorSceneImporterFBXConv::_get_transform_mixed(const Dictionary& d,const Dictionary& dbase) {
-
-
-
-
- Array translation;
-
- if (d.has("translation"))
- translation=d["translation"];
- else if (dbase.has("translation"))
- translation=dbase["translation"];
-
- Array rotation;
-
- if (d.has("rotation"))
- rotation=d["rotation"];
- else if (dbase.has("rotation"))
- rotation=dbase["rotation"];
-
- Array scale;
-
- if (d.has("scale"))
- scale=d["scale"];
- else if (dbase.has("scale"))
- scale=dbase["scale"];
-
- Transform t;
-
-
- if (translation.size()) {
- Array tr = translation;
- if (tr.size()>=3) {
- t.origin.x=tr[0];
- t.origin.y=tr[1];
- t.origin.z=tr[2];
- }
- }
-
- if (rotation.size()) {
-
- Array r = rotation;
- if (r.size()>=4) {
-
- Quat q;
- q.x = r[0];
- q.y = r[1];
- q.z = r[2];
- q.w = r[3];
- t.basis=Matrix3(q);
- }
- }
-
-
- if (scale.size()) {
-
- Array sc = scale;
- if (sc.size()>=3) {
- Vector3 s;
- s.x=sc[0];
- s.y=sc[1];
- s.z=sc[2];
- t.basis.scale(s);
- }
- }
-
- return t;
-
-
-}
-
-Transform EditorSceneImporterFBXConv::_get_transform(const Dictionary& d) {
-
-
- Transform t;
-
- if (d.has("translation")) {
- Array tr = d["translation"];
- if (tr.size()>=3) {
- t.origin.x=tr[0];
- t.origin.y=tr[1];
- t.origin.z=tr[2];
- }
- }
-
- if (d.has("rotation")) {
-
- Array r = d["rotation"];
- if (r.size()>=4) {
-
- Quat q;
- q.x = r[0];
- q.y = r[1];
- q.z = r[2];
- q.w = r[3];
- t.basis=Matrix3(q);
- }
- }
-
-
- if (d.has("scale")) {
-
- Array sc = d["scale"];
- if (sc.size()>=3) {
- Vector3 s;
- s.x=sc[0];
- s.y=sc[1];
- s.z=sc[2];
- t.basis.scale(s);
- }
- }
-
- return t;
-}
-
-
-void EditorSceneImporterFBXConv::_detect_bones_in_nodes(State& state,const Array& p_nodes) {
-
-
- for(int i=0;i<p_nodes.size();i++) {
-
- Dictionary d = p_nodes[i];
- if (d.has("isBone") && bool(d["isBone"])) {
-
- String bone_name=_id(d["id"]);
- print_line("IS BONE: "+bone_name);
- if (!state.bones.has(bone_name)) {
- state.bones.insert(bone_name,BoneInfo());
- }
-
- if (!state.bones[bone_name].has_rest) {
- state.bones[bone_name].rest=_get_transform(d).affine_inverse();
- }
-
- state.bones[bone_name].node=d;
-
- //state.bones[name].rest=_get_transform(b);
- }
-
- if (d.has("parts")) {
-
- Array parts=d["parts"];
- for(int j=0;j<parts.size();j++) {
-
- Dictionary p=parts[j];
- if (p.has("bones")) {
- Array bones=p["bones"];
- //omfg
- for(int k=0;k<bones.size();k++) {
-
- Dictionary b = bones[k];
- if (b.has("node")) {
-
- String name = _id(b["node"]);
- if (!state.bones.has(name)) {
- state.bones.insert(name,BoneInfo());
- }
-
- state.bones[name].rest=_get_transform(b);
- state.bones[name].has_rest=true;
- }
- }
- }
-
- }
- }
-
- if (d.has("children")) {
-
- _detect_bones_in_nodes(state,d["children"]);
- }
- }
-
-}
-
-void EditorSceneImporterFBXConv::_parse_skeletons(const String& p_name,State& state, const Array &p_nodes, Skeleton *p_skeleton,int p_parent) {
-
-
-
- for(int i=0;i<p_nodes.size();i++) {
-
-
- Dictionary d = p_nodes[i];
- int bone_idx=-1;
- String id;
- Skeleton* skeleton=p_skeleton;
- if (d.has("id")) {
-
- id=_id(d["id"]);
- if (state.bones.has(id)) {
- //BONER
- if (!skeleton) {
- skeleton=memnew( Skeleton );
- state.skeletons[id]=skeleton;
- }
- bone_idx = skeleton->get_bone_count();
- skeleton->add_bone(id);
- skeleton->set_bone_parent(bone_idx,p_parent);
- skeleton->set_bone_rest(bone_idx,state.bones[id].rest);
- state.bones[id].skeleton=skeleton;
- }
- }
-
- if (d.has("children")) {
-
- _parse_skeletons(id,state,d["children"],skeleton,bone_idx);
- }
- }
-
-}
-
-void EditorSceneImporterFBXConv::_detect_bones(State& state) {
- //This format should mark when a node is a bone,
- //which is the only thing that Collada does right.
- //think about others implementing a parser.
- //Just _one_ string and you avoid loads of lines of code to other people.
-
- for(int i=0;i<state.animations.size();i++) {
-
- Dictionary an = state.animations[i];
- if (an.has("bones")) {
-
- Array bo=an["bones"];
- for(int j=0;j<bo.size();j++) {
-
- Dictionary b=bo[j];
- if (b.has("boneId")) {
-
- String id = b["boneId"];
- if (!state.bones.has(id)) {
- state.bones.insert(id,BoneInfo());
- }
- state.bones[id].has_anim_chan=true; //used in anim
-
-
- }
- }
- }
- }
-
- _detect_bones_in_nodes(state,state.nodes);
- _parse_skeletons("",state,state.nodes,NULL,-1);
-
- print_line("found bones: "+itos(state.bones.size()));
- print_line("found skeletons: "+itos(state.skeletons.size()));
-}
-
-Error EditorSceneImporterFBXConv::_parse_bones(State& state,const Array &p_bones,Skeleton* p_skeleton) {
-
-
-
- return OK;
-}
-
-
-void EditorSceneImporterFBXConv::_add_surface(State& state,Ref<Mesh>& m,const Dictionary &part) {
-
- if (part.has("meshpartid")) {
-
- String id = part["meshpartid"];
- ERR_FAIL_COND(!state.surface_cache.has(id));
-
-
- Ref<Material> mat;
- if (part.has("materialid")) {
- String matid=part["materialid"];
- if (state.material_cache.has(matid)) {
- mat=state.material_cache[matid];
- }
- }
- int idx = m->get_surface_count();
-
- Array array = state.surface_cache[id].array;
- PoolVector<float> indices = array[Mesh::ARRAY_BONES];
- if (indices.size() && part.has("bones")) {
-
-
- Map<int,int> index_map;
-
- Array bones=part["bones"];
-
- for(int i=0;i<bones.size();i++) {
-
- Dictionary bone=bones[i];
- String name=_id(bone["node"]);
-
- if (state.bones.has(name)) {
- int idx=state.bones[name].skeleton->find_bone(name);
- if (idx==-1)
- idx=0;
- index_map[i]=idx;
- }
- }
-
-
-
- int ilen=indices.size();
- {
- PoolVector<float>::Write iw=indices.write();
- for(int j=0;j<ilen;j++) {
- int b = iw[j];
- ERR_CONTINUE(!index_map.has(b));
- b=index_map[b];
- iw[j]=b;
- }
- }
-
- array[Mesh::ARRAY_BONES]=indices;
-
-
- }
-
- m->add_surface(state.surface_cache[id].primitive,array);
- m->surface_set_material(idx,mat);
- m->surface_set_name(idx,id);
- }
-
-}
-
-Error EditorSceneImporterFBXConv::_parse_nodes(State& state,const Array &p_nodes,Node* p_base) {
-
- for(int i=0;i<p_nodes.size();i++) {
-
- Dictionary n = p_nodes[i];
- Spatial *node=NULL;
- bool skip=false;
-
- String id;
- if (n.has("id")) {
- id=_id(n["id"]);
- }
-
- print_line("ID: "+id);
-
- if (state.skeletons.has(id)) {
-
- Skeleton *skeleton = state.skeletons[id];
- node=skeleton;
- skeleton->localize_rests();
- print_line("IS SKELETON! ");
- } else if (state.bones.has(id)) {
- if (p_base)
- node=p_base->cast_to<Spatial>();
- if (!state.bones[id].has_anim_chan) {
- print_line("no has anim "+id);
- }
- skip=true;
- } else if (n.has("parts")) {
- //is a mesh
- MeshInstance *mesh = memnew( MeshInstance );
- node=mesh;
-
- Array parts=n["parts"];
- String long_identifier;
- for(int j=0;j<parts.size();j++) {
-
- Dictionary part=parts[j];
- if (part.has("meshpartid")) {
- String partid=part["meshpartid"];
- long_identifier+=partid;
- }
- }
-
- Ref<Mesh> m;
-
- if (state.mesh_cache.has(long_identifier)) {
- m=state.mesh_cache[long_identifier];
- } else {
- m = Ref<Mesh>( memnew( Mesh ) );
-
- //and parts are surfaces
- for(int j=0;j<parts.size();j++) {
-
- Dictionary part=parts[j];
- if (part.has("meshpartid")) {
- _add_surface(state,m,part);
- }
- }
-
-
- state.mesh_cache[long_identifier]=m;
- }
-
- mesh->set_mesh(m);
- }
-
- if (!skip) {
-
- if (!node) {
- node = memnew( Spatial );
- }
-
- node->set_name(id);
- node->set_transform(_get_transform(n));
- p_base->add_child(node);
- node->set_owner(state.scene);
- }
-
-
- if (n.has("children")) {
- Error err = _parse_nodes(state,n["children"],node);
- if (err)
- return err;
- }
- }
-
- return OK;
-}
-
-
-void EditorSceneImporterFBXConv::_parse_materials(State& state) {
-
- for(int i=0;i<state.materials.size();i++) {
-
- Dictionary material = state.materials[i];
-
- ERR_CONTINUE(!material.has("id"));
- String id = _id(material["id"]);
-
- Ref<SpatialMaterial> mat = memnew( SpatialMaterial );
-
- if (material.has("diffuse")) {
- mat->set_parameter(SpatialMaterial::PARAM_DIFFUSE,_get_color(material["diffuse"]));
- }
-
- if (material.has("specular")) {
- mat->set_parameter(SpatialMaterial::PARAM_SPECULAR,_get_color(material["specular"]));
- }
-
- if (material.has("emissive")) {
- mat->set_parameter(SpatialMaterial::PARAM_EMISSION,_get_color(material["emissive"]));
- }
-
- if (material.has("shininess")) {
- float exp = material["shininess"];
- mat->set_parameter(SpatialMaterial::PARAM_SPECULAR_EXP,exp);
- }
-
- if (material.has("opacity")) {
- Color c = mat->get_parameter(SpatialMaterial::PARAM_DIFFUSE);
- c.a=material["opacity"];
- mat->set_parameter(SpatialMaterial::PARAM_DIFFUSE,c);
- }
-
-
- if (material.has("textures")) {
-
- Array textures = material["textures"];
- for(int j=0;j<textures.size();j++) {
-
- Dictionary texture=textures[j];
- Ref<Texture> tex;
- if (texture.has("filename")) {
-
-
- String filename=texture["filename"];
- String path=state.base_path+"/"+filename.replace("\\","/");
- if (state.texture_cache.has(path)) {
- tex=state.texture_cache[path];
- } else {
- tex = ResourceLoader::load(path,"ImageTexture");
- if (tex.is_null()) {
- if (state.missing_deps)
- state.missing_deps->push_back(path);
- }
- state.texture_cache[path]=tex; //add anyway
- }
- }
-
- if (tex.is_valid() && texture.has("type")) {
-
- String type=texture["type"];
- if (type=="DIFFUSE")
- mat->set_texture(SpatialMaterial::PARAM_DIFFUSE,tex);
- else if (type=="SPECULAR")
- mat->set_texture(SpatialMaterial::PARAM_SPECULAR,tex);
- else if (type=="SHININESS")
- mat->set_texture(SpatialMaterial::PARAM_SPECULAR_EXP,tex);
- else if (type=="NORMAL")
- mat->set_texture(SpatialMaterial::PARAM_NORMAL,tex);
- else if (type=="EMISSIVE")
- mat->set_texture(SpatialMaterial::PARAM_EMISSION,tex);
- }
-
- }
- }
-
- state.material_cache[id]=mat;
-
- }
-
-}
-
-void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
-
- for(int i=0;i<state.meshes.size();i++) {
-
- Dictionary mesh = state.meshes[i];
-
- ERR_CONTINUE(!mesh.has("attributes"));
- ERR_CONTINUE(!mesh.has("vertices"));
- ERR_CONTINUE(!mesh.has("parts"));
-
- print_line("MESH #"+itos(i));
-
- Array attrlist=mesh["attributes"];
- Array vertices=mesh["vertices"];
- bool exists[Mesh::ARRAY_MAX];
- int ofs[Mesh::ARRAY_MAX];
- int weight_max=0;
- int binormal_ofs=-1;
- int weight_ofs[4];
-
- for(int j=0;j<Mesh::ARRAY_MAX;j++) {
- exists[j]=false;
- ofs[j]=0;
- }
- exists[Mesh::ARRAY_INDEX]=true;
- float stride=0;
-
- for(int j=0;j<attrlist.size();j++) {
-
- String attr=attrlist[j];
- if (attr=="POSITION") {
- exists[Mesh::ARRAY_VERTEX]=true;
- ofs[Mesh::ARRAY_VERTEX]=stride;
- stride+=3;
- } else if (attr=="NORMAL") {
- exists[Mesh::ARRAY_NORMAL]=true;
- ofs[Mesh::ARRAY_NORMAL]=stride;
- stride+=3;
- } else if (attr=="COLOR") {
- exists[Mesh::ARRAY_COLOR]=true;
- ofs[Mesh::ARRAY_COLOR]=stride;
- stride+=4;
- } else if (attr=="COLORPACKED") {
- stride+=1; //ignore
- } else if (attr=="TANGENT") {
- exists[Mesh::ARRAY_TANGENT]=true;
- ofs[Mesh::ARRAY_TANGENT]=stride;
- stride+=3;
- } else if (attr=="BINORMAL") {
- binormal_ofs=stride;
- stride+=3;
- } else if (attr=="TEXCOORD0") {
- exists[Mesh::ARRAY_TEX_UV]=true;
- ofs[Mesh::ARRAY_TEX_UV]=stride;
- stride+=2;
- } else if (attr=="TEXCOORD1") {
- exists[Mesh::ARRAY_TEX_UV2]=true;
- ofs[Mesh::ARRAY_TEX_UV2]=stride;
- stride+=2;
- } else if (attr.begins_with("TEXCOORD")) {
- stride+=2;
- } else if (attr.begins_with("BLENDWEIGHT")) {
- int idx=attr.replace("BLENDWEIGHT","").to_int();
- if (idx==0) {
- exists[Mesh::ARRAY_BONES]=true;
- ofs[Mesh::ARRAY_BONES]=stride;
- exists[Mesh::ARRAY_WEIGHTS]=true;
- ofs[Mesh::ARRAY_WEIGHTS]=stride+1;
- } if (idx<4) {
- weight_ofs[idx]=stride;
- weight_max=MAX(weight_max,idx+1);
- }
-
- stride+=2;
- }
-
- print_line("ATTR "+attr+" OFS: "+itos(stride));
-
- }
-
- Array parts=mesh["parts"];
-
- for(int j=0;j<parts.size();j++) {
-
-
-
- Dictionary part=parts[j];
- ERR_CONTINUE(!part.has("indices"));
- ERR_CONTINUE(!part.has("id"));
-
- print_line("PART: "+String(part["id"]));
- Array indices=part["indices"];
- Map<int,int> iarray;
- Map<int,int> array;
-
- for(int k=0;k<indices.size();k++) {
-
- int idx = indices[k];
- if (!iarray.has(idx)) {
- int map_to=array.size();
- iarray[idx]=map_to;
- array[map_to]=idx;
- }
- }
-
- print_line("indices total "+itos(indices.size())+" vertices used: "+itos(array.size()));
-
- Array arrays;
- arrays.resize(Mesh::ARRAY_MAX);
-
-
-
- for(int k=0;k<Mesh::ARRAY_MAX;k++) {
-
-
- if (!exists[k])
- continue;
- print_line("exists: "+itos(k));
- int lofs = ofs[k];
- switch(k) {
-
- case Mesh::ARRAY_VERTEX:
- case Mesh::ARRAY_NORMAL: {
-
- PoolVector<Vector3> vtx;
- vtx.resize(array.size());
- {
- int len=array.size();
- PoolVector<Vector3>::Write w = vtx.write();
- for(int l=0;l<len;l++) {
-
- int pos = array[l];
- w[l].x=vertices[pos*stride+lofs+0];
- w[l].y=vertices[pos*stride+lofs+1];
- w[l].z=vertices[pos*stride+lofs+2];
- }
- }
- arrays[k]=vtx;
-
- } break;
- case Mesh::ARRAY_TANGENT: {
-
- if (binormal_ofs<0)
- break;
-
- PoolVector<float> tangents;
- tangents.resize(array.size()*4);
- {
- int len=array.size();
-
- PoolVector<float>::Write w = tangents.write();
- for(int l=0;l<len;l++) {
-
- int pos = array[l];
- Vector3 n;
- n.x=vertices[pos*stride+ofs[Mesh::ARRAY_NORMAL]+0];
- n.y=vertices[pos*stride+ofs[Mesh::ARRAY_NORMAL]+1];
- n.z=vertices[pos*stride+ofs[Mesh::ARRAY_NORMAL]+2];
- Vector3 t;
- t.x=vertices[pos*stride+lofs+0];
- t.y=vertices[pos*stride+lofs+1];
- t.z=vertices[pos*stride+lofs+2];
- Vector3 bi;
- bi.x=vertices[pos*stride+binormal_ofs+0];
- bi.y=vertices[pos*stride+binormal_ofs+1];
- bi.z=vertices[pos*stride+binormal_ofs+2];
- float d = bi.dot(n.cross(t));
-
- w[l*4+0]=t.x;
- w[l*4+1]=t.y;
- w[l*4+2]=t.z;
- w[l*4+3]=d;
-
- }
- }
- arrays[k]=tangents;
-
- } break;
- case Mesh::ARRAY_COLOR: {
-
- PoolVector<Color> cols;
- cols.resize(array.size());
- {
- int len=array.size();
- PoolVector<Color>::Write w = cols.write();
- for(int l=0;l<len;l++) {
-
- int pos = array[l];
- w[l].r=vertices[pos*stride+lofs+0];
- w[l].g=vertices[pos*stride+lofs+1];
- w[l].b=vertices[pos*stride+lofs+2];
- w[l].a=vertices[pos*stride+lofs+3];
- }
- }
- arrays[k]=cols;
-
- } break;
- case Mesh::ARRAY_TEX_UV:
- case Mesh::ARRAY_TEX_UV2: {
-
- PoolVector<Vector2> uvs;
- uvs.resize(array.size());
- {
- int len=array.size();
- PoolVector<Vector2>::Write w = uvs.write();
- for(int l=0;l<len;l++) {
-
- int pos = array[l];
- w[l].x=vertices[pos*stride+lofs+0];
- w[l].y=vertices[pos*stride+lofs+1];
- w[l].y=1.0-w[l].y;
- }
- }
- arrays[k]=uvs;
-
- } break;
- case Mesh::ARRAY_BONES:
- case Mesh::ARRAY_WEIGHTS: {
-
- PoolVector<float> arr;
- arr.resize(array.size()*4);
- int po=k==Mesh::ARRAY_WEIGHTS?1:0;
- lofs=ofs[Mesh::ARRAY_BONES];
- {
- int len=array.size();
-
- PoolVector<float>::Write w = arr.write();
- for(int l=0;l<len;l++) {
-
- int pos = array[l];
-
- for(int m=0;m<4;m++) {
-
- float val=0;
- if (m<=weight_max)
- val=vertices[pos*stride+lofs+m*2+po];
- w[l*4+m]=val;
- }
- }
- }
-
- arrays[k]=arr;
- } break;
- case Mesh::ARRAY_INDEX: {
-
- PoolVector<int> arr;
- arr.resize(indices.size());
- {
- int len=indices.size();
-
- PoolVector<int>::Write w = arr.write();
- for(int l=0;l<len;l++) {
-
- w[l]=iarray[ indices[l] ];
- }
- }
-
- arrays[k]=arr;
-
- } break;
-
-
- }
-
-
- }
-
- Mesh::PrimitiveType pt=Mesh::PRIMITIVE_TRIANGLES;
-
- if (part.has("type")) {
- String type=part["type"];
- if (type=="LINES")
- pt=Mesh::PRIMITIVE_LINES;
- else if (type=="POINTS")
- pt=Mesh::PRIMITIVE_POINTS;
- else if (type=="TRIANGLE_STRIP")
- pt=Mesh::PRIMITIVE_TRIANGLE_STRIP;
- else if (type=="LINE_STRIP")
- pt=Mesh::PRIMITIVE_LINE_STRIP;
- }
-
- if (pt==Mesh::PRIMITIVE_TRIANGLES) {
- PoolVector<int> ia=arrays[Mesh::ARRAY_INDEX];
- int len=ia.size();
- {
- PoolVector<int>::Write w=ia.write();
- for(int l=0;l<len;l+=3) {
- SWAP(w[l+1],w[l+2]);
- }
- }
- arrays[Mesh::ARRAY_INDEX]=ia;
-
-
- }
- SurfaceInfo si;
- si.array=arrays;
- si.primitive=pt;
- state.surface_cache[_id(part["id"])]=si;
-
- }
- }
-}
-
-
-Error EditorSceneImporterFBXConv::_parse_animations(State& state) {
-
- AnimationPlayer *ap = memnew( AnimationPlayer );
-
- state.scene->add_child(ap);
- ap->set_owner(state.scene);
-
- for(int i=0;i<state.animations.size();i++) {
-
- Dictionary anim = state.animations[i];
- ERR_CONTINUE(!anim.has("id"));
- Ref<Animation> an = memnew( Animation );
- an->set_name(_id(anim["id"]));
-
-
- if (anim.has("bones")) {
-
- Array bone_tracks = anim["bones"];
- for(int j=0;j<bone_tracks.size();j++) {
- Dictionary bone_track=bone_tracks[j];
- String bone = bone_track["boneId"];
- if (!bone_track.has("keyframes"))
- continue;
- if (!state.bones.has(bone))
- continue;
-
- Skeleton *sk = state.bones[bone].skeleton;
-
- if (!sk)
- continue;
- int bone_idx=sk->find_bone(bone);
- if (bone_idx==-1)
- continue;
-
-
-
- String path = state.scene->get_path_to(sk);
- path+=":"+bone;
- an->add_track(Animation::TYPE_TRANSFORM);
- int tidx = an->get_track_count()-1;
- an->track_set_path(tidx,path);
-
-
- Dictionary parent_xform_dict;
- Dictionary xform_dict;
-
- if (state.bones.has(bone)) {
- xform_dict=state.bones[bone].node;
- }
-
-
- Array parent_keyframes;
- if (sk->get_bone_parent(bone_idx)!=-1) {
- String parent_name = sk->get_bone_name(sk->get_bone_parent(bone_idx));
- if (state.bones.has(parent_name)) {
- parent_xform_dict=state.bones[parent_name].node;
- }
-
- print_line("parent for "+bone+"? "+parent_name+" XFD: "+String(Variant(parent_xform_dict)));
- for(int k=0;k<bone_tracks.size();k++) {
- Dictionary d = bone_tracks[k];
- if (d["boneId"]==parent_name) {
- parent_keyframes=d["keyframes"];
- print_line("found keyframes");
- break;
- }
- }
-
-
- }
-
- print_line("BONE XFD "+String(Variant(xform_dict)));
-
- Array keyframes=bone_track["keyframes"];
-
- for(int k=0;k<keyframes.size();k++) {
-
- Dictionary key=keyframes[k];
- Transform xform=_get_transform_mixed(key,xform_dict);
- float time = key["keytime"];
- time=time/1000.0;
-#if 0
- if (parent_keyframes.size()) {
- //localize
- print_line(itos(k)+" localizate for: "+bone);
-
- float prev_kt=-1;
- float kt;
- int idx=0;
-
- for(int l=0;l<parent_keyframes.size();l++) {
-
- Dictionary d=parent_keyframes[l];
- kt=d["keytime"];
- kt=kt/1000.0;
- if (kt>time)
- break;
- prev_kt=kt;
- idx++;
-
- }
-
- Transform t;
- if (idx==0) {
- t=_get_transform_mixed(parent_keyframes[0],parent_xform_dict);
- } else if (idx==parent_keyframes.size()){
- t=_get_transform_mixed(parent_keyframes[idx-1],parent_xform_dict);
- } else {
- t=_get_transform_mixed(parent_keyframes[idx-1],parent_xform_dict);
- float d = (time-prev_kt)/(kt-prev_kt);
- if (d>0) {
- Transform t2=_get_transform_mixed(parent_keyframes[idx],parent_xform_dict);
- t=t.interpolate_with(t2,d);
- } else {
- print_line("exact: "+rtos(kt));
- }
- }
-
- xform = t.affine_inverse() * xform; //localize
- } else if (!parent_xform_dict.empty()) {
- Transform t = _get_transform(parent_xform_dict);
- xform = t.affine_inverse() * xform; //localize
- }
-#endif
-
- xform = sk->get_bone_rest(bone_idx).affine_inverse() * xform;
-
-
- Quat q = xform.basis;
- q.normalize();
- Vector3 s = xform.basis.get_scale();
- Vector3 l = xform.origin;
-
-
-
- an->transform_track_insert_key(tidx,time,l,q,s);
-
- }
-
- }
-
-
- }
-
-
- ap->add_animation(_id(anim["id"]),an);
-
- }
-
- return OK;
-}
-
-Error EditorSceneImporterFBXConv::_parse_json(State& state, const String &p_path) {
-
- //not the happiest....
- Vector<uint8_t> data = FileAccess::get_file_as_array(p_path);
- ERR_FAIL_COND_V(!data.size(),ERR_FILE_CANT_OPEN);
- String str;
- bool utferr = str.parse_utf8((const char*)data.ptr(),data.size());
- ERR_FAIL_COND_V(utferr,ERR_PARSE_ERROR);
-
- Dictionary dict;
- Error err = dict.parse_json(str);
- str=String(); //free mem immediately
- ERR_FAIL_COND_V(err,err);
-
- if (dict.has("meshes"))
- state.meshes=dict["meshes"];
- if (dict.has("materials"))
- state.materials=dict["materials"];
- if (dict.has("nodes"))
- state.nodes=dict["nodes"];
- if (dict.has("animations"))
- state.animations=dict["animations"];
-
-
- state.scene = memnew( Spatial );
- _detect_bones(state);
- _parse_surfaces(state);
- _parse_materials(state);
- err = _parse_nodes(state,state.nodes,state.scene);
- if (err)
- return err;
-
- if (state.import_animations) {
- err = _parse_animations(state);
- if (err)
- return err;
- }
-
- print_line("JSON PARSED O-K!");
-
- return OK;
-}
-
-Error EditorSceneImporterFBXConv::_parse_fbx(State& state,const String& p_path) {
-
- state.base_path=p_path.get_base_dir();
-
- if (p_path.to_lower().ends_with("g3dj")) {
- return _parse_json(state,p_path.basename()+".g3dj");
- }
-
- String tool = EDITOR_DEF("fbxconv/path","");
- ERR_FAIL_COND_V( !FileAccess::exists(tool),ERR_UNCONFIGURED);
- String wine = EDITOR_DEF("fbxconv/use_wine","");
-
- List<String> args;
- String path=p_path;
- if (wine!="") {
- List<String> wpargs;
- wpargs.push_back("-w");
- wpargs.push_back(p_path);
- String pipe; //winepath to convert to windows path
- int wpres;
- Error wperr = OS::get_singleton()->execute(wine+"path",wpargs,true,NULL,&pipe,&wpres);
- ERR_FAIL_COND_V(wperr!=OK,ERR_CANT_CREATE);
- ERR_FAIL_COND_V(wpres!=0,ERR_CANT_CREATE);
- path=pipe.strip_edges();
- args.push_back(tool);
- tool=wine;
- }
-
- args.push_back("-o");
- args.push_back("G3DJ");
- args.push_back(path);
-
- int res;
- Error err = OS::get_singleton()->execute(tool,args,true,NULL,NULL,&res);
- ERR_FAIL_COND_V(err!=OK,ERR_CANT_CREATE);
- ERR_FAIL_COND_V(res!=0,ERR_CANT_CREATE);
-
- return _parse_json(state,p_path.basename()+".g3dj");
-
-
-}
-
-Node* EditorSceneImporterFBXConv::import_scene(const String& p_path,uint32_t p_flags,List<String> *r_missing_deps,Error* r_err){
-
- State state;
- state.scene=NULL;
- state.missing_deps=r_missing_deps;
- state.import_animations=p_flags&IMPORT_ANIMATION;
- Error err = _parse_fbx(state,p_path);
- if (err!=OK) {
- if (r_err)
- *r_err=err;
- return NULL;
- }
-
-
- return state.scene;
-}
-Ref<Animation> EditorSceneImporterFBXConv::import_animation(const String& p_path,uint32_t p_flags){
-
-
- return Ref<Animation>();
-}
-
-
-EditorSceneImporterFBXConv::EditorSceneImporterFBXConv() {
-
- EDITOR_DEF("fbxconv/path","");
-#ifndef WINDOWS_ENABLED
- EDITOR_DEF("fbxconv/use_wine","");
- EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"fbxconv/use_wine",PROPERTY_HINT_GLOBAL_FILE));
- EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"fbxconv/path",PROPERTY_HINT_GLOBAL_FILE));
-#else
- EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"fbxconv/path",PROPERTY_HINT_GLOBAL_FILE,"exe"));
-#endif
-
-}
-#endif
diff --git a/editor/io_plugins/editor_scene_importer_fbxconv.h b/editor/io_plugins/editor_scene_importer_fbxconv.h
deleted file mode 100644
index d191a17489..0000000000
--- a/editor/io_plugins/editor_scene_importer_fbxconv.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*************************************************************************/
-/* editor_scene_importer_fbxconv.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef EDITOR_SCENE_IMPORTER_FBXCONV_H
-#define EDITOR_SCENE_IMPORTER_FBXCONV_H
-
-#include "editor/io_plugins/editor_scene_import_plugin.h"
-#include "scene/3d/skeleton.h"
-
-#if 0
-
-class EditorSceneImporterFBXConv : public EditorSceneImporter {
-
- GDCLASS(EditorSceneImporterFBXConv,EditorSceneImporter );
-
-
- struct BoneInfo {
-
- Skeleton *skeleton;
- Transform rest;
- int index;
- bool has_anim_chan;
- bool has_rest;
- Dictionary node;
- BoneInfo() {
- has_rest=false;
- skeleton=NULL;
- index=-1;
- has_anim_chan=false;
- }
- };
-
- struct SurfaceInfo {
- Array array;
- Mesh::PrimitiveType primitive;
- };
-
- struct State {
-
- Node *scene;
- Array meshes;
- Array materials;
- Array nodes;
- Array animations;
- Map<String,BoneInfo > bones;
- Map<String,Skeleton*> skeletons;
- Map<String,Ref<Mesh> > mesh_cache;
- Map<String,SurfaceInfo> surface_cache;
- Map<String,Ref<Material> > material_cache;
- Map<String,Ref<Texture> > texture_cache;
- List<String> *missing_deps;
- String base_path;
- bool import_animations;
- };
-
- String _id(const String& p_id) const;
-
- Transform _get_transform_mixed(const Dictionary& d, const Dictionary& dbase);
- Transform _get_transform(const Dictionary& d);
- Color _get_color(const Array& a);
- void _detect_bones_in_nodes(State& state,const Array& p_nodes);
- void _detect_bones(State& state);
-
- Error _parse_bones(State& state,const Array &p_bones,Skeleton* p_skeleton);
- void _parse_skeletons(const String& p_name,State& state, const Array &p_nodes, Skeleton*p_skeleton=NULL, int p_parent=-1);
-
- void _add_surface(State& state,Ref<Mesh>& m,const Dictionary &part);
- Error _parse_nodes(State& state,const Array &p_nodes,Node* p_base);
- Error _parse_animations(State& state);
- void _parse_materials(State& state);
- void _parse_surfaces(State& state);
- Error _parse_json(State& state,const String& p_path);
- Error _parse_fbx(State &state, const String &p_path);
-
-public:
-
- virtual uint32_t get_import_flags() const;
- virtual void get_extensions(List<String> *r_extensions) const;
- virtual Node* import_scene(const String& p_path,uint32_t p_flags,List<String> *r_missing_deps=NULL,Error* r_err=NULL);
- virtual Ref<Animation> import_animation(const String& p_path,uint32_t p_flags);
-
- EditorSceneImporterFBXConv();
-};
-
-#endif // EDITOR_SCENE_IMPORTER_FBXCONV_H
-#endif
diff --git a/editor/io_plugins/editor_texture_import_plugin.cpp b/editor/io_plugins/editor_texture_import_plugin.cpp
deleted file mode 100644
index 1dc2641474..0000000000
--- a/editor/io_plugins/editor_texture_import_plugin.cpp
+++ /dev/null
@@ -1,1896 +0,0 @@
-/*************************************************************************/
-/* editor_texture_import_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "editor_texture_import_plugin.h"
-
-#if 0
-#include "editor/editor_node.h"
-#include "editor/editor_settings.h"
-#include "editor_atlas.h"
-#include "io/image_loader.h"
-#include "io/marshalls.h"
-#include "io/resource_saver.h"
-#include "project_settings.h"
-#include "scene/gui/button_group.h"
-#include "scene/gui/check_button.h"
-#include "scene/gui/margin_container.h"
-#include "scene/io/resource_format_image.h"
-
-#include "thirdparty/misc/md5.h"
-
-static const char *flag_names[]={
- ("Streaming Format"),
- ("Fix Border Alpha"),
- ("Alpha Bit Hint"),
- ("Compress Extra (PVRTC2)"),
- ("No MipMaps"),
- ("Repeat"),
- ("Filter (Magnifying)"),
- ("Premultiply Alpha"),
- ("Convert SRGB->Linear"),
- ("Convert NormalMap to XY"),
- ("Use Anisotropy"),
- NULL
-};
-
-#if 0 // not used
-static const char *flag_short_names[]={
- "Stream",
- "FixBorder",
- "AlphBit",
- "ExtComp",
- "NoMipMap",
- "Repeat",
- "Filter",
- "PMAlpha",
- "ToLinear",
- "ToRG",
- "Anisoropic",
- NULL
-};
-#endif
-
-
-void EditorImportTextureOptions::set_format(EditorTextureImportPlugin::ImageFormat p_format) {
-
- updating=true;
- format->select(p_format);
- if (p_format==EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSY) {
- quality_vb->show();
- } else {
- quality_vb->hide();
- }
-
- updating=false;
-
-}
-
-EditorTextureImportPlugin::ImageFormat EditorImportTextureOptions::get_format() const{
-
- return (EditorTextureImportPlugin::ImageFormat)format->get_selected();
-
-}
-
-void EditorImportTextureOptions::set_flags(uint32_t p_flags){
-
- updating=true;
- for(int i=0;i<items.size();i++) {
-
- items[i]->set_checked(0,p_flags&(1<<i));
- }
- updating=false;
-
-}
-
-void EditorImportTextureOptions::set_quality(float p_quality) {
-
- quality->set_value(p_quality);
-}
-
-float EditorImportTextureOptions::get_quality() const {
-
- return quality->get_value();
-}
-
-
-uint32_t EditorImportTextureOptions::get_flags() const{
-
- uint32_t f=0;
- for(int i=0;i<items.size();i++) {
-
- if (items[i]->is_checked(0))
- f|=(1<<i);
- }
-
- return f;
-}
-
-void EditorImportTextureOptions::_changedp(int p_value) {
-
- _changed();
-}
-
-void EditorImportTextureOptions::_changed() {
-
- if (updating)
- return;
- if (format->get_selected()==EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSY) {
- quality_vb->show();
- } else {
- quality_vb->hide();
- }
-
- emit_signal("changed");
-}
-
-
-void EditorImportTextureOptions::_bind_methods() {
-
- ClassDB::bind_method("_changed",&EditorImportTextureOptions::_changed);
- ClassDB::bind_method("_changedp",&EditorImportTextureOptions::_changedp);
-
- ADD_SIGNAL(MethodInfo("changed"));
-}
-
-
-void EditorImportTextureOptions::_notification(int p_what) {
-
- if (p_what==NOTIFICATION_ENTER_TREE) {
-
- flags->connect("item_edited",this,"_changed");
- format->connect("item_selected",this,"_changedp");
- }
-}
-
-void EditorImportTextureOptions::show_2d_notice() {
-
- //notice_for_2d->show();
-}
-
-EditorImportTextureOptions::EditorImportTextureOptions() {
-
-
- add_constant_override("separation",3);
- updating=false;
- format = memnew( OptionButton );
-
- format->add_item(TTR("Uncompressed"),EditorTextureImportPlugin::IMAGE_FORMAT_UNCOMPRESSED);
- format->add_item(TTR("Compress Lossless (PNG)"),EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSLESS);
- format->add_item(TTR("Compress Lossy (WebP)"),EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSY);
- format->add_item(TTR("Compress (VRAM)"),EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_RAM);
-
-
- add_margin_child(TTR("Texture Format"),format);
-
- quality_vb = memnew( VBoxContainer );
-
- HBoxContainer *quality_hb = memnew(HBoxContainer);
- HSlider *hs = memnew( HSlider );
- hs->set_h_size_flags(SIZE_EXPAND_FILL);
- hs->set_stretch_ratio(0.8);
- quality_hb->add_child(hs);
- quality_hb->set_h_size_flags(SIZE_EXPAND_FILL);
- SpinBox *sb = memnew( SpinBox );
- sb->set_h_size_flags(SIZE_EXPAND_FILL);
- sb->set_stretch_ratio(0.2);
- quality_hb->add_child(sb);
- sb->share(hs);
- hs->set_min(0);
- hs->set_max(1.0);
- hs->set_step(0.01);
- hs->set_value(0.7);
- quality=hs;
- quality_vb->add_margin_child(TTR("Texture Compression Quality (WebP):"),quality_hb);
-
- add_child(quality_vb);
-
- flags = memnew( Tree );
- flags->set_hide_root(true);
- TreeItem *root = flags->create_item();
-
-
-
- const char ** fname=flag_names;
-
- while( *fname ) {
-
- TreeItem*ti = flags->create_item(root);
- ti->set_cell_mode(0,TreeItem::CELL_MODE_CHECK);
- ti->set_text(0,*fname);
- ti->set_editable(0,true);
- items.push_back(ti);
- fname++;
- }
-
- add_margin_child(TTR("Texture Options"),flags,true);
-
-
-}
-
-///////////////////////////////////////////////////////////
-
-
-
-
-class EditorTextureImportDialog : public ConfirmationDialog {
-
- GDCLASS(EditorTextureImportDialog,ConfirmationDialog);
-
-
-
- HBoxContainer *mode_hb;
- CheckBox *mode_check[EditorTextureImportPlugin::MODE_MAX];
-
- EditorImportTextureOptions *texture_options;
-
- EditorTextureImportPlugin::Mode mode;
- //EditorNode *editor;
-
- LineEdit *import_path;
- LineEdit *save_path;
- EditorFileDialog *file_select;
- EditorFileDialog *save_file_select;
- EditorDirDialog *save_select;
- OptionButton *texture_action;
- ConfirmationDialog *error_dialog;
- CheckButton *crop_source;
- SpinBox *size;
-
- MarginContainer *size_mc;
- Label* size_label;
-
- Label* source_label;
- Label *notice_for_2d;
-
- EditorTextureImportPlugin *plugin;
-
- void _mode_changed(int p_mode);
- void _choose_files(const Vector<String>& p_path);
- void _choose_file(const String& p_path);
- void _choose_save_dir(const String& p_path);
- void _browse();
- void _browse_target();
- void _import();
-
-
-protected:
-
- void _notification(int p_what);
- static void _bind_methods();
-public:
-
-
- void setup_multiple_import_3d(const Vector<String>& p_path,const String& p_dest) {
-
- _mode_changed(EditorTextureImportPlugin::MODE_TEXTURE_3D);
- _choose_files(p_path);
- _choose_save_dir(p_dest);
- }
-
- void add_sources_and_dest(const Vector<String>& p_path,const String& p_dest) {
-
- _choose_files(p_path);
- _choose_save_dir(p_dest);
- }
-
- Error import(const String& p_from, const String& p_to, const String& p_preset);
- void popup_import(const String &p_from=String());
- EditorTextureImportDialog(EditorTextureImportPlugin *p_plugin=NULL);
-};
-
-
-/////////////////////////////////////////////////////////
-
-
-
-
-void EditorTextureImportDialog::_choose_files(const Vector<String>& p_path) {
-
- String files;
- for(int i=0;i<p_path.size();i++) {
-
- if (i>0)
- files+=",";
- files+=p_path[i];
- }
- /*
- if (p_path.size()) {
- String srctex=p_path[0];
- String ipath = EditorImportDB::get_singleton()->find_source_path(srctex);
-
- if (ipath!="")
- save_path->set_text(ipath.get_base_dir());
- }*/
- import_path->set_text(files);
-
-}
-
-
-
-void EditorTextureImportDialog::_choose_file(const String& p_path) {
-
-
- import_path->set_text(p_path);
-
-}
-void EditorTextureImportDialog::_choose_save_dir(const String& p_path) {
-
- save_path->set_text(p_path);
-}
-
-
-void EditorTextureImportDialog::_import() {
-
-
- //ImportMonitorBlock imb;
-
- Vector<String> files=import_path->get_text().split(",");
-
- if (!files.size()) {
-
- error_dialog->set_text(TTR("Please specify some files!"));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
- }
-
- String dst_path=save_path->get_text();
-
- if (save_path->get_text().strip_edges()=="") {
- error_dialog->set_text(TTR("Target path is empty."));
- error_dialog->popup_centered_minsize();
- return;
- }
-
- if (!save_path->get_text().begins_with("res://")) {
- error_dialog->set_text(TTR("Target path must be a complete resource path."));
- error_dialog->popup_centered_minsize();
- return;
- }
-
-
- if (mode!=EditorTextureImportPlugin::MODE_ATLAS && mode!=EditorTextureImportPlugin::MODE_LARGE && !DirAccess::exists(save_path->get_text())) {
- error_dialog->set_text(TTR("Target path must exist."));
- error_dialog->popup_centered_minsize();
- return;
- }
-
- if (mode==EditorTextureImportPlugin::MODE_ATLAS) { //atlas
-
- if (files.size()==0) {
-
- error_dialog->set_text(TTR("At least one file needed for Atlas."));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
-
- }
- String dst_file = dst_path;
- //dst_file=dst_file.basename()+".tex";
- Ref<ResourceImportMetadata> imd = memnew( ResourceImportMetadata );
- //imd->set_editor();
- for(int i=0;i<files.size();i++) {
- imd->add_source(EditorImportPlugin::validate_source_path(files[i]));
- }
- imd->set_option("format",texture_options->get_format());
- imd->set_option("flags",texture_options->get_flags());
- imd->set_option("quality",texture_options->get_quality());
- imd->set_option("atlas",true);
- imd->set_option("atlas_size",int(size->get_value()));
- imd->set_option("large",false);
- imd->set_option("crop",crop_source->is_pressed());
- imd->set_option("mode",mode);
-
- Error err = plugin->import(dst_file,imd);
- if (err) {
-
- error_dialog->set_text(TTR("Error importing:")+" "+dst_file.get_file());
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
-
- }
- } else if (mode==EditorTextureImportPlugin::MODE_LARGE) { //large
-
- if (files.size()!=1) {
-
- error_dialog->set_text(TTR("Only one file is required for large texture."));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
-
- }
- String dst_file = dst_path;
- //dst_file=dst_file.basename()+".tex";
- Ref<ResourceImportMetadata> imd = memnew( ResourceImportMetadata );
- //imd->set_editor();
- for(int i=0;i<files.size();i++) {
- imd->add_source(EditorImportPlugin::validate_source_path(files[i]));
- }
- imd->set_option("format",texture_options->get_format());
- imd->set_option("flags",texture_options->get_flags());
- imd->set_option("quality",texture_options->get_quality());
- imd->set_option("atlas",false);
- imd->set_option("large",true);
- imd->set_option("large_cell_size",int(size->get_value()));
- imd->set_option("crop",crop_source->is_pressed());
- imd->set_option("mode",mode);
-
- Error err = plugin->import(dst_file,imd);
- if (err) {
-
- error_dialog->set_text(TTR("Error importing:")+" "+dst_file.get_file());
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
-
- }
- } else {
-
-
- for(int i=0;i<files.size();i++) {
-
- String dst_file = dst_path.plus_file(files[i].get_file());
- dst_file=dst_file.get_basename()+".tex";
- Ref<ResourceImportMetadata> imd = memnew( ResourceImportMetadata );
- //imd->set_editor();
- imd->add_source(EditorImportPlugin::validate_source_path(files[i]));
- imd->set_option("format",texture_options->get_format());
- imd->set_option("flags",texture_options->get_flags());
- imd->set_option("quality",texture_options->get_quality());
- imd->set_option("atlas",false);
- imd->set_option("large",false);
- imd->set_option("mode",mode);
-
- Error err = plugin->import(dst_file,imd);
- if (err) {
-
- error_dialog->set_text(TTR("Error importing:")+" "+dst_file.get_file());
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
-
- }
- }
- }
-
- hide();
-}
-
-void EditorTextureImportDialog::_browse() {
-
- file_select->popup_centered_ratio();
-}
-
-void EditorTextureImportDialog::_browse_target() {
-
- if (mode==EditorTextureImportPlugin::MODE_ATLAS || mode==EditorTextureImportPlugin::MODE_LARGE) {
- save_file_select->popup_centered_ratio();
- } else {
- save_select->popup_centered_ratio();
- }
-
-}
-
-
-void EditorTextureImportDialog::popup_import(const String& p_from) {
-
- popup_centered(Size2(600,500)*EDSCALE);
- if (p_from!="") {
- Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_from);
- ERR_FAIL_COND(!rimd.is_valid());
-
- if (rimd->has_option("mode")) {
- //new imported stuff uses this option
- _mode_changed(rimd->get_option("mode"));
- } else {
- //this one is for compatibility, will have to guess it
- if (rimd->has_option("atlas") && rimd->get_option("atlas")) {
- _mode_changed(EditorTextureImportPlugin::MODE_ATLAS);
- } else if (rimd->has_option("large") && rimd->get_option("large")) {
- _mode_changed(EditorTextureImportPlugin::MODE_LARGE);
- } else {
- //guess by usage of mipmaps..?
- _mode_changed(EditorTextureImportPlugin::MODE_TEXTURE_2D);
- }
-
- }
-
- if (mode==EditorTextureImportPlugin::MODE_ATLAS || mode==EditorTextureImportPlugin::MODE_LARGE)
- save_path->set_text(p_from);
- else
- save_path->set_text(p_from.get_base_dir());
-
- texture_options->set_format(EditorTextureImportPlugin::ImageFormat(int(rimd->get_option("format"))));
- texture_options->set_flags(rimd->get_option("flags"));
- texture_options->set_quality(rimd->get_option("quality"));
- String src = "";
- for(int i=0;i<rimd->get_source_count();i++) {
- if (i>0)
- src+=",";
- src+=EditorImportPlugin::expand_source_path(rimd->get_source_path(i));
- }
- import_path->set_text(src);
- }
-}
-
-
-void EditorTextureImportDialog::_notification(int p_what) {
-
-
- if (p_what==NOTIFICATION_ENTER_TREE) {
-
-
- List<String> extensions;
- ImageLoader::get_recognized_extensions(&extensions);
- //ResourceLoader::get_recognized_extensions_for_type("PackedTexture",&extensions);
- file_select->clear_filters();
- for(int i=0;i<extensions.size();i++) {
-
- file_select->add_filter("*."+extensions[i]+" ; "+extensions[i].to_upper());
- }
- }
-}
-
-Error EditorTextureImportDialog::import(const String& p_from, const String& p_to, const String& p_preset) {
-
-
- import_path->set_text(p_from);
- save_path->set_text(p_to);
- _import();
-
- return OK;
-}
-
-void EditorTextureImportDialog::_mode_changed(int p_mode) {
-
- mode = EditorTextureImportPlugin::Mode(p_mode);
-
- for(int i=0;i<EditorTextureImportPlugin::MODE_MAX;i++) {
- mode_check[i]->set_pressed(i==mode);
- }
-
- if (p_mode==EditorTextureImportPlugin::MODE_ATLAS) {
-
- size_label->set_text(TTR("Max Texture Size:"));
- size->set_value(2048);
- crop_source->show();
- size_label->show();
- size->show();
-
- texture_options->set_flags(EditorTextureImportPlugin::IMAGE_FLAG_FIX_BORDER_ALPHA|EditorTextureImportPlugin::IMAGE_FLAG_NO_MIPMAPS|EditorTextureImportPlugin::IMAGE_FLAG_FILTER);
- texture_options->set_quality(0.7);
- texture_options->set_format(EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSY);
- set_title(TTR("Import Textures for Atlas (2D)"));
-
- } else {
- crop_source->hide();
- }
-
-
- if (p_mode==EditorTextureImportPlugin::MODE_LARGE) {
-
- size_label->set_text(TTR("Cell Size:"));
- size->set_value(256);
- size_label->show();
- size->show();
-
- file_select->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- save_file_select->add_filter("*.largetex;"+TTR("Large Texture"));
-
- texture_options->set_flags(EditorTextureImportPlugin::IMAGE_FLAG_FIX_BORDER_ALPHA|EditorTextureImportPlugin::IMAGE_FLAG_NO_MIPMAPS|EditorTextureImportPlugin::IMAGE_FLAG_FILTER);
- texture_options->set_quality(0.7);
- texture_options->set_format(EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSLESS);
- set_title(TTR("Import Large Textures (2D)"));
- source_label->set_text(TTR("Source Texture"));
-
- } else {
- file_select->set_mode(EditorFileDialog::MODE_OPEN_FILES);
- save_file_select->add_filter("*.tex;"+TTR("Base Atlas Texture"));
- source_label->set_text(TTR("Source Texture(s)"));
- }
-
- if (p_mode==EditorTextureImportPlugin::MODE_TEXTURE_2D) {
-
- size_label->hide();
- size->hide();
-
- texture_options->set_flags(EditorTextureImportPlugin::IMAGE_FLAG_NO_MIPMAPS|EditorTextureImportPlugin::IMAGE_FLAG_FIX_BORDER_ALPHA|EditorTextureImportPlugin::IMAGE_FLAG_FILTER);
- texture_options->set_quality(0.7);
- texture_options->set_format(EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSY);
- notice_for_2d->show();
- set_title(TTR("Import Textures for 2D"));
-
- } else {
- notice_for_2d->hide();
- }
-
- if (p_mode==EditorTextureImportPlugin::MODE_TEXTURE_3D) {
-
- size_label->hide();
- size->hide();
- //texture_options->set_flags(EditorTextureImportPlugin::IMAGE_FLAG_);
- //texture_options->set_flags(EditorTextureImportPlugin::IMAGE_FLAG_NO_MIPMAPS);
- texture_options->set_flags(EditorTextureImportPlugin::IMAGE_FLAG_FIX_BORDER_ALPHA|EditorTextureImportPlugin::IMAGE_FLAG_FILTER|EditorTextureImportPlugin::IMAGE_FLAG_REPEAT);
- texture_options->set_format(EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_RAM);
- set_title(TTR("Import Textures for 3D"));
- }
-}
-
-void EditorTextureImportDialog::_bind_methods() {
-
-
- ClassDB::bind_method("_choose_files",&EditorTextureImportDialog::_choose_files);
- ClassDB::bind_method("_choose_file",&EditorTextureImportDialog::_choose_file);
- ClassDB::bind_method("_choose_save_dir",&EditorTextureImportDialog::_choose_save_dir);
- ClassDB::bind_method("_import",&EditorTextureImportDialog::_import);
- ClassDB::bind_method("_browse",&EditorTextureImportDialog::_browse);
- ClassDB::bind_method("_browse_target",&EditorTextureImportDialog::_browse_target);
- ClassDB::bind_method("_mode_changed",&EditorTextureImportDialog::_mode_changed);
- //ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
-}
-
-EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin* p_plugin) {
-
-
-
-
-
- plugin=p_plugin;
- set_title(TTR("Import Textures"));
-
- mode_hb = memnew( HBoxContainer );
- add_child(mode_hb);
- //set_child_rect(mode_hb);
-
- VBoxContainer *vbcg = memnew( VBoxContainer);
-
-
- mode_hb->add_child(vbcg);
- mode_hb->add_constant_override("separation",15);
- VBoxContainer *bg = memnew( VBoxContainer );
- vbcg->add_margin_child("Import Mode",bg);
-
- for(int i=0;i<EditorTextureImportPlugin::MODE_MAX;i++) {
- String mode_name[EditorTextureImportPlugin::MODE_MAX]={
- TTR("2D Texture"),
- TTR("3D Texture"),
- TTR("Atlas Texture"),
- TTR("Large Texture")
- };
-
-
- mode_check[i]=memnew(CheckBox);
- bg->add_child(mode_check[i]);
- mode_check[i]->set_text(mode_name[i]);
- mode_check[i]->connect("pressed",this,"_mode_changed",varray(i));
- }
-
- VBoxContainer *vbc = memnew(VBoxContainer);
- mode_hb->add_child(vbc);
- vbc->set_h_size_flags(SIZE_EXPAND_FILL);
- vbc->add_constant_override("separation",4);
-
- notice_for_2d = memnew( Label );
- notice_for_2d->set_text(TTR("NOTICE: Importing 2D textures is not mandatory. Just copy png/jpg files to the project."));
- //notice_for_2d->set_custom_minimum_size(Size2(0,50));
- notice_for_2d->set_autowrap(true);
- notice_for_2d->hide();
- vbcg->add_child(notice_for_2d);
- notice_for_2d->set_v_size_flags(SIZE_EXPAND_FILL);
- notice_for_2d->set_valign(Label::VALIGN_BOTTOM);
-
- VBoxContainer *source_vb=memnew(VBoxContainer);
- MarginContainer *source_mc = vbc->add_margin_child(TTR("Source Texture(s):"),source_vb);
-
- source_label = vbc->get_child(source_mc->get_index()-1)->cast_to<Label>();
-
- HBoxContainer *hbc = memnew( HBoxContainer );
- source_vb->add_child(hbc);
-
- import_path = memnew( LineEdit );
- import_path->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc->add_child(import_path);
- crop_source = memnew( CheckButton );
- crop_source->set_pressed(true);
- source_vb->add_child(crop_source);
- crop_source->set_text(TTR("Crop empty space."));
-
-
- Button * import_choose = memnew( Button );
- import_choose->set_text(" .. ");
- hbc->add_child(import_choose);
-
- import_choose->connect("pressed", this,"_browse");
-
- hbc = memnew( HBoxContainer );
- vbc->add_margin_child(TTR("Target Path:"),hbc);
-
- size = memnew( SpinBox );
- size->set_min(128);
- size->set_max(16384);
-
-
- size->set_value(256);
- size_mc=vbc->add_margin_child(TTR("Cell Size:"),size);
- size_label=vbc->get_child(size_mc->get_index()-1)->cast_to<Label>();
-
-
- save_path = memnew( LineEdit );
- save_path->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc->add_child(save_path);
-
- Button * save_choose = memnew( Button );
- save_choose->set_text(" .. ");
- hbc->add_child(save_choose);
-
- save_choose->connect("pressed", this,"_browse_target");
-
- file_select = memnew(EditorFileDialog);
- file_select->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
- add_child(file_select);
-
- file_select->connect("files_selected", this,"_choose_files");
- file_select->connect("file_selected", this,"_choose_file");
-
- save_file_select = memnew(EditorFileDialog);
- save_file_select->set_access(EditorFileDialog::ACCESS_RESOURCES);
- add_child(save_file_select);
- save_file_select->set_mode(EditorFileDialog::MODE_SAVE_FILE);
- save_file_select->clear_filters();
-
- save_file_select->connect("file_selected", this,"_choose_save_dir");
-
- save_select = memnew( EditorDirDialog );
- add_child(save_select);
-
- //save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR);
- save_select->connect("dir_selected", this,"_choose_save_dir");
-
- get_ok()->connect("pressed", this,"_import");
- get_ok()->set_text(TTR("Import"));
-
- //move stuff up
- /*
- for(int i=0;i<4;i++)
- vbc->move_child( vbc->get_child( vbc->get_child_count() -1), 0);
- */
-
- error_dialog = memnew ( ConfirmationDialog );
- add_child(error_dialog);
- error_dialog->get_ok()->set_text(TTR("Accept"));
- //error_dialog->get_cancel()->hide();
-
- set_hide_on_ok(false);
-
- texture_options = memnew( EditorImportTextureOptions );
- vbc->add_child(texture_options);
- texture_options->set_v_size_flags(SIZE_EXPAND_FILL);
-
- _mode_changed(EditorTextureImportPlugin::MODE_TEXTURE_3D);
-
-
- //GLOBAL_DEF("import/shared_textures","res://");
- //Globals::get_singleton()->set_custom_property_info("import/shared_textures",PropertyInfo(Variant::STRING,"import/shared_textures",PROPERTY_HINT_DIR));
-
-
-}
-
-
-
-///////////////////////////////////////////////////////////
-
-
-String EditorTextureImportPlugin::get_name() const {
-
- return "texture";
-#if 0 //old names, kept for compatibility reference
- switch(mode) {
- case MODE_TEXTURE_2D: {
-
- return "texture_2d";
- } break;
- case MODE_TEXTURE_3D: {
-
- return "texture_3d";
-
- } break;
- case MODE_ATLAS: {
-
- return "texture_atlas";
- } break;
- case MODE_LARGE: {
-
- return "texture_large";
- } break;
-
- }
-
-
- return "";
-#endif
-}
-
-String EditorTextureImportPlugin::get_visible_name() const {
-
- return TTR("Texture");
-
-}
-void EditorTextureImportPlugin::import_dialog(const String& p_from) {
-
- dialog->popup_import(p_from);
-}
-
-void EditorTextureImportPlugin::compress_image(EditorExportPlatform::ImageCompression p_mode,Image& image,bool p_smaller) {
-
-
- switch(p_mode) {
- case EditorExportPlatform::IMAGE_COMPRESSION_NONE: {
-
- //do absolutely nothing
-
- } break;
- case EditorExportPlatform::IMAGE_COMPRESSION_BC: {
-
-
- // for maximum compatibility, BC shall always use mipmaps and be PO2
- image.resize_to_po2();
- if (!image.has_mipmaps())
- image.generate_mipmaps();
-
- image.compress(Image::COMPRESS_S3TC);
- /*
- if (has_alpha) {
-
- if (flags&IMAGE_FLAG_ALPHA_BIT) {
- image.convert(Image::FORMAT_DXT5);
- } else {
- image.convert(Image::FORMAT_DXT3);
- }
- } else {
-
- image.convert(Image::FORMAT_DXT1);
- }*/
-
-
- } break;
- case EditorExportPlatform::IMAGE_COMPRESSION_PVRTC:
- case EditorExportPlatform::IMAGE_COMPRESSION_PVRTC_SQUARE: {
-
- // for maximum compatibility (hi apple!), PVRT shall always
- // use mipmaps, be PO2 and square
-
- if (!image.has_mipmaps())
- image.generate_mipmaps();
- image.resize_to_po2(true);
-
- if (p_smaller) {
-
- image.compress(Image::COMPRESS_PVRTC2);
- //image.convert(has_alpha ? Image::FORMAT_PVRTC2A : Image::FORMAT_PVRTC2);
- } else {
- image.compress(Image::COMPRESS_PVRTC4);
- //image.convert(has_alpha ? Image::FORMAT_PVRTC4A : Image::FORMAT_PVRTC4);
- }
-
- } break;
- case EditorExportPlatform::IMAGE_COMPRESSION_ETC1: {
-
- image.resize_to_po2(); //square or not?
- if (!image.has_mipmaps())
- image.generate_mipmaps();
- if (!image.detect_alpha()) {
- //ETC1 is only opaque
- image.compress(Image::COMPRESS_ETC);
- }
-
- } break;
- case EditorExportPlatform::IMAGE_COMPRESSION_ETC2: {
-
-
- } break;
- }
-
-
-}
-
-Error EditorTextureImportPlugin::import(const String& p_path, const Ref<ResourceImportMetadata>& p_from) {
-
-
- return import2(p_path,p_from,EditorExportPlatform::IMAGE_COMPRESSION_BC,false);
-}
-
-
-Error EditorTextureImportPlugin::_process_texture_data(Ref<ImageTexture> &texture,int format, float quality,int flags,EditorExportPlatform::ImageCompression p_compr,int tex_flags,float shrink) {
-
-
- if (format==IMAGE_FORMAT_COMPRESS_DISK_LOSSLESS || format==IMAGE_FORMAT_COMPRESS_DISK_LOSSY) {
-
- Image image=texture->get_data();
- ERR_FAIL_COND_V(image.empty(),ERR_INVALID_DATA);
-
- bool has_alpha=image.detect_alpha();
- if (!has_alpha && image.get_format()==Image::FORMAT_RGBA8) {
-
- image.convert(Image::FORMAT_RGB8);
-
- }
-
- if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_FIX_BORDER_ALPHA) {
-
- image.fix_alpha_edges();
- }
-
- if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_PREMULT_ALPHA) {
-
- image.premultiply_alpha();
- }
-
- if (flags&IMAGE_FLAG_CONVERT_NORMAL_TO_XY) {
- image.normalmap_to_xy();
- }
-
- /*
- if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) {
-
- image.srgb_to_linear();
- }
- */
-
- if (shrink>1) {
-
- int orig_w=image.get_width();
- int orig_h=image.get_height();
- image.resize(orig_w/shrink,orig_h/shrink,Image::INTERPOLATE_CUBIC);
- texture->create_from_image(image,tex_flags);
- texture->set_size_override(Size2(orig_w,orig_h));
-
-
- } else {
-
- texture->create_from_image(image,tex_flags);
- }
-
-
- if (format==IMAGE_FORMAT_COMPRESS_DISK_LOSSLESS) {
- texture->set_storage(ImageTexture::STORAGE_COMPRESS_LOSSLESS);
- } else {
- texture->set_storage(ImageTexture::STORAGE_COMPRESS_LOSSY);
- }
-
-
-
- texture->set_lossy_storage_quality(quality);
-
-
- } else {
-
-
- Image image=texture->get_data();
- ERR_FAIL_COND_V(image.empty(),ERR_INVALID_DATA);
-
-
- bool has_alpha=image.detect_alpha();
- if (!has_alpha && image.get_format()==Image::FORMAT_RGBA8) {
-
- image.convert(Image::FORMAT_RGB8);
-
- }
-
- if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_FIX_BORDER_ALPHA) {
-
- image.fix_alpha_edges();
- }
-
- if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_PREMULT_ALPHA) {
-
- image.premultiply_alpha();
- }
-
- if (flags&IMAGE_FLAG_CONVERT_NORMAL_TO_XY) {
- image.normalmap_to_xy();
- }
-
- /*
- if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) {
-
- print_line("CONVERT BECAUSE: "+itos(flags));
- image.srgb_to_linear();
- }
- */
-
- int orig_w=image.get_width();
- int orig_h=image.get_height();
-
- if (shrink>1) {
- image.resize(orig_w/shrink,orig_h/shrink,Image::INTERPOLATE_CUBIC);
- texture->create_from_image(image,tex_flags);
- texture->set_size_override(Size2(orig_w,orig_h));
- }
-
- if (!(flags&IMAGE_FLAG_NO_MIPMAPS)) {
- image.generate_mipmaps();
-
- }
-
- if (format!=IMAGE_FORMAT_UNCOMPRESSED) {
-
- compress_image(p_compr,image,flags&IMAGE_FLAG_COMPRESS_EXTRA);
- }
-
-
- texture->create_from_image(image,tex_flags);
-
-
- if (shrink>1 || (format!=IMAGE_FORMAT_UNCOMPRESSED && (image.get_width()!=orig_w || image.get_height()!=orig_h))) {
- texture->set_size_override(Size2(orig_w,orig_h));
- }
-
- //uint32_t save_flags=ResourceSaver::FLAG_COMPRESS;
- }
-
- return OK;
-}
-
-
-Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<ResourceImportMetadata>& p_from,EditorExportPlatform::ImageCompression p_compr, bool p_external){
-
-
-
- ERR_FAIL_COND_V(p_from->get_source_count()==0,ERR_INVALID_PARAMETER);
-
- Ref<ResourceImportMetadata> from=p_from;
-
- Ref<ImageTexture> texture;
- Vector<Ref<AtlasTexture> > atlases;
- bool atlas = from->get_option("atlas");
- bool large = from->get_option("large");
-
- int flags=from->get_option("flags");
- int format=from->get_option("format");
- float quality=from->get_option("quality");
-
- uint32_t tex_flags=0;
-
- if (flags&EditorTextureImportPlugin::IMAGE_FLAG_REPEAT)
- tex_flags|=Texture::FLAG_REPEAT;
- if (flags&EditorTextureImportPlugin::IMAGE_FLAG_FILTER)
- tex_flags|=Texture::FLAG_FILTER;
- if (!(flags&EditorTextureImportPlugin::IMAGE_FLAG_NO_MIPMAPS))
- tex_flags|=Texture::FLAG_MIPMAPS;
- if (flags&EditorTextureImportPlugin::IMAGE_FLAG_CONVERT_TO_LINEAR)
- tex_flags|=Texture::FLAG_CONVERT_TO_LINEAR;
- if (flags&EditorTextureImportPlugin::IMAGE_FLAG_USE_ANISOTROPY)
- tex_flags|=Texture::FLAG_ANISOTROPIC_FILTER;
-
- print_line("path: "+p_path+" flags: "+itos(tex_flags));
- float shrink=1;
- if (from->has_option("shrink"))
- shrink=from->get_option("shrink");
-
- if (large) {
- ERR_FAIL_COND_V(from->get_source_count()!=1,ERR_INVALID_PARAMETER);
-
- String src_path = EditorImportPlugin::expand_source_path(from->get_source_path(0));
-
-
- int cell_size=from->get_option("large_cell_size");
- ERR_FAIL_COND_V(cell_size<128 || cell_size>16384,ERR_CANT_OPEN);
-
- EditorProgress pg("largetex",TTR("Import Large Texture"),3);
-
- pg.step(TTR("Load Source Image"),0);
- Image img;
- Error err = ImageLoader::load_image(src_path,&img);
- if (err) {
- return err;
- }
-
- pg.step(TTR("Slicing"),1);
-
- Map<Vector2,Image> pieces;
- for(int i=0;i<img.get_width();i+=cell_size) {
- int w = MIN(img.get_width()-i,cell_size);
- for(int j=0;j<img.get_height();j+=cell_size) {
- int h = MIN(img.get_height()-j,cell_size);
-
- Image piece(w,h,0,img.get_format());
- piece.blit_rect(img,Rect2(i,j,w,h),Point2(0,0));
- if (!piece.is_invisible()) {
- pieces[Vector2(i,j)]=piece;
- //print_line("ADDING PIECE AT "+Vector2(i,j));
- }
- }
- }
-
- Ref<LargeTexture> existing;
- if (ResourceCache::has(p_path)) {
- existing = ResourceCache::get(p_path);
- }
-
- if (existing.is_valid()) {
- existing->clear();
- } else {
- existing = Ref<LargeTexture>(memnew( LargeTexture ));
- }
-
- existing->set_size(Size2(img.get_width(),img.get_height()));
- pg.step(TTR("Inserting"),2);
-
- for (Map<Vector2,Image>::Element *E=pieces.front();E;E=E->next()) {
-
- Ref<ImageTexture> imgtex = Ref<ImageTexture>( memnew( ImageTexture ) );
- imgtex->create_from_image(E->get(),tex_flags);
- _process_texture_data(imgtex,format,quality,flags,p_compr,tex_flags,shrink);
- existing->add_piece(E->key(),imgtex);
- }
-
- if (!p_external) {
- from->set_editor(get_name());
- from->set_source_md5(0,FileAccess::get_md5(src_path));
- existing->set_path(p_path);
- existing->set_import_metadata(from);
- }
- pg.step(TTR("Saving"),3);
-
- err = ResourceSaver::save(p_path,existing);
- if (err!=OK) {
- EditorNode::add_io_error(TTR("Couldn't save large texture:")+" "+p_path);
- return err;
- }
-
- return OK;
-
-
- } else if (atlas) {
-
- //prepare atlas!
- Vector< Image > sources;
- Vector< Image > tsources;
- bool alpha=false;
- bool crop = from->get_option("crop");
-
- EditorProgress ep("make_atlas",TTR("Build Atlas For:")+" "+p_path.get_file(),from->get_source_count()+3);
-
- print_line("sources: "+itos(from->get_source_count()));
-
- for(int i=0;i<from->get_source_count();i++) {
-
- String path = EditorImportPlugin::expand_source_path(from->get_source_path(i));
- String md5 = FileAccess::get_md5(path);
- from->set_source_md5(i,FileAccess::get_md5(path));
- ep.step(TTR("Loading Image:")+" "+path,i);
- print_line("source path: "+path+" md5 "+md5);
- Image src;
- Error err = ImageLoader::load_image(path,&src);
- if (err) {
- EditorNode::add_io_error(TTR("Couldn't load image:")+" "+path);
- return err;
- }
-
- if (src.detect_alpha())
- alpha=true;
-
- tsources.push_back(src);
- }
- ep.step(TTR("Converting Images"),sources.size());
-
-
- Map<uint64_t,int> source_md5;
- Map<int,List<int> > source_map;
-
- for(int i=0;i<tsources.size();i++) {
-
- Image src = tsources[i];
-
- if (alpha) {
- src.convert(Image::FORMAT_RGBA8);
- } else {
- src.convert(Image::FORMAT_RGB8);
- }
-
- PoolVector<uint8_t> data = src.get_data();
- MD5_CTX md5;
- PoolVector<uint8_t>::Read r=data.read();
- MD5Init(&md5);
- int len=data.size();
- for(int j=0;j<len;j++) {
- uint8_t b = r[j];
- b>>=2; //to aid in comparing
- MD5Update(&md5,(unsigned char*)&b,1);
- }
- MD5Final(&md5);
- uint64_t *cmp = (uint64_t*)md5.digest; //less bits, but still useful for this
-
- tsources[i]=Image(); //clear
-
- if (source_md5.has(*cmp)) {
- int sidx=source_md5[*cmp];
- source_map[sidx].push_back(i);
- print_line("REUSING "+from->get_source_path(i));
-
- } else {
- int sidx=sources.size();
- source_md5[*cmp]=sidx;
- sources.push_back(src);
- List<int> sm;
- sm.push_back(i);
- source_map[sidx]=sm;
-
- }
-
-
- }
-
- //texturepacker is not really good for optimizing, so..
- //will at some point likely replace with my own
- //first, will find the nearest to a square packing
- int border=1;
-
- Vector<Size2i> src_sizes;
- Vector<Rect2> crops;
-
- ep.step(TTR("Cropping Images"),sources.size()+1);
-
- for(int j=0;j<sources.size();j++) {
-
- Size2i s;
- if (crop) {
- Rect2 crop = sources[j].get_used_rect();
- print_line("CROP: "+crop);
- s=crop.size;
- crops.push_back(crop);
- } else {
-
- s=Size2i(sources[j].get_width(),sources[j].get_height());
- }
- s+=Size2i(border*2,border*2);
- src_sizes.push_back(s); //add a line to constraint width
- }
-
- Vector<Point2i> dst_positions;
- Size2i dst_size;
- EditorAtlas::fit(src_sizes,dst_positions,dst_size);
-
- print_line("size that worked: "+itos(dst_size.width)+","+itos(dst_size.height));
-
- ep.step(TTR("Blitting Images"),sources.size()+2);
-
- bool blit_to_po2=tex_flags&Texture::FLAG_MIPMAPS;
- int atlas_w=dst_size.width;
- int atlas_h=dst_size.height;
- if (blit_to_po2) {
- atlas_w=next_power_of_2(dst_size.width);
- atlas_h=next_power_of_2(dst_size.height);
- }
- Image atlas;
- atlas.create(atlas_w,atlas_h,0,alpha?Image::FORMAT_RGBA8:Image::FORMAT_RGB8);
-
-
- atlases.resize(from->get_source_count());
-
- for(int i=0;i<sources.size();i++) {
-
- int x=dst_positions[i].x;
- int y=dst_positions[i].y;
-
- Size2 sz = Size2(sources[i].get_width(),sources[i].get_height());
-
- Rect2 region;
- Rect2 margin;
-
- if (crop && sz!=crops[i].size) {
- Rect2 rect = crops[i];
- rect.size=sz-rect.size;
- region=Rect2(x+border,y+border,crops[i].size.width,crops[i].size.height);
- margin=rect;
- atlas.blit_rect(sources[i],crops[i],Point2(x+border,y+border));
- } else {
- region=Rect2(x+border,y+border,sz.x,sz.y);
- atlas.blit_rect(sources[i],Rect2(0,0,sources[i].get_width(),sources[i].get_height()),Point2(x+border,y+border));
- }
-
- ERR_CONTINUE( !source_map.has(i) );
- for (List<int>::Element *E=source_map[i].front();E;E=E->next()) {
-
- String apath;
- String spath = from->get_source_path(E->get()).get_file();
-
- if (p_external) {
- apath = p_path.get_base_dir().plus_file(spath.get_basename()+"."+from->get_source_path(E->get()).md5_text()+".atlastex");
- } else {
- apath = p_path.get_base_dir().plus_file(spath.get_basename()+".atlastex");
- }
-
- Ref<AtlasTexture> at;
-
- if (ResourceCache::has(apath)) {
-
- at = Ref<AtlasTexture>( ResourceCache::get(apath)->cast_to<AtlasTexture>() );
- } else {
-
- at = Ref<AtlasTexture>( memnew( AtlasTexture ) );
-
- }
- at->set_region(region);
- at->set_margin(margin);
- at->set_path(apath);
- atlases[E->get()]=at;
-
- }
- }
- if (ResourceCache::has(p_path)) {
- texture = Ref<ImageTexture> ( ResourceCache::get(p_path)->cast_to<ImageTexture>() );
- } else {
- texture = Ref<ImageTexture>( memnew( ImageTexture ) );
- }
- texture->create_from_image(atlas,tex_flags);
-
- } else {
- ERR_FAIL_COND_V(from->get_source_count()!=1,ERR_INVALID_PARAMETER);
-
- String src_path = EditorImportPlugin::expand_source_path(from->get_source_path(0));
-
- if (ResourceCache::has(p_path)) {
- Resource *r = ResourceCache::get(p_path);
-
- texture = Ref<ImageTexture> ( r->cast_to<ImageTexture>() );
-
- Image img;
- Error err = img.load(src_path);
- ERR_FAIL_COND_V(err!=OK,ERR_CANT_OPEN);
- texture->create_from_image(img);
- } else {
- texture=ResourceLoader::load(src_path,"ImageTexture");
- }
-
- ERR_FAIL_COND_V(texture.is_null(),ERR_CANT_OPEN);
- if (!p_external)
- from->set_source_md5(0,FileAccess::get_md5(src_path));
-
- }
-
-
-
- if (!p_external) {
- from->set_editor(get_name());
- texture->set_path(p_path);
- texture->set_import_metadata(from);
- }
-
- if (atlas) {
-
- if (p_external) {
- //used by exporter
- Array rects;
- for(int i=0;i<atlases.size();i++) {
- rects.push_back(atlases[i]->get_region());
- rects.push_back(atlases[i]->get_margin());
- }
- from->set_option("rects",rects);
-
- } else {
- //used by importer
- for(int i=0;i<atlases.size();i++) {
- String apath = atlases[i]->get_path();
- atlases[i]->set_atlas(texture);
- Error err = ResourceSaver::save(apath,atlases[i]);
- if (err) {
- EditorNode::add_io_error(TTR("Couldn't save atlas image:")+" "+apath);
- return err;
- }
- //from->set_source_md5(i,FileAccess::get_md5(apath));
- }
- }
- }
-
- bool compress=false;
-#if 1
-
- _process_texture_data(texture,format,quality,flags,p_compr,tex_flags,shrink);
-#else
- if (format==IMAGE_FORMAT_COMPRESS_DISK_LOSSLESS || format==IMAGE_FORMAT_COMPRESS_DISK_LOSSY) {
-
- Image image=texture->get_data();
- ERR_FAIL_COND_V(image.empty(),ERR_INVALID_DATA);
-
- bool has_alpha=image.detect_alpha();
- if (!has_alpha && image.get_format()==Image::FORMAT_RGBA8) {
-
- image.convert(Image::FORMAT_RGB8);
-
- }
-
- if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_FIX_BORDER_ALPHA) {
-
- image.fix_alpha_edges();
- }
-
- if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_PREMULT_ALPHA) {
-
- image.premultiply_alpha();
- }
-
- if (flags&IMAGE_FLAG_CONVERT_NORMAL_TO_XY) {
- image.normalmap_to_xy();
- }
-
- /*
- if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) {
-
- image.srgb_to_linear();
- }
- */
-
- if (shrink>1) {
-
- int orig_w=image.get_width();
- int orig_h=image.get_height();
- image.resize(orig_w/shrink,orig_h/shrink);
- texture->create_from_image(image,tex_flags);
- texture->set_size_override(Size2(orig_w,orig_h));
-
-
- } else {
-
- texture->create_from_image(image,tex_flags);
- }
-
-
- if (format==IMAGE_FORMAT_COMPRESS_DISK_LOSSLESS) {
- texture->set_storage(ImageTexture::STORAGE_COMPRESS_LOSSLESS);
- } else {
- texture->set_storage(ImageTexture::STORAGE_COMPRESS_LOSSY);
- }
-
-
-
- texture->set_lossy_storage_quality(quality);
-
-
- } else {
-
-
- Image image=texture->get_data();
- ERR_FAIL_COND_V(image.empty(),ERR_INVALID_DATA);
-
-
- bool has_alpha=image.detect_alpha();
- if (!has_alpha && image.get_format()==Image::FORMAT_RGBA8) {
-
- image.convert(Image::FORMAT_RGB8);
-
- }
-
- if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_FIX_BORDER_ALPHA) {
-
- image.fix_alpha_edges();
- }
-
- if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_PREMULT_ALPHA) {
-
- image.premultiply_alpha();
- }
-
- if (flags&IMAGE_FLAG_CONVERT_NORMAL_TO_XY) {
- image.normalmap_to_xy();
- }
-
- /*
- if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) {
-
- print_line("CONVERT BECAUSE: "+itos(flags));
- image.srgb_to_linear();
- }
- */
-
- int orig_w=image.get_width();
- int orig_h=image.get_height();
-
- if (shrink>1) {
- image.resize(orig_w/shrink,orig_h/shrink);
- texture->create_from_image(image,tex_flags);
- texture->set_size_override(Size2(orig_w,orig_h));
- }
-
- if (!(flags&IMAGE_FLAG_NO_MIPMAPS)) {
- image.generate_mipmaps();
-
- }
-
- if (format!=IMAGE_FORMAT_UNCOMPRESSED) {
-
- compress_image(p_compr,image,flags&IMAGE_FLAG_COMPRESS_EXTRA);
- }
-
-
- texture->create_from_image(image,tex_flags);
-
-
- if (shrink>1 || (format!=IMAGE_FORMAT_UNCOMPRESSED && (image.get_width()!=orig_w || image.get_height()!=orig_h))) {
- texture->set_size_override(Size2(orig_w,orig_h));
- }
-
- compress=true;
-
-
- }
-#endif
- uint32_t save_flags=0;
- if (compress)
- save_flags=ResourceSaver::FLAG_COMPRESS;
-
- Error err = ResourceSaver::save(p_path,texture,save_flags);
- if (err!=OK) {
- EditorNode::add_io_error(TTR("Couldn't save converted texture:")+" "+p_path);
- return err;
- }
-
- return OK;
-}
-
-Vector<uint8_t> EditorTextureImportPlugin::custom_export(const String& p_path, const Ref<EditorExportPlatform> &p_platform) {
-
-
- Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_path);
-
- if (rimd.is_null()) {
-
- StringName group = EditorImportExport::get_singleton()->image_get_export_group(p_path);
-
- if (group!=StringName()) {
- //handled by export group
- rimd = Ref<ResourceImportMetadata>( memnew( ResourceImportMetadata ) );
-
- int group_format=0;
- float group_lossy_quality=EditorImportExport::get_singleton()->image_export_group_get_lossy_quality(group);
- int group_shrink=EditorImportExport::get_singleton()->image_export_group_get_shrink(group);
- group_shrink*=EditorImportExport::get_singleton()->get_export_image_shrink();
-
- switch(EditorImportExport::get_singleton()->image_export_group_get_image_action(group)) {
- case EditorImportExport::IMAGE_ACTION_NONE: {
-
- switch(EditorImportExport::get_singleton()->get_export_image_action()) {
- case EditorImportExport::IMAGE_ACTION_NONE: {
-
- group_format=EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSLESS; //?
-
- } break; //use default
- case EditorImportExport::IMAGE_ACTION_COMPRESS_DISK: {
- group_format=EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSY;
- } break; //use default
- case EditorImportExport::IMAGE_ACTION_COMPRESS_RAM: {
- group_format=EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_RAM;
- } break; //use default
- }
-
- group_lossy_quality=EditorImportExport::get_singleton()->get_export_image_quality();
-
- } break; //use default
- case EditorImportExport::IMAGE_ACTION_COMPRESS_DISK: {
- group_format=EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSY;
- } break; //use default
- case EditorImportExport::IMAGE_ACTION_COMPRESS_RAM: {
- group_format=EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_RAM;
- } break; //use default
- case EditorImportExport::IMAGE_ACTION_KEEP: {
- return Vector<uint8_t>();
- } break; //use default
- }
-
- String validated_path=EditorImportPlugin::validate_source_path(p_path);
-
- int flags=texture_flags_to_export_flags(ResourceFormatLoaderImage::load_image_flags(validated_path));
- flags|=IMAGE_FLAG_FIX_BORDER_ALPHA;
-
- print_line("group format"+itos(group_format));
- rimd->set_option("format",group_format);
- rimd->set_option("flags",flags);
- rimd->set_option("quality",group_lossy_quality);
- rimd->set_option("atlas",false);
- rimd->set_option("shrink",group_shrink);
- rimd->add_source(validated_path,FileAccess::get_md5(p_path));
-
- } else if (EditorImportExport::get_singleton()->get_image_formats().has(p_path.get_extension().to_lower()) && EditorImportExport::get_singleton()->get_export_image_action()!=EditorImportExport::IMAGE_ACTION_NONE) {
- //handled by general image export settings
-
- rimd = Ref<ResourceImportMetadata>( memnew( ResourceImportMetadata ) );
-
- switch(EditorImportExport::get_singleton()->get_export_image_action()) {
- case EditorImportExport::IMAGE_ACTION_COMPRESS_DISK: rimd->set_option("format",IMAGE_FORMAT_COMPRESS_DISK_LOSSY); break;
- case EditorImportExport::IMAGE_ACTION_COMPRESS_RAM: rimd->set_option("format",IMAGE_FORMAT_COMPRESS_RAM); break;
- }
-
- String validated_path=EditorImportPlugin::validate_source_path(p_path);
-
- int flags=texture_flags_to_export_flags(ResourceFormatLoaderImage::load_image_flags(validated_path));
- flags|=IMAGE_FLAG_FIX_BORDER_ALPHA;
-
- rimd->set_option("shrink",EditorImportExport::get_singleton()->get_export_image_shrink());
- rimd->set_option("flags",flags);
- rimd->set_option("quality",EditorImportExport::get_singleton()->get_export_image_quality());
- rimd->set_option("atlas",false);
- rimd->add_source(validated_path,FileAccess::get_md5(p_path));
-
- } else {
- return Vector<uint8_t>();
- }
- }
-
- int fmt = rimd->get_option("format");
-
- if (fmt!=IMAGE_FORMAT_COMPRESS_RAM && fmt!=IMAGE_FORMAT_COMPRESS_DISK_LOSSY) {
- print_line("no compress ram or lossy");
- return Vector<uint8_t>(); //pointless to do anything, since no need to reconvert
- }
-
- uint32_t flags = rimd->get_option("flags");
- uint8_t shrink = rimd->has_option("shrink") ? rimd->get_option("shrink"): Variant(1);
- uint8_t format = rimd->get_option("format");
- uint8_t comp = (format==EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_RAM)?uint8_t(p_platform->get_image_compression()):uint8_t(255);
-
- MD5_CTX ctx;
- uint8_t f4[4];
- encode_uint32(flags,&f4[0]);
- MD5Init(&ctx);
- String gp = ProjectSettings::get_singleton()->globalize_path(p_path);
- CharString cs = gp.utf8();
- MD5Update(&ctx,(unsigned char*)cs.get_data(),cs.length());
- MD5Update(&ctx,f4,4);
- MD5Update(&ctx,&format,1);
- MD5Update(&ctx,&comp,1);
- MD5Update(&ctx,&shrink,1);
- MD5Final(&ctx);
-
-
-
- uint64_t sd=0;
- String smd5;
-
- String md5 = String::md5(ctx.digest);
- print_line(p_path+" MD5: "+md5+" FLAGS: "+itos(flags));
-
- String tmp_path = EditorSettings::get_singleton()->get_settings_path().plus_file("tmp/");
-
- bool valid=false;
- {
- //if existing, make sure it's valid
- FileAccessRef f = FileAccess::open(tmp_path+"imgexp-"+md5+".txt",FileAccess::READ);
- if (f) {
-
- uint64_t d = f->get_line().strip_edges().to_int64();
- sd = FileAccess::get_modified_time(p_path);
-
- if (d==sd) {
- valid=true;
- } else {
- String cmd5 = f->get_line().strip_edges();
- smd5 = FileAccess::get_md5(p_path);
- if (cmd5==smd5) {
- valid=true;
- }
- }
-
-
- }
- }
-
- if (!valid) {
- //cache failed, convert
- Error err = import2(tmp_path+"imgexp-"+md5+".tex",rimd,p_platform->get_image_compression(),true);
- ERR_FAIL_COND_V(err!=OK,Vector<uint8_t>());
- FileAccessRef f = FileAccess::open(tmp_path+"imgexp-"+md5+".txt",FileAccess::WRITE);
-
- if (sd==0)
- sd = FileAccess::get_modified_time(p_path);
- if (smd5==String())
- smd5 = FileAccess::get_md5(p_path);
-
- f->store_line(String::num(sd));
- f->store_line(smd5);
- f->store_line(gp); //source path for reference
- }
-
-
- Vector<uint8_t> ret;
- FileAccessRef f = FileAccess::open(tmp_path+"imgexp-"+md5+".tex",FileAccess::READ);
- ERR_FAIL_COND_V(!f,ret);
-
- ret.resize(f->get_len());
- f->get_buffer(ret.ptr(),ret.size());
-
- return ret;
-}
-
-uint32_t EditorTextureImportPlugin::texture_flags_to_export_flags(uint32_t p_tex_flags) const {
-
- uint32_t flags=0;
-
- if (!(p_tex_flags&Texture::FLAG_MIPMAPS)) {
- flags|=IMAGE_FLAG_NO_MIPMAPS;
- }
- if (p_tex_flags&Texture::FLAG_REPEAT) {
- flags|=IMAGE_FLAG_REPEAT;
- }
- if (p_tex_flags&Texture::FLAG_FILTER) {
- flags|=IMAGE_FLAG_FILTER;
- }
- if (p_tex_flags&Texture::FLAG_ANISOTROPIC_FILTER) {
- flags|=IMAGE_FLAG_USE_ANISOTROPY;
- }
- if (p_tex_flags&Texture::FLAG_CONVERT_TO_LINEAR) {
- flags|=IMAGE_FLAG_CONVERT_TO_LINEAR;
- }
- /* // no correspondence yet
- if (p_tex_flags&Texture::TEXTURE_FLAG_MIRRORED_REPEAT) {
- flags|=;
- }*/
-
- return flags;
-}
-
-void EditorTextureImportPlugin::import_from_drop(const Vector<String>& p_drop,const String& p_dest_path) {
-
- Vector<String> valid;
-
- List<String> valid_extensions;
- ImageLoader::get_recognized_extensions(&valid_extensions);
- for(int i=0;i<p_drop.size();i++) {
-
- String extension=p_drop[i].get_extension().to_lower();
-
- for (List<String>::Element *E=valid_extensions.front();E;E=E->next()) {
-
- if (E->get()==extension) {
- valid.push_back(p_drop[i]);
- break;
- }
- }
- }
-
- if (valid.size()) {
- dialog->popup_import();
- dialog->setup_multiple_import_3d(valid,p_dest_path);
- }
-}
-
-void EditorTextureImportPlugin::reimport_multiple_files(const Vector<String>& p_list) {
-
- Vector<String> valid;
-
-
- for(int i=0;i<p_list.size();i++) {
-
- Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_list[i]);
- String type = rimd->get_editor();
- if (type=="texture" || type.begins_with("texture_")) {
-
- if ((rimd->has_option("atlas") && rimd->get_option("atlas")) || (rimd->has_option("large") && rimd->get_option("large"))) {
- continue;
- }
-
- valid.push_back(p_list[i]);
- }
- }
-
- if (valid.size()) {
-
- dialog->popup_import(valid[0]);
-
- Vector<String> sources;
- for(int i=0;i<valid.size();i++) {
- int idx;
- EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->find_file(valid[i],&idx);
- if (efsd) {
- for(int j=0;j<efsd->get_source_count(idx);j++) {
- String file = expand_source_path(efsd->get_source_file(idx,j));
- if (sources.find(file)==-1) {
- sources.push_back(file);
- }
-
- }
- }
- }
-
- if (sources.size()) {
-
- dialog->add_sources_and_dest(sources,valid[0].get_base_dir());
- }
- }
-}
-
-bool EditorTextureImportPlugin::can_reimport_multiple_files() const {
-
- return true;
-
-}
-
-
-
-EditorTextureImportPlugin *EditorTextureImportPlugin::singleton=NULL;
-
-EditorTextureImportPlugin::EditorTextureImportPlugin(EditorNode *p_editor) {
-
- singleton=this;
- editor=p_editor;
- dialog = memnew( EditorTextureImportDialog(this) );
- editor->get_gui_base()->add_child(dialog);
-
-}
-
-////////////////////////////
-
-
- Vector<uint8_t> EditorTextureExportPlugin::custom_export(String& p_path,const Ref<EditorExportPlatform> &p_platform) {
-
- Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_path);
-
- if (rimd.is_valid()) {
-
- if (rimd->get_editor()!="") {
- int compression = rimd->get_option("format");
- if (compression!=EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_RAM)
- return Vector<uint8_t>(); //only useful for RAM compression to reconvert
- Ref<EditorImportPlugin> pl = EditorImportExport::get_singleton()->get_import_plugin_by_name(rimd->get_editor());
- if (pl.is_valid()) {
- Vector<uint8_t> ce = pl->custom_export(p_path,p_platform);
- if (ce.size())
- return ce;
- }
- }
- } else if (EditorImportExport::get_singleton()->image_get_export_group(p_path)) {
-
-
- Ref<EditorImportPlugin> pl = EditorImportExport::get_singleton()->get_import_plugin_by_name("texture");
- if (pl.is_valid()) {
- Vector<uint8_t> ce = pl->custom_export(p_path,p_platform);
- if (ce.size()) {
- p_path=p_path.get_basename()+".converted.tex";
- return ce;
- }
- }
-
- } else if (EditorImportExport::get_singleton()->get_export_image_action()!=EditorImportExport::IMAGE_ACTION_NONE){
-
- String xt = p_path.get_extension().to_lower();
- if (EditorImportExport::get_singleton()->get_image_formats().has(xt)) { //should check for more I guess?
-
- Ref<EditorImportPlugin> pl = EditorImportExport::get_singleton()->get_import_plugin_by_name("texture");
- if (pl.is_valid()) {
- Vector<uint8_t> ce = pl->custom_export(p_path,p_platform);
- if (ce.size()) {
- p_path=p_path.get_basename()+".converted.tex";
- return ce;
- }
- }
- }
- }
-
- return Vector<uint8_t>();
-}
-
-EditorTextureExportPlugin::EditorTextureExportPlugin() {
-
-
-}
-#endif
diff --git a/editor/io_plugins/editor_texture_import_plugin.h b/editor/io_plugins/editor_texture_import_plugin.h
deleted file mode 100644
index ea09227713..0000000000
--- a/editor/io_plugins/editor_texture_import_plugin.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/*************************************************************************/
-/* editor_texture_import_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef EDITOR_TEXTURE_IMPORT_PLUGIN_H
-#define EDITOR_TEXTURE_IMPORT_PLUGIN_H
-
-#if 0
-#include "editor/editor_dir_dialog.h"
-#include "editor/editor_file_system.h"
-#include "editor/editor_import_export.h"
-#include "scene/gui/dialogs.h"
-#include "scene/gui/file_dialog.h"
-#include "scene/gui/label.h"
-#include "scene/gui/line_edit.h"
-#include "scene/gui/option_button.h"
-#include "scene/gui/progress_bar.h"
-#include "scene/gui/slider.h"
-#include "scene/gui/spin_box.h"
-#include "scene/gui/tree.h"
-
-
-
-class EditorNode;
-class EditorTextureImportDialog;
-
-class EditorTextureImportPlugin : public EditorImportPlugin {
-
- GDCLASS(EditorTextureImportPlugin,EditorImportPlugin);
-public:
-
-
- enum Mode {
- MODE_TEXTURE_2D,
- MODE_TEXTURE_3D,
- MODE_ATLAS,
- MODE_LARGE,
- MODE_MAX
- };
-
-
-
-private:
-
- EditorNode *editor;
- EditorTextureImportDialog *dialog;
- static EditorTextureImportPlugin *singleton;
- //used by other importers such as mesh
-
- Error _process_texture_data(Ref<ImageTexture> &texture, int format, float quality, int flags,EditorExportPlatform::ImageCompression p_compr,int tex_flags,float shrink);
- void compress_image(EditorExportPlatform::ImageCompression p_mode,Image& image,bool p_smaller);
-
- uint32_t texture_flags_to_export_flags(uint32_t p_tex_flags) const;
-public:
-
-
- static EditorTextureImportPlugin *get_singleton() { return singleton; }
-
- enum ImageFormat {
-
- IMAGE_FORMAT_UNCOMPRESSED,
- IMAGE_FORMAT_COMPRESS_DISK_LOSSLESS,
- IMAGE_FORMAT_COMPRESS_DISK_LOSSY,
- IMAGE_FORMAT_COMPRESS_RAM,
- };
-
- enum ImageFlags {
-
- IMAGE_FLAG_STREAM_FORMAT=1,
- IMAGE_FLAG_FIX_BORDER_ALPHA=2,
- IMAGE_FLAG_ALPHA_BIT=4, //hint for compressions that use a bit for alpha
- IMAGE_FLAG_COMPRESS_EXTRA=8, // used for pvrtc2
- IMAGE_FLAG_NO_MIPMAPS=16, //normal for 2D games
- IMAGE_FLAG_REPEAT=32, //usually disabled in 2D
- IMAGE_FLAG_FILTER=64, //almost always enabled
- IMAGE_FLAG_PREMULT_ALPHA=128,//almost always enabled
- IMAGE_FLAG_CONVERT_TO_LINEAR=256, //convert image to linear
- IMAGE_FLAG_CONVERT_NORMAL_TO_XY=512, //convert image to linear
- IMAGE_FLAG_USE_ANISOTROPY=1024, //convert image to linear
- };
-
- virtual String get_name() const;
- virtual String get_visible_name() const;
- virtual void import_dialog(const String& p_from="");
- virtual Error import(const String& p_path, const Ref<ResourceImportMetadata>& p_from);
- virtual Error import2(const String& p_path, const Ref<ResourceImportMetadata>& p_from,EditorExportPlatform::ImageCompression p_compr, bool p_external=false);
- virtual Vector<uint8_t> custom_export(const String& p_path,const Ref<EditorExportPlatform> &p_platform);
-
- virtual void import_from_drop(const Vector<String>& p_drop,const String& p_dest_path);
- virtual void reimport_multiple_files(const Vector<String>& p_list);
- virtual bool can_reimport_multiple_files() const;
-
- EditorTextureImportPlugin(EditorNode* p_editor=NULL);
-};
-
-
-class EditorTextureExportPlugin : public EditorExportPlugin {
-
- GDCLASS( EditorTextureExportPlugin, EditorExportPlugin);
-
-
-public:
-
- virtual Vector<uint8_t> custom_export(String& p_path,const Ref<EditorExportPlatform> &p_platform);
- EditorTextureExportPlugin();
-};
-
-class EditorImportTextureOptions : public VBoxContainer {
-
- GDCLASS( EditorImportTextureOptions, VBoxContainer );
-
-
- OptionButton *format;
- VBoxContainer *quality_vb;
- HSlider *quality;
- Tree *flags;
- Vector<TreeItem*> items;
-
-
- bool updating;
-
- void _changedp(int p_value);
- void _changed();
-
-
-protected:
- static void _bind_methods();
- void _notification(int p_what);
-
-public:
-
-
-
- void set_format(EditorTextureImportPlugin::ImageFormat p_format);
- EditorTextureImportPlugin::ImageFormat get_format() const;
-
- void set_flags(uint32_t p_flags);
- uint32_t get_flags() const;
-
- void set_quality(float p_quality);
- float get_quality() const;
-
- void show_2d_notice();
-
- EditorImportTextureOptions();
-
-
-};
-#endif // EDITOR_TEXTURE_IMPORT_PLUGIN_H
-#endif
diff --git a/editor/io_plugins/editor_translation_import_plugin.cpp b/editor/io_plugins/editor_translation_import_plugin.cpp
deleted file mode 100644
index 5b15b94006..0000000000
--- a/editor/io_plugins/editor_translation_import_plugin.cpp
+++ /dev/null
@@ -1,480 +0,0 @@
-/*************************************************************************/
-/* editor_translation_import_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "editor_translation_import_plugin.h"
-
-#if 0
-#include "editor/editor_dir_dialog.h"
-#include "editor/editor_node.h"
-#include "editor/property_editor.h"
-#include "scene/gui/file_dialog.h"
-//#include "scene/resources/sample.h"
-#include "compressed_translation.h"
-#include "editor/project_settings.h"
-#include "io/resource_saver.h"
-#include "os/file_access.h"
-#include "translation.h"
-
-
-class EditorTranslationImportDialog : public ConfirmationDialog {
-
- GDCLASS(EditorTranslationImportDialog,ConfirmationDialog);
-
- EditorTranslationImportPlugin *plugin;
-
- LineEdit *import_path;
- LineEdit *save_path;
- EditorFileDialog *file_select;
- CheckButton *ignore_first;
- CheckButton *compress;
- CheckButton *add_to_project;
- EditorDirDialog *save_select;
- ConfirmationDialog *error_dialog;
- Vector<TreeItem*> items;
- Tree *columns;
-
-public:
-
- void _choose_file(const String& p_path) {
-
- import_path->set_text(p_path);
- FileAccess *f = FileAccess::open(p_path,FileAccess::READ);
- if (!f) {
-
- error_dialog->set_text(TTR("Invalid source!"));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
-
- }
-
- Vector<String> csvh = f->get_csv_line();
- memdelete(f);
-
- if (csvh.size()<2) {
-
- error_dialog->set_text(TTR("Invalid translation source!"));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- return;
-
- }
-
- columns->clear();
- columns->set_columns(2);
- TreeItem *root = columns->create_item();
- columns->set_hide_root(true);
- columns->set_column_titles_visible(true);
- columns->set_column_title(0,TTR("Column"));
- columns->set_column_title(1,TTR("Language"));
- Vector<String> langs = TranslationServer::get_all_locales();
- Vector<String> names = TranslationServer::get_all_locale_names();
- if (csvh[0]=="")
- ignore_first->set_pressed(true);
-
-
- items.clear();
-
- for(int i=1;i<csvh.size();i++) {
-
- TreeItem *ti = columns->create_item(root);
-
- ti->set_editable(0,true);
- ti->set_selectable(0,false);
- ti->set_cell_mode(0,TreeItem::CELL_MODE_CHECK);
- ti->set_checked(0,true);
- ti->set_text(0,itos(i));
- items.push_back(ti);
-
- String lname = csvh[i].to_lower().strip_edges();
- int idx=-1;
- String hint;
- for(int j=0;j<langs.size();j++) {
-
- if (langs[j]==lname.substr(0,langs[j].length()).to_lower()) {
- idx=j;
- }
- if (j>0) {
- hint+=",";
- }
- hint+=names[j].replace(","," ");
- }
-
- ti->set_cell_mode(1,TreeItem::CELL_MODE_RANGE);
- ti->set_text(1,hint);
- ti->set_editable(1,true);
-
-
- if (idx!=-1) {
- ignore_first->set_pressed(true);
- ti->set_range(1,idx);
- } else {
-
- //not found, maybe used stupid name
- if (lname.begins_with("br")) //brazilian
- ti->set_range(1,langs.find("pt"));
- else if (lname.begins_with("ch")) //chinese
- ti->set_range(1,langs.find("zh"));
- else if (lname.begins_with("sp")) //spanish
- ti->set_range(1,langs.find("es"));
- else if (lname.begins_with("kr"))// kprean
- ti->set_range(1,langs.find("ko"));
- else if (i==0)
- ti->set_range(1,langs.find("en"));
- else
- ti->set_range(1,langs.find("es"));
- }
-
- ti->set_metadata(1,names[ti->get_range(1)]);
- }
-
-
-
- }
- void _choose_save_dir(const String& p_path) {
-
- save_path->set_text(p_path);
- }
-
- void _browse() {
-
- file_select->popup_centered_ratio();
- }
-
- void _browse_target() {
-
- save_select->popup_centered_ratio();
-
- }
-
-
- void popup_import(const String& p_from) {
-
- popup_centered(Size2(400,400)*EDSCALE);
-
- if (p_from!="") {
-
- Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(p_from);
- ERR_FAIL_COND(!rimd.is_valid());
- ERR_FAIL_COND(rimd->get_source_count()!=1);
- _choose_file(EditorImportPlugin::expand_source_path(rimd->get_source_path(0)));
- _choose_save_dir(p_from.get_base_dir());
- String locale = rimd->get_option("locale");
- bool skip_first=rimd->get_option("skip_first");
- bool compressed = rimd->get_option("compress");
-
- int idx=-1;
-
- for(int i=0;i<items.size();i++) {
-
- String il = TranslationServer::get_all_locales()[items[i]->get_range(1)];
- if (il==locale) {
- idx=i;
- break;
- }
- }
-
- if (idx!=-1) {
- idx=rimd->get_option("index");
- }
-
- for(int i=0;i<items.size();i++) {
-
- if (i==idx) {
-
- Vector<String> locs = TranslationServer::get_all_locales();
- for(int j=0;j<locs.size();j++) {
- if (locs[j]==locale) {
- items[i]->set_range(1,j);
- }
-
- }
- items[i]->set_checked(0,true);
- } else {
- items[i]->set_checked(0,false);
-
- }
- }
-
- ignore_first->set_pressed(skip_first);
- compress->set_pressed(compressed);
-
-
-
- }
-
- }
-
-
- void _import() {
-
-
- if (items.size()==0) {
- error_dialog->set_text(TTR("No items to import!"));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- }
-
- if (!save_path->get_text().begins_with("res://")) {
- error_dialog->set_text(TTR("No target path!"));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- }
-
- EditorProgress progress("import_xl",TTR("Import Translations"),items.size());
- for(int i=0;i<items.size();i++) {
-
- progress.step(items[i]->get_metadata(1),i);
- if (!items[i]->is_checked(0))
- continue;
-
- String locale = TranslationServer::get_all_locales()[items[i]->get_range(1)];
- Ref<ResourceImportMetadata> imd = memnew( ResourceImportMetadata );
- imd->add_source(EditorImportPlugin::validate_source_path(import_path->get_text()));
- imd->set_option("locale",locale);
- imd->set_option("index",i);
- imd->set_option("skip_first",ignore_first->is_pressed());
- imd->set_option("compress",compress->is_pressed());
-
- String savefile = save_path->get_text().plus_file(import_path->get_text().get_file().get_basename()+"."+locale+".translation");
- Error err = plugin->import(savefile,imd);
- if (err!=OK) {
- error_dialog->set_text(TTR("Couldn't import!"));
- error_dialog->popup_centered(Size2(200,100)*EDSCALE);
- } else if (add_to_project->is_pressed()) {
-
- ProjectSettings::get_singleton()->add_translation(savefile);
- }
- }
- hide();
-
- }
-
-
- void _notification(int p_what) {
-
-
- if (p_what==NOTIFICATION_ENTER_TREE) {
-
-
- }
- }
-
- static void _bind_methods() {
-
-
- ClassDB::bind_method("_choose_file",&EditorTranslationImportDialog::_choose_file);
- ClassDB::bind_method("_choose_save_dir",&EditorTranslationImportDialog::_choose_save_dir);
- ClassDB::bind_method("_import",&EditorTranslationImportDialog::_import);
- ClassDB::bind_method("_browse",&EditorTranslationImportDialog::_browse);
- ClassDB::bind_method("_browse_target",&EditorTranslationImportDialog::_browse_target);
- //ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
- }
-
- EditorTranslationImportDialog(EditorTranslationImportPlugin *p_plugin) {
-
- plugin=p_plugin;
-
-
- set_title(TTR("Import Translation"));
-
- VBoxContainer *vbc = memnew( VBoxContainer );
- add_child(vbc);
- //set_child_rect(vbc);
-
-
-
- VBoxContainer *csvb = memnew( VBoxContainer );
-
- HBoxContainer *hbc = memnew( HBoxContainer );
- csvb->add_child(hbc);
- vbc->add_margin_child(TTR("Source CSV:"),csvb);
-
- import_path = memnew( LineEdit );
- import_path->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc->add_child(import_path);
- ignore_first = memnew( CheckButton );
- ignore_first->set_text(TTR("Ignore First Row"));
- csvb->add_child(ignore_first);
-
- Button * import_choose = memnew( Button );
- import_choose->set_text(" .. ");
- hbc->add_child(import_choose);
-
- import_choose->connect("pressed", this,"_browse");
-
- VBoxContainer *tcomp = memnew( VBoxContainer);
- hbc = memnew( HBoxContainer );
- tcomp->add_child(hbc);
- vbc->add_margin_child(TTR("Target Path:"),tcomp);
-
- save_path = memnew( LineEdit );
- save_path->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc->add_child(save_path);
-
- Button * save_choose = memnew( Button );
- save_choose->set_text(" .. ");
- hbc->add_child(save_choose);
-
- save_choose->connect("pressed", this,"_browse_target");
-
- compress = memnew( CheckButton);
- compress->set_pressed(true);
- compress->set_text(TTR("Compress"));
- tcomp->add_child(compress);
-
- add_to_project = memnew( CheckButton);
- add_to_project->set_pressed(true);
- add_to_project->set_text(TTR("Add to Project (project.godot)"));
- tcomp->add_child(add_to_project);
-
- file_select = memnew(EditorFileDialog);
- file_select->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
- add_child(file_select);
- file_select->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- file_select->connect("file_selected", this,"_choose_file");
- file_select->add_filter("*.csv ; Translation CSV");
- save_select = memnew( EditorDirDialog );
- add_child(save_select);
-
- //save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR);
- save_select->connect("dir_selected", this,"_choose_save_dir");
-
- get_ok()->connect("pressed", this,"_import");
- get_ok()->set_text(TTR("Import"));
-
-
- error_dialog = memnew ( ConfirmationDialog );
- add_child(error_dialog);
- error_dialog->get_ok()->set_text(TTR("Accept"));
- //error_dialog->get_cancel()->hide();
-
- set_hide_on_ok(false);
-
- columns = memnew( Tree );
- vbc->add_margin_child(TTR("Import Languages:"),columns,true);
- }
-
- ~EditorTranslationImportDialog() {
-
- }
-
-};
-
-
-String EditorTranslationImportPlugin::get_name() const {
-
- return "translation";
-}
-String EditorTranslationImportPlugin::get_visible_name() const {
-
- return TTR("Translation");
-}
-void EditorTranslationImportPlugin::import_dialog(const String& p_from) {
-
- dialog->popup_import(p_from);
-}
-
-
-
-void EditorTranslationImportPlugin::import_from_drop(const Vector<String>& p_drop, const String &p_dest_path) {
-
-
- for(int i=0;i<p_drop.size();i++) {
- String ext = p_drop[i].get_extension().to_lower();
-
- if (ext=="csv") {
-
- import_dialog();
- dialog->_choose_file(p_drop[i]);
- dialog->_choose_save_dir(p_dest_path);
- break;
- }
- }
-
-
-}
-
-Error EditorTranslationImportPlugin::import(const String& p_path, const Ref<ResourceImportMetadata>& p_from) {
-
- Ref<ResourceImportMetadata> from = p_from;
- ERR_FAIL_COND_V( from->get_source_count()!=1, ERR_INVALID_PARAMETER);
-
- String source = EditorImportPlugin::expand_source_path( from->get_source_path(0) );
-
- FileAccessRef f = FileAccess::open(source,FileAccess::READ);
-
- ERR_FAIL_COND_V( !f, ERR_INVALID_PARAMETER );
-
- bool skip_first = from->get_option("skip_first");
- int index = from->get_option("index");
- index+=1;
- String locale = from->get_option("locale");
-
- Ref<Translation> translation = memnew( Translation );
-
- translation->set_locale( locale );
-
- Vector<String> line = f->get_csv_line();
-
- while(line.size()>1) {
-
- if (!skip_first) {
- ERR_FAIL_INDEX_V(index,line.size(),ERR_INVALID_DATA );
- translation->add_message(line[0].strip_edges(),line[index]);
-
- } else {
-
- skip_first=false;
- }
-
- line = f->get_csv_line();
- }
-
- from->set_source_md5(0,FileAccess::get_md5(source));
- from->set_editor(get_name());
-
- String dst_path = p_path;
-
- if (from->get_option("compress")) {
-
- Ref<PHashTranslation> cxl = memnew( PHashTranslation );
- cxl->generate( translation );
- translation=cxl;
- }
-
- translation->set_import_metadata(from);
- return ResourceSaver::save(dst_path,translation);
-
-}
-
-
-EditorTranslationImportPlugin::EditorTranslationImportPlugin(EditorNode* p_editor) {
-
- dialog = memnew(EditorTranslationImportDialog(this));
- p_editor->get_gui_base()->add_child(dialog);
-}
-
-#endif
diff --git a/editor/io_plugins/editor_translation_import_plugin.h b/editor/io_plugins/editor_translation_import_plugin.h
deleted file mode 100644
index 78335b531d..0000000000
--- a/editor/io_plugins/editor_translation_import_plugin.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*************************************************************************/
-/* editor_translation_import_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef EDITOR_TRANSLATION_IMPORT_PLUGIN_H
-#define EDITOR_TRANSLATION_IMPORT_PLUGIN_H
-
-#include "editor/editor_export.h"
-#include "scene/resources/font.h"
-#if 0
-class EditorNode;
-class EditorTranslationImportDialog;
-
-class EditorTranslationImportPlugin : public EditorImportPlugin {
-
- GDCLASS(EditorTranslationImportPlugin,EditorImportPlugin);
-
- EditorTranslationImportDialog *dialog;
-public:
-
- virtual String get_name() const;
- virtual String get_visible_name() const;
- virtual void import_dialog(const String& p_from="");
- virtual Error import(const String& p_path, const Ref<ResourceImportMetadata>& p_from);
- void import_from_drop(const Vector<String>& p_drop, const String &p_dest_path);
-
-
- EditorTranslationImportPlugin(EditorNode* p_editor);
-};
-
-#endif
-#endif // EDITOR_TRANSLATION_IMPORT_PLUGIN_H
diff --git a/editor/multi_node_edit.cpp b/editor/multi_node_edit.cpp
index a0f7b1e9dd..df1d7ff3d1 100644
--- a/editor/multi_node_edit.cpp
+++ b/editor/multi_node_edit.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/multi_node_edit.h b/editor/multi_node_edit.h
index 3ffb0e205e..5abe7f6438 100644
--- a/editor/multi_node_edit.h
+++ b/editor/multi_node_edit.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/node_dock.cpp b/editor/node_dock.cpp
index b1a538ed2e..7edaf0e5af 100644
--- a/editor/node_dock.cpp
+++ b/editor/node_dock.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -58,6 +58,9 @@ void NodeDock::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
connections_button->set_icon(get_icon("Connect", "EditorIcons"));
groups_button->set_icon(get_icon("Groups", "EditorIcons"));
+ } else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
+ connections_button->set_icon(get_icon("Connect", "EditorIcons"));
+ groups_button->set_icon(get_icon("Groups", "EditorIcons"));
}
}
diff --git a/editor/node_dock.h b/editor/node_dock.h
index 29e5dc5169..7c4f6bbecc 100644
--- a/editor/node_dock.h
+++ b/editor/node_dock.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/output_strings.cpp b/editor/output_strings.cpp
index 8c9f8386ef..213cd47d01 100644
--- a/editor/output_strings.cpp
+++ b/editor/output_strings.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/output_strings.h b/editor/output_strings.h
index aeaad35c0c..8482e55752 100644
--- a/editor/output_strings.h
+++ b/editor/output_strings.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/pane_drag.cpp b/editor/pane_drag.cpp
index 22b306f941..33db2307b5 100644
--- a/editor/pane_drag.cpp
+++ b/editor/pane_drag.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/pane_drag.h b/editor/pane_drag.h
index 0be017b8f7..55372198d1 100644
--- a/editor/pane_drag.h
+++ b/editor/pane_drag.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index ecae272b6d..cc7fc57cde 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -367,10 +367,6 @@ void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource> &p_resou
int flg = 0;
if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources"))
flg |= ResourceSaver::FLAG_COMPRESS;
- /*
- if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative"))
- flg |= ResourceSaver::FLAG_RELATIVE_PATHS;
- */
String path = ProjectSettings::get_singleton()->localize_path(p_path);
Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
@@ -380,7 +376,6 @@ void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource> &p_resou
accept->popup_centered_minsize();
return;
}
- //EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type());
((Resource *)p_resource.ptr())->set_path(path);
editor->emit_signal("resource_saved", p_resource);
@@ -656,8 +651,8 @@ void AnimationPlayerEditor::set_state(const Dictionary &p_state) {
return;
Node *n = EditorNode::get_singleton()->get_edited_scene()->get_node(p_state["player"]);
- if (n && n->cast_to<AnimationPlayer>() && EditorNode::get_singleton()->get_editor_selection()->is_selected(n)) {
- player = n->cast_to<AnimationPlayer>();
+ if (Object::cast_to<AnimationPlayer>(n) && EditorNode::get_singleton()->get_editor_selection()->is_selected(n)) {
+ player = Object::cast_to<AnimationPlayer>(n);
_update_player();
show();
set_process(true);
@@ -737,9 +732,9 @@ void AnimationPlayerEditor::_dialog_action(String p_file) {
if (current != "") {
Ref<Animation> anim = player->get_animation(current);
- ERR_FAIL_COND(!anim->cast_to<Resource>())
+ ERR_FAIL_COND(!Object::cast_to<Resource>(*anim))
- RES current_res = RES(anim->cast_to<Resource>());
+ RES current_res = RES(Object::cast_to<Resource>(*anim));
_animation_save_in_path(current_res, p_file);
}
@@ -970,71 +965,6 @@ void AnimationPlayerEditor::_list_changed() {
if (is_visible_in_tree())
_update_player();
}
-#if 0
-void AnimationPlayerEditor::_editor_store() {
-
- if (animation->get_item_count()==0)
- return;
- String current = animation->get_item_text(animation->get_selected());
- Ref<Animation> anim = player->get_animation(current);
-
- if (key_editor->get_current_animation()==anim)
- return; //already there
-
-
- undo_redo->create_action("Store anim in editor");
- undo_redo->add_do_method(key_editor,"set_animation",anim);
- undo_redo->add_undo_method(key_editor,"remove_animation",anim);
- undo_redo->commit_action();
-}
-
-void AnimationPlayerEditor::_editor_load(){
-
- Ref<Animation> anim = key_editor->get_current_animation();
- if (anim.is_null())
- return;
-
- String existing = player->find_animation(anim);
- if (existing!="") {
- _select_anim_by_name(existing);
- return; //already has
- }
-
- int count=1;
- String base=anim->get_name();
- bool noname=false;
- if (base=="") {
- base="New Anim";
- noname=true;
- }
-
- while(true) {
- String attempt = base;
- if (count>1)
- attempt+=" ("+itos(count)+")";
- if (player->has_animation(attempt)) {
- count++;
- continue;
- }
- base=attempt;
- break;
- }
-
- if (noname)
- anim->set_name(base);
-
- undo_redo->create_action("Add Animation From Editor");
- undo_redo->add_do_method(player,"add_animation",base,anim);
- undo_redo->add_undo_method(player,"remove_animation",base);
- undo_redo->add_do_method(this,"_animation_player_changed",player);
- undo_redo->add_undo_method(this,"_animation_player_changed",player);
- undo_redo->commit_action();
-
- _select_anim_by_name(base);
-
-
-}
-#endif
void AnimationPlayerEditor::_animation_key_editor_anim_len_changed(float p_len) {
@@ -1395,7 +1325,6 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
error_dialog = memnew(ConfirmationDialog);
error_dialog->get_ok()->set_text(TTR("Close"));
- //error_dialog->get_cancel()->set_text("Close");
error_dialog->set_text(TTR("Error!"));
add_child(error_dialog);
@@ -1461,7 +1390,7 @@ void AnimationPlayerEditorPlugin::edit(Object *p_object) {
anim_editor->set_undo_redo(&get_undo_redo());
if (!p_object)
return;
- anim_editor->edit(p_object->cast_to<AnimationPlayer>());
+ anim_editor->edit(Object::cast_to<AnimationPlayer>(p_object));
}
bool AnimationPlayerEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h
index bcf40f52d3..cea6b05ed4 100644
--- a/editor/plugins/animation_player_editor_plugin.h
+++ b/editor/plugins/animation_player_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index 55975bdefa..054124da8f 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -281,11 +281,11 @@ void AnimationTreeEditor::_popup_edit_dialog() {
case AnimationTreePlayer::NODE_ANIMATION:
- if (anim_tree->get_master_player() != NodePath() && anim_tree->has_node(anim_tree->get_master_player()) && anim_tree->get_node(anim_tree->get_master_player())->cast_to<AnimationPlayer>()) {
+ if (anim_tree->get_master_player() != NodePath() && anim_tree->has_node(anim_tree->get_master_player()) && Object::cast_to<AnimationPlayer>(anim_tree->get_node(anim_tree->get_master_player()))) {
- AnimationPlayer *ap = anim_tree->get_node(anim_tree->get_master_player())->cast_to<AnimationPlayer>();
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(anim_tree->get_node(anim_tree->get_master_player()));
master_anim_popup->clear();
- master_anim_popup->add_item("Edit Filters");
+ master_anim_popup->add_item(TTR("Edit Filters"));
master_anim_popup->add_separator();
List<StringName> sn;
ap->get_animation_list(&sn);
@@ -605,15 +605,6 @@ void AnimationTreeEditor::_draw_node(const StringName &p_node) {
}
}
-#if 0
-void AnimationTreeEditor::_node_param_changed() {
-
- //anim_tree->node_set_param( click_node,property_editor->get_variant() );
- //update();
- //_write_anim_tree_graph();
-}
-#endif
-
AnimationTreeEditor::ClickType AnimationTreeEditor::_locate_click(const Point2 &p_click, StringName *p_node_id, int *p_slot_index) const {
Ref<StyleBox> style = get_stylebox("panel", "PopupMenu");
@@ -714,32 +705,6 @@ Point2 AnimationTreeEditor::_get_slot_pos(const StringName &p_node_id, bool p_in
return pos;
}
-#if 0
-void AnimationTreeEditor::_node_edit_property(const StringName& p_node) {
-
- Ref<StyleBox> style = get_stylebox("panel","PopupMenu");
- Size2 size = get_node_size(p_node);
- Point2 pos = Point2( anim_tree->node_get_pos_x(p_node), anim_tree->node_get_pos_y(p_node) )-offset;
-
- VisualServer::AnimationTreeNodeType type=anim_tree->node_get_type(p_node);
-
- PropertyInfo ph = VisualServer::get_singleton()->anim_tree_node_get_type_info(type);
- if (ph.type==Variant::NIL)
- return;
- if (ph.type==Variant::_RID)
- ph.type=Variant::RESOURCE;
-
- property_editor->edit(NULL,ph.name,ph.type,anim_tree->node_get_param(p_node),ph.hint,ph.hint_string);
-
- Point2 popup_pos=Point2( pos.x+(size.width-property_editor->get_size().width)/2.0,pos.y+(size.y-style->get_margin(MARGIN_BOTTOM))).floor();
- popup_pos+=get_global_position();
- property_editor->set_position(popup_pos);
-
- property_editor->popup();
-
-}
-#endif
-
void AnimationTreeEditor::_gui_input(Ref<InputEvent> p_event) {
Ref<InputEventMouseButton> mb = p_event;
@@ -1233,7 +1198,7 @@ void AnimationTreeEditor::_edit_filters() {
if (np.get_property() != StringName()) {
Node *n = base->get_node(np);
- Skeleton *s = n->cast_to<Skeleton>();
+ Skeleton *s = Object::cast_to<Skeleton>(n);
if (s) {
String skelbase = E->get().substr(0, E->get().find(":"));
@@ -1439,7 +1404,7 @@ AnimationTreeEditor::AnimationTreeEditor() {
void AnimationTreeEditorPlugin::edit(Object *p_object) {
- anim_tree_editor->edit(p_object->cast_to<AnimationTreePlayer>());
+ anim_tree_editor->edit(Object::cast_to<AnimationTreePlayer>(p_object));
}
bool AnimationTreeEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/animation_tree_editor_plugin.h b/editor/plugins/animation_tree_editor_plugin.h
index 972c6c9b47..a5bef263f4 100644
--- a/editor/plugins/animation_tree_editor_plugin.h
+++ b/editor/plugins/animation_tree_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 5ff9c7bb8a..626b4f5a7f 100644
--- a/editor/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -595,7 +595,7 @@ void EditorAssetLibrary::_install_asset() {
for (int i = 0; i < downloads_hb->get_child_count(); i++) {
- EditorAssetLibraryItemDownload *d = downloads_hb->get_child(i)->cast_to<EditorAssetLibraryItemDownload>();
+ EditorAssetLibraryItemDownload *d = Object::cast_to<EditorAssetLibraryItemDownload>(downloads_hb->get_child(i));
if (d && d->get_asset_id() == description->get_asset_id()) {
if (EditorNode::get_singleton() != NULL)
diff --git a/editor/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h
index fa768ec96a..35977f3949 100644
--- a/editor/asset_library_editor_plugin.h
+++ b/editor/plugins/asset_library_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/baked_light_baker.cpp b/editor/plugins/baked_light_baker.cpp
deleted file mode 100644
index bef35647d4..0000000000
--- a/editor/plugins/baked_light_baker.cpp
+++ /dev/null
@@ -1,2732 +0,0 @@
-/*************************************************************************/
-/* baked_light_baker.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "baked_light_baker.h"
-
-#include "editor/editor_node.h"
-#include "editor/editor_settings.h"
-#include "io/marshalls.h"
-#include <stdlib.h>
-#include <cmath>
-
-#if 0
-void baked_light_baker_add_64f(double *dst,double value);
-void baked_light_baker_add_64i(int64_t *dst,int64_t value);
-
-//-separar en 2 testuras?
-//*mejorar performance y threads
-//*modos lineales
-//*saturacion
-
-_FORCE_INLINE_ static uint64_t get_uv_normal_bit(const Vector3& p_vector) {
-
- int lat = Math::fast_ftoi(Math::floor(Math::acos(p_vector.dot(Vector3(0,1,0)))*6.0/Math_PI+0.5));
-
- if (lat==0) {
- return 60;
- } else if (lat==6) {
- return 61;
- }
-
- int lon = Math::fast_ftoi(Math::floor( (Math_PI+Math::atan2(p_vector.x,p_vector.z))*12.0/(Math_PI*2.0) + 0.5))%12;
-
- return lon+(lat-1)*12;
-}
-
-
-
-_FORCE_INLINE_ static Vector3 get_bit_normal(int p_bit) {
-
- if (p_bit==61) {
- return Vector3(0,1,0);
- } else if (p_bit==62){
- return Vector3(0,-1,0);
- }
-
- float latang = ((p_bit / 12)+1)*Math_PI/6.0;
-
- Vector2 latv(Math::sin(latang),Math::cos(latang));
-
- float lonang = ((p_bit%12)*Math_PI*2.0/12.0)-Math_PI;
-
- Vector2 lonv(Math::sin(lonang),Math::cos(lonang));
-
- return Vector3(lonv.x*latv.x,latv.y,lonv.y*latv.x).normalized();
-
-}
-
-
-BakedLightBaker::MeshTexture* BakedLightBaker::_get_mat_tex(const Ref<Texture>& p_tex) {
-
- if (!tex_map.has(p_tex)) {
-
- Ref<ImageTexture> imgtex=p_tex;
- if (imgtex.is_null())
- return NULL;
- Image image=imgtex->get_data();
- if (image.empty())
- return NULL;
-
- if (image.get_format()!=Image::FORMAT_RGBA8) {
- if (image.get_format()>Image::FORMAT_INDEXED_ALPHA) {
- Error err = image.decompress();
- if (err)
- return NULL;
- }
-
- if (image.get_format()!=Image::FORMAT_RGBA8)
- image.convert(Image::FORMAT_RGBA8);
- }
-
- if (imgtex->get_flags()&Texture::FLAG_CONVERT_TO_LINEAR) {
- Image copy = image;
- copy.srgb_to_linear();
- image=copy;
- }
-
- PoolVector<uint8_t> dvt=image.get_data();
- PoolVector<uint8_t>::Read r=dvt.read();
- MeshTexture mt;
- mt.tex_w=image.get_width();
- mt.tex_h=image.get_height();
- int len = image.get_width()*image.get_height()*4;
- mt.tex.resize(len);
- copymem(mt.tex.ptr(),r.ptr(),len);
-
- textures.push_back(mt);
- tex_map[p_tex]=&textures.back()->get();
- }
-
- return tex_map[p_tex];
-}
-
-
-void BakedLightBaker::_add_mesh(const Ref<Mesh>& p_mesh,const Ref<Material>& p_mat_override,const Transform& p_xform,int p_baked_texture) {
-
-
- for(int i=0;i<p_mesh->get_surface_count();i++) {
-
- if (p_mesh->surface_get_primitive_type(i)!=Mesh::PRIMITIVE_TRIANGLES)
- continue;
- Ref<Material> mat = p_mat_override.is_valid()?p_mat_override:p_mesh->surface_get_material(i);
-
- MeshMaterial *matptr=NULL;
- int baked_tex=p_baked_texture;
-
- if (mat.is_valid()) {
-
- if (!mat_map.has(mat)) {
-
- MeshMaterial mm;
-
- Ref<SpatialMaterial> fm = mat;
- if (fm.is_valid()) {
- //fixed route
- mm.diffuse.color=fm->get_parameter(SpatialMaterial::PARAM_DIFFUSE);
- if (linear_color)
- mm.diffuse.color=mm.diffuse.color.to_linear();
- mm.diffuse.tex=_get_mat_tex(fm->get_texture(SpatialMaterial::PARAM_DIFFUSE));
- mm.specular.color=fm->get_parameter(SpatialMaterial::PARAM_SPECULAR);
- if (linear_color)
- mm.specular.color=mm.specular.color.to_linear();
-
- mm.specular.tex=_get_mat_tex(fm->get_texture(SpatialMaterial::PARAM_SPECULAR));
- } else {
-
- mm.diffuse.color=Color(1,1,1,1);
- mm.diffuse.tex=NULL;
- mm.specular.color=Color(0,0,0,1);
- mm.specular.tex=NULL;
- }
-
- materials.push_back(mm);
- mat_map[mat]=&materials.back()->get();
-
- }
-
- matptr=mat_map[mat];
-
- }
-
-
- int facecount=0;
-
-
- if (p_mesh->surface_get_format(i)&Mesh::ARRAY_FORMAT_INDEX) {
-
- facecount=p_mesh->surface_get_array_index_len(i);
- } else {
-
- facecount=p_mesh->surface_get_array_len(i);
- }
-
- ERR_CONTINUE((facecount==0 || (facecount%3)!=0));
-
- facecount/=3;
-
- int tbase=triangles.size();
- triangles.resize(facecount+tbase);
-
-
- Array a = p_mesh->surface_get_arrays(i);
-
- PoolVector<Vector3> vertices = a[Mesh::ARRAY_VERTEX];
- PoolVector<Vector3>::Read vr=vertices.read();
- PoolVector<Vector2> uv;
- PoolVector<Vector2>::Read uvr;
- PoolVector<Vector2> uv2;
- PoolVector<Vector2>::Read uv2r;
- PoolVector<Vector3> normal;
- PoolVector<Vector3>::Read normalr;
- bool read_uv=false;
- bool read_normal=false;
-
- if (p_mesh->surface_get_format(i)&Mesh::ARRAY_FORMAT_TEX_UV) {
-
- uv=a[Mesh::ARRAY_TEX_UV];
- uvr=uv.read();
- read_uv=true;
-
- if (mat.is_valid() && mat->get_flag(Material::FLAG_LIGHTMAP_ON_UV2) && p_mesh->surface_get_format(i)&Mesh::ARRAY_FORMAT_TEX_UV2) {
-
- uv2=a[Mesh::ARRAY_TEX_UV2];
- uv2r=uv2.read();
-
- } else {
- uv2r=uv.read();
- if (baked_light->get_transfer_lightmaps_only_to_uv2()) {
- baked_tex=-1;
- }
- }
- }
-
- if (p_mesh->surface_get_format(i)&Mesh::ARRAY_FORMAT_NORMAL) {
-
- normal=a[Mesh::ARRAY_NORMAL];
- normalr=normal.read();
- read_normal=true;
- }
-
- Matrix3 normal_xform = p_xform.basis.inverse().transposed();
-
-
- if (p_mesh->surface_get_format(i)&Mesh::ARRAY_FORMAT_INDEX) {
-
- PoolVector<int> indices = a[Mesh::ARRAY_INDEX];
- PoolVector<int>::Read ir = indices.read();
-
- for(int i=0;i<facecount;i++) {
- Triangle &t=triangles[tbase+i];
- t.vertices[0]=p_xform.xform(vr[ ir[i*3+0] ]);
- t.vertices[1]=p_xform.xform(vr[ ir[i*3+1] ]);
- t.vertices[2]=p_xform.xform(vr[ ir[i*3+2] ]);
- t.material=matptr;
- t.baked_texture=baked_tex;
- if (read_uv) {
-
- t.uvs[0]=uvr[ ir[i*3+0] ];
- t.uvs[1]=uvr[ ir[i*3+1] ];
- t.uvs[2]=uvr[ ir[i*3+2] ];
-
- t.bake_uvs[0]=uv2r[ ir[i*3+0] ];
- t.bake_uvs[1]=uv2r[ ir[i*3+1] ];
- t.bake_uvs[2]=uv2r[ ir[i*3+2] ];
- }
- if (read_normal) {
-
- t.normals[0]=normal_xform.xform(normalr[ ir[i*3+0] ]).normalized();
- t.normals[1]=normal_xform.xform(normalr[ ir[i*3+1] ]).normalized();
- t.normals[2]=normal_xform.xform(normalr[ ir[i*3+2] ]).normalized();
- }
- }
-
- } else {
-
- for(int i=0;i<facecount;i++) {
- Triangle &t=triangles[tbase+i];
- t.vertices[0]=p_xform.xform(vr[ i*3+0 ]);
- t.vertices[1]=p_xform.xform(vr[ i*3+1 ]);
- t.vertices[2]=p_xform.xform(vr[ i*3+2 ]);
- t.material=matptr;
- t.baked_texture=baked_tex;
- if (read_uv) {
-
- t.uvs[0]=uvr[ i*3+0 ];
- t.uvs[1]=uvr[ i*3+1 ];
- t.uvs[2]=uvr[ i*3+2 ];
-
- t.bake_uvs[0]=uv2r[ i*3+0 ];
- t.bake_uvs[1]=uv2r[ i*3+1 ];
- t.bake_uvs[2]=uv2r[ i*3+2 ];
-
- }
- if (read_normal) {
-
- t.normals[0]=normal_xform.xform(normalr[ i*3+0 ]).normalized();
- t.normals[1]=normal_xform.xform(normalr[ i*3+1 ]).normalized();
- t.normals[2]=normal_xform.xform(normalr[ i*3+2 ]).normalized();
- }
- }
- }
- }
-
-}
-
-
-void BakedLightBaker::_parse_geometry(Node* p_node) {
-
- if (p_node->cast_to<MeshInstance>()) {
-
- MeshInstance *meshi=p_node->cast_to<MeshInstance>();
- Ref<Mesh> mesh=meshi->get_mesh();
- if (mesh.is_valid()) {
- _add_mesh(mesh,meshi->get_material_override(),base_inv * meshi->get_global_transform(),meshi->get_baked_light_texture_id());
- }
- } else if (p_node->cast_to<Light>()) {
-
- Light *dl=p_node->cast_to<Light>();
-
- if (dl->get_bake_mode()!=Light::BAKE_MODE_DISABLED) {
-
-
- LightData dirl;
- dirl.type=VS::LightType(dl->get_light_type());
- dirl.diffuse=dl->get_color(DirectionalLight::COLOR_DIFFUSE);
- dirl.specular=dl->get_color(DirectionalLight::COLOR_SPECULAR);
- if (linear_color)
- dirl.diffuse=dirl.diffuse.to_linear();
- if (linear_color)
- dirl.specular=dirl.specular.to_linear();
-
- dirl.energy=dl->get_parameter(DirectionalLight::PARAM_ENERGY);
- dirl.pos=dl->get_global_transform().origin;
- dirl.up=dl->get_global_transform().basis.get_axis(1).normalized();
- dirl.left=dl->get_global_transform().basis.get_axis(0).normalized();
- dirl.dir=-dl->get_global_transform().basis.get_axis(2).normalized();
- dirl.spot_angle=dl->get_parameter(DirectionalLight::PARAM_SPOT_ANGLE);
- dirl.spot_attenuation=dl->get_parameter(DirectionalLight::PARAM_SPOT_ATTENUATION);
- dirl.attenuation=dl->get_parameter(DirectionalLight::PARAM_ATTENUATION);
- dirl.darkening=dl->get_parameter(DirectionalLight::PARAM_SHADOW_DARKENING);
- dirl.radius=dl->get_parameter(DirectionalLight::PARAM_RADIUS);
- dirl.bake_direct=dl->get_bake_mode()==Light::BAKE_MODE_FULL;
- dirl.rays_thrown=0;
- dirl.bake_shadow=dl->get_bake_mode()==Light::BAKE_MODE_INDIRECT_AND_SHADOWS;
- lights.push_back(dirl);
- }
-
- } else if (p_node->cast_to<Spatial>()){
-
- Spatial *sp = p_node->cast_to<Spatial>();
-
- Array arr = p_node->call("_get_baked_light_meshes");
- for(int i=0;i<arr.size();i+=2) {
-
- Transform xform=arr[i];
- Ref<Mesh> mesh=arr[i+1];
- _add_mesh(mesh,Ref<Material>(),base_inv * (sp->get_global_transform() * xform));
- }
- }
-
- for(int i=0;i<p_node->get_child_count();i++) {
-
- _parse_geometry(p_node->get_child(i));
- }
-}
-
-
-void BakedLightBaker::_fix_lights() {
-
-
- total_light_area=0;
- for(int i=0;i<lights.size();i++) {
-
- LightData &dl=lights[i];
-
- switch(dl.type) {
- case VS::LIGHT_DIRECTIONAL: {
-
- float up_max=-1e10;
- float dir_max=-1e10;
- float left_max=-1e10;
- float up_min=1e10;
- float dir_min=1e10;
- float left_min=1e10;
-
- for(int j=0;j<triangles.size();j++) {
-
- for(int k=0;k<3;k++) {
-
- Vector3 v = triangles[j].vertices[k];
-
- float up_d = dl.up.dot(v);
- float dir_d = dl.dir.dot(v);
- float left_d = dl.left.dot(v);
-
- if (up_d>up_max)
- up_max=up_d;
- if (up_d<up_min)
- up_min=up_d;
-
- if (left_d>left_max)
- left_max=left_d;
- if (left_d<left_min)
- left_min=left_d;
-
- if (dir_d>dir_max)
- dir_max=dir_d;
- if (dir_d<dir_min)
- dir_min=dir_d;
-
- }
- }
-
- //make a center point, then the upvector and leftvector
- dl.pos = dl.left*( left_max+left_min )*0.5 + dl.up*( up_max+up_min )*0.5 + dl.dir*(dir_min-(dir_max-dir_min));
- dl.left*=(left_max-left_min)*0.5;
- dl.up*=(up_max-up_min)*0.5;
- dl.length = (dir_max - dir_min)*10; //arbitrary number to keep it in scale
- dl.area=dl.left.length()*2*dl.up.length()*2;
- dl.constant=1.0/dl.area;
- } break;
- case VS::LIGHT_OMNI:
- case VS::LIGHT_SPOT: {
-
- dl.attenuation_table.resize(ATTENUATION_CURVE_LEN);
- for(int j=0;j<ATTENUATION_CURVE_LEN;j++) {
- dl.attenuation_table[j]=1.0-Math::pow(j/float(ATTENUATION_CURVE_LEN),dl.attenuation);
- float falloff=j*dl.radius/float(ATTENUATION_CURVE_LEN);
- if (falloff==0)
- falloff=0.000001;
- float intensity=4*Math_PI*(falloff*falloff);
- //dl.attenuation_table[j]*=falloff*falloff;
- dl.attenuation_table[j]*=1.0/(3.0/intensity);
-
- }
- if (dl.type==VS::LIGHT_OMNI) {
-
- dl.area=4.0*Math_PI*pow(dl.radius,2.0f);
- dl.constant=1.0/3.5;
- } else {
-
-
- float r = Math::tan(Math::deg2rad(dl.spot_angle))*dl.radius;
- float c = 1.0-(Math::deg2rad(dl.spot_angle)*0.5+0.5);
- dl.constant=1.0/3.5;
- dl.constant*=1.0/c;
-
- dl.area=Math_PI*r*r*c;
- }
-
- } break;
-
-
- }
-
- total_light_area+=dl.area;
- }
-}
-
-BakedLightBaker::BVH* BakedLightBaker::_parse_bvh(BVH** p_children, int p_size, int p_depth, int &max_depth) {
-
- if (p_depth>max_depth) {
- max_depth=p_depth;
- }
-
- if (p_size==1) {
-
- return p_children[0];
- } else if (p_size==0) {
-
- return NULL;
- }
-
-
- AABB aabb;
- aabb=p_children[0]->aabb;
- for(int i=1;i<p_size;i++) {
-
- aabb.merge_with(p_children[i]->aabb);
- }
-
- int li=aabb.get_longest_axis_index();
-
- switch(li) {
-
- case Vector3::AXIS_X: {
- SortArray<BVH*,BVHCmpX> sort_x;
- sort_x.nth_element(0,p_size,p_size/2,p_children);
- //sort_x.sort(&p_bb[p_from],p_size);
- } break;
- case Vector3::AXIS_Y: {
- SortArray<BVH*,BVHCmpY> sort_y;
- sort_y.nth_element(0,p_size,p_size/2,p_children);
- //sort_y.sort(&p_bb[p_from],p_size);
- } break;
- case Vector3::AXIS_Z: {
- SortArray<BVH*,BVHCmpZ> sort_z;
- sort_z.nth_element(0,p_size,p_size/2,p_children);
- //sort_z.sort(&p_bb[p_from],p_size);
-
- } break;
- }
-
-
- BVH* left = _parse_bvh(p_children,p_size/2,p_depth+1,max_depth);
- BVH* right = _parse_bvh(&p_children[p_size/2],p_size-p_size/2,p_depth+1,max_depth);
-
- BVH *_new = memnew(BVH);
- _new->aabb=aabb;
- _new->center=aabb.pos+aabb.size*0.5;
- _new->children[0]=left;
- _new->children[1]=right;
- _new->leaf=NULL;
-
- return _new;
-}
-
-void BakedLightBaker::_make_bvh() {
-
- Vector<BVH*> bases;
- bases.resize(triangles.size());
- int max_depth=0;
- for(int i=0;i<triangles.size();i++) {
- bases[i]=memnew( BVH );
- bases[i]->leaf=&triangles[i];
- bases[i]->aabb.pos=triangles[i].vertices[0];
- bases[i]->aabb.expand_to(triangles[i].vertices[1]);
- bases[i]->aabb.expand_to(triangles[i].vertices[2]);
- triangles[i].aabb=bases[i]->aabb;
- bases[i]->center=bases[i]->aabb.pos+bases[i]->aabb.size*0.5;
- }
-
- bvh=_parse_bvh(bases.ptr(),bases.size(),1,max_depth);
-
- ray_stack = memnew_arr(uint32_t,max_depth);
- bvh_stack = memnew_arr(BVH*,max_depth);
-
- bvh_depth = max_depth;
-}
-
-void BakedLightBaker::_octree_insert(int p_octant,Triangle* p_triangle, int p_depth) {
-
-
-
-
- uint32_t *stack=octant_stack;
- uint32_t *ptr_stack=octantptr_stack;
- Octant *octants=octant_pool.ptr();
-
- stack[0]=0;
- ptr_stack[0]=0;
-
- int stack_pos=0;
-
-
- while(true) {
-
- Octant *octant=&octants[ptr_stack[stack_pos]];
- if (stack[stack_pos]<8) {
-
- int i = stack[stack_pos];
- stack[stack_pos]++;
-
-
-
- //fit_aabb=fit_aabb.grow(bvh->aabb.size.x*0.0001);
-
- int child_idx =octant->children[i];
- bool encloses;
- if (!child_idx) {
-
- AABB aabb=octant->aabb;
- aabb.size*=0.5;
- if (i&1)
- aabb.pos.x+=aabb.size.x;
- if (i&2)
- aabb.pos.y+=aabb.size.y;
- if (i&4)
- aabb.pos.z+=aabb.size.z;
-
- aabb.grow_by(cell_size*octree_extra_margin);
- if (!aabb.intersects(p_triangle->aabb))
- continue;
- encloses=aabb.grow(cell_size*-octree_extra_margin*2.0).encloses(p_triangle->aabb);
- if (!encloses && !Face3(p_triangle->vertices[0],p_triangle->vertices[1],p_triangle->vertices[2]).intersects_aabb2(aabb))
- continue;
- } else {
-
- Octant *child=&octants[child_idx];
- AABB aabb=child->aabb;
- aabb.grow_by(cell_size*octree_extra_margin);
- if (!aabb.intersects(p_triangle->aabb))
- continue;
- encloses=aabb.grow(cell_size*-octree_extra_margin*2.0).encloses(p_triangle->aabb);
- if (!encloses && !Face3(p_triangle->vertices[0],p_triangle->vertices[1],p_triangle->vertices[2]).intersects_aabb2(aabb))
- continue;
-
- }
-
- if (encloses)
- stack[stack_pos]=8; // quick and dirty opt
-
- if (!child_idx) {
-
-
- if (octant_pool_size==octant_pool.size()) {
- octant_pool.resize(octant_pool_size+OCTANT_POOL_CHUNK);
- octants=octant_pool.ptr();
- octant=&octants[ptr_stack[stack_pos]];
- }
- child_idx=octant_pool_size++;
- octant->children[i]=child_idx;
- Octant *child=&octants[child_idx];
-
- child->aabb=octant->aabb;
- child->texture_x=0;
- child->texture_y=0;
-
- child->aabb.size*=0.5;
- if (i&1)
- child->aabb.pos.x+=child->aabb.size.x;
- if (i&2)
- child->aabb.pos.y+=child->aabb.size.y;
- if (i&4)
- child->aabb.pos.z+=child->aabb.size.z;
-
-
- child->full_accum[0]=0;
- child->full_accum[1]=0;
- child->full_accum[2]=0;
- child->sampler_ofs=0;
-
-
-
- if (stack_pos==octree_depth-1) {
- child->leaf=true;
- child->offset[0]=child->aabb.pos.x+child->aabb.size.x*0.5;
- child->offset[1]=child->aabb.pos.y+child->aabb.size.y*0.5;
- child->offset[2]=child->aabb.pos.z+child->aabb.size.z*0.5;
- child->next_leaf=leaf_list;
-
-
- for(int ci=0;ci<8;ci++) {
- child->normal_accum[ci][0]=0;
- child->normal_accum[ci][1]=0;
- child->normal_accum[ci][2]=0;
-
- }
-
- child->bake_neighbour=0;
- child->first_neighbour=true;
- leaf_list=child_idx;
- cell_count++;
-
- for(int ci=0;ci<8;ci++) {
- child->light_accum[ci][0]=0;
- child->light_accum[ci][1]=0;
- child->light_accum[ci][2]=0;
- }
-
- child->parent=ptr_stack[stack_pos];
-
- } else {
-
- child->leaf=false;
- for(int j=0;j<8;j++) {
- child->children[j]=0;
- }
- }
- }
-
- if (!octants[child_idx].leaf) {
- stack_pos++;
- stack[stack_pos]=0;
- ptr_stack[stack_pos]=child_idx;
- } else {
-
- Octant *child=&octants[child_idx];
-
- Vector3 n = Plane(p_triangle->vertices[0],p_triangle->vertices[1],p_triangle->vertices[2]).normal;
-
-
- for(int ci=0;ci<8;ci++) {
-
- Vector3 pos = child->aabb.pos;
-
- if (ci&1)
- pos.x+=child->aabb.size.x;
- if (ci&2)
- pos.y+=child->aabb.size.y;
- if (ci&4)
- pos.z+=child->aabb.size.z;
-
-
- pos.x=floor((pos.x+cell_size*0.5)/cell_size);
- pos.y=floor((pos.y+cell_size*0.5)/cell_size);
- pos.z=floor((pos.z+cell_size*0.5)/cell_size);
-
- {
- Map<Vector3,Vector3>::Element *E=endpoint_normal.find(pos);
- if (!E) {
- endpoint_normal[pos]=n;
- } else {
- E->get()+=n;
- }
- }
-
- {
-
- uint64_t bit = get_uv_normal_bit(n);
-
- Map<Vector3,uint64_t>::Element *E=endpoint_normal_bits.find(pos);
- if (!E) {
- endpoint_normal_bits[pos]=(1<<bit);
- } else {
- E->get()|=(1<<bit);
- }
-
- }
-
- }
-
- }
-
-
- } else {
- stack_pos--;
- if (stack_pos<0)
- break;
- }
- }
-
-
-}
-
-
-void BakedLightBaker::_make_octree() {
-
-
- AABB base = bvh->aabb;
- float lal=base.get_longest_axis_size();
- //must be square because we want square blocks
- base.size.x=lal;
- base.size.y=lal;
- base.size.z=lal;
- base.grow_by(lal*0.001); //for precision
- octree_aabb=base;
-
- cell_size=base.size.x;
- for(int i=0;i<octree_depth;i++)
- cell_size/=2.0;
- octant_stack = memnew_arr(uint32_t,octree_depth*2 );
- octantptr_stack = memnew_arr(uint32_t,octree_depth*2 );
-
- octant_pool.resize(OCTANT_POOL_CHUNK);
- octant_pool_size=1;
- Octant *root=octant_pool.ptr();
- root->leaf=false;
- root->aabb=octree_aabb;
- root->parent=-1;
- for(int i=0;i<8;i++)
- root->children[i]=0;
-
- EditorProgress ep("bake_octree",vformat(TTR("Parsing %d Triangles:"), triangles.size()),triangles.size());
-
- for(int i=0;i<triangles.size();i++) {
-
- _octree_insert(0,&triangles[i],octree_depth-1);
- if ((i%1000)==0) {
-
- ep.step(TTR("Triangle #")+itos(i),i);
- }
- }
-
- {
- uint32_t oct_idx=leaf_list;
- Octant *octants=octant_pool.ptr();
- while(oct_idx) {
-
- BakedLightBaker::Octant *oct = &octants[oct_idx];
- for(int ci=0;ci<8;ci++) {
-
-
- Vector3 pos = oct->aabb.pos;
-
- if (ci&1)
- pos.x+=oct->aabb.size.x;
- if (ci&2)
- pos.y+=oct->aabb.size.y;
- if (ci&4)
- pos.z+=oct->aabb.size.z;
-
-
- pos.x=floor((pos.x+cell_size*0.5)/cell_size);
- pos.y=floor((pos.y+cell_size*0.5)/cell_size);
- pos.z=floor((pos.z+cell_size*0.5)/cell_size);
-
- {
- Map<Vector3,Vector3>::Element *E=endpoint_normal.find(pos);
- if (!E) {
- //?
- print_line("lolwut?");
- } else {
- Vector3 n = E->get().normalized();
- oct->normal_accum[ci][0]=n.x;
- oct->normal_accum[ci][1]=n.y;
- oct->normal_accum[ci][2]=n.z;
-
- }
-
- }
-
- {
-
- Map<Vector3,uint64_t>::Element *E=endpoint_normal_bits.find(pos);
- if (!E) {
- //?
- print_line("lolwut?");
- } else {
-
- float max_aper=0;
- for(uint64_t i=0;i<62;i++) {
-
- if (!(E->get()&(1<<i)))
- continue;
- Vector3 ang_i = get_bit_normal(i);
-
- for(uint64_t j=0;j<62;j++) {
-
- if (i==j)
- continue;
- if (!(E->get()&(1<<j)))
- continue;
- Vector3 ang_j = get_bit_normal(j);
- float ang = Math::acos(ang_i.dot(ang_j));
- if (ang>max_aper)
- max_aper=ang;
- }
- }
- if (max_aper>0.75*Math_PI) {
- //angle too wide prevent problems and forget
- oct->normal_accum[ci][0]=0;
- oct->normal_accum[ci][1]=0;
- oct->normal_accum[ci][2]=0;
- }
- }
- }
-
-
- }
-
- oct_idx=oct->next_leaf;
- }
- }
-
-
-}
-
-
-
-
-
-void BakedLightBaker::_plot_light(ThreadStack& thread_stack,const Vector3& p_plot_pos, const AABB& p_plot_aabb, const Color& p_light,const Color& p_tint_light,bool p_only_full, const Plane& p_plane) {
-
- //stackless version
-
- uint32_t *stack=thread_stack.octant_stack;
- uint32_t *ptr_stack=thread_stack.octantptr_stack;
- Octant *octants=octant_pool.ptr();
-
- stack[0]=0;
- ptr_stack[0]=0;
-
- int stack_pos=0;
-
-
- while(true) {
-
- Octant &octant=octants[ptr_stack[stack_pos]];
-
- if (stack[stack_pos]==0) {
-
-
- Vector3 pos = octant.aabb.pos + octant.aabb.size*0.5;
- float md = 1<<(octree_depth - stack_pos );
- float r=cell_size*plot_size*md;
- float div = 1.0/(md*md*md);
- //div=1.0;
-
-
- float d = p_plot_pos.distance_to(pos);
-
- if ((p_plane.distance_to(pos)>-cell_size*1.75*md) && d<=r) {
-
-
- float intensity = 1.0 - (d/r)*(d/r); //not gauss but..
-
- baked_light_baker_add_64f(&octant.full_accum[0],p_tint_light.r*intensity*div);
- baked_light_baker_add_64f(&octant.full_accum[1],p_tint_light.g*intensity*div);
- baked_light_baker_add_64f(&octant.full_accum[2],p_tint_light.b*intensity*div);
- }
- }
-
- if (octant.leaf) {
-
-
-
- //if (p_plane.normal.dot(octant.aabb.get_support(p_plane.normal)) < p_plane.d-CMP_EPSILON) { //octants behind are no go
-
-
- if (!p_only_full) {
- float r=cell_size*plot_size;
- for(int i=0;i<8;i++) {
- Vector3 pos=octant.aabb.pos;
- if (i&1)
- pos.x+=octant.aabb.size.x;
- if (i&2)
- pos.y+=octant.aabb.size.y;
- if (i&4)
- pos.z+=octant.aabb.size.z;
-
-
-
- float d = p_plot_pos.distance_to(pos);
-
- if ((p_plane.distance_to(pos)>-cell_size*1.75) && d<=r) {
-
-
- float intensity = 1.0 - (d/r)*(d/r); //not gauss but..
- if (edge_damp>0) {
- Vector3 normal = Vector3(octant.normal_accum[i][0],octant.normal_accum[i][1],octant.normal_accum[i][2]);
- if (normal.x>0 || normal.y>0 || normal.z>0) {
-
- float damp = Math::abs(p_plane.normal.dot(normal));
- intensity*=pow(damp,edge_damp);
-
- }
- }
-
- //intensity*=1.0-Math::abs(p_plane.distance_to(pos))/(plot_size*cell_size);
- //intensity = Math::cos(d*Math_PI*0.5/r);
-
- baked_light_baker_add_64f(&octant.light_accum[i][0],p_light.r*intensity);
- baked_light_baker_add_64f(&octant.light_accum[i][1],p_light.g*intensity);
- baked_light_baker_add_64f(&octant.light_accum[i][2],p_light.b*intensity);
-
-
- }
- }
- }
-
- stack_pos--;
- } else if (stack[stack_pos]<8) {
-
- int i = stack[stack_pos];
- stack[stack_pos]++;
-
- if (!octant.children[i]) {
- continue;
- }
-
- Octant &child=octants[octant.children[i]];
-
- if (!child.aabb.intersects(p_plot_aabb))
- continue;
-
- if (child.aabb.encloses(p_plot_aabb)) {
- stack[stack_pos]=8; //don't test the rest
- }
-
- stack_pos++;
- stack[stack_pos]=0;
- ptr_stack[stack_pos]=octant.children[i];
- } else {
- stack_pos--;
- if (stack_pos<0)
- break;
- }
- }
-
-
-}
-
-
-float BakedLightBaker::_throw_ray(ThreadStack& thread_stack,bool p_bake_direct,const Vector3& p_begin, const Vector3& p_end,float p_rest,const Color& p_light,float *p_att_curve,float p_att_pos,int p_att_curve_len,int p_bounces,bool p_first_bounce,bool p_only_dist) {
-
-
- uint32_t* stack = thread_stack.ray_stack;
- BVH **bstack = thread_stack.bvh_stack;
-
- enum {
- TEST_AABB_BIT=0,
- VISIT_LEFT_BIT=1,
- VISIT_RIGHT_BIT=2,
- VISIT_DONE_BIT=3,
-
-
- };
-
- Vector3 n = (p_end-p_begin);
- float len=n.length();
- if (len==0)
- return 0;
- n/=len;
-
-
-
- real_t d=1e10;
- bool inters=false;
- Vector3 r_normal;
- Vector3 r_point;
- Vector3 end=p_end;
-
- Triangle *triangle=NULL;
-
- /*
- for(int i=0;i<max_depth;i++)
- stack[i]=0;
- */
-
- int level=0;
- //AABB ray_aabb;
- //ray_aabb.pos=p_begin;
- //ray_aabb.expand_to(p_end);
-
-
- bstack[0]=bvh;
- stack[0]=TEST_AABB_BIT;
-
-
- while(true) {
-
- uint32_t mode = stack[level];
- const BVH &b = *bstack[level];
- bool done=false;
-
- switch(mode) {
- case TEST_AABB_BIT: {
-
- if (b.leaf) {
-
-
- Face3 f3(b.leaf->vertices[0],b.leaf->vertices[1],b.leaf->vertices[2]);
-
-
- Vector3 res;
-
- if (f3.intersects_segment(p_begin,end,&res)) {
-
-
- float nd = n.dot(res);
- if (nd<d) {
-
- d=nd;
- r_point=res;
- end=res;
- len=(p_begin-end).length();
- r_normal=f3.get_plane().get_normal();
- triangle=b.leaf;
- inters=true;
- }
-
- }
-
- stack[level]=VISIT_DONE_BIT;
- } else {
-
-
- bool valid = b.aabb.smits_intersect_ray(p_begin,n,0,len);
- //bool valid = b.aabb.intersects_segment(p_begin,p_end);
- //bool valid = b.aabb.intersects(ray_aabb);
-
- if (!valid) {
-
- stack[level]=VISIT_DONE_BIT;
-
- } else {
-
- stack[level]=VISIT_LEFT_BIT;
- }
- }
-
- } continue;
- case VISIT_LEFT_BIT: {
-
- stack[level]=VISIT_RIGHT_BIT;
- bstack[level+1]=b.children[0];
- stack[level+1]=TEST_AABB_BIT;
- level++;
-
- } continue;
- case VISIT_RIGHT_BIT: {
-
- stack[level]=VISIT_DONE_BIT;
- bstack[level+1]=b.children[1];
- stack[level+1]=TEST_AABB_BIT;
- level++;
- } continue;
- case VISIT_DONE_BIT: {
-
- if (level==0) {
- done=true;
- break;
- } else
- level--;
-
- } continue;
- }
-
-
- if (done)
- break;
- }
-
-
-
- if (inters) {
-
- if (p_only_dist) {
-
- return p_begin.distance_to(r_point);
- }
-
-
- //should check if there is normals first
- Vector2 uv;
- if (true) {
-
- triangle->get_uv_and_normal(r_point,uv,r_normal);
-
- } else {
-
- }
-
- if (n.dot(r_normal)>0)
- return -1;
-
- if (n.dot(r_normal)>0)
- r_normal=-r_normal;
-
-
- //ok...
- Color diffuse_at_point(0.8,0.8,0.8);
- Color specular_at_point(0.0,0.0,0.0);
-
-
- float dist = p_begin.distance_to(r_point);
-
- AABB aabb;
- aabb.pos=r_point;
- aabb.pos-=Vector3(1,1,1)*cell_size*plot_size;
- aabb.size=Vector3(2,2,2)*cell_size*plot_size;
-
- Color res_light=p_light;
- float att=1.0;
- float dp=(1.0-normal_damp)*n.dot(-r_normal)+normal_damp;
-
- if (p_att_curve) {
-
- p_att_pos+=dist;
- int cpos = Math::fast_ftoi((p_att_pos/p_att_curve_len)*ATTENUATION_CURVE_LEN);
- cpos=CLAMP(cpos,0,ATTENUATION_CURVE_LEN-1);
- att=p_att_curve[cpos];
- }
-
-
- res_light.r*=dp;
- res_light.g*=dp;
- res_light.b*=dp;
-
- //light is plotted before multiplication with diffuse, this way
- //the multiplication can happen with more detail in the shader
-
-
-
- if (triangle->material) {
-
- //triangle->get_uv(r_point);
-
- diffuse_at_point=triangle->material->diffuse.get_color(uv);
- specular_at_point=triangle->material->specular.get_color(uv);
- }
-
-
- diffuse_at_point.r=res_light.r*diffuse_at_point.r;
- diffuse_at_point.g=res_light.g*diffuse_at_point.g;
- diffuse_at_point.b=res_light.b*diffuse_at_point.b;
-
- if (p_bounces>0) {
-
-
- p_rest-=dist;
- if (p_rest<CMP_EPSILON)
- return 0;
-
- if (r_normal==-n)
- return 0; //todo change a little
-
- r_point+=r_normal*0.01;
-
-
-
-
- specular_at_point.r=res_light.r*specular_at_point.r;
- specular_at_point.g=res_light.g*specular_at_point.g;
- specular_at_point.b=res_light.b*specular_at_point.b;
-
-
-
- if (use_diffuse && (diffuse_at_point.r>CMP_EPSILON || diffuse_at_point.g>CMP_EPSILON || diffuse_at_point.b>CMP_EPSILON)) {
- //diffuse bounce
-
- Vector3 c1=r_normal.cross(n).normalized();
- Vector3 c2=r_normal.cross(c1).normalized();
- double r1 = double(rand())/RAND_MAX;
- double r2 = double(rand())/RAND_MAX;
- double r3 = double(rand())/RAND_MAX;
-#if 0
- Vector3 next = - ((c1*(r1-0.5)) + (c2*(r2-0.5)) + (r_normal*(r3-0.5))).normalized()*0.5 + r_normal*0.5;
-
- if (next==Vector3())
- next=r_normal;
- Vector3 rn=next.normalized();
-
-#else
- Vector3 rn = ((c1*(r1-0.5)) + (c2*(r2-0.5)) + (r_normal*r3*0.5)).normalized();
-#endif
-
-
- _throw_ray(thread_stack,p_bake_direct,r_point,r_point+rn*p_rest,p_rest,diffuse_at_point,p_att_curve,p_att_pos,p_att_curve_len,p_bounces-1);
- }
-
- if (use_specular && (specular_at_point.r>CMP_EPSILON || specular_at_point.g>CMP_EPSILON || specular_at_point.b>CMP_EPSILON)) {
- //specular bounce
-
- //Vector3 c1=r_normal.cross(n).normalized();
- //Vector3 c2=r_normal.cross(c1).normalized();
-
- Vector3 rn = n - r_normal *r_normal.dot(n) * 2.0;
-
- _throw_ray(thread_stack,p_bake_direct,r_point,r_point+rn*p_rest,p_rest,specular_at_point,p_att_curve,p_att_pos,p_att_curve_len,p_bounces-1);
- }
- }
-
- //specular later
- //_plot_light_point(r_point,octree,octree_aabb,p_light);
-
-
- Color plot_light=res_light.linear_interpolate(diffuse_at_point,tint);
- plot_light.r*=att;
- plot_light.g*=att;
- plot_light.b*=att;
- Color tint_light=diffuse_at_point;
- tint_light.r*=att;
- tint_light.g*=att;
- tint_light.b*=att;
-
- bool skip=false;
-
- if (!p_first_bounce || p_bake_direct) {
-
-
- float r = plot_size * cell_size*2;
- if (dist<r) {
- //avoid accumulaiton of light on corners
- //plot_light=plot_light.linear_interpolate(Color(0,0,0,0),1.0-sd/plot_size*plot_size);
- skip=true;
-
- } else {
-
-
- Vector3 c1=r_normal.cross(n).normalized();
- Vector3 c2=r_normal.cross(c1).normalized();
- double r1 = double(rand())/RAND_MAX;
- double r2 = double(rand())/RAND_MAX;
- double r3 = double(rand())/RAND_MAX;
- Vector3 rn = ((c1*(r1-0.5)) + (c2*(r2-0.5)) + (r_normal*r3*0.25)).normalized();
- float d =_throw_ray(thread_stack,p_bake_direct,r_point,r_point+rn*p_rest,p_rest,diffuse_at_point,p_att_curve,p_att_pos,p_att_curve_len,p_bounces-1,false,true);
- r = plot_size*cell_size*ao_radius;
- if (d>0 && d<r) {
- //avoid accumulaiton of light on corners
- //plot_light=plot_light.linear_interpolate(Color(0,0,0,0),1.0-sd/plot_size*plot_size);
- skip=true;
-
- } else {
- //plot_light=Color(0,0,0,0);
- }
- }
- }
-
-
- Plane plane(r_point,r_normal);
- if (!skip)
- _plot_light(thread_stack,r_point,aabb,plot_light,tint_light,!(!p_first_bounce || p_bake_direct),plane);
-
-
- return dist;
- }
-
- return -1;
-
-}
-
-
-
-
-void BakedLightBaker::_make_octree_texture() {
-
-
- BakedLightBaker::Octant *octants=octant_pool.ptr();
-
- //find neighbours first, to have a better idea of what amount of space is needed
- {
-
- Vector<OctantHash> octant_hashing;
- octant_hashing.resize(octant_pool_size);
- Vector<uint32_t> hash_table;
- int hash_table_size=Math::larger_prime(16384);
- hash_table.resize(hash_table_size);
- uint32_t*hashptr = hash_table.ptr();
- OctantHash*octhashptr = octant_hashing.ptr();
-
- for(int i=0;i<hash_table_size;i++)
- hashptr[i]=0;
-
-
- //step 1 add to hash table
-
- uint32_t oct_idx=leaf_list;
-
-
- while(oct_idx) {
-
- BakedLightBaker::Octant *oct = &octants[oct_idx];
- uint64_t base=0;
- Vector3 pos = oct->aabb.pos - octree_aabb.pos; //make sure is always positive
- base=int((pos.x+cell_size*0.5)/cell_size);
- base<<=16;
- base|=int((pos.y+cell_size*0.5)/cell_size);
- base<<=16;
- base|=int((pos.z+cell_size*0.5)/cell_size);
-
- uint32_t hash = HashMapHasherDefault::hash(base);
- uint32_t idx = hash % hash_table_size;
- octhashptr[oct_idx].next=hashptr[idx];
- octhashptr[oct_idx].hash=hash;
- octhashptr[oct_idx].value=base;
- hashptr[idx]=oct_idx;
-
- oct_idx=oct->next_leaf;
-
- }
-
- //step 2 find neighbours
- oct_idx=leaf_list;
- int neighbours=0;
-
-
- while(oct_idx) {
-
- BakedLightBaker::Octant *oct = &octants[oct_idx];
- Vector3 pos = oct->aabb.pos - octree_aabb.pos; //make sure is always positive
- pos.x+=cell_size;
- uint64_t base=0;
- base=int((pos.x+cell_size*0.5)/cell_size);
- base<<=16;
- base|=int((pos.y+cell_size*0.5)/cell_size);
- base<<=16;
- base|=int((pos.z+cell_size*0.5)/cell_size);
-
- uint32_t hash = HashMapHasherDefault::hash(base);
- uint32_t idx = hash % hash_table_size;
-
- uint32_t bucket = hashptr[idx];
-
- while(bucket) {
-
- if (octhashptr[bucket].value==base) {
-
- oct->bake_neighbour=bucket;
- octants[bucket].first_neighbour=false;
- neighbours++;
- break;
- }
-
- bucket = octhashptr[bucket].next;
- }
-
- oct_idx=oct->next_leaf;
-
- }
-
- print_line("octant with neighbour: "+itos(neighbours));
-
- }
-
-
- //ok let's try to just create a texture
-
- int otex_w=256;
-
- while (true) {
-
-
-
- uint32_t oct_idx=leaf_list;
-
- int row=0;
-
-
- print_line("begin at row "+itos(row));
- int longest_line_reused=0;
- int col=0;
- int processed=0;
-
- //reset
- while(oct_idx) {
-
- BakedLightBaker::Octant *oct = &octants[oct_idx];
- oct->texture_x=0;
- oct->texture_y=0;
- oct_idx=oct->next_leaf;
-
- }
-
- oct_idx=leaf_list;
- //assign
- while(oct_idx) {
-
- BakedLightBaker::Octant *oct = &octants[oct_idx];
- if (oct->first_neighbour && oct->texture_x==0 && oct->texture_y==0) {
- //was not processed
- uint32_t current_idx=oct_idx;
- int reused=0;
-
- while(current_idx) {
- BakedLightBaker::Octant *o = &octants[current_idx];
- if (col+1 >= otex_w) {
- col=0;
- row+=4;
- }
- o->texture_x=col;
- o->texture_y=row;
- processed++;
-
- if (o->bake_neighbour) {
- reused++;
- }
- col+=o->bake_neighbour ? 1 : 2; //reuse neighbour
- current_idx=o->bake_neighbour;
- }
-
- if (reused>longest_line_reused) {
- longest_line_reused=reused;
- }
- }
- oct_idx=oct->next_leaf;
- }
-
- row+=4;
-
- if (otex_w < row) {
-
- otex_w*=2;
- } else {
-
- baked_light_texture_w=otex_w;
- baked_light_texture_h=next_power_of_2(row);
- print_line("w: "+itos(otex_w));
- print_line("h: "+itos(row));
- break;
- }
-
-
- }
-
-
- {
-
- otex_w=(1<<lattice_size)*(1<<lattice_size)*2; //make sure lattice fits horizontally
- Vector3 lattice_cell_size=octree_aabb.size;
- for(int i=0;i<lattice_size;i++) {
-
- lattice_cell_size*=0.5;
- }
-
-
-
- while(true) {
-
- //let's plot the leafs first, given the octree is not so obvious which size it will have
- int row=4+4*(1<<lattice_size);
- int col=0;
-
- col=0;
- row+=4;
- print_line("end at row "+itos(row));
-
- //put octree, no need for recursion, just loop backwards.
- int regular_octants=0;
- for(int i=octant_pool_size-1;i>=0;i--) {
-
- BakedLightBaker::Octant *oct = &octants[i];
- if (oct->leaf) //ignore leaf
- continue;
- if (oct->aabb.size.x>lattice_cell_size.x*1.1) { //bigger than latice, skip
- oct->texture_x=0;
- oct->texture_y=0;
- } else if (oct->aabb.size.x>lattice_cell_size.x*0.8) {
- //this is the initial lattice
- Vector3 pos = oct->aabb.pos - octree_aabb.pos; //make sure is always positive
- int x = int((pos.x+lattice_cell_size.x*0.5)/lattice_cell_size.x);
- int y = int((pos.y+lattice_cell_size.y*0.5)/lattice_cell_size.y);
- int z = int((pos.z+lattice_cell_size.z*0.5)/lattice_cell_size.z);
- //bug net
- ERR_FAIL_INDEX(x,(1<<lattice_size));
- ERR_FAIL_INDEX(y,(1<<lattice_size));
- ERR_FAIL_INDEX(z,(1<<lattice_size));
-
- /*int ofs = z*(1<<lattice_size)*(1<<lattice_size)+y*(1<<lattice_size)+x;
- ofs*=4;
- oct->texture_x=ofs%otex_w;
- oct->texture_y=(ofs/otex_w)*4+4;
- */
-
- oct->texture_x=(x+(1<<lattice_size)*z)*2;
- oct->texture_y=4+y*4;
- //print_line("pos: "+itos(x)+","+itos(y)+","+itos(z)+" - ofs"+itos(oct->texture_x)+","+itos(oct->texture_y));
-
-
- } else {
- //an everyday regular octant
-
- if (col+2 > otex_w) {
- col=0;
- row+=4;
- }
-
- oct->texture_x=col;
- oct->texture_y=row;
- col+=2;
- regular_octants++;
-
-
- }
- }
- print_line("octants end at row "+itos(row)+" totalling"+itos(regular_octants));
-
- //ok evaluation.
-
- if (otex_w<=2048 && row>2048) { //too big upwards, try bigger texture
- otex_w*=2;
- continue;
- } else {
- baked_octree_texture_w=otex_w;
- baked_octree_texture_h=row+4;
- break;
- }
-
- }
-
-
- }
-
-
- baked_octree_texture_h=next_power_of_2(baked_octree_texture_h);
- print_line("RESULT! "+itos(baked_octree_texture_w)+","+itos(baked_octree_texture_h));
-
-}
-
-
-
-
-
-
-
-
-double BakedLightBaker::get_normalization(int p_light_idx) const {
-
- double nrg=0;
-
- const LightData &dl=lights[p_light_idx];
- double cell_area = cell_size*cell_size;
- //nrg+= /*dl.energy */ (dl.rays_thrown * cell_area / dl.area);
- nrg=dl.rays_thrown * cell_area;
- nrg*=(Math_PI*plot_size*plot_size)*0.5; // damping of radial linear gradient kernel
- nrg*=dl.constant;
- //nrg*=5;
-
-
- return nrg;
-}
-
-
-
-double BakedLightBaker::get_modifier(int p_light_idx) const {
-
- double nrg=0;
-
- const LightData &dl=lights[p_light_idx];
- double cell_area = cell_size*cell_size;
- //nrg+= /*dl.energy */ (dl.rays_thrown * cell_area / dl.area);
- nrg=cell_area;
- nrg*=(Math_PI*plot_size*plot_size)*0.5; // damping of radial linear gradient kernel
- nrg*=dl.constant;
- //nrg*=5;
-
-
- return nrg;
-}
-
-void BakedLightBaker::throw_rays(ThreadStack& thread_stack,int p_amount) {
-
-
-
- for(int i=0;i<lights.size();i++) {
-
- LightData &dl=lights[i];
-
-
- int amount = p_amount * total_light_area / dl.area;
- double mod = 1.0/double(get_modifier(i));
- mod*=p_amount/float(amount);
-
- switch(dl.type) {
-
- case VS::LIGHT_DIRECTIONAL: {
-
-
- for(int j=0;j<amount;j++) {
- Vector3 from = dl.pos;
- double r1 = double(rand())/RAND_MAX;
- double r2 = double(rand())/RAND_MAX;
- from+=dl.up*(r1*2.0-1.0);
- from+=dl.left*(r2*2.0-1.0);
- Vector3 to = from+dl.dir*dl.length;
- Color col=dl.diffuse;
- float m = mod*dl.energy;
- col.r*=m;
- col.g*=m;
- col.b*=m;
-
- dl.rays_thrown++;
- baked_light_baker_add_64i(&total_rays,1);
-
- _throw_ray(thread_stack,dl.bake_direct,from,to,dl.length,col,NULL,0,0,max_bounces,true);
- }
- } break;
- case VS::LIGHT_OMNI: {
-
-
- for(int j=0;j<amount;j++) {
- Vector3 from = dl.pos;
-
- double r1 = double(rand())/RAND_MAX;
- double r2 = double(rand())/RAND_MAX;
- double r3 = double(rand())/RAND_MAX;
-
-#if 0
- //crap is not uniform..
- Vector3 dir = Vector3(r1*2.0-1.0,r2*2.0-1.0,r3*2.0-1.0).normalized();
-
-#else
-
- double phi = r1*Math_PI*2.0;
- double costheta = r2*2.0-1.0;
- double u = r3;
-
- double theta = acos( costheta );
- double r = 1.0 * pow( u,1/3.0 );
-
- Vector3 dir(
- r * sin( theta) * cos( phi ),
- r * sin( theta) * sin( phi ),
- r * cos( theta )
- );
- dir.normalize();
-
-#endif
- Vector3 to = dl.pos+dir*dl.radius;
- Color col=dl.diffuse;
- float m = mod*dl.energy;
- col.r*=m;
- col.g*=m;
- col.b*=m;
-
- dl.rays_thrown++;
- baked_light_baker_add_64i(&total_rays,1);
- _throw_ray(thread_stack,dl.bake_direct,from,to,dl.radius,col,dl.attenuation_table.ptr(),0,dl.radius,max_bounces,true);
- //_throw_ray(i,from,to,dl.radius,col,NULL,0,dl.radius,max_bounces,true);
- }
-
- } break;
- case VS::LIGHT_SPOT: {
-
- for(int j=0;j<amount;j++) {
- Vector3 from = dl.pos;
-
- double r1 = double(rand())/RAND_MAX;
- //double r2 = double(rand())/RAND_MAX;
- double r3 = double(rand())/RAND_MAX;
-
- float d=Math::tan(Math::deg2rad(dl.spot_angle));
-
- float x = sin(r1*Math_PI*2.0)*d;
- float y = cos(r1*Math_PI*2.0)*d;
-
- Vector3 dir = r3*(dl.dir + dl.up*y + dl.left*x) + (1.0-r3)*dl.dir;
- dir.normalize();
-
-
- Vector3 to = dl.pos+dir*dl.radius;
- Color col=dl.diffuse;
- float m = mod*dl.energy;
- col.r*=m;
- col.g*=m;
- col.b*=m;
-
- dl.rays_thrown++;
- baked_light_baker_add_64i(&total_rays,1);
- _throw_ray(thread_stack,dl.bake_direct,from,to,dl.radius,col,dl.attenuation_table.ptr(),0,dl.radius,max_bounces,true);
- //_throw_ray(i,from,to,dl.radius,col,NULL,0,dl.radius,max_bounces,true);
- }
-
- } break;
-
- }
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-void BakedLightBaker::bake(const Ref<BakedLight> &p_light, Node* p_node) {
-
- if (baking)
- return;
- cell_count=0;
-
- base_inv=p_node->cast_to<Spatial>()->get_global_transform().affine_inverse();
- EditorProgress ep("bake",TTR("Light Baker Setup:"),5);
- baked_light=p_light;
- lattice_size=baked_light->get_initial_lattice_subdiv();
- octree_depth=baked_light->get_cell_subdivision();
- plot_size=baked_light->get_plot_size();
- max_bounces=baked_light->get_bounces();
- use_diffuse=baked_light->get_bake_flag(BakedLight::BAKE_DIFFUSE);
- use_specular=baked_light->get_bake_flag(BakedLight::BAKE_SPECULAR);
- use_translucency=baked_light->get_bake_flag(BakedLight::BAKE_TRANSLUCENT);
-
- edge_damp=baked_light->get_edge_damp();
- normal_damp=baked_light->get_normal_damp();
- octree_extra_margin=baked_light->get_cell_extra_margin();
- tint=baked_light->get_tint();
- ao_radius=baked_light->get_ao_radius();
- ao_strength=baked_light->get_ao_strength();
- linear_color=baked_light->get_bake_flag(BakedLight::BAKE_LINEAR_COLOR);
-
- baked_textures.clear();
- for(int i=0;i<baked_light->get_lightmaps_count();i++) {
- BakeTexture bt;
- bt.width=baked_light->get_lightmap_gen_size(i).x;
- bt.height=baked_light->get_lightmap_gen_size(i).y;
- baked_textures.push_back(bt);
- }
-
-
- ep.step(TTR("Parsing Geometry"),0);
- _parse_geometry(p_node);
- mat_map.clear();
- tex_map.clear();
- print_line("\ttotal triangles: "+itos(triangles.size()));
- // no geometry
- if (triangles.size() == 0) {
- return;
- }
- ep.step(TTR("Fixing Lights"),1);
- _fix_lights();
- ep.step(TTR("Making BVH"),2);
- _make_bvh();
- ep.step(TTR("Creating Light Octree"),3);
- _make_octree();
- ep.step(TTR("Creating Octree Texture"),4);
- _make_octree_texture();
- baking=true;
- _start_thread();
-
-}
-
-
-void BakedLightBaker::update_octree_sampler(PoolVector<int> &p_sampler) {
-
- BakedLightBaker::Octant *octants=octant_pool.ptr();
- double norm = 1.0/double(total_rays);
-
-
-
- if (p_sampler.size()==0 || first_bake_to_map) {
-
- Vector<int> tmp_smp;
- tmp_smp.resize(32); //32 for header
-
- for(int i=0;i<32;i++) {
- tmp_smp[i]=0;
- }
-
- for(int i=octant_pool_size-1;i>=0;i--) {
-
- if (i==0)
- tmp_smp[1]=tmp_smp.size();
-
- Octant &octant=octants[i];
- octant.sampler_ofs = tmp_smp.size();
- int idxcol[2]={0,0};
-
- int r = CLAMP((octant.full_accum[0]*norm)*2048,0,32767);
- int g = CLAMP((octant.full_accum[1]*norm)*2048,0,32767);
- int b = CLAMP((octant.full_accum[2]*norm)*2048,0,32767);
-
- idxcol[0]|=r;
- idxcol[1]|=(g<<16)|b;
-
- if (octant.leaf) {
- tmp_smp.push_back(idxcol[0]);
- tmp_smp.push_back(idxcol[1]);
- } else {
-
- for(int j=0;j<8;j++) {
- if (octant.children[j]) {
- idxcol[0]|=(1<<(j+16));
- }
- }
- tmp_smp.push_back(idxcol[0]);
- tmp_smp.push_back(idxcol[1]);
- for(int j=0;j<8;j++) {
- if (octant.children[j]) {
- tmp_smp.push_back(octants[octant.children[j]].sampler_ofs);
- if (octants[octant.children[j]].sampler_ofs==0) {
- print_line("FUUUUUUUUCK");
- }
- }
- }
- }
-
- }
-
- p_sampler.resize(tmp_smp.size());
- PoolVector<int>::Write w = p_sampler.write();
- int ss = tmp_smp.size();
- for(int i=0;i<ss;i++) {
- w[i]=tmp_smp[i];
- }
-
- first_bake_to_map=false;
-
- }
-
- double gamma = baked_light->get_gamma_adjust();
- double mult = baked_light->get_energy_multiplier();
- float saturation = baked_light->get_saturation();
-
- PoolVector<int>::Write w = p_sampler.write();
-
- encode_uint32(octree_depth,(uint8_t*)&w[2]);
- encode_uint32(linear_color,(uint8_t*)&w[3]);
-
- encode_float(octree_aabb.pos.x,(uint8_t*)&w[4]);
- encode_float(octree_aabb.pos.y,(uint8_t*)&w[5]);
- encode_float(octree_aabb.pos.z,(uint8_t*)&w[6]);
- encode_float(octree_aabb.size.x,(uint8_t*)&w[7]);
- encode_float(octree_aabb.size.y,(uint8_t*)&w[8]);
- encode_float(octree_aabb.size.z,(uint8_t*)&w[9]);
-
- //norm*=multiplier;
-
- for(int i=octant_pool_size-1;i>=0;i--) {
-
- Octant &octant=octants[i];
- int idxcol[2]={w[octant.sampler_ofs],w[octant.sampler_ofs+1]};
-
- double rf=pow(octant.full_accum[0]*norm*mult,gamma);
- double gf=pow(octant.full_accum[1]*norm*mult,gamma);
- double bf=pow(octant.full_accum[2]*norm*mult,gamma);
-
- double gray = (rf+gf+bf)/3.0;
- rf = gray + (rf-gray)*saturation;
- gf = gray + (gf-gray)*saturation;
- bf = gray + (bf-gray)*saturation;
-
-
- int r = CLAMP((rf)*2048,0,32767);
- int g = CLAMP((gf)*2048,0,32767);
- int b = CLAMP((bf)*2048,0,32767);
-
- idxcol[0]=((idxcol[0]>>16)<<16)|r;
- idxcol[1]=(g<<16)|b;
- w[octant.sampler_ofs]=idxcol[0];
- w[octant.sampler_ofs+1]=idxcol[1];
- }
-
-}
-
-void BakedLightBaker::update_octree_images(PoolVector<uint8_t> &p_octree,PoolVector<uint8_t> &p_light) {
-
-
- int len = baked_octree_texture_w*baked_octree_texture_h*4;
- p_octree.resize(len);
-
- int ilen = baked_light_texture_w*baked_light_texture_h*4;
- p_light.resize(ilen);
-
-
- PoolVector<uint8_t>::Write w = p_octree.write();
- zeromem(w.ptr(),len);
-
- PoolVector<uint8_t>::Write iw = p_light.write();
- zeromem(iw.ptr(),ilen);
-
- float gamma = baked_light->get_gamma_adjust();
- float mult = baked_light->get_energy_multiplier();
-
- for(int i=0;i<len;i+=4) {
- w[i+0]=0xFF;
- w[i+1]=0;
- w[i+2]=0xFF;
- w[i+3]=0xFF;
- }
-
- for(int i=0;i<ilen;i+=4) {
- iw[i+0]=0xFF;
- iw[i+1]=0;
- iw[i+2]=0xFF;
- iw[i+3]=0xFF;
- }
-
- float multiplier=1.0;
-
- if (baked_light->get_format()==BakedLight::FORMAT_HDR8)
- multiplier=8;
- encode_uint32(baked_octree_texture_w,&w[0]);
- encode_uint32(baked_octree_texture_h,&w[4]);
- encode_uint32(0,&w[8]);
- encode_float(1<<lattice_size,&w[12]);
- encode_uint32(octree_depth-lattice_size,&w[16]);
- encode_uint32(multiplier,&w[20]);
- encode_uint16(baked_light_texture_w,&w[24]); //if present, use the baked light texture
- encode_uint16(baked_light_texture_h,&w[26]);
- encode_uint32(0,&w[28]); //baked light texture format
-
- encode_float(octree_aabb.pos.x,&w[32]);
- encode_float(octree_aabb.pos.y,&w[36]);
- encode_float(octree_aabb.pos.z,&w[40]);
- encode_float(octree_aabb.size.x,&w[44]);
- encode_float(octree_aabb.size.y,&w[48]);
- encode_float(octree_aabb.size.z,&w[52]);
-
-
- BakedLightBaker::Octant *octants=octant_pool.ptr();
- int octant_count=octant_pool_size;
- uint8_t *ptr = w.ptr();
- uint8_t *lptr = iw.ptr();
-
-
- int child_offsets[8]={
- 0,
- 4,
- baked_octree_texture_w*4,
- baked_octree_texture_w*4+4,
- baked_octree_texture_w*8+0,
- baked_octree_texture_w*8+4,
- baked_octree_texture_w*8+baked_octree_texture_w*4,
- baked_octree_texture_w*8+baked_octree_texture_w*4+4,
- };
-
- int lchild_offsets[8]={
- 0,
- 4,
- baked_light_texture_w*4,
- baked_light_texture_w*4+4,
- baked_light_texture_w*8+0,
- baked_light_texture_w*8+4,
- baked_light_texture_w*8+baked_light_texture_w*4,
- baked_light_texture_w*8+baked_light_texture_w*4+4,
- };
-
- /*Vector<double> norm_arr;
- norm_arr.resize(lights.size());
-
- for(int i=0;i<lights.size();i++) {
- norm_arr[i] = 1.0/get_normalization(i);
- }
-
- const double *normptr=norm_arr.ptr();
-*/
- double norm = 1.0/double(total_rays);
- mult/=multiplier;
- double saturation = baked_light->get_saturation();
-
- for(int i=0;i<octant_count;i++) {
-
- Octant &oct=octants[i];
- if (oct.texture_x==0 && oct.texture_y==0)
- continue;
-
-
- if (oct.leaf) {
-
- int ofs = (oct.texture_y * baked_light_texture_w + oct.texture_x)<<2;
- ERR_CONTINUE(ofs<0 || ofs >ilen);
- //write colors
- for(int j=0;j<8;j++) {
-
- /*
- if (!oct.children[j])
- continue;
- */
- uint8_t *iptr=&lptr[ofs+lchild_offsets[j]];
-
- float r=oct.light_accum[j][0]*norm;
- float g=oct.light_accum[j][1]*norm;
- float b=oct.light_accum[j][2]*norm;
-
- r=pow(r*mult,gamma);
- g=pow(g*mult,gamma);
- b=pow(b*mult,gamma);
-
- double gray = (r+g+b)/3.0;
- r = gray + (r-gray)*saturation;
- g = gray + (g-gray)*saturation;
- b = gray + (b-gray)*saturation;
-
- float ic[3]={
- r,
- g,
- b,
- };
- iptr[0]=CLAMP(ic[0]*255.0,0,255);
- iptr[1]=CLAMP(ic[1]*255.0,0,255);
- iptr[2]=CLAMP(ic[2]*255.0,0,255);
- iptr[3]=255;
- }
-
- } else {
-
- int ofs = (oct.texture_y * baked_octree_texture_w + oct.texture_x)<<2;
- ERR_CONTINUE(ofs<0 || ofs >len);
-
- //write indices
- for(int j=0;j<8;j++) {
-
- if (!oct.children[j])
- continue;
- Octant&choct=octants[oct.children[j]];
- uint8_t *iptr=&ptr[ofs+child_offsets[j]];
-
- iptr[0]=choct.texture_x>>8;
- iptr[1]=choct.texture_x&0xFF;
- iptr[2]=choct.texture_y>>8;
- iptr[3]=choct.texture_y&0xFF;
-
- }
- }
-
- }
-
-
-}
-
-
-void BakedLightBaker::_free_bvh(BVH* p_bvh) {
-
- if (!p_bvh->leaf) {
- if (p_bvh->children[0])
- _free_bvh(p_bvh->children[0]);
- if (p_bvh->children[1])
- _free_bvh(p_bvh->children[1]);
- }
-
- memdelete(p_bvh);
-
-}
-
-
-bool BakedLightBaker::is_baking() {
-
- return baking;
-}
-
-void BakedLightBaker::set_pause(bool p_pause){
-
- if (paused==p_pause)
- return;
-
- paused=p_pause;
-
- if (paused) {
- _stop_thread();
- } else {
- _start_thread();
- }
-}
-bool BakedLightBaker::is_paused() {
-
- return paused;
-
-}
-
-void BakedLightBaker::_bake_thread_func(void *arg) {
-
- BakedLightBaker *ble = (BakedLightBaker*)arg;
-
-
-
- ThreadStack thread_stack;
-
- thread_stack.ray_stack = memnew_arr(uint32_t,ble->bvh_depth);
- thread_stack.bvh_stack = memnew_arr(BVH*,ble->bvh_depth);
- thread_stack.octant_stack = memnew_arr(uint32_t,ble->octree_depth*2 );
- thread_stack.octantptr_stack = memnew_arr(uint32_t,ble->octree_depth*2 );
-
- while(!ble->bake_thread_exit) {
-
- ble->throw_rays(thread_stack,1000);
- }
-
- memdelete_arr(thread_stack.ray_stack );
- memdelete_arr(thread_stack.bvh_stack );
- memdelete_arr(thread_stack.octant_stack );
- memdelete_arr(thread_stack.octantptr_stack );
-
-}
-
-void BakedLightBaker::_start_thread() {
-
- if (threads.size()!=0)
- return;
- bake_thread_exit=false;
-
- int thread_count = EDITOR_DEF("light_baker/custom_bake_threads",0);
- if (thread_count<=0 || thread_count>64)
- thread_count=OS::get_singleton()->get_processor_count();
-
- //thread_count=1;
- threads.resize(thread_count);
- for(int i=0;i<threads.size();i++) {
- threads[i]=Thread::create(_bake_thread_func,this);
- }
-}
-
-void BakedLightBaker::_stop_thread() {
-
- if (threads.size()==0)
- return;
- bake_thread_exit=true;
- for(int i=0;i<threads.size();i++) {
- Thread::wait_to_finish(threads[i]);
- memdelete(threads[i]);
- }
- threads.clear();
-}
-
-void BakedLightBaker::_plot_pixel_to_lightmap(int x, int y, int width, int height, uint8_t *image, const Vector3& p_pos,const Vector3& p_normal,double *p_norm_ptr,float mult,float gamma) {
-
-
- uint8_t *ptr = &image[(y*width+x)*4];
- //int lc = lights.size();
- double norm = 1.0/double(total_rays);
-
-
- Color color;
-
- Octant *octants=octant_pool.ptr();
-
-
- int octant_idx=0;
-
-
- while(true) {
-
- Octant &octant=octants[octant_idx];
-
- if (octant.leaf) {
-
- Vector3 lpos = p_pos-octant.aabb.pos;
- lpos/=octant.aabb.size;
-
- Vector3 cols[8];
-
- for(int i=0;i<8;i++) {
-
- cols[i].x+=octant.light_accum[i][0]*norm;
- cols[i].y+=octant.light_accum[i][1]*norm;
- cols[i].z+=octant.light_accum[i][2]*norm;
- }
-
-
- /*Vector3 final = (cols[0] + (cols[1] - cols[0]) * lpos.y);
- final = final + ((cols[2] + (cols[3] - cols[2]) * lpos.y) - final)*lpos.x;
-
- Vector3 final2 = (cols[4+0] + (cols[4+1] - cols[4+0]) * lpos.y);
- final2 = final2 + ((cols[4+2] + (cols[4+3] - cols[4+2]) * lpos.y) - final2)*lpos.x;*/
-
- Vector3 finala = cols[0].linear_interpolate(cols[1],lpos.x);
- Vector3 finalb = cols[2].linear_interpolate(cols[3],lpos.x);
- Vector3 final = finala.linear_interpolate(finalb,lpos.y);
-
- Vector3 final2a = cols[4+0].linear_interpolate(cols[4+1],lpos.x);
- Vector3 final2b = cols[4+2].linear_interpolate(cols[4+3],lpos.x);
- Vector3 final2 = final2a.linear_interpolate(final2b,lpos.y);
-
- final = final.linear_interpolate(final2,lpos.z);
- if (baked_light->get_format()==BakedLight::FORMAT_HDR8)
- final*=8.0;
-
-
- color.r=pow(final.x*mult,gamma);
- color.g=pow(final.y*mult,gamma);
- color.b=pow(final.z*mult,gamma);
- color.a=1.0;
-
- int lc = lights.size();
- LightData *lv = lights.ptr();
- for(int i=0;i<lc;i++) {
- //shadow baking
- if (!lv[i].bake_shadow)
- continue;
- Vector3 from = p_pos+p_normal*0.01;
- Vector3 to;
- float att=0;
- switch(lv[i].type) {
- case VS::LIGHT_DIRECTIONAL: {
- to=from-lv[i].dir*lv[i].length;
- } break;
- case VS::LIGHT_OMNI: {
- to=lv[i].pos;
- float d = MIN(lv[i].radius,to.distance_to(from))/lv[i].radius;
- att=d;//1.0-d;
- } break;
- default: continue;
- }
-
- uint32_t* stack = ray_stack;
- BVH **bstack = bvh_stack;
-
- enum {
- TEST_RAY_BIT=0,
- VISIT_LEFT_BIT=1,
- VISIT_RIGHT_BIT=2,
- VISIT_DONE_BIT=3,
-
-
- };
-
- bool intersected=false;
-
- int level=0;
-
- Vector3 n = (to-from);
- float len=n.length();
- if (len==0)
- continue;
- n/=len;
-
- bstack[0]=bvh;
- stack[0]=TEST_RAY_BIT;
-
-
- while(!intersected) {
-
- uint32_t mode = stack[level];
- const BVH &b = *bstack[level];
- bool done=false;
-
- switch(mode) {
- case TEST_RAY_BIT: {
-
- if (b.leaf) {
-
-
- Face3 f3(b.leaf->vertices[0],b.leaf->vertices[1],b.leaf->vertices[2]);
-
-
- Vector3 res;
-
- if (f3.intersects_segment(from,to)) {
- intersected=true;
- done=true;
- }
-
- stack[level]=VISIT_DONE_BIT;
- } else {
-
-
- bool valid = b.aabb.smits_intersect_ray(from,n,0,len);
- //bool valid = b.aabb.intersects_segment(p_begin,p_end);
- //bool valid = b.aabb.intersects(ray_aabb);
-
- if (!valid) {
-
- stack[level]=VISIT_DONE_BIT;
-
- } else {
-
- stack[level]=VISIT_LEFT_BIT;
- }
- }
-
- } continue;
- case VISIT_LEFT_BIT: {
-
- stack[level]=VISIT_RIGHT_BIT;
- bstack[level+1]=b.children[0];
- stack[level+1]=TEST_RAY_BIT;
- level++;
-
- } continue;
- case VISIT_RIGHT_BIT: {
-
- stack[level]=VISIT_DONE_BIT;
- bstack[level+1]=b.children[1];
- stack[level+1]=TEST_RAY_BIT;
- level++;
- } continue;
- case VISIT_DONE_BIT: {
-
- if (level==0) {
- done=true;
- break;
- } else
- level--;
-
- } continue;
- }
-
-
- if (done)
- break;
- }
-
-
-
- if (intersected) {
-
- color.a=Math::lerp(MAX(0.01,lv[i].darkening),1.0,att);
- }
-
- }
-
- break;
- } else {
-
- Vector3 lpos = p_pos - octant.aabb.pos;
- Vector3 half = octant.aabb.size * 0.5;
-
- int ofs=0;
-
- if (lpos.x >= half.x)
- ofs|=1;
- if (lpos.y >= half.y)
- ofs|=2;
- if (lpos.z >= half.z)
- ofs|=4;
-
- octant_idx = octant.children[ofs];
-
- if (octant_idx==0)
- return;
-
- }
- }
-
- ptr[0]=CLAMP(color.r*255.0,0,255);
- ptr[1]=CLAMP(color.g*255.0,0,255);
- ptr[2]=CLAMP(color.b*255.0,0,255);
- ptr[3]=CLAMP(color.a*255.0,0,255);
-
-}
-
-
-Error BakedLightBaker::transfer_to_lightmaps() {
-
- if (!triangles.size() || baked_textures.size()==0)
- return ERR_UNCONFIGURED;
-
- EditorProgress ep("transfer_to_lightmaps",TTR("Transfer to Lightmaps:"),baked_textures.size()*2+triangles.size());
-
- for(int i=0;i<baked_textures.size();i++) {
-
- ERR_FAIL_COND_V( baked_textures[i].width<=0 || baked_textures[i].height<=0,ERR_UNCONFIGURED );
-
- baked_textures[i].data.resize( baked_textures[i].width*baked_textures[i].height*4 );
- zeromem(baked_textures[i].data.ptr(),baked_textures[i].data.size());
- ep.step(TTR("Allocating Texture #")+itos(i+1),i);
- }
-
- Vector<double> norm_arr;
- norm_arr.resize(lights.size());
-
- for(int i=0;i<lights.size();i++) {
- norm_arr[i] = 1.0/get_normalization(i);
- }
- float gamma = baked_light->get_gamma_adjust();
- float mult = baked_light->get_energy_multiplier();
-
- for(int i=0;i<triangles.size();i++) {
-
- if (i%200==0) {
- ep.step(TTR("Baking Triangle #")+itos(i),i+baked_textures.size());
- }
- Triangle &t=triangles[i];
- if (t.baked_texture<0 || t.baked_texture>=baked_textures.size())
- continue;
-
- BakeTexture &bt=baked_textures[t.baked_texture];
- Vector3 normal = Plane(t.vertices[0],t.vertices[1],t.vertices[2]).normal;
-
-
- int x[3];
- int y[3];
-
- Vector3 vertices[3]={
- t.vertices[0],
- t.vertices[1],
- t.vertices[2]
- };
-
- for(int j=0;j<3;j++) {
-
- x[j]=t.bake_uvs[j].x*bt.width;
- y[j]=t.bake_uvs[j].y*bt.height;
- x[j]=CLAMP(x[j],0,bt.width-1);
- y[j]=CLAMP(y[j],0,bt.height-1);
- }
-
-
- {
-
- // sort the points vertically
- if (y[1] > y[2]) {
- SWAP(x[1], x[2]);
- SWAP(y[1], y[2]);
- SWAP(vertices[1],vertices[2]);
- }
- if (y[0] > y[1]) {
- SWAP(x[0], x[1]);
- SWAP(y[0], y[1]);
- SWAP(vertices[0],vertices[1]);
- }
- if (y[1] > y[2]) {
- SWAP(x[1], x[2]);
- SWAP(y[1], y[2]);
- SWAP(vertices[1],vertices[2]);
- }
-
- double dx_far = double(x[2] - x[0]) / (y[2] - y[0] + 1);
- double dx_upper = double(x[1] - x[0]) / (y[1] - y[0] + 1);
- double dx_low = double(x[2] - x[1]) / (y[2] - y[1] + 1);
- double xf = x[0];
- double xt = x[0] + dx_upper; // if y[0] == y[1], special case
- for (int yi = y[0]; yi <= (y[2] > bt.height-1 ? bt.height-1 : y[2]); yi++)
- {
- if (yi >= 0) {
- for (int xi = (xf > 0 ? int(xf) : 0); xi <= (xt < bt.width ? xt : bt.width-1) ; xi++) {
- //pixels[int(x + y * width)] = color;
-
- Vector2 v0 = Vector2(x[1]-x[0],y[1]-y[0]);
- Vector2 v1 = Vector2(x[2]-x[0],y[2]-y[0]);
- //vertices[2] - vertices[0];
- Vector2 v2 = Vector2(xi-x[0],yi-y[0]);
- float d00 = v0.dot( v0);
- float d01 = v0.dot( v1);
- float d11 = v1.dot( v1);
- float d20 = v2.dot( v0);
- float d21 = v2.dot( v1);
- float denom = (d00 * d11 - d01 * d01);
- Vector3 pos;
- if (denom==0) {
- pos=t.vertices[0];
- } else {
- float v = (d11 * d20 - d01 * d21) / denom;
- float w = (d00 * d21 - d01 * d20) / denom;
- float u = 1.0f - v - w;
- pos = vertices[0]*u + vertices[1]*v + vertices[2]*w;
- }
- _plot_pixel_to_lightmap(xi,yi,bt.width,bt.height,bt.data.ptr(),pos,normal,norm_arr.ptr(),mult,gamma);
-
- }
-
- for (int xi = (xf < bt.width ? int(xf) : bt.width-1); xi >= (xt > 0 ? xt : 0); xi--) {
- //pixels[int(x + y * width)] = color;
- Vector2 v0 = Vector2(x[1]-x[0],y[1]-y[0]);
- Vector2 v1 = Vector2(x[2]-x[0],y[2]-y[0]);
- //vertices[2] - vertices[0];
- Vector2 v2 = Vector2(xi-x[0],yi-y[0]);
- float d00 = v0.dot( v0);
- float d01 = v0.dot( v1);
- float d11 = v1.dot( v1);
- float d20 = v2.dot( v0);
- float d21 = v2.dot( v1);
- float denom = (d00 * d11 - d01 * d01);
- Vector3 pos;
- if (denom==0) {
- pos=t.vertices[0];
- } else {
- float v = (d11 * d20 - d01 * d21) / denom;
- float w = (d00 * d21 - d01 * d20) / denom;
- float u = 1.0f - v - w;
- pos = vertices[0]*u + vertices[1]*v + vertices[2]*w;
- }
-
- _plot_pixel_to_lightmap(xi,yi,bt.width,bt.height,bt.data.ptr(),pos,normal,norm_arr.ptr(),mult,gamma);
-
- }
- }
- xf += dx_far;
- if (yi < y[1])
- xt += dx_upper;
- else
- xt += dx_low;
- }
- }
-
- }
-
-
- for(int i=0;i<baked_textures.size();i++) {
-
-
- {
-
- ep.step(TTR("Post-Processing Texture #")+itos(i),i+baked_textures.size()+triangles.size());
-
- BakeTexture &bt=baked_textures[i];
-
- Vector<uint8_t> copy_data=bt.data;
- uint8_t *data=bt.data.ptr();
- const int max_radius=8;
- const int shadow_radius=2;
- const int max_dist=0x7FFFFFFF;
-
- for(int x=0;x<bt.width;x++) {
-
- for(int y=0;y<bt.height;y++) {
-
-
- uint8_t a = copy_data[(y*bt.width+x)*4+3];
-
- if (a>0) {
- //blur shadow
-
- int from_x = MAX(0,x-shadow_radius);
- int to_x = MIN(bt.width-1,x+shadow_radius);
- int from_y = MAX(0,y-shadow_radius);
- int to_y = MIN(bt.height-1,y+shadow_radius);
-
- int sum=0;
- int sumc=0;
-
- for(int k=from_y;k<=to_y;k++) {
- for(int l=from_x;l<=to_x;l++) {
-
- const uint8_t * rp = &copy_data[(k*bt.width+l)<<2];
-
- sum+=rp[3];
- sumc++;
- }
- }
-
- sum/=sumc;
- data[(y*bt.width+x)*4+3]=sum;
-
- } else {
-
- int closest_dist=max_dist;
- uint8_t closest_color[4];
-
- int from_x = MAX(0,x-max_radius);
- int to_x = MIN(bt.width-1,x+max_radius);
- int from_y = MAX(0,y-max_radius);
- int to_y = MIN(bt.height-1,y+max_radius);
-
- for(int k=from_y;k<=to_y;k++) {
- for(int l=from_x;l<=to_x;l++) {
-
- int dy = y-k;
- int dx = x-l;
- int dist = dy*dy+dx*dx;
- if (dist>=closest_dist)
- continue;
-
- const uint8_t * rp = &copy_data[(k*bt.width+l)<<2];
-
- if (rp[3]==0)
- continue;
-
- closest_dist=dist;
- closest_color[0]=rp[0];
- closest_color[1]=rp[1];
- closest_color[2]=rp[2];
- closest_color[3]=rp[3];
- }
- }
-
-
- if (closest_dist!=max_dist) {
-
- data[(y*bt.width+x)*4+0]=closest_color[0];
- data[(y*bt.width+x)*4+1]=closest_color[1];
- data[(y*bt.width+x)*4+2]=closest_color[2];
- data[(y*bt.width+x)*4+3]=closest_color[3];
- }
- }
- }
- }
- }
-
- PoolVector<uint8_t> dv;
- dv.resize(baked_textures[i].data.size());
- {
- PoolVector<uint8_t>::Write w = dv.write();
- copymem(w.ptr(),baked_textures[i].data.ptr(),baked_textures[i].data.size());
- }
-
- Image img(baked_textures[i].width,baked_textures[i].height,0,Image::FORMAT_RGBA8,dv);
- Ref<ImageTexture> tex = memnew( ImageTexture );
- tex->create_from_image(img);
- baked_light->set_lightmap_texture(i,tex);
- }
-
-
- return OK;
-}
-
-void BakedLightBaker::clear() {
-
-
-
- _stop_thread();
-
- if (bvh)
- _free_bvh(bvh);
-
- if (ray_stack)
- memdelete_arr(ray_stack);
- if (octant_stack)
- memdelete_arr(octant_stack);
- if (octantptr_stack)
- memdelete_arr(octantptr_stack);
- if (bvh_stack)
- memdelete_arr(bvh_stack);
-/*
- * ???
- for(int i=0;i<octant_pool.size();i++) {
- /*
- if (octant_pool[i].leaf) {
- memdelete_arr( octant_pool[i].light );
- }
- Vector<double> norm_arr;
- norm_arr.resize(lights.size());
- */
-
- for(int i=0;i<lights.size();i++) {
- norm_arr[i] = 1.0/get_normalization(i);
- }
-
- const double *normptr=norm_arr.ptr();
- }
-*/
- octant_pool.clear();
- octant_pool_size=0;
- bvh=NULL;
- leaf_list=0;
- cell_count=0;
- ray_stack=NULL;
- octant_stack=NULL;
- octantptr_stack=NULL;
- bvh_stack=NULL;
- materials.clear();
- materials.clear();
- textures.clear();
- lights.clear();
- triangles.clear();
- endpoint_normal.clear();
- endpoint_normal_bits.clear();
- baked_octree_texture_w=0;
- baked_octree_texture_h=0;
- paused=false;
- baking=false;
-
- bake_thread_exit=false;
- first_bake_to_map=true;
- baked_light=Ref<BakedLight>();
- total_rays=0;
-
-}
-
-BakedLightBaker::BakedLightBaker() {
- octree_depth=9;
- lattice_size=4;
- octant_pool.clear();
- octant_pool_size=0;
- bvh=NULL;
- leaf_list=0;
- cell_count=0;
- ray_stack=NULL;
- bvh_stack=NULL;
- octant_stack=NULL;
- octantptr_stack=NULL;
- plot_size=2.5;
- max_bounces=2;
- materials.clear();
- baked_octree_texture_w=0;
- baked_octree_texture_h=0;
- paused=false;
- baking=false;
-
- bake_thread_exit=false;
- total_rays=0;
- first_bake_to_map=true;
- linear_color=false;
-
-}
-
-BakedLightBaker::~BakedLightBaker() {
-
- clear();
-}
-#endif
diff --git a/editor/plugins/baked_light_baker.h b/editor/plugins/baked_light_baker.h
deleted file mode 100644
index 123812fc07..0000000000
--- a/editor/plugins/baked_light_baker.h
+++ /dev/null
@@ -1,382 +0,0 @@
-/*************************************************************************/
-/* baked_light_baker.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef BAKED_LIGHT_BAKER_H
-#define BAKED_LIGHT_BAKER_H
-
-#include "os/thread.h"
-
-#include "scene/3d/light.h"
-#include "scene/3d/mesh_instance.h"
-
-#if 0
-
-class BakedLightBaker {
-public:
-
- enum {
-
- ATTENUATION_CURVE_LEN=256,
- OCTANT_POOL_CHUNK=1000000
- };
-
- /*
- struct OctantLight {
- double accum[8][3];
- };
- */
-
- struct Octant {
- bool leaf;
- AABB aabb;
- uint16_t texture_x;
- uint16_t texture_y;
- int sampler_ofs;
- float normal_accum[8][3];
- double full_accum[3];
- int parent;
- union {
- struct {
- int next_leaf;
- float offset[3];
- int bake_neighbour;
- bool first_neighbour;
- double light_accum[8][3];
- };
- int children[8];
- };
- };
-
- struct OctantHash {
-
- int next;
- uint32_t hash;
- uint64_t value;
-
- };
-
- struct MeshTexture {
-
- Vector<uint8_t> tex;
- int tex_w,tex_h;
-
- _FORCE_INLINE_ void get_color(const Vector2& p_uv,Color& ret) {
-
- if (tex_w && tex_h) {
-
- int x = Math::fast_ftoi(Math::fposmod(p_uv.x,1.0)*tex_w);
- int y = Math::fast_ftoi(Math::fposmod(p_uv.y,1.0)*tex_w);
- x=CLAMP(x,0,tex_w-1);
- y=CLAMP(y,0,tex_h-1);
- const uint8_t*ptr = &tex[(y*tex_w+x)*4];
- ret.r*=ptr[0]/255.0;
- ret.g*=ptr[1]/255.0;
- ret.b*=ptr[2]/255.0;
- ret.a*=ptr[3]/255.0;
- }
- }
-
- };
-
- struct Param {
-
- Color color;
- MeshTexture*tex;
- _FORCE_INLINE_ Color get_color(const Vector2& p_uv) {
-
- Color ret=color;
- if (tex)
- tex->get_color(p_uv,ret);
- return ret;
-
- }
-
- };
-
- struct MeshMaterial {
-
- Param diffuse;
- Param specular;
- Param emission;
- };
-
- struct Triangle {
-
- AABB aabb;
- Vector3 vertices[3];
- Vector2 uvs[3];
- Vector2 bake_uvs[3];
- Vector3 normals[3];
- MeshMaterial *material;
- int baked_texture;
-
- _FORCE_INLINE_ Vector2 get_uv(const Vector3& p_pos) {
-
- Vector3 v0 = vertices[1] - vertices[0];
- Vector3 v1 = vertices[2] - vertices[0];
- Vector3 v2 = p_pos - vertices[0];
-
- float d00 = v0.dot( v0);
- float d01 = v0.dot( v1);
- float d11 = v1.dot( v1);
- float d20 = v2.dot( v0);
- float d21 = v2.dot( v1);
- float denom = (d00 * d11 - d01 * d01);
- if (denom==0)
- return uvs[0];
- float v = (d11 * d20 - d01 * d21) / denom;
- float w = (d00 * d21 - d01 * d20) / denom;
- float u = 1.0f - v - w;
-
- return uvs[0]*u + uvs[1]*v + uvs[2]*w;
- }
-
- _FORCE_INLINE_ void get_uv_and_normal(const Vector3& p_pos,Vector2& r_uv,Vector3& r_normal) {
-
- Vector3 v0 = vertices[1] - vertices[0];
- Vector3 v1 = vertices[2] - vertices[0];
- Vector3 v2 = p_pos - vertices[0];
-
- float d00 = v0.dot( v0);
- float d01 = v0.dot( v1);
- float d11 = v1.dot( v1);
- float d20 = v2.dot( v0);
- float d21 = v2.dot( v1);
- float denom = (d00 * d11 - d01 * d01);
- if (denom==0) {
- r_normal=normals[0];
- r_uv=uvs[0];
- return;
- }
- float v = (d11 * d20 - d01 * d21) / denom;
- float w = (d00 * d21 - d01 * d20) / denom;
- float u = 1.0f - v - w;
-
- r_uv=uvs[0]*u + uvs[1]*v + uvs[2]*w;
- r_normal=(normals[0]*u+normals[1]*v+normals[2]*w).normalized();
- }
- };
-
-
- struct BVH {
-
- AABB aabb;
- Vector3 center;
- Triangle *leaf;
- BVH*children[2];
- };
-
-
- struct BVHCmpX {
-
- bool operator()(const BVH* p_left, const BVH* p_right) const {
-
- return p_left->center.x < p_right->center.x;
- }
- };
-
- struct BVHCmpY {
-
- bool operator()(const BVH* p_left, const BVH* p_right) const {
-
- return p_left->center.y < p_right->center.y;
- }
- };
- struct BVHCmpZ {
-
- bool operator()(const BVH* p_left, const BVH* p_right) const {
-
- return p_left->center.z < p_right->center.z;
- }
- };
-
- struct BakeTexture {
-
- Vector<uint8_t> data;
- int width,height;
- };
-
-
- struct LightData {
-
- VS::LightType type;
-
- Vector3 pos;
- Vector3 up;
- Vector3 left;
- Vector3 dir;
- Color diffuse;
- Color specular;
- float energy;
- float length;
- int rays_thrown;
- bool bake_shadow;
-
- float radius;
- float attenuation;
- float spot_angle;
- float darkening;
- float spot_attenuation;
- float area;
-
- float constant;
-
- bool bake_direct;
-
- Vector<float> attenuation_table;
-
- };
-
-
- Vector<LightData> lights;
-
- List<MeshMaterial> materials;
- List<MeshTexture> textures;
-
- AABB octree_aabb;
- Vector<Octant> octant_pool;
- int octant_pool_size;
- BVH*bvh;
- Vector<Triangle> triangles;
- Vector<BakeTexture> baked_textures;
- Transform base_inv;
- int leaf_list;
- int octree_depth;
- int bvh_depth;
- int cell_count;
- uint32_t *ray_stack;
- BVH **bvh_stack;
- uint32_t *octant_stack;
- uint32_t *octantptr_stack;
-
- struct ThreadStack {
- uint32_t *octant_stack;
- uint32_t *octantptr_stack;
- uint32_t *ray_stack;
- BVH **bvh_stack;
- };
-
- Map<Vector3,Vector3> endpoint_normal;
- Map<Vector3,uint64_t> endpoint_normal_bits;
-
- float cell_size;
- float plot_size; //multiplied by cell size
- float octree_extra_margin;
-
- int max_bounces;
- int64_t total_rays;
- bool use_diffuse;
- bool use_specular;
- bool use_translucency;
- bool linear_color;
-
-
- int baked_octree_texture_w;
- int baked_octree_texture_h;
- int baked_light_texture_w;
- int baked_light_texture_h;
- int lattice_size;
- float edge_damp;
- float normal_damp;
- float tint;
- float ao_radius;
- float ao_strength;
-
- bool paused;
- bool baking;
- bool first_bake_to_map;
-
- Map<Ref<Material>,MeshMaterial*> mat_map;
- Map<Ref<Texture>,MeshTexture*> tex_map;
-
-
-
- MeshTexture* _get_mat_tex(const Ref<Texture>& p_tex);
- void _add_mesh(const Ref<Mesh>& p_mesh,const Ref<Material>& p_mat_override,const Transform& p_xform,int p_baked_texture=-1);
- void _parse_geometry(Node* p_node);
- BVH* _parse_bvh(BVH** p_children,int p_size,int p_depth,int& max_depth);
- void _make_bvh();
- void _make_octree();
- void _make_octree_texture();
- void _octree_insert(int p_octant, Triangle* p_triangle, int p_depth);
- _FORCE_INLINE_ void _plot_pixel_to_lightmap(int x, int y, int width, int height, uint8_t *image, const Vector3& p_pos,const Vector3& p_normal,double *p_norm_ptr,float mult,float gamma);
-
-
- void _free_bvh(BVH* p_bvh);
-
- void _fix_lights();
-
- Ref<BakedLight> baked_light;
-
-
- //void _plot_light(const Vector3& p_plot_pos,const AABB& p_plot_aabb,const Color& p_light,int p_octant=0);
- void _plot_light(ThreadStack& thread_stack,const Vector3& p_plot_pos,const AABB& p_plot_aabb,const Color& p_light,const Color& p_tint_light,bool p_only_full,const Plane& p_plane);
- //void _plot_light_point(const Vector3& p_plot_pos, Octant *p_octant, const AABB& p_aabb,const Color& p_light);
-
- float _throw_ray(ThreadStack& thread_stack,bool p_bake_direct,const Vector3& p_begin, const Vector3& p_end,float p_rest,const Color& p_light,float *p_att_curve,float p_att_pos,int p_att_curve_len,int p_bounces,bool p_first_bounce=false,bool p_only_dist=false);
-
-
- float total_light_area;
-
- Vector<Thread*> threads;
-
- bool bake_thread_exit;
- static void _bake_thread_func(void *arg);
-
- void _start_thread();
- void _stop_thread();
-public:
-
-
- void throw_rays(ThreadStack &thread_stack, int p_amount);
- double get_normalization(int p_light_idx) const;
- double get_modifier(int p_light_idx) const;
-
- void bake(const Ref<BakedLight>& p_light,Node *p_base);
- bool is_baking();
- void set_pause(bool p_pause);
- bool is_paused();
- uint64_t get_rays_thrown() { return total_rays; }
-
- Error transfer_to_lightmaps();
-
- void update_octree_sampler(PoolVector<int> &p_sampler);
- void update_octree_images(PoolVector<uint8_t> &p_octree,PoolVector<uint8_t> &p_light);
-
- Ref<BakedLight> get_baked_light() { return baked_light; }
-
- void clear();
-
- BakedLightBaker();
- ~BakedLightBaker();
-
-};
-
-#endif // BAKED_LIGHT_BAKER_H
-#endif
diff --git a/editor/plugins/baked_light_baker_cmpxchg.cpp b/editor/plugins/baked_light_baker_cmpxchg.cpp
deleted file mode 100644
index f0a1aea416..0000000000
--- a/editor/plugins/baked_light_baker_cmpxchg.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/*************************************************************************/
-/* baked_light_baker_cmpxchg.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "typedefs.h"
-
-#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
-
-void baked_light_baker_add_64f(double *dst, double value) {
-
- union {
- int64_t i;
- double f;
- } swapy;
-
- while (true) {
- swapy.f = *dst;
- int64_t from = swapy.i;
- swapy.f += value;
- int64_t to = swapy.i;
- if (__sync_bool_compare_and_swap((int64_t *)dst, from, to))
- break;
- }
-}
-
-void baked_light_baker_add_64i(int64_t *dst, int64_t value) {
-
- while (!__sync_bool_compare_and_swap(dst, *dst, (*dst) + value)) {
- }
-}
-
-#elif defined(WINDOWS_ENABLED)
-
-#include "windows.h"
-
-void baked_light_baker_add_64f(double *dst, double value) {
-
- union {
- int64_t i;
- double f;
- } swapy;
-
- while (true) {
- swapy.f = *dst;
- int64_t from = swapy.i;
- swapy.f += value;
- int64_t to = swapy.i;
- int64_t result = InterlockedCompareExchange64((int64_t *)dst, to, from);
- if (result == from)
- break;
- }
-}
-
-void baked_light_baker_add_64i(int64_t *dst, int64_t value) {
-
- while (true) {
- int64_t from = *dst;
- int64_t to = from + value;
- int64_t result = InterlockedCompareExchange64(dst, to, from);
- if (result == from)
- break;
- }
-}
-
-#else
-
-//in goder (the god of programmers) we trust
-#warning seems this platform or compiler does not support safe cmpxchg, your baked lighting may be funny
-
-void baked_light_baker_add_64f(double *dst, double value) {
-
- *dst += value;
-}
-
-void baked_light_baker_add_64i(int64_t *dst, int64_t value) {
-
- *dst += value;
-}
-
-#endif
diff --git a/editor/plugins/baked_light_editor_plugin.cpp b/editor/plugins/baked_light_editor_plugin.cpp
deleted file mode 100644
index f973639a67..0000000000
--- a/editor/plugins/baked_light_editor_plugin.cpp
+++ /dev/null
@@ -1,377 +0,0 @@
-/*************************************************************************/
-/* baked_light_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "baked_light_editor_plugin.h"
-
-#include "io/marshalls.h"
-#include "io/resource_saver.h"
-#include "scene/3d/mesh_instance.h"
-#include "scene/gui/box_container.h"
-
-#if 0
-
-
-void BakedLightEditor::_end_baking() {
-
- baker->clear();
- set_process(false);
- button_bake->set_pressed(false);
- bake_info->set_text("");
-}
-
-void BakedLightEditor::_node_removed(Node *p_node) {
-
- if(p_node==node) {
- _end_baking();
- node=NULL;
-
- hide();
- }
-
-}
-
-
-
-
-
-void BakedLightEditor::_notification(int p_option) {
-
-
- if (p_option==NOTIFICATION_ENTER_TREE) {
-
- button_bake->set_icon(get_icon("Bake","EditorIcons"));
- button_reset->set_icon(get_icon("Reload","EditorIcons"));
- button_make_lightmaps->set_icon(get_icon("LightMap","EditorIcons"));
- }
-
- if (p_option==NOTIFICATION_PROCESS) {
-
- if (baker->is_baking() && !baker->is_paused()) {
-
- update_timeout-=get_process_delta_time();
- if (update_timeout<0) {
-
- if (baker->get_baked_light()!=node->get_baked_light()) {
- _end_baking();
- return;
- }
-
- uint64_t t = OS::get_singleton()->get_ticks_msec();
-
-#ifdef DEBUG_CUBES
- double norm = baker->get_normalization();
- float max_lum=0;
-
- {
- PoolVector<Color>::Write cw=colors.write();
- BakedLightBaker::Octant *octants=baker->octant_pool.ptr();
- BakedLightBaker::Octant *oct = &octants[baker->leaf_list];
- int vert_idx=0;
-
- while(oct) {
-
-
-
- Color colors[8];
- for(int i=0;i<8;i++) {
-
- colors[i].r=oct->light_accum[i][0]/norm;
- colors[i].g=oct->light_accum[i][1]/norm;
- colors[i].b=oct->light_accum[i][2]/norm;
-
- float lum = colors[i].get_v();
- /*
- if (lum<0.05)
- color.a=0;
- */
- if (lum>max_lum)
- max_lum=lum;
-
- }
- static const int vert2cub[36]={7,3,1,1,5,7,7,6,2,2,3,7,7,5,4,4,6,7,2,6,4,4,0,2,4,5,1,1,0,4,1,3,2,2,0,1};
- for (int i=0;i<36;i++) {
-
-
- cw[vert_idx++]=colors[vert2cub[i]];
- }
-
- if (oct->next_leaf)
- oct=&octants[oct->next_leaf];
- else
- oct=NULL;
-
- }
- }
- print_line("MSCOL: "+itos(OS::get_singleton()->get_ticks_msec()-t));
- t = OS::get_singleton()->get_ticks_msec();
-
- Array a;
- a.resize(Mesh::ARRAY_MAX);
- a[Mesh::ARRAY_VERTEX]=vertices;
- a[Mesh::ARRAY_COLOR]=colors;
- while(mesh->get_surface_count())
- mesh->surface_remove(0);
- mesh->add_surface(Mesh::PRIMITIVE_TRIANGLES,a);
- mesh->surface_set_material(0,material);
-#endif
- ERR_FAIL_COND(node->get_baked_light().is_null());
-
- baker->update_octree_images(octree_texture,light_texture);
- baker->update_octree_sampler(octree_sampler);
- //print_line("sampler size: "+itos(octree_sampler.size()*4));
-
-#if 1
-//debug
- Image img(baker->baked_octree_texture_w,baker->baked_octree_texture_h,0,Image::FORMAT_RGBA8,octree_texture);
- Ref<ImageTexture> it = memnew( ImageTexture );
- it->create_from_image(img);
- ResourceSaver::save("baked_octree.png",it);
-
-#endif
-
-
- uint64_t rays_snap = baker->get_rays_thrown();
- int rays_sec = (rays_snap-last_rays_time)*1.0-(update_timeout);
- last_rays_time=rays_snap;
-
- bake_info->set_text("rays/s: "+itos(rays_sec));
- update_timeout=1;
- print_line("MSUPDATE: "+itos(OS::get_singleton()->get_ticks_msec()-t));
- t=OS::get_singleton()->get_ticks_msec();
- node->get_baked_light()->set_octree(octree_texture);
- node->get_baked_light()->set_light(light_texture);
- node->get_baked_light()->set_sampler_octree(octree_sampler);
- node->get_baked_light()->set_edited(true);
-
- print_line("MSSET: "+itos(OS::get_singleton()->get_ticks_msec()-t));
-
-
-
- }
- }
- }
-}
-
-
-void BakedLightEditor::_menu_option(int p_option) {
-
-
- switch(p_option) {
-
-
- case MENU_OPTION_BAKE: {
-
- ERR_FAIL_COND(!node);
- ERR_FAIL_COND(node->get_baked_light().is_null());
- baker->bake(node->get_baked_light(),node);
- node->get_baked_light()->set_mode(BakedLight::MODE_OCTREE);
- update_timeout=0;
- set_process(true);
-
-
- } break;
- case MENU_OPTION_CLEAR: {
-
-
-
- } break;
-
- }
-}
-
-void BakedLightEditor::_bake_pressed() {
-
- ERR_FAIL_COND(!node);
- const String conf_warning = node->get_configuration_warning();
- if (!conf_warning.empty()) {
- err_dialog->set_text(conf_warning);
- err_dialog->popup_centered_minsize();
- button_bake->set_pressed(false);
- return;
- }
-
- if (baker->is_baking()) {
-
- baker->set_pause(!button_bake->is_pressed());
- if (baker->is_paused()) {
-
- set_process(false);
- bake_info->set_text("");
- button_reset->show();
- button_make_lightmaps->show();
-
- } else {
-
- update_timeout=0;
- set_process(true);
- button_make_lightmaps->hide();
- button_reset->hide();
- }
- } else {
- baker->bake(node->get_baked_light(),node);
- node->get_baked_light()->set_mode(BakedLight::MODE_OCTREE);
- update_timeout=0;
-
- last_rays_time=0;
- button_bake->set_pressed(false);
-
- set_process(true);
- }
-
-}
-
-void BakedLightEditor::_clear_pressed(){
-
- baker->clear();
- button_bake->set_pressed(false);
- bake_info->set_text("");
-
-}
-
-void BakedLightEditor::edit(BakedLightInstance *p_baked_light) {
-
- if (p_baked_light==NULL || node==p_baked_light) {
- return;
- }
- if (node && node!=p_baked_light)
- _end_baking();
-
-
- node=p_baked_light;
- //_end_baking();
-
-}
-
-void BakedLightEditor::_bake_lightmaps() {
-
- Error err = baker->transfer_to_lightmaps();
- if (err) {
-
- err_dialog->set_text("Error baking to lightmaps!\nMake sure that a bake has just\n happened and that lightmaps are\n configured. ");
- err_dialog->popup_centered_minsize();
- return;
- }
-
- node->get_baked_light()->set_mode(BakedLight::MODE_LIGHTMAPS);
-
-
-}
-
-void BakedLightEditor::_bind_methods() {
-
- ClassDB::bind_method("_menu_option",&BakedLightEditor::_menu_option);
- ClassDB::bind_method("_bake_pressed",&BakedLightEditor::_bake_pressed);
- ClassDB::bind_method("_clear_pressed",&BakedLightEditor::_clear_pressed);
- ClassDB::bind_method("_bake_lightmaps",&BakedLightEditor::_bake_lightmaps);
-}
-
-BakedLightEditor::BakedLightEditor() {
-
-
- bake_hbox = memnew( HBoxContainer );
- button_bake = memnew( ToolButton );
- button_bake->set_text(TTR("Bake!"));
- button_bake->set_toggle_mode(true);
- button_reset = memnew( Button );
- button_make_lightmaps = memnew( Button );
- button_bake->set_tooltip("Start/Unpause the baking process.\nThis bakes lighting into the lightmap octree.");
- button_make_lightmaps ->set_tooltip("Convert the lightmap octree to lightmap textures\n(must have set up UV/Lightmaps properly before!).");
-
-
- bake_info = memnew( Label );
- bake_hbox->add_child( button_bake );
- bake_hbox->add_child( button_reset );
- bake_hbox->add_child( bake_info );
-
- err_dialog = memnew( AcceptDialog );
- add_child(err_dialog);
- node=NULL;
- baker = memnew( BakedLightBaker );
-
- bake_hbox->add_child(button_make_lightmaps);
- button_make_lightmaps->hide();
-
- button_bake->connect("pressed",this,"_bake_pressed");
- button_reset->connect("pressed",this,"_clear_pressed");
- button_make_lightmaps->connect("pressed",this,"_bake_lightmaps");
- button_reset->hide();
- button_reset->set_tooltip(TTR("Reset the lightmap octree baking process (start over)."));
-
-
- update_timeout=0;
-
-
-
-}
-
-BakedLightEditor::~BakedLightEditor() {
-
- memdelete(baker);
-}
-
-void BakedLightEditorPlugin::edit(Object *p_object) {
-
- baked_light_editor->edit(p_object->cast_to<BakedLightInstance>());
-}
-
-bool BakedLightEditorPlugin::handles(Object *p_object) const {
-
- return p_object->is_type("BakedLightInstance");
-}
-
-void BakedLightEditorPlugin::make_visible(bool p_visible) {
-
- if (p_visible) {
- baked_light_editor->show();
- baked_light_editor->bake_hbox->show();
- } else {
-
- baked_light_editor->hide();
- baked_light_editor->bake_hbox->hide();
- baked_light_editor->edit(NULL);
- }
-
-}
-
-BakedLightEditorPlugin::BakedLightEditorPlugin(EditorNode *p_node) {
-
- editor=p_node;
- baked_light_editor = memnew( BakedLightEditor );
- editor->get_viewport()->add_child(baked_light_editor);
- add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU,baked_light_editor->bake_hbox);
- baked_light_editor->hide();
- baked_light_editor->bake_hbox->hide();
-}
-
-
-BakedLightEditorPlugin::~BakedLightEditorPlugin()
-{
-}
-
-#endif
diff --git a/editor/plugins/baked_light_editor_plugin.h b/editor/plugins/baked_light_editor_plugin.h
deleted file mode 100644
index c4a7cd51cf..0000000000
--- a/editor/plugins/baked_light_editor_plugin.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*************************************************************************/
-/* baked_light_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef BAKED_LIGHT_EDITOR_PLUGIN_H
-#define BAKED_LIGHT_EDITOR_PLUGIN_H
-
-#include "editor/editor_node.h"
-#include "editor/editor_plugin.h"
-#include "editor/plugins/baked_light_baker.h"
-#include "scene/gui/spin_box.h"
-
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-
-#if 0
-
-class MeshInstance;
-
-class BakedLightEditor : public Control {
-
- GDCLASS(BakedLightEditor, Control );
-
-
- float update_timeout;
- PoolVector<uint8_t> octree_texture;
- PoolVector<uint8_t> light_texture;
- PoolVector<int> octree_sampler;
-
- BakedLightBaker *baker;
- AcceptDialog *err_dialog;
-
- HBoxContainer *bake_hbox;
- Button *button_bake;
- Button *button_reset;
- Button *button_make_lightmaps;
- Label *bake_info;
-
- uint64_t last_rays_time;
-
-
-
- BakedLightInstance *node;
-
- enum Menu {
-
- MENU_OPTION_BAKE,
- MENU_OPTION_CLEAR
- };
-
- void _bake_lightmaps();
-
- void _bake_pressed();
- void _clear_pressed();
-
- void _end_baking();
- void _menu_option(int);
-
-friend class BakedLightEditorPlugin;
-protected:
- void _node_removed(Node *p_node);
- static void _bind_methods();
- void _notification(int p_what);
-public:
-
- void edit(BakedLightInstance *p_baked_light);
- BakedLightEditor();
- ~BakedLightEditor();
-};
-
-class BakedLightEditorPlugin : public EditorPlugin {
-
- GDCLASS( BakedLightEditorPlugin, EditorPlugin );
-
- BakedLightEditor *baked_light_editor;
- EditorNode *editor;
-
-public:
-
- virtual String get_name() const { return "BakedLight"; }
- bool has_main_screen() const { return false; }
- virtual void edit(Object *p_node);
- virtual bool handles(Object *p_node) const;
- virtual void make_visible(bool p_visible);
-
- BakedLightEditorPlugin(EditorNode *p_node);
- ~BakedLightEditorPlugin();
-
-};
-
-#endif // MULTIMESH_EDITOR_PLUGIN_H
-#endif
diff --git a/editor/plugins/camera_editor_plugin.cpp b/editor/plugins/camera_editor_plugin.cpp
index 8e625c4a73..c19540116e 100644
--- a/editor/plugins/camera_editor_plugin.cpp
+++ b/editor/plugins/camera_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -97,8 +97,8 @@ CameraEditor::CameraEditor() {
void CameraEditorPlugin::edit(Object *p_object) {
- SpatialEditor::get_singleton()->set_can_preview(p_object->cast_to<Camera>());
- //camera_editor->edit(p_object->cast_to<Node>());
+ SpatialEditor::get_singleton()->set_can_preview(Object::cast_to<Camera>(p_object));
+ //camera_editor->edit(Object::cast_to<Node>(p_object));
}
bool CameraEditorPlugin::handles(Object *p_object) const {
@@ -109,7 +109,7 @@ bool CameraEditorPlugin::handles(Object *p_object) const {
void CameraEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
- //SpatialEditor::get_singleton()->set_can_preview(p_object->cast_to<Camera>());
+ //SpatialEditor::get_singleton()->set_can_preview(Object::cast_to<Camera>(p_object));
} else {
SpatialEditor::get_singleton()->set_can_preview(NULL);
}
diff --git a/editor/plugins/camera_editor_plugin.h b/editor/plugins/camera_editor_plugin.h
index a0f98687cb..12702db7a5 100644
--- a/editor/plugins/camera_editor_plugin.h
+++ b/editor/plugins/camera_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 79bf68b061..3b74601e78 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -175,7 +175,7 @@ void CanvasItemEditor::_edit_set_pivot(const Vector2 &mouse_pos) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Node2D *n2d = E->get()->cast_to<Node2D>();
+ Node2D *n2d = Object::cast_to<Node2D>(E->get());
if (n2d && n2d->edit_has_pivot()) {
Vector2 offset = n2d->edit_get_pivot();
@@ -190,7 +190,7 @@ void CanvasItemEditor::_edit_set_pivot(const Vector2 &mouse_pos) {
undo_redo->add_undo_method(n2d, "set_global_position", gpos);
undo_redo->add_undo_method(n2d, "edit_set_pivot", offset);
for (int i = 0; i < n2d->get_child_count(); i++) {
- Node2D *n2dc = n2d->get_child(i)->cast_to<Node2D>();
+ Node2D *n2dc = Object::cast_to<Node2D>(n2d->get_child(i));
if (!n2dc)
continue;
@@ -199,7 +199,7 @@ void CanvasItemEditor::_edit_set_pivot(const Vector2 &mouse_pos) {
}
}
- Control *cnt = E->get()->cast_to<Control>();
+ Control *cnt = Object::cast_to<Control>(E->get());
if (cnt) {
Vector2 old_pivot = cnt->get_pivot_offset();
@@ -265,7 +265,7 @@ void CanvasItemEditor::_tool_select(int p_index) {
Object *CanvasItemEditor::_get_editor_data(Object *p_what) {
- CanvasItem *ci = p_what->cast_to<CanvasItem>();
+ CanvasItem *ci = Object::cast_to<CanvasItem>(p_what);
if (!ci)
return NULL;
@@ -382,54 +382,15 @@ void CanvasItemEditor::set_state(const Dictionary &p_state) {
void CanvasItemEditor::_add_canvas_item(CanvasItem *p_canvas_item) {
editor_selection->add_node(p_canvas_item);
-#if 0
- if (canvas_items.has(p_canvas_item))
- return;
-
- canvas_items.insert(p_canvas_item,p_info);
- p_canvas_item->connect("hide",this,"_visibility_changed",varray(p_canvas_item->get_instance_id()),CONNECT_ONESHOT);
-#endif
}
void CanvasItemEditor::_remove_canvas_item(CanvasItem *p_canvas_item) {
editor_selection->remove_node(p_canvas_item);
-#if 0
- p_canvas_item->disconnect("hide",this,"_visibility_changed");
- canvas_items.erase(p_canvas_item);
-#endif
}
void CanvasItemEditor::_clear_canvas_items() {
editor_selection->clear();
-#if 0
- while(canvas_items.size())
- _remove_canvas_item(canvas_items.front()->key());
-#endif
-}
-
-void CanvasItemEditor::_visibility_changed(ObjectID p_canvas_item) {
-#if 0
- Object *c = ObjectDB::get_instance(p_canvas_item);
- if (!c)
- return;
- CanvasItem *ct = c->cast_to<CanvasItem>();
- if (!ct)
- return;
- canvas_items.erase(ct);
- //_remove_canvas_item(ct);
- update();
-#endif
-}
-
-void CanvasItemEditor::_node_removed(Node *p_node) {
-#if 0
- CanvasItem *canvas_item = (CanvasItem*)p_node; //not a good cast, but safe
- if (canvas_items.has(canvas_item))
- _remove_canvas_item(canvas_item);
-
- update();
-#endif
}
void CanvasItemEditor::_keying_changed() {
@@ -448,20 +409,20 @@ bool CanvasItemEditor::_is_part_of_subscene(CanvasItem *p_item) {
return item_owner && item_owner != scene_node && p_item != scene_node && item_owner->get_filename() != "";
}
-void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_node, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform, Vector<_SelectResult> &r_items, unsigned int limit) {
+void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_node, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform, Vector<_SelectResult> &r_items, int limit) {
if (!p_node)
return;
- if (p_node->cast_to<Viewport>())
+ if (Object::cast_to<Viewport>(p_node))
return;
- CanvasItem *c = p_node->cast_to<CanvasItem>();
+ CanvasItem *c = Object::cast_to<CanvasItem>(p_node);
for (int i = p_node->get_child_count() - 1; i >= 0; i--) {
if (c && !c->is_set_as_toplevel())
_find_canvas_items_at_pos(p_pos, p_node->get_child(i), p_parent_xform * c->get_transform(), p_canvas_xform, r_items);
else {
- CanvasLayer *cl = p_node->cast_to<CanvasLayer>();
+ CanvasLayer *cl = Object::cast_to<CanvasLayer>(p_node);
_find_canvas_items_at_pos(p_pos, p_node->get_child(i), transform, cl ? cl->get_transform() : p_canvas_xform, r_items); //use base transform
}
@@ -469,13 +430,13 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_no
return;
}
- if (c && c->is_visible_in_tree() && !c->has_meta("_edit_lock_") && !c->cast_to<CanvasLayer>()) {
+ if (c && c->is_visible_in_tree() && !c->has_meta("_edit_lock_") && !Object::cast_to<CanvasLayer>(c)) {
Rect2 rect = c->get_item_rect();
Point2 local_pos = (p_parent_xform * p_canvas_xform * c->get_transform()).affine_inverse().xform(p_pos);
if (rect.has_point(local_pos)) {
- Node2D *node = c->cast_to<Node2D>();
+ Node2D *node = Object::cast_to<Node2D>(c);
_SelectResult res;
res.item = c;
@@ -492,10 +453,10 @@ void CanvasItemEditor::_find_canvas_items_at_rect(const Rect2 &p_rect, Node *p_n
if (!p_node)
return;
- if (p_node->cast_to<Viewport>())
+ if (Object::cast_to<Viewport>(p_node))
return;
- CanvasItem *c = p_node->cast_to<CanvasItem>();
+ CanvasItem *c = Object::cast_to<CanvasItem>(p_node);
bool inherited = p_node != get_tree()->get_edited_scene_root() && p_node->get_filename() != "";
bool editable = false;
@@ -509,13 +470,13 @@ void CanvasItemEditor::_find_canvas_items_at_rect(const Rect2 &p_rect, Node *p_n
if (c && !c->is_set_as_toplevel())
_find_canvas_items_at_rect(p_rect, p_node->get_child(i), p_parent_xform * c->get_transform(), p_canvas_xform, r_items);
else {
- CanvasLayer *cl = p_node->cast_to<CanvasLayer>();
+ CanvasLayer *cl = Object::cast_to<CanvasLayer>(p_node);
_find_canvas_items_at_rect(p_rect, p_node->get_child(i), transform, cl ? cl->get_transform() : p_canvas_xform, r_items);
}
}
}
- if (c && c->is_visible_in_tree() && !c->has_meta("_edit_lock_") && !c->cast_to<CanvasLayer>()) {
+ if (c && c->is_visible_in_tree() && !c->has_meta("_edit_lock_") && !Object::cast_to<CanvasLayer>(c)) {
Rect2 rect = c->get_item_rect();
Transform2D xform = p_parent_xform * p_canvas_xform * c->get_transform();
@@ -590,7 +551,7 @@ void CanvasItemEditor::_key_move(const Vector2 &p_dir, bool p_snap, KeyMoveMODE
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
@@ -619,7 +580,7 @@ void CanvasItemEditor::_key_move(const Vector2 &p_dir, bool p_snap, KeyMoveMODE
} else { // p_move_mode==MOVE_LOCAL_BASE || p_move_mode==MOVE_LOCAL_WITH_ROT
- if (Node2D *node_2d = canvas_item->cast_to<Node2D>()) {
+ if (Node2D *node_2d = Object::cast_to<Node2D>(canvas_item)) {
if (p_move_mode == MOVE_LOCAL_WITH_ROT) {
Transform2D m;
@@ -628,7 +589,7 @@ void CanvasItemEditor::_key_move(const Vector2 &p_dir, bool p_snap, KeyMoveMODE
}
node_2d->set_position(node_2d->get_position() + drag);
- } else if (Control *control = canvas_item->cast_to<Control>()) {
+ } else if (Control *control = Object::cast_to<Control>(canvas_item)) {
control->set_position(control->get_position() + drag);
}
@@ -648,7 +609,7 @@ Point2 CanvasItemEditor::_find_topleftmost_point() {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
@@ -673,7 +634,7 @@ int CanvasItemEditor::get_item_count() {
int ic = 0;
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
@@ -694,7 +655,7 @@ CanvasItem *CanvasItemEditor::get_single_item() {
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
@@ -822,7 +783,7 @@ CanvasItemEditor::DragType CanvasItemEditor::_get_anchor_handle_drag_type(const
CanvasItem *canvas_item = get_single_item();
ERR_FAIL_COND_V(!canvas_item, DRAG_NONE);
- Control *control = canvas_item->cast_to<Control>();
+ Control *control = Object::cast_to<Control>(canvas_item);
ERR_FAIL_COND_V(!control, DRAG_NONE);
Vector2 anchor_pos[4];
@@ -865,7 +826,7 @@ void CanvasItemEditor::_prepare_drag(const Point2 &p_click_pos) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
@@ -876,15 +837,15 @@ void CanvasItemEditor::_prepare_drag(const Point2 &p_click_pos) {
continue;
se->undo_state = canvas_item->edit_get_state();
- if (canvas_item->cast_to<Node2D>())
- se->undo_pivot = canvas_item->cast_to<Node2D>()->edit_get_pivot();
- if (canvas_item->cast_to<Control>())
- se->undo_pivot = canvas_item->cast_to<Control>()->get_pivot_offset();
+ if (Object::cast_to<Node2D>(canvas_item))
+ se->undo_pivot = Object::cast_to<Node2D>(canvas_item)->edit_get_pivot();
+ if (Object::cast_to<Control>(canvas_item))
+ se->undo_pivot = Object::cast_to<Control>(canvas_item)->get_pivot_offset();
}
- if (selection.size() == 1 && selection[0]->cast_to<Node2D>()) {
+ if (selection.size() == 1 && Object::cast_to<Node2D>(selection[0])) {
drag = DRAG_NODE_2D;
- drag_point_from = selection[0]->cast_to<Node2D>()->get_global_position();
+ drag_point_from = Object::cast_to<Node2D>(selection[0])->get_global_position();
} else {
drag = DRAG_ALL;
drag_point_from = _find_topleftmost_point();
@@ -993,11 +954,6 @@ void CanvasItemEditor::_selection_menu_hide() {
selection_menu->set_size(Vector2(0, 0));
}
-bool CanvasItemEditor::get_remove_list(List<Node *> *p_list) {
-
- return false; //!p_list->empty();
-}
-
void CanvasItemEditor::_list_select(const Ref<InputEventMouseButton> &b) {
Point2 click = b->get_position();
@@ -1169,7 +1125,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
List<Node *> &selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
@@ -1180,10 +1136,10 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
continue;
canvas_item->edit_set_state(se->undo_state);
- if (canvas_item->cast_to<Node2D>())
- canvas_item->cast_to<Node2D>()->edit_set_pivot(se->undo_pivot);
- if (canvas_item->cast_to<Control>())
- canvas_item->cast_to<Control>()->set_pivot_offset(se->undo_pivot);
+ if (Object::cast_to<Node2D>(canvas_item))
+ Object::cast_to<Node2D>(canvas_item)->edit_set_pivot(se->undo_pivot);
+ if (Object::cast_to<Control>(canvas_item))
+ Object::cast_to<Control>(canvas_item)->set_pivot_offset(se->undo_pivot);
}
}
@@ -1251,7 +1207,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
@@ -1265,13 +1221,13 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
undo_redo->add_do_method(canvas_item, "edit_set_state", state);
undo_redo->add_undo_method(canvas_item, "edit_set_state", se->undo_state);
{
- Node2D *pvt = canvas_item->cast_to<Node2D>();
+ Node2D *pvt = Object::cast_to<Node2D>(canvas_item);
if (pvt && pvt->edit_has_pivot()) {
undo_redo->add_do_method(canvas_item, "edit_set_pivot", pvt->edit_get_pivot());
undo_redo->add_undo_method(canvas_item, "edit_set_pivot", se->undo_pivot);
}
- Control *cnt = canvas_item->cast_to<Control>();
+ Control *cnt = Object::cast_to<Control>(canvas_item);
if (cnt) {
undo_redo->add_do_method(canvas_item, "set_pivot_offset", cnt->get_pivot_offset());
undo_redo->add_undo_method(canvas_item, "set_pivot_offset", se->undo_pivot);
@@ -1341,10 +1297,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
}
if (Cbone) {
- Node2D *b = NULL;
- Object *obj = ObjectDB::get_instance(Cbone->get().bone);
- if (obj)
- b = obj->cast_to<Node2D>();
+ Node2D *b = Object::cast_to<Node2D>(ObjectDB::get_instance(Cbone->get().bone));
if (b) {
@@ -1359,7 +1312,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
break;
float len = pi->get_global_transform().get_origin().distance_to(b->get_global_position());
- b = pi->cast_to<Node2D>();
+ b = Object::cast_to<Node2D>(pi);
if (!b)
break;
@@ -1405,10 +1358,10 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
drag = DRAG_ROTATE;
drag_from = transform.affine_inverse().xform(click);
se->undo_state = canvas_item->edit_get_state();
- if (canvas_item->cast_to<Node2D>())
- se->undo_pivot = canvas_item->cast_to<Node2D>()->edit_get_pivot();
- if (canvas_item->cast_to<Control>())
- se->undo_pivot = canvas_item->cast_to<Control>()->get_pivot_offset();
+ if (Object::cast_to<Node2D>(canvas_item))
+ se->undo_pivot = Object::cast_to<Node2D>(canvas_item)->edit_get_pivot();
+ if (Object::cast_to<Control>(canvas_item))
+ se->undo_pivot = Object::cast_to<Control>(canvas_item)->get_pivot_offset();
return;
}
@@ -1426,15 +1379,15 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
if (drag != DRAG_NONE) {
drag_from = transform.affine_inverse().xform(click);
se->undo_state = canvas_item->edit_get_state();
- if (canvas_item->cast_to<Node2D>())
- se->undo_pivot = canvas_item->cast_to<Node2D>()->edit_get_pivot();
- if (canvas_item->cast_to<Control>())
- se->undo_pivot = canvas_item->cast_to<Control>()->get_pivot_offset();
+ if (Object::cast_to<Node2D>(canvas_item))
+ se->undo_pivot = Object::cast_to<Node2D>(canvas_item)->edit_get_pivot();
+ if (Object::cast_to<Control>(canvas_item))
+ se->undo_pivot = Object::cast_to<Control>(canvas_item)->get_pivot_offset();
return;
}
// Drag anchor handles
- if (canvas_item->cast_to<Control>()) {
+ if (Object::cast_to<Control>(canvas_item)) {
drag = _get_anchor_handle_drag_type(click, drag_point_from);
if (drag != DRAG_NONE) {
drag_from = transform.affine_inverse().xform(click);
@@ -1457,9 +1410,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
CanvasItem *c = NULL;
if (Cbone) {
- Object *obj = ObjectDB::get_instance(Cbone->get().bone);
- if (obj)
- c = obj->cast_to<CanvasItem>();
+ c = Object::cast_to<CanvasItem>(ObjectDB::get_instance(Cbone->get().bone));
if (c)
c = c->get_parent_item();
}
@@ -1489,7 +1440,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
};
if (n) {
- c = n->cast_to<CanvasItem>();
+ c = Object::cast_to<CanvasItem>(n);
} else {
c = NULL;
}
@@ -1537,7 +1488,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
List<Node *> &selection = editor_selection->get_selected_node_list();
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
@@ -1551,10 +1502,10 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
if (!dragging_bone) {
canvas_item->edit_set_state(se->undo_state); //reset state and reapply
- if (canvas_item->cast_to<Node2D>())
- canvas_item->cast_to<Node2D>()->edit_set_pivot(se->undo_pivot);
- if (canvas_item->cast_to<Control>())
- canvas_item->cast_to<Control>()->set_pivot_offset(se->undo_pivot);
+ if (Object::cast_to<Node2D>(canvas_item))
+ Object::cast_to<Node2D>(canvas_item)->edit_set_pivot(se->undo_pivot);
+ if (Object::cast_to<Control>(canvas_item))
+ Object::cast_to<Control>(canvas_item)->set_pivot_offset(se->undo_pivot);
}
Vector2 dfrom = drag_from;
@@ -1566,7 +1517,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
// Rotate the node
Vector2 center = canvas_item->get_global_transform_with_canvas().get_origin();
{
- Node2D *node = canvas_item->cast_to<Node2D>();
+ Node2D *node = Object::cast_to<Node2D>(canvas_item);
if (node) {
real_t angle = node->get_rotation();
@@ -1578,7 +1529,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
}
{
- Control *node = canvas_item->cast_to<Control>();
+ Control *node = Object::cast_to<Control>(canvas_item);
if (node) {
real_t angle = node->get_rotation();
@@ -1592,7 +1543,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
continue;
}
- Control *control = canvas_item->cast_to<Control>();
+ Control *control = Object::cast_to<Control>(canvas_item);
if (control) {
// Drag and snap the anchor
Vector2 anchor = _position_to_anchor(control, canvas_item->get_global_transform_with_canvas().affine_inverse().xform(dto - drag_from + drag_point_from));
@@ -1728,19 +1679,19 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
case DRAG_PIVOT:
- if (canvas_item->cast_to<Node2D>()) {
- Node2D *n2d = canvas_item->cast_to<Node2D>();
+ if (Object::cast_to<Node2D>(canvas_item)) {
+ Node2D *n2d = Object::cast_to<Node2D>(canvas_item);
n2d->edit_set_pivot(se->undo_pivot + drag_vector);
}
- if (canvas_item->cast_to<Control>()) {
- canvas_item->cast_to<Control>()->set_pivot_offset(se->undo_pivot + drag_vector);
+ if (Object::cast_to<Control>(canvas_item)) {
+ Object::cast_to<Control>(canvas_item)->set_pivot_offset(se->undo_pivot + drag_vector);
}
continue;
break;
case DRAG_NODE_2D:
- ERR_FAIL_COND(!canvas_item->cast_to<Node2D>());
- canvas_item->cast_to<Node2D>()->set_global_position(dto);
+ ERR_FAIL_COND(!Object::cast_to<Node2D>(canvas_item));
+ Object::cast_to<Node2D>(canvas_item)->set_global_position(dto);
continue;
break;
}
@@ -1754,7 +1705,7 @@ void CanvasItemEditor::_viewport_gui_input(const Ref<InputEvent> &p_event) {
} else {
//ok, all that had to be done was done, now solve IK
- Node2D *n2d = canvas_item->cast_to<Node2D>();
+ Node2D *n2d = Object::cast_to<Node2D>(canvas_item);
Transform2D final_xform = bone_orig_xform;
if (n2d) {
@@ -1930,7 +1881,7 @@ void CanvasItemEditor::_viewport_draw() {
if (snap_show_grid) {
//Draw the grid
Size2 s = viewport->get_size();
- int last_cell;
+ int last_cell = 0;
Transform2D xform = transform.affine_inverse();
Vector2 grid_offset;
@@ -1981,7 +1932,7 @@ void CanvasItemEditor::_viewport_draw() {
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
@@ -2013,16 +1964,16 @@ void CanvasItemEditor::_viewport_draw() {
if (single && (tool == TOOL_SELECT || tool == TOOL_MOVE || tool == TOOL_ROTATE || tool == TOOL_EDIT_PIVOT)) { //kind of sucks
- if (canvas_item->cast_to<Node2D>()) {
+ if (Object::cast_to<Node2D>(canvas_item)) {
- if (canvas_item->cast_to<Node2D>()->edit_has_pivot()) {
+ if (Object::cast_to<Node2D>(canvas_item)->edit_has_pivot()) {
viewport->draw_texture(pivot, xform.get_origin() + (-pivot->get_size() / 2).floor());
can_move_pivot = true;
pivot_found = true;
}
}
- Control *control = canvas_item->cast_to<Control>();
+ Control *control = Object::cast_to<Control>(canvas_item);
if (control) {
Vector2 pivot_ofs = control->get_pivot_offset();
if (pivot_ofs != Vector2()) {
@@ -2214,11 +2165,7 @@ void CanvasItemEditor::_viewport_draw() {
E->get().from = Vector2();
E->get().to = Vector2();
- Object *obj = ObjectDB::get_instance(E->get().bone);
- if (!obj)
- continue;
-
- Node2D *n2d = obj->cast_to<Node2D>();
+ Node2D *n2d = Object::cast_to<Node2D>(ObjectDB::get_instance(E->get().bone));
if (!n2d)
continue;
@@ -2227,7 +2174,7 @@ void CanvasItemEditor::_viewport_draw() {
CanvasItem *pi = n2d->get_parent_item();
- Node2D *pn2d = n2d->get_parent()->cast_to<Node2D>();
+ Node2D *pn2d = Object::cast_to<Node2D>(n2d->get_parent());
if (!pn2d)
continue;
@@ -2283,14 +2230,14 @@ void CanvasItemEditor::_notification(int p_what) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
continue;
- if (canvas_item->cast_to<Control>())
+ if (Object::cast_to<Control>(canvas_item))
has_control = true;
else
all_control = false;
@@ -2304,23 +2251,23 @@ void CanvasItemEditor::_notification(int p_what) {
float anchors[4];
Vector2 pivot;
- if (canvas_item->cast_to<Control>()) {
- pivot = canvas_item->cast_to<Control>()->get_pivot_offset();
- anchors[MARGIN_LEFT] = canvas_item->cast_to<Control>()->get_anchor(MARGIN_LEFT);
- anchors[MARGIN_RIGHT] = canvas_item->cast_to<Control>()->get_anchor(MARGIN_RIGHT);
- anchors[MARGIN_TOP] = canvas_item->cast_to<Control>()->get_anchor(MARGIN_TOP);
- anchors[MARGIN_BOTTOM] = canvas_item->cast_to<Control>()->get_anchor(MARGIN_BOTTOM);
- }
-
- if (r != se->prev_rect || xform != se->prev_xform || pivot != se->prev_pivot || anchors[MARGIN_LEFT] != se->prev_anchors[MARGIN_LEFT] || anchors[MARGIN_RIGHT] != se->prev_anchors[MARGIN_RIGHT] || anchors[MARGIN_TOP] != se->prev_anchors[MARGIN_TOP] || anchors[MARGIN_BOTTOM] != se->prev_anchors[MARGIN_BOTTOM]) {
- viewport->update();
- se->prev_rect = r;
- se->prev_xform = xform;
- se->prev_pivot = pivot;
- se->prev_anchors[MARGIN_LEFT] = anchors[MARGIN_LEFT];
- se->prev_anchors[MARGIN_RIGHT] = anchors[MARGIN_RIGHT];
- se->prev_anchors[MARGIN_TOP] = anchors[MARGIN_TOP];
- se->prev_anchors[MARGIN_BOTTOM] = anchors[MARGIN_BOTTOM];
+ if (Object::cast_to<Control>(canvas_item)) {
+ pivot = Object::cast_to<Control>(canvas_item)->get_pivot_offset();
+ anchors[MARGIN_LEFT] = Object::cast_to<Control>(canvas_item)->get_anchor(MARGIN_LEFT);
+ anchors[MARGIN_RIGHT] = Object::cast_to<Control>(canvas_item)->get_anchor(MARGIN_RIGHT);
+ anchors[MARGIN_TOP] = Object::cast_to<Control>(canvas_item)->get_anchor(MARGIN_TOP);
+ anchors[MARGIN_BOTTOM] = Object::cast_to<Control>(canvas_item)->get_anchor(MARGIN_BOTTOM);
+
+ if (r != se->prev_rect || xform != se->prev_xform || pivot != se->prev_pivot || anchors[MARGIN_LEFT] != se->prev_anchors[MARGIN_LEFT] || anchors[MARGIN_RIGHT] != se->prev_anchors[MARGIN_RIGHT] || anchors[MARGIN_TOP] != se->prev_anchors[MARGIN_TOP] || anchors[MARGIN_BOTTOM] != se->prev_anchors[MARGIN_BOTTOM]) {
+ viewport->update();
+ se->prev_rect = r;
+ se->prev_xform = xform;
+ se->prev_pivot = pivot;
+ se->prev_anchors[MARGIN_LEFT] = anchors[MARGIN_LEFT];
+ se->prev_anchors[MARGIN_RIGHT] = anchors[MARGIN_RIGHT];
+ se->prev_anchors[MARGIN_TOP] = anchors[MARGIN_TOP];
+ se->prev_anchors[MARGIN_BOTTOM] = anchors[MARGIN_BOTTOM];
+ }
}
}
@@ -2338,7 +2285,7 @@ void CanvasItemEditor::_notification(int p_what) {
break;
}
- Node2D *b2 = b->cast_to<Node2D>();
+ Node2D *b2 = Object::cast_to<Node2D>(b);
if (!b2) {
continue;
}
@@ -2373,7 +2320,6 @@ void CanvasItemEditor::_notification(int p_what) {
ungroup_button->set_icon(get_icon("Ungroup", "EditorIcons"));
key_insert_button->set_icon(get_icon("Key", "EditorIcons"));
- //anchor_menu->add_icon_override("Align Top Left");
anchor_menu->set_icon(get_icon("Anchor", "EditorIcons"));
PopupMenu *p = anchor_menu->get_popup();
@@ -2400,14 +2346,48 @@ void CanvasItemEditor::_notification(int p_what) {
AnimationPlayerEditor::singleton->get_key_editor()->connect("visibility_changed", this, "_keying_changed");
_keying_changed();
- }
+ } else if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
- if (p_what == NOTIFICATION_READY) {
+ select_sb->set_texture(get_icon("EditorRect2D", "EditorIcons"));
- get_tree()->connect("node_removed", this, "_node_removed");
- }
+ select_button->set_icon(get_icon("ToolSelect", "EditorIcons"));
+ list_select_button->set_icon(get_icon("ListSelect", "EditorIcons"));
+ move_button->set_icon(get_icon("ToolMove", "EditorIcons"));
+ rotate_button->set_icon(get_icon("ToolRotate", "EditorIcons"));
+ pan_button->set_icon(get_icon("ToolPan", "EditorIcons"));
+ pivot_button->set_icon(get_icon("EditPivot", "EditorIcons"));
+ select_handle = get_icon("EditorHandle", "EditorIcons");
+ anchor_handle = get_icon("EditorControlAnchor", "EditorIcons");
+ lock_button->set_icon(get_icon("Lock", "EditorIcons"));
+ unlock_button->set_icon(get_icon("Unlock", "EditorIcons"));
+ group_button->set_icon(get_icon("Group", "EditorIcons"));
+ ungroup_button->set_icon(get_icon("Ungroup", "EditorIcons"));
+ key_insert_button->set_icon(get_icon("Key", "EditorIcons"));
+
+ anchor_menu->set_icon(get_icon("Anchor", "EditorIcons"));
+ PopupMenu *p = anchor_menu->get_popup();
+ p->clear();
- if (p_what == NOTIFICATION_DRAW) {
+ p->add_icon_item(get_icon("ControlAlignTopLeft", "EditorIcons"), "Top Left", ANCHOR_ALIGN_TOP_LEFT);
+ p->add_icon_item(get_icon("ControlAlignTopRight", "EditorIcons"), "Top Right", ANCHOR_ALIGN_TOP_RIGHT);
+ p->add_icon_item(get_icon("ControlAlignBottomRight", "EditorIcons"), "Bottom Right", ANCHOR_ALIGN_BOTTOM_RIGHT);
+ p->add_icon_item(get_icon("ControlAlignBottomLeft", "EditorIcons"), "Bottom Left", ANCHOR_ALIGN_BOTTOM_LEFT);
+ p->add_separator();
+ p->add_icon_item(get_icon("ControlAlignLeftCenter", "EditorIcons"), "Center Left", ANCHOR_ALIGN_CENTER_LEFT);
+ p->add_icon_item(get_icon("ControlAlignTopCenter", "EditorIcons"), "Center Top", ANCHOR_ALIGN_CENTER_TOP);
+ p->add_icon_item(get_icon("ControlAlignRightCenter", "EditorIcons"), "Center Right", ANCHOR_ALIGN_CENTER_RIGHT);
+ p->add_icon_item(get_icon("ControlAlignBottomCenter", "EditorIcons"), "Center Bottom", ANCHOR_ALIGN_CENTER_BOTTOM);
+ p->add_icon_item(get_icon("ControlAlignCenter", "EditorIcons"), "Center", ANCHOR_ALIGN_CENTER);
+ p->add_separator();
+ p->add_icon_item(get_icon("ControlAlignLeftWide", "EditorIcons"), "Left Wide", ANCHOR_ALIGN_LEFT_WIDE);
+ p->add_icon_item(get_icon("ControlAlignTopWide", "EditorIcons"), "Top Wide", ANCHOR_ALIGN_TOP_WIDE);
+ p->add_icon_item(get_icon("ControlAlignRightWide", "EditorIcons"), "Right Wide", ANCHOR_ALIGN_RIGHT_WIDE);
+ p->add_icon_item(get_icon("ControlAlignBottomWide", "EditorIcons"), "Bottom Wide", ANCHOR_ALIGN_BOTTOM_WIDE);
+ p->add_icon_item(get_icon("ControlVcenterWide", "EditorIcons"), "VCenter Wide ", ANCHOR_ALIGN_VCENTER_WIDE);
+ p->add_icon_item(get_icon("ControlHcenterWide", "EditorIcons"), "HCenter Wide ", ANCHOR_ALIGN_HCENTER_WIDE);
+ p->add_separator();
+ p->add_icon_item(get_icon("ControlAlignWide", "EditorIcons"), "Full Rect", ANCHOR_ALIGN_WIDE);
+ p->add_icon_item(get_icon("ControlAlignWide", "EditorIcons"), "Full Rect and Fit Parent", ANCHOR_ALIGN_WIDE_FIT);
}
}
@@ -2426,7 +2406,7 @@ void CanvasItemEditor::_find_canvas_items_span(Node *p_node, Rect2 &r_rect, cons
if (!p_node)
return;
- CanvasItem *c = p_node->cast_to<CanvasItem>();
+ CanvasItem *c = Object::cast_to<CanvasItem>(p_node);
for (int i = p_node->get_child_count() - 1; i >= 0; i--) {
@@ -2587,7 +2567,7 @@ void CanvasItemEditor::_set_anchors_preset(Control::LayoutPreset p_preset) {
undo_redo->create_action(TTR("Change Anchors"));
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Control *c = E->get()->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(E->get());
undo_redo->add_do_method(c, "set_anchors_preset", p_preset);
undo_redo->add_undo_method(c, "set_anchor", MARGIN_LEFT, c->get_anchor(MARGIN_LEFT));
@@ -2605,7 +2585,7 @@ void CanvasItemEditor::_set_full_rect() {
undo_redo->create_action(TTR("Change Anchors"));
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Control *c = E->get()->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(E->get());
undo_redo->add_do_method(c, "set_anchors_preset", PRESET_WIDE);
undo_redo->add_do_method(c, "set_margin", MARGIN_LEFT, 0);
@@ -2713,7 +2693,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
@@ -2731,7 +2711,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
@@ -2751,7 +2731,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
@@ -2769,7 +2749,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
@@ -2783,50 +2763,6 @@ void CanvasItemEditor::_popup_callback(int p_op) {
viewport->update();
} break;
-
- case ALIGN_VERTICAL: {
-#if 0
- if ( ref_item && canvas_items.size() > 1 ) {
- Vector2 ref_pos = ref_item->get_global_transform().elements[2];
- Rect2 ref_r = ref_item->get_item_rect();
- for ( CanvasItemMap::Element *E = canvas_items.front(); E; E = E->next() ) {
- CanvasItem *it_curr = E->key();
- if ( it_curr == ref_item ) continue;
- Vector2 v = it_curr->get_global_transform().elements[2];
- Rect2 r = it_curr->get_item_rect();
- r.pos.x = ( ref_pos.x + ref_r.size.x / 2 ) - ( v.x + r.size.x / 2 );
- it_curr->edit_set_rect( r );
- }
- viewport->update();
- }
-#endif
- } break;
-
- case ALIGN_HORIZONTAL: {
-#if 0
- if ( ref_item && canvas_items.size() > 1 ) {
- Vector2 ref_pos = ref_item->get_global_transform().elements[2];
- Rect2 ref_r = ref_item->get_item_rect();
- for ( CanvasItemMap::Element *E = canvas_items.front(); E; E = E->next() ) {
- CanvasItem *it_curr = E->key();
- if ( it_curr == ref_item ) continue;
- Vector2 v = it_curr->get_global_transform().elements[2];
- Rect2 r = it_curr->get_item_rect();
- r.pos.y = ( ref_pos.y + ref_r.size.y / 2 ) - ( v.y + r.size.y / 2 );
- it_curr->edit_set_rect( r );
- }
- viewport->update();
- }
-#endif
- } break;
-
- case SPACE_HORIZONTAL: {
- //space_selected_items< proj_vector2_x, compare_items_x >();
- } break;
-
- case SPACE_VERTICAL: {
- //space_selected_items< proj_vector2_y, compare_items_y >();
- } break;
case ANCHOR_ALIGN_TOP_LEFT: {
_set_anchors_preset(PRESET_TOP_LEFT);
} break;
@@ -2888,15 +2824,15 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
continue;
- if (canvas_item->cast_to<Node2D>()) {
- Node2D *n2d = canvas_item->cast_to<Node2D>();
+ if (Object::cast_to<Node2D>(canvas_item)) {
+ Node2D *n2d = Object::cast_to<Node2D>(canvas_item);
if (key_pos)
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d, "position", n2d->get_position(), existing);
@@ -2909,7 +2845,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
//look for an IK chain
List<Node2D *> ik_chain;
- Node2D *n = n2d->get_parent_item()->cast_to<Node2D>();
+ Node2D *n = Object::cast_to<Node2D>(n2d->get_parent_item());
bool has_chain = false;
while (n) {
@@ -2922,7 +2858,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (!n->get_parent_item())
break;
- n = n->get_parent_item()->cast_to<Node2D>();
+ n = Object::cast_to<Node2D>(n->get_parent_item());
}
if (has_chain && ik_chain.size()) {
@@ -2939,9 +2875,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
}
}
- } else if (canvas_item->cast_to<Control>()) {
+ } else if (Object::cast_to<Control>(canvas_item)) {
- Control *ctrl = canvas_item->cast_to<Control>();
+ Control *ctrl = Object::cast_to<Control>(canvas_item);
if (key_pos)
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl, "rect_position", ctrl->get_position(), existing);
@@ -2998,16 +2934,16 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
continue;
- if (canvas_item->cast_to<Node2D>()) {
+ if (Object::cast_to<Node2D>(canvas_item)) {
- Node2D *n2d = canvas_item->cast_to<Node2D>();
+ Node2D *n2d = Object::cast_to<Node2D>(canvas_item);
PoseClipboard pc;
pc.pos = n2d->get_position();
pc.rot = n2d->get_rotation();
@@ -3026,10 +2962,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
undo_redo->create_action(TTR("Paste Pose"));
for (List<PoseClipboard>::Element *E = pose_clipboard.front(); E; E = E->next()) {
- Object *o = ObjectDB::get_instance(E->get().id);
- if (!o)
- continue;
- Node2D *n2d = o->cast_to<Node2D>();
+ Node2D *n2d = Object::cast_to<Node2D>(ObjectDB::get_instance(E->get().id));
if (!n2d)
continue;
undo_redo->add_do_method(n2d, "set_position", E->get().pos);
@@ -3048,15 +2981,15 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
continue;
- if (canvas_item->cast_to<Node2D>()) {
- Node2D *n2d = canvas_item->cast_to<Node2D>();
+ if (Object::cast_to<Node2D>(canvas_item)) {
+ Node2D *n2d = Object::cast_to<Node2D>(canvas_item);
if (key_pos)
n2d->set_position(Vector2());
@@ -3064,9 +2997,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
n2d->set_rotation(0);
if (key_scale)
n2d->set_scale(Vector2(1, 1));
- } else if (canvas_item->cast_to<Control>()) {
+ } else if (Object::cast_to<Control>(canvas_item)) {
- Control *ctrl = canvas_item->cast_to<Control>();
+ Control *ctrl = Object::cast_to<Control>(canvas_item);
if (key_pos)
ctrl->set_position(Point2());
@@ -3090,7 +3023,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
- Node2D *n2d = E->key()->cast_to<Node2D>();
+ Node2D *n2d = Object::cast_to<Node2D>(E->key());
if (!n2d)
continue;
if (!n2d->is_visible_in_tree())
@@ -3111,7 +3044,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
- Node2D *n2d = E->key()->cast_to<Node2D>();
+ Node2D *n2d = Object::cast_to<Node2D>(E->key());
if (!n2d)
continue;
if (!n2d->is_visible_in_tree())
@@ -3130,7 +3063,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->get()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
if (!canvas_item || !canvas_item->is_visible_in_tree())
continue;
@@ -3151,7 +3084,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *n2d = E->key()->cast_to<CanvasItem>();
+ CanvasItem *n2d = Object::cast_to<CanvasItem>(E->key());
if (!n2d)
continue;
if (!n2d->is_visible_in_tree())
@@ -3166,34 +3099,6 @@ void CanvasItemEditor::_popup_callback(int p_op) {
} break;
}
}
-#if 0
-template< class P, class C > void CanvasItemEditor::space_selected_items() {
- P p;
- if ( canvas_items.size() > 2 ) {
- Vector< CanvasItem * > items;
- for ( CanvasItemMap::Element *E = canvas_items.front(); E; E = E->next() ) {
- CanvasItem *it_curr = E->key();
- items.push_back( it_curr );
- }
- items.sort_custom< C >();
-
- float width_s = p.get( items[0]->get_item_rect().size );
- float width_e = p.get( items[ items.size() - 1 ]->get_item_rect().size );
- float start_x = p.get( items[0]->get_global_transform().elements[2] ) + ( width_s / 2 );
- float end_x = p.get( items[ items.size() - 1 ]->get_global_transform().elements[2] ) + ( width_e / 2 );
- float sp = ( end_x - start_x ) / ( items.size() - 1 );
-
- for ( int i = 0; i < items.size(); i++ ) {
- CanvasItem *it_curr = items[i];
- Vector2 v = it_curr->get_global_transform().elements[2];
- Rect2 r = it_curr->get_item_rect();
- p.set( r.pos, ( start_x + sp * i ) - ( p.get( v ) + p.get( r.size ) / 2 ) );
- it_curr->edit_set_rect( r );
- }
- viewport->update();
- }
-}
-#endif
void CanvasItemEditor::_focus_selection(int p_op) {
Vector2 center(0.f, 0.f);
@@ -3202,7 +3107,7 @@ void CanvasItemEditor::_focus_selection(int p_op) {
Map<Node *, Object *> &selection = editor_selection->get_selection();
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
- CanvasItem *canvas_item = E->key()->cast_to<CanvasItem>();
+ CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->key());
if (!canvas_item) continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
continue;
@@ -3250,10 +3155,8 @@ void CanvasItemEditor::_focus_selection(int p_op) {
void CanvasItemEditor::_bind_methods() {
- ClassDB::bind_method("_node_removed", &CanvasItemEditor::_node_removed);
ClassDB::bind_method("_update_scroll", &CanvasItemEditor::_update_scroll);
ClassDB::bind_method("_popup_callback", &CanvasItemEditor::_popup_callback);
- ClassDB::bind_method("_visibility_changed", &CanvasItemEditor::_visibility_changed);
ClassDB::bind_method("_dialog_value_changed", &CanvasItemEditor::_dialog_value_changed);
ClassDB::bind_method("_get_editor_data", &CanvasItemEditor::_get_editor_data);
ClassDB::bind_method("_tool_select", &CanvasItemEditor::_tool_select);
@@ -3269,74 +3172,6 @@ void CanvasItemEditor::_bind_methods() {
ADD_SIGNAL(MethodInfo("item_group_status_changed"));
}
-#if 0
-void CanvasItemEditor::end_drag() {
- print_line( "end drag" );
-
- if (undo_redo) {
-
- undo_redo->create_action("Edit CanvasItem");
- for(CanvasItemMap::Element *E=canvas_items.front();E;E=E->next()) {
- CanvasItem *canvas_item = E->key();
- Variant state=canvas_item->edit_get_state();
- undo_redo->add_do_method(canvas_item,"edit_set_state",state);
- undo_redo->add_undo_method(canvas_item,"edit_set_state",E->get().undo_state);
- }
- undo_redo->commit_action();
- }
-
- drag=DRAG_NONE;
- viewport->update();
-}
-
-void CanvasItemEditor::box_selection_start( Point2 &click ) {
- print_line( "box selection start" );
-
- drag_from=transform.affine_inverse().xform(click);
-
- box_selecting=true;
- box_selecting_to=drag_from;
- viewport->update();
-}
-
-bool CanvasItemEditor::box_selection_end() {
- print_line( "box selection end" );
-
- Node* scene = get_scene()->get_root_node()->cast_to<EditorNode>()->get_edited_scene();
- if (scene) {
-
- List<CanvasItem*> selitems;
-
- Point2 bsfrom = transform.xform(drag_from);
- Point2 bsto= transform.xform(box_selecting_to);
- if (bsfrom.x>bsto.x)
- SWAP(bsfrom.x,bsto.x);
- if (bsfrom.y>bsto.y)
- SWAP(bsfrom.y,bsto.y);
-
- if ( bsfrom.distance_to( bsto ) < 3 ) {
- print_line( "box selection too small" );
- box_selecting=false;
- viewport->update();
- return false;
- }
-
- _find_canvas_items_at_rect(Rect2(bsfrom,bsto-bsfrom),scene,transform,&selitems);
-
- for(List<CanvasItem*>::Element *E=selitems.front();E;E=E->next()) {
-
- _append_canvas_item(E->get());
- }
-
- }
-
- box_selecting=false;
- viewport->update();
-
- return true;
-}
-#endif
-
void CanvasItemEditor::add_control_to_menu_panel(Control *p_control) {
hb->add_child(p_control);
@@ -3507,12 +3342,6 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
skeleton_menu->set_hide_on_checkable_item_selection(false);
skeleton_menu->connect("id_pressed", this, "_popup_callback");
- /*
- p->add_item("Align Horizontal",ALIGN_HORIZONTAL);
- p->add_item("Align Vertical",ALIGN_VERTICAL);
- p->add_item("Space Horizontal",SPACE_HORIZONTAL);
- p->add_item("Space Vertical",SPACE_VERTICAL);*/
-
view_menu = memnew(MenuButton);
view_menu->set_text(TTR("View"));
hb->add_child(view_menu);
@@ -3651,7 +3480,7 @@ CanvasItemEditor *CanvasItemEditor::singleton = NULL;
void CanvasItemEditorPlugin::edit(Object *p_object) {
canvas_item_editor->set_undo_redo(&get_undo_redo());
- canvas_item_editor->edit(p_object->cast_to<CanvasItem>());
+ canvas_item_editor->edit(Object::cast_to<CanvasItem>(p_object));
}
bool CanvasItemEditorPlugin::handles(Object *p_object) const {
@@ -3704,7 +3533,7 @@ void CanvasItemEditorViewport::_on_mouse_exit() {
}
void CanvasItemEditorViewport::_on_select_type(Object *selected) {
- CheckBox *check = selected->cast_to<CheckBox>();
+ CheckBox *check = Object::cast_to<CheckBox>(selected);
String type = check->get_text();
selector_label->set_text(vformat(TTR("Add %s"), type));
label->set_text(vformat(TTR("Adding %s..."), type));
@@ -3714,7 +3543,7 @@ void CanvasItemEditorViewport::_on_change_type() {
if (!button_group->get_pressed_button())
return;
- CheckBox *check = button_group->get_pressed_button()->cast_to<CheckBox>();
+ CheckBox *check = Object::cast_to<CheckBox>(button_group->get_pressed_button());
default_type = check->get_text();
_perform_drop_data();
selector->hide();
@@ -3726,8 +3555,8 @@ void CanvasItemEditorViewport::_create_preview(const Vector<String> &files) cons
for (int i = 0; i < files.size(); i++) {
String path = files[i];
RES res = ResourceLoader::load(path);
- Ref<Texture> texture = Ref<Texture>(res->cast_to<Texture>());
- Ref<PackedScene> scene = Ref<PackedScene>(res->cast_to<PackedScene>());
+ Ref<Texture> texture = Ref<Texture>(Object::cast_to<Texture>(*res));
+ Ref<PackedScene> scene = Ref<PackedScene>(Object::cast_to<PackedScene>(*res));
if (texture != NULL || scene != NULL) {
if (texture != NULL) {
Sprite *sprite = memnew(Sprite);
@@ -3778,7 +3607,7 @@ bool CanvasItemEditorViewport::_cyclical_dependency_exists(const String &p_targe
void CanvasItemEditorViewport::_create_nodes(Node *parent, Node *child, String &path, const Point2 &p_point) {
child->set_name(path.get_file().get_basename());
- Ref<Texture> texture = Ref<Texture>(ResourceCache::get(path)->cast_to<Texture>());
+ Ref<Texture> texture = Ref<Texture>(Object::cast_to<Texture>(ResourceCache::get(path)));
Size2 texture_size = texture->get_size();
editor_data->get_undo_redo().add_do_method(parent, "add_child", child);
@@ -3867,11 +3696,11 @@ bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, cons
editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(editor->get_edited_scene()->get_path_to(parent)) + "/" + new_name));
Point2 pos;
- Node2D *parent_node2d = parent->cast_to<Node2D>();
+ Node2D *parent_node2d = Object::cast_to<Node2D>(parent);
if (parent_node2d) {
pos = parent_node2d->get_global_position();
} else {
- Control *parent_control = parent->cast_to<Control>();
+ Control *parent_control = Object::cast_to<Control>(parent);
if (parent_control) {
pos = parent_control->get_global_position();
}
@@ -3879,7 +3708,7 @@ bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, cons
Transform2D trans = canvas->get_canvas_transform();
Vector2 target_pos = (p_point - trans.get_origin()) / trans.get_scale().x - pos;
// in relative snapping it may be useful for the user to take the original node position into account
- Vector2 start_pos = instanced_scene->cast_to<Node2D>() ? instanced_scene->cast_to<Node2D>()->get_position() : target_pos;
+ Vector2 start_pos = Object::cast_to<Node2D>(instanced_scene) ? Object::cast_to<Node2D>(instanced_scene)->get_position() : target_pos;
target_pos = canvas->snap_point(target_pos, start_pos);
editor_data->get_undo_redo().add_do_method(instanced_scene, "set_position", target_pos);
@@ -3899,8 +3728,8 @@ void CanvasItemEditorViewport::_perform_drop_data() {
if (res.is_null()) {
continue;
}
- Ref<Texture> texture = Ref<Texture>(res->cast_to<Texture>());
- Ref<PackedScene> scene = Ref<PackedScene>(res->cast_to<PackedScene>());
+ Ref<Texture> texture = Ref<Texture>(Object::cast_to<Texture>(*res));
+ Ref<PackedScene> scene = Ref<PackedScene>(Object::cast_to<PackedScene>(*res));
if (texture != NULL) {
Node *child;
if (default_type == "Light2D")
@@ -4016,7 +3845,7 @@ void CanvasItemEditorViewport::drop_data(const Point2 &p_point, const Variant &p
button_group->get_buttons(&btn_list);
for (int i = 0; i < btn_list.size(); i++) {
- CheckBox *check = btn_list[i]->cast_to<CheckBox>();
+ CheckBox *check = Object::cast_to<CheckBox>(btn_list[i]);
check->set_pressed(check->get_text() == default_type);
}
selector_label->set_text(vformat(TTR("Add %s"), default_type));
@@ -4114,3 +3943,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
label_desc->hide();
editor->get_gui_base()->add_child(label_desc);
}
+
+CanvasItemEditorViewport::~CanvasItemEditorViewport() {
+ memdelete(preview);
+}
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index 9b027fda60..da217007ea 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -94,8 +94,6 @@ class CanvasItemEditor : public VBoxContainer {
UNLOCK_SELECTED,
GROUP_SELECTED,
UNGROUP_SELECTED,
- ALIGN_HORIZONTAL,
- ALIGN_VERTICAL,
ANCHOR_ALIGN_TOP_LEFT,
ANCHOR_ALIGN_TOP_RIGHT,
ANCHOR_ALIGN_BOTTOM_LEFT,
@@ -113,9 +111,6 @@ class CanvasItemEditor : public VBoxContainer {
ANCHOR_ALIGN_HCENTER_WIDE,
ANCHOR_ALIGN_WIDE,
ANCHOR_ALIGN_WIDE_FIT,
-
- SPACE_HORIZONTAL,
- SPACE_VERTICAL,
ANIM_INSERT_KEY,
ANIM_INSERT_KEY_EXISTING,
ANIM_INSERT_POS,
@@ -289,27 +284,14 @@ class CanvasItemEditor : public VBoxContainer {
bool updating_value_dialog;
Point2 display_rotate_from;
Point2 display_rotate_to;
-#if 0
- struct EditInfo {
-
- Variant undo_state;
- Matrix32 prev_xform;
- float prev_rot;
- Rect2 prev_rect;
- EditInfo() { prev_rot=0; }
- };
-
- typedef Map<CanvasItem*,EditInfo> CanvasItemMap;
- CanvasItemMap canvas_items;
-#endif
Ref<StyleBoxTexture> select_sb;
Ref<Texture> select_handle;
Ref<Texture> anchor_handle;
int handle_len;
bool _is_part_of_subscene(CanvasItem *p_item);
- void _find_canvas_items_at_pos(const Point2 &p_pos, Node *p_node, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform, Vector<_SelectResult> &r_items, unsigned int limit = 0);
+ void _find_canvas_items_at_pos(const Point2 &p_pos, Node *p_node, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform, Vector<_SelectResult> &r_items, int limit = 0);
void _find_canvas_items_at_rect(const Rect2 &p_rect, Node *p_node, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform, List<CanvasItem *> *r_items);
void _select_click_on_empty_area(Point2 p_click_pos, bool p_append, bool p_box_selection);
@@ -327,7 +309,6 @@ class CanvasItemEditor : public VBoxContainer {
void _add_canvas_item(CanvasItem *p_canvas_item);
void _remove_canvas_item(CanvasItem *p_canvas_item);
void _clear_canvas_items();
- void _visibility_changed(ObjectID p_canvas_item);
void _key_move(const Vector2 &p_dir, bool p_snap, KeyMoveMODE p_move_mode);
void _list_select(const Ref<InputEventMouseButton> &b);
@@ -384,7 +365,6 @@ class CanvasItemEditor : public VBoxContainer {
protected:
void _notification(int p_what);
- void _node_removed(Node *p_node);
static void _bind_methods();
void end_drag();
void box_selection_start(Point2 &click);
@@ -436,7 +416,6 @@ public:
Control *get_viewport_control() { return viewport; }
- bool get_remove_list(List<Node *> *p_list);
void set_undo_redo(UndoRedo *p_undo_redo) { undo_redo = p_undo_redo; }
void edit(CanvasItem *p_canvas_item);
@@ -458,7 +437,6 @@ public:
virtual void edit(Object *p_object);
virtual bool handles(Object *p_object) const;
virtual void make_visible(bool p_visible);
- virtual bool get_remove_list(List<Node *> *p_list) { return canvas_item_editor->get_remove_list(p_list); }
virtual Dictionary get_state() const;
virtual void set_state(const Dictionary &p_state);
@@ -512,6 +490,7 @@ public:
virtual void drop_data(const Point2 &p_point, const Variant &p_data);
CanvasItemEditorViewport(EditorNode *p_node, CanvasItemEditor *p_canvas);
+ ~CanvasItemEditorViewport();
};
#endif
diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/editor/plugins/collision_polygon_2d_editor_plugin.cpp
index 346c00df64..38f95d8278 100644
--- a/editor/plugins/collision_polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_2d_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -343,7 +343,11 @@ void CollisionPolygon2DEditor::edit(Node *p_collision_polygon) {
if (p_collision_polygon) {
- node = p_collision_polygon->cast_to<CollisionPolygon2D>();
+ node = Object::cast_to<CollisionPolygon2D>(p_collision_polygon);
+ //Enable the pencil tool if the polygon is empty
+ if (node->get_polygon().size() == 0) {
+ _menu_option(MODE_CREATE);
+ }
if (!canvas_item_editor->get_viewport_control()->is_connected("draw", this, "_canvas_draw"))
canvas_item_editor->get_viewport_control()->connect("draw", this, "_canvas_draw");
wip.clear();
@@ -384,18 +388,7 @@ CollisionPolygon2DEditor::CollisionPolygon2DEditor(EditorNode *p_editor) {
add_child(button_edit);
button_edit->connect("pressed", this, "_menu_option", varray(MODE_EDIT));
button_edit->set_toggle_mode(true);
- button_edit->set_tooltip("Edit existing polygon:\nLMB: Move Point.\nCtrl+LMB: Split Segment.\nRMB: Erase Point.");
-
-//add_constant_override("separation",0);
-
-#if 0
- options = memnew( MenuButton );
- add_child(options);
- options->set_area_as_parent_rect();
- options->set_text("Polygon");
- //options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
- options->get_popup()->connect("id_pressed", this,"_menu_option");
-#endif
+ button_edit->set_tooltip(TTR("Edit existing polygon:\nLMB: Move Point.\nCtrl+LMB: Split Segment.\nRMB: Erase Point."));
mode = MODE_EDIT;
wip_active = false;
@@ -403,7 +396,7 @@ CollisionPolygon2DEditor::CollisionPolygon2DEditor(EditorNode *p_editor) {
void CollisionPolygon2DEditorPlugin::edit(Object *p_object) {
- collision_polygon_editor->edit(p_object->cast_to<Node>());
+ collision_polygon_editor->edit(Object::cast_to<Node>(p_object));
}
bool CollisionPolygon2DEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.h b/editor/plugins/collision_polygon_2d_editor_plugin.h
index b2f32d8491..bc3c5a1659 100644
--- a/editor/plugins/collision_polygon_2d_editor_plugin.h
+++ b/editor/plugins/collision_polygon_2d_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/collision_polygon_editor_plugin.cpp b/editor/plugins/collision_polygon_editor_plugin.cpp
index 5b364ed2c1..24c4813771 100644
--- a/editor/plugins/collision_polygon_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -48,6 +48,9 @@ void CollisionPolygonEditor::_notification(int p_what) {
} break;
case NOTIFICATION_PROCESS: {
+ if (!node) {
+ return;
+ }
if (node->get_depth() != prev_depth) {
_polygon_draw();
@@ -464,7 +467,11 @@ void CollisionPolygonEditor::edit(Node *p_collision_polygon) {
if (p_collision_polygon) {
- node = p_collision_polygon->cast_to<CollisionPolygon>();
+ node = Object::cast_to<CollisionPolygon>(p_collision_polygon);
+ //Enable the pencil tool if the polygon is empty
+ if (node->get_polygon().size() == 0) {
+ _menu_option(MODE_CREATE);
+ }
wip.clear();
wip_active = false;
edited_point = -1;
@@ -507,17 +514,6 @@ CollisionPolygonEditor::CollisionPolygonEditor(EditorNode *p_editor) {
button_edit->connect("pressed", this, "_menu_option", varray(MODE_EDIT));
button_edit->set_toggle_mode(true);
-//add_constant_override("separation",0);
-
-#if 0
- options = memnew( MenuButton );
- add_child(options);
- options->set_area_as_parent_rect();
- options->set_text("Polygon");
- //options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
- options->get_popup()->connect("id_pressed", this,"_menu_option");
-#endif
-
mode = MODE_EDIT;
wip_active = false;
imgeom = memnew(ImmediateGeometry);
@@ -555,7 +551,7 @@ CollisionPolygonEditor::~CollisionPolygonEditor() {
void CollisionPolygonEditorPlugin::edit(Object *p_object) {
- collision_polygon_editor->edit(p_object->cast_to<Node>());
+ collision_polygon_editor->edit(Object::cast_to<Node>(p_object));
}
bool CollisionPolygonEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/collision_polygon_editor_plugin.h b/editor/plugins/collision_polygon_editor_plugin.h
index 9f8b52d7f2..0150d8a9d7 100644
--- a/editor/plugins/collision_polygon_editor_plugin.h
+++ b/editor/plugins/collision_polygon_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index fb2aa16383..3e6165e552 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -393,21 +393,21 @@ void CollisionShape2DEditor::_get_current_shape_type() {
return;
}
- if (s->cast_to<CapsuleShape2D>()) {
+ if (Object::cast_to<CapsuleShape2D>(*s)) {
shape_type = CAPSULE_SHAPE;
- } else if (s->cast_to<CircleShape2D>()) {
+ } else if (Object::cast_to<CircleShape2D>(*s)) {
shape_type = CIRCLE_SHAPE;
- } else if (s->cast_to<ConcavePolygonShape2D>()) {
+ } else if (Object::cast_to<ConcavePolygonShape2D>(*s)) {
shape_type = CONCAVE_POLYGON_SHAPE;
- } else if (s->cast_to<ConvexPolygonShape2D>()) {
+ } else if (Object::cast_to<ConvexPolygonShape2D>(*s)) {
shape_type = CONVEX_POLYGON_SHAPE;
- } else if (s->cast_to<LineShape2D>()) {
+ } else if (Object::cast_to<LineShape2D>(*s)) {
shape_type = LINE_SHAPE;
- } else if (s->cast_to<RayShape2D>()) {
+ } else if (Object::cast_to<RayShape2D>(*s)) {
shape_type = RAY_SHAPE;
- } else if (s->cast_to<RectangleShape2D>()) {
+ } else if (Object::cast_to<RectangleShape2D>(*s)) {
shape_type = RECTANGLE_SHAPE;
- } else if (s->cast_to<SegmentShape2D>()) {
+ } else if (Object::cast_to<SegmentShape2D>(*s)) {
shape_type = SEGMENT_SHAPE;
} else {
shape_type = -1;
@@ -530,7 +530,7 @@ void CollisionShape2DEditor::edit(Node *p_node) {
}
if (p_node) {
- node = p_node->cast_to<CollisionShape2D>();
+ node = Object::cast_to<CollisionShape2D>(p_node);
if (!canvas_item_editor->get_viewport_control()->is_connected("draw", this, "_canvas_draw"))
canvas_item_editor->get_viewport_control()->connect("draw", this, "_canvas_draw");
@@ -570,7 +570,7 @@ CollisionShape2DEditor::CollisionShape2DEditor(EditorNode *p_editor) {
void CollisionShape2DEditorPlugin::edit(Object *p_obj) {
- collision_shape_2d_editor->edit(p_obj->cast_to<Node>());
+ collision_shape_2d_editor->edit(Object::cast_to<Node>(p_obj));
}
bool CollisionShape2DEditorPlugin::handles(Object *p_obj) const {
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.h b/editor/plugins/collision_shape_2d_editor_plugin.h
index 09aefc65c0..ffa91952e0 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.h
+++ b/editor/plugins/collision_shape_2d_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/cube_grid_theme_editor_plugin.cpp b/editor/plugins/cube_grid_theme_editor_plugin.cpp
index 1fcd514b31..08b38c2ca2 100644
--- a/editor/plugins/cube_grid_theme_editor_plugin.cpp
+++ b/editor/plugins/cube_grid_theme_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -72,10 +72,10 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
Node *child = p_scene->get_child(i);
- if (!child->cast_to<MeshInstance>()) {
+ if (!Object::cast_to<MeshInstance>(child)) {
if (child->get_child_count() > 0) {
child = child->get_child(0);
- if (!child->cast_to<MeshInstance>()) {
+ if (!Object::cast_to<MeshInstance>(child)) {
continue;
}
@@ -83,7 +83,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
continue;
}
- MeshInstance *mi = child->cast_to<MeshInstance>();
+ MeshInstance *mi = Object::cast_to<MeshInstance>(child);
Ref<Mesh> mesh = mi->get_mesh();
if (mesh.is_null())
continue;
@@ -98,15 +98,15 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
p_library->set_item_mesh(id, mesh);
- Ref<Shape> collision;
+ Vector<MeshLibrary::ShapeData> collisions;
for (int j = 0; j < mi->get_child_count(); j++) {
Node *child2 = mi->get_child(j);
- if (!child2->cast_to<StaticBody>())
+ if (!Object::cast_to<StaticBody>(child2))
continue;
- StaticBody *sb = child2->cast_to<StaticBody>();
+ StaticBody *sb = Object::cast_to<StaticBody>(child2);
List<uint32_t> shapes;
sb->get_shape_owners(&shapes);
@@ -119,30 +119,25 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
for (int k = 0; k < sb->shape_owner_get_shape_count(E->get()); k++) {
- collision = sb->shape_owner_get_shape(E->get(), k);
+ Ref<Shape> collision = sb->shape_owner_get_shape(E->get(), k);
if (collision.is_valid())
- break;
- /* TileSet::ShapeData shape_data;
- shape_data.shape = shape;
- shape_data.shape_transform = shape_transform;
- shape_data.one_way_collision = one_way;
- collisions.push_back(shape_data);*/
+ continue;
+ MeshLibrary::ShapeData shape_data;
+ shape_data.shape = collision;
+ shape_data.local_transform = sb->shape_owner_get_transform(E->get());
+ collisions.push_back(shape_data);
}
- if (collision.is_valid())
- break;
}
}
- if (!collision.is_null()) {
+ p_library->set_item_shapes(id, collisions);
- p_library->set_item_shape(id, collision);
- }
Ref<NavigationMesh> navmesh;
for (int j = 0; j < mi->get_child_count(); j++) {
Node *child2 = mi->get_child(j);
- if (!child2->cast_to<NavigationMeshInstance>())
+ if (!Object::cast_to<NavigationMeshInstance>(child2))
continue;
- NavigationMeshInstance *sb = child2->cast_to<NavigationMeshInstance>();
+ NavigationMeshInstance *sb = Object::cast_to<NavigationMeshInstance>(child2);
navmesh = sb->get_navigation_mesh();
if (!navmesh.is_null())
break;
@@ -155,91 +150,17 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
//generate previews!
if (1) {
- Vector<int> ids = p_library->get_item_list();
- RID vp = VS::get_singleton()->viewport_create();
- int size = EditorSettings::get_singleton()->get("editors/grid_map/preview_size");
-
- RID scenario = VS::get_singleton()->scenario_create();
-
- RID viewport = VS::get_singleton()->viewport_create();
- VS::get_singleton()->viewport_set_update_mode(viewport, VS::VIEWPORT_UPDATE_ALWAYS);
- VS::get_singleton()->viewport_set_vflip(viewport, true);
- VS::get_singleton()->viewport_set_scenario(viewport, scenario);
- VS::get_singleton()->viewport_set_size(viewport, size, size);
- VS::get_singleton()->viewport_set_transparent_background(viewport, true);
- VS::get_singleton()->viewport_set_active(viewport, true);
- RID viewport_texture = VS::get_singleton()->viewport_get_texture(viewport);
-
- RID camera = VS::get_singleton()->camera_create();
- VS::get_singleton()->viewport_attach_camera(viewport, camera);
- VS::get_singleton()->camera_set_transform(camera, Transform(Basis(), Vector3(0, 0, 3)));
- //VS::get_singleton()->camera_set_perspective(camera,45,0.1,10);
- VS::get_singleton()->camera_set_orthogonal(camera, 1.0, 0.01, 1000.0);
-
- RID light = VS::get_singleton()->light_create(VS::LIGHT_DIRECTIONAL);
- RID light_instance = VS::get_singleton()->instance_create2(light, scenario);
- VS::get_singleton()->instance_set_transform(light_instance, Transform().looking_at(Vector3(-1, -1, -1), Vector3(0, 1, 0)));
-
- RID light2 = VS::get_singleton()->light_create(VS::LIGHT_DIRECTIONAL);
- VS::get_singleton()->light_set_color(light2, Color(0.7, 0.7, 0.7));
- //VS::get_singleton()->light_set_color(light2, VS::LIGHT_COLOR_SPECULAR, Color(0.0, 0.0, 0.0));
- RID light_instance2 = VS::get_singleton()->instance_create2(light2, scenario);
-
- VS::get_singleton()->instance_set_transform(light_instance2, Transform().looking_at(Vector3(0, 1, 0), Vector3(0, 0, 1)));
-
- //sphere = VS::get_singleton()->mesh_create();
- RID mesh_instance = VS::get_singleton()->instance_create();
- VS::get_singleton()->instance_set_scenario(mesh_instance, scenario);
-
- EditorProgress ep("mlib", TTR("Creating Mesh Library"), ids.size());
+ Vector<Ref<Mesh> > meshes;
+ Vector<int> ids = p_library->get_item_list();
for (int i = 0; i < ids.size(); i++) {
-
- int id = ids[i];
- Ref<Mesh> mesh = p_library->get_item_mesh(id);
- if (!mesh.is_valid())
- continue;
- Rect3 aabb = mesh->get_aabb();
- print_line("aabb: " + aabb);
- Vector3 ofs = aabb.position + aabb.size * 0.5;
- aabb.position -= ofs;
- Transform xform;
- xform.basis = Basis().rotated(Vector3(0, 1, 0), -Math_PI * 0.25);
- xform.basis = Basis().rotated(Vector3(1, 0, 0), Math_PI * 0.25) * xform.basis;
- Rect3 rot_aabb = xform.xform(aabb);
- print_line("rot_aabb: " + rot_aabb);
- float m = MAX(rot_aabb.size.x, rot_aabb.size.y) * 0.5;
- if (m == 0)
- continue;
- m = 1.0 / m;
- m *= 0.5;
- print_line("scale: " + rtos(m));
- xform.basis.scale(Vector3(m, m, m));
- xform.origin = -xform.basis.xform(ofs); //-ofs*m;
- xform.origin.z -= rot_aabb.size.z * 2;
- RID inst = VS::get_singleton()->instance_create2(mesh->get_rid(), scenario);
- VS::get_singleton()->instance_set_transform(inst, xform);
- ep.step(TTR("Thumbnail.."), i);
- Main::iteration();
- Main::iteration();
- Ref<Image> img = VS::get_singleton()->texture_get_data(viewport_texture);
- ERR_CONTINUE(!img.is_valid() || img->empty());
- Ref<ImageTexture> it(memnew(ImageTexture));
- it->create_from_image(img);
- p_library->set_item_preview(id, it);
-
- //print_line("loaded image, size: "+rtos(m)+" dist: "+rtos(dist)+" empty?"+itos(img.empty())+" w: "+itos(it->get_width())+" h: "+itos(it->get_height()));
- VS::get_singleton()->free(inst);
+ meshes.push_back(p_library->get_item_mesh(ids[i]));
}
- VS::get_singleton()->free(mesh_instance);
- VS::get_singleton()->free(viewport);
- VS::get_singleton()->free(light);
- VS::get_singleton()->free(light_instance);
- VS::get_singleton()->free(light2);
- VS::get_singleton()->free(light_instance2);
- VS::get_singleton()->free(camera);
- VS::get_singleton()->free(scenario);
+ Vector<Ref<Texture> > textures = EditorInterface::get_singleton()->make_mesh_previews(meshes, EditorSettings::get_singleton()->get("editors/grid_map/preview_size"));
+ for (int i = 0; i < ids.size(); i++) {
+ p_library->set_item_preview(ids[i], textures[i]);
+ }
}
}
@@ -341,8 +262,8 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
void MeshLibraryEditorPlugin::edit(Object *p_node) {
- if (p_node && p_node->cast_to<MeshLibrary>()) {
- theme_editor->edit(p_node->cast_to<MeshLibrary>());
+ if (Object::cast_to<MeshLibrary>(p_node)) {
+ theme_editor->edit(Object::cast_to<MeshLibrary>(p_node));
theme_editor->show();
} else
theme_editor->hide();
diff --git a/editor/plugins/cube_grid_theme_editor_plugin.h b/editor/plugins/cube_grid_theme_editor_plugin.h
index 6fe5fc4235..b5fa18a4ad 100644
--- a/editor/plugins/cube_grid_theme_editor_plugin.h
+++ b/editor/plugins/cube_grid_theme_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index 2d05c8eba1..615cf85aa4 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -775,7 +775,7 @@ CurveEditorPlugin::CurveEditorPlugin(EditorNode *p_node) {
_toggle_button = _editor_node->add_bottom_panel_item(get_name(), _view);
_toggle_button->hide();
- get_resource_previewer()->add_preview_generator(memnew(CurvePreviewGenerator));
+ get_editor_interface()->get_resource_previewer()->add_preview_generator(memnew(CurvePreviewGenerator));
}
CurveEditorPlugin::~CurveEditorPlugin() {
@@ -786,24 +786,24 @@ void CurveEditorPlugin::edit(Object *p_object) {
Ref<Curve> curve_ref;
if (_current_ref.is_valid()) {
- CurveTexture *ct = _current_ref->cast_to<CurveTexture>();
+ CurveTexture *ct = Object::cast_to<CurveTexture>(*_current_ref);
if (ct)
ct->disconnect(CoreStringNames::get_singleton()->changed, this, "_curve_texture_changed");
}
if (p_object) {
- Resource *res = p_object->cast_to<Resource>();
+ Resource *res = Object::cast_to<Resource>(p_object);
ERR_FAIL_COND(res == NULL);
ERR_FAIL_COND(!handles(p_object));
- _current_ref = Ref<Resource>(p_object->cast_to<Resource>());
+ _current_ref = Ref<Resource>(Object::cast_to<Resource>(p_object));
if (_current_ref.is_valid()) {
- Curve *curve = _current_ref->cast_to<Curve>();
+ Curve *curve = Object::cast_to<Curve>(*_current_ref);
if (curve)
curve_ref = Ref<Curve>(curve);
else {
- CurveTexture *ct = _current_ref->cast_to<CurveTexture>();
+ CurveTexture *ct = Object::cast_to<CurveTexture>(*_current_ref);
if (ct) {
ct->connect(CoreStringNames::get_singleton()->changed, this, "_curve_texture_changed");
curve_ref = ct->get_curve();
@@ -820,7 +820,7 @@ void CurveEditorPlugin::edit(Object *p_object) {
bool CurveEditorPlugin::handles(Object *p_object) const {
// Both handled so that we can keep the curve editor open
- return p_object->cast_to<Curve>() || p_object->cast_to<CurveTexture>();
+ return Object::cast_to<Curve>(p_object) || Object::cast_to<CurveTexture>(p_object);
}
void CurveEditorPlugin::make_visible(bool p_visible) {
@@ -837,7 +837,7 @@ void CurveEditorPlugin::make_visible(bool p_visible) {
void CurveEditorPlugin::_curve_texture_changed() {
// If the curve is shown indirectly as a CurveTexture is edited,
// we need to monitor when the curve property gets assigned
- CurveTexture *ct = _current_ref->cast_to<CurveTexture>();
+ CurveTexture *ct = Object::cast_to<CurveTexture>(*_current_ref);
if (ct) {
_view->set_curve(ct->get_curve());
}
diff --git a/editor/plugins/curve_editor_plugin.h b/editor/plugins/curve_editor_plugin.h
index 040c298a92..2df9d05533 100644
--- a/editor/plugins/curve_editor_plugin.h
+++ b/editor/plugins/curve_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index ce6eefd694..c48a241e4d 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -29,14 +29,13 @@
/*************************************************************************/
#include "editor_preview_plugins.h"
+#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "io/file_access_memory.h"
#include "io/resource_loader.h"
#include "os/os.h"
-#include "scene/resources/material.h"
-//#include "scene/resources/sample.h"
-#include "editor/editor_scale.h"
#include "scene/resources/bit_mask.h"
+#include "scene/resources/material.h"
#include "scene/resources/mesh.h"
bool EditorTexturePreviewPlugin::handles(const String &p_type) const {
@@ -239,7 +238,6 @@ Ref<Texture> EditorMaterialPreviewPlugin::generate(const RES &p_from) {
VS::get_singleton()->mesh_surface_set_material(sphere, 0, material->get_rid());
VS::get_singleton()->viewport_set_update_mode(viewport, VS::VIEWPORT_UPDATE_ONCE); //once used for capture
- //print_line("queue capture!");
preview_done = false;
VS::get_singleton()->request_frame_drawn_callback(this, "_preview_done", Variant());
@@ -454,9 +452,7 @@ Ref<Texture> EditorScriptPreviewPlugin::generate(const RES &p_from) {
while (_is_text_char(code[pos])) {
pos++;
}
- ///print_line("from "+itos(i)+" to "+itos(pos));
String word = code.substr(i, pos - i);
- //print_line("found word: "+word);
if (keywords.has(word))
in_keyword = true;
@@ -502,6 +498,8 @@ Ref<Texture> EditorScriptPreviewPlugin::generate(const RES &p_from) {
EditorScriptPreviewPlugin::EditorScriptPreviewPlugin() {
}
///////////////////////////////////////////////////////////////////
+
+// FIXME: Needs to be rewritten for AudioStream in Godot 3.0+
#if 0
bool EditorSamplePreviewPlugin::handles(const String& p_type) const {
@@ -766,10 +764,9 @@ Ref<Texture> EditorSamplePreviewPlugin::generate(const RES& p_from) {
}
EditorSamplePreviewPlugin::EditorSamplePreviewPlugin() {
-
-
}
#endif
+
///////////////////////////////////////////////////////////////////////////
void EditorMeshPreviewPlugin::_preview_done(const Variant &p_udata) {
@@ -788,14 +785,12 @@ bool EditorMeshPreviewPlugin::handles(const String &p_type) const {
Ref<Texture> EditorMeshPreviewPlugin::generate(const RES &p_from) {
- print_line("**Generating for mesh finally??");
Ref<Mesh> mesh = p_from;
ERR_FAIL_COND_V(mesh.is_null(), Ref<Texture>());
VS::get_singleton()->instance_set_base(mesh_instance, mesh->get_rid());
Rect3 aabb = mesh->get_aabb();
- print_line("mesh aabb: " + aabb);
Vector3 ofs = aabb.position + aabb.size * 0.5;
aabb.position -= ofs;
Transform xform;
@@ -807,14 +802,12 @@ Ref<Texture> EditorMeshPreviewPlugin::generate(const RES &p_from) {
return Ref<Texture>();
m = 1.0 / m;
m *= 0.5;
- //print_line("scale: "+rtos(m));
xform.basis.scale(Vector3(m, m, m));
xform.origin = -xform.basis.xform(ofs); //-ofs*m;
xform.origin.z -= rot_aabb.size.z * 2;
VS::get_singleton()->instance_set_transform(mesh_instance, xform);
VS::get_singleton()->viewport_set_update_mode(viewport, VS::VIEWPORT_UPDATE_ONCE); //once used for capture
- //print_line("queue capture!");
preview_done = false;
VS::get_singleton()->request_frame_drawn_callback(this, "_preview_done", Variant());
@@ -826,7 +819,6 @@ Ref<Texture> EditorMeshPreviewPlugin::generate(const RES &p_from) {
Ref<Image> img = VS::get_singleton()->VS::get_singleton()->texture_get_data(viewport_texture);
ERR_FAIL_COND_V(img.is_null(), Ref<ImageTexture>());
- print_line("captured! " + itos(img->get_width()) + "x" + itos(img->get_height()));
VS::get_singleton()->instance_set_base(mesh_instance, RID());
int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
diff --git a/editor/plugins/editor_preview_plugins.h b/editor/plugins/editor_preview_plugins.h
index 7e7d36eb1e..c422d5c686 100644
--- a/editor/plugins/editor_preview_plugins.h
+++ b/editor/plugins/editor_preview_plugins.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -97,6 +97,7 @@ public:
EditorScriptPreviewPlugin();
};
+// FIXME: Needs to be rewritten for AudioStream in Godot 3.0+
#if 0
class EditorSamplePreviewPlugin : public EditorResourcePreviewGenerator {
public:
@@ -106,8 +107,8 @@ public:
EditorSamplePreviewPlugin();
};
-
#endif
+
class EditorMeshPreviewPlugin : public EditorResourcePreviewGenerator {
GDCLASS(EditorMeshPreviewPlugin, EditorResourcePreviewGenerator)
diff --git a/editor/plugins/gi_probe_editor_plugin.cpp b/editor/plugins/gi_probe_editor_plugin.cpp
index a8f840a8b1..fcbf282758 100644
--- a/editor/plugins/gi_probe_editor_plugin.cpp
+++ b/editor/plugins/gi_probe_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -38,7 +38,7 @@ void GIProbeEditorPlugin::_bake() {
void GIProbeEditorPlugin::edit(Object *p_object) {
- GIProbe *s = p_object->cast_to<GIProbe>();
+ GIProbe *s = Object::cast_to<GIProbe>(p_object);
if (!s)
return;
diff --git a/editor/plugins/gi_probe_editor_plugin.h b/editor/plugins/gi_probe_editor_plugin.h
index e4151d4b8c..a1fecd2911 100644
--- a/editor/plugins/gi_probe_editor_plugin.h
+++ b/editor/plugins/gi_probe_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp
index 4aaa155cfd..51f00e5751 100644
--- a/editor/plugins/gradient_editor_plugin.cpp
+++ b/editor/plugins/gradient_editor_plugin.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* color_ramp_editor_plugin.cpp */
+/* gradient_editor_plugin.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -46,7 +46,7 @@ GradientEditorPlugin::GradientEditorPlugin(EditorNode *p_node) {
void GradientEditorPlugin::edit(Object *p_object) {
- Gradient *gradient = p_object->cast_to<Gradient>();
+ Gradient *gradient = Object::cast_to<Gradient>(p_object);
if (!gradient)
return;
gradient_ref = Ref<Gradient>(gradient);
diff --git a/editor/plugins/gradient_editor_plugin.h b/editor/plugins/gradient_editor_plugin.h
index 1acf5f7e57..ff7bf858c7 100644
--- a/editor/plugins/gradient_editor_plugin.h
+++ b/editor/plugins/gradient_editor_plugin.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* color_ramp_editor_plugin.h */
+/* gradient_editor_plugin.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp
index f567abc5b1..aeb6e5c302 100644
--- a/editor/plugins/item_list_editor_plugin.cpp
+++ b/editor/plugins/item_list_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -115,7 +115,7 @@ void ItemListPlugin::_get_property_list(List<PropertyInfo> *p_list) const {
void ItemListOptionButtonPlugin::set_object(Object *p_object) {
- ob = p_object->cast_to<OptionButton>();
+ ob = Object::cast_to<OptionButton>(p_object);
}
bool ItemListOptionButtonPlugin::handles(Object *p_object) const {
@@ -155,9 +155,9 @@ ItemListOptionButtonPlugin::ItemListOptionButtonPlugin() {
void ItemListPopupMenuPlugin::set_object(Object *p_object) {
if (p_object->is_class("MenuButton"))
- pp = p_object->cast_to<MenuButton>()->get_popup();
+ pp = Object::cast_to<MenuButton>(p_object)->get_popup();
else
- pp = p_object->cast_to<PopupMenu>();
+ pp = Object::cast_to<PopupMenu>(p_object);
}
bool ItemListPopupMenuPlugin::handles(Object *p_object) const {
@@ -196,7 +196,7 @@ ItemListPopupMenuPlugin::ItemListPopupMenuPlugin() {
void ItemListItemListPlugin::set_object(Object *p_object) {
- pp = p_object->cast_to<ItemList>();
+ pp = Object::cast_to<ItemList>(p_object);
}
bool ItemListItemListPlugin::handles(Object *p_object) const {
@@ -384,7 +384,7 @@ ItemListEditor::~ItemListEditor() {
void ItemListEditorPlugin::edit(Object *p_object) {
- item_list_editor->edit(p_object->cast_to<Node>());
+ item_list_editor->edit(Object::cast_to<Node>(p_object));
}
bool ItemListEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/item_list_editor_plugin.h b/editor/plugins/item_list_editor_plugin.h
index 3bfe2c88e0..808f308c0c 100644
--- a/editor/plugins/item_list_editor_plugin.h
+++ b/editor/plugins/item_list_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/light_occluder_2d_editor_plugin.cpp b/editor/plugins/light_occluder_2d_editor_plugin.cpp
index a7a20e71fe..e6b921c539 100644
--- a/editor/plugins/light_occluder_2d_editor_plugin.cpp
+++ b/editor/plugins/light_occluder_2d_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -106,7 +106,7 @@ bool LightOccluder2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (node->get_occluder_polygon().is_null()) {
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
- create_poly->set_text("No OccluderPolygon2D resource on this node.\nCreate and assign one?");
+ create_poly->set_text(TTR("No OccluderPolygon2D resource on this node.\nCreate and assign one?"));
create_poly->popup_centered_minsize();
}
return (mb.is_valid() && mb->get_button_index() == 1);
@@ -367,7 +367,7 @@ void LightOccluder2DEditor::edit(Node *p_collision_polygon) {
if (p_collision_polygon) {
- node = p_collision_polygon->cast_to<LightOccluder2D>();
+ node = Object::cast_to<LightOccluder2D>(p_collision_polygon);
if (!canvas_item_editor->get_viewport_control()->is_connected("draw", this, "_canvas_draw"))
canvas_item_editor->get_viewport_control()->connect("draw", this, "_canvas_draw");
wip.clear();
@@ -424,24 +424,13 @@ LightOccluder2DEditor::LightOccluder2DEditor(EditorNode *p_editor) {
add_child(create_poly);
create_poly->get_ok()->set_text(TTR("Create"));
-//add_constant_override("separation",0);
-
-#if 0
- options = memnew( MenuButton );
- add_child(options);
- options->set_area_as_parent_rect();
- options->set_text("Polygon");
- //options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
- options->get_popup()->connect("id_pressed", this,"_menu_option");
-#endif
-
mode = MODE_EDIT;
wip_active = false;
}
void LightOccluder2DEditorPlugin::edit(Object *p_object) {
- collision_polygon_editor->edit(p_object->cast_to<Node>());
+ collision_polygon_editor->edit(Object::cast_to<Node>(p_object));
}
bool LightOccluder2DEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/light_occluder_2d_editor_plugin.h b/editor/plugins/light_occluder_2d_editor_plugin.h
index 435d650a69..7a4f18963d 100644
--- a/editor/plugins/light_occluder_2d_editor_plugin.h
+++ b/editor/plugins/light_occluder_2d_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/line_2d_editor_plugin.cpp b/editor/plugins/line_2d_editor_plugin.cpp
index 41327fb07e..84620a75a5 100644
--- a/editor/plugins/line_2d_editor_plugin.cpp
+++ b/editor/plugins/line_2d_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -189,7 +189,7 @@ void Line2DEditor::edit(Node *p_line2d) {
canvas_item_editor = CanvasItemEditor::get_singleton();
if (p_line2d) {
- node = p_line2d->cast_to<Line2D>();
+ node = Object::cast_to<Line2D>(p_line2d);
if (!canvas_item_editor->get_viewport_control()->is_connected("draw", this, "_canvas_draw"))
canvas_item_editor->get_viewport_control()->connect("draw", this, "_canvas_draw");
if (!node->is_connected("visibility_changed", this, "_node_visibility_changed"))
@@ -211,7 +211,7 @@ void Line2DEditor::_bind_methods() {
}
void Line2DEditor::_mode_selected(int p_mode) {
- for (unsigned int i = 0; i < _MODE_COUNT; ++i) {
+ for (int i = 0; i < _MODE_COUNT; ++i) {
toolbar_buttons[i]->set_pressed(i == p_mode);
}
mode = Mode(p_mode);
@@ -276,7 +276,7 @@ Line2DEditor::Line2DEditor(EditorNode *p_editor) {
//----------------------------------------------------------------------------
void Line2DEditorPlugin::edit(Object *p_object) {
- line2d_editor->edit(p_object->cast_to<Node>());
+ line2d_editor->edit(Object::cast_to<Node>(p_object));
}
bool Line2DEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/line_2d_editor_plugin.h b/editor/plugins/line_2d_editor_plugin.h
index f2979e4330..dea77ec248 100644
--- a/editor/plugins/line_2d_editor_plugin.h
+++ b/editor/plugins/line_2d_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index 179ef27eda..d2767bf1b2 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -27,12 +27,14 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+
+// FIXME: Disabled as (according to reduz) users were complaining that it gets in the way
+// Waiting for PropertyEditor rewrite (planned for 3.1) to be refactored.
+#if 0
#include "material_editor_plugin.h"
#include "scene/main/viewport.h"
-#if 0
-
void MaterialEditor::_gui_input(InputEvent p_event) {
@@ -372,7 +374,7 @@ MaterialEditor::MaterialEditor() {
void MaterialEditorPlugin::edit(Object *p_object) {
- Material * s = p_object->cast_to<Material>();
+ Material * s = Object::cast_to<Material>(p_object);
if (!s)
return;
diff --git a/editor/plugins/material_editor_plugin.h b/editor/plugins/material_editor_plugin.h
index a0a91f53a6..10d7997a52 100644
--- a/editor/plugins/material_editor_plugin.h
+++ b/editor/plugins/material_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -30,6 +30,10 @@
#ifndef MATERIAL_EDITOR_PLUGIN_H
#define MATERIAL_EDITOR_PLUGIN_H
+// FIXME: Disabled as (according to reduz) users were complaining that it gets in the way
+// Waiting for PropertyEditor rewrite (planned for 3.1) to be refactored.
+#if 0
+
#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "scene/3d/camera.h"
@@ -37,7 +41,6 @@
#include "scene/3d/mesh_instance.h"
#include "scene/resources/material.h"
-#if 0
class MaterialEditor : public Control {
GDCLASS(MaterialEditor, Control);
@@ -97,5 +100,5 @@ public:
};
-#endif // MATERIAL_EDITOR_PLUGIN_H
#endif
+#endif // MATERIAL_EDITOR_PLUGIN_H
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index 23b19e61b9..a77f022347 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -187,7 +187,7 @@ MeshEditor::MeshEditor() {
void MeshEditorPlugin::edit(Object *p_object) {
- Mesh *s = p_object->cast_to<Mesh>();
+ Mesh *s = Object::cast_to<Mesh>(p_object);
if (!s)
return;
diff --git a/editor/plugins/mesh_editor_plugin.h b/editor/plugins/mesh_editor_plugin.h
index 305d24ba07..8ae20a5434 100644
--- a/editor/plugins/mesh_editor_plugin.h
+++ b/editor/plugins/mesh_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/mesh_instance_editor_plugin.cpp b/editor/plugins/mesh_instance_editor_plugin.cpp
index 49498d0fa0..84fc0cecf2 100644
--- a/editor/plugins/mesh_instance_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -101,7 +101,7 @@ void MeshInstanceEditor::_menu_option(int p_option) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- MeshInstance *instance = E->get()->cast_to<MeshInstance>();
+ MeshInstance *instance = Object::cast_to<MeshInstance>(E->get());
if (!instance)
continue;
@@ -290,7 +290,7 @@ MeshInstanceEditor::MeshInstanceEditor() {
void MeshInstanceEditorPlugin::edit(Object *p_object) {
- mesh_editor->edit(p_object->cast_to<MeshInstance>());
+ mesh_editor->edit(Object::cast_to<MeshInstance>(p_object));
}
bool MeshInstanceEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/mesh_instance_editor_plugin.h b/editor/plugins/mesh_instance_editor_plugin.h
index 614dcac0b9..fa851458ce 100644
--- a/editor/plugins/mesh_instance_editor_plugin.h
+++ b/editor/plugins/mesh_instance_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp
index a9689cce56..79345754b6 100644
--- a/editor/plugins/multimesh_editor_plugin.cpp
+++ b/editor/plugins/multimesh_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -77,7 +77,7 @@ void MultiMeshEditor::_populate() {
return;
}
- MeshInstance *ms_instance = ms_node->cast_to<MeshInstance>();
+ MeshInstance *ms_instance = Object::cast_to<MeshInstance>(ms_node);
if (!ms_instance) {
@@ -112,7 +112,7 @@ void MultiMeshEditor::_populate() {
return;
}
- GeometryInstance *ss_instance = ss_node->cast_to<MeshInstance>();
+ GeometryInstance *ss_instance = Object::cast_to<MeshInstance>(ss_node);
if (!ss_instance) {
@@ -144,22 +144,7 @@ void MultiMeshEditor::_populate() {
}
w = PoolVector<Face3>::Write();
-#if 0
- node->get_multimesh()->set_instance_count(populate_amount->get_val());
- node->populate_parent(populate_rotate_random->get_val(),populate_tilt_random->get_val(),populate_scale_random->get_val(),populate_scale->get_val());
-
- ERR_EXPLAIN("Parent is not of type VisualInstance.");
- ERR_FAIL_COND(!get_parent() || !get_parent()->is_type("VisualInstance"));
-
- ERR_EXPLAIN("Multimesh not present.");
- ERR_FAIL_COND(multimesh.is_null());
-
- VisualInstance *vi = get_parent()->cast_to<VisualInstance>();
- ERR_EXPLAIN("Parent is not of type VisualInstance, can't be populated.");
- ERR_FAIL_COND(!vi);
-
-#endif
PoolVector<Face3> faces = geometry;
ERR_EXPLAIN(TTR("Parent has no solid faces to populate."));
int facecount = faces.size();
@@ -402,7 +387,7 @@ MultiMeshEditor::MultiMeshEditor() {
void MultiMeshEditorPlugin::edit(Object *p_object) {
- multimesh_editor->edit(p_object->cast_to<MultiMeshInstance>());
+ multimesh_editor->edit(Object::cast_to<MultiMeshInstance>(p_object));
}
bool MultiMeshEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/multimesh_editor_plugin.h b/editor/plugins/multimesh_editor_plugin.h
index a93fa73a2e..6b44662091 100644
--- a/editor/plugins/multimesh_editor_plugin.h
+++ b/editor/plugins/multimesh_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp
index 725e57fe0b..de8d4f9618 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -69,6 +69,7 @@ void NavigationPolygonEditor::_create_nav() {
undo_redo->add_do_method(node, "set_navigation_polygon", Ref<NavigationPolygon>(memnew(NavigationPolygon)));
undo_redo->add_undo_method(node, "set_navigation_polygon", Variant(REF()));
undo_redo->commit_action();
+ _menu_option(MODE_CREATE);
}
void NavigationPolygonEditor::_menu_option(int p_option) {
@@ -422,7 +423,12 @@ void NavigationPolygonEditor::edit(Node *p_collision_polygon) {
if (p_collision_polygon) {
- node = p_collision_polygon->cast_to<NavigationPolygonInstance>();
+ node = Object::cast_to<NavigationPolygonInstance>(p_collision_polygon);
+ //Enable the pencil tool if the polygon is empty
+ if (!node->get_navigation_polygon().is_null()) {
+ if (node->get_navigation_polygon()->get_polygon_count() == 0)
+ _menu_option(MODE_CREATE);
+ }
if (!canvas_item_editor->get_viewport_control()->is_connected("draw", this, "_canvas_draw"))
canvas_item_editor->get_viewport_control()->connect("draw", this, "_canvas_draw");
wip.clear();
@@ -468,17 +474,6 @@ NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor) {
add_child(create_nav);
create_nav->get_ok()->set_text(TTR("Create"));
-//add_constant_override("separation",0);
-
-#if 0
- options = memnew( MenuButton );
- add_child(options);
- options->set_area_as_parent_rect();
- options->set_text("Polygon");
- //options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
- options->get_popup()->connect("id_pressed", this,"_menu_option");
-#endif
-
mode = MODE_EDIT;
wip_active = false;
edited_outline = -1;
@@ -486,7 +481,7 @@ NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor) {
void NavigationPolygonEditorPlugin::edit(Object *p_object) {
- collision_polygon_editor->edit(p_object->cast_to<Node>());
+ collision_polygon_editor->edit(Object::cast_to<Node>(p_object));
}
bool NavigationPolygonEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/navigation_polygon_editor_plugin.h b/editor/plugins/navigation_polygon_editor_plugin.h
index 6ec9b14cc1..33f9d5c785 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.h
+++ b/editor/plugins/navigation_polygon_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/particles_2d_editor_plugin.cpp b/editor/plugins/particles_2d_editor_plugin.cpp
index a759e5892f..5eaa248224 100644
--- a/editor/plugins/particles_2d_editor_plugin.cpp
+++ b/editor/plugins/particles_2d_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -33,13 +33,10 @@
#include "io/image_loader.h"
#include "scene/3d/particles.h"
#include "scene/gui/separator.h"
+
void Particles2DEditorPlugin::edit(Object *p_object) {
- if (p_object) {
- particles = p_object->cast_to<Particles2D>();
- } else {
- particles = NULL;
- }
+ particles = Object::cast_to<Particles2D>(p_object);
}
bool Particles2DEditorPlugin::handles(Object *p_object) const {
@@ -357,7 +354,7 @@ Particles2DEditorPlugin::Particles2DEditorPlugin(EditorNode *p_node) {
menu->get_popup()->add_separator();
menu->get_popup()->add_item(TTR("Load Emission Mask"), MENU_LOAD_EMISSION_MASK);
// menu->get_popup()->add_item(TTR("Clear Emission Mask"), MENU_CLEAR_EMISSION_MASK);
- menu->set_text("Particles");
+ menu->set_text(TTR("Particles"));
toolbar->add_child(menu);
file = memnew(EditorFileDialog);
diff --git a/editor/plugins/particles_2d_editor_plugin.h b/editor/plugins/particles_2d_editor_plugin.h
index ccfec1a25f..fd42abb6bd 100644
--- a/editor/plugins/particles_2d_editor_plugin.h
+++ b/editor/plugins/particles_2d_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp
index 1e3723a911..10834b74ff 100644
--- a/editor/plugins/particles_editor_plugin.cpp
+++ b/editor/plugins/particles_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -51,7 +51,7 @@ void ParticlesEditor::_node_selected(const NodePath &p_path) {
if (!sel)
return;
- VisualInstance *vi = sel->cast_to<VisualInstance>();
+ VisualInstance *vi = Object::cast_to<VisualInstance>(sel);
if (!vi) {
err_dialog->set_text(TTR("Node does not contain geometry."));
@@ -135,7 +135,7 @@ void ParticlesEditor::_menu_option(int p_option) {
/*
Node *root = get_scene()->get_root_node();
ERR_FAIL_COND(!root);
- EditorNode *en = root->cast_to<EditorNode>();
+ EditorNode *en = Object::cast_to<EditorNode>(root);
ERR_FAIL_COND(!en);
Node * node = en->get_edited_scene();
*/
@@ -389,7 +389,7 @@ ParticlesEditor::ParticlesEditor() {
particles_editor_hb->add_child(options);
particles_editor_hb->hide();
- options->set_text("Particles");
+ options->set_text(TTR("Particles"));
options->get_popup()->add_item(TTR("Generate AABB"), MENU_OPTION_GENERATE_AABB);
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Create Emission Points From Mesh"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH);
@@ -461,7 +461,7 @@ ParticlesEditor::ParticlesEditor() {
void ParticlesEditorPlugin::edit(Object *p_object) {
- particles_editor->edit(p_object->cast_to<Particles>());
+ particles_editor->edit(Object::cast_to<Particles>(p_object));
}
bool ParticlesEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/particles_editor_plugin.h b/editor/plugins/particles_editor_plugin.h
index a6e14266c7..2c8ce88eb2 100644
--- a/editor/plugins/particles_editor_plugin.h
+++ b/editor/plugins/particles_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index 3a210f3fe0..adc8d4f091 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -33,6 +33,7 @@
#include "editor/editor_settings.h"
#include "os/file_access.h"
#include "os/keyboard.h"
+
void Path2DEditor::_notification(int p_what) {
switch (p_what) {
@@ -228,200 +229,6 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
return true;
}
-
-#if 0
- switch(mode) {
-
-
- case MODE_CREATE: {
-
- if (mb->get_button_index()==BUTTON_LEFT && mb->is_pressed()) {
-
-
- if (!wip_active) {
-
- wip.clear();
- wip.push_back( canvas_item_editor->snap_point(cpoint) );
- wip_active=true;
- edited_point_pos=canvas_item_editor->snap_point(cpoint);
- canvas_item_editor->update();
- edited_point=1;
- return true;
- } else {
- if (wip.size()>1 && xform.xform(wip[0]).distance_to(gpoint)<grab_threshold) {
- //wip closed
- _wip_close();
-
-
- return true;
- } else {
-
- wip.push_back( canvas_item_editor->snap_point(cpoint) );
- edited_point=wip.size();
- canvas_item_editor->update();
- return true;
-
- //add wip point
- }
- }
- } else if (mb->get_button_index()==BUTTON_RIGHT && mb->is_pressed() && wip_active) {
- _wip_close();
- }
-
- } break;
-
- case MODE_EDIT: {
-
- if (mb->get_button_index()==BUTTON_LEFT) {
- if (mb->is_pressed()) {
-
- if (mb->get_control()) {
-
-
- if (poly.size() < 3) {
-
- undo_redo->create_action(TTR("Edit Poly"));
- undo_redo->add_undo_method(node,"set_polygon",poly);
- poly.push_back(cpoint);
- undo_redo->add_do_method(node,"set_polygon",poly);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(),"update");
- undo_redo->commit_action();
- return true;
- }
-
- //search edges
- int closest_idx=-1;
- Vector2 closest_pos;
- real_t closest_dist=1e10;
- for(int i=0;i<poly.size();i++) {
-
- if (d<closest_dist && d<grab_threshold) {
- closest_dist=d;
- closest_pos=cp;
- closest_idx=i;
- }
-
- Vector2 cp = Geometry::get_closest_point_to_segment_2d(gpoint,points);
- if (cp.distance_squared_to(points[0])<CMP_EPSILON2 || cp.distance_squared_to(points[1])<CMP_EPSILON2)
- continue; //not valid to reuse point
-
- real_t d = cp.distance_to(gpoint);
- if (d<closest_dist && d<grab_threshold) {
- closest_dist=d;
- closest_pos=cp;
- closest_idx=i;
- }
-
-
- }
-
- if (closest_idx>=0) {
-
- pre_move_edit=poly;
- poly.insert(closest_idx+1,canvas_item_editor->snap_point(xform.affine_inverse().xform(closest_pos)));
- edited_point=closest_idx+1;
- edited_point_pos=canvas_item_editor->snap_point(xform.affine_inverse().xform(closest_pos));
- node->set_polygon(poly);
- canvas_item_editor->update();
- return true;
- }
- } else {
-
- real_t d = cp.distance_to(gpoint);
- if (d<closest_dist && d<grab_threshold) {
- closest_dist=d;
- closest_pos=cp;
- closest_idx=i;
- }
-
- int closest_idx=-1;
- Vector2 closest_pos;
- real_t closest_dist=1e10;
- for(int i=0;i<poly.size();i++) {
-
- Vector2 cp =xform.xform(poly[i]);
-
- real_t d = cp.distance_to(gpoint);
- if (d<closest_dist && d<grab_threshold) {
- closest_dist=d;
- closest_pos=cp;
- closest_idx=i;
- }
-
- }
-
- if (closest_idx>=0) {
-
- pre_move_edit=poly;
- edited_point=closest_idx;
- edited_point_pos=xform.affine_inverse().xform(closest_pos);
- canvas_item_editor->update();
- return true;
- }
- }
- } else {
-
- if (edited_point!=-1) {
-
- //apply
-
- ERR_FAIL_INDEX_V(edited_point,poly.size(),false);
- poly[edited_point]=edited_point_pos;
- undo_redo->create_action(TTR("Edit Poly"));
- undo_redo->add_do_method(node,"set_polygon",poly);
- undo_redo->add_undo_method(node,"set_polygon",pre_move_edit);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(),"update");
- undo_redo->commit_action();
-
- edited_point=-1;
- return true;
- }
- }
- } if (mb->get_button_index()==BUTTON_RIGHT && mb->is_pressed() && edited_point==-1) {
-
- real_t d = cp.distance_to(gpoint);
- if (d<closest_dist && d<grab_threshold) {
- closest_dist=d;
- closest_pos=cp;
- closest_idx=i;
- }
-
- int closest_idx=-1;
- Vector2 closest_pos;
- real_t closest_dist=1e10;
- for(int i=0;i<poly.size();i++) {
-
- Vector2 cp =xform.xform(poly[i]);
-
- real_t d = cp.distance_to(gpoint);
- if (d<closest_dist && d<grab_threshold) {
- closest_dist=d;
- closest_pos=cp;
- closest_idx=i;
- }
-
- }
-
- if (closest_idx>=0) {
-
-
- undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
- undo_redo->add_undo_method(node,"set_polygon",poly);
- poly.remove(closest_idx);
- undo_redo->add_do_method(node,"set_polygon",poly);
- undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
- undo_redo->add_undo_method(canvas_item_editor->get_viewport_control(),"update");
- undo_redo->commit_action();
- return true;
- }
-
- }
-
- } break;
- }
-#endif
}
Ref<InputEventMouseMotion> mm = p_event;
@@ -463,19 +270,6 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
canvas_item_editor->get_viewport_control()->update();
return true;
}
-
-#if 0
- if (edited_point!=-1 && (wip_active || mm->get_button_mask()&BUTTON_MASK_LEFT)) {
-
-
- Matrix32 xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
-
- Vector2 gpoint = Point2(mm.x,mm.y);
- edited_point_pos = canvas_item_editor->snap_point(xform.affine_inverse().xform(gpoint));
- canvas_item_editor->update();
-
- }
-#endif
}
return false;
@@ -534,7 +328,7 @@ void Path2DEditor::edit(Node *p_path2d) {
if (p_path2d) {
- node = p_path2d->cast_to<Path2D>();
+ node = Object::cast_to<Path2D>(p_path2d);
if (!canvas_item_editor->get_viewport_control()->is_connected("draw", this, "_canvas_draw"))
canvas_item_editor->get_viewport_control()->connect("draw", this, "_canvas_draw");
if (!node->is_connected("visibility_changed", this, "_node_visibility_changed"))
@@ -619,16 +413,7 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) {
undo_redo = editor->get_undo_redo();
mode = MODE_EDIT;
-
action = ACTION_NONE;
-#if 0
- options = memnew( MenuButton );
- add_child(options);
- options->set_area_as_parent_rect();
- options->set_text("Polygon");
- //options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
- options->get_popup()->connect("id_pressed", this,"_menu_option");
-#endif
base_hb = memnew(HBoxContainer);
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(base_hb);
@@ -676,7 +461,7 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) {
void Path2DEditorPlugin::edit(Object *p_object) {
- path2d_editor->edit(p_object->cast_to<Node>());
+ path2d_editor->edit(Object::cast_to<Node>(p_object));
}
bool Path2DEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/path_2d_editor_plugin.h b/editor/plugins/path_2d_editor_plugin.h
index 61ff700118..c195845244 100644
--- a/editor/plugins/path_2d_editor_plugin.h
+++ b/editor/plugins/path_2d_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/path_editor_plugin.cpp b/editor/plugins/path_editor_plugin.cpp
index 96a98f3c48..d0f2b19ed3 100644
--- a/editor/plugins/path_editor_plugin.cpp
+++ b/editor/plugins/path_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -269,9 +269,9 @@ PathSpatialGizmo::PathSpatialGizmo(Path *p_path) {
Ref<SpatialEditorGizmo> PathEditorPlugin::create_spatial_gizmo(Spatial *p_spatial) {
- if (p_spatial->cast_to<Path>()) {
+ if (Object::cast_to<Path>(p_spatial)) {
- return memnew(PathSpatialGizmo(p_spatial->cast_to<Path>()));
+ return memnew(PathSpatialGizmo(Object::cast_to<Path>(p_spatial)));
}
return Ref<SpatialEditorGizmo>();
@@ -433,7 +433,7 @@ bool PathEditorPlugin::forward_spatial_gui_input(Camera *p_camera, const Ref<Inp
void PathEditorPlugin::edit(Object *p_object) {
if (p_object) {
- path = p_object->cast_to<Path>();
+ path = Object::cast_to<Path>(p_object);
if (path) {
if (path->get_curve().is_valid()) {
@@ -447,7 +447,7 @@ void PathEditorPlugin::edit(Object *p_object) {
pre->get_curve()->emit_signal("changed");
}
}
- //collision_polygon_editor->edit(p_object->cast_to<Node>());
+ //collision_polygon_editor->edit(Object::cast_to<Node>(p_object));
}
bool PathEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/path_editor_plugin.h b/editor/plugins/path_editor_plugin.h
index 43df9d460f..b672e828a9 100644
--- a/editor/plugins/path_editor_plugin.h
+++ b/editor/plugins/path_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 24ccdcd445..f7008298f0 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -402,6 +402,14 @@ bool Polygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
cpoint = canvas_item_editor->snap_point(cpoint);
edited_point_pos = node->get_global_transform().affine_inverse().xform(cpoint);
+ if (!wip_active) {
+
+ Vector<Vector2> poly = Variant(node->get_polygon());
+ ERR_FAIL_INDEX_V(edited_point, poly.size(), false);
+ poly[edited_point] = edited_point_pos - node->get_offset();
+ node->set_polygon(Variant(poly));
+ }
+
canvas_item_editor->get_viewport_control()->update();
}
}
@@ -425,6 +433,23 @@ void Polygon2DEditor::_canvas_draw() {
Transform2D xform = canvas_item_editor->get_canvas_transform() * node->get_global_transform();
Ref<Texture> handle = get_icon("EditorHandle", "EditorIcons");
+ if (!wip_active && edited_point >= 0 && EDITOR_DEF("editors/poly_editor/show_previous_outline", true)) {
+
+ const Color col = node->get_color().contrasted();
+ const int n = pre_move_edit.size();
+ for (int i = 0; i < n; i++) {
+
+ Vector2 p, p2;
+ p = pre_move_edit[i] + node->get_offset();
+ p2 = pre_move_edit[(i + 1) % n] + node->get_offset();
+
+ Vector2 point = xform.xform(p);
+ Vector2 next_point = xform.xform(p2);
+
+ vpc->draw_line(point, next_point, col, 2);
+ }
+ }
+
for (int i = 0; i < poly.size(); i++) {
Vector2 p, p2;
@@ -634,7 +659,7 @@ void Polygon2DEditor::_uv_draw() {
if (snap_show_grid) {
Size2 s = uv_edit_draw->get_size();
- int last_cell;
+ int last_cell = 0;
if (snap_step.x != 0) {
for (int i = 0; i < s.width; i++) {
@@ -697,7 +722,11 @@ void Polygon2DEditor::edit(Node *p_collision_polygon) {
if (p_collision_polygon) {
- node = p_collision_polygon->cast_to<Polygon2D>();
+ node = Object::cast_to<Polygon2D>(p_collision_polygon);
+ //Enable the pencil tool if the polygon is empty
+ if (node->get_polygon().size() == 0) {
+ _menu_option(MODE_CREATE);
+ }
if (!canvas_item_editor->get_viewport_control()->is_connected("draw", this, "_canvas_draw"))
canvas_item_editor->get_viewport_control()->connect("draw", this, "_canvas_draw");
@@ -770,17 +799,6 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
add_child(button_uv);
button_uv->connect("pressed", this, "_menu_option", varray(MODE_EDIT_UV));
-//add_constant_override("separation",0);
-
-#if 0
- options = memnew( MenuButton );
- add_child(options);
- options->set_area_as_parent_rect();
- options->set_text("Polygon");
- //options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
- options->get_popup()->connect("id_pressed", this,"_menu_option");
-#endif
-
mode = MODE_EDIT;
wip_active = false;
@@ -925,7 +943,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
void Polygon2DEditorPlugin::edit(Object *p_object) {
- collision_polygon_editor->edit(p_object->cast_to<Node>());
+ collision_polygon_editor->edit(Object::cast_to<Node>(p_object));
}
bool Polygon2DEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/polygon_2d_editor_plugin.h b/editor/plugins/polygon_2d_editor_plugin.h
index 4fcb1d81c2..38148ca7e3 100644
--- a/editor/plugins/polygon_2d_editor_plugin.h
+++ b/editor/plugins/polygon_2d_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index ccefbc1843..e157ddbf90 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -157,7 +157,6 @@ void ResourcePreloaderEditor::_paste_pressed() {
if (!r.is_valid()) {
dialog->set_text(TTR("Resource clipboard is empty!"));
dialog->set_title(TTR("Error!"));
- //dialog->get_cancel()->set_text("Close");
dialog->get_ok()->set_text(TTR("Close"));
dialog->popup_centered_minsize();
return; ///beh should show an error i guess
@@ -410,7 +409,7 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
void ResourcePreloaderEditorPlugin::edit(Object *p_object) {
preloader_editor->set_undo_redo(&get_undo_redo());
- ResourcePreloader *s = p_object->cast_to<ResourcePreloader>();
+ ResourcePreloader *s = Object::cast_to<ResourcePreloader>(p_object);
if (!s)
return;
diff --git a/editor/plugins/resource_preloader_editor_plugin.h b/editor/plugins/resource_preloader_editor_plugin.h
index 6e4726748d..46539f432c 100644
--- a/editor/plugins/resource_preloader_editor_plugin.h
+++ b/editor/plugins/resource_preloader_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/rich_text_editor_plugin.cpp b/editor/plugins/rich_text_editor_plugin.cpp
deleted file mode 100644
index 07c0cced49..0000000000
--- a/editor/plugins/rich_text_editor_plugin.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-/*************************************************************************/
-/* rich_text_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "rich_text_editor_plugin.h"
-
-#include "canvas_item_editor_plugin.h"
-#include "os/file_access.h"
-
-void RichTextEditor::_notification(int p_what) {
-
- switch (p_what) {
-
- case NOTIFICATION_FIXED_PROCESS: {
-
- } break;
- }
-}
-void RichTextEditor::_node_removed(Node *p_node) {
-
- if (p_node == node) {
- node = NULL;
- hide();
- }
-}
-
-void RichTextEditor::_file_selected(const String &p_path) {
-
- CharString cs;
- FileAccess *fa = FileAccess::open(p_path, FileAccess::READ);
- if (!fa) {
- ERR_FAIL();
- }
-
- while (!fa->eof_reached())
- cs.push_back(fa->get_8());
- cs.push_back(0);
- memdelete(fa);
-
- String bbcode;
- bbcode.parse_utf8(&cs[0]);
- node->parse_bbcode(bbcode);
-}
-
-void RichTextEditor::_menu_option(int p_option) {
-
- switch (p_option) {
-
- case PARSE_BBCODE: {
-
- file_dialog->popup_centered_ratio();
- } break;
- case CLEAR: {
-
- node->clear();
-
- } break;
- }
-}
-
-void RichTextEditor::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_menu_option"), &RichTextEditor::_menu_option);
- ClassDB::bind_method(D_METHOD("_file_selected"), &RichTextEditor::_file_selected);
-}
-
-void RichTextEditor::edit(Node *p_rich_text) {
-
- node = p_rich_text->cast_to<RichTextLabel>();
-}
-RichTextEditor::RichTextEditor() {
-
- options = memnew(MenuButton);
- //add_child(options);
- CanvasItemEditor::get_singleton()->add_control_to_menu_panel(options);
- options->set_area_as_parent_rect();
-
- options->set_text("RichText");
- options->get_popup()->add_item(TTR("Parse BBCode"), PARSE_BBCODE);
- options->get_popup()->add_item(TTR("Clear"), CLEAR);
-
- options->get_popup()->connect("id_pressed", this, "_menu_option");
- file_dialog = memnew(EditorFileDialog);
- add_child(file_dialog);
- file_dialog->add_filter("*.txt");
- file_dialog->set_mode(EditorFileDialog::MODE_OPEN_FILE);
- file_dialog->connect("file_selected", this, "_file_selected");
-}
-
-void RichTextEditorPlugin::edit(Object *p_object) {
-
- rich_text_editor->edit(p_object->cast_to<Node>());
-}
-
-bool RichTextEditorPlugin::handles(Object *p_object) const {
-
- return p_object->is_class("RichTextLabel");
-}
-
-void RichTextEditorPlugin::make_visible(bool p_visible) {
-
- if (p_visible) {
- rich_text_editor->options->show();
- } else {
-
- rich_text_editor->options->hide();
- rich_text_editor->edit(NULL);
- }
-}
-
-RichTextEditorPlugin::RichTextEditorPlugin(EditorNode *p_node) {
-
- editor = p_node;
- rich_text_editor = memnew(RichTextEditor);
- editor->get_viewport()->add_child(rich_text_editor);
-
- rich_text_editor->set_margin(MARGIN_LEFT, 184);
- rich_text_editor->set_margin(MARGIN_RIGHT, 230);
- rich_text_editor->set_margin(MARGIN_TOP, 0);
- rich_text_editor->set_margin(MARGIN_BOTTOM, 10);
-
- rich_text_editor->options->hide();
-}
-
-RichTextEditorPlugin::~RichTextEditorPlugin() {
-}
diff --git a/editor/plugins/rich_text_editor_plugin.h b/editor/plugins/rich_text_editor_plugin.h
deleted file mode 100644
index 2665db2993..0000000000
--- a/editor/plugins/rich_text_editor_plugin.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*************************************************************************/
-/* rich_text_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef RICH_TEXT_EDITOR_PLUGIN_H
-#define RICH_TEXT_EDITOR_PLUGIN_H
-
-#include "editor/editor_node.h"
-#include "editor/editor_plugin.h"
-#include "scene/gui/file_dialog.h"
-#include "scene/gui/rich_text_label.h"
-
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-
-class RichTextEditor : public Control {
-
- GDCLASS(RichTextEditor, Control);
-
- friend class RichTextEditorPlugin;
-
- enum {
-
- PARSE_BBCODE,
- CLEAR
- };
-
- Panel *panel;
- MenuButton *options;
- RichTextLabel *node;
- EditorFileDialog *file_dialog;
-
- void _file_selected(const String &p_path);
- void _menu_option(int p_option);
-
-protected:
- void _notification(int p_what);
- void _node_removed(Node *p_node);
- static void _bind_methods();
-
-public:
- void edit(Node *p_rich_text);
- RichTextEditor();
-};
-
-class RichTextEditorPlugin : public EditorPlugin {
-
- GDCLASS(RichTextEditorPlugin, EditorPlugin);
-
- RichTextEditor *rich_text_editor;
- EditorNode *editor;
-
-public:
- virtual String get_name() const { return "RichText"; }
- bool has_main_screen() const { return false; }
- virtual void edit(Object *p_object);
- virtual bool handles(Object *p_object) const;
- virtual void make_visible(bool p_visible);
-
- RichTextEditorPlugin(EditorNode *p_node);
- ~RichTextEditorPlugin();
-};
-
-#endif // RICH_TEXT_EDITOR_PLUGIN_H
diff --git a/editor/plugins/sample_editor_plugin.cpp b/editor/plugins/sample_editor_plugin.cpp
deleted file mode 100644
index 2dd6de1683..0000000000
--- a/editor/plugins/sample_editor_plugin.cpp
+++ /dev/null
@@ -1,452 +0,0 @@
-/*************************************************************************/
-/* sample_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "sample_editor_plugin.h"
-
-#if 0
-#include "editor/editor_settings.h"
-#include "io/resource_loader.h"
-#include "project_settings.h"
-
-
-
-
-void SampleEditor::_gui_input(InputEvent p_event) {
-
-
-}
-
-void SampleEditor::_notification(int p_what) {
-
- if (p_what==NOTIFICATION_FIXED_PROCESS) {
-
- }
-
- if (p_what==NOTIFICATION_ENTER_TREE) {
- play->set_icon( get_icon("Play","EditorIcons") );
- stop->set_icon( get_icon("Stop","EditorIcons") );
- }
-
- if (p_what==NOTIFICATION_READY) {
-
- //get_scene()->connect("node_removed",this,"_node_removed");
-
- }
-
- if (p_what==NOTIFICATION_DRAW) {
-
- }
-}
-
-void SampleEditor::_play_pressed() {
-
- player->play("default",true);
- stop->set_pressed(false);
- play->set_pressed(true);
-}
-void SampleEditor::_stop_pressed() {
-
- player->stop_all();
- play->set_pressed(false);
-}
-
-void SampleEditor::generate_preview_texture(const Ref<Sample>& p_sample,Ref<ImageTexture> &p_texture) {
-
-
- PoolVector<uint8_t> data = p_sample->get_data();
-
- PoolVector<uint8_t> img;
- int w = p_texture->get_width();
- int h = p_texture->get_height();
- img.resize(w*h*3);
- PoolVector<uint8_t>::Write imgdata = img.write();
- uint8_t * imgw = imgdata.ptr();
- PoolVector<uint8_t>::Read sampledata = data.read();
- const uint8_t *sdata=sampledata.ptr();
-
- bool stereo = p_sample->is_stereo();
- bool _16=p_sample->get_format()==Sample::FORMAT_PCM16;
- int len = p_sample->get_length();
-
- if (len<1)
- return;
-
- if (p_sample->get_format()==Sample::FORMAT_IMA_ADPCM) {
-
-
- struct IMA_ADPCM_State {
-
- int16_t step_index;
- int32_t predictor;
- /* values at loop point */
- int16_t loop_step_index;
- int32_t loop_predictor;
- int32_t last_nibble;
- int32_t loop_pos;
- int32_t window_ofs;
- const uint8_t *ptr;
- } ima_adpcm;
-
- ima_adpcm.step_index=0;
- ima_adpcm.predictor=0;
- ima_adpcm.loop_step_index=0;
- ima_adpcm.loop_predictor=0;
- ima_adpcm.last_nibble=-1;
- ima_adpcm.loop_pos=0x7FFFFFFF;
- ima_adpcm.window_ofs=0;
- ima_adpcm.ptr=NULL;
-
-
- for(int i=0;i<w;i++) {
-
- float max[2]={-1e10,-1e10};
- float min[2]={1e10,1e10};
- int from = i*len/w;
- int to = (i+1)*len/w;
- if (to>=len)
- to=len-1;
-
- for(int j=from;j<to;j++) {
-
- while(j>ima_adpcm.last_nibble) {
-
- static const int16_t _ima_adpcm_step_table[89] = {
- 7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
- 19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
- 50, 55, 60, 66, 73, 80, 88, 97, 107, 118,
- 130, 143, 157, 173, 190, 209, 230, 253, 279, 307,
- 337, 371, 408, 449, 494, 544, 598, 658, 724, 796,
- 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066,
- 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358,
- 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899,
- 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
- };
-
- static const int8_t _ima_adpcm_index_table[16] = {
- -1, -1, -1, -1, 2, 4, 6, 8,
- -1, -1, -1, -1, 2, 4, 6, 8
- };
-
- int16_t nibble,diff,step;
-
- ima_adpcm.last_nibble++;
- const uint8_t *src_ptr=sdata;
-
- int ofs = ima_adpcm.last_nibble>>1;
-
- if (stereo)
- ofs*=2;
-
- nibble = (ima_adpcm.last_nibble&1)?
- (src_ptr[ofs]>>4):(src_ptr[ofs]&0xF);
-
- step=_ima_adpcm_step_table[ima_adpcm.step_index];
-
- ima_adpcm.step_index += _ima_adpcm_index_table[nibble];
- if (ima_adpcm.step_index<0)
- ima_adpcm.step_index=0;
- if (ima_adpcm.step_index>88)
- ima_adpcm.step_index=88;
-
- diff = step >> 3 ;
- if (nibble & 1)
- diff += step >> 2 ;
- if (nibble & 2)
- diff += step >> 1 ;
- if (nibble & 4)
- diff += step ;
- if (nibble & 8)
- diff = -diff ;
-
- ima_adpcm.predictor+=diff;
- if (ima_adpcm.predictor<-0x8000)
- ima_adpcm.predictor=-0x8000;
- else if (ima_adpcm.predictor>0x7FFF)
- ima_adpcm.predictor=0x7FFF;
-
-
- /* store loop if there */
- if (ima_adpcm.last_nibble==ima_adpcm.loop_pos) {
-
- ima_adpcm.loop_step_index = ima_adpcm.step_index;
- ima_adpcm.loop_predictor = ima_adpcm.predictor;
- }
-
- }
-
- float v=ima_adpcm.predictor/32767.0;
- if (v>max[0])
- max[0]=v;
- if (v<min[0])
- min[0]=v;
- }
-
- for(int j=0;j<h;j++) {
- float v = (j/(float)h) * 2.0 - 1.0;
- uint8_t* imgofs = &imgw[(uint64_t(j)*w+i)*3];
- if (v>min[0] && v<max[0]) {
- imgofs[0]=255;
- imgofs[1]=150;
- imgofs[2]=80;
- } else {
- imgofs[0]=0;
- imgofs[1]=0;
- imgofs[2]=0;
- }
- }
- }
- } else {
- for(int i=0;i<w;i++) {
- // i trust gcc will optimize this loop
- float max[2]={-1e10,-1e10};
- float min[2]={1e10,1e10};
- int c=stereo?2:1;
- int from = uint64_t(i)*len/w;
- int to = (uint64_t(i)+1)*len/w;
- if (to>=len)
- to=len-1;
-
- if (_16) {
- const int16_t*src =(const int16_t*)sdata;
-
- for(int j=0;j<c;j++) {
-
- for(int k=from;k<=to;k++) {
-
- float v = src[uint64_t(k)*c+j]/32768.0;
- if (v>max[j])
- max[j]=v;
- if (v<min[j])
- min[j]=v;
- }
-
- }
- } else {
-
- const int8_t*src =(const int8_t*)sdata;
-
- for(int j=0;j<c;j++) {
-
- for(int k=from;k<=to;k++) {
-
- float v = src[uint64_t(k)*c+j]/128.0;
- if (v>max[j])
- max[j]=v;
- if (v<min[j])
- min[j]=v;
- }
-
- }
- }
-
- if (!stereo) {
- for(int j=0;j<h;j++) {
- float v = (j/(float)h) * 2.0 - 1.0;
- uint8_t* imgofs = &imgw[(uint64_t(j)*w+i)*3];
- if (v>min[0] && v<max[0]) {
- imgofs[0]=255;
- imgofs[1]=150;
- imgofs[2]=80;
- } else {
- imgofs[0]=0;
- imgofs[1]=0;
- imgofs[2]=0;
- }
- }
- } else {
-
- for(int j=0;j<h;j++) {
-
- int half;
- float v;
- if (j<(h/2)) {
- half=0;
- v = (j/(float)(h/2)) * 2.0 - 1.0;
- } else {
- half=1;
- v = ((j-(h/2))/(float)(h/2)) * 2.0 - 1.0;
- }
-
- uint8_t* imgofs = &imgw[(uint64_t(j)*w+i)*3];
- if (v>min[half] && v<max[half]) {
- imgofs[0]=255;
- imgofs[1]=150;
- imgofs[2]=80;
- } else {
- imgofs[0]=0;
- imgofs[1]=0;
- imgofs[2]=0;
- }
- }
-
- }
-
- }
- }
-
- imgdata = PoolVector<uint8_t>::Write();
-
-
- p_texture->set_data(Image(w,h,0,Image::FORMAT_RGB8,img));
-
-}
-
-void SampleEditor::_update_sample() {
-
- player->stop_all();
-
- generate_preview_texture(sample,peakdisplay);
- info_label->set_text(TTR("Length:")+" "+String::num(sample->get_length()/(float)sample->get_mix_rate(),2)+"s");
-
- if (library->has_sample("default"))
- library->remove_sample("default");
-
- library->add_sample("default",sample);
-}
-
-
-
-void SampleEditor::edit(Ref<Sample> p_sample) {
-
- sample=p_sample;
-
- if (!sample.is_null())
- _update_sample();
- else {
-
- hide();
- set_fixed_process(false);
- }
-
-}
-
-
-
-void SampleEditor::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_gui_input"),&SampleEditor::_gui_input);
- ClassDB::bind_method(D_METHOD("_play_pressed"),&SampleEditor::_play_pressed);
- ClassDB::bind_method(D_METHOD("_stop_pressed"),&SampleEditor::_stop_pressed);
-
-}
-
-SampleEditor::SampleEditor() {
-
- player = memnew(SamplePlayer);
- add_child(player);
- add_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_stylebox("panel","Panel"));
- library = Ref<SampleLibrary>(memnew(SampleLibrary));
- player->set_sample_library(library);
- sample_texframe = memnew( TextureRect );
- add_child(sample_texframe);
- sample_texframe->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_BEGIN,5);
- sample_texframe->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,-5);
- sample_texframe->set_anchor_and_margin(MARGIN_TOP,ANCHOR_BEGIN,30);
- sample_texframe->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_END,-5);
-
- info_label = memnew( Label );
- sample_texframe->add_child(info_label);
- info_label->set_area_as_parent_rect();
- info_label->set_anchor_and_margin(MARGIN_TOP,ANCHOR_END,-15);
- info_label->set_margin(MARGIN_BOTTOM,-4);
- info_label->set_margin(MARGIN_RIGHT,-4);
- info_label->set_align(Label::ALIGN_RIGHT);
-
-
- play = memnew( Button );
-
- play->set_position(Point2( 5, 5 ));
- play->set_size( Size2(1,1 ) );
- play->set_toggle_mode(true);
- add_child(play);
-
- stop = memnew( Button );
-
- stop->set_position(Point2( 35, 5 ));
- stop->set_size( Size2(1,1 ) );
- stop->set_toggle_mode(true);
- add_child(stop);
-
- peakdisplay=Ref<ImageTexture>( memnew( ImageTexture) );
- peakdisplay->create( EDITOR_DEF("editors/sample_editor/preview_width",512),EDITOR_DEF("editors/sample_editor/preview_height",128),Image::FORMAT_RGB8);
- sample_texframe->set_expand(true);
- sample_texframe->set_texture(peakdisplay);
-
- play->connect("pressed", this,"_play_pressed");
- stop->connect("pressed", this,"_stop_pressed");
-
- set_custom_minimum_size(Size2(1,150)*EDSCALE);
-
-}
-
-
-void SampleEditorPlugin::edit(Object *p_object) {
-
- Sample * s = p_object->cast_to<Sample>();
- if (!s)
- return;
-
- sample_editor->edit(Ref<Sample>(s));
-}
-
-bool SampleEditorPlugin::handles(Object *p_object) const {
-
- return p_object->is_class("Sample");
-}
-
-void SampleEditorPlugin::make_visible(bool p_visible) {
-
- if (p_visible) {
- sample_editor->show();
- //sample_editor->set_process(true);
- } else {
-
- sample_editor->hide();
- //sample_editor->set_process(false);
- }
-
-}
-
-SampleEditorPlugin::SampleEditorPlugin(EditorNode *p_node) {
-
- editor=p_node;
- sample_editor = memnew( SampleEditor );
- add_control_to_container(CONTAINER_PROPERTY_EDITOR_BOTTOM,sample_editor);
- sample_editor->hide();
-
-
-
-}
-
-
-SampleEditorPlugin::~SampleEditorPlugin()
-{
-}
-
-#endif
diff --git a/editor/plugins/sample_editor_plugin.h b/editor/plugins/sample_editor_plugin.h
deleted file mode 100644
index 8f93026c92..0000000000
--- a/editor/plugins/sample_editor_plugin.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*************************************************************************/
-/* sample_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef SAMPLE_EDITOR_PLUGIN_H
-#define SAMPLE_EDITOR_PLUGIN_H
-
-#if 0
-#include "editor/editor_node.h"
-#include "editor/editor_plugin.h"
-#include "scene/audio/sample_player.h"
-#include "scene/resources/sample.h"
-#include "scene/resources/sample_library.h"
-
-
-class SampleEditor : public Panel {
-
- GDCLASS(SampleEditor, Panel );
-
-
- SamplePlayer *player;
- Label *info_label;
- Ref<ImageTexture> peakdisplay;
- Ref<Sample> sample;
- Ref<SampleLibrary> library;
- TextureRect *sample_texframe;
- Button *stop;
- Button *play;
-
- void _play_pressed();
- void _stop_pressed();
- void _update_sample();
-
-protected:
- void _notification(int p_what);
- void _gui_input(InputEvent p_event);
- static void _bind_methods();
-public:
-
- static void generate_preview_texture(const Ref<Sample>& p_sample,Ref<ImageTexture> &p_texture);
- void edit(Ref<Sample> p_sample);
- SampleEditor();
-};
-
-
-class SampleEditorPlugin : public EditorPlugin {
-
- GDCLASS( SampleEditorPlugin, EditorPlugin );
-
- SampleEditor *sample_editor;
- EditorNode *editor;
-
-public:
-
- virtual String get_name() const { return "Sample"; }
- bool has_main_screen() const { return false; }
- virtual void edit(Object *p_node);
- virtual bool handles(Object *p_node) const;
- virtual void make_visible(bool p_visible);
-
- SampleEditorPlugin(EditorNode *p_node);
- ~SampleEditorPlugin();
-
-};
-
-#endif
-
-#endif // SAMPLE_EDITOR_PLUGIN_H
diff --git a/editor/plugins/sample_library_editor_plugin.cpp b/editor/plugins/sample_library_editor_plugin.cpp
deleted file mode 100644
index 3deb634491..0000000000
--- a/editor/plugins/sample_library_editor_plugin.cpp
+++ /dev/null
@@ -1,547 +0,0 @@
-/*************************************************************************/
-/* sample_library_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#if 0
-#include "sample_library_editor_plugin.h"
-
-#include "editor/editor_settings.h"
-#include "io/resource_loader.h"
-#include "project_settings.h"
-#include "sample_editor_plugin.h"
-#include "scene/main/viewport.h"
-
-
-void SampleLibraryEditor::_gui_input(InputEvent p_event) {
-
-
-}
-
-void SampleLibraryEditor::_notification(int p_what) {
-
- if (p_what==NOTIFICATION_PROCESS) {
- if (is_playing && !player->is_active()) {
- TreeItem *tl=last_sample_playing->cast_to<TreeItem>();
- tl->set_button(0,0,get_icon("Play","EditorIcons"));
- is_playing = false;
- set_process(false);
- }
- }
-
- if (p_what==NOTIFICATION_ENTER_TREE) {
- load->set_icon( get_icon("Folder","EditorIcons") );
- load->set_tooltip(TTR("Open Sample File(s)"));
- }
-
- if (p_what==NOTIFICATION_READY) {
-
- //NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true);
- }
-
- if (p_what==NOTIFICATION_DRAW) {
-
- }
-}
-
-void SampleLibraryEditor::_file_load_request(const PoolVector<String>& p_path) {
-
-
- for(int i=0;i<p_path.size();i++) {
-
- String path = p_path[i];
- Ref<Sample> sample = ResourceLoader::load(path,"Sample");
- if (sample.is_null()) {
- dialog->set_text(TTR("ERROR: Couldn't load sample!"));
- dialog->set_title(TTR("Error!"));
- //dialog->get_cancel()->set_text("Close");
- dialog->get_ok()->set_text(TTR("Close"));
- dialog->popup_centered_minsize();
- return; ///beh should show an error i guess
- }
- String basename = path.get_file().get_basename();
- String name=basename;
- int counter=0;
- while(sample_library->has_sample(name)) {
- counter++;
- name=basename+"_"+itos(counter);
- }
-
- undo_redo->create_action(TTR("Add Sample"));
- undo_redo->add_do_method(sample_library.operator->(),"add_sample",name,sample);
- undo_redo->add_undo_method(sample_library.operator->(),"remove_sample",name);
- undo_redo->add_do_method(this,"_update_library");
- undo_redo->add_undo_method(this,"_update_library");
- undo_redo->commit_action();
- }
-}
-
-void SampleLibraryEditor::_load_pressed() {
-
- file->popup_centered_ratio();
-
-}
-
-void SampleLibraryEditor::_button_pressed(Object *p_item,int p_column, int p_id) {
-
- TreeItem *ti=p_item->cast_to<TreeItem>();
- String name = ti->get_text(0);
-
- if (p_column==0) { // Play/Stop
-
- String btn_type;
- if(!is_playing) {
- is_playing = true;
- btn_type = TTR("Stop");
- player->play(name,true);
- last_sample_playing = p_item;
- set_process(true);
- } else {
- player->stop_all();
- if(last_sample_playing != p_item){
- TreeItem *tl=last_sample_playing->cast_to<TreeItem>();
- tl->set_button(p_column,0,get_icon("Play","EditorIcons"));
- btn_type = TTR("Stop");
- player->play(name,true);
- last_sample_playing = p_item;
- } else {
- btn_type = TTR("Play");
- is_playing = false;
- }
- }
- ti->set_button(p_column,0,get_icon(btn_type,"EditorIcons"));
- } else if (p_column==1) { // Edit
-
- get_tree()->get_root()->get_child(0)->call("_resource_selected",sample_library->get_sample(name));
- } else if (p_column==5) { // Delete
-
- ti->select(0);
- _delete_pressed();
- }
-
-
-}
-
-
-
-
-
-void SampleLibraryEditor::_item_edited() {
-
- if (!tree->get_selected())
- return;
-
- TreeItem *s = tree->get_selected();
-
- if (tree->get_selected_column()==0) { // Name
- // renamed
- String old_name=s->get_metadata(0);
- String new_name=s->get_text(0);
- if (old_name==new_name)
- return;
-
- if (new_name=="" || new_name.find("\\")!=-1 || new_name.find("/")!=-1 || sample_library->has_sample(new_name)) {
-
- s->set_text(0,old_name);
- return;
- }
-
- Ref<Sample> samp = sample_library->get_sample(old_name);
- undo_redo->create_action(TTR("Rename Sample"));
- undo_redo->add_do_method(sample_library.operator->(),"remove_sample",old_name);
- undo_redo->add_do_method(sample_library.operator->(),"add_sample",new_name,samp);
- undo_redo->add_undo_method(sample_library.operator->(),"remove_sample",new_name);
- undo_redo->add_undo_method(sample_library.operator->(),"add_sample",old_name,samp);
- undo_redo->add_do_method(this,"_update_library");
- undo_redo->add_undo_method(this,"_update_library");
- undo_redo->commit_action();
-
- } else if (tree->get_selected_column()==3) { // Volume dB
-
- StringName n = s->get_text(0);
- sample_library->sample_set_volume_db(n,s->get_range(3));
-
- } else if (tree->get_selected_column()==4) { // Pitch scale
-
- StringName n = s->get_text(0);
- sample_library->sample_set_pitch_scale(n,s->get_range(4));
-
- }
-
-
-}
-
-void SampleLibraryEditor::_delete_pressed() {
-
- if (!tree->get_selected())
- return;
-
- String to_remove = tree->get_selected()->get_text(0);
- undo_redo->create_action(TTR("Delete Sample"));
- undo_redo->add_do_method(sample_library.operator->(),"remove_sample",to_remove);
- undo_redo->add_undo_method(sample_library.operator->(),"add_sample",to_remove,sample_library->get_sample(to_remove));
- undo_redo->add_do_method(this,"_update_library");
- undo_redo->add_undo_method(this,"_update_library");
- undo_redo->commit_action();
-}
-
-
-void SampleLibraryEditor::_update_library() {
-
- player->stop_all();
-
- tree->clear();
- tree->set_hide_root(true);
- TreeItem *root = tree->create_item(NULL);
-
- List<StringName> names;
- sample_library->get_sample_list(&names);
- names.sort_custom<StringName::AlphCompare>();
-
- for(List<StringName>::Element *E=names.front();E;E=E->next()) {
-
- TreeItem *ti = tree->create_item(root);
-
- // Name + Play/Stop
- ti->set_cell_mode(0,TreeItem::CELL_MODE_STRING);
- ti->set_editable(0,true);
- ti->set_selectable(0,true);
- ti->set_text(0,E->get());
- ti->set_metadata(0,E->get());
- ti->add_button(0,get_icon("Play","EditorIcons"));
-
- Ref<Sample> smp = sample_library->get_sample(E->get());
-
- // Preview/edit
- Ref<ImageTexture> preview( memnew( ImageTexture ));
- preview->create(128,16,Image::FORMAT_RGB8);
- SampleEditor::generate_preview_texture(smp,preview);
- ti->set_cell_mode(1,TreeItem::CELL_MODE_ICON);
- ti->set_selectable(1,false);
- ti->set_editable(1,false);
- ti->set_icon(1,preview);
- ti->add_button(1,get_icon("Edit","EditorIcons"));
-
- // Format
- ti->set_cell_mode(2,TreeItem::CELL_MODE_STRING);
- ti->set_editable(2,false);
- ti->set_selectable(2,false);
- ti->set_text(2,String()+(smp->get_format()==Sample::FORMAT_PCM16?TTR("16 Bits")+", ":(smp->get_format()==Sample::FORMAT_PCM8?TTR("8 Bits")+", ":"IMA-ADPCM,"))+(smp->is_stereo()?TTR("Stereo"):TTR("Mono")));
-
- // Volume dB
- ti->set_cell_mode(3,TreeItem::CELL_MODE_RANGE);
- ti->set_range_config(3,-60,24,0.01);
- ti->set_selectable(3,true);
- ti->set_editable(3,true);
- ti->set_range(3,sample_library->sample_get_volume_db(E->get()));
-
- // Pitch scale
- ti->set_cell_mode(4,TreeItem::CELL_MODE_RANGE);
- ti->set_range_config(4,0.01,100,0.01);
- ti->set_selectable(4,true);
- ti->set_editable(4,true);
- ti->set_range(4,sample_library->sample_get_pitch_scale(E->get()));
-
- // Delete
- ti->set_cell_mode(5,TreeItem::CELL_MODE_STRING);
- ti->add_button(5,get_icon("Remove","EditorIcons"));
-
- }
-
- //player->add_sample("default",sample);
-}
-
-
-
-void SampleLibraryEditor::edit(Ref<SampleLibrary> p_sample_library) {
-
- sample_library=p_sample_library;
-
-
- if (!sample_library.is_null()) {
- player->set_sample_library(sample_library);
- _update_library();
- } else {
-
- hide();
- }
-
-}
-
-Variant SampleLibraryEditor::get_drag_data_fw(const Point2& p_point,Control* p_from) {
-
- TreeItem*ti =tree->get_item_at_pos(p_point);
- if (!ti)
- return Variant();
-
- String name = ti->get_metadata(0);
-
- RES res = sample_library->get_sample(name);
- if (!res.is_valid())
- return Variant();
-
- return EditorNode::get_singleton()->drag_resource(res,p_from);
-
-
-}
-
-bool SampleLibraryEditor::can_drop_data_fw(const Point2& p_point,const Variant& p_data,Control* p_from) const {
-
-
-
- Dictionary d = p_data;
-
- if (!d.has("type"))
- return false;
-
- if (d.has("from") && (Object*)(d["from"])==tree)
- return false;
-
- if (String(d["type"])=="resource" && d.has("resource")) {
- RES r=d["resource"];
-
- Ref<Sample> sample = r;
-
- if (sample.is_valid()) {
-
- return true;
- }
- }
-
-
- if (String(d["type"])=="files") {
-
- Vector<String> files = d["files"];
-
- if (files.size()==0)
- return false;
-
- for(int i=0;i<files.size();i++) {
- String file = files[0];
- String ftype = EditorFileSystem::get_singleton()->get_file_type(file);
-
- if (ftype!="Sample") {
- return false;
- }
-
- }
-
- return true;
-
- }
- return false;
-}
-
-void SampleLibraryEditor::drop_data_fw(const Point2& p_point,const Variant& p_data,Control* p_from) {
-
- if (!can_drop_data_fw(p_point,p_data,p_from))
- return;
-
- Dictionary d = p_data;
-
- if (!d.has("type"))
- return;
-
-
- if (String(d["type"])=="resource" && d.has("resource")) {
- RES r=d["resource"];
-
- Ref<Sample> sample = r;
-
- if (sample.is_valid()) {
-
- String basename;
- if (sample->get_name()!="") {
- basename=sample->get_name();
- } else if (sample->get_path().is_resource_file()) {
- basename = sample->get_path().get_basename();
- } else {
- basename="Sample";
- }
-
- String name=basename;
- int counter=0;
- while(sample_library->has_sample(name)) {
- counter++;
- name=basename+"_"+itos(counter);
- }
-
- undo_redo->create_action(TTR("Add Sample"));
- undo_redo->add_do_method(sample_library.operator->(),"add_sample",name,sample);
- undo_redo->add_undo_method(sample_library.operator->(),"remove_sample",name);
- undo_redo->add_do_method(this,"_update_library");
- undo_redo->add_undo_method(this,"_update_library");
- undo_redo->commit_action();
- }
- }
-
-
- if (String(d["type"])=="files") {
-
- PoolVector<String> files = d["files"];
-
- _file_load_request(files);
-
- }
-
-}
-
-
-void SampleLibraryEditor::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_gui_input"),&SampleLibraryEditor::_gui_input);
- ClassDB::bind_method(D_METHOD("_load_pressed"),&SampleLibraryEditor::_load_pressed);
- ClassDB::bind_method(D_METHOD("_item_edited"),&SampleLibraryEditor::_item_edited);
- ClassDB::bind_method(D_METHOD("_delete_pressed"),&SampleLibraryEditor::_delete_pressed);
- ClassDB::bind_method(D_METHOD("_file_load_request"),&SampleLibraryEditor::_file_load_request);
- ClassDB::bind_method(D_METHOD("_update_library"),&SampleLibraryEditor::_update_library);
- ClassDB::bind_method(D_METHOD("_button_pressed"),&SampleLibraryEditor::_button_pressed);
-
- ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &SampleLibraryEditor::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &SampleLibraryEditor::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("drop_data_fw"), &SampleLibraryEditor::drop_data_fw);
-
-}
-
-SampleLibraryEditor::SampleLibraryEditor() {
-
- player = memnew(SamplePlayer);
- add_child(player);
- add_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_stylebox("panel","Panel"));
-
-
- load = memnew( Button );
- load->set_position(Point2( 5, 5 ));
- load->set_size( Size2(1,1 ) );
- add_child(load);
-
- file = memnew( EditorFileDialog );
- add_child(file);
- List<String> extensions;
- ResourceLoader::get_recognized_extensions_for_type("Sample",&extensions);
- for(int i=0;i<extensions.size();i++)
- file->add_filter("*."+extensions[i]);
- file->set_mode(EditorFileDialog::MODE_OPEN_FILES);
-
- tree = memnew( Tree );
- tree->set_columns(6);
- add_child(tree);
- tree->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_BEGIN,5);
- tree->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,-5);
- tree->set_anchor_and_margin(MARGIN_TOP,ANCHOR_BEGIN,30);
- tree->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_END,-5);
- tree->set_column_titles_visible(true);
- tree->set_column_title(0,TTR("Name"));
- tree->set_column_title(1,TTR("Preview"));
- tree->set_column_title(2,TTR("Format"));
- tree->set_column_title(3,"dB");
- tree->set_column_title(4,TTR("Pitch"));
- tree->set_column_title(5,"");
-
- tree->set_column_min_width(1,150);
- tree->set_column_min_width(2,100);
- tree->set_column_min_width(3,50);
- tree->set_column_min_width(4,50);
- tree->set_column_min_width(5,32);
- tree->set_column_expand(1,false);
- tree->set_column_expand(2,false);
- tree->set_column_expand(3,false);
- tree->set_column_expand(4,false);
- tree->set_column_expand(5,false);
-
- tree->set_drag_forwarding(this);
-
- dialog = memnew( ConfirmationDialog );
- add_child( dialog );
-
- tree->connect("button_pressed",this,"_button_pressed");
- load->connect("pressed", this,"_load_pressed");
- file->connect("files_selected", this,"_file_load_request");
- tree->connect("item_edited", this,"_item_edited");
-
- is_playing = false;
-}
-
-
-void SampleLibraryEditorPlugin::edit(Object *p_object) {
-
- sample_library_editor->set_undo_redo(&get_undo_redo());
- SampleLibrary * s = p_object->cast_to<SampleLibrary>();
- if (!s)
- return;
-
- sample_library_editor->edit(Ref<SampleLibrary>(s));
-}
-
-bool SampleLibraryEditorPlugin::handles(Object *p_object) const {
-
- return p_object->is_class("SampleLibrary");
-}
-
-void SampleLibraryEditorPlugin::make_visible(bool p_visible) {
-
- if (p_visible) {
- //sample_library_editor->show();
- button->show();
- editor->make_bottom_panel_item_visible(sample_library_editor);
- //sample_library_editor->set_process(true);
- } else {
-
- if (sample_library_editor->is_visible_in_tree())
- editor->hide_bottom_panel();
- button->hide();
-
- //sample_library_editor->set_process(false);
- }
-
-}
-
-SampleLibraryEditorPlugin::SampleLibraryEditorPlugin(EditorNode *p_node) {
-
- editor=p_node;
- sample_library_editor = memnew( SampleLibraryEditor );
-
- //editor->get_viewport()->add_child(sample_library_editor);
- sample_library_editor->set_custom_minimum_size(Size2(0,250));
- button=p_node->add_bottom_panel_item("SampleLibrary",sample_library_editor);
- button->hide();
-
- //sample_library_editor->set_area_as_parent_rect();
- //sample_library_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END);
- //sample_library_editor->set_margin( MARGIN_TOP, 120 );
- //sample_library_editor->hide();
-
-
-
-}
-
-
-SampleLibraryEditorPlugin::~SampleLibraryEditorPlugin()
-{
-}
-#endif
diff --git a/editor/plugins/sample_library_editor_plugin.h b/editor/plugins/sample_library_editor_plugin.h
deleted file mode 100644
index 0244fa66ed..0000000000
--- a/editor/plugins/sample_library_editor_plugin.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*************************************************************************/
-/* sample_library_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef SAMPLE_LIBRARY_EDITOR_PLUGIN_H
-#define SAMPLE_LIBRARY_EDITOR_PLUGIN_H
-
-#if 0
-#include "editor/editor_node.h"
-#include "editor/editor_plugin.h"
-#include "scene/audio/sample_player.h"
-#include "scene/gui/dialogs.h"
-#include "scene/gui/file_dialog.h"
-#include "scene/gui/tree.h"
-#include "scene/resources/sample.h"
-
-
-class SampleLibraryEditor : public Panel {
-
- GDCLASS(SampleLibraryEditor, Panel );
-
-
-
- SamplePlayer *player;
- Ref<SampleLibrary> sample_library;
- Button *load;
- Tree *tree;
- bool is_playing;
- Object *last_sample_playing;
-
- EditorFileDialog *file;
-
- ConfirmationDialog *dialog;
-
-
- void _load_pressed();
- void _file_load_request(const PoolVector<String>& p_path);
- void _delete_pressed();
- void _update_library();
- void _item_edited();
-
- UndoRedo *undo_redo;
-
- void _button_pressed(Object *p_item,int p_column, int p_id);
-
- Variant get_drag_data_fw(const Point2& p_point,Control* p_from);
- bool can_drop_data_fw(const Point2& p_point,const Variant& p_data,Control* p_from) const;
- void drop_data_fw(const Point2& p_point,const Variant& p_data,Control* p_from);
-
-protected:
- void _notification(int p_what);
- void _gui_input(InputEvent p_event);
- static void _bind_methods();
-public:
-
- void set_undo_redo(UndoRedo *p_undo_redo) {undo_redo=p_undo_redo; }
- void edit(Ref<SampleLibrary> p_sample);
- SampleLibraryEditor();
-};
-
-class SampleLibraryEditorPlugin : public EditorPlugin {
-
- GDCLASS( SampleLibraryEditorPlugin, EditorPlugin );
-
- SampleLibraryEditor *sample_library_editor;
- EditorNode *editor;
- Button *button;
-
-public:
-
- virtual String get_name() const { return "SampleLibrary"; }
- bool has_main_screen() const { return false; }
- virtual void edit(Object *p_node);
- virtual bool handles(Object *p_node) const;
- virtual void make_visible(bool p_visible);
-
- SampleLibraryEditorPlugin(EditorNode *p_node);
- ~SampleLibraryEditorPlugin();
-
-};
-
-#endif
-#endif // SAMPLE_LIBRARY_EDITOR_PLUGIN_H
diff --git a/editor/plugins/sample_player_editor_plugin.cpp b/editor/plugins/sample_player_editor_plugin.cpp
deleted file mode 100644
index ea9b646a9b..0000000000
--- a/editor/plugins/sample_player_editor_plugin.cpp
+++ /dev/null
@@ -1,202 +0,0 @@
-/*************************************************************************/
-/* sample_player_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#if 0
-#include "sample_player_editor_plugin.h"
-
-#include "scene/resources/sample_library.h"
-
-
-void SamplePlayerEditor::_notification(int p_what) {
-
- if (p_what==NOTIFICATION_ENTER_TREE) {
- play->set_icon( get_icon("Play","EditorIcons") );
- stop->set_icon( get_icon("Stop","EditorIcons") );
- }
-
-}
-
-void SamplePlayerEditor::_node_removed(Node *p_node) {
-
- if(p_node==node) {
- node=NULL;
- hide();
- }
-
-}
-
-void SamplePlayerEditor::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_play"),&SamplePlayerEditor::_play);
- ClassDB::bind_method(D_METHOD("_stop"),&SamplePlayerEditor::_stop);
-
-}
-
-
-void SamplePlayerEditor::_play() {
-
- if (!node)
- return;
- if (samples->get_item_count()<=0)
- return;
-
- node->call("play",samples->get_item_text( samples->get_selected() ));
- stop->set_pressed(false);
- play->set_pressed(true);
-}
-
-void SamplePlayerEditor::_stop() {
-
- if (!node)
- return;
- if (samples->get_item_count()<=0)
- return;
-
- node->call("stop_all");
- print_line("STOP ALL!!");
- stop->set_pressed(true);
- play->set_pressed(false);
-
-}
-
-
-void SamplePlayerEditor::_update_sample_library() {
-
- samples->clear();
- Ref<SampleLibrary> sl = node->call("get_sample_library");
- if (sl.is_null()) {
- samples->add_item("<NO SAMPLE LIBRARY>");
- return; //no sample library;
- }
-
- List<StringName> samplenames;
- sl->get_sample_list(&samplenames);
- samplenames.sort_custom<StringName::AlphCompare>();
- for(List<StringName>::Element *E=samplenames.front();E;E=E->next()) {
- samples->add_item(E->get());
- }
-
-}
-
-void SamplePlayerEditor::edit(Node *p_sample_player) {
-
- node=p_sample_player;
- if (node) {
- _update_sample_library();
- }
-
-}
-SamplePlayerEditor::SamplePlayerEditor() {
-
-
- play = memnew( Button );
-
- play->set_position(Point2( 5, 5 ));
- play->set_toggle_mode(true);
- play->set_anchor_and_margin(MARGIN_LEFT,Control::ANCHOR_END,-250);
- play->set_anchor_and_margin(MARGIN_RIGHT,Control::ANCHOR_END,-230);
- play->set_anchor_and_margin(MARGIN_TOP,Control::ANCHOR_BEGIN,0);
- play->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_BEGIN,0);
-
- add_child(play);
-
- stop = memnew( Button );
-
- stop->set_position(Point2( 35, 5 ));
- stop->set_toggle_mode(true);
- stop->set_anchor_and_margin(MARGIN_LEFT,Control::ANCHOR_END,-220);
- stop->set_anchor_and_margin(MARGIN_RIGHT,Control::ANCHOR_END,-200);
- stop->set_anchor_and_margin(MARGIN_TOP,Control::ANCHOR_BEGIN,0);
- stop->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_BEGIN,0);
- add_child(stop);
-
- samples = memnew( OptionButton );
- samples->set_anchor_and_margin(MARGIN_LEFT,Control::ANCHOR_END,-190);
- samples->set_anchor_and_margin(MARGIN_RIGHT,Control::ANCHOR_END,-5);
- samples->set_anchor_and_margin(MARGIN_TOP,Control::ANCHOR_BEGIN,0);
- samples->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_BEGIN,0);
- add_child(samples);
-
- play->connect("pressed", this,"_play");
- stop->connect("pressed", this,"_stop");
-
-}
-
-
-void SamplePlayerEditorPlugin::edit(Object *p_object) {
-
- sample_player_editor->edit(p_object->cast_to<Node>());
-}
-
-bool SamplePlayerEditorPlugin::handles(Object *p_object) const {
-
- return p_object->is_class("SamplePlayer2D") || p_object->is_class("SamplePlayer") || p_object->is_class("SpatialSamplePlayer");
-}
-
-void SamplePlayerEditorPlugin::make_visible(bool p_visible) {
-
- if (p_visible) {
- sample_player_editor->show();
- sample_player_editor->set_fixed_process(true);
- } else {
-
- sample_player_editor->hide();
- sample_player_editor->set_fixed_process(false);
- sample_player_editor->edit(NULL);
- }
-
-}
-
-SamplePlayerEditorPlugin::SamplePlayerEditorPlugin(EditorNode *p_node) {
-
- editor=p_node;
- sample_player_editor = memnew( SamplePlayerEditor );
- editor->get_viewport()->add_child(sample_player_editor);
-
- sample_player_editor->set_anchor(MARGIN_LEFT,Control::ANCHOR_END);
- sample_player_editor->set_anchor(MARGIN_RIGHT,Control::ANCHOR_END);
- sample_player_editor->set_margin(MARGIN_LEFT,-250);
- sample_player_editor->set_margin(MARGIN_RIGHT,0);
- sample_player_editor->set_margin(MARGIN_TOP,0);
- sample_player_editor->set_margin(MARGIN_BOTTOM,10);
-
-
- sample_player_editor->hide();
-
-
-
-}
-
-
-SamplePlayerEditorPlugin::~SamplePlayerEditorPlugin()
-{
-}
-
-#endif
diff --git a/editor/plugins/sample_player_editor_plugin.h b/editor/plugins/sample_player_editor_plugin.h
deleted file mode 100644
index 5c1b25aaa2..0000000000
--- a/editor/plugins/sample_player_editor_plugin.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*************************************************************************/
-/* sample_player_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef SAMPLE_PLAYER_EDITOR_PLUGIN_H
-#define SAMPLE_PLAYER_EDITOR_PLUGIN_H
-
-#if 0
-
-#include "editor/editor_node.h"
-#include "editor/editor_plugin.h"
-#include "scene/3d/spatial_sample_player.h"
-#include "scene/audio/sample_player.h"
-#include "scene/gui/option_button.h"
-
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-
-class SamplePlayerEditor : public Control {
-
- GDCLASS(SamplePlayerEditor, Control );
-
- Panel *panel;
- Button * play;
- Button * stop;
- OptionButton *samples;
- Node *node;
-
-
- void _update_sample_library();
- void _play();
- void _stop();
-
-protected:
- void _notification(int p_what);
- void _node_removed(Node *p_node);
- static void _bind_methods();
-public:
-
- void edit(Node *p_sample_player);
- SamplePlayerEditor();
-};
-
-class SamplePlayerEditorPlugin : public EditorPlugin {
-
- GDCLASS( SamplePlayerEditorPlugin, EditorPlugin );
-
- SamplePlayerEditor *sample_player_editor;
- EditorNode *editor;
-
-public:
-
- virtual String get_name() const { return "SamplePlayer"; }
- bool has_main_screen() const { return false; }
- virtual void edit(Object *p_node);
- virtual bool handles(Object *p_node) const;
- virtual void make_visible(bool p_visible);
-
- SamplePlayerEditorPlugin(EditorNode *p_node);
- ~SamplePlayerEditorPlugin();
-
-};
-
-#endif
-#endif // SAMPLE_PLAYER_EDITOR_PLUGIN_H
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index e8770febd9..a529f152dc 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -29,24 +29,25 @@
/*************************************************************************/
#include "script_editor_plugin.h"
+#include "core/io/resource_loader.h"
+#include "core/io/resource_saver.h"
+#include "core/os/file_access.h"
+#include "core/os/input.h"
+#include "core/os/keyboard.h"
+#include "core/os/os.h"
+#include "core/project_settings.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
+#include "editor/node_dock.h"
#include "editor/script_editor_debugger.h"
-#include "io/resource_loader.h"
-#include "io/resource_saver.h"
-#include "node_dock.h"
-#include "os/file_access.h"
-#include "os/input.h"
-#include "os/keyboard.h"
-#include "os/os.h"
-#include "project_settings.h"
#include "scene/main/viewport.h"
+
/*** SCRIPT EDITOR ****/
void ScriptEditorBase::_bind_methods() {
ADD_SIGNAL(MethodInfo("name_changed"));
- ADD_SIGNAL(MethodInfo("script_changed"));
+ ADD_SIGNAL(MethodInfo("edited_script_changed"));
ADD_SIGNAL(MethodInfo("request_help_search", PropertyInfo(Variant::STRING, "topic")));
ADD_SIGNAL(MethodInfo("request_help_index"));
ADD_SIGNAL(MethodInfo("request_open_script_at_line", PropertyInfo(Variant::OBJECT, "script"), PropertyInfo(Variant::INT, "line")));
@@ -256,7 +257,7 @@ ScriptEditor *ScriptEditor::script_editor = NULL;
String ScriptEditor::_get_debug_tooltip(const String &p_text, Node *_se) {
- //ScriptEditorBase *se=_se->cast_to<ScriptEditorBase>();
+ //ScriptEditorBase *se=Object::cast_to<ScriptEditorBase>(_se);
String val = debugger->get_var_value(p_text);
if (val != String()) {
@@ -280,7 +281,7 @@ void ScriptEditor::_breaked(bool p_breaked, bool p_can_debug) {
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se) {
continue;
@@ -305,7 +306,7 @@ void ScriptEditor::_goto_script_line2(int p_line) {
if (selected < 0 || selected >= tab_container->get_child_count())
return;
- ScriptEditorBase *current = tab_container->get_child(selected)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *current = Object::cast_to<ScriptEditorBase>(tab_container->get_child(selected));
if (!current)
return;
@@ -318,7 +319,7 @@ void ScriptEditor::_goto_script_line(REF p_script, int p_line) {
if (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))) {
- Ref<Script> script = p_script->cast_to<Script>();
+ Ref<Script> script = Object::cast_to<Script>(*p_script);
if (!script.is_null() && script->get_path().is_resource_file())
edit(p_script, p_line, 0);
}
@@ -327,7 +328,7 @@ void ScriptEditor::_goto_script_line(REF p_script, int p_line) {
if (selected < 0 || selected >= tab_container->get_child_count())
return;
- ScriptEditorBase *current = tab_container->get_child(selected)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *current = Object::cast_to<ScriptEditorBase>(tab_container->get_child(selected));
if (!current)
return;
@@ -346,13 +347,13 @@ void ScriptEditor::_save_history() {
Node *n = tab_container->get_current_tab_control();
- if (n->cast_to<ScriptEditorBase>()) {
+ if (Object::cast_to<ScriptEditorBase>(n)) {
- history[history_pos].state = n->cast_to<ScriptEditorBase>()->get_edit_state();
+ history[history_pos].state = Object::cast_to<ScriptEditorBase>(n)->get_edit_state();
}
- if (n->cast_to<EditorHelp>()) {
+ if (Object::cast_to<EditorHelp>(n)) {
- history[history_pos].state = n->cast_to<EditorHelp>()->get_scroll();
+ history[history_pos].state = Object::cast_to<EditorHelp>(n)->get_scroll();
}
}
@@ -369,10 +370,7 @@ void ScriptEditor::_save_history() {
void ScriptEditor::_go_to_tab(int p_idx) {
- Node *cn = tab_container->get_child(p_idx);
- if (!cn)
- return;
- Control *c = cn->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(tab_container->get_child(p_idx));
if (!c)
return;
@@ -380,13 +378,13 @@ void ScriptEditor::_go_to_tab(int p_idx) {
Node *n = tab_container->get_current_tab_control();
- if (n->cast_to<ScriptEditorBase>()) {
+ if (Object::cast_to<ScriptEditorBase>(n)) {
- history[history_pos].state = n->cast_to<ScriptEditorBase>()->get_edit_state();
+ history[history_pos].state = Object::cast_to<ScriptEditorBase>(n)->get_edit_state();
}
- if (n->cast_to<EditorHelp>()) {
+ if (Object::cast_to<EditorHelp>(n)) {
- history[history_pos].state = n->cast_to<EditorHelp>()->get_scroll();
+ history[history_pos].state = Object::cast_to<EditorHelp>(n)->get_scroll();
}
}
@@ -402,21 +400,21 @@ void ScriptEditor::_go_to_tab(int p_idx) {
c = tab_container->get_current_tab_control();
- if (c->cast_to<ScriptEditorBase>()) {
+ if (Object::cast_to<ScriptEditorBase>(c)) {
- script_name_label->set_text(c->cast_to<ScriptEditorBase>()->get_name());
- script_icon->set_texture(c->cast_to<ScriptEditorBase>()->get_icon());
+ script_name_label->set_text(Object::cast_to<ScriptEditorBase>(c)->get_name());
+ script_icon->set_texture(Object::cast_to<ScriptEditorBase>(c)->get_icon());
if (is_visible_in_tree())
- c->cast_to<ScriptEditorBase>()->ensure_focus();
+ Object::cast_to<ScriptEditorBase>(c)->ensure_focus();
- notify_script_changed(c->cast_to<ScriptEditorBase>()->get_edited_script());
+ notify_script_changed(Object::cast_to<ScriptEditorBase>(c)->get_edited_script());
}
- if (c->cast_to<EditorHelp>()) {
+ if (Object::cast_to<EditorHelp>(c)) {
- script_name_label->set_text(c->cast_to<EditorHelp>()->get_class());
+ script_name_label->set_text(Object::cast_to<EditorHelp>(c)->get_class());
script_icon->set_texture(get_icon("Help", "EditorIcons"));
if (is_visible_in_tree())
- c->cast_to<EditorHelp>()->set_focused();
+ Object::cast_to<EditorHelp>(c)->set_focused();
}
c->set_meta("__editor_pass", ++edit_pass);
@@ -508,7 +506,7 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save) {
return;
Node *tselected = tab_container->get_child(selected);
- ScriptEditorBase *current = tab_container->get_child(selected)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *current = Object::cast_to<ScriptEditorBase>(tab_container->get_child(selected));
if (current) {
_add_recent_script(current->get_edited_script()->get_path());
if (p_save) {
@@ -517,7 +515,7 @@ void ScriptEditor::_close_tab(int p_idx, bool p_save) {
current->clear_edit_menu();
notify_script_close(current->get_edited_script());
} else {
- EditorHelp *help = tab_container->get_child(selected)->cast_to<EditorHelp>();
+ EditorHelp *help = Object::cast_to<EditorHelp>(tab_container->get_child(selected));
_add_recent_script(help->get_class());
}
@@ -575,7 +573,7 @@ void ScriptEditor::_close_docs_tab() {
int child_count = tab_container->get_child_count();
for (int i = child_count - 1; i >= 0; i--) {
- EditorHelp *se = tab_container->get_child(i)->cast_to<EditorHelp>();
+ EditorHelp *se = Object::cast_to<EditorHelp>(tab_container->get_child(i));
if (se) {
_close_tab(i);
@@ -589,7 +587,7 @@ void ScriptEditor::_close_all_tabs() {
for (int i = child_count - 1; i >= 0; i--) {
tab_container->set_current_tab(i);
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (se) {
@@ -605,7 +603,7 @@ void ScriptEditor::_close_all_tabs() {
}
void ScriptEditor::_ask_close_current_unsaved_tab(ScriptEditorBase *current) {
- erase_tab_confirm->set_text("Close and save changes?\n\"" + current->get_name() + "\"");
+ erase_tab_confirm->set_text(TTR("Close and save changes?\n\"") + current->get_name() + "\"");
erase_tab_confirm->popup_centered_minsize();
}
@@ -615,7 +613,7 @@ void ScriptEditor::_resave_scripts(const String &p_str) {
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se)
continue;
@@ -647,7 +645,7 @@ void ScriptEditor::_reload_scripts() {
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se) {
continue;
@@ -684,7 +682,7 @@ void ScriptEditor::_res_saved_callback(const Ref<Resource> &p_res) {
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se) {
continue;
@@ -727,7 +725,7 @@ bool ScriptEditor::_test_script_times_on_disk(Ref<Script> p_for_script) {
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (se) {
Ref<Script> script = se->get_edited_script();
@@ -791,7 +789,7 @@ Ref<Script> ScriptEditor::_get_current_script() {
if (selected < 0 || selected >= tab_container->get_child_count())
return NULL;
- ScriptEditorBase *current = tab_container->get_child(selected)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *current = Object::cast_to<ScriptEditorBase>(tab_container->get_child(selected));
if (current) {
return current->get_edited_script();
} else {
@@ -865,7 +863,7 @@ void ScriptEditor::_menu_option(int p_option) {
String current;
if (tab_container->get_tab_count() > 0) {
- EditorHelp *eh = tab_container->get_child(tab_container->get_current_tab())->cast_to<EditorHelp>();
+ EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_child(tab_container->get_current_tab()));
if (eh) {
current = eh->get_class();
}
@@ -919,7 +917,7 @@ void ScriptEditor::_menu_option(int p_option) {
if (selected < 0 || selected >= tab_container->get_child_count())
return;
- ScriptEditorBase *current = tab_container->get_child(selected)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *current = Object::cast_to<ScriptEditorBase>(tab_container->get_child(selected));
if (current) {
switch (p_option) {
@@ -956,7 +954,7 @@ void ScriptEditor::_menu_option(int p_option) {
current->convert_indent_to_tabs();
}
}
- editor->push_item(current->get_edited_script()->cast_to<Object>());
+ editor->push_item(Object::cast_to<Object>(current->get_edited_script().ptr()));
editor->save_resource_as(current->get_edited_script());
} break;
@@ -967,7 +965,33 @@ void ScriptEditor::_menu_option(int p_option) {
current->reload(p_option == FILE_TOOL_RELOAD_SOFT);
} break;
+ case FILE_RUN: {
+
+ Ref<Script> scr = current->get_edited_script();
+ if (scr.is_null()) {
+ EditorNode::get_singleton()->show_warning("Can't obtain the script for running");
+ break;
+ }
+ if (!scr->is_tool()) {
+
+ EditorNode::get_singleton()->show_warning("Script is not in tool mode, will not be able to run");
+ return;
+ }
+
+ if (!ClassDB::is_parent_class(scr->get_instance_base_type(), "EditorScript")) {
+
+ EditorNode::get_singleton()->show_warning("To run this script, it must inherit EditorScript and be set to tool mode");
+ return;
+ }
+
+ Ref<EditorScript> es = memnew(EditorScript);
+ es->set_script(scr.get_ref_ptr());
+ es->set_editor(EditorNode::get_singleton());
+ es->_run();
+
+ EditorNode::get_undo_redo()->clear_history();
+ } break;
case FILE_CLOSE: {
if (current->is_unsaved()) {
_ask_close_current_unsaved_tab(current);
@@ -1035,7 +1059,7 @@ void ScriptEditor::_menu_option(int p_option) {
}
} else {
- EditorHelp *help = tab_container->get_current_tab_control()->cast_to<EditorHelp>();
+ EditorHelp *help = Object::cast_to<EditorHelp>(tab_container->get_current_tab_control());
if (help) {
switch (p_option) {
@@ -1126,6 +1150,13 @@ void ScriptEditor::_notification(int p_what) {
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
tab_container->add_style_override("panel", editor->get_gui_base()->get_stylebox("ScriptPanel", "EditorStyles"));
+
+ help_search->set_icon(get_icon("HelpSearch", "EditorIcons"));
+ site_search->set_icon(get_icon("Instance", "EditorIcons"));
+ class_search->set_icon(get_icon("ClassList", "EditorIcons"));
+
+ script_forward->set_icon(get_icon("Forward", "EditorIcons"));
+ script_back->set_icon(get_icon("Back", "EditorIcons"));
} break;
default:
@@ -1139,7 +1170,7 @@ bool ScriptEditor::can_take_away_focus() const {
if (selected < 0 || selected >= tab_container->get_child_count())
return true;
- ScriptEditorBase *current = tab_container->get_child(selected)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *current = Object::cast_to<ScriptEditorBase>(tab_container->get_child(selected));
if (!current)
return true;
@@ -1150,7 +1181,7 @@ void ScriptEditor::close_builtin_scripts_from_scene(const String &p_scene) {
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (se) {
@@ -1194,122 +1225,11 @@ static const Node *_find_node_with_script(const Node *p_node, const RefPtr &p_sc
return NULL;
}
-Dictionary ScriptEditor::get_state() const {
-
- //apply_scripts();
-
- Dictionary state;
-#if 0
- Array paths;
- int open=-1;
-
- for(int i=0;i<tab_container->get_child_count();i++) {
-
- ScriptTextEditor *se = tab_container->get_child(i)->cast_to<ScriptTextEditor>();
- if (!se)
- continue;
-
-
- Ref<Script> script = se->get_edited_script();
- if (script->get_path()!="" && script->get_path().find("local://")==-1 && script->get_path().find("::")==-1) {
-
- paths.push_back(script->get_path());
- } else {
-
-
- const Node *owner = _find_node_with_script(get_tree()->get_root(),script.get_ref_ptr());
- if (owner)
- paths.push_back(owner->get_path());
-
- }
-
- if (i==tab_container->get_current_tab())
- open=i;
- }
-
- if (paths.size())
- state["sources"]=paths;
- if (open!=-1)
- state["current"]=open;
-
-#endif
- return state;
-}
-void ScriptEditor::set_state(const Dictionary &p_state) {
-
-#if 0
- print_line("attempt set state: "+String(Variant(p_state)));
-
- if (!p_state.has("sources"))
- return; //bleh
-
- Array sources = p_state["sources"];
- for(int i=0;i<sources.size();i++) {
-
- Variant source=sources[i];
-
- Ref<Script> script;
-
- if (source.get_type()==Variant::NODE_PATH) {
-
-
- Node *owner=get_tree()->get_root()->get_node(source);
- if (!owner)
- continue;
-
- script = owner->get_script();
- } else if (source.get_type()==Variant::STRING) {
-
-
- script = ResourceLoader::load(source,"Script");
- }
-
-
- if (script.is_null()) //ah well..
- continue;
-
- editor->call("_resource_selected",script);
- }
-
- if (p_state.has("current")) {
- tab_container->set_current_tab(p_state["current"]);
- }
-#endif
-}
-void ScriptEditor::clear() {
-#if 0
- List<ScriptTextEditor*> stes;
- for(int i=0;i<tab_container->get_child_count();i++) {
-
- ScriptTextEditor *se = tab_container->get_child(i)->cast_to<ScriptTextEditor>();
- if (!se)
- continue;
- stes.push_back(se);
-
- }
-
- while(stes.size()) {
-
- memdelete(stes.front()->get());
- stes.pop_front();
- }
-
- int idx = tab_container->get_current_tab();
- if (idx>=tab_container->get_child_count())
- idx=tab_container->get_child_count()-1;
- if (idx>=0) {
- tab_container->set_current_tab(idx);
- script_list->select( script_list->find_metadata(idx) );
- }
-
-#endif
-}
-
void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) {
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se)
continue;
@@ -1335,10 +1255,8 @@ void ScriptEditor::ensure_focus_current() {
if (cidx < 0 || cidx >= tab_container->get_tab_count())
return;
- Control *c = tab_container->get_child(cidx)->cast_to<Control>();
- if (!c)
- return;
- ScriptEditorBase *se = c->cast_to<ScriptEditorBase>();
+ Control *c = Object::cast_to<Control>(tab_container->get_child(cidx));
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(c);
if (!se)
return;
se->ensure_focus();
@@ -1346,7 +1264,7 @@ void ScriptEditor::ensure_focus_current() {
void ScriptEditor::_members_overview_selected(int p_idx) {
Node *current = tab_container->get_child(tab_container->get_current_tab());
- ScriptEditorBase *se = current->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(current);
if (!se) {
return;
}
@@ -1368,7 +1286,7 @@ void ScriptEditor::ensure_select_current() {
Node *current = tab_container->get_child(tab_container->get_current_tab());
- ScriptEditorBase *se = current->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(current);
if (se) {
Ref<Script> script = se->get_edited_script();
@@ -1380,7 +1298,7 @@ void ScriptEditor::ensure_select_current() {
//search_menu->show();
}
- EditorHelp *eh = current->cast_to<EditorHelp>();
+ EditorHelp *eh = Object::cast_to<EditorHelp>(current);
if (eh) {
//edit_menu->hide();
@@ -1430,7 +1348,7 @@ void ScriptEditor::_update_members_overview_visibility() {
return;
Node *current = tab_container->get_child(tab_container->get_current_tab());
- ScriptEditorBase *se = current->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(current);
if (!se) {
members_overview->set_visible(false);
return;
@@ -1451,7 +1369,7 @@ void ScriptEditor::_update_members_overview() {
return;
Node *current = tab_container->get_child(tab_container->get_current_tab());
- ScriptEditorBase *se = current->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(current);
if (!se) {
return;
}
@@ -1525,7 +1443,7 @@ void ScriptEditor::_update_script_names() {
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (se) {
String name = se->get_name();
@@ -1568,12 +1486,12 @@ void ScriptEditor::_update_script_names() {
sedata.push_back(sd);
}
- EditorHelp *eh = tab_container->get_child(i)->cast_to<EditorHelp>();
+ EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_child(i));
if (eh) {
String name = eh->get_class();
Ref<Texture> icon = get_icon("Help", "EditorIcons");
- String tooltip = name + " Class Reference";
+ String tooltip = name + TTR(" Class Reference");
_ScriptEditorItemData sd;
sd.icon = icon;
@@ -1663,7 +1581,7 @@ bool ScriptEditor::edit(const Ref<Script> &p_script, int p_line, int p_col, bool
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se)
continue;
@@ -1711,7 +1629,7 @@ bool ScriptEditor::edit(const Ref<Script> &p_script, int p_line, int p_col, bool
_update_script_names();
_save_layout();
se->connect("name_changed", this, "_update_script_names");
- se->connect("script_changed", this, "_script_changed");
+ se->connect("edited_script_changed", this, "_script_changed");
se->connect("request_help_search", this, "_help_search");
se->connect("request_open_script_at_line", this, "_goto_script_line");
se->connect("go_to_help", this, "_help_class_goto");
@@ -1733,7 +1651,7 @@ void ScriptEditor::save_all_scripts() {
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se)
continue;
@@ -1771,7 +1689,7 @@ void ScriptEditor::apply_scripts() const {
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se)
continue;
se->apply_code();
@@ -1802,7 +1720,7 @@ void ScriptEditor::_editor_stop() {
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se) {
continue;
@@ -1823,7 +1741,7 @@ void ScriptEditor::_add_callback(Object *p_obj, const String &p_function, const
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se)
continue;
if (se->get_edited_script() != script)
@@ -1874,7 +1792,7 @@ void ScriptEditor::_editor_settings_changed() {
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se)
continue;
@@ -1977,7 +1895,7 @@ void ScriptEditor::get_window_layout(Ref<ConfigFile> p_layout) {
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (se) {
String path = se->get_edited_script()->get_path();
@@ -1987,7 +1905,7 @@ void ScriptEditor::get_window_layout(Ref<ConfigFile> p_layout) {
scripts.push_back(path);
}
- EditorHelp *eh = tab_container->get_child(i)->cast_to<EditorHelp>();
+ EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_child(i));
if (eh) {
@@ -2007,7 +1925,7 @@ void ScriptEditor::_help_class_open(const String &p_class) {
for (int i = 0; i < tab_container->get_child_count(); i++) {
- EditorHelp *eh = tab_container->get_child(i)->cast_to<EditorHelp>();
+ EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_child(i));
if (eh && eh->get_class() == p_class) {
@@ -2034,7 +1952,7 @@ void ScriptEditor::_help_class_goto(const String &p_desc) {
for (int i = 0; i < tab_container->get_child_count(); i++) {
- EditorHelp *eh = tab_container->get_child(i)->cast_to<EditorHelp>();
+ EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_child(i));
if (eh && eh->get_class() == cname) {
@@ -2062,7 +1980,7 @@ void ScriptEditor::_update_selected_editor_menu() {
bool current = tab_container->get_current_tab() == i;
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (se && se->get_edit_menu()) {
if (current)
@@ -2072,10 +1990,7 @@ void ScriptEditor::_update_selected_editor_menu() {
}
}
- EditorHelp *eh = NULL;
- if (tab_container->get_current_tab_control())
- eh = tab_container->get_current_tab_control()->cast_to<EditorHelp>();
-
+ EditorHelp *eh = Object::cast_to<EditorHelp>(tab_container->get_current_tab_control());
if (eh) {
script_search_menu->show();
} else {
@@ -2087,13 +2002,13 @@ void ScriptEditor::_update_history_pos(int p_new_pos) {
Node *n = tab_container->get_current_tab_control();
- if (n->cast_to<ScriptEditorBase>()) {
+ if (Object::cast_to<ScriptEditorBase>(n)) {
- history[history_pos].state = n->cast_to<ScriptEditorBase>()->get_edit_state();
+ history[history_pos].state = Object::cast_to<ScriptEditorBase>(n)->get_edit_state();
}
- if (n->cast_to<EditorHelp>()) {
+ if (Object::cast_to<EditorHelp>(n)) {
- history[history_pos].state = n->cast_to<EditorHelp>()->get_scroll();
+ history[history_pos].state = Object::cast_to<EditorHelp>(n)->get_scroll();
}
history_pos = p_new_pos;
@@ -2101,18 +2016,18 @@ void ScriptEditor::_update_history_pos(int p_new_pos) {
n = history[history_pos].control;
- if (n->cast_to<ScriptEditorBase>()) {
+ if (Object::cast_to<ScriptEditorBase>(n)) {
- n->cast_to<ScriptEditorBase>()->set_edit_state(history[history_pos].state);
- n->cast_to<ScriptEditorBase>()->ensure_focus();
+ Object::cast_to<ScriptEditorBase>(n)->set_edit_state(history[history_pos].state);
+ Object::cast_to<ScriptEditorBase>(n)->ensure_focus();
- notify_script_changed(n->cast_to<ScriptEditorBase>()->get_edited_script());
+ notify_script_changed(Object::cast_to<ScriptEditorBase>(n)->get_edited_script());
}
- if (n->cast_to<EditorHelp>()) {
+ if (Object::cast_to<EditorHelp>(n)) {
- n->cast_to<EditorHelp>()->set_scroll(history[history_pos].state);
- n->cast_to<EditorHelp>()->set_focused();
+ Object::cast_to<EditorHelp>(n)->set_scroll(history[history_pos].state);
+ Object::cast_to<EditorHelp>(n)->set_focused();
}
n->set_meta("__editor_pass", ++edit_pass);
@@ -2140,7 +2055,7 @@ Vector<Ref<Script> > ScriptEditor::get_open_scripts() const {
Vector<Ref<Script> > out_scripts = Vector<Ref<Script> >();
for (int i = 0; i < tab_container->get_child_count(); i++) {
- ScriptEditorBase *se = tab_container->get_child(i)->cast_to<ScriptEditorBase>();
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
if (!se)
continue;
out_scripts.push_back(se->get_edited_script());
@@ -2252,8 +2167,8 @@ void ScriptEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_current_script"), &ScriptEditor::_get_current_script);
ClassDB::bind_method(D_METHOD("get_open_scripts"), &ScriptEditor::_get_open_scripts);
- ADD_SIGNAL(MethodInfo("editor_script_changed", PropertyInfo(Variant::OBJECT, "script:Script")));
- ADD_SIGNAL(MethodInfo("script_close", PropertyInfo(Variant::OBJECT, "script:Script")));
+ ADD_SIGNAL(MethodInfo("editor_script_changed", PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script")));
+ ADD_SIGNAL(MethodInfo("script_close", PropertyInfo(Variant::OBJECT, "script", PROPERTY_HINT_RESOURCE_TYPE, "Script")));
}
ScriptEditor::ScriptEditor(EditorNode *p_editor) {
@@ -2338,6 +2253,8 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_file", TTR("Close"), KEY_MASK_CMD | KEY_W), FILE_CLOSE);
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_all", TTR("Close All")), CLOSE_ALL);
file_menu->get_popup()->add_separator();
+ file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/run_file", TTR("Run"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_X), FILE_RUN);
+ file_menu->get_popup()->add_separator();
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_scripts_panel", TTR("Toggle Scripts Panel"), KEY_MASK_CMD | KEY_BACKSLASH), TOGGLE_SCRIPTS_PANEL);
file_menu->get_popup()->connect("id_pressed", this, "_menu_option");
@@ -2368,19 +2285,6 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_BREAK), true);
debug_menu->get_popup()->set_item_disabled(debug_menu->get_popup()->get_item_index(DEBUG_CONTINUE), true);
-#if 0
- window_menu = memnew( MenuButton );
- menu_hb->add_child(window_menu);
- window_menu->set_text(TTR("Window"));
- window_menu->get_popup()->add_item(TTR("Close"),WINDOW_CLOSE,KEY_MASK_CMD|KEY_W);
- window_menu->get_popup()->add_separator();
- window_menu->get_popup()->add_item(TTR("Move Left"),WINDOW_MOVE_LEFT,KEY_MASK_CMD|KEY_LEFT);
- window_menu->get_popup()->add_item(TTR("Move Right"),WINDOW_MOVE_RIGHT,KEY_MASK_CMD|KEY_RIGHT);
- window_menu->get_popup()->add_separator();
- window_menu->get_popup()->connect("id_pressed", this,"_menu_option");
-
-#endif
-
menu_hb->add_spacer();
script_icon = memnew(TextureRect);
@@ -2510,17 +2414,17 @@ ScriptEditor::~ScriptEditor() {
void ScriptEditorPlugin::edit(Object *p_object) {
- if (!p_object->cast_to<Script>())
+ if (!Object::cast_to<Script>(p_object))
return;
- script_editor->edit(p_object->cast_to<Script>());
+ script_editor->edit(Object::cast_to<Script>(p_object));
}
bool ScriptEditorPlugin::handles(Object *p_object) const {
- if (p_object->cast_to<Script>()) {
+ if (Object::cast_to<Script>(p_object)) {
- bool valid = _can_open_in_editor(p_object->cast_to<Script>());
+ bool valid = _can_open_in_editor(Object::cast_to<Script>(p_object));
if (!valid) { //user tried to open it by clicking
EditorNode::get_singleton()->show_warning(TTR("Built-in scripts can only be edited when the scene they belong to is loaded"));
@@ -2549,20 +2453,6 @@ void ScriptEditorPlugin::selected_notify() {
script_editor->ensure_select_current();
}
-Dictionary ScriptEditorPlugin::get_state() const {
-
- return script_editor->get_state();
-}
-
-void ScriptEditorPlugin::set_state(const Dictionary &p_state) {
-
- script_editor->set_state(p_state);
-}
-void ScriptEditorPlugin::clear() {
-
- script_editor->clear();
-}
-
void ScriptEditorPlugin::save_external_data() {
script_editor->save_all_scripts();
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index f87a20a1f0..d2677c6a4a 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -131,6 +131,7 @@ class ScriptEditor : public PanelContainer {
FILE_RELOAD_THEME,
FILE_SAVE_THEME,
FILE_SAVE_THEME_AS,
+ FILE_RUN,
FILE_CLOSE,
CLOSE_DOCS,
CLOSE_ALL,
@@ -344,14 +345,8 @@ public:
_FORCE_INLINE_ bool edit(const Ref<Script> &p_script, bool p_grab_focus = true) { return edit(p_script, -1, 0, p_grab_focus); }
bool edit(const Ref<Script> &p_script, int p_line, int p_col, bool p_grab_focus = true);
- Dictionary get_state() const;
- void set_state(const Dictionary &p_state);
- void clear();
-
void get_breakpoints(List<String> *p_breakpoints);
- //void swap_lines(TextEdit *tx, int line1, int line2);
-
void save_all_scripts();
void set_window_layout(Ref<ConfigFile> p_layout);
@@ -398,10 +393,6 @@ public:
virtual void make_visible(bool p_visible);
virtual void selected_notify();
- Dictionary get_state() const;
- virtual void set_state(const Dictionary &p_state);
- virtual void clear();
-
virtual void save_external_data();
virtual void apply_changes();
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index e69fa6da88..33890d890d 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -120,17 +120,29 @@ void ScriptTextEditor::_load_theme_settings() {
//colorize core types
Color basetype_color = EDITOR_DEF("text_editor/highlighting/base_type_color", Color(0.3, 0.3, 0.0));
+ text_edit->add_keyword_color("String", basetype_color);
text_edit->add_keyword_color("Vector2", basetype_color);
+ text_edit->add_keyword_color("Rect2", basetype_color);
+ text_edit->add_keyword_color("Transform2D", basetype_color);
text_edit->add_keyword_color("Vector3", basetype_color);
+ text_edit->add_keyword_color("Rect3", basetype_color);
+ text_edit->add_keyword_color("Basis", basetype_color);
text_edit->add_keyword_color("Plane", basetype_color);
- text_edit->add_keyword_color("Quat", basetype_color);
- text_edit->add_keyword_color("AABB", basetype_color);
- text_edit->add_keyword_color("Matrix3", basetype_color);
text_edit->add_keyword_color("Transform", basetype_color);
+ text_edit->add_keyword_color("Quat", basetype_color);
text_edit->add_keyword_color("Color", basetype_color);
- text_edit->add_keyword_color("Image", basetype_color);
- text_edit->add_keyword_color("Rect2", basetype_color);
+ text_edit->add_keyword_color("Object", basetype_color);
text_edit->add_keyword_color("NodePath", basetype_color);
+ text_edit->add_keyword_color("RID", basetype_color);
+ text_edit->add_keyword_color("Dictionary", basetype_color);
+ text_edit->add_keyword_color("Array", basetype_color);
+ text_edit->add_keyword_color("PoolByteArray", basetype_color);
+ text_edit->add_keyword_color("PoolIntArray", basetype_color);
+ text_edit->add_keyword_color("PoolRealArray", basetype_color);
+ text_edit->add_keyword_color("PoolStringArray", basetype_color);
+ text_edit->add_keyword_color("PoolVector2Array", basetype_color);
+ text_edit->add_keyword_color("PoolVector3Array", basetype_color);
+ text_edit->add_keyword_color("PoolColorArray", basetype_color);
//colorize engine types
Color type_color = EDITOR_DEF("text_editor/highlighting/engine_type_color", Color(0.0, 0.2, 0.4));
@@ -529,7 +541,7 @@ void ScriptTextEditor::_validate_script() {
}
emit_signal("name_changed");
- emit_signal("script_changed");
+ emit_signal("edited_script_changed");
}
static Node *_find_node_for_script(Node *p_base, Node *p_current, const Ref<Script> &p_script) {
@@ -602,13 +614,13 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo
}
}
-void ScriptTextEditor::_code_complete_scripts(void *p_ud, const String &p_code, List<String> *r_options) {
+void ScriptTextEditor::_code_complete_scripts(void *p_ud, const String &p_code, List<String> *r_options, bool &r_force) {
ScriptTextEditor *ste = (ScriptTextEditor *)p_ud;
- ste->_code_complete_script(p_code, r_options);
+ ste->_code_complete_script(p_code, r_options, r_force);
}
-void ScriptTextEditor::_code_complete_script(const String &p_code, List<String> *r_options) {
+void ScriptTextEditor::_code_complete_script(const String &p_code, List<String> *r_options, bool &r_force) {
if (color_panel->is_visible_in_tree()) return;
Node *base = get_tree()->get_edited_scene_root();
@@ -616,7 +628,7 @@ void ScriptTextEditor::_code_complete_script(const String &p_code, List<String>
base = _find_node_for_script(base, base, script);
}
String hint;
- Error err = script->get_language()->complete_code(p_code, script->get_path().get_base_dir(), base, r_options, hint);
+ Error err = script->get_language()->complete_code(p_code, script->get_path().get_base_dir(), base, r_options, r_force, hint);
if (hint != "") {
code_editor->get_text_edit()->set_code_hint(hint);
}
@@ -1230,7 +1242,7 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
}
if (res->get_path().is_resource_file()) {
- EditorNode::get_singleton()->show_warning("Only resources from filesystem can be dropped.");
+ EditorNode::get_singleton()->show_warning(TTR("Only resources from filesystem can be dropped."));
return;
}
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index c505976223..f8b7470ec8 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -94,12 +94,12 @@ class ScriptTextEditor : public ScriptEditorBase {
};
protected:
- static void _code_complete_scripts(void *p_ud, const String &p_code, List<String> *r_options);
+ static void _code_complete_scripts(void *p_ud, const String &p_code, List<String> *r_options, bool &r_force);
void _breakpoint_toggled(int p_row);
//no longer virtual
void _validate_script();
- void _code_complete_script(const String &p_code, List<String> *r_options);
+ void _code_complete_script(const String &p_code, List<String> *r_options, bool &r_force);
void _load_theme_settings();
void _notification(int p_what);
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index bad88979ac..13b0391a87 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -29,20 +29,17 @@
/*************************************************************************/
#include "shader_editor_plugin.h"
+#include "core/io/resource_loader.h"
+#include "core/io/resource_saver.h"
+#include "core/os/keyboard.h"
+#include "core/os/os.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor/property_editor.h"
-#include "io/resource_loader.h"
-#include "io/resource_saver.h"
-#include "os/keyboard.h"
-#include "os/os.h"
#include "scene/resources/shader_graph.h"
#include "servers/visual/shader_types.h"
-#include "spatial_editor_plugin.h"
-/*** SETTINGS EDITOR ****/
-
-/*** SCRIPT EDITOR ****/
+/*** SHADER SCRIPT EDITOR ****/
Ref<Shader> ShaderTextEditor::get_edited_shader() const {
@@ -96,9 +93,9 @@ void ShaderTextEditor::_load_theme_settings() {
if (shader.is_valid()) {
- for (const Map<StringName, Map<StringName, ShaderLanguage::DataType> >::Element *E = ShaderTypes::get_singleton()->get_functions(VisualServer::ShaderMode(shader->get_mode())).front(); E; E = E->next()) {
+ for (const Map<StringName, ShaderLanguage::FunctionInfo>::Element *E = ShaderTypes::get_singleton()->get_functions(VisualServer::ShaderMode(shader->get_mode())).front(); E; E = E->next()) {
- for (const Map<StringName, ShaderLanguage::DataType>::Element *F = E->get().front(); F; F = F->next()) {
+ for (const Map<StringName, ShaderLanguage::DataType>::Element *F = E->get().built_ins.front(); F; F = F->next()) {
keywords.push_back(F->key());
}
}
@@ -200,8 +197,6 @@ void ShaderTextEditor::_validate_script() {
}
void ShaderTextEditor::_bind_methods() {
-
- //ADD_SIGNAL( MethodInfo("script_changed") );
}
ShaderTextEditor::ShaderTextEditor() {
@@ -255,9 +250,6 @@ void ShaderEditor::_menu_option(int p_option) {
current->get_find_replace_bar()->popup_replace();
} break;
- //case SEARCH_LOCATE_SYMBOL: {
-
- //} break;
case SEARCH_GOTO_LINE: {
goto_line_dialog->popup_find_line(current->get_text_edit());
@@ -277,90 +269,6 @@ void ShaderEditor::_notification(int p_what) {
}
}
-Dictionary ShaderEditor::get_state() const {
-#if 0
- apply_shaders();
-
- Dictionary state;
-
- Array paths;
- int open=-1;
-
- for(int i=0;i<tab_container->get_child_count();i++) {
-
- ShaderTextEditor *ste = tab_container->get_child(i)->cast_to<ShaderTextEditor>();
- if (!ste)
- continue;
-
-
- Ref<Shader> shader = ste->get_edited_shader();
- if (shader->get_path()!="" && shader->get_path().find("local://")==-1 && shader->get_path().find("::")==-1) {
-
- paths.push_back(shader->get_path());
- } else {
-
-
- const Node *owner = _find_node_with_shader(get_root_node(),shader.get_ref_ptr());
- if (owner)
- paths.push_back(owner->get_path());
-
- }
-
- if (i==tab_container->get_current_tab())
- open=i;
- }
-
- if (paths.size())
- state["sources"]=paths;
- if (open!=-1)
- state["current"]=open;
-
-
- return state;
-#endif
- return Dictionary();
-}
-void ShaderEditor::set_state(const Dictionary &p_state) {
-#if 0
- print_line("setting state..");
- if (!p_state.has("sources"))
- return; //bleh
-
- Array sources = p_state["sources"];
- for(int i=0;i<sources.size();i++) {
-
- Variant source=sources[i];
-
- Ref<Shader> shader;
-
- if (source.get_type()==Variant::NODE_PATH) {
-
- print_line("cain find owner at path "+String(source));
- Node *owner=get_root_node()->get_node(source);
- if (!owner)
- continue;
-
- shader = owner->get_shader();
- } else if (source.get_type()==Variant::STRING) {
-
- print_line("loading at path "+String(source));
- shader = ResourceLoader::load(source,"Shader");
- }
-
- print_line("found shader at "+String(source)+"? - "+itos(shader.is_null()));
- if (shader.is_null()) //ah well..
- continue;
-
- get_scene()->get_root_node()->call("_resource_selected",shader);
- }
-
- if (p_state.has("current"))
- tab_container->set_current_tab(p_state["current"]);
-#endif
-}
-void ShaderEditor::clear() {
-}
-
void ShaderEditor::_params_changed() {
shader_editor->_validate_script();
@@ -372,6 +280,7 @@ void ShaderEditor::_editor_settings_changed() {
shader_editor->get_text_edit()->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/cursor/scroll_past_end_of_file"));
shader_editor->get_text_edit()->set_indent_size(EditorSettings::get_singleton()->get("text_editor/indent/size"));
shader_editor->get_text_edit()->set_indent_using_spaces(EditorSettings::get_singleton()->get("text_editor/indent/type"));
+ shader_editor->get_text_edit()->set_auto_indent(EditorSettings::get_singleton()->get("text_editor/indent/auto_indent"));
shader_editor->get_text_edit()->set_draw_tabs(EditorSettings::get_singleton()->get("text_editor/indent/draw_tabs"));
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"));
@@ -397,7 +306,7 @@ void ShaderEditor::ensure_select_current() {
/*
if (tab_container->get_child_count() && tab_container->get_current_tab()>=0) {
- ShaderTextEditor *ste = tab_container->get_child(tab_container->get_current_tab())->cast_to<ShaderTextEditor>();
+ ShaderTextEditor *ste = Object::cast_to<ShaderTextEditor>(tab_container->get_child(tab_container->get_current_tab()));
if (!ste)
return;
Ref<Shader> shader = ste->get_edited_shader();
@@ -486,16 +395,16 @@ ShaderEditor::ShaderEditor() {
void ShaderEditorPlugin::edit(Object *p_object) {
- Shader *s = p_object->cast_to<Shader>();
+ Shader *s = Object::cast_to<Shader>(p_object);
shader_editor->edit(s);
}
bool ShaderEditorPlugin::handles(Object *p_object) const {
bool handles = true;
- Shader *shader = p_object->cast_to<Shader>();
+ Shader *shader = Object::cast_to<Shader>(p_object);
/*
- if (!shader || shader->cast_to<ShaderGraph>()) // Don't handle ShaderGraph's
+ if (Object::cast_to<ShaderGraph>(shader)) // Don't handle ShaderGraph's
handles = false;
*/
@@ -522,20 +431,6 @@ void ShaderEditorPlugin::selected_notify() {
shader_editor->ensure_select_current();
}
-Dictionary ShaderEditorPlugin::get_state() const {
-
- return shader_editor->get_state();
-}
-
-void ShaderEditorPlugin::set_state(const Dictionary &p_state) {
-
- shader_editor->set_state(p_state);
-}
-void ShaderEditorPlugin::clear() {
-
- shader_editor->clear();
-}
-
void ShaderEditorPlugin::save_external_data() {
shader_editor->save_external_data();
diff --git a/editor/plugins/shader_editor_plugin.h b/editor/plugins/shader_editor_plugin.h
index 8625267a63..ab18784d9f 100644
--- a/editor/plugins/shader_editor_plugin.h
+++ b/editor/plugins/shader_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -77,7 +77,6 @@ class ShaderEditor : public VBoxContainer {
SEARCH_FIND_NEXT,
SEARCH_FIND_PREV,
SEARCH_REPLACE,
- //SEARCH_LOCATE_SYMBOL,
SEARCH_GOTO_LINE,
};
@@ -108,10 +107,6 @@ public:
void ensure_select_current();
void edit(const Ref<Shader> &p_shader);
- Dictionary get_state() const;
- void set_state(const Dictionary &p_state);
- void clear();
-
virtual Size2 get_minimum_size() const { return Size2(0, 200); }
void save_external_data();
@@ -135,10 +130,6 @@ public:
virtual void make_visible(bool p_visible);
virtual void selected_notify();
- Dictionary get_state() const;
- virtual void set_state(const Dictionary &p_state);
- virtual void clear();
-
virtual void save_external_data();
virtual void apply_changes();
diff --git a/editor/plugins/shader_graph_editor_plugin.cpp b/editor/plugins/shader_graph_editor_plugin.cpp
index 5506c035ec..732344cb78 100644
--- a/editor/plugins/shader_graph_editor_plugin.cpp
+++ b/editor/plugins/shader_graph_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -27,9 +27,11 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "shader_graph_editor_plugin.h"
+// FIXME: Godot 3.0 broke compatibility with ShaderGraphEditorPlugin,
+// it needs to be ported to the new shader language.
#if 0
+#include "shader_graph_editor_plugin.h"
#include "canvas_item_editor_plugin.h"
#include "os/keyboard.h"
@@ -539,22 +541,7 @@ void GraphCurveMapEdit::_plot_curve(const Vector2& p_a,const Vector2& p_b,const
newy = CLAMP ((Math::round (y)), 0, ymax);
/* if this point is different than the last one...then draw it */
- if ((lastx != newx) || (lasty != newy))
- {
-#if 0
- if(fix255)
- {
- /* use fixed array size (for the curve graph) */
- cd->curve[cd->outline][newx] = newy;
- }
- else
- {
- /* use dynamic allocated curve_ptr (for the real curve) */
- cd->curve_ptr[cd->outline][newx] = newy;
-
- if(gb_debug) printf("outline: %d cX: %d cY: %d\n", (int)cd->outline, (int)newx, (int)newy);
- }
-#endif
+ if ((lastx != newx) || (lasty != newy)) {
draw_line(Vector2(lastx,ymax-lasty),Vector2(newx,ymax-newy),Color(0.8,0.8,0.8,0.8),2.0);
}
@@ -839,7 +826,7 @@ void ShaderGraphView::_vec_input_changed(double p_value, int p_id,Array p_arr){
void ShaderGraphView::_xform_input_changed(int p_id, Node *p_button){
- ToolButton *tb = p_button->cast_to<ToolButton>();
+ ToolButton *tb = Object::cast_to<ToolButton>(p_button);
ped_popup->set_position(tb->get_global_position()+Vector2(0,tb->get_size().height));
ped_popup->set_size(tb->get_size());
edited_id=p_id;
@@ -850,7 +837,7 @@ void ShaderGraphView::_xform_input_changed(int p_id, Node *p_button){
}
void ShaderGraphView::_xform_const_changed(int p_id, Node *p_button){
- ToolButton *tb = p_button->cast_to<ToolButton>();
+ ToolButton *tb = Object::cast_to<ToolButton>(p_button);
ped_popup->set_position(tb->get_global_position()+Vector2(0,tb->get_size().height));
ped_popup->set_size(tb->get_size());
edited_id=p_id;
@@ -964,7 +951,7 @@ void ShaderGraphView::_variant_edited() {
void ShaderGraphView::_comment_edited(int p_id,Node* p_button) {
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- TextEdit *te=p_button->cast_to<TextEdit>();
+ TextEdit *te=Object::cast_to<TextEdit>(p_button);
ur->create_action(TTR("Change Comment"),UndoRedo::MERGE_ENDS);
ur->add_do_method(graph.ptr(),"comment_node_set_text",type,p_id,te->get_text());
ur->add_undo_method(graph.ptr(),"comment_node_set_text",type,p_id,graph->comment_node_get_text(type,p_id));
@@ -978,7 +965,7 @@ void ShaderGraphView::_comment_edited(int p_id,Node* p_button) {
void ShaderGraphView::_color_ramp_changed(int p_id,Node* p_ramp) {
- GraphColorRampEdit *cr=p_ramp->cast_to<GraphColorRampEdit>();
+ GraphColorRampEdit *cr=Object::cast_to<GraphColorRampEdit>(p_ramp);
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
@@ -1020,7 +1007,7 @@ void ShaderGraphView::_color_ramp_changed(int p_id,Node* p_ramp) {
void ShaderGraphView::_curve_changed(int p_id,Node* p_curve) {
- GraphCurveMapEdit *cr=p_curve->cast_to<GraphCurveMapEdit>();
+ GraphCurveMapEdit *cr=Object::cast_to<GraphCurveMapEdit>(p_curve);
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
@@ -1057,7 +1044,7 @@ void ShaderGraphView::_curve_changed(int p_id,Node* p_curve) {
void ShaderGraphView::_input_name_changed(const String& p_name, int p_id, Node *p_line_edit) {
- LineEdit *le=p_line_edit->cast_to<LineEdit>();
+ LineEdit *le=Object::cast_to<LineEdit>(p_line_edit);
ERR_FAIL_COND(!le);
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
@@ -1074,7 +1061,7 @@ void ShaderGraphView::_input_name_changed(const String& p_name, int p_id, Node *
void ShaderGraphView::_tex_edited(int p_id,Node* p_button) {
- ToolButton *tb = p_button->cast_to<ToolButton>();
+ ToolButton *tb = Object::cast_to<ToolButton>(p_button);
ped_popup->set_position(tb->get_global_position()+Vector2(0,tb->get_size().height));
ped_popup->set_size(tb->get_size());
edited_id=p_id;
@@ -1084,7 +1071,7 @@ void ShaderGraphView::_tex_edited(int p_id,Node* p_button) {
void ShaderGraphView::_cube_edited(int p_id,Node* p_button) {
- ToolButton *tb = p_button->cast_to<ToolButton>();
+ ToolButton *tb = Object::cast_to<ToolButton>(p_button);
ped_popup->set_position(tb->get_global_position()+Vector2(0,tb->get_size().height));
ped_popup->set_size(tb->get_size());
edited_id=p_id;
@@ -1299,7 +1286,7 @@ void ShaderGraphView::_delete_nodes_request()
void ShaderGraphView::_default_changed(int p_id, Node *p_button, int p_param, int v_type, String p_hint)
{
- ToolButton *tb = p_button->cast_to<ToolButton>();
+ ToolButton *tb = Object::cast_to<ToolButton>(p_button);
ped_popup->set_position(tb->get_global_position()+Vector2(0,tb->get_size().height));
ped_popup->set_size(tb->get_size());
edited_id=p_id;
@@ -2530,7 +2517,7 @@ void ShaderGraphView::_sg_updated() {
Variant ShaderGraphView::get_drag_data_fw(const Point2 &p_point, Control *p_from)
{
- TextureRect* frame = p_from->cast_to<TextureRect>();
+ TextureRect* frame = Object::cast_to<TextureRect>(p_from);
if (!frame)
return Variant();
@@ -2556,7 +2543,7 @@ bool ShaderGraphView::can_drop_data_fw(const Point2 &p_point, const Variant &p_d
if (val.get_type()==Variant::OBJECT) {
RES res = val;
- if (res.is_valid() && res->cast_to<Texture>())
+ if (res.is_valid() && Object::cast_to<Texture>(res))
return true;
}
}
@@ -2576,7 +2563,7 @@ void ShaderGraphView::drop_data_fw(const Point2 &p_point, const Variant &p_data,
if (!can_drop_data_fw(p_point, p_data, p_from))
return;
- TextureRect *frame = p_from->cast_to<TextureRect>();
+ TextureRect *frame = Object::cast_to<TextureRect>(p_from);
if (!frame)
return;
@@ -2590,20 +2577,20 @@ void ShaderGraphView::drop_data_fw(const Point2 &p_point, const Variant &p_data,
if (val.get_type()==Variant::OBJECT) {
RES res = val;
if (res.is_valid())
- tex = Ref<Texture>(res->cast_to<Texture>());
+ tex = Ref<Texture>(Object::cast_to<Texture>(*res));
}
}
else if (d["type"] == "files" && d.has("files")) {
Vector<String> files = d["files"];
RES res = ResourceLoader::load(files[0]);
if (res.is_valid())
- tex = Ref<Texture>(res->cast_to<Texture>());
+ tex = Ref<Texture>(Object::cast_to<Texture>(*res));
}
}
if (!tex.is_valid()) return;
- GraphNode *gn = frame->get_parent()->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(frame->get_parent());
if (!gn) return;
int id = -1;
@@ -2896,12 +2883,12 @@ ShaderGraphEditor::ShaderGraphEditor(bool p_2d) {
void ShaderGraphEditorPlugin::edit(Object *p_object) {
- shader_editor->edit(p_object->cast_to<ShaderGraph>());
+ shader_editor->edit(Object::cast_to<ShaderGraph>(p_object));
}
bool ShaderGraphEditorPlugin::handles(Object *p_object) const {
- ShaderGraph *shader=p_object->cast_to<ShaderGraph>();
+ ShaderGraph *shader=Object::cast_to<ShaderGraph>(p_object);
if (!shader)
return false;
if (_2d)
diff --git a/editor/plugins/shader_graph_editor_plugin.h b/editor/plugins/shader_graph_editor_plugin.h
index e7cab50d8d..f53dd8200d 100644
--- a/editor/plugins/shader_graph_editor_plugin.h
+++ b/editor/plugins/shader_graph_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -30,6 +30,10 @@
#ifndef SHADER_GRAPH_EDITOR_PLUGIN_H
#define SHADER_GRAPH_EDITOR_PLUGIN_H
+// FIXME: Godot 3.0 broke compatibility with ShaderGraphEditorPlugin,
+// it needs to be ported to the new shader language.
+#if 0
+
#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "editor/property_editor.h"
@@ -39,11 +43,11 @@
#include "scene/gui/tree.h"
#include "scene/resources/shader.h"
#include "scene/resources/shader_graph.h"
+
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
-#if 0
class GraphColorRampEdit : public Control {
GDCLASS(GraphColorRampEdit,Control);
@@ -238,5 +242,6 @@ public:
~ShaderGraphEditorPlugin();
};
+
#endif
-#endif
+#endif // SHADER_GRAPH_EDITOR_PLUGIN_H
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index 1d25f9e56b..d9fc2f32f7 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -50,6 +50,9 @@
#define GIZMO_RING_HALF_WIDTH 0.1
//#define GIZMO_SCALE_DEFAULT 0.28
#define GIZMO_SCALE_DEFAULT 0.15
+#define GIZMO_PLANE_SIZE 0.2
+#define GIZMO_PLANE_DST 0.3
+#define GIZMO_CIRCLE_SIZE 0.9
#define ZOOM_MIN_DISTANCE 0.001
#define ZOOM_MULTIPLIER 1.08
@@ -63,17 +66,47 @@
#define MIN_FOV 0.01
#define MAX_FOV 179
-void SpatialEditorViewport::_update_camera() {
+void SpatialEditorViewport::_update_camera(float p_interp_delta) {
if (orthogonal) {
//camera->set_orthogonal(size.width*cursor.distance,get_znear(),get_zfar());
camera->set_orthogonal(2 * cursor.distance, 0.1, 8192);
} else
camera->set_perspective(get_fov(), get_znear(), get_zfar());
- Transform camera_transform = to_camera_transform(cursor);
+ Transform new_transform = to_camera_transform(cursor);
+ Transform old_transform = camera->get_global_transform();
+ Transform transform;
- if (camera->get_global_transform() != camera_transform) {
- camera->set_global_transform(camera_transform);
+ bool disable_interp = (Input::get_singleton()->get_mouse_button_mask() & (2 | 4)) || Input::get_singleton()->is_key_pressed(KEY_SHIFT) || Input::get_singleton()->is_key_pressed(KEY_ALT) || Input::get_singleton()->is_key_pressed(KEY_CONTROL);
+
+ if (p_interp_delta && !disable_interp) {
+ //interpolate
+ float interp_speed = 14; //maybe should be made configuration
+ transform = old_transform.interpolate_with(new_transform, MIN(1.0, p_interp_delta * interp_speed));
+ } else {
+ transform = new_transform;
+ }
+
+ float tolerance = 0.0001;
+ bool equal = true;
+ for (int i = 0; i < 3; i++) {
+ if (transform.basis[i].distance_to(old_transform.basis[i]) > tolerance) {
+ equal = false;
+ break;
+ }
+ }
+
+ if (equal && transform.origin.distance_to(old_transform.origin) > tolerance) {
+ equal = false;
+ }
+
+ if (equal) {
+ transform = new_transform;
+ }
+
+ if (!equal || p_interp_delta == 0) {
+ //print_line(transform);
+ camera->set_global_transform(transform);
update_transform_gizmo_view();
}
}
@@ -143,7 +176,7 @@ int SpatialEditorViewport::get_selected_count() const {
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->key()->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(E->key());
if (!sp)
continue;
@@ -218,11 +251,7 @@ void SpatialEditorViewport::_select_clicked(bool p_append, bool p_single) {
if (!clicked)
return;
- Object *obj = ObjectDB::get_instance(clicked);
- if (!obj)
- return;
-
- Spatial *sp = obj->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(ObjectDB::get_instance(clicked));
if (!sp)
return;
@@ -261,21 +290,15 @@ ObjectID SpatialEditorViewport::_select_ray(const Point2 &p_pos, bool p_append,
Vector<ObjectID> instances = VisualServer::get_singleton()->instances_cull_ray(pos, ray, get_tree()->get_root()->get_world()->get_scenario());
Set<Ref<SpatialEditorGizmo> > found_gizmos;
+ Node *edited_scene = get_tree()->get_edited_scene_root();
ObjectID closest = 0;
Spatial *item = NULL;
float closest_dist = 1e20;
int selected_handle = -1;
- Vector<Spatial *> subscenes = Vector<Spatial *>();
- Vector<Vector3> subscenes_positions = Vector<Vector3>();
-
for (int i = 0; i < instances.size(); i++) {
- Object *obj = ObjectDB::get_instance(instances[i]);
- if (!obj)
- continue;
-
- Spatial *spat = obj->cast_to<Spatial>();
+ Spatial *spat = Object::cast_to<Spatial>(ObjectDB::get_instance(instances[i]));
if (!spat)
continue;
@@ -283,19 +306,6 @@ ObjectID SpatialEditorViewport::_select_ray(const Point2 &p_pos, bool p_append,
Ref<SpatialEditorGizmo> seg = spat->get_gizmo();
if ((!seg.is_valid()) || found_gizmos.has(seg)) {
-
- Node *subscene_candidate = spat;
- Vector3 source_click_spatial_pos = spat->get_global_transform().origin;
-
- while ((subscene_candidate->get_owner() != NULL) && (subscene_candidate->get_owner() != editor->get_edited_scene()))
- subscene_candidate = subscene_candidate->get_owner();
-
- spat = subscene_candidate->cast_to<Spatial>();
- if (spat && (spat->get_filename() != "") && (subscene_candidate->get_owner() != NULL)) {
- subscenes.push_back(spat);
- subscenes_positions.push_back(source_click_spatial_pos);
- }
-
continue;
}
@@ -315,32 +325,26 @@ ObjectID SpatialEditorViewport::_select_ray(const Point2 &p_pos, bool p_append,
continue;
if (dist < closest_dist) {
- closest = instances[i];
- closest_dist = dist;
- selected_handle = handle;
- item = spat;
+ //make sure that whathever is selected is editable
+ while (spat && spat != edited_scene && spat->get_owner() != edited_scene && !edited_scene->is_editable_instance(spat->get_owner())) {
+
+ spat = Object::cast_to<Spatial>(spat->get_owner());
+ }
+
+ if (spat) {
+ item = spat;
+ closest = spat->get_instance_id();
+ closest_dist = dist;
+ selected_handle = handle;
+ } else {
+ ERR_PRINT("Bug?");
+ }
}
// if (editor_selection->is_selected(spat))
// r_includes_current=true;
}
- for (int idx_subscene = 0; idx_subscene < subscenes.size(); idx_subscene++) {
-
- Spatial *subscene = subscenes.get(idx_subscene);
- float dist = ray.cross(subscenes_positions.get(idx_subscene) - pos).length();
-
- if ((dist < 0) || (dist > 1.2))
- continue;
-
- if (dist < closest_dist) {
- closest = subscene->get_instance_id();
- closest_dist = dist;
- item = subscene;
- selected_handle = -1;
- }
- }
-
if (!item)
return 0;
@@ -365,12 +369,7 @@ void SpatialEditorViewport::_find_items_at_pos(const Point2 &p_pos, bool &r_incl
for (int i = 0; i < instances.size(); i++) {
- Object *obj = ObjectDB::get_instance(instances[i]);
-
- if (!obj)
- continue;
-
- Spatial *spat = obj->cast_to<Spatial>();
+ Spatial *spat = Object::cast_to<Spatial>(ObjectDB::get_instance(instances[i]));
if (!spat)
continue;
@@ -480,10 +479,7 @@ void SpatialEditorViewport::_select_region() {
for (int i = 0; i < instances.size(); i++) {
- Object *obj = ObjectDB::get_instance(instances[i]);
- if (!obj)
- continue;
- Spatial *sp = obj->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(ObjectDB::get_instance(instances[i]));
if (!sp)
continue;
@@ -524,7 +520,7 @@ void SpatialEditorViewport::_compute_edit(const Point2 &p_point) {
//int nc=0;
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->get()->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(E->get());
if (!sp)
continue;
@@ -595,6 +591,7 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hig
float grabber_radius = gs * GIZMO_ARROW_SIZE;
Vector3 r;
+
if (Geometry::segment_intersects_sphere(ray_pos, ray_pos + ray * 10000.0, grabber_pos, grabber_radius, &r)) {
float d = r.distance_to(ray_pos);
if (d < col_d) {
@@ -604,17 +601,49 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hig
}
}
+ bool is_plane_translate = false;
+ // second try
+ if (col_axis == -1) {
+ col_d = 1e20;
+
+ for (int i = 0; i < 3; i++) {
+
+ Vector3 ivec2 = gt.basis.get_axis((i + 1) % 3).normalized();
+ Vector3 ivec3 = gt.basis.get_axis((i + 2) % 3).normalized();
+
+ Vector3 grabber_pos = gt.origin + (ivec2 + ivec3) * gs * (GIZMO_PLANE_SIZE + GIZMO_PLANE_DST);
+
+ Vector3 r;
+ Plane plane(gt.origin, gt.basis.get_axis(i).normalized());
+
+ if (plane.intersects_ray(ray_pos, ray, &r)) {
+
+ float dist = r.distance_to(grabber_pos);
+ if (dist < (gs * GIZMO_PLANE_SIZE)) {
+
+ float d = ray_pos.distance_to(r);
+ if (d < col_d) {
+ col_d = d;
+ col_axis = i;
+
+ is_plane_translate = true;
+ }
+ }
+ }
+ }
+ }
+
if (col_axis != -1) {
if (p_highlight_only) {
- spatial_editor->select_gizmo_highlight_axis(col_axis);
+ spatial_editor->select_gizmo_highlight_axis(col_axis + (is_plane_translate ? 6 : 0));
} else {
- //handle rotate
+ //handle plane translate
_edit.mode = TRANSFORM_TRANSLATE;
_compute_edit(Point2(p_screenpos.x, p_screenpos.y));
- _edit.plane = TransformPlane(TRANSFORM_X_AXIS + col_axis);
+ _edit.plane = TransformPlane(TRANSFORM_X_AXIS + col_axis + (is_plane_translate ? 3 : 0));
}
return true;
}
@@ -634,7 +663,7 @@ bool SpatialEditorViewport::_gizmo_select(const Vector2 &p_screenpos, bool p_hig
float dist = r.distance_to(gt.origin);
- if (dist > gs * (1 - GIZMO_RING_HALF_WIDTH) && dist < gs * (1 + GIZMO_RING_HALF_WIDTH)) {
+ if (dist > gs * (GIZMO_CIRCLE_SIZE - GIZMO_RING_HALF_WIDTH) && dist < gs * (GIZMO_CIRCLE_SIZE + GIZMO_RING_HALF_WIDTH)) {
float d = ray_pos.distance_to(r);
if (d < col_d) {
@@ -796,7 +825,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->get()->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(E->get());
if (!sp)
continue;
@@ -928,7 +957,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
if (get_selected_count() == 0)
break; //bye
- //handle rotate
+ //handle translate
_edit.mode = TRANSFORM_TRANSLATE;
_compute_edit(b->get_position());
break;
@@ -967,22 +996,18 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
if (clicked && gizmo_handle >= 0) {
- Object *obj = ObjectDB::get_instance(clicked);
- if (obj) {
+ Spatial *spa = Object::cast_to<Spatial>(ObjectDB::get_instance(clicked));
+ if (spa) {
- Spatial *spa = obj->cast_to<Spatial>();
- if (spa) {
+ Ref<SpatialEditorGizmo> seg = spa->get_gizmo();
+ if (seg.is_valid()) {
- Ref<SpatialEditorGizmo> seg = spa->get_gizmo();
- if (seg.is_valid()) {
-
- _edit.gizmo = seg;
- _edit.gizmo_handle = gizmo_handle;
- //_edit.gizmo_initial_pos=seg->get_handle_pos(gizmo_handle);
- _edit.gizmo_initial_value = seg->get_handle_value(gizmo_handle);
- //print_line("GIZMO: "+itos(gizmo_handle)+" FROMPOS: "+_edit.orig_gizmo_pos);
- break;
- }
+ _edit.gizmo = seg;
+ _edit.gizmo_handle = gizmo_handle;
+ //_edit.gizmo_initial_pos=seg->get_handle_pos(gizmo_handle);
+ _edit.gizmo_initial_value = seg->get_handle_value(gizmo_handle);
+ //print_line("GIZMO: "+itos(gizmo_handle)+" FROMPOS: "+_edit.orig_gizmo_pos);
+ break;
}
}
//_compute_edit(Point2(b.x,b.y)); //in case a motion happens..
@@ -1018,7 +1043,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->get()->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(E->get());
if (!sp)
continue;
@@ -1162,7 +1187,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->get()->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(E->get());
if (!sp)
continue;
@@ -1186,6 +1211,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
Vector3 motion_mask;
Plane plane;
+ bool plane_mv;
switch (_edit.plane) {
case TRANSFORM_VIEW:
@@ -1204,6 +1230,21 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(2);
plane = Plane(_edit.center, motion_mask.cross(motion_mask.cross(_get_camera_normal())).normalized());
break;
+ case TRANSFORM_YZ:
+ motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(2) + spatial_editor->get_gizmo_transform().basis.get_axis(1);
+ plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(0));
+ plane_mv = true;
+ break;
+ case TRANSFORM_XZ:
+ motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(2) + spatial_editor->get_gizmo_transform().basis.get_axis(0);
+ plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(1));
+ plane_mv = true;
+ break;
+ case TRANSFORM_XY:
+ motion_mask = spatial_editor->get_gizmo_transform().basis.get_axis(0) + spatial_editor->get_gizmo_transform().basis.get_axis(1);
+ plane = Plane(_edit.center, spatial_editor->get_gizmo_transform().basis.get_axis(2));
+ plane_mv = true;
+ break;
}
Vector3 intersection;
@@ -1217,7 +1258,10 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
//_validate_selection();
Vector3 motion = intersection - click;
if (motion_mask != Vector3()) {
- motion = motion_mask.dot(motion) * motion_mask;
+ if (plane_mv)
+ motion *= motion_mask;
+ else
+ motion = motion_mask.dot(motion) * motion_mask;
}
//set_message("Translating: "+motion);
@@ -1236,7 +1280,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
Spatial *node = NULL;
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->get()->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(E->get());
if (!sp) {
continue;
}
@@ -1264,7 +1308,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->get()->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(E->get());
if (!sp) {
continue;
}
@@ -1334,7 +1378,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->get()->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(E->get());
if (!sp)
continue;
@@ -1569,7 +1613,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->get()->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(E->get());
if (!sp)
continue;
@@ -1619,68 +1663,78 @@ Point2i SpatialEditorViewport::_get_warped_mouse_motion(const Ref<InputEventMous
void SpatialEditorViewport::_update_freelook(real_t delta) {
- if (!is_freelook_active())
+ if (!is_freelook_active()) {
+ freelook_velocity = Vector3();
return;
+ }
Vector3 forward = camera->get_transform().basis.xform(Vector3(0, 0, -1));
Vector3 right = camera->get_transform().basis.xform(Vector3(1, 0, 0));
Vector3 up = camera->get_transform().basis.xform(Vector3(0, 1, 0));
- int key_left = ED_GET_SHORTCUT("spatial_editor/freelook_left")->get_shortcut()->cast_to<InputEventKey>()->get_scancode();
- int key_right = ED_GET_SHORTCUT("spatial_editor/freelook_right")->get_shortcut()->cast_to<InputEventKey>()->get_scancode();
- int key_forward = ED_GET_SHORTCUT("spatial_editor/freelook_forward")->get_shortcut()->cast_to<InputEventKey>()->get_scancode();
- int key_backwards = ED_GET_SHORTCUT("spatial_editor/freelook_backwards")->get_shortcut()->cast_to<InputEventKey>()->get_scancode();
- int key_up = ED_GET_SHORTCUT("spatial_editor/freelook_up")->get_shortcut()->cast_to<InputEventKey>()->get_scancode();
- int key_down = ED_GET_SHORTCUT("spatial_editor/freelook_down")->get_shortcut()->cast_to<InputEventKey>()->get_scancode();
- int key_speed_modifier = ED_GET_SHORTCUT("spatial_editor/freelook_speed_modifier")->get_shortcut()->cast_to<InputEventKey>()->get_scancode();
+ int key_left = Object::cast_to<InputEventKey>(ED_GET_SHORTCUT("spatial_editor/freelook_left")->get_shortcut().ptr())->get_scancode();
+ int key_right = Object::cast_to<InputEventKey>(ED_GET_SHORTCUT("spatial_editor/freelook_right")->get_shortcut().ptr())->get_scancode();
+ int key_forward = Object::cast_to<InputEventKey>(ED_GET_SHORTCUT("spatial_editor/freelook_forward")->get_shortcut().ptr())->get_scancode();
+ int key_backwards = Object::cast_to<InputEventKey>(ED_GET_SHORTCUT("spatial_editor/freelook_backwards")->get_shortcut().ptr())->get_scancode();
+ int key_up = Object::cast_to<InputEventKey>(ED_GET_SHORTCUT("spatial_editor/freelook_up")->get_shortcut().ptr())->get_scancode();
+ int key_down = Object::cast_to<InputEventKey>(ED_GET_SHORTCUT("spatial_editor/freelook_down")->get_shortcut().ptr())->get_scancode();
+ int key_speed_modifier = Object::cast_to<InputEventKey>(ED_GET_SHORTCUT("spatial_editor/freelook_speed_modifier")->get_shortcut().ptr())->get_scancode();
- Vector3 velocity;
+ Vector3 direction;
bool pressed = false;
bool speed_modifier = false;
const Input &input = *Input::get_singleton();
if (input.is_key_pressed(key_left)) {
- velocity -= right;
+ direction -= right;
pressed = true;
}
if (input.is_key_pressed(key_right)) {
- velocity += right;
+ direction += right;
pressed = true;
}
if (input.is_key_pressed(key_forward)) {
- velocity += forward;
+ direction += forward;
pressed = true;
}
if (input.is_key_pressed(key_backwards)) {
- velocity -= forward;
+ direction -= forward;
pressed = true;
}
if (input.is_key_pressed(key_up)) {
- velocity += up;
+ direction += up;
pressed = true;
}
if (input.is_key_pressed(key_down)) {
- velocity -= up;
+ direction -= up;
pressed = true;
}
if (input.is_key_pressed(key_speed_modifier)) {
speed_modifier = true;
}
- if (pressed) {
- const EditorSettings &s = *EditorSettings::get_singleton();
- const real_t base_speed = s.get("editors/3d/freelook_base_speed");
- const real_t modifier_speed_factor = s.get("editors/3d/freelook_modifier_speed_factor");
+ const EditorSettings &s = *EditorSettings::get_singleton();
+ real_t inertia = s.get("editors/3d/freelook_inertia");
+ if (inertia < 0)
+ inertia = 0;
- real_t speed = base_speed * cursor.distance;
- if (speed_modifier)
- speed *= modifier_speed_factor;
+ const real_t base_speed = s.get("editors/3d/freelook_base_speed");
+ const real_t modifier_speed_factor = s.get("editors/3d/freelook_modifier_speed_factor");
- velocity.normalize();
+ real_t speed = base_speed * cursor.distance;
+ if (speed_modifier)
+ speed *= modifier_speed_factor;
- cursor.pos += velocity * (speed * delta);
- }
+ Vector3 instant_velocity = direction * speed;
+
+ // Higher inertia should increase "lag" (lerp with factor between 0 and 1)
+ // Inertia of zero should produce instant movement (lerp with factor of 1)
+ // Takes reference of 60fps for units, so that inertia of 1 gives approximate lerp factor of 0.5
+ real_t factor = 1.0 / (1.0 + inertia * delta * 60.f);
+ freelook_velocity = freelook_velocity.linear_interpolate(instant_velocity, CLAMP(factor, 0, 1));
+
+ cursor.pos += freelook_velocity * delta;
}
void SpatialEditorViewport::set_message(String p_message, float p_time) {
@@ -1698,7 +1752,7 @@ void SpatialEditorViewport::_notification(int p_what) {
set_process(visible);
if (visible)
- _update_camera();
+ _update_camera(0);
call_deferred("update_transform_gizmo_view");
}
@@ -1730,7 +1784,7 @@ void SpatialEditorViewport::_notification(int p_what) {
_update_freelook(delta);
- _update_camera();
+ _update_camera(get_process_delta_time());
Map<Node *, Object *> &selection = editor_selection->get_selection();
@@ -1739,7 +1793,7 @@ void SpatialEditorViewport::_notification(int p_what) {
for (Map<Node *, Object *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->key()->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(E->key());
if (!sp)
continue;
@@ -1747,7 +1801,7 @@ void SpatialEditorViewport::_notification(int p_what) {
if (!se)
continue;
- VisualInstance *vi = sp->cast_to<VisualInstance>();
+ VisualInstance *vi = Object::cast_to<VisualInstance>(sp);
if (se->aabb.has_no_surface()) {
@@ -2037,7 +2091,7 @@ void SpatialEditorViewport::_menu_option(int p_option) {
undo_redo->create_action(TTR("Align with view"));
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->get()->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(E->get());
if (!sp)
continue;
@@ -2186,6 +2240,14 @@ void SpatialEditorViewport::_init_gizmo_instance(int p_idx) {
VS::get_singleton()->instance_geometry_set_cast_shadows_setting(move_gizmo_instance[i], VS::SHADOW_CASTING_SETTING_OFF);
VS::get_singleton()->instance_set_layer_mask(move_gizmo_instance[i], layer);
+ move_plane_gizmo_instance[i] = VS::get_singleton()->instance_create();
+ VS::get_singleton()->instance_set_base(move_plane_gizmo_instance[i], spatial_editor->get_move_plane_gizmo(i)->get_rid());
+ VS::get_singleton()->instance_set_scenario(move_plane_gizmo_instance[i], get_tree()->get_root()->get_world()->get_scenario());
+ VS::get_singleton()->instance_set_visible(move_plane_gizmo_instance[i], false);
+ //VS::get_singleton()->instance_geometry_set_flag(move_plane_gizmo_instance[i],VS::INSTANCE_FLAG_DEPH_SCALE,true);
+ VS::get_singleton()->instance_geometry_set_cast_shadows_setting(move_plane_gizmo_instance[i], VS::SHADOW_CASTING_SETTING_OFF);
+ VS::get_singleton()->instance_set_layer_mask(move_plane_gizmo_instance[i], layer);
+
rotate_gizmo_instance[i] = VS::get_singleton()->instance_create();
VS::get_singleton()->instance_set_base(rotate_gizmo_instance[i], spatial_editor->get_rotate_gizmo(i)->get_rid());
VS::get_singleton()->instance_set_scenario(rotate_gizmo_instance[i], get_tree()->get_root()->get_world()->get_scenario());
@@ -2200,6 +2262,7 @@ void SpatialEditorViewport::_finish_gizmo_instances() {
for (int i = 0; i < 3; i++) {
VS::get_singleton()->free(move_gizmo_instance[i]);
+ VS::get_singleton()->free(move_plane_gizmo_instance[i]);
VS::get_singleton()->free(rotate_gizmo_instance[i]);
}
}
@@ -2291,6 +2354,8 @@ void SpatialEditorViewport::update_transform_gizmo_view() {
for (int i = 0; i < 3; i++) {
VisualServer::get_singleton()->instance_set_transform(move_gizmo_instance[i], xform);
VisualServer::get_singleton()->instance_set_visible(move_gizmo_instance[i], spatial_editor->is_gizmo_visible() && (spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_MOVE));
+ VisualServer::get_singleton()->instance_set_transform(move_plane_gizmo_instance[i], xform);
+ VisualServer::get_singleton()->instance_set_visible(move_plane_gizmo_instance[i], spatial_editor->is_gizmo_visible() && (spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_MOVE));
VisualServer::get_singleton()->instance_set_transform(rotate_gizmo_instance[i], xform);
VisualServer::get_singleton()->instance_set_visible(rotate_gizmo_instance[i], spatial_editor->is_gizmo_visible() && (spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode() == SpatialEditor::TOOL_MODE_ROTATE));
}
@@ -2327,8 +2392,8 @@ void SpatialEditorViewport::set_state(const Dictionary &p_state) {
if (p_state.has("previewing")) {
Node *pv = EditorNode::get_singleton()->get_edited_scene()->get_node(p_state["previewing"]);
- if (pv && pv->cast_to<Camera>()) {
- previewing = pv->cast_to<Camera>();
+ if (Object::cast_to<Camera>(pv)) {
+ previewing = Object::cast_to<Camera>(pv);
previewing->connect("tree_exited", this, "_preview_exited_scene");
VS::get_singleton()->viewport_attach_camera(viewport->get_viewport_rid(), previewing->get_camera()); //replace
view_menu->hide();
@@ -2397,7 +2462,7 @@ void SpatialEditorViewport::focus_selection() {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->get()->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(E->get());
if (!sp)
continue;
@@ -2503,7 +2568,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
preview_camera->set_toggle_mode(true);
preview_camera->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_END, -90 * EDSCALE);
preview_camera->set_anchor_and_margin(MARGIN_TOP, ANCHOR_BEGIN, 10 * EDSCALE);
- preview_camera->set_text("preview");
+ preview_camera->set_text(TTR("preview"));
surface->add_child(preview_camera);
preview_camera->hide();
preview_camera->connect("toggled", this, "_toggle_camera_preview");
@@ -2693,7 +2758,7 @@ void SpatialEditorViewportContainer::_notification(int p_what) {
SpatialEditorViewport *viewports[4];
int vc = 0;
for (int i = 0; i < get_child_count(); i++) {
- viewports[vc] = get_child(i)->cast_to<SpatialEditorViewport>();
+ viewports[vc] = Object::cast_to<SpatialEditorViewport>(get_child(i));
if (viewports[vc]) {
vc++;
}
@@ -2849,6 +2914,7 @@ void SpatialEditor::select_gizmo_highlight_axis(int p_axis) {
for (int i = 0; i < 3; i++) {
move_gizmo[i]->surface_set_material(0, i == p_axis ? gizmo_hl : gizmo_color[i]);
+ move_plane_gizmo[i]->surface_set_material(0, (i + 6) == p_axis ? gizmo_hl : plane_gizmo_color[i]);
rotate_gizmo[i]->surface_set_material(0, (i + 3) == p_axis ? gizmo_hl : gizmo_color[i]);
}
}
@@ -2864,7 +2930,7 @@ void SpatialEditor::update_transform_gizmo() {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->get()->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(E->get());
if (!sp)
continue;
@@ -2892,14 +2958,14 @@ void SpatialEditor::update_transform_gizmo() {
gizmo.transform.origin = pcenter;
gizmo.transform.basis = gizmo_basis;
- for (int i = 0; i < VIEWPORTS_COUNT; i++) {
+ for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
viewports[i]->update_transform_gizmo_view();
}
}
Object *SpatialEditor::_get_editor_data(Object *p_what) {
- Spatial *sp = p_what->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(p_what);
if (!sp)
return NULL;
@@ -3042,7 +3108,7 @@ void SpatialEditor::set_state(const Dictionary &p_state) {
Array vp = d["viewports"];
ERR_FAIL_COND(vp.size() > 4);
- for (int i = 0; i < VIEWPORTS_COUNT; i++) {
+ for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
viewports[i]->set_state(vp[i]);
}
}
@@ -3139,7 +3205,7 @@ void SpatialEditor::_xform_dialog_action() {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
- Spatial *sp = E->get()->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(E->get());
if (!sp)
continue;
@@ -3439,23 +3505,26 @@ void SpatialEditor::_init_indicators() {
gizmo_hl = Ref<SpatialMaterial>(memnew(SpatialMaterial));
gizmo_hl->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
- gizmo_hl->set_flag(SpatialMaterial::FLAG_ONTOP, true);
+ gizmo_hl->set_on_top_of_alpha();
gizmo_hl->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
gizmo_hl->set_albedo(Color(1, 1, 1, gizmo_alph + 0.2f));
+ gizmo_hl->set_cull_mode(SpatialMaterial::CULL_DISABLED);
for (int i = 0; i < 3; i++) {
move_gizmo[i] = Ref<ArrayMesh>(memnew(ArrayMesh));
+ move_plane_gizmo[i] = Ref<ArrayMesh>(memnew(ArrayMesh));
rotate_gizmo[i] = Ref<ArrayMesh>(memnew(ArrayMesh));
Ref<SpatialMaterial> mat = memnew(SpatialMaterial);
mat->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
- mat->set_flag(SpatialMaterial::FLAG_ONTOP, true);
+ mat->set_on_top_of_alpha();
mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
Color col;
col[i] = 1.0;
col.a = gizmo_alph;
mat->set_albedo(col);
+
gizmo_color[i] = mat;
Vector3 ivec;
@@ -3513,17 +3582,60 @@ void SpatialEditor::_init_indicators() {
surftool->commit(move_gizmo[i]);
}
+ // plane translation
+ {
+ Ref<SurfaceTool> surftool = memnew(SurfaceTool);
+ surftool->begin(Mesh::PRIMITIVE_TRIANGLES);
+
+ Vector3 vec = ivec2 - ivec3;
+ Vector3 plane[4] = {
+ vec * GIZMO_PLANE_DST,
+ vec * GIZMO_PLANE_DST + ivec2 * GIZMO_PLANE_SIZE,
+ vec * (GIZMO_PLANE_DST + GIZMO_PLANE_SIZE),
+ vec * GIZMO_PLANE_DST - ivec3 * GIZMO_PLANE_SIZE
+ };
+
+ Basis ma(ivec, Math_PI / 2);
+
+ Vector3 points[4] = {
+ ma.xform(plane[0]),
+ ma.xform(plane[1]),
+ ma.xform(plane[2]),
+ ma.xform(plane[3]),
+ };
+ surftool->add_vertex(points[0]);
+ surftool->add_vertex(points[1]);
+ surftool->add_vertex(points[2]);
+
+ surftool->add_vertex(points[0]);
+ surftool->add_vertex(points[2]);
+ surftool->add_vertex(points[3]);
+
+ Ref<SpatialMaterial> plane_mat = memnew(SpatialMaterial);
+ plane_mat->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
+ plane_mat->set_on_top_of_alpha();
+ plane_mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
+ plane_mat->set_cull_mode(SpatialMaterial::CULL_DISABLED);
+ Color col;
+ col[i] = 1.0;
+ col.a = gizmo_alph;
+ plane_mat->set_albedo(col);
+ plane_gizmo_color[i] = plane_mat; // needed, so we can draw planes from both sides
+ surftool->set_material(plane_mat);
+ surftool->commit(move_plane_gizmo[i]);
+ }
+
{
Ref<SurfaceTool> surftool = memnew(SurfaceTool);
surftool->begin(Mesh::PRIMITIVE_TRIANGLES);
Vector3 circle[5] = {
- ivec * 0.02 + ivec2 * 0.02 + ivec2 * 1.0,
- ivec * -0.02 + ivec2 * 0.02 + ivec2 * 1.0,
- ivec * -0.02 + ivec2 * -0.02 + ivec2 * 1.0,
- ivec * 0.02 + ivec2 * -0.02 + ivec2 * 1.0,
- ivec * 0.02 + ivec2 * 0.02 + ivec2 * 1.0,
+ ivec * 0.02 + ivec2 * 0.02 + ivec2 * GIZMO_CIRCLE_SIZE,
+ ivec * -0.02 + ivec2 * 0.02 + ivec2 * GIZMO_CIRCLE_SIZE,
+ ivec * -0.02 + ivec2 * -0.02 + ivec2 * GIZMO_CIRCLE_SIZE,
+ ivec * 0.02 + ivec2 * -0.02 + ivec2 * GIZMO_CIRCLE_SIZE,
+ ivec * 0.02 + ivec2 * 0.02 + ivec2 * GIZMO_CIRCLE_SIZE,
};
for (int k = 0; k < 33; k++) {
@@ -3562,7 +3674,7 @@ void SpatialEditor::_init_indicators() {
_generate_selection_box();
- //get_scene()->get_root_node()->cast_to<EditorNode>()->get_scene_root()->add_child(camera);
+ //Object::cast_to<EditorNode>(get_scene()->get_root_node())->get_scene_root()->add_child(camera);
//current_camera=camera;
}
@@ -3596,21 +3708,6 @@ void SpatialEditor::_unhandled_key_input(Ref<InputEvent> p_event) {
if (!is_visible_in_tree() || get_viewport()->gui_has_modal_stack())
return;
-#if 0
-//i don't remember this being used, why was it here?
- {
-
- EditorNode *en = editor;
- EditorPluginList *over_plugin_list = en->get_editor_plugins_over();
-
- if (!over_plugin_list->empty() && over_plugin_list->forward_gui_input(p_event)) {
-
- return; //ate the over input event
- }
-
- }
-#endif
-
Ref<InputEventKey> k = p_event;
if (k.is_valid()) {
@@ -3668,6 +3765,20 @@ void SpatialEditor::_notification(int p_what) {
_finish_indicators();
memdelete(gizmos);
}
+ if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
+ tool_button[SpatialEditor::TOOL_MODE_SELECT]->set_icon(get_icon("ToolSelect", "EditorIcons"));
+ tool_button[SpatialEditor::TOOL_MODE_MOVE]->set_icon(get_icon("ToolMove", "EditorIcons"));
+ tool_button[SpatialEditor::TOOL_MODE_ROTATE]->set_icon(get_icon("ToolRotate", "EditorIcons"));
+ tool_button[SpatialEditor::TOOL_MODE_SCALE]->set_icon(get_icon("ToolScale", "EditorIcons"));
+ tool_button[SpatialEditor::TOOL_MODE_LIST_SELECT]->set_icon(get_icon("ListSelect", "EditorIcons"));
+
+ view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), get_icon("Panels1", "EditorIcons"));
+ view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), get_icon("Panels2", "EditorIcons"));
+ view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS_ALT), get_icon("Panels2Alt", "EditorIcons"));
+ view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS), get_icon("Panels3", "EditorIcons"));
+ view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_3_VIEWPORTS_ALT), get_icon("Panels3Alt", "EditorIcons"));
+ view_menu->get_popup()->set_item_icon(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_4_VIEWPORTS), get_icon("Panels4", "EditorIcons"));
+ }
}
void SpatialEditor::add_control_to_menu_panel(Control *p_control) {
@@ -3694,10 +3805,10 @@ HSplitContainer *SpatialEditor::get_palette_split() {
void SpatialEditor::_request_gizmo(Object *p_obj) {
- Spatial *sp = p_obj->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(p_obj);
if (!sp)
return;
- if (editor->get_edited_scene() && (sp == editor->get_edited_scene() || sp->get_owner() == editor->get_edited_scene() || editor->get_edited_scene()->is_editable_instance(sp->get_owner()))) {
+ if (editor->get_edited_scene() && (sp == editor->get_edited_scene() || (sp->get_owner() && editor->get_edited_scene()->is_a_parent_of(sp)))) {
Ref<SpatialEditorGizmo> seg;
@@ -3711,7 +3822,6 @@ void SpatialEditor::_request_gizmo(Object *p_obj) {
if (!seg.is_valid()) {
seg = gizmos->get_gizmo(sp);
}
-
if (seg.is_valid()) {
sp->set_gizmo(seg);
}
@@ -3725,7 +3835,7 @@ void SpatialEditor::_request_gizmo(Object *p_obj) {
void SpatialEditor::_toggle_maximize_view(Object *p_viewport) {
if (!p_viewport) return;
- SpatialEditorViewport *current_viewport = p_viewport->cast_to<SpatialEditorViewport>();
+ SpatialEditorViewport *current_viewport = Object::cast_to<SpatialEditorViewport>(p_viewport);
if (!current_viewport) return;
int index = -1;
@@ -3742,15 +3852,15 @@ void SpatialEditor::_toggle_maximize_view(Object *p_viewport) {
if (!maximized) {
- for (int i = 0; i < VIEWPORTS_COUNT; i++) {
- if (i == index)
+ for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
+ if (i == (uint32_t)index)
viewports[i]->set_area_as_parent_rect();
else
viewports[i]->hide();
}
} else {
- for (int i = 0; i < VIEWPORTS_COUNT; i++)
+ for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++)
viewports[i]->show();
if (view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT)))
@@ -3794,7 +3904,7 @@ void SpatialEditor::clear() {
settings_znear->set_value(EDITOR_DEF("editors/3d/default_z_near", 0.1));
settings_zfar->set_value(EDITOR_DEF("editors/3d/default_z_far", 1500.0));
- for (int i = 0; i < VIEWPORTS_COUNT; i++) {
+ for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
viewports[i]->reset();
}
@@ -3807,7 +3917,7 @@ void SpatialEditor::clear() {
}
}
- for (int i = 0; i < VIEWPORTS_COUNT; i++) {
+ for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
viewports[i]->view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(SpatialEditorViewport::VIEW_AUDIO_LISTENER), i == 0);
viewports[i]->viewport->set_as_audio_listener(i == 0);
@@ -3849,7 +3959,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_button[TOOL_MODE_SELECT]->set_pressed(true);
button_binds[0] = MENU_TOOL_SELECT;
tool_button[TOOL_MODE_SELECT]->connect("pressed", this, "_menu_item_pressed", button_binds);
- tool_button[TOOL_MODE_SELECT]->set_tooltip("Select Mode (Q)\n" + keycode_get_string(KEY_MASK_CMD) + "Drag: Rotate\nAlt+Drag: Move\nAlt+RMB: Depth list selection");
+ tool_button[TOOL_MODE_SELECT]->set_tooltip(TTR("Select Mode (Q)\n") + keycode_get_string(KEY_MASK_CMD) + TTR("Drag: Rotate\nAlt+Drag: Move\nAlt+RMB: Depth list selection"));
tool_button[TOOL_MODE_MOVE] = memnew(ToolButton);
@@ -3964,7 +4074,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
viewport_base = memnew(SpatialEditorViewportContainer);
shader_split->add_child(viewport_base);
viewport_base->set_v_size_flags(SIZE_EXPAND_FILL);
- for (int i = 0; i < VIEWPORTS_COUNT; i++) {
+ for (uint32_t i = 0; i < VIEWPORTS_COUNT; i++) {
viewports[i] = memnew(SpatialEditorViewport(this, editor, i));
viewports[i]->connect("toggle_maximize_view", this, "_toggle_maximize_view");
@@ -4122,7 +4232,7 @@ void SpatialEditorPlugin::make_visible(bool p_visible) {
}
void SpatialEditorPlugin::edit(Object *p_object) {
- spatial_editor->edit(p_object->cast_to<Spatial>());
+ spatial_editor->edit(Object::cast_to<Spatial>(p_object));
}
bool SpatialEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h
index 2fd72739df..374861b5e7 100644
--- a/editor/plugins/spatial_editor_plugin.h
+++ b/editor/plugins/spatial_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -49,6 +49,7 @@ class SpatialEditorGizmo : public SpatialGizmo {
GDCLASS(SpatialEditorGizmo, SpatialGizmo);
bool selected;
+ bool instanced;
public:
void set_selected(bool p_selected) { selected = p_selected; }
@@ -121,6 +122,7 @@ private:
float gizmo_scale;
bool freelook_active;
+ Vector3 freelook_velocity;
PanelContainer *info;
Label *info_label;
@@ -194,6 +196,9 @@ private:
TRANSFORM_X_AXIS,
TRANSFORM_Y_AXIS,
TRANSFORM_Z_AXIS,
+ TRANSFORM_YZ,
+ TRANSFORM_XZ,
+ TRANSFORM_XY,
};
struct EditData {
@@ -231,7 +236,7 @@ private:
real_t zoom_indicator_delay;
- RID move_gizmo_instance[3], rotate_gizmo_instance[3];
+ RID move_gizmo_instance[3], move_plane_gizmo_instance[3], rotate_gizmo_instance[3];
String last_message;
String message;
@@ -240,7 +245,7 @@ private:
void set_message(String p_message, float p_time = 5);
//
- void _update_camera();
+ void _update_camera(float p_interp_delta);
Transform to_camera_transform(const Cursor &p_cursor) const;
void _draw();
@@ -376,8 +381,9 @@ private:
bool grid_enable[3]; //should be always visible if true
bool grid_enabled;
- Ref<ArrayMesh> move_gizmo[3], rotate_gizmo[3];
+ Ref<ArrayMesh> move_gizmo[3], move_plane_gizmo[3], rotate_gizmo[3];
Ref<SpatialMaterial> gizmo_color[3];
+ Ref<SpatialMaterial> plane_gizmo_color[3];
Ref<SpatialMaterial> gizmo_hl;
int over_gizmo_handle;
@@ -517,6 +523,7 @@ public:
bool are_local_coords_enabled() const { return transform_menu->get_popup()->is_item_checked(transform_menu->get_popup()->get_item_index(SpatialEditor::MENU_TRANSFORM_LOCAL_COORDS)); }
Ref<ArrayMesh> get_move_gizmo(int idx) const { return move_gizmo[idx]; }
+ Ref<ArrayMesh> get_move_plane_gizmo(int idx) const { return move_plane_gizmo[idx]; }
Ref<ArrayMesh> get_rotate_gizmo(int idx) const { return rotate_gizmo[idx]; }
void update_transform_gizmo();
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 0608ecec58..c2c26bfe6c 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -120,63 +120,6 @@ void SpriteFramesEditor::_load_pressed() {
file->popup_centered_ratio();
}
-void SpriteFramesEditor::_item_edited() {
-
-#if 0
- if (!tree->get_selected())
- return;
-
- TreeItem *s = tree->get_selected();
-
- if (tree->get_selected_column()==0) {
- // renamed
- String old_name=s->get_metadata(0);
- String new_name=s->get_text(0);
- if (old_name==new_name)
- return;
-
- if (new_name=="" || new_name.find("\\")!=-1 || new_name.find("/")!=-1 || frames->has_resource(new_name)) {
-
- s->set_text(0,old_name);
- return;
- }
-
- RES samp = frames->get_resource(old_name);
- undo_redo->create_action("Rename Resource");
- undo_redo->add_do_method(frames,"remove_resource",old_name);
- undo_redo->add_do_method(frames,"add_resource",new_name,samp);
- undo_redo->add_undo_method(frames,"remove_resource",new_name);
- undo_redo->add_undo_method(frames,"add_resource",old_name,samp);
- undo_redo->add_do_method(this,"_update_library");
- undo_redo->add_undo_method(this,"_update_library");
- undo_redo->commit_action();
-
- }
-#endif
-}
-
-void SpriteFramesEditor::_delete_confirm_pressed() {
-
- ERR_FAIL_COND(!frames->has_animation(edited_anim));
-
- if (tree->get_current() < 0)
- return;
-
- sel -= 1;
- if (sel < 0 && frames->get_frame_count(edited_anim))
- sel = 0;
-
- int to_remove = tree->get_current();
- sel = to_remove;
- Ref<Texture> r = frames->get_frame(edited_anim, to_remove);
- undo_redo->create_action(TTR("Delete Resource"));
- undo_redo->add_do_method(frames, "remove_frame", edited_anim, to_remove);
- undo_redo->add_undo_method(frames, "add_frame", edited_anim, r, to_remove);
- undo_redo->add_do_method(this, "_update_library");
- undo_redo->add_undo_method(this, "_update_library");
- undo_redo->commit_action();
-}
-
void SpriteFramesEditor::_paste_pressed() {
ERR_FAIL_COND(!frames->has_animation(edited_anim));
@@ -303,15 +246,6 @@ void SpriteFramesEditor::_delete_pressed() {
if (tree->get_current() < 0)
return;
-
- _delete_confirm_pressed(); //it has undo.. why bother with a dialog..
- /*
- dialog->set_title("Confirm...");
- dialog->set_text("Remove Resource '"+tree->get_selected()->get_text(0)+"' ?");
- //dialog->get_cancel()->set_text("Cancel");
- //dialog->get_ok()->show();
- dialog->get_ok()->set_text("Remove");
- dialog->popup_centered(Size2(300,60));*/
}
void SpriteFramesEditor::_animation_select() {
@@ -334,14 +268,14 @@ static void _find_anim_sprites(Node *p_node, List<Node *> *r_nodes, Ref<SpriteFr
return;
{
- AnimatedSprite *as = p_node->cast_to<AnimatedSprite>();
+ AnimatedSprite *as = Object::cast_to<AnimatedSprite>(p_node);
if (as && as->get_sprite_frames() == p_sfames) {
r_nodes->push_back(p_node);
}
}
{
- AnimatedSprite3D *as = p_node->cast_to<AnimatedSprite3D>();
+ AnimatedSprite3D *as = Object::cast_to<AnimatedSprite3D>(p_node);
if (as && as->get_sprite_frames() == p_sfames) {
r_nodes->push_back(p_node);
}
@@ -693,10 +627,8 @@ void SpriteFramesEditor::_bind_methods() {
ClassDB::bind_method(D_METHOD("_load_pressed"), &SpriteFramesEditor::_load_pressed);
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("_item_edited"), &SpriteFramesEditor::_item_edited);
ClassDB::bind_method(D_METHOD("_delete_pressed"), &SpriteFramesEditor::_delete_pressed);
ClassDB::bind_method(D_METHOD("_paste_pressed"), &SpriteFramesEditor::_paste_pressed);
- ClassDB::bind_method(D_METHOD("_delete_confirm_pressed"), &SpriteFramesEditor::_delete_confirm_pressed);
ClassDB::bind_method(D_METHOD("_file_load_request", "files", "atpos"), &SpriteFramesEditor::_file_load_request, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("_update_library", "skipsel"), &SpriteFramesEditor::_update_library, DEFVAL(false));
ClassDB::bind_method(D_METHOD("_up_pressed"), &SpriteFramesEditor::_up_pressed);
@@ -829,8 +761,6 @@ SpriteFramesEditor::SpriteFramesEditor() {
move_up->connect("pressed", this, "_up_pressed");
move_down->connect("pressed", this, "_down_pressed");
file->connect("files_selected", this, "_file_load_request");
- //dialog->connect("confirmed", this,"_delete_confirm_pressed");
- //tree->connect("item_selected", this,"_item_edited");
loading_scene = false;
sel = -1;
@@ -842,7 +772,7 @@ SpriteFramesEditor::SpriteFramesEditor() {
void SpriteFramesEditorPlugin::edit(Object *p_object) {
frames_editor->set_undo_redo(&get_undo_redo());
- SpriteFrames *s = p_object->cast_to<SpriteFrames>();
+ SpriteFrames *s = Object::cast_to<SpriteFrames>(p_object);
if (!s)
return;
diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h
index c0eb1ec3d0..0d1ab9fd8c 100644
--- a/editor/plugins/sprite_frames_editor_plugin.h
+++ b/editor/plugins/sprite_frames_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -76,11 +76,9 @@ class SpriteFramesEditor : public PanelContainer {
void _empty_pressed();
void _empty2_pressed();
void _delete_pressed();
- void _delete_confirm_pressed();
void _up_pressed();
void _down_pressed();
void _update_library(bool p_skip_selector = false);
- void _item_edited();
void _animation_select();
void _animation_name_edited();
diff --git a/editor/plugins/stream_editor_plugin.cpp b/editor/plugins/stream_editor_plugin.cpp
deleted file mode 100644
index dd97ce936d..0000000000
--- a/editor/plugins/stream_editor_plugin.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-/*************************************************************************/
-/* stream_editor_plugin.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "stream_editor_plugin.h"
-
-#if 0
-
-void StreamEditor::_notification(int p_what) {
-
- if (p_what==NOTIFICATION_ENTER_TREE) {
- play->set_icon( get_icon("Play","EditorIcons") );
- stop->set_icon( get_icon("Stop","EditorIcons") );
- }
-
-}
-void StreamEditor::_node_removed(Node *p_node) {
-
- if(p_node==node) {
- node=NULL;
- hide();
- }
-
-}
-
-void StreamEditor::_play() {
-
- node->call("play");
-}
-
-void StreamEditor::_stop() {
-
- node->call("stop");
-}
-
-void StreamEditor::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_play"),&StreamEditor::_play);
- ClassDB::bind_method(D_METHOD("_stop"),&StreamEditor::_stop);
-
-}
-
-void StreamEditor::edit(Node *p_stream) {
-
- node=p_stream;
-
-}
-StreamEditor::StreamEditor() {
-
- play = memnew( Button );
-
-
- play->set_anchor_and_margin(MARGIN_LEFT,Control::ANCHOR_END,60);
- play->set_anchor_and_margin(MARGIN_RIGHT,Control::ANCHOR_END,40);
- play->set_anchor_and_margin(MARGIN_TOP,Control::ANCHOR_BEGIN,0);
- play->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_BEGIN,0);
-
- add_child(play);
-
- stop = memnew( Button );
-
- stop->set_position(Point2( 35, 5 ));
- stop->set_anchor_and_margin(MARGIN_LEFT,Control::ANCHOR_END,30);
- stop->set_anchor_and_margin(MARGIN_RIGHT,Control::ANCHOR_END,10);
- stop->set_anchor_and_margin(MARGIN_TOP,Control::ANCHOR_BEGIN,0);
- stop->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_BEGIN,0);
- add_child(stop);
-
-
- play->connect("pressed", this,"_play");
- stop->connect("pressed", this,"_stop");
-
-}
-
-
-void StreamEditorPlugin::edit(Object *p_object) {
-
- stream_editor->edit(p_object->cast_to<Node>());
-}
-
-bool StreamEditorPlugin::handles(Object *p_object) const {
-
- return p_object->is_class("StreamPlayer") || p_object->is_class("SpatialStreamPlayer");
-}
-
-void StreamEditorPlugin::make_visible(bool p_visible) {
-
- if (p_visible) {
- stream_editor->show();
- stream_editor->set_fixed_process(true);
- } else {
-
- stream_editor->hide();
- stream_editor->set_fixed_process(false);
- stream_editor->edit(NULL);
- }
-
-}
-
-StreamEditorPlugin::StreamEditorPlugin(EditorNode *p_node) {
-
- editor=p_node;
- stream_editor = memnew( StreamEditor );
- editor->get_viewport()->add_child(stream_editor);
-
- stream_editor->set_anchor(MARGIN_LEFT,Control::ANCHOR_END);
- stream_editor->set_anchor(MARGIN_RIGHT,Control::ANCHOR_END);
- stream_editor->set_margin(MARGIN_LEFT,60);
- stream_editor->set_margin(MARGIN_RIGHT,0);
- stream_editor->set_margin(MARGIN_TOP,0);
- stream_editor->set_margin(MARGIN_BOTTOM,10);
-
-
- stream_editor->hide();
-
-
-
-}
-
-
-StreamEditorPlugin::~StreamEditorPlugin()
-{
-}
-
-#endif
diff --git a/editor/plugins/stream_editor_plugin.h b/editor/plugins/stream_editor_plugin.h
deleted file mode 100644
index cdd1c126ad..0000000000
--- a/editor/plugins/stream_editor_plugin.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*************************************************************************/
-/* stream_editor_plugin.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef STREAM_EDITOR_PLUGIN_H
-#define STREAM_EDITOR_PLUGIN_H
-
-#if 0
-#include "editor/editor_node.h"
-#include "editor/editor_plugin.h"
-#include "scene/audio/stream_player.h"
-
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-
-class StreamEditor : public Control {
-
- GDCLASS(StreamEditor, Control );
-
- Button * play;
- Button * stop;
-
- Panel *panel;
- Node *node;
-
- void _play();
- void _stop();
-protected:
- void _notification(int p_what);
- void _node_removed(Node *p_node);
- static void _bind_methods();
-public:
-
- void edit(Node *p_stream);
- StreamEditor();
-};
-
-class StreamEditorPlugin : public EditorPlugin {
-
- GDCLASS( StreamEditorPlugin, EditorPlugin );
-
- StreamEditor *stream_editor;
- EditorNode *editor;
-
-public:
-
- virtual String get_name() const { return "Stream"; }
- bool has_main_screen() const { return false; }
- virtual void edit(Object *p_node);
- virtual bool handles(Object *p_node) const;
- virtual void make_visible(bool p_visible);
-
- StreamEditorPlugin(EditorNode *p_node);
- ~StreamEditorPlugin();
-
-};
-
-#endif // STREAM_EDITOR_PLUGIN_H
-#endif
diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp
index d421b203e9..478ca2e972 100644
--- a/editor/plugins/style_box_editor_plugin.cpp
+++ b/editor/plugins/style_box_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -72,8 +72,8 @@ StyleBoxEditor::StyleBoxEditor() {
void StyleBoxEditorPlugin::edit(Object *p_node) {
- if (p_node && p_node->cast_to<StyleBox>()) {
- stylebox_editor->edit(p_node->cast_to<StyleBox>());
+ if (Object::cast_to<StyleBox>(p_node)) {
+ stylebox_editor->edit(Object::cast_to<StyleBox>(p_node));
stylebox_editor->show();
} else
stylebox_editor->hide();
diff --git a/editor/plugins/style_box_editor_plugin.h b/editor/plugins/style_box_editor_plugin.h
index effcdb7e5a..bf3c56197c 100644
--- a/editor/plugins/style_box_editor_plugin.h
+++ b/editor/plugins/style_box_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index 57c27a8a7e..90dc4cf993 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -70,7 +70,7 @@ void TextureEditor::_notification(int p_what) {
int ofs_x = (size.width - tex_width) / 2;
int ofs_y = (size.height - tex_height) / 2;
- if (texture->cast_to<CurveTexture>()) {
+ if (Object::cast_to<CurveTexture>(*texture)) {
// In the case of CurveTextures we know they are 1 in height, so fill the preview to see the gradient
ofs_y = 0;
tex_height = size.height;
@@ -81,10 +81,10 @@ void TextureEditor::_notification(int p_what) {
Ref<Font> font = get_font("font", "Label");
String format;
- if (texture->cast_to<ImageTexture>()) {
- format = Image::get_format_name(texture->cast_to<ImageTexture>()->get_format());
- } else if (texture->cast_to<StreamTexture>()) {
- format = Image::get_format_name(texture->cast_to<StreamTexture>()->get_format());
+ if (Object::cast_to<ImageTexture>(*texture)) {
+ format = Image::get_format_name(Object::cast_to<ImageTexture>(*texture)->get_format());
+ } else if (Object::cast_to<StreamTexture>(*texture)) {
+ format = Image::get_format_name(Object::cast_to<StreamTexture>(*texture)->get_format());
} else {
format = texture->get_class();
}
@@ -136,7 +136,7 @@ TextureEditor::TextureEditor() {
void TextureEditorPlugin::edit(Object *p_object) {
- Texture *s = p_object->cast_to<Texture>();
+ Texture *s = Object::cast_to<Texture>(p_object);
if (!s)
return;
diff --git a/editor/plugins/texture_editor_plugin.h b/editor/plugins/texture_editor_plugin.h
index 2b5e7ed629..c7734b5b3d 100644
--- a/editor/plugins/texture_editor_plugin.h
+++ b/editor/plugins/texture_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index d878bba427..38d1350b07 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -67,7 +67,7 @@ void TextureRegionEditor::_region_draw() {
if (snap_mode == SNAP_GRID) {
Size2 s = edit_draw->get_size();
- int last_cell;
+ int last_cell = 0;
if (snap_step.x != 0) {
if (snap_separation.x == 0)
@@ -280,7 +280,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
rect.expand_to(r.position);
rect.expand_to(r.position + r.size);
}
- undo_redo->create_action("Set Region Rect");
+ undo_redo->create_action(TTR("Set Region Rect"));
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());
@@ -406,7 +406,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
} else if (drag) {
if (edited_margin >= 0) {
- float new_margin;
+ float new_margin = 0;
if (edited_margin == 0)
new_margin = prev_margin + (mm->get_position().y - drag_from.y) / draw_zoom;
else if (edited_margin == 1)
@@ -415,6 +415,9 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
new_margin = prev_margin + (mm->get_position().x - drag_from.x) / draw_zoom;
else if (edited_margin == 3)
new_margin = prev_margin - (mm->get_position().x - drag_from.x) / draw_zoom;
+ else
+ ERR_PRINT("Unexpected edited_margin");
+
if (new_margin < 0)
new_margin = 0;
static Margin m[4] = { MARGIN_TOP, MARGIN_BOTTOM, MARGIN_LEFT, MARGIN_RIGHT };
@@ -626,12 +629,12 @@ void TextureRegionEditor::edit(Object *p_obj) {
if (atlas_tex.is_valid())
atlas_tex->remove_change_receptor(this);
if (p_obj) {
- node_sprite = p_obj->cast_to<Sprite>();
- node_patch9 = p_obj->cast_to<NinePatchRect>();
- if (p_obj->cast_to<StyleBoxTexture>())
- obj_styleBox = Ref<StyleBoxTexture>(p_obj->cast_to<StyleBoxTexture>());
- if (p_obj->cast_to<AtlasTexture>())
- atlas_tex = Ref<AtlasTexture>(p_obj->cast_to<AtlasTexture>());
+ node_sprite = Object::cast_to<Sprite>(p_obj);
+ node_patch9 = 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))
+ atlas_tex = Ref<AtlasTexture>(Object::cast_to<AtlasTexture>(p_obj));
p_obj->add_change_receptor(this);
_edit_region();
} else {
diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h
index 265d46cb08..0789dde1c1 100644
--- a/editor/plugins/texture_region_editor_plugin.h
+++ b/editor/plugins/texture_region_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index d45a3b1312..86ef1a489f 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -44,7 +44,7 @@ void ThemeEditor::_propagate_redraw(Control *p_at) {
p_at->minimum_size_changed();
p_at->update();
for (int i = 0; i < p_at->get_child_count(); i++) {
- Control *a = p_at->get_child(i)->cast_to<Control>();
+ Control *a = Object::cast_to<Control>(p_at->get_child(i));
if (a)
_propagate_redraw(a);
}
@@ -529,8 +529,8 @@ void ThemeEditor::_theme_menu_cbk(int p_option) {
} else if (p_option == POPUP_CLASS_REMOVE) {
- add_del_dialog->set_title("Remove All Items");
- add_del_dialog->get_ok()->set_text("Remove All");
+ add_del_dialog->set_title(TTR("Remove All Items"));
+ add_del_dialog->get_ok()->set_text(TTR("Remove All"));
add_del_dialog->popup_centered(Size2(240, 85) * EDSCALE);
base_theme = Theme::get_default();
@@ -892,9 +892,9 @@ ThemeEditor::ThemeEditor() {
void ThemeEditorPlugin::edit(Object *p_node) {
- if (p_node && p_node->cast_to<Theme>()) {
+ if (Object::cast_to<Theme>(p_node)) {
theme_editor->show();
- theme_editor->edit(p_node->cast_to<Theme>());
+ theme_editor->edit(Object::cast_to<Theme>(p_node));
} else {
theme_editor->edit(Ref<Theme>());
theme_editor->hide();
diff --git a/editor/plugins/theme_editor_plugin.h b/editor/plugins/theme_editor_plugin.h
index a75b83e76a..cb6f086de6 100644
--- a/editor/plugins/theme_editor_plugin.h
+++ b/editor/plugins/theme_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index 80ff6627b2..f943ee5f6d 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -106,7 +106,7 @@ void TileMapEditor::_menu_option(int p_option) {
if (!selection_active)
return;
- undo_redo->create_action("Erase Selection");
+ undo_redo->create_action(TTR("Erase Selection"));
for (int i = rectangle.position.y; i <= rectangle.position.y + rectangle.size.y; i++) {
for (int j = rectangle.position.x; j <= rectangle.position.x + rectangle.size.x; j++) {
@@ -730,7 +730,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (id != TileMap::INVALID_CELL) {
- undo_redo->create_action("Line Draw");
+ undo_redo->create_action(TTR("Line Draw"));
for (Map<Point2i, CellOp>::Element *E = paint_undo.front(); E; E = E->next()) {
_set_cell(E->key(), id, flip_h, flip_v, transpose, true);
@@ -747,7 +747,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
if (id != TileMap::INVALID_CELL) {
- undo_redo->create_action("Rectangle Paint");
+ undo_redo->create_action(TTR("Rectangle Paint"));
for (int i = rectangle.position.y; i <= rectangle.position.y + rectangle.size.y; i++) {
for (int j = rectangle.position.x; j <= rectangle.position.x + rectangle.size.x; j++) {
@@ -796,7 +796,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
op["flip_v"] = flip_v;
op["transpose"] = transpose;
- undo_redo->create_action("Bucket Fill");
+ undo_redo->create_action(TTR("Bucket Fill"));
undo_redo->add_do_method(this, "_fill_points", points, op);
undo_redo->add_undo_method(this, "_fill_points", points, pop);
@@ -1329,7 +1329,7 @@ void TileMapEditor::edit(Node *p_tile_map) {
node->disconnect("settings_changed", this, "_tileset_settings_changed");
if (p_tile_map) {
- node = p_tile_map->cast_to<TileMap>();
+ node = Object::cast_to<TileMap>(p_tile_map);
if (!canvas_item_editor->is_connected("draw", this, "_canvas_draw"))
canvas_item_editor->connect("draw", this, "_canvas_draw");
if (!canvas_item_editor->is_connected("mouse_entered", this, "_canvas_mouse_enter"))
@@ -1407,7 +1407,7 @@ TileMapEditor::CellOp TileMapEditor::_get_op_from_cell(const Point2i &p_pos) {
void TileMapEditor::_update_transform_buttons(Object *p_button) {
//ERR_FAIL_NULL(p_button);
- ToolButton *b = p_button->cast_to<ToolButton>();
+ ToolButton *b = Object::cast_to<ToolButton>(p_button);
//ERR_FAIL_COND(!b);
if (b == rotate_0) {
@@ -1582,7 +1582,7 @@ TileMapEditor::~TileMapEditor() {
void TileMapEditorPlugin::edit(Object *p_object) {
- tile_map_editor->edit(p_object->cast_to<Node>());
+ tile_map_editor->edit(Object::cast_to<Node>(p_object));
}
bool TileMapEditorPlugin::handles(Object *p_object) const {
diff --git a/editor/plugins/tile_map_editor_plugin.h b/editor/plugins/tile_map_editor_plugin.h
index d76884e663..e863c4bf3d 100644
--- a/editor/plugins/tile_map_editor_plugin.h
+++ b/editor/plugins/tile_map_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index 8396b4d412..443c280428 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -43,7 +43,7 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
Node *child = p_node->get_child(i);
- if (!child->cast_to<Sprite>()) {
+ if (!Object::cast_to<Sprite>(child)) {
if (child->get_child_count() > 0) {
_import_node(child, p_library);
}
@@ -51,7 +51,7 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
continue;
}
- Sprite *mi = child->cast_to<Sprite>();
+ Sprite *mi = Object::cast_to<Sprite>(child);
Ref<Texture> texture = mi->get_texture();
Ref<Texture> normal_map = mi->get_normal_map();
Ref<ShaderMaterial> material = mi->get_material();
@@ -99,18 +99,18 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) {
Node *child2 = mi->get_child(j);
- if (child2->cast_to<NavigationPolygonInstance>())
- nav_poly = child2->cast_to<NavigationPolygonInstance>()->get_navigation_polygon();
+ if (Object::cast_to<NavigationPolygonInstance>(child2))
+ nav_poly = Object::cast_to<NavigationPolygonInstance>(child2)->get_navigation_polygon();
- if (child2->cast_to<LightOccluder2D>())
- occluder = child2->cast_to<LightOccluder2D>()->get_occluder_polygon();
+ if (Object::cast_to<LightOccluder2D>(child2))
+ occluder = Object::cast_to<LightOccluder2D>(child2)->get_occluder_polygon();
- if (!child2->cast_to<StaticBody2D>())
+ if (!Object::cast_to<StaticBody2D>(child2))
continue;
found_collisions = true;
- StaticBody2D *sb = child2->cast_to<StaticBody2D>();
+ StaticBody2D *sb = Object::cast_to<StaticBody2D>(child2);
List<uint32_t> shapes;
sb->get_shape_owners(&shapes);
@@ -268,8 +268,8 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
void TileSetEditorPlugin::edit(Object *p_node) {
- if (p_node && p_node->cast_to<TileSet>()) {
- tileset_editor->edit(p_node->cast_to<TileSet>());
+ if (Object::cast_to<TileSet>(p_node)) {
+ tileset_editor->edit(Object::cast_to<TileSet>(p_node));
tileset_editor->show();
} else
tileset_editor->hide();
diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h
index d04ebc7197..677ee05b55 100644
--- a/editor/plugins/tile_set_editor_plugin.h
+++ b/editor/plugins/tile_set_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp
index 980afee447..376d9d3158 100644
--- a/editor/progress_dialog.cpp
+++ b/editor/progress_dialog.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/progress_dialog.h b/editor/progress_dialog.h
index 75ad0f26dd..8ac0907145 100644
--- a/editor/progress_dialog.h
+++ b/editor/progress_dialog.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index b9694dffcb..d649afc594 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -35,7 +35,6 @@
#include "io/image_loader.h"
#include "io/resource_loader.h"
#include "io/resource_saver.h"
-#include "io_plugins/editor_texture_import_plugin.h"
#include "os/dir_access.h"
#include "os/file_access.h"
#include "os/os.h"
@@ -913,8 +912,8 @@ ProjectExportDialog::ProjectExportDialog() {
updating = false;
- get_ok()->set_text("Export PCK/Zip");
- export_button = add_button("Export Project", !OS::get_singleton()->get_swap_ok_cancel(), "export");
+ get_ok()->set_text(TTR("Export PCK/Zip"));
+ export_button = add_button(TTR("Export Project"), !OS::get_singleton()->get_swap_ok_cancel(), "export");
export_pck_zip = memnew(FileDialog);
export_pck_zip->add_filter("*.zip ; ZIP File");
diff --git a/editor/project_export.h b/editor/project_export.h
index 29c24005e0..61de0f739a 100644
--- a/editor/project_export.h
+++ b/editor/project_export.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 6ace79df27..323a36154e 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -218,7 +218,7 @@ private:
unzFile pkg = unzOpen2(zip_path.utf8().get_data(), &io);
if (!pkg) {
- dialog_error->set_text("Error opening package file, not in zip format.");
+ dialog_error->set_text(TTR("Error opening package file, not in zip format."));
return;
}
@@ -475,7 +475,7 @@ void ProjectManager::_notification(int p_what) {
void ProjectManager::_panel_draw(Node *p_hb) {
- HBoxContainer *hb = p_hb->cast_to<HBoxContainer>();
+ HBoxContainer *hb = Object::cast_to<HBoxContainer>(p_hb);
hb->draw_line(Point2(0, hb->get_size().y + 1), Point2(hb->get_size().x - 10, hb->get_size().y + 1), get_color("guide_color", "Tree"));
@@ -487,7 +487,7 @@ void ProjectManager::_panel_draw(Node *p_hb) {
void ProjectManager::_update_project_buttons() {
for (int i = 0; i < scroll_childs->get_child_count(); i++) {
- CanvasItem *item = scroll_childs->get_child(i)->cast_to<CanvasItem>();
+ CanvasItem *item = Object::cast_to<CanvasItem>(scroll_childs->get_child(i));
item->update();
}
@@ -509,7 +509,7 @@ void ProjectManager::_panel_input(const Ref<InputEvent> &p_ev, Node *p_hb) {
int clicked_id = -1;
int last_clicked_id = -1;
for (int i = 0; i < scroll_childs->get_child_count(); i++) {
- HBoxContainer *hb = scroll_childs->get_child(i)->cast_to<HBoxContainer>();
+ HBoxContainer *hb = Object::cast_to<HBoxContainer>(scroll_childs->get_child(i));
if (!hb) continue;
if (hb->get_meta("name") == clicked) clicked_id = i;
if (hb->get_meta("name") == last_clicked) last_clicked_id = i;
@@ -519,7 +519,7 @@ void ProjectManager::_panel_input(const Ref<InputEvent> &p_ev, Node *p_hb) {
int min = clicked_id < last_clicked_id ? clicked_id : last_clicked_id;
int max = clicked_id > last_clicked_id ? clicked_id : last_clicked_id;
for (int i = 0; i < scroll_childs->get_child_count(); ++i) {
- HBoxContainer *hb = scroll_childs->get_child(i)->cast_to<HBoxContainer>();
+ HBoxContainer *hb = Object::cast_to<HBoxContainer>(scroll_childs->get_child(i));
if (!hb) continue;
if (i != clicked_id && (i < min || i > max) && !mb->get_control()) {
selected_list.erase(hb->get_meta("name"));
@@ -572,7 +572,7 @@ void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
for (int i = 0; i < scroll_childs->get_child_count(); i++) {
- HBoxContainer *hb = scroll_childs->get_child(i)->cast_to<HBoxContainer>();
+ HBoxContainer *hb = Object::cast_to<HBoxContainer>(scroll_childs->get_child(i));
if (hb) {
selected_list.clear();
selected_list.insert(hb->get_meta("name"), hb->get_meta("main_scene"));
@@ -587,7 +587,7 @@ void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
for (int i = scroll_childs->get_child_count() - 1; i >= 0; i--) {
- HBoxContainer *hb = scroll_childs->get_child(i)->cast_to<HBoxContainer>();
+ HBoxContainer *hb = Object::cast_to<HBoxContainer>(scroll_childs->get_child(i));
if (hb) {
selected_list.clear();
selected_list.insert(hb->get_meta("name"), hb->get_meta("main_scene"));
@@ -609,7 +609,7 @@ void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
for (int i = scroll_childs->get_child_count() - 1; i >= 0; i--) {
- HBoxContainer *hb = scroll_childs->get_child(i)->cast_to<HBoxContainer>();
+ HBoxContainer *hb = Object::cast_to<HBoxContainer>(scroll_childs->get_child(i));
if (!hb) continue;
String current = hb->get_meta("name");
@@ -646,7 +646,7 @@ void ProjectManager::_unhandled_input(const Ref<InputEvent> &p_ev) {
for (int i = 0; i < scroll_childs->get_child_count(); i++) {
- HBoxContainer *hb = scroll_childs->get_child(i)->cast_to<HBoxContainer>();
+ HBoxContainer *hb = Object::cast_to<HBoxContainer>(scroll_childs->get_child(i));
if (!hb) continue;
String current = hb->get_meta("name");
@@ -805,7 +805,8 @@ void ProjectManager::_load_recent_projects() {
Error err = img->load(appicon.replace_first("res://", path + "/"));
if (err == OK) {
- img->resize(64, 64);
+ Ref<Texture> default_icon = get_icon("DefaultProjectIcon", "EditorIcons");
+ img->resize(default_icon->get_width(), default_icon->get_height());
Ref<ImageTexture> it = memnew(ImageTexture);
it->create_from_image(img);
icon = it;
@@ -885,8 +886,8 @@ void ProjectManager::_load_recent_projects() {
void ProjectManager::_on_project_created(const String &dir) {
bool has_already = false;
for (int i = 0; i < scroll_childs->get_child_count(); i++) {
- HBoxContainer *hb = scroll_childs->get_child(i)->cast_to<HBoxContainer>();
- Label *fpath = hb->get_node(NodePath("project/path"))->cast_to<Label>();
+ HBoxContainer *hb = Object::cast_to<HBoxContainer>(scroll_childs->get_child(i));
+ Label *fpath = Object::cast_to<Label>(hb->get_node(NodePath("project/path")));
if (fpath->get_text() == dir) {
has_already = true;
break;
@@ -903,8 +904,8 @@ void ProjectManager::_on_project_created(const String &dir) {
void ProjectManager::_update_scroll_pos(const String &dir) {
for (int i = 0; i < scroll_childs->get_child_count(); i++) {
- HBoxContainer *hb = scroll_childs->get_child(i)->cast_to<HBoxContainer>();
- Label *fpath = hb->get_node(NodePath("project/path"))->cast_to<Label>();
+ HBoxContainer *hb = Object::cast_to<HBoxContainer>(scroll_childs->get_child(i));
+ Label *fpath = Object::cast_to<Label>(hb->get_node(NodePath("project/path")));
if (fpath->get_text() == dir) {
last_clicked = hb->get_meta("name");
selected_list.clear();
@@ -1225,7 +1226,7 @@ ProjectManager::ProjectManager() {
String cp;
cp.push_back(0xA9);
cp.push_back(0);
- OS::get_singleton()->set_window_title(_MKSTR(VERSION_NAME) + String(" - ") + TTR("Project Manager") + " - " + cp + " 2008-2017 Juan Linietsky, Ariel Manzur.");
+ OS::get_singleton()->set_window_title(_MKSTR(VERSION_NAME) + String(" - ") + TTR("Project Manager") + " - " + cp + " 2008-2017 Juan Linietsky, Ariel Manzur & Godot Contributors");
HBoxContainer *top_hb = memnew(HBoxContainer);
vb->add_child(top_hb);
@@ -1389,9 +1390,6 @@ ProjectManager::ProjectManager() {
_scan_begin(EditorSettings::get_singleton()->get("filesystem/directories/autoscan_project_path"));
}
- //get_ok()->set_text("Open");
- //get_ok()->set_text("Exit");
-
last_clicked = "";
SceneTree::get_singleton()->connect("files_dropped", this, "_files_dropped");
diff --git a/editor/project_manager.h b/editor/project_manager.h
index 181d3cc5d9..ecc01955ba 100644
--- a/editor/project_manager.h
+++ b/editor/project_manager.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -30,7 +30,7 @@
#ifndef PROJECT_MANAGER_H
#define PROJECT_MANAGER_H
-#include "editor/asset_library_editor_plugin.h"
+#include "editor/plugins/asset_library_editor_plugin.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/file_dialog.h"
#include "scene/gui/scroll_container.h"
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 019ed47e81..2cd0221ab6 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* project_settings.cpp */
+/* project_settings_editor.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -29,13 +29,13 @@
/*************************************************************************/
#include "project_settings_editor.h"
-#include "editor_node.h"
-#include "global_constants.h"
-#include "os/keyboard.h"
-#include "project_settings.h"
+#include "core/global_constants.h"
+#include "core/os/keyboard.h"
+#include "core/project_settings.h"
+#include "core/translation.h"
+#include "editor/editor_node.h"
#include "scene/gui/margin_container.h"
#include "scene/gui/tab_container.h"
-#include "translation.h"
ProjectSettingsEditor *ProjectSettingsEditor::singleton = NULL;
@@ -184,8 +184,6 @@ void ProjectSettingsEditor::_device_input_add() {
int idx = edit_idx;
Variant old_val = ProjectSettings::get_singleton()->get(name);
Array arr = old_val;
- // ie.device = device_id->get_value();
- // ie.type = add_type;
switch (add_type) {
@@ -505,7 +503,7 @@ void ProjectSettingsEditor::_action_activated() {
void ProjectSettingsEditor::_action_button_pressed(Object *p_obj, int p_column, int p_id) {
- TreeItem *ti = p_obj->cast_to<TreeItem>();
+ TreeItem *ti = Object::cast_to<TreeItem>(p_obj);
ERR_FAIL_COND(!ti);
@@ -619,7 +617,6 @@ void ProjectSettingsEditor::_update_actions() {
continue;
TreeItem *item = input_editor->create_item(root);
- //item->set_cell_mode(0,TreeItem::CELL_MODE_CHECK);
item->set_text(0, name);
item->add_button(0, get_icon("Add", "EditorIcons"), 1, false, TTR("Add Event"));
if (!ProjectSettings::get_singleton()->get_input_presets().find(pi.name)) {
@@ -627,7 +624,6 @@ void ProjectSettingsEditor::_update_actions() {
item->set_editable(0, true);
}
item->set_custom_bg_color(0, get_color("prop_subsection", "Editor"));
- //item->set_checked(0,pi.usage&PROPERTY_USAGE_CHECKED);
Array actions = ProjectSettings::get_singleton()->get(pi.name);
@@ -748,22 +744,10 @@ void ProjectSettingsEditor::_item_add() {
}
String catname = category->get_text().strip_edges();
- /*if (!catname.is_valid_identifier()) {
- message->set_text("Invalid Category.\nValid characters: a-z,A-Z,0-9 or _");
- message->popup_centered(Size2(300,100));
- return;
- }*/
-
String propname = property->get_text().strip_edges();
- /*if (!propname.is_valid_identifier()) {
- message->set_text("Invalid Property.\nValid characters: a-z,A-Z,0-9 or _");
- message->popup_centered(Size2(300,100));
- return;
- }*/
-
String name = catname != "" ? catname + "/" + propname : propname;
- undo_redo->create_action("Add Global Property");
+ undo_redo->create_action(TTR("Add Global Property"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), name, value);
@@ -790,7 +774,7 @@ void ProjectSettingsEditor::_item_del() {
String path = globals_editor->get_property_editor()->get_selected_path();
if (path == String()) {
- EditorNode::get_singleton()->show_warning(TTR("Select an setting item first!"));
+ EditorNode::get_singleton()->show_warning(TTR("Select a setting item first!"));
return;
}
@@ -884,8 +868,7 @@ void ProjectSettingsEditor::_save() {
void ProjectSettingsEditor::_settings_prop_edited(const String &p_name) {
- String full_item = globals_editor->get_full_item_path(p_name);
-
+ // Method needed to discard the mandatory argument of the property_edited signal
_settings_changed();
}
@@ -946,7 +929,7 @@ void ProjectSettingsEditor::_copy_to_platform(int p_which) {
String path = globals_editor->get_property_editor()->get_selected_path();
if (path == String()) {
- EditorNode::get_singleton()->show_warning(TTR("Select an setting item first!"));
+ EditorNode::get_singleton()->show_warning(TTR("Select a setting item first!"));
return;
}
@@ -1010,7 +993,7 @@ void ProjectSettingsEditor::_translation_file_open() {
void ProjectSettingsEditor::_translation_delete(Object *p_item, int p_column, int p_button) {
- TreeItem *ti = p_item->cast_to<TreeItem>();
+ TreeItem *ti = Object::cast_to<TreeItem>(p_item);
ERR_FAIL_COND(!ti);
int idx = ti->get_metadata(0);
@@ -1151,7 +1134,7 @@ void ProjectSettingsEditor::_translation_res_delete(Object *p_item, int p_column
Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");
- TreeItem *k = p_item->cast_to<TreeItem>();
+ TreeItem *k = Object::cast_to<TreeItem>(p_item);
String key = k->get_metadata(0);
ERR_FAIL_COND(!remaps.has(key));
@@ -1180,7 +1163,7 @@ void ProjectSettingsEditor::_translation_res_option_delete(Object *p_item, int p
TreeItem *k = translation_remap->get_selected();
ERR_FAIL_COND(!k);
- TreeItem *ed = p_item->cast_to<TreeItem>();
+ TreeItem *ed = Object::cast_to<TreeItem>(p_item);
ERR_FAIL_COND(!ed);
String key = k->get_metadata(0);
@@ -1391,12 +1374,6 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
tab_container = memnew(TabContainer);
tab_container->set_tab_align(TabContainer::ALIGN_LEFT);
add_child(tab_container);
- //set_child_rect(tab_container);
-
- //tab_container->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_BEGIN, 15 );
- //tab_container->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END, 15 );
- //tab_container->set_anchor_and_margin(MARGIN_TOP,ANCHOR_BEGIN, 15 );
- //tab_container->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_END, 35 );
VBoxContainer *props_base = memnew(VBoxContainer);
props_base->set_alignment(BoxContainer::ALIGN_BEGIN);
@@ -1480,20 +1457,6 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
globals_editor->get_property_editor()->connect("property_toggled", this, "_item_checked", varray(), CONNECT_DEFERRED);
globals_editor->get_property_editor()->connect("property_edited", this, "_settings_prop_edited");
- /*
- Button *save = memnew( Button );
- props_base->add_child(save);
-
- save->set_anchor(MARGIN_LEFT,ANCHOR_END);
- save->set_anchor(MARGIN_RIGHT,ANCHOR_END);
- save->set_anchor(MARGIN_TOP,ANCHOR_END);
- save->set_anchor(MARGIN_BOTTOM,ANCHOR_END);
- save->set_begin( Point2(80,28) );
- save->set_end( Point2(10,20) );
- save->set_text("Save");
- save->connect("pressed",this,"_save");
-*/
-
Button *del = memnew(Button);
hbc->add_child(del);
del->set_text(TTR("Delete"));
@@ -1506,16 +1469,6 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
popup_copy_to_feature->set_disabled(true);
add_prop_bar->add_child(popup_copy_to_feature);
- /*List<StringName> ep;
- EditorImportExport::get_singleton()->get_export_platforms(&ep);
- ep.sort_custom<StringName::AlphCompare>();
-
- for(List<StringName>::Element *E=ep.front();E;E=E->next()) {
-
- popup_copy_to_feature->get_popup()->add_item( E->get() );
-
- }*/
-
popup_copy_to_feature->get_popup()->connect("id_pressed", this, "_copy_to_platform");
popup_copy_to_feature->get_popup()->connect("about_to_show", this, "_copy_to_platform_about_to_show");
@@ -1524,7 +1477,6 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
message = memnew(ConfirmationDialog);
add_child(message);
- //message->get_cancel()->hide();
message->set_hide_on_ok(true);
Control *input_base = memnew(Control);
@@ -1591,7 +1543,6 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
hbc = memnew(HBoxContainer);
device_input->add_child(hbc);
- //device_input->set_child_rect(hbc);
VBoxContainer *vbc_left = memnew(VBoxContainer);
hbc->add_child(vbc_left);
@@ -1616,18 +1567,6 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
device_index = memnew(OptionButton);
vbc_right->add_child(device_index);
- /*
- save = memnew( Button );
- input_base->add_child(save);
- save->set_anchor(MARGIN_LEFT,ANCHOR_END);
- save->set_anchor(MARGIN_RIGHT,ANCHOR_END);
- save->set_anchor(MARGIN_TOP,ANCHOR_END);
- save->set_anchor(MARGIN_BOTTOM,ANCHOR_END);
- save->set_begin( Point2(80,28) );
- save->set_end( Point2(10,20) );
- save->set_text("Save");
- save->connect("pressed",this,"_save");
-*/
setting = false;
//translations
@@ -1739,14 +1678,4 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
add_child(timer);
updating_translations = false;
-
- /*
- Control * es = memnew( Control );
- es->set_name("Export");
- tab_container->add_child(es);
- export_settings = memnew( ProjectExportSettings );
- es->add_child(export_settings);
- export_settings->set_area_as_parent_rect();
- export_settings->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_END, 35 );
-*/
}
diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h
index 4390a23d60..ceec089953 100644
--- a/editor/project_settings_editor.h
+++ b/editor/project_settings_editor.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* project_settings.h */
+/* project_settings_editor.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -30,17 +30,16 @@
#ifndef PROJECT_SETTINGS_H
#define PROJECT_SETTINGS_H
-#include "editor_autoload_settings.h"
-#include "editor_data.h"
-#include "editor_plugin_settings.h"
-#include "property_editor.h"
+#include "core/undo_redo.h"
+#include "editor/editor_autoload_settings.h"
+#include "editor/editor_data.h"
+#include "editor/editor_plugin_settings.h"
+#include "editor/property_editor.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/tab_container.h"
-#include "undo_redo.h"
-
-//#include "project_export_settings.h"
class ProjectSettingsEditor : public AcceptDialog {
+
GDCLASS(ProjectSettingsEditor, AcceptDialog);
enum InputType {
@@ -125,7 +124,6 @@ class ProjectSettingsEditor : public AcceptDialog {
void _settings_prop_edited(const String &p_name);
void _settings_changed();
- //ProjectExportSettings *export_settings;
void _copy_to_platform(int p_which);
void _translation_file_open();
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 1bd748a083..a42fb41ee2 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -29,24 +29,24 @@
/*************************************************************************/
#include "property_editor.h"
-#include "array_property_edit.h"
-#include "class_db.h"
-#include "create_dialog.h"
-#include "editor_export.h"
-#include "editor_file_system.h"
-#include "editor_help.h"
-#include "editor_node.h"
-#include "editor_settings.h"
-#include "io/image_loader.h"
-#include "io/marshalls.h"
-#include "io/resource_loader.h"
-#include "multi_node_edit.h"
-#include "os/input.h"
-#include "os/keyboard.h"
-#include "pair.h"
-#include "print_string.h"
-#include "project_settings.h"
-#include "property_selector.h"
+#include "core/class_db.h"
+#include "core/io/image_loader.h"
+#include "core/io/marshalls.h"
+#include "core/io/resource_loader.h"
+#include "core/os/input.h"
+#include "core/os/keyboard.h"
+#include "core/pair.h"
+#include "core/print_string.h"
+#include "core/project_settings.h"
+#include "editor/array_property_edit.h"
+#include "editor/create_dialog.h"
+#include "editor/editor_export.h"
+#include "editor/editor_file_system.h"
+#include "editor/editor_help.h"
+#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
+#include "editor/multi_node_edit.h"
+#include "editor/property_selector.h"
#include "scene/gui/label.h"
#include "scene/main/viewport.h"
#include "scene/resources/font.h"
@@ -59,11 +59,6 @@ void CustomPropertyEditor::_notification(int p_what) {
RID ci = get_canvas_item();
get_stylebox("panel", "PopupMenu")->draw(ci, Rect2(Point2(), get_size()));
- /*
- if (v.get_type()==Variant::COLOR) {
-
- VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2( 10,10,60, get_size().height-20 ), v );
- }*/
}
if (p_what == MainLoop::NOTIFICATION_WM_QUIT_REQUEST) {
hide();
@@ -176,7 +171,7 @@ void CustomPropertyEditor::_menu_option(int p_which) {
Object *inst = ClassDB::instance(orig_type);
- Ref<Resource> res = Ref<Resource>(inst->cast_to<Resource>());
+ Ref<Resource> res = Ref<Resource>(Object::cast_to<Resource>(inst));
ERR_FAIL_COND(res.is_null());
@@ -202,21 +197,10 @@ void CustomPropertyEditor::_menu_option(int p_which) {
emit_signal("variant_changed");
} break;
- case OBJ_MENU_REIMPORT: {
-
- RES r = v;
- /* if (r.is_valid() && r->get_import_metadata().is_valid()) {
- Ref<ResourceImportMetadata> rimd = r->get_import_metadata();
- Ref<EditorImportPlugin> eip = EditorImportExport::get_singleton()->get_import_plugin_by_name(rimd->get_editor());
- if (eip.is_valid()) {
- eip->import_dialog(r->get_path());
- }
- }*/
- } break;
case OBJ_MENU_NEW_SCRIPT: {
- if (owner->cast_to<Node>())
- EditorNode::get_singleton()->get_scene_tree_dock()->open_script_dialog(owner->cast_to<Node>());
+ if (Object::cast_to<Node>(owner))
+ EditorNode::get_singleton()->get_scene_tree_dock()->open_script_dialog(Object::cast_to<Node>(owner));
} break;
case OBJ_MENU_SHOW_IN_FILE_SYSTEM: {
@@ -243,7 +227,7 @@ void CustomPropertyEditor::_menu_option(int p_which) {
Object *obj = ClassDB::instance(intype);
ERR_BREAK(!obj);
- Resource *res = obj->cast_to<Resource>();
+ Resource *res = Object::cast_to<Resource>(obj);
ERR_BREAK(!res);
if (owner && hint == PROPERTY_HINT_RESOURCE_TYPE && hint_text == "Script") {
//make visual script the right type
@@ -515,8 +499,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
text_edit->show();
text_edit->set_text(v);
- //action_buttons[0];
-
int button_margin = get_constant("button_margin", "Dialogs");
int margin = get_constant("margin", "Dialogs");
@@ -531,7 +513,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
} else if (hint == PROPERTY_HINT_TYPE_STRING) {
- /* FIXME: This is repeated twice, with slightly different behavior! Which one? Check line 644 */
if (!create_dialog) {
create_dialog = memnew(CreateDialog);
create_dialog->connect("create", this, "_create_dialog_callback");
@@ -593,8 +574,8 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
MAKE_PROPSELECT
Object *obj = ObjectDB::get_instance(hint_text.to_int64());
- if (obj && obj->cast_to<Script>()) {
- property_select->select_method_from_script(obj->cast_to<Script>(), v);
+ if (Object::cast_to<Script>(obj)) {
+ property_select->select_method_from_script(Object::cast_to<Script>(obj), v);
}
updating = false;
@@ -641,21 +622,13 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
MAKE_PROPSELECT
Object *obj = ObjectDB::get_instance(hint_text.to_int64());
- if (obj && obj->cast_to<Script>()) {
- property_select->select_property_from_script(obj->cast_to<Script>(), v);
+ if (Object::cast_to<Script>(obj)) {
+ property_select->select_property_from_script(Object::cast_to<Script>(obj), v);
}
updating = false;
return false;
- } else if (hint == PROPERTY_HINT_TYPE_STRING) {
- if (!create_dialog) {
- /* FIXME: ... and here. See line 529 */
- create_dialog = memnew(CreateDialog);
- create_dialog->connect("create", this, "_create_dialog_callback");
- add_child(create_dialog);
- }
-
} else {
List<String> names;
names.push_back("string:");
@@ -822,39 +795,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
color_picker->set_edit_alpha(hint != PROPERTY_HINT_COLOR_NO_ALPHA);
color_picker->set_pick_color(v);
color_picker->set_focus_on_line_edit();
- /*
- int ofs=80;
- int m=10;
- int h=20;
- Color c=v;
- float values[4]={c.r,c.g,c.b,c.a};
- for (int i=0;i<4;i++) {
- int y=m+i*h;
-
- value_editor[i]->show();
- value_label[i]->show();
- value_label[i]->set_position(Point2(ofs,y));
- scroll[i]->set_min(0);
- scroll[i]->set_max(1.0);
- scroll[i]->set_page(0);
- scroll[i]->set_position(Point2(ofs+15,y+Math::floor((h-scroll[i]->get_minimum_size().height)/2.0)));
- scroll[i]->set_val(values[i]);
- scroll[i]->set_size(Size2(120,1));
- scroll[i]->show();
- value_editor[i]->set_position(Point2(ofs+140,y));
- value_editor[i]->set_size(Size2(40,h));
- value_editor[i]->set_text( String::num(values[i],2 ));
-
- }
-
- value_label[0]->set_text("R");
- value_label[1]->set_text("G");
- value_label[2]->set_text("B");
- value_label[3]->set_text("A");
-
- Size2 new_size = value_editor[3]->get_position() + value_editor[3]->get_size() + Point2(10,10);
- set_size( new_size );
- */
} break;
@@ -864,7 +804,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
names.push_back(TTR("Assign"));
names.push_back(TTR("Clear"));
- if (owner->is_class("Node") && (v.get_type() == Variant::NODE_PATH) && owner->cast_to<Node>()->has_node(v))
+ if (owner->is_class("Node") && (v.get_type() == Variant::NODE_PATH) && Object::cast_to<Node>(owner)->has_node(v))
names.push_back(TTR("Select Node"));
config_action_buttons(names);
@@ -878,7 +818,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
menu->clear();
menu->set_size(Size2(1, 1) * EDSCALE);
- if (p_name == "script" && hint_text == "Script" && owner->cast_to<Node>()) {
+ if (p_name == "script" && hint_text == "Script" && Object::cast_to<Node>(owner)) {
menu->add_icon_item(get_icon("Script", "EditorIcons"), TTR("New Script"), OBJ_MENU_NEW_SCRIPT);
menu->add_separator();
} else if (hint_text != "") {
@@ -926,22 +866,13 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
if (!RES(v).is_null()) {
menu->add_icon_item(get_icon("Edit", "EditorIcons"), "Edit", OBJ_MENU_EDIT);
- menu->add_icon_item(get_icon("Del", "EditorIcons"), "Clear", OBJ_MENU_CLEAR);
+ menu->add_icon_item(get_icon("Clear", "EditorIcons"), "Clear", OBJ_MENU_CLEAR);
menu->add_icon_item(get_icon("Duplicate", "EditorIcons"), "Make Unique", OBJ_MENU_MAKE_UNIQUE);
RES r = v;
if (r.is_valid() && r->get_path().is_resource_file()) {
- /*if (r->get_import_metadata().is_valid()) {
- menu->add_separator();
- menu->add_icon_item(get_icon("ReloadSmall","EditorIcons"),"Re-Import",OBJ_MENU_REIMPORT);
- }*/
menu->add_separator();
menu->add_item(TTR("Show in File System"), OBJ_MENU_SHOW_IN_FILE_SYSTEM);
}
- /*if (r.is_valid() && r->get_path().is_resource_file()) {
- menu->set_item_tooltip(1,r->get_path());
- } else if (r.is_valid()) {
- menu->set_item_tooltip(1,r->get_name()+" ("+r->get_type()+")");
- }*/
} else {
}
@@ -1007,14 +938,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
return true;
}
-////void CustomPropertyEditor::_save_properties_values(List<String> p_names) {
-////
-//// field_names=p_names;
-//// for (int i=0;i<p_names.size();i++) {
-//// field_values.push_back(v.get(p_names[i]));
-//// }
-////}
-
void CustomPropertyEditor::_file_selected(String p_file) {
switch (type) {
@@ -1093,18 +1016,13 @@ void CustomPropertyEditor::_type_create_selected(int p_idx) {
ERR_FAIL_INDEX(p_idx, inheritors_array.size());
- //List<String> inheritors;
- //ClassDB::get_inheriters_from(hint_text,&inheritors);
- //inheritors.push_front(hint_text);
-
- //ERR_FAIL_INDEX( p_idx, inheritors.size() );
String intype = inheritors_array[p_idx];
Object *obj = ClassDB::instance(intype);
ERR_FAIL_COND(!obj);
- Resource *res = obj->cast_to<Resource>();
+ Resource *res = Object::cast_to<Resource>(obj);
ERR_FAIL_COND(!res);
v = Ref<Resource>(res).get_ref_ptr();
@@ -1124,8 +1042,8 @@ void CustomPropertyEditor::_node_path_selected(NodePath p_path) {
if (picking_viewport) {
Node *to_node = get_node(p_path);
- if (!to_node->cast_to<Viewport>()) {
- EditorNode::get_singleton()->show_warning("Selected node is not a Viewport!");
+ if (!Object::cast_to<Viewport>(to_node)) {
+ EditorNode::get_singleton()->show_warning(TTR("Selected node is not a Viewport!"));
return;
}
@@ -1154,9 +1072,9 @@ void CustomPropertyEditor::_node_path_selected(NodePath p_path) {
Node *node = NULL;
if (owner->is_class("Node"))
- node = owner->cast_to<Node>();
+ node = Object::cast_to<Node>(owner);
else if (owner->is_class("ArrayPropertyEdit"))
- node = owner->cast_to<ArrayPropertyEdit>()->get_node();
+ node = Object::cast_to<ArrayPropertyEdit>(owner)->get_node();
if (!node) {
v = p_path;
@@ -1276,9 +1194,9 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
hide();
} else if (p_which == 2) {
- if (owner->is_class("Node") && (v.get_type() == Variant::NODE_PATH) && owner->cast_to<Node>()->has_node(v)) {
+ if (owner->is_class("Node") && (v.get_type() == Variant::NODE_PATH) && Object::cast_to<Node>(owner)->has_node(v)) {
- Node *target_node = owner->cast_to<Node>()->get_node(v);
+ Node *target_node = Object::cast_to<Node>(owner)->get_node(v);
EditorNode::get_singleton()->get_editor_selection()->clear();
EditorNode::get_singleton()->get_scene_tree_dock()->set_selected(target_node);
}
@@ -1299,7 +1217,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
Object *obj = ClassDB::instance(intype);
ERR_BREAK(!obj);
- Resource *res = obj->cast_to<Resource>();
+ Resource *res = Object::cast_to<Resource>(obj);
ERR_BREAK(!res);
v = Ref<Resource>(res).get_ref_ptr();
@@ -1382,33 +1300,6 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
}
}
-void CustomPropertyEditor::_scroll_modified(double p_value) {
-
- if (updating)
- return;
- /*
- switch(type) {
-
- case Variant::COLOR: {
-
- for (int i=0;i<4;i++) {
-
- value_editor[i]->set_text( String::num(scroll[i]->get_val(),2) );
- }
- Color c;
- c.r=scroll[0]->get_val();
- c.g=scroll[1]->get_val();
- c.b=scroll[2]->get_val();
- c.a=scroll[3]->get_val();
- v=c;
- update();
- emit_signal("variant_changed");
- } break;
- default: {}
- }
- */
-}
-
void CustomPropertyEditor::_drag_easing(const Ref<InputEvent> &p_ev) {
Ref<InputEventMouseMotion> mm = p_ev;
@@ -1433,7 +1324,6 @@ void CustomPropertyEditor::_drag_easing(const Ref<InputEvent> &p_ev) {
val = Math::log(val) / Math::log((float)2.0);
//logspace
val += rel * 0.05;
- //
val = Math::pow(2.0f, val);
if (sg)
@@ -1441,11 +1331,8 @@ void CustomPropertyEditor::_drag_easing(const Ref<InputEvent> &p_ev) {
v = val;
easing_draw->update();
- //emit_signal("variant_changed");
emit_signal("variant_changed");
}
- // if (p_ev.type == Ref<InputEvent>::MOUSE_BUTTON && p_ev->get_button_index() == BUTTON_LEFT) {
- // }
}
void CustomPropertyEditor::_draw_easing() {
@@ -1456,7 +1343,6 @@ void CustomPropertyEditor::_draw_easing() {
Rect2 r(Point2(), s);
r = r.grow(3);
get_stylebox("normal", "LineEdit")->draw(ci, r);
- //VisualServer::get_singleton()->canvas_item_add
int points = 48;
@@ -1508,6 +1394,7 @@ void CustomPropertyEditor::_modified(String p_string) {
if (updating)
return;
+
updating = true;
switch (type) {
case Variant::INT: {
@@ -1704,20 +1591,7 @@ void CustomPropertyEditor::_modified(String p_string) {
} break;
case Variant::COLOR: {
- /*
- for (int i=0;i<4;i++) {
- scroll[i]->set_val( value_editor[i]->get_text().to_double() );
- }
- Color c;
- c.r=value_editor[0]->get_text().to_double();
- c.g=value_editor[1]->get_text().to_double();
- c.b=value_editor[2]->get_text().to_double();
- c.a=value_editor[3]->get_text().to_double();
- v=c;
- update();
- emit_signal("variant_changed");
- */
} break;
case Variant::NODE_PATH: {
@@ -1870,7 +1744,6 @@ void CustomPropertyEditor::_bind_methods() {
ClassDB::bind_method("_focus_exit", &CustomPropertyEditor::_focus_exit);
ClassDB::bind_method("_modified", &CustomPropertyEditor::_modified);
ClassDB::bind_method("_range_modified", &CustomPropertyEditor::_range_modified);
- ClassDB::bind_method("_scroll_modified", &CustomPropertyEditor::_scroll_modified);
ClassDB::bind_method("_action_pressed", &CustomPropertyEditor::_action_pressed);
ClassDB::bind_method("_file_selected", &CustomPropertyEditor::_file_selected);
ClassDB::bind_method("_type_create_selected", &CustomPropertyEditor::_type_create_selected);
@@ -1914,7 +1787,6 @@ CustomPropertyEditor::CustomPropertyEditor() {
scroll[i]->set_max(1.0);
scroll[i]->set_step(0.01);
add_child(scroll[i]);
- scroll[i]->connect("value_changed", this, "_scroll_modified");
}
checks20gc = memnew(GridContainer);
@@ -1968,7 +1840,6 @@ CustomPropertyEditor::CustomPropertyEditor() {
error = memnew(ConfirmationDialog);
error->set_title(TTR("Error!"));
add_child(error);
- //error->get_cancel()->hide();
scene_tree = memnew(SceneTreeDialog);
add_child(scene_tree);
@@ -1984,7 +1855,6 @@ CustomPropertyEditor::CustomPropertyEditor() {
easing_draw->hide();
easing_draw->connect("draw", this, "_draw_easing");
easing_draw->connect("gui_input", this, "_drag_easing");
- //easing_draw->emit_signal(SceneStringNames::get_singleton()->input_event,InputEvent());
easing_draw->set_default_cursor_shape(Control::CURSOR_MOVE);
type_button = memnew(MenuButton);
@@ -2017,7 +1887,7 @@ bool PropertyEditor::_might_be_in_instance() {
if (!obj)
return false;
- Node *node = obj->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(obj);
Node *edited_scene = EditorNode::get_singleton()->get_edited_scene();
@@ -2045,7 +1915,7 @@ bool PropertyEditor::_might_be_in_instance() {
bool PropertyEditor::_get_instanced_node_original_property(const StringName &p_prop, Variant &value) {
- Node *node = obj->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(obj);
if (!node)
return false;
@@ -2056,8 +1926,6 @@ bool PropertyEditor::_get_instanced_node_original_property(const StringName &p_p
bool found = false;
- //print_line("for prop - "+String(p_prop));
-
while (node) {
Ref<SceneState> ss;
@@ -2068,13 +1936,11 @@ bool PropertyEditor::_get_instanced_node_original_property(const StringName &p_p
} else {
ss = node->get_scene_instance_state();
}
- //print_line("at - "+String(edited_scene->get_path_to(node)));
if (ss.is_valid()) {
NodePath np = node->get_path_to(orig);
int node_idx = ss->find_node_by_path(np);
- //print_line("\t valid, nodeidx "+itos(node_idx));
if (node_idx >= 0) {
bool lfound = false;
Variant lvar;
@@ -2083,7 +1949,6 @@ bool PropertyEditor::_get_instanced_node_original_property(const StringName &p_p
found = true;
value = lvar;
- //print_line("\t found value "+String(value));
}
}
}
@@ -2100,15 +1965,13 @@ bool PropertyEditor::_get_instanced_node_original_property(const StringName &p_p
bool PropertyEditor::_is_property_different(const Variant &p_current, const Variant &p_orig, int p_usage) {
{
- Node *node = obj->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(obj);
if (!node)
return false;
Node *edited_scene = EditorNode::get_singleton()->get_edited_scene();
bool found_state = false;
- //print_line("for prop - "+String(p_prop));
-
while (node) {
Ref<SceneState> ss;
@@ -2247,8 +2110,6 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String &p
break;
}
- //p_item->set_cell_mode( 1, TreeItem::CELL_MODE_RANGE );
-
if (p_type == Variant::REAL) {
p_item->set_range(1, obj->get(p_name));
@@ -2310,7 +2171,6 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String &p
case Variant::COLOR: {
tree->update();
- //p_item->set_text(1,obj->get(p_name));
} break;
case Variant::NODE_PATH: {
@@ -2424,17 +2284,7 @@ void PropertyEditor::_check_reload_status(const String &p_name, TreeItem *item)
if (_get_instanced_node_original_property(p_name, vorig) || usage) {
Variant v = obj->get(p_name);
- bool changed = _is_property_different(v, vorig, usage);
-
- //if ((found!=-1 && !is_disabled)!=changed) {
-
- if (changed) {
-
- has_reload = true;
- } else {
- }
-
- //}
+ bool has_reload = _is_property_different(v, vorig, usage);
}
}
@@ -2453,7 +2303,6 @@ void PropertyEditor::_check_reload_status(const String &p_name, TreeItem *item)
}
}
- //print_line("found: "+itos(found)+" has reload: "+itos(has_reload)+" is_disabled "+itos(is_disabled));
if (found != -1 && !has_reload) {
if (!is_disabled) {
@@ -2481,14 +2330,11 @@ bool PropertyEditor::_is_drop_valid(const Dictionary &p_drag_data, const Diction
String allowed_type = d["hint_text"];
- print_line("allowed type " + allowed_type);
-
Dictionary drag_data = p_drag_data;
if (drag_data.has("type") && String(drag_data["type"]) == "resource") {
Ref<Resource> res = drag_data["resource"];
for (int i = 0; i < allowed_type.get_slice_count(","); i++) {
String at = allowed_type.get_slice(",", i).strip_edges();
- print_line("RES vs " + at);
if (res.is_valid() && ClassDB::is_parent_class(res->get_class(), at)) {
return true;
}
@@ -2499,18 +2345,14 @@ bool PropertyEditor::_is_drop_valid(const Dictionary &p_drag_data, const Diction
Vector<String> files = drag_data["files"];
- print_line("fileS: " + String(Variant(files)));
if (files.size() == 1) {
String file = files[0];
String ftype = EditorFileSystem::get_singleton()->get_file_type(file);
- print_line("file: " + file);
- print_line("type: " + ftype);
if (ftype != "") {
for (int i = 0; i < allowed_type.get_slice_count(","); i++) {
String at = allowed_type.get_slice(",", i).strip_edges();
- print_line("FILE vs " + at);
if (ClassDB::is_parent_class(ftype, at)) {
return true;
}
@@ -2733,7 +2575,6 @@ TreeItem *PropertyEditor::get_parent_node(String p_path, HashMap<String, TreeIte
item = item_paths.get(p_path);
} else {
- //printf("path %s parent path %s - item name %s\n",p_path.ascii().get_data(),p_path.left( p_path.find_last("/") ).ascii().get_data(),p_path.right( p_path.find_last("/") ).ascii().get_data() );
TreeItem *parent = get_parent_node(p_path.left(p_path.find_last("/")), item_paths, root, NULL);
item = tree->create_item(parent);
@@ -2783,64 +2624,6 @@ void PropertyEditor::_refresh_item(TreeItem *p_item) {
if (name != String()) {
_check_reload_status(name, p_item);
-#if 0
- bool has_reload=false;
-
- int found=-1;
- for(int i=0;i<p_item->get_button_count(1);i++) {
-
- if (p_item->get_button_id(1,i)==3) {
- found=i;
- break;
- }
- }
-
- if (_might_be_in_instance()) {
-
- Variant vorig;
- Dictionary d=p_item->get_metadata(0);
- int usage = d.has("usage")?int(int(d["usage"])&(PROPERTY_USAGE_STORE_IF_NONONE|PROPERTY_USAGE_STORE_IF_NONZERO)):0;
-
-
- if (_get_instanced_node_original_property(name,vorig) || usage) {
- Variant v = obj->get(name);
-
-
- bool changed = _is_property_different(v,vorig,usage);
-
- if ((found!=-1)!=changed) {
-
- if (changed) {
-
- has_reload=true;
-
- } else {
-
- //p_item->erase_button(1,found);
- }
-
- }
-
- }
-
- }
-
- if (!has_reload && !obj->get_script().is_null()) {
- Ref<Script> scr = obj->get_script();
- Variant orig_value;
- if (scr->get_property_default_value(name,orig_value)) {
- if (orig_value!=obj->get(name)) {
- has_reload=true;
- }
- }
- }
-
- if (!has_reload && found!=-1) {
- p_item->erase_button(1,found);
- } else if (has_reload && found==-1) {
- p_item->add_button(1,get_icon("ReloadSmall","EditorIcons"),3);
- }
-#endif
Dictionary d = p_item->get_metadata(0);
set_item_text(p_item, d["type"], d["name"], d["hint"], d["hint_text"]);
}
@@ -2874,52 +2657,13 @@ void PropertyEditor::update_tree() {
TreeItem *root = tree->create_item(NULL);
tree->set_hide_root(true);
- /*
- TreeItem *title = tree->create_item(root);
-
- title->set_custom_bg_color(0,get_color("prop_section","Editor"));
- title->set_text(0,"Property"); // todo, fetch name if ID exists in database
- title->set_editable(0,false);
- title->set_selectable(0,false);
- title->set_custom_bg_color(1,get_color("prop_section","Editor"));
- title->set_text(1,"Value"); // todo, fetch name if ID exists in database
- title->set_editable(1,false);
- title->set_selectable(1,false);
-*/
-
- /*
- if (obj->cast_to<Node>() || obj->cast_to<Resource>()) {
- TreeItem *type = tree->create_item(root);
-
- type->set_text(0,"Type"); // todo, fetch name if ID exists in database
- type->set_text(1,obj->get_type()); // todo, fetch name if ID exists in database
- if (has_icon(obj->get_type(),"EditorIcons"))
- type->set_icon(1,get_icon(obj->get_type(),"EditorIcons") );
- else
- type->set_icon(1,get_icon("Object","EditorIcons") );
-
- type->set_selectable(0,false);
- type->set_selectable(1,false);
-
-
- TreeItem *name = tree->create_item(root);
-
- name->set_text(0,"Name"); // todo, fetch name if ID exists in database
- if (obj->is_type("Resource"))
- name->set_text(1,obj->cast_to<Resource>()->get_name());
- else if (obj->is_type("Node"))
- name->set_text(1,obj->cast_to<Node>()->get_name());
- name->set_selectable(0,false);
- name->set_selectable(1,false);
- }
-*/
List<PropertyInfo> plist;
obj->get_property_list(&plist, true);
bool draw_red = false;
{
- Node *nod = obj->cast_to<Node>();
+ Node *nod = Object::cast_to<Node>(obj);
Node *es = EditorNode::get_singleton()->get_edited_scene();
if (nod && es != nod && nod->get_owner() != es) {
draw_red = true;
@@ -3003,9 +2747,8 @@ void PropertyEditor::update_tree() {
sep->set_tooltip(0, TTR("Class:") + " " + p.name + ":\n\n" + class_descr_cache[type]);
}
- //sep->set_custom_color(0,Color(1,1,1));
-
continue;
+
} else if (!(p.usage & PROPERTY_USAGE_EDITOR))
continue;
@@ -3057,12 +2800,7 @@ void PropertyEditor::update_tree() {
continue;
}
- //printf("property %s\n",basename.ascii().get_data());
TreeItem *parent = get_parent_node(path, item_path, root, current_category);
- /*
- if (parent->get_parent()==root)
- parent=root;
- */
int level = 0;
if (parent != root) {
level++;
@@ -3082,7 +2820,6 @@ void PropertyEditor::update_tree() {
if (level > 0) {
item->set_custom_bg_color(0, col);
- //item->set_custom_bg_color(1,col);
}
item->set_editable(0, false);
item->set_selectable(0, property_selectable);
@@ -3144,7 +2881,6 @@ void PropertyEditor::update_tree() {
item->set_tooltip(0, TTR("Property:") + " " + p.name + "\n\n" + descr);
}
}
- //EditorHelp::get_doc_data();
Dictionary d;
d["name"] = p.name;
@@ -3164,7 +2900,6 @@ void PropertyEditor::update_tree() {
item->select(1);
}
- //printf("property %s type %i\n",p.name.ascii().get_data(),p.type);
switch (p.type) {
case Variant::BOOL: {
@@ -3204,7 +2939,6 @@ void PropertyEditor::update_tree() {
item->set_cell_mode(1, TreeItem::CELL_MODE_CUSTOM);
item->set_editable(1, !read_only);
- //item->set_icon( 0, get_icon("Curve","EditorIcons"));
Vector<String> values = p.hint_string.split(",");
String flags;
@@ -3251,7 +2985,6 @@ void PropertyEditor::update_tree() {
item->set_range_config(1, min, max, step, p.hint == PROPERTY_HINT_EXP_RANGE);
} else if (p.hint == PROPERTY_HINT_ENUM) {
- //int c = p.hint_string.get_slice_count(",");
item->set_text(1, p.hint_string);
if (show_type_icons)
item->set_icon(0, get_icon("Enum", "EditorIcons"));
@@ -3260,7 +2993,6 @@ void PropertyEditor::update_tree() {
break;
} else if (p.hint == PROPERTY_HINT_OBJECT_ID) {
- //int c = p.hint_string.get_slice_count(",");
item->set_cell_mode(1, TreeItem::CELL_MODE_CUSTOM);
String type = p.hint_string;
@@ -3591,7 +3323,6 @@ void PropertyEditor::update_tree() {
item->set_cell_mode(1, TreeItem::CELL_MODE_CUSTOM);
item->set_editable(1, !read_only);
- //item->set_text(1,obj->get(p.name));
item->set_custom_draw(1, this, "_draw_transparency");
if (show_type_icons)
item->set_icon(0, get_icon("Color", "EditorIcons"));
@@ -3610,7 +3341,6 @@ void PropertyEditor::update_tree() {
item->set_cell_mode(1, TreeItem::CELL_MODE_CUSTOM);
item->set_editable(1, !read_only);
- //item->add_button(1, get_icon("EditResource", "EditorIcons"));
String type;
if (p.hint == PROPERTY_HINT_RESOURCE_TYPE)
type = p.hint_string;
@@ -3675,15 +3405,12 @@ void PropertyEditor::update_tree() {
if (type != String()) {
if (type.find(",") != -1)
type = type.get_slice(",", 0);
- //printf("prop %s , type %s\n",p.name.ascii().get_data(),p.hint_string.ascii().get_data());
if (has_icon(type, "EditorIcons"))
item->set_icon(0, get_icon(type, "EditorIcons"));
else
item->set_icon(0, get_icon("Object", "EditorIcons"));
}
- //item->double_click_signal.connect( Method1<int>( Method2<int,String>( this, &Editoritem_obj_edited ), p.name ) );
-
} break;
default: {};
}
@@ -3710,7 +3437,6 @@ void PropertyEditor::update_tree() {
Variant v = obj->get(p.name);
if (_is_property_different(v, vorig, usage)) {
- //print_line("FOR "+String(p.name)+" RELOAD WITH: "+String(v)+"("+Variant::get_type_name(v.get_type())+")=="+String(vorig)+"("+Variant::get_type_name(vorig.get_type())+")");
item->add_button(1, get_icon("ReloadSmall", "EditorIcons"), 3);
has_reload = true;
}
@@ -3742,7 +3468,7 @@ void PropertyEditor::update_tree() {
void PropertyEditor::_draw_transparency(Object *t, const Rect2 &p_rect) {
- TreeItem *ti = t->cast_to<TreeItem>();
+ TreeItem *ti = Object::cast_to<TreeItem>(t);
if (!ti)
return;
@@ -3763,7 +3489,7 @@ void PropertyEditor::_item_folded(Object *item_obj) {
if (updating_folding)
return;
- TreeItem *item = item_obj->cast_to<TreeItem>();
+ TreeItem *item = Object::cast_to<TreeItem>(item_obj);
obj->editor_set_section_unfold(item->get_metadata(0), !item->is_collapsed());
}
@@ -3789,7 +3515,7 @@ void PropertyEditor::_edit_set(const String &p_name, const Variant &p_value, boo
}
}
- if (!undo_redo || obj->cast_to<ArrayPropertyEdit>()) { //kind of hacky
+ if (!undo_redo || Object::cast_to<ArrayPropertyEdit>(obj)) { //kind of hacky
obj->set(p_name, p_value);
if (p_refresh_all)
@@ -3799,9 +3525,9 @@ void PropertyEditor::_edit_set(const String &p_name, const Variant &p_value, boo
emit_signal(_prop_edited, p_name);
- } else if (obj->cast_to<MultiNodeEdit>()) {
+ } else if (Object::cast_to<MultiNodeEdit>(obj)) {
- obj->cast_to<MultiNodeEdit>()->set_property_field(p_name, p_value, p_changed_field);
+ Object::cast_to<MultiNodeEdit>(obj)->set_property_field(p_name, p_value, p_changed_field);
_changed_callbacks(obj, p_name);
emit_signal(_prop_edited, p_name);
} else {
@@ -3819,7 +3545,7 @@ void PropertyEditor::_edit_set(const String &p_name, const Variant &p_value, boo
undo_redo->add_undo_method(this, "_changed_callback", obj, p_name);
}
- Resource *r = obj->cast_to<Resource>();
+ Resource *r = Object::cast_to<Resource>(obj);
if (r) {
if (!r->is_edited() && String(p_name) != "resource/edited") {
undo_redo->add_do_method(r, "set_edited", true);
@@ -3942,9 +3668,8 @@ void PropertyEditor::_item_edited() {
case Variant::TRANSFORM: {
} break;
-
case Variant::COLOR: {
- //_edit_set(name,item->get_custom_bg_color(0));
+
} break;
case Variant::NODE_PATH: {
@@ -4030,7 +3755,6 @@ void PropertyEditor::_custom_editor_request(bool p_arrow) {
ERR_FAIL_COND(!item);
Dictionary d = item->get_metadata(0);
- //int type=d["type"];
String name = d["name"];
Variant::Type type = Variant::NIL;
if (d.has("type"))
@@ -4070,7 +3794,7 @@ void PropertyEditor::edit(Object *p_object) {
void PropertyEditor::_set_range_def(Object *p_item, String prop, float p_frame) {
- TreeItem *ti = p_item->cast_to<TreeItem>();
+ TreeItem *ti = Object::cast_to<TreeItem>(p_item);
ERR_FAIL_COND(!ti);
ti->call_deferred("set_range", 1, p_frame);
@@ -4078,7 +3802,8 @@ void PropertyEditor::_set_range_def(Object *p_item, String prop, float p_frame)
}
void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
- TreeItem *ti = p_item->cast_to<TreeItem>();
+
+ TreeItem *ti = Object::cast_to<TreeItem>(p_item);
ERR_FAIL_COND(!ti);
Dictionary d = ti->get_metadata(0);
@@ -4095,7 +3820,6 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
return;
String prop = d["name"];
emit_signal("property_keyed", prop, obj->get(prop), true);
- //set_range(p_column, ti->get_range(p_column)+1.0 );
call_deferred("_set_range_def", ti, prop, ti->get_range(p_column) + 1.0);
} else if (p_button == 3) {
@@ -4156,7 +3880,6 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
Variant v = obj->get(n);
custom_editor->edit(obj, n, (Variant::Type)t, v, h, ht);
- //Rect2 where=tree->get_custom_popup_rect();
if (h == PROPERTY_HINT_FILE || h == PROPERTY_HINT_DIR || h == PROPERTY_HINT_GLOBAL_DIR || h == PROPERTY_HINT_GLOBAL_FILE) {
Rect2 where = tree->get_item_rect(ti, 1);
@@ -4178,7 +3901,6 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
} else if (t == Variant::INT && h == PROPERTY_HINT_OBJECT_ID) {
emit_signal("object_id_selected", obj->get(n));
- print_line("OBJ ID SELECTED");
} else if (t == Variant::ARRAY || t == Variant::POOL_INT_ARRAY || t == Variant::POOL_REAL_ARRAY || t == Variant::POOL_STRING_ARRAY || t == Variant::POOL_VECTOR2_ARRAY || t == Variant::POOL_VECTOR3_ARRAY || t == Variant::POOL_COLOR_ARRAY || t == Variant::POOL_BYTE_ARRAY) {
@@ -4200,7 +3922,6 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
void PropertyEditor::_node_removed(Node *p_node) {
if (p_node == obj) {
-
edit(NULL);
}
}
@@ -4216,7 +3937,7 @@ void PropertyEditor::set_keying(bool p_active) {
void PropertyEditor::_draw_flags(Object *p_object, const Rect2 &p_rect) {
- TreeItem *ti = p_object->cast_to<TreeItem>();
+ TreeItem *ti = Object::cast_to<TreeItem>(p_object);
if (!ti)
return;
@@ -4268,7 +3989,7 @@ void PropertyEditor::_resource_preview_done(const String &p_path, const Ref<Text
if (!obj)
return;
- TreeItem *ti = obj->cast_to<TreeItem>();
+ TreeItem *ti = Object::cast_to<TreeItem>(obj);
ERR_FAIL_COND(!ti);
@@ -4374,7 +4095,7 @@ void PropertyEditor::set_use_filter(bool p_use) {
void PropertyEditor::register_text_enter(Node *p_line_edit) {
ERR_FAIL_NULL(p_line_edit);
- search_box = p_line_edit->cast_to<LineEdit>();
+ search_box = Object::cast_to<LineEdit>(p_line_edit);
if (search_box)
search_box->connect("text_changed", this, "_filter_changed");
@@ -4432,8 +4153,6 @@ PropertyEditor::PropertyEditor() {
tree->set_column_min_width(0, 30);
tree->set_column_expand(1, true);
tree->set_column_min_width(1, 18);
-
- //tree->set_hide_root(true);
add_child(tree);
tree->connect("item_edited", this, "_item_edited", varray(), CONNECT_DEFERRED);
@@ -4502,7 +4221,6 @@ class SectionedPropertyEditorFilter : public Object {
bool valid;
edited->set(name, p_value, &valid);
- //_change_notify(p_name.operator String().utf8().get_data());
return valid;
}
@@ -4819,8 +4537,7 @@ void PropertyValueEvaluator::edit(Object *p_obj) {
}
String PropertyValueEvaluator::_build_script(const String &p_text) {
- String script_text =
- "tool\nextends Object\nfunc eval(s):\n\tself = s\n\treturn " + p_text.strip_edges() + "\n";
+ String script_text = "tool\nextends Object\nfunc eval(s):\n\tself = s\n\treturn " + p_text.strip_edges() + "\n";
return script_text;
}
diff --git a/editor/property_editor.h b/editor/property_editor.h
index 3dd09268ec..bfd5ee401e 100644
--- a/editor/property_editor.h
+++ b/editor/property_editor.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -31,6 +31,7 @@
#define PROPERTY_EDITOR_H
#include "editor/editor_file_dialog.h"
+#include "editor/scene_tree_editor.h"
#include "scene/gui/button.h"
#include "scene/gui/check_box.h"
#include "scene/gui/check_button.h"
@@ -43,7 +44,6 @@
#include "scene/gui/text_edit.h"
#include "scene/gui/texture_rect.h"
#include "scene/gui/tree.h"
-#include "scene_tree_editor.h"
/**
@author Juan Linietsky <reduzio@gmail.com>
@@ -66,9 +66,8 @@ class CustomPropertyEditor : public Popup {
OBJ_MENU_MAKE_UNIQUE = 3,
OBJ_MENU_COPY = 4,
OBJ_MENU_PASTE = 5,
- OBJ_MENU_REIMPORT = 6,
- OBJ_MENU_NEW_SCRIPT = 7,
- OBJ_MENU_SHOW_IN_FILE_SYSTEM = 8,
+ OBJ_MENU_NEW_SCRIPT = 6,
+ OBJ_MENU_SHOW_IN_FILE_SYSTEM = 7,
TYPE_BASE_ID = 100
};
@@ -120,7 +119,6 @@ class CustomPropertyEditor : public Popup {
void _text_edit_changed();
void _file_selected(String p_file);
- void _scroll_modified(double p_value);
void _modified(String p_string);
void _range_modified(double p_value);
void _focus_enter();
@@ -168,7 +166,6 @@ class PropertyEditor : public Control {
Tree *tree;
Label *top_label;
- //Object *object;
LineEdit *search_box;
PropertyValueEvaluator *evaluator;
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp
index bd68eac9f2..6bbb35ceab 100644
--- a/editor/property_selector.cpp
+++ b/editor/property_selector.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -98,10 +98,10 @@ void PropertySelector::_update_search() {
} else {
Object *obj = ObjectDB::get_instance(script);
- if (obj && obj->cast_to<Script>()) {
+ if (Object::cast_to<Script>(obj)) {
props.push_back(PropertyInfo(Variant::NIL, "Script Variables", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_CATEGORY));
- obj->cast_to<Script>()->get_script_property_list(&props);
+ Object::cast_to<Script>(obj)->get_script_property_list(&props);
}
StringName base = base_type;
@@ -200,10 +200,10 @@ void PropertySelector::_update_search() {
} else {
Object *obj = ObjectDB::get_instance(script);
- if (obj && obj->cast_to<Script>()) {
+ if (Object::cast_to<Script>(obj)) {
methods.push_back(MethodInfo("*Script Methods"));
- obj->cast_to<Script>()->get_script_method_list(&methods);
+ Object::cast_to<Script>(obj)->get_script_method_list(&methods);
}
StringName base = base_type;
diff --git a/editor/property_selector.h b/editor/property_selector.h
index def791a3fd..3fa60771d7 100644
--- a/editor/property_selector.h
+++ b/editor/property_selector.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/pvrtc_compress.cpp b/editor/pvrtc_compress.cpp
index ef875bbead..13d74a6593 100644
--- a/editor/pvrtc_compress.cpp
+++ b/editor/pvrtc_compress.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/pvrtc_compress.h b/editor/pvrtc_compress.h
index 2bb6d57050..cd11f260fe 100644
--- a/editor/pvrtc_compress.h
+++ b/editor/pvrtc_compress.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp
index 7fb9666afb..c71cc5af3f 100644
--- a/editor/quick_open.cpp
+++ b/editor/quick_open.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/quick_open.h b/editor/quick_open.h
index 44f8c025e6..3f64dd8cf0 100644
--- a/editor/quick_open.h
+++ b/editor/quick_open.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/register_exporters.h b/editor/register_exporters.h
index 72f8acb89c..fefa1477b8 100644
--- a/editor/register_exporters.h
+++ b/editor/register_exporters.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/reparent_dialog.cpp b/editor/reparent_dialog.cpp
index acc511e004..5e765fe70f 100644
--- a/editor/reparent_dialog.cpp
+++ b/editor/reparent_dialog.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/reparent_dialog.h b/editor/reparent_dialog.h
index b7a3164f4b..667c7fe705 100644
--- a/editor/reparent_dialog.h
+++ b/editor/reparent_dialog.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/resources_dock.cpp b/editor/resources_dock.cpp
deleted file mode 100644
index db3bf6a352..0000000000
--- a/editor/resources_dock.cpp
+++ /dev/null
@@ -1,378 +0,0 @@
-/*************************************************************************/
-/* resources_dock.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "resources_dock.h"
-
-#include "editor_file_system.h"
-#include "editor_node.h"
-#include "editor_settings.h"
-#include "io/resource_loader.h"
-#include "io/resource_saver.h"
-#include "project_settings.h"
-#include "project_settings_editor.h"
-
-void ResourcesDock::_tool_selected(int p_tool) {
-
- current_action = p_tool;
-
- switch (p_tool) {
-
- case TOOL_NEW: {
-
- create_dialog->popup_centered_ratio();
- } break;
- case TOOL_OPEN: {
- editor->open_resource();
-
- } break;
- case TOOL_SAVE: {
-
- TreeItem *ti = resources->get_selected();
- if (!ti)
- break;
- Ref<Resource> current_res = ti->get_metadata(0);
-
- if (current_res->get_path() != "" && current_res->get_path().find("::") == -1) {
- _file_action(current_res->get_path());
- break;
- };
-
- }; /* fallthrough */
- case TOOL_SAVE_AS: {
-
- TreeItem *ti = resources->get_selected();
- if (!ti)
- break;
-
- save_resource_as(ti->get_metadata(0));
-
- } break;
- case TOOL_MAKE_LOCAL: {
-
- TreeItem *ti = resources->get_selected();
- if (!ti)
- break;
- Ref<Resource> current_res = ti->get_metadata(0);
- current_res->set_path("");
- _update_name(ti);
- } break;
- case TOOL_COPY: {
-
- TreeItem *ti = resources->get_selected();
- if (!ti)
- break;
- Ref<Resource> current_res = ti->get_metadata(0);
- EditorSettings::get_singleton()->set_resource_clipboard(current_res);
-
- } break;
- case TOOL_PASTE: {
-
- add_resource(EditorSettings::get_singleton()->get_resource_clipboard());
- } break;
- }
-}
-
-void ResourcesDock::_notification(int p_what) {
-
- switch (p_what) {
-
- case NOTIFICATION_ENTER_TREE: {
-
- button_new->set_icon(get_icon("New", "EditorIcons"));
- button_open->set_icon(get_icon("Folder", "EditorIcons"));
- button_save->set_icon(get_icon("Save", "EditorIcons"));
- button_tools->set_icon(get_icon("Tools", "EditorIcons"));
-
- } break;
- }
-}
-
-void ResourcesDock::save_resource(const String &p_path, const Ref<Resource> &p_resource) {
-
- editor->get_editor_data().apply_changes_in_editors();
- int flg = 0;
- if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
- flg |= ResourceSaver::FLAG_COMPRESS;
- /*
- if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
- flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
- */
-
- String path = ProjectSettings::get_singleton()->localize_path(p_path);
- Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
-
- if (err != OK) {
- accept->set_text(TTR("Error saving resource!"));
- accept->popup_centered_minsize();
- return;
- }
- //EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type());
-
- ((Resource *)p_resource.ptr())->set_path(path);
- editor->emit_signal("resource_saved", p_resource);
-}
-
-void ResourcesDock::save_resource_as(const Ref<Resource> &p_resource) {
-
- current_action = TOOL_SAVE_AS;
-
- RES res(p_resource);
-
- List<String> extensions;
- ResourceSaver::get_recognized_extensions(res, &extensions);
- file->set_mode(EditorFileDialog::MODE_SAVE_FILE);
-
- if (p_resource->get_path() != "" && p_resource->get_path().find("::") == -1) {
-
- file->set_current_path(p_resource->get_path());
- } else {
-
- String existing;
- if (extensions.size()) {
- existing = "new_" + res->get_class().to_lower() + "." + extensions.front()->get().to_lower();
- }
-
- file->set_current_file(existing);
- }
-
- file->clear_filters();
- for (int i = 0; i < extensions.size(); i++) {
-
- file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
- }
-
- file->popup_centered_ratio();
-}
-
-void ResourcesDock::_file_action(const String &p_path) {
-
- switch (current_action) {
-
- case TOOL_OPEN: {
-
- } break;
- case TOOL_SAVE:
- case TOOL_SAVE_AS: {
-
- TreeItem *ti = resources->get_selected();
- if (!ti)
- break;
- Ref<Resource> current_res = ti->get_metadata(0);
-
- RES res(current_res);
-
- save_resource(p_path, res);
-
- _update_name(ti);
-
- } break;
- }
-}
-
-void ResourcesDock::_update_name(TreeItem *item) {
-
- Ref<Resource> res = item->get_metadata(0);
-
- if (res->get_name() != "")
- item->set_text(0, res->get_name());
- else if (res->get_path() != "" && res->get_path().find("::") == -1)
- item->set_text(0, res->get_path().get_file());
- else
- item->set_text(0, res->get_class() + " (" + itos(res->get_instance_id()) + ")");
-}
-
-void ResourcesDock::remove_resource(const Ref<Resource> &p_resource) {
-
- TreeItem *root = resources->get_root();
- ERR_FAIL_COND(!root);
-
- TreeItem *existing = root->get_children();
-
- while (existing) {
-
- Ref<Resource> r = existing->get_metadata(0);
- if (r == p_resource) {
- //existing->move_to_top();
- memdelete(existing);
- return;
- }
- existing = existing->get_next();
- }
-}
-
-void ResourcesDock::add_resource(const Ref<Resource> &p_resource) {
-
- if (block_add)
- return;
- if (!p_resource.is_valid())
- return;
-
- TreeItem *root = resources->get_root();
- ERR_FAIL_COND(!root);
-
- TreeItem *existing = root->get_children();
-
- while (existing) {
-
- Ref<Resource> r = existing->get_metadata(0);
- if (r == p_resource) {
- //existing->move_to_top();
- existing->select(0);
- resources->ensure_cursor_is_visible();
- return; // existing
- }
- existing = existing->get_next();
- }
-
- TreeItem *res = resources->create_item(root);
- res->set_metadata(0, p_resource);
-
- if (has_icon(p_resource->get_class(), "EditorIcons")) {
- res->set_icon(0, get_icon(p_resource->get_class(), "EditorIcons"));
- }
-
- _update_name(res);
- res->add_button(0, get_icon("Del", "EditorIcons"));
- res->move_to_top();
- res->select(0);
- resources->ensure_cursor_is_visible();
-}
-
-void ResourcesDock::_resource_selected() {
-
- TreeItem *sel = resources->get_selected();
- ERR_FAIL_COND(!sel);
-
- Ref<Resource> r = sel->get_metadata(0);
- if (r.is_null())
- return;
- block_add = true;
- editor->push_item(r.ptr());
- block_add = false;
-}
-
-void ResourcesDock::_delete(Object *p_item, int p_column, int p_id) {
-
- TreeItem *ti = p_item->cast_to<TreeItem>();
- ERR_FAIL_COND(!ti);
-
- call_deferred("remove_resource", ti->get_metadata(0));
-}
-
-void ResourcesDock::_create() {
-
- Object *c = create_dialog->instance_selected();
-
- ERR_FAIL_COND(!c);
- Resource *r = c->cast_to<Resource>();
- ERR_FAIL_COND(!r);
-
- REF res(r);
-
- editor->push_item(c);
-}
-
-void ResourcesDock::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_tool_selected"), &ResourcesDock::_tool_selected);
- ClassDB::bind_method(D_METHOD("_create"), &ResourcesDock::_create);
- ClassDB::bind_method(D_METHOD("_resource_selected"), &ResourcesDock::_resource_selected);
- ClassDB::bind_method(D_METHOD("_delete"), &ResourcesDock::_delete);
- ClassDB::bind_method(D_METHOD("remove_resource"), &ResourcesDock::remove_resource);
- ClassDB::bind_method(D_METHOD("_file_action"), &ResourcesDock::_file_action);
-}
-
-void ResourcesDock::cleanup() {
-
- resources->clear();
- resources->create_item(); //root
-}
-
-ResourcesDock::ResourcesDock(EditorNode *p_editor) {
-
- editor = p_editor;
-
- VBoxContainer *vbc = this;
-
- HBoxContainer *hbc = memnew(HBoxContainer);
- vbc->add_child(hbc);
-
- Button *b;
- b = memnew(ToolButton);
- b->set_tooltip(TTR("Create New Resource"));
- b->connect("pressed", this, "_tool_selected", make_binds(TOOL_NEW));
- hbc->add_child(b);
- button_new = b;
-
- b = memnew(ToolButton);
- b->set_tooltip(TTR("Open Resource"));
- b->connect("pressed", this, "_tool_selected", make_binds(TOOL_OPEN));
- hbc->add_child(b);
- button_open = b;
-
- MenuButton *mb = memnew(MenuButton);
- mb->set_tooltip(TTR("Save Resource"));
- mb->get_popup()->add_item(TTR("Save Resource"), TOOL_SAVE);
- mb->get_popup()->add_item(TTR("Save Resource As.."), TOOL_SAVE_AS);
- mb->get_popup()->connect("id_pressed", this, "_tool_selected");
- hbc->add_child(mb);
- button_save = mb;
-
- hbc->add_spacer();
-
- mb = memnew(MenuButton);
- mb->set_tooltip(TTR("Resource Tools"));
- mb->get_popup()->add_item(TTR("Make Local"), TOOL_MAKE_LOCAL);
- mb->get_popup()->add_item(TTR("Copy"), TOOL_COPY);
- mb->get_popup()->add_item(TTR("Paste"), TOOL_PASTE);
- mb->get_popup()->connect("id_pressed", this, "_tool_selected");
- hbc->add_child(mb);
- button_tools = mb;
-
- resources = memnew(Tree);
- vbc->add_child(resources);
- resources->set_v_size_flags(SIZE_EXPAND_FILL);
- resources->create_item(); //root
- resources->set_hide_root(true);
- resources->connect("cell_selected", this, "_resource_selected");
- resources->connect("button_pressed", this, "_delete");
-
- create_dialog = memnew(CreateDialog);
- add_child(create_dialog);
- create_dialog->set_base_type("Resource");
- create_dialog->connect("create", this, "_create");
- accept = memnew(AcceptDialog);
- add_child(accept);
-
- file = memnew(EditorFileDialog);
- add_child(file);
- file->connect("file_selected", this, "_file_action");
-
- block_add = false;
-}
diff --git a/editor/resources_dock.h b/editor/resources_dock.h
deleted file mode 100644
index e5470b1a3c..0000000000
--- a/editor/resources_dock.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*************************************************************************/
-/* resources_dock.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef RESOURCES_DOCK_H
-#define RESOURCES_DOCK_H
-
-#include "create_dialog.h"
-#include "editor_file_dialog.h"
-#include "scene/gui/box_container.h"
-#include "scene/gui/button.h"
-#include "scene/gui/control.h"
-#include "scene/gui/file_dialog.h"
-#include "scene/gui/label.h"
-#include "scene/gui/menu_button.h"
-#include "scene/gui/tool_button.h"
-#include "scene/gui/tree.h"
-
-class EditorNode;
-
-class ResourcesDock : public VBoxContainer {
-
- GDCLASS(ResourcesDock, VBoxContainer);
-
- enum {
- TOOL_NEW,
- TOOL_OPEN,
- TOOL_SAVE,
- TOOL_SAVE_AS,
- TOOL_MAKE_LOCAL,
- TOOL_COPY,
- TOOL_PASTE,
- TOOL_MAX
- };
-
- EditorNode *editor;
-
- Button *button_new;
- Button *button_open;
- Button *button_save;
- Button *button_tools;
-
- CreateDialog *create_dialog;
-
- AcceptDialog *accept;
- EditorFileDialog *file;
- Tree *resources;
- bool block_add;
- int current_action;
-
- void _file_action(const String &p_path);
-
- void _delete(Object *p_item, int p_column, int p_id);
- void _resource_selected();
- void _update_name(TreeItem *item);
- void _tool_selected(int p_tool);
- void _create();
-
-protected:
- void _notification(int p_what);
- static void _bind_methods();
-
-public:
- void add_resource(const Ref<Resource> &p_resource);
- void remove_resource(const Ref<Resource> &p_resource);
- void save_resource(const String &p_path, const Ref<Resource> &p_resource);
- void save_resource_as(const Ref<Resource> &p_resource);
-
- void cleanup();
-
- ResourcesDock(EditorNode *p_editor);
-};
-
-#endif // RESOURCES_DOCK_H
diff --git a/editor/run_settings_dialog.cpp b/editor/run_settings_dialog.cpp
index dfb152d40b..a76e94a173 100644
--- a/editor/run_settings_dialog.cpp
+++ b/editor/run_settings_dialog.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -86,7 +86,6 @@ RunSettingsDialog::RunSettingsDialog() {
arguments->set_editable(false);
get_ok()->set_text(TTR("Close"));
- //get_cancel()->set_text("Close");
set_title(TTR("Scene Run Settings"));
}
diff --git a/editor/run_settings_dialog.h b/editor/run_settings_dialog.h
index b1b4240bf2..225d5ee085 100644
--- a/editor/run_settings_dialog.h
+++ b/editor/run_settings_dialog.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index e984098bd4..afdf48b314 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -29,20 +29,20 @@
/*************************************************************************/
#include "scene_tree_dock.h"
-#include "animation_editor.h"
#include "core/io/resource_saver.h"
+#include "core/os/keyboard.h"
+#include "core/project_settings.h"
+#include "editor/animation_editor.h"
+#include "editor/editor_node.h"
+#include "editor/editor_settings.h"
+#include "editor/multi_node_edit.h"
#include "editor/plugins/animation_player_editor_plugin.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "editor/plugins/script_editor_plugin.h"
#include "editor/plugins/spatial_editor_plugin.h"
-#include "editor_node.h"
-#include "editor_settings.h"
-#include "multi_node_edit.h"
-#include "os/keyboard.h"
-#include "project_settings.h"
+#include "editor/script_editor_debugger.h"
#include "scene/main/viewport.h"
#include "scene/resources/packed_scene.h"
-#include "script_editor_debugger.h"
void SceneTreeDock::_nodes_drag_begin() {
@@ -106,7 +106,6 @@ void SceneTreeDock::instance(const String &p_file) {
if (!parent || !edited_scene) {
current_option = -1;
- //accept->get_cancel()->hide();
accept->get_ok()->set_text(TTR("OK :("));
accept->set_text(TTR("No parent to instance a child at."));
accept->popup_centered_minsize();
@@ -152,7 +151,6 @@ void SceneTreeDock::_perform_instance_scenes(const Vector<String> &p_files, Node
Ref<PackedScene> sdata = ResourceLoader::load(p_files[i]);
if (!sdata.is_valid()) {
current_option = -1;
- //accept->get_cancel()->hide();
accept->get_ok()->set_text(TTR("Ugh"));
accept->set_text(vformat(TTR("Error loading scene from %s"), p_files[i]));
accept->popup_centered_minsize();
@@ -163,7 +161,6 @@ void SceneTreeDock::_perform_instance_scenes(const Vector<String> &p_files, Node
Node *instanced_scene = sdata->instance(PackedScene::GEN_EDIT_STATE_INSTANCE);
if (!instanced_scene) {
current_option = -1;
- //accept->get_cancel()->hide();
accept->get_ok()->set_text(TTR("Ugh"));
accept->set_text(vformat(TTR("Error instancing scene from %s"), p_files[i]));
accept->popup_centered_minsize();
@@ -195,8 +192,6 @@ void SceneTreeDock::_perform_instance_scenes(const Vector<String> &p_files, Node
return;
}
- //instanced_scene->generate_instance_state();
-
editor_data->get_undo_redo().create_action(TTR("Instance Scene(s)"));
for (int i = 0; i < instances.size(); i++) {
@@ -275,10 +270,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
switch (p_tool) {
case TOOL_NEW: {
- /*
- if (!_validate_no_foreign())
- break;
- */
create_dialog->popup_create(true);
} break;
case TOOL_INSTANCE: {
@@ -286,24 +277,9 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
Node *scene = edited_scene;
if (!scene) {
-
EditorNode::get_singleton()->new_inherited_scene();
-
- /* should be legal now
- current_option=-1;
- //confirmation->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("This operation can't be done without a tree root.");
- accept->popup_centered_minsize();
- */
- break;
}
- /*
- if (!_validate_no_foreign())
- break;
- */
-
file->set_mode(EditorFileDialog::MODE_OPEN_FILE);
List<String> extensions;
ResourceLoader::get_recognized_extensions_for_type("PackedScene", &extensions);
@@ -313,7 +289,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
file->add_filter("*." + extensions[i] + " ; " + extensions[i].to_upper());
}
- //file->set_current_path(current_path);
file->popup_centered_ratio();
} break;
@@ -321,43 +296,12 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
create_dialog->popup_create(false);
} break;
- case TOOL_CONNECT: {
-
- Node *current = scene_tree->get_selected();
- if (!current)
- break;
-
- /*
- if (!_validate_no_foreign())
- break;
- connect_dialog->popup_centered_ratio();
- connect_dialog->set_node(current);
- */
-
- } break;
- case TOOL_GROUP: {
-
- Node *current = scene_tree->get_selected();
- if (!current)
- break;
- /*
- if (!_validate_no_foreign())
- break;
- groups_editor->set_current(current);
- groups_editor->popup_centered_ratio();
- */
- } break;
case TOOL_ATTACH_SCRIPT: {
Node *selected = scene_tree->get_selected();
if (!selected)
break;
- /*
- if (!_validate_no_foreign())
- break;
- */
-
Ref<Script> existing = selected->get_script();
if (existing.is_valid())
editor->push_item(existing.ptr());
@@ -391,7 +335,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if (scene_tree->get_selected() == edited_scene) {
current_option = -1;
- //accept->get_cancel()->hide();
accept->get_ok()->set_text(TTR("I see.."));
accept->set_text(TTR("This operation can't be done on the tree root."));
accept->popup_centered_minsize();
@@ -467,8 +410,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if (selection.size() == 0)
break;
- List<Node *> reselect;
-
editor_data->get_undo_redo().create_action(TTR("Duplicate Node(s)"));
editor_data->get_undo_redo().add_do_method(editor_selection, "clear");
@@ -510,9 +451,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
editor_data->get_undo_redo().add_do_method(sed, "live_debug_duplicate_node", edited_scene->get_path_to(node), dup->get_name());
editor_data->get_undo_redo().add_undo_method(sed, "live_debug_remove_node", NodePath(String(edited_scene->get_path_to(parent)) + "/" + dup->get_name()));
-
- //parent->add_child(dup);
- //reselect.push_back(dup);
}
editor_data->get_undo_redo().commit_action();
@@ -529,7 +467,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if (editor_selection->is_selected(edited_scene)) {
current_option = -1;
- //confirmation->get_cancel()->hide();
accept->get_ok()->set_text(TTR("I see.."));
accept->set_text(TTR("This operation can't be done on the tree root."));
accept->popup_centered_minsize();
@@ -707,7 +644,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
ERR_FAIL_COND(node->get_filename() == String());
- undo_redo->create_action("Discard Instancing");
+ undo_redo->create_action(TTR("Discard Instancing"));
undo_redo->add_do_method(node, "set_filename", "");
undo_redo->add_undo_method(node, "set_filename", node->get_filename());
_node_replace_owner(node, node, root);
@@ -775,7 +712,7 @@ void SceneTreeDock::_notification(int p_what) {
break;
first_enter = false;
- CanvasItemEditorPlugin *canvas_item_plugin = editor_data->get_editor("2D")->cast_to<CanvasItemEditorPlugin>();
+ CanvasItemEditorPlugin *canvas_item_plugin = Object::cast_to<CanvasItemEditorPlugin>(editor_data->get_editor("2D"));
if (canvas_item_plugin) {
canvas_item_plugin->get_canvas_item_editor()->connect("item_lock_status_changed", scene_tree, "_update_tree");
canvas_item_plugin->get_canvas_item_editor()->connect("item_group_status_changed", scene_tree, "_update_tree");
@@ -799,6 +736,14 @@ void SceneTreeDock::_notification(int p_what) {
case NOTIFICATION_EXIT_TREE: {
clear_inherit_confirm->disconnect("confirmed", this, "_tool_selected");
} break;
+ case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+ button_add->set_icon(get_icon("Add", "EditorIcons"));
+ button_instance->set_icon(get_icon("Instance", "EditorIcons"));
+ button_create_script->set_icon(get_icon("ScriptCreate", "EditorIcons"));
+ button_clear_script->set_icon(get_icon("ScriptRemove", "EditorIcons"));
+
+ filter->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
+ } break;
}
}
@@ -860,11 +805,10 @@ Node *SceneTreeDock::_duplicate(Node *p_node, Map<Node *, Node *> &duplimap) {
node = sd->instance(PackedScene::GEN_EDIT_STATE_INSTANCE);
ERR_FAIL_COND_V(!node, NULL);
node->set_scene_instance_load_placeholder(p_node->get_scene_instance_load_placeholder());
- //node->generate_instance_state();
} else {
Object *obj = ClassDB::instance(p_node->get_class());
ERR_FAIL_COND_V(!obj, NULL);
- node = obj->cast_to<Node>();
+ node = Object::cast_to<Node>(obj);
if (!node)
memdelete(obj);
ERR_FAIL_COND_V(!node, NULL);
@@ -915,11 +859,7 @@ void SceneTreeDock::_set_owners(Node *p_owner, const Array &p_nodes) {
for (int i = 0; i < p_nodes.size(); i++) {
- Object *obj = p_nodes[i];
- if (!obj)
- continue;
-
- Node *n = obj->cast_to<Node>();
+ Node *n = Object::cast_to<Node>(p_nodes[i]);
if (!n)
continue;
n->set_owner(p_owner);
@@ -994,9 +934,9 @@ void SceneTreeDock::perform_node_renames(Node *p_base, List<Pair<NodePath, NodeP
if (!p_base)
return;
- if (p_base->cast_to<AnimationPlayer>()) {
+ if (Object::cast_to<AnimationPlayer>(p_base)) {
- AnimationPlayer *ap = p_base->cast_to<AnimationPlayer>();
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_base);
List<StringName> anims;
ap->get_animation_list(&anims);
Node *root = ap->get_node(ap->get_root());
@@ -1153,8 +1093,6 @@ void SceneTreeDock::_node_reparent(NodePath p_path, bool p_keep_global_xform) {
Node *new_parent = scene_root->get_node(p_path);
ERR_FAIL_COND(!new_parent);
- //ok all valid
-
List<Node *> selection = editor_selection->get_selected_node_list();
if (selection.empty())
@@ -1184,11 +1122,8 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
}
validate = validate->get_parent();
}
-
//ok all valid
- List<Node *> selection = editor_selection->get_selected_node_list();
-
if (p_nodes.size() == 0)
return; //nothing to reparent
@@ -1235,12 +1170,12 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
editor_data->get_undo_redo().add_undo_method(sed, "live_debug_reparent_node", NodePath(String(edited_scene->get_path_to(new_parent)) + "/" + new_name), edited_scene->get_path_to(node->get_parent()), node->get_name(), node->get_index());
if (p_keep_global_xform) {
- if (node->cast_to<Node2D>())
- editor_data->get_undo_redo().add_do_method(node, "set_global_transform", node->cast_to<Node2D>()->get_global_transform());
- if (node->cast_to<Spatial>())
- editor_data->get_undo_redo().add_do_method(node, "set_global_transform", node->cast_to<Spatial>()->get_global_transform());
- if (node->cast_to<Control>())
- editor_data->get_undo_redo().add_do_method(node, "set_global_position", node->cast_to<Control>()->get_global_position());
+ if (Object::cast_to<Node2D>(node))
+ editor_data->get_undo_redo().add_do_method(node, "set_global_transform", Object::cast_to<Node2D>(node)->get_global_transform());
+ if (Object::cast_to<Spatial>(node))
+ editor_data->get_undo_redo().add_do_method(node, "set_global_transform", Object::cast_to<Spatial>(node)->get_global_transform());
+ if (Object::cast_to<Control>(node))
+ editor_data->get_undo_redo().add_do_method(node, "set_global_position", Object::cast_to<Control>(node)->get_global_position());
}
editor_data->get_undo_redo().add_do_method(this, "_set_owners", edited_scene, owners);
@@ -1277,19 +1212,18 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V
editor_data->get_undo_redo().add_undo_method(AnimationPlayerEditor::singleton->get_key_editor(), "set_root", node);
if (p_keep_global_xform) {
- if (node->cast_to<Node2D>())
- editor_data->get_undo_redo().add_undo_method(node, "set_transform", node->cast_to<Node2D>()->get_transform());
- if (node->cast_to<Spatial>())
- editor_data->get_undo_redo().add_undo_method(node, "set_transform", node->cast_to<Spatial>()->get_transform());
- if (node->cast_to<Control>())
- editor_data->get_undo_redo().add_undo_method(node, "set_position", node->cast_to<Control>()->get_position());
+ if (Object::cast_to<Node2D>(node))
+ editor_data->get_undo_redo().add_undo_method(node, "set_transform", Object::cast_to<Node2D>(node)->get_transform());
+ if (Object::cast_to<Spatial>(node))
+ editor_data->get_undo_redo().add_undo_method(node, "set_transform", Object::cast_to<Spatial>(node)->get_transform());
+ if (Object::cast_to<Control>(node))
+ editor_data->get_undo_redo().add_undo_method(node, "set_position", Object::cast_to<Control>(node)->get_position());
}
}
perform_node_renames(NULL, &path_renames);
editor_data->get_undo_redo().commit_action();
- //node->set_owner(owner);
}
void SceneTreeDock::_script_created(Ref<Script> p_script) {
@@ -1365,7 +1299,6 @@ void SceneTreeDock::_delete_confirm() {
if (AnimationPlayerEditor::singleton->get_key_editor()->get_root() == n)
editor_data->get_undo_redo().add_undo_method(AnimationPlayerEditor::singleton->get_key_editor(), "set_root", n);
editor_data->get_undo_redo().add_undo_method(this, "_set_owners", edited_scene, owners);
- //editor_data->get_undo_redo().add_undo_method(n,"set_owner",n->get_owner());
editor_data->get_undo_redo().add_undo_reference(n);
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
@@ -1396,8 +1329,6 @@ void SceneTreeDock::_selection_changed() {
button_create_script->hide();
button_clear_script->hide();
}
-
- //tool_buttons[TOOL_MULTI_EDIT]->set_disabled(EditorNode::get_singleton()->get_editor_selection()->get_selection().size()<2);
}
void SceneTreeDock::_create() {
@@ -1421,7 +1352,7 @@ void SceneTreeDock::_create() {
Object *c = create_dialog->instance_selected();
ERR_FAIL_COND(!c);
- Node *child = c->cast_to<Node>();
+ Node *child = Object::cast_to<Node>(c);
ERR_FAIL_COND(!child);
editor_data->get_undo_redo().create_action(TTR("Create Node"));
@@ -1450,9 +1381,9 @@ void SceneTreeDock::_create() {
editor_data->get_undo_redo().commit_action();
editor->push_item(c);
- if (c->cast_to<Control>()) {
+ if (Object::cast_to<Control>(c)) {
//make editor more comfortable, so some controls don't appear super shrunk
- Control *ct = c->cast_to<Control>();
+ Control *ct = Object::cast_to<Control>(c);
Size2 ms = ct->get_minimum_size();
if (ms.width < 4)
@@ -1469,7 +1400,7 @@ void SceneTreeDock::_create() {
Object *c = create_dialog->instance_selected();
ERR_FAIL_COND(!c);
- Node *newnode = c->cast_to<Node>();
+ Node *newnode = Object::cast_to<Node>(c);
ERR_FAIL_COND(!newnode);
List<PropertyInfo> pinfo;
@@ -1561,16 +1492,6 @@ void SceneTreeDock::_import_subscene() {
import_subscene_dialog->move(parent, edited_scene);
editor_data->get_undo_redo().clear_history(); //no undo for now..
-
- /*
- editor_data->get_undo_redo().create_action("Import Subscene");
- editor_data->get_undo_redo().add_do_method(parent,"add_child",ss);
- //editor_data->get_undo_redo().add_do_method(editor_selection,"clear");
- //editor_data->get_undo_redo().add_do_method(editor_selection,"add_node",child);
- editor_data->get_undo_redo().add_do_reference(ss);
- editor_data->get_undo_redo().add_undo_method(parent,"remove_child",ss);
- editor_data->get_undo_redo().commit_action();
-*/
}
void SceneTreeDock::_new_scene_from(String p_file) {
@@ -1605,10 +1526,6 @@ void SceneTreeDock::_new_scene_from(String p_file) {
int flg = 0;
if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources"))
flg |= ResourceSaver::FLAG_COMPRESS;
- /*
- if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative"))
- flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
- */
err = ResourceSaver::save(p_file, sdata, flg);
if (err != OK) {
@@ -1708,7 +1625,6 @@ void SceneTreeDock::_normalize_drop(Node *&to_node, int &to_pos, int p_type) {
if (_has_visible_children(to_node)) {
to_pos = 0;
} else {
-
for (int i = to_node->get_index() + 1; i < to_node->get_parent()->get_child_count(); i++) {
Node *c = to_node->get_parent()->get_child(i);
if (_is_node_visible(c)) {
@@ -1722,26 +1638,6 @@ void SceneTreeDock::_normalize_drop(Node *&to_node, int &to_pos, int p_type) {
to_node = to_node->get_parent();
}
-#if 0
- //quite complicated, look for next visible in tree
- upper_sibling=_find_last_visible(upper_sibling);
-
- if (upper_sibling->get_parent()==to_node->get_parent()) {
- //just insert over this node because nothing is above at an upper level
- to_pos=to_node->get_index();
- to_node=to_node->get_parent();
- } else {
- to_pos=-1; //insert last in whathever is up
- to_node=upper_sibling->get_parent(); //insert at a parent of whathever is up
- }
-
-
- } else {
- //just insert over this node because nothing is above at the same level
- to_pos=to_node->get_index();
- to_node=to_node->get_parent();
- }
-#endif
}
}
@@ -1861,17 +1757,14 @@ void SceneTreeDock::_tree_rmb(const Vector2 &p_menu_pos) {
menu->add_icon_shortcut(get_icon("Instance", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/instance_scene"), TOOL_INSTANCE);
menu->add_separator();
menu->add_icon_shortcut(get_icon("Reload", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/change_node_type"), TOOL_REPLACE);
- //menu->add_separator(); moved to their own dock
- //menu->add_icon_item(get_icon("Groups","EditorIcons"),TTR("Edit Groups"),TOOL_GROUP);
- //menu->add_icon_item(get_icon("Connect","EditorIcons"),TTR("Edit Connections"),TOOL_CONNECT);
menu->add_separator();
menu->add_icon_shortcut(get_icon("ScriptCreate", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/attach_script"), TOOL_ATTACH_SCRIPT);
menu->add_icon_shortcut(get_icon("ScriptRemove", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/clear_script"), TOOL_CLEAR_SCRIPT);
menu->add_separator();
}
- menu->add_icon_shortcut(get_icon("Up", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/move_up"), TOOL_MOVE_UP);
- menu->add_icon_shortcut(get_icon("Down", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/move_down"), TOOL_MOVE_DOWN);
+ menu->add_icon_shortcut(get_icon("MoveUp", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/move_up"), TOOL_MOVE_UP);
+ menu->add_icon_shortcut(get_icon("MoveDown", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/move_down"), TOOL_MOVE_DOWN);
menu->add_icon_shortcut(get_icon("Duplicate", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/duplicate"), TOOL_DUPLICATE);
menu->add_icon_shortcut(get_icon("Reparent", "EditorIcons"), ED_GET_SHORTCUT("scene_tree/reparent"), TOOL_REPARENT);
@@ -1931,10 +1824,10 @@ void SceneTreeDock::_focus_node() {
ERR_FAIL_COND(!node);
if (node->is_class("CanvasItem")) {
- CanvasItemEditorPlugin *editor = editor_data->get_editor("2D")->cast_to<CanvasItemEditorPlugin>();
+ CanvasItemEditorPlugin *editor = Object::cast_to<CanvasItemEditorPlugin>(editor_data->get_editor("2D"));
editor->get_canvas_item_editor()->focus_selection();
} else {
- SpatialEditorPlugin *editor = editor_data->get_editor("3D")->cast_to<SpatialEditorPlugin>();
+ SpatialEditorPlugin *editor = Object::cast_to<SpatialEditorPlugin>(editor_data->get_editor("3D"));
editor->get_spatial_editor()->get_editor_viewport(0)->focus_selection();
}
}
@@ -1949,7 +1842,6 @@ void SceneTreeDock::_bind_methods() {
ClassDB::bind_method(D_METHOD("_tool_selected"), &SceneTreeDock::_tool_selected, DEFVAL(false));
ClassDB::bind_method(D_METHOD("_create"), &SceneTreeDock::_create);
- //ClassDB::bind_method(D_METHOD("_script_created"),&SceneTreeDock::_script_created);
ClassDB::bind_method(D_METHOD("_node_reparent"), &SceneTreeDock::_node_reparent);
ClassDB::bind_method(D_METHOD("_set_owners"), &SceneTreeDock::_set_owners);
ClassDB::bind_method(D_METHOD("_node_selected"), &SceneTreeDock::_node_selected);
@@ -2066,14 +1958,6 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor, Node *p_scene_root, EditorSel
add_child(create_dialog);
create_dialog->connect("create", this, "_create");
- //groups_editor = memnew( GroupsEditor );
- //add_child(groups_editor);
- //groups_editor->set_undo_redo(&editor_data->get_undo_redo());
-
- //connect_dialog = memnew( ConnectionsDialog(p_editor) );
- //add_child(connect_dialog);
- //connect_dialog->set_undoredo(&editor_data->get_undo_redo());
-
script_create_dialog = memnew(ScriptCreateDialog);
add_child(script_create_dialog);
script_create_dialog->connect("script_created", this, "_script_created");
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h
index 5a6bc94125..f61c67bb13 100644
--- a/editor/scene_tree_dock.h
+++ b/editor/scene_tree_dock.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -30,12 +30,13 @@
#ifndef SCENE_TREE_DOCK_H
#define SCENE_TREE_DOCK_H
-#include "connections_dialog.h"
-#include "create_dialog.h"
-#include "editor_data.h"
-#include "editor_sub_scene.h"
-#include "groups_editor.h"
-#include "reparent_dialog.h"
+#include "editor/connections_dialog.h"
+#include "editor/create_dialog.h"
+#include "editor/editor_data.h"
+#include "editor/editor_sub_scene.h"
+#include "editor/groups_editor.h"
+#include "editor/reparent_dialog.h"
+#include "editor/script_create_dialog.h"
#include "scene/animation/animation_player.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
@@ -45,7 +46,7 @@
#include "scene/gui/tool_button.h"
#include "scene/gui/tree.h"
#include "scene_tree_editor.h"
-#include "script_create_dialog.h"
+
class EditorNode;
class SceneTreeDock : public VBoxContainer {
@@ -57,8 +58,6 @@ class SceneTreeDock : public VBoxContainer {
TOOL_NEW,
TOOL_INSTANCE,
TOOL_REPLACE,
- TOOL_CONNECT,
- TOOL_GROUP,
TOOL_ATTACH_SCRIPT,
TOOL_CLEAR_SCRIPT,
TOOL_MOVE_UP,
@@ -104,8 +103,6 @@ class SceneTreeDock : public VBoxContainer {
EditorData *editor_data;
EditorSelection *editor_selection;
- //GroupsEditor *groups_editor;
- //ConnectionsDialog *connect_dialog;
ScriptCreateDialog *script_create_dialog;
AcceptDialog *accept;
ConfirmationDialog *delete_dialog;
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 2fab78e8c0..87b4d2a867 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -46,7 +46,7 @@ Node *SceneTreeEditor::get_scene_node() {
void SceneTreeEditor::_cell_button_pressed(Object *p_item, int p_column, int p_id) {
- TreeItem *item = p_item->cast_to<TreeItem>();
+ TreeItem *item = Object::cast_to<TreeItem>(p_item);
ERR_FAIL_COND(!item);
NodePath np = item->get_metadata(0);
@@ -475,7 +475,7 @@ void SceneTreeEditor::_selected_changed() {
void SceneTreeEditor::_cell_multi_selected(Object *p_object, int p_cell, bool p_selected) {
- TreeItem *item = p_object->cast_to<TreeItem>();
+ TreeItem *item = Object::cast_to<TreeItem>(p_object);
ERR_FAIL_COND(!item);
NodePath np = item->get_metadata(0);
@@ -584,7 +584,7 @@ void SceneTreeEditor::_rename_node(ObjectID p_node, const String &p_name) {
Object *o = ObjectDB::get_instance(p_node);
ERR_FAIL_COND(!o);
- Node *n = o->cast_to<Node>();
+ Node *n = Object::cast_to<Node>(o);
ERR_FAIL_COND(!n);
TreeItem *item = _find(tree->get_root(), n->get_path());
ERR_FAIL_COND(!item);
@@ -732,7 +732,7 @@ void SceneTreeEditor::_cell_collapsed(Object *p_obj) {
if (!can_rename)
return;
- TreeItem *ti = p_obj->cast_to<TreeItem>();
+ TreeItem *ti = Object::cast_to<TreeItem>(p_obj);
if (!ti)
return;
@@ -1004,7 +1004,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label, bool p_can_rename, bool p_can_ope
warning = memnew(AcceptDialog);
add_child(warning);
- warning->set_title("Node Configuration Warning!");
+ warning->set_title(TTR("Node Configuration Warning!"));
show_enabled_subscene = false;
diff --git a/editor/scene_tree_editor.h b/editor/scene_tree_editor.h
index c666b6a8d5..1114b92796 100644
--- a/editor/scene_tree_editor.h
+++ b/editor/scene_tree_editor.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index 299538a2b3..089c054b59 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -352,9 +352,16 @@ void ScriptCreateDialog::_path_changed(const String &p_path) {
/* Does file already exist */
DirAccess *f = DirAccess::create(DirAccess::ACCESS_RESOURCES);
- if (f->file_exists(p) && !(f->current_is_dir())) {
+ if (f->dir_exists(p)) {
+ is_new_script_created = false;
+ is_path_valid = false;
+ _msg_path_valid(false, TTR("Directory of the same name exists"));
+ } else if (f->file_exists(p)) {
is_new_script_created = false;
is_path_valid = true;
+ _msg_path_valid(true, TTR("File exists, will be reused"));
+ } else {
+ path_error_label->set_text("");
}
memdelete(f);
_update_dialog();
@@ -591,6 +598,9 @@ ScriptCreateDialog::ScriptCreateDialog() {
hb->add_child(vb);
hb->add_child(empty_v->duplicate());
+ memdelete(empty_h);
+ memdelete(empty_v);
+
add_child(hb);
/* Language */
diff --git a/editor/script_create_dialog.h b/editor/script_create_dialog.h
index c8f199b53a..d16c523f0a 100644
--- a/editor/script_create_dialog.h
+++ b/editor/script_create_dialog.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index d1ad503542..284b25801c 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -215,7 +215,7 @@ void ScriptEditorDebugger::_scene_tree_folded(Object *obj) {
return;
}
- TreeItem *item = obj->cast_to<TreeItem>();
+ TreeItem *item = Object::cast_to<TreeItem>(obj);
if (!item)
return;
@@ -789,14 +789,17 @@ void ScriptEditorDebugger::_performance_draw() {
which.push_back(i);
}
- if (which.empty())
+ Ref<Font> graph_font = get_font("font", "TextEdit");
+
+ if (which.empty()) {
+ perf_draw->draw_string(graph_font, Point2(0, graph_font->get_ascent()), TTR("Pick one or more items from the list to display the graph."), get_color("font_color", "Label"), perf_draw->get_size().x);
return;
+ }
Ref<StyleBox> graph_sb = get_stylebox("normal", "TextEdit");
- Ref<Font> graph_font = get_font("font", "TextEdit");
int cols = Math::ceil(Math::sqrt((float)which.size()));
- int rows = (which.size() + 1) / cols;
+ int rows = Math::ceil((float)which.size() / cols);
if (which.size() == 1)
rows = 1;
@@ -1221,7 +1224,7 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n
if (!p_base || !live_debug || !connection.is_valid() || !editor->get_edited_scene())
return;
- Node *node = p_base->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(p_base);
VARIANT_ARGPTRS
@@ -1249,7 +1252,7 @@ void ScriptEditorDebugger::_method_changed(Object *p_base, const StringName &p_n
return;
}
- Resource *res = p_base->cast_to<Resource>();
+ Resource *res = Object::cast_to<Resource>(p_base);
if (res && res->get_path() != String()) {
@@ -1277,7 +1280,7 @@ void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p
if (!p_base || !live_debug || !connection.is_valid() || !editor->get_edited_scene())
return;
- Node *node = p_base->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(p_base);
if (node) {
@@ -1308,7 +1311,7 @@ void ScriptEditorDebugger::_property_changed(Object *p_base, const StringName &p
return;
}
- Resource *res = p_base->cast_to<Resource>();
+ Resource *res = Object::cast_to<Resource>(p_base);
if (res && res->get_path() != String()) {
diff --git a/editor/script_editor_debugger.h b/editor/script_editor_debugger.h
index bee49bf15c..6cb5f0a70c 100644
--- a/editor/script_editor_debugger.h
+++ b/editor/script_editor_debugger.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp
index d455e0cea9..623e458aca 100644
--- a/editor/settings_config_dialog.cpp
+++ b/editor/settings_config_dialog.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -191,7 +191,7 @@ void EditorSettingsDialog::_update_shortcuts() {
void EditorSettingsDialog::_shortcut_button_pressed(Object *p_item, int p_column, int p_idx) {
- TreeItem *ti = p_item->cast_to<TreeItem>();
+ TreeItem *ti = Object::cast_to<TreeItem>(p_item);
ERR_FAIL_COND(!ti);
String item = ti->get_metadata(0);
diff --git a/editor/settings_config_dialog.h b/editor/settings_config_dialog.h
index cda191ac36..8a66d5098c 100644
--- a/editor/settings_config_dialog.h
+++ b/editor/settings_config_dialog.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp
index 0e6e7420e2..9c7ea506aa 100644
--- a/editor/spatial_editor_gizmos.cpp
+++ b/editor/spatial_editor_gizmos.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -36,6 +36,7 @@
#include "scene/resources/capsule_shape.h"
#include "scene/resources/convex_polygon_shape.h"
#include "scene/resources/plane_shape.h"
+#include "scene/resources/primitive_meshes.h"
#include "scene/resources/ray_shape.h"
#include "scene/resources/sphere_shape.h"
#include "scene/resources/surface_tool.h"
@@ -45,6 +46,24 @@
#define HANDLE_HALF_SIZE 0.05
+bool EditorSpatialGizmo::can_draw() const {
+ return is_editable();
+}
+bool EditorSpatialGizmo::is_editable() const {
+
+ ERR_FAIL_COND_V(!spatial_node, false);
+ Node *edited_root = spatial_node->get_tree()->get_edited_scene_root();
+ if (spatial_node == edited_root)
+ return true;
+ if (spatial_node->get_owner() == edited_root)
+ return true;
+
+ if (edited_root->is_editable_instance(spatial_node->get_owner()))
+ return true;
+
+ return false;
+}
+
void EditorSpatialGizmo::clear() {
for (int i = 0; i < instances.size(); i++) {
@@ -112,9 +131,9 @@ void EditorSpatialGizmo::add_lines(const Vector<Vector3> &p_lines, const Ref<Mat
PoolVector<Color>::Write w = color.write();
for (int i = 0; i < p_lines.size(); i++) {
if (is_selected())
- w[i] = Color(1, 1, 1, 0.6);
+ w[i] = Color(1, 1, 1, 0.8);
else
- w[i] = Color(1, 1, 1, 0.25);
+ w[i] = Color(1, 1, 1, 0.2);
}
}
@@ -157,10 +176,10 @@ void EditorSpatialGizmo::add_unscaled_billboard(const Ref<Material> &p_material,
vs.push_back(Vector3(p_scale, -p_scale, 0));
vs.push_back(Vector3(-p_scale, -p_scale, 0));
- uv.push_back(Vector2(1, 0));
uv.push_back(Vector2(0, 0));
- uv.push_back(Vector2(0, 1));
+ uv.push_back(Vector2(1, 0));
uv.push_back(Vector2(1, 1));
+ uv.push_back(Vector2(0, 1));
Ref<ArrayMesh> mesh = memnew(ArrayMesh);
Array a;
@@ -211,7 +230,7 @@ void EditorSpatialGizmo::add_handles(const Vector<Vector3> &p_handles, bool p_bi
billboard_handle = p_billboard;
- if (!is_selected())
+ if (!is_selected() || !is_editable())
return;
ERR_FAIL_COND(!spatial_node);
@@ -220,7 +239,6 @@ void EditorSpatialGizmo::add_handles(const Vector<Vector3> &p_handles, bool p_bi
Instance ins;
Ref<ArrayMesh> mesh = memnew(ArrayMesh);
-#if 1
Array a;
a.resize(VS::ARRAY_MAX);
@@ -255,61 +273,6 @@ void EditorSpatialGizmo::add_handles(const Vector<Vector3> &p_handles, bool p_bi
}
}
-#else
- for (int ih = 0; ih < p_handles.size(); ih++) {
-
- Vector<Vector3> vertices;
- Vector<Vector3> normals;
-
- int vtx_idx = 0;
-
-#define ADD_VTX(m_idx) \
- vertices.push_back((face_points[m_idx] * HANDLE_HALF_SIZE + p_handles[ih])); \
- normals.push_back(normal_points[m_idx]); \
- vtx_idx++;
-
- for (int i = 0; i < 6; i++) {
-
- Vector3 face_points[4];
- Vector3 normal_points[4];
- float uv_points[8] = { 0, 0, 0, 1, 1, 1, 1, 0 };
-
- for (int j = 0; j < 4; j++) {
-
- float v[3];
- v[0] = 1.0;
- v[1] = 1 - 2 * ((j >> 1) & 1);
- v[2] = v[1] * (1 - 2 * (j & 1));
-
- for (int k = 0; k < 3; k++) {
-
- if (i < 3)
- face_points[j][(i + k) % 3] = v[k] * (i >= 3 ? -1 : 1);
- else
- face_points[3 - j][(i + k) % 3] = v[k] * (i >= 3 ? -1 : 1);
- }
- normal_points[j] = Vector3();
- normal_points[j][i % 3] = (i >= 3 ? -1 : 1);
- }
- //tri 1
- ADD_VTX(0);
- ADD_VTX(1);
- ADD_VTX(2);
- //tri 2
- ADD_VTX(2);
- ADD_VTX(3);
- ADD_VTX(0);
- }
-
- Array d;
- d.resize(VS::ARRAY_MAX);
- d[VisualServer::ARRAY_NORMAL] = normals;
- d[VisualServer::ARRAY_VERTEX] = vertices;
-
- mesh->add_surface(Mesh::PRIMITIVE_TRIANGLES, d);
- mesh->surface_set_material(ih, SpatialEditorGizmos::singleton->handle_material);
- }
-#endif
ins.mesh = mesh;
ins.billboard = p_billboard;
ins.extra_margin = true;
@@ -334,6 +297,26 @@ void EditorSpatialGizmo::add_handles(const Vector<Vector3> &p_handles, bool p_bi
}
}
+void EditorSpatialGizmo::add_solid_box(Ref<Material> &p_material, Vector3 size) {
+ ERR_FAIL_COND(!spatial_node);
+
+ CubeMesh cubem;
+ cubem.set_size(size);
+ Ref<ArrayMesh> m = memnew(ArrayMesh);
+ m->add_surface_from_arrays(cubem.surface_get_primitive_type(0), cubem.surface_get_arrays(0));
+ m->surface_set_material(0, p_material);
+ add_mesh(m);
+
+ Instance ins;
+ ins.mesh = m;
+ if (valid) {
+ ins.create_instance(spatial_node);
+ VS::get_singleton()->instance_set_transform(ins.instance, spatial_node->get_global_transform());
+ }
+
+ instances.push_back(ins);
+}
+
void EditorSpatialGizmo::set_spatial_node(Spatial *p_node) {
ERR_FAIL_NULL(p_node);
@@ -560,6 +543,95 @@ void EditorSpatialGizmo::free() {
valid = false;
}
+Ref<SpatialMaterial> EditorSpatialGizmo::create_material(const String &p_name, const Color &p_color, bool p_billboard, bool p_on_top, bool p_use_vertex_color) {
+
+ String name = p_name;
+
+ if (!is_editable()) {
+ name += "@readonly";
+ } else if (is_selected()) {
+ name += "@selected";
+ }
+
+ if (SpatialEditorGizmos::singleton->material_cache.has(name)) {
+ return SpatialEditorGizmos::singleton->material_cache[name];
+ }
+
+ Color color = p_color;
+
+ if (!is_editable()) {
+ color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/instanced");
+ }
+ if (!is_selected()) {
+ color.a *= 0.3;
+ }
+
+ Ref<SpatialMaterial> line_material;
+ line_material.instance();
+ line_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
+ line_material->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
+ if (p_use_vertex_color) {
+ line_material->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
+ line_material->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
+ }
+
+ if (p_billboard) {
+ line_material->set_billboard_mode(SpatialMaterial::BILLBOARD_ENABLED);
+ }
+
+ if (p_on_top && is_selected()) {
+ line_material->set_on_top_of_alpha();
+ }
+
+ line_material->set_albedo(color);
+
+ SpatialEditorGizmos::singleton->material_cache[name] = line_material;
+
+ return line_material;
+}
+
+Ref<SpatialMaterial> EditorSpatialGizmo::create_icon_material(const String &p_name, const Ref<Texture> &p_texture, bool p_on_top, const Color &p_albedo) {
+
+ String name = p_name;
+
+ if (!is_editable()) {
+ name += "@readonly";
+ } else if (is_selected()) {
+ name += "@selected";
+ }
+
+ if (SpatialEditorGizmos::singleton->material_cache.has(name)) {
+ return SpatialEditorGizmos::singleton->material_cache[name];
+ }
+
+ Color color = p_albedo;
+
+ if (!is_editable()) {
+ color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/instanced");
+ } else if (!is_selected()) {
+ color.a *= 0.3;
+ }
+
+ Ref<SpatialMaterial> icon;
+ icon.instance();
+ icon->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
+ icon->set_cull_mode(SpatialMaterial::CULL_DISABLED);
+ icon->set_depth_draw_mode(SpatialMaterial::DEPTH_DRAW_DISABLED);
+ icon->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
+ icon->set_albedo(color);
+ icon->set_texture(SpatialMaterial::TEXTURE_ALBEDO, p_texture);
+ icon->set_flag(SpatialMaterial::FLAG_FIXED_SIZE, true);
+ icon->set_billboard_mode(SpatialMaterial::BILLBOARD_ENABLED);
+
+ if (p_on_top && is_selected()) {
+ icon->set_on_top_of_alpha();
+ }
+
+ SpatialEditorGizmos::singleton->material_cache[name] = icon;
+
+ return icon;
+}
+
void EditorSpatialGizmo::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_lines", "lines", "material", "billboard"), &EditorSpatialGizmo::add_lines, DEFVAL(false));
@@ -573,9 +645,13 @@ void EditorSpatialGizmo::_bind_methods() {
BIND_VMETHOD(MethodInfo("redraw"));
BIND_VMETHOD(MethodInfo(Variant::STRING, "get_handle_name", PropertyInfo(Variant::INT, "index")));
- BIND_VMETHOD(MethodInfo("get_handle_value:Variant", PropertyInfo(Variant::INT, "index")));
- BIND_VMETHOD(MethodInfo("set_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::OBJECT, "camera:Camera"), PropertyInfo(Variant::VECTOR2, "point")));
- MethodInfo cm = MethodInfo("commit_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::NIL, "restore:Variant"), PropertyInfo(Variant::BOOL, "cancel"));
+
+ MethodInfo hvget(Variant::NIL, "get_handle_value", PropertyInfo(Variant::INT, "index"));
+ hvget.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
+ BIND_VMETHOD(hvget);
+
+ BIND_VMETHOD(MethodInfo("set_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::OBJECT, "camera", PROPERTY_HINT_RESOURCE_TYPE, "Camera"), PropertyInfo(Variant::VECTOR2, "point")));
+ MethodInfo cm = MethodInfo("commit_handle", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::NIL, "restore"), PropertyInfo(Variant::BOOL, "cancel"));
cm.default_arguments.push_back(false);
BIND_VMETHOD(cm);
}
@@ -660,7 +736,7 @@ void LightSpatialGizmo::set_handle(int p_idx, Camera *p_camera, const Point2 &p_
Vector3 s[2] = { gi.xform(ray_from), gi.xform(ray_from + ray_dir * 4096) };
if (p_idx == 0) {
- if (light->cast_to<SpotLight>()) {
+ if (Object::cast_to<SpotLight>(light)) {
Vector3 ra, rb;
Geometry::get_closest_points_between_segments(Vector3(), Vector3(0, 0, -4096), s[0], s[1], ra, rb);
@@ -669,7 +745,7 @@ void LightSpatialGizmo::set_handle(int p_idx, Camera *p_camera, const Point2 &p_
d = 0;
light->set_param(Light::PARAM_RANGE, d);
- } else if (light->cast_to<OmniLight>()) {
+ } else if (Object::cast_to<OmniLight>(light)) {
Plane cp = Plane(gt.origin, p_camera->get_transform().basis.get_axis(2));
@@ -713,49 +789,54 @@ void LightSpatialGizmo::commit_handle(int p_idx, const Variant &p_restore, bool
void LightSpatialGizmo::redraw() {
- if (light->cast_to<DirectionalLight>()) {
+ Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/light");
+
+ if (Object::cast_to<DirectionalLight>(light)) {
+
+ Ref<Material> material = create_material("light_directional_material", gizmo_color);
+ Ref<Material> icon = create_icon_material("light_directional_icon", SpatialEditor::get_singleton()->get_icon("GizmoDirectionalLight", "EditorIcons"));
+
+ const int arrow_points = 7;
+ const float arrow_length = 1.5;
- const int arrow_points = 5;
Vector3 arrow[arrow_points] = {
- Vector3(0, 0, 2),
- Vector3(1, 1, 2),
- Vector3(1, 1, -1),
- Vector3(2, 2, -1),
- Vector3(0, 0, -3)
+ Vector3(0, 0, -1),
+ Vector3(0, 0.8, 0),
+ Vector3(0, 0.3, 0),
+ Vector3(0, 0.3, arrow_length),
+ Vector3(0, -0.3, arrow_length),
+ Vector3(0, -0.3, 0),
+ Vector3(0, -0.8, 0)
};
- int arrow_sides = 4;
+ int arrow_sides = 2;
Vector<Vector3> lines;
for (int i = 0; i < arrow_sides; i++) {
+ for (int j = 0; j < arrow_points; j++) {
+ Basis ma(Vector3(0, 0, 1), Math_PI * i / arrow_sides);
- Basis ma(Vector3(0, 0, 1), Math_PI * 2 * float(i) / arrow_sides);
- Basis mb(Vector3(0, 0, 1), Math_PI * 2 * float(i + 1) / arrow_sides);
-
- for (int j = 1; j < arrow_points - 1; j++) {
+ Vector3 v1 = arrow[j] - Vector3(0, 0, arrow_length);
+ Vector3 v2 = arrow[(j + 1) % arrow_points] - Vector3(0, 0, arrow_length);
- if (j != 2) {
- lines.push_back(ma.xform(arrow[j]));
- lines.push_back(ma.xform(arrow[j + 1]));
- }
- if (j < arrow_points - 1) {
- lines.push_back(ma.xform(arrow[j]));
- lines.push_back(mb.xform(arrow[j]));
- }
+ lines.push_back(ma.xform(v1));
+ lines.push_back(ma.xform(v2));
}
}
- add_lines(lines, SpatialEditorGizmos::singleton->light_material);
+ add_lines(lines, material);
add_collision_segments(lines);
- add_unscaled_billboard(SpatialEditorGizmos::singleton->light_material_directional_icon, 0.05);
+ add_unscaled_billboard(icon, 0.05);
}
- if (light->cast_to<OmniLight>()) {
+ if (Object::cast_to<OmniLight>(light)) {
+ Ref<Material> material = create_material("light_omni_material", gizmo_color, true);
+ Ref<Material> icon = create_icon_material("light_omni_icon", SpatialEditor::get_singleton()->get_icon("GizmoLight", "EditorIcons"));
clear();
- OmniLight *on = light->cast_to<OmniLight>();
+ OmniLight *on = Object::cast_to<OmniLight>(light);
float r = on->get_param(Light::PARAM_RANGE);
@@ -776,22 +857,25 @@ void LightSpatialGizmo::redraw() {
points.push_back(Vector3(b.x, b.y, 0));
}
- add_lines(points, SpatialEditorGizmos::singleton->light_material_omni, true);
+ add_lines(points, material, true);
add_collision_segments(points);
- add_unscaled_billboard(SpatialEditorGizmos::singleton->light_material_omni_icon, 0.05);
+ add_unscaled_billboard(icon, 0.05);
Vector<Vector3> handles;
handles.push_back(Vector3(r, 0, 0));
add_handles(handles, true);
}
- if (light->cast_to<SpotLight>()) {
+ if (Object::cast_to<SpotLight>(light)) {
+
+ Ref<Material> material = create_material("light_spot_material", gizmo_color, true);
+ Ref<Material> icon = create_icon_material("light_spot_icon", SpatialEditor::get_singleton()->get_icon("GizmoSpotLight", "EditorIcons"));
clear();
Vector<Vector3> points;
- SpotLight *on = light->cast_to<SpotLight>();
+ SpotLight *on = Object::cast_to<SpotLight>(light);
float r = on->get_param(Light::PARAM_RANGE);
float w = r * Math::sin(Math::deg2rad(on->get_param(Light::PARAM_SPOT_ANGLE)));
@@ -804,10 +888,6 @@ void LightSpatialGizmo::redraw() {
Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * w;
Point2 b = Vector2(Math::sin(rb), Math::cos(rb)) * w;
- /*points.push_back(Vector3(a.x,0,a.y));
- points.push_back(Vector3(b.x,0,b.y));
- points.push_back(Vector3(0,a.x,a.y));
- points.push_back(Vector3(0,b.x,b.y));*/
points.push_back(Vector3(a.x, a.y, -d));
points.push_back(Vector3(b.x, b.y, -d));
@@ -821,7 +901,7 @@ void LightSpatialGizmo::redraw() {
points.push_back(Vector3(0, 0, -r));
points.push_back(Vector3());
- add_lines(points, SpatialEditorGizmos::singleton->light_material);
+ add_lines(points, material);
Vector<Vector3> handles;
handles.push_back(Vector3(0, 0, -r));
@@ -855,7 +935,7 @@ void LightSpatialGizmo::redraw() {
add_handles(handles);
add_collision_segments(collision_segments);
- add_unscaled_billboard(SpatialEditorGizmos::singleton->light_material_omni_icon, 0.05);
+ add_unscaled_billboard(icon, 0.05);
}
}
@@ -937,7 +1017,13 @@ void AudioStreamPlayer3DSpatialGizmo::redraw() {
clear();
+ Ref<Material> icon = create_icon_material("stream_player_3d_material", SpatialEditor::get_singleton()->get_icon("GizmoSpatialSamplePlayer", "EditorIcons"));
+
if (player->is_emission_angle_enabled()) {
+
+ Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/stream_player_3d");
+ Ref<Material> material = create_material("stream_player_3d_material", gizmo_color);
+
float pc = player->get_emission_angle();
Vector<Vector3> points;
@@ -968,7 +1054,7 @@ void AudioStreamPlayer3DSpatialGizmo::redraw() {
points[200 + i * 2 + 1] = Vector3();
}
- add_lines(points, SpatialEditorGizmos::singleton->car_wheel_material);
+ add_lines(points, material);
add_collision_segments(points);
Vector<Vector3> handles;
@@ -977,7 +1063,7 @@ void AudioStreamPlayer3DSpatialGizmo::redraw() {
add_handles(handles);
}
- add_unscaled_billboard(SpatialEditorGizmos::singleton->sample_player_icon, 0.05);
+ add_unscaled_billboard(icon, 0.05);
}
AudioStreamPlayer3DSpatialGizmo::AudioStreamPlayer3DSpatialGizmo(AudioStreamPlayer3D *p_player) {
@@ -1068,6 +1154,10 @@ void CameraSpatialGizmo::redraw() {
Vector<Vector3> lines;
Vector<Vector3> handles;
+ Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/camera");
+ Ref<Material> material = create_material("camera_material", gizmo_color);
+ Ref<Material> icon = create_icon_material("camera_icon", SpatialEditor::get_singleton()->get_icon("GizmoCamera", "EditorIcons"));
+
switch (camera->get_projection()) {
case Camera::PROJECTION_PERSPECTIVE: {
@@ -1135,8 +1225,9 @@ void CameraSpatialGizmo::redraw() {
} break;
}
- add_lines(lines, SpatialEditorGizmos::singleton->camera_material);
+ add_lines(lines, material);
add_collision_segments(lines);
+ add_unscaled_billboard(icon, 0.05);
add_handles(handles);
}
@@ -1148,6 +1239,9 @@ CameraSpatialGizmo::CameraSpatialGizmo(Camera *p_camera) {
//////
+bool MeshInstanceSpatialGizmo::can_draw() const {
+ return true; //mesh can always draw (even though nothing is displayed)
+}
void MeshInstanceSpatialGizmo::redraw() {
Ref<Mesh> m = mesh->get_mesh();
@@ -1194,10 +1288,13 @@ void SkeletonSpatialGizmo::redraw() {
clear();
+ Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/skeleton");
+ Ref<Material> material = create_material("skeleton_material", gizmo_color);
+
Ref<SurfaceTool> surface_tool(memnew(SurfaceTool));
surface_tool->begin(Mesh::PRIMITIVE_LINES);
- surface_tool->set_material(SpatialEditorGizmos::singleton->skeleton_material);
+ surface_tool->set_material(material);
Vector<Transform> grests;
grests.resize(skel->get_bone_count());
@@ -1378,7 +1475,7 @@ SkeletonSpatialGizmo::SkeletonSpatialGizmo(Skeleton *p_skel) {
skel = p_skel;
set_spatial_node(p_skel);
}
-
+#if 0
void RoomSpatialGizmo::redraw() {
clear();
@@ -1481,6 +1578,7 @@ PortalSpatialGizmo::PortalSpatialGizmo(Portal *p_portal) {
portal = p_portal;
}
+#endif
/////
void RayCastSpatialGizmo::redraw() {
@@ -1492,7 +1590,10 @@ void RayCastSpatialGizmo::redraw() {
lines.push_back(Vector3());
lines.push_back(raycast->get_cast_to());
- add_lines(lines, SpatialEditorGizmos::singleton->raycast_material);
+ Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
+ Ref<Material> material = create_material("shape_material", gizmo_color);
+
+ add_lines(lines, material);
add_collision_segments(lines);
}
@@ -1550,7 +1651,10 @@ void VehicleWheelSpatialGizmo::redraw() {
points.push_back(Vector3(0, -r, r * 2));
points.push_back(Vector3(-r * 2 * 0.2, -r, r * 2 * 0.8));
- add_lines(points, SpatialEditorGizmos::singleton->car_wheel_material);
+ Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
+ Ref<Material> material = create_material("shape_material", gizmo_color);
+
+ add_lines(points, material);
add_collision_segments(points);
}
@@ -1568,22 +1672,22 @@ String CollisionShapeSpatialGizmo::get_handle_name(int p_idx) const {
if (s.is_null())
return "";
- if (s->cast_to<SphereShape>()) {
+ if (Object::cast_to<SphereShape>(*s)) {
return "Radius";
}
- if (s->cast_to<BoxShape>()) {
+ if (Object::cast_to<BoxShape>(*s)) {
return "Extents";
}
- if (s->cast_to<CapsuleShape>()) {
+ if (Object::cast_to<CapsuleShape>(*s)) {
return p_idx == 0 ? "Radius" : "Height";
}
- if (s->cast_to<RayShape>()) {
+ if (Object::cast_to<RayShape>(*s)) {
return "Length";
}
@@ -1596,25 +1700,25 @@ Variant CollisionShapeSpatialGizmo::get_handle_value(int p_idx) const {
if (s.is_null())
return Variant();
- if (s->cast_to<SphereShape>()) {
+ if (Object::cast_to<SphereShape>(*s)) {
Ref<SphereShape> ss = s;
return ss->get_radius();
}
- if (s->cast_to<BoxShape>()) {
+ if (Object::cast_to<BoxShape>(*s)) {
Ref<BoxShape> bs = s;
return bs->get_extents();
}
- if (s->cast_to<CapsuleShape>()) {
+ if (Object::cast_to<CapsuleShape>(*s)) {
Ref<CapsuleShape> cs = s;
return p_idx == 0 ? cs->get_radius() : cs->get_height();
}
- if (s->cast_to<RayShape>()) {
+ if (Object::cast_to<RayShape>(*s)) {
Ref<RayShape> cs = s;
return cs->get_length();
@@ -1636,7 +1740,7 @@ void CollisionShapeSpatialGizmo::set_handle(int p_idx, Camera *p_camera, const P
Vector3 sg[2] = { gi.xform(ray_from), gi.xform(ray_from + ray_dir * 4096) };
- if (s->cast_to<SphereShape>()) {
+ if (Object::cast_to<SphereShape>(*s)) {
Ref<SphereShape> ss = s;
Vector3 ra, rb;
@@ -1648,7 +1752,7 @@ void CollisionShapeSpatialGizmo::set_handle(int p_idx, Camera *p_camera, const P
ss->set_radius(d);
}
- if (s->cast_to<RayShape>()) {
+ if (Object::cast_to<RayShape>(*s)) {
Ref<RayShape> rs = s;
Vector3 ra, rb;
@@ -1660,7 +1764,7 @@ void CollisionShapeSpatialGizmo::set_handle(int p_idx, Camera *p_camera, const P
rs->set_length(d);
}
- if (s->cast_to<BoxShape>()) {
+ if (Object::cast_to<BoxShape>(*s)) {
Vector3 axis;
axis[p_idx] = 1.0;
@@ -1676,7 +1780,7 @@ void CollisionShapeSpatialGizmo::set_handle(int p_idx, Camera *p_camera, const P
bs->set_extents(he);
}
- if (s->cast_to<CapsuleShape>()) {
+ if (Object::cast_to<CapsuleShape>(*s)) {
Vector3 axis;
axis[p_idx == 0 ? 0 : 2] = 1.0;
@@ -1700,7 +1804,7 @@ void CollisionShapeSpatialGizmo::commit_handle(int p_idx, const Variant &p_resto
if (s.is_null())
return;
- if (s->cast_to<SphereShape>()) {
+ if (Object::cast_to<SphereShape>(*s)) {
Ref<SphereShape> ss = s;
if (p_cancel) {
@@ -1715,7 +1819,7 @@ void CollisionShapeSpatialGizmo::commit_handle(int p_idx, const Variant &p_resto
ur->commit_action();
}
- if (s->cast_to<BoxShape>()) {
+ if (Object::cast_to<BoxShape>(*s)) {
Ref<BoxShape> ss = s;
if (p_cancel) {
@@ -1730,7 +1834,7 @@ void CollisionShapeSpatialGizmo::commit_handle(int p_idx, const Variant &p_resto
ur->commit_action();
}
- if (s->cast_to<CapsuleShape>()) {
+ if (Object::cast_to<CapsuleShape>(*s)) {
Ref<CapsuleShape> ss = s;
if (p_cancel) {
@@ -1755,7 +1859,7 @@ void CollisionShapeSpatialGizmo::commit_handle(int p_idx, const Variant &p_resto
ur->commit_action();
}
- if (s->cast_to<RayShape>()) {
+ if (Object::cast_to<RayShape>(*s)) {
Ref<RayShape> ss = s;
if (p_cancel) {
@@ -1778,7 +1882,10 @@ void CollisionShapeSpatialGizmo::redraw() {
if (s.is_null())
return;
- if (s->cast_to<SphereShape>()) {
+ Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
+ Ref<Material> material = create_material("shape_material", gizmo_color);
+
+ if (Object::cast_to<SphereShape>(*s)) {
Ref<SphereShape> sp = s;
float r = sp->get_radius();
@@ -1817,14 +1924,14 @@ void CollisionShapeSpatialGizmo::redraw() {
collision_segments.push_back(Vector3(b.x, b.y, 0));
}
- add_lines(points, SpatialEditorGizmos::singleton->shape_material);
+ add_lines(points, material);
add_collision_segments(collision_segments);
Vector<Vector3> handles;
handles.push_back(Vector3(r, 0, 0));
add_handles(handles);
}
- if (s->cast_to<BoxShape>()) {
+ if (Object::cast_to<BoxShape>(*s)) {
Ref<BoxShape> bs = s;
Vector<Vector3> lines;
@@ -1848,12 +1955,12 @@ void CollisionShapeSpatialGizmo::redraw() {
handles.push_back(ax);
}
- add_lines(lines, SpatialEditorGizmos::singleton->shape_material);
+ add_lines(lines, material);
add_collision_segments(lines);
add_handles(handles);
}
- if (s->cast_to<CapsuleShape>()) {
+ if (Object::cast_to<CapsuleShape>(*s)) {
Ref<CapsuleShape> cs = s;
float radius = cs->get_radius();
@@ -1889,7 +1996,7 @@ void CollisionShapeSpatialGizmo::redraw() {
points.push_back(Vector3(b.y, 0, b.x) + dud);
}
- add_lines(points, SpatialEditorGizmos::singleton->shape_material);
+ add_lines(points, material);
Vector<Vector3> collision_segments;
@@ -1928,7 +2035,7 @@ void CollisionShapeSpatialGizmo::redraw() {
add_handles(handles);
}
- if (s->cast_to<PlaneShape>()) {
+ if (Object::cast_to<PlaneShape>(*s)) {
Ref<PlaneShape> ps = s;
Plane p = ps->get_plane();
@@ -1955,13 +2062,13 @@ void CollisionShapeSpatialGizmo::redraw() {
points.push_back(p.normal * p.d);
points.push_back(p.normal * p.d + p.normal * 3);
- add_lines(points, SpatialEditorGizmos::singleton->shape_material);
+ add_lines(points, material);
add_collision_segments(points);
}
- if (s->cast_to<ConvexPolygonShape>()) {
+ if (Object::cast_to<ConvexPolygonShape>(*s)) {
- PoolVector<Vector3> points = s->cast_to<ConvexPolygonShape>()->get_points();
+ PoolVector<Vector3> points = Object::cast_to<ConvexPolygonShape>(*s)->get_points();
if (points.size() > 3) {
@@ -1977,20 +2084,20 @@ void CollisionShapeSpatialGizmo::redraw() {
points[i * 2 + 1] = md.vertices[md.edges[i].b];
}
- add_lines(points, SpatialEditorGizmos::singleton->shape_material);
+ add_lines(points, material);
add_collision_segments(points);
}
}
}
- if (s->cast_to<RayShape>()) {
+ if (Object::cast_to<RayShape>(*s)) {
Ref<RayShape> rs = s;
Vector<Vector3> points;
points.push_back(Vector3());
points.push_back(Vector3(0, 0, rs->get_length()));
- add_lines(points, SpatialEditorGizmos::singleton->shape_material);
+ add_lines(points, material);
add_collision_segments(points);
Vector<Vector3> handles;
handles.push_back(Vector3(0, 0, rs->get_length()));
@@ -2024,7 +2131,10 @@ void CollisionPolygonSpatialGizmo::redraw() {
lines.push_back(Vector3(points[i].x, points[i].y, -depth));
}
- add_lines(lines, SpatialEditorGizmos::singleton->shape_material);
+ Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/shape");
+ Ref<Material> material = create_material("shape_material", gizmo_color);
+
+ add_lines(lines, material);
add_collision_segments(lines);
}
@@ -2092,6 +2202,9 @@ void VisibilityNotifierGizmo::commit_handle(int p_idx, const Variant &p_restore,
void VisibilityNotifierGizmo::redraw() {
+ Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/visibility_notifier");
+ Ref<Material> material = create_material("visibility_notifier_material", gizmo_color);
+
clear();
Vector<Vector3> lines;
@@ -2113,7 +2226,7 @@ void VisibilityNotifierGizmo::redraw() {
handles.push_back(ax);
}
- add_lines(lines, SpatialEditorGizmos::singleton->visibility_notifier_material);
+ add_lines(lines, material);
//add_unscaled_billboard(SpatialEditorGizmos::singleton->visi,0.05);
add_collision_segments(lines);
add_handles(handles);
@@ -2238,9 +2351,22 @@ void ParticlesGizmo::redraw() {
lines.push_back(center + ax);
}
- add_lines(lines, SpatialEditorGizmos::singleton->particles_material);
+ Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/particles");
+ Ref<Material> material = create_material("particles_material", gizmo_color);
+ Ref<Material> icon = create_icon_material("particles_icon", SpatialEditor::get_singleton()->get_icon("GizmoParticles", "EditorIcons"));
+
+ add_lines(lines, material);
add_collision_segments(lines);
+
+ if (is_selected()) {
+
+ gizmo_color.a = 0.1;
+ Ref<Material> solid_material = create_material("particles_solid_material", gizmo_color);
+ add_solid_box(solid_material, aabb.get_size());
+ }
+
//add_unscaled_billboard(SpatialEditorGizmos::singleton->visi,0.05);
+ add_unscaled_billboard(icon, 0.05);
add_handles(handles);
}
ParticlesGizmo::ParticlesGizmo(Particles *p_particles) {
@@ -2384,9 +2510,26 @@ void ReflectionProbeGizmo::redraw() {
lines.push_back(orig_handle);
}
- add_lines(lines, SpatialEditorGizmos::singleton->reflection_probe_material);
- add_lines(internal_lines, SpatialEditorGizmos::singleton->reflection_probe_material_internal);
+ Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/reflection_probe");
+ Ref<Material> material = create_material("reflection_probe_material", gizmo_color);
+ Ref<Material> icon = create_icon_material("reflection_probe_icon", SpatialEditor::get_singleton()->get_icon("GizmoReflectionProbe", "EditorIcons"));
+
+ Color gizmo_color_internal = gizmo_color;
+ gizmo_color_internal.a = 0.5;
+ Ref<Material> material_internal = create_material("reflection_internal_material", gizmo_color_internal);
+
+ add_lines(lines, material);
+ add_lines(internal_lines, material_internal);
+
+ if (is_selected()) {
+
+ gizmo_color.a = 0.1;
+ Ref<Material> solid_material = create_material("reflection_probe_solid_material", gizmo_color);
+ add_solid_box(solid_material, probe->get_extents() * 2.0);
+ }
+
//add_unscaled_billboard(SpatialEditorGizmos::singleton->visi,0.05);
+ add_unscaled_billboard(icon, 0.05);
add_collision_segments(lines);
add_handles(handles);
}
@@ -2458,6 +2601,13 @@ void GIProbeGizmo::commit_handle(int p_idx, const Variant &p_restore, bool p_can
void GIProbeGizmo::redraw() {
+ Color gizmo_color = EDITOR_GET("editors/3d_gizmos/gizmo_colors/gi_probe");
+ Ref<Material> material = create_material("gi_probe_material", gizmo_color);
+ Ref<Material> icon = create_icon_material("gi_probe_icon", SpatialEditor::get_singleton()->get_icon("GizmoGIProbe", "EditorIcons"));
+ Color gizmo_color_internal = gizmo_color;
+ gizmo_color_internal.a = 0.1;
+ Ref<Material> material_internal = create_material("gi_probe_internal_material", gizmo_color_internal);
+
clear();
Vector<Vector3> lines;
@@ -2476,7 +2626,7 @@ void GIProbeGizmo::redraw() {
lines.push_back(b);
}
- add_lines(lines, SpatialEditorGizmos::singleton->gi_probe_material);
+ add_lines(lines, material);
add_collision_segments(lines);
lines.clear();
@@ -2521,7 +2671,7 @@ void GIProbeGizmo::redraw() {
}
}
- add_lines(lines, SpatialEditorGizmos::singleton->gi_probe_material_internal);
+ add_lines(lines, material_internal);
Vector<Vector3> handles;
@@ -2532,6 +2682,14 @@ void GIProbeGizmo::redraw() {
handles.push_back(ax);
}
+ if (is_selected()) {
+
+ gizmo_color.a = 0.1;
+ Ref<Material> solid_material = create_material("gi_probe_solid_material", gizmo_color);
+ add_solid_box(solid_material, aabb.get_size());
+ }
+
+ add_unscaled_billboard(icon, 0.05);
add_handles(handles);
}
GIProbeGizmo::GIProbeGizmo(GIProbe *p_probe) {
@@ -2544,6 +2702,11 @@ GIProbeGizmo::GIProbeGizmo(GIProbe *p_probe) {
void NavigationMeshSpatialGizmo::redraw() {
+ Ref<Material> edge_material = create_material("navigation_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/navigation_edge"));
+ Ref<Material> edge_material_disabled = create_material("navigation_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/navigation_edge_disabled"));
+ Ref<Material> solid_material = create_material("navigation_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/navigation_solid"));
+ Ref<Material> solid_material_disabled = create_material("navigation_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/navigation_solid_disabled"));
+
clear();
Ref<NavigationMesh> navmeshie = navmesh->get_navigation_mesh();
if (navmeshie.is_null())
@@ -2616,14 +2779,14 @@ void NavigationMeshSpatialGizmo::redraw() {
tmesh->create(tmeshfaces);
if (lines.size())
- add_lines(lines, navmesh->is_enabled() ? SpatialEditorGizmos::singleton->navmesh_edge_material : SpatialEditorGizmos::singleton->navmesh_edge_material_disabled);
+ add_lines(lines, navmesh->is_enabled() ? edge_material : edge_material_disabled);
add_collision_triangles(tmesh);
Ref<ArrayMesh> m = memnew(ArrayMesh);
Array a;
a.resize(Mesh::ARRAY_MAX);
a[0] = tmeshfaces;
m->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES, a);
- m->surface_set_material(0, navmesh->is_enabled() ? SpatialEditorGizmos::singleton->navmesh_solid_material : SpatialEditorGizmos::singleton->navmesh_solid_material_disabled);
+ m->surface_set_material(0, navmesh->is_enabled() ? solid_material : solid_material_disabled);
add_mesh(m);
add_collision_segments(lines);
}
@@ -2650,7 +2813,10 @@ void PinJointSpatialGizmo::redraw() {
cursor_points.push_back(Vector3(0, 0, +cs));
cursor_points.push_back(Vector3(0, 0, -cs));
add_collision_segments(cursor_points);
- add_lines(cursor_points, SpatialEditorGizmos::singleton->joint_material);
+
+ Ref<Material> material = create_material("joint_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/joint"));
+
+ add_lines(cursor_points, material);
}
PinJointSpatialGizmo::PinJointSpatialGizmo(PinJoint *p_p3d) {
@@ -2720,8 +2886,11 @@ void HingeJointSpatialGizmo::redraw() {
cursor_points.push_back(to);
}
}
+
+ Ref<Material> material = create_material("joint_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/joint"));
+
add_collision_segments(cursor_points);
- add_lines(cursor_points, SpatialEditorGizmos::singleton->joint_material);
+ add_lines(cursor_points, material);
}
HingeJointSpatialGizmo::HingeJointSpatialGizmo(HingeJoint *p_p3d) {
@@ -2824,8 +2993,11 @@ void SliderJointSpatialGizmo::redraw() {
cursor_points.push_back(to);
}
}
+
+ Ref<Material> material = create_material("joint_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/joint"));
+
add_collision_segments(cursor_points);
- add_lines(cursor_points, SpatialEditorGizmos::singleton->joint_material);
+ add_lines(cursor_points, material);
}
SliderJointSpatialGizmo::SliderJointSpatialGizmo(SliderJoint *p_p3d) {
@@ -2896,8 +3068,9 @@ void ConeTwistJointSpatialGizmo::redraw() {
points.push_back(Vector3(cn, b.x, b.y));
}
+ Ref<Material> material = create_material("joint_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/joint"));
add_collision_segments(points);
- add_lines(points, SpatialEditorGizmos::singleton->joint_material);
+ add_lines(points, material);
}
ConeTwistJointSpatialGizmo::ConeTwistJointSpatialGizmo(ConeTwistJoint *p_p3d) {
@@ -3080,8 +3253,9 @@ void Generic6DOFJointSpatialGizmo::redraw() {
#undef ADD_VTX
#undef SET_VTX
+ Ref<Material> material = create_material("joint_material", EDITOR_GET("editors/3d_gizmos/gizmo_colors/joint"));
add_collision_segments(cursor_points);
- add_lines(cursor_points, SpatialEditorGizmos::singleton->joint_material);
+ add_lines(cursor_points, material);
}
Generic6DOFJointSpatialGizmo::Generic6DOFJointSpatialGizmo(Generic6DOFJoint *p_p3d) {
@@ -3098,168 +3272,146 @@ SpatialEditorGizmos *SpatialEditorGizmos::singleton = NULL;
Ref<SpatialEditorGizmo> SpatialEditorGizmos::get_gizmo(Spatial *p_spatial) {
- if (p_spatial->cast_to<Light>()) {
+ if (Object::cast_to<Light>(p_spatial)) {
- Ref<LightSpatialGizmo> lsg = memnew(LightSpatialGizmo(p_spatial->cast_to<Light>()));
+ Ref<LightSpatialGizmo> lsg = memnew(LightSpatialGizmo(Object::cast_to<Light>(p_spatial)));
return lsg;
}
- if (p_spatial->cast_to<Camera>()) {
+ if (Object::cast_to<Camera>(p_spatial)) {
- Ref<CameraSpatialGizmo> lsg = memnew(CameraSpatialGizmo(p_spatial->cast_to<Camera>()));
+ Ref<CameraSpatialGizmo> lsg = memnew(CameraSpatialGizmo(Object::cast_to<Camera>(p_spatial)));
return lsg;
}
- if (p_spatial->cast_to<Skeleton>()) {
+ if (Object::cast_to<Skeleton>(p_spatial)) {
- Ref<SkeletonSpatialGizmo> lsg = memnew(SkeletonSpatialGizmo(p_spatial->cast_to<Skeleton>()));
+ Ref<SkeletonSpatialGizmo> lsg = memnew(SkeletonSpatialGizmo(Object::cast_to<Skeleton>(p_spatial)));
return lsg;
}
- if (p_spatial->cast_to<Position3D>()) {
+ if (Object::cast_to<Position3D>(p_spatial)) {
- Ref<Position3DSpatialGizmo> lsg = memnew(Position3DSpatialGizmo(p_spatial->cast_to<Position3D>()));
+ Ref<Position3DSpatialGizmo> lsg = memnew(Position3DSpatialGizmo(Object::cast_to<Position3D>(p_spatial)));
return lsg;
}
- if (p_spatial->cast_to<MeshInstance>()) {
+ if (Object::cast_to<MeshInstance>(p_spatial)) {
- Ref<MeshInstanceSpatialGizmo> misg = memnew(MeshInstanceSpatialGizmo(p_spatial->cast_to<MeshInstance>()));
+ Ref<MeshInstanceSpatialGizmo> misg = memnew(MeshInstanceSpatialGizmo(Object::cast_to<MeshInstance>(p_spatial)));
return misg;
}
- if (p_spatial->cast_to<Room>()) {
+ /*if (Object::cast_to<Room>(p_spatial)) {
- Ref<RoomSpatialGizmo> misg = memnew(RoomSpatialGizmo(p_spatial->cast_to<Room>()));
+ Ref<RoomSpatialGizmo> misg = memnew(RoomSpatialGizmo(Object::cast_to<Room>(p_spatial)));
return misg;
- }
+ }*/
- if (p_spatial->cast_to<NavigationMeshInstance>()) {
+ if (Object::cast_to<NavigationMeshInstance>(p_spatial)) {
- Ref<NavigationMeshSpatialGizmo> misg = memnew(NavigationMeshSpatialGizmo(p_spatial->cast_to<NavigationMeshInstance>()));
+ Ref<NavigationMeshSpatialGizmo> misg = memnew(NavigationMeshSpatialGizmo(Object::cast_to<NavigationMeshInstance>(p_spatial)));
return misg;
}
- if (p_spatial->cast_to<RayCast>()) {
+ if (Object::cast_to<RayCast>(p_spatial)) {
- Ref<RayCastSpatialGizmo> misg = memnew(RayCastSpatialGizmo(p_spatial->cast_to<RayCast>()));
+ Ref<RayCastSpatialGizmo> misg = memnew(RayCastSpatialGizmo(Object::cast_to<RayCast>(p_spatial)));
return misg;
}
+ /*
+ if (Object::cast_to<Portal>(p_spatial)) {
- if (p_spatial->cast_to<Portal>()) {
-
- Ref<PortalSpatialGizmo> misg = memnew(PortalSpatialGizmo(p_spatial->cast_to<Portal>()));
+ Ref<PortalSpatialGizmo> misg = memnew(PortalSpatialGizmo(Object::cast_to<Portal>(p_spatial)));
return misg;
}
+*/
+ if (Object::cast_to<CollisionShape>(p_spatial)) {
- if (p_spatial->cast_to<CollisionShape>()) {
-
- Ref<CollisionShapeSpatialGizmo> misg = memnew(CollisionShapeSpatialGizmo(p_spatial->cast_to<CollisionShape>()));
+ Ref<CollisionShapeSpatialGizmo> misg = memnew(CollisionShapeSpatialGizmo(Object::cast_to<CollisionShape>(p_spatial)));
return misg;
}
- if (p_spatial->cast_to<VisibilityNotifier>()) {
+ if (Object::cast_to<VisibilityNotifier>(p_spatial)) {
- Ref<VisibilityNotifierGizmo> misg = memnew(VisibilityNotifierGizmo(p_spatial->cast_to<VisibilityNotifier>()));
+ Ref<VisibilityNotifierGizmo> misg = memnew(VisibilityNotifierGizmo(Object::cast_to<VisibilityNotifier>(p_spatial)));
return misg;
}
- if (p_spatial->cast_to<Particles>()) {
+ if (Object::cast_to<Particles>(p_spatial)) {
- Ref<ParticlesGizmo> misg = memnew(ParticlesGizmo(p_spatial->cast_to<Particles>()));
+ Ref<ParticlesGizmo> misg = memnew(ParticlesGizmo(Object::cast_to<Particles>(p_spatial)));
return misg;
}
- if (p_spatial->cast_to<ReflectionProbe>()) {
+ if (Object::cast_to<ReflectionProbe>(p_spatial)) {
- Ref<ReflectionProbeGizmo> misg = memnew(ReflectionProbeGizmo(p_spatial->cast_to<ReflectionProbe>()));
+ Ref<ReflectionProbeGizmo> misg = memnew(ReflectionProbeGizmo(Object::cast_to<ReflectionProbe>(p_spatial)));
return misg;
}
- if (p_spatial->cast_to<GIProbe>()) {
+ if (Object::cast_to<GIProbe>(p_spatial)) {
- Ref<GIProbeGizmo> misg = memnew(GIProbeGizmo(p_spatial->cast_to<GIProbe>()));
+ Ref<GIProbeGizmo> misg = memnew(GIProbeGizmo(Object::cast_to<GIProbe>(p_spatial)));
return misg;
}
- if (p_spatial->cast_to<VehicleWheel>()) {
+ if (Object::cast_to<VehicleWheel>(p_spatial)) {
- Ref<VehicleWheelSpatialGizmo> misg = memnew(VehicleWheelSpatialGizmo(p_spatial->cast_to<VehicleWheel>()));
+ Ref<VehicleWheelSpatialGizmo> misg = memnew(VehicleWheelSpatialGizmo(Object::cast_to<VehicleWheel>(p_spatial)));
return misg;
}
- if (p_spatial->cast_to<PinJoint>()) {
+ if (Object::cast_to<PinJoint>(p_spatial)) {
- Ref<PinJointSpatialGizmo> misg = memnew(PinJointSpatialGizmo(p_spatial->cast_to<PinJoint>()));
+ Ref<PinJointSpatialGizmo> misg = memnew(PinJointSpatialGizmo(Object::cast_to<PinJoint>(p_spatial)));
return misg;
}
- if (p_spatial->cast_to<HingeJoint>()) {
+ if (Object::cast_to<HingeJoint>(p_spatial)) {
- Ref<HingeJointSpatialGizmo> misg = memnew(HingeJointSpatialGizmo(p_spatial->cast_to<HingeJoint>()));
+ Ref<HingeJointSpatialGizmo> misg = memnew(HingeJointSpatialGizmo(Object::cast_to<HingeJoint>(p_spatial)));
return misg;
}
- if (p_spatial->cast_to<SliderJoint>()) {
+ if (Object::cast_to<SliderJoint>(p_spatial)) {
- Ref<SliderJointSpatialGizmo> misg = memnew(SliderJointSpatialGizmo(p_spatial->cast_to<SliderJoint>()));
+ Ref<SliderJointSpatialGizmo> misg = memnew(SliderJointSpatialGizmo(Object::cast_to<SliderJoint>(p_spatial)));
return misg;
}
- if (p_spatial->cast_to<ConeTwistJoint>()) {
+ if (Object::cast_to<ConeTwistJoint>(p_spatial)) {
- Ref<ConeTwistJointSpatialGizmo> misg = memnew(ConeTwistJointSpatialGizmo(p_spatial->cast_to<ConeTwistJoint>()));
+ Ref<ConeTwistJointSpatialGizmo> misg = memnew(ConeTwistJointSpatialGizmo(Object::cast_to<ConeTwistJoint>(p_spatial)));
return misg;
}
- if (p_spatial->cast_to<Generic6DOFJoint>()) {
+ if (Object::cast_to<Generic6DOFJoint>(p_spatial)) {
- Ref<Generic6DOFJointSpatialGizmo> misg = memnew(Generic6DOFJointSpatialGizmo(p_spatial->cast_to<Generic6DOFJoint>()));
+ Ref<Generic6DOFJointSpatialGizmo> misg = memnew(Generic6DOFJointSpatialGizmo(Object::cast_to<Generic6DOFJoint>(p_spatial)));
return misg;
}
- if (p_spatial->cast_to<CollisionPolygon>()) {
+ if (Object::cast_to<CollisionPolygon>(p_spatial)) {
- Ref<CollisionPolygonSpatialGizmo> misg = memnew(CollisionPolygonSpatialGizmo(p_spatial->cast_to<CollisionPolygon>()));
+ Ref<CollisionPolygonSpatialGizmo> misg = memnew(CollisionPolygonSpatialGizmo(Object::cast_to<CollisionPolygon>(p_spatial)));
return misg;
}
- if (p_spatial->cast_to<AudioStreamPlayer3D>()) {
+ if (Object::cast_to<AudioStreamPlayer3D>(p_spatial)) {
- Ref<AudioStreamPlayer3DSpatialGizmo> misg = memnew(AudioStreamPlayer3DSpatialGizmo(p_spatial->cast_to<AudioStreamPlayer3D>()));
+ Ref<AudioStreamPlayer3DSpatialGizmo> misg = memnew(AudioStreamPlayer3DSpatialGizmo(Object::cast_to<AudioStreamPlayer3D>(p_spatial)));
return misg;
}
return Ref<SpatialEditorGizmo>();
}
-Ref<SpatialMaterial> SpatialEditorGizmos::create_line_material(const Color &p_base_color) {
-
- Ref<SpatialMaterial> line_material = Ref<SpatialMaterial>(memnew(SpatialMaterial));
- line_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
- line_material->set_line_width(3.0);
- line_material->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
- //line_material->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
- //->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
- line_material->set_albedo(p_base_color);
-
- return line_material;
-}
-
-Ref<SpatialMaterial> SpatialEditorGizmos::create_solid_material(const Color &p_base_color) {
-
- Ref<SpatialMaterial> line_material = Ref<SpatialMaterial>(memnew(SpatialMaterial));
- line_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
- line_material->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
- line_material->set_albedo(p_base_color);
-
- return line_material;
-}
-
SpatialEditorGizmos::SpatialEditorGizmos() {
singleton = this;
handle_material = Ref<SpatialMaterial>(memnew(SpatialMaterial));
handle_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
+ handle_material->set_on_top_of_alpha();
handle_material->set_albedo(Color(0.8, 0.8, 0.8));
handle_material_billboard = handle_material->duplicate();
handle_material_billboard->set_billboard_mode(SpatialMaterial::BILLBOARD_ENABLED);
@@ -3274,9 +3426,29 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
handle2_material->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
handle2_material->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
handle2_material->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
+ handle2_material->set_on_top_of_alpha();
handle2_material_billboard = handle2_material->duplicate();
handle2_material_billboard->set_billboard_mode(SpatialMaterial::BILLBOARD_ENABLED);
-
+ handle2_material_billboard->set_billboard_mode(SpatialMaterial::BILLBOARD_ENABLED);
+ handle2_material_billboard->set_on_top_of_alpha();
+
+ EDITOR_DEF("editors/3d_gizmos/gizmo_colors/light", Color(1, 1, 0.2));
+ EDITOR_DEF("editors/3d_gizmos/gizmo_colors/stream_player_3d", Color(0.4, 0.8, 1));
+ EDITOR_DEF("editors/3d_gizmos/gizmo_colors/camera", Color(0.8, 0.4, 0.8));
+ EDITOR_DEF("editors/3d_gizmos/gizmo_colors/skeleton", Color(1, 0.8, 0.4));
+ EDITOR_DEF("editors/3d_gizmos/gizmo_colors/visibility_notifier", Color(0.8, 0.5, 0.7));
+ EDITOR_DEF("editors/3d_gizmos/gizmo_colors/particles", Color(0.8, 0.7, 0.4));
+ EDITOR_DEF("editors/3d_gizmos/gizmo_colors/reflection_probe", Color(0.6, 1, 0.5));
+ EDITOR_DEF("editors/3d_gizmos/gizmo_colors/gi_probe", Color(0.5, 1, 0.6));
+ EDITOR_DEF("editors/3d_gizmos/gizmo_colors/shape", Color(0.5, 0.7, 1));
+ EDITOR_DEF("editors/3d_gizmos/gizmo_colors/joint", Color(0.5, 0.8, 1));
+ EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_edge", Color(0.5, 1, 1));
+ EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_edge_disabled", Color(0.7, 0.7, 0.7));
+ EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_solid", Color(0.5, 1, 1, 0.4));
+ EDITOR_DEF("editors/3d_gizmos/gizmo_colors/navigation_solid_disabled", Color(0.7, 0.7, 0.7, 0.4));
+ EDITOR_DEF("editors/3d_gizmos/gizmo_colors/instanced", Color(0.7, 0.7, 0.7, 0.5));
+
+#if 0
light_material = create_line_material(Color(1, 1, 0.2));
light_material_omni = create_line_material(Color(1, 1, 0.2));
light_material_omni->set_billboard_mode(SpatialMaterial::BILLBOARD_ENABLED);
@@ -3289,6 +3461,7 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
light_material_omni_icon->set_albedo(Color(1, 1, 1, 0.9));
light_material_omni_icon->set_texture(SpatialMaterial::TEXTURE_ALBEDO, SpatialEditor::get_singleton()->get_icon("GizmoLight", "EditorIcons"));
light_material_omni_icon->set_flag(SpatialMaterial::FLAG_FIXED_SIZE, true);
+ light_material_omni_icon->set_billboard_mode(SpatialMaterial::BILLBOARD_ENABLED);
light_material_directional_icon = Ref<SpatialMaterial>(memnew(SpatialMaterial));
light_material_directional_icon->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
@@ -3297,6 +3470,8 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
light_material_directional_icon->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
light_material_directional_icon->set_albedo(Color(1, 1, 1, 0.9));
light_material_directional_icon->set_texture(SpatialMaterial::TEXTURE_ALBEDO, SpatialEditor::get_singleton()->get_icon("GizmoDirectionalLight", "EditorIcons"));
+ light_material_directional_icon->set_billboard_mode(SpatialMaterial::BILLBOARD_ENABLED);
+ light_material_directional_icon->set_depth_scale(1);
camera_material = create_line_material(Color(1.0, 0.5, 1.0));
@@ -3315,7 +3490,7 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
skeleton_material = create_line_material(Color(0.6, 1.0, 0.3));
skeleton_material->set_cull_mode(SpatialMaterial::CULL_DISABLED);
skeleton_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
- skeleton_material->set_flag(SpatialMaterial::FLAG_ONTOP, true);
+ skeleton_material->set_on_top_of_alpha();
skeleton_material->set_depth_draw_mode(SpatialMaterial::DEPTH_DRAW_DISABLED);
//position 3D Shared mesh
@@ -3377,14 +3552,6 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
listener_line_mesh->surface_set_material(0, mat);
}
- sample_player_icon = Ref<SpatialMaterial>(memnew(SpatialMaterial));
- sample_player_icon->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
- sample_player_icon->set_cull_mode(SpatialMaterial::CULL_DISABLED);
- sample_player_icon->set_depth_draw_mode(SpatialMaterial::DEPTH_DRAW_DISABLED);
- sample_player_icon->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
- sample_player_icon->set_albedo(Color(1, 1, 1, 0.9));
- sample_player_icon->set_texture(SpatialMaterial::TEXTURE_ALBEDO, SpatialEditor::get_singleton()->get_icon("GizmoSpatialSamplePlayer", "EditorIcons"));
-
room_material = create_line_material(Color(1.0, 0.6, 0.9));
portal_material = create_line_material(Color(1.0, 0.8, 0.6));
raycast_material = create_line_material(Color(1.0, 0.8, 0.6));
@@ -3463,4 +3630,62 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
}
shape_material = create_line_material(Color(0.2, 1, 1.0));
+#endif
+
+ pos3d_mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
+ {
+
+ PoolVector<Vector3> cursor_points;
+ PoolVector<Color> cursor_colors;
+ float cs = 0.25;
+ cursor_points.push_back(Vector3(+cs, 0, 0));
+ cursor_points.push_back(Vector3(-cs, 0, 0));
+ cursor_points.push_back(Vector3(0, +cs, 0));
+ cursor_points.push_back(Vector3(0, -cs, 0));
+ cursor_points.push_back(Vector3(0, 0, +cs));
+ cursor_points.push_back(Vector3(0, 0, -cs));
+ cursor_colors.push_back(Color(1, 0.5, 0.5, 0.7));
+ cursor_colors.push_back(Color(1, 0.5, 0.5, 0.7));
+ cursor_colors.push_back(Color(0.5, 1, 0.5, 0.7));
+ cursor_colors.push_back(Color(0.5, 1, 0.5, 0.7));
+ cursor_colors.push_back(Color(0.5, 0.5, 1, 0.7));
+ cursor_colors.push_back(Color(0.5, 0.5, 1, 0.7));
+
+ Ref<SpatialMaterial> mat = memnew(SpatialMaterial);
+ mat->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
+ mat->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
+ mat->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
+ mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
+ mat->set_line_width(3);
+ Array d;
+ d.resize(VS::ARRAY_MAX);
+ d[Mesh::ARRAY_VERTEX] = cursor_points;
+ d[Mesh::ARRAY_COLOR] = cursor_colors;
+ pos3d_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, d);
+ pos3d_mesh->surface_set_material(0, mat);
+ }
+
+ listener_line_mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
+ {
+
+ PoolVector<Vector3> cursor_points;
+ PoolVector<Color> cursor_colors;
+ cursor_points.push_back(Vector3(0, 0, 0));
+ cursor_points.push_back(Vector3(0, 0, -1.0));
+ cursor_colors.push_back(Color(0.5, 0.5, 0.5, 0.7));
+ cursor_colors.push_back(Color(0.5, 0.5, 0.5, 0.7));
+
+ Ref<SpatialMaterial> mat = memnew(SpatialMaterial);
+ mat->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
+ mat->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
+ mat->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
+ mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
+ mat->set_line_width(3);
+ Array d;
+ d.resize(VS::ARRAY_MAX);
+ d[Mesh::ARRAY_VERTEX] = cursor_points;
+ d[Mesh::ARRAY_COLOR] = cursor_colors;
+ listener_line_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, d);
+ listener_line_mesh->surface_set_material(0, mat);
+ }
}
diff --git a/editor/spatial_editor_gizmos.h b/editor/spatial_editor_gizmos.h
index 28feee3fcc..d63a804055 100644
--- a/editor/spatial_editor_gizmos.h
+++ b/editor/spatial_editor_gizmos.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -93,7 +93,7 @@ class EditorSpatialGizmo : public SpatialEditorGizmo {
Vector<Instance> instances;
Spatial *spatial_node;
- void _set_spatial_node(Node *p_node) { set_spatial_node(p_node->cast_to<Spatial>()); }
+ void _set_spatial_node(Node *p_node) { set_spatial_node(Object::cast_to<Spatial>(p_node)); }
protected:
void add_lines(const Vector<Vector3> &p_lines, const Ref<Material> &p_material, bool p_billboard = false);
@@ -102,11 +102,15 @@ protected:
void add_collision_triangles(const Ref<TriangleMesh> &p_tmesh);
void add_unscaled_billboard(const Ref<Material> &p_material, float p_scale = 1);
void add_handles(const Vector<Vector3> &p_handles, bool p_billboard = false, bool p_secondary = false);
+ void add_solid_box(Ref<Material> &p_material, Vector3 size);
void set_spatial_node(Spatial *p_node);
static void _bind_methods();
+ Ref<SpatialMaterial> create_material(const String &p_name, const Color &p_color, bool p_billboard = false, bool p_on_top = false, bool p_use_vertex_color = false);
+ Ref<SpatialMaterial> create_icon_material(const String &p_name, const Ref<Texture> &p_texture, bool p_on_top = false, const Color &p_albedo = Color(1, 1, 1, 1));
+
public:
virtual Vector3 get_handle_pos(int p_idx) const;
virtual bool intersect_frustum(const Camera *p_camera, const Vector<Plane> &p_frustum);
@@ -117,6 +121,8 @@ public:
void transform();
virtual void redraw();
void free();
+ virtual bool is_editable() const;
+ virtual bool can_draw() const;
EditorSpatialGizmo();
~EditorSpatialGizmo();
@@ -177,6 +183,7 @@ class MeshInstanceSpatialGizmo : public EditorSpatialGizmo {
MeshInstance *mesh;
public:
+ virtual bool can_draw() const;
void redraw();
MeshInstanceSpatialGizmo(MeshInstance *p_mesh = NULL);
};
@@ -203,25 +210,7 @@ public:
SkeletonSpatialGizmo(Skeleton *p_skel = NULL);
};
-class RoomSpatialGizmo : public EditorSpatialGizmo {
-
- GDCLASS(RoomSpatialGizmo, EditorSpatialGizmo);
-
- struct _EdgeKey {
-
- Vector3 from;
- Vector3 to;
-
- bool operator<(const _EdgeKey &p_with) const { return from == p_with.from ? to < p_with.to : from < p_with.from; }
- };
-
- Room *room;
-
-public:
- void redraw();
- RoomSpatialGizmo(Room *p_room = NULL);
-};
-
+#if 0
class PortalSpatialGizmo : public EditorSpatialGizmo {
GDCLASS(PortalSpatialGizmo, EditorSpatialGizmo);
@@ -232,6 +221,7 @@ public:
void redraw();
PortalSpatialGizmo(Portal *p_portal = NULL);
};
+#endif
class VisibilityNotifierGizmo : public EditorSpatialGizmo {
@@ -420,51 +410,19 @@ public:
};
class SpatialEditorGizmos {
+
public:
- Ref<SpatialMaterial> create_line_material(const Color &p_base_color);
- Ref<SpatialMaterial> create_solid_material(const Color &p_base_color);
+ HashMap<String, Ref<SpatialMaterial> > material_cache;
+
Ref<SpatialMaterial> handle2_material;
Ref<SpatialMaterial> handle2_material_billboard;
Ref<SpatialMaterial> handle_material;
Ref<SpatialMaterial> handle_material_billboard;
- Ref<SpatialMaterial> light_material;
- Ref<SpatialMaterial> light_material_omni;
- Ref<SpatialMaterial> light_material_omni_icon;
- Ref<SpatialMaterial> light_material_directional_icon;
- Ref<SpatialMaterial> camera_material;
- Ref<SpatialMaterial> skeleton_material;
- Ref<SpatialMaterial> reflection_probe_material;
- Ref<SpatialMaterial> reflection_probe_material_internal;
- Ref<SpatialMaterial> gi_probe_material;
- Ref<SpatialMaterial> gi_probe_material_internal;
- Ref<SpatialMaterial> room_material;
- Ref<SpatialMaterial> portal_material;
- Ref<SpatialMaterial> raycast_material;
- Ref<SpatialMaterial> visibility_notifier_material;
- Ref<SpatialMaterial> particles_material;
- Ref<SpatialMaterial> car_wheel_material;
- Ref<SpatialMaterial> joint_material;
-
- Ref<SpatialMaterial> navmesh_edge_material;
- Ref<SpatialMaterial> navmesh_solid_material;
- Ref<SpatialMaterial> navmesh_edge_material_disabled;
- Ref<SpatialMaterial> navmesh_solid_material_disabled;
-
- Ref<SpatialMaterial> listener_icon;
-
- Ref<SpatialMaterial> sample_player_icon;
- Ref<SpatialMaterial> stream_player_icon;
- Ref<SpatialMaterial> visibility_notifier_icon;
-
- Ref<SpatialMaterial> shape_material;
Ref<Texture> handle_t;
-
Ref<ArrayMesh> pos3d_mesh;
Ref<ArrayMesh> listener_line_mesh;
static SpatialEditorGizmos *singleton;
- Ref<TriangleMesh> test_cube_tm;
-
Ref<SpatialEditorGizmo> get_gizmo(Spatial *p_spatial);
SpatialEditorGizmos();
diff --git a/editor/translations/ar.po b/editor/translations/ar.po
index d617f55dfd..ac273ea41e 100644
--- a/editor/translations/ar.po
+++ b/editor/translations/ar.po
@@ -148,7 +148,8 @@ msgstr ""
msgid "Goto Prev Step"
msgstr ""
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr ""
@@ -380,7 +381,8 @@ msgstr ""
msgid "Description:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -391,9 +393,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 ""
@@ -466,7 +468,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -527,17 +529,16 @@ msgid "All"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr ""
@@ -553,7 +554,7 @@ msgstr ""
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -565,7 +566,7 @@ msgstr ""
msgid "Reverse"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr ""
@@ -717,14 +718,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr ""
@@ -829,7 +830,7 @@ msgid "Resource"
msgstr ""
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr ""
@@ -909,12 +910,179 @@ msgstr ""
msgid "Delete selected files?"
msgstr ""
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Authors"
+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 "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
+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 "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+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
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "عملية تحريك"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -928,21 +1096,44 @@ 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/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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: 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
@@ -1045,6 +1236,10 @@ 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 ""
@@ -1122,6 +1317,22 @@ msgstr ""
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
@@ -1247,6 +1458,14 @@ msgid "Signals:"
msgstr ""
#: editor/editor_help.cpp
+msgid "Enumerations:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr ""
@@ -1264,7 +1483,7 @@ msgid "Search Text"
msgstr ""
#: editor/editor_log.cpp
-msgid " Output:"
+msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1314,6 +1533,10 @@ 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 ""
@@ -1432,11 +1655,11 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
+msgid "Save & Close"
msgstr ""
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
@@ -1448,23 +1671,27 @@ msgid "No"
msgstr ""
#: editor/editor_node.cpp
-msgid "This scene has never been saved. Save before running?"
+msgid "Yes"
msgstr ""
#: editor/editor_node.cpp
-msgid "Export Mesh Library"
+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 Tile Set"
+msgid "Export Mesh Library"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
+msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Exit the editor?"
+msgid "This operation can't be done without a selected node."
msgstr ""
#: editor/editor_node.cpp
@@ -1488,9 +1715,27 @@ msgid "Quick Run Scene.."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+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
@@ -1498,6 +1743,22 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1530,6 +1791,11 @@ msgstr ""
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 ""
@@ -1546,6 +1812,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr ""
@@ -1594,10 +1864,6 @@ msgstr ""
msgid "Close Scene"
msgstr ""
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1877,6 +2143,10 @@ msgstr ""
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1886,26 +2156,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr ""
@@ -1926,9 +2180,17 @@ 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 ""
@@ -2029,6 +2291,16 @@ msgstr ""
msgid "Re-Import Changed Resources"
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 ""
@@ -2164,10 +2436,26 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Source: "
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2176,6 +2464,18 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving file:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving dir:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2252,6 +2552,12 @@ 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 ""
@@ -2263,9 +2569,28 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Single Scene"
+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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2305,6 +2630,14 @@ 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 ""
@@ -2491,6 +2824,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3072,6 +3409,10 @@ 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 ""
@@ -3384,6 +3725,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr ""
@@ -3416,10 +3758,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3528,11 +3866,6 @@ msgstr ""
msgid "Change default type"
msgstr ""
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr ""
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3570,6 +3903,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3609,6 +3950,18 @@ msgid "Update from Scene"
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 ""
@@ -3618,11 +3971,28 @@ 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 "Modify Curve"
+#, fuzzy
+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
@@ -3647,6 +4017,12 @@ 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 ""
@@ -3936,6 +4312,11 @@ 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 ""
@@ -4253,6 +4634,12 @@ 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 ""
@@ -4277,6 +4664,10 @@ 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 ""
@@ -4329,6 +4720,10 @@ msgid "Close All"
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.."
@@ -4361,6 +4756,10 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+msgid "Debug with external editor"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4424,6 +4823,10 @@ msgid ""
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 ""
@@ -4470,6 +4873,10 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+msgid "Delete Line"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4774,91 +5181,99 @@ msgid "Animation Key Inserted."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
+msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
+msgid "Material Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Forward"
+msgid "Shader Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Backwards"
+msgid "Surface Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
+msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Down"
+msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
+msgid "Align with view"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
+msgid "Display Normal"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Material Changes"
+msgid "Display Wireframe"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Shader Changes"
+msgid "Display Overdraw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Surface Changes"
+msgid "Display Unshaded"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
+msgid "View Environment"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
+msgid "View Gizmos"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "View Information"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
+msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
+msgid "Doppler Enable"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
+msgid "Freelook Left"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
+msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
+msgid "Freelook Forward"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
+msgid "Freelook Backwards"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
+msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
+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
@@ -4866,6 +5281,17 @@ 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 ""
@@ -4982,6 +5408,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr ""
@@ -5110,6 +5537,10 @@ 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 ""
@@ -5167,6 +5598,15 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+msgid "Remove All Items"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "عملية تحريك"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5234,7 +5674,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5256,11 +5696,23 @@ 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 editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: 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
@@ -5296,10 +5748,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5359,7 +5807,7 @@ msgstr ""
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5406,6 +5854,22 @@ 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 ""
@@ -5442,10 +5906,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5490,6 +5950,19 @@ 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 ""
@@ -5504,10 +5977,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5535,254 +6004,283 @@ msgstr ""
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+msgid "Can't run project"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: 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.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Add Global Property"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Select an 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 "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr ""
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5823,6 +6321,10 @@ msgid "Assign"
msgstr ""
#: editor/property_editor.cpp
+msgid "Select Node"
+msgstr ""
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr ""
@@ -5835,6 +6337,10 @@ 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 ""
@@ -5930,6 +6436,11 @@ msgstr ""
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 ""
@@ -5973,10 +6484,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -5989,6 +6496,18 @@ 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 ""
@@ -6031,6 +6550,14 @@ msgid "Edit Connections"
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 ""
@@ -6082,6 +6609,10 @@ msgid ""
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 ""
@@ -6089,6 +6620,14 @@ msgstr ""
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 ""
@@ -6120,10 +6659,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6161,35 +6696,15 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Select a Node"
msgstr ""
-#: editor/scene_tree_editor.cpp
-msgid "Select a Node"
+#: editor/script_create_dialog.cpp
+msgid "Error loading template '%s'"
msgstr ""
#: editor/script_create_dialog.cpp
@@ -6201,6 +6716,10 @@ 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 ""
@@ -6241,10 +6760,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6410,6 +6925,10 @@ 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 ""
@@ -6505,6 +7024,122 @@ msgstr ""
"instance dictionary نموذج القاموس غير صالح - subclasses الÙئة الÙرعية غير "
"صالحة"
+#: 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 "GridMap Paint"
+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/gridmap/grid_map_editor_plugin.cpp
+msgid "Tiles"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6536,64 +7171,63 @@ msgid "Stack overflow with stack depth: "
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Functions:"
+msgid "Change Signal Arguments"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Variables:"
+msgid "Change Argument Type"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Name is not a valid identifier:"
+msgid "Change Argument name"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Name already in use by another func/var/signal:"
+msgid "Set Variable Default Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Function"
+msgid "Set Variable Type"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Variable"
+msgid "Functions:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Signal"
+msgid "Variables:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Function"
+msgid "Name is not a valid identifier:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Variable"
+msgid "Name already in use by another func/var/signal:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Signal"
+msgid "Rename Function"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Remove Function"
-msgstr "عملية تحريك"
+msgid "Rename Variable"
+msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
+msgid "Rename Signal"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
+msgid "Add Function"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
+msgid "Add Variable"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
+msgid "Add Signal"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
@@ -6605,6 +7239,14 @@ 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 ""
@@ -6645,6 +7287,23 @@ msgid "Add Setter Property"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Base Type"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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 ""
@@ -6673,6 +7332,51 @@ msgid "Get"
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
+#, fuzzy
+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 ""
@@ -6693,10 +7397,6 @@ msgid "Edit Variable:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr ""
@@ -6770,14 +7470,6 @@ msgid ""
"(error)."
msgstr ""
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6798,77 +7490,6 @@ msgstr ""
msgid "Could not open template for export:\n"
msgstr ""
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -6951,6 +7572,13 @@ msgstr ""
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 ""
@@ -6973,17 +7601,32 @@ msgid ""
"as parent."
msgstr ""
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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
@@ -6997,6 +7640,19 @@ msgstr ""
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 ""
@@ -7012,6 +7668,13 @@ 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 ""
@@ -7028,7 +7691,7 @@ msgid ""
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7043,22 +7706,6 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr ""
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr ""
@@ -7077,7 +7724,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
diff --git a/editor/translations/bg.po b/editor/translations/bg.po
index 7ca3987827..2ac4e53dd8 100644
--- a/editor/translations/bg.po
+++ b/editor/translations/bg.po
@@ -3,24 +3,24 @@
# This file is distributed under the same license as the Godot source code.
#
# Bojidar Marinov <bojidar.marinov.bg@gmail.com>, 2016.
-# Иван Пенев (Ðдмирал ÐнимЕ) <aeternus.arcis@gmail.com>, 2016.
+# Иван Пенев (Ðдмирал ÐнимЕ) <aeternus.arcis@gmail.com>, 2016-2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2016-08-20 16:42+0000\n"
-"Last-Translator: Иван Пенев (Ðдмирал ÐнимЕ) <aeternus.arcis@gmail.com>\n"
+"PO-Revision-Date: 2017-07-27 06:33+0000\n"
+"Last-Translator: Иван Пенев <aeternus.arcis@gmail.com>\n"
"Language-Team: Bulgarian <https://hosted.weblate.org/projects/godot-engine/"
"godot/bg/>\n"
"Language: bg\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.8-dev\n"
+"X-Generator: Weblate 2.16-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
-msgstr ""
+msgstr "Изключено"
#: editor/animation_editor.cpp
msgid "All Selection"
@@ -120,7 +120,7 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Trigger"
-msgstr ""
+msgstr "СпуÑък"
#: editor/animation_editor.cpp
msgid "Anim Add Key"
@@ -146,13 +146,14 @@ msgstr ""
msgid "Goto Prev Step"
msgstr ""
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
-msgstr ""
+msgstr "Линейно"
#: editor/animation_editor.cpp editor/plugins/theme_editor_plugin.cpp
msgid "Constant"
-msgstr ""
+msgstr "ПоÑтоÑнно"
#: editor/animation_editor.cpp
msgid "In"
@@ -176,15 +177,15 @@ msgstr "Преходи"
#: editor/animation_editor.cpp
msgid "Optimize Animation"
-msgstr ""
+msgstr "Оптимизиране на анимациÑта"
#: editor/animation_editor.cpp
msgid "Clean-Up Animation"
-msgstr ""
+msgstr "ПочиÑтване на анимациÑта"
#: editor/animation_editor.cpp
msgid "Create NEW track for %s and insert key?"
-msgstr "Преход"
+msgstr ""
#: editor/animation_editor.cpp
msgid "Create %d NEW tracks and insert keys?"
@@ -198,7 +199,7 @@ msgstr ""
#: editor/plugins/particles_editor_plugin.cpp editor/project_manager.cpp
#: editor/script_create_dialog.cpp
msgid "Create"
-msgstr ""
+msgstr "Създаване"
#: editor/animation_editor.cpp
msgid "Anim Create & Insert"
@@ -242,7 +243,7 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Length (s):"
-msgstr ""
+msgstr "Дължина (Ñек.):"
#: editor/animation_editor.cpp
msgid "Animation length (in seconds)."
@@ -250,7 +251,7 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Step (s):"
-msgstr ""
+msgstr "Стъпка (Ñек.):"
#: editor/animation_editor.cpp
msgid "Cursor step snap (in seconds)."
@@ -262,19 +263,19 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Add new tracks."
-msgstr ""
+msgstr "ДобавÑне на нови пътечки."
#: editor/animation_editor.cpp
msgid "Move current track up."
-msgstr ""
+msgstr "ПремеÑтване на пътечката нагоре."
#: editor/animation_editor.cpp
msgid "Move current track down."
-msgstr ""
+msgstr "ПремеÑтване на пътечката надолу."
#: editor/animation_editor.cpp
msgid "Remove selected track."
-msgstr ""
+msgstr "Премахване на пътечката."
#: editor/animation_editor.cpp
msgid "Track tools"
@@ -314,7 +315,7 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Transition"
-msgstr ""
+msgstr "Преход"
#: editor/animation_editor.cpp
msgid "Scale Ratio:"
@@ -342,11 +343,11 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Clean-Up"
-msgstr ""
+msgstr "ПочиÑтване"
#: editor/array_property_edit.cpp
msgid "Resize Array"
-msgstr ""
+msgstr "ПреоразмерÑване на маÑива"
#: editor/array_property_edit.cpp
msgid "Change Array Value Type"
@@ -362,26 +363,26 @@ msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/editor_plugin_settings.cpp
msgid "Version:"
-msgstr ""
+msgstr "ВерÑиÑ:"
#: editor/asset_library_editor_plugin.cpp
msgid "Contents:"
-msgstr ""
+msgstr "Съдържание:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "View Files"
-msgstr "Файл:"
+msgstr "Преглед на файловете"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
#: editor/editor_help.cpp editor/property_selector.cpp
#: editor/script_editor_debugger.cpp
msgid "Description:"
-msgstr ""
+msgstr "ОпиÑание:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
-msgstr ""
+msgstr "ИнÑталиране"
#: editor/asset_library_editor_plugin.cpp editor/call_dialog.cpp
#: editor/connections_dialog.cpp editor/export_template_manager.cpp
@@ -390,12 +391,12 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 ""
+msgstr "ЗатварÑне"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
@@ -465,13 +466,13 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
-msgstr ""
+msgstr "Готово!"
#: editor/asset_library_editor_plugin.cpp
msgid "Fetching:"
-msgstr ""
+msgstr "ИзтеглÑне:"
#: editor/asset_library_editor_plugin.cpp
msgid "Resolving.."
@@ -479,11 +480,11 @@ msgstr ""
#: editor/asset_library_editor_plugin.cpp
msgid "Connecting.."
-msgstr ""
+msgstr "Свързване.."
#: editor/asset_library_editor_plugin.cpp
msgid "Requesting.."
-msgstr ""
+msgstr "Запитване.."
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
@@ -524,22 +525,21 @@ msgstr ""
#: editor/asset_library_editor_plugin.cpp
msgid "All"
-msgstr ""
+msgstr "Ð’Ñички"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
-msgstr ""
+msgstr "ТърÑене:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
-msgstr ""
+msgstr "ТърÑене"
#: editor/asset_library_editor_plugin.cpp editor/editor_node.cpp
#: editor/io_plugins/editor_bitmask_import_plugin.cpp
@@ -553,29 +553,29 @@ msgstr ""
msgid "Import"
msgstr "ВнаÑÑне"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "ПриÑтавки"
#: editor/asset_library_editor_plugin.cpp
msgid "Sort:"
-msgstr ""
+msgstr "Подреждане:"
#: editor/asset_library_editor_plugin.cpp
msgid "Reverse"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
-msgstr ""
+msgstr "КатегориÑ:"
#: editor/asset_library_editor_plugin.cpp
msgid "Site:"
-msgstr ""
+msgstr "ÐœÑÑто:"
#: editor/asset_library_editor_plugin.cpp
msgid "Support.."
-msgstr ""
+msgstr "Поддръжка"
#: editor/asset_library_editor_plugin.cpp
msgid "Official"
@@ -717,14 +717,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr ""
@@ -829,7 +829,7 @@ msgid "Resource"
msgstr ""
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr ""
@@ -909,12 +909,184 @@ msgstr ""
msgid "Delete selected files?"
msgstr ""
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Authors"
+msgstr ""
+
+#: editor/editor_about.cpp
+#, fuzzy
+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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "Съдържание:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "Извършва Ñе повторно внаÑÑне"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+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
+#, fuzzy
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+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
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Изтриване на анимациÑта?"
+
+#: editor/editor_audio_buses.cpp
+msgid "Duplicate Audio Bus"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Move Audio Bus"
+msgstr ""
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -928,21 +1100,44 @@ 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/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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: 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
@@ -1046,6 +1241,11 @@ msgid "Updating scene.."
msgstr "ОбновÑване на Ñцената.."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "МолÑ, първо запазете Ñцената."
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr ""
@@ -1123,6 +1323,22 @@ msgstr ""
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
@@ -1199,7 +1415,6 @@ msgid "ScanSources"
msgstr ""
#: editor/editor_file_system.cpp
-#, fuzzy
msgid "(Re)Importing Assets"
msgstr "Извършва Ñе повторно внаÑÑне"
@@ -1249,6 +1464,14 @@ msgid "Signals:"
msgstr ""
#: editor/editor_help.cpp
+msgid "Enumerations:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr ""
@@ -1265,7 +1488,7 @@ msgid "Search Text"
msgstr ""
#: editor/editor_log.cpp
-msgid " Output:"
+msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1315,6 +1538,10 @@ 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 ""
@@ -1433,12 +1660,13 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr ""
+#, fuzzy
+msgid "Save & Close"
+msgstr "Запазване на файл"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "Да Ñе затвори ли Ñцената? (незаразените промени ще Ñе загубÑÑ‚)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
@@ -1450,9 +1678,17 @@ 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 ""
@@ -1462,11 +1698,7 @@ msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "Изход"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
+msgid "This operation can't be done without a selected node."
msgstr ""
#: editor/editor_node.cpp
@@ -1490,9 +1722,29 @@ msgid "Quick Run Scene.."
msgstr "Бързо пуÑкане на Ñцена.."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "Изход"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "ДиÑпечер на проектите"
+
+#: editor/editor_node.cpp
+#, fuzzy
+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
@@ -1500,6 +1752,22 @@ msgid "Pick a Main Scene"
msgstr "Изберете главна Ñцена"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1532,6 +1800,11 @@ msgstr ""
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 ""
@@ -1548,6 +1821,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "Сцена"
@@ -1558,11 +1835,11 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Next tab"
-msgstr ""
+msgstr "Следващ подпрозорец"
#: editor/editor_node.cpp
msgid "Previous tab"
-msgstr ""
+msgstr "Предишен подпрозорец"
#: editor/editor_node.cpp
msgid "Filter Files.."
@@ -1596,10 +1873,6 @@ msgstr "Запазване на вÑички Ñцени"
msgid "Close Scene"
msgstr "ЗатварÑне на Ñцената"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1636,9 +1909,8 @@ msgid "Miscellaneous project or scene-wide tools."
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Project"
-msgstr "ИзнаÑÑне на проекта"
+msgstr "Проект"
#: editor/editor_node.cpp
msgid "Project Settings"
@@ -1654,7 +1926,7 @@ msgstr "ИзнаÑÑне"
#: editor/editor_node.cpp
msgid "Tools"
-msgstr ""
+msgstr "Сечива"
#: editor/editor_node.cpp
msgid "Quit to Project List"
@@ -1880,6 +2152,10 @@ msgstr "Възел"
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "Повторно внаÑÑне"
@@ -1889,26 +2165,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "ВнаÑÑне на шаблони от архив във формат ZIP"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "ИзнаÑÑне на проекта"
@@ -1929,9 +2189,18 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+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 ""
@@ -1945,9 +2214,8 @@ msgid "Open Script Editor"
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Asset Library"
-msgstr "ИзнаÑÑне на библиотеката"
+msgstr "ОтварÑне на библиотеката"
#: editor/editor_node.cpp
msgid "Open the next Editor"
@@ -2034,6 +2302,16 @@ msgstr "Извършва Ñе повторно внаÑÑне"
msgid "Re-Import Changed Resources"
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 ""
@@ -2173,10 +2451,27 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "Запазване и повторно внаÑÑне"
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Source: "
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2185,6 +2480,20 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Имаше грешка при внаÑÑнето:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Имаше грешка при внаÑÑнето:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2261,6 +2570,12 @@ 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 ""
@@ -2272,9 +2587,30 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+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
+#, fuzzy
+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
@@ -2314,21 +2650,27 @@ 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
#, fuzzy
msgid " Files"
msgstr "Файл:"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Import As:"
-msgstr "ВнаÑÑне"
+msgstr "ВнаÑÑне като:"
#: editor/import_dock.cpp editor/property_editor.cpp
msgid "Preset.."
msgstr ""
#: editor/import_dock.cpp
-#, fuzzy
msgid "Reimport"
msgstr "Повторно внаÑÑне"
@@ -2503,6 +2845,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -2920,9 +3266,8 @@ msgid "Change Animation Name:"
msgstr ""
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Delete Animation?"
-msgstr "ВнаÑÑне на анимации.."
+msgstr "Изтриване на анимациÑта?"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -3085,6 +3430,11 @@ msgid "New name:"
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Файл:"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr ""
@@ -3397,6 +3747,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr ""
@@ -3429,10 +3780,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3541,11 +3888,6 @@ msgstr ""
msgid "Change default type"
msgstr ""
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "Добре"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3583,6 +3925,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3622,6 +3972,18 @@ msgid "Update from Scene"
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 ""
@@ -3630,11 +3992,28 @@ msgid "Remove point"
msgstr ""
#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+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 "Modify Curve"
+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
@@ -3659,6 +4038,12 @@ 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 ""
@@ -3948,6 +4333,11 @@ 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 ""
@@ -4264,6 +4654,12 @@ 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 ""
@@ -4288,6 +4684,10 @@ 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 ""
@@ -4336,9 +4736,12 @@ msgid "Close Docs"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Close All"
-msgstr "Избиране на вÑичко"
+msgstr "ЗатварÑне на вÑичко"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid "Toggle Scripts Panel"
+msgstr ""
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
@@ -4373,6 +4776,10 @@ msgid "Keep Debugger Open"
msgstr "ОтÑÑ‚Ñ€Ð°Ð½Ð¸Ñ‚ÐµÐ»Ñ Ð½Ð° грешки да Ñеди отворен"
#: editor/plugins/script_editor_plugin.cpp
+msgid "Debug with external editor"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4436,6 +4843,10 @@ msgid ""
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 ""
@@ -4482,6 +4893,11 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Изтриване на анимациÑта?"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4786,92 +5202,100 @@ msgid "Animation Key Inserted."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
+msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
+msgid "Material Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Forward"
+msgid "Shader Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Backwards"
+msgid "Surface Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
+msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "Колелцето надолу."
+msgid "Vertices"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
+msgid "Align with view"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
+msgid "Display Normal"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Material Changes"
+msgid "Display Wireframe"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Shader Changes"
+msgid "Display Overdraw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Surface Changes"
+msgid "Display Unshaded"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
+msgid "View Environment"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
+msgid "View Gizmos"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "View Information"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
+msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
+msgid "Doppler Enable"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
+msgid "Freelook Left"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
+msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
+msgid "Freelook Forward"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
+msgid "Freelook Backwards"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
+msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
+#, fuzzy
+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
@@ -4879,6 +5303,18 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+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 ""
@@ -4995,6 +5431,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "ÐаÑтройки"
@@ -5123,6 +5560,10 @@ 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 ""
@@ -5180,6 +5621,15 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+msgid "Remove All Items"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "ЗатварÑне на вÑичко"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5247,7 +5697,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5269,11 +5719,24 @@ 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 editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+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
@@ -5309,10 +5772,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5372,7 +5831,7 @@ msgstr ""
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5381,26 +5840,22 @@ msgid "Resources"
msgstr ""
#: editor/project_export.cpp
-#, fuzzy
msgid "Export all resources in the project"
-msgstr "ИзнаÑÑне на вÑички реÑурÑи в проекта."
+msgstr "ИзнаÑÑне на вÑички реÑурÑи в проекта"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export selected scenes (and dependencies)"
-msgstr "ИзнаÑÑне на избраните реÑурÑи (включително завиÑимоÑтите)."
+msgstr "ИзнаÑÑне на избраните Ñцени (включително завиÑимоÑтите)"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export selected resources (and dependencies)"
-msgstr "ИзнаÑÑне на избраните реÑурÑи (включително завиÑимоÑтите)."
+msgstr "ИзнаÑÑне на избраните реÑурÑи (включително завиÑимоÑтите)"
#: editor/project_export.cpp
msgid "Export Mode:"
msgstr "Режим на изнаÑÑне:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Resources to export:"
msgstr "РеÑурÑи за изнаÑÑне:"
@@ -5423,6 +5878,23 @@ 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
+#, fuzzy
+msgid "Export PCK/Zip"
+msgstr "ИзнаÑÑне"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5432,7 +5904,7 @@ msgstr ""
#: editor/project_manager.cpp
msgid "Invalid project path, the path must exist!"
-msgstr ""
+msgstr "ÐедейÑтвителен път. ПътÑÑ‚ Ñ‚Ñ€Ñбва да ÑъщеÑтвува!"
#: editor/project_manager.cpp
msgid "Invalid project path, project.godot must not exist."
@@ -5459,10 +5931,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "ВнаÑÑне на ÑъщеÑтвуващ проект"
@@ -5472,15 +5940,15 @@ msgstr ""
#: editor/project_manager.cpp
msgid "Project Name:"
-msgstr ""
+msgstr "Име:"
#: editor/project_manager.cpp
msgid "Create New Project"
-msgstr ""
+msgstr "Създаване на нов проект"
#: editor/project_manager.cpp
msgid "Project Path:"
-msgstr ""
+msgstr "Път:"
#: editor/project_manager.cpp
msgid "Install Project:"
@@ -5488,7 +5956,7 @@ msgstr ""
#: editor/project_manager.cpp
msgid "Browse"
-msgstr ""
+msgstr "Разглеждане"
#: editor/project_manager.cpp
msgid "New Game Project"
@@ -5507,6 +5975,19 @@ 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 ""
@@ -5521,286 +6002,312 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
-msgstr ""
+msgstr "СпиÑък Ñ Ð¿Ñ€Ð¾ÐµÐºÑ‚Ð¸"
#: editor/project_manager.cpp
msgid "Run"
-msgstr ""
+msgstr "ПуÑкане"
#: editor/project_manager.cpp
msgid "Scan"
-msgstr ""
+msgstr "Сканиране"
#: editor/project_manager.cpp
msgid "Select a Folder to Scan"
-msgstr ""
+msgstr "Изберете папка за Ñканиране"
#: editor/project_manager.cpp
msgid "New Project"
-msgstr ""
+msgstr "Ðов проект"
#: editor/project_manager.cpp
msgid "Templates"
-msgstr ""
+msgstr "Шаблони"
#: editor/project_manager.cpp
msgid "Exit"
-msgstr ""
+msgstr "Изход"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Създаване на нов проект"
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
-msgstr ""
+msgstr "ЛÑво копче"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
-msgstr ""
+msgstr "ДÑÑно копче"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
-msgstr ""
+msgstr "Средно копче"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
-msgstr ""
+msgstr "Колелце нагоре"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
-msgstr ""
+msgstr "Колелце надолу"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
-msgstr ""
+msgstr "Копче 6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
-msgstr ""
+msgstr "Копче 7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
-msgstr ""
+msgstr "Копче 8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
+msgstr "Копче 9"
+
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "ОÑ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "УÑтройÑтво"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Копче"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "ЛÑво копче."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "ДÑÑно копче."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "Средно копче."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "Колелцето нагоре."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "Колелцето надолу."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Add Global Property"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "No property '"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "ÐаÑтройки"
+
+#: editor/project_settings_editor.cpp
+msgid "Delete Item"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "ÐаÑтройките Ñа запазени."
-#: editor/project_settings.cpp
-msgid "Add Translation"
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Add Translation"
+msgstr "ДобавÑне на превод"
+
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
-msgstr ""
+msgstr "Премахване на превода"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
-#, fuzzy
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr "ÐаÑтройки на проекта"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
-msgstr ""
+msgstr "Общи"
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr ""
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5842,8 +6349,12 @@ msgstr ""
#: editor/property_editor.cpp
#, fuzzy
+msgid "Select Node"
+msgstr "Избиране на вÑичко"
+
+#: editor/property_editor.cpp
msgid "New Script"
-msgstr "Ðова Ñцена"
+msgstr "Ðов Ñкрипт"
#: editor/property_editor.cpp
msgid "Show in File System"
@@ -5854,6 +6365,10 @@ msgid "Error loading file: Not a resource!"
msgstr ""
#: editor/property_editor.cpp
+msgid "Selected node is not a Viewport!"
+msgstr ""
+
+#: editor/property_editor.cpp
#, fuzzy
msgid "Pick a Node"
msgstr "ПоÑтавÑне"
@@ -5879,14 +6394,12 @@ msgid "Sections:"
msgstr ""
#: editor/property_selector.cpp
-#, fuzzy
msgid "Select Property"
-msgstr "Избиране на вÑичко"
+msgstr "Изберете ÑвойÑтво"
#: editor/property_selector.cpp
-#, fuzzy
msgid "Select Method"
-msgstr "Избиране на вÑичко"
+msgstr "Изберете метод"
#: editor/pvrtc_compress.cpp
msgid "Could not execute PVRTC tool:"
@@ -5952,6 +6465,11 @@ msgstr ""
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 ""
@@ -5995,10 +6513,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6011,6 +6525,18 @@ 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 ""
@@ -6053,6 +6579,14 @@ msgid "Edit Connections"
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 ""
@@ -6106,6 +6640,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "ПоÑтавÑне на възелите"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr ""
@@ -6113,6 +6652,14 @@ msgstr ""
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 ""
@@ -6144,11 +6691,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "ÐаÑтройки за отÑтранÑване на грешки"
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6186,31 +6728,7 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
@@ -6219,6 +6737,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Грешка при зареждането на шрифта."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "ÐеуÑпешно Ñъздаване на папка."
@@ -6228,6 +6751,10 @@ 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 ""
@@ -6268,17 +6795,12 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Create new script file"
-msgstr "Създаване на папка"
+msgstr "Създаване на нов Ñкрипт"
#: editor/script_create_dialog.cpp
msgid "Load existing script file"
@@ -6438,6 +6960,10 @@ 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 ""
@@ -6529,6 +7055,127 @@ msgstr ""
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 "GridMap Paint"
+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
+#, fuzzy
+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
+#, fuzzy
+msgid "Create Area"
+msgstr "Създаване"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "ÐаÑтройки"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Pick Distance:"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "Файл:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6560,63 +7207,63 @@ msgid "Stack overflow with stack depth: "
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Functions:"
+msgid "Change Signal Arguments"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Variables:"
+msgid "Change Argument Type"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Name is not a valid identifier:"
+msgid "Change Argument name"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Name already in use by another func/var/signal:"
+msgid "Set Variable Default Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Function"
+msgid "Set Variable Type"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Variable"
+msgid "Functions:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Signal"
+msgid "Variables:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Function"
+msgid "Name is not a valid identifier:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Variable"
+msgid "Name already in use by another func/var/signal:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Signal"
+msgid "Rename Function"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
+msgid "Rename Variable"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
+msgid "Rename Signal"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
+msgid "Add Function"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
+msgid "Add Variable"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
+msgid "Add Signal"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
@@ -6628,6 +7275,14 @@ 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 ""
@@ -6668,9 +7323,26 @@ msgid "Add Setter Property"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Base Type"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
+msgid "Move Node(s)"
+msgstr "ПоÑтавÑне на възелите"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove VisualScript Node"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "ИзрÑзване на възелите"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
-msgstr "Преходи"
+msgstr "УÑловие"
#: modules/visual_script/visual_script_editor.cpp
msgid "Sequence"
@@ -6697,6 +7369,52 @@ msgid "Get"
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
+#, fuzzy
+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
+#, fuzzy
+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 ""
@@ -6717,10 +7435,6 @@ msgid "Edit Variable:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr ""
@@ -6733,14 +7447,12 @@ msgid "Copy Nodes"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Cut Nodes"
-msgstr "Възел"
+msgstr "ИзрÑзване на възелите"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Paste Nodes"
-msgstr "ПоÑтавÑне"
+msgstr "ПоÑтавÑне на възелите"
#: modules/visual_script/visual_script_flow_control.cpp
msgid "Input type not iterable: "
@@ -6796,14 +7508,6 @@ msgid ""
"(error)."
msgstr ""
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6827,78 +7531,6 @@ msgstr "ÐеуÑпешно Ñъздаване на папка."
msgid "Could not open template for export:\n"
msgstr "ÐеуÑпешно Ñъздаване на папка."
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Error creating the signature object."
-msgstr "Имаше грешка при изнаÑÑне на проекта!"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -6999,6 +7631,13 @@ msgstr ""
msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr "PathFollow2D работи Ñамо когато е наÑледник на Path2D."
+#: 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 ""
@@ -7025,17 +7664,32 @@ msgid ""
"as parent."
msgstr ""
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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
@@ -7049,6 +7703,19 @@ msgstr ""
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 ""
@@ -7064,6 +7731,13 @@ 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
#, fuzzy
msgid "Path property must point to a valid Spatial node to work."
@@ -7083,7 +7757,7 @@ msgid ""
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7098,22 +7772,6 @@ msgstr "Тревога!"
msgid "Please Confirm..."
msgstr "МолÑ, потвърдете..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr ""
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr ""
@@ -7132,7 +7790,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7146,6 +7804,13 @@ msgid ""
"texture to some node for display."
msgstr ""
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "Да Ñе затвори ли Ñцената? (незаразените промени ще Ñе загубÑÑ‚)"
+
+#, fuzzy
+#~ msgid "Error creating the signature object."
+#~ msgstr "Имаше грешка при изнаÑÑне на проекта!"
+
#~ msgid "Import assets to the project."
#~ msgstr "ВнаÑÑне на обекти в проекта."
@@ -7164,9 +7829,6 @@ msgstr ""
#~ "За да изпълнÑва звук, SamplePlayer Ñ‚Ñ€Ñбва да има един SampleLibrary "
#~ "реÑÑƒÑ€Ñ Ð² параметъра 'samples'."
-#~ msgid "Please save the scene first."
-#~ msgstr "МолÑ, първо запазете Ñцената."
-
#~ msgid "Please export outside the project folder!"
#~ msgstr "МолÑ, изнеÑете извън папката на проекта!"
diff --git a/editor/translations/bn.po b/editor/translations/bn.po
index abf7b8c8b9..64b0c0c528 100644
--- a/editor/translations/bn.po
+++ b/editor/translations/bn.po
@@ -147,7 +147,8 @@ msgstr "পরবরà§à¦¤à§€ ধাপে যান"
msgid "Goto Prev Step"
msgstr "পূরà§à¦¬à¦¬à¦°à§à¦¤à§€ ধাপে যান"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "রৈখিক/লিনিয়ার"
@@ -382,7 +383,8 @@ msgstr "ফাইল"
msgid "Description:"
msgstr "বরà§à¦£à¦¨à¦¾:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr "ইনà§à¦¸à¦Ÿà¦²"
@@ -393,9 +395,9 @@ msgstr "ইনà§à¦¸à¦Ÿà¦²"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "বনà§à¦§ করà§à¦¨"
@@ -471,7 +473,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -537,17 +539,16 @@ msgid "All"
msgstr "সকল"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ করà§à¦¨:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ করà§à¦¨"
@@ -563,7 +564,7 @@ msgstr "অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ করà§à¦¨"
msgid "Import"
msgstr "ইমà§à¦ªà§‹à¦°à§à¦Ÿ"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "পà§à¦²à¦¾à¦—ইন-সমূহ"
@@ -575,7 +576,7 @@ msgstr "সাজান:"
msgid "Reverse"
msgstr "উলà§à¦Ÿà¦¾à¦¨/বিপরীত দিকে ফিরান"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "বিভাগ:"
@@ -730,14 +731,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "অপসারণ করà§à¦¨"
@@ -846,7 +847,7 @@ msgid "Resource"
msgstr "রিসোরà§à¦¸"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "পথ"
@@ -929,12 +930,194 @@ msgstr "মালিকবিহীন রিসোরà§à¦¸à§‡à¦° অনà§à¦¸à
msgid "Delete selected files?"
msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ ফাইলসমূহ অপসারণ করবেন?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Godot কমিউনিটি হতে আপনাকে ধনà§à¦¯à¦¬à¦¾à¦¦!"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "ধনà§à¦¯à¦¬à¦¾à¦¦!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr ""
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "লেখক:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "ধà§à¦°à§à¦¬à¦•à¦¸à¦®à§‚হ:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "অসংকà§à¦šà¦¿à¦¤"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "পà§à¦¯à¦¾à¦•à§‡à¦œ ইনà§à¦¸à¦Ÿà¦² সফল হয়েছে!"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "পà§à¦¯à¦¾à¦•à§‡à¦œ ইনà§à¦¸à¦Ÿà¦² সফল হয়েছে!"
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Effect"
+msgstr "খালি বসà§à¦¤à§ যোগ করà§à¦¨"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Autoload পà§à¦¨à¦ƒà¦¨à¦¾à¦®à¦•à¦°à¦£ করà§à¦¨"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ সমূহ অপসারণ করà§à¦¨"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "পà§à¦°à¦¤à¦¿à¦²à¦¿à¦ªà¦¿"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ সমূহ অপসারণ করà§à¦¨"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "%s সংযà§à¦•à§à¦¤ করà§à¦¨"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "লেআউট/নকশা অপসারণ করà§à¦¨"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨ পà§à¦°à¦¤à¦¿à¦²à¦¿à¦ªà¦¿ করà§à¦¨"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "পà§à¦°à¦•à§à¦°à¦¿à¦¯à¦¼à¦¾ সà§à¦¥à¦¾à¦¨à¦¾à¦¨à§à¦¤à¦° করà§à¦¨"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -948,24 +1131,53 @@ 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
+#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"ফাইলের অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ à¦à¦•à§à¦¸à¦Ÿà§‡à¦¨à¦¶à¦¨à¥¤\n"
+"অনà§à¦—à§à¦°à¦¹ করে .fnt বà§à¦¯à¦¬à¦¹à¦¾à¦° করà§à¦¨à¥¤"
+
+#: editor/editor_audio_buses.cpp
#, fuzzy
msgid "Add Bus"
msgstr "%s সংযà§à¦•à§à¦¤ করà§à¦¨"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "নতà§à¦¨ রিসোরà§à¦¸ তৈরি করà§à¦¨"
+
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "লোড"
#: editor/editor_audio_buses.cpp
+#, fuzzy
+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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+msgid "Save this Bus Layout to a file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+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 "অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ নাম।"
@@ -1072,6 +1284,11 @@ msgid "Updating scene.."
msgstr "দৃশà§à¦¯ হাল নাগাদ হচà§à¦›à§‡.."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "পà§à¦°à¦¥à¦®à§‡ অনà§à¦—à§à¦°à¦¹ করে দৃশà§à¦¯à¦Ÿà¦¿ সংরকà§à¦·à¦£ করà§à¦¨à¥¤"
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "à¦à¦•à¦Ÿà¦¿ সà§à¦¥à¦¾à¦¨ পছনà§à¦¦ করà§à¦¨"
@@ -1149,6 +1366,22 @@ msgstr "সব ফাইল (*)"
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
@@ -1275,6 +1508,15 @@ msgid "Signals:"
msgstr "সিগনà§à¦¯à¦¾à¦²à¦¸/সংকেতসমূহ:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "অà§à¦¯à¦¾à¦¨à¦¿à¦®à§‡à¦¶à¦¨à¦¸à¦®à§‚হ"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "ধà§à¦°à§à¦¬à¦•à¦¸à¦®à§‚হ:"
@@ -1291,7 +1533,8 @@ msgid "Search Text"
msgstr "টেকà§à¦¸à¦Ÿ অনà§à¦¸à¦¨à§à¦§à¦¾à¦¨ করà§à¦¨"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " আউটপà§à¦Ÿ/ফলাফল:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1341,6 +1584,11 @@ msgid "Creating Thumbnail"
msgstr "থামà§à¦¬à¦¨à§‡à¦‡à¦² তৈরি হচà§à¦›à§‡"
#: editor/editor_node.cpp
+#, fuzzy
+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 ""
@@ -1473,12 +1721,13 @@ msgid "Quick Open Script.."
msgstr "দà§à¦°à§à¦¤ সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿ খà§à¦²à§à¦¨.."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "হà§à¦¯à¦¾à¦"
+#, fuzzy
+msgid "Save & Close"
+msgstr "ফাইল সংরকà§à¦·à¦¨ করà§à¦¨"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "দৃশà§à¦¯ বনà§à¦§ করবেন? (অসংরকà§à¦·à¦¿à¦¤ পরিবরà§à¦¤à¦¨à¦¸à¦®à§‚হ হারিয়ে যাবে)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
@@ -1490,9 +1739,17 @@ 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 "Mesh Library à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ করà§à¦¨"
@@ -1502,12 +1759,9 @@ msgid "Export Tile Set"
msgstr "Tile Set à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ করà§à¦¨"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "পà§à¦°à¦¸à§à¦¥à¦¾à¦¨ করà§à¦¨"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "à¦à¦¡à¦¿à¦Ÿà¦° হতে পà§à¦°à¦¸à§à¦¥à¦¾à¦¨ করবেন?"
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "দৃশà§à¦¯ ছাড়া à¦à¦Ÿà¦¿ করা সমà§à¦­à¦¬ হবে না।"
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1530,18 +1784,52 @@ msgid "Quick Run Scene.."
msgstr "দà§à¦°à§à¦¤ দৃশà§à¦¯ চালান.."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "পà§à¦°à¦¸à§à¦¥à¦¾à¦¨ করà§à¦¨"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "à¦à¦¡à¦¿à¦Ÿà¦° হতে পà§à¦°à¦¸à§à¦¥à¦¾à¦¨ করবেন?"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "পà§à¦°à¦•à¦²à§à¦ª মà§à¦¯à¦¾à¦¨à§‡à¦œà¦¾à¦°"
+
+#: editor/editor_node.cpp
+#, fuzzy
+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 ""
-"পà§à¦°à¦•à¦²à§à¦ª মà§à¦¯à¦¾à¦¨à§‡à¦œà¦¾à¦° (Project Manager) খà§à¦²à¦¬à§‡à¦¨? \n"
-"(অ-সংরকà§à¦·à¦¿à¦¤ পরিবরà§à¦¤à¦¨-সমূহ হারিয়ে যাবে)"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "à¦à¦•à¦Ÿà¦¿ মà§à¦–à§à¦¯ দৃশà§à¦¯ মনোনীত করà§à¦¨"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1576,6 +1864,11 @@ msgstr "লেআউট/নকশা সংরকà§à¦·à¦£ করà§à¦¨"
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 "দৃশà§à¦¯à§‡à¦° টà§à¦¯à¦¾à¦¬ পরিবরà§à¦¤à¦¨ করà§à¦¨"
@@ -1592,6 +1885,11 @@ msgstr "%d টি অধিক ফাইল(সমূহ) বা ফোলà§à¦¡
msgid "Distraction Free Mode"
msgstr "বিকà§à¦·à§‡à¦ª-হীন মোড"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "বিকà§à¦·à§‡à¦ª-হীন মোড"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "দৃশà§à¦¯"
@@ -1641,10 +1939,6 @@ msgstr "সকল দৃশà§à¦¯ সংরকà§à¦·à¦£ করà§à¦¨"
msgid "Close Scene"
msgstr "দৃশà§à¦¯ বনà§à¦§ করà§à¦¨"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr "বনà§à¦§ করে পূরà§à¦¬à§‡à¦° দৃশà§à¦¯à§‡ যান"
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "সামà§à¦ªà§à¦°à¦¤à¦¿à¦•à¦¸à¦®à§‚হ খà§à¦²à§à¦¨"
@@ -1948,6 +2242,10 @@ msgstr "নোড"
msgid "Output"
msgstr "আউটপà§à¦Ÿ/ফলাফল"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "পà§à¦¨-ইমà§à¦ªà§‹à¦°à§à¦Ÿ"
@@ -1957,26 +2255,10 @@ msgid "Update"
msgstr "হালনাগাদ"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "Godot কমিউনিটি হতে আপনাকে ধনà§à¦¯à¦¬à¦¾à¦¦!"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "ধনà§à¦¯à¦¬à¦¾à¦¦!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "ZIP ফাইল হতে টেমপà§à¦²à§‡à¦Ÿ-সমূহ ইমà§à¦ªà§‹à¦°à§à¦Ÿ করà§à¦¨"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "পà§à¦°à¦•à¦²à§à¦ª à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ করà§à¦¨"
@@ -1997,9 +2279,18 @@ msgid "Open & Run a Script"
msgstr "à¦à¦•à¦Ÿà¦¿ সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿ খà§à¦²à§à¦¨ à¦à¦¬à¦‚ চালান"
#: editor/editor_node.cpp
+#, fuzzy
+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
#, fuzzy
msgid "Open 2D Editor"
@@ -2106,6 +2397,16 @@ msgstr "পà§à¦¨à¦°à¦¾à§Ÿ ইমà§à¦ªà§‹à¦°à§à¦Ÿ হচà§à¦›à§‡"
msgid "Re-Import Changed Resources"
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 "আপনার লজিক/যà§à¦•à§à¦¤à¦¿-সমূহ _run() মেথডে লিখà§à¦¨à¥¤"
@@ -2256,10 +2557,28 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "সংরকà§à¦·à¦£ à¦à¦¬à¦‚ পà§à¦¨-ইমà§à¦ªà§‹à¦°à§à¦Ÿ করà§à¦¨"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "উৎস:"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr "ফাইলà§à¦—à§à¦²à§‹à¦° à¦à¦•à¦‡ উৎস à¦à¦¬à¦‚ গনà§à¦¤à¦¬à§à¦¯à¦¸à§à¦¥à¦¾à¦¨, কিছà§à¦‡ করা হচà§à¦›à§‡ না।"
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr "পথগà§à¦²à§‹à¦° à¦à¦•à¦‡ উৎস à¦à¦¬à¦‚ গনà§à¦¤à¦¬à§à¦¯à¦¸à§à¦¥à¦¾à¦¨, কিছà§à¦‡ করা হচà§à¦›à§‡ না।"
@@ -2268,6 +2587,20 @@ msgid "Can't move directories to within themselves."
msgstr "সà§à¦¥à¦¾à¦¨à¦¸à¦®à§‚হকে তাদের মাà¦à§‡à¦‡ সà§à¦¥à¦¾à¦¨à¦¾à¦¨à§à¦¤à¦° করা সমà§à¦­à¦¬ নয়।"
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "ছবি লোডে সমসà§à¦¯à¦¾ হয়েছে:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "ইমà§à¦ªà§‹à¦°à§à¦Ÿà§‡ সমসà§à¦¯à¦¾ হয়েছে:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr "'..' তে পরিচালনা করা সমà§à¦­à¦¬ নয়"
@@ -2345,6 +2678,12 @@ 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 "সরান"
@@ -2356,10 +2695,31 @@ msgstr "গà§à¦°à§à¦ª/দলে যোগ করà§à¦¨"
msgid "Remove from Group"
msgstr "গà§à¦°à§à¦ª/দল হতে অপসারণ করà§à¦¨"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "পৃষà§à¦ à¦¤à¦² %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "3D দৃশà§à¦¯ ইমà§à¦ªà§‹à¦°à§à¦Ÿ করà§à¦¨"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2398,6 +2758,14 @@ 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
#, fuzzy
msgid " Files"
msgstr "ফাইল"
@@ -2594,6 +2962,10 @@ msgstr "মেস(সমূহ)-à¦à¦° উৎস:"
msgid "Mesh"
msgstr "মেস"
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "পৃষà§à¦ à¦¤à¦² %d"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr "ইমà§à¦ªà§‹à¦°à§à¦Ÿ করার মতো কোনো নমà§à¦¨à¦¾ নেই!"
@@ -3179,6 +3551,11 @@ msgid "New name:"
msgstr "নতà§à¦¨ নাম:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "নোড ফিলà§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr "সà§à¦•à§‡à¦²/মাপ:"
@@ -3493,6 +3870,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨ (Edit)"
@@ -3525,10 +3903,6 @@ msgid "Use Pixel Snap"
msgstr "পিকà§à¦¸à§‡à¦² সà§à¦¨à§à¦¯à¦¾à¦ª বà§à¦¯à¦¬à¦¹à¦¾à¦° করà§à¦¨"
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr "ধারক/বাহক পরà§à¦¯à¦¨à§à¦¤ বিসà§à¦¤à§ƒà¦¤ করà§à¦¨"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr "সà§à¦•à§‡à¦²à§‡à¦Ÿà¦¨/কাঠাম.."
@@ -3637,11 +4011,6 @@ msgstr "à¦à¦‡ কাজটি করার জনà§à¦¯ à¦à¦•à¦Ÿà¦¿ à¦à¦•à¦•
msgid "Change default type"
msgstr "ডিফলà§à¦Ÿ ধরণ পরিবরà§à¦¤à¦¨ করà§à¦¨"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "সঠিক"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3681,6 +4050,14 @@ msgstr "Poly সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨ (বিনà§à¦¦à§ অপসা
msgid "Create a new polygon from scratch."
msgstr "আরমà§à¦­ হতে নতà§à¦¨ polygon তৈরি করà§à¦¨à¥¤"
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr "Poly3D তৈরি করà§à¦¨"
@@ -3721,6 +4098,21 @@ msgstr "দৃশà§à¦¯ হতে হালনাগাদ করà§à¦¨"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Modify Curve Point"
+msgstr "Curve Map পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "Curve Map পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Load Curve Preset"
+msgstr "রিসোরà§à¦¸ লোড করà§à¦¨"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Add point"
msgstr "ইনপà§à¦Ÿ যোগ করà§à¦¨"
@@ -3731,13 +4123,31 @@ msgstr "পথের বিনà§à¦¦à§ অপসারণ করà§à¦¨"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Left linear"
+msgstr "রৈখিক/লিনিয়ার"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Right linear"
+msgstr "ডান দরà§à¦¶à¦¨"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Load preset"
msgstr "রিসোরà§à¦¸ লোড করà§à¦¨"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
-msgid "Modify Curve"
-msgstr "Curve Map পরিবরà§à¦¤à¦¨ করà§à¦¨"
+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"
@@ -3761,6 +4171,12 @@ 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 "অকলà§à¦¡à¦¾à¦° (occluder) পলিগন তৈরি করà§à¦¨"
@@ -4055,6 +4471,12 @@ msgid "Load Emission Mask"
msgstr "Emission Mask লোড করà§à¦¨"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
+msgid "Particles"
+msgstr "ভারটেকà§à¦¸"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
msgstr "উৎপাদিত বিনà§à¦¦à§à¦° সংখà§à¦¯à¦¾:"
@@ -4386,6 +4808,12 @@ 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 "থিম সংরকà§à¦·à¦£à§‡ সমসà§à¦¯à¦¾ হয়েছে"
@@ -4410,6 +4838,10 @@ 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 "পরবরà§à¦¤à§€ সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿ"
@@ -4462,6 +4894,11 @@ msgid "Close All"
msgstr "সবগà§à¦²à¦¿ বনà§à¦§ করà§à¦¨"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+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.."
@@ -4494,6 +4931,11 @@ msgid "Keep Debugger Open"
msgstr "ডিবাগার খোলা রাখà§à¦¨"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "à¦à¦¡à¦¿à¦Ÿà¦°à§‡ খà§à¦²à§à¦¨"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr "উইনà§à¦¡à§‹"
@@ -4561,6 +5003,10 @@ msgid ""
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 "রঙ পছনà§à¦¦ করà§à¦¨"
@@ -4608,6 +5054,11 @@ msgid "Move Down"
msgstr "নীচে যান"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "বিনà§à¦¦à§ অপসারণ করà§à¦¨"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr "বামে মাতà§à¦°à¦¾ দিন"
@@ -4914,37 +5365,6 @@ msgid "Animation Key Inserted."
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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "সামনের দিকে যান"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "পিছনের/অতীতের দিকে"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "মাউসের চাকা নিচের দিকে চকà§à¦•à¦°à¥¤"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -5012,10 +5432,64 @@ msgid "Audio Listener"
msgstr "অডিও শà§à¦°à§‹à¦¤à¦¾"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Freelook Forward"
+msgstr "সামনের দিকে যান"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Backwards"
+msgstr "পিছনের/অতীতের দিকে"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Down"
+msgstr "মাউসের চাকা নিচের দিকে চকà§à¦•à¦°à¥¤"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "preview"
+msgstr "পà§à¦°à¦¿à¦­à¦¿à¦‰"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr "XForm à¦à¦° সংলাপ"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "মোড (Mode) বাছাই করà§à¦¨"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+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 "সরানোর মোড (W)"
@@ -5136,6 +5610,7 @@ msgid "View Grid"
msgstr "গà§à¦°à¦¿à¦¡ দেখà§à¦¨"
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "সেটিংস"
@@ -5264,6 +5739,11 @@ msgid "StyleBox Preview:"
msgstr "StyleBox পà§à¦°à¦¿à¦­à¦¿à¦‰:"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
+msgid "Set Region Rect"
+msgstr "গঠনবিনà§à¦¯à¦¾à¦¸à§‡à¦° à¦à¦²à¦¾à¦•à¦¾"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
msgstr "সà§à¦¨à§à¦¯à¦¾à¦ª মোড:"
@@ -5321,6 +5801,16 @@ msgid "Remove Item"
msgstr "বসà§à¦¤à§ অপসারণ করà§à¦¨"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "কà§à¦²à¦¾à¦¸à§‡à¦° আইটেম অপসারণ করà§à¦¨"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "অপসারণ করà§à¦¨"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr "থিম"
@@ -5388,7 +5878,7 @@ msgstr "টà§à¦¯à¦¾à¦¬ ২"
msgid "Tab 3"
msgstr "টà§à¦¯à¦¾à¦¬ ৩"
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr "ধরণ:"
@@ -5410,12 +5900,27 @@ msgid "Color"
msgstr "রঙ"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤à¦¸à¦®à§‚হ মà§à¦›à§‡ ফেলà§à¦¨"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr "TileMap আà¦à¦•à§à¦¨"
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "পà§à¦°à¦¤à¦¿à¦²à¦¿à¦ªà¦¿"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "রৈখিক/লিনিয়ার"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Bucket Fill"
+msgstr "বাকেটà§â€Œ"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5450,10 +5955,6 @@ msgid "Pick Tile"
msgstr "টাইল পছনà§à¦¦ করà§à¦¨"
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr "নিরà§à¦¬à¦¾à¦šà¦¨ করà§à¦¨"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr "০ ডিগà§à¦°à¦¿ ঘোরানà§"
@@ -5517,7 +6018,7 @@ msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ ফাইলসমূহ অপসারণ
msgid "Presets"
msgstr "পà§à¦°à¦¿à¦¸à§‡à¦Ÿ.."
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "সংযোগ.."
@@ -5575,6 +6076,24 @@ msgid "Make Patch"
msgstr "উদà§à¦¦à§‡à¦¶à§à¦¯à¦¿à¦¤ পথ:"
#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "গঠনবিনà§à¦¯à¦¾à¦¸"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "মেথডের তালিকা:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr "à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ PCK/Zip"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5615,10 +6134,6 @@ msgid "The following files failed extraction from package:"
msgstr "পà§à¦¯à¦¾à¦•à§‡à¦œ হতে নীমà§à¦¨à§‹à¦•à§à¦¤ ফাইলসমূহ à¦à¦•à§à¦¸à¦Ÿà§à¦°à¦¾à¦•à§à¦Ÿ করা অসফল হয়েছে:"
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr "পà§à¦¯à¦¾à¦•à§‡à¦œ ইনà§à¦¸à¦Ÿà¦² সফল হয়েছে!"
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "বিদà§à¦¯à¦®à¦¾à¦¨ পà§à¦°à¦•à¦²à§à¦ª ইমà§à¦ªà§‹à¦°à§à¦Ÿ করà§à¦¨"
@@ -5663,6 +6178,23 @@ msgid "Are you sure to open more than one project?"
msgstr "à¦à¦•à¦§à¦¿à¦• পà§à¦°à¦•à¦²à§à¦ª খোলায় আপনি সà§à¦¨à¦¿à¦¶à§à¦šà¦¿à¦¤?"
#: 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 ""
+"কোনো মà§à¦–à§à¦¯ দৃশà§à¦¯ নিরà§à¦§à¦¾à¦°à¦£ করা হয়নি, নিরà§à¦§à¦¾à¦°à¦£ করবেন?\n"
+"আপনি পরবরà§à¦¤à¦¿à¦¤à§‡ তা 'অà§à¦¯à¦¾à¦ªà§à¦²à¦¿à¦•à§‡à¦¶à¦¨ (application)' বিভাগের \\\"পà§à¦°à¦•à¦²à§à¦ªà§‡à¦° সেটিংস "
+"(Project Settings)\\\"-ঠপরিবরà§à¦¤à¦¨ করতে পারবেন।"
+
+#: 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 "à¦à¦•à¦§à¦¿à¦• পà§à¦°à¦•à¦²à§à¦ª চালানোয় আপনি সà§à¦¨à¦¿à¦¶à§à¦šà¦¿à¦¤?"
@@ -5679,10 +6211,6 @@ msgstr ""
"সà§à¦¨à¦¿à¦¶à§à¦šà¦¿à¦¤?"
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr "পà§à¦°à¦•à¦²à§à¦ª মà§à¦¯à¦¾à¦¨à§‡à¦œà¦¾à¦°"
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr "পà§à¦°à¦•à¦²à§à¦ªà§‡à¦° তালিকা"
@@ -5711,258 +6239,292 @@ msgstr "বসà§à¦¤à§ অপসারণ করà§à¦¨"
msgid "Exit"
msgstr "পà§à¦°à¦¸à§à¦¥à¦¾à¦¨ করà§à¦¨"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "সংযোগ.."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "কী/চাবি "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr "জয়সà§à¦Ÿà¦¿à¦• বোতাম"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr "জয়সà§à¦Ÿà¦¿à¦• অকà§à¦·"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr "মাউসের বোতাম"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr "অকারà§à¦¯à¦•à¦° অà§à¦¯à¦¾à¦•à¦¶à¦¨ ('/' বা ':' ছাড়া কিছà§à¦‡ যাবে না)।"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr "'%s' অà§à¦¯à¦¾à¦•à¦¶à¦¨ ইতিমধà§à¦¯à§‡à¦‡ বিদà§à¦¯à¦®à¦¾à¦¨!"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr "ইনপà§à¦Ÿ অà§à¦¯à¦¾à¦•à¦¶à¦¨ ইভেনà§à¦Ÿ পà§à¦¨à¦ƒà¦¨à¦¾à¦®à¦•à¦°à¦£ করà§à¦¨"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr "ইনপà§à¦Ÿ অà§à¦¯à¦¾à¦•à¦¶à¦¨ ইভেনà§à¦Ÿ যোগ করà§à¦¨"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr "কনà§à¦Ÿà§à¦°à§‹à¦²+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "যেকোনো কী/চাবি চাপà§à¦¨.."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr "মাউসের বোতাম ইনà§à¦¡à§‡à¦•à§à¦¸:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr "বাম বোতাম"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr "ডান বোতাম"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr "মধà§à¦¯ বোতাম"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr "চাকা উপরে তোলার বোতাম"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr "চাকা নিচে নামানোর বোতাম"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr "বোতাম ৬"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr "বোতাম ৭"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr "বোতাম ৮"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr "বোতাম ৯"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Axis Index:"
msgstr "জয়সà§à¦Ÿà¦¿à¦• অকà§à¦· ইনà§à¦¡à§‡à¦•à§à¦¸:"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "অকà§à¦·"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Button Index:"
msgstr "জয়সà§à¦Ÿà¦¿à¦• বোতাম ইনà§à¦¡à§‡à¦•à§à¦¸:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr "ইনপà§à¦Ÿ অà§à¦¯à¦¾à¦•à¦¶à¦¨ যোগ করà§à¦¨"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr "ইনপà§à¦Ÿ অà§à¦¯à¦¾à¦•à¦¶à¦¨ ইভেনà§à¦Ÿ মà§à¦›à§‡ ফেলà§à¦¨"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Add Event"
msgstr "খালি বসà§à¦¤à§ যোগ করà§à¦¨"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "ডিভাইস/যনà§à¦¤à§à¦°"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "বাটন/বোতাম"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "বাম বোতাম/বাটন।"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "ডান বোতাম/বাটন।"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "মাঠবোতাম/বাটন।"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "মাউসের চাকা উপরের দিকে চকà§à¦•à¦°à¥¤"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "মাউসের চাকা নিচের দিকে চকà§à¦•à¦°à¥¤"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "গেটার (Getter) à¦à¦° বৈশিষà§à¦Ÿà§à¦¯à§‡ যà§à¦•à§à¦¤ করà§à¦¨"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "No property '"
+msgstr "পà§à¦°à¦ªà¦¾à¦°à§à¦Ÿà¦¿:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "সেটিংস"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "ইনপà§à¦Ÿ অপসারণ করà§à¦¨"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "সংরকà§à¦·à¦£à§‡ সমসà§à¦¯à¦¾ হয়েছে।"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "সেটিংস সংরকà§à¦·à¦£ সফল হয়েছে।"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr "অনà§à¦¬à¦¾à¦¦ সংযোগ করà§à¦¨"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "অনà§à¦¬à¦¾à¦¦ অপসারণ করà§à¦¨"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr "পà§à¦¨à¦ƒ-চিতà§à¦°à¦¾à¦™à§à¦•à¦¿à¦¤ পথ যোগ করà§à¦¨"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr "রিসোরà§à¦¸ পà§à¦¨à¦ƒ-চিতà§à¦°à¦¾à¦™à§à¦•à¦¿à¦¤ করে যà§à¦•à§à¦¤ করà§à¦¨"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr "রিসোরà§à¦¸ পà§à¦¨à¦ƒ-নকশার ভাষা পরিবরà§à¦¤à¦¨ করà§à¦¨"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr "রিসোরà§à¦¸à§‡à¦° পà§à¦¨à¦ƒ-নকশা অপসারণ করà§à¦¨"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr "রিসোরà§à¦¸à§‡à¦° পà§à¦¨à¦ƒ-নকশার সিদà§à¦§à¦¾à¦¨à§à¦¤ অপসারণ করà§à¦¨"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "পà§à¦°à¦•à¦²à§à¦ªà§‡à¦° সেটিংস (engine.cfg)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr "জেনেরাল"
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr "পà§à¦°à¦ªà¦¾à¦°à§à¦Ÿà¦¿:"
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr "ডিলিট/অপসারণ"
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr "পà§à¦²à¦¾à¦Ÿà¦«à¦°à§à¦®à§‡ পà§à¦°à¦¤à¦¿à¦²à¦¿à¦ªà¦¿ করà§à¦¨.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
+msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr "ইনপà§à¦Ÿ মà§à¦¯à¦¾à¦ª/নকশা"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr "অà§à¦¯à¦¾à¦•à¦¶à¦¨:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr "ডিভাইস:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr "ইনà§à¦¡à§‡à¦•à§à¦¸:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr "সà§à¦¥à¦¾à¦¨à§€à¦¯à¦¼à¦•à¦°à¦£"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr "অনà§à¦¬à¦¾à¦¦à¦¸à¦®à§‚হ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr "অনà§à¦¬à¦¾à¦¦à¦¸à¦®à§‚হ:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr "পà§à¦¨à¦ƒà¦¨à¦•à¦¶à¦¾à¦¸à¦®à§‚হ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr "রিসোরà§à¦¸à¦¸à¦®à§‚হ:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr "ঘটনাসà§à¦¥à¦² দà§à¦¬à¦¾à¦°à¦¾ পà§à¦¨à¦ƒà¦¨à¦•à¦¶à¦¾:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr "ঘটনাসà§à¦¥à¦²"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "সà§à¦¬à§Ÿà¦‚কà§à¦°à¦¿à§Ÿ-লোড"
@@ -6004,6 +6566,11 @@ msgid "Assign"
msgstr "নিযà§à¦•à§à¦¤"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "à¦à¦•à¦Ÿà¦¿ নোড নিরà§à¦¬à¦¾à¦šà¦¨ করà§à¦¨"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr "নতà§à¦¨ সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿ"
@@ -6018,6 +6585,11 @@ msgstr "ফাইল লোডে সমসà§à¦¯à¦¾: রিসোরà§à¦¸ নà
#: editor/property_editor.cpp
#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "ইমà§à¦ªà§‹à¦°à§à¦Ÿà§‡à¦° জনà§à¦¯ নোড(সমূহ) নিরà§à¦¬à¦¾à¦šà¦¨ করà§à¦¨"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "Pick a Node"
msgstr "à¦à¦•à¦Ÿà¦¿ নোড নিরà§à¦¬à¦¾à¦šà¦¨ করà§à¦¨"
@@ -6113,6 +6685,11 @@ msgstr "পà§à¦°à¦§à¦¾à¦¨ দৃশà§à¦¯à§‡à¦° মান/আরà§à¦—à§à¦®à§‡
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 "দৃশà§à¦¯à¦¸à¦®à§‚হ ইনà§à¦¸à¦Ÿà§à¦¯à¦¾à¦¨à§à¦¸ করার মতো কোনো অভিভাবক নেই।"
@@ -6158,10 +6735,6 @@ msgid "Delete Node(s)?"
msgstr "নোড(সমূহ) অপসারণ করবেন?"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "দৃশà§à¦¯ ছাড়া à¦à¦Ÿà¦¿ করা সমà§à¦­à¦¬ হবে না।"
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6174,6 +6747,18 @@ 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 "অরà§à¦¥à¦ªà§‚রà§à¦¨!"
@@ -6219,6 +6804,14 @@ msgid "Edit Connections"
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 "নোড(সমূহ) অপসারণ করà§à¦¨"
@@ -6272,6 +6865,11 @@ msgstr ""
"উতà§à¦¤à¦°à¦¾à¦§à¦¿à¦•à¦¾à¦°à§€ দৃশà§à¦¯ তৈরি করে।"
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "ফিলà§à¦Ÿà¦¾à¦°à¦¸à¦®à§‚হ"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr "à¦à¦•à¦Ÿà¦¿ নতà§à¦¨ বা বিদà§à¦¯à¦®à¦¾à¦¨ সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿ নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ নোডে সংযà§à¦•à§à¦¤ করà§à¦¨à¥¤"
@@ -6279,6 +6877,14 @@ msgstr "à¦à¦•à¦Ÿà¦¿ নতà§à¦¨ বা বিদà§à¦¯à¦®à¦¾à¦¨ সà§à¦•à§à¦
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 "Spatial দৃশà§à¦¯à¦®à¦¾à¦¨à¦¤à¦¾ টগল করà§à¦¨"
@@ -6310,11 +6916,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "ডিবাগের সিদà§à¦§à¦¾à¦¨à§à¦¤à¦¸à¦®à§‚হ"
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr "ইনà§à¦¸à¦Ÿà§à¦¯à¦¾à¦¨à§à¦¸:"
@@ -6353,32 +6954,8 @@ msgid "Scene Tree (Nodes):"
msgstr "দৃশà§à¦¯à§‡à¦° শাখা (নোডসমূহ):"
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr "সমà§à¦ªà¦¾à¦¦à¦¨à¦¯à§‹à¦—à§à¦¯ অংশীদারীসমূহ"
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr "পà§à¦²à§‡à¦¸à¦¹à§‹à¦²à§à¦¡à¦¾à¦° হিসেবে লোড করà§à¦¨"
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr "ইনà§à¦¸à¦Ÿà§à¦¯à¦¾à¦¨à§à¦¸ করা বাতিল করà§à¦¨"
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr "à¦à¦¡à¦¿à¦Ÿà¦°à§‡ খà§à¦²à§à¦¨"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr "উতà§à¦¤à¦°à¦¾à¦§à¦¿à¦•à¦¾à¦°à¦¤à§à¦¬ পরিসà§à¦•à¦¾à¦° করà§à¦¨"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr "উতà§à¦¤à¦°à¦¾à¦§à¦¿à¦•à¦¾à¦°à¦¤à§à¦¬ পরিসà§à¦•à¦¾à¦° করবেন? (ফেরৎ পাবেন না!)"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr "পরিসà§à¦•à¦¾à¦° করà§à¦¨!"
+msgid "Node Configuration Warning!"
+msgstr ""
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -6386,6 +6963,11 @@ msgstr "à¦à¦•à¦Ÿà¦¿ নোড নিরà§à¦¬à¦¾à¦šà¦¨ করà§à¦¨"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "ছবি লোডে সমসà§à¦¯à¦¾ হয়েছে:"
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "ফাইলসিসà§à¦Ÿà§‡à¦®à§‡ সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿ তৈরি করা সমà§à¦­à¦¬ হয়নি।"
@@ -6394,6 +6976,10 @@ msgid "Error loading script from %s"
msgstr "%s হতে সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿ তà§à¦²à¦¤à§‡/লোডে সমসà§à¦¯à¦¾ হয়েছে"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "না/আ"
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "পথটি খালি"
@@ -6437,10 +7023,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr "না/আ"
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6611,6 +7193,10 @@ msgid "Change Light Radius"
msgstr "Light à¦à¦° বà§à¦¯à¦¾à¦¸à¦¾à¦°à§à¦§ পরিবরà§à¦¤à¦¨ করà§à¦¨"
#: editor/spatial_editor_gizmos.cpp
+msgid "Change AudioStreamPlayer3D Emission Angle"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
msgstr "Camera à¦à¦° ভিউ (FOV) পরিবরà§à¦¤à¦¨ করà§à¦¨"
@@ -6692,6 +7278,137 @@ msgstr "ভà§à¦² dictionary ফরমà§à¦¯à¦¾à¦Ÿ (@path-ঠভà§à¦² সà§à¦
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "ভà§à¦² dictionary ফরমà§à¦¯à¦¾à¦Ÿ (ভà§à¦² subclasses)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ সমূহ অপসারণ করà§à¦¨"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ সমূহ অনà§à¦²à¦¿à¦ªà¦¿ করà§à¦¨"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "কনà§à¦Ÿà§à¦°à§‹à¦² বোতাম: ঘূরà§à¦£à¦¨"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "কনà§à¦Ÿà§à¦°à§‹à¦² বোতাম: ঘূরà§à¦£à¦¨"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Create Area"
+msgstr "নতà§à¦¨ তৈরি করà§à¦¨"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "নতà§à¦¨ পà§à¦°à¦•à¦²à§à¦ª তৈরি করà§à¦¨"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Area"
+msgstr "TileMap মà§à¦›à§‡ ফেলà§à¦¨"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "শà§à¦§à§à¦®à¦¾à¦¤à§à¦° নিরà§à¦¬à¦¾à¦šà¦¿à¦¤à¦¸à¦®à§‚হ"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "শà§à¦§à§à¦®à¦¾à¦¤à§à¦° নিরà§à¦¬à¦¾à¦šà¦¿à¦¤à¦¸à¦®à§‚হ"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "সà§à¦¨à§à¦¯à¦¾à¦ª সেটিংস"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "ইনà§à¦¸à¦Ÿà§à¦¯à¦¾à¦¨à§à¦¸:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "ফাইল"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6729,6 +7446,31 @@ msgid "Stack overflow with stack depth: "
msgstr "সà§à¦Ÿà§à¦¯à¦¾à¦•/তাক-à¦à¦° গভীরতায় সà§à¦Ÿà§à¦¯à¦¾à¦•/তাক অধিপà§à¦°à¦¬à¦¾à¦¹à¦¿à¦¤/পà§à¦²à¦¾à¦¬à¦¿à¦¤ হয়েছে: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "সংকেত/সিগনà§à¦¯à¦¾à¦²-à¦à¦° মান/আরà§à¦—à§à¦®à§‡à¦¨à§à¦Ÿ-সমূহ সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "শà§à¦°à§‡à¦£à§€à¦¬à¦¿à¦¨à§à¦¯à¦¾à¦¸/সারির মানের ধরণ পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "ইনপà§à¦Ÿ নাম পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Default Value"
+msgstr "পà§à¦°à¦¾à¦¥à¦®à¦¿à¦• মান পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "চলক/ভেরিয়েবল সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "ফাংশনগà§à¦²à¦¿:"
@@ -6769,26 +7511,6 @@ msgid "Add Signal"
msgstr "সংকেত/সিগনà§à¦¯à¦¾à¦² সংযোজন করà§à¦¨"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "ফাংশন (Function) অপসারণ করà§à¦¨"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "চলক/ভেরিয়েবল অপসারণ করà§à¦¨"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "চলক/ভেরিয়েবল সমà§à¦ªà¦¾à¦¦à¦¨:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "সংকেত (Signal) অপসারণ করà§à¦¨"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "সংকেত/সিগনà§à¦¯à¦¾à¦² সমà§à¦ªà¦¾à¦¦à¦¨:"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
msgstr "অভিবà§à¦¯à¦•à§à¦¤à¦¿ (Expression) পরিবরà§à¦¤à¦¨ করà§à¦¨"
@@ -6797,6 +7519,16 @@ msgid "Add Node"
msgstr "নোড সংযোজন করà§à¦¨"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ চাবিসমূহ অপসারণ করà§à¦¨"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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 ""
"গেটার (Getter) তৈরি করতে/নামাতে মেটা কী (Meta) চেপে রাখà§à¦¨à¥¤ জেনেরিক সিগনেচার "
@@ -6844,6 +7576,26 @@ msgid "Add Setter Property"
msgstr "সেটার (Setter) à¦à¦° বৈশিষà§à¦Ÿà§à¦¯à§‡ যà§à¦•à§à¦¤ করà§à¦¨"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "ধরণ পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "নোড(সমূহ) অপসারণ করà§à¦¨"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Shader Graph Node অপসারণ করà§à¦¨"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "নোডের সাথে সংযà§à¦•à§à¦¤ করà§à¦¨:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "শরà§à¦¤ (Condition)"
@@ -6872,6 +7624,56 @@ msgid "Get"
msgstr "মান পান (Get)"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "ইনপà§à¦Ÿ নাম পরিবরà§à¦¤à¦¨ করà§à¦¨"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "'..' তে পরিচালনা করা সমà§à¦­à¦¬ নয়"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "রিসোরà§à¦¸à§‡à¦° কà§à¦²à§€à¦ªà¦¬à§‹à¦°à§à¦¡ খালি!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "নোড-সমূহ পà§à¦°à¦¤à¦¿à¦²à§‡à¦ªà¦¨/পেসà§à¦Ÿ করà§à¦¨"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "ফাংশন (Function) অপসারণ করà§à¦¨"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "চলক/ভেরিয়েবল সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "চলক/ভেরিয়েবল অপসারণ করà§à¦¨"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "সংকেত/সিগনà§à¦¯à¦¾à¦² সমà§à¦ªà¦¾à¦¦à¦¨:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "সংকেত (Signal) অপসারণ করà§à¦¨"
+
+#: 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 "তলের ধরণ (Base Type):"
@@ -6892,10 +7694,6 @@ msgid "Edit Variable:"
msgstr "চলক/ভেরিয়েবল সমà§à¦ªà¦¾à¦¦à¦¨ করà§à¦¨:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "পরিবরà§à¦¤à¦¨ করà§à¦¨"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "নিরà§à¦¬à¦¾à¦šà¦¿à¦¤ সমূহ অপসারণ করà§à¦¨"
@@ -6971,14 +7769,6 @@ msgstr ""
"_step() হতে অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ মান ফেরৎ à¦à¦¸à§‡à¦›à§‡, মান অবশà§à¦¯à¦‡ পূরà§à¦£à¦¸à¦‚খà§à¦¯à¦¾ (integer) (কà§à¦°à¦®à¦¿à¦•), "
"অথবা শবà§à¦¦à¦®à¦¾à¦²à¦¾/বাকà§à¦¯ (string) (ভà§à¦²/সমসà§à¦¯à¦¾) হতে হবে।"
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "à¦à¦‡à¦®à¦¾à¦¤à§à¦° চাপিত"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "à¦à¦‡à¦®à¦¾à¦¤à§à¦° অবà§à¦¯à¦¾à¦¹à¦¿à¦¤/মà§à¦•à§à¦¤"
-
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Run in Browser"
@@ -7003,82 +7793,6 @@ msgstr "টাইলটি খà§à¦à¦œà§‡ পাওয়া যায়নি:"
msgid "Could not open template for export:\n"
msgstr "ফোলà§à¦¡à¦¾à¦° তৈরী করা সমà§à¦­à¦¬ হয়নি।"
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-"সারà§à¦Ÿà¦¿à¦«à¦¿à¦•à§‡à¦Ÿ ফাইলটি পড়া সমà§à¦­à¦¬ হচà§à¦›à§‡ না। ফাইলের পথ à¦à¦¬à¦‚ পাসওয়ারà§à¦¡ দà§à¦Ÿà§‹à¦‡ কি সঠিক দেয়া "
-"হয়েছে?"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "সà§à¦¬à¦¾à¦•à§à¦·à¦°à¦¿à¦¤ বসà§à¦¤à§ (signature object) তৈরিতে সমসà§à¦¯à¦¾ হয়েছে।"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr "পà§à¦¯à¦¾à¦•à§‡à¦œà§‡à¦° সà§à¦¬à¦¾à¦•à§à¦·à¦° (package signature) তৈরিতে সমসà§à¦¯à¦¾ হয়েছে।"
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ à¦à¦° জনà§à¦¯ পà§à¦°à§Ÿà§‹à¦œà¦£à§€à§Ÿ টেমপà§à¦²à§‡à¦Ÿ পাওয়া যায়নি।\n"
-"à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ টেমপà§à¦²à§‡à¦Ÿ-সমূহ ডাউনলোড করে ইনà§à¦¸à¦Ÿà¦² করà§à¦¨à¥¤"
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr "সà§à¦¬à¦¨à¦¿à¦°à§à¦®à¦¿à¦¤ ডিবাগ (debug) পà§à¦¯à¦¾à¦•à§‡à¦œ খà§à¦à¦œà§‡ পাওয়া যায়নি।"
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr "সà§à¦¬à¦¨à¦¿à¦°à§à¦®à¦¿à¦¤ রিলিস (release) পà§à¦¯à¦¾à¦•à§‡à¦œ খà§à¦à¦œà§‡ পাওয়া যায়নি।"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr "à¦à¦•à¦• (অননà§à¦¯) নামটি অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯à¥¤"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr "পণà§à¦¯à§‡à¦° অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ GUID।"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr "পà§à¦°à¦•à¦¾à¦¶à¦•à§‡à¦° অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ GUID।"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "পটভূমির (background) অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ রঙ।"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "সà§à¦Ÿà§‹à¦° লোগোর (Store Logo) ছবির অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ মাতà§à¦°à¦¾ (৫০x৫০ হতে হবে)।"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr "৪৪x৪৪ বরà§à¦— লোগোর (logo) ছবির অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ মাতà§à¦°à¦¾ (৪৪x৪৪ হতে হবে)।"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr "৭১x৭১ বরà§à¦— লোগোর (logo) ছবির অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ মাতà§à¦°à¦¾ (৭১x৭১ হতে হবে)।"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr "১৫০x১৫০ বরà§à¦— লোগোর (logo) ছবির অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ মাতà§à¦°à¦¾ (১৫০x১৫০ হতে হবে)।"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr "৩১০x৩১০ বরà§à¦— লোগোর (logo) ছবির অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ মাতà§à¦°à¦¾ (৩১০x৩১০ হতে হবে)।"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr "৩১০x১৫০ পà§à¦°à¦¶à¦¸à§à¦¤ লোগোর (logo) ছবির অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ মাতà§à¦°à¦¾ (৩১০x১৫০ হতে হবে)।"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr "সà§à¦ªà§à¦²à§à¦¯à¦¾à¦¶ পরà§à¦¦à¦¾à¦° (splash screen) ছবির অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ মাতà§à¦°à¦¾ (৬২০x৩০০ হতে হবে)।"
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7176,6 +7890,13 @@ msgstr ""
msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr "PathFollow2D à¦à¦•à¦®à¦¾à¦¤à§à¦° Path2D à¦à¦° অংশ হিসেবে নিরà§à¦§à¦¾à¦°à¦¨ করালেই কাজ করে।"
+#: 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 "Path à¦à¦° দিক অবশà§à¦¯à¦‡ à¦à¦•à¦Ÿà¦¿ কারà§à¦¯à¦•à¦° Node2D à¦à¦° দিকে নিরà§à¦¦à§‡à¦¶ করাতে হবে।"
@@ -7204,23 +7925,33 @@ msgstr ""
"VisibilityEnable2D সরà§à¦¬à§‹à¦¤à§à¦¤à¦® কারà§à¦¯à¦•à¦° হয় যখন সমà§à¦ªà¦¾à¦¦à¦¿à¦¤ দৃশà§à¦¯ মূল দৃশà§à¦¯ হিসেবে সরাসরি "
"বà§à¦¯à¦¬à¦¹à§ƒà¦¤ হয়।"
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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 ""
-"CollisionShape শà§à¦§à§à¦®à¦¾à¦¤à§à¦° CollisionObject হতে সৃষà§à¦Ÿ নোডের সংঘরà§à¦·à§‡à¦° আকৃতি পà§à¦°à¦¦à¦¾à¦¨ করে। "
-"Area, StaticBody, RigidBody, KinematicBody, ইতà§à¦¯à¦¾à¦¦à¦¿à¦•à§‡ আকার দিতে অনà§à¦—à§à¦°à¦¹ করে তা "
-"শà§à¦§à§à¦®à¦¾à¦¤à§à¦° তাদের অংশ হিসেবে বà§à¦¯à¦¬à¦¹à¦¾à¦° করà§à¦¨à¥¤"
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"সফলà§à¦­à¦¾à¦¬à§‡ কাজ করতে CollisionShape à¦à¦° à¦à¦•à¦Ÿà¦¿ আকৃতি পà§à¦°à§Ÿà§‹à¦œà¦¨à¥¤ অনà§à¦—à§à¦°à¦¹ করে তার জনà§à¦¯ à¦à¦•à¦Ÿà¦¿ "
-"আকৃতি তৈরি করà§à¦¨!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7236,6 +7967,24 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "সংঘরà§à¦·à§‡ ফাà¦à¦•à¦¾/শà§à¦¨à§à¦¯ CollisionPolygon-à¦à¦° কোনো পà§à¦°à¦­à¦¾à¦¬ নেই।"
+#: 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 ""
+"CollisionShape শà§à¦§à§à¦®à¦¾à¦¤à§à¦° CollisionObject হতে সৃষà§à¦Ÿ নোডের সংঘরà§à¦·à§‡à¦° আকৃতি পà§à¦°à¦¦à¦¾à¦¨ করে। "
+"Area, StaticBody, RigidBody, KinematicBody, ইতà§à¦¯à¦¾à¦¦à¦¿à¦•à§‡ আকার দিতে অনà§à¦—à§à¦°à¦¹ করে তা "
+"শà§à¦§à§à¦®à¦¾à¦¤à§à¦° তাদের অংশ হিসেবে বà§à¦¯à¦¬à¦¹à¦¾à¦° করà§à¦¨à¥¤"
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"সফলà§à¦­à¦¾à¦¬à§‡ কাজ করতে CollisionShape à¦à¦° à¦à¦•à¦Ÿà¦¿ আকৃতি পà§à¦°à§Ÿà§‹à¦œà¦¨à¥¤ অনà§à¦—à§à¦°à¦¹ করে তার জনà§à¦¯ à¦à¦•à¦Ÿà¦¿ "
+"আকৃতি তৈরি করà§à¦¨!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7255,6 +8004,13 @@ 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 "Path à¦à¦° দিক অবশà§à¦¯à¦‡ à¦à¦•à¦Ÿà¦¿ কারà§à¦¯à¦•à¦° Spatial নোডের à¦à¦° দিকে নিরà§à¦¦à§‡à¦¶ করাতে হবে।"
@@ -7276,8 +8032,8 @@ msgstr ""
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
-msgstr "চালানোর মোড:"
+msgid "Raw Mode"
+msgstr "পà§à¦¯à¦¾à¦¨ মোড"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
@@ -7291,22 +8047,6 @@ msgstr "সতরà§à¦•à¦¤à¦¾!"
msgid "Please Confirm..."
msgstr "অনà§à¦—à§à¦°à¦¹ করে নিশà§à¦šà¦¿à¦¤ করà§à¦¨..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "à¦à¦•à¦Ÿà¦¿ ফাইল খà§à¦²à§à¦¨"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "à¦à¦• বা à¦à¦•à¦¾à¦§à¦¿à¦• ফাইল খà§à¦²à§à¦¨"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "পথ/ডিরেকà§à¦Ÿà¦°à¦¿ খà§à¦²à§à¦¨"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "ফাইল বা পথ/ডিরেকà§à¦Ÿà¦°à¦¿ খà§à¦²à§à¦¨"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7328,7 +8068,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7346,6 +8086,99 @@ msgstr ""
"আকার ধারণ করতে পারে। অনà§à¦¯à¦¥à¦¾à§Ÿ, à¦à¦Ÿà¦¿à¦•à§‡ à¦à¦•à¦Ÿà¦¿ RenderTarget করà§à¦¨ à¦à¦¬à¦‚ à¦à¦° অভà§à¦¯à¦¨à§à¦¤à¦°à§€à¦£ "
"দৃশà§à¦¯à¦¾à¦¬à¦²à¦¿à¦•à§‡ (texture) দৃশà§à¦¯à¦®à¦¾à¦¨ করতে কোনো নোডে হসà§à¦¤à¦¾à¦¨à§à¦¤à¦° করà§à¦¨à¥¤"
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "দৃশà§à¦¯ বনà§à¦§ করবেন? (অসংরকà§à¦·à¦¿à¦¤ পরিবরà§à¦¤à¦¨à¦¸à¦®à§‚হ হারিয়ে যাবে)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "পà§à¦°à¦•à¦²à§à¦ª মà§à¦¯à¦¾à¦¨à§‡à¦œà¦¾à¦° (Project Manager) খà§à¦²à¦¬à§‡à¦¨? \n"
+#~ "(অ-সংরকà§à¦·à¦¿à¦¤ পরিবরà§à¦¤à¦¨-সমূহ হারিয়ে যাবে)"
+
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "বনà§à¦§ করে পূরà§à¦¬à§‡à¦° দৃশà§à¦¯à§‡ যান"
+
+#~ msgid "Expand to Parent"
+#~ msgstr "ধারক/বাহক পরà§à¦¯à¦¨à§à¦¤ বিসà§à¦¤à§ƒà¦¤ করà§à¦¨"
+
+#~ msgid "Del"
+#~ msgstr "ডিলিট/অপসারণ"
+
+#~ msgid "Copy To Platform.."
+#~ msgstr "পà§à¦²à¦¾à¦Ÿà¦«à¦°à§à¦®à§‡ পà§à¦°à¦¤à¦¿à¦²à¦¿à¦ªà¦¿ করà§à¦¨.."
+
+#~ msgid "just pressed"
+#~ msgstr "à¦à¦‡à¦®à¦¾à¦¤à§à¦° চাপিত"
+
+#~ msgid "just released"
+#~ msgstr "à¦à¦‡à¦®à¦¾à¦¤à§à¦° অবà§à¦¯à¦¾à¦¹à¦¿à¦¤/মà§à¦•à§à¦¤"
+
+#, fuzzy
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr ""
+#~ "সারà§à¦Ÿà¦¿à¦«à¦¿à¦•à§‡à¦Ÿ ফাইলটি পড়া সমà§à¦­à¦¬ হচà§à¦›à§‡ না। ফাইলের পথ à¦à¦¬à¦‚ পাসওয়ারà§à¦¡ দà§à¦Ÿà§‹à¦‡ কি সঠিক "
+#~ "দেয়া হয়েছে?"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "সà§à¦¬à¦¾à¦•à§à¦·à¦°à¦¿à¦¤ বসà§à¦¤à§ (signature object) তৈরিতে সমসà§à¦¯à¦¾ হয়েছে।"
+
+#~ msgid "Error creating the package signature."
+#~ msgstr "পà§à¦¯à¦¾à¦•à§‡à¦œà§‡à¦° সà§à¦¬à¦¾à¦•à§à¦·à¦° (package signature) তৈরিতে সমসà§à¦¯à¦¾ হয়েছে।"
+
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ à¦à¦° জনà§à¦¯ পà§à¦°à§Ÿà§‹à¦œà¦£à§€à§Ÿ টেমপà§à¦²à§‡à¦Ÿ পাওয়া যায়নি।\n"
+#~ "à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ টেমপà§à¦²à§‡à¦Ÿ-সমূহ ডাউনলোড করে ইনà§à¦¸à¦Ÿà¦² করà§à¦¨à¥¤"
+
+#~ msgid "Custom debug package not found."
+#~ msgstr "সà§à¦¬à¦¨à¦¿à¦°à§à¦®à¦¿à¦¤ ডিবাগ (debug) পà§à¦¯à¦¾à¦•à§‡à¦œ খà§à¦à¦œà§‡ পাওয়া যায়নি।"
+
+#~ msgid "Custom release package not found."
+#~ msgstr "সà§à¦¬à¦¨à¦¿à¦°à§à¦®à¦¿à¦¤ রিলিস (release) পà§à¦¯à¦¾à¦•à§‡à¦œ খà§à¦à¦œà§‡ পাওয়া যায়নি।"
+
+#~ msgid "Invalid unique name."
+#~ msgstr "à¦à¦•à¦• (অননà§à¦¯) নামটি অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯à¥¤"
+
+#~ msgid "Invalid product GUID."
+#~ msgstr "পণà§à¦¯à§‡à¦° অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ GUID।"
+
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "পà§à¦°à¦•à¦¾à¦¶à¦•à§‡à¦° অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ GUID।"
+
+#~ msgid "Invalid background color."
+#~ msgstr "পটভূমির (background) অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ রঙ।"
+
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr "সà§à¦Ÿà§‹à¦° লোগোর (Store Logo) ছবির অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ মাতà§à¦°à¦¾ (৫০x৫০ হতে হবে)।"
+
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr "৪৪x৪৪ বরà§à¦— লোগোর (logo) ছবির অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ মাতà§à¦°à¦¾ (৪৪x৪৪ হতে হবে)।"
+
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr "৭১x৭১ বরà§à¦— লোগোর (logo) ছবির অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ মাতà§à¦°à¦¾ (৭১x৭১ হতে হবে)।"
+
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr "১৫০x১৫০ বরà§à¦— লোগোর (logo) ছবির অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ মাতà§à¦°à¦¾ (১৫০x১৫০ হতে হবে)।"
+
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr "৩১০x৩১০ বরà§à¦— লোগোর (logo) ছবির অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ মাতà§à¦°à¦¾ (৩১০x৩১০ হতে হবে)।"
+
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr "৩১০x১৫০ পà§à¦°à¦¶à¦¸à§à¦¤ লোগোর (logo) ছবির অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ মাতà§à¦°à¦¾ (৩১০x১৫০ হতে হবে)।"
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr ""
+#~ "সà§à¦ªà§à¦²à§à¦¯à¦¾à¦¶ পরà§à¦¦à¦¾à¦° (splash screen) ছবির অগà§à¦°à¦¹à¦¨à¦¯à§‹à¦—à§à¦¯ মাতà§à¦°à¦¾ (৬২০x৩০০ হতে হবে)।"
+
+#, fuzzy
+#~ msgid "RAW Mode"
+#~ msgstr "চালানোর মোড:"
+
#~ msgid "Node From Scene"
#~ msgstr "দৃশà§à¦¯ হতে নোড"
@@ -7429,9 +8262,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "%d টি সংঘটন পà§à¦°à¦¤à¦¿à¦¸à§à¦¥à¦¾à¦ªà¦¿à¦¤ হয়েছে।"
-#~ msgid "Please save the scene first."
-#~ msgstr "পà§à¦°à¦¥à¦®à§‡ অনà§à¦—à§à¦°à¦¹ করে দৃশà§à¦¯à¦Ÿà¦¿ সংরকà§à¦·à¦£ করà§à¦¨à¥¤"
-
#~ msgid "Save Translatable Strings"
#~ msgstr "অনà§à¦¬à¦¾à¦¦-সমà§à¦­à¦¬ শবà§à¦¦à¦®à¦¾à¦²à¦¾/বাকà§à¦¯-সমূহ সংরকà§à¦·à¦£ করà§à¦¨"
@@ -7644,9 +8474,6 @@ msgstr ""
#~ msgid "Script Encryption Key (256-bits as hex):"
#~ msgstr "সà§à¦•à§à¦°à¦¿à¦ªà§à¦Ÿ à¦à¦¨à¦•à§à¦°à¦¿à¦ªà¦¶à¦¨ কী/চাবি (২৫৬-বিটস হেকà§à¦¸):"
-#~ msgid "Export PCK/Zip"
-#~ msgstr "à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ PCK/Zip"
-
#~ msgid "Export Project PCK"
#~ msgstr "পà§à¦°à¦•à¦²à§à¦ªà§‡à¦° PCK à¦à¦•à§à¦¸à¦ªà§‹à¦°à§à¦Ÿ করà§à¦¨"
diff --git a/editor/translations/ca.po b/editor/translations/ca.po
index 7273e877a9..4b126e3b16 100644
--- a/editor/translations/ca.po
+++ b/editor/translations/ca.po
@@ -147,7 +147,8 @@ msgstr "Vés al Pas Següent"
msgid "Goto Prev Step"
msgstr "Vés al Pas Previ"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "Lineal"
@@ -382,7 +383,8 @@ msgstr "Fitxer:"
msgid "Description:"
msgstr "Descripció:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -393,9 +395,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Tanca"
@@ -471,7 +473,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -537,17 +539,16 @@ msgid "All"
msgstr "Tot"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "Cerca:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "Cerca"
@@ -563,7 +564,7 @@ msgstr "Cerca"
msgid "Import"
msgstr "Importa"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -575,7 +576,7 @@ msgstr "Ordena:"
msgid "Reverse"
msgstr "Inverteix"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "Categoria:"
@@ -728,14 +729,14 @@ msgstr "Connecta al Node:"
#: 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.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
msgstr "Afegeix"
#: 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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "Treu"
@@ -845,7 +846,7 @@ msgid "Resource"
msgstr "Recurs"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "Camí"
@@ -927,12 +928,190 @@ msgstr "Navegador de Recursos Orfes"
msgid "Delete selected files?"
msgstr "Esborra fitxers seleccionats?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Esborra"
+#: editor/editor_about.cpp
+msgid "Thanks from the Godot community!"
+msgstr "Gràcies de la part de la Comunitat del Godot!"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "Gràcies!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr ""
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "Autor:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "Configuració del Projecte"
+
+#: 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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "Constants:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "Constants:"
+
+#: 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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "Sense Compressió"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+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
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Reanomena AutoCàrrega"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Elimina Seleccionats"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+msgstr "Opcions de Depuració (Debug)"
+
+#: 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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Elimina Seleccionats"
+
+#: 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
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Elimina Disposició (Layout)"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Duplica la Selecció"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "Mou Afegir Clau"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -946,23 +1125,51 @@ 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
+#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"Extensió de fitxer no vàlida.\n"
+"Utilitzeu .fnt."
+
+#: 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/script_create_dialog.cpp
msgid "Load"
msgstr ""
#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Load an existing Bus Layout."
+msgstr "Carrega un recurs des del disc i edita'l."
+
+#: editor/editor_audio_buses.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Save As"
msgstr ""
-#: editor/editor_audio_buses.cpp editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+msgid "Save this Bus Layout to a file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+msgid "Load Default"
msgstr "Predeterminat"
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nom no vàlid."
@@ -1066,6 +1273,11 @@ msgid "Updating scene.."
msgstr "Actualitzant escena.."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "Desa l'escena abans."
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "Tria un Directori"
@@ -1143,6 +1355,22 @@ msgstr "Tots els Fitxers (*)"
msgid "Open"
msgstr "Obre"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Obre un Fitxer"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Obre Fitxer(s)"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Obre un Directori"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Obre un Fitxer o Directori"
+
#: 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
@@ -1269,6 +1497,15 @@ msgid "Signals:"
msgstr "Senyals:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Funcions:"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Constants:"
@@ -1286,7 +1523,8 @@ msgid "Search Text"
msgstr "Cerca Text"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " Sortida:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1336,6 +1574,11 @@ msgid "Creating Thumbnail"
msgstr "Creant Miniatura"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "This operation can't be done without a tree root."
+msgstr "No es pot desfer aquesta acció. Vol revertir igualament?"
+
+#: editor/editor_node.cpp
msgid ""
"Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."
msgstr ""
@@ -1468,12 +1711,13 @@ msgid "Quick Open Script.."
msgstr "Obertura Ràpida d'Scripts..."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "Sí"
+#, fuzzy
+msgid "Save & Close"
+msgstr "Desa un Fitxer"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "Tanca l'Escena? (Es perdran els canvis sense desar)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
@@ -1484,10 +1728,18 @@ msgid "No"
msgstr ""
#: editor/editor_node.cpp
+msgid "Yes"
+msgstr "Sí"
+
+#: editor/editor_node.cpp
msgid "This scene has never been saved. Save before running?"
msgstr ""
"Aquesta Escena no s'ha desat mai encara. Voleu desar-la abans d'executar-la?"
+#: 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 "Exporta Biblioteca de Models"
@@ -1497,12 +1749,8 @@ msgid "Export Tile Set"
msgstr "Exporta el joc de Mosaics (Tiles)"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "Surt"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "Voleu Sortir de l'editor?"
+msgid "This operation can't be done without a selected node."
+msgstr ""
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1525,18 +1773,51 @@ msgid "Quick Run Scene.."
msgstr "Execució Ràpida de l'Escena..."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "Surt"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "Voleu Sortir de l'editor?"
+
+#: editor/editor_node.cpp
+msgid "Open Project Manager?"
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Desa un Fitxer"
+
+#: 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 ""
-"Vol Obrir el Gestor de Projectes?\n"
-"(Es perdran els canvis sense desar)"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "Tria una Escena Principal"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1571,6 +1852,11 @@ msgstr "Desar Disposició (Layout)"
msgid "Delete Layout"
msgstr "Elimina Disposició (Layout)"
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+msgid "Default"
+msgstr "Predeterminat"
+
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
msgstr "Canvia la pestanya d'escena"
@@ -1587,6 +1873,11 @@ msgstr "%d fitxer(s) o directori(s) més"
msgid "Distraction Free Mode"
msgstr "Mode Lliure de Distraccions"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "Mode Lliure de Distraccions"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "Escena"
@@ -1636,10 +1927,6 @@ msgstr "Desa Totes les Escenes"
msgid "Close Scene"
msgstr "Tanca l'Escena"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr "Tanca i Vés a l'Escena anterior"
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "Obre Recent"
@@ -1943,6 +2230,10 @@ msgstr ""
msgid "Output"
msgstr "Sortida"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "ReImporta"
@@ -1952,26 +2243,10 @@ msgid "Update"
msgstr "Actualitza"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "Gràcies de la part de la Comunitat del Godot!"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "Gràcies!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "Importa Plantilles des d'un Fitxer ZIP"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "Exporta Projecte"
@@ -1992,9 +2267,18 @@ msgid "Open & Run a Script"
msgstr "Obre i Executa un Script"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "New Inherited"
+msgstr "Nova Escena heretada..."
+
+#: editor/editor_node.cpp
msgid "Load Errors"
msgstr "Errors de Càrrega"
+#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
+msgid "Select"
+msgstr ""
+
#: editor/editor_node.cpp
#, fuzzy
msgid "Open 2D Editor"
@@ -2100,6 +2384,16 @@ msgstr "Re-Importació"
msgid "Re-Import Changed Resources"
msgstr "ReImporta Recursos Modificats"
+#: 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 "Escriu la lògica en el mètode _run()."
@@ -2245,12 +2539,30 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "Desa i ReImporta"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "Lletra:"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
"Els fitxers d'origen i destinació són els mateixos. No s'ha produït cap "
"acció."
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr "El camí d'origen i destinació es idèntic. No s'ha produït cap acció."
@@ -2259,6 +2571,20 @@ msgid "Can't move directories to within themselves."
msgstr "No es poden moure directoris en si mateixos."
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Error en desar TileSet!"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Error en carregar:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr "No es pot operar en '..'"
@@ -2335,6 +2661,12 @@ msgid "Instance the selected scene(s) as child of the selected node."
msgstr "Instancia les escenes seleccionades com a filles del node seleccionat."
#: editor/filesystem_dock.cpp
+msgid ""
+"Scanning Files,\n"
+"Please Wait.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Move"
msgstr "Mou"
@@ -2346,10 +2678,31 @@ msgstr "Afegeix al Grup"
msgid "Remove from Group"
msgstr "Treu del Grup"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "Superfície %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+msgstr "Important Escena..."
+
+#: 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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "Importa Escena 3D"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2388,6 +2741,14 @@ msgid "Saving.."
msgstr "Desant..."
#: 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
#, fuzzy
msgid " Files"
msgstr "Fitxer:"
@@ -2584,6 +2945,10 @@ msgstr "Malla/es :"
msgid "Mesh"
msgstr "Malla"
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "Superfície %d"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr "No s'ha trobat cap mostra d'Àudio per importar!"
@@ -3169,6 +3534,11 @@ msgid "New name:"
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Filtres"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr ""
@@ -3480,6 +3850,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Edita"
@@ -3512,10 +3883,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3625,11 +3992,6 @@ msgstr ""
msgid "Change default type"
msgstr "Canvia Tipus de la Matriu"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "D'acord"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3667,6 +4029,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3706,6 +4076,19 @@ msgid "Update from Scene"
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
+#, fuzzy
+msgid "Load Curve Preset"
+msgstr "Errors de Càrrega"
+
+#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
msgid "Add point"
msgstr "Afegeix Senyal"
@@ -3717,11 +4100,29 @@ msgstr "Treu Senyal"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Left linear"
+msgstr "Lineal"
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Right linear"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Load preset"
msgstr "Errors de Càrrega"
#: editor/plugins/curve_editor_plugin.cpp
-msgid "Modify Curve"
+#, fuzzy
+msgid "Remove Curve Point"
+msgstr "Treu Senyal"
+
+#: 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
@@ -3746,6 +4147,12 @@ 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 ""
@@ -4036,6 +4443,11 @@ 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 ""
@@ -4355,6 +4767,12 @@ 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 ""
@@ -4379,6 +4797,10 @@ 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 ""
@@ -4432,6 +4854,11 @@ msgid "Close All"
msgstr "Tanca"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Scripts Panel"
+msgstr "Commuta Favorit"
+
+#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Find.."
@@ -4464,6 +4891,11 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "Editor de Dependències"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4528,6 +4960,10 @@ msgid ""
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 ""
@@ -4575,6 +5011,11 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Esborra"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4881,37 +5322,6 @@ msgid "Animation Key Inserted."
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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "Endavant"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "Enrere"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "Roda Avall."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -4975,10 +5385,63 @@ msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Doppler Enable"
+msgstr "Activa"
+
+#: 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
+#, fuzzy
+msgid "Freelook Forward"
+msgstr "Endavant"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Backwards"
+msgstr "Enrere"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Down"
+msgstr "Roda Avall."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "preview"
+msgstr "Previsualització:"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "Mètodes públics:"
+
+#: 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 ""
@@ -5097,6 +5560,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "Configuració"
@@ -5225,6 +5689,10 @@ 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 ""
@@ -5282,6 +5750,16 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Treu la Selecció"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Treu"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5349,7 +5827,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5371,11 +5849,25 @@ msgid "Color"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Escala la Selecció"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr ""
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "Lineal"
+
+#: 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
@@ -5411,10 +5903,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5477,7 +5965,7 @@ msgstr "Esborra fitxers seleccionats?"
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5528,6 +6016,24 @@ msgid "Make Patch"
msgstr "Camí de Destinació:"
#: editor/project_export.cpp
+msgid "Features"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "Llista de mètodes:"
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Export PCK/Zip"
+msgstr "Exporta"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5567,10 +6073,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5615,6 +6117,23 @@ msgid "Are you sure to open more than one project?"
msgstr ""
#: 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 ""
+"No s'ha definit cap escena principal. Seleccioneu-ne una.\n"
+"És possible triar-ne una altra més endavant a \"Configuració del Projecte\" "
+"en la categoria \"aplicació\"."
+
+#: 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 ""
@@ -5629,10 +6148,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5661,255 +6176,288 @@ msgstr "Treu la Selecció"
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Connecta.."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta +"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Maj +"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt +"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Canvia"
+
+#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "Eix"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "Dispositiu"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Botó"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "Botó Esquerre."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "Botó Dret."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "Botó del Mig."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "Roda Amunt."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "Roda Avall."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Afegeix Propietat d'Accés (Getter)"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "No property '"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "Configuració"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "Esborra"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "No s'ha pogut desar la configuració."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "Configuració desada correctament."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Configuració del Projecte (engine.cfg)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr ""
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5952,6 +6500,11 @@ msgstr ""
#: editor/property_editor.cpp
#, fuzzy
+msgid "Select Node"
+msgstr "Mètodes públics:"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "New Script"
msgstr "Executa Script"
@@ -5966,6 +6519,11 @@ msgstr ""
#: editor/property_editor.cpp
#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "Selecciona Node(s) per Importar"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "Pick a Node"
msgstr "Camí al Node:"
@@ -6063,6 +6621,11 @@ msgstr ""
msgid "Scene Run Settings"
msgstr "Configuració d'Execució d'Escenes"
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "D'acord"
+
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
msgstr ""
@@ -6106,10 +6669,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6122,6 +6681,18 @@ 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 ""
@@ -6165,6 +6736,14 @@ msgid "Edit Connections"
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 ""
@@ -6218,6 +6797,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "Filtres"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr ""
@@ -6225,6 +6809,14 @@ msgstr ""
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 ""
@@ -6256,11 +6848,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "Opcions de Depuració (Debug)"
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6298,31 +6885,7 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
@@ -6331,6 +6894,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Error carregant lletra."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "No s'ha pogut crear la carpeta."
@@ -6340,6 +6908,10 @@ msgid "Error loading script from %s"
msgstr "Error carregant lletra."
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr ""
@@ -6382,10 +6954,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6557,6 +7125,10 @@ 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 ""
@@ -6642,6 +7214,130 @@ msgstr "Format del diccionari d'instàncies invàlid (script invàlid a @path)"
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "Diccionari d'instàncies invàlid (subclasses invàlides)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Elimina Seleccionats"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Duplica la Selecció"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+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
+#, fuzzy
+msgid "Clip Disabled"
+msgstr "Desactivat"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "Crea Nou"
+
+#: 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
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Selecció Només"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Selecció Només"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "Configuració de Desplaçament"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Pick Distance:"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "Fitxer:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6681,6 +7377,30 @@ msgid "Stack overflow with stack depth: "
msgstr "Pila desbordada (stack overflow) amb profunditat de Pila: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Edita els Arguments del Senyal:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Canvia Tipus de la Matriu"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Canvia Valor de la Matriu"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Set Variable Default Value"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Edita Variable:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Funcions:"
@@ -6721,26 +7441,6 @@ msgid "Add Signal"
msgstr "Afegeix Senyal"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Treu Funció"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Treu Variable"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Editant Variable:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Treu Senyal"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "Editant Senyal:"
-
-#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Change Expression"
msgstr "Canvia Transició"
@@ -6750,6 +7450,15 @@ msgid "Add Node"
msgstr "Afegeix Node"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Treu claus invàlides"
+
+#: 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 ""
"Retén Meta per dipositar un mètode Accessor (Getter). Retén Maj per "
@@ -6795,6 +7504,26 @@ msgstr "Afegeix Propietat d'Actualització (Setter)"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
+msgid "Change Base Type"
+msgstr "Canvia Tipus de la Matriu"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Copia Nodes"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Treu Variable"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Connecta al Node:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Condition"
msgstr "Transició"
@@ -6824,6 +7553,56 @@ msgid "Get"
msgstr "Obtenir"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Canvia Valor de la Matriu"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "No es pot operar en '..'"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "El camí per desar és buit!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Camí al Node:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Treu Funció"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Edita Variable:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Treu Variable"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Editant Senyal:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Treu Senyal"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Editant Variable:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "Editant Senyal:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "Tipus Base:"
@@ -6844,10 +7623,6 @@ msgid "Edit Variable:"
msgstr "Edita Variable:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Canvia"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Elimina Seleccionats"
@@ -6926,14 +7701,6 @@ msgstr ""
"Valor de retorn de _step() invàlid. Ha de ser un nombre enter (seq out), o "
"una cadena de text (error)."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "premut"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "alliberat"
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6957,87 +7724,6 @@ msgstr "No s'ha pogut crear la carpeta."
msgid "Could not open template for export:\n"
msgstr "No s'ha pogut crear la carpeta."
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-"No s'ha pogut llegir el certificat. Comproveu que tant el camí com la "
-"contrasenya són correctes"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "No s'ha pogut l'objecte signatura."
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr "No s'ha pogut crear el paquet signatura."
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"No s'ha trobat cap plantilla.\n"
-"Descarregueu i instal·leu alguna plantilla d'exportació."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr "No s'ha trobat cap paquet de depuració personalitzat."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr "No s'ha trobat cap paquet de llançament personalitzat."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid unique name."
-msgstr "Nom no vàlid."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid product GUID."
-msgstr "La mida de la lletra no és vàlida."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr "GUID d'editor no vàlid."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid background color."
-msgstr "Lletra personalitzada no vàlida."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "Imatge Store Logo no vàlida. La mida hauria de ser 50x50 ."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr "Imatge Logo quadrat 44x44 no vàlida. La mida hauria de ser 44x44."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr "Imatge Logo quadrat 71x71 no vàlida. La mida hauria de ser 71x71 ."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr "Imatge logo quadrat 150x150 no vàlida. La mida hauria de ser 150x150 ."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr "Imatge logo quadrat 310x310 no vàlida. La mida hauria de ser 310x310."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr "Imatge logo quadrat 310x150 no vàlida. La mida hauria de ser 310x150."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-"Imatge de la pantalla de presentació no vàlida. La mida hauria de ser "
-"620x300."
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7141,6 +7827,13 @@ msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr ""
"PathFollow2D només funciona si s'estableix com a fill d'un node Path2D."
+#: 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 "Cal que la propietat Camí (Path) assenyali un Node2D vàlid."
@@ -7171,23 +7864,33 @@ msgstr ""
"VisibilityEnable2D funciona millor quan l'arrel de l'escena editada "
"s'utilitza com a pare."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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 ""
-"CollisionShape només proporciona formes de col·lisió a nodes derivats de "
-"CollisionObject. Utilitzeu-lo només per donar una forma a nodes com Area, "
-"StaticBody, RigidBody, KinematicBody, etc."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"Cal proveir una forma perquè CollisionShape funcioni. Creeu-li un recurs de "
-"forma!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7203,6 +7906,24 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "Un CollisionPolygon buit no afecta les col·lisions."
+#: 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 ""
+"CollisionShape només proporciona formes de col·lisió a nodes derivats de "
+"CollisionObject. Utilitzeu-lo només per donar una forma a nodes com Area, "
+"StaticBody, RigidBody, KinematicBody, etc."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"Cal proveir una forma perquè CollisionShape funcioni. Creeu-li un recurs de "
+"forma!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7222,6 +7943,13 @@ 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
#, fuzzy
msgid "Path property must point to a valid Spatial node to work."
@@ -7244,7 +7972,7 @@ msgstr ""
"AnimatedSprite3D dibuixi els quadres."
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7259,22 +7987,6 @@ msgstr "Ep!"
msgid "Please Confirm..."
msgstr "Confirmeu..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Obre un Fitxer"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Obre Fitxer(s)"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Obre un Directori"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Obre un Fitxer o Directori"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl +"
@@ -7296,7 +8008,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7314,6 +8026,93 @@ msgstr ""
"forma per tal d'obtenir-ne la mida. Altrament, establiu-la com a Destinació "
"de Renderització i assigneu-ne la textura interna a algun node."
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "Tanca l'Escena? (Es perdran els canvis sense desar)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "Vol Obrir el Gestor de Projectes?\n"
+#~ "(Es perdran els canvis sense desar)"
+
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "Tanca i Vés a l'Escena anterior"
+
+#~ msgid "just pressed"
+#~ msgstr "premut"
+
+#~ msgid "just released"
+#~ msgstr "alliberat"
+
+#, fuzzy
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr ""
+#~ "No s'ha pogut llegir el certificat. Comproveu que tant el camí com la "
+#~ "contrasenya són correctes"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "No s'ha pogut l'objecte signatura."
+
+#~ msgid "Error creating the package signature."
+#~ msgstr "No s'ha pogut crear el paquet signatura."
+
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "No s'ha trobat cap plantilla.\n"
+#~ "Descarregueu i instal·leu alguna plantilla d'exportació."
+
+#~ msgid "Custom debug package not found."
+#~ msgstr "No s'ha trobat cap paquet de depuració personalitzat."
+
+#~ msgid "Custom release package not found."
+#~ msgstr "No s'ha trobat cap paquet de llançament personalitzat."
+
+#, fuzzy
+#~ msgid "Invalid unique name."
+#~ msgstr "Nom no vàlid."
+
+#, fuzzy
+#~ msgid "Invalid product GUID."
+#~ msgstr "La mida de la lletra no és vàlida."
+
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "GUID d'editor no vàlid."
+
+#, fuzzy
+#~ msgid "Invalid background color."
+#~ msgstr "Lletra personalitzada no vàlida."
+
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr "Imatge Store Logo no vàlida. La mida hauria de ser 50x50 ."
+
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr "Imatge Logo quadrat 44x44 no vàlida. La mida hauria de ser 44x44."
+
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr "Imatge Logo quadrat 71x71 no vàlida. La mida hauria de ser 71x71 ."
+
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr ""
+#~ "Imatge logo quadrat 150x150 no vàlida. La mida hauria de ser 150x150 ."
+
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr ""
+#~ "Imatge logo quadrat 310x310 no vàlida. La mida hauria de ser 310x310."
+
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr ""
+#~ "Imatge logo quadrat 310x150 no vàlida. La mida hauria de ser 310x150."
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr ""
+#~ "Imatge de la pantalla de presentació no vàlida. La mida hauria de ser "
+#~ "620x300."
+
#~ msgid "Node From Scene"
#~ msgstr "Node de l'Escena"
@@ -7348,9 +8147,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "Substituïdes %d ocurrència/es."
-#~ msgid "Please save the scene first."
-#~ msgstr "Desa l'escena abans."
-
#~ msgid "Save Translatable Strings"
#~ msgstr "Desa els texts Traduïbles"
diff --git a/editor/translations/cs.po b/editor/translations/cs.po
index d2420e32ed..c7871ef60d 100644
--- a/editor/translations/cs.po
+++ b/editor/translations/cs.po
@@ -148,7 +148,8 @@ msgstr "Jít k dalšímu kroku"
msgid "Goto Prev Step"
msgstr "Jít k předchozímu kroku"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "Lineární"
@@ -382,7 +383,8 @@ msgstr "Soubor:"
msgid "Description:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -393,9 +395,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Zavřít"
@@ -470,7 +472,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -534,17 +536,16 @@ msgid "All"
msgstr "VÅ¡echny"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "Hledat:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "Hledat"
@@ -560,7 +561,7 @@ msgstr "Hledat"
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -572,7 +573,7 @@ msgstr "Řadit:"
msgid "Reverse"
msgstr "Naopak"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "Kategorie:"
@@ -725,14 +726,14 @@ msgstr "Připojit k uzlu:"
#: 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.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
msgstr "Přidat"
#: 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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "Odebrat"
@@ -841,7 +842,7 @@ msgid "Resource"
msgstr "Zdroj"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "Cesta"
@@ -923,12 +924,186 @@ msgstr "Průzkumník sirotků zdrojů"
msgid "Delete selected files?"
msgstr "Odstranit vybrané soubory?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Odstranit"
+#: 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 "Authors"
+msgstr ""
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "Nastavení projektu"
+
+#: 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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "Spojité"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "Spojité"
+
+#: 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
+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
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Přejmenovat AutoLoad"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Smazat vybraný"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Smazat vybraný"
+
+#: 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
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Optimalizovat animaci"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Duplikovat výběr"
+
+#: editor/editor_audio_buses.cpp
+msgid "Move Audio Bus"
+msgstr ""
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -942,21 +1117,44 @@ 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/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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: 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
@@ -1061,6 +1259,10 @@ 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 ""
@@ -1138,6 +1340,22 @@ msgstr "VÅ¡echny soubory (*)"
msgid "Open"
msgstr "Otevřít"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Otevřít soubor"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Otevřít soubor(y)"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Otevřít složku"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Otevřít soubor nebo složku"
+
#: 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
@@ -1263,6 +1481,15 @@ msgid "Signals:"
msgstr "Signály:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Funkce:"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr ""
@@ -1280,7 +1507,7 @@ msgid "Search Text"
msgstr ""
#: editor/editor_log.cpp
-msgid " Output:"
+msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1330,6 +1557,10 @@ 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 ""
@@ -1448,11 +1679,12 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr ""
+#, fuzzy
+msgid "Save & Close"
+msgstr "Uložit soubor"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
@@ -1464,23 +1696,27 @@ msgid "No"
msgstr ""
#: editor/editor_node.cpp
-msgid "This scene has never been saved. Save before running?"
+msgid "Yes"
msgstr ""
#: editor/editor_node.cpp
-msgid "Export Mesh Library"
+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 Tile Set"
+msgid "Export Mesh Library"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
+msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Exit the editor?"
+msgid "This operation can't be done without a selected node."
msgstr ""
#: editor/editor_node.cpp
@@ -1504,9 +1740,28 @@ msgid "Quick Run Scene.."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+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
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Uložit soubor"
+
+#: 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
@@ -1514,6 +1769,22 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1546,6 +1817,11 @@ msgstr ""
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 ""
@@ -1562,6 +1838,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr ""
@@ -1610,10 +1890,6 @@ msgstr ""
msgid "Close Scene"
msgstr ""
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1896,6 +2172,10 @@ msgstr ""
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1905,26 +2185,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr ""
@@ -1945,9 +2209,17 @@ 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
#, fuzzy
msgid "Open 2D Editor"
@@ -2052,6 +2324,16 @@ msgstr ""
msgid "Re-Import Changed Resources"
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 ""
@@ -2190,10 +2472,27 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "Zdroj"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2202,6 +2501,20 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Chyba pÅ™i naÄítání:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Chyba pÅ™i naÄítání:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2278,6 +2591,12 @@ 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 ""
@@ -2289,9 +2608,28 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Single Scene"
+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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2331,6 +2669,14 @@ 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
#, fuzzy
msgid " Files"
msgstr "Soubor:"
@@ -2518,6 +2864,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3100,6 +3450,11 @@ msgid "New name:"
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Soubor:"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr ""
@@ -3412,6 +3767,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Upravit"
@@ -3444,10 +3800,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3557,11 +3909,6 @@ msgstr ""
msgid "Change default type"
msgstr "Změnit typ hodnot pole"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "OK"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3599,6 +3946,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3638,6 +3993,18 @@ msgid "Update from Scene"
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
#, fuzzy
msgid "Add point"
msgstr "Přidat signál"
@@ -3648,11 +4015,29 @@ msgid "Remove point"
msgstr "Odstranit signál"
#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Left linear"
+msgstr "Lineární"
+
+#: 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 "Modify Curve"
+#, fuzzy
+msgid "Remove Curve Point"
+msgstr "Odstranit signál"
+
+#: 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
@@ -3677,6 +4062,12 @@ 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 ""
@@ -3967,6 +4358,11 @@ 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 ""
@@ -4284,6 +4680,12 @@ 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 ""
@@ -4308,6 +4710,10 @@ 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 ""
@@ -4361,6 +4767,10 @@ msgid "Close All"
msgstr "Zavřít"
#: 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.."
@@ -4393,6 +4803,11 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "Editor závislostí"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4457,6 +4872,10 @@ msgid ""
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 ""
@@ -4503,6 +4922,11 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Odstranit"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4808,93 +5232,102 @@ msgid "Animation Key Inserted."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
+msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
+msgid "Material Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Forward"
-msgstr ""
+#, fuzzy
+msgid "Shader Changes"
+msgstr "Změnit"
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Backwards"
+msgid "Surface Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
+msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "KoleÄko dolů."
+msgid "Vertices"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
+msgid "Align with view"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
+msgid "Display Normal"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Material Changes"
+msgid "Display Wireframe"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Shader Changes"
-msgstr "Změnit"
+msgid "Display Overdraw"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Surface Changes"
+msgid "Display Unshaded"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
+msgid "View Environment"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
+msgid "View Gizmos"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "View Information"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
+msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
+#, fuzzy
+msgid "Doppler Enable"
+msgstr "Povolit"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Left"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
+msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
+msgid "Freelook Forward"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
+msgid "Freelook Backwards"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
+msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
+#, fuzzy
+msgid "Freelook Down"
+msgstr "KoleÄko dolů."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
+msgid "preview"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
@@ -4902,6 +5335,18 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "Vybrat vše"
+
+#: 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 ""
@@ -5019,6 +5464,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr ""
@@ -5147,6 +5593,10 @@ 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 ""
@@ -5204,6 +5654,16 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Odstranit výběr"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Odebrat"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5271,7 +5731,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5293,11 +5753,25 @@ msgid "Color"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Změnit měřítko výběru"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr ""
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "Lineární"
+
+#: 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
@@ -5333,10 +5807,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5399,7 +5869,7 @@ msgstr "Odstranit vybrané soubory?"
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5447,6 +5917,23 @@ msgid "Make Patch"
msgstr ""
#: editor/project_export.cpp
+msgid "Features"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "Seznam metod:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5483,10 +5970,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5531,6 +6014,19 @@ 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 ""
@@ -5545,10 +6041,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5577,255 +6069,288 @@ msgstr "Odstranit výběr"
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Připojit.."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Změnit"
+
+#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "Osa"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "Zařízení"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "TlaÄítko"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "Levé tlaÄítko."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "Pravé tlaÄítko."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "ProstÅ™ední tlaÄítko."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "KoleÄko nahoru."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "KoleÄko dolů."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Přidat vlastnost getter"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "No property '"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "Testované"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "Odstranit"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Nastavení projektu"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr ""
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5866,6 +6391,11 @@ msgid "Assign"
msgstr ""
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Vybrat vše"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr ""
@@ -5878,6 +6408,10 @@ msgid "Error loading file: Not a resource!"
msgstr ""
#: editor/property_editor.cpp
+msgid "Selected node is not a Viewport!"
+msgstr ""
+
+#: editor/property_editor.cpp
#, fuzzy
msgid "Pick a Node"
msgstr "Vložit uzly"
@@ -5976,6 +6510,11 @@ msgstr ""
msgid "Scene Run Settings"
msgstr ""
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "OK"
+
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
msgstr ""
@@ -6019,10 +6558,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6035,6 +6570,18 @@ 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 ""
@@ -6078,6 +6625,14 @@ msgid "Edit Connections"
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 ""
@@ -6131,6 +6686,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "Filtr:"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr ""
@@ -6138,6 +6698,14 @@ msgstr ""
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 ""
@@ -6169,10 +6737,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6210,31 +6774,7 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
@@ -6243,6 +6783,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Chyba nahrávání fontu."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "Nelze vytvořit složku."
@@ -6252,6 +6797,10 @@ msgid "Error loading script from %s"
msgstr "Chyba nahrávání fontu."
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr ""
@@ -6294,10 +6843,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6465,6 +7010,10 @@ 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 ""
@@ -6547,6 +7096,130 @@ msgstr "Neplatná instance slovníkového formátu (nemohu nahrát skript na @pa
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "Neplatná instance slovníku (neplatné podtřídy)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Smazat vybraný"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Duplikovat výběr"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+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
+#, fuzzy
+msgid "Clip Disabled"
+msgstr "Vypnuto"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "Vytvořit nový"
+
+#: 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
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Pouze výběr"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Pouze výběr"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "Nastavení projektu"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Pick Distance:"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "Soubor:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
#, fuzzy
msgid ""
@@ -6585,6 +7258,30 @@ msgid "Stack overflow with stack depth: "
msgstr "PÅ™eteÄení zásobníku s hloubkou: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Upravit argumenty signálu:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Změnit typ hodnot pole"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Změnit hodnotu pole"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Set Variable Default Value"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Upravit proměnnou:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Funkce:"
@@ -6625,26 +7322,6 @@ msgid "Add Signal"
msgstr "Přidat signál"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Odstranit funkci"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Odstranit proměnnou"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Úprava proměnné:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Odstranit signál"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "Úprava signálu:"
-
-#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Change Expression"
msgstr "Animace: změna přechodu"
@@ -6655,6 +7332,15 @@ msgstr "Přidat uzel"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Odstranit neplatné klíÄe"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Duplicate VisualScript Nodes"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
"Podržte Meta k uvolnění getteru. Podržte Shift k uvolnění generického "
@@ -6702,6 +7388,26 @@ msgstr "Přidat vlastnost setter"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
+msgid "Change Base Type"
+msgstr "Změnit typ hodnot pole"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Zkopírovat uzly"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Odstranit proměnnou"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Připojit k uzlu:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Condition"
msgstr "Přechod"
@@ -6730,6 +7436,54 @@ msgid "Get"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Změnit hodnotu pole"
+
+#: 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
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Vložit uzly"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Odstranit funkci"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Upravit proměnnou:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Odstranit proměnnou"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Úprava signálu:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Odstranit signál"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Úprava proměnné:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "Úprava signálu:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "Základní typ:"
@@ -6750,10 +7504,6 @@ msgid "Edit Variable:"
msgstr "Upravit proměnnou:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Změnit"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Smazat vybraný"
@@ -6830,14 +7580,6 @@ msgstr ""
"Neplatná návratová hodnota z funkce _step(). Musí být celé Äíslo (výstupní "
"posloupnost), nebo řetězec (chyba)."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "právě stisknuto"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "právě uvolněno"
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6861,83 +7603,6 @@ msgstr "Nelze vytvořit složku."
msgid "Could not open template for export:\n"
msgstr "Nelze vytvořit složku."
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-"NepodaÅ™ilo se pÅ™eÄíst soubor certifikátu. Jsou cesta a heslo obÄ› korektní?"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "Chyba při vytváření podpisového objektu."
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr "Chyba pÅ™i vytváření podpisu balíÄku."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"Nebyly nalezeny žádné exportní šablony.\n"
-"Stáhněte a nainstalujte exportní šablony."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr "Vlastní ladící balíÄek nebyl nalezen."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Custom release package not found."
-msgstr "Vlastní balíÄek k uveÅ™ejnÄ›ní nebyl nalezen."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr "Neplatný unikátní název."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr "Neplatné GUID produktu."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr "Neplatné GUID vydavatele."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "Neplatná barva pozadí."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "Neplatné rozměry Store Logo obrázku (měly by být 50x50)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr "Neplatné rozměry Square 44x44 Logo obrázku (měly by být 44x44)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr "Neplatné rozměry Square 71x71 Logo obrázku (měly by být 71x71)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr "Neplatné rozměry Square 150x150 Logo obrázku (měly by být 150x150)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr "Neplatné rozměry Square 310x310 Logo obrázku (měly by být 310x310)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr "Neplatné rozměry Square 310x150 Logo obrázku (měly by být 310x150)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr "Neplatné rozměry obrázku uvítací obrazovky (měly by být 620x300)."
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7036,6 +7701,13 @@ msgstr ""
msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr "PathFollow2D funguje pouze když je dítětem uzlu Path2D."
+#: 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 ""
@@ -7063,23 +7735,33 @@ msgid ""
"as parent."
msgstr ""
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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 ""
-"CollisionShape pouze poskytuje tvar kolize uzlům odvozeným z "
-"CollisionObject. Použijte ho jen jako dítě uzlů Area, StaticBody, RigidBody "
-"a KinematicBody, abyste jim dali tvar."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"Aby CollisionShape mohl fungovat, musí mu být poskytnut tvar. Vytvořte mu "
-"prosím zdroj tvar!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7095,6 +7777,24 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "Prázdný CollisionPolygon nemá na kolize žádný efekt."
+#: 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 ""
+"CollisionShape pouze poskytuje tvar kolize uzlům odvozeným z "
+"CollisionObject. Použijte ho jen jako dítě uzlů Area, StaticBody, RigidBody "
+"a KinematicBody, abyste jim dali tvar."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"Aby CollisionShape mohl fungovat, musí mu být poskytnut tvar. Vytvořte mu "
+"prosím zdroj tvar!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7114,6 +7814,13 @@ 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
#, fuzzy
msgid "Path property must point to a valid Spatial node to work."
@@ -7137,7 +7844,7 @@ msgstr ""
"aby mohl AnimatedSprite3D zobrazit rámeÄky."
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7152,22 +7859,6 @@ msgstr "Pozor!"
msgid "Please Confirm..."
msgstr "PotvrÄte prosím..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Otevřít soubor"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Otevřít soubor(y)"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Otevřít složku"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Otevřít soubor nebo složku"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7189,7 +7880,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7207,6 +7898,73 @@ msgstr ""
"mohl získat velikost. Jinak ho nastavte jako render target a pÅ™iÅ™aÄte jeho "
"vnitřní texturu nějakému uzlu k zobrazení."
+#~ msgid "just pressed"
+#~ msgstr "právě stisknuto"
+
+#~ msgid "just released"
+#~ msgstr "právě uvolněno"
+
+#, fuzzy
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr ""
+#~ "NepodaÅ™ilo se pÅ™eÄíst soubor certifikátu. Jsou cesta a heslo obÄ› korektní?"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "Chyba při vytváření podpisového objektu."
+
+#~ msgid "Error creating the package signature."
+#~ msgstr "Chyba pÅ™i vytváření podpisu balíÄku."
+
+#, fuzzy
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "Nebyly nalezeny žádné exportní šablony.\n"
+#~ "Stáhněte a nainstalujte exportní šablony."
+
+#~ msgid "Custom debug package not found."
+#~ msgstr "Vlastní ladící balíÄek nebyl nalezen."
+
+#, fuzzy
+#~ msgid "Custom release package not found."
+#~ msgstr "Vlastní balíÄek k uveÅ™ejnÄ›ní nebyl nalezen."
+
+#~ msgid "Invalid unique name."
+#~ msgstr "Neplatný unikátní název."
+
+#~ msgid "Invalid product GUID."
+#~ msgstr "Neplatné GUID produktu."
+
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "Neplatné GUID vydavatele."
+
+#~ msgid "Invalid background color."
+#~ msgstr "Neplatná barva pozadí."
+
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr "Neplatné rozměry Store Logo obrázku (měly by být 50x50)."
+
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr "Neplatné rozměry Square 44x44 Logo obrázku (měly by být 44x44)."
+
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr "Neplatné rozměry Square 71x71 Logo obrázku (měly by být 71x71)."
+
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr "Neplatné rozměry Square 150x150 Logo obrázku (měly by být 150x150)."
+
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr "Neplatné rozměry Square 310x310 Logo obrázku (měly by být 310x310)."
+
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr "Neplatné rozměry Square 310x150 Logo obrázku (měly by být 310x150)."
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr "Neplatné rozměry obrázku uvítací obrazovky (měly by být 620x300)."
+
#~ msgid "Path property must point to a valid Particles2D node to work."
#~ msgstr ""
#~ "Aby ParticleAttractor2D fungoval, musí vlastnost path ukazovat na platný "
diff --git a/editor/translations/da.po b/editor/translations/da.po
index 51a0b05e3b..d33fef1743 100644
--- a/editor/translations/da.po
+++ b/editor/translations/da.po
@@ -146,7 +146,8 @@ msgstr "Goto næste skridt"
msgid "Goto Prev Step"
msgstr "Goto forrige trin"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "Lineær"
@@ -380,7 +381,8 @@ msgstr "Fil:"
msgid "Description:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -391,9 +393,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Luk"
@@ -468,7 +470,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -532,17 +534,16 @@ msgid "All"
msgstr "Alle"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "Søgning:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "Søg"
@@ -558,7 +559,7 @@ msgstr "Søg"
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -570,7 +571,7 @@ msgstr "Sorter:"
msgid "Reverse"
msgstr "Omvendt"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "Kategori:"
@@ -723,14 +724,14 @@ msgstr "Opret forbindelse til Node:"
#: 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.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
msgstr "Tilføj"
#: 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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "Fjern"
@@ -839,7 +840,7 @@ msgid "Resource"
msgstr "Ressource"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "Sti"
@@ -919,12 +920,186 @@ msgstr ""
msgid "Delete selected files?"
msgstr ""
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Authors"
+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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "Kontinuerlig"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "Kontinuerlig"
+
+#: 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
+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
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Omdøb Funktion"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Slet Valgte"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Slet Valgte"
+
+#: 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
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Optimer Animation"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Dubler valg"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "Flyt Add Key"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -938,21 +1113,44 @@ 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/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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: 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
@@ -1055,6 +1253,10 @@ 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 ""
@@ -1132,6 +1334,22 @@ msgstr "Alle filer (*)"
msgid "Open"
msgstr "Ã…ben"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Ã…ben en Fil"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Ã…ben fil(er)"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Ã…bn en mappe"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Ã…bne en fil eller mappe"
+
#: 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
@@ -1257,6 +1475,15 @@ msgid "Signals:"
msgstr "Signaler:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Funktioner:"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr ""
@@ -1274,7 +1501,7 @@ msgid "Search Text"
msgstr ""
#: editor/editor_log.cpp
-msgid " Output:"
+msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1324,6 +1551,10 @@ 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 ""
@@ -1442,11 +1673,12 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr ""
+#, fuzzy
+msgid "Save & Close"
+msgstr "Gem en fil"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
@@ -1458,23 +1690,27 @@ msgid "No"
msgstr ""
#: editor/editor_node.cpp
-msgid "This scene has never been saved. Save before running?"
+msgid "Yes"
msgstr ""
#: editor/editor_node.cpp
-msgid "Export Mesh Library"
+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 Tile Set"
+msgid "Export Mesh Library"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
+msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Exit the editor?"
+msgid "This operation can't be done without a selected node."
msgstr ""
#: editor/editor_node.cpp
@@ -1498,9 +1734,28 @@ msgid "Quick Run Scene.."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+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
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Gem en fil"
+
+#: 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
@@ -1508,6 +1763,22 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1540,6 +1811,11 @@ msgstr ""
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 ""
@@ -1556,6 +1832,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr ""
@@ -1604,10 +1884,6 @@ msgstr ""
msgid "Close Scene"
msgstr ""
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1888,6 +2164,10 @@ msgstr ""
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1897,26 +2177,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr ""
@@ -1937,9 +2201,17 @@ 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
#, fuzzy
msgid "Open 2D Editor"
@@ -2044,6 +2316,16 @@ msgstr ""
msgid "Re-Import Changed Resources"
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 ""
@@ -2181,10 +2463,27 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "Ressource"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2193,6 +2492,20 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Error loading skrifttype."
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Error loading skrifttype."
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2269,6 +2582,12 @@ 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 ""
@@ -2280,9 +2599,28 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Single Scene"
+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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2322,6 +2660,14 @@ 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
#, fuzzy
msgid " Files"
msgstr "Fil:"
@@ -2509,6 +2855,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3091,6 +3441,11 @@ msgid "New name:"
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Fil:"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr ""
@@ -3402,6 +3757,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Rediger"
@@ -3434,10 +3790,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3547,11 +3899,6 @@ msgstr ""
msgid "Change default type"
msgstr "Skift Array værditype"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "Ok"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3589,6 +3936,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3628,6 +3983,18 @@ msgid "Update from Scene"
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
#, fuzzy
msgid "Add point"
msgstr "Tilføj Signal"
@@ -3638,11 +4005,29 @@ msgid "Remove point"
msgstr "Fjern Signal"
#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Left linear"
+msgstr "Lineær"
+
+#: 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 "Modify Curve"
+#, fuzzy
+msgid "Remove Curve Point"
+msgstr "Fjern Signal"
+
+#: 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
@@ -3667,6 +4052,12 @@ 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 ""
@@ -3957,6 +4348,11 @@ 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 ""
@@ -4274,6 +4670,12 @@ 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 ""
@@ -4298,6 +4700,10 @@ 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 ""
@@ -4351,6 +4757,10 @@ msgid "Close All"
msgstr "Luk"
#: 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.."
@@ -4383,6 +4793,11 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "Afhængigheds Editor"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4447,6 +4862,10 @@ msgid ""
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 ""
@@ -4493,6 +4912,11 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Optimer Animation"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4798,94 +5222,102 @@ msgid "Animation Key Inserted."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
+msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
+msgid "Material Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Forward"
-msgstr ""
+#, fuzzy
+msgid "Shader Changes"
+msgstr "Skift"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "Baglæns"
+msgid "Surface Changes"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
+msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "Hjulet ned."
+msgid "Vertices"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
+msgid "Align with view"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
+msgid "Display Normal"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Material Changes"
+msgid "Display Wireframe"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Shader Changes"
-msgstr "Skift"
+msgid "Display Overdraw"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Surface Changes"
+msgid "Display Unshaded"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
+msgid "View Environment"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
+msgid "View Gizmos"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "View Information"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
+msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
+msgid "Doppler Enable"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
+msgid "Freelook Left"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
+msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
+msgid "Freelook Forward"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
+#, fuzzy
+msgid "Freelook Backwards"
+msgstr "Baglæns"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
+#, fuzzy
+msgid "Freelook Down"
+msgstr "Hjulet ned."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
+msgid "preview"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
@@ -4893,6 +5325,18 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "Vælg alle"
+
+#: 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 ""
@@ -5010,6 +5454,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr ""
@@ -5138,6 +5583,10 @@ 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 ""
@@ -5195,6 +5644,16 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Fjern markering"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Fjern"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5262,7 +5721,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5284,11 +5743,25 @@ msgid "Color"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Skalering Valg"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr ""
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "Lineær"
+
+#: 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
@@ -5324,10 +5797,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5387,7 +5856,7 @@ msgstr ""
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5435,6 +5904,23 @@ msgid "Make Patch"
msgstr ""
#: editor/project_export.cpp
+msgid "Features"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "Metode liste:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5471,10 +5957,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5519,6 +6001,19 @@ 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 ""
@@ -5533,10 +6028,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5565,254 +6056,287 @@ msgstr "Fjern markering"
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Forbind..."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta +"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt +"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Skift"
+
+#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "Akse"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "Enhed"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Knap"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "Venstre knap."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "Højre knap."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "Midterste knap."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "Hjulet op."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "Hjulet ned."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Tilføj Getter Egenskab"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "No property '"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "Tester"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "Slet Valgte"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr ""
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5853,6 +6377,11 @@ msgid "Assign"
msgstr ""
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Vælg alle"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr ""
@@ -5865,6 +6394,10 @@ msgid "Error loading file: Not a resource!"
msgstr ""
#: editor/property_editor.cpp
+msgid "Selected node is not a Viewport!"
+msgstr ""
+
+#: editor/property_editor.cpp
#, fuzzy
msgid "Pick a Node"
msgstr "Sti til Node:"
@@ -5963,6 +6496,11 @@ msgstr ""
msgid "Scene Run Settings"
msgstr ""
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "Ok"
+
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
msgstr ""
@@ -6006,10 +6544,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6022,6 +6556,18 @@ 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 ""
@@ -6065,6 +6611,14 @@ msgid "Edit Connections"
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 ""
@@ -6116,6 +6670,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "Filter:"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr ""
@@ -6123,6 +6682,14 @@ msgstr ""
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 ""
@@ -6154,10 +6721,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6195,31 +6758,7 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
@@ -6228,6 +6767,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Error loading skrifttype."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "Kunne ikke oprette mappe."
@@ -6237,6 +6781,10 @@ msgid "Error loading script from %s"
msgstr "Error loading skrifttype."
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr ""
@@ -6279,10 +6827,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6449,6 +6993,10 @@ 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 ""
@@ -6530,6 +7078,129 @@ msgstr "Ugyldig forekomst ordbog format (ugyldigt script på @path)"
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "Ugyldig forekomst ordbog (ugyldige underklasser)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Slet Valgte"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Dubler valg"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+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
+#, fuzzy
+msgid "Clip Disabled"
+msgstr "Deaktiveret"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "Opret en ny"
+
+#: 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
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Kun Valgte"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Kun Valgte"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Settings"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Pick Distance:"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "Fil:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6567,6 +7238,30 @@ msgid "Stack overflow with stack depth: "
msgstr "Stakoverløb med stak dybde: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Rediger Signal argumenter:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Skift Array værditype"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Ændre Array-værdi"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Set Variable Default Value"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Rediger Variabel:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Funktioner:"
@@ -6607,26 +7302,6 @@ msgid "Add Signal"
msgstr "Tilføj Signal"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Fjern Funktion"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Fjern Variabel"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Redigerer Variabel:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Fjern Signal"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "Redigerer Signal:"
-
-#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Change Expression"
msgstr "Anim Skift Overgang"
@@ -6636,6 +7311,15 @@ msgid "Add Node"
msgstr "Tilføj Node"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Fjerne ugyldige keys"
+
+#: 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 ""
@@ -6678,6 +7362,26 @@ msgstr "Tilføj Setter Egenskab"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
+msgid "Change Base Type"
+msgstr "Skift Array værditype"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Sti til Node:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Fjern Variabel"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Opret forbindelse til Node:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Condition"
msgstr "Overgang"
@@ -6707,6 +7411,54 @@ msgid "Get"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Ændre Array-værdi"
+
+#: 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
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Sti til Node:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Fjern Funktion"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Rediger Variabel:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Fjern Variabel"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Redigerer Signal:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Fjern Signal"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Redigerer Variabel:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "Redigerer Signal:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "Basis Type:"
@@ -6727,10 +7479,6 @@ msgid "Edit Variable:"
msgstr "Rediger Variabel:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Skift"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Slet Valgte"
@@ -6809,14 +7557,6 @@ msgstr ""
"Ugyldig retur værdi fra _step(), skal være heltal (seq ud), eller en streng "
"(fejl)."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6840,79 +7580,6 @@ msgstr "Kunne ikke oprette mappe."
msgid "Could not open template for export:\n"
msgstr "Kunne ikke oprette mappe."
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid unique name."
-msgstr "Ugyldigt index egenskabsnavn."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid product GUID."
-msgstr "Ugyldig skriftstørrelse."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7013,6 +7680,13 @@ msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr ""
"PathFollow2D virker kun, når den angives som et barn af en Path2D node."
+#: 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 "Egenskaben Path skal pege på en gyldig Node2D node for at virke."
@@ -7041,23 +7715,33 @@ msgstr ""
"VisibilityEnable2D fungerer bedst, når det bruges med den redigerede "
"scenerod direkte som parent."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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 ""
-"CollisionShape tjener kun til at give en kollision figur til en "
-"CollisionObject afledte node. Du skal kun bruge det som et barn af Area, "
-"StaticBody, RigidBody, KinematicBody, etc. til at give dem en form."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"En figur skal gives for at CollisionShape fungerer. Opret en figur ressource "
-"til det!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7073,6 +7757,24 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "En tom CollisionPolygon har ingen effekt på kollision."
+#: 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 ""
+"CollisionShape tjener kun til at give en kollision figur til en "
+"CollisionObject afledte node. Du skal kun bruge det som et barn af Area, "
+"StaticBody, RigidBody, KinematicBody, etc. til at give dem en form."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"En figur skal gives for at CollisionShape fungerer. Opret en figur ressource "
+"til det!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7092,6 +7794,13 @@ 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
#, fuzzy
msgid "Path property must point to a valid Spatial node to work."
@@ -7113,7 +7822,7 @@ msgstr ""
"for at AnimatedSprite3D kan vise frames."
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7128,22 +7837,6 @@ msgstr "Advarsel!"
msgid "Please Confirm..."
msgstr "Bekræft venligst..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Ã…ben en Fil"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Ã…ben fil(er)"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Ã…bn en mappe"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Ã…bne en fil eller mappe"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "CTRL +"
@@ -7165,7 +7858,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7183,6 +7876,14 @@ msgstr ""
"den kan opnå en størrelse. Ellers gør den til en RenderTarget og tildel dens "
"indre textur til en node så den kan vises."
+#, fuzzy
+#~ msgid "Invalid unique name."
+#~ msgstr "Ugyldigt index egenskabsnavn."
+
+#, fuzzy
+#~ msgid "Invalid product GUID."
+#~ msgstr "Ugyldig skriftstørrelse."
+
#~ msgid "Path property must point to a valid Particles2D node to work."
#~ msgstr ""
#~ "Egenskaben Path skal pege på en gyldig Particles2D node for at virke."
diff --git a/editor/translations/de.po b/editor/translations/de.po
index 894f7b6028..837df7d62b 100644
--- a/editor/translations/de.po
+++ b/editor/translations/de.po
@@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2017-04-12 03:22+0000\n"
+"PO-Revision-Date: 2017-06-28 09:12+0000\n"
"Last-Translator: So Wieso <sowieso@dukun.de>\n"
"Language-Team: German <https://hosted.weblate.org/projects/godot-engine/"
"godot/de/>\n"
@@ -33,7 +33,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.13-dev\n"
+"X-Generator: Weblate 2.15-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -100,9 +100,8 @@ msgid "Anim Track Change Value Mode"
msgstr "Anim Spur ändere Wert Modus"
#: editor/animation_editor.cpp
-#, fuzzy
msgid "Anim Track Change Wrap Mode"
-msgstr "Anim Spur ändere Wert Modus"
+msgstr "Anim Spur ändere Wiederhol-Modus"
#: editor/animation_editor.cpp
msgid "Edit Node Curve"
@@ -164,7 +163,8 @@ msgstr "Gehe zum nächsten Schritt"
msgid "Goto Prev Step"
msgstr "Gehe zum vorherigen Schritt"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "Linear"
@@ -377,21 +377,19 @@ msgstr "Array-Wert ändern"
#: editor/asset_library_editor_plugin.cpp
msgid "Free"
-msgstr ""
+msgstr "Frei"
#: editor/asset_library_editor_plugin.cpp editor/editor_plugin_settings.cpp
msgid "Version:"
msgstr "Version:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Contents:"
-msgstr "Konstanten:"
+msgstr "Inhalt:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "View Files"
-msgstr "Datei"
+msgstr "Dateien anzeigen"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
#: editor/editor_help.cpp editor/property_selector.cpp
@@ -399,7 +397,8 @@ msgstr "Datei"
msgid "Description:"
msgstr "Beschreibung:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr "Installieren"
@@ -410,161 +409,153 @@ msgstr "Installieren"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Schließen"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
-msgstr ""
+msgstr "Kann Hostnamen nicht auflösen:"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve."
-msgstr ""
+msgstr "Kann nicht auflösen."
#: editor/asset_library_editor_plugin.cpp
msgid "Connection error, please try again."
-msgstr ""
+msgstr "Verbindungsfehler, bitte erneut versuchen."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect."
-msgstr "Verbinde.."
+msgstr "Kann nicht verbinden."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect to host:"
-msgstr "Verbinde mit Node:"
+msgstr "Kann nicht zu Host verbinden:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr ""
+msgstr "Keine Antwort von Host:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response."
-msgstr ""
+msgstr "Keine Antwort."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Request failed, return code:"
-msgstr "Angefordertes Dateiformat unbekannt:"
+msgstr "Anfrage fehlgeschlagen: Rückgabewert:"
#: editor/asset_library_editor_plugin.cpp
msgid "Req. Failed."
-msgstr ""
+msgstr "Anfrage fehlgeschlagen."
#: editor/asset_library_editor_plugin.cpp
msgid "Request failed, too many redirects"
-msgstr ""
+msgstr "Anfrage fehlgeschlagen, zu viele Weiterleitungen"
#: editor/asset_library_editor_plugin.cpp
msgid "Redirect Loop."
-msgstr ""
+msgstr "Weiterleitungsschleife."
#: editor/asset_library_editor_plugin.cpp
msgid "Failed:"
-msgstr ""
+msgstr "Fehlgeschlagen:"
#: editor/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
-msgstr ""
+msgstr "Falsche Download-Prüfsumme, Datei könnte manipuliert worden sein."
#: editor/asset_library_editor_plugin.cpp
msgid "Expected:"
-msgstr ""
+msgstr "Erwartet:"
#: editor/asset_library_editor_plugin.cpp
msgid "Got:"
-msgstr ""
+msgstr "Erhalten:"
#: editor/asset_library_editor_plugin.cpp
msgid "Failed sha256 hash check"
-msgstr ""
+msgstr "Sha256-Prüfung fehlgeschlagen"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Asset Download Error:"
-msgstr ""
+msgstr "Asset-Download-Fehler:"
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
-msgstr ""
+msgstr "Erfolgreich!"
#: editor/asset_library_editor_plugin.cpp
msgid "Fetching:"
-msgstr ""
+msgstr "Hole:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Resolving.."
-msgstr "Speichere.."
+msgstr "Löse auf.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Connecting.."
msgstr "Verbinde.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Requesting.."
-msgstr "Testphase"
+msgstr "Frage an.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Error making request"
-msgstr "Fehler beim speichern der Ressource!"
+msgstr "Fehler bei Anfrage"
#: editor/asset_library_editor_plugin.cpp
msgid "Idle"
-msgstr ""
+msgstr "Leerlauf"
#: editor/asset_library_editor_plugin.cpp
msgid "Retry"
-msgstr ""
+msgstr "Erneut versuchen"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Download Error"
-msgstr "Herunter"
+msgstr "Ãœbertragungsfehler"
#: editor/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr ""
+msgstr "Dieser Posten wird bereits herunter geladen!"
#: editor/asset_library_editor_plugin.cpp
msgid "first"
-msgstr ""
+msgstr "Anfang"
#: editor/asset_library_editor_plugin.cpp
msgid "prev"
-msgstr ""
+msgstr "zurück"
#: editor/asset_library_editor_plugin.cpp
msgid "next"
-msgstr ""
+msgstr "vor"
#: editor/asset_library_editor_plugin.cpp
msgid "last"
-msgstr ""
+msgstr "Ende"
#: editor/asset_library_editor_plugin.cpp
msgid "All"
msgstr "Alle"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "Suche:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "Suche"
@@ -580,7 +571,7 @@ msgstr "Suche"
msgid "Import"
msgstr "Import"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "Erweiterungen"
@@ -592,7 +583,7 @@ msgstr "Sortiere:"
msgid "Reverse"
msgstr "Umkehren"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "Kategorie:"
@@ -747,14 +738,14 @@ msgstr "Verbinde mit Node:"
#: 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.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
msgstr "Hinzufügen"
#: 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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "Entfernen"
@@ -863,7 +854,7 @@ msgid "Resource"
msgstr "Ressource"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "Pfad"
@@ -946,12 +937,196 @@ msgstr "Ressourcenauflistung verwaister Dateien"
msgid "Delete selected files?"
msgstr "Ausgewählte Dateien löschen?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Löschen"
+#: editor/editor_about.cpp
+msgid "Thanks from the Godot community!"
+msgstr "Danke von der Godot-Gemeinschaft!"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "Danke!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr "Godot-Engine-Mitwirkende"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "Autor:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "Projektverwaltung"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Lead Developer"
+msgstr "Entwickler"
+
+#: editor/editor_about.cpp editor/project_manager.cpp
+msgid "Project Manager"
+msgstr "Projektverwaltung"
+
+#: editor/editor_about.cpp
+msgid "Developers"
+msgstr "Entwickler"
+
+#: 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
+#, fuzzy
+msgid "All Components"
+msgstr "Inhalt:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "Inhalt:"
+
+#: 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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "Unkomprimiert"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "Paket erfolgreich installiert!"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "Paket erfolgreich installiert!"
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Effect"
+msgstr "Ereignis hinzufügen"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Öffne Audiobus-Layout"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Solo"
+msgstr "Öffne Audiobus-Layout"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Mute"
+msgstr "Öffne Audiobus-Layout"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Ausgewähltes löschen"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+msgstr "Unterszenen-Optionen"
+
+#: 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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "Duplizieren"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Ausgewähltes löschen"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "Audiobus hinzufügen"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Layout löschen"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Animation duplizieren"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "Aktion verschieben"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr "Audiobus-Layout speichern als…"
@@ -966,24 +1141,53 @@ msgid "Open Audio Bus Layout"
msgstr "Öffne Audiobus-Layout"
#: editor/editor_audio_buses.cpp
+msgid "There is no 'res://default_bus_layout.tres' file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"Ungültige Dateiendung.\n"
+"Nutze .font als Dateiendung."
+
+#: editor/editor_audio_buses.cpp
msgid "Add Bus"
-msgstr "%s hinzufügen"
+msgstr "Audiobus hinzufügen"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "Erstelle neue Ressource"
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "Lade"
#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Load an existing Bus Layout."
+msgstr "Lade eine bestehende Ressource von der Festplatte und bearbeite sie."
+
+#: editor/editor_audio_buses.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Save As"
msgstr "Speichern als"
-#: editor/editor_audio_buses.cpp editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Save this Bus Layout to a file."
+msgstr "Audiobus-Layout speichern als…"
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+msgid "Load Default"
msgstr "Standard"
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Ungültiger Name."
@@ -1090,6 +1294,11 @@ msgid "Updating scene.."
msgstr "Aktualisiere Szene..."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "Bitte speichere die Szene zuerst."
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "Wähle ein Verzeichnis"
@@ -1167,6 +1376,22 @@ msgstr "Alle Dateien (*)"
msgid "Open"
msgstr "Öffnen"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Datei öffnen"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Datei(en) öffnen"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Verzeichnis wählen"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Datei oder Verzeichnis öffnen"
+
#: 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
@@ -1293,6 +1518,15 @@ msgid "Signals:"
msgstr "Signale:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Animationen"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Konstanten:"
@@ -1309,7 +1543,8 @@ msgid "Search Text"
msgstr "Suchtext"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " Ausgabe:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1359,6 +1594,11 @@ msgid "Creating Thumbnail"
msgstr "Erzeuge Miniaturansicht"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "This operation can't be done without a tree root."
+msgstr "Diese Aktion kann nicht ohne eine Szene ausgeführt werden."
+
+#: editor/editor_node.cpp
msgid ""
"Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."
msgstr ""
@@ -1490,26 +1730,34 @@ msgid "Quick Open Script.."
msgstr "Schnell Skripte öffnen.."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "Ja"
+#, fuzzy
+msgid "Save & Close"
+msgstr "Datei speichern"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "Szene schließen? (Nicht gespeicherte Änderungen gehen verloren)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
msgstr "Szene speichern als.."
#: editor/editor_node.cpp
-#, fuzzy
msgid "No"
-msgstr "Node"
+msgstr "Nein"
+
+#: editor/editor_node.cpp
+msgid "Yes"
+msgstr "Ja"
#: editor/editor_node.cpp
msgid "This scene has never been saved. Save before running?"
msgstr "Diese Szene wurde nie gespeichert. Speichern vorm Starten?"
+#: editor/editor_node.cpp editor/scene_tree_dock.cpp
+msgid "This operation can't be done without a scene."
+msgstr "Diese Aktion kann nicht ohne eine Szene ausgeführt werden."
+
#: editor/editor_node.cpp
msgid "Export Mesh Library"
msgstr "MeshLibrary exportieren"
@@ -1519,12 +1767,9 @@ msgid "Export Tile Set"
msgstr "Tileset exportieren"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "Verlassen"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "Editor verlassen?"
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "Diese Aktion kann nicht ohne eine Szene ausgeführt werden."
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1549,18 +1794,52 @@ msgid "Quick Run Scene.."
msgstr "Schnell Szene starten.."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "Verlassen"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "Editor verlassen?"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "Projektverwaltung"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Datei speichern"
+
+#: 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 ""
-"Projektverwaltung öffnen?\n"
-"(Nicht gespeicherte Änderungen gehen verloren)"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "Wähle eine Hauptszene"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1600,6 +1879,11 @@ msgstr "Layout speichern"
msgid "Delete Layout"
msgstr "Layout löschen"
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+msgid "Default"
+msgstr "Standard"
+
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
msgstr "Szenentab wechseln"
@@ -1616,6 +1900,11 @@ msgstr "%d weitere Datei(en) oder Ordner"
msgid "Distraction Free Mode"
msgstr "Ablenkungsfreier Modus"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "Ablenkungsfreier Modus"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "Szene"
@@ -1633,9 +1922,8 @@ msgid "Previous tab"
msgstr "Vorheriger Tab"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Filter Files.."
-msgstr "Schnell Dateien filtern.."
+msgstr "Dateien filtern.."
#: editor/editor_node.cpp
msgid "Operations with scene files."
@@ -1665,10 +1953,6 @@ msgstr "Alle Szenen speichern"
msgid "Close Scene"
msgstr "Szene schließen"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr "Schließen und zur letzten Szene wechseln"
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "Zuletzt benutzte Szenen"
@@ -1705,9 +1989,8 @@ msgid "Miscellaneous project or scene-wide tools."
msgstr "Sonstiges Projekt oder szenenübergreifende Werkzeuge."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Project"
-msgstr "Neues Projekt"
+msgstr "Projekt"
#: editor/editor_node.cpp
msgid "Project Settings"
@@ -1822,9 +2105,8 @@ msgstr ""
"effizientesten das Netzwerk-Dateisystem zu nutzen."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Editor"
-msgstr "Bearbeiten"
+msgstr "Editor"
#: editor/editor_node.cpp editor/settings_config_dialog.cpp
msgid "Editor Settings"
@@ -1839,9 +2121,8 @@ msgid "Toggle Fullscreen"
msgstr "Vollbildmodus umschalten"
#: editor/editor_node.cpp editor/project_export.cpp
-#, fuzzy
msgid "Manage Export Templates"
-msgstr "Lade Exportvorlagen"
+msgstr "Verwalte Exportvorlagen"
#: editor/editor_node.cpp
msgid "Help"
@@ -1852,17 +2133,17 @@ msgid "Classes"
msgstr "Klassen"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Online Docs"
-msgstr "Dokumentation schließen"
+msgstr "Internetdokumentation"
#: editor/editor_node.cpp
msgid "Q&A"
-msgstr ""
+msgstr "Fragen&Antworten"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Issue Tracker"
-msgstr ""
+msgstr "Problem-Melder"
#: editor/editor_node.cpp
msgid "About"
@@ -1972,6 +2253,10 @@ msgstr "Node"
msgid "Output"
msgstr "Ausgabe"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "Neuimport"
@@ -1981,26 +2266,10 @@ msgid "Update"
msgstr "Update"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "Danke von der Godot-Gemeinschaft!"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "Danke!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "Vorlagen aus ZIP-Datei importieren"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "Projekt exportieren"
@@ -2021,38 +2290,41 @@ msgid "Open & Run a Script"
msgstr "Skript öffnen und ausführen"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "New Inherited"
+msgstr "Neue gererbte Szene.."
+
+#: editor/editor_node.cpp
msgid "Load Errors"
msgstr "Ladefehler"
+#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
+msgid "Select"
+msgstr "Auswählen"
+
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 2D Editor"
-msgstr "Im Editor öffnen"
+msgstr "2D Editor öffnen"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 3D Editor"
-msgstr "Im Editor öffnen"
+msgstr "3D Editor öffnen"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Script Editor"
-msgstr "Im Editor öffnen"
+msgstr "Skripteditor öffnen"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Asset Library"
-msgstr "Bibliothek exportieren"
+msgstr "Öffne Bibliothek"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the next Editor"
-msgstr "Im Editor öffnen"
+msgstr "Nächsten Editor öffnen"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the previous Editor"
-msgstr "Im Editor öffnen"
+msgstr "Vorigen Editor öffnen"
#: editor/editor_plugin_settings.cpp
msgid "Installed Plugins:"
@@ -2130,6 +2402,16 @@ msgstr "Importiere erneut"
msgid "Re-Import Changed Resources"
msgstr "Veränderte Ressourcen neu importieren"
+#: 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 "Spiellogik sollte mit der _run()-Methode beginnen."
@@ -2171,33 +2453,28 @@ msgid "Import From Node:"
msgstr "Aus Node importieren:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Re-Download"
-msgstr "Neu laden"
+msgstr "Erneut herunterladen"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Uninstall"
-msgstr "Installieren"
+msgstr "Deinstallieren"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "(Installed)"
-msgstr "Installieren"
+msgstr "(Installiert)"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Download"
-msgstr "Herunter"
+msgstr "Herunterladen"
#: editor/export_template_manager.cpp
msgid "(Missing)"
msgstr "(Fehlend)"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "(Current)"
-msgstr "Laufend:"
+msgstr "(Aktuell)"
#: editor/export_template_manager.cpp
msgid "Remove template version '%s'?"
@@ -2224,14 +2501,12 @@ msgid "No version.txt found inside templates."
msgstr "Keine version.txt in Templates gefunden."
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error creating path for templates:\n"
-msgstr "Fehler beim speichern des Atlas:"
+msgstr "Fehler bei Erzeugen des Pfads für die Vorlagen:\n"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Extracting Export Templates"
-msgstr "Lade Exportvorlagen"
+msgstr "Extrahiere Exportvorlagen"
#: editor/export_template_manager.cpp
msgid "Importing:"
@@ -2242,34 +2517,28 @@ msgid "Loading Export Templates"
msgstr "Lade Exportvorlagen"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Current Version:"
-msgstr "Aktuelle Szene"
+msgstr "Aktuelle Version:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Installed Versions:"
-msgstr "Installierte Erweiterungen:"
+msgstr "Installierte Versionen:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Install From File"
-msgstr "Installiere Projekt:"
+msgstr "Installiere aus Datei"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Remove Template"
-msgstr "Entferne Element"
+msgstr "Entferne Vorlage"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Select template file"
-msgstr "Ausgewählte Dateien löschen?"
+msgstr "Vorlagendatei wählen"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Export Template Manager"
-msgstr "Lade Exportvorlagen"
+msgstr "Exportvorlagenverwaltung"
#: editor/file_type_cache.cpp
msgid "Can't open file_type_cache.cch for writing, not saving file type cache!"
@@ -2282,10 +2551,28 @@ msgid "Cannot navigate to '"
msgstr "Kann Ordner ‚"
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "Speichern & neu importieren"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "Quelle:"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr "Quell- und Zieldatei sind gleich, ignoriere Anweisung."
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr "Quell- und Zielpfad sind gleich, ignoriere Anweisung."
@@ -2294,6 +2581,20 @@ msgid "Can't move directories to within themselves."
msgstr "Verzeichnisse lassen sich nicht in sich selbst verschieben."
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Fehler beim Laden des Bilds:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Fehler beim importieren:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr "Kann mit ‚..‘ nicht arbeiten"
@@ -2306,9 +2607,8 @@ msgid "No files selected!"
msgstr "Keine Dateien ausgewählt!"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Expand all"
-msgstr "Auf übergeordnetes Node ausdehnen"
+msgstr "Alle expandieren"
#: editor/filesystem_dock.cpp
msgid "Collapse all"
@@ -2371,6 +2671,12 @@ msgid "Instance the selected scene(s) as child of the selected node."
msgstr "Instantiiere gewählte Szene(n) als Unterobjekt des ausgewählten Nodes."
#: editor/filesystem_dock.cpp
+msgid ""
+"Scanning Files,\n"
+"Please Wait.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Move"
msgstr "Verschieben"
@@ -2382,10 +2688,31 @@ msgstr "Zu Gruppe hinzufügen"
msgid "Remove from Group"
msgstr "Aus Gruppe entfernen"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "Oberfläche %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+msgstr "Szene wird importiert.."
+
+#: 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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "3D-Szene importieren"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2424,21 +2751,26 @@ msgid "Saving.."
msgstr "Speichere.."
#: editor/import_dock.cpp
-#, fuzzy
+msgid "Set as Default for '%s'"
+msgstr ""
+
+#: editor/import_dock.cpp
+msgid "Clear Default for '%s'"
+msgstr ""
+
+#: editor/import_dock.cpp
msgid " Files"
-msgstr "Datei"
+msgstr " Dateien"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Import As:"
-msgstr "Import"
+msgstr "Importiere als:"
#: editor/import_dock.cpp editor/property_editor.cpp
msgid "Preset.."
msgstr "Voreinstellungen.."
#: editor/import_dock.cpp
-#, fuzzy
msgid "Reimport"
msgstr "Neuimport"
@@ -2513,13 +2845,12 @@ msgid "No target font resource!"
msgstr "Keine Zielschriftart-Ressource!"
#: editor/io_plugins/editor_font_import_plugin.cpp
-#, fuzzy
msgid ""
"Invalid file extension.\n"
"Please use .font."
msgstr ""
"Ungültige Dateiendung.\n"
-"Nutze .fnt als Dateiendung."
+"Nutze .font als Dateiendung."
#: editor/io_plugins/editor_font_import_plugin.cpp
msgid "Can't load/process source font."
@@ -2618,6 +2949,10 @@ msgstr "Quell Mesh(es):"
msgid "Mesh"
msgstr "Mesh"
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "Oberfläche %d"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr "Keine Samples zu importieren!"
@@ -2998,9 +3333,8 @@ msgid "Compress"
msgstr "Komprimieren"
#: editor/io_plugins/editor_translation_import_plugin.cpp
-#, fuzzy
msgid "Add to Project (project.godot)"
-msgstr "Zu Projekt hinzufügen (engine.cfg)"
+msgstr "Zu Projekt hinzufügen (project.godot)"
#: editor/io_plugins/editor_translation_import_plugin.cpp
msgid "Import Languages:"
@@ -3039,9 +3373,8 @@ msgid "Change Animation Name:"
msgstr "Animationsname ändern:"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Delete Animation?"
-msgstr "Animation duplizieren"
+msgstr "Animation löschen?"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -3204,6 +3537,11 @@ msgid "New name:"
msgstr "Neuer Name:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Nodefilter bearbeiten"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr "Skalierung:"
@@ -3521,6 +3859,7 @@ msgstr "Macht Unterobjekte dieses Objekts wieder auswählbar."
#: 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Bearbeiten"
@@ -3553,10 +3892,6 @@ msgid "Use Pixel Snap"
msgstr "Pixelraster benutzen"
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr "Auf übergeordnetes Node ausdehnen"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr "Skelett.."
@@ -3665,11 +4000,6 @@ msgstr "Diese Aktion benötigt ein einzelnes ausgewähltes Node."
msgid "Change default type"
msgstr "Standardtyp ändern"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "OK"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3709,6 +4039,14 @@ msgstr "Polygon bearbeiten (Punkt entfernen)"
msgid "Create a new polygon from scratch."
msgstr "Polygon von Grund auf neu erstellen."
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr "Polygon3D erstellen"
@@ -3749,23 +4087,53 @@ msgstr "Aus Szene aktualisieren"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
-msgid "Add point"
-msgstr "Eingang hinzufügen"
+msgid "Modify Curve Point"
+msgstr "Kurve ändern"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "Verändere Curve-Map"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Load Curve Preset"
+msgstr "Vorlage laden"
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Add point"
+msgstr "Punkt hinzufügen"
+
+#: editor/plugins/curve_editor_plugin.cpp
msgid "Remove point"
-msgstr "Pfadpunkt entfernen"
+msgstr "Punkt entfernen"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Left linear"
+msgstr "Linear"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Right linear"
+msgstr "Sicht von rechts"
+
+#: editor/plugins/curve_editor_plugin.cpp
msgid "Load preset"
-msgstr "Ressource laden"
+msgstr "Vorlage laden"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
-msgid "Modify Curve"
-msgstr "Verändere Curve-Map"
+msgid "Remove Curve Point"
+msgstr "Pfadpunkt entfernen"
+
+#: 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"
@@ -3789,6 +4157,12 @@ msgid "Item List Editor"
msgstr "Auflistungseditor"
#: 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 "Occluder-Polygon erzeugen"
@@ -3813,19 +4187,16 @@ msgid "RMB: Erase Point."
msgstr "RMT: Punkt entfernen."
#: editor/plugins/line_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Point from Line2D"
-msgstr "Punkt von Kurve entfernen"
+msgstr "Punkt von Line2D entfernen"
#: editor/plugins/line_2d_editor_plugin.cpp
-#, fuzzy
msgid "Add Point to Line2D"
-msgstr "Punkt zu Kurve hinzufügen"
+msgstr "Punkt zu Line2D hinzufügen"
#: editor/plugins/line_2d_editor_plugin.cpp
-#, fuzzy
msgid "Move Point in Line2D"
-msgstr "Punkt auf Kurve verschieben"
+msgstr "Punkt in Line2D verschieben"
#: editor/plugins/line_2d_editor_plugin.cpp
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -3858,9 +4229,8 @@ msgid "Add Point (in empty space)"
msgstr "Punkt hinzufügen (in leerem Raum)"
#: editor/plugins/line_2d_editor_plugin.cpp
-#, fuzzy
msgid "Split Segment (in line)"
-msgstr "Segment aufteilen (in Kurve)"
+msgstr "Segment aufteilen (in Linie)"
#: editor/plugins/line_2d_editor_plugin.cpp
#: editor/plugins/path_2d_editor_plugin.cpp
@@ -4055,13 +4425,14 @@ msgstr "Emissionsmaske leeren"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generating AABB"
msgstr "Erzeuge AABB"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
+"Punkt kann nur in ein Prozessmaterial des Typs ParticlesMaterial gesetzt "
+"werden"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Error loading image:"
@@ -4077,36 +4448,38 @@ msgstr "Emissionsmaske setzen"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generate Visibility Rect"
-msgstr ""
+msgstr "Generiere Sichtbarkeits-Rechteck"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Emissionsmaske laden"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
+msgid "Particles"
+msgstr "Vertices"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
msgstr "Anzahl generierter Punkte:"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generation Time (sec):"
-msgstr "Durchschnittszeit (Sek)"
+msgstr "Erzeugungszeit (s):"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Emission Mask"
-msgstr "Emissionsmaske setzen"
+msgstr "Emissionsmaske"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Capture from Pixel"
-msgstr "Von Szene erstellen"
+msgstr "Von Pixel aufnehmen"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Emission Colors"
-msgstr "Emissionsorte:"
+msgstr "Emissionsfarben"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Node does not contain geometry."
@@ -4133,14 +4506,12 @@ msgid "Generate AABB"
msgstr "Erzeuge AABB"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Create Emission Points From Mesh"
-msgstr "Erzeuge Emittent aus Mesh"
+msgstr "Erzeuge Emissionspunkte aus Mesh"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Create Emission Points From Node"
-msgstr "Erzeuge Emittent aus Node"
+msgstr "Erzeuge Emissionspunkte aus Node"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Clear Emitter"
@@ -4151,14 +4522,12 @@ msgid "Create Emitter"
msgstr "Erzeuge Emittent"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Emission Points:"
-msgstr "Emissionsorte:"
+msgstr "Emissionspunkte:"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Surface Points"
-msgstr "Oberfläche %d"
+msgstr "Oberflächenpunkte"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Surface Points+Normal (Directed)"
@@ -4169,28 +4538,24 @@ msgid "Volume"
msgstr "Volumen"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Emission Source: "
-msgstr "Emissionsfüllung:"
+msgstr "Emissionsquelle: "
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generate Visibility AABB"
-msgstr "Erzeuge AABB"
+msgstr "Erzeuge Sichtbarkeits-AABB"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Punkt von Kurve entfernen"
#: editor/plugins/path_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Out-Control from Curve"
-msgstr "Ausgangsgriff auf Kurve verschieben"
+msgstr "Ausgangsgriff von Kurve löschen"
#: editor/plugins/path_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove In-Control from Curve"
-msgstr "Punkt von Kurve entfernen"
+msgstr "Eingangsgriff von Kurve entfernen"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
@@ -4248,14 +4613,12 @@ msgid "Remove Path Point"
msgstr "Pfadpunkt entfernen"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Remove Out-Control Point"
-msgstr "Ausgangsgriff auf Kurve verschieben"
+msgstr "Ausgangskontrollpunkt löschen"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Remove In-Control Point"
-msgstr "Eingangsgriff auf Kurve verschieben"
+msgstr "Eingangskontrollpunkt löschen"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create UV Map"
@@ -4410,9 +4773,14 @@ msgid "Pitch"
msgstr "Tonhöhe"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Clear Recent Files"
-msgstr "Knochen entfernen"
+msgstr "Letzte Dateien leeren"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid ""
+"Close and save changes?\n"
+"\""
+msgstr ""
#: editor/plugins/script_editor_plugin.cpp
msgid "Error while saving theme"
@@ -4439,6 +4807,10 @@ msgid "Save Theme As.."
msgstr "Motiv speichern als.."
#: editor/plugins/script_editor_plugin.cpp
+msgid " Class Reference"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Next script"
msgstr "Nächstes Skript"
@@ -4491,6 +4863,11 @@ msgid "Close All"
msgstr "Alle schließen"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Scripts Panel"
+msgstr "Favoriten ein- und ausblenden"
+
+#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Find.."
@@ -4523,6 +4900,11 @@ msgid "Keep Debugger Open"
msgstr "Debugger offen halten"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "Nächsten Editor öffnen"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr "Fenster"
@@ -4535,9 +4917,8 @@ msgid "Move Right"
msgstr "nach rechts"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open Godot online documentation"
-msgstr "Durchsuche die Referenzdokumentation."
+msgstr "Öffne Godot-Referenzdokumentation"
#: editor/plugins/script_editor_plugin.cpp
msgid "Search the class hierarchy."
@@ -4556,9 +4937,8 @@ msgid "Go to next edited document."
msgstr "Springe zum nächsten bearbeiteten Dokument."
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Discard"
-msgstr "Einzeln"
+msgstr "Verwerfen"
#: editor/plugins/script_editor_plugin.cpp
msgid "Create Script"
@@ -4592,25 +4972,28 @@ msgstr ""
"Szene geladen ist"
#: 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 "Farbe auswählen"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert Case"
-msgstr "Bilder werden konvertiert"
+msgstr "Groß-/Kleinschreibung ändern"
#: editor/plugins/script_text_editor.cpp
msgid "Uppercase"
-msgstr ""
+msgstr "Großbuchstaben"
#: editor/plugins/script_text_editor.cpp
msgid "Lowercase"
-msgstr ""
+msgstr "Kleinbuchstaben"
#: editor/plugins/script_text_editor.cpp
msgid "Capitalize"
-msgstr ""
+msgstr "Kapitalisiere"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp scene/gui/line_edit.cpp
@@ -4639,6 +5022,11 @@ msgid "Move Down"
msgstr "Schiebe herunter"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Punk löschen"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr "Nach links einrücken"
@@ -4664,11 +5052,11 @@ msgstr "kürze Leerraum am Zeilenende"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Spaces"
-msgstr ""
+msgstr "Konvertiere Einrückung zu Leerzeichen"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Tabs"
-msgstr ""
+msgstr "Konvertiere Einrückung zu Tabulatoren"
#: editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
@@ -4692,14 +5080,12 @@ msgid "Goto Previous Breakpoint"
msgstr "Springe zum vorigen Haltepunkt"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert To Uppercase"
-msgstr "Umwandeln zu.."
+msgstr "In Großbuchstaben konvertieren"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert To Lowercase"
-msgstr "Umwandeln zu.."
+msgstr "In Kleinbuchstaben konvertieren"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
@@ -4726,7 +5112,7 @@ msgstr "Kontexthilfe"
#: editor/plugins/shader_editor_plugin.cpp
msgid "Shader"
-msgstr ""
+msgstr "Shader"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Scalar Constant"
@@ -4945,63 +5331,28 @@ msgid "Animation Key Inserted."
msgstr "Animationsschlüsselbild eingefügt."
#: 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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "Vor"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "Rückwärts"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "Mausrad runter."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
-msgstr ""
+msgstr "Gezeichnete Objekte"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Material Changes"
-msgstr "Änderungen aktualisieren"
+msgstr "Materialänderungen"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Shader Changes"
-msgstr "Änderungen aktualisieren"
+msgstr "Shader-Änderungen"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Surface Changes"
-msgstr "Änderungen aktualisieren"
+msgstr "Oberflächen-Änderungen"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Draw Calls"
-msgstr ""
+msgstr "Zeichenaufrufe"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Vertices"
-msgstr "Vertex"
+msgstr "Vertices"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align with view"
@@ -5020,33 +5371,81 @@ msgid "Display Overdraw"
msgstr "Overdraw-Ansicht"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Display Unshaded"
-msgstr "Shadeless-Ansicht"
+msgstr "Nicht Schattiertes anzeigen"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Environment"
-msgstr "Umgebung"
+msgstr "Environment anzeigen"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Gizmos"
-msgstr "Gizmos"
+msgstr "Griffe anzeigen"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Information"
-msgstr ""
+msgstr "Sicht-Informationen"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Audio Listener"
msgstr "Audiosenke"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Doppler Enable"
+msgstr "Aktivieren"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Left"
+msgstr "Freisicht Links"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Right"
+msgstr "Freisicht Rechts"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Forward"
+msgstr "Freisicht Vorwärts"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Backwards"
+msgstr "Freisicht Rückwärts"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr "Freisicht Hoch"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Down"
+msgstr "Freisicht Runter"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr "Freisicht Geschwindigkeitsregler"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "preview"
+msgstr "Vorschau"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr "Transformationsdialog"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "Auswahlmodus"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid ""
+"Drag: Rotate\n"
+"Alt+Drag: Move\n"
+"Alt+RMB: Depth list selection"
+msgstr "Alt+Rechtsklick: Listenauswahl nach Tiefe"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode (W)"
msgstr "Bewegungsmodus (W)"
@@ -5103,24 +5502,20 @@ msgid "Align Selection With View"
msgstr "Auswahl auf Ansicht ausrichten"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Select"
-msgstr "Auswählen"
+msgstr "Werkzeugauswahl"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Move"
-msgstr "Verschieben"
+msgstr "Werkzeug Verschieben"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Rotate"
-msgstr "Strg: Rotieren"
+msgstr "Werkzeug Drehen"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Scale"
-msgstr "Skalierung:"
+msgstr "Werkzeug Skalieren"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform"
@@ -5167,6 +5562,7 @@ msgid "View Grid"
msgstr "Zeige Gitter"
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "Einstellungen"
@@ -5295,6 +5691,11 @@ msgid "StyleBox Preview:"
msgstr "StyleBox-Vorschau:"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
+msgid "Set Region Rect"
+msgstr "Skalierungsbegrenzungseditor"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
msgstr "Einrastmodus:"
@@ -5352,6 +5753,16 @@ msgid "Remove Item"
msgstr "Entferne Element"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Entferne Klassen-Element"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Entfernen"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr "Motiv"
@@ -5419,7 +5830,7 @@ msgstr "Tab 2"
msgid "Tab 3"
msgstr "Tab 3"
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr "Typ:"
@@ -5441,12 +5852,27 @@ msgid "Color"
msgstr "Farbe"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Lösche Auswahl"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr "Zeichne TileMap"
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "Duplizieren"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "Linear"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Bucket Fill"
+msgstr "Eimer"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5481,10 +5907,6 @@ msgid "Pick Tile"
msgstr "Wähle Kachel"
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr "Auswählen"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr "Drehe auf 0 Grad"
@@ -5529,26 +5951,22 @@ msgid "Error"
msgstr "Fehler"
#: editor/project_export.cpp
-#, fuzzy
msgid "Runnable"
-msgstr "Aktivieren"
+msgstr "ausführbar"
#: editor/project_export.cpp
-#, fuzzy
msgid "Delete patch '"
-msgstr "Eingang löschen"
+msgstr "Patch von Liste löschen"
#: editor/project_export.cpp
-#, fuzzy
msgid "Delete preset '%s'?"
-msgstr "Ausgewählte Dateien löschen?"
+msgstr "Vorlage ‚%s‘ löschen?"
#: editor/project_export.cpp
-#, fuzzy
msgid "Presets"
-msgstr "Voreinstellungen.."
+msgstr "Vorlagen"
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "Hinzufügen.."
@@ -5557,77 +5975,84 @@ msgid "Resources"
msgstr "Ressourcen"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export all resources in the project"
-msgstr "Exportiere alle Ressourcen des Projekts."
+msgstr "Exportiere alle Ressourcen des Projekts"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export selected scenes (and dependencies)"
-msgstr "Exportiere ausgewählte Ressourcen (inklusive Abhängigkeiten)."
+msgstr "Exportiere ausgewählte Ressourcen (inklusive Abhängigkeiten)"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export selected resources (and dependencies)"
-msgstr "Exportiere ausgewählte Ressourcen (inklusive Abhängigkeiten)."
+msgstr "Exportiere ausgewählte Ressourcen (inklusive Abhängigkeiten)"
#: editor/project_export.cpp
msgid "Export Mode:"
msgstr "Export-Modus:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Resources to export:"
msgstr "Zu exportierende Ressourcen:"
#: editor/project_export.cpp
-#, fuzzy
msgid ""
"Filters to export non-resource files (comma separated, e.g: *.json, *.txt)"
msgstr ""
"Filter um Nicht-Ressourcendateien zu exportieren (durch Kommata getrennt, z."
-"B.: *.json, *.txt):"
+"B.: *.json, *.txt)"
#: editor/project_export.cpp
-#, fuzzy
msgid ""
"Filters to exclude files from project (comma separated, e.g: *.json, *.txt)"
msgstr ""
"Filter um vom Export auszuschließen (durch Kommata getrennt, z.B.: *.json, *."
-"txt):"
+"txt)"
#: editor/project_export.cpp
-#, fuzzy
msgid "Patches"
-msgstr "Treffer:"
+msgstr "Patche"
#: editor/project_export.cpp
-#, fuzzy
msgid "Make Patch"
-msgstr "Zielpfad:"
+msgstr "Erstelle Patch"
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "Textur"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "Methodenliste:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr "Exportiere PCK/Zip"
#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr "Export-Templates für diese Systeme fehlen:"
#: editor/project_export.cpp
-#, fuzzy
msgid "Export With Debug"
-msgstr "Tileset exportieren"
+msgstr "Exportiere mit Debuginformationen"
#: editor/project_manager.cpp
msgid "Invalid project path, the path must exist!"
msgstr "Ungültiger Projektpfad, der Pfad muss existieren!"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project path, project.godot must not exist."
-msgstr "Ungültiger Projektpfad, engine.cfg darf nicht existieren."
+msgstr "Ungültiger Projektpfad, project.godot darf nicht existieren."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project path, project.godot must exist."
-msgstr "Ungültiger Projektpfad, engine.cfg muss existieren."
+msgstr "Ungültiger Projektpfad, project.godot muss existieren."
#: editor/project_manager.cpp
msgid "Imported Project"
@@ -5638,19 +6063,14 @@ msgid "Invalid project path (changed anything?)."
msgstr "Ungültiger Projektpfad (etwas geändert?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't create project.godot in project path."
-msgstr "Konnte engine.cfg in Projektpfad nicht erzeugen."
+msgstr "Konnte project.godot im Projektpfad nicht erzeugen."
#: editor/project_manager.cpp
msgid "The following files failed extraction from package:"
msgstr "Die folgenden Dateien ließen sich nicht aus dem Paket extrahieren:"
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr "Paket erfolgreich installiert!"
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "Existierendes Projekt importieren"
@@ -5695,6 +6115,22 @@ msgid "Are you sure to open more than one project?"
msgstr "Sollen wirklich mehrere Projekte geöffnet werden?"
#: 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 ""
+"Es ist keine Hauptszene definiert worden.\n"
+"Wähle eine in den Projekteinstellungen unter der Kategorie „Anwendung“."
+
+#: 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 "Sollen wirklich mehrere Projekte ausgeführt werden?"
@@ -5711,10 +6147,6 @@ msgid ""
msgstr "Sollen wirklich %s Ordner nach Godot-Projekten durchsucht werden?"
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr "Projektverwaltung"
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr "Projektliste"
@@ -5735,273 +6167,303 @@ msgid "New Project"
msgstr "Neues Projekt"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Templates"
-msgstr "Entferne Element"
+msgstr "Vorlagen"
#: editor/project_manager.cpp
msgid "Exit"
msgstr "Verlassen"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Kann nicht verbinden."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "Taste "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr "Joysticktaste"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr "Joystickachse"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr "Maustaste"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr "Ungültiger Name für Aktion (alle Zeichen außer ‚/‘ und ‚:‘ möglich)."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr "Aktion ‚%s‘ existiert bereits!"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr "Eingabeaktionsereignis umbenennen"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr "Eingabeaktionsereignis hinzufügen"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Umschalt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr "Steuerung+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "Drücke eine Taste.."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr "Maustasten-Index:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr "Linke Taste"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr "Rechte Taste"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr "Mittlere Taste"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr "Mausrad hoch"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr "Mausrad herunter"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr "Taste 6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr "Taste 7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr "Taste 8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr "Taste 9"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Ändern"
+
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Axis Index:"
msgstr "Joystickachsen-Index:"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "Achse"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Button Index:"
msgstr "Joysticktasten-Index:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr "Füge Eingabeaktion hinzu"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr "Lösche Eingabeaktionsereignis"
-#: editor/project_settings.cpp
-#, fuzzy
+#: editor/project_settings_editor.cpp
msgid "Add Event"
-msgstr "Empty einfügen"
+msgstr "Ereignis hinzufügen"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "Gerät"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Schaltfläche"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "Linke Taste."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "Rechte Taste."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "Mittlere Taste."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "Mausrad hoch."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "Mausrad runter."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Getter-Eigenschaft hinzufügen"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "No property '"
+msgstr "Eigenschaft:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "Einstellungen"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "Eingang löschen"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "Fehler beim Speichern der Einstellungen."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "Einstellungen gespeichert OK."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr "Übersetzung hinzufügen"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "Ãœbersetzung entfernen"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr "Remap-Pfad hinzufügen"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr "Ressourcen-Remap hinzufügen"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr "Ändere Zielsprache des Ressourcen-Remaps"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr "Ressourcen-Remap entfernen"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr "Ressourcen-Remap-Option entfernen"
-#: editor/project_settings.cpp
-#, fuzzy
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
-msgstr "Projekteinstellungen (engine.cfg)"
+msgstr "Projekteinstellungen (project.godot)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr "Allgemein"
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr "Eigenschaft:"
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr "Entfernen"
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr "Kopiere zu Plattform.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
+msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr "Eingabe Zuordnung"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr "Aktion:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr "Gerät:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr "Index:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr "Lokalisierung"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr "Ãœbersetzungen"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr "Ãœbersetzungen:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr "Neu zuweisen"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr "Ressourcen:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr "Remaps nach Lokalisierung:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr "Lokalisierung"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "Autoload"
#: editor/property_editor.cpp
-#, fuzzy
msgid "Pick a Viewport"
-msgstr "Eine Ansicht"
+msgstr "Viewport auswählen"
#: editor/property_editor.cpp
msgid "Ease In"
@@ -6036,13 +6498,17 @@ msgid "Assign"
msgstr "Zuweisen"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Wähle ein Node"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr "Neues Skript"
#: editor/property_editor.cpp
-#, fuzzy
msgid "Show in File System"
-msgstr "Dateisystem"
+msgstr "Im Dateisystem anzeigen"
#: editor/property_editor.cpp
msgid "Error loading file: Not a resource!"
@@ -6050,8 +6516,12 @@ msgstr "Fehler beim Laden der Datei: Keine Ressource!"
#: editor/property_editor.cpp
#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "Selektiere Node(s) für den Import"
+
+#: editor/property_editor.cpp
msgid "Pick a Node"
-msgstr "Wähle ein Node"
+msgstr "Node auswählen"
#: editor/property_editor.cpp
msgid "Bit %d, val %d."
@@ -6146,6 +6616,11 @@ msgstr "Hauptszenen Parameter:"
msgid "Scene Run Settings"
msgstr "Szenenausführungseinstellungen"
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "OK"
+
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
msgstr ""
@@ -6193,10 +6668,6 @@ msgid "Delete Node(s)?"
msgstr "Lösche Node(s)?"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "Diese Aktion kann nicht ohne eine Szene ausgeführt werden."
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr "Lässt sich nicht an Root-Node ausführen."
@@ -6209,6 +6680,18 @@ msgid "Save New Scene As.."
msgstr "Speichere neue Szene als.."
#: editor/scene_tree_dock.cpp
+msgid "Editable Children"
+msgstr "bearbeitbare Unterobjekte"
+
+#: editor/scene_tree_dock.cpp
+msgid "Load As Placeholder"
+msgstr "Als Platzhalter laden"
+
+#: editor/scene_tree_dock.cpp
+msgid "Discard Instancing"
+msgstr "Instantiierung verwerfen"
+
+#: editor/scene_tree_dock.cpp
msgid "Makes Sense!"
msgstr "Verstehe!"
@@ -6241,9 +6724,8 @@ msgid "Error duplicating scene to save it."
msgstr "Fehler beim Duplizieren der Szene zum Speichern."
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Sub-Resources:"
-msgstr "Ressourcen:"
+msgstr "Unter-Ressourcen:"
#: editor/scene_tree_dock.cpp
msgid "Edit Groups"
@@ -6254,6 +6736,14 @@ msgid "Edit Connections"
msgstr "Verbindungen bearbeiten"
#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance"
+msgstr "Leere Vererbung"
+
+#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
+msgid "Open in Editor"
+msgstr "Im Editor öffnen"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)"
msgstr "Node(s) löschen"
@@ -6286,9 +6776,8 @@ msgid "Save Branch as Scene"
msgstr "Speichere Verzweigung als Szene"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Copy Node Path"
-msgstr "Pfad kopieren"
+msgstr "Node-Pfad kopieren"
#: editor/scene_tree_dock.cpp
msgid "Delete (No Confirm)"
@@ -6307,6 +6796,11 @@ msgstr ""
"kein Root-Node existiert."
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "Filter"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr "Ein neues oder existierendes Skript zum ausgewählten Node hinzufügen."
@@ -6314,6 +6808,14 @@ msgstr "Ein neues oder existierendes Skript zum ausgewählten Node hinzufügen."
msgid "Clear a script for the selected node."
msgstr "Leere ein Skript für das ausgewählte Node."
+#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance? (No Undo!)"
+msgstr "Vererbung wirklich leeren? (Lässt sich nicht rückgängig machen!)"
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear!"
+msgstr "Leeren!"
+
#: editor/scene_tree_editor.cpp
msgid "Toggle Spatial Visible"
msgstr "Spatial-Sichtbarkeit umschalten"
@@ -6324,56 +6826,59 @@ msgstr "CanvasItem-Sichtbarkeit umschalten"
#: editor/scene_tree_editor.cpp
msgid "Node configuration warning:"
-msgstr ""
+msgstr "Node-Konfigurationswarnung:"
#: editor/scene_tree_editor.cpp
msgid ""
"Node has connection(s) and group(s)\n"
"Click to show signals dock."
msgstr ""
+"Node hat Verbindungen und Gruppen\n"
+"Hier klicken zur Signalverwaltung."
#: editor/scene_tree_editor.cpp
msgid ""
"Node has connections.\n"
"Click to show signals dock."
msgstr ""
+"Node hat Verbindungen.\n"
+"Hier klicken zur Signalverwaltung."
#: editor/scene_tree_editor.cpp
msgid ""
"Node is in group(s).\n"
"Click to show groups dock."
msgstr ""
-
-#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "Fehlerbehebungsoptionen"
+"Node ist in Gruppe(n).\n"
+"Hier klicken zur Gruppenverwaltung."
#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr "Instanz:"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Open script"
-msgstr "Nächstes Skript"
+msgstr "Skript öffnen"
#: editor/scene_tree_editor.cpp
msgid ""
"Node is locked.\n"
"Click to unlock"
msgstr ""
+"Node ist gesperrt.\n"
+"Hier klicken zum entsperren"
#: editor/scene_tree_editor.cpp
msgid ""
"Children are not selectable.\n"
"Click to make selectable"
msgstr ""
+"Unterobjekte sind nicht auswählbar.\n"
+"Hier klicken um auswählbar zu machen"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Toggle Visibility"
-msgstr "Spatial-Sichtbarkeit umschalten"
+msgstr "Sichtbarkeit umschalten"
#: editor/scene_tree_editor.cpp
msgid "Invalid node name, the following characters are not allowed:"
@@ -6389,32 +6894,9 @@ msgid "Scene Tree (Nodes):"
msgstr "Szenenbaum (Nodes):"
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr "bearbeitbare Unterobjekte"
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr "Als Platzhalter laden"
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr "Instantiierung verwerfen"
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr "Im Editor öffnen"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr "Leere Vererbung"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr "Vererbung wirklich leeren? (Lässt sich nicht rückgängig machen!)"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr "Leeren!"
+#, fuzzy
+msgid "Node Configuration Warning!"
+msgstr "Node-Konfigurationswarnung:"
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -6422,14 +6904,22 @@ msgstr "Wähle ein Node"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Fehler beim Laden des Bilds:"
+
+#: editor/script_create_dialog.cpp
msgid "Error - Could not create script in filesystem."
-msgstr "Skript konnte nicht im Dateisystem erstellt werden."
+msgstr "Fehler - Skript konnte nicht im Dateisystem erstellt werden."
#: editor/script_create_dialog.cpp
msgid "Error loading script from %s"
msgstr "Fehler beim Laden des Skripts von %s"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "Nicht verfügbar"
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "Pfad ist leer"
@@ -6447,68 +6937,55 @@ msgstr "Ungültige Erweiterung"
#: editor/script_create_dialog.cpp
msgid "Wrong extension chosen"
-msgstr ""
+msgstr "Falsche Erweiterung gewählt"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid Path"
-msgstr "Ungültiger Pfad."
+msgstr "Ungültiger Pfad"
#: editor/script_create_dialog.cpp
msgid "Invalid class name"
msgstr "Ungültiger Klassenname"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid inherited parent name or path"
-msgstr "Ungültiger Name der Index-Eigenschaft."
+msgstr "Ungültiger geerbter Name oder Pfad"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script valid"
-msgstr "Skript"
+msgstr "Skript gültig"
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9 and _"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr "Nicht verfügbar"
+msgstr "Erlaubt: a-z, A-Z, 0-9 und _"
#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
-msgstr ""
+msgstr "Eingebettetes Skript (in Szenedatei)"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Create new script file"
-msgstr "Neues Skript erstellen"
+msgstr "Neue Skriptdatei erstellen"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Load existing script file"
-msgstr "Lade bestehendes Skript"
+msgstr "Lade bestehende Skriptdatei"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Inherits"
-msgstr "Erbt:"
+msgstr "Erbt"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Class Name"
-msgstr "Klassenname:"
+msgstr "Klassenname"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Template"
-msgstr "Entferne Element"
+msgstr "Vorlage"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Built-in Script"
-msgstr "Built-In-Skript"
+msgstr "Eingebettetes Skript"
#: editor/script_create_dialog.cpp
msgid "Attach Node Script"
@@ -6647,6 +7124,10 @@ msgid "Change Light Radius"
msgstr "Ändere Lichtradius"
#: editor/spatial_editor_gizmos.cpp
+msgid "Change AudioStreamPlayer3D Emission Angle"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
msgstr "Ändere FOV der Kamera"
@@ -6680,12 +7161,12 @@ msgstr "Ändere Ausmaße des Benachrichtigers"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Particles AABB"
-msgstr ""
+msgstr "Ändere Partikel AABB"
#: editor/spatial_editor_gizmos.cpp
#, fuzzy
msgid "Change Probe Extents"
-msgstr "Ändere Ausmaße des Benachrichtigers"
+msgstr "Sondenausmaße ändern"
#: modules/gdscript/gd_functions.cpp
#: modules/visual_script/visual_script_builtin_funcs.cpp
@@ -6733,6 +7214,137 @@ msgstr "Ungültiges Instanz-Verzeichnisformat (ungültiges Skript in @path)"
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "Ungültiges Instanz-Verzeichnisformat (ungültige Unterklasse)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Ausgewähltes löschen"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Auswahl duplizieren"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Snap View"
+msgstr "Sicht von oben"
+
+#: 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
+#, fuzzy
+msgid "Clip Disabled"
+msgstr "Deaktiviert"
+
+#: 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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "Strg: Rotieren"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "Strg: Rotieren"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Z"
+msgstr "Strg: Rotieren"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "Neu erstellen"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "Erstelle neues Projekt"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Area"
+msgstr "Lösche TileMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Nur Auswahl"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Nur Auswahl"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "Einrasteinstellungen"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "Instanz:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr " Dateien"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6772,6 +7384,31 @@ msgid "Stack overflow with stack depth: "
msgstr "Stack-Overflow mit Stack-Tiefe: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Signalparameter bearbeiten:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Wertetyp des Arrays ändern"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Ändere Eingabename"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Default Value"
+msgstr "Ändere Standardwert"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Variable bearbeiten:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Funktionen:"
@@ -6812,26 +7449,6 @@ msgid "Add Signal"
msgstr "Signal hinzufügen"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Funktion entfernen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Variable entfernen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "bearbeite Variable:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Signal entfernen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "bearbeite Signal:"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
msgstr "Ausdruck ändern"
@@ -6840,6 +7457,16 @@ msgid "Add Node"
msgstr "Node hinzufügen"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Ungültige Schlüsselbilder entfernen"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Duplicate VisualScript Nodes"
+msgstr "Dupliziere Graph-Node(s)"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
"Alt-Taste gedrückt halten, um einen Getter zu setzen. Umschalt-Taste halten, "
@@ -6884,6 +7511,26 @@ msgid "Add Setter Property"
msgstr "Setter-Eigenschaft hinzufügen"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "Typ ändern"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Entferne Node(s)"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Entferne Shader-Graph-Node"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Verbinde mit Node:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "Bedingung"
@@ -6912,6 +7559,56 @@ msgid "Get"
msgstr "Abfragen"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Ändere Eingabename"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "Kann mit ‚..‘ nicht arbeiten"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "Zwischenablage für Ressourcen ist leer!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Nodes einfügen"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Funktion entfernen"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Variable bearbeiten:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Variable entfernen"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "bearbeite Signal:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Signal entfernen"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "bearbeite Variable:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "bearbeite Signal:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "Basistyp:"
@@ -6933,10 +7630,6 @@ msgid "Edit Variable:"
msgstr "Variable bearbeiten:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Ändern"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Ausgewähltes löschen"
@@ -7014,114 +7707,25 @@ msgstr ""
"Ungültiger Rückgabewert von _step(), muss Integer (für Sequenzausgabe) oder "
"String (für Fehler) sein."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "gerade gedrückt"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "gerade losgelassen"
-
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Run in Browser"
-msgstr "Durchstöbern"
+msgstr "Im Browser ausführen"
#: platform/javascript/export/export.cpp
msgid "Run exported HTML in the system's default browser."
msgstr "Führe exportiertes HTML im Standard-Browser des Betriebssystems aus."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not write file:\n"
-msgstr "Konnte Kachel nicht finden:"
+msgstr "Konnte Datei nicht schreiben:\n"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read file:\n"
-msgstr "Konnte Kachel nicht finden:"
+msgstr "Konnte Datei nicht lesen:\n"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not open template for export:\n"
-msgstr "Ordner konnte nicht erstellt werden."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-"Zertifikat-Datei konnte nicht gelesen werden. Sind Pfad und Passwort beide "
-"korrekt?"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "Fehler beim erstellen des Signaturobjekts."
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr "Fehler beim erstellen der Paketsignatur."
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"Keine Exportvorlagen gefunden.\n"
-"Laden Sie Exportvorlagen ggf. von der offiziellen Webseite herunter und "
-"installieren Sie diese."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr "Selbst konfiguriertes Debug-Paket nicht gefunden."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr "Selbst konfiguriertes Release-Paket nicht gefunden."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr "Ungültiger einzigartiger Name."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr "Ungültige Produkt-GUID."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr "Ungültige Verleger-GUID."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "Ungültige Hintergrundfarbe."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "Ungültige Abmessungen des Store-Logos (sollte 50x50 sein)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr "Ungültige Abmessungen für 44x44-Quadratlogo (sollte 44x44 sein)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr "Ungültige Abmessungen für 71x71-Quadratlogo (sollte 71x71 sein)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr "Ungültige Abmessungen für 150x150-Quadratlogo (sollte 150x150 sein)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr "Ungültige Abmessungen für 310x310-Quadratlogo (sollte 310x310 sein)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr "Ungültige Abmessungen für 310x150-Breitlogo (sollte 310x150 sein)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr "Ungültige Abmessungen für Startbildschirm (sollte 620x300 sein)."
+msgstr "Konnte Exportvorlage nicht öffnen:\n"
#: scene/2d/animated_sprite.cpp
msgid ""
@@ -7224,6 +7828,8 @@ msgid ""
"A material to process the particles is not assigned, so no behavior is "
"imprinted."
msgstr ""
+"Es ist kein Material zum Verarbeiten der Partikel zugewiesen, deshalb ist "
+"kein Verhalten definiert."
#: scene/2d/path_2d.cpp
msgid "PathFollow2D only works when set as a child of a Path2D node."
@@ -7231,6 +7837,13 @@ msgstr ""
"PathFollow2D funktioniert nur, wenn es als Unterobjekt eines Path2D-Nodes "
"gesetzt wird."
+#: 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 ""
@@ -7261,23 +7874,33 @@ msgstr ""
"VisibilityEnable2D funktioniert am besten, wenn es ein Unterobjekt erster "
"Ordnung der bearbeiteten Szene ist."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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 ""
-"CollisionShape liefert nur eine Kollisionsform für ein von CollisionObject "
-"abgeleitetes Node. Es kann nur als Unterobjekt von Area, StaticBody, "
-"RigidBody, KinematicBody usw. eingehängt werden um diesen eine Form zu geben."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"Damit CollisionShape funktionieren kann, muss eine Form vorhanden sein. "
-"Bitte erzeuge eine shape Ressource dafür!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7293,6 +7916,24 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "Ein leeres CollisionPolygon hat keinen Effekt auf die Kollision."
+#: 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 ""
+"CollisionShape liefert nur eine Kollisionsform für ein von CollisionObject "
+"abgeleitetes Node. Es kann nur als Unterobjekt von Area, StaticBody, "
+"RigidBody, KinematicBody usw. eingehängt werden um diesen eine Form zu geben."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"Damit CollisionShape funktionieren kann, muss eine Form vorhanden sein. "
+"Bitte erzeuge eine shape Ressource dafür!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7311,6 +7952,14 @@ msgstr ""
msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
msgstr ""
+"Nichts ist sichtbar da keine Meshe den Zeichendurchläufen zugewiesen wurden."
+
+#: 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."
@@ -7333,12 +7982,12 @@ msgstr ""
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
-msgstr "Ausführungsmodus:"
+msgid "Raw Mode"
+msgstr "Schwenkmodus"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
-msgstr ""
+msgstr "Füge aktuelle Farbe als Vorlage hinzu"
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -7348,22 +7997,6 @@ msgstr "Warnung!"
msgid "Please Confirm..."
msgstr "Bitte bestätigen..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Datei öffnen"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Datei(en) öffnen"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Verzeichnis wählen"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Datei oder Verzeichnis öffnen"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Strg+"
@@ -7391,11 +8024,13 @@ msgstr ""
"ein Control als Unterobjekt verwendet und dessen Minimalgröße eingestellt "
"werden."
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
msgstr ""
+"Das Standard-Environment wie festgelegt in den Projekteinstellungen "
+"(Rendering→Viewport→Standard-Environment) konnte nicht geladen werden."
#: scene/main/viewport.cpp
msgid ""
@@ -7410,6 +8045,100 @@ msgstr ""
"Eigenschaft ‚Render Target‘ des Viewports aktiviert und seine Textur "
"irgendeinem Node zum Anzeigen zugewiesen werden."
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "Szene schließen? (Nicht gespeicherte Änderungen gehen verloren)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "Projektverwaltung öffnen?\n"
+#~ "(Nicht gespeicherte Änderungen gehen verloren)"
+
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "Schließen und zur letzten Szene wechseln"
+
+#~ msgid "Expand to Parent"
+#~ msgstr "Auf übergeordnetes Node ausdehnen"
+
+#~ msgid "Del"
+#~ msgstr "Entfernen"
+
+#~ msgid "Copy To Platform.."
+#~ msgstr "Kopiere zu Plattform.."
+
+#~ msgid "just pressed"
+#~ msgstr "gerade gedrückt"
+
+#~ msgid "just released"
+#~ msgstr "gerade losgelassen"
+
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr ""
+#~ "Die Zertifikat-Datei konnte nicht gelesen werden. Sind Pfad und Passwort "
+#~ "beide korrekt?"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "Fehler beim erstellen des Signaturobjekts."
+
+#~ msgid "Error creating the package signature."
+#~ msgstr "Fehler beim erstellen der Paketsignatur."
+
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "Keine Exportvorlagen gefunden.\n"
+#~ "Laden Sie Exportvorlagen ggf. von der offiziellen Webseite herunter und "
+#~ "installieren Sie diese."
+
+#~ msgid "Custom debug package not found."
+#~ msgstr "Selbst konfiguriertes Debug-Paket nicht gefunden."
+
+#~ msgid "Custom release package not found."
+#~ msgstr "Selbst konfiguriertes Release-Paket nicht gefunden."
+
+#~ msgid "Invalid unique name."
+#~ msgstr "Ungültiger einzigartiger Name."
+
+#~ msgid "Invalid product GUID."
+#~ msgstr "Ungültige Produkt-GUID."
+
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "Ungültige Verleger-GUID."
+
+#~ msgid "Invalid background color."
+#~ msgstr "Ungültige Hintergrundfarbe."
+
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr "Ungültige Abmessungen des Store-Logos (sollte 50x50 sein)."
+
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr "Ungültige Abmessungen für 44x44-Quadratlogo (sollte 44x44 sein)."
+
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr "Ungültige Abmessungen für 71x71-Quadratlogo (sollte 71x71 sein)."
+
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr ""
+#~ "Ungültige Abmessungen für 150x150-Quadratlogo (sollte 150x150 sein)."
+
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr ""
+#~ "Ungültige Abmessungen für 310x310-Quadratlogo (sollte 310x310 sein)."
+
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr "Ungültige Abmessungen für 310x150-Breitlogo (sollte 310x150 sein)."
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr "Ungültige Abmessungen für Startbildschirm (sollte 620x300 sein)."
+
+#, fuzzy
+#~ msgid "RAW Mode"
+#~ msgstr "Roh-Modus"
+
#~ msgid "Node From Scene"
#~ msgstr "Node aus Szene"
@@ -7494,9 +8223,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "Suchbegriff wurde %d mal ersetzt."
-#~ msgid "Please save the scene first."
-#~ msgstr "Bitte speichere die Szene zuerst."
-
#~ msgid "Save Translatable Strings"
#~ msgstr "Speichere übersetzbare Zeichenketten"
@@ -7709,9 +8435,6 @@ msgstr ""
#~ msgid "Script Encryption Key (256-bits as hex):"
#~ msgstr "Skript-Schlüssel (256 Bit hexadezimal):"
-#~ msgid "Export PCK/Zip"
-#~ msgstr "Exportiere PCK/Zip"
-
#~ msgid "Export Project PCK"
#~ msgstr "Exportiere Projekt-PCK"
@@ -7778,9 +8501,6 @@ msgstr ""
#~ msgid "Load Layout"
#~ msgstr "Layout Laden"
-#~ msgid "Scale Region Editor"
-#~ msgstr "Skalierungsbegrenzungseditor"
-
#~ msgid "Binds (Extra Params):"
#~ msgstr "Bindungen (Extra Parameter):"
diff --git a/editor/translations/de_CH.po b/editor/translations/de_CH.po
index 15b70b2172..4e40c4c9bb 100644
--- a/editor/translations/de_CH.po
+++ b/editor/translations/de_CH.po
@@ -145,7 +145,8 @@ msgstr ""
msgid "Goto Prev Step"
msgstr ""
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr ""
@@ -378,7 +379,8 @@ msgstr "Datei(en) öffnen"
msgid "Description:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -389,9 +391,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 ""
@@ -465,7 +467,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -528,17 +530,16 @@ msgid "All"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr ""
@@ -554,7 +555,7 @@ msgstr ""
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -566,7 +567,7 @@ msgstr ""
msgid "Reverse"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr ""
@@ -719,14 +720,14 @@ msgstr "Verbindung zu Node:"
#: 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr ""
@@ -831,7 +832,7 @@ msgid "Resource"
msgstr ""
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr ""
@@ -911,12 +912,183 @@ msgstr ""
msgid "Delete selected files?"
msgstr ""
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Authors"
+msgstr ""
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "Projekt exportieren"
+
+#: 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 "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
+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
+#, fuzzy
+msgid "Toggle Audio Bus Solo"
+msgstr "Autoplay Umschalten"
+
+#: 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 "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+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
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Bild einfügen"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Node(s) duplizieren"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "Bild bewegen/einfügen"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -930,21 +1102,44 @@ 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/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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: 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
@@ -1047,6 +1242,10 @@ 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 ""
@@ -1124,6 +1323,22 @@ msgstr "Alle Dateien (*)"
msgid "Open"
msgstr "Öffnen"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Datei öffnen"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Datei(en) öffnen"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Verzeichnis öffnen"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Datei oder Verzeichnis öffnen"
+
#: 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
@@ -1249,6 +1464,14 @@ msgid "Signals:"
msgstr ""
#: editor/editor_help.cpp
+msgid "Enumerations:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr ""
@@ -1265,7 +1488,7 @@ msgid "Search Text"
msgstr ""
#: editor/editor_log.cpp
-msgid " Output:"
+msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1315,6 +1538,11 @@ msgid "Creating Thumbnail"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "This operation can't be done without a tree root."
+msgstr "Ohne eine Szene kann das nicht funktionieren."
+
+#: editor/editor_node.cpp
msgid ""
"Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."
msgstr ""
@@ -1433,11 +1661,12 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "Ja"
+#, fuzzy
+msgid "Save & Close"
+msgstr "Datei speichern"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
@@ -1450,9 +1679,17 @@ msgid "No"
msgstr "Node"
#: editor/editor_node.cpp
+msgid "Yes"
+msgstr "Ja"
+
+#: 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 "Ohne eine Szene kann das nicht funktionieren."
+
#: editor/editor_node.cpp
msgid "Export Mesh Library"
msgstr ""
@@ -1462,12 +1699,9 @@ msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr ""
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "Ohne eine Szene kann das nicht funktionieren."
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1490,9 +1724,28 @@ msgid "Quick Run Scene.."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+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
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Datei speichern"
+
+#: 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
@@ -1500,6 +1753,22 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1532,6 +1801,11 @@ msgstr ""
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 ""
@@ -1548,6 +1822,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr ""
@@ -1597,10 +1875,6 @@ msgstr "Neue Szene speichern als..."
msgid "Close Scene"
msgstr ""
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1885,6 +2159,10 @@ msgstr "Node"
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1894,26 +2172,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "Projekt exportieren"
@@ -1934,9 +2196,18 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "New Inherited"
+msgstr "Script hinzufügen"
+
+#: 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
#, fuzzy
msgid "Open 2D Editor"
@@ -2039,6 +2310,16 @@ msgstr ""
msgid "Re-Import Changed Resources"
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 ""
@@ -2176,10 +2457,26 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Source: "
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2188,6 +2485,20 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Szene kann nicht gespeichert werden."
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Szene kann nicht gespeichert werden."
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2264,6 +2575,12 @@ 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 ""
@@ -2275,10 +2592,29 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "Oberfläche %d"
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Single Scene"
+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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2317,6 +2653,14 @@ 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
#, fuzzy
msgid " Files"
msgstr "Datei(en) öffnen"
@@ -2505,6 +2849,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "Oberfläche %d"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3097,6 +3445,11 @@ msgid "New name:"
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Node Filter editieren"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr ""
@@ -3410,6 +3763,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr ""
@@ -3442,10 +3796,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3556,11 +3906,6 @@ msgstr "Bitte nur ein Node selektieren."
msgid "Change default type"
msgstr "Typ ändern"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "Okay"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3598,6 +3943,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3637,6 +3990,18 @@ msgid "Update from Scene"
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
#, fuzzy
msgid "Add point"
msgstr "Script hinzufügen"
@@ -3647,11 +4012,28 @@ msgid "Remove point"
msgstr "Ungültige Bilder löschen"
#: 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 "Modify Curve"
+#, fuzzy
+msgid "Remove Curve Point"
+msgstr "Ungültige Bilder löschen"
+
+#: 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
@@ -3676,6 +4058,12 @@ 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 ""
@@ -3967,6 +4355,11 @@ msgid "Load Emission Mask"
msgstr "Emissions-Maske laden"
#: 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 ""
@@ -4287,6 +4680,12 @@ 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 ""
@@ -4311,6 +4710,10 @@ 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 ""
@@ -4363,6 +4766,10 @@ msgid "Close All"
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.."
@@ -4395,6 +4802,10 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+msgid "Debug with external editor"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4458,6 +4869,10 @@ msgid ""
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 ""
@@ -4504,6 +4919,11 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Bild einfügen"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4809,93 +5229,101 @@ msgid "Animation Key Inserted."
msgstr "Animationsbild eingefügt."
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
+msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
+msgid "Material Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Forward"
+#, fuzzy
+msgid "Shader Changes"
+msgstr "Typ ändern"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Surface Changes"
+msgstr "Oberfläche %d"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Backwards"
+msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
+msgid "Align with view"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Down"
+msgid "Display Normal"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
+msgid "Display Wireframe"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
+msgid "Display Overdraw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Material Changes"
+msgid "Display Unshaded"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Shader Changes"
-msgstr "Typ ändern"
+msgid "View Environment"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Surface Changes"
-msgstr "Oberfläche %d"
+msgid "View Gizmos"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
+msgid "View Information"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
+msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Doppler Enable"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
+msgid "Freelook Left"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
+msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
+msgid "Freelook Forward"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
+msgid "Freelook Backwards"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
+msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
+msgid "Freelook Down"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
+msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
+msgid "preview"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
@@ -4903,6 +5331,18 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "Selektiere Node(s) zum Importieren aus"
+
+#: 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 ""
@@ -5020,6 +5460,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr ""
@@ -5148,6 +5589,10 @@ 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 ""
@@ -5205,6 +5650,16 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Ungültige Bilder löschen"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Ungültige Bilder löschen"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5272,7 +5727,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5294,11 +5749,23 @@ 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 editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: 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
@@ -5334,10 +5801,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5397,7 +5860,7 @@ msgstr ""
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5446,6 +5909,23 @@ 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
+#, fuzzy
+msgid "Export PCK/Zip"
+msgstr "Exportiere das Projekt PCK"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5485,10 +5965,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "Existierendes Projekt importieren"
@@ -5533,6 +6009,19 @@ 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 ""
@@ -5547,10 +6036,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5579,255 +6064,287 @@ msgstr "Ungültige Bilder löschen"
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Neues Projekt erstellen"
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "Taste "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "Taste drücken.."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change"
+msgstr "Typ ändern"
+
+#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Add Global Property"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Select an 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
+#, fuzzy
+msgid "Delete Item"
+msgstr "Node(s) löschen"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Projekteinstellungen"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr ""
-
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5869,6 +6386,11 @@ msgstr ""
#: editor/property_editor.cpp
#, fuzzy
+msgid "Select Node"
+msgstr "Node(s) löschen"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "New Script"
msgstr "Script hinzufügen"
@@ -5882,6 +6404,11 @@ msgstr ""
#: editor/property_editor.cpp
#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "Selektiere Node(s) zum Importieren aus"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "Pick a Node"
msgstr "TimeScale-Node"
@@ -5977,6 +6504,11 @@ msgstr ""
msgid "Scene Run Settings"
msgstr ""
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "Okay"
+
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
msgstr ""
@@ -6021,10 +6553,6 @@ msgid "Delete Node(s)?"
msgstr "Node(s) löschen?"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "Ohne eine Szene kann das nicht funktionieren."
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6037,6 +6565,18 @@ msgid "Save New Scene As.."
msgstr "Neue Szene speichern als..."
#: 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 ""
@@ -6079,6 +6619,14 @@ msgid "Edit Connections"
msgstr "Connections editieren"
#: 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 "Node(s) löschen"
@@ -6132,6 +6680,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "Node erstellen"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr ""
@@ -6139,6 +6692,14 @@ msgstr ""
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 ""
@@ -6170,10 +6731,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6211,31 +6768,7 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
@@ -6243,6 +6776,11 @@ msgid "Select a Node"
msgstr ""
#: editor/script_create_dialog.cpp
+#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Fehler beim Instanzieren der %s Szene"
+
+#: editor/script_create_dialog.cpp
msgid "Error - Could not create script in filesystem."
msgstr ""
@@ -6252,6 +6790,10 @@ msgid "Error loading script from %s"
msgstr "Fehler beim Instanzieren der %s Szene"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr ""
@@ -6292,10 +6834,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6463,6 +7001,10 @@ 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 ""
@@ -6544,6 +7086,126 @@ msgstr ""
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 "GridMap Paint"
+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
+#, fuzzy
+msgid "Create Area"
+msgstr "Node erstellen"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "Neues Projekt erstellen"
+
+#: 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
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "Projekteinstellungen"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Pick Distance:"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "Datei(en) öffnen"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6575,6 +7237,28 @@ 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
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Typ ändern"
+
+#: 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
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Ungültige Bilder löschen"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr ""
@@ -6616,36 +7300,24 @@ msgid "Add Signal"
msgstr "Script hinzufügen"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
-msgid "Remove Variable"
-msgstr "Ungültige Bilder löschen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr ""
+msgid "Change Expression"
+msgstr "Typ ändern"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
-msgid "Remove Signal"
-msgstr "Ungültige Bilder löschen"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr ""
+msgid "Add Node"
+msgstr "Node"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
-msgid "Change Expression"
-msgstr "Typ ändern"
+msgid "Remove VisualScript Nodes"
+msgstr "Ungültige Bilder löschen"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
-msgid "Add Node"
-msgstr "Node"
+msgid "Duplicate VisualScript Nodes"
+msgstr "Node(s) duplizieren"
#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
@@ -6690,6 +7362,26 @@ msgid "Add Setter Property"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "Typ ändern"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Node(s) entfernen"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Ungültige Bilder löschen"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Verbindung zu Node:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr ""
@@ -6719,6 +7411,56 @@ msgstr ""
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
+msgid "Change Input Value"
+msgstr "Typ ändern"
+
+#: 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
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Node erstellen"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Ungültige Bilder löschen"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove Variable"
+msgstr "Ungültige Bilder löschen"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Script hinzufügen"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove Signal"
+msgstr "Ungültige Bilder löschen"
+
+#: 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
+#, fuzzy
msgid "Base Type:"
msgstr "Typ ändern"
@@ -6740,11 +7482,6 @@ msgid "Edit Variable:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Change"
-msgstr "Typ ändern"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr ""
@@ -6820,14 +7557,6 @@ msgid ""
"(error)."
msgstr ""
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6848,78 +7577,6 @@ msgstr ""
msgid "Could not open template for export:\n"
msgstr ""
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Error creating the signature object."
-msgstr "Fehler beim Schreiben des Projekts PCK!"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7014,6 +7671,13 @@ msgstr ""
"PathFollow2D funktioniert nur, wenn sie als Unterobjekt eines Path2D Nodes "
"gesetzt wird."
+#: 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 ""
@@ -7041,17 +7705,32 @@ msgstr ""
"VisibilityEnable2D funktioniert am besten, wenn es ein Unterobjekt erster "
"Ordnung der bearbeiteten Hauptszene ist."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"The controller id must not be 0 or this controller will not be bound to an "
+"actual controller"
msgstr ""
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRAnchor must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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
@@ -7065,6 +7744,19 @@ msgstr ""
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 ""
@@ -7080,6 +7772,13 @@ 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
#, fuzzy
msgid "Path property must point to a valid Spatial node to work."
@@ -7098,7 +7797,7 @@ msgstr ""
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr "Node erstellen"
#: scene/gui/color_picker.cpp
@@ -7113,22 +7812,6 @@ msgstr "Alert!"
msgid "Please Confirm..."
msgstr "Bitte bestätigen..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Datei öffnen"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Datei(en) öffnen"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Verzeichnis öffnen"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Datei oder Verzeichnis öffnen"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr ""
@@ -7147,7 +7830,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7161,6 +7844,10 @@ msgid ""
"texture to some node for display."
msgstr ""
+#, fuzzy
+#~ msgid "Error creating the signature object."
+#~ msgstr "Fehler beim Schreiben des Projekts PCK!"
+
#~ msgid "Node From Scene"
#~ msgstr "Node von Szene"
@@ -7207,11 +7894,5 @@ msgstr ""
#~ msgid "Export all files in the project directory."
#~ msgstr "Exportiere alle Dateien in das Projektverzeichnis."
-#~ msgid "Export Project PCK"
-#~ msgstr "Exportiere das Projekt PCK"
-
-#~ msgid "Project Export"
-#~ msgstr "Projekt exportieren"
-
#~ msgid "Insert Keys (Ins)"
#~ msgstr "Bilder (innerhalb) einfügen"
diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot
index 9821ef4e01..7227b0ec2d 100644
--- a/editor/translations/editor.pot
+++ b/editor/translations/editor.pot
@@ -140,7 +140,8 @@ msgstr ""
msgid "Goto Prev Step"
msgstr ""
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr ""
@@ -372,7 +373,8 @@ msgstr ""
msgid "Description:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -383,9 +385,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 ""
@@ -458,7 +460,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -519,17 +521,16 @@ msgid "All"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr ""
@@ -545,7 +546,7 @@ msgstr ""
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -557,7 +558,7 @@ msgstr ""
msgid "Reverse"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr ""
@@ -709,14 +710,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr ""
@@ -821,7 +822,7 @@ msgid "Resource"
msgstr ""
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr ""
@@ -901,12 +902,178 @@ msgstr ""
msgid "Delete selected files?"
msgstr ""
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Authors"
+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 "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
+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 "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+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 "Move Audio Bus"
+msgstr ""
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -920,21 +1087,44 @@ 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/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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: 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
@@ -1037,6 +1227,10 @@ 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 ""
@@ -1114,6 +1308,22 @@ msgstr ""
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
@@ -1239,6 +1449,14 @@ msgid "Signals:"
msgstr ""
#: editor/editor_help.cpp
+msgid "Enumerations:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr ""
@@ -1255,7 +1473,7 @@ msgid "Search Text"
msgstr ""
#: editor/editor_log.cpp
-msgid " Output:"
+msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1305,6 +1523,10 @@ 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 ""
@@ -1423,11 +1645,11 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
+msgid "Save & Close"
msgstr ""
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
@@ -1439,23 +1661,27 @@ msgid "No"
msgstr ""
#: editor/editor_node.cpp
-msgid "This scene has never been saved. Save before running?"
+msgid "Yes"
msgstr ""
#: editor/editor_node.cpp
-msgid "Export Mesh Library"
+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 Tile Set"
+msgid "Export Mesh Library"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
+msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Exit the editor?"
+msgid "This operation can't be done without a selected node."
msgstr ""
#: editor/editor_node.cpp
@@ -1479,9 +1705,27 @@ msgid "Quick Run Scene.."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+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
@@ -1489,6 +1733,22 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1521,6 +1781,11 @@ msgstr ""
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 ""
@@ -1537,6 +1802,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr ""
@@ -1585,10 +1854,6 @@ msgstr ""
msgid "Close Scene"
msgstr ""
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1868,6 +2133,10 @@ msgstr ""
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1877,26 +2146,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr ""
@@ -1917,9 +2170,17 @@ 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 ""
@@ -2020,6 +2281,16 @@ msgstr ""
msgid "Re-Import Changed Resources"
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 ""
@@ -2155,10 +2426,26 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Source: "
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2167,6 +2454,18 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving file:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving dir:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2243,6 +2542,12 @@ 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 ""
@@ -2254,9 +2559,28 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Single Scene"
+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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2296,6 +2620,14 @@ 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 ""
@@ -2482,6 +2814,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3063,6 +3399,10 @@ 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 ""
@@ -3374,6 +3714,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr ""
@@ -3406,10 +3747,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3518,11 +3855,6 @@ msgstr ""
msgid "Change default type"
msgstr ""
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr ""
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3560,6 +3892,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3599,6 +3939,18 @@ msgid "Update from Scene"
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 ""
@@ -3607,11 +3959,27 @@ 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 "Modify Curve"
+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
@@ -3636,6 +4004,12 @@ 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 ""
@@ -3925,6 +4299,11 @@ 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 ""
@@ -4241,6 +4620,12 @@ 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 ""
@@ -4265,6 +4650,10 @@ 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 ""
@@ -4317,6 +4706,10 @@ msgid "Close All"
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.."
@@ -4349,6 +4742,10 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+msgid "Debug with external editor"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4412,6 +4809,10 @@ msgid ""
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 ""
@@ -4458,6 +4859,10 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+msgid "Delete Line"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4762,91 +5167,99 @@ msgid "Animation Key Inserted."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
+msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
+msgid "Material Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Forward"
+msgid "Shader Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Backwards"
+msgid "Surface Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
+msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Down"
+msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
+msgid "Align with view"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
+msgid "Display Normal"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Material Changes"
+msgid "Display Wireframe"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Shader Changes"
+msgid "Display Overdraw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Surface Changes"
+msgid "Display Unshaded"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
+msgid "View Environment"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
+msgid "View Gizmos"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "View Information"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
+msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
+msgid "Doppler Enable"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
+msgid "Freelook Left"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
+msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
+msgid "Freelook Forward"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
+msgid "Freelook Backwards"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
+msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
+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
@@ -4854,6 +5267,17 @@ 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 ""
@@ -4970,6 +5394,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr ""
@@ -5098,6 +5523,10 @@ 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 ""
@@ -5155,6 +5584,14 @@ 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 "Theme"
msgstr ""
@@ -5222,7 +5659,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5244,11 +5681,23 @@ 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 editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: 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
@@ -5284,10 +5733,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5347,7 +5792,7 @@ msgstr ""
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5394,6 +5839,22 @@ 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 ""
@@ -5430,10 +5891,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5478,6 +5935,19 @@ 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 ""
@@ -5492,10 +5962,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5523,254 +5989,283 @@ msgstr ""
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+msgid "Can't run project"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: 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.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Add Global Property"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Select an 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 "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr ""
-
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5811,6 +6306,10 @@ msgid "Assign"
msgstr ""
#: editor/property_editor.cpp
+msgid "Select Node"
+msgstr ""
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr ""
@@ -5823,6 +6322,10 @@ 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 ""
@@ -5918,6 +6421,11 @@ msgstr ""
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 ""
@@ -5961,10 +6469,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -5977,6 +6481,18 @@ 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 ""
@@ -6019,6 +6535,14 @@ msgid "Edit Connections"
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 ""
@@ -6069,6 +6593,10 @@ msgid ""
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 ""
@@ -6076,6 +6604,14 @@ msgstr ""
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 ""
@@ -6107,10 +6643,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6147,35 +6679,15 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Select a Node"
msgstr ""
-#: editor/scene_tree_editor.cpp
-msgid "Select a Node"
+#: editor/script_create_dialog.cpp
+msgid "Error loading template '%s'"
msgstr ""
#: editor/script_create_dialog.cpp
@@ -6187,6 +6699,10 @@ 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 ""
@@ -6227,10 +6743,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6395,6 +6907,10 @@ 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 ""
@@ -6476,6 +6992,122 @@ msgstr ""
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 "GridMap Paint"
+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/gridmap/grid_map_editor_plugin.cpp
+msgid "Tiles"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6507,63 +7139,63 @@ msgid "Stack overflow with stack depth: "
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Functions:"
+msgid "Change Signal Arguments"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Variables:"
+msgid "Change Argument Type"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Name is not a valid identifier:"
+msgid "Change Argument name"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Name already in use by another func/var/signal:"
+msgid "Set Variable Default Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Function"
+msgid "Set Variable Type"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Variable"
+msgid "Functions:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Signal"
+msgid "Variables:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Function"
+msgid "Name is not a valid identifier:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Variable"
+msgid "Name already in use by another func/var/signal:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Signal"
+msgid "Rename Function"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
+msgid "Rename Variable"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
+msgid "Rename Signal"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
+msgid "Add Function"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
+msgid "Add Variable"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
+msgid "Add Signal"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
@@ -6575,6 +7207,14 @@ 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 ""
@@ -6615,6 +7255,22 @@ 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 ""
@@ -6643,6 +7299,50 @@ msgid "Get"
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 ""
@@ -6663,10 +7363,6 @@ msgid "Edit Variable:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr ""
@@ -6740,14 +7436,6 @@ msgid ""
"(error)."
msgstr ""
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6768,77 +7456,6 @@ msgstr ""
msgid "Could not open template for export:\n"
msgstr ""
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -6917,6 +7534,13 @@ msgstr ""
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 ""
@@ -6939,17 +7563,32 @@ msgid ""
"as parent."
msgstr ""
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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
@@ -6963,6 +7602,19 @@ msgstr ""
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 ""
@@ -6978,6 +7630,13 @@ 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 ""
@@ -6994,7 +7653,7 @@ msgid ""
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7009,22 +7668,6 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr ""
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr ""
@@ -7043,7 +7686,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
diff --git a/editor/translations/el.po b/editor/translations/el.po
index bd95d6e6f6..21adc08c3f 100644
--- a/editor/translations/el.po
+++ b/editor/translations/el.po
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2017-06-24 22:14+0000\n"
+"PO-Revision-Date: 2017-06-29 17:12+0000\n"
"Last-Translator: gtsiam <gtsiam@windowslive.com>\n"
"Language-Team: Greek <https://hosted.weblate.org/projects/godot-engine/godot/"
"el/>\n"
@@ -145,7 +145,8 @@ msgstr "Πήγαινε στο επόμενο βήμα"
msgid "Goto Prev Step"
msgstr "Πήγαινε στο Ï€ÏοηγοÏμενο βήμα"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "ΓÏαμμική"
@@ -359,21 +360,19 @@ msgstr "Αλλαγή τιμής πίνακα"
#: editor/asset_library_editor_plugin.cpp
msgid "Free"
-msgstr ""
+msgstr "ΔωÏεάν"
#: editor/asset_library_editor_plugin.cpp editor/editor_plugin_settings.cpp
msgid "Version:"
msgstr "Έκδοση:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Contents:"
-msgstr "ΣταθεÏές:"
+msgstr "ΠεÏιεχόμενα:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "View Files"
-msgstr " ΑÏχεία"
+msgstr "ΠÏοβολή αÏχείων"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
#: editor/editor_help.cpp editor/property_selector.cpp
@@ -381,7 +380,8 @@ msgstr " ΑÏχεία"
msgid "Description:"
msgstr "ΠεÏιγÏαφή:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr "Εγκατάσταση"
@@ -392,161 +392,153 @@ msgstr "Εγκατάσταση"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
-msgstr ""
+msgstr "Δεν είναι δυνατή η επίλυση του ονόματος του κεντÏÎ¹ÎºÎ¿Ï Ï…Ï€Î¿Î»Î¿Î³Î¹ÏƒÏ„Î®:"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve."
-msgstr ""
+msgstr "Δεν είναι δυνατή η επίλυση."
#: editor/asset_library_editor_plugin.cpp
msgid "Connection error, please try again."
-msgstr ""
+msgstr "Σφάλμα σÏνδεσης, παÏακαλώ ξαναπÏοσπαθήστε."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect."
-msgstr "ΣÏνδεση.."
+msgstr "Δεν ήταν δυνατή η σÏνδεση."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect to host:"
-msgstr "ΣÏνδεση στον κόμβο:"
+msgstr "Δεν ήταν δυνατή η σÏνδεση στον κεντÏικό υπολογιστή:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr ""
+msgstr "Δεν λήφθηκε απόκÏιση από τον κεντÏικό υπολογιστή:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response."
-msgstr ""
+msgstr "Δεν λήφθηκε απόκÏιση."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Request failed, return code:"
-msgstr "Ζητήθηκε άγνωστη μοÏφή αÏχείου:"
+msgstr "Το αίτημα απέτυχε, κώδικας επιστÏοφής:"
#: editor/asset_library_editor_plugin.cpp
msgid "Req. Failed."
-msgstr ""
+msgstr "Το αίτημα απέτυχε."
#: editor/asset_library_editor_plugin.cpp
msgid "Request failed, too many redirects"
-msgstr ""
+msgstr "Το αίτημα απέτυχε, πάÏα πολλές ανακατευθήνσεις"
#: editor/asset_library_editor_plugin.cpp
msgid "Redirect Loop."
-msgstr ""
+msgstr "Î’Ïόχος ανακατευθήνσεων."
#: editor/asset_library_editor_plugin.cpp
msgid "Failed:"
-msgstr ""
+msgstr "Απέτυχε:"
#: editor/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
msgstr ""
+"Εσφαλμένος κωδικός κατακεÏματισμοÏ, θα θεωÏηθεί ότι το αÏχείο έχει αλοιωθεί."
#: editor/asset_library_editor_plugin.cpp
msgid "Expected:"
-msgstr ""
+msgstr "Αναμενόμενο:"
#: editor/asset_library_editor_plugin.cpp
msgid "Got:"
-msgstr ""
+msgstr "Δοσμένο:"
#: editor/asset_library_editor_plugin.cpp
msgid "Failed sha256 hash check"
-msgstr ""
+msgstr "Η δοκιμή κατακεÏÎ¼Î±Ï„Î¹ÏƒÎ¼Î¿Ï sha256 απέτυχε"
#: editor/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr ""
+msgstr "Σφάλμα λήψης:"
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
-msgstr ""
+msgstr "Επιτυχία!"
#: editor/asset_library_editor_plugin.cpp
msgid "Fetching:"
-msgstr ""
+msgstr "Λήψη:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Resolving.."
-msgstr "Αποθήκευση..."
+msgstr "Επίλυση..."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Connecting.."
msgstr "ΣÏνδεση.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Requesting.."
-msgstr "Δοκιμιμαστικά"
+msgstr "Γίνεται αίτημα.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Error making request"
-msgstr "Σφάλμα κατά την αποθήκευση πόÏου!"
+msgstr "Σφάλμα κατά την Ï€Ïαγματοποίηση αιτήματος"
#: editor/asset_library_editor_plugin.cpp
msgid "Idle"
-msgstr ""
+msgstr "ΑνενεÏγό"
#: editor/asset_library_editor_plugin.cpp
msgid "Retry"
-msgstr ""
+msgstr "Ξαναδοκίμασε"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Download Error"
-msgstr "Λήψη"
+msgstr "Σφάλμα λήψης"
#: editor/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr ""
+msgstr "Η λήψη είναι ήδη σε εξέλιξη!"
#: editor/asset_library_editor_plugin.cpp
msgid "first"
-msgstr ""
+msgstr "ΠÏώτο"
#: editor/asset_library_editor_plugin.cpp
msgid "prev"
-msgstr ""
+msgstr "ΠÏοηγοÏμενο"
#: editor/asset_library_editor_plugin.cpp
msgid "next"
-msgstr ""
+msgstr "Επόμενο"
#: editor/asset_library_editor_plugin.cpp
msgid "last"
-msgstr ""
+msgstr "ΠÏοηγοÏμενο"
#: editor/asset_library_editor_plugin.cpp
msgid "All"
msgstr "Όλα"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "Αναζήτηση:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "Αναζήτηση"
@@ -562,7 +554,7 @@ msgstr "Αναζήτηση"
msgid "Import"
msgstr "Εισαγωγή"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "ΠÏόσθετα"
@@ -574,7 +566,7 @@ msgstr "Ταξινόμηση:"
msgid "Reverse"
msgstr "ΑντιστÏοφή"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "ΚατηγοÏία:"
@@ -600,7 +592,7 @@ msgstr "Δοκιμιμαστικά"
#: editor/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
-msgstr "ΑÏχείο ZIP του Asset"
+msgstr "ΑÏχείο ZIP των Asset"
#: editor/call_dialog.cpp
msgid "Method List For '%s':"
@@ -728,14 +720,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "ΑφαίÏεση"
@@ -844,7 +836,7 @@ msgid "Resource"
msgstr "ΠόÏος"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "ΔιαδÏομή"
@@ -926,12 +918,196 @@ msgstr "ΕξεÏευνητής αχÏησιμοποίητων πόÏων"
msgid "Delete selected files?"
msgstr "ΔιαγÏαφή επιλεγμένων αÏχείων;"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "ΕυχαÏιστίες από την κοινότητα της Godot!"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "ΕυχαÏιστώ!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr "ΣυνεισφέÏοντες στην Godot Engine"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "ΣυγγÏαφέας:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "ΔιαχειÏιστής"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "ΠεÏιεχόμενα:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "Ασυμπίεστο"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "Το πακέτο εγκαταστάθηκε επιτυχώς!"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "Το πακέτο εγκαταστάθηκε επιτυχώς!"
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Effect"
+msgstr "ΠÏοσθήκη συμβάντος"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Άνοιγμα διάταξης διαÏλων ήχου"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Solo"
+msgstr "Άνοιγμα διάταξης διαÏλων ήχου"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "ΔιαγÏαφή επιλεγμένου"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "Διπλασιασμός"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "ΔιαγÏαφή επιλεγμένου"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "ΠÏοσθήκη διαÏλου"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "ΔιαγÏαφή διάταξης"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "ΑναπαÏαγωγή κίνησης"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "ΕνέÏγεια μετακίνησης"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr "Αποθήκευση διάταξης διαÏλων ήχου ÏŽÏ‚.."
@@ -945,23 +1121,53 @@ 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
+#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"ΆκυÏη επέκταση αÏχείου.\n"
+"ΠαÏακαλώ χÏησιμοποιήστε .font."
+
+#: editor/editor_audio_buses.cpp
msgid "Add Bus"
msgstr "ΠÏοσθήκη διαÏλου"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "ΔημιουÏγία νέου πόÏου"
+
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "ΦόÏτωσε"
#: editor/editor_audio_buses.cpp
+#, fuzzy
+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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Save this Bus Layout to a file."
+msgstr "Αποθήκευση διάταξης διαÏλων ήχου ÏŽÏ‚.."
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+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 "Μη έγκυÏο όνομα."
@@ -1064,6 +1270,11 @@ msgid "Updating scene.."
msgstr "ΕνημέÏωση σκηνής.."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "ΠαÏακαλοÏμε αποθηκεÏστε την σκηνή Ï€Ïώτα."
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "Επιλέξτε ένα λεξικό"
@@ -1129,7 +1340,7 @@ msgstr "Το αÏχείο υπάÏχει. Θέλετε να το αντικατÎ
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "All Recognized"
-msgstr "Όλες αναγνωÏίστηκαν"
+msgstr "Όλα τα αναγνωÏισμένα"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "All Files (*)"
@@ -1141,6 +1352,22 @@ msgstr "Όλα τα αÏχεία (*)"
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
@@ -1218,7 +1445,7 @@ msgstr "ΣάÏωση πηγών"
#: editor/editor_file_system.cpp
msgid "(Re)Importing Assets"
-msgstr "(Επαν)εισαγωγή πόÏων"
+msgstr "(Επαν)εισαγωγή"
#: editor/editor_help.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
@@ -1266,6 +1493,15 @@ msgid "Signals:"
msgstr "Σήματα:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Κινήσεις"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "ΣταθεÏές:"
@@ -1282,7 +1518,8 @@ msgid "Search Text"
msgstr "Αναζήτηση κειμένου"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " Έξοδος:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1332,6 +1569,11 @@ msgid "Creating Thumbnail"
msgstr "ΔημιουÏγία μικÏογÏαφίας"
#: editor/editor_node.cpp
+#, fuzzy
+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 ""
@@ -1407,15 +1649,14 @@ msgid "There is no defined scene to run."
msgstr "Δεν υπάÏχει καθοÏισμένη σκηνή για εκτελέση."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"No main scene has ever been defined, select one?\n"
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
-"Η κÏÏια σκηνή δεν έχει καθοÏιστεί, θέλετε να επιλέξετε μία;\n"
+"Δεν έχει καθοÏιστεί κÏÏια σκηνή, θέλετε να επιλέξετε μία;\n"
"ΜποÏείτε να την αλλάξετε αÏγότεÏα στις «Ρυθμίσεις έÏγου» κάτω από την "
-"κατηγοÏία «εφαÏμογή»."
+"κατηγοÏία «ΕφαÏμογή»."
#: editor/editor_node.cpp
msgid ""
@@ -1465,26 +1706,34 @@ msgid "Quick Open Script.."
msgstr "ΓÏήγοÏη άνοιγμα δεσμής ενεÏγειών..."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "Îαι"
+#, fuzzy
+msgid "Save & Close"
+msgstr "Αποθήκευση αÏχείου"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "Κλείσιμο σκηνής; (Οι μη αποθηκευμένες αλλαγές θα χαθοÏν)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
msgstr "Αποθήκευση σκηνή ως..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "No"
-msgstr "Κόμβος"
+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 "Εξαγωγή βιβλιοθήκης πλεγμάτων"
@@ -1494,12 +1743,9 @@ msgid "Export Tile Set"
msgstr "Εξαγωγή σετ πλακιδίων"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "Έξοδος"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "ΤεÏματισμός του Ï€ÏογÏάμματος επεξεÏγασίας;"
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "Αυτή η λειτουÏγία δεν μποÏεί να γίνει χωÏίς σκηνή."
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1525,18 +1771,52 @@ msgid "Quick Run Scene.."
msgstr "ΓÏήγοÏη εκτέλεση σκηνής..."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "Έξοδος"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "ΤεÏματισμός του Ï€ÏογÏάμματος επεξεÏγασίας;"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "ΔιαχειÏιστής"
+
+#: editor/editor_node.cpp
+#, fuzzy
+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 ""
-"Θέλετε να ανοίξετε τον διαχειÏιστή έÏγου; \n"
-"(Οι μη αποθηκευμένες αλλαγές θα χαθοÏν)"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "Επιλογή κÏÏιας σκηνής"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1575,6 +1855,11 @@ msgstr "Αποθήκευση διάταξης"
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 "Εναλλαγή καÏτέλας σκηνής"
@@ -1591,6 +1876,11 @@ msgstr "%d πεÏισσότεÏα αÏχεία ή φάκελοι"
msgid "Distraction Free Mode"
msgstr "ΛειτουÏγία χωÏίς διάσπαση Ï€Ïοσοχής"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "ΛειτουÏγία χωÏίς διάσπαση Ï€Ïοσοχής"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "Σκηνή"
@@ -1639,10 +1929,6 @@ msgstr "Αποθήκευση όλων των σκηνών"
msgid "Close Scene"
msgstr "Κλείσιμο σκηνής"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr "Κλείσιμο και μετάβαση στην Ï€ÏοηγοÏμενη σκηνή"
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "Άνοιγμα Ï€Ïόσφατων"
@@ -1679,9 +1965,8 @@ msgid "Miscellaneous project or scene-wide tools."
msgstr "Λοιπά έÏγα ή εÏγαλεία για όλη τη σκηνή."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Project"
-msgstr "Îέο έÏγο"
+msgstr "ΈÏγο"
#: editor/editor_node.cpp
msgid "Project Settings"
@@ -1796,9 +2081,8 @@ msgstr ""
"αποτελεσματικό με δικτυωμένο σÏστημα αÏχείων."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Editor"
-msgstr "ΕπεξεÏγασία"
+msgstr "ΕπεξεÏγαστής"
#: editor/editor_node.cpp editor/settings_config_dialog.cpp
msgid "Editor Settings"
@@ -1818,24 +2102,23 @@ msgstr "ΔιαχείÏιση Ï€ÏοτÏπων εξαγωγής"
#: editor/editor_node.cpp
msgid "Help"
-msgstr ""
+msgstr "Βοήθεια"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Classes"
msgstr "Κλάσεις"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Online Docs"
-msgstr "Κλείσιμο τεκμηÏίωσης"
+msgstr "ΗλεκτÏονική τεκμηÏίωση"
#: editor/editor_node.cpp
msgid "Q&A"
-msgstr ""
+msgstr "ΕÏώτηση&Απάντηση"
#: editor/editor_node.cpp
msgid "Issue Tracker"
-msgstr ""
+msgstr "ΔιαχείÏιση Ï€Ïοβλημάτων"
#: editor/editor_node.cpp
msgid "About"
@@ -1945,6 +2228,10 @@ msgstr "Κόμβος"
msgid "Output"
msgstr "Έξοδος"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "Επανεισαγωγή"
@@ -1954,26 +2241,10 @@ msgid "Update"
msgstr "ΕνημέÏωση"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "ΕυχαÏιστίες από την κοινότητα της Godot!"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "ΕυχαÏιστώ!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "Εισαγωγή Ï€ÏοτÏπων από αÏχείο ZIP"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "Εξαγωγή έÏγου"
@@ -1994,38 +2265,41 @@ msgid "Open & Run a Script"
msgstr "Άνοιξε & ΤÏέξε μία δεσμή ενεÏγειών"
#: editor/editor_node.cpp
+#, fuzzy
+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
-#, fuzzy
msgid "Open 2D Editor"
-msgstr "Άνοιγμα στον επεξεÏγαστή"
+msgstr "Άνοιγμα 2D επεξεÏγαστή"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 3D Editor"
-msgstr "Άνοιγμα στον επεξεÏγαστή"
+msgstr "Άνοιγμα 3D επεξεÏγαστή"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Script Editor"
-msgstr "Άνοιγμα στον επεξεÏγαστή"
+msgstr "Άνοιγμα επεξεÏγαστή δεσμής ενεÏγειών"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Asset Library"
-msgstr "Εξαγωγή βιβλιοθήκης"
+msgstr "Άνοιγμα βιβλιοθήκης"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the next Editor"
-msgstr "Άνοιγμα στον επεξεÏγαστή"
+msgstr "Άνοιγμα του επόμενου επεξεÏγαστή"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the previous Editor"
-msgstr "Άνοιγμα στον επεξεÏγαστή"
+msgstr "Άνοιγμα του Ï€ÏοηγοÏμενου επεξεÏγαστή"
#: editor/editor_plugin_settings.cpp
msgid "Installed Plugins:"
@@ -2103,6 +2377,16 @@ msgstr "Επανεισαγωγή"
msgid "Re-Import Changed Resources"
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 "ΓÏάψτε τη λογική σας στη μέθοδο _run()."
@@ -2242,10 +2526,28 @@ msgid "Cannot navigate to '"
msgstr "ΑδÏνατη η πλοήγηση στο '"
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "Αποθήκευση & Επανεισαγωγή"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "Πηγή:"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr "Ίδια αÏχεία πηγής και Ï€ÏοοÏισμοÏ, παÏάλειψη ενέÏγειας."
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr "Ίδιες διαδÏομές πηγής και Ï€ÏοοÏισμοÏ, παÏάλειψη ενέÏγειας."
@@ -2254,6 +2556,20 @@ msgid "Can't move directories to within themselves."
msgstr "ΑδÏνατη η μετακίνηση καταλόγων μέσα στους εαυτοÏÏ‚ τους."
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Σφάλμα κατά την φόÏτωση εικόνας:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Σφάλμα κατά την εισαγωγή:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr "ΑδÏνατη η λειτουÏγία στο '..'"
@@ -2332,6 +2648,12 @@ msgstr ""
"κόμβου."
#: editor/filesystem_dock.cpp
+msgid ""
+"Scanning Files,\n"
+"Please Wait.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Move"
msgstr "Μετακίνηση"
@@ -2343,10 +2665,31 @@ msgstr "ΠÏοσθήκη σε Ομάδα"
msgid "Remove from Group"
msgstr "ΚατάÏγηση από την ομάδα"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "Επιφάνεια %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "Εισαγωγή 3D σκηνής"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2387,6 +2730,14 @@ 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 " ΑÏχεία"
@@ -2473,13 +2824,12 @@ msgid "No target font resource!"
msgstr "Δε δόθηκε πόÏος γÏαμματοσειÏάς Ï€ÏοοÏισμοÏ!"
#: editor/io_plugins/editor_font_import_plugin.cpp
-#, fuzzy
msgid ""
"Invalid file extension.\n"
"Please use .font."
msgstr ""
"ΆκυÏη επέκταση αÏχείου.\n"
-"ΠαÏακαλώ χÏησιμοποιήστε .fnt."
+"ΠαÏακαλώ χÏησιμοποιήστε .font."
#: editor/io_plugins/editor_font_import_plugin.cpp
msgid "Can't load/process source font."
@@ -2578,6 +2928,10 @@ msgstr "Πηγαία πλέγματα:"
msgid "Mesh"
msgstr "Πλέγμα"
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "Επιφάνεια %d"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr "Δεν υπάÏχουν δείγματα για εισαγωγή!"
@@ -2961,9 +3315,8 @@ msgid "Compress"
msgstr "Συμπίεση"
#: editor/io_plugins/editor_translation_import_plugin.cpp
-#, fuzzy
msgid "Add to Project (project.godot)"
-msgstr "ΠÏόσθεσε στο έÏγο (godot.cfg)"
+msgstr "ΠÏόσθεσε στο έÏγο (project.godot)"
#: editor/io_plugins/editor_translation_import_plugin.cpp
msgid "Import Languages:"
@@ -3166,6 +3519,11 @@ msgid "New name:"
msgstr "Îέο όνομα:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "ΕπεξεÏγασία φίλτÏων κόμβων"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr "Κλιμάκωση:"
@@ -3483,6 +3841,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "ΕπεξεÏγασία"
@@ -3515,10 +3874,6 @@ msgid "Use Pixel Snap"
msgstr "ΧÏήση κουμπώματος εικονοστοιχείου"
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr "Επικάλυψη γονέα"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr "Σκελετός.."
@@ -3628,11 +3983,6 @@ msgstr "Αυτή η λειτουÏγία απαιτεί έναν μόνο επι
msgid "Change default type"
msgstr "Αλλαγή Ï€Ïοεπιλεγμένου Ï„Ïπου"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "Εντάξει"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3672,6 +4022,14 @@ msgstr "ΕπεγεÏγασία πολυγώνου (ΑφαίÏεση σημείο
msgid "Create a new polygon from scratch."
msgstr "ΔημιουÏγία νέου πολυγώνου από την αÏχή."
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr "ΔημιουÏγία πολυγώνου 3D"
@@ -3712,22 +4070,53 @@ msgstr "ΑναπÏοσαÏμογή από την σκηνή"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
-msgid "Add point"
-msgstr "ΠÏοσθήκη εισόδου"
+msgid "Modify Curve Point"
+msgstr "ΤÏοποπίηση καμπÏλης"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "ΤÏοποποίηση χάÏτη καμπÏλης"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+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 "ΑφαίÏεση σημείου διαδÏομής"
+msgstr "ΑφαίÏεση σημείου"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Left linear"
+msgstr "ΓÏαμμική"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Right linear"
+msgstr "Δεξιά όψη"
+
+#: editor/plugins/curve_editor_plugin.cpp
msgid "Load preset"
-msgstr "ΦόÏτωση πόÏου"
+msgstr "ΦόÏτωση Ï€ÏοκαθοÏισμένης"
#: editor/plugins/curve_editor_plugin.cpp
-msgid "Modify Curve"
-msgstr "ΤÏοποπίηση καμπÏλης"
+#, fuzzy
+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"
@@ -3751,6 +4140,12 @@ 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 "ΔημιουÏγία πολυγώνου εμποδίου"
@@ -4014,13 +4409,14 @@ msgstr "ΕκκαθάÏιση μάσκας εκπομπής"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generating AABB"
msgstr "ΔημιουÏία AABB"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
+"Ο οÏισμός σημείου είναι δυνατός μόνο σε ένα υλικό επεξεÏγασίας "
+"ParticlesMaterial"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Error loading image:"
@@ -4036,36 +4432,38 @@ msgstr "ΟÏισμός μάσκας εκπομπής"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generate Visibility Rect"
-msgstr ""
+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
+#, fuzzy
+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
-#, fuzzy
msgid "Generation Time (sec):"
-msgstr "Μέσος ΧÏόνος (sec)"
+msgstr "ΧÏόνος παÏαγωγής (sec):"
#: 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."
@@ -4128,23 +4526,20 @@ msgid "Emission Source: "
msgstr "Πηγή εκπομπής: "
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generate Visibility AABB"
-msgstr "ΔημιουÏία AABB"
+msgstr "ΔημιουÏία AABB οÏατότητας"
#: editor/plugins/path_2d_editor_plugin.cpp
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
@@ -4202,14 +4597,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"
@@ -4364,9 +4757,14 @@ msgid "Pitch"
msgstr "Τόνος"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Clear Recent Files"
-msgstr "ΕκκαθάÏιση οστών"
+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"
@@ -4393,6 +4791,10 @@ 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 "Επόμενη δεσμή ενεÏγειών"
@@ -4445,6 +4847,11 @@ msgid "Close All"
msgstr "Κλείσιμο όλων"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+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.."
@@ -4477,6 +4884,11 @@ msgid "Keep Debugger Open"
msgstr "ΔιατήÏησε τον αποσφαλματωτή ανοιχτό"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "Άνοιγμα του επόμενου επεξεÏγαστή"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr "ΠαÏάθυÏο"
@@ -4489,9 +4901,8 @@ msgid "Move Right"
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."
@@ -4545,25 +4956,28 @@ 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
-#, fuzzy
msgid "Convert Case"
-msgstr "ΜετατÏοπή Εικόνων"
+msgstr "ΜετατÏοπή κεφαλαίων/πεζών"
#: editor/plugins/script_text_editor.cpp
msgid "Uppercase"
-msgstr ""
+msgstr "Κεφαλαία"
#: editor/plugins/script_text_editor.cpp
msgid "Lowercase"
-msgstr ""
+msgstr "Πεζά"
#: editor/plugins/script_text_editor.cpp
msgid "Capitalize"
-msgstr ""
+msgstr "Κεφαλαιοποίηση"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp scene/gui/line_edit.cpp
@@ -4592,6 +5006,11 @@ msgid "Move Down"
msgstr "Μετακίνηση κάτω"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "ΔιαγÏαφή σημείου"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr "στοιχειοθέτηση αÏιστεÏά"
@@ -4617,11 +5036,11 @@ msgstr "ΠεÏικοπή ÎºÎ±Ï„Î±Î»Î·ÎºÏ„Î¹ÎºÎ¿Ï ÎºÎµÎ½Î¿Ï Î´Î¹Î±ÏƒÏ„Î®Î¼Î±Ï„Î
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Spaces"
-msgstr ""
+msgstr "ΜετατÏοπή εσοχής σε κενά"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Tabs"
-msgstr ""
+msgstr "ΜετατÏοπή εσοχής σε στηλοθέτες"
#: editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
@@ -4645,14 +5064,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
@@ -4679,7 +5096,7 @@ msgstr "Βοήθεια ανάλογα με τα συμφÏαζόμενα"
#: editor/plugins/shader_editor_plugin.cpp
msgid "Shader"
-msgstr ""
+msgstr "ΠÏόγÏαμμα σκίασης"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Scalar Constant"
@@ -4807,7 +5224,7 @@ msgstr "ΠÏοσθήκη κόμβου γÏαφήματος"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Orthogonal"
-msgstr "ΟÏθογώνια"
+msgstr "ΑξονομετÏική"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Perspective"
@@ -4899,63 +5316,28 @@ msgid "Animation Key Inserted."
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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "Πήγαινε μπÏοστά"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "ΑντίστÏοφα"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "Ροδέλα κάτω."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
-msgstr ""
+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 ""
+msgstr "Κλήσεις σχεδίασης"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Vertices"
-msgstr "Ιδιότητες:"
+msgstr "ΚοÏυφές"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align with view"
@@ -4974,33 +5356,81 @@ msgid "Display Overdraw"
msgstr "Εμφάνιση Ï€ÏÎ¿ÏƒÎ¸ÎµÏ„Î¹ÎºÎ¿Ï ÏƒÏ‡ÎµÎ´Î¹Î±ÏƒÎ¼Î¿Ï"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Display Unshaded"
-msgstr "Άσκια εμφάνιση"
+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"
-msgstr ""
+msgstr "Εμφάνιση πληÏοφοÏιών"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Audio Listener"
msgstr "ΑκÏοατής ήχου"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "preview"
+msgstr "ΠÏοεπισκόπηση"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr "Διάλογος XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "Επιλογή λειτουÏγίας"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid ""
+"Drag: Rotate\n"
+"Alt+Drag: Move\n"
+"Alt+RMB: Depth list selection"
+msgstr "Alt+Δεξί κλικ: Επιλογή λίστας βάθους"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode (W)"
msgstr "ΛειτουÏγία μετακίνησης (W)"
@@ -5038,7 +5468,7 @@ msgstr "Δεξιά όψη"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Switch Perspective/Orthogonal view"
-msgstr "Εναλλαγή ΠÏοοπτικής / ΟÏθογώνιας Ï€Ïοβολής"
+msgstr "Εναλλαγή ΠÏοοπτικής / ΑξονομετÏικής Ï€Ïοβολής"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Insert Animation Key"
@@ -5057,24 +5487,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 "Ctrl: ΠεÏιστÏοφή"
+msgstr "ΕÏγαλείο πεÏιστÏοφής"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Scale"
-msgstr "Κλιμάκωση:"
+msgstr "ΕÏγαλείο κλιμάκωσης"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform"
@@ -5121,6 +5547,7 @@ msgid "View Grid"
msgstr "ΠÏοβολή πλέγματος"
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "Ρυθμίσεις"
@@ -5249,6 +5676,11 @@ msgid "StyleBox Preview:"
msgstr "ΠÏοεπισκόπηση StyleBox:"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
+msgid "Set Region Rect"
+msgstr "ΠεÏιοχή υφής"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
msgstr "ΛειτουÏγία κουμπώματος:"
@@ -5306,6 +5738,16 @@ msgid "Remove Item"
msgstr "ΑφαίÏεση στοιχείου"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "ΑφαίÏεση στοιχείων κλάσης"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "ΑφαίÏεση"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr "Θέμα"
@@ -5373,7 +5815,7 @@ msgstr "ΚαÏτέλα 2"
msgid "Tab 3"
msgstr "ΚαÏτέλα 3"
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr "ΤÏπος:"
@@ -5395,12 +5837,27 @@ msgid "Color"
msgstr "ΧÏώμα"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "ΔιαγÏαφή επιλογής"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr "Βάψιμο TileMap"
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "Διπλασιασμός"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "ΓÏαμμική"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Bucket Fill"
+msgstr "Κουβάς"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5435,10 +5892,6 @@ msgid "Pick Tile"
msgstr "Επιλογή πλακιδίου"
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr "Επιλογή"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr "ΠεÏιστÏοφή 0 μοίÏες"
@@ -5498,7 +5951,7 @@ msgstr "ΔιαγÏαφή διαμόÏφωσης '%s';"
msgid "Presets"
msgstr "ΔιαμοÏφώσεις"
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "ΠÏοσθήκη.."
@@ -5549,6 +6002,25 @@ msgid "Make Patch"
msgstr "ΔημιουÏγία ενημέÏωσης"
#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "Υφή"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "Λίστα συναÏτήσεων:"
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Export PCK/Zip"
+msgstr "Εξαγωγή"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr "Τα Ï€Ïότυπα εξαγωγής για αυτή την πλατφόÏτμα λείπουν:"
@@ -5561,14 +6033,12 @@ msgid "Invalid project path, the path must exist!"
msgstr "Μη έγκυÏη διαδÏομή έÏγου, η διαδÏομή Ï€Ïέπει να υπάÏχει!"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project path, project.godot must not exist."
-msgstr "Μη έγκυÏη διαδÏομή έÏγου, το godot.cfg δεν Ï€Ïέπει να υπάÏχει."
+msgstr "Μη έγκυÏη διαδÏομή έÏγου, το project.godot δεν Ï€Ïέπει να υπάÏχει."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project path, project.godot must exist."
-msgstr "Μη έγκυÏη διαδÏομή έÏγου, το godot.cfg Ï€Ïέπει να υπάÏχει."
+msgstr "Μη έγκυÏη διαδÏομή έÏγου, το project.godot Ï€Ïέπει να υπάÏχει."
#: editor/project_manager.cpp
msgid "Imported Project"
@@ -5579,19 +6049,14 @@ msgid "Invalid project path (changed anything?)."
msgstr "Μη έγκυÏη διαδÏομή έÏγου (Αλλάξατε τίποτα;)."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't create project.godot in project path."
-msgstr "Δεν ήταν δυνατή η δημιουÏγία του godot.cfg στη διαδÏομή έÏγου."
+msgstr "Δεν ήταν δυνατή η δημιουÏγία του project.godot στη διαδÏομή έÏγου."
#: editor/project_manager.cpp
msgid "The following files failed extraction from package:"
msgstr "Η εξαγωγή των ακόλουθων αÏχείων από το πακέτο απέτυχε:"
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr "Το πακέτο εγκαταστάθηκε επιτυχώς!"
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "Εισαγωγή υπαÏÎºÏ„Î¿Ï Î­Ïγου"
@@ -5636,6 +6101,23 @@ msgid "Are you sure to open more than one project?"
msgstr "Είστε σίγουÏοι πως θέλετε να ανοίξετε πεÏισσότεÏα από ένα έÏγα;"
#: 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 ""
+"Δεν έχει καθοÏιστεί κÏÏια σκηνή, θέλετε να επιλέξετε μία;\n"
+"ΜποÏείτε να την αλλάξετε αÏγότεÏα στις «Ρυθμίσεις έÏγου» κάτω από την "
+"κατηγοÏία «ΕφαÏμογή»."
+
+#: 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 "Είστε σίγουÏοι πως θέλετε να Ï„Ïέξετε πεÏισσότεÏα από ένα έÏγα;"
@@ -5653,10 +6135,6 @@ msgstr ""
"Είστε έτοιμοι να σαÏώσετε %s φακέλους για υπαÏκτά έÏγα Godot. Είστε σίγουÏοι;"
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr "ΔιαχειÏιστής"
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr "Λίστα έÏγων"
@@ -5677,264 +6155,295 @@ msgid "New Project"
msgstr "Îέο έÏγο"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Templates"
-msgstr "ΑφαίÏεση Ï€ÏοτÏπου"
+msgstr "ΠÏότυπα"
#: editor/project_manager.cpp
msgid "Exit"
msgstr "Έξοδος"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Δεν ήταν δυνατή η σÏνδεση."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "Κλειδί "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr "Κουμπί Joystick"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr "Άξονας Joystick"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr "Κουμπί ποντικιοÏ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr "Μη έγκυÏη ενέÏγεια (Όλα επιτÏέποντα εκτός από το '/' και το ':')."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr "Η ενέÏγεια '%s' υπάÏχει ήδη!"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr "Μετονομασία συμβάντος εισόδου"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr "ΠÏοσθήκη συμβάντος εισόδου"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr "Control+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "Πατήστε ένα κουμπί.."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr "Kουμπί ποντικιοÏ:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr "ΑÏιστεÏÏŒ κουμπί"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr "Δεξί κουμπί"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr "Μεσαίο κουμπί"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr "Ροδέλα πάνω"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr "Ροδέλα κάτω"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr "Κουμπί 6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr "Κουμπί 7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr "Κουμπί 8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr "Κουμπί 9"
-#: editor/project_settings.cpp
+#: 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 "ΑÏιθμός άξονα Joypad:"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "Άξονας"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr "ΑÏιθμός ÎºÎ¿Ï…Î¼Ï€Î¹Î¿Ï Joypad:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr "ΠÏοσθήκη συμβάντος ενέÏγειας εισόδου"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr "ΔιαγÏαφή συμβάντος ενέÏγειας εισόδου"
-#: editor/project_settings.cpp
-#, fuzzy
+#: editor/project_settings_editor.cpp
msgid "Add Event"
-msgstr "ΠÏοσθήκη άδειου"
+msgstr "ΠÏοσθήκη συμβάντος"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "Συσκευή"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Κουμπί"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "ΑÏιστεÏÏŒ κουμπί."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "Δεξί κουμπί."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "Μεσαίο κουμπί."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "Ροδέλα πάνω."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "Ροδέλα κάτω."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "ΠÏοσθέστε ιδιότητα Getter"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "No property '"
+msgstr "Ιδιότητα:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "Ρυθμίσεις"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "ΔιαγÏαφή εισόδου"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "Σφάλμα κατά την αποθήκευση Ïυθμίσεων."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "Οι Ïυθμίσεις αποθηκεÏτικαν εντάξει."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr "ΠÏοσθήκη μετάφÏασης"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "ΑφαίÏεση μετάφÏασης"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr "ΠÏοσθήκη ανακατεÏθυνσης διαδÏομής"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr "ΠÏοσθήκη ανακατεÏθυνσης διαδÏομής πόÏου"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr "Αλλαγή γλώσσας ανακατεÏθυνσης πόÏων"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr "ΑφαίÏεση ανακατεÏθυνσης πόÏου"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr "ΑφαίÏεση επιλογής ανακατεÏθυνσης πόÏου"
-#: editor/project_settings.cpp
-#, fuzzy
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
-msgstr "Ρυθμίσεις έÏγου (godot.cfg)"
+msgstr "Ρυθμίσεις έÏγου (project.godot)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr "Γενικά"
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr "Ιδιότητα:"
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr "ΔιαγÏαφή"
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr "ΑντιγÏαφή σε πλατφόÏμα.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
+msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr "ΧάÏτης εισόδου"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr "ΕνέÏγεια:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr "Συσκευή:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr "Δείκτης:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr "Τοπική Ï€ÏοσαÏμογή"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr "ΜεταφÏάσεις"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr "ΜεταφÏάσεις:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr "ΑνακατευθÏνσεις"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr "ΠόÏοι:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr "ΑνακατευθÏνσεις ανά πεÏιοχή:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr "ΠεÏιοχή"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "Αυτόματη φόÏτωση"
@@ -5975,6 +6484,11 @@ msgid "Assign"
msgstr "Ανάθεση"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Επιλέξτε έναν κόμβο"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr "Îεα δεσμή ενεÏγειών"
@@ -5987,6 +6501,11 @@ msgid "Error loading file: Not a resource!"
msgstr "Σφάλμα κατά την φόÏτωση αÏχείου: Δεν είναι πόÏος!"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "Επιλέξτε κόμβους για εισαγωγή"
+
+#: editor/property_editor.cpp
msgid "Pick a Node"
msgstr "Επιλέξτε έναν κόμβο"
@@ -6084,6 +6603,11 @@ msgstr "ΟÏίσματα κÏÏιας σκηνής:"
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 "Δεν υπάÏχει γονέας για να δημιουÏγηθοÏν τα στιγμιότυπα των σκηνών."
@@ -6129,10 +6653,6 @@ msgid "Delete Node(s)?"
msgstr "ΔιαγÏαφή κόμβων;"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "Αυτή η λειτουÏγία δεν μποÏεί να γίνει χωÏίς σκηνή."
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr "Δεν είναι δυνατή η εκτέλεση με τον πηγαίο κόμβο."
@@ -6147,6 +6667,18 @@ 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 "Βγάζει νόημα!"
@@ -6181,9 +6713,8 @@ msgid "Error duplicating scene to save it."
msgstr "Σφάλμα κατά τον διπλασιασμό σκηνής για αποθήκευση."
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Sub-Resources:"
-msgstr "ΠόÏοι:"
+msgstr "Yπο-ΠόÏοι:"
#: editor/scene_tree_dock.cpp
msgid "Edit Groups"
@@ -6194,6 +6725,14 @@ msgid "Edit Connections"
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 "ΔιαγÏαφή Κόμβων"
@@ -6246,6 +6785,11 @@ msgstr ""
"υπάÏχει πηγαίος κόμβος."
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "ΦίλτÏα"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr "ΣÏνδεση νέας ή υπαÏκτής δεσμής ενεÏγειών για τον επιλεγμένο κόμβο."
@@ -6253,6 +6797,14 @@ msgstr "ΣÏνδεση νέας ή υπαÏκτής δεσμής ενεÏγειÏ
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 "Εναλλαγή οÏατότητας Spatial"
@@ -6263,56 +6815,59 @@ msgstr "Εναλλαγή οÏατότητας CanvasItem"
#: editor/scene_tree_editor.cpp
msgid "Node configuration warning:"
-msgstr ""
+msgstr "ΠÏοειδοποίηση διαμόÏφωσης κόμβου:"
#: editor/scene_tree_editor.cpp
msgid ""
"Node has connection(s) and group(s)\n"
"Click to show signals dock."
msgstr ""
+"Ο κόμβος έχει συνδέσεις και ομάδες\n"
+"Πατήστε για να δείξετε την πλατφόÏμα σημάτων."
#: editor/scene_tree_editor.cpp
msgid ""
"Node has connections.\n"
"Click to show signals dock."
msgstr ""
+"Ο κόμβος έχει συνδέσεις\n"
+"Πατήστε για να δείξετε την πλατφόÏμα σημάτων."
#: editor/scene_tree_editor.cpp
msgid ""
"Node is in group(s).\n"
"Click to show groups dock."
msgstr ""
-
-#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "Επιλογές ÎµÎ½Ï„Î¿Ï€Î¹ÏƒÎ¼Î¿Ï ÏƒÏ†Î±Î»Î¼Î¬Ï„Ï‰Î½"
+"Ο κόμβος έχει και ομάδες\n"
+"Πατήστε για να δείξετε την πλατφόÏμα σημάτων."
#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr "Στιγμιότυπο:"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Open script"
-msgstr "Επόμενη δεσμή ενεÏγειών"
+msgstr "Άνοιγμα δεσμής ενεÏγειών"
#: editor/scene_tree_editor.cpp
msgid ""
"Node is locked.\n"
"Click to unlock"
msgstr ""
+"Ο κόμβος είναι κλειδομένος.\n"
+"Πατήστε για ξεκλείδωμα"
#: editor/scene_tree_editor.cpp
msgid ""
"Children are not selectable.\n"
"Click to make selectable"
msgstr ""
+"Τα παιδιά δεν είναι επιλέξιμα.\n"
+"Πατήστε για να τα κάνετε επιλέξιμα"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Toggle Visibility"
-msgstr "Εναλλαγή οÏατότητας Spatial"
+msgstr "Εναλλαγή οÏατότητας"
#: editor/scene_tree_editor.cpp
msgid "Invalid node name, the following characters are not allowed:"
@@ -6327,32 +6882,9 @@ msgid "Scene Tree (Nodes):"
msgstr "ΔέντÏο σκηνής (Κόμβοι):"
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr "ΕπεξεÏγάσιμα παιδιά"
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr "ΦόÏτωση ως μέσο κÏάτησης θέσης"
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr "ΑπόÏÏιψη στιγμιοτÏπισης"
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr "Άνοιγμα στον επεξεÏγαστή"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr "ΕκκαθάÏιση κληÏονομικότητας"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr "ΕκκαθάÏιση κληÏονομικότητας; (Δεν γίνεται ανέÏαιση!)"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr "ΕκκαθάÏιση!"
+#, fuzzy
+msgid "Node Configuration Warning!"
+msgstr "ΠÏοειδοποίηση διαμόÏφωσης κόμβου:"
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -6360,14 +6892,23 @@ msgstr "Επιλέξτε έναν κόμβο"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Σφάλμα κατά την φόÏτωση εικόνας:"
+
+#: editor/script_create_dialog.cpp
msgid "Error - Could not create script in filesystem."
-msgstr "Δεν ήταν δυνατή η δημιουÏγία δεσμής ενεÏγειών στο σÏστημα αÏχείων."
+msgstr ""
+"Σφάλμα - Δεν ήταν δυνατή η δημιουÏγία δεσμής ενεÏγειών στο σÏστημα αÏχείων."
#: editor/script_create_dialog.cpp
msgid "Error loading script from %s"
msgstr "Σφάλμα κατά την φόÏτωση δεσμής ενεÏγειών από %s"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "Δ/Υ"
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "Η διαδÏομή είναι άδεια"
@@ -6385,65 +6926,53 @@ msgstr "Μη έγκυÏη επέκταση"
#: editor/script_create_dialog.cpp
msgid "Wrong extension chosen"
-msgstr ""
+msgstr "Επιλέχθηκε εσφαλμένη επέκταση"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid Path"
-msgstr "ΆκυÏη διαδÏομή."
+msgstr "Μη έγκυÏη διαδÏομή"
#: editor/script_create_dialog.cpp
msgid "Invalid class name"
msgstr "Μη έγκυÏο όνομα κλάσης"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid inherited parent name or path"
-msgstr "ΆκυÏο όνομα ιδιότητας δείκτη."
+msgstr "Μη έγκυÏο κληÏονομημένο όνομα ή διαδÏομή γονέα"
#: editor/script_create_dialog.cpp
msgid "Script valid"
-msgstr ""
+msgstr "ΈγκυÏη δεσμή ενεÏγειών"
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9 and _"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr "Δ/Υ"
+msgstr "ΕπιτÏεπόμενα: a-z, A-Z, 0-9 και _"
#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
-msgstr ""
+msgstr "Ενσωμάτωση δεσμής ενεÏγειών (στο αÏχείο σκηνής)"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Create new script file"
-msgstr "ΔημιουÏγία νέας δεσμής ενεÏγειών"
+msgstr "ΔημιουÏγία νέου αÏχείου δεσμής ενεÏγειών"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Load existing script file"
-msgstr "ΦόÏτωση υπαÏκτής δεσμής ενεÏγειών"
+msgstr "ΦόÏτωση υπαÏÎºÏ„Î¿Ï Î±Ïχείου δεσμής ενεÏγειών"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Inherits"
-msgstr "ΚληÏονομεί:"
+msgstr "ΚληÏονομεί"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Class Name"
-msgstr "Όνομα κλάσης:"
+msgstr "Όνομα κλάσης"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Template"
-msgstr "ΑφαίÏεση Ï€ÏοτÏπου"
+msgstr "ΠÏότυπο"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Built-in Script"
msgstr "Ενσωματωμένη δεσμή ενεÏγειών"
@@ -6584,6 +7113,10 @@ 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 "Αλλαγή εÏÏους πεδίου κάμεÏας"
@@ -6617,7 +7150,7 @@ msgstr "Αλλαγή διαστάσεων ειδοποιητή"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Particles AABB"
-msgstr ""
+msgstr "Αλλαγή AABB σωματιδίων"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Probe Extents"
@@ -6668,6 +7201,137 @@ msgstr "ΆκυÏη μοÏφή Î»ÎµÎ¾Î¹ÎºÎ¿Ï ÏƒÏ„Î¹Î³Î¼Î¹Î¿Ï„Ïπων (Μη έγ
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
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "ΔιαγÏαφή επιλεγμένου"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Διπλασιασμός επιλογής"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "Ctrl: ΠεÏιστÏοφή"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "Ctrl: ΠεÏιστÏοφή"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Z"
+msgstr "Ctrl: ΠεÏιστÏοφή"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "ΔημιουÏγία νέου"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "ΔημιουÏγία νέου έÏγου"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Area"
+msgstr "ΔιαγÏαφή TileMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Μόνο στην επιλογή"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Μόνο στην επιλογή"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "Ρυθμίσεις κουμπώματος"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "Στιγμιότυπο:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr " ΑÏχεία"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6707,6 +7371,31 @@ msgid "Stack overflow with stack depth: "
msgstr "ΥπεÏχείλιση στοίβας με βάθος στοίβας: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "ΕπεξεÏγασία παÏαμέτÏων σήματος:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Αλλαγή Ï„Ïπου τιμής πίνακα"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Αλλαγή ονόματος εισόδου"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Default Value"
+msgstr "Αλλαγή Ï€Ïοεπιλλεγμένης τιμής"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "ΕπεξεÏγασία μεταβλητής:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "ΣυναÏτήσεις:"
@@ -6747,26 +7436,6 @@ msgid "Add Signal"
msgstr "ΠÏοσθήκη σήματος"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "ΑφαίÏεση συνάÏτησης"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "ΑφαίÏεση μεταβλητής"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "ΕπεξεÏγασία μεταβλητής:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "ΑφαίÏεση σήματος"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "ΕπεξεÏγασία σήματος:"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
msgstr "Αλλαγή έκφÏασης"
@@ -6775,6 +7444,16 @@ msgid "Add Node"
msgstr "ΠÏοσθήκη κόμβου"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "ΑφαίÏεση άκυÏων κλειδιών"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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 ""
"Πατήστε παÏατεταμένα το κουμπί Meta για να Ï€Ïοσθέσετε έναν Getter. Πατήστε "
@@ -6823,6 +7502,26 @@ msgid "Add Setter Property"
msgstr "ΠÏοσθέστε ιδιότητα Setter"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "Αλλαγή Ï„Ïπου"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "ΑφαίÏεση κόμβων"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "ΑφαίÏεση κόμβου γÏαφήματος"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "ΣÏνδεση στον κόμβο:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "Συνθήκη"
@@ -6851,6 +7550,56 @@ msgid "Get"
msgstr "ΠάÏε"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Αλλαγή ονόματος εισόδου"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "ΑδÏνατη η λειτουÏγία στο '..'"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "Το Ï€ÏόχειÏο πόÏων είναι άδειο!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Επικόλληση κόμβων"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "ΑφαίÏεση συνάÏτησης"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "ΕπεξεÏγασία μεταβλητής:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "ΑφαίÏεση μεταβλητής"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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 "ΤÏπος βάσης:"
@@ -6871,10 +7620,6 @@ msgid "Edit Variable:"
msgstr "ΕπεξεÏγασία μεταβλητής:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Αλλαγή"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "ΔιαγÏαφή επιλεγμένου"
@@ -6951,14 +7696,6 @@ msgstr ""
"ΆκυÏος Ï„Ïπος επιστÏοφής από την _step(), Ï€Ïέπει να είναι ακέÏαιος (seq out) "
"ή ακολουθία χαÏακτήÏων (error)."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "μόλις πατήθηκε"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "μόλις απελευθεÏώθηκε"
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr "Εκτέλεση στον πεÏιηγητή"
@@ -6979,81 +7716,6 @@ msgstr "Δεν ήταν δυνατή η ανάγνωση του αÏχείου:\
msgid "Could not open template for export:\n"
msgstr "Δεν ήταν δυνατό το άνοιγμα Ï€ÏοτÏπου για εξαγωγή:\n"
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-"Δεν ήταν δυνατή η ανάγνωση του αÏχείου πιστοποιητικών. Είναι η διαδÏομή και "
-"ο κωδικός σωστοί;"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "Σφάλμα κατά τη δημιουÏγία της υπογÏαφής του αντικειμένου."
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr "Σφάλμα κατά τη δημιουÏγία της υπογÏαφής του πακέτου."
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"Δεν βÏέθηκαν Ï€Ïότυπα εξαγωγής.\n"
-"Κατεβάστε και εγκαταστήστε τα Ï€Ïότυπα εξαγωγής."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr "Το Ï€ÏοσαÏμοσμένο πακέτο αποσφαλμάτωσης δεν βÏέθηκε."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr "Το Ï€ÏοσαÏμοσμένο πακέτο παÏαγωγής δεν βÏέθηκε."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr "ΆκυÏο μοναδικό όνομα."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr "ΆκυÏο GUID Ï€Ïοϊόντος."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr "ΆκυÏο GUID εκδότη."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "ΆκυÏο χÏώμα παÏασκηνίου."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "ΆκυÏη εικόνα λογότυπου καταστήματος (Ï€Ïέπει να είναι 50x50)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr "ΆκυÏη εικόνα τετÏάγωνου λογότυπου 44x44 (Ï€Ïέπει να είναι 44x44)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr "ΆκυÏη εικόνα τετÏάγωνου λογότυπου 71x71 (Ï€Ïέπει να είναι 71x71)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr "ΆκυÏη εικόνα τετÏάγωνου λογότυπου 150x150 (Ï€Ïέπει να είναι 150x150)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr "ΆκυÏη εικόνα τετÏάγωνου λογότυπου 310x310 (Ï€Ïέπει να είναι 310x310)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr "ΆκυÏη εικόνα ευÏÏ Î»Î¿Î³ÏŒÏ„Ï…Ï€Î¿Ï… 310x150 (Ï€Ïέπει να είναι 310x150)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr "ΆκυÏες διαστάσεις εικόνας οθόνης εκκίνησης (Ï€Ïέπει να είναι 620x300)."
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7152,11 +7814,20 @@ 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 "Το PathFollow2D δουλεÏει μόνο όταν κληÏονομεί έναν κόμβο Path2D."
+#: 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 ""
@@ -7187,24 +7858,33 @@ msgstr ""
"Το VisibilityEnable2D δουλεÏει καλÏτεÏα όταν χÏησιμοποιείται μα την Ïίζα της "
"επεξεÏγασμένης σκηνές κατευθείαν ως γονέας."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"The controller id must not be 0 or this controller will not be bound to an "
+"actual controller"
msgstr ""
-"To CollisionShape υπάÏχει μόνο για να δώσει ένα σχήμα σÏγκÏουσης σε έναν "
-"κόμβο που Ï€ÏοέÏχεται από το CollisionObject. ΧÏησιμοποιήστε το μόνο εάν "
-"κληÏονομεί τα Area, StaticBody, RigidBody, KinematicBody, κλπ, για να τους "
-"δώσετε ένα σχήμα."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRAnchor must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"Ένα σχήμα Ï€Ïέπει να δοθεί στο CollisionShape για να λειτουÏγήσει. "
-"ΔημιουÏγήστε ένα πόÏο σχήματος για αυτό!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7221,6 +7901,25 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "Ένα άδειο CollisionPolygon δεν επηÏεάζει την σÏγκÏουση."
+#: 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 ""
+"To CollisionShape υπάÏχει μόνο για να δώσει ένα σχήμα σÏγκÏουσης σε έναν "
+"κόμβο που Ï€ÏοέÏχεται από το CollisionObject. ΧÏησιμοποιήστε το μόνο εάν "
+"κληÏονομεί τα Area, StaticBody, RigidBody, KinematicBody, κλπ, για να τους "
+"δώσετε ένα σχήμα."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"Ένα σχήμα Ï€Ïέπει να δοθεί στο CollisionShape για να λειτουÏγήσει. "
+"ΔημιουÏγήστε ένα πόÏο σχήματος για αυτό!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7239,6 +7938,14 @@ msgstr ""
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."
@@ -7263,12 +7970,12 @@ msgstr ""
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
-msgstr "ΛειτουÏγία εκτέλεσης:"
+msgid "Raw Mode"
+msgstr "ΛειτουÏγία Μετακίνησης κάμεÏας"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
-msgstr ""
+msgstr "ΠÏοσθήκη του Ï„Ïέχοντος χÏώματος ως Ï€ÏοκαθοÏισμένο"
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -7278,22 +7985,6 @@ msgstr "Ειδοποίηση!"
msgid "Please Confirm..."
msgstr "ΠαÏακαλώ επιβεβαιώστε..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Άνοιγμα αÏχείου"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Άνοιγμα αÏχείου/-ων"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Άνοιγμα λεξικοÏ"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Άνοιγμα αÏχείου ή λεξικοÏ"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7319,11 +8010,13 @@ msgstr ""
"ΧÏησιμοποιήστε ένα container ως παιδί (VBox, HBox, κτλ), ή ένα Control και "
"οÏίστε το Ï€ÏοσαÏμοσμένο ελάχιστο μέγεθος χειÏοκίνητα."
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
msgstr ""
+"Το Ï€Ïοεπιλεγμένο πεÏιβάλλον, όπως έχει οÏισθεί στις Ïυθμίσεις έÏγου "
+"(Rendering -> Viewport -> Default Environment) δεν μποÏοÏσε να φοÏτωθεί."
#: scene/main/viewport.cpp
msgid ""
@@ -7337,6 +8030,99 @@ msgstr ""
"μέγεθος. Αλλιώς, κάντε το ένα RenderTarget και οÏίστε το internal texture σε "
"έναν κόμβο για απεικόνιση."
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "Κλείσιμο σκηνής; (Οι μη αποθηκευμένες αλλαγές θα χαθοÏν)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "Θέλετε να ανοίξετε τον διαχειÏιστή έÏγου; \n"
+#~ "(Οι μη αποθηκευμένες αλλαγές θα χαθοÏν)"
+
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "Κλείσιμο και μετάβαση στην Ï€ÏοηγοÏμενη σκηνή"
+
+#~ msgid "Expand to Parent"
+#~ msgstr "Επικάλυψη γονέα"
+
+#~ msgid "Del"
+#~ msgstr "ΔιαγÏαφή"
+
+#~ msgid "Copy To Platform.."
+#~ msgstr "ΑντιγÏαφή σε πλατφόÏμα.."
+
+#~ msgid "just pressed"
+#~ msgstr "μόλις πατήθηκε"
+
+#~ msgid "just released"
+#~ msgstr "μόλις απελευθεÏώθηκε"
+
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr ""
+#~ "Δεν ήταν δυνατή η ανάγνωση του αÏχείου πιστοποιητικών. Είναι η διαδÏομή "
+#~ "και ο κωδικός σωστοί;"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "Σφάλμα κατά τη δημιουÏγία της υπογÏαφής του αντικειμένου."
+
+#~ msgid "Error creating the package signature."
+#~ msgstr "Σφάλμα κατά τη δημιουÏγία της υπογÏαφής του πακέτου."
+
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "Δεν βÏέθηκαν Ï€Ïότυπα εξαγωγής.\n"
+#~ "Κατεβάστε και εγκαταστήστε τα Ï€Ïότυπα εξαγωγής."
+
+#~ msgid "Custom debug package not found."
+#~ msgstr "Το Ï€ÏοσαÏμοσμένο πακέτο αποσφαλμάτωσης δεν βÏέθηκε."
+
+#~ msgid "Custom release package not found."
+#~ msgstr "Το Ï€ÏοσαÏμοσμένο πακέτο παÏαγωγής δεν βÏέθηκε."
+
+#~ msgid "Invalid unique name."
+#~ msgstr "ΆκυÏο μοναδικό όνομα."
+
+#~ msgid "Invalid product GUID."
+#~ msgstr "ΆκυÏο GUID Ï€Ïοϊόντος."
+
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "ΆκυÏο GUID εκδότη."
+
+#~ msgid "Invalid background color."
+#~ msgstr "ΆκυÏο χÏώμα παÏασκηνίου."
+
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr "ΆκυÏη εικόνα λογότυπου καταστήματος (Ï€Ïέπει να είναι 50x50)."
+
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr "ΆκυÏη εικόνα τετÏάγωνου λογότυπου 44x44 (Ï€Ïέπει να είναι 44x44)."
+
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr "ΆκυÏη εικόνα τετÏάγωνου λογότυπου 71x71 (Ï€Ïέπει να είναι 71x71)."
+
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr ""
+#~ "ΆκυÏη εικόνα τετÏάγωνου λογότυπου 150x150 (Ï€Ïέπει να είναι 150x150)."
+
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr ""
+#~ "ΆκυÏη εικόνα τετÏάγωνου λογότυπου 310x310 (Ï€Ïέπει να είναι 310x310)."
+
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr "ΆκυÏη εικόνα ευÏÏ Î»Î¿Î³ÏŒÏ„Ï…Ï€Î¿Ï… 310x150 (Ï€Ïέπει να είναι 310x150)."
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr ""
+#~ "ΆκυÏες διαστάσεις εικόνας οθόνης εκκίνησης (Ï€Ïέπει να είναι 620x300)."
+
+#~ msgid "RAW Mode"
+#~ msgstr "ΑκατέÏγαστη λειτουÏγία"
+
#~ msgid "Node From Scene"
#~ msgstr "Κόμβος από σκηνή"
@@ -7420,9 +8206,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "Αντικαταστάθηκαν %d εμφανίσεις."
-#~ msgid "Please save the scene first."
-#~ msgstr "ΠαÏακαλοÏμε αποθηκεÏστε την σκηνή Ï€Ïώτα."
-
#~ msgid "Save Translatable Strings"
#~ msgstr "Αποθήκευση μεταφÏάσιμων συμβολοσειÏών"
diff --git a/editor/translations/es.po b/editor/translations/es.po
index 053bbc1085..da7bd97b83 100644
--- a/editor/translations/es.po
+++ b/editor/translations/es.po
@@ -2,7 +2,9 @@
# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
# This file is distributed under the same license as the Godot source code.
#
+# Addiel Lucena Perez <addiell2017@gmail.com>, 2017.
# Alejandro Alvarez <eliluminado00@gmail.com>, 2017.
+# BLaDoM GUY <simplybladom@gmail.com>, 2017.
# Carlos López <genetita@gmail.com>, 2016.
# Lisandro Lorea <lisandrolorea@gmail.com>, 2016-2017.
# Roger BR <drai_kin@hotmail.com>, 2016.
@@ -13,8 +15,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2017-01-16 16:20+0000\n"
-"Last-Translator: Lisandro Lorea <lisandrolorea@gmail.com>\n"
+"PO-Revision-Date: 2017-07-08 01:05+0000\n"
+"Last-Translator: BLaDoM GUY <simplybladom@gmail.com>\n"
"Language-Team: Spanish <https://hosted.weblate.org/projects/godot-engine/"
"godot/es/>\n"
"Language: es\n"
@@ -22,7 +24,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.11-dev\n"
+"X-Generator: Weblate 2.16-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -153,7 +155,8 @@ msgstr "Ir al siguiente paso"
msgid "Goto Prev Step"
msgstr "Ir al paso anterior"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "Lineal"
@@ -368,7 +371,7 @@ msgstr "Cambiar valor del «array»"
#: editor/asset_library_editor_plugin.cpp
msgid "Free"
-msgstr ""
+msgstr "Libre"
#: editor/asset_library_editor_plugin.cpp editor/editor_plugin_settings.cpp
msgid "Version:"
@@ -390,7 +393,8 @@ msgstr "Archivo"
msgid "Description:"
msgstr "Descripción:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr "Instalar"
@@ -401,24 +405,24 @@ msgstr "Instalar"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Cerrar"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
-msgstr ""
+msgstr "No se ha podido resolver el nombre de Dominio:"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve."
-msgstr ""
+msgstr "No se ha podido resolver."
#: editor/asset_library_editor_plugin.cpp
msgid "Connection error, please try again."
-msgstr ""
+msgstr "Error de conexion, por favor intente otra vez."
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
@@ -432,11 +436,11 @@ msgstr "Conectar a nodo:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr ""
+msgstr "No hay respuesta desde el host:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response."
-msgstr ""
+msgstr "No responde."
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
@@ -445,31 +449,32 @@ msgstr "Formato de archivo desconocido:"
#: editor/asset_library_editor_plugin.cpp
msgid "Req. Failed."
-msgstr ""
+msgstr "Solicitud fallida."
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Request failed, too many redirects"
-msgstr ""
+msgstr "Solicitud fallida, ha redireccionado demasiado"
#: editor/asset_library_editor_plugin.cpp
msgid "Redirect Loop."
-msgstr ""
+msgstr "Bucle de redireccionamiento."
#: editor/asset_library_editor_plugin.cpp
msgid "Failed:"
-msgstr ""
+msgstr "Fallido:"
#: editor/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
-msgstr ""
+msgstr "Error de descarga, al pareser el archivo ha sido manipulado."
#: editor/asset_library_editor_plugin.cpp
msgid "Expected:"
-msgstr ""
+msgstr "Esperado:"
#: editor/asset_library_editor_plugin.cpp
msgid "Got:"
-msgstr ""
+msgstr "Tiene:"
#: editor/asset_library_editor_plugin.cpp
msgid "Failed sha256 hash check"
@@ -477,15 +482,15 @@ msgstr ""
#: editor/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr ""
+msgstr "Error en la descarga del asset:"
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
-msgstr ""
+msgstr "Finalizado!"
#: editor/asset_library_editor_plugin.cpp
msgid "Fetching:"
-msgstr ""
+msgstr "Buscando:"
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
@@ -509,11 +514,11 @@ msgstr "¡Hubo un error al guardar el recurso!"
#: editor/asset_library_editor_plugin.cpp
msgid "Idle"
-msgstr ""
+msgstr "Inactivo"
#: editor/asset_library_editor_plugin.cpp
msgid "Retry"
-msgstr ""
+msgstr "Reintente"
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
@@ -522,40 +527,39 @@ msgstr "Abajo"
#: editor/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr ""
+msgstr "Este asset ya esta descargandose!"
#: editor/asset_library_editor_plugin.cpp
msgid "first"
-msgstr ""
+msgstr "primero"
#: editor/asset_library_editor_plugin.cpp
msgid "prev"
-msgstr ""
+msgstr "anterior"
#: editor/asset_library_editor_plugin.cpp
msgid "next"
-msgstr ""
+msgstr "siguiente"
#: editor/asset_library_editor_plugin.cpp
msgid "last"
-msgstr ""
+msgstr "ultimo"
#: editor/asset_library_editor_plugin.cpp
msgid "All"
msgstr "Todos"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "Buscar:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "Buscar"
@@ -571,7 +575,7 @@ msgstr "Buscar"
msgid "Import"
msgstr "Importar"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "Plugins"
@@ -583,7 +587,7 @@ msgstr "Ordenar:"
msgid "Reverse"
msgstr "Invertir"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "Categoría:"
@@ -739,14 +743,14 @@ msgstr "Conectar a nodo:"
#: 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.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
msgstr "Añadir"
#: 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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "Quitar"
@@ -856,7 +860,7 @@ msgid "Resource"
msgstr "Recursos"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "Ruta"
@@ -941,43 +945,257 @@ msgstr "Explorador de recursos huérfanos"
msgid "Delete selected files?"
msgstr "¿Quieres eliminar los archivos seleccionados?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Eliminar"
+#: editor/editor_about.cpp
+msgid "Thanks from the Godot community!"
+msgstr "¡Muchas gracias de parte de la comunidad de Godot!"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "¡Gracias!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr "Contribuidores de Godot"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "Autor:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "Administrador de proyectos"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Lead Developer"
+msgstr "Desarrolladores"
+
+#: editor/editor_about.cpp editor/project_manager.cpp
+msgid "Project Manager"
+msgstr "Administrador de proyectos"
+
+#: editor/editor_about.cpp
+msgid "Developers"
+msgstr "Desarrolladores"
+
+#: 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
+#, fuzzy
+msgid "All Components"
+msgstr "Constantes:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "Constantes:"
+
+#: 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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "Sin comprimir"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "¡El paquete se ha instalado correctamente!"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "¡El paquete se ha instalado correctamente!"
+
#: editor/editor_audio_buses.cpp
-msgid "Save Audio Bus Layout As.."
+msgid "Speakers"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Location for New Layout.."
+#, fuzzy
+msgid "Add Effect"
+msgstr "Añadir elemento vacío"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Abrir diseño del Audio Bus"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Solo"
+msgstr "Abrir diseño del Audio Bus"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Mute"
+msgstr "Abrir diseño del Audio Bus"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Quitar seleccionados"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+msgstr "Opciones de depuración"
+
+#: 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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "Duplicar"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Quitar seleccionados"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "Añadir todos"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
msgstr ""
#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Borrar ajustes"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Duplicar animación"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "Mover acción"
+
+#: editor/editor_audio_buses.cpp
+msgid "Save Audio Bus Layout As.."
+msgstr "Guardar formato de los Audio Bus como..."
+
+#: editor/editor_audio_buses.cpp
+msgid "Location for New Layout.."
+msgstr "Ruta al nuevo diseño.."
+
+#: editor/editor_audio_buses.cpp
msgid "Open Audio Bus Layout"
+msgstr "Abrir diseño del Audio Bus"
+
+#: editor/editor_audio_buses.cpp
+msgid "There is no 'res://default_bus_layout.tres' file."
msgstr ""
#: editor/editor_audio_buses.cpp
#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"La extensión del archivo no es correcta.\n"
+"Prueba con la extensión .fnt."
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
msgid "Add Bus"
msgstr "Añadir todos"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "Crear recurso nuevo"
+
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "Cargar"
#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Load an existing Bus Layout."
+msgstr "Cargar un recurso existente desde disco y editarlo."
+
+#: editor/editor_audio_buses.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Save As"
msgstr "Guardar como"
-#: editor/editor_audio_buses.cpp editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Save this Bus Layout to a file."
+msgstr "Guardar formato de los Audio Bus como..."
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+msgid "Load Default"
msgstr "Predeterminado"
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "El nombre no es correcto."
@@ -1022,7 +1240,7 @@ msgstr "Añadir «AutoLoad»"
#: editor/editor_autoload_settings.cpp
msgid "Autoload '%s' already exists!"
-msgstr "¡El Autoload «%s» ya existe!"
+msgstr "¡El fichero «%s» ya existe!"
#: editor/editor_autoload_settings.cpp
msgid "Rename Autoload"
@@ -1084,6 +1302,11 @@ msgid "Updating scene.."
msgstr "Actualizando escena.."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "Prueba guardando la escena primero."
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "Elige una carpeta"
@@ -1116,8 +1339,9 @@ msgid "Packing"
msgstr "Empaquetando"
#: editor/editor_export.cpp platform/javascript/export/export.cpp
+#, fuzzy
msgid "Template file not found:\n"
-msgstr ""
+msgstr "No se encontró archivo de base:\n"
#: editor/editor_export.cpp
msgid "Added:"
@@ -1161,6 +1385,22 @@ msgstr "Todos los archivos (*)"
msgid "Open"
msgstr "Abrir"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Abrir un archivo"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Abrir archivo/s"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Abrir una carpeta"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Abrir un archivo o carpeta"
+
#: 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
@@ -1287,6 +1527,15 @@ msgid "Signals:"
msgstr "Señales:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Animaciones"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Constantes:"
@@ -1304,7 +1553,8 @@ msgid "Search Text"
msgstr "Texto de búsqueda"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " Salida:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1354,6 +1604,11 @@ msgid "Creating Thumbnail"
msgstr "Creando miniatura"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "This operation can't be done without a tree root."
+msgstr "Esta operación no puede realizarse sin una escena."
+
+#: editor/editor_node.cpp
msgid ""
"Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."
msgstr ""
@@ -1486,12 +1741,13 @@ msgid "Quick Open Script.."
msgstr "Apertura rápida de script…"
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "Sí"
+#, fuzzy
+msgid "Save & Close"
+msgstr "Guardar un archivo"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "¿Quieres cerrar la escena? (Los cambios sin guardar se perderán)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
@@ -1503,10 +1759,18 @@ msgid "No"
msgstr "Nodo"
#: editor/editor_node.cpp
+msgid "Yes"
+msgstr "Sí"
+
+#: editor/editor_node.cpp
msgid "This scene has never been saved. Save before running?"
msgstr ""
"Esta escena nunca se ha guardado. ¿Quieres guardarla antes de ejecutarla?"
+#: editor/editor_node.cpp editor/scene_tree_dock.cpp
+msgid "This operation can't be done without a scene."
+msgstr "Esta operación no puede realizarse sin una escena."
+
#: editor/editor_node.cpp
msgid "Export Mesh Library"
msgstr "Exportar biblioteca de modelos"
@@ -1516,12 +1780,9 @@ msgid "Export Tile Set"
msgstr "Exportar Tile Set"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "Salir"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "¿Quieres salir del editor?"
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "Esta operación no puede realizarse sin una escena."
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1544,22 +1805,59 @@ msgid "Quick Run Scene.."
msgstr "Ejecución rápida de escena…"
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "Salir"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "¿Quieres salir del editor?"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "Administrador de proyectos"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Guardar un archivo"
+
+#: 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 ""
-"¿Quieres abrir el el administrador de proyectos?\n"
-"(Los cambios sin guardar se perderán)"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "Elige una escena principal"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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 ""
+"La escena '%s' fue importado automáticamente, por lo tanto no puede ser "
+"modificada.\n"
+"Para poder modificarla, se tiene que crear una nueva escena heredada."
#: editor/editor_node.cpp editor/plugins/canvas_item_editor_plugin.cpp
#: editor/scene_tree_dock.cpp
@@ -1591,6 +1889,11 @@ msgstr "Guardar ajustes"
msgid "Delete Layout"
msgstr "Borrar ajustes"
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+msgid "Default"
+msgstr "Predeterminado"
+
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
msgstr "Cambiar pestaña de escena"
@@ -1607,6 +1910,11 @@ msgstr "%d archivos o carpetas más"
msgid "Distraction Free Mode"
msgstr "Modo sin distracciones"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "Modo sin distracciones"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "Escena"
@@ -1656,10 +1964,6 @@ msgstr "Guardar todas las escenas"
msgid "Close Scene"
msgstr "Cerrar escena"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr "Cerrar e ir a escena anterior"
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "Abrir reciente"
@@ -1849,11 +2153,11 @@ msgstr "Cerrar documentación"
#: editor/editor_node.cpp
msgid "Q&A"
-msgstr ""
+msgstr "P&R"
#: editor/editor_node.cpp
msgid "Issue Tracker"
-msgstr ""
+msgstr "Registros de problemas"
#: editor/editor_node.cpp
msgid "About"
@@ -1964,6 +2268,10 @@ msgstr "Nodo"
msgid "Output"
msgstr "Salida"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "Reimportar"
@@ -1973,26 +2281,10 @@ msgid "Update"
msgstr "Actualizar"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "¡Muchas gracias de parte de la comunidad de Godot!"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "¡Gracias!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "Importar plantillas desde un archivo ZIP"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "Exportar proyecto"
@@ -2013,9 +2305,18 @@ msgid "Open & Run a Script"
msgstr "Abrir y ejecutar un script"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "New Inherited"
+msgstr "Nueva escena heredada…"
+
+#: editor/editor_node.cpp
msgid "Load Errors"
msgstr "Errores de carga"
+#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
+msgid "Select"
+msgstr "Seleccionar"
+
#: editor/editor_node.cpp
#, fuzzy
msgid "Open 2D Editor"
@@ -2122,6 +2423,16 @@ msgstr "Reimportando"
msgid "Re-Import Changed Resources"
msgstr "Reimportar recursos cambiados"
+#: 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 "Escribe tu lógica en el método _run()."
@@ -2184,7 +2495,7 @@ msgstr "Abajo"
#: editor/export_template_manager.cpp
msgid "(Missing)"
-msgstr ""
+msgstr "(No encontrado)"
#: editor/export_template_manager.cpp
#, fuzzy
@@ -2193,7 +2504,7 @@ msgstr "Actual:"
#: editor/export_template_manager.cpp
msgid "Remove template version '%s'?"
-msgstr ""
+msgstr "Eliminar diseño de versión '%s'?"
#: editor/export_template_manager.cpp
msgid "Can't open export templates zip."
@@ -2201,13 +2512,15 @@ msgstr "No se puede abir el zip de plantillas de exportación."
#: editor/export_template_manager.cpp
msgid "Invalid version.txt format inside templates."
-msgstr ""
+msgstr "version.txt invalido en el diseño."
#: editor/export_template_manager.cpp
+#, fuzzy
msgid ""
"Invalid version.txt format inside templates. Revision is not a valid "
"identifier."
msgstr ""
+"formato de version.txt invalido. La revisión no es un identificador valido."
#: editor/export_template_manager.cpp
msgid "No version.txt found inside templates."
@@ -2272,11 +2585,29 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "Guardar y reimportar"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "Fuente:"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
"Los archivos de origen y destino son iguales, no se realizará ninguna acción."
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
"Las rutas de origen y destino son iguales, no se realizará ninguna acción."
@@ -2286,6 +2617,20 @@ msgid "Can't move directories to within themselves."
msgstr "No se pueden mover carpetas dentro de si mismas."
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Error al cargar la imagen:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Hubo un error al importar:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr "No se puede operar en «…»"
@@ -2364,6 +2709,12 @@ msgstr ""
"Instanciar la(s) escena(s) seleccionadas como hijas del nodo seleccionado."
#: editor/filesystem_dock.cpp
+msgid ""
+"Scanning Files,\n"
+"Please Wait.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Move"
msgstr "Mover"
@@ -2375,10 +2726,31 @@ msgstr "Añadir al grupo"
msgid "Remove from Group"
msgstr "Quitar del grupo"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "Superficie %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+msgstr "Importando escena…"
+
+#: 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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "Importar escena 3D"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2418,6 +2790,14 @@ msgid "Saving.."
msgstr "Guardando…"
#: 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
#, fuzzy
msgid " Files"
msgstr "Archivo"
@@ -2612,6 +2992,10 @@ msgstr "Modelo/s elegidos:"
msgid "Mesh"
msgstr "Modelos 3D"
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "Superficie %d"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr "¡No hay ningún sonido a importar!"
@@ -3202,6 +3586,11 @@ msgid "New name:"
msgstr "Nuevo nombre:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Editar filtros de nodo"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr "Escala:"
@@ -3519,6 +3908,7 @@ msgstr "Restaurar la habilidad de seleccionar los hijos de un objeto."
#: 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Editar"
@@ -3551,10 +3941,6 @@ msgid "Use Pixel Snap"
msgstr "Adherir a píxeles"
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr "Expandir al padre"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr "Esqueleto…"
@@ -3667,11 +4053,6 @@ msgstr "Esta operación requiere un solo nodo seleccionado."
msgid "Change default type"
msgstr "Cambiar Valor por Defecto"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "Aceptar"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid ""
@@ -3712,6 +4093,14 @@ msgstr "Editar polígono (quitar punto)"
msgid "Create a new polygon from scratch."
msgstr "Crea un nuevo polígono desde cero."
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr "Crear Poly3D"
@@ -3752,6 +4141,21 @@ msgstr "Actualizar desde escena"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Modify Curve Point"
+msgstr "Modificar Mapa de Curvas"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "Modificar Mapa de Curvas"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Load Curve Preset"
+msgstr "Cargar recurso"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Add point"
msgstr "Añadir entrada"
@@ -3762,13 +4166,31 @@ msgstr "Quitar Punto de ruta"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Left linear"
+msgstr "Lineal"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Right linear"
+msgstr "Vista derecha"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Load preset"
msgstr "Cargar recurso"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
-msgid "Modify Curve"
-msgstr "Modificar Mapa de Curvas"
+msgid "Remove Curve Point"
+msgstr "Quitar Punto de ruta"
+
+#: 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
#, fuzzy
@@ -3793,6 +4215,12 @@ msgid "Item List Editor"
msgstr "Editor de lista de elementos"
#: 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 "Crear polígono oclusor"
@@ -3809,7 +4237,7 @@ msgstr "Clic izquierdo: Mover punto."
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
#: editor/plugins/navigation_polygon_editor_plugin.cpp
msgid "Ctrl+LMB: Split Segment."
-msgstr "Ctrl + clic izquierdo: Partir segmento en dos."
+msgstr "Ctrl + LMB: Partir segmento."
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
#: editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -4093,6 +4521,12 @@ msgid "Load Emission Mask"
msgstr "Cargar máscara de emisión"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
+msgid "Particles"
+msgstr "Vértice"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
msgstr "Conteo de puntos generados:"
@@ -4425,6 +4859,12 @@ msgid "Clear Recent Files"
msgstr "Reestablecer huesos"
#: 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 "Error al guardar el tema"
@@ -4449,6 +4889,10 @@ msgid "Save Theme As.."
msgstr "Guardar tema como…"
#: editor/plugins/script_editor_plugin.cpp
+msgid " Class Reference"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Next script"
msgstr "Script siguiente"
@@ -4502,6 +4946,11 @@ msgid "Close All"
msgstr "Cerrar"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Scripts Panel"
+msgstr "Añadir/quitar favorito"
+
+#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Find.."
@@ -4534,6 +4983,11 @@ msgid "Keep Debugger Open"
msgstr "Mantener el depurador abierto"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "Abrir en el editor"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr "Ventana"
@@ -4603,6 +5057,10 @@ msgstr ""
"pertenecen está cargada"
#: editor/plugins/script_text_editor.cpp
+msgid "Only resources from filesystem can be dropped."
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Pick Color"
msgstr "Color"
@@ -4651,6 +5109,11 @@ msgid "Move Down"
msgstr "Bajar"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Eliminar punto"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr "Indentar a la izquierda"
@@ -4959,37 +5422,6 @@ msgid "Animation Key Inserted."
msgstr "Clave de animación insertada."
#: 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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "Avanzar"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "Hacia atrás"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "Rueda hacia abajo."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -5057,10 +5489,64 @@ msgid "Audio Listener"
msgstr "Oyente de Audio"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Doppler Enable"
+msgstr "Activar"
+
+#: 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
+#, fuzzy
+msgid "Freelook Forward"
+msgstr "Avanzar"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Backwards"
+msgstr "Hacia atrás"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Down"
+msgstr "Rueda hacia abajo."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "preview"
+msgstr "Vista previa"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr "Ventana de transformación"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "Modo de selección"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid ""
+"Drag: Rotate\n"
+"Alt+Drag: Move\n"
+"Alt+RMB: Depth list selection"
+msgstr "Alt+Click Der.: Selección en depth list"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode (W)"
msgstr "Modo movimiento (W)"
@@ -5182,6 +5668,7 @@ msgid "View Grid"
msgstr "Ver rejilla"
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "Ajustes"
@@ -5310,6 +5797,11 @@ msgid "StyleBox Preview:"
msgstr "Vista previa de StyleBox:"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
+msgid "Set Region Rect"
+msgstr "Setear region_rect"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
msgstr "Modo de fijado:"
@@ -5368,6 +5860,16 @@ msgstr "Remover Item"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
+msgid "Remove All Items"
+msgstr "Quitar elementos de clases"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Quitar"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "Theme"
msgstr "Guardar tema"
@@ -5435,7 +5937,7 @@ msgstr "Tab 2"
msgid "Tab 3"
msgstr "Tab 3"
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr "Tipo:"
@@ -5457,12 +5959,27 @@ msgid "Color"
msgstr "Color"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Eliminar selección"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr "Pintar TileMap"
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "Duplicar"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "Lineal"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Bucket Fill"
+msgstr "Cubo"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5497,10 +6014,6 @@ msgid "Pick Tile"
msgstr "Elegir Tile"
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr "Seleccionar"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr "Rotar 0 grados"
@@ -5564,7 +6077,7 @@ msgstr "¿Quieres eliminar los archivos seleccionados?"
msgid "Presets"
msgstr "Ajuste…"
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "Añadir…"
@@ -5623,6 +6136,24 @@ msgid "Make Patch"
msgstr "Ruta de destino:"
#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "Textura"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "Lista de métodos:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr "Exportar PCK/Zip"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5663,10 +6194,6 @@ msgid "The following files failed extraction from package:"
msgstr "Los siguientes archivos no se pudieron extraer del paquete:"
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr "¡El paquete se ha instalado correctamente!"
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "Importar proyecto existente"
@@ -5711,6 +6238,23 @@ msgid "Are you sure to open more than one project?"
msgstr "¿Seguro que quieres abrir más de un proyecto?"
#: 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 ""
+"No se ha definido ninguna escena principal, ¿quieres elegir alguna?\n"
+"Es posible cambiarla más tarde en «Ajustes del proyecto» bajo la categoría "
+"«aplicación»."
+
+#: 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 "¿Seguro que quieres ejecutar más de un proyecto?"
@@ -5729,10 +6273,6 @@ msgstr ""
"¿Quieres continuar?"
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr "Administrador de proyectos"
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr "Lista de proyectos"
@@ -5761,258 +6301,292 @@ msgstr "Remover Item"
msgid "Exit"
msgstr "Salir"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Conectar.."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "Tecla "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr "Botón del mando"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr "Eje del mando"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr "Botón del ratón"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr "La acción no es correcta (no puedes utilizar «/» o «:»)."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr "¡La acción «%s» ya existe!"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr "Renombrar evento de acción de entrada"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr "Añadir evento de acción de entrada"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Mayús+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr "Control+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "Presiona una tecla…"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr "Ãndice de botón del ratón:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr "Botón izquierdo"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr "Botón derecho"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr "Botón del medio"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr "Botón rueda arriba"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr "Botón rueda abajo"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr "Botón 6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr "Botón 7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr "Botón 8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr "Botón 9"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Cambiar"
+
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Axis Index:"
msgstr "Ãndice de ejes del mando:"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "Eje"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Button Index:"
msgstr "Ãndice de botones del mando:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr "Añadir acción de entrada"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr "Borrar evento de acción de entrada"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Add Event"
msgstr "Añadir elemento vacío"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "Dispositivo"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Botón"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "Botón izquierdo."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "Botón derecho."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "Botón central."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "Rueda hacia arriba."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "Rueda hacia abajo."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Añadir propiedad «Getter»"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "No property '"
+msgstr "Propiedad:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "Ajustes"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "Eliminar entrada"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "Error al guardar los ajustes."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "Los ajustes se han guardado correctamente."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr "Añadir traducción"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "Quitar traducción"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr "Añadir ruta remapeada"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr "Añadir remapeo de recursos"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr "Cambiar idioma de remapeo de recursos"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr "Quitar remapeo de recursos"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr "Quitar opción de remapeo de recursos"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Ajustes de proyecto (engine.cfg)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr "General"
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr "Propiedad:"
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr "Eliminar"
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr "Copiar a plataforma…"
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
+msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr "Mapa de entradas"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr "Acción:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr "Dispositivo:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr "Ãndice:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr "Traducciones"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr "Traducciones"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr "Traducciones:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr "Remapeos"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr "Recursos:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr "Remapeos por idioma:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr "Idioma"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "AutoLoad"
@@ -6055,6 +6629,11 @@ msgstr "Asignar"
#: editor/property_editor.cpp
#, fuzzy
+msgid "Select Node"
+msgstr "Selecciona un nodo"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "New Script"
msgstr "Script siguiente"
@@ -6069,6 +6648,11 @@ msgstr "Error al cargar el archivo: ¡No es un recurso!"
#: editor/property_editor.cpp
#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "Selecciona nodos a importar"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "Pick a Node"
msgstr "Selecciona un nodo"
@@ -6167,6 +6751,11 @@ msgstr "Argumentos de escena principal:"
msgid "Scene Run Settings"
msgstr "Ajustes de ejecución de escena"
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "Aceptar"
+
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
msgstr "No hay padre donde instanciar la escena."
@@ -6212,10 +6801,6 @@ msgid "Delete Node(s)?"
msgstr "¿Quieres borrar los nodos?"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "Esta operación no puede realizarse sin una escena."
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6228,6 +6813,18 @@ msgid "Save New Scene As.."
msgstr "Guardar nueva escena como…"
#: editor/scene_tree_dock.cpp
+msgid "Editable Children"
+msgstr "Hijos editables"
+
+#: editor/scene_tree_dock.cpp
+msgid "Load As Placeholder"
+msgstr "Cargar como temporal"
+
+#: editor/scene_tree_dock.cpp
+msgid "Discard Instancing"
+msgstr "Descartar instancia"
+
+#: editor/scene_tree_dock.cpp
msgid "Makes Sense!"
msgstr "¡Entendido!"
@@ -6273,6 +6870,14 @@ msgid "Edit Connections"
msgstr "Editar conexiones"
#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance"
+msgstr "Limpiar heredado"
+
+#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
+msgid "Open in Editor"
+msgstr "Abrir en el editor"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)"
msgstr "Borrar nodos"
@@ -6329,6 +6934,11 @@ msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "Filter nodes"
+msgstr "Filtros"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Attach a new or existing script for the selected node."
msgstr "Crear un nuevo script para el nodo seleccionado."
@@ -6337,6 +6947,14 @@ msgstr "Crear un nuevo script para el nodo seleccionado."
msgid "Clear a script for the selected node."
msgstr "Crear un nuevo script para el nodo seleccionado."
+#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance? (No Undo!)"
+msgstr "¿Quieres limpiar la herencia? (No se puede deshacer)"
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear!"
+msgstr "¡Borrar!"
+
#: editor/scene_tree_editor.cpp
msgid "Toggle Spatial Visible"
msgstr "Act/Desact. Espacial Visible"
@@ -6368,11 +6986,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "Opciones de depuración"
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr "Instancia:"
@@ -6412,32 +7025,8 @@ msgid "Scene Tree (Nodes):"
msgstr "Ãrbol de escenas (nodos):"
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr "Hijos editables"
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr "Cargar como temporal"
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr "Descartar instancia"
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr "Abrir en el editor"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr "Limpiar heredado"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr "¿Quieres limpiar la herencia? (No se puede deshacer)"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr "¡Borrar!"
+msgid "Node Configuration Warning!"
+msgstr ""
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -6445,6 +7034,11 @@ msgstr "Selecciona un nodo"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Error al cargar la imagen:"
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "No se puede crear el script en el sistema de archivos."
@@ -6454,6 +7048,10 @@ msgid "Error loading script from %s"
msgstr "Error al cargar escena desde %s"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "N/D"
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "La ruta está vacia"
@@ -6497,10 +7095,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr "N/D"
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6672,6 +7266,10 @@ msgid "Change Light Radius"
msgstr "Cambiar Radio de Luces"
#: editor/spatial_editor_gizmos.cpp
+msgid "Change AudioStreamPlayer3D Emission Angle"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
msgstr "Cambiar FOV de Cámara"
@@ -6762,6 +7360,137 @@ msgstr ""
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "El diccionario de instancias no es correcto (subclases erróneas)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Quitar seleccionados"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Duplicar selección"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Snap View"
+msgstr "Vista superior"
+
+#: 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
+#, fuzzy
+msgid "Clip Disabled"
+msgstr "Desactivado"
+
+#: 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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "Ctrl: Rotar"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "Ctrl: Rotar"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Z"
+msgstr "Ctrl: Rotar"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "Crear nuevo"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "Crear proyecto nuevo"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Area"
+msgstr "Borrar TileMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Sólo selección"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Sólo selección"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "Ajustes de fijado"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "Instancia:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "Archivo"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6801,6 +7530,31 @@ msgid "Stack overflow with stack depth: "
msgstr "Desbordamiento de pila en el nivel: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Editar argumentos de señal:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Cambiar tipo de valor del «array»"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Cambiar Nombre de Entrada"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Default Value"
+msgstr "Cambiar Valor por Defecto"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Editar variable:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Funciones:"
@@ -6841,26 +7595,6 @@ msgid "Add Signal"
msgstr "Añadir señal"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Quitar función"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Quitar variable"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Editando variable:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Quitar señal"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "Editando señal:"
-
-#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Change Expression"
msgstr "Cambiar tipo"
@@ -6870,6 +7604,16 @@ msgid "Add Node"
msgstr "Añadir nodo"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Quitar claves incorrectas"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Duplicate VisualScript Nodes"
+msgstr "Duplicar Nodo(s) de Gráfico"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
"Mantén pulsado Meta para quitar un «Setter». Mantén pulsado Mayús para "
@@ -6915,6 +7659,26 @@ msgstr "Añadir propiedad «Setter»"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
+msgid "Change Base Type"
+msgstr "Cambiar tipo"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Borrar nodos"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Quitar Nodo de Gráfico de Shaders"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Conectar a nodo:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Condition"
msgstr "Copiar animación"
@@ -6945,6 +7709,56 @@ msgid "Get"
msgstr "Obtener"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Cambiar Nombre de Entrada"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "No se puede operar en «…»"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "¡El portapapeles de recursos está vacío!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Pegar pose"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Quitar función"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Editar variable:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Quitar variable"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Editando señal:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Quitar señal"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Editando variable:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "Editando señal:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "Tipo base:"
@@ -6965,10 +7779,6 @@ msgid "Edit Variable:"
msgstr "Editar variable:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Cambiar"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Quitar seleccionados"
@@ -7050,14 +7860,6 @@ msgstr ""
"El valor devuelto por _step() no es correcto, debe ser un entero (seq out), "
"o string/cadena (error)."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "se presione"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "se levante"
-
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Run in Browser"
@@ -7082,103 +7884,6 @@ msgstr "No se pudo cargar el tile:"
msgid "Could not open template for export:\n"
msgstr "No se pudo crear la carpeta."
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-"No se ha podido leer el archivo de certificación. ¿Seguro que la ruta y "
-"contraseña son correctas?"
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Error creating the signature object."
-msgstr "¡Error al escribir el PCK de proyecto!"
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Error creating the package signature."
-msgstr "Se produjo un error al firmar el paquete."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"No se han encontrado plantillas de exportación.\n"
-"Tienes que descargar e instalarlas para continuar."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Custom debug package not found."
-msgstr "No se ha encontrado ningún paquete de depuración personalizado."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr "No se ha encontrado ningún paquete final personalizado."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid unique name."
-msgstr "El nombre no es correcto."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid product GUID."
-msgstr "Tamaño de tipografía incorrecto."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid publisher GUID."
-msgstr "Ruta base incorrecta"
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid background color."
-msgstr "El origen personalizado de tipografía no es correcto."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "El logo de la tienda no es del tamaño adecuado (debe ser de 50x50)."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-"El logo cuadrado de 44x44 no es del tamaño adecuado (debe ser de 44x44)."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-"El logo cuadrado de 71x71 no es del tamaño adecuado (debe ser de 71x71)."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-"El logo cuadrado de 150x150 no es del tamaño adecuado (debe ser de 150x150)."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-"El logo cuadrado de 310x310 no es del tamaño adecuado (debe ser de 310x310)."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-"El logo ancho de 310x150 no es del tamaño adecuado (debe ser de 310x150)."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-"El tamaño de la imagen de arranque no es correcto (debe ser de 620x300)."
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7280,6 +7985,13 @@ msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr ""
"PathFollow2D solo funciona cuando está seteado como hijo de un nodo Path2D."
+#: 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 "La propiedad Path debe apuntar a un nodo Node2D válido para funcionar."
@@ -7308,23 +8020,33 @@ msgstr ""
"VisibilityEnable2D funciona mejor cuando se usa con la raíz de escena "
"editada directamente como padre."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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 ""
-"CollisionShape solo sirve para proveer un collision shape a un nodo derivado "
-"de un CollisionObject. Favor de usarlo solo como hijo de Area, StaticBody, "
-"RigidBody, KinematicBody, etc. para darles un shape."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"Se debe proveer un shape para que CollisionShape funcione. Creale un recurso "
-"shape!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7340,6 +8062,24 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "Un CollisionPolygon vacio no tiene ningún efecto en la colisión."
+#: 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 ""
+"CollisionShape solo sirve para proveer un collision shape a un nodo derivado "
+"de un CollisionObject. Favor de usarlo solo como hijo de Area, StaticBody, "
+"RigidBody, KinematicBody, etc. para darles un shape."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"Se debe proveer un shape para que CollisionShape funcione. Creale un recurso "
+"shape!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7359,6 +8099,13 @@ 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
#, fuzzy
msgid "Path property must point to a valid Spatial node to work."
@@ -7382,8 +8129,8 @@ msgstr ""
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
-msgstr "Modo de ejecución:"
+msgid "Raw Mode"
+msgstr "Modo desplazamiento lateral"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
@@ -7397,22 +8144,6 @@ msgstr "Alerta!"
msgid "Please Confirm..."
msgstr "Confirmar decisión…"
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Abrir un archivo"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Abrir archivo/s"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Abrir una carpeta"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Abrir un archivo o carpeta"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7434,7 +8165,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7452,6 +8183,121 @@ msgstr ""
"que pueda obtener un tamaño. Alternativamente, hacelo un RenderTarget y "
"asigná su textura interna a algún otro nodo para mostrar."
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "¿Quieres cerrar la escena? (Los cambios sin guardar se perderán)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "¿Quieres abrir el el administrador de proyectos?\n"
+#~ "(Los cambios sin guardar se perderán)"
+
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "Cerrar e ir a escena anterior"
+
+#~ msgid "Expand to Parent"
+#~ msgstr "Expandir al padre"
+
+#~ msgid "Del"
+#~ msgstr "Eliminar"
+
+#~ msgid "Copy To Platform.."
+#~ msgstr "Copiar a plataforma…"
+
+#~ msgid "just pressed"
+#~ msgstr "se presione"
+
+#~ msgid "just released"
+#~ msgstr "se levante"
+
+#, fuzzy
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr ""
+#~ "No se ha podido leer el archivo de certificación. ¿Seguro que la ruta y "
+#~ "contraseña son correctas?"
+
+#, fuzzy
+#~ msgid "Error creating the signature object."
+#~ msgstr "¡Error al escribir el PCK de proyecto!"
+
+#, fuzzy
+#~ msgid "Error creating the package signature."
+#~ msgstr "Se produjo un error al firmar el paquete."
+
+#, fuzzy
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "No se han encontrado plantillas de exportación.\n"
+#~ "Tienes que descargar e instalarlas para continuar."
+
+#, fuzzy
+#~ msgid "Custom debug package not found."
+#~ msgstr "No se ha encontrado ningún paquete de depuración personalizado."
+
+#~ msgid "Custom release package not found."
+#~ msgstr "No se ha encontrado ningún paquete final personalizado."
+
+#, fuzzy
+#~ msgid "Invalid unique name."
+#~ msgstr "El nombre no es correcto."
+
+#, fuzzy
+#~ msgid "Invalid product GUID."
+#~ msgstr "Tamaño de tipografía incorrecto."
+
+#, fuzzy
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "Ruta base incorrecta"
+
+#, fuzzy
+#~ msgid "Invalid background color."
+#~ msgstr "El origen personalizado de tipografía no es correcto."
+
+#, fuzzy
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr "El logo de la tienda no es del tamaño adecuado (debe ser de 50x50)."
+
+#, fuzzy
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr ""
+#~ "El logo cuadrado de 44x44 no es del tamaño adecuado (debe ser de 44x44)."
+
+#, fuzzy
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr ""
+#~ "El logo cuadrado de 71x71 no es del tamaño adecuado (debe ser de 71x71)."
+
+#, fuzzy
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr ""
+#~ "El logo cuadrado de 150x150 no es del tamaño adecuado (debe ser de "
+#~ "150x150)."
+
+#, fuzzy
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr ""
+#~ "El logo cuadrado de 310x310 no es del tamaño adecuado (debe ser de "
+#~ "310x310)."
+
+#, fuzzy
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr ""
+#~ "El logo ancho de 310x150 no es del tamaño adecuado (debe ser de 310x150)."
+
+#, fuzzy
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr ""
+#~ "El tamaño de la imagen de arranque no es correcto (debe ser de 620x300)."
+
+#, fuzzy
+#~ msgid "RAW Mode"
+#~ msgstr "Modo de ejecución:"
+
#~ msgid "Node From Scene"
#~ msgstr "Nodo desde escena"
@@ -7538,9 +8384,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "%d ocurrencias reemplazadas."
-#~ msgid "Please save the scene first."
-#~ msgstr "Prueba guardando la escena primero."
-
#~ msgid "Save Translatable Strings"
#~ msgstr "Guardar cadenas traducibles"
@@ -7759,9 +8602,6 @@ msgstr ""
#~ msgid "Script Encryption Key (256-bits as hex):"
#~ msgstr "Clave de cifrado de scripts (256-bits en hexadecimal):"
-#~ msgid "Export PCK/Zip"
-#~ msgstr "Exportar PCK/Zip"
-
#~ msgid "Export Project PCK"
#~ msgstr "Exportar PCK del proyecto"
@@ -7903,8 +8743,5 @@ msgstr ""
#~ msgid "Node Group(s)"
#~ msgstr "Grupo(s) de Nodos"
-#~ msgid "Set region_rect"
-#~ msgstr "Setear region_rect"
-
#~ msgid "Plugin List:"
#~ msgstr "Lista de Plugins:"
diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po
index 3457d72d9a..64d65f70bb 100644
--- a/editor/translations/es_AR.po
+++ b/editor/translations/es_AR.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2017-04-17 00:30+0000\n"
+"PO-Revision-Date: 2017-06-29 19:59+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 +19,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.14-dev\n"
+"X-Generator: Weblate 2.15-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -149,7 +149,8 @@ msgstr "Ir a Paso Próximo"
msgid "Goto Prev Step"
msgstr "Ir a Paso Previo"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "Lineal"
@@ -362,21 +363,19 @@ msgstr "Cambiar Valor del Array"
#: editor/asset_library_editor_plugin.cpp
msgid "Free"
-msgstr ""
+msgstr "Libre"
#: editor/asset_library_editor_plugin.cpp editor/editor_plugin_settings.cpp
msgid "Version:"
msgstr "Version:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Contents:"
-msgstr "Constantes:"
+msgstr "Contenido:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "View Files"
-msgstr " Archivos"
+msgstr "Ver Archivos"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
#: editor/editor_help.cpp editor/property_selector.cpp
@@ -384,7 +383,8 @@ msgstr " Archivos"
msgid "Description:"
msgstr "Descripción:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr "Instalar"
@@ -395,161 +395,152 @@ msgstr "Instalar"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Cerrar"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
-msgstr ""
+msgstr "No se ha podido resolver el nombre del host:"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve."
-msgstr ""
+msgstr "No se ha podido resolver."
#: editor/asset_library_editor_plugin.cpp
msgid "Connection error, please try again."
-msgstr ""
+msgstr "Error de conexión, por favor intentá de nuevo."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect."
-msgstr "Conectar.."
+msgstr "No se puede conectar."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect to host:"
-msgstr "Conectar a Nodo:"
+msgstr "No se puede conectar al host:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr ""
+msgstr "No hay respuesta desde el host:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response."
-msgstr ""
+msgstr "Sin respuesta."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Request failed, return code:"
-msgstr "Formato requerido de archivo desconocido:"
+msgstr "Solicitud fallida. Código de retorno:"
#: editor/asset_library_editor_plugin.cpp
msgid "Req. Failed."
-msgstr ""
+msgstr "Solicitud fallida."
#: editor/asset_library_editor_plugin.cpp
msgid "Request failed, too many redirects"
-msgstr ""
+msgstr "Solicitud fallida, demasiadas redireccinoes"
#: editor/asset_library_editor_plugin.cpp
msgid "Redirect Loop."
-msgstr ""
+msgstr "Bucle de redireccionamiento."
#: editor/asset_library_editor_plugin.cpp
msgid "Failed:"
-msgstr ""
+msgstr "Fallido:"
#: editor/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
-msgstr ""
+msgstr "Hash de descarga incorrecto, asumiendo que el archivo fue manipulado."
#: editor/asset_library_editor_plugin.cpp
msgid "Expected:"
-msgstr ""
+msgstr "Esperado:"
#: editor/asset_library_editor_plugin.cpp
msgid "Got:"
-msgstr ""
+msgstr "Recibido:"
#: editor/asset_library_editor_plugin.cpp
msgid "Failed sha256 hash check"
-msgstr ""
+msgstr "Fallo el chequeo del hash sha256"
#: editor/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr ""
+msgstr "Error de Descarga del Asset:"
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
-msgstr ""
+msgstr "Conseguido!"
#: editor/asset_library_editor_plugin.cpp
msgid "Fetching:"
-msgstr ""
+msgstr "Obteniendo:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Resolving.."
-msgstr "Guardando.."
+msgstr "Resolviendo.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Connecting.."
-msgstr "Conectar.."
+msgstr "Conectando.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Requesting.."
-msgstr "Testeo"
+msgstr "Solicitando.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Error making request"
-msgstr "Error al guardar el recurso!"
+msgstr "Error al realizar la solicitud"
#: editor/asset_library_editor_plugin.cpp
msgid "Idle"
-msgstr ""
+msgstr "Desocupado"
#: editor/asset_library_editor_plugin.cpp
msgid "Retry"
-msgstr ""
+msgstr "Reintentar"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Download Error"
-msgstr "Descargar"
+msgstr "Error de Descarga"
#: editor/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr ""
+msgstr "La descarga de este asset ya esta en progreso!"
#: editor/asset_library_editor_plugin.cpp
msgid "first"
-msgstr ""
+msgstr "primero"
#: editor/asset_library_editor_plugin.cpp
msgid "prev"
-msgstr ""
+msgstr "anterior"
#: editor/asset_library_editor_plugin.cpp
msgid "next"
-msgstr ""
+msgstr "siguiente"
#: editor/asset_library_editor_plugin.cpp
msgid "last"
-msgstr ""
+msgstr "último"
#: editor/asset_library_editor_plugin.cpp
msgid "All"
msgstr "Todos"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "Buscar:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "Buscar"
@@ -565,7 +556,7 @@ msgstr "Buscar"
msgid "Import"
msgstr "Importar"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "Plugins"
@@ -577,7 +568,7 @@ msgstr "Ordenar:"
msgid "Reverse"
msgstr "Invertir"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "Categoría:"
@@ -731,14 +722,14 @@ msgstr "Conectar a Nodo:"
#: 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.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
msgstr "Agregar"
#: 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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "Quitar"
@@ -845,7 +836,7 @@ msgid "Resource"
msgstr "Recursos"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "Ruta"
@@ -929,12 +920,196 @@ msgstr "Explorador de Recursos Huérfanos"
msgid "Delete selected files?"
msgstr "Eliminar archivos seleccionados?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Eliminar"
+#: editor/editor_about.cpp
+msgid "Thanks from the Godot community!"
+msgstr "Gracias de parte de la comunidad Godot!"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "Gracias!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr "Colaboradores de Godot Engine"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "Autor:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "Gestor de Proyectos"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Lead Developer"
+msgstr "Desarrolladores"
+
+#: editor/editor_about.cpp editor/project_manager.cpp
+msgid "Project Manager"
+msgstr "Gestor de Proyectos"
+
+#: editor/editor_about.cpp
+msgid "Developers"
+msgstr "Desarrolladores"
+
+#: 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
+#, fuzzy
+msgid "All Components"
+msgstr "Contenido:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "Contenido:"
+
+#: 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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "Sin Comprimir"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "El Paquete se Instaló Exitosamente!"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "El Paquete se Instaló Exitosamente!"
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Effect"
+msgstr "Agregar Evento"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Abrir Layout de Bus de Audio"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Solo"
+msgstr "Abrir Layout de Bus de Audio"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Mute"
+msgstr "Abrir Layout de Bus de Audio"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Eliminar Seleccionados"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+msgstr "Opciones de Subescena"
+
+#: 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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "Duplicar"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Eliminar Seleccionados"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "Agregar Bus"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Eliminar Layout"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Duplicar Animación"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "Mover Acción"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr "Guardar Layout de Bus de Audio Como.."
@@ -948,23 +1123,53 @@ msgid "Open Audio Bus Layout"
msgstr "Abrir Layout de Bus de Audio"
#: editor/editor_audio_buses.cpp
+msgid "There is no 'res://default_bus_layout.tres' file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"Extension de archivo inválida.\n"
+"Usá .fnt, por favor."
+
+#: editor/editor_audio_buses.cpp
msgid "Add Bus"
msgstr "Agregar Bus"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "Crear Nuevo Recurso"
+
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "Cargar"
#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Load an existing Bus Layout."
+msgstr "Cargar un recurso existente desde disco y editarlo."
+
+#: editor/editor_audio_buses.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Save As"
msgstr "Guardar Como"
-#: editor/editor_audio_buses.cpp editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Save this Bus Layout to a file."
+msgstr "Guardar Layout de Bus de Audio Como.."
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+msgid "Load Default"
msgstr "Por Defecto"
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nombre inválido."
@@ -1071,6 +1276,11 @@ msgid "Updating scene.."
msgstr "Actualizando escena.."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "Por favor guardá la escena primero."
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "Elegí un Directorio"
@@ -1148,6 +1358,22 @@ msgstr "Todos los Archivos (*)"
msgid "Open"
msgstr "Abrir"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Abrir un Archivo"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Abrir Archivo(s)"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Abrir un Directorio"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Abrir un Archivo o Directorio"
+
#: 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
@@ -1273,6 +1499,15 @@ msgid "Signals:"
msgstr "Señales:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Animaciones"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Constantes:"
@@ -1289,7 +1524,8 @@ msgid "Search Text"
msgstr "Texto de Búsqueda"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " Salida:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1339,6 +1575,11 @@ msgid "Creating Thumbnail"
msgstr "Creando Miniatura"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "This operation can't be done without a tree root."
+msgstr "Esta operación no puede hacerse sin una escena."
+
+#: editor/editor_node.cpp
msgid ""
"Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."
msgstr ""
@@ -1414,15 +1655,14 @@ msgid "There is no defined scene to run."
msgstr "No hay escena definida para ejecutar."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"No main scene has ever been defined, select one?\n"
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
"No se ha definido ninguna escena principal, ¿elegir una?\n"
-"Es posible cambiarla más tarde en \"Ajustes del Proyecto\" bajo la categoria "
-"'aplicacion'."
+"Es posible cambiarla más tarde en \"Ajustes del Proyecto\" bajo la categoría "
+"'aplicación'."
#: editor/editor_node.cpp
msgid ""
@@ -1471,26 +1711,34 @@ msgid "Quick Open Script.."
msgstr "Abrir Script Rapido.."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "Si"
+#, fuzzy
+msgid "Save & Close"
+msgstr "Guardar un Archivo"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "Cerrar escena? (Los cambios sin guardar se perderán)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
msgstr "Guardar Escena Como.."
#: editor/editor_node.cpp
-#, fuzzy
msgid "No"
-msgstr "Nodo"
+msgstr "No"
+
+#: editor/editor_node.cpp
+msgid "Yes"
+msgstr "Si"
#: editor/editor_node.cpp
msgid "This scene has never been saved. Save before running?"
msgstr "Esta escena nunca ha sido guardada. Guardar antes de ejecutar?"
+#: editor/editor_node.cpp editor/scene_tree_dock.cpp
+msgid "This operation can't be done without a scene."
+msgstr "Esta operación no puede hacerse sin una escena."
+
#: editor/editor_node.cpp
msgid "Export Mesh Library"
msgstr "Exportar Librería de Meshes"
@@ -1500,12 +1748,9 @@ msgid "Export Tile Set"
msgstr "Exportar Tile Set"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "Salir"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "Salir del editor?"
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "Esta operación no puede hacerse sin una escena."
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1528,16 +1773,52 @@ msgid "Quick Run Scene.."
msgstr "Ejecutar Escena Rapido.."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
-msgstr "Abrir el Gestor de Proyectos? (Los cambios sin guardar se perderán)"
+msgid "Quit"
+msgstr "Salir"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "Salir del editor?"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "Gestor de Proyectos"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Guardar un Archivo"
+
+#: 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 "Pick a Main Scene"
msgstr "Elegí una Escena Principal"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1576,6 +1857,11 @@ msgstr "Guardar Layout"
msgid "Delete Layout"
msgstr "Eliminar Layout"
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+msgid "Default"
+msgstr "Por Defecto"
+
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
msgstr "Cambiar Pestaña de Escena"
@@ -1592,6 +1878,11 @@ msgstr "%d archivo(s) o carpeta(s) más"
msgid "Distraction Free Mode"
msgstr "Modo Sin Distracciones"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "Modo Sin Distracciones"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "Escena"
@@ -1640,10 +1931,6 @@ msgstr "Guardar todas las Escenas"
msgid "Close Scene"
msgstr "Cerrar Escena"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr "Cerrar e Ir a Escena Prev."
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "Abrir Reciente"
@@ -1680,9 +1967,8 @@ msgid "Miscellaneous project or scene-wide tools."
msgstr "Herramientas misceláneas a nivel proyecto o escena."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Project"
-msgstr "Proyecto Nuevo"
+msgstr "Proyecto"
#: editor/editor_node.cpp
msgid "Project Settings"
@@ -1797,9 +2083,8 @@ msgstr ""
"sistema de archivos de red."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Editor"
-msgstr "Editar"
+msgstr "Editor"
#: editor/editor_node.cpp editor/settings_config_dialog.cpp
msgid "Editor Settings"
@@ -1826,17 +2111,16 @@ msgid "Classes"
msgstr "Clases"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Online Docs"
-msgstr "Cerrar Docs"
+msgstr "Documentación Online"
#: editor/editor_node.cpp
msgid "Q&A"
-msgstr ""
+msgstr "Q&A"
#: editor/editor_node.cpp
msgid "Issue Tracker"
-msgstr ""
+msgstr "Issue Tracker"
#: editor/editor_node.cpp
msgid "About"
@@ -1946,6 +2230,10 @@ msgstr "Nodo"
msgid "Output"
msgstr "Salida"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "Reimportar"
@@ -1955,26 +2243,10 @@ msgid "Update"
msgstr "Actualizar"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "Gracias de parte de la comunidad Godot!"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "Gracias!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "Importar Plantillas Desde Archivo ZIP"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "Exportar Proyecto"
@@ -1995,38 +2267,41 @@ msgid "Open & Run a Script"
msgstr "Abrir y Correr un Script"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "New Inherited"
+msgstr "Nueva Escena Heredada.."
+
+#: editor/editor_node.cpp
msgid "Load Errors"
msgstr "Erroes de carga"
+#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
+msgid "Select"
+msgstr "Seleccionar"
+
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 2D Editor"
-msgstr "Abrir en Editor"
+msgstr "Abrir en Editor 2D"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 3D Editor"
-msgstr "Abrir en Editor"
+msgstr "Abrir en Editor 3D"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Script Editor"
-msgstr "Abrir en Editor"
+msgstr "Abrir en Editor de Script"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Asset Library"
-msgstr "Exportar Libreria"
+msgstr "Exportar Libreria de Assets"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the next Editor"
-msgstr "Abrir en Editor"
+msgstr "Abrir el Editor siguiente"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the previous Editor"
-msgstr "Abrir en Editor"
+msgstr "Abrir el Editor anterior"
#: editor/editor_plugin_settings.cpp
msgid "Installed Plugins:"
@@ -2104,6 +2379,16 @@ msgstr "Reimportando"
msgid "Re-Import Changed Resources"
msgstr "Reimportar Recursos Cambiados"
+#: 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 "Escribir tu lógica en el método _run()."
@@ -2243,10 +2528,28 @@ msgid "Cannot navigate to '"
msgstr "No se puede navegar a '"
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "Guardar y Reimportar"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "Fuente:"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr "Archivos de origen y destino iguales, no se realizará ninguna acción."
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr "Ruta de origen y destino iguales, no se realizará ninguna acción."
@@ -2255,6 +2558,20 @@ msgid "Can't move directories to within themselves."
msgstr "No se pueden mover directorios dentro de si mismos."
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Error al cargar la imagen:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Error al importar:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr "No se puede operar en '..'"
@@ -2332,6 +2649,12 @@ msgstr ""
"Instanciar la(s) escena(s) seleccionadas como hijas del nodo seleccionado."
#: editor/filesystem_dock.cpp
+msgid ""
+"Scanning Files,\n"
+"Please Wait.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Move"
msgstr "Mover"
@@ -2343,10 +2666,31 @@ msgstr "Agregar al Grupo"
msgid "Remove from Group"
msgstr "Quitar del Grupo"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "Superficie %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+msgstr "Importando Escena.."
+
+#: 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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "Importar Escena 3D"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2385,6 +2729,14 @@ msgid "Saving.."
msgstr "Guardando.."
#: 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 " Archivos"
@@ -2471,7 +2823,6 @@ msgid "No target font resource!"
msgstr "Sin recurso de tipografías de destino!"
#: editor/io_plugins/editor_font_import_plugin.cpp
-#, fuzzy
msgid ""
"Invalid file extension.\n"
"Please use .font."
@@ -2576,6 +2927,10 @@ msgstr "Importar Mesh(es) de Origen:"
msgid "Mesh"
msgstr "Mesh"
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "Superficie %d"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr "Sin muestras que importar!"
@@ -2957,9 +3312,8 @@ msgid "Compress"
msgstr "Comprimir"
#: editor/io_plugins/editor_translation_import_plugin.cpp
-#, fuzzy
msgid "Add to Project (project.godot)"
-msgstr "Agregar al Proyecto (godot.cfg)"
+msgstr "Agregar al Proyecto (project.godot)"
#: editor/io_plugins/editor_translation_import_plugin.cpp
msgid "Import Languages:"
@@ -3164,6 +3518,11 @@ msgid "New name:"
msgstr "Nuevo nombre:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Editar Filtros de Nodo"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr "Escala:"
@@ -3415,7 +3774,7 @@ msgstr "Pegar Pose"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Select Mode"
-msgstr "Seleccionar Modo"
+msgstr "Modo Seleccionar"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Drag: Rotate"
@@ -3480,6 +3839,7 @@ msgstr "Restaurar la habilidad de seleccionar los hijos de un objeto."
#: 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Editar"
@@ -3512,10 +3872,6 @@ msgid "Use Pixel Snap"
msgstr "Usar Pixel Snap"
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr "Expandir al Padre"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr "Esqueleto.."
@@ -3624,11 +3980,6 @@ msgstr "Esta operación requiere un solo nodo seleccionado."
msgid "Change default type"
msgstr "Cambiar typo por defecto"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "OK"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3668,6 +4019,14 @@ msgstr "Editar Polígono (Remover Punto)"
msgid "Create a new polygon from scratch."
msgstr "Crear un nuevo polígono de cero."
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr "Crear Poly3D"
@@ -3708,22 +4067,53 @@ msgstr "Acutalizar desde Escena"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
-msgid "Add point"
-msgstr "Agregar Entrada"
+msgid "Modify Curve Point"
+msgstr "Modificar Curva"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "Modificar Mapa de Curvas"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Load Curve Preset"
+msgstr "Cargar preset"
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Add point"
+msgstr "Agregar punto"
+
+#: editor/plugins/curve_editor_plugin.cpp
msgid "Remove point"
-msgstr "Quitar Punto del Path"
+msgstr "Quitar punto"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Left linear"
+msgstr "Lineal"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Right linear"
+msgstr "Vista Derecha"
+
+#: editor/plugins/curve_editor_plugin.cpp
msgid "Load preset"
-msgstr "Cargar Recurso"
+msgstr "Cargar preset"
#: editor/plugins/curve_editor_plugin.cpp
-msgid "Modify Curve"
-msgstr "Modificar Curva"
+#, fuzzy
+msgid "Remove Curve Point"
+msgstr "Quitar Punto del Path"
+
+#: 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"
@@ -3747,6 +4137,12 @@ msgid "Item List Editor"
msgstr "Editor de Lista de Items"
#: 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 "Crear Polígono Oclusor"
@@ -4009,13 +4405,13 @@ msgstr "Limpiar Máscara de Emisión"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generating AABB"
-msgstr "Generar AABB"
+msgstr "Generando AABB"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
+"Solo se puede setear un punto en un material de proceso ParticlesMaterial"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Error loading image:"
@@ -4031,36 +4427,38 @@ msgstr "Setear Máscara de Emisión"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generate Visibility Rect"
-msgstr ""
+msgstr "Generar Rect. de Visibilidad"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Cargar Máscara de Emisión"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
+msgid "Particles"
+msgstr "Vértices"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
msgstr "Conteo de Puntos Generados:"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generation Time (sec):"
-msgstr "Tiempo Promedio (seg)"
+msgstr "Tiempo de Generación (seg):"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Emission Mask"
-msgstr "Setear Máscara de Emisión"
+msgstr "Máscara de Emisión"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Capture from Pixel"
-msgstr "Crear desde Escena"
+msgstr "Capturar desde Pixel"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Emission Colors"
-msgstr "Puntos de Emisión:"
+msgstr "Colores de Emisión"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Node does not contain geometry."
@@ -4123,23 +4521,20 @@ msgid "Emission Source: "
msgstr "Fuente de Emisión: "
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generate Visibility AABB"
-msgstr "Generar AABB"
+msgstr "Generar AABB de Visibilidad"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Remover Punto de Curva"
#: editor/plugins/path_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Out-Control from Curve"
-msgstr "Mover Out-Control en Curva"
+msgstr "Quitar Out-Control de la Curva"
#: editor/plugins/path_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove In-Control from Curve"
-msgstr "Remover Punto de Curva"
+msgstr "Quitar In-Control de la Curva"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
@@ -4197,14 +4592,12 @@ msgid "Remove Path Point"
msgstr "Quitar Punto del Path"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Remove Out-Control Point"
-msgstr "Mover Out-Control en Curva"
+msgstr "Quitar Punto Out-Control"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Remove In-Control Point"
-msgstr "Mover In-Control en Curva"
+msgstr "Quitar Punto In-Control"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create UV Map"
@@ -4359,9 +4752,14 @@ msgid "Pitch"
msgstr "Altura"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Clear Recent Files"
-msgstr "Reestablecer Huesos"
+msgstr "Reestablecer Archivos Recientes"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid ""
+"Close and save changes?\n"
+"\""
+msgstr ""
#: editor/plugins/script_editor_plugin.cpp
msgid "Error while saving theme"
@@ -4388,6 +4786,10 @@ msgid "Save Theme As.."
msgstr "Guardar Tema Como.."
#: editor/plugins/script_editor_plugin.cpp
+msgid " Class Reference"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Next script"
msgstr "Script siguiente"
@@ -4440,6 +4842,11 @@ msgid "Close All"
msgstr "Cerrar Todos"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Scripts Panel"
+msgstr "Act/Desact. Favorito"
+
+#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Find.."
@@ -4472,6 +4879,11 @@ msgid "Keep Debugger Open"
msgstr "Mantener el Debugger Abierto"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "Abrir el Editor siguiente"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr "Ventana"
@@ -4484,9 +4896,8 @@ msgid "Move Right"
msgstr "Mover a la Derecha"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open Godot online documentation"
-msgstr "Buscar en la documentación de referencia."
+msgstr "Abrir la documentación online de Godot"
#: editor/plugins/script_editor_plugin.cpp
msgid "Search the class hierarchy."
@@ -4540,25 +4951,28 @@ msgstr ""
"pertenecen esta cargada"
#: 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 "Elegir Color"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert Case"
-msgstr "Convirtiendo Imágenes"
+msgstr "Convertir Mayusculas"
#: editor/plugins/script_text_editor.cpp
msgid "Uppercase"
-msgstr ""
+msgstr "Mayúsculas"
#: editor/plugins/script_text_editor.cpp
msgid "Lowercase"
-msgstr ""
+msgstr "Minúsculas"
#: editor/plugins/script_text_editor.cpp
msgid "Capitalize"
-msgstr ""
+msgstr "Capitalizar"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp scene/gui/line_edit.cpp
@@ -4587,6 +5001,11 @@ msgid "Move Down"
msgstr "Bajar"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Eliminar Punto"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr "Indentar a la Izq"
@@ -4612,11 +5031,11 @@ msgstr "Eliminar Espacios Sobrantes al Final"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Spaces"
-msgstr ""
+msgstr "Convertir Indentación En Espacios"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Tabs"
-msgstr ""
+msgstr "Convertir Indentación En Tabs"
#: editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
@@ -4640,14 +5059,12 @@ msgid "Goto Previous Breakpoint"
msgstr "Ir a Anterior Breakpoint"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert To Uppercase"
-msgstr "Convertir A.."
+msgstr "Convertir A Mayúscula"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert To Lowercase"
-msgstr "Convertir A.."
+msgstr "Convertir A Minúscula"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
@@ -4674,7 +5091,7 @@ msgstr "Ayuda Contextual"
#: editor/plugins/shader_editor_plugin.cpp
msgid "Shader"
-msgstr ""
+msgstr "Shader"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Scalar Constant"
@@ -4893,63 +5310,28 @@ msgid "Animation Key Inserted."
msgstr "Clave de Animación Insertada."
#: 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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "Avanzar"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "Hacia Atrás"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "Rueda Abajo."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
-msgstr ""
+msgstr "Objetos Dibujados"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Material Changes"
-msgstr "Actualizar Cambios"
+msgstr "Cambios de Material"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Shader Changes"
-msgstr "Actualizar Cambios"
+msgstr "Cambios de Shader"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Surface Changes"
-msgstr "Actualizar Cambios"
+msgstr "Cambios de Superficie"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Draw Calls"
-msgstr ""
+msgstr "Llamadas de Dibujado"
#: 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"
@@ -4968,33 +5350,81 @@ msgid "Display Overdraw"
msgstr "Mostrar Overdraw"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Display Unshaded"
msgstr "Mostrar sin Sombreado"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Environment"
-msgstr "Entorno"
+msgstr "Ver Entorno"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Gizmos"
-msgstr "Gizmos"
+msgstr "Ver Gizmos"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Information"
-msgstr ""
+msgstr "Ver Información"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Audio Listener"
msgstr "Oyente de Audio"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Doppler Enable"
+msgstr "Activar"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Left"
+msgstr "Vista Libre A La Izquierda"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Right"
+msgstr "Vista Libre A La Derecha"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Forward"
+msgstr "Vista Libre Hacia Adelante"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Backwards"
+msgstr "Vista Libre Hacia Atrás"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr "Vista Libre Hacia Arriba"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Down"
+msgstr "Vista Libre Hacia Abajo"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr "Modificador de Velocidad de Vista Libre"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "preview"
+msgstr "Vista Previa"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr "Dialogo XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "Modo Seleccionar"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid ""
+"Drag: Rotate\n"
+"Alt+Drag: Move\n"
+"Alt+RMB: Depth list selection"
+msgstr "Alt+Click Der.: Selección en depth list"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode (W)"
msgstr "Modo Mover (W)"
@@ -5051,24 +5481,20 @@ msgid "Align Selection With View"
msgstr "Alinear Selección Con Vista"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Select"
-msgstr "Seleccionar"
+msgstr "Seleccionar Herramienta"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Move"
-msgstr "Mover"
+msgstr "Herramienta Mover"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Rotate"
-msgstr "Ctrl: Rotar"
+msgstr "Herramienta Rotar"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Scale"
-msgstr "Escala:"
+msgstr "Herramienta Escalar"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform"
@@ -5115,6 +5541,7 @@ msgid "View Grid"
msgstr "Ver Grilla"
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "Configuración"
@@ -5243,6 +5670,11 @@ msgid "StyleBox Preview:"
msgstr "Vista Previa de StyleBox:"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
+msgid "Set Region Rect"
+msgstr "Setear region_rect"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
msgstr "Modo Snap:"
@@ -5300,6 +5732,16 @@ msgid "Remove Item"
msgstr "Remover Item"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Quitar Items de Clases"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Quitar"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr "Tema"
@@ -5367,7 +5809,7 @@ msgstr "Tab 2"
msgid "Tab 3"
msgstr "Tab 3"
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr "Tipo:"
@@ -5389,12 +5831,27 @@ msgid "Color"
msgstr "Color"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Eliminar Selección"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr "Pintar TileMap"
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "Duplicar"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "Lineal"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Bucket Fill"
+msgstr "Balde"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5429,10 +5886,6 @@ msgid "Pick Tile"
msgstr "Elegir Tile"
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr "Seleccionar"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr "Rotar 0 grados"
@@ -5492,7 +5945,7 @@ msgstr "Eliminar preset '%s'?"
msgid "Presets"
msgstr "Presets"
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "Agregar.."
@@ -5543,6 +5996,24 @@ msgid "Make Patch"
msgstr "Crear Parche"
#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "Textura"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "Lista de Métodos:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr "Exportar PCK/Zip"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr "Faltan las plantillas de exportación para esta plataforma:"
@@ -5555,14 +6026,12 @@ msgid "Invalid project path, the path must exist!"
msgstr "Ruta de proyecto inválida, la ruta debe existir!"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project path, project.godot must not exist."
-msgstr "Ruta de proyecto inválida, godot.cfg no debe existir."
+msgstr "Ruta de proyecto inválida, project.godot no debe existir."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project path, project.godot must exist."
-msgstr "Ruta de proyecto inválida, godot.cfg debe existir."
+msgstr "Ruta de proyecto inválida, project.godot debe existir."
#: editor/project_manager.cpp
msgid "Imported Project"
@@ -5573,19 +6042,14 @@ msgid "Invalid project path (changed anything?)."
msgstr "Ruta de proyecto inválida (cambiaste algo?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't create project.godot in project path."
-msgstr "No se pudo crear godot.cfg en la ruta de proyecto."
+msgstr "No se pudo crear project.godot en la ruta de proyecto."
#: editor/project_manager.cpp
msgid "The following files failed extraction from package:"
msgstr "Los siguientes archivos no se pudieron extraer del paquete:"
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr "El Paquete se Instaló Exitosamente!"
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "Importar Proyecto Existente"
@@ -5630,6 +6094,23 @@ msgid "Are you sure to open more than one project?"
msgstr "¿Estás seguro/a que querés abrir mas de un proyecto?"
#: 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 ""
+"No se ha definido ninguna escena principal, ¿elegir una?\n"
+"Es posible cambiarla más tarde en \"Ajustes del Proyecto\" bajo la categoría "
+"'aplicación'."
+
+#: 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 "¿Estás seguro/a que querés ejecutar mas de un proyecto?"
@@ -5648,10 +6129,6 @@ msgstr ""
"Confirmar?"
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr "Gestor de Proyectos"
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr "Listado de Proyectos"
@@ -5672,264 +6149,295 @@ msgid "New Project"
msgstr "Proyecto Nuevo"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Templates"
-msgstr "Remover Plantilla"
+msgstr "Plantillas"
#: editor/project_manager.cpp
msgid "Exit"
msgstr "Salir"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "No se puede conectar."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "Tecla "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr "Bottón de Joystick"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr "Eje de Joystick"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr "Botón de Mouse"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr "Acción Invalida (cualquier cosa va menos '/' o ':')."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr "La acción '%s' ya existe!"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr "Renombrar Evento de Acción de Entrada"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr "Agregar Evento de Acción de Entrada"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr "Control+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "Presionar una Tecla.."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr "Indice de Botones de Mouse:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr "Botón Izquierdo"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr "Botón Derecho"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr "Botón del Medio"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr "Botón Rueda Arriba"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr "Botón Rueda Abajo"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr "Botón 6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr "Botón 7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr "Botón 8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr "Botón 9"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Cambiar"
+
+#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
msgstr "Indice del Eje del Gamepad:"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "Eje"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr "Indice del Boton del Gamepad:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr "Agregar Acción de Entrada"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr "Borrar Evento de Acción de Entrada"
-#: editor/project_settings.cpp
-#, fuzzy
+#: editor/project_settings_editor.cpp
msgid "Add Event"
-msgstr "Agregar Vacío"
+msgstr "Agregar Evento"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "Dispositivo"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Botón"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "Botón Izquierdo."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "Botón Derecho."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "Botón del Medio."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "Rueda Arriba."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "Rueda Abajo."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Agregar Propiedad Getter"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "No property '"
+msgstr "Propiedad:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "Configuración"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "Eliminar Entrada"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "Error al guardar los ajustes."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "Ajustes guardados satisfactoriamente."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr "Agregar Traducción"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "Quitar Traducción"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr "Agregar Path Remapeado"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr "Remapear Recurso Agregar Remap"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr "Cambiar Lenguaje de Remapeo de Recursos"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr "Remover Remapeo de Recursos"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr "Remover Opción de Remapeo de Recursos"
-#: editor/project_settings.cpp
-#, fuzzy
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
-msgstr "Configuración de Proyecto (godot.cfg)"
+msgstr "Configuración de Proyecto (project.godot)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr "General"
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr "Propiedad:"
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr "Eliminar"
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr "Copiar A Plataforma.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
+msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr "Mapa de Entradas"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr "Acción:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr "Dispositivo:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr "Indice:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr "Localización"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr "Traducciones"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr "Traducciones:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr "Remapeos"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr "Recursos:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr "Remapeos por Locale:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr "Locale"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "AutoLoad"
@@ -5970,6 +6478,11 @@ msgid "Assign"
msgstr "Asignar"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Seleccionar un Nodo"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr "Nuevo Script"
@@ -5982,6 +6495,11 @@ msgid "Error loading file: Not a resource!"
msgstr "Error al cargar el archivo: No es un recurso!"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "Seleccionar Nodo(s) para Importar"
+
+#: editor/property_editor.cpp
msgid "Pick a Node"
msgstr "Seleccionar un Nodo"
@@ -6078,6 +6596,11 @@ msgstr "Argumentos de Escena Principal:"
msgid "Scene Run Settings"
msgstr "Ajustes de Ejecución de Escena"
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "OK"
+
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
msgstr "No hay padre donde instanciar la escena."
@@ -6123,10 +6646,6 @@ msgid "Delete Node(s)?"
msgstr "Eliminar Nodo(s)?"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "Esta operación no puede hacerse sin una escena."
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr "No se puede realizar sobre el nodo raíz."
@@ -6139,6 +6658,18 @@ msgid "Save New Scene As.."
msgstr "Guardar Nueva Escena Como.."
#: editor/scene_tree_dock.cpp
+msgid "Editable Children"
+msgstr "Hijos Editables"
+
+#: editor/scene_tree_dock.cpp
+msgid "Load As Placeholder"
+msgstr "Cargar Como Placeholder"
+
+#: editor/scene_tree_dock.cpp
+msgid "Discard Instancing"
+msgstr "Descartar Instanciado"
+
+#: editor/scene_tree_dock.cpp
msgid "Makes Sense!"
msgstr "Tiene Sentido!"
@@ -6172,9 +6703,8 @@ msgid "Error duplicating scene to save it."
msgstr "Error al duplicar escena para guardarla."
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Sub-Resources:"
-msgstr "Recursos:"
+msgstr "Sub-Recursos:"
#: editor/scene_tree_dock.cpp
msgid "Edit Groups"
@@ -6185,6 +6715,14 @@ msgid "Edit Connections"
msgstr "Editar Conexiones"
#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance"
+msgstr "Limpiar Herencia"
+
+#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
+msgid "Open in Editor"
+msgstr "Abrir en Editor"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)"
msgstr "Eliminar Nodo(s)"
@@ -6237,6 +6775,11 @@ msgstr ""
"existe ningún nodo raíz."
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "Filtros"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr "Adjuntar un script nuevo o existente para el nodo seleccionado."
@@ -6244,6 +6787,14 @@ msgstr "Adjuntar un script nuevo o existente para el nodo seleccionado."
msgid "Clear a script for the selected node."
msgstr "Reestablecer un script para el nodo seleccionado."
+#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance? (No Undo!)"
+msgstr "Limpiar Herencia? (Imposible Deshacer!)"
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear!"
+msgstr "Limpiar!"
+
#: editor/scene_tree_editor.cpp
msgid "Toggle Spatial Visible"
msgstr "Act/Desact. Espacial Visible"
@@ -6254,56 +6805,59 @@ msgstr "Act/Desact. CanvasItem Visible"
#: editor/scene_tree_editor.cpp
msgid "Node configuration warning:"
-msgstr ""
+msgstr "Advertencia de configuración de nodo:"
#: editor/scene_tree_editor.cpp
msgid ""
"Node has connection(s) and group(s)\n"
"Click to show signals dock."
msgstr ""
+"El nodo tiene conexión/es y grupo/s\n"
+"Clic para mostrar el panel de señales."
#: editor/scene_tree_editor.cpp
msgid ""
"Node has connections.\n"
"Click to show signals dock."
msgstr ""
+"El nodo tiene conexiones.\n"
+"Click para mostrar el panel de señales."
#: editor/scene_tree_editor.cpp
msgid ""
"Node is in group(s).\n"
"Click to show groups dock."
msgstr ""
-
-#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "Opciones de debugueo"
+"El nodo esta en un grupo/s.\n"
+"Click para mostrar el panel de grupos."
#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr "Instancia:"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Open script"
-msgstr "Script siguiente"
+msgstr "Abrir script"
#: editor/scene_tree_editor.cpp
msgid ""
"Node is locked.\n"
"Click to unlock"
msgstr ""
+"El nodo esta bloqueado.\n"
+"Clic para desbloquear"
#: editor/scene_tree_editor.cpp
msgid ""
"Children are not selectable.\n"
"Click to make selectable"
msgstr ""
+"Los hijos no son seleccionables.\n"
+"Clic para convertir en seleccionables"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Toggle Visibility"
-msgstr "Act/Desact. Espacial Visible"
+msgstr "Act/Desact. Visibilidad"
#: editor/scene_tree_editor.cpp
msgid "Invalid node name, the following characters are not allowed:"
@@ -6318,32 +6872,9 @@ msgid "Scene Tree (Nodes):"
msgstr "Arbol de Escenas (Nodos):"
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr "Hijos Editables"
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr "Cargar Como Placeholder"
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr "Descartar Instanciado"
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr "Abrir en Editor"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr "Limpiar Herencia"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr "Limpiar Herencia? (Imposible Deshacer!)"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr "Limpiar!"
+#, fuzzy
+msgid "Node Configuration Warning!"
+msgstr "Advertencia de configuración de nodo:"
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -6351,14 +6882,22 @@ msgstr "Seleccionar un Nodo"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Error al cargar la imagen:"
+
+#: editor/script_create_dialog.cpp
msgid "Error - Could not create script in filesystem."
-msgstr "No se puede crear el script en el sistema de archivos."
+msgstr "Error - No se puede crear el script en el sistema de archivos."
#: editor/script_create_dialog.cpp
msgid "Error loading script from %s"
msgstr "Error al cargar el script desde %s"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "N/A"
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "La ruta está vacia"
@@ -6376,66 +6915,53 @@ msgstr "Extensión invalida"
#: editor/script_create_dialog.cpp
msgid "Wrong extension chosen"
-msgstr ""
+msgstr "Extensión incorrecta elegida"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid Path"
-msgstr "Ruta inválida."
+msgstr "Ruta inválida"
#: editor/script_create_dialog.cpp
msgid "Invalid class name"
msgstr "Nombre de clase inválido"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid inherited parent name or path"
-msgstr "Nombre de propiedad indíce inválido."
+msgstr "Ruta o nombre del padre heredado inválido"
#: 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 _"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr "N/A"
+msgstr "Permitidos: a-z, A-Z, 0-9 y _"
#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
-msgstr ""
+msgstr "Script Integrado (dentro del archivo de escena)"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Create new script file"
msgstr "Crear script nuevo"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Load existing script file"
msgstr "Cargar script existente"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Inherits"
-msgstr "Hereda:"
+msgstr "Hereda"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Class Name"
-msgstr "Nombre de Clase:"
+msgstr "Nombre de Clase"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Template"
-msgstr "Remover Plantilla"
+msgstr "Plantilla"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Built-in Script"
msgstr "Script Integrado (Built-In)"
@@ -6576,6 +7102,10 @@ msgid "Change Light Radius"
msgstr "Cambiar Radio de Luces"
#: editor/spatial_editor_gizmos.cpp
+msgid "Change AudioStreamPlayer3D Emission Angle"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
msgstr "Cambiar FOV de Cámara"
@@ -6609,7 +7139,7 @@ msgstr "Cambiar Alcances de Notificadores"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Particles AABB"
-msgstr ""
+msgstr "Cambiar Particulas AABB"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Probe Extents"
@@ -6661,6 +7191,137 @@ msgstr ""
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "Diccionario de instancias inválido (subclases inválidas)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Eliminar Seleccionados"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Duplicar Selección"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Snap View"
+msgstr "Vista Superior"
+
+#: 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
+#, fuzzy
+msgid "Clip Disabled"
+msgstr "Desactivado"
+
+#: 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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "Ctrl: Rotar"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "Ctrl: Rotar"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Z"
+msgstr "Ctrl: Rotar"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "Crear Nuevo"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "Crear Proyecto Nuevo"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Area"
+msgstr "Borrar TileMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Solo Selección"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Solo Selección"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "Ajustes de Snap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "Instancia:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr " Archivos"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6699,6 +7360,31 @@ msgid "Stack overflow with stack depth: "
msgstr "Stack overflow con la profundidad del stack: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Editar Argumentos de Señal:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Cambiar Tipo de Valor del Array"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Cambiar Nombre de Entrada"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Default Value"
+msgstr "Cambiar Valor por Defecto"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Editar Variable:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Funciones:"
@@ -6739,26 +7425,6 @@ msgid "Add Signal"
msgstr "Agregar Señal"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Quitar Función"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Quitar Variable"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Editando Variable:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Quitar Señal"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "Editando Señal:"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
msgstr "Cambiar Expresión"
@@ -6767,6 +7433,16 @@ msgid "Add Node"
msgstr "Agregar Nodo"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Quitar claves inválidas"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Duplicate VisualScript Nodes"
+msgstr "Duplicar Nodo(s) de Gráfico"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
"Mantené pulsado Meta para depositar un Getter. Mantené pulsado Shift para "
@@ -6811,6 +7487,26 @@ msgid "Add Setter Property"
msgstr "Agregar Propiedad Setter"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "Cambiar Tipo"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Quitar Nodo(s)"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Quitar Nodo de Gráfico de Shaders"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Conectar a Nodo:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "Condición"
@@ -6839,6 +7535,56 @@ msgid "Get"
msgstr "Obtener"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Cambiar Nombre de Entrada"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "No se puede operar en '..'"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "Clipboard de Recursos vacío!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Pegar Nodos"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Quitar Función"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Editar Variable:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Quitar Variable"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Editando Señal:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Quitar Señal"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Editando Variable:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "Editando Señal:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "Tipo Base:"
@@ -6859,10 +7605,6 @@ msgid "Edit Variable:"
msgstr "Editar Variable:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Cambiar"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Eliminar Seleccionados"
@@ -6940,14 +7682,6 @@ msgstr ""
"Valor de retorno inválido de _step(), debe ser un entero (seq out), o string "
"(error)."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "recién presionado"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "recién soltado"
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr "Ejecutar en el Navegador"
@@ -6968,92 +7702,6 @@ msgstr "No se pudo leer el archivo:\n"
msgid "Could not open template for export:\n"
msgstr "No se pudo abrir la plantilla para exportar:\n"
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-"No se pudo leer el archivo de certificado. Son tanto la ruta como el "
-"password correctos?"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "Error al crear el objeto firma."
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr "Error al crear la firma del paquete."
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"No se encontraron plantillas de exportación.\n"
-"Descargá o instalá plantillas de exportación."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr "Paquete debug personalizado no encontrado."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr "Paquete release personalizado no encontrado."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr "Nombre único inválido."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr "GUID de producto inválido."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr "GUID de publisher inválido."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "Color de fondo inválido."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-"Dimensiones de la imagen para el Store Logo inválidas (debería ser 50x50)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-"Dimensiones de la imagen para el logo cuadrado de 44x44 inválidas (debería "
-"ser 44x44)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-"Dimensiones de la imagen para el logo cuadrado de 71x71 inválidas (debería "
-"ser 71x71)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-"Dimensiones de la imagen para el logo cuadrado de 150x150 inválidas (debería "
-"ser 150x150)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-"Dimensiones de la imagen para el logo cuadrado de 310x310 inválidas (debería "
-"ser 310x310)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-"Dimensiones de la imagen para el logo ancho de 310x150 inválidas (debería "
-"ser 310x150)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr "Dimensiones de la imagen del splash inválidas (debería ser 620x400)."
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7149,12 +7797,21 @@ msgid ""
"A material to process the particles is not assigned, so no behavior is "
"imprinted."
msgstr ""
+"No se imprimió ningun comportamiento ya que ningún material fue asignado "
+"para procesar las particulas."
#: scene/2d/path_2d.cpp
msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr ""
"PathFollow2D solo funciona cuando está seteado como hijo de un nodo Path2D."
+#: 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 "La propiedad Path debe apuntar a un nodo Node2D válido para funcionar."
@@ -7183,23 +7840,33 @@ msgstr ""
"VisibilityEnable2D funciona mejor cuando se usa con la raíz de escena "
"editada directamente como padre."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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 ""
-"CollisionShape solo sirve para proveer un collision shape a un nodo derivado "
-"de un CollisionObject. Favor de usarlo solo como hijo de Area, StaticBody, "
-"RigidBody, KinematicBody, etc. para darles un shape."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"Se debe proveer un shape para que CollisionShape funcione. Creale un recurso "
-"shape!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7215,6 +7882,24 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "Un CollisionPolygon vacio no tiene ningún efecto en la colisión."
+#: 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 ""
+"CollisionShape solo sirve para proveer un collision shape a un nodo derivado "
+"de un CollisionObject. Favor de usarlo solo como hijo de Area, StaticBody, "
+"RigidBody, KinematicBody, etc. para darles un shape."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"Se debe proveer un shape para que CollisionShape funcione. Creale un recurso "
+"shape!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7231,6 +7916,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
+msgstr "Nada visible ya que no se asigno pasadas de dibujado a los meshes."
+
+#: 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
@@ -7255,12 +7947,12 @@ msgstr ""
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
-msgstr "Modo de Ejecución:"
+msgid "Raw Mode"
+msgstr "Modo Paneo"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
-msgstr ""
+msgstr "Agregar color actual como preset"
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -7270,22 +7962,6 @@ msgstr "Alerta!"
msgid "Please Confirm..."
msgstr "Confirmá, por favor..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Abrir un Archivo"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Abrir Archivo(s)"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Abrir un Directorio"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Abrir un Archivo o Directorio"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7310,11 +7986,13 @@ msgstr ""
"Usá un container como hijo (VBox, HBox, etc), o un Control y seteá el tamaño "
"mínimo personalizado de forma manual."
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
msgstr ""
+"El Entorno por Defecto especificado en Configuracion del Editor (Rendering -"
+"> Viewport -> Entorno por Defecto) no pudo ser cargado."
#: scene/main/viewport.cpp
msgid ""
@@ -7328,6 +8006,106 @@ msgstr ""
"que pueda obtener un tamaño. Alternativamente, hacelo un RenderTarget y "
"asigná su textura interna a algún otro nodo para mostrar."
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "Cerrar escena? (Los cambios sin guardar se perderán)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr "Abrir el Gestor de Proyectos? (Los cambios sin guardar se perderán)"
+
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "Cerrar e Ir a Escena Prev."
+
+#~ msgid "Expand to Parent"
+#~ msgstr "Expandir al Padre"
+
+#~ msgid "Del"
+#~ msgstr "Eliminar"
+
+#~ msgid "Copy To Platform.."
+#~ msgstr "Copiar A Plataforma.."
+
+#~ msgid "just pressed"
+#~ msgstr "recién presionado"
+
+#~ msgid "just released"
+#~ msgstr "recién soltado"
+
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr ""
+#~ "No se pudo leer el archivo de certificado. Son tanto la ruta como el "
+#~ "password correctos?"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "Error al crear el objeto firma."
+
+#~ msgid "Error creating the package signature."
+#~ msgstr "Error al crear la firma del paquete."
+
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "No se encontraron plantillas de exportación.\n"
+#~ "Descargá o instalá plantillas de exportación."
+
+#~ msgid "Custom debug package not found."
+#~ msgstr "Paquete debug personalizado no encontrado."
+
+#~ msgid "Custom release package not found."
+#~ msgstr "Paquete release personalizado no encontrado."
+
+#~ msgid "Invalid unique name."
+#~ msgstr "Nombre único inválido."
+
+#~ msgid "Invalid product GUID."
+#~ msgstr "GUID de producto inválido."
+
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "GUID de publisher inválido."
+
+#~ msgid "Invalid background color."
+#~ msgstr "Color de fondo inválido."
+
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr ""
+#~ "Dimensiones de la imagen para el Store Logo inválidas (debería ser 50x50)."
+
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr ""
+#~ "Dimensiones de la imagen para el logo cuadrado de 44x44 inválidas "
+#~ "(debería ser 44x44)."
+
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr ""
+#~ "Dimensiones de la imagen para el logo cuadrado de 71x71 inválidas "
+#~ "(debería ser 71x71)."
+
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr ""
+#~ "Dimensiones de la imagen para el logo cuadrado de 150x150 inválidas "
+#~ "(debería ser 150x150)."
+
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr ""
+#~ "Dimensiones de la imagen para el logo cuadrado de 310x310 inválidas "
+#~ "(debería ser 310x310)."
+
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr ""
+#~ "Dimensiones de la imagen para el logo ancho de 310x150 inválidas (debería "
+#~ "ser 310x150)."
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr ""
+#~ "Dimensiones de la imagen del splash inválidas (debería ser 620x400)."
+
+#~ msgid "RAW Mode"
+#~ msgstr "Modo RAW"
+
#~ msgid "Node From Scene"
#~ msgstr "Nodo desde Escena"
@@ -7413,9 +8191,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "%d Ocurrencia(s) Reemplazada(s)."
-#~ msgid "Please save the scene first."
-#~ msgstr "Por favor guardá la escena primero."
-
#~ msgid "Save Translatable Strings"
#~ msgstr "Guardar Strings Traducibles"
@@ -7627,9 +8402,6 @@ msgstr ""
#~ msgid "Script Encryption Key (256-bits as hex):"
#~ msgstr "Clave de Encriptación de Script (256-bits como hex):"
-#~ msgid "Export PCK/Zip"
-#~ msgstr "Exportar PCK/Zip"
-
#~ msgid "Export Project PCK"
#~ msgstr "Exportar PCK de Proyecto"
@@ -7778,8 +8550,5 @@ msgstr ""
#~ msgid "Node Group(s)"
#~ msgstr "Grupo(s) de Nodos"
-#~ msgid "Set region_rect"
-#~ msgstr "Setear region_rect"
-
#~ msgid "Plugin List:"
#~ msgstr "Lista de Plugins:"
diff --git a/editor/translations/fa.po b/editor/translations/fa.po
index e8132b9936..8afc7bc844 100644
--- a/editor/translations/fa.po
+++ b/editor/translations/fa.po
@@ -148,7 +148,8 @@ msgstr "به گام بعدی برو"
msgid "Goto Prev Step"
msgstr "به گام قبلی برو"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "خطی"
@@ -384,7 +385,8 @@ msgstr "پرونده:"
msgid "Description:"
msgstr "توضیح:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -395,9 +397,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "بستن"
@@ -472,7 +474,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -537,17 +539,16 @@ msgid "All"
msgstr "همه"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "جستجو:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "جستجو"
@@ -563,7 +564,7 @@ msgstr "جستجو"
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -575,7 +576,7 @@ msgstr "مرتب‌سازی:"
msgid "Reverse"
msgstr "معکوس"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "طبقه‌بندی:"
@@ -728,14 +729,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "برداشتن"
@@ -846,7 +847,7 @@ msgid "Resource"
msgstr "منبع"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "مسیر"
@@ -930,12 +931,189 @@ msgstr "پوینده‌ی منبع جدا اÙتاده"
msgid "Delete selected files?"
msgstr "آیا پرونده‌های انتخاب شده حذ٠شود؟"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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
+#, fuzzy
+msgid "Authors"
+msgstr "خالق:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "مستمر"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "در حال وارد کردن دوباره..."
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+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
+#, fuzzy
+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
+#, fuzzy
+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 "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "انیمیشن را بهینه‌سازی کن"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "انتخاب شده را به دو تا تکثیر کن"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "کلید Add را جابجا کن"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -949,23 +1127,47 @@ 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/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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+msgid "Save this Bus Layout to a file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+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 "نام نامعتبر."
@@ -1066,6 +1268,10 @@ 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 ""
@@ -1143,6 +1349,22 @@ msgstr "تمام پرونده‌ها (*)"
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
@@ -1269,6 +1491,15 @@ msgid "Signals:"
msgstr "سیگنال ها:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "وظایÙ:"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr ""
@@ -1286,7 +1517,8 @@ msgid "Search Text"
msgstr "جستجوی متن"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " خروجی:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1336,6 +1568,10 @@ 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 ""
@@ -1454,11 +1690,12 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "تایید"
+#, fuzzy
+msgid "Save & Close"
+msgstr "یک پرونده را ذخیره کن"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
@@ -1470,9 +1707,17 @@ 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 ""
@@ -1482,12 +1727,8 @@ msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "خروج"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "از ویرایشگر خارج می شوید؟"
+msgid "This operation can't be done without a selected node."
+msgstr ""
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1510,9 +1751,28 @@ msgid "Quick Run Scene.."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+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
+#, fuzzy
+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
@@ -1520,6 +1780,22 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1552,6 +1828,11 @@ msgstr ""
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 ""
@@ -1568,6 +1849,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "صحنه"
@@ -1616,10 +1901,6 @@ msgstr ""
msgid "Close Scene"
msgstr ""
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1902,6 +2183,10 @@ msgstr ""
msgid "Output"
msgstr "خروجی"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1911,26 +2196,10 @@ msgid "Update"
msgstr "بروز رسانی"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "تشکرات!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "واردکردن قالب ها از درون یک Ùایل ZIP"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "صادر کردن پروژه"
@@ -1951,9 +2220,18 @@ msgid "Open & Run a Script"
msgstr "باز کردن و اجرای یک اسکریپت"
#: editor/editor_node.cpp
+#, fuzzy
+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
#, fuzzy
msgid "Open 2D Editor"
@@ -2059,6 +2337,16 @@ msgstr "در حال وارد کردن دوباره..."
msgid "Re-Import Changed Resources"
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 ""
@@ -2199,10 +2487,27 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "منبع"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2211,6 +2516,20 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "خطا در بارگذاری:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "خطا در بارگذاری:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2287,6 +2606,12 @@ 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 ""
@@ -2298,9 +2623,28 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Single Scene"
+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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2340,6 +2684,14 @@ 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
#, fuzzy
msgid " Files"
msgstr "پرونده:"
@@ -2530,6 +2882,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3112,6 +3468,11 @@ msgid "New name:"
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "پرونده:"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr ""
@@ -3423,6 +3784,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "ویرایش کردن"
@@ -3455,10 +3817,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3568,11 +3926,6 @@ msgstr ""
msgid "Change default type"
msgstr "نوع مقدار آرایه را تغییر بده"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "مواÙقت"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3610,6 +3963,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3649,6 +4010,19 @@ msgid "Update from Scene"
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
+#, fuzzy
+msgid "Load Curve Preset"
+msgstr "خطاهای بارگذاری"
+
+#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
msgid "Add point"
msgstr "Signal را اضاÙÙ‡ Ú©Ù†"
@@ -3660,11 +4034,29 @@ msgstr "برداشتن موج"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Left linear"
+msgstr "خطی"
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Right linear"
+msgstr ""
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Load preset"
msgstr "خطاهای بارگذاری"
#: editor/plugins/curve_editor_plugin.cpp
-msgid "Modify Curve"
+#, fuzzy
+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
@@ -3689,6 +4081,12 @@ 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 ""
@@ -3979,6 +4377,11 @@ 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 ""
@@ -4296,6 +4699,12 @@ 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 ""
@@ -4320,6 +4729,10 @@ 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 ""
@@ -4373,6 +4786,10 @@ msgid "Close All"
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.."
@@ -4405,6 +4822,11 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "ویرایشگر بستگی"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4469,6 +4891,10 @@ msgid ""
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 ""
@@ -4515,6 +4941,11 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "حذ٠کن"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4820,94 +5251,102 @@ msgid "Animation Key Inserted."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
+msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
+msgid "Material Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Forward"
-msgstr ""
+#, fuzzy
+msgid "Shader Changes"
+msgstr "تغییر بده"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "به سمت عقب"
+msgid "Surface Changes"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
+msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "غلطاندن به پایین."
+msgid "Vertices"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
+msgid "Align with view"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
+msgid "Display Normal"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Material Changes"
+msgid "Display Wireframe"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Shader Changes"
-msgstr "تغییر بده"
+msgid "Display Overdraw"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Surface Changes"
+msgid "Display Unshaded"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
+msgid "View Environment"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
+msgid "View Gizmos"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "View Information"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
+msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
+msgid "Doppler Enable"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
+msgid "Freelook Left"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
+msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
+msgid "Freelook Forward"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
+#, fuzzy
+msgid "Freelook Backwards"
+msgstr "به سمت عقب"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
+#, fuzzy
+msgid "Freelook Down"
+msgstr "غلطاندن به پایین."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
+msgid "preview"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
@@ -4915,6 +5354,18 @@ msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+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 ""
@@ -5032,6 +5483,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "ترجیحات"
@@ -5160,6 +5612,10 @@ 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 ""
@@ -5217,6 +5673,16 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "برداشتن انتخاب شده"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "برداشتن"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5284,7 +5750,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5306,11 +5772,25 @@ msgid "Color"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "انتخاب شده را تغییر مقیاس بده"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr ""
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+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
@@ -5346,10 +5826,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5411,7 +5887,7 @@ msgstr "آیا پرونده‌های انتخاب شده حذ٠شود؟"
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5459,6 +5935,23 @@ msgid "Make Patch"
msgstr ""
#: editor/project_export.cpp
+msgid "Features"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+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 ""
@@ -5495,10 +5988,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5543,6 +6032,19 @@ 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 ""
@@ -5559,10 +6061,6 @@ msgstr ""
"آیا انجام این عمل را تایید می کنید!؟‌"
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5591,254 +6089,287 @@ msgstr "برداشتن انتخاب شده"
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "در حال اتصال..."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "+Meta"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "+Shift"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "+Alt"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: 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.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "محور"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "دستگاه"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "دکمه"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "دکمه‌ی چپ."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "دکمه‌ی راست."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "دکمه‌ی وسط."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "غلطاندن به بالا."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "غلطاندن به پایین."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "دارایی Getter را اضاÙÙ‡ Ú©Ù†"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "No property '"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "ترجیحات"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "حذ٠کن"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr ""
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5880,6 +6411,11 @@ msgstr ""
#: editor/property_editor.cpp
#, fuzzy
+msgid "Select Node"
+msgstr "انتخاب حالت"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "New Script"
msgstr "صحنه جدید"
@@ -5892,6 +6428,10 @@ msgid "Error loading file: Not a resource!"
msgstr ""
#: editor/property_editor.cpp
+msgid "Selected node is not a Viewport!"
+msgstr ""
+
+#: editor/property_editor.cpp
#, fuzzy
msgid "Pick a Node"
msgstr "مسیر به سمت گره:"
@@ -5990,6 +6530,11 @@ msgstr ""
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 ""
@@ -6033,10 +6578,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6049,6 +6590,18 @@ 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 ""
@@ -6092,6 +6645,14 @@ msgid "Edit Connections"
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 ""
@@ -6144,6 +6705,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "صاÙÛŒ:"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr ""
@@ -6151,6 +6717,14 @@ msgstr ""
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 ""
@@ -6182,10 +6756,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6223,31 +6793,7 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
@@ -6256,6 +6802,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "خطای بارگذاری قلم."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "نمی‌تواند یک پوشه ایجاد شود."
@@ -6265,6 +6816,10 @@ 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 ""
@@ -6307,10 +6862,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6480,6 +7031,10 @@ 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 ""
@@ -6568,6 +7123,130 @@ msgstr "Ùرمت دیکشنری نمونه نامعتبر (اسکریپت نام
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
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "انتخاب شده را حذ٠کن"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "انتخاب شده را به دو تا تکثیر کن"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+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
+#, fuzzy
+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
+#, fuzzy
+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
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "تنها در قسمت انتخاب شده"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "تنها در قسمت انتخاب شده"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "ترجیحات"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Pick Distance:"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "پرونده:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6607,6 +7286,30 @@ msgid "Stack overflow with stack depth: "
msgstr "سرریزی پشته با عمق پشته: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "آرگومان‌های سیگنال را ویرایش کن"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "نوع مقدار آرایه را تغییر بده"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "متغیر را ویرایش کن:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "وظایÙ:"
@@ -6647,26 +7350,6 @@ msgid "Add Signal"
msgstr "Signal را اضاÙÙ‡ Ú©Ù†"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "برداشتن نقش"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "برداشتن متغیر"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "ویرایش متغیر:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "برداشتن موج"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "ویرایش سیگنال:"
-
-#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Change Expression"
msgstr "انتقال را در انیمیشن تغییر بده"
@@ -6676,6 +7359,15 @@ msgid "Add Node"
msgstr "اÙزودن گره"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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 ""
@@ -6718,6 +7410,26 @@ msgstr "دارایی Setter را اضاÙÙ‡ Ú©Ù†"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
+msgid "Change Base Type"
+msgstr "نوع مقدار آرایه را تغییر بده"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "مسیر به سمت گره:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "برداشتن متغیر"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "اتصال به گره:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Condition"
msgstr "انتقال"
@@ -6747,6 +7459,54 @@ msgid "Get"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "مسیر به سمت گره:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "برداشتن نقش"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "متغیر را ویرایش کن:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "برداشتن متغیر"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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 "نوع پایه:"
@@ -6767,10 +7527,6 @@ msgid "Edit Variable:"
msgstr "متغیر را ویرایش کن:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "تغییر بده"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "انتخاب شده را حذ٠کن"
@@ -6851,14 +7607,6 @@ msgstr ""
"مقدار بازگشتی نامعتبر از ()step_ ، باید integer (seq out) ، یا string "
"(error) باشد."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6882,79 +7630,6 @@ msgstr "نمی‌تواند یک پوشه ایجاد شود."
msgid "Could not open template for export:\n"
msgstr "نمی‌تواند یک پوشه ایجاد شود."
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid unique name."
-msgstr "نام نامعتبر."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid product GUID."
-msgstr "اندازه‌ی قلم نامعتبر."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7058,6 +7733,13 @@ msgstr ""
"PathFollow2D تنها در زمانی Ú©Ù‡ به عنوان یک Ùرزند یک گره Path2D تنظیم شود کار "
"می‌کند."
+#: 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 "دارایی Path باید به یک گره Node2D معتبر اشاره کند تا کار کند."
@@ -7086,24 +7768,33 @@ msgstr ""
"VisibilityEnable2D زمانی بهتر کار می‌کند که در یک ریشه‌ی صحنه‌ی ویرایش شده به "
"صورت پدر (parent) استÙاده شود."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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 ""
-"CollisionShape تنها برای Ùراهم کردن یک Ø´Ú©Ù„ برخورد برای یک گره مشتق‌شده‌ی "
-"CollisionObject به کار می‌رود. لطÙا از آن تنها به عنوان یک Ùرزند Area Ùˆ "
-"StaticBody Ùˆ RigidBody Ùˆ KinematicBody Ùˆ غیره استÙاده کنید تا به آن‌ها یک Ø´Ú©Ù„ "
-"بدهید."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"باید یک Ø´Ú©Ù„ برای CollisionShape Ùراهم شده باشد تا عمل کند. لطÙا یک منبع Ø´Ú©Ù„ "
-"برای آن ایجاد کنید!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7120,6 +7811,25 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "یک CollisionPolygon خالی تأثیری بر برخورد ندارد."
+#: 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 ""
+"CollisionShape تنها برای Ùراهم کردن یک Ø´Ú©Ù„ برخورد برای یک گره مشتق‌شده‌ی "
+"CollisionObject به کار می‌رود. لطÙا از آن تنها به عنوان یک Ùرزند Area Ùˆ "
+"StaticBody Ùˆ RigidBody Ùˆ KinematicBody Ùˆ غیره استÙاده کنید تا به آن‌ها یک Ø´Ú©Ù„ "
+"بدهید."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"باید یک Ø´Ú©Ù„ برای CollisionShape Ùراهم شده باشد تا عمل کند. لطÙا یک منبع Ø´Ú©Ù„ "
+"برای آن ایجاد کنید!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr "یک منبع NavigationMesh باید برای یک گره تنظیم یا ایجاد شود تا کار کند."
@@ -7137,6 +7847,13 @@ 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
#, fuzzy
msgid "Path property must point to a valid Spatial node to work."
@@ -7158,7 +7875,7 @@ msgstr ""
"AnimatedSprite3D Ùریم‌ها را نمایش دهد."
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7173,22 +7890,6 @@ msgstr "هشدار!"
msgid "Please Confirm..."
msgstr "لطÙا تأیید کنید..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "یک پرونده را باز کن"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "پرونده(ها) را باز کن"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "یک دیکشنری را باز کن"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "یک پرونده یا پوشه را باز کن"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "+Ctrl"
@@ -7210,7 +7911,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7228,6 +7929,14 @@ msgstr ""
"تا بتواند یک اندازه بگیرد. در غیر اینصورت، آن را یک RenderTarget قرار دهید و "
"باÙت داخلی آن را برای نمایش به تعدادی گره تخصیص دهید."
+#, fuzzy
+#~ msgid "Invalid unique name."
+#~ msgstr "نام نامعتبر."
+
+#, fuzzy
+#~ msgid "Invalid product GUID."
+#~ msgstr "اندازه‌ی قلم نامعتبر."
+
#~ msgid "Path property must point to a valid Particles2D node to work."
#~ msgstr "دارایی Path باید به یک گره Particles2D معتبر اشاره کند تا کار کند."
diff --git a/editor/translations/fi.po b/editor/translations/fi.po
index d2b6a98223..6cd55dbc6a 100644
--- a/editor/translations/fi.po
+++ b/editor/translations/fi.po
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2017-04-16 13:21+0000\n"
+"PO-Revision-Date: 2017-08-25 14:41+0000\n"
"Last-Translator: ekeimaja <ekeimaja@gmail.com>\n"
"Language-Team: Finnish <https://hosted.weblate.org/projects/godot-engine/"
"godot/fi/>\n"
@@ -15,7 +15,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.14-dev\n"
+"X-Generator: Weblate 2.17-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -148,7 +148,8 @@ msgstr "Mene seuraavaan vaiheeseen"
msgid "Goto Prev Step"
msgstr "Mene edelliseen vaiheeseen"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "Lineaarinen"
@@ -384,7 +385,8 @@ msgstr " Tiedostot"
msgid "Description:"
msgstr "Kuvaus:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr "Asenna"
@@ -395,9 +397,9 @@ msgstr "Asenna"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Sulje"
@@ -473,7 +475,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -539,17 +541,16 @@ msgid "All"
msgstr "Kaikki"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "Hae:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "Hae"
@@ -565,7 +566,7 @@ msgstr "Hae"
msgid "Import"
msgstr "Tuo"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -577,7 +578,7 @@ msgstr "Lajittele:"
msgid "Reverse"
msgstr "Käänteinen"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "Kategoria:"
@@ -730,14 +731,14 @@ msgstr "Yhdistä Nodeen:"
#: 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.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
msgstr "Lisää"
#: 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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "Poista"
@@ -848,7 +849,7 @@ msgid "Resource"
msgstr "Resurssi"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "Polku"
@@ -930,12 +931,193 @@ msgstr ""
msgid "Delete selected files?"
msgstr "Poista valitut tiedostot?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Poista"
+#: editor/editor_about.cpp
+msgid "Thanks from the Godot community!"
+msgstr "Kiitos Godot-yhteisöltä!"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "Kiitos!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr ""
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "Tekijä:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "Projektinhallinta"
+
+#: editor/editor_about.cpp
+msgid "Lead Developer"
+msgstr ""
+
+#: editor/editor_about.cpp editor/project_manager.cpp
+msgid "Project Manager"
+msgstr "Projektinhallinta"
+
+#: editor/editor_about.cpp
+msgid "Developers"
+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
+#, fuzzy
+msgid "All Components"
+msgstr "Vakiot:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "Vakiot:"
+
+#: 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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "Purettu"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "Paketti asennettu onnistuneesti!"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "Paketti asennettu onnistuneesti!"
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Effect"
+msgstr "Lisää tyhjä"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Nimeä funktio uudelleen"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Poista valitut"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+msgstr "Debug-asetukset"
+
+#: 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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "Monista"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Poista valitut"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "Lisää väylä"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Poista Layout"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Monista animaatio"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "Siirrä lisäyspainiketta"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -949,23 +1131,51 @@ 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
+#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"Virheellinen tiedostolaajennus.\n"
+"Käytä .fnt -tiedostoa."
+
+#: editor/editor_audio_buses.cpp
msgid "Add Bus"
msgstr "Lisää väylä"
+#: editor/editor_audio_buses.cpp
+msgid "Create a new Bus Layout."
+msgstr ""
+
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "Lataa"
#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Load an existing Bus Layout."
+msgstr "Lataa olemassaoleva resurssi levyltä ja muokkaa sitä."
+
+#: editor/editor_audio_buses.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Save As"
msgstr "Tallenna nimellä"
-#: editor/editor_audio_buses.cpp editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+msgid "Save this Bus Layout to a file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+msgid "Load Default"
msgstr "Oletus"
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Virheellinen nimi."
@@ -1066,6 +1276,10 @@ msgid "Updating scene.."
msgstr "Päivitetään sceneä..."
#: editor/editor_dir_dialog.cpp
+msgid "Please select a base directory first"
+msgstr ""
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "Valitse hakemisto"
@@ -1143,6 +1357,22 @@ msgstr "Kaikki tiedostot (*)"
msgid "Open"
msgstr "Avaa"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Avaa tiedosto"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Avaa tiedosto(t)"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Avaa hakemisto"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Avaa tiedosto tai hakemisto"
+
#: 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
@@ -1273,6 +1503,15 @@ msgid "Signals:"
msgstr ""
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Animaatiot"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Vakiot:"
@@ -1290,7 +1529,8 @@ msgid "Search Text"
msgstr "Hae tekstiä"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " Tuloste:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1340,6 +1580,11 @@ msgid "Creating Thumbnail"
msgstr "Luodaan pienoiskuvaa"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "This operation can't be done without a tree root."
+msgstr "Tätä toimintoa ei voi tehdä ilman Sceneä."
+
+#: editor/editor_node.cpp
msgid ""
"Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."
msgstr "Sceneä ei voitu tallentaa. Riippuvuuksia ei voitu tyydyttää."
@@ -1467,12 +1712,13 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "Kyllä"
+#, fuzzy
+msgid "Save & Close"
+msgstr "Tallenna tiedosto"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "Sulje scene? (tallentamattomat muutokset menetetään)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
@@ -1484,9 +1730,17 @@ msgid "No"
msgstr "Node"
#: editor/editor_node.cpp
+msgid "Yes"
+msgstr "Kyllä"
+
+#: editor/editor_node.cpp
msgid "This scene has never been saved. Save before running?"
msgstr "Tätä sceneä ei ole koskaan tallennettu. Tallenna ennen suorittamista?"
+#: editor/editor_node.cpp editor/scene_tree_dock.cpp
+msgid "This operation can't be done without a scene."
+msgstr "Tätä toimintoa ei voi tehdä ilman Sceneä."
+
#: editor/editor_node.cpp
msgid "Export Mesh Library"
msgstr "Tuo Mesh-kirjasto"
@@ -1496,12 +1750,9 @@ msgid "Export Tile Set"
msgstr "Tuo tileset"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "Lopeta"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "Poistu editorista?"
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "Tätä toimintoa ei voi tehdä ilman Sceneä."
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1524,18 +1775,52 @@ msgid "Quick Run Scene.."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "Lopeta"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "Poistu editorista?"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "Projektinhallinta"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Tallenna tiedosto"
+
+#: 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 ""
-"Avaa projektinhallinta?\n"
-"(tallentamattomat muutokset menetetään)"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "Valitse pääscene"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1572,6 +1857,11 @@ msgstr "Tallenna Layout"
msgid "Delete Layout"
msgstr "Poista Layout"
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+msgid "Default"
+msgstr "Oletus"
+
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
msgstr "Vaihda Scenen välilehteä"
@@ -1589,6 +1879,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "Scene"
@@ -1637,10 +1931,6 @@ msgstr "Tallenna kaikki scenet"
msgid "Close Scene"
msgstr "Sulje scene"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "Avaa viimeaikainen"
@@ -1925,6 +2215,10 @@ msgstr "Node"
msgid "Output"
msgstr "Tuloste"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "Tuo uudelleen"
@@ -1934,26 +2228,10 @@ msgid "Update"
msgstr "Päivitä"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "Kiitos Godot-yhteisöltä!"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "Kiitos!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "Tuo mallit ZIP-tiedostosta"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "Vie projekti"
@@ -1974,9 +2252,18 @@ msgid "Open & Run a Script"
msgstr "Avaa & suorita skripti"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "New Inherited"
+msgstr "Uusi peritty Scene..."
+
+#: editor/editor_node.cpp
msgid "Load Errors"
msgstr "Lataa virheet"
+#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
+msgid "Select"
+msgstr "Valitse"
+
#: editor/editor_node.cpp
#, fuzzy
msgid "Open 2D Editor"
@@ -2085,6 +2372,16 @@ msgstr "Tuodaan uudelleen"
msgid "Re-Import Changed Resources"
msgstr "Tuo uudelleen vaihtuneet resurssit"
+#: 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 "Kirjoita logiikka _run() -metodiin."
@@ -2220,10 +2517,28 @@ msgid "Cannot navigate to '"
msgstr "Ei voida navigoida '"
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "Tallenna & tuo uudelleen"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "Lähde:"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr "Sama lähde ja kohdetiedosto, ei toimenpiteitä."
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr "Sama lähde ja kohdepolku, ei toimenpiteitä."
@@ -2232,6 +2547,20 @@ msgid "Can't move directories to within themselves."
msgstr "Hakemisto(j)a ei voida siirtää itseensä."
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Virhe ladattaessa kuvaa:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Virhe tuotaessa:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2308,6 +2637,12 @@ 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 "Siirrä"
@@ -2319,9 +2654,30 @@ msgstr "Lisää ryhmään"
msgid "Remove from Group"
msgstr "Poista ryhmästä"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+msgstr "Tuodaan Scene..."
+
+#: 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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "Tuo 3D Scene"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2361,6 +2717,14 @@ msgid "Saving.."
msgstr "Tallennetaan..."
#: 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 " Tiedostot"
@@ -2553,6 +2917,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3145,6 +3513,11 @@ msgid "New name:"
msgstr "Uusi nimi:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Suodattimet"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr "Skaalaus:"
@@ -3458,6 +3831,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Muokkaa"
@@ -3490,10 +3864,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr "Laajenna Parentiin"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr "Luuranko..."
@@ -3603,11 +3973,6 @@ msgstr ""
msgid "Change default type"
msgstr "Muuta oletustyyppiä"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr ""
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3647,6 +4012,14 @@ msgstr "Muokkaa polygonia (poista piste)"
msgid "Create a new polygon from scratch."
msgstr "Luo uusi piste tyhjästä."
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr "Luo Poly3D"
@@ -3689,6 +4062,21 @@ msgstr "Päivitä Scenestä"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Modify Curve Point"
+msgstr "Muokkaa käyrää"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "Muokkaa käyrää"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Load Curve Preset"
+msgstr "Lataa resurssi"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Add point"
msgstr "Lisää syöte"
@@ -3699,12 +4087,31 @@ msgstr "Siirrä pistettä"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Left linear"
+msgstr "Lineaarinen"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Right linear"
+msgstr "Oikea näkymä"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Load preset"
msgstr "Lataa resurssi"
#: editor/plugins/curve_editor_plugin.cpp
-msgid "Modify Curve"
-msgstr "Muokkaa käyrää"
+#, fuzzy
+msgid "Remove Curve Point"
+msgstr "Siirrä pistettä"
+
+#: 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"
@@ -3728,6 +4135,12 @@ 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 ""
@@ -4020,6 +4433,12 @@ msgid "Load Emission Mask"
msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
+msgid "Particles"
+msgstr "Ominaisuudet:"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
msgstr ""
@@ -4346,6 +4765,12 @@ msgid "Clear Recent Files"
msgstr "Tyhjennä luut"
#: 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 "Virhe tallennettaessa teemaa"
@@ -4370,6 +4795,10 @@ msgid "Save Theme As.."
msgstr "Tallenna teema nimellä..."
#: editor/plugins/script_editor_plugin.cpp
+msgid " Class Reference"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Next script"
msgstr "Seuraava skripti"
@@ -4422,6 +4851,11 @@ msgid "Close All"
msgstr "Sulje kaikki"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Scripts Panel"
+msgstr "Näytä suosikit"
+
+#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Find.."
@@ -4455,6 +4889,11 @@ msgid "Keep Debugger Open"
msgstr "Pidä debuggeri auki"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "Avaa editorissa"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr "Ikkuna"
@@ -4522,6 +4961,10 @@ msgstr ""
"kuuluvat, on ladattu"
#: 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 "Poimi väri"
@@ -4569,6 +5012,11 @@ msgid "Move Down"
msgstr "Siirrä alas"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Poista piste"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr "Sisennä vasemmalle"
@@ -4876,37 +5324,6 @@ msgid "Animation Key Inserted."
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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "Mene eteenpäin"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "Taaksepäin"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "Rulla alas."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -4974,10 +5391,63 @@ msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Doppler Enable"
+msgstr "Ota käyttöön"
+
+#: 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
+#, fuzzy
+msgid "Freelook Forward"
+msgstr "Mene eteenpäin"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Backwards"
+msgstr "Taaksepäin"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Down"
+msgstr "Rulla alas."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "preview"
+msgstr "Esikatselu"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "Valitse tila"
+
+#: 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 "Siirtotila (W)"
@@ -5098,6 +5568,7 @@ msgid "View Grid"
msgstr "Näytä ruudukko"
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "Asetukset"
@@ -5226,6 +5697,11 @@ msgid "StyleBox Preview:"
msgstr "StyleBox:in esikatselu:"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
+msgid "Set Region Rect"
+msgstr "Tekstuurialue"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
msgstr ""
@@ -5284,6 +5760,16 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Poista valitut"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Poista"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr "Teema"
@@ -5354,7 +5840,7 @@ msgstr "Välilehti 2"
msgid "Tab 3"
msgstr "Välilehti 3"
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr "Tyyppi:"
@@ -5376,12 +5862,27 @@ msgid "Color"
msgstr "Väri"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Framen valinta"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr ""
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "Monista"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "Lineaarinen"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Bucket Fill"
+msgstr "Sanko"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5416,10 +5917,6 @@ msgid "Pick Tile"
msgstr "Poimi tile"
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr "Valitse"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr "Käännä 0 astetta"
@@ -5479,7 +5976,7 @@ msgstr ""
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "Lisää..."
@@ -5526,6 +6023,25 @@ msgid "Make Patch"
msgstr ""
#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "Tekstuuri"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "Metodilista:"
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Export PCK/Zip"
+msgstr "Vie"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5566,10 +6082,6 @@ msgid "The following files failed extraction from package:"
msgstr "Seuraavien tiedostojen purku paketista epäonnistui:"
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr "Paketti asennettu onnistuneesti!"
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "Tuo olemassaoleva projekti"
@@ -5614,6 +6126,22 @@ msgid "Are you sure to open more than one project?"
msgstr "Haluatko varmasti avata useamman kuin yhden projektin?"
#: 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 ""
+"Pääsceneä ei ole määritetty, haluatko valita sen?\n"
+"Voit muuttaa sitä myöhemmin projektin asetuksista."
+
+#: 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 ""
@@ -5628,10 +6156,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr "Projektinhallinta"
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr "Projektiluettelo"
@@ -5660,256 +6184,288 @@ msgstr "Poista malli"
msgid "Exit"
msgstr "Poistu"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Yhdistä..."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "Näppäin... "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr "Joystick-painike"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "Paina näppäintä..."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr "Vasen painike"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr "Oikea painike"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr "Keskipainike"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr "Rulla ylös painike"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr "Rulla alas painike"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr "Painike 6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr "Painike 7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr "Painike 8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr "Painike 9"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Muuta"
+
+#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "Akseli"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr "Lisää syöttötapahtuma"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Add Event"
msgstr "Lisää tyhjä"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "Laite"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Painike"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "Vasen painike."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "Oikea painike."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "Keskimmäinen painike."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "Rulla ylös."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "Rulla alas."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Add Global Property"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "No property '"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "Asetukset"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "Poista syöte"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "Virhe tallennettaessa asetuksia."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "Asetukset tallennettu onnistuneesti."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr "Lisää käännös"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "Poista käännös"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Projektin asetukset"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr ""
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5950,6 +6506,11 @@ msgid "Assign"
msgstr ""
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Valitse Node"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr ""
@@ -5962,6 +6523,11 @@ msgid "Error loading file: Not a resource!"
msgstr ""
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "Valitse tuotava(t) node(t)"
+
+#: editor/property_editor.cpp
msgid "Pick a Node"
msgstr "Poimi Node"
@@ -6057,6 +6623,11 @@ msgstr ""
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 ""
@@ -6100,10 +6671,6 @@ msgid "Delete Node(s)?"
msgstr "Poista Node(t)?"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "Tätä toimintoa ei voi tehdä ilman Sceneä."
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6116,6 +6683,18 @@ msgid "Save New Scene As.."
msgstr "Tallenna uusi scene nimellä..."
#: 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 "Käy järkeen!"
@@ -6159,6 +6738,14 @@ msgid "Edit Connections"
msgstr "Muokkaa yhteyksiä"
#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance"
+msgstr ""
+
+#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
+msgid "Open in Editor"
+msgstr "Avaa editorissa"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)"
msgstr "Poista Node(t)"
@@ -6209,6 +6796,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "Suodattimet"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr ""
@@ -6216,6 +6808,14 @@ msgstr ""
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 "Tyhjennä!"
+
#: editor/scene_tree_editor.cpp
msgid "Toggle Spatial Visible"
msgstr ""
@@ -6247,11 +6847,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "Debug-asetukset"
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6289,39 +6884,20 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr "Avaa editorissa"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr "Tyhjennä!"
-
-#: editor/scene_tree_editor.cpp
msgid "Select a Node"
msgstr "Valitse Node"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Virhe ladattaessa kuvaa:"
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "Ei voitu luoda skriptiä tiedostojärjestelmään."
@@ -6330,6 +6906,10 @@ msgid "Error loading script from %s"
msgstr "Virhe ladattaessa skripti %s:stä"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "Polku on tyhjä"
@@ -6371,10 +6951,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6545,6 +7121,10 @@ msgid "Change Light Radius"
msgstr "Muuta valon sädettä"
#: editor/spatial_editor_gizmos.cpp
+msgid "Change AudioStreamPlayer3D Emission Angle"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
msgstr "Muuta kameran näkökenttää"
@@ -6626,6 +7206,136 @@ msgstr ""
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
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Poista valitut"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Monista valinta"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Snap View"
+msgstr "Huippunäkymä"
+
+#: 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
+#, fuzzy
+msgid "Clip Disabled"
+msgstr "Poistettu käytöstä"
+
+#: 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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "Ctrl: Pyöritä/kierrä"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "Ctrl: Pyöritä/kierrä"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Z"
+msgstr "Ctrl: Pyöritä/kierrä"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "Luo uusi"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "Luo uusi projekti"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Erase Area"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Pelkkä valinta"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Pelkkä valinta"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "Näyttöruudun asetukset"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "Poimi tile"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr " Tiedostot"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6657,6 +7367,29 @@ 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
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Vaihda taulukon arvon tyyppiä"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Vaihda syötteen nimi"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Set Variable Default Value"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Muokkaa muuttujaa:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Funktiot:"
@@ -6697,26 +7430,6 @@ msgid "Add Signal"
msgstr "Lisää signaali"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Poista funktio"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Poista muuttuja"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Muokataan muuttujaa:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Poista signaali"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "Muokataan signaalia:"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
msgstr "Vaihda lauseketta"
@@ -6725,6 +7438,15 @@ msgid "Add Node"
msgstr "Lisää Node"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Poista virheelliset avaimet"
+
+#: 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 ""
@@ -6765,6 +7487,26 @@ msgid "Add Setter Property"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "Muuta tyyppiä"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Poista Node(t)"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Poista muuttuja"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Yhdistä Nodeen:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "Ehtolause"
@@ -6793,6 +7535,55 @@ msgid "Get"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Vaihda syötteen nimi"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Can't copy the function node."
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "Resurssien leikepöytä on tyhjä!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Liitä Nodet"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Poista funktio"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Muokkaa muuttujaa:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Poista muuttuja"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Muokataan signaalia:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Poista signaali"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Muokataan muuttujaa:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "Muokataan signaalia:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr ""
@@ -6813,10 +7604,6 @@ msgid "Edit Variable:"
msgstr "Muokkaa muuttujaa:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Muuta"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Poista valitut"
@@ -6890,14 +7677,6 @@ msgid ""
"(error)."
msgstr ""
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "juuri painettu"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "juuri julkaistu"
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr "Suorita selaimessa"
@@ -6918,77 +7697,6 @@ msgstr "Ei voitu lukea tiedostoa:\n"
msgid "Could not open template for export:\n"
msgstr ""
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "Virhe luotaessa allekirjoitusoliota."
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "Virheellinen taustaväri."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7069,6 +7777,13 @@ msgstr ""
"PathFollow2D toimii ainoastaan ollessaan asetettuna Path2D Node:n "
"lapsiolioksi."
+#: 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 "Polku täytyy olla määritetty toimivaan Node2D solmuun toimiakseen."
@@ -7091,17 +7806,32 @@ msgid ""
"as parent."
msgstr ""
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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
@@ -7115,6 +7845,19 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "Tyhjällä CollisionPolygon:illa ei ole vaikutusta törmäyksessä."
+#: 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 ""
@@ -7130,6 +7873,13 @@ 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 ""
@@ -7147,12 +7897,12 @@ msgstr ""
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr "Kääntötila"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
-msgstr ""
+msgstr "Lisää nykyinen väri esiasetukseksi"
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -7162,22 +7912,6 @@ msgstr "Huomio!"
msgid "Please Confirm..."
msgstr "Ole hyvä ja vahvista..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Avaa tiedosto"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Avaa tiedosto(t)"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Avaa hakemisto"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Avaa tiedosto tai hakemisto"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7202,7 +7936,7 @@ msgstr ""
"Käytä containeria lapsena (VBox, HBox, jne), tai Control:ia ja aseta haluttu "
"minimikoko manuaalisesti."
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7220,6 +7954,31 @@ msgstr ""
"koon. Muutoin tee siitä RenderTarget ja aseta sen sisäinen tekstuuri "
"johonkin Nodeen näkyväksi."
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "Sulje scene? (tallentamattomat muutokset menetetään)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "Avaa projektinhallinta?\n"
+#~ "(tallentamattomat muutokset menetetään)"
+
+#~ msgid "Expand to Parent"
+#~ msgstr "Laajenna Parentiin"
+
+#~ msgid "just pressed"
+#~ msgstr "juuri painettu"
+
+#~ msgid "just released"
+#~ msgstr "juuri julkaistu"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "Virhe luotaessa allekirjoitusoliota."
+
+#~ msgid "Invalid background color."
+#~ msgstr "Virheellinen taustaväri."
+
#~ msgid "Node From Scene"
#~ msgstr "Node Scenestä"
diff --git a/editor/translations/fr.po b/editor/translations/fr.po
index bb60c74475..c499138c77 100644
--- a/editor/translations/fr.po
+++ b/editor/translations/fr.po
@@ -2,6 +2,7 @@
# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
# This file is distributed under the same license as the Godot source code.
#
+# Antoine Carrier <ac.g392@gmail.com>, 2017.
# Brice <bbric@free.fr>, 2016.
# Chenebel Dorian <LoubiTek54@gmail.com>, 2016-2017.
# derderder77 <derderder77380@gmail.com>, 2016.
@@ -22,8 +23,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2017-05-25 09:31+0000\n"
-"Last-Translator: Nathan Lovato <nathan.lovato.art@gmail.com>\n"
+"PO-Revision-Date: 2017-07-03 19:36+0000\n"
+"Last-Translator: Gilles Roudiere <gilles.roudiere@gmail.com>\n"
"Language-Team: French <https://hosted.weblate.org/projects/godot-engine/"
"godot/fr/>\n"
"Language: fr\n"
@@ -31,7 +32,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.14.1\n"
+"X-Generator: Weblate 2.16-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -98,9 +99,8 @@ msgid "Anim Track Change Value Mode"
msgstr "Modifier le mode de valeur de la piste d'animation"
#: editor/animation_editor.cpp
-#, fuzzy
msgid "Anim Track Change Wrap Mode"
-msgstr "Modifier le mode de valeur de la piste d'animation"
+msgstr "Piste d'Animation Changer Mode de Conclusion"
#: editor/animation_editor.cpp
msgid "Edit Node Curve"
@@ -162,7 +162,8 @@ msgstr "Aller à l'étape suivante"
msgid "Goto Prev Step"
msgstr "Aller à l'étape précédente"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "Linéaire"
@@ -376,21 +377,19 @@ msgstr "Modifier valeur du tableau"
#: editor/asset_library_editor_plugin.cpp
msgid "Free"
-msgstr ""
+msgstr "Libérer"
#: editor/asset_library_editor_plugin.cpp editor/editor_plugin_settings.cpp
msgid "Version:"
msgstr "Version :"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Contents:"
-msgstr "Constantes :"
+msgstr "Contenu:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "View Files"
-msgstr "Fichier"
+msgstr "Voir Fichiers"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
#: editor/editor_help.cpp editor/property_selector.cpp
@@ -398,7 +397,8 @@ msgstr "Fichier"
msgid "Description:"
msgstr "Description :"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr "Installer"
@@ -409,106 +409,100 @@ msgstr "Installer"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Fermer"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
-msgstr ""
+msgstr "Impossible de résoudre le nom de l'hôte:"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve."
-msgstr ""
+msgstr "Impossible à résoudre."
#: editor/asset_library_editor_plugin.cpp
msgid "Connection error, please try again."
-msgstr ""
+msgstr "Erreur de connection, veuillez essayer à nouveau."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect."
-msgstr "Connecter…"
+msgstr "Connection impossible."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect to host:"
-msgstr "Connecter au nœud :"
+msgstr "Connection à l'hôte impossible:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr ""
+msgstr "Pas de réponse de l'hôte:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response."
-msgstr ""
+msgstr "Pas de réponse."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Request failed, return code:"
-msgstr "Format de fichier demandé inconnu :"
+msgstr "La requête a échoué, code retourné:"
#: editor/asset_library_editor_plugin.cpp
msgid "Req. Failed."
-msgstr ""
+msgstr "Req. a Échoué."
#: editor/asset_library_editor_plugin.cpp
msgid "Request failed, too many redirects"
-msgstr ""
+msgstr "La requête a échoué, trop de redirections"
#: editor/asset_library_editor_plugin.cpp
msgid "Redirect Loop."
-msgstr ""
+msgstr "Boucle de Redirection."
#: editor/asset_library_editor_plugin.cpp
msgid "Failed:"
-msgstr ""
+msgstr "Échec:"
#: editor/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
-msgstr ""
+msgstr "Vérification du téléchargement échouée, le fichier a été altéré."
#: editor/asset_library_editor_plugin.cpp
msgid "Expected:"
-msgstr ""
+msgstr "Attendu:"
#: editor/asset_library_editor_plugin.cpp
msgid "Got:"
-msgstr ""
+msgstr "A:"
#: editor/asset_library_editor_plugin.cpp
msgid "Failed sha256 hash check"
-msgstr ""
+msgstr "Vérification de brouillage sha256 échouée"
#: editor/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr ""
+msgstr "Erreur dans le téléchargement d'une ressource:"
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
-msgstr ""
+msgstr "Succès!"
#: editor/asset_library_editor_plugin.cpp
msgid "Fetching:"
-msgstr ""
+msgstr "Récupération:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Resolving.."
-msgstr "Enregistrement…"
+msgstr "Résolution.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Connecting.."
-msgstr "Connecter…"
+msgstr "Connexion en cours.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Requesting.."
-msgstr "En test"
+msgstr "Envoi d'une requête.."
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
@@ -517,11 +511,11 @@ msgstr "Erreur d'enregistrement de la ressource !"
#: editor/asset_library_editor_plugin.cpp
msgid "Idle"
-msgstr ""
+msgstr "Inactif"
#: editor/asset_library_editor_plugin.cpp
msgid "Retry"
-msgstr ""
+msgstr "Réessayer"
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
@@ -530,40 +524,40 @@ msgstr "Télécharger"
#: editor/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr ""
+msgstr "Le téléchargement de cette ressource est déjà en cours!"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "first"
-msgstr ""
+msgstr "prem"
#: editor/asset_library_editor_plugin.cpp
msgid "prev"
-msgstr ""
+msgstr "préc"
#: editor/asset_library_editor_plugin.cpp
msgid "next"
-msgstr ""
+msgstr "suiv"
#: editor/asset_library_editor_plugin.cpp
msgid "last"
-msgstr ""
+msgstr "dern"
#: editor/asset_library_editor_plugin.cpp
msgid "All"
msgstr "Tout"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "Rechercher :"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "Rechercher"
@@ -579,7 +573,7 @@ msgstr "Rechercher"
msgid "Import"
msgstr "Importer"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "Extensions"
@@ -591,7 +585,7 @@ msgstr "Trier :"
msgid "Reverse"
msgstr "Inverser"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "Catégorie :"
@@ -745,14 +739,14 @@ msgstr "Connecter au nœud :"
#: 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.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
msgstr "Ajouter"
#: 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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "Supprimer"
@@ -861,7 +855,7 @@ msgid "Resource"
msgstr "Ressource"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "Chemin"
@@ -948,12 +942,196 @@ msgstr "Explorateur de ressources orphelines"
msgid "Delete selected files?"
msgstr "Supprimer les fichiers sélectionnés ?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Supprimer"
+#: editor/editor_about.cpp
+msgid "Thanks from the Godot community!"
+msgstr "La communauté Godot vous dit merci !"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "Merci !"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr "Contributeurs Godot Engine"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "Auteur :"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "Gestionnaire de projets"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Lead Developer"
+msgstr "Développeurs"
+
+#: editor/editor_about.cpp editor/project_manager.cpp
+msgid "Project Manager"
+msgstr "Gestionnaire de projets"
+
+#: editor/editor_about.cpp
+msgid "Developers"
+msgstr "Développeurs"
+
+#: 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
+#, fuzzy
+msgid "All Components"
+msgstr "Contenu:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "Contenu:"
+
+#: 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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "Non compressé"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "Paquetage installé avec succès !"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "Paquetage installé avec succès !"
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Effect"
+msgstr "Ajouter vide"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Ouvrir la Mise en Page des Bus Audio"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Solo"
+msgstr "Ouvrir la Mise en Page des Bus Audio"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Mute"
+msgstr "Ouvrir la Mise en Page des Bus Audio"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Supprimer la selection"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+msgstr "Options de débogage"
+
+#: 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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "Dupliquer"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Supprimer la selection"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "Ajouter un bus"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Supprimer la disposition"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Dupliquer l'animation"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "Déplacer l'action"
+
#: editor/editor_audio_buses.cpp
#, fuzzy
msgid "Save Audio Bus Layout As.."
@@ -969,23 +1147,53 @@ msgid "Open Audio Bus Layout"
msgstr "Ouvrir la Mise en Page des Bus Audio"
#: editor/editor_audio_buses.cpp
+msgid "There is no 'res://default_bus_layout.tres' file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"Extension de fichier non valide.\n"
+"Veuillez utiliser .fnt."
+
+#: editor/editor_audio_buses.cpp
msgid "Add Bus"
msgstr "Ajouter un bus"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "Créer une nouvelle ressource"
+
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "Charger"
#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Load an existing Bus Layout."
+msgstr "Charger une ressource existante depuis la disque et la modifier."
+
+#: editor/editor_audio_buses.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Save As"
msgstr "Enregistrer sous"
-#: editor/editor_audio_buses.cpp editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Save this Bus Layout to a file."
+msgstr "Enregistrer la Disposition des Bus Audio Sous.."
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+msgid "Load Default"
msgstr "Par défaut"
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nom invalide."
@@ -1092,6 +1300,11 @@ msgid "Updating scene.."
msgstr "Mise à jour de la scène…"
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "Veuillez enregistrer la scène d'abord."
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "Choisir un répertoire"
@@ -1169,6 +1382,22 @@ msgstr "Tous les fichiers (*)"
msgid "Open"
msgstr "Ouvrir"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Ouvrir un fichier"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Ouvrir un ou plusieurs fichiers"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Ouvrir un répertoire"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Ouvrir un fichier ou un répertoire"
+
#: 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
@@ -1294,6 +1523,15 @@ msgid "Signals:"
msgstr "Signaux :"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Animations"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Constantes :"
@@ -1310,7 +1548,8 @@ msgid "Search Text"
msgstr "Chercher du texte"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " Sortie :"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1360,6 +1599,11 @@ msgid "Creating Thumbnail"
msgstr "Création de l'aperçu"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "This operation can't be done without a tree root."
+msgstr "Cette opération ne peut être réalisée sans une scène."
+
+#: editor/editor_node.cpp
msgid ""
"Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."
msgstr ""
@@ -1493,12 +1737,13 @@ msgid "Quick Open Script.."
msgstr "Ouvrir un script rapidement…"
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "Oui"
+#, fuzzy
+msgid "Save & Close"
+msgstr "Enregistrer un fichier"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "Fermer la scène ? (les modifications non sauvegardées seront perdues)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
@@ -1510,10 +1755,18 @@ msgid "No"
msgstr "NÅ“ud"
#: editor/editor_node.cpp
+msgid "Yes"
+msgstr "Oui"
+
+#: editor/editor_node.cpp
msgid "This scene has never been saved. Save before running?"
msgstr ""
"Cette scène n'a jamais été enregistrée. L'enregistrer avant de la lancer ?"
+#: editor/editor_node.cpp editor/scene_tree_dock.cpp
+msgid "This operation can't be done without a scene."
+msgstr "Cette opération ne peut être réalisée sans une scène."
+
#: editor/editor_node.cpp
msgid "Export Mesh Library"
msgstr "Exporter une bibliothèque de maillages"
@@ -1523,12 +1776,9 @@ msgid "Export Tile Set"
msgstr "Exporter un ensemble de tuiles"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "Quitter"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "Quitter l'éditeur ?"
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "Cette opération ne peut être réalisée sans une scène."
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1551,18 +1801,52 @@ msgid "Quick Run Scene.."
msgstr "Lancer une scène rapidement…"
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "Quitter"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "Quitter l'éditeur ?"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "Gestionnaire de projets"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Enregistrer un fichier"
+
+#: 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 ""
-"Ouvrir le gestionnaire de projets ?\n"
-"(les modifications non sauvegardées seront perdues)"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "Choisir une scène principale"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1601,6 +1885,11 @@ msgstr "Enregistrer la disposition"
msgid "Delete Layout"
msgstr "Supprimer la disposition"
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+msgid "Default"
+msgstr "Par défaut"
+
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
msgstr "Basculer entre les onglets de scène"
@@ -1617,6 +1906,11 @@ msgstr "%s fichier(s) ou dossier(s) supplémentaire(s)"
msgid "Distraction Free Mode"
msgstr "Mode sans distraction"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "Mode sans distraction"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "Scène"
@@ -1635,7 +1929,7 @@ msgstr "Onglet precedent"
#: editor/editor_node.cpp
msgid "Filter Files.."
-msgstr "Filtrer des fichiers…"
+msgstr "Filtrer Fichiers.."
#: editor/editor_node.cpp
msgid "Operations with scene files."
@@ -1665,10 +1959,6 @@ msgstr "Enregistrer toutes les scènes"
msgid "Close Scene"
msgstr "Fermer la scène"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr "Fermer, aller à la scène précédente"
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "Fichiers récents"
@@ -1705,9 +1995,8 @@ msgid "Miscellaneous project or scene-wide tools."
msgstr "Outils divers liés au projet ou à la scène."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Project"
-msgstr "Nouveau projet"
+msgstr "Projet"
#: editor/editor_node.cpp
msgid "Project Settings"
@@ -1857,12 +2146,14 @@ msgid "Online Docs"
msgstr "Fermer les documentations"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Q&A"
-msgstr ""
+msgstr "Questions et Réponses"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Issue Tracker"
-msgstr ""
+msgstr "Traqueur de problèmes"
#: editor/editor_node.cpp
msgid "About"
@@ -1972,6 +2263,10 @@ msgstr "NÅ“ud"
msgid "Output"
msgstr "Sortie"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "Ré-importer"
@@ -1981,26 +2276,10 @@ msgid "Update"
msgstr "Mettre à jour"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "La communauté Godot vous dit merci !"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "Merci !"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "Importer des modèles depuis un fichier ZIP"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "Exporter le projet"
@@ -2021,9 +2300,18 @@ msgid "Open & Run a Script"
msgstr "Ouvrir et exécuter un script"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "New Inherited"
+msgstr "Nouvelle scène héritée…"
+
+#: editor/editor_node.cpp
msgid "Load Errors"
msgstr "Erreurs de chargement"
+#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
+msgid "Select"
+msgstr "Sélectionner"
+
#: editor/editor_node.cpp
#, fuzzy
msgid "Open 2D Editor"
@@ -2104,9 +2392,8 @@ msgid "Inclusive"
msgstr "Inclusif"
#: editor/editor_profiler.cpp
-#, fuzzy
msgid "Self"
-msgstr "Soi-même"
+msgstr "Soi"
#: editor/editor_profiler.cpp
#, fuzzy
@@ -2133,6 +2420,16 @@ msgstr "Ré-importation"
msgid "Re-Import Changed Resources"
msgstr "Ré-importer les ressources modifiées"
+#: 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 "Écrivez votre code dans la méthode _run()."
@@ -2194,9 +2491,8 @@ msgid "(Missing)"
msgstr "(Manquant)"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "(Current)"
-msgstr "Actuel :"
+msgstr "(Actuel)"
#: editor/export_template_manager.cpp
msgid "Remove template version '%s'?"
@@ -2284,10 +2580,28 @@ msgid "Cannot navigate to '"
msgstr "Ne peux pas acceder à '"
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "Enregistrer et ré-importer"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "Source :"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr "Fichiers source et destination identiques, rien à faire."
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr "Chemins source et destination identiques, rien à faire."
@@ -2296,6 +2610,20 @@ msgid "Can't move directories to within themselves."
msgstr "Impossible de déplacer des répertoires vers eux-mêmes."
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Erreur de chargement d'image :"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Erreur d'importation :"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr "Impossible d'opérer sur « .. »"
@@ -2375,6 +2703,12 @@ msgstr ""
"sélectionné."
#: editor/filesystem_dock.cpp
+msgid ""
+"Scanning Files,\n"
+"Please Wait.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Move"
msgstr "Déplacer"
@@ -2386,10 +2720,31 @@ msgstr "Ajouter au groupe"
msgid "Remove from Group"
msgstr "Supprimer du groupe"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+msgstr "Importation de la scène…"
+
+#: 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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "Importer une scène 3D"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2429,6 +2784,14 @@ msgid "Saving.."
msgstr "Enregistrement…"
#: 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
#, fuzzy
msgid " Files"
msgstr "Fichier"
@@ -2625,6 +2988,10 @@ msgstr "Maillage(s) source :"
msgid "Mesh"
msgstr "Maillage"
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "Surface %d"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr "Pas d'échantillons à importer !"
@@ -3220,6 +3587,11 @@ msgid "New name:"
msgstr "Nouveau nom :"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Modifier les filtres de nœud"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr "Échelle :"
@@ -3536,6 +3908,7 @@ msgstr "Rendre la sélection des enfants de l'objet de nouveau possible."
#: 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Modifier"
@@ -3568,10 +3941,6 @@ msgid "Use Pixel Snap"
msgstr "Aligner au pixel près"
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr "Étendre au parent"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr "Squelette…"
@@ -3684,11 +4053,6 @@ msgstr ""
msgid "Change default type"
msgstr "Changer la valeur par défaut"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "OK"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3728,6 +4092,14 @@ msgstr "Modifier le polygone (supprimer un point)"
msgid "Create a new polygon from scratch."
msgstr "Créer un nouveau polygone à partir de rien."
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr "Créer un Poly3D"
@@ -3768,6 +4140,21 @@ msgstr "Mettre à jour depuis la scène"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Modify Curve Point"
+msgstr "Modifier la carte de courbes"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "Modifier la carte de courbes"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Load Curve Preset"
+msgstr "Charger une ressource"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Add point"
msgstr "Ajouter une entrée"
@@ -3778,13 +4165,31 @@ msgstr "Supprimer le chemin du point"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Left linear"
+msgstr "Linéaire"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Right linear"
+msgstr "Vue de droite"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Load preset"
msgstr "Charger une ressource"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
-msgid "Modify Curve"
-msgstr "Modifier la carte de courbes"
+msgid "Remove Curve Point"
+msgstr "Supprimer le chemin du point"
+
+#: 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"
@@ -3808,6 +4213,12 @@ msgid "Item List Editor"
msgstr "Éditeur de listes d'objets"
#: 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 "Créer un polygone occulteur"
@@ -4067,21 +4478,20 @@ msgstr "Peupler"
#: editor/plugins/navigation_polygon_editor_plugin.cpp
msgid "Create Navigation Polygon"
-msgstr "Créer un polygone de navigation"
+msgstr "Créer Polygone de Navigation"
#: editor/plugins/navigation_polygon_editor_plugin.cpp
msgid "Remove Poly And Point"
-msgstr "Supprimer le polygone et le point"
+msgstr "Retirer Polygone et Point"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Clear Emission Mask"
-msgstr "Effacer le masque d'émission"
+msgstr "Effacer Masque d'Émission"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generating AABB"
-msgstr "Générer un AABB"
+msgstr "Générer AABB"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
@@ -4089,11 +4499,11 @@ msgstr ""
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Error loading image:"
-msgstr "Erreur de chargement de l'image :"
+msgstr "Erreur de chargement d'image :"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "No pixels with transparency > 128 in image.."
-msgstr "Pas de pixels avec une transparence > 128 dans l'image…"
+msgstr "Pas de pixels avec transparence > 128 dans l'image.."
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Set Emission Mask"
@@ -4101,21 +4511,26 @@ msgstr "Définir le masque d'émission"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generate Visibility Rect"
-msgstr ""
+msgstr "Générer Rect de Visibilité"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
-msgstr "Charger le masque d'émission"
+msgstr "Charger Masque d'Émission"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
+msgid "Particles"
+msgstr "Vertex"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
-msgstr "Compte de points générés :"
+msgstr "Compte de Points Générés :"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generation Time (sec):"
-msgstr "Temps moyen (seconde)"
+msgstr "Temps de Génération (sec):"
#: editor/plugins/particles_2d_editor_plugin.cpp
#, fuzzy
@@ -4123,88 +4538,83 @@ msgid "Emission Mask"
msgstr "Définir le masque d'émission"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Capture from Pixel"
-msgstr "Créer depuis la scène"
+msgstr "Capturer depuis Pixel"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Emission Colors"
-msgstr "Positions d'émission :"
+msgstr "Couleurs d'Émission"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Node does not contain geometry."
-msgstr "Le nœud ne contient pas de géométrie."
+msgstr "Nœud ne contient pas de géométrie."
#: editor/plugins/particles_editor_plugin.cpp
msgid "Node does not contain geometry (faces)."
-msgstr "Le nœud ne contient pas de géométrie (faces)."
+msgstr "Nœud ne contient pas de géométrie (faces)."
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "A processor material of type 'ParticlesMaterial' is required."
-msgstr ""
+msgstr "Un matériel processeur de type 'ParticlesMaterial' est requis."
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "Faces contain no area!"
-msgstr "Les faces n'ont pas de surface !"
+msgstr "Faces ne contiennent pas de zone!"
#: editor/plugins/particles_editor_plugin.cpp
msgid "No faces!"
-msgstr "Pas de faces !"
+msgstr "Pas de faces!"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate AABB"
-msgstr "Générer un AABB"
+msgstr "Générer AABB"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Create Emission Points From Mesh"
-msgstr "Créer un émetteur à partir d'un maillage"
+msgstr "Créer Points d'Émission depuis Maillage"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Create Emission Points From Node"
-msgstr "Créer un émetteur à partir d'un nœud"
+msgstr "Créer Points d'Émission Depuis Noeud"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Clear Emitter"
-msgstr "Effacer l'émetteur"
+msgstr "Effacer l'Émetteur"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emitter"
-msgstr "Créer un émetteur"
+msgstr "Créer Émetteur"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Emission Points:"
-msgstr "Positions d'émission :"
+msgstr "Points d'Émission:"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Surface Points"
-msgstr "Surface %d"
+msgstr "Points de Surface"
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "Surface Points+Normal (Directed)"
-msgstr ""
+msgstr "Points de Surface+Normale (Dirigée)"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Volume"
msgstr "Volume"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Emission Source: "
-msgstr "Remplissage d'émission :"
+msgstr "Source d'Émission: "
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generate Visibility AABB"
-msgstr "Générer un AABB"
+msgstr "Générer AABB de Visibilité"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
-msgstr "Supprimer le point d'une courbe"
+msgstr "Supprimer Point de la Courbe"
#: editor/plugins/path_2d_editor_plugin.cpp
#, fuzzy
@@ -4439,6 +4849,12 @@ msgid "Clear Recent Files"
msgstr "Effacer les os"
#: 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 "Erreur d'enregistrement du thème"
@@ -4463,6 +4879,10 @@ msgid "Save Theme As.."
msgstr "Enregistrer le thème sous…"
#: editor/plugins/script_editor_plugin.cpp
+msgid " Class Reference"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Next script"
msgstr "Script suivant"
@@ -4516,6 +4936,11 @@ msgid "Close All"
msgstr "Fermer tout"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Scripts Panel"
+msgstr "Basculer le favori"
+
+#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Find.."
@@ -4548,6 +4973,11 @@ msgid "Keep Debugger Open"
msgstr "Garder le débogueur ouvert"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "Ouvrir dans l'éditeur"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr "Fenêtre"
@@ -4617,6 +5047,10 @@ msgstr ""
"qui ils appartiennent est ouverte"
#: 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 "Prélever une couleur"
@@ -4664,6 +5098,11 @@ msgid "Move Down"
msgstr "Déplacer vers le bas"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Supprimer le point"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr "Indenter vers la gauche"
@@ -4970,37 +5409,6 @@ msgid "Animation Key Inserted."
msgstr "Clé d'animation insérée."
#: 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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "Avancer"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "À l'envers"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "Molette vers le bas."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -5068,10 +5476,64 @@ msgid "Audio Listener"
msgstr "Écouteur audio"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Doppler Enable"
+msgstr "Activer"
+
+#: 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
+#, fuzzy
+msgid "Freelook Forward"
+msgstr "Avancer"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Backwards"
+msgstr "À l'envers"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Down"
+msgstr "Molette vers le bas."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "preview"
+msgstr "Aperçu"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr "Dialogue XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "Sélectionner le mode"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid ""
+"Drag: Rotate\n"
+"Alt+Drag: Move\n"
+"Alt+RMB: Depth list selection"
+msgstr "Alt + Bouton droit : sélection détaillée par liste"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode (W)"
msgstr "Move déplacement (W)"
@@ -5192,6 +5654,7 @@ msgid "View Grid"
msgstr "Afficher la grille"
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "Paramètres"
@@ -5268,8 +5731,9 @@ msgid "Resource clipboard is empty or not a texture!"
msgstr "Le presse-papiers des ressources est vide ou n'est pas une texture !"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
msgid "Paste Frame"
-msgstr "Coller une image"
+msgstr "Coller Frame"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Add Empty"
@@ -5320,6 +5784,11 @@ msgid "StyleBox Preview:"
msgstr "Aperçu de la StyleBox :"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
+msgid "Set Region Rect"
+msgstr "Région de texture"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
msgstr "Mode d'aimantation :"
@@ -5378,6 +5847,16 @@ msgid "Remove Item"
msgstr "Supprimer l'item"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Supprimer des items de classe"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Supprimer"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr "Thème"
@@ -5445,7 +5924,7 @@ msgstr "Onglet 2"
msgid "Tab 3"
msgstr "Onglet 3"
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr "Type :"
@@ -5467,12 +5946,27 @@ msgid "Color"
msgstr "Couleur"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Supprimer la sélection"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr "Peindre sur la TileMap"
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "Dupliquer"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "Linéaire"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Bucket Fill"
+msgstr "Seau"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5507,10 +6001,6 @@ msgid "Pick Tile"
msgstr "Sélectionner une case"
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr "Sélectionner"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr "Tourner de 0 degrés"
@@ -5574,7 +6064,7 @@ msgstr "Supprimer les fichiers sélectionnés ?"
msgid "Presets"
msgstr "Pré-réglage…"
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "Ajouter…"
@@ -5633,6 +6123,24 @@ msgid "Make Patch"
msgstr "Chemin de destination :"
#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "Texture"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "Liste des méthodes :"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr "Exporter le PCK/ZIP"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5677,10 +6185,6 @@ msgstr ""
"Quelle action doit être prise ? :"
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr "Paquetage installé avec succès !"
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "Importer un projet existant"
@@ -5728,6 +6232,23 @@ msgstr "Voulez-vous vraiment ouvrir plus d'un projet à la fois ?"
#: 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 ""
+"Aucune scène principale n'a jamais été définie, en sélectionner une ?\n"
+"Vous pouvez la modifier ultérieurement dans les « Paramètres du projet » "
+"dans la catégorie « application »."
+
+#: 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
+#, fuzzy
msgid "Are you sure to run more than one project?"
msgstr "Voulez-vous vraiment lancer plus d'un projet à la fois ?"
@@ -5745,10 +6266,6 @@ msgstr ""
"existants. Est-ce que vous confirmez ?"
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr "Gestionnaire de projets"
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr "Liste des projets"
@@ -5777,258 +6294,292 @@ msgstr "Supprimer l'item"
msgid "Exit"
msgstr "Quitter"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Connection impossible."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "Touche "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr "Bouton de joystick"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr "Axe de joystick"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr "Bouton de souris"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr "Action invalide (tout passe, sauf « / » ou « : »)."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr "L'action « %s » existe déjà !"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr "Renommer l'événement d'action d'entrée"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr "Ajouter un événement d'action d'entrée"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Méta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Maj+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr "Contrôle+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "Appuyez sur une touche…"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr "Index du bouton de la souris :"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr "Bouton gauche"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr "Bouton droite"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr "Bouton du milieu"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr "Molette vers le haut"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr "Molette vers le bas"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr "Bouton 6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr "Bouton 7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr "Bouton 8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr "Bouton 9"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Changer"
+
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Axis Index:"
msgstr "Index de l'axe du joystick :"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "Axe"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Button Index:"
msgstr "Index du bouton du joystick :"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr "Ajouter une action d'entrée"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr "Effacer l'événement d'action d'entrée"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Add Event"
msgstr "Ajouter vide"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "Périphérique"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Bouton"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "Bouton gauche."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "Bouton droite."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "Bouton du milieu."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "Molette vers le haut."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "Molette vers le bas."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Ajouter une propriété accesseur"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "No property '"
+msgstr "Propriété :"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "Paramètres"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "Supprimer l'entrée"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "Erreur d'enregistrement des paramètres."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "Paramètres enregistrés avec succès."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr "Ajouter une traduction"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "Supprimer la traduction"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr "Ajouter un chemin remappé"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Paramètres du projet (engine.cfg)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr "Général"
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr "Propriété :"
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr "Supprimer"
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr "Copier vers la plate-forme…"
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
+msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr "Contrôles"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr "Action :"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr "Périphérique :"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr "Index :"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr "Localisation"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr "Traductions"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr "Traductions :"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr "Remaps"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr "Ressources :"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr "Remaps par langue :"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr "Langue"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "AutoLoad"
@@ -6070,6 +6621,11 @@ msgid "Assign"
msgstr "Assigner"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Sélectionner un nœud"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr "Nouveau script"
@@ -6084,6 +6640,11 @@ msgstr "Erreur de chargement du fichier : ce n'est pas une ressource !"
#: editor/property_editor.cpp
#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "Sélectionner les nœuds à importer"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "Pick a Node"
msgstr "Sélectionner un nœud"
@@ -6180,6 +6741,11 @@ msgstr "Arguments de la scène principale :"
msgid "Scene Run Settings"
msgstr "Paramètres d'exécution de la scène"
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "OK"
+
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
msgstr "Aucun parent dans lequel instancier les scènes."
@@ -6225,10 +6791,6 @@ msgid "Delete Node(s)?"
msgstr "Supprimer le(s) nœud(s) ?"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "Cette opération ne peut être réalisée sans une scène."
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6241,6 +6803,18 @@ msgid "Save New Scene As.."
msgstr "Enregistrer la nouvelle scène sous…"
#: editor/scene_tree_dock.cpp
+msgid "Editable Children"
+msgstr "Enfants modifiables"
+
+#: editor/scene_tree_dock.cpp
+msgid "Load As Placeholder"
+msgstr "Charger en tant que fictif"
+
+#: editor/scene_tree_dock.cpp
+msgid "Discard Instancing"
+msgstr "Abandonner l'instanciation"
+
+#: editor/scene_tree_dock.cpp
msgid "Makes Sense!"
msgstr "C'est sensé !"
@@ -6286,6 +6860,14 @@ msgid "Edit Connections"
msgstr "Modifier les connexions"
#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance"
+msgstr "Effacer l'héritage"
+
+#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
+msgid "Open in Editor"
+msgstr "Ouvrir dans l'éditeur"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)"
msgstr "Supprimer nœud(s)"
@@ -6341,6 +6923,11 @@ msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "Filter nodes"
+msgstr "Filtres"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Attach a new or existing script for the selected node."
msgstr "Créer un nouveau script pour le nœud sélectionné."
@@ -6349,6 +6936,14 @@ msgstr "Créer un nouveau script pour le nœud sélectionné."
msgid "Clear a script for the selected node."
msgstr "Créer un nouveau script pour le nœud sélectionné."
+#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance? (No Undo!)"
+msgstr "Effacer l'héritage ? (Pas de retour en arrière !)"
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear!"
+msgstr "Effacer !"
+
#: editor/scene_tree_editor.cpp
msgid "Toggle Spatial Visible"
msgstr "Afficher/cacher le Spatial"
@@ -6380,11 +6975,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "Options de débogage"
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr "Instance :"
@@ -6423,32 +7013,8 @@ msgid "Scene Tree (Nodes):"
msgstr "Arbre de scène (nœuds) :"
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr "Enfants modifiables"
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr "Charger en tant que fictif"
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr "Abandonner l'instanciation"
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr "Ouvrir dans l'éditeur"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr "Effacer l'héritage"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr "Effacer l'héritage ? (Pas de retour en arrière !)"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr "Effacer !"
+msgid "Node Configuration Warning!"
+msgstr ""
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -6456,6 +7022,11 @@ msgstr "Sélectionner un nœud"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Erreur de chargement d'image :"
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "Impossible de créer le script dans le système de fichiers."
@@ -6465,6 +7036,10 @@ msgid "Error loading script from %s"
msgstr "Erreur de chargement de la scène depuis %s"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "N/A"
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "Le chemin est vide"
@@ -6508,10 +7083,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr "N/A"
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6683,6 +7254,10 @@ msgid "Change Light Radius"
msgstr "Changer le rayon d'une lumière"
#: editor/spatial_editor_gizmos.cpp
+msgid "Change AudioStreamPlayer3D Emission Angle"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
msgstr "Changer le champ de vision d'une caméra"
@@ -6770,6 +7345,137 @@ msgid "Invalid instance dictionary (invalid subclasses)"
msgstr ""
"Instance invalide pour le format de dictionnaire (sous-classes invalides)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Supprimer la selection"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Dupliquer la sélection"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Snap View"
+msgstr "Vue de dessus"
+
+#: 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
+#, fuzzy
+msgid "Clip Disabled"
+msgstr "Désactivé"
+
+#: 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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "Contrôle: Tourner"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "Contrôle: Tourner"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Z"
+msgstr "Contrôle: Tourner"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "Créer un nouveau"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "Créer un nouveau projet"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Area"
+msgstr "Supprimer la TileMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Sélection uniquement"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Sélection uniquement"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "Paramètres d'alignement"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "Instance :"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "Fichier"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6809,6 +7515,31 @@ msgid "Stack overflow with stack depth: "
msgstr "Débordement de pile avec profondeur de pile: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Modifier les arguments du signal :"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Modifier type de valeur du tableau"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Changer le nom de l'entrée"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Default Value"
+msgstr "Changer la valeur par défaut"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Modifier la variable :"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Fonctions :"
@@ -6849,26 +7580,6 @@ msgid "Add Signal"
msgstr "Ajouter un signal"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Supprimer la fonction"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Supprimer la variable"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Modification de la variable :"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Supprimer le signal"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "Modification du signal :"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
msgstr "Changer l'expression"
@@ -6877,6 +7588,16 @@ msgid "Add Node"
msgstr "Ajouter un nœud"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Supprimer les clés invalides"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Duplicate VisualScript Nodes"
+msgstr "Dupliquer le(s) nœud(s) de graphe"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
"Maintenir Meta pour déposer un accesseur. Maintenir Maj pour déposer une "
@@ -6921,6 +7642,26 @@ msgid "Add Setter Property"
msgstr "Ajouter une propriété mutateur"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "Changer le type"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Supprimer le(s) nœud(s)"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Supprimer le nœud de graphe Shader"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Connecter au nœud :"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "Condition"
@@ -6949,6 +7690,56 @@ msgid "Get"
msgstr "Récupérer"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Changer le nom de l'entrée"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "Impossible d'opérer sur « .. »"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "Le presse-papiers des ressources est vide !"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Coller les nœuds"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Supprimer la fonction"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Modifier la variable :"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Supprimer la variable"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Modification du signal :"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Supprimer le signal"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Modification de la variable :"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "Modification du signal :"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "Type de base :"
@@ -6969,10 +7760,6 @@ msgid "Edit Variable:"
msgstr "Modifier la variable :"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Changer"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Supprimer la selection"
@@ -7050,14 +7837,6 @@ msgstr ""
"La valeur retournée par _step() est invalide, elle doit être un entier (seq "
"out), ou une chaîne (erreur)."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "vient d'être appuyé"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "vient d'être relâché"
-
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Run in Browser"
@@ -7082,88 +7861,6 @@ msgstr "Impossible de trouver la tuile :"
msgid "Could not open template for export:\n"
msgstr "Impossible de créer le dossier."
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-"Le fichier certificat n'a pas pu être lu. Le chemin et le mot de passe sont-"
-"ils tous deux corrects ?"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "Erreur en créant la signature de l'objet."
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr "Erreur en créant la signature du paquet."
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"Aucun modèle d'export n'a été trouvé.\n"
-"Téléchargez et installez des modèles d'export."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr "Le paquet personnalisé de débogage n'a pas été trouvé."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr "Le paquet personnalisé de parution n'a pas été trouvé."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr "Nom unique invalide."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr "GUID de produit invalide."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr "GUID d'éditeur invalide."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "Couleur d'arrière-plan invalide."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "Dimensions de l'image incorrectes (devraient être 50x50)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-"Dimensions d'image de logo carré 44x44 invalides (devraient être 44x44)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-"Dimensions d'image de logo carré 71x71 invalides (devraient être 71x71)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-"Dimensions d'image de logo carré 150x150 invalides (devraient être 150x150)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-"Dimensions d'image de logo carré 310x310 invalides (devraient être 310x310)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-"Dimensions d'image de logo large 310x150 invalides (devraient être 310x150)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-"Dimensions d'image d'écran de démarrage invalides (devraient être 620x300)."
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7269,6 +7966,13 @@ msgstr ""
"Un PathFollow2D fonctionne seulement quand défini comme un enfant d'un nœud "
"Path2D."
+#: 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 ""
@@ -7299,22 +8003,33 @@ msgstr ""
"Un VisibilityEnable2D fonctionne mieux lorsqu'il est directement enfant du "
"nœud racine de la scène."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"The controller id must not be 0 or this controller will not be bound to an "
+"actual controller"
msgstr ""
-"Un CollisionShape n'est utile que lorsqu'il est enfant d'un nœud dérivé de "
-"CollisionObject, comme Area, StaticBody, RigidBody, KinematicBody, etc."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRAnchor must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"Afin qu'une CollisionShape fonctionne, il lui faut une forme. Créez une "
-"ressource de forme pour cette CollisionShape !"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7329,6 +8044,23 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "Un CollisionPolygon vide n'a pas d'effet sur les collisions."
+#: 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 ""
+"Un CollisionShape n'est utile que lorsqu'il est enfant d'un nœud dérivé de "
+"CollisionObject, comme Area, StaticBody, RigidBody, KinematicBody, etc."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"Une CollisionShape nécessite une forme pour fonctionner. Créez une ressource "
+"de forme pour cette CollisionShape !"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7348,6 +8080,13 @@ 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 ""
@@ -7370,8 +8109,8 @@ msgstr ""
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
-msgstr "Mode d'exécution :"
+msgid "Raw Mode"
+msgstr "Mode navigation"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
@@ -7385,22 +8124,6 @@ msgstr "Alerte !"
msgid "Please Confirm..."
msgstr "Veuillez confirmer…"
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Ouvrir un fichier"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Ouvrir un ou plusieurs fichiers"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Ouvrir un répertoire"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Ouvrir un fichier ou un répertoire"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7423,7 +8146,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7441,6 +8164,109 @@ msgstr ""
"nœud de type Control afin qu'il en obtienne une taille. Sinon, faites-en une "
"RenderTarget et assignez sa texture à un nœud pouvant l'afficher."
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "Fermer la scène ? (les modifications non sauvegardées seront perdues)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "Ouvrir le gestionnaire de projets ?\n"
+#~ "(les modifications non sauvegardées seront perdues)"
+
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "Fermer, aller à la scène précédente"
+
+#~ msgid "Expand to Parent"
+#~ msgstr "Étendre au parent"
+
+#~ msgid "Del"
+#~ msgstr "Supprimer"
+
+#~ msgid "Copy To Platform.."
+#~ msgstr "Copier vers la plate-forme…"
+
+#~ msgid "just pressed"
+#~ msgstr "vient d'être appuyé"
+
+#~ msgid "just released"
+#~ msgstr "vient d'être relâché"
+
+#, fuzzy
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr ""
+#~ "Le fichier certificat n'a pas pu être lu. Le chemin et le mot de passe "
+#~ "sont-ils tous deux corrects ?"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "Erreur en créant la signature de l'objet."
+
+#~ msgid "Error creating the package signature."
+#~ msgstr "Erreur en créant la signature du paquet."
+
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "Aucun modèle d'export n'a été trouvé.\n"
+#~ "Téléchargez et installez des modèles d'export."
+
+#~ msgid "Custom debug package not found."
+#~ msgstr "Le paquet personnalisé de débogage n'a pas été trouvé."
+
+#~ msgid "Custom release package not found."
+#~ msgstr "Le paquet personnalisé de parution n'a pas été trouvé."
+
+#~ msgid "Invalid unique name."
+#~ msgstr "Nom unique invalide."
+
+#~ msgid "Invalid product GUID."
+#~ msgstr "GUID de produit invalide."
+
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "GUID d'éditeur invalide."
+
+#~ msgid "Invalid background color."
+#~ msgstr "Couleur d'arrière-plan invalide."
+
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr "Dimensions de l'image incorrectes (devraient être 50x50)."
+
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr ""
+#~ "Dimensions d'image de logo carré 44x44 invalides (devraient être 44x44)."
+
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr ""
+#~ "Dimensions d'image de logo carré 71x71 invalides (devraient être 71x71)."
+
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr ""
+#~ "Dimensions d'image de logo carré 150x150 invalides (devraient être "
+#~ "150x150)."
+
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr ""
+#~ "Dimensions d'image de logo carré 310x310 invalides (devraient être "
+#~ "310x310)."
+
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr ""
+#~ "Dimensions d'image de logo large 310x150 invalides (devraient être "
+#~ "310x150)."
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr ""
+#~ "Dimensions d'image d'écran de démarrage invalides (devraient être "
+#~ "620x300)."
+
+#, fuzzy
+#~ msgid "RAW Mode"
+#~ msgstr "Mode d'exécution :"
+
#~ msgid "Node From Scene"
#~ msgstr "Nœud à partir d'une scène"
@@ -7526,9 +8352,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "%d occurrence(s) remplacée(s)."
-#~ msgid "Please save the scene first."
-#~ msgstr "Veuillez enregistrer la scène d'abord."
-
#~ msgid "Save Translatable Strings"
#~ msgstr "Enregistrer les chaînes traduisibles"
@@ -7732,9 +8555,6 @@ msgstr ""
#~ msgid "Script Encryption Key (256-bits as hex):"
#~ msgstr "Clé de chiffrement des scripts (256 bits en hexadécimal) :"
-#~ msgid "Export PCK/Zip"
-#~ msgstr "Exporter le PCK/ZIP"
-
#~ msgid "Export Project PCK"
#~ msgstr "Exporter le PCK du projet"
diff --git a/editor/translations/hu.po b/editor/translations/hu.po
index d6f3caa1e9..d21541c339 100644
--- a/editor/translations/hu.po
+++ b/editor/translations/hu.po
@@ -145,7 +145,8 @@ msgstr ""
msgid "Goto Prev Step"
msgstr ""
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr ""
@@ -377,7 +378,8 @@ msgstr ""
msgid "Description:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -388,9 +390,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 ""
@@ -463,7 +465,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -524,17 +526,16 @@ msgid "All"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr ""
@@ -550,7 +551,7 @@ msgstr ""
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -562,7 +563,7 @@ msgstr ""
msgid "Reverse"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr ""
@@ -714,14 +715,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr ""
@@ -826,7 +827,7 @@ msgid "Resource"
msgstr ""
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr ""
@@ -906,12 +907,178 @@ msgstr ""
msgid "Delete selected files?"
msgstr ""
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Authors"
+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 "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
+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 "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+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 "Move Audio Bus"
+msgstr ""
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -925,21 +1092,44 @@ 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/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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: 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
@@ -1042,6 +1232,10 @@ 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 ""
@@ -1119,6 +1313,22 @@ msgstr ""
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
@@ -1244,6 +1454,14 @@ msgid "Signals:"
msgstr ""
#: editor/editor_help.cpp
+msgid "Enumerations:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr ""
@@ -1260,7 +1478,7 @@ msgid "Search Text"
msgstr ""
#: editor/editor_log.cpp
-msgid " Output:"
+msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1310,6 +1528,10 @@ 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 ""
@@ -1428,11 +1650,11 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
+msgid "Save & Close"
msgstr ""
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
@@ -1444,23 +1666,27 @@ msgid "No"
msgstr ""
#: editor/editor_node.cpp
-msgid "This scene has never been saved. Save before running?"
+msgid "Yes"
msgstr ""
#: editor/editor_node.cpp
-msgid "Export Mesh Library"
+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 Tile Set"
+msgid "Export Mesh Library"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
+msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Exit the editor?"
+msgid "This operation can't be done without a selected node."
msgstr ""
#: editor/editor_node.cpp
@@ -1484,9 +1710,27 @@ msgid "Quick Run Scene.."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+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
@@ -1494,6 +1738,22 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1526,6 +1786,11 @@ msgstr ""
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 ""
@@ -1542,6 +1807,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr ""
@@ -1590,10 +1859,6 @@ msgstr ""
msgid "Close Scene"
msgstr ""
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1873,6 +2138,10 @@ msgstr ""
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1882,26 +2151,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr ""
@@ -1922,9 +2175,17 @@ 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 ""
@@ -2025,6 +2286,16 @@ msgstr ""
msgid "Re-Import Changed Resources"
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 ""
@@ -2160,10 +2431,26 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Source: "
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2172,6 +2459,18 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving file:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving dir:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2248,6 +2547,12 @@ 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 ""
@@ -2259,9 +2564,28 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Single Scene"
+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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2301,6 +2625,14 @@ 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 ""
@@ -2487,6 +2819,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3068,6 +3404,10 @@ 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 ""
@@ -3379,6 +3719,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr ""
@@ -3411,10 +3752,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3523,11 +3860,6 @@ msgstr ""
msgid "Change default type"
msgstr ""
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr ""
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3565,6 +3897,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3604,6 +3944,18 @@ msgid "Update from Scene"
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 ""
@@ -3612,11 +3964,27 @@ 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 "Modify Curve"
+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
@@ -3641,6 +4009,12 @@ 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 ""
@@ -3930,6 +4304,11 @@ 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 ""
@@ -4246,6 +4625,12 @@ 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 ""
@@ -4270,6 +4655,10 @@ 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 ""
@@ -4322,6 +4711,10 @@ msgid "Close All"
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.."
@@ -4354,6 +4747,10 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+msgid "Debug with external editor"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4417,6 +4814,10 @@ msgid ""
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 ""
@@ -4463,6 +4864,10 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+msgid "Delete Line"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4767,91 +5172,99 @@ msgid "Animation Key Inserted."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
+msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
+msgid "Material Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Forward"
+msgid "Shader Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Backwards"
+msgid "Surface Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
+msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Down"
+msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
+msgid "Align with view"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
+msgid "Display Normal"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Material Changes"
+msgid "Display Wireframe"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Shader Changes"
+msgid "Display Overdraw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Surface Changes"
+msgid "Display Unshaded"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
+msgid "View Environment"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
+msgid "View Gizmos"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "View Information"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
+msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
+msgid "Doppler Enable"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
+msgid "Freelook Left"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
+msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
+msgid "Freelook Forward"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
+msgid "Freelook Backwards"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
+msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
+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
@@ -4859,6 +5272,17 @@ 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 ""
@@ -4975,6 +5399,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr ""
@@ -5103,6 +5528,10 @@ 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 ""
@@ -5160,6 +5589,14 @@ 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 "Theme"
msgstr ""
@@ -5227,7 +5664,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5249,11 +5686,23 @@ 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 editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: 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
@@ -5289,10 +5738,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5352,7 +5797,7 @@ msgstr ""
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5399,6 +5844,22 @@ 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 ""
@@ -5435,10 +5896,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5483,6 +5940,19 @@ 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 ""
@@ -5497,10 +5967,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5528,254 +5994,283 @@ msgstr ""
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+msgid "Can't run project"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: 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.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Add Global Property"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Select an 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 "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr ""
-
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5816,6 +6311,10 @@ msgid "Assign"
msgstr ""
#: editor/property_editor.cpp
+msgid "Select Node"
+msgstr ""
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr ""
@@ -5828,6 +6327,10 @@ 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 ""
@@ -5923,6 +6426,11 @@ msgstr ""
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 ""
@@ -5966,10 +6474,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -5982,6 +6486,18 @@ 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 ""
@@ -6024,6 +6540,14 @@ msgid "Edit Connections"
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 ""
@@ -6074,6 +6598,10 @@ msgid ""
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 ""
@@ -6081,6 +6609,14 @@ msgstr ""
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 ""
@@ -6112,10 +6648,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6152,35 +6684,15 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Select a Node"
msgstr ""
-#: editor/scene_tree_editor.cpp
-msgid "Select a Node"
+#: editor/script_create_dialog.cpp
+msgid "Error loading template '%s'"
msgstr ""
#: editor/script_create_dialog.cpp
@@ -6192,6 +6704,10 @@ 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 ""
@@ -6232,10 +6748,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6400,6 +6912,10 @@ 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 ""
@@ -6481,6 +6997,122 @@ msgstr ""
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 "GridMap Paint"
+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/gridmap/grid_map_editor_plugin.cpp
+msgid "Tiles"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6512,63 +7144,63 @@ msgid "Stack overflow with stack depth: "
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Functions:"
+msgid "Change Signal Arguments"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Variables:"
+msgid "Change Argument Type"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Name is not a valid identifier:"
+msgid "Change Argument name"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Name already in use by another func/var/signal:"
+msgid "Set Variable Default Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Function"
+msgid "Set Variable Type"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Variable"
+msgid "Functions:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Signal"
+msgid "Variables:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Function"
+msgid "Name is not a valid identifier:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Variable"
+msgid "Name already in use by another func/var/signal:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Signal"
+msgid "Rename Function"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
+msgid "Rename Variable"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
+msgid "Rename Signal"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
+msgid "Add Function"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
+msgid "Add Variable"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
+msgid "Add Signal"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
@@ -6580,6 +7212,14 @@ 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 ""
@@ -6620,6 +7260,22 @@ 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 ""
@@ -6648,6 +7304,50 @@ msgid "Get"
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 ""
@@ -6668,10 +7368,6 @@ msgid "Edit Variable:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr ""
@@ -6745,14 +7441,6 @@ msgid ""
"(error)."
msgstr ""
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6773,77 +7461,6 @@ msgstr ""
msgid "Could not open template for export:\n"
msgstr ""
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -6922,6 +7539,13 @@ msgstr ""
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 ""
@@ -6944,17 +7568,32 @@ msgid ""
"as parent."
msgstr ""
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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
@@ -6968,6 +7607,19 @@ msgstr ""
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 ""
@@ -6983,6 +7635,13 @@ 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 ""
@@ -6999,7 +7658,7 @@ msgid ""
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7014,22 +7673,6 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr ""
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr ""
@@ -7048,7 +7691,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
diff --git a/editor/translations/id.po b/editor/translations/id.po
index 15221690f2..6fbf6fabde 100644
--- a/editor/translations/id.po
+++ b/editor/translations/id.po
@@ -163,7 +163,8 @@ msgstr "Lanjut ke Langkah Berikutnya"
msgid "Goto Prev Step"
msgstr "Lanjut ke Langkah Sebelumnya"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "Linier"
@@ -404,7 +405,8 @@ msgstr "File:"
msgid "Description:"
msgstr "Deskripsi:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -415,9 +417,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Tutup"
@@ -493,7 +495,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -557,17 +559,16 @@ msgid "All"
msgstr "Semua"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "Cari:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "Cari"
@@ -583,7 +584,7 @@ msgstr "Cari"
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -595,7 +596,7 @@ msgstr "Sortir:"
msgid "Reverse"
msgstr "Terbalik"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "Kategori:"
@@ -751,14 +752,14 @@ msgstr "Sambungkan Ke Node:"
#: 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.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
msgstr "Tambah"
#: 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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "Hapus"
@@ -868,7 +869,7 @@ msgid "Resource"
msgstr "Resource"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "Path"
@@ -957,12 +958,187 @@ msgstr "Penjelajah Resource Orphan"
msgid "Delete selected files?"
msgstr "Hapus file yang dipilih?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Hapus"
+#: 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 "Authors"
+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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "Konstanta:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "Konstanta:"
+
+#: 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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "Mengimpor ulang"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+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
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Namai kembali Autoload"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Hapus yang Dipilih"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Hapus yang Dipilih"
+
+#: 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
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Hapus Penampilan"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Duplikat Pilihan"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "Pindahkan Kunci Tambah"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -976,23 +1152,47 @@ 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/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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+msgid "Save this Bus Layout to a file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+msgid "Load Default"
msgstr "Bawaan"
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nama tidak sah."
@@ -1096,6 +1296,11 @@ msgid "Updating scene.."
msgstr "Memperbaharui scene.."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "Mohon simpan scene terlebih dahulu."
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "Pilih sebuah Direktori"
@@ -1173,6 +1378,22 @@ msgstr "Semua File-file (*)"
msgid "Open"
msgstr "Buka"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Buka sebuah File"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Buka File (File-file)"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Buka sebuah Direktori"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Buka sebuah File atau Direktori"
+
#: 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
@@ -1302,6 +1523,15 @@ msgid "Signals:"
msgstr "Sinyal-sinyal:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Fungsi-fungsi:"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Konstanta:"
@@ -1319,7 +1549,8 @@ msgid "Search Text"
msgstr "Mencari Teks"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " Keluaran:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1370,6 +1601,11 @@ msgid "Creating Thumbnail"
msgstr "Membuat Thumbnail"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "This operation can't be done without a tree root."
+msgstr "Tindakan ini tidak dapat dibatalkan. Pulihkan saja?"
+
+#: editor/editor_node.cpp
msgid ""
"Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."
msgstr ""
@@ -1502,12 +1738,13 @@ msgid "Quick Open Script.."
msgstr "Buka Cepat Script.."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "Ya"
+#, fuzzy
+msgid "Save & Close"
+msgstr "Simpan sebuah File"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "Tutup scene? (Perubahan-perubahan yang belum disimpan akan hilang)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
@@ -1518,9 +1755,17 @@ msgid "No"
msgstr ""
#: editor/editor_node.cpp
+msgid "Yes"
+msgstr "Ya"
+
+#: editor/editor_node.cpp
msgid "This scene has never been saved. Save before running?"
msgstr "Scene ini belum pernah disimpan. Simpan sebelum menjalankan?"
+#: 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 "Ekspor Mesh Library"
@@ -1530,12 +1775,8 @@ msgid "Export Tile Set"
msgstr "Ekspor Tile Set"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "Keluar"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "Keluar editor?"
+msgid "This operation can't be done without a selected node."
+msgstr ""
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1558,18 +1799,51 @@ msgid "Quick Run Scene.."
msgstr "Jalankan Cepat Scene.."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "Keluar"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "Keluar editor?"
+
+#: editor/editor_node.cpp
+msgid "Open Project Manager?"
+msgstr ""
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Simpan sebuah File"
+
+#: 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 ""
-"Buka Manajer Proyek?\n"
-"(Perubahan yang tidak disimpan akan hilang)"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "Pilih sebuah Scene Utama"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1605,6 +1879,11 @@ msgstr "Simpan Penampilan"
msgid "Delete Layout"
msgstr "Hapus Penampilan"
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+msgid "Default"
+msgstr "Bawaan"
+
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
msgstr "Pilih Tab Scene"
@@ -1621,6 +1900,11 @@ msgstr "%d file atau folder lagi"
msgid "Distraction Free Mode"
msgstr "Mode Tanpa Gangguan"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "Mode Tanpa Gangguan"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "Suasana"
@@ -1669,10 +1953,6 @@ msgstr ""
msgid "Close Scene"
msgstr ""
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1955,6 +2235,10 @@ msgstr ""
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1964,26 +2248,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr ""
@@ -2004,9 +2272,18 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "New Inherited"
+msgstr "Scene Turunan Baru.."
+
+#: 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
#, fuzzy
msgid "Open 2D Editor"
@@ -2111,6 +2388,16 @@ msgstr "Mengimpor ulang"
msgid "Re-Import Changed Resources"
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 ""
@@ -2251,10 +2538,27 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "Resource"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2263,6 +2567,20 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Error menyimpan TileSet!"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Error memuat:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2339,6 +2657,12 @@ 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 ""
@@ -2350,9 +2674,29 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+msgstr "Memperbaharui Scene"
+
+#: 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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2392,6 +2736,14 @@ 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
#, fuzzy
msgid " Files"
msgstr "File:"
@@ -2581,6 +2933,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3164,6 +3520,11 @@ msgid "New name:"
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "File:"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr ""
@@ -3475,6 +3836,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Edit"
@@ -3507,10 +3869,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3620,11 +3978,6 @@ msgstr ""
msgid "Change default type"
msgstr "Ubah Tipe Nilai Array"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "Oke"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3662,6 +4015,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3701,6 +4062,18 @@ msgid "Update from Scene"
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
#, fuzzy
msgid "Add point"
msgstr "Tambahkan Sinyal"
@@ -3711,11 +4084,29 @@ msgid "Remove point"
msgstr "Hapus Sinyal"
#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Left linear"
+msgstr "Linier"
+
+#: 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 "Modify Curve"
+#, fuzzy
+msgid "Remove Curve Point"
+msgstr "Hapus Sinyal"
+
+#: 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
@@ -3740,6 +4131,12 @@ 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 ""
@@ -4030,6 +4427,11 @@ 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 ""
@@ -4347,6 +4749,12 @@ 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 ""
@@ -4371,6 +4779,10 @@ 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 ""
@@ -4424,6 +4836,11 @@ msgid "Close All"
msgstr "Tutup"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Scripts Panel"
+msgstr "Beralih Favorit"
+
+#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Find.."
@@ -4456,6 +4873,11 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "Editor Ketergantungan"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4520,6 +4942,10 @@ msgid ""
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 ""
@@ -4566,6 +4992,11 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Hapus"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4871,37 +5302,6 @@ msgid "Animation Key Inserted."
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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "Maju"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "Ke belakang"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "Scroll kebawah."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -4964,10 +5364,63 @@ msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Doppler Enable"
+msgstr "Aktifkan"
+
+#: 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
+#, fuzzy
+msgid "Freelook Forward"
+msgstr "Maju"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Backwards"
+msgstr "Ke belakang"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Down"
+msgstr "Scroll kebawah."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "preview"
+msgstr "Pratinjau:"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "Metode Publik:"
+
+#: 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 ""
@@ -5085,6 +5538,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr ""
@@ -5213,6 +5667,10 @@ 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 ""
@@ -5270,6 +5728,16 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Hapus Pilihan"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Hapus"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5337,7 +5805,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5359,11 +5827,25 @@ msgid "Color"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Beri Skala Seleksi"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr ""
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "Linier"
+
+#: 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
@@ -5399,10 +5881,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5465,7 +5943,7 @@ msgstr "Hapus file yang dipilih?"
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5513,6 +5991,23 @@ msgid "Make Patch"
msgstr ""
#: editor/project_export.cpp
+msgid "Features"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "Daftar Fungsi:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5550,10 +6045,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5598,6 +6089,23 @@ msgid "Are you sure to open more than one project?"
msgstr ""
#: 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 ""
+"Tidak ada scene utama yang pernah didefinisikan, pilih satu?\n"
+"Anda dapat mengubahnya nanti di akhir dalam \"Project Settings\" dibawah "
+"kategori 'application'."
+
+#: 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 ""
@@ -5612,10 +6120,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5644,256 +6148,289 @@ msgstr "Hapus Pilihan"
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Menyambungkan.."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Ubah"
+
+#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "Axis"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "Perangkat"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Tombol"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "Tombol Kiri."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "Tombol Kanan."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "Tombol Tengah."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
#, fuzzy
msgid "Wheel Up."
msgstr "Scroll keatas."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
#, fuzzy
msgid "Wheel Down."
msgstr "Scroll kebawah."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Tambahkan Properti Getter"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "No property '"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "Mengatur.."
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "Hapus"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr ""
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5935,6 +6472,11 @@ msgstr ""
#: editor/property_editor.cpp
#, fuzzy
+msgid "Select Node"
+msgstr "Metode Publik:"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "New Script"
msgstr "Scene Baru"
@@ -5947,6 +6489,10 @@ msgid "Error loading file: Not a resource!"
msgstr ""
#: editor/property_editor.cpp
+msgid "Selected node is not a Viewport!"
+msgstr ""
+
+#: editor/property_editor.cpp
#, fuzzy
msgid "Pick a Node"
msgstr "Path ke Node:"
@@ -6045,6 +6591,11 @@ msgstr ""
msgid "Scene Run Settings"
msgstr ""
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "Oke"
+
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
msgstr ""
@@ -6088,10 +6639,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6104,6 +6651,18 @@ 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 ""
@@ -6147,6 +6706,14 @@ msgid "Edit Connections"
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 ""
@@ -6200,6 +6767,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "Filter:"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr ""
@@ -6207,6 +6779,14 @@ msgstr ""
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 ""
@@ -6238,10 +6818,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6279,31 +6855,7 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
@@ -6312,6 +6864,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Error memuat font."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "Tidak dapat membuat folder."
@@ -6321,6 +6878,10 @@ msgid "Error loading script from %s"
msgstr "Error memuat font."
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr ""
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr ""
@@ -6363,10 +6924,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6537,6 +7094,10 @@ msgid "Change Light Radius"
msgstr "Ganti Radius Lampu"
#: editor/spatial_editor_gizmos.cpp
+msgid "Change AudioStreamPlayer3D Emission Angle"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
#, fuzzy
msgid "Change Camera FOV"
msgstr "Ganti FOV Kamera"
@@ -6621,6 +7182,129 @@ msgstr "Format kamus acuan tidak sah (skrip tidak sah pada @path)"
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "Kamus acuan tidak sah (sub kelas tidak sah)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Hapus yang Dipilih"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Duplikat Pilihan"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+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
+#, fuzzy
+msgid "Clip Disabled"
+msgstr "Dinonaktifkan"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "Buat Baru"
+
+#: 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
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Hanya yang Dipilih"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Hanya yang Dipilih"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Settings"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Pick Distance:"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "File:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6660,6 +7344,30 @@ msgid "Stack overflow with stack depth: "
msgstr "Tumpukan melimpah dengan kedalaman tumpukan: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Edit Argumen-argumen Sinyal:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Ubah Tipe Nilai Array"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Ubah Nilai Array"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Set Variable Default Value"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Edit Variabel:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Fungsi-fungsi:"
@@ -6700,26 +7408,6 @@ msgid "Add Signal"
msgstr "Tambahkan Sinyal"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Hapus Fungsi"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Hapus Variabel"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Mengedit Variabel:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Hapus Sinyal"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "Mengedit Sinyal:"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
msgstr "Ubah Pernyataan"
@@ -6728,6 +7416,15 @@ msgid "Add Node"
msgstr "Tambahkan Node"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Hapus Tombol-tombol yang tidak sah"
+
+#: 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 ""
"Tahan Meta untuk meletakkan sebuah Getter. Tahan Shift untuk meletakkan "
@@ -6772,6 +7469,26 @@ msgstr "Tambahkan Properti Setter"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
+msgid "Change Base Type"
+msgstr "Ubah Tipe Nilai Array"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Salin Resource"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Hapus Variabel"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Sambungkan Ke Node:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Condition"
msgstr "Transisi"
@@ -6801,6 +7518,54 @@ msgid "Get"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Ubah Nilai Array"
+
+#: 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
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Path ke Node:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Hapus Fungsi"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Edit Variabel:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Hapus Variabel"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Mengedit Sinyal:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Hapus Sinyal"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Mengedit Variabel:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "Mengedit Sinyal:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "Tipe Dasar:"
@@ -6821,10 +7586,6 @@ msgid "Edit Variable:"
msgstr "Edit Variabel:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Ubah"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Hapus yang Dipilih"
@@ -6904,14 +7665,6 @@ msgstr ""
"Nilai kembali dari _step() tidak sah, seharusnya integer (seq out), atau "
"string (error)."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6935,79 +7688,6 @@ msgstr "Tidak dapat membuat folder."
msgid "Could not open template for export:\n"
msgstr "Tidak dapat membuat folder."
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid unique name."
-msgstr "Nama tidak sah."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid product GUID."
-msgstr "Ukuran font tidak sah."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7114,6 +7794,13 @@ msgstr ""
"PathFollow2D hanya bekerja ketika diatur sebagai sebuah child dari sebuah "
"node Path2D."
+#: 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 ""
@@ -7143,24 +7830,33 @@ msgstr ""
"VisibilityEnable2D bekerja dengan sangat baik ketika digunakan dengan "
"mengedit root scene secara langsung sebagai parent."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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 ""
-"CollisionShape hanya berfungsi untuk memberikan sebuah bentuk collision ke "
-"node CollisionObject asal. Mohon hanya gunakan ini sebagai child dari Area, "
-"StaticBody, RigidBody, KinematicBody, dll. untuk memberi mereka sebuah "
-"bentuk."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"Sebuah bentuk harus disediakan untuk CollisionShape untuk fungsi. Mohon "
-"ciptakan sebuah resource bentuk untuk itu!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7177,6 +7873,25 @@ msgid "An empty CollisionPolygon has no effect on collision."
msgstr ""
"Sebuah CollisionPolygon yang kosong tidak memiliki efek pada collision."
+#: 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 ""
+"CollisionShape hanya berfungsi untuk memberikan sebuah bentuk collision ke "
+"node CollisionObject asal. Mohon hanya gunakan ini sebagai child dari Area, "
+"StaticBody, RigidBody, KinematicBody, dll. untuk memberi mereka sebuah "
+"bentuk."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"Sebuah bentuk harus disediakan untuk CollisionShape untuk fungsi. Mohon "
+"ciptakan sebuah resource bentuk untuk itu!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7196,6 +7911,13 @@ 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
#, fuzzy
msgid "Path property must point to a valid Spatial node to work."
@@ -7219,7 +7941,7 @@ msgstr ""
"'Frames' agar AnimatedSprite3D menampilkan frame-frame."
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7234,22 +7956,6 @@ msgstr "Peringatan!"
msgid "Please Confirm..."
msgstr "Mohon konfirmasi..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Buka sebuah File"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Buka File (File-file)"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Buka sebuah Direktori"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Buka sebuah File atau Direktori"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7271,7 +7977,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7291,6 +7997,24 @@ msgstr ""
"sebuah RenderTarget dan tetapkannya tekstur internal untuk beberapa node "
"untuk ditampilkan."
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "Tutup scene? (Perubahan-perubahan yang belum disimpan akan hilang)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "Buka Manajer Proyek?\n"
+#~ "(Perubahan yang tidak disimpan akan hilang)"
+
+#, fuzzy
+#~ msgid "Invalid unique name."
+#~ msgstr "Nama tidak sah."
+
+#, fuzzy
+#~ msgid "Invalid product GUID."
+#~ msgstr "Ukuran font tidak sah."
+
#~ msgid "Node From Scene"
#~ msgstr "Node Dari Scene"
@@ -7317,9 +8041,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "Diganti Kejadian (Kejadian-kejadian) %d."
-#~ msgid "Please save the scene first."
-#~ msgstr "Mohon simpan scene terlebih dahulu."
-
#~ msgid "Save Translatable Strings"
#~ msgstr "Simpan Kalimat yang Dapat Diterjemahkan"
diff --git a/editor/translations/it.po b/editor/translations/it.po
index 28ed2d5b0a..9ca5debd55 100644
--- a/editor/translations/it.po
+++ b/editor/translations/it.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2017-05-23 14:21+0000\n"
+"PO-Revision-Date: 2017-08-21 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"
@@ -19,7 +19,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.14.1-dev\n"
+"X-Generator: Weblate 2.17-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -149,7 +149,8 @@ msgstr "Vai a Step Successivo"
msgid "Goto Prev Step"
msgstr "Vai a Step Precedente"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "Lineare"
@@ -362,21 +363,19 @@ msgstr "Cambia Valore Array"
#: editor/asset_library_editor_plugin.cpp
msgid "Free"
-msgstr ""
+msgstr "Gratuito"
#: editor/asset_library_editor_plugin.cpp editor/editor_plugin_settings.cpp
msgid "Version:"
msgstr "Versione:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Contents:"
-msgstr "Costanti:"
+msgstr "Contenuti:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "View Files"
-msgstr " Files"
+msgstr "Vedi Files"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
#: editor/editor_help.cpp editor/property_selector.cpp
@@ -384,7 +383,8 @@ msgstr " Files"
msgid "Description:"
msgstr "Descrizione:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr "Installa"
@@ -395,161 +395,152 @@ msgstr "Installa"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Chiudi"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
-msgstr ""
+msgstr "Impossibile risolvere l'hostname:"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve."
-msgstr ""
+msgstr "Impossibile risolvete."
#: editor/asset_library_editor_plugin.cpp
msgid "Connection error, please try again."
-msgstr ""
+msgstr "Errore di connessione, si prega di riprovare."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect."
-msgstr "Connetti.."
+msgstr "Impossibile connettersi."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect to host:"
-msgstr "Connetti A Nodo:"
+msgstr "Impossibile connetersi all'host:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr ""
+msgstr "Nessuna risposta dall'host:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response."
-msgstr ""
+msgstr "Nessuna risposta."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Request failed, return code:"
-msgstr "Formato file richiesto sconosciuto:"
+msgstr "Richiesta fallita, codice di return:"
#: editor/asset_library_editor_plugin.cpp
msgid "Req. Failed."
-msgstr ""
+msgstr "Rich. Fall."
#: editor/asset_library_editor_plugin.cpp
msgid "Request failed, too many redirects"
-msgstr ""
+msgstr "Richiesta fallita, troppi ridirezionamenti"
#: editor/asset_library_editor_plugin.cpp
msgid "Redirect Loop."
-msgstr ""
+msgstr "Ridirigi Loop."
#: editor/asset_library_editor_plugin.cpp
msgid "Failed:"
-msgstr ""
+msgstr "Fallito:"
#: editor/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
-msgstr ""
+msgstr "Hash di download non buono, si presume il file sia stato manipolato."
#: editor/asset_library_editor_plugin.cpp
msgid "Expected:"
-msgstr ""
+msgstr "Previsto:"
#: editor/asset_library_editor_plugin.cpp
msgid "Got:"
-msgstr ""
+msgstr "Ottenuto:"
#: editor/asset_library_editor_plugin.cpp
msgid "Failed sha256 hash check"
-msgstr ""
+msgstr "Check hash sha256 fallito"
#: editor/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr ""
+msgstr "Errore di Download Asset:"
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
-msgstr ""
+msgstr "Successo!"
#: editor/asset_library_editor_plugin.cpp
msgid "Fetching:"
-msgstr ""
+msgstr "Recupero:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Resolving.."
-msgstr "Salvataggio.."
+msgstr "Risolvendo.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Connecting.."
-msgstr "Connetti.."
+msgstr "Connettendo.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Requesting.."
-msgstr "Testing"
+msgstr "Richiedendo.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Error making request"
-msgstr "Errore salvando la Risorsa!"
+msgstr "Errore nel fare richiesta"
#: editor/asset_library_editor_plugin.cpp
msgid "Idle"
-msgstr ""
+msgstr "Inattivo"
#: editor/asset_library_editor_plugin.cpp
msgid "Retry"
-msgstr ""
+msgstr "Riprova"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Download Error"
-msgstr "Scarica"
+msgstr "Errore durante il download"
#: editor/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr ""
+msgstr "Il download per questo asset è già in corso!"
#: editor/asset_library_editor_plugin.cpp
msgid "first"
-msgstr ""
+msgstr "primo"
#: editor/asset_library_editor_plugin.cpp
msgid "prev"
-msgstr ""
+msgstr "prec"
#: editor/asset_library_editor_plugin.cpp
msgid "next"
-msgstr ""
+msgstr "seguente"
#: editor/asset_library_editor_plugin.cpp
msgid "last"
-msgstr ""
+msgstr "ultimo"
#: editor/asset_library_editor_plugin.cpp
msgid "All"
msgstr "Tutti"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "Cerca:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "Cerca"
@@ -565,7 +556,7 @@ msgstr "Cerca"
msgid "Import"
msgstr "Importa"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "Plugins"
@@ -577,7 +568,7 @@ msgstr "Ordina:"
msgid "Reverse"
msgstr "Inverti"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "Categoria:"
@@ -731,14 +722,14 @@ msgstr "Connetti A Nodo:"
#: 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.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
msgstr "Aggiungi"
#: 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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "Rimuovi"
@@ -847,7 +838,7 @@ msgid "Resource"
msgstr "Risorsa"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "Percorso"
@@ -930,42 +921,256 @@ msgstr "Esplora Risorse Orfane"
msgid "Delete selected files?"
msgstr "Eliminare i file selezionati?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Elimina"
+#: editor/editor_about.cpp
+msgid "Thanks from the Godot community!"
+msgstr "Grazie dalla comunità di Godot!"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "Grazie!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr "Contributori a Godot Engine"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "Autore:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "Gestione Progetti"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Lead Developer"
+msgstr "Sviluppatori"
+
+#: editor/editor_about.cpp editor/project_manager.cpp
+msgid "Project Manager"
+msgstr "Gestione Progetti"
+
+#: editor/editor_about.cpp
+msgid "Developers"
+msgstr "Sviluppatori"
+
+#: 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
+#, fuzzy
+msgid "All Components"
+msgstr "Contenuti:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "Contenuti:"
+
+#: 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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "Decompressi"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "Pacchetto Installato Con Successo!"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "Pacchetto Installato Con Successo!"
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Effect"
+msgstr "Aggiungi Evento"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Apri Layout Audio Bus"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Solo"
+msgstr "Apri Layout Audio Bus"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Mute"
+msgstr "Apri Layout Audio Bus"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Elimina selezionati"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+msgstr "Opzioni subscena"
+
+#: 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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "duplica"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Elimina selezionati"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "Aggiungi Bus"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Elimina Layout"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Duplica Animazione"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "Azione di spostamento"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr "Salva Layout Bus Audio Come..."
#: editor/editor_audio_buses.cpp
msgid "Location for New Layout.."
-msgstr "Posizione di Nuovo Layout..."
+msgstr "Posizione per Nuovo Layout..."
#: editor/editor_audio_buses.cpp
msgid "Open Audio Bus Layout"
msgstr "Apri Layout Audio Bus"
#: editor/editor_audio_buses.cpp
+msgid "There is no 'res://default_bus_layout.tres' file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"Estensione file invalida.\n"
+"Si prega di usare .font."
+
+#: editor/editor_audio_buses.cpp
msgid "Add Bus"
msgstr "Aggiungi Bus"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "Crea Nuova Risorsa"
+
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "Carica"
#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Load an existing Bus Layout."
+msgstr "Carica una risorsa esistente dal disco e modificala."
+
+#: editor/editor_audio_buses.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Save As"
msgstr "Salva Come"
-#: editor/editor_audio_buses.cpp editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Save this Bus Layout to a file."
+msgstr "Salva Layout Bus Audio Come..."
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+msgid "Load Default"
msgstr "Default"
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nome Invalido."
@@ -1072,6 +1277,11 @@ msgid "Updating scene.."
msgstr "Aggiornando la scena.."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "Si prega di salvare prima la scena."
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "Scegli una Directory"
@@ -1149,6 +1359,22 @@ msgstr "Tutti i File (*)"
msgid "Open"
msgstr "Apri"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Apri un File"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Apri File(s)"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Apri una Directory"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Apri un File o una Directory"
+
#: 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
@@ -1274,6 +1500,15 @@ msgid "Signals:"
msgstr "Segnali:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Animazioni"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Costanti:"
@@ -1290,7 +1525,8 @@ msgid "Search Text"
msgstr "Cerca Testo"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " Output:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1340,6 +1576,11 @@ msgid "Creating Thumbnail"
msgstr "Creazione Miniature"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "This operation can't be done without a tree root."
+msgstr "Questa operazione non può essere eseguita senza una scena."
+
+#: editor/editor_node.cpp
msgid ""
"Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."
msgstr ""
@@ -1415,13 +1656,12 @@ msgid "There is no defined scene to run."
msgstr "Non c'è nessuna scena definita da eseguire."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"No main scene has ever been defined, select one?\n"
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
-"Nessuna scena principale è mai stata definita, selezionarne una?\n"
+"Nessuna scena principale è stata definita, selezionarne una?\n"
"Puoi cambiarla successivamente da \"Impostazioni Progetto\" sotto la "
"categoria 'applicazioni'."
@@ -1472,26 +1712,34 @@ msgid "Quick Open Script.."
msgstr "Apri Script Rapido.."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "Si"
+#, fuzzy
+msgid "Save & Close"
+msgstr "Salva un File"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "Chiudi scena? (I cambiamenti non salvati saranno persi)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
msgstr "Salva Scena Come.."
#: editor/editor_node.cpp
-#, fuzzy
msgid "No"
-msgstr "Nodo"
+msgstr "No"
+
+#: editor/editor_node.cpp
+msgid "Yes"
+msgstr "Si"
#: editor/editor_node.cpp
msgid "This scene has never been saved. Save before running?"
msgstr "Questa scena non è mai stata salvata. Salvare prima di eseguire?"
+#: editor/editor_node.cpp editor/scene_tree_dock.cpp
+msgid "This operation can't be done without a scene."
+msgstr "Questa operazione non può essere eseguita senza una scena."
+
#: editor/editor_node.cpp
msgid "Export Mesh Library"
msgstr "Esporta Libreria Mesh"
@@ -1501,12 +1749,9 @@ msgid "Export Tile Set"
msgstr "Esporta Tile Set"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "Esci"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "Uscire dall'editor?"
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "Questa operazione non può essere eseguita senza una scena."
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1529,18 +1774,52 @@ msgid "Quick Run Scene.."
msgstr "Esegui Scena Rapido.."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "Esci"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "Uscire dall'editor?"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "Gestione Progetti"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Salva un File"
+
+#: 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 ""
-"Aprire la Gestione Progetti?\n"
-"(I cambiamenti non salvati saranno persi)"
#: 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: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1579,6 +1858,11 @@ msgstr "Salva layout"
msgid "Delete Layout"
msgstr "Elimina Layout"
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+msgid "Default"
+msgstr "Default"
+
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
msgstr "Cambia Tab di Scena"
@@ -1595,6 +1879,11 @@ msgstr "% altri file o cartelle"
msgid "Distraction Free Mode"
msgstr "Modalità Senza Distrazioni"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "Modalità Senza Distrazioni"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "Scena"
@@ -1643,10 +1932,6 @@ msgstr "Salva tutte le Scene"
msgid "Close Scene"
msgstr "Chiudi Scena"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr "Vai a Scena Preced."
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "Apri Recente"
@@ -1683,9 +1968,8 @@ msgid "Miscellaneous project or scene-wide tools."
msgstr "Strumenti di progetto o scena vari."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Project"
-msgstr "Nuovo Progetto"
+msgstr "Progetto"
#: editor/editor_node.cpp
msgid "Project Settings"
@@ -1799,9 +2083,8 @@ msgstr ""
"filesystem in rete."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Editor"
-msgstr "Modifica"
+msgstr "Editor"
#: editor/editor_node.cpp editor/settings_config_dialog.cpp
msgid "Editor Settings"
@@ -1828,17 +2111,16 @@ msgid "Classes"
msgstr "Classi"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Online Docs"
-msgstr "Chiudi Documentazione"
+msgstr "Documentazione Online"
#: editor/editor_node.cpp
msgid "Q&A"
-msgstr ""
+msgstr "Domande e Risposte"
#: editor/editor_node.cpp
msgid "Issue Tracker"
-msgstr ""
+msgstr "Tracciatore Segnalazioni"
#: editor/editor_node.cpp
msgid "About"
@@ -1948,6 +2230,10 @@ msgstr "Nodo"
msgid "Output"
msgstr "Output"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "Re-Importa"
@@ -1957,26 +2243,10 @@ msgid "Update"
msgstr "Aggiorna"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "Grazie dalla comunità di Godot!"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "Grazie!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "Importa templates Da File ZIP"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "Esporta Progetto"
@@ -1997,38 +2267,41 @@ msgid "Open & Run a Script"
msgstr "Apri e Esegui uno Script"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "New Inherited"
+msgstr "Nuova Scena Ereditata.."
+
+#: editor/editor_node.cpp
msgid "Load Errors"
msgstr "Carica Errori"
+#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
+msgid "Select"
+msgstr "Seleziona"
+
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 2D Editor"
-msgstr "Apri nell Editor"
+msgstr "Apri Editor 2D"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 3D Editor"
-msgstr "Apri nell Editor"
+msgstr "Apri Editor 3D"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Script Editor"
-msgstr "Apri nell Editor"
+msgstr "Apri Editor Script"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Asset Library"
-msgstr "Esporta Libreria"
+msgstr "Apri Libreria degli Asset"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the next Editor"
-msgstr "Apri nell Editor"
+msgstr "Apri l'Editor successivo"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the previous Editor"
-msgstr "Apri nell Editor"
+msgstr "Apri l'Editor precedente"
#: editor/editor_plugin_settings.cpp
msgid "Installed Plugins:"
@@ -2106,6 +2379,16 @@ msgstr "Re-Importando"
msgid "Re-Import Changed Resources"
msgstr "Re-Importando Risorse Cambiate"
+#: 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 "Scrivi la logica nel metodo _run()."
@@ -2245,10 +2528,28 @@ msgid "Cannot navigate to '"
msgstr "Impossibile navigare a '"
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "Salva e Re-Importa"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "Sorgente:"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr "Stessi file di origine e e destinazione, non faccio nulla."
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
"Stessi percorsi \n"
@@ -2259,6 +2560,20 @@ msgid "Can't move directories to within themselves."
msgstr "Impossibile muovere le directory dentro se stesse."
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Errore di caricamento immagine:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Errore di importazione:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr "Non posso operare su '..'"
@@ -2335,6 +2650,12 @@ msgid "Instance the selected scene(s) as child of the selected node."
msgstr "Istanzia le scene selezionate come figlie del nodo selezionato."
#: editor/filesystem_dock.cpp
+msgid ""
+"Scanning Files,\n"
+"Please Wait.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Move"
msgstr "Sposta"
@@ -2346,10 +2667,31 @@ msgstr "Aggiungi a Gruppo"
msgid "Remove from Group"
msgstr "Rimuovi da Gruppo"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "Superficie %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+msgstr "Importando Scena.."
+
+#: 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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "Importa Scena 3D"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2388,6 +2730,14 @@ msgid "Saving.."
msgstr "Salvataggio.."
#: 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 " Files"
@@ -2475,13 +2825,12 @@ msgid "No target font resource!"
msgstr "Nessuna risorsa font di destinazione!"
#: editor/io_plugins/editor_font_import_plugin.cpp
-#, fuzzy
msgid ""
"Invalid file extension.\n"
"Please use .font."
msgstr ""
"Estensione file invalida.\n"
-"Si prega di usare .fnt."
+"Si prega di usare .font."
#: editor/io_plugins/editor_font_import_plugin.cpp
msgid "Can't load/process source font."
@@ -2580,6 +2929,10 @@ msgstr "Mesh Sorgente(i):"
msgid "Mesh"
msgstr "Mesh"
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "Superficie %d"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr "Nessun sample da importare!"
@@ -2960,9 +3313,8 @@ msgid "Compress"
msgstr "Comprimi"
#: editor/io_plugins/editor_translation_import_plugin.cpp
-#, fuzzy
msgid "Add to Project (project.godot)"
-msgstr "Aggiungi a Progetto (godot.cfg)"
+msgstr "Aggiungi a Progetto (project.godot)"
#: editor/io_plugins/editor_translation_import_plugin.cpp
msgid "Import Languages:"
@@ -3166,6 +3518,11 @@ msgid "New name:"
msgstr "Nuovo nome:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Modifica Filtri Nodi"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr "Scala:"
@@ -3481,6 +3838,7 @@ msgstr "Ripristina l'abilità dei figli dell'oggetto di essere selezionati."
#: 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Modifica"
@@ -3513,10 +3871,6 @@ msgid "Use Pixel Snap"
msgstr "Usa Snap a Pixel"
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr "Espandi a Genitore"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr "Scheletro.."
@@ -3625,11 +3979,6 @@ msgstr "Questa operazione richiede un solo nodo selezionato."
msgid "Change default type"
msgstr "Cambia tipo di default"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "OK"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3669,6 +4018,14 @@ msgstr "Modifica Poly (Rimuovi Punto)"
msgid "Create a new polygon from scratch."
msgstr "Crea un nuovo poligono dal nulla."
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr "Crea Poly3D"
@@ -3709,22 +4066,53 @@ msgstr "Aggiorna da Scena"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
-msgid "Add point"
-msgstr "Aggiungi Input"
+msgid "Modify Curve Point"
+msgstr "Modifica Curva"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "Modifica la Mappa Curve"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Load Curve Preset"
+msgstr "Carica preset"
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Add point"
+msgstr "Aggiungi punto"
+
+#: editor/plugins/curve_editor_plugin.cpp
msgid "Remove point"
-msgstr "Rimuovi Punto Percorso"
+msgstr "Rimuovi punto"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Left linear"
+msgstr "Lineare"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Right linear"
+msgstr "Vista Destra"
+
+#: editor/plugins/curve_editor_plugin.cpp
msgid "Load preset"
-msgstr "Carica Risorsa"
+msgstr "Carica preset"
#: editor/plugins/curve_editor_plugin.cpp
-msgid "Modify Curve"
-msgstr "Modifica Curva"
+#, fuzzy
+msgid "Remove Curve Point"
+msgstr "Rimuovi Punto Percorso"
+
+#: 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"
@@ -3748,6 +4136,12 @@ msgid "Item List Editor"
msgstr "Editor Lista Elementi"
#: 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 "Crea Poligono di occlusione"
@@ -4011,13 +4405,14 @@ msgstr "Cancella Maschera Emissione"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generating AABB"
-msgstr "Genera AABB"
+msgstr "Generando AABB"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
msgstr ""
+"É solamente possibile impostare il punto in un materiale di processo "
+"ParticlesMaterial"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Error loading image:"
@@ -4033,36 +4428,38 @@ msgstr "Imposta Maschera Emissione"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generate Visibility Rect"
-msgstr ""
+msgstr "Genera Rect Visibilità"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
msgstr "Carica Maschera Emissione"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
+msgid "Particles"
+msgstr "Vertici"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
msgstr "Conteggio Punti Generati:"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generation Time (sec):"
-msgstr "Tempo Medio (sec)"
+msgstr "Tempo di Generazione (sec):"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Emission Mask"
-msgstr "Imposta Maschera Emissione"
+msgstr "Maschera Emissione"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Capture from Pixel"
-msgstr "Crea da Scena"
+msgstr "Cattura da Pixel"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Emission Colors"
-msgstr "Punti Emissione:"
+msgstr "Colori Emissione"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Node does not contain geometry."
@@ -4125,23 +4522,20 @@ msgid "Emission Source: "
msgstr "Sorgente Emissione: "
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generate Visibility AABB"
-msgstr "Genera AABB"
+msgstr "Genera Visibilità AABB"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
msgstr "Rimuovi Punto da Curva"
#: editor/plugins/path_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove Out-Control from Curve"
-msgstr "Sposta Out-Control sulla Curva"
+msgstr "Rimuovi Out-Control dalla Curva"
#: editor/plugins/path_2d_editor_plugin.cpp
-#, fuzzy
msgid "Remove In-Control from Curve"
-msgstr "Rimuovi Punto da Curva"
+msgstr "Rimuovi In-Control da Curva"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
@@ -4199,14 +4593,12 @@ msgid "Remove Path Point"
msgstr "Rimuovi Punto Percorso"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Remove Out-Control Point"
-msgstr "Sposta Out-Control sulla Curva"
+msgstr "Rimuovi Punto Out-Control"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Remove In-Control Point"
-msgstr "Sposta In-Control sulla Curva"
+msgstr "Rimuovi Punto In-Control"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create UV Map"
@@ -4361,9 +4753,14 @@ msgid "Pitch"
msgstr "Pitch"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Clear Recent Files"
-msgstr "Elimina Ossa"
+msgstr "Elimina File recenti"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid ""
+"Close and save changes?\n"
+"\""
+msgstr ""
#: editor/plugins/script_editor_plugin.cpp
msgid "Error while saving theme"
@@ -4390,6 +4787,10 @@ msgid "Save Theme As.."
msgstr "Salva Tema Come.."
#: editor/plugins/script_editor_plugin.cpp
+msgid " Class Reference"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Next script"
msgstr "Script successivo"
@@ -4442,6 +4843,11 @@ msgid "Close All"
msgstr "Chiudi Tutto"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Scripts Panel"
+msgstr "Attiva Preferito"
+
+#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Find.."
@@ -4474,6 +4880,11 @@ msgid "Keep Debugger Open"
msgstr "Mantieni Debugger Aperto"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "Apri l'Editor successivo"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr "Finestra"
@@ -4486,9 +4897,8 @@ msgid "Move Right"
msgstr "Sposta a Destra"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open Godot online documentation"
-msgstr "Cerca Riferimenti nella documentazione."
+msgstr "Apri la documentazione online di Godot"
#: editor/plugins/script_editor_plugin.cpp
msgid "Search the class hierarchy."
@@ -4542,25 +4952,28 @@ msgstr ""
"cui appartengono è caricata"
#: 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 "Scegli Colore"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert Case"
-msgstr "Convertendo Immagini"
+msgstr "Converti Maiuscole/Minuscole"
#: editor/plugins/script_text_editor.cpp
msgid "Uppercase"
-msgstr ""
+msgstr "Maiuscolo"
#: editor/plugins/script_text_editor.cpp
msgid "Lowercase"
-msgstr ""
+msgstr "Minuscolo"
#: editor/plugins/script_text_editor.cpp
msgid "Capitalize"
-msgstr ""
+msgstr "Aggiungi maiuscola iniziale"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp scene/gui/line_edit.cpp
@@ -4589,6 +5002,11 @@ msgid "Move Down"
msgstr "Sposta giù"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Elimina Punto"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr "Indenta Sinistra"
@@ -4614,11 +5032,11 @@ msgstr "Taglia Spazi in Coda"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Spaces"
-msgstr ""
+msgstr "Converti Indentazione In Spazi"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Tabs"
-msgstr ""
+msgstr "Converti Indentazione In Tabulazioni"
#: editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
@@ -4642,14 +5060,12 @@ msgid "Goto Previous Breakpoint"
msgstr "Vai a Breakpoint Precedente"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert To Uppercase"
-msgstr "Converti In.."
+msgstr "Converti In Maiuscolo"
#: editor/plugins/script_text_editor.cpp
-#, fuzzy
msgid "Convert To Lowercase"
-msgstr "Converti In.."
+msgstr "Converti In Minuscolo"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
@@ -4676,7 +5092,7 @@ msgstr "Aiuto Contestuale"
#: editor/plugins/shader_editor_plugin.cpp
msgid "Shader"
-msgstr ""
+msgstr "Shader"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Scalar Constant"
@@ -4895,63 +5311,28 @@ msgid "Animation Key Inserted."
msgstr "Key d'Animazione Inserito."
#: 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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "Vai Avanti"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "All'indietro"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "Rotellina Giù."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
-msgstr ""
+msgstr "Oggetti Disegnati"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Material Changes"
-msgstr "Aggiorna Cambiamenti"
+msgstr "Cambiamenti dei Materiali"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Shader Changes"
-msgstr "Aggiorna Cambiamenti"
+msgstr "Cambiamenti delle Shader"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Surface Changes"
-msgstr "Aggiorna Cambiamenti"
+msgstr "Cambiamenti delle Superfici"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Draw Calls"
-msgstr ""
+msgstr "Draw Calls"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Vertices"
-msgstr "Vertice"
+msgstr "Vertici"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align with view"
@@ -4970,33 +5351,81 @@ msgid "Display Overdraw"
msgstr "Mostra Overdraw"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Display Unshaded"
-msgstr "Mostra senza Shader"
+msgstr "Mostra Unshaded"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Environment"
-msgstr "Ambientazione"
+msgstr "Mostra Ambiente"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Gizmos"
-msgstr "Gizmos"
+msgstr "Visualizza Gizmos"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Information"
-msgstr ""
+msgstr "Visualizza Informazioni"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Audio Listener"
msgstr "Audio Listener"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Doppler Enable"
+msgstr "Abilita"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Left"
+msgstr "Vista Libera Sinistra"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Right"
+msgstr "Vista Libera Destra"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Forward"
+msgstr "Vista Libera Avanti"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Backwards"
+msgstr "Vista Libera Indietro"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr "Vista Libera Su"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Down"
+msgstr "Vista Libera Giù"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr "Modificatore Velocità Vista Libera"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "preview"
+msgstr "Anteprima"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr "Finestra di XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "Modalità di Selezione"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid ""
+"Drag: Rotate\n"
+"Alt+Drag: Move\n"
+"Alt+RMB: Depth list selection"
+msgstr "Alt+RMB: Selezione Lista Profondità"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode (W)"
msgstr "Modalità Movimento (W)"
@@ -5034,7 +5463,7 @@ msgstr "Vista Destra"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Switch Perspective/Orthogonal view"
-msgstr "Cambia Vista Prospettiva/Ortogonale"
+msgstr "Cambia tra Vista Prospettiva/Ortogonale"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Insert Animation Key"
@@ -5053,24 +5482,20 @@ msgid "Align Selection With View"
msgstr "Allinea Selezione Con Vista"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Select"
-msgstr "Seleziona"
+msgstr "Strumento Selezione"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Move"
-msgstr "Sposta"
+msgstr "Strumento Sposta"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Rotate"
-msgstr "Ctrl: Ruota"
+msgstr "Strumento Ruota"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Scale"
-msgstr "Scala:"
+msgstr "Strumento Scala"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform"
@@ -5117,6 +5542,7 @@ msgid "View Grid"
msgstr "Visualizza Griglia"
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "Impostazioni"
@@ -5130,7 +5556,7 @@ msgstr "Trasla Snap:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate Snap (deg.):"
-msgstr "Ruota Snap (deg.):"
+msgstr "Snap Rotazione (gradi):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Snap (%):"
@@ -5142,7 +5568,7 @@ msgstr "Impostazioni Viewport"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Perspective FOV (deg.):"
-msgstr "FOV Prospettiva (deg.):"
+msgstr "FOV Prospettiva (gradi):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Z-Near:"
@@ -5158,11 +5584,11 @@ msgstr "Cambiamento Transform"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Translate:"
-msgstr "Transla:"
+msgstr "Trasla:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate (deg.):"
-msgstr "Ruota (deg.):"
+msgstr "Ruota (gradi):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale (ratio):"
@@ -5182,7 +5608,7 @@ msgstr "Post"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "ERROR: Couldn't load frame resource!"
-msgstr "ERRORE; Impossibile caricare la risorsa frame!"
+msgstr "ERRORE: Impossibile caricare la risorsa frame!"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Add Frame"
@@ -5245,6 +5671,11 @@ msgid "StyleBox Preview:"
msgstr "Anteprima StyleBox:"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
+msgid "Set Region Rect"
+msgstr "Imposta region_rect"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
msgstr "Modalità Snap:"
@@ -5302,6 +5733,16 @@ msgid "Remove Item"
msgstr "Rimuovi Elemento"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Rimuovi Elementi di Classe"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Rimuovi"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr "Tema"
@@ -5369,7 +5810,7 @@ msgstr "Tab 2"
msgid "Tab 3"
msgstr "Tab 3"
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr "Tipo:"
@@ -5391,12 +5832,27 @@ msgid "Color"
msgstr "Colore"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Cancella selezione"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr "Disegna TileMap"
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "duplica"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "Lineare"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Bucket Fill"
+msgstr "Secchiello"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5431,10 +5887,6 @@ msgid "Pick Tile"
msgstr "Preleva Tile"
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr "Seleziona"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr "Ruota a 0 gradi"
@@ -5494,7 +5946,7 @@ msgstr "Eliminare preset '%s'?"
msgid "Presets"
msgstr "Presets"
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "Aggiungi..."
@@ -5545,6 +5997,24 @@ msgid "Make Patch"
msgstr "Crea Patch"
#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "Texture"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "Lista Metodi:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr "Esporta PCK/Zip"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr "Le export templates per questa piattaforma sono mancanti:"
@@ -5557,14 +6027,12 @@ msgid "Invalid project path, the path must exist!"
msgstr "Percorso di progetto invalido, il percorso deve esistere!"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project path, project.godot must not exist."
-msgstr "Percorso di progetto invalido, godot.cfg non esiste."
+msgstr "Percorso di progetto invalido, project.godot non esiste."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project path, project.godot must exist."
-msgstr "Percorso di progetto invalido, godot.cfg deve esistere."
+msgstr "Percorso di progetto invalido, project.godot deve esistere."
#: editor/project_manager.cpp
msgid "Imported Project"
@@ -5575,19 +6043,14 @@ msgid "Invalid project path (changed anything?)."
msgstr "Percorso di progetto invalido (cambiato qualcosa?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't create project.godot in project path."
-msgstr "Impossibile creare godot.cfg nel percorso di progetto."
+msgstr "Impossibile creare project.godot nel percorso di progetto."
#: editor/project_manager.cpp
msgid "The following files failed extraction from package:"
msgstr "Impossibile estrarre i file seguenti dal pacchetto:"
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr "Pacchetto Installato Con Successo!"
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "Importa Progetto Esistente"
@@ -5632,6 +6095,23 @@ msgid "Are you sure to open more than one project?"
msgstr "Sei sicuro di voler aprire più di un progetto?"
#: 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 ""
+"Nessuna scena principale è stata definita, selezionarne una?\n"
+"Puoi cambiarla successivamente da \"Impostazioni Progetto\" sotto la "
+"categoria 'applicazioni'."
+
+#: 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 "Sei sicuro di voler eseguire più di un progetto?"
@@ -5648,10 +6128,6 @@ msgid ""
msgstr "Stai per esaminare %s cartelle per progetti Godot esistenti. Confermi?"
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr "Gestione Progetti"
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr "Lista Progetti"
@@ -5672,264 +6148,295 @@ msgid "New Project"
msgstr "Nuovo Progetto"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Templates"
-msgstr "Rimuovi Template"
+msgstr "Templates"
#: editor/project_manager.cpp
msgid "Exit"
msgstr "Esci"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Impossibile connettersi."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "Tasto "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr "Pulsante Joy"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr "Asse Joy"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr "Pulsante Mouse"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr "Azione invalida (va bene tutto a parte '/' o ':')."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr "L'Azione '%s' esiste già!"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr "Rinomina Evento di Azione Input"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr "Aggiungi Evento di Azione Input"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr "Control+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "Premi un tasto.."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr "Indice Pulsante Mouse:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr "Pulsante Sinistro"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr "Pulsante Destro"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr "Pulsante Centrale"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr "Pulsante Rotellina Su"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr "Pulsante Rotellina Giù"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr "Pulsante 6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr "Pulsante 7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr "Pulsante 8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr "Pulsante 9"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Cambia"
+
+#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
msgstr "Indice Asse Joypad:"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "Asse"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr "Indice Pulsante Joypad:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr "Aggiungi azione di input"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr "Elimina Evento di Azione Input"
-#: editor/project_settings.cpp
-#, fuzzy
+#: editor/project_settings_editor.cpp
msgid "Add Event"
-msgstr "Aggiungi vuoto"
+msgstr "Aggiungi Evento"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "Dispositivo"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Pulsante"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "Pulsante Sinistro."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "Pulsante DEstro."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "Pulsante centrale."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "Rotellina su."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "Rotellina Giù."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Aggiungi Proprietà Getter"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "No property '"
+msgstr "Proprietà:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "Impostazioni"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "Elimina Input"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "Errore nel salvare le impostazioni."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "Impostazioni salvate OK."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr "Aggiungi Traduzione"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "Rimuovi Traduzione"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr "Aggiungi percorso rimappato"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr "Remap Risorse Aggiungi Remap"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr "Cambia Lingua Remap Risorse"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr "Rimuovi Remap Risorse"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr "Rimuovi Opzione di Remap Rimorse"
-#: editor/project_settings.cpp
-#, fuzzy
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
-msgstr "Impostazioni Progetto (godot.cfg)"
+msgstr "Impostazioni Progetto (project.godot)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr "Generali"
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr "Proprietà:"
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr "Elim."
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr "Copia A Piattaforma.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
+msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr "Mappa Input"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr "Azione:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr "Dispositivo:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr "Indice:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr "Localizzazione"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr "Traduzioni"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr "Traduzioni:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr "Remaps"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr "Risorse:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr "Remaps per Locale:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr "Locale"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "AutoLoad"
@@ -5970,6 +6477,11 @@ msgid "Assign"
msgstr "Assegna"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Scegli un Nodo"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr "Nuovo Script"
@@ -5982,6 +6494,11 @@ msgid "Error loading file: Not a resource!"
msgstr "Errore caricamento file: Non è una risorsa!"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "Scegli Nodo(i) da Importare"
+
+#: editor/property_editor.cpp
msgid "Pick a Node"
msgstr "Scegli un Nodo"
@@ -6077,6 +6594,11 @@ msgstr "Argomenti Scena Principale:"
msgid "Scene Run Settings"
msgstr "Impostazioni Esecuzione Scena"
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "OK"
+
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
msgstr "Nessun genitore nel quale istanziare una scena."
@@ -6122,10 +6644,6 @@ msgid "Delete Node(s)?"
msgstr "Elimina Nodo(i)?"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "Questa operazione non può essere eseguita senza una scena."
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr "Impossibile effettuare con il nodo di root."
@@ -6138,6 +6656,18 @@ msgid "Save New Scene As.."
msgstr "Salva Nuova Scena Come.."
#: editor/scene_tree_dock.cpp
+msgid "Editable Children"
+msgstr "Figlio Modificabile"
+
+#: editor/scene_tree_dock.cpp
+msgid "Load As Placeholder"
+msgstr "Carica come placeholder"
+
+#: editor/scene_tree_dock.cpp
+msgid "Discard Instancing"
+msgstr "Scarta Istanziamento"
+
+#: editor/scene_tree_dock.cpp
msgid "Makes Sense!"
msgstr "Ha Senso!"
@@ -6170,9 +6700,8 @@ msgid "Error duplicating scene to save it."
msgstr "Errore duplicando la scena per salvarla."
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Sub-Resources:"
-msgstr "Risorse:"
+msgstr "Sub-Risorse:"
#: editor/scene_tree_dock.cpp
msgid "Edit Groups"
@@ -6183,6 +6712,14 @@ msgid "Edit Connections"
msgstr "Modifica Connessioni"
#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance"
+msgstr "Liberare ereditarietà"
+
+#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
+msgid "Open in Editor"
+msgstr "Apri nell Editor"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)"
msgstr "Elimina Nodo(i)"
@@ -6235,6 +6772,11 @@ msgstr ""
"root esiste."
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "Filtri"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr "Allega un nuovo script o uno esistente al nodo selezionato."
@@ -6242,6 +6784,14 @@ msgstr "Allega un nuovo script o uno esistente al nodo selezionato."
msgid "Clear a script for the selected node."
msgstr "Svuota uno script per il nodo selezionato."
+#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance? (No Undo!)"
+msgstr "Liberare ereditarietà? (No Undo!)"
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear!"
+msgstr "Libera!"
+
#: editor/scene_tree_editor.cpp
msgid "Toggle Spatial Visible"
msgstr "Abilita Spatial Visibile"
@@ -6252,56 +6802,60 @@ msgstr "Abilita CanvasItem Visibile"
#: editor/scene_tree_editor.cpp
msgid "Node configuration warning:"
-msgstr ""
+msgstr "Avviso confugurazione nodo:"
#: editor/scene_tree_editor.cpp
msgid ""
"Node has connection(s) and group(s)\n"
"Click to show signals dock."
msgstr ""
+"Il nodo ha connessioni e gruppi\n"
+"\n"
+"Fai click per mostrare il dock segnali."
#: editor/scene_tree_editor.cpp
msgid ""
"Node has connections.\n"
"Click to show signals dock."
msgstr ""
+"Il nodo ha connessioni.\n"
+"Fai click per mostrare il dock segnali."
#: editor/scene_tree_editor.cpp
msgid ""
"Node is in group(s).\n"
"Click to show groups dock."
msgstr ""
-
-#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "Opzioni di Debug"
+"Il nodo e in un gruppo.\n"
+"Fai click per mostrare il dock gruppi."
#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr "Istanza:"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Open script"
-msgstr "Script successivo"
+msgstr "Apri script"
#: editor/scene_tree_editor.cpp
msgid ""
"Node is locked.\n"
"Click to unlock"
msgstr ""
+"Il nodo é bloccato.\n"
+"Fai click per sbloccarlo"
#: editor/scene_tree_editor.cpp
msgid ""
"Children are not selectable.\n"
"Click to make selectable"
msgstr ""
+"I figli non sono selezionabili.\n"
+"Fai click per renderli selezionabili"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Toggle Visibility"
-msgstr "Abilita Spatial Visibile"
+msgstr "Abilita Visibilità"
#: editor/scene_tree_editor.cpp
msgid "Invalid node name, the following characters are not allowed:"
@@ -6316,32 +6870,9 @@ msgid "Scene Tree (Nodes):"
msgstr "Scene Tree (Nodi):"
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr "Figlio Modificabile"
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr "Carica come placeholder"
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr "Scarta Istanziamento"
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr "Apri nell Editor"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr "Liberare ereditarietà"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr "Liberare ereditarietà? (No Undo!)"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr "Libera!"
+#, fuzzy
+msgid "Node Configuration Warning!"
+msgstr "Avviso confugurazione nodo:"
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -6349,14 +6880,22 @@ msgstr "Scegli un Nodo"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Errore di caricamento immagine:"
+
+#: editor/script_create_dialog.cpp
msgid "Error - Could not create script in filesystem."
-msgstr "Impossibile creare script in filesystem."
+msgstr "Errore - Impossibile creare script in filesystem."
#: editor/script_create_dialog.cpp
msgid "Error loading script from %s"
msgstr "Errore caricamento script da %s"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "N/A"
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "Percorso vuoto"
@@ -6374,68 +6913,55 @@ msgstr "Estensione Invalida"
#: editor/script_create_dialog.cpp
msgid "Wrong extension chosen"
-msgstr ""
+msgstr "Estensione scelta errata"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid Path"
-msgstr "Percorso Invalido."
+msgstr "Percorso Invalido"
#: editor/script_create_dialog.cpp
msgid "Invalid class name"
msgstr "Nome classe invalido"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid inherited parent name or path"
-msgstr "Nome proprietà indice invalido."
+msgstr "Nome genitore ereditato o percorso invalido"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script valid"
-msgstr "Script"
+msgstr "Script valido"
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9 and _"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr "N/A"
+msgstr "Consentiti: a-z, A-Z, 0-9 e _"
#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
-msgstr ""
+msgstr "Script built-in (nel file scena)"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Create new script file"
-msgstr "Crea nuovo script"
+msgstr "Crea nuovo file script"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Load existing script file"
-msgstr "Carica script esistente"
+msgstr "Carica file script esistente"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Inherits"
-msgstr "Eredita:"
+msgstr "Eredita"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Class Name"
-msgstr "Nome Classe:"
+msgstr "Nome Classe"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Template"
-msgstr "Rimuovi Template"
+msgstr "Template"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Built-in Script"
-msgstr "Built-In Script"
+msgstr "Script Built-In"
#: editor/script_create_dialog.cpp
msgid "Attach Node Script"
@@ -6574,6 +7100,10 @@ msgid "Change Light Radius"
msgstr "Cambia Raggio Luce"
#: editor/spatial_editor_gizmos.cpp
+msgid "Change AudioStreamPlayer3D Emission Angle"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
msgstr "Cambia FOV Telecamera"
@@ -6607,7 +7137,7 @@ msgstr "Cambia Estensione di Notifier"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Particles AABB"
-msgstr ""
+msgstr "Cambia AABB Particelle"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Probe Extents"
@@ -6658,6 +7188,137 @@ msgstr "Istanza invalida formato dizionario (script invalido in @path)"
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "Istanza invalida formato dizionario (sottoclassi invalide)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Elimina selezionati"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Duplica Selezione"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Snap View"
+msgstr "Vista dall'Alto"
+
+#: 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
+#, fuzzy
+msgid "Clip Disabled"
+msgstr "Disabilitato"
+
+#: 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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "Ctrl: Ruota"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "Ctrl: Ruota"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Z"
+msgstr "Ctrl: Ruota"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "Crea Nuovo"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "Crea Nuovo Progetto"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Area"
+msgstr "Cancella TileMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Solo Selezione"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Solo Selezione"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "Impostazioni Snap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "Istanza:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr " Files"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6695,6 +7356,31 @@ msgid "Stack overflow with stack depth: "
msgstr "Overflow dello stack con profondità dello stack: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Modifica Argomenti Segnali:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Cambia Tipo del Valore Array"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Cambia Nome Input"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Default Value"
+msgstr "Cambia Valore di Default"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Modifica Variabile:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Funzioni:"
@@ -6735,26 +7421,6 @@ msgid "Add Signal"
msgstr "Aggiungi Segnale"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Rimuovi Funzione"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Rimuovi Variabile"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Modifica Variabile:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Rimuovi Segnale"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "Modifica Segnale:"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
msgstr "Cambia Espressione"
@@ -6763,6 +7429,16 @@ msgid "Add Node"
msgstr "Aggiungi Nodo"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Rimuovi key invalidi"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Duplicate VisualScript Nodes"
+msgstr "Duplica Nodo(i) Grafico"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
"Mantieni premuto Meta per rilasciare un Getter. Mantieni premuto Shift per "
@@ -6807,6 +7483,26 @@ msgid "Add Setter Property"
msgstr "Aggiungi Proprietà Setter"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "Cambia Tipo"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Rimuovi nodo(i)"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Rimuovi Nodo Grafico di Shader"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Connetti A Nodo:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "Condizione"
@@ -6835,6 +7531,56 @@ msgid "Get"
msgstr "Get"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Cambia Nome Input"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "Non posso operare su '..'"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "Clipboard risorse vuota!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Incolla Nodi"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Rimuovi Funzione"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Modifica Variabile:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Rimuovi Variabile"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Modifica Segnale:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Rimuovi Segnale"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Modifica Variabile:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "Modifica Segnale:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "Tipo Base:"
@@ -6855,10 +7601,6 @@ msgid "Edit Variable:"
msgstr "Modifica Variabile:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Cambia"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Elimina selezionati"
@@ -6936,14 +7678,6 @@ msgstr ""
"Valore di return invalido da _step(), deve esere intero (seq out), oppure "
"stringa (errore)."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "appena premuto"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "appena rilasciato"
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr "Esegui nel Browser"
@@ -6964,94 +7698,6 @@ msgstr "Impossibile leggere file:\n"
msgid "Could not open template for export:\n"
msgstr "Impossibile aprire template per l'esportazione:\n"
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-"Impossibile leggere il file del certificatio. Il percorso e la password sono "
-"entrambi corretti?"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "Errore in creazione del signature object."
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr "Errore di creazione della firma del pacchetto."
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"Nessun template di esportazione trovato.\n"
-"Scarica ed installa i template di esportazione."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr "Pacchetto di debug personalizzato non trovato."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr "Pacchetto di release personalizzato non trovato."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr "Nome unico invalido."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr "GUID prodotto invalido."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr "GUID publisher invalido."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "Colore di background invalido."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-"Dimensioni dell'immagine dello Store Logo invalide (dovrebbero essere 50x50)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-"Dimensioni non valide dell'immagine del logo quadrato 44x44 (dovrebbero "
-"essere 44x44)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-"Dimensioni non valide dell'immagine del logo quadrato 71x71 (dovrebbero "
-"essere 71x71)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-"Dimensioni non valide dell'immagine del logo quadrato 150x150 (dovrebbero "
-"essere 150x150)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-"Dimensioni non valide dell'immagine del logo quadrato 310x310 (dovrebbero "
-"essere 310x310)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-"Dimensioni non valide dell'immagine del logo quadrato 310x150 (dovrebbero "
-"essere 310x150)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-"Dimensioni non valide dell'immagine dello splash screen (dovrebbero essere "
-"620x300)."
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7153,6 +7799,8 @@ msgid ""
"A material to process the particles is not assigned, so no behavior is "
"imprinted."
msgstr ""
+"Un materiale per processare le particelle non é assegnato, pertanto nessun "
+"comportamento é impresso."
#: scene/2d/path_2d.cpp
msgid "PathFollow2D only works when set as a child of a Path2D node."
@@ -7160,6 +7808,13 @@ msgstr ""
"PathFollow2D funziona solamente quando impostato come figlio di un nodo "
"Path2D."
+#: 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 ""
@@ -7189,23 +7844,33 @@ msgstr ""
"VisibilityEnable2D funziona al meglio quando usato direttamente come "
"genitore con il root della scena modificata."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"The controller id must not be 0 or this controller will not be bound to an "
+"actual controller"
msgstr ""
-"CollisionShape serve a fornire una forma di collisione ad un nodo derivato "
-"di CollisionObject. Si prega di utilizzarlo solamente come figlio di Area, "
-"StaticBody, RigidBody, KinematicBody, etc. in modo da dargli una forma."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRAnchor must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"Perché CollisionShape funzioni deve essere fornita una forma. Si prega di "
-"creare una risorsa forma (shape)!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7222,6 +7887,24 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "Un CollisionPolygon vuoto non ha effetti in collisione."
+#: 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 ""
+"CollisionShape serve a fornire una forma di collisione ad un nodo derivato "
+"di CollisionObject. Si prega di utilizzarlo solamente come figlio di Area, "
+"StaticBody, RigidBody, KinematicBody, etc. in modo da dargli una forma."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"Perché CollisionShape funzioni deve essere fornita una forma. Si prega di "
+"creare una risorsa forma (shape)!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7239,6 +7922,13 @@ msgstr ""
#: scene/3d/particles.cpp
msgid ""
"Nothing is visible because meshes have not been assigned to draw passes."
+msgstr "Nulla é visibile perché le mesh non sono state assegnate ai draw pass."
+
+#: 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
@@ -7264,12 +7954,12 @@ msgstr ""
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
-msgstr "Modalità esecuzione:"
+msgid "Raw Mode"
+msgstr "Modalità di Pan"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
-msgstr ""
+msgstr "Aggiungi colore attuale come preset"
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -7279,22 +7969,6 @@ msgstr "Attenzione!"
msgid "Please Confirm..."
msgstr "Per Favore Conferma..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Apri un File"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Apri File(s)"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Apri una Directory"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Apri un File o una Directory"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7319,11 +7993,13 @@ msgstr ""
"Usa un container come figlio (VBox,HBox,etc), o un Control impostando la "
"dimensione minima manualmente."
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
msgstr ""
+"Impossobile caricare Ambiente di Default come specificato nelle Impostazioni "
+"Progetto (Rendering -> Vista -> Ambiente di Default)."
#: scene/main/viewport.cpp
msgid ""
@@ -7337,6 +8013,110 @@ msgstr ""
"Control, in modo che possa ottenere una dimensione. Altrimenti, renderlo un "
"RenderTarget e assegnare alla sua texture interna qualche nodo da mostrare."
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "Chiudi scena? (I cambiamenti non salvati saranno persi)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "Aprire la Gestione Progetti?\n"
+#~ "(I cambiamenti non salvati saranno persi)"
+
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "Vai a Scena Preced."
+
+#~ msgid "Expand to Parent"
+#~ msgstr "Espandi a Genitore"
+
+#~ msgid "Del"
+#~ msgstr "Elim."
+
+#~ msgid "Copy To Platform.."
+#~ msgstr "Copia A Piattaforma.."
+
+#~ msgid "just pressed"
+#~ msgstr "appena premuto"
+
+#~ msgid "just released"
+#~ msgstr "appena rilasciato"
+
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr ""
+#~ "Impossibile leggere il file del certificatio. Il percorso e la password "
+#~ "sono entrambi corretti?"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "Errore in creazione del signature object."
+
+#~ msgid "Error creating the package signature."
+#~ msgstr "Errore di creazione della firma del pacchetto."
+
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "Nessun template di esportazione trovato.\n"
+#~ "Scarica ed installa i template di esportazione."
+
+#~ msgid "Custom debug package not found."
+#~ msgstr "Pacchetto di debug personalizzato non trovato."
+
+#~ msgid "Custom release package not found."
+#~ msgstr "Pacchetto di release personalizzato non trovato."
+
+#~ msgid "Invalid unique name."
+#~ msgstr "Nome unico invalido."
+
+#~ msgid "Invalid product GUID."
+#~ msgstr "GUID prodotto invalido."
+
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "GUID publisher invalido."
+
+#~ msgid "Invalid background color."
+#~ msgstr "Colore di background invalido."
+
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr ""
+#~ "Dimensioni dell'immagine dello Store Logo invalide (dovrebbero essere "
+#~ "50x50)."
+
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr ""
+#~ "Dimensioni non valide dell'immagine del logo quadrato 44x44 (dovrebbero "
+#~ "essere 44x44)."
+
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr ""
+#~ "Dimensioni non valide dell'immagine del logo quadrato 71x71 (dovrebbero "
+#~ "essere 71x71)."
+
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr ""
+#~ "Dimensioni non valide dell'immagine del logo quadrato 150x150 (dovrebbero "
+#~ "essere 150x150)."
+
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr ""
+#~ "Dimensioni non valide dell'immagine del logo quadrato 310x310 (dovrebbero "
+#~ "essere 310x310)."
+
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr ""
+#~ "Dimensioni non valide dell'immagine del logo quadrato 310x150 (dovrebbero "
+#~ "essere 310x150)."
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr ""
+#~ "Dimensioni non valide dell'immagine dello splash screen (dovrebbero "
+#~ "essere 620x300)."
+
+#~ msgid "RAW Mode"
+#~ msgstr "Modalità RAW"
+
#~ msgid "Node From Scene"
#~ msgstr "Nodo Da Scena"
@@ -7422,9 +8202,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "Rimpiazzate %d Occorrenze."
-#~ msgid "Please save the scene first."
-#~ msgstr "Si prega di salvare prima la scena."
-
#~ msgid "Save Translatable Strings"
#~ msgstr "Salva Stringhe Traducibili"
@@ -7636,9 +8413,6 @@ msgstr ""
#~ msgid "Script Encryption Key (256-bits as hex):"
#~ msgstr "Chiave di Crittografia Script (256-bits come esadecimali):"
-#~ msgid "Export PCK/Zip"
-#~ msgstr "Esporta PCK/Zip"
-
#~ msgid "Export Project PCK"
#~ msgstr "Esporta Progetto PCK"
@@ -7787,9 +8561,6 @@ msgstr ""
#~ msgid "Node Group(s)"
#~ msgstr "Gruppo(i) Nodi"
-#~ msgid "Set region_rect"
-#~ msgstr "Imposta region_rect"
-
#~ msgid "Plugin List:"
#~ msgstr "Lista Plugin:"
diff --git a/editor/translations/ja.po b/editor/translations/ja.po
index 8fa50e4512..0cbbe217bb 100644
--- a/editor/translations/ja.po
+++ b/editor/translations/ja.po
@@ -2,23 +2,24 @@
# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
# This file is distributed under the same license as the Godot source code.
#
-# akirakido <achts.y@gmail.com>, 2016.
+# akirakido <achts.y@gmail.com>, 2016-2017.
# hopping tappy (ãŸã£ã´ã•ã‚“) <hopping.tappy@gmail.com>, 2016.
# Lexi Grafen <shfeedly@gmail.com>, 2017.
+# Tetsuji Ochiai <ochiaixp@gmail.com>, 2017.
# Tohru Ike (rokujyouhitoma) <rokujyouhitomajp@gmail.com>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2017-06-10 13:13+0000\n"
-"Last-Translator: Tohru Ike (rokujyouhitoma) <rokujyouhitomajp@gmail.com>\n"
+"PO-Revision-Date: 2017-07-27 05:10+0000\n"
+"Last-Translator: Tetsuji Ochiai <ochiaixp@gmail.com>\n"
"Language-Team: Japanese <https://hosted.weblate.org/projects/godot-engine/"
"godot/ja/>\n"
"Language: ja\n"
"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.15-dev\n"
+"X-Generator: Weblate 2.16-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -33,28 +34,33 @@ msgid "Move Add Key"
msgstr "追加ã—ãŸã‚­ãƒ¼ã‚’移動"
#: editor/animation_editor.cpp
+#, fuzzy
msgid "Anim Change Transition"
-msgstr ""
+msgstr "Anim é·ç§»ï¼ˆãƒˆãƒ©ãƒ³ã‚¸ã‚·ãƒ§ãƒ³ï¼‰"
#: editor/animation_editor.cpp
+#, fuzzy
msgid "Anim Change Transform"
-msgstr ""
+msgstr "Anim 変形(トランスフォーム)"
#: editor/animation_editor.cpp
msgid "Anim Change Value"
msgstr "値を変更"
#: editor/animation_editor.cpp
+#, fuzzy
msgid "Anim Change Call"
-msgstr ""
+msgstr "Anim コールã®å¤‰æ›´(Call)"
#: editor/animation_editor.cpp
+#, fuzzy
msgid "Anim Add Track"
-msgstr ""
+msgstr "Anim トラックを追加"
#: editor/animation_editor.cpp
+#, fuzzy
msgid "Anim Duplicate Keys"
-msgstr ""
+msgstr "Anim キーを複製"
#: editor/animation_editor.cpp
msgid "Move Anim Track Up"
@@ -134,12 +140,14 @@ msgid "Anim Move Keys"
msgstr "Anim キーã®ç§»å‹•"
#: editor/animation_editor.cpp
+#, fuzzy
msgid "Scale Selection"
-msgstr "スケールã®é¸æŠž"
+msgstr "縮尺(Scale)ã®é¸æŠž"
#: editor/animation_editor.cpp
+#, fuzzy
msgid "Scale From Cursor"
-msgstr ""
+msgstr "カーソル起点ã§ç¸®å°º(Scale)変更"
#: editor/animation_editor.cpp
msgid "Goto Next Step"
@@ -149,33 +157,42 @@ msgstr "次ã®ã‚¹ãƒ†ãƒƒãƒ—ã¸"
msgid "Goto Prev Step"
msgstr "å‰ã®ã‚¹ãƒ†ãƒƒãƒ—ã¸"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
-msgstr "Linear"
+msgstr "等速"
#: editor/animation_editor.cpp editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "Constant"
-msgstr "Constant"
+msgstr "一定"
#: editor/animation_editor.cpp
+#, fuzzy
msgid "In"
-msgstr "In"
+msgstr "トランジションイン"
#: editor/animation_editor.cpp
msgid "Out"
-msgstr "Out"
+msgstr "トランジションアウト"
#: editor/animation_editor.cpp
+#, fuzzy
msgid "In-Out"
-msgstr "In-Out"
+msgstr ""
+"最åˆã«æ–°ã—ã„è¦ç´ ãŒãƒˆãƒ©ãƒ³ã‚¸ã‚·ãƒ§ãƒ³ã‚¤ãƒ³ã—ã¦ã‹ã‚‰ç¾åœ¨ã®è¦ç´ ãŒãƒˆãƒ©ãƒ³ã‚¸ã‚·ãƒ§ãƒ³ã‚¢ã‚¦ãƒˆ"
+"ã™ã‚‹"
#: editor/animation_editor.cpp
msgid "Out-In"
-msgstr "Out-In"
+msgstr ""
+"最åˆã«ç¾åœ¨ã®è¦ç´ ãŒãƒˆãƒ©ãƒ³ã‚¸ã‚·ãƒ§ãƒ³ã‚¢ã‚¦ãƒˆã—ã¦ã‹ã‚‰æ–°ã—ã„è¦ç´ ãŒãƒˆãƒ©ãƒ³ã‚¸ã‚·ãƒ§ãƒ³ã‚¤ãƒ³"
+"ã™ã‚‹"
#: editor/animation_editor.cpp
+#, fuzzy
msgid "Transitions"
-msgstr ""
+msgstr "é·ç§»ï¼ˆãƒˆãƒ©ãƒ³ã‚¸ã‚·ãƒ§ãƒ³ï¼‰"
#: editor/animation_editor.cpp
msgid "Optimize Animation"
@@ -232,8 +249,9 @@ msgid "Anim Insert"
msgstr "Anim 挿入"
#: editor/animation_editor.cpp
+#, fuzzy
msgid "Anim Scale Keys"
-msgstr "Anim スケールキー"
+msgstr "Anim 拡大縮å°ã‚­ãƒ¼"
#: editor/animation_editor.cpp
msgid "Anim Add Call Track"
@@ -308,8 +326,9 @@ msgid "Optimize"
msgstr "最é©åŒ–"
#: editor/animation_editor.cpp
+#, fuzzy
msgid "Select an AnimationPlayer from the Scene Tree to edit animations."
-msgstr ""
+msgstr "シーンツリーã‹ã‚‰ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ãƒ—レイヤーをé¸æŠžã—アニメーション編集"
#: editor/animation_editor.cpp
msgid "Key"
@@ -321,7 +340,7 @@ msgstr "é·ç§»"
#: editor/animation_editor.cpp
msgid "Scale Ratio:"
-msgstr "スケールã®æ¯”率:"
+msgstr "拡大縮å°æ¯”:"
#: editor/animation_editor.cpp
msgid "Call Functions in Which Node?"
@@ -360,32 +379,36 @@ msgid "Change Array Value"
msgstr "é…列ã®å€¤ã‚’変更"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Free"
-msgstr ""
+msgstr "解放"
#: editor/asset_library_editor_plugin.cpp editor/editor_plugin_settings.cpp
+#, fuzzy
msgid "Version:"
-msgstr ""
+msgstr "ãƒãƒ¼ã‚¸ãƒ§ãƒ³:"
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Contents:"
-msgstr "継続的"
+msgstr "コンテンツ:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "View Files"
-msgstr "ファイル:"
+msgstr "ビューファイル:"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
#: editor/editor_help.cpp editor/property_selector.cpp
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Description:"
-msgstr ""
+msgstr "記述:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
+#, fuzzy
msgid "Install"
-msgstr ""
+msgstr "インストール"
#: editor/asset_library_editor_plugin.cpp editor/call_dialog.cpp
#: editor/connections_dialog.cpp editor/export_template_manager.cpp
@@ -394,158 +417,184 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
-msgstr ""
+msgstr "ホストåを解決ã§ãã¾ã›ã‚“:"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Can't resolve."
-msgstr ""
+msgstr "解決ã§ãã¾ã›ã‚“."
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Connection error, please try again."
-msgstr ""
+msgstr "接続失敗 å†è©¦è¡Œã‚’"
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Can't connect."
-msgstr "接続"
+msgstr "接続失敗."
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Can't connect to host:"
-msgstr "ノードã«æŽ¥ç¶šã—ã¾ã™ã€‚"
+msgstr "ホストã«æŽ¥ç¶šã§ãã¾ã›ã‚“:"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "No response from host:"
-msgstr ""
+msgstr "ホストã‹ã‚‰å¿œç­”ãŒã‚ã‚Šã¾ã›ã‚“:"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "No response."
-msgstr ""
+msgstr "応答ãŒã‚ã‚Šã¾ã›ã‚“."
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Request failed, return code:"
-msgstr ""
+msgstr "リクエスト失敗 リターン コード:"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Req. Failed."
-msgstr ""
+msgstr "リクエスト失敗."
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Request failed, too many redirects"
-msgstr ""
+msgstr "リクエスト失敗 リダイレクトã®å›žæ•°ãŒå¤šã™ãŽã¾ã™"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Redirect Loop."
-msgstr ""
+msgstr "リダイレクトã®ãƒ«ãƒ¼ãƒ—."
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Failed:"
-msgstr ""
+msgstr "失敗:"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Bad download hash, assuming file has been tampered with."
-msgstr ""
+msgstr "ダウンロード内容ã®ãƒãƒƒã‚·ãƒ¥ãŒä¸æ•´åˆã€€æ”¹ã–ã‚“ã®å¯èƒ½æ€§ãŒã‚ã‚Šã¾ã™."
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Expected:"
-msgstr ""
+msgstr "予測:"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Got:"
-msgstr ""
+msgstr "å–å¾—:"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Failed sha256 hash check"
-msgstr ""
+msgstr "sha256ã®ãƒãƒƒã‚·ãƒ¥ãƒã‚§ãƒƒã‚¯å¤±æ•—"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Asset Download Error:"
-msgstr ""
+msgstr "アセットã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰å¤±æ•—:"
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#, fuzzy
msgid "Success!"
-msgstr ""
+msgstr "æˆåŠŸï¼"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Fetching:"
-msgstr ""
+msgstr "å–得中:"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Resolving.."
-msgstr ""
+msgstr "解決中.."
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Connecting.."
-msgstr "接続"
+msgstr "接続中.."
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Requesting.."
-msgstr "テスト中"
+msgstr "リクエスト中.."
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
msgid "Error making request"
-msgstr "フォント読ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼ã€‚"
+msgstr "リクエスト発行エラー"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Idle"
-msgstr ""
+msgstr "待機中"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Retry"
-msgstr ""
+msgstr "å†è©¦è¡Œ"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Download Error"
-msgstr ""
+msgstr "ダウンロード失敗"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Download for this asset is already in progress!"
-msgstr ""
+msgstr "ã“ã®ã‚¢ã‚»ãƒƒãƒˆã®ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰ã¯æ—¢ã«é€²è¡Œä¸­ï¼"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "first"
-msgstr ""
+msgstr "最åˆã®"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "prev"
-msgstr ""
+msgstr "å‰ã®"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "next"
-msgstr ""
+msgstr "次ã®"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "last"
-msgstr ""
+msgstr "最後ã®"
#: editor/asset_library_editor_plugin.cpp
msgid "All"
-msgstr "ã™ã¹ã¦"
+msgstr "ã™ã¹ã¦ã®"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
+#, fuzzy
msgid "Search:"
msgstr "検索:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
+#, fuzzy
msgid "Search"
msgstr "検索"
@@ -559,77 +608,95 @@ msgstr "検索"
#: editor/io_plugins/editor_translation_import_plugin.cpp
#: editor/project_manager.cpp
msgid "Import"
-msgstr ""
+msgstr "インãƒãƒ¼ãƒˆï¼ˆå–ã‚Šè¾¼ã¿ï¼‰"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
+#, fuzzy
msgid "Plugins"
-msgstr ""
+msgstr "プラグイン"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Sort:"
msgstr "並ã¹æ›¿ãˆ:"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Reverse"
msgstr "逆"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
+#, fuzzy
msgid "Category:"
msgstr "カテゴリー:"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Site:"
msgstr "サイト:"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Support.."
-msgstr "サãƒãƒ¼ãƒˆ."
+msgstr "サãƒãƒ¼ãƒˆ.."
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Official"
msgstr "å…¬å¼"
#: editor/asset_library_editor_plugin.cpp editor/editor_node.cpp
+#, fuzzy
msgid "Community"
msgstr "コミュニティ"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Testing"
msgstr "テスト中"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Assets ZIP File"
-msgstr ""
+msgstr "アセットã®zipファイル"
#: editor/call_dialog.cpp
+#, fuzzy
msgid "Method List For '%s':"
msgstr "'%s' ã®ãƒ¡ã‚½ãƒƒãƒ‰ä¸€è¦§ï¼š"
#: editor/call_dialog.cpp modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Call"
msgstr "呼ã³å‡ºã—"
#: editor/call_dialog.cpp
+#, fuzzy
msgid "Method List:"
msgstr "メソッド一覧:"
#: editor/call_dialog.cpp
+#, fuzzy
msgid "Arguments:"
msgstr "引数:"
#: editor/call_dialog.cpp
+#, fuzzy
msgid "Return:"
msgstr "戻り値:"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Go to Line"
msgstr "è¡Œã«ç§»å‹•"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Line Number:"
msgstr "行番å·:"
#: editor/code_editor.cpp
+#, fuzzy
msgid "No Matches"
msgstr "一致ãªã—"
@@ -639,186 +706,224 @@ msgid "Replaced %d occurrence(s)."
msgstr "%d 箇所を置æ›ã—ã¾ã—ãŸã€‚"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Replace"
msgstr "ç½®æ›"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Replace All"
msgstr "ã™ã¹ã¦ç½®æ›"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Match Case"
-msgstr "大文字ã¨å°æ–‡å­—"
+msgstr "大文字å°æ–‡å­—を区別ã™ã‚‹"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Whole Words"
msgstr "å˜èªžå…¨ä½“"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Selection Only"
msgstr "é¸æŠžç¯„囲ã®ã¿"
#: editor/code_editor.cpp editor/editor_help.cpp
+#, fuzzy
msgid "Find"
msgstr "検索"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Next"
msgstr "次"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Not found!"
msgstr "見ã¤ã‹ã‚Šã¾ã›ã‚“!"
#: editor/code_editor.cpp
msgid "Replace By"
-msgstr "ç½®æ›"
+msgstr "ã§ç½®æ›ã™ã‚‹"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Case Sensitive"
msgstr "大文字å°æ–‡å­—を区別"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Backwards"
msgstr "後方"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Prompt On Replace"
-msgstr ""
+msgstr "ç½®æ›æ™‚ã«ç¢ºèª"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Skip"
msgstr "スキップ"
#: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Zoom In"
msgstr "ズームイン"
#: editor/code_editor.cpp editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Zoom Out"
msgstr "ズームアウト"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Reset Zoom"
-msgstr ""
+msgstr "ズームをリセット"
#: editor/code_editor.cpp editor/script_editor_debugger.cpp
msgid "Line:"
msgstr "ライン:"
#: editor/code_editor.cpp
+#, fuzzy
msgid "Col:"
-msgstr ""
+msgstr "縦:"
#: editor/connections_dialog.cpp
msgid "Method in target Node must be specified!"
msgstr "対象ã¨ãªã‚‹ãƒŽãƒ¼ãƒ‰ã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™!"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid ""
"Target method not found! Specify a valid method or attach a script to target "
"Node."
msgstr ""
+"対象メソッドãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ メソッドを指定ã™ã‚‹ã‹å¯¾è±¡ãƒŽãƒ¼ãƒ‰ã«ã‚¹ã‚¯ãƒªãƒ—トを付"
+"加ã—ã¦ãã ã•ã„"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid "Connect To Node:"
-msgstr "ノードã«æŽ¥ç¶šã—ã¾ã™ã€‚"
+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.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
+#, fuzzy
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.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Remove"
msgstr "削除"
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Add Extra Call Argument:"
-msgstr "余分ã«å‘¼ã³å‡ºã—引数を追加ã—ã¾ã™ã€‚"
+msgstr "呼ã³å‡ºã—引数を追加ã—ã¾ã™ã€‚"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid "Extra Call Arguments:"
-msgstr ""
+msgstr "追加呼ã³å‡ºã—引数:"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid "Path to Node:"
msgstr "ノードã¸ã®ãƒ‘ス:"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid "Make Function"
msgstr "関数を作æˆ"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid "Deferred"
-msgstr ""
+msgstr "é…延"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid "Oneshot"
-msgstr ""
+msgstr "一括"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid "Connect"
msgstr "接続"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid "Connect '%s' to '%s'"
msgstr "'%s' ã‚’ '%s' ã«æŽ¥ç¶š"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid "Connecting Signal:"
-msgstr "ä¿¡å·ã‚’接続:"
+msgstr "シグナルを接続:"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid "Create Subscription"
-msgstr ""
+msgstr "サブスクリプションã®ç”Ÿæˆ"
#: editor/connections_dialog.cpp
+#, fuzzy
msgid "Connect.."
-msgstr ""
+msgstr "接続.."
#: editor/connections_dialog.cpp
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Disconnect"
-msgstr ""
+msgstr "切断"
#: editor/connections_dialog.cpp editor/node_dock.cpp
+#, fuzzy
msgid "Signals"
-msgstr ""
+msgstr "シグナル"
#: editor/create_dialog.cpp
msgid "Create New"
-msgstr ""
+msgstr "æ–°è¦ã«ç”Ÿæˆ"
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Favorites:"
-msgstr ""
+msgstr "ãŠæ°—ã«å…¥ã‚Š:"
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
msgid "Recent:"
-msgstr ""
+msgstr "最近ã®:"
#: editor/create_dialog.cpp editor/editor_help.cpp
#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/quick_open.cpp
+#, fuzzy
msgid "Matches:"
-msgstr ""
+msgstr "一致:"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid "Search Replacement For:"
-msgstr ""
+msgstr "検索ã—ã¦ç½®æ›"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid "Dependencies For:"
-msgstr ""
+msgstr "~ã¨ä¾å­˜é–¢ä¿‚ã«ã‚ã‚‹:"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid ""
"Scene '%s' is currently being edited.\n"
"Changes will not take effect unless reloaded."
@@ -827,199 +932,457 @@ msgstr ""
"å†èª­ã¿è¾¼ã¿ã—ãªã„é™ã‚Šã€å¤‰æ›´ã¯å映ã•ã‚Œã¾ã›ã‚“。"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid ""
"Resource '%s' is in use.\n"
"Changes will take effect when reloaded."
msgstr ""
+"リソース '%s' ã¯ä½¿ç”¨ä¸­ã§ã™\n"
+"変更ã¯å†èª­è¾¼æ™‚ã«é©ç”¨ã•ã‚Œã¾ã™"
#: editor/dependency_editor.cpp
msgid "Dependencies"
-msgstr ""
+msgstr "ä¾å­˜é–¢ä¿‚"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid "Resource"
-msgstr ""
+msgstr "リソース"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Path"
-msgstr ""
+msgstr "パス"
#: editor/dependency_editor.cpp
msgid "Dependencies:"
-msgstr ""
+msgstr "ä¾å­˜é–¢ä¿‚:"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid "Fix Broken"
-msgstr ""
+msgstr "修復"
#: editor/dependency_editor.cpp
msgid "Dependency Editor"
-msgstr ""
+msgstr "ä¾å­˜é–¢ä¿‚エディタ"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid "Search Replacement Resource:"
-msgstr ""
+msgstr "ç½®æ›ã™ã‚‹ãƒªã‚½ãƒ¼ã‚¹ã‚’探ã™:"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid "Owners Of:"
-msgstr ""
+msgstr "~ã®ã‚ªãƒ¼ãƒŠãƒ¼:"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid ""
"The files being removed are required by other resources in order for them to "
"work.\n"
"Remove them anyway? (no undo)"
msgstr ""
+"å–り除ã“ã†ã¨ã—ã¦ã„るファイルã¯ä»–ã®ãƒªã‚½ãƒ¼ã‚¹ã®å‹•ä½œã«å¿…è¦ã§ã™. 本当ã«å–り除ãã¾"
+"ã™ã‹ï¼Ÿï¼ˆundoã§ãã¾ã›ã‚“)"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid "Remove selected files from the project? (no undo)"
-msgstr ""
+msgstr "é¸æŠžã—ãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚’プロジェクトã‹ã‚‰å–り除ã(å–り消ã—ã§ãã¾ã›ã‚“)"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid "Error loading:"
-msgstr ""
+msgstr "読ã¿è¾¼ã¿å¤±æ•—:"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid "Scene failed to load due to missing dependencies:"
-msgstr "ä¾å­˜é–¢ä¿‚ãŒä¸è¶³ã—ã¦ã„ã‚‹ã®ãŸã‚シーンを読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸã€‚"
+msgstr "ä¾å­˜é–¢ä¿‚ãŒç¢ºèªã§ããšã€ã‚·ãƒ¼ãƒ³ã‚’読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ:"
#: editor/dependency_editor.cpp editor/editor_node.cpp
+#, fuzzy
msgid "Open Anyway"
-msgstr ""
+msgstr "ã¨ã‚‚ã‹ãé–‹ã"
#: editor/dependency_editor.cpp
msgid "Which action should be taken?"
-msgstr ""
+msgstr "ã©ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’実行ã—ã¾ã™ã‹?"
#: editor/dependency_editor.cpp
msgid "Fix Dependencies"
-msgstr ""
+msgstr "ä¾å­˜é–¢ä¿‚ã®ä¿®å¾©"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid "Errors loading!"
-msgstr ""
+msgstr "読ã¿è¾¼ã¿å¤±æ•—!"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid "Permanently delete %d item(s)? (No undo!)"
-msgstr ""
+msgstr "永久ã«%d を削除(undoä¸å¯ï¼‰"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid "Owns"
-msgstr ""
+msgstr "ä¿æŒã™ã‚‹"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid "Resources Without Explicit Ownership:"
-msgstr ""
+msgstr "オーナーãŒæ˜Žç¤ºã•ã‚Œã¦ã„ãªã„リソース"
#: editor/dependency_editor.cpp editor/editor_node.cpp
+#, fuzzy
msgid "Orphan Resource Explorer"
-msgstr ""
+msgstr "無オーナーリソース用エクスプローラー"
#: editor/dependency_editor.cpp
+#, fuzzy
msgid "Delete selected files?"
-msgstr ""
+msgstr "é¸æŠžã—ãŸãƒ•ã‚¡ã‚¤ãƒ«ã‚’消去ã—ã¾ã™ã‹?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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
+#, fuzzy
msgid "Delete"
+msgstr "消去"
+
+#: editor/editor_about.cpp
+msgid "Thanks from the Godot community!"
+msgstr "Godotコミュニティより感è¬ã‚’!"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Thanks!"
+msgstr "ã‚ã‚ŠãŒã¨ã†!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr "Godotエンジンã«è²¢çŒ®ã—ãŸäººã€…"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "作者:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "プロジェクトマãƒãƒ¼ã‚¸ãƒ£ãƒ¼"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Lead Developer"
+msgstr "開発者"
+
+#: editor/editor_about.cpp editor/project_manager.cpp
+msgid "Project Manager"
+msgstr "プロジェクトマãƒãƒ¼ã‚¸ãƒ£ãƒ¼"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Developers"
+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
+#, fuzzy
+msgid "All Components"
+msgstr "コンテンツ:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "éžåœ§ç¸®"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "パッケージインストールæˆåŠŸ!"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "パッケージインストールæˆåŠŸ!"
+
#: editor/editor_audio_buses.cpp
-msgid "Save Audio Bus Layout As.."
+msgid "Speakers"
msgstr ""
#: editor/editor_audio_buses.cpp
-msgid "Location for New Layout.."
+#, fuzzy
+msgid "Add Effect"
+msgstr "イベントを追加"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "オーディオãƒã‚¹ã®ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã‚’é–‹ã"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Solo"
+msgstr "オーディオãƒã‚¹ã®ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã‚’é–‹ã"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "é¸æŠžç¯„囲を消去"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "複製"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "é¸æŠžç¯„囲を消去"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "ãƒã‚¹ã‚’追加ã™ã‚‹"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
msgstr ""
#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "レイアウトã®æ¶ˆåŽ»"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "アニメーションを複製"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "移動動作"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Save Audio Bus Layout As.."
+msgstr "オーディオãƒã‚¹ã®ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã‚’別åã§ä¿å­˜"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Location for New Layout.."
+msgstr "æ–°ã—ã„レイアウトã®ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³.."
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
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 "Add Bus"
+#, fuzzy
+msgid "Invalid file, not an audio bus layout."
msgstr ""
+"ファイル拡張å­ãŒä¸æ­£ã§ã™.\n"
+" .fontを使ã£ã¦ãã ã•ã„."
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Bus"
+msgstr "ãƒã‚¹ã‚’追加ã™ã‚‹"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "æ–°ã—ã„リソースを生æˆ"
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
+#, fuzzy
msgid "Load"
-msgstr ""
+msgstr "読ã¿è¾¼ã‚€"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Load an existing Bus Layout."
+msgstr "既存ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’ディスクã‹ã‚‰èª­ã¿è¾¼ã¿ç·¨é›†ã™ã‚‹"
#: editor/editor_audio_buses.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Save As"
-msgstr ""
+msgstr "åå‰ã‚’付ã‘ã¦ä¿å­˜ã™ã‚‹"
-#: editor/editor_audio_buses.cpp editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Save this Bus Layout to a file."
+msgstr "オーディオãƒã‚¹ã®ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆã‚’別åã§ä¿å­˜"
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+msgid "Load Default"
+msgstr "標準(既定)"
+
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
msgstr ""
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Invalid name."
-msgstr ""
+msgstr "無効ãªåå‰ã§ã™."
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Valid characters:"
-msgstr ""
+msgstr "使用å¯èƒ½ãªæ–‡å­—:"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Invalid name. Must not collide with an existing engine class name."
-msgstr ""
+msgstr "無効ãªåå‰ã§ã™. 既存ã®ã‚¨ãƒ³ã‚¸ãƒ³ã‚¯ãƒ©ã‚¹ã®åå‰ã¨è¡çªã—ã¦ã¯ã„ã‘ã¾ã›ã‚“."
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Invalid name. Must not collide with an existing buit-in type name."
-msgstr ""
+msgstr "無効ãªåå‰ã§ã™. 既存ã®çµ„ã¿è¾¼ã¿åž‹ã®åå‰ã¨è¡çªã—ã¦ã¯ã„ã‘ã¾ã›ã‚“."
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Invalid name. Must not collide with an existing global constant name."
-msgstr ""
+msgstr "無効ãªåå‰ã§ã™. 既存ã®ã‚°ãƒ­ãƒ¼ãƒãƒ«å®šæ•°ã®åå‰ã¨è¡çªã—ã¦ã¯ã„ã‘ã¾ã›ã‚“."
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Invalid Path."
-msgstr ""
+msgstr "無効ãªãƒ‘スã§ã™."
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "File does not exist."
-msgstr ""
+msgstr "ファイルãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“."
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Not in resource path."
-msgstr ""
+msgstr "リソースã®ãƒ‘スã§ã¯è¦‹ã¤ã‹ã‚Šã¾ã›ã‚“"
#: editor/editor_autoload_settings.cpp
msgid "Add AutoLoad"
-msgstr ""
+msgstr "自動読ã¿è¾¼ã¿ã‚’付加"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Autoload '%s' already exists!"
-msgstr ""
+msgstr "既存ã®'%s' を自動読ã¿è¾¼ã¿ã—ã¾ã™!"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Rename Autoload"
-msgstr ""
+msgstr "自動読ã¿è¾¼ã¿ã‚’åå‰å¤‰æ›´"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Toggle AutoLoad Globals"
-msgstr ""
+msgstr "自動読ã¿è¾¼ã¿ã™ã‚‹ã‚°ãƒ­ãƒ¼ãƒãƒ«ã‚’切替"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Move Autoload"
-msgstr ""
+msgstr "自動読ã¿è¾¼ã¿ã‚’移動ã™ã‚‹"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Remove Autoload"
-msgstr ""
+msgstr "自動読ã¿è¾¼ã¿ã‚’å–り除ã"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Enable"
-msgstr ""
+msgstr "有効ã«ã™ã‚‹"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Rearrange Autoloads"
-msgstr ""
+msgstr "自動読ã¿è¾¼ã¿ã‚’組ã¿æ›¿ãˆã‚‹"
#: editor/editor_autoload_settings.cpp editor/editor_file_dialog.cpp
#: editor/io_plugins/editor_font_import_plugin.cpp scene/gui/file_dialog.cpp
@@ -1027,43 +1390,53 @@ msgid "Path:"
msgstr "Path:"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Node Name:"
-msgstr ""
+msgstr "ノードã®åå‰:"
#: editor/editor_autoload_settings.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp editor/project_manager.cpp
+#, fuzzy
msgid "Name"
-msgstr ""
+msgstr "åå‰"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Singleton"
-msgstr ""
+msgstr "シングルトン"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "List:"
-msgstr ""
+msgstr "リスト:"
#: editor/editor_data.cpp
msgid "Updating Scene"
msgstr "シーンを更新"
#: editor/editor_data.cpp
+#, fuzzy
msgid "Storing local changes.."
-msgstr ""
+msgstr "ローカル環境ã®å¤‰æ›´ã‚’ä¿å­˜ã™ã‚‹.."
#: editor/editor_data.cpp
msgid "Updating scene.."
msgstr "シーンを更新ã—ã¦ã„ã¾ã™.."
#: editor/editor_dir_dialog.cpp
-msgid "Choose a Directory"
+msgid "Please select a base directory first"
msgstr ""
+#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Choose a Directory"
+msgstr "ディレクトリをé¸ã¶"
+
#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
#: scene/gui/file_dialog.cpp
msgid "Create Folder"
-msgstr "フォルダを作æˆ"
+msgstr "フォルダを作æˆã™ã‚‹"
#: editor/editor_dir_dialog.cpp editor/editor_file_dialog.cpp
#: editor/editor_plugin_settings.cpp editor/plugins/theme_editor_plugin.cpp
@@ -1077,52 +1450,62 @@ msgid "Could not create folder."
msgstr "フォルダを作æˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
#: editor/editor_dir_dialog.cpp
+#, fuzzy
msgid "Choose"
-msgstr ""
+msgstr "é¸ã¶"
#: editor/editor_export.cpp
+#, fuzzy
msgid "Storing File:"
-msgstr ""
+msgstr "ファイルをä¿å­˜ã™ã‚‹:"
#: editor/editor_export.cpp
+#, fuzzy
msgid "Packing"
-msgstr ""
+msgstr "パッキングã™ã‚‹"
#: editor/editor_export.cpp platform/javascript/export/export.cpp
+#, fuzzy
msgid "Template file not found:\n"
-msgstr ""
+msgstr "テンプレートファイルãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“:\n"
#: editor/editor_export.cpp
+#, fuzzy
msgid "Added:"
-msgstr ""
+msgstr "加ãˆãŸã®ã¯:"
#: editor/editor_export.cpp
msgid "Removed:"
-msgstr ""
+msgstr "å–り除ã„ãŸã®ã¯:"
#: editor/editor_export.cpp
+#, fuzzy
msgid "Error saving atlas:"
-msgstr ""
+msgstr "アトラスã®ä¿å­˜ã«å¤±æ•—ã—ã¾ã—ãŸ:"
#: editor/editor_export.cpp
+#, fuzzy
msgid "Could not save atlas subtexture:"
-msgstr ""
+msgstr "アトラスã®è¦ç´ ã§ã‚るテクスãƒãƒ£ã®ä¿å­˜ãŒã§ãã¾ã›ã‚“:"
#: editor/editor_export.cpp
+#, fuzzy
msgid "Exporting for %s"
-msgstr ""
+msgstr "%sã«ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆä¸­"
#: editor/editor_export.cpp
+#, fuzzy
msgid "Setting Up.."
-msgstr ""
+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
+#, fuzzy
msgid "All Recognized"
-msgstr "ã™ã¹ã¦ã®èªè­˜"
+msgstr "知られã¦ã„ã‚‹ã™ã¹ã¦ã®"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "All Files (*)"
@@ -1134,6 +1517,22 @@ msgstr "ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«(*)"
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
@@ -1145,52 +1544,63 @@ msgid "Save a File"
msgstr "ファイルをä¿å­˜"
#: editor/editor_file_dialog.cpp
+#, fuzzy
msgid "Go Back"
-msgstr ""
+msgstr "戻る"
#: editor/editor_file_dialog.cpp
+#, fuzzy
msgid "Go Forward"
-msgstr ""
+msgstr "進む"
#: editor/editor_file_dialog.cpp
+#, fuzzy
msgid "Go Up"
-msgstr ""
+msgstr "上ã«å‘ã‹ã†"
#: editor/editor_file_dialog.cpp
+#, fuzzy
msgid "Refresh"
-msgstr ""
+msgstr "å†èª­è¾¼"
#: editor/editor_file_dialog.cpp
+#, fuzzy
msgid "Toggle Hidden Files"
-msgstr ""
+msgstr "éš ã—ファイルを切り替ãˆã‚‹"
#: editor/editor_file_dialog.cpp
+#, fuzzy
msgid "Toggle Favorite"
-msgstr ""
+msgstr "ãŠæ°—ã«å…¥ã‚Šã‚’切り替ãˆã‚‹"
#: editor/editor_file_dialog.cpp
+#, fuzzy
msgid "Toggle Mode"
-msgstr ""
+msgstr "モードを切り替ãˆã‚‹"
#: editor/editor_file_dialog.cpp
+#, fuzzy
msgid "Focus Path"
-msgstr ""
+msgstr "フォーカスã¸ã®ãƒ‘ス"
#: editor/editor_file_dialog.cpp
+#, fuzzy
msgid "Move Favorite Up"
-msgstr ""
+msgstr "ãŠæ°—ã«å…¥ã‚Šã‚’上ã’ã‚‹"
#: editor/editor_file_dialog.cpp
+#, fuzzy
msgid "Move Favorite Down"
-msgstr ""
+msgstr "ãŠæ°—ã«å…¥ã‚Šã‚’下ã’ã‚‹"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
msgstr "ディレクトリã¾ãŸã¯ãƒ•ã‚¡ã‚¤ãƒ«:"
#: editor/editor_file_dialog.cpp
+#, fuzzy
msgid "Preview:"
-msgstr ""
+msgstr "プレビュー:"
#: editor/editor_file_dialog.cpp editor/script_editor_debugger.cpp
#: scene/gui/file_dialog.cpp
@@ -1206,77 +1616,103 @@ msgid "Must use a valid extension."
msgstr "有効ãªæ‹¡å¼µå­ã‚’使用ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"
#: editor/editor_file_system.cpp
+#, fuzzy
msgid "ScanSources"
-msgstr ""
+msgstr "ソース走査"
#: editor/editor_file_system.cpp
msgid "(Re)Importing Assets"
-msgstr ""
+msgstr "アセットを(å†ï¼‰ã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
#: editor/editor_help.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Search Help"
-msgstr ""
+msgstr "ヘルプを検索"
#: editor/editor_help.cpp
+#, fuzzy
msgid "Class List:"
-msgstr ""
+msgstr "クラスã®ãƒªã‚¹ãƒˆ:"
#: editor/editor_help.cpp
+#, fuzzy
msgid "Search Classes"
-msgstr ""
+msgstr "クラスã®æ¤œç´¢"
#: editor/editor_help.cpp editor/property_editor.cpp
+#, fuzzy
msgid "Class:"
-msgstr ""
+msgstr "クラス:"
#: editor/editor_help.cpp editor/scene_tree_editor.cpp
+#, fuzzy
msgid "Inherits:"
-msgstr ""
+msgstr "継承:"
#: editor/editor_help.cpp
+#, fuzzy
msgid "Inherited by:"
-msgstr ""
+msgstr "~ã«ç¶™æ‰¿ã•ã‚Œã‚‹:"
#: editor/editor_help.cpp
+#, fuzzy
msgid "Brief Description:"
-msgstr ""
+msgstr "è¦ç´„:"
#: editor/editor_help.cpp modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Members:"
-msgstr ""
+msgstr "メンãƒãƒ¼:"
#: editor/editor_help.cpp
+#, fuzzy
msgid "Public Methods:"
-msgstr ""
+msgstr "公開メソッド:"
#: editor/editor_help.cpp
+#, fuzzy
msgid "GUI Theme Items:"
-msgstr ""
+msgstr "GUIテーマã®éƒ¨å“:"
#: editor/editor_help.cpp modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Signals:"
+msgstr "シグナル:"
+
+#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "アニメーション"
+
+#: editor/editor_help.cpp
+msgid "enum "
msgstr ""
#: editor/editor_help.cpp
+#, fuzzy
msgid "Constants:"
-msgstr ""
+msgstr "定数:"
#: editor/editor_help.cpp
+#, fuzzy
msgid "Property Description:"
-msgstr ""
+msgstr "プロパティã«ã¤ã„ã¦ã®è¨˜è¼‰:"
#: editor/editor_help.cpp
+#, fuzzy
msgid "Method Description:"
-msgstr ""
+msgstr "メソッドã«ã¤ã„ã¦ã®è¨˜è¼‰:"
#: editor/editor_help.cpp
+#, fuzzy
msgid "Search Text"
-msgstr ""
+msgstr "テキストを探ã™"
#: editor/editor_log.cpp
-msgid " Output:"
-msgstr ""
+#, fuzzy
+msgid "Output:"
+msgstr " 出力:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/rich_text_editor_plugin.cpp editor/property_editor.cpp
@@ -1287,114 +1723,142 @@ msgstr "削除"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
#: editor/resources_dock.cpp
+#, fuzzy
msgid "Error saving resource!"
-msgstr ""
+msgstr "リソースä¿å­˜ã‚¨ãƒ©ãƒ¼!"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
#: editor/resources_dock.cpp
+#, fuzzy
msgid "Save Resource As.."
-msgstr ""
+msgstr "~ã¨ã„ã†åå‰ã§ãƒªã‚½ãƒ¼ã‚¹ã‚’ä¿å­˜ã™ã‚‹"
#: editor/editor_node.cpp editor/export_template_manager.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
+#, fuzzy
msgid "I see.."
-msgstr ""
+msgstr "ã‚ã‹ã£ãŸ.."
#: editor/editor_node.cpp
+#, fuzzy
msgid "Can't open file for writing:"
-msgstr ""
+msgstr "ファイルを開ã„ã¦æ›¸ãè¾¼ã‚ã¾ã›ã‚“:"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Requested file format unknown:"
-msgstr ""
+msgstr "ãã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯æœªçŸ¥ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã§ã™:"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Error while saving."
-msgstr ""
+msgstr "ä¿å­˜ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒèµ·ãã¾ã—ãŸ."
#: editor/editor_node.cpp
msgid "Saving Scene"
msgstr "シーンをä¿å­˜"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Analyzing"
-msgstr ""
+msgstr "分æžä¸­"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Creating Thumbnail"
-msgstr ""
+msgstr "サムãƒã‚¤ãƒ«ã‚’作æˆã—ã¦ã„ã¾ã™"
#: editor/editor_node.cpp
#, fuzzy
+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
+#, fuzzy
msgid "Failed to load resource."
-msgstr ""
+msgstr "リソース読ã¿è¾¼ã¿å¤±æ•—"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Can't load MeshLibrary for merging!"
-msgstr ""
+msgstr "マージã™ã‚‹ãƒ¡ãƒƒã‚·ãƒ¥ãƒ©ã‚¤ãƒ–ラリーã®èª­ã¿è¾¼ã¿å¤±æ•—"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Error saving MeshLibrary!"
-msgstr ""
+msgstr "メッシュライブラリーã®ä¿å­˜ã‚¨ãƒ©ãƒ¼!"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Can't load TileSet for merging!"
-msgstr ""
+msgstr "マージã™ã‚‹ã‚¿ã‚¤ãƒ«ã‚»ãƒƒãƒˆã®èª­ã¿è¾¼ã¿å¤±æ•—"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Error saving TileSet!"
-msgstr ""
+msgstr "タイルセットã®ä¿å­˜ã‚¨ãƒ©ãƒ¼!"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Error trying to save layout!"
-msgstr ""
+msgstr "レイアウトã®ä¿å­˜ã‚¨ãƒ©ãƒ¼"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Default editor layout overridden."
-msgstr ""
+msgstr "エディタã®æ¨™æº–レイアウトを上書ãã—ã¾ã—ãŸ."
#: editor/editor_node.cpp
+#, fuzzy
msgid "Layout name not found!"
-msgstr ""
+msgstr "レイアウトåãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Restored default layout to base settings."
-msgstr ""
+msgstr "標準レイアウトを基本設定ã«æˆ»ã—ã¾ã—ãŸ"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Copy Params"
-msgstr ""
+msgstr "パラメーターをコピーã™ã‚‹"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Paste Params"
-msgstr ""
+msgstr "パラメーターを張り付ã‘ã‚‹"
#: editor/editor_node.cpp editor/plugins/resource_preloader_editor_plugin.cpp
+#, fuzzy
msgid "Paste Resource"
-msgstr ""
+msgstr "リソースを張り付ã‘ã‚‹"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Copy Resource"
-msgstr ""
+msgstr "リソースをコピーã™ã‚‹"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Make Built-In"
-msgstr ""
+msgstr "ビルトインを作る"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Make Sub-Resources Unique"
-msgstr ""
+msgstr "一æ„ã®ï¼ˆï¼ä»–ã¨é‡è¤‡ã—ãªã„)サブリソースを生æˆ"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Open in Help"
-msgstr ""
+msgstr "ヘルプを開ã"
#: editor/editor_node.cpp
#, fuzzy
@@ -1413,11 +1877,15 @@ msgstr ""
"'アプリケーション' カテゴリã®ä¸‹ã®'プロジェクトã®è¨­å®š'ã§å¤‰æ›´ã§ãã¾ã™ã€‚"
#: editor/editor_node.cpp
+#, fuzzy
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 ""
+"é¸æŠžã—ãŸã‚·ãƒ¼ãƒ³'%s' ã¯å­˜åœ¨ã—ã¾ã›ã‚“ 有効ãªã‚·ãƒ¼ãƒ³ã‚’指定ã—ã¦ãã ã•ã„\n"
+"指定ã•ã‚ŒãŸã‚·ãƒ¼ãƒ³ã¯å¾Œã§\"アプリケーション\"ã®\"プロジェクトã®è¨­å®š\"ã‹ã‚‰å¤‰æ›´å¯"
+"能ã§ã™"
#: editor/editor_node.cpp
#, fuzzy
@@ -1438,51 +1906,97 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Could not start subprocess!"
-msgstr ""
+msgstr "サブプロセスを開始ã§ãã¾ã›ã‚“!"
#: editor/editor_node.cpp
msgid "Open Scene"
msgstr "シーンを開ã"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Open Base Scene"
-msgstr ""
+msgstr "基本シーンを開ã"
#: editor/editor_node.cpp
msgid "Quick Open Scene.."
-msgstr ""
+msgstr "シーンã®ã‚¯ã‚¤ãƒƒã‚¯ã‚ªãƒ¼ãƒ—ン.."
#: editor/editor_node.cpp
+#, fuzzy
msgid "Quick Open Script.."
-msgstr ""
+msgstr "スクリプトã®ã‚¯ã‚¤ãƒƒã‚¯ã‚ªãƒ¼ãƒ—ン.."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr ""
+#, fuzzy
+msgid "Save & Close"
+msgstr "ファイルをä¿å­˜"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
msgid "Save Scene As.."
-msgstr ""
+msgstr "~ã®åå‰ã§ã‚·ãƒ¼ãƒ³ã‚’ä¿å­˜ã™ã‚‹"
#: editor/editor_node.cpp
+#, fuzzy
msgid "No"
-msgstr ""
+msgstr "ã„ã„ãˆ"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Yes"
+msgstr "ã¯ã„"
#: editor/editor_node.cpp
+#, fuzzy
msgid "This scene has never been saved. Save before running?"
-msgstr ""
+msgstr "ã“ã®ã‚·ãƒ¼ãƒ³ã¯ä¿å­˜ã•ã‚Œã¦ã„ã¾ã›ã‚“. runã™ã‚‹å‰ã«ä¿å­˜ã—ã¾ã™ã‹?"
+
+#: editor/editor_node.cpp editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "This operation can't be done without a scene."
+msgstr "ã“ã®å‡¦ç†ã«ã¯ã‚·ãƒ¼ãƒ³ãŒå¿…è¦ã§ã™."
#: editor/editor_node.cpp
msgid "Export Mesh Library"
-msgstr ""
+msgstr "メッシュライブラリã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ"
#: editor/editor_node.cpp
msgid "Export Tile Set"
-msgstr ""
+msgstr "タイルセットã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "ã“ã®å‡¦ç†ã«ã¯ã‚·ãƒ¼ãƒ³ãŒå¿…è¦ã§ã™."
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Current scene not saved. Open anyway?"
+msgstr "ã“ã®ã‚·ãƒ¼ãƒ³ã¯ä¿å­˜ã•ã‚Œã¦ã„ã¾ã›ã‚“. ãã‚Œã§ã‚‚é–‹ãã¾ã™ã‹?"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Can't reload a scene that was never saved."
+msgstr "ä¿å­˜ã•ã‚Œã¦ã„ãªã„シーンã¯å†èª­ã¿è¾¼ã¿ã§ãã¾ã›ã‚“"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Revert"
+msgstr "å…ƒã«æˆ»ã™"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "This action cannot be undone. Revert anyway?"
+msgstr "ã“ã®ã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã¯undoã§ãã¾ã›ã‚“. å…ƒã«æˆ»ã—ã¾ã™ã‹ï¼Ÿ"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Quick Run Scene.."
+msgstr "シーンをクイックランã™ã‚‹"
#: editor/editor_node.cpp
msgid "Quit"
@@ -1493,33 +2007,42 @@ msgid "Exit the editor?"
msgstr "エディターを終了ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/editor_node.cpp
-msgid "Current scene not saved. Open anyway?"
-msgstr ""
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "プロジェクトマãƒãƒ¼ã‚¸ãƒ£ãƒ¼"
#: editor/editor_node.cpp
-msgid "Can't reload a scene that was never saved."
+#, fuzzy
+msgid "Save & Quit"
+msgstr "ファイルをä¿å­˜"
+
+#: editor/editor_node.cpp
+msgid "Save changes to the following scene(s) before quitting?"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
+msgid "Save changes the following scene(s) before opening Project Manager?"
msgstr ""
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+#, fuzzy
+msgid "Pick a Main Scene"
+msgstr "メインシーンを指定"
+
+#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quick Run Scene.."
+msgid "' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Unable to find script field for addon plugin at: 'res://addons/"
msgstr ""
#: editor/editor_node.cpp
-msgid "Pick a Main Scene"
+msgid "Unable to load addon script from path: '"
msgstr ""
#: editor/editor_node.cpp
@@ -1527,118 +2050,151 @@ 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/scene_tree_dock.cpp
+#, fuzzy
msgid "Ugh"
-msgstr ""
+msgstr "ã†ã‡"
#: editor/editor_node.cpp
+#, fuzzy
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
+#, fuzzy
msgid "Error loading scene."
-msgstr ""
+msgstr "シーンã®èª­ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Scene '%s' has broken dependencies:"
-msgstr ""
+msgstr "シーン'%s' ã¯ä¾å­˜é–¢ä¿‚ãŒå£Šã‚Œã¦ã„ã¾ã™:"
#: editor/editor_node.cpp
msgid "Save Layout"
-msgstr ""
+msgstr "レイアウトをä¿å­˜"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Delete Layout"
-msgstr ""
+msgstr "レイアウトã®æ¶ˆåŽ»"
+
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+#, fuzzy
+msgid "Default"
+msgstr "標準(既定)"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Switch Scene Tab"
-msgstr ""
+msgstr "シーンタブを切り替ãˆã‚‹"
#: editor/editor_node.cpp
+#, fuzzy
msgid "%d more file(s)"
-msgstr ""
+msgstr "%d 多ã„ファイル"
#: editor/editor_node.cpp
+#, fuzzy
msgid "%d more file(s) or folder(s)"
-msgstr ""
+msgstr "%d 多ã„ファイルã‹ãƒ•ã‚©ãƒ«ãƒ€"
#: editor/editor_node.cpp
msgid "Distraction Free Mode"
-msgstr ""
+msgstr "最低é™ãƒ¢ãƒ¼ãƒ‰"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "最低é™ãƒ¢ãƒ¼ãƒ‰"
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Scene"
-msgstr ""
+msgstr "シーン"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Go to previously opened scene."
-msgstr ""
+msgstr "éŽåŽ»ã«é–‹ã„ãŸã‚·ãƒ¼ãƒ³ã«ç§»å‹•"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Next tab"
-msgstr ""
+msgstr "次ã®ã‚¿ãƒ–"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Previous tab"
-msgstr ""
+msgstr "以å‰ã®ã‚¿ãƒ–"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Filter Files.."
-msgstr ""
+msgstr "ファイルを絞り込む.."
#: editor/editor_node.cpp
+#, fuzzy
msgid "Operations with scene files."
-msgstr ""
+msgstr "シーンファイルã¸ã®æ“作"
#: editor/editor_node.cpp
+#, fuzzy
msgid "New Scene"
-msgstr ""
+msgstr "æ–°ã—ã„シーン"
#: editor/editor_node.cpp
+#, fuzzy
msgid "New Inherited Scene.."
-msgstr ""
+msgstr "æ–°ã—ã„継承ã—ãŸã‚·ãƒ¼ãƒ³.."
#: editor/editor_node.cpp
+#, fuzzy
msgid "Open Scene.."
-msgstr ""
+msgstr "シーンを開ã.."
#: editor/editor_node.cpp
+#, fuzzy
msgid "Save Scene"
-msgstr ""
+msgstr "シーンをä¿å­˜ã™ã‚‹"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Save all Scenes"
-msgstr "ファイルをä¿å­˜"
+msgstr "シーンをã™ã¹ã¦ä¿å­˜"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Close Scene"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
+msgstr "シーンを閉ã˜ã‚‹"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Open Recent"
-msgstr ""
+msgstr "最近ã®ã‚’é–‹ã"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Convert To.."
-msgstr ""
+msgstr "~ã«å¤‰æ›ã™ã‚‹.."
#: editor/editor_node.cpp
+#, fuzzy
msgid "MeshLibrary.."
-msgstr ""
+msgstr "メッシュライブラリ.."
#: editor/editor_node.cpp
+#, fuzzy
msgid "TileSet.."
-msgstr ""
+msgstr "タイルセット.."
#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp scene/gui/line_edit.cpp
@@ -1648,58 +2204,70 @@ msgstr "å…ƒã«æˆ»ã™"
#: editor/editor_node.cpp editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
+#, fuzzy
msgid "Redo"
-msgstr ""
+msgstr "å†å®Ÿè¡Œ"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Revert Scene"
-msgstr ""
+msgstr "シーンを戻ã™"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Miscellaneous project or scene-wide tools."
-msgstr ""
+msgstr "数多ãã®ãƒ—ロジェクトやシーンã®ãƒ„ール"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Project"
-msgstr ""
+msgstr "プロジェクト"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Project Settings"
-msgstr ""
+msgstr "プロジェクトã®è¨­å®š"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Run Script"
-msgstr ""
+msgstr "スクリプトã®å®Ÿè¡Œ"
#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export"
-msgstr ""
+msgstr "エクスãƒãƒ¼ãƒˆ"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Tools"
-msgstr ""
+msgstr "ツール"
#: editor/editor_node.cpp
msgid "Quit to Project List"
msgstr "終了ã—ã¦ãƒ—ロジェクトリストを開ã"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Debug"
-msgstr ""
+msgstr "デãƒãƒƒã‚°"
#: editor/editor_node.cpp
msgid "Deploy with Remote Debug"
-msgstr ""
+msgstr "リモートデãƒãƒƒã‚°ä»˜ãã§ãƒ‡ãƒ—ロイ(æ供)ã™ã‚‹"
#: editor/editor_node.cpp
+#, fuzzy
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
+#, fuzzy
msgid "Small Deploy with Network FS"
-msgstr ""
+msgstr "ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ•ã‚¡ã‚¤ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã§ãƒ‡ãƒ—ロイ(æ供)ã™ã‚‹"
#: editor/editor_node.cpp
msgid ""
@@ -1710,256 +2278,310 @@ msgid ""
"On Android, deploy will use the USB cable for faster performance. This "
"option speeds up testing for games with a large footprint."
msgstr ""
+"ã“ã®ã‚ªãƒ—ションãŒæœ‰åŠ¹ã«ã™ã‚‹ã¨ã€æ›¸ã出ã—ã‚‚ã—ãã¯ãƒ‡ãƒ—ロイ(æ供)ã•ã‚Œã‚‹æ™‚ã€æœ€å°"
+"ã®å®Ÿè¡Œãƒ•ã‚¡ã‚¤ãƒ«ã‚’生æˆã—ã¾ã™. \n"
+"ファイルシステムã¯ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯è¶Šã—ã«ã‚¨ãƒ‡ã‚£ã‚¿ã®ãƒ—ロジェクトを利用ã—ã¾ã™\n"
+"Androidã§ã¯USBケーブルã®åˆ©ç”¨ã§ã‚ˆã‚Šé«˜é€Ÿã«ãªã‚Šã¾ã™ã€‚ã“ã®ã‚ªãƒ—ションã¯å¤§ããªã‚²ãƒ¼"
+"ムã®ãƒ†ã‚¹ãƒˆã‚’スピードアップã§ãã¾ã™ã€‚"
#: editor/editor_node.cpp
msgid "Visible Collision Shapes"
-msgstr ""
+msgstr "コリジョンã®ã‚·ã‚§ã‚¤ãƒ—を見ãˆã‚‹ã‚ˆã†ã«ãªã‚‹"
#: editor/editor_node.cpp
+#, fuzzy
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
+#, fuzzy
msgid "Visible Navigation"
-msgstr ""
+msgstr "ナビゲーションãŒè¦‹ãˆã‚‹ã‚ˆã†ã«ãªã‚‹"
#: editor/editor_node.cpp
+#, fuzzy
msgid ""
"Navigation meshes and polygons will be visible on the running game if this "
"option is turned on."
msgstr ""
+"ã“ã®ã‚ªãƒ—ションを有効ã«ã™ã‚‹ã¨ã€ãƒŠãƒ“ゲーションメッシュã¨ãƒãƒªã‚´ãƒ³ãŒã‚²ãƒ¼ãƒ å®Ÿè¡Œæ™‚"
+"ã«è¦‹ãˆã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Sync Scene Changes"
-msgstr ""
+msgstr "シーンã®å¤‰æ›´ã‚’åŒæœŸ"
#: editor/editor_node.cpp
+#, fuzzy
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
+#, fuzzy
msgid "Sync Script Changes"
-msgstr ""
+msgstr "スクリプトã®å¤‰æ›´ã‚’åŒæœŸã™ã‚‹"
#: editor/editor_node.cpp
+#, fuzzy
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
+#, fuzzy
msgid "Editor"
-msgstr ""
+msgstr "エディタ"
#: editor/editor_node.cpp editor/settings_config_dialog.cpp
+#, fuzzy
msgid "Editor Settings"
-msgstr ""
+msgstr "エディタã®è¨­å®š"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Editor Layout"
-msgstr ""
+msgstr "エディタã®ãƒ¬ã‚¤ã‚¢ã‚¦ãƒˆ"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Toggle Fullscreen"
-msgstr ""
+msgstr "フルスクリーンã®åˆ‡ã‚Šæ›¿ãˆ"
#: editor/editor_node.cpp editor/project_export.cpp
+#, fuzzy
msgid "Manage Export Templates"
-msgstr ""
+msgstr "テンプレート エクスãƒãƒ¼ãƒˆã‚’管ç†"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Help"
-msgstr ""
+msgstr "ヘルプ"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Classes"
-msgstr ""
+msgstr "クラス"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "Online Docs"
-msgstr "é–‰ã˜ã‚‹"
+msgstr "オンライン文書"
#: editor/editor_node.cpp
msgid "Q&A"
-msgstr ""
+msgstr "Q&A"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Issue Tracker"
-msgstr ""
+msgstr "課題(ãƒã‚°ï¼‰ç®¡ç†ã‚·ã‚¹ãƒ†ãƒ "
#: editor/editor_node.cpp
+#, fuzzy
msgid "About"
-msgstr ""
+msgstr "ã«ã¤ã„ã¦"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Play the project."
-msgstr ""
+msgstr "プロジェクトã®å®Ÿè¡Œ"
#: editor/editor_node.cpp editor/plugins/sample_library_editor_plugin.cpp
+#, fuzzy
msgid "Play"
-msgstr ""
+msgstr "実行"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Pause the scene"
-msgstr ""
+msgstr "シーンを一時åœæ­¢"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Pause Scene"
-msgstr ""
+msgstr "シーンを一時åœæ­¢"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Stop the scene."
-msgstr ""
+msgstr "シーンを止ã‚ã‚‹"
#: editor/editor_node.cpp editor/plugins/sample_library_editor_plugin.cpp
+#, fuzzy
msgid "Stop"
-msgstr ""
+msgstr "æ­¢ã‚ã‚‹"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Play the edited scene."
-msgstr ""
+msgstr "編集ã—ãŸã‚·ãƒ¼ãƒ³ã‚’実行"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Play Scene"
-msgstr ""
+msgstr "シーンを実行"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Play custom scene"
-msgstr ""
+msgstr "カスタムシーンを実行"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Play Custom Scene"
-msgstr ""
+msgstr "カスタムシーンを実行"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Spins when the editor window repaints!"
-msgstr ""
+msgstr "エディタウィンドウをå†æç”»ã™ã‚‹ã¨ãã«å¤‰æ›´ã™ã‚‹!"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Update Always"
-msgstr ""
+msgstr "常ã«ã‚¢ãƒƒãƒ—デート"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Update Changes"
-msgstr ""
+msgstr "変更をå映ã™ã‚‹"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Disable Update Spinner"
-msgstr ""
+msgstr "アップデートå映をåœæ­¢"
#: editor/editor_node.cpp
msgid "Inspector"
-msgstr ""
+msgstr "インスペクター"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Create a new resource in memory and edit it."
-msgstr ""
+msgstr "メモリーã«æ–°ã—ã„リソースを確ä¿ã—編集ã™ã‚‹"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Load an existing resource from disk and edit it."
-msgstr ""
+msgstr "既存ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’ディスクã‹ã‚‰èª­ã¿è¾¼ã¿ç·¨é›†ã™ã‚‹"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Save the currently edited resource."
-msgstr ""
+msgstr "ç¾åœ¨ç·¨é›†ä¸­ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’ä¿å­˜ã™ã‚‹"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Save As.."
-msgstr ""
+msgstr "åå‰ã‚’付ã‘ã¦ä¿å­˜.."
#: editor/editor_node.cpp
msgid "Go to the previous edited object in history."
-msgstr ""
+msgstr "以å‰ã«ç·¨é›†ã—ãŸã‚ªãƒ–ジェクト履歴ã§ã€Œã²ã¨ã¤å‰ã€ã«ç§»å‹•."
#: editor/editor_node.cpp
+#, fuzzy
msgid "Go to the next edited object in history."
-msgstr ""
+msgstr "以å‰ã«ç·¨é›†ã—ãŸã‚ªãƒ–ジェクト履歴ã§ã€Œæ¬¡ã€ã«ç§»å‹•."
#: editor/editor_node.cpp
+#, fuzzy
msgid "History of recently edited objects."
-msgstr ""
+msgstr "最近編集ã—ãŸã‚ªãƒ–ジェクトã®å±¥æ­´"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Object properties."
-msgstr ""
+msgstr "オブジェクトã®ãƒ—ロパティ"
#: editor/editor_node.cpp
+#, fuzzy
msgid "FileSystem"
-msgstr ""
+msgstr "ファイルシステム"
#: editor/editor_node.cpp editor/node_dock.cpp
+#, fuzzy
msgid "Node"
-msgstr ""
+msgstr "ノード"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Output"
+msgstr "出力"
+
+#: editor/editor_node.cpp
+msgid "Don't Save"
msgstr ""
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
-msgstr ""
+msgstr "å†ã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
#: editor/editor_node.cpp editor/editor_plugin_settings.cpp
msgid "Update"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
+msgstr "アップデート"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Import Templates From ZIP File"
-msgstr ""
+msgstr "ZIPファイルã‹ã‚‰ãƒ†ãƒ³ãƒ—レートをインãƒãƒ¼ãƒˆ"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
-msgstr ""
+msgstr "プロジェクトをエクスãƒãƒ¼ãƒˆ"
#: editor/editor_node.cpp
msgid "Export Library"
-msgstr ""
+msgstr "ライブラリをエクスãƒãƒ¼ãƒˆ"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Merge With Existing"
-msgstr ""
+msgstr "(ライブラリを)マージã™ã‚‹"
#: editor/editor_node.cpp
msgid "Password:"
-msgstr ""
+msgstr "パスワード:"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Open & Run a Script"
-msgstr ""
+msgstr "é–‹ã„ã¦ã‚¹ã‚¯ãƒªãƒ—トを実行ã™ã‚‹"
+
+#: editor/editor_node.cpp
+#, fuzzy
+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
#, fuzzy
msgid "Open 2D Editor"
-msgstr "ディレクトリを開ã"
+msgstr "2Dエディタを開ã"
#: editor/editor_node.cpp
#, fuzzy
@@ -1967,211 +2589,267 @@ msgid "Open 3D Editor"
msgstr "ディレクトリを開ã"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Open Script Editor"
-msgstr ""
+msgstr "スクリプトエディタを開ã"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Open Asset Library"
-msgstr ""
+msgstr "アセット ライブラリを開ã"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the next Editor"
-msgstr "エディターを終了ã—ã¾ã™ã‹ï¼Ÿ"
+msgstr "次ã®ã‚¨ãƒ‡ã‚£ã‚¿ã‚’é–‹ã"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Open the previous Editor"
-msgstr ""
+msgstr "å‰ã®ã‚¨ãƒ‡ã‚£ã‚¿ã‚’é–‹ã"
#: editor/editor_plugin_settings.cpp
msgid "Installed Plugins:"
-msgstr ""
+msgstr "インストール済ã¿ã®ãƒ—ラグイン:"
#: editor/editor_plugin_settings.cpp
+#, fuzzy
msgid "Author:"
-msgstr ""
+msgstr "作者:"
#: editor/editor_plugin_settings.cpp
+#, fuzzy
msgid "Status:"
-msgstr ""
+msgstr "ステータス:"
#: editor/editor_profiler.cpp
+#, fuzzy
msgid "Stop Profiling"
-msgstr ""
+msgstr "プロファイリングåœæ­¢"
#: editor/editor_profiler.cpp
msgid "Start Profiling"
-msgstr ""
+msgstr "プロファイリング開始"
#: editor/editor_profiler.cpp
+#, fuzzy
msgid "Measure:"
-msgstr ""
+msgstr "測定:"
#: editor/editor_profiler.cpp
+#, fuzzy
msgid "Frame Time (sec)"
-msgstr ""
+msgstr "フレーム時間(秒)"
#: editor/editor_profiler.cpp
+#, fuzzy
msgid "Average Time (sec)"
-msgstr ""
+msgstr "å¹³å‡æ™‚間(秒)"
#: editor/editor_profiler.cpp
+#, fuzzy
msgid "Frame %"
-msgstr ""
+msgstr "フレーム %"
#: editor/editor_profiler.cpp
+#, fuzzy
msgid "Fixed Frame %"
-msgstr ""
+msgstr "固定フレーム %"
#: editor/editor_profiler.cpp editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Time:"
-msgstr ""
+msgstr "時間:"
#: editor/editor_profiler.cpp
+#, fuzzy
msgid "Inclusive"
-msgstr ""
+msgstr "ã‚’å«ã‚€"
#: editor/editor_profiler.cpp
+#, fuzzy
msgid "Self"
-msgstr ""
+msgstr "セルフ"
#: editor/editor_profiler.cpp
+#, fuzzy
msgid "Frame #:"
-msgstr ""
+msgstr "フレーム #:"
#: editor/editor_reimport_dialog.cpp
+#, fuzzy
msgid "Please wait for scan to complete."
-msgstr ""
+msgstr "走査完了をãŠå¾…ã¡ãã ã•ã„"
#: editor/editor_reimport_dialog.cpp
+#, fuzzy
msgid "Current scene must be saved to re-import."
-msgstr ""
+msgstr "å†ã‚¤ãƒ³ãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã«ã¯ç¾åœ¨ã®ã‚·ãƒ¼ãƒ³ã‚’ä¿å­˜ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™"
#: editor/editor_reimport_dialog.cpp
+#, fuzzy
msgid "Save & Re-Import"
-msgstr ""
+msgstr "ä¿å­˜ã—ã¦å†ã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
#: editor/editor_reimport_dialog.cpp
+#, fuzzy
msgid "Re-Importing"
-msgstr ""
+msgstr "å†ã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
#: editor/editor_reimport_dialog.cpp
+#, fuzzy
msgid "Re-Import Changed Resources"
+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
+#, fuzzy
msgid "Write your logic in the _run() method."
-msgstr ""
+msgstr "ã‚ãªãŸã®ãƒ­ã‚¸ãƒƒã‚¯ã‚’_run() メソッドã«è¨˜è¿°ã—ã¦ãã ã•ã„"
#: editor/editor_run_script.cpp
+#, fuzzy
msgid "There is an edited scene already."
-msgstr ""
+msgstr "æ—¢ã«ç·¨é›†ã—ãŸã‚·ãƒ¼ãƒ³ãŒã‚ã‚Šã¾ã™"
#: editor/editor_run_script.cpp
+#, fuzzy
msgid "Couldn't instance script:"
-msgstr ""
+msgstr "スクリプトをインスタンス化ã§ãã¾ã›ã‚“ã§ã—ãŸ:"
#: editor/editor_run_script.cpp
+#, fuzzy
msgid "Did you forget the 'tool' keyword?"
-msgstr ""
+msgstr "キーワード'tool'を忘れã¦ã„ã¾ã›ã‚“ã‹ï¼Ÿ"
#: editor/editor_run_script.cpp
+#, fuzzy
msgid "Couldn't run script:"
-msgstr ""
+msgstr "スクリプトを実行ã§ãã¾ã›ã‚“ã§ã—ãŸ:"
#: editor/editor_run_script.cpp
+#, fuzzy
msgid "Did you forget the '_run' method?"
-msgstr ""
+msgstr "'_run'メソッドを忘れã¦ã„ã¾ã›ã‚“ã‹ï¼Ÿ"
#: editor/editor_settings.cpp
+#, fuzzy
msgid "Default (Same as Editor)"
-msgstr ""
+msgstr "既定(エディタã¨åŒã˜ï¼‰"
#: editor/editor_sub_scene.cpp
+#, fuzzy
msgid "Select Node(s) to Import"
-msgstr ""
+msgstr "インãƒãƒ¼ãƒˆã™ã‚‹ãƒŽãƒ¼ãƒ‰ã‚’é¸æŠžã™ã‚‹"
#: editor/editor_sub_scene.cpp
+#, fuzzy
msgid "Scene Path:"
-msgstr ""
+msgstr "シーンã®ãƒ‘ス:"
#: editor/editor_sub_scene.cpp
+#, fuzzy
msgid "Import From Node:"
-msgstr ""
+msgstr "ノードã‹ã‚‰ã‚¤ãƒ³ãƒãƒ¼ãƒˆ:"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Re-Download"
-msgstr ""
+msgstr "å†ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Uninstall"
-msgstr ""
+msgstr "アンインストール"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "(Installed)"
-msgstr ""
+msgstr "(インストール済)"
#: editor/export_template_manager.cpp
msgid "Download"
-msgstr ""
+msgstr "ダウンロード"
#: editor/export_template_manager.cpp
msgid "(Missing)"
-msgstr ""
+msgstr "(見ã¤ã‹ã‚Šã¾ã›ã‚“)"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "(Current)"
-msgstr ""
+msgstr "(ç¾åœ¨ã®ï¼‰"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Remove template version '%s'?"
-msgstr ""
+msgstr "テンプレート ãƒãƒ¼ã‚¸ãƒ§ãƒ³'%s'を除去ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/export_template_manager.cpp
msgid "Can't open export templates zip."
-msgstr ""
+msgstr "エクスãƒãƒ¼ãƒˆã€€ãƒ†ãƒ³ãƒ—レート(ZIP)ファイルを確èªã§ãã¾ã›ã‚“."
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Invalid version.txt format inside templates."
-msgstr ""
+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 フォーマットãŒä¸æ­£ã§ã™. Revisionã¯æœ‰åŠ¹ãªè­˜åˆ¥å­ã§"
+"ã¯ã‚ã‚Šã¾ã›ã‚“."
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "No version.txt found inside templates."
-msgstr ""
+msgstr "テンプレート内ã«version.txtãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Error creating path for templates:\n"
-msgstr ""
+msgstr "テンプレートã®ãƒ‘ス生æˆã‚¨ãƒ©ãƒ¼\n"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Extracting Export Templates"
-msgstr ""
+msgstr "エクスãƒãƒ¼ãƒˆã€€ãƒ†ãƒ³ãƒ—レートã®æŠ½å‡º"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Importing:"
-msgstr ""
+msgstr "インãƒãƒ¼ãƒˆ:"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Loading Export Templates"
-msgstr ""
+msgstr "エクスãƒãƒ¼ãƒˆã€€ãƒ†ãƒ³ãƒ—レートã®èª­ã¿è¾¼ã¿"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Current Version:"
-msgstr ""
+msgstr "ç¾åœ¨ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³:"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Installed Versions:"
-msgstr ""
+msgstr "インストールã•ã‚ŒãŸãƒãƒ¼ã‚¸ãƒ§ãƒ³:"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Install From File"
-msgstr ""
+msgstr "ファイルã‹ã‚‰ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«"
#: editor/export_template_manager.cpp
#, fuzzy
@@ -2184,156 +2862,260 @@ msgid "Select template file"
msgstr "ã™ã¹ã¦é¸æŠž"
#: editor/export_template_manager.cpp
+#, fuzzy
msgid "Export Template Manager"
-msgstr ""
+msgstr "エクスãƒãƒ¼ãƒˆã€€ãƒ†ãƒ³ãƒ—レート マãƒãƒ¼ã‚¸ãƒ£ãƒ¼"
#: editor/file_type_cache.cpp
+#, fuzzy
msgid "Can't open file_type_cache.cch for writing, not saving file type cache!"
msgstr ""
+"書ã出ã—時ã«file_type_cache.cchを確èªã§ãã¾ã›ã‚“。ファイルタイプã®ã‚­ãƒ£ãƒƒã‚·ãƒ¥ã‚’"
+"ä¿å­˜ã§ãã¾ã›ã‚“!"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Cannot navigate to '"
-msgstr ""
+msgstr "~ã«ç§»å‹•ã§ãã¾ã›ã‚“"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "ä¿å­˜ã—ã¦å†ã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "ソース:"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Same source and destination files, doing nothing."
+msgstr "åŒã˜ãƒ•ã‚¡ã‚¤ãƒ«ãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹ã®ã§ã€ä½•ã‚‚è¡Œã„ã¾ã›ã‚“."
+
+#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
msgstr ""
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Same source and destination paths, doing nothing."
-msgstr ""
+msgstr "åŒã˜ãƒ‘スãŒæŒ‡å®šã•ã‚Œã¦ã„ã‚‹ã®ã§ã€ä½•ã‚‚è¡Œã„ã¾ã›ã‚“"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Can't move directories to within themselves."
+msgstr "ディレクトリを自身ã®å†…部ã«ã¯ç§»å‹•ã§ãã¾ã›ã‚“"
+
+#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
msgstr ""
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "イメージ読ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "エラーをインãƒãƒ¼ãƒˆä¸­:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Can't operate on '..'"
-msgstr ""
+msgstr "'..'を処ç†ã§ãã¾ã›ã‚“"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Pick New Name and Location For:"
-msgstr ""
+msgstr "æ–°ã—ã„åå‰ã¨ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã‚’é¸æŠž:"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "No files selected!"
-msgstr ""
+msgstr "ファイルãŒé¸æŠžã•ã‚Œã¦ã„ã¾ã›ã‚“!"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Expand all"
-msgstr ""
+msgstr "ã™ã¹ã¦å±•é–‹ã™ã‚‹"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Collapse all"
-msgstr ""
+msgstr "ã™ã¹ã¦æŠ˜ã‚ŠãŸãŸã‚€"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Show In File Manager"
-msgstr ""
+msgstr "ファイルマãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã§è¡¨ç¤º"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Instance"
-msgstr ""
+msgstr "インスタンス"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Edit Dependencies.."
-msgstr ""
+msgstr "ä¾å­˜é–¢ä¿‚を編集.."
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "View Owners.."
-msgstr ""
+msgstr "オーナーを見る.."
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Copy Path"
-msgstr ""
+msgstr "パスをコピーã™ã‚‹"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Rename or Move.."
-msgstr ""
+msgstr "åå‰ã‚’変ãˆã‚‹ã‹ç§»å‹•ã—ã¦ãã ã•ã„.."
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Move To.."
-msgstr ""
+msgstr "~ã¸ç§»å‹•ã™ã‚‹.."
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Info"
-msgstr ""
+msgstr "インフォーメーション"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Re-Import.."
-msgstr ""
+msgstr "å†ã‚¤ãƒ³ãƒãƒ¼ãƒˆ.."
#: editor/filesystem_dock.cpp
msgid "Previous Directory"
-msgstr ""
+msgstr "最後ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Next Directory"
-msgstr ""
+msgstr "次ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Re-Scan Filesystem"
-msgstr ""
+msgstr "ファイルシステムをå†èµ°æŸ»"
#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Toggle folder status as Favorite"
-msgstr ""
+msgstr "フォルダã®çŠ¶æ…‹ã‚’ãŠæ°—ã«å…¥ã‚Šã«å¤‰æ›´"
#: editor/filesystem_dock.cpp
+#, fuzzy
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
+#, fuzzy
msgid "Move"
-msgstr ""
+msgstr "移動"
#: editor/groups_editor.cpp
+#, fuzzy
msgid "Add to Group"
-msgstr ""
+msgstr "グループã«åŠ ãˆã‚‹"
#: editor/groups_editor.cpp
+#, fuzzy
msgid "Remove from Group"
+msgstr "グループã‹ã‚‰å–り除ã"
+
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+msgstr "シーンをインãƒãƒ¼ãƒˆä¸­.."
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import with Separate Materials"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: 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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "3Dシーンをインãƒãƒ¼ãƒˆ"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
#: editor/plugins/cube_grid_theme_editor_plugin.cpp
+#, fuzzy
msgid "Import Scene"
-msgstr ""
+msgstr "シーンをインãƒãƒ¼ãƒˆ"
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Importing Scene.."
-msgstr ""
+msgstr "シーンをインãƒãƒ¼ãƒˆä¸­.."
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Running Custom Script.."
-msgstr ""
+msgstr "カスタムスクリプトを実行中"
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Couldn't load post-import script:"
-msgstr ""
+msgstr "æ—¢ã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã—ãŸã‚¹ã‚¯ãƒªãƒ—トを読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ:"
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Invalid/broken script for post-import (check console):"
msgstr ""
+"無効ãª/壊れãŸã‚¤ãƒ³ãƒãƒ¼ãƒˆæ¸ˆã¿ã®ã‚¹ã‚¯ãƒªãƒ—ト(コンソールをãƒã‚§ãƒƒã‚¯ã—ã¦ãã ã•ã„)"
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Error running post-import script:"
-msgstr ""
+msgstr "インãƒãƒ¼ãƒˆæ¸ˆã¿ã®ã‚¹ã‚¯ãƒªãƒ—ト実行エラー"
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
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
@@ -2342,56 +3124,65 @@ msgid " Files"
msgstr "ファイル:"
#: editor/import_dock.cpp
+#, fuzzy
msgid "Import As:"
-msgstr ""
+msgstr "~ã¨ã—ã¦ã‚¤ãƒ³ãƒãƒ¼ãƒˆ:"
#: editor/import_dock.cpp editor/property_editor.cpp
msgid "Preset.."
-msgstr ""
+msgstr "åˆæœŸè¨­å®šå€¤.."
#: editor/import_dock.cpp
+#, fuzzy
msgid "Reimport"
-msgstr ""
+msgstr "å†ã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
#: editor/io_plugins/editor_bitmask_import_plugin.cpp
+#, fuzzy
msgid "No bit masks to import!"
-msgstr ""
+msgstr "インãƒãƒ¼ãƒˆã™ã‚‹ãƒ“ットマスクãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“!"
#: editor/io_plugins/editor_bitmask_import_plugin.cpp
#: editor/io_plugins/editor_sample_import_plugin.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Target path is empty."
-msgstr ""
+msgstr "ターゲットã®ãƒ‘スã«ä½•ã‚‚ã‚ã‚Šã¾ã›ã‚“"
#: editor/io_plugins/editor_bitmask_import_plugin.cpp
#: editor/io_plugins/editor_sample_import_plugin.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Target path must be a complete resource path."
-msgstr ""
+msgstr "ターゲットã®ãƒ‘スã¯ãƒªã‚½ãƒ¼ã‚¹ã®å®Œå…¨ãªãƒ‘スã§ãªã‘ã‚Œã°ã„ã‘ã¾ã›ã‚“."
#: editor/io_plugins/editor_bitmask_import_plugin.cpp
#: editor/io_plugins/editor_sample_import_plugin.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Target path must exist."
-msgstr ""
+msgstr "ターゲットã®ãƒ‘スãŒå­˜åœ¨ã—ã¾ã›ã‚“"
#: editor/io_plugins/editor_bitmask_import_plugin.cpp
#: editor/io_plugins/editor_mesh_import_plugin.cpp
#: editor/io_plugins/editor_sample_import_plugin.cpp
+#, fuzzy
msgid "Save path is empty!"
-msgstr ""
+msgstr "ä¿å­˜ã™ã‚‹ãƒ‘スãŒã‚ã‚Šã¾ã›ã‚“!"
#: editor/io_plugins/editor_bitmask_import_plugin.cpp
+#, fuzzy
msgid "Import BitMasks"
-msgstr ""
+msgstr "ビットマスクをインãƒãƒ¼ãƒˆ"
#: editor/io_plugins/editor_bitmask_import_plugin.cpp
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Source Texture(s):"
-msgstr ""
+msgstr "ソースã®ãƒ†ã‚¯ã‚¹ãƒãƒ£:"
#: editor/io_plugins/editor_bitmask_import_plugin.cpp
#: editor/io_plugins/editor_mesh_import_plugin.cpp
@@ -2399,8 +3190,9 @@ msgstr ""
#: editor/io_plugins/editor_scene_import_plugin.cpp
#: editor/io_plugins/editor_texture_import_plugin.cpp
#: editor/io_plugins/editor_translation_import_plugin.cpp
+#, fuzzy
msgid "Target Path:"
-msgstr ""
+msgstr "ターゲットã®ãƒ‘ス:"
#: editor/io_plugins/editor_bitmask_import_plugin.cpp
#: editor/io_plugins/editor_font_import_plugin.cpp
@@ -2408,75 +3200,92 @@ msgstr ""
#: editor/io_plugins/editor_scene_import_plugin.cpp
#: editor/io_plugins/editor_texture_import_plugin.cpp
#: editor/io_plugins/editor_translation_import_plugin.cpp
+#, fuzzy
msgid "Accept"
-msgstr ""
+msgstr "å—å–OK"
#: editor/io_plugins/editor_bitmask_import_plugin.cpp
msgid "Bit Mask"
-msgstr ""
+msgstr "ビットマスク"
#: editor/io_plugins/editor_font_import_plugin.cpp
+#, fuzzy
msgid "No source font file!"
-msgstr ""
+msgstr "ソースã®ãƒ•ã‚©ãƒ³ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“!"
#: editor/io_plugins/editor_font_import_plugin.cpp
+#, fuzzy
msgid "No target font resource!"
-msgstr ""
+msgstr "ターゲットã®ãƒ•ã‚©ãƒ³ãƒˆãƒªã‚½ãƒ¼ã‚¹ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“!"
#: editor/io_plugins/editor_font_import_plugin.cpp
+#, fuzzy
msgid ""
"Invalid file extension.\n"
"Please use .font."
msgstr ""
+"ファイル拡張å­ãŒä¸æ­£ã§ã™.\n"
+" .fontを使ã£ã¦ãã ã•ã„."
#: editor/io_plugins/editor_font_import_plugin.cpp
+#, fuzzy
msgid "Can't load/process source font."
-msgstr ""
+msgstr "ソースã®ãƒ•ã‚©ãƒ³ãƒˆã‚’読ã¿è¾¼ã¿/処ç†ã§ãã¾ã›ã‚“."
#: editor/io_plugins/editor_font_import_plugin.cpp
+#, fuzzy
msgid "Couldn't save font."
-msgstr ""
+msgstr "フォントをä¿å­˜ã§ãã¾ã›ã‚“ã§ã—ãŸ"
#: editor/io_plugins/editor_font_import_plugin.cpp
+#, fuzzy
msgid "Source Font:"
-msgstr ""
+msgstr "ソース フォント:"
#: editor/io_plugins/editor_font_import_plugin.cpp
+#, fuzzy
msgid "Source Font Size:"
-msgstr ""
+msgstr "ソース フォントサイズ:"
#: editor/io_plugins/editor_font_import_plugin.cpp
+#, fuzzy
msgid "Dest Resource:"
-msgstr ""
+msgstr "é€ã‚Šå…ˆã®ãƒªã‚½ãƒ¼ã‚¹:"
#: editor/io_plugins/editor_font_import_plugin.cpp
+#, fuzzy
msgid "The quick brown fox jumps over the lazy dog."
-msgstr ""
+msgstr "ã„ã‚ã¯ã«ã»ã¸ã¨ï½ž."
#: editor/io_plugins/editor_font_import_plugin.cpp
msgid "Test:"
-msgstr ""
+msgstr "テスト:"
#: editor/io_plugins/editor_font_import_plugin.cpp
#: editor/io_plugins/editor_mesh_import_plugin.cpp
#: editor/io_plugins/editor_sample_import_plugin.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Options:"
-msgstr ""
+msgstr "オプション:"
#: editor/io_plugins/editor_font_import_plugin.cpp
+#, fuzzy
msgid "Font Import"
-msgstr ""
+msgstr "フォントã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
#: editor/io_plugins/editor_font_import_plugin.cpp
+#, fuzzy
msgid ""
"This file is already a Godot font file, please supply a BMFont type file "
"instead."
msgstr ""
+"ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã‚‚ã†Godotã®ãƒ•ã‚©ãƒ³ãƒˆãƒ•ã‚¡ã‚¤ãƒ«ã§ã™. BMFont type ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’代ã‚ã‚Š"
+"ã«åˆ©ç”¨ã—ã¦ãã ã•ã„."
#: editor/io_plugins/editor_font_import_plugin.cpp
+#, fuzzy
msgid "Failed opening as BMFont file."
-msgstr ""
+msgstr "BMFont ファイルを開ã‘ã¾ã›ã‚“ã§ã—ãŸ"
#: editor/io_plugins/editor_font_import_plugin.cpp
#: scene/resources/dynamic_font.cpp
@@ -2499,582 +3308,698 @@ msgid "Invalid font size."
msgstr "無効ãªãƒ•ã‚©ãƒ³ãƒˆ サイズã§ã™ã€‚"
#: editor/io_plugins/editor_font_import_plugin.cpp
+#, fuzzy
msgid "Invalid font custom source."
-msgstr ""
+msgstr "ä¸æ­£ãªãƒ•ã‚©ãƒ³ãƒˆã‚«ã‚¹ã‚¿ãƒ ã‚½ãƒ¼ã‚¹"
#: editor/io_plugins/editor_font_import_plugin.cpp
#: editor/plugins/theme_editor_plugin.cpp
msgid "Font"
-msgstr ""
+msgstr "フォント"
#: editor/io_plugins/editor_mesh_import_plugin.cpp
+#, fuzzy
msgid "No meshes to import!"
-msgstr ""
+msgstr "インãƒãƒ¼ãƒˆã™ã‚‹ãƒ¡ãƒƒã‚·ãƒ¥ãŒã‚ã‚Šã¾ã›ã‚“"
#: editor/io_plugins/editor_mesh_import_plugin.cpp
+#, fuzzy
msgid "Single Mesh Import"
-msgstr ""
+msgstr "シングルメッシュをインãƒãƒ¼ãƒˆ"
#: editor/io_plugins/editor_mesh_import_plugin.cpp
+#, fuzzy
msgid "Source Mesh(es):"
-msgstr ""
+msgstr "ソース メッシュ:"
#: editor/io_plugins/editor_mesh_import_plugin.cpp
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh"
-msgstr ""
+msgstr "メッシュ"
+
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+#, fuzzy
+msgid "Surface %d"
+msgstr "サーフェース %d"
#: editor/io_plugins/editor_sample_import_plugin.cpp
+#, fuzzy
msgid "No samples to import!"
-msgstr ""
+msgstr "インãƒãƒ¼ãƒˆã™ã‚‹ã‚µãƒ³ãƒ—ルãŒã‚ã‚Šã¾ã›ã‚“!"
#: editor/io_plugins/editor_sample_import_plugin.cpp
+#, fuzzy
msgid "Import Audio Samples"
-msgstr ""
+msgstr "オーディオサンプルをインãƒãƒ¼ãƒˆ"
#: editor/io_plugins/editor_sample_import_plugin.cpp
+#, fuzzy
msgid "Source Sample(s):"
-msgstr ""
+msgstr "ソースã®ã‚µãƒ³ãƒ—ル:"
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "Audio Sample"
-msgstr ""
+msgstr "オーディオサンプル"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "New Clip"
-msgstr ""
+msgstr "æ–°ã—ã„クリップ"
#: editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Animation Options"
-msgstr ""
+msgstr "アニメーションã®ã‚ªãƒ—ション"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Flags"
-msgstr ""
+msgstr "フラグ"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Bake FPS:"
-msgstr ""
+msgstr "FPSを焼ãè¾¼ã¿(ベイク):"
#: editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Optimizer"
-msgstr ""
+msgstr "オプティマイザ"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Max Linear Error"
-msgstr ""
+msgstr "最大ä½ç½®ã‚¨ãƒ©ãƒ¼"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Max Angular Error"
-msgstr ""
+msgstr "最大角度エラー"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Max Angle"
-msgstr ""
+msgstr "最大角度"
#: editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Clips"
-msgstr ""
+msgstr "クリップ"
#: editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Start(s)"
-msgstr ""
+msgstr "開始"
#: editor/io_plugins/editor_scene_import_plugin.cpp
msgid "End(s)"
-msgstr ""
+msgstr "終了"
#: editor/io_plugins/editor_scene_import_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Loop"
-msgstr ""
+msgstr "ループ"
#: editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Filters"
-msgstr ""
+msgstr "フィルター"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Source path is empty."
-msgstr ""
+msgstr "ソースã®ãƒ‘スã¯ç©ºã§ã™"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Couldn't load post-import script."
-msgstr ""
+msgstr "インãƒãƒ¼ãƒˆæ¸ˆã¿ã®ã‚¹ã‚¯ãƒªãƒ—トを読ã¿è¾¼ã¿ã¾ã›ã‚“ã§ã—ãŸ"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Invalid/broken script for post-import."
-msgstr ""
+msgstr "インãƒãƒ¼ãƒˆæ¸ˆã¿ã®ã‚¹ã‚¯ãƒªãƒ—トã¯ä¸æ­£ãª/壊れãŸã‚¹ã‚¯ãƒªãƒ—トã§ã™"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Error importing scene."
-msgstr ""
+msgstr "シーン インãƒãƒ¼ãƒˆã®ã‚¨ãƒ©ãƒ¼"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Import 3D Scene"
-msgstr ""
+msgstr "3Dシーンをインãƒãƒ¼ãƒˆ"
#: editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Source Scene:"
-msgstr ""
+msgstr "ソース シーン:"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Same as Target Scene"
-msgstr ""
+msgstr "ターゲットシーンã¨åŒã˜"
#: editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Shared"
-msgstr ""
+msgstr "共有ã•ã‚Œã¦ã„ã‚‹"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Target Texture Folder:"
-msgstr ""
+msgstr "ターゲットテクスãƒãƒ£ã®ãƒ•ã‚©ãƒ«ãƒ€:"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Post-Process Script:"
-msgstr ""
+msgstr "後処ç†ã‚¹ã‚¯ãƒªãƒ—ト:"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Custom Root Node Type:"
-msgstr ""
+msgstr "ルートノードã®ã‚«ã‚¹ã‚¿ãƒ ã‚¿ã‚¤ãƒ—:"
#: editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Auto"
-msgstr ""
+msgstr "自動"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Root Node Name:"
-msgstr ""
+msgstr "ルートノードã®åå‰:"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "The Following Files are Missing:"
-msgstr ""
+msgstr "以下ã®ãƒ•ã‚¡ã‚¤ãƒ«ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“:"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Import Anyway"
-msgstr ""
+msgstr "ã¨ã‚Šã‚ãˆãšã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
#: editor/io_plugins/editor_scene_import_plugin.cpp scene/gui/dialogs.cpp
msgid "Cancel"
msgstr "キャンセル"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Import & Open"
-msgstr ""
+msgstr "インãƒãƒ¼ãƒˆã—ã¦é–‹ã"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Edited scene has not been saved, open imported scene anyway?"
msgstr ""
+"編集ã—ãŸã‚·ãƒ¼ãƒ³ã¯ä¿å­˜ã•ã‚Œã¦ã„ã¾ã›ã‚“ãŒã€ãã‚Œã§ã‚‚インãƒãƒ¼ãƒˆã—ãŸã‚·ãƒ¼ãƒ³ã‚’é–‹ãã¾ã™"
+"ã‹ï¼Ÿ"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Import Image:"
-msgstr ""
+msgstr "イメージをインãƒãƒ¼ãƒˆ:"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Can't import a file over itself:"
-msgstr ""
+msgstr "åŒã˜ãƒ•ã‚¡ã‚¤ãƒ«ã«ã‚¤ãƒ³ãƒãƒ¼ãƒˆã§ãã¾ã›ã‚“:"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "Couldn't localize path: %s (already local)"
-msgstr ""
+msgstr "パスをローカライズã§ãã¾ã›ã‚“: %s (ã™ã§ã«ãƒ­ãƒ¼ã‚«ãƒ«)"
#: editor/io_plugins/editor_scene_import_plugin.cpp
+#, fuzzy
msgid "3D Scene Animation"
-msgstr ""
+msgstr "3Dシーンアニメーション"
#: editor/io_plugins/editor_texture_import_plugin.cpp
msgid "Uncompressed"
-msgstr ""
+msgstr "éžåœ§ç¸®"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Compress Lossless (PNG)"
-msgstr ""
+msgstr "ロスレス圧縮(PNG)"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Compress Lossy (WebP)"
-msgstr ""
+msgstr "éžå¯é€†åœ§ç¸®(WebP)"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Compress (VRAM)"
-msgstr ""
+msgstr "圧縮 (VRAM)"
#: editor/io_plugins/editor_texture_import_plugin.cpp
msgid "Texture Format"
-msgstr ""
+msgstr "テクスãƒãƒ£ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Texture Compression Quality (WebP):"
-msgstr ""
+msgstr "テクスãƒãƒ£åœ§ç¸®å“質 (WebP):"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Texture Options"
-msgstr ""
+msgstr "テクスãƒãƒ£ã€€ã‚ªãƒ—ション"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Please specify some files!"
-msgstr ""
+msgstr "ãªã«ã‹ãƒ•ã‚¡ã‚¤ãƒ«ã‚’指定ã—ã¦ãã ã•ã„!"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "At least one file needed for Atlas."
-msgstr ""
+msgstr "アトラスã«æœ€ä½Žä¸€ã¤ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’指定ã—ã¦ãã ã•ã„"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Error importing:"
-msgstr ""
+msgstr "エラーをインãƒãƒ¼ãƒˆä¸­:"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Only one file is required for large texture."
-msgstr ""
+msgstr "大ããªãƒ†ã‚¯ã‚¹ãƒãƒ£ã®ãŸã‚ã«ä¸€ã¤ãƒ•ã‚¡ã‚¤ãƒ«ãŒå¿…è¦ã§ã™"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Max Texture Size:"
-msgstr ""
+msgstr "最大テクスãƒãƒ£ã‚µã‚¤ã‚º:"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Import Textures for Atlas (2D)"
-msgstr ""
+msgstr "アトラスã®ãƒ†ã‚¯ã‚¹ãƒãƒ£ã‚’インãƒãƒ¼ãƒˆ (2D)"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Cell Size:"
-msgstr ""
+msgstr "セルサイズ:"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Large Texture"
-msgstr ""
+msgstr "大ããªãƒ†ã‚¯ã‚¹ãƒãƒ£"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Import Large Textures (2D)"
-msgstr ""
+msgstr "大ããªãƒ†ã‚¯ã‚¹ãƒãƒ£ã‚’インãƒãƒ¼ãƒˆ (2D)"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Source Texture"
-msgstr ""
+msgstr "ソーステクスãƒãƒ£"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Base Atlas Texture"
-msgstr ""
+msgstr "基本アトラステクスãƒãƒ£"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Source Texture(s)"
-msgstr ""
+msgstr "ソース テクスãƒãƒ£"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Import Textures for 2D"
-msgstr ""
+msgstr "2Dテクスãƒãƒ£ã‚’インãƒãƒ¼ãƒˆ"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Import Textures for 3D"
-msgstr ""
+msgstr "3Dテクスãƒãƒ£ã‚’インãƒãƒ¼ãƒˆ"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Import Textures"
-msgstr ""
+msgstr "テクスãƒãƒ£ã‚’インãƒãƒ¼ãƒˆ"
#: editor/io_plugins/editor_texture_import_plugin.cpp
msgid "2D Texture"
-msgstr ""
+msgstr "2Dテクスãƒãƒ£"
#: editor/io_plugins/editor_texture_import_plugin.cpp
msgid "3D Texture"
-msgstr ""
+msgstr "3Dテクスãƒãƒ£"
#: editor/io_plugins/editor_texture_import_plugin.cpp
msgid "Atlas Texture"
-msgstr ""
+msgstr "アトラステクスãƒãƒ£"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid ""
"NOTICE: Importing 2D textures is not mandatory. Just copy png/jpg files to "
"the project."
msgstr ""
+"注æ„:2Dテクスãƒãƒ£ã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆã¯å¿…é ˆã§ã¯ã‚ã‚Šã¾ã›ã‚“. png/jpgファイルをプロジェ"
+"クトã«ã‚³ãƒ”ーã—ã¦ãã ã•ã„."
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Crop empty space."
-msgstr ""
+msgstr "空白を刈り込む"
#: editor/io_plugins/editor_texture_import_plugin.cpp
msgid "Texture"
-msgstr ""
+msgstr "テクスãƒãƒ£"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Import Large Texture"
-msgstr ""
+msgstr "大ããªãƒ†ã‚¯ã‚¹ãƒãƒ£ã‚’インãƒãƒ¼ãƒˆ"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Load Source Image"
-msgstr ""
+msgstr "ソースイメージを読ã¿è¾¼ã‚€"
#: editor/io_plugins/editor_texture_import_plugin.cpp
msgid "Slicing"
-msgstr ""
+msgstr "スライシング"
#: editor/io_plugins/editor_texture_import_plugin.cpp
msgid "Inserting"
-msgstr ""
+msgstr "挿入"
#: editor/io_plugins/editor_texture_import_plugin.cpp
msgid "Saving"
-msgstr ""
+msgstr "ä¿å­˜ä¸­"
#: editor/io_plugins/editor_texture_import_plugin.cpp
msgid "Couldn't save large texture:"
-msgstr ""
+msgstr "大ããªãƒ†ã‚¯ã‚¹ãƒãƒ£ãŒä¿å­˜ã§ãã¾ã›ã‚“ã§ã—ãŸ:"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Build Atlas For:"
-msgstr ""
+msgstr "~ã®ã‚¢ãƒˆãƒ©ã‚¹ã‚’ビルド:"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Loading Image:"
-msgstr ""
+msgstr "イメージを読ã¿è¾¼ã¿ä¸­:"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Couldn't load image:"
-msgstr ""
+msgstr "イメージを読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ:"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Converting Images"
-msgstr ""
+msgstr "イメージを変æ›ä¸­"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Cropping Images"
-msgstr ""
+msgstr "イメージをクロッピング(トリミング)"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Blitting Images"
-msgstr ""
+msgstr "イメージをé…ç½®(Blit)"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Couldn't save atlas image:"
-msgstr ""
+msgstr "アトラスイメージをä¿å­˜ã§ãã¾ã›ã‚“ã§ã—ãŸ:"
#: editor/io_plugins/editor_texture_import_plugin.cpp
+#, fuzzy
msgid "Couldn't save converted texture:"
-msgstr ""
+msgstr "変æ›ã—ãŸãƒ†ã‚¯ã‚¹ãƒãƒ£ã‚’ä¿å­˜ã§ãã¾ã›ã‚“ã§ã—ãŸ:"
#: editor/io_plugins/editor_translation_import_plugin.cpp
+#, fuzzy
msgid "Invalid source!"
-msgstr ""
+msgstr "ä¸æ­£ãªã‚½ãƒ¼ã‚¹!"
#: editor/io_plugins/editor_translation_import_plugin.cpp
msgid "Invalid translation source!"
-msgstr ""
+msgstr "ä¸æ­£ãªç¿»è¨³ã‚½ãƒ¼ã‚¹!"
#: editor/io_plugins/editor_translation_import_plugin.cpp
+#, fuzzy
msgid "Column"
-msgstr ""
+msgstr "カラム"
#: editor/io_plugins/editor_translation_import_plugin.cpp
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Language"
-msgstr ""
+msgstr "言語"
#: editor/io_plugins/editor_translation_import_plugin.cpp
+#, fuzzy
msgid "No items to import!"
-msgstr ""
+msgstr "インãƒãƒ¼ãƒˆã™ã‚‹ã‚‚ã®ãŒã‚ã‚Šã¾ã›ã‚“!"
#: editor/io_plugins/editor_translation_import_plugin.cpp
+#, fuzzy
msgid "No target path!"
-msgstr ""
+msgstr "ターゲットã®ãƒ‘スãŒã‚ã‚Šã¾ã›ã‚“!"
#: editor/io_plugins/editor_translation_import_plugin.cpp
+#, fuzzy
msgid "Import Translations"
-msgstr ""
+msgstr "翻訳をインãƒãƒ¼ãƒˆ"
#: editor/io_plugins/editor_translation_import_plugin.cpp
+#, fuzzy
msgid "Couldn't import!"
-msgstr ""
+msgstr "インãƒãƒ¼ãƒˆã§ãã¾ã›ã‚“ã§ã—ãŸ!"
#: editor/io_plugins/editor_translation_import_plugin.cpp
+#, fuzzy
msgid "Import Translation"
-msgstr ""
+msgstr "翻訳をインãƒãƒ¼ãƒˆ"
#: editor/io_plugins/editor_translation_import_plugin.cpp
+#, fuzzy
msgid "Source CSV:"
-msgstr ""
+msgstr "ソースCSVファイル:"
#: editor/io_plugins/editor_translation_import_plugin.cpp
+#, fuzzy
msgid "Ignore First Row"
-msgstr ""
+msgstr "最åˆã®è¡Œã‚’無視"
#: editor/io_plugins/editor_translation_import_plugin.cpp
msgid "Compress"
-msgstr ""
+msgstr "圧縮"
#: editor/io_plugins/editor_translation_import_plugin.cpp
+#, fuzzy
msgid "Add to Project (project.godot)"
-msgstr ""
+msgstr "プロジェクトã«è¿½åŠ  (project.godot)"
#: editor/io_plugins/editor_translation_import_plugin.cpp
+#, fuzzy
msgid "Import Languages:"
-msgstr ""
+msgstr "言語をインãƒãƒ¼ãƒˆ:"
#: editor/io_plugins/editor_translation_import_plugin.cpp
msgid "Translation"
-msgstr ""
+msgstr "翻訳"
#: editor/multi_node_edit.cpp
msgid "MultiNode Set"
-msgstr ""
+msgstr "複数ノード セット"
#: editor/node_dock.cpp
msgid "Groups"
-msgstr ""
+msgstr "グループ"
#: editor/node_dock.cpp
+#, fuzzy
msgid "Select a Node to edit Signals and Groups."
-msgstr ""
+msgstr "シグナルã¨ã‚°ãƒ«ãƒ¼ãƒ—を編集ã™ã‚‹ãŸã‚ノードをé¸æŠž"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Toggle Autoplay"
-msgstr ""
+msgstr "オートプレイを切替"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "New Animation Name:"
-msgstr ""
+msgstr "æ–°ã—ã„アニメーションã®åå‰:"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "New Anim"
-msgstr ""
+msgstr "æ–°ã—ã„アニメーション"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Change Animation Name:"
-msgstr ""
+msgstr "アニメーションã®åå‰ã‚’変更:"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Delete Animation?"
-msgstr "アニメーションã®æœ€é©åŒ–"
+msgstr "アニメーションを削除ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
msgid "Remove Animation"
-msgstr ""
+msgstr "アニメーションを削除"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "ERROR: Invalid animation name!"
-msgstr ""
+msgstr "エラー:アニメーションã®åå‰ãŒä¸æ­£ã§ã™!"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "ERROR: Animation name already exists!"
-msgstr ""
+msgstr "エラー:アニメーションã®åå‰ãŒã™ã§ã«ã‚ã‚‹åå‰ã§ã™!"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Rename Animation"
-msgstr ""
+msgstr "アニメーションã®åå‰ã‚’変更"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
msgid "Add Animation"
-msgstr ""
+msgstr "アニメーションを加ãˆã‚‹"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Blend Next Changed"
-msgstr ""
+msgstr "ブレンドã™ã‚‹å¯¾è±¡ã‚’変更"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Change Blend Time"
-msgstr ""
+msgstr "ブレンドã™ã‚‹æ™‚間を変更"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Load Animation"
-msgstr ""
+msgstr "アニメーションを読ã¿è¾¼ã¿"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Duplicate Animation"
-msgstr ""
+msgstr "アニメーションを複製"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "ERROR: No animation to copy!"
-msgstr ""
+msgstr "エラー:アニメーションã®è¤‡è£½å…ƒãŒã‚ã‚Šã¾ã›ã‚“"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "ERROR: No animation resource on clipboard!"
-msgstr ""
+msgstr "エラー:クリップボードã«ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã®ãƒªã‚½ãƒ¼ã‚¹ãŒã‚ã‚Šã¾ã›ã‚“"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Pasted Animation"
-msgstr ""
+msgstr "貼り付ã‘ãŸã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Paste Animation"
-msgstr ""
+msgstr "アニメーションを貼り付ã‘ã‚‹"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "ERROR: No animation to edit!"
-msgstr ""
+msgstr "エラー:編集ã™ã‚‹ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ãŒã‚ã‚Šã¾ã›ã‚“!"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Play selected animation backwards from current pos. (A)"
-msgstr ""
+msgstr "é¸æŠžã—ãŸã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’ç¾æ™‚点ã‹ã‚‰å·»ã戻ã—å†ç”Ÿ(A)"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Play selected animation backwards from end. (Shift+A)"
-msgstr ""
+msgstr "é¸æŠžã—ãŸã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’最後ã‹ã‚‰å·»ã戻ã—å†ç”Ÿ (Shift+A)"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Stop animation playback. (S)"
-msgstr ""
+msgstr "アニメーションå†ç”Ÿã‚’中止(S)"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Play selected animation from start. (Shift+D)"
-msgstr ""
+msgstr "é¸æŠžã—ãŸã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’最åˆã‹ã‚‰å†ç”Ÿ(Shift+D)"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Play selected animation from current pos. (D)"
-msgstr ""
+msgstr "é¸æŠžã—ãŸã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’ç¾æ™‚点ã‹ã‚‰å†ç”Ÿ(D)"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Animation position (in seconds)."
-msgstr ""
+msgstr "アニメーションã®çµŒéŽæ™‚é–“(秒)"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Scale animation playback globally for the node."
-msgstr ""
+msgstr "ノードã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³å†ç”Ÿã®ç¸®å°ºå¤‰æ›´."
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Create new animation in player."
-msgstr ""
+msgstr "アニメーションをプレイヤー内ã«æ–°ã—ã作æˆã™ã‚‹"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Load animation from disk."
-msgstr ""
+msgstr "ディスクã‹ã‚‰ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’読ã¿è¾¼ã‚€"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Load an animation from disk."
-msgstr ""
+msgstr "ディスクã‹ã‚‰ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’一ã¤èª­ã¿è¾¼ã‚€"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Save the current animation"
-msgstr ""
+msgstr "ç¾åœ¨ã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’ä¿å­˜ã™ã‚‹"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Display list of animations in player."
-msgstr ""
+msgstr "プレイヤーã®ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ãƒªã‚¹ãƒˆã‚’表示ã™ã‚‹"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Autoplay on Load"
-msgstr ""
+msgstr "読ã¿è¾¼ã¿å¾Œã€è‡ªå‹•å†ç”Ÿ"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Edit Target Blend Times"
-msgstr ""
+msgstr "ターゲットã®ãƒ–レンドã®å›žæ•°ã‚’変更ã™ã‚‹"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Animation Tools"
-msgstr ""
+msgstr "アニメーションツール"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Copy Animation"
-msgstr ""
+msgstr "アニメーションを複製ã™ã‚‹"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Create New Animation"
-msgstr ""
+msgstr "アニメーションを新ã—ã作る"
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Animation Name:"
-msgstr ""
+msgstr "アニメーションã®åå‰:"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/resource_preloader_editor_plugin.cpp
@@ -3082,298 +4007,355 @@ msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp editor/property_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Error!"
-msgstr ""
+msgstr "エラー!"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Blend Times:"
-msgstr ""
+msgstr "ブレンドã®å›žæ•°:"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Next (Auto Queue):"
-msgstr ""
+msgstr "次(オートキュー)"
#: editor/plugins/animation_player_editor_plugin.cpp
+#, fuzzy
msgid "Cross-Animation Blend Times"
-msgstr ""
+msgstr "アニメーション間ã®ãƒ–レンド回数"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Animation"
-msgstr ""
+msgstr "アニメーション"
#: editor/plugins/animation_tree_editor_plugin.cpp
msgid "New name:"
-msgstr ""
+msgstr "æ–°ã—ã„åå‰:"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "ノードフィルターã®ç·¨é›†"
#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Scale:"
-msgstr ""
+msgstr "縮尺:"
#: editor/plugins/animation_tree_editor_plugin.cpp
msgid "Fade In (s):"
-msgstr ""
+msgstr "フェードイン:"
#: editor/plugins/animation_tree_editor_plugin.cpp
msgid "Fade Out (s):"
-msgstr ""
+msgstr "フェードアウト:"
#: editor/plugins/animation_tree_editor_plugin.cpp
msgid "Blend"
-msgstr ""
+msgstr "ブレンド(æ··åˆï¼‰"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Mix"
-msgstr ""
+msgstr "ミクシング"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Auto Restart:"
-msgstr ""
+msgstr "自動ã§ã‚¢ãƒ‹ãƒ¡ãƒ¼ã‚·ãƒ§ãƒ³ã‚’最åˆã‹ã‚‰å†ç”Ÿã™ã‚‹ :"
#: editor/plugins/animation_tree_editor_plugin.cpp
msgid "Restart (s):"
-msgstr ""
+msgstr "アニメーションを最åˆã‹ã‚‰å†ç”Ÿã™ã‚‹ :"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Random Restart (s):"
-msgstr ""
+msgstr "アニメーションをランダムã«æœ€åˆã‹ã‚‰å†ç”Ÿã™ã‚‹:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Start!"
-msgstr ""
+msgstr "å†ç”Ÿé–‹å§‹!"
#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Amount:"
-msgstr ""
+msgstr "ç·è¨ˆ:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Blend:"
-msgstr ""
+msgstr "ブレンド:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Blend 0:"
-msgstr ""
+msgstr "ブレンド 0:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Blend 1:"
-msgstr ""
+msgstr "ブレンド 1:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "X-Fade Time (s):"
-msgstr ""
+msgstr "クロスフェード時間(秒)"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Current:"
-msgstr ""
+msgstr "ç¾åœ¨ã®:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Add Input"
-msgstr ""
+msgstr "入力を追加"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Clear Auto-Advance"
-msgstr ""
+msgstr "自動表示ã®è§£é™¤"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Set Auto-Advance"
-msgstr ""
+msgstr "自動表示を設定"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Delete Input"
-msgstr ""
+msgstr "入力を消去"
#: editor/plugins/animation_tree_editor_plugin.cpp
msgid "Rename"
-msgstr ""
+msgstr "åå‰ã‚’変更ã™ã‚‹"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Animation tree is valid."
-msgstr ""
+msgstr "アニメーションツリーã¯å•é¡Œã‚ã‚Šã¾ã›ã‚“."
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Animation tree is invalid."
-msgstr ""
+msgstr "アニメーションツリーã«å•é¡ŒãŒã‚ã‚Šã¾ã™."
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Animation Node"
-msgstr ""
+msgstr "アニメーションã®ãƒŽãƒ¼ãƒ‰"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "OneShot Node"
-msgstr ""
+msgstr "ワンショット ノード"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Mix Node"
-msgstr ""
+msgstr "ミキシング ノード"
#: editor/plugins/animation_tree_editor_plugin.cpp
msgid "Blend2 Node"
-msgstr ""
+msgstr "ブレンド2ノード"
#: editor/plugins/animation_tree_editor_plugin.cpp
msgid "Blend3 Node"
-msgstr ""
+msgstr "ブレンド3ノード"
#: editor/plugins/animation_tree_editor_plugin.cpp
msgid "Blend4 Node"
-msgstr ""
+msgstr "ブレンド4ノード"
#: editor/plugins/animation_tree_editor_plugin.cpp
msgid "TimeScale Node"
-msgstr ""
+msgstr "進行速度ノード"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "TimeSeek Node"
-msgstr ""
+msgstr "時刻移動ノード"
#: editor/plugins/animation_tree_editor_plugin.cpp
msgid "Transition Node"
-msgstr ""
+msgstr "トランジション(é·ç§»ï¼‰ãƒŽãƒ¼ãƒ‰"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Import Animations.."
-msgstr ""
+msgstr "アニメーションをインãƒãƒ¼ãƒˆ.."
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
msgid "Edit Node Filters"
-msgstr ""
+msgstr "ノードフィルターã®ç·¨é›†"
#: editor/plugins/animation_tree_editor_plugin.cpp
msgid "Filters.."
-msgstr ""
+msgstr "フィルター.."
#: editor/plugins/baked_light_baker.cpp
+#, fuzzy
msgid "Parsing %d Triangles:"
-msgstr ""
+msgstr "%d 三角形をパース中ã§ã™:"
#: editor/plugins/baked_light_baker.cpp
msgid "Triangle #"
-msgstr ""
+msgstr "三角形 #"
#: editor/plugins/baked_light_baker.cpp
+#, fuzzy
msgid "Light Baker Setup:"
-msgstr ""
+msgstr "ライティング(照明)ベイク設定:"
#: editor/plugins/baked_light_baker.cpp
+#, fuzzy
msgid "Parsing Geometry"
-msgstr ""
+msgstr "ジオメトリーをパース"
#: editor/plugins/baked_light_baker.cpp
+#, fuzzy
msgid "Fixing Lights"
-msgstr ""
+msgstr "照明(ライティング)ã®ä¿®å¾©"
#: editor/plugins/baked_light_baker.cpp
+#, fuzzy
msgid "Making BVH"
-msgstr ""
+msgstr "BVHデータを生æˆ"
#: editor/plugins/baked_light_baker.cpp
+#, fuzzy
msgid "Creating Light Octree"
-msgstr ""
+msgstr "照明ã®å…«åˆ†æœ¨ã‚’生æˆ"
#: editor/plugins/baked_light_baker.cpp
+#, fuzzy
msgid "Creating Octree Texture"
-msgstr ""
+msgstr "八分木テクスãƒãƒ£ã‚’生æˆ"
#: editor/plugins/baked_light_baker.cpp
+#, fuzzy
msgid "Transfer to Lightmaps:"
-msgstr ""
+msgstr "ライトマップã¸ã®è»¢å†™:"
#: editor/plugins/baked_light_baker.cpp
+#, fuzzy
msgid "Allocating Texture #"
-msgstr ""
+msgstr "テクスãƒãƒ£ã‚’(メモリ上ã§ï¼‰ç¢ºä¿#"
#: editor/plugins/baked_light_baker.cpp
+#, fuzzy
msgid "Baking Triangle #"
-msgstr ""
+msgstr "三角形をベイク#"
#: editor/plugins/baked_light_baker.cpp
+#, fuzzy
msgid "Post-Processing Texture #"
-msgstr ""
+msgstr "後処ç†ã®ãƒ†ã‚¯ã‚¹ãƒãƒ£#"
#: editor/plugins/baked_light_editor_plugin.cpp
msgid "Bake!"
-msgstr ""
+msgstr "ベイク!"
#: editor/plugins/baked_light_editor_plugin.cpp
+#, fuzzy
msgid "Reset the lightmap octree baking process (start over)."
-msgstr ""
+msgstr "ライトマップ八分木ベイクã®ãƒ—ロセスをリセット(やり直ã—)."
#: editor/plugins/camera_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
msgid "Preview"
-msgstr ""
+msgstr "プレビュー"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Configure Snap"
-msgstr ""
+msgstr "スナップ機能ã®è¨­å®š"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Grid Offset:"
-msgstr ""
+msgstr "グリッドã®ã‚ªãƒ•ã‚»ãƒƒãƒˆ:"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Grid Step:"
-msgstr ""
+msgstr "グリッドã®ã‚¹ãƒ†ãƒƒãƒ—:"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Rotation Offset:"
-msgstr ""
+msgstr "回転ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆ:"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Rotation Step:"
-msgstr ""
+msgstr "回転ã®ã‚¹ãƒ†ãƒƒãƒ—:"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Move Pivot"
-msgstr ""
+msgstr "ピボット移動"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Move Action"
-msgstr ""
+msgstr "移動動作"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Edit IK Chain"
-msgstr ""
+msgstr "IK(インãƒãƒ¼ã‚¹ ã‚­ãƒãƒžãƒ†ã‚£ã‚¯ã‚¹ï¼‰ãƒã‚§ãƒ¼ãƒ³ã®ç·¨é›†"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Edit CanvasItem"
-msgstr ""
+msgstr "キャンãƒã‚¹ã‚¢ã‚¤ãƒ†ãƒ ã®ç·¨é›†"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Change Anchors"
-msgstr ""
+msgstr "アンカーを変更ã™ã‚‹"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom (%):"
-msgstr ""
+msgstr "ズーム (%):"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Paste Pose"
-msgstr ""
+msgstr "ãƒãƒ¼ã‚ºã‚’貼り付ã‘ã‚‹"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Select Mode"
-msgstr "ã™ã¹ã¦é¸æŠž"
+msgstr "é¸æŠžãƒ¢ãƒ¼ãƒ‰"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Drag: Rotate"
-msgstr ""
+msgstr "ドラッグ:回転"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Alt+Drag: Move"
-msgstr ""
+msgstr "Alt+ドラッグ:移動"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Press 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving)."
msgstr ""
+"vキーを押ã™ã¨ãƒ”ボットã®å¤‰æ›´ã€'Shift+v' ã§ãƒ”ボットをドラッグ(移動中ã§ã‚‚)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Alt+RMB: Depth list selection"
-msgstr ""
+msgstr "Alt+å³ã‚¯ãƒªãƒƒã‚¯: デプス(深ã•ï¼‰ãƒªã‚¹ãƒˆã®é¸æŠž"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
@@ -3381,206 +4363,236 @@ msgid "Move Mode"
msgstr "追加ã—ãŸã‚­ãƒ¼ã‚’移動"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Rotate Mode"
-msgstr ""
+msgstr "回転モード"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid ""
"Show a list of all objects at the position clicked\n"
"(same as Alt+RMB in select mode)."
msgstr ""
+"クリックã—ãŸä½ç½®ã®ã‚ªãƒ–ジェクトã®ãƒªã‚¹ãƒˆ\n"
+"(é¸æŠžãƒ¢ãƒ¼ãƒ‰ã§ã®Alt+å³ã‚¯ãƒªãƒƒã‚¯ã¨åŒã˜)"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Click to change object's rotation pivot."
-msgstr ""
+msgstr "クリックã™ã‚‹ã¨ã‚ªãƒ–ジェクトã®å›žè»¢ãƒ”ボットを変更"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Pan Mode"
-msgstr ""
+msgstr "パン・モード"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Lock the selected object in place (can't be moved)."
-msgstr ""
+msgstr "é¸æŠžã—ãŸã‚ªãƒ–ジェクトをロックã—ã¦ç§»å‹•ä¸èƒ½ã¨ã™ã‚‹."
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Unlock the selected object (can be moved)."
-msgstr ""
+msgstr "é¸æŠžã—ãŸã‚ªãƒ–ジェクトをロック解除ã—ã¦ç§»å‹•å¯èƒ½ã¨ã™ã‚‹."
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Makes sure the object's children are not selectable."
-msgstr ""
+msgstr "ã“ã®ã‚ªãƒ–ジェクトã®å­ï¼ˆã‚ªãƒ–ジェクト)をé¸æŠžä¸å¯ã¨ã™ã‚‹."
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Restores the object's children's ability to be selected."
-msgstr ""
+msgstr "ã“ã®ã‚ªãƒ–ジェクトã®å­ï¼ˆã‚ªãƒ–ジェクト)をé¸æŠžå¯èƒ½ã¨ã™ã‚‹."
#: editor/plugins/canvas_item_editor_plugin.cpp
#: 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
-msgstr ""
+msgstr "編集"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Use Snap"
-msgstr ""
+msgstr "スナップ機能を使ã†"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Show Grid"
-msgstr ""
+msgstr "グリッドを表示"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Use Rotation Snap"
-msgstr ""
+msgstr "回転スナップ機能を使ã†"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Snap Relative"
-msgstr ""
+msgstr "相対スナップ機能"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Configure Snap.."
-msgstr ""
+msgstr "スナップ機能ã®è¨­å®š"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Use Pixel Snap"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
+msgstr "ピクセルå˜ä½ã‚¹ãƒŠãƒƒãƒ—"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Skeleton.."
-msgstr ""
+msgstr "スケルトン.."
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Make Bones"
-msgstr ""
+msgstr "ボーンを生æˆ"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Clear Bones"
-msgstr ""
+msgstr "ボーンをクリアã™ã‚‹"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Show Bones"
-msgstr ""
+msgstr "ボーンを表示ã™ã‚‹"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Make IK Chain"
-msgstr ""
+msgstr "IK(インãƒãƒ¼ã‚¹ ã‚­ãƒãƒžãƒ†ã‚£ã‚¯ã‚¹ï¼‰ãƒã‚§ãƒ¼ãƒ³ã®ä½œæˆ"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Clear IK Chain"
-msgstr ""
+msgstr "IK(インãƒãƒ¼ã‚¹ ã‚­ãƒãƒžãƒ†ã‚£ã‚¯ã‚¹ï¼‰ãƒã‚§ãƒ¼ãƒ³ã‚’クリアã™ã‚‹"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "View"
-msgstr ""
+msgstr "ビュー"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom Reset"
-msgstr ""
+msgstr "ズームをリセット"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Zoom Set.."
-msgstr ""
+msgstr "ズームをセットã™ã‚‹.."
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Center Selection"
-msgstr ""
+msgstr "é¸æŠžå¯¾è±¡ã‚’中央ã«"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Frame Selection"
-msgstr ""
+msgstr "é¸æŠžå¯¾è±¡ã‚’フレームã®ä¸­å¤®ã«"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Anchor"
-msgstr ""
+msgstr "アンカー"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Insert Keys"
-msgstr ""
+msgstr "キーフレームを挿入"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Insert Key"
-msgstr ""
+msgstr "キーフレームを挿入"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Insert Key (Existing Tracks)"
-msgstr ""
+msgstr "キーフレームを(既存ã®ãƒˆãƒ©ãƒƒã‚¯ã«ï¼‰æŒ¿å…¥"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Copy Pose"
-msgstr ""
+msgstr "ãƒãƒ¼ã‚ºã‚’コピー"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Clear Pose"
-msgstr ""
+msgstr "ãƒãƒ¼ã‚ºã‚’クリアã™ã‚‹"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Set a Value"
-msgstr ""
+msgstr "値を設定ã™ã‚‹"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Snap (Pixels):"
-msgstr ""
+msgstr "スナップ機能(ピクセルå˜ä½ï¼‰:"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Add %s"
-msgstr ""
+msgstr "%s追加ã™ã‚‹"
#: editor/plugins/canvas_item_editor_plugin.cpp
+#, fuzzy
msgid "Adding %s..."
-msgstr ""
+msgstr "%s追加中..."
#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Create Node"
-msgstr ""
+msgstr "ノードを生æˆ"
#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Error instancing scene from %s"
-msgstr ""
+msgstr "%sシーンã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–エラー"
#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "OK :("
-msgstr ""
+msgstr "ãŠãƒ¼ã‘ー :("
#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
+#, fuzzy
msgid "No parent to instance a child at."
-msgstr ""
+msgstr "å­ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’生æˆã™ã‚‹ãŸã‚ã®è¦ªãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“"
#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
+#, fuzzy
msgid "This operation requires a single selected node."
-msgstr ""
+msgstr "一ã¤ãƒŽãƒ¼ãƒ‰ã‚’指定ã—ãªã„ã¨ã€ã“ã®æ“作ã¯ã§ãã¾ã›ã‚“"
#: editor/plugins/canvas_item_editor_plugin.cpp
#, fuzzy
msgid "Change default type"
msgstr "é…列ã®å€¤ã®ç¨®é¡žã®å¤‰æ›´"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "決定"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
"Drag & drop + Alt : Change node type"
msgstr ""
+"ドラッグ&ドロップ + Shift : 兄弟ノードã¨ã—ã¦åŠ ãˆã‚‹ \n"
+"ドラッグ&ドロップ + Alt : ノードã®ã‚¿ã‚¤ãƒ—を変更ã™ã‚‹"
#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
#: editor/plugins/navigation_polygon_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Create Poly"
-msgstr ""
+msgstr "ãƒãƒªã‚´ãƒ³ã‚’生æˆ"
#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
#: editor/plugins/collision_polygon_editor_plugin.cpp
@@ -3589,7 +4601,7 @@ msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Edit Poly"
-msgstr ""
+msgstr "ãƒãƒªã‚´ãƒ³ã‚’編集"
#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
#: editor/plugins/collision_polygon_editor_plugin.cpp
@@ -3597,632 +4609,785 @@ msgstr ""
#: editor/plugins/navigation_polygon_editor_plugin.cpp
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Edit Poly (Remove Point)"
-msgstr ""
+msgstr "ãƒãƒªã‚´ãƒ³ã‚’編集(ãƒã‚¤ãƒ³ãƒˆï¼ç‚¹ã‚’除去)"
#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
#: editor/plugins/navigation_polygon_editor_plugin.cpp
+#, fuzzy
msgid "Create a new polygon from scratch."
+msgstr "æ–°è¦ã«ãƒãƒªã‚´ãƒ³ã‚’生æˆã™ã‚‹"
+
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
msgstr ""
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
-msgstr ""
+msgstr "3Dãƒãƒªã‚´ãƒ³ã‚’生æˆã™ã‚‹"
#: editor/plugins/collision_shape_2d_editor_plugin.cpp
+#, fuzzy
msgid "Set Handle"
-msgstr ""
+msgstr "ãƒãƒ³ãƒ‰ãƒ«ã‚’設定ã™ã‚‹"
#: editor/plugins/cube_grid_theme_editor_plugin.cpp
+#, fuzzy
msgid "Creating Mesh Library"
-msgstr ""
+msgstr "メッシュライブラリを生æˆ"
#: editor/plugins/cube_grid_theme_editor_plugin.cpp
msgid "Thumbnail.."
-msgstr ""
+msgstr "サムãƒã‚¤ãƒ«.."
#: editor/plugins/cube_grid_theme_editor_plugin.cpp
msgid "Remove item %d?"
-msgstr ""
+msgstr "アイテム%dã‚’å–り除ãã¾ã™ã‹ï¼Ÿ"
#: 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 ""
+msgstr "アイテムを追加"
#: editor/plugins/cube_grid_theme_editor_plugin.cpp
msgid "Remove Selected Item"
-msgstr ""
+msgstr "é¸æŠžã—ãŸã‚¢ã‚¤ãƒ†ãƒ ã‚’å–り除ã"
#: editor/plugins/cube_grid_theme_editor_plugin.cpp
msgid "Import from Scene"
-msgstr ""
+msgstr "シーンã‹ã‚‰ã‚¤ãƒ³ãƒãƒ¼ãƒˆ"
#: editor/plugins/cube_grid_theme_editor_plugin.cpp
msgid "Update from Scene"
-msgstr ""
+msgstr "シーンã‹ã‚‰ã‚¢ãƒƒãƒ—デート"
#: editor/plugins/curve_editor_plugin.cpp
-msgid "Add point"
-msgstr ""
+#, fuzzy
+msgid "Modify Curve Point"
+msgstr "カーブを修正ã™ã‚‹"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "カーブマップを修正"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+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 "é¸æŠžã—ã¦ã„ã‚‹ã‚‚ã®ã‚’削除"
+msgstr "é¸æŠžã—ã¦ã„ã‚‹ãƒã‚¤ãƒ³ãƒˆï¼ç‚¹ã‚’削除"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Left linear"
+msgstr "等速"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Right linear"
+msgstr "å³å´é¢å›³"
#: editor/plugins/curve_editor_plugin.cpp
msgid "Load preset"
+msgstr "åˆæœŸè¨­å®šå€¤ã‚’読ã¿è¾¼ã‚€"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Remove Curve Point"
+msgstr "パスã®ãƒã‚¤ãƒ³ãƒˆã‚’除去"
+
+#: editor/plugins/curve_editor_plugin.cpp
+msgid "Toggle Curve Linear Tangent"
msgstr ""
#: editor/plugins/curve_editor_plugin.cpp
-msgid "Modify Curve"
+msgid "Hold Shift to edit tangents individually"
msgstr ""
#: editor/plugins/gradient_editor_plugin.cpp
msgid "Add/Remove Color Ramp Point"
-msgstr ""
+msgstr "色変化ã®å‚¾æ–œã«ã€ãƒã‚¤ãƒ³ãƒˆï¼ç‚¹ã‚’追加ã¾ãŸã¯é™¤åŽ»ã™ã‚‹"
#: editor/plugins/gradient_editor_plugin.cpp
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Modify Color Ramp"
-msgstr ""
+msgstr "色変化ã®å‚¾æ–œã‚’修正"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Item %d"
-msgstr ""
+msgstr "アイテム%d"
#: editor/plugins/item_list_editor_plugin.cpp
msgid "Items"
-msgstr ""
+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
+#, fuzzy
msgid "Create Occluder Polygon"
-msgstr ""
+msgstr "オクルージョンを生ã˜ã‚‹ãƒãƒªã‚´ãƒ³ã‚’生æˆ"
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
#: editor/plugins/navigation_polygon_editor_plugin.cpp
msgid "Edit existing polygon:"
-msgstr ""
+msgstr "既存ã®ãƒãƒªã‚´ãƒ³ã‚’編集:"
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
#: editor/plugins/navigation_polygon_editor_plugin.cpp
msgid "LMB: Move Point."
-msgstr ""
+msgstr "マウス左ボタン:ãƒã‚¤ãƒ³ãƒˆï¼ç‚¹ã‚’移動."
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
#: editor/plugins/navigation_polygon_editor_plugin.cpp
+#, fuzzy
msgid "Ctrl+LMB: Split Segment."
-msgstr ""
+msgstr "Ctrl+マウス左ボタン: セグメントを分割"
#: editor/plugins/light_occluder_2d_editor_plugin.cpp
#: editor/plugins/navigation_polygon_editor_plugin.cpp
msgid "RMB: Erase Point."
-msgstr ""
+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
msgid "Move Point in Line2D"
-msgstr ""
+msgstr "Line2D ã®ãƒã‚¤ãƒ³ãƒˆï¼ç‚¹ã‚’移動"
#: editor/plugins/line_2d_editor_plugin.cpp
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Select Points"
-msgstr ""
+msgstr "ãƒã‚¤ãƒ³ãƒˆï¼ç‚¹ã‚’é¸æŠž"
#: editor/plugins/line_2d_editor_plugin.cpp
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
+#, fuzzy
msgid "Shift+Drag: Select Control Points"
-msgstr ""
+msgstr "Shift+ドラッグ:コントロールãƒã‚¤ãƒ³ãƒˆã‚’é¸æŠž"
#: editor/plugins/line_2d_editor_plugin.cpp
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
+#, fuzzy
msgid "Click: Add Point"
-msgstr ""
+msgstr "クリック:ãƒã‚¤ãƒ³ãƒˆï¼ç‚¹ã‚’追加"
#: editor/plugins/line_2d_editor_plugin.cpp
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
+#, fuzzy
msgid "Right Click: Delete Point"
-msgstr ""
+msgstr "å³ã‚¯ãƒªãƒƒã‚¯:ãƒã‚¤ãƒ³ãƒˆï¼ç‚¹ã‚’除去"
#: editor/plugins/line_2d_editor_plugin.cpp
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
+#, fuzzy
msgid "Add Point (in empty space)"
-msgstr ""
+msgstr "ãƒã‚¤ãƒ³ãƒˆï¼ç‚¹ã‚’追加(空白ã«ï¼‰"
#: editor/plugins/line_2d_editor_plugin.cpp
msgid "Split Segment (in line)"
-msgstr ""
+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 ""
+msgstr "ãƒã‚¤ãƒ³ãƒˆï¼ç‚¹ã‚’除去"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Mesh is empty!"
-msgstr ""
+msgstr "メッシュãŒã‚ã‚Šã¾ã›ã‚“!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
-msgstr ""
+msgstr "スタティック(ä¸å¤‰ï¼‰ä¸‰è§’形メッシュ ボディを作æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Create Static Convex Body"
-msgstr ""
+msgstr "スタティック(ä¸å¤‰ï¼‰å‡¸çŠ¶ãƒœãƒ‡ã‚£ã‚’生æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "This doesn't work on scene root!"
-msgstr ""
+msgstr "シーンã®ãƒ«ãƒ¼ãƒˆã§ã¯æ©Ÿèƒ½ã—ã¾ã›ã‚“!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Create Trimesh Shape"
-msgstr ""
+msgstr "三角形メッシュ ã®ã‚·ã‚§ã‚¤ãƒ—を生æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Convex Shape"
-msgstr ""
+msgstr "凸状シェイプを生æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Create Navigation Mesh"
-msgstr ""
+msgstr "ナビメッシュ(ナビゲーションメッシュ)ã®ç”Ÿæˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "MeshInstance lacks a Mesh!"
-msgstr ""
+msgstr "メッシュインスタンスã®ãƒ¡ãƒƒã‚·ãƒ¥ãŒå­˜åœ¨ã—ã¾ã›ã‚“"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Mesh has not surface to create outlines from!"
-msgstr ""
+msgstr "メッシュã«ã‚¢ã‚¦ãƒˆãƒ©ã‚¤ãƒ³ã‚’作æˆã™ã‚‹ãŸã‚ã®ã‚µãƒ¼ãƒ•ã‚§ã‚¤ã‚¹ãŒå­˜åœ¨ã—ã¾ã›ã‚“"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Could not create outline!"
-msgstr ""
+msgstr "アウトラインを生æˆã§ãã¾ã›ã‚“ã§ã—ãŸ!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline"
-msgstr ""
+msgstr "アウトラインを生æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Create Trimesh Static Body"
-msgstr ""
+msgstr "スタティック(ä¸å¤‰ï¼‰ä¸‰è§’形メッシュ ボディを作æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Convex Static Body"
-msgstr ""
+msgstr "スタティック(ä¸å¤‰ï¼‰å‡¸çŠ¶ãƒœãƒ‡ã‚£ã‚’生æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
-msgstr ""
+msgstr "三角形メッシュ兄弟コリジョンを生æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Create Convex Collision Sibling"
-msgstr ""
+msgstr "凸型兄弟コリジョンを生æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Create Outline Mesh.."
-msgstr ""
+msgstr "アウトラインメッシュを生æˆ.."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh"
-msgstr ""
+msgstr "アウトラインメッシュを生æˆ"
#: editor/plugins/mesh_instance_editor_plugin.cpp
+#, fuzzy
msgid "Outline Size:"
-msgstr ""
+msgstr "アウトラインã®ã‚µã‚¤ã‚º:"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "No mesh source specified (and no MultiMesh set in node)."
msgstr ""
+"メッシュã®ã‚½ãƒ¼ã‚¹ãŒæŒ‡å®šã•ã‚Œã¦ã„ã¾ã›ã‚“(MultiMesh setã‚‚ node内ã«å­˜åœ¨ã—ã¾ã›ã‚“)"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "No mesh source specified (and MultiMesh contains no Mesh)."
msgstr ""
+"メッシュã®ã‚½ãƒ¼ã‚¹ãŒæŒ‡å®šã•ã‚Œã¦ã„ã¾ã›ã‚“(ãã—ã¦MultiMesh set内ã«ã¯ã¯ãƒ¡ãƒƒã‚·ãƒ¥ãŒå­˜"
+"在ã—ã¾ã›ã‚“)."
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Mesh source is invalid (invalid path)."
-msgstr ""
+msgstr "メッシュソースã¯æ­£ã—ã指定ã•ã‚Œã¦ã„ã¾ã›ã‚“(ä¸æ­£ãªãƒ‘ス)"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Mesh source is invalid (not a MeshInstance)."
msgstr ""
+"メッシュソースã¯æ­£ã—ãã‚ã‚Šã¾ã›ã‚“(メッシュã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã§ã¯ã‚ã‚Šã¾ã›ã‚“)"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Mesh source is invalid (contains no Mesh resource)."
-msgstr ""
+msgstr "メッシュソースã¯æ­£ã—ãã‚ã‚Šã¾ã›ã‚“(メッシュリソースãŒå«ã¾ã‚Œã¦ã„ã¾ã›ã‚“)"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "No surface source specified."
-msgstr ""
+msgstr "サーフェイスã®ã‚½ãƒ¼ã‚¹ãŒæŒ‡å®šã•ã‚Œã¦ã„ã¾ã›ã‚“."
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Surface source is invalid (invalid path)."
-msgstr ""
+msgstr "サーフェイスã®ã‚½ãƒ¼ã‚¹ãŒæ­£ã—ãã‚ã‚Šã¾ã›ã‚“(ä¸æ­£ãªãƒ‘ス)"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Surface source is invalid (no geometry)."
-msgstr ""
+msgstr "サーフェイスã®ã‚½ãƒ¼ã‚¹ãŒæ­£ã—ãã‚ã‚Šã¾ã›ã‚“(ジオメトリーãŒã‚ã‚Šã¾ã›ã‚“)"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Surface source is invalid (no faces)."
-msgstr ""
+msgstr "サーフェースソースã¯æ­£ã—ãã‚ã‚Šã¾ã›ã‚“(フェースãŒã‚ã‚Šã¾ã›ã‚“)"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Parent has no solid faces to populate."
-msgstr ""
+msgstr "åˆæœŸå€¤ã‚’設定ã™ã‚‹å¡—ã‚Šã¤ã¶ã—é¢ãŒã€è¦ªã«ã‚ã‚Šã¾ã›ã‚“."
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Couldn't map area."
-msgstr ""
+msgstr "エリアをマッピングã§ãã¾ã›ã‚“"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Select a Source Mesh:"
-msgstr ""
+msgstr "ソースメッシュをé¸ã¶:"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Select a Target Surface:"
-msgstr ""
+msgstr "ターゲットサーフェースをé¸ã¶:"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Populate Surface"
-msgstr ""
+msgstr "サーフェースã«åˆæœŸå€¤ã‚’設定"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Populate MultiMesh"
-msgstr ""
+msgstr "マルãƒãƒ¡ãƒƒã‚·ãƒ¥ã«åˆæœŸå€¤ã‚’設定"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Target Surface:"
-msgstr ""
+msgstr "ターゲットサーフェース:"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Source Mesh:"
-msgstr ""
+msgstr "ソースメッシュ:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "X-Axis"
-msgstr ""
+msgstr "X軸"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Y-Axis"
-msgstr ""
+msgstr "Y軸"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Z-Axis"
-msgstr ""
+msgstr "Z軸"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Mesh Up Axis:"
-msgstr ""
+msgstr "メッシュã®ã‚¢ãƒƒãƒ—軸:"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Random Rotation:"
-msgstr ""
+msgstr "ランダムãªå›žè»¢:"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Random Tilt:"
-msgstr ""
+msgstr "ランダムãªãƒ†ã‚£ãƒ«ãƒˆ:"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Random Scale:"
-msgstr ""
+msgstr "縮尺をランダムã«å¤‰æ›´:"
#: editor/plugins/multimesh_editor_plugin.cpp
+#, fuzzy
msgid "Populate"
-msgstr ""
+msgstr "åˆæœŸå€¤ã‚’設定"
#: editor/plugins/navigation_polygon_editor_plugin.cpp
msgid "Create Navigation Polygon"
-msgstr ""
+msgstr "ナビゲーションãƒãƒªã‚´ãƒ³ã‚’生æˆ"
#: editor/plugins/navigation_polygon_editor_plugin.cpp
msgid "Remove Poly And Point"
-msgstr ""
+msgstr "ãƒãƒªã‚´ãƒ³ã¨ãƒã‚¤ãƒ³ãƒˆã‚’除去"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#, fuzzy
msgid "Clear Emission Mask"
-msgstr ""
+msgstr "発光(Emission)マスクをクリア"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "Generating AABB"
-msgstr ""
+msgstr "軸平行境界ボックス(AABB)を生æˆ"
#: 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
+#, fuzzy
msgid "Error loading image:"
-msgstr ""
+msgstr "イメージ読ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼:"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#, fuzzy
msgid "No pixels with transparency > 128 in image.."
-msgstr ""
+msgstr "イメージ内ã«é€æ˜Žåº¦>128ã®ãƒ”クセルãŒã‚ã‚Šã¾ã›ã‚“.."
#: editor/plugins/particles_2d_editor_plugin.cpp
+#, fuzzy
msgid "Set Emission Mask"
-msgstr ""
+msgstr "発光(Emission)マスクを設定"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#, fuzzy
msgid "Generate Visibility Rect"
-msgstr ""
+msgstr "å¯è¦–性ã®çŸ©å½¢ã‚’生æˆ"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#, fuzzy
msgid "Load Emission Mask"
-msgstr ""
+msgstr "発光(Emission)マスクを読ã¿è¾¼ã‚€"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
+msgid "Particles"
+msgstr "頂点"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#, fuzzy
msgid "Generated Point Count:"
-msgstr ""
+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
msgid "Emission Mask"
-msgstr ""
+msgstr "発光(Emission)マスク"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#, fuzzy
msgid "Capture from Pixel"
-msgstr ""
+msgstr "ピクセルã‹ã‚‰å–å¾—"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Emission Colors"
-msgstr ""
+msgstr "発光(Emission)色"
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "Node does not contain geometry."
-msgstr ""
+msgstr "ノードã¯ã‚¸ã‚ªãƒ¡ãƒˆãƒªãƒ¼ã‚’å«ã‚“ã§ã„ã¾ã›ã‚“."
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "Node does not contain geometry (faces)."
-msgstr ""
+msgstr "ノードã¯ã‚¸ã‚ªãƒ¡ãƒˆãƒªãƒ¼(é¢ï¼‰ã‚’å«ã‚“ã§ã„ã¾ã›ã‚“."
#: editor/plugins/particles_editor_plugin.cpp
msgid "A processor material of type 'ParticlesMaterial' is required."
msgstr ""
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "Faces contain no area!"
-msgstr ""
+msgstr "é¢ã«ã‚¨ãƒªã‚¢ãŒå«ã¾ã‚Œã¦ã„ã¾ã›ã‚“!"
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "No faces!"
-msgstr ""
+msgstr "é¢ãŒã‚ã‚Šã¾ã›ã‚“!"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Generate AABB"
-msgstr ""
+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
+#, fuzzy
msgid "Clear Emitter"
-msgstr ""
+msgstr "発光物をクリア"
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "Create Emitter"
-msgstr ""
+msgstr "発光物を生æˆ"
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "Emission Points:"
-msgstr ""
+msgstr "発光点:"
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "Surface Points"
-msgstr ""
+msgstr "サーフェース(表é¢ï¼‰ãƒã‚¤ãƒ³ãƒˆ"
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "Surface Points+Normal (Directed)"
-msgstr ""
+msgstr "サーフェースãƒã‚¤ãƒ³ãƒˆï¼‹Normal(指å‘性)"
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "Volume"
-msgstr ""
+msgstr "(発光ã®ï¼‰ãƒœãƒªãƒ¥ãƒ¼ãƒ "
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "Emission Source: "
-msgstr ""
+msgstr "発光æº: "
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "Generate Visibility AABB"
-msgstr ""
+msgstr "å¯è¦–性ã®è»¸å¹³è¡Œå¢ƒç•Œãƒœãƒƒã‚¯ã‚¹ã‚’生æˆ"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Remove Point from Curve"
-msgstr ""
+msgstr "曲線ã‹ã‚‰ãƒã‚¤ãƒ³ãƒˆã‚’除去"
#: editor/plugins/path_2d_editor_plugin.cpp
+#, fuzzy
msgid "Remove Out-Control from Curve"
-msgstr ""
+msgstr "Out-ãƒãƒ³ãƒ‰ãƒ«ã‚’曲線ã‹ã‚‰é™¤åŽ»"
#: editor/plugins/path_2d_editor_plugin.cpp
+#, fuzzy
msgid "Remove In-Control from Curve"
-msgstr ""
+msgstr "In-ãƒãƒ³ãƒ‰ãƒ«ã‚’曲線ã‹ã‚‰é™¤åŽ»"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
+#, fuzzy
msgid "Add Point to Curve"
-msgstr ""
+msgstr "ãƒã‚¤ãƒ³ãƒˆã‚’曲線ã«è¿½åŠ "
#: editor/plugins/path_2d_editor_plugin.cpp
+#, fuzzy
msgid "Move Point in Curve"
-msgstr ""
+msgstr "曲線ã®ãƒã‚¤ãƒ³ãƒˆã‚’移動"
#: editor/plugins/path_2d_editor_plugin.cpp
+#, fuzzy
msgid "Move In-Control in Curve"
-msgstr ""
+msgstr "曲線ã®In-ãƒãƒ³ãƒ‰ãƒ«ã‚’移動ã™ã‚‹"
#: editor/plugins/path_2d_editor_plugin.cpp
+#, fuzzy
msgid "Move Out-Control in Curve"
-msgstr ""
+msgstr "曲線ã®Out-ãƒãƒ³ãƒ‰ãƒ«ã‚’移動ã™ã‚‹"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Select Control Points (Shift+Drag)"
-msgstr ""
+msgstr "コントロールãƒã‚¤ãƒ³ãƒˆã‚’é¸ã¶ (Shift+Drag)"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
+#, fuzzy
msgid "Split Segment (in curve)"
-msgstr ""
+msgstr "分割ã™ã‚‹(曲線を)"
#: editor/plugins/path_2d_editor_plugin.cpp
#: editor/plugins/path_editor_plugin.cpp
msgid "Close Curve"
-msgstr ""
+msgstr "曲線を閉ã˜ã‚‹"
#: editor/plugins/path_editor_plugin.cpp
+#, fuzzy
msgid "Curve Point #"
-msgstr ""
+msgstr "曲線ã®ãƒã‚¤ãƒ³ãƒˆ#"
#: editor/plugins/path_editor_plugin.cpp
+#, fuzzy
msgid "Set Curve Point Pos"
-msgstr ""
+msgstr "曲線ã®ãƒã‚¤ãƒ³ãƒˆã®ä½ç½®ã‚’指定"
#: editor/plugins/path_editor_plugin.cpp
+#, fuzzy
msgid "Set Curve In Pos"
-msgstr ""
+msgstr "曲線ã®In-ãƒãƒ³ãƒ‰ãƒ«ã®ä½ç½®ã‚’指定"
#: editor/plugins/path_editor_plugin.cpp
+#, fuzzy
msgid "Set Curve Out Pos"
-msgstr ""
+msgstr "曲線ã®Out-ãƒãƒ³ãƒ‰ãƒ«ã®ä½ç½®ã‚’指定"
#: editor/plugins/path_editor_plugin.cpp
+#, fuzzy
msgid "Split Path"
-msgstr ""
+msgstr "パスを分割"
#: editor/plugins/path_editor_plugin.cpp
+#, fuzzy
msgid "Remove Path Point"
-msgstr ""
+msgstr "パスã®ãƒã‚¤ãƒ³ãƒˆã‚’除去"
#: editor/plugins/path_editor_plugin.cpp
-#, fuzzy
msgid "Remove Out-Control Point"
-msgstr "é¸æŠžã—ã¦ã„ã‚‹ã‚‚ã®ã‚’削除"
+msgstr "曲線ã®Out-ãƒãƒ³ãƒ‰ãƒ«ã‚’除去"
#: editor/plugins/path_editor_plugin.cpp
msgid "Remove In-Control Point"
-msgstr ""
+msgstr "曲線ã®In-ãƒãƒ³ãƒ‰ãƒ«ã‚’除去"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Create UV Map"
-msgstr ""
+msgstr "UVマップを生æˆ"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Transform UV Map"
-msgstr ""
+msgstr "UVマップをトランスフォーム"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Polygon 2D UV Editor"
-msgstr ""
+msgstr "ãƒãƒªã‚´ãƒ³ï¼’Dã®UVエディタ"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Move Point"
-msgstr ""
+msgstr "ãƒã‚¤ãƒ³ãƒˆã‚’移動"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Ctrl: Rotate"
-msgstr ""
+msgstr "Ctrl: 回転"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Shift: Move All"
-msgstr ""
+msgstr "Shift: ã™ã¹ã¦ç§»å‹•"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Shift+Ctrl: Scale"
-msgstr ""
+msgstr "Shift+Ctrl: 縮尺(Scale)"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Move Polygon"
-msgstr ""
+msgstr "ãƒãƒªã‚´ãƒ³ã‚’移動"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Rotate Polygon"
-msgstr ""
+msgstr "ãƒãƒªã‚´ãƒ³ã‚’回転"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Scale Polygon"
-msgstr ""
+msgstr "ãƒãƒªã‚´ãƒ³ã®ç¸®å°ºã‚’変更"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Polygon->UV"
-msgstr ""
+msgstr "ãƒãƒªã‚´ãƒ³->UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "UV->Polygon"
-msgstr ""
+msgstr "UV->ãƒãƒªã‚´ãƒ³"
#: editor/plugins/polygon_2d_editor_plugin.cpp
+#, fuzzy
msgid "Clear UV"
-msgstr ""
+msgstr "UVをクリア"
#: editor/plugins/polygon_2d_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap"
-msgstr ""
+msgstr "スナップ"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Enable Snap"
-msgstr ""
+msgstr "スナップを有効ã«ã™ã‚‹"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid"
-msgstr ""
+msgstr "グリッド"
#: editor/plugins/resource_preloader_editor_plugin.cpp
+#, fuzzy
msgid "ERROR: Couldn't load resource!"
-msgstr ""
+msgstr "エラー:リソースを読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ!"
#: editor/plugins/resource_preloader_editor_plugin.cpp
+#, fuzzy
msgid "Add Resource"
-msgstr ""
+msgstr "リソースを追加"
#: editor/plugins/resource_preloader_editor_plugin.cpp
+#, fuzzy
msgid "Rename Resource"
-msgstr ""
+msgstr "リソースã®åå‰ã‚’変ãˆã‚‹"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
msgid "Delete Resource"
-msgstr ""
+msgstr "リソースを消去ã™ã‚‹"
#: editor/plugins/resource_preloader_editor_plugin.cpp
+#, fuzzy
msgid "Resource clipboard is empty!"
-msgstr ""
+msgstr "リソースã®ã‚¯ãƒªãƒƒãƒ—ボードã¯ç©ºã§ã™!"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Load Resource"
-msgstr ""
+msgstr "リソースを読ã¿è¾¼ã‚€"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
@@ -4233,129 +5398,149 @@ msgid "Paste"
msgstr "貼り付ã‘"
#: editor/plugins/rich_text_editor_plugin.cpp
+#, fuzzy
msgid "Parse BBCode"
-msgstr ""
+msgstr "BBコードをパースã™ã‚‹"
#: editor/plugins/sample_editor_plugin.cpp
+#, fuzzy
msgid "Length:"
-msgstr ""
+msgstr "é•·ã•:"
#: editor/plugins/sample_library_editor_plugin.cpp
+#, fuzzy
msgid "Open Sample File(s)"
-msgstr ""
+msgstr "サンプルファイルを開ã‘ã‚‹"
#: editor/plugins/sample_library_editor_plugin.cpp
+#, fuzzy
msgid "ERROR: Couldn't load sample!"
-msgstr ""
+msgstr "エラー:サンプルを読ã¿è¾¼ã‚ã¾ã›ã‚“!"
#: editor/plugins/sample_library_editor_plugin.cpp
msgid "Add Sample"
-msgstr ""
+msgstr "サンプルを追加"
#: editor/plugins/sample_library_editor_plugin.cpp
msgid "Rename Sample"
-msgstr ""
+msgstr "サンプルã®åå‰ã‚’変ãˆã‚‹"
#: editor/plugins/sample_library_editor_plugin.cpp
msgid "Delete Sample"
-msgstr ""
+msgstr "サンプルを消去ã™ã‚‹"
#: editor/plugins/sample_library_editor_plugin.cpp
msgid "16 Bits"
-msgstr ""
+msgstr "16ビット"
#: editor/plugins/sample_library_editor_plugin.cpp
msgid "8 Bits"
-msgstr ""
+msgstr "8ビット"
#: editor/plugins/sample_library_editor_plugin.cpp
msgid "Stereo"
-msgstr ""
+msgstr "ステレオ音声"
#: editor/plugins/sample_library_editor_plugin.cpp
msgid "Mono"
-msgstr ""
+msgstr "モノラル音声"
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/script_editor_debugger.cpp
msgid "Format"
-msgstr ""
+msgstr "フォーマット"
#: editor/plugins/sample_library_editor_plugin.cpp
msgid "Pitch"
-msgstr ""
+msgstr "ピッãƒ"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Clear Recent Files"
+msgstr "最近開ã„ãŸãƒ•ã‚¡ã‚¤ãƒ«ã®è¨˜éŒ²ã‚’クリア"
+
+#: editor/plugins/script_editor_plugin.cpp
+msgid ""
+"Close and save changes?\n"
+"\""
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Error while saving theme"
-msgstr ""
+msgstr "テーマをä¿å­˜ã™ã‚‹é€”中ã§ã®ã‚¨ãƒ©ãƒ¼"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error saving"
-msgstr ""
+msgstr "ä¿å­˜ã‚¨ãƒ©ãƒ¼"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Error importing theme"
-msgstr ""
+msgstr "テーマをインãƒãƒ¼ãƒˆä¸­ã®ã‚¨ãƒ©ãƒ¼"
#: editor/plugins/script_editor_plugin.cpp
msgid "Error importing"
-msgstr ""
+msgstr "インãƒãƒ¼ãƒˆã®ã‚¨ãƒ©ãƒ¼"
#: editor/plugins/script_editor_plugin.cpp
msgid "Import Theme"
-msgstr ""
+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 ""
+msgstr "次ã®ã‚¹ã‚¯ãƒªãƒ—ト"
#: editor/plugins/script_editor_plugin.cpp
msgid "Previous script"
-msgstr ""
+msgstr "ç›´å‰ã®ã‚¹ã‚¯ãƒªãƒ—ト"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "File"
-msgstr ""
+msgstr "ファイル"
#: editor/plugins/script_editor_plugin.cpp editor/property_editor.cpp
msgid "New"
-msgstr ""
+msgstr "æ–°ã—ã„"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save All"
-msgstr ""
+msgstr "ã™ã¹ã¦ä¿å­˜"
#: editor/plugins/script_editor_plugin.cpp
msgid "Soft Reload Script"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "History Prev"
-msgstr ""
+msgstr "ç›´å‰ã®å±¥æ­´"
#: editor/plugins/script_editor_plugin.cpp
msgid "History Next"
-msgstr ""
+msgstr "次ã®å±¥æ­´"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Reload Theme"
-msgstr ""
+msgstr "テーマをå†èª­è¾¼"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save Theme"
-msgstr ""
+msgstr "テーマをä¿å­˜"
#: editor/plugins/script_editor_plugin.cpp
msgid "Save Theme As"
-msgstr ""
+msgstr "テーマã«åå‰ã‚’付ã‘ã¦ä¿å­˜"
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
@@ -4368,68 +5553,84 @@ msgid "Close All"
msgstr "é–‰ã˜ã‚‹"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Scripts Panel"
+msgstr "ãŠæ°—ã«å…¥ã‚Šã‚’切り替ãˆã‚‹"
+
+#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
+#, fuzzy
msgid "Find.."
-msgstr ""
+msgstr "検索.."
#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
+#, fuzzy
msgid "Find Next"
-msgstr ""
+msgstr "次を探ã™"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Step Over"
-msgstr ""
+msgstr "ステップオーãƒãƒ¼"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Step Into"
-msgstr ""
+msgstr "ステップイン"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Break"
-msgstr ""
+msgstr "(デãƒãƒƒã‚°ã§ï¼‰ãƒ–レーク"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Continue"
-msgstr ""
+msgstr "実行を継続"
#: editor/plugins/script_editor_plugin.cpp
msgid "Keep Debugger Open"
-msgstr ""
+msgstr "デãƒãƒƒã‚¬ã‚’é–‹ã„ãŸã¾ã¾ã«"
+
+#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "次ã®ã‚¨ãƒ‡ã‚£ã‚¿ã‚’é–‹ã"
#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
-msgstr ""
+msgstr "ウィンドウ"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Move Left"
-msgstr ""
+msgstr "å·¦ã«ç§»å‹•"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Move Right"
-msgstr ""
+msgstr "å³ã«ç§»å‹•"
#: editor/plugins/script_editor_plugin.cpp
msgid "Open Godot online documentation"
-msgstr ""
+msgstr "Godotã®ã‚ªãƒ³ãƒ©ã‚¤ãƒ³æ–‡æ›¸ã‚’é–‹ã"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid "Search the class hierarchy."
-msgstr ""
+msgstr "クラス階層を検索."
#: editor/plugins/script_editor_plugin.cpp
msgid "Search the reference documentation."
-msgstr ""
+msgstr "リファレンス文書を探ã™."
#: editor/plugins/script_editor_plugin.cpp
msgid "Go to previous edited document."
-msgstr ""
+msgstr "ç›´å‰ã®ã€Œç·¨é›†ã—ãŸæ–‡æ›¸ã€ã¸ç§»å‹•."
#: editor/plugins/script_editor_plugin.cpp
msgid "Go to next edited document."
-msgstr ""
+msgstr "次ã®ã®ã€Œç·¨é›†ã—ãŸæ–‡æ›¸ã€ã¸ç§»å‹•."
#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
@@ -4438,50 +5639,59 @@ msgstr "離散"
#: editor/plugins/script_editor_plugin.cpp
msgid "Create Script"
-msgstr ""
+msgstr "スクリプトを作æˆ"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid ""
"The following files are newer on disk.\n"
"What action should be taken?:"
msgstr ""
+"次ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ã€ã‚ˆã‚Šæ–°ã—ã„版ãŒãƒ‡ã‚£ã‚¹ã‚¯ã«å­˜åœ¨ã—ã¾ã™\n"
+"ã©ã†ã—ã¾ã™ã‹?:"
#: editor/plugins/script_editor_plugin.cpp
msgid "Reload"
-msgstr ""
+msgstr "å†èª­è¾¼"
#: editor/plugins/script_editor_plugin.cpp
msgid "Resave"
-msgstr ""
+msgstr "å†ä¿å­˜"
#: editor/plugins/script_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Debugger"
-msgstr ""
+msgstr "デãƒãƒƒã‚¬"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
msgid ""
"Built-in scripts can only be edited when the scene they belong to is loaded"
msgstr ""
+"組ã¿è¾¼ã¾ã‚ŒãŸã‚¹ã‚¯ãƒªãƒ—トã¯æ‰€å±žã™ã‚‹ã‚·ãƒ¼ãƒ³ãŒèª­ã¿è¾¼ã¾ã‚Œã¦ã„ãªã„ã¨ç·¨é›†ã§ãã¾ã›ã‚“"
#: editor/plugins/script_text_editor.cpp
-msgid "Pick Color"
+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 ""
+msgstr "大文字ã¨å°æ–‡å­—を変æ›"
#: editor/plugins/script_text_editor.cpp
msgid "Uppercase"
-msgstr ""
+msgstr "大文字"
#: editor/plugins/script_text_editor.cpp
msgid "Lowercase"
-msgstr ""
+msgstr "å°æ–‡å­—"
#: editor/plugins/script_text_editor.cpp
msgid "Capitalize"
-msgstr ""
+msgstr "先頭を大文字ã«"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp scene/gui/line_edit.cpp
@@ -4503,140 +5713,160 @@ msgstr "ã™ã¹ã¦é¸æŠž"
#: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp
msgid "Move Up"
-msgstr ""
+msgstr "上ã«ç§»å‹•"
#: editor/plugins/script_text_editor.cpp editor/scene_tree_dock.cpp
msgid "Move Down"
-msgstr ""
+msgstr "下ã«ç§»å‹•"
+
+#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "ãƒã‚¤ãƒ³ãƒˆï¼ç‚¹ã‚’除去"
#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
-msgstr ""
+msgstr "左インデント"
#: editor/plugins/script_text_editor.cpp
msgid "Indent Right"
-msgstr ""
+msgstr "å³ã‚¤ãƒ³ãƒ‡ãƒ³ãƒˆ"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
msgid "Toggle Comment"
-msgstr ""
+msgstr "コメントを切り替ãˆã‚‹"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
msgid "Clone Down"
-msgstr ""
+msgstr "複製ã—ã¦ãƒ€ã‚¦ãƒ³ãƒ­ãƒ¼ãƒ‰"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
msgid "Complete Symbol"
-msgstr ""
+msgstr "記å·ã™ã¹ã¦"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
msgid "Trim Trailing Whitespace"
-msgstr ""
+msgstr "連続スペースを刈り込む"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Spaces"
-msgstr ""
+msgstr "インデントをスペースã«å¤‰æ›"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Tabs"
-msgstr ""
+msgstr "インデントをタブã«å¤‰æ›"
#: editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
-msgstr ""
+msgstr "自動インデント"
#: editor/plugins/script_text_editor.cpp
#: modules/visual_script/visual_script_editor.cpp
msgid "Toggle Breakpoint"
-msgstr ""
+msgstr "ブレークãƒã‚¤ãƒ³ãƒˆã‚’切替"
#: editor/plugins/script_text_editor.cpp
msgid "Remove All Breakpoints"
-msgstr ""
+msgstr "ã™ã¹ã¦ã®ãƒ–レークãƒã‚¤ãƒ³ãƒˆã‚’消去"
#: editor/plugins/script_text_editor.cpp
msgid "Goto Next Breakpoint"
-msgstr ""
+msgstr "次ã®ãƒ–レークãƒã‚¤ãƒ³ãƒˆã«ç§»å‹•"
#: editor/plugins/script_text_editor.cpp
msgid "Goto Previous Breakpoint"
-msgstr ""
+msgstr "最後ã®ãƒ–レークãƒã‚¤ãƒ³ãƒˆã«æˆ»ã‚‹"
#: editor/plugins/script_text_editor.cpp
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
msgid "Find Previous"
-msgstr ""
+msgstr "å‰ã‚’検索"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Replace.."
-msgstr ""
+msgstr "ç½®ãæ›ãˆ.."
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
msgid "Goto Function.."
-msgstr ""
+msgstr "関数~ã«ç§»å‹•.."
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
+#, fuzzy
msgid "Goto Line.."
-msgstr ""
+msgstr "~行ã«ç§»å‹•.."
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
msgid "Contextual Help"
-msgstr ""
+msgstr "文脈å‚照ヘルプ"
#: editor/plugins/shader_editor_plugin.cpp
msgid "Shader"
-msgstr ""
+msgstr "シェーダー"
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Change Scalar Constant"
-msgstr ""
+msgstr "スカラ定数を変更"
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Change Vec Constant"
-msgstr ""
+msgstr "ベクトル定数を変更"
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Change RGB Constant"
-msgstr ""
+msgstr "RGB定数を変更"
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Change Scalar Operator"
-msgstr ""
+msgstr "スカラ演算å­ã‚’変更"
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Change Vec Operator"
-msgstr ""
+msgstr "ベクトル演算å­ã‚’変更"
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Change Vec Scalar Operator"
-msgstr ""
+msgstr "ベクトル・スカラ演算å­ã‚’変更"
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Change RGB Operator"
-msgstr ""
+msgstr "RGB演算å­ã‚’変更"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Toggle Rot Only"
msgstr ""
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Change Scalar Function"
-msgstr ""
+msgstr "スカラ関数を変更"
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Change Vec Function"
-msgstr ""
+msgstr "ベクトル関数を変更"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Scalar Uniform"
@@ -4652,7 +5882,7 @@ msgstr ""
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Default Value"
-msgstr ""
+msgstr "è¦å®šå€¤ã‚’変更"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change XForm Uniform"
@@ -4668,289 +5898,328 @@ msgstr ""
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Comment"
-msgstr ""
+msgstr "コメントを変更"
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Add/Remove to Color Ramp"
-msgstr ""
+msgstr "色ã®å‚¾æ–œã‚’付加/消去"
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Add/Remove to Curve Map"
-msgstr ""
+msgstr "カーブマップを加ãˆã‚‹/除去"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Modify Curve Map"
-msgstr ""
+msgstr "カーブマップを修正"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Input Name"
-msgstr ""
+msgstr "入力ã®åå‰ã‚’変更"
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Connect Graph Nodes"
-msgstr ""
+msgstr "グラフノードを接続"
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Disconnect Graph Nodes"
-msgstr ""
+msgstr "グラフノードを切断"
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Remove Shader Graph Node"
-msgstr ""
+msgstr "シェーダーグラフノードを除去"
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Move Shader Graph Node"
-msgstr ""
+msgstr "シェーダーグラフノードを移動"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Duplicate Graph Node(s)"
-msgstr ""
+msgstr "グラフノードを複製"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Delete Shader Graph Node(s)"
-msgstr ""
+msgstr "シェーダーグラフノードを消去"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Error: Cyclic Connection Link"
-msgstr ""
+msgstr "エラー:循環çµåˆãƒªãƒ³ã‚¯"
#: editor/plugins/shader_graph_editor_plugin.cpp
+#, fuzzy
msgid "Error: Missing Input Connections"
-msgstr ""
+msgstr "エラー:入力コãƒã‚¯ã‚·ãƒ§ãƒ³ãŒå¤±ã‚ã‚Œã¦ã„ã¾ã™"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Add Shader Graph Node"
-msgstr ""
+msgstr "シェーダーグラフノードを追加"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Orthogonal"
-msgstr ""
+msgstr "並行投影"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Perspective"
-msgstr ""
+msgstr "é€è¦–投影(é è¿‘法)"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Transform Aborted."
-msgstr ""
+msgstr "トランスフォームã¯ä¸­æ­¢ã•ã‚Œã¾ã—ãŸ."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "X-Axis Transform."
-msgstr ""
+msgstr "X軸トランスフォーム."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Y-Axis Transform."
-msgstr ""
+msgstr "Y軸トランスフォーム."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Z-Axis Transform."
-msgstr ""
+msgstr "Z軸トランスフォーム."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Plane Transform."
-msgstr ""
+msgstr "ビュー平é¢ãƒˆãƒ©ãƒ³ã‚¹ãƒ•ã‚©ãƒ¼ãƒ ."
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Scaling to %s%%."
-msgstr ""
+msgstr "拡大縮å°æ¯”率%s%%."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotating %s degrees."
-msgstr ""
+msgstr "%s 度回転."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom View."
-msgstr ""
+msgstr "下é¢å›³."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom"
-msgstr ""
+msgstr "下é¢"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View."
-msgstr ""
+msgstr "上é¢å›³."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top"
-msgstr ""
+msgstr "上é¢"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View."
-msgstr ""
+msgstr "後é¢å›³."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear"
-msgstr ""
+msgstr "後é¢"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View."
-msgstr ""
+msgstr "å‰é¢å›³."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front"
-msgstr ""
+msgstr "å‰é¢"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left View."
-msgstr ""
+msgstr "å·¦å´é¢å›³."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Left"
-msgstr ""
+msgstr "å·¦å´é¢"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right View."
-msgstr ""
+msgstr "å³å´é¢å›³."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Right"
-msgstr ""
+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 "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
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "後方"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
+msgstr "キーã¯ç„¡åŠ¹åŒ–ã•ã‚Œã¦ã„ã¾ã™ï¼ˆã‚­ãƒ¼ã¯æŒ¿å…¥ã•ã‚Œã¦ã„ã¾ã›ã‚“)."
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
-msgid "Freelook Down"
-msgstr "ホイール下"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
+msgid "Animation Key Inserted."
+msgstr "アニメーションã®ã‚­ãƒ¼ãŒæŒ¿å…¥ã•ã‚Œã¦ã„ã¾ã™."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
-msgstr ""
+msgstr "æç”»ã•ã‚ŒãŸã‚ªãƒ–ジェクト"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Material Changes"
-msgstr ""
+msgstr "ç´ æã®å¤‰æ›´"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Shader Changes"
-msgstr ""
+msgstr "シェーダーã®å¤‰æ›´"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Surface Changes"
-msgstr ""
+msgstr "サーフェースã®å¤‰æ›´"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Draw Calls"
-msgstr ""
+msgstr "ドローコール(Daw call)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Vertices"
-msgstr ""
+msgstr "頂点"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align with view"
-msgstr ""
+msgstr "シーンビューã«ã‚«ãƒ¡ãƒ©ã‚’åˆã‚ã›ã‚‹ï¼ˆAlign With View)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Display Normal"
-msgstr ""
+msgstr "通常表示"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Display Wireframe"
-msgstr ""
+msgstr "ワイヤーフレーム表示"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Display Overdraw"
-msgstr ""
+msgstr "é€æ˜Žã‚·ãƒ«ã‚¨ãƒƒãƒˆè¡¨ç¤º"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Display Unshaded"
-msgstr ""
+msgstr "シェーディングãªã—ã§è¡¨ç¤º"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Environment"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "View Gizmos"
-msgstr ""
+msgstr "ギズモ(Gizmo)表示"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "View Information"
-msgstr ""
+msgstr "情報を表示"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+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
+#, fuzzy
+msgid "preview"
+msgstr "プレビュー"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
-msgstr ""
+msgstr "Xformダイアログ"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "é¸æŠžãƒ¢ãƒ¼ãƒ‰"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid ""
+"Drag: Rotate\n"
+"Alt+Drag: Move\n"
+"Alt+RMB: Depth list selection"
+msgstr "Alt+å³ã‚¯ãƒªãƒƒã‚¯: デプス(深ã•ï¼‰ãƒªã‚¹ãƒˆã®é¸æŠž"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode (W)"
-msgstr ""
+msgstr "移動モード (W)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate Mode (E)"
-msgstr ""
+msgstr "回転Mode (E)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Mode (R)"
-msgstr ""
+msgstr "スケール(拡大縮å°ï¼‰ãƒ¢ãƒ¼ãƒ‰(R)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Bottom View"
-msgstr ""
+msgstr "底é¢å›³"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Top View"
-msgstr ""
+msgstr "上é¢å›³"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rear View"
-msgstr ""
+msgstr "後é¢å›³"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Front View"
-msgstr ""
+msgstr "å‰é¢å›³"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Left View"
-msgstr ""
+msgstr "å·¦å´é¢å›³"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Right View"
-msgstr ""
+msgstr "å³å´é¢å›³"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Switch Perspective/Orthogonal view"
-msgstr ""
+msgstr "é€è¦–投影/並行投影ã®åˆ‡ã‚Šæ›¿ãˆ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Insert Animation Key"
-msgstr ""
+msgstr "アニメーションキーを挿入"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Focus Origin"
@@ -4965,57 +6234,61 @@ 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
+#, fuzzy
msgid "Transform"
-msgstr ""
+msgstr "トランスフォーム"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Local Coords"
-msgstr ""
+msgstr "ローカル座標系"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Transform Dialog.."
-msgstr ""
+msgstr "トランスフォームã®ãƒ€ã‚¤ã‚¢ãƒ­ã‚°.."
#: editor/plugins/spatial_editor_plugin.cpp
msgid "1 Viewport"
-msgstr ""
+msgstr "1 ビューãƒãƒ¼ãƒˆ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "2 Viewports"
-msgstr ""
+msgstr "2 ビューãƒãƒ¼ãƒˆ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "2 Viewports (Alt)"
-msgstr ""
+msgstr "2 ビューãƒãƒ¼ãƒˆ(Alt)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "3 Viewports"
-msgstr ""
+msgstr "3 ビューãƒãƒ¼ãƒˆ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "3 Viewports (Alt)"
-msgstr ""
+msgstr "3 ビューãƒãƒ¼ãƒˆ(Alt)"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "4 Viewports"
-msgstr ""
+msgstr "4 ビューãƒãƒ¼ãƒˆ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Origin"
@@ -5023,31 +6296,36 @@ msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Grid"
-msgstr ""
+msgstr "ビューã®ã‚°ãƒªãƒƒãƒ‰"
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
msgid "Settings"
-msgstr ""
+msgstr "設定"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Snap Settings"
-msgstr ""
+msgstr "Snapã®è¨­å®š"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Translate Snap:"
-msgstr ""
+msgstr "Snapを移動:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate Snap (deg.):"
-msgstr ""
+msgstr "Snapã®å›žè»¢ï¼ˆåº¦ï¼‰:"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Scale Snap (%):"
-msgstr ""
+msgstr "スナップã®å¤§ãã•(%):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Viewport Settings"
-msgstr ""
+msgstr "ビューãƒãƒ¼ãƒˆã®è¨­å®š"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Perspective FOV (deg.):"
@@ -5066,16 +6344,18 @@ msgid "Transform Change"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Translate:"
-msgstr ""
+msgstr "移動(translate):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate (deg.):"
-msgstr ""
+msgstr "回転(度):"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "Scale (ratio):"
-msgstr ""
+msgstr "縮尺(比):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Type"
@@ -5090,20 +6370,24 @@ msgid "Post"
msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
msgid "ERROR: Couldn't load frame resource!"
-msgstr ""
+msgstr "エラー:フレームリソースを読ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ!"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
msgid "Add Frame"
-msgstr ""
+msgstr "フレームを追加"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
msgid "Resource clipboard is empty or not a texture!"
-msgstr ""
+msgstr "リソースクリップボードã¯ç©ºã‹ã€ãƒ†ã‚¯ã‚¹ãƒãƒ£ä»¥å¤–ã§ã™!"
#: editor/plugins/sprite_frames_editor_plugin.cpp
+#, fuzzy
msgid "Paste Frame"
-msgstr ""
+msgstr "フレームを張り付ã‘"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Add Empty"
@@ -5111,27 +6395,27 @@ msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation Loop"
-msgstr ""
+msgstr "アニメーションã®ãƒ«ãƒ¼ãƒ—を変更"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Change Animation FPS"
-msgstr ""
+msgstr "アニメーションã®FPSを変更"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "(empty)"
-msgstr ""
+msgstr "(空)"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Animations"
-msgstr ""
+msgstr "アニメーション"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Speed (FPS):"
-msgstr ""
+msgstr "速度(FPS):"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Animation Frames"
-msgstr ""
+msgstr "アニメーションã®ãƒ•ãƒ¬ãƒ¼ãƒ "
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Insert Empty (Before)"
@@ -5143,76 +6427,93 @@ msgstr ""
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Up"
-msgstr ""
+msgstr "上"
#: editor/plugins/sprite_frames_editor_plugin.cpp
msgid "Down"
-msgstr ""
+msgstr "下"
#: editor/plugins/style_box_editor_plugin.cpp
msgid "StyleBox Preview:"
-msgstr ""
+msgstr "スタイルボックス プレビュー:"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
+msgid "Set Region Rect"
+msgstr "テクスãƒãƒ£ã€€ãƒªãƒ¼ã‚¸ãƒ§ãƒ³"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
-msgstr ""
+msgstr "Snapモード:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "<None>"
-msgstr ""
+msgstr "<None>"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Pixel Snap"
-msgstr ""
+msgstr "ピクセルSnap"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
msgid "Grid Snap"
-msgstr ""
+msgstr "グリッドSnap"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Auto Slice"
-msgstr ""
+msgstr "自動スライス"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Offset:"
-msgstr ""
+msgstr "オフセット:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Step:"
-msgstr ""
+msgstr "ステップ:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Separation:"
-msgstr ""
+msgstr "分離:"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
msgid "Texture Region"
-msgstr ""
+msgstr "テクスãƒãƒ£ã€€ãƒªãƒ¼ã‚¸ãƒ§ãƒ³"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Texture Region Editor"
-msgstr ""
+msgstr "テクスãƒãƒ£ãƒªãƒ¼ã‚¸ãƒ§ãƒ³ã€€ã‚¨ãƒ‡ã‚£ã‚¿"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Can't save theme to file:"
-msgstr ""
+msgstr "ファイルã«ãƒ†ãƒ¼ãƒžã‚’ä¿å­˜ã§ãã¾ã›ã‚“:"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add All Items"
-msgstr ""
+msgstr "ã™ã¹ã¦ã®ã‚¢ã‚¤ãƒ†ãƒ ã‚’追加"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add All"
-msgstr ""
+msgstr "ã™ã¹ã¦ã‚’追加"
#: editor/plugins/theme_editor_plugin.cpp
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Remove Item"
-msgstr ""
+msgstr "アイテムを除去"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "アイテムを除去"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "削除"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
-msgstr ""
+msgstr "テーマ"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Add Class Items"
@@ -5224,31 +6525,33 @@ msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Create Empty Template"
-msgstr ""
+msgstr "空ã®ãƒ†ãƒ³ãƒ—レートを生æˆ"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Create Empty Editor Template"
-msgstr ""
+msgstr "空ã®ã‚¨ãƒ‡ã‚£ã‚¿ãƒ†ãƒ³ãƒ—レートを生æˆ"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "CheckBox Radio1"
-msgstr ""
+msgstr "ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã€€Radio1"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "CheckBox Radio2"
-msgstr ""
+msgstr "ãƒã‚§ãƒƒã‚¯ãƒœãƒƒã‚¯ã‚¹ã€€Radio2"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Item"
-msgstr ""
+msgstr "アイテム"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Check Item"
-msgstr ""
+msgstr "アイテムをãƒã‚§ãƒƒã‚¯"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Checked Item"
-msgstr ""
+msgstr "ãƒã‚§ãƒƒã‚¯æ¸ˆã¿ã‚¢ã‚¤ãƒ†ãƒ "
#: editor/plugins/theme_editor_plugin.cpp
msgid "Has"
@@ -5260,7 +6563,7 @@ msgstr ""
#: editor/plugins/theme_editor_plugin.cpp editor/project_export.cpp
msgid "Options"
-msgstr ""
+msgstr "オプション"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Have,Many,Several,Options!"
@@ -5268,60 +6571,78 @@ msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
msgid "Tab 1"
-msgstr ""
+msgstr "タブ1"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Tab 2"
-msgstr ""
+msgstr "タブ2"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Tab 3"
-msgstr ""
+msgstr "タブ3"
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Type:"
-msgstr ""
+msgstr "åž‹(Type):"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "Data Type:"
-msgstr ""
+msgstr "データã®åž‹(Type):"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Icon"
-msgstr ""
+msgstr "アイコン"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Style"
-msgstr ""
+msgstr "スタイル"
#: editor/plugins/theme_editor_plugin.cpp
msgid "Color"
-msgstr ""
+msgstr "色"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "é¸æŠžã‚’消去"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr ""
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "等速"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Erase TileMap"
+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 ""
+msgstr "é¸æŠžã‚’消去"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
msgid "Find tile"
-msgstr ""
+msgstr "タイルを探ã™"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
msgid "Transpose"
-msgstr ""
+msgstr "転置"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Mirror X"
@@ -5340,106 +6661,117 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
msgid "Rotate 0 degrees"
-msgstr ""
+msgstr "0度回転"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 90 degrees"
-msgstr ""
+msgstr "90度回転"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 180 degrees"
-msgstr ""
+msgstr "180度回転"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 270 degrees"
-msgstr ""
+msgstr "270度回転"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Could not find tile:"
-msgstr ""
+msgstr "タイルãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸ:"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Item name or ID:"
-msgstr ""
+msgstr "アイテムã®åå‰ã‹ID:"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Create from scene?"
-msgstr ""
+msgstr "シーンã‹ã‚‰ç”Ÿæˆã—ã¾ã™ã‹ï¼Ÿ"
#: editor/plugins/tile_set_editor_plugin.cpp
+#, fuzzy
msgid "Merge from scene?"
-msgstr ""
+msgstr "シーンã‹ã‚‰ãƒžãƒ¼ã‚¸ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Create from Scene"
-msgstr ""
+msgstr "シーンã‹ã‚‰ç”Ÿæˆ"
#: editor/plugins/tile_set_editor_plugin.cpp
msgid "Merge from Scene"
-msgstr ""
+msgstr "シーンã‹ã‚‰ãƒžãƒ¼ã‚¸"
#: editor/plugins/tile_set_editor_plugin.cpp editor/script_editor_debugger.cpp
msgid "Error"
-msgstr ""
+msgstr "エラー"
#: editor/project_export.cpp
msgid "Runnable"
-msgstr ""
+msgstr "実行å¯èƒ½"
#: editor/project_export.cpp
+#, fuzzy
msgid "Delete patch '"
-msgstr ""
+msgstr "パッãƒé™¤åŽ»'"
#: editor/project_export.cpp
+#, fuzzy
msgid "Delete preset '%s'?"
-msgstr ""
+msgstr "åˆæœŸè¨­å®šå€¤ '%s'?を削除ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/project_export.cpp
msgid "Presets"
-msgstr ""
+msgstr "åˆæœŸè¨­å®šå€¤"
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
-msgstr ""
+msgstr "追加.."
#: editor/project_export.cpp
msgid "Resources"
-msgstr ""
+msgstr "リソース"
#: editor/project_export.cpp
+#, fuzzy
msgid "Export all resources in the project"
-msgstr ""
+msgstr "プロジェクト内ã®ãƒªã‚½ãƒ¼ã‚¹ã‚’ã™ã¹ã¦ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ"
#: editor/project_export.cpp
msgid "Export selected scenes (and dependencies)"
-msgstr ""
+msgstr "é¸æŠžã—ãŸã‚·ãƒ¼ãƒ³ï¼ˆã¨ä¾å­˜é–¢ä¿‚ã«ã‚ã‚‹ã‚‚ã®ï¼‰ã‚’エクスãƒãƒ¼ãƒˆ"
#: editor/project_export.cpp
msgid "Export selected resources (and dependencies)"
-msgstr ""
+msgstr "é¸æŠžã—ãŸãƒªã‚½ãƒ¼ã‚¹ï¼ˆã¨ä¾å­˜é–¢ä¿‚ã«ã‚ã‚‹ã‚‚ã®ï¼‰ã‚’エクスãƒãƒ¼ãƒˆ"
#: editor/project_export.cpp
+#, fuzzy
msgid "Export Mode:"
-msgstr ""
+msgstr "エクスãƒãƒ¼ãƒˆã®ãƒ¢ãƒ¼ãƒ‰:"
#: editor/project_export.cpp
msgid "Resources to export:"
-msgstr ""
+msgstr "エクスãƒãƒ¼ãƒˆã™ã‚‹ãƒªã‚½ãƒ¼ã‚¹:"
#: editor/project_export.cpp
+#, fuzzy
msgid ""
"Filters to export non-resource files (comma separated, e.g: *.json, *.txt)"
msgstr ""
+"リソース以外ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹éš›ã®é¸åˆ¥åŸºæº–(Filters)(コンマã§åˆ†å‰²,"
+"例*.json, *.txt)"
#: editor/project_export.cpp
+#, fuzzy
msgid ""
"Filters to exclude files from project (comma separated, e.g: *.json, *.txt)"
msgstr ""
+"リソース以外ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’エクスãƒãƒ¼ãƒˆã™ã‚‹éš›ã®é™¤å¤–基準(Filters)(コンマã§åˆ†å‰²,"
+"例*.json, *.txt)"
#: editor/project_export.cpp
#, fuzzy
@@ -5448,71 +6780,96 @@ msgstr "一致ãªã—"
#: editor/project_export.cpp
msgid "Make Patch"
+msgstr "パッãƒç”Ÿæˆ"
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "テクスãƒãƒ£"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
msgstr ""
#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "メソッド一覧:"
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Export PCK/Zip"
+msgstr "エクスãƒãƒ¼ãƒˆ"
+
+#: editor/project_export.cpp
+#, fuzzy
msgid "Export templates for this platform are missing:"
msgstr ""
+"ã“ã®ãƒ—ラットフォームã«å‘ã‘ã¦ã®ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆã®ãƒ†ãƒ³ãƒ—レートãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“:"
#: editor/project_export.cpp
msgid "Export With Debug"
-msgstr ""
+msgstr "デãƒãƒƒã‚°ä»˜ãエクスãƒãƒ¼ãƒˆ"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Invalid project path, the path must exist!"
-msgstr ""
+msgstr "パスãŒä¸æ­£ã§ã™.パスãŒå­˜åœ¨ã—ãªã„ã¨ã„ã‘ã¾ã›ã‚“."
#: editor/project_manager.cpp
+#, fuzzy
msgid "Invalid project path, project.godot must not exist."
-msgstr ""
+msgstr "プロジェクトã®ãƒ‘スãŒä¸æ­£ã§ã™.project.godotã¯å­˜åœ¨ã—ã¾ã›ã‚“."
#: editor/project_manager.cpp
+#, fuzzy
msgid "Invalid project path, project.godot must exist."
-msgstr ""
+msgstr "プロジェクトã®ãƒ‘スãŒä¸æ­£ã§ã™.project.godotã¯å­˜åœ¨ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"
#: editor/project_manager.cpp
msgid "Imported Project"
-msgstr ""
+msgstr "インãƒãƒ¼ãƒˆã•ã‚ŒãŸãƒ—ロジェクト"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Invalid project path (changed anything?)."
-msgstr ""
+msgstr "ä¸æ­£ãªãƒ—ロジェクトã®ãƒ‘ス(何ã‹å¤‰ãˆã¾ã—ãŸã‹ï¼Ÿï¼‰"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Couldn't create project.godot in project path."
-msgstr ""
+msgstr "project.godotをプロジェクトパスã«ç”Ÿæˆã§ãã¾ã›ã‚“ã§ã—ãŸ"
#: editor/project_manager.cpp
+#, fuzzy
msgid "The following files failed extraction from package:"
-msgstr ""
-
-#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
+msgstr "以下ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’パッケージã‹ã‚‰æŠ½å‡ºã§ãã¾ã›ã‚“ã§ã—ãŸ:"
#: editor/project_manager.cpp
msgid "Import Existing Project"
-msgstr ""
+msgstr "既存ã®ãƒ—ロジェクトをインãƒãƒ¼ãƒˆ"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Project Path (Must Exist):"
-msgstr ""
+msgstr "プロジェクトパス(存在ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ï¼‰"
#: editor/project_manager.cpp
+#, fuzzy
msgid "Project Name:"
-msgstr ""
+msgstr "プロジェクトå:"
#: editor/project_manager.cpp
msgid "Create New Project"
-msgstr ""
+msgstr "æ–°ã—ã„プロジェクトを作る"
#: editor/project_manager.cpp
msgid "Project Path:"
-msgstr ""
+msgstr "プロジェクトパス:"
#: editor/project_manager.cpp
msgid "Install Project:"
-msgstr ""
+msgstr "プロジェクトをインストール:"
#: editor/project_manager.cpp
msgid "Browse"
@@ -5520,27 +6877,47 @@ msgstr ""
#: editor/project_manager.cpp
msgid "New Game Project"
-msgstr ""
+msgstr "æ–°ã—ã„ゲームプロジェクト"
#: editor/project_manager.cpp
msgid "That's a BINGO!"
-msgstr ""
+msgstr "当ãŸã‚Š!"
#: editor/project_manager.cpp
msgid "Unnamed Project"
-msgstr ""
+msgstr "åç„¡ã—ã®ãƒ—ロジェクト"
#: editor/project_manager.cpp
msgid "Are you sure to open more than one project?"
+msgstr "複数ã®ãƒ—ロジェクトを本当ã«é–‹ã‘ã¾ã™ã‹ï¼Ÿ"
+
+#: 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 ""
+"é¸æŠžã—ãŸã‚·ãƒ¼ãƒ³ '%s' ã¯ã€ã‚·ãƒ¼ãƒ³ ファイルã§ã¯ã‚ã‚Šã¾ã›ã‚“ã€æœ‰åŠ¹ãªã‚‚ã®ã‚’é¸æŠžã—ã¦ã„"
+"ã¾ã™ã‹ï¼Ÿ\n"
+"'アプリケーション' カテゴリã®ä¸‹ã®'プロジェクトã®è¨­å®š'ã§å¤‰æ›´ã§ãã¾ã™ã€‚"
#: editor/project_manager.cpp
-msgid "Are you sure to run more than one project?"
+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
+#, fuzzy
msgid "Remove project from the list? (Folder contents will not be modified)"
msgstr ""
+"リストã‹ã‚‰ãƒ—ロジェクトを除去ã—ã¾ã™ã‹ï¼Ÿï¼ˆãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã®ã‚³ãƒ³ãƒ†ãƒ³ãƒ„ã¯å½±éŸ¿ã‚’å—ã‘ã¾"
+"ã›ã‚“)"
#: editor/project_manager.cpp
msgid ""
@@ -5549,28 +6926,24 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
-msgstr ""
+msgstr "プロジェクトã®ãƒªã‚¹ãƒˆ"
#: editor/project_manager.cpp
msgid "Run"
-msgstr ""
+msgstr "実行"
#: editor/project_manager.cpp
msgid "Scan"
-msgstr ""
+msgstr "スキャン"
#: editor/project_manager.cpp
msgid "Select a Folder to Scan"
-msgstr ""
+msgstr "スキャンã™ã‚‹ãƒ•ã‚©ãƒ«ãƒ€ãƒ¼ã‚’é¸æŠž"
#: editor/project_manager.cpp
msgid "New Project"
-msgstr ""
+msgstr "æ–°ã—ã„プロジェクト"
#: editor/project_manager.cpp
#, fuzzy
@@ -5581,304 +6954,373 @@ msgstr "é¸æŠžã—ã¦ã„ã‚‹ã‚‚ã®ã‚’削除"
msgid "Exit"
msgstr "終了"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "接続失敗."
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Key "
-msgstr ""
+msgstr "キー.. "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Joy Button"
-msgstr ""
+msgstr "ジョイスティックã®ãƒœã‚¿ãƒ³"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Joy Axis"
-msgstr ""
+msgstr "ジョイスティックã®è»¸"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
-msgstr ""
+msgstr "マウスボタン"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
-msgstr ""
+msgstr "ä¸æ­£ãªã‚¢ã‚¯ã‚·ãƒ§ãƒ³ï¼ˆ '/' ã¨':'ã¯ä¸å¯ã§ã™ï¼‰."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
-msgstr ""
+msgstr "アクション'%s'ã¯æ—¢ã«ã‚ã‚Šã¾ã™!"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Rename Input Action Event"
-msgstr ""
+msgstr "入力アクションイベントã®åå‰ã‚’変更ã™ã‚‹"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
-msgstr ""
+msgstr "入力アクションイベントを追加"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
-msgstr ""
+msgstr "Control+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
+#, fuzzy
msgid "Press a Key.."
-msgstr ""
+msgstr "キーを押ã—ã¦ãã ã•ã„.."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
-msgstr ""
+msgstr "左ボタン"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
-msgstr ""
+msgstr "å³ãƒœã‚¿ãƒ³"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
-msgstr ""
+msgstr "中央ボタン"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Wheel Up Button"
-msgstr ""
+msgstr "ホイールupボタン"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Wheel Down Button"
-msgstr ""
+msgstr "ホイールDownボタン"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
-msgstr ""
+msgstr "ボタン6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
-msgstr ""
+msgstr "ボタン7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
-msgstr ""
+msgstr "ボタン8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
-msgstr ""
+msgstr "ボタン9"
+
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change"
+msgstr "変更"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Joypad Axis Index:"
-msgstr ""
+msgstr "ジョイパッド軸ã®Index:"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "アナログ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Joypad Button Index:"
-msgstr ""
+msgstr "ジョイパッドã®ãƒœã‚¿ãƒ³ã®Index:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Add Input Action"
-msgstr ""
+msgstr "入力アクションを追加"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Erase Input Action Event"
-msgstr ""
+msgstr "入力アクションイベントを消去"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
-msgstr ""
+msgstr "イベントを追加"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "デãƒã‚¤ã‚¹"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "ボタン"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "左クリック"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "å³ã‚¯ãƒªãƒƒã‚¯"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "中クリック"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
+#, fuzzy
msgid "Wheel Up."
-msgstr "ホイール上"
+msgstr "マウスホイールを上ã¸."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
-msgstr "ホイール下"
+msgstr "マウスホイールを下."
-#: editor/project_settings.cpp
-msgid "Error saving settings."
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "プロパティã«getter(get method)を作る"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "No property '"
+msgstr "プロパティ:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "設定"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "入力を消去"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+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.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
-msgstr ""
+msgstr "翻訳を追加"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Remove Translation"
-msgstr ""
+msgstr "翻訳を除去"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Add Remapped Path"
-msgstr ""
+msgstr "リマップã•ã‚ŒãŸãƒ‘スを追加"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Change Resource Remap Language"
-msgstr ""
+msgstr "リソースリマップ言語を変更"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Remove Resource Remap"
-msgstr ""
+msgstr "リソースã®ãƒªãƒžãƒƒãƒ—を除去"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Remove Resource Remap Option"
-msgstr ""
+msgstr "リソースã®ãƒªãƒžãƒƒãƒ—オプションを除去"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Project Settings (project.godot)"
-msgstr ""
+msgstr "プロジェクト設定 (project.godot)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
-msgstr ""
-
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr ""
+msgstr "プロパティ:"
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
-msgstr ""
+msgstr "インプットマップ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
-msgstr ""
+msgstr "アクション:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
-msgstr ""
+msgstr "デãƒã‚¤ã‚¹:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
-msgstr ""
+msgstr "インデックス:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
-msgstr ""
+msgstr "ローカライズ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
-msgstr ""
+msgstr "翻訳"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
-msgstr ""
+msgstr "翻訳:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
-msgstr ""
+msgstr "リマップ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
-msgstr ""
+msgstr "リソース:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Remaps by Locale:"
-msgstr ""
+msgstr "ロケールã«å¾“ã£ã¦ã‚­ãƒ¼ã®ãƒªãƒžãƒƒãƒ—:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
msgid "Locale"
-msgstr ""
+msgstr "ロケール"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
-msgstr ""
+msgstr "自動読ã¿è¾¼ã¿"
#: editor/property_editor.cpp
+#, fuzzy
msgid "Pick a Viewport"
-msgstr ""
+msgstr "ビューãƒãƒ¼ãƒˆã‚’é¸ã¶"
#: editor/property_editor.cpp
msgid "Ease In"
-msgstr ""
+msgstr "イージング(Ease In)"
#: editor/property_editor.cpp
msgid "Ease Out"
-msgstr ""
+msgstr "イージング(Ease Out)"
#: editor/property_editor.cpp
+#, fuzzy
msgid "Zero"
-msgstr ""
+msgstr "(イージング)無ã—"
#: editor/property_editor.cpp
msgid "Easing In-Out"
-msgstr ""
+msgstr "イージング(In-Out)"
#: editor/property_editor.cpp
msgid "Easing Out-In"
-msgstr ""
+msgstr "イージング(Out-In)"
#: editor/property_editor.cpp
msgid "File.."
-msgstr ""
+msgstr "ファイル.."
#: editor/property_editor.cpp
msgid "Dir.."
-msgstr ""
+msgstr "ディレクトリ.."
#: editor/property_editor.cpp
msgid "Assign"
-msgstr ""
+msgstr "アサインã™ã‚‹"
+
+#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "ノードをé¸æŠž"
#: editor/property_editor.cpp
msgid "New Script"
-msgstr ""
+msgstr "æ–°è¦ã‚¹ã‚¯ãƒªãƒ—ト"
#: editor/property_editor.cpp
msgid "Show in File System"
msgstr ""
#: editor/property_editor.cpp
+#, fuzzy
msgid "Error loading file: Not a resource!"
-msgstr ""
+msgstr "ファイル読ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼:リソースã§ã¯ã‚ã‚Šã¾ã›ã‚“!"
+
+#: editor/property_editor.cpp
+#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "インãƒãƒ¼ãƒˆã™ã‚‹ãƒŽãƒ¼ãƒ‰ã‚’é¸æŠžã™ã‚‹"
#: editor/property_editor.cpp
#, fuzzy
@@ -5898,12 +7340,14 @@ msgid "Set"
msgstr ""
#: editor/property_editor.cpp
+#, fuzzy
msgid "Properties:"
-msgstr ""
+msgstr "プロパティ:"
#: editor/property_editor.cpp
+#, fuzzy
msgid "Sections:"
-msgstr ""
+msgstr "セクション:"
#: editor/property_selector.cpp
#, fuzzy
@@ -5941,19 +7385,20 @@ msgstr ""
#: editor/resources_dock.cpp
msgid "Create New Resource"
-msgstr ""
+msgstr "æ–°ã—ã„リソースを生æˆ"
#: editor/resources_dock.cpp
msgid "Open Resource"
-msgstr ""
+msgstr "リソースを開ã‘ã‚‹"
#: editor/resources_dock.cpp
msgid "Save Resource"
-msgstr ""
+msgstr "リソースをä¿å­˜"
#: editor/resources_dock.cpp
+#, fuzzy
msgid "Resource Tools"
-msgstr ""
+msgstr "リソースã®ãƒ„ール"
#: editor/resources_dock.cpp
msgid "Make Local"
@@ -5965,155 +7410,205 @@ msgstr ""
#: editor/run_settings_dialog.cpp
msgid "Current Scene"
-msgstr ""
+msgstr "ç¾åœ¨ã®ã‚·ãƒ¼ãƒ³"
#: editor/run_settings_dialog.cpp
+#, fuzzy
msgid "Main Scene"
-msgstr ""
+msgstr "メインシーン"
#: editor/run_settings_dialog.cpp
+#, fuzzy
msgid "Main Scene Arguments:"
-msgstr ""
+msgstr "メインシーンã®å¼•æ•°:"
#: editor/run_settings_dialog.cpp
+#, fuzzy
msgid "Scene Run Settings"
-msgstr ""
+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
+#, fuzzy
msgid "Error loading scene from %s"
-msgstr ""
+msgstr "シーンを%sã‹ã‚‰èª­ã¿è¾¼ã‚€éš›ã«ã‚¨ãƒ©ãƒ¼ãŒç”Ÿã˜ã¾ã—ãŸ"
#: editor/scene_tree_dock.cpp
msgid "Ok"
-msgstr ""
+msgstr "オッケー"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid ""
"Cannot instance the scene '%s' because the current scene exists within one "
"of its nodes."
msgstr ""
+"ã“ã®ã‚·ãƒ¼ãƒ³ã¯è‡ªèº«ã®ãƒŽãƒ¼ãƒ‰ã®ã†ã¡ã®ä¸€ã¤ã®å†…ã«ã‚ã‚‹ãŸã‚〠'%s'シーンをインスタンス"
+"化ã§ãã¾ã›ã‚“"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Instance Scene(s)"
-msgstr ""
+msgstr "シーンã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "This operation can't be done on the tree root."
-msgstr ""
+msgstr "ã“ã®å‡¦ç†ã¯ãƒ„リーã®ãƒ«ãƒ¼ãƒˆã§ã¯ã§ãã¾ã›ã‚“."
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Move Node In Parent"
-msgstr ""
+msgstr "親ã®ãƒŽãƒ¼ãƒ‰ã‚’移動"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Move Nodes In Parent"
-msgstr ""
+msgstr "親ã®ãƒŽãƒ¼ãƒ‰ã‚’移動"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Duplicate Node(s)"
-msgstr ""
+msgstr "ノードを複製"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Delete Node(s)?"
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
+msgstr "ノードを除去ã—ã¾ã™ã‹ï¼Ÿ"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Can not perform with the root node."
-msgstr ""
+msgstr "ルートノードãŒãªã„ã¨å‡¦ç†ã§ãã¾ã›ã‚“."
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "This operation can't be done on instanced scenes."
-msgstr ""
+msgstr "ã“ã®å‡¦ç†ã«ã¯ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–ã•ã‚ŒãŸã‚·ãƒ¼ãƒ³ãŒå¿…è¦ã§ã™."
#: editor/scene_tree_dock.cpp
msgid "Save New Scene As.."
+msgstr "æ–°è¦ã‚·ãƒ¼ãƒ³ã«åå‰ã‚’付ã‘ã¦ä¿å­˜.."
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Editable Children"
+msgstr "編集å¯èƒ½ãªå­"
+
+#: editor/scene_tree_dock.cpp
+msgid "Load As Placeholder"
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Discard Instancing"
+msgstr "インスタンス化ã®ç„¡åŠ¹åŒ–"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Makes Sense!"
-msgstr ""
+msgstr "有æ„義ã«!"
#: editor/scene_tree_dock.cpp
msgid "Can't operate on nodes from a foreign scene!"
-msgstr ""
+msgstr "ç•°ãªã‚‹ã‚·ãƒ¼ãƒ³ã®ãƒŽãƒ¼ãƒ‰ã‚’処ç†ã§ãã¾ã›ã‚“!"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Can't operate on nodes the current scene inherits from!"
-msgstr ""
+msgstr "ç¾åœ¨ã®ã‚·ãƒ¼ãƒ³ãŒç¶™æ‰¿ã™ã‚‹ãƒŽãƒ¼ãƒ‰ã‚’処ç†ã§ãã¾ã›ã‚“!"
#: editor/scene_tree_dock.cpp
msgid "Remove Node(s)"
-msgstr ""
+msgstr "ノードを除去"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid ""
"Couldn't save new scene. Likely dependencies (instances) couldn't be "
"satisfied."
msgstr ""
+"æ–°ã—ã„シーンをä¿å­˜ã§ãã¾ã›ã‚“。ä¾å­˜é–¢ä¿‚ã®å¯¾è±¡ãŒå®Œå‚™ã•ã‚Œã¦ã„ãªã„ã¨æ€ã‚ã‚Œã¾ã™"
#: editor/scene_tree_dock.cpp
msgid "Error saving scene."
-msgstr ""
+msgstr "シーンをä¿å­˜ã™ã‚‹éš›ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ."
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Error duplicating scene to save it."
-msgstr ""
+msgstr "ä¿å­˜ã®ãŸã‚シーンを複製ã™ã‚‹éš›ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿ."
#: editor/scene_tree_dock.cpp
msgid "Sub-Resources:"
-msgstr ""
+msgstr "サブリソース:"
#: editor/scene_tree_dock.cpp
msgid "Edit Groups"
-msgstr ""
+msgstr "グループを編集"
#: editor/scene_tree_dock.cpp
msgid "Edit Connections"
-msgstr ""
+msgstr "コãƒã‚¯ã‚·ãƒ§ãƒ³ã‚’編集"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
+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 ""
+msgstr "ノードを消去"
#: editor/scene_tree_dock.cpp
msgid "Add Child Node"
-msgstr ""
+msgstr "å­ãƒŽãƒ¼ãƒ‰ã‚’追加"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Instance Child Scene"
-msgstr ""
+msgstr "å­ã‚·ãƒ¼ãƒ³ã‚’インスタンス化"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Change Type"
-msgstr ""
+msgstr "型(type)を変更"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Attach Script"
-msgstr ""
+msgstr "スクリプトを付与"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Clear Script"
-msgstr ""
+msgstr "スクリプトをクリア"
#: editor/scene_tree_dock.cpp
msgid "Merge From Scene"
-msgstr ""
+msgstr "シーンã‹ã‚‰ãƒžãƒ¼ã‚¸"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Save Branch as Scene"
-msgstr ""
+msgstr "ブランãƒã‚’シーンã¨ã—ã¦ä¿å­˜"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Copy Node Path"
-msgstr ""
+msgstr "ノードã®ãƒ‘スをコピー"
#: editor/scene_tree_dock.cpp
#, fuzzy
@@ -6122,21 +7617,40 @@ msgstr "確èªã—ã¦ãã ã•ã„。"
#: editor/scene_tree_dock.cpp
msgid "Add/Create a New Node"
-msgstr ""
+msgstr "æ–°ã—ã„ノードを加ãˆã‚‹/生æˆã™ã‚‹"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid ""
"Instance a scene file as a Node. Creates an inherited scene if no root node "
"exists."
msgstr ""
+"シーンファイルをノードã¨ã—ã¦ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹åŒ–. ã‚‚ã—ルートã®ï¼¾åº¦ãŒãªã‘ã‚Œã°ã€ç¶™æ‰¿"
+"ã—ãŸã‚·ãƒ¼ãƒ³ã‚’生æˆ"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "フィルター"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Attach a new or existing script for the selected node."
-msgstr ""
+msgstr "é¸æŠžã—ãŸãƒŽãƒ¼ãƒ‰ã«æ–°è¦/既存ã®ã‚¹ã‚¯ãƒªãƒ—トを付与"
#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Clear a script for the selected node."
-msgstr ""
+msgstr "é¸æŠžã—ãŸãƒŽãƒ¼ãƒ‰ã®ã‚¹ã‚¯ãƒªãƒ—トをクリア"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Clear Inheritance? (No Undo!)"
+msgstr "継承をクリアã—ã¾ã™ã‹ï¼Ÿï¼ˆundoã§ãã¾ã›ã‚“!)"
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear!"
+msgstr "クリアï¼"
#: editor/scene_tree_editor.cpp
msgid "Toggle Spatial Visible"
@@ -6147,34 +7661,40 @@ msgid "Toggle CanvasItem Visible"
msgstr ""
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid "Node configuration warning:"
-msgstr ""
+msgstr "ノードã®è¨­å®šã«é–¢ã™ã‚‹è­¦å‘Š:"
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid ""
"Node has connection(s) and group(s)\n"
"Click to show signals dock."
msgstr ""
+"ノードãŒã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ã¨ã‚°ãƒ«ãƒ¼ãƒ—ã‚’ä¿æŒã—ã¦ã„ã¾ã™\n"
+"クリックã—ã¦ã‚·ã‚°ãƒŠãƒ«ãƒ‰ãƒƒã‚¯ã‚’表示ã—ã¦ãã ã•ã„"
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid ""
"Node has connections.\n"
"Click to show signals dock."
msgstr ""
+"ノードã¯ã‚³ãƒã‚¯ã‚·ãƒ§ãƒ³ã‚’ä¿æŒã—ã¦ã„ã¾ã™\n"
+"クリックã—ã¦ã‚·ã‚°ãƒŠãƒ«ãƒ‰ãƒƒã‚¯ã‚’表示ã—ã¦ãã ã•ã„"
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid ""
"Node is in group(s).\n"
"Click to show groups dock."
msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
+"ノードã¯ã‚°ãƒ«ãƒ¼ãƒ—ã«å±žã—ã¦ã„ã¾ã™.\n"
+"クリックã—ã¦ã‚°ãƒ«ãƒ¼ãƒ—ã®ãƒ‰ãƒƒã‚¯ã‚’表示ã—ã¦ãã ã•ã„."
#: editor/scene_tree_editor.cpp
msgid "Instance:"
-msgstr ""
+msgstr "インスタンス:"
#: editor/scene_tree_editor.cpp
#, fuzzy
@@ -6182,64 +7702,52 @@ msgid "Open script"
msgstr "フォルダを作æˆ"
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid ""
"Node is locked.\n"
"Click to unlock"
msgstr ""
+"ノードã¯ãƒ­ãƒƒã‚¯ã•ã‚Œã¦ã„ã¾ã™.\n"
+"クリックã—ã¦ãƒ­ãƒƒã‚¯ã‚’外ã—ã¦ãã ã•ã„"
#: editor/scene_tree_editor.cpp
msgid ""
"Children are not selectable.\n"
"Click to make selectable"
msgstr ""
+"å­ã‚’é¸æŠžã§ãã¾ã›ã‚“.\n"
+"クリックã—ã¦é¸æŠžå¯èƒ½ã«ã—ã¦ãã ã•ã„"
#: editor/scene_tree_editor.cpp
+#, fuzzy
msgid "Toggle Visibility"
-msgstr ""
+msgstr "å¯è¦–性(Visibility)を変更"
#: editor/scene_tree_editor.cpp
msgid "Invalid node name, the following characters are not allowed:"
-msgstr ""
+msgstr "ä¸æ­£ãªãƒŽãƒ¼ãƒ‰å.以下ã®æ–‡å­—ã¯ä½¿ãˆã¾ã›ã‚“:"
#: editor/scene_tree_editor.cpp
msgid "Rename Node"
-msgstr ""
+msgstr "ノードã®åå‰ã‚’変更"
#: editor/scene_tree_editor.cpp
msgid "Scene Tree (Nodes):"
-msgstr ""
+msgstr "シーンツリー(ノード):"
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr ""
+#, fuzzy
+msgid "Node Configuration Warning!"
+msgstr "ノードã®è¨­å®šã«é–¢ã™ã‚‹è­¦å‘Š:"
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
-msgstr ""
+msgstr "ノードをé¸æŠž"
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "イメージ読ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼:"
#: editor/script_create_dialog.cpp
#, fuzzy
@@ -6252,16 +7760,22 @@ 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 ""
+msgstr "パスãŒã‚ã‚Šã¾ã›ã‚“"
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Path is not local"
-msgstr ""
+msgstr "パスã¯ãƒ­ãƒ¼ã‚«ãƒ«ã§ã¯ã‚ã‚Šã¾ã›ã‚“"
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid base path"
-msgstr ""
+msgstr "ä¸æ­£ãªãƒ™ãƒ¼ã‚¹ï¼ˆbase)パス"
#: editor/script_create_dialog.cpp
msgid "Invalid extension"
@@ -6278,27 +7792,25 @@ msgstr "無効ãªãƒ•ã‚©ãƒ³ãƒˆ サイズã§ã™ã€‚"
#: editor/script_create_dialog.cpp
msgid "Invalid class name"
-msgstr ""
+msgstr "ä¸æ­£ãªã‚¯ãƒ©ã‚¹å"
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Invalid inherited parent name or path"
-msgstr ""
+msgstr "継承ã—ãŸè¦ªã®åå‰ã‹ãƒ‘スãŒä¸æ­£ã§ã™"
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Script valid"
-msgstr ""
+msgstr "スクリプトã¯å•é¡Œã‚ã‚Šã¾ã›ã‚“"
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9 and _"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
+msgstr "使ãˆã‚‹æ–‡å­—ã¯:a-z, A-Z, 0-9 㨠_ã§ã™"
#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
-msgstr ""
+msgstr "組ã¿è¾¼ã¿ã‚¹ã‚¯ãƒªãƒ—ト(シーンファイルã®ï¼‰"
#: editor/script_create_dialog.cpp
#, fuzzy
@@ -6307,15 +7819,15 @@ msgstr "フォルダを作æˆ"
#: editor/script_create_dialog.cpp
msgid "Load existing script file"
-msgstr ""
+msgstr "既存ã®ã‚¹ã‚¯ãƒªãƒ—トファイルを読ã¿è¾¼ã‚€"
#: editor/script_create_dialog.cpp
msgid "Inherits"
-msgstr ""
+msgstr "継承"
#: editor/script_create_dialog.cpp
msgid "Class Name"
-msgstr ""
+msgstr "クラスå"
#: editor/script_create_dialog.cpp
#, fuzzy
@@ -6324,67 +7836,70 @@ msgstr "é¸æŠžã—ã¦ã„ã‚‹ã‚‚ã®ã‚’削除"
#: editor/script_create_dialog.cpp
msgid "Built-in Script"
-msgstr ""
+msgstr "組ã¿è¾¼ã¿ã‚¹ã‚¯ãƒªãƒ—ト"
#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Attach Node Script"
-msgstr ""
+msgstr "ノードã«ã‚¹ã‚¯ãƒªãƒ—トを添付ã™ã‚‹"
#: editor/script_editor_debugger.cpp
msgid "Bytes:"
-msgstr ""
+msgstr "ãƒã‚¤ãƒˆ:"
#: editor/script_editor_debugger.cpp
msgid "Warning"
-msgstr ""
+msgstr "警告"
#: editor/script_editor_debugger.cpp
msgid "Error:"
-msgstr ""
+msgstr "エラー:"
#: editor/script_editor_debugger.cpp
msgid "Source:"
-msgstr ""
+msgstr "ソース:"
#: editor/script_editor_debugger.cpp
msgid "Function:"
-msgstr ""
+msgstr "関数:"
#: editor/script_editor_debugger.cpp
msgid "Errors"
-msgstr ""
+msgstr "エラー"
#: editor/script_editor_debugger.cpp
msgid "Child Process Connected"
-msgstr ""
+msgstr "å­ãƒ—ロセス接続"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Inspect Previous Instance"
-msgstr ""
+msgstr "å‰ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®å†…容を確èª"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Inspect Next Instance"
-msgstr ""
+msgstr "次ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã®å†…容を確èª"
#: editor/script_editor_debugger.cpp
msgid "Stack Frames"
-msgstr ""
+msgstr "スタックフレーム"
#: editor/script_editor_debugger.cpp
msgid "Variable"
-msgstr ""
+msgstr "変数"
#: editor/script_editor_debugger.cpp
msgid "Errors:"
-msgstr ""
+msgstr "エラー:"
#: editor/script_editor_debugger.cpp
msgid "Stack Trace (if applicable):"
-msgstr ""
+msgstr "スタックトレース(å¯èƒ½ãªã‚‰ï¼‰:"
#: editor/script_editor_debugger.cpp
msgid "Remote Inspector"
-msgstr ""
+msgstr "リモートインスペクター"
#: editor/script_editor_debugger.cpp
msgid "Live Scene Tree:"
@@ -6392,59 +7907,61 @@ msgstr ""
#: editor/script_editor_debugger.cpp
msgid "Remote Object Properties: "
-msgstr ""
+msgstr "リモートオブジェクトã®ãƒ—ロパティ: "
#: editor/script_editor_debugger.cpp
msgid "Profiler"
-msgstr ""
+msgstr "プロファイラー"
#: editor/script_editor_debugger.cpp
msgid "Monitor"
-msgstr ""
+msgstr "モニター"
#: editor/script_editor_debugger.cpp
msgid "Value"
-msgstr ""
+msgstr "値"
#: editor/script_editor_debugger.cpp
msgid "Monitors"
-msgstr ""
+msgstr "モニター"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "List of Video Memory Usage by Resource:"
-msgstr ""
+msgstr "リソースã«ã‚ˆã‚‹ãƒ“デオメモリーã®ä½¿ç”¨ãƒªã‚¹ãƒˆ:"
#: editor/script_editor_debugger.cpp
msgid "Total:"
-msgstr ""
+msgstr "åˆè¨ˆ:"
#: editor/script_editor_debugger.cpp
msgid "Video Mem"
-msgstr ""
+msgstr "ビデオメモリー"
#: editor/script_editor_debugger.cpp
msgid "Resource Path"
-msgstr ""
+msgstr "リソースã®ãƒ‘ス"
#: editor/script_editor_debugger.cpp
msgid "Type"
-msgstr ""
+msgstr "タイプ(型)"
#: editor/script_editor_debugger.cpp
msgid "Usage"
-msgstr ""
+msgstr "使用"
#: editor/script_editor_debugger.cpp
msgid "Misc"
-msgstr ""
+msgstr "ãã®ä»–"
#: editor/script_editor_debugger.cpp
msgid "Clicked Control:"
-msgstr ""
+msgstr "クリックã•ã‚ŒãŸã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«:"
#: editor/script_editor_debugger.cpp
+#, fuzzy
msgid "Clicked Control Type:"
-msgstr ""
+msgstr "クリックã•ã‚ŒãŸã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã®ã‚¿ã‚¤ãƒ—:"
#: editor/script_editor_debugger.cpp
msgid "Live Edit Root:"
@@ -6456,35 +7973,43 @@ msgstr ""
#: editor/settings_config_dialog.cpp
msgid "Shortcuts"
-msgstr ""
+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 ""
+msgstr "カメラã®FOVを変更"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera Size"
-msgstr ""
+msgstr "カメラã®ã‚µã‚¤ã‚ºã‚’変更"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Sphere Shape Radius"
-msgstr ""
+msgstr "çƒå½¢çŠ¶ã®åŠå¾„変更"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Box Shape Extents"
-msgstr ""
+msgstr "ボックス(箱)形状ã®Extent(範囲)を変更"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Capsule Shape Radius"
-msgstr ""
+msgstr "カプセル形状ã®åŠå¾„変更"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Capsule Shape Height"
-msgstr ""
+msgstr "カプセル形状ã®é«˜ã•å¤‰æ›´"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Ray Shape Length"
@@ -6496,7 +8021,7 @@ msgstr ""
#: editor/spatial_editor_gizmos.cpp
msgid "Change Particles AABB"
-msgstr ""
+msgstr "パーティクルã®è»¸å¹³è¡Œå¢ƒç•Œãƒœãƒƒã‚¯ã‚¹ã‚’変更"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Probe Extents"
@@ -6550,13 +8075,144 @@ msgstr "無効ãªã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹è¾žæ›¸å½¢å¼ã§ã™ (@path ã§ç„¡åŠ¹ãªã‚¹ã‚¯ã
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
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "é¸æŠžç¯„囲を消去"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "é¸æŠžç¯„囲を複製"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "Ctrl: 回転"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "Ctrl: 回転"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Z"
+msgstr "Ctrl: 回転"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "æ–°è¦ã«ç”Ÿæˆ"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "æ–°ã—ã„プロジェクトを作る"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Area"
+msgstr "タイルマップを消去"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "é¸æŠžç¯„囲ã®ã¿"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "é¸æŠžç¯„囲ã®ã¿"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "Snapã®è¨­å®š"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "インスタンス:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "ファイル:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
+#, fuzzy
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
"properly!"
msgstr ""
-"使用メモリ外ã§ãƒŽãƒ¼ãƒ‰ãŒç™ºç”Ÿã—ã¾ã—ãŸã€‚æ­£ã—ã発生ã•ã›ã‚‹ãŸã‚ã«ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’ãŠèª­"
-"ã¿ãã ã•ã„。"
+"ノードã®ãƒ¡ãƒ¢ãƒªãƒ¼ä¸è¶³ã§ã™ã€‚ノードã«é–¢ã—ã¦ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’ãŠèª­ã¿ãã ã•ã„。"
#: modules/visual_script/visual_script.cpp
msgid ""
@@ -6565,22 +8221,54 @@ msgid ""
msgstr ""
#: 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 ""
+"返り値ã¯ãƒŽãƒ¼ãƒ‰ã®ãƒ¯ãƒ¼ã‚­ãƒ³ã‚°ãƒ¡ãƒ¢ãƒªãƒ¼ã§æœ€åˆã®è¦ç´ ã«ã‚¢ã‚µã‚¤ãƒ³ã•ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Š"
+"ã¾ã™!ノードを修正ã—ã¦ãã ã•ã„!"
#: modules/visual_script/visual_script.cpp
+#, fuzzy
msgid "Node returned an invalid sequence output: "
-msgstr ""
+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
+#, fuzzy
msgid "Stack overflow with stack depth: "
-msgstr ""
+msgstr "スタックãŒã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã—ã¦ã„ã¾ã™: "
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "シグナルã®å¼•æ•°ã‚’編集:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "é…列ã®å€¤ã®ç¨®é¡žã®å¤‰æ›´"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "入力ã®åå‰ã‚’変更"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Default Value"
+msgstr "è¦å®šå€¤ã‚’変更"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "変数を編集:"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -6589,15 +8277,17 @@ msgstr "関数を作æˆ"
#: modules/visual_script/visual_script_editor.cpp
msgid "Variables:"
-msgstr ""
+msgstr "変数を作æˆ:"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Name is not a valid identifier:"
-msgstr ""
+msgstr "ã“ã®åå‰ã¯ä¸æ­£ãªè­˜åˆ¥å­ã§ã™:"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Name already in use by another func/var/signal:"
-msgstr ""
+msgstr "ä»–ã®é–¢æ•°/変数/シグナルã«ã‚ˆã‚Šæ—¢ã«ä½¿ã‚ã‚Œã¦ã„ã‚‹åå‰ã§ã™:"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
@@ -6605,80 +8295,79 @@ msgid "Rename Function"
msgstr "関数を作æˆ"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Rename Variable"
-msgstr ""
+msgstr "変数ã®åå‰ã‚’変ãˆã‚‹"
#: modules/visual_script/visual_script_editor.cpp
msgid "Rename Signal"
-msgstr ""
+msgstr "シグナルã®åå‰ã‚’変ãˆã‚‹"
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Function"
msgstr "関数を追加"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Add Variable"
-msgstr ""
+msgstr "変数を加ãˆã‚‹"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Add Signal"
-msgstr ""
+msgstr "signalを加ãˆã‚‹"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
-msgid "Remove Function"
-msgstr "é¸æŠžã—ã¦ã„ã‚‹ã‚‚ã®ã‚’削除"
+msgid "Change Expression"
+msgstr "å¼ã‚’変更"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
-msgid "Remove Variable"
-msgstr "無効ãªã‚­ãƒ¼ã‚’削除"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr ""
+msgid "Add Node"
+msgstr "ノードを加ãˆã‚‹"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
-msgid "Remove Signal"
-msgstr "é¸æŠžã—ã¦ã„ã‚‹ã‚‚ã®ã‚’削除"
+msgid "Remove VisualScript Nodes"
+msgstr "無効ãªã‚­ãƒ¼ã‚’削除"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
-msgid "Editing Signal:"
-msgstr "ä¿¡å·ã‚’接続:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Change Expression"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr ""
+msgid "Duplicate VisualScript Nodes"
+msgstr "グラフノードを複製"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
+"メタキーをä¿æŒã—ã¦getterã‚’è½ã¨ã™.Shiftキーをä¿æŒã—ã¦ã‚¸ã‚§ãƒãƒªãƒƒã‚¯ã‚’指示ã™ã‚‹."
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Hold Ctrl to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
+"Ctrlキーをä¿æŒã—ã¦getterã‚’è½ã¨ã™.Shiftキーをä¿æŒã—ã¦ã‚¸ã‚§ãƒãƒªãƒƒã‚¯ã‚’指示ã™ã‚‹."
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Hold Meta to drop a simple reference to the node."
-msgstr ""
+msgstr "メタキーをä¿æŒã—ã¦å˜ç´”å‚照(simple reference)ã‚’è½ã¨ã™."
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Hold Ctrl to drop a simple reference to the node."
-msgstr ""
+msgstr "Ctrlキーをä¿æŒã—ã¦å˜ç´”å‚照(simple reference)ã‚’è½ã¨ã™."
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Hold Meta to drop a Variable Setter."
-msgstr ""
+msgstr "メタキーをä¿æŒã—ã¦å¤‰æ•°ã®setterã‚’è½ã¨ã™"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Hold Ctrl to drop a Variable Setter."
-msgstr ""
+msgstr "Ctrlキーをä¿æŒã—ã¦å¤‰æ•°ã®setterã‚’è½ã¨ã™."
#: modules/visual_script/visual_script_editor.cpp
msgid "Add Preload Node"
@@ -6690,247 +8379,260 @@ msgid "Add Node(s) From Tree"
msgstr "シーンã‹ã‚‰ã®ãƒŽãƒ¼ãƒ‰"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Add Getter Property"
-msgstr ""
+msgstr "プロパティã«getter(get method)を作る"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Add Setter Property"
-msgstr ""
+msgstr "プロパティã«setter(set method)を作る"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "型(type)を変更"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "ノードを除去"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "シェーダーグラフノードを除去"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "ノードã«æŽ¥ç¶šã—ã¾ã™:"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Condition"
-msgstr "é·ç§»"
+msgstr "æ¡ä»¶(conditon)"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Sequence"
-msgstr ""
+msgstr "シークエンス"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Switch"
-msgstr ""
+msgstr "Switchæ–‡"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Iterator"
-msgstr ""
+msgstr "イテレーター"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "While"
-msgstr ""
+msgstr "Whileæ–‡"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Return"
-msgstr "戻り値:"
+msgstr "戻り値"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Get"
-msgstr ""
+msgstr "Getメソッド"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "入力ã®åå‰ã‚’変更"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "'..'を処ç†ã§ãã¾ã›ã‚“"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "リソースã®ã‚¯ãƒªãƒƒãƒ—ボードã¯ç©ºã§ã™!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "ノードを貼り付ã‘:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove Function"
+msgstr "é¸æŠžã—ã¦ã„ã‚‹ã‚‚ã®ã‚’削除"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "変数を編集:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove Variable"
+msgstr "無効ãªã‚­ãƒ¼ã‚’削除"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "ä¿¡å·ã‚’接続:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove Signal"
+msgstr "é¸æŠžã—ã¦ã„ã‚‹ã‚‚ã®ã‚’削除"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Editing Variable:"
+msgstr "変数を編集中:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Editing Signal:"
+msgstr "ä¿¡å·ã‚’接続:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Base Type:"
-msgstr ""
+msgstr "基底型(Base Type):"
#: modules/visual_script/visual_script_editor.cpp
msgid "Available Nodes:"
-msgstr ""
+msgstr "利用å¯èƒ½ãªãƒŽãƒ¼ãƒ‰:"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Select or create a function to edit graph"
-msgstr ""
+msgstr "グラフを編集ã™ã‚‹é–¢æ•°ã‚’ã€é¸æŠžã™ã‚‹ã‹ç”Ÿæˆã™ã‚‹"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Edit Signal Arguments:"
-msgstr "余分ã«å‘¼ã³å‡ºã—引数を追加ã—ã¾ã™ã€‚"
+msgstr "シグナルã®å¼•æ•°ã‚’編集:"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Edit Variable:"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr ""
+msgstr "変数を編集:"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Delete Selected"
-msgstr "é¸æŠžç¯„囲を複製"
+msgstr "é¸æŠžç¯„囲を消去"
#: modules/visual_script/visual_script_editor.cpp
msgid "Find Node Type"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Copy Nodes"
-msgstr ""
+msgstr "ノードをコピー"
#: modules/visual_script/visual_script_editor.cpp
msgid "Cut Nodes"
-msgstr ""
+msgstr "ノードを切りå–ã‚‹"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
msgid "Paste Nodes"
-msgstr "ノードã¸ã®ãƒ‘ス:"
+msgstr "ノードを貼り付ã‘:"
#: modules/visual_script/visual_script_flow_control.cpp
+#, fuzzy
msgid "Input type not iterable: "
-msgstr ""
+msgstr "入力ã®åž‹ãŒã€ç¹°ã‚Šè¿”ã—処ç†ã§ãã¾ã›ã‚“(not iterable): "
#: modules/visual_script/visual_script_flow_control.cpp
+#, fuzzy
msgid "Iterator became invalid"
-msgstr ""
+msgstr "イテレーターãŒä¸æ­£ã§ã™"
#: modules/visual_script/visual_script_flow_control.cpp
+#, fuzzy
msgid "Iterator became invalid: "
-msgstr ""
+msgstr "イテレーターãŒä¸æ­£ã§ã™: "
#: modules/visual_script/visual_script_func_nodes.cpp
+#, fuzzy
msgid "Invalid index property name."
-msgstr ""
+msgstr "インデックスã®ãƒ—ロパティåãŒä¸æ­£ã§ã™."
#: modules/visual_script/visual_script_func_nodes.cpp
+#, fuzzy
msgid "Base object is not a Node!"
-msgstr ""
+msgstr "ベースオブジェクトã¯ãƒŽãƒ¼ãƒ‰ã§ã¯ã‚ã‚Šã¾ã›ã‚“!"
#: modules/visual_script/visual_script_func_nodes.cpp
+#, fuzzy
msgid "Path does not lead Node!"
-msgstr ""
+msgstr "パスãŒãƒŽãƒ¼ãƒ‰ã«é”ã—ã¾ã›ã‚“!"
#: modules/visual_script/visual_script_func_nodes.cpp
+#, fuzzy
msgid "Invalid index property name '%s' in node %s."
-msgstr ""
+msgstr "ノード%sã®ä¸æ­£ãªã‚¤ãƒ³ãƒ‡ãƒƒã‚¯ã‚¹ã®ãƒ—ロパティå'%s' ."
#: modules/visual_script/visual_script_nodes.cpp
+#, fuzzy
msgid ": Invalid argument of type: "
-msgstr ""
+msgstr ":ä¸æ­£ãªå¼•æ•°ã§ã™.引数ã®åž‹=: "
#: modules/visual_script/visual_script_nodes.cpp
+#, fuzzy
msgid ": Invalid arguments: "
-msgstr ""
+msgstr ":ä¸æ­£ãªå¼•æ•°: "
#: modules/visual_script/visual_script_nodes.cpp
+#, fuzzy
msgid "VariableGet not found in script: "
-msgstr ""
+msgstr "変数ã®get(VariableGet)ãŒã‚¹ã‚¯ãƒªãƒ—トã«ç„¡ã„: "
#: modules/visual_script/visual_script_nodes.cpp
+#, fuzzy
msgid "VariableSet not found in script: "
-msgstr ""
+msgstr "変数ã®set(VariableSet)ãŒã‚¹ã‚¯ãƒªãƒ—トã«ç„¡ã„: "
#: modules/visual_script/visual_script_nodes.cpp
+#, fuzzy
msgid "Custom node has no _step() method, can't process graph."
-msgstr ""
+msgstr "カスタムノードã«_step() メソッドãŒç„¡ã„ãŸã‚ã€ã‚°ãƒ©ãƒ•ã‚’処ç†ã§ãã¾ã›ã‚“."
#: modules/visual_script/visual_script_nodes.cpp
+#, fuzzy
msgid ""
"Invalid return value from _step(), must be integer (seq out), or string "
"(error)."
msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
+"_step()ã®ä¸æ­£ãªè¿”り値 integer (seq out)ã¾ãŸã¯string (error)ã§ãªã„ã¨ã„ã‘ã¾ã›"
+"ã‚“."
#: platform/javascript/export/export.cpp
+#, fuzzy
msgid "Run in Browser"
-msgstr ""
+msgstr "ブラウザã§å®Ÿè¡Œ"
#: platform/javascript/export/export.cpp
+#, fuzzy
msgid "Run exported HTML in the system's default browser."
-msgstr ""
+msgstr "エクスãƒãƒ¼ãƒˆã—ãŸHTMLファイルを既定ã®ãƒ–ラウザã§å®Ÿè¡Œ."
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not write file:\n"
-msgstr "フォルダを作æˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
+msgstr "ファイルã«æ›¸ãè¾¼ã¿ã§ãã¾ã›ã‚“ã§ã—ãŸ:\n"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read file:\n"
-msgstr "フォルダを作æˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
+msgstr "ファイルを読ã‚ã¾ã›ã‚“ã§ã—ãŸ:\n"
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Could not open template for export:\n"
-msgstr "フォルダを作æˆã§ãã¾ã›ã‚“ã§ã—ãŸã€‚"
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid unique name."
-msgstr "無効ãªãƒ•ã‚©ãƒ³ãƒˆ サイズã§ã™ã€‚"
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid product GUID."
-msgstr "無効ãªãƒ•ã‚©ãƒ³ãƒˆ サイズã§ã™ã€‚"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
+msgstr "エクスãƒãƒ¼ãƒˆã™ã‚‹ãƒ†ãƒ³ãƒ—レートを開ã‘ã¾ã›ã‚“:\n"
#: scene/2d/animated_sprite.cpp
msgid ""
@@ -6950,14 +8652,16 @@ msgstr ""
"ã®éƒ¨åˆ†ã¯ç„¡è¦–ã•ã‚Œã¾ã™ã€‚"
#: scene/2d/collision_polygon_2d.cpp
+#, fuzzy
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 ""
"CollisionPolygon2D ã¯ã€CollisionObject2D 派生ノードã«è¡çªã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™ã‚‹ãŸ"
-"ã‚ã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ã®ã¿ã¨ã—ã¦ã”利用ãã ã•ã„ Area2Dã€StaticBody2Dã€"
-"RigidBody2Dã€KinematicBody2D ãªã©ã®å­å›³å½¢ã‚’ã™ã‚‹ã“ã¨ã§ã™ã€‚"
+"ã‚ã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚2Dã®å½¢çŠ¶ï¼ˆã‚·ã‚§ã‚¤ãƒ—)を付与ã™ã‚‹ãŸã‚ã«ã¯ Area2Dã€"
+"StaticBody2Dã€RigidBody2Dã€KinematicBody2D ãªã©ã®å­ã‚ªãƒ–ジェクトã¨ã—ã¦åˆ©ç”¨ã—ã¦"
+"ãã ã•ã„"
#: scene/2d/collision_polygon_2d.cpp
msgid "An empty CollisionPolygon2D has no effect on collision."
@@ -6971,16 +8675,17 @@ msgid ""
"StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."
msgstr ""
"CollisionShape2D ã¯ã€CollisionObject2D 派生ノードã«ã‚³ãƒªã‚¸ãƒ§ãƒ³ã‚·ã‚§ã‚¤ãƒ—ã‚’æä¾›ã™"
-"ã‚‹ãŸã‚ã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚Area2Dã€StaticBody2Dã€RigidBody2Dã€KinematicBody2D ãª"
-"ã©ã®å­ã¨ã—ã¦ã®ã¿ã”利用ãã ã•ã„。"
+"ã‚‹ãŸã‚ã«ã®ã¿æ©Ÿèƒ½ã—ã¾ã™ã€‚ï¼’Dã®å½¢çŠ¶ï¼ˆã‚·ã‚§ã‚¤ãƒ—)を付与ã™ã‚‹ãŸã‚ã«ã¯ Area2Dã€"
+"StaticBody2Dã€RigidBody2Dã€KinematicBody2D ãªã©ã®å­ã‚ªãƒ–ジェクトã¨ã—ã¦åˆ©ç”¨ã—ã¦"
+"ãã ã•ã„."
#: scene/2d/collision_shape_2d.cpp
msgid ""
"A shape must be provided for CollisionShape2D to function. Please create a "
"shape resource for it!"
msgstr ""
-"関数㮠CollisionShape2D ã®å½¢çŠ¶ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã®ãŸã‚ã®ã‚·ã‚§ã‚¤ãƒ—リ"
-"ソースを作æˆã—ã¦ãã ã•ã„!"
+"関数ã«å¯¾ã—㦠CollisionShape2D ã®å½¢çŠ¶ï¼ˆã‚·ã‚§ã‚¤ãƒ—)を指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ã"
+"ã®ãŸã‚ã®ã‚·ã‚§ã‚¤ãƒ—リソースを作æˆã—ã¦ãã ã•ã„!"
#: scene/2d/light_2d.cpp
msgid ""
@@ -7023,16 +8728,26 @@ msgstr ""
"ã®ã¿å‹•ä½œã—ã¾ã™ã€‚"
#: scene/2d/particles_2d.cpp scene/3d/particles.cpp
+#, fuzzy
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 ""
"PathFollow2D ã¯ã€Path2D ノードã®å­ã¨ã—ã¦è¨­å®šã•ã‚Œã¦ã„ã‚‹å ´åˆã®ã¿å‹•ä½œã—ã¾ã™ã€‚"
+#: 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 ""
@@ -7063,23 +8778,33 @@ msgstr ""
"VisibilityEnable2D ã¯ã€è¦ªã¨ã—ã¦ç›´æŽ¥ç·¨é›†ã•ã‚ŒãŸã‚·ãƒ¼ãƒ³ã®ãƒ«ãƒ¼ãƒˆã‚’使用ã™ã‚‹å ´åˆã«æœ€"
"é©ã§ã™ã€‚"
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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 ""
-"CollisionShape ã¯è¡çªç‰©ç”±æ¥ã®ãƒŽãƒ¼ãƒ‰ã«è¡çªå½¢çŠ¶ã‚’æä¾›ã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚唯一ã®"
-"彼らã«å½¢çŠ¶ã‚’与ãˆã‚‹ã“ã¨ãªã©ã‚¨ãƒªã‚¢ã€é™ãƒœãƒ‡ã‚£ã€RigidBodyã€ã‚­ãƒãƒžãƒ†ã‚£ãƒƒã‚¯ãƒœãƒ‡ã‚£ã®"
-"å­ã¨ã—ã¦ãれを使用ã—ã¦ãã ã•ã„。"
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"関数㮠CollisionShape ã®å½¢çŠ¶ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã‚Œã®ãŸã‚ã®ã‚·ã‚§ã‚¤ãƒ—リ"
-"ソースを作æˆã—ã¦ãã ã•ã„!"
#: scene/3d/collision_polygon.cpp
#, fuzzy
@@ -7096,6 +8821,24 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "空㮠CollisionPolygon ã¯ã€è¡çªåˆ¤å®šã‚’æŒã¡ã¾ã›ã‚“。"
+#: 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 ""
+"CollisionShape ã¯è¡çªç‰©ç”±æ¥ã®ãƒŽãƒ¼ãƒ‰ã«è¡çªå½¢çŠ¶ã‚’æä¾›ã™ã‚‹ã®ã«å½¹ç«‹ã¡ã¾ã™ã€‚唯一ã®"
+"彼らã«å½¢çŠ¶ã‚’与ãˆã‚‹ã“ã¨ãªã©ã‚¨ãƒªã‚¢ã€é™ãƒœãƒ‡ã‚£ã€RigidBodyã€ã‚­ãƒãƒžãƒ†ã‚£ãƒƒã‚¯ãƒœãƒ‡ã‚£ã®"
+"å­ã¨ã—ã¦ãれを使用ã—ã¦ãã ã•ã„。"
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"関数㮠CollisionShape ã®å½¢çŠ¶ã‚’指定ã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚ãã‚Œã®ãŸã‚ã®ã‚·ã‚§ã‚¤ãƒ—リ"
+"ソースを作æˆã—ã¦ãã ã•ã„!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7111,8 +8854,16 @@ msgstr ""
"ã“ã‚Œã¯ãƒŠãƒ“ゲーションデータã®ã¿æä¾›ã—ã¾ã™ã€‚"
#: scene/3d/particles.cpp
+#, fuzzy
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
@@ -7139,12 +8890,14 @@ msgstr ""
"㯠'Frames' プロパティã«è¨­å®šã™ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚"
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
-msgstr ""
+#, fuzzy
+msgid "Raw Mode"
+msgstr "パン・モード"
#: scene/gui/color_picker.cpp
+#, fuzzy
msgid "Add current color as a preset"
-msgstr ""
+msgstr "ã“ã®è‰²ã‚’åˆæœŸè¨­å®šå€¤ã¨ã—ã¦è¿½åŠ ã™ã‚‹"
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -7154,22 +8907,6 @@ msgstr "警告!"
msgid "Please Confirm..."
msgstr "確èªã—ã¦ãã ã•ã„。"
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "ファイルを開ã"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "ファイルを開ã"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "ディレクトリを開ã"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "ファイルã¾ãŸã¯ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’é–‹ã"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7185,17 +8922,24 @@ msgstr ""
"らã¯å®Ÿè¡Œæ™‚ã«éžè¡¨ç¤ºã«ãªã‚Šã¾ã™ã€‚"
#: 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 "
"minimum size manually."
msgstr ""
+"スクロールコンテナã¯å­ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ãŒå‹•ä½œã«å¿…è¦ã§ã™. VBox,HBoxãªã©ã®ã‚³ãƒ³ãƒ†ãƒŠ"
+"ã‚’å­ã¨ã™ã‚‹ã‹ã€ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã‚’カスタム最å°ã‚µã‚¤ã‚ºã«ãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ã§æŒ‡å®šã—ã¦ä½¿ç”¨ã—ã¦"
+"ãã ã•ã„."
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
+#, fuzzy
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
msgstr ""
+"プロジェクトã®è¨­å®š (レンダリング-> ビューãƒãƒ¼ãƒˆ -> 既定ã®ç’°å¢ƒ) ã§æ—¢å®šã¨ã•ã‚Œã¦"
+"ã„る環境(Environment)ã¯èª­ã¿è¾¼ã‚ã¾ã›ã‚“ã§ã—ãŸ."
#: scene/main/viewport.cpp
msgid ""
@@ -7210,6 +8954,119 @@ msgstr ""
"ãã¤ã‹ã®ãƒŽãƒ¼ãƒ‰ã«å‰²ã‚Šå½“ã¦ã¾ã™ã€‚"
#, fuzzy
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "シーンを閉ã˜ã¾ã™ã‹?(セーブã—ã¦ã„ãªã„変更ã¯å¤±ã‚ã‚Œã¾ã™ï¼‰"
+
+#, fuzzy
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "プロジェクトマãƒãƒ¼ã‚¸ãƒ£ãƒ¼ã‚’é–‹ãã¾ã™ã‹ï¼Ÿ\n"
+#~ "(ä¿å­˜ã—ã¦ã„ãªã„変更ã¯å¤±ã‚ã‚Œã¾ã™ï¼‰"
+
+#, fuzzy
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "é–‰ã˜ã¦éŽåŽ»é–‹ã„ãŸã‚·ãƒ¼ãƒ³ã«ç§»å‹•"
+
+#, fuzzy
+#~ msgid "Expand to Parent"
+#~ msgstr "親ã¾ã§å±•é–‹ã™ã‚‹"
+
+#~ msgid "Del"
+#~ msgstr "deleteキー"
+
+#, fuzzy
+#~ msgid "Copy To Platform.."
+#~ msgstr "プラットフォームã¸ã‚³ãƒ”ー.."
+
+#, fuzzy
+#~ msgid "just pressed"
+#~ msgstr "押ã—ãŸ"
+
+#, fuzzy
+#~ msgid "just released"
+#~ msgstr "離ã—ãŸ"
+
+#, fuzzy
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr "証明書ファイルãŒèª­ã‚ã¾ã›ã‚“. パスã‹ãƒ‘スワードãŒé–“é•ã£ã¦ã„ã¾ã›ã‚“ã‹ï¼Ÿ"
+
+#, fuzzy
+#~ msgid "Error creating the signature object."
+#~ msgstr "ç½²åオブジェクトã®ç”Ÿæˆã‚¨ãƒ©ãƒ¼"
+
+#, fuzzy
+#~ msgid "Error creating the package signature."
+#~ msgstr "パッケージ署å生æˆã‚¨ãƒ©ãƒ¼"
+
+#, fuzzy
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "エクスãƒãƒ¼ãƒˆã™ã‚‹ãƒ†ãƒ³ãƒ—レートãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“.\n"
+#~ "ダウンロードã—ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã—ã¦ãã ã•ã„."
+
+#, fuzzy
+#~ msgid "Custom debug package not found."
+#~ msgstr "カスタム デãƒãƒƒã‚°ãƒ‘ッケージãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“"
+
+#, fuzzy
+#~ msgid "Custom release package not found."
+#~ msgstr "カスタム リリースパッケージãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“."
+
+#, fuzzy
+#~ msgid "Invalid unique name."
+#~ msgstr "無効ãªãƒ•ã‚©ãƒ³ãƒˆ サイズã§ã™ã€‚"
+
+#, fuzzy
+#~ msgid "Invalid product GUID."
+#~ msgstr "無効ãªãƒ•ã‚©ãƒ³ãƒˆ サイズã§ã™ã€‚"
+
+#, fuzzy
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "パブリッシャã®GUIDãŒä¸æ­£ã§ã™."
+
+#, fuzzy
+#~ msgid "Invalid background color."
+#~ msgstr "ä¸æ­£ãªèƒŒæ™¯è‰²"
+
+#, fuzzy
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr "ä¸æ­£ãªStoreロゴイメージ(縦横50x50ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)"
+
+#, fuzzy
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr "ä¸æ­£ãª44X44正方ロゴイメージ(縦横44x44ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)"
+
+#, fuzzy
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr "ä¸æ­£ãª71x71正方ロゴイメージ(縦横71x71ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)"
+
+#, fuzzy
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr "ä¸æ­£ãª150X150正方ロゴイメージ(縦横150x150ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)"
+
+#, fuzzy
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr "ä¸æ­£ãª310X310正方ロゴイメージ(縦横310x310ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)"
+
+#, fuzzy
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr "ä¸æ­£ãª310X150幅広ロゴイメージ(縦横310x150ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)"
+
+#, fuzzy
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr ""
+#~ "ä¸æ­£ãªã‚¹ãƒ—ラッシュスクリーンイメージ(縦横620x300ã§ãªã„ã¨ã„ã‘ã¾ã›ã‚“)"
+
+#~ msgid "RAW Mode"
+#~ msgstr "RAWモード"
+
+#, fuzzy
#~ msgid "Node From Scene"
#~ msgstr "シーンã‹ã‚‰ã®ãƒŽãƒ¼ãƒ‰"
diff --git a/editor/translations/ko.po b/editor/translations/ko.po
index ee409ab97f..b531720ebd 100644
--- a/editor/translations/ko.po
+++ b/editor/translations/ko.po
@@ -148,7 +148,8 @@ msgstr "ë‹¤ìŒ ìŠ¤í…으로 ì´ë™"
msgid "Goto Prev Step"
msgstr "ì´ì „ 스í…으로 ì´ë™"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "ì§ì„ í˜•"
@@ -382,7 +383,8 @@ msgstr "파ì¼"
msgid "Description:"
msgstr "설명:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr "설치"
@@ -393,9 +395,9 @@ msgstr "설치"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "닫기"
@@ -471,7 +473,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -537,17 +539,16 @@ msgid "All"
msgstr "모ë‘"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "검색:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "검색"
@@ -563,7 +564,7 @@ msgstr "검색"
msgid "Import"
msgstr "가져오기"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "플러그ì¸"
@@ -575,7 +576,7 @@ msgstr "ì •ë ¬:"
msgid "Reverse"
msgstr "뒤집기"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "카테고리:"
@@ -730,14 +731,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "삭제"
@@ -846,7 +847,7 @@ msgid "Resource"
msgstr "리소스"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "경로"
@@ -928,12 +929,194 @@ msgstr "미사용 리소스 íƒìƒ‰ê¸°"
msgid "Delete selected files?"
msgstr "ì„ íƒëœ 파ì¼ë“¤ì„ 삭제하시겠습니까?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Godot ì»¤ë®¤ë‹ˆí‹°ì— ê°ì‚¬ë“œë¦½ë‹ˆë‹¤!"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "ê°ì‚¬í•©ë‹ˆë‹¤!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr ""
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "ì €ìž:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "ìƒìˆ˜:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "무압축"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "패키지가 성공ì ìœ¼ë¡œ 설치ë˜ì—ˆìŠµë‹ˆë‹¤!"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "패키지가 성공ì ìœ¼ë¡œ 설치ë˜ì—ˆìŠµë‹ˆë‹¤!"
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Effect"
+msgstr "빈 프레임 추가"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "ìžë™ 로드 ì´ë¦„ 변경"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "ì„ íƒ í•­ëª© ì‚­ì œ"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "복제"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "ì„ íƒ í•­ëª© ì‚­ì œ"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "%s 추가"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "ë ˆì´ì•„웃 ì‚­ì œ"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "애니메ì´ì…˜ 복제하기"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "ì´ë™ ì•¡ì…˜"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -947,24 +1130,53 @@ 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
+#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"유효하지 ì•Šì€ íŒŒì¼ í™•ìž¥ìž.\n"
+".fnt 를 사용하세요."
+
+#: editor/editor_audio_buses.cpp
#, fuzzy
msgid "Add Bus"
msgstr "%s 추가"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "새 리소스 만들기"
+
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "로드"
#: editor/editor_audio_buses.cpp
+#, fuzzy
+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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+msgid "Save this Bus Layout to a file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+msgid "Load Default"
msgstr "Default"
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "유효하지 ì•Šì€ ì´ë¦„."
@@ -1067,6 +1279,11 @@ msgid "Updating scene.."
msgstr "씬 ì—…ë°ì´íŠ¸ 중.."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "먼저 ì”¬ì„ ì €ìž¥í•´ì£¼ì„¸ìš”."
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "디렉토리 ì„ íƒ"
@@ -1144,6 +1361,22 @@ msgstr "모든 íŒŒì¼ (*)"
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
@@ -1270,6 +1503,15 @@ msgid "Signals:"
msgstr "시그ë„:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "애니메ì´ì…˜"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "ìƒìˆ˜:"
@@ -1286,7 +1528,8 @@ msgid "Search Text"
msgstr "ë¬¸ìž ê²€ìƒ‰"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " 출력:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1336,6 +1579,11 @@ msgid "Creating Thumbnail"
msgstr "ì¸ë„¤ì¼ ìƒì„± 중"
#: editor/editor_node.cpp
+#, fuzzy
+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 ""
@@ -1462,12 +1710,13 @@ msgid "Quick Open Script.."
msgstr "빠른 스í¬ë¦½íŠ¸ 열기.."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "네"
+#, fuzzy
+msgid "Save & Close"
+msgstr "파ì¼ë¡œ 저장하기"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "ì”¬ì„ ë‹«ìœ¼ì‹œê² ìŠµë‹ˆê¹Œ? (저장하지 ì•Šì€ ë³€ê²½ì‚¬í•­ì€ ì‚¬ë¼ì§‘니다.)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
@@ -1479,9 +1728,17 @@ 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 "메쉬 ë¼ì´ë¸ŒëŸ¬ë¦¬ 내보내기"
@@ -1491,12 +1748,9 @@ msgid "Export Tile Set"
msgstr "íƒ€ì¼ ì…‹ 내보내기"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "종료"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "ì—디터를 종료하시겠습니까?"
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "ì´ ìž‘ì—…ì€ ì”¬ ì—†ì´ëŠ” 불가합니다."
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1519,18 +1773,52 @@ msgid "Quick Run Scene.."
msgstr "빠른 씬 실행.."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "종료"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "ì—디터를 종료하시겠습니까?"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "프로ì íŠ¸ 매니저"
+
+#: editor/editor_node.cpp
+#, fuzzy
+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 ""
-"프로ì íŠ¸ 매니저를 실행하시겠습니까?\n"
-"(저장하지 ì•Šì€ ë³€ê²½ì‚¬í•­ì€ ì‚¬ë¼ì§‘니다.)"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "ë©”ì¸ ì”¬ ì„ íƒ"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1565,6 +1853,11 @@ msgstr "ë ˆì´ì•„웃 저장"
msgid "Delete Layout"
msgstr "ë ˆì´ì•„웃 ì‚­ì œ"
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+msgid "Default"
+msgstr "Default"
+
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
msgstr "씬 탭 전환"
@@ -1581,6 +1874,11 @@ msgstr "%dê°œ 추가 íŒŒì¼ ë˜ëŠ” í´ë”"
msgid "Distraction Free Mode"
msgstr "초집중 모드"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "초집중 모드"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "씬"
@@ -1630,10 +1928,6 @@ msgstr "모든 씬 저장"
msgid "Close Scene"
msgstr "씬 닫기"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr "ë‹«ê³  ì´ì „ 씬으로 ì´ë™"
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "최근 ì—´ì—ˆë˜ í•­ëª©"
@@ -1937,6 +2231,10 @@ msgstr "노드"
msgid "Output"
msgstr "출력"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "다시 가져오기"
@@ -1946,26 +2244,10 @@ msgid "Update"
msgstr "갱신"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "Godot ì»¤ë®¤ë‹ˆí‹°ì— ê°ì‚¬ë“œë¦½ë‹ˆë‹¤!"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "ê°ì‚¬í•©ë‹ˆë‹¤!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "ZIP 파ì¼ë¡œë¶€í„° í…œí”Œë¦¿ì„ ê°€ì ¸ì˜¤ê¸°"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "프로ì íŠ¸ 내보내기"
@@ -1986,9 +2268,18 @@ msgid "Open & Run a Script"
msgstr "스í¬ë¦½íŠ¸ë¥¼ ì—´ê³  실행"
#: editor/editor_node.cpp
+#, fuzzy
+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
#, fuzzy
msgid "Open 2D Editor"
@@ -2095,6 +2386,16 @@ msgstr "다시 가져오기"
msgid "Re-Import Changed Resources"
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 "ë¡œì§ì„ _run() í•¨ìˆ˜ì•ˆì— ìž‘ì„±í•˜ì„¸ìš”."
@@ -2243,10 +2544,28 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "저장 ë° ë‹¤ì‹œ 가져오기"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "소스:"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr "소스와 ëŒ€ìƒ íŒŒì¼ì´ ë™ì¼í•˜ì—¬, 무시ë©ë‹ˆë‹¤."
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr "소스와 ëŒ€ìƒ ê²½ë¡œê°€ ë™ì¼í•˜ì—¬, 무시ë©ë‹ˆë‹¤."
@@ -2255,6 +2574,20 @@ msgid "Can't move directories to within themselves."
msgstr "디렉토리를 ìžì‹ ìœ¼ë¡œ ì´ë™í•  수 없습니다."
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "ì´ë¯¸ì§€ 로드 ì—러:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "가져오기 ì—러:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr "'..'ì— ìˆ˜í–‰í•  수 ì—†ìŒ"
@@ -2332,6 +2665,12 @@ 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 "ì´ë™"
@@ -2343,10 +2682,31 @@ msgstr "ê·¸ë£¹ì— ì¶”ê°€"
msgid "Remove from Group"
msgstr "그룹ì—ì„œ 제거"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "서페ì´ìŠ¤ %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "3D 씬 가져오기"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2386,6 +2746,14 @@ 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
#, fuzzy
msgid " Files"
msgstr "파ì¼"
@@ -2580,6 +2948,10 @@ msgstr "소스 메쉬:"
msgid "Mesh"
msgstr "메쉬"
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "서페ì´ìŠ¤ %d"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr "가져올 ìƒ˜í”Œì´ ì—†ìŠµë‹ˆë‹¤!"
@@ -3165,6 +3537,11 @@ msgid "New name:"
msgstr "새 ì´ë¦„:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "노드 필터 편집"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr "í¬ê¸°:"
@@ -3478,6 +3855,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "편집"
@@ -3510,10 +3888,6 @@ msgid "Use Pixel Snap"
msgstr "픽셀 스냅 사용"
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr "부모로 확장"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr "스켈레톤.."
@@ -3622,11 +3996,6 @@ msgstr "ì´ ìž‘ì—…ì€ í•˜ë‚˜ì˜ ì„ íƒëœ 노드를 필요로 합니다."
msgid "Change default type"
msgstr "기본 타입 변경"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "확ì¸"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3666,6 +4035,14 @@ msgstr "í´ë¦¬ê³¤ 편집 (ì  ì‚­ì œ)"
msgid "Create a new polygon from scratch."
msgstr "처ìŒë¶€í„° 새로운 í´ë¦¬ê³¤ 만들기."
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr "í´ë¦¬ê³¤3D 만들기"
@@ -3706,6 +4083,21 @@ msgstr "씬으로부터 갱신하기"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Modify Curve Point"
+msgstr "커브맵 수정"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "커브맵 수정"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Load Curve Preset"
+msgstr "리소스 로드"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Add point"
msgstr "입력 추가"
@@ -3716,13 +4108,31 @@ msgstr "경로 í¬ì¸íŠ¸ ì‚­ì œ"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Left linear"
+msgstr "ì§ì„ í˜•"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Right linear"
+msgstr "우측 뷰"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Load preset"
msgstr "리소스 로드"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
-msgid "Modify Curve"
-msgstr "커브맵 수정"
+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"
@@ -3746,6 +4156,12 @@ 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 "Occluder í´ë¦¬ê³¤ 만들기"
@@ -4040,6 +4456,12 @@ msgid "Load Emission Mask"
msgstr "ì—미션 ë§ˆìŠ¤í¬ ë¡œë“œ"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
+msgid "Particles"
+msgstr "버í…스"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
msgstr "ìƒì„±ëœ í¬ì¸íŠ¸ 개수:"
@@ -4371,6 +4793,12 @@ msgid "Clear Recent Files"
msgstr "Bones 없애기"
#: 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 "테마 저장 중 ì—러"
@@ -4395,6 +4823,10 @@ 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 "ë‹¤ìŒ ìŠ¤í¬ë¦½íŠ¸"
@@ -4447,6 +4879,11 @@ msgid "Close All"
msgstr "ëª¨ë‘ ë‹«ê¸°"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+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.."
@@ -4479,6 +4916,11 @@ msgid "Keep Debugger Open"
msgstr "디버거 í•­ìƒ ì—´ì–´ë†“ê¸°"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "ì—디터ì—ì„œ 열기"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr "윈ë„ìš°"
@@ -4546,6 +4988,10 @@ msgid ""
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 "ìƒ‰ìƒ ì„ íƒ"
@@ -4593,6 +5039,11 @@ msgid "Move Down"
msgstr "아래로 ì´ë™"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "í¬ì¸íŠ¸ ì‚­ì œ"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr "내어쓰기"
@@ -4899,37 +5350,6 @@ msgid "Animation Key Inserted."
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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "앞으로 가기"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "뒤로"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "휠 아래로."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -4997,10 +5417,64 @@ msgid "Audio Listener"
msgstr "오디오 리스너"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Freelook Forward"
+msgstr "앞으로 가기"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Backwards"
+msgstr "뒤로"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Down"
+msgstr "휠 아래로."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "preview"
+msgstr "미리보기"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr "변환 다ì´ì–¼ë¡œê·¸"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "ì„ íƒ ëª¨ë“œ"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+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 "ì´ë™ 모드 (W)"
@@ -5121,6 +5595,7 @@ msgid "View Grid"
msgstr "그리드 보기"
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "설정"
@@ -5249,6 +5724,11 @@ msgid "StyleBox Preview:"
msgstr "StyleBox 미리보기:"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
+msgid "Set Region Rect"
+msgstr "구역 설정"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
msgstr "스냅 모드:"
@@ -5306,6 +5786,16 @@ msgid "Remove Item"
msgstr "ì•„ì´í…œ ì‚­ì œ"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "í´ëž˜ìŠ¤ ì•„ì´í…œ ì‚­ì œ"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "삭제"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr "테마"
@@ -5373,7 +5863,7 @@ msgstr "Tab 2"
msgid "Tab 3"
msgstr "Tab 3"
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr "타입:"
@@ -5395,12 +5885,27 @@ msgid "Color"
msgstr "색깔"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "ì„ íƒë¶€ë¶„ 지우기"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr "타ì¼ë§µ 칠하기"
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "복제"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "ì§ì„ í˜•"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Bucket Fill"
+msgstr "채우기"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5435,10 +5940,6 @@ msgid "Pick Tile"
msgstr "íƒ€ì¼ ì„ íƒ"
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr "ì„ íƒ"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr "0ë„ íšŒì „"
@@ -5502,7 +6003,7 @@ msgstr "ì„ íƒëœ 파ì¼ë“¤ì„ 삭제하시겠습니까?"
msgid "Presets"
msgstr "프리셋.."
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "추가.."
@@ -5557,6 +6058,24 @@ msgid "Make Patch"
msgstr "ëŒ€ìƒ ê²½ë¡œ:"
#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "í…스ì³"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "함수 목ë¡:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr "PCK/Zip 내보내기"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5597,10 +6116,6 @@ msgid "The following files failed extraction from package:"
msgstr "다ìŒì˜ 파ì¼ë“¤ì„ 패키지로부터 ì¶”ì¶œí•˜ëŠ”ë° ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤:"
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr "패키지가 성공ì ìœ¼ë¡œ 설치ë˜ì—ˆìŠµë‹ˆë‹¤!"
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "기존 프로ì íŠ¸ 가져오기"
@@ -5645,6 +6160,22 @@ msgid "Are you sure to open more than one project?"
msgstr "ë‘ê°œ ì´ìƒì˜ 프로ì íŠ¸ë¥¼ 열려는 ê²ƒì´ í™•ì‹¤í•©ë‹ˆê¹Œ?"
#: 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 ""
+"ë©”ì¸ ì”¬ì´ ì§€ì •ë˜ì§€ 않았습니다. ì„ íƒí•˜ì‹œê² ìŠµë‹ˆê¹Œ?\n"
+"ë‚˜ì¤‘ì— \"프로ì íŠ¸ 설정\"ì˜ 'Application' 항목ì—ì„œ 변경할 수 있습니다."
+
+#: 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 "ë‘ê°œ ì´ìƒì˜ 프로ì íŠ¸ë¥¼ 실행하려는 ê²ƒì´ í™•ì‹¤í•©ë‹ˆê¹Œ?"
@@ -5660,10 +6191,6 @@ msgid ""
msgstr "%s ì—ì„œ 기존 Godot 프로ì íŠ¸ë“¤ì„ 스캔하려고 합니다. 진행하시겠습니까?"
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr "프로ì íŠ¸ 매니저"
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr "프로ì íŠ¸ 목ë¡"
@@ -5692,258 +6219,291 @@ msgstr "ì•„ì´í…œ ì‚­ì œ"
msgid "Exit"
msgstr "종료"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "연결하기.."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "키 "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr "ì¡°ì´ìŠ¤í‹± 버튼"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr "ì¡°ì´ìŠ¤í‹± 축"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr "마우스 버튼"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr "유효하지 ì•Šì€ ì•¡ì…˜ ('/' ë˜ëŠ” ':' ë¬¸ìž ì‚¬ìš© 불가)."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr "'%s' ì•¡ì…˜ì´ ì´ë¯¸ 존재합니다!"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr "ìž…ë ¥ 앱션 ì´ë²¤íŠ¸ ì´ë¦„ 변경"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr "ìž…ë ¥ ì•¡ì…˜ ì´ë²¤íŠ¸ 추가"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "메타+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "쉬프트+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "알트+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr "컨트롤+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "키를 눌러주세요.."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr "마우스 버튼 ì¸ë±ìŠ¤:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr "왼쪽 버튼"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr "오른쪽 버튼"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr "ê°€ìš´ë° ë²„íŠ¼"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr "휠 위로 버튼"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr "휠 아래로 버튼"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr "버튼 6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr "버튼 7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr "버튼 8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr "버튼 9"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "변경"
+
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Axis Index:"
msgstr "ì¡°ì´ìŠ¤í‹± 축 ì¸ë±ìŠ¤:"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "축"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Button Index:"
msgstr "ì¡°ì´ìŠ¤í‹± 버튼 ì¸ë±ìŠ¤:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr "입력 액션 추가"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr "ìž…ë ¥ ì•¡ì…˜ ì´ë²¤íŠ¸ ì‚­ì œ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Add Event"
msgstr "빈 프레임 추가"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "기기"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "버튼"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "왼쪽 버튼."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "오른쪽 버튼."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "ê°€ìš´ë° ë²„íŠ¼."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "휠 위로."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "휠 아래로."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Add Global Property"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "No property '"
+msgstr "ì†ì„±:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "설정"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "입력 삭제"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "설정 저장 중 ì—러."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "설정 저장 완료."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr "번역 추가"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "번역 삭제"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr "리맵핑 경로 추가"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr "리소스 리맵핑 추가"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr "언어 리소스 리맵핑 변경"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr "리소스 리맵핑 제거"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr "리소스 리맵핑 옵션 제거"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "프로ì íŠ¸ 설정 (engine.cfg)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr "ì¼ë°˜"
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr "ì†ì„±:"
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr "삭제"
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr "플랫í¼ìœ¼ë¡œ 복사.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
+msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr "입력 설정"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr "ì•¡ì…˜:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr "기기:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr "ì¸ë±ìŠ¤:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr "현지화"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr "번역"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr "번역:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr "리맵핑"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr "리소스:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr "ì§€ì—­ì— ë”°ë¥¸ 리맵핑:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr "지역"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "ìžë™ 로드"
@@ -5985,6 +6545,11 @@ msgid "Assign"
msgstr "할당"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "노드 ì„ íƒ"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr "새 스í¬ë¦½íŠ¸"
@@ -5999,6 +6564,11 @@ msgstr "íŒŒì¼ ë¡œë“œ ì—러: 리소스가 아닙니다!"
#: editor/property_editor.cpp
#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "가져올 노드들 ì„ íƒ"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "Pick a Node"
msgstr "노드 ì„ íƒ"
@@ -6094,6 +6664,11 @@ msgstr "ë©”ì¸ ì”¬ ì¸ìˆ˜:"
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 "ì”¬ì„ ì¸ìŠ¤í„´ìŠ¤í•  수 있는 부모가 없습니다."
@@ -6137,10 +6712,6 @@ msgid "Delete Node(s)?"
msgstr "노드를 삭제하시겠습니까?"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "ì´ ìž‘ì—…ì€ ì”¬ ì—†ì´ëŠ” 불가합니다."
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6153,6 +6724,18 @@ 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 "Placeholderë¡œì¨ ë¡œë“œ"
+
+#: editor/scene_tree_dock.cpp
+msgid "Discard Instancing"
+msgstr "ì¸ìŠ¤í„´ìŠ¤ í기"
+
+#: editor/scene_tree_dock.cpp
msgid "Makes Sense!"
msgstr "오케바리!"
@@ -6197,6 +6780,14 @@ msgid "Edit Connections"
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 "노드 삭제"
@@ -6249,6 +6840,11 @@ msgstr ""
"씬 파ì¼ì„ 노드로 추가합니다. 루트 노드가 ì—†ì„ ê²½ìš°, ìƒì†ì”¬ìœ¼ë¡œ 만들어집니다."
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "í•„í„°"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr "ì„ íƒëœ ë…¸ë“œì— ìƒˆë¡œìš´ 스í¬ë¦½íŠ¸ë¥¼ ìƒì„±í•˜ê±°ë‚˜ 기존 스í¬ë¦½íŠ¸ë¥¼ 로드합니다."
@@ -6256,6 +6852,14 @@ msgstr "ì„ íƒëœ ë…¸ë“œì— ìƒˆë¡œìš´ 스í¬ë¦½íŠ¸ë¥¼ ìƒì„±í•˜ê±°ë‚˜ 기존 스
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 "Spatial ë³´ì´ê¸° 토글"
@@ -6287,11 +6891,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "디버그 옵션"
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr "ì¸ìŠ¤í„´ìŠ¤:"
@@ -6330,32 +6929,8 @@ msgid "Scene Tree (Nodes):"
msgstr "씬 트리 (노드):"
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr "ìžì‹ë…¸ë“œ 편집 가능"
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr "Placeholderë¡œì¨ ë¡œë“œ"
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr "ì¸ìŠ¤í„´ìŠ¤ í기"
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr "ì—디터ì—ì„œ 열기"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr "ìƒì† 없애기"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr "ìƒì†ì„ 없애시겠습니까? (ë˜ëŒë¦¬ê¸° 불가!)"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr "없앴습니다!"
+msgid "Node Configuration Warning!"
+msgstr ""
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -6363,6 +6938,11 @@ msgstr "노드 ì„ íƒ"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "ì´ë¯¸ì§€ 로드 ì—러:"
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "íŒŒì¼ ì‹œìŠ¤í…œì— ìŠ¤í¬ë¦½íŠ¸ë¥¼ ìƒì„±í•  수 없습니다."
@@ -6371,6 +6951,10 @@ msgid "Error loading script from %s"
msgstr "'%s' 스í¬ë¦½íŠ¸ 로딩 중 ì—러"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "해당 ì—†ìŒ"
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "경로가 비어 있ìŒ"
@@ -6414,10 +6998,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr "해당 ì—†ìŒ"
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6588,6 +7168,10 @@ msgid "Change Light Radius"
msgstr "Light 반경 변경"
#: editor/spatial_editor_gizmos.cpp
+msgid "Change AudioStreamPlayer3D Emission Angle"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
msgstr "Camera 시야 변경"
@@ -6672,6 +7256,137 @@ msgstr ""
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "유효하지 ì•Šì€ ì¸ìŠ¤í„´ìŠ¤ Dictionary (서브í´ëž˜ìŠ¤ê°€ 유효하지 ì•ŠìŒ)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "ì„ íƒ í•­ëª© ì‚­ì œ"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "ì„ íƒí‚¤ 복제"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "컨트롤: 회전"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "컨트롤: 회전"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Create Area"
+msgstr "새로 만들기"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "새 프로ì íŠ¸ 만들기"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Area"
+msgstr "타ì¼ë§µ 지우기"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "ì„ íƒì˜ì—­ë§Œ"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "ì„ íƒì˜ì—­ë§Œ"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "스냅 설정"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "ì¸ìŠ¤í„´ìŠ¤:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "파ì¼"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6703,6 +7418,31 @@ msgid "Stack overflow with stack depth: "
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "ì‹œê·¸ë„ ì¸ìž 편집:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "배열 값 타입 변경"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "ìž…ë ¥ ì´ë¦„ 변경"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Default Value"
+msgstr "기본값 변경"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "변수 편집:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "함수:"
@@ -6743,26 +7483,6 @@ msgid "Add Signal"
msgstr "ì‹œê·¸ë„ ì¶”ê°€"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "함수 제거"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "변수 제거"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "변수 편집:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "ì‹œê·¸ë„ ì œê±°"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "ì‹œê·¸ë„ íŽ¸ì§‘:"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
msgstr "í‘œí˜„ì‹ ë³€ê²½"
@@ -6771,6 +7491,16 @@ msgid "Add Node"
msgstr "노드 추가"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "유효하지 ì•Šì€ í‚¤ ì‚­ì œ"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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 ""
@@ -6811,6 +7541,26 @@ msgid "Add Setter Property"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "타입 변경"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "노드 삭제"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "ì…°ì´ë” 그래프 노드 ì‚­ì œ"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "연결할 노드:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "ì¡°ê±´"
@@ -6839,6 +7589,56 @@ msgid "Get"
msgstr "얻기"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "ìž…ë ¥ ì´ë¦„ 변경"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "'..'ì— ìˆ˜í–‰í•  수 ì—†ìŒ"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "리소스 í´ë¦½ë³´ë“œê°€ 비었습니다!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "노드 붙여넣기"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "함수 제거"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "변수 편집:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "변수 제거"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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 "기본 타입:"
@@ -6859,10 +7659,6 @@ msgid "Edit Variable:"
msgstr "변수 편집:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "변경"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "ì„ íƒ í•­ëª© ì‚­ì œ"
@@ -6936,14 +7732,6 @@ msgid ""
"(error)."
msgstr ""
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Run in Browser"
@@ -6968,81 +7756,6 @@ msgstr "타ì¼ì„ ì°¾ì„ ìˆ˜ ì—†ìŒ:"
msgid "Could not open template for export:\n"
msgstr "í´ë”를 만들 수 없습니다."
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr "ì¸ì¦ì„œ 파ì¼ì„ ì½ì„ 수 없습니다. 경로와 비밀번호가 정확합니까?"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "서명 오브ì íŠ¸ ìƒì„±ì¤‘ ì—러."
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr "패키지 ì„œëª…ì„ ìƒì„±í•˜ëŠ” 중 ì—러가 ë°œìƒí–ˆìŠµë‹ˆë‹¤."
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"내보내기 í…œí”Œë¦¿ì„ ì°¾ì„ ìˆ˜ 없습니다.\n"
-"내보내기 í…œí”Œë¦¿ì„ ë‹¤ìš´ë¡œë“œí•˜ì—¬ 설치하십시요."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr "커스텀 디버그 패키지를 ì°¾ì„ ìˆ˜ 없습니다."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr "커스텀 릴리즈 패키지를 ì°¾ì„ ìˆ˜ 없습니다."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr "유효하지 ì•Šì€ ê³ ìœ  ì´ë¦„."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr "유요하지 ì•Šì€ í”„ë¡œë•íŠ¸ GUID."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr "유요하지 ì•Šì€ í¼ë¸”리셔 GUID."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "유요하지 ì•Šì€ ë°°ê²½ 색ìƒ."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "유효하지 ì•Šì€ ë¡œê³  ì´ë¯¸ì§€ í¬ê¸°ìž…니다 (50x50 ì´ì–´ì•¼ 합니다)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr "유효하지 ì•Šì€ ë¡œê³  ì´ë¯¸ì§€ í¬ê¸°ìž…니다 (44x44 ì´ì–´ì•¼ 합니다)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr "유효하지 ì•Šì€ ë¡œê³  ì´ë¯¸ì§€ í¬ê¸°ìž…니다 (71x71 ì´ì–´ì•¼ 합니다)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr "유효하지 ì•Šì€ ë¡œê³  ì´ë¯¸ì§€ í¬ê¸°ìž…니다 (150x150 ì´ì–´ì•¼ 합니다)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr "유효하지 ì•Šì€ ë¡œê³  ì´ë¯¸ì§€ í¬ê¸°ìž…니다 (310x310 ì´ì–´ì•¼ 합니다)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr "유효하지 ì•Šì€ ë¡œê³  ì´ë¯¸ì§€ í¬ê¸°ìž…니다 (310x150 ì´ì–´ì•¼ 합니다)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-"유효하지 ì•Šì€ ìŠ¤í”Œëž˜ì‰¬ 스í¬ë¦° ì´ë¯¸ì§€ í¬ê¸°ìž…니다 (620x300 ì´ì–´ì•¼ 합니다)."
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7139,6 +7852,13 @@ msgstr ""
msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr "PathFollow2D는 Path2D ë…¸ë“œì˜ ìžì‹ë…¸ë“œë¡œ ìžˆì„ ë•Œë§Œ ë™ìž‘합니다."
+#: 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 "Path ì†ì„±ì€ 유효한 Node2D 노드를 가리켜야 합니다."
@@ -7167,23 +7887,33 @@ msgstr ""
"VisibilityEnable2D는 편집 ì”¬ì˜ ë£¨íŠ¸ì˜ í•˜ìœ„ 노드로 추가할 ë•Œ 가장 잘 ë™ìž‘합니"
"다."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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 ""
-"CollisionShapeì€ CollisionObjectì— ì¶©ëŒ ëª¨ì–‘ì„ ì§€ì •í•˜ê¸° 위해서만 사용ë©ë‹ˆë‹¤. "
-"Area, StaticBody, RigidBody, KinematicBody ë“±ì— ìžì‹ 노드로 추가하여 사용합니"
-"다."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"CollisionShapeì´ ê¸°ëŠ¥ì„ í•˜ê¸° 위해서는 ëª¨ì–‘ì´ ì œê³µë˜ì–´ì•¼ 합니다. 모양 리소스"
-"를 만드세요!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7199,6 +7929,24 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "빈 CollisionPolygon는 충ëŒì— ì˜í–¥ì„ 주지 않습니다."
+#: 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 ""
+"CollisionShapeì€ CollisionObjectì— ì¶©ëŒ ëª¨ì–‘ì„ ì§€ì •í•˜ê¸° 위해서만 사용ë©ë‹ˆë‹¤. "
+"Area, StaticBody, RigidBody, KinematicBody ë“±ì— ìžì‹ 노드로 추가하여 사용합니"
+"다."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"CollisionShapeì´ ê¸°ëŠ¥ì„ í•˜ê¸° 위해서는 ëª¨ì–‘ì´ ì œê³µë˜ì–´ì•¼ 합니다. 모양 리소스"
+"를 만드세요!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7218,6 +7966,13 @@ 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 "Path ì†ì„±ì€ 유효한 Spatial 노드를 가리켜야 합니다."
@@ -7237,8 +7992,8 @@ msgstr ""
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
-msgstr "실행 모드:"
+msgid "Raw Mode"
+msgstr "팬 모드"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
@@ -7252,22 +8007,6 @@ msgstr "경고!"
msgid "Please Confirm..."
msgstr "확ì¸í•´ì£¼ì„¸ìš”..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "íŒŒì¼ ì—´ê¸°"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "íŒŒì¼ ì—´ê¸°"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "디렉토리 열기"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "디렉토리 ë˜ëŠ” íŒŒì¼ ì—´ê¸°"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "컨트롤+"
@@ -7288,7 +8027,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7306,6 +8045,91 @@ msgstr ""
"합니다. 그렇지 ì•Šì„ ê²½ìš°, í™”ë©´ì— í‘œì‹œí•˜ê¸° 위해서는 Render target으로 설정하"
"ê³  내부ì ì¸ í…스ì³ë¥¼ 다른 ë…¸ë“œì— í• ë‹¹í•´ì•¼ 합니다."
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "ì”¬ì„ ë‹«ìœ¼ì‹œê² ìŠµë‹ˆê¹Œ? (저장하지 ì•Šì€ ë³€ê²½ì‚¬í•­ì€ ì‚¬ë¼ì§‘니다.)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "프로ì íŠ¸ 매니저를 실행하시겠습니까?\n"
+#~ "(저장하지 ì•Šì€ ë³€ê²½ì‚¬í•­ì€ ì‚¬ë¼ì§‘니다.)"
+
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "ë‹«ê³  ì´ì „ 씬으로 ì´ë™"
+
+#~ msgid "Expand to Parent"
+#~ msgstr "부모로 확장"
+
+#~ msgid "Del"
+#~ msgstr "삭제"
+
+#~ msgid "Copy To Platform.."
+#~ msgstr "플랫í¼ìœ¼ë¡œ 복사.."
+
+#, fuzzy
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr "ì¸ì¦ì„œ 파ì¼ì„ ì½ì„ 수 없습니다. 경로와 비밀번호가 정확합니까?"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "서명 오브ì íŠ¸ ìƒì„±ì¤‘ ì—러."
+
+#~ msgid "Error creating the package signature."
+#~ msgstr "패키지 ì„œëª…ì„ ìƒì„±í•˜ëŠ” 중 ì—러가 ë°œìƒí–ˆìŠµë‹ˆë‹¤."
+
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "내보내기 í…œí”Œë¦¿ì„ ì°¾ì„ ìˆ˜ 없습니다.\n"
+#~ "내보내기 í…œí”Œë¦¿ì„ ë‹¤ìš´ë¡œë“œí•˜ì—¬ 설치하십시요."
+
+#~ msgid "Custom debug package not found."
+#~ msgstr "커스텀 디버그 패키지를 ì°¾ì„ ìˆ˜ 없습니다."
+
+#~ msgid "Custom release package not found."
+#~ msgstr "커스텀 릴리즈 패키지를 ì°¾ì„ ìˆ˜ 없습니다."
+
+#~ msgid "Invalid unique name."
+#~ msgstr "유효하지 ì•Šì€ ê³ ìœ  ì´ë¦„."
+
+#~ msgid "Invalid product GUID."
+#~ msgstr "유요하지 ì•Šì€ í”„ë¡œë•íŠ¸ GUID."
+
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "유요하지 ì•Šì€ í¼ë¸”리셔 GUID."
+
+#~ msgid "Invalid background color."
+#~ msgstr "유요하지 ì•Šì€ ë°°ê²½ 색ìƒ."
+
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr "유효하지 ì•Šì€ ë¡œê³  ì´ë¯¸ì§€ í¬ê¸°ìž…니다 (50x50 ì´ì–´ì•¼ 합니다)."
+
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr "유효하지 ì•Šì€ ë¡œê³  ì´ë¯¸ì§€ í¬ê¸°ìž…니다 (44x44 ì´ì–´ì•¼ 합니다)."
+
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr "유효하지 ì•Šì€ ë¡œê³  ì´ë¯¸ì§€ í¬ê¸°ìž…니다 (71x71 ì´ì–´ì•¼ 합니다)."
+
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr "유효하지 ì•Šì€ ë¡œê³  ì´ë¯¸ì§€ í¬ê¸°ìž…니다 (150x150 ì´ì–´ì•¼ 합니다)."
+
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr "유효하지 ì•Šì€ ë¡œê³  ì´ë¯¸ì§€ í¬ê¸°ìž…니다 (310x310 ì´ì–´ì•¼ 합니다)."
+
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr "유효하지 ì•Šì€ ë¡œê³  ì´ë¯¸ì§€ í¬ê¸°ìž…니다 (310x150 ì´ì–´ì•¼ 합니다)."
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr ""
+#~ "유효하지 ì•Šì€ ìŠ¤í”Œëž˜ì‰¬ 스í¬ë¦° ì´ë¯¸ì§€ í¬ê¸°ìž…니다 (620x300 ì´ì–´ì•¼ 합니다)."
+
+#, fuzzy
+#~ msgid "RAW Mode"
+#~ msgstr "실행 모드:"
+
#~ msgid "Node From Scene"
#~ msgstr "씬으로부터 노드 가져오기"
@@ -7389,9 +8213,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "%d 회 변경ë¨."
-#~ msgid "Please save the scene first."
-#~ msgstr "먼저 ì”¬ì„ ì €ìž¥í•´ì£¼ì„¸ìš”."
-
#~ msgid "Save Translatable Strings"
#~ msgstr "번역가능한 문ìžì—´ 저장"
@@ -7578,9 +8399,6 @@ msgstr ""
#~ msgid "Script Encryption Key (256-bits as hex):"
#~ msgstr "스í¬ë¦½íŠ¸ 암호 키 (256-비트를 hex í¬ë©§ìœ¼ë¡œ):"
-#~ msgid "Export PCK/Zip"
-#~ msgstr "PCK/Zip 내보내기"
-
#~ msgid "Export Project PCK"
#~ msgstr "프로ì íŠ¸ PCK 내보내기"
@@ -7722,8 +8540,5 @@ msgstr ""
#~ msgid "Node Group(s)"
#~ msgstr "노트 그룹"
-#~ msgid "Set region_rect"
-#~ msgstr "구역 설정"
-
#~ msgid "Plugin List:"
#~ msgstr "í”ŒëŸ¬ê·¸ì¸ ëª©ë¡:"
diff --git a/editor/translations/nb.po b/editor/translations/nb.po
index 3e522bbe49..eb230cc1ac 100644
--- a/editor/translations/nb.po
+++ b/editor/translations/nb.po
@@ -146,7 +146,8 @@ msgstr "GÃ¥ til Neste Steg"
msgid "Goto Prev Step"
msgstr ""
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr ""
@@ -379,7 +380,8 @@ msgstr ""
msgid "Description:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -390,9 +392,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Lukk"
@@ -465,7 +467,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -526,17 +528,16 @@ msgid "All"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr ""
@@ -552,7 +553,7 @@ msgstr ""
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -564,7 +565,7 @@ msgstr ""
msgid "Reverse"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr ""
@@ -716,14 +717,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr ""
@@ -828,7 +829,7 @@ msgid "Resource"
msgstr ""
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr ""
@@ -908,12 +909,184 @@ msgstr ""
msgid "Delete selected files?"
msgstr ""
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Authors"
+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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "Kontinuerlig"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "Kontinuerlig"
+
+#: 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
+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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Slett Valgte"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Slett Valgte"
+
+#: 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
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Dupliser Utvalg"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "Flytt Legg til Nøkkel"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -927,21 +1100,44 @@ 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/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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: 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
@@ -1044,6 +1240,10 @@ 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 ""
@@ -1121,6 +1321,22 @@ msgstr ""
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
@@ -1246,6 +1462,15 @@ msgid "Signals:"
msgstr "Signaler:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Funksjoner:"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr ""
@@ -1262,7 +1487,7 @@ msgid "Search Text"
msgstr ""
#: editor/editor_log.cpp
-msgid " Output:"
+msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1312,6 +1537,10 @@ 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 ""
@@ -1430,11 +1659,11 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
+msgid "Save & Close"
msgstr ""
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
@@ -1446,23 +1675,27 @@ msgid "No"
msgstr ""
#: editor/editor_node.cpp
-msgid "This scene has never been saved. Save before running?"
+msgid "Yes"
msgstr ""
#: editor/editor_node.cpp
-msgid "Export Mesh Library"
+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 Tile Set"
+msgid "Export Mesh Library"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
+msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Exit the editor?"
+msgid "This operation can't be done without a selected node."
msgstr ""
#: editor/editor_node.cpp
@@ -1486,9 +1719,27 @@ msgid "Quick Run Scene.."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+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
@@ -1496,6 +1747,22 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1528,6 +1795,11 @@ msgstr ""
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 ""
@@ -1544,6 +1816,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr ""
@@ -1592,10 +1868,6 @@ msgstr ""
msgid "Close Scene"
msgstr ""
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1876,6 +2148,10 @@ msgstr ""
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1885,26 +2161,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr ""
@@ -1925,9 +2185,17 @@ 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 ""
@@ -2028,6 +2296,16 @@ msgstr ""
msgid "Re-Import Changed Resources"
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 ""
@@ -2163,10 +2441,26 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Source: "
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2175,6 +2469,18 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving file:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving dir:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2251,6 +2557,12 @@ 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 ""
@@ -2262,9 +2574,28 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Single Scene"
+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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2304,6 +2635,14 @@ 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 ""
@@ -2490,6 +2829,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3071,6 +3414,11 @@ msgid "New name:"
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Rediger Variabel:"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr ""
@@ -3382,6 +3730,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Rediger"
@@ -3414,10 +3763,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3526,11 +3871,6 @@ msgstr ""
msgid "Change default type"
msgstr ""
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr ""
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3568,6 +3908,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3607,6 +3955,18 @@ msgid "Update from Scene"
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 ""
@@ -3616,11 +3976,28 @@ msgid "Remove point"
msgstr "Fjern Funksjon"
#: 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 "Modify Curve"
+#, fuzzy
+msgid "Remove Curve Point"
+msgstr "Fjern Funksjon"
+
+#: 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
@@ -3645,6 +4022,12 @@ 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 ""
@@ -3934,6 +4317,11 @@ 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 ""
@@ -4251,6 +4639,12 @@ 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 ""
@@ -4275,6 +4669,10 @@ 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 ""
@@ -4327,6 +4725,10 @@ msgid "Close All"
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.."
@@ -4359,6 +4761,10 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+msgid "Debug with external editor"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4422,6 +4828,10 @@ msgid ""
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 ""
@@ -4468,6 +4878,11 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Slett Valgte"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4772,92 +5187,100 @@ msgid "Animation Key Inserted."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
+msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
+msgid "Material Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Forward"
+#, fuzzy
+msgid "Shader Changes"
+msgstr "Forandre"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Surface Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Backwards"
+msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
+msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Down"
+msgid "Align with view"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
+msgid "Display Normal"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
+msgid "Display Wireframe"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Material Changes"
+msgid "Display Overdraw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Shader Changes"
-msgstr "Forandre"
+msgid "Display Unshaded"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Surface Changes"
+msgid "View Environment"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
+msgid "View Gizmos"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
+msgid "View Information"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
+msgid "Doppler Enable"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
+msgid "Freelook Left"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
+msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
+msgid "Freelook Forward"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
+msgid "Freelook Backwards"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
+msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
+msgid "Freelook Down"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "preview"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
@@ -4865,6 +5288,17 @@ 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 ""
@@ -4982,6 +5416,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr ""
@@ -5110,6 +5545,10 @@ 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 ""
@@ -5167,6 +5606,15 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+msgid "Remove All Items"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Fjern Funksjon"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5234,7 +5682,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5256,11 +5704,24 @@ msgid "Color"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Fjern Utvalg"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr ""
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: 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
@@ -5296,10 +5757,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5359,7 +5816,7 @@ msgstr ""
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5406,6 +5863,22 @@ 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 ""
@@ -5442,10 +5915,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5490,6 +5959,19 @@ 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 ""
@@ -5504,10 +5986,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5535,254 +6013,284 @@ msgstr ""
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+msgid "Can't run project"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Forandre"
+
+#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Add Global Property"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Select an 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
+#, fuzzy
+msgid "Delete Item"
+msgstr "Slett Valgte"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr ""
-
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5823,6 +6331,11 @@ msgid "Assign"
msgstr ""
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Kutt Noder"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr ""
@@ -5835,6 +6348,10 @@ msgid "Error loading file: Not a resource!"
msgstr ""
#: editor/property_editor.cpp
+msgid "Selected node is not a Viewport!"
+msgstr ""
+
+#: editor/property_editor.cpp
#, fuzzy
msgid "Pick a Node"
msgstr "Lim inn Noder"
@@ -5931,6 +6448,11 @@ msgstr ""
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 ""
@@ -5974,10 +6496,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -5990,6 +6508,18 @@ 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 ""
@@ -6032,6 +6562,14 @@ msgid "Edit Connections"
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 ""
@@ -6083,6 +6621,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "Lim inn Noder"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr ""
@@ -6090,6 +6633,14 @@ msgstr ""
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 ""
@@ -6121,10 +6672,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6161,35 +6708,15 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Select a Node"
msgstr ""
-#: editor/scene_tree_editor.cpp
-msgid "Select a Node"
+#: editor/script_create_dialog.cpp
+msgid "Error loading template '%s'"
msgstr ""
#: editor/script_create_dialog.cpp
@@ -6201,6 +6728,10 @@ 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 ""
@@ -6242,10 +6773,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6410,6 +6937,10 @@ 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 ""
@@ -6491,6 +7022,126 @@ msgstr ""
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
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Slett Valgte"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Dupliser Utvalg"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+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
+#, fuzzy
+msgid "Clip Disabled"
+msgstr "Avslått"
+
+#: 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
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Forandre Utvalgskurve"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Settings"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Pick Distance:"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Tiles"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6524,6 +7175,28 @@ msgid "Stack overflow with stack depth: "
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Forandre Signal Argumenter:"
+
+#: 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
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Rediger Variabel:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Funksjoner:"
@@ -6564,31 +7237,19 @@ msgid "Add Signal"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Fjern Funksjon"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
+msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
+msgid "Add Node"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change Expression"
+msgid "Remove VisualScript Nodes"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
+msgid "Duplicate VisualScript Nodes"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
@@ -6634,6 +7295,24 @@ msgid "Add Setter Property"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Base Type"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Kopier Noder"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove VisualScript Node"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Kutt Noder"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "Betingelse"
@@ -6662,6 +7341,54 @@ msgid "Get"
msgstr "FÃ¥"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Anim Forandre Verdi"
+
+#: 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
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Lim inn Noder"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Fjern Funksjon"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Rediger Variabel:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Forandre Signal Argumenter:"
+
+#: 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 ""
@@ -6682,10 +7409,6 @@ msgid "Edit Variable:"
msgstr "Rediger Variabel:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Forandre"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Slett Valgte"
@@ -6760,14 +7483,6 @@ msgid ""
"(error)."
msgstr ""
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6788,77 +7503,6 @@ msgstr ""
msgid "Could not open template for export:\n"
msgstr ""
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -6937,6 +7581,13 @@ msgstr ""
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 ""
@@ -6959,17 +7610,32 @@ msgid ""
"as parent."
msgstr ""
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"The controller id must not be 0 or this controller will not be bound to an "
+"actual controller"
msgstr ""
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRAnchor must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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
@@ -6983,6 +7649,19 @@ msgstr ""
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 ""
@@ -6998,6 +7677,13 @@ 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 ""
@@ -7014,7 +7700,7 @@ msgid ""
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7029,22 +7715,6 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr ""
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr ""
@@ -7063,7 +7733,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
diff --git a/editor/translations/nl.po b/editor/translations/nl.po
index 212397fd88..0b8a154735 100644
--- a/editor/translations/nl.po
+++ b/editor/translations/nl.po
@@ -146,7 +146,8 @@ msgstr "Ga Naar Volgende Stap"
msgid "Goto Prev Step"
msgstr "Ga Naar Vorige Stap"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "Lineair"
@@ -381,7 +382,8 @@ msgstr "Bestand:"
msgid "Description:"
msgstr "Omschrijving:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -392,9 +394,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Sluiten"
@@ -470,7 +472,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -534,17 +536,16 @@ msgid "All"
msgstr "Alle"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "Zoeken:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "Zoeken"
@@ -560,7 +561,7 @@ msgstr "Zoeken"
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -572,7 +573,7 @@ msgstr "Sorteren:"
msgid "Reverse"
msgstr "Omkeren"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "Categorie:"
@@ -728,14 +729,14 @@ msgstr "Verbind Aan Node:"
#: 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.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
msgstr "Toevoegen"
#: 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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "Verwijderen"
@@ -845,7 +846,7 @@ msgid "Resource"
msgstr "Resource"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "Pad"
@@ -930,12 +931,190 @@ msgstr "Wees Resource Verkenner"
msgid "Delete selected files?"
msgstr "Verwijder geselecteerde bestanden?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Verwijder"
+#: 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 "Authors"
+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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "Constanten:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "Constanten:"
+
+#: 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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "Aan Het Herimporteren"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+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
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Open Audio Bus Layout"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Solo"
+msgstr "Open Audio Bus Layout"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Mute"
+msgstr "Open Audio Bus Layout"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Geselecteerde Verwijderen"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Geselecteerde Verwijderen"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "Bus Toevoegen"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Optimaliseer Animatie"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Dupliceer Selectie"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "Open Audio Bus Layout"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr "Sla Audio Bus Layout Op Als.."
@@ -949,23 +1128,49 @@ msgid "Open Audio Bus Layout"
msgstr "Open Audio Bus Layout"
#: 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 "Bus Toevoegen"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "Sla Audio Bus Layout Op Als.."
+
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "Laden"
#: 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 "Opslaan Als"
-#: editor/editor_audio_buses.cpp editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Save this Bus Layout to a file."
+msgstr "Sla Audio Bus Layout Op Als.."
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+msgid "Load Default"
msgstr "Standaard"
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Ongeldige naam."
@@ -1069,6 +1274,10 @@ msgid "Updating scene.."
msgstr "Scene aan het updaten.."
#: editor/editor_dir_dialog.cpp
+msgid "Please select a base directory first"
+msgstr ""
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "Kies een Map"
@@ -1148,6 +1357,22 @@ msgstr "Alle Bestanden (*)"
msgid "Open"
msgstr "Openen"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Open een Bestand"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Open Bestand(en)"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Open een Map"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Open een Bestand of Map"
+
#: 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
@@ -1275,6 +1500,15 @@ msgid "Signals:"
msgstr "Signalen:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Functies:"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Constanten:"
@@ -1291,7 +1525,8 @@ msgid "Search Text"
msgstr "Zoek Tekst"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " Uitvoer:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1342,6 +1577,10 @@ msgid "Creating Thumbnail"
msgstr "Thumbnail Aan Het Maken"
#: 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 ""
@@ -1462,11 +1701,12 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr ""
+#, fuzzy
+msgid "Save & Close"
+msgstr "Sla een Bestand Op"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
@@ -1478,23 +1718,27 @@ msgid "No"
msgstr ""
#: editor/editor_node.cpp
-msgid "This scene has never been saved. Save before running?"
+msgid "Yes"
msgstr ""
#: editor/editor_node.cpp
-msgid "Export Mesh Library"
+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 Tile Set"
+msgid "Export Mesh Library"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
+msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Exit the editor?"
+msgid "This operation can't be done without a selected node."
msgstr ""
#: editor/editor_node.cpp
@@ -1518,9 +1762,28 @@ msgid "Quick Run Scene.."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+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
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Sla een Bestand Op"
+
+#: 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
@@ -1528,6 +1791,22 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1560,6 +1839,11 @@ msgstr ""
msgid "Delete Layout"
msgstr ""
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+msgid "Default"
+msgstr "Standaard"
+
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
msgstr ""
@@ -1576,6 +1860,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr ""
@@ -1624,10 +1912,6 @@ msgstr ""
msgid "Close Scene"
msgstr ""
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1908,6 +2192,10 @@ msgstr ""
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1917,26 +2205,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr ""
@@ -1957,9 +2229,18 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "New Inherited"
+msgstr "Geërfd door:"
+
+#: 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
#, fuzzy
msgid "Open 2D Editor"
@@ -2064,6 +2345,16 @@ msgstr "Aan Het Herimporteren"
msgid "Re-Import Changed Resources"
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 ""
@@ -2202,10 +2493,27 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "Resource"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2214,6 +2522,20 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Error bij het opslaan van TileSet!"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Error bij het laden van:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2290,6 +2612,12 @@ 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 ""
@@ -2301,9 +2629,29 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+msgstr "Scene aan het Updaten"
+
+#: 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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2343,6 +2691,14 @@ 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
#, fuzzy
msgid " Files"
msgstr "Bestand:"
@@ -2532,6 +2888,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3114,6 +3474,11 @@ msgid "New name:"
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Bestand:"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr ""
@@ -3425,6 +3790,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Bewerken"
@@ -3457,10 +3823,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3569,11 +3931,6 @@ msgstr ""
msgid "Change default type"
msgstr ""
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "Oké"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3611,6 +3968,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3650,6 +4015,18 @@ msgid "Update from Scene"
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
#, fuzzy
msgid "Add point"
msgstr "Signaal Toevoegen"
@@ -3660,11 +4037,29 @@ msgid "Remove point"
msgstr "Verwijder Signaal"
#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Left linear"
+msgstr "Lineair"
+
+#: 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 "Modify Curve"
+#, fuzzy
+msgid "Remove Curve Point"
+msgstr "Verwijder Signaal"
+
+#: 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
@@ -3689,6 +4084,12 @@ 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 ""
@@ -3979,6 +4380,11 @@ 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 ""
@@ -4296,6 +4702,12 @@ 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 ""
@@ -4320,6 +4732,10 @@ 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 ""
@@ -4372,6 +4788,11 @@ msgid "Close All"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Scripts Panel"
+msgstr "Toggle Favoriet"
+
+#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Find.."
@@ -4404,6 +4825,11 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "Afhankelijkheden Editor"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4468,6 +4894,10 @@ msgid ""
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 ""
@@ -4514,6 +4944,11 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Verwijder"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4819,37 +5254,6 @@ msgid "Animation Key Inserted."
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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "Ga Verder"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "Achterwaarts"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "Scrollwiel Omlaag."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -4912,10 +5316,62 @@ msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Doppler Enable"
+msgstr "Inschakelen"
+
+#: 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
+#, fuzzy
+msgid "Freelook Forward"
+msgstr "Ga Verder"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Backwards"
+msgstr "Achterwaarts"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Down"
+msgstr "Scrollwiel Omlaag."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "preview"
+msgstr "Preview:"
+
+#: 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 ""
@@ -5033,6 +5489,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr ""
@@ -5161,6 +5618,10 @@ 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 ""
@@ -5218,6 +5679,16 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Verwijder Selectie"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Verwijderen"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5285,7 +5756,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5307,11 +5778,25 @@ msgid "Color"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Schaal Selectie"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr ""
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "Lineair"
+
+#: 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
@@ -5347,10 +5832,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5413,7 +5894,7 @@ msgstr "Verwijder geselecteerde bestanden?"
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5461,6 +5942,23 @@ msgid "Make Patch"
msgstr ""
#: editor/project_export.cpp
+msgid "Features"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "Methode Lijst:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr ""
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5497,10 +5995,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5545,6 +6039,19 @@ 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 ""
@@ -5559,10 +6066,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5591,254 +6094,287 @@ msgstr "Verwijder Selectie"
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Verbind.."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Wijzig"
+
+#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "As"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "Apparaat"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Knop"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "Linker Knop."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "Rechter Knop."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "Middelste Knop."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "Scrollwiel Omhoog."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "Scrollwiel Omlaag."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Getter Property Toevoegen"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "No property '"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "Aan Het Opzetten.."
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "Verwijder"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr ""
-
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5879,6 +6415,11 @@ msgid "Assign"
msgstr ""
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Alles Selecteren"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr ""
@@ -5891,6 +6432,10 @@ msgid "Error loading file: Not a resource!"
msgstr ""
#: editor/property_editor.cpp
+msgid "Selected node is not a Viewport!"
+msgstr ""
+
+#: editor/property_editor.cpp
#, fuzzy
msgid "Pick a Node"
msgstr "Plak Nodes"
@@ -5987,6 +6532,11 @@ msgstr ""
msgid "Scene Run Settings"
msgstr ""
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "Oké"
+
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
msgstr ""
@@ -6030,10 +6580,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6046,6 +6592,18 @@ 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 ""
@@ -6089,6 +6647,14 @@ msgid "Edit Connections"
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 ""
@@ -6140,6 +6706,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "Filter:"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr ""
@@ -6147,6 +6718,14 @@ msgstr ""
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 ""
@@ -6178,10 +6757,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6219,31 +6794,7 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
@@ -6252,6 +6803,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Error bij het laden van lettertype."
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "Map kon niet gemaakt worden."
@@ -6260,6 +6816,10 @@ 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 ""
@@ -6302,10 +6862,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6474,6 +7030,10 @@ 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 ""
@@ -6556,6 +7116,129 @@ msgstr "Ongeldige dictionary formaat van instantie (ongeldige script op @path)"
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "Ongeldige dictionary van instantie (ongeldige subklassen)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Geselecteerde Verwijderen"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Dupliceer Selectie"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+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
+#, fuzzy
+msgid "Clip Disabled"
+msgstr "Uitgeschakeld"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "Nieuwe Maken"
+
+#: 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
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Alleen Selectie"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Alleen Selectie"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Settings"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Pick Distance:"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "Bestand:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6595,6 +7278,30 @@ msgid "Stack overflow with stack depth: "
msgstr "Stack overloop met stack diepte: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Signaal Argumenten Bewerken:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Wijzig Array Waarde Type"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Wijzig Array Waarde"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Set Variable Default Value"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Variabele Bewerken:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Functies:"
@@ -6635,26 +7342,6 @@ msgid "Add Signal"
msgstr "Signaal Toevoegen"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Verwijder Functie"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Verwijder Variabele"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Variabele Bewerken:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Verwijder Signaal"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "Signaal Bewerken:"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
msgstr "Verander Expressie"
@@ -6663,6 +7350,15 @@ msgid "Add Node"
msgstr "Node Toevoegen"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Verwijder ongeldige keys"
+
+#: 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 ""
"Houdt Meta ingedrukt om een Getter te plaatsen. Houdt Shift ingedrukt om een "
@@ -6709,6 +7405,26 @@ msgid "Add Setter Property"
msgstr "Setter Property Toevoegen"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "Wijzig Array Waarde Type"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Kopiëer Nodes"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Verwijder Variabele"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Verbind Aan Node:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "Conditie"
@@ -6737,6 +7453,54 @@ msgid "Get"
msgstr "Krijg"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Wijzig Array Waarde"
+
+#: 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
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Plak Nodes"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Verwijder Functie"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Variabele Bewerken:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Verwijder Variabele"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Signaal Bewerken:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Verwijder Signaal"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Variabele Bewerken:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "Signaal Bewerken:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "Basis Type:"
@@ -6757,10 +7521,6 @@ msgid "Edit Variable:"
msgstr "Variabele Bewerken:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Wijzig"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Geselecteerde Verwijderen"
@@ -6837,14 +7597,6 @@ msgstr ""
"Ongeldige return waarde van _step(), moet een geheel getal (seq out) of "
"string (error) zijn."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "reeds ingedrukt"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "reeds losgelaten"
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6868,89 +7620,6 @@ msgstr "Map kon niet gemaakt worden."
msgid "Could not open template for export:\n"
msgstr "Map kon niet gemaakt worden."
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-"Kon het certificaat bestand niet lezen. Zijn het pad en wachtwoord beide "
-"correct?"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "Error bij het maken van het signatuur object."
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr "Error bij het maken van het pakket signatuur."
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"Geen export templates gevonden.\n"
-"Download en installeer export templates."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr "Custom debug pakket niet gevonden."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr "Custom release pakket niet gevonden."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr "Ongeldige unieke naam."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr "Ongeldig product GUID."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr "Ongeldige uitgever GUID."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "Ongeldige achtergrondkleur."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "Ongeldige afmetingen voor Store Logo afbeelding (moet 50×50 zijn)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-"Ongeldige afmetingen van vierkante 44×44 logo afbeelding (moet 44×44 zijn)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-"Ongeldige afmetingen van vierkante 71×71 logo afbeelding (moet 71×71 zijn)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-"Ongeldige afmetingen van vierkante 150×150 logo afbeelding (moet 150×150 "
-"zijn)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-"Ongeldige afmetingen van vierkante 310×310 logo afbeelding (moet 310×310 "
-"zijn)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-"Ongeldige afmetingen van brede 310×150 logo afbeelding (moet 310×150 zijn)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr "Ongeldige afmetingen van splash screen afbeelding (moet 620×300 zijn)."
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7056,6 +7725,13 @@ msgstr ""
msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr "PathFollow2D werkt alleen wanneer het een kind van een Path2D node is."
+#: 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 ""
@@ -7085,23 +7761,33 @@ msgstr ""
"VisibilityEnable2D werkt het beste wanneer het gebruikt wordt met de "
"aangepaste scene root direct als ouder."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"The controller id must not be 0 or this controller will not be bound to an "
+"actual controller"
msgstr ""
-"CollisionShape dient alleen om een bots vorm te bieden aan een node die "
-"afstamt van de CollisionObject node. Gebruik het alsjeblieft alleen als kind "
-"van Area, StaticBody, RigidBody, KinematicBody etc. om ze een vorm te geven."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRAnchor must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"Een vorm moet gegeven worden om CollisionShape te laten werken. Maak "
-"alsjeblieft een vorm resource voor deze!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7117,6 +7803,24 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "Een lege CollisionPolygon heeft geen effect op botsingen."
+#: 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 ""
+"CollisionShape dient alleen om een bots vorm te bieden aan een node die "
+"afstamt van de CollisionObject node. Gebruik het alsjeblieft alleen als kind "
+"van Area, StaticBody, RigidBody, KinematicBody etc. om ze een vorm te geven."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"Een vorm moet gegeven worden om CollisionShape te laten werken. Maak "
+"alsjeblieft een vorm resource voor deze!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7136,6 +7840,13 @@ 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 ""
@@ -7157,7 +7868,7 @@ msgstr ""
"eigenschap om AnimatedSprite3D frames te laten tonen."
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7172,22 +7883,6 @@ msgstr "Alarm!"
msgid "Please Confirm..."
msgstr "Bevestig Alsjeblieft..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Open een Bestand"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Open Bestand(en)"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Open een Map"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Open een Bestand of Map"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7209,7 +7904,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7227,6 +7922,83 @@ msgstr ""
"inhoud direct op het scherm te weergeven. Anders, maak er een RenderTarget "
"van en wijs zijn interne texture toe aan een node om te tonen."
+#~ msgid "just pressed"
+#~ msgstr "reeds ingedrukt"
+
+#~ msgid "just released"
+#~ msgstr "reeds losgelaten"
+
+#, fuzzy
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr ""
+#~ "Kon het certificaat bestand niet lezen. Zijn het pad en wachtwoord beide "
+#~ "correct?"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "Error bij het maken van het signatuur object."
+
+#~ msgid "Error creating the package signature."
+#~ msgstr "Error bij het maken van het pakket signatuur."
+
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "Geen export templates gevonden.\n"
+#~ "Download en installeer export templates."
+
+#~ msgid "Custom debug package not found."
+#~ msgstr "Custom debug pakket niet gevonden."
+
+#~ msgid "Custom release package not found."
+#~ msgstr "Custom release pakket niet gevonden."
+
+#~ msgid "Invalid unique name."
+#~ msgstr "Ongeldige unieke naam."
+
+#~ msgid "Invalid product GUID."
+#~ msgstr "Ongeldig product GUID."
+
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "Ongeldige uitgever GUID."
+
+#~ msgid "Invalid background color."
+#~ msgstr "Ongeldige achtergrondkleur."
+
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr "Ongeldige afmetingen voor Store Logo afbeelding (moet 50×50 zijn)."
+
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr ""
+#~ "Ongeldige afmetingen van vierkante 44×44 logo afbeelding (moet 44×44 "
+#~ "zijn)."
+
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr ""
+#~ "Ongeldige afmetingen van vierkante 71×71 logo afbeelding (moet 71×71 "
+#~ "zijn)."
+
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr ""
+#~ "Ongeldige afmetingen van vierkante 150×150 logo afbeelding (moet 150×150 "
+#~ "zijn)."
+
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr ""
+#~ "Ongeldige afmetingen van vierkante 310×310 logo afbeelding (moet 310×310 "
+#~ "zijn)."
+
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr ""
+#~ "Ongeldige afmetingen van brede 310×150 logo afbeelding (moet 310×150 "
+#~ "zijn)."
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr ""
+#~ "Ongeldige afmetingen van splash screen afbeelding (moet 620×300 zijn)."
+
#~ msgid "Node From Scene"
#~ msgstr "Node Uit Scene"
diff --git a/editor/translations/pl.po b/editor/translations/pl.po
index 79dc614836..d9234269fd 100644
--- a/editor/translations/pl.po
+++ b/editor/translations/pl.po
@@ -4,7 +4,7 @@
#
# 8-bit Pixel <dawdejw@gmail.com>, 2016.
# Adrian Węcławski <weclawskiadrian@gmail.com>, 2016.
-# Daniel Lewan <vision360.daniel@gmail.com>, 2016.
+# Daniel Lewan <vision360.daniel@gmail.com>, 2016-2017.
# Kajetan Kuszczyński <kajetanek99@gmail.com>, 2016.
# Kamil Lewan <lewan.kamil@gmail.com>, 2016.
# Karol Walasek <coreconviction@gmail.com>, 2016.
@@ -16,7 +16,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2017-06-23 19:32+0000\n"
+"PO-Revision-Date: 2017-06-26 08:24+0000\n"
"Last-Translator: Daniel Lewan <vision360.daniel@gmail.com>\n"
"Language-Team: Polish <https://hosted.weblate.org/projects/godot-engine/"
"godot/pl/>\n"
@@ -162,7 +162,8 @@ msgstr "Przejdź do następnego kroku"
msgid "Goto Prev Step"
msgstr "Przejdź do poprzedniego kroku"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "Liniowe"
@@ -401,7 +402,8 @@ msgstr "Plik"
msgid "Description:"
msgstr "Opis:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr "Instaluj"
@@ -412,9 +414,9 @@ msgstr "Instaluj"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Zamknij"
@@ -490,7 +492,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -556,17 +558,16 @@ msgid "All"
msgstr "Wszystko"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "Szukaj:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "Szukaj"
@@ -582,7 +583,7 @@ msgstr "Szukaj"
msgid "Import"
msgstr "Importuj"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "Wtyczki"
@@ -594,7 +595,7 @@ msgstr "Sortuj:"
msgid "Reverse"
msgstr "Odwróć"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "Kategoria:"
@@ -751,14 +752,14 @@ msgstr "Podłącz do węzła:"
#: 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.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
msgstr "Dodaj"
#: 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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "Usuń"
@@ -870,7 +871,7 @@ msgid "Resource"
msgstr "Zasoby"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "Ścieżka"
@@ -952,12 +953,195 @@ msgstr "Eksplorator osieroconych zasobów"
msgid "Delete selected files?"
msgstr "Usunąć zaznaczone pliki?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Usuń"
+#: editor/editor_about.cpp
+msgid "Thanks from the Godot community!"
+msgstr "Podziękowania od społeczności Godot'a!"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "Dzięki!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr ""
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "Autor:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "Menedżer projektów"
+
+#: editor/editor_about.cpp
+msgid "Lead Developer"
+msgstr ""
+
+#: editor/editor_about.cpp editor/project_manager.cpp
+msgid "Project Manager"
+msgstr "Menedżer projektów"
+
+#: editor/editor_about.cpp
+msgid "Developers"
+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
+#, fuzzy
+msgid "All Components"
+msgstr "Stałe:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "Stałe:"
+
+#: 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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "Nieskompresowany"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "Pakiet zastał zainstalowany poprawnie!"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "Pakiet zastał zainstalowany poprawnie!"
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Effect"
+msgstr "Dodaj pusty"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Otwórz układ magistrali audio"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Solo"
+msgstr "Otwórz układ magistrali audio"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Mute"
+msgstr "Otwórz układ magistrali audio"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Usuń zaznaczone"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+msgstr "Opcje debugowania"
+
+#: 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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "Duplikuj"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Usuń zaznaczone"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "Dodaj magistralÄ™"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Usuń układ"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Duplikuj animacje"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "Otwórz układ magistrali audio"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr "Zapisz układ magistrali audio jako..."
@@ -971,23 +1155,53 @@ msgid "Open Audio Bus Layout"
msgstr "Otwórz układ magistrali audio"
#: editor/editor_audio_buses.cpp
+msgid "There is no 'res://default_bus_layout.tres' file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"Błędne rozszerzenie pliku.\n"
+"Proszę użyć .fnt."
+
+#: editor/editor_audio_buses.cpp
msgid "Add Bus"
msgstr "Dodaj magistralÄ™"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "Utwórz nowy zasób"
+
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "Wczytaj"
#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Load an existing Bus Layout."
+msgstr "Wczytaj istniejący zasób i edytuj go."
+
+#: editor/editor_audio_buses.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Save As"
msgstr "Zapisz jako"
-#: editor/editor_audio_buses.cpp editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Save this Bus Layout to a file."
+msgstr "Zapisz układ magistrali audio jako..."
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+msgid "Load Default"
msgstr "Domyślny"
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Niewłaściwa nazwa."
@@ -1090,6 +1304,11 @@ msgid "Updating scene.."
msgstr "Aktualizacja sceny .."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "Proszę najpierw zapisać scenę."
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "Wybierz katalog"
@@ -1167,6 +1386,22 @@ msgstr "Wszystkie pliki (*)"
msgid "Open"
msgstr "Otwórz"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Otwórz plik"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Otwórz plik(i)"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Otwórz katalog"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Otwórz plik lub katalog"
+
#: 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
@@ -1293,6 +1528,15 @@ msgid "Signals:"
msgstr "Sygnały:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Animacje"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Stałe:"
@@ -1310,7 +1554,8 @@ msgid "Search Text"
msgstr "Wyszukaj w tekście"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " Konsola:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1360,6 +1605,11 @@ msgid "Creating Thumbnail"
msgstr "Tworzenie Miniatury"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "This operation can't be done without a tree root."
+msgstr "Ta operacja nie może zostać wykonana bez sceny."
+
+#: editor/editor_node.cpp
msgid ""
"Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."
msgstr ""
@@ -1490,26 +1740,34 @@ msgid "Quick Open Script.."
msgstr "Szybkie otwieranie skryptu.."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "Tak"
+#, fuzzy
+msgid "Save & Close"
+msgstr "Zapisz plik"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "Zamknąć scenę? (Niezapisane zmiany zostaną utracone)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
msgstr "Zapisz scenÄ™ jako.."
#: editor/editor_node.cpp
-#, fuzzy
msgid "No"
-msgstr "Węzeł"
+msgstr "Nie"
+
+#: editor/editor_node.cpp
+msgid "Yes"
+msgstr "Tak"
#: editor/editor_node.cpp
msgid "This scene has never been saved. Save before running?"
msgstr "Ta scena nie została zapisana. Zapisać przed uruchomieniem?"
+#: editor/editor_node.cpp editor/scene_tree_dock.cpp
+msgid "This operation can't be done without a scene."
+msgstr "Ta operacja nie może zostać wykonana bez sceny."
+
#: editor/editor_node.cpp
msgid "Export Mesh Library"
msgstr "Eksportuj bibliotekę Meshów"
@@ -1519,12 +1777,9 @@ msgid "Export Tile Set"
msgstr "Eksportuj TileSet"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "Wyjdź"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "Zamknąć edytor?"
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "Ta operacja nie może zostać wykonana bez sceny."
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1547,18 +1802,52 @@ msgid "Quick Run Scene.."
msgstr "Szybkie uruchomienie sceny.."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "Wyjdź"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "Zamknąć edytor?"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "Menedżer projektów"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Zapisz plik"
+
+#: 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 ""
-"Otworzyć Menedżer Projektów?\n"
-"(Niezapisane zmiany zostanÄ… utracone)"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "Wybierz główną scenę"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+msgstr ""
+
+#: editor/editor_node.cpp
#, fuzzy
msgid ""
"Scene '%s' was automatically imported, so it can't be modified.\n"
@@ -1599,6 +1888,11 @@ msgstr "Zapisz układ"
msgid "Delete Layout"
msgstr "Usuń układ"
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+msgid "Default"
+msgstr "Domyślny"
+
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
msgstr "Przełącz Zakładkę Sceny"
@@ -1615,6 +1909,11 @@ msgstr "Pozostało %d plików lub folderów"
msgid "Distraction Free Mode"
msgstr "Tryb bez rozproszeń"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "Tryb bez rozproszeń"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "Scena"
@@ -1664,10 +1963,6 @@ msgstr "Zapisz wszystkie sceny"
msgid "Close Scene"
msgstr "Zamknij scenÄ™"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr "Zamknij i przejdź do poprzedniej sceny"
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "Ostatnio otwierane"
@@ -1706,7 +2001,7 @@ msgstr ""
#: editor/editor_node.cpp
#, fuzzy
msgid "Project"
-msgstr "Nowy projekt"
+msgstr "Projekt"
#: editor/editor_node.cpp
msgid "Project Settings"
@@ -1817,9 +2112,8 @@ msgstr ""
"użyciem sieciowych systemów plików."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Editor"
-msgstr "Edycja"
+msgstr "Edytor"
#: editor/editor_node.cpp editor/settings_config_dialog.cpp
msgid "Editor Settings"
@@ -1848,9 +2142,8 @@ msgid "Classes"
msgstr "Klasy"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Online Docs"
-msgstr "Zamknij pliki pomocy"
+msgstr "Dokumentacja online"
#: editor/editor_node.cpp
msgid "Q&A"
@@ -1969,6 +2262,10 @@ msgstr "Węzeł"
msgid "Output"
msgstr "Konsola"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "Importuj ponownie"
@@ -1978,26 +2275,10 @@ msgid "Update"
msgstr "Odśwież"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "Podziękowania od społeczności Godot'a!"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "Dzięki!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "Zaimportuj Szablony z pliku ZIP"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "Wyeksportuj projekt"
@@ -2018,9 +2299,18 @@ msgid "Open & Run a Script"
msgstr "Otwórz i Uruchom Skrypt"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "New Inherited"
+msgstr "Nowa dziedziczÄ…ca scena.."
+
+#: editor/editor_node.cpp
msgid "Load Errors"
msgstr "Wczytaj błędy"
+#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
+msgid "Select"
+msgstr "Zaznacz"
+
#: editor/editor_node.cpp
#, fuzzy
msgid "Open 2D Editor"
@@ -2128,6 +2418,16 @@ msgstr "Prze-Importowanie"
msgid "Re-Import Changed Resources"
msgstr "Zaimportuj ponownie zmienione zasoby"
+#: 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 "Wpisz swojÄ… logikÄ™ w metodzie _run()."
@@ -2277,10 +2577,28 @@ msgstr "Nie można przejść do '"
#: editor/filesystem_dock.cpp
#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "Zapisz i importuj ponownie"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "Źródło:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
msgid "Same source and destination files, doing nothing."
msgstr "Pliki źródłowe i docelowe są te same, nie podjęto żadnej akcji."
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
"Ścieżki źródłowa i docelowa są takie same, żadna akcja nie została wykonana."
@@ -2291,6 +2609,20 @@ msgid "Can't move directories to within themselves."
msgstr "Nie możesz przenieść danego katalogu do jego wnętrza."
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "BÅ‚Ä…d wczytywania obrazu:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "BÅ‚Ä…d importowania:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr "Nie można operować na '..'"
@@ -2367,6 +2699,12 @@ msgid "Instance the selected scene(s) as child of the selected node."
msgstr "Utwórz instancje wybranej sceny/scen jako dziecko wybranego węzła."
#: editor/filesystem_dock.cpp
+msgid ""
+"Scanning Files,\n"
+"Please Wait.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Move"
msgstr "PrzenieÅ›"
@@ -2378,10 +2716,31 @@ msgstr "Dodaj do Grupy"
msgid "Remove from Group"
msgstr "Usuń z Grupy"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "Powierzchnia %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+msgstr "Importowanie Sceny.."
+
+#: 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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "Zaimportuj Scene 3D"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2422,6 +2781,14 @@ msgid "Saving.."
msgstr "Zapisywanie.."
#: 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
#, fuzzy
msgid " Files"
msgstr "Plik"
@@ -2613,6 +2980,10 @@ msgstr "Źródło Mesh:"
msgid "Mesh"
msgstr "Siatka"
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "Powierzchnia %d"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr "Brak sampli do importu!"
@@ -3201,6 +3572,11 @@ msgid "New name:"
msgstr "Nowa nazwa:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Edytuj filtry węzłów"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr "Skala:"
@@ -3517,6 +3893,7 @@ msgstr "Odblokuj selekcję węzłów podrzędnych."
#: 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Edycja"
@@ -3549,10 +3926,6 @@ msgid "Use Pixel Snap"
msgstr "Użyj krokowania na poziomie pikseli"
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr "Szkielet.."
@@ -3665,11 +4038,6 @@ msgstr "Ta operacja wymaga pojedynczego wybranego węzła."
msgid "Change default type"
msgstr "Zmień Wartość Domyślną"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "OK"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3709,6 +4077,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr "Utwórz nowy wielokąt."
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3749,6 +4125,21 @@ msgstr "Aktualizuj ze sceny"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Modify Curve Point"
+msgstr "Zamknij krzywÄ…"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "Zamknij krzywÄ…"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Load Curve Preset"
+msgstr "Wczytaj Zasób"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Add point"
msgstr "Dodaj Wejście"
@@ -3759,13 +4150,31 @@ msgstr "Usuń punkt ścieżki"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Left linear"
+msgstr "Liniowe"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Right linear"
+msgstr "Widok z prawej"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Load preset"
msgstr "Wczytaj Zasób"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
-msgid "Modify Curve"
-msgstr "Zamknij krzywÄ…"
+msgid "Remove Curve Point"
+msgstr "Usuń punkt ścieżki"
+
+#: 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"
@@ -3789,6 +4198,12 @@ msgid "Item List Editor"
msgstr "Edytor listy elementów"
#: 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 "Stwórz Occluder Polygon"
@@ -4083,6 +4498,12 @@ msgid "Load Emission Mask"
msgstr "Wczytaj maskÄ™ emisji"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
+msgid "Particles"
+msgstr "Wierzchołek"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
msgstr "Wygeneruj chmurę punktów:"
@@ -4410,6 +4831,12 @@ msgid "Clear Recent Files"
msgstr "Wyczyść Kości"
#: 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 "BÅ‚Ä…d podczas zapisywania motywu"
@@ -4434,6 +4861,10 @@ msgid "Save Theme As.."
msgstr "Zapisz motyw jako.."
#: editor/plugins/script_editor_plugin.cpp
+msgid " Class Reference"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Next script"
msgstr "Następny skrypt"
@@ -4487,6 +4918,11 @@ msgid "Close All"
msgstr "Zamknij"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Scripts Panel"
+msgstr "Ustaw jako ulubione"
+
+#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Find.."
@@ -4522,6 +4958,11 @@ msgid "Keep Debugger Open"
msgstr "Pozostaw Debugger otwarty"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "Otwórz w edytorze"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr "Okno"
@@ -4591,6 +5032,10 @@ msgstr ""
"należą"
#: editor/plugins/script_text_editor.cpp
+msgid "Only resources from filesystem can be dropped."
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Pick Color"
msgstr "Kolor"
@@ -4639,6 +5084,11 @@ msgid "Move Down"
msgstr "Przesuń w dół"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Usuń Punkt"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr "Wcięcie w lewo"
@@ -4945,37 +5395,6 @@ msgid "Animation Key Inserted."
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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "Dalej"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "Wstecz"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "Kółko myszy w dół."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -5043,10 +5462,63 @@ msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Doppler Enable"
+msgstr "WÅ‚Ä…cz"
+
+#: 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
+#, fuzzy
+msgid "Freelook Forward"
+msgstr "Dalej"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Backwards"
+msgstr "Wstecz"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Down"
+msgstr "Kółko myszy w dół."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "preview"
+msgstr "PodglÄ…d"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr "Okno dialogowe XForm"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "Tryb zaznaczenia"
+
+#: 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 "Tryb Przesuwania (W)"
@@ -5167,6 +5639,7 @@ msgid "View Grid"
msgstr "Pokaż siatkę"
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "Ustawienia"
@@ -5295,6 +5768,11 @@ msgid "StyleBox Preview:"
msgstr "PodglÄ…d StyleBox:"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
+msgid "Set Region Rect"
+msgstr "Edytor regionu tekstury"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
msgstr "Tryb przyciÄ…gania:"
@@ -5353,6 +5831,16 @@ msgstr "Usuń element"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
+msgid "Remove All Items"
+msgstr "Usuń klasę elementów"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Usuń"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "Theme"
msgstr "Zapisz motyw"
@@ -5421,7 +5909,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr "Typ:"
@@ -5443,12 +5931,27 @@ msgid "Color"
msgstr "Kolor"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Usuń zaznaczenie"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr "Maluj TileMap"
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "Duplikuj"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "Liniowe"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Bucket Fill"
+msgstr "Wiadro"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5483,10 +5986,6 @@ msgid "Pick Tile"
msgstr "Wybierz tile"
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr "Zaznacz"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr "Obróć o 0 stopni"
@@ -5549,7 +6048,7 @@ msgstr "Usunąć zaznaczone pliki?"
msgid "Presets"
msgstr "Profile eksportu"
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "Dodaj.."
@@ -5605,6 +6104,24 @@ msgid "Make Patch"
msgstr "Ścieżka docelowa:"
#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "Tekstura"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "Lista metod:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr "Eksport PCK/Zip"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr "Brakuje eksportu szablonów dla tej platformy:"
@@ -5645,10 +6162,6 @@ msgid "The following files failed extraction from package:"
msgstr "Nie powiodło się wypakowanie z pakietu następujących plików:"
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr "Pakiet zastał zainstalowany poprawnie!"
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "Importuj istniejÄ…cy projekt"
@@ -5693,6 +6206,22 @@ msgid "Are you sure to open more than one project?"
msgstr "Czy jesteś pewny że chcesz otworzyć więcej niż jeden projekt?"
#: 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 ""
+"Nie zdefiniowano głównej sceny, chcesz jakąś wybrać?\n"
+"Można to później zmienić w \"Ustawienia projektu\" w kategorii \"aplikacja\"."
+
+#: 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 "Czy jesteś pewny że chcesz uruchomić więcej niż jeden projekt?"
@@ -5709,10 +6238,6 @@ msgstr ""
"Potwierdzasz?"
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr "Menedżer projektów"
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr "Lista projektów"
@@ -5735,264 +6260,297 @@ msgstr "Nowy projekt"
#: editor/project_manager.cpp
#, fuzzy
msgid "Templates"
-msgstr "Usuń element"
+msgstr "Szablony"
#: editor/project_manager.cpp
msgid "Exit"
msgstr "Wyjdź"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Połącz.."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "Klawisz "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr "Przycisk joysticka"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr "OÅ› joysticka"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr "Przycisk myszy"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr "Akcja %s już istnieje!"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr "Zmień nazwę zdarzenia akcji wejścia"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr "Dodaj zdarzenie akcji wejścia"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr "Control+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "Naciśnij klawisz.."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr "Indeks przycisku myszy:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr "Lewy guzik"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr "Prawy guzik"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr "Åšrodkowy guzik"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr "Kółko myszy w górę"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr "Kółko myszy w dół"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr "Przycisk 6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr "Przycisk 7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr "Przycisk 8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr "Przycisk 9"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Zmień"
+
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Axis Index:"
msgstr "OÅ› joysticka"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "OÅ›"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Button Index:"
msgstr "Przycisk joysticka"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr "Dodawanie akcji Wejścia"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr "Wyczyść zdarzenie akcji wejścia"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Add Event"
msgstr "Dodaj pusty"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "UrzÄ…dzenie"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Przycisk"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "Lewy przycisk."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "Prawy przycisk."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "Åšrodkowy przycisk."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "Kółko myszy w górę."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "Kółko myszy w dół."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Add Global Property"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "No property '"
+msgstr "Właściwość:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "Ustawienia"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "Usuń"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "Błąd zapisu ustawień."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "Ustawienia zapisane pomyślnie."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr "Dodaj tłumaczenie"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "Usuń tłumaczenie"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr "Dodaj zmapowaną ścieżkę"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr "Zmień język mapowania zasobu"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr "Usuń mapowanie zasobu"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr "Usuń opcję mapowania zasobu"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Ustawienia projektu (engine.cfg)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr "Ogólny"
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr "Właściwość:"
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr "Usuń"
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr "Kopiuj na platformÄ™..."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
+msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr "Mapowanie wejścia"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr "Akcja:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr "UrzÄ…dzenie:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr "Indeks:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr "Lokalizacja"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr "TÅ‚umaczenia"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr "TÅ‚umaczenia:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr "Mapowanie zasobów"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr "Zasoby:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr "Mapowanie w zależności od lokalizacji:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr "Lokalizacja"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "AutoLoad"
msgstr "Autoładowanie"
@@ -6034,6 +6592,11 @@ msgid "Assign"
msgstr "Przypisz"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Wybierz węzeł"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr "Nowy skrypt"
@@ -6048,6 +6611,11 @@ msgstr "BÅ‚Ä…d wczytania pliku: Brak zasobu!"
#: editor/property_editor.cpp
#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "Wybierz węzły do importu"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "Pick a Node"
msgstr "Wybierz węzeł"
@@ -6147,6 +6715,11 @@ msgstr "Argumenty głównej sceny:"
msgid "Scene Run Settings"
msgstr "Ustawienia uruchomienia sceny"
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "OK"
+
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
msgstr "Brak elementu nadrzędnego do stworzenia instancji sceny."
@@ -6191,10 +6764,6 @@ msgid "Delete Node(s)?"
msgstr "Usuń węzeł(y)?"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "Ta operacja nie może zostać wykonana bez sceny."
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6207,6 +6776,19 @@ msgid "Save New Scene As.."
msgstr "Zapisz nowÄ… scenÄ™ jako ..."
#: editor/scene_tree_dock.cpp
+msgid "Editable Children"
+msgstr "Edytowalne dzieci"
+
+#: editor/scene_tree_dock.cpp
+msgid "Load As Placeholder"
+msgstr "Wczytaj jako zastępczy"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Discard Instancing"
+msgstr "Odrzuć instancjonowanie"
+
+#: editor/scene_tree_dock.cpp
msgid "Makes Sense!"
msgstr "To ma sens!"
@@ -6253,6 +6835,14 @@ msgid "Edit Connections"
msgstr "Edytuj Połączenia"
#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance"
+msgstr "Wyczyść dziedziczenie"
+
+#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
+msgid "Open in Editor"
+msgstr "Otwórz w edytorze"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)"
msgstr "Usuń węzeł (węzły)"
@@ -6309,6 +6899,11 @@ msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "Filter nodes"
+msgstr "Filtry"
+
+#: editor/scene_tree_dock.cpp
+#, fuzzy
msgid "Attach a new or existing script for the selected node."
msgstr "Utwórz nowy skrypt dla zaznaczonego węzła."
@@ -6317,6 +6912,14 @@ msgstr "Utwórz nowy skrypt dla zaznaczonego węzła."
msgid "Clear a script for the selected node."
msgstr "Utwórz nowy skrypt dla zaznaczonego węzła."
+#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance? (No Undo!)"
+msgstr "Wyczyścić dziedziczenie? (Nie można cofnąć!)"
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear!"
+msgstr "Czysto!"
+
#: editor/scene_tree_editor.cpp
msgid "Toggle Spatial Visible"
msgstr "Przełącz widoczność Spatial"
@@ -6348,11 +6951,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "Opcje debugowania"
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr "Instancja:"
@@ -6391,33 +6989,8 @@ msgid "Scene Tree (Nodes):"
msgstr "Drzewo sceny (węzły):"
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr "Edytowalne dzieci"
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr "Wczytaj jako zastępczy"
-
-#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Discard Instancing"
-msgstr "Odrzuć instancjonowanie"
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr "Otwórz w edytorze"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr "Wyczyść dziedziczenie"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr "Wyczyścić dziedziczenie? (Nie można cofnąć!)"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr "Czysto!"
+msgid "Node Configuration Warning!"
+msgstr ""
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -6425,6 +6998,11 @@ msgstr "Wybierz węzeł"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "BÅ‚Ä…d wczytywania obrazu:"
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "Nie można było utworzyć skryptu w systemie plików."
@@ -6434,6 +7012,10 @@ msgid "Error loading script from %s"
msgstr "BÅ‚Ä…d przy Å‚adowaniu sceny z %s"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "N/A"
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "Ścieżka jest pusta"
@@ -6477,10 +7059,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr "N/A"
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6507,7 +7085,7 @@ msgstr "Nazwa klasy:"
#: editor/script_create_dialog.cpp
#, fuzzy
msgid "Template"
-msgstr "Usuń element"
+msgstr "Szablon"
#: editor/script_create_dialog.cpp
#, fuzzy
@@ -6652,6 +7230,10 @@ msgid "Change Light Radius"
msgstr "Zmień promień światła"
#: editor/spatial_editor_gizmos.cpp
+msgid "Change AudioStreamPlayer3D Emission Angle"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
msgstr "Zmień Pole Widzenia Kamery"
@@ -6736,6 +7318,137 @@ msgstr "Niepoprawna instancja formatu słownika (niepoprawny skrypt w @path)"
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "Niepoprawna instancja słownika (niepoprawne podklasy)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Usuń zaznaczone"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Duplikuj zaznaczone"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Snap View"
+msgstr "Widok z góry"
+
+#: 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
+#, fuzzy
+msgid "Clip Disabled"
+msgstr "Wyłączone"
+
+#: 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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "Ctrl: Obróć"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "Ctrl: Obróć"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Z"
+msgstr "Ctrl: Obróć"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "Utwórz nowy"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "Utwórz nowy projekt"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Area"
+msgstr "Wyczyść TileMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Tylko zaznaczenie"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Tylko zaznaczenie"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "Ustawienia przyciÄ…gania"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "Instancja:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "Plik"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6769,6 +7482,31 @@ msgid "Stack overflow with stack depth: "
msgstr "Przepełnienie stosu z głębokością stosu: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Edytuj argumenty sygnału:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Zmień Typ Tablicy"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Zmień nazwę animacji:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Default Value"
+msgstr "Zmień Wartość Domyślną"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Edytuj zmiennÄ…:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Funkcje:"
@@ -6809,26 +7547,6 @@ msgid "Add Signal"
msgstr "Dodaj sygnał"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Usuń funkcję"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Usuń zmienną"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Edytuj zmiennÄ…:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Usuń sygnał"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "Edytuj sygnał:"
-
-#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Change Expression"
msgstr "Zmień typ"
@@ -6838,6 +7556,16 @@ msgid "Add Node"
msgstr "Dodaj węzeł"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Usuń wadliwe klatki kluczowe"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Duplicate VisualScript Nodes"
+msgstr "Duplikuj węzeł(y)"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
@@ -6880,6 +7608,26 @@ msgstr ""
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
+msgid "Change Base Type"
+msgstr "Zmień typ"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Usuń węzeł(y)"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Usuń węzeł Shader Graph"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Podłącz do węzła:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
msgid "Condition"
msgstr "Skopiuj animacje"
@@ -6911,6 +7659,56 @@ msgid "Get"
msgstr "Ustaw"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Zmień Wartość Domyślną"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "Nie można operować na '..'"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "Schowka zasobów jest pusty!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Wklej PozÄ™"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Usuń funkcję"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Edytuj zmiennÄ…:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Usuń zmienną"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Edytuj sygnał:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Usuń sygnał"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Edytuj zmiennÄ…:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "Edytuj sygnał:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "Typ bazowy:"
@@ -6931,10 +7729,6 @@ msgid "Edit Variable:"
msgstr "Edytuj zmiennÄ…:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Zmień"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Usuń zaznaczone"
@@ -7013,14 +7807,6 @@ msgid ""
"(error)."
msgstr ""
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Run in Browser"
@@ -7045,82 +7831,6 @@ msgstr "Nie można utworzyć katalogu."
msgid "Could not open template for export:\n"
msgstr "Nie można utworzyć katalogu."
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Error creating the signature object."
-msgstr "BÅ‚Ä…d przy eksporcie projektu!"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid unique name."
-msgstr "Niewłaściwa nazwa."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid product GUID."
-msgstr "Niepoprawny rozmiar fonta."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid publisher GUID."
-msgstr "Niepoprawna ścieżka bazowa"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "Kolor tła nieprawidłowy."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-"Nieprawidłowe wymiary obrazka ekranu powitalnego (powinno być 620x300)."
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7220,6 +7930,13 @@ msgstr ""
msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr "PathFollow2D zadziała tylko wtedy, gdy będzie dzieckiem węzeł Path2D."
+#: 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 "Żeby zadziałało, pole Path musi wskazywać na istniejący węzeł Node2D."
@@ -7249,23 +7966,33 @@ msgstr ""
"VisibilityEnable2D działa najlepiej, gdy jest bezpośrednio pod korzeniem "
"aktualnie edytowanej sceny."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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 ""
-"CollisionShape służy jedynie do określenia kształtu kolizji dla jednego z "
-"węzłów dziedziczących z CollisionObject. Używaj go tylko jako dziecko węzłów "
-"typu Area, StaticBody, RigidBody, KinematicBody itd."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"Kształt musi być określony dla CollisionShape, aby spełniał swoje zadanie. "
-"Utwórz zasób typu CollisionShape w odpowiednim polu obiektu!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7281,6 +8008,24 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "Pusty CollisionPolygon nie wpływa na efekty kolizji."
+#: 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 ""
+"CollisionShape służy jedynie do określenia kształtu kolizji dla jednego z "
+"węzłów dziedziczących z CollisionObject. Używaj go tylko jako dziecko węzłów "
+"typu Area, StaticBody, RigidBody, KinematicBody itd."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"Kształt musi być określony dla CollisionShape, aby spełniał swoje zadanie. "
+"Utwórz zasób typu CollisionShape w odpowiednim polu obiektu!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7300,6 +8045,13 @@ 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
#, fuzzy
msgid "Path property must point to a valid Spatial node to work."
@@ -7323,8 +8075,8 @@ msgstr ""
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
-msgstr "Tryb uruchamiania:"
+msgid "Raw Mode"
+msgstr "Tryb przesuwania"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
@@ -7338,22 +8090,6 @@ msgstr "Alarm!"
msgid "Please Confirm..."
msgstr "Proszę potwierdzić..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Otwórz plik"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Otwórz plik(i)"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Otwórz katalog"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Otwórz plik lub katalog"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7379,7 +8115,7 @@ msgstr ""
"Użyj kontenera jako dziecko (VBox,HBox,etc), lub węzła klasy Control i ustaw "
"ręcznie minimalny rozmiar."
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7397,6 +8133,52 @@ msgstr ""
"otrzymał jakiś rozmiar. W przeciwnym wypadku ustawi opcję RenderTarget i "
"przyporządkuj jego teksturę dla któregoś węzła."
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "Zamknąć scenę? (Niezapisane zmiany zostaną utracone)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "Otworzyć Menedżer Projektów?\n"
+#~ "(Niezapisane zmiany zostanÄ… utracone)"
+
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "Zamknij i przejdź do poprzedniej sceny"
+
+#~ msgid "Del"
+#~ msgstr "Usuń"
+
+#~ msgid "Copy To Platform.."
+#~ msgstr "Kopiuj na platformÄ™..."
+
+#, fuzzy
+#~ msgid "Error creating the signature object."
+#~ msgstr "BÅ‚Ä…d przy eksporcie projektu!"
+
+#, fuzzy
+#~ msgid "Invalid unique name."
+#~ msgstr "Niewłaściwa nazwa."
+
+#, fuzzy
+#~ msgid "Invalid product GUID."
+#~ msgstr "Niepoprawny rozmiar fonta."
+
+#, fuzzy
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "Niepoprawna ścieżka bazowa"
+
+#~ msgid "Invalid background color."
+#~ msgstr "Kolor tła nieprawidłowy."
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr ""
+#~ "Nieprawidłowe wymiary obrazka ekranu powitalnego (powinno być 620x300)."
+
+#, fuzzy
+#~ msgid "RAW Mode"
+#~ msgstr "Tryb uruchamiania:"
+
#~ msgid "Node From Scene"
#~ msgstr "Węzeł ze Sceny"
@@ -7479,9 +8261,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "Zastąpiono %d wystąpień."
-#~ msgid "Please save the scene first."
-#~ msgstr "Proszę najpierw zapisać scenę."
-
#~ msgid "Install Export Templates"
#~ msgstr "Zainstaluj Szablony Eksportu"
@@ -7618,9 +8397,6 @@ msgstr ""
#~ msgid "Script Encryption Key (256-bits as hex):"
#~ msgstr "Klucz szyfrujÄ…cy skryptu (256-bit jako hex):"
-#~ msgid "Export PCK/Zip"
-#~ msgstr "Eksport PCK/Zip"
-
#~ msgid "Export Project PCK"
#~ msgstr "Eksport projektu PCK"
diff --git a/editor/translations/pr.po b/editor/translations/pr.po
index 905c263061..418072c117 100644
--- a/editor/translations/pr.po
+++ b/editor/translations/pr.po
@@ -145,7 +145,8 @@ msgstr ""
msgid "Goto Prev Step"
msgstr ""
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr ""
@@ -377,7 +378,8 @@ msgstr ""
msgid "Description:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -388,9 +390,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Close"
@@ -463,7 +465,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -524,17 +526,16 @@ msgid "All"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr ""
@@ -550,7 +551,7 @@ msgstr ""
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -562,7 +563,7 @@ msgstr ""
msgid "Reverse"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr ""
@@ -714,14 +715,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr ""
@@ -826,7 +827,7 @@ msgid "Resource"
msgstr ""
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr ""
@@ -906,12 +907,181 @@ msgstr ""
msgid "Delete selected files?"
msgstr ""
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Authors"
+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 "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
+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
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Rename Function"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Yar, Blow th' Selected Down!"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Yar, Blow th' Selected Down!"
+
+#: 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 "Move Audio Bus"
+msgstr ""
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -925,21 +1095,44 @@ 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/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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: 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
@@ -1042,6 +1235,10 @@ 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 ""
@@ -1119,6 +1316,22 @@ msgstr ""
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
@@ -1244,6 +1457,15 @@ msgid "Signals:"
msgstr "Yer signals:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Yer functions:"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr ""
@@ -1260,7 +1482,7 @@ msgid "Search Text"
msgstr ""
#: editor/editor_log.cpp
-msgid " Output:"
+msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1310,6 +1532,10 @@ 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 ""
@@ -1428,11 +1654,11 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
+msgid "Save & Close"
msgstr ""
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
@@ -1444,23 +1670,27 @@ msgid "No"
msgstr ""
#: editor/editor_node.cpp
-msgid "This scene has never been saved. Save before running?"
+msgid "Yes"
msgstr ""
#: editor/editor_node.cpp
-msgid "Export Mesh Library"
+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 Tile Set"
+msgid "Export Mesh Library"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
+msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Exit the editor?"
+msgid "This operation can't be done without a selected node."
msgstr ""
#: editor/editor_node.cpp
@@ -1484,9 +1714,27 @@ msgid "Quick Run Scene.."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+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
@@ -1494,6 +1742,22 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1526,6 +1790,11 @@ msgstr ""
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 ""
@@ -1542,6 +1811,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr ""
@@ -1590,10 +1863,6 @@ msgstr ""
msgid "Close Scene"
msgstr ""
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1874,6 +2143,10 @@ msgstr ""
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1883,26 +2156,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr ""
@@ -1923,9 +2180,17 @@ 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 ""
@@ -2026,6 +2291,16 @@ msgstr ""
msgid "Re-Import Changed Resources"
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 ""
@@ -2163,10 +2438,26 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Source: "
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2175,6 +2466,18 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving file:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving dir:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2251,6 +2554,12 @@ 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 ""
@@ -2262,9 +2571,28 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Single Scene"
+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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2304,6 +2632,14 @@ 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 ""
@@ -2490,6 +2826,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3071,6 +3411,11 @@ msgid "New name:"
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Edit yer Variable:"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr ""
@@ -3382,6 +3727,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Edit"
@@ -3414,10 +3760,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3526,11 +3868,6 @@ msgstr ""
msgid "Change default type"
msgstr ""
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr ""
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3568,6 +3905,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3607,6 +3952,18 @@ msgid "Update from Scene"
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
#, fuzzy
msgid "Add point"
msgstr "Add Signal"
@@ -3617,11 +3974,28 @@ msgid "Remove point"
msgstr "Discharge ye' Signal"
#: 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 "Modify Curve"
+#, fuzzy
+msgid "Remove Curve Point"
+msgstr "Discharge ye' Signal"
+
+#: 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
@@ -3646,6 +4020,12 @@ 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 ""
@@ -3935,6 +4315,11 @@ 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 ""
@@ -4252,6 +4637,12 @@ 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 ""
@@ -4276,6 +4667,10 @@ 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 ""
@@ -4328,6 +4723,10 @@ msgid "Close All"
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.."
@@ -4360,6 +4759,10 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+msgid "Debug with external editor"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4423,6 +4826,10 @@ msgid ""
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 ""
@@ -4469,6 +4876,11 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Yar, Blow th' Selected Down!"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4773,92 +5185,100 @@ msgid "Animation Key Inserted."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
+msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
+msgid "Material Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Forward"
+#, fuzzy
+msgid "Shader Changes"
+msgstr "Change"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Surface Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Backwards"
+msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
+msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Down"
+msgid "Align with view"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
+msgid "Display Normal"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
+msgid "Display Wireframe"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Material Changes"
+msgid "Display Overdraw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Shader Changes"
-msgstr "Change"
+msgid "Display Unshaded"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Surface Changes"
+msgid "View Environment"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
+msgid "View Gizmos"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
+msgid "View Information"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
+msgid "Doppler Enable"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
+msgid "Freelook Left"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
+msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
+msgid "Freelook Forward"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
+msgid "Freelook Backwards"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
+msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
+msgid "Freelook Down"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "preview"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
@@ -4866,6 +5286,17 @@ 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 ""
@@ -4983,6 +5414,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr ""
@@ -5111,6 +5543,10 @@ 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 ""
@@ -5168,6 +5604,16 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Discharge ye' Variable"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Discharge ye' Signal"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5235,7 +5681,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5257,11 +5703,23 @@ 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 editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: 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
@@ -5297,10 +5755,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5360,7 +5814,7 @@ msgstr ""
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5407,6 +5861,22 @@ 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 ""
@@ -5443,10 +5913,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5491,6 +5957,19 @@ 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 ""
@@ -5505,10 +5984,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5537,254 +6012,285 @@ msgstr "Discharge ye' Variable"
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+msgid "Can't run project"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Change"
+
+#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Add yer Getter Property"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an 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
+#, fuzzy
+msgid "Delete Item"
+msgstr "Yar, Blow th' Selected Down!"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr ""
-
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5825,6 +6331,11 @@ msgid "Assign"
msgstr ""
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Slit th' Node"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr ""
@@ -5837,6 +6348,10 @@ msgid "Error loading file: Not a resource!"
msgstr ""
#: editor/property_editor.cpp
+msgid "Selected node is not a Viewport!"
+msgstr ""
+
+#: editor/property_editor.cpp
#, fuzzy
msgid "Pick a Node"
msgstr "Paste yer Node"
@@ -5933,6 +6448,11 @@ msgstr ""
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 ""
@@ -5976,10 +6496,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -5992,6 +6508,18 @@ 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 ""
@@ -6034,6 +6562,14 @@ msgid "Edit Connections"
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 ""
@@ -6085,6 +6621,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "Paste yer Node"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr ""
@@ -6092,6 +6633,14 @@ msgstr ""
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 ""
@@ -6123,10 +6672,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6163,31 +6708,7 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
@@ -6195,6 +6716,11 @@ msgid "Select a Node"
msgstr ""
#: editor/script_create_dialog.cpp
+#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Blimey! I can't make th' signature object!"
+
+#: editor/script_create_dialog.cpp
msgid "Error - Could not create script in filesystem."
msgstr ""
@@ -6203,6 +6729,10 @@ 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 ""
@@ -6245,10 +6775,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6414,6 +6940,10 @@ 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 ""
@@ -6500,6 +7030,123 @@ msgid "Invalid instance dictionary (invalid subclasses)"
msgstr ""
"Ye got th' wrong dictionary getup! (yer subclasses be walkin' the plank!)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Yar, Blow th' Selected Down!"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Duplicate Selection"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+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/gridmap/grid_map_editor_plugin.cpp
+msgid "Tiles"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6539,6 +7186,28 @@ msgid "Stack overflow with stack depth: "
msgstr "Avast! Yer stack has burst! Her depth be: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Edit ye Signal Arguments:"
+
+#: 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
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Edit yer Variable:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Yer functions:"
@@ -6580,26 +7249,6 @@ msgid "Add Signal"
msgstr "Add Signal"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Discharge ye' Function"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Discharge ye' Variable"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Ye be fixin' Variable:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Discharge ye' Signal"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "Ye be fixin' Signal:"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
msgstr "Swap yer Expression"
@@ -6608,6 +7257,15 @@ msgid "Add Node"
msgstr "Add Node"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Discharge ye' Variable"
+
+#: 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 ""
"Smash yer Meta key t' sink yer Getter. Smash yer Shift t' sink a generic "
@@ -6652,6 +7310,26 @@ msgid "Add Setter Property"
msgstr "Add yer Setter Property"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "th' Base Type:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Forge yer Node!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Discharge ye' Variable"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Slit th' Node"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "Condition"
@@ -6680,6 +7358,53 @@ msgid "Get"
msgstr "Get"
#: 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
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Paste yer Node"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Discharge ye' Function"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Edit yer Variable:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Discharge ye' Variable"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Ye be fixin' Signal:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Discharge ye' Signal"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Ye be fixin' Variable:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "Ye be fixin' Signal:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "th' Base Type:"
@@ -6700,10 +7425,6 @@ msgid "Edit Variable:"
msgstr "Edit yer Variable:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Change"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Yar, Blow th' Selected Down!"
@@ -6779,14 +7500,6 @@ msgstr ""
"Yer return value from _step() be no good! She must be th' integer (seq out) "
"or th' string (error)."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "just smashed"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "just released"
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6807,81 +7520,6 @@ msgstr ""
msgid "Could not open template for export:\n"
msgstr ""
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-"Blimey! I can't read th' certificate file! Are yer path n' password trusty?"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "Blimey! I can't make th' signature object!"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr "Blimey! I can't create th' package signature."
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"Ye got no export templates!\n"
-"Download and install yer export templates."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr "Yer fancy debug package be nowhere."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr "Yer fancy release package be nowhere."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr "Yer unique name be evil."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr "Yer product GUID be evil."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr "Yer publisher GUID be evil! Walk th' plank!"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "Yer background color be evil!"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "Yer Store Logo got th' wrong dimensions! She should be 50x50 I reckon."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr "Yer square 44x44 logo image dimensions aint' 44x44!"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr "Yer square 71x71 logo image dimensions aint' 71x71!"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr "Yer square 150x150 logo image dimensions aint' 150x150!"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr "Yer square 310x310 logo image dimensions aint' 310x310!"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr "Yer wide 310x150 logo image dimensions aint' 310x150!"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr "Yer splash screen image dimensions aint' 620x300!"
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -6960,6 +7598,13 @@ msgstr ""
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 ""
@@ -6982,17 +7627,32 @@ msgid ""
"as parent."
msgstr ""
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"The controller id must not be 0 or this controller will not be bound to an "
+"actual controller"
msgstr ""
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRAnchor must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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
@@ -7006,6 +7666,19 @@ msgstr ""
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 ""
@@ -7021,6 +7694,13 @@ 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 ""
@@ -7037,7 +7717,7 @@ msgid ""
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7052,22 +7732,6 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr ""
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr ""
@@ -7086,7 +7750,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7100,6 +7764,73 @@ msgid ""
"texture to some node for display."
msgstr ""
+#~ msgid "just pressed"
+#~ msgstr "just smashed"
+
+#~ msgid "just released"
+#~ msgstr "just released"
+
+#, fuzzy
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr ""
+#~ "Blimey! I can't read th' certificate file! Are yer path n' password "
+#~ "trusty?"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "Blimey! I can't make th' signature object!"
+
+#~ msgid "Error creating the package signature."
+#~ msgstr "Blimey! I can't create th' package signature."
+
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "Ye got no export templates!\n"
+#~ "Download and install yer export templates."
+
+#~ msgid "Custom debug package not found."
+#~ msgstr "Yer fancy debug package be nowhere."
+
+#~ msgid "Custom release package not found."
+#~ msgstr "Yer fancy release package be nowhere."
+
+#~ msgid "Invalid unique name."
+#~ msgstr "Yer unique name be evil."
+
+#~ msgid "Invalid product GUID."
+#~ msgstr "Yer product GUID be evil."
+
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "Yer publisher GUID be evil! Walk th' plank!"
+
+#~ msgid "Invalid background color."
+#~ msgstr "Yer background color be evil!"
+
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr ""
+#~ "Yer Store Logo got th' wrong dimensions! She should be 50x50 I reckon."
+
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr "Yer square 44x44 logo image dimensions aint' 44x44!"
+
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr "Yer square 71x71 logo image dimensions aint' 71x71!"
+
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr "Yer square 150x150 logo image dimensions aint' 150x150!"
+
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr "Yer square 310x310 logo image dimensions aint' 310x310!"
+
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr "Yer wide 310x150 logo image dimensions aint' 310x150!"
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr "Yer splash screen image dimensions aint' 620x300!"
+
#~ msgid ""
#~ "Paths cannot start with '/', absolute paths must start with 'res://', "
#~ "'user://', or 'local://'"
diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po
index b812b6f8ef..7d0ff7cb95 100644
--- a/editor/translations/pt_BR.po
+++ b/editor/translations/pt_BR.po
@@ -5,16 +5,18 @@
# Allyson Souza <allyson_as@outlook.com>, 2017.
# António Sarmento <antonio.luis.sarmento@gmail.com>, 2016.
# George Marques <george@gmarqu.es>, 2016.
+# Guilherme Felipe C G Silva <guilhermefelipecgs@gmail.com>, 2017.
# Joaquim Ferreira <joaquimferreira1996@bol.com.br>, 2016.
# jonathan railarem <railarem@gmail.com>, 2017.
# Mailson Silva Marins <mailsons335@gmail.com>, 2016.
+# 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-03-27 19:34+0000\n"
-"Last-Translator: jonathan railarem <railarem@gmail.com>\n"
+"PO-Revision-Date: 2017-08-15 19:47+0000\n"
+"Last-Translator: Michael Alexsander Silva Dias <michael.a.s.dias@gmail.com>\n"
"Language-Team: Portuguese (Brazil) <https://hosted.weblate.org/projects/"
"godot-engine/godot/pt_BR/>\n"
"Language: pt_BR\n"
@@ -22,7 +24,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.13-dev\n"
+"X-Generator: Weblate 2.17-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -153,7 +155,8 @@ msgstr "Ir ao Próximo Passo"
msgid "Goto Prev Step"
msgstr "Ir ao Passo Anterior"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "Linear"
@@ -313,7 +316,7 @@ msgstr "Otimizar"
#: editor/animation_editor.cpp
msgid "Select an AnimationPlayer from the Scene Tree to edit animations."
-msgstr ""
+msgstr "Selecione um AnimationPlayer da Ãrvore de Cena para editar animações."
#: editor/animation_editor.cpp
msgid "Key"
@@ -365,21 +368,19 @@ msgstr "Alterar Valor do Vetor"
#: editor/asset_library_editor_plugin.cpp
msgid "Free"
-msgstr ""
+msgstr "Livrar"
#: editor/asset_library_editor_plugin.cpp editor/editor_plugin_settings.cpp
msgid "Version:"
msgstr "Versão:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Contents:"
-msgstr "Constantes:"
+msgstr "Conteúdo:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "View Files"
-msgstr "Arquivo"
+msgstr "Ver Arquivos"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
#: editor/editor_help.cpp editor/property_selector.cpp
@@ -387,7 +388,8 @@ msgstr "Arquivo"
msgid "Description:"
msgstr "Descrição:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr "Instalar"
@@ -398,9 +400,9 @@ msgstr "Instalar"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Fechar"
@@ -418,9 +420,8 @@ msgid "Connection error, please try again."
msgstr ""
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect."
-msgstr "Conectar..."
+msgstr "Não é possível conectar..."
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
@@ -433,7 +434,7 @@ msgstr ""
#: editor/asset_library_editor_plugin.cpp
msgid "No response."
-msgstr ""
+msgstr "Sem resposta."
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
@@ -442,7 +443,7 @@ msgstr "Formato de arquivo requisitado desconhecido:"
#: editor/asset_library_editor_plugin.cpp
msgid "Req. Failed."
-msgstr ""
+msgstr "Sol. Falhou."
#: editor/asset_library_editor_plugin.cpp
msgid "Request failed, too many redirects"
@@ -454,7 +455,7 @@ msgstr ""
#: editor/asset_library_editor_plugin.cpp
msgid "Failed:"
-msgstr ""
+msgstr "Falhou:"
#: editor/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
@@ -476,9 +477,9 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
-msgstr ""
+msgstr "Sucesso!"
#: editor/asset_library_editor_plugin.cpp
msgid "Fetching:"
@@ -490,14 +491,12 @@ msgid "Resolving.."
msgstr "Salvando..."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Connecting.."
-msgstr "Conectar..."
+msgstr "Conectando..."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Requesting.."
-msgstr "Em teste"
+msgstr "Solicitando..."
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
@@ -523,7 +522,7 @@ msgstr ""
#: editor/asset_library_editor_plugin.cpp
msgid "first"
-msgstr ""
+msgstr "primeiro"
#: editor/asset_library_editor_plugin.cpp
msgid "prev"
@@ -542,17 +541,16 @@ msgid "All"
msgstr "Todos"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "Pesquisar:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "Pesquisar"
@@ -568,7 +566,7 @@ msgstr "Pesquisar"
msgid "Import"
msgstr "Importar"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "Plugins"
@@ -580,7 +578,7 @@ msgstr "Ordenar:"
msgid "Reverse"
msgstr "Reverso"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "Categoria:"
@@ -733,14 +731,14 @@ msgstr "Conectar ao Nó:"
#: 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.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
msgstr "Adicionar"
#: 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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "Remover"
@@ -849,7 +847,7 @@ msgid "Resource"
msgstr "Recurso"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "Caminho"
@@ -932,12 +930,195 @@ msgstr "Explorador de Recursos Órfãos"
msgid "Delete selected files?"
msgstr "Excluir os arquivos selecionados?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Excluir"
+#: editor/editor_about.cpp
+msgid "Thanks from the Godot community!"
+msgstr "Agradecimentos da comunidade Godot!"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "Obrigado!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr "Contribuidores da Godot Engine"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "Autor:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "Gerenciador de Projetos"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Lead Developer"
+msgstr "Desenvolvedores"
+
+#: editor/editor_about.cpp editor/project_manager.cpp
+msgid "Project Manager"
+msgstr "Gerenciador de Projetos"
+
+#: editor/editor_about.cpp
+msgid "Developers"
+msgstr "Desenvolvedores"
+
+#: 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
+#, fuzzy
+msgid "All Components"
+msgstr "Conteúdo:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "Conteúdo:"
+
+#: 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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "Não comprimido"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "Pacote Instalado com Sucesso!"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "Pacote Instalado com Sucesso!"
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Effect"
+msgstr "Adicionar Vazio"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Renomear Autoload"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Solo"
+msgstr "Alternar Inicio automático"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Excluir Selecionados"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+msgstr "Opções de depuração"
+
+#: 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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "Duplicar"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Excluir Selecionados"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "Adicionar Todos"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Excluir Layout"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Duplicar Animação"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "Ação de Mover"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -951,24 +1132,53 @@ 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
+#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"Extensão de arquivo inválida.\n"
+"Por favor use .font."
+
+#: editor/editor_audio_buses.cpp
#, fuzzy
msgid "Add Bus"
msgstr "Adicionar Todos"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "Criar Novo Recurso"
+
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "Carregar"
#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Load an existing Bus Layout."
+msgstr "Carrega um recurso existente do disco e o edita."
+
+#: editor/editor_audio_buses.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Save As"
msgstr "Salvar Como"
-#: editor/editor_audio_buses.cpp editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+msgid "Save this Bus Layout to a file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+msgid "Load Default"
msgstr "Padrão"
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Nome Inválido."
@@ -1072,6 +1282,11 @@ msgid "Updating scene.."
msgstr "Atualizando Cena..."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "Por favor salve a cena primeiro."
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "Escolha um Diretório"
@@ -1105,7 +1320,7 @@ msgstr "Empacotando"
#: editor/editor_export.cpp platform/javascript/export/export.cpp
msgid "Template file not found:\n"
-msgstr ""
+msgstr "Arquivo de modelo não encontrado:\n"
#: editor/editor_export.cpp
msgid "Added:"
@@ -1149,6 +1364,22 @@ msgstr "Todos os Arquivos (*)"
msgid "Open"
msgstr "Abrir"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Abrir um Arquivo"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Abrir Arquivo(s)"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Abrir um Diretório"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Abrir Arquivo ou Diretório"
+
#: 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
@@ -1275,13 +1506,21 @@ msgid "Signals:"
msgstr "Sinais:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Animações"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Constantes:"
#: editor/editor_help.cpp
-#, fuzzy
msgid "Property Description:"
-msgstr "Descrição breve:"
+msgstr "Descrição da Propriedade:"
#: editor/editor_help.cpp
msgid "Method Description:"
@@ -1292,7 +1531,8 @@ msgid "Search Text"
msgstr "Pesquisar Texto"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " Saída:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1342,6 +1582,11 @@ 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."
+
+#: editor/editor_node.cpp
msgid ""
"Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."
msgstr ""
@@ -1472,26 +1717,34 @@ msgid "Quick Open Script.."
msgstr "Abrir Script Ãgil..."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "Sim"
+#, fuzzy
+msgid "Save & Close"
+msgstr "Salvar um Arquivo"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "Fechar cena? (Mudanças não salvas serão perdidas)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
msgstr "Salvar Cena Como..."
#: editor/editor_node.cpp
-#, fuzzy
msgid "No"
-msgstr "Nó"
+msgstr "Não"
+
+#: editor/editor_node.cpp
+msgid "Yes"
+msgstr "Sim"
#: editor/editor_node.cpp
msgid "This scene has never been saved. Save before running?"
msgstr "Esta cena nunca foi salva. Salvar antes de rodar?"
+#: editor/editor_node.cpp editor/scene_tree_dock.cpp
+msgid "This operation can't be done without a scene."
+msgstr "Essa operação não pode ser realizada sem uma cena."
+
#: editor/editor_node.cpp
msgid "Export Mesh Library"
msgstr "Exportar MeshLibrary"
@@ -1501,12 +1754,9 @@ msgid "Export Tile Set"
msgstr "Exportar Tile Set"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "Sair"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "Sair do editor?"
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "Essa operação não pode ser realizada sem uma cena."
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1529,22 +1779,58 @@ msgid "Quick Run Scene.."
msgstr "Rodar Cena Ãgil..."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "Sair"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "Sair do editor?"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "Gerenciador de Projetos"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Salvar um Arquivo"
+
+#: 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 ""
-"Abrir Gerenciador de Projetos?\n"
-"(Mudanças não salvas serão perdidas)"
#: 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: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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 ""
+"A cena '%s' foi importada automaticamente, não podendo ser modificada.\n"
+"Para fazer alterações, uma nova cena herdada pode ser criada."
#: editor/editor_node.cpp editor/plugins/canvas_item_editor_plugin.cpp
#: editor/scene_tree_dock.cpp
@@ -1575,6 +1861,11 @@ msgstr "Salvar Layout"
msgid "Delete Layout"
msgstr "Excluir Layout"
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+msgid "Default"
+msgstr "Padrão"
+
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
msgstr "Trocar Guia de Cena"
@@ -1591,6 +1882,11 @@ msgstr "Mais %d arquivo(s) ou pasta(s)"
msgid "Distraction Free Mode"
msgstr "Modo Sem Distrações"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "Modo Sem Distrações"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "Cena"
@@ -1608,9 +1904,8 @@ msgid "Previous tab"
msgstr "Guia anterior"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Filter Files.."
-msgstr "Filtrar Arquivos Rapidamente..."
+msgstr "Filtrar Arquivos.."
#: editor/editor_node.cpp
msgid "Operations with scene files."
@@ -1640,10 +1935,6 @@ msgstr "Salvar todas as Cenas"
msgid "Close Scene"
msgstr "Fechar Cena"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr "Ir a Cena Fechada Anterior"
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "Abrir Recente"
@@ -1680,9 +1971,8 @@ msgid "Miscellaneous project or scene-wide tools."
msgstr "Ferramentas diversas atuantes no projeto ou cena."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Project"
-msgstr "Novo Projeto"
+msgstr "Projeto"
#: editor/editor_node.cpp
msgid "Project Settings"
@@ -1796,9 +2086,8 @@ msgstr ""
"sistema de arquivos via rede."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Editor"
-msgstr "Editar"
+msgstr "Editor"
#: editor/editor_node.cpp editor/settings_config_dialog.cpp
msgid "Editor Settings"
@@ -1814,9 +2103,8 @@ msgid "Toggle Fullscreen"
msgstr "Modo Tela-Cheia"
#: editor/editor_node.cpp editor/project_export.cpp
-#, fuzzy
msgid "Manage Export Templates"
-msgstr "Carregando Modelos de Exportação"
+msgstr "Gerenciar Modelos de Exportação"
#: editor/editor_node.cpp
msgid "Help"
@@ -1827,9 +2115,8 @@ msgid "Classes"
msgstr "Classes"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Online Docs"
-msgstr "Fechar Docs"
+msgstr "Docs Online"
#: editor/editor_node.cpp
msgid "Q&A"
@@ -1947,6 +2234,10 @@ msgstr "Nó"
msgid "Output"
msgstr "Saída"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "Reimportar"
@@ -1956,26 +2247,10 @@ msgid "Update"
msgstr "Atualizar"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "Agradecimentos da comunidade Godot!"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "Obrigado!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "Importar Modelos de um Arquivo ZIP"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "Exportar Projeto"
@@ -1996,23 +2271,29 @@ msgid "Open & Run a Script"
msgstr "Abrir e Rodar um Script"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "New Inherited"
+msgstr "Nova Cena Herdada..."
+
+#: editor/editor_node.cpp
msgid "Load Errors"
msgstr "Erros de Carregamento"
+#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
+msgid "Select"
+msgstr "Selecionar"
+
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 2D Editor"
-msgstr "Abrir no Editor"
+msgstr "Abrir Editor 2D"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 3D Editor"
-msgstr "Abrir no Editor"
+msgstr "Abrir Editor 3D"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Script Editor"
-msgstr "Abrir no Editor"
+msgstr "Abrir Editor de Scripts"
#: editor/editor_node.cpp
#, fuzzy
@@ -2020,14 +2301,12 @@ msgid "Open Asset Library"
msgstr "Exportar Biblioteca"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the next Editor"
-msgstr "Abrir no Editor"
+msgstr "Abrir o próximo Editor"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the previous Editor"
-msgstr "Abrir no Editor"
+msgstr "Abrir o Editor anterior"
#: editor/editor_plugin_settings.cpp
msgid "Installed Plugins:"
@@ -2105,6 +2384,16 @@ msgstr "Re-Importando"
msgid "Re-Import Changed Resources"
msgstr "Re-Importar Recursos Alterados"
+#: 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 "Escreva sua lógica no método _run()."
@@ -2151,14 +2440,12 @@ msgid "Re-Download"
msgstr "Recarregar"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Uninstall"
-msgstr "Instalar"
+msgstr "Desinstalar"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "(Installed)"
-msgstr "Instalar"
+msgstr "(Instalado)"
#: editor/export_template_manager.cpp
#, fuzzy
@@ -2167,12 +2454,11 @@ msgstr "Abaixo"
#: editor/export_template_manager.cpp
msgid "(Missing)"
-msgstr ""
+msgstr "(Faltando)"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "(Current)"
-msgstr "Atual:"
+msgstr "(Atual)"
#: editor/export_template_manager.cpp
msgid "Remove template version '%s'?"
@@ -2197,14 +2483,12 @@ msgid "No version.txt found inside templates."
msgstr ""
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Error creating path for templates:\n"
-msgstr "Erro ao salvar atlas:"
+msgstr "Erro ao criar caminho para modelos:\n"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Extracting Export Templates"
-msgstr "Carregando Modelos de Exportação"
+msgstr "Extraindo Modelos de Exportação"
#: editor/export_template_manager.cpp
msgid "Importing:"
@@ -2215,34 +2499,28 @@ msgid "Loading Export Templates"
msgstr "Carregando Modelos de Exportação"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Current Version:"
-msgstr "Cena Atual"
+msgstr "Versão Atual:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Installed Versions:"
-msgstr "Plugins Instalados:"
+msgstr "Versões Instaladas:"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Install From File"
-msgstr "Instalar Projeto:"
+msgstr "Instalar a partir do arquivo"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Remove Template"
-msgstr "Remover Item"
+msgstr "Remover Modelo"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Select template file"
-msgstr "Excluir os arquivos selecionados?"
+msgstr "Selecione o arquivo de modelo"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Export Template Manager"
-msgstr "Carregando Modelos de Exportação"
+msgstr "Gerenciador de Modelos de Exportação"
#: editor/file_type_cache.cpp
msgid "Can't open file_type_cache.cch for writing, not saving file type cache!"
@@ -2252,13 +2530,31 @@ msgstr ""
#: editor/filesystem_dock.cpp
msgid "Cannot navigate to '"
-msgstr ""
+msgstr "Não é possível navegar para '"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "Salvar e Re-Importar"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "Origem:"
#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr "Mesmos arquivos de destino e origem, nada a fazer."
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr "Mesmo caminhos de destino e origem, nada a fazer."
@@ -2267,6 +2563,20 @@ msgid "Can't move directories to within themselves."
msgstr "Não é possível mover diretórios para dentro de si mesmos."
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Erro ao carregar imagem:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Erro ao importar:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr "Não é possível operar em \"..\""
@@ -2279,13 +2589,12 @@ msgid "No files selected!"
msgstr "Nenhum arquivo selecionado!"
#: editor/filesystem_dock.cpp
-#, fuzzy
msgid "Expand all"
-msgstr "Expandir para Pai"
+msgstr "Expandir tudo"
#: editor/filesystem_dock.cpp
msgid "Collapse all"
-msgstr ""
+msgstr "Recolher tudo"
#: editor/filesystem_dock.cpp
msgid "Show In File Manager"
@@ -2344,6 +2653,12 @@ msgid "Instance the selected scene(s) as child of the selected node."
msgstr "Instancia a(s) cena(s) selecionada como filho do nó selecionado."
#: editor/filesystem_dock.cpp
+msgid ""
+"Scanning Files,\n"
+"Please Wait.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Move"
msgstr "Mover"
@@ -2355,10 +2670,31 @@ msgstr "Adicionar ao Grupo"
msgid "Remove from Group"
msgstr "Remover do Grupo"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "Superfície %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+msgstr "Importando Cena..."
+
+#: 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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "Importar Cena 3D"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2397,14 +2733,20 @@ msgid "Saving.."
msgstr "Salvando..."
#: editor/import_dock.cpp
-#, fuzzy
+msgid "Set as Default for '%s'"
+msgstr ""
+
+#: editor/import_dock.cpp
+msgid "Clear Default for '%s'"
+msgstr ""
+
+#: editor/import_dock.cpp
msgid " Files"
-msgstr "Arquivo"
+msgstr " Arquivos"
#: editor/import_dock.cpp
-#, fuzzy
msgid "Import As:"
-msgstr "Importar"
+msgstr "Importar Como:"
#: editor/import_dock.cpp editor/property_editor.cpp
msgid "Preset.."
@@ -2486,13 +2828,12 @@ msgid "No target font resource!"
msgstr "Falta recurso de fonte destino!"
#: editor/io_plugins/editor_font_import_plugin.cpp
-#, fuzzy
msgid ""
"Invalid file extension.\n"
"Please use .font."
msgstr ""
"Extensão de arquivo inválida.\n"
-"Por favor use .fnt."
+"Por favor use .font."
#: editor/io_plugins/editor_font_import_plugin.cpp
msgid "Can't load/process source font."
@@ -2593,6 +2934,10 @@ msgstr "Origem de Mesh(es):"
msgid "Mesh"
msgstr "Mesh"
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "Superfície %d"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr "Sem amostras para importar!"
@@ -2711,9 +3056,8 @@ msgid "Auto"
msgstr "Auto"
#: editor/io_plugins/editor_scene_import_plugin.cpp
-#, fuzzy
msgid "Root Node Name:"
-msgstr "Nome do Nó:"
+msgstr "Nome do Nó Raíz:"
#: editor/io_plugins/editor_scene_import_plugin.cpp
msgid "The Following Files are Missing:"
@@ -2973,9 +3317,8 @@ msgid "Compress"
msgstr "Comprimir"
#: editor/io_plugins/editor_translation_import_plugin.cpp
-#, fuzzy
msgid "Add to Project (project.godot)"
-msgstr "Adicionar ao Projeto (engine.cfg)"
+msgstr "Adicionar ao Projeto (project.godot)"
#: editor/io_plugins/editor_translation_import_plugin.cpp
msgid "Import Languages:"
@@ -3014,9 +3357,8 @@ msgid "Change Animation Name:"
msgstr "Alterar Nome da Animação:"
#: editor/plugins/animation_player_editor_plugin.cpp
-#, fuzzy
msgid "Delete Animation?"
-msgstr "Duplicar Animação"
+msgstr "Excluir Animação?"
#: editor/plugins/animation_player_editor_plugin.cpp
#: editor/plugins/sprite_frames_editor_plugin.cpp
@@ -3182,6 +3524,11 @@ msgid "New name:"
msgstr "Novo nome:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Editar Filtros de Nó"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr "Escala:"
@@ -3431,9 +3778,8 @@ msgid "Paste Pose"
msgstr "Colar Pose"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Select Mode"
-msgstr "Modo de Seleção (Q)"
+msgstr "Modo de Seleção"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Drag: Rotate"
@@ -3500,6 +3846,7 @@ msgstr "Restaura a habilidade dos filhos do objeto de serem selecionados."
#: 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Editar"
@@ -3532,10 +3879,6 @@ msgid "Use Pixel Snap"
msgstr "Usar Snap de Pixel"
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr "Expandir para Pai"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr "Esqueleto..."
@@ -3647,11 +3990,6 @@ msgstr "Essa operação requer um único nó selecionado."
msgid "Change default type"
msgstr "Alterar Valor Padrão"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "OK"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3689,6 +4027,14 @@ msgstr "Editar Polígono (Remover Ponto)"
msgid "Create a new polygon from scratch."
msgstr "Criar um novo polígono do zero."
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr "Criar Polígono 3D"
@@ -3729,6 +4075,21 @@ msgstr "Atualizar a partir de Cena"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Modify Curve Point"
+msgstr "Modificar Curve Map"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "Modificar Curve Map"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Load Curve Preset"
+msgstr "Carregar Recurso"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Add point"
msgstr "Adicionar Entrada"
@@ -3739,13 +4100,31 @@ msgstr "Remover Ponto do Caminho"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Left linear"
+msgstr "Linear"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Right linear"
+msgstr "Visão Direita"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Load preset"
msgstr "Carregar Recurso"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
-msgid "Modify Curve"
-msgstr "Modificar Curve Map"
+msgid "Remove Curve Point"
+msgstr "Remover Ponto do Caminho"
+
+#: 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"
@@ -3769,6 +4148,12 @@ msgid "Item List Editor"
msgstr "Editor de Lista de Itens"
#: 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 "Criar Polígono de Oclusão"
@@ -4064,6 +4449,12 @@ msgid "Load Emission Mask"
msgstr "Carregar Máscara de Emissão"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
+msgid "Particles"
+msgstr "Vértice"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
msgstr "Gerar Contagem de Pontos:"
@@ -4395,6 +4786,12 @@ msgid "Clear Recent Files"
msgstr "Limpar Ossos"
#: 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 "Erro ao salvar tema"
@@ -4419,6 +4816,10 @@ msgid "Save Theme As.."
msgstr "Salvar Tema Como..."
#: editor/plugins/script_editor_plugin.cpp
+msgid " Class Reference"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Next script"
msgstr "Próximo Script"
@@ -4472,6 +4873,11 @@ msgid "Close All"
msgstr "Fechar"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Scripts Panel"
+msgstr "Alternar Favorito"
+
+#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Find.."
@@ -4504,6 +4910,11 @@ 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"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr "Janela"
@@ -4573,6 +4984,10 @@ msgstr ""
"carregada"
#: editor/plugins/script_text_editor.cpp
+msgid "Only resources from filesystem can be dropped."
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
#, fuzzy
msgid "Pick Color"
msgstr "Cor"
@@ -4621,6 +5036,11 @@ msgid "Move Down"
msgstr "Mover para Baixo"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Excluir Ponto"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr "Recuar Esquerda"
@@ -4927,37 +5347,6 @@ msgid "Animation Key Inserted."
msgstr "Chave de Animação Inserida."
#: 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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "Avançar"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "Para trás"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "Roda para Baixo."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -5025,10 +5414,64 @@ msgid "Audio Listener"
msgstr "Ouvinte de Ãudio"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Doppler Enable"
+msgstr "Habilitar"
+
+#: 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
+#, fuzzy
+msgid "Freelook Forward"
+msgstr "Avançar"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Backwards"
+msgstr "Para trás"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Down"
+msgstr "Roda para Baixo."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "preview"
+msgstr "Visualização"
+
+#: 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"
+
+#: 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"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode (W)"
msgstr "Modo Mover (W)"
@@ -5150,6 +5593,7 @@ msgid "View Grid"
msgstr "Ver Grade"
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "Configurações"
@@ -5278,6 +5722,11 @@ 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"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
msgstr "Modo Snap:"
@@ -5336,6 +5785,16 @@ msgstr "Remover Item"
#: editor/plugins/theme_editor_plugin.cpp
#, fuzzy
+msgid "Remove All Items"
+msgstr "Remover Itens de Classe"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Remover"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
msgid "Theme"
msgstr "Salvar Tema"
@@ -5403,7 +5862,7 @@ msgstr "Guia 2"
msgid "Tab 3"
msgstr "Guia 3"
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr "Tipo:"
@@ -5425,12 +5884,27 @@ msgid "Color"
msgstr "Cor"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Apagar Seleção"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr "Pintar TileMap"
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "Duplicar"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "Linear"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Bucket Fill"
+msgstr "Balde"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5465,10 +5939,6 @@ msgid "Pick Tile"
msgstr "Pegar Tile"
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr "Selecionar"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr "Rotacionar 0 degraus"
@@ -5532,7 +6002,7 @@ msgstr "Excluir os arquivos selecionados?"
msgid "Presets"
msgstr "Predefinição..."
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "Adicionar..."
@@ -5591,6 +6061,24 @@ msgid "Make Patch"
msgstr "Caminho Destino:"
#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "Textura"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "Lista de Métodos:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr "Exportar PCK/Zip"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5631,10 +6119,6 @@ msgid "The following files failed extraction from package:"
msgstr "Os arquivos a seguir falharam ao serem extraídos do pacote:"
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr "Pacote Instalado com Sucesso!"
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "Importar Projeto Existente"
@@ -5681,6 +6165,23 @@ 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\"."
+
+#: 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
+#, fuzzy
msgid "Are you sure to run more than one project?"
msgstr "Tem certeza de que quer rodar mais de um projeto?"
@@ -5695,10 +6196,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr "Gerenciador de Projetos"
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr "Lista de Projetos"
@@ -5728,258 +6225,292 @@ msgstr "Remover Item"
msgid "Exit"
msgstr "Sair"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Não é possível conectar..."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "Chave "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr "Botão do Joystick"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr "Eixo do Joystick"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr "Botão do Mous"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr "Ação Inválida (qualquer coisa serve, exceto '/' ou ':')."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr "A ação \"%s\" já existe!"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr "Renomear Evento Ação de Entrada"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr "Adicionar Evento Ação de Entrada"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr "Control+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "Pressione uma Tecla..."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr "Botão do Mouse:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr "Botão Esquerdo"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr "Botão Direito"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr "Botão do Meio"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr "Roda para Cima"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr "Roda para Baixo"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr "Botão 6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr "Botão 7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr "Botão 8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr "Botão 9"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Alterar"
+
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Axis Index:"
msgstr "Eixo do Joystick:"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "Eixo"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Button Index:"
msgstr "Botão do Joystick:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr "Adicionar Ação de Entrada"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr "Apagar Evento Ação de Entrada"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Add Event"
msgstr "Adicionar Vazio"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "Dispositivo"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Botão"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "Botão Esquerdo."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "Botão Direito."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "Botão do Meio."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "Roda para Cima."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "Roda para Baixo."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Adicionar Getter de Propriedade"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "No property '"
+msgstr "Propriedade:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "Configurações"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "Deletar Entrada"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "Erro ao salvar as configurações."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "Configurações Salvas."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr "Adicionar Tradução"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "Remover Tradução"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr "Adicionar Caminho Remapeado"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr "Remapeamento de Recurso Adicionar Remap"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr "Alterar Idioma de Remapeamento de Recuso"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr "Remover Remapeamento de Recurso"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr "Remover Opção de Remapeamento de Recurso"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Configurações do Projeto (engine.cfg)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr "Geral"
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr "Propriedade:"
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr "Del"
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr "Copiar para a Plataforma..."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
+msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr "Mapa de Entrada"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr "Ação:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr "Dispositivo:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr "Ãndice:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr "Localização"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr "Traduções"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr "Traduções:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr "Remapeamentos"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr "Recursos:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr "Remapeamentos por Localidade:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr "Localidade"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "AutoLoad"
@@ -6022,6 +6553,11 @@ msgstr "Atribuir"
#: editor/property_editor.cpp
#, fuzzy
+msgid "Select Node"
+msgstr "Selecione um Nó"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "New Script"
msgstr "Próximo Script"
@@ -6036,6 +6572,11 @@ 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"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "Pick a Node"
msgstr "Selecione um Nó"
@@ -6133,6 +6674,11 @@ msgstr "Argumentos da Cena Principal:"
msgid "Scene Run Settings"
msgstr "Configurações de Carregamento da Cena"
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "OK"
+
#: editor/scene_tree_dock.cpp
#, fuzzy
msgid "No parent to instance the scenes at."
@@ -6179,10 +6725,6 @@ msgid "Delete Node(s)?"
msgstr "Excluir Nó(s)?"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "Essa operação não pode ser realizada sem uma cena."
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6195,6 +6737,18 @@ msgid "Save New Scene As.."
msgstr "Salvar Nova Cena Como..."
#: editor/scene_tree_dock.cpp
+msgid "Editable Children"
+msgstr "Filhos Editáveis"
+
+#: editor/scene_tree_dock.cpp
+msgid "Load As Placeholder"
+msgstr "Carregar como Substituto"
+
+#: editor/scene_tree_dock.cpp
+msgid "Discard Instancing"
+msgstr "Descartar Instanciação"
+
+#: editor/scene_tree_dock.cpp
msgid "Makes Sense!"
msgstr "Faz Sentido!"
@@ -6240,6 +6794,14 @@ msgid "Edit Connections"
msgstr "Editar Conexões"
#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance"
+msgstr "Limpar Herança"
+
+#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
+msgid "Open in Editor"
+msgstr "Abrir no Editor"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)"
msgstr "Excluir Nó(s)"
@@ -6296,6 +6858,11 @@ msgstr ""
#: editor/scene_tree_dock.cpp
#, fuzzy
+msgid "Filter nodes"
+msgstr "Filtros"
+
+#: 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."
@@ -6304,6 +6871,14 @@ msgstr "Criar um script novo para o nó selecionado."
msgid "Clear a script for the selected node."
msgstr "Criar um script novo para o nó selecionado."
+#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance? (No Undo!)"
+msgstr "Limpar Herança? (Irreversível!)"
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear!"
+msgstr "Limpar!"
+
#: editor/scene_tree_editor.cpp
msgid "Toggle Spatial Visible"
msgstr "Alternar Spatial Visível"
@@ -6335,11 +6910,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "Opções de depuração"
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr "Instância:"
@@ -6378,32 +6948,8 @@ msgid "Scene Tree (Nodes):"
msgstr "Ãrvore de Cena (Nós):"
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr "Filhos Editáveis"
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr "Carregar como Substituto"
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr "Descartar Instanciação"
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr "Abrir no Editor"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr "Limpar Herança"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr "Limpar Herança? (Irreversível!)"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr "Limpar!"
+msgid "Node Configuration Warning!"
+msgstr ""
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -6411,6 +6957,11 @@ msgstr "Selecione um Nó"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Erro ao carregar imagem:"
+
+#: 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."
@@ -6420,6 +6971,10 @@ msgid "Error loading script from %s"
msgstr "Erro ao carregar cena de %s"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "N/D"
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "O caminho está vazio"
@@ -6463,10 +7018,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr "N/D"
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6638,6 +7189,10 @@ msgid "Change Light Radius"
msgstr "Mudar Raio da Luz"
#: editor/spatial_editor_gizmos.cpp
+msgid "Change AudioStreamPlayer3D Emission Angle"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
msgstr "Mudar FOV da Câmera"
@@ -6722,6 +7277,137 @@ msgstr "Formato de dicionário de instância inválido (script inválido em @pat
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "Dicionário de instância inválido (subclasses inválidas)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Excluir Selecionados"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Duplicar Seleção"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Snap View"
+msgstr "Visão Superior"
+
+#: 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
+#, fuzzy
+msgid "Clip Disabled"
+msgstr "Desabilitado"
+
+#: 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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "Ctrl: Rotaciona"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "Ctrl: Rotaciona"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Z"
+msgstr "Ctrl: Rotaciona"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "Criar Novo"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "Criar Novo Projeto"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Area"
+msgstr "Apagar TileMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Apenas na Seleção"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Apenas na Seleção"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "Configurações do Snap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "Instância:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr " Arquivos"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6753,6 +7439,31 @@ msgid "Stack overflow with stack depth: "
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Editar Argumentos do Sinal:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Alterar Tipo de Valor do Vetor"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Alterar Nome de Entrada"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Default Value"
+msgstr "Alterar Valor Padrão"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Editar Variável:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Funções:"
@@ -6793,26 +7504,6 @@ msgid "Add Signal"
msgstr "Adicionar Sinal"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Remover Função"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Remover Variável"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Editando Variável:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Remover Sinal"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "Editando Sinal:"
-
-#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Change Expression"
msgstr "Alterar Expressão"
@@ -6822,6 +7513,16 @@ msgid "Add Node"
msgstr "Adicionar Nó"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Remover Chaves Invalidas"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Duplicate VisualScript Nodes"
+msgstr "Duplicar Nó(s) de Grafo(s)"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
"Segure Meta para aplicar um Getter. Segure Shift para aplicar uma assinatura "
@@ -6866,6 +7567,26 @@ msgid "Add Setter Property"
msgstr "Adicionar Setter de Propriedade"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "Alterar Tipo"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Remover Nó(s)"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Remover Nó de Shader Graph"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Conectar ao Nó:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "Condição"
@@ -6896,6 +7617,56 @@ msgid "Get"
msgstr "Obter"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Alterar Nome de Entrada"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "Não é possível operar em \"..\""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "Recurso da área de transferência está vazio!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Colar Nós"
+
+#: 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:"
+
+#: 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:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Remover Sinal"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Editando Variável:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "Editando Sinal:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "Tipo de Base:"
@@ -6916,10 +7687,6 @@ msgid "Edit Variable:"
msgstr "Editar Variável:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Alterar"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Excluir Selecionados"
@@ -6995,22 +7762,13 @@ msgid ""
"(error)."
msgstr ""
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Run in Browser"
-msgstr "Navegar"
+msgstr "Rodar no Navegador"
#: platform/javascript/export/export.cpp
msgid "Run exported HTML in the system's default browser."
-msgstr ""
+msgstr "Rodar HTML exportado no navegador padrão do sistema."
#: platform/javascript/export/export.cpp
#, fuzzy
@@ -7018,91 +7776,14 @@ msgid "Could not write file:\n"
msgstr "Não se pôde achar tile:"
#: platform/javascript/export/export.cpp
-#, fuzzy
msgid "Could not read file:\n"
-msgstr "Não se pôde achar tile:"
+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."
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Error creating the signature object."
-msgstr "Erro ao escrever o PCK do projeto!"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid unique name."
-msgstr "Nome Inválido."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid product GUID."
-msgstr "Tamanho de fonte inválido."
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid publisher GUID."
-msgstr "Caminho base inválido"
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid background color."
-msgstr "Origem personalizada da fonte inválida."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7205,6 +7886,13 @@ msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr ""
"PathFollow2D apenas funciona quando definido como filho de um nó Path2D."
+#: 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 ""
@@ -7235,23 +7923,33 @@ msgstr ""
"VisibilityEnable2D funciona melhor quando usado como filho direto da raiz da "
"cena atualmente editada."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"The controller id must not be 0 or this controller will not be bound to an "
+"actual controller"
msgstr ""
-"CollisionShape apenas serve para fornecer formas de colisão a um nó derivado "
-"de CollisionObject. Por favor, use-o apenas como filho de Area, StaticBody, "
-"RigidBody, KinematicBody, etc. para dá-los forma."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRAnchor must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"Uma forma deve ser fornecida para que o nó CollisionShape fucione. Por "
-"favor, crie um recurso de forma a ele!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7267,6 +7965,24 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "Um nó CollisionPolygon vazio não é efetivo na colisão."
+#: 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 ""
+"CollisionShape apenas serve para fornecer formas de colisão a um nó derivado "
+"de CollisionObject. Por favor, use-o apenas como filho de Area, StaticBody, "
+"RigidBody, KinematicBody, etc. para dá-los forma."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"Uma forma deve ser fornecida para que o nó CollisionShape fucione. Por "
+"favor, crie um recurso de forma a ele!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7286,6 +8002,13 @@ 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
#, fuzzy
msgid "Path property must point to a valid Spatial node to work."
@@ -7308,12 +8031,12 @@ msgstr ""
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
-msgstr "Modo de Início:"
+msgid "Raw Mode"
+msgstr "Modo Panorâmico"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
-msgstr ""
+msgstr "Adicionar cor atual como uma predefinição"
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -7323,22 +8046,6 @@ msgstr "Alerta!"
msgid "Please Confirm..."
msgstr "Confirme Por Favor..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Abrir um Arquivo"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Abrir Arquivo(s)"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Abrir um Diretório"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Abrir Arquivo ou Diretório"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7360,7 +8067,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7378,6 +8085,57 @@ msgstr ""
"para que ele possa ter um tamanho. Caso contrário, defina-o como destino de "
"render e atribua sua textura interna a algum nó para exibir."
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "Fechar cena? (Mudanças não salvas serão perdidas)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "Abrir Gerenciador de Projetos?\n"
+#~ "(Mudanças não salvas serão perdidas)"
+
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "Ir a Cena Fechada Anterior"
+
+#~ msgid "Expand to Parent"
+#~ msgstr "Expandir para Pai"
+
+#~ msgid "Del"
+#~ msgstr "Del"
+
+#~ msgid "Copy To Platform.."
+#~ msgstr "Copiar para a Plataforma..."
+
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr ""
+#~ "Não foi possível ler o arquivo de certificado. Ambos o caminho e senha "
+#~ "estão corretos?"
+
+#, fuzzy
+#~ msgid "Error creating the signature object."
+#~ msgstr "Erro ao escrever o PCK do projeto!"
+
+#~ msgid "Invalid unique name."
+#~ msgstr "Nome único inválido."
+
+#, fuzzy
+#~ msgid "Invalid product GUID."
+#~ msgstr "Tamanho de fonte inválido."
+
+#, fuzzy
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "Caminho base inválido"
+
+#~ msgid "Invalid background color."
+#~ msgstr "Cor de fundo inválida."
+
+#, fuzzy
+#~ msgid "RAW Mode"
+#~ msgstr "Modo RAW"
+
#~ msgid "Node From Scene"
#~ msgstr "Nó a Partir de Cena"
@@ -7463,9 +8221,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "Substituída(s) %d Ocorrência(s)."
-#~ msgid "Please save the scene first."
-#~ msgstr "Por favor salve a cena primeiro."
-
#~ msgid "Save Translatable Strings"
#~ msgstr "Salvar Strings Traduzíveis"
@@ -7659,9 +8414,6 @@ msgstr ""
#~ msgid "Script Encryption Key (256-bits as hex):"
#~ msgstr "Chave de Criptografia dos Scripts (256-bit como hex):"
-#~ msgid "Export PCK/Zip"
-#~ msgstr "Exportar PCK/Zip"
-
#~ msgid "Export Project PCK"
#~ msgstr "Exportar PCK do Projeto"
@@ -7796,9 +8548,6 @@ msgstr ""
#~ msgid "Node Group(s)"
#~ msgstr "Grupo(s) do Nó"
-#~ msgid "Set region_rect"
-#~ msgstr "Definir region_rect"
-
#~ msgid "Plugin List:"
#~ msgstr "Lista de Plugins:"
diff --git a/editor/translations/pt_PT.po b/editor/translations/pt_PT.po
index 738eea37a9..527bff68fd 100644
--- a/editor/translations/pt_PT.po
+++ b/editor/translations/pt_PT.po
@@ -145,7 +145,8 @@ msgstr ""
msgid "Goto Prev Step"
msgstr ""
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr ""
@@ -377,7 +378,8 @@ msgstr ""
msgid "Description:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -388,9 +390,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Fechar"
@@ -463,7 +465,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -524,17 +526,16 @@ msgid "All"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr ""
@@ -550,7 +551,7 @@ msgstr ""
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -562,7 +563,7 @@ msgstr ""
msgid "Reverse"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr ""
@@ -714,14 +715,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr ""
@@ -826,7 +827,7 @@ msgid "Resource"
msgstr ""
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr ""
@@ -906,12 +907,181 @@ msgstr ""
msgid "Delete selected files?"
msgstr ""
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Authors"
+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 "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
+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
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Alterar nome da Função"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Apagar Seleccionados"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Apagar Seleccionados"
+
+#: 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 "Move Audio Bus"
+msgstr ""
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -925,21 +1095,44 @@ 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/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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: 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
@@ -1042,6 +1235,10 @@ 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 ""
@@ -1119,6 +1316,22 @@ msgstr ""
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
@@ -1244,6 +1457,15 @@ msgid "Signals:"
msgstr "Sinais:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Funções:"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr ""
@@ -1260,7 +1482,7 @@ msgid "Search Text"
msgstr ""
#: editor/editor_log.cpp
-msgid " Output:"
+msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1310,6 +1532,10 @@ 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 ""
@@ -1428,11 +1654,11 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
+msgid "Save & Close"
msgstr ""
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
@@ -1444,9 +1670,17 @@ 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 ""
@@ -1456,11 +1690,7 @@ msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
+msgid "This operation can't be done without a selected node."
msgstr ""
#: editor/editor_node.cpp
@@ -1484,9 +1714,27 @@ msgid "Quick Run Scene.."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+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
@@ -1494,6 +1742,22 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1526,6 +1790,11 @@ msgstr ""
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 ""
@@ -1542,6 +1811,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr ""
@@ -1590,10 +1863,6 @@ msgstr ""
msgid "Close Scene"
msgstr ""
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1874,6 +2143,10 @@ msgstr ""
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1883,26 +2156,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr ""
@@ -1923,9 +2180,17 @@ 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 ""
@@ -2026,6 +2291,16 @@ msgstr ""
msgid "Re-Import Changed Resources"
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 ""
@@ -2162,10 +2437,26 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Source: "
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2174,6 +2465,18 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving file:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving dir:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2250,6 +2553,12 @@ 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 ""
@@ -2261,9 +2570,28 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Single Scene"
+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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2303,6 +2631,14 @@ 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 ""
@@ -2489,6 +2825,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3070,6 +3410,11 @@ msgid "New name:"
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Editar Variável:"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr ""
@@ -3381,6 +3726,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Editar"
@@ -3413,10 +3759,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3525,11 +3867,6 @@ msgstr ""
msgid "Change default type"
msgstr ""
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr ""
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3567,6 +3904,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3606,6 +3951,18 @@ msgid "Update from Scene"
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
#, fuzzy
msgid "Add point"
msgstr "Adicionar Sinal"
@@ -3616,11 +3973,28 @@ msgid "Remove point"
msgstr "Remover Sinal"
#: 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 "Modify Curve"
+#, fuzzy
+msgid "Remove Curve Point"
+msgstr "Remover Sinal"
+
+#: 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
@@ -3645,6 +4019,12 @@ 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 ""
@@ -3934,6 +4314,11 @@ 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 ""
@@ -4251,6 +4636,12 @@ 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 ""
@@ -4275,6 +4666,10 @@ 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 ""
@@ -4328,6 +4723,10 @@ msgid "Close All"
msgstr "Fechar"
#: 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.."
@@ -4360,6 +4759,10 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+msgid "Debug with external editor"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4423,6 +4826,10 @@ msgid ""
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 ""
@@ -4469,6 +4876,11 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Apagar Seleccionados"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4773,92 +5185,100 @@ msgid "Animation Key Inserted."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
+msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
+msgid "Material Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Forward"
+#, fuzzy
+msgid "Shader Changes"
+msgstr "Alterar"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Surface Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Backwards"
+msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
+msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Down"
+msgid "Align with view"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
+msgid "Display Normal"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
+msgid "Display Wireframe"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Material Changes"
+msgid "Display Overdraw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Shader Changes"
-msgstr "Alterar"
+msgid "Display Unshaded"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Surface Changes"
+msgid "View Environment"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
+msgid "View Gizmos"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
+msgid "View Information"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
+msgid "Doppler Enable"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
+msgid "Freelook Left"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
+msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
+msgid "Freelook Forward"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
+msgid "Freelook Backwards"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
+msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
+msgid "Freelook Down"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "preview"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
@@ -4866,6 +5286,17 @@ 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 ""
@@ -4983,6 +5414,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr ""
@@ -5111,6 +5543,10 @@ 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 ""
@@ -5168,6 +5604,16 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Remover Variável"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Remover Sinal"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5235,7 +5681,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5257,11 +5703,23 @@ 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 editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: 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
@@ -5297,10 +5755,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5360,7 +5814,7 @@ msgstr ""
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5407,6 +5861,22 @@ 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 ""
@@ -5443,10 +5913,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5491,6 +5957,19 @@ 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 ""
@@ -5505,10 +5984,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5537,254 +6012,285 @@ msgstr "Remover Variável"
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+msgid "Can't run project"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Alterar"
+
+#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Adicionar propriedade Getter"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an 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
+#, fuzzy
+msgid "Delete Item"
+msgstr "Apagar Seleccionados"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr ""
-
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5825,6 +6331,11 @@ msgid "Assign"
msgstr ""
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Adicionar propriedade Setter"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr ""
@@ -5837,6 +6348,10 @@ 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 ""
@@ -5933,6 +6448,11 @@ msgstr ""
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 ""
@@ -5976,10 +6496,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -5992,6 +6508,18 @@ 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 ""
@@ -6034,6 +6562,14 @@ msgid "Edit Connections"
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 ""
@@ -6084,6 +6620,10 @@ msgid ""
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 ""
@@ -6091,6 +6631,14 @@ msgstr ""
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 ""
@@ -6122,10 +6670,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6162,35 +6706,15 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Select a Node"
msgstr ""
-#: editor/scene_tree_editor.cpp
-msgid "Select a Node"
+#: editor/script_create_dialog.cpp
+msgid "Error loading template '%s'"
msgstr ""
#: editor/script_create_dialog.cpp
@@ -6202,6 +6726,10 @@ 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 ""
@@ -6244,10 +6772,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6413,6 +6937,10 @@ 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 ""
@@ -6497,6 +7025,123 @@ msgstr "Formato de dicionário de instância inválido (script inválido em @pat
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "Dicionário de instância inválido (subclasses inválidas)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Apagar Seleccionados"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Duplicate Selection"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+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/gridmap/grid_map_editor_plugin.cpp
+msgid "Tiles"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6535,6 +7180,28 @@ msgid "Stack overflow with stack depth: "
msgstr "Stack overflow com a profundidade da pilha (stack): "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Editar Argumentos do Sinal:"
+
+#: 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
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Editar Variável:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Funções:"
@@ -6575,34 +7242,23 @@ msgid "Add Signal"
msgstr "Adicionar Sinal"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Remover Função"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Remover Variável"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "A editar Variável:"
+msgid "Change Expression"
+msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Remover Sinal"
+msgid "Add Node"
+msgstr "Adicionar Nó"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "A editar Sinal:"
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Remover Variável"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change Expression"
+msgid "Duplicate VisualScript Nodes"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Adicionar Nó"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
@@ -6644,6 +7300,24 @@ msgid "Add Setter Property"
msgstr "Adicionar propriedade Setter"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "Tipo de Base:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Move Node(s)"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Remover Variável"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Connect Nodes"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr ""
@@ -6672,6 +7346,52 @@ msgid "Get"
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 "Remover Função"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+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 "A editar Sinal:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Remover Sinal"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "A editar Variável:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "A editar Sinal:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "Tipo de Base:"
@@ -6692,10 +7412,6 @@ msgid "Edit Variable:"
msgstr "Editar Variável:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Alterar"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Apagar Seleccionados"
@@ -6770,14 +7486,6 @@ msgid ""
"(error)."
msgstr ""
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6798,78 +7506,6 @@ msgstr ""
msgid "Could not open template for export:\n"
msgstr ""
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid unique name."
-msgstr "Nome de índice propriedade inválido."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -6948,6 +7584,13 @@ msgstr ""
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 ""
@@ -6970,17 +7613,32 @@ msgid ""
"as parent."
msgstr ""
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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
@@ -6994,6 +7652,19 @@ msgstr ""
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 ""
@@ -7009,6 +7680,13 @@ 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 ""
@@ -7025,7 +7703,7 @@ msgid ""
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7040,22 +7718,6 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr ""
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr ""
@@ -7074,7 +7736,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7087,3 +7749,7 @@ msgid ""
"obtain a size. Otherwise, make it a RenderTarget and assign its internal "
"texture to some node for display."
msgstr ""
+
+#, fuzzy
+#~ msgid "Invalid unique name."
+#~ msgstr "Nome de índice propriedade inválido."
diff --git a/editor/translations/ru.po b/editor/translations/ru.po
index 3acaa82736..92755d427b 100644
--- a/editor/translations/ru.po
+++ b/editor/translations/ru.po
@@ -11,8 +11,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2017-05-10 20:34+0000\n"
-"Last-Translator: DimOkGamer <salnikov.mine@yandex.ru>\n"
+"PO-Revision-Date: 2017-07-25 09:47+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"
@@ -21,7 +21,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.14-dev\n"
+"X-Generator: Weblate 2.16-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -33,7 +33,7 @@ msgstr "Ð’Ñе выбранные Ñлементы"
#: editor/animation_editor.cpp
msgid "Move Add Key"
-msgstr "Подвинут ключ"
+msgstr "Подвинуть ключ"
#: editor/animation_editor.cpp
msgid "Anim Change Transition"
@@ -151,7 +151,8 @@ msgstr "Перейти к Ñледующему шагу"
msgid "Goto Prev Step"
msgstr "Перейти к предыдущему шагу"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "Линейный"
@@ -363,21 +364,19 @@ msgstr "Изменить значение маÑÑива"
#: editor/asset_library_editor_plugin.cpp
msgid "Free"
-msgstr ""
+msgstr "ОÑвободить"
#: editor/asset_library_editor_plugin.cpp editor/editor_plugin_settings.cpp
msgid "Version:"
msgstr "ВерÑиÑ:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Contents:"
-msgstr "КонÑтанты:"
+msgstr "Содержание:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "View Files"
-msgstr " Файлы"
+msgstr "ПроÑмотр Файлов"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
#: editor/editor_help.cpp editor/property_selector.cpp
@@ -385,7 +384,8 @@ msgstr " Файлы"
msgid "Description:"
msgstr "ОпиÑание:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr "УÑтановить"
@@ -396,161 +396,152 @@ msgstr "УÑтановить"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
-msgstr ""
+msgstr "Ðевозможно определить Ð¸Ð¼Ñ Ñ…Ð¾Ñта:"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve."
-msgstr ""
+msgstr "Ðе удаетÑÑ Ñ€Ð°Ð·Ñ€ÐµÑˆÐ¸Ñ‚ÑŒ."
#: editor/asset_library_editor_plugin.cpp
msgid "Connection error, please try again."
-msgstr ""
+msgstr "Ошибка подключениÑ, попробуйте еще раз."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect."
-msgstr "ПриÑоединить.."
+msgstr "Ðе удаетÑÑ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡Ð¸Ñ‚ÑŒÑÑ."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect to host:"
-msgstr "ПриÑоединить к узлу:"
+msgstr "Ðе удаетÑÑ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡Ð¸Ñ‚ÑŒÑÑ Ðº хоÑту:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr ""
+msgstr "Ðет ответа от хоÑта:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response."
-msgstr ""
+msgstr "Ðет ответа."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Request failed, return code:"
-msgstr "ÐеизвеÑтный формат запрашиваемого файла:"
+msgstr "Ð—Ð°Ð¿Ñ€Ð¾Ñ Ð½Ðµ удалÑÑ, код:"
#: editor/asset_library_editor_plugin.cpp
msgid "Req. Failed."
-msgstr ""
+msgstr "Ð—Ð°Ð¿Ñ€Ð¾Ñ Ð½Ðµ прошел."
#: editor/asset_library_editor_plugin.cpp
msgid "Request failed, too many redirects"
-msgstr ""
+msgstr "Ð—Ð°Ð¿Ñ€Ð¾Ñ Ð½Ðµ прошел, Ñлишком много перенаправлений"
#: editor/asset_library_editor_plugin.cpp
msgid "Redirect Loop."
-msgstr ""
+msgstr "ЦикличеÑкое перенаправление."
#: editor/asset_library_editor_plugin.cpp
msgid "Failed:"
-msgstr ""
+msgstr "Ðе удалоÑÑŒ:"
#: editor/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
-msgstr ""
+msgstr "ÐеÑовпадение Ñ…Ñша загрузки, возможно файл был изменен."
#: editor/asset_library_editor_plugin.cpp
msgid "Expected:"
-msgstr ""
+msgstr "ОжидаетÑÑ:"
#: editor/asset_library_editor_plugin.cpp
msgid "Got:"
-msgstr ""
+msgstr "Получил:"
#: editor/asset_library_editor_plugin.cpp
msgid "Failed sha256 hash check"
-msgstr ""
+msgstr "Ðе удалоÑÑŒ проверить sha256 Ñ…Ñш"
#: editor/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr ""
+msgstr "Ошибка Загрузки Шаблона:"
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
-msgstr ""
+msgstr "УÑпех!"
#: editor/asset_library_editor_plugin.cpp
msgid "Fetching:"
-msgstr ""
+msgstr "Извлечение:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Resolving.."
-msgstr "Сохранение.."
+msgstr "ИнициализациÑ..."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Connecting.."
-msgstr "ПриÑоединить.."
+msgstr "Подключение.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Requesting.."
-msgstr "ТеÑтируемые"
+msgstr "Запрашиваю.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Error making request"
-msgstr "Ошибка при Ñохранении реÑурÑа!"
+msgstr "Ошибка во Ð²Ñ€ÐµÐ¼Ñ Ð·Ð°Ð¿Ñ€Ð¾Ñа"
#: editor/asset_library_editor_plugin.cpp
msgid "Idle"
-msgstr ""
+msgstr "ПроÑтой"
#: editor/asset_library_editor_plugin.cpp
msgid "Retry"
-msgstr ""
+msgstr "Повторить"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Download Error"
-msgstr "Загрузка"
+msgstr "Ошибка Загрузки"
#: editor/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr ""
+msgstr "Загрузка Ñтого шаблона уже идет!"
#: editor/asset_library_editor_plugin.cpp
msgid "first"
-msgstr ""
+msgstr "первый"
#: editor/asset_library_editor_plugin.cpp
msgid "prev"
-msgstr ""
+msgstr "предыдущий"
#: editor/asset_library_editor_plugin.cpp
msgid "next"
-msgstr ""
+msgstr "далее"
#: editor/asset_library_editor_plugin.cpp
msgid "last"
-msgstr ""
+msgstr "поÑледний"
#: editor/asset_library_editor_plugin.cpp
msgid "All"
msgstr "Ð’Ñе"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "ПоиÑк:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "ПоиÑк"
@@ -566,7 +557,7 @@ msgstr "ПоиÑк"
msgid "Import"
msgstr "Импорт"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "Плагины"
@@ -578,7 +569,7 @@ msgstr "Сортировать:"
msgid "Reverse"
msgstr "Обратно"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "КатегориÑ:"
@@ -732,14 +723,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "Удалить"
@@ -829,7 +820,7 @@ msgid ""
"Changes will not take effect unless reloaded."
msgstr ""
"Сцена '%s' в наÑтоÑщее Ð²Ñ€ÐµÐ¼Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¸Ñ€ÑƒÐµÑ‚ÑÑ.\n"
-"Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð²ÑтупÑÑ‚ в Ñилу, поÑле перезагрузки."
+"Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð½Ðµ вÑтупÑÑ‚ в Ñилу без перезапуÑка."
#: editor/dependency_editor.cpp
msgid ""
@@ -837,7 +828,7 @@ msgid ""
"Changes will take effect when reloaded."
msgstr ""
"РеÑурÑу '% s' иÑпользуетÑÑ.\n"
-"Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð²ÑтупÑÑ‚ в Ñилу поÑле перезагрузки."
+"Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð²ÑтупÑÑ‚ в Ñилу поÑле перезапуÑка."
#: editor/dependency_editor.cpp
msgid "Dependencies"
@@ -848,7 +839,7 @@ msgid "Resource"
msgstr "РеÑурÑ"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "Путь"
@@ -930,12 +921,196 @@ msgstr "Обзор подключённых реÑурÑов"
msgid "Delete selected files?"
msgstr "Удалить выбранные файлы?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "СпаÑибо от ÑообщеÑтва Godot!"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "СпаÑибо!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr "Ðвторы Движка Godot"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "Ðвтор:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "Менеджер проектов"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "Содержание:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "ÐеÑжатый"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "Пакет уÑпешно уÑтановлен!"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "Пакет уÑпешно уÑтановлен!"
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Effect"
+msgstr "Добавить Ñобытие"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Открыть раÑкладку звуковой шины"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Solo"
+msgstr "Открыть раÑкладку звуковой шины"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Удалить выделенное"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "Дублировать"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Удалить выделенное"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "Добавить"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Удалить макет"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Дублировать анимацию"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "ПеремеÑтить дейÑтвие"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr "Сохранить раÑкладку звуковой шины как.."
@@ -949,23 +1124,53 @@ 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
+#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"ÐедопуÑтимое раÑширение файла.\n"
+"ПожалуйÑта, иÑпользуйте .font."
+
+#: editor/editor_audio_buses.cpp
msgid "Add Bus"
msgstr "Добавить"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "Создать новый реÑурÑ"
+
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "Загрузить"
#: editor/editor_audio_buses.cpp
+#, fuzzy
+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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Save this Bus Layout to a file."
+msgstr "Сохранить раÑкладку звуковой шины как.."
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+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 "ÐедопуÑтимое имÑ."
@@ -1072,6 +1277,11 @@ msgid "Updating scene.."
msgstr "Обновление Ñцены.."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "ПожалуйÑта Ñначала Ñохраните Ñцену."
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "Выбрать каталог"
@@ -1149,6 +1359,22 @@ msgstr "Ð’Ñе файлы (*)"
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
@@ -1231,7 +1457,7 @@ msgstr "(Ре)Импортировать"
#: editor/editor_help.cpp editor/editor_node.cpp
#: editor/plugins/script_editor_plugin.cpp
msgid "Search Help"
-msgstr "Помощь (ПоиÑк)"
+msgstr "Помощь"
#: editor/editor_help.cpp
msgid "Class List:"
@@ -1274,6 +1500,15 @@ msgid "Signals:"
msgstr "Сигналы:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Ðнимации"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "КонÑтанты:"
@@ -1290,7 +1525,8 @@ msgid "Search Text"
msgstr "ИÑкать текÑÑ‚"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " Вывод:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1340,6 +1576,11 @@ msgid "Creating Thumbnail"
msgstr "Создание ÑÑкизов"
#: editor/editor_node.cpp
+#, fuzzy
+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 ""
@@ -1415,7 +1656,6 @@ msgid "There is no defined scene to run."
msgstr "Ðет определённой Ñцены, чтобы работать."
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"No main scene has ever been defined, select one?\n"
"You can change it later in \"Project Settings\" under the 'application' "
@@ -1470,26 +1710,34 @@ msgid "Quick Open Script.."
msgstr "БыÑтро открыть Ñкрипт.."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "Да"
+#, fuzzy
+msgid "Save & Close"
+msgstr "Сохранить файл"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "Закрыть Ñцену? (ÐеÑохранённые Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð±ÑƒÐ´ÑƒÑ‚ потерÑны.)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
msgstr "Сохранить Ñцену как.."
#: editor/editor_node.cpp
-#, fuzzy
msgid "No"
-msgstr "Узел"
+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 "ЭкÑпортировать библиотеку полиÑеток"
@@ -1499,12 +1747,9 @@ msgid "Export Tile Set"
msgstr "ЭкÑпортировать набор тайлов"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "Выйти"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "Выйти из редактора?"
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "Эта Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ может быть выполнена без Ñцены."
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1527,18 +1772,52 @@ msgid "Quick Run Scene.."
msgstr "БыÑтро запуÑтить Ñцену.."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "Выйти"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "Выйти из редактора?"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "Менеджер проектов"
+
+#: editor/editor_node.cpp
+#, fuzzy
+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 ""
-"Открыть менеджер проектов? \n"
-"(ÐеÑохранённые Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð±ÑƒÐ´ÑƒÑ‚ потерÑны.)"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "Выберите главную Ñцену"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1577,6 +1856,11 @@ msgstr "Сохранить макет"
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 "Смена вкладки Ñо Ñценой"
@@ -1593,6 +1877,11 @@ msgstr "Ещё %d файла(ов) или папка(ок)"
msgid "Distraction Free Mode"
msgstr "Свободный режим"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "Свободный режим"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "Сцена"
@@ -1641,10 +1930,6 @@ msgstr "Сохранить вÑе Ñцены"
msgid "Close Scene"
msgstr "Закрыть Ñцену"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr "Закрыть и перейти к предыдущей Ñцене"
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "Открыть поÑледнее"
@@ -1681,9 +1966,8 @@ msgid "Miscellaneous project or scene-wide tools."
msgstr "Прочие инÑтрументы."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Project"
-msgstr "Ðовый проект"
+msgstr "Проект"
#: editor/editor_node.cpp
msgid "Project Settings"
@@ -1797,9 +2081,8 @@ msgstr ""
"Ñетевой файловой ÑиÑтемой."
#: editor/editor_node.cpp
-#, fuzzy
msgid "Editor"
-msgstr "Редактировать"
+msgstr "Редактор"
#: editor/editor_node.cpp editor/settings_config_dialog.cpp
msgid "Editor Settings"
@@ -1826,17 +2109,16 @@ msgid "Classes"
msgstr "КлаÑÑÑ‹"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Online Docs"
-msgstr "Закрыть документацию"
+msgstr "Онлайн Документы"
#: editor/editor_node.cpp
msgid "Q&A"
-msgstr ""
+msgstr "ВопроÑÑ‹ и ответы"
#: editor/editor_node.cpp
msgid "Issue Tracker"
-msgstr ""
+msgstr "СиÑтема отÑÐ»ÐµÐ¶Ð¸Ð²Ð°Ð½Ð¸Ñ Ð¾ÑˆÐ¸Ð±Ð¾Ðº"
#: editor/editor_node.cpp
msgid "About"
@@ -1946,6 +2228,10 @@ msgstr "Узел"
msgid "Output"
msgstr "Вывод"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "Переимпортировать"
@@ -1955,26 +2241,10 @@ msgid "Update"
msgstr "Обновление"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "СпаÑибо от ÑообщеÑтва Godot!"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "СпаÑибо!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "Импортировать шаблоны из ZIP файла"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "ЭкÑпортировать проект"
@@ -1995,38 +2265,41 @@ msgid "Open & Run a Script"
msgstr "Открыть и запуÑтить Ñкрипт"
#: editor/editor_node.cpp
+#, fuzzy
+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
-#, fuzzy
msgid "Open 2D Editor"
-msgstr "Открыть в редакторе"
+msgstr "Открыть 2D редактор"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 3D Editor"
-msgstr "Открыть в редакторе"
+msgstr "Открыть 3D редактор"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Script Editor"
-msgstr "Открыть в редакторе"
+msgstr "Открыть редактор Ñкриптов"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Asset Library"
-msgstr "ЭкÑпортировать библиотеку"
+msgstr "Открыть библиотеку шаблонов"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the next Editor"
-msgstr "Открыть в редакторе"
+msgstr "Открыть Ñледующий редактор"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the previous Editor"
-msgstr "Открыть в редакторе"
+msgstr "Открыть предыдущий редактор"
#: editor/editor_plugin_settings.cpp
msgid "Installed Plugins:"
@@ -2104,6 +2377,16 @@ msgstr "Переимпортировать"
msgid "Re-Import Changed Resources"
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 "Пишите ваш код в методе _run()."
@@ -2243,10 +2526,28 @@ msgid "Cannot navigate to '"
msgstr "Ðе удалоÑÑŒ перейти к '"
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "Сохранить и переимпортировать"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "ИÑточник:"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr "Файл Ð½Ð°Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¸ иÑходный файлы Ñовпадают, нечего делать."
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr "Путь Ð½Ð°Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¸ иÑходный пути Ñовпадают, нечего делать."
@@ -2255,6 +2556,20 @@ msgid "Can't move directories to within themselves."
msgstr "Ðевозможно перемеÑтить каталоги внутрь ÑебÑ."
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Ошибка при загрузке изображениÑ:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "Ошибка импортированиÑ:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr "Ðевозможно работать Ñ '..'"
@@ -2331,6 +2646,12 @@ 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 "ПеремеÑтить"
@@ -2342,10 +2663,31 @@ msgstr "Добавить в группу"
msgid "Remove from Group"
msgstr "Удалить из группы"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "ПоверхноÑтей %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "Импорт 3D Ñцены"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2384,6 +2726,14 @@ 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 " Файлы"
@@ -2470,13 +2820,12 @@ msgid "No target font resource!"
msgstr "Ðет целевого реÑурÑа шрифта!"
#: editor/io_plugins/editor_font_import_plugin.cpp
-#, fuzzy
msgid ""
"Invalid file extension.\n"
"Please use .font."
msgstr ""
"ÐедопуÑтимое раÑширение файла.\n"
-"ПожалуйÑта, иÑпользуйте .fnt."
+"ПожалуйÑта, иÑпользуйте .font."
#: editor/io_plugins/editor_font_import_plugin.cpp
msgid "Can't load/process source font."
@@ -2577,6 +2926,10 @@ msgstr "ИÑÑ…Ð¾Ð´Ð½Ð°Ñ Ð¿Ð¾Ð»Ð¸Ñетка(и):"
msgid "Mesh"
msgstr "ПолиÑетка"
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "ПоверхноÑтей %d"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr "Ðет ÑÑмплов Ð´Ð»Ñ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚Ð°!"
@@ -2958,9 +3311,8 @@ msgid "Compress"
msgstr "Сжимать"
#: editor/io_plugins/editor_translation_import_plugin.cpp
-#, fuzzy
msgid "Add to Project (project.godot)"
-msgstr "Добавить к проекту (godot.cfg)"
+msgstr "Добавить к проекту (project.godot)"
#: editor/io_plugins/editor_translation_import_plugin.cpp
msgid "Import Languages:"
@@ -3166,6 +3518,11 @@ msgid "New name:"
msgstr "Ðовое имÑ:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Редактировать фильтры узла"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr "МаÑштаб:"
@@ -3481,6 +3838,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Редактировать"
@@ -3513,10 +3871,6 @@ msgid "Use Pixel Snap"
msgstr "ИÑпользовать попикÑельную привÑзку"
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr "РаÑÑ‚Ñнуть до размера родителей"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr "Скелет.."
@@ -3625,11 +3979,6 @@ msgstr "Эта Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ñ‚Ñ€ÐµÐ±ÑƒÐµÑ‚ одного выбранного
msgid "Change default type"
msgstr "Изменить тип по умолчанию"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "Ок"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3669,6 +4018,14 @@ msgstr "Удалена точка полигона"
msgid "Create a new polygon from scratch."
msgstr "Создать новый полигон Ñ Ð½ÑƒÐ»Ñ."
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr "Создан Poly3D"
@@ -3709,22 +4066,53 @@ msgstr "Обновить из Ñцены"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
-msgid "Add point"
-msgstr "Добавить вход"
+msgid "Modify Curve Point"
+msgstr "Изменить кривую"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "Изменена карта кривой"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+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 "Удалить точку пути"
+msgstr "Удалить точку"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Left linear"
+msgstr "Линейный"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Right linear"
+msgstr "Вид Ñправа"
+
+#: editor/plugins/curve_editor_plugin.cpp
msgid "Load preset"
-msgstr "Загрузить реÑурÑ"
+msgstr "Загрузить заготовку"
#: editor/plugins/curve_editor_plugin.cpp
-msgid "Modify Curve"
-msgstr "Изменить кривую"
+#, fuzzy
+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"
@@ -3748,6 +4136,12 @@ 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 "Создан затенÑющий полигон"
@@ -4009,13 +4403,12 @@ msgstr "МаÑка выброÑа очищена"
#: editor/plugins/particles_2d_editor_plugin.cpp
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generating AABB"
msgstr "Генерировать AABB"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
-msgstr ""
+msgstr "Возможно уÑтановить точку только в ParticlesMaterial материал"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Error loading image:"
@@ -4031,36 +4424,38 @@ msgstr "УÑтановлена маÑка выброÑа"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generate Visibility Rect"
-msgstr ""
+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
+#, fuzzy
+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
-#, 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."
@@ -4123,7 +4518,6 @@ msgid "Emission Source: "
msgstr "ИÑточник излучениÑ: "
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generate Visibility AABB"
msgstr "Генерировать AABB"
@@ -4359,9 +4753,14 @@ msgid "Pitch"
msgstr "Ð’Ñ‹Ñота"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Clear Recent Files"
-msgstr "ОчиÑтить коÑти"
+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"
@@ -4388,6 +4787,10 @@ 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 "Следующий Ñкрипт"
@@ -4440,6 +4843,11 @@ msgid "Close All"
msgstr "Закрыть вÑÑ‘"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+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.."
@@ -4472,6 +4880,11 @@ msgid "Keep Debugger Open"
msgstr "ОÑтавить отладчик открытым"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "Открыть Ñледующий редактор"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr "Окно"
@@ -4484,9 +4897,8 @@ msgid "Move Right"
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."
@@ -4540,25 +4952,28 @@ 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
-#, fuzzy
msgid "Convert Case"
-msgstr "Преобразование изображений"
+msgstr "Переключить региÑÑ‚Ñ€"
#: editor/plugins/script_text_editor.cpp
msgid "Uppercase"
-msgstr ""
+msgstr "ВЕРХÐИЙ РЕГИСТР"
#: editor/plugins/script_text_editor.cpp
msgid "Lowercase"
-msgstr ""
+msgstr "нижний региÑÑ‚Ñ€"
#: editor/plugins/script_text_editor.cpp
msgid "Capitalize"
-msgstr ""
+msgstr "С ПропиÑной"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp scene/gui/line_edit.cpp
@@ -4587,6 +5002,11 @@ msgid "Move Down"
msgstr "ПеремеÑтить вниз"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Удалить точку"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr "Убрать отÑтуп Ñлева"
@@ -4612,11 +5032,11 @@ msgstr "Удаление пробелов в конце Ñтрок"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Spaces"
-msgstr ""
+msgstr "Преобразовать отÑтуп в пробелы"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Tabs"
-msgstr ""
+msgstr "Преобразовать отÑтуп в табулÑцию"
#: editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
@@ -4640,14 +5060,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
@@ -4674,7 +5092,7 @@ msgstr "КонтекÑÑ‚Ð½Ð°Ñ Ñправка"
#: editor/plugins/shader_editor_plugin.cpp
msgid "Shader"
-msgstr ""
+msgstr "Шейдер"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Scalar Constant"
@@ -4893,63 +5311,28 @@ msgid "Animation Key Inserted."
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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "Вперёд"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "В обратном направлении"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "КолёÑико вниз."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
-msgstr ""
+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 ""
+msgstr "Вызовы отриÑовки"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Vertices"
-msgstr "ВертекÑ"
+msgstr "Вершины"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align with view"
@@ -4968,33 +5351,81 @@ msgid "Display Overdraw"
msgstr "Режим проÑвечиваниÑ"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Display Unshaded"
msgstr "Режим без теней"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Environment"
msgstr "Окружение"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Gizmos"
-msgstr "Вещицы"
+msgstr "Гизмо"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Information"
-msgstr ""
+msgstr "ИнформациÑ"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Audio Listener"
msgstr "ПроÑлушиватель звука"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "preview"
+msgstr "ПредпроÑмотр"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr "XForm диалоговое окно"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "Режим выделениÑ"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid ""
+"Drag: Rotate\n"
+"Alt+Drag: Move\n"
+"Alt+RMB: Depth list selection"
+msgstr "Alt+ПКМ: СпиÑок выбора глубины"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode (W)"
msgstr "Режим Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ (W)"
@@ -5051,24 +5482,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 "Ctrl: Поворот"
+msgstr "ИнÑтрумент поворот"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Scale"
-msgstr "МаÑштаб:"
+msgstr "ИнÑтрумент маÑштаб"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform"
@@ -5115,6 +5542,7 @@ msgid "View Grid"
msgstr "Отображать Ñетку"
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "ÐаÑтройки"
@@ -5243,6 +5671,11 @@ msgid "StyleBox Preview:"
msgstr "StyleBox предпроÑмотр:"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
+msgid "Set Region Rect"
+msgstr "УÑтановить прÑмоугольник региона"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
msgstr "Режим привÑзки:"
@@ -5300,6 +5733,16 @@ msgid "Remove Item"
msgstr "Удалить Ñлемент"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Удалить Ñлемент клаÑÑа"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Удалить"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr "Тема"
@@ -5367,7 +5810,7 @@ msgstr "Вкладка 2"
msgid "Tab 3"
msgstr "Вкладка 3"
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr "Тип:"
@@ -5389,12 +5832,27 @@ msgid "Color"
msgstr "Цвет"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "ОчиÑтить выделенное"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr "РиÑовать карту тайлов"
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "Дублировать"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "Линейный"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Bucket Fill"
+msgstr "Заливка"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5429,10 +5887,6 @@ msgid "Pick Tile"
msgstr "Выбрать тайл"
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr "Выделение"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr "Поворот на 0 градуÑов"
@@ -5492,7 +5946,7 @@ msgstr "Удалить '%s'?"
msgid "Presets"
msgstr "ПредуÑтановки"
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "Добавить.."
@@ -5541,6 +5995,24 @@ msgid "Make Patch"
msgstr "Создать латку"
#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "ТекÑтура"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "СпиÑок методов:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr "ЭкÑпортировать PCK/Zip"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr "Шаблоны ÑкÑпорта Ð´Ð»Ñ Ñтой платформы отÑутÑтвуют:"
@@ -5553,14 +6025,12 @@ msgid "Invalid project path, the path must exist!"
msgstr "Ðеверный путь к проекту, путь должен ÑущеÑтвовать!"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project path, project.godot must not exist."
-msgstr "ÐедопуÑтимый путь, не должен приÑутÑтвовать godot.cfg."
+msgstr "ÐедопуÑтимый путь, project.godot не должен приÑутÑтвовать."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project path, project.godot must exist."
-msgstr "ÐедопуÑтимый путь, должен приÑутÑтвовать godot.cfg."
+msgstr "ÐедопуÑтимый путь, project.godot должен приÑутÑтвовать."
#: editor/project_manager.cpp
msgid "Imported Project"
@@ -5571,19 +6041,14 @@ msgid "Invalid project path (changed anything?)."
msgstr "Ðеверный путь к проекту (Что-то изменили?)."
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't create project.godot in project path."
-msgstr "Ðе удалоÑÑŒ Ñоздать godot.cfg в папке проекта."
+msgstr "Ðе удалоÑÑŒ Ñоздать project.godot в папке проекта."
#: editor/project_manager.cpp
msgid "The following files failed extraction from package:"
msgstr "Следующие файлы не удалоÑÑŒ Ð¸Ð·Ð²Ð»ÐµÑ‡ÐµÐ½Ð¸Ñ Ð¸Ð· пакета:"
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr "Пакет уÑпешно уÑтановлен!"
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "Импортировать ÑущеÑтвующий проект"
@@ -5628,6 +6093,23 @@ msgid "Are you sure to open more than one project?"
msgstr "Вы уверены, что хотите открыть более одного проекта?"
#: 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 ""
+"Ðе назначена Ð³Ð»Ð°Ð²Ð½Ð°Ñ Ñцена. Хотите выбрать?\n"
+"Позже вы можете указать её в параметре \"main_scene\" раÑположенном\n"
+"в \"ÐаÑтройки проекта - ОÑновное - application\"."
+
+#: 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 "Ð’Ñ‹ уверены, что хотите запуÑтить более одного проекта?"
@@ -5644,10 +6126,6 @@ msgstr ""
"Подтверждаете?"
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr "Менеджер проектов"
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr "СпиÑок проектов"
@@ -5668,264 +6146,295 @@ msgid "New Project"
msgstr "Ðовый проект"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Templates"
-msgstr "Удалить шаблон"
+msgstr "Шаблоны"
#: editor/project_manager.cpp
msgid "Exit"
msgstr "Выход"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Ðе удаетÑÑ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡Ð¸Ñ‚ÑŒÑÑ."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "Кнопка "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr "Кнопка геймпада"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr "ОÑÑŒ геймпада"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr "Кнопка мыши"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr "ÐедопуÑтимое название дейÑÑ‚Ð²Ð¸Ñ (подойдёт вÑÑ‘ кроме '/' или ':')."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr "ДейÑтвие '%s' уже ÑущеÑтвует!"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr "Переименовать дейÑтвие"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr "Добавить дейÑтвие"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr "Control+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "Ðажмите любую клавишу..."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr "Ð˜Ð½Ð´ÐµÐºÑ ÐºÐ»Ð°Ð²Ð¸ÑˆÐ¸ мыши:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr "Ð›ÐµÐ²Ð°Ñ ÐºÐ½Ð¾Ð¿ÐºÐ° мыши"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr "ÐŸÑ€Ð°Ð²Ð°Ñ ÐºÐ½Ð¾Ð¿ÐºÐ° мыши"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr "СреднÑÑ ÐºÐ½Ð¾Ð¿ÐºÐ° мыши"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr "КолёÑико вверх"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr "КолёÑико вниз"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr "Кнопка 6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr "Кнопка 7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr "Кнопка 8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr "Кнопка 9"
-#: editor/project_settings.cpp
+#: 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.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "ОÑÑŒ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr "Ð˜Ð½Ð´ÐµÐºÑ ÐºÐ½Ð¾Ð¿ÐºÐ¸ джойÑтика:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr "Добавить дейÑтвие"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr "Удалить дейÑтвие"
-#: editor/project_settings.cpp
-#, fuzzy
+#: editor/project_settings_editor.cpp
msgid "Add Event"
-msgstr "Добавить пуÑтоту"
+msgstr "Добавить Ñобытие"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "УÑтройÑтво"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Кнопка"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "Ð›ÐµÐ²Ð°Ñ ÐºÐ½Ð¾Ð¿ÐºÐ°."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "ÐŸÑ€Ð°Ð²Ð°Ñ ÐºÐ½Ð¾Ð¿ÐºÐ°."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "СреднÑÑ ÐºÐ½Ð¾Ð¿ÐºÐ°."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "КолёÑико вверх."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "КолёÑико вниз."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Добавить получающее ÑвойÑтво"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "No property '"
+msgstr "Параметр:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "ÐаÑтройки"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "Удалить вход"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "Ошибка ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð½Ð°Ñтроек."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "ÐаÑтройки Ñохранены нормально."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr "Добавлен перевод"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "Перевод удалён"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr "Добавлен путь перенаправлениÑ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr "Перенаправлен реÑÑƒÑ€Ñ Ð¿ÐµÑ€ÐµÐ½Ð°Ð¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr "Изменён Ñзык перенаправлениÑ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr "Удалён реÑÑƒÑ€Ñ Ð¿ÐµÑ€ÐµÐ½Ð°Ð¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr "Удалён параметр реÑурÑа перенаправлениÑ"
-#: editor/project_settings.cpp
-#, fuzzy
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
-msgstr "ÐаÑтройки проекта (engine.cfg)"
+msgstr "ÐаÑтройки проекта (project.godot)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr "ОÑновное"
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr "Параметр:"
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr "Удалить"
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr "Скопировать на платформу.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
+msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr "СпиÑок дейÑтвий"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr "ДейÑтвие:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr "ДевайÑ:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr "ИндекÑ:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr "ЛокализациÑ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr "Переводы"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr "Переводы:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr "ПереназначениÑ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr "РеÑурÑÑ‹:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr "Заменить на Ñзык:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr "Язык"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "Ðвтозагрузка"
@@ -5966,6 +6475,11 @@ msgid "Assign"
msgstr "Ðазначить"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Выбрать узел"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr "Ðовый Ñкрипт"
@@ -5978,6 +6492,11 @@ msgid "Error loading file: Not a resource!"
msgstr "Ошибка загрузки файла: Это не реÑурÑ!"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "Выберите Узел(узлы) Ð´Ð»Ñ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚Ð°"
+
+#: editor/property_editor.cpp
msgid "Pick a Node"
msgstr "Выберите узел"
@@ -6075,6 +6594,11 @@ msgstr "Ðргументы главной Ñцены:"
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 "Ðет Ñ€Ð¾Ð´Ð¸Ñ‚ÐµÐ»Ñ Ð´Ð»Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ñюда Ñцены."
@@ -6120,10 +6644,6 @@ msgid "Delete Node(s)?"
msgstr "Удалить узел(узлы)?"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "Эта Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð½Ðµ может быть выполнена без Ñцены."
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr "Ðевозможно выполнить Ñ ÐºÐ¾Ñ€Ð½ÐµÐ¼."
@@ -6136,6 +6656,18 @@ 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 "Имеет ÑмыÑл!"
@@ -6168,9 +6700,8 @@ msgid "Error duplicating scene to save it."
msgstr "Ошибка Ð´ÑƒÐ±Ð»Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñцены, при её Ñохранении."
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Sub-Resources:"
-msgstr "РеÑурÑÑ‹:"
+msgstr "Вложенные РеÑурÑÑ‹:"
#: editor/scene_tree_dock.cpp
msgid "Edit Groups"
@@ -6181,6 +6712,14 @@ msgid "Edit Connections"
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 "Удалить узел(узлы)"
@@ -6233,6 +6772,11 @@ msgstr ""
"не ÑущеÑтвует."
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "Фильтры"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr "Прикрепить новый или ÑущеÑтвующий Ñкрипт к выбранному узлу."
@@ -6240,6 +6784,14 @@ msgstr "Прикрепить новый или ÑущеÑтвующий Ñкри
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 "Переключена видимоÑÑ‚ÑŒ Spatial"
@@ -6250,56 +6802,59 @@ msgstr "Переключена видимоÑÑ‚ÑŒ CanvasItem"
#: editor/scene_tree_editor.cpp
msgid "Node configuration warning:"
-msgstr ""
+msgstr "Конфигурации узла, предупреждение:"
#: editor/scene_tree_editor.cpp
msgid ""
"Node has connection(s) and group(s)\n"
"Click to show signals dock."
msgstr ""
+"Узел Ñодержит ÑвÑзи и группы\n"
+"Ðажмите, чтобы показать панель Ñигналов."
#: editor/scene_tree_editor.cpp
msgid ""
"Node has connections.\n"
"Click to show signals dock."
msgstr ""
+"Узел Ñодержит ÑвÑзи.\n"
+"Ðажмите, чтобы показать панель Ñигналов."
#: editor/scene_tree_editor.cpp
msgid ""
"Node is in group(s).\n"
"Click to show groups dock."
msgstr ""
-
-#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "Параметры отладки"
+"Узел принадлежит к группе.\n"
+"Ðажмите, чтобы показать панель групп."
#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr "ЭкземплÑÑ€:"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Open script"
-msgstr "Следующий Ñкрипт"
+msgstr "Открыть Ñкрипт"
#: editor/scene_tree_editor.cpp
msgid ""
"Node is locked.\n"
"Click to unlock"
msgstr ""
+"Узел заблокирован.\n"
+"Ðажмите чтобы разблокировать"
#: editor/scene_tree_editor.cpp
msgid ""
"Children are not selectable.\n"
"Click to make selectable"
msgstr ""
+"Потомки не выделÑÑŽÑ‚ÑÑ.\n"
+"Ðажмите чтобы выделÑлиÑÑŒ"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Toggle Visibility"
-msgstr "Переключена видимоÑÑ‚ÑŒ Spatial"
+msgstr "Переключение видимоÑти"
#: editor/scene_tree_editor.cpp
msgid "Invalid node name, the following characters are not allowed:"
@@ -6314,32 +6869,9 @@ msgid "Scene Tree (Nodes):"
msgstr "Дерево Ñцены (Узлы):"
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr "Редактируемые потомки"
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr "Загрузить как заполнитель"
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr "ОтброÑить инÑтанÑинг"
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr "Открыть в редакторе"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr "ОчиÑтить наÑледование"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr "ОчиÑтить наÑледование? (ÐÐµÐ»ÑŒÐ·Ñ Ð¾Ñ‚Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ!)"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr "ОчиÑтить!"
+#, fuzzy
+msgid "Node Configuration Warning!"
+msgstr "Конфигурации узла, предупреждение:"
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -6347,14 +6879,22 @@ msgstr "Выбрать узел"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Ошибка при загрузке изображениÑ:"
+
+#: editor/script_create_dialog.cpp
msgid "Error - Could not create script in filesystem."
-msgstr "Ðе удалоÑÑŒ Ñоздать Ñкрипт в файловой ÑиÑтеме."
+msgstr "Ошибка - Ðе удалоÑÑŒ Ñоздать Ñкрипт в файловой ÑиÑтеме."
#: editor/script_create_dialog.cpp
msgid "Error loading script from %s"
msgstr "Ошибка при загрузке Ñкрипта из %s"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "Ð/Д"
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "Ðе указан путь"
@@ -6372,66 +6912,53 @@ msgstr "ÐедопуÑтимое раÑширение"
#: editor/script_create_dialog.cpp
msgid "Wrong extension chosen"
-msgstr ""
+msgstr "Выбрано неверное раÑширение"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid Path"
-msgstr "ÐедопуÑтимый путь."
+msgstr "Ðеверный путь"
#: editor/script_create_dialog.cpp
msgid "Invalid class name"
msgstr "ÐедопуÑтимое Ð¸Ð¼Ñ ÐºÐ»Ð°ÑÑа"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid inherited parent name or path"
-msgstr "Ðеверный Ð¸Ð½Ð´ÐµÐºÑ ÑвойÑтва имени."
+msgstr "Ðеверное Ð¸Ð¼Ñ Ð¸Ð»Ð¸ путь наÑледуемого предка"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script valid"
-msgstr "Скрипт"
+msgstr "Скрипт корректен"
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9 and _"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr "Ð/Д"
+msgstr "ДопуÑкаютÑÑ: a-z, A-Z, 0-9 и _"
#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
-msgstr ""
+msgstr "Ð’Ñтроенный Ñкрипт (в файл Ñцены)"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Create new script file"
msgstr "Создать новый Ñкрипт"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Load existing script file"
msgstr "Загрузить ÑущеÑтвующий Ñкрипт"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Inherits"
-msgstr "ÐаÑледует:"
+msgstr "ÐаÑледует"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Class Name"
-msgstr "Ð˜Ð¼Ñ ÐšÐ»Ð°ÑÑа:"
+msgstr "Ð˜Ð¼Ñ ÐšÐ»Ð°ÑÑа"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Template"
-msgstr "Удалить шаблон"
+msgstr "Шаблон"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Built-in Script"
msgstr "Ð’Ñтроенный Скрипт"
@@ -6572,6 +7099,10 @@ 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 "Изменён FOV камеры"
@@ -6605,7 +7136,7 @@ msgstr "Изменены границы уведомителÑ"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Particles AABB"
-msgstr ""
+msgstr "Изменить AABB чаÑтиц"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Probe Extents"
@@ -6654,6 +7185,137 @@ msgstr "ÐедопуÑтимый формат ÑкземплÑра ÑловарÑ
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
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Удалить выделенное"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Дублировать выделенное"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "Ctrl: Поворот"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "Ctrl: Поворот"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Z"
+msgstr "Ctrl: Поворот"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "Создать новый"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "Создать новый проект"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Area"
+msgstr "Стирать карту тайлов"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Только выделÑÑ‚ÑŒ"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Только выделÑÑ‚ÑŒ"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "Параметры привÑзки"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "ЭкземплÑÑ€:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr " Файлы"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6691,6 +7353,31 @@ msgid "Stack overflow with stack depth: "
msgstr "Переполнение Ñтека Ñ Ð³Ð»ÑƒÐ±Ð¸Ð½Ð¾Ð¹ Ñтека: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Редактирование аргументов Ñигнала:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Изменение типа Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð¼Ð°ÑÑива"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Изменено входное имÑ"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Default Value"
+msgstr "Изменено Ñтандартное значение"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Редактировать переменную:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Функции:"
@@ -6731,26 +7418,6 @@ msgid "Add Signal"
msgstr "Добавить Ñигнал"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Удалить функцию"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Удалить переменную"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Редактирование переменной:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Удалить Ñигнал"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "Редактирование Ñигнала:"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
msgstr "Изменить выражение"
@@ -6759,6 +7426,16 @@ msgid "Add Node"
msgstr "Добавить узел"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Удалить недопуÑтимые ключи"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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 ""
"Зажмите Meta, чтобы добавить Getter. Зажмите Shift, чтобы добавить "
@@ -6803,6 +7480,26 @@ msgid "Add Setter Property"
msgstr "Добавить уÑтанавливающее ÑвойÑтво"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "Изменить тип"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Удалить узел(узлы)"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Удалён граф шейдера"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "ПриÑоединить к узлу:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "УÑловие"
@@ -6831,6 +7528,56 @@ msgid "Get"
msgstr "Получить"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Изменено входное имÑ"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "Ðевозможно работать Ñ '..'"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "Ðет реÑурÑа в буфере обмена!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Ð’Ñтавить узлы"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "Удалить функцию"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Редактировать переменную:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Удалить переменную"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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 "Базовый тип:"
@@ -6851,10 +7598,6 @@ msgid "Edit Variable:"
msgstr "Редактировать переменную:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Изменить"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Удалить выделенное"
@@ -6931,14 +7674,6 @@ msgstr ""
"ÐедопуÑтимое значение, возвращаемое _step(), должно быть целое чиÑло(seq "
"out) или Ñтрока (error)."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "проÑто нажата"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "проÑто отпущена"
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr "ЗапуÑтить в браузере"
@@ -6959,79 +7694,6 @@ msgstr "Ðе удалоÑÑŒ прочитать файл:\n"
msgid "Could not open template for export:\n"
msgstr "Ðе удалоÑÑŒ открыть шаблон Ð´Ð»Ñ ÑкÑпорта:\n"
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr "Ðе могу прочитать файл Ñертификата. Уверены, что путь и пароль верны?"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "Ошибка при Ñоздании объекта подпиÑи."
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr "Ошибка при Ñоздании подпиÑи пакета."
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"Шаблоны ÑкÑпорта не найдены.\n"
-"Скачайте и уÑтановите шаблоны ÑкÑпорта."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr "ПользовательÑкий отладочный пакет не найден."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr "ПользовательÑкий релизный пакет не найден."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr "Ðеверное уникальное имÑ."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr "Ðеверный GUID продукта."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr "Ðеверный GUID издателÑ."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "ÐедопуÑтимый цвет фона."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "Ðеверные размеры логотипа Ð´Ð»Ñ Ð¼Ð°Ð³Ð°Ð·Ð¸Ð½Ð° (должны быть 50Ñ…50)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr "Ðеверные размеры квадратного логотипа 44x44 (должны быть 44x44)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr "Ðеверные размеры квадратного логотипа 71x71 (должны быть 71x71)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr "Ðеверные размеры квадратного логотипа 150x150 (должны быть 150x150)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr "Ðеверные размеры квадратного логотипа 310x310 (должны быть 310x310)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr "Ðеверные размеры широкого логотипа 310x150 (должны быть 310x150)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr "Ðеверные размеры заÑтавки (должны быть 620x300)."
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7129,6 +7791,7 @@ 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."
@@ -7136,6 +7799,13 @@ msgstr ""
"PathFollow2D работает только при уÑтановке его в качеÑтве дочернего узла "
"Path2D."
+#: 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 ""
@@ -7166,23 +7836,33 @@ msgstr ""
"VisibilityEnable2D работает наилучшим образом при иÑпользовании ÐºÐ¾Ñ€Ð½Ñ "
"редактируемой Ñцены, как прÑмого родителÑ."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"The controller id must not be 0 or this controller will not be bound to an "
+"actual controller"
msgstr ""
-"CollisionShape Ñлужит только Ð´Ð»Ñ Ð¾Ð±ÐµÑÐ¿ÐµÑ‡ÐµÐ½Ð¸Ñ Ñтолкновений фигурам типа "
-"CollisionObject. ПожалуйÑта иÑпользовать его только в качеÑтве дочернего Ð´Ð»Ñ "
-"Area, StaticBody, RigidBody, KinematicBody и др. чтобы придать им форму."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRAnchor must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"Shape должен быть предуÑмотрен Ð´Ð»Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¹ CollisionShape. ПожалуйÑта, "
-"Ñоздайте shape-реÑÑƒÑ€Ñ Ð´Ð»Ñ Ñтого!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7198,6 +7878,24 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "ПуÑтой CollisionPolygon не влиÑет на ÑтолкновениÑ."
+#: 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 ""
+"CollisionShape Ñлужит только Ð´Ð»Ñ Ð¾Ð±ÐµÑÐ¿ÐµÑ‡ÐµÐ½Ð¸Ñ Ñтолкновений фигурам типа "
+"CollisionObject. ПожалуйÑта иÑпользовать его только в качеÑтве дочернего Ð´Ð»Ñ "
+"Area, StaticBody, RigidBody, KinematicBody и др. чтобы придать им форму."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"Shape должен быть предуÑмотрен Ð´Ð»Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ð¹ CollisionShape. ПожалуйÑта, "
+"Ñоздайте shape-реÑÑƒÑ€Ñ Ð´Ð»Ñ Ñтого!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7214,6 +7912,13 @@ 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
@@ -7237,12 +7942,12 @@ msgstr ""
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
-msgstr "Режим запуÑка:"
+msgid "Raw Mode"
+msgstr "Режим оÑмотра"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
-msgstr ""
+msgstr "Добавить текущий цвет как преÑет"
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -7252,22 +7957,6 @@ msgstr "Внимание!"
msgid "Please Confirm..."
msgstr "Подтверждение..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Открыть файл"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Открыть файл(ы)"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Открыть каталог"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Открыть каталог или файл"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7293,11 +7982,13 @@ msgstr ""
"уÑтановите\n"
"минимальный размер вручную."
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
msgstr ""
+"Среда по умолчанию, как определено в ÐаÑтройках проекта (Rendering -> "
+"Viewport -> Default Environment) не может быть загружена."
#: scene/main/viewport.cpp
msgid ""
@@ -7312,6 +8003,97 @@ msgstr ""
"Ñделайте его целью рендеринга и передайте его внутренние текÑтуры какому-то "
"другому узлу Ð´Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ."
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "Закрыть Ñцену? (ÐеÑохранённые Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð±ÑƒÐ´ÑƒÑ‚ потерÑны.)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "Открыть менеджер проектов? \n"
+#~ "(ÐеÑохранённые Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð±ÑƒÐ´ÑƒÑ‚ потерÑны.)"
+
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "Закрыть и перейти к предыдущей Ñцене"
+
+#~ msgid "Expand to Parent"
+#~ msgstr "РаÑÑ‚Ñнуть до размера родителей"
+
+#~ msgid "Del"
+#~ msgstr "Удалить"
+
+#~ msgid "Copy To Platform.."
+#~ msgstr "Скопировать на платформу.."
+
+#~ msgid "just pressed"
+#~ msgstr "проÑто нажата"
+
+#~ msgid "just released"
+#~ msgstr "проÑто отпущена"
+
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr ""
+#~ "Ðе могу прочитать файл Ñертификата. Уверены, что путь и пароль верны?"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "Ошибка при Ñоздании объекта подпиÑи."
+
+#~ msgid "Error creating the package signature."
+#~ msgstr "Ошибка при Ñоздании подпиÑи пакета."
+
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "Шаблоны ÑкÑпорта не найдены.\n"
+#~ "Скачайте и уÑтановите шаблоны ÑкÑпорта."
+
+#~ msgid "Custom debug package not found."
+#~ msgstr "ПользовательÑкий отладочный пакет не найден."
+
+#~ msgid "Custom release package not found."
+#~ msgstr "ПользовательÑкий релизный пакет не найден."
+
+#~ msgid "Invalid unique name."
+#~ msgstr "Ðеверное уникальное имÑ."
+
+#~ msgid "Invalid product GUID."
+#~ msgstr "Ðеверный GUID продукта."
+
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "Ðеверный GUID издателÑ."
+
+#~ msgid "Invalid background color."
+#~ msgstr "ÐедопуÑтимый цвет фона."
+
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr "Ðеверные размеры логотипа Ð´Ð»Ñ Ð¼Ð°Ð³Ð°Ð·Ð¸Ð½Ð° (должны быть 50Ñ…50)."
+
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr "Ðеверные размеры квадратного логотипа 44x44 (должны быть 44x44)."
+
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr "Ðеверные размеры квадратного логотипа 71x71 (должны быть 71x71)."
+
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr ""
+#~ "Ðеверные размеры квадратного логотипа 150x150 (должны быть 150x150)."
+
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr ""
+#~ "Ðеверные размеры квадратного логотипа 310x310 (должны быть 310x310)."
+
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr "Ðеверные размеры широкого логотипа 310x150 (должны быть 310x150)."
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr "Ðеверные размеры заÑтавки (должны быть 620x300)."
+
+#~ msgid "RAW Mode"
+#~ msgstr "Грубый режим"
+
#~ msgid "Node From Scene"
#~ msgstr "Узел Ñо Ñцены"
@@ -7397,9 +8179,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "Заменено %d Ñовпадений."
-#~ msgid "Please save the scene first."
-#~ msgstr "ПожалуйÑта Ñначала Ñохраните Ñцену."
-
#~ msgid "Save Translatable Strings"
#~ msgstr "Сохранить переводимые Ñтроки"
@@ -7611,9 +8390,6 @@ msgstr ""
#~ msgid "Script Encryption Key (256-bits as hex):"
#~ msgstr "Ключ ÑˆÐ¸Ñ„Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñкрипта (256-бит, а в шеÑтнадцатеричном виде):"
-#~ msgid "Export PCK/Zip"
-#~ msgstr "ЭкÑпортировать PCK/Zip"
-
#~ msgid "Export Project PCK"
#~ msgstr "ЭкÑпортировать PCK проекта"
@@ -7762,9 +8538,6 @@ msgstr ""
#~ msgid "Node Group(s)"
#~ msgstr "Группа(ы) нода"
-#~ msgid "Set region_rect"
-#~ msgstr "УÑтановить прÑмоугольник региона"
-
#~ msgid "Plugin List:"
#~ msgstr "СпиÑок плагинов:"
diff --git a/editor/translations/sk.po b/editor/translations/sk.po
index 0b30bc80f4..b7ac0a7864 100644
--- a/editor/translations/sk.po
+++ b/editor/translations/sk.po
@@ -146,7 +146,8 @@ msgstr ""
msgid "Goto Prev Step"
msgstr ""
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr ""
@@ -380,7 +381,8 @@ msgstr "Súbor:"
msgid "Description:"
msgstr "Popis:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -391,9 +393,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 ""
@@ -466,7 +468,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -527,17 +529,16 @@ msgid "All"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr ""
@@ -553,7 +554,7 @@ msgstr ""
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -565,7 +566,7 @@ msgstr ""
msgid "Reverse"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr ""
@@ -717,14 +718,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr ""
@@ -829,7 +830,7 @@ msgid "Resource"
msgstr ""
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr ""
@@ -909,12 +910,181 @@ msgstr ""
msgid "Delete selected files?"
msgstr ""
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Authors"
+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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "Konštanty:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "Konštanty:"
+
+#: 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
+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
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Všetky vybrané"
+
+#: 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 "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+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 "Move Audio Bus"
+msgstr ""
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -928,21 +1098,45 @@ 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/script_create_dialog.cpp
msgid "Load"
msgstr ""
#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Load an existing Bus Layout."
+msgstr "Popis:"
+
+#: editor/editor_audio_buses.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Save As"
msgstr ""
-#: editor/editor_audio_buses.cpp editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: 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
@@ -1045,6 +1239,10 @@ 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 ""
@@ -1122,6 +1320,22 @@ msgstr ""
msgid "Open"
msgstr "Otvoriť"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Otvoriť súbor"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Otvoriť súbor(y)"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Otvorit prieÄinok"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "OtvoriÅ¥ súbor / prieÄinok"
+
#: 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
@@ -1247,6 +1461,15 @@ msgid "Signals:"
msgstr "Signály:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Popis:"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Konštanty:"
@@ -1264,7 +1487,7 @@ msgid "Search Text"
msgstr ""
#: editor/editor_log.cpp
-msgid " Output:"
+msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1314,6 +1537,10 @@ 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 ""
@@ -1432,11 +1659,12 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr ""
+#, fuzzy
+msgid "Save & Close"
+msgstr "Uložiť súbor"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
@@ -1448,23 +1676,27 @@ msgid "No"
msgstr ""
#: editor/editor_node.cpp
-msgid "This scene has never been saved. Save before running?"
+msgid "Yes"
msgstr ""
#: editor/editor_node.cpp
-msgid "Export Mesh Library"
+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 Tile Set"
+msgid "Export Mesh Library"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
+msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Exit the editor?"
+msgid "This operation can't be done without a selected node."
msgstr ""
#: editor/editor_node.cpp
@@ -1488,9 +1720,28 @@ msgid "Quick Run Scene.."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+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
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Uložiť súbor"
+
+#: 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
@@ -1498,6 +1749,22 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1530,6 +1797,11 @@ msgstr ""
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 ""
@@ -1546,6 +1818,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr ""
@@ -1595,10 +1871,6 @@ msgstr "Uložiť súbor"
msgid "Close Scene"
msgstr ""
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1878,6 +2150,10 @@ msgstr ""
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1887,26 +2163,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr ""
@@ -1927,9 +2187,18 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+msgid "New Inherited"
+msgstr "Popis:"
+
+#: 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
#, fuzzy
msgid "Open 2D Editor"
@@ -2032,6 +2301,16 @@ msgstr ""
msgid "Re-Import Changed Resources"
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 ""
@@ -2168,10 +2447,26 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Source: "
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2180,6 +2475,18 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving file:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving dir:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2256,6 +2563,12 @@ 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 ""
@@ -2267,9 +2580,28 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Single Scene"
+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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2309,6 +2641,14 @@ 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
#, fuzzy
msgid " Files"
msgstr "Súbor:"
@@ -2496,6 +2836,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3077,6 +3421,11 @@ msgid "New name:"
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Súbor:"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr ""
@@ -3388,6 +3737,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr ""
@@ -3420,10 +3770,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3532,11 +3878,6 @@ msgstr ""
msgid "Change default type"
msgstr ""
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr ""
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3574,6 +3915,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3613,6 +3962,18 @@ msgid "Update from Scene"
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
#, fuzzy
msgid "Add point"
msgstr "Signály:"
@@ -3623,11 +3984,28 @@ msgid "Remove point"
msgstr "Všetky vybrané"
#: 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 "Modify Curve"
+#, fuzzy
+msgid "Remove Curve Point"
+msgstr "Všetky vybrané"
+
+#: 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
@@ -3652,6 +4030,12 @@ 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 ""
@@ -3941,6 +4325,11 @@ 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 ""
@@ -4258,6 +4647,12 @@ 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 ""
@@ -4282,6 +4677,10 @@ msgid "Save Theme As.."
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+msgid " Class Reference"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "Next script"
msgstr "Popis:"
@@ -4335,6 +4734,10 @@ msgid "Close All"
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.."
@@ -4367,6 +4770,10 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+msgid "Debug with external editor"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4430,6 +4837,10 @@ msgid ""
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 ""
@@ -4476,6 +4887,10 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+msgid "Delete Line"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4780,91 +5195,99 @@ msgid "Animation Key Inserted."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
+msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
+msgid "Material Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Forward"
+msgid "Shader Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Backwards"
+msgid "Surface Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
+msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Down"
+msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
+msgid "Align with view"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
+msgid "Display Normal"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Material Changes"
+msgid "Display Wireframe"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Shader Changes"
+msgid "Display Overdraw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Surface Changes"
+msgid "Display Unshaded"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
+msgid "View Environment"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
+msgid "View Gizmos"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "View Information"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
+msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
+msgid "Doppler Enable"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
+msgid "Freelook Left"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
+msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
+msgid "Freelook Forward"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
+msgid "Freelook Backwards"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
+msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
+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
@@ -4872,6 +5295,17 @@ 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 ""
@@ -4991,6 +5425,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr ""
@@ -5119,6 +5554,10 @@ 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 ""
@@ -5177,6 +5616,16 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Všetky vybrané"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Všetky vybrané"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5244,7 +5693,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5266,11 +5715,24 @@ msgid "Color"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Všetky vybrané"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr ""
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: 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
@@ -5306,10 +5768,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5369,7 +5827,7 @@ msgstr ""
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5416,6 +5874,22 @@ 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 ""
@@ -5452,10 +5926,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5500,6 +5970,19 @@ 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 ""
@@ -5514,10 +5997,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5546,254 +6025,283 @@ msgstr "Všetky vybrané"
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+msgid "Can't run project"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: 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.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "Os"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "Zariadenie"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "TlaÄidlo"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Add Global Property"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Select an 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 "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr ""
-
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5834,6 +6342,10 @@ msgid "Assign"
msgstr ""
#: editor/property_editor.cpp
+msgid "Select Node"
+msgstr ""
+
+#: editor/property_editor.cpp
#, fuzzy
msgid "New Script"
msgstr "Popis:"
@@ -5847,6 +6359,10 @@ msgid "Error loading file: Not a resource!"
msgstr ""
#: editor/property_editor.cpp
+msgid "Selected node is not a Viewport!"
+msgstr ""
+
+#: editor/property_editor.cpp
#, fuzzy
msgid "Pick a Node"
msgstr "Vložiť"
@@ -5943,6 +6459,11 @@ msgstr ""
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 ""
@@ -5986,10 +6507,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6002,6 +6519,18 @@ 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 ""
@@ -6044,6 +6573,14 @@ msgid "Edit Connections"
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 ""
@@ -6096,6 +6633,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "Filter:"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr ""
@@ -6103,6 +6645,14 @@ msgstr ""
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 ""
@@ -6134,10 +6684,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6175,35 +6721,15 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Select a Node"
msgstr ""
-#: editor/scene_tree_editor.cpp
-msgid "Select a Node"
+#: editor/script_create_dialog.cpp
+msgid "Error loading template '%s'"
msgstr ""
#: editor/script_create_dialog.cpp
@@ -6215,6 +6741,10 @@ 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 ""
@@ -6255,10 +6785,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6428,6 +6954,10 @@ 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 ""
@@ -6509,6 +7039,125 @@ msgstr ""
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
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Všetky vybrané"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Duplicate Selection"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+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
+#, fuzzy
+msgid "Create Area"
+msgstr "Vytvoriť adresár"
+
+#: 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/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "Súbor:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6540,6 +7189,26 @@ 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 ""
@@ -6582,34 +7251,19 @@ msgid "Add Signal"
msgstr "Signály:"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Remove Function"
-msgstr "Všetky vybrané"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
+msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
+msgid "Add Node"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Remove Signal"
-msgstr "Všetky vybrané"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Editing Signal:"
-msgstr "Signály:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Change Expression"
+msgid "Remove VisualScript Nodes"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
+msgid "Duplicate VisualScript Nodes"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
@@ -6653,6 +7307,23 @@ msgid "Add Setter Property"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Base Type"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Vložiť"
+
+#: 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 ""
@@ -6681,6 +7352,55 @@ msgid "Get"
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
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Vložiť"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove Function"
+msgstr "Všetky vybrané"
+
+#: 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
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Signály:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove Signal"
+msgstr "Všetky vybrané"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Editing Signal:"
+msgstr "Signály:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr ""
@@ -6701,10 +7421,6 @@ msgid "Edit Variable:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr ""
@@ -6779,14 +7495,6 @@ msgid ""
"(error)."
msgstr ""
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6807,77 +7515,6 @@ msgstr ""
msgid "Could not open template for export:\n"
msgstr ""
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -6963,6 +7600,13 @@ msgstr ""
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 ""
@@ -6985,17 +7629,32 @@ msgid ""
"as parent."
msgstr ""
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"The controller id must not be 0 or this controller will not be bound to an "
+"actual controller"
msgstr ""
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRAnchor must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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
@@ -7009,6 +7668,19 @@ msgstr ""
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 ""
@@ -7024,6 +7696,13 @@ 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 ""
@@ -7040,7 +7719,7 @@ msgid ""
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7055,22 +7734,6 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Otvoriť súbor"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Otvoriť súbor(y)"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Otvorit prieÄinok"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "OtvoriÅ¥ súbor / prieÄinok"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7089,7 +7752,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
diff --git a/editor/translations/sl.po b/editor/translations/sl.po
index e50f907b65..daa7533a8c 100644
--- a/editor/translations/sl.po
+++ b/editor/translations/sl.po
@@ -146,7 +146,8 @@ msgstr ""
msgid "Goto Prev Step"
msgstr ""
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr ""
@@ -378,7 +379,8 @@ msgstr ""
msgid "Description:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -389,9 +391,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Zapri"
@@ -464,7 +466,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -525,17 +527,16 @@ msgid "All"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr ""
@@ -551,7 +552,7 @@ msgstr ""
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -563,7 +564,7 @@ msgstr ""
msgid "Reverse"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr ""
@@ -715,14 +716,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr ""
@@ -827,7 +828,7 @@ msgid "Resource"
msgstr ""
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr ""
@@ -907,12 +908,181 @@ msgstr ""
msgid "Delete selected files?"
msgstr ""
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Authors"
+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 "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
+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
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "Preimenuj Funkcijo"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Izbriši Izbrano"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Izbriši Izbrano"
+
+#: 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 "Move Audio Bus"
+msgstr ""
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -926,21 +1096,44 @@ 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/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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: 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
@@ -1043,6 +1236,10 @@ 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 ""
@@ -1120,6 +1317,22 @@ msgstr ""
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
@@ -1245,6 +1458,15 @@ msgid "Signals:"
msgstr "Signali:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Funkcije:"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr ""
@@ -1261,7 +1483,7 @@ msgid "Search Text"
msgstr ""
#: editor/editor_log.cpp
-msgid " Output:"
+msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1311,6 +1533,10 @@ 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 ""
@@ -1429,11 +1655,11 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
+msgid "Save & Close"
msgstr ""
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
@@ -1445,9 +1671,17 @@ 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 ""
@@ -1457,11 +1691,7 @@ msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
+msgid "This operation can't be done without a selected node."
msgstr ""
#: editor/editor_node.cpp
@@ -1485,9 +1715,27 @@ msgid "Quick Run Scene.."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+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
@@ -1495,6 +1743,22 @@ msgid "Pick a Main Scene"
msgstr ""
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1527,6 +1791,11 @@ msgstr ""
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 ""
@@ -1543,6 +1812,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr ""
@@ -1591,10 +1864,6 @@ msgstr ""
msgid "Close Scene"
msgstr ""
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1875,6 +2144,10 @@ msgstr ""
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1884,26 +2157,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr ""
@@ -1924,9 +2181,17 @@ 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 ""
@@ -2027,6 +2292,16 @@ msgstr ""
msgid "Re-Import Changed Resources"
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 ""
@@ -2163,10 +2438,26 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Source: "
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2175,6 +2466,18 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving file:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving dir:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2251,6 +2554,12 @@ 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 ""
@@ -2262,9 +2571,28 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Single Scene"
+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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2304,6 +2632,14 @@ 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 ""
@@ -2490,6 +2826,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3071,6 +3411,11 @@ msgid "New name:"
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Uredi Spremenljivko:"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr ""
@@ -3382,6 +3727,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Uredi"
@@ -3414,10 +3760,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3526,11 +3868,6 @@ msgstr ""
msgid "Change default type"
msgstr ""
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr ""
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3568,6 +3905,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3607,6 +3952,18 @@ msgid "Update from Scene"
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
#, fuzzy
msgid "Add point"
msgstr "Dodaj Signal"
@@ -3617,11 +3974,28 @@ msgid "Remove point"
msgstr "Odstrani Signal"
#: 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 "Modify Curve"
+#, fuzzy
+msgid "Remove Curve Point"
+msgstr "Odstrani Signal"
+
+#: 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
@@ -3646,6 +4020,12 @@ 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 ""
@@ -3935,6 +4315,11 @@ 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 ""
@@ -4252,6 +4637,12 @@ 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 ""
@@ -4276,6 +4667,10 @@ 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 ""
@@ -4329,6 +4724,10 @@ msgid "Close All"
msgstr "Zapri"
#: 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.."
@@ -4361,6 +4760,10 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+msgid "Debug with external editor"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4424,6 +4827,10 @@ msgid ""
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 ""
@@ -4470,6 +4877,11 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Izbriši Izbrano"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4774,92 +5186,100 @@ msgid "Animation Key Inserted."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
+msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
+msgid "Material Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Forward"
+#, fuzzy
+msgid "Shader Changes"
+msgstr "Spremeni"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Surface Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Backwards"
+msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
+msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Down"
+msgid "Align with view"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
+msgid "Display Normal"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
+msgid "Display Wireframe"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Material Changes"
+msgid "Display Overdraw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Shader Changes"
-msgstr "Spremeni"
+msgid "Display Unshaded"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Surface Changes"
+msgid "View Environment"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
+msgid "View Gizmos"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
+msgid "View Information"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
+msgid "Doppler Enable"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
+msgid "Freelook Left"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
+msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
+msgid "Freelook Forward"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
+msgid "Freelook Backwards"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
+msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
+msgid "Freelook Down"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "preview"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
@@ -4867,6 +5287,17 @@ 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 ""
@@ -4984,6 +5415,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr ""
@@ -5112,6 +5544,10 @@ 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 ""
@@ -5169,6 +5605,16 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Odstrani Spremenljivko"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Odstrani Signal"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5236,7 +5682,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5258,11 +5704,23 @@ 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 editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: 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
@@ -5298,10 +5756,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5361,7 +5815,7 @@ msgstr ""
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5408,6 +5862,22 @@ 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 ""
@@ -5444,10 +5914,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5492,6 +5958,19 @@ 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 ""
@@ -5506,10 +5985,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5538,254 +6013,285 @@ msgstr "Odstrani Spremenljivko"
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+msgid "Can't run project"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "Spremeni"
+
+#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Dodaj Getter Lastnost"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an 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
+#, fuzzy
+msgid "Delete Item"
+msgstr "Izbriši Izbrano"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr ""
-
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5826,6 +6332,11 @@ msgid "Assign"
msgstr ""
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Dodaj Setter Lastnost"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr ""
@@ -5838,6 +6349,10 @@ 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 ""
@@ -5934,6 +6449,11 @@ msgstr ""
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 ""
@@ -5977,10 +6497,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -5993,6 +6509,18 @@ 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 ""
@@ -6035,6 +6563,14 @@ msgid "Edit Connections"
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 ""
@@ -6085,6 +6621,10 @@ msgid ""
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 ""
@@ -6092,6 +6632,14 @@ msgstr ""
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 ""
@@ -6123,10 +6671,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6163,35 +6707,15 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Select a Node"
msgstr ""
-#: editor/scene_tree_editor.cpp
-msgid "Select a Node"
+#: editor/script_create_dialog.cpp
+msgid "Error loading template '%s'"
msgstr ""
#: editor/script_create_dialog.cpp
@@ -6203,6 +6727,10 @@ 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 ""
@@ -6245,10 +6773,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6414,6 +6938,10 @@ 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 ""
@@ -6496,6 +7024,123 @@ msgstr "Neveljaven primer formata slovarja (neveljavna skripta v @path)"
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "Neveljaven primer slovarja (neveljavni podrazredi)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Izbriši Izbrano"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Duplicate Selection"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+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/gridmap/grid_map_editor_plugin.cpp
+msgid "Tiles"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6533,6 +7178,28 @@ msgid "Stack overflow with stack depth: "
msgstr "Sklad prepoln z stack depth: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "Uredi Argumente Signala:"
+
+#: 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
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Uredi Spremenljivko:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Funkcije:"
@@ -6573,34 +7240,23 @@ msgid "Add Signal"
msgstr "Dodaj Signal"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "Odstrani Funkcijo"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Odstrani Spremenljivko"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Urejanje Spremenljivke:"
+msgid "Change Expression"
+msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "Odstrani Signal"
+msgid "Add Node"
+msgstr "Dodaj Node"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "Urejanje Signala:"
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Odstrani Spremenljivko"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change Expression"
+msgid "Duplicate VisualScript Nodes"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "Dodaj Node"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
@@ -6642,6 +7298,24 @@ msgid "Add Setter Property"
msgstr "Dodaj Setter Lastnost"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "Osnovni Tip:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Move Node(s)"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Odstrani Spremenljivko"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Connect Nodes"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr ""
@@ -6670,6 +7344,52 @@ msgid "Get"
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 "Odstrani Funkcijo"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Uredi Spremenljivko:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Odstrani Spremenljivko"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "Urejanje Signala:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "Odstrani Signal"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Urejanje Spremenljivke:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "Urejanje Signala:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "Osnovni Tip:"
@@ -6690,10 +7410,6 @@ msgid "Edit Variable:"
msgstr "Uredi Spremenljivko:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "Spremeni"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Izbriši Izbrano"
@@ -6770,14 +7486,6 @@ msgstr ""
"Neveljavna vrnitev vrednosti od _step(), mora biti Å¡tevilo (seq out), ali "
"string (error)."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6798,78 +7506,6 @@ msgstr ""
msgid "Could not open template for export:\n"
msgstr ""
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid unique name."
-msgstr "Neveljaven indeks lastnosti imena."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -6960,6 +7596,13 @@ msgstr ""
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 ""
@@ -6982,17 +7625,32 @@ msgid ""
"as parent."
msgstr ""
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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
@@ -7006,6 +7664,19 @@ msgstr ""
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 ""
@@ -7021,6 +7692,13 @@ 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 ""
@@ -7037,7 +7715,7 @@ msgid ""
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7052,22 +7730,6 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr ""
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr ""
@@ -7086,7 +7748,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7100,6 +7762,10 @@ msgid ""
"texture to some node for display."
msgstr ""
+#, fuzzy
+#~ msgid "Invalid unique name."
+#~ msgstr "Neveljaven indeks lastnosti imena."
+
#~ msgid ""
#~ "Custom node has no _get_output_port_unsequenced(idx,wmem), but "
#~ "unsequenced ports were specified."
diff --git a/editor/translations/th.po b/editor/translations/th.po
index 9e140b2375..e89bbf043a 100644
--- a/editor/translations/th.po
+++ b/editor/translations/th.po
@@ -8,15 +8,15 @@
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2017-05-08 10:38+0000\n"
-"Last-Translator: Noshyaar <poommetee@protonmail.com>\n"
+"PO-Revision-Date: 2017-07-15 12:39+0000\n"
+"Last-Translator: Poommetee Ketson <poommetee@protonmail.com>\n"
"Language-Team: Thai <https://hosted.weblate.org/projects/godot-engine/godot/"
"th/>\n"
"Language: th\n"
"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.14-dev\n"
+"X-Generator: Weblate 2.16-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -147,7 +147,8 @@ msgstr "ถัดไป"
msgid "Goto Prev Step"
msgstr "à¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "เส้นตรง"
@@ -359,21 +360,19 @@ msgstr "เปลี่ยนค่าในอาร์เรย์"
#: editor/asset_library_editor_plugin.cpp
msgid "Free"
-msgstr ""
+msgstr "ฟรี"
#: editor/asset_library_editor_plugin.cpp editor/editor_plugin_settings.cpp
msgid "Version:"
msgstr "รุ่น:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Contents:"
-msgstr "ค่าคงที่:"
+msgstr "ประà¸à¸­à¸šà¸”้วย:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "View Files"
-msgstr " ไฟล์"
+msgstr "ดูไฟล์"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
#: editor/editor_help.cpp editor/property_selector.cpp
@@ -381,7 +380,8 @@ msgstr " ไฟล์"
msgid "Description:"
msgstr "รายละเอียด:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr "ติดตั้ง"
@@ -392,161 +392,152 @@ msgstr "ติดตั้ง"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
-msgstr ""
+msgstr "ไม่พบตำà¹à¸«à¸™à¹ˆà¸‡à¸™à¸µà¹‰:"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve."
-msgstr ""
+msgstr "ค้นหาไม่สำเร็จ"
#: editor/asset_library_editor_plugin.cpp
msgid "Connection error, please try again."
-msgstr ""
+msgstr "เชื่อมต่อไม่ได้ à¸à¸£à¸¸à¸“าลองใหม่"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect."
-msgstr "เชื่อมโยง.."
+msgstr "เชื่อมต่อไม่ได้"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect to host:"
-msgstr "เชื่อมไปยังโหนด:"
+msgstr "ไม่สามารถเชื่อมต่อà¸à¸±à¸šà¹‚ฮสต์:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr ""
+msgstr "ไม่มีà¸à¸²à¸£à¸•à¸­à¸šà¸à¸¥à¸±à¸šà¸ˆà¸²à¸à¹‚ฮสต์:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response."
-msgstr ""
+msgstr "ไม่มีà¸à¸²à¸£à¸•à¸­à¸šà¸à¸¥à¸±à¸š"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Request failed, return code:"
-msgstr "ไม่ทราบรูปà¹à¸šà¸šà¹„ฟล์ที่ร้องขอ:"
+msgstr "à¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อผิดพลาด รหัส:"
#: editor/asset_library_editor_plugin.cpp
msgid "Req. Failed."
-msgstr ""
+msgstr "ร้องขอผิดพลาด"
#: editor/asset_library_editor_plugin.cpp
msgid "Request failed, too many redirects"
-msgstr ""
+msgstr "à¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อผิดพลาด เปลี่ยนทางมาà¸à¹€à¸à¸´à¸™à¹„ป"
#: editor/asset_library_editor_plugin.cpp
msgid "Redirect Loop."
-msgstr ""
+msgstr "เปลี่ยนทางมาà¸à¹€à¸à¸´à¸™à¹„ป"
#: editor/asset_library_editor_plugin.cpp
msgid "Failed:"
-msgstr ""
+msgstr "ผิดพลาด:"
#: editor/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
-msgstr ""
+msgstr "à¹à¸®à¸Šà¸œà¸´à¸”พลาด ไฟล์ดาวน์โหลดอาจเสียหาย"
#: editor/asset_library_editor_plugin.cpp
msgid "Expected:"
-msgstr ""
+msgstr "ที่ควรจะเป็น:"
#: editor/asset_library_editor_plugin.cpp
msgid "Got:"
-msgstr ""
+msgstr "ที่ได้รับ:"
#: editor/asset_library_editor_plugin.cpp
msgid "Failed sha256 hash check"
-msgstr ""
+msgstr "ผิดพลาดในà¸à¸²à¸£à¸•à¸£à¸§à¸ˆà¸ªà¸­à¸šà¹à¸®à¸Š SHA256"
#: editor/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr ""
+msgstr "à¸à¸²à¸£à¸”าวน์โหลดผิดพลาด:"
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
-msgstr ""
+msgstr "สำเร็จ!"
#: editor/asset_library_editor_plugin.cpp
msgid "Fetching:"
-msgstr ""
+msgstr "à¸à¸³à¸¥à¸±à¸‡à¸£à¸±à¸šà¸‚้อมูล:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Resolving.."
-msgstr "à¸à¸³à¸¥à¸±à¸‡à¸šà¸±à¸™à¸—ึà¸.."
+msgstr "à¸à¸³à¸¥à¸±à¸‡à¸„้นหา.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Connecting.."
-msgstr "เชื่อมโยง.."
+msgstr "à¸à¸³à¸¥à¸±à¸‡à¹€à¸Šà¸·à¹ˆà¸­à¸¡à¸•à¹ˆà¸­.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Requesting.."
-msgstr "ทดสอบ"
+msgstr "à¸à¸³à¸¥à¸±à¸‡à¸£à¹‰à¸­à¸‡à¸‚อ.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Error making request"
-msgstr "บันทึà¸à¸£à¸µà¸‹à¸­à¸£à¹Œà¸ªà¸œà¸´à¸”พลาด!"
+msgstr "à¸à¸²à¸£à¸£à¹‰à¸­à¸‡à¸‚อผิดพลาด"
#: editor/asset_library_editor_plugin.cpp
msgid "Idle"
-msgstr ""
+msgstr "พร้อมใช้งาน"
#: editor/asset_library_editor_plugin.cpp
msgid "Retry"
-msgstr ""
+msgstr "ลองใหม่"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Download Error"
-msgstr "ดาวน์โหลด"
+msgstr "ดาวน์โหลดผิดพลาด"
#: editor/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr ""
+msgstr "à¸à¸³à¸¥à¸±à¸‡à¸”าวน์โหลดไฟล์นี้อยู่à¹à¸¥à¹‰à¸§!"
#: editor/asset_library_editor_plugin.cpp
msgid "first"
-msgstr ""
+msgstr "à¹à¸£à¸à¸ªà¸¸à¸”"
#: editor/asset_library_editor_plugin.cpp
msgid "prev"
-msgstr ""
+msgstr "à¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²"
#: editor/asset_library_editor_plugin.cpp
msgid "next"
-msgstr ""
+msgstr "ถัดไป"
#: editor/asset_library_editor_plugin.cpp
msgid "last"
-msgstr ""
+msgstr "ท้ายสุด"
#: editor/asset_library_editor_plugin.cpp
msgid "All"
msgstr "ทั้งหมด"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "ค้นหา:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "ค้นหา"
@@ -562,7 +553,7 @@ msgstr "ค้นหา"
msgid "Import"
msgstr "นำเข้า"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "ปลั๊à¸à¸­à¸´à¸™"
@@ -574,7 +565,7 @@ msgstr "เรียงตาม:"
msgid "Reverse"
msgstr "ย้อนà¸à¸¥à¸±à¸š"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "หมวดหมู่:"
@@ -726,14 +717,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "ลบ"
@@ -842,7 +833,7 @@ msgid "Resource"
msgstr "รีซอร์ส"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "ตำà¹à¸«à¸™à¹ˆà¸‡"
@@ -924,12 +915,196 @@ msgstr "ตัวจัดà¸à¸²à¸£à¸£à¸µà¸‹à¸­à¸£à¹Œà¸ªà¸—ี่ไม่มี
msgid "Delete selected files?"
msgstr "ลบไฟล์ที่เลือ�"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "ขอขอบคุณจาà¸à¸Šà¸¸à¸¡à¸Šà¸™à¸œà¸¹à¹‰à¹ƒà¸Šà¹‰ Godot!"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "ขอบคุณ!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr "ผู้ช่วยพัฒนา Godot Engine"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "โดย:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "ตัวจัดà¸à¸²à¸£à¹‚ปรเจà¸à¸•à¹Œ"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "ประà¸à¸­à¸šà¸”้วย:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "ไม่บีบอัด"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "ติดตั้งà¹à¸žà¸„เà¸à¸ˆà¹€à¸ªà¸£à¹‡à¸ˆà¸ªà¸¡à¸šà¸¹à¸£à¸“์!"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "ติดตั้งà¹à¸žà¸„เà¸à¸ˆà¹€à¸ªà¸£à¹‡à¸ˆà¸ªà¸¡à¸šà¸¹à¸£à¸“์!"
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Effect"
+msgstr "เพิ่ม"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "เปิดเลย์เอาต์ของ Audio Bus"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Solo"
+msgstr "เปิดเลย์เอาต์ของ Audio Bus"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Mute"
+msgstr "เปิดเลย์เอาต์ของ Audio Bus"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "ลบสิ่งที่เลือà¸"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "ทำซ้ำ"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "ลบสิ่งที่เลือà¸"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "เพิ่ม Bus"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "ลบเลย์เอาต์"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "ทำซ้ำà¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "เปิดเลย์เอาต์ของ Audio Bus"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr "บันทึà¸à¹€à¸¥à¸¢à¹Œà¹€à¸­à¸²à¸•à¹Œà¸‚อง Audio Bus เป็น.."
@@ -943,23 +1118,53 @@ msgid "Open Audio Bus Layout"
msgstr "เปิดเลย์เอาต์ของ Audio Bus"
#: editor/editor_audio_buses.cpp
+msgid "There is no 'res://default_bus_layout.tres' file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"นามสà¸à¸¸à¸¥à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡\n"
+"à¸à¸£à¸¸à¸“าใช้ .font"
+
+#: editor/editor_audio_buses.cpp
msgid "Add Bus"
msgstr "เพิ่ม Bus"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "สร้างรีซอร์สใหม่"
+
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "โหลด"
#: editor/editor_audio_buses.cpp
+#, fuzzy
+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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Save this Bus Layout to a file."
+msgstr "บันทึà¸à¹€à¸¥à¸¢à¹Œà¹€à¸­à¸²à¸•à¹Œà¸‚อง Audio Bus เป็น.."
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+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 "ชื่อผิดพลาด"
@@ -1060,6 +1265,11 @@ msgid "Updating scene.."
msgstr "อัพเดทฉาà¸.."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "à¸à¸£à¸¸à¸“าบันทึà¸à¸‰à¸²à¸à¸à¹ˆà¸­à¸™"
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "เลือà¸à¹‚ฟลเดอร์"
@@ -1137,6 +1347,22 @@ msgstr "ทุà¸à¹„ฟล์ (*)"
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
@@ -1264,6 +1490,15 @@ msgid "Signals:"
msgstr "สัà¸à¸à¸²à¸“:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "à¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "ค่าคงที่:"
@@ -1280,7 +1515,8 @@ msgid "Search Text"
msgstr "ค้นหาคำ"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " ข้อความ:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1330,6 +1566,11 @@ msgid "Creating Thumbnail"
msgstr "à¸à¸³à¸¥à¸±à¸‡à¸ªà¸£à¹‰à¸²à¸‡à¸£à¸¹à¸›à¸•à¸±à¸§à¸­à¸¢à¹ˆà¸²à¸‡"
#: editor/editor_node.cpp
+#, fuzzy
+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 "บันทึà¸à¸‰à¸²à¸à¹„ม่ได้ อาจจะมีà¸à¸²à¸£à¸­à¹‰à¸²à¸‡à¸­à¸´à¸‡à¹„ม่สมบูรณ์"
@@ -1391,8 +1632,9 @@ 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"
@@ -1455,26 +1697,34 @@ msgid "Quick Open Script.."
msgstr "เปิดไฟล์สคริปต์ด่วน.."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "ใช่"
+#, fuzzy
+msgid "Save & Close"
+msgstr "บันทึà¸à¹„ฟล์"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "ปิดไฟล์ฉาà¸? (à¸à¸²à¸£à¹à¸à¹‰à¹„ขที่ไม่ได้บันทึà¸à¸ˆà¸°à¸ªà¸¹à¸à¸«à¸²à¸¢)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
msgstr "บันทึà¸à¸‰à¸²à¸à¹€à¸›à¹‡à¸™.."
#: editor/editor_node.cpp
-#, fuzzy
msgid "No"
-msgstr "โหนด"
+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 "ส่งออภMesh Library"
@@ -1484,12 +1734,9 @@ msgid "Export Tile Set"
msgstr "ส่งออภTile Set"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "ออà¸"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "ออà¸à¹‚ปรà¹à¸à¸£à¸¡?"
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "ทำไม่ได้ถ้าไม่มีฉาà¸"
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1512,18 +1759,52 @@ msgid "Quick Run Scene.."
msgstr "เริ่มฉาà¸à¸”่วน.."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "ออà¸"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "ออà¸à¹‚ปรà¹à¸à¸£à¸¡?"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "ตัวจัดà¸à¸²à¸£à¹‚ปรเจà¸à¸•à¹Œ"
+
+#: editor/editor_node.cpp
+#, fuzzy
+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 ""
-"เปิดตัวจัดà¸à¸²à¸£à¹‚ปรเจà¸à¸•à¹Œ?\n"
-"(à¸à¸²à¸£à¹à¸à¹‰à¹„ขที่ไม่ได้บันทึà¸à¸ˆà¸°à¸ªà¸¹à¸à¸«à¸²à¸¢)"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "เลือà¸à¸‰à¸²à¸à¹€à¸£à¸´à¹ˆà¸¡à¸•à¹‰à¸™"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1560,6 +1841,11 @@ msgstr "บันทึà¸à¹€à¸¥à¸¢à¹Œà¹€à¸­à¸²à¸•à¹Œ"
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 "สลับฉาà¸"
@@ -1576,6 +1862,11 @@ msgstr "à¹à¸¥à¸°à¸­à¸µà¸ %d ไฟล์หรือโฟลเดอร์"
msgid "Distraction Free Mode"
msgstr "โหมดไร้สิ่งรบà¸à¸§à¸™"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "โหมดไร้สิ่งรบà¸à¸§à¸™"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "ฉาà¸"
@@ -1586,7 +1877,7 @@ msgstr "ไปยังฉาà¸à¸—ี่เพิ่งเปิด"
#: editor/editor_node.cpp
msgid "Next tab"
-msgstr "à¹à¸—็บต่อไป"
+msgstr "à¹à¸—็บถัดไป"
#: editor/editor_node.cpp
msgid "Previous tab"
@@ -1624,10 +1915,6 @@ msgstr "บันทึà¸à¸—ุà¸à¸‰à¸²à¸"
msgid "Close Scene"
msgstr "ปิดไฟล์ฉาà¸"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr "ปิดไปยังฉาà¸à¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²"
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "เปิดไฟล์ล่าสุด"
@@ -1664,9 +1951,8 @@ msgid "Miscellaneous project or scene-wide tools."
msgstr "โปรเจà¸à¸•à¹Œà¹à¸¥à¸°à¹€à¸„รื่องมืออื่น ๆ"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Project"
-msgstr "โปรเจà¸à¸•à¹Œà¹ƒà¸«à¸¡à¹ˆ"
+msgstr "โปรเจà¸à¸•à¹Œ"
#: editor/editor_node.cpp
msgid "Project Settings"
@@ -1768,9 +2054,8 @@ msgstr ""
"ถ้าใช้à¸à¸±à¸šà¸­à¸¸à¸›à¸à¸£à¸“์รีโมท จะดีà¸à¸§à¹ˆà¸²à¸–้าเปิดระบบไฟล์เครือข่ายด้วย"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Editor"
-msgstr "à¹à¸à¹‰à¹„ข"
+msgstr "โปรà¹à¸à¸£à¸¡"
#: editor/editor_node.cpp editor/settings_config_dialog.cpp
msgid "Editor Settings"
@@ -1790,24 +2075,23 @@ msgstr "จัดà¸à¸²à¸£à¹à¸¡à¹ˆà¹à¸šà¸šà¸ªà¹ˆà¸‡à¸­à¸­à¸"
#: editor/editor_node.cpp
msgid "Help"
-msgstr ""
+msgstr "ช่วยเหลือ"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Classes"
msgstr "คลาส"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Online Docs"
-msgstr "ปิดคู่มือ"
+msgstr "คู่มือ"
#: editor/editor_node.cpp
msgid "Q&A"
-msgstr ""
+msgstr "ถาม/ตอบ"
#: editor/editor_node.cpp
msgid "Issue Tracker"
-msgstr ""
+msgstr "ระบบติดตามบัค"
#: editor/editor_node.cpp
msgid "About"
@@ -1895,7 +2179,7 @@ msgstr "ไปยังวัตถุที่ปรับà¹à¸•à¹ˆà¸‡à¸à¹ˆà¸­
#: editor/editor_node.cpp
msgid "Go to the next edited object in history."
-msgstr "ไปยังวัตถุที่ปรับà¹à¸•à¹ˆà¸‡à¸•à¹ˆà¸­à¹„ป"
+msgstr "ไปยังวัตถุที่ปรับà¹à¸•à¹ˆà¸‡à¸–ัดไป"
#: editor/editor_node.cpp
msgid "History of recently edited objects."
@@ -1915,7 +2199,11 @@ msgstr "โหนด"
#: editor/editor_node.cpp
msgid "Output"
-msgstr "เอาท์พุต"
+msgstr "ข้อความ"
+
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
@@ -1926,26 +2214,10 @@ msgid "Update"
msgstr "อัพเดท"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "ขอขอบคุณจาà¸à¸Šà¸¸à¸¡à¸Šà¸™à¸œà¸¹à¹‰à¹ƒà¸Šà¹‰ Godot!"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "ขอบคุณ!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "นำเข้าà¹à¸¡à¹ˆà¹à¸šà¸šà¸ˆà¸²à¸à¹„ฟล์ ZIP"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "ส่งออà¸à¹‚ปรเจà¸à¸•à¹Œ"
@@ -1966,38 +2238,41 @@ msgid "Open & Run a Script"
msgstr "เปิดà¹à¸¥à¸°à¸£à¸±à¸™à¸ªà¸„ริปต์"
#: editor/editor_node.cpp
+#, fuzzy
+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
-#, fuzzy
msgid "Open 2D Editor"
-msgstr "เปิดในโปรà¹à¸à¸£à¸¡à¹à¸à¹‰à¹„ข"
+msgstr "เปิดตัวà¹à¸à¹‰à¹„ข 2 มิติ"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 3D Editor"
-msgstr "เปิดในโปรà¹à¸à¸£à¸¡à¹à¸à¹‰à¹„ข"
+msgstr "เปิดตัวà¹à¸à¹‰à¹„ข 3 มิติ"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Script Editor"
-msgstr "เปิดในโปรà¹à¸à¸£à¸¡à¹à¸à¹‰à¹„ข"
+msgstr "เปิดตัวà¹à¸à¹‰à¹„ขสคริปต์"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Asset Library"
-msgstr "ส่งออà¸à¹„ลบรารี"
+msgstr "เปิดà¹à¸«à¸¥à¹ˆà¸‡à¸£à¸§à¸¡à¸—รัพยาà¸à¸£"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the next Editor"
-msgstr "เปิดในโปรà¹à¸à¸£à¸¡à¹à¸à¹‰à¹„ข"
+msgstr "เปิดตัวà¹à¸à¹‰à¹„ขถัดไป"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the previous Editor"
-msgstr "เปิดในโปรà¹à¸à¸£à¸¡à¹à¸à¹‰à¹„ข"
+msgstr "เปิดตัวà¹à¸à¹‰à¹„ขà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²"
#: editor/editor_plugin_settings.cpp
msgid "Installed Plugins:"
@@ -2075,6 +2350,16 @@ msgstr "นำเข้าอีà¸à¸„รั้ง"
msgid "Re-Import Changed Resources"
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 "เขียนโปรà¹à¸à¸£à¸¡à¹ƒà¸™à¹€à¸¡à¸—็อด _run()"
@@ -2167,9 +2452,8 @@ msgid "Error creating path for templates:\n"
msgstr "ผิดพลาดขณะสร้างตำà¹à¸«à¸™à¹ˆà¸‡à¹à¸¡à¹ˆà¹à¸šà¸š:\n"
#: editor/export_template_manager.cpp
-#, fuzzy
msgid "Extracting Export Templates"
-msgstr "à¸à¸³à¸¥à¸±à¸‡à¹‚หลดà¹à¸¡à¹ˆà¹à¸šà¸šà¸ªà¹ˆà¸‡à¸­à¸­à¸"
+msgstr "à¸à¸³à¸¥à¸±à¸‡à¸„ลายบีบอัดà¹à¸¡à¹ˆà¹à¸šà¸šà¸ªà¹ˆà¸‡à¸­à¸­à¸"
#: editor/export_template_manager.cpp
msgid "Importing:"
@@ -2212,10 +2496,28 @@ msgid "Cannot navigate to '"
msgstr "ไม่สามารถไปยัง '"
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "บันทึà¸à¹à¸¥à¸°à¸™à¸³à¹€à¸‚้าอีà¸à¸„รั้ง"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "ต้นฉบับ:"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr "ไฟล์ต้นทางà¹à¸¥à¸°à¸›à¸¥à¸²à¸¢à¸—างเหมือนà¸à¸±à¸™ ไม่ทำอะไร"
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr "ไฟล์ต้นทางà¹à¸¥à¸°à¸›à¸¥à¸²à¸¢à¸—างอยู่ที่เดียวà¸à¸±à¸™ ไม่ทำอะไร"
@@ -2224,6 +2526,20 @@ msgid "Can't move directories to within themselves."
msgstr "ย้ายโฟลเดอร์เข้ามาในตัวเองไม่ได้"
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "ผิดพลาดขณะโหลดรูป:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "ผิดพลาดขณะนำเข้า:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr "ทำงานใน '..' ไม่ได้"
@@ -2300,6 +2616,12 @@ 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 "ย้าย"
@@ -2311,10 +2633,31 @@ msgstr "เพิ่มไปยังà¸à¸¥à¸¸à¹ˆà¸¡"
msgid "Remove from Group"
msgstr "ลบออà¸à¸ˆà¸²à¸à¸à¸¥à¸¸à¹ˆà¸¡"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "%d พื้นผิว"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "นำเข้าฉาภ3D"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2353,6 +2696,14 @@ 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 " ไฟล์"
@@ -2439,13 +2790,12 @@ msgid "No target font resource!"
msgstr "ไม่ได้เลือà¸à¸§à¹ˆà¸²à¸ˆà¸°à¸™à¸³à¹€à¸‚้ามาเป็นไฟล์ฟอนต์ชื่ออะไร!"
#: editor/io_plugins/editor_font_import_plugin.cpp
-#, fuzzy
msgid ""
"Invalid file extension.\n"
"Please use .font."
msgstr ""
"นามสà¸à¸¸à¸¥à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡\n"
-"à¸à¸£à¸¸à¸“าใช้ .fnt"
+"à¸à¸£à¸¸à¸“าใช้ .font"
#: editor/io_plugins/editor_font_import_plugin.cpp
msgid "Can't load/process source font."
@@ -2469,7 +2819,7 @@ msgstr "นำเข้ามาเป็นรีซอร์ส:"
#: editor/io_plugins/editor_font_import_plugin.cpp
msgid "The quick brown fox jumps over the lazy dog."
-msgstr ""
+msgstr "The quick brown fox jumps over the lazy dog."
#: editor/io_plugins/editor_font_import_plugin.cpp
msgid "Test:"
@@ -2543,6 +2893,10 @@ msgstr "Mesh ต้นฉบับ:"
msgid "Mesh"
msgstr "Mesh"
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "%d พื้นผิว"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr "ไม่มีไฟล์เสียงให้นำเข้า!"
@@ -2812,7 +3166,7 @@ msgstr "ครอบตัดพื้นที่ว่าง"
#: editor/io_plugins/editor_texture_import_plugin.cpp
msgid "Texture"
-msgstr ""
+msgstr "Texture"
#: editor/io_plugins/editor_texture_import_plugin.cpp
msgid "Import Large Texture"
@@ -2860,7 +3214,7 @@ msgstr "ครอบตัดรูป"
#: editor/io_plugins/editor_texture_import_plugin.cpp
msgid "Blitting Images"
-msgstr ""
+msgstr "คัดลอà¸à¸£à¸¹à¸›"
#: editor/io_plugins/editor_texture_import_plugin.cpp
msgid "Couldn't save atlas image:"
@@ -2920,9 +3274,8 @@ msgid "Compress"
msgstr "บีบอัด"
#: editor/io_plugins/editor_translation_import_plugin.cpp
-#, fuzzy
msgid "Add to Project (project.godot)"
-msgstr "เพิ่มเข้าโปรเจà¸à¸•à¹Œ (godot.cfg)"
+msgstr "เพิ่มเข้าโปรเจà¸à¸•à¹Œ (project.godot)"
#: editor/io_plugins/editor_translation_import_plugin.cpp
msgid "Import Languages:"
@@ -3125,6 +3478,11 @@ msgid "New name:"
msgstr "ชื่อใหม่:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "à¹à¸à¹‰à¹„ขตัวà¸à¸£à¸­à¸‡à¹‚หนด"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr "อัตราส่วน:"
@@ -3326,25 +3684,25 @@ msgstr "ตัวอย่าง"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Configure Snap"
-msgstr "ตั้งค่า Snap"
+msgstr "ตั้งค่าà¸à¸²à¸£à¸ˆà¸³à¸à¸±à¸”"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid Offset:"
-msgstr "ตำà¹à¸«à¸™à¹ˆà¸‡ Grid:"
+msgstr "จุดà¸à¸³à¹€à¸™à¸´à¸”ตาราง:"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid Step:"
-msgstr "ระยะ Grid:"
+msgstr "ระยะห่างเส้น:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation Offset:"
-msgstr ""
+msgstr "องศาเริ่มต้น:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Rotation Step:"
-msgstr ""
+msgstr "ช่วงองศา:"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Move Pivot"
@@ -3363,9 +3721,8 @@ msgid "Edit CanvasItem"
msgstr "à¹à¸à¹‰à¹„ข CanvasItem"
#: editor/plugins/canvas_item_editor_plugin.cpp
-#, fuzzy
msgid "Change Anchors"
-msgstr "à¹à¸à¹‰à¹„ขหมุด"
+msgstr "à¹à¸à¹‰à¹„ขà¸à¸²à¸£à¸•à¸£à¸¶à¸‡"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Zoom (%):"
@@ -3440,6 +3797,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "à¹à¸à¹‰à¹„ข"
@@ -3447,33 +3805,29 @@ msgstr "à¹à¸à¹‰à¹„ข"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Use Snap"
-msgstr "ใช้ Snap"
+msgstr "จำà¸à¸±à¸”à¸à¸²à¸£à¹€à¸„ลื่อนย้าย"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Show Grid"
-msgstr "à¹à¸ªà¸”ง Grid"
+msgstr "à¹à¸ªà¸”งเส้นตาราง"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Rotation Snap"
-msgstr "ใช้ Snap à¸à¸±à¸šà¸à¸²à¸£à¸«à¸¡à¸¸à¸™"
+msgstr "จำà¸à¸±à¸”à¸à¸²à¸£à¸«à¸¡à¸¸à¸™"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Snap Relative"
-msgstr ""
+msgstr "จำà¸à¸±à¸”โดยใช้ตำà¹à¸«à¸™à¹ˆà¸‡à¸›à¸±à¸ˆà¸ˆà¸¸à¸šà¸±à¸™"
#: editor/plugins/canvas_item_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Configure Snap.."
-msgstr "ตั้งค่า Snap.."
+msgstr "ตั้งค่าà¸à¸²à¸£à¸ˆà¸³à¸à¸±à¸”.."
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Use Pixel Snap"
-msgstr "ใช้ Snap พิà¸à¹€à¸‹à¸¥"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr "ขยายให้เต็มโหนดà¹à¸¡à¹ˆ"
+msgstr "จำà¸à¸±à¸”ให้ย้ายเป็นพิà¸à¹€à¸‹à¸¥"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
@@ -3522,7 +3876,7 @@ msgstr "ให้สิ่งที่เลือà¸à¹€à¸•à¹‡à¸¡à¸ˆà¸­"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Anchor"
-msgstr "หมุด"
+msgstr "ตรึง"
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Insert Keys"
@@ -3574,7 +3928,7 @@ msgstr "ตà¸à¸¥à¸‡ :("
#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "No parent to instance a child at."
-msgstr ""
+msgstr "ไม่พบโหนดà¹à¸¡à¹ˆà¸—ี่จะรับอินสà¹à¸•à¸™à¸‹à¹Œà¹‚หนดลูà¸"
#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
msgid "This operation requires a single selected node."
@@ -3584,11 +3938,6 @@ msgstr "ต้องเลือà¸à¹€à¸žà¸µà¸¢à¸‡à¹‚หนดเดียว"
msgid "Change default type"
msgstr "เปลี่ยนประเภท"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "ตà¸à¸¥à¸‡"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3628,13 +3977,21 @@ msgstr "à¹à¸à¹‰à¹„ขรูปหลายเหลี่ยม (ลบจุà
msgid "Create a new polygon from scratch."
msgstr "สร้างรูปหลายเหลี่ยมจาà¸à¸„วามว่างเปล่า"
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr "à¹à¸à¹‰à¹„ขรูปหลายเหลี่ยม 3D"
#: editor/plugins/collision_shape_2d_editor_plugin.cpp
msgid "Set Handle"
-msgstr ""
+msgstr "ปรับขนาดรูปร่าง"
#: editor/plugins/cube_grid_theme_editor_plugin.cpp
msgid "Creating Mesh Library"
@@ -3668,22 +4025,53 @@ msgstr "อัพเดตจาà¸à¸‰à¸²à¸"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
-msgid "Add point"
-msgstr "เพิ่มอินพุต"
+msgid "Modify Curve Point"
+msgstr "à¹à¸à¹‰à¹„ขเส้นโค้ง"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "à¹à¸à¹‰à¹„ขเส้นโค้ง"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+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
#, fuzzy
+msgid "Left linear"
+msgstr "เส้นตรง"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Right linear"
+msgstr "มุมขวา"
+
+#: editor/plugins/curve_editor_plugin.cpp
msgid "Load preset"
-msgstr "โหลดรีซอร์ส"
+msgstr "โหลดค่าล่วงหน้า"
#: editor/plugins/curve_editor_plugin.cpp
-msgid "Modify Curve"
-msgstr "à¹à¸à¹‰à¹„ขเส้นโค้ง"
+#, fuzzy
+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"
@@ -3707,6 +4095,12 @@ 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 "สร้างรูปหลายเหลี่ยมà¸à¸±à¹‰à¸™à¹à¸ªà¸‡"
@@ -3788,11 +4182,11 @@ msgstr "Mesh ว่างเปล่า!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Trimesh Body"
-msgstr ""
+msgstr "สร้าง Static Trimesh Body"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Static Convex Body"
-msgstr ""
+msgstr "สร้าง StaticBody ทรงตัน"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "This doesn't work on scene root!"
@@ -3800,7 +4194,7 @@ msgstr "ทำà¸à¸±à¸šà¹‚หนดราà¸à¹„ม่ได้!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Shape"
-msgstr ""
+msgstr "สร้างรูปทรง Trimesh"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Convex Shape"
@@ -3816,7 +4210,7 @@ msgstr "MeshInstance ไม่มี Mesh!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Mesh has not surface to create outlines from!"
-msgstr ""
+msgstr "Mesh ไม่มีพื้นผิวให้สร้างเส้นขอบได้!"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Could not create outline!"
@@ -3828,27 +4222,27 @@ msgstr "สร้างเส้นรอบรูป"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Static Body"
-msgstr ""
+msgstr "สร้าง Trimesh Static Body"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Convex Static Body"
-msgstr ""
+msgstr "สร้าง StaticBody ทรงตัน"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Trimesh Collision Sibling"
-msgstr ""
+msgstr "สร้างรูปทรงà¸à¸²à¸¢à¸ à¸²à¸žà¹€à¸›à¹‡à¸™à¹‚หนดà¸à¸²à¸•à¸´"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Convex Collision Sibling"
-msgstr ""
+msgstr "สร้างรูปทรงตันà¸à¸²à¸¢à¸ à¸²à¸žà¹€à¸›à¹‡à¸™à¹‚หนดà¸à¸²à¸•à¸´"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh.."
-msgstr ""
+msgstr "สร้างเส้นขอบ Mesh.."
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Create Outline Mesh"
-msgstr ""
+msgstr "สร้างเส้นขอบ Mesh"
#: editor/plugins/mesh_instance_editor_plugin.cpp
msgid "Outline Size:"
@@ -3876,7 +4270,7 @@ msgstr "Mesh ต้นฉบับไม่ถูà¸à¸•à¹‰à¸­à¸‡ (ไม่มà¸
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "No surface source specified."
-msgstr ""
+msgstr "ไม่ได้ระบุพื้นผิวต้นฉบับ"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Surface source is invalid (invalid path)."
@@ -3944,7 +4338,7 @@ msgstr "สุ่มà¸à¸²à¸£à¸«à¸¡à¸¸à¸™:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Random Tilt:"
-msgstr ""
+msgstr "สุ่มà¸à¸²à¸£à¹€à¸­à¸µà¸¢à¸‡:"
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Random Scale:"
@@ -3960,7 +4354,7 @@ msgstr "สร้างรูปทรงนำทาง"
#: editor/plugins/navigation_polygon_editor_plugin.cpp
msgid "Remove Poly And Point"
-msgstr ""
+msgstr "ลบรูปหลายเหลี่ยมà¹à¸¥à¸°à¸ˆà¸¸à¸”"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Clear Emission Mask"
@@ -3970,7 +4364,7 @@ msgstr "ลบ Mask à¸à¸²à¸£à¸›à¸¥à¹ˆà¸­à¸¢"
#: editor/plugins/particles_editor_plugin.cpp
#, fuzzy
msgid "Generating AABB"
-msgstr "สร้าง AABB"
+msgstr "สร้างเส้นà¸à¸£à¸­à¸š"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Can only set point into a ParticlesMaterial process material"
@@ -3986,40 +4380,42 @@ msgstr "รูปไม่มีพิà¸à¹€à¸‹à¸¥à¹ƒà¸”ที่ความโ
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Set Emission Mask"
-msgstr "à¸à¸³à¸«à¸™à¸” Mask à¸à¸²à¸£à¸›à¸¥à¹ˆà¸­à¸¢"
+msgstr "à¸à¸³à¸«à¸™à¸” Mask à¸à¸²à¸£à¸›à¸°à¸—ุ"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generate Visibility Rect"
-msgstr ""
+msgstr "สร้างà¸à¸£à¸­à¸šà¸à¸²à¸£à¸¡à¸­à¸‡à¹€à¸«à¹‡à¸™"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Load Emission Mask"
-msgstr "โหลด Mask à¸à¸²à¸£à¸›à¸¥à¹ˆà¸­à¸¢"
+msgstr "โหลด Mask à¸à¸²à¸£à¸›à¸°à¸—ุ"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
+msgid "Particles"
+msgstr "มุมรูปทรง"
#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
-msgstr ""
+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 "à¸à¸³à¸«à¸™à¸” Mask à¸à¸²à¸£à¸›à¸¥à¹ˆà¸­à¸¢"
+msgstr "Mask à¸à¸²à¸£à¸›à¸°à¸—ุ"
#: 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 "à¸à¸³à¸«à¸™à¸” Mask à¸à¸²à¸£à¸›à¸¥à¹ˆà¸­à¸¢"
+msgstr "สีà¸à¸²à¸£à¸›à¸°à¸—ุ"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Node does not contain geometry."
@@ -4031,7 +4427,7 @@ msgstr "โหนดไม่มี geometry (หน้า)"
#: editor/plugins/particles_editor_plugin.cpp
msgid "A processor material of type 'ParticlesMaterial' is required."
-msgstr ""
+msgstr "ต้องà¸à¸²à¸£ Material ประเภท 'ParticlesMaterial'"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Faces contain no area!"
@@ -4042,36 +4438,37 @@ msgid "No faces!"
msgstr "ไม่มีหน้า!"
#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
msgid "Generate AABB"
-msgstr "สร้าง AABB"
+msgstr "สร้างเส้นà¸à¸£à¸­à¸š"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emission Points From Mesh"
-msgstr ""
+msgstr "สร้างจุดปะทุจาภMesh"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emission Points From Node"
-msgstr ""
+msgstr "สร้างจุดปะทุจาà¸à¹‚หนด"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Clear Emitter"
-msgstr ""
+msgstr "ลบตัวปะทุ"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Create Emitter"
-msgstr ""
+msgstr "สร้างตัวปะทุ"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Emission Points:"
-msgstr ""
+msgstr "จุดปะทุ:"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Surface Points"
-msgstr ""
+msgstr "จุดพื้นผิว"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Surface Points+Normal (Directed)"
-msgstr ""
+msgstr "จุดพื้นผิว+เส้นบอà¸à¸—ิศ"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Volume"
@@ -4079,26 +4476,24 @@ msgstr "ปริมาตร"
#: editor/plugins/particles_editor_plugin.cpp
msgid "Emission Source: "
-msgstr ""
+msgstr "à¹à¸«à¸¥à¹ˆà¸‡à¸›à¸°à¸—ุ: "
#: editor/plugins/particles_editor_plugin.cpp
#, fuzzy
msgid "Generate Visibility AABB"
-msgstr "สร้าง AABB"
+msgstr "สร้างà¸à¸£à¸­à¸šà¸à¸²à¸£à¸¡à¸­à¸‡à¹€à¸«à¹‡à¸™"
#: editor/plugins/path_2d_editor_plugin.cpp
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
@@ -4111,11 +4506,11 @@ msgstr "ย้ายจุดในเส้นโค้ง"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Move In-Control in Curve"
-msgstr ""
+msgstr "ย้ายจุดควบคุมขาเข้าของเส้นโค้ง"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Move Out-Control in Curve"
-msgstr ""
+msgstr "ย้ายจุดควบคุมขาออà¸à¸‚องเส้นโค้ง"
#: editor/plugins/path_2d_editor_plugin.cpp
msgid "Select Control Points (Shift+Drag)"
@@ -4141,11 +4536,11 @@ msgstr "à¸à¸³à¸«à¸™à¸”พิà¸à¸±à¸”จุดเส้นโค้ง"
#: editor/plugins/path_editor_plugin.cpp
msgid "Set Curve In Pos"
-msgstr ""
+msgstr "à¸à¸³à¸«à¸™à¸”เส้นโค้งขาเข้า"
#: editor/plugins/path_editor_plugin.cpp
msgid "Set Curve Out Pos"
-msgstr ""
+msgstr "à¸à¸³à¸«à¸™à¸”เส้นโค้งขาออà¸"
#: editor/plugins/path_editor_plugin.cpp
msgid "Split Path"
@@ -4156,14 +4551,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"
@@ -4171,7 +4564,7 @@ msgstr "สร้าง UV Map"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Transform UV Map"
-msgstr ""
+msgstr "เคลื่อนย้าย UV Map"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Polygon 2D UV Editor"
@@ -4220,11 +4613,11 @@ msgstr "ลบ UV"
#: editor/plugins/polygon_2d_editor_plugin.cpp
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Snap"
-msgstr ""
+msgstr "จำà¸à¸±à¸”à¸à¸²à¸£à¹€à¸„ลื่อนย้าย"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Enable Snap"
-msgstr "เปิด Snap"
+msgstr "จำà¸à¸±à¸”à¸à¸²à¸£à¹€à¸„ลื่อนย้าย"
#: editor/plugins/polygon_2d_editor_plugin.cpp
msgid "Grid"
@@ -4318,9 +4711,14 @@ msgid "Pitch"
msgstr "เสียงสูงต่ำ"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Clear Recent Files"
-msgstr "ลบà¸à¸£à¸°à¸”ูà¸"
+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"
@@ -4347,8 +4745,12 @@ 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 "สคริปต์ต่อไป"
+msgstr "สคริปต์ถัดไป"
#: editor/plugins/script_editor_plugin.cpp
msgid "Previous script"
@@ -4399,6 +4801,11 @@ msgid "Close All"
msgstr "ปิดทั้งหมด"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+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.."
@@ -4431,6 +4838,11 @@ msgid "Keep Debugger Open"
msgstr "เปิดตัวดีบัคค้างไว้"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "เปิดตัวà¹à¸à¹‰à¹„ขถัดไป"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr "หน้าต่าง"
@@ -4443,9 +4855,8 @@ msgid "Move Right"
msgstr "ย้ายไปขวา"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open Godot online documentation"
-msgstr "ค้นหาคู่มือ"
+msgstr "เปิดคู่มือ"
#: editor/plugins/script_editor_plugin.cpp
msgid "Search the class hierarchy."
@@ -4497,25 +4908,28 @@ msgid ""
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
-#, fuzzy
msgid "Convert Case"
-msgstr "à¸à¸³à¸¥à¸±à¸‡à¹à¸›à¸¥à¸‡à¸£à¸¹à¸›"
+msgstr "à¹à¸›à¸¥à¸‡à¸•à¸±à¸§à¸žà¸´à¸¡à¸žà¹Œà¹ƒà¸«à¸à¹ˆ-เล็à¸"
#: editor/plugins/script_text_editor.cpp
msgid "Uppercase"
-msgstr ""
+msgstr "ตัวพิมพ์ใหà¸à¹ˆ"
#: editor/plugins/script_text_editor.cpp
msgid "Lowercase"
-msgstr ""
+msgstr "ตัวพิมพ์เล็à¸"
#: editor/plugins/script_text_editor.cpp
msgid "Capitalize"
-msgstr ""
+msgstr "อัà¸à¸©à¸£à¹à¸£à¸à¸žà¸´à¸¡à¸žà¹Œà¹ƒà¸«à¸à¹ˆ"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp scene/gui/line_edit.cpp
@@ -4544,6 +4958,11 @@ msgid "Move Down"
msgstr "ย้ายลง"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "ลบจุด"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr "ย่อหน้าซ้าย"
@@ -4560,20 +4979,23 @@ msgid "Clone Down"
msgstr "คัดลอà¸à¸šà¸£à¸£à¸—ัดลงมา"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
msgid "Complete Symbol"
-msgstr ""
+msgstr "เสนอà¹à¸™à¸°à¸„ำเต็ม"
#: editor/plugins/script_text_editor.cpp
msgid "Trim Trailing Whitespace"
msgstr "ลบตัวอัà¸à¸©à¸£à¸—ี่มองไม่เห็น"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
msgid "Convert Indent To Spaces"
-msgstr ""
+msgstr "ใช้เว้นวรรคเป็นย่อหน้า"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
msgid "Convert Indent To Tabs"
-msgstr ""
+msgstr "ใช้à¹à¸—็บเป็นย่อหน้า"
#: editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
@@ -4590,21 +5012,19 @@ msgstr "ลบจุดพัà¸à¸—ั้งหมด"
#: editor/plugins/script_text_editor.cpp
msgid "Goto Next Breakpoint"
-msgstr "ไปจุดพัà¸à¸•à¹ˆà¸­à¹„ป"
+msgstr "ไปจุดพัà¸à¸–ัดไป"
#: editor/plugins/script_text_editor.cpp
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
@@ -4631,19 +5051,19 @@ msgstr "ค้นหาคำที่เลือà¸à¹ƒà¸™à¸„ู่มือ"
#: editor/plugins/shader_editor_plugin.cpp
msgid "Shader"
-msgstr ""
+msgstr "Shader"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Scalar Constant"
-msgstr ""
+msgstr "à¹à¸à¹‰à¹„ขค่าคงที่"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Vec Constant"
-msgstr ""
+msgstr "à¹à¸à¹‰à¹„ขค่าคงที่เวà¸à¹€à¸•à¸­à¸£à¹Œ"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change RGB Constant"
-msgstr ""
+msgstr "à¹à¸à¹‰à¹„ขค่าคงที่สี"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Scalar Operator"
@@ -4667,11 +5087,11 @@ msgstr ""
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Scalar Function"
-msgstr ""
+msgstr "à¹à¸à¹‰à¹„ขฟังà¸à¹Œà¸Šà¸±à¸™ Scalar"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Vec Function"
-msgstr ""
+msgstr "à¹à¸à¹‰à¹„ขฟังà¸à¹Œà¸Šà¸±à¸™à¹€à¸§à¸à¹€à¸•à¸­à¸£à¹Œ"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Scalar Uniform"
@@ -4687,7 +5107,7 @@ msgstr ""
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Default Value"
-msgstr ""
+msgstr "à¹à¸à¹‰à¹„ขค่าปริยาย"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change XForm Uniform"
@@ -4850,63 +5270,28 @@ msgid "Animation Key Inserted."
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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "ไปหน้า"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "ย้อนà¸à¸¥à¸±à¸š"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "ล้อเมาส์ลง"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
-msgstr ""
+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 "จำนวนครั้งที่เปลี่ยน Shader"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Surface Changes"
-msgstr "อัพเดทเมื่อเปลี่ยนà¹à¸›à¸¥à¸‡"
+msgstr "จำนวนครั้งที่เปลี่ยนพื้นผิว"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Draw Calls"
-msgstr ""
+msgstr "จำนวนครั้งในà¸à¸²à¸£à¸§à¸²à¸”"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Vertices"
-msgstr "คุณสมบัติ:"
+msgstr "มุมรูปทรง"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Align with view"
@@ -4921,9 +5306,8 @@ msgid "Display Wireframe"
msgstr "à¹à¸ªà¸”งโครงร่าง"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Display Overdraw"
-msgstr "à¹à¸ªà¸”งà¸à¸²à¸£à¸§à¸²à¸”ซ้ำซ้อน"
+msgstr "à¹à¸ªà¸”งà¸à¸²à¸£à¸§à¸²à¸”ทับซ้อน"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
@@ -4933,24 +5317,76 @@ msgstr "à¹à¸ªà¸”งà¹à¸šà¸šà¹„ร้เงา"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Environment"
-msgstr "สภาพà¹à¸§à¸”ล้อม"
+msgstr "à¹à¸ªà¸”งสภาพà¹à¸§à¸”ล้อม"
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
msgid "View Gizmos"
-msgstr "เครื่องมือเคลื่อนย้าย 3D"
+msgstr "à¹à¸ªà¸”งสัà¸à¸¥à¸±à¸à¸©à¸“์"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Information"
-msgstr ""
+msgstr "à¹à¸ªà¸”งข้อมูล"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Audio Listener"
msgstr "ตัวรับเสียง"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "preview"
+msgstr "ตัวอย่าง"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
msgid "XForm Dialog"
-msgstr ""
+msgstr "เครื่องมือเคลื่อนย้าย"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "โหมดเลือà¸"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid ""
+"Drag: Rotate\n"
+"Alt+Drag: Move\n"
+"Alt+RMB: Depth list selection"
+msgstr "Alt+คลิà¸à¸‚วา: เลือà¸à¸—ี่ซ้อนà¸à¸±à¸™"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode (W)"
@@ -5009,24 +5445,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 "Ctrl: หมุน"
+msgstr "เครื่องมือหมุน"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Tool Scale"
-msgstr "อัตราส่วน:"
+msgstr "เครื่องมือปรับขนาด"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform"
@@ -5073,24 +5505,25 @@ 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 "ตั้งค่า Snap"
+msgstr "ตั้งค่าà¸à¸²à¸£à¸ˆà¸³à¸à¸±à¸”"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Translate Snap:"
-msgstr "Snap à¸à¸²à¸£à¸¢à¹‰à¸²à¸¢:"
+msgstr "จำà¸à¸±à¸”à¸à¸²à¸£à¸¢à¹‰à¸²à¸¢:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Rotate Snap (deg.):"
-msgstr "Snap à¸à¸²à¸£à¸«à¸¡à¸¸à¸™ (องศา):"
+msgstr "จำà¸à¸±à¸”à¸à¸²à¸£à¸«à¸¡à¸¸à¸™ (องศา):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Scale Snap (%):"
-msgstr "Snap ปรับขนาด (%):"
+msgstr "จำà¸à¸±à¸”ปรับขนาด (%):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Viewport Settings"
@@ -5098,15 +5531,15 @@ msgstr "ตั้งค่ามุมมอง"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Perspective FOV (deg.):"
-msgstr "FOV เพอร์สเปà¸à¸—ีฟ (องศา):"
+msgstr "ขอบเขตà¸à¸²à¸£à¸¡à¸­à¸‡à¹€à¸«à¹‡à¸™à¹€à¸žà¸­à¸£à¹Œà¸ªà¹€à¸›à¸à¸—ีฟ (องศา):"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Z-Near:"
-msgstr ""
+msgstr "à¸à¸²à¸£à¸¡à¸­à¸‡à¹€à¸«à¹‡à¸™à¸£à¸°à¸¢à¸°à¹ƒà¸à¸¥à¹‰:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "View Z-Far:"
-msgstr ""
+msgstr "à¸à¸²à¸£à¸¡à¸­à¸‡à¹€à¸«à¹‡à¸™à¸£à¸°à¸¢à¸°à¹„à¸à¸¥:"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Transform Change"
@@ -5201,8 +5634,13 @@ msgid "StyleBox Preview:"
msgstr "ตัวอย่าง StyleBox:"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
+msgid "Set Region Rect"
+msgstr "ขอบเขต Texture"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
-msgstr "โหมด Snap:"
+msgstr "โหมดà¸à¸²à¸£à¸ˆà¸³à¸à¸±à¸”:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "<None>"
@@ -5210,31 +5648,32 @@ msgstr "<ไม่มี>"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Pixel Snap"
-msgstr "Snap พิà¸à¹€à¸‹à¸¥"
+msgstr "จำà¸à¸±à¸”ให้ย้ายเป็นพิà¸à¹€à¸‹à¸¥"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Grid Snap"
-msgstr "Snap เส้นตาราง"
+msgstr "จำà¸à¸±à¸”ด้วยเส้นตาราง"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
msgid "Auto Slice"
-msgstr ""
+msgstr "à¹à¸šà¹ˆà¸‡à¸­à¸±à¸•à¹‚นมัติ"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Offset:"
-msgstr ""
+msgstr "เลื่อน:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Step:"
-msgstr ""
+msgstr "ขนาด:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Separation:"
-msgstr ""
+msgstr "เว้น:"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Texture Region"
-msgstr ""
+msgstr "ขอบเขต Texture"
#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Texture Region Editor"
@@ -5258,6 +5697,16 @@ msgid "Remove Item"
msgstr "ลบไอเทม"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "ลบไอเทมคลาส"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "ลบ"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr "ธีม"
@@ -5325,7 +5774,7 @@ msgstr "à¹à¸—็บ 2"
msgid "Tab 3"
msgstr "à¹à¸—็บ 3"
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr "ประเภท:"
@@ -5347,12 +5796,27 @@ msgid "Color"
msgstr "สี"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "ลบที่เลือà¸"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr "วาด TileMap"
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "ทำซ้ำ"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "เส้นตรง"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Bucket Fill"
+msgstr "ถัง"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5387,10 +5851,6 @@ msgid "Pick Tile"
msgstr "เลือภTile"
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr "เลือà¸"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr "หมุน 0 องศา"
@@ -5439,9 +5899,8 @@ msgid "Runnable"
msgstr "รันได้"
#: editor/project_export.cpp
-#, fuzzy
msgid "Delete patch '"
-msgstr "ลบ '"
+msgstr "ลบà¹à¸žà¸•à¸Šà¹Œ '"
#: editor/project_export.cpp
#, fuzzy
@@ -5452,7 +5911,7 @@ msgstr "ลบ '%s'?"
msgid "Presets"
msgstr "à¸à¸²à¸£à¸ªà¹ˆà¸‡à¸­à¸­à¸"
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "เพิ่ม.."
@@ -5499,6 +5958,24 @@ msgid "Make Patch"
msgstr "สร้างà¹à¸žà¸•à¸Šà¹Œ"
#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "Texture"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "รายชื่อเมท็อด:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr "ส่งออภPCK/Zip"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr "ไม่พบà¹à¸¡à¹ˆà¹à¸šà¸šà¸ªà¹ˆà¸‡à¸­à¸­à¸à¸ªà¸³à¸«à¸£à¸±à¸šà¹à¸žà¸¥à¸•à¸Ÿà¸­à¸£à¹Œà¸¡à¸™à¸µà¹‰:"
@@ -5511,14 +5988,12 @@ msgid "Invalid project path, the path must exist!"
msgstr "ที่อยู่โปรเจà¸à¸•à¹Œà¸œà¸´à¸”พลาด ต้องมีอยู่จริง!"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project path, project.godot must not exist."
-msgstr "ที่อยู่โปรเจà¸à¸•à¹Œà¸œà¸´à¸”พลาด ต้องไม่มี godot.cfg"
+msgstr "ที่อยู่โปรเจà¸à¸•à¹Œà¸œà¸´à¸”พลาด ต้องไม่มี project.godot"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project path, project.godot must exist."
-msgstr "ที่อยู่โปรเจà¸à¸•à¹Œà¸œà¸´à¸”พลาด ต้องมี godot.cfg"
+msgstr "ที่อยู่โปรเจà¸à¸•à¹Œà¸œà¸´à¸”พลาด ต้องมี project.godot"
#: editor/project_manager.cpp
msgid "Imported Project"
@@ -5529,9 +6004,8 @@ msgid "Invalid project path (changed anything?)."
msgstr "ตำà¹à¸«à¸™à¹ˆà¸‡à¹‚ปรเจà¸à¸•à¹Œà¸œà¸´à¸”พลาด (ได้à¹à¸à¹‰à¹„ขอะไรไปหรือไม่?)"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't create project.godot in project path."
-msgstr "สร้างไฟล์ godot.cfg ไม่ได้"
+msgstr "สร้างไฟล์ project.godot ไม่ได้"
#: editor/project_manager.cpp
#, fuzzy
@@ -5539,10 +6013,6 @@ msgid "The following files failed extraction from package:"
msgstr "ผิดพลาดขณะà¹à¸¢à¸à¹„ฟล์ต่อไปนี้จาà¸à¹à¸žà¸„เà¸à¸ˆ:"
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr "ติดตั้งà¹à¸žà¸„เà¸à¸ˆà¹€à¸ªà¸£à¹‡à¸ˆà¸ªà¸¡à¸šà¸¹à¸£à¸“์!"
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "นำเข้าโปรเจà¸à¸•à¹Œà¸—ี่มีอยู่เดิม"
@@ -5587,6 +6057,22 @@ msgid "Are you sure to open more than one project?"
msgstr "ยืนยันà¸à¸²à¸£à¹€à¸›à¸´à¸”โปรเจà¸à¸•à¹Œà¸¡à¸²à¸à¸à¸§à¹ˆà¸² 1 โปรเจà¸à¸•à¹Œ?"
#: 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 ""
+"ยังไม่ได้à¸à¸³à¸«à¸™à¸”ฉาà¸à¹€à¸£à¸´à¹ˆà¸¡à¸•à¹‰à¸™ à¸à¸³à¸«à¸™à¸”ตอนนี้หรือไม่?\n"
+"สามารถà¹à¸à¹‰à¹„ขภายหลังที่ \"ตัวเลือà¸à¹‚ปรเจà¸à¸•à¹Œ\" ใต้หัวข้อ 'application'"
+
+#: 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 "ยืนยันà¸à¸²à¸£à¸£à¸±à¸™à¹‚ปรเจà¸à¸•à¹Œà¸¡à¸²à¸à¸à¸§à¹ˆà¸² 1 โปรเจà¸à¸•à¹Œ?"
@@ -5601,10 +6087,6 @@ msgid ""
msgstr "จะทำà¸à¸²à¸£à¸ªà¹à¸à¸™à¸«à¸²à¹‚ปรเจà¸à¸•à¹Œà¹ƒà¸™ %s โฟลเดอร์ ยืนยัน?"
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr "ตัวจัดà¸à¸²à¸£à¹‚ปรเจà¸à¸•à¹Œ"
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr "รายชื่อโปรเจà¸à¸•à¹Œ"
@@ -5625,264 +6107,296 @@ msgid "New Project"
msgstr "โปรเจà¸à¸•à¹Œà¹ƒà¸«à¸¡à¹ˆ"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Templates"
-msgstr "ลบà¹à¸¡à¹ˆà¹à¸šà¸š"
+msgstr "à¹à¸¡à¹ˆà¹à¸šà¸š"
#: editor/project_manager.cpp
msgid "Exit"
msgstr "ออà¸"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "เชื่อมต่อไม่ได้"
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "ปุ่ม "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr "ปุ่มจอย"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr "คันบังคับจอย"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr "ปุ่มเมาส์"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr "ใช้ชื่อนี้ไม่ได้ (มี '/' หรือ ':')"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr "มีà¸à¸²à¸£à¸à¸£à¸°à¸—ำ '%s' อยู่à¹à¸¥à¹‰à¸§!"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr "เปลี่ยนชื่อà¸à¸²à¸£à¸à¸£à¸°à¸—ำ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr "เพิ่มà¸à¸²à¸£à¸à¸£à¸°à¸—ำ"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr "Control+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "à¸à¸”ปุ่ม.."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr "ปุ่มเมาส์:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr "เมาส์ซ้าย"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr "เมาส์ขวา"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr "เมาส์à¸à¸¥à¸²à¸‡"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr "ล้อเมาส์ขึ้น"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr "ล้อเมาส์ลง"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr "ปุ่ม 6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr "ปุ่ม 7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr "ปุ่ม 8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr "ปุ่ม 9"
-#: editor/project_settings.cpp
+#: 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.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "à¹à¸à¸™"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr "ปุ่มจอย:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr "เพิ่มà¸à¸²à¸£à¸à¸£à¸°à¸—ำ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr "ลบà¸à¸²à¸£à¸à¸£à¸°à¸—ำ"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Add Event"
-msgstr "เพิ่มà¹à¸šà¸šà¸§à¹ˆà¸²à¸‡à¹€à¸›à¸¥à¹ˆà¸²"
+msgstr "เพิ่ม"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "อุปà¸à¸£à¸“์"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "ปุ่ม"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "ปุ่มเมาส์ซ้าย"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "ปุ่มเมาส์ขวา"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "ปุ่มเมาส์à¸à¸¥à¸²à¸‡"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "ล้อเมาส์ขึ้น"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "ล้อเมาส์ลง"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "เพิ่มตัวรับคุณสมบัติ"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "No property '"
+msgstr "คุณสมบัติ:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "ตัวเลือà¸"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "ลบอินพุต"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "ผิดพลาดขณะบันทึà¸à¸„่า"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "บันทึà¸à¹à¸¥à¹‰à¸§"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr "เพิ่มà¸à¸²à¸£à¹à¸›à¸¥"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "ลบà¸à¸²à¸£à¹à¸›à¸¥"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr "เพิ่มตำà¹à¸«à¸™à¹ˆà¸‡à¹à¸—นที่"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr "เพิ่มà¸à¸²à¸£à¹à¸—นที่"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr "เปลี่ยนภาษาที่ใช้à¹à¸—นที่ไฟล์"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr "ลบà¸à¸²à¸£à¹à¸—นที่"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr "ลบà¸à¸²à¸£à¹à¸—นที่"
-#: editor/project_settings.cpp
-#, fuzzy
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
-msgstr "ตัวเลือà¸à¹‚ปรเจà¸à¸•à¹Œ (godot.cfg)"
+msgstr "ตัวเลือà¸à¹‚ปรเจà¸à¸•à¹Œ (project.godot)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr "ทั่วไป"
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr "คุณสมบัติ:"
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr "ลบ"
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr "คัดลอà¸à¹„ปยังà¹à¸žà¸¥à¸•à¸Ÿà¸­à¸£à¹Œà¸¡.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
+msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr "ปุ่มà¸à¸”"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr "à¸à¸²à¸£à¸à¸£à¸°à¸—ำ:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr "อุปà¸à¸£à¸“์:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr "ดัชนี:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr "à¸à¸²à¸£à¹à¸›à¸¥"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr "à¸à¸²à¸£à¹à¸›à¸¥"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr "à¸à¸²à¸£à¹à¸›à¸¥:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr "à¸à¸²à¸£à¹à¸—นที่"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr "รีซอร์ส:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr "à¹à¸—นที่ตามท้องถิ่น:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr "ท้องถิ่น"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "ออโต้โหลด"
@@ -5923,6 +6437,11 @@ msgid "Assign"
msgstr "ระบุ"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "เลือà¸à¹‚หนด"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr "สคริปต์ใหม่"
@@ -5935,6 +6454,11 @@ msgid "Error loading file: Not a resource!"
msgstr "ผิดพลาดขณะโหลดไฟล์: ไม่ใช่รีซอร์ส!"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "เลือà¸à¹‚หนดเพื่อนำเข้า"
+
+#: editor/property_editor.cpp
msgid "Pick a Node"
msgstr "เลือà¸à¹‚หนด"
@@ -6030,6 +6554,11 @@ msgstr "ตัวà¹à¸›à¸£à¸‰à¸²à¸à¸«à¸¥à¸±à¸:"
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 "ไม่มีโหนดà¹à¸¡à¹ˆà¹€à¸›à¹‡à¸™à¸—ี่อินสà¹à¸•à¸™à¸‹à¹Œà¸‰à¸²à¸"
@@ -6073,12 +6602,8 @@ msgid "Delete Node(s)?"
msgstr "ลบโหนด?"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "ทำไม่ได้ถ้าไม่มีฉาà¸"
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
-msgstr "ไม่สามารถทำได้โดยที่ไม่มีโหนดราà¸"
+msgstr "ทำà¸à¸±à¸šà¹‚หนดราà¸à¹„ม่ได้"
#: editor/scene_tree_dock.cpp
msgid "This operation can't be done on instanced scenes."
@@ -6089,6 +6614,18 @@ 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 "เข้าใจ!"
@@ -6132,6 +6669,14 @@ msgid "Edit Connections"
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 "ลบโหนด"
@@ -6182,6 +6727,11 @@ msgid ""
msgstr "อินสà¹à¸•à¸™à¸‹à¹Œà¸‰à¸²à¸à¹€à¸›à¹‡à¸™à¹‚หนด สร้างฉาà¸à¸ªà¸·à¸šà¸—อดถ้าไม่มีโหนดราà¸"
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "ตัวà¸à¸£à¸­à¸‡"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr "เชื่อมสคริปต์ใหม่หรือที่มีอยู่เดิมให้à¸à¸±à¸šà¹‚หนดที่เลือà¸"
@@ -6189,9 +6739,17 @@ msgstr "เชื่อมสคริปต์ใหม่หรือที่
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 "ซ่อน/à¹à¸ªà¸”งโหนด Spatial"
+msgstr "ซ่อน/à¹à¸ªà¸”งโหนด"
#: editor/scene_tree_editor.cpp
msgid "Toggle CanvasItem Visible"
@@ -6199,56 +6757,60 @@ msgstr "ซ่อน/à¹à¸ªà¸”งโหนด CanvasItem"
#: editor/scene_tree_editor.cpp
msgid "Node configuration warning:"
-msgstr ""
+msgstr "คำเตือนà¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าโหนด:"
#: editor/scene_tree_editor.cpp
msgid ""
"Node has connection(s) and group(s)\n"
"Click to show signals dock."
msgstr ""
+"โหนดมีà¸à¸²à¸£à¹€à¸Šà¸·à¹ˆà¸­à¸¡à¹‚ยงà¹à¸¥à¸°à¸à¸¥à¸¸à¹ˆà¸¡\n"
+"คลิà¸à¹€à¸žà¸·à¹ˆà¸­à¹à¸ªà¸”งà¹à¸œà¸‡à¸ªà¸±à¸à¸à¸²à¸“"
#: editor/scene_tree_editor.cpp
msgid ""
"Node has connections.\n"
"Click to show signals dock."
msgstr ""
+"โหนดมีà¸à¸²à¸£à¹€à¸Šà¸·à¹ˆà¸­à¸¡à¹‚ยง\n"
+"คลิà¸à¹€à¸žà¸·à¹ˆà¸­à¹à¸ªà¸”งà¹à¸œà¸‡à¸ªà¸±à¸à¸à¸²à¸“"
#: editor/scene_tree_editor.cpp
msgid ""
"Node is in group(s).\n"
"Click to show groups dock."
msgstr ""
-
-#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "ตัวเลือà¸à¸”ีบัค"
+"โหนดอยู่ในà¸à¸¥à¸¸à¹ˆà¸¡\n"
+"คลิà¸à¹€à¸žà¸·à¹ˆà¸­à¹à¸ªà¸”งà¹à¸œà¸‡à¸à¸¥à¸¸à¹ˆà¸¡"
#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr "อินสà¹à¸•à¸™à¸‹à¹Œ:"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Open script"
-msgstr "สคริปต์ต่อไป"
+msgstr "เปิดสคริปต์"
#: editor/scene_tree_editor.cpp
msgid ""
"Node is locked.\n"
"Click to unlock"
msgstr ""
+"โหนดถูà¸à¸¥à¹‡à¸­à¸„\n"
+"คลิà¸à¹€à¸žà¸·à¹ˆà¸­à¸›à¸¥à¸”ล็อค"
#: editor/scene_tree_editor.cpp
msgid ""
"Children are not selectable.\n"
"Click to make selectable"
msgstr ""
+"โหนดลูà¸à¸–ูà¸à¸—ำให้เลือà¸à¹„ม่ได้\n"
+"คลิà¸à¹€à¸žà¸·à¹ˆà¸­à¸—ำให้เลือà¸à¹„ด้"
#: editor/scene_tree_editor.cpp
#, fuzzy
msgid "Toggle Visibility"
-msgstr "ซ่อน/à¹à¸ªà¸”งโหนด Spatial"
+msgstr "ซ่อน/à¹à¸ªà¸”ง"
#: editor/scene_tree_editor.cpp
msgid "Invalid node name, the following characters are not allowed:"
@@ -6263,32 +6825,9 @@ msgid "Scene Tree (Nodes):"
msgstr "ผังฉาภ(โหนด):"
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr "à¹à¸à¹‰à¹„ขโหนดลูà¸à¹„ด้"
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr "โหลดเป็นตัวà¹à¸—น"
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr "ยà¸à¹€à¸¥à¸´à¸à¸à¸²à¸£à¸­à¸´à¸™à¸ªà¹à¸•à¸™à¸‹à¹Œ"
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr "เปิดในโปรà¹à¸à¸£à¸¡à¹à¸à¹‰à¹„ข"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr "ลบà¸à¸²à¸£à¸ªà¸·à¸šà¸—อด"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr "ลบà¸à¸²à¸£à¸ªà¸·à¸šà¸—อด? (ย้อนà¸à¸¥à¸±à¸šà¹„ม่ได้!)"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr "ลบ!"
+#, fuzzy
+msgid "Node Configuration Warning!"
+msgstr "คำเตือนà¸à¸²à¸£à¸•à¸±à¹‰à¸‡à¸„่าโหนด:"
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -6296,6 +6835,11 @@ msgstr "เลือà¸à¹‚หนด"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "ผิดพลาดขณะโหลดรูป:"
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "สร้างสคริปต์ในระบบไฟล์ไม่ได้"
@@ -6304,6 +6848,10 @@ msgid "Error loading script from %s"
msgstr "ผิดพลาดขณะโหลดสคริปต์จาภ%s"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "ไม่มี"
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "ตำà¹à¸«à¸™à¹ˆà¸‡à¸—ี่อยู่ว่างเปล่า"
@@ -6338,21 +6886,16 @@ msgid "Invalid inherited parent name or path"
msgstr "ไม่พบคุณสมบัติ"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script valid"
-msgstr "สคริปต์"
+msgstr "สคริปต์ถูà¸à¸•à¹‰à¸­à¸‡"
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9 and _"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
+msgstr "อัà¸à¸‚ระที่ใช้ได้: a-z, A-Z, 0-9 à¹à¸¥à¸° _"
#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
-msgstr ""
+msgstr "à¸à¸±à¸‡à¸ªà¸„ริปต์ในไฟล์ฉาà¸"
#: editor/script_create_dialog.cpp
#, fuzzy
@@ -6375,9 +6918,8 @@ msgid "Class Name"
msgstr "ชื่อคลาส:"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Template"
-msgstr "ลบà¹à¸¡à¹ˆà¹à¸šà¸š"
+msgstr "à¹à¸¡à¹ˆà¹à¸šà¸š"
#: editor/script_create_dialog.cpp
#, fuzzy
@@ -6521,8 +7063,12 @@ 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 "ปรับ FOV à¸à¸¥à¹‰à¸­à¸‡"
+msgstr "ปรับขอบเขตà¸à¸²à¸£à¸¡à¸­à¸‡à¹€à¸«à¹‡à¸™à¸‚องà¸à¸¥à¹‰à¸­à¸‡"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera Size"
@@ -6553,8 +7099,9 @@ msgid "Change Notifier Extents"
msgstr "à¹à¸à¹‰à¹„ขขนาด Notifier"
#: editor/spatial_editor_gizmos.cpp
+#, fuzzy
msgid "Change Particles AABB"
-msgstr ""
+msgstr "เปลี่ยนà¸à¸£à¸­à¸šà¸­à¸™à¸¸à¸ à¸²à¸„"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Probe Extents"
@@ -6602,6 +7149,137 @@ msgstr "รูปà¹à¸šà¸šà¸”ิà¸à¸Šà¸±à¸™à¸™à¸²à¸£à¸µà¸—ี่เà¸à¹‡à¸šà¸­
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
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "ลบสิ่งที่เลือà¸"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "ทำซ้ำในà¹à¸—ร็à¸à¹€à¸”ิม"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "Ctrl: หมุน"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "Ctrl: หมุน"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Z"
+msgstr "Ctrl: หมุน"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "สร้างใหม่"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "สร้างโปรเจà¸à¸•à¹Œà¹ƒà¸«à¸¡à¹ˆ"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Area"
+msgstr "ลบ TileMap"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "เฉพาะที่à¸à¸³à¸¥à¸±à¸‡à¹€à¸¥à¸·à¸­à¸"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "เฉพาะที่à¸à¸³à¸¥à¸±à¸‡à¹€à¸¥à¸·à¸­à¸"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "ตั้งค่าà¸à¸²à¸£à¸ˆà¸³à¸à¸±à¸”"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "อินสà¹à¸•à¸™à¸‹à¹Œ:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr " ไฟล์"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
#, fuzzy
msgid ""
@@ -6637,6 +7315,31 @@ msgid "Stack overflow with stack depth: "
msgstr "สà¹à¸•à¸„ล้น ความสูงสà¹à¸•à¸„: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "à¹à¸à¹‰à¹„ขตัวà¹à¸›à¸£à¸ªà¸±à¸à¸à¸²à¸“:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "เปลี่ยนประเภทตัวà¹à¸›à¸£à¹ƒà¸™à¸­à¸²à¸£à¹Œà¹€à¸£à¸¢à¹Œ"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "เปลี่ยนชื่อà¹à¸­à¸™à¸´à¹€à¸¡à¸Šà¸±à¸™:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Default Value"
+msgstr "à¹à¸à¹‰à¹„ขค่าปริยาย"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "à¹à¸à¹‰à¹„ขตัวà¹à¸›à¸£:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "ฟังà¸à¹Œà¸Šà¸±à¸™:"
@@ -6677,26 +7380,6 @@ msgid "Add Signal"
msgstr "เพิ่มสัà¸à¸à¸²à¸“"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "ลบฟังà¸à¹Œà¸Šà¸±à¸™"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "ลบตัวà¹à¸›à¸£"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "à¹à¸à¹‰à¹„ขตัวà¹à¸›à¸£:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "ลบสัà¸à¸à¸²à¸“"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "à¹à¸à¹‰à¹„ขสัà¸à¸à¸²à¸“:"
-
-#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
msgid "Change Expression"
msgstr "à¹à¸à¹‰à¹„ขสมà¸à¸²à¸£"
@@ -6706,6 +7389,16 @@ msgid "Add Node"
msgstr "เพิ่มโหนด"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "ลบคีย์ที่ผิดพลาด"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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 "à¸à¸”ปุ่ม Meta ค้างเพื่อวาง Getter à¸à¸” Shift ค้างเพื่อวาง generic signature"
@@ -6746,6 +7439,26 @@ msgid "Add Setter Property"
msgstr "เพิ่มตัวà¸à¸³à¸«à¸™à¸”คุณสมบัติ"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "เปลี่ยนประเภท"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "ลบโหนด"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "ลบโหนด"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "เชื่อมไปยังโหนด:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "เงื่อนไข"
@@ -6775,6 +7488,56 @@ msgstr "รับ"
#: modules/visual_script/visual_script_editor.cpp
#, fuzzy
+msgid "Change Input Value"
+msgstr "à¹à¸à¹‰à¹„ขค่าปริยาย"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "ทำงานใน '..' ไม่ได้"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "คลิปบอร์ดไม่มีรีซอร์ส!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "วางโหนด"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "ลบฟังà¸à¹Œà¸Šà¸±à¸™"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "à¹à¸à¹‰à¹„ขตัวà¹à¸›à¸£:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "ลบตัวà¹à¸›à¸£"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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
+#, fuzzy
msgid "Base Type:"
msgstr "ชนิด:"
@@ -6795,10 +7558,6 @@ msgid "Edit Variable:"
msgstr "à¹à¸à¹‰à¹„ขตัวà¹à¸›à¸£:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "เปลี่ยน"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "ลบสิ่งที่เลือà¸"
@@ -6874,14 +7633,6 @@ msgid ""
"(error)."
msgstr "ค่าคืนจาภ_step() ผิดพลาด ต้องเป็นจำนวนเต็ม (ลำดับ) หรือสตริง (ข้อผิดพลาด)"
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "เพิ่งà¸à¸”"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "เพิ่งปล่อย"
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr "รันในเบราเซอร์"
@@ -6902,79 +7653,6 @@ msgstr "อ่านไฟล์ไม่ได้:\n"
msgid "Could not open template for export:\n"
msgstr "เปิดà¹à¸¡à¹ˆà¹à¸šà¸šà¹€à¸žà¸·à¹ˆà¸­à¸ªà¹ˆà¸‡à¸­à¸­à¸à¹„ม่ได้:\n"
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr "ไม่สามารถอ่านไฟล์ใบรับรองได้ ตำà¹à¸«à¸™à¹ˆà¸‡à¹„ฟล์à¹à¸¥à¸°à¸£à¸«à¸±à¸ªà¸œà¹ˆà¸²à¸™à¸–ูà¸à¸•à¹‰à¸­à¸‡à¸«à¸£à¸·à¸­à¹„ม่?"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "ผิดพลาดขณะสร้าง signature object"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr "ผิดพลาดขณะสร้าง signature ของà¹à¸žà¸„เà¸à¸ˆ"
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"ไม่มีà¹à¸¡à¹ˆà¹à¸šà¸šà¸ªà¸³à¸«à¸£à¸±à¸šà¸ªà¹ˆà¸‡à¸­à¸­à¸\n"
-"ดาวน์โหลดà¹à¸¥à¸°à¸•à¸´à¸”ตั้งà¹à¸¡à¹ˆà¹à¸šà¸š"
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr "ไม่พบà¹à¸žà¸„เà¸à¸ˆà¸”ีบัคที่à¸à¸³à¸«à¸™à¸”"
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr "ไม่พบà¹à¸žà¸„เà¸à¸ˆà¸ˆà¸³à¸«à¸™à¹ˆà¸²à¸¢à¸—ี่à¸à¸³à¸«à¸™à¸”"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr "ชื่อเฉพาะไม่ถูà¸à¸•à¹‰à¸­à¸‡"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr "GUID ของโปรà¹à¸à¸£à¸¡à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr "GUID ของผู้จัดจำหน่ายไม่ถูà¸à¸•à¹‰à¸­à¸‡"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "สีพื้นหลังผิดพลาด"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "ขนาดรูปโลโà¸à¹‰ Store ผิดพลาด (ต้องเป็น 50x50)"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr "ขนาดโลโà¸à¹‰à¸ˆà¸±à¸•à¸¸à¸£à¸±à¸ª 44x44 ผิดพลาด (ต้องเป็น 44x44)"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr "ขนาดโลโà¸à¹‰à¸ˆà¸±à¸•à¸¸à¸£à¸±à¸ª 71x71 ผิดพลาด (ต้องเป็น 71x71)"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr "ขนาดโลโà¸à¹‰à¸ˆà¸±à¸•à¸¸à¸£à¸±à¸ª 150x150 ผิดพลาด (ต้องเป็น 150x150)"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr "ขนาดโลโà¸à¹‰à¸ˆà¸±à¸•à¸¸à¸£à¸±à¸ª 310x310 ผิดพลาด (ต้องเป็น 310x310)"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr "ขนาดโลโà¸à¹‰à¸à¸§à¹‰à¸²à¸‡ 310x150 ผิดพลาด (ต้องเป็น 310x150)"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr "ขนาดรูปหน้าจอเริ่มโปรà¹à¸à¸£à¸¡à¸œà¸´à¸”พลาด (ต้องเป็น 620x300)"
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7064,6 +7742,13 @@ msgstr ""
msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr "PathFollow2D จะทำงานได้ต้องเป็นโหนดลูà¸à¸‚องโหนด Path2D"
+#: 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 "ต้องà¹à¸à¹‰à¹„ข Path ให้ชี้ไปยังโหนด Node2D จึงจะทำงานได้"
@@ -7088,20 +7773,33 @@ msgid ""
"as parent."
msgstr "VisibilityEnable2D ควรจะเป็นโหนดลูà¸à¸‚องโหนดหลัà¸à¹ƒà¸™à¸‰à¸²à¸à¸™à¸µà¹‰"
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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 ""
-"CollisionShape ใช้เป็นรูปทรงสำหรับโหนดà¸à¸¥à¸¸à¹ˆà¸¡ CollisionObject จึงควรให้เป็นโหนดลูà¸à¸‚อง "
-"Area, StaticBody, RigidBody, KinematicBody ฯลฯ เพื่อให้มีรูปทรง"
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
-msgstr "ต้องมีรูปทรงเพื่อให้ CollisionShape ทำงานได้ à¸à¸£à¸¸à¸“าสร้างรูปทรง!"
+"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 ""
@@ -7116,6 +7814,21 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "CollisionPolygon ที่ว่างเปล่าจะไม่มีผลทางà¸à¸²à¸¢à¸ à¸²à¸ž"
+#: 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 ""
+"CollisionShape ใช้เป็นรูปทรงสำหรับโหนดà¸à¸¥à¸¸à¹ˆà¸¡ CollisionObject จึงควรให้เป็นโหนดลูà¸à¸‚อง "
+"Area, StaticBody, RigidBody, KinematicBody ฯลฯ เพื่อให้มีรูปทรง"
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr "ต้องมีรูปทรงเพื่อให้ CollisionShape ทำงานได้ à¸à¸£à¸¸à¸“าสร้างรูปทรง!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr "ต้องมี NavigationMesh เพื่อให้โหนดนี้ทำงานได้"
@@ -7133,6 +7846,13 @@ 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 "ต้องà¹à¸à¹‰à¹„ข Path ให้ชี้ไปยังโหนด Spatial จึงจะทำงานได้"
@@ -7150,12 +7870,12 @@ msgstr "ต้องมี SpriteFrames ใน 'Frames' เพื่อให้
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
-msgstr "โหมดหมุน"
+msgid "Raw Mode"
+msgstr "โหมดมุมมอง"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
-msgstr ""
+msgstr "เพิ่มสีที่เลือà¸à¹ƒà¸™à¸£à¸²à¸¢à¸à¸²à¸£à¹‚ปรด"
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -7165,22 +7885,6 @@ msgstr "à¹à¸ˆà¹‰à¸‡à¹€à¸•à¸·à¸­à¸™!"
msgid "Please Confirm..."
msgstr "à¸à¸£à¸¸à¸“ายืนยัน..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "เปิดไฟล์"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "เปิดไฟล์"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "เปิดโฟลเดอร์"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "เปิดไฟล์หรือโฟลเดอร์"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7204,11 +7908,13 @@ msgstr ""
"ใช้ container เป็นโหนดลูภ(VBox,HBox,ฯลฯ) หรือโหนดà¸à¸¥à¸¸à¹ˆà¸¡ Control "
"à¹à¸¥à¸°à¸›à¸£à¸±à¸šà¸‚นาดเล็à¸à¸ªà¸¸à¸”ด้วยตนเอง"
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
msgstr ""
+"ไม่สามารถโหลด Environment ปริยายที่à¸à¸³à¸«à¸™à¸”ในตัวเลือà¸à¹‚ปรเจà¸à¸•à¹Œà¹„ด้ (Rendering -> Viewport "
+"-> Default Environment)"
#: scene/main/viewport.cpp
msgid ""
@@ -7221,6 +7927,94 @@ msgstr ""
"ให้à¹à¸à¹‰à¹„ขโหนดนี้ให้เป็นโหนดลูà¸à¸‚อง Control à¹à¸•à¹ˆà¸–้าไม่ ให้ปรับเป็น render target à¹à¸¥à¸°à¸™à¸³à¹„ปใช้เป็น "
"texture ของโหนดอื่น"
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "ปิดไฟล์ฉาà¸? (à¸à¸²à¸£à¹à¸à¹‰à¹„ขที่ไม่ได้บันทึà¸à¸ˆà¸°à¸ªà¸¹à¸à¸«à¸²à¸¢)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "เปิดตัวจัดà¸à¸²à¸£à¹‚ปรเจà¸à¸•à¹Œ?\n"
+#~ "(à¸à¸²à¸£à¹à¸à¹‰à¹„ขที่ไม่ได้บันทึà¸à¸ˆà¸°à¸ªà¸¹à¸à¸«à¸²à¸¢)"
+
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "ปิดไปยังฉาà¸à¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²"
+
+#~ msgid "Expand to Parent"
+#~ msgstr "ขยายให้เต็มโหนดà¹à¸¡à¹ˆ"
+
+#~ msgid "Del"
+#~ msgstr "ลบ"
+
+#~ msgid "Copy To Platform.."
+#~ msgstr "คัดลอà¸à¹„ปยังà¹à¸žà¸¥à¸•à¸Ÿà¸­à¸£à¹Œà¸¡.."
+
+#~ msgid "just pressed"
+#~ msgstr "เพิ่งà¸à¸”"
+
+#~ msgid "just released"
+#~ msgstr "เพิ่งปล่อย"
+
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr "ไม่สามารถอ่านไฟล์ใบรับรองได้ ตำà¹à¸«à¸™à¹ˆà¸‡à¹„ฟล์à¹à¸¥à¸°à¸£à¸«à¸±à¸ªà¸œà¹ˆà¸²à¸™à¸–ูà¸à¸•à¹‰à¸­à¸‡à¸«à¸£à¸·à¸­à¹„ม่?"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "ผิดพลาดขณะสร้าง signature object"
+
+#~ msgid "Error creating the package signature."
+#~ msgstr "ผิดพลาดขณะสร้าง signature ของà¹à¸žà¸„เà¸à¸ˆ"
+
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "ไม่มีà¹à¸¡à¹ˆà¹à¸šà¸šà¸ªà¸³à¸«à¸£à¸±à¸šà¸ªà¹ˆà¸‡à¸­à¸­à¸\n"
+#~ "ดาวน์โหลดà¹à¸¥à¸°à¸•à¸´à¸”ตั้งà¹à¸¡à¹ˆà¹à¸šà¸š"
+
+#~ msgid "Custom debug package not found."
+#~ msgstr "ไม่พบà¹à¸žà¸„เà¸à¸ˆà¸”ีบัคที่à¸à¸³à¸«à¸™à¸”"
+
+#~ msgid "Custom release package not found."
+#~ msgstr "ไม่พบà¹à¸žà¸„เà¸à¸ˆà¸ˆà¸³à¸«à¸™à¹ˆà¸²à¸¢à¸—ี่à¸à¸³à¸«à¸™à¸”"
+
+#~ msgid "Invalid unique name."
+#~ msgstr "ชื่อเฉพาะไม่ถูà¸à¸•à¹‰à¸­à¸‡"
+
+#~ msgid "Invalid product GUID."
+#~ msgstr "GUID ของโปรà¹à¸à¸£à¸¡à¹„ม่ถูà¸à¸•à¹‰à¸­à¸‡"
+
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "GUID ของผู้จัดจำหน่ายไม่ถูà¸à¸•à¹‰à¸­à¸‡"
+
+#~ msgid "Invalid background color."
+#~ msgstr "สีพื้นหลังผิดพลาด"
+
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr "ขนาดรูปโลโà¸à¹‰ Store ผิดพลาด (ต้องเป็น 50x50)"
+
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr "ขนาดโลโà¸à¹‰à¸ˆà¸±à¸•à¸¸à¸£à¸±à¸ª 44x44 ผิดพลาด (ต้องเป็น 44x44)"
+
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr "ขนาดโลโà¸à¹‰à¸ˆà¸±à¸•à¸¸à¸£à¸±à¸ª 71x71 ผิดพลาด (ต้องเป็น 71x71)"
+
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr "ขนาดโลโà¸à¹‰à¸ˆà¸±à¸•à¸¸à¸£à¸±à¸ª 150x150 ผิดพลาด (ต้องเป็น 150x150)"
+
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr "ขนาดโลโà¸à¹‰à¸ˆà¸±à¸•à¸¸à¸£à¸±à¸ª 310x310 ผิดพลาด (ต้องเป็น 310x310)"
+
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr "ขนาดโลโà¸à¹‰à¸à¸§à¹‰à¸²à¸‡ 310x150 ผิดพลาด (ต้องเป็น 310x150)"
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr "ขนาดรูปหน้าจอเริ่มโปรà¹à¸à¸£à¸¡à¸œà¸´à¸”พลาด (ต้องเป็น 620x300)"
+
+#~ msgid "RAW Mode"
+#~ msgstr "โหมด Raw"
+
#~ msgid "Node From Scene"
#~ msgstr "โหนดจาà¸à¸‰à¸²à¸"
@@ -7294,9 +8088,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "à¹à¸—นที่à¹à¸¥à¹‰à¸§ %d ครั้ง"
-#~ msgid "Please save the scene first."
-#~ msgstr "à¸à¸£à¸¸à¸“าบันทึà¸à¸‰à¸²à¸à¸à¹ˆà¸­à¸™"
-
#, fuzzy
#~ msgid "Save Translatable Strings"
#~ msgstr "บันทึà¸à¸ªà¸•à¸£à¸´à¸‡à¸«à¸¥à¸²à¸¢à¸ à¸²à¸©à¸²"
@@ -7464,9 +8255,6 @@ msgstr ""
#~ msgid "Script Encryption Key (256-bits as hex):"
#~ msgstr "คีย์เข้ารหัสสคริปต์ (256 บิต à¸à¸²à¸™ 16):"
-#~ msgid "Export PCK/Zip"
-#~ msgstr "ส่งออภPCK/Zip"
-
#~ msgid "Export Project PCK"
#~ msgstr "ส่งออภPCK โปรเจà¸à¸•à¹Œ"
diff --git a/editor/translations/tr.po b/editor/translations/tr.po
index b041ed0901..df749f5c9b 100644
--- a/editor/translations/tr.po
+++ b/editor/translations/tr.po
@@ -5,21 +5,22 @@
# Aprın Çor Tigin <kabusturk38@gmail.com>, 2016-2017.
# Ceyhun Can Ulker <ceyhuncanu@gmail.com>, 2016.
# Enes Kaya Öcal <ekayaocal@hotmail.com>, 2016.
+# hubbyist <hub@legrud.net>, 2017.
# M. Yavuz Uzun <myavuzuzun@yandex.com>, 2016.
# Orkun Turan <holygatestudio@yandex.com>, 2016-2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2017-01-22 12:30+0000\n"
-"Last-Translator: Aprın Çor Tigin <kabusturk38@gmail.com>\n"
+"PO-Revision-Date: 2017-07-19 09:38+0000\n"
+"Last-Translator: hubbyist <hub@legrud.net>\n"
"Language-Team: Turkish <https://hosted.weblate.org/projects/godot-engine/"
"godot/tr/>\n"
"Language: tr\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.11-dev\n"
+"X-Generator: Weblate 2.16-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -86,9 +87,8 @@ msgid "Anim Track Change Value Mode"
msgstr "Canln İzi Değer Değiştir Biçimi"
#: editor/animation_editor.cpp
-#, fuzzy
msgid "Anim Track Change Wrap Mode"
-msgstr "Canln İzi Değer Değiştir Biçimi"
+msgstr "Canlandırma İzi Hizalama Modunu Değiştir"
#: editor/animation_editor.cpp
msgid "Edit Node Curve"
@@ -150,7 +150,8 @@ msgstr "Sonraki Adıma Git"
msgid "Goto Prev Step"
msgstr "Önceki Adıma Git"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "DoÄŸrusal"
@@ -364,21 +365,19 @@ msgstr "Dizi DeÄŸerini DeÄŸiÅŸtir"
#: editor/asset_library_editor_plugin.cpp
msgid "Free"
-msgstr ""
+msgstr "Özgür"
#: editor/asset_library_editor_plugin.cpp editor/editor_plugin_settings.cpp
msgid "Version:"
msgstr "Sürüm:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Contents:"
-msgstr "Sabitler:"
+msgstr "İçerikler:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "View Files"
-msgstr "Dizeç"
+msgstr "Dosyaları Görüntüle"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
#: editor/editor_help.cpp editor/property_selector.cpp
@@ -386,7 +385,8 @@ msgstr "Dizeç"
msgid "Description:"
msgstr "Açıklama:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr "Kur"
@@ -397,55 +397,52 @@ msgstr "Kur"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "Kapat"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve hostname:"
-msgstr ""
+msgstr "Ana makine adı çözümlenemedi:"
#: editor/asset_library_editor_plugin.cpp
msgid "Can't resolve."
-msgstr ""
+msgstr "Çözümlenemedi."
#: editor/asset_library_editor_plugin.cpp
msgid "Connection error, please try again."
-msgstr ""
+msgstr "Bağlantı hatası, lütfen tekrar deneyiniz."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect."
-msgstr "BaÄŸlan..."
+msgstr "Bağlanamadı."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect to host:"
-msgstr "Düğüme Bağlan:"
+msgstr "Ana makineye bağlanılamadı:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr ""
+msgstr "Ana makineden cevap yok:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response."
-msgstr ""
+msgstr "Cevap yok."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Request failed, return code:"
-msgstr "İstenilen dizeç formatı bilinmiyor:"
+msgstr "İstem başarısız, dönen kod:"
#: editor/asset_library_editor_plugin.cpp
msgid "Req. Failed."
-msgstr ""
+msgstr "İstem Başarısız."
#: editor/asset_library_editor_plugin.cpp
msgid "Request failed, too many redirects"
-msgstr ""
+msgstr "İstem Başarısız, çok fazla yönlendirme"
#: editor/asset_library_editor_plugin.cpp
msgid "Redirect Loop."
@@ -475,7 +472,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -541,17 +538,16 @@ msgid "All"
msgstr "Hepsi"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "Ara:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "Ara"
@@ -567,7 +563,7 @@ msgstr "Ara"
msgid "Import"
msgstr "İçe Aktar"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "Eklentiler"
@@ -579,7 +575,7 @@ msgstr "Sırala:"
msgid "Reverse"
msgstr "Tersi"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "Katman:"
@@ -734,14 +730,14 @@ msgstr "Düğüme Bağlan:"
#: 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.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Add"
msgstr "Ekle"
#: 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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "Kaldır"
@@ -850,7 +846,7 @@ msgid "Resource"
msgstr "Kaynak"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "Yol"
@@ -932,12 +928,194 @@ msgstr "Orphan Kaynak Gezgini"
msgid "Delete selected files?"
msgstr "Seçili dizeçleri sil?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Sil"
+#: editor/editor_about.cpp
+msgid "Thanks from the Godot community!"
+msgstr "Godot Topluluğu Sağ Olmanızı Diliyor!"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "SaÄŸ olun!"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr ""
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "Yazar:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "Tasarı Yöneticisi"
+
+#: editor/editor_about.cpp
+msgid "Lead Developer"
+msgstr ""
+
+#: editor/editor_about.cpp editor/project_manager.cpp
+msgid "Project Manager"
+msgstr "Tasarı Yöneticisi"
+
+#: editor/editor_about.cpp
+msgid "Developers"
+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
+#, fuzzy
+msgid "All Components"
+msgstr "İçerikler:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Components"
+msgstr "İçerikler:"
+
+#: 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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "Sıkıştırılmamış"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "Çıkın Başarı ile Kuruldu!"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "Çıkın Başarı ile Kuruldu!"
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Effect"
+msgstr "BoÅŸ Ekle"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "KendindenYüklenme'yi Yeniden Adlandır"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Solo"
+msgstr "KendindenOynatmayı Aç/Kapat"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "Seçilenleri Sil"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+msgstr "Sorun ayıklama seçenekleri"
+
+#: 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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "Ä°kile"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "Seçilenleri Sil"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "Ekle %s"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "Tasarımı Sil"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "Canlandırmayı İkile"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "Eylemi Taşı"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -951,24 +1129,53 @@ 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
+#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"Geçersiz dizeç uzantısı.\n"
+"Lütfen .fnt uzantısını kullanın."
+
+#: editor/editor_audio_buses.cpp
#, fuzzy
msgid "Add Bus"
msgstr "Ekle %s"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "Yeni Kaynak OluÅŸtur"
+
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "Yükle"
#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Load an existing Bus Layout."
+msgstr "Var olan bir kaynağı saklaktan yükleyin ve düzenleyin."
+
+#: editor/editor_audio_buses.cpp
#: editor/plugins/animation_player_editor_plugin.cpp
msgid "Save As"
msgstr "BaÅŸkaca Kaydet"
-#: editor/editor_audio_buses.cpp editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+msgid "Save this Bus Layout to a file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+msgid "Load Default"
msgstr "Önyüklü"
+#: editor/editor_audio_buses.cpp
+msgid "Load the default Bus Layout."
+msgstr ""
+
#: editor/editor_autoload_settings.cpp
msgid "Invalid name."
msgstr "Geçersiz ad."
@@ -1069,6 +1276,11 @@ msgid "Updating scene.."
msgstr "Sahne güncelleniyor.."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "Lütfen önce sahneyi kaydediniz."
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "Dizin Seç"
@@ -1146,6 +1358,22 @@ msgstr "Tüm Dizeçler (*)"
msgid "Open"
msgstr "Aç"
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File"
+msgstr "Bir Dizeç Aç"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open File(s)"
+msgstr "Dizeç(leri) Aç"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a Directory"
+msgstr "Bir dizin aç"
+
+#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
+msgid "Open a File or Directory"
+msgstr "Bir Dizeç ya da Dizin Aç"
+
#: 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
@@ -1272,6 +1500,15 @@ msgid "Signals:"
msgstr "Ä°ÅŸaretler:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "Canlandırmalar"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "Sabitler:"
@@ -1288,7 +1525,8 @@ msgid "Search Text"
msgstr "Yazı Ara"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " Çıktı:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1338,6 +1576,11 @@ msgid "Creating Thumbnail"
msgstr "Küçük Bediz Oluşturuluyor"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "This operation can't be done without a tree root."
+msgstr "Bu işlem bir sahne olmadan yapılamaz."
+
+#: editor/editor_node.cpp
msgid ""
"Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."
msgstr "Sahne kaydedilemedi. Anlaşılan bağımlılıklar (örnekler) karşılanamadı."
@@ -1466,12 +1709,13 @@ msgid "Quick Open Script.."
msgstr "Betiği Hızlı Aç.."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "Evet"
+#, fuzzy
+msgid "Save & Close"
+msgstr "Dizeci Kaydet"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "Sahneyi kapatsın mı? (Kaydedilmemiş değişiklikler yok olacak)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
@@ -1483,9 +1727,17 @@ msgid "No"
msgstr "Düğüm"
#: editor/editor_node.cpp
+msgid "Yes"
+msgstr "Evet"
+
+#: editor/editor_node.cpp
msgid "This scene has never been saved. Save before running?"
msgstr "Sahne hiç kaydedilmedi. Çalıştırmadan önce kaydedilsin mi?"
+#: editor/editor_node.cpp editor/scene_tree_dock.cpp
+msgid "This operation can't be done without a scene."
+msgstr "Bu işlem bir sahne olmadan yapılamaz."
+
#: editor/editor_node.cpp
msgid "Export Mesh Library"
msgstr "Örüntü Betikevini Dışa Aktar"
@@ -1495,12 +1747,9 @@ msgid "Export Tile Set"
msgstr "Döşenti Dizi Dışa Aktar"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "Çıkış"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "Düzenleyiciden çık?"
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "Bu işlem bir sahne olmadan yapılamaz."
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1523,18 +1772,52 @@ msgid "Quick Run Scene.."
msgstr "Sahneyi Hızlı Çalıştır.."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "Çıkış"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "Düzenleyiciden çık?"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "Tasarı Yöneticisi"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Save & Quit"
+msgstr "Dizeci Kaydet"
+
+#: 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 ""
-"Tasarı Yöneticisini Aç\n"
-"(KaydedilmemiÅŸ deÄŸiÅŸiklikler kaybolacak!)"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "Bir Ana Sahne Seç"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1570,6 +1853,11 @@ msgstr "Tasarımı Kaydet"
msgid "Delete Layout"
msgstr "Tasarımı Sil"
+#: editor/editor_node.cpp editor/import_dock.cpp
+#: editor/script_create_dialog.cpp
+msgid "Default"
+msgstr "Önyüklü"
+
#: editor/editor_node.cpp
msgid "Switch Scene Tab"
msgstr "Sahne Sekmesine Geç"
@@ -1586,6 +1874,11 @@ msgstr "%d daha çok dizeç(ler) veya dizin(ler)"
msgid "Distraction Free Mode"
msgstr "Dikkat Dağıtmayan Biçim"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "Dikkat Dağıtmayan Biçim"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "Sahne"
@@ -1635,10 +1928,6 @@ msgstr "Tüm Sahneleri Kaydet"
msgid "Close Scene"
msgstr "Sahneyi Kapat"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr "Önc. Sahneye Git sekmesini Kapat"
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "En Sonuncuyu Aç"
@@ -1941,6 +2230,10 @@ msgstr "Düğüm"
msgid "Output"
msgstr "Çıktı"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "Yeniden İçe Aktar"
@@ -1950,26 +2243,10 @@ msgid "Update"
msgstr "Güncelle"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "Godot Topluluğu Sağ Olmanızı Diliyor!"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "SaÄŸ olun!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "Kalıpları ZIP Dizecinden İçe Aktar"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "Tasarıyı Dışa Aktar"
@@ -1990,9 +2267,18 @@ msgid "Open & Run a Script"
msgstr "Aç & Bir Betik Çalıştır"
#: editor/editor_node.cpp
+#, fuzzy
+msgid "New Inherited"
+msgstr "Yeni Kalıt Alınmış Sahne .."
+
+#: editor/editor_node.cpp
msgid "Load Errors"
msgstr "Sorunları Yükle"
+#: editor/editor_node.cpp editor/plugins/tile_map_editor_plugin.cpp
+msgid "Select"
+msgstr "Seç"
+
#: editor/editor_node.cpp
#, fuzzy
msgid "Open 2D Editor"
@@ -2099,6 +2385,16 @@ msgstr "Yeniden-İçe Aktarım"
msgid "Re-Import Changed Resources"
msgstr "Değiştirilmiş Kaynakları Yeniden İçe Aktar"
+#: 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 "Mantığını _run() yöntemine yaz."
@@ -2249,10 +2545,28 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "Kaydet & Yeniden İçe Aktar"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "Kaynak:"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr "Özdeş kaynak ve varış dizeçleri, hiçbir şey yapılmıyor."
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr "Özdeş kaynak ve varış yolları, hiçbir şey yapılmıyor."
@@ -2261,6 +2575,20 @@ msgid "Can't move directories to within themselves."
msgstr "Dizinleri kendi içlerine taşıyamazsınız."
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "Bediz yüklenirken sorun oluştu:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "İçe aktarırken sorun:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr "'..' üzerinde çalışılamıyor"
@@ -2338,6 +2666,12 @@ msgid "Instance the selected scene(s) as child of the selected node."
msgstr "Seçilen sahneyi/sahneleri seçilen düğüme çocuk olarak örneklendir."
#: editor/filesystem_dock.cpp
+msgid ""
+"Scanning Files,\n"
+"Please Wait.."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Move"
msgstr "Taşı"
@@ -2349,10 +2683,31 @@ msgstr "Öbeğe Ekle"
msgid "Remove from Group"
msgstr "Öbekten Kaldır"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "Yüzey %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+msgstr "Sahneyi İçe Aktarıyor..."
+
+#: 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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "3B Sahneyi İçe Aktar"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2393,6 +2748,14 @@ msgid "Saving.."
msgstr "Kaydediliyor..."
#: 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
#, fuzzy
msgid " Files"
msgstr "Dizeç"
@@ -2587,6 +2950,10 @@ msgstr "Kaynak Örüntü(leri):"
msgid "Mesh"
msgstr "Örüntü"
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "Yüzey %d"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr "Alınacak örnek yok!"
@@ -3172,6 +3539,11 @@ msgid "New name:"
msgstr "Yeni ad:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "Düğüm Süzgeçlerini Düzenle"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr "Ölçekle:"
@@ -3487,6 +3859,7 @@ msgstr "Nesnenin çocuğunun seçilebilme yeteneğini geri kazandırır."
#: 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "Düzenle"
@@ -3519,10 +3892,6 @@ msgid "Use Pixel Snap"
msgstr "Nokta Yapışması Kullan"
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr "Ataya geniÅŸletin"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr "Ä°skelet.."
@@ -3631,11 +4000,6 @@ msgstr "Bu işlem, seçilmiş tek bir düğüm gerektirir."
msgid "Change default type"
msgstr "Önyüklü tipi değiştir"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "Tamam"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3675,6 +4039,14 @@ msgstr "Çokluyu Düzenleyin (Noktayı Silin)"
msgid "Create a new polygon from scratch."
msgstr "Sıfırdan yeni bir çokgen oluşturun."
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr "Çoklu3B Oluştur"
@@ -3715,6 +4087,21 @@ msgstr "Sahneden Güncelle"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Modify Curve Point"
+msgstr "Eğri Haritasını Değiştir"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "Eğri Haritasını Değiştir"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Load Curve Preset"
+msgstr "Kaynak Yükle"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Add point"
msgstr "GiriÅŸ Ekle"
@@ -3725,13 +4112,31 @@ msgstr "Yol Noktasını Kaldır"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Left linear"
+msgstr "DoÄŸrusal"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Right linear"
+msgstr "Sağdan Görünüm"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
msgid "Load preset"
msgstr "Kaynak Yükle"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
-msgid "Modify Curve"
-msgstr "Eğri Haritasını Değiştir"
+msgid "Remove Curve Point"
+msgstr "Yol Noktasını Kaldır"
+
+#: 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"
@@ -3755,6 +4160,12 @@ msgid "Item List Editor"
msgstr "Öğe Dizelgesi Düzenleyicisi"
#: 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 "Engelleyici Çokgeni Oluştur"
@@ -4049,6 +4460,12 @@ msgid "Load Emission Mask"
msgstr "Yayma Örtecini Yükle"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
+msgid "Particles"
+msgstr "BaÅŸucu"
+
+#: editor/plugins/particles_2d_editor_plugin.cpp
msgid "Generated Point Count:"
msgstr "Ãœretilen Nokta Say:"
@@ -4380,6 +4797,12 @@ msgid "Clear Recent Files"
msgstr "Kemikleri Temizle"
#: 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 "Kalıp kaydedilirken sorun oluştu"
@@ -4404,6 +4827,10 @@ msgid "Save Theme As.."
msgstr "Kalıbı Başkaca Kaydet.."
#: editor/plugins/script_editor_plugin.cpp
+msgid " Class Reference"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Next script"
msgstr "Sonraki betik"
@@ -4456,6 +4883,11 @@ msgid "Close All"
msgstr "Tümünü Kapat"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Toggle Scripts Panel"
+msgstr "Beğenileni Aç / Kapat"
+
+#: editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp
msgid "Find.."
@@ -4488,6 +4920,11 @@ msgid "Keep Debugger Open"
msgstr "Kusurayıkları Açık Tut"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "Düzenleyicide Aç"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr "Pencere"
@@ -4557,6 +4994,10 @@ msgstr ""
"düzenlenebilirler"
#: 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 "Renk Seç"
@@ -4604,6 +5045,11 @@ msgid "Move Down"
msgstr "Aşağı Taşı"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "Noktayı Sil"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr "Sola Girintile"
@@ -4910,37 +5356,6 @@ msgid "Animation Key Inserted."
msgstr "Canlandırma Açarı Eklendi."
#: 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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "Ä°leri Git"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "Terse doÄŸru"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "Tekerlek Aşağı."
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -5008,10 +5423,64 @@ msgid "Audio Listener"
msgstr "Ses Dinleyici"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Doppler Enable"
+msgstr "Etkin"
+
+#: 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
+#, fuzzy
+msgid "Freelook Forward"
+msgstr "Ä°leri Git"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Backwards"
+msgstr "Terse doÄŸru"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Up"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Freelook Down"
+msgstr "Tekerlek Aşağı."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "preview"
+msgstr "Önizleme"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr "XForm Ä°letiÅŸim Kutusu"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "Biçim Seç"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid ""
+"Drag: Rotate\n"
+"Alt+Drag: Move\n"
+"Alt+RMB: Depth list selection"
+msgstr "Alt + RMB: Derin dizelge seçimi"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode (W)"
msgstr "Taşıma Biçimi (W)"
@@ -5132,6 +5601,7 @@ msgid "View Grid"
msgstr "Izgara Görünümü"
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "Ayarlar"
@@ -5260,6 +5730,11 @@ msgid "StyleBox Preview:"
msgstr "StyleBox Önizleme:"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
+msgid "Set Region Rect"
+msgstr "Doku Bölgesi"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
msgstr "Yapışma Biçimi:"
@@ -5317,6 +5792,16 @@ msgid "Remove Item"
msgstr "Öğeyi Kaldır"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "Bölüt Öğelerini Kaldır"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "Kaldır"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr "Kalıp"
@@ -5384,7 +5869,7 @@ msgstr "Sekme 2"
msgid "Tab 3"
msgstr "Sekme 3"
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr "Tür:"
@@ -5406,12 +5891,27 @@ msgid "Color"
msgstr "Renk"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "Seçimi Sil"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr "TileMap'i Boya"
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "Ä°kile"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "DoÄŸrusal"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Bucket Fill"
+msgstr "Kova"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5446,10 +5946,6 @@ msgid "Pick Tile"
msgstr "Karo Seç"
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr "Seç"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr "0 Düzeyde Döndür"
@@ -5513,7 +6009,7 @@ msgstr "Seçili dizeçleri sil?"
msgid "Presets"
msgstr "Ön ayar.."
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "Ekle.."
@@ -5572,6 +6068,24 @@ msgid "Make Patch"
msgstr "Amaçlanan Dizeç Yolu :"
#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "Doku"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "Yöntem Dizelgesi:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr "PCK/Zip Dizecini Dışa Aktar"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5612,10 +6126,6 @@ msgid "The following files failed extraction from package:"
msgstr "Aşağıdaki dizeçlerin, çıkından ayıklanma işlemi başarısız oldu:"
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr "Çıkın Başarı ile Kuruldu!"
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "Var olan Tasarıyı İçe Aktar"
@@ -5660,6 +6170,23 @@ msgid "Are you sure to open more than one project?"
msgstr "Birden fazla tasarı açmakta kararlı mısınız?"
#: 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 ""
+"Hiçbir ana sahne tanımlanmadı, birini seçiniz?\n"
+"Daha sonra \"uygulama\" kategorisinin altındaki \"Tasarı Ayarları\" ndan "
+"deÄŸiÅŸtirebilirsiniz."
+
+#: 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 "Birden fazla tasarıyı çalıştırmaya kararlı mısınız?"
@@ -5677,10 +6204,6 @@ msgstr ""
"musunuz?"
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr "Tasarı Yöneticisi"
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr "Tasarı Dizelgesi"
@@ -5709,258 +6232,292 @@ msgstr "Öğeyi Kaldır"
msgid "Exit"
msgstr "Çık"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "Bağlanamadı."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "Dokunaç "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr "Eğlence Düğmesi"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr "EÄŸlence Ekseni"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr "Fare Düğmesi"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr "Geçersiz işlem (her şey ancak şu '/' ya da şuna ':' gider)."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr "Ä°ÅŸlem '%s' zaten var!"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr "Giriş İşlem Olayını Yeniden Adlandır"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr "Giriş İşlem Olayı Ekle"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr "Denetim+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "Bir Dokunaca Basın.."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr "Fare Düğme Dizini:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr "Sol Düğme"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr "Sağ Düğme"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr "Orta Düğme"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr "Tekerlek Yukarı Düğmesi"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr "Tekerlek Aşağı Düğmesi"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr "Düğme 6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr "Düğme 7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr "Düğme 8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr "Düğme 9"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Change"
+msgstr "DeÄŸiÅŸtir"
+
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Axis Index:"
msgstr "Oyunçubuğu Ekseni Dizini:"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "Eksen"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Joypad Button Index:"
msgstr "Oyunçubuğu Düğme Dizini:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr "GiriÅŸ Eylemi Ekle"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr "Giriş Eylemi Olayını Sil"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Add Event"
msgstr "BoÅŸ Ekle"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "Aygıt"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "Düğme"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "Sol Düğme."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "Sağ Düğme."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "Orta Düğme."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "Tekerlek Yukarı."
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "Tekerlek Aşağı."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "Alıcı Özellik Ekle"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "No property '"
+msgstr "Özellik:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "Ayarlar"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "GiriÅŸi Sil"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "Ayarları kaydetme sorunu."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "Ayarlar kaydedildi TAMAM."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr "Çeviri Ekle"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "Çeviriyi Kaldır"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr "Yeniden EÅŸlenmiÅŸ Yol Ekle"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr "Kaynak Yeniden EÅŸleme Ekle EÅŸle"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr "Kaynak Yeniden EÅŸleme Dilini DeÄŸiÅŸtir"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr "Kaynak Yeniden Eşlemesini Kaldır"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr "Kaynak Yeniden Eşle Seçeneğini Kaldır"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "Tasarı Ayarları (engine.cfg)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr "Genel"
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr "Özellik:"
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr "Sil"
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr "Düzleme Tıpkıla.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
+msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr "EÅŸleme Gir"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr "Eylem:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr "Aygıt:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr "Dizin:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr "YerelleÅŸtirme"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr "Çeviriler"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr "Çeviriler:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr "Yeniden EÅŸlemeler"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr "Kaynaklar:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr "Yerel Ayara Göre Yeniden Eşlemeler:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr "Yerel"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "KendindenYükle"
@@ -6002,6 +6559,11 @@ msgid "Assign"
msgstr "Ata"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "Bir Düğüm Seç"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr "Yeni Betik"
@@ -6016,6 +6578,11 @@ msgstr "Dizeç yüklenirken sorun oluştu: Bir kaynak değil!"
#: editor/property_editor.cpp
#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "Düğüm(leri) içe Aktarmak için Seç"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "Pick a Node"
msgstr "Bir Düğüm Seç"
@@ -6111,6 +6678,11 @@ msgstr "Ana Sahne DeÄŸiÅŸtirgenleri:"
msgid "Scene Run Settings"
msgstr "Sahne Çalıştırma Ayarları"
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "Tamam"
+
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
msgstr "Sahneleri örneklemek için ata yok."
@@ -6156,10 +6728,6 @@ msgid "Delete Node(s)?"
msgstr "Düğüm(ler) Silinsin mi?"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "Bu işlem bir sahne olmadan yapılamaz."
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6172,6 +6740,18 @@ msgid "Save New Scene As.."
msgstr "Yeni Sahneyi BaÅŸkaca Kaydet .."
#: editor/scene_tree_dock.cpp
+msgid "Editable Children"
+msgstr "Düzenlenebilir Çocuklar"
+
+#: editor/scene_tree_dock.cpp
+msgid "Load As Placeholder"
+msgstr "Yer Tutucu Olarak Yükle"
+
+#: editor/scene_tree_dock.cpp
+msgid "Discard Instancing"
+msgstr "Örneği Boşalt"
+
+#: editor/scene_tree_dock.cpp
msgid "Makes Sense!"
msgstr "Anlamlı!"
@@ -6216,6 +6796,14 @@ msgid "Edit Connections"
msgstr "Bağlantıları Düzenle"
#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance"
+msgstr "Kalıtı Temizle"
+
+#: editor/scene_tree_dock.cpp editor/scene_tree_editor.cpp
+msgid "Open in Editor"
+msgstr "Düzenleyicide Aç"
+
+#: editor/scene_tree_dock.cpp
msgid "Delete Node(s)"
msgstr "Düğümleri Sil"
@@ -6269,6 +6857,11 @@ msgstr ""
"sahne oluÅŸturur."
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "Süzgeçler"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr "Seçili düğüm için yeni veya mevcut bir betik iliştir."
@@ -6276,6 +6869,14 @@ msgstr "Seçili düğüm için yeni veya mevcut bir betik iliştir."
msgid "Clear a script for the selected node."
msgstr "Seçilen düğüm için betik temizle."
+#: editor/scene_tree_dock.cpp
+msgid "Clear Inheritance? (No Undo!)"
+msgstr "Kalıt Silinsin mi? (Geri Alınamaz!)"
+
+#: editor/scene_tree_dock.cpp
+msgid "Clear!"
+msgstr "Temiz!"
+
#: editor/scene_tree_editor.cpp
msgid "Toggle Spatial Visible"
msgstr "Uzaysal Görünürlüğü Aç / Kapat"
@@ -6307,11 +6908,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "Sorun ayıklama seçenekleri"
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr "Örnek:"
@@ -6350,32 +6946,8 @@ msgid "Scene Tree (Nodes):"
msgstr "Sahne Ağacı (Düğümler):"
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr "Düzenlenebilir Çocuklar"
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr "Yer Tutucu Olarak Yükle"
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr "Örneği Boşalt"
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr "Düzenleyicide Aç"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr "Kalıtı Temizle"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr "Kalıt Silinsin mi? (Geri Alınamaz!)"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr "Temiz!"
+msgid "Node Configuration Warning!"
+msgstr ""
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -6383,6 +6955,11 @@ msgstr "Bir Düğüm Seç"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "Bediz yüklenirken sorun oluştu:"
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "Dizeç düzeninde betik oluşturulamadı."
@@ -6391,6 +6968,10 @@ msgid "Error loading script from %s"
msgstr "Yazı tipi %s yüklerken sorun oluştu"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "Uygulanamaz"
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "Yol boÅŸ"
@@ -6434,10 +7015,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr "Uygulanamaz"
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6608,6 +7185,10 @@ msgid "Change Light Radius"
msgstr "Işın Çapını Değiştir"
#: editor/spatial_editor_gizmos.cpp
+msgid "Change AudioStreamPlayer3D Emission Angle"
+msgstr ""
+
+#: editor/spatial_editor_gizmos.cpp
msgid "Change Camera FOV"
msgstr "Kamera FOV'sunu DeÄŸiÅŸtir"
@@ -6690,6 +7271,137 @@ msgstr "Geçersiz örnek sözlük biçemi (@path 'taki kod geçersiz)"
msgid "Invalid instance dictionary (invalid subclasses)"
msgstr "Geçersiz örnek sözlüğü (geçersiz altbölütler)"
+#: modules/gdscript/gd_functions.cpp
+msgid "Object can't provide a length."
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "Seçilenleri Sil"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "Seçimi İkile"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Snap View"
+msgstr "Üstten Görünüm"
+
+#: 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
+#, fuzzy
+msgid "Clip Disabled"
+msgstr "Devre dışı"
+
+#: 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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "Ctrl: Döndür"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "Ctrl: Döndür"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Z"
+msgstr "Ctrl: Döndür"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "Yeni oluÅŸtur"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "Yeni Tasarı Oluştur"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Area"
+msgstr "TileMap'i Sil"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "Yalnızca Seçim"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "Yalnızca Seçim"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "Yapışma Ayarları"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "Örnek:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "Dizeç"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6727,6 +7439,31 @@ msgid "Stack overflow with stack depth: "
msgstr "Şu derinlikte yığın taşması: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "İşaret Değiştirgenlerini Düzenle:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "Dizinin türünü degistir"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "Giriş Adını Değiştir"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Default Value"
+msgstr "Önyüklü Değeri Değiştir"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "Değişkeni Düzenle:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "Ä°ÅŸlevler:"
@@ -6767,26 +7504,6 @@ msgid "Add Signal"
msgstr "Ä°ÅŸaret Ekle"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "İşlevi Kaldır"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "Değişkeni Kaldır"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "Değişken Düzenleniyor:"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "İşareti Kaldır"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "İşaret Düzenleniyor:"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
msgstr "Ä°fadeyi DeÄŸiÅŸtir"
@@ -6795,6 +7512,16 @@ msgid "Add Node"
msgstr "Düğüm Ekle"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "Geçersiz açarları kaldır"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Duplicate VisualScript Nodes"
+msgstr "Çizge Düğüm(lerini) İkile"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
msgstr ""
"Alıcı işlevini bırakmak için Alt'a basılı tutun. Genelgeçer imzayı bırakmak "
@@ -6839,6 +7566,26 @@ msgid "Add Setter Property"
msgstr "Düzenleyici Özellik Ekle"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "Türü Değiştir"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "Düğümleri Kaldır"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "Gölgelendirici Çizge Düğümünü Kaldır"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "Düğüme Bağlan:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "KoÅŸul"
@@ -6867,6 +7614,56 @@ msgid "Get"
msgstr "Al"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "Giriş Adını Değiştir"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "'..' üzerinde çalışılamıyor"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "Kaynak bellemi boÅŸ!"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "Düğümleri Yapıştır"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "İşlevi Kaldır"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "Değişkeni Düzenle:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "Değişkeni Kaldır"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Signal"
+msgstr "İşaret Düzenleniyor:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Signal"
+msgstr "İşareti Kaldır"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr "Değişken Düzenleniyor:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Signal:"
+msgstr "İşaret Düzenleniyor:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr "Taban Türü:"
@@ -6887,10 +7684,6 @@ msgid "Edit Variable:"
msgstr "Değişkeni Düzenle:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "DeÄŸiÅŸtir"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "Seçilenleri Sil"
@@ -6966,14 +7759,6 @@ msgstr ""
"_step()'ten geçersiz dönüş değeri, tam sayı (dizi çıkışı) ya da dizgi "
"(sorunu) olmalı."
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "yeni basıldı"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "yeni bırakıldı"
-
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Run in Browser"
@@ -6998,81 +7783,6 @@ msgstr "Karo Bulunamadı:"
msgid "Could not open template for export:\n"
msgstr "Dizin oluşturulamadı."
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-"Onay belgesi dizeci okunamadı. Yol ve gizyazının her ikisi de doğru mu?"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "Ä°mza nesnesini oluÅŸturmada sorun."
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr "Çıkın imzasını oluşturmada sorun."
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"Hiçbir dışa aktarım kalıbı bulunamadı.\n"
-"Dışa aktarım kalıplarını indirin ve yükleyin.."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr "Özel kusur ayıklama çıkını bulunmadı."
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr "Özel yayınlama çıkını bulunamadı."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr "Benzersiz Ad Geçersiz."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr "Geçersiz ürün GUID'i."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr "Geçersiz yayıncı GUID'i."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "Geçersiz arkaplan rengi."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "Geçersiz Yığım Belirtkesi, bedizin boyutları (50x50 olmalı)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr "Geçersiz kare 44x44 belirtkenin bediz boyutları (44x44 olmalı)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr "Geçersiz kare 71x71 belirtkenin bediz boyutları (71x71 olmalı)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr "Geçersiz kare 150x150 belirtkenin bediz boyutları (150x150 olmalı)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr "Geçersiz kare 310x310 belirtkenin bediz boyutları (310x310 olmalı)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr "Geçersiz kare 310x150 belirtkenin bediz boyutları (310x150 olmalı)."
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr "Geçersiz açılış görüntülüğü bediz boyutları (620x300 olmalı)."
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7176,6 +7886,13 @@ msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr ""
"PathFollow2D yalnızca Path2D düğümünün çocuğu olarak ayarlanınca çalışır."
+#: 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 ""
@@ -7205,23 +7922,33 @@ msgstr ""
"VisibilityEnable2D düğümü düzenlenmiş sahne kökü doğrudan ata olarak "
"kullanıldığında çalışır."
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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 ""
-"CollisionShape sadece CollisionObject türetilmiş bir düğümde çarpışma yüzeyi "
-"sağlamaya yarar. Bunların yüzeyine şekil vermek için Area, StaticBody, "
-"RigidBody, KinematicBody, v.b. onu sadece bunların çocuğu olarak kullanın."
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"CollisionShape'in çalışması için bir şekil verilmelidir. Lütfen bunun için "
-"bir şekil kaynağı oluşturun!"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7238,6 +7965,24 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "Boş bir CollisionPolygon'un çarpışma üzerinde etkisi yoktur."
+#: 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 ""
+"CollisionShape sadece CollisionObject türetilmiş bir düğümde çarpışma yüzeyi "
+"sağlamaya yarar. Bunların yüzeyine şekil vermek için Area, StaticBody, "
+"RigidBody, KinematicBody, v.b. onu sadece bunların çocuğu olarak kullanın."
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"CollisionShape'in çalışması için bir şekil verilmelidir. Lütfen bunun için "
+"bir şekil kaynağı oluşturun!"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr ""
@@ -7257,6 +8002,13 @@ 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 ""
@@ -7279,8 +8031,8 @@ msgstr ""
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
-msgstr "Çalışma Biçimi:"
+msgid "Raw Mode"
+msgstr "Kaydırma Biçimi"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
@@ -7294,22 +8046,6 @@ msgstr "Uyarı!"
msgid "Please Confirm..."
msgstr "Lütfen Doğrulayın..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "Bir Dizeç Aç"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "Dizeç(leri) Aç"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "Bir dizin aç"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "Bir Dizeç ya da Dizin Aç"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7331,7 +8067,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7349,6 +8085,97 @@ msgstr ""
"bir boyut elde edin. Ya da, onu bir RenderTarget yapın ve iç dokusunu "
"görüntülemesi için bir düğüme atayın."
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "Sahneyi kapatsın mı? (Kaydedilmemiş değişiklikler yok olacak)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "Tasarı Yöneticisini Aç\n"
+#~ "(KaydedilmemiÅŸ deÄŸiÅŸiklikler kaybolacak!)"
+
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "Önc. Sahneye Git sekmesini Kapat"
+
+#~ msgid "Expand to Parent"
+#~ msgstr "Ataya geniÅŸletin"
+
+#~ msgid "Del"
+#~ msgstr "Sil"
+
+#~ msgid "Copy To Platform.."
+#~ msgstr "Düzleme Tıpkıla.."
+
+#~ msgid "just pressed"
+#~ msgstr "yeni basıldı"
+
+#~ msgid "just released"
+#~ msgstr "yeni bırakıldı"
+
+#, fuzzy
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr ""
+#~ "Onay belgesi dizeci okunamadı. Yol ve gizyazının her ikisi de doğru mu?"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "Ä°mza nesnesini oluÅŸturmada sorun."
+
+#~ msgid "Error creating the package signature."
+#~ msgstr "Çıkın imzasını oluşturmada sorun."
+
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "Hiçbir dışa aktarım kalıbı bulunamadı.\n"
+#~ "Dışa aktarım kalıplarını indirin ve yükleyin.."
+
+#~ msgid "Custom debug package not found."
+#~ msgstr "Özel kusur ayıklama çıkını bulunmadı."
+
+#~ msgid "Custom release package not found."
+#~ msgstr "Özel yayınlama çıkını bulunamadı."
+
+#~ msgid "Invalid unique name."
+#~ msgstr "Benzersiz Ad Geçersiz."
+
+#~ msgid "Invalid product GUID."
+#~ msgstr "Geçersiz ürün GUID'i."
+
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "Geçersiz yayıncı GUID'i."
+
+#~ msgid "Invalid background color."
+#~ msgstr "Geçersiz arkaplan rengi."
+
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr "Geçersiz Yığım Belirtkesi, bedizin boyutları (50x50 olmalı)."
+
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr "Geçersiz kare 44x44 belirtkenin bediz boyutları (44x44 olmalı)."
+
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr "Geçersiz kare 71x71 belirtkenin bediz boyutları (71x71 olmalı)."
+
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr "Geçersiz kare 150x150 belirtkenin bediz boyutları (150x150 olmalı)."
+
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr "Geçersiz kare 310x310 belirtkenin bediz boyutları (310x310 olmalı)."
+
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr "Geçersiz kare 310x150 belirtkenin bediz boyutları (310x150 olmalı)."
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr "Geçersiz açılış görüntülüğü bediz boyutları (620x300 olmalı)."
+
+#, fuzzy
+#~ msgid "RAW Mode"
+#~ msgstr "Çalışma Biçimi:"
+
#~ msgid "Node From Scene"
#~ msgstr "Sahneden Düğüm(node)"
@@ -7434,9 +8261,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "%d Olgusu(ları) ile Değiştirildi."
-#~ msgid "Please save the scene first."
-#~ msgstr "Lütfen önce sahneyi kaydediniz."
-
#~ msgid "Save Translatable Strings"
#~ msgstr "Çevirilebilir Metinleri Kaydet"
@@ -7648,9 +8472,6 @@ msgstr ""
#~ msgid "Script Encryption Key (256-bits as hex):"
#~ msgstr "Betik Şifreleme Açarı (Hex olarak 256-bit):"
-#~ msgid "Export PCK/Zip"
-#~ msgstr "PCK/Zip Dizecini Dışa Aktar"
-
#~ msgid "Export Project PCK"
#~ msgstr "Tasarı PCK Dışa Aktar"
diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po
index a154df0565..24796e1f32 100644
--- a/editor/translations/ur_PK.po
+++ b/editor/translations/ur_PK.po
@@ -146,7 +146,8 @@ msgstr ""
msgid "Goto Prev Step"
msgstr ""
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr ""
@@ -378,7 +379,8 @@ msgstr ""
msgid "Description:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -389,9 +391,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 ""
@@ -464,7 +466,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -525,17 +527,16 @@ msgid "All"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr ""
@@ -551,7 +552,7 @@ msgstr ""
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -563,7 +564,7 @@ msgstr ""
msgid "Reverse"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr ""
@@ -715,14 +716,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr ""
@@ -827,7 +828,7 @@ msgid "Resource"
msgstr ""
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr ""
@@ -907,12 +908,180 @@ msgstr ""
msgid "Delete selected files?"
msgstr ""
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Authors"
+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 "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
+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
+#, fuzzy
+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 "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+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
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "ایکشن منتقل کریں"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -926,21 +1095,45 @@ 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/script_create_dialog.cpp
msgid "Load"
msgstr ""
#: editor/editor_audio_buses.cpp
+#, fuzzy
+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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: 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
@@ -1044,6 +1237,10 @@ 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 ""
@@ -1121,6 +1318,22 @@ msgstr ""
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
@@ -1248,6 +1461,14 @@ msgid "Signals:"
msgstr ""
#: editor/editor_help.cpp
+msgid "Enumerations:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr ""
@@ -1265,7 +1486,7 @@ msgid "Search Text"
msgstr ""
#: editor/editor_log.cpp
-msgid " Output:"
+msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1315,6 +1536,10 @@ 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 ""
@@ -1433,11 +1658,11 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
+msgid "Save & Close"
msgstr ""
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
@@ -1449,23 +1674,27 @@ msgid "No"
msgstr ""
#: editor/editor_node.cpp
-msgid "This scene has never been saved. Save before running?"
+msgid "Yes"
msgstr ""
#: editor/editor_node.cpp
-msgid "Export Mesh Library"
+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 Tile Set"
+msgid "Export Mesh Library"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
+msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Exit the editor?"
+msgid "This operation can't be done without a selected node."
msgstr ""
#: editor/editor_node.cpp
@@ -1489,9 +1718,27 @@ msgid "Quick Run Scene.."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+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
@@ -1500,6 +1747,22 @@ msgid "Pick a Main Scene"
msgstr "ایک مینو منظر چنیں"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1532,6 +1795,11 @@ msgstr ""
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 ""
@@ -1548,6 +1816,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr ""
@@ -1596,10 +1868,6 @@ msgstr ""
msgid "Close Scene"
msgstr ""
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr ""
@@ -1879,6 +2147,10 @@ msgstr ""
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1888,26 +2160,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr ""
@@ -1928,9 +2184,18 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+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 ""
@@ -2031,6 +2296,16 @@ msgstr ""
msgid "Re-Import Changed Resources"
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 ""
@@ -2167,10 +2442,26 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Source: "
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2179,6 +2470,18 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving file:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid "Error moving dir:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2255,6 +2558,12 @@ 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 ""
@@ -2266,9 +2575,28 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Single Scene"
+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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2308,6 +2636,14 @@ 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 ""
@@ -2494,6 +2830,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3075,6 +3415,10 @@ 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 ""
@@ -3387,6 +3731,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr ""
@@ -3419,10 +3764,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3531,11 +3872,6 @@ msgstr ""
msgid "Change default type"
msgstr ""
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr ""
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3573,6 +3909,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3612,6 +3956,18 @@ msgid "Update from Scene"
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 ""
@@ -3621,11 +3977,28 @@ 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 "Modify Curve"
+#, fuzzy
+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
@@ -3650,6 +4023,12 @@ 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 ""
@@ -3939,6 +4318,11 @@ 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 ""
@@ -4256,6 +4640,12 @@ 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 ""
@@ -4280,6 +4670,10 @@ msgid "Save Theme As.."
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+msgid " Class Reference"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
#, fuzzy
msgid "Next script"
msgstr "سب سکریپشن بنائیں"
@@ -4333,6 +4727,10 @@ msgid "Close All"
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.."
@@ -4365,6 +4763,10 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+msgid "Debug with external editor"
+msgstr ""
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4428,6 +4830,10 @@ msgid ""
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 ""
@@ -4474,6 +4880,10 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+msgid "Delete Line"
+msgstr ""
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4778,91 +5188,99 @@ msgid "Animation Key Inserted."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
+msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
+msgid "Material Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Forward"
+msgid "Shader Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Backwards"
+msgid "Surface Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
+msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Down"
+msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
+msgid "Align with view"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
+msgid "Display Normal"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Material Changes"
+msgid "Display Wireframe"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Shader Changes"
+msgid "Display Overdraw"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Surface Changes"
+msgid "Display Unshaded"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
+msgid "View Environment"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
+msgid "View Gizmos"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "View Information"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
+msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
+msgid "Doppler Enable"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
+msgid "Freelook Left"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
+msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
+msgid "Freelook Forward"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
+msgid "Freelook Backwards"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
+msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
+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
@@ -4870,6 +5288,17 @@ 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 ""
@@ -4989,6 +5418,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr ""
@@ -5117,6 +5547,10 @@ 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 ""
@@ -5174,6 +5608,16 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr ".تمام کا انتخاب"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr ".تمام کا انتخاب"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5241,7 +5685,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5263,11 +5707,24 @@ msgid "Color"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr ".تمام کا انتخاب"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr ""
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: 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
@@ -5303,10 +5760,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5366,7 +5819,7 @@ msgstr ""
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5413,6 +5866,22 @@ 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 ""
@@ -5449,10 +5918,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5497,6 +5962,19 @@ 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 ""
@@ -5511,10 +5989,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5543,254 +6017,283 @@ msgstr ".تمام کا انتخاب"
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+msgid "Can't run project"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: 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.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Add Global Property"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Select an 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 "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr ""
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5831,6 +6334,10 @@ msgid "Assign"
msgstr ""
#: editor/property_editor.cpp
+msgid "Select Node"
+msgstr ""
+
+#: editor/property_editor.cpp
#, fuzzy
msgid "New Script"
msgstr "سب سکریپشن بنائیں"
@@ -5844,6 +6351,10 @@ 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 ""
@@ -5939,6 +6450,11 @@ msgstr ""
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 ""
@@ -5982,10 +6498,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -5998,6 +6510,18 @@ 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 ""
@@ -6040,6 +6564,14 @@ msgid "Edit Connections"
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 ""
@@ -6092,6 +6624,10 @@ msgid ""
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 ""
@@ -6099,6 +6635,14 @@ msgstr ""
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 ""
@@ -6130,10 +6674,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6171,35 +6711,15 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Select a Node"
msgstr ""
-#: editor/scene_tree_editor.cpp
-msgid "Select a Node"
+#: editor/script_create_dialog.cpp
+msgid "Error loading template '%s'"
msgstr ""
#: editor/script_create_dialog.cpp
@@ -6211,6 +6731,10 @@ 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 ""
@@ -6251,10 +6775,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6423,6 +6943,10 @@ 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 ""
@@ -6506,6 +7030,123 @@ msgstr ""
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
+#, fuzzy
+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 "GridMap Paint"
+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/gridmap/grid_map_editor_plugin.cpp
+msgid "Tiles"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6537,6 +7178,26 @@ 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 ""
@@ -6578,33 +7239,19 @@ msgid "Add Signal"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Remove Function"
-msgstr ".تمام کا انتخاب"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
+msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Remove Signal"
-msgstr ".تمام کا انتخاب"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
+msgid "Add Node"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change Expression"
+msgid "Remove VisualScript Nodes"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
+msgid "Duplicate VisualScript Nodes"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
@@ -6648,6 +7295,23 @@ msgid "Add Setter Property"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Base Type"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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 ""
@@ -6676,6 +7340,52 @@ msgid "Get"
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
+#, fuzzy
+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
+#, fuzzy
+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 ""
@@ -6696,10 +7406,6 @@ msgid "Edit Variable:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr ""
@@ -6773,14 +7479,6 @@ msgid ""
"(error)."
msgstr ""
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6801,77 +7499,6 @@ msgstr ""
msgid "Could not open template for export:\n"
msgstr ""
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -6950,6 +7577,13 @@ msgstr ""
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 ""
@@ -6972,17 +7606,32 @@ msgid ""
"as parent."
msgstr ""
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"The controller id must not be 0 or this controller will not be bound to an "
+"actual controller"
msgstr ""
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRAnchor must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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
@@ -6996,6 +7645,19 @@ msgstr ""
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 ""
@@ -7011,6 +7673,13 @@ 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 ""
@@ -7027,7 +7696,7 @@ msgid ""
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7042,22 +7711,6 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr ""
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr ""
@@ -7076,7 +7729,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po
index bddb77c731..cf9013091a 100644
--- a/editor/translations/zh_CN.po
+++ b/editor/translations/zh_CN.po
@@ -17,7 +17,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2017-06-22 20:49+0800\n"
+"PO-Revision-Date: 2017-07-08 15:27+0800\n"
"Last-Translator: Geequlim <geequlim@gmail.com>\n"
"Language-Team: 汉语 <geequlim@gmail.com>\n"
"Language: zh_CN\n"
@@ -155,7 +155,8 @@ msgstr "å‰å¾€ä¸‹ä¸€æ­¥"
msgid "Goto Prev Step"
msgstr "å‰å¾€ä¸Šä¸€æ­¥"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "线性"
@@ -374,14 +375,12 @@ msgid "Version:"
msgstr "版本:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Contents:"
-msgstr "常é‡:"
+msgstr "内容:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "View Files"
-msgstr "文件"
+msgstr "查看文件"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
#: editor/editor_help.cpp editor/property_selector.cpp
@@ -389,7 +388,8 @@ msgstr "文件"
msgid "Description:"
msgstr "æè¿°:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr "安装"
@@ -400,9 +400,9 @@ msgstr "安装"
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "关闭"
@@ -417,30 +417,27 @@ msgstr ""
#: editor/asset_library_editor_plugin.cpp
msgid "Connection error, please try again."
-msgstr ""
+msgstr "连接错误,请é‡è¯•ã€‚"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect."
-msgstr "连接事件。"
+msgstr "无法连接。"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect to host:"
-msgstr "连接到节点:"
+msgstr "无法连接到æœåŠ¡å™¨:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr ""
+msgstr "æœåŠ¡å™¨æ— å“应:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response."
-msgstr ""
+msgstr "æ— å“应。"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Request failed, return code:"
-msgstr "未知的文件类型请求:"
+msgstr "请求失败,错误代ç :"
#: editor/asset_library_editor_plugin.cpp
msgid "Req. Failed."
@@ -456,7 +453,7 @@ msgstr ""
#: editor/asset_library_editor_plugin.cpp
msgid "Failed:"
-msgstr ""
+msgstr "失败:"
#: editor/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
@@ -476,35 +473,31 @@ msgstr ""
#: editor/asset_library_editor_plugin.cpp
msgid "Asset Download Error:"
-msgstr ""
+msgstr "资æºä¸‹è½½å‡ºé”™:"
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
-msgstr ""
+msgstr "完æˆï¼"
#: editor/asset_library_editor_plugin.cpp
msgid "Fetching:"
-msgstr ""
+msgstr "获å–:"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Resolving.."
-msgstr "ä¿å­˜ä¸­..."
+msgstr "解æžä¸­.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Connecting.."
-msgstr "连接事件。"
+msgstr "连接中.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Requesting.."
-msgstr "测试"
+msgstr "正在请求.."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Error making request"
-msgstr "ä¿å­˜èµ„æºå‡ºé”™ï¼"
+msgstr "请求错误"
#: editor/asset_library_editor_plugin.cpp
msgid "Idle"
@@ -512,16 +505,15 @@ msgstr ""
#: editor/asset_library_editor_plugin.cpp
msgid "Retry"
-msgstr ""
+msgstr "é‡è¯•"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Download Error"
-msgstr "下载"
+msgstr "下载错误"
#: editor/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr ""
+msgstr "此资æºæ–‡ä»¶æ­£åœ¨ä¸‹è½½ä¸­ï¼"
#: editor/asset_library_editor_plugin.cpp
msgid "first"
@@ -544,17 +536,16 @@ msgid "All"
msgstr "全部"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "æœç´¢:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "æœç´¢"
@@ -570,7 +561,7 @@ msgstr "æœç´¢"
msgid "Import"
msgstr "导入"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "æ’件"
@@ -582,7 +573,7 @@ msgstr "排åº:"
msgid "Reverse"
msgstr "å选"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "分类:"
@@ -734,14 +725,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "移除"
@@ -846,7 +837,7 @@ msgid "Resource"
msgstr "资æº"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "路径"
@@ -926,12 +917,196 @@ msgstr "查看孤立资æº"
msgid "Delete selected files?"
msgstr "删除选中的文件?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "感谢Godot社区!"
+
+#: editor/editor_about.cpp
+msgid "Thanks!"
+msgstr "谢谢ï¼"
+
+#: editor/editor_about.cpp
+msgid "Godot Engine contributors"
+msgstr "Godot引擎贡献者"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Authors"
+msgstr "作者:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "项目管ç†å™¨"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "内容:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "ä¸åŽ‹ç¼©"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+msgstr "软件包安装æˆåŠŸï¼"
+
+#: editor/editor_asset_installer.cpp
+#, fuzzy
+msgid "Package Installer"
+msgstr "软件包安装æˆåŠŸï¼"
+
+#: editor/editor_audio_buses.cpp
+msgid "Speakers"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Effect"
+msgstr "添加事件"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "打开音频Bus布局"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Solo"
+msgstr "打开音频Bus布局"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Toggle Audio Bus Mute"
+msgstr "打开音频Bus布局"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "删除选择的节点"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "æ‹·è´"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Effect"
+msgstr "删除选择的节点"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Add Audio Bus"
+msgstr "添加Bus"
+
+#: editor/editor_audio_buses.cpp
+msgid "Master bus can't be deleted!"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "删除布局"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "å¤åˆ¶åŠ¨ç”»"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "移动动作"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr "将音频Bus布局ä¿å­˜ä¸º.."
@@ -945,23 +1120,53 @@ msgid "Open Audio Bus Layout"
msgstr "打开音频Bus布局"
#: editor/editor_audio_buses.cpp
+msgid "There is no 'res://default_bus_layout.tres' file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Invalid file, not an audio bus layout."
+msgstr ""
+"文件扩展åä¸åˆæ³•\n"
+"请使用.font文件。"
+
+#: editor/editor_audio_buses.cpp
msgid "Add Bus"
msgstr "添加Bus"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Create a new Bus Layout."
+msgstr "创建资æº"
+
#: editor/editor_audio_buses.cpp editor/script_create_dialog.cpp
msgid "Load"
msgstr "加载"
#: editor/editor_audio_buses.cpp
+#, fuzzy
+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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Save this Bus Layout to a file."
+msgstr "将音频Bus布局ä¿å­˜ä¸º.."
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+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 "å称éžæ³•:。"
@@ -1062,6 +1267,11 @@ msgid "Updating scene.."
msgstr "更新场景中.."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "请先ä¿å­˜åœºæ™¯ã€‚"
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "选择目录"
@@ -1139,6 +1349,22 @@ msgstr "所有文件(*)"
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
@@ -1264,6 +1490,15 @@ msgid "Signals:"
msgstr "事件:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "动画"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr "常é‡:"
@@ -1280,7 +1515,8 @@ msgid "Search Text"
msgstr "æœç´¢æ–‡æœ¬"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " 输出:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1330,6 +1566,11 @@ msgid "Creating Thumbnail"
msgstr "创建缩略图"
#: editor/editor_node.cpp
+#, fuzzy
+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 "无法ä¿å­˜åœºæ™¯ï¼Œä¾èµ–项(实例)验è¯å¤±è´¥ã€‚"
@@ -1403,14 +1644,13 @@ msgid "There is no defined scene to run."
msgstr "没有设置è¦æ‰§è¡Œçš„场景。"
#: editor/editor_node.cpp
-#, fuzzy
msgid ""
"No main scene has ever been defined, select one?\n"
"You can change it later in \"Project Settings\" under the 'application' "
"category."
msgstr ""
-"尚未定义主场景。\n"
-"请在项目设置的application分类下设置选择主场景。"
+"尚未定义主场景, 现在选择一个�\n"
+"你也å¯ä»¥ç¨åŽåœ¨é¡¹ç›®è®¾ç½®çš„application分类下修改。"
#: editor/editor_node.cpp
msgid ""
@@ -1455,26 +1695,34 @@ msgid "Quick Open Script.."
msgstr "快速打开脚本.."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "是"
+#, fuzzy
+msgid "Save & Close"
+msgstr "ä¿å­˜æ–‡ä»¶"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "确定è¦å…³é—­åœºæ™¯å—?(未ä¿å­˜çš„修改将丢失)"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
msgstr "场景å¦å­˜ä¸º.."
#: editor/editor_node.cpp
-#, fuzzy
msgid "No"
-msgstr "节点"
+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 "导出MeshLibrary"
@@ -1484,12 +1732,9 @@ msgid "Export Tile Set"
msgstr "导出砖å—集"
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "退出"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "确定è¦é€€å‡ºç¼–辑器å—?"
+#, fuzzy
+msgid "This operation can't be done without a selected node."
+msgstr "æ­¤æ“作必须在打开一个场景åŽæ‰èƒ½æ‰§è¡Œã€‚"
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1512,18 +1757,52 @@ msgid "Quick Run Scene.."
msgstr "快速è¿è¡Œåœºæ™¯.."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Quit"
+msgstr "退出"
+
+#: editor/editor_node.cpp
+msgid "Exit the editor?"
+msgstr "确定è¦é€€å‡ºç¼–辑器å—?"
+
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Open Project Manager?"
+msgstr "项目管ç†å™¨"
+
+#: editor/editor_node.cpp
+#, fuzzy
+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 ""
-"退出到项目管ç†çª—å£ï¼Ÿ\n"
-"(未ä¿å­˜çš„修改将丢失)"
#: editor/editor_node.cpp
msgid "Pick a Main Scene"
msgstr "选择主场景"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1559,6 +1838,11 @@ msgstr "ä¿å­˜å¸ƒå±€"
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 "切æ¢åœºæ™¯æ ‡ç­¾é¡µ"
@@ -1575,6 +1859,11 @@ msgstr "更多的%d个文件或目录"
msgid "Distraction Free Mode"
msgstr "无干扰模å¼"
+#: editor/editor_node.cpp
+#, fuzzy
+msgid "Toggle distraction-free mode."
+msgstr "无干扰模å¼"
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "场景"
@@ -1623,10 +1912,6 @@ msgstr "ä¿å­˜æ‰€æœ‰åœºæ™¯"
msgid "Close Scene"
msgstr "关闭场景"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr "关闭并å‰å¾€ä¸Šä¸€ä¸ªåœºæ™¯"
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "最近打开"
@@ -1663,9 +1948,8 @@ msgid "Miscellaneous project or scene-wide tools."
msgstr "其他工程或全场景工具。"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Project"
-msgstr "新建"
+msgstr "项目"
#: editor/editor_node.cpp
msgid "Project Settings"
@@ -1769,9 +2053,8 @@ msgstr ""
"当使用远程设备调试时,使用网络文件系统能有效æ高编辑效率。"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Editor"
-msgstr "编辑"
+msgstr "编辑器"
#: editor/editor_node.cpp editor/settings_config_dialog.cpp
msgid "Editor Settings"
@@ -1798,13 +2081,12 @@ msgid "Classes"
msgstr "类型"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Online Docs"
-msgstr "关闭文档"
+msgstr "在线文档"
#: editor/editor_node.cpp
msgid "Q&A"
-msgstr ""
+msgstr "问答"
#: editor/editor_node.cpp
msgid "Issue Tracker"
@@ -1918,6 +2200,10 @@ msgstr "节点"
msgid "Output"
msgstr "输出"
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr "é‡æ–°å¯¼å…¥"
@@ -1927,26 +2213,10 @@ msgid "Update"
msgstr "æ›´æ–°"
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr "感谢Godot社区!"
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "谢谢ï¼"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr "从ZIP文件中导入模æ¿"
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr "导出项目"
@@ -1967,38 +2237,41 @@ msgid "Open & Run a Script"
msgstr "打开并è¿è¡Œè„šæœ¬"
#: editor/editor_node.cpp
+#, fuzzy
+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
-#, fuzzy
msgid "Open 2D Editor"
-msgstr "在编辑器中打开"
+msgstr "打开2D编辑器"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open 3D Editor"
-msgstr "在编辑器中打开"
+msgstr "打开3D编辑器"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Script Editor"
-msgstr "在编辑器中打开"
+msgstr "打开脚本编辑器"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open Asset Library"
-msgstr "导出库"
+msgstr "打开资æºå•†åº—"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the next Editor"
-msgstr "在编辑器中打开"
+msgstr "打开下一个编辑器"
#: editor/editor_node.cpp
-#, fuzzy
msgid "Open the previous Editor"
-msgstr "在编辑器中打开"
+msgstr "打开上一个编辑器"
#: editor/editor_plugin_settings.cpp
msgid "Installed Plugins:"
@@ -2076,6 +2349,16 @@ msgstr "é‡æ–°å¯¼å…¥"
msgid "Re-Import Changed Resources"
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 "在_run()方中填写您的逻辑代ç ã€‚"
@@ -2211,10 +2494,28 @@ msgid "Cannot navigate to '"
msgstr "无法导航到 "
#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr "ä¿å­˜å¹¶é‡æ–°å¯¼å…¥"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "æº:"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr "æºæ–‡ä»¶å’Œç›®æ ‡æ–‡ä»¶ç›¸åŒï¼Œæ“作忽略。"
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr "æºè·¯å¾„和目标路径相åŒï¼Œæ“作忽略。"
@@ -2223,6 +2524,20 @@ msgid "Can't move directories to within themselves."
msgstr "无法将目录移动到自身下。"
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "加载图片出错:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "导入出错:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr "无法对'..'引用æ“作"
@@ -2299,6 +2614,12 @@ 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 "移动"
@@ -2310,10 +2631,31 @@ msgstr "添加到分组"
msgid "Remove from Group"
msgstr "从分组中移除"
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
-msgstr "è¡¨é¢ %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+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
+#, fuzzy
+msgid "Import as Multiple Scenes"
+msgstr "导入3D场景"
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
+msgstr ""
#: editor/import/resource_importer_scene.cpp
#: editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2352,6 +2694,14 @@ 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 "文件"
@@ -2438,13 +2788,12 @@ msgid "No target font resource!"
msgstr "请设置目标字体资æºï¼"
#: editor/io_plugins/editor_font_import_plugin.cpp
-#, fuzzy
msgid ""
"Invalid file extension.\n"
"Please use .font."
msgstr ""
"文件扩展åä¸åˆæ³•\n"
-"请使用.fnt文件。"
+"请使用.font文件。"
#: editor/io_plugins/editor_font_import_plugin.cpp
msgid "Can't load/process source font."
@@ -2543,6 +2892,10 @@ msgstr "æºMesh:"
msgid "Mesh"
msgstr "Mesh"
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr "è¡¨é¢ %d"
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr "没有音效è¦å¯¼å…¥ï¼"
@@ -2921,9 +3274,8 @@ msgid "Compress"
msgstr "压缩"
#: editor/io_plugins/editor_translation_import_plugin.cpp
-#, fuzzy
msgid "Add to Project (project.godot)"
-msgstr "添加到项目 (godot.cfg)"
+msgstr "添加到项目 (project.godot)"
#: editor/io_plugins/editor_translation_import_plugin.cpp
msgid "Import Languages:"
@@ -3126,6 +3478,11 @@ msgid "New name:"
msgstr "æ–°å称:"
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "编辑节点筛选"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr "缩放:"
@@ -3437,6 +3794,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "编辑"
@@ -3469,10 +3827,6 @@ msgid "Use Pixel Snap"
msgstr "使用åƒç´ å¸é™„"
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr "展开父节点"
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr "骨骼.."
@@ -3581,11 +3935,6 @@ msgstr "æ­¤æ“作åªèƒ½åº”用于å•ä¸ªé€‰ä¸­èŠ‚点。"
msgid "Change default type"
msgstr "修改默认值"
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "好的"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3625,6 +3974,14 @@ msgstr "编辑多边形(移除顶点)"
msgid "Create a new polygon from scratch."
msgstr "从头开始创建一个新的多边形。"
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr "创建 Poly3D (多边型3D)"
@@ -3665,22 +4022,53 @@ msgstr "从场景中更新"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
-msgid "Add point"
-msgstr "添加输入事件"
+msgid "Modify Curve Point"
+msgstr "修改曲线"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Modify Curve Tangent"
+msgstr "修改曲线图"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+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 "移除路径顶点"
+msgstr "移除顶点"
#: editor/plugins/curve_editor_plugin.cpp
#, fuzzy
+msgid "Left linear"
+msgstr "线性"
+
+#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+msgid "Right linear"
+msgstr "å³è§†å›¾"
+
+#: editor/plugins/curve_editor_plugin.cpp
msgid "Load preset"
-msgstr "加载资æº"
+msgstr "加载预设"
#: editor/plugins/curve_editor_plugin.cpp
-msgid "Modify Curve"
-msgstr "修改曲线"
+#, fuzzy
+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"
@@ -3704,6 +4092,12 @@ 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 "添加é®å…‰å¤šè¾¹å½¢"
@@ -3965,9 +4359,8 @@ msgstr "清除Emission Mask(å‘å°„å±è”½ï¼‰"
#: 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"
@@ -3994,29 +4387,31 @@ msgid "Load Emission Mask"
msgstr "加载Emission Mask(å‘å°„å±è”½ï¼‰"
#: editor/plugins/particles_2d_editor_plugin.cpp
+#: editor/plugins/particles_editor_plugin.cpp
+#, fuzzy
+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
-#, fuzzy
msgid "Generation Time (sec):"
-msgstr "å¹³å‡å¸§æ—¶é—´ï¼ˆç§’)"
+msgstr "生æˆæ—¶é—´ï¼ˆç§’)"
#: editor/plugins/particles_2d_editor_plugin.cpp
-#, fuzzy
msgid "Emission Mask"
-msgstr "设置Emission Mask(å‘å°„å±è”½ï¼‰"
+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."
@@ -4079,21 +4474,18 @@ msgid "Emission Source: "
msgstr "å‘å°„æºï¼š"
#: editor/plugins/particles_editor_plugin.cpp
-#, fuzzy
msgid "Generate Visibility AABB"
-msgstr "生æˆAABB"
+msgstr ""
#: editor/plugins/path_2d_editor_plugin.cpp
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 "从曲线中移除顶点"
@@ -4153,14 +4545,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"
@@ -4315,9 +4705,14 @@ msgid "Pitch"
msgstr "音调"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Clear Recent Files"
-msgstr "清除骨骼"
+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"
@@ -4344,6 +4739,10 @@ 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 "下一个脚本"
@@ -4396,6 +4795,11 @@ msgid "Close All"
msgstr "关闭全部"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+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.."
@@ -4428,6 +4832,11 @@ msgid "Keep Debugger Open"
msgstr "ä¿æŒè°ƒè¯•å™¨æ‰“å¼€"
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "打开下一个编辑器"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr "窗å£"
@@ -4440,9 +4849,8 @@ msgid "Move Right"
msgstr "å‘å³ç§»åŠ¨"
#: editor/plugins/script_editor_plugin.cpp
-#, fuzzy
msgid "Open Godot online documentation"
-msgstr "æœç´¢æ–‡æ¡£ã€‚"
+msgstr ""
#: editor/plugins/script_editor_plugin.cpp
msgid "Search the class hierarchy."
@@ -4494,25 +4902,28 @@ msgid ""
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
-#, fuzzy
msgid "Convert Case"
-msgstr "正在转æ¢å›¾ç‰‡"
+msgstr "转æ¢å¤§å°å†™"
#: editor/plugins/script_text_editor.cpp
msgid "Uppercase"
-msgstr ""
+msgstr "大写"
#: editor/plugins/script_text_editor.cpp
msgid "Lowercase"
-msgstr ""
+msgstr "å°å†™"
#: editor/plugins/script_text_editor.cpp
msgid "Capitalize"
-msgstr ""
+msgstr "首字æ¯å¤§å†™"
#: editor/plugins/script_text_editor.cpp
#: editor/plugins/shader_editor_plugin.cpp scene/gui/line_edit.cpp
@@ -4541,6 +4952,11 @@ msgid "Move Down"
msgstr "å‘下移动"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "删除顶点"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr "å‘左缩进"
@@ -4566,11 +4982,11 @@ msgstr "修剪行åŽç©ºç™½"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Spaces"
-msgstr ""
+msgstr "将缩进转为空格"
#: editor/plugins/script_text_editor.cpp
msgid "Convert Indent To Tabs"
-msgstr ""
+msgstr "将缩进转为Tab"
#: editor/plugins/script_text_editor.cpp
msgid "Auto Indent"
@@ -4594,14 +5010,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
@@ -4628,7 +5042,7 @@ msgstr "æœç´¢å…‰æ ‡ä½ç½®"
#: editor/plugins/shader_editor_plugin.cpp
msgid "Shader"
-msgstr ""
+msgstr "ç€è‰²å™¨"
#: editor/plugins/shader_graph_editor_plugin.cpp
msgid "Change Scalar Constant"
@@ -4847,61 +5261,26 @@ msgid "Animation Key Inserted."
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
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "å‰è¿›"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Backwards"
-msgstr "å‘åŽ"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Down"
-msgstr "滚轮å‘下滚动。"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Material Changes"
-msgstr "有更改时更新UI"
+msgstr "æè´¨å˜æ›´"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Shader Changes"
-msgstr "有更改时更新UI"
+msgstr "ç€è‰²å™¨å˜æ›´"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Surface Changes"
-msgstr "有更改时更新UI"
+msgstr "表é¢å˜æ›´"
#: editor/plugins/spatial_editor_plugin.cpp
msgid "Draw Calls"
-msgstr ""
+msgstr "Draw Calls"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Vertices"
msgstr "顶点"
@@ -4922,14 +5301,12 @@ msgid "Display Overdraw"
msgstr "显示过度绘制"
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "Display Unshaded"
-msgstr "显示无阴影"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
msgid "View Environment"
-msgstr "环境"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
#, fuzzy
@@ -4945,10 +5322,61 @@ msgid "Audio Listener"
msgstr "音频监å¬å™¨"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "preview"
+msgstr "预览"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr "XForm对è¯æ¡†"
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "Select Mode (Q)\n"
+msgstr "选择模å¼"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid ""
+"Drag: Rotate\n"
+"Alt+Drag: Move\n"
+"Alt+RMB: Depth list selection"
+msgstr "Alt+é¼ æ ‡å³é”®:显示鼠标点击ä½ç½®ä¸‹çš„所有节点列表"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "Move Mode (W)"
msgstr "移动模å¼ï¼ˆW)"
@@ -5069,6 +5497,7 @@ msgid "View Grid"
msgstr "显示网格"
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "设置"
@@ -5197,6 +5626,11 @@ msgid "StyleBox Preview:"
msgstr "StyleBox预览:"
#: editor/plugins/texture_region_editor_plugin.cpp
+#, fuzzy
+msgid "Set Region Rect"
+msgstr "设置纹ç†åŒºåŸŸ"
+
+#: editor/plugins/texture_region_editor_plugin.cpp
msgid "Snap Mode:"
msgstr "å¸é™„模å¼:"
@@ -5254,6 +5688,16 @@ msgid "Remove Item"
msgstr "移除项目"
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "移除类项目"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "移除"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr "主题"
@@ -5321,7 +5765,7 @@ msgstr "分页2"
msgid "Tab 3"
msgstr "分页3"
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr "类型:"
@@ -5343,12 +5787,27 @@ msgid "Color"
msgstr "颜色"
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "擦除选中"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr "绘制砖å—地图"
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "æ‹·è´"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Line Draw"
+msgstr "线性"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+msgid "Rectangle Paint"
+msgstr ""
+
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Bucket Fill"
+msgstr "桶(Bucket)"
#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Erase TileMap"
@@ -5383,10 +5842,6 @@ msgid "Pick Tile"
msgstr "选择砖å—"
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr "选择"
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr "旋转0度"
@@ -5446,7 +5901,7 @@ msgstr "删除选中的 '%s'?"
msgid "Presets"
msgstr "预设"
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "添加.."
@@ -5493,6 +5948,24 @@ msgid "Make Patch"
msgstr "制作Patch"
#: editor/project_export.cpp
+#, fuzzy
+msgid "Features"
+msgstr "贴图"
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "方法列表:"
+
+#: editor/project_export.cpp
+msgid "Export PCK/Zip"
+msgstr "导出 PCK/ZIP"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr "没有下列平å°çš„导出模æ¿:"
@@ -5505,14 +5978,12 @@ msgid "Invalid project path, the path must exist!"
msgstr "项目目录ä¸å­˜åœ¨ï¼"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project path, project.godot must not exist."
-msgstr "项目目录下ä¸èƒ½åŒ…å«godot.cfg文件。"
+msgstr "项目目录下ä¸èƒ½åŒ…å«project.godot文件。"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Invalid project path, project.godot must exist."
-msgstr "项目目录下必须包å«godot.cfg文件。"
+msgstr "项目目录下必须包å«project.godot文件。"
#: editor/project_manager.cpp
msgid "Imported Project"
@@ -5523,19 +5994,14 @@ msgid "Invalid project path (changed anything?)."
msgstr "项目路径éžæ³•ï¼ˆè¢«å¤–部修改?)。"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Couldn't create project.godot in project path."
-msgstr "无法在项目目录下创建godot.cfg文件。"
+msgstr "无法在项目目录下创建project.godot文件。"
#: editor/project_manager.cpp
msgid "The following files failed extraction from package:"
msgstr "æå–以下文件失败:"
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr "软件包安装æˆåŠŸï¼"
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr "导入现有项目"
@@ -5580,6 +6046,22 @@ msgid "Are you sure to open more than one project?"
msgstr "您确定è¦æ‰“开多个项目å—?"
#: 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 ""
+"尚未定义主场景, 现在选择一个�\n"
+"你也å¯ä»¥ç¨åŽåœ¨é¡¹ç›®è®¾ç½®çš„application分类下修改。"
+
+#: 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 "您确定è¦æ‰§è¡Œå¤šä¸ªé¡¹ç›®å—?"
@@ -5594,10 +6076,6 @@ msgid ""
msgstr "您确认è¦æ‰«æ%s目录下现有的Godot项目å—?"
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr "项目管ç†å™¨"
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr "项目列表"
@@ -5618,264 +6096,295 @@ msgid "New Project"
msgstr "新建"
#: editor/project_manager.cpp
-#, fuzzy
msgid "Templates"
-msgstr "移除模æ¿"
+msgstr "模æ¿"
#: editor/project_manager.cpp
msgid "Exit"
msgstr "退出"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "无法连接。"
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr "é”® "
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr "手柄按钮"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr "摇æ†è½´"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr "鼠标按键"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr "Actionåéžæ³•(ä¸å¾—包å«'/'或':')。"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr "动作%s已存在ï¼"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr "é‡å‘½å输入事件"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr "添加输入事件"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr "Ctrl+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr "按下一个键.."
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr "鼠标按键:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr "左键"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr "å³é”®"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr "中键"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr "滚轮å‘上"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr "滚轮å‘下"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr "按键 6"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr "按键 7"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr "按键 8"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr "按键 9"
-#: editor/project_settings.cpp
+#: 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.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr "è½´"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr "手柄按钮:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr "添加输入动作"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr "移除输入事件"
-#: editor/project_settings.cpp
-#, fuzzy
+#: editor/project_settings_editor.cpp
msgid "Add Event"
-msgstr "添加空白帧"
+msgstr "添加事件"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "设备"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "按钮"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "左键。"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "å³é”®ã€‚"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "中键(滚轮)。"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "滚轮å‘上滚动。"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "滚轮å‘下滚动。"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Add Global Property"
+msgstr "添加 Getter Property"
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "No property '"
+msgstr "属性:"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "设置"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "删除输入事件"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr "ä¿å­˜è®¾ç½®å‡ºé”™ã€‚"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr "ä¿å­˜è®¾ç½®æˆåŠŸã€‚"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr "添加语言"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr "移除语言"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr "添加é‡å®šå‘路径"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr "添加资æºé‡å®šå‘"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr "修改语言资æºé‡å®šå‘"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr "移除资æºé‡å®šå‘"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr "移除资æºé‡å®šå‘选项"
-#: editor/project_settings.cpp
-#, fuzzy
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
-msgstr "项目设置(godot.cfg)"
+msgstr "项目设置(project.godot)"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr "一般"
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr "属性:"
-#: editor/project_settings.cpp
-msgid "Del"
-msgstr "删除"
-
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr "å¤åˆ¶åˆ°å¹³å°.."
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
+msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr "事件表"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr "动作:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr "设备:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr "åºå·:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr "本地化"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr "语言"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr "语言:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr "é‡å®šå‘"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr "资æº:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr "地区é‡å®šå‘:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr "地区"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr "自动加载(AutoLoad)"
@@ -5916,6 +6425,11 @@ msgid "Assign"
msgstr "分é…(Assign)"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Select Node"
+msgstr "选择一个节点"
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr "新建脚本"
@@ -5928,6 +6442,11 @@ msgid "Error loading file: Not a resource!"
msgstr "加载文件出错:ä¸æ˜¯èµ„æºæ–‡ä»¶ï¼"
#: editor/property_editor.cpp
+#, fuzzy
+msgid "Selected node is not a Viewport!"
+msgstr "选择è¦å¯¼å…¥çš„节点"
+
+#: editor/property_editor.cpp
msgid "Pick a Node"
msgstr "选择一个节点"
@@ -6023,6 +6542,11 @@ msgstr "主场景å‚æ•°:"
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 "没有选中节点æ¥æ·»åŠ å®žä¾‹ã€‚"
@@ -6066,10 +6590,6 @@ msgid "Delete Node(s)?"
msgstr "确定è¦åˆ é™¤èŠ‚点å—?"
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr "æ­¤æ“作必须在打开一个场景åŽæ‰èƒ½æ‰§è¡Œã€‚"
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr "无法对根节点执行此æ“作。"
@@ -6082,6 +6602,18 @@ 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 "有é“ç†ï¼"
@@ -6112,9 +6644,8 @@ msgid "Error duplicating scene to save it."
msgstr "å¤åˆ¶åœºæ™¯å‡ºé”™ã€‚"
#: editor/scene_tree_dock.cpp
-#, fuzzy
msgid "Sub-Resources:"
-msgstr "资æº:"
+msgstr "å­èµ„æº:"
#: editor/scene_tree_dock.cpp
msgid "Edit Groups"
@@ -6125,6 +6656,14 @@ msgid "Edit Connections"
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 "删除节点"
@@ -6175,6 +6714,11 @@ msgid ""
msgstr "实例化场景文件为一个节点,如果没有根节点则创建一个继承自该文件的场景。"
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "筛选"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr "为选中节点创建或设置脚本。"
@@ -6182,6 +6726,14 @@ msgstr "为选中节点创建或设置脚本。"
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 "切æ¢Spatialå¯è§"
@@ -6192,7 +6744,7 @@ msgstr "切æ¢CanvasItemå¯è§"
#: editor/scene_tree_editor.cpp
msgid "Node configuration warning:"
-msgstr ""
+msgstr "节点é…置警告:"
#: editor/scene_tree_editor.cpp
msgid ""
@@ -6205,32 +6757,32 @@ msgid ""
"Node has connections.\n"
"Click to show signals dock."
msgstr ""
+"节点有信å·è¿žæŽ¥ã€‚\n"
+"å•å‡»æŸ¥çœ‹ä¿¡å·æ ã€‚"
#: editor/scene_tree_editor.cpp
msgid ""
"Node is in group(s).\n"
"Click to show groups dock."
msgstr ""
-
-#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "调试选项"
+"分组中的节点。\n"
+"å•å‡»æ˜¾ç¤ºåˆ†ç»„æ ã€‚"
#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr "实例:"
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Open script"
-msgstr "下一个脚本"
+msgstr "打开脚本"
#: editor/scene_tree_editor.cpp
msgid ""
"Node is locked.\n"
"Click to unlock"
msgstr ""
+"节点已é”定\n"
+"点击å¯è§£é”"
#: editor/scene_tree_editor.cpp
msgid ""
@@ -6239,9 +6791,8 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-#, fuzzy
msgid "Toggle Visibility"
-msgstr "切æ¢Spatialå¯è§"
+msgstr "åˆ‡æ¢ éšè—/å¯è§"
#: editor/scene_tree_editor.cpp
msgid "Invalid node name, the following characters are not allowed:"
@@ -6256,32 +6807,9 @@ msgid "Scene Tree (Nodes):"
msgstr "场景树:"
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr "å…许编辑å­å­™èŠ‚点"
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr "加载为å ä½ç¬¦"
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr "废弃实例化"
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr "在编辑器中打开"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr "清除继承"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr "确定è¦æ¸…除继承å—?(无法撤销ï¼ï¼‰"
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
-msgstr "清除ï¼"
+#, fuzzy
+msgid "Node Configuration Warning!"
+msgstr "节点é…置警告:"
#: editor/scene_tree_editor.cpp
msgid "Select a Node"
@@ -6289,14 +6817,22 @@ msgstr "选择一个节点"
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "加载图片出错:"
+
+#: editor/script_create_dialog.cpp
msgid "Error - Could not create script in filesystem."
-msgstr "无法创建脚本。"
+msgstr "错误:无法创建脚本文件。"
#: editor/script_create_dialog.cpp
msgid "Error loading script from %s"
msgstr "从%s加载脚本出错"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "N/A"
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "文件路径为空"
@@ -6314,66 +6850,53 @@ msgstr "扩展åéžæ³•"
#: editor/script_create_dialog.cpp
msgid "Wrong extension chosen"
-msgstr ""
+msgstr "选择了错误的扩展å"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid Path"
-msgstr "路径éžæ³•ã€‚"
+msgstr "路径éžæ³•"
#: editor/script_create_dialog.cpp
msgid "Invalid class name"
msgstr "ç±»åéžæ³•"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Invalid inherited parent name or path"
-msgstr "属性å称éžæ³•ã€‚"
+msgstr "éžæ³•çš„基类å称或脚本路径"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Script valid"
-msgstr "脚本"
+msgstr "脚本å¯ç”¨"
#: editor/script_create_dialog.cpp
msgid "Allowed: a-z, A-Z, 0-9 and _"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr "N/A"
+msgstr "ä»…å…许使用: a-z, A-Z, 0-9 或 _"
#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
-msgstr ""
+msgstr "内置脚本(ä¿å­˜åœ¨åœºæ™¯æ–‡ä»¶ä¸­)"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Create new script file"
msgstr "创建新脚本"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Load existing script file"
msgstr "加载现有脚本"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Inherits"
-msgstr "基类:"
+msgstr "继承自"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Class Name"
-msgstr "ç±»å:"
+msgstr "ç±»å"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Template"
-msgstr "移除模æ¿"
+msgstr "模æ¿"
#: editor/script_create_dialog.cpp
-#, fuzzy
msgid "Built-in Script"
msgstr "内置脚本"
@@ -6514,6 +7037,10 @@ 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 "更改摄åƒæœºè§†è§’"
@@ -6547,7 +7074,7 @@ msgstr "更改通知器级别"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Particles AABB"
-msgstr ""
+msgstr "修改粒å­AABB"
#: editor/spatial_editor_gizmos.cpp
msgid "Change Probe Extents"
@@ -6595,6 +7122,137 @@ msgstr "实例字典格å¼ä¸æ­£ç¡®ï¼ˆæ— æ•ˆè„šæœ¬@path)"
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
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "删除选择的节点"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "å¤åˆ¶é€‰ä¸­é¡¹"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Snap View"
+msgstr "Top视图"
+
+#: 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
+#, fuzzy
+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
+#, fuzzy
+msgid "Cursor Rotate X"
+msgstr "Ctrl:旋转"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Y"
+msgstr "Ctrl:旋转"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Cursor Rotate Z"
+msgstr "Ctrl:旋转"
+
+#: 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
+#, fuzzy
+msgid "Create Area"
+msgstr "新建"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Create Exterior Connector"
+msgstr "新建项目"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Area"
+msgstr "擦除砖å—地图"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "仅选中"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "仅选中"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "æ•æ‰(snap)设置"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Pick Distance:"
+msgstr "实例:"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "文件"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6627,6 +7285,31 @@ msgid "Stack overflow with stack depth: "
msgstr "堆栈深度溢出: "
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Signal Arguments"
+msgstr "编辑事件å‚æ•°:"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument Type"
+msgstr "修改数组类型"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Argument name"
+msgstr "更改输入å称"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Default Value"
+msgstr "修改默认值"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Set Variable Type"
+msgstr "编辑å˜é‡:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Functions:"
msgstr "函数:"
@@ -6667,26 +7350,6 @@ msgid "Add Signal"
msgstr "添加事件"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
-msgstr "删除函数"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr "删除å˜é‡"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
-msgstr "编辑å˜é‡ï¼š"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
-msgstr "删除事件"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
-msgstr "编辑事件:"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Change Expression"
msgstr "更改表达å¼"
@@ -6695,6 +7358,16 @@ msgid "Add Node"
msgstr "添加节点"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Nodes"
+msgstr "移除无效键"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Duplicate VisualScript Nodes"
+msgstr "å¤åˆ¶Graph Node节点"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Hold Meta to drop a Getter. Hold Shift to drop a generic signature."
msgstr "按ä½Meta键放置一个Getter节点,按ä½Shift键放置一个通用签å。"
@@ -6735,6 +7408,26 @@ msgid "Add Setter Property"
msgstr "添加 Setter Property"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Base Type"
+msgstr "更改类型"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "移除节点"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove VisualScript Node"
+msgstr "移除Graph Node节点"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "连接到节点:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr "æ¡ä»¶èŠ‚点(Condition)"
@@ -6763,6 +7456,56 @@ msgid "Get"
msgstr "获å–"
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change Input Value"
+msgstr "更改输入å称"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Can't copy the function node."
+msgstr "无法对'..'引用æ“作"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "资æºå‰ªåˆ‡æ¿ä¸­æ— å†…容ï¼"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "粘贴节点"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Function"
+msgstr "删除函数"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Edit Variable"
+msgstr "编辑å˜é‡:"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove Variable"
+msgstr "删除å˜é‡"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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 "基础类型:"
@@ -6783,10 +7526,6 @@ msgid "Edit Variable:"
msgstr "编辑å˜é‡:"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr "更改"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "删除选择的节点"
@@ -6860,14 +7599,6 @@ msgid ""
"(error)."
msgstr "_step()的返回值无效,必须是整形(seq out)或字符串(error)。"
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr "正好按下"
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr "刚好释放"
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr "在æµè§ˆå™¨ä¸­è¿è¡Œ"
@@ -6888,79 +7619,6 @@ msgstr "无法读å–文件:\n"
msgid "Could not open template for export:\n"
msgstr "无法打开导出模æ¿ï¼š\n"
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr "无法读å–è¯ä¹¦æ–‡ä»¶ã€‚路径和密ç æ˜¯å¦éƒ½æ­£ç¡®ï¼Ÿ"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr "创建包(PCK)ç­¾å对象出错。"
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr "创建包(PCK)ç­¾å时出错。"
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-"找ä¸åˆ°å¯¼å‡ºæ¨¡ç‰ˆã€‚\n"
-"下载并安装导出模版。"
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr "找ä¸åˆ°è‡ªå®šä¹‰è°ƒè¯•åŒ…。"
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr "找ä¸åˆ°è‡ªå®šä¹‰å‘布包。"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr "å称éžæ³•ã€‚"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr "产å“GUIDéžæ³•ã€‚"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr "å‘布GUIDéžæ³•ã€‚"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr "无效的背景颜色。"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr "Logo图片尺寸无效(图åƒå°ºå¯¸å¿…须是50x50)。"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr "正方形的 44x44 Logo图片尺寸无效(应为44x44)。"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr "正方形的 71x71 Logo标志图片尺寸无效(应为71x71)。"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr "正方的 150x150 Logo图片尺寸无效(应为150x150)。"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr "正方形的 310x310 Logo图片尺寸无效(应为310x310)。"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr "宽幅310x150 Logo图片尺寸无效(应为310x150)。"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr "å¯åŠ¨ç”»é¢å›¾ç‰‡å°ºå¯¸æ— æ•ˆï¼ˆåº”为620x300)。"
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7051,6 +7709,13 @@ msgstr ""
msgid "PathFollow2D only works when set as a child of a Path2D node."
msgstr "PathFollow2D类型的节点åªæœ‰æ”¾åœ¨Path2D节点下æ‰èƒ½æ­£å¸¸å·¥ä½œã€‚"
+#: 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 "path属性必须指å‘一个åˆæ³•çš„Node2D节点æ‰èƒ½æ­£å¸¸å·¥ä½œã€‚"
@@ -7076,22 +7741,33 @@ msgid ""
"as parent."
msgstr "VisibilityEnable2D类型的节点用于场景的根节点æ‰èƒ½èŽ·å¾—最好的效果。"
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"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 ""
-"CollisionShape类型节点åªèƒ½ä¸ºCollisionObject的派生类æ供碰撞形状数æ®ï¼Œè¯·å°†å…¶æ”¾"
-"在Areaã€StaticBodyã€RigidBody或KinematicBody节点下。"
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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 ""
-"CollisionShape节点必须拥有一个形状æ‰èƒ½è¿›è¡Œç¢°æ’žæ£€æµ‹å·¥ä½œï¼Œè¯·ä¸ºå®ƒåˆ›å»ºä¸€ä¸ªå½¢çŠ¶èµ„"
-"æºï¼"
#: scene/3d/collision_polygon.cpp
msgid ""
@@ -7106,6 +7782,23 @@ msgstr ""
msgid "An empty CollisionPolygon has no effect on collision."
msgstr "空CollisionPolygon节点ä¸èµ·ç¢°æ’žæ£€æµ‹ä½œç”¨ã€‚"
+#: 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 ""
+"CollisionShape类型节点åªèƒ½ä¸ºCollisionObject的派生类æ供碰撞形状数æ®ï¼Œè¯·å°†å…¶æ”¾"
+"在Areaã€StaticBodyã€RigidBody或KinematicBody节点下。"
+
+#: scene/3d/collision_shape.cpp
+msgid ""
+"A shape must be provided for CollisionShape to function. Please create a "
+"shape resource for it!"
+msgstr ""
+"CollisionShape节点必须拥有一个形状æ‰èƒ½è¿›è¡Œç¢°æ’žæ£€æµ‹å·¥ä½œï¼Œè¯·ä¸ºå®ƒåˆ›å»ºä¸€ä¸ªå½¢çŠ¶èµ„"
+"æºï¼"
+
#: scene/3d/navigation_mesh.cpp
msgid "A NavigationMesh resource must be set or created for this node to work."
msgstr "此节点需è¦è®¾ç½®NavigationMesh资æºæ‰èƒ½å·¥ä½œã€‚"
@@ -7122,6 +7815,13 @@ 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 "path属性必须指å‘一个åˆæ³•çš„Spatial节点æ‰èƒ½æ­£å¸¸å·¥ä½œã€‚"
@@ -7141,12 +7841,12 @@ msgstr ""
#: scene/gui/color_picker.cpp
#, fuzzy
-msgid "RAW Mode"
-msgstr "è¿è¡Œæ¨¡å¼:"
+msgid "Raw Mode"
+msgstr "移动画布"
#: scene/gui/color_picker.cpp
msgid "Add current color as a preset"
-msgstr ""
+msgstr "将当å‰é¢œè‰²æ·»åŠ ä¸ºé¢„设"
#: scene/gui/dialogs.cpp
msgid "Alert!"
@@ -7156,22 +7856,6 @@ msgstr "æ示ï¼"
msgid "Please Confirm..."
msgstr "请确认..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "打开文件"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "打开文件"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "打开目录"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "打开文件或目录"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7195,7 +7879,7 @@ msgstr ""
"使用Container(VBox,HBox等)作为其å­æŽ§ä»¶å¹¶æ‰‹åŠ¨æˆ–设置Control的自定义最å°å°º"
"寸。"
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7212,6 +7896,94 @@ msgstr ""
"使其æˆä¸ºå­æŽ§ä»¶çš„所以它å¯ä»¥æœ‰ä¸€ä¸ªå°ºå¯¸å¤§å°å€¼ã€‚å¦åˆ™è¯·è®¾ç½®ä¸ºRender target,并将其"
"内部纹ç†åˆ†é…给一些节点以显示。"
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "确定è¦å…³é—­åœºæ™¯å—?(未ä¿å­˜çš„修改将丢失)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr ""
+#~ "退出到项目管ç†çª—å£ï¼Ÿ\n"
+#~ "(未ä¿å­˜çš„修改将丢失)"
+
+#~ msgid "Close Goto Prev. Scene"
+#~ msgstr "关闭并å‰å¾€ä¸Šä¸€ä¸ªåœºæ™¯"
+
+#~ msgid "Expand to Parent"
+#~ msgstr "展开父节点"
+
+#~ msgid "Del"
+#~ msgstr "删除"
+
+#~ msgid "Copy To Platform.."
+#~ msgstr "å¤åˆ¶åˆ°å¹³å°.."
+
+#~ msgid "just pressed"
+#~ msgstr "正好按下"
+
+#~ msgid "just released"
+#~ msgstr "刚好释放"
+
+#~ msgid ""
+#~ "Couldn't read the certificate file. Are the path and password both "
+#~ "correct?"
+#~ msgstr "无法读å–è¯ä¹¦æ–‡ä»¶ã€‚路径和密ç æ˜¯å¦éƒ½æ­£ç¡®ï¼Ÿ"
+
+#~ msgid "Error creating the signature object."
+#~ msgstr "创建包(PCK)ç­¾å对象出错。"
+
+#~ msgid "Error creating the package signature."
+#~ msgstr "创建包(PCK)ç­¾å时出错。"
+
+#~ msgid ""
+#~ "No export templates found.\n"
+#~ "Download and install export templates."
+#~ msgstr ""
+#~ "找ä¸åˆ°å¯¼å‡ºæ¨¡ç‰ˆã€‚\n"
+#~ "下载并安装导出模版。"
+
+#~ msgid "Custom debug package not found."
+#~ msgstr "找ä¸åˆ°è‡ªå®šä¹‰è°ƒè¯•åŒ…。"
+
+#~ msgid "Custom release package not found."
+#~ msgstr "找ä¸åˆ°è‡ªå®šä¹‰å‘布包。"
+
+#~ msgid "Invalid unique name."
+#~ msgstr "å称éžæ³•ã€‚"
+
+#~ msgid "Invalid product GUID."
+#~ msgstr "产å“GUIDéžæ³•ã€‚"
+
+#~ msgid "Invalid publisher GUID."
+#~ msgstr "å‘布GUIDéžæ³•ã€‚"
+
+#~ msgid "Invalid background color."
+#~ msgstr "无效的背景颜色。"
+
+#~ msgid "Invalid Store Logo image dimensions (should be 50x50)."
+#~ msgstr "Logo图片尺寸无效(图åƒå°ºå¯¸å¿…须是50x50)。"
+
+#~ msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
+#~ msgstr "正方形的 44x44 Logo图片尺寸无效(应为44x44)。"
+
+#~ msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
+#~ msgstr "正方形的 71x71 Logo标志图片尺寸无效(应为71x71)。"
+
+#~ msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
+#~ msgstr "正方的 150x150 Logo图片尺寸无效(应为150x150)。"
+
+#~ msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
+#~ msgstr "正方形的 310x310 Logo图片尺寸无效(应为310x310)。"
+
+#~ msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
+#~ msgstr "宽幅310x150 Logo图片尺寸无效(应为310x150)。"
+
+#~ msgid "Invalid splash screen image dimensions (should be 620x300)."
+#~ msgstr "å¯åŠ¨ç”»é¢å›¾ç‰‡å°ºå¯¸æ— æ•ˆï¼ˆåº”为620x300)。"
+
+#~ msgid "RAW Mode"
+#~ msgstr "RAW模å¼"
+
#~ msgid "Node From Scene"
#~ msgstr "从场景导入节点"
@@ -7295,9 +8067,6 @@ msgstr ""
#~ msgid "Replaced %d Ocurrence(s)."
#~ msgstr "替æ¢äº†%d项。"
-#~ msgid "Please save the scene first."
-#~ msgstr "请先ä¿å­˜åœºæ™¯ã€‚"
-
#~ msgid "Save Translatable Strings"
#~ msgstr "ä¿å­˜å¯ç¿»è¯‘字符串"
@@ -7509,9 +8278,6 @@ msgstr ""
#~ msgid "Script Encryption Key (256-bits as hex):"
#~ msgstr "脚本密匙(256ä½16进制ç ï¼‰:"
-#~ msgid "Export PCK/Zip"
-#~ msgstr "导出 PCK/ZIP"
-
#~ msgid "Export Project PCK"
#~ msgstr "导出项目PCK文件"
@@ -7626,9 +8392,6 @@ msgstr ""
#~ msgid "Node Group(s)"
#~ msgstr "节点分组"
-#~ msgid "Set region_rect"
-#~ msgstr "设置纹ç†åŒºåŸŸ"
-
#~ msgid "Plugin List:"
#~ msgstr "æ’件列表"
diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po
index 110f5b6fab..f04322ff3c 100644
--- a/editor/translations/zh_HK.po
+++ b/editor/translations/zh_HK.po
@@ -2,21 +2,21 @@
# Copyright (C) 2016-2017 Juan Linietsky, Ariel Manzur and the Godot community
# This file is distributed under the same license as the Godot source code.
#
-# Wesley (zx-wt) <ZX_WT@ymail.com>, 2016.
+# Wesley (zx-wt) <ZX_WT@ymail.com>, 2016-2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2016-09-05 13:21+0000\n"
+"PO-Revision-Date: 2017-07-26 13:45+0000\n"
"Last-Translator: zx-wt <ZX_WT@ymail.com>\n"
"Language-Team: Chinese (Hong Kong) <https://hosted.weblate.org/projects/"
-"godot-engine/godot/zh_HK/>\n"
+"godot-engine/godot/zh_Hant_HK/>\n"
"Language: zh_HK\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 2.8\n"
+"X-Generator: Weblate 2.16-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -33,7 +33,7 @@ msgstr "移動"
#: editor/animation_editor.cpp
msgid "Anim Change Transition"
-msgstr ""
+msgstr "動畫變化éŽæ¸¡"
#: editor/animation_editor.cpp
msgid "Anim Change Transform"
@@ -41,7 +41,7 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Anim Change Value"
-msgstr ""
+msgstr "動畫變化數值"
#: editor/animation_editor.cpp
msgid "Anim Change Call"
@@ -49,40 +49,39 @@ 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
-#, fuzzy
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 "動畫軌跡變化Interpolation"
#: editor/animation_editor.cpp
msgid "Anim Track Change Value Mode"
-msgstr ""
+msgstr "動畫軌跡變化數值模å¼"
#: editor/animation_editor.cpp
msgid "Anim Track Change Wrap Mode"
@@ -90,23 +89,25 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Edit Node Curve"
-msgstr ""
+msgstr "編輯Node Curve"
#: editor/animation_editor.cpp
msgid "Edit Selection Curve"
-msgstr ""
+msgstr "編輯Selection Curve"
#: editor/animation_editor.cpp
msgid "Anim Delete Keys"
-msgstr ""
+msgstr "移除動畫幀"
#: editor/animation_editor.cpp editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
msgid "Duplicate Selection"
-msgstr ""
+msgstr "複製 Selection"
#: editor/animation_editor.cpp
+#, fuzzy
msgid "Duplicate Transposed"
-msgstr ""
+msgstr "複製Transposed"
#: editor/animation_editor.cpp
msgid "Remove Selection"
@@ -127,19 +128,19 @@ 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"
-msgstr ""
+msgstr "縮放selection"
#: editor/animation_editor.cpp
msgid "Scale From Cursor"
-msgstr ""
+msgstr "由鼠標縮放"
#: editor/animation_editor.cpp
msgid "Goto Next Step"
@@ -149,13 +150,14 @@ msgstr ""
msgid "Goto Prev Step"
msgstr ""
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
-msgstr ""
+msgstr "線性"
#: editor/animation_editor.cpp editor/plugins/theme_editor_plugin.cpp
msgid "Constant"
-msgstr ""
+msgstr "常數"
#: editor/animation_editor.cpp
msgid "In"
@@ -175,7 +177,7 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Transitions"
-msgstr ""
+msgstr "éŽæ¸¡"
#: editor/animation_editor.cpp
msgid "Optimize Animation"
@@ -221,7 +223,7 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Change Anim Loop"
-msgstr ""
+msgstr "更改動畫循環"
#: editor/animation_editor.cpp
msgid "Anim Create Typed Value Key"
@@ -229,7 +231,7 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Anim Insert"
-msgstr ""
+msgstr "æ’入動畫"
#: editor/animation_editor.cpp
msgid "Anim Scale Keys"
@@ -245,11 +247,11 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Length (s):"
-msgstr ""
+msgstr "時長:"
#: editor/animation_editor.cpp
msgid "Animation length (in seconds)."
-msgstr ""
+msgstr "時長(秒):every"
#: editor/animation_editor.cpp
msgid "Step (s):"
@@ -265,7 +267,7 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Add new tracks."
-msgstr ""
+msgstr "新增軌迹"
#: editor/animation_editor.cpp
msgid "Move current track up."
@@ -313,11 +315,11 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Key"
-msgstr ""
+msgstr "é—œéµå¹€"
#: editor/animation_editor.cpp
msgid "Transition"
-msgstr ""
+msgstr "éŽæ¸¡"
#: editor/animation_editor.cpp
msgid "Scale Ratio:"
@@ -365,11 +367,11 @@ msgstr ""
#: editor/asset_library_editor_plugin.cpp editor/editor_plugin_settings.cpp
msgid "Version:"
-msgstr ""
+msgstr "版本:"
#: editor/asset_library_editor_plugin.cpp
msgid "Contents:"
-msgstr ""
+msgstr "內容:"
#: editor/asset_library_editor_plugin.cpp
#, fuzzy
@@ -380,11 +382,12 @@ msgstr "檔案"
#: editor/editor_help.cpp editor/property_selector.cpp
#: editor/script_editor_debugger.cpp
msgid "Description:"
-msgstr ""
+msgstr "æ述:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
-msgstr ""
+msgstr "安è£"
#: editor/asset_library_editor_plugin.cpp editor/call_dialog.cpp
#: editor/connections_dialog.cpp editor/export_template_manager.cpp
@@ -393,9 +396,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 "關閉"
@@ -413,30 +416,29 @@ msgid "Connection error, please try again."
msgstr ""
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect."
-msgstr "連到..."
+msgstr "ä¸èƒ½é€£æŽ¥ã€‚"
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Can't connect to host:"
-msgstr "連到"
+msgstr "ä¸èƒ½é€£åˆ°ä¸»æ©Ÿï¼š"
#: editor/asset_library_editor_plugin.cpp
msgid "No response from host:"
-msgstr ""
+msgstr "主機沒有回應:"
#: editor/asset_library_editor_plugin.cpp
msgid "No response."
-msgstr ""
+msgstr "沒有回應。"
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Request failed, return code:"
-msgstr ""
+msgstr "請求失敗,"
#: editor/asset_library_editor_plugin.cpp
msgid "Req. Failed."
-msgstr ""
+msgstr "請求失敗。"
#: editor/asset_library_editor_plugin.cpp
msgid "Request failed, too many redirects"
@@ -448,7 +450,7 @@ msgstr ""
#: editor/asset_library_editor_plugin.cpp
msgid "Failed:"
-msgstr ""
+msgstr "失敗:"
#: editor/asset_library_editor_plugin.cpp
msgid "Bad download hash, assuming file has been tampered with."
@@ -467,12 +469,13 @@ msgid "Failed sha256 hash check"
msgstr ""
#: editor/asset_library_editor_plugin.cpp
+#, fuzzy
msgid "Asset Download Error:"
-msgstr ""
+msgstr "Asset下載出ç¾éŒ¯èª¤ï¼š"
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
-msgstr ""
+msgstr "æˆåŠŸï¼"
#: editor/asset_library_editor_plugin.cpp
msgid "Fetching:"
@@ -488,14 +491,12 @@ msgid "Connecting.."
msgstr "連到..."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Requesting.."
-msgstr "測試"
+msgstr "請求中..."
#: editor/asset_library_editor_plugin.cpp
-#, fuzzy
msgid "Error making request"
-msgstr "載入字形出ç¾éŒ¯èª¤"
+msgstr "請求時出ç¾éŒ¯èª¤"
#: editor/asset_library_editor_plugin.cpp
msgid "Idle"
@@ -503,48 +504,47 @@ msgstr ""
#: editor/asset_library_editor_plugin.cpp
msgid "Retry"
-msgstr ""
+msgstr "é‡è©¦"
#: editor/asset_library_editor_plugin.cpp
msgid "Download Error"
-msgstr ""
+msgstr "下載出ç¾éŒ¯èª¤"
#: editor/asset_library_editor_plugin.cpp
msgid "Download for this asset is already in progress!"
-msgstr ""
+msgstr "Asset已在下載中"
#: editor/asset_library_editor_plugin.cpp
msgid "first"
-msgstr ""
+msgstr "首é "
#: editor/asset_library_editor_plugin.cpp
msgid "prev"
-msgstr ""
+msgstr "上一é "
#: editor/asset_library_editor_plugin.cpp
msgid "next"
-msgstr ""
+msgstr "下一é "
#: editor/asset_library_editor_plugin.cpp
msgid "last"
-msgstr ""
+msgstr "å°¾é "
#: editor/asset_library_editor_plugin.cpp
msgid "All"
msgstr "全部"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
-msgstr ""
+msgstr "æœå°‹ï¼š"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "æœå°‹"
@@ -560,19 +560,19 @@ msgstr "æœå°‹"
msgid "Import"
msgstr "å°Žå…¥"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr "æ’件"
#: editor/asset_library_editor_plugin.cpp
msgid "Sort:"
-msgstr ""
+msgstr "排åºï¼š"
#: editor/asset_library_editor_plugin.cpp
msgid "Reverse"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "分類:"
@@ -598,7 +598,7 @@ msgstr "測試"
#: editor/asset_library_editor_plugin.cpp
msgid "Assets ZIP File"
-msgstr ""
+msgstr "Assets ZIP 檔"
#: editor/call_dialog.cpp
msgid "Method List For '%s':"
@@ -622,15 +622,15 @@ msgstr ""
#: editor/code_editor.cpp
msgid "Go to Line"
-msgstr ""
+msgstr "跳到行"
#: editor/code_editor.cpp
msgid "Line Number:"
-msgstr ""
+msgstr "行數:"
#: editor/code_editor.cpp
msgid "No Matches"
-msgstr ""
+msgstr "沒有相åŒ"
#: editor/code_editor.cpp
msgid "Replaced %d occurrence(s)."
@@ -720,20 +720,19 @@ msgid ""
msgstr ""
#: editor/connections_dialog.cpp
-#, fuzzy
msgid "Connect To Node:"
-msgstr "連到"
+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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "移除"
@@ -797,7 +796,7 @@ msgstr "新增"
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
#: editor/filesystem_dock.cpp
msgid "Favorites:"
-msgstr ""
+msgstr "最愛:"
#: editor/create_dialog.cpp editor/editor_file_dialog.cpp
msgid "Recent:"
@@ -806,13 +805,12 @@ msgstr "最近:"
#: editor/create_dialog.cpp editor/editor_help.cpp
#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
#: editor/quick_open.cpp
-#, fuzzy
msgid "Matches:"
-msgstr "å»åˆ"
+msgstr "å»åˆï¼š"
#: editor/dependency_editor.cpp
msgid "Search Replacement For:"
-msgstr ""
+msgstr "æœå°‹å’Œæ›¿ä»£ç‚ºï¼š"
#: editor/dependency_editor.cpp
msgid "Dependencies For:"
@@ -839,7 +837,7 @@ msgid "Resource"
msgstr "資æº"
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "路徑"
@@ -919,12 +917,190 @@ msgstr ""
msgid "Delete selected files?"
msgstr "è¦åˆªé™¤é¸ä¸­æª”案?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Authors"
+msgstr ""
+
+#: editor/editor_about.cpp
+#, fuzzy
+msgid "Project Founders"
+msgstr "專案設定"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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 "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
+#, fuzzy
+msgid "All Components"
+msgstr "內容:"
+
+#: editor/editor_about.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "導入中:"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+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
+#, fuzzy
+msgid "Rename Audio Bus"
+msgstr "é‡æ–°å‘½åAutoload"
+
+#: 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
+#, fuzzy
+msgid "Delete Bus Effect"
+msgstr "刪除é¸ä¸­æª”案"
+
+#: editor/editor_audio_buses.cpp
+msgid "Audio Bus, Drag and Drop to rearrange."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr "複製"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Delete Audio Bus"
+msgstr "刪除佈局"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "複製"
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+msgid "Move Audio Bus"
+msgstr "移動"
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -938,23 +1114,48 @@ 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/script_create_dialog.cpp
msgid "Load"
msgstr ""
#: editor/editor_audio_buses.cpp
+#, fuzzy
+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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+msgid "Save this Bus Layout to a file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+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 "無效å稱"
@@ -965,16 +1166,19 @@ msgid "Valid characters:"
msgstr "有效字符:"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Invalid name. Must not collide with an existing engine class name."
-msgstr ""
+msgstr "有效å稱。"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Invalid name. Must not collide with an existing buit-in type name."
-msgstr ""
+msgstr "有效å稱。"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Invalid name. Must not collide with an existing global constant name."
-msgstr ""
+msgstr "有效å稱。"
#: editor/editor_autoload_settings.cpp
msgid "Invalid Path."
@@ -985,32 +1189,38 @@ msgid "File does not exist."
msgstr "檔案ä¸å­˜åœ¨."
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Not in resource path."
-msgstr ""
+msgstr "ä¸åœ¨è³‡æºè·¯å¾‘。"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Add AutoLoad"
-msgstr ""
+msgstr "新增AutoLoad"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Autoload '%s' already exists!"
-msgstr ""
+msgstr "AutoLoad '%s'已存在ï¼"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Rename Autoload"
-msgstr ""
+msgstr "é‡æ–°å‘½åAutoload"
#: editor/editor_autoload_settings.cpp
msgid "Toggle AutoLoad Globals"
msgstr ""
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Move Autoload"
-msgstr ""
+msgstr "移動Autoload"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Remove Autoload"
-msgstr ""
+msgstr "移除Autoload"
#: editor/editor_autoload_settings.cpp
#, fuzzy
@@ -1018,8 +1228,9 @@ msgid "Enable"
msgstr "啟用"
#: editor/editor_autoload_settings.cpp
+#, fuzzy
msgid "Rearrange Autoloads"
-msgstr ""
+msgstr "é‡æ–°æŽ’例Autoloads"
#: editor/editor_autoload_settings.cpp editor/editor_file_dialog.cpp
#: editor/io_plugins/editor_font_import_plugin.cpp scene/gui/file_dialog.cpp
@@ -1046,17 +1257,22 @@ msgstr ""
#: editor/editor_data.cpp
msgid "Updating Scene"
-msgstr ""
+msgstr "更新場景"
#: editor/editor_data.cpp
msgid "Storing local changes.."
-msgstr ""
+msgstr "儲存本地更改.."
#: editor/editor_data.cpp
msgid "Updating scene.."
msgstr "正在更新場景..."
#: editor/editor_dir_dialog.cpp
+#, fuzzy
+msgid "Please select a base directory first"
+msgstr "請先儲存場景"
+
+#: editor/editor_dir_dialog.cpp
msgid "Choose a Directory"
msgstr "é¸æ“‡è³‡æ–™å¤¾"
@@ -1094,11 +1310,11 @@ msgstr ""
#: editor/editor_export.cpp
msgid "Added:"
-msgstr ""
+msgstr "已加入:"
#: editor/editor_export.cpp
msgid "Removed:"
-msgstr ""
+msgstr "已移除:"
#: editor/editor_export.cpp
msgid "Error saving atlas:"
@@ -1134,6 +1350,22 @@ msgstr "所有檔案(*)"
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
@@ -1177,14 +1409,13 @@ msgid "Focus Path"
msgstr ""
#: editor/editor_file_dialog.cpp
-#, fuzzy
msgid "Move Favorite Up"
-msgstr "上移"
+msgstr "上移最愛"
#: editor/editor_file_dialog.cpp
#, fuzzy
msgid "Move Favorite Down"
-msgstr "下移"
+msgstr "下移最愛"
#: editor/editor_file_dialog.cpp scene/gui/file_dialog.cpp
msgid "Directories & Files:"
@@ -1262,6 +1493,15 @@ msgid "Signals:"
msgstr "訊號:"
#: editor/editor_help.cpp
+#, fuzzy
+msgid "Enumerations:"
+msgstr "翻譯:"
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr ""
@@ -1278,7 +1518,7 @@ msgid "Search Text"
msgstr ""
#: editor/editor_log.cpp
-msgid " Output:"
+msgid "Output:"
msgstr ""
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1290,8 +1530,9 @@ msgstr "清空"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
#: editor/resources_dock.cpp
+#, fuzzy
msgid "Error saving resource!"
-msgstr ""
+msgstr "儲存資æºæ™‚出ç¾éŒ¯èª¤ï¼"
#: editor/editor_node.cpp editor/plugins/animation_player_editor_plugin.cpp
#: editor/resources_dock.cpp
@@ -1304,12 +1545,14 @@ msgid "I see.."
msgstr "如來如此"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Can't open file for writing:"
-msgstr ""
+msgstr "ä¸èƒ½å¯«å…¥ï¼Œä¸èƒ½é–‹å•Ÿæª”案:"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Requested file format unknown:"
-msgstr ""
+msgstr "è¦æ±‚的檔案格å¼æœªçŸ¥ï¼š"
#: editor/editor_node.cpp
msgid "Error while saving."
@@ -1329,14 +1572,17 @@ 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
-#, fuzzy
msgid "Failed to load resource."
-msgstr "資æºåŠ è¼‰å¤±æ•—"
+msgstr "資æºåŠ è¼‰å¤±æ•—。"
#: editor/editor_node.cpp
msgid "Can't load MeshLibrary for merging!"
@@ -1344,7 +1590,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Error saving MeshLibrary!"
-msgstr ""
+msgstr "儲存MeshLibrary時出ç¾éŒ¯èª¤ï¼"
#: editor/editor_node.cpp
msgid "Can't load TileSet for merging!"
@@ -1352,11 +1598,12 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Error saving TileSet!"
-msgstr ""
+msgstr "儲存TileSet時出ç¾éŒ¯èª¤ï¼"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Error trying to save layout!"
-msgstr ""
+msgstr "儲存佈局時出ç¾éŒ¯èª¤ï¼"
#: editor/editor_node.cpp
msgid "Default editor layout overridden."
@@ -1364,27 +1611,30 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Layout name not found!"
-msgstr ""
+msgstr "未找到佈局å稱ï¼"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Restored default layout to base settings."
-msgstr ""
+msgstr "é‡è¨­é è¨­ä½ˆå±€ã€‚"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Copy Params"
-msgstr ""
+msgstr "複製åƒæ•¸"
#: editor/editor_node.cpp
+#, fuzzy
msgid "Paste Params"
-msgstr ""
+msgstr "貼上åƒæ•¸"
#: editor/editor_node.cpp editor/plugins/resource_preloader_editor_plugin.cpp
msgid "Paste Resource"
-msgstr ""
+msgstr "複製資æº"
#: editor/editor_node.cpp
msgid "Copy Resource"
-msgstr ""
+msgstr "貼上資æº"
#: editor/editor_node.cpp
msgid "Make Built-In"
@@ -1397,11 +1647,11 @@ msgstr ""
#: editor/editor_node.cpp
#, fuzzy
msgid "Open in Help"
-msgstr "開啓場景"
+msgstr "在幫助中開啓"
#: editor/editor_node.cpp
msgid "There is no defined scene to run."
-msgstr ""
+msgstr "沒有å¯ä»¥å·²å®šç¾©çš„場景å¯ä»¥é‹è¡Œã€‚"
#: editor/editor_node.cpp
msgid ""
@@ -1438,22 +1688,23 @@ msgstr "開啓場景"
#: editor/editor_node.cpp
msgid "Open Base Scene"
-msgstr ""
+msgstr "開啟基礎場景"
#: editor/editor_node.cpp
msgid "Quick Open Scene.."
-msgstr ""
+msgstr "快速開啟場景.."
#: editor/editor_node.cpp
msgid "Quick Open Script.."
-msgstr ""
+msgstr "快速開啟腳本.."
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "是"
+#, fuzzy
+msgid "Save & Close"
+msgstr "儲存檔案"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
+msgid "Save changes to '%s' before closing?"
msgstr ""
#: editor/editor_node.cpp
@@ -1462,21 +1713,53 @@ msgstr "把場景å¦å­˜ç‚º"
#: editor/editor_node.cpp
msgid "No"
-msgstr ""
+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 ""
+msgstr "匯出Mesh Library"
#: editor/editor_node.cpp
msgid "Export Tile Set"
+msgstr "匯出Tile Set"
+
+#: 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 "離開"
@@ -1485,34 +1768,41 @@ msgid "Exit the editor?"
msgstr "è¦é›¢é–‹ç·¨è¼¯å™¨å—Ž?"
#: editor/editor_node.cpp
-msgid "Current scene not saved. Open anyway?"
+msgid "Open Project Manager?"
msgstr ""
#: editor/editor_node.cpp
-msgid "Can't reload a scene that was never saved."
+#, fuzzy
+msgid "Save & Quit"
+msgstr "儲存檔案"
+
+#: editor/editor_node.cpp
+msgid "Save changes to the following scene(s) before quitting?"
msgstr ""
#: editor/editor_node.cpp
-msgid "Revert"
+msgid "Save changes the following scene(s) before opening Project Manager?"
msgstr ""
#: editor/editor_node.cpp
-msgid "This action cannot be undone. Revert anyway?"
+msgid "Pick a Main Scene"
+msgstr "é¸æ“‡ä¸»å ´æ™¯"
+
+#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quick Run Scene.."
+msgid "' parsing of config failed."
msgstr ""
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
+msgid "Unable to find script field for addon plugin at: 'res://addons/"
msgstr ""
#: editor/editor_node.cpp
-msgid "Pick a Main Scene"
-msgstr "é¸æ“‡ä¸»å ´æ™¯"
+msgid "Unable to load addon script from path: '"
+msgstr ""
#: editor/editor_node.cpp
msgid ""
@@ -1533,7 +1823,7 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Error loading scene."
-msgstr ""
+msgstr "載入場景時出ç¾éŒ¯èª¤"
#: editor/editor_node.cpp
msgid "Scene '%s' has broken dependencies:"
@@ -1541,11 +1831,16 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Save Layout"
-msgstr ""
+msgstr "儲存佈局"
#: editor/editor_node.cpp
msgid "Delete Layout"
-msgstr ""
+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"
@@ -1563,6 +1858,10 @@ msgstr ""
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
msgid "Scene"
msgstr "場景"
@@ -1612,10 +1911,6 @@ msgstr "儲存所有場景"
msgid "Close Scene"
msgstr "關閉場景"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "開啓最近的"
@@ -1626,11 +1921,11 @@ msgstr "轉為..."
#: 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
@@ -1653,11 +1948,11 @@ msgstr ""
#: editor/editor_node.cpp
msgid "Project"
-msgstr ""
+msgstr "專案"
#: editor/editor_node.cpp
msgid "Project Settings"
-msgstr ""
+msgstr "專案設定"
#: editor/editor_node.cpp
msgid "Run Script"
@@ -1665,7 +1960,7 @@ msgstr "é‹è¡Œè…³æœ¬"
#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export"
-msgstr ""
+msgstr "匯出"
#: editor/editor_node.cpp
msgid "Tools"
@@ -1673,7 +1968,7 @@ msgstr "工具"
#: editor/editor_node.cpp
msgid "Quit to Project List"
-msgstr ""
+msgstr "回到專案列表"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Debug"
@@ -1704,8 +1999,9 @@ msgid ""
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
msgid "Visible Collision Shapes"
-msgstr ""
+msgstr "å¯è¦‹ç¢°æ’žåœ–å½¢"
#: editor/editor_node.cpp
msgid ""
@@ -1724,8 +2020,9 @@ msgid ""
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
msgid "Sync Scene Changes"
-msgstr ""
+msgstr "åŒæ­¥å ´æ™¯çš„變動"
#: editor/editor_node.cpp
msgid ""
@@ -1748,9 +2045,8 @@ msgid ""
msgstr ""
#: editor/editor_node.cpp
-#, fuzzy
msgid "Editor"
-msgstr "編輯"
+msgstr "編輯器"
#: editor/editor_node.cpp editor/settings_config_dialog.cpp
msgid "Editor Settings"
@@ -1758,19 +2054,19 @@ msgstr "編輯器設定"
#: editor/editor_node.cpp
msgid "Editor Layout"
-msgstr ""
+msgstr "編輯器佈局"
#: editor/editor_node.cpp
msgid "Toggle Fullscreen"
-msgstr ""
+msgstr "全螢幕"
#: editor/editor_node.cpp editor/project_export.cpp
msgid "Manage Export Templates"
-msgstr ""
+msgstr "管ç†è¼¸å‡ºç¯„本"
#: editor/editor_node.cpp
msgid "Help"
-msgstr ""
+msgstr "幫助"
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Classes"
@@ -1795,15 +2091,15 @@ msgstr "關於"
#: editor/editor_node.cpp
msgid "Play the project."
-msgstr ""
+msgstr "é‹è¡Œå°ˆæ¡ˆ"
#: editor/editor_node.cpp editor/plugins/sample_library_editor_plugin.cpp
msgid "Play"
-msgstr ""
+msgstr "é‹è¡Œ"
#: editor/editor_node.cpp
msgid "Pause the scene"
-msgstr ""
+msgstr "æš«åœå ´æ™¯"
#: editor/editor_node.cpp
msgid "Pause Scene"
@@ -1811,11 +2107,11 @@ msgstr "æš«åœå ´æ™¯"
#: editor/editor_node.cpp
msgid "Stop the scene."
-msgstr ""
+msgstr "åœæ­¢é‹è¡Œå ´æ™¯"
#: editor/editor_node.cpp editor/plugins/sample_library_editor_plugin.cpp
msgid "Stop"
-msgstr ""
+msgstr "åœæ­¢"
#: editor/editor_node.cpp
msgid "Play the edited scene."
@@ -1897,35 +2193,23 @@ msgstr ""
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
#: editor/editor_node.cpp editor/editor_plugin_settings.cpp
msgid "Update"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr "多è¬!"
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
+msgstr "æ›´æ–°"
#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr ""
@@ -1946,9 +2230,18 @@ msgid "Open & Run a Script"
msgstr ""
#: editor/editor_node.cpp
+#, fuzzy
+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
#, fuzzy
msgid "Open 2D Editor"
@@ -2052,6 +2345,16 @@ msgstr ""
msgid "Re-Import Changed Resources"
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 ""
@@ -2190,10 +2493,27 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid ""
+"\n"
+"Source: "
+msgstr "來æº:"
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2202,6 +2522,20 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "儲存TileSet時出ç¾éŒ¯èª¤ï¼"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "載入錯誤:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2278,6 +2612,12 @@ 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 ""
@@ -2289,9 +2629,29 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2331,6 +2691,14 @@ 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
#, fuzzy
msgid " Files"
msgstr "檔案"
@@ -2520,6 +2888,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3101,6 +3473,11 @@ msgid "New name:"
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "檔案"
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr ""
@@ -3412,6 +3789,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr "編輯"
@@ -3444,10 +3822,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3556,11 +3930,6 @@ msgstr ""
msgid "Change default type"
msgstr ""
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr "OK"
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3598,6 +3967,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3637,6 +4014,18 @@ msgid "Update from Scene"
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
#, fuzzy
msgid "Add point"
msgstr "新增訊號"
@@ -3647,11 +4036,29 @@ msgid "Remove point"
msgstr "åªé™é¸ä¸­"
#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+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 "Modify Curve"
+#, fuzzy
+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
@@ -3676,6 +4083,12 @@ 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 ""
@@ -3965,6 +4378,11 @@ 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 ""
@@ -4282,6 +4700,12 @@ 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 ""
@@ -4306,6 +4730,10 @@ 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 "下一個腳本"
@@ -4360,6 +4788,10 @@ msgid "Close All"
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.."
@@ -4392,6 +4824,11 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "è¦é›¢é–‹ç·¨è¼¯å™¨å—Ž?"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4456,6 +4893,10 @@ msgid ""
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 ""
@@ -4503,6 +4944,11 @@ msgid "Move Down"
msgstr "下移"
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "刪除"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4809,35 +5255,6 @@ msgid "Animation Key Inserted."
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
-#, fuzzy
-msgid "Freelook Down"
-msgstr "下滾"
-
-#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
-msgstr ""
-
-#: editor/plugins/spatial_editor_plugin.cpp
msgid "Objects Drawn"
msgstr ""
@@ -4901,10 +5318,61 @@ msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Freelook Down"
+msgstr "下滾"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Speed Modifier"
+msgstr ""
+
+#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+msgid "preview"
+msgstr "é è¦½:"
+
+#: editor/plugins/spatial_editor_plugin.cpp
msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#, fuzzy
+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 ""
@@ -5023,6 +5491,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr "設定"
@@ -5151,6 +5620,10 @@ 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 ""
@@ -5208,6 +5681,16 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All Items"
+msgstr "移除é¸é …"
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "移除"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5275,7 +5758,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5297,12 +5780,26 @@ msgid "Color"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "縮放selection"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr ""
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
-msgstr "複製"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+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"
@@ -5337,10 +5834,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5403,7 +5896,7 @@ msgstr "è¦åˆªé™¤é¸ä¸­æª”案?"
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr "添加..."
@@ -5452,6 +5945,23 @@ 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
+#, fuzzy
+msgid "Export PCK/Zip"
+msgstr "匯出"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5488,10 +5998,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5536,6 +6042,19 @@ 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 ""
@@ -5550,10 +6069,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5582,255 +6097,288 @@ msgstr "移除é¸é …"
msgid "Exit"
msgstr "離開"
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "ä¸èƒ½é€£æŽ¥ã€‚"
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr "Meta+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr "Shift+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr "Alt+"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Change"
+msgstr "當改變時更新"
+
+#: editor/project_settings_editor.cpp
msgid "Joypad Axis Index:"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
#, fuzzy
msgid "Axis"
msgstr "中軸"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr "設備"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr "按éµ"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr "左𨫡"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr "å³ð¨«¡"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr "中𨫡"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr "上滾"
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr "下滾"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Add Global Property"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Select an setting item first!"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "No property '"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Setting '"
+msgstr "設定"
+
+#: editor/project_settings_editor.cpp
+#, fuzzy
+msgid "Delete Item"
+msgstr "刪除"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Project Settings (project.godot)"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr ""
-
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr "本地化"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr "翻譯"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr "翻譯:"
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5872,6 +6420,11 @@ msgstr ""
#: editor/property_editor.cpp
#, fuzzy
+msgid "Select Node"
+msgstr "ä¸é¸"
+
+#: editor/property_editor.cpp
+#, fuzzy
msgid "New Script"
msgstr "下一個腳本"
@@ -5884,6 +6437,10 @@ msgid "Error loading file: Not a resource!"
msgstr ""
#: editor/property_editor.cpp
+msgid "Selected node is not a Viewport!"
+msgstr ""
+
+#: editor/property_editor.cpp
#, fuzzy
msgid "Pick a Node"
msgstr "貼上"
@@ -5982,6 +6539,11 @@ msgstr ""
msgid "Scene Run Settings"
msgstr ""
+#: editor/scene_tree_dock.cpp editor/script_create_dialog.cpp
+#: scene/gui/dialogs.cpp
+msgid "OK"
+msgstr "OK"
+
#: editor/scene_tree_dock.cpp
msgid "No parent to instance the scenes at."
msgstr ""
@@ -6025,10 +6587,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6041,6 +6599,18 @@ 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 ""
@@ -6084,6 +6654,14 @@ msgid "Edit Connections"
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 ""
@@ -6137,6 +6715,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "篩é¸:"
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr ""
@@ -6144,6 +6727,14 @@ msgstr ""
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 ""
@@ -6175,10 +6766,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Subscene options"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6216,31 +6803,7 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
@@ -6249,6 +6812,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "載入字形出ç¾éŒ¯èª¤"
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "無法新增資料夾"
@@ -6258,6 +6826,10 @@ msgid "Error loading script from %s"
msgstr "載入字形出ç¾éŒ¯èª¤"
#: editor/script_create_dialog.cpp
+msgid "N/A"
+msgstr "N/A"
+
+#: editor/script_create_dialog.cpp
msgid "Path is empty"
msgstr "路徑為空"
@@ -6300,10 +6872,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr "N/A"
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6474,6 +7042,10 @@ 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 ""
@@ -6555,6 +7127,130 @@ msgstr ""
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
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "刪除é¸ä¸­æª”案"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "複製 Selection"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+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
+#, fuzzy
+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
+#, fuzzy
+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
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "åªé™é¸ä¸­"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "åªé™é¸ä¸­"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "設定"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Pick Distance:"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Tiles"
+msgstr "檔案"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6586,6 +7282,27 @@ 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
+#, fuzzy
+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
#, fuzzy
msgid "Functions:"
msgstr "行為"
@@ -6629,35 +7346,20 @@ msgid "Add Signal"
msgstr "新增訊號"
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Remove Function"
-msgstr "åªé™é¸ä¸­"
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
+msgid "Change Expression"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Remove Signal"
-msgstr "åªé™é¸ä¸­"
-
-#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Editing Signal:"
-msgstr "連接"
+msgid "Add Node"
+msgstr "新增節點"
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change Expression"
+msgid "Remove VisualScript Nodes"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Node"
-msgstr "新增節點"
+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."
@@ -6701,6 +7403,24 @@ msgid "Add Setter Property"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+msgid "Change Base Type"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Move Node(s)"
+msgstr "移動模å¼"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Remove VisualScript Node"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "連到:"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr ""
@@ -6729,6 +7449,57 @@ msgid "Get"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Clipboard is empty!"
+msgstr "路徑為空"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Paste VisualScript Nodes"
+msgstr "貼上"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Edit Signal"
+msgstr "連接"
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Remove Signal"
+msgstr "åªé™é¸ä¸­"
+
+#: modules/visual_script/visual_script_editor.cpp
+msgid "Editing Variable:"
+msgstr ""
+
+#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+msgid "Editing Signal:"
+msgstr "連接"
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Base Type:"
msgstr ""
@@ -6749,11 +7520,6 @@ msgid "Edit Variable:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-#, fuzzy
-msgid "Change"
-msgstr "當改變時更新"
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr "刪除é¸ä¸­æª”案"
@@ -6828,14 +7594,6 @@ msgid ""
"(error)."
msgstr ""
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
#, fuzzy
msgid "Run in Browser"
@@ -6860,79 +7618,6 @@ msgstr "無法新增資料夾"
msgid "Could not open template for export:\n"
msgstr "無法新增資料夾"
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid unique name."
-msgstr "無效å稱"
-
-#: platform/uwp/export/export.cpp
-#, fuzzy
-msgid "Invalid product GUID."
-msgstr "無效字型"
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -7011,6 +7696,13 @@ msgstr ""
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 ""
@@ -7033,17 +7725,32 @@ msgid ""
"as parent."
msgstr ""
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"The controller id must not be 0 or this controller will not be bound to an "
+"actual controller"
msgstr ""
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRAnchor must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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
@@ -7057,6 +7764,19 @@ msgstr ""
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 ""
@@ -7072,6 +7792,13 @@ 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 ""
@@ -7088,7 +7815,7 @@ msgid ""
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7103,22 +7830,6 @@ msgstr "警告!"
msgid "Please Confirm..."
msgstr "請確èª..."
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr "開啟檔案"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr "開啟檔案"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr "開啟資料夾"
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr "é¸æ“‡è³‡æ–™å¤¾/檔案"
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
msgstr "Ctrl+"
@@ -7137,7 +7848,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7151,12 +7862,25 @@ msgid ""
"texture to some node for display."
msgstr ""
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "è¦é—œé–‰å ´æ™¯å—Žï¼Ÿï¼ˆæœªå„²å­˜çš„更改將會消失)"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr "回到專案管ç†å™¨ï¼Ÿï¼ˆæœªå„²å­˜çš„更改將會消失)"
+
+#, fuzzy
+#~ msgid "Invalid unique name."
+#~ msgstr "無效å稱"
+
+#, fuzzy
+#~ msgid "Invalid product GUID."
+#~ msgstr "無效字型"
+
#~ msgid "Valid name"
#~ msgstr "有效å稱"
-#~ msgid "Please save the scene first."
-#~ msgstr "請先儲存場景"
-
#~ msgid "Edit Script Options"
#~ msgstr "編輯腳本é¸é …"
@@ -7202,9 +7926,6 @@ msgstr ""
#~ msgid "Images:"
#~ msgstr "圖片:"
-#~ msgid "Select None"
-#~ msgstr "ä¸é¸"
-
#~ msgid "Keep"
#~ msgstr "ä¿ç•™"
diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po
index c5a1f6994c..8ed54a0798 100644
--- a/editor/translations/zh_TW.po
+++ b/editor/translations/zh_TW.po
@@ -3,21 +3,22 @@
# This file is distributed under the same license as the Godot source code.
#
# Allen H <w84miracle@gmail.com>, 2017.
+# Chao Yu <casd82@gmail.com>, 2017.
# popcade <popcade@gmail.com>, 2016.
# Sam Pan <sampan66@gmail.com>, 2016.
#
msgid ""
msgstr ""
"Project-Id-Version: Godot Engine editor\n"
-"PO-Revision-Date: 2017-05-12 07:06+0000\n"
-"Last-Translator: Allen H. <w84miracle@gmail.com>\n"
+"PO-Revision-Date: 2017-07-31 15:51+0000\n"
+"Last-Translator: Chao Yu <casd82@gmail.com>\n"
"Language-Team: Chinese (Traditional) <https://hosted.weblate.org/projects/"
"godot-engine/godot/zh_Hant/>\n"
"Language: zh_TW\n"
"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.14-dev\n"
+"X-Generator: Weblate 2.16-dev\n"
#: editor/animation_editor.cpp
msgid "Disabled"
@@ -37,7 +38,7 @@ msgstr ""
#: editor/animation_editor.cpp
msgid "Anim Change Transform"
-msgstr ""
+msgstr "動畫更改座標"
#: editor/animation_editor.cpp
msgid "Anim Change Value"
@@ -147,7 +148,8 @@ msgstr "往下一步"
msgid "Goto Prev Step"
msgstr "往上一步"
-#: editor/animation_editor.cpp editor/property_editor.cpp
+#: editor/animation_editor.cpp editor/plugins/curve_editor_plugin.cpp
+#: editor/property_editor.cpp
msgid "Linear"
msgstr "線性"
@@ -380,7 +382,8 @@ msgstr "éŽæ¿¾æª”案.."
msgid "Description:"
msgstr "æè¿°:"
-#: editor/asset_library_editor_plugin.cpp editor/project_manager.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
+#: editor/project_manager.cpp
msgid "Install"
msgstr ""
@@ -391,9 +394,9 @@ msgstr ""
#: editor/plugins/resource_preloader_editor_plugin.cpp
#: editor/plugins/sample_library_editor_plugin.cpp
#: editor/plugins/script_editor_plugin.cpp
-#: editor/plugins/sprite_frames_editor_plugin.cpp editor/project_settings.cpp
-#: editor/property_editor.cpp editor/run_settings_dialog.cpp
-#: editor/settings_config_dialog.cpp
+#: editor/plugins/sprite_frames_editor_plugin.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 ""
@@ -467,7 +470,7 @@ msgstr ""
msgid "Asset Download Error:"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp
+#: editor/asset_library_editor_plugin.cpp editor/editor_asset_installer.cpp
msgid "Success!"
msgstr ""
@@ -530,17 +533,16 @@ msgid "All"
msgstr "全部"
#: editor/asset_library_editor_plugin.cpp editor/create_dialog.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp editor/property_selector.cpp
-#: editor/quick_open.cpp editor/settings_config_dialog.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
+#: editor/property_selector.cpp editor/quick_open.cpp
+#: editor/settings_config_dialog.cpp
msgid "Search:"
msgstr "æœå°‹:"
#: editor/asset_library_editor_plugin.cpp editor/code_editor.cpp
-#: editor/editor_help.cpp editor/editor_node.cpp
-#: editor/plugins/script_editor_plugin.cpp
+#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
#: editor/plugins/script_text_editor.cpp
-#: editor/plugins/shader_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/shader_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Search"
msgstr "æœå°‹"
@@ -556,7 +558,7 @@ msgstr "æœå°‹"
msgid "Import"
msgstr ""
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Plugins"
msgstr ""
@@ -568,7 +570,7 @@ msgstr "排åº:"
msgid "Reverse"
msgstr "å轉"
-#: editor/asset_library_editor_plugin.cpp editor/project_settings.cpp
+#: editor/asset_library_editor_plugin.cpp editor/project_settings_editor.cpp
msgid "Category:"
msgstr "類別:"
@@ -720,14 +722,14 @@ 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.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.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove"
msgstr "移除"
@@ -835,7 +837,7 @@ msgid "Resource"
msgstr ""
#: editor/dependency_editor.cpp editor/editor_autoload_settings.cpp
-#: editor/project_manager.cpp editor/project_settings.cpp
+#: editor/project_manager.cpp editor/project_settings_editor.cpp
#: editor/script_create_dialog.cpp
msgid "Path"
msgstr "路徑"
@@ -918,12 +920,183 @@ msgstr ""
msgid "Delete selected files?"
msgstr "確定刪除所é¸æ“‡çš„檔案嗎?"
-#: editor/dependency_editor.cpp editor/editor_node.cpp
-#: editor/filesystem_dock.cpp editor/plugins/item_list_editor_plugin.cpp
-#: editor/project_export.cpp editor/scene_tree_dock.cpp
+#: 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 "Authors"
+msgstr ""
+
+#: editor/editor_about.cpp
+#, fuzzy
+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 "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
+#, fuzzy
+msgid "Uncompressing Assets"
+msgstr "(é‡æ–°)載入素æ"
+
+#: editor/editor_asset_installer.cpp editor/project_manager.cpp
+msgid "Package Installed Successfully!"
+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
+#, fuzzy
+msgid "Bus options"
+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 editor/plugins/tile_map_editor_plugin.cpp
+#: editor/scene_tree_dock.cpp
+msgid "Duplicate"
+msgstr ""
+
+#: editor/editor_audio_buses.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Duplicate Audio Bus"
+msgstr "複製所é¸"
+
+#: editor/editor_audio_buses.cpp
+msgid "Move Audio Bus"
+msgstr ""
+
#: editor/editor_audio_buses.cpp
msgid "Save Audio Bus Layout As.."
msgstr ""
@@ -937,23 +1110,47 @@ 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/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 editor/editor_node.cpp editor/import_dock.cpp
-#: editor/script_create_dialog.cpp
-msgid "Default"
+#: editor/editor_audio_buses.cpp
+msgid "Save this Bus Layout to a file."
+msgstr ""
+
+#: editor/editor_audio_buses.cpp editor/import_dock.cpp
+#, fuzzy
+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 ""
@@ -1055,6 +1252,10 @@ 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 "é¸æ“‡è³‡æ–™å¤¾"
@@ -1132,6 +1333,22 @@ msgstr "所有類型檔案"
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
@@ -1257,6 +1474,14 @@ msgid "Signals:"
msgstr ""
#: editor/editor_help.cpp
+msgid "Enumerations:"
+msgstr ""
+
+#: editor/editor_help.cpp
+msgid "enum "
+msgstr ""
+
+#: editor/editor_help.cpp
msgid "Constants:"
msgstr ""
@@ -1273,7 +1498,8 @@ msgid "Search Text"
msgstr "æœå°‹è©žå½™"
#: editor/editor_log.cpp
-msgid " Output:"
+#, fuzzy
+msgid "Output:"
msgstr " 輸出:"
#: editor/editor_log.cpp editor/plugins/animation_tree_editor_plugin.cpp
@@ -1323,6 +1549,11 @@ msgid "Creating Thumbnail"
msgstr "正在建立縮圖"
#: editor/editor_node.cpp
+#, fuzzy
+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 ""
@@ -1441,12 +1672,13 @@ msgid "Quick Open Script.."
msgstr ""
#: editor/editor_node.cpp
-msgid "Yes"
-msgstr "是"
+#, fuzzy
+msgid "Save & Close"
+msgstr "å¦å­˜æ–°æª”"
#: editor/editor_node.cpp
-msgid "Close scene? (Unsaved changes will be lost)"
-msgstr "沒有儲存的變更都會éºå¤±, 確定è¦é—œé–‰?"
+msgid "Save changes to '%s' before closing?"
+msgstr ""
#: editor/editor_node.cpp
msgid "Save Scene As.."
@@ -1457,9 +1689,17 @@ 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 ""
@@ -1469,12 +1709,8 @@ msgid "Export Tile Set"
msgstr ""
#: editor/editor_node.cpp
-msgid "Quit"
-msgstr "離開"
-
-#: editor/editor_node.cpp
-msgid "Exit the editor?"
-msgstr "離開編輯器嗎?"
+msgid "This operation can't be done without a selected node."
+msgstr ""
#: editor/editor_node.cpp
msgid "Current scene not saved. Open anyway?"
@@ -1497,16 +1733,50 @@ msgid "Quick Run Scene.."
msgstr "快速執行場景.."
#: editor/editor_node.cpp
-msgid ""
-"Open Project Manager? \n"
-"(Unsaved changes will be lost)"
-msgstr "未ä¿å­˜çš„變更將éºå¤±, è¦é–‹å•Ÿå°ˆæ¡ˆç®¡ç†å“¡å—Ž?"
+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 "Pick a Main Scene"
msgstr "挑一個主è¦å ´æ™¯"
#: editor/editor_node.cpp
+msgid "Unable to enable addon plugin at: '"
+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/"
+msgstr ""
+
+#: editor/editor_node.cpp
+msgid "Unable to load addon script from path: '"
+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."
@@ -1539,6 +1809,11 @@ msgstr ""
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 "切æ›å ´æ™¯åˆ†é "
@@ -1555,6 +1830,10 @@ msgstr "還有 %d 個檔案或資料夾"
msgid "Distraction Free Mode"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Toggle distraction-free mode."
+msgstr ""
+
#: editor/editor_node.cpp editor/io_plugins/editor_scene_import_plugin.cpp
#, fuzzy
msgid "Scene"
@@ -1604,10 +1883,6 @@ msgstr "儲存全部場景"
msgid "Close Scene"
msgstr "關閉場景"
-#: editor/editor_node.cpp
-msgid "Close Goto Prev. Scene"
-msgstr ""
-
#: editor/editor_node.cpp editor/plugins/script_editor_plugin.cpp
msgid "Open Recent"
msgstr "開啟最近存å–"
@@ -1888,6 +2163,10 @@ msgstr ""
msgid "Output"
msgstr ""
+#: editor/editor_node.cpp
+msgid "Don't Save"
+msgstr ""
+
#: editor/editor_node.cpp editor/editor_reimport_dialog.cpp
msgid "Re-Import"
msgstr ""
@@ -1897,26 +2176,10 @@ msgid "Update"
msgstr ""
#: editor/editor_node.cpp
-msgid "Thanks from the Godot community!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Thanks!"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Godot Engine contributors"
-msgstr ""
-
-#: editor/editor_node.cpp
-msgid "Developers"
-msgstr ""
-
-#: editor/editor_node.cpp
msgid "Import Templates From ZIP File"
msgstr ""
-#: editor/editor_node.cpp
+#: editor/editor_node.cpp editor/project_export.cpp
msgid "Export Project"
msgstr ""
@@ -1937,9 +2200,17 @@ 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 ""
@@ -2041,6 +2312,16 @@ msgstr ""
msgid "Re-Import Changed Resources"
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 ""
@@ -2176,10 +2457,26 @@ msgid "Cannot navigate to '"
msgstr ""
#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Status: Needs Re-Import"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+msgid ""
+"\n"
+"Source: "
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination files, doing nothing."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Target file exists, can't overwrite. Delete first."
+msgstr ""
+
+#: editor/filesystem_dock.cpp
msgid "Same source and destination paths, doing nothing."
msgstr ""
@@ -2188,6 +2485,20 @@ msgid "Can't move directories to within themselves."
msgstr ""
#: editor/filesystem_dock.cpp
+msgid "Can't rename deps for:\n"
+msgstr ""
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving file:\n"
+msgstr "載入時發生錯誤:"
+
+#: editor/filesystem_dock.cpp
+#, fuzzy
+msgid "Error moving dir:\n"
+msgstr "載入時發生錯誤:"
+
+#: editor/filesystem_dock.cpp
msgid "Can't operate on '..'"
msgstr ""
@@ -2264,6 +2575,12 @@ 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 ""
@@ -2275,9 +2592,29 @@ msgstr ""
msgid "Remove from Group"
msgstr ""
-#: editor/import/resource_importer_obj.cpp
-#: editor/io_plugins/editor_mesh_import_plugin.cpp
-msgid "Surface %d"
+#: editor/import/resource_importer_scene.cpp
+#, fuzzy
+msgid "Import as Single Scene"
+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 as Multiple Scenes"
+msgstr ""
+
+#: editor/import/resource_importer_scene.cpp
+msgid "Import as Multiple Scenes+Materials"
msgstr ""
#: editor/import/resource_importer_scene.cpp
@@ -2317,6 +2654,14 @@ 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 ""
@@ -2503,6 +2848,10 @@ msgstr ""
msgid "Mesh"
msgstr ""
+#: editor/io_plugins/editor_mesh_import_plugin.cpp
+msgid "Surface %d"
+msgstr ""
+
#: editor/io_plugins/editor_sample_import_plugin.cpp
msgid "No samples to import!"
msgstr ""
@@ -3084,6 +3433,11 @@ msgid "New name:"
msgstr ""
#: editor/plugins/animation_tree_editor_plugin.cpp
+#, fuzzy
+msgid "Edit Filters"
+msgstr "éŽæ¿¾æª”案.."
+
+#: editor/plugins/animation_tree_editor_plugin.cpp
#: editor/plugins/multimesh_editor_plugin.cpp
msgid "Scale:"
msgstr ""
@@ -3395,6 +3749,7 @@ 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
#: modules/visual_script/visual_script_editor.cpp
msgid "Edit"
msgstr ""
@@ -3427,10 +3782,6 @@ msgid "Use Pixel Snap"
msgstr ""
#: editor/plugins/canvas_item_editor_plugin.cpp
-msgid "Expand to Parent"
-msgstr ""
-
-#: editor/plugins/canvas_item_editor_plugin.cpp
msgid "Skeleton.."
msgstr ""
@@ -3539,11 +3890,6 @@ msgstr ""
msgid "Change default type"
msgstr ""
-#: editor/plugins/canvas_item_editor_plugin.cpp editor/scene_tree_dock.cpp
-#: editor/script_create_dialog.cpp scene/gui/dialogs.cpp
-msgid "OK"
-msgstr ""
-
#: editor/plugins/canvas_item_editor_plugin.cpp
msgid ""
"Drag & drop + Shift : Add node as sibling\n"
@@ -3581,6 +3927,14 @@ msgstr ""
msgid "Create a new polygon from scratch."
msgstr ""
+#: editor/plugins/collision_polygon_2d_editor_plugin.cpp
+msgid ""
+"Edit existing polygon:\n"
+"LMB: Move Point.\n"
+"Ctrl+LMB: Split Segment.\n"
+"RMB: Erase Point."
+msgstr ""
+
#: editor/plugins/collision_polygon_editor_plugin.cpp
msgid "Create Poly3D"
msgstr ""
@@ -3620,6 +3974,18 @@ msgid "Update from Scene"
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 ""
@@ -3629,11 +3995,29 @@ msgid "Remove point"
msgstr "移除"
#: editor/plugins/curve_editor_plugin.cpp
+#, fuzzy
+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 "Modify Curve"
+#, fuzzy
+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
@@ -3658,6 +4042,12 @@ 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 ""
@@ -3947,6 +4337,11 @@ 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 ""
@@ -4263,6 +4658,12 @@ 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 ""
@@ -4287,6 +4688,10 @@ 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 ""
@@ -4339,6 +4744,10 @@ msgid "Close All"
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.."
@@ -4371,6 +4780,11 @@ msgid "Keep Debugger Open"
msgstr ""
#: editor/plugins/script_editor_plugin.cpp
+#, fuzzy
+msgid "Debug with external editor"
+msgstr "離開編輯器嗎?"
+
+#: editor/plugins/script_editor_plugin.cpp
msgid "Window"
msgstr ""
@@ -4434,6 +4848,10 @@ msgid ""
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 ""
@@ -4481,6 +4899,11 @@ msgid "Move Down"
msgstr ""
#: editor/plugins/script_text_editor.cpp
+#, fuzzy
+msgid "Delete Line"
+msgstr "刪除"
+
+#: editor/plugins/script_text_editor.cpp
msgid "Indent Left"
msgstr ""
@@ -4787,97 +5210,118 @@ msgid "Animation Key Inserted."
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Left"
+msgid "Objects Drawn"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Right"
+#, fuzzy
+msgid "Material Changes"
+msgstr "正在儲存變更.."
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Shader Changes"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Freelook Forward"
-msgstr "å¾€å‰"
+msgid "Surface Changes"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Backwards"
+msgid "Draw Calls"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Up"
+msgid "Vertices"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Down"
+msgid "Align with view"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Freelook Speed Modifier"
+msgid "Display Normal"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Objects Drawn"
+msgid "Display Wireframe"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-#, fuzzy
-msgid "Material Changes"
-msgstr "正在儲存變更.."
+msgid "Display Overdraw"
+msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Shader Changes"
+msgid "Display Unshaded"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Surface Changes"
+msgid "View Environment"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Draw Calls"
+msgid "View Gizmos"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Vertices"
+msgid "View Information"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Align with view"
+msgid "Audio Listener"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Normal"
+#, fuzzy
+msgid "Doppler Enable"
+msgstr "啟用"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Left"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Wireframe"
+msgid "Freelook Right"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Overdraw"
+#, fuzzy
+msgid "Freelook Forward"
+msgstr "å¾€å‰"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "Freelook Backwards"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Display Unshaded"
+msgid "Freelook Up"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Environment"
+msgid "Freelook Down"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Gizmos"
+msgid "Freelook Speed Modifier"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "View Information"
+#, fuzzy
+msgid "preview"
+msgstr "é è¦½:"
+
+#: editor/plugins/spatial_editor_plugin.cpp
+msgid "XForm Dialog"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "Audio Listener"
+msgid "Select Mode (Q)\n"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
-msgid "XForm Dialog"
+msgid ""
+"Drag: Rotate\n"
+"Alt+Drag: Move\n"
+"Alt+RMB: Depth list selection"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
@@ -4998,6 +5442,7 @@ msgid "View Grid"
msgstr ""
#: editor/plugins/spatial_editor_plugin.cpp
+#: modules/gridmap/grid_map_editor_plugin.cpp
msgid "Settings"
msgstr ""
@@ -5126,6 +5571,10 @@ 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 ""
@@ -5183,6 +5632,15 @@ msgid "Remove Item"
msgstr ""
#: editor/plugins/theme_editor_plugin.cpp
+msgid "Remove All Items"
+msgstr ""
+
+#: editor/plugins/theme_editor_plugin.cpp
+#, fuzzy
+msgid "Remove All"
+msgstr "移除"
+
+#: editor/plugins/theme_editor_plugin.cpp
msgid "Theme"
msgstr ""
@@ -5250,7 +5708,7 @@ msgstr ""
msgid "Tab 3"
msgstr ""
-#: editor/plugins/theme_editor_plugin.cpp editor/project_settings.cpp
+#: editor/plugins/theme_editor_plugin.cpp editor/project_settings_editor.cpp
#: editor/scene_tree_editor.cpp editor/script_editor_debugger.cpp
msgid "Type:"
msgstr ""
@@ -5272,11 +5730,25 @@ msgid "Color"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+msgid "Erase Selection"
+msgstr "所有的é¸æ“‡"
+
+#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Paint TileMap"
msgstr ""
-#: editor/plugins/tile_map_editor_plugin.cpp editor/scene_tree_dock.cpp
-msgid "Duplicate"
+#: editor/plugins/tile_map_editor_plugin.cpp
+#, fuzzy
+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
@@ -5312,10 +5784,6 @@ msgid "Pick Tile"
msgstr ""
#: editor/plugins/tile_map_editor_plugin.cpp
-msgid "Select"
-msgstr ""
-
-#: editor/plugins/tile_map_editor_plugin.cpp
msgid "Rotate 0 degrees"
msgstr ""
@@ -5375,7 +5843,7 @@ msgstr ""
msgid "Presets"
msgstr ""
-#: editor/project_export.cpp editor/project_settings.cpp
+#: editor/project_export.cpp editor/project_settings_editor.cpp
msgid "Add.."
msgstr ""
@@ -5422,6 +5890,24 @@ msgid "Make Patch"
msgstr ""
#: editor/project_export.cpp
+msgid "Features"
+msgstr ""
+
+#: editor/project_export.cpp
+msgid "Custom (comma-separated):"
+msgstr ""
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Feature List:"
+msgstr "方法:"
+
+#: editor/project_export.cpp
+#, fuzzy
+msgid "Export PCK/Zip"
+msgstr "輸出"
+
+#: editor/project_export.cpp
msgid "Export templates for this platform are missing:"
msgstr ""
@@ -5458,10 +5944,6 @@ msgid "The following files failed extraction from package:"
msgstr ""
#: editor/project_manager.cpp
-msgid "Package Installed Successfully!"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Import Existing Project"
msgstr ""
@@ -5506,6 +5988,19 @@ 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 ""
@@ -5520,10 +6015,6 @@ msgid ""
msgstr ""
#: editor/project_manager.cpp
-msgid "Project Manager"
-msgstr ""
-
-#: editor/project_manager.cpp
msgid "Project List"
msgstr ""
@@ -5551,255 +6042,286 @@ msgstr ""
msgid "Exit"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_manager.cpp
+#, fuzzy
+msgid "Can't run project"
+msgstr "連接..."
+
+#: editor/project_settings_editor.cpp
msgid "Key "
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joy Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Invalid action (anything goes but '/' or ':')."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action '%s' already exists!"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Rename Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action Event"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Meta+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Shift+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
#: scene/gui/input_action.cpp
msgid "Alt+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Control+"
msgstr ""
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "Press a Key.."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Mouse Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Left Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Right Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Middle Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Up Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Wheel Down Button"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 6"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 7"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 8"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Button 9"
msgstr ""
-#: editor/project_settings.cpp
+#: 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.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Axis"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Joypad Button Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Input Action"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Erase Input Action Event"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Event"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Device"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Button"
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Left Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Right Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Middle Button."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Up."
msgstr ""
-#: editor/project_settings.cpp scene/gui/input_action.cpp
+#: editor/project_settings_editor.cpp scene/gui/input_action.cpp
msgid "Wheel Down."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Add Global Property"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
+msgid "Select an 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
+#, fuzzy
+msgid "Delete Item"
+msgstr "刪除"
+
+#: editor/project_settings_editor.cpp
msgid "Error saving settings."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Settings saved OK."
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
+msgid "Override for Feature"
+msgstr ""
+
+#: editor/project_settings_editor.cpp
msgid "Add Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Translation"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Add Remapped Path"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resource Remap Add Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Change Resource Remap Language"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remove Resource Remap Option"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
#, fuzzy
msgid "Project Settings (project.godot)"
msgstr "專案設定"
-#: editor/project_settings.cpp editor/settings_config_dialog.cpp
+#: editor/project_settings_editor.cpp editor/settings_config_dialog.cpp
msgid "General"
msgstr ""
-#: editor/project_settings.cpp editor/property_editor.cpp
+#: editor/project_settings_editor.cpp editor/property_editor.cpp
msgid "Property:"
msgstr ""
-#: editor/project_settings.cpp
-msgid "Del"
+#: editor/project_settings_editor.cpp
+msgid "Override For.."
msgstr ""
-#: editor/project_settings.cpp
-msgid "Copy To Platform.."
-msgstr ""
-
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Input Map"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Action:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Device:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Index:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Localization"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Translations:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Resources:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Remaps by Locale:"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "Locale"
msgstr ""
-#: editor/project_settings.cpp
+#: editor/project_settings_editor.cpp
msgid "AutoLoad"
msgstr ""
@@ -5840,6 +6362,10 @@ msgid "Assign"
msgstr ""
#: editor/property_editor.cpp
+msgid "Select Node"
+msgstr ""
+
+#: editor/property_editor.cpp
msgid "New Script"
msgstr ""
@@ -5852,6 +6378,10 @@ 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 ""
@@ -5947,6 +6477,11 @@ msgstr ""
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 ""
@@ -5990,10 +6525,6 @@ msgid "Delete Node(s)?"
msgstr ""
#: editor/scene_tree_dock.cpp
-msgid "This operation can't be done without a scene."
-msgstr ""
-
-#: editor/scene_tree_dock.cpp
msgid "Can not perform with the root node."
msgstr ""
@@ -6006,6 +6537,18 @@ 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 ""
@@ -6048,6 +6591,14 @@ msgid "Edit Connections"
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 ""
@@ -6098,6 +6649,11 @@ msgid ""
msgstr ""
#: editor/scene_tree_dock.cpp
+#, fuzzy
+msgid "Filter nodes"
+msgstr "éŽæ¿¾æª”案.."
+
+#: editor/scene_tree_dock.cpp
msgid "Attach a new or existing script for the selected node."
msgstr ""
@@ -6105,6 +6661,14 @@ msgstr ""
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 ""
@@ -6136,11 +6700,6 @@ msgid ""
msgstr ""
#: editor/scene_tree_editor.cpp
-#, fuzzy
-msgid "Subscene options"
-msgstr "除錯é¸é …"
-
-#: editor/scene_tree_editor.cpp
msgid "Instance:"
msgstr ""
@@ -6178,31 +6737,7 @@ msgid "Scene Tree (Nodes):"
msgstr ""
#: editor/scene_tree_editor.cpp
-msgid "Editable Children"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Load As Placeholder"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Discard Instancing"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Open in Editor"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear Inheritance? (No Undo!)"
-msgstr ""
-
-#: editor/scene_tree_editor.cpp
-msgid "Clear!"
+msgid "Node Configuration Warning!"
msgstr ""
#: editor/scene_tree_editor.cpp
@@ -6211,6 +6746,11 @@ msgstr ""
#: editor/script_create_dialog.cpp
#, fuzzy
+msgid "Error loading template '%s'"
+msgstr "載入場景時發生錯誤"
+
+#: editor/script_create_dialog.cpp
+#, fuzzy
msgid "Error - Could not create script in filesystem."
msgstr "無法新增資料夾"
@@ -6219,6 +6759,10 @@ 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 ""
@@ -6260,10 +6804,6 @@ msgid "Allowed: a-z, A-Z, 0-9 and _"
msgstr ""
#: editor/script_create_dialog.cpp
-msgid "N/A"
-msgstr ""
-
-#: editor/script_create_dialog.cpp
msgid "Built-in script (into scene file)"
msgstr ""
@@ -6369,7 +6909,7 @@ msgstr ""
#: editor/script_editor_debugger.cpp
msgid "Value"
-msgstr ""
+msgstr "數值"
#: editor/script_editor_debugger.cpp
#, fuzzy
@@ -6432,6 +6972,10 @@ 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 "變更é¡é ­è¦–野(FOV)"
@@ -6519,6 +7063,129 @@ msgstr "無效的事件詞典格å¼(無效的腳本 @path)"
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
+#, fuzzy
+msgid "GridMap Delete Selection"
+msgstr "複製所é¸"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Duplicate Selection"
+msgstr "複製所é¸"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "GridMap Paint"
+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
+#, fuzzy
+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
+#, fuzzy
+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
+#, fuzzy
+msgid "Selection -> Duplicate"
+msgstr "僅é¸æ“‡å€åŸŸ"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "Selection -> Clear"
+msgstr "僅é¸æ“‡å€åŸŸ"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+#, fuzzy
+msgid "GridMap Settings"
+msgstr "專案設定"
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Pick Distance:"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Tiles"
+msgstr ""
+
+#: modules/gridmap/grid_map_editor_plugin.cpp
+msgid "Areas"
+msgstr ""
+
#: modules/visual_script/visual_script.cpp
msgid ""
"A node yielded without working memory, please read the docs on how to yield "
@@ -6552,63 +7219,63 @@ msgid "Stack overflow with stack depth: "
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Functions:"
+msgid "Change Signal Arguments"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Variables:"
+msgid "Change Argument Type"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Name is not a valid identifier:"
+msgid "Change Argument name"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Name already in use by another func/var/signal:"
+msgid "Set Variable Default Value"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Function"
+msgid "Set Variable Type"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Variable"
+msgid "Functions:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Rename Signal"
+msgid "Variables:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Function"
+msgid "Name is not a valid identifier:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Variable"
+msgid "Name already in use by another func/var/signal:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Add Signal"
+msgid "Rename Function"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Function"
+msgid "Rename Variable"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Variable"
+msgid "Rename Signal"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Variable:"
+msgid "Add Function"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Remove Signal"
+msgid "Add Variable"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Editing Signal:"
+msgid "Add Signal"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
@@ -6620,6 +7287,14 @@ 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 ""
@@ -6660,6 +7335,24 @@ msgid "Add Setter Property"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
+#, fuzzy
+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
+#, fuzzy
+msgid "Connect Nodes"
+msgstr "連接..."
+
+#: modules/visual_script/visual_script_editor.cpp
msgid "Condition"
msgstr ""
@@ -6688,6 +7381,50 @@ msgid "Get"
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 ""
@@ -6708,10 +7445,6 @@ msgid "Edit Variable:"
msgstr ""
#: modules/visual_script/visual_script_editor.cpp
-msgid "Change"
-msgstr ""
-
-#: modules/visual_script/visual_script_editor.cpp
msgid "Delete Selected"
msgstr ""
@@ -6785,14 +7518,6 @@ msgid ""
"(error)."
msgstr ""
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just pressed"
-msgstr ""
-
-#: modules/visual_script/visual_script_nodes.cpp
-msgid "just released"
-msgstr ""
-
#: platform/javascript/export/export.cpp
msgid "Run in Browser"
msgstr ""
@@ -6813,77 +7538,6 @@ msgstr ""
msgid "Could not open template for export:\n"
msgstr ""
-#: platform/uwp/export/export.cpp
-msgid ""
-"Couldn't read the certificate file. Are the path and password both correct?"
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the signature object."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Error creating the package signature."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid ""
-"No export templates found.\n"
-"Download and install export templates."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom debug package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Custom release package not found."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid unique name."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid product GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid publisher GUID."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid background color."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid Store Logo image dimensions (should be 50x50)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 44x44 logo image dimensions (should be 44x44)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 71x71 logo image dimensions (should be 71x71)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 150x150 logo image dimensions (should be 150x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid square 310x310 logo image dimensions (should be 310x310)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid wide 310x150 logo image dimensions (should be 310x150)."
-msgstr ""
-
-#: platform/uwp/export/export.cpp
-msgid "Invalid splash screen image dimensions (should be 620x300)."
-msgstr ""
-
#: scene/2d/animated_sprite.cpp
msgid ""
"A SpriteFrames resource must be created or set in the 'Frames' property in "
@@ -6968,6 +7622,13 @@ msgstr ""
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 ""
@@ -6990,17 +7651,32 @@ msgid ""
"as parent."
msgstr ""
-#: scene/3d/body_shape.cpp
+#: 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 ""
-"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."
+"The controller id must not be 0 or this controller will not be bound to an "
+"actual controller"
msgstr ""
-#: scene/3d/body_shape.cpp
+#: scene/3d/arvr_nodes.cpp
+msgid "ARVRAnchor must have an ARVROrigin node as its parent"
+msgstr ""
+
+#: scene/3d/arvr_nodes.cpp
msgid ""
-"A shape must be provided for CollisionShape to function. Please create a "
-"shape resource for it!"
+"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
@@ -7014,6 +7690,19 @@ msgstr ""
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 ""
@@ -7029,6 +7718,13 @@ 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 ""
@@ -7045,7 +7741,7 @@ msgid ""
msgstr ""
#: scene/gui/color_picker.cpp
-msgid "RAW Mode"
+msgid "Raw Mode"
msgstr ""
#: scene/gui/color_picker.cpp
@@ -7060,25 +7756,9 @@ msgstr ""
msgid "Please Confirm..."
msgstr ""
-#: scene/gui/file_dialog.cpp
-msgid "Open a File"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open File(s)"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a Directory"
-msgstr ""
-
-#: scene/gui/file_dialog.cpp
-msgid "Open a File or Directory"
-msgstr ""
-
#: scene/gui/input_action.cpp
msgid "Ctrl+"
-msgstr ""
+msgstr "Ctrl+"
#: scene/gui/popup.cpp
msgid ""
@@ -7094,7 +7774,7 @@ msgid ""
"minimum size manually."
msgstr ""
-#: scene/main/scene_main_loop.cpp
+#: scene/main/scene_tree.cpp
msgid ""
"Default Environment as specified in Project Setings (Rendering -> Viewport -"
"> Default Environment) could not be loaded."
@@ -7108,6 +7788,14 @@ msgid ""
"texture to some node for display."
msgstr ""
+#~ msgid "Close scene? (Unsaved changes will be lost)"
+#~ msgstr "沒有儲存的變更都會éºå¤±, 確定è¦é—œé–‰?"
+
+#~ msgid ""
+#~ "Open Project Manager? \n"
+#~ "(Unsaved changes will be lost)"
+#~ msgstr "未ä¿å­˜çš„變更將éºå¤±, è¦é–‹å•Ÿå°ˆæ¡ˆç®¡ç†å“¡å—Ž?"
+
#~ msgid ""
#~ "Paths cannot start with '/', absolute paths must start with 'res://', "
#~ "'user://', or 'local://'"
diff --git a/main/SCsub b/main/SCsub
index 1675a6e6ab..1f97cd1be0 100644
--- a/main/SCsub
+++ b/main/SCsub
@@ -1,6 +1,7 @@
#!/usr/bin/env python
Import('env')
+from compat import byte_to_str
def make_splash(target, source, env):
@@ -8,17 +9,17 @@ def make_splash(target, source, env):
src = source[0].srcnode().abspath
dst = target[0].srcnode().abspath
f = open(src, "rb")
- g = open(dst, "wb")
+ g = open(dst, "w")
buf = f.read()
g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n")
g.write("#ifndef BOOT_SPLASH_H\n")
g.write("#define BOOT_SPLASH_H\n")
- g.write("static const Color boot_splash_bg_color = Color(1,1,1,1);\n");
+ g.write("static const Color boot_splash_bg_color = Color(1,1,1,1);\n")
g.write("static const unsigned char boot_splash_png[] = {\n")
for i in range(len(buf)):
- g.write(str(ord(buf[i])) + ",\n")
+ g.write(byte_to_str(buf[i]) + ",\n")
g.write("};\n")
g.write("#endif")
@@ -28,7 +29,7 @@ def make_app_icon(target, source, env):
src = source[0].srcnode().abspath
dst = target[0].srcnode().abspath
f = open(src, "rb")
- g = open(dst, "wb")
+ g = open(dst, "w")
buf = f.read()
@@ -37,7 +38,7 @@ def make_app_icon(target, source, env):
g.write("#define APP_ICON_H\n")
g.write("static const unsigned char app_icon_png[] = {\n")
for i in range(len(buf)):
- g.write(str(ord(buf[i])) + ",\n")
+ g.write(byte_to_str(buf[i]) + ",\n")
g.write("};\n")
g.write("#endif")
diff --git a/main/input_default.cpp b/main/input_default.cpp
index d496717460..b4c9a6207f 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "input_default.h"
+
#include "input_map.h"
#include "os/os.h"
#include "scene/resources/texture.h"
@@ -96,58 +97,6 @@ bool InputDefault::is_joy_button_pressed(int p_device, int p_button) const {
bool InputDefault::is_action_pressed(const StringName &p_action) const {
return action_state.has(p_action) && action_state[p_action].pressed;
-#if 0
- if (custom_action_press.has(p_action))
- return true; //simpler
-
- const List<InputEvent> *alist = InputMap::get_singleton()->get_action_list(p_action);
- if (!alist)
- return false;
-
-
- for (const List<InputEvent>::Element *E=alist->front();E;E=E->next()) {
-
-
- int device=E->get().device;
-
- switch(E->get().type) {
-
- case InputEvent::KEY: {
-
- const InputEventKey &iek=E->get().key;
- if ((keys_pressed.has(iek->get_scancode())))
- return true;
- } break;
- case InputEvent::MOUSE_BUTTON: {
-
- const InputEventMouseButton &iemb=E->get().mouse_button;
- if(mouse_button_mask&(1<<iemb->get_button_index()))
- return true;
- } break;
- case InputEvent::JOYPAD_BUTTON: {
-
- const InputEventJoypadButton &iejb=E->get().joy_button;
- int c = _combine_device(iejb->get_button_index(),device);
- if (joy_buttons_pressed.has(c))
- return true;
- } break;
- case InputEvent::JOYPAD_MOTION: {
-
- const InputEventJoypadMotion &iejm=E->get().joy_motion;
- int c = _combine_device(iejm.axis,device);
- if (_joy_axis.has(c)) {
- if (iejm.axis_value < 0) {
- if (_joy_axis[c] < -0.5f) return true;
- }
- else
- if (_joy_axis[c] > 0.5f) return true;
- }
- } break;
- }
- }
-
- return false;
-#endif
}
bool InputDefault::is_action_just_pressed(const StringName &p_action) const {
diff --git a/main/input_default.h b/main/input_default.h
index 92ef67c7b5..345c34c55e 100644
--- a/main/input_default.h
+++ b/main/input_default.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/main.cpp b/main/main.cpp
index 0c6de4325c..7b2a890a8e 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -69,7 +69,6 @@
#include "core/io/file_access_zip.h"
#include "core/io/stream_peer_ssl.h"
#include "core/io/stream_peer_tcp.h"
-#include "core/os/thread.h"
#include "main/input_default.h"
#include "performance.h"
#include "translation.h"
@@ -112,6 +111,8 @@ static int init_screen = -1;
static bool use_vsync = true;
static bool editor = false;
static bool show_help = false;
+static bool disable_render_loop = false;
+static int fixed_fps = -1;
static OS::ProcessID allow_focus_steal_pid = 0;
@@ -191,6 +192,8 @@ void Main::print_help(const char *p_binary) {
#endif
OS::get_singleton()->print(" --frame-delay <ms> Simulate high CPU load (delay each frame by <ms> milliseconds).\n");
OS::get_singleton()->print(" --time-scale <scale> Force time scale (higher values are faster, 1.0 is normal speed).\n");
+ OS::get_singleton()->print(" --disable-render-loop Disable render loop so rendering only occurs when called explicitly from script.\n");
+ OS::get_singleton()->print(" --fixed-fps <fps> Forces a fixed ratio between process and fixed_process timing, for use when precision is required, or when rendering to video files. Setting this will disable real-time syncronization, so that run speed is only capped by performance\n");
OS::get_singleton()->print("\n");
OS::get_singleton()->print("Standalone tools:\n");
@@ -568,6 +571,16 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS::get_singleton()->print("Missing editor PID argument, aborting.\n");
goto error;
}
+ } else if (I->get() == "--disable-render-loop") {
+ disable_render_loop = true;
+ } else if (I->get() == "--fixed-fps") {
+ if (I->next()) {
+ fixed_fps = I->next()->get().to_int();
+ N = I->next()->next();
+ } else {
+ OS::get_singleton()->print("Missing fixed-fps argument, aborting.\n");
+ goto error;
+ }
} else {
//test for game path
@@ -886,7 +899,11 @@ error:
return ERR_INVALID_PARAMETER;
}
-Error Main::setup2() {
+Error Main::setup2(Thread::ID p_main_tid_override) {
+
+ if (p_main_tid_override) {
+ Thread::_main_thread_id = p_main_tid_override;
+ }
OS::get_singleton()->initialize(video_mode, video_driver_idx, audio_driver_idx);
if (init_use_custom_pos) {
@@ -981,7 +998,7 @@ Error Main::setup2() {
if (bool(GLOBAL_DEF("display/window/handheld/emulate_touchscreen", false))) {
if (!OS::get_singleton()->has_touchscreen_ui_hint() && Input::get_singleton() && !editor) {
//only if no touchscreen ui hint, set emulation
- InputDefault *id = Input::get_singleton()->cast_to<InputDefault>();
+ InputDefault *id = Object::cast_to<InputDefault>(Input::get_singleton());
if (id)
id->set_emulate_touch(true);
}
@@ -1095,10 +1112,20 @@ bool Main::start() {
test = args[i + 1];
} else if (args[i] == "--export") {
editor = true; //needs editor
- _export_preset = args[i + 1];
+ if (i + 1 < args.size()) {
+ _export_preset = args[i + 1];
+ } else {
+ ERR_PRINT("Export preset name not specified");
+ return false;
+ }
} else if (args[i] == "--export-debug") {
editor = true; //needs editor
- _export_preset = args[i + 1];
+ if (i + 1 < args.size()) {
+ _export_preset = args[i + 1];
+ } else {
+ ERR_PRINT("Export preset name not specified");
+ return false;
+ }
export_debug = true;
} else {
// The parameter does not match anything known, don't skip the next argument
@@ -1181,7 +1208,7 @@ bool Main::start() {
StringName instance_type = script_res->get_instance_base_type();
Object *obj = ClassDB::instance(instance_type);
- MainLoop *script_loop = obj ? obj->cast_to<MainLoop>() : NULL;
+ MainLoop *script_loop = Object::cast_to<MainLoop>(obj);
if (!script_loop) {
if (obj)
memdelete(obj);
@@ -1215,7 +1242,7 @@ bool Main::start() {
ERR_FAIL_V(false);
}
- main_loop = ml->cast_to<MainLoop>();
+ main_loop = Object::cast_to<MainLoop>(ml);
if (!main_loop) {
memdelete(ml);
@@ -1227,7 +1254,7 @@ bool Main::start() {
if (main_loop->is_class("SceneTree")) {
- SceneTree *sml = main_loop->cast_to<SceneTree>();
+ SceneTree *sml = Object::cast_to<SceneTree>(main_loop);
#ifdef DEBUG_ENABLED
if (debug_collisions) {
@@ -1421,7 +1448,7 @@ bool Main::start() {
ERR_EXPLAIN("Cannot instance script for autoload, expected 'Node' inheritance, got: " + String(ibt));
ERR_CONTINUE(obj == NULL);
- n = obj->cast_to<Node>();
+ n = Object::cast_to<Node>(obj);
n->set_script(s.get_ref_ptr());
}
@@ -1502,6 +1529,9 @@ bool Main::iteration() {
uint64_t ticks_elapsed = ticks - last_ticks;
double step = (double)ticks_elapsed / 1000000.0;
+ if (fixed_fps != -1)
+ step = 1.0 / fixed_fps;
+
float frame_slice = 1.0 / Engine::get_singleton()->get_iterations_per_second();
Engine::get_singleton()->_frame_step = step;
@@ -1518,7 +1548,7 @@ bool Main::iteration() {
last_ticks = ticks;
- if (step > frame_slice * 8)
+ if (fixed_fps == -1 && step > frame_slice * 8)
step = frame_slice * 8;
time_accum += step;
@@ -1571,7 +1601,7 @@ bool Main::iteration() {
VisualServer::get_singleton()->sync(); //sync if still drawing from previous frames.
- if (OS::get_singleton()->can_draw()) {
+ if (OS::get_singleton()->can_draw() && !disable_render_loop) {
if ((!force_redraw_requested) && OS::get_singleton()->is_in_low_processor_usage_mode()) {
if (VisualServer::get_singleton()->has_changed()) {
@@ -1622,6 +1652,9 @@ bool Main::iteration() {
frames = 0;
}
+ if (fixed_fps != -1)
+ return exit;
+
if (OS::get_singleton()->is_in_low_processor_usage_mode() || !OS::get_singleton()->can_draw())
OS::get_singleton()->delay_usec(16600); //apply some delay to force idle time (results in about 60 FPS max)
else {
diff --git a/main/main.h b/main/main.h
index ca96e397ca..2c1d42a163 100644
--- a/main/main.h
+++ b/main/main.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -34,6 +34,7 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
+#include "core/os/thread.h"
#include "error_list.h"
#include "typedefs.h"
@@ -49,7 +50,7 @@ class Main {
public:
static Error setup(const char *execpath, int argc, char *argv[], bool p_second_phase = true);
- static Error setup2();
+ static Error setup2(Thread::ID p_main_tid_override = 0);
static bool start();
static bool iteration();
static void cleanup();
diff --git a/main/performance.cpp b/main/performance.cpp
index 091c52118c..e85d2bf736 100644
--- a/main/performance.cpp
+++ b/main/performance.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -125,9 +125,7 @@ float Performance::get_monitor(Monitor p_monitor) const {
case OBJECT_NODE_COUNT: {
MainLoop *ml = OS::get_singleton()->get_main_loop();
- if (!ml)
- return 0;
- SceneTree *sml = ml->cast_to<SceneTree>();
+ SceneTree *sml = Object::cast_to<SceneTree>(ml);
if (!sml)
return 0;
return sml->get_node_count();
diff --git a/main/performance.h b/main/performance.h
index 75583c6c38..a9e3c07d7c 100644
--- a/main/performance.h
+++ b/main/performance.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/tests/test_containers.cpp b/main/tests/test_containers.cpp
deleted file mode 100644
index 956be5d169..0000000000
--- a/main/tests/test_containers.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/*************************************************************************/
-/* test_containers.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "test_containers.h"
-
-#include "dvector.h"
-#include "math_funcs.h"
-#include "print_string.h"
-#include "servers/visual/default_mouse_cursor.xpm"
-#include "set.h"
-
-#include "image.h"
-#include "list.h"
-#include "variant.h"
-
-namespace TestContainers {
-
-MainLoop *test() {
-
- /*
- HashMap<int,int> int_map;
-
- for (int i=0;i<68000;i++) {
-
- int num=(int)Math::random(0,1024);
- int_map[i]=num;
- }
- */
-
- {
-
- };
-
-#if 0
- Set<int> set;
-
- print_line("Begin Insert");
- for (int i=0;i<1100;i++) {
-
- int num=i;//(int)Math::random(0,1024);
- //print_line("inserting "+itos(num));
- set.insert( num );
- }
-
- /*
- for (int i=0;i<400;i++) {
-
- int num=(int)Math::random(0,1024);
- set.erase(num);
- }
- */
- //set.print_tree();
-
- for(Set<int>::Element *I=set.front();I;I=I->next()) {
-
- print_line("inserted "+itos(I->get())+" prev is "+itos(I->prev()?I->prev()->get():-100));
-
- }
-
- print_line("depth is "+itos(set.calculate_depth()));
- print_line("Insert Success");
-#endif
-
- return NULL;
-}
-}
diff --git a/main/tests/test_containers.h b/main/tests/test_containers.h
deleted file mode 100644
index 7b589d4057..0000000000
--- a/main/tests/test_containers.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*************************************************************************/
-/* test_containers.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef TEST_CONTAINERS_H
-#define TEST_CONTAINERS_H
-
-#include "os/main_loop.h"
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-
-namespace TestContainers {
-
-MainLoop *test();
-}
-
-#endif
diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp
index 0607360d88..bcf4278bde 100644
--- a/main/tests/test_gdscript.cpp
+++ b/main/tests/test_gdscript.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -1053,16 +1053,6 @@ MainLoop *test(TestType p_type) {
memdelete(fw);
}
-#if 0
- Parser parser;
- Error err = parser.parse(code);
- if (err) {
- print_line("error:"+itos(parser.get_error_line())+":"+itos(parser.get_error_column())+":"+parser.get_error());
- } else {
- print_line("Parse O-K!");
- }
-#endif
-
memdelete(fa);
return NULL;
diff --git a/main/tests/test_gdscript.h b/main/tests/test_gdscript.h
index b4e1665de5..f37b175913 100644
--- a/main/tests/test_gdscript.h
+++ b/main/tests/test_gdscript.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/tests/test_gui.cpp b/main/tests/test_gui.cpp
index 44d4464aac..d9b2873d6b 100644
--- a/main/tests/test_gui.cpp
+++ b/main/tests/test_gui.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -70,32 +70,6 @@ public:
SceneTree::init();
-#if 0
-
-
- Viewport *vp = memnew( Viewport );
- vp->set_world( Ref<World>( memnew( World )));
- get_root()->add_child(vp);
-
- vp->set_rect(Rect2(0,0,256,256));
- vp->set_as_render_target(true);
- vp->set_render_target_update_mode(Viewport::RENDER_TARGET_UPDATE_ALWAYS);
-
-
- Camera *camera = memnew( Camera );
- vp->add_child(camera);
- camera->make_current();
-
- Sprite *sp = memnew( Sprite );
- sp->set_texture( vp->get_render_target_texture() );
- //sp->set_texture( ResourceLoader::load("res://ball.png") );
- sp->set_position(Point2(300,300));
- get_root()->add_child(sp);
-
-
- return;
-#endif
-
Panel *frame = memnew(Panel);
frame->set_anchor(MARGIN_RIGHT, Control::ANCHOR_END);
frame->set_anchor(MARGIN_BOTTOM, Control::ANCHOR_END);
@@ -111,7 +85,6 @@ public:
label->set_position(Point2(80, 90));
label->set_size(Point2(170, 80));
label->set_align(Label::ALIGN_FILL);
- //label->set_text("There");
label->set_text("There was once upon a time a beautiful unicorn that loved to play with little girls...");
frame->add_child(label);
@@ -124,25 +97,6 @@ public:
frame->add_child(button);
-#if 0
- Sprite *tf = memnew( Sprite );
- frame->add_child(tf);
- Image img;
- ImageLoader::load_image("LarvoClub.png",&img);
-
- img.resize(512,512);
- img.generate_mipmaps();
- img.compress(Image::COMPRESS_PVRTC4);
- Ref<ImageTexture> tt = memnew( ImageTexture );
- tt->create_from_image(img);
- tf->set_texture(tt);
- tf->set_position(Point2(50,50));
- //tf->set_scale(Point2(0.3,0.3));
-
-
- return;
-#endif
-
Tree *tree = memnew(Tree);
tree->set_columns(2);
@@ -182,9 +136,6 @@ public:
frame->add_child(tree);
- //control = memnew( Control );
- //root->add_child( control );
-
LineEdit *line_edit = memnew(LineEdit);
line_edit->set_position(Point2(30, 190));
@@ -244,36 +195,6 @@ public:
frame->add_child(options);
- /*
- Tree * tree = memnew( Tree );
- tree->set_columns(2);
-
- tree->set_position( Point2( 230,210 ) );
- tree->set_size( Point2( 150,250 ) );
-
-
- TreeItem *item = tree->create_item();
- item->set_editable(0,true);
- item->set_text(0,"root");
- item = tree->create_item( tree->get_root() );
- item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
- item->set_editable(0,true);
- item->set_text(0,"check");
- item = tree->create_item( tree->get_root() );
- item->set_cell_mode(0, TreeItem::CELL_MODE_RANGE);
- item->set_editable(0,true);
- item->set_range_config(0,0,20,0.1);
- item->set_range(0,2);
- item->add_button(0,Theme::get_default()->get_icon("folder","FileDialog"));
- item = tree->create_item( tree->get_root() );
- item->set_cell_mode(0, TreeItem::CELL_MODE_RANGE);
- item->set_editable(0,true);
- item->set_text(0,"Have,Many,Several,Options!");
- item->set_range(0,2);
-
- frame->add_child(tree);
-*/
-
RichTextLabel *richtext = memnew(RichTextLabel);
richtext->set_position(Point2(600, 210));
@@ -306,18 +227,10 @@ public:
richtext->add_text("keep writing a lot of text");
richtext->pop();
richtext->add_text(" so the label control overflows and the scrollbar appears.\n");
- //richtext->push_indent(1);
- //richtext->add_text("By the way, testing indent levels! Yohohoho! Everything should appear to the right sightly here!\n");
- //richtext->pop();
richtext->push_meta("http://www.scrollingcapabilities.xz");
richtext->add_text("This allows to test for the scrolling capabilities ");
richtext->pop();
richtext->add_text("of the rich text label for huge text (not like this text will really be huge but, you know).\nAs long as it is so long that it will work nicely for a test/demo, then it's welcomed in my book...\nChanging subject, the day is cloudy today and I'm wondering if I'll get che chance to travel somewhere nice. Sometimes, watching the clouds from satellite images may give a nice insight about how pressure zones in our planet work, althogh it also makes it pretty obvious to see why most weather forecasts get it wrong so often.\nClouds are so difficult to predict!\nBut it's pretty cool how our civilization has adapted to having water falling from the sky each time it rains...");
- //richtext->add_text("Hello!\nGorgeous..");
-
- //richtext->push_meta("http://www.scrollingcapabilities.xz");
- ///richtext->add_text("Hello!\n");
- //richtext->pop();
TabContainer *tabc = memnew(TabContainer);
@@ -346,21 +259,6 @@ public:
tabc->set_position(Point2(400, 210));
tabc->set_size(Point2(180, 250));
-
- /*Ref<ImageTexture> text = memnew( ImageTexture );
- text->load("test_data/concave.png");
-
- Sprite* sprite = memnew(Sprite);
- sprite->set_texture(text);
- sprite->set_position(Point2(300, 300));
- frame->add_child(sprite);
- sprite->show();
-
- Sprite* sprite2 = memnew(Sprite);
- sprite->set_texture(text);
- sprite->add_child(sprite2);
- sprite2->set_position(Point2(50, 50));
- sprite2->show();*/
}
};
diff --git a/main/tests/test_gui.h b/main/tests/test_gui.h
index 881ff96956..a5c5695980 100644
--- a/main/tests/test_gui.h
+++ b/main/tests/test_gui.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/tests/test_image.cpp b/main/tests/test_image.cpp
index 0b120f87d5..b94d93b2b1 100644
--- a/main/tests/test_image.cpp
+++ b/main/tests/test_image.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/tests/test_image.h b/main/tests/test_image.h
index 3b1783ded7..254bccea85 100644
--- a/main/tests/test_image.h
+++ b/main/tests/test_image.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/tests/test_io.cpp b/main/tests/test_io.cpp
index f7c49c9249..f96c5cfe3c 100644
--- a/main/tests/test_io.cpp
+++ b/main/tests/test_io.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -112,66 +112,6 @@ MainLoop *test() {
FileAccess::make_default<FileAccessMemory>(FileAccess::ACCESS_USERDATA);
print_line("archive test");
-#if 0
- Archive arch;
-
- Archive::get_singleton()->add_package("a_package");
- FileAccessArchive f;
-
- print_line("opening for read");
- f._open("file.txt", FileAccess::READ);
- int pos = f.get_pos();
- printf("file has %i bytes, initial pos %i\n", (int)f.get_len(), pos);
-
- do {
- printf("%c", f.get_8());
-
- } while (!f.eof_reached());
-
- print_line("opening for stored seek");
- f.open("seek.bin", FileAccess::READ);
- pos = f.get_pos();
- printf("byte at pos %i is %i\n", pos, (int)f.get_8());
- f.seek(128);
- pos = f.get_pos();
- printf("byte at pos %i is %i\n", pos, (int)f.get_8());
-
- print_line("opening for deflated seek");
- f.open("seek_deflated.bin", FileAccess::READ);
- pos = f.get_pos();
- printf("byte at pos %i is %i\n", pos, (int)f.get_8());
- f.seek(128);
- pos = f.get_pos();
- printf("byte at pos %i is %i\n", pos, (int)f.get_8());
- pos = f.get_pos();
- printf("byte at pos %i is %i\n", pos, (int)f.get_8());
- pos = f.get_pos();
- printf("byte at pos %i is %i\n", pos, (int)f.get_8());
- f.seek(256);
- pos = f.get_pos();
- printf("byte at pos %i is %i\n", pos, (int)f.get_8());
- pos = f.get_pos();
- printf("byte at pos %i is %i\n", pos, (int)f.get_8());
- pos = f.get_pos();
- printf("byte at pos %i is %i\n", pos, (int)f.get_8());
- f.seek(4);
- pos = f.get_pos();
- printf("byte at pos %i is %i\n", pos, (int)f.get_8());
- pos = f.get_pos();
- printf("byte at pos %i is %i\n", pos, (int)f.get_8());
- pos = f.get_pos();
- printf("byte at pos %i is %i\n", pos, (int)f.get_8());
-
- f.close();
-
- DirAccessArchive d;
- String dir = "../blah1/blah2/blahask/../blah3/.//blah4/";
- printf("changing dir to %s\n", dir.utf8().get_data());
- d.change_dir(dir);
- printf("current dir is %s\n", d.get_current_dir().utf8().get_data());
-
- FileAccessMemory::cleanup();
-#endif
};
print_line("test done");
diff --git a/main/tests/test_io.h b/main/tests/test_io.h
index 765c083955..ffb834b894 100644
--- a/main/tests/test_io.h
+++ b/main/tests/test_io.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/tests/test_main.cpp b/main/tests/test_main.cpp
index f3ed4604e1..645db2826e 100644
--- a/main/tests/test_main.cpp
+++ b/main/tests/test_main.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -32,19 +32,17 @@
#ifdef DEBUG_ENABLED
-#include "test_containers.h"
+#include "test_gdscript.h"
#include "test_gui.h"
+#include "test_image.h"
+#include "test_io.h"
#include "test_math.h"
+#include "test_ordered_hash_map.h"
#include "test_physics.h"
#include "test_physics_2d.h"
#include "test_render.h"
-#include "test_sound.h"
-#include "test_string.h"
-
-#include "test_gdscript.h"
-#include "test_image.h"
-#include "test_io.h"
#include "test_shader_lang.h"
+#include "test_string.h"
const char **tests_get_names() {
@@ -71,11 +69,6 @@ MainLoop *test_main(String p_test, const List<String> &p_args) {
return TestString::test();
}
- if (p_test == "containers") {
-
- return TestContainers::test();
- }
-
if (p_test == "math") {
return TestMath::test();
@@ -103,11 +96,6 @@ MainLoop *test_main(String p_test, const List<String> &p_args) {
}
#endif
- //if (p_test=="sound") {
-
- // return TestSound::test();
- //}
-
if (p_test == "io") {
return TestIO::test();
@@ -143,6 +131,11 @@ MainLoop *test_main(String p_test, const List<String> &p_args) {
return TestImage::test();
}
+ if (p_test == "ordered_hash_map") {
+
+ return TestOrderedHashMap::test();
+ }
+
return NULL;
}
diff --git a/main/tests/test_main.h b/main/tests/test_main.h
index da890a4b96..0a50e3c7be 100644
--- a/main/tests/test_main.h
+++ b/main/tests/test_main.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/tests/test_math.cpp b/main/tests/test_math.cpp
index d21be24dab..3ba8ef51b4 100644
--- a/main/tests/test_math.cpp
+++ b/main/tests/test_math.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -205,54 +205,12 @@ class GetClassAndNamespace {
case 'r':
res = 13;
break;
- /* too much, not needed for now
- case 'u': {
- //hexnumbarh - oct is deprecated
-
-
- for(int j=0;j<4;j++) {
- CharType c = code[idx+j+1];
- if (c==0) {
- r_err_str="Unterminated String";
- return ERR_PARSE_ERROR;
- }
- if (!((c>='0' && c<='9') || (c>='a' && c<='f') || (c>='A' && c<='F'))) {
-
- r_err_str="Malformed hex constant in string";
- return ERR_PARSE_ERROR;
- }
- CharType v;
- if (c>='0' && c<='9') {
- v=c-'0';
- } else if (c>='a' && c<='f') {
- v=c-'a';
- v+=10;
- } else if (c>='A' && c<='F') {
- v=c-'A';
- v+=10;
- } else {
- ERR_PRINT("BUG");
- v=0;
- }
-
- res<<=4;
- res|=v;
-
-
- }
- idx+=4; //will add at the end anyway
-
-
- } break;*/
case '\"': res = '\"'; break;
case '\\':
res = '\\';
break;
- //case '/': res='/'; break;
default: {
res = next;
- //r_err_str="Invalid escape sequence";
- //return ERR_PARSE_ERROR;
} break;
}
@@ -413,23 +371,6 @@ void test_vec(Plane p_vec) {
print_line("out: " + v0);
v0.normal.z = (v0.d / 100.0 * 2.0 - 1.0) * v0.d;
print_line("out_F: " + v0);
-
- /*v0: 0, 0, -0.1, 0.1
-v1: 0, 0, 0, 0.1
-fix: 0, 0, 0, 0.1
-v0: 0, 0, 1.302803, 1.5
-v1: 0, 0, 1.401401, 1.5
-fix: 0, 0, 1.401401, 1.5
-v0: 0, 0, 25.851850, 26
-v1: 0, 0, 25.925926, 26
-fix: 0, 0, 25.925924, 26
-v0: 0, 0, 49.899902, 50
-v1: 0, 0, 49.949947, 50
-fix: 0, 0, 49.949951, 50
-v0: 0, 0, 100, 100
-v1: 0, 0, 100, 100
-fix: 0, 0, 100, 100
-*/
}
uint32_t ihash(uint32_t a) {
@@ -469,10 +410,9 @@ MainLoop *test() {
const float pow2to9 = 512.0f;
const float B = 15.0f;
- //const float Emax = 31.0f;
const float N = 9.0f;
- float sharedexp = 65408.000f; //(( pow2to9 - 1.0f)/ pow2to9)*powf( 2.0f, 31.0f - 15.0f);
+ float sharedexp = 65408.000f;
float cRed = MAX(0.0f, MIN(sharedexp, r));
float cGreen = MAX(0.0f, MIN(sharedexp, g));
@@ -480,8 +420,6 @@ MainLoop *test() {
float cMax = MAX(cRed, MAX(cGreen, cBlue));
- // expp = MAX(-B - 1, log2(maxc)) + 1 + B
-
float expp = MAX(-B - 1.0f, floor(Math::log(cMax) / Math_LN2)) + 1.0f + B;
float sMax = (float)floor((cMax / Math::pow(2.0f, expp - B - N)) + 0.5f);
@@ -591,8 +529,6 @@ MainLoop *test() {
hashes.push_back(hashes.size());
}
- //hashes.resize(50);
-
for (int i = nearest_shift(hashes.size()); i < 20; i++) {
bool success = true;
@@ -625,7 +561,6 @@ MainLoop *test() {
}
{
- //print_line("NUM: "+itos(237641278346127));
print_line("NUM: " + itos(-128));
return NULL;
}
@@ -635,14 +570,12 @@ MainLoop *test() {
v.normalize();
float a = 0.3;
- //Quat q(v,a);
Basis m(v, a);
Vector3 v2(7, 3, 1);
v2.normalize();
float a2 = 0.8;
- //Quat q(v,a);
Basis m2(v2, a2);
Quat q = m;
@@ -749,86 +682,6 @@ MainLoop *test() {
print_line("scalar /=: " + v);
}
-#if 0
- print_line(String("C:\\momo\\.\\popo\\..\\gongo").simplify_path());
- print_line(String("res://../popo/..//gongo").simplify_path());
- print_line(String("res://..").simplify_path());
-
-
- PoolVector<uint8_t> a;
- PoolVector<uint8_t> b;
-
- a.resize(20);
- b=a;
- b.resize(30);
- a=b;
-#endif
-
-#if 0
- String za = String::utf8("á");
- printf("unicode: %x\n",za[0]);
- CharString cs=za.utf8();
- for(int i=0;i<cs.size();i++) {
- uint32_t v = uint8_t(cs[i]);
- printf("%i - %x\n",i,v);
- }
- return NULL;
-
- print_line(String("C:\\window\\system\\momo").path_to("C:\\window\\momonga"));
- print_line(String("res://momo/sampler").path_to("res://pindonga"));
- print_line(String("/margarito/terere").path_to("/margarito/pilates"));
- print_line(String("/algo").path_to("/algo"));
- print_line(String("c:").path_to("c:\\"));
- print_line(String("/").path_to("/"));
-
-
- print_line(itos(sizeof(Variant)));
- return NULL;
-
- Vector<StringName> path;
- path.push_back("three");
- path.push_back("two");
- path.push_back("one");
- path.push_back("comeon");
- path.revert();
-
- NodePath np(path,true);
-
- print_line(np);
-
-
- return NULL;
-
- bool a=2;
-
- print_line(Variant(a));
-
-
- Transform2D mat2_1;
- mat2_1.rotate(0.5);
- Transform2D mat2_2;
- mat2_2.translate(Vector2(1,2));
- Transform2D mat2_3 = mat2_1 * mat2_2;
- mat2_3.affine_invert();
-
- print_line(mat2_3.elements[0]);
- print_line(mat2_3.elements[1]);
- print_line(mat2_3.elements[2]);
-
-
-
- Transform mat3_1;
- mat3_1.basis.rotate(Vector3(0,0,1),0.5);
- Transform mat3_2;
- mat3_2.translate(Vector3(1,2,0));
- Transform mat3_3 = mat3_1 * mat3_2;
- mat3_3.affine_invert();
-
- print_line(mat3_3.basis.get_axis(0));
- print_line(mat3_3.basis.get_axis(1));
- print_line(mat3_3.origin);
-
-#endif
return NULL;
}
}
diff --git a/main/tests/test_math.h b/main/tests/test_math.h
index 24fd442dd0..a0328a14d0 100644
--- a/main/tests/test_math.h
+++ b/main/tests/test_math.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/tests/test_ordered_hash_map.cpp b/main/tests/test_ordered_hash_map.cpp
new file mode 100644
index 0000000000..89f4bf8593
--- /dev/null
+++ b/main/tests/test_ordered_hash_map.cpp
@@ -0,0 +1,171 @@
+/*************************************************************************/
+/* test_ordered_hash_map.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* http://www.godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+
+#include "ordered_hash_map.h"
+#include "os/os.h"
+#include "pair.h"
+#include "vector.h"
+
+namespace TestOrderedHashMap {
+
+bool test_insert() {
+ OrderedHashMap<int, int> map;
+ OrderedHashMap<int, int>::Element e = map.insert(42, 84);
+
+ return e && e.key() == 42 && e.get() == 84 && e.value() == 84 && map[42] == 84 && map.has(42) && map.find(42);
+}
+
+bool test_insert_overwrite() {
+ OrderedHashMap<int, int> map;
+ map.insert(42, 84);
+ map.insert(42, 1234);
+
+ return map[42] == 1234;
+}
+
+bool test_erase_via_element() {
+ OrderedHashMap<int, int> map;
+ OrderedHashMap<int, int>::Element e = map.insert(42, 84);
+
+ map.erase(e);
+ return !e && !map.has(42) && !map.find(42);
+}
+
+bool test_erase_via_key() {
+ OrderedHashMap<int, int> map;
+ map.insert(42, 84);
+ map.erase(42);
+ return !map.has(42) && !map.find(42);
+}
+
+bool test_size() {
+ OrderedHashMap<int, int> map;
+ map.insert(42, 84);
+ map.insert(123, 84);
+ map.insert(123, 84);
+ map.insert(0, 84);
+ map.insert(123485, 84);
+
+ return map.size() == 4;
+}
+
+bool test_iteration() {
+ OrderedHashMap<int, int> map;
+ map.insert(42, 84);
+ map.insert(123, 12385);
+ map.insert(0, 12934);
+ map.insert(123485, 1238888);
+ map.insert(123, 111111);
+
+ Vector<Pair<int, int> > expected;
+ expected.push_back(Pair<int, int>(42, 84));
+ expected.push_back(Pair<int, int>(123, 111111));
+ expected.push_back(Pair<int, int>(0, 12934));
+ expected.push_back(Pair<int, int>(123485, 1238888));
+
+ int idx = 0;
+ for (OrderedHashMap<int, int>::Element E = map.front(); E; E = E.next()) {
+ if (expected[idx] != Pair<int, int>(E.key(), E.value())) {
+ return false;
+ }
+ ++idx;
+ }
+ return true;
+}
+
+bool test_const_iteration(const OrderedHashMap<int, int> &map) {
+ Vector<Pair<int, int> > expected;
+ expected.push_back(Pair<int, int>(42, 84));
+ expected.push_back(Pair<int, int>(123, 111111));
+ expected.push_back(Pair<int, int>(0, 12934));
+ expected.push_back(Pair<int, int>(123485, 1238888));
+
+ int idx = 0;
+ for (OrderedHashMap<int, int>::ConstElement E = map.front(); E; E = E.next()) {
+ if (expected[idx] != Pair<int, int>(E.key(), E.value())) {
+ return false;
+ }
+ ++idx;
+ }
+ return true;
+}
+
+bool test_const_iteration() {
+ OrderedHashMap<int, int> map;
+ map.insert(42, 84);
+ map.insert(123, 12385);
+ map.insert(0, 12934);
+ map.insert(123485, 1238888);
+ map.insert(123, 111111);
+
+ return test_const_iteration(map);
+}
+
+typedef bool (*TestFunc)(void);
+
+TestFunc test_funcs[] = {
+
+ test_insert,
+ test_insert_overwrite,
+ test_erase_via_element,
+ test_erase_via_key,
+ test_size,
+ test_iteration,
+ test_const_iteration,
+ 0
+
+};
+
+MainLoop *test() {
+
+ int count = 0;
+ int passed = 0;
+
+ while (true) {
+ if (!test_funcs[count])
+ break;
+ bool pass = test_funcs[count]();
+ if (pass)
+ passed++;
+ OS::get_singleton()->print("\t%s\n", pass ? "PASS" : "FAILED");
+
+ count++;
+ }
+
+ OS::get_singleton()->print("\n\n\n");
+ OS::get_singleton()->print("*************\n");
+ OS::get_singleton()->print("***TOTALS!***\n");
+ OS::get_singleton()->print("*************\n");
+
+ OS::get_singleton()->print("Passed %i of %i tests\n", passed, count);
+
+ return NULL;
+}
+} // namespace TestOrderedHashMap \ No newline at end of file
diff --git a/main/tests/test_sound.h b/main/tests/test_ordered_hash_map.h
index f55f25fa18..0cde250f56 100644
--- a/main/tests/test_sound.h
+++ b/main/tests/test_ordered_hash_map.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* test_sound.h */
+/* test_ordered_hash_map.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -27,14 +27,12 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef TEST_SOUND_H
-#define TEST_SOUND_H
+#ifndef TEST_ORDERED_HASH_MAP_H
+#define TEST_ORDERED_HASH_MAP_H
-#include "os/main_loop.h"
-
-namespace TestSound {
+namespace TestOrderedHashMap {
MainLoop *test();
}
-#endif // TEST_SOUND_H
+#endif
diff --git a/main/tests/test_physics.cpp b/main/tests/test_physics.cpp
index 5a233e818e..f149821928 100644
--- a/main/tests/test_physics.cpp
+++ b/main/tests/test_physics.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -71,7 +71,6 @@ class TestPhysicsMainLoop : public MainLoop {
PhysicsDirectBodyState *state = (PhysicsDirectBodyState *)p_state;
VisualServer *vs = VisualServer::get_singleton();
Transform t = state->get_transform();
- //t.basis.scale( Vector3(1.0,0.5,0.2) );
vs->instance_set_transform(p_visual_instance, t);
}
@@ -208,7 +207,6 @@ protected:
d[VS::ARRAY_VERTEX] = p_faces;
d[VS::ARRAY_NORMAL] = normals;
vs->mesh_add_surface_from_arrays(trimesh_mesh, VS::PRIMITIVE_TRIANGLES, d);
- //vs->material_set_flag( trimesh_mat, VisualServer::MATERIAL_FLAG_UNSHADED,true);
RID triins = vs->instance_create2(trimesh_mesh, scenario);
@@ -219,9 +217,6 @@ protected:
Transform tritrans = p_xform;
ps->body_set_state(tribody, PhysicsServer::BODY_STATE_TRANSFORM, tritrans);
vs->instance_set_transform(triins, tritrans);
- //RID trimesh_material = vs->fixed_material_create();
- //vs->material_generate( trimesh_material, Color(0.2,0.4,0.6) );
- //vs->mesh_surface_set_material( trimesh_mesh, 0, trimesh_material );
}
void make_grid(int p_width, int p_height, float p_cellsize, float p_cellheight, const Transform &p_xform = Transform()) {
@@ -305,7 +300,6 @@ public:
/* LIGHT */
RID lightaux = vs->light_create(VisualServer::LIGHT_DIRECTIONAL);
- //vs->light_set_color( lightaux, VisualServer::LIGHT_COLOR_AMBIENT, Color(0.0,0.0,0.0) );
scenario = vs->scenario_create();
vs->light_set_shadow(lightaux, true);
light = vs->instance_create2(lightaux, scenario);
@@ -327,100 +321,14 @@ public:
vs->camera_set_perspective(camera, 60, 0.1, 40.0);
vs->camera_set_transform(camera, Transform(Basis(), Vector3(0, 9, 12)));
- //vs->scenario_set_debug(scenario,VS::SCENARIO_DEBUG_WIREFRAME);
Transform gxf;
gxf.basis.scale(Vector3(1.4, 0.4, 1.4));
gxf.origin = Vector3(-2, 1, -2);
make_grid(5, 5, 2.5, 1, gxf);
- //create_body(PhysicsServer::SHAPE_BOX,PhysicsServer::BODY_MODE_STATIC,gxf);
- //create_static_plane( Plane( Vector3(0,1,0), -2) );
- //test_joint();
test_fall();
- //test_joint();
-
- /*
- Vector<Vector3> faces;
- faces.push_back( Vector3(10,0,-5) );
- faces.push_back( Vector3(0,0,10) );
- faces.push_back( Vector3(-10,-0.2,-5) );
- make_trimesh(faces);
-*/
- /* Make Trimesh */
quit = false;
return;
-
-#if 0
-#define GRID_SIZE 5
-
- float grid[GRID_SIZE][GRID_SIZE];
-
- for (int i=0;i<GRID_SIZE;i++) {
-
- for (int j=0;j<GRID_SIZE;j++) {
-
- grid[j][i]=Math::random(0.0, 1.0 );
- }
- }
-
- Vector<Vector3> faces;
-
- for (int i=1;i<GRID_SIZE;i++) {
-
- for (int j=1;j<GRID_SIZE;j++) {
-
-#define MAKE_VERTEX(m_x, m_z) \
- faces.push_back(Vector3(m_x - GRID_SIZE / 2.0, grid[m_x][m_z], m_z - GRID_SIZE / 2.0) * 3.0)
-
- MAKE_VERTEX(i,j-1);
- MAKE_VERTEX(i,j);
- MAKE_VERTEX(i-1,j);
-
- MAKE_VERTEX(i-1,j-1);
- MAKE_VERTEX(i,j-1);
- MAKE_VERTEX(i-1,j);
-
- }
- }
- /*
- faces.clear();
- faces.push_back( Vector3(0,0,-5) );
- faces.push_back( Vector3(1,0,-1) );
- faces.push_back( Vector3(-1,-0,-1) );
- */
-
- RID trimesh_shape = ps->shape_create();
- ps->shape_set_data(trimesh_shape, PhysicsServer::SHAPE_CONCAVE_POLYGON,faces);
- faces=ps->shape_get_shape(trimesh_shape, 0);
- Vector<Vector3> normals; // for drawing
- for (int i=0;i<faces.size()/3;i++) {
-
- Plane p( faces[i*3+0],faces[i*3+1], faces[i*3+2] );
- normals.push_back(p.normal);
- normals.push_back(p.normal);
- normals.push_back(p.normal);
- }
-
- RID trimesh_mesh = vs->mesh_create();
- vs->mesh_add_surface(trimesh_mesh, VS::PRIMITIVE_TRIANGLES, VS::ARRAY_FORMAT_VERTEX|VS::ARRAY_FORMAT_NORMAL, faces.size() );
- vs->mesh_surface_set_array(trimesh_mesh,0,VS::ARRAY_VERTEX, faces );
- vs->mesh_surface_set_array(trimesh_mesh,0,VS::ARRAY_NORMAL, normals );
- RID trimesh_mat = vs->fixed_material_create();
- vs->material_generate( trimesh_mat, Color(1.0,0.5,0.3) );
- vs->mesh_surface_set_material( trimesh_mesh, 0, trimesh_mat );
-
- RID triins = vs->instance_create2(trimesh_mesh);
-
-
-
- RID tribody = ps->body_create( PhysicsServer::BODY_MODE_STATIC, trimesh_shape);
- Transform tritrans = Transform( Basis(), Vector3(0,0,-2) );
- ps->body_set_state( tribody, PhysicsServer::BODY_STATE_TRANSFORM, tritrans );
- vs->instance_set_transform( triins, tritrans );
- RID trimesh_material = vs->fixed_material_create();
- vs->material_generate( trimesh_material, Color(0.2,0.4,0.6) );
- vs->mesh_surface_set_material( trimesh_mesh, 0, trimesh_material );
-#endif
}
virtual bool iteration(float p_time) {
@@ -445,58 +353,9 @@ public:
}
void test_joint() {
-#if 0
- PhysicsServer * ps = PhysicsServer::get_singleton();
-
- mover = create_body(PhysicsServer::SHAPE_BOX,PhysicsServer::BODY_MODE_STATIC,Transform(Basis(),Vector3(0,0,-24)));
- RID b = create_body(PhysicsServer::SHAPE_CAPSULE,PhysicsServer::BODY_MODE_RIGID,Transform());
-
- ps->joint_create_double_pin(b,Vector3(0,0,1.0),mover,Vector3(0,0,0));
- ps->body_add_collision_exception(mover,b);
-
-
- List<String> cmdline = OS::get_singleton()->get_cmdline_args();
- int link_count = LINK_COUNT;
- if (cmdline.size() > 0 && cmdline[cmdline.size()-1].to_int()) {
- link_count = cmdline[cmdline.size()-1].to_int();
- };
-
- for(int i=0;i<link_count;i++) {
-
- RID c = create_body(PhysicsServer::SHAPE_CAPSULE,PhysicsServer::BODY_MODE_RIGID,Transform());
- ps->joint_create_double_pin(b,Vector3(0,0,-0.7),c,Vector3(0,0,0.7));
- ps->body_add_collision_exception(c,b);
- b=c;
- }
-
-
- create_static_plane(Plane(Vector3(0,1,0),-8));
-#endif
}
void test_hinge() {
-#if 0
- PhysicsServer * ps = PhysicsServer::get_singleton();
-
-
- mover = create_body(PhysicsServer::SHAPE_BOX,PhysicsServer::BODY_MODE_STATIC,Transform(Basis(),Vector3(0,0,-24)));
- RID b = create_body(PhysicsServer::SHAPE_BOX,PhysicsServer::BODY_MODE_RIGID,Transform());
-
- ps->joint_create_double_hinge(b,Transform(Basis(),Vector3(1,1,1.0)),mover,Transform(Basis(),Vector3(0,0,0)));
- ps->body_add_collision_exception(mover,b);
-
-/*
- for(int i=0;i<20;i++) {
-
- RID c = create_body(PhysicsServer::SHAPE_CAPSULE,PhysicsServer::BODY_MODE_RIGID,Transform());
- ps->joint_create_double_hinge(b,Transform(Basis(),Vector3(0,0,-0.7)),c,Transform(Basis(),Vector3(0,0,0.7)));
- ps->body_add_collision_exception(c,b);
- b=c;
- }
-
-*/
- //create_static_plane(Plane(Vector3(0,1,0),-8));
-#endif
}
void test_character() {
@@ -544,35 +403,21 @@ public:
};
PhysicsServer::ShapeType type = shape_idx[i % 4];
- //type=PhysicsServer::SHAPE_CONVEX_POLYGON;
Transform t;
t.origin = Vector3(0.0 * i, 3.5 + 1.1 * i, 0.7 + 0.0 * i);
- //t.origin=Vector3(-0.7+0.0*i,0.5+4.1*i,0);
t.basis.rotate(Vector3(0.2, -1, 0), Math_PI / 2 * 0.6);
- //t.basis.rotate(Vector3(0,-1,0),Math_PI/4*i);
- //t.basis.rotate(Vector3(0,-1,0),Math_PI/4*i);
- //t.basis.rotate(Vector3(-1,0,0),Math_PI/4*i);
create_body(type, PhysicsServer::BODY_MODE_RIGID, t);
- //RID b = create_body(type,i==0?PhysicsServer::BODY_MODE_STATIC:PhysicsServer::BODY_MODE_RIGID,t);
}
create_static_plane(Plane(Vector3(0, 1, 0), -1));
-
- /*
- create_static_plane( Plane( Vector3(1,0,0), -2) );
- create_static_plane( Plane( Vector3(-1,0,0), -2) );
- create_static_plane( Plane( Vector3(0,0,1), -2) );
- create_static_plane( Plane( Vector3(0,0,-1), -2) );
-*/
}
void test_activate() {
create_body(PhysicsServer::SHAPE_BOX, PhysicsServer::BODY_MODE_RIGID, Transform(Basis(), Vector3(0, 2, 0)), true);
- //create_body(PhysicsServer::SHAPE_SPHERE,PhysicsServer::BODY_MODE_RIGID,Transform(Basis(),Vector3(0,6,0)),true);
create_static_plane(Plane(Vector3(0, 1, 0), -1));
}
diff --git a/main/tests/test_physics.h b/main/tests/test_physics.h
index 9c9f2fa883..166bc87b4b 100644
--- a/main/tests/test_physics.h
+++ b/main/tests/test_physics.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/tests/test_physics_2d.cpp b/main/tests/test_physics_2d.cpp
index 2c9b51aadb..a746973799 100644
--- a/main/tests/test_physics_2d.cpp
+++ b/main/tests/test_physics_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/tests/test_physics_2d.h b/main/tests/test_physics_2d.h
index e2022cb1f9..572429185f 100644
--- a/main/tests/test_physics_2d.h
+++ b/main/tests/test_physics_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/tests/test_render.cpp b/main/tests/test_render.cpp
index 74f7453d1b..1f6217928d 100644
--- a/main/tests/test_render.cpp
+++ b/main/tests/test_render.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/tests/test_render.h b/main/tests/test_render.h
index d7849c45ca..84b882de06 100644
--- a/main/tests/test_render.h
+++ b/main/tests/test_render.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/tests/test_shader_lang.cpp b/main/tests/test_shader_lang.cpp
index f9516dad99..ddb2ed5e75 100644
--- a/main/tests/test_shader_lang.cpp
+++ b/main/tests/test_shader_lang.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -37,7 +37,6 @@
#include "scene/gui/control.h"
#include "scene/gui/text_edit.h"
#include "servers/visual/shader_language.h"
-//#include "drivers/gles2/shader_compiler_gles2.h"
typedef ShaderLanguage SL;
@@ -317,8 +316,9 @@ MainLoop *test() {
SL sl;
print_line("tokens:\n\n" + sl.token_debug(code));
- Map<StringName, Map<StringName, SL::DataType> > dt;
- dt["fragment"]["ALBEDO"] = SL::TYPE_VEC3;
+ Map<StringName, SL::FunctionInfo> dt;
+ dt["fragment"].built_ins["ALBEDO"] = SL::TYPE_VEC3;
+ dt["fragment"].can_discard = true;
Set<String> rm;
rm.insert("popo");
diff --git a/main/tests/test_shader_lang.h b/main/tests/test_shader_lang.h
index 7d871b72e7..203f3ffa87 100644
--- a/main/tests/test_shader_lang.h
+++ b/main/tests/test_shader_lang.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/tests/test_string.cpp b/main/tests/test_string.cpp
index 0ff84a8286..88d7702acc 100644
--- a/main/tests/test_string.cpp
+++ b/main/tests/test_string.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/main/tests/test_string.h b/main/tests/test_string.h
index 1060adbc8d..9c97b13626 100644
--- a/main/tests/test_string.h
+++ b/main/tests/test_string.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/methods.py b/methods.py
index 30a1f3caed..ec7e658a3b 100644
--- a/methods.py
+++ b/methods.py
@@ -1,4 +1,5 @@
import os
+from compat import iteritems
def add_source_files(self, sources, filetype, lib_env=None, shared=False):
@@ -21,7 +22,7 @@ def add_source_files(self, sources, filetype, lib_env=None, shared=False):
def build_shader_header(target, source, env):
for x in source:
- print x
+ print(x)
name = str(x)
name = name[name.rfind("/") + 1:]
@@ -704,11 +705,11 @@ def include_file_in_legacygl_header(filename, header_data, depth):
if (not included_file in header_data.vertex_included_files and header_data.reading == "vertex"):
header_data.vertex_included_files += [included_file]
if(include_file_in_legacygl_header(included_file, header_data, depth + 1) == None):
- print "Error in file '" + filename + "': #include " + includeline + "could not be found!"
+ print("Error in file '" + filename + "': #include " + includeline + "could not be found!")
elif (not included_file in header_data.fragment_included_files and header_data.reading == "fragment"):
header_data.fragment_included_files += [included_file]
if(include_file_in_legacygl_header(included_file, header_data, depth + 1) == None):
- print "Error in file '" + filename + "': #include " + includeline + "could not be found!"
+ print("Error in file '" + filename + "': #include " + includeline + "could not be found!")
line = fs.readline()
@@ -1145,12 +1146,6 @@ def build_legacygl_headers(target, source, env):
return 0
-def build_gles2_headers(target, source, env):
-
- for x in source:
- build_legacygl_header(str(x), include="drivers/gles2/shader_gles2.h", class_suffix="GLES2", output_attribs=True)
-
-
def build_gles3_headers(target, source, env):
for x in source:
@@ -1166,7 +1161,7 @@ def update_version():
print("Using custom revision: " + rev)
import version
- f = open("core/version_generated.gen.h", "wb")
+ f = open("core/version_generated.gen.h", "w")
f.write("#define VERSION_SHORT_NAME " + str(version.short_name) + "\n")
f.write("#define VERSION_NAME " + str(version.name) + "\n")
f.write("#define VERSION_MAJOR " + str(version.major) + "\n")
@@ -1179,14 +1174,14 @@ def update_version():
f.write("#define VERSION_YEAR " + str(datetime.datetime.now().year) + "\n")
f.close()
- fhash = open("core/version_hash.gen.h", "wb")
+ fhash = open("core/version_hash.gen.h", "w")
githash = ""
if os.path.isfile(".git/HEAD"):
- head = open(".git/HEAD", "rb").readline().strip()
+ head = open(".git/HEAD", "r").readline().strip()
if head.startswith("ref: "):
head = ".git/" + head[5:]
if os.path.isfile(head):
- githash = open(head, "rb").readline().strip()
+ githash = open(head, "r").readline().strip()
else:
githash = head
fhash.write("#define VERSION_HASH \"" + githash + "\"")
@@ -1314,7 +1309,7 @@ void unregister_module_types() {
"""
- f = open("modules/register_module_types.gen.cpp", "wb")
+ f = open("modules/register_module_types.gen.cpp", "w")
f.write(modules_cpp)
return module_list
@@ -1334,9 +1329,9 @@ def win32_spawn(sh, escape, cmd, args, env):
data, err = proc.communicate()
rv = proc.wait()
if rv:
- print "====="
- print err
- print "====="
+ print("=====")
+ print(err)
+ print("=====")
return rv
"""
@@ -1410,17 +1405,17 @@ def android_add_default_config(self, config):
def android_add_to_manifest(self, file):
base_path = self.Dir(".").abspath + "/modules/" + self.current_module + "/" + file
- f = open(base_path, "rb")
+ f = open(base_path, "r")
self.android_manifest_chunk += f.read()
def android_add_to_permissions(self, file):
base_path = self.Dir(".").abspath + "/modules/" + self.current_module + "/" + file
- f = open(base_path, "rb")
+ f = open(base_path, "r")
self.android_permission_chunk += f.read()
def android_add_to_attributes(self, file):
base_path = self.Dir(".").abspath + "/modules/" + self.current_module + "/" + file
- f = open(base_path, "rb")
+ f = open(base_path, "r")
self.android_appattributes_chunk += f.read()
def disable_module(self):
@@ -1455,9 +1450,9 @@ def use_windows_spawn_fix(self, platform=None):
data, err = proc.communicate()
rv = proc.wait()
if rv:
- print "====="
- print err
- print "====="
+ print("=====")
+ print(err)
+ print("=====")
return rv
def mySpawn(sh, escape, cmd, args, env):
@@ -1466,7 +1461,7 @@ def use_windows_spawn_fix(self, platform=None):
cmdline = cmd + " " + newargs
rv = 0
- env = {str(key): str(value) for key, value in env.iteritems()}
+ env = {str(key): str(value) for key, value in iteritems(env)}
if len(cmdline) > 32000 and cmd.endswith("ar"):
cmdline = cmd + " " + args[1] + " " + args[2] + " "
for i in range(3, len(args)):
@@ -1546,7 +1541,7 @@ def save_active_platforms(apnames, ap):
str += "};\n"
wf = x + "/" + name + ".gen.h"
- pngw = open(wf, "wb")
+ pngw = open(wf, "w")
pngw.write(str)
@@ -1614,7 +1609,7 @@ def detect_visual_c_compiler_version(tools_env):
# Start with Pre VS 2017 checks which uses VCINSTALLDIR:
if 'VCINSTALLDIR' in tools_env:
- # print "Checking VCINSTALLDIR"
+ # print("Checking VCINSTALLDIR")
# find() works with -1 so big ifs bellow are needed... the simplest solution, in fact
# First test if amd64 and amd64_x86 compilers are present in the path
@@ -1647,7 +1642,7 @@ def detect_visual_c_compiler_version(tools_env):
# and for VS 2017 and newer we check VCTOOLSINSTALLDIR:
if 'VCTOOLSINSTALLDIR' in tools_env:
- # print "Checking VCTOOLSINSTALLDIR"
+ # print("Checking VCTOOLSINSTALLDIR")
# Newer versions have a different path available
vc_amd64_compiler_detection_index = tools_env["PATH"].upper().find(tools_env['VCTOOLSINSTALLDIR'].upper() + "BIN\\HOSTX64\\X64;")
@@ -1677,14 +1672,67 @@ def detect_visual_c_compiler_version(tools_env):
vc_chosen_compiler_str = "x86_amd64"
# debug help
- # print vc_amd64_compiler_detection_index
- # print vc_amd64_x86_compiler_detection_index
- # print vc_x86_compiler_detection_index
- # print vc_x86_amd64_compiler_detection_index
- # print "chosen "+str(vc_chosen_compiler_index)+ " | "+str(vc_chosen_compiler_str)
+ # print(vc_amd64_compiler_detection_index)
+ # print(vc_amd64_x86_compiler_detection_index)
+ # print(vc_x86_compiler_detection_index)
+ # print(vc_x86_amd64_compiler_detection_index)
+ # print("chosen "+str(vc_chosen_compiler_index)+ " | "+str(vc_chosen_compiler_str))
return vc_chosen_compiler_str
+def find_visual_c_batch_file(env):
+ from SCons.Tool.MSCommon.vc import get_default_version, get_host_target, find_batch_file
+
+ version = get_default_version(env)
+ (host_platform, target_platform,req_target_platform) = get_host_target(env)
+ return find_batch_file(env, version, host_platform, target_platform)[0]
+
+
+def generate_vs_project(env, num_jobs):
+ batch_file = find_visual_c_batch_file(env)
+ if batch_file:
+ def build_commandline(commands):
+ common_build_prefix = ['cmd /V /C set "plat=$(PlatformTarget)"',
+ '(if "$(PlatformTarget)"=="x64" (set "plat=x86_amd64"))',
+ 'set "tools=yes"',
+ '(if "$(Configuration)"=="release" (set "tools=no"))',
+ 'call "' + batch_file + '" !plat!']
+
+ result = " ^& ".join(common_build_prefix + [commands])
+ # print("Building commandline: ", result)
+ return result
+
+ env.AddToVSProject(env.core_sources)
+ env.AddToVSProject(env.main_sources)
+ env.AddToVSProject(env.modules_sources)
+ env.AddToVSProject(env.scene_sources)
+ env.AddToVSProject(env.servers_sources)
+ env.AddToVSProject(env.editor_sources)
+
+ env['MSVSBUILDCOM'] = build_commandline('scons platform=windows target=$(Configuration) tools=!tools! -j' + str(num_jobs))
+ env['MSVSREBUILDCOM'] = build_commandline('scons platform=windows target=$(Configuration) tools=!tools! vsproj=yes -j' + str(num_jobs))
+ env['MSVSCLEANCOM'] = build_commandline('scons --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
+ # project. Do not modify without knowing what you are doing.
+ debug_variants = ['debug|Win32'] + ['debug|x64']
+ release_variants = ['release|Win32'] + ['release|x64']
+ release_debug_variants = ['release_debug|Win32'] + ['release_debug|x64']
+ variants = debug_variants + release_variants + release_debug_variants
+ debug_targets = ['bin\\godot.windows.tools.32.exe'] + ['bin\\godot.windows.tools.64.exe']
+ release_targets = ['bin\\godot.windows.opt.32.exe'] + ['bin\\godot.windows.opt.64.exe']
+ release_debug_targets = ['bin\\godot.windows.opt.tools.32.exe'] + ['bin\\godot.windows.opt.tools.64.exe']
+ targets = debug_targets + release_targets + release_debug_targets
+ msvproj = env.MSVSProject(target=['#godot' + env['MSVSPROJECTSUFFIX']],
+ incs=env.vs_incs,
+ srcs=env.vs_srcs,
+ runfile=targets,
+ buildtarget=targets,
+ auto_build_solution=1,
+ variant=variants)
+ else:
+ print("Could not locate Visual Studio batch file for setting up the build environment. Not generating VS project.")
def precious_program(env, program, sources, **args):
program = env.ProgramOriginal(program, sources, **args)
diff --git a/misc/dist/ios_xcode/godot_ios/main.m b/misc/dist/ios_xcode/godot_ios/main.m
index ad53cf7fea..bb63364d8f 100644
--- a/misc/dist/ios_xcode/godot_ios/main.m
+++ b/misc/dist/ios_xcode/godot_ios/main.m
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/misc/hooks/pre-commit-clang-format b/misc/hooks/pre-commit-clang-format
index 0971ebe23a..d2d65a7428 100755
--- a/misc/hooks/pre-commit-clang-format
+++ b/misc/hooks/pre-commit-clang-format
@@ -1,6 +1,6 @@
#!/bin/bash
-# git pre-commit hook that runs an clang-format stylecheck.
+# git pre-commit hook that runs a clang-format stylecheck.
# Features:
# - abort commit when commit does not comply with the style guidelines
# - create a patch of the proposed style changes
@@ -97,7 +97,7 @@ do
# The sed call is necessary to transform the patch from
# --- $file timestamp
# +++ - timestamp
- # to both lines working on the same file and having a a/ and b/ prefix.
+ # to both lines working on the same file and having a/ and b/ prefix.
# Else it can not be applied with 'git apply'.
"$CLANG_FORMAT" -style=file "$file" | \
diff -u "$file" - | \
diff --git a/misc/scripts/addheader.py b/misc/scripts/addheader.py
index acb517b5bd..3f8b75ebcd 100644
--- a/misc/scripts/addheader.py
+++ b/misc/scripts/addheader.py
@@ -4,7 +4,7 @@ header = """\
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/misc/scripts/svgs_2_pngs.py b/misc/scripts/svgs_2_pngs.py
deleted file mode 100644
index ff6d6d851f..0000000000
--- a/misc/scripts/svgs_2_pngs.py
+++ /dev/null
@@ -1,139 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Basic exporter for svg icons
-
-from os import listdir
-from os.path import isfile, join, dirname, realpath
-import subprocess
-import sys
-
-import rsvg
-import cairo
-
-last_svg_path = None
-last_svg_data = None
-
-SCRIPT_FOLDER = dirname(realpath(__file__)) + '/'
-theme_dir_base = SCRIPT_FOLDER + '../../scene/resources/default_theme/'
-theme_dir_source = theme_dir_base + 'source/'
-icons_dir_base = SCRIPT_FOLDER + '../../editor/icons/'
-icons_dir_2x = icons_dir_base + '2x/'
-icons_dir_source = icons_dir_base + 'source/'
-
-
-def svg_to_png(svg_path, png_path, dpi):
- global last_svg_path, last_svg_data
-
- zoom = int(dpi / 90)
- if last_svg_path != svg_path:
- last_svg_data = open(svg_path, 'r').read()
- last_svg_path = svg_path
- svg = rsvg.Handle(data=last_svg_data)
- img = cairo.ImageSurface(
- cairo.FORMAT_ARGB32,
- svg.props.width * zoom,
- svg.props.height * zoom
- )
- ctx = cairo.Context(img)
- ctx.set_antialias(cairo.ANTIALIAS_DEFAULT)
- ctx.scale(zoom, zoom)
- svg.render_cairo(ctx)
- img.write_to_png('%s.png' % png_path)
- svg.close()
-
-
-def export_icons():
- svgs_path = icons_dir_source
-
- file_names = [f for f in listdir(svgs_path) if isfile(join(svgs_path, f))]
-
- for file_name in file_names:
- # name without extensions
- name_only = file_name.replace('.svg', '')
-
- out_icon_names = [name_only] # export to a png with the same file name
- theme_out_icon_names = []
- # special cases
- if special_icons.has_key(name_only):
- special_icon = special_icons[name_only]
- if type(special_icon) is dict:
- if special_icon.get('avoid_self'):
- out_icon_names = []
- if special_icon.has_key('output_names'):
- out_icon_names += special_icon['output_names']
- if special_icon.has_key('theme_output_names'):
- theme_out_icon_names += special_icon['theme_output_names']
-
- source_path = '%s%s.svg' % (svgs_path, name_only)
-
- for out_icon_name in out_icon_names:
- svg_to_png(source_path, icons_dir_base + out_icon_name, 90)
- svg_to_png(source_path, icons_dir_2x + out_icon_name, 180)
- for theme_out_icon_name in theme_out_icon_names:
- svg_to_png(source_path, theme_dir_base + theme_out_icon_name, 90)
-
-
-def export_theme():
- svgs_path = theme_dir_source
- file_names = [f for f in listdir(svgs_path) if isfile(join(svgs_path, f))]
-
- for file_name in file_names:
- # name without extensions
- name_only = file_name.replace('.svg', '')
-
- out_icon_names = [name_only] # export to a png with the same file name
- # special cases
- if theme_icons.has_key(name_only):
- special_icon = theme_icons[name_only]
- if type(special_icon) is dict:
- if special_icon.has_key('output_names'):
- out_icon_names += special_icon['output_names']
-
- source_path = '%s%s.svg' % (svgs_path, name_only)
-
- for out_icon_name in out_icon_names:
- svg_to_png(source_path, theme_dir_base + out_icon_name, 90)
-
-
-# special cases for icons that will be exported to multiple target pngs or that require transforms.
-special_icons = {
- 'icon_add_track': dict(
- output_names=['icon_add'],
- theme_output_names=['icon_add', 'icon_zoom_more']
- ),
- 'icon_new': dict(output_names=['icon_file']),
- 'icon_animation_tree_player': dict(output_names=['icon_animation_tree']),
- 'icon_tool_rotate': dict(
- output_names=['icon_reload'],
- theme_output_names=['icon_reload']
- ),
- 'icon_multi_edit': dict(output_names=['icon_multi_node_edit']),
- 'icon_load': dict(
- output_names=['icon_open']
- ),
- 'icon_folder': dict(
- theme_output_names=['icon_folder']
- ),
- 'icon_file_list': dict(output_names=['icon_enum']),
- 'icon_collision_2d': dict(output_names=['icon_collision_polygon_2d', 'icon_polygon_2d']),
- 'icon_class_list': dict(output_names=['icon_filesystem']),
- 'icon_color_ramp': dict(output_names=['icon_graph_color_ramp']),
- 'icon_translation': dict(output_names=['icon_p_hash_translation']),
- 'icon_shader': dict(output_names=['icon_shader_material', 'icon_material_shader']),
- 'icon_canvas_item_shader_graph': dict(output_names=['icon_material_shader_graph']),
-
- 'icon_color_pick': dict(theme_output_names=['icon_color_pick'], avoid_self=True),
- 'icon_play': dict(theme_output_names=['icon_play']),
- 'icon_stop': dict(theme_output_names=['icon_stop']),
- 'icon_zoom_less': dict(theme_output_names=['icon_zoom_less'], avoid_self=True),
- 'icon_zoom_reset': dict(theme_output_names=['icon_zoom_reset'], avoid_self=True),
- 'icon_snap': dict(theme_output_names=['icon_snap'])
-}
-
-theme_icons = {
- 'icon_close': dict(output_names=['close', 'close_hl']),
- 'tab_menu': dict(output_names=['tab_menu_hl'])
-}
-
-export_icons()
-export_theme()
diff --git a/modules/dds/register_types.cpp b/modules/dds/register_types.cpp
index 4a758fe033..22fb391b9a 100644
--- a/modules/dds/register_types.cpp
+++ b/modules/dds/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/dds/register_types.h b/modules/dds/register_types.h
index 4807c7dd5b..e48d56c898 100644
--- a/modules/dds/register_types.h
+++ b/modules/dds/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp
index 71593ebfa9..95d93e6af6 100644
--- a/modules/dds/texture_loader_dds.cpp
+++ b/modules/dds/texture_loader_dds.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/dds/texture_loader_dds.h b/modules/dds/texture_loader_dds.h
index 3b36e7f1eb..c545d210b4 100644
--- a/modules/dds/texture_loader_dds.h
+++ b/modules/dds/texture_loader_dds.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp
index c76e0c6675..c50886ad3c 100644
--- a/modules/enet/networked_multiplayer_enet.cpp
+++ b/modules/enet/networked_multiplayer_enet.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/enet/networked_multiplayer_enet.h b/modules/enet/networked_multiplayer_enet.h
index f2c3b838e4..81d517147d 100644
--- a/modules/enet/networked_multiplayer_enet.h
+++ b/modules/enet/networked_multiplayer_enet.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/enet/register_types.cpp b/modules/enet/register_types.cpp
index a6e6c87c14..316aca6d94 100644
--- a/modules/enet/register_types.cpp
+++ b/modules/enet/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/enet/register_types.h b/modules/enet/register_types.h
index 9bcb35a92b..0775044bc7 100644
--- a/modules/enet/register_types.h
+++ b/modules/enet/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/etc/SCsub b/modules/etc/SCsub
index 8f5937017e..9c3e703f11 100644
--- a/modules/etc/SCsub
+++ b/modules/etc/SCsub
@@ -34,4 +34,8 @@ env_etc.Append(CPPPATH=[thirdparty_dir])
env_etc.add_source_files(env.modules_sources, "*.cpp")
# upstream uses c++11
-env_etc.Append(CXXFLAGS="-std=gnu++11")
+env_etc.Append(CCFLAGS="-std=gnu++11")
+# -ffast-math seems to be incompatible with ec2comp on recent versions of
+# GCC and Clang
+if '-ffast-math' in env_etc['CCFLAGS']:
+ env_etc['CCFLAGS'].remove('-ffast-math')
diff --git a/modules/etc/image_etc.cpp b/modules/etc/image_etc.cpp
index ccc1733c43..e86fd06d81 100644
--- a/modules/etc/image_etc.cpp
+++ b/modules/etc/image_etc.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -117,7 +117,7 @@ static void _compress_etc(Image *p_img, float p_lossy_quality, bool force_etc1_f
return;
}
- int imgw = p_img->get_width(), imgh = p_img->get_height();
+ uint32_t imgw = p_img->get_width(), imgh = p_img->get_height();
ERR_FAIL_COND(next_power_of_2(imgw) != imgw || next_power_of_2(imgh) != imgh);
Image::Format etc_format = force_etc1_format ? Image::FORMAT_ETC : _get_etc2_mode(detected_channels);
diff --git a/modules/etc/image_etc.h b/modules/etc/image_etc.h
index 3cbadef6fa..8cc0bdc08f 100644
--- a/modules/etc/image_etc.h
+++ b/modules/etc/image_etc.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/etc/register_types.cpp b/modules/etc/register_types.cpp
index e777859a8f..ef0a403e90 100644
--- a/modules/etc/register_types.cpp
+++ b/modules/etc/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/etc/register_types.h b/modules/etc/register_types.h
index 44399376f3..1d9a0e3b2c 100644
--- a/modules/etc/register_types.h
+++ b/modules/etc/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/etc/texture_loader_pkm.cpp b/modules/etc/texture_loader_pkm.cpp
index c04528d2a0..e8a5aced3e 100644
--- a/modules/etc/texture_loader_pkm.cpp
+++ b/modules/etc/texture_loader_pkm.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/etc/texture_loader_pkm.h b/modules/etc/texture_loader_pkm.h
index 8a0f06a51a..667870d7cc 100644
--- a/modules/etc/texture_loader_pkm.h
+++ b/modules/etc/texture_loader_pkm.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/freetype/SCsub b/modules/freetype/SCsub
index 6a89e8e087..f22df4407c 100644
--- a/modules/freetype/SCsub
+++ b/modules/freetype/SCsub
@@ -1,6 +1,7 @@
#!/usr/bin/env python
Import('env')
+from compat import isbasestring
# Not building in a separate env as scene needs it
@@ -74,7 +75,7 @@ if (env['builtin_freetype'] != 'no'):
# and then plain strings for system library. We insert between the two.
inserted = False
for idx, linklib in enumerate(env["LIBS"]):
- if isinstance(linklib, basestring): # first system lib such as "X11", otherwise SCons lib object
+ if isbasestring(linklib): # first system lib such as "X11", otherwise SCons lib object
env["LIBS"].insert(idx, lib)
inserted = True
break
diff --git a/modules/freetype/register_types.cpp b/modules/freetype/register_types.cpp
index 3f290c2138..de6e73a55e 100644
--- a/modules/freetype/register_types.cpp
+++ b/modules/freetype/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/freetype/register_types.h b/modules/freetype/register_types.h
index c3ba324ed1..ed8b5656b6 100644
--- a/modules/freetype/register_types.h
+++ b/modules/freetype/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/freetype/uwpdef.h b/modules/freetype/uwpdef.h
index c29b14dd12..ecde9946c7 100644
--- a/modules/freetype/uwpdef.h
+++ b/modules/freetype/uwpdef.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp
index ccc7e5f2da..ded987557c 100644
--- a/modules/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -40,7 +40,7 @@
const String init_symbol = "godot_gdnative_init";
const String terminate_symbol = "godot_gdnative_terminate";
-String GDNativeLibrary::platform_names[NUM_PLATFORMS] = {
+String GDNativeLibrary::platform_names[NUM_PLATFORMS + 1] = {
"X11_32bit",
"X11_64bit",
"Windows_32bit",
@@ -48,11 +48,15 @@ String GDNativeLibrary::platform_names[NUM_PLATFORMS] = {
"OSX",
"Android",
- "iOS",
- "WebAssembly"
+ "iOS_32bit",
+ "iOS_64bit",
+
+ "WebAssembly",
+
+ ""
};
-String GDNativeLibrary::platform_lib_ext[NUM_PLATFORMS] = {
+String GDNativeLibrary::platform_lib_ext[NUM_PLATFORMS + 1] = {
"so",
"so",
"dll",
@@ -60,21 +64,30 @@ String GDNativeLibrary::platform_lib_ext[NUM_PLATFORMS] = {
"dylib",
"so",
+
"dylib",
+ "dylib",
+
+ "wasm",
- "wasm"
+ ""
};
-// TODO(karroffel): make this actually do the right thing.
GDNativeLibrary::Platform GDNativeLibrary::current_platform =
#if defined(X11_ENABLED)
- X11_64BIT;
+ (sizeof(void *) == 8 ? X11_64BIT : X11_32BIT);
#elif defined(WINDOWS_ENABLED)
- WINDOWS_64BIT;
+ (sizeof(void *) == 8 ? WINDOWS_64BIT : WINDOWS_32BIT);
#elif defined(OSX_ENABLED)
OSX;
+#elif defined(IPHONE_ENABLED)
+ (sizeof(void *) == 8 ? IOS_64BIT : IOS_32BIT);
+#elif defined(ANDROID_ENABLED)
+ ANDROID;
+#elif defined(JAVASCRIPT_ENABLED)
+ WASM;
#else
- X11_64BIT; // need a sensible default..
+ NUM_PLATFORMS;
#endif
GDNativeLibrary::GDNativeLibrary()
@@ -151,7 +164,10 @@ String GDNativeLibrary::get_library_path(StringName p_platform) const {
}
String GDNativeLibrary::get_active_library_path() const {
- return library_paths[GDNativeLibrary::current_platform];
+ if (GDNativeLibrary::current_platform != NUM_PLATFORMS) {
+ return library_paths[GDNativeLibrary::current_platform];
+ }
+ return "";
}
GDNative::GDNative() {
diff --git a/modules/gdnative/gdnative.h b/modules/gdnative/gdnative.h
index 003ec46a25..dc1c3507ec 100644
--- a/modules/gdnative/gdnative.h
+++ b/modules/gdnative/gdnative.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -48,11 +48,17 @@ class GDNativeLibrary : public Resource {
// NOTE(karroffel): I heard OSX 32 bit is dead, so 64 only
OSX,
- // TODO(karroffel): all different android versions and archs
+ // Android .so files must be located in directories corresponding to Android ABI names:
+ // https://developer.android.com/ndk/guides/abis.html
+ // Android runtime will select the matching library depending on the device.
+ // The value here must simply point to the .so name, for example:
+ // "res://libmy_gdnative.so" or "libmy_gdnative.so",
+ // while in the project the actual paths can be "lib/android/armeabi-v7a/libmy_gdnative.so",
+ // "lib/android/arm64-v8a/libmy_gdnative.so".
ANDROID,
- // TODO(karroffe): all different iOS versions and archs
- IOS,
+ IOS_32BIT,
+ IOS_64BIT,
// TODO(karroffel): figure out how to deal with web stuff at all...
WASM,
@@ -64,10 +70,9 @@ class GDNativeLibrary : public Resource {
};
- static String platform_names[NUM_PLATFORMS];
- static String platform_lib_ext[NUM_PLATFORMS];
+ static String platform_names[NUM_PLATFORMS + 1];
+ static String platform_lib_ext[NUM_PLATFORMS + 1];
- // TODO(karroffel): make this actually do something lol.
static Platform current_platform;
String library_paths[NUM_PLATFORMS];
diff --git a/modules/gdnative/godot/array.cpp b/modules/gdnative/godot/array.cpp
index 97c73dc253..c3fde0e954 100644
--- a/modules/gdnative/godot/array.cpp
+++ b/modules/gdnative/godot/array.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -61,7 +61,7 @@ void GDAPI godot_array_new_pool_color_array(godot_array *r_dest, const godot_poo
memnew_placement(dest, Array);
dest->resize(pca->size());
- for (size_t i = 0; i < dest->size(); i++) {
+ for (int i = 0; i < dest->size(); i++) {
Variant v = pca->operator[](i);
dest->operator[](i) = v;
}
@@ -73,7 +73,7 @@ void GDAPI godot_array_new_pool_vector3_array(godot_array *r_dest, const godot_p
memnew_placement(dest, Array);
dest->resize(pca->size());
- for (size_t i = 0; i < dest->size(); i++) {
+ for (int i = 0; i < dest->size(); i++) {
Variant v = pca->operator[](i);
dest->operator[](i) = v;
}
@@ -85,7 +85,7 @@ void GDAPI godot_array_new_pool_vector2_array(godot_array *r_dest, const godot_p
memnew_placement(dest, Array);
dest->resize(pca->size());
- for (size_t i = 0; i < dest->size(); i++) {
+ for (int i = 0; i < dest->size(); i++) {
Variant v = pca->operator[](i);
dest->operator[](i) = v;
}
@@ -97,7 +97,7 @@ void GDAPI godot_array_new_pool_string_array(godot_array *r_dest, const godot_po
memnew_placement(dest, Array);
dest->resize(pca->size());
- for (size_t i = 0; i < dest->size(); i++) {
+ for (int i = 0; i < dest->size(); i++) {
Variant v = pca->operator[](i);
dest->operator[](i) = v;
}
@@ -109,7 +109,7 @@ void GDAPI godot_array_new_pool_real_array(godot_array *r_dest, const godot_pool
memnew_placement(dest, Array);
dest->resize(pca->size());
- for (size_t i = 0; i < dest->size(); i++) {
+ for (int i = 0; i < dest->size(); i++) {
Variant v = pca->operator[](i);
dest->operator[](i) = v;
}
@@ -121,7 +121,7 @@ void GDAPI godot_array_new_pool_int_array(godot_array *r_dest, const godot_pool_
memnew_placement(dest, Array);
dest->resize(pca->size());
- for (size_t i = 0; i < dest->size(); i++) {
+ for (int i = 0; i < dest->size(); i++) {
Variant v = pca->operator[](i);
dest->operator[](i) = v;
}
@@ -133,7 +133,7 @@ void GDAPI godot_array_new_pool_byte_array(godot_array *r_dest, const godot_pool
memnew_placement(dest, Array);
dest->resize(pca->size());
- for (size_t i = 0; i < dest->size(); i++) {
+ for (int i = 0; i < dest->size(); i++) {
Variant v = pca->operator[](i);
dest->operator[](i) = v;
}
diff --git a/modules/gdnative/godot/array.h b/modules/gdnative/godot/array.h
index 158170ba0e..08f73c8785 100644
--- a/modules/gdnative/godot/array.h
+++ b/modules/gdnative/godot/array.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -37,7 +37,7 @@ extern "C" {
#include <stdint.h>
-#define GODOT_ARRAY_SIZE 8
+#define GODOT_ARRAY_SIZE sizeof(void *)
#ifndef GODOT_CORE_API_GODOT_ARRAY_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_ARRAY_TYPE_DEFINED
diff --git a/modules/gdnative/godot/basis.cpp b/modules/gdnative/godot/basis.cpp
index 5cf379b7d5..1d7aa18a70 100644
--- a/modules/gdnative/godot/basis.cpp
+++ b/modules/gdnative/godot/basis.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -107,24 +107,6 @@ godot_basis GDAPI godot_basis_scaled(const godot_basis *p_self, const godot_vect
return dest;
}
-void GDAPI godot_basis_set_scale(godot_basis *p_self, const godot_vector3 *p_scale) {
- Basis *self = (Basis *)p_self;
- const Vector3 *scale = (const Vector3 *)p_scale;
- self->set_scale(*scale);
-}
-
-void GDAPI godot_basis_set_rotation_euler(godot_basis *p_self, const godot_vector3 *p_euler) {
- Basis *self = (Basis *)p_self;
- const Vector3 *euler = (const Vector3 *)p_euler;
- self->set_rotation_euler(*euler);
-}
-
-void GDAPI godot_basis_set_rotation_axis_angle(godot_basis *p_self, const godot_vector3 *p_axis, const godot_real p_angle) {
- Basis *self = (Basis *)p_self;
- const Vector3 *axis = (const Vector3 *)p_axis;
- self->set_rotation_axis_angle(*axis, p_angle);
-}
-
godot_vector3 GDAPI godot_basis_get_scale(const godot_basis *p_self) {
godot_vector3 dest;
const Basis *self = (const Basis *)p_self;
diff --git a/modules/gdnative/godot/basis.h b/modules/gdnative/godot/basis.h
index e96b8b730d..f36d2199de 100644
--- a/modules/gdnative/godot/basis.h
+++ b/modules/gdnative/godot/basis.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -67,12 +67,6 @@ godot_basis GDAPI godot_basis_rotated(const godot_basis *p_self, const godot_vec
godot_basis GDAPI godot_basis_scaled(const godot_basis *p_self, const godot_vector3 *p_scale);
-void GDAPI godot_basis_set_scale(godot_basis *p_self, const godot_vector3 *p_scale);
-
-void GDAPI godot_basis_set_rotation_euler(godot_basis *p_self, const godot_vector3 *p_euler);
-
-void GDAPI godot_basis_set_rotation_axis_angle(godot_basis *p_self, const godot_vector3 *p_axis, const godot_real p_angle);
-
godot_vector3 GDAPI godot_basis_get_scale(const godot_basis *p_self);
godot_vector3 GDAPI godot_basis_get_euler(const godot_basis *p_self);
diff --git a/modules/gdnative/godot/color.cpp b/modules/gdnative/godot/color.cpp
index a5ffee1e0b..3677fdc265 100644
--- a/modules/gdnative/godot/color.cpp
+++ b/modules/gdnative/godot/color.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/color.h b/modules/gdnative/godot/color.h
index 2cd6b48b48..5d550e40b3 100644
--- a/modules/gdnative/godot/color.h
+++ b/modules/gdnative/godot/color.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/dictionary.cpp b/modules/gdnative/godot/dictionary.cpp
index c538456432..2996cc78a3 100644
--- a/modules/gdnative/godot/dictionary.cpp
+++ b/modules/gdnative/godot/dictionary.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/dictionary.h b/modules/gdnative/godot/dictionary.h
index 594b02b4dd..10d580af08 100644
--- a/modules/gdnative/godot/dictionary.h
+++ b/modules/gdnative/godot/dictionary.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -36,7 +36,7 @@ extern "C" {
#include <stdint.h>
-#define GODOT_DICTIONARY_SIZE 8
+#define GODOT_DICTIONARY_SIZE sizeof(void *)
#ifndef GODOT_CORE_API_GODOT_DICTIONARY_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_DICTIONARY_TYPE_DEFINED
diff --git a/modules/gdnative/godot/gdnative.cpp b/modules/gdnative/godot/gdnative.cpp
index 4cda1f4560..7cd52da34d 100644
--- a/modules/gdnative/godot/gdnative.cpp
+++ b/modules/gdnative/godot/gdnative.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/gdnative.h b/modules/gdnative/godot/gdnative.h
index d849999079..c71a7ae1ef 100644
--- a/modules/gdnative/godot/gdnative.h
+++ b/modules/gdnative/godot/gdnative.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -56,7 +56,7 @@ extern "C" {
#define GDAPI GDCALLINGCONV
#endif
#else
-#define GDCALLINGCONV __attribute__((sysv_abi))
+#define GDCALLINGCONV __attribute__((sysv_abi, visibility("default")))
#define GDAPI GDCALLINGCONV
#endif
diff --git a/modules/gdnative/godot/node_path.cpp b/modules/gdnative/godot/node_path.cpp
index f4179361be..2309588a81 100644
--- a/modules/gdnative/godot/node_path.cpp
+++ b/modules/gdnative/godot/node_path.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/node_path.h b/modules/gdnative/godot/node_path.h
index 4d3dc4e0ee..2f71ddd59d 100644
--- a/modules/gdnative/godot/node_path.h
+++ b/modules/gdnative/godot/node_path.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -36,7 +36,7 @@ extern "C" {
#include <stdint.h>
-#define GODOT_NODE_PATH_SIZE 8
+#define GODOT_NODE_PATH_SIZE sizeof(void *)
#ifndef GODOT_CORE_API_GODOT_NODE_PATH_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_NODE_PATH_TYPE_DEFINED
diff --git a/modules/gdnative/godot/plane.cpp b/modules/gdnative/godot/plane.cpp
index 5c5b302345..f3d4b6971e 100644
--- a/modules/gdnative/godot/plane.cpp
+++ b/modules/gdnative/godot/plane.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/plane.h b/modules/gdnative/godot/plane.h
index 8519ac60c4..27548c8b0c 100644
--- a/modules/gdnative/godot/plane.h
+++ b/modules/gdnative/godot/plane.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/pool_arrays.cpp b/modules/gdnative/godot/pool_arrays.cpp
index fa460be8bc..49bf851051 100644
--- a/modules/gdnative/godot/pool_arrays.cpp
+++ b/modules/gdnative/godot/pool_arrays.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -65,7 +65,7 @@ void GDAPI godot_pool_byte_array_new_with_array(godot_pool_byte_array *r_dest, c
memnew_placement(dest, PoolVector<uint8_t>);
dest->resize(a->size());
- for (size_t i = 0; i < a->size(); i++) {
+ for (int i = 0; i < a->size(); i++) {
dest->set(i, (*a)[i]);
}
}
@@ -144,7 +144,7 @@ void GDAPI godot_pool_int_array_new_with_array(godot_pool_int_array *r_dest, con
memnew_placement(dest, PoolVector<godot_int>);
dest->resize(a->size());
- for (size_t i = 0; i < a->size(); i++) {
+ for (int i = 0; i < a->size(); i++) {
dest->set(i, (*a)[i]);
}
}
@@ -223,7 +223,7 @@ void GDAPI godot_pool_real_array_new_with_array(godot_pool_real_array *r_dest, c
memnew_placement(dest, PoolVector<godot_real>);
dest->resize(a->size());
- for (size_t i = 0; i < a->size(); i++) {
+ for (int i = 0; i < a->size(); i++) {
dest->set(i, (*a)[i]);
}
}
@@ -302,7 +302,7 @@ void GDAPI godot_pool_string_array_new_with_array(godot_pool_string_array *r_des
memnew_placement(dest, PoolVector<String>);
dest->resize(a->size());
- for (size_t i = 0; i < a->size(); i++) {
+ for (int i = 0; i < a->size(); i++) {
dest->set(i, (*a)[i]);
}
}
@@ -389,7 +389,7 @@ void GDAPI godot_pool_vector2_array_new_with_array(godot_pool_vector2_array *r_d
memnew_placement(dest, PoolVector<Vector2>);
dest->resize(a->size());
- for (size_t i = 0; i < a->size(); i++) {
+ for (int i = 0; i < a->size(); i++) {
dest->set(i, (*a)[i]);
}
}
@@ -475,7 +475,7 @@ void GDAPI godot_pool_vector3_array_new_with_array(godot_pool_vector3_array *r_d
memnew_placement(dest, PoolVector<Vector3>);
dest->resize(a->size());
- for (size_t i = 0; i < a->size(); i++) {
+ for (int i = 0; i < a->size(); i++) {
dest->set(i, (*a)[i]);
}
}
@@ -561,7 +561,7 @@ void GDAPI godot_pool_color_array_new_with_array(godot_pool_color_array *r_dest,
memnew_placement(dest, PoolVector<Color>);
dest->resize(a->size());
- for (size_t i = 0; i < a->size(); i++) {
+ for (int i = 0; i < a->size(); i++) {
dest->set(i, (*a)[i]);
}
}
diff --git a/modules/gdnative/godot/pool_arrays.h b/modules/gdnative/godot/pool_arrays.h
index 29517d21ac..1b51dca38c 100644
--- a/modules/gdnative/godot/pool_arrays.h
+++ b/modules/gdnative/godot/pool_arrays.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -38,7 +38,7 @@ extern "C" {
/////// PoolByteArray
-#define GODOT_POOL_BYTE_ARRAY_SIZE 8
+#define GODOT_POOL_BYTE_ARRAY_SIZE sizeof(void *)
#ifndef GODOT_CORE_API_GODOT_POOL_BYTE_ARRAY_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_POOL_BYTE_ARRAY_TYPE_DEFINED
@@ -49,7 +49,7 @@ typedef struct {
/////// PoolIntArray
-#define GODOT_POOL_INT_ARRAY_SIZE 8
+#define GODOT_POOL_INT_ARRAY_SIZE sizeof(void *)
#ifndef GODOT_CORE_API_GODOT_POOL_INT_ARRAY_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_POOL_INT_ARRAY_TYPE_DEFINED
@@ -60,7 +60,7 @@ typedef struct {
/////// PoolRealArray
-#define GODOT_POOL_REAL_ARRAY_SIZE 8
+#define GODOT_POOL_REAL_ARRAY_SIZE sizeof(void *)
#ifndef GODOT_CORE_API_GODOT_POOL_REAL_ARRAY_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_POOL_REAL_ARRAY_TYPE_DEFINED
@@ -71,7 +71,7 @@ typedef struct {
/////// PoolStringArray
-#define GODOT_POOL_STRING_ARRAY_SIZE 8
+#define GODOT_POOL_STRING_ARRAY_SIZE sizeof(void *)
#ifndef GODOT_CORE_API_GODOT_POOL_STRING_ARRAY_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_POOL_STRING_ARRAY_TYPE_DEFINED
@@ -82,7 +82,7 @@ typedef struct {
/////// PoolVector2Array
-#define GODOT_POOL_VECTOR2_ARRAY_SIZE 8
+#define GODOT_POOL_VECTOR2_ARRAY_SIZE sizeof(void *)
#ifndef GODOT_CORE_API_GODOT_POOL_VECTOR2_ARRAY_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_POOL_VECTOR2_ARRAY_TYPE_DEFINED
@@ -93,7 +93,7 @@ typedef struct {
/////// PoolVector3Array
-#define GODOT_POOL_VECTOR3_ARRAY_SIZE 8
+#define GODOT_POOL_VECTOR3_ARRAY_SIZE sizeof(void *)
#ifndef GODOT_CORE_API_GODOT_POOL_VECTOR3_ARRAY_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_POOL_VECTOR3_ARRAY_TYPE_DEFINED
@@ -104,7 +104,7 @@ typedef struct {
/////// PoolColorArray
-#define GODOT_POOL_COLOR_ARRAY_SIZE 8
+#define GODOT_POOL_COLOR_ARRAY_SIZE sizeof(void *)
#ifndef GODOT_CORE_API_GODOT_POOL_COLOR_ARRAY_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_POOL_COLOR_ARRAY_TYPE_DEFINED
diff --git a/modules/gdnative/godot/quat.cpp b/modules/gdnative/godot/quat.cpp
index 37ee4d6b15..e6bea78b60 100644
--- a/modules/gdnative/godot/quat.cpp
+++ b/modules/gdnative/godot/quat.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/quat.h b/modules/gdnative/godot/quat.h
index 0979653d93..9a3238a337 100644
--- a/modules/gdnative/godot/quat.h
+++ b/modules/gdnative/godot/quat.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/rect2.cpp b/modules/gdnative/godot/rect2.cpp
index 023584c4f6..98e7855dc9 100644
--- a/modules/gdnative/godot/rect2.cpp
+++ b/modules/gdnative/godot/rect2.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/rect2.h b/modules/gdnative/godot/rect2.h
index cb1ddb58cf..8ceeddf1b4 100644
--- a/modules/gdnative/godot/rect2.h
+++ b/modules/gdnative/godot/rect2.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/rect3.cpp b/modules/gdnative/godot/rect3.cpp
index 708d2987f2..88952ab49c 100644
--- a/modules/gdnative/godot/rect3.cpp
+++ b/modules/gdnative/godot/rect3.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/rect3.h b/modules/gdnative/godot/rect3.h
index 69279351c4..ca96aadd5c 100644
--- a/modules/gdnative/godot/rect3.h
+++ b/modules/gdnative/godot/rect3.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/rid.cpp b/modules/gdnative/godot/rid.cpp
index eb9538e692..51c8aaa1b3 100644
--- a/modules/gdnative/godot/rid.cpp
+++ b/modules/gdnative/godot/rid.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -50,7 +50,7 @@ godot_int GDAPI godot_rid_get_id(const godot_rid *p_self) {
}
void GDAPI godot_rid_new_with_resource(godot_rid *r_dest, const godot_object *p_from) {
- const Resource *res_from = ((const Object *)p_from)->cast_to<Resource>();
+ const Resource *res_from = Object::cast_to<Resource>((Object *)p_from);
godot_rid_new(r_dest);
if (res_from) {
RID *dest = (RID *)r_dest;
diff --git a/modules/gdnative/godot/rid.h b/modules/gdnative/godot/rid.h
index ac5b5383d9..c56ff38735 100644
--- a/modules/gdnative/godot/rid.h
+++ b/modules/gdnative/godot/rid.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -36,7 +36,7 @@ extern "C" {
#include <stdint.h>
-#define GODOT_RID_SIZE 8
+#define GODOT_RID_SIZE sizeof(void *)
#ifndef GODOT_CORE_API_GODOT_RID_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_RID_TYPE_DEFINED
diff --git a/modules/gdnative/godot/string.cpp b/modules/gdnative/godot/string.cpp
index 2235c12a2d..1282cf95e5 100644
--- a/modules/gdnative/godot/string.cpp
+++ b/modules/gdnative/godot/string.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -232,7 +232,7 @@ godot_int GDAPI godot_string_findn_from(const godot_string *p_self, godot_string
return self->findn(*what, p_from);
}
-godot_int GDAPI find_last(const godot_string *p_self, godot_string p_what) {
+godot_int GDAPI godot_string_find_last(const godot_string *p_self, godot_string p_what) {
const String *self = (const String *)p_self;
String *what = (String *)&p_what;
diff --git a/modules/gdnative/godot/string.h b/modules/gdnative/godot/string.h
index 7695cd7931..128448e64e 100644
--- a/modules/gdnative/godot/string.h
+++ b/modules/gdnative/godot/string.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -37,7 +37,7 @@ extern "C" {
#include <stdint.h>
#include <wchar.h>
-#define GODOT_STRING_SIZE 8
+#define GODOT_STRING_SIZE sizeof(void *)
#ifndef GODOT_CORE_API_GODOT_STRING_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_STRING_TYPE_DEFINED
@@ -82,7 +82,7 @@ godot_int GDAPI godot_string_findmk_from(const godot_string *p_self, const godot
godot_int GDAPI godot_string_findmk_from_in_place(const godot_string *p_self, const godot_array *p_keys, godot_int p_from, godot_int *r_key);
godot_int GDAPI godot_string_findn(const godot_string *p_self, godot_string p_what);
godot_int GDAPI godot_string_findn_from(const godot_string *p_self, godot_string p_what, godot_int p_from);
-godot_int GDAPI find_last(const godot_string *p_self, godot_string p_what);
+godot_int GDAPI godot_string_find_last(const godot_string *p_self, godot_string p_what);
godot_string GDAPI godot_string_format(const godot_string *p_self, const godot_variant *p_values);
godot_string GDAPI godot_string_format_with_custom_placeholder(const godot_string *p_self, const godot_variant *p_values, const char *p_placeholder);
godot_string GDAPI godot_string_hex_encode_buffer(const uint8_t *p_buffer, godot_int p_len);
diff --git a/modules/gdnative/godot/transform.cpp b/modules/gdnative/godot/transform.cpp
index 87fee918bd..a965067b77 100644
--- a/modules/gdnative/godot/transform.cpp
+++ b/modules/gdnative/godot/transform.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/transform.h b/modules/gdnative/godot/transform.h
index 30b9970f67..60788e3d57 100644
--- a/modules/gdnative/godot/transform.h
+++ b/modules/gdnative/godot/transform.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/transform2d.cpp b/modules/gdnative/godot/transform2d.cpp
index 65f9f8ee32..9fc44ecdfa 100644
--- a/modules/gdnative/godot/transform2d.cpp
+++ b/modules/gdnative/godot/transform2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/transform2d.h b/modules/gdnative/godot/transform2d.h
index 41c8ba982c..c0f5725eed 100644
--- a/modules/gdnative/godot/transform2d.h
+++ b/modules/gdnative/godot/transform2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/variant.cpp b/modules/gdnative/godot/variant.cpp
index d814ef913c..582544b3a0 100644
--- a/modules/gdnative/godot/variant.cpp
+++ b/modules/gdnative/godot/variant.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/variant.h b/modules/gdnative/godot/variant.h
index 1c19d2a25b..849ba8bda6 100644
--- a/modules/gdnative/godot/variant.h
+++ b/modules/gdnative/godot/variant.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -36,7 +36,7 @@ extern "C" {
#include <stdint.h>
-#define GODOT_VARIANT_SIZE 24
+#define GODOT_VARIANT_SIZE (16 + sizeof(void *))
#ifndef GODOT_CORE_API_GODOT_VARIANT_TYPE_DEFINED
#define GODOT_CORE_API_GODOT_VARIANT_TYPE_DEFINED
diff --git a/modules/gdnative/godot/vector2.cpp b/modules/gdnative/godot/vector2.cpp
index 05d4b1acc8..78ed5f06a9 100644
--- a/modules/gdnative/godot/vector2.cpp
+++ b/modules/gdnative/godot/vector2.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/vector2.h b/modules/gdnative/godot/vector2.h
index 9db238b4fd..98e9700e32 100644
--- a/modules/gdnative/godot/vector2.h
+++ b/modules/gdnative/godot/vector2.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/vector3.cpp b/modules/gdnative/godot/vector3.cpp
index fe27e740e2..5faeac2864 100644
--- a/modules/gdnative/godot/vector3.cpp
+++ b/modules/gdnative/godot/vector3.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/godot/vector3.h b/modules/gdnative/godot/vector3.h
index 8aba1d9a85..b76ca11a9c 100644
--- a/modules/gdnative/godot/vector3.h
+++ b/modules/gdnative/godot/vector3.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp
index da50104e26..9ad05b7194 100644
--- a/modules/gdnative/register_types.cpp
+++ b/modules/gdnative/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdnative/register_types.h b/modules/gdnative/register_types.h
index 48e778cb2c..08da72016f 100644
--- a/modules/gdnative/register_types.h
+++ b/modules/gdnative/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp
index c243f88b7a..4803781c67 100644
--- a/modules/gdscript/gd_compiler.cpp
+++ b/modules/gdscript/gd_compiler.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -1971,7 +1971,7 @@ Error GDCompiler::_parse_class(GDScript *p_script, GDScript *p_owner, const GDPa
p_script->placeholders.erase(psi); //remove placeholder
GDInstance *instance = memnew(GDInstance);
- instance->base_ref = E->get()->cast_to<Reference>();
+ instance->base_ref = Object::cast_to<Reference>(E->get());
instance->members.resize(p_script->member_indices.size());
instance->script = Ref<GDScript>(p_script);
instance->owner = E->get();
diff --git a/modules/gdscript/gd_compiler.h b/modules/gdscript/gd_compiler.h
index b7ff092eba..ac713ae75b 100644
--- a/modules/gdscript/gd_compiler.h
+++ b/modules/gdscript/gd_compiler.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -91,7 +91,6 @@ class GDCompiler {
}
}
- //int get_identifier_pos(const StringName& p_dentifier) const;
HashMap<Variant, int, VariantHasher, VariantComparator> constant_map;
Map<StringName, int> name_map;
@@ -127,17 +126,6 @@ class GDCompiler {
int call_max;
};
-#if 0
- void _create_index(const GDParser::OperatorNode *on);
- void _create_call(const GDParser::OperatorNode *on);
-
-
- int _parse_expression(const GDParser::Node *p_expr,CodeGen& codegen);
- void _parse_block(GDParser::BlockNode *p_block);
- void _parse_function(GDParser::FunctionNode *p_func);
- Ref<GDScript> _parse_class(GDParser::ClassNode *p_class);
-#endif
-
bool _is_class_member_property(CodeGen &codegen, const StringName &p_name);
bool _is_class_member_property(GDScript *owner, const StringName &p_name);
@@ -146,7 +134,6 @@ class GDCompiler {
bool _create_unary_operator(CodeGen &codegen, const GDParser::OperatorNode *on, Variant::Operator op, int p_stack_level);
bool _create_binary_operator(CodeGen &codegen, const GDParser::OperatorNode *on, Variant::Operator op, int p_stack_level, bool p_initializer = false);
- //int _parse_subexpression(CodeGen& codegen,const GDParser::BlockNode *p_block,const GDParser::Node *p_expression);
int _parse_assign_right_expression(CodeGen &codegen, const GDParser::OperatorNode *p_expression, int p_stack_level);
int _parse_expression(CodeGen &codegen, const GDParser::Node *p_expression, int p_stack_level, bool p_root = false, bool p_initializer = false);
Error _parse_block(CodeGen &codegen, const GDParser::BlockNode *p_block, int p_stack_level = 0, int p_break_addr = -1, int p_continue_addr = -1);
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp
index 3fa0a38024..70e7da5748 100644
--- a/modules/gdscript/gd_editor.cpp
+++ b/modules/gdscript/gd_editor.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -27,11 +27,14 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#include "gd_script.h"
+
#include "editor/editor_settings.h"
#include "gd_compiler.h"
-#include "gd_script.h"
+#include "global_constants.h"
#include "os/file_access.h"
#include "project_settings.h"
+
#ifdef TOOLS_ENABLED
#include "editor/editor_file_system.h"
#include "editor/editor_settings.h"
@@ -294,23 +297,25 @@ void GDScriptLanguage::get_public_functions(List<MethodInfo> *p_functions) const
//not really "functions", but..
{
MethodInfo mi;
- mi.name = "preload:Resource";
+ mi.name = "preload";
mi.arguments.push_back(PropertyInfo(Variant::STRING, "path"));
mi.return_val = PropertyInfo(Variant::OBJECT, "", PROPERTY_HINT_RESOURCE_TYPE, "Resource");
p_functions->push_back(mi);
}
{
MethodInfo mi;
- mi.name = "yield:GDFunctionState";
+ mi.name = "yield";
mi.arguments.push_back(PropertyInfo(Variant::OBJECT, "object"));
mi.arguments.push_back(PropertyInfo(Variant::STRING, "signal"));
mi.default_arguments.push_back(Variant::NIL);
mi.default_arguments.push_back(Variant::STRING);
+ mi.return_val = PropertyInfo(Variant::OBJECT, "", PROPERTY_HINT_RESOURCE_TYPE, "GDFunctionState");
p_functions->push_back(mi);
}
{
MethodInfo mi;
mi.name = "assert";
+ mi.return_val.type = Variant::NIL;
mi.arguments.push_back(PropertyInfo(Variant::BOOL, "condition"));
p_functions->push_back(mi);
}
@@ -355,13 +360,14 @@ String GDScriptLanguage::make_function(const String &p_class, const String &p_na
struct GDCompletionIdentifier {
+ String enumeration;
StringName obj_type;
Ref<GDScript> script;
Variant::Type type;
Variant value; //im case there is a value, also return it
};
-static GDCompletionIdentifier _get_type_from_variant(const Variant &p_variant) {
+static GDCompletionIdentifier _get_type_from_variant(const Variant &p_variant, bool p_allow_gdnative_class = false) {
GDCompletionIdentifier t;
t.type = p_variant.get_type();
@@ -369,14 +375,14 @@ static GDCompletionIdentifier _get_type_from_variant(const Variant &p_variant) {
if (p_variant.get_type() == Variant::OBJECT) {
Object *obj = p_variant;
if (obj) {
- /*
- if (obj->cast_to<GDNativeClass>()) {
- t.obj_type=obj->cast_to<GDNativeClass>()->get_name();
- t.value=Variant();
+
+ if (p_allow_gdnative_class && Object::cast_to<GDNativeClass>(obj)) {
+ t.obj_type = Object::cast_to<GDNativeClass>(obj)->get_name();
+ t.value = Variant();
} else {
- */
- t.obj_type = obj->get_class();
- //}
+
+ t.obj_type = obj->get_class();
+ }
}
}
return t;
@@ -509,9 +515,9 @@ static GDCompletionIdentifier _get_native_class(GDCompletionContext &context) {
return id;
}
-static bool _guess_identifier_type(GDCompletionContext &context, int p_line, const StringName &p_identifier, GDCompletionIdentifier &r_type);
+static bool _guess_identifier_type(GDCompletionContext &context, int p_line, const StringName &p_identifier, GDCompletionIdentifier &r_type, bool p_for_indexing);
-static bool _guess_expression_type(GDCompletionContext &context, const GDParser::Node *p_node, int p_line, GDCompletionIdentifier &r_type) {
+static bool _guess_expression_type(GDCompletionContext &context, const GDParser::Node *p_node, int p_line, GDCompletionIdentifier &r_type, bool p_for_indexing = false) {
if (p_node->type == GDParser::Node::TYPE_CONSTANT) {
@@ -562,7 +568,7 @@ static bool _guess_expression_type(GDCompletionContext &context, const GDParser:
return true;
} else if (p_node->type == GDParser::Node::TYPE_IDENTIFIER) {
- return _guess_identifier_type(context, p_line - 1, static_cast<const GDParser::IdentifierNode *>(p_node)->name, r_type);
+ return _guess_identifier_type(context, p_line - 1, static_cast<const GDParser::IdentifierNode *>(p_node)->name, r_type, p_for_indexing);
} else if (p_node->type == GDParser::Node::TYPE_SELF) {
//eeh...
@@ -573,6 +579,7 @@ static bool _guess_expression_type(GDCompletionContext &context, const GDParser:
const GDParser::OperatorNode *op = static_cast<const GDParser::OperatorNode *>(p_node);
if (op->op == GDParser::OperatorNode::OP_CALL) {
+
if (op->arguments[0]->type == GDParser::Node::TYPE_TYPE) {
const GDParser::TypeNode *tn = static_cast<const GDParser::TypeNode *>(op->arguments[0]);
@@ -585,22 +592,45 @@ static bool _guess_expression_type(GDCompletionContext &context, const GDParser:
} else if (op->arguments.size() > 1 && op->arguments[1]->type == GDParser::Node::TYPE_IDENTIFIER) {
+ StringName id = static_cast<const GDParser::IdentifierNode *>(op->arguments[1])->name;
+
+ if (op->arguments[0]->type == GDParser::Node::TYPE_IDENTIFIER && String(id) == "new") {
+
+ //shortcut
+ StringName identifier = static_cast<const GDParser::IdentifierNode *>(op->arguments[0])->name;
+
+ if (ClassDB::class_exists(identifier)) {
+ r_type.type = Variant::OBJECT;
+ r_type.value = Variant();
+ r_type.obj_type = identifier;
+ return true;
+ }
+ }
+
GDCompletionIdentifier base;
if (!_guess_expression_type(context, op->arguments[0], p_line, base))
return false;
- StringName id = static_cast<const GDParser::IdentifierNode *>(op->arguments[1])->name;
-
if (base.type == Variant::OBJECT) {
if (id.operator String() == "new" && base.value.get_type() == Variant::OBJECT) {
+
Object *obj = base.value;
- if (obj && obj->cast_to<GDNativeClass>()) {
- GDNativeClass *gdnc = obj->cast_to<GDNativeClass>();
+ if (obj && Object::cast_to<GDNativeClass>(obj)) {
+ GDNativeClass *gdnc = Object::cast_to<GDNativeClass>(obj);
r_type.type = Variant::OBJECT;
r_type.value = Variant();
r_type.obj_type = gdnc->get_name();
return true;
+ } else {
+
+ if (base.obj_type != StringName()) {
+
+ r_type.type = Variant::OBJECT;
+ r_type.value = Variant();
+ r_type.obj_type = base.obj_type;
+ return true;
+ }
}
}
@@ -608,7 +638,7 @@ static bool _guess_expression_type(GDCompletionContext &context, const GDParser:
#ifdef TOOLS_ENABLED
MethodBind *mb = ClassDB::get_method(base.obj_type, id);
- PropertyInfo pi = mb->get_argument_info(-1);
+ PropertyInfo pi = mb->get_return_info();
//try calling the function if constant and all args are constant, should not crash..
Object *baseptr = base.value;
@@ -809,6 +839,47 @@ static bool _guess_expression_type(GDCompletionContext &context, const GDParser:
if (p1.value.get_type() == Variant::OBJECT) {
//??
+
+ if (p1.obj_type != StringName() && p2.type == Variant::STRING) {
+
+ StringName base_type = p1.obj_type;
+
+ if (p1.obj_type == "GDNativeClass") {
+ //native enum
+ Ref<GDNativeClass> gdn = p1.value;
+ if (gdn.is_valid()) {
+
+ base_type = gdn->get_name();
+ }
+ }
+ StringName index = p2.value;
+ bool valid;
+ Variant::Type t = ClassDB::get_property_type(base_type, index, &valid);
+ if (t != Variant::NIL && valid) {
+ r_type.type = t;
+ if (t == Variant::INT || t == Variant::OBJECT) {
+//check for enum!
+#if defined(DEBUG_METHODS_ENABLED) && defined(TOOLS_ENABLED)
+
+ StringName getter = ClassDB::get_property_getter(base_type, index);
+ if (getter != StringName()) {
+ MethodBind *mb = ClassDB::get_method(base_type, getter);
+ if (mb) {
+ PropertyInfo rt = mb->get_return_info();
+ if (rt.usage & PROPERTY_USAGE_CLASS_IS_ENUM && t == Variant::INT) {
+ r_type.enumeration = rt.class_name;
+ } else if (t == Variant::OBJECT) {
+
+ r_type.obj_type = rt.class_name;
+ }
+ }
+ }
+#endif
+ }
+
+ return true;
+ }
+ }
} else if (p1.value.get_type() != Variant::NIL) {
bool valid;
@@ -902,12 +973,42 @@ static bool _guess_expression_type(GDCompletionContext &context, const GDParser:
static bool _guess_identifier_type_in_block(GDCompletionContext &context, int p_line, const StringName &p_identifier, GDCompletionIdentifier &r_type) {
+ if (context.block->if_condition && context.block->if_condition->type == GDParser::Node::TYPE_OPERATOR && static_cast<const GDParser::OperatorNode *>(context.block->if_condition)->op == GDParser::OperatorNode::OP_IS) {
+ //is used, check if identifier is in there! this helps resolve in blocks that are (if (identifier is value)): which are very common..
+ //super dirty hack, but very useful
+ //credit: Zylann
+ //TODO: this could be hacked to detect ANDed conditions too..
+ const GDParser::OperatorNode *op = static_cast<const GDParser::OperatorNode *>(context.block->if_condition);
+ if (op->arguments[0]->type == GDParser::Node::TYPE_IDENTIFIER && static_cast<const GDParser::IdentifierNode *>(op->arguments[0])->name == p_identifier) {
+ //bingo
+ if (_guess_expression_type(context, op->arguments[1], op->line, r_type)) {
+ return true;
+ }
+ }
+ }
+
GDCompletionIdentifier gdi = _get_native_class(context);
if (gdi.obj_type != StringName()) {
bool valid;
Variant::Type t = ClassDB::get_property_type(gdi.obj_type, p_identifier, &valid);
if (t != Variant::NIL && valid) {
r_type.type = t;
+ if (t == Variant::INT) {
+//check for enum!
+#if defined(DEBUG_METHODS_ENABLED) && defined(TOOLS_ENABLED)
+
+ StringName getter = ClassDB::get_property_getter(gdi.obj_type, p_identifier);
+ if (getter != StringName()) {
+ MethodBind *mb = ClassDB::get_method(gdi.obj_type, getter);
+ if (mb) {
+ PropertyInfo rt = mb->get_return_info();
+ if (rt.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
+ r_type.enumeration = rt.class_name;
+ }
+ }
+ }
+#endif
+ }
return true;
}
}
@@ -997,7 +1098,7 @@ static bool _guess_identifier_from_assignment_in_function(GDCompletionContext &c
return false;
}
-static bool _guess_identifier_type(GDCompletionContext &context, int p_line, const StringName &p_identifier, GDCompletionIdentifier &r_type) {
+static bool _guess_identifier_type(GDCompletionContext &context, int p_line, const StringName &p_identifier, GDCompletionIdentifier &r_type, bool p_for_indexing) {
//go to block first
@@ -1041,11 +1142,11 @@ static bool _guess_identifier_type(GDCompletionContext &context, int p_line, con
PropertyInfo arg = E->get().arguments[argindex];
- int scp = arg.name.find(":");
+ int scp = String(arg.name).find(":");
if (scp != -1) {
r_type.type = Variant::OBJECT;
- r_type.obj_type = arg.name.substr(scp + 1, arg.name.length());
+ r_type.obj_type = String(arg.name).substr(scp + 1, String(arg.name).length());
return true;
} else {
@@ -1151,7 +1252,7 @@ static bool _guess_identifier_type(GDCompletionContext &context, int p_line, con
for (Map<StringName, int>::Element *E = GDScriptLanguage::get_singleton()->get_global_map().front(); E; E = E->next()) {
if (E->key() == p_identifier) {
- r_type = _get_type_from_variant(GDScriptLanguage::get_singleton()->get_global_array()[E->get()]);
+ r_type = _get_type_from_variant(GDScriptLanguage::get_singleton()->get_global_array()[E->get()], !p_for_indexing);
return true;
}
}
@@ -1271,7 +1372,7 @@ static void _find_identifiers_in_class(GDCompletionContext &context, bool p_stat
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
if (E->get().usage & (PROPERTY_USAGE_GROUP | PROPERTY_USAGE_CATEGORY))
continue;
- if (E->get().name.find("/") != -1)
+ if (String(E->get().name).find("/") != -1)
continue;
result.insert(E->get().name);
}
@@ -1436,7 +1537,7 @@ void get_directory_contents(EditorFileSystemDirectory *p_dir, Set<String> &r_lis
}
}
-static void _find_type_arguments(GDCompletionContext &context, const GDParser::Node *p_node, int p_line, const StringName &p_method, const GDCompletionIdentifier &id, int p_argidx, Set<String> &result, String &arghint) {
+static void _find_type_arguments(GDCompletionContext &context, const GDParser::Node *p_node, int p_line, const StringName &p_method, const GDCompletionIdentifier &id, int p_argidx, Set<String> &result, bool &r_forced, String &arghint) {
//print_line("find type arguments?");
if (id.type == Variant::OBJECT && id.obj_type != StringName()) {
@@ -1451,46 +1552,45 @@ static void _find_type_arguments(GDCompletionContext &context, const GDParser::N
if (id.value.get_type()) {
Object *obj = id.value;
- if (obj) {
-
- GDScript *scr = obj->cast_to<GDScript>();
- if (scr) {
- while (scr) {
+ GDScript *scr = Object::cast_to<GDScript>(obj);
+ if (scr) {
+ while (scr) {
- for (const Map<StringName, GDFunction *>::Element *E = scr->get_member_functions().front(); E; E = E->next()) {
- if (E->get()->is_static() && p_method == E->get()->get_name()) {
- arghint = "static func " + String(p_method) + "(";
- for (int i = 0; i < E->get()->get_argument_count(); i++) {
- if (i > 0)
- arghint += ", ";
- else
- arghint += " ";
- if (i == p_argidx) {
- arghint += String::chr(0xFFFF);
- }
- arghint += "var " + E->get()->get_argument_name(i);
- int deffrom = E->get()->get_argument_count() - E->get()->get_default_argument_count();
- if (i >= deffrom) {
- int defidx = deffrom - i;
- if (defidx >= 0 && defidx < E->get()->get_default_argument_count()) {
- arghint += "=" + E->get()->get_default_argument(defidx).get_construct_string();
- }
- }
- if (i == p_argidx) {
- arghint += String::chr(0xFFFF);
+ for (const Map<StringName, GDFunction *>::Element *E = scr->get_member_functions().front(); E; E = E->next()) {
+ if (E->get()->is_static() && p_method == E->get()->get_name()) {
+ arghint = "static func " + String(p_method) + "(";
+ for (int i = 0; i < E->get()->get_argument_count(); i++) {
+ if (i > 0)
+ arghint += ", ";
+ else
+ arghint += " ";
+ if (i == p_argidx) {
+ arghint += String::chr(0xFFFF);
+ }
+ arghint += "var " + E->get()->get_argument_name(i);
+ int deffrom = E->get()->get_argument_count() - E->get()->get_default_argument_count();
+ if (i >= deffrom) {
+ int defidx = deffrom - i;
+ if (defidx >= 0 && defidx < E->get()->get_default_argument_count()) {
+ arghint += "=" + E->get()->get_default_argument(defidx).get_construct_string();
}
}
- arghint += ")";
- return; //found
+ if (i == p_argidx) {
+ arghint += String::chr(0xFFFF);
+ }
}
+ arghint += ")";
+ return; //found
}
-
- if (scr->get_base().is_valid())
- scr = scr->get_base().ptr();
- else
- scr = NULL;
}
- } else {
+
+ if (scr->get_base().is_valid())
+ scr = scr->get_base().ptr();
+ else
+ scr = NULL;
+ }
+ } else {
+ if (obj) {
on_script = obj->get_script();
}
}
@@ -1616,21 +1716,6 @@ static void _find_type_arguments(GDCompletionContext &context, const GDParser::N
return; //found
}
}
-#if 0
- //use class directly, no code was found
- if (!isfunction) {
- for (const Map<StringName,Variant>::Element *E=scr->get_constants().front();E;E=E->next()) {
- options.insert(E->key());
- }
- }
- for (const Map<StringName,GDFunction>::Element *E=scr->get_member_functions().front();E;E=E->next()) {
- options.insert(String(E->key())+"(");
- }
-
- for (const Set<StringName>::Element *E=scr->get_members().front();E;E=E->next()) {
- options.insert(E->get());
- }
-#endif
}
if (scr->get_base().is_valid())
@@ -1642,8 +1727,43 @@ static void _find_type_arguments(GDCompletionContext &context, const GDParser::N
}
} else {
- //regular method
+//regular method
+#if defined(DEBUG_METHODS_ENABLED) && defined(TOOLS_ENABLED)
+ if (p_argidx < m->get_argument_count()) {
+ PropertyInfo pi = m->get_argument_info(p_argidx);
+
+ if (pi.usage & PROPERTY_USAGE_CLASS_IS_ENUM) {
+ String enumeration = pi.class_name;
+ if (enumeration.find(".") != -1) {
+ //class constant
+ List<StringName> constants;
+ String cls = enumeration.get_slice(".", 0);
+ String enm = enumeration.get_slice(".", 1);
+
+ ClassDB::get_enum_constants(cls, enm, &constants);
+ //constants.sort_custom<StringName::AlphCompare>();
+ for (List<StringName>::Element *E = constants.front(); E; E = E->next()) {
+ String add = cls + "." + E->get();
+ result.insert(add);
+ r_forced = true;
+ }
+ } else {
+
+ //global constant
+ StringName current_enum = enumeration;
+
+ for (int i = 0; i < GlobalConstants::get_global_constant_count(); i++) {
+ if (GlobalConstants::get_global_constant_enum(i) == current_enum) {
+ result.insert(GlobalConstants::get_global_constant_name(i));
+ r_forced = true;
+ }
+ }
+ //global
+ }
+ }
+ }
+#endif
if (p_method.operator String() == "connect" || (p_method.operator String() == "emit_signal" && p_argidx == 0)) {
if (p_argidx == 0) {
@@ -1664,6 +1784,7 @@ static void _find_type_arguments(GDCompletionContext &context, const GDParser::N
for (List<MethodInfo>::Element *E = sigs.front(); E; E = E->next()) {
result.insert("\"" + E->get().name + "\"");
+ r_forced = true;
}
} else if (p_argidx == 2) {
@@ -1671,6 +1792,7 @@ static void _find_type_arguments(GDCompletionContext &context, const GDParser::N
if (context._class) {
for (int i = 0; i < context._class->functions.size(); i++) {
result.insert("\"" + context._class->functions[i]->name + "\"");
+ r_forced = true;
}
}
}
@@ -1696,6 +1818,7 @@ static void _find_type_arguments(GDCompletionContext &context, const GDParser::N
//print_line("found "+s);
String name = s.get_slice("/", 1);
result.insert("\"/root/" + name + "\"");
+ r_forced = true;
}
}
@@ -1707,11 +1830,12 @@ static void _find_type_arguments(GDCompletionContext &context, const GDParser::N
for (List<String>::Element *E = options.front(); E; E = E->next()) {
result.insert(E->get());
+ r_forced = true;
}
}
}
- arghint = _get_visual_datatype(m->get_argument_info(-1), false) + " " + p_method.operator String() + String("(");
+ arghint = _get_visual_datatype(m->get_return_info(), false) + " " + p_method.operator String() + String("(");
for (int i = 0; i < m->get_argument_count(); i++) {
if (i > 0)
@@ -1750,7 +1874,7 @@ static void _find_type_arguments(GDCompletionContext &context, const GDParser::N
}
}
-static void _find_call_arguments(GDCompletionContext &context, const GDParser::Node *p_node, int p_line, int p_argidx, Set<String> &result, String &arghint) {
+static void _find_call_arguments(GDCompletionContext &context, const GDParser::Node *p_node, int p_line, int p_argidx, Set<String> &result, bool &r_forced, String &arghint) {
if (!p_node || p_node->type != GDParser::Node::TYPE_OPERATOR) {
@@ -1779,11 +1903,11 @@ static void _find_call_arguments(GDCompletionContext &context, const GDParser::N
arghint += ", ";
else
arghint += " ";
- if (i == p_argidx) {
+ if (i == p_argidx || (mi.flags & METHOD_FLAG_VARARG && i > p_argidx)) {
arghint += String::chr(0xFFFF);
}
arghint += _get_visual_datatype(mi.arguments[i]) + " " + mi.arguments[i].name;
- if (i == p_argidx) {
+ if (i == p_argidx || (mi.flags & METHOD_FLAG_VARARG && i > p_argidx)) {
arghint += String::chr(0xFFFF);
}
}
@@ -1905,7 +2029,7 @@ static void _find_call_arguments(GDCompletionContext &context, const GDParser::N
if (!context._class->owner)
ci.value = context.base;
- _find_type_arguments(context, p_node, p_line, id->name, ci, p_argidx, result, arghint);
+ _find_type_arguments(context, p_node, p_line, id->name, ci, p_argidx, result, r_forced, arghint);
//guess type..
/*
List<MethodInfo> methods;
@@ -1927,114 +2051,21 @@ static void _find_call_arguments(GDCompletionContext &context, const GDParser::N
GDCompletionIdentifier ci;
if (_guess_expression_type(context, op->arguments[0], p_line, ci)) {
- _find_type_arguments(context, p_node, p_line, id->name, ci, p_argidx, result, arghint);
+ _find_type_arguments(context, p_node, p_line, id->name, ci, p_argidx, result, r_forced, arghint);
return;
}
}
}
-#if 0
- bool _static=context.function->_static;
-
-
-
-
- for(int i=0;i<context._class->static_functions.size();i++) {
- if (context._class->static_functions[i]->arguments.size())
- result.insert(context._class->static_functions[i]->name.operator String()+"(");
- else
- result.insert(context._class->static_functions[i]->name.operator String()+"()");
- }
-
- if (!p_static) {
-
- for(int i=0;i<context._class->functions.size();i++) {
- if (context._class->functions[i]->arguments.size())
- result.insert(context._class->functions[i]->name.operator String()+"(");
- else
- result.insert(context._class->functions[i]->name.operator String()+"()");
- }
- }
-
- Ref<Reference> base = _get_parent_class(context);
-
- while(true) {
-
- Ref<GDScript> script = base;
- Ref<GDNativeClass> nc = base;
- if (script.is_valid()) {
-
- if (!p_static && !p_only_functions) {
- for (const Set<StringName>::Element *E=script->get_members().front();E;E=E->next()) {
- result.insert(E->get().operator String());
- }
- }
-
- if (!p_only_functions) {
- for (const Map<StringName,Variant>::Element *E=script->get_constants().front();E;E=E->next()) {
- result.insert(E->key().operator String());
- }
- }
-
- for (const Map<StringName,GDFunction>::Element *E=script->get_member_functions().front();E;E=E->next()) {
- if (!p_static || E->get().is_static()) {
- if (E->get().get_argument_count())
- result.insert(E->key().operator String()+"(");
- else
- result.insert(E->key().operator String()+"()");
- }
- }
-
- if (!p_only_functions) {
- for (const Map<StringName,Ref<GDScript> >::Element *E=script->get_subclasses().front();E;E=E->next()) {
- result.insert(E->key().operator String());
- }
- }
-
- base=script->get_base();
- if (base.is_null())
- base=script->get_native();
- } else if (nc.is_valid()) {
-
- if (!p_only_functions) {
-
- StringName type = nc->get_name();
- List<String> constants;
- ClassDB::get_integer_constant_list(type,&constants);
- for(List<String>::Element *E=constants.front();E;E=E->next()) {
- result.insert(E->get());
- }
-
- List<MethodInfo> methods;
- ClassDB::get_method_list(type,&methods);
- for(List<MethodInfo>::Element *E=methods.front();E;E=E->next()) {
- if (E->get().arguments.size())
- result.insert(E->get().name+"(");
- else
- result.insert(E->get().name+"()");
- }
- }
- break;
- } else
- break;
-
- }
-
- for(int i=0;i<GDFunctions::FUNC_MAX;i++) {
-
- result.insert(GDFunctions::get_func_name(GDFunctions::Function(i)));
- }
-
-#endif
}
-Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base_path, Object *p_owner, List<String> *r_options, String &r_call_hint) {
+Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base_path, Object *p_owner, List<String> *r_options, bool &r_forced, String &r_call_hint) {
GDParser p;
p.parse(p_code, p_base_path, false, "", true);
bool isfunction = false;
Set<String> options;
-
+ r_forced = false;
GDCompletionContext context;
context._class = p.get_completion_class();
context.block = p.get_completion_block();
@@ -2073,6 +2104,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
String opt = E->get().strip_edges();
if (opt.begins_with("\"") && opt.ends_with("\"")) {
+ r_forced = true;
String idopt = opt.substr(1, opt.length() - 2);
if (idopt.replace("/", "_").is_valid_identifier()) {
options.insert(idopt);
@@ -2092,7 +2124,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
break;
GDCompletionIdentifier t;
- if (_guess_expression_type(context, static_cast<const GDParser::OperatorNode *>(node)->arguments[0], p.get_completion_line(), t)) {
+ if (_guess_expression_type(context, static_cast<const GDParser::OperatorNode *>(node)->arguments[0], p.get_completion_line(), t, true)) {
if (t.type == Variant::OBJECT && t.obj_type == "GDNativeClass") {
//native enum
@@ -2111,7 +2143,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
if (E->get().usage & (PROPERTY_USAGE_GROUP | PROPERTY_USAGE_CATEGORY))
continue;
- if (E->get().name.find("/") != -1)
+ if (String(E->get().name).find("/") != -1)
continue;
options.insert(E->get().name);
}
@@ -2123,28 +2155,27 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
if (t.value.get_type()) {
Object *obj = t.value;
- if (obj) {
-
- GDScript *scr = obj->cast_to<GDScript>();
- if (scr) {
- while (scr) {
+ GDScript *scr = Object::cast_to<GDScript>(obj);
+ if (scr) {
+ while (scr) {
- if (!isfunction) {
- for (const Map<StringName, Variant>::Element *E = scr->get_constants().front(); E; E = E->next()) {
- options.insert(E->key());
- }
+ if (!isfunction) {
+ for (const Map<StringName, Variant>::Element *E = scr->get_constants().front(); E; E = E->next()) {
+ options.insert(E->key());
}
- for (const Map<StringName, GDFunction *>::Element *E = scr->get_member_functions().front(); E; E = E->next()) {
- if (E->get()->is_static())
- options.insert(E->key());
- }
-
- if (scr->get_base().is_valid())
- scr = scr->get_base().ptr();
- else
- scr = NULL;
}
- } else {
+ for (const Map<StringName, GDFunction *>::Element *E = scr->get_member_functions().front(); E; E = E->next()) {
+ if (E->get()->is_static())
+ options.insert(E->key());
+ }
+
+ if (scr->get_base().is_valid())
+ scr = scr->get_base().ptr();
+ else
+ scr = NULL;
+ }
+ } else {
+ if (obj) {
on_script = obj->get_script();
}
}
@@ -2245,7 +2276,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
if (E->get().usage & (PROPERTY_USAGE_GROUP | PROPERTY_USAGE_CATEGORY))
continue;
- if (E->get().name.find("/") != -1)
+ if (String(E->get().name).find("/") != -1)
continue;
r_options->push_back(E->get().name);
}
@@ -2277,7 +2308,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
t.value.get_property_list(&pl);
for (List<PropertyInfo>::Element *E = pl.front(); E; E = E->next()) {
- if (E->get().name.find("/") == -1)
+ if (String(E->get().name).find("/") == -1)
options.insert(E->get().name);
}
}
@@ -2297,7 +2328,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
} break;
case GDParser::COMPLETION_CALL_ARGUMENTS: {
- _find_call_arguments(context, p.get_completion_node(), p.get_completion_line(), p.get_completion_argument_index(), options, r_call_hint);
+ _find_call_arguments(context, p.get_completion_node(), p.get_completion_line(), p.get_completion_argument_index(), options, r_forced, r_call_hint);
} break;
case GDParser::COMPLETION_VIRTUAL_FUNC: {
@@ -2344,6 +2375,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
ClassDB::get_signal_list(t.obj_type, &sigs);
for (List<MethodInfo>::Element *E = sigs.front(); E; E = E->next()) {
options.insert("\"" + E->get().name + "\"");
+ r_forced = true;
}
}
@@ -2353,6 +2385,42 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
if (EditorSettings::get_singleton()->get("text_editor/completion/complete_file_paths"))
get_directory_contents(EditorFileSystem::get_singleton()->get_filesystem(), options);
} break;
+ case GDParser::COMPLETION_ASSIGN: {
+#if defined(DEBUG_METHODS_ENABLED) && defined(TOOLS_ENABLED)
+
+ GDCompletionIdentifier ci;
+ if (_guess_expression_type(context, p.get_completion_node(), p.get_completion_line(), ci)) {
+
+ String enumeration = ci.enumeration;
+ if (enumeration.find(".") != -1) {
+ //class constant
+ List<StringName> constants;
+ String cls = enumeration.get_slice(".", 0);
+ String enm = enumeration.get_slice(".", 1);
+
+ ClassDB::get_enum_constants(cls, enm, &constants);
+ //constants.sort_custom<StringName::AlphCompare>();
+ for (List<StringName>::Element *E = constants.front(); E; E = E->next()) {
+ String add = cls + "." + E->get();
+ r_options->push_back(add);
+ r_forced = true;
+ }
+ } else {
+
+ //global constant
+ StringName current_enum = enumeration;
+
+ for (int i = 0; i < GlobalConstants::get_global_constant_count(); i++) {
+ if (GlobalConstants::get_global_constant_enum(i) == current_enum) {
+ r_options->push_back(GlobalConstants::get_global_constant_name(i));
+ r_forced = true;
+ }
+ }
+ //global
+ }
+ }
+#endif
+ } break;
}
for (Set<String>::Element *E = options.front(); E; E = E->next()) {
@@ -2364,7 +2432,7 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
#else
-Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base_path, Object *p_owner, List<String> *r_options, String &r_call_hint) {
+Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base_path, Object *p_owner, List<String> *r_options, bool &r_forced, String &r_call_hint) {
return OK;
}
@@ -2701,9 +2769,9 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol
Object *obj = value;
if (obj) {
- if (obj->cast_to<GDNativeClass>()) {
+ if (Object::cast_to<GDNativeClass>(obj)) {
r_result.type = ScriptLanguage::LookupResult::RESULT_CLASS;
- r_result.class_name = obj->cast_to<GDNativeClass>()->get_name();
+ r_result.class_name = Object::cast_to<GDNativeClass>(obj)->get_name();
} else {
r_result.type = ScriptLanguage::LookupResult::RESULT_CLASS;
@@ -2720,18 +2788,6 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol
}
}
}
-#if 0
- GDCompletionIdentifier identifier;
- if (_guess_identifier_type(context,p.get_completion_line(),p_symbol,identifier)) {
-
- print_line("var type: "+Variant::get_type_name(identifier.type));
- if (identifier.script.is_valid()) {
- print_line("var script: "+identifier.script->get_path());
- }
- print_line("obj type: "+String(identifier.obj_type));
- print_line("value: "+String(identifier.value));
- }
-#endif
}
} break;
diff --git a/modules/gdscript/gd_function.cpp b/modules/gdscript/gd_function.cpp
index 13a7480a36..ddee7b2521 100644
--- a/modules/gdscript/gd_function.cpp
+++ b/modules/gdscript/gd_function.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -290,8 +290,8 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
#ifdef DEBUG_ENABLED
- uint64_t function_start_time;
- uint64_t function_call_time;
+ uint64_t function_start_time = 0;
+ uint64_t function_call_time = 0;
if (GDScriptLanguage::get_singleton()->profiling) {
function_start_time = OS::get_singleton()->get_ticks_usec();
@@ -371,7 +371,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
Object *obj_A = *a;
Object *obj_B = *b;
- GDScript *scr_B = obj_B->cast_to<GDScript>();
+ GDScript *scr_B = Object::cast_to<GDScript>(obj_B);
bool extends_ok = false;
@@ -397,7 +397,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
} else {
- GDNativeClass *nc = obj_B->cast_to<GDNativeClass>();
+ GDNativeClass *nc = Object::cast_to<GDNativeClass>(obj_B);
if (!nc) {
@@ -691,7 +691,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
}
#ifdef DEBUG_ENABLED
- uint64_t call_time;
+ uint64_t call_time = 0;
if (GDScriptLanguage::get_singleton()->profiling) {
call_time = OS::get_singleton()->get_ticks_usec();
@@ -1026,7 +1026,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
}
case OPCODE_ITERATE_BEGIN: {
- CHECK_SPACE(8); //space for this an regular iterate
+ CHECK_SPACE(8); //space for this a regular iterate
GET_VARIANT_PTR(counter, 1);
GET_VARIANT_PTR(container, 2);
@@ -1319,22 +1319,6 @@ void GDFunction::debug_get_stack_member_state(int p_line, List<Pair<StringName,
}
}
-#if 0
-void GDFunction::clear() {
-
- name=StringName();
- constants.clear();
- _stack_size=0;
- code.clear();
- _constants_ptr=NULL;
- _constant_count=0;
- _global_names_ptr=NULL;
- _global_names_count=0;
- _code_ptr=NULL;
- _code_size=0;
-
-}
-#endif
GDFunction::GDFunction()
: function_list(this) {
@@ -1434,7 +1418,7 @@ Variant GDFunctionState::_signal_callback(const Variant **p_args, int p_argcount
// If the return value is a GDFunctionState reference,
// then the function did yield again after resuming.
if (ret.is_ref()) {
- GDFunctionState *gdfs = ret.operator Object *()->cast_to<GDFunctionState>();
+ GDFunctionState *gdfs = Object::cast_to<GDFunctionState>(ret);
if (gdfs && gdfs->function == function)
completed = false;
}
@@ -1490,7 +1474,7 @@ Variant GDFunctionState::resume(const Variant &p_arg) {
// If the return value is a GDFunctionState reference,
// then the function did yield again after resuming.
if (ret.is_ref()) {
- GDFunctionState *gdfs = ret.operator Object *()->cast_to<GDFunctionState>();
+ GDFunctionState *gdfs = Object::cast_to<GDFunctionState>(ret);
if (gdfs && gdfs->function == function)
completed = false;
}
diff --git a/modules/gdscript/gd_function.h b/modules/gdscript/gd_function.h
index 661de0acce..bf5ff5f8da 100644
--- a/modules/gdscript/gd_function.h
+++ b/modules/gdscript/gd_function.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdscript/gd_functions.cpp b/modules/gdscript/gd_functions.cpp
index 65f0cbbe7d..f0cfdd6258 100644
--- a/modules/gdscript/gd_functions.cpp
+++ b/modules/gdscript/gd_functions.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -1572,43 +1572,49 @@ MethodInfo GDFunctions::get_info(Function p_func) {
} break;
case TEXT_STR: {
- MethodInfo mi("str", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "..."));
+ MethodInfo mi("str");
mi.return_val.type = Variant::STRING;
+ mi.flags |= METHOD_FLAG_VARARG;
return mi;
} break;
case TEXT_PRINT: {
- MethodInfo mi("print", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "..."));
+ MethodInfo mi("print");
mi.return_val.type = Variant::NIL;
+ mi.flags |= METHOD_FLAG_VARARG;
return mi;
} break;
case TEXT_PRINT_TABBED: {
- MethodInfo mi("printt", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "..."));
+ MethodInfo mi("printt");
mi.return_val.type = Variant::NIL;
+ mi.flags |= METHOD_FLAG_VARARG;
return mi;
} break;
case TEXT_PRINT_SPACED: {
- MethodInfo mi("prints", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "..."));
+ MethodInfo mi("prints");
mi.return_val.type = Variant::NIL;
+ mi.flags |= METHOD_FLAG_VARARG;
return mi;
} break;
case TEXT_PRINTERR: {
- MethodInfo mi("printerr", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "..."));
+ MethodInfo mi("printerr");
mi.return_val.type = Variant::NIL;
+ mi.flags |= METHOD_FLAG_VARARG;
return mi;
} break;
case TEXT_PRINTRAW: {
- MethodInfo mi("printraw", PropertyInfo(Variant::NIL, "what"), PropertyInfo(Variant::NIL, "..."));
+ MethodInfo mi("printraw");
mi.return_val.type = Variant::NIL;
+ mi.flags |= METHOD_FLAG_VARARG;
return mi;
} break;
@@ -1620,8 +1626,9 @@ MethodInfo GDFunctions::get_info(Function p_func) {
} break;
case STR_TO_VAR: {
- MethodInfo mi("str2var:Variant", PropertyInfo(Variant::STRING, "string"));
+ MethodInfo mi(Variant::NIL, "str2var", PropertyInfo(Variant::STRING, "string"));
mi.return_val.type = Variant::NIL;
+ mi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
return mi;
} break;
case VAR_TO_BYTES: {
@@ -1632,14 +1639,16 @@ MethodInfo GDFunctions::get_info(Function p_func) {
} break;
case BYTES_TO_VAR: {
- MethodInfo mi("bytes2var:Variant", PropertyInfo(Variant::POOL_BYTE_ARRAY, "bytes"));
+ MethodInfo mi(Variant::NIL, "bytes2var", PropertyInfo(Variant::POOL_BYTE_ARRAY, "bytes"));
mi.return_val.type = Variant::NIL;
+ mi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
return mi;
} break;
case GEN_RANGE: {
- MethodInfo mi("range", PropertyInfo(Variant::NIL, "..."));
+ MethodInfo mi("range");
mi.return_val.type = Variant::ARRAY;
+ mi.flags |= METHOD_FLAG_VARARG;
return mi;
} break;
case RESOURCE_LOAD: {
@@ -1663,14 +1672,15 @@ MethodInfo GDFunctions::get_info(Function p_func) {
} break;
case VALIDATE_JSON: {
- MethodInfo mi("validate_json:Variant", PropertyInfo(Variant::STRING, "json"));
+ MethodInfo mi("validate_json", PropertyInfo(Variant::STRING, "json"));
mi.return_val.type = Variant::STRING;
return mi;
} break;
case PARSE_JSON: {
- MethodInfo mi("parse_json:Variant", PropertyInfo(Variant::STRING, "json"));
+ MethodInfo mi(Variant::NIL, "parse_json", PropertyInfo(Variant::STRING, "json"));
mi.return_val.type = Variant::NIL;
+ mi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
return mi;
} break;
case TO_JSON: {
diff --git a/modules/gdscript/gd_functions.h b/modules/gdscript/gd_functions.h
index 11dfbd473c..a568c8f1cf 100644
--- a/modules/gdscript/gd_functions.h
+++ b/modules/gdscript/gd_functions.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp
index b349b6b9a8..72c3f9612a 100644
--- a/modules/gdscript/gd_parser.cpp
+++ b/modules/gdscript/gd_parser.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -1044,6 +1044,7 @@ GDParser::Node *GDParser::_parse_expression(Node *p_parent, bool p_static, bool
return NULL; \
} \
p_allow_assign = false;
+
switch (tokenizer->get_token()) { //see operator
case GDTokenizer::TK_OP_IN: op = OperatorNode::OP_IN; break;
@@ -1065,7 +1066,22 @@ GDParser::Node *GDParser::_parse_expression(Node *p_parent, bool p_static, bool
//case GDTokenizer::TK_OP_NEG: op=OperatorNode::OP_NEG ; break;
case GDTokenizer::TK_OP_SHIFT_LEFT: op = OperatorNode::OP_SHIFT_LEFT; break;
case GDTokenizer::TK_OP_SHIFT_RIGHT: op = OperatorNode::OP_SHIFT_RIGHT; break;
- case GDTokenizer::TK_OP_ASSIGN: _VALIDATE_ASSIGN op = OperatorNode::OP_ASSIGN; break;
+ case GDTokenizer::TK_OP_ASSIGN: {
+ _VALIDATE_ASSIGN op = OperatorNode::OP_ASSIGN;
+
+ if (tokenizer->get_token(1) == GDTokenizer::TK_CURSOR) {
+ //code complete assignment
+ completion_type = COMPLETION_ASSIGN;
+ completion_node = expr;
+ completion_class = current_class;
+ completion_function = current_function;
+ completion_line = tokenizer->get_token_line();
+ completion_block = current_block;
+ completion_found = true;
+ tokenizer->advance();
+ }
+
+ } break;
case GDTokenizer::TK_OP_ASSIGN_ADD: _VALIDATE_ASSIGN op = OperatorNode::OP_ASSIGN_ADD; break;
case GDTokenizer::TK_OP_ASSIGN_SUB: _VALIDATE_ASSIGN op = OperatorNode::OP_ASSIGN_SUB; break;
case GDTokenizer::TK_OP_ASSIGN_MUL: _VALIDATE_ASSIGN op = OperatorNode::OP_ASSIGN_MUL; break;
@@ -1268,7 +1284,7 @@ GDParser::Node *GDParser::_parse_expression(Node *p_parent, bool p_static, bool
if (expression[next_op + 1].is_op) {
// this is not invalid and can really appear
// but it becomes invalid anyway because no binary op
- // can be followed by an unary op in a valid combination,
+ // can be followed by a unary op in a valid combination,
// due to how precedence works, unaries will always disappear first
_set_error("Unexpected two consecutive operators after ternary if.");
@@ -1278,7 +1294,7 @@ GDParser::Node *GDParser::_parse_expression(Node *p_parent, bool p_static, bool
if (expression[next_op + 3].is_op) {
// this is not invalid and can really appear
// but it becomes invalid anyway because no binary op
- // can be followed by an unary op in a valid combination,
+ // can be followed by a unary op in a valid combination,
// due to how precedence works, unaries will always disappear first
_set_error("Unexpected two consecutive operators after ternary else.");
@@ -1315,7 +1331,7 @@ GDParser::Node *GDParser::_parse_expression(Node *p_parent, bool p_static, bool
if (expression[next_op + 1].is_op) {
// this is not invalid and can really appear
// but it becomes invalid anyway because no binary op
- // can be followed by an unary op in a valid combination,
+ // can be followed by a unary op in a valid combination,
// due to how precedence works, unaries will always disappear first
_set_error("Unexpected two consecutive operators.");
@@ -1841,7 +1857,7 @@ GDParser::PatternNode *GDParser::_parse_pattern(bool p_static) {
tokenizer->advance(1);
break;
} else {
- _set_error("'..' pattern only allowed at the end of an dictionary pattern");
+ _set_error("'..' pattern only allowed at the end of a dictionary pattern");
return NULL;
}
}
@@ -2454,6 +2470,8 @@ void GDParser::_parse_block(BlockNode *p_block, bool p_static) {
cf_if->body = alloc_node<BlockNode>();
cf_if->body->parent_block = p_block;
+ cf_if->body->if_condition = condition; //helps code completion
+
p_block->sub_blocks.push_back(cf_if->body);
if (!_enter_indent_block(cf_if->body)) {
@@ -3941,7 +3959,7 @@ void GDParser::_parse_class(ClassNode *p_class) {
member._export.usage |= PROPERTY_USAGE_SCRIPT_VARIABLE;
if (cn->value.get_type() == Variant::OBJECT) {
Object *obj = cn->value;
- Resource *res = obj->cast_to<Resource>();
+ Resource *res = Object::cast_to<Resource>(obj);
if (res == NULL) {
_set_error("Exported constant not a type or resource.");
return;
diff --git a/modules/gdscript/gd_parser.h b/modules/gdscript/gd_parser.h
index 3ad3466624..7e88fd9746 100644
--- a/modules/gdscript/gd_parser.h
+++ b/modules/gdscript/gd_parser.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -146,10 +146,13 @@ public:
Vector<StringName> variables;
Vector<int> variable_lines;
+ Node *if_condition; //tiny hack to improve code completion on if () blocks
+
//the following is useful for code completion
List<BlockNode *> sub_blocks;
int end_line;
BlockNode() {
+ if_condition = NULL;
type = TYPE_BLOCK;
end_line = -1;
parent_block = NULL;
@@ -441,6 +444,7 @@ public:
COMPLETION_INDEX,
COMPLETION_VIRTUAL_FUNC,
COMPLETION_YIELD,
+ COMPLETION_ASSIGN,
};
private:
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp
index 23201dc1b0..cf6529d5ae 100644
--- a/modules/gdscript/gd_script.cpp
+++ b/modules/gdscript/gd_script.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "gd_script.h"
+
#include "gd_compiler.h"
#include "global_constants.h"
#include "io/file_access_encrypted.h"
@@ -42,11 +43,6 @@ GDNativeClass::GDNativeClass(const StringName &p_name) {
name = p_name;
}
-/*void GDNativeClass::call_multilevel(const StringName& p_method,const Variant** p_args,int p_argcount){
-
-
-}*/
-
bool GDNativeClass::_get(const StringName &p_name, Variant &r_ret) const {
bool ok;
@@ -73,7 +69,7 @@ Variant GDNativeClass::_new() {
ERR_FAIL_COND_V(!o, Variant());
}
- Reference *ref = o->cast_to<Reference>();
+ Reference *ref = Object::cast_to<Reference>(o);
if (ref) {
return REF(ref);
} else {
@@ -161,7 +157,7 @@ Variant GDScript::_new(const Variant **p_args, int p_argcount, Variant::CallErro
owner = memnew(Reference); //by default, no base means use reference
}
- Reference *r = owner->cast_to<Reference>();
+ Reference *r = Object::cast_to<Reference>(owner);
if (r) {
ref = REF(r);
}
@@ -183,7 +179,6 @@ Variant GDScript::_new(const Variant **p_args, int p_argcount, Variant::CallErro
bool GDScript::can_instance() const {
- //return valid; //any script in GDscript can instance
return valid || (!tool && !ScriptServer::is_scripting_enabled());
}
@@ -218,49 +213,6 @@ void GDScript::_placeholder_erased(PlaceHolderScriptInstance *p_placeholder) {
placeholders.erase(p_placeholder);
}
-
-/*
-void GDScript::_update_placeholder(PlaceHolderScriptInstance *p_placeholder) {
-
-
- List<PropertyInfo> plist;
- GDScript *scr=this;
-
- Map<StringName,Variant> default_values;
- while(scr) {
-
- Vector<_GDScriptMemberSort> msort;
- for(Map<StringName,PropertyInfo>::Element *E=scr->member_info.front();E;E=E->next()) {
-
- _GDScriptMemberSort ms;
- ERR_CONTINUE(!scr->member_indices.has(E->key()));
- ms.index=scr->member_indices[E->key()].index;
- ms.name=E->key();
-
- msort.push_back(ms);
-
- }
-
- msort.sort();
- msort.invert();
- for(int i=0;i<msort.size();i++) {
-
- plist.push_front(scr->member_info[msort[i].name]);
- if (scr->member_default_values.has(msort[i].name))
- default_values[msort[i].name]=scr->member_default_values[msort[i].name];
- else {
- Variant::CallError err;
- default_values[msort[i].name]=Variant::construct(scr->member_info[msort[i].name].type,NULL,0,err);
- }
- }
-
- scr=scr->_base;
- }
-
-
- p_placeholder->update(plist,default_values);
-
-}*/
#endif
void GDScript::get_script_method_list(List<MethodInfo> *p_list) const {
@@ -397,7 +349,7 @@ ScriptInstance *GDScript::instance_create(Object *p_this) {
}
Variant::CallError unchecked_error;
- return _create_instance(NULL, 0, p_this, p_this->cast_to<Reference>(), unchecked_error);
+ return _create_instance(NULL, 0, p_this, Object::cast_to<Reference>(p_this), unchecked_error);
}
bool GDScript::instance_has(const Object *p_this) const {
@@ -428,7 +380,6 @@ void GDScript::set_source_code(const String &p_code) {
source = p_code;
#ifdef TOOLS_ENABLED
source_changed_cache = true;
-//print_line("SC CHANGED "+get_path());
#endif
}
@@ -575,9 +526,7 @@ void GDScript::update_exports() {
//print_line("update exports for "+get_path()+" ic: "+itos(copy.size()));
for (Set<ObjectID>::Element *E = copy.front(); E; E = E->next()) {
Object *id = ObjectDB::get_instance(E->get());
- if (!id)
- continue;
- GDScript *s = id->cast_to<GDScript>();
+ GDScript *s = Object::cast_to<GDScript>(id);
if (!s)
continue;
s->update_exports();
@@ -616,7 +565,7 @@ Error GDScript::reload(bool p_keep_state) {
if (basedir != "")
basedir = basedir.get_base_dir();
- if (basedir != "" && basedir.find("res://") == -1 && basedir.find("user://") == -1) {
+ if (source.find("%BASE%") != -1) {
//loading a template, don't parse
return OK;
}
@@ -657,12 +606,6 @@ Error GDScript::reload(bool p_keep_state) {
_set_subclass_path(E->get(), path);
}
-#ifdef TOOLS_ENABLED
-/*for (Set<PlaceHolderScriptInstance*>::Element *E=placeholders.front();E;E=E->next()) {
-
- _update_placeholder(E->get());
- }*/
-#endif
return OK;
}
@@ -1143,53 +1086,10 @@ void GDInstance::get_property_list(List<PropertyInfo> *p_properties) const {
props.push_front(sptr->member_info[msort[i].name]);
}
-#if 0
- if (sptr->member_functions.has("_get_property_list")) {
-
- Variant::CallError err;
- GDFunction *f = const_cast<GDFunction*>(sptr->member_functions["_get_property_list"]);
- Variant plv = f->call(const_cast<GDInstance*>(this),NULL,0,err);
-
- if (plv.get_type()!=Variant::ARRAY) {
-
- ERR_PRINT("_get_property_list: expected array returned");
- } else {
-
- Array pl=plv;
-
- for(int i=0;i<pl.size();i++) {
-
- Dictionary p = pl[i];
- PropertyInfo pinfo;
- if (!p.has("name")) {
- ERR_PRINT("_get_property_list: expected 'name' key of type string.")
- continue;
- }
- if (!p.has("type")) {
- ERR_PRINT("_get_property_list: expected 'type' key of type integer.")
- continue;
- }
- pinfo.name=p["name"];
- pinfo.type=Variant::Type(int(p["type"]));
- if (p.has("hint"))
- pinfo.hint=PropertyHint(int(p["hint"]));
- if (p.has("hint_string"))
- pinfo.hint_string=p["hint_string"];
- if (p.has("usage"))
- pinfo.usage=p["usage"];
-
-
- props.push_back(pinfo);
- }
- }
- }
-#endif
sptr = sptr->_base;
}
- //props.invert();
-
for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
p_properties->push_back(E->get());
@@ -1392,10 +1292,6 @@ GDInstance::~GDInstance() {
}
/************* SCRIPT LANGUAGE **************/
-/************* SCRIPT LANGUAGE **************/
-/************* SCRIPT LANGUAGE **************/
-/************* SCRIPT LANGUAGE **************/
-/************* SCRIPT LANGUAGE **************/
GDScriptLanguage *GDScriptLanguage::singleton = NULL;
@@ -2006,11 +1902,11 @@ Error ResourceFormatSaverGDScript::save(const String &p_path, const RES &p_resou
void ResourceFormatSaverGDScript::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const {
- if (p_resource->cast_to<GDScript>()) {
+ if (Object::cast_to<GDScript>(*p_resource)) {
p_extensions->push_back("gd");
}
}
bool ResourceFormatSaverGDScript::recognize(const RES &p_resource) const {
- return p_resource->cast_to<GDScript>() != NULL;
+ return Object::cast_to<GDScript>(*p_resource) != NULL;
}
diff --git a/modules/gdscript/gd_script.h b/modules/gdscript/gd_script.h
index 17e7b0bc03..6f05a4770b 100644
--- a/modules/gdscript/gd_script.h
+++ b/modules/gdscript/gd_script.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -390,7 +390,7 @@ public:
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 Error open_in_external_editor(const Ref<Script> &p_script, int p_line, int p_col) { return OK; }
- virtual Error complete_code(const String &p_code, const String &p_base_path, Object *p_owner, List<String> *r_options, String &r_call_hint);
+ virtual Error complete_code(const String &p_code, const String &p_base_path, Object *p_owner, List<String> *r_options, bool &r_forced, String &r_call_hint);
#ifdef TOOLS_ENABLED
virtual Error lookup_code(const String &p_code, const String &p_symbol, const String &p_base_path, Object *p_owner, LookupResult &r_result);
#endif
diff --git a/modules/gdscript/gd_tokenizer.cpp b/modules/gdscript/gd_tokenizer.cpp
index f70982d7c0..5f85158232 100644
--- a/modules/gdscript/gd_tokenizer.cpp
+++ b/modules/gdscript/gd_tokenizer.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "gd_tokenizer.h"
+
#include "gd_functions.h"
#include "io/marshalls.h"
#include "map.h"
@@ -504,7 +505,6 @@ void GDTokenizerText::_advance() {
_make_newline(i);
return;
}
-#if 1 //py style tokenizer
case '#': { // line comment skip
while (GETCHAR(0) != '\n') {
@@ -526,57 +526,9 @@ void GDTokenizerText::_advance() {
return;
} break;
-#endif
case '/': {
switch (GETCHAR(1)) {
-#if 0 // c style tokenizer
- case '*': { // block comment
- int pos = code_pos+2;
- int new_line=line;
- int new_col=column+2;
-
- while(true) {
- if (_code[pos]=='0') {
- _make_error("Unterminated Comment");
- code_pos=pos;
- return;
- }
- if (_code[pos]=='*' && _code[pos+1]=='/') {
- new_col+=2;
- pos+=2; //compensate
- break;
- } else if (_code[pos]=='\n') {
- new_line++;
- new_col=1;
- } else {
- new_col++;
- }
- pos++;
- }
-
- column=new_col;
- line=new_line;
- code_pos=pos;
- continue;
-
- } break;
- case '/': { // line comment skip
-
- while(GETCHAR(0)!='\n') {
- code_pos++;
- if (GETCHAR(0)==0) { //end of file
- _make_error("Unterminated Comment");
- return;
- }
- }
- INCPOS(1);
- column=1;
- line++;
- continue;
-
- } break;
-#endif
case '=': { // diveq
_make_token(TK_OP_ASSIGN_DIV);
diff --git a/modules/gdscript/gd_tokenizer.h b/modules/gdscript/gd_tokenizer.h
index 4e868301a3..c935ce45a1 100644
--- a/modules/gdscript/gd_tokenizer.h
+++ b/modules/gdscript/gd_tokenizer.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gdscript/register_types.cpp b/modules/gdscript/register_types.cpp
index 41ea0c2a26..036274c8f2 100644
--- a/modules/gdscript/register_types.cpp
+++ b/modules/gdscript/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -37,103 +37,7 @@
GDScriptLanguage *script_language_gd = NULL;
ResourceFormatLoaderGDScript *resource_loader_gd = NULL;
ResourceFormatSaverGDScript *resource_saver_gd = NULL;
-#if 0
-#ifdef TOOLS_ENABLED
-#include "editor/editor_import_export.h"
-#include "editor/editor_node.h"
-#include "editor/editor_settings.h"
-#include "gd_tokenizer.h"
-
-class EditorExportGDScript : public EditorExportPlugin {
-
- GDCLASS(EditorExportGDScript,EditorExportPlugin);
-
-public:
-
- virtual Vector<uint8_t> custom_export(String& p_path,const Ref<EditorExportPlatform> &p_platform) {
- //compile gdscript to bytecode
-
- if (EditorImportExport::get_singleton()->script_get_action()!=EditorImportExport::SCRIPT_ACTION_NONE) {
-
- if (p_path.ends_with(".gd")) {
- Vector<uint8_t> file = FileAccess::get_file_as_array(p_path);
- if (file.empty())
- return file;
- String txt;
- txt.parse_utf8((const char*)file.ptr(),file.size());
- file = GDTokenizerBuffer::parse_code_string(txt);
-
- if (!file.empty()) {
-
- if (EditorImportExport::get_singleton()->script_get_action()==EditorImportExport::SCRIPT_ACTION_ENCRYPT) {
-
- String tmp_path=EditorSettings::get_singleton()->get_settings_path().plus_file("tmp/script.gde");
- FileAccess *fa = FileAccess::open(tmp_path,FileAccess::WRITE);
- String skey=EditorImportExport::get_singleton()->script_get_encryption_key().to_lower();
- Vector<uint8_t> key;
- key.resize(32);
- for(int i=0;i<32;i++) {
- int v=0;
- if (i*2<skey.length()) {
- CharType ct = skey[i*2];
- if (ct>='0' && ct<='9')
- ct=ct-'0';
- else if (ct>='a' && ct<='f')
- ct=10+ct-'a';
- v|=ct<<4;
- }
-
- if (i*2+1<skey.length()) {
- CharType ct = skey[i*2+1];
- if (ct>='0' && ct<='9')
- ct=ct-'0';
- else if (ct>='a' && ct<='f')
- ct=10+ct-'a';
- v|=ct;
- }
- key[i]=v;
- }
- FileAccessEncrypted *fae=memnew(FileAccessEncrypted);
- Error err = fae->open_and_parse(fa,key,FileAccessEncrypted::MODE_WRITE_AES256);
- if (err==OK) {
-
- fae->store_buffer(file.ptr(),file.size());
- p_path=p_path.get_basename()+".gde";
- }
-
- memdelete(fae);
-
- file=FileAccess::get_file_as_array(tmp_path);
- return file;
-
-
- } else {
-
- p_path=p_path.get_basename()+".gdc";
- return file;
- }
- }
-
- }
- }
-
- return Vector<uint8_t>();
- }
-
-
- EditorExportGDScript(){}
-
-};
-
-static void register_editor_plugin() {
-
- Ref<EditorExportGDScript> egd = memnew( EditorExportGDScript );
- EditorImportExport::get_singleton()->add_export_plugin(egd);
-}
-
-#endif
-#endif
void register_gdscript_types() {
ClassDB::register_class<GDScript>();
@@ -146,13 +50,8 @@ void register_gdscript_types() {
ResourceLoader::add_resource_format_loader(resource_loader_gd);
resource_saver_gd = memnew(ResourceFormatSaverGDScript);
ResourceSaver::add_resource_format_saver(resource_saver_gd);
-#if 0
-#ifdef TOOLS_ENABLED
-
- EditorNode::add_init_callback(register_editor_plugin);
-#endif
-#endif
}
+
void unregister_gdscript_types() {
ScriptServer::unregister_language(script_language_gd);
diff --git a/modules/gdscript/register_types.h b/modules/gdscript/register_types.h
index 4e969f5bd4..a674877f37 100644
--- a/modules/gdscript/register_types.h
+++ b/modules/gdscript/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp
index 1205776882..1b932f040e 100644
--- a/modules/gridmap/grid_map.cpp
+++ b/modules/gridmap/grid_map.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -46,7 +46,13 @@ bool GridMap::_set(const StringName &p_name, const Variant &p_value) {
set_theme(p_value);
} else if (name == "cell_size") {
- set_cell_size(p_value);
+ if (p_value.get_type() == Variant::INT || p_value.get_type() == Variant::REAL) {
+ //compatibility
+ float cs = p_value;
+ set_cell_size(Vector3(cs, cs, cs));
+ } else {
+ set_cell_size(p_value);
+ }
} else if (name == "cell_octant_size") {
set_octant_size(p_value);
} else if (name == "cell_center_x") {
@@ -96,25 +102,6 @@ bool GridMap::_set(const StringName &p_name, const Variant &p_value) {
}
_recreate_octant_data();
- } else if (name.begins_with("areas/")) {
- int which = name.get_slicec('/', 1).to_int();
- String what = name.get_slicec('/', 2);
- if (what == "bounds") {
- ERR_FAIL_COND_V(area_map.has(which), false);
- create_area(which, p_value);
- return true;
- }
-
- ERR_FAIL_COND_V(!area_map.has(which), false);
-
- if (what == "name")
- area_set_name(which, p_value);
- else if (what == "disable_distance")
- area_set_portal_disable_distance(which, p_value);
- else if (what == "exterior_portal")
- area_set_portal_disable_color(which, p_value);
- else
- return false;
} else
return false;
@@ -158,19 +145,6 @@ bool GridMap::_get(const StringName &p_name, Variant &r_ret) const {
d["cells"] = cells;
r_ret = d;
- } else if (name.begins_with("areas/")) {
- int which = name.get_slicec('/', 1).to_int();
- String what = name.get_slicec('/', 2);
- if (what == "bounds")
- r_ret = area_get_bounds(which);
- else if (what == "name")
- r_ret = area_get_name(which);
- else if (what == "disable_distance")
- r_ret = area_get_portal_disable_distance(which);
- else if (what == "exterior_portal")
- r_ret = area_is_exterior_portal(which);
- else
- return false;
} else
return false;
@@ -181,7 +155,7 @@ void GridMap::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::OBJECT, "theme", PROPERTY_HINT_RESOURCE_TYPE, "MeshLibrary"));
p_list->push_back(PropertyInfo(Variant::NIL, "Cell", PROPERTY_HINT_NONE, "cell_", PROPERTY_USAGE_GROUP));
- p_list->push_back(PropertyInfo(Variant::REAL, "cell_size", PROPERTY_HINT_RANGE, "0.01,16384,0.01"));
+ p_list->push_back(PropertyInfo(Variant::VECTOR3, "cell_size"));
p_list->push_back(PropertyInfo(Variant::INT, "cell_octant_size", PROPERTY_HINT_RANGE, "1,1024,1"));
p_list->push_back(PropertyInfo(Variant::BOOL, "cell_center_x"));
p_list->push_back(PropertyInfo(Variant::BOOL, "cell_center_y"));
@@ -189,16 +163,6 @@ void GridMap::_get_property_list(List<PropertyInfo> *p_list) const {
p_list->push_back(PropertyInfo(Variant::REAL, "cell_scale"));
p_list->push_back(PropertyInfo(Variant::DICTIONARY, "data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
-
- for (const Map<int, Area *>::Element *E = area_map.front(); E; E = E->next()) {
-
- String base = "areas/" + itos(E->key()) + "/";
- p_list->push_back(PropertyInfo(Variant::RECT3, base + "bounds", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
- p_list->push_back(PropertyInfo(Variant::STRING, base + "name", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
- p_list->push_back(PropertyInfo(Variant::REAL, base + "disable_distance", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
- p_list->push_back(PropertyInfo(Variant::COLOR, base + "disable_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
- p_list->push_back(PropertyInfo(Variant::BOOL, base + "exterior_portal", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_STORAGE));
- }
}
void GridMap::set_theme(const Ref<MeshLibrary> &p_theme) {
@@ -218,12 +182,13 @@ Ref<MeshLibrary> GridMap::get_theme() const {
return theme;
}
-void GridMap::set_cell_size(float p_size) {
+void GridMap::set_cell_size(const Vector3 &p_size) {
+ ERR_FAIL_COND(p_size.x < 0.001 || p_size.y < 0.001 || p_size.z < 0.001);
cell_size = p_size;
_recreate_octant_data();
}
-float GridMap::get_cell_size() const {
+Vector3 GridMap::get_cell_size() const {
return cell_size;
}
@@ -268,20 +233,6 @@ bool GridMap::get_center_z() const {
return center_z;
}
-int GridMap::_find_area(const IndexKey &p_pos) const {
-
- for (const Map<int, Area *>::Element *E = area_map.front(); E; E = E->next()) {
- //this should somehow be faster...
- const Area &a = *E->get();
- if (p_pos.x >= a.from.x && p_pos.x < a.to.x &&
- p_pos.y >= a.from.y && p_pos.y < a.to.y &&
- p_pos.z >= a.from.z && p_pos.z < a.to.z) {
- return E->key();
- }
- }
-
- return 0;
-}
void GridMap::set_cell_item(int p_x, int p_y, int p_z, int p_item, int p_rot) {
ERR_FAIL_INDEX(ABS(p_x), 1 << 20);
@@ -297,58 +248,30 @@ void GridMap::set_cell_item(int p_x, int p_y, int p_z, int p_item, int p_rot) {
ok.x = p_x / octant_size;
ok.y = p_y / octant_size;
ok.z = p_z / octant_size;
- ok.area = _find_area(key);
-
- if (cell_map.has(key)) {
-
- int prev_item = cell_map[key].item;
- OctantKey octantkey = ok;
-
- ERR_FAIL_COND(!octant_map.has(octantkey));
- Octant &g = *octant_map[octantkey];
- ERR_FAIL_COND(!g.items.has(prev_item));
- ERR_FAIL_COND(!g.items[prev_item].cells.has(key));
-
- g.items[prev_item].cells.erase(key);
- if (g.items[prev_item].cells.size() == 0) {
- VS::get_singleton()->free(g.items[prev_item].multimesh_instance);
- g.items.erase(prev_item);
- }
- if (g.items.empty()) {
-
- PhysicsServer::get_singleton()->free(g.static_body);
- if (g.collision_debug.is_valid()) {
- PhysicsServer::get_singleton()->free(g.collision_debug);
- PhysicsServer::get_singleton()->free(g.collision_debug_instance);
- }
-
- memdelete(&g);
- octant_map.erase(octantkey);
- } else {
+ if (p_item < 0) {
+ //erase
+ if (cell_map.has(key)) {
+ OctantKey octantkey = ok;
+ ERR_FAIL_COND(!octant_map.has(octantkey));
+ Octant &g = *octant_map[octantkey];
+ g.cells.erase(key);
g.dirty = true;
+ cell_map.erase(key);
+ _queue_octants_dirty();
}
- cell_map.erase(key);
-
- _queue_dirty_map();
- }
-
- if (p_item < 0)
return;
+ }
OctantKey octantkey = ok;
- //add later
if (!octant_map.has(octantkey)) {
-
+ //create octant because it does not exist
Octant *g = memnew(Octant);
g->dirty = true;
g->static_body = PhysicsServer::get_singleton()->body_create(PhysicsServer::BODY_MODE_STATIC);
PhysicsServer::get_singleton()->body_attach_object_instance_id(g->static_body, get_instance_id());
- if (is_inside_world())
- PhysicsServer::get_singleton()->body_set_space(g->static_body, get_world()->get_space());
-
SceneTree *st = SceneTree::get_singleton();
if (st && st->is_debugging_collisions_hint()) {
@@ -356,45 +279,26 @@ void GridMap::set_cell_item(int p_x, int p_y, int p_z, int p_item, int p_rot) {
g->collision_debug = VisualServer::get_singleton()->mesh_create();
g->collision_debug_instance = VisualServer::get_singleton()->instance_create();
VisualServer::get_singleton()->instance_set_base(g->collision_debug_instance, g->collision_debug);
- if (is_inside_world()) {
- VisualServer::get_singleton()->instance_set_scenario(g->collision_debug_instance, get_world()->get_scenario());
- VisualServer::get_singleton()->instance_set_transform(g->collision_debug_instance, get_global_transform());
- }
}
octant_map[octantkey] = g;
- }
-
- Octant &g = *octant_map[octantkey];
- if (!g.items.has(p_item)) {
- Octant::ItemInstances ii;
- if (theme.is_valid() && theme->has_item(p_item)) {
- ii.mesh = theme->get_item_mesh(p_item);
- ii.shape = theme->get_item_shape(p_item);
- ii.navmesh = theme->get_item_navmesh(p_item);
+ if (is_inside_world()) {
+ _octant_enter_world(octantkey);
+ _octant_transform(octantkey);
}
- ii.multimesh = Ref<MultiMesh>(memnew(MultiMesh));
- ii.multimesh->set_color_format(MultiMesh::COLOR_NONE);
- ii.multimesh->set_transform_format(MultiMesh::TRANSFORM_3D);
- ii.multimesh->set_mesh(ii.mesh);
- ii.multimesh_instance = VS::get_singleton()->instance_create();
- VS::get_singleton()->instance_set_base(ii.multimesh_instance, ii.multimesh->get_rid());
- VS::get_singleton()->instance_geometry_set_flag(ii.multimesh_instance, VS::INSTANCE_FLAG_USE_BAKED_LIGHT, true);
-
- g.items[p_item] = ii;
}
- Octant::ItemInstances &ii = g.items[p_item];
- ii.cells.insert(key);
+ Octant &g = *octant_map[octantkey];
+ g.cells.insert(key);
g.dirty = true;
+ _queue_octants_dirty();
- _queue_dirty_map();
-
- cell_map[key] = Cell();
- Cell &c = cell_map[key];
+ Cell c;
c.item = p_item;
c.rot = p_rot;
+
+ cell_map[key] = c;
}
int GridMap::get_cell_item(int p_x, int p_y, int p_z) const {
@@ -429,122 +333,57 @@ int GridMap::get_cell_item_orientation(int p_x, int p_y, int p_z) const {
return cell_map[key].rot;
}
-void GridMap::_octant_enter_tree(const OctantKey &p_key) {
- ERR_FAIL_COND(!octant_map.has(p_key));
- if (navigation) {
- Octant &g = *octant_map[p_key];
-
- Vector3 ofs(cell_size * 0.5 * int(center_x), cell_size * 0.5 * int(center_y), cell_size * 0.5 * int(center_z));
- _octant_clear_navmesh(p_key);
-
- for (Map<int, Octant::ItemInstances>::Element *E = g.items.front(); E; E = E->next()) {
- Octant::ItemInstances &ii = E->get();
-
- for (Set<IndexKey>::Element *F = ii.cells.front(); F; F = F->next()) {
-
- IndexKey ik = F->get();
- Map<IndexKey, Cell>::Element *C = cell_map.find(ik);
- ERR_CONTINUE(!C);
-
- Vector3 cellpos = Vector3(ik.x, ik.y, ik.z);
-
- Transform xform;
-
- if (clip && ((clip_above && cellpos[clip_axis] > clip_floor) || (!clip_above && cellpos[clip_axis] < clip_floor))) {
-
- xform.basis.set_zero();
-
- } else {
-
- xform.basis.set_orthogonal_index(C->get().rot);
- }
-
- xform.set_origin(cellpos * cell_size + ofs);
- xform.basis.scale(Vector3(cell_scale, cell_scale, cell_scale));
- // add the item's navmesh at given xform to GridMap's Navigation ancestor
- if (ii.navmesh.is_valid()) {
- int nm_id = navigation->navmesh_create(ii.navmesh, xform, this);
- Octant::NavMesh nm;
- nm.id = nm_id;
- nm.xform = xform;
- g.navmesh_ids[ik] = nm;
- }
- }
- }
- }
-}
-
-void GridMap::_octant_enter_world(const OctantKey &p_key) {
+void GridMap::_octant_transform(const OctantKey &p_key) {
ERR_FAIL_COND(!octant_map.has(p_key));
Octant &g = *octant_map[p_key];
PhysicsServer::get_singleton()->body_set_state(g.static_body, PhysicsServer::BODY_STATE_TRANSFORM, get_global_transform());
- PhysicsServer::get_singleton()->body_set_space(g.static_body, get_world()->get_space());
- //print_line("BODYPOS: "+get_global_transform());
if (g.collision_debug_instance.is_valid()) {
- VS::get_singleton()->instance_set_scenario(g.collision_debug_instance, get_world()->get_scenario());
VS::get_singleton()->instance_set_transform(g.collision_debug_instance, get_global_transform());
- if (area_map.has(p_key.area)) {
- VS::get_singleton()->instance_set_room(g.collision_debug_instance, area_map[p_key.area]->instance);
- }
}
- for (Map<int, Octant::ItemInstances>::Element *E = g.items.front(); E; E = E->next()) {
-
- VS::get_singleton()->instance_set_scenario(E->get().multimesh_instance, get_world()->get_scenario());
- VS::get_singleton()->instance_set_transform(E->get().multimesh_instance, get_global_transform());
- //print_line("INSTANCEPOS: "+get_global_transform());
- if (area_map.has(p_key.area)) {
- VS::get_singleton()->instance_set_room(E->get().multimesh_instance, area_map[p_key.area]->instance);
- }
+ for (int i = 0; i < g.multimesh_instances.size(); i++) {
+ VS::get_singleton()->instance_set_transform(g.multimesh_instances[i].instance, get_global_transform());
}
}
-void GridMap::_octant_transform(const OctantKey &p_key) {
-
- ERR_FAIL_COND(!octant_map.has(p_key));
+bool GridMap::_octant_update(const OctantKey &p_key) {
+ ERR_FAIL_COND_V(!octant_map.has(p_key), false);
Octant &g = *octant_map[p_key];
- PhysicsServer::get_singleton()->body_set_state(g.static_body, PhysicsServer::BODY_STATE_TRANSFORM, get_global_transform());
+ if (!g.dirty)
+ return false;
- if (g.collision_debug_instance.is_valid()) {
- VS::get_singleton()->instance_set_transform(g.collision_debug_instance, get_global_transform());
- }
+ //erase body shapes
+ PhysicsServer::get_singleton()->body_clear_shapes(g.static_body);
- for (Map<int, Octant::ItemInstances>::Element *E = g.items.front(); E; E = E->next()) {
+ //erase body shapes debug
+ if (g.collision_debug.is_valid()) {
- VS::get_singleton()->instance_set_transform(E->get().multimesh_instance, get_global_transform());
- //print_line("UPDATEPOS: "+get_global_transform());
+ VS::get_singleton()->mesh_clear(g.collision_debug);
}
-}
-void GridMap::_octant_clear_navmesh(const OctantKey &p_key) {
- Octant &g = *octant_map[p_key];
+ //erase navigation
if (navigation) {
for (Map<IndexKey, Octant::NavMesh>::Element *E = g.navmesh_ids.front(); E; E = E->next()) {
- Octant::NavMesh *nvm = &E->get();
- if (nvm && nvm->id) {
- navigation->navmesh_remove(E->get().id);
- }
+ navigation->navmesh_remove(E->get().id);
}
g.navmesh_ids.clear();
}
-}
-void GridMap::_octant_update(const OctantKey &p_key) {
- ERR_FAIL_COND(!octant_map.has(p_key));
- Octant &g = *octant_map[p_key];
- if (!g.dirty)
- return;
-
- Ref<Mesh> mesh;
+ //erase multimeshes
- _octant_clear_navmesh(p_key);
- PhysicsServer::get_singleton()->body_clear_shapes(g.static_body);
+ for (int i = 0; i < g.multimesh_instances.size(); i++) {
- if (g.collision_debug.is_valid()) {
+ VS::get_singleton()->free(g.multimesh_instances[i].instance);
+ VS::get_singleton()->free(g.multimesh_instances[i].multimesh);
+ }
+ g.multimesh_instances.clear();
- VS::get_singleton()->mesh_clear(g.collision_debug);
+ if (g.cells.size() == 0) {
+ //octant no longer needed
+ _octant_clean_up(p_key);
+ return true;
}
PoolVector<Vector3> col_debug;
@@ -554,80 +393,111 @@ void GridMap::_octant_update(const OctantKey &p_key) {
* set item's multimesh's instance count to number of cells which have this item
* and set said multimesh bounding box to one containing all cells which have this item
*/
- for (Map<int, Octant::ItemInstances>::Element *E = g.items.front(); E; E = E->next()) {
- Octant::ItemInstances &ii = E->get();
+ Map<int, List<Pair<Transform, IndexKey> > > multimesh_items;
+
+ print_line("updating octant " + itos(p_key.x) + ", " + itos(p_key.y) + ", " + itos(p_key.z) + " cells: " + itos(g.cells.size()));
- ii.multimesh->set_instance_count(ii.cells.size());
+ for (Set<IndexKey>::Element *E = g.cells.front(); E; E = E->next()) {
- Rect3 aabb;
- Rect3 mesh_aabb = ii.mesh.is_null() ? Rect3() : ii.mesh->get_aabb();
+ ERR_CONTINUE(!cell_map.has(E->get()));
+ const Cell &c = cell_map[E->get()];
- Vector3 ofs(cell_size * 0.5 * int(center_x), cell_size * 0.5 * int(center_y), cell_size * 0.5 * int(center_z));
+ if (!theme.is_valid() || !theme->has_item(c.item))
+ continue;
//print_line("OCTANT, CELLS: "+itos(ii.cells.size()));
- int idx = 0;
- // foreach cell containing this item type
- for (Set<IndexKey>::Element *F = ii.cells.front(); F; F = F->next()) {
- IndexKey ik = F->get();
- Map<IndexKey, Cell>::Element *C = cell_map.find(ik);
- ERR_CONTINUE(!C);
- Vector3 cellpos = Vector3(ik.x, ik.y, ik.z);
+ Vector3 cellpos = Vector3(E->get().x, E->get().y, E->get().z);
+ Vector3 ofs(cell_size.x * 0.5 * int(center_x), cell_size.y * 0.5 * int(center_y), cell_size.z * 0.5 * int(center_z));
- Transform xform;
+ Transform xform;
- if (clip && ((clip_above && cellpos[clip_axis] > clip_floor) || (!clip_above && cellpos[clip_axis] < clip_floor))) {
+ if (clip && ((clip_above && cellpos[clip_axis] > clip_floor) || (!clip_above && cellpos[clip_axis] < clip_floor))) {
- xform.basis.set_zero();
+ } else {
+ }
- } else {
+ xform.basis.set_orthogonal_index(c.rot);
+ xform.set_origin(cellpos * cell_size + ofs);
+ xform.basis.scale(Vector3(cell_scale, cell_scale, cell_scale));
- xform.basis.set_orthogonal_index(C->get().rot);
+ if (theme->get_item_mesh(c.item).is_valid()) {
+ if (!multimesh_items.has(c.item)) {
+ multimesh_items[c.item] = List<Pair<Transform, IndexKey> >();
}
- xform.set_origin(cellpos * cell_size + ofs);
- xform.basis.scale(Vector3(cell_scale, cell_scale, cell_scale));
+ Pair<Transform, IndexKey> p;
+ p.first = xform;
+ p.second = E->get();
+ multimesh_items[c.item].push_back(p);
+ }
- ii.multimesh->set_instance_transform(idx, xform);
- //ii.multimesh->set_instance_transform(idx,Transform() );
- //ii.multimesh->set_instance_color(idx,Color(1,1,1,1));
- //print_line("MMINST: "+xform);
+ Vector<MeshLibrary::ShapeData> shapes = theme->get_item_shapes(c.item);
+ // add the item's shape at given xform to octant's static_body
+ for (int i = 0; i < shapes.size(); i++) {
+ // add the item's shape
+ if (!shapes[i].shape.is_valid())
+ continue;
+ PhysicsServer::get_singleton()->body_add_shape(g.static_body, shapes[i].shape->get_rid(), xform * shapes[i].local_transform);
+ if (g.collision_debug.is_valid()) {
+ shapes[i].shape->add_vertices_to_array(col_debug, xform * shapes[i].local_transform);
+ }
+
+ //print_line("PHIS x: "+xform);
+ }
- if (idx == 0) {
+ // add the item's navmesh at given xform to GridMap's Navigation ancestor
+ Ref<NavigationMesh> navmesh = theme->get_item_navmesh(c.item);
+ if (navmesh.is_valid()) {
+ Octant::NavMesh nm;
+ nm.xform = xform;
- aabb = xform.xform(mesh_aabb);
+ if (navigation) {
+ nm.id = navigation->navmesh_create(navmesh, xform, this);
} else {
-
- aabb.merge_with(xform.xform(mesh_aabb));
+ nm.id = -1;
}
+ g.navmesh_ids[E->get()] = nm;
+ }
+ }
- // add the item's shape at given xform to octant's static_body
- if (ii.shape.is_valid()) {
- // add the item's shape
- PhysicsServer::get_singleton()->body_add_shape(g.static_body, ii.shape->get_rid(), xform);
- if (g.collision_debug.is_valid()) {
- ii.shape->add_vertices_to_array(col_debug, xform);
- }
+ //update multimeshes
+ for (Map<int, List<Pair<Transform, IndexKey> > >::Element *E = multimesh_items.front(); E; E = E->next()) {
+ print_line("multimesh item " + itos(E->key()) + " transforms " + itos(E->get().size()));
+ Octant::MultimeshInstance mmi;
- //print_line("PHIS x: "+xform);
- }
+ RID mm = VS::get_singleton()->multimesh_create();
+ VS::get_singleton()->multimesh_allocate(mm, E->get().size(), VS::MULTIMESH_TRANSFORM_3D, VS::MULTIMESH_COLOR_NONE);
+ VS::get_singleton()->multimesh_set_mesh(mm, theme->get_item_mesh(E->key())->get_rid());
- // add the item's navmesh at given xform to GridMap's Navigation ancestor
- if (navigation) {
- if (ii.navmesh.is_valid()) {
- int nm_id = navigation->navmesh_create(ii.navmesh, xform, this);
- Octant::NavMesh nm;
- nm.id = nm_id;
- nm.xform = xform;
- g.navmesh_ids[ik] = nm;
- }
- }
+ int idx = 0;
+ for (List<Pair<Transform, IndexKey> >::Element *F = E->get().front(); F; F = F->next()) {
+ VS::get_singleton()->multimesh_instance_set_transform(mm, idx, F->get().first);
+#ifdef TOOLS_ENABLED
+
+ Octant::MultimeshInstance::Item it;
+ it.index = idx;
+ it.transform = F->get().first;
+ it.key = F->get().second;
+ mmi.items.push_back(it);
+#endif
idx++;
}
- //ii.multimesh->set_aabb(aabb);
+ RID instance = VS::get_singleton()->instance_create();
+ VS::get_singleton()->instance_set_base(instance, mm);
+
+ if (is_inside_tree()) {
+ VS::get_singleton()->instance_set_scenario(instance, get_world()->get_scenario());
+ VS::get_singleton()->instance_set_transform(instance, get_global_transform());
+ }
+
+ mmi.multimesh = mm;
+ mmi.instance = instance;
+
+ g.multimesh_instances.push_back(mmi);
}
if (col_debug.size()) {
@@ -644,6 +514,39 @@ void GridMap::_octant_update(const OctantKey &p_key) {
}
g.dirty = false;
+
+ return false;
+}
+
+void GridMap::_octant_enter_world(const OctantKey &p_key) {
+
+ ERR_FAIL_COND(!octant_map.has(p_key));
+ Octant &g = *octant_map[p_key];
+ PhysicsServer::get_singleton()->body_set_state(g.static_body, PhysicsServer::BODY_STATE_TRANSFORM, get_global_transform());
+ PhysicsServer::get_singleton()->body_set_space(g.static_body, get_world()->get_space());
+ //print_line("BODYPOS: "+get_global_transform());
+
+ if (g.collision_debug_instance.is_valid()) {
+ VS::get_singleton()->instance_set_scenario(g.collision_debug_instance, get_world()->get_scenario());
+ VS::get_singleton()->instance_set_transform(g.collision_debug_instance, get_global_transform());
+ }
+
+ for (int i = 0; i < g.multimesh_instances.size(); i++) {
+ VS::get_singleton()->instance_set_scenario(g.multimesh_instances[i].instance, get_world()->get_scenario());
+ VS::get_singleton()->instance_set_transform(g.multimesh_instances[i].instance, get_global_transform());
+ }
+
+ if (navigation && theme.is_valid()) {
+ for (Map<IndexKey, Octant::NavMesh>::Element *F = g.navmesh_ids.front(); F; F = F->next()) {
+
+ if (cell_map.has(F->key()) && F->get().id < 0) {
+ Ref<NavigationMesh> nm = theme->get_item_navmesh(cell_map[F->key()].item);
+ if (nm.is_valid()) {
+ F->get().id = navigation->navmesh_create(nm, F->get().xform, this);
+ }
+ }
+ }
+ }
}
void GridMap::_octant_exit_world(const OctantKey &p_key) {
@@ -655,16 +558,52 @@ void GridMap::_octant_exit_world(const OctantKey &p_key) {
if (g.collision_debug_instance.is_valid()) {
- VS::get_singleton()->instance_set_room(g.collision_debug_instance, RID());
VS::get_singleton()->instance_set_scenario(g.collision_debug_instance, RID());
}
- for (Map<int, Octant::ItemInstances>::Element *E = g.items.front(); E; E = E->next()) {
+ for (int i = 0; i < g.multimesh_instances.size(); i++) {
+ VS::get_singleton()->instance_set_scenario(g.multimesh_instances[i].instance, RID());
+ }
+
+ if (navigation) {
+ for (Map<IndexKey, Octant::NavMesh>::Element *F = g.navmesh_ids.front(); F; F = F->next()) {
+
+ if (F->get().id >= 0) {
+ navigation->navmesh_remove(F->get().id);
+ F->get().id = -1;
+ }
+ }
+ }
+}
+
+void GridMap::_octant_clean_up(const OctantKey &p_key) {
+
+ ERR_FAIL_COND(!octant_map.has(p_key));
+ Octant &g = *octant_map[p_key];
+
+ if (g.collision_debug.is_valid())
+ VS::get_singleton()->free(g.collision_debug);
+ if (g.collision_debug_instance.is_valid())
+ VS::get_singleton()->free(g.collision_debug_instance);
+
+ PhysicsServer::get_singleton()->free(g.static_body);
+
+ //erase navigation
+ if (navigation) {
+ for (Map<IndexKey, Octant::NavMesh>::Element *E = g.navmesh_ids.front(); E; E = E->next()) {
+ navigation->navmesh_remove(E->get().id);
+ }
+ g.navmesh_ids.clear();
+ }
+
+ //erase multimeshes
+
+ for (int i = 0; i < g.multimesh_instances.size(); i++) {
- VS::get_singleton()->instance_set_scenario(E->get().multimesh_instance, RID());
- //VS::get_singleton()->instance_set_transform(E->get().multimesh_instance,get_global_transform());
- VS::get_singleton()->instance_set_room(E->get().multimesh_instance, RID());
+ VS::get_singleton()->free(g.multimesh_instances[i].instance);
+ VS::get_singleton()->free(g.multimesh_instances[i].multimesh);
}
+ g.multimesh_instances.clear();
}
void GridMap::_notification(int p_what) {
@@ -673,19 +612,22 @@ void GridMap::_notification(int p_what) {
case NOTIFICATION_ENTER_WORLD: {
- _update_area_instances();
+ Spatial *c = this;
+ while (c) {
+ navigation = Object::cast_to<Navigation>(c);
+ if (navigation) {
+ break;
+ }
+
+ c = Object::cast_to<Spatial>(c->get_parent());
+ }
+
+ last_transform = get_global_transform();
for (Map<OctantKey, Octant *>::Element *E = octant_map.front(); E; E = E->next()) {
- //IndexKey ik;
- //ik.key = E->key().indexkey;
_octant_enter_world(E->key());
- _octant_update(E->key());
}
- awaiting_update = false;
-
- last_transform = get_global_transform();
-
} break;
case NOTIFICATION_TRANSFORM_CHANGED: {
@@ -706,104 +648,47 @@ void GridMap::_notification(int p_what) {
_octant_exit_world(E->key());
}
- //_queue_dirty_map(MAP_DIRTY_INSTANCES|MAP_DIRTY_TRANSFORMS);
- //_update_dirty_map_callback();
- //_update_area_instances();
-
- } break;
- case NOTIFICATION_ENTER_TREE: {
-
- Spatial *c = this;
- while (c) {
- navigation = c->cast_to<Navigation>();
- if (navigation) {
- break;
- }
-
- c = c->get_parent()->cast_to<Spatial>();
- }
-
- if (navigation) {
- for (Map<OctantKey, Octant *>::Element *E = octant_map.front(); E; E = E->next()) {
- if (navigation) {
- _octant_enter_tree(E->key());
- }
- }
- }
-
- _queue_dirty_map();
- } break;
- case NOTIFICATION_EXIT_TREE: {
- for (Map<OctantKey, Octant *>::Element *E = octant_map.front(); E; E = E->next()) {
- if (navigation) {
- _octant_clear_navmesh(E->key());
- }
- }
-
navigation = NULL;
+ //_queue_octants_dirty(MAP_DIRTY_INSTANCES|MAP_DIRTY_TRANSFORMS);
+ //_update_octants_callback();
+ //_update_area_instances();
+
} break;
}
}
-void GridMap::_queue_dirty_map() {
+void GridMap::_queue_octants_dirty() {
if (awaiting_update)
return;
- if (is_inside_world()) {
-
- MessageQueue::get_singleton()->push_call(this, "_update_dirty_map_callback");
- awaiting_update = true;
- }
+ MessageQueue::get_singleton()->push_call(this, "_update_octants_callback");
+ awaiting_update = true;
}
void GridMap::_recreate_octant_data() {
Map<IndexKey, Cell> cell_copy = cell_map;
- _clear_internal(true);
+ _clear_internal();
for (Map<IndexKey, Cell>::Element *E = cell_copy.front(); E; E = E->next()) {
set_cell_item(E->key().x, E->key().y, E->key().z, E->get().item, E->get().rot);
}
}
-void GridMap::_clear_internal(bool p_keep_areas) {
+void GridMap::_clear_internal() {
for (Map<OctantKey, Octant *>::Element *E = octant_map.front(); E; E = E->next()) {
if (is_inside_world())
_octant_exit_world(E->key());
- for (Map<int, Octant::ItemInstances>::Element *F = E->get()->items.front(); F; F = F->next()) {
-
- VS::get_singleton()->free(F->get().multimesh_instance);
- }
-
- if (E->get()->collision_debug.is_valid())
- VS::get_singleton()->free(E->get()->collision_debug);
- if (E->get()->collision_debug_instance.is_valid())
- VS::get_singleton()->free(E->get()->collision_debug_instance);
-
- PhysicsServer::get_singleton()->free(E->get()->static_body);
+ _octant_clean_up(E->key());
memdelete(E->get());
}
octant_map.clear();
cell_map.clear();
-
- if (p_keep_areas)
- return;
-
- for (Map<int, Area *>::Element *E = area_map.front(); E; E = E->next()) {
-
- VS::get_singleton()->free(E->get()->base_portal);
- VS::get_singleton()->free(E->get()->instance);
- for (int i = 0; i < E->get()->portals.size(); i++) {
- VS::get_singleton()->free(E->get()->portals[i].instance);
- }
-
- memdelete(E->get());
- }
}
void GridMap::clear() {
@@ -816,13 +701,23 @@ void GridMap::resource_changed(const RES &p_res) {
_recreate_octant_data();
}
-void GridMap::_update_dirty_map_callback() {
+void GridMap::_update_octants_callback() {
if (!awaiting_update)
return;
+ List<OctantKey> to_delete;
for (Map<OctantKey, Octant *>::Element *E = octant_map.front(); E; E = E->next()) {
- _octant_update(E->key());
+
+ if (_octant_update(E->key())) {
+ to_delete.push_back(E->key());
+ }
+ }
+
+ while (to_delete.front()) {
+ memdelete(octant_map[to_delete.front()->get()]);
+ octant_map.erase(to_delete.front()->get());
+ to_delete.pop_back();
}
awaiting_update = false;
@@ -844,7 +739,7 @@ void GridMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_cell_item_orientation", "x", "y", "z"), &GridMap::get_cell_item_orientation);
//ClassDB::bind_method(D_METHOD("_recreate_octants"),&GridMap::_recreate_octants);
- ClassDB::bind_method(D_METHOD("_update_dirty_map_callback"), &GridMap::_update_dirty_map_callback);
+ ClassDB::bind_method(D_METHOD("_update_octants_callback"), &GridMap::_update_octants_callback);
ClassDB::bind_method(D_METHOD("resource_changed", "resource"), &GridMap::resource_changed);
ClassDB::bind_method(D_METHOD("set_center_x", "enable"), &GridMap::set_center_x);
@@ -856,19 +751,6 @@ void GridMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_clip", "enabled", "clipabove", "floor", "axis"), &GridMap::set_clip, DEFVAL(true), DEFVAL(0), DEFVAL(Vector3::AXIS_X));
- ClassDB::bind_method(D_METHOD("create_area", "id", "area"), &GridMap::create_area);
- ClassDB::bind_method(D_METHOD("area_get_bounds", "area"), &GridMap::area_get_bounds);
- ClassDB::bind_method(D_METHOD("area_set_exterior_portal", "area", "enable"), &GridMap::area_set_exterior_portal);
- ClassDB::bind_method(D_METHOD("area_set_name", "area", "name"), &GridMap::area_set_name);
- ClassDB::bind_method(D_METHOD("area_get_name", "area"), &GridMap::area_get_name);
- ClassDB::bind_method(D_METHOD("area_is_exterior_portal", "area"), &GridMap::area_is_exterior_portal);
- ClassDB::bind_method(D_METHOD("area_set_portal_disable_distance", "area", "distance"), &GridMap::area_set_portal_disable_distance);
- ClassDB::bind_method(D_METHOD("area_get_portal_disable_distance", "area"), &GridMap::area_get_portal_disable_distance);
- ClassDB::bind_method(D_METHOD("area_set_portal_disable_color", "area", "color"), &GridMap::area_set_portal_disable_color);
- ClassDB::bind_method(D_METHOD("area_get_portal_disable_color", "area"), &GridMap::area_get_portal_disable_color);
- ClassDB::bind_method(D_METHOD("erase_area", "area"), &GridMap::erase_area);
- ClassDB::bind_method(D_METHOD("get_unused_area_id"), &GridMap::get_unused_area_id);
-
ClassDB::bind_method(D_METHOD("clear"), &GridMap::clear);
ClassDB::bind_method(D_METHOD("get_meshes"), &GridMap::get_meshes);
@@ -895,341 +777,13 @@ void GridMap::set_clip(bool p_enabled, bool p_clip_above, int p_floor, Vector3::
g->dirty = true;
}
awaiting_update = true;
- _update_dirty_map_callback();
-}
-
-void GridMap::_update_areas() {
-
- //clear the portals
- for (Map<int, Area *>::Element *E = area_map.front(); E; E = E->next()) {
- //this should somehow be faster...
- Area &a = *E->get();
- a.portals.clear();
- if (a.instance.is_valid()) {
- VisualServer::get_singleton()->free(a.instance);
- a.instance = RID();
- }
- }
-
- //test all areas against all areas and create portals - this sucks (slow :( )
- for (Map<int, Area *>::Element *E = area_map.front(); E; E = E->next()) {
- Area &a = *E->get();
- if (a.exterior_portal) //that's pretty much all it does... yes it is
- continue;
- Vector3 from_a(a.from.x, a.from.y, a.from.z);
- Vector3 to_a(a.to.x, a.to.y, a.to.z);
-
- for (Map<int, Area *>::Element *F = area_map.front(); F; F = F->next()) {
-
- Area &b = *F->get();
- Vector3 from_b(b.from.x, b.from.y, b.from.z);
- Vector3 to_b(b.to.x, b.to.y, b.to.z);
-
- // initially test intersection and discards
- int axis = -1;
- float sign = 0;
- bool valid = true;
- Vector3 axmin, axmax;
-
- for (int i = 0; i < 3; i++) {
-
- if (from_a[i] == to_b[i]) {
-
- if (axis != -1) {
- valid = false;
- break;
- }
-
- axis = i;
- sign = -1;
- } else if (from_b[i] == to_a[i]) {
-
- if (axis != -1) {
- valid = false;
- break;
- }
- axis = i;
- sign = +1;
- }
-
- if (from_a[i] > to_b[i] || to_a[i] < from_b[i]) {
- valid = false;
- break;
- } else {
-
- axmin[i] = (from_a[i] > from_b[i]) ? from_a[i] : from_b[i];
- axmax[i] = (to_a[i] < to_b[i]) ? to_a[i] : to_b[i];
- }
- }
-
- if (axis == -1 || !valid)
- continue;
-
- Transform xf;
-
- for (int i = 0; i < 3; i++) {
-
- int ax = (axis + i) % 3;
- Vector3 axis_vec;
- float scale = (i == 0) ? sign : ((axmax[ax] - axmin[ax]) * cell_size);
- axis_vec[ax] = scale;
- xf.basis.set_axis((2 + i) % 3, axis_vec);
- xf.origin[i] = axmin[i] * cell_size;
- }
-
- Area::Portal portal;
- portal.xform = xf;
- a.portals.push_back(portal);
- }
- }
-
- _update_area_instances();
-}
-
-void GridMap::_update_area_instances() {
-
- Transform base_xform;
- if (_in_tree)
- base_xform = get_global_transform();
-
- for (Map<int, Area *>::Element *E = area_map.front(); E; E = E->next()) {
- //this should somehow be faster...
- Area &a = *E->get();
- if (a.instance.is_valid() != _in_tree) {
-
- if (!_in_tree) {
-
- for (int i = 0; i < a.portals.size(); i++) {
-
- Area::Portal &p = a.portals[i];
- ERR_CONTINUE(!p.instance.is_valid());
- VisualServer::get_singleton()->free(p.instance);
- p.instance = RID();
- }
-
- VisualServer::get_singleton()->free(a.instance);
- a.instance = RID();
-
- } else {
-
- //a.instance = VisualServer::get_singleton()->instance_create2(base_room,get_world()->get_scenario());
- for (int i = 0; i < a.portals.size(); i++) {
-
- Area::Portal &p = a.portals[i];
- ERR_CONTINUE(p.instance.is_valid());
- p.instance = VisualServer::get_singleton()->instance_create2(a.base_portal, get_world()->get_scenario());
- VisualServer::get_singleton()->instance_set_room(p.instance, a.instance);
- }
- }
- }
-
- if (a.instance.is_valid()) {
- Transform xform;
-
- Vector3 from_a(a.from.x, a.from.y, a.from.z);
- Vector3 to_a(a.to.x, a.to.y, a.to.z);
-
- for (int i = 0; i < 3; i++) {
- xform.origin[i] = from_a[i] * cell_size;
- Vector3 s;
- s[i] = (to_a[i] - from_a[i]) * cell_size;
- xform.basis.set_axis(i, s);
- }
-
- VisualServer::get_singleton()->instance_set_transform(a.instance, base_xform * xform);
-
- for (int i = 0; i < a.portals.size(); i++) {
-
- Area::Portal &p = a.portals[i];
- ERR_CONTINUE(!p.instance.is_valid());
-
- VisualServer::get_singleton()->instance_set_transform(p.instance, base_xform * xform);
- }
- }
- }
-}
-
-Error GridMap::create_area(int p_id, const Rect3 &p_area) {
-
- ERR_FAIL_COND_V(area_map.has(p_id), ERR_ALREADY_EXISTS);
- ERR_EXPLAIN("ID 0 is taken as global area, start from 1");
- ERR_FAIL_COND_V(p_id == 0, ERR_INVALID_PARAMETER);
- ERR_FAIL_COND_V(p_area.has_no_area(), ERR_INVALID_PARAMETER);
-
- // FIRST VALIDATE AREA
- IndexKey from, to;
- from.x = p_area.position.x;
- from.y = p_area.position.y;
- from.z = p_area.position.z;
- to.x = p_area.position.x + p_area.size.x;
- to.y = p_area.position.y + p_area.size.y;
- to.z = p_area.position.z + p_area.size.z;
-
- for (Map<int, Area *>::Element *E = area_map.front(); E; E = E->next()) {
- //this should somehow be faster...
- Area &a = *E->get();
-
- //does it interset with anything else?
-
- if (from.x >= a.to.x ||
- to.x <= a.from.x ||
- from.y >= a.to.y ||
- to.y <= a.from.y ||
- from.z >= a.to.z ||
- to.z <= a.from.z) {
-
- // all good
- } else {
-
- return ERR_INVALID_PARAMETER;
- }
- }
-
- Area *area = memnew(Area);
- area->from = from;
- area->to = to;
- area->portal_disable_distance = 0;
- area->exterior_portal = false;
- area->name = "Area " + itos(p_id);
- area_map[p_id] = area;
- _recreate_octant_data();
- return OK;
-}
-
-Rect3 GridMap::area_get_bounds(int p_area) const {
-
- ERR_FAIL_COND_V(!area_map.has(p_area), Rect3());
-
- const Area *a = area_map[p_area];
- Rect3 aabb;
- aabb.position = Vector3(a->from.x, a->from.y, a->from.z);
- aabb.size = Vector3(a->to.x, a->to.y, a->to.z) - aabb.position;
-
- return aabb;
-}
-
-void GridMap::area_set_name(int p_area, const String &p_name) {
-
- ERR_FAIL_COND(!area_map.has(p_area));
-
- Area *a = area_map[p_area];
- a->name = p_name;
-}
-
-String GridMap::area_get_name(int p_area) const {
-
- ERR_FAIL_COND_V(!area_map.has(p_area), "");
-
- const Area *a = area_map[p_area];
- return a->name;
-}
-
-void GridMap::area_set_exterior_portal(int p_area, bool p_enable) {
-
- ERR_FAIL_COND(!area_map.has(p_area));
-
- Area *a = area_map[p_area];
- if (a->exterior_portal == p_enable)
- return;
- a->exterior_portal = p_enable;
-
- _recreate_octant_data();
-}
-
-bool GridMap::area_is_exterior_portal(int p_area) const {
-
- ERR_FAIL_COND_V(!area_map.has(p_area), false);
-
- const Area *a = area_map[p_area];
- return a->exterior_portal;
-}
-
-void GridMap::area_set_portal_disable_distance(int p_area, float p_distance) {
-
- ERR_FAIL_COND(!area_map.has(p_area));
-
- Area *a = area_map[p_area];
- a->portal_disable_distance = p_distance;
-}
-
-float GridMap::area_get_portal_disable_distance(int p_area) const {
-
- ERR_FAIL_COND_V(!area_map.has(p_area), 0);
-
- const Area *a = area_map[p_area];
- return a->portal_disable_distance;
-}
-
-void GridMap::area_set_portal_disable_color(int p_area, Color p_color) {
-
- ERR_FAIL_COND(!area_map.has(p_area));
-
- Area *a = area_map[p_area];
- a->portal_disable_color = p_color;
-}
-
-Color GridMap::area_get_portal_disable_color(int p_area) const {
-
- ERR_FAIL_COND_V(!area_map.has(p_area), Color());
-
- const Area *a = area_map[p_area];
- return a->portal_disable_color;
-}
-
-void GridMap::get_area_list(List<int> *p_areas) const {
-
- for (const Map<int, Area *>::Element *E = area_map.front(); E; E = E->next()) {
-
- p_areas->push_back(E->key());
- }
-}
-
-GridMap::Area::Portal::~Portal() {
-
- if (instance.is_valid())
- VisualServer::get_singleton()->free(instance);
-}
-
-GridMap::Area::Area() {
-
- base_portal = VisualServer::get_singleton()->portal_create();
- Vector<Point2> points;
- points.push_back(Point2(0, 1));
- points.push_back(Point2(1, 1));
- points.push_back(Point2(1, 0));
- points.push_back(Point2(0, 0));
- VisualServer::get_singleton()->portal_set_shape(base_portal, points);
-}
-
-GridMap::Area::~Area() {
-
- if (instance.is_valid())
- VisualServer::get_singleton()->free(instance);
- VisualServer::get_singleton()->free(base_portal);
-}
-
-void GridMap::erase_area(int p_area) {
-
- ERR_FAIL_COND(!area_map.has(p_area));
-
- Area *a = area_map[p_area];
- memdelete(a);
- area_map.erase(p_area);
- _recreate_octant_data();
-}
-
-int GridMap::get_unused_area_id() const {
-
- if (area_map.empty())
- return 1;
- else
- return area_map.back()->key() + 1;
+ _update_octants_callback();
}
void GridMap::set_cell_scale(float p_scale) {
cell_scale = p_scale;
- _queue_dirty_map();
+ _queue_octants_dirty();
}
float GridMap::get_cell_scale() const {
@@ -1242,7 +796,7 @@ Array GridMap::get_meshes() {
if (theme.is_null())
return Array();
- Vector3 ofs(cell_size * 0.5 * int(center_x), cell_size * 0.5 * int(center_y), cell_size * 0.5 * int(center_z));
+ Vector3 ofs(cell_size.x * 0.5 * int(center_x), cell_size.y * 0.5 * int(center_y), cell_size.z * 0.5 * int(center_z));
Array meshes;
for (Map<IndexKey, Cell>::Element *E = cell_map.front(); E; E = E->next()) {
@@ -1274,7 +828,7 @@ Array GridMap::get_meshes() {
GridMap::GridMap() {
- cell_size = 2;
+ cell_size = Vector3(2, 2, 2);
octant_size = 4;
awaiting_update = false;
_in_tree = false;
diff --git a/modules/gridmap/grid_map.h b/modules/gridmap/grid_map.h
index 106bf82dc2..9e1d250680 100644
--- a/modules/gridmap/grid_map.h
+++ b/modules/gridmap/grid_map.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -38,8 +38,6 @@
//heh heh, godotsphir!! this shares no code and the design is completely different with previous projects i've done..
//should scale better with hardware that supports instancing
-class BakedLightInstance;
-
class GridMap : public Spatial {
GDCLASS(GridMap, Spatial);
@@ -96,21 +94,25 @@ class GridMap : public Spatial {
Transform xform;
};
- struct ItemInstances {
- Set<IndexKey> cells;
- Ref<Mesh> mesh;
- Ref<Shape> shape;
- Ref<MultiMesh> multimesh;
- RID multimesh_instance;
- Ref<NavigationMesh> navmesh;
+ struct MultimeshInstance {
+ RID instance;
+ RID multimesh;
+ struct Item {
+ int index;
+ Transform transform;
+ IndexKey key;
+ };
+
+ Vector<Item> items; //tools only, for changing visibility
};
+ Vector<MultimeshInstance> multimesh_instances;
+ Set<IndexKey> cells;
RID collision_debug;
RID collision_debug_instance;
bool dirty;
RID static_body;
- Map<int, ItemInstances> items;
Map<IndexKey, NavMesh> navmesh_ids;
};
@@ -120,7 +122,7 @@ class GridMap : public Spatial {
int16_t x;
int16_t y;
int16_t z;
- int16_t area;
+ int16_t empty;
};
uint64_t key;
@@ -137,7 +139,7 @@ class GridMap : public Spatial {
Transform last_transform;
bool _in_tree;
- float cell_size;
+ Vector3 cell_size;
int octant_size;
bool center_x, center_y, center_z;
float cell_scale;
@@ -148,35 +150,10 @@ class GridMap : public Spatial {
int clip_floor;
Vector3::Axis clip_axis;
- /**
- * @brief An Area is something like a room: it has doors, and Octants can choose to belong to it.
- */
- struct Area {
-
- String name;
- RID base_portal;
- RID instance;
- IndexKey from;
- IndexKey to;
- struct Portal {
- Transform xform;
- RID instance;
- ~Portal();
- };
- Vector<Portal> portals;
- float portal_disable_distance;
- Color portal_disable_color;
- bool exterior_portal;
-
- Area();
- ~Area();
- };
-
Ref<MeshLibrary> theme;
Map<OctantKey, Octant *> octant_map;
Map<IndexKey, Cell> cell_map;
- Map<int, Area *> area_map;
void _recreate_octant_data();
@@ -188,30 +165,24 @@ class GridMap : public Spatial {
float param[VS::LIGHT_PARAM_MAX];
};
- _FORCE_INLINE_ int _find_area(const IndexKey &p_pos) const;
-
_FORCE_INLINE_ Vector3 _octant_get_offset(const OctantKey &p_key) const {
return Vector3(p_key.x, p_key.y, p_key.z) * cell_size * octant_size;
}
void _octant_enter_world(const OctantKey &p_key);
- void _octant_enter_tree(const OctantKey &p_key);
void _octant_exit_world(const OctantKey &p_key);
- void _octant_update(const OctantKey &p_key);
+ bool _octant_update(const OctantKey &p_key);
+ void _octant_clean_up(const OctantKey &p_key);
void _octant_transform(const OctantKey &p_key);
- void _octant_clear_navmesh(const GridMap::OctantKey &);
bool awaiting_update;
- void _queue_dirty_map();
- void _update_dirty_map_callback();
+ void _queue_octants_dirty();
+ void _update_octants_callback();
void resource_changed(const RES &p_res);
- void _update_areas();
- void _update_area_instances();
-
- void _clear_internal(bool p_keep_areas = false);
+ void _clear_internal();
protected:
bool _set(const StringName &p_name, const Variant &p_value);
@@ -229,8 +200,8 @@ public:
void set_theme(const Ref<MeshLibrary> &p_theme);
Ref<MeshLibrary> get_theme() const;
- void set_cell_size(float p_size);
- float get_cell_size() const;
+ void set_cell_size(const Vector3 &p_size);
+ Vector3 get_cell_size() const;
void set_octant_size(int p_size);
int get_octant_size() const;
@@ -248,20 +219,6 @@ public:
void set_clip(bool p_enabled, bool p_clip_above = true, int p_floor = 0, Vector3::Axis p_axis = Vector3::AXIS_X);
- Error create_area(int p_id, const Rect3 &p_area);
- Rect3 area_get_bounds(int p_area) const;
- void area_set_exterior_portal(int p_area, bool p_enable);
- void area_set_name(int p_area, const String &p_name);
- String area_get_name(int p_area) const;
- bool area_is_exterior_portal(int p_area) const;
- void area_set_portal_disable_distance(int p_area, float p_distance);
- float area_get_portal_disable_distance(int p_area) const;
- void area_set_portal_disable_color(int p_area, Color p_color);
- Color area_get_portal_disable_color(int p_area) const;
- void get_area_list(List<int> *p_areas) const;
- void erase_area(int p_area);
- int get_unused_area_id() const;
-
void set_cell_scale(float p_scale);
float get_cell_scale() const;
@@ -273,4 +230,4 @@ public:
~GridMap();
};
-#endif // CUBE_GRID_MAP_H
+#endif // GRID_MAP_H
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 7bb80c2510..f6a76ad2a1 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -178,30 +178,6 @@ void GridMapEditor::_menu_option(int p_option) {
int idx = options->get_popup()->get_item_index(MENU_OPTION_DUPLICATE_SELECTS);
options->get_popup()->set_item_checked(idx, !options->get_popup()->is_item_checked(idx));
} break;
- case MENU_OPTION_SELECTION_MAKE_AREA:
- case MENU_OPTION_SELECTION_MAKE_EXTERIOR_CONNECTOR: {
-
- if (!selection.active)
- break;
- int area = node->get_unused_area_id();
- Error err = node->create_area(area, Rect3(selection.begin, selection.end - selection.begin + Vector3(1, 1, 1)));
- if (err != OK) {
- }
- if (p_option == MENU_OPTION_SELECTION_MAKE_EXTERIOR_CONNECTOR) {
-
- node->area_set_exterior_portal(area, true);
- }
- _update_areas_display();
- update_areas();
-
- } break;
- case MENU_OPTION_REMOVE_AREA: {
- if (selected_area < 1)
- return;
- node->erase_area(selected_area);
- _update_areas_display();
- update_areas();
- } break;
case MENU_OPTION_SELECTION_DUPLICATE:
if (!(selection.active && input_action == INPUT_NONE))
return;
@@ -241,12 +217,15 @@ void GridMapEditor::_update_cursor_transform() {
}
void GridMapEditor::_update_selection_transform() {
+ Transform xf_zero;
+ xf_zero.basis.set_zero();
if (!selection.active) {
- Transform xf;
- xf.basis.set_zero();
- VisualServer::get_singleton()->instance_set_transform(selection_instance, xf);
+ VisualServer::get_singleton()->instance_set_transform(selection_instance, xf_zero);
+ for (int i = 0; i < 3; i++) {
+ VisualServer::get_singleton()->instance_set_transform(selection_level_instance[i], xf_zero);
+ }
return;
}
@@ -255,6 +234,27 @@ void GridMapEditor::_update_selection_transform() {
xf.origin = selection.begin * node->get_cell_size();
VisualServer::get_singleton()->instance_set_transform(selection_instance, node->get_global_transform() * xf);
+
+ for (int i = 0; i < 3; i++) {
+ if (i != edit_axis || (edit_floor[edit_axis] < selection.begin[edit_axis]) || (edit_floor[edit_axis] > selection.end[edit_axis] + 1)) {
+ VisualServer::get_singleton()->instance_set_transform(selection_level_instance[i], xf_zero);
+ } else {
+
+ Vector3 scale = (selection.end - selection.begin + Vector3(1, 1, 1));
+ scale[edit_axis] = 1.0;
+ Vector3 pos = selection.begin;
+ pos[edit_axis] = edit_floor[edit_axis];
+
+ scale *= node->get_cell_size();
+ pos *= node->get_cell_size();
+
+ Transform xf;
+ xf.basis.scale(scale);
+ xf.origin = pos;
+
+ VisualServer::get_singleton()->instance_set_transform(selection_level_instance[i], xf);
+ }
+ }
}
void GridMapEditor::_validate_selection() {
@@ -297,7 +297,7 @@ bool GridMapEditor::do_input_action(Camera *p_camera, const Point2 &p_point, boo
Plane p;
p.normal[edit_axis] = 1.0;
- p.d = edit_floor[edit_axis] * node->get_cell_size();
+ p.d = edit_floor[edit_axis] * node->get_cell_size()[edit_axis];
Vector3 inters;
if (!p.intersects_segment(from, from + normal * settings_pick_distance->get_value(), &inters))
@@ -313,7 +313,7 @@ bool GridMapEditor::do_input_action(Camera *p_camera, const Point2 &p_point, boo
}
int cell[3];
- float cell_size[3] = { node->get_cell_size(), node->get_cell_size(), node->get_cell_size() };
+ float cell_size[3] = { node->get_cell_size().x, node->get_cell_size().y, node->get_cell_size().z };
last_mouseover = Vector3(-1, -1, -1);
@@ -323,7 +323,7 @@ bool GridMapEditor::do_input_action(Camera *p_camera, const Point2 &p_point, boo
cell[i] = edit_floor[i];
else {
- cell[i] = inters[i] / node->get_cell_size();
+ cell[i] = inters[i] / node->get_cell_size()[i];
if (inters[i] < 0)
cell[i] -= 1; //compensate negative
grid_ofs[i] = cell[i] * cell_size[i];
@@ -403,7 +403,7 @@ void GridMapEditor::_delete_selection() {
if (!selection.active)
return;
- undo_redo->create_action("GridMap Delete Selection");
+ undo_redo->create_action(TTR("GridMap Delete Selection"));
for (int i = selection.begin.x; i <= selection.end.x; i++) {
for (int j = selection.begin.y; j <= selection.end.y; j++) {
@@ -487,7 +487,7 @@ void GridMapEditor::_duplicate_paste() {
Vector3 ofs = selection.current - selection.click;
if (items.size()) {
- undo_redo->create_action("GridMap Duplicate Selection");
+ undo_redo->create_action(TTR("GridMap Duplicate Selection"));
for (List<__Item>::Element *E = items.front(); E; E = E->next()) {
__Item &it = E->get();
Vector3 pos = it.pos + ofs;
@@ -513,146 +513,96 @@ bool GridMapEditor::forward_spatial_input_event(Camera *p_camera, const Ref<Inpu
return false;
}
- if (edit_mode->get_selected() == 0) { // regular click
-
- Ref<InputEventMouseButton> mb = p_event;
-
- if (mb.is_valid()) {
-
- if (mb->get_button_index() == BUTTON_WHEEL_UP && (mb->get_command() || mb->get_shift())) {
- if (mb->is_pressed())
- floor->set_value(floor->get_value() + mb->get_factor());
-
- return true; //eaten
- } else if (mb->get_button_index() == BUTTON_WHEEL_DOWN && (mb->get_command() || mb->get_shift())) {
- if (mb->is_pressed())
- floor->set_value(floor->get_value() - mb->get_factor());
- return true;
- }
-
- if (mb->is_pressed()) {
-
- if (mb->get_button_index() == BUTTON_LEFT) {
+ Ref<InputEventMouseButton> mb = p_event;
- if (input_action == INPUT_DUPLICATE) {
+ if (mb.is_valid()) {
- //paste
- _duplicate_paste();
- input_action = INPUT_NONE;
- _update_duplicate_indicator();
- } else if (mb->get_shift()) {
- input_action = INPUT_SELECT;
- } else if (mb->get_command())
- input_action = INPUT_COPY;
- else {
- input_action = INPUT_PAINT;
- set_items.clear();
- }
- } else if (mb->get_button_index() == BUTTON_RIGHT)
- if (input_action == INPUT_DUPLICATE) {
-
- input_action = INPUT_NONE;
- _update_duplicate_indicator();
- } else {
- input_action = INPUT_ERASE;
- set_items.clear();
- }
- else
- return false;
+ if (mb->get_button_index() == BUTTON_WHEEL_UP && (mb->get_command() || mb->get_shift())) {
+ if (mb->is_pressed())
+ floor->set_value(floor->get_value() + mb->get_factor());
- return do_input_action(p_camera, Point2(mb->get_position().x, mb->get_position().y), true);
- } else {
-
- if (
- (mb->get_button_index() == BUTTON_RIGHT && input_action == INPUT_ERASE) ||
- (mb->get_button_index() == BUTTON_LEFT && input_action == INPUT_PAINT)) {
+ return true; //eaten
+ } else if (mb->get_button_index() == BUTTON_WHEEL_DOWN && (mb->get_command() || mb->get_shift())) {
+ if (mb->is_pressed())
+ floor->set_value(floor->get_value() - mb->get_factor());
+ return true;
+ }
- if (set_items.size()) {
- undo_redo->create_action("GridMap Paint");
- for (List<SetItem>::Element *E = set_items.front(); E; E = E->next()) {
+ if (mb->is_pressed()) {
- const SetItem &si = E->get();
- undo_redo->add_do_method(node, "set_cell_item", si.pos.x, si.pos.y, si.pos.z, si.new_value, si.new_orientation);
- }
- for (List<SetItem>::Element *E = set_items.back(); E; E = E->prev()) {
+ if (mb->get_button_index() == BUTTON_LEFT) {
- const SetItem &si = E->get();
- undo_redo->add_undo_method(node, "set_cell_item", si.pos.x, si.pos.y, si.pos.z, si.old_value, si.old_orientation);
- }
+ if (input_action == INPUT_DUPLICATE) {
- undo_redo->commit_action();
- }
- set_items.clear();
+ //paste
+ _duplicate_paste();
input_action = INPUT_NONE;
- return true;
- }
-
- if (mb->get_button_index() == BUTTON_LEFT && input_action != INPUT_NONE) {
-
+ _update_duplicate_indicator();
+ } else if (mb->get_shift()) {
+ input_action = INPUT_SELECT;
+ } else if (mb->get_command())
+ input_action = INPUT_COPY;
+ else {
+ input_action = INPUT_PAINT;
set_items.clear();
- input_action = INPUT_NONE;
- return true;
}
- if (mb->get_button_index() == BUTTON_RIGHT && (input_action == INPUT_ERASE || input_action == INPUT_DUPLICATE)) {
+ } else if (mb->get_button_index() == BUTTON_RIGHT)
+ if (input_action == INPUT_DUPLICATE) {
+
input_action = INPUT_NONE;
- return true;
+ _update_duplicate_indicator();
+ } else {
+ input_action = INPUT_ERASE;
+ set_items.clear();
}
- }
- }
-
- Ref<InputEventMouseMotion> mm = p_event;
+ else
+ return false;
- if (mm.is_valid()) {
+ return do_input_action(p_camera, Point2(mb->get_position().x, mb->get_position().y), true);
+ } else {
- return do_input_action(p_camera, mm->get_position(), false);
- }
-
- } else if (edit_mode->get_selected() == 1) {
- //area mode, select an area
-
- Ref<InputEventMouseButton> mb = p_event;
-
- if (mb.is_valid()) {
-
- if (mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
+ if (
+ (mb->get_button_index() == BUTTON_RIGHT && input_action == INPUT_ERASE) ||
+ (mb->get_button_index() == BUTTON_LEFT && input_action == INPUT_PAINT)) {
- Point2 point = mb->get_position();
+ if (set_items.size()) {
+ undo_redo->create_action("GridMap Paint");
+ for (List<SetItem>::Element *E = set_items.front(); E; E = E->next()) {
- Camera *camera = p_camera;
- Vector3 from = camera->project_ray_origin(point);
- Vector3 normal = camera->project_ray_normal(point);
- Transform local_xform = node->get_global_transform().affine_inverse();
- from = local_xform.xform(from);
- normal = local_xform.basis.xform(normal).normalized();
+ const SetItem &si = E->get();
+ undo_redo->add_do_method(node, "set_cell_item", si.pos.x, si.pos.y, si.pos.z, si.new_value, si.new_orientation);
+ }
+ for (List<SetItem>::Element *E = set_items.back(); E; E = E->prev()) {
- List<int> areas;
- node->get_area_list(&areas);
+ const SetItem &si = E->get();
+ undo_redo->add_undo_method(node, "set_cell_item", si.pos.x, si.pos.y, si.pos.z, si.old_value, si.old_orientation);
+ }
- float min_d = 1e10;
- int min_area = -1;
+ undo_redo->commit_action();
+ }
+ set_items.clear();
+ input_action = INPUT_NONE;
+ return true;
+ }
- for (List<int>::Element *E = areas.front(); E; E = E->next()) {
+ if (mb->get_button_index() == BUTTON_LEFT && input_action != INPUT_NONE) {
- int area = E->get();
- Rect3 aabb = node->area_get_bounds(area);
- aabb.position *= node->get_cell_size();
- aabb.size *= node->get_cell_size();
+ set_items.clear();
+ input_action = INPUT_NONE;
+ return true;
+ }
+ if (mb->get_button_index() == BUTTON_RIGHT && (input_action == INPUT_ERASE || input_action == INPUT_DUPLICATE)) {
+ input_action = INPUT_NONE;
+ return true;
+ }
+ }
+ }
- Vector3 rclip, rnormal;
- if (!aabb.intersects_segment(from, from + normal * 10000, &rclip, &rnormal))
- continue;
+ Ref<InputEventMouseMotion> mm = p_event;
- float d = normal.dot(rclip);
- if (d < min_d) {
- min_d = d;
- min_area = area;
- }
- }
+ if (mm.is_valid()) {
- selected_area = min_area;
- update_areas();
- }
- }
+ return do_input_action(p_camera, mm->get_position(), false);
}
return false;
@@ -749,52 +699,6 @@ void GridMapEditor::update_pallete() {
last_theme = theme.operator->();
}
-void GridMapEditor::_area_renamed() {
-
- TreeItem *it = area_list->get_selected();
- int area = it->get_metadata(0);
- if (area < 1)
- return;
- node->area_set_name(area, it->get_text(0));
-}
-
-void GridMapEditor::_area_selected() {
-
- TreeItem *it = area_list->get_selected();
- int area = it->get_metadata(0);
- if (area < 1)
- return;
- selected_area = area;
-}
-
-void GridMapEditor::update_areas() {
-
- area_list->clear();
-
- List<int> areas;
- node->get_area_list(&areas);
-
- TreeItem *root = area_list->create_item(NULL);
- area_list->set_hide_root(true);
- TreeItem *selected = NULL;
-
- for (List<int>::Element *E = areas.front(); E; E = E->next()) {
-
- int area = E->get();
- TreeItem *ti = area_list->create_item(root);
- String name = node->area_get_name(area);
-
- ti->set_metadata(0, area);
- ti->set_text(0, name);
- ti->set_editable(0, true);
- if (area == selected_area)
- selected = ti;
- }
-
- if (selected)
- selected->select(0);
-}
-
void GridMapEditor::edit(GridMap *p_gridmap) {
node = p_gridmap;
@@ -806,7 +710,7 @@ void GridMapEditor::edit(GridMap *p_gridmap) {
_update_selection_transform();
_update_duplicate_indicator();
- spatial_editor = editor->get_editor_plugin_screen()->cast_to<SpatialEditorPlugin>();
+ spatial_editor = Object::cast_to<SpatialEditorPlugin>(editor->get_editor_plugin_screen());
if (!node) {
set_process(false);
@@ -816,13 +720,10 @@ void GridMapEditor::edit(GridMap *p_gridmap) {
VisualServer::get_singleton()->instance_set_visible(cursor_instance, false);
- _clear_areas();
-
return;
}
update_pallete();
- update_areas();
set_process(true);
@@ -840,6 +741,7 @@ void GridMapEditor::edit(GridMap *p_gridmap) {
//update grids
indicator_mat.instance();
indicator_mat->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
+ indicator_mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
indicator_mat->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
indicator_mat->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
indicator_mat->set_albedo(Color(0.8, 0.5, 0.1));
@@ -847,7 +749,7 @@ void GridMapEditor::edit(GridMap *p_gridmap) {
Vector<Vector3> grid_points[3];
Vector<Color> grid_colors[3];
- float cell_size[3] = { p_gridmap->get_cell_size(), p_gridmap->get_cell_size(), p_gridmap->get_cell_size() };
+ float cell_size[3] = { p_gridmap->get_cell_size().x, p_gridmap->get_cell_size().y, p_gridmap->get_cell_size().z };
for (int i = 0; i < 3; i++) {
@@ -894,7 +796,6 @@ void GridMapEditor::edit(GridMap *p_gridmap) {
update_grid();
_update_clip();
- _update_areas_display();
}
void GridMapEditor::_update_clip() {
@@ -912,7 +813,7 @@ void GridMapEditor::update_grid() {
//VS *vs = VS::get_singleton();
- grid_ofs[edit_axis] = edit_floor[edit_axis] * node->get_cell_size();
+ grid_ofs[edit_axis] = edit_floor[edit_axis] * node->get_cell_size()[edit_axis];
edit_grid_xform.origin = grid_ofs;
edit_grid_xform.basis = Basis();
@@ -931,13 +832,11 @@ void GridMapEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
theme_pallete->connect("item_selected", this, "_item_selected_cbk");
- edit_mode->connect("item_selected", this, "_edit_mode_changed");
- area_list->connect("item_edited", this, "_area_renamed");
- area_list->connect("item_selected", this, "_area_selected");
for (int i = 0; i < 3; i++) {
grid[i] = VS::get_singleton()->mesh_create();
grid_instance[i] = VS::get_singleton()->instance_create2(grid[i], get_tree()->get_root()->get_world()->get_scenario());
+ selection_level_instance[i] = VisualServer::get_singleton()->instance_create2(selection_level_mesh[i], get_tree()->get_root()->get_world()->get_scenario());
}
selection_instance = VisualServer::get_singleton()->instance_create2(selection_mesh, get_tree()->get_root()->get_world()->get_scenario());
@@ -954,6 +853,7 @@ void GridMapEditor::_notification(int p_what) {
VS::get_singleton()->free(grid[i]);
grid_instance[i] = RID();
grid[i] = RID();
+ VisualServer::get_singleton()->free(selection_level_instance[i]);
}
VisualServer::get_singleton()->free(selection_instance);
@@ -962,6 +862,9 @@ void GridMapEditor::_notification(int p_what) {
duplicate_instance = RID();
} else if (p_what == NOTIFICATION_PROCESS) {
+ if (!node) {
+ return;
+ }
Transform xf = node->get_global_transform();
@@ -978,14 +881,14 @@ void GridMapEditor::_notification(int p_what) {
if (lock_view) {
- EditorNode *editor = get_tree()->get_root()->get_child(0)->cast_to<EditorNode>();
+ EditorNode *editor = Object::cast_to<EditorNode>(get_tree()->get_root()->get_child(0));
Plane p;
p.normal[edit_axis] = 1.0;
- p.d = edit_floor[edit_axis] * node->get_cell_size();
+ p.d = edit_floor[edit_axis] * node->get_cell_size()[edit_axis];
p = node->get_transform().xform(p); // plane to snap
- SpatialEditorPlugin *sep = editor->get_editor_plugin_screen()->cast_to<SpatialEditorPlugin>();
+ SpatialEditorPlugin *sep = Object::cast_to<SpatialEditorPlugin>(editor->get_editor_plugin_screen());
if (sep)
sep->snap_cursor_to_plane(p);
//editor->get_editor_plugin_screen()->call("snap_cursor_to_plane",p);
@@ -1021,85 +924,6 @@ void GridMapEditor::_item_selected_cbk(int idx) {
_update_cursor_instance();
}
-void GridMapEditor::_clear_areas() {
-
- for (int i = 0; i < areas.size(); i++) {
-
- VisualServer::get_singleton()->free(areas[i].instance);
- VisualServer::get_singleton()->free(areas[i].mesh);
- }
-
- areas.clear();
-}
-
-void GridMapEditor::_update_areas_display() {
- if (!node) {
- return;
- }
-#if 0
- _clear_areas();
- List<int> areas;
- node->get_area_list(&areas);
-
- Transform global_xf = node->get_global_transform();
-
- for(List<int>::Element *E=areas.front();E;E=E->next()) {
-
- int area = E->get();
- Color color;
- if (node->area_is_exterior_portal(area))
- color=Color(1,1,1,0.2);
- else
- color.set_hsv(Math::fmod(area*0.37,1),Math::fmod(area*0.75,1),1.0,0.2);
-
-
- RID material = VisualServer::get_singleton()->fixed_material_create();
- VisualServer::get_singleton()->fixed_material_set_param( material, VS::FIXED_MATERIAL_PARAM_DIFFUSE,color );
- VisualServer::get_singleton()->fixed_material_set_param( material, VS::FIXED_MATERIAL_PARAM_EMISSION,0.5 );
- VisualServer::get_singleton()->fixed_material_set_flag( material, VisualServer::FIXED_MATERIAL_FLAG_USE_ALPHA, true );
-
-
- RID mesh = VisualServer::get_singleton()->mesh_create();
-
- PoolVector<Plane> planes;
- for(int i=0;i<3;i++) {
-
- Vector3 axis;
- axis[i]=1.0;
- planes.push_back(Plane(axis,1));
- planes.push_back(Plane(-axis,0));
- }
-
- VisualServer::get_singleton()->mesh_add_surface_from_planes(mesh,planes);
- VisualServer::get_singleton()->mesh_surface_set_material(mesh,0,material,true);
-
- AreaDisplay ad;
- ad.mesh=mesh;
- ad.instance = VisualServer::get_singleton()->instance_create2(mesh,node->get_world()->get_scenario());
- Transform xform;
- Rect3 aabb = node->area_get_bounds(area);
- xform.origin=aabb.pos * node->get_cell_size();
- xform.basis.scale(aabb.size * node->get_cell_size());
- VisualServer::get_singleton()->instance_set_transform(ad.instance,global_xf * xform);
- this->areas.push_back(ad);
-
- }
-#endif
-}
-
-void GridMapEditor::_edit_mode_changed(int p_what) {
-
- if (p_what == 0) {
-
- theme_pallete->show();
- area_list->hide();
- } else {
-
- theme_pallete->hide();
- area_list->show();
- }
-}
-
void GridMapEditor::_floor_changed(float p_value) {
if (updating)
@@ -1109,6 +933,7 @@ void GridMapEditor::_floor_changed(float p_value) {
node->set_meta("_editor_floor_", Vector3(edit_floor[0], edit_floor[1], edit_floor[2]));
update_grid();
_update_clip();
+ _update_selection_transform();
}
void GridMapEditor::_bind_methods() {
@@ -1116,9 +941,6 @@ void GridMapEditor::_bind_methods() {
ClassDB::bind_method("_menu_option", &GridMapEditor::_menu_option);
ClassDB::bind_method("_configure", &GridMapEditor::_configure);
ClassDB::bind_method("_item_selected_cbk", &GridMapEditor::_item_selected_cbk);
- ClassDB::bind_method("_edit_mode_changed", &GridMapEditor::_edit_mode_changed);
- ClassDB::bind_method("_area_renamed", &GridMapEditor::_area_renamed);
- ClassDB::bind_method("_area_selected", &GridMapEditor::_area_selected);
ClassDB::bind_method("_floor_changed", &GridMapEditor::_floor_changed);
ClassDB::bind_method(D_METHOD("_set_display_mode", "mode"), &GridMapEditor::_set_display_mode);
@@ -1142,45 +964,43 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
spatial_editor_hb->hide();
options->set_text("Grid");
- options->get_popup()->add_check_item("Snap View", MENU_OPTION_LOCK_VIEW);
+ options->get_popup()->add_check_item(TTR("Snap View"), MENU_OPTION_LOCK_VIEW);
options->get_popup()->add_separator();
- options->get_popup()->add_item("Prev Level (" + keycode_get_string(KEY_MASK_CMD) + "Down Wheel)", MENU_OPTION_PREV_LEVEL);
- options->get_popup()->add_item("Next Level (" + keycode_get_string(KEY_MASK_CMD) + "Up Wheel)", MENU_OPTION_NEXT_LEVEL);
+ options->get_popup()->add_item(vformat(TTR("Prev Level (%sDown Wheel)"), keycode_get_string(KEY_MASK_CMD)), MENU_OPTION_PREV_LEVEL);
+ options->get_popup()->add_item(vformat(TTR("Next Level (%sUp Wheel)"), keycode_get_string(KEY_MASK_CMD)), MENU_OPTION_NEXT_LEVEL);
options->get_popup()->add_separator();
- options->get_popup()->add_check_item("Clip Disabled", MENU_OPTION_CLIP_DISABLED);
+ options->get_popup()->add_check_item(TTR("Clip Disabled"), MENU_OPTION_CLIP_DISABLED);
options->get_popup()->set_item_checked(options->get_popup()->get_item_index(MENU_OPTION_CLIP_DISABLED), true);
- options->get_popup()->add_check_item("Clip Above", MENU_OPTION_CLIP_ABOVE);
- options->get_popup()->add_check_item("Clip Below", MENU_OPTION_CLIP_BELOW);
+ options->get_popup()->add_check_item(TTR("Clip Above"), MENU_OPTION_CLIP_ABOVE);
+ options->get_popup()->add_check_item(TTR("Clip Below"), MENU_OPTION_CLIP_BELOW);
options->get_popup()->add_separator();
- options->get_popup()->add_check_item("Edit X Axis", MENU_OPTION_X_AXIS, KEY_Z);
- options->get_popup()->add_check_item("Edit Y Axis", MENU_OPTION_Y_AXIS, KEY_X);
- options->get_popup()->add_check_item("Edit Z Axis", MENU_OPTION_Z_AXIS, KEY_C);
+ options->get_popup()->add_check_item(TTR("Edit X Axis"), MENU_OPTION_X_AXIS, KEY_Z);
+ options->get_popup()->add_check_item(TTR("Edit Y Axis"), MENU_OPTION_Y_AXIS, KEY_X);
+ options->get_popup()->add_check_item(TTR("Edit Z Axis"), MENU_OPTION_Z_AXIS, KEY_C);
options->get_popup()->set_item_checked(options->get_popup()->get_item_index(MENU_OPTION_Y_AXIS), true);
options->get_popup()->add_separator();
- options->get_popup()->add_item("Cursor Rotate X", MENU_OPTION_CURSOR_ROTATE_X, KEY_A);
- options->get_popup()->add_item("Cursor Rotate Y", MENU_OPTION_CURSOR_ROTATE_Y, KEY_S);
- options->get_popup()->add_item("Cursor Rotate Z", MENU_OPTION_CURSOR_ROTATE_Z, KEY_D);
- options->get_popup()->add_item("Cursor Back Rotate X", MENU_OPTION_CURSOR_BACK_ROTATE_X, KEY_MASK_SHIFT + KEY_A);
- options->get_popup()->add_item("Cursor Back Rotate Y", MENU_OPTION_CURSOR_BACK_ROTATE_Y, KEY_MASK_SHIFT + KEY_S);
- options->get_popup()->add_item("Cursor Back Rotate Z", MENU_OPTION_CURSOR_BACK_ROTATE_Z, KEY_MASK_SHIFT + KEY_D);
- options->get_popup()->add_item("Cursor Clear Rotation", MENU_OPTION_CURSOR_CLEAR_ROTATION, KEY_W);
+ options->get_popup()->add_item(TTR("Cursor Rotate X"), MENU_OPTION_CURSOR_ROTATE_X, KEY_A);
+ options->get_popup()->add_item(TTR("Cursor Rotate Y"), MENU_OPTION_CURSOR_ROTATE_Y, KEY_S);
+ options->get_popup()->add_item(TTR("Cursor Rotate Z"), MENU_OPTION_CURSOR_ROTATE_Z, KEY_D);
+ options->get_popup()->add_item(TTR("Cursor Back Rotate X"), MENU_OPTION_CURSOR_BACK_ROTATE_X, KEY_MASK_SHIFT + KEY_A);
+ options->get_popup()->add_item(TTR("Cursor Back Rotate Y"), MENU_OPTION_CURSOR_BACK_ROTATE_Y, KEY_MASK_SHIFT + KEY_S);
+ options->get_popup()->add_item(TTR("Cursor Back Rotate Z"), MENU_OPTION_CURSOR_BACK_ROTATE_Z, KEY_MASK_SHIFT + KEY_D);
+ options->get_popup()->add_item(TTR("Cursor Clear Rotation"), MENU_OPTION_CURSOR_CLEAR_ROTATION, KEY_W);
options->get_popup()->add_separator();
options->get_popup()->add_check_item("Duplicate Selects", MENU_OPTION_DUPLICATE_SELECTS);
options->get_popup()->add_separator();
- options->get_popup()->add_item("Create Area", MENU_OPTION_SELECTION_MAKE_AREA, KEY_CONTROL + KEY_C);
- options->get_popup()->add_item("Create Exterior Connector", MENU_OPTION_SELECTION_MAKE_EXTERIOR_CONNECTOR);
- options->get_popup()->add_item("Erase Area", MENU_OPTION_REMOVE_AREA);
+ options->get_popup()->add_item(TTR("Create Area"), MENU_OPTION_SELECTION_MAKE_AREA, KEY_CONTROL + KEY_C);
+ options->get_popup()->add_item(TTR("Create Exterior Connector"), MENU_OPTION_SELECTION_MAKE_EXTERIOR_CONNECTOR);
+ options->get_popup()->add_item(TTR("Erase Area"), MENU_OPTION_REMOVE_AREA);
options->get_popup()->add_separator();
- options->get_popup()->add_item("Selection -> Duplicate", MENU_OPTION_SELECTION_DUPLICATE, KEY_MASK_SHIFT + KEY_INSERT);
- options->get_popup()->add_item("Selection -> Clear", MENU_OPTION_SELECTION_CLEAR, KEY_MASK_SHIFT + KEY_DELETE);
- //options->get_popup()->add_separator();
- //options->get_popup()->add_item("Configure",MENU_OPTION_CONFIGURE);
+ options->get_popup()->add_item(TTR("Selection -> Duplicate"), MENU_OPTION_SELECTION_DUPLICATE, KEY_MASK_SHIFT + KEY_INSERT);
+ options->get_popup()->add_item(TTR("Selection -> Clear"), MENU_OPTION_SELECTION_CLEAR, KEY_MASK_SHIFT + KEY_DELETE);
options->get_popup()->add_separator();
- options->get_popup()->add_item("Settings", MENU_OPTION_GRIDMAP_SETTINGS);
+ options->get_popup()->add_item(TTR("Settings"), MENU_OPTION_GRIDMAP_SETTINGS);
settings_dialog = memnew(ConfirmationDialog);
- settings_dialog->set_title("GridMap Settings");
+ settings_dialog->set_title(TTR("GridMap Settings"));
add_child(settings_dialog);
settings_vbc = memnew(VBoxContainer);
settings_vbc->set_custom_minimum_size(Size2(200, 0));
@@ -1191,7 +1011,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
settings_pick_distance->set_min(500.0f);
settings_pick_distance->set_step(1.0f);
settings_pick_distance->set_value(EDITOR_DEF("editors/grid_map/pick_distance", 5000.0));
- settings_vbc->add_margin_child("Pick Distance:", settings_pick_distance);
+ settings_vbc->add_margin_child(TTR("Pick Distance:"), settings_pick_distance);
clip_mode = CLIP_DISABLED;
options->get_popup()->connect("id_pressed", this, "_menu_option");
@@ -1200,15 +1020,6 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
add_child(hb);
hb->set_h_size_flags(SIZE_EXPAND_FILL);
- edit_mode = memnew(OptionButton);
- edit_mode->set_area_as_parent_rect();
- edit_mode->set_anchor_and_margin(MARGIN_BOTTOM, ANCHOR_BEGIN, 24);
- edit_mode->set_margin(MARGIN_RIGHT, -14);
- edit_mode->add_item("Tiles");
- edit_mode->add_item("Areas");
- hb->add_child(edit_mode);
- edit_mode->set_h_size_flags(SIZE_EXPAND_FILL);
-
mode_thumbnail = memnew(ToolButton);
mode_thumbnail->set_toggle_mode(true);
mode_thumbnail->set_pressed(true);
@@ -1226,17 +1037,11 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
EDITOR_DEF("editors/grid_map/preview_size", 64);
display_mode = DISPLAY_THUMBNAIL;
- selected_area = -1;
theme_pallete = memnew(ItemList);
add_child(theme_pallete);
theme_pallete->set_v_size_flags(SIZE_EXPAND_FILL);
- area_list = memnew(Tree);
- add_child(area_list);
- area_list->set_v_size_flags(SIZE_EXPAND_FILL);
- area_list->hide();
-
spatial_editor_hb->add_child(memnew(VSeparator));
Label *fl = memnew(Label);
fl->set_text(" Floor: ");
@@ -1270,6 +1075,7 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
PoolVector<Vector3> lines;
PoolVector<Vector3> triangles;
+ PoolVector<Vector3> square[3];
for (int i = 0; i < 6; i++) {
@@ -1309,12 +1115,41 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
lines.push_back(b);
}
+ for (int i = 0; i < 3; i++) {
+ Vector3 points[4];
+ for (int j = 0; j < 4; j++) {
+
+ static const bool orderx[4] = { 0, 1, 1, 0 };
+ static const bool ordery[4] = { 0, 0, 1, 1 };
+
+ Vector3 sp;
+ if (orderx[j]) {
+ sp[(i + 1) % 3] = 1.0;
+ }
+ if (ordery[j]) {
+ sp[(i + 2) % 3] = 1.0;
+ }
+
+ points[j] = sp;
+ }
+
+ for (int j = 0; j < 4; j++) {
+
+ Vector3 ofs;
+ ofs[i] += 0.01;
+ square[i].push_back(points[j] - ofs);
+ square[i].push_back(points[(j + 1) % 4] - ofs);
+ square[i].push_back(points[j] + ofs);
+ square[i].push_back(points[(j + 1) % 4] + ofs);
+ }
+ }
+
Array d;
d.resize(VS::ARRAY_MAX);
inner_mat.instance();
- inner_mat->set_albedo(Color(0.7, 0.7, 1.0, 0.3));
- inner_mat->set_flag(SpatialMaterial::FLAG_ONTOP, true);
+ inner_mat->set_albedo(Color(0.7, 0.7, 1.0, 0.2));
+ //inner_mat->set_flag(SpatialMaterial::FLAG_ONTOP, true);
inner_mat->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
inner_mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
@@ -1323,12 +1158,19 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
VisualServer::get_singleton()->mesh_surface_set_material(selection_mesh, 0, inner_mat->get_rid());
outer_mat.instance();
- outer_mat->set_albedo(Color(0.7, 0.7, 1.0, 0.3));
- outer_mat->set_flag(SpatialMaterial::FLAG_ONTOP, true);
+ outer_mat->set_albedo(Color(0.7, 0.7, 1.0, 0.8));
+ outer_mat->set_on_top_of_alpha();
outer_mat->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
outer_mat->set_line_width(3.0);
outer_mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
+ selection_floor_mat.instance();
+ selection_floor_mat->set_albedo(Color(0.80, 0.80, 1.0, 1));
+ selection_floor_mat->set_on_top_of_alpha();
+ selection_floor_mat->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
+ selection_floor_mat->set_line_width(3.0);
+ //selection_floor_mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true);
+
d[VS::ARRAY_VERTEX] = lines;
VisualServer::get_singleton()->mesh_add_surface_from_arrays(selection_mesh, VS::PRIMITIVE_LINES, d);
VisualServer::get_singleton()->mesh_surface_set_material(selection_mesh, 1, outer_mat->get_rid());
@@ -1340,6 +1182,13 @@ GridMapEditor::GridMapEditor(EditorNode *p_editor) {
d[VS::ARRAY_VERTEX] = lines;
VisualServer::get_singleton()->mesh_add_surface_from_arrays(duplicate_mesh, VS::PRIMITIVE_LINES, d);
VisualServer::get_singleton()->mesh_surface_set_material(duplicate_mesh, 1, outer_mat->get_rid());
+
+ for (int i = 0; i < 3; i++) {
+ d[VS::ARRAY_VERTEX] = square[i];
+ selection_level_mesh[i] = VS::get_singleton()->mesh_create();
+ VisualServer::get_singleton()->mesh_add_surface_from_arrays(selection_level_mesh[i], VS::PRIMITIVE_LINES, d);
+ VisualServer::get_singleton()->mesh_surface_set_material(selection_level_mesh[i], 0, selection_floor_mat->get_rid());
+ }
}
selection.active = false;
@@ -1356,6 +1205,9 @@ GridMapEditor::~GridMapEditor() {
VisualServer::get_singleton()->free(grid_instance[i]);
if (cursor_instance.is_valid())
VisualServer::get_singleton()->free(cursor_instance);
+ if (selection_level_instance[i].is_valid()) {
+ VisualServer::get_singleton()->free(selection_level_instance[i]);
+ }
}
VisualServer::get_singleton()->free(selection_mesh);
@@ -1365,13 +1217,11 @@ GridMapEditor::~GridMapEditor() {
VisualServer::get_singleton()->free(duplicate_mesh);
if (duplicate_instance.is_valid())
VisualServer::get_singleton()->free(duplicate_instance);
-
- _clear_areas();
}
void GridMapEditorPlugin::edit(Object *p_object) {
- gridmap_editor->edit(p_object ? p_object->cast_to<GridMap>() : NULL);
+ gridmap_editor->edit(Object::cast_to<GridMap>(p_object));
}
bool GridMapEditorPlugin::handles(Object *p_object) const {
diff --git a/modules/gridmap/grid_map_editor_plugin.h b/modules/gridmap/grid_map_editor_plugin.h
index a1b2c96ccd..ecbfbf2d65 100644
--- a/modules/gridmap/grid_map_editor_plugin.h
+++ b/modules/gridmap/grid_map_editor_plugin.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -75,7 +75,6 @@ class GridMapEditor : public VBoxContainer {
Panel *panel;
MenuButton *options;
SpinBox *floor;
- OptionButton *edit_mode;
ToolButton *mode_thumbnail;
ToolButton *mode_list;
HBoxContainer *spatial_editor_hb;
@@ -110,12 +109,15 @@ class GridMapEditor : public VBoxContainer {
RID cursor_instance;
RID selection_mesh;
RID selection_instance;
+ RID selection_level_mesh[3];
+ RID selection_level_instance[3];
RID duplicate_mesh;
RID duplicate_instance;
Ref<SpatialMaterial> indicator_mat;
Ref<SpatialMaterial> inner_mat;
Ref<SpatialMaterial> outer_mat;
+ Ref<SpatialMaterial> selection_floor_mat;
bool updating;
@@ -137,7 +139,6 @@ class GridMapEditor : public VBoxContainer {
int display_mode;
int selected_pallete;
- int selected_area;
int cursor_rot;
enum Menu {
@@ -177,18 +178,12 @@ class GridMapEditor : public VBoxContainer {
RID instance;
};
- Vector<AreaDisplay> areas;
-
- void _update_areas_display();
- void _clear_areas();
-
void update_grid();
void _configure();
void _menu_option(int);
void update_pallete();
void _set_display_mode(int p_mode);
ItemList *theme_pallete;
- Tree *area_list;
void _item_selected_cbk(int idx);
void _update_cursor_transform();
void _update_cursor_instance();
@@ -199,14 +194,9 @@ class GridMapEditor : public VBoxContainer {
void _update_selection_transform();
void _validate_selection();
- void _edit_mode_changed(int p_what);
- void _area_renamed();
- void _area_selected();
-
void _floor_changed(float p_value);
void _delete_selection();
- void update_areas();
EditorNode *editor;
bool do_input_action(Camera *p_camera, const Point2 &p_point, bool p_click);
@@ -236,7 +226,7 @@ class GridMapEditorPlugin : public EditorPlugin {
EditorNode *editor;
public:
- virtual bool forward_spatial_input_event(Camera *p_camera, const Ref<InputEvent> &p_event) { return gridmap_editor->forward_spatial_input_event(p_camera, p_event); }
+ virtual bool forward_spatial_gui_input(Camera *p_camera, const Ref<InputEvent> &p_event) { return gridmap_editor->forward_spatial_input_event(p_camera, p_event); }
virtual String get_name() const { return "GridMap"; }
bool has_main_screen() const { return false; }
virtual void edit(Object *p_object);
diff --git a/modules/gridmap/register_types.cpp b/modules/gridmap/register_types.cpp
index e4def9378f..e2f6b57c04 100644
--- a/modules/gridmap/register_types.cpp
+++ b/modules/gridmap/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/gridmap/register_types.h b/modules/gridmap/register_types.h
index 1978353fc3..c50f89155f 100644
--- a/modules/gridmap/register_types.h
+++ b/modules/gridmap/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/hdr/image_loader_hdr.cpp b/modules/hdr/image_loader_hdr.cpp
index a3f0601043..92d88207b3 100644
--- a/modules/hdr/image_loader_hdr.cpp
+++ b/modules/hdr/image_loader_hdr.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* image_loader_jpegd.cpp */
+/* image_loader_hdr.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/hdr/image_loader_hdr.h b/modules/hdr/image_loader_hdr.h
index 1e08e954e1..569978d28d 100644
--- a/modules/hdr/image_loader_hdr.h
+++ b/modules/hdr/image_loader_hdr.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* image_loader_jpegd.h */
+/* image_loader_hdr.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/hdr/register_types.cpp b/modules/hdr/register_types.cpp
index e4f7c14aa7..808b168432 100644
--- a/modules/hdr/register_types.cpp
+++ b/modules/hdr/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/hdr/register_types.h b/modules/hdr/register_types.h
index 3d901ea003..e453192d9c 100644
--- a/modules/hdr/register_types.h
+++ b/modules/hdr/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/jpg/image_loader_jpegd.cpp b/modules/jpg/image_loader_jpegd.cpp
index 4f38e83274..57ec074bbb 100644
--- a/modules/jpg/image_loader_jpegd.cpp
+++ b/modules/jpg/image_loader_jpegd.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/jpg/image_loader_jpegd.h b/modules/jpg/image_loader_jpegd.h
index 917c0e1d95..6a2f042412 100644
--- a/modules/jpg/image_loader_jpegd.h
+++ b/modules/jpg/image_loader_jpegd.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/jpg/register_types.cpp b/modules/jpg/register_types.cpp
index 2379bee0df..85dee90eb0 100644
--- a/modules/jpg/register_types.cpp
+++ b/modules/jpg/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/jpg/register_types.h b/modules/jpg/register_types.h
index c14f860742..3d912a4398 100644
--- a/modules/jpg/register_types.h
+++ b/modules/jpg/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/nativescript/api_generator.cpp b/modules/nativescript/api_generator.cpp
index d9e78ba54a..fdd5a2ea19 100644
--- a/modules/nativescript/api_generator.cpp
+++ b/modules/nativescript/api_generator.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -33,6 +33,7 @@
#include "class_db.h"
#include "core/global_constants.h"
+#include "core/pair.h"
#include "core/project_settings.h"
#include "os/file_access.h"
@@ -93,6 +94,11 @@ struct SignalAPI {
Map<int, Variant> default_arguments;
};
+struct EnumAPI {
+ String name;
+ List<Pair<int, String> > values;
+};
+
struct ClassAPI {
String class_name;
String super_class_name;
@@ -109,8 +115,28 @@ struct ClassAPI {
List<PropertyAPI> properties;
List<ConstantAPI> constants;
List<SignalAPI> signals_;
+ List<EnumAPI> enums;
};
+static String get_type_name(const PropertyInfo &info) {
+ if (info.type == Variant::INT && (info.usage & PROPERTY_USAGE_CLASS_IS_ENUM)) {
+ return String("enum.") + String(info.class_name).replace(".", "::");
+ }
+ if (info.class_name != StringName()) {
+ return info.class_name;
+ }
+ if (info.hint == PROPERTY_HINT_RESOURCE_TYPE) {
+ return info.hint_string;
+ }
+ if (info.type == Variant::NIL && (info.usage & PROPERTY_USAGE_NIL_IS_VARIANT)) {
+ return "Variant";
+ }
+ if (info.type == Variant::NIL) {
+ return "void";
+ }
+ return Variant::get_type_name(info.type);
+}
+
/*
* Reads the entire Godot API to a list
*/
@@ -194,12 +220,8 @@ List<ClassAPI> generate_c_api_classes() {
if (argument.name.find(":") != -1) {
type = argument.name.get_slice(":", 1);
name = argument.name.get_slice(":", 0);
- } else if (argument.hint == PROPERTY_HINT_RESOURCE_TYPE) {
- type = argument.hint_string;
- } else if (argument.type == Variant::NIL) {
- type = "Variant";
} else {
- type = Variant::get_type_name(argument.type);
+ type = get_type_name(argument);
}
signal.argument_names.push_back(name);
@@ -233,12 +255,8 @@ List<ClassAPI> generate_c_api_classes() {
if (p->get().name.find(":") != -1) {
property_api.type = p->get().name.get_slice(":", 1);
property_api.name = p->get().name.get_slice(":", 0);
- } else if (p->get().hint == PROPERTY_HINT_RESOURCE_TYPE) {
- property_api.type = p->get().hint_string;
- } else if (p->get().type == Variant::NIL) {
- property_api.type = "Variant";
} else {
- property_api.type = Variant::get_type_name(p->get().type);
+ property_api.type = get_type_name(p->get());
}
if (!property_api.setter.empty() || !property_api.getter.empty()) {
@@ -260,17 +278,11 @@ List<ClassAPI> generate_c_api_classes() {
//method name
method_api.method_name = m->get().name;
//method return type
- if (method_bind && method_bind->get_return_type() != StringName()) {
- method_api.return_type = method_bind->get_return_type();
- } else if (method_api.method_name.find(":") != -1) {
+ if (method_api.method_name.find(":") != -1) {
method_api.return_type = method_api.method_name.get_slice(":", 1);
method_api.method_name = method_api.method_name.get_slice(":", 0);
- } else if (m->get().return_val.type != Variant::NIL) {
- method_api.return_type = m->get().return_val.hint == PROPERTY_HINT_RESOURCE_TYPE ? m->get().return_val.hint_string : Variant::get_type_name(m->get().return_val.type);
- } else if (m->get().return_val.name != "") {
- method_api.return_type = m->get().return_val.name;
} else {
- method_api.return_type = "void";
+ method_api.return_type = get_type_name(m->get().return_val);
}
method_api.argument_count = method_info.arguments.size();
@@ -321,6 +333,25 @@ List<ClassAPI> generate_c_api_classes() {
}
}
+ // enums
+ {
+ List<EnumAPI> enums;
+ List<StringName> enum_names;
+ ClassDB::get_enum_list(class_name, &enum_names, true);
+ for (List<StringName>::Element *E = enum_names.front(); E; E = E->next()) {
+ List<StringName> value_names;
+ EnumAPI enum_api;
+ enum_api.name = E->get();
+ ClassDB::get_enum_constants(class_name, E->get(), &value_names, true);
+ for (List<StringName>::Element *val_e = value_names.front(); val_e; val_e = val_e->next()) {
+ int int_val = ClassDB::get_integer_constant(class_name, val_e->get(), NULL);
+ enum_api.values.push_back(Pair<int, String>(int_val, val_e->get()));
+ }
+ enum_api.values.sort_custom<PairSort<int, String> >();
+ class_api.enums.push_back(enum_api);
+ }
+ }
+
api.push_back(class_api);
}
@@ -410,11 +441,24 @@ static List<String> generate_c_api_json(const List<ClassAPI> &p_api) {
source.push_back("\t\t\t\t]\n");
source.push_back(String("\t\t\t}") + (e->next() ? "," : "") + "\n");
}
+ source.push_back("\t\t],\n");
+
+ source.push_back("\t\t\"enums\": [\n");
+ for (List<EnumAPI>::Element *e = api.enums.front(); e; e = e->next()) {
+ source.push_back("\t\t\t{\n");
+ source.push_back("\t\t\t\t\"name\": \"" + e->get().name + "\",\n");
+ source.push_back("\t\t\t\t\"values\": {\n");
+ for (List<Pair<int, String> >::Element *val_e = e->get().values.front(); val_e; val_e = val_e->next()) {
+ source.push_back("\t\t\t\t\t\"" + val_e->get().second + "\": " + itos(val_e->get().first));
+ source.push_back(String((val_e->next() ? "," : "")) + "\n");
+ }
+ source.push_back("\t\t\t\t}\n");
+ source.push_back(String("\t\t\t}") + (e->next() ? "," : "") + "\n");
+ }
source.push_back("\t\t]\n");
source.push_back(String("\t}") + (c->next() ? "," : "") + "\n");
}
-
source.push_back("]");
return source;
diff --git a/modules/nativescript/api_generator.h b/modules/nativescript/api_generator.h
index a108d7a7b6..56c2d786e6 100644
--- a/modules/nativescript/api_generator.h
+++ b/modules/nativescript/api_generator.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/nativescript/godot_nativescript.cpp b/modules/nativescript/godot_nativescript.cpp
index 453cee3a18..926b3261b2 100644
--- a/modules/nativescript/godot_nativescript.cpp
+++ b/modules/nativescript/godot_nativescript.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/nativescript/godot_nativescript.h b/modules/nativescript/godot_nativescript.h
index cfd445086b..d1cbf221ec 100644
--- a/modules/nativescript/godot_nativescript.h
+++ b/modules/nativescript/godot_nativescript.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* godot.h */
+/* godot_nativescript.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -58,7 +58,7 @@ extern "C" {
#define GDAPI GDCALLINGCONV
#endif
#else
-#define GDCALLINGCONV __attribute__((sysv_abi))
+#define GDCALLINGCONV __attribute__((sysv_abi, visibility("default")))
#define GDAPI GDCALLINGCONV
#endif
diff --git a/modules/nativescript/nativescript.cpp b/modules/nativescript/nativescript.cpp
index d428834d59..e141080687 100644
--- a/modules/nativescript/nativescript.cpp
+++ b/modules/nativescript/nativescript.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -399,7 +399,7 @@ Variant NativeScript::_new(const Variant **p_args, int p_argcount, Variant::Call
owner = memnew(Reference);
}
- Reference *r = owner->cast_to<Reference>();
+ Reference *r = Object::cast_to<Reference>(owner);
if (r) {
ref = REF(r);
}
@@ -994,6 +994,8 @@ void NativeScriptLanguage::init_library(const Ref<GDNativeLibrary> &lib) {
#endif
// See if this library was "registered" already.
const String &lib_path = lib->get_active_library_path();
+ ERR_EXPLAIN(lib->get_name() + " does not have a library for the current platform");
+ ERR_FAIL_COND(lib_path.length() == 0);
Map<String, Ref<GDNative> >::Element *E = library_gdnatives.find(lib_path);
if (!E) {
@@ -1203,11 +1205,11 @@ Error ResourceFormatSaverNativeScript::save(const String &p_path, const RES &p_r
}
bool ResourceFormatSaverNativeScript::recognize(const RES &p_resource) const {
- return p_resource->cast_to<NativeScript>() != NULL;
+ return Object::cast_to<NativeScript>(*p_resource) != NULL;
}
void ResourceFormatSaverNativeScript::get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const {
- if (p_resource->cast_to<NativeScript>()) {
+ if (Object::cast_to<NativeScript>(*p_resource)) {
p_extensions->push_back("gdns");
}
}
diff --git a/modules/nativescript/nativescript.h b/modules/nativescript/nativescript.h
index b62fefec40..571a3c9cc7 100644
--- a/modules/nativescript/nativescript.h
+++ b/modules/nativescript/nativescript.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/nativescript/register_types.cpp b/modules/nativescript/register_types.cpp
index c28b982884..b846710ab8 100644
--- a/modules/nativescript/register_types.cpp
+++ b/modules/nativescript/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/nativescript/register_types.h b/modules/nativescript/register_types.h
index 319da9c42f..7ac558f68f 100644
--- a/modules/nativescript/register_types.h
+++ b/modules/nativescript/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/ogg/register_types.cpp b/modules/ogg/register_types.cpp
index 9837ae12d9..452e6e332a 100644
--- a/modules/ogg/register_types.cpp
+++ b/modules/ogg/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/ogg/register_types.h b/modules/ogg/register_types.h
index dc84227b80..a2a8b7cedc 100644
--- a/modules/ogg/register_types.h
+++ b/modules/ogg/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/openssl/SCsub b/modules/openssl/SCsub
index add7d4dcfc..eb3c0e64d8 100644
--- a/modules/openssl/SCsub
+++ b/modules/openssl/SCsub
@@ -655,7 +655,7 @@ if (env['builtin_openssl'] != 'no'):
env_openssl.add_source_files(env.modules_sources, thirdparty_sources)
- # FIXME: Clone the environment to make a env_openssl and not pollute the modules env
+ # FIXME: Clone the environment to make env_openssl and not pollute the modules env
thirdparty_include_paths = [
"",
"crypto",
diff --git a/modules/openssl/register_types.cpp b/modules/openssl/register_types.cpp
index e1ae581caf..16563aabf7 100644
--- a/modules/openssl/register_types.cpp
+++ b/modules/openssl/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/openssl/register_types.h b/modules/openssl/register_types.h
index ff39ec8798..58f2d55c98 100644
--- a/modules/openssl/register_types.h
+++ b/modules/openssl/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/openssl/stream_peer_openssl.cpp b/modules/openssl/stream_peer_openssl.cpp
index 8c5e6f83c3..d40bf73883 100644
--- a/modules/openssl/stream_peer_openssl.cpp
+++ b/modules/openssl/stream_peer_openssl.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,15 +28,12 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "stream_peer_openssl.h"
-//hostname matching code from curl
-//#include <openssl/applink.c> // To prevent crashing (see the OpenSSL FAQ)
+//hostname matching code from curl
bool StreamPeerOpenSSL::_match_host_name(const char *name, const char *hostname) {
return Tool_Curl_cert_hostcheck(name, hostname) == CURL_HOST_MATCH;
- //print_line("MATCH: "+String(name)+" vs "+String(hostname));
- //return true;
}
Error StreamPeerOpenSSL::_match_common_name(const char *hostname, const X509 *server_cert) {
@@ -298,20 +295,6 @@ Error StreamPeerOpenSSL::connect_to_stream(Ref<StreamPeer> p_base, bool p_valida
X509_STORE_add_cert(store, certs[i]);
}
-#if 0
- const unsigned char *in=(const unsigned char *)certs.ptr();
- X509 *Cert = d2i_X509(NULL, &in, certs.size()-1);
- if (!Cert) {
- print_line(String(ERR_error_string(ERR_get_error(),NULL)));
- }
- ERR_FAIL_COND_V(!Cert,ERR_PARSE_ERROR);
-
- X509_STORE *store = SSL_CTX_get_cert_store(ctx);
- X509_STORE_add_cert(store,Cert);
-
- //char *str = X509_NAME_oneline(X509_get_subject_name(Cert),0,0);
- //printf ("subject: %s\n", str); /* [1] */
-#endif
}
//used for testing
diff --git a/modules/openssl/stream_peer_openssl.h b/modules/openssl/stream_peer_openssl.h
index b1da5e1d95..1e445ef681 100644
--- a/modules/openssl/stream_peer_openssl.h
+++ b/modules/openssl/stream_peer_openssl.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/opus/audio_stream_opus.cpp b/modules/opus/audio_stream_opus.cpp
index e361ebf019..1dac890eb8 100644
--- a/modules/opus/audio_stream_opus.cpp
+++ b/modules/opus/audio_stream_opus.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/opus/audio_stream_opus.h b/modules/opus/audio_stream_opus.h
index daf3958c2a..ccfe04e84e 100644
--- a/modules/opus/audio_stream_opus.h
+++ b/modules/opus/audio_stream_opus.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/opus/register_types.cpp b/modules/opus/register_types.cpp
index e8bff58cbb..a69c8bf9f3 100644
--- a/modules/opus/register_types.cpp
+++ b/modules/opus/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/opus/register_types.h b/modules/opus/register_types.h
index 4517dc5df7..1865b7966e 100644
--- a/modules/opus/register_types.h
+++ b/modules/opus/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/pbm/bitmap_loader_pbm.cpp b/modules/pbm/bitmap_loader_pbm.cpp
index 93dedbd05f..d222935970 100644
--- a/modules/pbm/bitmap_loader_pbm.cpp
+++ b/modules/pbm/bitmap_loader_pbm.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/pbm/bitmap_loader_pbm.h b/modules/pbm/bitmap_loader_pbm.h
index 7a72edaeee..85d3eadcb9 100644
--- a/modules/pbm/bitmap_loader_pbm.h
+++ b/modules/pbm/bitmap_loader_pbm.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/pbm/register_types.cpp b/modules/pbm/register_types.cpp
index c9531ba14f..60401b8cc9 100644
--- a/modules/pbm/register_types.cpp
+++ b/modules/pbm/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/pbm/register_types.h b/modules/pbm/register_types.h
index 3888fd6f77..b75eff55d3 100644
--- a/modules/pbm/register_types.h
+++ b/modules/pbm/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/pvr/register_types.cpp b/modules/pvr/register_types.cpp
index 04e20558ce..8fb78d7734 100644
--- a/modules/pvr/register_types.cpp
+++ b/modules/pvr/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/pvr/register_types.h b/modules/pvr/register_types.h
index 7ff5237c03..4db8219b21 100644
--- a/modules/pvr/register_types.h
+++ b/modules/pvr/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp
index bdd4779e28..9989785c70 100644
--- a/modules/pvr/texture_loader_pvr.cpp
+++ b/modules/pvr/texture_loader_pvr.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/pvr/texture_loader_pvr.h b/modules/pvr/texture_loader_pvr.h
index 7d60831175..a51160d902 100644
--- a/modules/pvr/texture_loader_pvr.h
+++ b/modules/pvr/texture_loader_pvr.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/regex/SCsub b/modules/regex/SCsub
index 0882406761..2dfc2739e9 100644
--- a/modules/regex/SCsub
+++ b/modules/regex/SCsub
@@ -1,7 +1,53 @@
#!/usr/bin/env python
Import('env')
+Import('env_modules')
-env.add_source_files(env.modules_sources, "*.cpp")
+env_regex = env_modules.Clone()
+env_regex.Append(CPPFLAGS=["-DPCRE2_CODE_UNIT_WIDTH=0"])
+env_regex.add_source_files(env.modules_sources, "*.cpp")
-Export('env')
+if (env['builtin_pcre2'] != 'no'):
+ jit_blacklist = ['javascript']
+ thirdparty_dir = '#thirdparty/pcre2/src/'
+ thirdparty_flags = ['-DPCRE2_STATIC', '-DHAVE_CONFIG_H']
+ if 'platform' in env and env['platform'] not in jit_blacklist:
+ thirdparty_flags.append('-DSUPPORT_JIT')
+ thirdparty_sources = [
+ "pcre2_auto_possess.c",
+ "pcre2_chartables.c",
+ "pcre2_compile.c",
+ "pcre2_config.c",
+ "pcre2_context.c",
+ "pcre2_dfa_match.c",
+ "pcre2_error.c",
+ "pcre2_find_bracket.c",
+ "pcre2_jit_compile.c",
+ "pcre2_maketables.c",
+ "pcre2_match.c",
+ "pcre2_match_data.c",
+ "pcre2_newline.c",
+ "pcre2_ord2utf.c",
+ "pcre2_pattern_info.c",
+ "pcre2_serialize.c",
+ "pcre2_string_utils.c",
+ "pcre2_study.c",
+ "pcre2_substitute.c",
+ "pcre2_substring.c",
+ "pcre2_tables.c",
+ "pcre2_ucd.c",
+ "pcre2_valid_utf.c",
+ "pcre2_xclass.c",
+ ]
+ thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
+ env_regex.Append(CPPPATH=[thirdparty_dir])
+ env_regex.Append(CPPFLAGS=thirdparty_flags)
+ def pcre2_builtin(width):
+ env_pcre2 = env_modules.Clone()
+ env_pcre2["OBJSUFFIX"] = "_" + width + env_pcre2["OBJSUFFIX"]
+ env_pcre2.Append(CPPPATH=[thirdparty_dir])
+ env_pcre2.add_source_files(env.modules_sources, thirdparty_sources)
+ env_pcre2.Append(CPPFLAGS=thirdparty_flags)
+ env_pcre2.Append(CPPFLAGS=["-DPCRE2_CODE_UNIT_WIDTH=" + width])
+ pcre2_builtin("16")
+ pcre2_builtin("32")
diff --git a/modules/regex/regex.cpp b/modules/regex/regex.cpp
index c728657d6b..00e8ce0f54 100644
--- a/modules/regex/regex.cpp
+++ b/modules/regex/regex.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -29,1479 +29,469 @@
/*************************************************************************/
#include "regex.h"
-#include <wchar.h>
-#include <wctype.h>
-
-static int RegEx_hex2int(const CharType c) {
- if ('0' <= c && c <= '9')
- return int(c - '0');
- else if ('a' <= c && c <= 'f')
- return int(c - 'a') + 10;
- else if ('A' <= c && c <= 'F')
- return int(c - 'A') + 10;
- return -1;
-}
-
-struct RegExSearch {
-
- Ref<RegExMatch> match;
- const CharType *str;
- int end;
- int eof;
-
- // For standard quantifier behaviour, test_parent is used to check the
- // rest of the pattern. If the pattern matches, to prevent the parent
- // from testing again, the complete flag is used as a shortcut out.
- bool complete;
-
- // With lookahead, the position needs to rewind to its starting position
- // when test_parent is used. Due to functional programming, this state
- // has to be kept as a parameter.
- Vector<int> lookahead_pos;
-
- CharType at(int p_pos) {
- return str[p_pos];
- }
-
- RegExSearch(Ref<RegExMatch> &p_match, int p_end, int p_lookahead)
- : match(p_match) {
-
- str = p_match->string.c_str();
- end = p_end;
- eof = p_match->string.length();
- complete = false;
- lookahead_pos.resize(p_lookahead);
- }
-};
-
-struct RegExNode {
-
- RegExNode *next;
- RegExNode *previous;
- RegExNode *parent;
- bool quantifiable;
- int length;
-
- RegExNode() {
-
- next = NULL;
- previous = NULL;
- parent = NULL;
- quantifiable = false;
- length = -1;
- }
-
- virtual ~RegExNode() {
-
- if (next)
- memdelete(next);
- }
+#include "core/os/memory.h"
- // For avoiding RTTI
- virtual bool is_look_behind() { return false; }
-
- virtual int test(RegExSearch &s, int pos) const {
-
- return next ? next->test(s, pos) : -1;
- }
-
- virtual int test_parent(RegExSearch &s, int pos) const {
-
- if (next)
- pos = next->test(s, pos);
-
- if (pos >= 0) {
- s.complete = true;
- if (parent)
- pos = parent->test_parent(s, pos);
- }
-
- if (pos < 0)
- s.complete = false;
-
- return pos;
- }
-
- void increment_length(int amount, bool subtract = false) {
-
- if (amount >= 0 && length >= 0) {
- if (!subtract)
- length += amount;
- else
- length -= amount;
- } else {
- length = -1;
- }
+extern "C" {
+#include <pcre2.h>
+}
- if (parent)
- parent->increment_length(amount, subtract);
- }
-};
+static void *_regex_malloc(PCRE2_SIZE size, void *user) {
-struct RegExNodeChar : public RegExNode {
+ return memalloc(size);
+}
- CharType ch;
+static void _regex_free(void *ptr, void *user) {
- RegExNodeChar(CharType p_char) {
+ memfree(ptr);
+}
- length = 1;
- quantifiable = true;
- ch = p_char;
- }
+int RegExMatch::_find(const Variant &p_name) const {
- virtual int test(RegExSearch &s, int pos) const {
+ if (p_name.is_num()) {
- if (s.end <= pos || 0 > pos || s.at(pos) != ch)
+ int i = (int)p_name;
+ if (i >= data.size())
return -1;
+ return i;
- return next ? next->test(s, pos + 1) : pos + 1;
- }
+ } else if (p_name.get_type() == Variant::STRING) {
- static CharType parse_escape(const CharType *&c) {
-
- int point = 0;
- switch (c[1]) {
- case 'x':
- for (int i = 2; i <= 3; ++i) {
- int res = RegEx_hex2int(c[i]);
- if (res == -1)
- return '\0';
- point = (point << 4) + res;
- }
- c = &c[3];
- return CharType(point);
- case 'u':
- for (int i = 2; i <= 5; ++i) {
- int res = RegEx_hex2int(c[i]);
- if (res == -1)
- return '\0';
- point = (point << 4) + res;
- }
- c = &c[5];
- return CharType(point);
- case '0': ++c; return '\0';
- case 'a': ++c; return '\a';
- case 'e': ++c; return '\e';
- case 'f': ++c; return '\f';
- case 'n': ++c; return '\n';
- case 'r': ++c; return '\r';
- case 't': ++c; return '\t';
- case 'v': ++c; return '\v';
- case 'b': ++c; return '\b';
- default: break;
- }
- return (++c)[0];
+ const Map<String, int>::Element *found = names.find((String)p_name);
+ if (found)
+ return found->value();
}
-};
-struct RegExNodeRange : public RegExNode {
+ return -1;
+}
- CharType start;
- CharType end;
+String RegExMatch::get_subject() const {
- RegExNodeRange(CharType p_start, CharType p_end) {
+ return subject;
+}
- length = 1;
- quantifiable = true;
- start = p_start;
- end = p_end;
- }
+int RegExMatch::get_group_count() const {
- virtual int test(RegExSearch &s, int pos) const {
+ if (data.size() == 0)
+ return 0;
+ return data.size() - 1;
+}
- if (s.end <= pos || 0 > pos)
- return -1;
+Dictionary RegExMatch::get_names() const {
- CharType c = s.at(pos);
- if (c < start || end < c)
- return -1;
+ Dictionary result;
- return next ? next->test(s, pos + 1) : pos + 1;
+ for (const Map<String, int>::Element *i = names.front(); i != NULL; i = i->next()) {
+ result[i->key()] = i->value();
}
-};
-
-struct RegExNodeShorthand : public RegExNode {
- CharType repr;
+ return result;
+}
- RegExNodeShorthand(CharType p_repr) {
+Array RegExMatch::get_strings() const {
- length = 1;
- quantifiable = true;
- repr = p_repr;
- }
+ Array result;
- virtual int test(RegExSearch &s, int pos) const {
+ int size = data.size();
- if (s.end <= pos || 0 > pos)
- return -1;
+ for (int i = 0; i < size; i++) {
- bool found = false;
- bool invert = false;
- CharType c = s.at(pos);
- switch (repr) {
- case '.':
- found = true;
- break;
- case 'W':
- invert = true;
- case 'w':
- found = (c == '_' || iswalnum(c) != 0);
- break;
- case 'D':
- invert = true;
- case 'd':
- found = ('0' <= c && c <= '9');
- break;
- case 'S':
- invert = true;
- case 's':
- found = (iswspace(c) != 0);
- break;
- default:
- break;
- }
+ int start = data[i].start;
- if (found == invert)
- return -1;
-
- return next ? next->test(s, pos + 1) : pos + 1;
- }
-};
-
-struct RegExNodeClass : public RegExNode {
-
- enum Type {
- Type_none,
- Type_alnum,
- Type_alpha,
- Type_ascii,
- Type_blank,
- Type_cntrl,
- Type_digit,
- Type_graph,
- Type_lower,
- Type_print,
- Type_punct,
- Type_space,
- Type_upper,
- Type_xdigit,
- Type_word
- };
-
- Type type;
-
- bool test_class(CharType c) const {
-
- static Vector<CharType> REGEX_NODE_SPACE = String(" \t\r\n\f");
- static Vector<CharType> REGEX_NODE_PUNCT = String("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~");
-
- switch (type) {
- case Type_alnum:
- if ('0' <= c && c <= '9') return true;
- if ('a' <= c && c <= 'z') return true;
- if ('A' <= c && c <= 'Z') return true;
- return false;
- case Type_alpha:
- if ('a' <= c && c <= 'z') return true;
- if ('A' <= c && c <= 'Z') return true;
- return false;
- case Type_ascii:
- return (0x00 <= c && c <= 0x7F);
- case Type_blank:
- return (c == ' ' || c == '\t');
- case Type_cntrl:
- return ((0x00 <= c && c <= 0x1F) || c == 0x7F);
- case Type_digit:
- return ('0' <= c && c <= '9');
- case Type_graph:
- return (0x20 < c && c < 0x7F);
- case Type_lower:
- return ('a' <= c && c <= 'z');
- case Type_print:
- return (0x20 < c && c < 0x7f);
- case Type_punct:
- return (REGEX_NODE_PUNCT.find(c) >= 0);
- case Type_space:
- return (REGEX_NODE_SPACE.find(c) >= 0);
- case Type_upper:
- return ('A' <= c && c <= 'Z');
- case Type_xdigit:
- if ('0' <= c && c <= '9') return true;
- if ('a' <= c && c <= 'f') return true;
- if ('A' <= c && c <= 'F') return true;
- return false;
- case Type_word:
- if ('0' <= c && c <= '9') return true;
- if ('a' <= c && c <= 'z') return true;
- if ('A' <= c && c <= 'Z') return true;
- return (c == '_');
- default:
- return false;
+ if (start == -1) {
+ result.append(String());
+ continue;
}
- return false;
- }
-
- RegExNodeClass(Type p_type) {
-
- length = 1;
- quantifiable = true;
- type = p_type;
- }
-
- virtual int test(RegExSearch &s, int pos) const {
-
- if (s.end <= pos || 0 > pos)
- return -1;
-
- if (!test_class(s.at(pos)))
- return -1;
-
- return next ? next->test(s, pos + 1) : pos + 1;
- }
-
-#define REGEX_CMP_CLASS(POS, NAME) \
- if (cmp_class(POS, #NAME)) return Type_##NAME
-
- static Type parse_type(const CharType *&p_pos) {
-
- REGEX_CMP_CLASS(p_pos, alnum);
- REGEX_CMP_CLASS(p_pos, alpha);
- REGEX_CMP_CLASS(p_pos, ascii);
- REGEX_CMP_CLASS(p_pos, blank);
- REGEX_CMP_CLASS(p_pos, cntrl);
- REGEX_CMP_CLASS(p_pos, digit);
- REGEX_CMP_CLASS(p_pos, graph);
- REGEX_CMP_CLASS(p_pos, lower);
- REGEX_CMP_CLASS(p_pos, print);
- REGEX_CMP_CLASS(p_pos, punct);
- REGEX_CMP_CLASS(p_pos, space);
- REGEX_CMP_CLASS(p_pos, upper);
- REGEX_CMP_CLASS(p_pos, xdigit);
- REGEX_CMP_CLASS(p_pos, word);
- return Type_none;
- }
-
- static bool cmp_class(const CharType *&p_pos, const char *p_text) {
-
- unsigned int i = 0;
- for (i = 0; p_text[i] != '\0'; ++i)
- if (p_pos[i] != p_text[i])
- return false;
-
- if (p_pos[i++] != ':' || p_pos[i] != ']')
- return false;
-
- p_pos = &p_pos[i];
- return true;
- }
-};
-
-struct RegExNodeAnchorStart : public RegExNode {
- RegExNodeAnchorStart() {
+ int length = data[i].end - start;
- length = 0;
+ result.append(subject.substr(start, length));
}
- virtual int test(RegExSearch &s, int pos) const {
+ return result;
+}
- if (pos != 0)
- return -1;
+String RegExMatch::get_string(const Variant &p_name) const {
- return next ? next->test(s, pos) : pos;
- }
-};
+ int id = _find(p_name);
-struct RegExNodeAnchorEnd : public RegExNode {
+ if (id < 0)
+ return String();
- RegExNodeAnchorEnd() {
+ int start = data[id].start;
- length = 0;
- }
+ if (start == -1)
+ return String();
- virtual int test(RegExSearch &s, int pos) const {
+ int length = data[id].end - start;
- if (pos != s.eof)
- return -1;
+ return subject.substr(start, length);
+}
- return next ? next->test(s, pos) : pos;
- }
-};
+int RegExMatch::get_start(const Variant &p_name) const {
-struct RegExNodeWordBoundary : public RegExNode {
+ int id = _find(p_name);
- bool inverse;
+ if (id < 0)
+ return -1;
- RegExNodeWordBoundary(bool p_inverse) {
+ return data[id].start;
+}
- length = 0;
- inverse = p_inverse;
- }
+int RegExMatch::get_end(const Variant &p_name) const {
- virtual int test(RegExSearch &s, int pos) const {
+ int id = _find(p_name);
- bool left = false;
- bool right = false;
+ if (id < 0)
+ return -1;
- if (pos != 0) {
- CharType c = s.at(pos - 1);
- if (c == '_' || iswalnum(c))
- left = true;
- }
+ return data[id].end;
+}
- if (pos != s.eof) {
- CharType c = s.at(pos);
- if (c == '_' || iswalnum(c))
- right = true;
- }
+void RegExMatch::_bind_methods() {
- if ((left == right) != inverse)
- return -1;
+ ClassDB::bind_method(D_METHOD("get_subject"), &RegExMatch::get_subject);
+ ClassDB::bind_method(D_METHOD("get_group_count"), &RegExMatch::get_group_count);
+ ClassDB::bind_method(D_METHOD("get_names"), &RegExMatch::get_names);
+ ClassDB::bind_method(D_METHOD("get_strings"), &RegExMatch::get_strings);
+ ClassDB::bind_method(D_METHOD("get_string", "name"), &RegExMatch::get_string, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_start", "name"), &RegExMatch::get_start, DEFVAL(0));
+ ClassDB::bind_method(D_METHOD("get_end", "name"), &RegExMatch::get_end, DEFVAL(0));
+}
- return next ? next->test(s, pos) : pos;
- }
-};
+void RegEx::_pattern_info(uint32_t what, void *where) const {
-struct RegExNodeQuantifier : public RegExNode {
+ if (sizeof(CharType) == 2) {
- int min;
- int max;
- bool greedy;
- RegExNode *child;
+ pcre2_pattern_info_16((pcre2_code_16 *)code, what, where);
- RegExNodeQuantifier(int p_min, int p_max) {
+ } else {
- min = p_min;
- max = p_max;
- greedy = true;
- child = NULL;
+ pcre2_pattern_info_32((pcre2_code_32 *)code, what, where);
}
+}
- ~RegExNodeQuantifier() {
-
- if (child)
- memdelete(child);
- }
+void RegEx::clear() {
- virtual int test(RegExSearch &s, int pos) const {
+ if (sizeof(CharType) == 2) {
- return test_step(s, pos, 0, pos);
- }
+ if (code)
+ pcre2_code_free_16((pcre2_code_16 *)code);
- virtual int test_parent(RegExSearch &s, int pos) const {
+ } else {
- s.complete = false;
- return pos;
+ if (code)
+ pcre2_code_free_32((pcre2_code_32 *)code);
}
+}
- int test_step(RegExSearch &s, int pos, int level, int start) const {
-
- if (pos > s.end)
- return -1;
-
- if (!greedy && level > min) {
- int res = next ? next->test(s, pos) : pos;
- if (s.complete)
- return res;
-
- if (res >= 0 && parent->test_parent(s, res) >= 0)
- return res;
- }
-
- if (max >= 0 && level > max)
- return -1;
+Error RegEx::compile(const String &p_pattern) {
- int res = pos;
- if (level >= 1) {
- if (level > min + 1 && pos == start)
- return -1;
+ pattern = p_pattern;
+ clear();
- res = child->test(s, pos);
- if (s.complete)
- return res;
- }
+ int err;
+ PCRE2_SIZE offset;
+ uint32_t flags = PCRE2_DUPNAMES;
- if (res >= 0) {
+ if (sizeof(CharType) == 2) {
- int res_step = test_step(s, res, level + 1, start);
- if (res_step >= 0)
- return res_step;
+ pcre2_general_context_16 *gctx = (pcre2_general_context_16 *)general_ctx;
+ pcre2_compile_context_16 *cctx = pcre2_compile_context_create_16(gctx);
+ PCRE2_SPTR16 p = (PCRE2_SPTR16)pattern.c_str();
- if (greedy && level >= min) {
- if (next)
- res = next->test(s, res);
- if (s.complete)
- return res;
+ code = pcre2_compile_16(p, pattern.length(), flags, &err, &offset, cctx);
- if (res >= 0 && parent->test_parent(s, res) >= 0)
- return res;
- }
+ if (!code) {
+ PCRE2_UCHAR16 buf[256];
+ pcre2_get_error_message_16(err, buf, 256);
+ String message = String::num(offset) + ": " + String((const CharType *)buf);
+ ERR_PRINT(message.utf8());
+ return FAILED;
}
- return -1;
- }
-};
-
-struct RegExNodeBackReference : public RegExNode {
- int id;
+ } else {
- RegExNodeBackReference(int p_id) {
-
- length = -1;
- quantifiable = true;
- id = p_id;
- }
+ pcre2_general_context_32 *gctx = (pcre2_general_context_32 *)general_ctx;
+ pcre2_compile_context_32 *cctx = pcre2_compile_context_create_32(gctx);
+ PCRE2_SPTR32 p = (PCRE2_SPTR32)pattern.c_str();
- virtual int test(RegExSearch &s, int pos) const {
+ code = pcre2_compile_32(p, pattern.length(), flags, &err, &offset, cctx);
- RegExMatch::Group &ref = s.match->captures[id];
- for (int i = 0; i < ref.length; ++i) {
-
- if (pos + i >= s.end)
- return -1;
-
- if (s.at(ref.start + i) != s.at(pos + i))
- return -1;
+ if (!code) {
+ PCRE2_UCHAR32 buf[256];
+ pcre2_get_error_message_32(err, buf, 256);
+ String message = String::num(offset) + ": " + String((const CharType *)buf);
+ ERR_PRINT(message.utf8());
+ return FAILED;
}
- return next ? next->test(s, pos + ref.length) : pos + ref.length;
}
-};
-
-struct RegExNodeGroup : public RegExNode {
-
- bool inverse;
- bool reset_pos;
- Vector<RegExNode *> childset;
- RegExNode *back;
-
- RegExNodeGroup() {
-
- length = 0;
- quantifiable = true;
- inverse = false;
- reset_pos = false;
- back = NULL;
- }
-
- virtual ~RegExNodeGroup() {
-
- for (int i = 0; i < childset.size(); ++i)
- memdelete(childset[i]);
- }
-
- virtual void test_success(RegExSearch &s, int pos) const {
+ return OK;
+}
- return;
- }
+Ref<RegExMatch> RegEx::search(const String &p_subject, int p_offset, int p_end) const {
- virtual int test(RegExSearch &s, int pos) const {
+ ERR_FAIL_COND_V(!is_valid(), NULL);
- for (int i = 0; i < childset.size(); ++i) {
+ Ref<RegExMatch> result = memnew(RegExMatch);
- s.complete = false;
+ int length = p_subject.length();
+ if (p_end >= 0 && p_end < length)
+ length = p_end;
- int res = childset[i]->test(s, pos);
+ if (sizeof(CharType) == 2) {
- if (inverse) {
- s.complete = false;
- if (res < 0)
- res = pos + 1;
- else
- return -1;
+ pcre2_code_16 *c = (pcre2_code_16 *)code;
+ pcre2_general_context_16 *gctx = (pcre2_general_context_16 *)general_ctx;
+ pcre2_match_context_16 *mctx = pcre2_match_context_create_16(gctx);
+ PCRE2_SPTR16 s = (PCRE2_SPTR16)p_subject.c_str();
- if (i + 1 < childset.size())
- continue;
- }
+ pcre2_match_data_16 *match = pcre2_match_data_create_from_pattern_16(c, gctx);
- if (s.complete)
- return res;
+ int res = pcre2_match_16(c, s, length, p_offset, 0, match, mctx);
- if (res >= 0) {
- if (reset_pos)
- res = pos;
- this->test_success(s, res);
- return next ? next->test(s, res) : res;
- }
+ if (res < 0) {
+ pcre2_match_data_free_16(match);
+ return NULL;
}
- return -1;
- }
-
- void add_child(RegExNode *node) {
- node->parent = this;
- node->previous = back;
+ uint32_t size = pcre2_get_ovector_count_16(match);
+ PCRE2_SIZE *ovector = pcre2_get_ovector_pointer_16(match);
- if (back)
- back->next = node;
- else
- childset.push_back(node);
+ result->data.resize(size);
- increment_length(node->length);
+ for (uint32_t i = 0; i < size; i++) {
- back = node;
- }
-
- void add_childset() {
-
- if (childset.size() > 0)
- length = -1;
- back = NULL;
- }
-
- RegExNode *swap_back(RegExNode *node) {
-
- RegExNode *old = back;
-
- if (old) {
- if (!old->previous)
- childset.remove(childset.size() - 1);
- back = old->previous;
- increment_length(old->length, true);
+ result->data[i].start = ovector[i * 2];
+ result->data[i].end = ovector[i * 2 + 1];
}
- add_child(node);
+ pcre2_match_data_free_16(match);
+ pcre2_match_context_free_16(mctx);
- return old;
- }
-};
+ } else {
-struct RegExNodeCapturing : public RegExNodeGroup {
+ pcre2_code_32 *c = (pcre2_code_32 *)code;
+ pcre2_general_context_32 *gctx = (pcre2_general_context_32 *)general_ctx;
+ pcre2_match_context_32 *mctx = pcre2_match_context_create_32(gctx);
+ PCRE2_SPTR32 s = (PCRE2_SPTR32)p_subject.c_str();
- int id;
+ pcre2_match_data_32 *match = pcre2_match_data_create_from_pattern_32(c, gctx);
- RegExNodeCapturing(int p_id = 0) {
+ int res = pcre2_match_32(c, s, length, p_offset, 0, match, mctx);
- id = p_id;
- }
-
- virtual void test_success(RegExSearch &s, int pos) const {
-
- RegExMatch::Group &ref = s.match->captures[id];
- ref.length = pos - ref.start;
- }
-
- virtual int test(RegExSearch &s, int pos) const {
-
- RegExMatch::Group &ref = s.match->captures[id];
- int old_start = ref.start;
- ref.start = pos;
-
- int res = RegExNodeGroup::test(s, pos);
-
- if (res < 0)
- ref.start = old_start;
- return res;
- }
-
- virtual int test_parent(RegExSearch &s, int pos) const {
-
- RegExMatch::Group &ref = s.match->captures[id];
- ref.length = pos - ref.start;
- return RegExNode::test_parent(s, pos);
- }
-
- static Variant parse_name(const CharType *&c, bool p_allow_numeric) {
-
- if (c[1] == '0') {
- return -1;
- } else if ('1' <= c[1] && c[1] <= '9') {
- if (!p_allow_numeric)
- return -1;
- int res = (++c)[0] - '0';
- while ('0' <= c[1] && c[1] <= '9')
- res = res * 10 + int((++c)[0] - '0');
- if ((++c)[0] != '>')
- return -1;
- return res;
- } else if (iswalnum(c[1])) {
- String res(++c, 1);
- while (iswalnum(c[1]))
- res += String(++c, 1);
- if ((++c)[0] != '>')
- return -1;
- return res;
+ if (res < 0) {
+ pcre2_match_data_free_32(match);
+ return NULL;
}
- return -1;
- }
-};
-
-struct RegExNodeLookAhead : public RegExNodeGroup {
-
- int id;
- RegExNodeLookAhead(bool p_inverse, int p_id = 0) {
+ uint32_t size = pcre2_get_ovector_count_32(match);
+ PCRE2_SIZE *ovector = pcre2_get_ovector_pointer_32(match);
- quantifiable = false;
- inverse = p_inverse;
- reset_pos = true;
- id = p_id;
- }
-
- virtual int test(RegExSearch &s, int pos) const {
+ result->data.resize(size);
- s.lookahead_pos[id] = pos;
- return RegExNodeGroup::test(s, pos);
- }
+ for (uint32_t i = 0; i < size; i++) {
- virtual int test_parent(RegExSearch &s, int pos) const {
+ result->data[i].start = ovector[i * 2];
+ result->data[i].end = ovector[i * 2 + 1];
+ }
- return RegExNode::test_parent(s, s.lookahead_pos[id]);
+ pcre2_match_data_free_32(match);
+ pcre2_match_context_free_32(mctx);
}
-};
-struct RegExNodeLookBehind : public RegExNodeGroup {
+ result->subject = p_subject;
- RegExNodeLookBehind(bool p_inverse, int p_id = 0) {
+ uint32_t count;
+ const CharType *table;
+ uint32_t entry_size;
- quantifiable = false;
- inverse = p_inverse;
- reset_pos = true;
- }
+ _pattern_info(PCRE2_INFO_NAMECOUNT, &count);
+ _pattern_info(PCRE2_INFO_NAMETABLE, &table);
+ _pattern_info(PCRE2_INFO_NAMEENTRYSIZE, &entry_size);
- virtual bool is_look_behind() { return true; }
+ for (uint32_t i = 0; i < count; i++) {
- virtual int test(RegExSearch &s, int pos) const {
+ CharType id = table[i * entry_size];
+ if (result->data[id].start == -1)
+ continue;
+ String name = &table[i * entry_size + 1];
+ if (result->names.has(name))
+ continue;
- if (pos < length)
- return -1;
- return RegExNodeGroup::test(s, pos - length);
+ result->names.insert(name, id);
}
-};
-struct RegExNodeBracket : public RegExNode {
+ return result;
+}
- bool inverse;
- Vector<RegExNode *> children;
+String RegEx::sub(const String &p_subject, const String &p_replacement, bool p_all, int p_offset, int p_end) const {
- RegExNodeBracket() {
+ ERR_FAIL_COND_V(!is_valid(), String());
- length = 1;
- quantifiable = true;
- inverse = false;
- }
+ String output;
+ output.resize(p_subject.length());
- virtual ~RegExNodeBracket() {
+ uint32_t flags = PCRE2_SUBSTITUTE_OVERFLOW_LENGTH;
+ if (p_all)
+ flags |= PCRE2_SUBSTITUTE_GLOBAL;
- for (int i = 0; i < children.size(); ++i)
- memdelete(children[i]);
- }
+ PCRE2_SIZE olength = output.length();
- virtual int test(RegExSearch &s, int pos) const {
+ PCRE2_SIZE length = p_subject.length();
+ if (p_end >= 0 && (uint32_t)p_end < length)
+ length = p_end;
- for (int i = 0; i < children.size(); ++i) {
+ if (sizeof(CharType) == 2) {
- int res = children[i]->test(s, pos);
+ pcre2_code_16 *c = (pcre2_code_16 *)code;
+ pcre2_general_context_16 *gctx = (pcre2_general_context_16 *)general_ctx;
+ pcre2_match_context_16 *mctx = pcre2_match_context_create_16(gctx);
+ PCRE2_SPTR16 s = (PCRE2_SPTR16)p_subject.c_str();
+ PCRE2_SPTR16 r = (PCRE2_SPTR16)p_replacement.c_str();
+ PCRE2_UCHAR16 *o = (PCRE2_UCHAR16 *)output.c_str();
- if (inverse) {
- if (res < 0)
- res = pos + 1;
- else
- return -1;
+ pcre2_match_data_16 *match = pcre2_match_data_create_from_pattern_16(c, gctx);
- if (i + 1 < children.size())
- continue;
- }
+ int res = pcre2_substitute_16(c, s, length, p_offset, flags, match, mctx, r, p_replacement.length(), o, &olength);
- if (res >= 0)
- return next ? next->test(s, res) : res;
+ if (res == PCRE2_ERROR_NOMEMORY) {
+ output.resize(olength);
+ o = (PCRE2_UCHAR16 *)output.c_str();
+ res = pcre2_substitute_16(c, s, length, p_offset, flags, match, mctx, r, p_replacement.length(), o, &olength);
}
- return -1;
- }
- void add_child(RegExNode *node) {
-
- node->parent = this;
- children.push_back(node);
- }
+ pcre2_match_data_free_16(match);
+ pcre2_match_context_free_16(mctx);
- void pop_back() {
-
- memdelete(children[children.size() - 1]);
- children.remove(children.size() - 1);
- }
-};
-
-#define REGEX_EXPAND_FAIL(MSG) \
- { \
- ERR_PRINT(MSG); \
- return String(); \
- }
-
-String RegExMatch::expand(const String &p_template) const {
-
- String res;
- for (const CharType *c = p_template.c_str(); *c != '\0'; ++c) {
- if (c[0] == '\\') {
- if (('1' <= c[1] && c[1] <= '9') || (c[1] == 'g' && c[2] == '{')) {
-
- int ref = 0;
- bool unclosed = false;
-
- if (c[1] == 'g') {
- unclosed = true;
- c = &c[2];
- }
-
- while ('0' <= c[1] && c[1] <= '9') {
- ref = ref * 10 + int(c[1] - '0');
- ++c;
- }
-
- if (unclosed) {
- if (c[1] != '}')
- REGEX_EXPAND_FAIL("unclosed backreference '{'");
- ++c;
- }
-
- res += get_string(ref);
-
- } else if (c[1] == 'g' && c[2] == '<') {
-
- const CharType *d = &c[2];
+ if (res < 0)
+ return String();
- Variant name = RegExNodeCapturing::parse_name(d, true);
- if (name == Variant(-1))
- REGEX_EXPAND_FAIL("unrecognised character for group name");
+ } else {
- c = d;
+ pcre2_code_32 *c = (pcre2_code_32 *)code;
+ pcre2_general_context_32 *gctx = (pcre2_general_context_32 *)general_ctx;
+ pcre2_match_context_32 *mctx = pcre2_match_context_create_32(gctx);
+ PCRE2_SPTR32 s = (PCRE2_SPTR32)p_subject.c_str();
+ PCRE2_SPTR32 r = (PCRE2_SPTR32)p_replacement.c_str();
+ PCRE2_UCHAR32 *o = (PCRE2_UCHAR32 *)output.c_str();
- res += get_string(name);
+ pcre2_match_data_32 *match = pcre2_match_data_create_from_pattern_32(c, gctx);
- } else {
+ int res = pcre2_substitute_32(c, s, length, p_offset, flags, match, mctx, r, p_replacement.length(), o, &olength);
- const CharType *d = c;
- CharType ch = RegExNodeChar::parse_escape(d);
- if (c == d)
- REGEX_EXPAND_FAIL("invalid escape token");
- res += String(&ch, 1);
- c = d;
- }
- } else {
- res += String(c, 1);
+ if (res == PCRE2_ERROR_NOMEMORY) {
+ output.resize(olength);
+ o = (PCRE2_UCHAR32 *)output.c_str();
+ res = pcre2_substitute_32(c, s, length, p_offset, flags, match, mctx, r, p_replacement.length(), o, &olength);
}
- }
- return res;
-}
-int RegExMatch::get_group_count() const {
+ pcre2_match_data_free_32(match);
+ pcre2_match_context_free_32(mctx);
- int count = 0;
- for (int i = 1; i < captures.size(); ++i)
- if (captures[i].name.get_type() == Variant::INT)
- ++count;
- return count;
-}
-
-Array RegExMatch::get_group_array() const {
-
- Array res;
- for (int i = 1; i < captures.size(); ++i) {
- const RegExMatch::Group &capture = captures[i];
- if (capture.name.get_type() != Variant::INT)
- continue;
-
- if (capture.start >= 0)
- res.push_back(string.substr(capture.start, capture.length));
- else
- res.push_back(String());
- }
- return res;
-}
-
-Array RegExMatch::get_names() const {
-
- Array res;
- for (int i = 1; i < captures.size(); ++i)
- if (captures[i].name.get_type() == Variant::STRING)
- res.push_back(captures[i].name);
- return res;
-}
-
-Dictionary RegExMatch::get_name_dict() const {
-
- Dictionary res;
- for (int i = 1; i < captures.size(); ++i) {
- const RegExMatch::Group &capture = captures[i];
- if (capture.name.get_type() != Variant::STRING)
- continue;
-
- if (capture.start >= 0)
- res[capture.name] = string.substr(capture.start, capture.length);
- else
- res[capture.name] = String();
- }
- return res;
-}
-
-String RegExMatch::get_string(const Variant &p_name) const {
-
- for (int i = 0; i < captures.size(); ++i) {
-
- const RegExMatch::Group &capture = captures[i];
-
- if (capture.name != p_name)
- continue;
-
- if (capture.start == -1)
+ if (res < 0)
return String();
-
- return string.substr(capture.start, capture.length);
}
- return String();
-}
-
-int RegExMatch::get_start(const Variant &p_name) const {
- for (int i = 0; i < captures.size(); ++i)
- if (captures[i].name == p_name)
- return captures[i].start;
- return -1;
+ return output;
}
-int RegExMatch::get_end(const Variant &p_name) const {
+bool RegEx::is_valid() const {
- for (int i = 0; i < captures.size(); ++i)
- if (captures[i].name == p_name)
- return captures[i].start + captures[i].length;
- return -1;
+ return (code != NULL);
}
-RegExMatch::RegExMatch() {
-}
+String RegEx::get_pattern() const {
-static bool RegEx_is_shorthand(CharType ch) {
-
- switch (ch) {
- case 'w':
- case 'W':
- case 'd':
- case 'D':
- case 's':
- case 'S':
- return true;
- default:
- break;
- }
- return false;
+ return pattern;
}
-#define REGEX_COMPILE_FAIL(MSG) \
- { \
- ERR_PRINT(MSG); \
- clear(); \
- return FAILED; \
- }
+int RegEx::get_group_count() const {
-Error RegEx::compile(const String &p_pattern) {
+ ERR_FAIL_COND_V(!is_valid(), 0);
- ERR_FAIL_COND_V(p_pattern.length() == 0, FAILED);
+ uint32_t count;
- if (pattern == p_pattern && root)
- return OK;
+ _pattern_info(PCRE2_INFO_CAPTURECOUNT, &count);
- clear();
- pattern = p_pattern;
- group_names.push_back(0);
- RegExNodeGroup *root_group = memnew(RegExNodeCapturing(0));
- root = root_group;
- Vector<RegExNodeGroup *> stack;
- stack.push_back(root_group);
- int lookahead_level = 0;
- int numeric_groups = 0;
- const int numeric_max = 9;
-
- for (const CharType *c = p_pattern.c_str(); *c != '\0'; ++c) {
-
- switch (c[0]) {
- case '(':
- if (c[1] == '?') {
-
- RegExNodeGroup *group = NULL;
- switch (c[2]) {
- case ':':
- c = &c[2];
- group = memnew(RegExNodeGroup());
- break;
- case '!':
- case '=':
- group = memnew(RegExNodeLookAhead((c[2] == '!'), lookahead_level++));
- if (lookahead_depth < lookahead_level)
- lookahead_depth = lookahead_level;
- c = &c[2];
- break;
- case '<':
- if (c[3] == '!' || c[3] == '=') {
- group = memnew(RegExNodeLookBehind((c[3] == '!'), lookahead_level++));
- c = &c[3];
- }
- break;
- case 'P':
- if (c[3] == '<') {
- const CharType *d = &c[3];
- Variant name = RegExNodeCapturing::parse_name(d, false);
- if (name == Variant(-1))
- REGEX_COMPILE_FAIL("unrecognised character for group name");
- group = memnew(RegExNodeCapturing(group_names.size()));
- group_names.push_back(name);
- c = d;
- }
- default:
- break;
- }
- if (!group)
- REGEX_COMPILE_FAIL("unrecognised qualifier for group");
- stack[0]->add_child(group);
- stack.insert(0, group);
-
- } else if (numeric_groups < numeric_max) {
-
- RegExNodeCapturing *group = memnew(RegExNodeCapturing(group_names.size()));
- group_names.push_back(++numeric_groups);
- stack[0]->add_child(group);
- stack.insert(0, group);
-
- } else {
-
- RegExNodeGroup *group = memnew(RegExNodeGroup());
- stack[0]->add_child(group);
- stack.insert(0, group);
- }
- break;
- case ')':
- if (stack.size() == 1)
- REGEX_COMPILE_FAIL("unexpected ')'");
- stack.remove(0);
- break;
- case '\\':
- if (('1' <= c[1] && c[1] <= '9') || (c[1] == 'g' && c[2] == '{')) {
-
- int ref = 0;
- bool unclosed = false;
-
- if (c[1] == 'g') {
- unclosed = true;
- c = &c[2];
- }
-
- while ('0' <= c[1] && c[1] <= '9') {
- ref = ref * 10 + int(c[1] - '0');
- ++c;
- }
-
- if (unclosed) {
- if (c[1] != '}')
- REGEX_COMPILE_FAIL("unclosed backreference '{'");
- ++c;
- }
-
- if (ref > numeric_groups || ref <= 0)
- REGEX_COMPILE_FAIL("backreference not found");
-
- for (int i = 0; i < stack.size(); ++i)
- if (stack[i]->is_look_behind())
- REGEX_COMPILE_FAIL("backreferences inside lookbehind not supported");
-
- for (int i = 0; i < group_names.size(); ++i) {
- if (group_names[i].get_type() == Variant::INT && int(group_names[i]) == ref) {
- ref = group_names[i];
- break;
- }
- }
-
- stack[0]->add_child(memnew(RegExNodeBackReference(ref)));
- }
- if (c[1] == 'g' && c[2] == '<') {
-
- const CharType *d = &c[2];
-
- Variant name = RegExNodeCapturing::parse_name(d, true);
- if (name == Variant(-1))
- REGEX_COMPILE_FAIL("unrecognised character for group name");
-
- c = d;
-
- for (int i = 0; i < stack.size(); ++i)
- if (stack[i]->is_look_behind())
- REGEX_COMPILE_FAIL("backreferences inside lookbehind not supported");
-
- int ref = -1;
-
- for (int i = 0; i < group_names.size(); ++i) {
- if (group_names[i].get_type() == Variant::INT && int(group_names[i]) == ref) {
- ref = group_names[i];
- break;
- }
- }
-
- if (ref == -1)
- REGEX_COMPILE_FAIL("backreference not found");
-
- stack[0]->add_child(memnew(RegExNodeBackReference(ref)));
-
- } else if (c[1] == 'b' || c[1] == 'B') {
-
- stack[0]->add_child(memnew(RegExNodeWordBoundary(*(++c) == 'B')));
-
- } else if (RegEx_is_shorthand(c[1])) {
-
- stack[0]->add_child(memnew(RegExNodeShorthand(*(++c))));
-
- } else {
-
- const CharType *d = c;
- CharType ch = RegExNodeChar::parse_escape(d);
- if (c == d)
- REGEX_COMPILE_FAIL("invalid escape token");
- stack[0]->add_child(memnew(RegExNodeChar(ch)));
- c = d;
- }
- break;
- case '[': {
- RegExNodeBracket *bracket = memnew(RegExNodeBracket());
- stack[0]->add_child(bracket);
- if (c[1] == '^') {
- bracket->inverse = true;
- ++c;
- }
- bool first_child = true;
- CharType previous_child;
- bool previous_child_single = false;
- while (true) {
- ++c;
- if (!first_child && c[0] == ']') {
-
- break;
-
- } else if (c[0] == '\0') {
-
- REGEX_COMPILE_FAIL("unclosed bracket expression '['");
-
- } else if (c[0] == '\\') {
-
- if (RegEx_is_shorthand(c[1])) {
- bracket->add_child(memnew(RegExNodeShorthand(*(++c))));
- } else {
- const CharType *d = c;
- CharType ch = RegExNodeChar::parse_escape(d);
- if (c == d)
- REGEX_COMPILE_FAIL("invalid escape token");
- bracket->add_child(memnew(RegExNodeChar(ch)));
- c = d;
- previous_child = ch;
- previous_child_single = true;
- }
-
- } else if (c[0] == ']' && c[1] == ':') {
-
- const CharType *d = &c[2];
- RegExNodeClass::Type type = RegExNodeClass::parse_type(d);
- if (type != RegExNodeClass::Type_none) {
-
- c = d;
- previous_child_single = false;
-
- } else {
-
- bracket->add_child(memnew(RegExNodeChar('[')));
- previous_child = '[';
- previous_child_single = true;
- }
- } else if (previous_child_single && c[0] == '-') {
-
- if (c[1] != '\0' && c[1] != ']') {
-
- CharType next;
-
- if (c[1] == '\\') {
- const CharType *d = ++c;
- next = RegExNodeChar::parse_escape(d);
- if (c == d)
- REGEX_COMPILE_FAIL("invalid escape token");
- } else {
- next = *(++c);
- }
-
- if (next < previous_child)
- REGEX_COMPILE_FAIL("text range out of order");
-
- bracket->pop_back();
- bracket->add_child(memnew(RegExNodeRange(previous_child, next)));
- previous_child_single = false;
- } else {
-
- bracket->add_child(memnew(RegExNodeChar('-')));
- previous_child = '-';
- previous_child_single = true;
- }
- } else {
-
- bracket->add_child(memnew(RegExNodeChar(c[0])));
- previous_child = c[0];
- previous_child_single = true;
- }
- first_child = false;
- }
- } break;
- case '|':
- for (int i = 0; i < stack.size(); ++i)
- if (stack[i]->is_look_behind())
- REGEX_COMPILE_FAIL("alternations inside lookbehind not supported");
- stack[0]->add_childset();
- break;
- case '^':
- stack[0]->add_child(memnew(RegExNodeAnchorStart()));
- break;
- case '$':
- stack[0]->add_child(memnew(RegExNodeAnchorEnd()));
- break;
- case '.':
- stack[0]->add_child(memnew(RegExNodeShorthand('.')));
- break;
- case '?':
- case '*':
- case '+':
- case '{': {
- int min_val = 0;
- int max_val = -1;
- bool valid = true;
- const CharType *d = c;
- bool max_set = true;
- switch (c[0]) {
- case '?':
- min_val = 0;
- max_val = 1;
- break;
- case '*':
- min_val = 0;
- max_val = -1;
- break;
- case '+':
- min_val = 1;
- max_val = -1;
- break;
- case '{':
- max_set = false;
- while (valid) {
- ++d;
- if (d[0] == '}') {
- break;
- } else if (d[0] == ',') {
- max_set = true;
- } else if ('0' <= d[0] && d[0] <= '9') {
- if (max_set) {
- if (max_val < 0)
- max_val = int(d[0] - '0');
- else
- max_val = max_val * 10 + int(d[0] - '0');
- } else {
- min_val = min_val * 10 + int(d[0] - '0');
- }
- } else {
- valid = false;
- }
- }
- break;
- default:
- break;
- }
-
- if (!max_set)
- max_val = min_val;
-
- if (valid) {
-
- c = d;
-
- if (stack[0]->back == NULL || !stack[0]->back->quantifiable)
- REGEX_COMPILE_FAIL("element not quantifiable");
-
- if (min_val != max_val)
- for (int i = 0; i < stack.size(); ++i)
- if (stack[i]->is_look_behind())
- REGEX_COMPILE_FAIL("variable length quantifiers inside lookbehind not supported");
-
- RegExNodeQuantifier *quant = memnew(RegExNodeQuantifier(min_val, max_val));
- quant->child = stack[0]->swap_back(quant);
- quant->child->previous = NULL;
- quant->child->parent = quant;
-
- if (min_val == max_val && quant->child->length >= 0)
- quant->length = max_val * quant->child->length;
-
- if (c[1] == '?') {
- quant->greedy = false;
- ++c;
- }
- break;
- }
- }
- default:
- stack[0]->add_child(memnew(RegExNodeChar(c[0])));
- break;
- }
- }
- if (stack.size() > 1)
- REGEX_COMPILE_FAIL("unclosed group '('");
- return OK;
+ return count;
}
-Ref<RegExMatch> RegEx::search(const String &p_text, int p_start, int p_end) const {
-
- ERR_FAIL_COND_V(!is_valid(), NULL);
- ERR_FAIL_COND_V(p_start < 0, NULL);
- ERR_FAIL_COND_V(p_start >= p_text.length(), NULL);
- ERR_FAIL_COND_V(p_end > p_text.length(), NULL);
- ERR_FAIL_COND_V(p_end != -1 && p_end < p_start, NULL);
+Array RegEx::get_names() const {
- Ref<RegExMatch> res = memnew(RegExMatch());
+ Array result;
- for (int i = 0; i < group_names.size(); ++i) {
- RegExMatch::Group group;
- group.name = group_names[i];
- res->captures.push_back(group);
- }
+ ERR_FAIL_COND_V(!is_valid(), result);
- res->string = p_text;
+ uint32_t count;
+ const CharType *table;
+ uint32_t entry_size;
- if (p_end == -1)
- p_end = p_text.length();
+ _pattern_info(PCRE2_INFO_NAMECOUNT, &count);
+ _pattern_info(PCRE2_INFO_NAMETABLE, &table);
+ _pattern_info(PCRE2_INFO_NAMEENTRYSIZE, &entry_size);
- RegExSearch s(res, p_end, lookahead_depth);
+ for (uint32_t i = 0; i < count; i++) {
- for (int i = p_start; i <= s.end; ++i) {
- for (int c = 0; c < group_names.size(); ++c) {
- res->captures[c].start = -1;
- res->captures[c].length = 0;
+ String name = &table[i * entry_size + 1];
+ if (result.find(name) < 0) {
+ result.append(name);
}
- if (root->test(s, i) >= 0)
- break;
}
- if (res->captures[0].start >= 0)
- return res;
- return NULL;
+ return result;
}
-String RegEx::sub(const String &p_text, const String &p_replacement, bool p_all, int p_start, int p_end) const {
-
- ERR_FAIL_COND_V(!is_valid(), p_text);
- ERR_FAIL_COND_V(p_start < 0, p_text);
- ERR_FAIL_COND_V(p_start >= p_text.length(), p_text);
- ERR_FAIL_COND_V(p_end > p_text.length(), p_text);
- ERR_FAIL_COND_V(p_end != -1 && p_end < p_start, p_text);
-
- String text = p_text;
- int start = p_start;
-
- if (p_end == -1)
- p_end = p_text.length();
-
- while (start < text.length() && (p_all || start == p_start)) {
-
- Ref<RegExMatch> m = search(text, start, p_end);
-
- RegExMatch::Group &s = m->captures[0];
-
- if (s.start < 0)
- break;
-
- String res = text.substr(0, s.start) + m->expand(p_replacement);
-
- start = res.length();
+RegEx::RegEx() {
- if (s.length == 0)
- ++start;
+ if (sizeof(CharType) == 2) {
- int sub_end = s.start + s.length;
- if (sub_end < text.length())
- res += text.substr(sub_end, text.length() - sub_end);
+ general_ctx = pcre2_general_context_create_16(&_regex_malloc, &_regex_free, NULL);
- p_end += res.length() - text.length();
+ } else {
- text = res;
+ general_ctx = pcre2_general_context_create_32(&_regex_malloc, &_regex_free, NULL);
}
- return text;
+ code = NULL;
}
-void RegEx::clear() {
-
- if (root)
- memdelete(root);
-
- root = NULL;
- group_names.clear();
- lookahead_depth = 0;
-}
-
-bool RegEx::is_valid() const {
-
- return (root != NULL);
-}
-
-String RegEx::get_pattern() const {
-
- return pattern;
-}
-
-int RegEx::get_group_count() const {
-
- int count = 0;
- for (int i = 1; i < group_names.size(); ++i)
- if (group_names[i].get_type() == Variant::INT)
- ++count;
- return count;
-}
-
-Array RegEx::get_names() const {
+RegEx::RegEx(const String &p_pattern) {
- Array res;
- for (int i = 1; i < group_names.size(); ++i)
- if (group_names[i].get_type() == Variant::STRING)
- res.push_back(group_names[i]);
- return res;
-}
+ if (sizeof(CharType) == 2) {
-RegEx::RegEx() {
+ general_ctx = pcre2_general_context_create_16(&_regex_malloc, &_regex_free, NULL);
- root = NULL;
- lookahead_depth = 0;
-}
+ } else {
-RegEx::RegEx(const String &p_pattern) {
-
- root = NULL;
+ general_ctx = pcre2_general_context_create_32(&_regex_malloc, &_regex_free, NULL);
+ }
+ code = NULL;
compile(p_pattern);
}
RegEx::~RegEx() {
- if (root)
- memdelete(root);
-}
+ if (sizeof(CharType) == 2) {
-void RegExMatch::_bind_methods() {
+ if (code)
+ pcre2_code_free_16((pcre2_code_16 *)code);
+ pcre2_general_context_free_16((pcre2_general_context_16 *)general_ctx);
- ClassDB::bind_method(D_METHOD("expand", "template"), &RegExMatch::expand);
- ClassDB::bind_method(D_METHOD("get_group_count"), &RegExMatch::get_group_count);
- ClassDB::bind_method(D_METHOD("get_group_array"), &RegExMatch::get_group_array);
- ClassDB::bind_method(D_METHOD("get_names"), &RegExMatch::get_names);
- ClassDB::bind_method(D_METHOD("get_name_dict"), &RegExMatch::get_name_dict);
- ClassDB::bind_method(D_METHOD("get_string", "name"), &RegExMatch::get_string, DEFVAL(0));
- ClassDB::bind_method(D_METHOD("get_start", "name"), &RegExMatch::get_start, DEFVAL(0));
- ClassDB::bind_method(D_METHOD("get_end", "name"), &RegExMatch::get_end, DEFVAL(0));
+ } else {
+
+ if (code)
+ pcre2_code_free_32((pcre2_code_32 *)code);
+ pcre2_general_context_free_32((pcre2_general_context_32 *)general_ctx);
+ }
}
void RegEx::_bind_methods() {
ClassDB::bind_method(D_METHOD("clear"), &RegEx::clear);
ClassDB::bind_method(D_METHOD("compile", "pattern"), &RegEx::compile);
- ClassDB::bind_method(D_METHOD("search", "text", "start", "end"), &RegEx::search, DEFVAL(0), DEFVAL(-1));
- ClassDB::bind_method(D_METHOD("sub", "text", "replacement", "all", "start", "end"), &RegEx::sub, DEFVAL(false), DEFVAL(0), DEFVAL(-1));
+ ClassDB::bind_method(D_METHOD("search", "subject", "offset", "end"), &RegEx::search, DEFVAL(0), DEFVAL(-1));
+ ClassDB::bind_method(D_METHOD("sub", "subject", "replacement", "all", "offset", "end"), &RegEx::sub, DEFVAL(false), DEFVAL(0), DEFVAL(-1));
ClassDB::bind_method(D_METHOD("is_valid"), &RegEx::is_valid);
ClassDB::bind_method(D_METHOD("get_pattern"), &RegEx::get_pattern);
ClassDB::bind_method(D_METHOD("get_group_count"), &RegEx::get_group_count);
ClassDB::bind_method(D_METHOD("get_names"), &RegEx::get_names);
-
- ADD_PROPERTY(PropertyInfo(Variant::STRING, "pattern"), "compile", "get_pattern");
}
diff --git a/modules/regex/regex.h b/modules/regex/regex.h
index 106d2649a5..0d97bcce54 100644
--- a/modules/regex/regex.h
+++ b/modules/regex/regex.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -31,59 +31,53 @@
#ifndef REGEX_H
#define REGEX_H
+#include "core/array.h"
#include "core/dictionary.h"
+#include "core/map.h"
#include "core/reference.h"
-#include "core/resource.h"
#include "core/ustring.h"
#include "core/vector.h"
-class RegExNode;
-
class RegExMatch : public Reference {
GDCLASS(RegExMatch, Reference);
- struct Group {
- Variant name;
+ struct Range {
int start;
- int length;
+ int end;
};
- Vector<Group> captures;
- String string;
+ String subject;
+ Vector<Range> data;
+ Map<String, int> names;
friend class RegEx;
- friend class RegExSearch;
- friend class RegExNodeCapturing;
- friend class RegExNodeBackReference;
protected:
static void _bind_methods();
-public:
- String expand(const String &p_template) const;
+ int _find(const Variant &p_name) const;
+public:
+ String get_subject() const;
int get_group_count() const;
- Array get_group_array() const;
-
- Array get_names() const;
- Dictionary get_name_dict() const;
+ Dictionary get_names() const;
+ Array get_strings() const;
String get_string(const Variant &p_name) const;
int get_start(const Variant &p_name) const;
int get_end(const Variant &p_name) const;
-
- RegExMatch();
};
-class RegEx : public Resource {
+class RegEx : public Reference {
- GDCLASS(RegEx, Resource);
+ GDCLASS(RegEx, Reference);
- RegExNode *root;
- Vector<Variant> group_names;
+ void *general_ctx;
+ void *code;
String pattern;
- int lookahead_depth;
+
+ void _pattern_info(uint32_t what, void *where) const;
protected:
static void _bind_methods();
@@ -91,9 +85,10 @@ protected:
public:
void clear();
Error compile(const String &p_pattern);
+ void _init(const String &p_pattern = "");
- Ref<RegExMatch> search(const String &p_text, int p_start = 0, int p_end = -1) const;
- String sub(const String &p_text, const String &p_replacement, bool p_all = false, int p_start = 0, int p_end = -1) const;
+ Ref<RegExMatch> search(const String &p_subject, int offset = 0, int end = -1) const;
+ String sub(const String &p_subject, const String &p_replacement, bool p_all = false, int p_start = 0, int p_end = -1) const;
bool is_valid() const;
String get_pattern() const;
diff --git a/modules/regex/register_types.cpp b/modules/regex/register_types.cpp
index eaa8f41e33..7b042aaa52 100644
--- a/modules/regex/register_types.cpp
+++ b/modules/regex/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/regex/register_types.h b/modules/regex/register_types.h
index 3b977edd32..1624fe18c8 100644
--- a/modules/regex/register_types.h
+++ b/modules/regex/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/register_module_types.h b/modules/register_module_types.h
index e30dab2819..089055ffa0 100644
--- a/modules/register_module_types.h
+++ b/modules/register_module_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp
index efce76c805..072f18b990 100644
--- a/modules/squish/image_compress_squish.cpp
+++ b/modules/squish/image_compress_squish.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -91,7 +91,7 @@ void image_compress_squish(Image *p_image, Image::CompressSource p_source) {
if (p_image->get_format() <= Image::FORMAT_RGBA8) {
int squish_comp = squish::kColourRangeFit;
- Image::Format target_format;
+ Image::Format target_format = Image::FORMAT_RGBA8;
Image::DetectChannels dc = p_image->get_detected_channels();
@@ -140,6 +140,10 @@ void image_compress_squish(Image *p_image, Image::CompressSource p_source) {
squish_comp |= squish::kDxt5;
} break;
+ default: {
+ ERR_PRINT("Unknown image format, defaulting to RGBA8");
+ break;
+ }
}
PoolVector<uint8_t> data;
diff --git a/modules/squish/image_compress_squish.h b/modules/squish/image_compress_squish.h
index 68aaeefc30..0dff5a7ce3 100644
--- a/modules/squish/image_compress_squish.h
+++ b/modules/squish/image_compress_squish.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/squish/register_types.cpp b/modules/squish/register_types.cpp
index 2eeea59836..d5aa1d4b71 100644
--- a/modules/squish/register_types.cpp
+++ b/modules/squish/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/squish/register_types.h b/modules/squish/register_types.h
index 3bf1b19dec..0afeeeff3b 100644
--- a/modules/squish/register_types.h
+++ b/modules/squish/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
index 5ad16c7337..df427907f8 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -31,7 +31,10 @@
#include "os/file_access.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#include "thirdparty/misc/stb_vorbis.c"
+#pragma GCC diagnostic pop
void AudioStreamPlaybackOGGVorbis::_mix_internal(AudioFrame *p_buffer, int p_frames) {
@@ -112,8 +115,8 @@ float AudioStreamPlaybackOGGVorbis::get_length() const {
AudioStreamPlaybackOGGVorbis::~AudioStreamPlaybackOGGVorbis() {
if (ogg_alloc.alloc_buffer) {
- AudioServer::get_singleton()->audio_data_free(ogg_alloc.alloc_buffer);
stb_vorbis_close(ogg_stream);
+ AudioServer::get_singleton()->audio_data_free(ogg_alloc.alloc_buffer);
}
}
diff --git a/modules/stb_vorbis/audio_stream_ogg_vorbis.h b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
index 56bfe398c0..bcd829a56a 100644
--- a/modules/stb_vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/stb_vorbis/audio_stream_ogg_vorbis.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -34,7 +34,10 @@
#include "servers/audio/audio_stream.h"
#define STB_VORBIS_HEADER_ONLY
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#include "thirdparty/misc/stb_vorbis.c"
+#pragma GCC diagnostic pop
#undef STB_VORBIS_HEADER_ONLY
class AudioStreamOGGVorbis;
diff --git a/modules/stb_vorbis/register_types.cpp b/modules/stb_vorbis/register_types.cpp
index 726260b45c..abd01e9a14 100644
--- a/modules/stb_vorbis/register_types.cpp
+++ b/modules/stb_vorbis/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/stb_vorbis/register_types.h b/modules/stb_vorbis/register_types.h
index c17e1eafe9..8e2d5e78f8 100644
--- a/modules/stb_vorbis/register_types.h
+++ b/modules/stb_vorbis/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
index 5a1157bf9c..4d28dc027b 100644
--- a/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
+++ b/modules/stb_vorbis/resource_importer_ogg_vorbis.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/stb_vorbis/resource_importer_ogg_vorbis.h b/modules/stb_vorbis/resource_importer_ogg_vorbis.h
index c588b58fb2..8134009704 100644
--- a/modules/stb_vorbis/resource_importer_ogg_vorbis.h
+++ b/modules/stb_vorbis/resource_importer_ogg_vorbis.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/svg/SCsub b/modules/svg/SCsub
index 0d3a347b7e..5be9367808 100644
--- a/modules/svg/SCsub
+++ b/modules/svg/SCsub
@@ -1,9 +1,10 @@
#!/usr/bin/env python
Import('env')
+from compat import isbasestring
# Thirdparty source files
-thirdparty_dir = "#thirdparty/nanosvg/src/"
+thirdparty_dir = "#thirdparty/nanosvg/"
thirdparty_sources = [
"nanosvg.cc"
]
@@ -18,7 +19,7 @@ lib = env.Library("svg_builtin", thirdparty_sources)
# and then plain strings for system library. We insert between the two.
inserted = False
for idx, linklib in enumerate(env["LIBS"]):
- if isinstance(linklib, basestring): # first system lib such as "X11", otherwise SCons lib object
+ if isbasestring(linklib): # first system lib such as "X11", otherwise SCons lib object
env["LIBS"].insert(idx, lib)
inserted = True
break
@@ -31,4 +32,4 @@ env.Append(CCFLAGS=["-DSVG_ENABLED"])
# Godot's own source files
env.add_source_files(env.modules_sources, "*.cpp")
-Export('env') \ No newline at end of file
+Export('env')
diff --git a/modules/svg/image_loader_svg.cpp b/modules/svg/image_loader_svg.cpp
index c74188d9ea..f5c379d32e 100644
--- a/modules/svg/image_loader_svg.cpp
+++ b/modules/svg/image_loader_svg.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -47,7 +47,49 @@ SVGRasterizer::~SVGRasterizer() {
SVGRasterizer ImageLoaderSVG::rasterizer;
-Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t> *p_data, float p_scale, bool upsample) {
+inline void change_nsvg_paint_color(NSVGpaint *p_paint, const uint32_t p_old, const uint32_t p_new) {
+
+ if (p_paint->type == NSVG_PAINT_COLOR) {
+ if (p_paint->color << 8 == p_old << 8) {
+ p_paint->color = p_new;
+ }
+ }
+
+ if (p_paint->type == NSVG_PAINT_LINEAR_GRADIENT || p_paint->type == NSVG_PAINT_RADIAL_GRADIENT) {
+ for (int stop_index = 0; stop_index < p_paint->gradient->nstops; stop_index++) {
+ if (p_paint->gradient->stops[stop_index].color << 8 == p_old << 8) {
+ p_paint->gradient->stops[stop_index].color = p_new;
+ }
+ }
+ }
+}
+void ImageLoaderSVG::_convert_colors(NSVGimage *p_svg_image, const Dictionary p_colors) {
+ List<uint32_t> replace_colors_i;
+ List<uint32_t> new_colors_i;
+ List<Color> replace_colors;
+ List<Color> new_colors;
+
+ for (int i = 0; i < p_colors.keys().size(); i++) {
+ Variant r_c = p_colors.keys()[i];
+ Variant n_c = p_colors[p_colors.keys()[i]];
+ if (r_c.get_type() == Variant::COLOR && n_c.get_type() == Variant::COLOR) {
+ Color replace_color = r_c;
+ Color new_color = n_c;
+ replace_colors_i.push_back(replace_color.to_ABGR32());
+ new_colors_i.push_back(new_color.to_ABGR32());
+ }
+ }
+
+ for (NSVGshape *shape = p_svg_image->shapes; shape != NULL; shape = shape->next) {
+
+ for (int i = 0; i < replace_colors_i.size(); i++) {
+ change_nsvg_paint_color(&(shape->stroke), replace_colors_i[i], new_colors_i[i]);
+ change_nsvg_paint_color(&(shape->fill), replace_colors_i[i], new_colors_i[i]);
+ }
+ }
+}
+
+Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t> *p_data, float p_scale, bool upsample, const Dictionary *p_replace_colors) {
NSVGimage *svg_image;
PoolVector<uint8_t>::Read src_r = p_data->read();
svg_image = nsvgParse((char *)src_r.ptr(), "px", 96);
@@ -56,6 +98,9 @@ Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t
return ERR_FILE_CORRUPT;
}
+ if (p_replace_colors != NULL) {
+ _convert_colors(svg_image, *p_replace_colors);
+ }
float upscale = upsample ? 2.0 : 1.0;
int w = (int)(svg_image->width * p_scale * upscale);
@@ -78,7 +123,7 @@ Error ImageLoaderSVG::_create_image(Ref<Image> p_image, const PoolVector<uint8_t
return OK;
}
-Error ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, const char *svg_str, float p_scale, bool upsample) {
+Error ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, const char *svg_str, float p_scale, bool upsample, const Dictionary *p_replace_colors) {
size_t str_len = strlen(svg_str);
PoolVector<uint8_t> src_data;
@@ -86,7 +131,7 @@ Error ImageLoaderSVG::create_image_from_string(Ref<Image> p_image, const char *s
PoolVector<uint8_t>::Write src_w = src_data.write();
memcpy(src_w.ptr(), svg_str, str_len + 1);
- return _create_image(p_image, &src_data, p_scale, upsample);
+ return _create_image(p_image, &src_data, p_scale, upsample, p_replace_colors);
}
Error ImageLoaderSVG::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) {
diff --git a/modules/svg/image_loader_svg.h b/modules/svg/image_loader_svg.h
index d93e1e3d62..f692b1b28c 100644
--- a/modules/svg/image_loader_svg.h
+++ b/modules/svg/image_loader_svg.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -54,14 +54,15 @@ public:
class ImageLoaderSVG : public ImageFormatLoader {
static SVGRasterizer rasterizer;
- static Error _create_image(Ref<Image> p_image, const PoolVector<uint8_t> *p_data, float p_scale, bool upsample);
+ static void _convert_colors(NSVGimage *p_svg_imge, const Dictionary p_colors);
+ static Error _create_image(Ref<Image> p_image, const PoolVector<uint8_t> *p_data, float p_scale, bool upsample, const Dictionary *p_replace_color = NULL);
public:
- static Error create_image_from_string(Ref<Image> p_image, const char *p_svg_str, float p_scale, bool upsample);
+ static Error create_image_from_string(Ref<Image> p_image, const char *p_svg_str, float p_scale, bool upsample, const Dictionary *p_replace_color = NULL);
virtual Error load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale);
virtual void get_recognized_extensions(List<String> *p_extensions) const;
ImageLoaderSVG();
};
-#endif \ No newline at end of file
+#endif
diff --git a/modules/svg/register_types.cpp b/modules/svg/register_types.cpp
index e0f967ca06..e37239f27a 100644
--- a/modules/svg/register_types.cpp
+++ b/modules/svg/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/svg/register_types.h b/modules/svg/register_types.h
index 920b724623..49d550e7c9 100644
--- a/modules/svg/register_types.h
+++ b/modules/svg/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/tga/image_loader_tga.cpp b/modules/tga/image_loader_tga.cpp
index 2329d0bcc2..7c7cf5bcbe 100644
--- a/modules/tga/image_loader_tga.cpp
+++ b/modules/tga/image_loader_tga.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* image_loader_jpegd.cpp */
+/* image_loader_tga.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -53,19 +53,19 @@ Error ImageLoaderTGA::decode_tga_rle(const uint8_t *p_compressed_buffer, size_t
count = (c & 0x7f) + 1;
if (c & 0x80) {
- for (int i = 0; i < p_pixel_size; i++) {
+ for (size_t i = 0; i < p_pixel_size; i++) {
pixels_w.ptr()[i] = p_compressed_buffer[compressed_pos];
compressed_pos += 1;
}
- for (int i = 0; i < count; i++) {
- for (int j = 0; j < p_pixel_size; j++) {
+ for (size_t i = 0; i < count; i++) {
+ for (size_t j = 0; j < p_pixel_size; j++) {
p_uncompressed_buffer[output_pos + j] = pixels_w.ptr()[j];
}
output_pos += p_pixel_size;
}
} else {
count *= p_pixel_size;
- for (int i = 0; i < count; i++) {
+ for (size_t i = 0; i < count; i++) {
p_uncompressed_buffer[output_pos] = p_compressed_buffer[compressed_pos];
compressed_pos += 1;
output_pos += 1;
@@ -208,7 +208,7 @@ Error ImageLoaderTGA::load_image(Ref<Image> p_image, FileAccess *f, bool p_force
PoolVector<uint8_t> src_image;
int src_image_len = f->get_len();
ERR_FAIL_COND_V(src_image_len == 0, ERR_FILE_CORRUPT);
- ERR_FAIL_COND_V(src_image_len < sizeof(tga_header_s), ERR_FILE_CORRUPT);
+ ERR_FAIL_COND_V(src_image_len < (int)sizeof(tga_header_s), ERR_FILE_CORRUPT);
src_image.resize(src_image_len);
Error err = OK;
diff --git a/modules/tga/image_loader_tga.h b/modules/tga/image_loader_tga.h
index f42a3f7e75..7905ab37a7 100644
--- a/modules/tga/image_loader_tga.h
+++ b/modules/tga/image_loader_tga.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* image_loader_jpegd.h */
+/* image_loader_tga.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/tga/register_types.cpp b/modules/tga/register_types.cpp
index 6e120fa3bf..814b21d368 100644
--- a/modules/tga/register_types.cpp
+++ b/modules/tga/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/tga/register_types.h b/modules/tga/register_types.h
index 079b7bf291..10812981f8 100644
--- a/modules/tga/register_types.h
+++ b/modules/tga/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/theora/register_types.cpp b/modules/theora/register_types.cpp
index 1bea5439a3..ae6961b3da 100644
--- a/modules/theora/register_types.cpp
+++ b/modules/theora/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/theora/register_types.h b/modules/theora/register_types.h
index cb9f9d1848..7011ee44d0 100644
--- a/modules/theora/register_types.h
+++ b/modules/theora/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp
index a83d3ead0e..2a24f8d4d1 100644
--- a/modules/theora/video_stream_theora.cpp
+++ b/modules/theora/video_stream_theora.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -83,37 +83,6 @@ void VideoStreamPlaybackTheora::video_write(void) {
th_ycbcr_buffer yuv;
th_decode_ycbcr_out(td, yuv);
- // FIXME: The way stuff is commented out with `//*/` closing comments
- // sounds very fishy...
-
- /*
- int y_offset, uv_offset;
- y_offset=(ti.pic_x&~1)+yuv[0].stride*(ti.pic_y&~1);
-
- {
- int pixels = size.x * size.y;
- frame_data.resize(pixels * 4);
- PoolVector<uint8_t>::Write w = frame_data.write();
- char* dst = (char*)w.ptr();
- int p = 0;
- for (int i=0; i<size.y; i++) {
-
- char *in_y = (char *)yuv[0].data+y_offset+yuv[0].stride*i;
- char *out = dst + (int)size.x * 4 * i;
- for (int j=0;j<size.x;j++) {
-
- dst[p++] = in_y[j];
- dst[p++] = in_y[j];
- dst[p++] = in_y[j];
- dst[p++] = 255;
- };
- }
- format = Image::FORMAT_RGBA8;
- }
- //*/
-
- //*
-
int pitch = 4;
frame_data.resize(size.x * size.y * pitch);
{
@@ -142,99 +111,6 @@ void VideoStreamPlaybackTheora::video_write(void) {
texture->set_data(img); //zero copy send to visual server
- /*
-
- if (px_fmt == TH_PF_444) {
-
- int pitch = 3;
- frame_data.resize(size.x * size.y * pitch);
- PoolVector<uint8_t>::Write w = frame_data.write();
- char* dst = (char*)w.ptr();
-
- for(int i=0;i<size.y;i++) {
-
- char *in_y = (char *)yuv[0].data+y_offset+yuv[0].stride*i;
- char *out = dst + (int)size.x * pitch * i;
- char *in_u = (char *)yuv[1].data+uv_offset+yuv[1].stride*i;
- char *in_v = (char *)yuv[2].data+uv_offset+yuv[2].stride*i;
- for (int j=0;j<size.x;j++) {
-
- out[j*3+0] = in_y[j];
- out[j*3+1] = in_u[j];
- out[j*3+2] = in_v[j];
- };
- }
-
- format = Image::FORMAT_YUV_444;
-
- } else {
-
- int div;
- if (px_fmt!=TH_PF_422) {
- div = 2;
- }
-
- bool rgba = true;
- if (rgba) {
-
- int pitch = 4;
- frame_data.resize(size.x * size.y * pitch);
- PoolVector<uint8_t>::Write w = frame_data.write();
- char* dst = (char*)w.ptr();
-
- uv_offset=(ti.pic_x/2)+(yuv[1].stride)*(ti.pic_y / div);
- for(int i=0;i<size.y;i++) {
- char *in_y = (char *)yuv[0].data+y_offset+yuv[0].stride*i;
- char *in_u = (char *)yuv[1].data+uv_offset+yuv[1].stride*(i/div);
- char *in_v = (char *)yuv[2].data+uv_offset+yuv[2].stride*(i/div);
- uint8_t *out = (uint8_t*)dst + (int)size.x * pitch * i;
- int ofs = 0;
- for (int j=0;j<size.x;j++) {
-
- uint8_t y, u, v;
- y = in_y[j];
- u = in_u[j/2];
- v = in_v[j/2];
-
- int32_t r = Math::fast_ftoi(1.164 * (y - 16) + 1.596 * (v - 128));
- int32_t g = Math::fast_ftoi(1.164 * (y - 16) - 0.813 * (v - 128) - 0.391 * (u - 128));
- int32_t b = Math::fast_ftoi(1.164 * (y - 16) + 2.018 * (u - 128));
-
- out[ofs++] = CLAMP(r, 0, 255);
- out[ofs++] = CLAMP(g, 0, 255);
- out[ofs++] = CLAMP(b, 0, 255);
- out[ofs++] = 255;
- }
- }
-
- format = Image::FORMAT_RGBA8;
-
- } else {
-
- int pitch = 2;
- frame_data.resize(size.x * size.y * pitch);
- PoolVector<uint8_t>::Write w = frame_data.write();
- char* dst = (char*)w.ptr();
-
- uv_offset=(ti.pic_x/2)+(yuv[1].stride)*(ti.pic_y / div);
- for(int i=0;i<size.y;i++) {
- char *in_y = (char *)yuv[0].data+y_offset+yuv[0].stride*i;
- char *out = dst + (int)size.x * pitch * i;
- for (int j=0;j<size.x;j++)
- out[j*2] = in_y[j];
- char *in_u = (char *)yuv[1].data+uv_offset+yuv[1].stride*(i/div);
- char *in_v = (char *)yuv[2].data+uv_offset+yuv[2].stride*(i/div);
- for (int j=0;j<(int)size.x>>1;j++) {
- out[j*4+1] = in_u[j];
- out[j*4+3] = in_v[j];
- }
- }
-
- format = Image::FORMAT_YUV_422;
- };
- };
- //*/
-
frames_pending = 1;
}
@@ -455,15 +331,6 @@ void VideoStreamPlaybackTheora::set_file(const String &p_file) {
th_decode_ctl(td, TH_DECCTL_SET_PPLEVEL, &pp_level, sizeof(pp_level));
pp_inc = 0;
- /*{
- int arg = 0xffff;
- th_decode_ctl(td,TH_DECCTL_SET_TELEMETRY_MBMODE,&arg,sizeof(arg));
- th_decode_ctl(td,TH_DECCTL_SET_TELEMETRY_MV,&arg,sizeof(arg));
- th_decode_ctl(td,TH_DECCTL_SET_TELEMETRY_QI,&arg,sizeof(arg));
- arg=10;
- th_decode_ctl(td,TH_DECCTL_SET_TELEMETRY_BITS,&arg,sizeof(arg));
- }*/
-
int w;
int h;
w = (ti.pic_x + ti.frame_width + 1 & ~1) - (ti.pic_x & ~1);
@@ -502,8 +369,6 @@ void VideoStreamPlaybackTheora::set_file(const String &p_file) {
float VideoStreamPlaybackTheora::get_time() const {
- //print_line("total: "+itos(get_total())+" todo: "+itos(get_todo()));
- //return MAX(0,time-((get_total())/(float)vi.rate));
return time - AudioServer::get_singleton()->get_output_delay() - delay_compensation; //-((get_total())/(float)vi.rate);
};
@@ -526,8 +391,6 @@ void VideoStreamPlaybackTheora::update(float p_delta) {
thread_sem->post();
#endif
- //double ctime =AudioServer::get_singleton()->get_mix_time();
-
//print_line("play "+rtos(p_delta));
time += p_delta;
@@ -663,8 +526,6 @@ void VideoStreamPlaybackTheora::update(float p_delta) {
}
}
-//print_line("no theora: "+itos(no_theora)+" theora eos: "+itos(theora_eos)+" frame done "+itos(frame_done));
-
#ifdef THEORA_USE_THREAD_STREAMING
if (file && thread_eof && no_theora && theora_eos && ring_buffer.data_left() == 0) {
#else
@@ -674,16 +535,6 @@ void VideoStreamPlaybackTheora::update(float p_delta) {
stop();
return;
};
-#if 0
- if (!videobuf_ready || audio_todo > 0){
- /* no data yet for somebody. Grab another page */
-
- buffer_data();
- while(ogg_sync_pageout(&oy,&og)>0){
- queue_page(&og);
- }
- }
-#else
if (!frame_done || !audio_done) {
//what's the point of waiting for audio to grab a page?
@@ -693,7 +544,7 @@ void VideoStreamPlaybackTheora::update(float p_delta) {
queue_page(&og);
}
}
-#endif
+
/* If playback has begun, top audio buffer off immediately. */
//if(stateflag) audio_write_nonblocking();
diff --git a/modules/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h
index 84b665382b..f04e49c662 100644
--- a/modules/theora/video_stream_theora.h
+++ b/modules/theora/video_stream_theora.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/tinyexr/image_loader_tinyexr.cpp b/modules/tinyexr/image_loader_tinyexr.cpp
index 18d453a717..49a4db237a 100644
--- a/modules/tinyexr/image_loader_tinyexr.cpp
+++ b/modules/tinyexr/image_loader_tinyexr.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* image_loader_jpegd.cpp */
+/* image_loader_tinyexr.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/tinyexr/image_loader_tinyexr.h b/modules/tinyexr/image_loader_tinyexr.h
index f9636a303e..53a81597af 100644
--- a/modules/tinyexr/image_loader_tinyexr.h
+++ b/modules/tinyexr/image_loader_tinyexr.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* image_loader_jpegd.h */
+/* image_loader_tinyexr.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/tinyexr/register_types.cpp b/modules/tinyexr/register_types.cpp
index 73f3131276..4bbafbc90a 100644
--- a/modules/tinyexr/register_types.cpp
+++ b/modules/tinyexr/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/tinyexr/register_types.h b/modules/tinyexr/register_types.h
index f3c7372359..e866bb7624 100644
--- a/modules/tinyexr/register_types.h
+++ b/modules/tinyexr/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/visual_script/register_types.cpp b/modules/visual_script/register_types.cpp
index a54d306aff..c50ba17c35 100644
--- a/modules/visual_script/register_types.cpp
+++ b/modules/visual_script/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/visual_script/register_types.h b/modules/visual_script/register_types.h
index 2c0ee56268..4fb03bc227 100644
--- a/modules/visual_script/register_types.h
+++ b/modules/visual_script/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index b4bdbe16b4..88012d2031 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -273,7 +273,9 @@ void VisualScript::_node_ports_changed(int p_id) {
Function &func = functions[function];
Ref<VisualScriptNode> vsn = func.nodes[p_id].node;
- if (OS::get_singleton()->get_main_loop() && OS::get_singleton()->get_main_loop()->cast_to<SceneTree>() && Engine::get_singleton()->is_editor_hint()) {
+ if (OS::get_singleton()->get_main_loop() &&
+ Object::cast_to<SceneTree>(OS::get_singleton()->get_main_loop()) &&
+ Engine::get_singleton()->is_editor_hint()) {
vsn->validate_input_default_values(); //force validate default values when editing on editor
}
@@ -336,7 +338,7 @@ void VisualScript::add_node(const StringName &p_func, int p_id, const Ref<Visual
Function &func = functions[p_func];
- if (p_node->cast_to<VisualScriptFunction>()) {
+ if (Object::cast_to<VisualScriptFunction>(*p_node)) {
//the function indeed
ERR_EXPLAIN("A function node already has been set here.");
ERR_FAIL_COND(func.function_id >= 0);
@@ -393,7 +395,7 @@ void VisualScript::remove_node(const StringName &p_func, int p_id) {
}
}
- if (func.nodes[p_id].node->cast_to<VisualScriptFunction>()) {
+ if (Object::cast_to<VisualScriptFunction>(func.nodes[p_id].node.ptr())) {
func.function_id = -1; //revert to invalid
}
@@ -1086,7 +1088,7 @@ int VisualScript::get_member_line(const StringName &p_member) const {
#ifdef TOOLS_ENABLED
if (has_function(p_member)) {
for (Map<int, Function::NodeData>::Element *E = functions[p_member].nodes.front(); E; E = E->next()) {
- if (E->get().node->cast_to<VisualScriptFunction>())
+ if (Object::cast_to<VisualScriptFunction>(E->get().node.ptr()))
return E->key();
}
}
@@ -2001,9 +2003,9 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o
max_input_args = 0;
max_output_args = 0;
- if (p_owner->cast_to<Node>()) {
+ if (Object::cast_to<Node>(p_owner)) {
//turn on these if they exist and base is a node
- Node *node = p_owner->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(p_owner);
if (p_script->functions.has("_process"))
node->set_process(true);
if (p_script->functions.has("_fixed_process"))
@@ -2094,16 +2096,16 @@ void VisualScriptInstance::create(const Ref<VisualScript> &p_script, Object *p_o
}
}
- if (node->cast_to<VisualScriptLocalVar>() || node->cast_to<VisualScriptLocalVarSet>()) {
+ if (Object::cast_to<VisualScriptLocalVar>(node.ptr()) || Object::cast_to<VisualScriptLocalVarSet>(*node)) {
//working memory is shared only for this node, for the same variables
Ref<VisualScriptLocalVar> vslv = node;
StringName var_name;
- if (node->cast_to<VisualScriptLocalVar>())
- var_name = String(node->cast_to<VisualScriptLocalVar>()->get_var_name()).strip_edges();
+ if (Object::cast_to<VisualScriptLocalVar>(*node))
+ var_name = String(Object::cast_to<VisualScriptLocalVar>(*node)->get_var_name()).strip_edges();
else
- var_name = String(node->cast_to<VisualScriptLocalVarSet>()->get_var_name()).strip_edges();
+ var_name = String(Object::cast_to<VisualScriptLocalVarSet>(*node)->get_var_name()).strip_edges();
if (!local_var_indices.has(var_name)) {
local_var_indices[var_name] = function.max_stack;
diff --git a/modules/visual_script/visual_script.h b/modules/visual_script/visual_script.h
index b61b67a890..b2e7a6aa27 100644
--- a/modules/visual_script/visual_script.h
+++ b/modules/visual_script/visual_script.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/visual_script/visual_script_builtin_funcs.cpp b/modules/visual_script/visual_script_builtin_funcs.cpp
index 9cbd70d4ca..2c8796820e 100644
--- a/modules/visual_script/visual_script_builtin_funcs.cpp
+++ b/modules/visual_script/visual_script_builtin_funcs.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/visual_script/visual_script_builtin_funcs.h b/modules/visual_script/visual_script_builtin_funcs.h
index 8e9c0eca76..97ab307039 100644
--- a/modules/visual_script/visual_script_builtin_funcs.h
+++ b/modules/visual_script/visual_script_builtin_funcs.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index e7aaf0aa4a..8386687c9f 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* visual_script_editor.h */
+/* visual_script_editor.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -73,7 +73,7 @@ protected:
if (argc == new_argc)
return true;
- undo_redo->create_action("Change Signal Arguments");
+ undo_redo->create_action(TTR("Change Signal Arguments"));
if (new_argc < argc) {
for (int i = new_argc; i < argc; i++) {
@@ -104,7 +104,7 @@ protected:
int old_type = script->custom_signal_get_argument_type(sig, idx);
int new_type = p_value;
- undo_redo->create_action("Change Argument Type");
+ undo_redo->create_action(TTR("Change Argument Type"));
undo_redo->add_do_method(script.ptr(), "custom_signal_set_argument_type", sig, idx, new_type);
undo_redo->add_undo_method(script.ptr(), "custom_signal_set_argument_type", sig, idx, old_type);
undo_redo->commit_action();
@@ -116,7 +116,7 @@ protected:
String old_name = script->custom_signal_get_argument_name(sig, idx);
String new_name = p_value;
- undo_redo->create_action("Change Argument name");
+ undo_redo->create_action(TTR("Change Argument name"));
undo_redo->add_do_method(script.ptr(), "custom_signal_set_argument_name", sig, idx, new_name);
undo_redo->add_undo_method(script.ptr(), "custom_signal_set_argument_name", sig, idx, old_name);
undo_redo->commit_action();
@@ -213,7 +213,7 @@ protected:
return false;
if (String(p_name) == "value") {
- undo_redo->create_action("Set Variable Default Value");
+ undo_redo->create_action(TTR("Set Variable Default Value"));
Variant current = script->get_variable_default_value(var);
undo_redo->add_do_method(script.ptr(), "set_variable_default_value", var, p_value);
undo_redo->add_undo_method(script.ptr(), "set_variable_default_value", var, current);
@@ -229,7 +229,7 @@ protected:
Dictionary dc = d.copy();
dc["type"] = p_value;
- undo_redo->create_action("Set Variable Type");
+ undo_redo->create_action(TTR("Set Variable Type"));
undo_redo->add_do_method(script.ptr(), "set_variable_info", var, dc);
undo_redo->add_undo_method(script.ptr(), "set_variable_info", var, d);
undo_redo->add_do_method(this, "_var_changed");
@@ -242,7 +242,7 @@ protected:
Dictionary dc = d.copy();
dc["hint"] = p_value;
- undo_redo->create_action("Set Variable Type");
+ undo_redo->create_action(TTR("Set Variable Type"));
undo_redo->add_do_method(script.ptr(), "set_variable_info", var, dc);
undo_redo->add_undo_method(script.ptr(), "set_variable_info", var, d);
undo_redo->add_do_method(this, "_var_changed");
@@ -255,7 +255,7 @@ protected:
Dictionary dc = d.copy();
dc["hint_string"] = p_value;
- undo_redo->create_action("Set Variable Type");
+ undo_redo->create_action(TTR("Set Variable Type"));
undo_redo->add_do_method(script.ptr(), "set_variable_info", var, dc);
undo_redo->add_undo_method(script.ptr(), "set_variable_info", var, d);
undo_redo->add_do_method(this, "_var_changed");
@@ -422,7 +422,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
for (int i = 0; i < graph->get_child_count(); i++) {
- if (graph->get_child(i)->cast_to<GraphNode>()) {
+ if (Object::cast_to<GraphNode>(graph->get_child(i))) {
memdelete(graph->get_child(i));
i--;
}
@@ -506,7 +506,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
gnode->set_show_close_button(true);
}
- if (node->cast_to<VisualScriptExpression>()) {
+ if (Object::cast_to<VisualScriptExpression>(*node)) {
LineEdit *line_edit = memnew(LineEdit);
line_edit->set_text(node->get_text());
@@ -520,7 +520,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
gnode->add_child(text);
}
- if (node->cast_to<VisualScriptComment>()) {
+ if (Object::cast_to<VisualScriptExpression>(*node)) {
Ref<VisualScriptComment> vsc = node;
gnode->set_comment(true);
gnode->set_resizeable(true);
@@ -886,8 +886,8 @@ void VisualScriptEditor::_member_edited() {
undo_redo->add_undo_method(this, "_update_members");
undo_redo->add_do_method(this, "_update_graph");
undo_redo->add_undo_method(this, "_update_graph");
- undo_redo->add_do_method(this, "emit_signal", "script_changed");
- undo_redo->add_undo_method(this, "emit_signal", "script_changed");
+ undo_redo->add_do_method(this, "emit_signal", "edited_script_changed");
+ undo_redo->add_undo_method(this, "emit_signal", "edited_script_changed");
undo_redo->commit_action();
// _update_graph();
@@ -903,8 +903,8 @@ void VisualScriptEditor::_member_edited() {
undo_redo->add_undo_method(script.ptr(), "rename_variable", new_name, name);
undo_redo->add_do_method(this, "_update_members");
undo_redo->add_undo_method(this, "_update_members");
- undo_redo->add_do_method(this, "emit_signal", "script_changed");
- undo_redo->add_undo_method(this, "emit_signal", "script_changed");
+ undo_redo->add_do_method(this, "emit_signal", "edited_script_changed");
+ undo_redo->add_undo_method(this, "emit_signal", "edited_script_changed");
undo_redo->commit_action();
return; //or crash because it will become invalid
@@ -918,8 +918,8 @@ void VisualScriptEditor::_member_edited() {
undo_redo->add_undo_method(script.ptr(), "rename_custom_signal", new_name, name);
undo_redo->add_do_method(this, "_update_members");
undo_redo->add_undo_method(this, "_update_members");
- undo_redo->add_do_method(this, "emit_signal", "script_changed");
- undo_redo->add_undo_method(this, "emit_signal", "script_changed");
+ undo_redo->add_do_method(this, "emit_signal", "edited_script_changed");
+ undo_redo->add_undo_method(this, "emit_signal", "edited_script_changed");
undo_redo->commit_action();
return; //or crash because it will become invalid
@@ -970,7 +970,7 @@ void VisualScriptEditor::_override_pressed(int p_id) {
void VisualScriptEditor::_member_button(Object *p_item, int p_column, int p_button) {
- TreeItem *ti = p_item->cast_to<TreeItem>();
+ TreeItem *ti = Object::cast_to<TreeItem>(p_item);
TreeItem *root = members->get_root();
@@ -1057,8 +1057,8 @@ void VisualScriptEditor::_member_button(Object *p_item, int p_column, int p_butt
undo_redo->add_undo_method(this, "_update_members");
undo_redo->add_do_method(this, "_update_graph");
undo_redo->add_undo_method(this, "_update_graph");
- undo_redo->add_do_method(this, "emit_signal", "script_changed");
- undo_redo->add_undo_method(this, "emit_signal", "script_changed");
+ undo_redo->add_do_method(this, "emit_signal", "edited_script_changed");
+ undo_redo->add_undo_method(this, "emit_signal", "edited_script_changed");
undo_redo->commit_action();
_update_graph();
@@ -1077,8 +1077,8 @@ void VisualScriptEditor::_member_button(Object *p_item, int p_column, int p_butt
undo_redo->add_undo_method(script.ptr(), "remove_variable", name);
undo_redo->add_do_method(this, "_update_members");
undo_redo->add_undo_method(this, "_update_members");
- undo_redo->add_do_method(this, "emit_signal", "script_changed");
- undo_redo->add_undo_method(this, "emit_signal", "script_changed");
+ undo_redo->add_do_method(this, "emit_signal", "edited_script_changed");
+ undo_redo->add_undo_method(this, "emit_signal", "edited_script_changed");
undo_redo->commit_action();
return; //or crash because it will become invalid
}
@@ -1093,8 +1093,8 @@ void VisualScriptEditor::_member_button(Object *p_item, int p_column, int p_butt
undo_redo->add_undo_method(script.ptr(), "remove_custom_signal", name);
undo_redo->add_do_method(this, "_update_members");
undo_redo->add_undo_method(this, "_update_members");
- undo_redo->add_do_method(this, "emit_signal", "script_changed");
- undo_redo->add_undo_method(this, "emit_signal", "script_changed");
+ undo_redo->add_do_method(this, "emit_signal", "edited_script_changed");
+ undo_redo->add_undo_method(this, "emit_signal", "edited_script_changed");
undo_redo->commit_action();
return; //or crash because it will become invalid
}
@@ -1117,8 +1117,8 @@ void VisualScriptEditor::_expression_text_changed(const String &p_text, int p_id
undo_redo->commit_action();
Node *node = graph->get_node(itos(p_id));
- if (node->cast_to<Control>())
- node->cast_to<Control>()->set_size(Vector2(1, 1)); //shrink if text is smaller
+ if (Object::cast_to<Control>(node))
+ Object::cast_to<Control>(node)->set_size(Vector2(1, 1)); //shrink if text is smaller
updating_graph = false;
}
@@ -1253,7 +1253,7 @@ void VisualScriptEditor::_on_nodes_delete() {
List<int> to_erase;
for (int i = 0; i < graph->get_child_count(); i++) {
- GraphNode *gn = graph->get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i));
if (gn) {
if (gn->is_selected() && gn->is_close_button_visible()) {
to_erase.push_back(gn->get_name().operator String().to_int());
@@ -1264,7 +1264,7 @@ void VisualScriptEditor::_on_nodes_delete() {
if (to_erase.empty())
return;
- undo_redo->create_action("Remove VisualScript Nodes");
+ undo_redo->create_action(TTR("Remove VisualScript Nodes"));
for (List<int>::Element *F = to_erase.front(); F; F = F->next()) {
@@ -1302,7 +1302,7 @@ void VisualScriptEditor::_on_nodes_duplicate() {
List<int> to_duplicate;
for (int i = 0; i < graph->get_child_count(); i++) {
- GraphNode *gn = graph->get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i));
if (gn) {
if (gn->is_selected() && gn->is_close_button_visible()) {
to_duplicate.push_back(gn->get_name().operator String().to_int());
@@ -1313,7 +1313,7 @@ void VisualScriptEditor::_on_nodes_duplicate() {
if (to_duplicate.empty())
return;
- undo_redo->create_action("Duplicate VisualScript Nodes");
+ undo_redo->create_action(TTR("Duplicate VisualScript Nodes"));
int idc = script->get_available_id() + 1;
Set<int> to_select;
@@ -1335,7 +1335,7 @@ void VisualScriptEditor::_on_nodes_duplicate() {
undo_redo->commit_action();
for (int i = 0; i < graph->get_child_count(); i++) {
- GraphNode *gn = graph->get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i));
if (gn) {
int id = gn->get_name().operator String().to_int();
gn->set_selected(to_select.has(id));
@@ -1799,7 +1799,7 @@ void VisualScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
if (!obj)
return;
- Node *node = obj->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(obj);
Vector2 ofs = graph->get_scroll_ofs() + p_point;
if (graph->is_using_snap()) {
@@ -1918,7 +1918,7 @@ void VisualScriptEditor::_selected_method(const String &p_method) {
void VisualScriptEditor::_draw_color_over_button(Object *obj, Color p_color) {
- Button *button = obj->cast_to<Button>();
+ Button *button = Object::cast_to<Button>(obj);
if (!button)
return;
@@ -1937,7 +1937,7 @@ void VisualScriptEditor::_button_resource_previewed(const String &p_path, const
if (!obj)
return;
- Button *b = obj->cast_to<Button>();
+ Button *b = Object::cast_to<Button>(obj);
ERR_FAIL_COND(!b);
if (p_preview.is_null()) {
@@ -2050,9 +2050,7 @@ void VisualScriptEditor::set_edit_state(const Variant &p_state) {
void VisualScriptEditor::_center_on_node(int p_id) {
Node *n = graph->get_node(itos(p_id));
- if (!n)
- return;
- GraphNode *gn = n->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(n);
if (gn) {
gn->set_selected(true);
Vector2 new_scroll = gn->get_offset() - graph->get_size() * 0.5 + gn->get_size() * 0.5;
@@ -2210,7 +2208,7 @@ void VisualScriptEditor::_change_base_type_callback() {
String bt = select_base_type->get_selected_type();
ERR_FAIL_COND(bt == String());
- undo_redo->create_action("Change Base Type");
+ undo_redo->create_action(TTR("Change Base Type"));
undo_redo->add_do_method(script.ptr(), "set_instance_base_type", bt);
undo_redo->add_undo_method(script.ptr(), "set_instance_base_type", script->get_instance_base_type());
undo_redo->add_do_method(this, "_update_members");
@@ -2258,7 +2256,7 @@ static bool _get_in_slot(const Ref<VisualScriptNode> &p_node, int p_slot, int &r
void VisualScriptEditor::_begin_node_move() {
- undo_redo->create_action("Move Node(s)");
+ undo_redo->create_action(TTR("Move Node(s)"));
}
void VisualScriptEditor::_end_node_move() {
@@ -2270,8 +2268,8 @@ void VisualScriptEditor::_move_node(String func, int p_id, const Vector2 &p_to)
if (func == String(edited_func)) {
Node *node = graph->get_node(itos(p_id));
- if (node && node->cast_to<GraphNode>())
- node->cast_to<GraphNode>()->set_offset(p_to);
+ if (Object::cast_to<GraphNode>(node))
+ Object::cast_to<GraphNode>(node)->set_offset(p_to);
}
script->set_node_pos(edited_func, p_id, p_to / EDSCALE);
}
@@ -2284,7 +2282,7 @@ void VisualScriptEditor::_node_moved(Vector2 p_from, Vector2 p_to, int p_id) {
void VisualScriptEditor::_remove_node(int p_id) {
- undo_redo->create_action("Remove VisualScript Node");
+ undo_redo->create_action(TTR("Remove VisualScript Node"));
undo_redo->add_do_method(script.ptr(), "remove_node", edited_func, p_id);
undo_redo->add_undo_method(script.ptr(), "add_node", edited_func, p_id, script->get_node(edited_func, p_id), script->get_node_pos(edited_func, p_id));
@@ -2345,7 +2343,7 @@ void VisualScriptEditor::_graph_connected(const String &p_from, int p_from_slot,
ERR_FAIL_COND(from_seq != to_seq);
- undo_redo->create_action("Connect Nodes");
+ undo_redo->create_action(TTR("Connect Nodes"));
if (from_seq) {
undo_redo->add_do_method(script.ptr(), "sequence_connect", edited_func, p_from.to_int(), from_port, p_to.to_int());
@@ -2398,7 +2396,7 @@ void VisualScriptEditor::_graph_disconnected(const String &p_from, int p_from_sl
ERR_FAIL_COND(from_seq != to_seq);
- undo_redo->create_action("Connect Nodes");
+ undo_redo->create_action(TTR("Connect Nodes"));
if (from_seq) {
undo_redo->add_do_method(script.ptr(), "sequence_disconnect", edited_func, p_from.to_int(), from_port, p_to.to_int());
@@ -2421,10 +2419,7 @@ void VisualScriptEditor::_graph_disconnected(const String &p_from, int p_from_sl
void VisualScriptEditor::_graph_connect_to_empty(const String &p_from, int p_from_slot, const Vector2 &p_release_pos) {
Node *node = graph->get_node(p_from);
- if (!node)
- return;
-
- GraphNode *gn = node->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(node);
if (!gn)
return;
@@ -2691,21 +2686,21 @@ void VisualScriptEditor::_selected_connect_node_method_or_setget(const String &p
Ref<VisualScriptNode> vsn = script->get_node(edited_func, port_action_new_node);
- if (vsn->cast_to<VisualScriptFunctionCall>()) {
+ if (Object::cast_to<VisualScriptFunctionCall>(*vsn)) {
Ref<VisualScriptFunctionCall> vsfc = vsn;
vsfc->set_function(p_text);
script->data_connect(edited_func, port_action_node, port_action_output, port_action_new_node, 0);
}
- if (vsn->cast_to<VisualScriptPropertySet>()) {
+ if (Object::cast_to<VisualScriptPropertySet>(*vsn)) {
Ref<VisualScriptPropertySet> vsp = vsn;
vsp->set_property(p_text);
script->data_connect(edited_func, port_action_node, port_action_output, port_action_new_node, 0);
}
- if (vsn->cast_to<VisualScriptPropertyGet>()) {
+ if (Object::cast_to<VisualScriptPropertyGet>(*vsn)) {
Ref<VisualScriptPropertyGet> vsp = vsn;
vsp->set_property(p_text);
@@ -2728,7 +2723,7 @@ void VisualScriptEditor::_default_value_changed() {
if (vsn.is_null())
return;
- undo_redo->create_action("Change Input Value");
+ undo_redo->create_action(TTR("Change Input Value"));
undo_redo->add_do_method(vsn.ptr(), "set_default_input_value", editing_input, default_value_edit->get_variant());
undo_redo->add_undo_method(vsn.ptr(), "set_default_input_value", editing_input, vsn->get_default_input_value(editing_input));
@@ -2752,7 +2747,7 @@ void VisualScriptEditor::_default_value_edited(Node *p_button, int p_id, int p_i
existing = Variant::construct(pinfo.type, &existingp, 1, ce, false);
}
- default_value_edit->set_position(p_button->cast_to<Control>()->get_global_position() + Vector2(0, p_button->cast_to<Control>()->get_size().y));
+ default_value_edit->set_position(Object::cast_to<Control>(p_button)->get_global_position() + Vector2(0, Object::cast_to<Control>(p_button)->get_size().y));
default_value_edit->set_size(Size2(1, 1));
if (default_value_edit->edit(NULL, pinfo.name, pinfo.type, existing, pinfo.hint, pinfo.hint_string)) {
if (pinfo.hint == PROPERTY_HINT_MULTILINE_TEXT)
@@ -2818,9 +2813,7 @@ void VisualScriptEditor::_comment_node_resized(const Vector2 &p_new_size, int p_
return;
Node *node = graph->get_node(itos(p_node));
- if (!node)
- return;
- GraphNode *gn = node->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(node);
if (!gn)
return;
@@ -2849,7 +2842,7 @@ void VisualScriptEditor::_menu_option(int p_what) {
List<String> reselect;
for (int i = 0; i < graph->get_child_count(); i++) {
- GraphNode *gn = graph->get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i));
if (gn) {
if (gn->is_selected()) {
int id = String(gn->get_name()).to_int();
@@ -2865,7 +2858,7 @@ void VisualScriptEditor::_menu_option(int p_what) {
_update_graph();
for (List<String>::Element *E = reselect.front(); E; E = E->next()) {
- GraphNode *gn = graph->get_node(E->get())->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(graph->get_node(E->get()));
gn->set_selected(true);
}
@@ -2886,14 +2879,14 @@ void VisualScriptEditor::_menu_option(int p_what) {
clipboard->sequence_connections.clear();
for (int i = 0; i < graph->get_child_count(); i++) {
- GraphNode *gn = graph->get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i));
if (gn) {
if (gn->is_selected()) {
int id = String(gn->get_name()).to_int();
Ref<VisualScriptNode> node = script->get_node(edited_func, id);
- if (node->cast_to<VisualScriptFunction>()) {
- EditorNode::get_singleton()->show_warning("Can't copy the function node.");
+ if (Object::cast_to<VisualScriptFunction>(*node)) {
+ EditorNode::get_singleton()->show_warning(TTR("Can't copy the function node."));
return;
}
if (node.is_valid()) {
@@ -2941,13 +2934,13 @@ void VisualScriptEditor::_menu_option(int p_what) {
break;
if (clipboard->nodes.empty()) {
- EditorNode::get_singleton()->show_warning("Clipboard is empty!");
+ EditorNode::get_singleton()->show_warning(TTR("Clipboard is empty!"));
break;
}
Map<int, int> remap;
- undo_redo->create_action("Paste VisualScript Nodes");
+ undo_redo->create_action(TTR("Paste VisualScript Nodes"));
int idc = script->get_available_id() + 1;
Set<int> to_select;
@@ -3000,7 +2993,7 @@ void VisualScriptEditor::_menu_option(int p_what) {
undo_redo->commit_action();
for (int i = 0; i < graph->get_child_count(); i++) {
- GraphNode *gn = graph->get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i));
if (gn) {
int id = gn->get_name().operator String().to_int();
gn->set_selected(to_select.has(id));
@@ -3393,7 +3386,7 @@ VisualScriptEditor::~VisualScriptEditor() {
static ScriptEditorBase *create_editor(const Ref<Script> &p_script) {
- if (p_script->cast_to<VisualScript>()) {
+ if (Object::cast_to<VisualScript>(*p_script)) {
return memnew(VisualScriptEditor);
}
diff --git a/modules/visual_script/visual_script_editor.h b/modules/visual_script/visual_script_editor.h
index e68711a036..dd051ef8e4 100644
--- a/modules/visual_script/visual_script_editor.h
+++ b/modules/visual_script/visual_script_editor.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/visual_script/visual_script_expression.cpp b/modules/visual_script/visual_script_expression.cpp
index 25c2ebd6d2..d0e9b5bb86 100644
--- a/modules/visual_script/visual_script_expression.cpp
+++ b/modules/visual_script/visual_script_expression.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -1179,7 +1179,7 @@ VisualScriptExpression::ENode *VisualScriptExpression::_parse_expression() {
if (expression[next_op + 1].is_op) {
// this is not invalid and can really appear
// but it becomes invalid anyway because no binary op
- // can be followed by an unary op in a valid combination,
+ // can be followed by a unary op in a valid combination,
// due to how precedence works, unaries will always disappear first
_set_error("Unexpected two consecutive operators.");
diff --git a/modules/visual_script/visual_script_expression.h b/modules/visual_script/visual_script_expression.h
index 4a9f59ebc3..2636e79842 100644
--- a/modules/visual_script/visual_script_expression.h
+++ b/modules/visual_script/visual_script_expression.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp
index 77f3111d94..59d9540239 100644
--- a/modules/visual_script/visual_script_flow_control.cpp
+++ b/modules/visual_script/visual_script_flow_control.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/visual_script/visual_script_flow_control.h b/modules/visual_script/visual_script_flow_control.h
index d27fd47f84..380eb76c45 100644
--- a/modules/visual_script/visual_script_flow_control.h
+++ b/modules/visual_script/visual_script_flow_control.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/visual_script/visual_script_func_nodes.cpp b/modules/visual_script/visual_script_func_nodes.cpp
index 47cdfff494..5fcc5b0ad9 100644
--- a/modules/visual_script/visual_script_func_nodes.cpp
+++ b/modules/visual_script/visual_script_func_nodes.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -85,10 +85,7 @@ Node *VisualScriptFunctionCall::_get_base_node() const {
return NULL;
MainLoop *main_loop = OS::get_singleton()->get_main_loop();
- if (!main_loop)
- return NULL;
-
- SceneTree *scene_tree = main_loop->cast_to<SceneTree>();
+ SceneTree *scene_tree = Object::cast_to<SceneTree>(main_loop);
if (!scene_tree)
return NULL;
@@ -776,7 +773,7 @@ public:
if (!p_base)
return false;
- Node *node = p_base->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(p_base);
if (!node)
return false;
@@ -817,7 +814,7 @@ public:
} break;
case VisualScriptFunctionCall::CALL_MODE_NODE_PATH: {
- Node *node = instance->get_owner_ptr()->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(instance->get_owner_ptr());
if (!node) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Base object is not a Node!";
@@ -825,7 +822,7 @@ public:
}
Node *another = node->get_node(node_path);
- if (!node) {
+ if (!another) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Path does not lead Node!";
return 0;
@@ -961,10 +958,8 @@ Node *VisualScriptPropertySet::_get_base_node() const {
return NULL;
MainLoop *main_loop = OS::get_singleton()->get_main_loop();
- if (!main_loop)
- return NULL;
- SceneTree *scene_tree = main_loop->cast_to<SceneTree>();
+ SceneTree *scene_tree = Object::cast_to<SceneTree>(main_loop);
if (!scene_tree)
return NULL;
@@ -1159,9 +1154,7 @@ String VisualScriptPropertySet::get_base_script() const {
void VisualScriptPropertySet::_update_cache() {
- if (!OS::get_singleton()->get_main_loop())
- return;
- if (!OS::get_singleton()->get_main_loop()->cast_to<SceneTree>())
+ if (!Object::cast_to<SceneTree>(OS::get_singleton()->get_main_loop()))
return;
if (!Engine::get_singleton()->is_editor_hint()) //only update cache if editor exists, it's pointless otherwise
@@ -1595,7 +1588,7 @@ public:
} break;
case VisualScriptPropertySet::CALL_MODE_NODE_PATH: {
- Node *node = instance->get_owner_ptr()->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(instance->get_owner_ptr());
if (!node) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Base object is not a Node!";
@@ -1603,7 +1596,7 @@ public:
}
Node *another = node->get_node(node_path);
- if (!node) {
+ if (!another) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Path does not lead Node!";
return 0;
@@ -1730,10 +1723,8 @@ Node *VisualScriptPropertyGet::_get_base_node() const {
return NULL;
MainLoop *main_loop = OS::get_singleton()->get_main_loop();
- if (!main_loop)
- return NULL;
- SceneTree *scene_tree = main_loop->cast_to<SceneTree>();
+ SceneTree *scene_tree = Object::cast_to<SceneTree>(main_loop);
if (!scene_tree)
return NULL;
@@ -2242,7 +2233,7 @@ public:
} break;
case VisualScriptPropertyGet::CALL_MODE_NODE_PATH: {
- Node *node = instance->get_owner_ptr()->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(instance->get_owner_ptr());
if (!node) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = RTR("Base object is not a Node!");
@@ -2250,7 +2241,7 @@ public:
}
Node *another = node->get_node(node_path);
- if (!node) {
+ if (!another) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = RTR("Path does not lead Node!");
return 0;
diff --git a/modules/visual_script/visual_script_func_nodes.h b/modules/visual_script/visual_script_func_nodes.h
index 3b38d0d08f..a9a0bd083f 100644
--- a/modules/visual_script/visual_script_func_nodes.h
+++ b/modules/visual_script/visual_script_func_nodes.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp
index 15e25c99ee..1decc004ab 100644
--- a/modules/visual_script/visual_script_nodes.cpp
+++ b/modules/visual_script/visual_script_nodes.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -2079,7 +2079,7 @@ public:
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
- Node *node = instance->get_owner_ptr()->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(instance->get_owner_ptr());
if (!node) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Base object is not a Node!";
@@ -2087,7 +2087,7 @@ public:
}
Node *another = node->get_node(path);
- if (!node) {
+ if (!another) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Path does not lead Node!";
return 0;
@@ -2143,10 +2143,7 @@ VisualScriptSceneNode::TypeGuess VisualScriptSceneNode::guess_output_type(TypeGu
return tg;
MainLoop *main_loop = OS::get_singleton()->get_main_loop();
- if (!main_loop)
- return tg;
-
- SceneTree *scene_tree = main_loop->cast_to<SceneTree>();
+ SceneTree *scene_tree = Object::cast_to<SceneTree>(main_loop);
if (!scene_tree)
return tg;
@@ -2181,10 +2178,7 @@ void VisualScriptSceneNode::_validate_property(PropertyInfo &property) const {
return;
MainLoop *main_loop = OS::get_singleton()->get_main_loop();
- if (!main_loop)
- return;
-
- SceneTree *scene_tree = main_loop->cast_to<SceneTree>();
+ SceneTree *scene_tree = Object::cast_to<SceneTree>(main_loop);
if (!scene_tree)
return;
@@ -2274,7 +2268,7 @@ public:
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) {
- Node *node = instance->get_owner_ptr()->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(instance->get_owner_ptr());
if (!node) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Base object is not a Node!";
@@ -2708,7 +2702,10 @@ void VisualScriptCustomNode::_bind_methods() {
BIND_VMETHOD(MethodInfo(Variant::STRING, "_get_category"));
BIND_VMETHOD(MethodInfo(Variant::INT, "_get_working_memory_size"));
- BIND_VMETHOD(MethodInfo(Variant::NIL, "_step:Variant", PropertyInfo(Variant::ARRAY, "inputs"), PropertyInfo(Variant::ARRAY, "outputs"), PropertyInfo(Variant::INT, "start_mode"), PropertyInfo(Variant::ARRAY, "working_mem")));
+
+ MethodInfo stepmi(Variant::NIL, "_step", PropertyInfo(Variant::ARRAY, "inputs"), PropertyInfo(Variant::ARRAY, "outputs"), PropertyInfo(Variant::INT, "start_mode"), PropertyInfo(Variant::ARRAY, "working_mem"));
+ stepmi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
+ BIND_VMETHOD(stepmi);
ClassDB::bind_method(D_METHOD("_script_changed"), &VisualScriptCustomNode::_script_changed);
@@ -2845,7 +2842,9 @@ VisualScriptNodeInstance *VisualScriptSubCall::instance(VisualScriptInstance *p_
void VisualScriptSubCall::_bind_methods() {
- BIND_VMETHOD(MethodInfo(Variant::NIL, "_subcall:Variant", PropertyInfo(Variant::NIL, "arguments:Variant")));
+ MethodInfo scmi(Variant::NIL, "_subcall", PropertyInfo(Variant::NIL, "arguments"));
+ scmi.return_val.usage |= PROPERTY_USAGE_NIL_IS_VARIANT;
+ BIND_VMETHOD(scmi);
}
VisualScriptSubCall::VisualScriptSubCall() {
diff --git a/modules/visual_script/visual_script_nodes.h b/modules/visual_script/visual_script_nodes.h
index b5df761e7d..421409b265 100644
--- a/modules/visual_script/visual_script_nodes.h
+++ b/modules/visual_script/visual_script_nodes.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* visual_script_nodes.h */
+/* visual_script_nodes.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/visual_script/visual_script_yield_nodes.cpp b/modules/visual_script/visual_script_yield_nodes.cpp
index df88d2e7f7..b6d4021ca3 100644
--- a/modules/visual_script/visual_script_yield_nodes.cpp
+++ b/modules/visual_script/visual_script_yield_nodes.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -105,7 +105,7 @@ public:
} else {
//yield
- SceneTree *tree = OS::get_singleton()->get_main_loop()->cast_to<SceneTree>();
+ SceneTree *tree = Object::cast_to<SceneTree>(OS::get_singleton()->get_main_loop());
if (!tree) {
r_error_str = "Main Loop is not SceneTree";
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
@@ -252,10 +252,7 @@ Node *VisualScriptYieldSignal::_get_base_node() const {
return NULL;
MainLoop *main_loop = OS::get_singleton()->get_main_loop();
- if (!main_loop)
- return NULL;
-
- SceneTree *scene_tree = main_loop->cast_to<SceneTree>();
+ SceneTree *scene_tree = Object::cast_to<SceneTree>(main_loop);
if (!scene_tree)
return NULL;
@@ -519,7 +516,7 @@ public:
} else {
//yield
- Object *object;
+ Object *object = NULL;
switch (call_mode) {
@@ -530,7 +527,7 @@ public:
} break;
case VisualScriptYieldSignal::CALL_MODE_NODE_PATH: {
- Node *node = instance->get_owner_ptr()->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(instance->get_owner_ptr());
if (!node) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Base object is not a Node!";
@@ -538,7 +535,7 @@ public:
}
Node *another = node->get_node(node_path);
- if (!node) {
+ if (!another) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD;
r_error_str = "Path does not lead Node!";
return 0;
diff --git a/modules/visual_script/visual_script_yield_nodes.h b/modules/visual_script/visual_script_yield_nodes.h
index 638b7b5b41..d074962471 100644
--- a/modules/visual_script/visual_script_yield_nodes.h
+++ b/modules/visual_script/visual_script_yield_nodes.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp
index 1b10637fdc..6389c286c2 100644
--- a/modules/vorbis/audio_stream_ogg_vorbis.cpp
+++ b/modules/vorbis/audio_stream_ogg_vorbis.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/vorbis/audio_stream_ogg_vorbis.h b/modules/vorbis/audio_stream_ogg_vorbis.h
index 519ceaaea1..03b3726b52 100644
--- a/modules/vorbis/audio_stream_ogg_vorbis.h
+++ b/modules/vorbis/audio_stream_ogg_vorbis.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/vorbis/register_types.cpp b/modules/vorbis/register_types.cpp
index d9865072b9..270a58e7fe 100644
--- a/modules/vorbis/register_types.cpp
+++ b/modules/vorbis/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/vorbis/register_types.h b/modules/vorbis/register_types.h
index e7cde7a66c..db317e9f6a 100644
--- a/modules/vorbis/register_types.h
+++ b/modules/vorbis/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/webm/register_types.cpp b/modules/webm/register_types.cpp
index c234f81097..892d1b8420 100644
--- a/modules/webm/register_types.cpp
+++ b/modules/webm/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/webm/register_types.h b/modules/webm/register_types.h
index cf412e601e..94ff7de739 100644
--- a/modules/webm/register_types.h
+++ b/modules/webm/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/webm/video_stream_webm.cpp b/modules/webm/video_stream_webm.cpp
index 72f10b4f45..0178ebab84 100644
--- a/modules/webm/video_stream_webm.cpp
+++ b/modules/webm/video_stream_webm.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* av_stream_webm.cpp.cpp */
+/* video_stream_webm.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/webm/video_stream_webm.h b/modules/webm/video_stream_webm.h
index b2e88347aa..9a331849be 100644
--- a/modules/webm/video_stream_webm.h
+++ b/modules/webm/video_stream_webm.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* av_stream_webm.cpp.cpp */
+/* video_stream_webm.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/webp/image_loader_webp.cpp b/modules/webp/image_loader_webp.cpp
index 4ffcdefbe9..8fe2db9e27 100644
--- a/modules/webp/image_loader_webp.cpp
+++ b/modules/webp/image_loader_webp.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/webp/image_loader_webp.h b/modules/webp/image_loader_webp.h
index b8c5933512..f7ef210458 100644
--- a/modules/webp/image_loader_webp.h
+++ b/modules/webp/image_loader_webp.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/webp/register_types.cpp b/modules/webp/register_types.cpp
index 6e29986740..95e5cd105d 100644
--- a/modules/webp/register_types.cpp
+++ b/modules/webp/register_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/modules/webp/register_types.h b/modules/webp/register_types.h
index d0aa148079..7ec926c572 100644
--- a/modules/webp/register_types.h
+++ b/modules/webp/register_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/SCsub b/platform/android/SCsub
index b124a1a5a8..87e7ee4747 100644
--- a/platform/android/SCsub
+++ b/platform/android/SCsub
@@ -1,6 +1,7 @@
#!/usr/bin/env python
import shutil
+from compat import open_utf8
Import('env')
@@ -40,8 +41,8 @@ prog = None
abspath = env.Dir(".").abspath
-gradle_basein = open(abspath + "/build.gradle.template", "rb")
-gradle_baseout = open(abspath + "/java/build.gradle", "wb")
+gradle_basein = open_utf8(abspath + "/build.gradle.template", "r")
+gradle_baseout = open_utf8(abspath + "/java/build.gradle", "w")
gradle_text = gradle_basein.read()
@@ -124,8 +125,8 @@ gradle_baseout.write(gradle_text)
gradle_baseout.close()
-pp_basein = open(abspath + "/AndroidManifest.xml.template", "rb")
-pp_baseout = open(abspath + "/java/AndroidManifest.xml", "wb")
+pp_basein = open_utf8(abspath + "/AndroidManifest.xml.template", "r")
+pp_baseout = open_utf8(abspath + "/java/AndroidManifest.xml", "w")
manifest = pp_basein.read()
manifest = manifest.replace("$$ADD_APPLICATION_CHUNKS$$", env.android_manifest_chunk)
manifest = manifest.replace("$$ADD_PERMISSION_CHUNKS$$", env.android_permission_chunk)
@@ -146,7 +147,7 @@ elif env['android_arch'] == 'arm64v8':
elif env['android_arch'] == 'x86':
lib_arch_dir = 'x86'
else:
- print 'WARN: Architecture not suitable for embedding into APK; keeping .so at \\bin'
+ print('WARN: Architecture not suitable for embedding into APK; keeping .so at \\bin')
if lib_arch_dir != '':
if env['target'] == 'release':
diff --git a/platform/android/audio_driver_jandroid.cpp b/platform/android/audio_driver_jandroid.cpp
index ec09fda429..4a3bdd877d 100644
--- a/platform/android/audio_driver_jandroid.cpp
+++ b/platform/android/audio_driver_jandroid.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/audio_driver_jandroid.h b/platform/android/audio_driver_jandroid.h
index 3697ca6f21..8135641a62 100644
--- a/platform/android/audio_driver_jandroid.h
+++ b/platform/android/audio_driver_jandroid.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/audio_driver_opensl.cpp b/platform/android/audio_driver_opensl.cpp
index acd94d2bdd..9ebed84ace 100644
--- a/platform/android/audio_driver_opensl.cpp
+++ b/platform/android/audio_driver_opensl.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* audio_driver_opensl.cpp */
+/* audio_driver_opensl.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -75,29 +75,10 @@ void AudioDriverOpenSL::_buffer_callback(
}
(*queueItf)->Enqueue(queueItf, ptr, 4 * buffer_size);
-
-#if 0
- SLresult res;
- CallbackCntxt *pCntxt = (CallbackCntxt*)pContext;
- if(pCntxt->pData < (pCntxt->pDataBase + pCntxt->size))
- {
- res = (*queueItf)->Enqueue(queueItf, (void*) pCntxt->pData,
- 2 * AUDIO_DATA_BUFFER_SIZE, SL_BOOLEAN_FALSE); /* Size given
- in bytes. */
- CheckErr(res);
- /* Increase data pointer by buffer size */
- pCntxt->pData += AUDIO_DATA_BUFFER_SIZE;
- }
- }
-#endif
}
void AudioDriverOpenSL::_buffer_callbacks(
SLAndroidSimpleBufferQueueItf queueItf,
- /*SLuint32 eventFlags,
- const void * pBuffer,
- SLuint32 bufferSize,
- SLuint32 dataUsed,*/
void *pContext) {
AudioDriverOpenSL *ad = (AudioDriverOpenSL *)pContext;
@@ -113,65 +94,6 @@ const char *AudioDriverOpenSL::get_name() const {
return "Android";
}
-#if 0
-int AudioDriverOpenSL::thread_func(SceSize args, void *argp) {
-
- AudioDriverOpenSL* ad = s_ad;
- sceAudioOutput2Reserve(AUDIO_OUTPUT_SAMPLE);
-
- int half=0;
- while(!ad->exit_thread) {
-
- int16_t *ptr = &ad->outbuff[AUDIO_OUTPUT_SAMPLE*2*half];
-
-
-
- if (!ad->active) {
-
- for(int i=0;i<AUDIO_OUTPUT_SAMPLE*2;i++) {
- ptr[i]=0;
- }
-
- } else {
-
- //printf("samples: %i\n",AUDIO_OUTPUT_SAMPLE);
- ad->lock();
-
- ad->audio_server_process(AUDIO_OUTPUT_SAMPLE,ad->outbuff_32);
-
- ad->unlock();
-
- const int32_t* src_buff=ad->outbuff_32;
-
- for(int i=0;i<AUDIO_OUTPUT_SAMPLE*2;i++) {
-
- ptr[i]=src_buff[i]>>16;
- }
- }
-
-
- /* Output 16-bit PCM STEREO data that is in pcmBuf without changing the volume */
- sceAudioOutput2OutputBlocking(
- SCE_AUDIO_VOLUME_0dB*3, //0db at 0x8000, that's obvious
- ptr
- );
-
- if (half)
- half=0;
- else
- half=1;
-
- }
-
- sceAudioOutput2Release();
-
- sceKernelExitThread(SCE_KERNEL_EXIT_SUCCESS);
- ad->thread_exited=true;
- return SCE_KERNEL_EXIT_SUCCESS;
-
-}
-
-#endif
Error AudioDriverOpenSL::init() {
SLresult
@@ -228,29 +150,12 @@ void AudioDriverOpenSL::start() {
SLboolean required[MAX_NUMBER_INTERFACES];
SLInterfaceID iidArray[MAX_NUMBER_INTERFACES];
-#if 0
-
- for (int i=0; i<MAX_NUMBER_INTERFACES; i++)
- {
- required[i] = SL_BOOLEAN_FALSE;
- iidArray[i] = SL_IID_NULL;
- }
- // Set arrays required[] and iidArray[] for VOLUME interface
- required[0] = SL_BOOLEAN_TRUE;
- iidArray[0] = SL_IID_VOLUME;
-
- // Create Output Mix object to be used by player
- res = (*EngineItf)->CreateOutputMix(EngineItf, &OutputMix, 1,
- iidArray, required);
-#else
-
{
const SLInterfaceID ids[1] = { SL_IID_ENVIRONMENTALREVERB };
const SLboolean req[1] = { SL_BOOLEAN_FALSE };
res = (*EngineItf)->CreateOutputMix(EngineItf, &OutputMix, 0, ids, req);
}
-#endif
ERR_FAIL_COND(res != SL_RESULT_SUCCESS);
// Realizing the Output Mix object in synchronous mode.
res = (*OutputMix)->Realize(OutputMix, SL_BOOLEAN_FALSE);
@@ -308,44 +213,18 @@ void AudioDriverOpenSL::start() {
/* Setup to receive buffer queue event callbacks */
res = (*bufferQueueItf)->RegisterCallback(bufferQueueItf, _buffer_callbacks, this);
ERR_FAIL_COND(res != SL_RESULT_SUCCESS);
-/* Before we start set volume to -3dB (-300mB) */
-#if 0
- res = (*OutputMix)->GetInterface(OutputMix, SL_IID_VOLUME,
- (void*)&volumeItf);
- ERR_FAIL_COND( res !=SL_RESULT_SUCCESS );
- /* Setup the data source structure for the buffer queue */
-
- res = (*volumeItf)->SetVolumeLevel(volumeItf, -300);
- ERR_FAIL_COND( res !=SL_RESULT_SUCCESS );
-#endif
+
last_free = 0;
-#if 1
+
//fill up buffers
for (int i = 0; i < BUFFER_COUNT; i++) {
/* Enqueue a few buffers to get the ball rolling */
res = (*bufferQueueItf)->Enqueue(bufferQueueItf, buffers[i], 4 * buffer_size); /* Size given in */
}
-#endif
res = (*playItf)->SetPlayState(playItf, SL_PLAYSTATE_PLAYING);
ERR_FAIL_COND(res != SL_RESULT_SUCCESS);
-#if 0
- res = (*bufferQueueItf)->GetState(bufferQueueItf, &state);
- ERR_FAIL_COND( res !=SL_RESULT_SUCCESS );
- while(state.count)
- {
- (*bufferQueueItf)->GetState(bufferQueueItf, &state);
- }
- /* Make sure player is stopped */
- res = (*playItf)->SetPlayState(playItf, SL_PLAYSTATE_STOPPED);
- CheckErr(res);
- /* Destroy the player */
- (*player)->Destroy(player);
- /* Destroy Output Mix object */
- (*OutputMix)->Destroy(OutputMix);
-#endif
-
active = true;
}
diff --git a/platform/android/audio_driver_opensl.h b/platform/android/audio_driver_opensl.h
index f6270a3084..b505c5fe8a 100644
--- a/platform/android/audio_driver_opensl.h
+++ b/platform/android/audio_driver_opensl.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/detect.py b/platform/android/detect.py
index ad5bfb4949..c1ac54c587 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -14,7 +14,7 @@ def get_name():
def can_build():
- return (os.environ.has_key("ANDROID_NDK_ROOT"))
+ return ("ANDROID_NDK_ROOT" in os.environ)
def get_opts():
@@ -55,7 +55,7 @@ def configure(env):
import subprocess
def mySubProcess(cmdline, env):
- # print "SPAWNED : " + cmdline
+ # print("SPAWNED : " + cmdline)
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
@@ -63,9 +63,9 @@ def configure(env):
data, err = proc.communicate()
rv = proc.wait()
if rv:
- print "====="
- print err
- print "====="
+ print("=====")
+ print(err)
+ print("=====")
return rv
def mySpawn(sh, escape, cmd, args, env):
@@ -183,8 +183,8 @@ def configure(env):
## Compile flags
env.Append(CPPFLAGS=["-isystem", sysroot + "/usr/include"])
- env.Append(CPPFLAGS=string.split('-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -fvisibility=hidden -fno-strict-aliasing'))
- env.Append(CPPFLAGS=string.split('-DNO_STATVFS -DGLES2_ENABLED'))
+ env.Append(CPPFLAGS='-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -fvisibility=hidden -fno-strict-aliasing'.split())
+ env.Append(CPPFLAGS='-DNO_STATVFS -DGLES2_ENABLED'.split())
env['neon_enabled'] = False
if env['android_arch'] == 'x86':
@@ -194,11 +194,11 @@ def configure(env):
elif env["android_arch"] == "armv6":
target_opts = ['-target', 'armv6-none-linux-androideabi']
- env.Append(CPPFLAGS=string.split('-D__ARM_ARCH_6__ -march=armv6 -mfpu=vfp -mfloat-abi=softfp'))
+ env.Append(CPPFLAGS='-D__ARM_ARCH_6__ -march=armv6 -mfpu=vfp -mfloat-abi=softfp'.split())
elif env["android_arch"] == "armv7":
target_opts = ['-target', 'armv7-none-linux-androideabi']
- env.Append(CPPFLAGS=string.split('-D__ARM_ARCH_7__ -D__ARM_ARCH_7A__ -march=armv7-a -mfloat-abi=softfp'))
+ env.Append(CPPFLAGS='-D__ARM_ARCH_7__ -D__ARM_ARCH_7A__ -march=armv7-a -mfloat-abi=softfp'.split())
if env['android_neon'] == 'yes':
env['neon_enabled'] = True
env.Append(CPPFLAGS=['-mfpu=neon', '-D__ARM_NEON__'])
@@ -225,9 +225,9 @@ def configure(env):
env['LINKFLAGS'] = ['-shared', '--sysroot=' + sysroot, '-Wl,--warn-shared-textrel']
if env["android_arch"] == "armv7":
- env.Append(LINKFLAGS=string.split('-Wl,--fix-cortex-a8'))
- env.Append(LINKFLAGS=string.split('-Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now'))
- env.Append(LINKFLAGS=string.split('-Wl,-soname,libgodot_android.so -Wl,--gc-sections'))
+ env.Append(LINKFLAGS='-Wl,--fix-cortex-a8'.split())
+ env.Append(LINKFLAGS='-Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now'.split())
+ env.Append(LINKFLAGS='-Wl,-soname,libgodot_android.so -Wl,--gc-sections'.split())
if mt_link:
env.Append(LINKFLAGS=['-Wl,--threads'])
env.Append(LINKFLAGS=target_opts)
@@ -240,7 +240,7 @@ def configure(env):
env.Append(CPPPATH=['#platform/android'])
env.Append(CPPFLAGS=['-DANDROID_ENABLED', '-DUNIX_ENABLED', '-DNO_FCNTL', '-DMPC_FIXED_POINT'])
- env.Append(LIBS=['OpenSLES', 'EGL', 'GLESv3', 'android', 'log', 'z'])
+ env.Append(LIBS=['OpenSLES', 'EGL', 'GLESv3', 'android', 'log', 'z', 'dl'])
# TODO: Move that to opus module's config
if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"):
diff --git a/platform/android/dir_access_android.cpp b/platform/android/dir_access_android.cpp
index 67aa7750cd..9653a585b1 100644
--- a/platform/android/dir_access_android.cpp
+++ b/platform/android/dir_access_android.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/dir_access_android.h b/platform/android/dir_access_android.h
index 32986f524b..2f63befc32 100644
--- a/platform/android/dir_access_android.h
+++ b/platform/android/dir_access_android.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/dir_access_jandroid.cpp b/platform/android/dir_access_jandroid.cpp
index 34f4afa331..26e4684056 100644
--- a/platform/android/dir_access_jandroid.cpp
+++ b/platform/android/dir_access_jandroid.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/dir_access_jandroid.h b/platform/android/dir_access_jandroid.h
index 21d1f697b7..ad89be3581 100644
--- a/platform/android/dir_access_jandroid.h
+++ b/platform/android/dir_access_jandroid.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index ada7df887c..d691bd7629 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "export.h"
+
#include "editor/editor_export.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
@@ -39,1865 +40,8 @@
#include "platform/android/run_icon.gen.h"
#include "project_settings.h"
#include "version.h"
-#include <string.h>
-#if 0
-
-static const char* android_perms[]={
-"ACCESS_CHECKIN_PROPERTIES",
-"ACCESS_COARSE_LOCATION",
-"ACCESS_FINE_LOCATION",
-"ACCESS_LOCATION_EXTRA_COMMANDS",
-"ACCESS_MOCK_LOCATION",
-"ACCESS_NETWORK_STATE",
-"ACCESS_SURFACE_FLINGER",
-"ACCESS_WIFI_STATE",
-"ACCOUNT_MANAGER",
-"ADD_VOICEMAIL",
-"AUTHENTICATE_ACCOUNTS",
-"BATTERY_STATS",
-"BIND_ACCESSIBILITY_SERVICE",
-"BIND_APPWIDGET",
-"BIND_DEVICE_ADMIN",
-"BIND_INPUT_METHOD",
-"BIND_NFC_SERVICE",
-"BIND_NOTIFICATION_LISTENER_SERVICE",
-"BIND_PRINT_SERVICE",
-"BIND_REMOTEVIEWS",
-"BIND_TEXT_SERVICE",
-"BIND_VPN_SERVICE",
-"BIND_WALLPAPER",
-"BLUETOOTH",
-"BLUETOOTH_ADMIN",
-"BLUETOOTH_PRIVILEGED",
-"BRICK",
-"BROADCAST_PACKAGE_REMOVED",
-"BROADCAST_SMS",
-"BROADCAST_STICKY",
-"BROADCAST_WAP_PUSH",
-"CALL_PHONE",
-"CALL_PRIVILEGED",
-"CAMERA",
-"CAPTURE_AUDIO_OUTPUT",
-"CAPTURE_SECURE_VIDEO_OUTPUT",
-"CAPTURE_VIDEO_OUTPUT",
-"CHANGE_COMPONENT_ENABLED_STATE",
-"CHANGE_CONFIGURATION",
-"CHANGE_NETWORK_STATE",
-"CHANGE_WIFI_MULTICAST_STATE",
-"CHANGE_WIFI_STATE",
-"CLEAR_APP_CACHE",
-"CLEAR_APP_USER_DATA",
-"CONTROL_LOCATION_UPDATES",
-"DELETE_CACHE_FILES",
-"DELETE_PACKAGES",
-"DEVICE_POWER",
-"DIAGNOSTIC",
-"DISABLE_KEYGUARD",
-"DUMP",
-"EXPAND_STATUS_BAR",
-"FACTORY_TEST",
-"FLASHLIGHT",
-"FORCE_BACK",
-"GET_ACCOUNTS",
-"GET_PACKAGE_SIZE",
-"GET_TASKS",
-"GET_TOP_ACTIVITY_INFO",
-"GLOBAL_SEARCH",
-"HARDWARE_TEST",
-"INJECT_EVENTS",
-"INSTALL_LOCATION_PROVIDER",
-"INSTALL_PACKAGES",
-"INSTALL_SHORTCUT",
-"INTERNAL_SYSTEM_WINDOW",
-"INTERNET",
-"KILL_BACKGROUND_PROCESSES",
-"LOCATION_HARDWARE",
-"MANAGE_ACCOUNTS",
-"MANAGE_APP_TOKENS",
-"MANAGE_DOCUMENTS",
-"MASTER_CLEAR",
-"MEDIA_CONTENT_CONTROL",
-"MODIFY_AUDIO_SETTINGS",
-"MODIFY_PHONE_STATE",
-"MOUNT_FORMAT_FILESYSTEMS",
-"MOUNT_UNMOUNT_FILESYSTEMS",
-"NFC",
-"PERSISTENT_ACTIVITY",
-"PROCESS_OUTGOING_CALLS",
-"READ_CALENDAR",
-"READ_CALL_LOG",
-"READ_CONTACTS",
-"READ_EXTERNAL_STORAGE",
-"READ_FRAME_BUFFER",
-"READ_HISTORY_BOOKMARKS",
-"READ_INPUT_STATE",
-"READ_LOGS",
-"READ_PHONE_STATE",
-"READ_PROFILE",
-"READ_SMS",
-"READ_SOCIAL_STREAM",
-"READ_SYNC_SETTINGS",
-"READ_SYNC_STATS",
-"READ_USER_DICTIONARY",
-"REBOOT",
-"RECEIVE_BOOT_COMPLETED",
-"RECEIVE_MMS",
-"RECEIVE_SMS",
-"RECEIVE_WAP_PUSH",
-"RECORD_AUDIO",
-"REORDER_TASKS",
-"RESTART_PACKAGES",
-"SEND_RESPOND_VIA_MESSAGE",
-"SEND_SMS",
-"SET_ACTIVITY_WATCHER",
-"SET_ALARM",
-"SET_ALWAYS_FINISH",
-"SET_ANIMATION_SCALE",
-"SET_DEBUG_APP",
-"SET_ORIENTATION",
-"SET_POINTER_SPEED",
-"SET_PREFERRED_APPLICATIONS",
-"SET_PROCESS_LIMIT",
-"SET_TIME",
-"SET_TIME_ZONE",
-"SET_WALLPAPER",
-"SET_WALLPAPER_HINTS",
-"SIGNAL_PERSISTENT_PROCESSES",
-"STATUS_BAR",
-"SUBSCRIBED_FEEDS_READ",
-"SUBSCRIBED_FEEDS_WRITE",
-"SYSTEM_ALERT_WINDOW",
-"TRANSMIT_IR",
-"UNINSTALL_SHORTCUT",
-"UPDATE_DEVICE_STATS",
-"USE_CREDENTIALS",
-"USE_SIP",
-"VIBRATE",
-"WAKE_LOCK",
-"WRITE_APN_SETTINGS",
-"WRITE_CALENDAR",
-"WRITE_CALL_LOG",
-"WRITE_CONTACTS",
-"WRITE_EXTERNAL_STORAGE",
-"WRITE_GSERVICES",
-"WRITE_HISTORY_BOOKMARKS",
-"WRITE_PROFILE",
-"WRITE_SECURE_SETTINGS",
-"WRITE_SETTINGS",
-"WRITE_SMS",
-"WRITE_SOCIAL_STREAM",
-"WRITE_SYNC_SETTINGS",
-"WRITE_USER_DICTIONARY",
-NULL};
-
-class EditorExportPlatformAndroid : public EditorExportPlatform {
-
- GDCLASS( EditorExportPlatformAndroid,EditorExportPlatform );
-
-
- enum {
- MAX_USER_PERMISSIONS=20,
- SCREEN_SMALL=0,
- SCREEN_NORMAL=1,
- SCREEN_LARGE=2,
- SCREEN_XLARGE=3,
- SCREEN_MAX=4
- };
-
- String custom_release_package;
- String custom_debug_package;
-
- int version_code;
- String version_name;
- String package;
- String name;
- String icon;
- String cmdline;
- bool _signed;
- bool apk_expansion;
- bool remove_prev;
- bool use_32_fb;
- bool immersive;
- bool export_arm;
- bool export_arm64;
- bool export_x86;
- String apk_expansion_salt;
- String apk_expansion_pkey;
- int orientation;
-
- String release_keystore;
- String release_password;
- String release_username;
-
- struct APKExportData {
-
- zipFile apk;
- EditorProgress *ep;
- };
-
- struct Device {
-
- String id;
- String name;
- String description;
- };
-
- Vector<Device> devices;
- bool devices_changed;
- Mutex *device_lock;
- Thread *device_thread;
- Ref<ImageTexture> logo;
-
- Set<String> perms;
- String user_perms[MAX_USER_PERMISSIONS];
- bool screen_support[SCREEN_MAX];
-
- volatile bool quit_request;
-
-
- static void _device_poll_thread(void *ud);
-
- String get_package_name();
-
- String get_project_name() const;
- void _fix_manifest(Vector<uint8_t>& p_manifest, bool p_give_internet);
- void _fix_resources(Vector<uint8_t>& p_manifest);
- static Error save_apk_file(void *p_userdata,const String& p_path, const Vector<uint8_t>& p_data,int p_file,int p_total);
- static bool _should_compress_asset(const String& p_path, const Vector<uint8_t>& p_data);
-
-protected:
-
- bool _set(const StringName& p_name, const Variant& p_value);
- bool _get(const StringName& p_name,Variant &r_ret) const;
- void _get_property_list( List<PropertyInfo> *p_list) const;
-
-public:
-
- virtual String get_name() const { return "Android"; }
- virtual ImageCompression get_image_compression() const { return IMAGE_COMPRESSION_ETC1; }
- virtual Ref<Texture> get_logo() const { return logo; }
-
-
- virtual bool poll_devices();
- virtual int get_device_count() const;
- virtual String get_device_name(int p_device) const;
- virtual String get_device_info(int p_device) const;
- virtual Error run(int p_device,int p_flags=0);
-
- virtual bool requires_password(bool p_debug) const { return !p_debug; }
- virtual String get_binary_extension() const { return "apk"; }
- virtual Error export_project(const String& p_path, bool p_debug, int p_flags=0);
-
- virtual bool can_export(String *r_error=NULL) const;
-
- EditorExportPlatformAndroid();
- ~EditorExportPlatformAndroid();
-};
-
-bool EditorExportPlatformAndroid::_set(const StringName& p_name, const Variant& p_value) {
-
- String n=p_name;
-
- if (n=="one_click_deploy/clear_previous_install")
- remove_prev=p_value;
- else if (n=="custom_package/debug")
- custom_debug_package=p_value;
- else if (n=="custom_package/release")
- custom_release_package=p_value;
- else if (n=="version/code")
- version_code=p_value;
- else if (n=="version/name")
- version_name=p_value;
- else if (n=="command_line/extra_args")
- cmdline=p_value;
- else if (n=="package/unique_name")
- package=p_value;
- else if (n=="package/name")
- name=p_value;
- else if (n=="package/icon")
- icon=p_value;
- else if (n=="package/signed")
- _signed=p_value;
- else if (n=="architecture/arm")
- export_arm=p_value;
- else if (n=="architecture/arm64")
- export_arm64=p_value;
- else if (n=="architecture/x86")
- export_x86=p_value;
- else if (n=="screen/use_32_bits_view")
- use_32_fb=p_value;
- else if (n=="screen/immersive_mode")
- immersive=p_value;
- else if (n=="screen/orientation")
- orientation=p_value;
- else if (n=="screen/support_small")
- screen_support[SCREEN_SMALL]=p_value;
- else if (n=="screen/support_normal")
- screen_support[SCREEN_NORMAL]=p_value;
- else if (n=="screen/support_large")
- screen_support[SCREEN_LARGE]=p_value;
- else if (n=="screen/support_xlarge")
- screen_support[SCREEN_XLARGE]=p_value;
- else if (n=="keystore/release")
- release_keystore=p_value;
- else if (n=="keystore/release_user")
- release_username=p_value;
- else if (n=="keystore/release_password")
- release_password=p_value;
- else if (n=="apk_expansion/enable")
- apk_expansion=p_value;
- else if (n=="apk_expansion/SALT")
- apk_expansion_salt=p_value;
- else if (n=="apk_expansion/public_key")
- apk_expansion_pkey=p_value;
- else if (n.begins_with("permissions/")) {
-
- String what = n.get_slicec('/',1).to_upper();
- bool state = p_value;
- if (state)
- perms.insert(what);
- else
- perms.erase(what);
- } else if (n.begins_with("user_permissions/")) {
-
- int which = n.get_slicec('/',1).to_int();
- ERR_FAIL_INDEX_V(which,MAX_USER_PERMISSIONS,false);
- user_perms[which]=p_value;
-
- } else
- return false;
-
- return true;
-}
-
-bool EditorExportPlatformAndroid::_get(const StringName& p_name,Variant &r_ret) const{
-
- String n=p_name;
- if (n=="one_click_deploy/clear_previous_install")
- r_ret=remove_prev;
- else if (n=="custom_package/debug")
- r_ret=custom_debug_package;
- else if (n=="custom_package/release")
- r_ret=custom_release_package;
- else if (n=="version/code")
- r_ret=version_code;
- else if (n=="version/name")
- r_ret=version_name;
- else if (n=="command_line/extra_args")
- r_ret=cmdline;
- else if (n=="package/unique_name")
- r_ret=package;
- else if (n=="package/name")
- r_ret=name;
- else if (n=="package/icon")
- r_ret=icon;
- else if (n=="package/signed")
- r_ret=_signed;
- else if (n=="architecture/arm")
- r_ret=export_arm;
- else if (n=="architecture/arm64")
- r_ret=export_arm64;
- else if (n=="architecture/x86")
- r_ret=export_x86;
- else if (n=="screen/use_32_bits_view")
- r_ret=use_32_fb;
- else if (n=="screen/immersive_mode")
- r_ret=immersive;
- else if (n=="screen/orientation")
- r_ret=orientation;
- else if (n=="screen/support_small")
- r_ret=screen_support[SCREEN_SMALL];
- else if (n=="screen/support_normal")
- r_ret=screen_support[SCREEN_NORMAL];
- else if (n=="screen/support_large")
- r_ret=screen_support[SCREEN_LARGE];
- else if (n=="screen/support_xlarge")
- r_ret=screen_support[SCREEN_XLARGE];
- else if (n=="keystore/release")
- r_ret=release_keystore;
- else if (n=="keystore/release_user")
- r_ret=release_username;
- else if (n=="keystore/release_password")
- r_ret=release_password;
- else if (n=="apk_expansion/enable")
- r_ret=apk_expansion;
- else if (n=="apk_expansion/SALT")
- r_ret=apk_expansion_salt;
- else if (n=="apk_expansion/public_key")
- r_ret=apk_expansion_pkey;
- else if (n.begins_with("permissions/")) {
-
- String what = n.get_slicec('/',1).to_upper();
- r_ret = perms.has(what);
- } else if (n.begins_with("user_permissions/")) {
-
- int which = n.get_slicec('/',1).to_int();
- ERR_FAIL_INDEX_V(which,MAX_USER_PERMISSIONS,false);
- r_ret=user_perms[which];
- } else
- return false;
-
- return true;
-}
-
-void EditorExportPlatformAndroid::_get_property_list( List<PropertyInfo> *p_list) const{
-
- p_list->push_back( PropertyInfo( Variant::BOOL, "one_click_deploy/clear_previous_install"));
- p_list->push_back( PropertyInfo( Variant::STRING, "custom_package/debug", PROPERTY_HINT_GLOBAL_FILE,"apk"));
- p_list->push_back( PropertyInfo( Variant::STRING, "custom_package/release", PROPERTY_HINT_GLOBAL_FILE,"apk"));
- p_list->push_back( PropertyInfo( Variant::STRING, "command_line/extra_args"));
- p_list->push_back( PropertyInfo( Variant::INT, "version/code", PROPERTY_HINT_RANGE,"1,65535,1"));
- p_list->push_back( PropertyInfo( Variant::STRING, "version/name") );
- p_list->push_back( PropertyInfo( Variant::STRING, "package/unique_name") );
- p_list->push_back( PropertyInfo( Variant::STRING, "package/name") );
- p_list->push_back( PropertyInfo( Variant::STRING, "package/icon",PROPERTY_HINT_FILE,"png") );
- p_list->push_back( PropertyInfo( Variant::BOOL, "package/signed") );
- p_list->push_back( PropertyInfo( Variant::BOOL, "architecture/arm") );
- p_list->push_back( PropertyInfo( Variant::BOOL, "architecture/x86") );
- p_list->push_back( PropertyInfo( Variant::BOOL, "screen/use_32_bits_view") );
- p_list->push_back( PropertyInfo( Variant::BOOL, "screen/immersive_mode") );
- p_list->push_back( PropertyInfo( Variant::INT, "screen/orientation",PROPERTY_HINT_ENUM,"Landscape,Portrait") );
- p_list->push_back( PropertyInfo( Variant::BOOL, "screen/support_small") );
- p_list->push_back( PropertyInfo( Variant::BOOL, "screen/support_normal") );
- p_list->push_back( PropertyInfo( Variant::BOOL, "screen/support_large") );
- p_list->push_back( PropertyInfo( Variant::BOOL, "screen/support_xlarge") );
- p_list->push_back( PropertyInfo( Variant::STRING, "keystore/release",PROPERTY_HINT_GLOBAL_FILE,"keystore") );
- p_list->push_back( PropertyInfo( Variant::STRING, "keystore/release_user" ) );
- p_list->push_back( PropertyInfo( Variant::STRING, "keystore/release_password" ) );
- p_list->push_back( PropertyInfo( Variant::BOOL, "apk_expansion/enable" ) );
- p_list->push_back( PropertyInfo( Variant::STRING, "apk_expansion/SALT" ) );
- p_list->push_back( PropertyInfo( Variant::STRING, "apk_expansion/public_key",PROPERTY_HINT_MULTILINE_TEXT ) );
-
- const char **perms = android_perms;
- while(*perms) {
-
- p_list->push_back( PropertyInfo( Variant::BOOL, "permissions/"+String(*perms).to_lower()));
- perms++;
- }
-
- for(int i=0;i<MAX_USER_PERMISSIONS;i++) {
-
- p_list->push_back( PropertyInfo( Variant::STRING, "user_permissions/"+itos(i)));
- }
-
- //p_list->push_back( PropertyInfo( Variant::INT, "resources/pack_mode", PROPERTY_HINT_ENUM,"Copy,Single Exec.,Pack (.pck),Bundles (Optical)"));
-
-}
-
-
-static String _parse_string(const uint8_t *p_bytes,bool p_utf8) {
-
- uint32_t offset=0;
- uint32_t len = decode_uint16(&p_bytes[offset]);
-
- if (p_utf8) {
- //don't know how to read extended utf8, this will have to be for now
- len>>=8;
-
- }
- offset+=2;
- //printf("len %i, unicode: %i\n",len,int(p_utf8));
-
- if (p_utf8) {
-
- Vector<uint8_t> str8;
- str8.resize(len+1);
- for(uint32_t i=0;i<len;i++) {
- str8[i]=p_bytes[offset+i];
- }
- str8[len]=0;
- String str;
- str.parse_utf8((const char*)str8.ptr());
- return str;
- } else {
-
- String str;
- for(uint32_t i=0;i<len;i++) {
- CharType c = decode_uint16(&p_bytes[offset+i*2]);
- if (c==0)
- break;
- str += String::chr(c);
- }
- return str;
- }
-
-}
-
-void EditorExportPlatformAndroid::_fix_resources(Vector<uint8_t>& p_manifest) {
-
-
- const int UTF8_FLAG = 0x00000100;
- print_line("*******************GORRRGLE***********************");
-
- uint32_t header = decode_uint32(&p_manifest[0]);
- uint32_t filesize = decode_uint32(&p_manifest[4]);
- uint32_t string_block_len = decode_uint32(&p_manifest[16]);
- uint32_t string_count = decode_uint32(&p_manifest[20]);
- uint32_t string_flags = decode_uint32(&p_manifest[28]);
- const uint32_t string_table_begins = 40;
-
- Vector<String> string_table;
-
- //printf("stirng block len: %i\n",string_block_len);
- //printf("stirng count: %i\n",string_count);
- //printf("flags: %x\n",string_flags);
-
- for(uint32_t i=0;i<string_count;i++) {
-
- uint32_t offset = decode_uint32(&p_manifest[string_table_begins+i*4]);
- offset+=string_table_begins+string_count*4;
-
- String str = _parse_string(&p_manifest[offset],string_flags&UTF8_FLAG);
-
- if (str.begins_with("godot-project-name")) {
-
-
- if (str=="godot-project-name") {
- //project name
- str = get_project_name();
-
- } else {
-
- String lang = str.substr(str.find_last("-")+1,str.length()).replace("-","_");
- String prop = "application/config/name_"+lang;
- if (ProjectSettings::get_singleton()->has(prop)) {
- str = ProjectSettings::get_singleton()->get(prop);
- } else {
- str = get_project_name();
- }
- }
- }
-
- string_table.push_back(str);
-
- }
-
- //write a new string table, but use 16 bits
- Vector<uint8_t> ret;
- ret.resize(string_table_begins+string_table.size()*4);
-
- for(uint32_t i=0;i<string_table_begins;i++) {
-
- ret[i]=p_manifest[i];
- }
-
- int ofs=0;
- for(int i=0;i<string_table.size();i++) {
-
- encode_uint32(ofs,&ret[string_table_begins+i*4]);
- ofs+=string_table[i].length()*2+2+2;
- }
-
- ret.resize(ret.size()+ofs);
- uint8_t *chars=&ret[ret.size()-ofs];
- for(int i=0;i<string_table.size();i++) {
-
- String s = string_table[i];
- encode_uint16(s.length(),chars);
- chars+=2;
- for(int j=0;j<s.length();j++) {
- encode_uint16(s[j],chars);
- chars+=2;
- }
- encode_uint16(0,chars);
- chars+=2;
- }
-
- //pad
- while(ret.size()%4)
- ret.push_back(0);
-
- //change flags to not use utf8
- encode_uint32(string_flags&~0x100,&ret[28]);
- //change length
- encode_uint32(ret.size()-12,&ret[16]);
- //append the rest...
- int rest_from = 12+string_block_len;
- int rest_to = ret.size();
- int rest_len = (p_manifest.size() - rest_from);
- ret.resize(ret.size() + (p_manifest.size() - rest_from) );
- for(int i=0;i<rest_len;i++) {
- ret[rest_to+i]=p_manifest[rest_from+i];
- }
- //finally update the size
- encode_uint32(ret.size(),&ret[4]);
-
-
- p_manifest=ret;
- //printf("end\n");
-}
-
-String EditorExportPlatformAndroid::get_project_name() const {
-
- String aname;
- if (this->name!="") {
- aname=this->name;
- } else {
- aname = ProjectSettings::get_singleton()->get("application/config/name");
-
- }
-
- if (aname=="") {
- aname=_MKSTR(VERSION_NAME);
- }
-
- return aname;
-}
-
-
-void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool p_give_internet) {
-
-
- const int CHUNK_AXML_FILE = 0x00080003;
- const int CHUNK_RESOURCEIDS = 0x00080180;
- const int CHUNK_STRINGS = 0x001C0001;
- const int CHUNK_XML_END_NAMESPACE = 0x00100101;
- const int CHUNK_XML_END_TAG = 0x00100103;
- const int CHUNK_XML_START_NAMESPACE = 0x00100100;
- const int CHUNK_XML_START_TAG = 0x00100102;
- const int CHUNK_XML_TEXT = 0x00100104;
- const int UTF8_FLAG = 0x00000100;
-
- Vector<String> string_table;
-
- uint32_t ofs=0;
-
-
- uint32_t header = decode_uint32(&p_manifest[ofs]);
- uint32_t filesize = decode_uint32(&p_manifest[ofs+4]);
- ofs+=8;
-
- //print_line("FILESIZE: "+itos(filesize)+" ACTUAL: "+itos(p_manifest.size()));
-
- uint32_t string_count;
- uint32_t styles_count;
- uint32_t string_flags;
- uint32_t string_data_offset;
-
- uint32_t styles_offset;
- uint32_t string_table_begins;
- uint32_t string_table_ends;
- Vector<uint8_t> stable_extra;
-
- while(ofs < (uint32_t)p_manifest.size()) {
-
- uint32_t chunk = decode_uint32(&p_manifest[ofs]);
- uint32_t size = decode_uint32(&p_manifest[ofs+4]);
-
-
- switch(chunk) {
-
- case CHUNK_STRINGS: {
-
-
- int iofs=ofs+8;
-
- string_count=decode_uint32(&p_manifest[iofs]);
- styles_count=decode_uint32(&p_manifest[iofs+4]);
- string_flags=decode_uint32(&p_manifest[iofs+8]);
- string_data_offset=decode_uint32(&p_manifest[iofs+12]);
- styles_offset=decode_uint32(&p_manifest[iofs+16]);
-/*
- printf("string count: %i\n",string_count);
- printf("flags: %i\n",string_flags);
- printf("sdata ofs: %i\n",string_data_offset);
- printf("styles ofs: %i\n",styles_offset);
-*/
- uint32_t st_offset=iofs+20;
- string_table.resize(string_count);
- uint32_t string_end=0;
-
- string_table_begins=st_offset;
-
-
- for(uint32_t i=0;i<string_count;i++) {
-
- uint32_t string_at = decode_uint32(&p_manifest[st_offset+i*4]);
- string_at+=st_offset+string_count*4;
-
- ERR_EXPLAIN("Unimplemented, can't read utf8 string table.");
- ERR_FAIL_COND(string_flags&UTF8_FLAG);
-
- if (string_flags&UTF8_FLAG) {
-
-
-
- } else {
- uint32_t len = decode_uint16(&p_manifest[string_at]);
- Vector<CharType> ucstring;
- ucstring.resize(len+1);
- for(uint32_t j=0;j<len;j++) {
- uint16_t c=decode_uint16(&p_manifest[string_at+2+2*j]);
- ucstring[j]=c;
- }
- string_end=MAX(string_at+2+2*len,string_end);
- ucstring[len]=0;
- string_table[i]=ucstring.ptr();
- }
-
-
- //print_line("String "+itos(i)+": "+string_table[i]);
- }
-
- for(uint32_t i=string_end;i<(ofs+size);i++) {
- stable_extra.push_back(p_manifest[i]);
- }
-
- //printf("stable extra: %i\n",int(stable_extra.size()));
- string_table_ends=ofs+size;
-
- //print_line("STABLE SIZE: "+itos(size)+" ACTUAL: "+itos(string_table_ends));
-
- } break;
- case CHUNK_XML_START_TAG: {
-
- int iofs=ofs+8;
- uint32_t line=decode_uint32(&p_manifest[iofs]);
- uint32_t nspace=decode_uint32(&p_manifest[iofs+8]);
- uint32_t name=decode_uint32(&p_manifest[iofs+12]);
- uint32_t check=decode_uint32(&p_manifest[iofs+16]);
-
- String tname=string_table[name];
-
- //printf("NSPACE: %i\n",nspace);
- //printf("NAME: %i (%s)\n",name,tname.utf8().get_data());
- //printf("CHECK: %x\n",check);
- uint32_t attrcount=decode_uint32(&p_manifest[iofs+20]);
- iofs+=28;
- //printf("ATTRCOUNT: %x\n",attrcount);
- for(uint32_t i=0;i<attrcount;i++) {
- uint32_t attr_nspace=decode_uint32(&p_manifest[iofs]);
- uint32_t attr_name=decode_uint32(&p_manifest[iofs+4]);
- uint32_t attr_value=decode_uint32(&p_manifest[iofs+8]);
- uint32_t attr_flags=decode_uint32(&p_manifest[iofs+12]);
- uint32_t attr_resid=decode_uint32(&p_manifest[iofs+16]);
-
-
- String value;
- if (attr_value!=0xFFFFFFFF)
- value=string_table[attr_value];
- else
- value="Res #"+itos(attr_resid);
- String attrname = string_table[attr_name];
- String nspace;
- if (attr_nspace!=0xFFFFFFFF)
- nspace=string_table[attr_nspace];
- else
- nspace="";
-
- //printf("ATTR %i NSPACE: %i\n",i,attr_nspace);
- //printf("ATTR %i NAME: %i (%s)\n",i,attr_name,attrname.utf8().get_data());
- //printf("ATTR %i VALUE: %i (%s)\n",i,attr_value,value.utf8().get_data());
- //printf("ATTR %i FLAGS: %x\n",i,attr_flags);
- //printf("ATTR %i RESID: %x\n",i,attr_resid);
-
- //replace project information
- if (tname=="manifest" && attrname=="package") {
-
- print_line("FOUND package");
- string_table[attr_value]=get_package_name();
- }
-
- //print_line("tname: "+tname);
- //print_line("nspace: "+nspace);
- //print_line("attrname: "+attrname);
- if (tname=="manifest" && /*nspace=="android" &&*/ attrname=="versionCode") {
-
- print_line("FOUND versionCode");
- encode_uint32(version_code,&p_manifest[iofs+16]);
- }
-
-
- if (tname=="manifest" && /*nspace=="android" &&*/ attrname=="versionName") {
-
- print_line("FOUND versionName");
- if (attr_value==0xFFFFFFFF) {
- WARN_PRINT("Version name in a resource, should be plaintext")
- } else
- string_table[attr_value]=version_name;
- }
-
- if (tname=="activity" && /*nspace=="android" &&*/ attrname=="screenOrientation") {
-
- encode_uint32(orientation==0?0:1,&p_manifest[iofs+16]);
- /*
- print_line("FOUND screen orientation");
- if (attr_value==0xFFFFFFFF) {
- WARN_PRINT("Version name in a resource, should be plaintext")
- } else {
- string_table[attr_value]=(orientation==0?"landscape":"portrait");
- }*/
- }
-
- if (tname=="uses-permission" && /*nspace=="android" &&*/ attrname=="name") {
-
- if (value.begins_with("godot.custom")) {
-
- int which = value.get_slice(".",2).to_int();
- if (which>=0 && which<MAX_USER_PERMISSIONS && user_perms[which].strip_edges()!="") {
-
- string_table[attr_value]=user_perms[which].strip_edges();
- }
-
- } else if (value.begins_with("godot.")) {
- String perm = value.get_slice(".",1);
-
- if (perms.has(perm) || (p_give_internet && perm=="INTERNET")) {
-
- print_line("PERM: "+perm);
- string_table[attr_value]="android.permission."+perm;
- }
-
- }
- }
-
- if (tname=="supports-screens" ) {
-
- if (attrname=="smallScreens") {
-
- encode_uint32(screen_support[SCREEN_SMALL]?0xFFFFFFFF:0,&p_manifest[iofs+16]);
-
- } else if (attrname=="normalScreens") {
-
- encode_uint32(screen_support[SCREEN_NORMAL]?0xFFFFFFFF:0,&p_manifest[iofs+16]);
-
- } else if (attrname=="largeScreens") {
-
- encode_uint32(screen_support[SCREEN_LARGE]?0xFFFFFFFF:0,&p_manifest[iofs+16]);
-
- } else if (attrname=="xlargeScreens") {
-
- encode_uint32(screen_support[SCREEN_XLARGE]?0xFFFFFFFF:0,&p_manifest[iofs+16]);
-
- }
- }
-
-
- iofs+=20;
- }
-
- } break;
- }
- //printf("chunk %x: size: %d\n",chunk,size);
-
- ofs+=size;
- }
-
- //printf("end\n");
-
- //create new andriodmanifest binary
-
- Vector<uint8_t> ret;
- ret.resize(string_table_begins+string_table.size()*4);
-
- for(uint32_t i=0;i<string_table_begins;i++) {
-
- ret[i]=p_manifest[i];
- }
-
- ofs=0;
- for(int i=0;i<string_table.size();i++) {
-
- encode_uint32(ofs,&ret[string_table_begins+i*4]);
- ofs+=string_table[i].length()*2+2+2;
- //print_line("ofs: "+itos(i)+": "+itos(ofs));
- }
- ret.resize(ret.size()+ofs);
- uint8_t *chars=&ret[ret.size()-ofs];
- for(int i=0;i<string_table.size();i++) {
-
- String s = string_table[i];
- //print_line("savint string :"+s);
- encode_uint16(s.length(),chars);
- chars+=2;
- for(int j=0;j<s.length();j++) { //include zero?
- encode_uint16(s[j],chars);
- chars+=2;
- }
- encode_uint16(0,chars);
- chars+=2;
-
- }
-
-
- for(int i=0;i<stable_extra.size();i++) {
- ret.push_back(stable_extra[i]);
- }
-
- while(ret.size()%4)
- ret.push_back(0);
-
-
- uint32_t new_stable_end=ret.size();
-
- uint32_t extra = (p_manifest.size()-string_table_ends);
- ret.resize(new_stable_end + extra);
- for(uint32_t i=0;i<extra;i++)
- ret[new_stable_end+i]=p_manifest[string_table_ends+i];
-
- while(ret.size()%4)
- ret.push_back(0);
- encode_uint32(ret.size(),&ret[4]); //update new file size
-
- encode_uint32(new_stable_end-8,&ret[12]); //update new string table size
-
- //print_line("file size: "+itos(ret.size()));
-
- p_manifest=ret;
-
-#if 0
- uint32_t header[9];
- for(int i=0;i<9;i++) {
- header[i]=decode_uint32(&p_manifest[i*4]);
- }
-
- //print_line("STO: "+itos(header[3]));
- uint32_t st_offset=9*4;
- //ERR_FAIL_COND(header[3]!=0x24)
- uint32_t string_count=header[4];
-
-
- string_table.resize(string_count);
-
- for(int i=0;i<string_count;i++) {
-
- uint32_t string_at = decode_uint32(&p_manifest[st_offset+i*4]);
- string_at+=st_offset+string_count*4;
- uint32_t len = decode_uint16(&p_manifest[string_at]);
- Vector<CharType> ucstring;
- ucstring.resize(len+1);
- for(int j=0;j<len;j++) {
- uint16_t c=decode_uint16(&p_manifest[string_at+2+2*j]);
- ucstring[j]=c;
- }
- ucstring[len]=0;
- string_table[i]=ucstring.ptr();
- }
-
-#endif
-
-}
-
-
-
-Error EditorExportPlatformAndroid::save_apk_file(void *p_userdata,const String& p_path, const Vector<uint8_t>& p_data,int p_file,int p_total) {
-
- APKExportData *ed=(APKExportData*)p_userdata;
- String dst_path=p_path;
- dst_path=dst_path.replace_first("res://","assets/");
-
- zipOpenNewFileInZip(ed->apk,
- dst_path.utf8().get_data(),
- NULL,
- NULL,
- 0,
- NULL,
- 0,
- NULL,
- _should_compress_asset(p_path,p_data) ? Z_DEFLATED : 0,
- Z_DEFAULT_COMPRESSION);
-
-
- zipWriteInFileInZip(ed->apk,p_data.ptr(),p_data.size());
- zipCloseFileInZip(ed->apk);
- ed->ep->step("File: "+p_path,3+p_file*100/p_total);
- return OK;
-
-}
-
-bool EditorExportPlatformAndroid::_should_compress_asset(const String& p_path, const Vector<uint8_t>& p_data) {
-
- /*
- * By not compressing files with little or not benefit in doing so,
- * a performance gain is expected at runtime. Moreover, if the APK is
- * zip-aligned, assets stored as they are can be efficiently read by
- * Android by memory-mapping them.
- */
-
- // -- Unconditional uncompress to mimic AAPT plus some other
-
- static const char* unconditional_compress_ext[] = {
- // From https://github.com/android/platform_frameworks_base/blob/master/tools/aapt/Package.cpp
- // These formats are already compressed, or don't compress well:
- ".jpg", ".jpeg", ".png", ".gif",
- ".wav", ".mp2", ".mp3", ".ogg", ".aac",
- ".mpg", ".mpeg", ".mid", ".midi", ".smf", ".jet",
- ".rtttl", ".imy", ".xmf", ".mp4", ".m4a",
- ".m4v", ".3gp", ".3gpp", ".3g2", ".3gpp2",
- ".amr", ".awb", ".wma", ".wmv",
- // Godot-specific:
- ".webp", // Same reasoning as .png
- ".cfb", // Don't let small config files slow-down startup
- // Trailer for easier processing
- NULL
- };
-
- for (const char** ext=unconditional_compress_ext; *ext; ++ext) {
- if (p_path.to_lower().ends_with(String(*ext))) {
- return false;
- }
- }
-
- // -- Compressed resource?
-
- if (p_data.size() >= 4 && p_data[0]=='R' && p_data[1]=='S' && p_data[2]=='C' && p_data[3]=='C') {
- // Already compressed
- return false;
- }
-
- // --- TODO: Decide on texture resources according to their image compression setting
-
- return true;
-}
-
-
-
-Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_debug, int p_flags) {
-
- String src_apk;
-
- EditorProgress ep("export","Exporting for Android",105);
-
- if (p_debug)
- src_apk=custom_debug_package;
- else
- src_apk=custom_release_package;
-
- if (src_apk=="") {
- String err;
- if (p_debug) {
- src_apk=find_export_template("android_debug.apk", &err);
- } else {
- src_apk=find_export_template("android_release.apk", &err);
- }
- if (src_apk=="") {
- EditorNode::add_io_error(err);
- return ERR_FILE_NOT_FOUND;
- }
- }
-
- FileAccess *src_f=NULL;
- zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
-
-
-
- ep.step("Creating APK",0);
-
- unzFile pkg = unzOpen2(src_apk.utf8().get_data(), &io);
- if (!pkg) {
-
- EditorNode::add_io_error("Could not find template APK to export:\n"+src_apk);
- return ERR_FILE_NOT_FOUND;
- }
-
- ERR_FAIL_COND_V(!pkg, ERR_CANT_OPEN);
- int ret = unzGoToFirstFile(pkg);
-
- zlib_filefunc_def io2=io;
- FileAccess *dst_f=NULL;
- io2.opaque=&dst_f;
- String unaligned_path=EditorSettings::get_singleton()->get_settings_path()+"/tmp/tmpexport-unaligned.apk";
- zipFile unaligned_apk=zipOpen2(unaligned_path.utf8().get_data(),APPEND_STATUS_CREATE,NULL,&io2);
-
-
- while(ret==UNZ_OK) {
-
- //get filename
- unz_file_info info;
- char fname[16384];
- ret = unzGetCurrentFileInfo(pkg,&info,fname,16384,NULL,0,NULL,0);
-
- bool skip=false;
-
- String file=fname;
-
- Vector<uint8_t> data;
- data.resize(info.uncompressed_size);
-
- //read
- unzOpenCurrentFile(pkg);
- unzReadCurrentFile(pkg,data.ptr(),data.size());
- unzCloseCurrentFile(pkg);
-
- //write
-
- if (file=="AndroidManifest.xml") {
-
- _fix_manifest(data,p_flags&(EXPORT_DUMB_CLIENT|EXPORT_REMOTE_DEBUG));
- }
-
- if (file=="resources.arsc") {
-
- _fix_resources(data);
- }
-
- if (file=="res/drawable/icon.png") {
- bool found=false;
-
- if (this->icon!="" && this->icon.ends_with(".png")) {
-
- FileAccess *f = FileAccess::open(this->icon,FileAccess::READ);
- if (f) {
-
- data.resize(f->get_len());
- f->get_buffer(data.ptr(),data.size());
- memdelete(f);
- found=true;
- }
-
- }
-
- if (!found) {
-
- String appicon = ProjectSettings::get_singleton()->get("application/config/icon");
- if (appicon!="" && appicon.ends_with(".png")) {
- FileAccess*f = FileAccess::open(appicon,FileAccess::READ);
- if (f) {
- data.resize(f->get_len());
- f->get_buffer(data.ptr(),data.size());
- memdelete(f);
- }
- }
- }
- }
-
- if (file=="lib/x86/libgodot_android.so" && !export_x86) {
- skip=true;
- }
-
- if (file.match("lib/armeabi*/libgodot_android.so") && !export_arm) {
- skip=true;
- }
-
- if (file.match("lib/arm64*/libgodot_android.so") && !export_arm64) {
- skip = true;
- }
-
- if (file.begins_with("META-INF") && _signed) {
- skip=true;
- }
-
- print_line("ADDING: "+file);
-
- if (!skip) {
-
- // Respect decision on compression made by AAPT for the export template
- const bool uncompressed = info.compression_method == 0;
-
- zipOpenNewFileInZip(unaligned_apk,
- file.utf8().get_data(),
- NULL,
- NULL,
- 0,
- NULL,
- 0,
- NULL,
- uncompressed ? 0 : Z_DEFLATED,
- Z_DEFAULT_COMPRESSION);
-
- zipWriteInFileInZip(unaligned_apk,data.ptr(),data.size());
- zipCloseFileInZip(unaligned_apk);
- }
-
- ret = unzGoToNextFile(pkg);
- }
-
-
- ep.step("Adding Files..",1);
- Error err=OK;
- Vector<String> cl = cmdline.strip_edges().split(" ");
- for(int i=0;i<cl.size();i++) {
- if (cl[i].strip_edges().length()==0) {
- cl.remove(i);
- i--;
- }
- }
-
- gen_export_flags(cl,p_flags);
-
- if (p_flags&EXPORT_DUMB_CLIENT) {
-
- /*String host = EditorSettings::get_singleton()->get("filesystem/file_server/host");
- int port = EditorSettings::get_singleton()->get("filesystem/file_server/post");
- String passwd = EditorSettings::get_singleton()->get("filesystem/file_server/password");
- cl.push_back("--remote-fs");
- cl.push_back(host+":"+itos(port));
- if (passwd!="") {
- cl.push_back("--remote-fs-password");
- cl.push_back(passwd);
- }*/
-
-
- } else {
- //all files
-
- if (apk_expansion) {
-
- String apkfname="main."+itos(version_code)+"."+get_package_name()+".obb";
- String fullpath=p_path.get_base_dir().plus_file(apkfname);
- FileAccess *pf = FileAccess::open(fullpath,FileAccess::WRITE);
- if (!pf) {
- EditorNode::add_io_error("Could not write expansion package file: "+apkfname);
- return OK;
- }
- err = save_pack(pf);
- memdelete(pf);
-
- cl.push_back("--use_apk_expansion");
- cl.push_back("--apk_expansion_md5");
- cl.push_back(FileAccess::get_md5(fullpath));
- cl.push_back("--apk_expansion_key");
- cl.push_back(apk_expansion_pkey.strip_edges());
-
- } else {
-
- APKExportData ed;
- ed.ep=&ep;
- ed.apk=unaligned_apk;
-
- err = export_project_files(save_apk_file,&ed,false);
- }
-
-
- }
-
- if (use_32_fb)
- cl.push_back("--use_depth_32");
-
- if (immersive)
- cl.push_back("--use_immersive");
-
- if (cl.size()) {
- //add comandline
- Vector<uint8_t> clf;
- clf.resize(4);
- encode_uint32(cl.size(),&clf[0]);
- for(int i=0;i<cl.size();i++) {
-
- CharString txt = cl[i].utf8();
- int base = clf.size();
- clf.resize(base+4+txt.length());
- encode_uint32(txt.length(),&clf[base]);
- copymem(&clf[base+4],txt.ptr(),txt.length());
- print_line(itos(i)+" param: "+cl[i]);
- }
-
- zipOpenNewFileInZip(unaligned_apk,
- "assets/_cl_",
- NULL,
- NULL,
- 0,
- NULL,
- 0,
- NULL,
- 0, // No compress (little size gain and potentially slower startup)
- Z_DEFAULT_COMPRESSION);
-
- zipWriteInFileInZip(unaligned_apk,clf.ptr(),clf.size());
- zipCloseFileInZip(unaligned_apk);
-
- }
-
- zipClose(unaligned_apk,NULL);
- unzClose(pkg);
-
- if (err) {
- return err;
- }
-
-
-
- if (_signed) {
-
-
- String jarsigner=EditorSettings::get_singleton()->get("export/android/jarsigner");
- if (!FileAccess::exists(jarsigner)) {
- EditorNode::add_io_error("'jarsigner' could not be found.\nPlease supply a path in the editor settings.\nResulting apk is unsigned.");
- return OK;
- }
-
- String keystore;
- String password;
- String user;
- if (p_debug) {
- keystore=EditorSettings::get_singleton()->get("export/android/debug_keystore");
- password=EditorSettings::get_singleton()->get("export/android/debug_keystore_pass");
- user=EditorSettings::get_singleton()->get("export/android/debug_keystore_user");
-
- ep.step("Signing Debug APK..",103);
-
- } else {
- keystore=release_keystore;
- password=release_password;
- user=release_username;
-
- ep.step("Signing Release APK..",103);
-
- }
-
- if (!FileAccess::exists(keystore)) {
- EditorNode::add_io_error("Could not find keystore, unable to export.");
- return ERR_FILE_CANT_OPEN;
- }
-
- List<String> args;
- args.push_back("-digestalg");
- args.push_back("SHA1");
- args.push_back("-sigalg");
- args.push_back("MD5withRSA");
- String tsa_url=EditorSettings::get_singleton()->get("export/android/timestamping_authority_url");
- if (tsa_url != "") {
- args.push_back("-tsa");
- args.push_back(tsa_url);
- }
- args.push_back("-verbose");
- args.push_back("-keystore");
- args.push_back(keystore);
- args.push_back("-storepass");
- args.push_back(password);
- args.push_back(unaligned_path);
- args.push_back(user);
- int retval;
- OS::get_singleton()->execute(jarsigner,args,true,NULL,NULL,&retval);
- if (retval) {
- EditorNode::add_io_error("'jarsigner' returned with error #"+itos(retval));
- return ERR_CANT_CREATE;
- }
-
- ep.step("Verifying APK..",104);
-
- args.clear();
- args.push_back("-verify");
- args.push_back(unaligned_path);
- args.push_back("-verbose");
-
- OS::get_singleton()->execute(jarsigner,args,true,NULL,NULL,&retval);
- if (retval) {
- EditorNode::add_io_error("'jarsigner' verification of APK failed. Make sure to use jarsigner from Java 6.");
- return ERR_CANT_CREATE;
- }
-
- }
-
-
-
- // Let's zip-align (must be done after signing)
-
- static const int ZIP_ALIGNMENT = 4;
-
- ep.step("Aligning APK..",105);
-
- unzFile tmp_unaligned = unzOpen2(unaligned_path.utf8().get_data(), &io);
- if (!tmp_unaligned) {
-
- EditorNode::add_io_error("Could not find temp unaligned APK.");
- return ERR_FILE_NOT_FOUND;
- }
-
- ERR_FAIL_COND_V(!tmp_unaligned, ERR_CANT_OPEN);
- ret = unzGoToFirstFile(tmp_unaligned);
-
- io2=io;
- dst_f=NULL;
- io2.opaque=&dst_f;
- zipFile final_apk=zipOpen2(p_path.utf8().get_data(),APPEND_STATUS_CREATE,NULL,&io2);
-
- // Take files from the unaligned APK and write them out to the aligned one
- // in raw mode, i.e. not uncompressing and recompressing, aligning them as needed,
- // following what is done in https://github.com/android/platform_build/blob/master/tools/zipalign/ZipAlign.cpp
- int bias = 0;
- while(ret==UNZ_OK) {
-
- unz_file_info info;
- memset(&info, 0, sizeof(info));
-
- char fname[16384];
- char extra[16384];
- ret = unzGetCurrentFileInfo(tmp_unaligned,&info,fname,16384,extra,16384-ZIP_ALIGNMENT,NULL,0);
-
- String file=fname;
-
- Vector<uint8_t> data;
- data.resize(info.compressed_size);
-
- // read
- int method, level;
- unzOpenCurrentFile2(tmp_unaligned, &method, &level, 1); // raw read
- long file_offset = unzGetCurrentFileZStreamPos64(tmp_unaligned);
- unzReadCurrentFile(tmp_unaligned,data.ptr(),data.size());
- unzCloseCurrentFile(tmp_unaligned);
-
- // align
- int padding = 0;
- if (!info.compression_method) {
- // Uncompressed file => Align
- long new_offset = file_offset + bias;
- padding = (ZIP_ALIGNMENT - (new_offset % ZIP_ALIGNMENT)) % ZIP_ALIGNMENT;
- }
-
- memset(extra + info.size_file_extra, 0, padding);
-
- // write
- zipOpenNewFileInZip2(final_apk,
- file.utf8().get_data(),
- NULL,
- extra,
- info.size_file_extra + padding,
- NULL,
- 0,
- NULL,
- method,
- level,
- 1); // raw write
- zipWriteInFileInZip(final_apk,data.ptr(),data.size());
- zipCloseFileInZipRaw(final_apk,info.uncompressed_size,info.crc);
-
- bias += padding;
-
- ret = unzGoToNextFile(tmp_unaligned);
- }
-
- zipClose(final_apk,NULL);
- unzClose(tmp_unaligned);
-
- if (err) {
- return err;
- }
-
- return OK;
-
-}
-
-
-bool EditorExportPlatformAndroid::poll_devices() {
-
- bool dc=devices_changed;
- devices_changed=false;
- return dc;
-}
-
-int EditorExportPlatformAndroid::get_device_count() const {
-
- device_lock->lock();
- int dc=devices.size();
- device_lock->unlock();
-
- return dc;
-
-}
-
-String EditorExportPlatformAndroid::get_device_name(int p_device) const {
-
- ERR_FAIL_INDEX_V(p_device,devices.size(),"");
- device_lock->lock();
- String s=devices[p_device].name;
- device_lock->unlock();
- return s;
-}
-
-String EditorExportPlatformAndroid::get_device_info(int p_device) const {
-
- ERR_FAIL_INDEX_V(p_device,devices.size(),"");
- device_lock->lock();
- String s=devices[p_device].description;
- device_lock->unlock();
- return s;
-}
-
-void EditorExportPlatformAndroid::_device_poll_thread(void *ud) {
-
- EditorExportPlatformAndroid *ea=(EditorExportPlatformAndroid *)ud;
-
-
- while(!ea->quit_request) {
-
- String adb=EditorSettings::get_singleton()->get("export/android/adb");
- if (FileAccess::exists(adb)) {
-
- String devices;
- List<String> args;
- args.push_back("devices");
- int ec;
- OS::get_singleton()->execute(adb,args,true,NULL,&devices,&ec);
- Vector<String> ds = devices.split("\n");
- Vector<String> ldevices;
- for(int i=1;i<ds.size();i++) {
-
- String d = ds[i];
- int dpos = d.find("device");
- if (dpos==-1)
- continue;
- d=d.substr(0,dpos).strip_edges();
- //print_line("found devuce: "+d);
- ldevices.push_back(d);
- }
-
- ea->device_lock->lock();
-
- bool different=false;
-
- if (devices.size()!=ldevices.size()) {
-
- different=true;
- } else {
-
- for(int i=0;i<ea->devices.size();i++) {
-
- if (ea->devices[i].id!=ldevices[i]) {
- different=true;
- break;
- }
- }
- }
-
- if (different) {
-
-
- Vector<Device> ndevices;
-
- for(int i=0;i<ldevices.size();i++) {
-
- Device d;
- d.id=ldevices[i];
- for(int j=0;j<ea->devices.size();j++) {
- if (ea->devices[j].id==ldevices[i]) {
- d.description=ea->devices[j].description;
- d.name=ea->devices[j].name;
- }
- }
-
- if (d.description=="") {
- //in the oven, request!
- args.clear();
- args.push_back("-s");
- args.push_back(d.id);
- args.push_back("shell");
- args.push_back("cat");
- args.push_back("/system/build.prop");
- int ec;
- String dp;
-
- OS::get_singleton()->execute(adb,args,true,NULL,&dp,&ec);
-
- Vector<String> props = dp.split("\n");
- String vendor;
- String device;
- d.description+"Device ID: "+d.id+"\n";
- for(int j=0;j<props.size();j++) {
-
- String p = props[j];
- if (p.begins_with("ro.product.model=")) {
- device=p.get_slice("=",1).strip_edges();
- } else if (p.begins_with("ro.product.brand=")) {
- vendor=p.get_slice("=",1).strip_edges().capitalize();
- } else if (p.begins_with("ro.build.display.id=")) {
- d.description+="Build: "+p.get_slice("=",1).strip_edges()+"\n";
- } else if (p.begins_with("ro.build.version.release=")) {
- d.description+="Release: "+p.get_slice("=",1).strip_edges()+"\n";
- } else if (p.begins_with("ro.product.cpu.abi=")) {
- d.description+="CPU: "+p.get_slice("=",1).strip_edges()+"\n";
- } else if (p.begins_with("ro.product.manufacturer=")) {
- d.description+="Manufacturer: "+p.get_slice("=",1).strip_edges()+"\n";
- } else if (p.begins_with("ro.board.platform=")) {
- d.description+="Chipset: "+p.get_slice("=",1).strip_edges()+"\n";
- } else if (p.begins_with("ro.opengles.version=")) {
- uint32_t opengl = p.get_slice("=",1).to_int();
- d.description+="OpenGL: "+itos(opengl>>16)+"."+itos((opengl>>8)&0xFF)+"."+itos((opengl)&0xFF)+"\n";
- }
- }
-
- d.name=vendor+" "+device;
- //print_line("name: "+d.name);
- //print_line("description: "+d.description);
-
- }
-
- ndevices.push_back(d);
-
- }
- ea->devices=ndevices;
- ea->devices_changed=true;
- }
-
- ea->device_lock->unlock();
- }
-
- uint64_t wait = 3000000;
- uint64_t time = OS::get_singleton()->get_ticks_usec();
- while(OS::get_singleton()->get_ticks_usec() - time < wait ) {
- OS::get_singleton()->delay_usec(1000);
- if (ea->quit_request)
- break;
- }
-
- }
-
- if (EditorSettings::get_singleton()->get("export/android/shutdown_adb_on_exit")) {
- String adb=EditorSettings::get_singleton()->get("export/android/adb");
- if (!FileAccess::exists(adb)) {
- return; //adb not configured
- }
-
- List<String> args;
- args.push_back("kill-server");
- OS::get_singleton()->execute(adb,args,true);
- };
-}
-
-Error EditorExportPlatformAndroid::run(int p_device, int p_flags) {
-
- ERR_FAIL_INDEX_V(p_device,devices.size(),ERR_INVALID_PARAMETER);
- device_lock->lock();
-
- EditorProgress ep("run","Running on "+devices[p_device].name,3);
-
- String adb=EditorSettings::get_singleton()->get("export/android/adb");
- if (adb=="") {
-
- EditorNode::add_io_error("ADB executable not configured in settings, can't run.");
- device_lock->unlock();
- return ERR_UNCONFIGURED;
- }
-
- //export_temp
- ep.step("Exporting APK",0);
-
-
- bool use_adb_over_usb = bool(EDITOR_DEF("export/android/use_remote_debug_over_adb",true));
-
- if (use_adb_over_usb) {
- p_flags|=EXPORT_REMOTE_DEBUG_LOCALHOST;
- }
-
- String export_to=EditorSettings::get_singleton()->get_settings_path()+"/tmp/tmpexport.apk";
- Error err = export_project(export_to,true,p_flags);
- if (err) {
- device_lock->unlock();
- return err;
- }
-
- List<String> args;
- int rv;
-
- if (remove_prev) {
- ep.step("Uninstalling..",1);
-
- print_line("Uninstalling previous version: "+devices[p_device].name);
-
- args.push_back("-s");
- args.push_back(devices[p_device].id);
- args.push_back("uninstall");
- args.push_back(get_package_name());
-
- err = OS::get_singleton()->execute(adb,args,true,NULL,NULL,&rv);
-#if 0
- if (err || rv!=0) {
- EditorNode::add_io_error("Could not install to device.");
- device_lock->unlock();
- return ERR_CANT_CREATE;
- }
-#endif
- }
-
- print_line("Installing into device (please wait..): "+devices[p_device].name);
- ep.step("Installing to Device (please wait..)..",2);
-
- args.clear();
- args.push_back("-s");
- args.push_back(devices[p_device].id);
- args.push_back("install");
- args.push_back("-r");
- args.push_back(export_to);
-
- err = OS::get_singleton()->execute(adb,args,true,NULL,NULL,&rv);
- if (err || rv!=0) {
- EditorNode::add_io_error("Could not install to device.");
- device_lock->unlock();
- return ERR_CANT_CREATE;
- }
-
- if (use_adb_over_usb) {
-
- args.clear();
- args.push_back("reverse");
- args.push_back("--remove-all");
- err = OS::get_singleton()->execute(adb,args,true,NULL,NULL,&rv);
-
- int port = (int)EditorSettings::get_singleton()->get("network/debug/remote_port");
- args.clear();
- args.push_back("reverse");
- args.push_back("tcp:"+itos(port));
- args.push_back("tcp:"+itos(port));
-
- err = OS::get_singleton()->execute(adb,args,true,NULL,NULL,&rv);
- print_line("Reverse result: "+itos(rv));
-
- int fs_port = EditorSettings::get_singleton()->get("filesystem/file_server/port");
-
- args.clear();
- args.push_back("reverse");
- args.push_back("tcp:"+itos(fs_port));
- args.push_back("tcp:"+itos(fs_port));
-
- err = OS::get_singleton()->execute(adb,args,true,NULL,NULL,&rv);
- print_line("Reverse result2: "+itos(rv));
-
- }
-
-
- ep.step("Running on Device..",3);
- args.clear();
- args.push_back("-s");
- args.push_back(devices[p_device].id);
- args.push_back("shell");
- args.push_back("am");
- args.push_back("start");
- args.push_back("--user 0");
- args.push_back("-a");
- args.push_back("android.intent.action.MAIN");
- args.push_back("-n");
- args.push_back(get_package_name()+"/org.godotengine.godot.Godot");
-
- err = OS::get_singleton()->execute(adb,args,true,NULL,NULL,&rv);
- if (err || rv!=0) {
- EditorNode::add_io_error("Could not execute ondevice.");
- device_lock->unlock();
- return ERR_CANT_CREATE;
- }
- device_lock->unlock();
- return OK;
-}
-
-String EditorExportPlatformAndroid::get_package_name() {
-
- String pname = package;
- String basename = ProjectSettings::get_singleton()->get("application/config/name");
- basename=basename.to_lower();
-
- String name;
- bool first=true;
- for(int i=0;i<basename.length();i++) {
- CharType c = basename[i];
- if (c>='0' && c<='9' && first) {
- continue;
- }
- if ((c>='a' && c<='z') || (c>='A' && c<='Z') || (c>='0' && c<='9')) {
- name+=String::chr(c);
- first=false;
- }
- }
- if (name=="")
- name="noname";
-
- pname=pname.replace("$genname",name);
- return pname;
-
-}
-
-EditorExportPlatformAndroid::EditorExportPlatformAndroid() {
-
- version_code=1;
- version_name="1.0";
- package="org.godotengine.$genname";
- name="";
- _signed=true;
- apk_expansion=false;
- quit_request=false;
- orientation=0;
- remove_prev=true;
- use_32_fb=true;
- immersive=true;
-
- export_arm=true;
- export_arm64=false;
- export_x86=false;
-
-
- device_thread=Thread::create(_device_poll_thread,this);
- devices_changed=true;
-
- Image img( _android_logo );
- logo = Ref<ImageTexture>( memnew( ImageTexture ));
- logo->create_from_image(img);
-
- for(int i=0;i<4;i++)
- screen_support[i]=true;
-}
-
-bool EditorExportPlatformAndroid::can_export(String *r_error) const {
-
- bool valid=true;
- String adb=EditorSettings::get_singleton()->get("export/android/adb");
- String err;
-
- if (!FileAccess::exists(adb)) {
-
- valid=false;
- err+="ADB executable not configured in editor settings.\n";
- }
-
- String js = EditorSettings::get_singleton()->get("export/android/jarsigner");
-
- if (!FileAccess::exists(js)) {
-
- valid=false;
- err+="OpenJDK 6 jarsigner not configured in editor settings.\n";
- }
-
- String dk = EditorSettings::get_singleton()->get("export/android/debug_keystore");
-
- if (!FileAccess::exists(dk)) {
-
- valid=false;
- err+="Debug Keystore not configured in editor settings.\n";
- }
-
- if (!exists_export_template("android_debug.apk") || !exists_export_template("android_release.apk")) {
- valid=false;
- err+="No export templates found.\nDownload and install export templates.\n";
- }
-
- if (custom_debug_package!="" && !FileAccess::exists(custom_debug_package)) {
- valid=false;
- err+="Custom debug package not found.\n";
- }
-
- if (custom_release_package!="" && !FileAccess::exists(custom_release_package)) {
- valid=false;
- err+="Custom release package not found.\n";
- }
-
- if (apk_expansion) {
-
- /*
- if (apk_expansion_salt=="") {
- valid=false;
- err+="Invalid SALT for apk expansion.\n";
- }
- */
- if (apk_expansion_pkey=="") {
- valid=false;
- err+="Invalid public key for apk expansion.\n";
- }
- }
-
- if (r_error)
- *r_error=err;
-
- return valid;
-}
-
-
-EditorExportPlatformAndroid::~EditorExportPlatformAndroid() {
-
- quit_request=true;
- Thread::wait_to_finish(device_thread);
- memdelete(device_lock);
- memdelete(device_thread);
-}
-
-#endif
+#include <string.h>
static const char *android_perms[] = {
"ACCESS_CHECKIN_PROPERTIES",
@@ -2060,7 +204,7 @@ class EditorExportAndroid : public EditorExportPlatform {
String id;
String name;
String description;
- int release;
+ int api_level;
};
struct APKExportData {
@@ -2134,7 +278,7 @@ class EditorExportAndroid : public EditorExportPlatform {
if (ea->devices[j].id == ldevices[i]) {
d.description = ea->devices[j].description;
d.name = ea->devices[j].name;
- d.release = ea->devices[j].release;
+ d.api_level = ea->devices[j].api_level;
}
}
@@ -2155,7 +299,7 @@ class EditorExportAndroid : public EditorExportPlatform {
String vendor;
String device;
d.description + "Device ID: " + d.id + "\n";
- d.release = 0;
+ d.api_level = 0;
for (int j = 0; j < props.size(); j++) {
String p = props[j];
@@ -2166,9 +310,9 @@ class EditorExportAndroid : public EditorExportPlatform {
} else if (p.begins_with("ro.build.display.id=")) {
d.description += "Build: " + p.get_slice("=", 1).strip_edges() + "\n";
} else if (p.begins_with("ro.build.version.release=")) {
- const String release_str = p.get_slice("=", 1).strip_edges();
- d.description += "Release: " + release_str + "\n";
- d.release = release_str.to_int();
+ d.description += "Release: " + p.get_slice("=", 1).strip_edges() + "\n";
+ } else if (p.begins_with("ro.build.version.sdk=")) {
+ d.api_level = p.get_slice("=", 1).to_int();
} else if (p.begins_with("ro.product.cpu.abi=")) {
d.description += "CPU: " + p.get_slice("=", 1).strip_edges() + "\n";
} else if (p.begins_with("ro.product.manufacturer=")) {
@@ -2324,11 +468,36 @@ class EditorExportAndroid : public EditorExportPlatform {
return zipfi;
}
- static Error save_apk_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total) {
+ static Set<String> get_abis() {
+ Set<String> abis;
+ abis.insert("armeabi");
+ abis.insert("armeabi-v7a");
+ abis.insert("arm64-v8a");
+ abis.insert("x86");
+ abis.insert("x86_64");
+ abis.insert("mips");
+ abis.insert("mips64");
+ return abis;
+ }
+ static Error save_apk_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total) {
APKExportData *ed = (APKExportData *)p_userdata;
String dst_path = p_path;
- dst_path = dst_path.replace_first("res://", "assets/");
+ static Set<String> android_abis = get_abis();
+
+ if (dst_path.ends_with(".so")) {
+ String abi = dst_path.get_base_dir().get_file().strip_edges(); // parent dir name
+ if (android_abis.has(abi)) {
+ dst_path = "lib/" + abi + "/" + dst_path.get_file();
+ } else {
+ String err = "Dynamic libraries must be located in the folder named after Android ABI they were compiled for. " +
+ p_path + " does not follow this convention.";
+ ERR_PRINT(err.utf8().get_data());
+ return ERR_FILE_BAD_PATH;
+ }
+ } else {
+ dst_path = dst_path.replace_first("res://", "assets/");
+ }
zip_fileinfo zipfi = get_zip_fileinfo();
@@ -2371,14 +540,14 @@ class EditorExportAndroid : public EditorExportPlatform {
//print_line("FILESIZE: "+itos(filesize)+" ACTUAL: "+itos(p_manifest.size()));
- uint32_t string_count;
- uint32_t styles_count;
- uint32_t string_flags;
- uint32_t string_data_offset;
+ uint32_t string_count = 0;
+ uint32_t styles_count = 0;
+ uint32_t string_flags = 0;
+ uint32_t string_data_offset = 0;
- uint32_t styles_offset;
- uint32_t string_table_begins;
- uint32_t string_table_ends;
+ uint32_t styles_offset = 0;
+ uint32_t string_table_begins = 0;
+ uint32_t string_table_ends = 0;
Vector<uint8_t> stable_extra;
String version_name = p_preset->get("version/name");
@@ -2665,37 +834,6 @@ class EditorExportAndroid : public EditorExportPlatform {
//print_line("file size: "+itos(ret.size()));
p_manifest = ret;
-
-#if 0
- uint32_t header[9];
- for(int i=0;i<9;i++) {
- header[i]=decode_uint32(&p_manifest[i*4]);
- }
-
- //print_line("STO: "+itos(header[3]));
- uint32_t st_offset=9*4;
- //ERR_FAIL_COND(header[3]!=0x24)
- uint32_t string_count=header[4];
-
-
- string_table.resize(string_count);
-
- for(int i=0;i<string_count;i++) {
-
- uint32_t string_at = decode_uint32(&p_manifest[st_offset+i*4]);
- string_at+=st_offset+string_count*4;
- uint32_t len = decode_uint16(&p_manifest[string_at]);
- Vector<CharType> ucstring;
- ucstring.resize(len+1);
- for(int j=0;j<len;j++) {
- uint16_t c=decode_uint16(&p_manifest[string_at+2+2*j]);
- ucstring[j]=c;
- }
- ucstring[len]=0;
- string_table[i]=ucstring.ptr();
- }
-
-#endif
}
static String _parse_string(const uint8_t *p_bytes, bool p_utf8) {
@@ -2960,11 +1098,11 @@ public:
//export_temp
ep.step("Exporting APK", 0);
- bool use_adb_over_usb = bool(EDITOR_DEF("export/android/use_remote_debug_over_adb", true));
+ const bool use_remote = (p_debug_flags & DEBUG_FLAG_REMOTE_DEBUG) || (p_debug_flags & DEBUG_FLAG_DUMB_CLIENT);
+ const bool use_reverse = devices[p_device].api_level >= 21;
- if (use_adb_over_usb) {
+ if (use_reverse)
p_debug_flags |= DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST;
- }
String export_to = EditorSettings::get_singleton()->get_settings_path() + "/tmp/tmpexport.apk";
Error err = export_project(p_preset, true, export_to, p_debug_flags);
@@ -2991,13 +1129,6 @@ public:
args.push_back(get_package_name(package_name));
err = OS::get_singleton()->execute(adb, args, true, NULL, NULL, &rv);
-#if 0
- if (err || rv!=0) {
- EditorNode::add_io_error("Could not install to device.");
- device_lock->unlock();
- return ERR_CANT_CREATE;
- }
-#endif
}
print_line("Installing into device (please wait..): " + devices[p_device].name);
@@ -3017,37 +1148,54 @@ public:
return ERR_CANT_CREATE;
}
- if (use_adb_over_usb) {
+ if (use_remote) {
+ if (use_reverse) {
- args.clear();
- args.push_back("-s");
- args.push_back(devices[p_device].id);
- args.push_back("reverse");
- args.push_back("--remove-all");
- OS::get_singleton()->execute(adb, args, true, NULL, NULL, &rv);
+ static const char *const msg = "** Device API >= 21; debugging over USB **";
+ EditorNode::get_singleton()->get_log()->add_message(msg);
+ print_line(String(msg).to_upper());
- int dbg_port = EditorSettings::get_singleton()->get("network/debug/remote_port");
- args.clear();
- args.push_back("-s");
- args.push_back(devices[p_device].id);
- args.push_back("reverse");
- args.push_back("tcp:" + itos(dbg_port));
- args.push_back("tcp:" + itos(dbg_port));
+ args.clear();
+ args.push_back("-s");
+ args.push_back(devices[p_device].id);
+ args.push_back("reverse");
+ args.push_back("--remove-all");
+ OS::get_singleton()->execute(adb, args, true, NULL, NULL, &rv);
- OS::get_singleton()->execute(adb, args, true, NULL, NULL, &rv);
- print_line("Reverse result: " + itos(rv));
+ if (p_debug_flags & DEBUG_FLAG_REMOTE_DEBUG) {
- int fs_port = EditorSettings::get_singleton()->get("filesystem/file_server/port");
+ int dbg_port = EditorSettings::get_singleton()->get("network/debug/remote_port");
+ args.clear();
+ args.push_back("-s");
+ args.push_back(devices[p_device].id);
+ args.push_back("reverse");
+ args.push_back("tcp:" + itos(dbg_port));
+ args.push_back("tcp:" + itos(dbg_port));
- args.clear();
- args.push_back("-s");
- args.push_back(devices[p_device].id);
- args.push_back("reverse");
- args.push_back("tcp:" + itos(fs_port));
- args.push_back("tcp:" + itos(fs_port));
+ OS::get_singleton()->execute(adb, args, true, NULL, NULL, &rv);
+ print_line("Reverse result: " + itos(rv));
+ }
- err = OS::get_singleton()->execute(adb, args, true, NULL, NULL, &rv);
- print_line("Reverse result2: " + itos(rv));
+ if (p_debug_flags & DEBUG_FLAG_DUMB_CLIENT) {
+
+ int fs_port = EditorSettings::get_singleton()->get("filesystem/file_server/port");
+
+ args.clear();
+ args.push_back("-s");
+ args.push_back(devices[p_device].id);
+ args.push_back("reverse");
+ args.push_back("tcp:" + itos(fs_port));
+ args.push_back("tcp:" + itos(fs_port));
+
+ err = OS::get_singleton()->execute(adb, args, true, NULL, NULL, &rv);
+ print_line("Reverse result2: " + itos(rv));
+ }
+ } else {
+
+ static const char *const msg = "** Device API < 21; debugging over Wi-Fi **";
+ EditorNode::get_singleton()->get_log()->add_message(msg);
+ print_line(String(msg).to_upper());
+ }
}
ep.step("Running on Device..", 3);
@@ -3057,7 +1205,7 @@ public:
args.push_back("shell");
args.push_back("am");
args.push_back("start");
- if ((bool)EditorSettings::get_singleton()->get("export/android/force_system_user") && devices[p_device].release >= 17) { // Multi-user introduced in Android 17
+ if ((bool)EditorSettings::get_singleton()->get("export/android/force_system_user") && devices[p_device].api_level >= 17) { // Multi-user introduced in Android 17
args.push_back("--user");
args.push_back("0");
}
@@ -3188,7 +1336,7 @@ public:
bool export_arm = p_preset->get("architecture/arm");
bool export_arm64 = p_preset->get("architecture/arm64");
- bool use_32_fb = p_preset->get("screen/use_32_bits_view");
+ bool use_32_fb = p_preset->get("graphics/32_bits_framebuffer");
bool immersive = p_preset->get("screen/immersive_mode");
bool _signed = p_preset->get("package/signed");
@@ -3270,15 +1418,15 @@ public:
}
}
- if (file == "lib/x86/libgodot_android.so" && !export_x86) {
+ if (file == "lib/x86/*.so" && !export_x86) {
skip = true;
}
- if (file.match("lib/armeabi*/libgodot_android.so") && !export_arm) {
+ if (file.match("lib/armeabi*/*.so") && !export_arm) {
skip = true;
}
- if (file.match("lib/arm64*/libgodot_android.so") && !export_arm64) {
+ if (file.match("lib/arm64*/*.so") && !export_arm64) {
skip = true;
}
@@ -3618,7 +1766,6 @@ void register_android_exporter() {
EDITOR_DEF("export/android/force_system_user", false);
EDITOR_DEF("export/android/timestamping_authority_url", "");
- EDITOR_DEF("export/android/use_remote_debug_over_adb", false);
EDITOR_DEF("export/android/shutdown_adb_on_exit", true);
Ref<EditorExportAndroid> exporter = Ref<EditorExportAndroid>(memnew(EditorExportAndroid));
diff --git a/platform/android/export/export.h b/platform/android/export/export.h
index e3b0b4aab6..40ce129dcd 100644
--- a/platform/android/export/export.h
+++ b/platform/android/export/export.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/file_access_android.cpp b/platform/android/file_access_android.cpp
index be19f056b0..f207b81b4b 100644
--- a/platform/android/file_access_android.cpp
+++ b/platform/android/file_access_android.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/file_access_android.h b/platform/android/file_access_android.h
index 0ee8cd7efe..c2ce2b0bfe 100644
--- a/platform/android/file_access_android.h
+++ b/platform/android/file_access_android.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/file_access_jandroid.cpp b/platform/android/file_access_jandroid.cpp
index e20ffd4f8a..ad855c790d 100644
--- a/platform/android/file_access_jandroid.cpp
+++ b/platform/android/file_access_jandroid.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/file_access_jandroid.h b/platform/android/file_access_jandroid.h
index a04f28d0d7..8060312182 100644
--- a/platform/android/file_access_jandroid.h
+++ b/platform/android/file_access_jandroid.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/globals/global_defaults.cpp b/platform/android/globals/global_defaults.cpp
index 6bdc6b337c..c73b578154 100644
--- a/platform/android/globals/global_defaults.cpp
+++ b/platform/android/globals/global_defaults.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/globals/global_defaults.h b/platform/android/globals/global_defaults.h
index d524b56af6..8c918414d3 100644
--- a/platform/android/globals/global_defaults.h
+++ b/platform/android/globals/global_defaults.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/godot_android.cpp b/platform/android/godot_android.cpp
index 2dd2c0532a..8235683496 100644
--- a/platform/android/godot_android.cpp
+++ b/platform/android/godot_android.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -565,20 +565,6 @@ static void engine_handle_cmd(struct android_app *app, int32_t cmd) {
case APP_CMD_CONFIG_CHANGED:
case APP_CMD_WINDOW_RESIZED: {
-#if 0
-// android blows
- if (engine->display_active) {
-
- EGLint w,h;
- eglQuerySurface(engine->display, engine->surface, EGL_WIDTH, &w);
- eglQuerySurface(engine->display, engine->surface, EGL_HEIGHT, &h);
- engine->os->init_video_mode(w,h);
- //print_line("RESIZED VIDEO MODE: "+itos(w)+","+itos(h));
- engine_draw_frame(engine);
-
- }
-#else
-
if (engine->display_active) {
EGLint w, h;
@@ -594,17 +580,6 @@ static void engine_handle_cmd(struct android_app *app, int32_t cmd) {
engine_draw_frame(engine);
engine->animating = 1;
-/*
- EGLint w,h;
- eglQuerySurface(engine->display, engine->surface, EGL_WIDTH, &w);
- eglQuerySurface(engine->display, engine->surface, EGL_HEIGHT, &h);
- engine->os->init_video_mode(w,h);
- //print_line("RESIZED VIDEO MODE: "+itos(w)+","+itos(h));
-
- }*/
-
-#endif
-
} break;
case APP_CMD_INIT_WINDOW:
//The window is being shown, get it ready.
@@ -617,9 +592,7 @@ static void engine_handle_cmd(struct android_app *app, int32_t cmd) {
engine->os = new OS_Android(_gfx_init, engine);
__android_log_print(ANDROID_LOG_INFO, "godot", "pre asdasd setup...");
-#if 0
- Error err = Main::setup("apk",2,args);
-#else
+
Error err = Main::setup("apk", 0, NULL);
String modules = ProjectSettings::get_singleton()->get("android/modules");
@@ -669,8 +642,6 @@ static void engine_handle_cmd(struct android_app *app, int32_t cmd) {
}
}
-#endif
-
if (!Main::start())
return; //should exit instead and print the error
diff --git a/platform/android/java/src/org/godotengine/godot/Dictionary.java b/platform/android/java/src/org/godotengine/godot/Dictionary.java
index b9501e0858..ed91fedd85 100644
--- a/platform/android/java/src/org/godotengine/godot/Dictionary.java
+++ b/platform/android/java/src/org/godotengine/godot/Dictionary.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/Godot.java b/platform/android/java/src/org/godotengine/godot/Godot.java
index d444d37c2f..53a90e4cfe 100644
--- a/platform/android/java/src/org/godotengine/godot/Godot.java
+++ b/platform/android/java/src/org/godotengine/godot/Godot.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -92,7 +92,7 @@ import android.os.SystemClock;
public class Godot extends Activity implements SensorEventListener, IDownloaderClient
-{
+{
static final int MAX_SINGLETONS = 64;
private IStub mDownloaderClientStub;
@@ -139,9 +139,9 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
com.godot.game.R.string.text_button_pause;
mPauseButton.setText(stringResourceID);
}
-
+
static public class SingletonBase {
-
+
protected void registerClass(String p_name, String[] p_methods) {
GodotLib.singleton(p_name,this);
@@ -210,6 +210,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
*/
private String[] command_line;
+ private boolean use_apk_expansion;
public GodotView mView;
private boolean godot_initialized=false;
@@ -264,27 +265,40 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
layout = new FrameLayout(this);
layout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
setContentView(layout);
-
+
// GodotEditText layout
- GodotEditText edittext = new GodotEditText(this);
+ GodotEditText edittext = new GodotEditText(this);
edittext.setLayoutParams(new ViewGroup.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
// ...add to FrameLayout
layout.addView(edittext);
-
+
mView = new GodotView(getApplication(),io,use_gl2,use_32_bits, this);
layout.addView(mView,new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
- setKeepScreenOn(GodotLib.getGlobal("display/driver/keep_screen_on").equals("True"));
-
- edittext.setView(mView);
- io.setEdit(edittext);
-
+ edittext.setView(mView);
+ io.setEdit(edittext);
+
// Ad layout
adLayout = new RelativeLayout(this);
adLayout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
layout.addView(adLayout);
-
+
+ final String[] current_command_line = command_line;
+ final GodotView view = mView;
+ mView.queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.setup(current_command_line);
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ view.setKeepScreenOn("True".equals(GodotLib.getGlobal("display/driver/keep_screen_on")));
+ }
+ });
+ }
+ });
+
}
-
+
public void setKeepScreenOn(final boolean p_enabled) {
keep_screen_on = p_enabled;
if (mView != null){
@@ -315,13 +329,13 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
}
});
}
-
+
private static Godot _self;
-
+
public static Godot getInstance(){
return Godot._self;
}
-
+
private String[] getCommandLine() {
InputStream is;
@@ -402,7 +416,6 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
Log.d("GODOT"," " + command_line[w]);
}
}*/
- GodotLib.initialize(this,io.needsReloadHooks(),command_line,getAssets());
mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_GAME);
@@ -411,9 +424,12 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
mGyroscope = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE);
mSensorManager.registerListener(this, mGyroscope, SensorManager.SENSOR_DELAY_GAME);
+ GodotLib.initialize(this, io.needsReloadHooks(), getAssets(), use_apk_expansion);
+
result_callback = null;
mPaymentsManager = PaymentsManager.createManager(this).initService();
+
godot_initialized=true;
}
@@ -426,7 +442,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
- @Override
+ @Override
protected void onCreate(Bundle icicle) {
Log.d("GODOT", "** GODOT ACTIVITY CREATED HERE ***\n");
@@ -437,12 +453,10 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
//window.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
window.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
-
//check for apk expansion API
if (true) {
boolean md5mismatch = false;
command_line = getCommandLine();
- boolean use_apk_expansion=false;
String main_pack_md5=null;
String main_pack_key=null;
@@ -528,23 +542,23 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
if (!pack_valid) {
Log.d("GODOT", "Pack Invalid, try re-downloading.");
-
+
Intent notifierIntent = new Intent(this, this.getClass());
notifierIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_CLEAR_TOP);
-
+
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0,
notifierIntent, PendingIntent.FLAG_UPDATE_CURRENT);
-
+
int startResult;
try {
Log.d("GODOT", "INITIALIZING DOWNLOAD");
startResult = DownloaderClientMarshaller.startDownloadServiceIfRequired(
- getApplicationContext(),
- pendingIntent,
+ getApplicationContext(),
+ pendingIntent,
GodotDownloaderService.class);
Log.d("GODOT", "DOWNLOAD SERVICE FINISHED:" + startResult);
-
+
if (startResult != DownloaderClientMarshaller.NO_DOWNLOAD_REQUIRED) {
Log.d("GODOT", "DOWNLOAD REQUIRED");
// This is where you do set up to display the download
@@ -563,7 +577,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
mCellMessage = findViewById(com.godot.game.R.id.approveCellular);
mPauseButton = (Button) findViewById(com.godot.game.R.id.pauseButton);
mWiFiSettingsButton = (Button) findViewById(com.godot.game.R.id.wifiSettingsButton);
-
+
return;
} else{
Log.d("GODOT", "NO DOWNLOAD REQUIRED");
@@ -582,7 +596,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
initializeGodot();
-
+
//instanceSingleton( new GodotFacebook(this) );
@@ -590,14 +604,14 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
@Override protected void onDestroy(){
-
+
if(mPaymentsManager != null ) mPaymentsManager.destroy();
for(int i=0;i<singleton_count;i++) {
singletons[i].onMainDestroy();
}
super.onDestroy();
}
-
+
@Override protected void onPause() {
super.onPause();
if (!godot_initialized){
@@ -607,8 +621,13 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
return;
}
mView.onPause();
+ mView.queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.focusout();
+ }
+ });
mSensorManager.unregisterListener(this);
- GodotLib.focusout();
for(int i=0;i<singleton_count;i++) {
singletons[i].onMainPause();
@@ -625,10 +644,16 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
}
mView.onResume();
+ mView.queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.focusin();
+ }
+ });
mSensorManager.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_GAME);
mSensorManager.registerListener(this, mMagnetometer, SensorManager.SENSOR_DELAY_GAME);
mSensorManager.registerListener(this, mGyroscope, SensorManager.SENSOR_DELAY_GAME);
- GodotLib.focusin();
+
if(use_immersive && Build.VERSION.SDK_INT >= 19.0){ // check if the application runs on an android 4.4+
Window window = getWindow();
window.getDecorView().setSystemUiVisibility(
@@ -644,8 +669,8 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
singletons[i].onMainResume();
}
-
-
+
+
}
@@ -670,32 +695,39 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
@Override public void onSensorChanged(SensorEvent event) {
Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay();
int displayRotation = display.getRotation();
-
+
float[] adjustedValues = new float[3];
final int axisSwap[][] = {
- { 1, -1, 0, 1 }, // ROTATION_0
- {-1, -1, 1, 0 }, // ROTATION_90
- {-1, 1, 0, 1 }, // ROTATION_180
- { 1, 1, 1, 0 } }; // ROTATION_270
-
- final int[] as = axisSwap[displayRotation];
- adjustedValues[0] = (float)as[0] * event.values[ as[2] ];
- adjustedValues[1] = (float)as[1] * event.values[ as[3] ];
+ { 1, -1, 0, 1 }, // ROTATION_0
+ {-1, -1, 1, 0 }, // ROTATION_90
+ {-1, 1, 0, 1 }, // ROTATION_180
+ { 1, 1, 1, 0 } }; // ROTATION_270
+
+ final int[] as = axisSwap[displayRotation];
+ adjustedValues[0] = (float)as[0] * event.values[ as[2] ];
+ adjustedValues[1] = (float)as[1] * event.values[ as[3] ];
adjustedValues[2] = event.values[2];
-
- float x = adjustedValues[0];
- float y = adjustedValues[1];
- float z = adjustedValues[2];
-
- int typeOfSensor = event.sensor.getType();
- if (typeOfSensor == event.sensor.TYPE_ACCELEROMETER) {
- GodotLib.accelerometer(x,y,z);
- }
- if (typeOfSensor == event.sensor.TYPE_MAGNETIC_FIELD) {
- GodotLib.magnetometer(x,y,z);
- }
- if (typeOfSensor == event.sensor.TYPE_GYROSCOPE) {
- GodotLib.gyroscope(x,y,z);
+
+ final float x = adjustedValues[0];
+ final float y = adjustedValues[1];
+ final float z = adjustedValues[2];
+
+ final int typeOfSensor = event.sensor.getType();
+ if (mView != null) {
+ mView.queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ if (typeOfSensor == Sensor.TYPE_ACCELEROMETER) {
+ GodotLib.accelerometer(x,y,z);
+ }
+ if (typeOfSensor == Sensor.TYPE_MAGNETIC_FIELD) {
+ GodotLib.magnetometer(x,y,z);
+ }
+ if (typeOfSensor == Sensor.TYPE_GYROSCOPE) {
+ GodotLib.gyroscope(x,y,z);
+ }
+ }
+ });
}
}
@@ -722,7 +754,14 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
@Override public void onBackPressed() {
System.out.printf("** BACK REQUEST!\n");
- //GodotLib.back();
+ if (mView != null) {
+ mView.queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.back();
+ }
+ });
+ }
}
public void forceQuit() {
@@ -733,7 +772,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
private boolean obbIsCorrupted(String f, String main_pack_md5){
-
+
try {
InputStream fis = new FileInputStream(f);
@@ -780,58 +819,64 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
}
//@Override public boolean dispatchTouchEvent (MotionEvent event) {
- public boolean gotTouchEvent(MotionEvent event) {
+ public boolean gotTouchEvent(final MotionEvent event) {
super.onTouchEvent(event);
- int evcount=event.getPointerCount();
+ final int evcount=event.getPointerCount();
if (evcount==0)
return true;
- int[] arr = new int[event.getPointerCount()*3];
+ if (mView != null) {
+ final int[] arr = new int[event.getPointerCount()*3];
- for(int i=0;i<event.getPointerCount();i++) {
+ for(int i=0;i<event.getPointerCount();i++) {
- arr[i*3+0]=(int)event.getPointerId(i);
- arr[i*3+1]=(int)event.getX(i);
- arr[i*3+2]=(int)event.getY(i);
- }
+ arr[i*3+0]=(int)event.getPointerId(i);
+ arr[i*3+1]=(int)event.getX(i);
+ arr[i*3+2]=(int)event.getY(i);
+ }
- //System.out.printf("gaction: %d\n",event.getAction());
- switch(event.getAction()&MotionEvent.ACTION_MASK) {
-
- case MotionEvent.ACTION_DOWN: {
- GodotLib.touch(0,0,evcount,arr);
- //System.out.printf("action down at: %f,%f\n", event.getX(),event.getY());
- } break;
- case MotionEvent.ACTION_MOVE: {
- GodotLib.touch(1,0,evcount,arr);
- /*
- for(int i=0;i<event.getPointerCount();i++) {
- System.out.printf("%d - moved to: %f,%f\n",i, event.getX(i),event.getY(i));
- }
- */
- } break;
- case MotionEvent.ACTION_POINTER_UP: {
- final int indexPointUp = event.getActionIndex();
- final int pointer_idx = event.getPointerId(indexPointUp);
- GodotLib.touch(4,pointer_idx,evcount,arr);
- //System.out.printf("%d - s.up at: %f,%f\n",pointer_idx, event.getX(pointer_idx),event.getY(pointer_idx));
- } break;
- case MotionEvent.ACTION_POINTER_DOWN: {
- int pointer_idx = event.getActionIndex();
- GodotLib.touch(3,pointer_idx,evcount,arr);
- //System.out.printf("%d - s.down at: %f,%f\n",pointer_idx, event.getX(pointer_idx),event.getY(pointer_idx));
- } break;
- case MotionEvent.ACTION_CANCEL:
- case MotionEvent.ACTION_UP: {
- GodotLib.touch(2,0,evcount,arr);
- /*
- for(int i=0;i<event.getPointerCount();i++) {
- System.out.printf("%d - up! %f,%f\n",i, event.getX(i),event.getY(i));
+ //System.out.printf("gaction: %d\n",event.getAction());
+ final int action = event.getAction() & MotionEvent.ACTION_MASK;
+ mView.queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ switch(action) {
+ case MotionEvent.ACTION_DOWN: {
+ GodotLib.touch(0,0,evcount,arr);
+ //System.out.printf("action down at: %f,%f\n", event.getX(),event.getY());
+ } break;
+ case MotionEvent.ACTION_MOVE: {
+ GodotLib.touch(1,0,evcount,arr);
+ /*
+ for(int i=0;i<event.getPointerCount();i++) {
+ System.out.printf("%d - moved to: %f,%f\n",i, event.getX(i),event.getY(i));
+ }
+ */
+ } break;
+ case MotionEvent.ACTION_POINTER_UP: {
+ final int indexPointUp = event.getActionIndex();
+ final int pointer_idx = event.getPointerId(indexPointUp);
+ GodotLib.touch(4,pointer_idx,evcount,arr);
+ //System.out.printf("%d - s.up at: %f,%f\n",pointer_idx, event.getX(pointer_idx),event.getY(pointer_idx));
+ } break;
+ case MotionEvent.ACTION_POINTER_DOWN: {
+ int pointer_idx = event.getActionIndex();
+ GodotLib.touch(3,pointer_idx,evcount,arr);
+ //System.out.printf("%d - s.down at: %f,%f\n",pointer_idx, event.getX(pointer_idx),event.getY(pointer_idx));
+ } break;
+ case MotionEvent.ACTION_CANCEL:
+ case MotionEvent.ACTION_UP: {
+ GodotLib.touch(2,0,evcount,arr);
+ /*
+ for(int i=0;i<event.getPointerCount();i++) {
+ System.out.printf("%d - up! %f,%f\n",i, event.getX(i),event.getY(i));
+ }
+ */
+ } break;
+ }
}
- */
- } break;
-
+ });
}
return true;
}
@@ -864,7 +909,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
private void queueEvent(Runnable runnable) {
// TODO Auto-generated method stub
-
+
}
public PaymentsManager getPaymentsManager() {
@@ -988,7 +1033,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
mProgressFraction.setText(Helpers.getDownloadProgressString
(progress.mOverallProgress,
progress.mOverallTotal));
-
+
}
-
+
}
diff --git a/platform/android/java/src/org/godotengine/godot/GodotDownloaderAlarmReceiver.java b/platform/android/java/src/org/godotengine/godot/GodotDownloaderAlarmReceiver.java
index 6cdc6be793..2c668dd586 100644
--- a/platform/android/java/src/org/godotengine/godot/GodotDownloaderAlarmReceiver.java
+++ b/platform/android/java/src/org/godotengine/godot/GodotDownloaderAlarmReceiver.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java b/platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java
index 38d30c108c..97ba7826fb 100644
--- a/platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java
+++ b/platform/android/java/src/org/godotengine/godot/GodotDownloaderService.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/GodotIO.java b/platform/android/java/src/org/godotengine/godot/GodotIO.java
index ecb623452c..989fd2b609 100644
--- a/platform/android/java/src/org/godotengine/godot/GodotIO.java
+++ b/platform/android/java/src/org/godotengine/godot/GodotIO.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/GodotLib.java b/platform/android/java/src/org/godotengine/godot/GodotLib.java
index 98ac29d3ca..47a690140f 100644
--- a/platform/android/java/src/org/godotengine/godot/GodotLib.java
+++ b/platform/android/java/src/org/godotengine/godot/GodotLib.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -37,7 +37,7 @@ public class GodotLib {
public static GodotIO io;
static {
- System.loadLibrary("godot_android");
+ System.loadLibrary("godot_android");
}
/**
@@ -45,7 +45,8 @@ public class GodotLib {
* @param height the current view height
*/
- public static native void initialize(Godot p_instance,boolean need_reload_hook,String[] p_cmdline,Object p_asset_manager);
+ public static native void initialize(Godot p_instance,boolean need_reload_hook,Object p_asset_manager, boolean use_apk_expansion);
+ public static native void setup(String[] p_cmdline);
public static native void resize(int width, int height,boolean reload);
public static native void newcontext(boolean p_32_bits);
public static native void back();
diff --git a/platform/android/java/src/org/godotengine/godot/GodotPaymentV3.java b/platform/android/java/src/org/godotengine/godot/GodotPaymentV3.java
index 3cb8fd3da8..8fe79fdfc7 100644
--- a/platform/android/java/src/org/godotengine/godot/GodotPaymentV3.java
+++ b/platform/android/java/src/org/godotengine/godot/GodotPaymentV3.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -89,7 +89,7 @@ public class GodotPaymentV3 extends Godot.SingletonBase {
}
public void callbackSuccess(String ticket, String signature, String sku) {
- GodotLib.callobject(purchaseCallbackId, "purchase_success", new Object[]{ticket, signature, sku});
+ GodotLib.calldeferred(purchaseCallbackId, "purchase_success", new Object[]{ticket, signature, sku});
}
public void callbackSuccessProductMassConsumed(String ticket, String signature, String sku) {
diff --git a/platform/android/java/src/org/godotengine/godot/GodotView.java b/platform/android/java/src/org/godotengine/godot/GodotView.java
index 752d9d501c..3c2ad7cc59 100644
--- a/platform/android/java/src/org/godotengine/godot/GodotView.java
+++ b/platform/android/java/src/org/godotengine/godot/GodotView.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -208,8 +208,9 @@ public class GodotView extends GLSurfaceView implements InputDeviceListener {
@Override public void onInputDeviceAdded(int deviceId) {
joystick joy = new joystick();
joy.device_id = deviceId;
- int id = joy_devices.size();
+ final int id = joy_devices.size();
InputDevice device = mInputManager.getInputDevice(deviceId);
+ final String name = device.getName();
joy.name = device.getName();
joy.axes = new ArrayList<InputDevice.MotionRange>();
joy.hats = new ArrayList<InputDevice.MotionRange>();
@@ -224,19 +225,29 @@ public class GodotView extends GLSurfaceView implements InputDeviceListener {
}
}
joy_devices.add(joy);
- GodotLib.joyconnectionchanged(id, true, joy.name);
+ queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.joyconnectionchanged(id, true, name);
+ }
+ });
}
@Override public void onInputDeviceRemoved(int deviceId) {
- int id = find_joy_device(deviceId);
+ final int id = find_joy_device(deviceId);
joy_devices.remove(id);
- GodotLib.joyconnectionchanged(id, false, "");
+ queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.joyconnectionchanged(id, false, "");
+ }
+ });
}
@Override public void onInputDeviceChanged(int deviceId) {
}
- @Override public boolean onKeyUp(int keyCode, KeyEvent event) {
+ @Override public boolean onKeyUp(final int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
return true;
@@ -249,22 +260,38 @@ public class GodotView extends GLSurfaceView implements InputDeviceListener {
int source = event.getSource();
if ((source & InputDevice.SOURCE_JOYSTICK) != 0 || (source & InputDevice.SOURCE_DPAD) != 0 || (source & InputDevice.SOURCE_GAMEPAD) != 0) {
- int button = get_godot_button(keyCode);
- int device = find_joy_device(event.getDeviceId());
+ final int button = get_godot_button(keyCode);
+ final int device = find_joy_device(event.getDeviceId());
- GodotLib.joybutton(device, button, false);
+ queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.joybutton(device, button, false);
+ }
+ });
return true;
} else {
-
- GodotLib.key(keyCode, event.getUnicodeChar(0), false);
+ final int chr = event.getUnicodeChar(0);
+ queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.key(keyCode, chr, false);
+ }
+ });
};
return super.onKeyUp(keyCode, event);
};
- @Override public boolean onKeyDown(int keyCode, KeyEvent event) {
+ @Override public boolean onKeyDown(final int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
- GodotLib.back();
+ queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.back();
+ }
+ });
+
// press 'back' button should not terminate program
//normal handle 'back' event in game logic
return true;
@@ -281,16 +308,26 @@ public class GodotView extends GLSurfaceView implements InputDeviceListener {
if (event.getRepeatCount() > 0) // ignore key echo
return true;
- int button = get_godot_button(keyCode);
- int device = find_joy_device(event.getDeviceId());
+ final int button = get_godot_button(keyCode);
+ final int device = find_joy_device(event.getDeviceId());
//Log.e(TAG, String.format("joy button down! button %x, %d, device %d", keyCode, button, device));
-
- GodotLib.joybutton(device, button, true);
+ queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.joybutton(device, button, true);
+ }
+ });
return true;
} else {
- GodotLib.key(keyCode, event.getUnicodeChar(0), true);
+ final int chr = event.getUnicodeChar(0);
+ queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.key(keyCode, chr, true);
+ }
+ });
};
return super.onKeyDown(keyCode, event);
}
@@ -299,21 +336,32 @@ public class GodotView extends GLSurfaceView implements InputDeviceListener {
if ((event.getSource() & InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK && event.getAction() == MotionEvent.ACTION_MOVE) {
- int device_id = find_joy_device(event.getDeviceId());
+ final int device_id = find_joy_device(event.getDeviceId());
joystick joy = joy_devices.get(device_id);
for (int i = 0; i < joy.axes.size(); i++) {
InputDevice.MotionRange range = joy.axes.get(i);
- float value = (event.getAxisValue(range.getAxis()) - range.getMin() ) / range.getRange() * 2.0f - 1.0f;
+ final float value = (event.getAxisValue(range.getAxis()) - range.getMin() ) / range.getRange() * 2.0f - 1.0f;
//Log.e(TAG, String.format("axis event: %d, value %f", i, value));
- GodotLib.joyaxis(device_id, i, value);
+ final int idx = i;
+ queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.joyaxis(device_id, idx, value);
+ }
+ });
}
for (int i = 0; i < joy.hats.size(); i+=2) {
- int hatX = Math.round(event.getAxisValue(joy.hats.get(i).getAxis()));
- int hatY = Math.round(event.getAxisValue(joy.hats.get(i+1).getAxis()));
+ final int hatX = Math.round(event.getAxisValue(joy.hats.get(i).getAxis()));
+ final int hatY = Math.round(event.getAxisValue(joy.hats.get(i+1).getAxis()));
//Log.e(TAG, String.format("HAT EVENT %d, %d", hatX, hatY));
- GodotLib.joyhat(device_id, hatX, hatY);
+ queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.joyhat(device_id, hatX, hatY);
+ }
+ });
}
return true;
};
diff --git a/platform/android/java/src/org/godotengine/godot/input/GodotEditText.java b/platform/android/java/src/org/godotengine/godot/input/GodotEditText.java
index bf5239aa77..d8a3ac5591 100644
--- a/platform/android/java/src/org/godotengine/godot/input/GodotEditText.java
+++ b/platform/android/java/src/org/godotengine/godot/input/GodotEditText.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/input/GodotTextInputWrapper.java b/platform/android/java/src/org/godotengine/godot/input/GodotTextInputWrapper.java
index 1dbcb78ada..04669a3b0c 100644
--- a/platform/android/java/src/org/godotengine/godot/input/GodotTextInputWrapper.java
+++ b/platform/android/java/src/org/godotengine/godot/input/GodotTextInputWrapper.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -89,8 +89,13 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene
//Log.d(TAG, "beforeTextChanged(" + pCharSequence + ")start: " + start + ",count: " + count + ",after: " + after);
for (int i=0;i<count;i++){
- GodotLib.key(KeyEvent.KEYCODE_DEL, 0, true);
- GodotLib.key(KeyEvent.KEYCODE_DEL, 0, false);
+ mView.queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.key(KeyEvent.KEYCODE_DEL, 0, true);
+ GodotLib.key(KeyEvent.KEYCODE_DEL, 0, false);
+ }
+ });
}
}
@@ -99,9 +104,14 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene
//Log.d(TAG, "onTextChanged(" + pCharSequence + ")start: " + start + ",count: " + count + ",before: " + before);
for (int i=start;i<start+count;i++){
- int ch = pCharSequence.charAt(i);
- GodotLib.key(0, ch, true);
- GodotLib.key(0, ch, false);
+ final int ch = pCharSequence.charAt(i);
+ mView.queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.key(0, ch, true);
+ GodotLib.key(0, ch, false);
+ }
+ });
}
}
@@ -111,8 +121,14 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene
if (this.mEdit == pTextView && this.isFullScreenEdit()) {
// user press the action button, delete all old text and insert new text
for (int i = this.mOriginText.length(); i > 0; i--) {
- GodotLib.key(KeyEvent.KEYCODE_DEL, 0, true);
- GodotLib.key(KeyEvent.KEYCODE_DEL, 0, false);
+ mView.queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.key(KeyEvent.KEYCODE_DEL, 0, true);
+ GodotLib.key(KeyEvent.KEYCODE_DEL, 0, false);
+ }
+ });
+
/*
if (BuildConfig.DEBUG) {
Log.d(TAG, "deleteBackward");
@@ -131,9 +147,14 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene
}
for(int i = 0; i < text.length(); i++) {
- int ch = text.codePointAt(i);
- GodotLib.key(0, ch, true);
- GodotLib.key(0, ch, false);
+ final int ch = text.codePointAt(i);
+ mView.queueEvent(new Runnable() {
+ @Override
+ public void run() {
+ GodotLib.key(0, ch, true);
+ GodotLib.key(0, ch, false);
+ }
+ });
}
/*
if (BuildConfig.DEBUG) {
@@ -141,7 +162,7 @@ public class GodotTextInputWrapper implements TextWatcher, OnEditorActionListene
}
*/
}
-
+
if (pActionID == EditorInfo.IME_ACTION_DONE) {
this.mView.requestFocus();
}
diff --git a/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java b/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java
index c37821ffd9..8622f4ccff 100644
--- a/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java
+++ b/platform/android/java/src/org/godotengine/godot/payments/ConsumeTask.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/payments/GenericConsumeTask.java b/platform/android/java/src/org/godotengine/godot/payments/GenericConsumeTask.java
index 72126a8f64..0afe35510c 100644
--- a/platform/android/java/src/org/godotengine/godot/payments/GenericConsumeTask.java
+++ b/platform/android/java/src/org/godotengine/godot/payments/GenericConsumeTask.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/payments/HandlePurchaseTask.java b/platform/android/java/src/org/godotengine/godot/payments/HandlePurchaseTask.java
index e223bbb8c0..7318ae2fc6 100644
--- a/platform/android/java/src/org/godotengine/godot/payments/HandlePurchaseTask.java
+++ b/platform/android/java/src/org/godotengine/godot/payments/HandlePurchaseTask.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/payments/PaymentsCache.java b/platform/android/java/src/org/godotengine/godot/payments/PaymentsCache.java
index fa5564a3f4..69ac02e902 100644
--- a/platform/android/java/src/org/godotengine/godot/payments/PaymentsCache.java
+++ b/platform/android/java/src/org/godotengine/godot/payments/PaymentsCache.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java b/platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java
index 6f308af360..b327265abb 100644
--- a/platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java
+++ b/platform/android/java/src/org/godotengine/godot/payments/PaymentsManager.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/payments/PurchaseTask.java b/platform/android/java/src/org/godotengine/godot/payments/PurchaseTask.java
index 81352b0cf4..6ecea0106c 100644
--- a/platform/android/java/src/org/godotengine/godot/payments/PurchaseTask.java
+++ b/platform/android/java/src/org/godotengine/godot/payments/PurchaseTask.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java b/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java
index 9d40371b9b..d831e45694 100644
--- a/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java
+++ b/platform/android/java/src/org/godotengine/godot/payments/ReleaseAllConsumablesTask.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java b/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java
index 09f80df403..6e058c140c 100644
--- a/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java
+++ b/platform/android/java/src/org/godotengine/godot/payments/ValidateTask.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/utils/Crypt.java b/platform/android/java/src/org/godotengine/godot/utils/Crypt.java
index 02a2fba854..2fd66553f6 100644
--- a/platform/android/java/src/org/godotengine/godot/utils/Crypt.java
+++ b/platform/android/java/src/org/godotengine/godot/utils/Crypt.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/utils/CustomSSLSocketFactory.java b/platform/android/java/src/org/godotengine/godot/utils/CustomSSLSocketFactory.java
index 7881754fb2..c9532a5d01 100644
--- a/platform/android/java/src/org/godotengine/godot/utils/CustomSSLSocketFactory.java
+++ b/platform/android/java/src/org/godotengine/godot/utils/CustomSSLSocketFactory.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java b/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java
index b314fb721b..0711f30b8b 100644
--- a/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java
+++ b/platform/android/java/src/org/godotengine/godot/utils/HttpRequester.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java/src/org/godotengine/godot/utils/RequestParams.java b/platform/android/java/src/org/godotengine/godot/utils/RequestParams.java
index 41d26ba70f..ded11550bb 100644
--- a/platform/android/java/src/org/godotengine/godot/utils/RequestParams.java
+++ b/platform/android/java/src/org/godotengine/godot/utils/RequestParams.java
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp
index bd266c76bf..8606ea41a0 100644
--- a/platform/android/java_class_wrapper.cpp
+++ b/platform/android/java_class_wrapper.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -112,7 +112,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method,
Ref<Reference> ref = *p_args[i];
if (!ref.is_null()) {
- if (ref->cast_to<JavaObject>()) {
+ if (Object::cast_to<JavaObject>(ref.ptr())) {
Ref<JavaObject> jo = ref;
//could be faster
diff --git a/platform/android/java_class_wrapper.h b/platform/android/java_class_wrapper.h
index f990708bdf..1274b4bea9 100644
--- a/platform/android/java_class_wrapper.h
+++ b/platform/android/java_class_wrapper.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index eb139fb471..509d1bf123 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -613,8 +613,6 @@ static List<JAndroidPointerEvent> pointer_events;
static List<Ref<InputEvent> > key_events;
static List<OS_Android::JoypadEvent> joy_events;
static bool initialized = false;
-static Mutex *input_mutex = NULL;
-static Mutex *suspend_mutex = NULL;
static int step = 0;
static bool resized = false;
static bool resized_reload = false;
@@ -756,7 +754,7 @@ static void _alert(const String &p_message, const String &p_title) {
env->CallVoidMethod(_godot_instance, _alertDialog, jStrMessage, jStrTitle);
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jobject obj, jobject activity, jboolean p_need_reload_hook, jobjectArray p_cmdline, jobject p_asset_manager) {
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jobject obj, jobject activity, jboolean p_need_reload_hook, jobject p_asset_manager, jboolean p_use_apk_expansion) {
__android_log_print(ANDROID_LOG_INFO, "godot", "**INIT EVENT! - %p\n", env);
@@ -826,36 +824,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
AudioDriverAndroid::setup(gob);
}
- const char **cmdline = NULL;
- int cmdlen = 0;
- bool use_apk_expansion = false;
- if (p_cmdline) {
- cmdlen = env->GetArrayLength(p_cmdline);
- if (cmdlen) {
- cmdline = (const char **)malloc((env->GetArrayLength(p_cmdline) + 1) * sizeof(const char *));
- cmdline[cmdlen] = NULL;
-
- for (int i = 0; i < cmdlen; i++) {
-
- jstring string = (jstring)env->GetObjectArrayElement(p_cmdline, i);
- const char *rawString = env->GetStringUTFChars(string, 0);
- if (!rawString) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "cmdline arg %i is null\n", i);
- } else {
- //__android_log_print(ANDROID_LOG_INFO,"godot","cmdline arg %i is: %s\n",i,rawString);
-
- if (strcmp(rawString, "--main_pack") == 0)
- use_apk_expansion = true;
- }
-
- cmdline[i] = rawString;
- }
- }
- }
-
- __android_log_print(ANDROID_LOG_INFO, "godot", "CMDLINE LEN %i - APK EXPANSION %I\n", cmdlen, int(use_apk_expansion));
-
- os_android = new OS_Android(_gfx_init_func, env, _open_uri, _get_data_dir, _get_locale, _get_model, _get_screen_dpi, _show_vk, _hide_vk, _set_screen_orient, _get_unique_id, _get_system_dir, _play_video, _is_video_playing, _pause_video, _stop_video, _set_keep_screen_on, _alert, use_apk_expansion);
+ os_android = new OS_Android(_gfx_init_func, env, _open_uri, _get_data_dir, _get_locale, _get_model, _get_screen_dpi, _show_vk, _hide_vk, _set_screen_orient, _get_unique_id, _get_system_dir, _play_video, _is_video_playing, _pause_video, _stop_video, _set_keep_screen_on, _alert, p_use_apk_expansion);
os_android->set_need_reload_hooks(p_need_reload_hook);
char wd[500];
@@ -864,68 +833,10 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *en
__android_log_print(ANDROID_LOG_INFO, "godot", "test construction %i\n", tst.a);
__android_log_print(ANDROID_LOG_INFO, "godot", "running from dir %s\n", wd);
- __android_log_print(ANDROID_LOG_INFO, "godot", "**SETUP");
-
-#if 0
- char *args[]={"--test","render",NULL};
- __android_log_print(ANDROID_LOG_INFO,"godot","pre asdasd setup...");
- Error err = Main::setup("apk",2,args,false);
-#else
- Error err = Main::setup("apk", cmdlen, (char **)cmdline, false);
-#endif
-
- if (err != OK) {
- __android_log_print(ANDROID_LOG_INFO, "godot", "*****UNABLE TO SETUP");
-
- return; //should exit instead and print the error
- }
-
- __android_log_print(ANDROID_LOG_INFO, "godot", "*****SETUP OK");
-
//video driver is determined here, because once initialized, it can't be changed
- String vd = ProjectSettings::get_singleton()->get("display/driver");
+ // String vd = ProjectSettings::get_singleton()->get("display/driver");
env->CallVoidMethod(_godot_instance, _on_video_init, (jboolean) true);
-
- __android_log_print(ANDROID_LOG_INFO, "godot", "**START");
-
- input_mutex = Mutex::create();
- suspend_mutex = Mutex::create();
-}
-
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, jobject obj, jint width, jint height, jboolean reload) {
-
- __android_log_print(ANDROID_LOG_INFO, "godot", "^_^_^_^_^ resize %lld, %i, %i\n", Thread::get_caller_id(), width, height);
- if (os_android)
- os_android->set_display_size(Size2(width, height));
-
- /*input_mutex->lock();
- resized=true;
- if (reload)
- resized_reload=true;
- new_size=Size2(width,height);
- input_mutex->unlock();*/
-}
-
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_newcontext(JNIEnv *env, jobject obj, bool p_32_bits) {
-
- __android_log_print(ANDROID_LOG_INFO, "godot", "^_^_^_^_^ newcontext %lld\n", Thread::get_caller_id());
-
- if (os_android) {
- os_android->set_context_is_16_bits(!p_32_bits);
- }
-
- if (os_android && step > 0) {
-
- os_android->reload_gfx();
- }
-}
-
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_back(JNIEnv *env, jobject obj) {
-
- input_mutex->lock();
- go_back_request = true;
- input_mutex->unlock();
}
static void _initialize_java_modules() {
@@ -991,34 +902,106 @@ static void _initialize_java_modules() {
}
}
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jobject obj) {
-
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jobject obj, jobjectArray p_cmdline) {
ThreadAndroid::setup_thread();
- //__android_log_print(ANDROID_LOG_INFO,"godot","**STEP EVENT! - %p-%i\n",env,Thread::get_caller_id());
+ __android_log_print(ANDROID_LOG_INFO, "godot", "**SETUP");
- suspend_mutex->lock();
- input_mutex->lock();
- //first time step happens, initialize
- if (step == 0) {
- // ugly hack to initialize the rest of the engine
- // because of the way android forces you to do everything with threads
+ const char **cmdline = NULL;
+ int cmdlen = 0;
+ bool use_apk_expansion = false;
+ if (p_cmdline) {
+ cmdlen = env->GetArrayLength(p_cmdline);
+ if (cmdlen) {
+ cmdline = (const char **)malloc((env->GetArrayLength(p_cmdline) + 1) * sizeof(const char *));
+ cmdline[cmdlen] = NULL;
- java_class_wrapper = memnew(JavaClassWrapper(_godot_instance));
- ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("JavaClassWrapper", java_class_wrapper));
- _initialize_java_modules();
+ for (int i = 0; i < cmdlen; i++) {
+
+ jstring string = (jstring)env->GetObjectArrayElement(p_cmdline, i);
+ const char *rawString = env->GetStringUTFChars(string, 0);
+ if (!rawString) {
+ __android_log_print(ANDROID_LOG_INFO, "godot", "cmdline arg %i is null\n", i);
+ } else {
+ //__android_log_print(ANDROID_LOG_INFO,"godot","cmdline arg %i is: %s\n",i,rawString);
- Main::setup2();
+ if (strcmp(rawString, "-main_pack") == 0)
+ use_apk_expansion = true;
+ }
+
+ cmdline[i] = rawString;
+ }
+ }
+ }
+ __android_log_print(ANDROID_LOG_INFO, "godot", "CMDLINE LEN %i - APK EXPANSION %i\n", cmdlen, int(use_apk_expansion));
+
+#if 0
+ char *args[]={"-test","render",NULL};
+ __android_log_print(ANDROID_LOG_INFO,"godot","pre asdasd setup...");
+ Error err = Main::setup("apk",2,args,false);
+#else
+ Error err = Main::setup("apk", cmdlen, (char **)cmdline, false);
+#endif
+ if (cmdline) {
+ free(cmdline);
+ }
+
+ if (err != OK) {
+ __android_log_print(ANDROID_LOG_INFO, "godot", "*****UNABLE TO SETUP");
+ return; //should exit instead and print the error
+ }
+ __android_log_print(ANDROID_LOG_INFO, "godot", "*****SETUP OK");
+
+ java_class_wrapper = memnew(JavaClassWrapper(_godot_instance));
+ ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("JavaClassWrapper", java_class_wrapper));
+ _initialize_java_modules();
+}
+
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, jobject obj, jint width, jint height, jboolean reload) {
+
+ __android_log_print(ANDROID_LOG_INFO, "godot", "^_^_^_^_^ resize %lld, %i, %i\n", Thread::get_caller_id(), width, height);
+ if (os_android)
+ os_android->set_display_size(Size2(width, height));
+
+ /*input_mutex->lock();
+ resized=true;
+ if (reload)
+ resized_reload=true;
+ new_size=Size2(width,height);
+ input_mutex->unlock();*/
+}
+
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_newcontext(JNIEnv *env, jobject obj, bool p_32_bits) {
+
+ __android_log_print(ANDROID_LOG_INFO, "godot", "^_^_^_^_^ newcontext %lld\n", Thread::get_caller_id());
+
+ if (os_android) {
+ os_android->set_context_is_16_bits(!p_32_bits);
+ }
+
+ if (os_android && step > 0) {
+
+ os_android->reload_gfx();
+ }
+}
+
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_back(JNIEnv *env, jobject obj) {
+ go_back_request = true;
+}
+
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jobject obj) {
+ if (step == 0) {
+ __android_log_print(ANDROID_LOG_INFO, "godot", "**FIRST_STEP");
+
+ // Since Godot is initialized on the UI thread, _main_thread_id was set to that thread's id,
+ // but for Godot purposes, the main thread is the one running the game loop
+ Main::setup2(Thread::get_caller_id());
++step;
- suspend_mutex->unlock();
- input_mutex->unlock();
return;
- };
+ }
+
if (step == 1) {
if (!Main::start()) {
-
- input_mutex->unlock();
- suspend_mutex->lock();
return; //should exit instead and print the error
}
@@ -1026,6 +1009,8 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, job
++step;
}
+ //__android_log_print(ANDROID_LOG_INFO,"godot","**STEP EVENT! - %p-%i\n",env,Thread::get_caller_id());
+
while (pointer_events.size()) {
JAndroidPointerEvent jpe = pointer_events.front()->get();
@@ -1056,8 +1041,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, job
go_back_request = false;
}
- input_mutex->unlock();
-
os_android->process_accelerometer(accelerometer);
os_android->process_magnetometer(magnetometer);
@@ -1071,8 +1054,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, job
env->CallVoidMethod(_godot_instance, _finish);
__android_log_print(ANDROID_LOG_INFO, "godot", "**FINISH REQUEST!!! - %p-%i\n", env, Thread::get_caller_id());
}
-
- suspend_mutex->unlock();
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_touch(JNIEnv *env, jobject obj, jint ev, jint pointer, jint count, jintArray positions) {
@@ -1095,11 +1076,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_touch(JNIEnv *env, jo
jpe.points = points;
jpe.what = ev;
- input_mutex->lock();
-
pointer_events.push_back(jpe);
-
- input_mutex->unlock();
/*
if (os_android)
os_android->process_touch(ev,pointer,points);
@@ -1369,9 +1346,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joybutton(JNIEnv *env
jevent.index = p_button;
jevent.pressed = p_pressed;
- input_mutex->lock();
joy_events.push_back(jevent);
- input_mutex->unlock();
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyaxis(JNIEnv *env, jobject obj, jint p_device, jint p_axis, jfloat p_value) {
@@ -1382,9 +1357,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyaxis(JNIEnv *env,
jevent.index = p_axis;
jevent.value = p_value;
- input_mutex->lock();
joy_events.push_back(jevent);
- input_mutex->unlock();
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyhat(JNIEnv *env, jobject obj, jint p_device, jint p_hat_x, jint p_hat_y) {
@@ -1405,9 +1378,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyhat(JNIEnv *env, j
hat |= InputDefault::HAT_MASK_DOWN;
}
jevent.hat = hat;
- input_mutex->lock();
joy_events.push_back(jevent);
- input_mutex->unlock();
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_joyconnectionchanged(JNIEnv *env, jobject obj, jint p_device, jboolean p_connected, jstring p_name) {
@@ -1441,54 +1412,31 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_key(JNIEnv *env, jobj
go_back_request = true;
}
- input_mutex->lock();
key_events.push_back(ievent);
- input_mutex->unlock();
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_accelerometer(JNIEnv *env, jobject obj, jfloat x, jfloat y, jfloat z) {
-
- input_mutex->lock();
accelerometer = Vector3(x, y, z);
- input_mutex->unlock();
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_magnetometer(JNIEnv *env, jobject obj, jfloat x, jfloat y, jfloat z) {
-
- input_mutex->lock();
magnetometer = Vector3(x, y, z);
- input_mutex->unlock();
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_gyroscope(JNIEnv *env, jobject obj, jfloat x, jfloat y, jfloat z) {
-
- input_mutex->lock();
gyroscope = Vector3(x, y, z);
- input_mutex->unlock();
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusin(JNIEnv *env, jobject obj) {
- if (!suspend_mutex)
- return;
- suspend_mutex->lock();
-
if (os_android && step > 0)
os_android->main_loop_focusin();
-
- suspend_mutex->unlock();
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_focusout(JNIEnv *env, jobject obj) {
- if (!suspend_mutex)
- return;
- suspend_mutex->lock();
-
if (os_android && step > 0)
os_android->main_loop_focusout();
-
- suspend_mutex->unlock();
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_audio(JNIEnv *env, jobject obj) {
diff --git a/platform/android/java_glue.h b/platform/android/java_glue.h
index dd62cb2431..ec8ae9a0a6 100644
--- a/platform/android/java_glue.h
+++ b/platform/android/java_glue.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -36,7 +36,8 @@
#include <jni.h>
extern "C" {
-JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jobject obj, jobject activity, jboolean p_need_reload_hook, jobjectArray p_cmdline, jobject p_asset_manager);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_initialize(JNIEnv *env, jobject obj, jobject activity, jboolean p_need_reload_hook, jobject p_asset_manager, jboolean p_use_apk_expansion);
+JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jobject obj, jobjectArray p_cmdline);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_resize(JNIEnv *env, jobject obj, jint width, jint height, jboolean reload);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_newcontext(JNIEnv *env, jobject obj, bool p_32_bits);
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jobject obj);
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index a027e78de9..1de2608b9e 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -146,7 +146,6 @@ void OS_Android::initialize(const VideoMode &p_desired, int p_video_driver, int
physics_server = memnew(PhysicsServerSW);
physics_server->init();
- //physics_2d_server = memnew( Physics2DServerSW );
physics_2d_server = Physics2DServerWrapMT::init_server<Physics2DServerSW>();
physics_2d_server->init();
@@ -160,43 +159,6 @@ void OS_Android::set_main_loop(MainLoop *p_main_loop) {
main_loop = p_main_loop;
input->set_main_loop(p_main_loop);
-#if 0
-
- print_line("preGS");
- FileAccess *f=memnew( FileAccessAndroid );
- print("made f %p\n",f);
- Error err = f->open("AndroidManifest.xml",FileAccess::READ);
- if (err) {
-
- print("************NO FILE!!\n");
- } else {
- print("************YES FILE!!\n");
- }
- f->close();
- print_line("end");
-
-
- AAssetDir* aad = AAssetManager_openDir(FileAccessAndroid::asset_manager,".");
-
- if (aad) {
-
- print_line("DIR OPEN OK");
-
- const char *fn= AAssetDir_getNextFileName(aad);
-
- while(fn) {
-
- print_line("FNAME: "+String(fn));
- fn= AAssetDir_getNextFileName(aad);
- }
-
- AAssetDir_close(aad);
- } else {
-
- print_line("DIR NO OPEN");
- }
-
-#endif
}
void OS_Android::delete_main_loop() {
diff --git a/platform/android/os_android.h b/platform/android/os_android.h
index 54d7e562e0..119c14bff3 100644
--- a/platform/android/os_android.h
+++ b/platform/android/os_android.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -110,11 +110,8 @@ private:
mutable String data_dir_cache;
-#if 0
- AudioDriverAndroid audio_driver_android;
-#else
+ //AudioDriverAndroid audio_driver_android;
AudioDriverOpenSL audio_driver_android;
-#endif
const char *gl_extensions;
diff --git a/platform/android/platform_config.h b/platform/android/platform_config.h
index 48bcadcc29..b1c3f027f3 100644
--- a/platform/android/platform_config.h
+++ b/platform/android/platform_config.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/power_android.cpp b/platform/android/power_android.cpp
index bb5a1db250..98d4d810b9 100644
--- a/platform/android/power_android.cpp
+++ b/platform/android/power_android.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/power_android.h b/platform/android/power_android.h
index 328a4506a1..fc618c660d 100644
--- a/platform/android/power_android.h
+++ b/platform/android/power_android.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/android/thread_jandroid.cpp b/platform/android/thread_jandroid.cpp
index 924ae3fe43..79488197ea 100644
--- a/platform/android/thread_jandroid.cpp
+++ b/platform/android/thread_jandroid.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -29,9 +29,19 @@
/*************************************************************************/
#include "thread_jandroid.h"
+#include "core/safe_refcount.h"
#include "os/memory.h"
#include "script_language.h"
+static pthread_key_t _create_thread_id_key() {
+ pthread_key_t key;
+ pthread_key_create(&key, NULL);
+ return key;
+}
+
+pthread_key_t ThreadAndroid::thread_id_key = _create_thread_id_key();
+Thread::ID ThreadAndroid::next_thread_id = 0;
+
Thread::ID ThreadAndroid::get_id() const {
return id;
@@ -47,7 +57,8 @@ void *ThreadAndroid::thread_callback(void *userdata) {
ThreadAndroid *t = reinterpret_cast<ThreadAndroid *>(userdata);
setup_thread();
ScriptServer::thread_enter(); //scripts may need to attach a stack
- t->id = (ID)pthread_self();
+ t->id = atomic_increment(&next_thread_id);
+ pthread_setspecific(thread_id_key, (void *)t->id);
t->callback(t->user);
ScriptServer::thread_exit();
return NULL;
@@ -68,7 +79,7 @@ Thread *ThreadAndroid::create_func_jandroid(ThreadCreateCallback p_callback, voi
Thread::ID ThreadAndroid::get_thread_id_func_jandroid() {
- return (ID)pthread_self();
+ return (ID)pthread_getspecific(thread_id_key);
}
void ThreadAndroid::wait_to_finish_func_jandroid(Thread *p_thread) {
diff --git a/platform/android/thread_jandroid.h b/platform/android/thread_jandroid.h
index 5267329744..b854a83e23 100644
--- a/platform/android/thread_jandroid.h
+++ b/platform/android/thread_jandroid.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -41,6 +41,9 @@
class ThreadAndroid : public Thread {
+ static pthread_key_t thread_id_key;
+ static ID next_thread_id;
+
pthread_t pthread;
pthread_attr_t pthread_attr;
ThreadCreateCallback callback;
diff --git a/platform/haiku/audio_driver_media_kit.cpp b/platform/haiku/audio_driver_media_kit.cpp
index 802f6b2d32..4d8d580660 100644
--- a/platform/haiku/audio_driver_media_kit.cpp
+++ b/platform/haiku/audio_driver_media_kit.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/audio_driver_media_kit.h b/platform/haiku/audio_driver_media_kit.h
index 2cceb279e8..2f4752a973 100644
--- a/platform/haiku/audio_driver_media_kit.h
+++ b/platform/haiku/audio_driver_media_kit.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/context_gl_haiku.cpp b/platform/haiku/context_gl_haiku.cpp
index eb5e60152f..2b943df5ba 100644
--- a/platform/haiku/context_gl_haiku.cpp
+++ b/platform/haiku/context_gl_haiku.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/context_gl_haiku.h b/platform/haiku/context_gl_haiku.h
index 074b4bf0d1..40daf43ab9 100644
--- a/platform/haiku/context_gl_haiku.h
+++ b/platform/haiku/context_gl_haiku.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/godot_haiku.cpp b/platform/haiku/godot_haiku.cpp
index 3a8206d9d5..ffc6e56cdd 100644
--- a/platform/haiku/godot_haiku.cpp
+++ b/platform/haiku/godot_haiku.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/haiku_application.cpp b/platform/haiku/haiku_application.cpp
index 1f0c9fdcbf..d23b9e27d8 100644
--- a/platform/haiku/haiku_application.cpp
+++ b/platform/haiku/haiku_application.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/haiku_application.h b/platform/haiku/haiku_application.h
index 6e690d4ab8..2162cae892 100644
--- a/platform/haiku/haiku_application.h
+++ b/platform/haiku/haiku_application.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/haiku_direct_window.cpp b/platform/haiku/haiku_direct_window.cpp
index 4a9f8c780d..572df493ff 100644
--- a/platform/haiku/haiku_direct_window.cpp
+++ b/platform/haiku/haiku_direct_window.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/haiku_direct_window.h b/platform/haiku/haiku_direct_window.h
index 3671c3c9cb..0f3e9de85b 100644
--- a/platform/haiku/haiku_direct_window.h
+++ b/platform/haiku/haiku_direct_window.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/haiku_gl_view.cpp b/platform/haiku/haiku_gl_view.cpp
index dd568f281e..d898bd1a5d 100644
--- a/platform/haiku/haiku_gl_view.cpp
+++ b/platform/haiku/haiku_gl_view.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/haiku_gl_view.h b/platform/haiku/haiku_gl_view.h
index 14e2889d6c..10facfe0c3 100644
--- a/platform/haiku/haiku_gl_view.h
+++ b/platform/haiku/haiku_gl_view.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/key_mapping_haiku.cpp b/platform/haiku/key_mapping_haiku.cpp
index 3db31fa3e4..074f03f471 100644
--- a/platform/haiku/key_mapping_haiku.cpp
+++ b/platform/haiku/key_mapping_haiku.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/key_mapping_haiku.h b/platform/haiku/key_mapping_haiku.h
index 8d09203737..943ba21e7c 100644
--- a/platform/haiku/key_mapping_haiku.h
+++ b/platform/haiku/key_mapping_haiku.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/os_haiku.cpp b/platform/haiku/os_haiku.cpp
index e897d4c385..de2f79a0ac 100644
--- a/platform/haiku/os_haiku.cpp
+++ b/platform/haiku/os_haiku.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -27,16 +27,15 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include <Screen.h>
+#include "os_haiku.h"
-#include "drivers/gles2/rasterizer_gles2.h"
+#include "drivers/gles3/rasterizer_gles3.h"
+#include "main/main.h"
#include "servers/physics/physics_server_sw.h"
#include "servers/visual/visual_server_raster.h"
#include "servers/visual/visual_server_wrap_mt.h"
-//#include "servers/physics_2d/physics_2d_server_wrap_mt.h"
-#include "main/main.h"
-#include "os_haiku.h"
+#include <Screen.h>
OS_Haiku::OS_Haiku() {
#ifdef MEDIA_KIT_ENABLED
diff --git a/platform/haiku/os_haiku.h b/platform/haiku/os_haiku.h
index 4440f2843d..cb68f9303f 100644
--- a/platform/haiku/os_haiku.h
+++ b/platform/haiku/os_haiku.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/platform_config.h b/platform/haiku/platform_config.h
index e59b9bac80..27731a7b74 100644
--- a/platform/haiku/platform_config.h
+++ b/platform/haiku/platform_config.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/power_haiku.cpp b/platform/haiku/power_haiku.cpp
index b0d01df982..449b43a621 100644
--- a/platform/haiku/power_haiku.cpp
+++ b/platform/haiku/power_haiku.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/haiku/power_haiku.h b/platform/haiku/power_haiku.h
index 711ad86a02..12513bdaef 100644
--- a/platform/haiku/power_haiku.h
+++ b/platform/haiku/power_haiku.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/app_delegate.h b/platform/iphone/app_delegate.h
index f357427144..4a1f52565a 100644
--- a/platform/iphone/app_delegate.h
+++ b/platform/iphone/app_delegate.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm
index 362cfd1478..c7b65b476b 100644
--- a/platform/iphone/app_delegate.mm
+++ b/platform/iphone/app_delegate.mm
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/audio_driver_iphone.cpp b/platform/iphone/audio_driver_iphone.cpp
index d8374147c8..dbc5bdb654 100644
--- a/platform/iphone/audio_driver_iphone.cpp
+++ b/platform/iphone/audio_driver_iphone.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/audio_driver_iphone.h b/platform/iphone/audio_driver_iphone.h
index c620e9068c..930ed168f7 100644
--- a/platform/iphone/audio_driver_iphone.h
+++ b/platform/iphone/audio_driver_iphone.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py
index 1d802ff288..0b81422fa3 100644
--- a/platform/iphone/detect.py
+++ b/platform/iphone/detect.py
@@ -13,7 +13,7 @@ def get_name():
def can_build():
- if sys.platform == 'darwin' or os.environ.has_key("OSXCROSS_IOS"):
+ if sys.platform == 'darwin' or ("OSXCROSS_IOS" in os.environ):
return True
return False
@@ -83,11 +83,11 @@ def configure(env):
if (env["arch"] == "x86"):
env['IPHONEPLATFORM'] = 'iPhoneSimulator'
env['ENV']['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
- env.Append(CCFLAGS=string.split('-arch i386 -fobjc-abi-version=2 -fobjc-legacy-dispatch -fmessage-length=0 -fpascal-strings -fblocks -fasm-blocks -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -isysroot $IPHONESDK -mios-simulator-version-min=4.3 -DCUSTOM_MATRIX_TRANSFORM_H=\\\"build/iphone/matrix4_iphone.h\\\" -DCUSTOM_VECTOR3_TRANSFORM_H=\\\"build/iphone/vector3_iphone.h\\\"'))
+ env.Append(CCFLAGS='-arch i386 -fobjc-abi-version=2 -fobjc-legacy-dispatch -fmessage-length=0 -fpascal-strings -fblocks -fasm-blocks -D__IPHONE_OS_VERSION_MIN_REQUIRED=40100 -isysroot $IPHONESDK -mios-simulator-version-min=4.3 -DCUSTOM_MATRIX_TRANSFORM_H=\\\"build/iphone/matrix4_iphone.h\\\" -DCUSTOM_VECTOR3_TRANSFORM_H=\\\"build/iphone/vector3_iphone.h\\\"'.split())
elif (env["arch"] == "arm"):
- env.Append(CCFLAGS=string.split('-fno-objc-arc -arch armv7 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fblocks -isysroot $IPHONESDK -fvisibility=hidden -mthumb "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=9.0 -MMD -MT dependencies'))
+ env.Append(CCFLAGS='-fno-objc-arc -arch armv7 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fblocks -isysroot $IPHONESDK -fvisibility=hidden -mthumb "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -miphoneos-version-min=9.0 -MMD -MT dependencies'.split())
elif (env["arch"] == "arm64"):
- env.Append(CCFLAGS=string.split('-fno-objc-arc -arch arm64 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies -miphoneos-version-min=9.0 -isysroot $IPHONESDK'))
+ env.Append(CCFLAGS='-fno-objc-arc -arch arm64 -fmessage-length=0 -fno-strict-aliasing -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies -miphoneos-version-min=9.0 -isysroot $IPHONESDK'.split())
env.Append(CPPFLAGS=['-DNEED_LONG_INT'])
env.Append(CPPFLAGS=['-DLIBYUV_DISABLE_NEON'])
diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp
index 6ae2a0692d..8bb7f23ead 100644
--- a/platform/iphone/export/export.cpp
+++ b/platform/iphone/export/export.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/export/export.h b/platform/iphone/export/export.h
index 6e9324aed7..1b96b8338a 100644
--- a/platform/iphone/export/export.h
+++ b/platform/iphone/export/export.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/game_center.h b/platform/iphone/game_center.h
index cda6f78a1f..c0a7830fe9 100644
--- a/platform/iphone/game_center.h
+++ b/platform/iphone/game_center.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/game_center.mm b/platform/iphone/game_center.mm
index f9bc70b7c4..c05bdea005 100644
--- a/platform/iphone/game_center.mm
+++ b/platform/iphone/game_center.mm
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/gl_view.h b/platform/iphone/gl_view.h
index 14e9a66a4a..a9fd8d5711 100644
--- a/platform/iphone/gl_view.h
+++ b/platform/iphone/gl_view.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/gl_view.mm b/platform/iphone/gl_view.mm
index f2778e8165..3e206c3a2c 100644
--- a/platform/iphone/gl_view.mm
+++ b/platform/iphone/gl_view.mm
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/globals/global_defaults.cpp b/platform/iphone/globals/global_defaults.cpp
index aa4662302d..4bdc716d6e 100644
--- a/platform/iphone/globals/global_defaults.cpp
+++ b/platform/iphone/globals/global_defaults.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/globals/global_defaults.h b/platform/iphone/globals/global_defaults.h
index 6fe1027287..ee8ae833b9 100644
--- a/platform/iphone/globals/global_defaults.h
+++ b/platform/iphone/globals/global_defaults.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/godot_iphone.cpp b/platform/iphone/godot_iphone.cpp
index 4d34ebedf9..8c6d6d8da4 100644
--- a/platform/iphone/godot_iphone.cpp
+++ b/platform/iphone/godot_iphone.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/icloud.h b/platform/iphone/icloud.h
index 67d12a990a..6944ee6749 100644
--- a/platform/iphone/icloud.h
+++ b/platform/iphone/icloud.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* icloud.h */
+/* icloud.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/icloud.mm b/platform/iphone/icloud.mm
index 94c3d2ef91..097018f296 100644
--- a/platform/iphone/icloud.mm
+++ b/platform/iphone/icloud.mm
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* icloud.mm */
+/* icloud.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/in_app_store.h b/platform/iphone/in_app_store.h
index 153c46bd7b..4c12f825c1 100644
--- a/platform/iphone/in_app_store.h
+++ b/platform/iphone/in_app_store.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/in_app_store.mm b/platform/iphone/in_app_store.mm
index 710df0f757..9efd4b9891 100644
--- a/platform/iphone/in_app_store.mm
+++ b/platform/iphone/in_app_store.mm
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/ios.h b/platform/iphone/ios.h
index 2572d626d2..0c2e6b4aa6 100644
--- a/platform/iphone/ios.h
+++ b/platform/iphone/ios.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/ios.mm b/platform/iphone/ios.mm
index 6c95903241..add0949f94 100644
--- a/platform/iphone/ios.mm
+++ b/platform/iphone/ios.mm
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/main.m b/platform/iphone/main.m
index 6757cc8146..0de5c3b41b 100644
--- a/platform/iphone/main.m
+++ b/platform/iphone/main.m
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index df497349ae..0e3eeed114 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/os_iphone.h b/platform/iphone/os_iphone.h
index cf2766bb33..475dceebf2 100644
--- a/platform/iphone/os_iphone.h
+++ b/platform/iphone/os_iphone.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -47,7 +47,6 @@
#include "servers/visual_server.h"
class AudioDriverIphone;
-// class RasterizerGLES2;
class OSIPhone : public OS_Unix {
@@ -67,9 +66,6 @@ private:
uint8_t supported_orientations;
- // Rasterizer *rasterizer;
- // RasterizerGLES2* rasterizer_gles22;
-
VisualServer *visual_server;
PhysicsServer *physics_server;
Physics2DServer *physics_2d_server;
diff --git a/platform/iphone/platform_config.h b/platform/iphone/platform_config.h
index 7e4b533254..54de66082e 100644
--- a/platform/iphone/platform_config.h
+++ b/platform/iphone/platform_config.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/platform_refcount.h b/platform/iphone/platform_refcount.h
index c02e709ea1..8d04340793 100644
--- a/platform/iphone/platform_refcount.h
+++ b/platform/iphone/platform_refcount.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/power_iphone.cpp b/platform/iphone/power_iphone.cpp
index 5192f8e593..2811e62108 100644
--- a/platform/iphone/power_iphone.cpp
+++ b/platform/iphone/power_iphone.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/power_iphone.h b/platform/iphone/power_iphone.h
index 174ee6c63b..b4fb8d62dc 100644
--- a/platform/iphone/power_iphone.h
+++ b/platform/iphone/power_iphone.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/sem_iphone.cpp b/platform/iphone/sem_iphone.cpp
index 4614b201a4..623749f891 100644
--- a/platform/iphone/sem_iphone.cpp
+++ b/platform/iphone/sem_iphone.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/sem_iphone.h b/platform/iphone/sem_iphone.h
index 90db0fb74d..9ae201557f 100644
--- a/platform/iphone/sem_iphone.h
+++ b/platform/iphone/sem_iphone.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/view_controller.h b/platform/iphone/view_controller.h
index 57ed576c25..ed33e5fdf3 100644
--- a/platform/iphone/view_controller.h
+++ b/platform/iphone/view_controller.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/iphone/view_controller.mm b/platform/iphone/view_controller.mm
index 921ef8f607..23d60cc5d5 100644
--- a/platform/iphone/view_controller.mm
+++ b/platform/iphone/view_controller.mm
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/javascript/audio_driver_javascript.cpp b/platform/javascript/audio_driver_javascript.cpp
index 3e37ec293e..4c0e5fd966 100644
--- a/platform/javascript/audio_driver_javascript.cpp
+++ b/platform/javascript/audio_driver_javascript.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/javascript/audio_driver_javascript.h b/platform/javascript/audio_driver_javascript.h
index 7ccaff0f43..c5cebe800f 100644
--- a/platform/javascript/audio_driver_javascript.h
+++ b/platform/javascript/audio_driver_javascript.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/javascript/audio_server_javascript.cpp b/platform/javascript/audio_server_javascript.cpp
index f9b7890e12..ab9f66ce5b 100644
--- a/platform/javascript/audio_server_javascript.cpp
+++ b/platform/javascript/audio_server_javascript.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "audio_server_javascript.h"
+
+// FIXME: Needs to be ported to the new AudioServer API in 3.0
#if 0
#include "emscripten.h"
diff --git a/platform/javascript/audio_server_javascript.h b/platform/javascript/audio_server_javascript.h
index 58c240f793..0773459f56 100644
--- a/platform/javascript/audio_server_javascript.h
+++ b/platform/javascript/audio_server_javascript.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -29,6 +29,8 @@
/*************************************************************************/
#ifndef AUDIO_SERVER_JAVASCRIPT_H
#define AUDIO_SERVER_JAVASCRIPT_H
+
+// FIXME: Needs to be ported to the new AudioServer API in 3.0
#if 0
#include "servers/audio_server.h"
diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py
index 68c8d1eea5..5f066f1b15 100644
--- a/platform/javascript/detect.py
+++ b/platform/javascript/detect.py
@@ -13,7 +13,7 @@ def get_name():
def can_build():
- return (os.environ.has_key("EMSCRIPTEN_ROOT"))
+ return ("EMSCRIPTEN_ROOT" in os.environ)
def get_opts():
diff --git a/platform/javascript/dom_keys.h b/platform/javascript/dom_keys.h
index 4b8b764c45..d63f165382 100644
--- a/platform/javascript/dom_keys.h
+++ b/platform/javascript/dom_keys.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp
index b436d52363..5a161dd0ab 100644
--- a/platform/javascript/export/export.cpp
+++ b/platform/javascript/export/export.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/javascript/export/export.h b/platform/javascript/export/export.h
index 910c4119f7..0cea0a213b 100644
--- a/platform/javascript/export/export.h
+++ b/platform/javascript/export/export.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/javascript/javascript_eval.cpp b/platform/javascript/javascript_eval.cpp
index c9312e8d30..74f8d80a76 100644
--- a/platform/javascript/javascript_eval.cpp
+++ b/platform/javascript/javascript_eval.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/javascript/javascript_eval.h b/platform/javascript/javascript_eval.h
index 4a732cec76..ed7cf383da 100644
--- a/platform/javascript/javascript_eval.h
+++ b/platform/javascript/javascript_eval.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/javascript/javascript_main.cpp b/platform/javascript/javascript_main.cpp
index 6b1d574496..4c948bf181 100644
--- a/platform/javascript/javascript_main.cpp
+++ b/platform/javascript/javascript_main.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp
index 479a782d25..ac8d367366 100644
--- a/platform/javascript/os_javascript.cpp
+++ b/platform/javascript/os_javascript.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/javascript/os_javascript.h b/platform/javascript/os_javascript.h
index ff484204c7..f78a3f2768 100644
--- a/platform/javascript/os_javascript.h
+++ b/platform/javascript/os_javascript.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/javascript/platform_config.h b/platform/javascript/platform_config.h
index 48bcadcc29..b1c3f027f3 100644
--- a/platform/javascript/platform_config.h
+++ b/platform/javascript/platform_config.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/javascript/power_javascript.cpp b/platform/javascript/power_javascript.cpp
index bd4502fc2a..3d54146595 100644
--- a/platform/javascript/power_javascript.cpp
+++ b/platform/javascript/power_javascript.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/javascript/power_javascript.h b/platform/javascript/power_javascript.h
index c7b853ce11..834d765557 100644
--- a/platform/javascript/power_javascript.h
+++ b/platform/javascript/power_javascript.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/osx/audio_driver_osx.cpp b/platform/osx/audio_driver_osx.cpp
index da5cd8f65e..78c52af201 100644
--- a/platform/osx/audio_driver_osx.cpp
+++ b/platform/osx/audio_driver_osx.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -77,7 +77,7 @@ Error AudioDriverOSX::initDevice() {
break;
}*/
- mix_rate = GLOBAL_DEF("audio/mix_rate", 44100);
+ mix_rate = GLOBAL_DEF("audio/mix_rate", DEFAULT_MIX_RATE);
zeromem(&strdesc, sizeof(strdesc));
strdesc.mFormatID = kAudioFormatLinearPCM;
@@ -92,15 +92,19 @@ Error AudioDriverOSX::initDevice() {
result = AudioUnitSetProperty(audio_unit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, kOutputBus, &strdesc, sizeof(strdesc));
ERR_FAIL_COND_V(result != noErr, FAILED);
- int latency = GLOBAL_DEF("audio/output_latency", 25);
- unsigned int buffer_size = closest_power_of_2(latency * mix_rate / 1000);
+ int latency = GLOBAL_DEF("audio/output_latency", DEFAULT_OUTPUT_LATENCY);
+ // Sample rate is independent of channels (ref: https://stackoverflow.com/questions/11048825/audio-sample-frequency-rely-on-channels)
+ buffer_frames = closest_power_of_2(latency * mix_rate / 1000);
- if (OS::get_singleton()->is_stdout_verbose()) {
- print_line("audio buffer size: " + itos(buffer_size) + " calculated latency: " + itos(buffer_size * 1000 / mix_rate));
- }
+ result = AudioUnitSetProperty(audio_unit, kAudioDevicePropertyBufferFrameSize, kAudioUnitScope_Global, kOutputBus, &buffer_frames, sizeof(UInt32));
+ ERR_FAIL_COND_V(result != noErr, FAILED);
+ buffer_size = buffer_frames * channels;
samples_in.resize(buffer_size);
- buffer_frames = buffer_size / channels;
+
+ if (OS::get_singleton()->is_stdout_verbose()) {
+ print_line("audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms");
+ }
AURenderCallbackStruct callback;
zeromem(&callback, sizeof(AURenderCallbackStruct));
@@ -234,7 +238,7 @@ void AudioDriverOSX::start() {
};
int AudioDriverOSX::get_mix_rate() const {
- return 44100;
+ return mix_rate;
};
AudioDriver::SpeakerMode AudioDriverOSX::get_speaker_mode() const {
@@ -282,8 +286,12 @@ AudioDriverOSX::AudioDriverOSX() {
active = false;
mutex = NULL;
- mix_rate = 44100;
+ mix_rate = 0;
channels = 2;
+
+ buffer_size = 0;
+ buffer_frames = 0;
+
samples_in.clear();
};
diff --git a/platform/osx/audio_driver_osx.h b/platform/osx/audio_driver_osx.h
index 4576100690..a7e68c8141 100644
--- a/platform/osx/audio_driver_osx.h
+++ b/platform/osx/audio_driver_osx.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -45,8 +45,9 @@ class AudioDriverOSX : public AudioDriver {
Mutex *mutex;
int mix_rate;
- int channels;
- int buffer_frames;
+ unsigned int channels;
+ unsigned int buffer_frames;
+ unsigned int buffer_size;
Vector<int32_t> samples_in;
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index d9891dda61..d3ebdfe992 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -12,7 +12,7 @@ def get_name():
def can_build():
- if (sys.platform == "darwin" or os.environ.has_key("OSXCROSS_ROOT")):
+ if (sys.platform == "darwin" or ("OSXCROSS_ROOT" in os.environ)):
return True
return False
@@ -65,10 +65,14 @@ def configure(env):
else: # osxcross build
root = os.environ.get("OSXCROSS_ROOT", 0)
- if env["bits"] == "64":
+ if env["bits"] == "fat":
basecmd = root + "/target/bin/x86_64-apple-" + env["osxcross_sdk"] + "-"
- else:
+ env.Append(CCFLAGS=['-arch', 'i386', '-arch', 'x86_64'])
+ env.Append(LINKFLAGS=['-arch', 'i386', '-arch', 'x86_64'])
+ elif env["bits"] == "32":
basecmd = root + "/target/bin/i386-apple-" + env["osxcross_sdk"] + "-"
+ else: # 64-bit, default
+ basecmd = root + "/target/bin/x86_64-apple-" + env["osxcross_sdk"] + "-"
env['CC'] = basecmd + "cc"
env['CXX'] = basecmd + "c++"
diff --git a/platform/osx/dir_access_osx.h b/platform/osx/dir_access_osx.h
index 6dcff3898c..c988dfe425 100644
--- a/platform/osx/dir_access_osx.h
+++ b/platform/osx/dir_access_osx.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/osx/dir_access_osx.mm b/platform/osx/dir_access_osx.mm
index 37ba0e6b19..6e8ceb5e19 100644
--- a/platform/osx/dir_access_osx.mm
+++ b/platform/osx/dir_access_osx.mm
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index 03f424de8d..7f749030ec 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/osx/export/export.h b/platform/osx/export/export.h
index 50604f068f..bb87c8a6b7 100644
--- a/platform/osx/export/export.h
+++ b/platform/osx/export/export.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/osx/godot_main_osx.mm b/platform/osx/godot_main_osx.mm
index 0bf678f9b7..83d782cc2f 100644
--- a/platform/osx/godot_main_osx.mm
+++ b/platform/osx/godot_main_osx.mm
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/osx/joypad_osx.cpp b/platform/osx/joypad_osx.cpp
index 96c660ad1d..ab323ad410 100644
--- a/platform/osx/joypad_osx.cpp
+++ b/platform/osx/joypad_osx.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/osx/joypad_osx.h b/platform/osx/joypad_osx.h
index bfbc523cff..4bdef8eb83 100644
--- a/platform/osx/joypad_osx.h
+++ b/platform/osx/joypad_osx.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* joypad_osx.h */
+/* joypad_osx.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h
index 827114cd2b..ebaebd84ce 100644
--- a/platform/osx/os_osx.h
+++ b/platform/osx/os_osx.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -160,6 +160,8 @@ public:
virtual MainLoop *get_main_loop() const;
+ virtual String get_system_dir(SystemDir p_dir) const;
+
virtual bool can_draw() const;
virtual void set_clipboard(const String &p_text);
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index a0fc53d517..f502fb9a9c 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -1327,6 +1327,46 @@ MainLoop *OS_OSX::get_main_loop() const {
return main_loop;
}
+String OS_OSX::get_system_dir(SystemDir p_dir) const {
+
+ NSSearchPathDirectory id = 0;
+
+ switch (p_dir) {
+ case SYSTEM_DIR_DESKTOP: {
+ id = NSDesktopDirectory;
+ } break;
+ case SYSTEM_DIR_DOCUMENTS: {
+ id = NSDocumentDirectory;
+ } break;
+ case SYSTEM_DIR_DOWNLOADS: {
+ id = NSDownloadsDirectory;
+ } break;
+ case SYSTEM_DIR_MOVIES: {
+ id = NSMoviesDirectory;
+ } break;
+ case SYSTEM_DIR_MUSIC: {
+ id = NSMusicDirectory;
+ } break;
+ case SYSTEM_DIR_PICTURES: {
+ id = NSPicturesDirectory;
+ } break;
+ }
+
+ String ret;
+ if (id) {
+
+ NSArray *paths = NSSearchPathForDirectoriesInDomains(id, NSUserDomainMask, YES);
+ if (paths && [paths count] >= 1) {
+
+ char *utfs = strdup([[paths firstObject] UTF8String]);
+ ret.parse_utf8(utfs);
+ free(utfs);
+ }
+ }
+
+ return ret;
+}
+
bool OS_OSX::can_draw() const {
return true;
diff --git a/platform/osx/platform_config.h b/platform/osx/platform_config.h
index 487077e651..d2474fcfc7 100644
--- a/platform/osx/platform_config.h
+++ b/platform/osx/platform_config.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/osx/power_osx.cpp b/platform/osx/power_osx.cpp
index 2ef1a65ff1..5f3938cb91 100644
--- a/platform/osx/power_osx.cpp
+++ b/platform/osx/power_osx.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* power_osx.cpp */
+/* power_osx.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/osx/power_osx.h b/platform/osx/power_osx.h
index 6d984ec466..692c850d7c 100644
--- a/platform/osx/power_osx.h
+++ b/platform/osx/power_osx.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/osx/sem_osx.cpp b/platform/osx/sem_osx.cpp
index b1eeccfec5..f75ac181bf 100644
--- a/platform/osx/sem_osx.cpp
+++ b/platform/osx/sem_osx.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/osx/sem_osx.h b/platform/osx/sem_osx.h
index 3025318c4b..2b408b00de 100644
--- a/platform/osx/sem_osx.h
+++ b/platform/osx/sem_osx.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/server/godot_server.cpp b/platform/server/godot_server.cpp
index ed0100ac93..2fd8c315de 100644
--- a/platform/server/godot_server.cpp
+++ b/platform/server/godot_server.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/server/os_server.cpp b/platform/server/os_server.cpp
index 89af785d29..44034e815d 100644
--- a/platform/server/os_server.cpp
+++ b/platform/server/os_server.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/server/os_server.h b/platform/server/os_server.h
index 7c29b1e232..f3db053be3 100644
--- a/platform/server/os_server.h
+++ b/platform/server/os_server.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/server/platform_config.h b/platform/server/platform_config.h
index 48bcadcc29..b1c3f027f3 100644
--- a/platform/server/platform_config.h
+++ b/platform/server/platform_config.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/uwp/app.cpp b/platform/uwp/app.cpp
index 8824d1c1d0..c565999d82 100644
--- a/platform/uwp/app.cpp
+++ b/platform/uwp/app.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/uwp/app.h b/platform/uwp/app.h
index 9cbe7669c9..e079fa9c9d 100644
--- a/platform/uwp/app.h
+++ b/platform/uwp/app.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/uwp/detect.py b/platform/uwp/detect.py
index 64dac93f1f..23929dd804 100644
--- a/platform/uwp/detect.py
+++ b/platform/uwp/detect.py
@@ -145,8 +145,8 @@ def configure(env):
env.Append(CPPFLAGS=['/AI', vc_base_path + 'lib/store/references'])
env.Append(CPPFLAGS=['/AI', vc_base_path + 'lib/x86/store/references'])
- env.Append(CCFLAGS=string.split('/FS /MP /GS /wd"4453" /wd"28204" /wd"4291" /Zc:wchar_t /Gm- /fp:precise /D "_UNICODE" /D "UNICODE" /D "WINAPI_FAMILY=WINAPI_FAMILY_APP" /errorReport:prompt /WX- /Zc:forScope /Gd /EHsc /nologo'))
- env.Append(CXXFLAGS=string.split('/ZW /FS'))
+ env.Append(CCFLAGS='/FS /MP /GS /wd"4453" /wd"28204" /wd"4291" /Zc:wchar_t /Gm- /fp:precise /D "_UNICODE" /D "UNICODE" /D "WINAPI_FAMILY=WINAPI_FAMILY_APP" /errorReport:prompt /WX- /Zc:forScope /Gd /EHsc /nologo'.split())
+ env.Append(CXXFLAGS='/ZW /FS'.split())
env.Append(CCFLAGS=['/AI', vc_base_path + '\\vcpackages', '/AI', os.environ['WINDOWSSDKDIR'] + '\\References\\CommonConfiguration\\Neutral'])
## Link flags
diff --git a/platform/uwp/export/export.cpp b/platform/uwp/export/export.cpp
index 68307c4e90..a2be126c58 100644
--- a/platform/uwp/export/export.cpp
+++ b/platform/uwp/export/export.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -501,7 +501,7 @@ void AppxPackager::add_file(String p_file_name, const uint8_t *p_buffer, size_t
size_t block_size = (p_len - step) > BLOCK_SIZE ? BLOCK_SIZE : (p_len - step);
- for (int i = 0; i < block_size; i++) {
+ for (uint32_t i = 0; i < block_size; i++) {
strm_in[i] = p_buffer[step + i];
}
@@ -523,14 +523,14 @@ void AppxPackager::add_file(String p_file_name, const uint8_t *p_buffer, size_t
//package->store_buffer(strm_out.ptr(), strm.total_out - total_out_before);
int start = file_buffer.size();
file_buffer.resize(file_buffer.size() + bh.compressed_size);
- for (int i = 0; i < bh.compressed_size; i++)
+ for (uint32_t i = 0; i < bh.compressed_size; i++)
file_buffer[start + i] = strm_out[i];
} else {
bh.compressed_size = block_size;
//package->store_buffer(strm_in.ptr(), block_size);
int start = file_buffer.size();
file_buffer.resize(file_buffer.size() + block_size);
- for (int i = 0; i < bh.compressed_size; i++)
+ for (uint32_t i = 0; i < bh.compressed_size; i++)
file_buffer[start + i] = strm_in[i];
}
@@ -553,7 +553,7 @@ void AppxPackager::add_file(String p_file_name, const uint8_t *p_buffer, size_t
//package->store_buffer(strm_out.ptr(), strm.total_out - total_out_before);
int start = file_buffer.size();
file_buffer.resize(file_buffer.size() + (strm.total_out - total_out_before));
- for (int i = 0; i < (strm.total_out - total_out_before); i++)
+ for (uint32_t i = 0; i < (strm.total_out - total_out_before); i++)
file_buffer[start + i] = strm_out[i];
deflateEnd(&strm);
@@ -866,22 +866,24 @@ class EditorExportUWP : public EditorExportPlatform {
Vector<uint8_t> _get_image_data(const Ref<EditorExportPreset> &p_preset, const String &p_path) {
Vector<uint8_t> data;
- StreamTexture *image;
+ StreamTexture *image = NULL;
if (p_path.find("StoreLogo") != -1) {
- image = p_preset->get("images/store_logo").is_zero() ? NULL : ((Object *)p_preset->get("images/store_logo"))->cast_to<StreamTexture>();
+ image = p_preset->get("images/store_logo").is_zero() ? NULL : Object::cast_to<StreamTexture>(((Object *)p_preset->get("images/store_logo")));
} else if (p_path.find("Square44x44Logo") != -1) {
- image = p_preset->get("images/square44x44_logo").is_zero() ? NULL : ((Object *)p_preset->get("images/square44x44_logo"))->cast_to<StreamTexture>();
+ image = p_preset->get("images/square44x44_logo").is_zero() ? NULL : Object::cast_to<StreamTexture>(((Object *)p_preset->get("images/square44x44_logo")));
} else if (p_path.find("Square71x71Logo") != -1) {
- image = p_preset->get("images/square71x71_logo").is_zero() ? NULL : ((Object *)p_preset->get("images/square71x71_logo"))->cast_to<StreamTexture>();
+ image = p_preset->get("images/square71x71_logo").is_zero() ? NULL : Object::cast_to<StreamTexture>(((Object *)p_preset->get("images/square71x71_logo")));
} else if (p_path.find("Square150x150Logo") != -1) {
- image = p_preset->get("images/square150x150_logo").is_zero() ? NULL : ((Object *)p_preset->get("images/square150x150_logo"))->cast_to<StreamTexture>();
+ image = p_preset->get("images/square150x150_logo").is_zero() ? NULL : Object::cast_to<StreamTexture>(((Object *)p_preset->get("images/square150x150_logo")));
} else if (p_path.find("Square310x310Logo") != -1) {
- image = p_preset->get("images/square310x310_logo").is_zero() ? NULL : ((Object *)p_preset->get("images/square310x310_logo"))->cast_to<StreamTexture>();
+ image = p_preset->get("images/square310x310_logo").is_zero() ? NULL : Object::cast_to<StreamTexture>(((Object *)p_preset->get("images/square310x310_logo")));
} else if (p_path.find("Wide310x150Logo") != -1) {
- image = p_preset->get("images/wide310x150_logo").is_zero() ? NULL : ((Object *)p_preset->get("images/wide310x150_logo"))->cast_to<StreamTexture>();
+ image = p_preset->get("images/wide310x150_logo").is_zero() ? NULL : Object::cast_to<StreamTexture>(((Object *)p_preset->get("images/wide310x150_logo")));
} else if (p_path.find("SplashScreen") != -1) {
- image = p_preset->get("images/splash_screen").is_zero() ? NULL : ((Object *)p_preset->get("images/splash_screen"))->cast_to<StreamTexture>();
+ image = p_preset->get("images/splash_screen").is_zero() ? NULL : Object::cast_to<StreamTexture>(((Object *)p_preset->get("images/splash_screen")));
+ } else {
+ ERR_PRINT("Unable to load logo");
}
if (!image) return data;
@@ -1162,37 +1164,37 @@ public:
err += "\nInvalid background color.";
}
- if (!p_preset->get("images/store_logo").is_zero() && !_valid_image(((Object *)p_preset->get("images/store_logo"))->cast_to<StreamTexture>(), 50, 50)) {
+ if (!p_preset->get("images/store_logo").is_zero() && !_valid_image((Object::cast_to<StreamTexture>((Object *)p_preset->get("images/store_logo"))), 50, 50)) {
valid = false;
err += "\nInvalid Store Logo image dimensions (should be 50x50).";
}
- if (!p_preset->get("images/square44x44_logo").is_zero() && !_valid_image(((Object *)p_preset->get("images/square44x44_logo"))->cast_to<StreamTexture>(), 44, 44)) {
+ if (!p_preset->get("images/square44x44_logo").is_zero() && !_valid_image((Object::cast_to<StreamTexture>((Object *)p_preset->get("images/square44x44_logo"))), 44, 44)) {
valid = false;
err += "\nInvalid square 44x44 logo image dimensions (should be 44x44).";
}
- if (!p_preset->get("images/square71x71_logo").is_zero() && !_valid_image(((Object *)p_preset->get("images/square71x71_logo"))->cast_to<StreamTexture>(), 71, 71)) {
+ if (!p_preset->get("images/square71x71_logo").is_zero() && !_valid_image((Object::cast_to<StreamTexture>((Object *)p_preset->get("images/square71x71_logo"))), 71, 71)) {
valid = false;
err += "\nInvalid square 71x71 logo image dimensions (should be 71x71).";
}
- if (!p_preset->get("images/square150x150_logo").is_zero() && !_valid_image(((Object *)p_preset->get("images/square150x150_logo"))->cast_to<StreamTexture>(), 150, 0)) {
+ if (!p_preset->get("images/square150x150_logo").is_zero() && !_valid_image((Object::cast_to<StreamTexture>((Object *)p_preset->get("images/square150x150_logo"))), 150, 0)) {
valid = false;
err += "\nInvalid square 150x150 logo image dimensions (should be 150x150).";
}
- if (!p_preset->get("images/square310x310_logo").is_zero() && !_valid_image(((Object *)p_preset->get("images/square310x310_logo"))->cast_to<StreamTexture>(), 310, 310)) {
+ if (!p_preset->get("images/square310x310_logo").is_zero() && !_valid_image((Object::cast_to<StreamTexture>((Object *)p_preset->get("images/square310x310_logo"))), 310, 310)) {
valid = false;
err += "\nInvalid square 310x310 logo image dimensions (should be 310x310).";
}
- if (!p_preset->get("images/wide310x150_logo").is_zero() && !_valid_image(((Object *)p_preset->get("images/wide310x150_logo"))->cast_to<StreamTexture>(), 310, 150)) {
+ if (!p_preset->get("images/wide310x150_logo").is_zero() && !_valid_image((Object::cast_to<StreamTexture>((Object *)p_preset->get("images/wide310x150_logo"))), 310, 150)) {
valid = false;
err += "\nInvalid wide 310x150 logo image dimensions (should be 310x150).";
}
- if (!p_preset->get("images/splash_screen").is_zero() && !_valid_image(((Object *)p_preset->get("images/splash_screen"))->cast_to<StreamTexture>(), 620, 300)) {
+ if (!p_preset->get("images/splash_screen").is_zero() && !_valid_image((Object::cast_to<StreamTexture>((Object *)p_preset->get("images/splash_screen"))), 620, 300)) {
valid = false;
err += "\nInvalid splash screen image dimensions (should be 620x300).";
}
diff --git a/platform/uwp/export/export.h b/platform/uwp/export/export.h
index 81bd848241..558af38a70 100644
--- a/platform/uwp/export/export.h
+++ b/platform/uwp/export/export.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/uwp/gl_context_egl.cpp b/platform/uwp/gl_context_egl.cpp
index 57c4c5d572..dd186c97d6 100644
--- a/platform/uwp/gl_context_egl.cpp
+++ b/platform/uwp/gl_context_egl.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/uwp/gl_context_egl.h b/platform/uwp/gl_context_egl.h
index 908b8dceec..1b24780b29 100644
--- a/platform/uwp/gl_context_egl.h
+++ b/platform/uwp/gl_context_egl.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/uwp/joypad_uwp.cpp b/platform/uwp/joypad_uwp.cpp
index f3d4eb99c8..0f84bd55a3 100644
--- a/platform/uwp/joypad_uwp.cpp
+++ b/platform/uwp/joypad_uwp.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -54,7 +54,7 @@ void JoypadUWP::process_controllers() {
case ControllerType::GAMEPAD_CONTROLLER: {
- GamepadReading reading = ((Gamepad ^) joy.controller_reference)->GetCurrentReading();
+ GamepadReading reading = ((Gamepad ^)joy.controller_reference)->GetCurrentReading();
int button_mask = (int)GamepadButtons::Menu;
for (int j = 0; j < 14; j++) {
@@ -161,7 +161,7 @@ void JoypadUWP::joypad_vibration_start(int p_device, float p_weak_magnitude, flo
GamepadVibration vibration;
vibration.LeftMotor = p_strong_magnitude;
vibration.RightMotor = p_weak_magnitude;
- ((Gamepad ^) joy.controller_reference)->Vibration = vibration;
+ ((Gamepad ^)joy.controller_reference)->Vibration = vibration;
joy.ff_timestamp = p_timestamp;
joy.ff_end_timestamp = p_duration == 0 ? 0 : p_timestamp + (uint64_t)(p_duration * 1000000.0);
@@ -175,7 +175,7 @@ void JoypadUWP::joypad_vibration_stop(int p_device, uint64_t p_timestamp) {
GamepadVibration vibration;
vibration.LeftMotor = 0.0;
vibration.RightMotor = 0.0;
- ((Gamepad ^) joy.controller_reference)->Vibration = vibration;
+ ((Gamepad ^)joy.controller_reference)->Vibration = vibration;
joy.ff_timestamp = p_timestamp;
joy.vibrating = false;
diff --git a/platform/uwp/joypad_uwp.h b/platform/uwp/joypad_uwp.h
index c55e1e7ab7..4efec485fa 100644
--- a/platform/uwp/joypad_uwp.h
+++ b/platform/uwp/joypad_uwp.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/uwp/os_uwp.cpp b/platform/uwp/os_uwp.cpp
index fabb227bf5..3a8932aae2 100644
--- a/platform/uwp/os_uwp.cpp
+++ b/platform/uwp/os_uwp.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/uwp/os_uwp.h b/platform/uwp/os_uwp.h
index dfa21a0934..5f36396017 100644
--- a/platform/uwp/os_uwp.h
+++ b/platform/uwp/os_uwp.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/uwp/platform_config.h b/platform/uwp/platform_config.h
index 77d2c9cadb..abe14f7578 100644
--- a/platform/uwp/platform_config.h
+++ b/platform/uwp/platform_config.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/uwp/power_uwp.cpp b/platform/uwp/power_uwp.cpp
index ece07f84ad..07a726647d 100644
--- a/platform/uwp/power_uwp.cpp
+++ b/platform/uwp/power_uwp.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/uwp/power_uwp.h b/platform/uwp/power_uwp.h
index c23d712980..9a9811a4f5 100644
--- a/platform/uwp/power_uwp.h
+++ b/platform/uwp/power_uwp.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/uwp/thread_uwp.cpp b/platform/uwp/thread_uwp.cpp
index 0549a8ed47..7c8c2b204a 100644
--- a/platform/uwp/thread_uwp.cpp
+++ b/platform/uwp/thread_uwp.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/uwp/thread_uwp.h b/platform/uwp/thread_uwp.h
index b8cccfb7c3..0446bd36ca 100644
--- a/platform/uwp/thread_uwp.h
+++ b/platform/uwp/thread_uwp.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/context_gl_win.cpp b/platform/windows/context_gl_win.cpp
index f8aed0ccab..328b987f1f 100644
--- a/platform/windows/context_gl_win.cpp
+++ b/platform/windows/context_gl_win.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/context_gl_win.h b/platform/windows/context_gl_win.h
index b3cab7806d..912d4d0133 100644
--- a/platform/windows/context_gl_win.h
+++ b/platform/windows/context_gl_win.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/ctxgl_procaddr.cpp b/platform/windows/ctxgl_procaddr.cpp
index e01c3fc252..c0c900acca 100644
--- a/platform/windows/ctxgl_procaddr.cpp
+++ b/platform/windows/ctxgl_procaddr.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/ctxgl_procaddr.h b/platform/windows/ctxgl_procaddr.h
index ecef01aadf..61fa6d7fbd 100644
--- a/platform/windows/ctxgl_procaddr.h
+++ b/platform/windows/ctxgl_procaddr.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 882e1a808e..d239ccf7d2 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -171,6 +171,7 @@ def configure(env):
env.Append(CCFLAGS=['/DWINDOWS_ENABLED'])
env.Append(CCFLAGS=['/DOPENGL_ENABLED'])
env.Append(CCFLAGS=['/DRTAUDIO_ENABLED'])
+ env.Append(CCFLAGS=['/DWASAPI_ENABLED'])
env.Append(CCFLAGS=['/DTYPED_METHOD_BIND'])
env.Append(CCFLAGS=['/DWIN32'])
env.Append(CCFLAGS=['/DWINVER=%s' % winver, '/D_WIN32_WINNT=%s' % winver])
@@ -252,8 +253,9 @@ def configure(env):
env.Append(CCFLAGS=['-DWINDOWS_ENABLED', '-mwindows'])
env.Append(CCFLAGS=['-DOPENGL_ENABLED'])
env.Append(CCFLAGS=['-DRTAUDIO_ENABLED'])
+ env.Append(CCFLAGS=['-DWASAPI_ENABLED'])
env.Append(CCFLAGS=['-DWINVER=%s' % winver, '-D_WIN32_WINNT=%s' % winver])
- env.Append(LIBS=['mingw32', 'opengl32', 'dsound', 'ole32', 'd3d9', 'winmm', 'gdi32', 'iphlpapi', 'shlwapi', 'wsock32', 'ws2_32', 'kernel32', 'oleaut32', 'dinput8', 'dxguid'])
+ env.Append(LIBS=['mingw32', 'opengl32', 'dsound', 'ole32', 'd3d9', 'winmm', 'gdi32', 'iphlpapi', 'shlwapi', 'wsock32', 'ws2_32', 'kernel32', 'oleaut32', 'dinput8', 'dxguid', 'ksuser'])
env.Append(CPPFLAGS=['-DMINGW_ENABLED'])
diff --git a/platform/windows/export/export.cpp b/platform/windows/export/export.cpp
index 6cb33e2ff0..5301aa9e95 100644
--- a/platform/windows/export/export.cpp
+++ b/platform/windows/export/export.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/export/export.h b/platform/windows/export/export.h
index ea9113c674..cc85339312 100644
--- a/platform/windows/export/export.h
+++ b/platform/windows/export/export.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/godot_win.cpp b/platform/windows/godot_win.cpp
index df2d96e516..d2ac6ecb50 100644
--- a/platform/windows/godot_win.cpp
+++ b/platform/windows/godot_win.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -136,8 +136,13 @@ int widechar_main(int argc, wchar_t **argv) {
Error err = Main::setup(argv_utf8[0], argc - 1, &argv_utf8[1]);
- if (err != OK)
+ if (err != OK) {
+ for (int i = 0; i < argc; ++i) {
+ delete[] argv_utf8[i];
+ }
+ delete[] argv_utf8;
return 255;
+ }
if (Main::start())
os.run();
diff --git a/platform/windows/joypad.cpp b/platform/windows/joypad.cpp
index e8a5084daf..00cfa812de 100644
--- a/platform/windows/joypad.cpp
+++ b/platform/windows/joypad.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* joypad.cpp */
+/* joypad.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/joypad.h b/platform/windows/joypad.h
index 7cd791e78f..a76caf6fac 100644
--- a/platform/windows/joypad.h
+++ b/platform/windows/joypad.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* joypad.h */
+/* joypad.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/key_mapping_win.cpp b/platform/windows/key_mapping_win.cpp
index 83e2af72b2..57f8e965de 100644
--- a/platform/windows/key_mapping_win.cpp
+++ b/platform/windows/key_mapping_win.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/key_mapping_win.h b/platform/windows/key_mapping_win.h
index af91676dff..139f047d17 100644
--- a/platform/windows/key_mapping_win.h
+++ b/platform/windows/key_mapping_win.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/lang_table.h b/platform/windows/lang_table.h
index 7cf2bb391b..d54894afce 100644
--- a/platform/windows/lang_table.h
+++ b/platform/windows/lang_table.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index db453a5f46..deb9c25576 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -2359,6 +2359,9 @@ OS_Windows::OS_Windows(HINSTANCE _hInstance) {
#endif
user_proc = NULL;
+#ifdef WASAPI_ENABLED
+ AudioDriverManager::add_driver(&driver_wasapi);
+#endif
#ifdef RTAUDIO_ENABLED
AudioDriverManager::add_driver(&driver_rtaudio);
#endif
diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h
index deb1ae0982..0c5965bf51 100644
--- a/platform/windows/os_windows.h
+++ b/platform/windows/os_windows.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -32,6 +32,7 @@
#include "context_gl_win.h"
#include "drivers/rtaudio/audio_driver_rtaudio.h"
+#include "drivers/wasapi/audio_driver_wasapi.h"
#include "os/input.h"
#include "os/os.h"
#include "power_windows.h"
@@ -123,6 +124,9 @@ class OS_Windows : public OS {
PowerWindows *power_manager;
+#ifdef WASAPI_ENABLED
+ AudioDriverWASAPI driver_wasapi;
+#endif
#ifdef RTAUDIO_ENABLED
AudioDriverRtAudio driver_rtaudio;
#endif
diff --git a/platform/windows/packet_peer_udp_winsock.cpp b/platform/windows/packet_peer_udp_winsock.cpp
index 3991a90423..d414ec891e 100644
--- a/platform/windows/packet_peer_udp_winsock.cpp
+++ b/platform/windows/packet_peer_udp_winsock.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/packet_peer_udp_winsock.h b/platform/windows/packet_peer_udp_winsock.h
index 01f2e5113f..8a6951fd6e 100644
--- a/platform/windows/packet_peer_udp_winsock.h
+++ b/platform/windows/packet_peer_udp_winsock.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/platform_config.h b/platform/windows/platform_config.h
index a0fc65ca89..832504b9c5 100644
--- a/platform/windows/platform_config.h
+++ b/platform/windows/platform_config.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/power_windows.cpp b/platform/windows/power_windows.cpp
index 428bc5dcc2..b37e189a3a 100644
--- a/platform/windows/power_windows.cpp
+++ b/platform/windows/power_windows.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/power_windows.h b/platform/windows/power_windows.h
index 164f1d7d95..9da9841f48 100644
--- a/platform/windows/power_windows.h
+++ b/platform/windows/power_windows.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/stream_peer_winsock.cpp b/platform/windows/stream_peer_winsock.cpp
index 18c5a40b80..a9d9cb9373 100644
--- a/platform/windows/stream_peer_winsock.cpp
+++ b/platform/windows/stream_peer_winsock.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/stream_peer_winsock.h b/platform/windows/stream_peer_winsock.h
index aa60a6500b..26e2a3e4c9 100644
--- a/platform/windows/stream_peer_winsock.h
+++ b/platform/windows/stream_peer_winsock.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/tcp_server_winsock.cpp b/platform/windows/tcp_server_winsock.cpp
index cc17c8a631..de300befa7 100644
--- a/platform/windows/tcp_server_winsock.cpp
+++ b/platform/windows/tcp_server_winsock.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/windows/tcp_server_winsock.h b/platform/windows/tcp_server_winsock.h
index 077acb94d7..a3e01098ed 100644
--- a/platform/windows/tcp_server_winsock.h
+++ b/platform/windows/tcp_server_winsock.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/x11/context_gl_x11.cpp b/platform/x11/context_gl_x11.cpp
index 563f7db5c3..0cc9734119 100644
--- a/platform/x11/context_gl_x11.cpp
+++ b/platform/x11/context_gl_x11.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/x11/context_gl_x11.h b/platform/x11/context_gl_x11.h
index acb3f38894..ba01b51d59 100644
--- a/platform/x11/context_gl_x11.h
+++ b/platform/x11/context_gl_x11.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 79778136ad..086681d4a4 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -74,7 +74,9 @@ def configure(env):
## Build type
if (env["target"] == "release"):
- env.Prepend(CCFLAGS=['-Ofast'])
+ # -O3 -ffast-math is identical to -Ofast. We need to split it out so we can selectively disable
+ # -ffast-math in code for which it generates wrong results.
+ env.Prepend(CCFLAGS=['-O3', '-ffast-math'])
if (env["debug_release"] == "yes"):
env.Prepend(CCFLAGS=['-g2'])
@@ -188,6 +190,11 @@ def configure(env):
if any(platform.machine() in s for s in list_of_x86):
env["x86_libtheora_opt_gcc"] = True
+ # On Linux wchar_t should be 32-bits
+ # 16-bit library shouldn't be required due to compiler optimisations
+ if (env['builtin_pcre2'] == 'no'):
+ env.ParseConfig('pkg-config libpcre2-32 --cflags --libs')
+
## Flags
if (os.system("pkg-config --exists alsa") == 0): # 0 means found
diff --git a/platform/x11/export/export.cpp b/platform/x11/export/export.cpp
index c8d6220aed..59b1a44247 100644
--- a/platform/x11/export/export.cpp
+++ b/platform/x11/export/export.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "export.h"
+
#include "editor/editor_export.h"
#include "platform/x11/logo.gen.h"
#include "scene/resources/texture.h"
@@ -51,23 +52,4 @@ void register_x11_exporter() {
platform->set_os_name("X11");
EditorExport::get_singleton()->add_export_platform(platform);
-
-#if 0
- Image img(_x11_logo);
- Ref<ImageTexture> logo = memnew( ImageTexture );
- logo->create_from_image(img);
-
- {
- Ref<EditorExportPlatformPC> exporter = Ref<EditorExportPlatformPC>( memnew(EditorExportPlatformPC) );
- exporter->set_binary_extension("");
- exporter->set_release_binary32("linux_x11_32_release");
- exporter->set_debug_binary32("linux_x11_32_debug");
- exporter->set_release_binary64("linux_x11_64_release");
- exporter->set_debug_binary64("linux_x11_64_debug");
- exporter->set_name("Linux X11");
- exporter->set_logo(logo);
- EditorImportExport::get_singleton()->add_export_platform(exporter);
- }
-
-#endif
}
diff --git a/platform/x11/export/export.h b/platform/x11/export/export.h
index 755b73d2c9..b70633266f 100644
--- a/platform/x11/export/export.h
+++ b/platform/x11/export/export.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/x11/godot_x11.cpp b/platform/x11/godot_x11.cpp
index 6f418b213f..2e43613e5d 100644
--- a/platform/x11/godot_x11.cpp
+++ b/platform/x11/godot_x11.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -45,8 +45,10 @@ int main(int argc, char *argv[]) {
getcwd(cwd, PATH_MAX);
Error err = Main::setup(argv[0], argc - 1, &argv[1]);
- if (err != OK)
+ if (err != OK) {
+ free(cwd);
return 255;
+ }
if (Main::start())
os.run(); // it is actually the OS that decides how to run
diff --git a/platform/x11/joypad_linux.cpp b/platform/x11/joypad_linux.cpp
index 2502b2d51f..3453297716 100644
--- a/platform/x11/joypad_linux.cpp
+++ b/platform/x11/joypad_linux.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/x11/joypad_linux.h b/platform/x11/joypad_linux.h
index 55383885a0..b34d98b77a 100644
--- a/platform/x11/joypad_linux.h
+++ b/platform/x11/joypad_linux.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/x11/key_mapping_x11.cpp b/platform/x11/key_mapping_x11.cpp
index 32a9806b22..95ac2fe6b6 100644
--- a/platform/x11/key_mapping_x11.cpp
+++ b/platform/x11/key_mapping_x11.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/x11/key_mapping_x11.h b/platform/x11/key_mapping_x11.h
index 41060c9303..7b11cb5ccc 100644
--- a/platform/x11/key_mapping_x11.h
+++ b/platform/x11/key_mapping_x11.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index dbc3914410..f96343c92c 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -116,24 +116,22 @@ void OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
/** XLIB INITIALIZATION **/
x11_display = XOpenDisplay(NULL);
+ char *modifiers = NULL;
Bool xkb_dar = False;
if (x11_display) {
XAutoRepeatOn(x11_display);
xkb_dar = XkbSetDetectableAutoRepeat(x11_display, True, NULL);
- }
-
- char *modifiers = NULL;
- // Try to support IME if detectable auto-repeat is supported
-
- if (xkb_dar == True) {
+ // Try to support IME if detectable auto-repeat is supported
+ if (xkb_dar == True) {
// Xutf8LookupString will be used later instead of XmbLookupString before
// the multibyte sequences can be converted to unicode string.
#ifdef X_HAVE_UTF8_STRING
- modifiers = XSetLocaleModifiers("");
+ modifiers = XSetLocaleModifiers("");
#endif
+ }
}
if (modifiers == NULL) {
@@ -141,8 +139,6 @@ void OS_X11::initialize(const VideoMode &p_desired, int p_video_driver, int p_au
WARN_PRINT("IME is disabled");
}
modifiers = XSetLocaleModifiers("@im=none");
- }
- if (modifiers == NULL) {
WARN_PRINT("Error setting locale modifiers");
}
@@ -538,6 +534,8 @@ void OS_X11::finalize() {
physics_2d_server->finish();
memdelete(physics_2d_server);
+ memdelete(power_manager);
+
if (xrandr_handle)
dlclose(xrandr_handle);
@@ -1239,7 +1237,7 @@ void OS_X11::handle_key_event(XKeyEvent *p_event, bool p_echo) {
unsigned int keycode = KeyMappingX11::get_keycode(keysym_keycode);
- /* Phase 3, obtain an unicode character from the keysym */
+ /* Phase 3, obtain a unicode character from the keysym */
// KeyMappingX11 also translates keysym to unicode.
// It does a binary search on a table to translate
@@ -1603,8 +1601,7 @@ void OS_X11::process_xevents() {
Point2i pos(event.xmotion.x, event.xmotion.y);
if (mouse_mode == MOUSE_MODE_CAPTURED) {
-#if 1
- //Vector2 c = Point2i(current_videomode.width/2,current_videomode.height/2);
+
if (pos == Point2i(current_videomode.width / 2, current_videomode.height / 2)) {
//this sucks, it's a hack, etc and is a little inaccurate, etc.
//but nothing I can do, X11 sucks.
@@ -1617,17 +1614,6 @@ void OS_X11::process_xevents() {
pos = last_mouse_pos + (pos - center);
center = new_center;
do_mouse_warp = window_has_focus; // warp the cursor if we're focused in
-#else
- //Dear X11, thanks for making my life miserable
-
- center.x = current_videomode.width / 2;
- center.y = current_videomode.height / 2;
- pos = last_mouse_pos + (pos - center);
- if (pos == last_mouse_pos)
- break;
- XWarpPointer(x11_display, None, x11_window,
- 0, 0, 0, 0, (int)center.x, (int)center.y);
-#endif
}
if (!last_mouse_pos_valid) {
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index 497ce1dde2..51240fa023 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/x11/platform_config.h b/platform/x11/platform_config.h
index 1a1de42b47..85af12372f 100644
--- a/platform/x11/platform_config.h
+++ b/platform/x11/platform_config.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/platform/x11/power_x11.cpp b/platform/x11/power_x11.cpp
index 8e69a2223f..32100354a6 100644
--- a/platform/x11/power_x11.cpp
+++ b/platform/x11/power_x11.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -58,6 +58,7 @@ Adapted from corresponding SDL 2.0 code.
#include <stdio.h>
#include <unistd.h>
+#include "core/error_macros.h"
#include <dirent.h>
#include <fcntl.h>
#include <sys/stat.h>
@@ -254,9 +255,9 @@ bool PowerX11::GetPowerInfo_Linux_proc_acpi() {
this->power_state = POWERSTATE_UNKNOWN;
dirp->change_dir(proc_acpi_battery_path);
- dirp->list_dir_begin();
+ Error err = dirp->list_dir_begin();
- if (dirp == NULL) {
+ if (err != OK) {
return false; /* can't use this interface. */
} else {
node = dirp->get_next();
@@ -268,8 +269,8 @@ bool PowerX11::GetPowerInfo_Linux_proc_acpi() {
}
dirp->change_dir(proc_acpi_ac_adapter_path);
- dirp->list_dir_begin();
- if (dirp == NULL) {
+ err = dirp->list_dir_begin();
+ if (err != OK) {
return false; /* can't use this interface. */
} else {
node = dirp->get_next();
@@ -438,9 +439,9 @@ bool PowerX11::GetPowerInfo_Linux_sys_class_power_supply(/*PowerState *state, in
DirAccess *dirp = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
dirp->change_dir(base);
- dirp->list_dir_begin();
+ Error err = dirp->list_dir_begin();
- if (!dirp) {
+ if (err != OK) {
return false;
}
diff --git a/platform/x11/power_x11.h b/platform/x11/power_x11.h
index 64ed5fe26a..e34223036d 100644
--- a/platform/x11/power_x11.h
+++ b/platform/x11/power_x11.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/animated_sprite.cpp b/scene/2d/animated_sprite.cpp
index 366c3a8bd8..26241df660 100644
--- a/scene/2d/animated_sprite.cpp
+++ b/scene/2d/animated_sprite.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/animated_sprite.h b/scene/2d/animated_sprite.h
index 80defac079..6c660d0381 100644
--- a/scene/2d/animated_sprite.h
+++ b/scene/2d/animated_sprite.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/area_2d.cpp b/scene/2d/area_2d.cpp
index 02a0509449..1124904963 100644
--- a/scene/2d/area_2d.cpp
+++ b/scene/2d/area_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -116,7 +116,7 @@ real_t Area2D::get_priority() const {
void Area2D::_body_enter_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
Map<ObjectID, BodyState>::Element *E = body_map.find(p_id);
@@ -134,7 +134,7 @@ void Area2D::_body_enter_tree(ObjectID p_id) {
void Area2D::_body_exit_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
Map<ObjectID, BodyState>::Element *E = body_map.find(p_id);
ERR_FAIL_COND(!E);
@@ -153,7 +153,7 @@ void Area2D::_body_inout(int p_status, const RID &p_body, int p_instance, int p_
ObjectID objid = p_instance;
Object *obj = ObjectDB::get_instance(objid);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
Map<ObjectID, BodyState>::Element *E = body_map.find(objid);
@@ -217,7 +217,7 @@ void Area2D::_body_inout(int p_status, const RID &p_body, int p_instance, int p_
void Area2D::_area_enter_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
Map<ObjectID, AreaState>::Element *E = area_map.find(p_id);
@@ -235,7 +235,7 @@ void Area2D::_area_enter_tree(ObjectID p_id) {
void Area2D::_area_exit_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
Map<ObjectID, AreaState>::Element *E = area_map.find(p_id);
ERR_FAIL_COND(!E);
@@ -254,7 +254,7 @@ void Area2D::_area_inout(int p_status, const RID &p_area, int p_instance, int p_
ObjectID objid = p_instance;
Object *obj = ObjectDB::get_instance(objid);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
Map<ObjectID, AreaState>::Element *E = area_map.find(objid);
@@ -330,7 +330,7 @@ void Area2D::_clear_monitoring() {
for (Map<ObjectID, BodyState>::Element *E = bmcopy.front(); E; E = E->next()) {
Object *obj = ObjectDB::get_instance(E->key());
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
if (!node) //node may have been deleted in previous frame or at other legiminate point
continue;
@@ -360,7 +360,7 @@ void Area2D::_clear_monitoring() {
for (Map<ObjectID, AreaState>::Element *E = bmcopy.front(); E; E = E->next()) {
Object *obj = ObjectDB::get_instance(E->key());
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
if (!node) //node may have been deleted in previous frame or at other legiminate point
continue;
diff --git a/scene/2d/area_2d.h b/scene/2d/area_2d.h
index 12d71f3911..c56cf651a1 100644
--- a/scene/2d/area_2d.h
+++ b/scene/2d/area_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp
index 73782e1515..39d3f2d6bf 100644
--- a/scene/2d/audio_stream_player_2d.cpp
+++ b/scene/2d/audio_stream_player_2d.cpp
@@ -157,10 +157,8 @@ void AudioStreamPlayer2D::_notification(int p_what) {
int areas = space_state->intersect_point(global_pos, sr, MAX_INTERSECT_AREAS, Set<RID>(), area_mask, Physics2DDirectSpaceState::TYPE_MASK_AREA);
for (int i = 0; i < areas; i++) {
- if (!sr[i].collider)
- continue;
- Area2D *area2d = sr[i].collider->cast_to<Area2D>();
+ Area2D *area2d = Object::cast_to<Area2D>(sr[i].collider);
if (!area2d)
continue;
@@ -226,6 +224,7 @@ void AudioStreamPlayer2D::_notification(int p_what) {
if (!active) {
set_fixed_process_internal(false);
_change_notify("playing"); //update property in editor
+ emit_signal("finished");
}
}
}
@@ -247,12 +246,14 @@ void AudioStreamPlayer2D::set_stream(Ref<AudioStream> p_stream) {
stream = p_stream;
stream_playback = p_stream->instance_playback();
+ AudioServer::get_singleton()->unlock();
+
if (stream_playback.is_null()) {
stream.unref();
ERR_FAIL_COND(stream_playback.is_null());
}
- AudioServer::get_singleton()->unlock();
+
}
Ref<AudioStream> AudioStreamPlayer2D::get_stream() const {
@@ -444,6 +445,9 @@ void AudioStreamPlayer2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::REAL, "attenuation", PROPERTY_HINT_EXP_EASING), "set_attenuation", "get_attenuation");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
ADD_PROPERTY(PropertyInfo(Variant::INT, "area_mask", PROPERTY_HINT_LAYERS_2D_PHYSICS), "set_area_mask", "get_area_mask");
+
+ ADD_SIGNAL(MethodInfo("finished"));
+
}
AudioStreamPlayer2D::AudioStreamPlayer2D() {
diff --git a/scene/2d/back_buffer_copy.cpp b/scene/2d/back_buffer_copy.cpp
index 44bee20d0a..2858ddaad5 100644
--- a/scene/2d/back_buffer_copy.cpp
+++ b/scene/2d/back_buffer_copy.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/back_buffer_copy.h b/scene/2d/back_buffer_copy.h
index 4080f50696..2424dd7b19 100644
--- a/scene/2d/back_buffer_copy.h
+++ b/scene/2d/back_buffer_copy.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/camera_2d.cpp b/scene/2d/camera_2d.cpp
index f309631715..e39e6fc6da 100644
--- a/scene/2d/camera_2d.cpp
+++ b/scene/2d/camera_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -577,7 +577,7 @@ void Camera2D::set_custom_viewport(Node *p_viewport) {
remove_from_group(canvas_group_name);
}
- custom_viewport = p_viewport->cast_to<Viewport>();
+ custom_viewport = Object::cast_to<Viewport>(p_viewport);
if (custom_viewport) {
custom_viewport_id = custom_viewport->get_instance_id();
diff --git a/scene/2d/camera_2d.h b/scene/2d/camera_2d.h
index 8d9e76be85..dfcadf65a6 100644
--- a/scene/2d/camera_2d.h
+++ b/scene/2d/camera_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index 5a519dee69..4f00966e75 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -260,7 +260,7 @@ void CanvasItem::_propagate_visibility_changed(bool p_visible) {
for (int i = 0; i < get_child_count(); i++) {
- CanvasItem *c = get_child(i)->cast_to<CanvasItem>();
+ CanvasItem *c = Object::cast_to<CanvasItem>(get_child(i));
if (c && c->visible) //should the toplevels stop propagation? i think so but..
c->_propagate_visibility_changed(p_visible);
@@ -398,7 +398,7 @@ void CanvasItem::_toplevel_raise_self() {
void CanvasItem::_enter_canvas() {
- if ((!get_parent() || !get_parent()->cast_to<CanvasItem>()) || toplevel) {
+ if ((!Object::cast_to<CanvasItem>(get_parent())) || toplevel) {
Node *n = this;
@@ -406,7 +406,7 @@ void CanvasItem::_enter_canvas() {
while (n) {
- canvas_layer = n->cast_to<CanvasLayer>();
+ canvas_layer = Object::cast_to<CanvasLayer>(n);
if (canvas_layer) {
break;
}
@@ -460,7 +460,7 @@ void CanvasItem::_notification(int p_what) {
first_draw = true;
if (get_parent()) {
- CanvasItem *ci = get_parent()->cast_to<CanvasItem>();
+ CanvasItem *ci = Object::cast_to<CanvasItem>(get_parent());
if (ci)
C = ci->children_items.push_back(this);
}
@@ -488,7 +488,7 @@ void CanvasItem::_notification(int p_what) {
get_tree()->xform_change_list.remove(&xform_change);
_exit_canvas();
if (C) {
- get_parent()->cast_to<CanvasItem>()->children_items.erase(C);
+ Object::cast_to<CanvasItem>(get_parent())->children_items.erase(C);
C = NULL;
}
global_invalid = true;
@@ -565,11 +565,7 @@ CanvasItem *CanvasItem::get_parent_item() const {
if (toplevel)
return NULL;
- Node *parent = get_parent();
- if (!parent)
- return NULL;
-
- return parent->cast_to<CanvasItem>();
+ return Object::cast_to<CanvasItem>(get_parent());
}
void CanvasItem::set_self_modulate(const Color &p_self_modulate) {
@@ -830,8 +826,8 @@ RID CanvasItem::get_canvas() const {
CanvasItem *CanvasItem::get_toplevel() const {
CanvasItem *ci = const_cast<CanvasItem *>(this);
- while (!ci->toplevel && ci->get_parent() && ci->get_parent()->cast_to<CanvasItem>()) {
- ci = ci->get_parent()->cast_to<CanvasItem>();
+ while (!ci->toplevel && Object::cast_to<CanvasItem>(ci->get_parent())) {
+ ci = Object::cast_to<CanvasItem>(ci->get_parent());
}
return ci;
@@ -1062,8 +1058,8 @@ Transform2D CanvasItem::get_canvas_transform() const {
if (canvas_layer)
return canvas_layer->get_transform();
- else if (get_parent()->cast_to<CanvasItem>())
- return get_parent()->cast_to<CanvasItem>()->get_canvas_transform();
+ else if (Object::cast_to<CanvasItem>(get_parent()))
+ return Object::cast_to<CanvasItem>(get_parent())->get_canvas_transform();
else
return get_viewport()->get_canvas_transform();
}
@@ -1122,7 +1118,7 @@ Rect2 CanvasItem::get_item_and_children_rect() const {
Rect2 rect = get_item_rect();
for (int i = 0; i < get_child_count(); i++) {
- CanvasItem *c = get_child(i)->cast_to<CanvasItem>();
+ CanvasItem *c = Object::cast_to<CanvasItem>(get_child(i));
if (c) {
Rect2 sir = c->get_transform().xform(c->get_item_and_children_rect());
rect = rect.merge(sir);
diff --git a/scene/2d/canvas_item.h b/scene/2d/canvas_item.h
index c6180e07b6..5a0a9c6e6a 100644
--- a/scene/2d/canvas_item.h
+++ b/scene/2d/canvas_item.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -291,10 +291,10 @@ public:
RID get_canvas() const;
Ref<World2D> get_world_2d() const;
- void set_material(const Ref<Material> &p_material);
+ virtual void set_material(const Ref<Material> &p_material);
Ref<Material> get_material() const;
- void set_use_parent_material(bool p_use_parent_material);
+ virtual void set_use_parent_material(bool p_use_parent_material);
bool get_use_parent_material() const;
Ref<InputEvent> make_input_local(const Ref<InputEvent> &p_event) const;
diff --git a/scene/2d/canvas_modulate.cpp b/scene/2d/canvas_modulate.cpp
index a132c5e18c..05831609fc 100644
--- a/scene/2d/canvas_modulate.cpp
+++ b/scene/2d/canvas_modulate.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/canvas_modulate.h b/scene/2d/canvas_modulate.h
index 37d9d47ba5..4195c1386c 100644
--- a/scene/2d/canvas_modulate.h
+++ b/scene/2d/canvas_modulate.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp
index d3bb5a8d4e..ce56b85a9e 100644
--- a/scene/2d/collision_object_2d.cpp
+++ b/scene/2d/collision_object_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/collision_object_2d.h b/scene/2d/collision_object_2d.h
index 36bf39ff4e..a828d8d8ea 100644
--- a/scene/2d/collision_object_2d.h
+++ b/scene/2d/collision_object_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/collision_polygon_2d.cpp b/scene/2d/collision_polygon_2d.cpp
index 433661e393..e2764a6e8d 100644
--- a/scene/2d/collision_polygon_2d.cpp
+++ b/scene/2d/collision_polygon_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -79,11 +79,6 @@ void CollisionPolygon2D::_build_polygon() {
Vector<Vector<Vector2> > CollisionPolygon2D::_decompose_in_convex() {
Vector<Vector<Vector2> > decomp;
-#if 0
- //fast but imprecise triangulator, gave us problems
- decomp = Geometry::decompose_polygon(polygon);
-#else
-
List<TriangulatorPoly> in_poly, out_poly;
TriangulatorPoly inp;
@@ -116,8 +111,6 @@ Vector<Vector<Vector2> > CollisionPolygon2D::_decompose_in_convex() {
idx++;
}
-#endif
-
return decomp;
}
@@ -126,7 +119,7 @@ void CollisionPolygon2D::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_PARENTED: {
- parent = get_parent()->cast_to<CollisionObject2D>();
+ parent = Object::cast_to<CollisionObject2D>(get_parent());
if (parent) {
owner_id = parent->create_shape_owner(this);
_build_polygon();
@@ -257,7 +250,7 @@ Rect2 CollisionPolygon2D::get_item_rect() const {
String CollisionPolygon2D::get_configuration_warning() const {
- if (!get_parent()->cast_to<CollisionObject2D>()) {
+ if (!Object::cast_to<CollisionObject2D>(get_parent())) {
return TTR("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.");
}
diff --git a/scene/2d/collision_polygon_2d.h b/scene/2d/collision_polygon_2d.h
index f0666ba9de..c9ec860e36 100644
--- a/scene/2d/collision_polygon_2d.h
+++ b/scene/2d/collision_polygon_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/collision_shape_2d.cpp b/scene/2d/collision_shape_2d.cpp
index 3fda4ab464..0758f4a9bf 100644
--- a/scene/2d/collision_shape_2d.cpp
+++ b/scene/2d/collision_shape_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -50,7 +50,7 @@ void CollisionShape2D::_notification(int p_what) {
case NOTIFICATION_PARENTED: {
- parent = get_parent()->cast_to<CollisionObject2D>();
+ parent = Object::cast_to<CollisionObject2D>(get_parent());
if (parent) {
owner_id = parent->create_shape_owner(this);
if (shape.is_valid()) {
@@ -165,7 +165,7 @@ Rect2 CollisionShape2D::get_item_rect() const {
String CollisionShape2D::get_configuration_warning() const {
- if (!get_parent()->cast_to<CollisionObject2D>()) {
+ if (!Object::cast_to<CollisionObject2D>(get_parent())) {
return TTR("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.");
}
diff --git a/scene/2d/collision_shape_2d.h b/scene/2d/collision_shape_2d.h
index 1f2b96b91f..04203a75b4 100644
--- a/scene/2d/collision_shape_2d.h
+++ b/scene/2d/collision_shape_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/joints_2d.cpp b/scene/2d/joints_2d.cpp
index ee41dca3a6..69bad1623f 100644
--- a/scene/2d/joints_2d.cpp
+++ b/scene/2d/joints_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -172,8 +172,8 @@ RID PinJoint2D::_configure_joint() {
if (!node_a && !node_b)
return RID();
- PhysicsBody2D *body_a = node_a ? node_a->cast_to<PhysicsBody2D>() : (PhysicsBody2D *)NULL;
- PhysicsBody2D *body_b = node_b ? node_b->cast_to<PhysicsBody2D>() : (PhysicsBody2D *)NULL;
+ PhysicsBody2D *body_a = Object::cast_to<PhysicsBody2D>(node_a);
+ PhysicsBody2D *body_b = Object::cast_to<PhysicsBody2D>(node_b);
if (!body_a && !body_b)
return RID();
@@ -249,8 +249,8 @@ RID GrooveJoint2D::_configure_joint() {
if (!node_a || !node_b)
return RID();
- PhysicsBody2D *body_a = node_a->cast_to<PhysicsBody2D>();
- PhysicsBody2D *body_b = node_b->cast_to<PhysicsBody2D>();
+ PhysicsBody2D *body_a = Object::cast_to<PhysicsBody2D>(node_a);
+ PhysicsBody2D *body_b = Object::cast_to<PhysicsBody2D>(node_b);
if (!body_a || !body_b)
return RID();
@@ -338,8 +338,8 @@ RID DampedSpringJoint2D::_configure_joint() {
if (!node_a || !node_b)
return RID();
- PhysicsBody2D *body_a = node_a->cast_to<PhysicsBody2D>();
- PhysicsBody2D *body_b = node_b->cast_to<PhysicsBody2D>();
+ PhysicsBody2D *body_a = Object::cast_to<PhysicsBody2D>(node_a);
+ PhysicsBody2D *body_b = Object::cast_to<PhysicsBody2D>(node_b);
if (!body_a || !body_b)
return RID();
diff --git a/scene/2d/joints_2d.h b/scene/2d/joints_2d.h
index f854ce51ee..685299abc6 100644
--- a/scene/2d/joints_2d.h
+++ b/scene/2d/joints_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/light_2d.cpp b/scene/2d/light_2d.cpp
index 219574cbfd..1bca2c6f37 100644
--- a/scene/2d/light_2d.cpp
+++ b/scene/2d/light_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -434,8 +434,8 @@ void Light2D::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shadow_enabled"), "set_shadow_enabled", "is_shadow_enabled");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "shadow_color"), "set_shadow_color", "get_shadow_color");
ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_buffer_size", PROPERTY_HINT_RANGE, "32,16384,1"), "set_shadow_buffer_size", "get_shadow_buffer_size");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_gradient_length", PROPERTY_HINT_RANGE, "1,4096,0.1"), "set_shadow_gradient_length", "get_shadow_gradient_length");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_filter", PROPERTY_HINT_ENUM, "None,PCF3,PCF5,PCF9,PCF13"), "set_shadow_filter", "get_shadow_filter");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_gradient_length", PROPERTY_HINT_RANGE, "0,4096,0.1"), "set_shadow_gradient_length", "get_shadow_gradient_length");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_filter", PROPERTY_HINT_ENUM, "None,PCF3,PCF5,PCF7,PCF9,PCF13"), "set_shadow_filter", "get_shadow_filter");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "shadow_filter_smooth", PROPERTY_HINT_RANGE, "0,64,0.1"), "set_shadow_smooth", "get_shadow_smooth");
ADD_PROPERTY(PropertyInfo(Variant::INT, "shadow_item_cull_mask", PROPERTY_HINT_LAYERS_2D_RENDER), "set_item_shadow_cull_mask", "get_item_shadow_cull_mask");
diff --git a/scene/2d/light_2d.h b/scene/2d/light_2d.h
index 90e55aeda4..f6bc943adb 100644
--- a/scene/2d/light_2d.h
+++ b/scene/2d/light_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -48,6 +48,7 @@ public:
SHADOW_FILTER_NONE,
SHADOW_FILTER_PCF3,
SHADOW_FILTER_PCF5,
+ SHADOW_FILTER_PCF7,
SHADOW_FILTER_PCF9,
SHADOW_FILTER_PCF13,
};
diff --git a/scene/2d/light_occluder_2d.cpp b/scene/2d/light_occluder_2d.cpp
index 680adeea69..92e0d8a2f6 100644
--- a/scene/2d/light_occluder_2d.cpp
+++ b/scene/2d/light_occluder_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/light_occluder_2d.h b/scene/2d/light_occluder_2d.h
index 30c30b1a47..cca7bfecd6 100644
--- a/scene/2d/light_occluder_2d.h
+++ b/scene/2d/light_occluder_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp
index 6e7bfe63c8..c87a9a5b1e 100644
--- a/scene/2d/line_2d.cpp
+++ b/scene/2d/line_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/line_2d.h b/scene/2d/line_2d.h
index e8ca5e6e7c..017ccf13ff 100644
--- a/scene/2d/line_2d.h
+++ b/scene/2d/line_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/line_builder.cpp b/scene/2d/line_builder.cpp
index 3c1410edbb..1235013af4 100644
--- a/scene/2d/line_builder.cpp
+++ b/scene/2d/line_builder.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -139,7 +139,7 @@ void LineBuilder::build() {
float current_distance0 = 0.f;
float current_distance1 = 0.f;
- float total_distance;
+ float total_distance = 0.f;
_interpolate_color = gradient != NULL;
bool distance_required = _interpolate_color || texture_mode == LINE_TEXTURE_TILE;
if (distance_required)
diff --git a/scene/2d/line_builder.h b/scene/2d/line_builder.h
index 0e1a2aaf50..227e0abd08 100644
--- a/scene/2d/line_builder.h
+++ b/scene/2d/line_builder.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation2d.cpp
index 383236b4ca..74d835dfb2 100644
--- a/scene/2d/navigation2d.cpp
+++ b/scene/2d/navigation2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -236,42 +236,6 @@ void Navigation2D::navpoly_remove(int p_id) {
_navpoly_unlink(p_id);
navpoly_map.erase(p_id);
}
-#if 0
-void Navigation2D::_clip_path(Vector<Vector2>& path, Polygon *from_poly, const Vector2& p_to_point, Polygon* p_to_poly) {
-
- Vector2 from = path[path.size()-1];
-
- if (from.distance_to(p_to_point)<CMP_EPSILON)
- return;
- Plane cut_plane;
- cut_plane.normal = (from-p_to_point).cross(up);
- if (cut_plane.normal==Vector2())
- return;
- cut_plane.normal.normalize();
- cut_plane.d = cut_plane.normal.dot(from);
-
-
- while(from_poly!=p_to_poly) {
-
- int pe = from_poly->prev_edge;
- Vector2 a = _get_vertex(from_poly->edges[pe].point);
- Vector2 b = _get_vertex(from_poly->edges[(pe+1)%from_poly->edges.size()].point);
-
- from_poly=from_poly->edges[pe].C;
- ERR_FAIL_COND(!from_poly);
-
- if (a.distance_to(b)>CMP_EPSILON) {
-
- Vector2 inters;
- if (cut_plane.intersects_segment(a,b,&inters)) {
- if (inters.distance_to(p_to_point)>CMP_EPSILON && inters.distance_to(path[path.size()-1])>CMP_EPSILON) {
- path.push_back(inters);
- }
- }
- }
- }
-}
-#endif
Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vector2 &p_end, bool p_optimize) {
@@ -498,29 +462,7 @@ Vector<Vector2> Navigation2D::get_simple_path(const Vector2 &p_start, const Vect
open_list.erase(least_cost_poly);
}
-#if 0
-debug path
- {
- Polygon *p=end_poly;
- int idx=0;
-
- while(true) {
- int prev = p->prev_edge;
- int prev_n = (p->prev_edge+1)%p->edges.size();
- Vector2 point = (_get_vertex(p->edges[prev].point) + _get_vertex(p->edges[prev_n].point))*0.5;
- String points;
- for(int i=0;i<p->edges.size();i++) {
- if (i>0)
- points+=", ";
- points+=_get_vertex(p->edges[i].point);
- }
- //print_line("poly "+itos(idx++)+" - "+points);
- p = p->edges[prev].C;
- if (p==begin_poly)
- break;
- }
- }
-#endif
+
if (found_route) {
Vector<Vector2> path;
@@ -534,7 +476,6 @@ debug path
Polygon *left_poly = end_poly;
Polygon *right_poly = end_poly;
Polygon *p = end_poly;
- path.push_back(end_point);
while (p) {
@@ -592,7 +533,7 @@ debug path
left_poly = p;
portal_left = apex_point;
portal_right = apex_point;
- if (path[path.size() - 1].distance_to(apex_point) > CMP_EPSILON)
+ if (!path.size() || path[path.size() - 1].distance_to(apex_point) > CMP_EPSILON)
path.push_back(apex_point);
skip = true;
//print_line("addpoint left");
@@ -613,7 +554,7 @@ debug path
right_poly = p;
portal_right = apex_point;
portal_left = apex_point;
- if (path[path.size() - 1].distance_to(apex_point) > CMP_EPSILON)
+ if (!path.size() || path[path.size() - 1].distance_to(apex_point) > CMP_EPSILON)
path.push_back(apex_point);
//print_line("addpoint right");
//print_line("***CLIP RIGHT");
@@ -626,16 +567,10 @@ debug path
p = NULL;
}
- if (path[path.size() - 1].distance_to(begin_point) > CMP_EPSILON)
- path.push_back(begin_point);
-
- path.invert();
-
} else {
//midpoints
Polygon *p = end_poly;
- path.push_back(end_point);
while (true) {
int prev = p->prev_edge;
int prev_n = (p->prev_edge + 1) % p->edges.size();
@@ -645,11 +580,20 @@ debug path
if (p == begin_poly)
break;
}
+ }
+
+ if (!path.size() || path[path.size() - 1].distance_squared_to(begin_point) > CMP_EPSILON) {
+ path.push_back(begin_point); // Add the begin point
+ } else {
+ path[path.size() - 1] = begin_point; // Replace first midpoint by the exact begin point
+ }
- if (path[path.size() - 1].distance_to(begin_point) > CMP_EPSILON)
- path.push_back(begin_point);
+ path.invert();
- path.invert();
+ if (path.size() <= 1 || path[path.size() - 1].distance_squared_to(end_point) > CMP_EPSILON) {
+ path.push_back(end_point); // Add the end point
+ } else {
+ path[path.size() - 1] = end_point; // Replace last midpoint by the exact end point
}
return path;
diff --git a/scene/2d/navigation2d.h b/scene/2d/navigation2d.h
index 54e89de9e2..e87b01f7c5 100644
--- a/scene/2d/navigation2d.h
+++ b/scene/2d/navigation2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -153,9 +153,7 @@ class Navigation2D : public Node2D {
float cell_size;
Map<int, NavMesh> navpoly_map;
int last_id;
-#if 0
- void _clip_path(Vector<Vector2>& path,Polygon *from_poly, const Vector2& p_to_point, Polygon* p_to_poly);
-#endif
+
protected:
static void _bind_methods();
diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp
index 7515d486c2..352ec3b300 100644
--- a/scene/2d/navigation_polygon.cpp
+++ b/scene/2d/navigation_polygon.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -319,7 +319,7 @@ void NavigationPolygonInstance::_notification(int p_what) {
Node2D *c = this;
while (c) {
- navigation = c->cast_to<Navigation2D>();
+ navigation = Object::cast_to<Navigation2D>(c);
if (navigation) {
if (enabled && navpoly.is_valid()) {
@@ -329,7 +329,7 @@ void NavigationPolygonInstance::_notification(int p_what) {
break;
}
- c = c->get_parent()->cast_to<Node2D>();
+ c = Object::cast_to<Node2D>(get_parent());
}
} break;
@@ -448,11 +448,11 @@ String NavigationPolygonInstance::get_configuration_warning() const {
const Node2D *c = this;
while (c) {
- if (c->cast_to<Navigation2D>()) {
+ if (Object::cast_to<Navigation2D>(c)) {
return String();
}
- c = c->get_parent()->cast_to<Node2D>();
+ c = Object::cast_to<Node2D>(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/navigation_polygon.h b/scene/2d/navigation_polygon.h
index f6e6ed210a..5576a3abd2 100644
--- a/scene/2d/navigation_polygon.h
+++ b/scene/2d/navigation_polygon.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index 98d6a467b1..0c7685a858 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -379,7 +379,7 @@ Transform2D Node2D::get_relative_transform_to_parent(const Node *p_parent) const
if (p_parent == this)
return Transform2D();
- Node2D *parent_2d = get_parent()->cast_to<Node2D>();
+ Node2D *parent_2d = Object::cast_to<Node2D>(get_parent());
ERR_FAIL_COND_V(!parent_2d, Transform2D());
if (p_parent == parent_2d)
diff --git a/scene/2d/node_2d.h b/scene/2d/node_2d.h
index a6009851c7..19aafc81ff 100644
--- a/scene/2d/node_2d.h
+++ b/scene/2d/node_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/parallax_background.cpp b/scene/2d/parallax_background.cpp
index 433ab5ff8d..0ddcb7b51b 100644
--- a/scene/2d/parallax_background.cpp
+++ b/scene/2d/parallax_background.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -101,7 +101,7 @@ void ParallaxBackground::_update_scroll() {
for (int i = 0; i < get_child_count(); i++) {
- ParallaxLayer *l = get_child(i)->cast_to<ParallaxLayer>();
+ ParallaxLayer *l = Object::cast_to<ParallaxLayer>(get_child(i));
if (!l)
continue;
diff --git a/scene/2d/parallax_background.h b/scene/2d/parallax_background.h
index fce1bbd928..0dad1daeab 100644
--- a/scene/2d/parallax_background.h
+++ b/scene/2d/parallax_background.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp
index debdc22b65..8fe651cb5f 100644
--- a/scene/2d/parallax_layer.cpp
+++ b/scene/2d/parallax_layer.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -36,11 +36,8 @@ void ParallaxLayer::set_motion_scale(const Size2 &p_scale) {
motion_scale = p_scale;
- if (!get_parent())
- return;
-
- ParallaxBackground *pb = get_parent()->cast_to<ParallaxBackground>();
- if (is_inside_tree() && pb) {
+ ParallaxBackground *pb = Object::cast_to<ParallaxBackground>(get_parent());
+ if (pb && is_inside_tree()) {
Vector2 ofs = pb->get_final_offset();
float scale = pb->get_scroll_scale();
set_base_offset_and_scale(ofs, scale);
@@ -56,11 +53,8 @@ void ParallaxLayer::set_motion_offset(const Size2 &p_offset) {
motion_offset = p_offset;
- if (!get_parent())
- return;
-
- ParallaxBackground *pb = get_parent()->cast_to<ParallaxBackground>();
- if (is_inside_tree() && pb) {
+ ParallaxBackground *pb = Object::cast_to<ParallaxBackground>(get_parent());
+ if (pb && is_inside_tree()) {
Vector2 ofs = pb->get_final_offset();
float scale = pb->get_scroll_scale();
set_base_offset_and_scale(ofs, scale);
@@ -74,10 +68,7 @@ Size2 ParallaxLayer::get_motion_offset() const {
void ParallaxLayer::_update_mirroring() {
- if (!get_parent())
- return;
-
- ParallaxBackground *pb = get_parent()->cast_to<ParallaxBackground>();
+ ParallaxBackground *pb = Object::cast_to<ParallaxBackground>(get_parent());
if (pb) {
RID c = pb->get_world_2d()->get_canvas();
@@ -139,7 +130,7 @@ void ParallaxLayer::set_base_offset_and_scale(const Point2 &p_offset, float p_sc
String ParallaxLayer::get_configuration_warning() const {
- if (!get_parent() || !get_parent()->cast_to<ParallaxBackground>()) {
+ if (!Object::cast_to<ParallaxBackground>(get_parent())) {
return TTR("ParallaxLayer node only works when set as child of a ParallaxBackground node.");
}
diff --git a/scene/2d/parallax_layer.h b/scene/2d/parallax_layer.h
index f2d0053342..95ca27c41a 100644
--- a/scene/2d/parallax_layer.h
+++ b/scene/2d/parallax_layer.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp
index b0c00c4a64..c146ac08c2 100644
--- a/scene/2d/particles_2d.cpp
+++ b/scene/2d/particles_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/particles_2d.h b/scene/2d/particles_2d.h
index a6ac0c37d3..6946f2a799 100644
--- a/scene/2d/particles_2d.h
+++ b/scene/2d/particles_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index a79f60c96f..1d7bd8fc2a 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -137,13 +137,8 @@ void PathFollow2D::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
- Node *parent = get_parent();
- if (parent) {
-
- path = parent->cast_to<Path2D>();
- if (path) {
- _update_transform();
- }
+ if ((path = Object::cast_to<Path2D>(get_parent()))) {
+ _update_transform();
}
} break;
@@ -231,7 +226,7 @@ String PathFollow2D::get_configuration_warning() const {
if (!is_visible_in_tree() || !is_inside_tree())
return String();
- if (!get_parent() || !get_parent()->cast_to<Path2D>()) {
+ if (!Object::cast_to<Path2D>(get_parent())) {
return TTR("PathFollow2D only works when set as a child of a Path2D node.");
}
diff --git a/scene/2d/path_2d.h b/scene/2d/path_2d.h
index e80817cd3c..88a0abdea9 100644
--- a/scene/2d/path_2d.h
+++ b/scene/2d/path_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/path_texture.cpp b/scene/2d/path_texture.cpp
index e06c79dabd..13644f71cf 100644
--- a/scene/2d/path_texture.cpp
+++ b/scene/2d/path_texture.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/path_texture.h b/scene/2d/path_texture.h
index 163e914e4a..4639a6072b 100644
--- a/scene/2d/path_texture.h
+++ b/scene/2d/path_texture.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index aaba9da299..b1eb2ba267 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -143,7 +143,7 @@ PhysicsBody2D::PhysicsBody2D(Physics2DServer::BodyMode p_mode)
void PhysicsBody2D::add_collision_exception_with(Node *p_node) {
ERR_FAIL_NULL(p_node);
- PhysicsBody2D *physics_body = p_node->cast_to<PhysicsBody2D>();
+ PhysicsBody2D *physics_body = Object::cast_to<PhysicsBody2D>(p_node);
if (!physics_body) {
ERR_EXPLAIN("Collision exception only works between two objects of PhysicsBody type");
}
@@ -154,7 +154,7 @@ void PhysicsBody2D::add_collision_exception_with(Node *p_node) {
void PhysicsBody2D::remove_collision_exception_with(Node *p_node) {
ERR_FAIL_NULL(p_node);
- PhysicsBody2D *physics_body = p_node->cast_to<PhysicsBody2D>();
+ PhysicsBody2D *physics_body = Object::cast_to<PhysicsBody2D>(p_node);
if (!physics_body) {
ERR_EXPLAIN("Collision exception only works between two objects of PhysicsBody type");
}
@@ -182,29 +182,6 @@ real_t StaticBody2D::get_constant_angular_velocity() const {
return constant_angular_velocity;
}
-#if 0
-void StaticBody2D::_update_xform() {
-
- if (!pre_xform || !pending)
- return;
-
- setting=true;
-
-
- Transform2D new_xform = get_global_transform(); //obtain the new one
-
- set_block_transform_notify(true);
- Physics2DServer::get_singleton()->body_set_state(get_rid(),Physics2DServer::BODY_STATE_TRANSFORM,*pre_xform); //then simulate motion!
- set_global_transform(*pre_xform); //but restore state to previous one in both visual and physics
- set_block_transform_notify(false);
-
- Physics2DServer::get_singleton()->body_static_simulate_motion(get_rid(),new_xform); //then simulate motion!
-
- setting=false;
- pending=false;
-
-}
-#endif
void StaticBody2D::set_friction(real_t p_friction) {
@@ -262,7 +239,7 @@ StaticBody2D::~StaticBody2D() {
void RigidBody2D::_body_enter_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(p_id);
@@ -285,7 +262,7 @@ void RigidBody2D::_body_enter_tree(ObjectID p_id) {
void RigidBody2D::_body_exit_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(p_id);
ERR_FAIL_COND(!E);
@@ -310,7 +287,7 @@ void RigidBody2D::_body_inout(int p_status, ObjectID p_instance, int p_body_shap
ObjectID objid = p_instance;
Object *obj = ObjectDB::get_instance(objid);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(objid);
@@ -393,7 +370,7 @@ void RigidBody2D::_direct_state_changed(Object *p_state) {
//eh.. fuck
#ifdef DEBUG_ENABLED
- state = p_state->cast_to<Physics2DDirectBodyState>();
+ state = Object::cast_to<Physics2DDirectBodyState>(p_state);
#else
state = (Physics2DDirectBodyState *)p_state; //trust it
#endif
@@ -906,7 +883,7 @@ void RigidBody2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_colliding_bodies"), &RigidBody2D::get_colliding_bodies);
- BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state:Physics2DDirectBodyState")));
+ BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "Physics2DDirectBodyState")));
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Rigid,Static,Character,Kinematic"), "set_mode", "get_mode");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass");
@@ -1171,12 +1148,10 @@ ObjectID KinematicBody2D::get_collision_collider_id(int p_collision) const {
Object *KinematicBody2D::get_collision_collider_shape(int p_collision) const {
ERR_FAIL_INDEX_V(p_collision, colliders.size(), NULL);
Object *collider = get_collision_collider(p_collision);
- if (collider) {
- CollisionObject2D *obj2d = collider->cast_to<CollisionObject2D>();
- if (obj2d) {
- uint32_t owner = shape_find_owner(colliders[p_collision].collider_shape);
- return obj2d->shape_owner_get_owner(owner);
- }
+ CollisionObject2D *obj2d = Object::cast_to<CollisionObject2D>(collider);
+ if (obj2d) {
+ uint32_t owner = shape_find_owner(colliders[p_collision].collider_shape);
+ return obj2d->shape_owner_get_owner(owner);
}
return NULL;
diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h
index 54bd263b15..1a4b0c0f5c 100644
--- a/scene/2d/physics_body_2d.h
+++ b/scene/2d/physics_body_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp
index cde5724069..197c74352e 100644
--- a/scene/2d/polygon_2d.cpp
+++ b/scene/2d/polygon_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/polygon_2d.h b/scene/2d/polygon_2d.h
index eb47f4d8d1..20c3324a50 100644
--- a/scene/2d/polygon_2d.h
+++ b/scene/2d/polygon_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/position_2d.cpp b/scene/2d/position_2d.cpp
index 7688faa23b..cde665d422 100644
--- a/scene/2d/position_2d.cpp
+++ b/scene/2d/position_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/position_2d.h b/scene/2d/position_2d.h
index 67ff2c610d..af54fb919a 100644
--- a/scene/2d/position_2d.h
+++ b/scene/2d/position_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp
index fbec922a2d..f90331c411 100644
--- a/scene/2d/ray_cast_2d.cpp
+++ b/scene/2d/ray_cast_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -115,11 +115,11 @@ void RayCast2D::set_exclude_parent_body(bool p_exclude_parent_body) {
if (!is_inside_tree())
return;
- if (get_parent()->cast_to<PhysicsBody2D>()) {
+ if (Object::cast_to<PhysicsBody2D>(get_parent())) {
if (exclude_parent_body)
- exclude.insert(get_parent()->cast_to<PhysicsBody2D>()->get_rid());
+ exclude.insert(Object::cast_to<PhysicsBody2D>(get_parent())->get_rid());
else
- exclude.erase(get_parent()->cast_to<PhysicsBody2D>()->get_rid());
+ exclude.erase(Object::cast_to<PhysicsBody2D>(get_parent())->get_rid());
}
}
@@ -139,11 +139,11 @@ void RayCast2D::_notification(int p_what) {
else
set_fixed_process(false);
- if (get_parent()->cast_to<PhysicsBody2D>()) {
+ if (Object::cast_to<PhysicsBody2D>(get_parent())) {
if (exclude_parent_body)
- exclude.insert(get_parent()->cast_to<PhysicsBody2D>()->get_rid());
+ exclude.insert(Object::cast_to<PhysicsBody2D>(get_parent())->get_rid());
else
- exclude.erase(get_parent()->cast_to<PhysicsBody2D>()->get_rid());
+ exclude.erase(Object::cast_to<PhysicsBody2D>(get_parent())->get_rid());
}
} break;
case NOTIFICATION_EXIT_TREE: {
@@ -227,7 +227,7 @@ void RayCast2D::add_exception_rid(const RID &p_rid) {
void RayCast2D::add_exception(const Object *p_object) {
ERR_FAIL_NULL(p_object);
- CollisionObject2D *co = ((Object *)p_object)->cast_to<CollisionObject2D>();
+ const CollisionObject2D *co = Object::cast_to<CollisionObject2D>(p_object);
if (!co)
return;
add_exception_rid(co->get_rid());
@@ -241,7 +241,7 @@ void RayCast2D::remove_exception_rid(const RID &p_rid) {
void RayCast2D::remove_exception(const Object *p_object) {
ERR_FAIL_NULL(p_object);
- CollisionObject2D *co = ((Object *)p_object)->cast_to<CollisionObject2D>();
+ const CollisionObject2D *co = Object::cast_to<CollisionObject2D>(p_object);
if (!co)
return;
remove_exception_rid(co->get_rid());
diff --git a/scene/2d/ray_cast_2d.h b/scene/2d/ray_cast_2d.h
index 244f4302ad..338de814d2 100644
--- a/scene/2d/ray_cast_2d.h
+++ b/scene/2d/ray_cast_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/remote_transform_2d.cpp b/scene/2d/remote_transform_2d.cpp
index cbd7ac06f5..c139573853 100644
--- a/scene/2d/remote_transform_2d.cpp
+++ b/scene/2d/remote_transform_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -51,11 +51,7 @@ void RemoteTransform2D::_update_remote() {
if (!cache)
return;
- Object *obj = ObjectDB::get_instance(cache);
- if (!obj)
- return;
-
- Node2D *n = obj->cast_to<Node2D>();
+ Node2D *n = Object::cast_to<Node2D>(ObjectDB::get_instance(cache));
if (!n)
return;
@@ -182,7 +178,7 @@ bool RemoteTransform2D::get_update_scale() const {
String RemoteTransform2D::get_configuration_warning() const {
- if (!has_node(remote_node) || !get_node(remote_node) || !get_node(remote_node)->cast_to<Node2D>()) {
+ if (!has_node(remote_node) || !Object::cast_to<Node2D>(get_node(remote_node))) {
return TTR("Path property must point to a valid Node2D node to work.");
}
diff --git a/scene/2d/remote_transform_2d.h b/scene/2d/remote_transform_2d.h
index d58ec14a95..30d5fd1e7c 100644
--- a/scene/2d/remote_transform_2d.h
+++ b/scene/2d/remote_transform_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/screen_button.cpp b/scene/2d/screen_button.cpp
index e8e5e9411f..c9bf6675d2 100644
--- a/scene/2d/screen_button.cpp
+++ b/scene/2d/screen_button.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -196,11 +196,11 @@ void TouchScreenButton::_input(const Ref<InputEvent> &p_event) {
ERR_FAIL_COND(!is_visible_in_tree());
- const InputEventScreenTouch *st = p_event->cast_to<InputEventScreenTouch>();
+ const InputEventScreenTouch *st = Object::cast_to<InputEventScreenTouch>(*p_event);
if (passby_press) {
- const InputEventScreenDrag *sd = p_event->cast_to<InputEventScreenDrag>();
+ const InputEventScreenDrag *sd = Object::cast_to<InputEventScreenDrag>(*p_event);
if (st && !st->is_pressed() && finger_pressed == st->get_index()) {
diff --git a/scene/2d/screen_button.h b/scene/2d/screen_button.h
index 2a5935aaf1..7647070b26 100644
--- a/scene/2d/screen_button.h
+++ b/scene/2d/screen_button.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp
index 2ec529a166..c53faab5f9 100644
--- a/scene/2d/sprite.cpp
+++ b/scene/2d/sprite.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -399,7 +399,7 @@ void ViewportSprite::_notification(int p_what) {
Node *n = get_node(viewport_path);
ERR_FAIL_COND(!n);
- Viewport *vp=n->cast_to<Viewport>();
+ Viewport *vp=Object::cast_to<Viewport>(n);
ERR_FAIL_COND(!vp);
Ref<RenderTargetTexture> rtt = vp->get_render_target_texture();
@@ -467,7 +467,7 @@ void ViewportSprite::set_viewport_path(const NodePath& p_viewport) {
Node *n = get_node(viewport_path);
ERR_FAIL_COND(!n);
- Viewport *vp=n->cast_to<Viewport>();
+ Viewport *vp=Object::cast_to<Viewport>(n);
ERR_FAIL_COND(!vp);
Ref<RenderTargetTexture> rtt = vp->get_render_target_texture();
@@ -544,13 +544,13 @@ Rect2 ViewportSprite::get_item_rect() const {
String ViewportSprite::get_configuration_warning() const {
- if (!has_node(viewport_path) || !get_node(viewport_path) || !get_node(viewport_path)->cast_to<Viewport>()) {
+ if (!has_node(viewport_path) || !Object::cast_to<Viewport>(get_node(viewport_path))) {
return TTR("Path property must point to a valid Viewport node to work. Such Viewport must be set to 'render target' mode.");
} else {
Node *n = get_node(viewport_path);
if (n) {
- Viewport *vp = n->cast_to<Viewport>();
+ Viewport *vp = Object::cast_to<Viewport>(n);
if (!vp->is_set_as_render_target()) {
return TTR("The Viewport set in the path property must be set as 'render target' in order for this sprite to work.");
diff --git a/scene/2d/sprite.h b/scene/2d/sprite.h
index d3f9a5f032..64d30325f2 100644
--- a/scene/2d/sprite.h
+++ b/scene/2d/sprite.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index 5d246e331f..b1cc8c226a 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -50,12 +50,12 @@ void TileMap::_notification(int p_what) {
Node2D *c = this;
while (c) {
- navigation = c->cast_to<Navigation2D>();
+ navigation = Object::cast_to<Navigation2D>(c);
if (navigation) {
break;
}
- c = c->get_parent()->cast_to<Node2D>();
+ c = Object::cast_to<Node2D>(c->get_parent());
}
pending_update = true;
@@ -336,6 +336,7 @@ void TileMap::_update_dirty_quadrants() {
if (mat.is_valid())
vs->canvas_item_set_material(canvas_item, mat->get_rid());
vs->canvas_item_set_parent(canvas_item, get_canvas_item());
+ _update_item_material_state(canvas_item);
Transform2D xform;
xform.set_origin(q.pos);
vs->canvas_item_set_transform(canvas_item, xform);
@@ -370,15 +371,13 @@ void TileMap::_update_dirty_quadrants() {
s = tex->get_size();
else {
s = r.size;
- r.position.x += fp_adjust;
- r.position.y += fp_adjust;
- r.size.x -= fp_adjust * 2.0;
- r.size.y -= fp_adjust * 2.0;
}
Rect2 rect;
rect.position = offset.floor();
rect.size = s;
+ rect.size.x += fp_adjust;
+ rect.size.y += fp_adjust;
if (rect.size.y > rect.size.x) {
if ((c.flip_h && (c.flip_v || c.transpose)) || (c.flip_v && !c.transpose))
@@ -782,6 +781,35 @@ void TileMap::_clear_quadrants() {
}
}
+void TileMap::set_material(const Ref<Material> &p_material) {
+
+ CanvasItem::set_material(p_material);
+ _update_all_items_material_state();
+}
+
+void TileMap::set_use_parent_material(bool p_use_parent_material) {
+
+ CanvasItem::set_use_parent_material(p_use_parent_material);
+ _update_all_items_material_state();
+}
+
+void TileMap::_update_all_items_material_state() {
+
+ for (Map<PosKey, Quadrant>::Element *E = quadrant_map.front(); E; E = E->next()) {
+
+ Quadrant &q = E->get();
+ for (List<RID>::Element *E = q.canvas_items.front(); E; E = E->next()) {
+
+ _update_item_material_state(E->get());
+ }
+ }
+}
+
+void TileMap::_update_item_material_state(const RID &p_canvas_item) {
+
+ VS::get_singleton()->canvas_item_set_use_parent_material(p_canvas_item, get_use_parent_material() || get_material().is_valid());
+}
+
void TileMap::clear() {
_clear_quadrants();
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index 082e9d1018..c9d14e09d1 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -183,6 +183,9 @@ private:
void _update_quadrant_transform();
void _recompute_rect_cache();
+ void _update_all_items_material_state();
+ _FORCE_INLINE_ void _update_item_material_state(const RID &p_canvas_item);
+
_FORCE_INLINE_ int _get_quadrant_size() const;
void _set_tile_data(const PoolVector<int> &p_data);
@@ -278,6 +281,10 @@ public:
virtual void set_light_mask(int p_light_mask);
+ virtual void set_material(const Ref<Material> &p_material);
+
+ virtual void set_use_parent_material(bool p_use_parent_material);
+
void clear();
TileMap();
diff --git a/scene/2d/visibility_notifier_2d.cpp b/scene/2d/visibility_notifier_2d.cpp
index 2f2ad08f01..8fc8b65217 100644
--- a/scene/2d/visibility_notifier_2d.cpp
+++ b/scene/2d/visibility_notifier_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -184,7 +184,7 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) {
if (enabler[ENABLER_FREEZE_BODIES]) {
- RigidBody2D *rb2d = p_node->cast_to<RigidBody2D>();
+ RigidBody2D *rb2d = Object::cast_to<RigidBody2D>(p_node);
if (rb2d && ((rb2d->get_mode() == RigidBody2D::MODE_CHARACTER || (rb2d->get_mode() == RigidBody2D::MODE_RIGID && !rb2d->is_able_to_sleep())))) {
add = true;
@@ -194,7 +194,7 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) {
if (enabler[ENABLER_PAUSE_ANIMATIONS]) {
- AnimationPlayer *ap = p_node->cast_to<AnimationPlayer>();
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node);
if (ap) {
add = true;
}
@@ -202,7 +202,7 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) {
if (enabler[ENABLER_PAUSE_ANIMATED_SPRITES]) {
- AnimatedSprite *as = p_node->cast_to<AnimatedSprite>();
+ AnimatedSprite *as = Object::cast_to<AnimatedSprite>(p_node);
if (as) {
add = true;
}
@@ -210,7 +210,7 @@ void VisibilityEnabler2D::_find_nodes(Node *p_node) {
if (enabler[ENABLER_PAUSE_PARTICLES]) {
- Particles2D *ps = p_node->cast_to<Particles2D>();
+ Particles2D *ps = Object::cast_to<Particles2D>(p_node);
if (ps) {
add = true;
}
@@ -273,7 +273,7 @@ void VisibilityEnabler2D::_change_node_state(Node *p_node, bool p_enabled) {
ERR_FAIL_COND(!nodes.has(p_node));
{
- RigidBody2D *rb = p_node->cast_to<RigidBody2D>();
+ RigidBody2D *rb = Object::cast_to<RigidBody2D>(p_node);
if (rb) {
rb->set_sleeping(!p_enabled);
@@ -281,7 +281,7 @@ void VisibilityEnabler2D::_change_node_state(Node *p_node, bool p_enabled) {
}
{
- AnimationPlayer *ap = p_node->cast_to<AnimationPlayer>();
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node);
if (ap) {
@@ -289,7 +289,7 @@ void VisibilityEnabler2D::_change_node_state(Node *p_node, bool p_enabled) {
}
}
{
- AnimatedSprite *as = p_node->cast_to<AnimatedSprite>();
+ AnimatedSprite *as = Object::cast_to<AnimatedSprite>(p_node);
if (as) {
@@ -301,7 +301,7 @@ void VisibilityEnabler2D::_change_node_state(Node *p_node, bool p_enabled) {
}
{
- Particles2D *ps = p_node->cast_to<Particles2D>();
+ Particles2D *ps = Object::cast_to<Particles2D>(p_node);
if (ps) {
diff --git a/scene/2d/visibility_notifier_2d.h b/scene/2d/visibility_notifier_2d.h
index 38da69faef..ef0e1affd3 100644
--- a/scene/2d/visibility_notifier_2d.h
+++ b/scene/2d/visibility_notifier_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/y_sort.cpp b/scene/2d/y_sort.cpp
index f258b7e2e0..e0fb3f0645 100644
--- a/scene/2d/y_sort.cpp
+++ b/scene/2d/y_sort.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/2d/y_sort.h b/scene/2d/y_sort.h
index 3564cfc151..de7aa3a317 100644
--- a/scene/2d/y_sort.h
+++ b/scene/2d/y_sort.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp
index c64b807e43..217cb71230 100644
--- a/scene/3d/area.cpp
+++ b/scene/3d/area.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -115,7 +115,7 @@ real_t Area::get_priority() const {
void Area::_body_enter_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
Map<ObjectID, BodyState>::Element *E = body_map.find(p_id);
@@ -133,7 +133,7 @@ void Area::_body_enter_tree(ObjectID p_id) {
void Area::_body_exit_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
Map<ObjectID, BodyState>::Element *E = body_map.find(p_id);
ERR_FAIL_COND(!E);
@@ -152,7 +152,7 @@ void Area::_body_inout(int p_status, const RID &p_body, int p_instance, int p_bo
ObjectID objid = p_instance;
Object *obj = ObjectDB::get_instance(objid);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
Map<ObjectID, BodyState>::Element *E = body_map.find(objid);
@@ -228,7 +228,7 @@ void Area::_clear_monitoring() {
for (Map<ObjectID, BodyState>::Element *E = bmcopy.front(); E; E = E->next()) {
Object *obj = ObjectDB::get_instance(E->key());
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
if (!node) //node may have been deleted in previous frame or at other legiminate point
continue;
@@ -258,7 +258,7 @@ void Area::_clear_monitoring() {
for (Map<ObjectID, AreaState>::Element *E = bmcopy.front(); E; E = E->next()) {
Object *obj = ObjectDB::get_instance(E->key());
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
if (!node) //node may have been deleted in previous frame or at other legiminate point
continue;
@@ -312,7 +312,7 @@ void Area::set_monitoring(bool p_enable) {
void Area::_area_enter_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
Map<ObjectID, AreaState>::Element *E = area_map.find(p_id);
@@ -330,7 +330,7 @@ void Area::_area_enter_tree(ObjectID p_id) {
void Area::_area_exit_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
Map<ObjectID, AreaState>::Element *E = area_map.find(p_id);
ERR_FAIL_COND(!E);
@@ -349,7 +349,7 @@ void Area::_area_inout(int p_status, const RID &p_area, int p_instance, int p_ar
ObjectID objid = p_instance;
Object *obj = ObjectDB::get_instance(objid);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
Map<ObjectID, AreaState>::Element *E = area_map.find(objid);
diff --git a/scene/3d/area.h b/scene/3d/area.h
index 5df308fc47..7ea97d0a8c 100644
--- a/scene/3d/area.h
+++ b/scene/3d/area.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/arvr_nodes.cpp b/scene/3d/arvr_nodes.cpp
index 3c99f7fb3a..caf313190b 100644
--- a/scene/3d/arvr_nodes.cpp
+++ b/scene/3d/arvr_nodes.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -40,14 +40,14 @@ void ARVRCamera::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
// need to find our ARVROrigin parent and let it know we're it's camera!
- ARVROrigin *origin = get_parent()->cast_to<ARVROrigin>();
+ ARVROrigin *origin = Object::cast_to<ARVROrigin>(get_parent());
if (origin != NULL) {
origin->set_tracked_camera(this);
}
}; break;
case NOTIFICATION_EXIT_TREE: {
// need to find our ARVROrigin parent and let it know we're no longer it's camera!
- ARVROrigin *origin = get_parent()->cast_to<ARVROrigin>();
+ ARVROrigin *origin = Object::cast_to<ARVROrigin>(get_parent());
if (origin != NULL) {
origin->clear_tracked_camera_if(this);
}
@@ -60,7 +60,7 @@ String ARVRCamera::get_configuration_warning() const {
return String();
// must be child node of ARVROrigin!
- ARVROrigin *origin = get_parent()->cast_to<ARVROrigin>();
+ ARVROrigin *origin = Object::cast_to<ARVROrigin>(get_parent());
if (origin == NULL) {
return TTR("ARVRCamera must have an ARVROrigin node as its parent");
};
@@ -209,7 +209,7 @@ String ARVRController::get_configuration_warning() const {
return String();
// must be child node of ARVROrigin!
- ARVROrigin *origin = get_parent()->cast_to<ARVROrigin>();
+ ARVROrigin *origin = Object::cast_to<ARVROrigin>(get_parent());
if (origin == NULL) {
return TTR("ARVRController must have an ARVROrigin node as its parent");
};
@@ -264,7 +264,7 @@ void ARVRAnchor::_notification(int p_what) {
// our basis is scaled to the size of the plane the anchor is tracking
// extract the size from our basis and reset the scale
size = transform.basis.get_scale() * world_scale;
- transform.basis.set_scale(Vector3(1.0, 1.0, 1.0));
+ transform.basis.orthonormalize();
// apply our reference frame and set our transform
set_transform(arvr_server->get_reference_frame() * transform);
@@ -321,7 +321,7 @@ String ARVRAnchor::get_configuration_warning() const {
return String();
// must be child node of ARVROrigin!
- ARVROrigin *origin = get_parent()->cast_to<ARVROrigin>();
+ ARVROrigin *origin = Object::cast_to<ARVROrigin>(get_parent());
if (origin == NULL) {
return TTR("ARVRAnchor must have an ARVROrigin node as its parent");
};
diff --git a/scene/3d/arvr_nodes.h b/scene/3d/arvr_nodes.h
index 936519126b..4c14be71b5 100644
--- a/scene/3d/arvr_nodes.h
+++ b/scene/3d/arvr_nodes.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index 1ae6f552f4..a69bec2fc8 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -183,7 +183,7 @@ void AudioStreamPlayer3D::_mix_audio() {
float AudioStreamPlayer3D::_get_attenuation_db(float p_distance) const {
- float att;
+ float att = 0;
switch (attenuation_model) {
case ATTENUATION_INVERSE_DISTANCE: {
att = Math::linear2db(1.0 / ((p_distance / unit_size) + 000001));
@@ -196,6 +196,10 @@ float AudioStreamPlayer3D::_get_attenuation_db(float p_distance) const {
case ATTENUATION_LOGARITHMIC: {
att = -20 * Math::log(p_distance / unit_size + 000001);
} break;
+ default: {
+ ERR_PRINT("Unknown attenuation type");
+ break;
+ }
}
att += unit_db;
@@ -266,7 +270,7 @@ void AudioStreamPlayer3D::_notification(int p_what) {
if (!sr[i].collider)
continue;
- Area *tarea = sr[i].collider->cast_to<Area>();
+ Area *tarea = Object::cast_to<Area>(sr[i].collider);
if (!tarea)
continue;
@@ -533,6 +537,7 @@ void AudioStreamPlayer3D::_notification(int p_what) {
if (!active) {
set_fixed_process_internal(false);
_change_notify("playing"); //update property in editor
+ emit_signal("finished");
}
}
}
@@ -554,12 +559,12 @@ void AudioStreamPlayer3D::set_stream(Ref<AudioStream> p_stream) {
stream = p_stream;
stream_playback = p_stream->instance_playback();
+ AudioServer::get_singleton()->unlock();
+
if (stream_playback.is_null()) {
stream.unref();
ERR_FAIL_COND(stream_playback.is_null());
}
-
- AudioServer::get_singleton()->unlock();
}
Ref<AudioStream> AudioStreamPlayer3D::get_stream() const {
@@ -898,6 +903,8 @@ void AudioStreamPlayer3D::_bind_methods() {
BIND_ENUM_CONSTANT(DOPPLER_TRACKING_DISABLED);
BIND_ENUM_CONSTANT(DOPPLER_TRACKING_IDLE_STEP);
BIND_ENUM_CONSTANT(DOPPLER_TRACKING_FIXED_STEP);
+
+ ADD_SIGNAL(MethodInfo("finished"));
}
AudioStreamPlayer3D::AudioStreamPlayer3D() {
diff --git a/scene/3d/bone_attachment.cpp b/scene/3d/bone_attachment.cpp
index b55b788b54..e1a5329fb0 100644
--- a/scene/3d/bone_attachment.cpp
+++ b/scene/3d/bone_attachment.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -51,9 +51,7 @@ bool BoneAttachment::_set(const StringName &p_name, const Variant &p_value) {
}
void BoneAttachment::_get_property_list(List<PropertyInfo> *p_list) const {
- Skeleton *parent = NULL;
- if (get_parent())
- parent = get_parent()->cast_to<Skeleton>();
+ Skeleton *parent = Object::cast_to<Skeleton>(get_parent());
if (parent) {
@@ -73,8 +71,8 @@ void BoneAttachment::_get_property_list(List<PropertyInfo> *p_list) const {
void BoneAttachment::_check_bind() {
- if (get_parent() && get_parent()->cast_to<Skeleton>()) {
- Skeleton *sk = get_parent()->cast_to<Skeleton>();
+ if (Skeleton *sk = Object::cast_to<Skeleton>(get_parent())) {
+
int idx = sk->find_bone(bone_name);
if (idx != -1) {
sk->bind_child_node_to_bone(idx, this);
@@ -88,8 +86,8 @@ void BoneAttachment::_check_unbind() {
if (bound) {
- if (get_parent() && get_parent()->cast_to<Skeleton>()) {
- Skeleton *sk = get_parent()->cast_to<Skeleton>();
+ if (Skeleton *sk = Object::cast_to<Skeleton>(get_parent())) {
+
int idx = sk->find_bone(bone_name);
if (idx != -1) {
sk->unbind_child_node_from_bone(idx, this);
diff --git a/scene/3d/bone_attachment.h b/scene/3d/bone_attachment.h
index 65908d98a8..159d16157a 100644
--- a/scene/3d/bone_attachment.h
+++ b/scene/3d/bone_attachment.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp
index 9db7253fd6..02a7845e0b 100644
--- a/scene/3d/camera.cpp
+++ b/scene/3d/camera.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -339,15 +339,8 @@ Vector3 Camera::project_local_ray_normal(const Point2 &p_pos) const {
ERR_FAIL_COND_V(!is_inside_tree(), Vector3());
}
-#if 0
- Size2 viewport_size = get_viewport()->get_visible_rect().size;
- Vector2 cpos = p_pos;
-#else
-
Size2 viewport_size = get_viewport()->get_camera_rect_size();
Vector2 cpos = get_viewport()->get_camera_coords(p_pos);
-#endif
-
Vector3 ray;
if (mode == PROJECTION_ORTHOGONAL) {
@@ -371,17 +364,9 @@ Vector3 Camera::project_ray_origin(const Point2 &p_pos) const {
ERR_FAIL_COND_V(!is_inside_tree(), Vector3());
}
-#if 0
- Size2 viewport_size = get_viewport()->get_visible_rect().size;
- Vector2 cpos = p_pos;
-#else
-
Size2 viewport_size = get_viewport()->get_camera_rect_size();
Vector2 cpos = get_viewport()->get_camera_coords(p_pos);
-#endif
-
ERR_FAIL_COND_V(viewport_size.y == 0, Vector3());
- //float aspect = viewport_size.x / viewport_size.y;
if (mode == PROJECTION_PERSPECTIVE) {
diff --git a/scene/3d/camera.h b/scene/3d/camera.h
index 70849791e5..243a7b9b39 100644
--- a/scene/3d/camera.h
+++ b/scene/3d/camera.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/character_camera.cpp b/scene/3d/character_camera.cpp
deleted file mode 100644
index ce047f91c2..0000000000
--- a/scene/3d/character_camera.cpp
+++ /dev/null
@@ -1,718 +0,0 @@
-/*************************************************************************/
-/* character_camera.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "character_camera.h"
-
-#include "physics_body.h"
-#if 0
-void CharacterCamera::_set(const String& p_name, const Variant& p_value) {
-
- if (p_name=="type")
- set_camera_type((CameraType)((int)(p_value)));
- else if (p_name=="orbit")
- set_orbit(p_value);
- else if (p_name=="height")
- set_height(p_value);
- else if (p_name=="inclination")
- set_inclination(p_value);
- else if (p_name=="max_orbit_x")
- set_max_orbit_x(p_value);
- else if (p_name=="min_orbit_x")
- set_min_orbit_x(p_value);
- else if (p_name=="max_distance")
- set_max_distance(p_value);
- else if (p_name=="min_distance")
- set_min_distance(p_value);
- else if (p_name=="distance")
- set_distance(p_value);
- else if (p_name=="clip")
- set_clip(p_value);
- else if (p_name=="autoturn")
- set_autoturn(p_value);
- else if (p_name=="autoturn_tolerance")
- set_autoturn_tolerance(p_value);
- else if (p_name=="autoturn_speed")
- set_autoturn_speed(p_value);
-
-}
-Variant CharacterCamera::_get(const String& p_name) const {
-
- if (p_name=="type")
- return get_camera_type();
- else if (p_name=="orbit")
- return get_orbit();
- else if (p_name=="height")
- return get_height();
- else if (p_name=="inclination")
- return get_inclination();
- else if (p_name=="max_orbit_x")
- return get_max_orbit_x();
- else if (p_name=="min_orbit_x")
- return get_min_orbit_x();
- else if (p_name=="max_distance")
- return get_max_distance();
- else if (p_name=="min_distance")
- return get_min_distance();
- else if (p_name=="distance")
- return get_distance();
- else if (p_name=="clip")
- return has_clip();
- else if (p_name=="autoturn")
- return has_autoturn();
- else if (p_name=="autoturn_tolerance")
- return get_autoturn_tolerance();
- else if (p_name=="autoturn_speed")
- return get_autoturn_speed();
-
- return Variant();
-}
-
-void CharacterCamera::_get_property_list( List<PropertyInfo> *p_list) const {
-
- p_list->push_back( PropertyInfo( Variant::INT, "type", PROPERTY_HINT_ENUM, "Fixed,Follow") );
- p_list->push_back( PropertyInfo( Variant::VECTOR2, "orbit" ) );
- p_list->push_back( PropertyInfo( Variant::REAL, "height", PROPERTY_HINT_RANGE,"-1024,1024,0.01" ) );
- p_list->push_back( PropertyInfo( Variant::REAL, "inclination", PROPERTY_HINT_RANGE,"-90,90,0.01" ) );
- p_list->push_back( PropertyInfo( Variant::REAL, "max_orbit_x", PROPERTY_HINT_RANGE,"-90,90,0.01" ) );
- p_list->push_back( PropertyInfo( Variant::REAL, "min_orbit_x", PROPERTY_HINT_RANGE,"-90,90,0.01" ) );
- p_list->push_back( PropertyInfo( Variant::REAL, "min_distance", PROPERTY_HINT_RANGE,"0,100,0.01" ) );
- p_list->push_back( PropertyInfo( Variant::REAL, "max_distance", PROPERTY_HINT_RANGE,"0,100,0.01" ) );
- p_list->push_back( PropertyInfo( Variant::REAL, "distance", PROPERTY_HINT_RANGE,"0.01,1024,0,01") );
- p_list->push_back( PropertyInfo( Variant::BOOL, "clip") );
- p_list->push_back( PropertyInfo( Variant::BOOL, "autoturn") );
- p_list->push_back( PropertyInfo( Variant::REAL, "autoturn_tolerance", PROPERTY_HINT_RANGE,"1,90,0.01") );
- p_list->push_back( PropertyInfo( Variant::REAL, "autoturn_speed", PROPERTY_HINT_RANGE,"1,90,0.01") );
-
-
-}
-
-void CharacterCamera::_compute_camera() {
-
-
- // update the transform with the next proposed transform (camera is 1 logic frame delayed)
-
- /*
- float time = get_root_node()->get_frame_time();
- Vector3 oldp = accepted.get_origin();
- Vector3 newp = proposed.get_origin();
-
- float frame_dist = time *
- if (oldp.distance_to(newp) >
- */
-
- float time = get_root_node()->get_frame_time();
-
- if (true) {
-
- if (clip_ray[0].clipped && clip_ray[1].clipped && clip_ray[2].clipped) {
- //all have been clipped
- proposed.origin=clip_ray[1].clip_pos;
-
-
- } else {
-
- Vector3 rel=proposed.origin-target_pos;
-
- if (clip_ray[0].clipped && !clip_ray[2].clipped) {
-
- float distance = target_pos.distance_to(clip_ray[0].clip_pos);
- real_t amount = 1.0-(distance/clip_len);
- amount = CLAMP(amount,0,1);
-
-
- rel=Matrix3(Vector3(0,1,0)),
- rotate_orbit(Vector2(0,autoturn_speed*time*amount));
- }
- if (clip_ray[2].clipped && !clip_ray[0].clipped) {
-
- float distance = target_pos.distance_to(clip_ray[2].clip_pos);
- real_t amount = 1.0-(distance/clip_len);
- amount = CLAMP(amount,0,1);
-
- rotate_orbit(Vector2(0,-autoturn_speed*time*amount));
- }
-
- }
- }
-
-
- Transform final;
-
- static float pos_ratio = 0.9;
- static float rot_ratio = 10;
-
- Vector3 vec1 = accepted.origin;
- Vector3 vec2 = proposed.origin;
- final.origin = vec2.linear_interpolate(vec1, pos_ratio * time);
-
- Quat q1 = accepted.basis;
- Quat q2 = proposed.basis;
- final.basis = q1.slerp(q2, rot_ratio * time);
-
- accepted=final;
-
- _update_camera();
-
- // calculate the next proposed transform
-
-
- Vector3 new_pos;
- Vector3 character_pos = get_global_transform().origin;
- character_pos.y+=height; // height compensate
-
- if(type==CAMERA_FOLLOW) {
-
-
-
- /* calculate some variables */
-
- Vector3 rel = follow_pos - character_pos;
-
- float l = rel.length();
- Vector3 rel_n = (l > 0) ? (rel/l) : Vector3();
-#if 1
- float ang = Math::acos(rel_n.dot( Vector3(0,1,0) ));
-
- Vector3 tangent = rel_n;
- tangent.y=0; // get rid of y
- if (tangent.length_squared() < CMP_EPSILON2)
- tangent=Vector3(0,0,1); // use Z as tangent if rel is parallel to y
- else
- tangent.normalize();
-
- /* now start applying the rules */
-
- //clip distance
- if (l > max_distance)
- l=max_distance;
- if (l < min_distance)
- l=min_distance;
-
- //fix angle
-
- float ang_min = Math_PI * 0.5 + Math::deg2rad(min_orbit_x);
- float ang_max = Math_PI * 0.5 + Math::deg2rad(max_orbit_x);
-
- if (ang<ang_min)
- ang=ang_min;
- if (ang>ang_max)
- ang=ang_max;
-
- /* finally, rebuild the validated camera position */
-
- new_pos=Vector3(0,Math::cos(ang),0);
- new_pos+=tangent*Math::sin(ang);
- new_pos*=l;
- new_pos+=character_pos;
-#else
- if (l > max_distance)
- l=max_distance;
- if (l < min_distance)
- l=min_distance;
-
- new_pos = character_pos + rel_n * l;
-
-#endif
- follow_pos=new_pos;
-
- } else if (type==CAMERA_FIXED) {
-
-
- if (distance<min_distance)
- distance=min_distance;
- if (distance>max_distance)
- distance=max_distance;
-
- if (orbit.x<min_orbit_x)
- orbit.x=min_orbit_x;
- if (orbit.x>max_orbit_x)
- orbit.x=max_orbit_x;
-
- Matrix3 m;
- m.rotate(Vector3(0,1,0),-Math::deg2rad(orbit.y));
- m.rotate(Vector3(1,0,0),-Math::deg2rad(orbit.x));
-
- new_pos = (m.get_axis(2) * distance) + character_pos;
-
- if (use_lookat_target) {
-
- Transform t = get_global_transform();
- Vector3 y = t.basis.get_axis(1).normalized();
- Vector3 z = lookat_target - character_pos;
- z= (z - y * y.dot(z)).normalized();
- orbit.y = -Math::rad2deg(Math::atan2(z.x,z.z)) + 180;
-
- /*
- Transform t = get_global_transform();
- Vector3 y = t.basis.get_axis(1).normalized();
- Vector3 z = lookat_target - t.origin;
- z= (z - y * y.dot(z)).normalized();
- Vector3 x = z.cross(y).normalized();
- Transform t2;
- t2.basis.set_axis(0,x);
- t2.basis.set_axis(1,y);
- t2.basis.set_axis(2,z);
- t2.origin=t.origin;
-
- Vector3 local = t2.xform_inv(camera_pos);
-
- float ang = Math::atan2(local.x,local.y);
- */
-
- /*
-
- Vector3 vec1 = lookat_target - new_pos;
- vec1.normalize();
- Vector3 vec2 = character_pos - new_pos;
- vec2.normalize();
-
- float dot = vec1.dot(vec2);
- printf("dot %f\n", dot);
- if ( dot < 0.5) {
-
- rotate_orbit(Vector2(0, 90));
- };
- */
-
-
- };
- }
-
- Vector3 target;
- if (use_lookat_target) {
-
- target = lookat_target;
- } else {
- target = character_pos;
- };
-
- proposed.set_look_at(new_pos,target,Vector3(0,1,0));
- proposed = proposed * Transform(Matrix3(Vector3(1,0,0),Math::deg2rad(inclination)),Vector3()); //inclination
-
-
- Vector<RID> exclude;
- exclude.push_back(target_body);
-
-
-
- Vector3 rel = new_pos-target;
-
- for(int i=0;i<3;i++) {
-
- PhysicsServer::get_singleton()->query_intersection(clip_ray[i].query,get_world().get_space(),exclude);
- PhysicsServer::get_singleton()->query_intersection_segment(clip_ray[i].query,target,target+Matrix3(Vector3(0,1,0),Math::deg2rad(autoturn_tolerance*(i-1.0))).xform(rel));
- clip_ray[i].clipped=false;
- clip_ray[i].clip_pos=Vector3();
- }
- target_pos=target;
- clip_len=rel.length();
-
-
-
-}
-
-void CharacterCamera::set_use_lookat_target(bool p_use, const Vector3 &p_lookat) {
-
- use_lookat_target = p_use;
- lookat_target = p_lookat;
-};
-
-
-void CharacterCamera::_notification(int p_what) {
-
- switch(p_what) {
-
- case NOTIFICATION_PROCESS: {
-
-
- _compute_camera();
- } break;
-
- case NOTIFICATION_ENTER_SCENE: {
-
- if (type==CAMERA_FOLLOW) {
-
- set_orbit(orbit);
- set_distance(distance);
- }
-
- accepted=get_global_transform();
- proposed=accepted;
-
- target_body = RID();
-
- Node* parent = get_parent();
- while (parent) {
- PhysicsBody* p = parent->cast_to<PhysicsBody>();
- if (p) {
- target_body = p->get_body();
- break;
- };
- parent = parent->get_parent();
- };
-
- } break;
-
- case NOTIFICATION_TRANSFORM_CHANGED: {
-
- } break;
- case NOTIFICATION_EXIT_SCENE: {
-
- if (type==CAMERA_FOLLOW) {
- distance=get_distance();
- orbit=get_orbit();
-
- }
- } break;
-
- case NOTIFICATION_BECAME_CURRENT: {
-
- set_process(true);
- } break;
- case NOTIFICATION_LOST_CURRENT: {
-
- set_process(false);
- } break;
- }
-
-}
-
-
-void CharacterCamera::set_camera_type(CameraType p_camera_type) {
-
-
- if (p_camera_type==type)
- return;
-
- type=p_camera_type;
-
- // do conversions
-}
-
-CharacterCamera::CameraType CharacterCamera::get_camera_type() const {
-
- return type;
-
-}
-
-void CharacterCamera::set_orbit(const Vector2& p_orbit) {
-
- orbit=p_orbit;
-
- if(type == CAMERA_FOLLOW && is_inside_scene()) {
-
- Vector3 char_pos = get_global_transform().origin;
- char_pos.y+=height;
- float d = char_pos.distance_to(follow_pos);
-
- Matrix3 m;
- m.rotate(Vector3(0,1,0),-orbit.y);
- m.rotate(Vector3(1,0,0),-orbit.x);
-
- follow_pos=char_pos + m.get_axis(2) * d;
-
- }
-
-}
-void CharacterCamera::set_orbit_x(float p_x) {
-
- orbit.x=p_x;
- if(type == CAMERA_FOLLOW && is_inside_scene())
- set_orbit(Vector2( p_x, get_orbit().y ));
-}
-void CharacterCamera::set_orbit_y(float p_y) {
-
-
- orbit.y=p_y;
- if(type == CAMERA_FOLLOW && is_inside_scene())
- set_orbit(Vector2( get_orbit().x, p_y ));
-
-}
-Vector2 CharacterCamera::get_orbit() const {
-
-
- if (type == CAMERA_FOLLOW && is_inside_scene()) {
-
- Vector3 char_pos = get_global_transform().origin;
- char_pos.y+=height;
- Vector3 rel = (follow_pos - char_pos).normalized();
- Vector2 ret_orbit;
- ret_orbit.x = Math::acos( Vector3(0,1,0).dot( rel ) ) - Math_PI * 0.5;
- ret_orbit.y = Math::atan2(rel.x,rel.z);
- return ret_orbit;
- }
- return orbit;
-}
-
-void CharacterCamera::rotate_orbit(const Vector2& p_relative) {
-
- if (type == CAMERA_FOLLOW && is_inside_scene()) {
-
- Matrix3 m;
- m.rotate(Vector3(0,1,0),-Math::deg2rad(p_relative.y));
- m.rotate(Vector3(1,0,0),-Math::deg2rad(p_relative.x));
-
- Vector3 char_pos = get_global_transform().origin;
- char_pos.y+=height;
- Vector3 rel = (follow_pos - char_pos);
- rel = m.xform(rel);
- follow_pos=char_pos+rel;
-
- }
-
- orbit+=p_relative;
-}
-
-void CharacterCamera::set_height(float p_height) {
-
-
- height=p_height;
-}
-
-float CharacterCamera::get_height() const {
-
- return height;
-
-}
-
-void CharacterCamera::set_max_orbit_x(float p_max) {
-
- max_orbit_x=p_max;
-}
-
-float CharacterCamera::get_max_orbit_x() const {
-
- return max_orbit_x;
-}
-
-void CharacterCamera::set_min_orbit_x(float p_min) {
-
- min_orbit_x=p_min;
-}
-
-float CharacterCamera::get_min_orbit_x() const {
-
- return min_orbit_x;
-}
-
-float CharacterCamera::get_min_distance() const {
-
- return min_distance;
-}
-float CharacterCamera::get_max_distance() const {
-
- return max_distance;
-}
-
-void CharacterCamera::set_min_distance(float p_min) {
-
- min_distance=p_min;
-}
-
-void CharacterCamera::set_max_distance(float p_max) {
-
- max_distance = p_max;
-}
-
-
-void CharacterCamera::set_distance(float p_distance) {
-
- if (type == CAMERA_FOLLOW && is_inside_scene()) {
-
- Vector3 char_pos = get_global_transform().origin;
- char_pos.y+=height;
- Vector3 rel = (follow_pos - char_pos).normalized();
- rel*=p_distance;
- follow_pos=char_pos+rel;
-
- }
-
- distance=p_distance;
-}
-
-float CharacterCamera::get_distance() const {
-
- if (type == CAMERA_FOLLOW && is_inside_scene()) {
-
- Vector3 char_pos = get_global_transform().origin;
- char_pos.y+=height;
- return (follow_pos - char_pos).length();
-
- }
-
- return distance;
-}
-
-void CharacterCamera::set_clip(bool p_enabled) {
-
-
- clip=p_enabled;
-}
-
-bool CharacterCamera::has_clip() const {
-
- return clip;
-
-}
-
-
-void CharacterCamera::set_autoturn(bool p_enabled) {
-
-
- autoturn=p_enabled;
-}
-
-bool CharacterCamera::has_autoturn() const {
-
- return autoturn;
-
-}
-
-void CharacterCamera::set_autoturn_tolerance(float p_degrees) {
-
-
- autoturn_tolerance=p_degrees;
-}
-float CharacterCamera::get_autoturn_tolerance() const {
-
-
- return autoturn_tolerance;
-}
-
-void CharacterCamera::set_inclination(float p_degrees) {
-
-
- inclination=p_degrees;
-}
-float CharacterCamera::get_inclination() const {
-
-
- return inclination;
-}
-
-
-void CharacterCamera::set_autoturn_speed(float p_speed) {
-
-
- autoturn_speed=p_speed;
-}
-float CharacterCamera::get_autoturn_speed() const {
-
- return autoturn_speed;
-
-}
-
-
-
-
-
-void CharacterCamera::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("set_camera_type","type"),&CharacterCamera::set_camera_type);
- ClassDB::bind_method(D_METHOD("get_camera_type"),&CharacterCamera::get_camera_type);
- ClassDB::bind_method(D_METHOD("set_orbit","orbit"),&CharacterCamera::set_orbit);
- ClassDB::bind_method(D_METHOD("get_orbit"),&CharacterCamera::get_orbit);
- ClassDB::bind_method(D_METHOD("set_orbit_x","x"),&CharacterCamera::set_orbit_x);
- ClassDB::bind_method(D_METHOD("set_orbit_y","y"),&CharacterCamera::set_orbit_y);
- ClassDB::bind_method(D_METHOD("set_min_orbit_x","x"),&CharacterCamera::set_min_orbit_x);
- ClassDB::bind_method(D_METHOD("get_min_orbit_x"),&CharacterCamera::get_min_orbit_x);
- ClassDB::bind_method(D_METHOD("set_max_orbit_x","x"),&CharacterCamera::set_max_orbit_x);
- ClassDB::bind_method(D_METHOD("get_max_orbit_x"),&CharacterCamera::get_max_orbit_x);
- ClassDB::bind_method(D_METHOD("rotate_orbit"),&CharacterCamera::rotate_orbit);
- ClassDB::bind_method(D_METHOD("set_distance","distance"),&CharacterCamera::set_distance);
- ClassDB::bind_method(D_METHOD("get_distance"),&CharacterCamera::get_distance);
- ClassDB::bind_method(D_METHOD("set_clip","enable"),&CharacterCamera::set_clip);
- ClassDB::bind_method(D_METHOD("has_clip"),&CharacterCamera::has_clip);
- ClassDB::bind_method(D_METHOD("set_autoturn","enable"),&CharacterCamera::set_autoturn);
- ClassDB::bind_method(D_METHOD("has_autoturn"),&CharacterCamera::has_autoturn);
- ClassDB::bind_method(D_METHOD("set_autoturn_tolerance","degrees"),&CharacterCamera::set_autoturn_tolerance);
- ClassDB::bind_method(D_METHOD("get_autoturn_tolerance"),&CharacterCamera::get_autoturn_tolerance);
- ClassDB::bind_method(D_METHOD("set_autoturn_speed","speed"),&CharacterCamera::set_autoturn_speed);
- ClassDB::bind_method(D_METHOD("get_autoturn_speed"),&CharacterCamera::get_autoturn_speed);
- ClassDB::bind_method(D_METHOD("set_use_lookat_target","use","lookat"),&CharacterCamera::set_use_lookat_target, DEFVAL(Vector3()));
-
- ClassDB::bind_method(D_METHOD("_ray_collision"),&CharacterCamera::_ray_collision);
-
- BIND_ENUM_CONSTANT( CAMERA_FIXED );
- BIND_ENUM_CONSTANT( CAMERA_FOLLOW );
-}
-
-void CharacterCamera::_ray_collision(Vector3 p_point, Vector3 p_normal, int p_subindex, ObjectID p_against,int p_idx) {
-
-
- clip_ray[p_idx].clip_pos=p_point;
- clip_ray[p_idx].clipped=true;
-};
-
-Transform CharacterCamera::get_camera_transform() const {
-
- return accepted;
-}
-
-
-CharacterCamera::CharacterCamera() {
-
-
- type=CAMERA_FOLLOW;
- height=1;
-
- orbit=Vector2(0,0);
-
- distance=3;
- min_distance=2;
- max_distance=5;
-
- autoturn=false;
- autoturn_tolerance=15;
- autoturn_speed=20;
-
- min_orbit_x=-50;
- max_orbit_x=70;
- inclination=0;
-
- clip=false;
- use_lookat_target = false;
-
- for(int i=0;i<3;i++) {
- clip_ray[i].query=PhysicsServer::get_singleton()->query_create(this, "_ray_collision", i, true);
- clip_ray[i].clipped=false;
- }
-
-
-}
-
-CharacterCamera::~CharacterCamera() {
-
- for(int i=0;i<3;i++) {
- PhysicsServer::get_singleton()->free(clip_ray[i].query);
- }
-
-
-}
-#endif
diff --git a/scene/3d/character_camera.h b/scene/3d/character_camera.h
deleted file mode 100644
index c3a1c70d5e..0000000000
--- a/scene/3d/character_camera.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/*************************************************************************/
-/* character_camera.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef CHARACTER_CAMERA_H
-#define CHARACTER_CAMERA_H
-
-#include "scene/3d/camera.h"
-#if 0
-class CharacterCamera : public Camera {
-
- GDCLASS( CharacterCamera, Camera );
-public:
-
- enum CameraType {
- CAMERA_FIXED,
- CAMERA_FOLLOW
- };
-
-private:
-
-
- CameraType type;
-
- //used for follow
- Vector3 follow_pos;
- //used for fixed
- Vector2 orbit;
- float distance;
-
- float height;
-
- float min_distance;
- float max_distance;
-
- float max_orbit_x;
- float min_orbit_x;
-
- float inclination;
-
- bool clip;
- bool autoturn;
- float autoturn_tolerance;
- float autoturn_speed;
-
-
-
- struct ClipRay {
- RID query;
- bool clipped;
- Vector3 clip_pos;
- };
-
- ClipRay clip_ray[3];
- Vector3 target_pos;
- float clip_len;
-
-
- Transform accepted;
- Vector3 proposed_pos;
-
- bool use_lookat_target;
- Vector3 lookat_target;
-
- void _compute_camera();
-
- RID ray_query;
- RID left_turn_query;
- RID right_turn_query;
- RID target_body;
-
-protected:
-
- virtual void _request_camera_update() {} //ignore
-
- bool _set(const StringName& p_name, const Variant& p_value);
- bool _get(const StringName& p_name,Variant &r_ret) const;
- void _get_property_list( List<PropertyInfo> *p_list) const;
- void _notification(int p_what);
-
- static void _bind_methods();
-
- void _ray_collision(Vector3 p_point, Vector3 p_normal, int p_subindex, ObjectID p_against,int p_idx);
-
-public:
-
-
- void set_camera_type(CameraType p_camera_type);
- CameraType get_camera_type() const;
-
- void set_orbit(const Vector2& p_orbit);
- void set_orbit_x(float p_x);
- void set_orbit_y(float p_y);
- Vector2 get_orbit() const;
-
- void set_height(float p_height);
- float get_height() const;
-
- void set_inclination(float p_degrees);
- float get_inclination() const;
-
- void set_max_orbit_x(float p_max);
- float get_max_orbit_x() const;
-
- void set_min_orbit_x(float p_min);
- float get_min_orbit_x() const;
-
- void rotate_orbit(const Vector2& p_relative);
-
- void set_distance(float p_distance);
- float get_distance() const;
-
- float get_min_distance() const;
- float get_max_distance() const;
- void set_min_distance(float p_min);
- void set_max_distance(float p_max);
-
-
- void set_clip(bool p_enabled);
- bool has_clip() const;
-
- void set_autoturn(bool p_enabled);
- bool has_autoturn() const;
-
- void set_autoturn_tolerance(float p_degrees);
- float get_autoturn_tolerance() const;
-
- void set_autoturn_speed(float p_speed);
- float get_autoturn_speed() const;
-
- void set_use_lookat_target(bool p_use, const Vector3 &p_lookat = Vector3());
-
- virtual Transform get_camera_transform() const;
-
- CharacterCamera();
- ~CharacterCamera();
-};
-
-VARIANT_ENUM_CAST( CharacterCamera::CameraType );
-
-#endif
-#endif // CHARACTER_CAMERA_H
diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp
index 1aba26673c..c121ef4566 100644
--- a/scene/3d/collision_object.cpp
+++ b/scene/3d/collision_object.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "collision_object.h"
+
#include "scene/scene_string_names.h"
#include "servers/physics_server.h"
diff --git a/scene/3d/collision_object.h b/scene/3d/collision_object.h
index 6c13e5d505..ac35de697c 100644
--- a/scene/3d/collision_object.h
+++ b/scene/3d/collision_object.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/collision_polygon.cpp b/scene/3d/collision_polygon.cpp
index 0c61c96d07..382cbb8f38 100644
--- a/scene/3d/collision_polygon.cpp
+++ b/scene/3d/collision_polygon.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -77,7 +77,7 @@ void CollisionPolygon::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_PARENTED: {
- parent = get_parent()->cast_to<CollisionObject>();
+ parent = Object::cast_to<CollisionObject>(get_parent());
if (parent) {
owner_id = parent->create_shape_owner(this);
_build_polygon();
@@ -147,7 +147,7 @@ bool CollisionPolygon::is_disabled() const {
String CollisionPolygon::get_configuration_warning() const {
- if (!get_parent()->cast_to<CollisionObject>()) {
+ if (!Object::cast_to<CollisionObject>(get_parent())) {
return TTR("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.");
}
diff --git a/scene/3d/collision_polygon.h b/scene/3d/collision_polygon.h
index beefae182c..dbed1d7154 100644
--- a/scene/3d/collision_polygon.h
+++ b/scene/3d/collision_polygon.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/collision_shape.cpp b/scene/3d/collision_shape.cpp
index 2aa6a95718..5f1151f8e9 100644
--- a/scene/3d/collision_shape.cpp
+++ b/scene/3d/collision_shape.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* body_shape.cpp */
+/* collision_shape.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -50,9 +50,8 @@ void CollisionShape::make_convex_from_brothers() {
for (int i = 0; i < p->get_child_count(); i++) {
Node *n = p->get_child(i);
- if (n->cast_to<MeshInstance>()) {
+ if (MeshInstance *mi = Object::cast_to<MeshInstance>(n)) {
- MeshInstance *mi = n->cast_to<MeshInstance>();
Ref<Mesh> m = mi->get_mesh();
if (m.is_valid()) {
@@ -68,7 +67,7 @@ void CollisionShape::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_PARENTED: {
- parent = get_parent()->cast_to<CollisionObject>();
+ parent = Object::cast_to<CollisionObject>(get_parent());
if (parent) {
owner_id = parent->create_shape_owner(this);
if (shape.is_valid()) {
@@ -106,7 +105,7 @@ void CollisionShape::resource_changed(RES res) {
String CollisionShape::get_configuration_warning() const {
- if (!get_parent()->cast_to<CollisionObject>()) {
+ if (!Object::cast_to<CollisionObject>(get_parent())) {
return TTR("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.");
}
diff --git a/scene/3d/collision_shape.h b/scene/3d/collision_shape.h
index 277e0dfa77..94621177cb 100644
--- a/scene/3d/collision_shape.h
+++ b/scene/3d/collision_shape.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* body_shape.h */
+/* collision_shape.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index 460580d4fe..bb54a43028 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -548,8 +548,8 @@ void GIProbe::_plot_face(int p_idx, int p_level, int p_x, int p_y, int p_z, cons
//plot the face by guessing it's albedo and emission value
//find best axis to map to, for scanning values
- int closest_axis;
- float closest_dot;
+ int closest_axis = 0;
+ float closest_dot = 0;
Plane plane = Plane(p_vtx[0], p_vtx[1], p_vtx[2]);
Vector3 normal = plane.normal;
@@ -1091,7 +1091,7 @@ void GIProbe::_plot_mesh(const Transform &p_xform, Ref<Mesh> &p_mesh, Baker *p_b
void GIProbe::_find_meshes(Node *p_at_node, Baker *p_baker) {
- MeshInstance *mi = p_at_node->cast_to<MeshInstance>();
+ MeshInstance *mi = Object::cast_to<MeshInstance>(p_at_node);
if (mi && mi->get_flag(GeometryInstance::FLAG_USE_BAKED_LIGHT)) {
Ref<Mesh> mesh = mi->get_mesh();
if (mesh.is_valid()) {
@@ -1113,9 +1113,8 @@ void GIProbe::_find_meshes(Node *p_at_node, Baker *p_baker) {
}
}
- if (p_at_node->cast_to<Spatial>()) {
+ if (Spatial *s = Object::cast_to<Spatial>(p_at_node)) {
- Spatial *s = p_at_node->cast_to<Spatial>();
Array meshes = p_at_node->call("get_meshes");
for (int i = 0; i < meshes.size(); i += 2) {
diff --git a/scene/3d/gi_probe.h b/scene/3d/gi_probe.h
index 8346437ebd..5a06984a47 100644
--- a/scene/3d/gi_probe.h
+++ b/scene/3d/gi_probe.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/immediate_geometry.cpp b/scene/3d/immediate_geometry.cpp
index 060e088750..64d3f4fcab 100644
--- a/scene/3d/immediate_geometry.cpp
+++ b/scene/3d/immediate_geometry.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/immediate_geometry.h b/scene/3d/immediate_geometry.h
index bc8452c7e0..6db825bf54 100644
--- a/scene/3d/immediate_geometry.h
+++ b/scene/3d/immediate_geometry.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* immediate_geometry.h */
+/* immediate_geometry.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/interpolated_camera.cpp b/scene/3d/interpolated_camera.cpp
index a481018890..157ae42571 100644
--- a/scene/3d/interpolated_camera.cpp
+++ b/scene/3d/interpolated_camera.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -46,7 +46,7 @@ void InterpolatedCamera::_notification(int p_what) {
break;
if (has_node(target)) {
- Spatial *node = get_node(target)->cast_to<Spatial>();
+ Spatial *node = Object::cast_to<Spatial>(get_node(target));
if (!node)
break;
@@ -56,8 +56,8 @@ void InterpolatedCamera::_notification(int p_what) {
local_transform = local_transform.interpolate_with(target_xform, delta);
set_global_transform(local_transform);
- if (node->cast_to<Camera>()) {
- Camera *cam = node->cast_to<Camera>();
+ if (Camera *cam = Object::cast_to<Camera>(node)) {
+
if (cam->get_projection() == get_projection()) {
float new_near = Math::lerp(get_znear(), cam->get_znear(), delta);
@@ -83,7 +83,7 @@ void InterpolatedCamera::_notification(int p_what) {
void InterpolatedCamera::_set_target(const Object *p_target) {
ERR_FAIL_NULL(p_target);
- set_target(p_target->cast_to<Spatial>());
+ set_target(Object::cast_to<Spatial>(p_target));
}
void InterpolatedCamera::set_target(const Spatial *p_target) {
diff --git a/scene/3d/interpolated_camera.h b/scene/3d/interpolated_camera.h
index c302c32fc9..26e7278c99 100644
--- a/scene/3d/interpolated_camera.h
+++ b/scene/3d/interpolated_camera.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index f4b5cc5731..09b253b309 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -334,6 +334,7 @@ void DirectionalLight::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_split_3", PROPERTY_HINT_RANGE, "0,1,0.001"), "set_param", "get_param", PARAM_SHADOW_SPLIT_3_OFFSET);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "directional_shadow_blend_splits"), "set_blend_splits", "is_blend_splits_enabled");
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_normal_bias", PROPERTY_HINT_RANGE, "0,16,0.01"), "set_param", "get_param", PARAM_SHADOW_NORMAL_BIAS);
+ ADD_PROPERTYI(PropertyInfo(Variant::REAL, "directional_shadow_bias_split_scale", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param", "get_param", PARAM_SHADOW_BIAS_SPLIT_SCALE);
BIND_ENUM_CONSTANT(SHADOW_ORTHOGONAL);
BIND_ENUM_CONSTANT(SHADOW_PARALLEL_2_SPLITS);
@@ -343,9 +344,10 @@ void DirectionalLight::_bind_methods() {
DirectionalLight::DirectionalLight()
: Light(VisualServer::LIGHT_DIRECTIONAL) {
- set_param(PARAM_SHADOW_NORMAL_BIAS, 0.2);
- set_param(PARAM_SHADOW_BIAS, 1.0);
+ set_param(PARAM_SHADOW_NORMAL_BIAS, 0.8);
+ set_param(PARAM_SHADOW_BIAS, 0.1);
set_param(PARAM_SHADOW_MAX_DISTANCE, 200);
+ set_param(PARAM_SHADOW_BIAS_SPLIT_SCALE, 0.25);
set_shadow_mode(SHADOW_PARALLEL_4_SPLITS);
blend_splits = false;
diff --git a/scene/3d/light.h b/scene/3d/light.h
index 788e948536..5d589d33e5 100644
--- a/scene/3d/light.h
+++ b/scene/3d/light.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -38,8 +38,6 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
-class BakedLight;
-
class Light : public VisualInstance {
GDCLASS(Light, VisualInstance);
@@ -60,6 +58,7 @@ public:
PARAM_SHADOW_SPLIT_3_OFFSET = VS::LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET,
PARAM_SHADOW_NORMAL_BIAS = VS::LIGHT_PARAM_SHADOW_NORMAL_BIAS,
PARAM_SHADOW_BIAS = VS::LIGHT_PARAM_SHADOW_BIAS,
+ PARAM_SHADOW_BIAS_SPLIT_SCALE = VS::LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE,
PARAM_MAX = VS::LIGHT_PARAM_MAX
};
diff --git a/scene/3d/listener.cpp b/scene/3d/listener.cpp
index c7d3bac2f8..51cf9fb89b 100644
--- a/scene/3d/listener.cpp
+++ b/scene/3d/listener.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/listener.h b/scene/3d/listener.h
index b66fc7fc38..2c800443b4 100644
--- a/scene/3d/listener.h
+++ b/scene/3d/listener.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp
index da25afbf57..c8215971c4 100644
--- a/scene/3d/mesh_instance.cpp
+++ b/scene/3d/mesh_instance.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -148,7 +148,7 @@ void MeshInstance::_resolve_skeleton_path() {
if (skeleton_path.is_empty())
return;
- Skeleton *skeleton = get_node(skeleton_path) ? get_node(skeleton_path)->cast_to<Skeleton>() : NULL;
+ Skeleton *skeleton = Object::cast_to<Skeleton>(get_node(skeleton_path));
if (skeleton)
VisualServer::get_singleton()->instance_attach_skeleton(get_instance(), skeleton->get_skeleton());
}
@@ -202,13 +202,13 @@ Node *MeshInstance::create_trimesh_collision_node() {
void MeshInstance::create_trimesh_collision() {
- StaticBody *static_body = create_trimesh_collision_node()->cast_to<StaticBody>();
+ StaticBody *static_body = Object::cast_to<StaticBody>(create_trimesh_collision_node());
ERR_FAIL_COND(!static_body);
static_body->set_name(String(get_name()) + "_col");
add_child(static_body);
if (get_owner()) {
- CollisionShape *cshape = static_body->get_child(0)->cast_to<CollisionShape>();
+ CollisionShape *cshape = Object::cast_to<CollisionShape>(static_body->get_child(0));
static_body->set_owner(get_owner());
cshape->set_owner(get_owner());
}
@@ -232,13 +232,13 @@ Node *MeshInstance::create_convex_collision_node() {
void MeshInstance::create_convex_collision() {
- StaticBody *static_body = create_convex_collision_node()->cast_to<StaticBody>();
+ StaticBody *static_body = Object::cast_to<StaticBody>(create_convex_collision_node());
ERR_FAIL_COND(!static_body);
static_body->set_name(String(get_name()) + "_col");
add_child(static_body);
if (get_owner()) {
- CollisionShape *cshape = static_body->get_child(0)->cast_to<CollisionShape>();
+ CollisionShape *cshape = Object::cast_to<CollisionShape>(static_body->get_child(0));
static_body->set_owner(get_owner());
cshape->set_owner(get_owner());
}
diff --git a/scene/3d/mesh_instance.h b/scene/3d/mesh_instance.h
index 1bb2c97d10..8e8c12a592 100644
--- a/scene/3d/mesh_instance.h
+++ b/scene/3d/mesh_instance.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/multimesh_instance.cpp b/scene/3d/multimesh_instance.cpp
index b51953f27c..f90489f1f0 100644
--- a/scene/3d/multimesh_instance.cpp
+++ b/scene/3d/multimesh_instance.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/multimesh_instance.h b/scene/3d/multimesh_instance.h
index 7e14d567ac..cd0e7b463c 100644
--- a/scene/3d/multimesh_instance.h
+++ b/scene/3d/multimesh_instance.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp
index a1183326d7..d8c7a78648 100644
--- a/scene/3d/navigation.cpp
+++ b/scene/3d/navigation.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -584,7 +584,7 @@ Vector3 Navigation::get_closest_point_to_segment(const Vector3 &p_from, const Ve
}
if (closest_navmesh && closest_navmesh->owner) {
- //print_line("navmesh is: "+closest_navmesh->owner->cast_to<Node>()->get_name());
+ //print_line("navmesh is: "+Object::cast_to<Node>(closest_navmesh->owner)->get_name());
}
return closest_point;
diff --git a/scene/3d/navigation.h b/scene/3d/navigation.h
index 80699fce72..010d16dedd 100644
--- a/scene/3d/navigation.h
+++ b/scene/3d/navigation.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/navigation_mesh.cpp b/scene/3d/navigation_mesh.cpp
index 5d4568f5d3..7a55f956e0 100644
--- a/scene/3d/navigation_mesh.cpp
+++ b/scene/3d/navigation_mesh.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -247,7 +247,7 @@ void NavigationMeshInstance::set_enabled(bool p_enabled) {
}
if (debug_view) {
- MeshInstance *dm = debug_view->cast_to<MeshInstance>();
+ MeshInstance *dm = Object::cast_to<MeshInstance>(debug_view);
if (is_enabled()) {
dm->set_material_override(get_tree()->get_debug_navigation_material());
} else {
@@ -273,7 +273,7 @@ void NavigationMeshInstance::_notification(int p_what) {
Spatial *c = this;
while (c) {
- navigation = c->cast_to<Navigation>();
+ navigation = Object::cast_to<Navigation>(c);
if (navigation) {
if (enabled && navmesh.is_valid()) {
@@ -342,7 +342,7 @@ void NavigationMeshInstance::set_navigation_mesh(const Ref<NavigationMesh> &p_na
}
if (debug_view && navmesh.is_valid()) {
- debug_view->cast_to<MeshInstance>()->set_mesh(navmesh->get_debug_mesh());
+ Object::cast_to<MeshInstance>(debug_view)->set_mesh(navmesh->get_debug_mesh());
}
update_gizmo();
@@ -365,10 +365,10 @@ String NavigationMeshInstance::get_configuration_warning() const {
const Spatial *c = this;
while (c) {
- if (c->cast_to<Navigation>())
+ if (Object::cast_to<Navigation>(c))
return String();
- c = c->get_parent()->cast_to<Spatial>();
+ c = Object::cast_to<Spatial>(c->get_parent());
}
return TTR("NavigationMeshInstance must be a child or grandchild to a Navigation node. It only provides navigation data.");
diff --git a/scene/3d/navigation_mesh.h b/scene/3d/navigation_mesh.h
index e5a3dc7b43..36fe3ee34b 100644
--- a/scene/3d/navigation_mesh.h
+++ b/scene/3d/navigation_mesh.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp
index 70f46e3a0a..80c706898d 100644
--- a/scene/3d/particles.cpp
+++ b/scene/3d/particles.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/particles.h b/scene/3d/particles.h
index 9c1436a47b..2c109d6ec8 100644
--- a/scene/3d/particles.h
+++ b/scene/3d/particles.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/path.cpp b/scene/3d/path.cpp
index 0ca7f96fd7..ed4d88417c 100644
--- a/scene/3d/path.cpp
+++ b/scene/3d/path.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -33,24 +33,6 @@
#include "scene/scene_string_names.h"
void Path::_notification(int p_what) {
-#if 0
- if (p_what==NOTIFICATION_DRAW && curve.is_valid() && is_inside_scene() && Engine::get_singleton()->is_editor_hint()) {
- //draw the curve!!
-
- for(int i=0;i<curve->get_point_count();i++) {
-
- Vector2 prev_p=curve->get_point_pos(i);
-
- for(int j=1;j<=8;j++) {
-
- real_t frac = j/8.0;
- Vector2 p = curve->interpolate(i,frac);
- draw_line(prev_p,p,Color(0.5,0.6,1.0,0.7),2);
- prev_p=p;
- }
- }
- }
-#endif
}
void Path::_curve_changed() {
@@ -174,8 +156,7 @@ void PathFollow::_notification(int p_what) {
Node *parent = get_parent();
if (parent) {
- path = parent->cast_to<Path>();
- if (path) {
+ if ((path = Object::cast_to<Path>(parent))) {
_update_transform();
}
}
diff --git a/scene/3d/path.h b/scene/3d/path.h
index eeae0668a7..0f9a169f72 100644
--- a/scene/3d/path.h
+++ b/scene/3d/path.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index 402cd6314b..9590394211 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -116,7 +116,7 @@ bool PhysicsBody::get_collision_layer_bit(int p_bit) const {
void PhysicsBody::add_collision_exception_with(Node *p_node) {
ERR_FAIL_NULL(p_node);
- PhysicsBody *physics_body = p_node->cast_to<PhysicsBody>();
+ PhysicsBody *physics_body = Object::cast_to<PhysicsBody>(p_node);
if (!physics_body) {
ERR_EXPLAIN("Collision exception only works between two objects of PhysicsBody type");
}
@@ -127,7 +127,7 @@ void PhysicsBody::add_collision_exception_with(Node *p_node) {
void PhysicsBody::remove_collision_exception_with(Node *p_node) {
ERR_FAIL_NULL(p_node);
- PhysicsBody *physics_body = p_node->cast_to<PhysicsBody>();
+ PhysicsBody *physics_body = Object::cast_to<PhysicsBody>(p_node);
if (!physics_body) {
ERR_EXPLAIN("Collision exception only works between two objects of PhysicsBody type");
}
@@ -254,7 +254,7 @@ StaticBody::~StaticBody() {
void RigidBody::_body_enter_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(p_id);
@@ -278,7 +278,7 @@ void RigidBody::_body_enter_tree(ObjectID p_id) {
void RigidBody::_body_exit_tree(ObjectID p_id) {
Object *obj = ObjectDB::get_instance(p_id);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
ERR_FAIL_COND(!node);
Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(p_id);
ERR_FAIL_COND(!E);
@@ -303,7 +303,7 @@ void RigidBody::_body_inout(int p_status, ObjectID p_instance, int p_body_shape,
ObjectID objid = p_instance;
Object *obj = ObjectDB::get_instance(objid);
- Node *node = obj ? obj->cast_to<Node>() : NULL;
+ Node *node = Object::cast_to<Node>(obj);
Map<ObjectID, BodyState>::Element *E = contact_monitor->body_map.find(objid);
@@ -369,7 +369,7 @@ void RigidBody::_direct_state_changed(Object *p_state) {
//eh.. fuck
#ifdef DEBUG_ENABLED
- state = p_state->cast_to<PhysicsDirectBodyState>();
+ state = Object::cast_to<PhysicsDirectBodyState>(p_state);
#else
state = (PhysicsDirectBodyState *)p_state; //trust it
#endif
@@ -842,7 +842,7 @@ void RigidBody::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_colliding_bodies"), &RigidBody::get_colliding_bodies);
- BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state:PhysicsDirectBodyState")));
+ BIND_VMETHOD(MethodInfo("_integrate_forces", PropertyInfo(Variant::OBJECT, "state", PROPERTY_HINT_RESOURCE_TYPE, "PhysicsDirectBodyState")));
ADD_PROPERTY(PropertyInfo(Variant::INT, "mode", PROPERTY_HINT_ENUM, "Rigid,Static,Character,Kinematic"), "set_mode", "get_mode");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "mass", PROPERTY_HINT_EXP_RANGE, "0.01,65535,0.01"), "set_mass", "get_mass");
@@ -918,7 +918,7 @@ Dictionary KinematicBody::_move(const Vector3 &p_motion) {
if (move(p_motion, col)) {
Dictionary d;
d["position"] = col.collision;
- d["normal"] = col.collision;
+ d["normal"] = col.normal;
d["local_shape"] = col.local_shape;
d["travel"] = col.travel;
d["remainder"] = col.remainder;
@@ -929,6 +929,7 @@ Dictionary KinematicBody::_move(const Vector3 &p_motion) {
d["collider"] = Variant();
}
+ d["collider_velocity"] = col.collider_vel;
d["collider_shape_index"] = col.collider_shape;
d["collider_metadata"] = col.collider_metadata;
@@ -1105,7 +1106,7 @@ Object *KinematicBody::get_collision_collider_shape(int p_collision) const {
ERR_FAIL_INDEX_V(p_collision, colliders.size(), NULL);
Object *collider = get_collision_collider(p_collision);
if (collider) {
- CollisionObject *obj2d = collider->cast_to<CollisionObject>();
+ CollisionObject *obj2d = Object::cast_to<CollisionObject>(collider);
if (obj2d) {
uint32_t owner = shape_find_owner(colliders[p_collision].collider_shape);
return obj2d->shape_owner_get_owner(owner);
diff --git a/scene/3d/physics_body.h b/scene/3d/physics_body.h
index 83811a1d93..23d752ad76 100644
--- a/scene/3d/physics_body.h
+++ b/scene/3d/physics_body.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/physics_joint.cpp b/scene/3d/physics_joint.cpp
index 55007c6dc6..aa127ab79f 100644
--- a/scene/3d/physics_joint.cpp
+++ b/scene/3d/physics_joint.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -55,8 +55,8 @@ void Joint::_update_joint(bool p_only_free) {
if (!node_a && !node_b)
return;
- PhysicsBody *body_a = node_a ? node_a->cast_to<PhysicsBody>() : (PhysicsBody *)NULL;
- PhysicsBody *body_b = node_b ? node_b->cast_to<PhysicsBody>() : (PhysicsBody *)NULL;
+ PhysicsBody *body_a = Object::cast_to<PhysicsBody>(node_a);
+ PhysicsBody *body_b = Object::cast_to<PhysicsBody>(node_b);
if (!body_a && !body_b)
return;
@@ -973,301 +973,3 @@ Generic6DOFJoint::Generic6DOFJoint() {
set_flag_z(FLAG_ENABLE_LINEAR_LIMIT, true);
set_flag_z(FLAG_ENABLE_MOTOR, false);
}
-
-#if 0
-
-void PhysicsJoint::_set(const String& p_name, const Variant& p_value) {
-
- if (p_name=="body_A")
- set_body_a(p_value);
- else if (p_name=="body_B")
- set_body_b(p_value);
- else if (p_name=="active")
- set_active(p_value);
- else if (p_name=="no_collision")
- set_disable_collision(p_value);
-}
-Variant PhysicsJoint::_get(const String& p_name) const {
-
- if (p_name=="body_A")
- return get_body_a();
- else if (p_name=="body_B")
- return get_body_b();
- else if (p_name=="active")
- return is_active();
- else if (p_name=="no_collision")
- return has_disable_collision();
-
- return Variant();
-}
-void PhysicsJoint::_get_property_list( List<PropertyInfo> *p_list) const {
-
-
- p_list->push_back( PropertyInfo( Variant::NODE_PATH, "body_A" ) );
- p_list->push_back( PropertyInfo( Variant::NODE_PATH, "body_B" ) );
- p_list->push_back( PropertyInfo( Variant::BOOL, "active" ) );
- p_list->push_back( PropertyInfo( Variant::BOOL, "no_collision" ) );
-}
-void PhysicsJoint::_notification(int p_what) {
-
-
- switch(p_what) {
-
- case NOTIFICATION_PARENT_CONFIGURED: {
-
- _connect();
- if (get_root_node()->get_editor() && !indicator.is_valid()) {
-
- indicator=VisualServer::get_singleton()->poly_create();
- RID mat=VisualServer::get_singleton()->fixed_material_create();
- VisualServer::get_singleton()->material_set_flag( mat, VisualServer::MATERIAL_FLAG_UNSHADED, true );
- VisualServer::get_singleton()->material_set_flag( mat, VisualServer::MATERIAL_FLAG_ONTOP, true );
- VisualServer::get_singleton()->material_set_flag( mat, VisualServer::MATERIAL_FLAG_WIREFRAME, true );
- VisualServer::get_singleton()->material_set_flag( mat, VisualServer::MATERIAL_FLAG_DOUBLE_SIDED, true );
- VisualServer::get_singleton()->material_set_line_width( mat, 3 );
-
- VisualServer::get_singleton()->poly_set_material(indicator,mat,true);
- _update_indicator();
-
- }
-
- if (indicator.is_valid()) {
-
- indicator_instance=VisualServer::get_singleton()->instance_create(indicator,get_world()->get_scenario());
- VisualServer::get_singleton()->instance_attach_object_instance_id( indicator_instance,get_instance_id() );
- }
- } break;
- case NOTIFICATION_TRANSFORM_CHANGED: {
-
- if (indicator_instance.is_valid()) {
-
- VisualServer::get_singleton()->instance_set_transform(indicator_instance,get_global_transform());
- }
- } break;
- case NOTIFICATION_EXIT_SCENE: {
-
- if (indicator_instance.is_valid()) {
-
- VisualServer::get_singleton()->free(indicator_instance);
- }
- _disconnect();
-
- } break;
-
- }
-}
-
-
-RID PhysicsJoint::_get_visual_instance_rid() const {
-
- return indicator_instance;
-
-}
-
-void PhysicsJoint::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("_get_visual_instance_rid"),&PhysicsJoint::_get_visual_instance_rid);
- ClassDB::bind_method(D_METHOD("set_body_a","path"),&PhysicsJoint::set_body_a);
- ClassDB::bind_method(D_METHOD("set_body_b"),&PhysicsJoint::set_body_b);
- ClassDB::bind_method(D_METHOD("get_body_a","path"),&PhysicsJoint::get_body_a);
- ClassDB::bind_method(D_METHOD("get_body_b"),&PhysicsJoint::get_body_b);
-
- ClassDB::bind_method(D_METHOD("set_active","active"),&PhysicsJoint::set_active);
- ClassDB::bind_method(D_METHOD("is_active"),&PhysicsJoint::is_active);
-
- ClassDB::bind_method(D_METHOD("set_disable_collision","disable"),&PhysicsJoint::set_disable_collision);
- ClassDB::bind_method(D_METHOD("has_disable_collision"),&PhysicsJoint::has_disable_collision);
-
-
- ClassDB::bind_method("reconnect",&PhysicsJoint::reconnect);
-
- ClassDB::bind_method(D_METHOD("get_rid"),&PhysicsJoint::get_rid);
-
-}
-
-void PhysicsJoint::set_body_a(const NodePath& p_path) {
-
- _disconnect();
- body_A=p_path;
- _connect();
- _change_notify("body_A");
-}
-void PhysicsJoint::set_body_b(const NodePath& p_path) {
-
- _disconnect();
- body_B=p_path;
- _connect();
- _change_notify("body_B");
-
-}
-NodePath PhysicsJoint::get_body_a() const {
-
- return body_A;
-}
-NodePath PhysicsJoint::get_body_b() const {
-
- return body_B;
-}
-
-void PhysicsJoint::set_active(bool p_active) {
-
- active=p_active;
- if (is_inside_scene()) {
- PhysicsServer::get_singleton()->joint_set_active(joint,active);
- }
- _change_notify("active");
-}
-
-void PhysicsJoint::set_disable_collision(bool p_active) {
-
- if (no_collision==p_active)
- return;
- _disconnect();
- no_collision=p_active;
- _connect();
-
- _change_notify("no_collision");
-}
-bool PhysicsJoint::has_disable_collision() const {
-
- return no_collision;
-}
-
-
-
-bool PhysicsJoint::is_active() const {
-
- return active;
-}
-
-void PhysicsJoint::_disconnect() {
-
- if (!is_inside_scene())
- return;
-
- if (joint.is_valid())
- PhysicsServer::get_singleton()->free(joint);
-
- joint=RID();
-
- Node *nA = get_node(body_A);
- Node *nB = get_node(body_B);
-
- PhysicsBody *A = nA?nA->cast_to<PhysicsBody>():NULL;
- PhysicsBody *B = nA?nB->cast_to<PhysicsBody>():NULL;
-
- if (!A ||!B)
- return;
-
- if (no_collision)
- PhysicsServer::get_singleton()->body_remove_collision_exception(A->get_body(),B->get_body());
-
-}
-void PhysicsJoint::_connect() {
-
- if (!is_inside_scene())
- return;
-
- ERR_FAIL_COND(joint.is_valid());
-
- Node *nA = get_node(body_A);
- Node *nB = get_node(body_B);
-
- PhysicsBody *A = nA?nA->cast_to<PhysicsBody>():NULL;
- PhysicsBody *B = nA?nB->cast_to<PhysicsBody>():NULL;
-
- if (!A && !B)
- return;
-
- if (B && !A)
- SWAP(B,A);
-
- joint = create(A,B);
-
- if (A<B)
- SWAP(A,B);
-
- if (no_collision)
- PhysicsServer::get_singleton()->body_add_collision_exception(A->get_body(),B->get_body());
-
-
-
-}
-
-void PhysicsJoint::reconnect() {
-
- _disconnect();
- _connect();
-
-}
-
-
-RID PhysicsJoint::get_rid() {
-
- return joint;
-}
-
-
-PhysicsJoint::PhysicsJoint() {
-
- active=true;
- no_collision=true;
-}
-
-
-PhysicsJoint::~PhysicsJoint() {
-
- if (indicator.is_valid()) {
-
- VisualServer::get_singleton()->free(indicator);
- }
-
-}
-
-/* PIN */
-
-void PhysicsJointPin::_update_indicator() {
-
-
- VisualServer::get_singleton()->poly_clear(indicator);
-
- Vector<Color> colors;
- colors.push_back( Color(0.3,0.9,0.2,0.7) );
- colors.push_back( Color(0.3,0.9,0.2,0.7) );
-
- Vector<Vector3> points;
- points.resize(2);
- points[0]=Vector3(Vector3(-0.2,0,0));
- points[1]=Vector3(Vector3(0.2,0,0));
- VisualServer::get_singleton()->poly_add_primitive(indicator,points,Vector<Vector3>(),colors,Vector<Vector3>());
-
- points[0]=Vector3(Vector3(0,-0.2,0));
- points[1]=Vector3(Vector3(0,0.2,0));
- VisualServer::get_singleton()->poly_add_primitive(indicator,points,Vector<Vector3>(),colors,Vector<Vector3>());
-
- points[0]=Vector3(Vector3(0,0,-0.2));
- points[1]=Vector3(Vector3(0,0,0.2));
- VisualServer::get_singleton()->poly_add_primitive(indicator,points,Vector<Vector3>(),colors,Vector<Vector3>());
-
-}
-
-RID PhysicsJointPin::create(PhysicsBody*A,PhysicsBody*B) {
-
- RID body_A = A->get_body();
- RID body_B = B?B->get_body():RID();
-
- ERR_FAIL_COND_V( !body_A.is_valid(), RID() );
-
- Vector3 pin_pos = get_global_transform().origin;
-
- if (body_B.is_valid())
- return PhysicsServer::get_singleton()->joint_create_double_pin_global(body_A,pin_pos,body_B,pin_pos);
- else
- return PhysicsServer::get_singleton()->joint_create_pin(body_A,A->get_global_transform().xform_inv(pin_pos),pin_pos);
-}
-
-PhysicsJointPin::PhysicsJointPin() {
-
-
-}
-#endif
diff --git a/scene/3d/physics_joint.h b/scene/3d/physics_joint.h
index b834aaf6d2..b94297da30 100644
--- a/scene/3d/physics_joint.h
+++ b/scene/3d/physics_joint.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -321,73 +321,4 @@ public:
VARIANT_ENUM_CAST(Generic6DOFJoint::Param);
VARIANT_ENUM_CAST(Generic6DOFJoint::Flag);
-#if 0
-class PhysicsJoint : public Spatial {
-
- GDCLASS(PhysicsJoint,Spatial);
- OBJ_CATEGORY("3D Physics Nodes");
-
- NodePath body_A;
- NodePath body_B;
- bool active;
- bool no_collision;
-
-
- RID indicator_instance;
-
- RID _get_visual_instance_rid() const;
-protected:
-
- RID joint;
- RID indicator;
-
- bool _set(const StringName& p_name, const Variant& p_value);
- bool _get(const StringName& p_name,Variant &r_ret) const;
- void _get_property_list( List<PropertyInfo> *p_list) const;
- void _notification(int p_what);
- static void _bind_methods();
-
- virtual RID create(PhysicsBody*A,PhysicsBody*B)=0;
- virtual void _update_indicator()=0;
-
- void _disconnect();
- void _connect();
-public:
-
- void set_body_a(const NodePath& p_path);
- void set_body_b(const NodePath& p_path);
- NodePath get_body_a() const;
- NodePath get_body_b() const;
-
- void set_active(bool p_active);
- bool is_active() const;
-
- void set_disable_collision(bool p_active);
- bool has_disable_collision() const;
-
- void reconnect();
-
- RID get_rid();
-
- PhysicsJoint();
- ~PhysicsJoint();
-};
-
-
-
-class PhysicsJointPin : public PhysicsJoint {
-
- GDCLASS( PhysicsJointPin, PhysicsJoint );
-
-protected:
-
- virtual void _update_indicator();
- virtual RID create(PhysicsBody*A,PhysicsBody*B);
-public:
-
-
- PhysicsJointPin();
-};
-
#endif // PHYSICS_JOINT_H
-#endif
diff --git a/scene/3d/portal.cpp b/scene/3d/portal.cpp
index d77dde1dd8..6c14f7dbc9 100644
--- a/scene/3d/portal.cpp
+++ b/scene/3d/portal.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -32,6 +32,8 @@
#include "scene/resources/surface_tool.h"
#include "servers/visual_server.h"
+// FIXME: This will be removed, kept as reference for new implementation
+#if 0
bool Portal::_set(const StringName &p_name, const Variant &p_value) {
if (p_name == "shape") {
@@ -226,3 +228,4 @@ Portal::~Portal() {
VisualServer::get_singleton()->free(portal);
}
+#endif
diff --git a/scene/3d/portal.h b/scene/3d/portal.h
index 7c25e4904b..6de3df8553 100644
--- a/scene/3d/portal.h
+++ b/scene/3d/portal.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -39,7 +39,8 @@
If a portal is placed next (very close to) a similar, opposing portal, they automatically connect,
otherwise, a portal connects to the parent room
*/
-
+//this will be redone and replaced by area portals, left for reference since a new class with this name will have to exist and want to reuse the gizmos
+#if 0
class Portal : public VisualInstance {
GDCLASS(Portal, VisualInstance);
@@ -85,3 +86,4 @@ public:
};
#endif
+#endif
diff --git a/scene/3d/position_3d.cpp b/scene/3d/position_3d.cpp
index 4e66ef13c0..d0df985ac4 100644
--- a/scene/3d/position_3d.cpp
+++ b/scene/3d/position_3d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/position_3d.h b/scene/3d/position_3d.h
index 0adde19342..8083c33196 100644
--- a/scene/3d/position_3d.h
+++ b/scene/3d/position_3d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/proximity_group.cpp b/scene/3d/proximity_group.cpp
index d0410f2c55..2288d8b08b 100644
--- a/scene/3d/proximity_group.cpp
+++ b/scene/3d/proximity_group.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/proximity_group.h b/scene/3d/proximity_group.h
index fec3add41f..d003d2f525 100644
--- a/scene/3d/proximity_group.h
+++ b/scene/3d/proximity_group.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp
index b0aab6cc4d..72b7706b77 100644
--- a/scene/3d/ray_cast.cpp
+++ b/scene/3d/ray_cast.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -196,7 +196,7 @@ void RayCast::add_exception_rid(const RID &p_rid) {
void RayCast::add_exception(const Object *p_object) {
ERR_FAIL_NULL(p_object);
- CollisionObject *co = ((Object *)p_object)->cast_to<CollisionObject>();
+ const CollisionObject *co = Object::cast_to<CollisionObject>(p_object);
if (!co)
return;
add_exception_rid(co->get_rid());
@@ -210,7 +210,7 @@ void RayCast::remove_exception_rid(const RID &p_rid) {
void RayCast::remove_exception(const Object *p_object) {
ERR_FAIL_NULL(p_object);
- CollisionObject *co = ((Object *)p_object)->cast_to<CollisionObject>();
+ const CollisionObject *co = Object::cast_to<CollisionObject>(p_object);
if (!co)
return;
remove_exception_rid(co->get_rid());
diff --git a/scene/3d/ray_cast.h b/scene/3d/ray_cast.h
index e9b34c4f75..fd566cd343 100644
--- a/scene/3d/ray_cast.h
+++ b/scene/3d/ray_cast.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/reflection_probe.cpp b/scene/3d/reflection_probe.cpp
index 194146b6b3..46b105cd21 100644
--- a/scene/3d/reflection_probe.cpp
+++ b/scene/3d/reflection_probe.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/reflection_probe.h b/scene/3d/reflection_probe.h
index d2a5facb5f..7c328a8f16 100644
--- a/scene/3d/reflection_probe.h
+++ b/scene/3d/reflection_probe.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/remote_transform.cpp b/scene/3d/remote_transform.cpp
index 492930ea9b..8faf985b11 100644
--- a/scene/3d/remote_transform.cpp
+++ b/scene/3d/remote_transform.cpp
@@ -1,10 +1,9 @@
-
/*************************************************************************/
-/* remote_transform.cpp */
+/* remote_transform.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -51,11 +50,7 @@ void RemoteTransform::_update_remote() {
if (!cache)
return;
- Object *obj = ObjectDB::get_instance(cache);
- if (!obj)
- return;
-
- Spatial *n = obj->cast_to<Spatial>();
+ Spatial *n = Object::cast_to<Spatial>(ObjectDB::get_instance(cache));
if (!n)
return;
@@ -177,7 +172,7 @@ bool RemoteTransform::get_update_scale() const {
String RemoteTransform::get_configuration_warning() const {
- if (!has_node(remote_node) || !get_node(remote_node) || !get_node(remote_node)->cast_to<Spatial>()) {
+ if (!has_node(remote_node) || !Object::cast_to<Spatial>(get_node(remote_node))) {
return TTR("Path property must point to a valid Spatial node to work.");
}
diff --git a/scene/3d/remote_transform.h b/scene/3d/remote_transform.h
index c25b57966e..51a0bf35a3 100644
--- a/scene/3d/remote_transform.h
+++ b/scene/3d/remote_transform.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/room_instance.cpp b/scene/3d/room_instance.cpp
index c5ea6c54da..439b6bfdf8 100644
--- a/scene/3d/room_instance.cpp
+++ b/scene/3d/room_instance.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -31,6 +31,8 @@
#include "servers/visual_server.h"
+// FIXME: Will be removed, kept as reference for new implementation
+#if 0
#include "geometry.h"
#include "project_settings.h"
#include "scene/resources/surface_tool.h"
@@ -45,7 +47,7 @@ void Room::_notification(int p_what) {
while (parent_room) {
- Room *r = parent_room->cast_to<Room>();
+ Room *r = Object::cast_to<Room>(parent_room);
if (r) {
level = r->level + 1;
@@ -103,7 +105,7 @@ Ref<RoomBounds> Room::get_room() const {
void Room::_parse_node_faces(PoolVector<Face3> &all_faces, const Node *p_node) const {
- const VisualInstance *vi = p_node->cast_to<VisualInstance>();
+ const VisualInstance *vi = Object::cast_to<VisualInstance>(p_node);
if (vi) {
PoolVector<Face3> faces = vi->get_faces(FACES_ENCLOSING);
@@ -158,3 +160,4 @@ Room::Room() {
Room::~Room() {
}
+#endif
diff --git a/scene/3d/room_instance.h b/scene/3d/room_instance.h
index 4176da92e8..b9a64b6670 100644
--- a/scene/3d/room_instance.h
+++ b/scene/3d/room_instance.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -44,6 +44,9 @@
*/
+//this will be removed, left for reference
+#if 0
+
class Room : public VisualInstance {
GDCLASS(Room, VisualInstance);
@@ -77,5 +80,5 @@ public:
Room();
~Room();
};
-
+#endif
#endif // ROOM_INSTANCE_H
diff --git a/scene/3d/scenario_fx.cpp b/scene/3d/scenario_fx.cpp
index 0780ce22ff..8102b3f15c 100644
--- a/scene/3d/scenario_fx.cpp
+++ b/scene/3d/scenario_fx.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/scenario_fx.h b/scene/3d/scenario_fx.h
index d1e0a63130..acf6a18526 100644
--- a/scene/3d/scenario_fx.h
+++ b/scene/3d/scenario_fx.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp
index cee97af244..d0e0937eca 100644
--- a/scene/3d/skeleton.cpp
+++ b/scene/3d/skeleton.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -111,7 +111,7 @@ bool Skeleton::_get(const StringName &p_path, Variant &r_ret) const {
Object *obj = ObjectDB::get_instance(E->get());
ERR_CONTINUE(!obj);
- Node *node = obj->cast_to<Node>();
+ Node *node = Object::cast_to<Node>(obj);
ERR_CONTINUE(!node);
NodePath path = get_path_to(node);
children.push_back(path);
@@ -245,7 +245,7 @@ void Skeleton::_notification(int p_what) {
Object *obj = ObjectDB::get_instance(E->get());
ERR_CONTINUE(!obj);
- Spatial *sp = obj->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(obj);
ERR_CONTINUE(!sp);
sp->set_transform(b.pose_global);
}
@@ -433,7 +433,7 @@ void Skeleton::get_bound_child_nodes_to_bone(int p_bone, List<Node *> *p_bound)
Object *obj = ObjectDB::get_instance(E->get());
ERR_CONTINUE(!obj);
- p_bound->push_back(obj->cast_to<Node>());
+ p_bound->push_back(Object::cast_to<Node>(obj));
}
}
diff --git a/scene/3d/skeleton.h b/scene/3d/skeleton.h
index a6546af64e..fdc1100472 100644
--- a/scene/3d/skeleton.h
+++ b/scene/3d/skeleton.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp
index 6498238e12..7db3bb18bd 100644
--- a/scene/3d/spatial.cpp
+++ b/scene/3d/spatial.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -128,7 +128,7 @@ void Spatial::_notification(int p_what) {
Node *p = get_parent();
if (p)
- data.parent = p->cast_to<Spatial>();
+ data.parent = Object::cast_to<Spatial>(p);
if (data.parent)
data.C = data.parent->data.children.push_back(this);
@@ -167,7 +167,7 @@ void Spatial::_notification(int p_what) {
data.viewport = NULL;
Node *parent = get_parent();
while (parent && !data.viewport) {
- data.viewport = parent->cast_to<Viewport>();
+ data.viewport = Object::cast_to<Viewport>(parent);
parent = parent->get_parent();
}
@@ -185,8 +185,13 @@ void Spatial::_notification(int p_what) {
get_tree()->call_group_flags(0, SceneStringNames::get_singleton()->_spatial_editor_group, SceneStringNames::get_singleton()->_request_gizmo, this);
if (!data.gizmo_disabled) {
- if (data.gizmo.is_valid())
+ if (data.gizmo.is_valid()) {
data.gizmo->create();
+ if (data.gizmo->can_draw()) {
+ data.gizmo->redraw();
+ }
+ data.gizmo->transform();
+ }
}
}
#endif
@@ -281,37 +286,6 @@ Transform Spatial::get_global_transform() const {
return data.global_transform;
}
-#if 0
-void Spatial::add_child_notify(Node *p_child) {
-/*
- Spatial *s=p_child->cast_to<Spatial>();
- if (!s)
- return;
-
- ERR_FAIL_COND(data.children_lock>0);
-
- s->data.dirty=DIRTY_GLOBAL; // don't allow global transform to be valid
- s->data.parent=this;
- data.children.push_back(s);
- s->data.C=data.children.back();
-*/
-}
-
-void Spatial::remove_child_notify(Node *p_child) {
-/*
- Spatial *s=p_child->cast_to<Spatial>();
- if (!s)
- return;
-
- ERR_FAIL_COND(data.children_lock>0);
-
- if (s->data.C)
- data.children.erase(s->data.C);
- s->data.parent=NULL;
- s->data.C=NULL;
-*/
-}
-#endif
Spatial *Spatial::get_parent_spatial() const {
@@ -449,7 +423,9 @@ void Spatial::set_gizmo(const Ref<SpatialGizmo> &p_gizmo) {
if (data.gizmo.is_valid() && is_inside_world()) {
data.gizmo->create();
- data.gizmo->redraw();
+ if (data.gizmo->can_draw()) {
+ data.gizmo->redraw();
+ }
data.gizmo->transform();
}
@@ -471,12 +447,16 @@ Ref<SpatialGizmo> Spatial::get_gizmo() const {
void Spatial::_update_gizmo() {
+ if (!is_inside_world())
+ return;
data.gizmo_dirty = false;
if (data.gizmo.is_valid()) {
- if (is_visible_in_tree())
- data.gizmo->redraw();
- else
- data.gizmo->clear();
+ if (data.gizmo->can_draw()) {
+ if (is_visible_in_tree())
+ data.gizmo->redraw();
+ else
+ data.gizmo->clear();
+ }
}
}
diff --git a/scene/3d/spatial.h b/scene/3d/spatial.h
index f22b19d3cc..3f205ea86b 100644
--- a/scene/3d/spatial.h
+++ b/scene/3d/spatial.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -47,6 +47,7 @@ public:
virtual void clear() = 0;
virtual void redraw() = 0;
virtual void free() = 0;
+ virtual bool can_draw() const = 0;
SpatialGizmo();
};
diff --git a/scene/3d/spatial_indexer.cpp b/scene/3d/spatial_indexer.cpp
deleted file mode 100644
index 7090c974a3..0000000000
--- a/scene/3d/spatial_indexer.cpp
+++ /dev/null
@@ -1,166 +0,0 @@
-/*************************************************************************/
-/* spatial_indexer.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "spatial_indexer.h"
-
-#if 0
-
-#include "camera.h"
-#include "proximity_area.h"
-#include "scene/scene_string_names.h"
-
-void SpatialIndexer::add_camera(Camera* p_camera) {
-
- cameras.insert(p_camera);
-}
-
-void SpatialIndexer::remove_camera(Camera* p_camera){
-
- for (Set<ProximityArea*>::Element *F=proximity_areas.front();F;F=F->next()) {
-
- ProximityArea *prox = F->get();
- TK<Camera> k;
- k.against=p_camera;
- k.area=prox;
- if (camera_pairs.has(k)) {
- camera_pairs.erase(k);
- prox->area_exit(ProximityArea::TRACK_CAMERAS,p_camera);
- }
- }
- cameras.erase(p_camera);
-
-}
-
-void SpatialIndexer::update_camera(Camera* p_camera) {
-
-
- _request_update();
-}
-
-void SpatialIndexer::_update_pairs() {
-
- // brute force interseciton code, no broadphase
- // will implement broadphase in the future
-
- for (Set<Camera*>::Element *E=cameras.front();E;E=E->next()) {
-
- Camera *cam = E->get();
- Vector<Plane> cplanes = cam->get_frustum();
-
- for (Set<ProximityArea*>::Element *F=proximity_areas.front();F;F=F->next()) {
-
- ProximityArea *prox = F->get();
-
- bool inters=false;
-
- if (prox->get_track_flag(ProximityArea::TRACK_CAMERAS)) {
-
- AABB aabb = prox->get_global_transform().xform(prox->get_aabb());
- if (aabb.intersects_convex_shape(cplanes.ptr(),cplanes.size()))
- inters=true;
- }
-
- TK<Camera> k;
- k.against=cam;
- k.area=prox;
-
- bool has = camera_pairs.has(k);
-
- if (inters==has)
- continue;
-
- if (inters) {
- camera_pairs.insert(k);
- prox->area_enter(ProximityArea::TRACK_CAMERAS,cam);
- } else {
-
- camera_pairs.erase(k);
- prox->area_exit(ProximityArea::TRACK_CAMERAS,cam);
- }
- }
-
- }
-
- pending_update=false;
-}
-
-void SpatialIndexer::_bind_methods() {
-
-
- ClassDB::bind_method(D_METHOD("_update_pairs"),&SpatialIndexer::_update_pairs);
-}
-
-
-void SpatialIndexer::add_proximity_area(ProximityArea* p_area) {
-
- proximity_areas.insert(p_area);
-
-}
-
-void SpatialIndexer::remove_proximity_area(ProximityArea* p_area) {
-
- for (Set<Camera*>::Element *E=cameras.front();E;E=E->next()) {
-
- Camera *cam = E->get();
- TK<Camera> k;
- k.against=cam;
- k.area=p_area;
- if (camera_pairs.has(k)) {
- camera_pairs.erase(k);
- p_area->area_exit(ProximityArea::TRACK_CAMERAS,cam);
- }
- }
- proximity_areas.erase(p_area);
-
-}
-
-void SpatialIndexer::_request_update() {
-
- if (pending_update)
- return;
- pending_update=true;
- call_deferred(SceneStringNames::get_singleton()->_update_pairs);
-
-}
-
-void SpatialIndexer::update_proximity_area_transform(ProximityArea* p_area) {
-
- _request_update();
-}
-
-void SpatialIndexer::update_proximity_area_flags(ProximityArea* p_area) {
-
- _request_update();
-}
-
-SpatialIndexer::SpatialIndexer() {
-
- pending_update=false;
-}
-#endif
diff --git a/scene/3d/spatial_indexer.h b/scene/3d/spatial_indexer.h
deleted file mode 100644
index c8bdf8950d..0000000000
--- a/scene/3d/spatial_indexer.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*************************************************************************/
-/* spatial_indexer.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef SPATIAL_INDEXER_H
-#define SPATIAL_INDEXER_H
-
-#include "scene/3d/spatial.h"
-#if 0
-
-class Camera;
-class ProximityArea;
-
-class SpatialIndexer : public Object {
-
- GDCLASS( SpatialIndexer, Object );
-
- template<class T>
- struct TK {
-
- T *against;
- ProximityArea *area;
- bool operator<(const TK<T>& p_k) const { return against==p_k.against ? area < p_k.area : against < p_k.against; }
- };
-
-
- Set<Camera*> cameras; //cameras
- Set<ProximityArea*> proximity_areas;
-
- Set<TK<Camera> > camera_pairs;
-
- bool pending_update;
- void _update_pairs();
- void _request_update();
-
-protected:
-
- static void _bind_methods();
-
-friend class ProximityArea;
-friend class Camera;
-
- void add_proximity_area(ProximityArea* p_area);
- void remove_proximity_area(ProximityArea* p_area);
- void update_proximity_area_transform(ProximityArea* p_area);
- void update_proximity_area_flags(ProximityArea* p_area);
-
- void add_camera(Camera* p_camera);
- void remove_camera(Camera* p_camera);
- void update_camera(Camera* p_camera);
-
-public:
-
-
- SpatialIndexer();
-
-};
-#endif
-#endif // SPATIAL_INDEXER_H
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index e45cb6d5b9..49a3205f21 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -70,13 +70,9 @@ void SpriteBase3D::_notification(int p_what) {
if (!pending_update)
_im_update();
- Node *parent = get_parent();
- if (parent) {
-
- parent_sprite = parent->cast_to<SpriteBase3D>();
- if (parent_sprite) {
- pI = parent_sprite->children.push_back(this);
- }
+ parent_sprite = Object::cast_to<SpriteBase3D>(get_parent());
+ if (parent_sprite) {
+ pI = parent_sprite->children.push_back(this);
}
}
@@ -602,219 +598,6 @@ Sprite3D::Sprite3D() {
////////////////////////////////////////
-#if 0
-
-void AnimatedSprite3D::_draw() {
-
- RID immediate = get_immediate();
- VS::get_singleton()->immediate_clear(immediate);
-
- if (!frames.is_valid() || !frames->get_frame_count(animation) || frame<0 || frame>=frames->get_frame_count(animation)) {
- return;
- }
-
- Ref<Texture> texture = frames->get_frame(animation,frame);
- if (!texture.is_valid())
- return; //no texuture no life
- Vector2 tsize = texture->get_size();
- if (tsize.x==0 || tsize.y==0)
- return;
-
- Size2i s=tsize;
- Rect2i src_rect;
-
- src_rect.size=s;
-
- Point2i ofs=get_offset();
- if (is_centered())
- ofs-=s/2;
-
- Rect2i dst_rect(ofs,s);
-
-
- Rect2 final_rect;
- Rect2 final_src_rect;
- if (!texture->get_rect_region(dst_rect,src_rect,final_rect,final_src_rect))
- return;
-
-
- if (final_rect.size.x==0 || final_rect.size.y==0)
- return;
-
- Color color=_get_color_accum();
- color.a*=get_opacity();
-
- float pixel_size=get_pixel_size();
-
- Vector2 vertices[4]={
-
- (final_rect.pos+Vector2(0,final_rect.size.y)) * pixel_size,
- (final_rect.pos+final_rect.size) * pixel_size,
- (final_rect.pos+Vector2(final_rect.size.x,0)) * pixel_size,
- final_rect.pos * pixel_size,
-
-
- };
- Vector2 uvs[4]={
- final_src_rect.pos / tsize,
- (final_src_rect.pos+Vector2(final_src_rect.size.x,0)) / tsize,
- (final_src_rect.pos+final_src_rect.size) / tsize,
- (final_src_rect.pos+Vector2(0,final_src_rect.size.y)) / tsize,
- };
-
- if (is_flipped_h()) {
- SWAP(uvs[0],uvs[1]);
- SWAP(uvs[2],uvs[3]);
- }
- if (is_flipped_v()) {
-
- SWAP(uvs[0],uvs[3]);
- SWAP(uvs[1],uvs[2]);
- }
-
-
- Vector3 normal;
- int axis = get_axis();
- normal[axis]=1.0;
-
- RID mat = VS::get_singleton()->material_2d_get(get_draw_flag(FLAG_SHADED),get_draw_flag(FLAG_TRANSPARENT),get_alpha_cut_mode()==ALPHA_CUT_DISCARD,get_alpha_cut_mode()==ALPHA_CUT_OPAQUE_PREPASS);
- VS::get_singleton()->immediate_set_material(immediate,mat);
-
- VS::get_singleton()->immediate_begin(immediate,VS::PRIMITIVE_TRIANGLE_FAN,texture->get_rid());
-
- int x_axis = ((axis + 1) % 3);
- int y_axis = ((axis + 2) % 3);
-
- if (axis!=Vector3::AXIS_Z) {
- SWAP(x_axis,y_axis);
-
- for(int i=0;i<4;i++) {
- //uvs[i] = Vector2(1.0,1.0)-uvs[i];
- //SWAP(vertices[i].x,vertices[i].y);
- if (axis==Vector3::AXIS_Y) {
- vertices[i].y = - vertices[i].y;
- } else if (axis==Vector3::AXIS_X) {
- vertices[i].x = - vertices[i].x;
- }
- }
- }
-
- AABB aabb;
-
- for(int i=0;i<4;i++) {
- VS::get_singleton()->immediate_normal(immediate,normal);
- VS::get_singleton()->immediate_color(immediate,color);
- VS::get_singleton()->immediate_uv(immediate,uvs[i]);
-
- Vector3 vtx;
- vtx[x_axis]=vertices[i][0];
- vtx[y_axis]=vertices[i][1];
- VS::get_singleton()->immediate_vertex(immediate,vtx);
- if (i==0) {
- aabb.pos=vtx;
- aabb.size=Vector3();
- } else {
- aabb.expand_to(vtx);
- }
- }
- set_aabb(aabb);
- VS::get_singleton()->immediate_end(immediate);
-
-}
-
-void AnimatedSprite3D::_bind_methods(){
-
- ClassDB::bind_method(D_METHOD("set_sprite_frames","sprite_frames"),&AnimatedSprite3D::set_sprite_frames);
- ClassDB::bind_method(D_METHOD("get_sprite_frames"),&AnimatedSprite3D::get_sprite_frames);
- ClassDB::bind_method(D_METHOD("set_frame","frame"),&AnimatedSprite3D::set_frame);
- ClassDB::bind_method(D_METHOD("get_frame"),&AnimatedSprite3D::get_frame);
-
- ADD_PROPERTY( PropertyInfo( Variant::OBJECT, "frames", PROPERTY_HINT_RESOURCE_TYPE,"SpriteFrames"), "set_sprite_frames","get_sprite_frames");
- ADD_PROPERTY( PropertyInfo( Variant::INT, "frame",PROPERTY_HINT_SPRITE_FRAME), "set_frame","get_frame");
-
- ADD_SIGNAL(MethodInfo("frame_changed"));
-
-}
-
-
-
-
-void AnimatedSprite3D::set_sprite_frames(const Ref<SpriteFrames>& p_sprite_frames) {
-
-
- if (frames==p_sprite_frames)
- return;
-
- if (frames.is_valid())
- frames->disconnect("changed",this,"_queue_update");
- frames=p_sprite_frames;
- if (frames.is_valid())
- frames->connect("changed",this,"_queue_update");
-
- if (!frames.is_valid() || frame >=frames->get_frame_count(animation)) {
- frame=0;
-
- }
- _queue_update();
-
-}
-
-Ref<SpriteFrames> AnimatedSprite3D::get_sprite_frames() const{
-
- return frames;
-}
-
-void AnimatedSprite3D::set_frame(int p_frame){
-
- if (frames.is_null())
- return;
-
- ERR_FAIL_INDEX(p_frame,frames->get_frame_count(animation));
-
- if (frame==p_frame)
- return;
-
- frame=p_frame;
- _queue_update();
- emit_signal(SceneStringNames::get_singleton()->frame_changed);
-
-}
-int AnimatedSprite3D::get_frame() const{
-
- return frame;
-}
-
-Rect2 AnimatedSprite3D::get_item_rect() const {
-
- if (!frames.is_valid() || !frames->get_frame_count(animation) || frame<0 || frame>=frames->get_frame_count(animation)) {
- return Rect2(0,0,1,1);
- }
-
- Ref<Texture> t = frames->get_frame(animation,frame);
- if (t.is_null())
- return Rect2(0,0,1,1);
- Size2i s = t->get_size();
-
- Point2i ofs=get_offset();
- if (is_centered())
- ofs-=s/2;
-
- if (s==Size2(0,0))
- s=Size2(1,1);
-
- return Rect2(ofs,s);
-}
-
-
-
-AnimatedSprite3D::AnimatedSprite3D() {
-
- animation="current";
- frame=0;
-}
-
-#endif
-
void AnimatedSprite3D::_draw() {
RID immediate = get_immediate();
@@ -1026,63 +809,6 @@ void AnimatedSprite3D::_notification(int p_what) {
timeout -= to_process;
}
} break;
-#if 0
- case NOTIFICATION_DRAW: {
-
- if (frames.is_null()) {
- print_line("no draw no faemos");
- return;
- }
-
- if (frame<0) {
- print_line("no draw frame <0");
- return;
- }
-
- if (!frames->has_animation(animation)) {
- print_line("no draw no anim: "+String(animation));
- return;
- }
-
-
-
- Ref<Texture> texture = frames->get_frame(animation,frame);
- if (texture.is_null()) {
- print_line("no draw texture is null");
- return;
- }
-
- //print_line("DECIDED TO DRAW");
-
- RID ci = get_canvas_item();
-
- /*
- texture->draw(ci,Point2());
- break;
- */
-
- Size2i s;
- s = texture->get_size();
- Point2 ofs=offset;
- if (centered)
- ofs-=s/2;
-
- if (OS::get_singleton()->get_use_pixel_snap()) {
- ofs=ofs.floor();
- }
- Rect2 dst_rect(ofs,s);
-
- if (hflip)
- dst_rect.size.x=-dst_rect.size.x;
- if (vflip)
- dst_rect.size.y=-dst_rect.size.y;
-
- //texture->draw_rect(ci,dst_rect,false,modulate);
- texture->draw_rect_region(ci,dst_rect,Rect2(Vector2(),texture->get_size()),modulate);
- //VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate);
-
- } break;
-#endif
}
}
diff --git a/scene/3d/sprite_3d.h b/scene/3d/sprite_3d.h
index 7dc4cd4ffb..1165392cb2 100644
--- a/scene/3d/sprite_3d.h
+++ b/scene/3d/sprite_3d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -181,37 +181,6 @@ public:
//~Sprite3D();
};
-#if 0
-class AnimatedSprite3D : public SpriteBase3D {
-
- GDCLASS(AnimatedSprite3D,SpriteBase3D);
- Ref<SpriteFrames> frames;
-
-
- StringName animation;
- int frame;
-
-protected:
- virtual void _draw();
- static void _bind_methods();
-public:
-
-
-
- void set_sprite_frames(const Ref<SpriteFrames>& p_sprite_frames);
- Ref<SpriteFrames> get_sprite_frames() const;
-
- void set_frame(int p_frame);
- int get_frame() const;
-
-
- virtual Rect2 get_item_rect() const;
-
- AnimatedSprite3D();
- //~AnimatedSprite3D();
-};
-#endif
-
class AnimatedSprite3D : public SpriteBase3D {
GDCLASS(AnimatedSprite3D, SpriteBase3D);
diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp
index 2a41c8f30e..d6b3206fbf 100644
--- a/scene/3d/vehicle_body.cpp
+++ b/scene/3d/vehicle_body.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -81,9 +81,7 @@ void VehicleWheel::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- if (!get_parent())
- return;
- VehicleBody *cb = get_parent()->cast_to<VehicleBody>();
+ VehicleBody *cb = Object::cast_to<VehicleBody>(get_parent());
if (!cb)
return;
body = cb;
@@ -96,9 +94,7 @@ void VehicleWheel::_notification(int p_what) {
}
if (p_what == NOTIFICATION_EXIT_TREE) {
- if (!get_parent())
- return;
- VehicleBody *cb = get_parent()->cast_to<VehicleBody>();
+ VehicleBody *cb = Object::cast_to<VehicleBody>(get_parent());
if (!cb)
return;
cb->wheels.erase(this);
@@ -416,7 +412,7 @@ real_t VehicleBody::_ray_cast(int p_idx, PhysicsDirectBodyState *s) {
wheel.m_raycastInfo.m_isInContact = true;
if (rr.collider)
- wheel.m_raycastInfo.m_groundObject = rr.collider->cast_to<PhysicsBody>();
+ wheel.m_raycastInfo.m_groundObject = Object::cast_to<PhysicsBody>(rr.collider);
real_t hitDistance = param * raylen;
wheel.m_raycastInfo.m_suspensionLength = hitDistance - wheel.m_wheelRadius;
@@ -804,7 +800,7 @@ void VehicleBody::_update_friction(PhysicsDirectBodyState *s) {
void VehicleBody::_direct_state_changed(Object *p_state) {
- PhysicsDirectBodyState *s = p_state->cast_to<PhysicsDirectBodyState>();
+ PhysicsDirectBodyState *s = Object::cast_to<PhysicsDirectBodyState>(p_state);
set_ignore_transform_notification(true);
set_global_transform(s->get_transform());
diff --git a/scene/3d/vehicle_body.h b/scene/3d/vehicle_body.h
index d778800814..d67209c58f 100644
--- a/scene/3d/vehicle_body.h
+++ b/scene/3d/vehicle_body.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/visibility_notifier.cpp b/scene/3d/visibility_notifier.cpp
index 0b77968dca..d3203bacec 100644
--- a/scene/3d/visibility_notifier.cpp
+++ b/scene/3d/visibility_notifier.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -151,7 +151,7 @@ void VisibilityEnabler::_find_nodes(Node *p_node) {
if (enabler[ENABLER_FREEZE_BODIES]) {
- RigidBody *rb = p_node->cast_to<RigidBody>();
+ RigidBody *rb = Object::cast_to<RigidBody>(p_node);
if (rb && ((rb->get_mode() == RigidBody::MODE_CHARACTER || (rb->get_mode() == RigidBody::MODE_RIGID && !rb->is_able_to_sleep())))) {
add = true;
@@ -161,7 +161,7 @@ void VisibilityEnabler::_find_nodes(Node *p_node) {
if (enabler[ENABLER_PAUSE_ANIMATIONS]) {
- AnimationPlayer *ap = p_node->cast_to<AnimationPlayer>();
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node);
if (ap) {
add = true;
}
@@ -219,14 +219,14 @@ void VisibilityEnabler::_change_node_state(Node *p_node, bool p_enabled) {
ERR_FAIL_COND(!nodes.has(p_node));
{
- RigidBody *rb = p_node->cast_to<RigidBody>();
+ RigidBody *rb = Object::cast_to<RigidBody>(p_node);
if (rb)
rb->set_sleeping(!p_enabled);
}
{
- AnimationPlayer *ap = p_node->cast_to<AnimationPlayer>();
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(p_node);
if (ap) {
diff --git a/scene/3d/visibility_notifier.h b/scene/3d/visibility_notifier.h
index 316b2c3575..0b83e0534e 100644
--- a/scene/3d/visibility_notifier.h
+++ b/scene/3d/visibility_notifier.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp
index 7d61006529..0464a82f65 100644
--- a/scene/3d/visual_instance.cpp
+++ b/scene/3d/visual_instance.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -29,7 +29,6 @@
/*************************************************************************/
#include "visual_instance.h"
-#include "room_instance.h"
#include "scene/scene_string_names.h"
#include "servers/visual_server.h"
#include "skeleton.h"
@@ -54,32 +53,9 @@ void VisualInstance::_notification(int p_what) {
case NOTIFICATION_ENTER_WORLD: {
- // CHECK ROOM
- Spatial *parent = get_parent_spatial();
- Room *room = NULL;
- bool is_geom = cast_to<GeometryInstance>();
-
- /* while(parent) {
-
- room = parent->cast_to<Room>();
- if (room)
- break;
-
- if (is_geom && parent->cast_to<BakedLightSampler>()) {
- VS::get_singleton()->instance_geometry_set_baked_light_sampler(get_instance(),parent->cast_to<BakedLightSampler>()->get_instance());
- break;
- }
-
- parent=parent->get_parent_spatial();
- }*/
-
- if (room) {
-
- VisualServer::get_singleton()->instance_set_room(instance, room->get_instance());
- }
// CHECK SKELETON => moving skeleton attaching logic to MeshInstance
/*
- Skeleton *skeleton=get_parent()?get_parent()->cast_to<Skeleton>():NULL;
+ Skeleton *skeleton=Object::cast_to<Skeleton>(get_parent());
if (skeleton)
VisualServer::get_singleton()->instance_attach_skeleton( instance, skeleton->get_skeleton() );
*/
@@ -96,7 +72,6 @@ void VisualInstance::_notification(int p_what) {
case NOTIFICATION_EXIT_WORLD: {
VisualServer::get_singleton()->instance_set_scenario(instance, RID());
- VisualServer::get_singleton()->instance_set_room(instance, RID());
VisualServer::get_singleton()->instance_attach_skeleton(instance, RID());
//VS::get_singleton()->instance_geometry_set_baked_light_sampler(instance, RID() );
@@ -303,7 +278,6 @@ void GeometryInstance::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material_override", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,SpatialMaterial"), "set_material_override", "get_material_override");
ADD_PROPERTY(PropertyInfo(Variant::INT, "cast_shadow", PROPERTY_HINT_ENUM, "Off,On,Double-Sided,Shadows Only"), "set_cast_shadows_setting", "get_cast_shadows_setting");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "extra_cull_margin", PROPERTY_HINT_RANGE, "0,16384,0"), "set_extra_cull_margin", "get_extra_cull_margin");
- ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "visible_in_all_rooms"), "set_flag", "get_flag", FLAG_VISIBLE_IN_ALL_ROOMS);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "use_in_baked_light"), "set_flag", "get_flag", FLAG_USE_BAKED_LIGHT);
ADD_GROUP("LOD", "lod_");
@@ -314,7 +288,6 @@ void GeometryInstance::_bind_methods() {
//ADD_SIGNAL( MethodInfo("visibility_changed"));
- BIND_CONSTANT(FLAG_VISIBLE_IN_ALL_ROOMS);
BIND_CONSTANT(FLAG_MAX);
BIND_CONSTANT(SHADOW_CASTING_SETTING_OFF);
diff --git a/scene/3d/visual_instance.h b/scene/3d/visual_instance.h
index 694d0c2499..c405236d2c 100644
--- a/scene/3d/visual_instance.h
+++ b/scene/3d/visual_instance.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -76,15 +76,12 @@ public:
~VisualInstance();
};
-class BakedLight;
-
class GeometryInstance : public VisualInstance {
GDCLASS(GeometryInstance, VisualInstance);
public:
enum Flags {
- FLAG_VISIBLE_IN_ALL_ROOMS = VS::INSTANCE_FLAG_VISIBLE_IN_ALL_ROOMS,
FLAG_USE_BAKED_LIGHT = VS::INSTANCE_FLAG_USE_BAKED_LIGHT,
FLAG_MAX = VS::INSTANCE_FLAG_MAX,
};
diff --git a/scene/SCsub b/scene/SCsub
index df52e9c6cb..513adeffda 100644
--- a/scene/SCsub
+++ b/scene/SCsub
@@ -27,7 +27,6 @@ SConscript('2d/SCsub')
SConscript('animation/SCsub')
SConscript('audio/SCsub')
SConscript('resources/SCsub')
-SConscript('io/SCsub')
# Build it all as a library
diff --git a/scene/animation/animation_cache.cpp b/scene/animation/animation_cache.cpp
index 31fee0e347..b35b2568d1 100644
--- a/scene/animation/animation_cache.cpp
+++ b/scene/animation/animation_cache.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -120,7 +120,7 @@ void AnimationCache::_update_cache() {
StringName property = np.get_property();
String ps = property;
- Spatial *sp = node->cast_to<Spatial>();
+ Spatial *sp = Object::cast_to<Spatial>(node);
if (!sp) {
@@ -131,7 +131,7 @@ void AnimationCache::_update_cache() {
if (ps != "") {
- Skeleton *sk = node->cast_to<Skeleton>();
+ Skeleton *sk = Object::cast_to<Skeleton>(node);
if (!sk) {
path_cache.push_back(Path());
diff --git a/scene/animation/animation_cache.h b/scene/animation/animation_cache.h
index 6687098d00..e593668df6 100644
--- a/scene/animation/animation_cache.h
+++ b/scene/animation/animation_cache.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index 3acb11541f..be0b652276 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -251,9 +251,9 @@ void AnimationPlayer::_generate_node_caches(AnimationData *p_anim) {
uint32_t id = resource.is_valid() ? resource->get_instance_id() : child->get_instance_id();
int bone_idx = -1;
- if (a->track_get_path(i).get_property() && child->cast_to<Skeleton>()) {
+ if (a->track_get_path(i).get_property() && Object::cast_to<Skeleton>(child)) {
- bone_idx = child->cast_to<Skeleton>()->find_bone(a->track_get_path(i).get_property());
+ bone_idx = Object::cast_to<Skeleton>(child)->find_bone(a->track_get_path(i).get_property());
if (bone_idx == -1) {
continue;
@@ -280,14 +280,14 @@ void AnimationPlayer::_generate_node_caches(AnimationData *p_anim) {
p_anim->node_cache[i]->path = a->track_get_path(i);
p_anim->node_cache[i]->node = child;
p_anim->node_cache[i]->resource = resource;
- p_anim->node_cache[i]->node_2d = child->cast_to<Node2D>();
+ p_anim->node_cache[i]->node_2d = Object::cast_to<Node2D>(child);
if (a->track_get_type(i) == Animation::TYPE_TRANSFORM) {
// special cases and caches for transform tracks
// cache spatial
- p_anim->node_cache[i]->spatial = child->cast_to<Spatial>();
+ p_anim->node_cache[i]->spatial = Object::cast_to<Spatial>(child);
// cache skeleton
- p_anim->node_cache[i]->skeleton = child->cast_to<Skeleton>();
+ p_anim->node_cache[i]->skeleton = Object::cast_to<Skeleton>(child);
if (p_anim->node_cache[i]->skeleton) {
StringName bone_name = a->track_get_path(i).get_property();
@@ -608,16 +608,6 @@ void AnimationPlayer::_animation_update_transforms() {
ERR_CONTINUE(pa->accum_pass != accum_pass);
-#if 1
- /* switch(pa->special) {
-
-
- case SP_NONE: pa->object->set(pa->prop,pa->value_accum); break; //you are not speshul
- case SP_NODE2D_POS: static_cast<Node2D*>(pa->object)->set_position(pa->value_accum); break;
- case SP_NODE2D_ROT: static_cast<Node2D*>(pa->object)->set_rot(Math::deg2rad(pa->value_accum)); break;
- case SP_NODE2D_SCALE: static_cast<Node2D*>(pa->object)->set_scale(pa->value_accum); break;
- }*/
-
switch (pa->special) {
case SP_NONE: {
@@ -657,10 +647,6 @@ void AnimationPlayer::_animation_update_transforms() {
static_cast<Node2D *>(pa->object)->set_scale(pa->value_accum);
} break;
}
-#else
-
- pa->object->set(pa->prop, pa->value_accum);
-#endif
}
cache_update_prop_size = 0;
@@ -668,8 +654,6 @@ void AnimationPlayer::_animation_update_transforms() {
void AnimationPlayer::_animation_process(float p_delta) {
- //bool any_active=false;
-
if (playback.current.from) {
end_notify = false;
diff --git a/scene/animation/animation_player.h b/scene/animation/animation_player.h
index 01b709205a..c6e52145a8 100644
--- a/scene/animation/animation_player.h
+++ b/scene/animation/animation_player.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/animation/animation_tree_player.cpp b/scene/animation/animation_tree_player.cpp
index fd8b33e666..e2330eb0d4 100644
--- a/scene/animation/animation_tree_player.cpp
+++ b/scene/animation/animation_tree_player.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -1487,8 +1487,8 @@ AnimationTreePlayer::Track *AnimationTreePlayer::_find_track(const NodePath &p_p
if (p_path.get_property()) {
- if (child->cast_to<Skeleton>())
- bone_idx = child->cast_to<Skeleton>()->find_bone(p_path.get_property());
+ if (Object::cast_to<Skeleton>(child))
+ bone_idx = Object::cast_to<Skeleton>(child)->find_bone(p_path.get_property());
if (bone_idx == -1)
property = p_path.get_property();
}
@@ -1503,8 +1503,8 @@ AnimationTreePlayer::Track *AnimationTreePlayer::_find_track(const NodePath &p_p
Track tr;
tr.id = id;
tr.object = resource.is_valid() ? (Object *)resource.ptr() : (Object *)child;
- tr.skeleton = child->cast_to<Skeleton>();
- tr.spatial = child->cast_to<Spatial>();
+ tr.skeleton = Object::cast_to<Skeleton>(child);
+ tr.spatial = Object::cast_to<Spatial>(child);
tr.bone_idx = bone_idx;
tr.property = property;
@@ -1644,7 +1644,7 @@ void AnimationTreePlayer::_update_sources() {
ERR_FAIL_COND(!m);
}
- AnimationPlayer *ap = m->cast_to<AnimationPlayer>();
+ AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(m);
if (!ap) {
diff --git a/scene/animation/animation_tree_player.h b/scene/animation/animation_tree_player.h
index 47f18795bd..609430340b 100644
--- a/scene/animation/animation_tree_player.h
+++ b/scene/animation/animation_tree_player.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -347,7 +347,7 @@ public:
void animation_node_set_master_animation(const StringName &p_node, const String &p_master_animation);
String animation_node_get_master_animation(const StringName &p_node) const;
- void animation_node_set_filter_path(const StringName &p_node, const NodePath &p_filter, bool p_enable);
+ void animation_node_set_filter_path(const StringName &p_node, const NodePath &p_track_path, bool p_filter);
void animation_node_set_get_filtered_paths(const StringName &p_node, List<NodePath> *r_paths) const;
bool animation_node_is_path_filtered(const StringName &p_node, const NodePath &p_path) const;
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp
index 45994ba050..fb61c43d5c 100644
--- a/scene/animation/tween.cpp
+++ b/scene/animation/tween.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -560,12 +560,16 @@ void Tween::_tween_process(float p_delta) {
switch (data.type) {
case INTER_PROPERTY:
- case INTER_METHOD:
- break;
+ case INTER_METHOD: {
+ Variant result = _run_equation(data);
+ emit_signal("tween_step", object, data.key, data.elapsed, result);
+ _apply_tween_value(data, result);
+ if (data.finish)
+ _apply_tween_value(data, data.final_val);
+ } break;
+
case INTER_CALLBACK:
if (data.finish) {
-
- Variant::CallError error;
if (data.call_deferred) {
switch (data.args) {
@@ -588,8 +592,8 @@ void Tween::_tween_process(float p_delta) {
object->call_deferred(data.key, data.arg[0], data.arg[1], data.arg[2], data.arg[3], data.arg[4]);
break;
}
-
} else {
+ Variant::CallError error;
Variant *arg[5] = {
&data.arg[0],
&data.arg[1],
@@ -599,19 +603,11 @@ void Tween::_tween_process(float p_delta) {
};
object->call(data.key, (const Variant **)arg, data.args, error);
}
- if (!repeat)
- call_deferred("_remove", object, data.key, true);
}
- continue;
+ break;
}
- Variant result = _run_equation(data);
- emit_signal("tween_step", object, data.key, data.elapsed, result);
-
- _apply_tween_value(data, result);
-
if (data.finish) {
- _apply_tween_value(data, data.final_val);
emit_signal("tween_completed", object, data.key);
// not repeat mode, remove completed action
if (!repeat)
diff --git a/scene/animation/tween.h b/scene/animation/tween.h
index 43234fab86..929d63a7fc 100644
--- a/scene/animation/tween.h
+++ b/scene/animation/tween.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/animation/tween_interpolaters.cpp b/scene/animation/tween_interpolaters.cpp
index 434f4df3e1..8f543a575a 100644
--- a/scene/animation/tween_interpolaters.cpp
+++ b/scene/animation/tween_interpolaters.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/audio/audio_player.cpp b/scene/audio/audio_player.cpp
index d4d8f7dbed..8bd924e7ce 100644
--- a/scene/audio/audio_player.cpp
+++ b/scene/audio/audio_player.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -107,6 +107,15 @@ void AudioStreamPlayer::_notification(int p_what) {
}
}
+ if (p_what == NOTIFICATION_INTERNAL_PROCESS) {
+
+ if (!active || (setseek < 0 && !stream_playback->is_playing())) {
+ active = false;
+ emit_signal("finished");
+ set_process_internal(false);
+ }
+ }
+
if (p_what == NOTIFICATION_EXIT_TREE) {
AudioServer::get_singleton()->remove_callback(_mix_audios, this);
@@ -130,12 +139,12 @@ void AudioStreamPlayer::set_stream(Ref<AudioStream> p_stream) {
stream = p_stream;
stream_playback = p_stream->instance_playback();
+ AudioServer::get_singleton()->unlock();
+
if (stream_playback.is_null()) {
stream.unref();
ERR_FAIL_COND(stream_playback.is_null());
}
-
- AudioServer::get_singleton()->unlock();
}
Ref<AudioStream> AudioStreamPlayer::get_stream() const {
@@ -158,6 +167,7 @@ void AudioStreamPlayer::play(float p_from_pos) {
mix_volume_db = volume_db; //reset volume ramp
setseek = p_from_pos;
active = true;
+ set_process_internal(true);
}
}
@@ -172,6 +182,7 @@ void AudioStreamPlayer::stop() {
if (stream_playback.is_valid()) {
active = false;
+ set_process_internal(false);
}
}
@@ -297,6 +308,8 @@ void AudioStreamPlayer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "autoplay"), "set_autoplay", "is_autoplay_enabled");
ADD_PROPERTY(PropertyInfo(Variant::INT, "mix_target", PROPERTY_HINT_ENUM, "Stereo,Surround,Center"), "set_mix_target", "get_mix_target");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "bus", PROPERTY_HINT_ENUM, ""), "set_bus", "get_bus");
+
+ ADD_SIGNAL(MethodInfo("finished"));
}
AudioStreamPlayer::AudioStreamPlayer() {
diff --git a/scene/audio/audio_player.h b/scene/audio/audio_player.h
index 8bd6844dec..4bfa84f766 100644
--- a/scene/audio/audio_player.h
+++ b/scene/audio/audio_player.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index 9054063a4b..8fd19e8655 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "base_button.h"
+
#include "os/keyboard.h"
#include "print_string.h"
#include "scene/main/viewport.h"
diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h
index dfcf3b0f8a..0c08dc53a3 100644
--- a/scene/gui/base_button.h
+++ b/scene/gui/base_button.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/box_container.cpp b/scene/gui/box_container.cpp
index 2cc4be96a7..739fd84b38 100644
--- a/scene/gui/box_container.cpp
+++ b/scene/gui/box_container.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -54,7 +54,7 @@ void BoxContainer::_resort() {
Map<Control *, _MinSizeCache> min_size_cache;
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c || !c->is_visible_in_tree())
continue;
if (c->is_set_as_toplevel())
@@ -106,7 +106,7 @@ void BoxContainer::_resort() {
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c || !c->is_visible_in_tree())
continue;
if (c->is_set_as_toplevel())
@@ -159,7 +159,7 @@ void BoxContainer::_resort() {
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c || !c->is_visible_in_tree())
continue;
if (c->is_set_as_toplevel())
@@ -211,7 +211,7 @@ Size2 BoxContainer::get_minimum_size() const {
bool first = true;
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
if (c->is_set_as_toplevel())
diff --git a/scene/gui/box_container.h b/scene/gui/box_container.h
index d544ff79d1..4d00a2011f 100644
--- a/scene/gui/box_container.h
+++ b/scene/gui/box_container.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index c8838f3eca..1fa03f81f4 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/button.h b/scene/gui/button.h
index 499e44c0e1..dd6e730b86 100644
--- a/scene/gui/button.h
+++ b/scene/gui/button.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/button_group.cpp b/scene/gui/button_group.cpp
index e54e810d7d..336c88fe9d 100644
--- a/scene/gui/button_group.cpp
+++ b/scene/gui/button_group.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -56,7 +56,7 @@ void ButtonGroup::set_pressed_button(BaseButton *p_button) {
void ButtonGroup::_pressed(Object *p_button) {
ERR_FAIL_NULL(p_button);
- BaseButton *b=p_button->cast_to<BaseButton>();
+ BaseButton *b=Object::cast_to<BaseButton>(p_button);
ERR_FAIL_COND(!b);
for(Set<BaseButton*>::Element *E=buttons.front();E;E=E->next()) {
diff --git a/scene/gui/button_group.h b/scene/gui/button_group.h
index 93c3aaaeb3..6ebc0575d2 100644
--- a/scene/gui/button_group.h
+++ b/scene/gui/button_group.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/center_container.cpp b/scene/gui/center_container.cpp
index bdc811870d..8c9c9d8720 100644
--- a/scene/gui/center_container.cpp
+++ b/scene/gui/center_container.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -36,7 +36,7 @@ Size2 CenterContainer::get_minimum_size() const {
Size2 ms;
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
if (c->is_set_as_toplevel())
@@ -69,7 +69,7 @@ void CenterContainer::_notification(int p_what) {
Size2 size = get_size();
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
if (c->is_set_as_toplevel())
diff --git a/scene/gui/center_container.h b/scene/gui/center_container.h
index 30b526e893..4397539046 100644
--- a/scene/gui/center_container.h
+++ b/scene/gui/center_container.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/check_box.cpp b/scene/gui/check_box.cpp
index b61d516599..21e2269141 100644
--- a/scene/gui/check_box.cpp
+++ b/scene/gui/check_box.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/check_box.h b/scene/gui/check_box.h
index ec8e097bae..4da06be8d1 100644
--- a/scene/gui/check_box.h
+++ b/scene/gui/check_box.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* check_box.h */
+/* check_box.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/check_button.cpp b/scene/gui/check_button.cpp
index 1c3d4df308..e68159e27f 100644
--- a/scene/gui/check_button.cpp
+++ b/scene/gui/check_button.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/check_button.h b/scene/gui/check_button.h
index 8634858cfe..af3b80fe04 100644
--- a/scene/gui/check_button.h
+++ b/scene/gui/check_button.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index 5257f9df35..704c00b1d6 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -56,11 +56,10 @@ void ColorPicker::_notification(int p_what) {
} break;
case NOTIFICATION_VISIBILITY_CHANGED: {
- if (get_parent()) {
- Popup *p = get_parent()->cast_to<Popup>();
- if (p)
- p->set_size(Size2(get_combined_minimum_size().width + get_constant("margin") * 2, get_combined_minimum_size().height + get_constant("margin") * 2));
- }
+
+ Popup *p = Object::cast_to<Popup>(get_parent());
+ if (p)
+ p->set_size(Size2(get_combined_minimum_size().width + get_constant("margin") * 2, get_combined_minimum_size().height + get_constant("margin") * 2));
} break;
case MainLoop::NOTIFICATION_WM_QUIT_REQUEST: {
diff --git a/scene/gui/color_picker.h b/scene/gui/color_picker.h
index d35182e062..7de67a707c 100644
--- a/scene/gui/color_picker.h
+++ b/scene/gui/color_picker.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/color_rect.cpp b/scene/gui/color_rect.cpp
index 0641302b1c..6b5247648e 100644
--- a/scene/gui/color_rect.cpp
+++ b/scene/gui/color_rect.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/color_rect.h b/scene/gui/color_rect.h
index 65da3d9a7c..382648fddf 100644
--- a/scene/gui/color_rect.h
+++ b/scene/gui/color_rect.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp
index 4bbe15ed7e..ba5d92620b 100644
--- a/scene/gui/container.cpp
+++ b/scene/gui/container.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -43,7 +43,7 @@ void Container::add_child_notify(Node *p_child) {
Control::add_child_notify(p_child);
- Control *control = p_child->cast_to<Control>();
+ Control *control = Object::cast_to<Control>(p_child);
if (!control)
return;
@@ -57,7 +57,7 @@ void Container::move_child_notify(Node *p_child) {
Control::move_child_notify(p_child);
- if (!p_child->cast_to<Control>())
+ if (!Object::cast_to<Control>(p_child))
return;
queue_sort();
@@ -67,7 +67,7 @@ void Container::remove_child_notify(Node *p_child) {
Control::remove_child_notify(p_child);
- Control *control = p_child->cast_to<Control>();
+ Control *control = Object::cast_to<Control>(p_child);
if (!control)
return;
diff --git a/scene/gui/container.h b/scene/gui/container.h
index bff24c6d55..60a7a9efcb 100644
--- a/scene/gui/container.h
+++ b/scene/gui/container.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 36fc9a6b3a..961fccc804 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -353,7 +353,7 @@ void Control::_resize(const Size2 &p_size) {
void Control::add_child_notify(Node *p_child) {
- Control *child_c = p_child->cast_to<Control>();
+ Control *child_c = Object::cast_to<Control>(p_child);
if (!child_c)
return;
@@ -364,7 +364,7 @@ void Control::add_child_notify(Node *p_child) {
void Control::remove_child_notify(Node *p_child) {
- Control *child_c = p_child->cast_to<Control>();
+ Control *child_c = Object::cast_to<Control>(p_child);
if (!child_c)
return;
@@ -398,7 +398,7 @@ void Control::_notification(int p_notification) {
case NOTIFICATION_ENTER_CANVAS: {
- data.parent = get_parent()->cast_to<Control>();
+ data.parent = Object::cast_to<Control>(get_parent());
if (is_set_as_toplevel()) {
data.SI = get_viewport()->_gui_add_subwindow_control(this);
@@ -421,13 +421,13 @@ void Control::_notification(int p_notification) {
if (!parent)
break;
- CanvasItem *ci = parent->cast_to<CanvasItem>();
+ CanvasItem *ci = Object::cast_to<CanvasItem>(parent);
if (ci && ci->is_set_as_toplevel()) {
subwindow = true;
break;
}
- parent_control = parent->cast_to<Control>();
+ parent_control = Object::cast_to<Control>(parent);
if (parent_control) {
break;
@@ -624,7 +624,7 @@ Variant Control::get_drag_data(const Point2 &p_point) {
if (data.drag_owner) {
Object *obj = ObjectDB::get_instance(data.drag_owner);
if (obj) {
- Control *c = obj->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(obj);
return c->call("get_drag_data_fw", p_point, this);
}
}
@@ -646,7 +646,7 @@ bool Control::can_drop_data(const Point2 &p_point, const Variant &p_data) const
if (data.drag_owner) {
Object *obj = ObjectDB::get_instance(data.drag_owner);
if (obj) {
- Control *c = obj->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(obj);
return c->call("can_drop_data_fw", p_point, p_data, this);
}
}
@@ -667,7 +667,7 @@ void Control::drop_data(const Point2 &p_point, const Variant &p_data) {
if (data.drag_owner) {
Object *obj = ObjectDB::get_instance(data.drag_owner);
if (obj) {
- Control *c = obj->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(obj);
c->call("drop_data_fw", p_point, p_data, this);
return;
}
@@ -749,7 +749,7 @@ Ref<Texture> Control::get_icon(const StringName &p_name, const StringName &p_typ
class_name = ClassDB::get_parent_class_nocheck(class_name);
}
- Control *parent = theme_owner->get_parent() ? theme_owner->get_parent()->cast_to<Control>() : NULL;
+ Control *parent = Object::cast_to<Control>(theme_owner->get_parent());
if (parent)
theme_owner = parent->data.theme_owner;
@@ -785,7 +785,7 @@ Ref<Shader> Control::get_shader(const StringName &p_name, const StringName &p_ty
class_name = ClassDB::get_parent_class_nocheck(class_name);
}
- Control *parent = theme_owner->get_parent() ? theme_owner->get_parent()->cast_to<Control>() : NULL;
+ Control *parent = Object::cast_to<Control>(theme_owner->get_parent());
if (parent)
theme_owner = parent->data.theme_owner;
@@ -821,7 +821,7 @@ Ref<StyleBox> Control::get_stylebox(const StringName &p_name, const StringName &
class_name = ClassDB::get_parent_class_nocheck(class_name);
}
- Control *parent = theme_owner->get_parent() ? theme_owner->get_parent()->cast_to<Control>() : NULL;
+ Control *parent = Object::cast_to<Control>(theme_owner->get_parent());
if (parent)
theme_owner = parent->data.theme_owner;
@@ -858,7 +858,7 @@ Ref<Font> Control::get_font(const StringName &p_name, const StringName &p_type)
if (theme_owner->data.theme->get_default_theme_font().is_valid())
return theme_owner->data.theme->get_default_theme_font();
- Control *parent = theme_owner->get_parent() ? theme_owner->get_parent()->cast_to<Control>() : NULL;
+ Control *parent = Object::cast_to<Control>(theme_owner->get_parent());
if (parent)
theme_owner = parent->data.theme_owner;
@@ -892,7 +892,7 @@ Color Control::get_color(const StringName &p_name, const StringName &p_type) con
class_name = ClassDB::get_parent_class_nocheck(class_name);
}
- Control *parent = theme_owner->get_parent() ? theme_owner->get_parent()->cast_to<Control>() : NULL;
+ Control *parent = Object::cast_to<Control>(theme_owner->get_parent());
if (parent)
theme_owner = parent->data.theme_owner;
@@ -927,7 +927,7 @@ int Control::get_constant(const StringName &p_name, const StringName &p_type) co
class_name = ClassDB::get_parent_class_nocheck(class_name);
}
- Control *parent = theme_owner->get_parent() ? theme_owner->get_parent()->cast_to<Control>() : NULL;
+ Control *parent = Object::cast_to<Control>(theme_owner->get_parent());
if (parent)
theme_owner = parent->data.theme_owner;
@@ -1015,7 +1015,7 @@ bool Control::has_icon(const StringName &p_name, const StringName &p_type) const
class_name = ClassDB::get_parent_class_nocheck(class_name);
}
- Control *parent = theme_owner->get_parent() ? theme_owner->get_parent()->cast_to<Control>() : NULL;
+ Control *parent = Object::cast_to<Control>(theme_owner->get_parent());
if (parent)
theme_owner = parent->data.theme_owner;
@@ -1049,7 +1049,7 @@ bool Control::has_shader(const StringName &p_name, const StringName &p_type) con
class_name = ClassDB::get_parent_class_nocheck(class_name);
}
- Control *parent = theme_owner->get_parent() ? theme_owner->get_parent()->cast_to<Control>() : NULL;
+ Control *parent = Object::cast_to<Control>(theme_owner->get_parent());
if (parent)
theme_owner = parent->data.theme_owner;
@@ -1082,7 +1082,7 @@ bool Control::has_stylebox(const StringName &p_name, const StringName &p_type) c
class_name = ClassDB::get_parent_class_nocheck(class_name);
}
- Control *parent = theme_owner->get_parent() ? theme_owner->get_parent()->cast_to<Control>() : NULL;
+ Control *parent = Object::cast_to<Control>(theme_owner->get_parent());
if (parent)
theme_owner = parent->data.theme_owner;
@@ -1115,7 +1115,7 @@ bool Control::has_font(const StringName &p_name, const StringName &p_type) const
class_name = ClassDB::get_parent_class_nocheck(class_name);
}
- Control *parent = theme_owner->get_parent() ? theme_owner->get_parent()->cast_to<Control>() : NULL;
+ Control *parent = Object::cast_to<Control>(theme_owner->get_parent());
if (parent)
theme_owner = parent->data.theme_owner;
@@ -1149,7 +1149,7 @@ bool Control::has_color(const StringName &p_name, const StringName &p_type) cons
class_name = ClassDB::get_parent_class_nocheck(class_name);
}
- Control *parent = theme_owner->get_parent() ? theme_owner->get_parent()->cast_to<Control>() : NULL;
+ Control *parent = Object::cast_to<Control>(theme_owner->get_parent());
if (parent)
theme_owner = parent->data.theme_owner;
@@ -1183,7 +1183,7 @@ bool Control::has_constant(const StringName &p_name, const StringName &p_type) c
class_name = ClassDB::get_parent_class_nocheck(class_name);
}
- Control *parent = theme_owner->get_parent() ? theme_owner->get_parent()->cast_to<Control>() : NULL;
+ Control *parent = Object::cast_to<Control>(theme_owner->get_parent());
if (parent)
theme_owner = parent->data.theme_owner;
@@ -1687,7 +1687,7 @@ static Control *_next_control(Control *p_from) {
if (p_from->is_set_as_toplevel())
return NULL; // can't go above
- Control *parent = p_from->get_parent() ? p_from->get_parent()->cast_to<Control>() : NULL;
+ Control *parent = Object::cast_to<Control>(p_from->get_parent());
if (!parent) {
@@ -1698,7 +1698,7 @@ static Control *_next_control(Control *p_from) {
ERR_FAIL_INDEX_V(next, parent->get_child_count(), NULL);
for (int i = (next + 1); i < parent->get_child_count(); i++) {
- Control *c = parent->get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(parent->get_child(i));
if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel())
continue;
@@ -1721,7 +1721,7 @@ Control *Control::find_next_valid_focus() const {
for (int i = 0; i < from->get_child_count(); i++) {
- Control *c = from->get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(from->get_child(i));
if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel()) {
continue;
}
@@ -1739,10 +1739,8 @@ Control *Control::find_next_valid_focus() const {
if (!next_child) { //nothing else.. go up and find either window or subwindow
next_child = const_cast<Control *>(this);
while (next_child && !next_child->is_set_as_toplevel()) {
- if (next_child->get_parent()) {
- next_child = next_child->get_parent()->cast_to<Control>();
- } else
- next_child = NULL;
+
+ next_child = cast_to<Control>(next_child->get_parent());
}
if (!next_child) {
@@ -1776,7 +1774,7 @@ static Control *_prev_control(Control *p_from) {
Control *child = NULL;
for (int i = p_from->get_child_count() - 1; i >= 0; i--) {
- Control *c = p_from->get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(p_from->get_child(i));
if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel())
continue;
@@ -1800,7 +1798,7 @@ Control *Control::find_prev_valid_focus() const {
Control *prev_child = NULL;
- if (from->is_set_as_toplevel() || !from->get_parent() || !from->get_parent()->cast_to<Control>()) {
+ if (from->is_set_as_toplevel() || !Object::cast_to<Control>(from->get_parent())) {
//find last of the childs
@@ -1810,7 +1808,7 @@ Control *Control::find_prev_valid_focus() const {
for (int i = (from->get_position_in_parent() - 1); i >= 0; i--) {
- Control *c = from->get_parent()->get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(from->get_parent()->get_child(i));
if (!c || !c->is_visible_in_tree() || c->is_set_as_toplevel()) {
continue;
@@ -1822,7 +1820,7 @@ Control *Control::find_prev_valid_focus() const {
if (!prev_child) {
- prev_child = from->get_parent()->cast_to<Control>();
+ prev_child = Object::cast_to<Control>(from->get_parent());
} else {
prev_child = _prev_control(prev_child);
@@ -1912,14 +1910,14 @@ void Control::_modal_stack_remove() {
void Control::_propagate_theme_changed(CanvasItem *p_at, Control *p_owner, bool p_assign) {
- Control *c = p_at->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(p_at);
if (c && c != p_owner && c->data.theme.is_valid()) // has a theme, this can't be propagated
return;
for (int i = 0; i < p_at->get_child_count(); i++) {
- CanvasItem *child = p_at->get_child(i)->cast_to<CanvasItem>();
+ CanvasItem *child = Object::cast_to<CanvasItem>(p_at->get_child(i));
if (child) {
_propagate_theme_changed(child, p_owner, p_assign);
}
@@ -1955,7 +1953,7 @@ void Control::set_theme(const Ref<Theme> &p_theme) {
_propagate_theme_changed(this, this);
} else {
- Control *parent = get_parent() ? get_parent()->cast_to<Control>() : NULL;
+ Control *parent = cast_to<Control>(get_parent());
if (parent && parent->data.theme_owner) {
_propagate_theme_changed(this, parent->data.theme_owner);
} else {
@@ -2038,7 +2036,7 @@ Control *Control::_get_focus_neighbour(Margin p_margin, int p_count) {
Control *c = NULL;
Node *n = get_node(data.focus_neighbour[p_margin]);
if (n) {
- c = n->cast_to<Control>();
+ c = Object::cast_to<Control>(n);
if (!c) {
@@ -2095,7 +2093,7 @@ Control *Control::_get_focus_neighbour(Margin p_margin, int p_count) {
while (base) {
- Control *c = base->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(base);
if (c) {
if (c->data.SI)
break;
@@ -2115,10 +2113,10 @@ Control *Control::_get_focus_neighbour(Margin p_margin, int p_count) {
void Control::_window_find_focus_neighbour(const Vector2 &p_dir, Node *p_at, const Point2 *p_points, float p_min, float &r_closest_dist, Control **r_closest) {
- if (p_at->cast_to<Viewport>())
+ if (Object::cast_to<Viewport>(p_at))
return; //bye
- Control *c = p_at->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(p_at);
if (c && c != this && c->get_focus_mode() == FOCUS_ALL && c->is_visible_in_tree()) {
@@ -2168,7 +2166,7 @@ void Control::_window_find_focus_neighbour(const Vector2 &p_dir, Node *p_at, con
for (int i = 0; i < p_at->get_child_count(); i++) {
Node *child = p_at->get_child(i);
- Control *childc = child->cast_to<Control>();
+ Control *childc = Object::cast_to<Control>(child);
if (childc && childc->data.SI)
continue; //subwindow, ignore
_window_find_focus_neighbour(p_dir, p_at->get_child(i), p_points, p_min, r_closest_dist, r_closest);
@@ -2363,7 +2361,7 @@ Control *Control::get_root_parent_control() const {
while (ci) {
- const Control *c = ci->cast_to<Control>();
+ const Control *c = Object::cast_to<Control>(ci);
if (c) {
root = c;
@@ -2705,7 +2703,7 @@ void Control::_bind_methods() {
ADD_SIGNAL(MethodInfo("minimum_size_changed"));
ADD_SIGNAL(MethodInfo("modal_closed"));
- BIND_VMETHOD(MethodInfo("has_point:bool", PropertyInfo(Variant::VECTOR2, "point")));
+ BIND_VMETHOD(MethodInfo(Variant::BOOL, "has_point", PropertyInfo(Variant::VECTOR2, "point")));
}
Control::Control() {
diff --git a/scene/gui/control.h b/scene/gui/control.h
index d73ca3f7c9..da5c4d0908 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -33,7 +33,7 @@
#include "math_2d.h"
#include "rid.h"
#include "scene/2d/canvas_item.h"
-#include "scene/gui/input_action.h"
+#include "scene/gui/shortcut.h"
#include "scene/main/node.h"
#include "scene/main/timer.h"
#include "scene/resources/theme.h"
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index b911a18312..140d002387 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -60,13 +60,13 @@ void WindowDialog::_fix_size() {
float right = 0;
// Check validity, because the theme could contain a different type of StyleBox
if (panel->get_class() == "StyleBoxTexture") {
- Ref<StyleBoxTexture> panel_texture = panel->cast_to<StyleBoxTexture>();
+ Ref<StyleBoxTexture> panel_texture = Object::cast_to<StyleBoxTexture>(*panel);
top = panel_texture->get_expand_margin_size(MARGIN_TOP);
left = panel_texture->get_expand_margin_size(MARGIN_LEFT);
bottom = panel_texture->get_expand_margin_size(MARGIN_BOTTOM);
right = panel_texture->get_expand_margin_size(MARGIN_RIGHT);
} else if (panel->get_class() == "StyleBoxFlat") {
- Ref<StyleBoxFlat> panel_flat = panel->cast_to<StyleBoxFlat>();
+ Ref<StyleBoxFlat> panel_flat = Object::cast_to<StyleBoxFlat>(*panel);
top = panel_flat->get_expand_margin_size(MARGIN_TOP);
left = panel_flat->get_expand_margin_size(MARGIN_LEFT);
bottom = panel_flat->get_expand_margin_size(MARGIN_BOTTOM);
@@ -424,7 +424,7 @@ void AcceptDialog::_update_child_rects() {
Vector2 csize(size.x - margin * 2, size.y - margin * 3 - hminsize.y - label_size.height);
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
@@ -448,7 +448,7 @@ Size2 AcceptDialog::get_minimum_size() const {
Size2 minsize = label->get_combined_minimum_size();
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
diff --git a/scene/gui/dialogs.h b/scene/gui/dialogs.h
index 9d8f113caa..54cc290b05 100644
--- a/scene/gui/dialogs.h
+++ b/scene/gui/dialogs.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 0b898c4d2e..990c0f3d96 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h
index 9873a677b2..34cecfe4d0 100644
--- a/scene/gui/file_dialog.h
+++ b/scene/gui/file_dialog.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp
index 22de28ea7f..c9ce5e2143 100644
--- a/scene/gui/gradient_edit.cpp
+++ b/scene/gui/gradient_edit.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/gradient_edit.h b/scene/gui/gradient_edit.h
index 6c4ae6fd15..026e4f783b 100644
--- a/scene/gui/gradient_edit.h
+++ b/scene/gui/gradient_edit.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp
index ec1932ed5a..5b00aab2ef 100644
--- a/scene/gui/graph_edit.cpp
+++ b/scene/gui/graph_edit.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "graph_edit.h"
+
#include "os/input.h"
#include "os/keyboard.h"
#include "scene/gui/box_container.h"
@@ -134,7 +135,7 @@ void GraphEdit::_update_scroll_offset() {
for (int i = 0; i < get_child_count(); i++) {
- GraphNode *gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
if (!gn)
continue;
@@ -163,7 +164,7 @@ void GraphEdit::_update_scroll() {
Rect2 screen;
for (int i = 0; i < get_child_count(); i++) {
- GraphNode *gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
if (!gn)
continue;
@@ -205,7 +206,7 @@ void GraphEdit::_update_scroll() {
void GraphEdit::_graph_node_raised(Node *p_gn) {
- GraphNode *gn = p_gn->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(p_gn);
ERR_FAIL_COND(!gn);
if (gn->is_comment()) {
move_child(gn, 0);
@@ -214,7 +215,7 @@ void GraphEdit::_graph_node_raised(Node *p_gn) {
}
int first_not_comment = 0;
for (int i = 0; i < get_child_count(); i++) {
- GraphNode *gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
if (gn && !gn->is_comment()) {
first_not_comment = i;
break;
@@ -228,7 +229,7 @@ void GraphEdit::_graph_node_raised(Node *p_gn) {
void GraphEdit::_graph_node_moved(Node *p_gn) {
- GraphNode *gn = p_gn->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(p_gn);
ERR_FAIL_COND(!gn);
top_layer->update();
update();
@@ -240,7 +241,7 @@ void GraphEdit::add_child_notify(Node *p_child) {
Control::add_child_notify(p_child);
top_layer->call_deferred("raise"); //top layer always on top!
- GraphNode *gn = p_child->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(p_child);
if (gn) {
gn->set_scale(Vector2(zoom, zoom));
gn->connect("offset_changed", this, "_graph_node_moved", varray(gn));
@@ -256,7 +257,7 @@ void GraphEdit::remove_child_notify(Node *p_child) {
Control::remove_child_notify(p_child);
top_layer->call_deferred("raise"); //top layer always on top!
- GraphNode *gn = p_child->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(p_child);
if (gn) {
gn->disconnect("offset_changed", this, "_graph_node_moved");
gn->disconnect("raise_request", this, "_graph_node_raised");
@@ -345,7 +346,7 @@ bool GraphEdit::_filter_input(const Point2 &p_point) {
float grab_r = port->get_width() * 0.5 * grab_r_extend;
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
if (!gn)
continue;
@@ -379,7 +380,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {
float grab_r = port->get_width() * 0.5 * grab_r_extend;
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
if (!gn)
continue;
@@ -395,20 +396,20 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {
if (E->get().from == gn->get_name() && E->get().from_port == j) {
Node *to = get_node(String(E->get().to));
- if (to && to->cast_to<GraphNode>()) {
+ if (Object::cast_to<GraphNode>(to)) {
connecting_from = E->get().to;
connecting_index = E->get().to_port;
connecting_out = false;
- connecting_type = to->cast_to<GraphNode>()->get_connection_input_type(E->get().to_port);
- connecting_color = to->cast_to<GraphNode>()->get_connection_input_color(E->get().to_port);
+ connecting_type = Object::cast_to<GraphNode>(to)->get_connection_input_type(E->get().to_port);
+ connecting_color = Object::cast_to<GraphNode>(to)->get_connection_input_color(E->get().to_port);
connecting_target = false;
connecting_to = pos;
just_disconected = true;
emit_signal("disconnection_request", E->get().from, E->get().from_port, E->get().to, E->get().to_port);
to = get_node(String(connecting_from)); //maybe it was erased
- if (to && to->cast_to<GraphNode>()) {
+ if (Object::cast_to<GraphNode>(to)) {
connecting = true;
}
return;
@@ -443,20 +444,20 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {
if (E->get().to == gn->get_name() && E->get().to_port == j) {
Node *fr = get_node(String(E->get().from));
- if (fr && fr->cast_to<GraphNode>()) {
+ if (Object::cast_to<GraphNode>(fr)) {
connecting_from = E->get().from;
connecting_index = E->get().from_port;
connecting_out = true;
- connecting_type = fr->cast_to<GraphNode>()->get_connection_output_type(E->get().from_port);
- connecting_color = fr->cast_to<GraphNode>()->get_connection_output_color(E->get().from_port);
+ connecting_type = Object::cast_to<GraphNode>(fr)->get_connection_output_type(E->get().from_port);
+ connecting_color = Object::cast_to<GraphNode>(fr)->get_connection_output_color(E->get().from_port);
connecting_target = false;
connecting_to = pos;
just_disconected = true;
emit_signal("disconnection_request", E->get().from, E->get().from_port, E->get().to, E->get().to_port);
fr = get_node(String(connecting_from)); //maybe it was erased
- if (fr && fr->cast_to<GraphNode>()) {
+ if (Object::cast_to<GraphNode>(fr)) {
connecting = true;
}
return;
@@ -493,7 +494,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {
float grab_r = port->get_width() * 0.5 * grab_r_extend;
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
if (!gn)
continue;
@@ -593,8 +594,6 @@ void GraphEdit::_bake_segment2d(Vector<Vector2> &points, Vector<Color> &colors,
void GraphEdit::_draw_cos_line(CanvasItem *p_where, const Vector2 &p_from, const Vector2 &p_to, const Color &p_color, const Color &p_to_color) {
-#if 1
-
//cubic bezier code
float diff = p_to.x - p_from.x;
float cp_offset;
@@ -621,84 +620,53 @@ void GraphEdit::_draw_cos_line(CanvasItem *p_where, const Vector2 &p_from, const
colors.push_back(p_to_color);
p_where->draw_polyline_colors(points, colors, 2, true);
-
-#else
-
- static const int steps = 20;
-
- //old cosine code
- Rect2 r;
- r.pos = p_from;
- r.expand_to(p_to);
- Vector2 sign = Vector2((p_from.x < p_to.x) ? 1 : -1, (p_from.y < p_to.y) ? 1 : -1);
- bool flip = sign.x * sign.y < 0;
-
- Vector2 prev;
- for (int i = 0; i <= steps; i++) {
-
- float d = i / float(steps);
- float c = -Math::cos(d * Math_PI) * 0.5 + 0.5;
- if (flip)
- c = 1.0 - c;
- Vector2 p = r.pos + Vector2(d * r.size.width, c * r.size.height);
-
- if (i > 0) {
-
- p_where->draw_line(prev, p, p_color.linear_interpolate(p_to_color, d), 2);
- }
-
- prev = p;
- }
-#endif
}
void GraphEdit::_connections_layer_draw() {
- {
- //draw connections
- List<List<Connection>::Element *> to_erase;
- for (List<Connection>::Element *E = connections.front(); E; E = E->next()) {
-
- NodePath fromnp(E->get().from);
+ //draw connections
+ List<List<Connection>::Element *> to_erase;
+ for (List<Connection>::Element *E = connections.front(); E; E = E->next()) {
- Node *from = get_node(fromnp);
- if (!from) {
- to_erase.push_back(E);
- continue;
- }
+ NodePath fromnp(E->get().from);
- GraphNode *gfrom = from->cast_to<GraphNode>();
+ Node *from = get_node(fromnp);
+ if (!from) {
+ to_erase.push_back(E);
+ continue;
+ }
- if (!gfrom) {
- to_erase.push_back(E);
- continue;
- }
+ GraphNode *gfrom = Object::cast_to<GraphNode>(from);
- NodePath tonp(E->get().to);
- Node *to = get_node(tonp);
- if (!to) {
- to_erase.push_back(E);
- continue;
- }
+ if (!gfrom) {
+ to_erase.push_back(E);
+ continue;
+ }
- GraphNode *gto = to->cast_to<GraphNode>();
+ NodePath tonp(E->get().to);
+ Node *to = get_node(tonp);
+ if (!to) {
+ to_erase.push_back(E);
+ continue;
+ }
- if (!gto) {
- to_erase.push_back(E);
- continue;
- }
+ GraphNode *gto = Object::cast_to<GraphNode>(to);
- Vector2 frompos = gfrom->get_connection_output_pos(E->get().from_port) + gfrom->get_offset() * zoom;
- Color color = gfrom->get_connection_output_color(E->get().from_port);
- Vector2 topos = gto->get_connection_input_pos(E->get().to_port) + gto->get_offset() * zoom;
- Color tocolor = gto->get_connection_input_color(E->get().to_port);
- _draw_cos_line(connections_layer, frompos, topos, color, tocolor);
+ if (!gto) {
+ to_erase.push_back(E);
+ continue;
}
- while (to_erase.size()) {
- connections.erase(to_erase.front()->get());
- to_erase.pop_front();
- }
+ Vector2 frompos = gfrom->get_connection_output_pos(E->get().from_port) + gfrom->get_offset() * zoom;
+ Color color = gfrom->get_connection_output_color(E->get().from_port);
+ Vector2 topos = gto->get_connection_input_pos(E->get().to_port) + gto->get_offset() * zoom;
+ Color tocolor = gto->get_connection_input_color(E->get().to_port);
+ _draw_cos_line(connections_layer, frompos, topos, color, tocolor);
+ }
+
+ while (to_erase.size()) {
+ connections.erase(to_erase.front()->get());
+ to_erase.pop_front();
}
}
@@ -710,7 +678,7 @@ void GraphEdit::_top_layer_draw() {
Node *fromn = get_node(connecting_from);
ERR_FAIL_COND(!fromn);
- GraphNode *from = fromn->cast_to<GraphNode>();
+ GraphNode *from = Object::cast_to<GraphNode>(fromn);
ERR_FAIL_COND(!from);
Vector2 pos;
if (connecting_out)
@@ -744,7 +712,7 @@ void GraphEdit::set_selected(Node *p_child) {
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
if (!gn)
continue;
@@ -767,7 +735,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
//drag_accum+=Vector2(mm->get_relative().x,mm->get_relative().y);
drag_accum = get_local_mouse_pos() - drag_origin;
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
if (gn && gn->is_selected()) {
Vector2 pos = (gn->get_drag_from() * zoom + drag_accum) / zoom;
@@ -791,7 +759,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
if (!gn)
continue;
@@ -816,7 +784,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
box_selecting = false;
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
if (!gn)
continue;
@@ -837,7 +805,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
if (!just_selected && drag_accum == Vector2() && Input::get_singleton()->is_key_pressed(KEY_CONTROL)) {
//deselect current node
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
if (gn) {
Rect2 r = gn->get_rect();
@@ -853,7 +821,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
emit_signal("_begin_node_move");
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
if (gn && gn->is_selected())
gn->set_drag(false);
}
@@ -874,7 +842,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn_selected = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn_selected = Object::cast_to<GraphNode>(get_child(i));
if (gn_selected) {
if (gn_selected->is_resizing())
@@ -898,7 +866,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
just_selected = !gn->is_selected();
if (!gn->is_selected() && !Input::get_singleton()->is_key_pressed(KEY_CONTROL)) {
for (int i = 0; i < get_child_count(); i++) {
- GraphNode *o_gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *o_gn = Object::cast_to<GraphNode>(get_child(i));
if (o_gn)
o_gn->set_selected(o_gn == gn);
}
@@ -906,7 +874,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
gn->set_selected(true);
for (int i = 0; i < get_child_count(); i++) {
- GraphNode *o_gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *o_gn = Object::cast_to<GraphNode>(get_child(i));
if (!o_gn)
continue;
if (o_gn->is_selected())
@@ -926,7 +894,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
previus_selected.clear();
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
if (!gn || !gn->is_selected())
continue;
@@ -937,7 +905,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
previus_selected.clear();
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
if (!gn || !gn->is_selected())
continue;
@@ -948,7 +916,7 @@ void GraphEdit::_gui_input(const Ref<InputEvent> &p_ev) {
previus_selected.clear();
for (int i = get_child_count() - 1; i >= 0; i--) {
- GraphNode *gn = get_child(i)->cast_to<GraphNode>();
+ GraphNode *gn = Object::cast_to<GraphNode>(get_child(i));
if (!gn)
continue;
diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h
index e908829d5f..4656b50133 100644
--- a/scene/gui/graph_edit.h
+++ b/scene/gui/graph_edit.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/graph_node.cpp b/scene/gui/graph_node.cpp
index 4b4ecc5e98..8730be0c06 100644
--- a/scene/gui/graph_node.cpp
+++ b/scene/gui/graph_node.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -96,7 +96,7 @@ void GraphNode::_get_property_list(List<PropertyInfo> *p_list) const {
int idx = 0;
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c || c->is_set_as_toplevel())
continue;
@@ -122,7 +122,7 @@ void GraphNode::_resort() {
Size2 minsize;
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
if (c->is_set_as_toplevel())
@@ -144,7 +144,7 @@ void GraphNode::_resort() {
cache_y.clear();
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
if (c->is_set_as_toplevel())
@@ -375,7 +375,7 @@ Size2 GraphNode::get_minimum_size() const {
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
if (c->is_set_as_toplevel())
@@ -462,7 +462,7 @@ void GraphNode::_connpos_update() {
int idx = 0;
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
if (c->is_set_as_toplevel())
diff --git a/scene/gui/graph_node.h b/scene/gui/graph_node.h
index a7d9e8ddb0..416d711aab 100644
--- a/scene/gui/graph_node.h
+++ b/scene/gui/graph_node.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp
index 06a58d69b2..5dd5667f46 100644
--- a/scene/gui/grid_container.cpp
+++ b/scene/gui/grid_container.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -51,7 +51,7 @@ void GridContainer::_notification(int p_what) {
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c || !c->is_visible_in_tree())
continue;
@@ -109,7 +109,7 @@ void GridContainer::_notification(int p_what) {
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c || !c->is_visible_in_tree())
continue;
int row = idx / columns;
@@ -184,7 +184,7 @@ Size2 GridContainer::get_minimum_size() const {
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c || !c->is_visible_in_tree())
continue;
int row = idx / columns;
diff --git a/scene/gui/grid_container.h b/scene/gui/grid_container.h
index aaa6a295ff..45e26ed48e 100644
--- a/scene/gui/grid_container.h
+++ b/scene/gui/grid_container.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index c7889a6cf2..f8d82a339c 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -534,7 +534,7 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) {
uint64_t now = OS::get_singleton()->get_ticks_msec();
uint64_t diff = now - search_time_msec;
- if (diff < int(ProjectSettings::get_singleton()->get("gui/timers/incremental_search_max_interval_msec")) * 2) {
+ if (diff < uint64_t(ProjectSettings::get_singleton()->get("gui/timers/incremental_search_max_interval_msec")) * 2) {
for (int i = current - 1; i >= 0; i--) {
@@ -569,7 +569,7 @@ void ItemList::_gui_input(const Ref<InputEvent> &p_event) {
uint64_t now = OS::get_singleton()->get_ticks_msec();
uint64_t diff = now - search_time_msec;
- if (diff < int(ProjectSettings::get_singleton()->get("gui/timers/incremental_search_max_interval_msec")) * 2) {
+ if (diff < uint64_t(ProjectSettings::get_singleton()->get("gui/timers/incremental_search_max_interval_msec")) * 2) {
for (int i = current + 1; i < items.size(); i++) {
diff --git a/scene/gui/item_list.h b/scene/gui/item_list.h
index a80727f568..8166975408 100644
--- a/scene/gui/item_list.h
+++ b/scene/gui/item_list.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index cf7303cbe7..e1f77594da 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -85,7 +85,7 @@ void Label::_notification(int p_what) {
Size2 string_size;
Size2 size = get_size();
-
+ Ref<StyleBox> style = get_stylebox("normal");
Ref<Font> font = get_font("font");
Color font_color = get_color("font_color");
Color font_color_shadow = get_color("font_color_shadow");
@@ -93,6 +93,8 @@ void Label::_notification(int p_what) {
Point2 shadow_ofs(get_constant("shadow_offset_x"), get_constant("shadow_offset_y"));
int line_spacing = get_constant("line_spacing");
+ style->draw(ci, Rect2(Point2(0, 0), get_size()));
+
VisualServer::get_singleton()->canvas_item_set_distance_field_mode(get_canvas_item(), font.is_valid() && font->is_distance_field_hint());
int font_h = font->get_height() + line_spacing;
@@ -193,21 +195,20 @@ void Label::_notification(int p_what) {
case ALIGN_FILL:
case ALIGN_LEFT: {
- x_ofs = 0;
+ x_ofs = style->get_offset().x;
} break;
case ALIGN_CENTER: {
x_ofs = int(size.width - (taken + spaces * space_w)) / 2;
-
} break;
case ALIGN_RIGHT: {
- x_ofs = int(size.width - (taken + spaces * space_w));
-
+ x_ofs = int(size.width - style->get_margin(MARGIN_RIGHT) - (taken + spaces * space_w));
} break;
}
- int y_ofs = (line - lines_skipped) * font_h + font->get_ascent();
+ int y_ofs = style->get_offset().y;
+ y_ofs += (line - lines_skipped) * font_h + font->get_ascent();
y_ofs += vbegin + line * vsep;
while (from != to) {
@@ -288,8 +289,10 @@ void Label::_notification(int p_what) {
Size2 Label::get_minimum_size() const {
+ Size2 min_style = get_stylebox("normal")->get_minimum_size();
+
if (autowrap)
- return Size2(1, clip ? 1 : minsize.height);
+ return Size2(1, clip ? 1 : minsize.height) + min_style;
else {
// don't want to mutable everything
@@ -299,7 +302,7 @@ Size2 Label::get_minimum_size() const {
Size2 ms = minsize;
if (clip)
ms.width = 1;
- return ms;
+ return ms + min_style;
}
}
@@ -350,7 +353,7 @@ int Label::get_visible_line_count() const {
int line_spacing = get_constant("line_spacing");
int font_h = get_font("font")->get_height() + line_spacing;
- int lines_visible = (get_size().y + line_spacing) / font_h;
+ int lines_visible = (get_size().height - get_stylebox("normal")->get_minimum_size().height + line_spacing) / font_h;
if (lines_visible > line_count)
lines_visible = line_count;
@@ -370,7 +373,8 @@ void Label::regenerate_word_cache() {
memdelete(current);
}
- int width = autowrap ? get_size().width : get_longest_line_width();
+ Ref<StyleBox> style = get_stylebox("normal");
+ int width = autowrap ? (get_size().width - style->get_minimum_size().width) : get_longest_line_width();
Ref<Font> font = get_font("font");
int current_word_size = 0;
@@ -397,7 +401,7 @@ void Label::regenerate_word_cache() {
bool separatable = (current >= 0x2E08 && current <= 0xFAFF) || (current >= 0xFE30 && current <= 0xFE4F);
//current>=33 && (current < 65||current >90) && (current<97||current>122) && (current<48||current>57);
bool insert_newline = false;
- int char_width;
+ int char_width = 0;
if (current < 33) {
diff --git a/scene/gui/label.h b/scene/gui/label.h
index dce68f4422..7c1905af7d 100644
--- a/scene/gui/label.h
+++ b/scene/gui/label.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index c5360b0df0..66b4e6cec1 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index 7d04e4618b..52a4a29a33 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp
index 632e9ec4fc..9fe94fc464 100644
--- a/scene/gui/link_button.cpp
+++ b/scene/gui/link_button.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/link_button.h b/scene/gui/link_button.h
index 98a3dc66f6..386eb452ae 100644
--- a/scene/gui/link_button.h
+++ b/scene/gui/link_button.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/margin_container.cpp b/scene/gui/margin_container.cpp
index 2bc9db529b..14991f5d44 100644
--- a/scene/gui/margin_container.cpp
+++ b/scene/gui/margin_container.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -40,7 +40,7 @@ Size2 MarginContainer::get_minimum_size() const {
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
if (c->is_set_as_toplevel())
@@ -74,7 +74,7 @@ void MarginContainer::_notification(int p_what) {
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
if (c->is_set_as_toplevel())
diff --git a/scene/gui/margin_container.h b/scene/gui/margin_container.h
index 1cdb3a36cc..9703d9ebe0 100644
--- a/scene/gui/margin_container.h
+++ b/scene/gui/margin_container.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp
index 93284f2b6c..ac450616d6 100644
--- a/scene/gui/menu_button.cpp
+++ b/scene/gui/menu_button.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -33,7 +33,7 @@
void MenuButton::_unhandled_key_input(Ref<InputEvent> p_event) {
- if (p_event->is_pressed() && !p_event->is_echo() && (p_event->cast_to<InputEventKey>() || p_event->cast_to<InputEventJoypadButton>() || p_event->cast_to<InputEventAction>())) {
+ if (p_event->is_pressed() && !p_event->is_echo() && (Object::cast_to<InputEventKey>(p_event.ptr()) || Object::cast_to<InputEventJoypadButton>(p_event.ptr()) || Object::cast_to<InputEventAction>(*p_event))) {
if (!get_parent() || !is_visible_in_tree() || is_disabled())
return;
diff --git a/scene/gui/menu_button.h b/scene/gui/menu_button.h
index 6bb23452dd..c7f1d976ff 100644
--- a/scene/gui/menu_button.h
+++ b/scene/gui/menu_button.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 00df266a09..b4d0799945 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/option_button.h b/scene/gui/option_button.h
index db921b8b97..a06c540678 100644
--- a/scene/gui/option_button.h
+++ b/scene/gui/option_button.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/panel.cpp b/scene/gui/panel.cpp
index f3c6142f9e..536b655f75 100644
--- a/scene/gui/panel.cpp
+++ b/scene/gui/panel.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/panel.h b/scene/gui/panel.h
index eac8f2d4e8..cc7ca47319 100644
--- a/scene/gui/panel.h
+++ b/scene/gui/panel.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/panel_container.cpp b/scene/gui/panel_container.cpp
index 86874f7cfd..a0c75d1330 100644
--- a/scene/gui/panel_container.cpp
+++ b/scene/gui/panel_container.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -41,7 +41,7 @@ Size2 PanelContainer::get_minimum_size() const {
Size2 ms;
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c || !c->is_visible_in_tree())
continue;
if (c->is_set_as_toplevel())
@@ -90,7 +90,7 @@ void PanelContainer::_notification(int p_what) {
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c || !c->is_visible_in_tree())
continue;
if (c->is_set_as_toplevel())
diff --git a/scene/gui/panel_container.h b/scene/gui/panel_container.h
index f8f1fb6494..5d8f1ee64b 100644
--- a/scene/gui/panel_container.h
+++ b/scene/gui/panel_container.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/patch_9_rect.cpp b/scene/gui/patch_9_rect.cpp
index 71cbef495c..92c34dd3f9 100644
--- a/scene/gui/patch_9_rect.cpp
+++ b/scene/gui/patch_9_rect.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -61,7 +61,7 @@ void NinePatchRect::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_region_rect", "rect"), &NinePatchRect::set_region_rect);
ClassDB::bind_method(D_METHOD("get_region_rect"), &NinePatchRect::get_region_rect);
ClassDB::bind_method(D_METHOD("set_draw_center", "draw_center"), &NinePatchRect::set_draw_center);
- ClassDB::bind_method(D_METHOD("get_draw_center"), &NinePatchRect::get_draw_center);
+ ClassDB::bind_method(D_METHOD("is_draw_center_enabled"), &NinePatchRect::is_draw_center_enabled);
ClassDB::bind_method(D_METHOD("set_h_axis_stretch_mode", "mode"), &NinePatchRect::set_h_axis_stretch_mode);
ClassDB::bind_method(D_METHOD("get_h_axis_stretch_mode"), &NinePatchRect::get_h_axis_stretch_mode);
ClassDB::bind_method(D_METHOD("set_v_axis_stretch_mode", "mode"), &NinePatchRect::set_v_axis_stretch_mode);
@@ -70,7 +70,7 @@ void NinePatchRect::_bind_methods() {
ADD_SIGNAL(MethodInfo("texture_changed"));
ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_texture", "get_texture");
- ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "draw_center"), "set_draw_center", "get_draw_center");
+ ADD_PROPERTYNO(PropertyInfo(Variant::BOOL, "draw_center"), "set_draw_center", "is_draw_center_enabled");
ADD_PROPERTYNZ(PropertyInfo(Variant::RECT2, "region_rect"), "set_region_rect", "get_region_rect");
ADD_GROUP("Patch Margin", "patch_margin_");
@@ -151,13 +151,13 @@ Rect2 NinePatchRect::get_region_rect() const {
return region_rect;
}
-void NinePatchRect::set_draw_center(bool p_draw) {
+void NinePatchRect::set_draw_center(bool p_enabled) {
- draw_center = p_draw;
+ draw_center = p_enabled;
update();
}
-bool NinePatchRect::get_draw_center() const {
+bool NinePatchRect::is_draw_center_enabled() const {
return draw_center;
}
diff --git a/scene/gui/patch_9_rect.h b/scene/gui/patch_9_rect.h
index 636b9127e7..808b7a1f5d 100644
--- a/scene/gui/patch_9_rect.h
+++ b/scene/gui/patch_9_rect.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -67,8 +67,8 @@ public:
void set_region_rect(const Rect2 &p_region_rect);
Rect2 get_region_rect() const;
- void set_draw_center(bool p_draw);
- bool get_draw_center() const;
+ void set_draw_center(bool p_enabled);
+ bool is_draw_center_enabled() const;
void set_h_axis_stretch_mode(AxisStretchMode p_mode);
AxisStretchMode get_h_axis_stretch_mode() const;
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index 4725300a5f..5a2a552943 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -59,17 +59,10 @@ void Popup::_notification(int p_what) {
void Popup::_fix_size() {
-#if 0
- Point2 pos = get_position();
- Size2 size = get_size();
- Point2 window_size = window==this ? get_parent_area_size() :window->get_size();
-#else
-
Point2 pos = get_global_position();
Size2 size = get_size();
Point2 window_size = get_viewport_rect().size;
-#endif
if (pos.x + size.width > window_size.width)
pos.x = window_size.width - size.width;
if (pos.x < 0)
@@ -79,14 +72,8 @@ void Popup::_fix_size() {
pos.y = window_size.height - size.height;
if (pos.y < 0)
pos.y = 0;
-#if 0
- if (pos!=get_pos())
- set_position(pos);
-#else
if (pos != get_position())
set_global_position(pos);
-
-#endif
}
void Popup::set_as_minsize() {
@@ -95,7 +82,7 @@ void Popup::set_as_minsize() {
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
if (!c->is_visible())
@@ -129,7 +116,7 @@ void Popup::popup_centered_minsize(const Size2 &p_minsize) {
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
if (!c->is_visible())
diff --git a/scene/gui/popup.h b/scene/gui/popup.h
index 0543ae1937..6739c580f2 100644
--- a/scene/gui/popup.h
+++ b/scene/gui/popup.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index 1ba936c4e9..f3711b86b6 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -168,7 +168,7 @@ void PopupMenu::_activate_submenu(int over) {
Node *n = get_node(items[over].submenu);
ERR_EXPLAIN("item subnode does not exist: " + items[over].submenu);
ERR_FAIL_COND(!n);
- Popup *pm = n->cast_to<Popup>();
+ Popup *pm = Object::cast_to<Popup>(n);
ERR_EXPLAIN("item subnode is not a Popup: " + items[over].submenu);
ERR_FAIL_COND(!pm);
if (pm->is_visible_in_tree())
@@ -187,7 +187,7 @@ void PopupMenu::_activate_submenu(int over) {
pm->set_position(pos);
pm->popup();
- PopupMenu *pum = pm->cast_to<PopupMenu>();
+ PopupMenu *pum = Object::cast_to<PopupMenu>(pm);
if (pum) {
pr.position -= pum->get_global_position();
@@ -869,7 +869,7 @@ bool PopupMenu::activate_item_by_event(const Ref<InputEvent> &p_event, bool p_fo
if (!n)
continue;
- PopupMenu *pm = n->cast_to<PopupMenu>();
+ PopupMenu *pm = Object::cast_to<PopupMenu>(n);
if (!pm)
continue;
@@ -891,14 +891,14 @@ void PopupMenu::activate_item(int p_item) {
//hide all parent PopupMenue's
Node *next = get_parent();
- PopupMenu *pop = next->cast_to<PopupMenu>();
+ PopupMenu *pop = Object::cast_to<PopupMenu>(next);
while (pop) {
// We close all parents that are chained together,
// with hide_on_item_selection enabled
if ((items[p_item].checkable && hide_on_checkable_item_selection && pop->is_hide_on_checkable_item_selection()) || (!items[p_item].checkable && hide_on_item_selection && pop->is_hide_on_item_selection())) {
pop->hide();
next = next->get_parent();
- pop = next->cast_to<PopupMenu>();
+ pop = Object::cast_to<PopupMenu>(next);
} else {
// Break out of loop when the next parent has
// hide_on_item_selection disabled
diff --git a/scene/gui/popup_menu.h b/scene/gui/popup_menu.h
index 37714ee989..c9e9c8e311 100644
--- a/scene/gui/popup_menu.h
+++ b/scene/gui/popup_menu.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/progress_bar.cpp b/scene/gui/progress_bar.cpp
index 13d368d253..6953d03384 100644
--- a/scene/gui/progress_bar.cpp
+++ b/scene/gui/progress_bar.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/progress_bar.h b/scene/gui/progress_bar.h
index 1121a78aab..c5a9252123 100644
--- a/scene/gui/progress_bar.h
+++ b/scene/gui/progress_bar.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp
index 68afe8150a..1dbec6e5a1 100644
--- a/scene/gui/range.cpp
+++ b/scene/gui/range.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -170,7 +170,7 @@ double Range::get_as_ratio() const {
void Range::_share(Node *p_range) {
- Range *r = p_range->cast_to<Range>();
+ Range *r = Object::cast_to<Range>(p_range);
ERR_FAIL_COND(!r);
share(r);
}
diff --git a/scene/gui/range.h b/scene/gui/range.h
index fdcbbb09ee..daa8af824a 100644
--- a/scene/gui/range.h
+++ b/scene/gui/range.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/reference_rect.cpp b/scene/gui/reference_rect.cpp
index 441c3e721b..e2f4abe04a 100644
--- a/scene/gui/reference_rect.cpp
+++ b/scene/gui/reference_rect.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/reference_rect.h b/scene/gui/reference_rect.h
index b118425eb6..9b826a1145 100644
--- a/scene/gui/reference_rect.h
+++ b/scene/gui/reference_rect.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index f0efbdc517..a3f116c883 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/rich_text_label.h b/scene/gui/rich_text_label.h
index 71fa766958..74bf180b5d 100644
--- a/scene/gui/rich_text_label.h
+++ b/scene/gui/rich_text_label.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp
index 4242ee4523..16d1b320b7 100644
--- a/scene/gui/scroll_bar.cpp
+++ b/scene/gui/scroll_bar.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,9 +28,11 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "scroll_bar.h"
+
#include "os/keyboard.h"
#include "os/os.h"
#include "print_string.h"
+
bool ScrollBar::focus_by_default = false;
void ScrollBar::set_can_focus_by_default(bool p_can_focus) {
@@ -315,7 +317,7 @@ void ScrollBar::_notification(int p_what) {
if (has_node(drag_slave_path)) {
Node *n = get_node(drag_slave_path);
- drag_slave = n->cast_to<Control>();
+ drag_slave = Object::cast_to<Control>(n);
}
if (drag_slave) {
@@ -663,7 +665,7 @@ void ScrollBar::set_drag_slave(const NodePath &p_path) {
if (has_node(p_path)) {
Node *n = get_node(p_path);
- drag_slave = n->cast_to<Control>();
+ drag_slave = Object::cast_to<Control>(n);
}
if (drag_slave) {
@@ -686,138 +688,6 @@ bool ScrollBar::is_smooth_scroll_enabled() const {
return smooth_scroll_enabled;
}
-#if 0
-
-void ScrollBar::mouse_button(const Point2& p_pos, int b->get_button_index(),bool b->is_pressed(),int p_modifier_mask) {
-
- // wheel!
-
- if (b->get_button_index()==BUTTON_WHEEL_UP && b->is_pressed()) {
-
- if (orientation==VERTICAL)
- set_val( get_val() - get_page() / 4.0 );
- else
- set_val( get_val() + get_page() / 4.0 );
-
- }
- if (b->get_button_index()==BUTTON_WHEEL_DOWN && b->is_pressed()) {
-
- if (orientation==HORIZONTAL)
- set_val( get_val() - get_page() / 4.0 );
- else
- set_val( get_val() + get_page() / 4.0 );
- }
-
- if (b->get_button_index()!=BUTTON_LEFT)
- return;
-
- if (b->is_pressed()) {
-
- int ofs = orientation==VERTICAL ? p_pos.y : p_pos.x ;
- int grabber_ofs = get_grabber_offset();
- int grabber_size = get_grabber_size();
-
- if ( ofs < grabber_ofs ) {
-
- set_val( get_val() - get_page() );
-
- } else if (ofs > grabber_ofs + grabber_size ) {
-
- set_val( get_val() + get_page() );
-
- } else {
-
-
- drag.active=true;
- drag.pos_at_click=get_click_pos(p_pos);
- drag.value_at_click=get_unit_value();
- }
-
-
- } else {
-
- drag.active=false;
- }
-
-}
-void ScrollBar::mouse_motion(const Point2& p_pos, const Point2& p_rel, int b->get_button_index()_mask) {
-
- if (!drag.active)
- return;
-
- double value_ofs=drag.value_at_click+(get_click_pos(p_pos)-drag.pos_at_click);
-
-
- value_ofs=value_ofs*( get_max() - get_min() );
- if (value_ofs<get_min())
- value_ofs=get_min();
- if (value_ofs>(get_max()-get_page()))
- value_ofs=get_max()-get_page();
- if (get_val()==value_ofs)
- return; //don't bother if the value is the same
-
- set_val( value_ofs );
-
-}
-
-bool ScrollBar::key(unsigned long p_unicode, unsigned long p_scan_code,bool b->is_pressed(),bool p_repeat,int p_modifier_mask) {
-
- if (!b->is_pressed())
- return false;
-
- switch (p_scan_code) {
-
- case KEY_LEFT: {
-
- if (orientation!=HORIZONTAL)
- return false;
- set_val( get_val() - get_step() );
-
- } break;
- case KEY_RIGHT: {
-
- if (orientation!=HORIZONTAL)
- return false;
- set_val( get_val() + get_step() );
-
- } break;
- case KEY_UP: {
-
- if (orientation!=VERTICAL)
- return false;
-
- set_val( get_val() - get_step() );
-
-
- } break;
- case KEY_DOWN: {
-
- if (orientation!=VERTICAL)
- return false;
- set_val( get_val() + get_step() );
-
- } break;
- case KEY_HOME: {
-
- set_val( get_min() );
-
- } break;
- case KEY_END: {
-
- set_val( get_max() );
-
- } break;
-
- default:
- return false;
-
- }
-
- return true;
-}
-
-#endif
-
void ScrollBar::_bind_methods() {
ClassDB::bind_method(D_METHOD("_gui_input"), &ScrollBar::_gui_input);
diff --git a/scene/gui/scroll_bar.h b/scene/gui/scroll_bar.h
index e22d4da46d..373483a8a0 100644
--- a/scene/gui/scroll_bar.h
+++ b/scene/gui/scroll_bar.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index 939bdd8d0c..e182e491d3 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -40,7 +40,7 @@ Size2 ScrollContainer::get_minimum_size() const {
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
if (c->is_set_as_toplevel())
@@ -220,7 +220,7 @@ void ScrollContainer::_notification(int p_what) {
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
if (c->is_set_as_toplevel())
@@ -423,7 +423,7 @@ String ScrollContainer::get_configuration_warning() const {
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c)
continue;
if (c->is_set_as_toplevel())
diff --git a/scene/gui/scroll_container.h b/scene/gui/scroll_container.h
index e5df3e5e1c..9076be0d72 100644
--- a/scene/gui/scroll_container.h
+++ b/scene/gui/scroll_container.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/separator.cpp b/scene/gui/separator.cpp
index 3b00ab4605..3db234f7cc 100644
--- a/scene/gui/separator.cpp
+++ b/scene/gui/separator.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/separator.h b/scene/gui/separator.h
index 9a5fe2ac66..be2f1e8e77 100644
--- a/scene/gui/separator.h
+++ b/scene/gui/separator.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/input_action.cpp b/scene/gui/shortcut.cpp
index c08059a049..f37410e77b 100644
--- a/scene/gui/input_action.cpp
+++ b/scene/gui/shortcut.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* input_action.cpp */
+/* shortcut.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -27,7 +27,8 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "input_action.h"
+#include "shortcut.h"
+
#include "os/keyboard.h"
void ShortCut::set_shortcut(const Ref<InputEvent> &p_shortcut) {
@@ -52,61 +53,6 @@ String ShortCut::get_as_text() const {
return shortcut->as_text();
else
return "None";
-#if 0
- switch (shortcut.type) {
-
- case Ref<InputEvent>::NONE: {
-
- return "None";
- } break;
- case Ref<InputEvent>::KEY: {
-
- String str;
- if (shortcut->get_shift())
- str += RTR("Shift+");
- if (shortcut->get_alt())
- str += RTR("Alt+");
- if (shortcut->get_control())
- str += RTR("Ctrl+");
- if (shortcut->get_metakey())
- str += RTR("Meta+");
-
- str += keycode_get_string(shortcut->get_scancode()).capitalize();
-
- return str;
- } break;
- case Ref<InputEvent>::JOYPAD_BUTTON: {
-
- String str = RTR("Device") + " " + itos(shortcut.device) + ", " + RTR("Button") + " " + itos(shortcut.joy_button->get_button_index());
- str += ".";
-
- return str;
- } break;
- case Ref<InputEvent>::MOUSE_BUTTON: {
-
- String str = RTR("Device") + " " + itos(shortcut.device) + ", ";
- switch (shortcut->get_button_index()) {
- case BUTTON_LEFT: str += RTR("Left Button."); break;
- case BUTTON_RIGHT: str += RTR("Right Button."); break;
- case BUTTON_MIDDLE: str += RTR("Middle Button."); break;
- case BUTTON_WHEEL_UP: str += RTR("Wheel Up."); break;
- case BUTTON_WHEEL_DOWN: str += RTR("Wheel Down."); break;
- default: str += RTR("Button") + " " + itos(shortcut->get_button_index()) + ".";
- }
-
- return str;
- } break;
- case Ref<InputEvent>::JOYPAD_MOTION: {
-
- int ax = shortcut.joy_motion.axis;
- String str = RTR("Device") + " " + itos(shortcut.device) + ", " + RTR("Axis") + " " + itos(ax) + ".";
-
- return str;
- } break;
- }
-
- return "";
-#endif
}
bool ShortCut::is_valid() const {
diff --git a/scene/gui/input_action.h b/scene/gui/shortcut.h
index 5c91d2be28..8d85bb920f 100644
--- a/scene/gui/input_action.h
+++ b/scene/gui/shortcut.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* input_action.h */
+/* shortcut.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -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 INPUTACTION_H
-#define INPUTACTION_H
+#ifndef SHORTCUT_H
+#define SHORTCUT_H
#include "os/input_event.h"
#include "resource.h"
@@ -53,4 +53,4 @@ public:
ShortCut();
};
-#endif // INPUTACTION_H
+#endif // SHORTCUT_H
diff --git a/scene/gui/slider.cpp b/scene/gui/slider.cpp
index 9ba17ce34f..4661f54526 100644
--- a/scene/gui/slider.cpp
+++ b/scene/gui/slider.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/slider.h b/scene/gui/slider.h
index f3cf3c6f48..a2334a69fc 100644
--- a/scene/gui/slider.h
+++ b/scene/gui/slider.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index 751edc5a43..f462989f53 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/spin_box.h b/scene/gui/spin_box.h
index 683ed0c344..0c562bd744 100644
--- a/scene/gui/spin_box.h
+++ b/scene/gui/spin_box.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/split_container.cpp b/scene/gui/split_container.cpp
index 5fc3db4672..4420a936d2 100644
--- a/scene/gui/split_container.cpp
+++ b/scene/gui/split_container.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -44,7 +44,7 @@ Control *SplitContainer::_getch(int p_idx) const {
int idx = 0;
for (int i = 0; i < get_child_count(); i++) {
- Control *c = get_child(i)->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(get_child(i));
if (!c || !c->is_visible_in_tree())
continue;
if (c->is_set_as_toplevel())
diff --git a/scene/gui/split_container.h b/scene/gui/split_container.h
index 87a210f24c..8ec21b5eaa 100644
--- a/scene/gui/split_container.h
+++ b/scene/gui/split_container.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/tab_container.cpp b/scene/gui/tab_container.cpp
index d32b899de7..461ae3444b 100644
--- a/scene/gui/tab_container.cpp
+++ b/scene/gui/tab_container.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -230,7 +230,7 @@ void TabContainer::_notification(int p_what) {
tab_style->draw(canvas, tab_rect);
// Draw the tab contents.
- Control *control = tabs[i + first_tab_cache]->cast_to<Control>();
+ Control *control = Object::cast_to<Control>(tabs[i + first_tab_cache]);
String text = control->has_meta("_tab_name") ? String(tr(String(control->get_meta("_tab_name")))) : String(control->get_name());
int x_content = tab_rect.position.x + tab_style->get_margin(MARGIN_LEFT);
@@ -293,7 +293,7 @@ void TabContainer::_notification(int p_what) {
}
int TabContainer::_get_tab_width(int p_index) const {
- Control *control = _get_tabs()[p_index]->cast_to<Control>();
+ Control *control = Object::cast_to<Control>(_get_tabs()[p_index]);
if (!control || control->is_set_as_toplevel())
return 0;
@@ -332,7 +332,7 @@ Vector<Control *> TabContainer::_get_tabs() const {
Vector<Control *> controls;
for (int i = 0; i < get_child_count(); i++) {
- Control *control = get_child(i)->cast_to<Control>();
+ Control *control = Object::cast_to<Control>(get_child(i));
if (!control || control->is_toplevel_control())
continue;
@@ -350,7 +350,7 @@ void TabContainer::add_child_notify(Node *p_child) {
Control::add_child_notify(p_child);
- Control *c = p_child->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(p_child);
if (!c)
return;
if (c->is_set_as_toplevel())
@@ -616,7 +616,7 @@ Size2 TabContainer::get_minimum_size() const {
void TabContainer::set_popup(Node *p_popup) {
ERR_FAIL_NULL(p_popup);
- popup = p_popup->cast_to<Popup>();
+ popup = Object::cast_to<Popup>(p_popup);
update();
}
diff --git a/scene/gui/tab_container.h b/scene/gui/tab_container.h
index 3e1a2c1598..be59a16b3f 100644
--- a/scene/gui/tab_container.h
+++ b/scene/gui/tab_container.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp
index b0dc88bbb4..085f6de6b8 100644
--- a/scene/gui/tabs.cpp
+++ b/scene/gui/tabs.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/tabs.h b/scene/gui/tabs.h
index 86ad128dcd..73fa40bbb8 100644
--- a/scene/gui/tabs.h
+++ b/scene/gui/tabs.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 245e7e04be..ade665b418 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -27,13 +27,12 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-
#include "text_edit.h"
+
+#include "message_queue.h"
#include "os/input.h"
#include "os/keyboard.h"
#include "os/os.h"
-
-#include "message_queue.h"
#include "project_settings.h"
#include "scene/main/viewport.h"
@@ -215,8 +214,8 @@ void TextEdit::Text::_update_line_cache(int p_line) const {
const Map<int, TextEdit::Text::ColorRegionInfo> &TextEdit::Text::get_color_region_info(int p_line) {
- Map<int, ColorRegionInfo> *cri = NULL;
- ERR_FAIL_INDEX_V(p_line, text.size(), *cri); //enjoy your crash
+ static Map<int, ColorRegionInfo> cri;
+ ERR_FAIL_INDEX_V(p_line, text.size(), cri);
if (text[p_line].width_cache == -1) {
_update_line_cache(p_line);
@@ -431,7 +430,7 @@ void TextEdit::_notification(int p_what) {
double dist = sqrt(target_y * target_y);
double vel = ((target_y / dist) * v_scroll_speed) * get_fixed_process_delta_time();
- if (vel >= dist) {
+ if (Math::abs(vel) >= dist) {
v_scroll->set_value(target_v_scroll);
scrolling = false;
set_fixed_process(false);
@@ -2114,7 +2113,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
//keep indentation
int space_count = 0;
- for (int i = 0; i < text[cursor.line].length(); i++) {
+ for (int i = 0; i < cursor.column; i++) {
if (text[cursor.line][i] == '\t') {
if (indent_using_spaces) {
ins += space_indent;
@@ -2736,6 +2735,15 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
else
undo();
} break;
+ case KEY_Y: {
+
+ if (!k->get_command()) {
+ scancode_handled = false;
+ break;
+ }
+
+ redo();
+ } break;
case KEY_V: {
if (readonly) {
break;
@@ -3181,6 +3189,11 @@ void TextEdit::adjust_viewport_to_cursor() {
if (cursor.line < cursor.line_ofs)
cursor.line_ofs = cursor.line;
+ if (cursor.line_ofs + visible_rows > text.size() && !scroll_past_end_of_file_enabled) {
+ cursor.line_ofs = text.size() - visible_rows;
+ v_scroll->set_value(text.size() - visible_rows);
+ }
+
int cursor_x = get_column_x_offset(cursor.column, text[cursor.line]);
if (cursor_x > (cursor.x_ofs + visible_width))
@@ -3653,10 +3666,10 @@ void TextEdit::cut() {
String clipboard = _base_get_text(selection.from_line, selection.from_column, selection.to_line, selection.to_column);
OS::get_singleton()->set_clipboard(clipboard);
- cursor_set_line(selection.from_line);
+ _remove_text(selection.from_line, selection.from_column, selection.to_line, selection.to_column);
+ cursor_set_line(selection.from_line); // set afterwards else it causes the view to be offset
cursor_set_column(selection.from_column);
- _remove_text(selection.from_line, selection.from_column, selection.to_line, selection.to_column);
selection.active = false;
selection.selecting_mode = Selection::MODE_NONE;
update();
@@ -4319,6 +4332,7 @@ void TextEdit::_cancel_completion() {
return;
completion_active = false;
+ completion_forced = false;
update();
}
@@ -4386,13 +4400,19 @@ void TextEdit::_update_completion_candidates() {
}
}
- if (cursor.column > 0 && l[cursor.column - 1] == '(' && !pre_keyword && !completion_strings[0].begins_with("\"")) {
+ if (cursor.column > 0 && l[cursor.column - 1] == '(' && !pre_keyword && !completion_forced) {
cancel = true;
}
update();
- if (cancel || (!pre_keyword && s == "" && (cofs == 0 || !completion_prefixes.has(String::chr(l[cofs - 1]))))) {
+ bool prev_is_prefix = false;
+ if (cofs > 0 && completion_prefixes.has(String::chr(l[cofs - 1])))
+ prev_is_prefix = true;
+ if (cofs > 1 && l[cofs - 1] == ' ' && completion_prefixes.has(String::chr(l[cofs - 2]))) //check with one space before prefix, to allow indent
+ prev_is_prefix = true;
+
+ if (cancel || (!pre_keyword && s == "" && (cofs == 0 || !prev_is_prefix))) {
//none to complete, cancel
_cancel_completion();
return;
@@ -4450,18 +4470,6 @@ void TextEdit::_update_completion_candidates() {
// The top of the list is the best match
completion_current = completion_options[0];
-
-#if 0 // even there's only one option, user still get the chance to choose using it or not
- if (completion_options.size()==1) {
- //one option to complete, just complete it automagically
- _confirm_completion();
- //insert_text_at_cursor(completion_options[0].substr(s.length(),completion_options[0].length()-s.length()));
- _cancel_completion();
- return;
-
- }
-#endif
-
completion_enabled = true;
}
@@ -4481,6 +4489,8 @@ void TextEdit::query_code_comple() {
if (ofs > 0 && (inquote || _is_completable(l[ofs - 1]) || completion_prefixes.has(String::chr(l[ofs - 1]))))
emit_signal("request_completion");
+ else if (ofs > 1 && l[ofs - 1] == ' ' && completion_prefixes.has(String::chr(l[ofs - 2]))) //make it work with a space too, it's good enough
+ emit_signal("request_completion");
}
void TextEdit::set_code_hint(const String &p_hint) {
@@ -4492,12 +4502,13 @@ void TextEdit::set_code_hint(const String &p_hint) {
update();
}
-void TextEdit::code_complete(const Vector<String> &p_strings) {
+void TextEdit::code_complete(const Vector<String> &p_strings, bool p_forced) {
VisualServer::get_singleton()->canvas_item_set_z(get_canvas_item(), 1);
raised_from_completion = true;
completion_strings = p_strings;
completion_active = true;
+ completion_forced = p_forced;
completion_current = "";
completion_index = 0;
_update_completion_candidates();
@@ -4520,7 +4531,7 @@ String TextEdit::get_word_at_pos(const Vector2 &p_pos) const {
bool symbol = beg < s.length() && _is_symbol(s[beg]); //not sure if right but most editors behave like this
bool inside_quotes = false;
- int qbegin, qend;
+ int qbegin = 0, qend = 0;
for (int i = 0; i < s.length(); i++) {
if (s[i] == '"') {
if (inside_quotes) {
@@ -4885,24 +4896,6 @@ TextEdit::TextEdit() {
click_select_held->set_wait_time(0.05);
click_select_held->connect("timeout", this, "_click_selection_held");
-#if 0
- syntax_coloring=true;
- keywords["void"]=Color(0.3,0.0,0.1);
- keywords["int"]=Color(0.3,0.0,0.1);
- keywords["function"]=Color(0.3,0.0,0.1);
- keywords["class"]=Color(0.3,0.0,0.1);
- keywords["extends"]=Color(0.3,0.0,0.1);
- keywords["constructor"]=Color(0.3,0.0,0.1);
- symbol_color=Color(0.1,0.0,0.3,1.0);
-
- color_regions.push_back(ColorRegion("/*","*/",Color(0.4,0.6,0,4)));
- color_regions.push_back(ColorRegion("//","",Color(0.6,0.6,0.4)));
- color_regions.push_back(ColorRegion("\"","\"",Color(0.4,0.7,0.7)));
- color_regions.push_back(ColorRegion("'","'",Color(0.4,0.8,0.8)));
- color_regions.push_back(ColorRegion("#","",Color(0.2,1.0,0.2)));
-
-#endif
-
current_op.type = TextOperation::TYPE_NONE;
undo_enabled = true;
undo_stack_pos = NULL;
diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h
index 6321cad2da..68ef559f46 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -205,6 +205,7 @@ class TextEdit : public Control {
Vector<String> completion_strings;
Vector<String> completion_options;
bool completion_active;
+ bool completion_forced;
String completion_current;
String completion_base;
int completion_index;
@@ -522,7 +523,7 @@ public:
void set_tooltip_request_func(Object *p_obj, const StringName &p_function, const Variant &p_udata);
void set_completion(bool p_enabled, const Vector<String> &p_prefixes);
- void code_complete(const Vector<String> &p_strings);
+ void code_complete(const Vector<String> &p_strings, bool p_forced = false);
void set_code_hint(const String &p_hint);
void query_code_comple();
diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp
index d307b463d9..77bc876201 100644
--- a/scene/gui/texture_button.cpp
+++ b/scene/gui/texture_button.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/texture_button.h b/scene/gui/texture_button.h
index 8df30cd35a..94f372decf 100644
--- a/scene/gui/texture_button.h
+++ b/scene/gui/texture_button.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp
index 59cff84719..aad7c6b96b 100644
--- a/scene/gui/texture_progress.cpp
+++ b/scene/gui/texture_progress.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/texture_progress.h b/scene/gui/texture_progress.h
index 20546bd11f..04096d35e3 100644
--- a/scene/gui/texture_progress.h
+++ b/scene/gui/texture_progress.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/texture_rect.cpp b/scene/gui/texture_rect.cpp
index db340fd4d7..38f90fe7b5 100644
--- a/scene/gui/texture_rect.cpp
+++ b/scene/gui/texture_rect.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/texture_rect.h b/scene/gui/texture_rect.h
index dcc6c3f9bd..8a2b715488 100644
--- a/scene/gui/texture_rect.h
+++ b/scene/gui/texture_rect.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/tool_button.cpp b/scene/gui/tool_button.cpp
index 5fc4b6ecf8..4dfa3d8f37 100644
--- a/scene/gui/tool_button.cpp
+++ b/scene/gui/tool_button.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/tool_button.h b/scene/gui/tool_button.h
index d243b5559f..4c5ea685de 100644
--- a/scene/gui/tool_button.h
+++ b/scene/gui/tool_button.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 20bf818d44..5e15bceb7d 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "tree.h"
+
#include "os/input.h"
#include "os/keyboard.h"
#include "os/os.h"
@@ -990,41 +991,10 @@ void Tree::draw_item_rect(const TreeItem::Cell &p_cell, const Rect2i &p_rect, co
rect.size.x -= bmsize.x + cache.hseparation;
}
- /*
- if (p_tool)
- rect.size.x-=Math::floor(rect.size.y/2);
- */
-
rect.position.y += Math::floor((rect.size.y - font->get_height()) / 2.0) + font->get_ascent();
font->draw(ci, rect.position, text, p_color, rect.size.x);
}
-#if 0
-void Tree::draw_item_text(String p_text,const Ref<Texture>& p_icon,int p_icon_max_w,bool p_tool,Rect2i p_rect,const Color& p_color) {
-
- RID ci = get_canvas_item();
- if (!p_icon.is_null()) {
- Size2i bmsize = p_icon->get_size();
- if (p_icon_max_w>0 && bmsize.width > p_icon_max_w) {
- bmsize.height = bmsize.height * p_icon_max_w / bmsize.width;
- bmsize.width=p_icon_max_w;
- }
-
- draw_texture_rect(p_icon,Rect2(p_rect.pos + Size2i(0,Math::floor((p_rect.size.y-bmsize.y)/2)),bmsize));
- p_rect.pos.x+=bmsize.x+cache.hseparation;
- p_rect.size.x-=bmsize.x+cache.hseparation;
-
- }
-
- if (p_tool)
- p_rect.size.x-=Math::floor(p_rect.size.y/2);
-
- Ref<Font> font = cache.font;
-
- p_rect.pos.y+=Math::floor((p_rect.size.y-font->get_height())/2.0) +font->get_ascent();
- font->draw(ci,p_rect.pos,p_text,p_color,p_rect.size.x);
-}
-#endif
int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2 &p_draw_size, TreeItem *p_item) {
if (p_pos.y - cache.offset.y > (p_draw_size.height))
@@ -2473,22 +2443,24 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
Point2 pos = b->get_position() - bg->get_offset();
cache.click_type = Cache::CLICK_NONE;
- if (show_column_titles && b->get_button_index() == BUTTON_LEFT) {
+ if (show_column_titles) {
pos.y -= _get_title_button_height();
if (pos.y < 0) {
- pos.x += cache.offset.x;
- int len = 0;
- for (int i = 0; i < columns.size(); i++) {
-
- len += get_column_width(i);
- if (pos.x < len) {
-
- cache.click_type = Cache::CLICK_TITLE;
- cache.click_index = i;
- //cache.click_id=;
- update();
- break;
+ if (b->get_button_index() == BUTTON_LEFT) {
+ pos.x += cache.offset.x;
+ int len = 0;
+ for (int i = 0; i < columns.size(); i++) {
+
+ len += get_column_width(i);
+ if (pos.x < len) {
+
+ cache.click_type = Cache::CLICK_TITLE;
+ cache.click_index = i;
+ //cache.click_id=;
+ update();
+ break;
+ }
}
}
break;
@@ -2868,8 +2840,8 @@ TreeItem *Tree::create_item(TreeItem *p_parent) {
TreeItem *ti = memnew(TreeItem(this));
- ti->cells.resize(columns.size());
ERR_FAIL_COND_V(!ti, NULL);
+ ti->cells.resize(columns.size());
if (p_parent) {
diff --git a/scene/gui/tree.h b/scene/gui/tree.h
index 49a410f115..06d6d3ad5a 100644
--- a/scene/gui/tree.h
+++ b/scene/gui/tree.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -54,7 +54,7 @@ public:
CELL_MODE_CHECK, ///< string + check
CELL_MODE_RANGE, ///< Contains a range
CELL_MODE_RANGE_EXPRESSION, ///< Contains a range
- CELL_MODE_ICON, ///< Contains a icon, not editable
+ CELL_MODE_ICON, ///< Contains an icon, not editable
CELL_MODE_CUSTOM, ///< Contains a custom value, show a string, and an edit button
};
@@ -172,7 +172,9 @@ protected:
return d;
}
- void _remove_child(Object *p_child) { remove_child(p_child->cast_to<TreeItem>()); }
+ void _remove_child(Object *p_child) {
+ remove_child(Object::cast_to<TreeItem>(p_child));
+ }
public:
/* cell mode */
@@ -504,9 +506,17 @@ protected:
static void _bind_methods();
//bind helpers
- Object *_create_item(Object *p_parent) { return create_item(p_parent->cast_to<TreeItem>()); }
- TreeItem *_get_next_selected(Object *p_item) { return get_next_selected(p_item->cast_to<TreeItem>()); }
- Rect2 _get_item_rect(Object *p_item, int p_column) const { return get_item_rect(p_item->cast_to<TreeItem>(), p_column); }
+ Object *_create_item(Object *p_parent) {
+ return create_item(Object::cast_to<TreeItem>(p_parent));
+ }
+
+ TreeItem *_get_next_selected(Object *p_item) {
+ return get_next_selected(Object::cast_to<TreeItem>(p_item));
+ }
+
+ Rect2 _get_item_rect(Object *p_item, int p_column) const {
+ return get_item_rect(Object::cast_to<TreeItem>(p_item), p_column);
+ }
public:
virtual String get_tooltip(const Point2 &p_pos) const;
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp
index 37d10fb63e..a92155cc4f 100644
--- a/scene/gui/video_player.cpp
+++ b/scene/gui/video_player.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,27 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "video_player.h"
+
#include "os/os.h"
#include "servers/audio_server.h"
-/*
-
-int VideoPlayer::InternalStream::get_channel_count() const {
-
- return player->sp_get_channel_count();
-}
-void VideoPlayer::InternalStream::set_mix_rate(int p_rate){
-
- return player->sp_set_mix_rate(p_rate);
-}
-bool VideoPlayer::InternalStream::mix(int32_t *p_buffer,int p_frames){
-
- return player->sp_mix(p_buffer,p_frames);
-}
-void VideoPlayer::InternalStream::update(){
-
- player->sp_update();
-}
-*/
int VideoPlayer::sp_get_channel_count() const {
@@ -69,31 +51,6 @@ bool VideoPlayer::sp_mix(int32_t *p_buffer, int p_frames) {
return false;
}
-void VideoPlayer::sp_update() {
-#if 0
- _THREAD_SAFE_METHOD_
- //update is unused
- if (!paused && playback.is_valid()) {
-
- if (!playback->is_playing()) {
- //stream depleted data, but there's still audio in the ringbuffer
- //check that all this audio has been flushed before stopping the stream
- int to_mix = resampler.get_total() - resampler.get_todo();
- if (to_mix==0) {
- stop();
- return;
- }
-
- return;
- }
-
- int todo =resampler.get_todo();
- int wrote = playback->mix(resampler.get_write_buffer(),todo);
- resampler.write(wrote);
- }
-#endif
-}
-
int VideoPlayer::_audio_mix_callback(void *p_udata, const int16_t *p_data, int p_frames) {
VideoPlayer *vp = (VideoPlayer *)p_udata;
diff --git a/scene/gui/video_player.h b/scene/gui/video_player.h
index 87c452509b..b78f3aabe7 100644
--- a/scene/gui/video_player.h
+++ b/scene/gui/video_player.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -38,23 +38,12 @@ class VideoPlayer : public Control {
GDCLASS(VideoPlayer, Control);
- /* struct InternalStream : public AudioServer::AudioStream {
- VideoPlayer *player;
- virtual int get_channel_count() const;
- virtual void set_mix_rate(int p_rate); //notify the stream of the mix rate
- virtual bool mix(int32_t *p_buffer,int p_frames);
- virtual void update();
- };
-*/
-
- // InternalStream internal_stream;
Ref<VideoStreamPlayback> playback;
Ref<VideoStream> stream;
int sp_get_channel_count() const;
void sp_set_mix_rate(int p_rate); //notify the stream of the mix rate
bool sp_mix(int32_t *p_buffer, int p_frames);
- void sp_update();
RID stream_rid;
@@ -118,4 +107,4 @@ public:
~VideoPlayer();
};
-#endif
+#endif // VIDEO_PLAYER_H
diff --git a/scene/gui/viewport_container.cpp b/scene/gui/viewport_container.cpp
index dbc2699867..c321b873fd 100644
--- a/scene/gui/viewport_container.cpp
+++ b/scene/gui/viewport_container.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -38,7 +38,7 @@ Size2 ViewportContainer::get_minimum_size() const {
Size2 ms;
for (int i = 0; i < get_child_count(); i++) {
- Viewport *c = get_child(i)->cast_to<Viewport>();
+ Viewport *c = Object::cast_to<Viewport>(get_child(i));
if (!c)
continue;
@@ -71,7 +71,7 @@ void ViewportContainer::_notification(int p_what) {
for (int i = 0; i < get_child_count(); i++) {
- Viewport *c = get_child(i)->cast_to<Viewport>();
+ Viewport *c = Object::cast_to<Viewport>(get_child(i));
if (!c)
continue;
@@ -83,7 +83,7 @@ void ViewportContainer::_notification(int p_what) {
for (int i = 0; i < get_child_count(); i++) {
- Viewport *c = get_child(i)->cast_to<Viewport>();
+ Viewport *c = Object::cast_to<Viewport>(get_child(i));
if (!c)
continue;
@@ -98,7 +98,7 @@ void ViewportContainer::_notification(int p_what) {
for (int i = 0; i < get_child_count(); i++) {
- Viewport *c = get_child(i)->cast_to<Viewport>();
+ Viewport *c = Object::cast_to<Viewport>(get_child(i));
if (!c)
continue;
diff --git a/scene/gui/viewport_container.h b/scene/gui/viewport_container.h
index 27eb6ec81b..630523b5fb 100644
--- a/scene/gui/viewport_container.h
+++ b/scene/gui/viewport_container.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/io/SCsub b/scene/io/SCsub
deleted file mode 100644
index bf9125be7f..0000000000
--- a/scene/io/SCsub
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env python
-
-Import('env')
-
-env.add_source_files(env.scene_sources, "*.cpp")
-
-Export('env')
diff --git a/scene/io/resource_format_image.cpp b/scene/io/resource_format_image.cpp
deleted file mode 100644
index 04b6177c3c..0000000000
--- a/scene/io/resource_format_image.cpp
+++ /dev/null
@@ -1,266 +0,0 @@
-/*************************************************************************/
-/* resource_format_image.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "resource_format_image.h"
-
-#if 0
-#include "io/image_loader.h"
-#include "os/os.h"
-#include "project_settings.h"
-#include "scene/resources/texture.h"
-RES ResourceFormatLoaderImage::load(const String &p_path, const String& p_original_path, Error *r_error) {
-
- if (r_error)
- *r_error=ERR_CANT_OPEN;
-
- if (p_path.get_extension()=="cube") {
- // open as cubemap txture
-
- CubeMap* ptr = memnew(CubeMap);
- Ref<CubeMap> cubemap( ptr );
-
- Error err;
- FileAccess *f = FileAccess::open(p_path,FileAccess::READ,&err);
- if (err) {
-
- ERR_FAIL_COND_V( err, RES() );
- }
-
- String base_path=p_path.substr( 0, p_path.find_last("/")+1 );
-
- for(int i=0;i<6;i++) {
-
- String file = f->get_line().strip_edges();
- Image image;
-
- Error err = ImageLoader::load_image(base_path+file,&image);
-
-
- if (err) {
-
- memdelete(f);
- ERR_FAIL_COND_V( err, RES() );
- }
-
- if (i==0) {
-
- //cubemap->create(image.get_width(),image.get_height(),image.get_format(),Texture::FLAGS_DEFAULT|Texture::FLAG_CUBEMAP);
- }
-
- static const CubeMap::Side cube_side[6]= {
- CubeMap::SIDE_LEFT,
- CubeMap::SIDE_RIGHT,
- CubeMap::SIDE_BOTTOM,
- CubeMap::SIDE_TOP,
- CubeMap::SIDE_FRONT,
- CubeMap::SIDE_BACK
- };
-
- cubemap->set_side(cube_side[i],image);
- }
-
- memdelete(f);
-
- cubemap->set_name(p_path.get_file());
- if (r_error)
- *r_error=OK;
-
- return cubemap;
-
- } else {
- // simple image
-
- ImageTexture* ptr = memnew(ImageTexture);
- Ref<ImageTexture> texture( ptr );
-
- uint64_t begtime;
- double total;
-
- Image image;
-
- if (debug_load_times)
- begtime=OS::get_singleton()->get_ticks_usec();
-
-
- Error err = ImageLoader::load_image(p_path,&image);
-
- if (!err && debug_load_times) {
- double total=USEC_TO_SEC((OS::get_singleton()->get_ticks_usec()-begtime));
- print_line("IMAGE: "+itos(image.get_width())+"x"+itos(image.get_height()));
- print_line(" -load: "+rtos(total));
- }
-
-
- ERR_EXPLAIN("Failed loading image: "+p_path);
- ERR_FAIL_COND_V(err, RES());
- if (r_error)
- *r_error=ERR_FILE_CORRUPT;
-
-#ifdef DEBUG_ENABLED
-#ifdef TOOLS_ENABLED
-
- if (max_texture_size && (image.get_width() > max_texture_size || image.get_height() > max_texture_size)) {
-
-
- if (bool(ProjectSettings::get_singleton()->get("debug/image_loader/max_texture_size_alert"))) {
- OS::get_singleton()->alert("Texture is too large: '"+p_path+"', at "+itos(image.get_width())+"x"+itos(image.get_height())+". Max allowed size is: "+itos(max_texture_size)+"x"+itos(max_texture_size)+".","BAD ARTIST, NO COOKIE!");
- }
-
- ERR_EXPLAIN("Texture is too large: '"+p_path+"', at "+itos(image.get_width())+"x"+itos(image.get_height())+". Max allowed size is: "+itos(max_texture_size)+"x"+itos(max_texture_size)+".");
- ERR_FAIL_V(RES());
- }
-#endif
-#endif
-
-
- uint32_t flags=load_image_flags(p_path);
-
- if (debug_load_times)
- begtime=OS::get_singleton()->get_ticks_usec();
-
- //print_line("img: "+p_path+" flags: "+itos(flags));
- texture->create_from_image( image,flags );
- texture->set_name(p_path.get_file());
-
-
- if (debug_load_times) {
- total=USEC_TO_SEC(OS::get_singleton()->get_ticks_usec()-begtime);
- print_line(" -make texture: "+rtos(total));
- }
-
- if (r_error)
- *r_error=OK;
-
- return RES( texture );
- }
-
-
-}
-
-uint32_t ResourceFormatLoaderImage::load_image_flags(const String &p_path) {
-
-
- FileAccess *f2 = FileAccess::open(p_path+".flags",FileAccess::READ);
- Map<String,bool> flags_found;
- if (f2) {
-
- while(!f2->eof_reached()) {
- String l2 = f2->get_line();
- int eqpos = l2.find("=");
- if (eqpos!=-1) {
- String flag=l2.substr(0,eqpos).strip_edges();
- String val=l2.substr(eqpos+1,l2.length()).strip_edges().to_lower();
- flags_found[flag]=(val=="true" || val=="1")?true:false;
- }
- }
- memdelete(f2);
- }
-
-
- uint32_t flags=0;
-
- if (flags_found.has("filter")) {
- if (flags_found["filter"])
- flags|=Texture::FLAG_FILTER;
- } else if (bool(GLOBAL_DEF("rendering/image_loader/filter",true))) {
- flags|=Texture::FLAG_FILTER;
- }
-
-
- if (flags_found.has("gen_mipmaps")) {
- if (flags_found["gen_mipmaps"])
- flags|=Texture::FLAG_MIPMAPS;
- } else if (bool(GLOBAL_DEF("rendering/image_loader/gen_mipmaps",true))) {
- flags|=Texture::FLAG_MIPMAPS;
- }
-
- if (flags_found.has("repeat")) {
- if (flags_found["repeat"])
- flags|=Texture::FLAG_REPEAT;
- } else if (bool(GLOBAL_DEF("rendering/image_loader/repeat",true))) {
- flags|=Texture::FLAG_REPEAT;
- }
-
- if (flags_found.has("anisotropic")) {
- if (flags_found["anisotropic"])
- flags|=Texture::FLAG_ANISOTROPIC_FILTER;
- }
-
- if (flags_found.has("tolinear")) {
- if (flags_found["tolinear"])
- flags|=Texture::FLAG_CONVERT_TO_LINEAR;
- }
-
- if (flags_found.has("mirroredrepeat")) {
- if (flags_found["mirroredrepeat"])
- flags|=Texture::FLAG_MIRRORED_REPEAT;
- }
-
- return flags;
-}
-
-bool ResourceFormatLoaderImage::handles_type(const String& p_type) const {
-
- return ClassDB::is_parent_class(p_type,"Texture") || ClassDB::is_parent_class(p_type,"CubeMap");
-}
-
-void ResourceFormatLoaderImage::get_recognized_extensions(List<String> *p_extensions) const {
-
- ImageLoader::get_recognized_extensions(p_extensions);
- p_extensions->push_back("cube");
-}
-
-String ResourceFormatLoaderImage::get_resource_type(const String &p_path) const {
-
- String ext=p_path.get_extension().to_lower();
- if (ext=="cube")
- return "CubeMap";
-
- List<String> extensions;
- ImageLoader::get_recognized_extensions(&extensions);
-
- for(List<String>::Element *E=extensions.front();E;E=E->next()) {
- if (E->get()==ext)
- return "ImageTexture";
- }
- return "";
-}
-
-
-ResourceFormatLoaderImage::ResourceFormatLoaderImage() {
-
- max_texture_size = GLOBAL_DEF("debug/image_loader/max_texture_size",0);
- GLOBAL_DEF("debug/image_loader/max_texture_size_alert",false);
- debug_load_times=GLOBAL_DEF("debug/image_loader/image_load_times",false);
- GLOBAL_DEF("rendering/image_loader/filter",true);
- GLOBAL_DEF("rendering/image_loader/gen_mipmaps",true);
- GLOBAL_DEF("rendering/image_loader/repeat",false);
-
-}
-#endif
diff --git a/scene/io/resource_format_image.h b/scene/io/resource_format_image.h
deleted file mode 100644
index 2cf6315f17..0000000000
--- a/scene/io/resource_format_image.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*************************************************************************/
-/* resource_format_image.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef RESOURCE_FORMAT_IMAGE_H
-#define RESOURCE_FORMAT_IMAGE_H
-
-#if 0
-
-#include "io/resource_loader.h"
-#include "io/resource_saver.h"
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-class ResourceFormatLoaderImage : public ResourceFormatLoader {
-
- bool debug_load_times;
- int max_texture_size;
-public:
- virtual RES load(const String &p_path,const String& p_original_path="",Error *r_error=NULL);
- static uint32_t load_image_flags(const String &p_path);
- virtual void get_recognized_extensions(List<String> *p_extensions) const;
- virtual bool handles_type(const String& p_type) const;
- virtual String get_resource_type(const String &p_path) const;
-
- ResourceFormatLoaderImage();
-};
-
-#endif
-#endif
diff --git a/scene/io/resource_format_wav.cpp b/scene/io/resource_format_wav.cpp
deleted file mode 100644
index dabbb79de3..0000000000
--- a/scene/io/resource_format_wav.cpp
+++ /dev/null
@@ -1,277 +0,0 @@
-/*************************************************************************/
-/* resource_format_wav.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#if 0
-#include "resource_format_wav.h"
-#include "os/file_access.h"
-#include "scene/resources/sample.h"
-
-
-RES ResourceFormatLoaderWAV::load(const String &p_path, const String& p_original_path, Error *r_error) {
- if (r_error)
- *r_error=ERR_FILE_CANT_OPEN;
-
- Error err;
- FileAccess *file=FileAccess::open(p_path, FileAccess::READ,&err);
-
- ERR_FAIL_COND_V( err!=OK, RES() );
-
- if (r_error)
- *r_error=ERR_FILE_CORRUPT;
-
- /* CHECK RIFF */
- char riff[5];
- riff[4]=0;
- file->get_buffer((uint8_t*)&riff,4); //RIFF
-
- if (riff[0]!='R' || riff[1]!='I' || riff[2]!='F' || riff[3]!='F') {
-
- file->close();
- memdelete(file);
- ERR_FAIL_V( RES() );
- }
-
-
- /* GET FILESIZE */
- uint32_t filesize=file->get_32();
-
- /* CHECK WAVE */
-
- char wave[4];
-
- file->get_buffer((uint8_t*)&wave,4); //RIFF
-
- if (wave[0]!='W' || wave[1]!='A' || wave[2]!='V' || wave[3]!='E') {
-
-
- file->close();
- memdelete(file);
- ERR_EXPLAIN("Not a WAV file (no WAVE RIFF Header)")
- ERR_FAIL_V( RES() );
- }
-
- bool format_found=false;
- bool data_found=false;
- int format_bits=0;
- int format_channels=0;
- int format_freq=0;
- Sample::LoopFormat loop=Sample::LOOP_NONE;
- int loop_begin=0;
- int loop_end=0;
-
-
- Ref<Sample> sample( memnew( Sample ) );
-
-
- while (!file->eof_reached()) {
-
-
- /* chunk */
- char chunkID[4];
- file->get_buffer((uint8_t*)&chunkID,4); //RIFF
-
- /* chunk size */
- uint32_t chunksize=file->get_32();
- uint32_t file_pos=file->get_position(); //save file pos, so we can skip to next chunk safely
-
- if (file->eof_reached()) {
-
- //ERR_PRINT("EOF REACH");
- break;
- }
-
- if (chunkID[0]=='f' && chunkID[1]=='m' && chunkID[2]=='t' && chunkID[3]==' ' && !format_found) {
- /* IS FORMAT CHUNK */
-
- uint16_t compression_code=file->get_16();
-
-
- if (compression_code!=1) {
- ERR_PRINT("Format not supported for WAVE file (not PCM). Save WAVE files as uncompressed PCM instead.");
- break;
- }
-
- format_channels=file->get_16();
- if (format_channels!=1 && format_channels !=2) {
-
- ERR_PRINT("Format not supported for WAVE file (not stereo or mono)");
- break;
-
- }
-
- format_freq=file->get_32(); //sampling rate
-
- file->get_32(); // average bits/second (unused)
- file->get_16(); // block align (unused)
- format_bits=file->get_16(); // bits per sample
-
- if (format_bits%8) {
-
- ERR_PRINT("Strange number of bits in sample (not 8,16,24,32)");
- break;
- }
-
- /* Don't need anything else, continue */
- format_found=true;
- }
-
-
- if (chunkID[0]=='d' && chunkID[1]=='a' && chunkID[2]=='t' && chunkID[3]=='a' && !data_found) {
- /* IS FORMAT CHUNK */
- data_found=true;
-
- if (!format_found) {
- ERR_PRINT("'data' chunk before 'format' chunk found.");
- break;
-
- }
-
- int frames=chunksize;
-
- frames/=format_channels;
- frames/=(format_bits>>3);
-
- /*print_line("chunksize: "+itos(chunksize));
- print_line("channels: "+itos(format_channels));
- print_line("bits: "+itos(format_bits));
-*/
- sample->create(
- (format_bits==8) ? Sample::FORMAT_PCM8 : Sample::FORMAT_PCM16,
- (format_channels==2)?true:false,
- frames );
- sample->set_mix_rate( format_freq );
-
- int len=frames;
- if (format_channels==2)
- len*=2;
- if (format_bits>8)
- len*=2;
-
- PoolVector<uint8_t> data;
- data.resize(len);
- PoolVector<uint8_t>::Write dataw = data.write();
- void * data_ptr = dataw.ptr();
-
- for (int i=0;i<frames;i++) {
-
-
- for (int c=0;c<format_channels;c++) {
-
-
- if (format_bits==8) {
- // 8 bit samples are UNSIGNED
-
- uint8_t s = file->get_8();
- s-=128;
- int8_t *sp=(int8_t*)&s;
-
- int8_t *data_ptr8=&((int8_t*)data_ptr)[i*format_channels+c];
-
- *data_ptr8=*sp;
-
- } else {
- //16+ bits samples are SIGNED
- // if sample is > 16 bits, just read extra bytes
-
- uint32_t data=0;
- for (int b=0;b<(format_bits>>3);b++) {
-
- data|=((uint32_t)file->get_8())<<(b*8);
- }
- data<<=(32-format_bits);
-
-
- int32_t s=data;
-
- int16_t *data_ptr16=&((int16_t*)data_ptr)[i*format_channels+c];
-
- *data_ptr16=s>>16;
- }
- }
-
- }
-
- dataw=PoolVector<uint8_t>::Write();
-
- sample->set_data(data);
-
-
- if (file->eof_reached()) {
- file->close();
- memdelete(file);
- ERR_EXPLAIN("Premature end of file.");
- ERR_FAIL_V(RES());
- }
- }
-
- if (chunkID[0]=='s' && chunkID[1]=='m' && chunkID[2]=='p' && chunkID[3]=='l') {
- //loop point info!
-
- for(int i=0;i<10;i++)
- file->get_32(); // i wish to know why should i do this... no doc!
-
- loop=file->get_32()?Sample::LOOP_PING_PONG:Sample::LOOP_FORWARD;
- loop_begin=file->get_32();
- loop_end=file->get_32();
-
- }
- file->seek( file_pos+chunksize );
- }
-
- sample->set_loop_format(loop);
- sample->set_loop_begin(loop_begin);
- sample->set_loop_end(loop_end);
-
- file->close();
- memdelete(file);
-
- if (r_error)
- *r_error=OK;
-
-
- return sample;
-
-}
-void ResourceFormatLoaderWAV::get_recognized_extensions(List<String> *p_extensions) const {
-
- p_extensions->push_back("wav");
-}
-bool ResourceFormatLoaderWAV::handles_type(const String& p_type) const {
-
- return (p_type=="Sample");
-}
-
-String ResourceFormatLoaderWAV::get_resource_type(const String &p_path) const {
-
- if (p_path.get_extension().to_lower()=="wav")
- return "Sample";
- return "";
-}
-
-#endif
diff --git a/scene/io/resource_format_wav.h b/scene/io/resource_format_wav.h
deleted file mode 100644
index 9105689670..0000000000
--- a/scene/io/resource_format_wav.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*************************************************************************/
-/* resource_format_wav.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef RESOURCE_FORMAT_WAV_H
-#define RESOURCE_FORMAT_WAV_H
-
-#if 0
-#include "io/resource_loader.h"
-
-class ResourceFormatLoaderWAV : public ResourceFormatLoader {
-public:
- virtual RES load(const String &p_path,const String& p_original_path="",Error *r_error=NULL);
- virtual void get_recognized_extensions(List<String> *p_extensions) const;
- virtual bool handles_type(const String& p_type) const;
- virtual String get_resource_type(const String &p_path) const;
-
-};
-
-#endif
-#endif // RESOURCE_FORMAT_WAV_H
diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp
index 77407fdde7..ce8714e574 100644
--- a/scene/main/canvas_layer.cpp
+++ b/scene/main/canvas_layer.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -201,7 +201,7 @@ void CanvasLayer::set_custom_viewport(Node *p_viewport) {
viewport = RID();
}
- custom_viewport = p_viewport->cast_to<Viewport>();
+ custom_viewport = Object::cast_to<Viewport>(p_viewport);
if (custom_viewport) {
custom_viewport_id = custom_viewport->get_instance_id();
diff --git a/scene/main/canvas_layer.h b/scene/main/canvas_layer.h
index b14a915fe8..fbee87f487 100644
--- a/scene/main/canvas_layer.h
+++ b/scene/main/canvas_layer.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp
index e57cd857f8..1e1e4f2d5f 100644
--- a/scene/main/http_request.cpp
+++ b/scene/main/http_request.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/main/http_request.h b/scene/main/http_request.h
index 104f529eae..790ff5f7ef 100644
--- a/scene/main/http_request.h
+++ b/scene/main/http_request.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/main/instance_placeholder.cpp b/scene/main/instance_placeholder.cpp
index 5580ef486e..cbe30e05dd 100644
--- a/scene/main/instance_placeholder.cpp
+++ b/scene/main/instance_placeholder.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/main/instance_placeholder.h b/scene/main/instance_placeholder.h
index ec4520e1c8..375c87a035 100644
--- a/scene/main/instance_placeholder.h
+++ b/scene/main/instance_placeholder.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index c850a5ae74..c3d9d97c5a 100755
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "node.h"
+
#include "instance_placeholder.h"
#include "io/resource_loader.h"
#include "message_queue.h"
@@ -194,7 +195,7 @@ void Node::_propagate_enter_tree() {
data.depth = 1;
}
- data.viewport = cast_to<Viewport>();
+ data.viewport = Object::cast_to<Viewport>(this);
if (!data.viewport)
data.viewport = data.parent->data.viewport;
@@ -360,18 +361,6 @@ void Node::add_child_notify(Node *p_child) {
// to be used when not wanted
}
-/*
-void Node::remove_and_delete_child(Node *p_child) {
-
- ERR_FAIL_NULL( p_child );
- ERR_FAIL_COND( p_child->get_parent()!=this );
-
- remove_child(p_child);
- memdelete(p_child);
-
-}
-*/
-
void Node::remove_child_notify(Node *p_child) {
// to be used when not wanted
@@ -675,31 +664,6 @@ Variant Node::_rpc_unreliable_id_bind(const Variant **p_args, int p_argcount, Va
return Variant();
}
-#if 0
-Variant Node::_rpc_bind(const Variant** p_args, int p_argcount, Variant::CallError& r_error) {
-
- if (p_argcount<1) {
- r_error.error=Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
- r_error.argument=1;
- return Variant();
- }
-
- if (p_args[0]->get_type()!=Variant::STRING) {
- r_error.error=Variant::CallError::CALL_ERROR_INVALID_ARGUMENT;
- r_error.argument=0;
- r_error.expected=Variant::STRING;
- return Variant();
- }
-
- StringName method = *p_args[0];
-
- rpcp(method,&p_args[1],p_argcount-1);
-
- r_error.error=Variant::CallError::CALL_OK;
- return Variant();
-}
-
-#endif
void Node::rpcp(int p_peer_id, bool p_unreliable, const StringName &p_method, const Variant **p_arg, int p_argcount) {
ERR_FAIL_COND(!is_inside_tree());
@@ -1353,20 +1317,24 @@ void Node::_add_child_nocheck(Node *p_child, const StringName &p_name) {
void Node::add_child(Node *p_child, bool p_legible_unique_name) {
ERR_FAIL_NULL(p_child);
- /* Fail if node has a parent */
+
if (p_child == this) {
- ERR_EXPLAIN("Can't add child " + p_child->get_name() + " to itself.")
+ ERR_EXPLAIN("Can't add child '" + p_child->get_name() + "' to itself.")
ERR_FAIL_COND(p_child == this); // adding to itself!
}
- ERR_EXPLAIN("Can't add child, already has a parent");
- ERR_FAIL_COND(p_child->data.parent);
+
+ /* Fail if node has a parent */
+ if (p_child->data.parent) {
+ ERR_EXPLAIN("Can't add child '" + p_child->get_name() + "' to '" + get_name() + "', already has a parent '" + p_child->data.parent->get_name() + "'.");
+ ERR_FAIL_COND(p_child->data.parent);
+ }
if (data.blocked > 0) {
- ERR_EXPLAIN("Parent node is busy setting up children, add_node() failed. Consider using call_deferred(\"add_child\",child) instead.");
+ ERR_EXPLAIN("Parent node is busy setting up children, add_node() failed. Consider using call_deferred(\"add_child\", child) instead.");
ERR_FAIL_COND(data.blocked > 0);
}
- ERR_EXPLAIN("Can't add child while a notification is happening");
+ ERR_EXPLAIN("Can't add child while a notification is happening.");
ERR_FAIL_COND(data.blocked > 0);
/* Validate name */
@@ -1381,7 +1349,7 @@ void Node::add_child_below_node(Node *p_node, Node *p_child, bool p_legible_uniq
if (is_a_parent_of(p_node)) {
move_child(p_child, p_node->get_position_in_parent() + 1);
} else {
- WARN_PRINTS("Cannot move under node " + p_node->get_name() + " as " + p_child->get_name() + " does not share a parent")
+ WARN_PRINTS("Cannot move under node " + p_node->get_name() + " as " + p_child->get_name() + " does not share a parent.")
}
}
@@ -2066,59 +2034,6 @@ HashMap<NodePath, int> Node::get_editable_instances() const {
return data.editable_instances;
}
-#if 0
-
-void Node::generate_instance_state() {
-
- List<PropertyInfo> properties;
- get_property_list(&properties);
-
- data.instance_state.clear();
-
- for( List<PropertyInfo>::Element *E=properties.front();E;E=E->next() ) {
-
- PropertyInfo &pi=E->get();
- if ((pi.usage&PROPERTY_USAGE_NO_INSTANCE_STATE) || !(pi.usage&PROPERTY_USAGE_EDITOR) || !(pi.usage&PROPERTY_USAGE_STORAGE))
- continue;
-
- data.instance_state[pi.name]=get(pi.name);
- }
-
- List<GroupInfo> groups;
- get_groups(&groups);
- for(List<GroupInfo>::Element *E=groups.front();E;E=E->next()) {
-
- if (!E->get().persistent)
- continue;
- data.instance_groups.push_back(E->get().name);
- }
-
- List<MethodInfo> signal_list;
-
- get_signal_list(&signal_list);
-
- for(List<MethodInfo>::Element *E=signal_list.front();E;E=E->next()) {
-
- StringName name = E->get().name;
- List<Connection> connections;
- get_signal_connection_list(name,&connections);
-
- for(List<Connection>::Element *F=connections.front();F;F=F->next()) {
-
- if (F->get().flags&CONNECT_PERSIST)
- data.instance_connections.push_back(F->get());
- }
-
- }
-}
-
-Dictionary Node::get_instance_state() const {
-
- return data.instance_state;
-}
-
-#endif
-
void Node::set_scene_instance_state(const Ref<SceneState> &p_state) {
data.instance_state = p_state;
@@ -2160,9 +2075,9 @@ Node *Node::_duplicate(int p_flags) const {
bool instanced = false;
- if (cast_to<InstancePlaceholder>()) {
+ if (Object::cast_to<InstancePlaceholder>(this)) {
- const InstancePlaceholder *ip = cast_to<const InstancePlaceholder>();
+ const InstancePlaceholder *ip = Object::cast_to<const InstancePlaceholder>(this);
InstancePlaceholder *nip = memnew(InstancePlaceholder);
nip->set_instance_path(ip->get_instance_path());
node = nip;
@@ -2180,7 +2095,7 @@ Node *Node::_duplicate(int p_flags) const {
Object *obj = ClassDB::instance(get_class());
ERR_FAIL_COND_V(!obj, NULL);
- node = obj->cast_to<Node>();
+ node = Object::cast_to<Node>(obj);
if (!node)
memdelete(obj);
ERR_FAIL_COND_V(!node, NULL);
@@ -2270,7 +2185,7 @@ void Node::_duplicate_and_reown(Node *p_new_parent, const Map<Node *, Node *> &p
print_line("could not duplicate: " + String(get_class()));
}
ERR_FAIL_COND(!obj);
- node = obj->cast_to<Node>();
+ node = Object::cast_to<Node>(obj);
if (!node)
memdelete(obj);
}
@@ -2326,7 +2241,7 @@ void Node::_duplicate_signals(const Node *p_original, Node *p_copy) const {
NodePath p = p_original->get_path_to(this);
Node *copy = p_copy->get_node(p);
- Node *target = E->get().target->cast_to<Node>();
+ Node *target = Object::cast_to<Node>(E->get().target);
if (!target) {
continue;
}
@@ -2355,7 +2270,7 @@ Node *Node::duplicate_and_reown(const Map<Node *, Node *> &p_reown_map) const {
print_line("could not duplicate: " + String(get_class()));
}
ERR_FAIL_COND_V(!obj, NULL);
- node = obj->cast_to<Node>();
+ node = Object::cast_to<Node>(obj);
if (!node)
memdelete(obj);
ERR_FAIL_COND_V(!node, NULL);
@@ -2610,7 +2525,7 @@ void Node::_set_tree(SceneTree *p_tree) {
static void _Node_debug_sn(Object *p_obj) {
- Node *n = p_obj->cast_to<Node>();
+ Node *n = Object::cast_to<Node>(p_obj);
if (!n)
return;
@@ -2748,7 +2663,6 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_name"), &Node::get_name);
ClassDB::bind_method(D_METHOD("add_child", "node", "legible_unique_name"), &Node::add_child, DEFVAL(false));
ClassDB::bind_method(D_METHOD("remove_child", "node"), &Node::remove_child);
- //ClassDB::bind_method(D_METHOD("remove_and_delete_child","node"),&Node::remove_and_delete_child);
ClassDB::bind_method(D_METHOD("get_child_count"), &Node::get_child_count);
ClassDB::bind_method(D_METHOD("get_children"), &Node::_get_children);
ClassDB::bind_method(D_METHOD("get_child", "idx"), &Node::get_child);
@@ -2860,7 +2774,6 @@ void Node::_bind_methods() {
BIND_CONSTANT(NOTIFICATION_ENTER_TREE);
BIND_CONSTANT(NOTIFICATION_EXIT_TREE);
BIND_CONSTANT(NOTIFICATION_MOVED_IN_PARENT);
- //BIND_CONSTANT( NOTIFICATION_PARENT_DECONFIGURED );
BIND_CONSTANT(NOTIFICATION_READY);
BIND_CONSTANT(NOTIFICATION_FIXED_PROCESS);
BIND_CONSTANT(NOTIFICATION_PROCESS);
diff --git a/scene/main/node.h b/scene/main/node.h
index b5ce6682d8..12d6310062 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -192,7 +192,6 @@ protected:
virtual void add_child_notify(Node *p_child);
virtual void remove_child_notify(Node *p_child);
virtual void move_child_notify(Node *p_child);
- //void remove_and_delete_child(Node *p_child);
void _propagate_replace_owner(Node *p_owner, Node *p_by_owner);
@@ -212,7 +211,6 @@ public:
NOTIFICATION_EXIT_TREE = 11,
NOTIFICATION_MOVED_IN_PARENT = 12,
NOTIFICATION_READY = 13,
- //NOTIFICATION_PARENT_DECONFIGURED =15, - it's confusing, it's going away
NOTIFICATION_PAUSED = 14,
NOTIFICATION_UNPAUSED = 15,
NOTIFICATION_FIXED_PROCESS = 16,
diff --git a/scene/main/resource_preloader.cpp b/scene/main/resource_preloader.cpp
index ae323ba021..35bb6ef7e8 100644
--- a/scene/main/resource_preloader.cpp
+++ b/scene/main/resource_preloader.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/main/resource_preloader.h b/scene/main/resource_preloader.h
index a54781dc81..40e900a492 100644
--- a/scene/main/resource_preloader.h
+++ b/scene/main/resource_preloader.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 10ab28150b..a71b491bae 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* scene_main_loop.cpp */
+/* scene_tree.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -29,18 +29,15 @@
/*************************************************************************/
#include "scene_tree.h"
+#include "editor/editor_node.h"
+#include "io/marshalls.h"
+#include "io/resource_loader.h"
#include "message_queue.h"
#include "node.h"
#include "os/keyboard.h"
#include "os/os.h"
#include "print_string.h"
#include "project_settings.h"
-#include <stdio.h>
-//#include "servers/spatial_sound_2d_server.h"
-
-#include "editor/editor_node.h"
-#include "io/marshalls.h"
-#include "io/resource_loader.h"
#include "scene/resources/material.h"
#include "scene/resources/mesh.h"
#include "scene/resources/packed_scene.h"
@@ -49,6 +46,8 @@
#include "servers/physics_server.h"
#include "viewport.h"
+#include <stdio.h>
+
void SceneTreeTimer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_time_left", "time"), &SceneTreeTimer::set_time_left);
@@ -383,7 +382,7 @@ bool SceneTree::is_input_handled() {
void SceneTree::input_event(const Ref<InputEvent> &p_event) {
- if (Engine::get_singleton()->is_editor_hint() && (p_event->cast_to<InputEventJoypadButton>() || p_event->cast_to<InputEventJoypadMotion>()))
+ if (Engine::get_singleton()->is_editor_hint() && (Object::cast_to<InputEventJoypadButton>(p_event.ptr()) || Object::cast_to<InputEventJoypadMotion>(*p_event)))
return; //avoid joy input on editor
root_lock++;
@@ -413,19 +412,7 @@ void SceneTree::input_event(const Ref<InputEvent> &p_event) {
root_lock++;
if (!input_handled) {
-
-#if 0
- _call_input_pause("unhandled_input","_unhandled_input",ev);
- //call_group(GROUP_CALL_REVERSE|GROUP_CALL_REALTIME|GROUP_CALL_MULIILEVEL,"unhandled_input","_unhandled_input",ev);
- if (!input_handled && ev.type==InputEvent::KEY) {
- _call_input_pause("unhandled_key_input","_unhandled_key_input",ev);
- //call_group(GROUP_CALL_REVERSE|GROUP_CALL_REALTIME|GROUP_CALL_MULIILEVEL,"unhandled_key_input","_unhandled_key_input",ev);
- }
-#else
-
call_group_flags(GROUP_CALL_REALTIME, "_viewports", "_vp_unhandled_input", ev); //special one for GUI, as controls use their own process check
-
-#endif
input_handled = true;
_flush_ugc();
root_lock--;
@@ -555,6 +542,10 @@ bool SceneTree::idle(float p_time) {
if (env_path != String()) {
fallback = ResourceLoader::load(env_path);
+ if (fallback.is_null()) {
+ //could not load fallback, set as empty
+ ProjectSettings::get_singleton()->set("rendering/environment/default_environment", "");
+ }
} else {
fallback.unref();
}
@@ -1400,12 +1391,12 @@ void SceneTree::_live_edit_create_node_func(const NodePath &p_parent, const Stri
continue;
Node *n2 = n->get_node(p_parent);
- Object *o = ClassDB::instance(p_type);
- if (!o)
+ Node *no = Object::cast_to<Node>(ClassDB::instance(p_type));
+ if (!no) {
continue;
- Node *no = o->cast_to<Node>();
- no->set_name(p_name);
+ }
+ no->set_name(p_name);
n2->add_child(no);
}
}
@@ -1708,6 +1699,11 @@ Vector<int> SceneTree::get_network_connected_peers() const {
return ret;
}
+
+int SceneTree::get_rpc_sender_id() const {
+ return rpc_sender_id;
+}
+
void SceneTree::set_refuse_new_network_connections(bool p_refuse) {
ERR_FAIL_COND(!network_peer.is_valid());
network_peer->set_refuse_new_connections(p_refuse);
@@ -2102,7 +2098,9 @@ void SceneTree::_network_poll() {
ERR_PRINT("Error getting packet!");
}
+ rpc_sender_id = sender;
_network_process_packet(sender, packet, len);
+ rpc_sender_id = 0;
if (!network_peer.is_valid()) {
break; //it's also possible that a packet or RPC caused a disconnection, so also check here
@@ -2182,6 +2180,7 @@ void SceneTree::_bind_methods() {
ClassDB::bind_method(D_METHOD("has_network_peer"), &SceneTree::has_network_peer);
ClassDB::bind_method(D_METHOD("get_network_connected_peers"), &SceneTree::get_network_connected_peers);
ClassDB::bind_method(D_METHOD("get_network_unique_id"), &SceneTree::get_network_unique_id);
+ ClassDB::bind_method(D_METHOD("get_rpc_sender_id"), &SceneTree::get_rpc_sender_id);
ClassDB::bind_method(D_METHOD("set_refuse_new_network_connections", "refuse"), &SceneTree::set_refuse_new_network_connections);
ClassDB::bind_method(D_METHOD("is_refusing_new_network_connections"), &SceneTree::is_refusing_new_network_connections);
ClassDB::bind_method(D_METHOD("_network_peer_connected"), &SceneTree::_network_peer_connected);
@@ -2266,6 +2265,7 @@ SceneTree::SceneTree() {
call_lock = 0;
root_lock = 0;
node_count = 0;
+ rpc_sender_id = 0;
//create with mainloop
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index c62607244e..c116bec4fc 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* scene_main_loop.h */
+/* scene_tree.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -199,6 +199,8 @@ private:
void _connection_failed();
void _server_disconnected();
+ int rpc_sender_id;
+
//path sent caches
struct PathSentCache {
Map<int, bool> confirmed_peers;
@@ -445,6 +447,7 @@ public:
bool has_network_peer() const;
int get_network_unique_id() const;
Vector<int> get_network_connected_peers() const;
+ int get_rpc_sender_id() const;
void set_refuse_new_network_connections(bool p_refuse);
bool is_refusing_new_network_connections() const;
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index 42690ab93a..df7d609ac0 100755
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/main/timer.h b/scene/main/timer.h
index dd4711ec37..0cd92f12de 100755
--- a/scene/main/timer.h
+++ b/scene/main/timer.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index e0800f4907..c71a280755 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,28 +28,23 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "viewport.h"
+
#include "os/input.h"
#include "os/os.h"
-#include "scene/3d/spatial.h"
-#include "servers/physics_2d_server.h"
-//#include "scene/3d/camera.h"
-
+#include "project_settings.h"
+#include "scene/2d/collision_object_2d.h"
#include "scene/3d/camera.h"
#include "scene/3d/collision_object.h"
#include "scene/3d/listener.h"
-#include "scene/3d/spatial_indexer.h"
+#include "scene/3d/scenario_fx.h"
+#include "scene/3d/spatial.h"
#include "scene/gui/control.h"
-#include "scene/resources/mesh.h"
-
-#include "scene/2d/collision_object_2d.h"
-
#include "scene/gui/label.h"
#include "scene/gui/panel.h"
#include "scene/main/timer.h"
+#include "scene/resources/mesh.h"
#include "scene/scene_string_names.h"
-
-#include "project_settings.h"
-#include "scene/3d/scenario_fx.h"
+#include "servers/physics_2d_server.h"
void ViewportTexture::setup_local_to_scene() {
@@ -68,7 +63,7 @@ void ViewportTexture::setup_local_to_scene() {
ERR_EXPLAIN("ViewportTexture: Path to node is invalid");
ERR_FAIL_COND(!vpn);
- vp = vpn->cast_to<Viewport>();
+ vp = Object::cast_to<Viewport>(vpn);
ERR_EXPLAIN("ViewportTexture: Path to node does not point to a viewport");
ERR_FAIL_COND(!vp);
@@ -337,22 +332,18 @@ void Viewport::_test_new_mouseover(ObjectID new_collider) {
if (new_collider != physics_object_over) {
if (physics_object_over) {
- Object *obj = ObjectDB::get_instance(physics_object_over);
- if (obj) {
- CollisionObject *co = obj->cast_to<CollisionObject>();
- if (co) {
- co->_mouse_exit();
- }
+
+ CollisionObject *co = Object::cast_to<CollisionObject>(ObjectDB::get_instance(physics_object_over));
+ if (co) {
+ co->_mouse_exit();
}
}
if (new_collider) {
- Object *obj = ObjectDB::get_instance(new_collider);
- if (obj) {
- CollisionObject *co = obj->cast_to<CollisionObject>();
- if (co) {
- co->_mouse_enter();
- }
+
+ CollisionObject *co = Object::cast_to<CollisionObject>(ObjectDB::get_instance(new_collider));
+ if (co) {
+ co->_mouse_enter();
}
}
@@ -399,7 +390,7 @@ void Viewport::_notification(int p_what) {
contact_3d_debug_instance = VisualServer::get_singleton()->instance_create();
VisualServer::get_singleton()->instance_set_base(contact_3d_debug_instance, contact_3d_debug_multimesh);
VisualServer::get_singleton()->instance_set_scenario(contact_3d_debug_instance, find_world()->get_scenario());
- VisualServer::get_singleton()->instance_geometry_set_flag(contact_3d_debug_instance, VS::INSTANCE_FLAG_VISIBLE_IN_ALL_ROOMS, true);
+ //VisualServer::get_singleton()->instance_geometry_set_flag(contact_3d_debug_instance, VS::INSTANCE_FLAG_VISIBLE_IN_ALL_ROOMS, true);
}
VS::get_singleton()->viewport_set_active(viewport, true);
@@ -500,7 +491,7 @@ void Viewport::_notification(int p_what) {
if (physics_object_picking && (to_screen_rect == Rect2() || Input::get_singleton()->get_mouse_mode() != Input::MOUSE_MODE_CAPTURED)) {
Vector2 last_pos(1e20, 1e20);
- CollisionObject *last_object;
+ CollisionObject *last_object = NULL;
ObjectID last_id = 0;
PhysicsDirectSpaceState::RayResult result;
Physics2DDirectSpaceState *ss2d = Physics2DServer::get_singleton()->space_get_direct_state(find_world_2d()->get_space());
@@ -552,7 +543,7 @@ void Viewport::_notification(int p_what) {
for (int i = 0; i < rc; i++) {
if (res[i].collider_id && res[i].collider) {
- CollisionObject2D *co = res[i].collider->cast_to<CollisionObject2D>();
+ CollisionObject2D *co = Object::cast_to<CollisionObject2D>(res[i].collider);
if (co) {
Map<ObjectID, uint64_t>::Element *E = physics_2d_mouseover.find(res[i].collider_id);
@@ -575,7 +566,7 @@ void Viewport::_notification(int p_what) {
Object *o = ObjectDB::get_instance(E->key());
if (o) {
- CollisionObject2D *co = o->cast_to<CollisionObject2D>();
+ CollisionObject2D *co = Object::cast_to<CollisionObject2D>(o);
if (co) {
co->_mouse_exit();
}
@@ -595,19 +586,14 @@ void Viewport::_notification(int p_what) {
if (physics_object_capture != 0) {
- Object *obj = ObjectDB::get_instance(physics_object_capture);
- if (obj) {
- CollisionObject *co = obj->cast_to<CollisionObject>();
- if (co) {
- co->_input_event(camera, ev, Vector3(), Vector3(), 0);
- captured = true;
- if (mb.is_valid() && mb->get_button_index() == 1 && !mb->is_pressed()) {
- physics_object_capture = 0;
- }
-
- } else {
+ CollisionObject *co = Object::cast_to<CollisionObject>(ObjectDB::get_instance(physics_object_capture));
+ if (co) {
+ co->_input_event(camera, ev, Vector3(), Vector3(), 0);
+ captured = true;
+ if (mb.is_valid() && mb->get_button_index() == 1 && !mb->is_pressed()) {
physics_object_capture = 0;
}
+
} else {
physics_object_capture = 0;
}
@@ -618,7 +604,7 @@ void Viewport::_notification(int p_what) {
} else if (pos == last_pos) {
if (last_id) {
- if (ObjectDB::get_instance(last_id)) {
+ if (ObjectDB::get_instance(last_id) && last_object) {
//good, exists
last_object->_input_event(camera, ev, result.position, result.normal, result.shape);
if (last_object->get_capture_input_on_drag() && mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
@@ -640,18 +626,15 @@ void Viewport::_notification(int p_what) {
ObjectID new_collider = 0;
if (col) {
- if (result.collider) {
-
- CollisionObject *co = result.collider->cast_to<CollisionObject>();
- if (co) {
+ CollisionObject *co = Object::cast_to<CollisionObject>(result.collider);
+ if (co) {
- co->_input_event(camera, ev, result.position, result.normal, result.shape);
- last_object = co;
- last_id = result.collider_id;
- new_collider = last_id;
- if (co->get_capture_input_on_drag() && mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
- physics_object_capture = last_id;
- }
+ co->_input_event(camera, ev, result.position, result.normal, result.shape);
+ last_object = co;
+ last_id = result.collider_id;
+ new_collider = last_id;
+ if (co->get_capture_input_on_drag() && mb.is_valid() && mb->get_button_index() == 1 && mb->is_pressed()) {
+ physics_object_capture = last_id;
}
}
}
@@ -678,11 +661,9 @@ void Viewport::_notification(int p_what) {
bool col = space->intersect_ray(from, from + dir * 10000, result, Set<RID>(), 0xFFFFFFFF, 0xFFFFFFFF, true);
ObjectID new_collider = 0;
if (col) {
- if (result.collider) {
- CollisionObject *co = result.collider->cast_to<CollisionObject>();
- if (co) {
- new_collider = result.collider_id;
- }
+ CollisionObject *co = Object::cast_to<CollisionObject>(result.collider);
+ if (co) {
+ new_collider = result.collider_id;
}
}
@@ -750,7 +731,7 @@ Size2 Viewport::get_size() const {
void Viewport::_update_listener() {
/*
- if (is_inside_tree() && audio_listener && (camera || listener) && (!get_parent() || (get_parent()->cast_to<Control>() && get_parent()->cast_to<Control>()->is_visible_in_tree()))) {
+ if (is_inside_tree() && audio_listener && (camera || listener) && (!get_parent() || (Object::cast_to<Control>(get_parent()) && Object::cast_to<Control>(get_parent())->is_visible_in_tree()))) {
SpatialSoundServer::get_singleton()->listener_set_space(internal_listener, find_world()->get_sound_space());
} else {
SpatialSoundServer::get_singleton()->listener_set_space(internal_listener, RID());
@@ -761,7 +742,7 @@ void Viewport::_update_listener() {
void Viewport::_update_listener_2d() {
/*
- if (is_inside_tree() && audio_listener && (!get_parent() || (get_parent()->cast_to<Control>() && get_parent()->cast_to<Control>()->is_visible_in_tree())))
+ if (is_inside_tree() && audio_listener && (!get_parent() || (Object::cast_to<Control>(get_parent()) && Object::cast_to<Control>(get_parent())->is_visible_in_tree())))
SpatialSound2DServer::get_singleton()->listener_set_space(internal_listener_2d, find_world_2d()->get_sound_space());
else
SpatialSound2DServer::get_singleton()->listener_set_space(internal_listener_2d, RID());
@@ -1029,11 +1010,11 @@ void Viewport::_propagate_enter_world(Node *p_node) {
if (!p_node->is_inside_tree()) //may not have entered scene yet
return;
- if (p_node->cast_to<Spatial>() || p_node->cast_to<WorldEnvironment>()) {
+ if (Object::cast_to<Spatial>(p_node) || Object::cast_to<WorldEnvironment>(p_node)) {
p_node->notification(Spatial::NOTIFICATION_ENTER_WORLD);
} else {
- Viewport *v = p_node->cast_to<Viewport>();
+ Viewport *v = Object::cast_to<Viewport>(p_node);
if (v) {
if (v->world.is_valid())
@@ -1053,7 +1034,7 @@ void Viewport::_propagate_viewport_notification(Node *p_node, int p_what) {
p_node->notification(p_what);
for (int i = 0; i < p_node->get_child_count(); i++) {
Node *c = p_node->get_child(i);
- if (c->cast_to<Viewport>())
+ if (Object::cast_to<Viewport>(c))
continue;
_propagate_viewport_notification(c, p_what);
}
@@ -1066,11 +1047,11 @@ void Viewport::_propagate_exit_world(Node *p_node) {
if (!p_node->is_inside_tree()) //may have exited scene already
return;
- if (p_node->cast_to<Spatial>() || p_node->cast_to<WorldEnvironment>()) {
+ if (Object::cast_to<Spatial>(p_node) || Object::cast_to<WorldEnvironment>(p_node)) {
p_node->notification(Spatial::NOTIFICATION_EXIT_WORLD);
} else {
- Viewport *v = p_node->cast_to<Viewport>();
+ Viewport *v = Object::cast_to<Viewport>(p_node);
if (v) {
if (v->world.is_valid())
@@ -1194,44 +1175,7 @@ bool Viewport::is_size_override_stretch_enabled() const {
return size_override_stretch;
}
-#if 0
-void Viewport::set_as_render_target(bool p_enable){
-
-/* if (render_target==p_enable)
- return;
-
- render_target=p_enable;
-
- VS::get_singleton()->viewport_set_as_render_target(viewport,p_enable);
- if (is_inside_tree()) {
-
- if (p_enable)
- _vp_exit_tree();
- else
- _vp_enter_tree();
- }
-
- if (p_enable) {
-
- texture_rid = VS::get_singleton()->viewport_get_texture(viewport);
- } else {
-
- texture_rid=RID();
- }
-
- texture->set_flags(texture->flags);
- texture->emit_changed();
-
- update_configuration_warning();
- */
-}
-
-bool Viewport::is_set_as_render_target() const{
-
- return render_target;
-}
-#endif
void Viewport::set_update_mode(UpdateMode p_mode) {
update_mode = p_mode;
@@ -1241,7 +1185,6 @@ Viewport::UpdateMode Viewport::get_update_mode() const {
return update_mode;
}
-//RID get_texture() const;
Ref<ViewportTexture> Viewport::get_texture() const {
@@ -1259,15 +1202,15 @@ bool Viewport::get_vflip() const {
return vflip;
}
-void Viewport::set_clear_on_new_frame(bool p_enable) {
+void Viewport::set_clear_mode(ClearMode p_mode) {
- clear_on_new_frame = p_enable;
- //VisualServer::get_singleton()->viewport_set_clear_on_new_frame(viewport,p_enable);
+ clear_mode = p_mode;
+ VS::get_singleton()->viewport_set_clear_mode(viewport, VS::ViewportClearMode(p_mode));
}
-bool Viewport::get_clear_on_new_frame() const {
+Viewport::ClearMode Viewport::get_clear_mode() const {
- return clear_on_new_frame;
+ return clear_mode;
}
void Viewport::set_shadow_atlas_size(int p_size) {
@@ -1303,12 +1246,6 @@ Viewport::ShadowAtlasQuadrantSubdiv Viewport::get_shadow_atlas_quadrant_subdiv(i
return shadow_atlas_quadrant_subdiv[p_quadrant];
}
-void Viewport::clear() {
-
- //clear=true;
- //VisualServer::get_singleton()->viewport_clear(viewport);
-}
-
Transform2D Viewport::_get_input_pre_xform() const {
Transform2D pre_xf;
@@ -1514,12 +1451,12 @@ void Viewport::_gui_call_input(Control *p_control, const Ref<InputEvent> &p_inpu
mb->get_button_index() == BUTTON_WHEEL_LEFT ||
mb->get_button_index() == BUTTON_WHEEL_RIGHT));
- bool ismouse = ev.is_valid() || p_input->cast_to<InputEventMouseMotion>() != NULL;
+ bool ismouse = ev.is_valid() || Object::cast_to<InputEventMouseMotion>(*p_input) != NULL;
CanvasItem *ci = p_control;
while (ci) {
- Control *control = ci->cast_to<Control>();
+ Control *control = Object::cast_to<Control>(ci);
if (control) {
control->call_multilevel(SceneStringNames::get_singleton()->_gui_input, ev);
if (gui.key_event_accepted)
@@ -1592,10 +1529,10 @@ Control *Viewport::_gui_find_control(const Point2 &p_global) {
Control *Viewport::_gui_find_control_at_pos(CanvasItem *p_node, const Point2 &p_global, const Transform2D &p_xform, Transform2D &r_inv_xform) {
- if (p_node->cast_to<Viewport>())
+ if (Object::cast_to<Viewport>(p_node))
return NULL;
- Control *c = p_node->cast_to<Control>();
+ Control *c = Object::cast_to<Control>(p_node);
if (c) {
//print_line("at "+String(c->get_path())+" POS "+c->get_position()+" bt "+p_xform);
@@ -1620,7 +1557,7 @@ Control *Viewport::_gui_find_control_at_pos(CanvasItem *p_node, const Point2 &p_
if (p_node == gui.tooltip_popup)
continue;
- CanvasItem *ci = p_node->get_child(i)->cast_to<CanvasItem>();
+ CanvasItem *ci = Object::cast_to<CanvasItem>(p_node->get_child(i));
if (!ci || ci->is_set_as_toplevel())
continue;
@@ -1649,7 +1586,7 @@ bool Viewport::_gui_drop(Control *p_at_control, Point2 p_at_pos, bool p_just_che
CanvasItem *ci = p_at_control;
while (ci) {
- Control *control = ci->cast_to<Control>();
+ Control *control = Object::cast_to<Control>(ci);
if (control) {
if (control->can_drop_data(p_at_pos, gui.drag_data)) {
@@ -1774,7 +1711,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
CanvasItem *ci = gui.mouse_focus;
while (ci) {
- Control *control = ci->cast_to<Control>();
+ Control *control = Object::cast_to<Control>(ci);
if (control) {
if (control->get_focus_mode() != Control::FOCUS_NONE) {
if (control != gui.key_focus) {
@@ -1895,7 +1832,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
CanvasItem *ci = gui.mouse_focus;
while (ci) {
- Control *control = ci->cast_to<Control>();
+ Control *control = Object::cast_to<Control>(ci);
if (control) {
gui.drag_data = control->get_drag_data(control->get_global_transform_with_canvas().affine_inverse().xform(mpos) - gui.drag_accum);
@@ -2240,7 +2177,7 @@ void Viewport::_gui_remove_from_modal_stack(List<Control *>::Element *MI, Object
if (!next) { //top of stack
Object *pfo = ObjectDB::get_instance(p_prev_focus_owner);
- Control *pfoc = pfo->cast_to<Control>();
+ Control *pfoc = Object::cast_to<Control>(pfo);
if (!pfoc)
return;
@@ -2270,7 +2207,7 @@ void Viewport::_gui_force_drag(Control *p_base, const Variant &p_data, Control *
void Viewport::_gui_set_drag_preview(Control *p_base, Control *p_control) {
ERR_FAIL_NULL(p_control);
- ERR_FAIL_COND(!((Object *)p_control)->cast_to<Control>());
+ ERR_FAIL_COND(!Object::cast_to<Control>((Object *)p_control));
ERR_FAIL_COND(p_control->is_inside_tree());
ERR_FAIL_COND(p_control->get_parent() != NULL);
@@ -2445,14 +2382,18 @@ void Viewport::unhandled_input(const Ref<InputEvent> &p_event) {
get_tree()->_call_input_pause(unhandled_input_group, "_unhandled_input", p_event);
//call_group(GROUP_CALL_REVERSE|GROUP_CALL_REALTIME|GROUP_CALL_MULIILEVEL,"unhandled_input","_unhandled_input",ev);
- if (!get_tree()->input_handled && p_event->cast_to<InputEventKey>() != NULL) {
+ if (!get_tree()->input_handled && Object::cast_to<InputEventKey>(*p_event) != NULL) {
get_tree()->_call_input_pause(unhandled_key_input_group, "_unhandled_key_input", p_event);
//call_group(GROUP_CALL_REVERSE|GROUP_CALL_REALTIME|GROUP_CALL_MULIILEVEL,"unhandled_key_input","_unhandled_key_input",ev);
}
if (physics_object_picking && !get_tree()->input_handled) {
- if (Input::get_singleton()->get_mouse_mode() != Input::MOUSE_MODE_CAPTURED && (p_event->cast_to<InputEventMouseButton>() || p_event->cast_to<InputEventMouseMotion>() || p_event->cast_to<InputEventScreenDrag>() || p_event->cast_to<InputEventScreenTouch>())) {
+ if (Input::get_singleton()->get_mouse_mode() != Input::MOUSE_MODE_CAPTURED &&
+ (Object::cast_to<InputEventMouseButton>(*p_event) ||
+ Object::cast_to<InputEventMouseMotion>(*p_event) ||
+ Object::cast_to<InputEventScreenDrag>(*p_event) ||
+ Object::cast_to<InputEventScreenTouch>(*p_event))) {
physics_picking_events.push_back(p_event);
}
}
@@ -2567,7 +2508,7 @@ Control *Viewport::get_modal_stack_top() const {
String Viewport::get_configuration_warning() const {
- /*if (get_parent() && !get_parent()->cast_to<Control>() && !render_target) {
+ /*if (get_parent() && !Object::cast_to<Control>(get_parent()) && !render_target) {
return TTR("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.");
}*/
@@ -2678,10 +2619,9 @@ void Viewport::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_vflip", "enable"), &Viewport::set_vflip);
ClassDB::bind_method(D_METHOD("get_vflip"), &Viewport::get_vflip);
- ClassDB::bind_method(D_METHOD("set_clear_on_new_frame", "enable"), &Viewport::set_clear_on_new_frame);
- ClassDB::bind_method(D_METHOD("get_clear_on_new_frame"), &Viewport::get_clear_on_new_frame);
+ ClassDB::bind_method(D_METHOD("set_clear_mode", "mode"), &Viewport::set_clear_mode);
+ ClassDB::bind_method(D_METHOD("get_clear_mode"), &Viewport::get_clear_mode);
- ClassDB::bind_method(D_METHOD("clear"), &Viewport::clear);
ClassDB::bind_method(D_METHOD("set_update_mode", "mode"), &Viewport::set_update_mode);
ClassDB::bind_method(D_METHOD("get_update_mode"), &Viewport::get_update_mode);
@@ -2745,7 +2685,7 @@ void Viewport::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "arvr"), "set_use_arvr", "use_arvr");
- ADD_PROPERTY(PropertyInfo(Variant::RECT2, "size"), "set_size", "get_size");
+ ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "size"), "set_size", "get_size");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "own_world"), "set_use_own_world", "is_using_own_world");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "world", PROPERTY_HINT_RESOURCE_TYPE, "World"), "set_world", "get_world");
//ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"world_2d",PROPERTY_HINT_RESOURCE_TYPE,"World2D"), "set_world_2d", "get_world_2d") ;
@@ -2758,7 +2698,7 @@ void Viewport::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "debug_draw", PROPERTY_HINT_ENUM, "Disabled,Unshaded,Overdraw,Wireframe"), "set_debug_draw", "get_debug_draw");
ADD_GROUP("Render Target", "render_target_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "render_target_v_flip"), "set_vflip", "get_vflip");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "render_target_clear_on_new_frame"), "set_clear_on_new_frame", "get_clear_on_new_frame");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "render_target_clear_mode", PROPERTY_HINT_ENUM, "Always,Never,NextFrame"), "set_clear_mode", "get_clear_mode");
ADD_PROPERTY(PropertyInfo(Variant::INT, "render_target_update_mode", PROPERTY_HINT_ENUM, "Disabled,Once,When Visible,Always"), "set_update_mode", "get_update_mode");
ADD_GROUP("Audio Listener", "audio_listener_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "audio_listener_enable_2d"), "set_as_audio_listener_2d", "is_audio_listener_2d");
@@ -2837,7 +2777,7 @@ Viewport::Viewport() {
gen_mipmaps = false;
vflip = false;
- clear_on_new_frame = true;
+
//clear=true;
update_mode = UPDATE_WHEN_VISIBLE;
@@ -2881,6 +2821,7 @@ Viewport::Viewport() {
usage = USAGE_3D;
debug_draw = DEBUG_DRAW_DISABLED;
+ clear_mode = CLEAR_MODE_ALWAYS;
}
Viewport::~Viewport() {
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 83c989db54..ce2bc991f5 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -140,6 +140,13 @@ public:
DEBUG_DRAW_WIREFRAME,
};
+ enum ClearMode {
+
+ CLEAR_MODE_ALWAYS,
+ CLEAR_MODE_NEVER,
+ CLEAR_MODE_ONLY_NEXT_FRAME
+ };
+
private:
friend class ViewportTexture;
@@ -182,7 +189,7 @@ private:
bool transparent_bg;
bool vflip;
- bool clear_on_new_frame;
+ ClearMode clear_mode;
bool filter;
bool gen_mipmaps;
@@ -395,9 +402,8 @@ public:
void set_vflip(bool p_enable);
bool get_vflip() const;
- void set_clear_on_new_frame(bool p_enable);
- bool get_clear_on_new_frame() const;
- void clear();
+ void set_clear_mode(ClearMode p_mode);
+ ClearMode get_clear_mode() const;
void set_update_mode(UpdateMode p_mode);
UpdateMode get_update_mode() const;
@@ -466,6 +472,7 @@ VARIANT_ENUM_CAST(Viewport::ShadowAtlasQuadrantSubdiv);
VARIANT_ENUM_CAST(Viewport::MSAA);
VARIANT_ENUM_CAST(Viewport::Usage);
VARIANT_ENUM_CAST(Viewport::DebugDraw);
+VARIANT_ENUM_CAST(Viewport::ClearMode);
VARIANT_ENUM_CAST(Viewport::RenderInfo);
#endif
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 3e6d80d314..e01f5e3cdf 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,21 +28,44 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "register_scene_types.h"
-#include "os/os.h"
-#include "project_settings.h"
-#include "scene/io/resource_format_image.h"
-#include "scene/io/resource_format_wav.h"
-
-//#include "scene/io/scene_format_script.h"
-#include "class_db.h"
-#include "resources/default_theme/default_theme.h"
+
+#include "core/class_db.h"
+#include "core/os/os.h"
+#include "core/project_settings.h"
+#include "scene/2d/animated_sprite.h"
+#include "scene/2d/area_2d.h"
+#include "scene/2d/audio_stream_player_2d.h"
+#include "scene/2d/back_buffer_copy.h"
+#include "scene/2d/camera_2d.h"
+#include "scene/2d/canvas_item.h"
+#include "scene/2d/canvas_modulate.h"
+#include "scene/2d/collision_polygon_2d.h"
+#include "scene/2d/collision_shape_2d.h"
+#include "scene/2d/joints_2d.h"
#include "scene/2d/light_2d.h"
#include "scene/2d/light_occluder_2d.h"
+#include "scene/2d/line_2d.h"
+#include "scene/2d/navigation2d.h"
+#include "scene/2d/parallax_background.h"
+#include "scene/2d/parallax_layer.h"
#include "scene/2d/particles_2d.h"
#include "scene/2d/path_2d.h"
+#include "scene/2d/physics_body_2d.h"
+#include "scene/2d/polygon_2d.h"
+#include "scene/2d/position_2d.h"
+#include "scene/2d/ray_cast_2d.h"
+#include "scene/2d/remote_transform_2d.h"
+#include "scene/2d/screen_button.h"
+#include "scene/2d/sprite.h"
+#include "scene/2d/tile_map.h"
+#include "scene/2d/visibility_notifier_2d.h"
+#include "scene/2d/y_sort.h"
+#include "scene/animation/animation_player.h"
+#include "scene/animation/animation_tree_player.h"
+#include "scene/animation/tween.h"
+#include "scene/audio/audio_player.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
-
#include "scene/gui/button_group.h"
#include "scene/gui/center_container.h"
#include "scene/gui/check_box.h"
@@ -88,154 +111,85 @@
#include "scene/main/canvas_layer.h"
#include "scene/main/http_request.h"
#include "scene/main/instance_placeholder.h"
-#include "scene/main/viewport.h"
-#include "scene/resources/audio_stream_sample.h"
-#include "scene/resources/video_stream.h"
-
-#include "scene/2d/animated_sprite.h"
-#include "scene/2d/back_buffer_copy.h"
-#include "scene/2d/canvas_item.h"
-#include "scene/2d/polygon_2d.h"
-#include "scene/2d/sprite.h"
-
-#include "scene/2d/visibility_notifier_2d.h"
-
-#include "scene/2d/area_2d.h"
-#include "scene/2d/camera_2d.h"
-#include "scene/2d/collision_polygon_2d.h"
-#include "scene/2d/collision_shape_2d.h"
-#include "scene/2d/joints_2d.h"
-#include "scene/2d/parallax_background.h"
-#include "scene/2d/parallax_layer.h"
-#include "scene/2d/physics_body_2d.h"
-#include "scene/2d/ray_cast_2d.h"
-//#include "scene/2d/sound_player_2d.h"
-//#include "scene/2d/sample_player_2d.h"
-#include "scene/2d/audio_stream_player_2d.h"
-#include "scene/2d/canvas_modulate.h"
-#include "scene/2d/navigation2d.h"
-#include "scene/2d/remote_transform_2d.h"
-#include "scene/2d/screen_button.h"
-#include "scene/2d/y_sort.h"
-
-#include "scene/2d/position_2d.h"
-#include "scene/2d/tile_map.h"
-//#include "scene/2d/tile_map.h"
-#include "scene/2d/line_2d.h"
-
-#include "scene/resources/tile_set.h"
-
-#include "scene/animation/animation_player.h"
-#include "scene/animation/animation_tree_player.h"
-#include "scene/animation/tween.h"
#include "scene/main/resource_preloader.h"
#include "scene/main/scene_tree.h"
-#include "scene/resources/packed_scene.h"
-
-#include "scene/resources/mesh_data_tool.h"
-#include "scene/resources/surface_tool.h"
-
-#include "scene/resources/dynamic_font.h"
-#include "scene/resources/dynamic_font_stb.h"
-
#include "scene/main/timer.h"
-
-#include "scene/audio/audio_player.h"
-//#include "scene/audio/event_player.h"
-//#include "scene/audio/sound_room_params.h"
+#include "scene/main/viewport.h"
+#include "scene/resources/audio_stream_sample.h"
+#include "scene/resources/bit_mask.h"
#include "scene/resources/box_shape.h"
#include "scene/resources/capsule_shape.h"
-#include "scene/resources/concave_polygon_shape.h"
-#include "scene/resources/convex_polygon_shape.h"
-#include "scene/resources/plane_shape.h"
-#include "scene/resources/ray_shape.h"
-#include "scene/resources/sphere_shape.h"
-
#include "scene/resources/capsule_shape_2d.h"
#include "scene/resources/circle_shape_2d.h"
+#include "scene/resources/color_ramp.h"
+#include "scene/resources/concave_polygon_shape.h"
#include "scene/resources/concave_polygon_shape_2d.h"
+#include "scene/resources/convex_polygon_shape.h"
#include "scene/resources/convex_polygon_shape_2d.h"
+#include "scene/resources/default_theme/default_theme.h"
+#include "scene/resources/dynamic_font.h"
+#include "scene/resources/dynamic_font_stb.h"
+#include "scene/resources/material.h"
+#include "scene/resources/mesh.h"
+#include "scene/resources/mesh_data_tool.h"
+#include "scene/resources/mesh_library.h"
+#include "scene/resources/packed_scene.h"
+#include "scene/resources/plane_shape.h"
+#include "scene/resources/polygon_path_finder.h"
+#include "scene/resources/primitive_meshes.h"
+#include "scene/resources/ray_shape.h"
#include "scene/resources/rectangle_shape_2d.h"
+#include "scene/resources/scene_format_text.h"
#include "scene/resources/segment_shape_2d.h"
+#include "scene/resources/shader_graph.h"
#include "scene/resources/shape_line_2d.h"
-
-#include "scene/resources/mesh_library.h"
-
-#include "scene/resources/polygon_path_finder.h"
-
-//#include "scene/resources/sample.h"
-#include "scene/3d/audio_stream_player_3d.h"
-#include "scene/resources/material.h"
-#include "scene/resources/mesh.h"
-#include "scene/resources/room.h"
#include "scene/resources/sky_box.h"
+#include "scene/resources/sphere_shape.h"
+#include "scene/resources/surface_tool.h"
#include "scene/resources/texture.h"
-
-#include "scene/resources/primitive_meshes.h"
-
-#include "scene/resources/shader_graph.h"
-
+#include "scene/resources/tile_set.h"
+#include "scene/resources/video_stream.h"
#include "scene/resources/world.h"
#include "scene/resources/world_2d.h"
-
-//#include "scene/resources/sample_library.h"
-//#include "scene/resources/audio_stream.h"
-#include "scene/resources/bit_mask.h"
-#include "scene/resources/color_ramp.h"
-#include "scene/resources/gibberish_stream.h"
#include "scene/scene_string_names.h"
-#include "scene/3d/bone_attachment.h"
-#include "scene/3d/path.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/visibility_notifier.h"
-
#ifndef _3D_DISABLED
-#include "scene/3d/camera.h"
-#include "scene/3d/listener.h"
-
+#include "scene/3d/area.h"
#include "scene/3d/arvr_nodes.h"
-
+#include "scene/3d/audio_stream_player_3d.h"
+#include "scene/3d/bone_attachment.h"
+#include "scene/3d/camera.h"
+#include "scene/3d/collision_polygon.h"
+#include "scene/3d/collision_shape.h"
#include "scene/3d/gi_probe.h"
+#include "scene/3d/immediate_geometry.h"
#include "scene/3d/interpolated_camera.h"
#include "scene/3d/light.h"
+#include "scene/3d/listener.h"
#include "scene/3d/mesh_instance.h"
+#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"
#include "scene/3d/portal.h"
#include "scene/3d/position_3d.h"
-#include "scene/3d/reflection_probe.h"
-#include "scene/resources/environment.h"
-
-#include "scene/3d/area.h"
-
-#include "scene/3d/collision_shape.h"
-#include "scene/3d/immediate_geometry.h"
-#include "scene/3d/multimesh_instance.h"
-#include "scene/3d/physics_joint.h"
+#include "scene/3d/proximity_group.h"
#include "scene/3d/ray_cast.h"
+#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/spatial_sample_player.h"
-//#include "scene/3d/spatial_stream_player.h"
-#include "scene/3d/collision_polygon.h"
-#include "scene/3d/navigation.h"
-#include "scene/3d/navigation_mesh.h"
-#include "scene/3d/proximity_group.h"
+#include "scene/3d/visibility_notifier.h"
+#include "scene/resources/environment.h"
#endif
-#include "scene/resources/scene_format_text.h"
-
-//static ResourceFormatLoaderWAV *resource_loader_wav=NULL;
-
-#ifdef TOOLS_ENABLED
-
-#endif
static ResourceFormatLoaderTheme *resource_loader_theme = NULL;
static ResourceFormatSaverText *resource_saver_text = NULL;
@@ -245,8 +199,6 @@ static ResourceFormatLoaderDynamicFont *resource_loader_dynamic_font = NULL;
static ResourceFormatLoaderStreamTexture *resource_loader_stream_texture = NULL;
-//static SceneStringNames *string_names;
-
void register_scene_types() {
SceneStringNames::create();
@@ -255,20 +207,12 @@ void register_scene_types() {
Node::init_node_hrcr();
- //resource_loader_wav = memnew( ResourceFormatLoaderWAV );
- //ResourceLoader::add_resource_format_loader( resource_loader_wav );
resource_loader_dynamic_font = memnew(ResourceFormatLoaderDynamicFont);
ResourceLoader::add_resource_format_loader(resource_loader_dynamic_font);
resource_loader_stream_texture = memnew(ResourceFormatLoaderStreamTexture);
ResourceLoader::add_resource_format_loader(resource_loader_stream_texture);
-#ifdef TOOLS_ENABLED
-
-//scene first!
-
-#endif
-
resource_loader_theme = memnew(ResourceFormatLoaderTheme);
ResourceLoader::add_resource_format_loader(resource_loader_theme);
@@ -316,7 +260,6 @@ void register_scene_types() {
ClassDB::register_class<ShortCut>();
ClassDB::register_class<Control>();
- //ClassDB::register_type<EmptyControl>();
ClassDB::register_class<Button>();
ClassDB::register_class<Label>();
ClassDB::register_class<HScrollBar>();
@@ -424,7 +367,6 @@ void register_scene_types() {
ClassDB::register_class<GIProbe>();
ClassDB::register_class<GIProbeData>();
ClassDB::register_class<AnimationTreePlayer>();
- ClassDB::register_class<Portal>();
ClassDB::register_class<Particles>();
ClassDB::register_class<Position3D>();
ClassDB::register_class<NavigationMeshInstance>();
@@ -446,14 +388,12 @@ void register_scene_types() {
ClassDB::register_class<CollisionPolygon>();
ClassDB::register_class<RayCast>();
ClassDB::register_class<MultiMeshInstance>();
- ClassDB::register_class<Room>();
+
ClassDB::register_class<Curve3D>();
ClassDB::register_class<Path>();
ClassDB::register_class<PathFollow>();
ClassDB::register_class<VisibilityNotifier>();
ClassDB::register_class<VisibilityEnabler>();
- // ClassDB::register_class<BakedLight>();
- //ClassDB::register_type<BakedLightSampler>();
ClassDB::register_class<WorldEnvironment>();
ClassDB::register_class<RemoteTransform>();
@@ -464,8 +404,6 @@ void register_scene_types() {
ClassDB::register_class<ConeTwistJoint>();
ClassDB::register_class<Generic6DOFJoint>();
- //scenariofx
-
OS::get_singleton()->yield(); //may take time to init
#endif
@@ -545,8 +483,6 @@ void register_scene_types() {
SceneTree::add_idle_callback(ParticlesMaterial::flush_changes);
ParticlesMaterial::init_shaders();
- //ClassDB::register_type<ShaderMaterial>();
- ClassDB::register_class<RoomBounds>();
ClassDB::register_class<MultiMesh>();
ClassDB::register_class<MeshLibrary>();
@@ -562,7 +498,6 @@ void register_scene_types() {
ClassDB::register_class<SurfaceTool>();
ClassDB::register_class<MeshDataTool>();
- //ClassDB::register_type<BakedLight>();
OS::get_singleton()->yield(); //may take time to init
@@ -661,14 +596,8 @@ void unregister_scene_types() {
clear_default_theme();
- // memdelete( resource_loader_wav );
memdelete(resource_loader_dynamic_font);
memdelete(resource_loader_stream_texture);
-
-#ifdef TOOLS_ENABLED
-
-#endif
-
memdelete(resource_loader_theme);
if (resource_saver_text) {
diff --git a/scene/register_scene_types.h b/scene/register_scene_types.h
index dee0af9063..956b12a7cd 100644
--- a/scene/register_scene_types.h
+++ b/scene/register_scene_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index 8878e59e71..eae95d9247 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "animation.h"
+
#include "geometry.h"
bool Animation::_set(const StringName &p_name, const Variant &p_value) {
@@ -83,44 +84,6 @@ bool Animation::_set(const StringName &p_name, const Variant &p_value) {
TransformTrack *tt = static_cast<TransformTrack *>(tracks[track]);
PoolVector<float> values = p_value;
int vcount = values.size();
-
-#if 0 // old compatibility hack
- if ((vcount%11) == 0) {
-
-
- PoolVector<float>::Read r = values.read();
-
- tt->transforms.resize(vcount/11);
-
-
- for(int i=0;i<(vcount/11);i++) {
-
-
- TKey<TransformKey> &tk=tt->transforms[i];
- const float *ofs=&r[i*11];
- tk.time=ofs[0];
-
- tk.value.loc.x=ofs[1];
- tk.value.loc.y=ofs[2];
- tk.value.loc.z=ofs[3];
-
- tk.value.rot.x=ofs[4];
- tk.value.rot.y=ofs[5];
- tk.value.rot.z=ofs[6];
- tk.value.rot.w=ofs[7];
-
- tk.value.scale.x=ofs[8];
- tk.value.scale.y=ofs[9];
- tk.value.scale.z=ofs[10];
-
-
- }
- return true;
-
-
-
- }
-#endif
ERR_FAIL_COND_V(vcount % 12, false); // shuld be multiple of 11
PoolVector<float>::Read r = values.read();
@@ -1007,7 +970,12 @@ int Animation::_find(const Vector<K> &p_keys, float p_time) const {
int low = 0;
int high = len - 1;
- int middle;
+ int middle = 0;
+
+#if DEBUG_ENABLED
+ if (low > high)
+ ERR_PRINT("low > high, this may be a bug");
+#endif
const K *keys = &p_keys[0];
@@ -1326,7 +1294,7 @@ Error Animation::transform_track_interpolate(int p_track, float p_time, Vector3
TransformTrack *tt = static_cast<TransformTrack *>(t);
- bool ok;
+ bool ok = false;
TransformKey tk = _interpolate(tt->transforms, p_time, tt->interpolation, tt->loop_wrap, &ok);
@@ -1352,7 +1320,7 @@ Variant Animation::value_track_interpolate(int p_track, float p_time) const {
ERR_FAIL_COND_V(t->type != TYPE_VALUE, Variant());
ValueTrack *vt = static_cast<ValueTrack *>(t);
- bool ok;
+ bool ok = false;
Variant res = _interpolate(vt->values, p_time, vt->update_mode == UPDATE_CONTINUOUS ? vt->interpolation : INTERPOLATION_NEAREST, vt->loop_wrap, &ok);
diff --git a/scene/resources/animation.h b/scene/resources/animation.h
index 27c58aba8c..e653f6b124 100644
--- a/scene/resources/animation.h
+++ b/scene/resources/animation.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/audio_stream_resampled.cpp b/scene/resources/audio_stream_resampled.cpp
deleted file mode 100644
index 1b1d6f8587..0000000000
--- a/scene/resources/audio_stream_resampled.cpp
+++ /dev/null
@@ -1,388 +0,0 @@
-/*************************************************************************/
-/* audio_stream_resampled.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "audio_stream_resampled.h"
-#include "project_settings.h"
-
-#if 0
-int AudioStreamResampled::get_channel_count() const {
-
- if (!rb)
- return 0;
-
- return channels;
-}
-
-
-template<int C>
-uint32_t AudioStreamResampled::_resample(int32_t *p_dest,int p_todo,int32_t p_increment) {
-
- uint32_t read=offset&MIX_FRAC_MASK;
-
- for (int i=0;i<p_todo;i++) {
-
- offset = (offset + p_increment)&(((1<<(rb_bits+MIX_FRAC_BITS))-1));
- read+=p_increment;
- uint32_t pos = offset >> MIX_FRAC_BITS;
- uint32_t frac = offset & MIX_FRAC_MASK;
-#ifndef FAST_AUDIO
- ERR_FAIL_COND_V(pos>=rb_len,0);
-#endif
- uint32_t pos_next = (pos+1)&rb_mask;
- //printf("rb pos %i\n",pos);
-
- // since this is a template with a known compile time value (C), conditionals go away when compiling.
- if (C==1) {
-
- int32_t v0 = rb[pos];
- int32_t v0n=rb[pos_next];
-#ifndef FAST_AUDIO
- v0+=(v0n-v0)*(int32_t)frac >> MIX_FRAC_BITS;
-#endif
- v0<<=16;
- p_dest[i]=v0;
-
- }
- if (C==2) {
-
- int32_t v0 = rb[(pos<<1)+0];
- int32_t v1 = rb[(pos<<1)+1];
- int32_t v0n=rb[(pos_next<<1)+0];
- int32_t v1n=rb[(pos_next<<1)+1];
-
-#ifndef FAST_AUDIO
- v0+=(v0n-v0)*(int32_t)frac >> MIX_FRAC_BITS;
- v1+=(v1n-v1)*(int32_t)frac >> MIX_FRAC_BITS;
-#endif
- v0<<=16;
- v1<<=16;
- p_dest[(i<<1)+0]=v0;
- p_dest[(i<<1)+1]=v1;
-
- }
-
- if (C==4) {
-
- int32_t v0 = rb[(pos<<2)+0];
- int32_t v1 = rb[(pos<<2)+1];
- int32_t v2 = rb[(pos<<2)+2];
- int32_t v3 = rb[(pos<<2)+3];
- int32_t v0n = rb[(pos_next<<2)+0];
- int32_t v1n=rb[(pos_next<<2)+1];
- int32_t v2n=rb[(pos_next<<2)+2];
- int32_t v3n=rb[(pos_next<<2)+3];
-
-#ifndef FAST_AUDIO
- v0+=(v0n-v0)*(int32_t)frac >> MIX_FRAC_BITS;
- v1+=(v1n-v1)*(int32_t)frac >> MIX_FRAC_BITS;
- v2+=(v2n-v2)*(int32_t)frac >> MIX_FRAC_BITS;
- v3+=(v3n-v3)*(int32_t)frac >> MIX_FRAC_BITS;
-#endif
- v0<<=16;
- v1<<=16;
- v2<<=16;
- v3<<=16;
- p_dest[(i<<2)+0]=v0;
- p_dest[(i<<2)+1]=v1;
- p_dest[(i<<2)+2]=v2;
- p_dest[(i<<2)+3]=v3;
-
- }
-
- if (C==6) {
-
- int32_t v0 = rb[(pos*6)+0];
- int32_t v1 = rb[(pos*6)+1];
- int32_t v2 = rb[(pos*6)+2];
- int32_t v3 = rb[(pos*6)+3];
- int32_t v4 = rb[(pos*6)+4];
- int32_t v5 = rb[(pos*6)+5];
- int32_t v0n = rb[(pos_next*6)+0];
- int32_t v1n=rb[(pos_next*6)+1];
- int32_t v2n=rb[(pos_next*6)+2];
- int32_t v3n=rb[(pos_next*6)+3];
- int32_t v4n=rb[(pos_next*6)+4];
- int32_t v5n=rb[(pos_next*6)+5];
-
-#ifndef FAST_AUDIO
- v0+=(v0n-v0)*(int32_t)frac >> MIX_FRAC_BITS;
- v1+=(v1n-v1)*(int32_t)frac >> MIX_FRAC_BITS;
- v2+=(v2n-v2)*(int32_t)frac >> MIX_FRAC_BITS;
- v3+=(v3n-v3)*(int32_t)frac >> MIX_FRAC_BITS;
- v4+=(v4n-v4)*(int32_t)frac >> MIX_FRAC_BITS;
- v5+=(v5n-v5)*(int32_t)frac >> MIX_FRAC_BITS;
-#endif
- v0<<=16;
- v1<<=16;
- v2<<=16;
- v3<<=16;
- v4<<=16;
- v5<<=16;
- p_dest[(i*6)+0]=v0;
- p_dest[(i*6)+1]=v1;
- p_dest[(i*6)+2]=v2;
- p_dest[(i*6)+3]=v3;
- p_dest[(i*6)+4]=v4;
- p_dest[(i*6)+5]=v5;
-
- }
-
-
- }
-
-
- return read>>MIX_FRAC_BITS;//rb_read_pos=offset>>MIX_FRAC_BITS;
-
-}
-
-
-bool AudioStreamResampled::mix(int32_t *p_dest, int p_frames) {
-
-
- if (!rb || !_can_mix())
- return false;
-
- int write_pos_cache=rb_write_pos;
-
- int32_t increment=(mix_rate*MIX_FRAC_LEN)/get_mix_rate();
-
- int rb_todo;
-
- if (write_pos_cache==rb_read_pos) {
- return false; //out of buffer
-
- } else if (rb_read_pos<write_pos_cache) {
-
- rb_todo=write_pos_cache-rb_read_pos; //-1?
- } else {
-
- rb_todo=(rb_len-rb_read_pos)+write_pos_cache; //-1?
- }
-
- int todo = MIN( ((int64_t(rb_todo)<<MIX_FRAC_BITS)/increment)+1, p_frames );
-#if 0
- if (int(mix_rate)==get_mix_rate()) {
-
-
- if (channels==6) {
-
- for(int i=0;i<p_frames;i++) {
-
- int from = ((rb_read_pos+i)&rb_mask)*6;
- int to = i*6;
-
- p_dest[from+0]=int32_t(rb[to+0])<<16;
- p_dest[from+1]=int32_t(rb[to+1])<<16;
- p_dest[from+2]=int32_t(rb[to+2])<<16;
- p_dest[from+3]=int32_t(rb[to+3])<<16;
- p_dest[from+4]=int32_t(rb[to+4])<<16;
- p_dest[from+5]=int32_t(rb[to+5])<<16;
- }
-
- } else {
- int len=p_frames*channels;
- int from=rb_read_pos*channels;
- int mask=0;
- switch(channels) {
- case 1: mask=rb_len-1; break;
- case 2: mask=(rb_len*2)-1; break;
- case 4: mask=(rb_len*4)-1; break;
- }
-
- for(int i=0;i<len;i++) {
-
- p_dest[i]=int32_t(rb[(from+i)&mask])<<16;
- }
- }
-
- rb_read_pos = (rb_read_pos+p_frames)&rb_mask;
- } else
-#endif
- {
-
- uint32_t read=0;
- switch(channels) {
- case 1: read=_resample<1>(p_dest,todo,increment); break;
- case 2: read=_resample<2>(p_dest,todo,increment); break;
- case 4: read=_resample<4>(p_dest,todo,increment); break;
- case 6: read=_resample<6>(p_dest,todo,increment); break;
- }
-#if 1
- //end of stream, fadeout
- int remaining = p_frames-todo;
- if (remaining && todo>0) {
-
- //print_line("fadeout");
- for(int c=0;c<channels;c++) {
-
- for(int i=0;i<todo;i++) {
-
- int32_t samp = p_dest[i*channels+c]>>8;
- uint32_t mul = (todo-i) * 256 /todo;
- //print_line("mul: "+itos(i)+" "+itos(mul));
- p_dest[i*channels+c]=samp*mul;
- }
-
- }
-
- }
-
-#else
- int remaining = p_frames-todo;
- if (remaining && todo>0) {
-
-
- for(int c=0;c<channels;c++) {
-
- int32_t from = p_dest[(todo-1)*channels+c]>>8;
-
- for(int i=0;i<remaining;i++) {
-
- uint32_t mul = (remaining-i) * 256 /remaining;
- p_dest[(todo+i)*channels+c]=from*mul;
- }
-
- }
-
- }
-#endif
-
- //zero out what remains there to avoid glitches
- for(int i=todo*channels;i<int(p_frames)*channels;i++) {
-
- p_dest[i]=0;
- }
-
- if (read>rb_todo)
- read=rb_todo;
-
- rb_read_pos = (rb_read_pos+read)&rb_mask;
-
-
-
-
- }
-
- return true;
-}
-
-
-Error AudioStreamResampled::_setup(int p_channels,int p_mix_rate,int p_minbuff_needed) {
-
- ERR_FAIL_COND_V(p_channels!=1 && p_channels!=2 && p_channels!=4 && p_channels!=6,ERR_INVALID_PARAMETER);
-
-
- float buffering_sec = int(GLOBAL_DEF("audio/stream_buffering_ms",500))/1000.0;
- int desired_rb_bits =nearest_shift(MAX(buffering_sec*p_mix_rate,p_minbuff_needed));
-
- bool recreate=!rb;
-
- if (rb && (uint32_t(desired_rb_bits)!=rb_bits || channels!=uint32_t(p_channels))) {
- //recreate
-
- memdelete_arr(rb);
- memdelete_arr(read_buf);
- recreate=true;
-
- }
-
- if (recreate) {
-
- channels=p_channels;
- rb_bits=desired_rb_bits;
- rb_len=(1<<rb_bits);
- rb_mask=rb_len-1;
- rb = memnew_arr( int16_t, rb_len * p_channels );
- read_buf = memnew_arr( int16_t, rb_len * p_channels );
-
- }
-
- mix_rate=p_mix_rate;
- offset=0;
- rb_read_pos=0;
- rb_write_pos=0;
-
- //avoid maybe strange noises upon load
- for (int i=0;i<(rb_len*channels);i++) {
-
- rb[i]=0;
- read_buf[i]=0;
- }
-
- return OK;
-
-}
-
-void AudioStreamResampled::_clear() {
-
- if (!rb)
- return;
-
- AudioServer::get_singleton()->lock();
- //should be stopped at this point but just in case
- if (rb) {
- memdelete_arr(rb);
- memdelete_arr(read_buf);
- }
- rb=NULL;
- offset=0;
- rb_read_pos=0;
- rb_write_pos=0;
- read_buf=NULL;
- AudioServer::get_singleton()->unlock();
-
-}
-
-AudioStreamResampled::AudioStreamResampled() {
-
- rb=NULL;
- offset=0;
- read_buf=NULL;
- rb_read_pos=0;
- rb_write_pos=0;
-
- rb_bits=0;
- rb_len=0;
- rb_mask=0;
- read_buff_len=0;
- channels=0;
- mix_rate=0;
-
-}
-
-AudioStreamResampled::~AudioStreamResampled() {
-
- if (rb) {
- memdelete_arr(rb);
- memdelete_arr(read_buf);
- }
-
-}
-
-#endif
diff --git a/scene/resources/audio_stream_resampled.h b/scene/resources/audio_stream_resampled.h
deleted file mode 100644
index 53fa3bd0b9..0000000000
--- a/scene/resources/audio_stream_resampled.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/*************************************************************************/
-/* audio_stream_resampled.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef AUDIO_STREAM_RESAMPLED_H
-#define AUDIO_STREAM_RESAMPLED_H
-
-//#include "scene/resources/audio_stream.h"
-
-#if 0
-
-class AudioStreamResampled : public AudioStream {
- GDCLASS(AudioStreamResampled,AudioStream);
-
- uint32_t rb_bits;
- uint32_t rb_len;
- uint32_t rb_mask;
- uint32_t read_buff_len;
- uint32_t channels;
- uint32_t mix_rate;
-
- volatile int rb_read_pos;
- volatile int rb_write_pos;
-
- int32_t offset; //contains the fractional remainder of the resampler
- enum {
- MIX_FRAC_BITS=13,
- MIX_FRAC_LEN=(1<<MIX_FRAC_BITS),
- MIX_FRAC_MASK=MIX_FRAC_LEN-1,
- };
-
- int16_t *read_buf;
- int16_t *rb;
-
-
- template<int C>
- uint32_t _resample(int32_t *p_dest,int p_todo,int32_t p_increment);
-
-
-protected:
-
- _FORCE_INLINE_ int get_total() const {
-
- return rb_len;
- }
-
- _FORCE_INLINE_ int get_todo() const { //return amount of frames to mix
-
- int todo;
- int read_pos_cache=rb_read_pos;
-
- if (read_pos_cache==rb_write_pos) {
- todo=rb_len-1;
- } else if (read_pos_cache>rb_write_pos) {
-
- todo=read_pos_cache-rb_write_pos-1;
- } else {
-
- todo=(rb_len-rb_write_pos)+read_pos_cache-1;
- }
-
- return todo;
- }
-
- //Stream virtual funcs
- virtual int get_channel_count() const;
- virtual bool mix(int32_t *p_dest, int p_frames);
-
- _FORCE_INLINE_ void _flush() {
- rb_read_pos=0;
- rb_write_pos=0;
- }
-
- _FORCE_INLINE_ int16_t *get_write_buffer() { return read_buf; }
- _FORCE_INLINE_ void write(uint32_t p_frames) {
-
- ERR_FAIL_COND(p_frames >= rb_len);
-
- switch(channels) {
- case 1: {
-
- for(uint32_t i=0;i<p_frames;i++) {
-
- rb[ rb_write_pos ] = read_buf[i];
- rb_write_pos=(rb_write_pos+1)&rb_mask;
- }
- } break;
- case 2: {
-
- for(uint32_t i=0;i<p_frames;i++) {
-
- rb[ (rb_write_pos<<1)+0 ] = read_buf[(i<<1)+0];
- rb[ (rb_write_pos<<1)+1 ] = read_buf[(i<<1)+1];
- rb_write_pos=(rb_write_pos+1)&rb_mask;
- }
- } break;
- case 4: {
-
- for(uint32_t i=0;i<p_frames;i++) {
-
- rb[ (rb_write_pos<<2)+0 ] = read_buf[(i<<2)+0];
- rb[ (rb_write_pos<<2)+1 ] = read_buf[(i<<2)+1];
- rb[ (rb_write_pos<<2)+2 ] = read_buf[(i<<2)+2];
- rb[ (rb_write_pos<<2)+3 ] = read_buf[(i<<2)+3];
- rb_write_pos=(rb_write_pos+1)&rb_mask;
- }
- } break;
- case 6: {
-
- for(uint32_t i=0;i<p_frames;i++) {
-
- rb[ (rb_write_pos*6)+0 ] = read_buf[(i*6)+0];
- rb[ (rb_write_pos*6)+1 ] = read_buf[(i*6)+1];
- rb[ (rb_write_pos*6)+2 ] = read_buf[(i*6)+2];
- rb[ (rb_write_pos*6)+3 ] = read_buf[(i*6)+3];
- rb[ (rb_write_pos*6)+4 ] = read_buf[(i*6)+4];
- rb[ (rb_write_pos*6)+5 ] = read_buf[(i*6)+5];
- rb_write_pos=(rb_write_pos+1)&rb_mask;
- }
- } break;
-
-
- }
-
- }
-
- virtual bool _can_mix() const =0;
-
- _FORCE_INLINE_ bool _is_ready() const{
- return rb!=NULL;
- }
-
- Error _setup(int p_channels,int p_mix_rate,int p_minbuff_needed=-1);
- void _clear();
-
-public:
- AudioStreamResampled();
- ~AudioStreamResampled();
-};
-#endif
-#endif // AUDIO_STREAM_RESAMPLED_H
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp
index c8f6007e60..659322897a 100644
--- a/scene/resources/audio_stream_sample.cpp
+++ b/scene/resources/audio_stream_sample.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_sample.h
index 680f037f15..6cb255fedf 100644
--- a/scene/resources/audio_stream_sample.h
+++ b/scene/resources/audio_stream_sample.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp
index a473067937..be994e3b33 100644
--- a/scene/resources/bit_mask.cpp
+++ b/scene/resources/bit_mask.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/bit_mask.h b/scene/resources/bit_mask.h
index 5ab7a3134d..72090f2ebe 100644
--- a/scene/resources/bit_mask.h
+++ b/scene/resources/bit_mask.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/bounds.cpp b/scene/resources/bounds.cpp
index b088426013..ee1e750c82 100644
--- a/scene/resources/bounds.cpp
+++ b/scene/resources/bounds.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/bounds.h b/scene/resources/bounds.h
index 8c0d1dcf6e..3378101836 100644
--- a/scene/resources/bounds.h
+++ b/scene/resources/bounds.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/box_shape.cpp b/scene/resources/box_shape.cpp
index d5c25b718e..bbc85ce0f6 100644
--- a/scene/resources/box_shape.cpp
+++ b/scene/resources/box_shape.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/box_shape.h b/scene/resources/box_shape.h
index fdf1e98020..8884c9b75a 100644
--- a/scene/resources/box_shape.h
+++ b/scene/resources/box_shape.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/canvas.cpp b/scene/resources/canvas.cpp
index b6a909f3fa..f5bf0ad78e 100644
--- a/scene/resources/canvas.cpp
+++ b/scene/resources/canvas.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/canvas.h b/scene/resources/canvas.h
index 331a997914..b9977e11b9 100644
--- a/scene/resources/canvas.h
+++ b/scene/resources/canvas.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/capsule_shape.cpp b/scene/resources/capsule_shape.cpp
index 1fcc9da5b6..e11b98f82e 100644
--- a/scene/resources/capsule_shape.cpp
+++ b/scene/resources/capsule_shape.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/capsule_shape.h b/scene/resources/capsule_shape.h
index 2864e7e23f..9b43823c83 100644
--- a/scene/resources/capsule_shape.h
+++ b/scene/resources/capsule_shape.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/capsule_shape_2d.cpp b/scene/resources/capsule_shape_2d.cpp
index 20177692a1..56a09bc3bf 100644
--- a/scene/resources/capsule_shape_2d.cpp
+++ b/scene/resources/capsule_shape_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/capsule_shape_2d.h b/scene/resources/capsule_shape_2d.h
index 93e7d846a4..610f9a4cf9 100644
--- a/scene/resources/capsule_shape_2d.h
+++ b/scene/resources/capsule_shape_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/circle_shape_2d.cpp b/scene/resources/circle_shape_2d.cpp
index 1b7e09ddfb..ecfc98ea60 100644
--- a/scene/resources/circle_shape_2d.cpp
+++ b/scene/resources/circle_shape_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/circle_shape_2d.h b/scene/resources/circle_shape_2d.h
index a4a4601e66..3ba5ec949c 100644
--- a/scene/resources/circle_shape_2d.h
+++ b/scene/resources/circle_shape_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/color_ramp.cpp b/scene/resources/color_ramp.cpp
index 68f707220f..9f6150ae63 100644
--- a/scene/resources/color_ramp.cpp
+++ b/scene/resources/color_ramp.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/color_ramp.h b/scene/resources/color_ramp.h
index d9f14205bb..316c188d59 100644
--- a/scene/resources/color_ramp.h
+++ b/scene/resources/color_ramp.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -88,7 +88,12 @@ public:
//binary search
int low = 0;
int high = points.size() - 1;
- int middle;
+ int middle = 0;
+
+#if DEBUG_ENABLED
+ if (low > high)
+ ERR_PRINT("low > high, this may be a bug");
+#endif
while (low <= high) {
middle = (low + high) / 2;
diff --git a/scene/resources/concave_polygon_shape.cpp b/scene/resources/concave_polygon_shape.cpp
index 47cc49c631..6ae4fde85e 100644
--- a/scene/resources/concave_polygon_shape.cpp
+++ b/scene/resources/concave_polygon_shape.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/concave_polygon_shape.h b/scene/resources/concave_polygon_shape.h
index a8f9d50674..82e052fee7 100644
--- a/scene/resources/concave_polygon_shape.h
+++ b/scene/resources/concave_polygon_shape.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/concave_polygon_shape_2d.cpp b/scene/resources/concave_polygon_shape_2d.cpp
index b8c931421e..7f4abf7ae0 100644
--- a/scene/resources/concave_polygon_shape_2d.cpp
+++ b/scene/resources/concave_polygon_shape_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/concave_polygon_shape_2d.h b/scene/resources/concave_polygon_shape_2d.h
index d4c102e0d6..e766e88a4b 100644
--- a/scene/resources/concave_polygon_shape_2d.h
+++ b/scene/resources/concave_polygon_shape_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/convex_polygon_shape.cpp b/scene/resources/convex_polygon_shape.cpp
index 10e92b43ae..bba52bd5ff 100644
--- a/scene/resources/convex_polygon_shape.cpp
+++ b/scene/resources/convex_polygon_shape.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/convex_polygon_shape.h b/scene/resources/convex_polygon_shape.h
index 4340b0ef7c..e103f2d90c 100644
--- a/scene/resources/convex_polygon_shape.h
+++ b/scene/resources/convex_polygon_shape.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/convex_polygon_shape_2d.cpp b/scene/resources/convex_polygon_shape_2d.cpp
index e13f7faf70..7588909d90 100644
--- a/scene/resources/convex_polygon_shape_2d.cpp
+++ b/scene/resources/convex_polygon_shape_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/convex_polygon_shape_2d.h b/scene/resources/convex_polygon_shape_2d.h
index ba4a5ae8aa..3354199e05 100644
--- a/scene/resources/convex_polygon_shape_2d.h
+++ b/scene/resources/convex_polygon_shape_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp
index fe0759fcba..7fbaa1f73c 100644
--- a/scene/resources/curve.cpp
+++ b/scene/resources/curve.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "curve.h"
+
#include "core_string_names.h"
template <class T>
@@ -42,344 +43,6 @@ static _FORCE_INLINE_ T _bezier_interp(real_t t, T start, T control_1, T control
return start * omt3 + control_1 * omt2 * t * 3.0 + control_2 * omt * t2 * 3.0 + end * t3;
}
-#if 0
-
-int Curve2D::get_point_count() const {
-
- return points.size();
-}
-void Curve2D::add_point(const Vector2& p_pos, const Vector2& p_in, const Vector2& p_out) {
-
- Point n;
- n.pos=p_pos;
- n.in=p_in;
- n.out=p_out;
- points.push_back(n);
- emit_signal(CoreStringNames::get_singleton()->changed);
-}
-void Curve2D::set_point_pos(int p_index, const Vector2& p_pos) {
-
- ERR_FAIL_INDEX(p_index,points.size());
-
- points[p_index].pos=p_pos;
- emit_signal(CoreStringNames::get_singleton()->changed);
-
-}
-Vector2 Curve2D::get_point_pos(int p_index) const {
-
- ERR_FAIL_INDEX_V(p_index,points.size(),Vector2());
- return points[p_index].pos;
-
-}
-
-
-void Curve2D::set_point_in(int p_index, const Vector2& p_in) {
-
- ERR_FAIL_INDEX(p_index,points.size());
-
- points[p_index].in=p_in;
- emit_signal(CoreStringNames::get_singleton()->changed);
-
-}
-Vector2 Curve2D::get_point_in(int p_index) const {
-
- ERR_FAIL_INDEX_V(p_index,points.size(),Vector2());
- return points[p_index].in;
-
-}
-
-void Curve2D::set_point_out(int p_index, const Vector2& p_out) {
-
- ERR_FAIL_INDEX(p_index,points.size());
-
- points[p_index].out=p_out;
- emit_signal(CoreStringNames::get_singleton()->changed);
-}
-
-Vector2 Curve2D::get_point_out(int p_index) const {
-
- ERR_FAIL_INDEX_V(p_index,points.size(),Vector2());
- return points[p_index].out;
-
-}
-
-
-void Curve2D::remove_point(int p_index) {
-
- ERR_FAIL_INDEX(p_index,points.size());
- points.remove(p_index);
- emit_signal(CoreStringNames::get_singleton()->changed);
-}
-
-Vector2 Curve2D::interpolate(int p_index, float p_offset) const {
-
- int pc = points.size();
- ERR_FAIL_COND_V(pc==0,Vector2());
-
- if (p_index >= pc-1)
- return points[pc-1].pos;
- else if (p_index<0)
- return points[0].pos;
-
- Vector2 p0 = points[p_index].pos;
- Vector2 p1 = p0+points[p_index].out;
- Vector2 p3 = points[p_index+1].pos;
- Vector2 p2 = p3+points[p_index+1].in;
-
- return _bezier_interp(p_offset,p0,p1,p2,p3);
-}
-
-Vector2 Curve2D::interpolatef(real_t p_findex) const {
-
-
- if (p_findex<0)
- p_findex=0;
- else if (p_findex>=points.size())
- p_findex=points.size();
-
- return interpolate((int)p_findex,Math::fmod(p_findex,1.0));
-
-}
-
-PoolVector<Point2> Curve2D::bake(int p_subdivs) const {
-
- int pc = points.size();
-
- PoolVector<Point2> ret;
- if (pc<2)
- return ret;
-
- ret.resize((pc-1)*p_subdivs+1);
-
- PoolVector<Point2>::Write w = ret.write();
- const Point *r = points.ptr();
-
- for(int i=0;i<pc;i++) {
-
- int ofs = pc*p_subdivs;
-
- int limit=(i==pc-1)?p_subdivs+1:p_subdivs;
-
- for(int j=0;j<limit;j++) {
-
- Vector2 p0 = r[i].pos;
- Vector2 p1 = p0+r[i].out;
- Vector2 p3 = r[i].pos;
- Vector2 p2 = p3+r[i].in;
- real_t t = j/(real_t)p_subdivs;
-
- w[ofs+j]=_bezier_interp(t,p0,p1,p2,p3);
-
- }
- }
-
- w = PoolVector<Point2>::Write();
-
- return ret;
-}
-
-void Curve2D::advance(real_t p_distance,int &r_index, real_t &r_pos) const {
-
- int pc = points.size();
- ERR_FAIL_COND(pc<2);
- if (r_index<0 || r_index>=(pc-1))
- return;
-
- Vector2 pos = interpolate(r_index,r_pos);
-
- float sign=p_distance<0 ? -1 : 1;
- p_distance=Math::abs(p_distance);
-
- real_t base = r_index+r_pos;
- real_t top = 0.1; //a tenth is in theory representative
- int iterations=32;
-
-
-
- for(int i=0;i<iterations;i++) {
-
-
- real_t o=base+top*sign;
- if (sign>0 && o >=pc) {
- top=pc-base;
- break;
- } else if (sign<0 && o <0) {
- top=-base;
- break;
- }
-
- Vector2 new_d = interpolatef(o);
-
- if (new_d.distance_to(pos) > p_distance)
- break;
- top*=2.0;
- }
-
-
- real_t bottom = 0.0;
- iterations=8;
- real_t final_offset;
-
-
- for(int i=0;i<iterations;i++) {
-
- real_t middle = (bottom+top)*0.5;
- real_t o=base+middle*sign;
- Vector2 new_d = interpolatef(o);
-
- if (new_d.distance_to(pos) > p_distance) {
- bottom=middle;
- } else {
- top=middle;
- }
- final_offset=o;
- }
-
- r_index=(int)final_offset;
- r_pos=Math::fmod(final_offset,1.0);
-
-}
-
-void Curve2D::get_approx_position_from_offset(real_t p_offset,int &r_index, real_t &r_pos,int p_subdivs) const {
-
- ERR_FAIL_COND(points.size()<2);
-
- real_t accum=0;
-
-
-
- for(int i=0;i<points.size();i++) {
-
- Vector2 prev_p=interpolate(i,0);
-
-
- for(int j=1;j<=p_subdivs;j++) {
-
- real_t frac = j/(real_t)p_subdivs;
- Vector2 p = interpolate(i,frac);
- real_t d = p.distance_to(prev_p);
-
- accum+=d;
- if (accum>p_offset) {
-
-
- r_index=j-1;
- if (d>0) {
- real_t mf = (p_offset-(accum-d)) / d;
- r_pos=frac-(1.0-mf);
- } else {
- r_pos=frac;
- }
-
- return;
- }
-
- prev_p=p;
- }
- }
-
- r_index=points.size()-1;
- r_pos=1.0;
-
-
-}
-
-void Curve2D::set_points_in(const Vector2Array& p_points) {
-
- points.resize(p_points.size());
- for (int i=0; i<p_points.size(); i++) {
-
- Point p = points[i];
- p.in = p_points[i];
- points[i] = p;
- };
-};
-
-void Curve2D::set_points_out(const Vector2Array& p_points) {
-
- points.resize(p_points.size());
- for (int i=0; i<p_points.size(); i++) {
-
- Point p = points[i];
- p.out = p_points[i];
- points[i] = p;
- };
-};
-
-void Curve2D::set_points_pos(const Vector2Array& p_points) {
-
- points.resize(p_points.size());
- for (int i=0; i<p_points.size(); i++) {
-
- Point p = points[i];
- p.pos = p_points[i];
- points[i] = p;
- };
-};
-
-Vector2Array Curve2D::get_points_in() const {
- Vector2Array ret;
- ret.resize(points.size());
- for (int i=0; i<points.size(); i++) {
- ret.set(i, points[i].in);
- };
- return ret;
-};
-
-Vector2Array Curve2D::get_points_out() const {
- Vector2Array ret;
- ret.resize(points.size());
- for (int i=0; i<points.size(); i++) {
- ret.set(i, points[i].out);
- };
- return ret;
-};
-
-Vector2Array Curve2D::get_points_pos() const {
- Vector2Array ret;
- ret.resize(points.size());
- for (int i=0; i<points.size(); i++) {
- ret.set(i, points[i].pos);
- };
- return ret;
-};
-
-
-void Curve2D::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("get_point_count"),&Curve2D::get_point_count);
- ClassDB::bind_method(D_METHOD("add_point","pos","in","out"),&Curve2D::add_point,DEFVAL(Vector2()),DEFVAL(Vector2()));
- ClassDB::bind_method(D_METHOD("set_point_pos","idx","pos"),&Curve2D::set_point_pos);
- ClassDB::bind_method(D_METHOD("get_point_pos","idx"),&Curve2D::get_point_pos);
- ClassDB::bind_method(D_METHOD("set_point_in","idx","pos"),&Curve2D::set_point_in);
- ClassDB::bind_method(D_METHOD("get_point_in","idx"),&Curve2D::get_point_in);
- ClassDB::bind_method(D_METHOD("set_point_out","idx","pos"),&Curve2D::set_point_out);
- ClassDB::bind_method(D_METHOD("get_point_out","idx"),&Curve2D::get_point_out);
- ClassDB::bind_method(D_METHOD("remove_point","idx"),&Curve2D::remove_point);
- ClassDB::bind_method(D_METHOD("interpolate","idx","t"),&Curve2D::interpolate);
- ClassDB::bind_method(D_METHOD("bake","subdivs"),&Curve2D::bake,DEFVAL(10));
-
-
- ClassDB::bind_method(D_METHOD("set_points_in"),&Curve2D::set_points_in);
- ClassDB::bind_method(D_METHOD("set_points_out"),&Curve2D::set_points_out);
- ClassDB::bind_method(D_METHOD("set_points_pos"),&Curve2D::set_points_pos);
-
- ClassDB::bind_method(D_METHOD("get_points_in"),&Curve2D::get_points_in);
- ClassDB::bind_method(D_METHOD("get_points_out"),&Curve2D::get_points_out);
- ClassDB::bind_method(D_METHOD("get_points_pos"),&Curve2D::get_points_pos);
-
- ADD_PROPERTY( PropertyInfo( Variant::VECTOR2_ARRAY, "points_in"), "set_points_in","get_points_in");
- ADD_PROPERTY( PropertyInfo( Variant::VECTOR2_ARRAY, "points_out"), "set_points_out","get_points_out");
- ADD_PROPERTY( PropertyInfo( Variant::VECTOR2_ARRAY, "points_pos"), "set_points_pos","get_points_pos");
-}
-
-
-Curve2D::Curve2D()
-{
-}
-
-#endif
-
const char *Curve::SIGNAL_RANGE_CHANGED = "range_changed";
Curve::Curve() {
diff --git a/scene/resources/curve.h b/scene/resources/curve.h
index e302f1e0af..3071aee5de 100644
--- a/scene/resources/curve.h
+++ b/scene/resources/curve.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -31,56 +31,6 @@
#define CURVE_H
#include "resource.h"
-#if 0
-class Curve2D : public Resource {
-
- GDCLASS(Curve2D,Resource);
-
- struct Point {
-
- Vector2 in;
- Vector2 out;
- Vector2 pos;
- };
-
-
- Vector<Point> points;
-
-protected:
-
- static void _bind_methods();
-
- void set_points_in(const Vector2Array& p_points_in);
- void set_points_out(const Vector2Array& p_points_out);
- void set_points_pos(const Vector2Array& p_points_pos);
-
- Vector2Array get_points_in() const;
- Vector2Array get_points_out() const;
- Vector2Array get_points_pos() const;
-
-public:
-
-
- int get_point_count() const;
- void add_point(const Vector2& p_pos, const Vector2& p_in=Vector2(), const Vector2& p_out=Vector2());
- void set_point_pos(int p_index, const Vector2& p_pos);
- Vector2 get_point_pos(int p_index) const;
- void set_point_in(int p_index, const Vector2& p_in);
- Vector2 get_point_in(int p_index) const;
- void set_point_out(int p_index, const Vector2& p_out);
- Vector2 get_point_out(int p_index) const;
- void remove_point(int p_index);
-
- Vector2 interpolate(int p_index, float p_offset) const;
- Vector2 interpolatef(real_t p_findex) const;
- PoolVector<Point2> bake(int p_subdivs=10) const;
- void advance(real_t p_distance,int &r_index, real_t &r_pos) const;
- void get_approx_position_from_offset(real_t p_offset,int &r_index, real_t &r_pos,int p_subdivs=16) const;
-
- Curve2D();
-};
-
-#endif
// y(x) curve
class Curve : public Resource {
diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp
index 03288e45bf..4ff635edeb 100644
--- a/scene/resources/default_theme/default_theme.cpp
+++ b/scene/resources/default_theme/default_theme.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -408,6 +408,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
// Label
+ theme->set_stylebox("normal", "Label", memnew(StyleBoxEmpty));
theme->set_font("font", "Label", default_font);
theme->set_color("font_color", "Label", Color(1, 1, 1));
@@ -525,7 +526,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
theme->set_stylebox("slider", "VSlider", make_stylebox(vslider_bg_png, 4, 4, 4, 4));
theme->set_stylebox("grabber_highlight", "VSlider", make_stylebox(vslider_grabber_hl_png, 6, 6, 6, 6));
theme->set_stylebox("grabber_disabled", "VSlider", make_stylebox(vslider_grabber_disabled_png, 6, 6, 6, 6));
- theme->set_stylebox("focus", "HSlider", focus);
+ theme->set_stylebox("focus", "VSlider", focus);
theme->set_icon("grabber", "VSlider", make_icon(vslider_grabber_png));
theme->set_icon("grabber_highlight", "VSlider", make_icon(vslider_grabber_hl_png));
diff --git a/scene/resources/default_theme/default_theme.h b/scene/resources/default_theme/default_theme.h
index 6fd57b6f22..f2a4b2616d 100644
--- a/scene/resources/default_theme/default_theme.h
+++ b/scene/resources/default_theme/default_theme.h
@@ -1,9 +1,9 @@
/*************************************************************************/
-/* default_theme.cpp */
+/* default_theme.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index 57b860583e..82739b58a0 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/dynamic_font.h b/scene/resources/dynamic_font.h
index b8ff2845e7..52c3f30590 100644
--- a/scene/resources/dynamic_font.h
+++ b/scene/resources/dynamic_font.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/dynamic_font_stb.cpp b/scene/resources/dynamic_font_stb.cpp
index fa8cf4723b..91263fb125 100644
--- a/scene/resources/dynamic_font_stb.cpp
+++ b/scene/resources/dynamic_font_stb.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/dynamic_font_stb.h b/scene/resources/dynamic_font_stb.h
index a2c081a925..24d764e716 100644
--- a/scene/resources/dynamic_font_stb.h
+++ b/scene/resources/dynamic_font_stb.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp
index 60a700aad8..14225d945d 100644
--- a/scene/resources/environment.cpp
+++ b/scene/resources/environment.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -994,10 +994,10 @@ void Environment::_bind_methods() {
ADD_GROUP("SSAO", "ssao_");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "ssao_enabled"), "set_ssao_enabled", "is_ssao_enabled");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_radius", PROPERTY_HINT_RANGE, "0.1,16,0.1"), "set_ssao_radius", "get_ssao_radius");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_intensity", PROPERTY_HINT_RANGE, "0.0,9,0.1"), "set_ssao_intensity", "get_ssao_intensity");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_radius2", PROPERTY_HINT_RANGE, "0.0,16,0.1"), "set_ssao_radius2", "get_ssao_radius2");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_intensity2", PROPERTY_HINT_RANGE, "0.0,9,0.1"), "set_ssao_intensity2", "get_ssao_intensity2");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_radius", PROPERTY_HINT_RANGE, "0.1,128,0.1"), "set_ssao_radius", "get_ssao_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_intensity", PROPERTY_HINT_RANGE, "0.0,128,0.1"), "set_ssao_intensity", "get_ssao_intensity");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_radius2", PROPERTY_HINT_RANGE, "0.0,128,0.1"), "set_ssao_radius2", "get_ssao_radius2");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "ssao_intensity2", PROPERTY_HINT_RANGE, "0.0,128,0.1"), "set_ssao_intensity2", "get_ssao_intensity2");
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");
diff --git a/scene/resources/environment.h b/scene/resources/environment.h
index 3a6906aa27..6337981b95 100644
--- a/scene/resources/environment.h
+++ b/scene/resources/environment.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index 035e514eac..ea75748b3d 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -40,7 +40,7 @@ void Font::draw_halign(RID p_canvas_item, const Point2 &p_pos, HAlign p_align, f
return;
}
- float ofs;
+ float ofs = 0.f;
switch (p_align) {
case HALIGN_LEFT: {
ofs = 0;
@@ -51,6 +51,9 @@ void Font::draw_halign(RID p_canvas_item, const Point2 &p_pos, HAlign p_align, f
case HALIGN_RIGHT: {
ofs = p_width - length;
} break;
+ default: {
+ ERR_PRINT("Unknown halignment type");
+ } break;
}
draw(p_canvas_item, p_pos + Point2(ofs, 0), p_text, p_modulate, p_width);
}
diff --git a/scene/resources/font.h b/scene/resources/font.h
index a04ffbdd4b..3bb7aeac85 100644
--- a/scene/resources/font.h
+++ b/scene/resources/font.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/gibberish_stream.cpp b/scene/resources/gibberish_stream.cpp
deleted file mode 100644
index e2994f1419..0000000000
--- a/scene/resources/gibberish_stream.cpp
+++ /dev/null
@@ -1,337 +0,0 @@
-/*************************************************************************/
-/* gibberish_stream.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#include "gibberish_stream.h"
-#include "servers/audio_server.h"
-
-//TODO: This class needs to be adapted to the new AudioStream API,
-// or dropped if nobody cares about fixing it :) (GH-3307)
-
-#if 0
-
-int AudioStreamGibberish::get_channel_count() const {
-
- return 1;
-}
-
-
-static float _get_vol_at_pos(int p_pos, int p_len, int p_x_fade) {
-
- if (p_pos < p_x_fade)
- return float(p_pos)/p_x_fade;
- else if (p_pos>(p_len-p_x_fade))
- return float(p_len-p_pos)/p_x_fade;
- else
- return 1.0;
-
-}
- int AudioStreamGibberish::randomize() {
-
- if (rand_idx==_rand_pool.size()) {
-
- for(int i=0;i<_rand_pool.size();i++) {
-
- SWAP(_rand_pool[i],_rand_pool[Math::rand()%_rand_pool.size()]);
- }
- rand_idx=0;
- }
-
- return _rand_pool[rand_idx++];
-}
-
-bool AudioStreamGibberish::mix(int32_t *p_buffer, int p_frames) {
-
- if (!active)
- return false;
-
- zeromem(p_buffer,p_frames*sizeof(int32_t));
-
- if (!paused && active_voices==0) {
-
- active_voices=1;
- playback[0].idx=randomize();
- playback[0].fp_pos=0;
- playback[0].scale=Math::random(1,1+pitch_random_scale);
- }
-
- for(int i=0;i<active_voices;i++) {
-
- RID s = _samples[playback[i].idx]->get_rid();
-
- uint64_t fp_pos=playback[i].fp_pos;
- const void *data = AudioServer::get_singleton()->sample_get_data_ptr(s);
- bool is16 = AudioServer::get_singleton()->sample_get_format(s)==AudioServer::SAMPLE_FORMAT_PCM16;
- int skip = AudioServer::get_singleton()->sample_is_stereo(s) ? 1: 0;
- uint64_t max = AudioServer::get_singleton()->sample_get_length(s) * uint64_t(FP_LEN);
- int mrate = AudioServer::get_singleton()->sample_get_mix_rate(s) * pitch_scale * playback[i].scale;
- uint64_t increment = uint64_t(mrate) * uint64_t(FP_LEN) / get_mix_rate();
-
-
- float vol_begin = _get_vol_at_pos(fp_pos>>FP_BITS,max>>FP_BITS,xfade_time*mrate);
- float vol_end = _get_vol_at_pos((fp_pos+p_frames*increment)>>FP_BITS,max>>FP_BITS,xfade_time*mrate);
-
- int32_t vol = CLAMP(int32_t(vol_begin * 65535),0,65535);
- int32_t vol_to = CLAMP(int32_t(vol_end * 65535),0,65535);
- int32_t vol_inc = (vol_to-vol)/p_frames;
-
- bool done=false;
-
- if (is16) {
-
- const int16_t *smp = (int16_t*)data;
- for(int i=0;i<p_frames;i++) {
-
- if (fp_pos >= max) {
- done=true;
- break;
- }
-
- int idx = (fp_pos>>FP_BITS)<<skip;
- p_buffer[i]+=int32_t(smp[idx])*vol;
- vol+=vol_inc;
-
- fp_pos+=increment;
- }
- } else {
-
- const int8_t *smp = (int8_t*)data;
- for(int i=0;i<p_frames;i++) {
-
- if (fp_pos >= max) {
- done=true;
- break;
- }
-
- int idx = (fp_pos>>FP_BITS)<<skip;
- p_buffer[i]+=(int32_t(smp[idx])<<8)*vol;
- vol+=vol_inc;
- fp_pos+=increment;
- }
-
- }
-
- playback[i].fp_pos=fp_pos;
- if (!paused && active_voices==1 && (vol_end < vol_begin || done)) {
- //xfade to something else i gues
- active_voices=2;
- playback[1].idx=randomize();
- playback[1].fp_pos=0;
- playback[1].scale=Math::random(1,1+pitch_random_scale);
- }
-
- if (done) {
-
- if (i==0 && active_voices==2) {
- playback[0]=playback[1];
- i--;
- }
- active_voices--;
-
- }
- }
-
- return true;
-}
-
-
-void AudioStreamGibberish::play() {
- if (active)
- stop();
-
-
- if (!phonemes.is_valid())
- return;
-
-
- List<StringName> slist;
- phonemes->get_sample_list(&slist);
- if (slist.size()==0)
- return;
-
- _samples.resize(slist.size());
- _rand_pool.resize(slist.size());
-
- int i=0;
- for(List<StringName>::Element *E=slist.front();E;E=E->next()) {
-
- _rand_pool[i]=i;
- _samples[i++]=phonemes->get_sample(E->get());
- }
-
- rand_idx=0;
- active_voices=0;
- active=true;
-}
-
-void AudioStreamGibberish::stop(){
-
- active=false;
-
-
-}
-
-bool AudioStreamGibberish::is_playing() const {
-
- return active;
-}
-
-
-void AudioStreamGibberish::set_paused(bool p_paused){
-
- paused=p_paused;
-}
-
-bool AudioStreamGibberish::is_paused(bool p_paused) const{
-
- return paused;
-}
-
-void AudioStreamGibberish::set_loop(bool p_enable){
-
-
-}
-
-bool AudioStreamGibberish::has_loop() const{
-
- return false;
-}
-
-
-float AudioStreamGibberish::get_length() const{
-
- return 0;
-}
-
-
-String AudioStreamGibberish::get_stream_name() const{
-
- return "Gibberish";
-}
-
-
-int AudioStreamGibberish::get_loop_count() const{
-
- return 0;
-}
-
-
-float AudioStreamGibberish::get_pos() const{
-
- return 0;
-}
-
-void AudioStreamGibberish::seek_pos(float p_time){
-
-
-}
-
-
-AudioStream::UpdateMode AudioStreamGibberish::get_update_mode() const{
-
- return AudioStream::UPDATE_NONE;
-}
-
-void AudioStreamGibberish::update(){
-
-
-}
-
-
-void AudioStreamGibberish::set_phonemes(const Ref<SampleLibrary>& p_phonemes) {
-
- phonemes=p_phonemes;
-
-}
-
-Ref<SampleLibrary> AudioStreamGibberish::get_phonemes() const {
-
- return phonemes;
-}
-
-void AudioStreamGibberish::set_xfade_time(float p_xfade) {
-
- xfade_time=p_xfade;
-}
-
-float AudioStreamGibberish::get_xfade_time() const {
-
- return xfade_time;
-}
-
-void AudioStreamGibberish::set_pitch_scale(float p_scale) {
-
- pitch_scale=p_scale;
-}
-
-float AudioStreamGibberish::get_pitch_scale() const {
-
- return pitch_scale;
-}
-
-void AudioStreamGibberish::set_pitch_random_scale(float p_random_scale) {
-
- pitch_random_scale=p_random_scale;
-}
-
-float AudioStreamGibberish::get_pitch_random_scale() const {
-
- return pitch_random_scale;
-}
-
-void AudioStreamGibberish::_bind_methods() {
-
- ClassDB::bind_method(D_METHOD("set_phonemes","phonemes"),&AudioStreamGibberish::set_phonemes);
- ClassDB::bind_method(D_METHOD("get_phonemes"),&AudioStreamGibberish::get_phonemes);
-
- ClassDB::bind_method(D_METHOD("set_pitch_scale","pitch_scale"),&AudioStreamGibberish::set_pitch_scale);
- ClassDB::bind_method(D_METHOD("get_pitch_scale"),&AudioStreamGibberish::get_pitch_scale);
-
- ClassDB::bind_method(D_METHOD("set_pitch_random_scale","pitch_random_scale"),&AudioStreamGibberish::set_pitch_random_scale);
- ClassDB::bind_method(D_METHOD("get_pitch_random_scale"),&AudioStreamGibberish::get_pitch_random_scale);
-
- ClassDB::bind_method(D_METHOD("set_xfade_time","sec"),&AudioStreamGibberish::set_xfade_time);
- ClassDB::bind_method(D_METHOD("get_xfade_time"),&AudioStreamGibberish::get_xfade_time);
-
- ADD_PROPERTY( PropertyInfo(Variant::OBJECT,"phonemes",PROPERTY_HINT_RESOURCE_TYPE,"SampleLibrary"),"set_phonemes","get_phonemes");
- ADD_PROPERTY( PropertyInfo(Variant::REAL,"pitch_scale",PROPERTY_HINT_RANGE,"0.01,64,0.01"),"set_pitch_scale","get_pitch_scale");
- ADD_PROPERTY( PropertyInfo(Variant::REAL,"pitch_random_scale",PROPERTY_HINT_RANGE,"0,64,0.01"),"set_pitch_random_scale","get_pitch_random_scale");
- ADD_PROPERTY( PropertyInfo(Variant::REAL,"xfade_sec",PROPERTY_HINT_RANGE,"0.001,0.5,0.001"),"set_xfade_time","get_xfade_time");
-
-}
-
-AudioStreamGibberish::AudioStreamGibberish() {
-
- xfade_time=0.1;
- pitch_scale=1;
- pitch_random_scale=0;
- active=false;
- paused=false;
- active_voices=0;
-}
-#endif
diff --git a/scene/resources/gibberish_stream.h b/scene/resources/gibberish_stream.h
deleted file mode 100644
index ebe61382eb..0000000000
--- a/scene/resources/gibberish_stream.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*************************************************************************/
-/* gibberish_stream.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* http://www.godotengine.org */
-/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
-/* */
-/* Permission is hereby granted, free of charge, to any person obtaining */
-/* a copy of this software and associated documentation files (the */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-#ifndef GIBBERISH_STREAM_H
-#define GIBBERISH_STREAM_H
-
-//TODO: This class needs to be adapted to the new AudioStream API,
-// or dropped if nobody cares about fixing it :) (GH-3307)
-
-#if 0
-#include "scene/resources/audio_stream.h"
-#include "scene/resources/sample_library.h"
-class AudioStreamGibberish : public AudioStream {
-
- GDCLASS( AudioStreamGibberish, AudioStream );
-
- enum {
-
- FP_BITS = 12,
- FP_LEN = (1<<12),
- };
- bool active;
- bool paused;
-
- float xfade_time;
- float pitch_scale;
- float pitch_random_scale;
- Vector<Ref<Sample> > _samples;
- Vector<int> _rand_pool;
- int rand_idx;
- _FORCE_INLINE_ int randomize();
-
- struct Playback {
-
- int idx;
- uint64_t fp_pos;
- float scale;
- };
-
- Playback playback[2];
- int active_voices;
-
- Ref<SampleLibrary> phonemes;
-protected:
-
- virtual int get_channel_count() const;
- virtual bool mix(int32_t *p_buffer, int p_frames);
-
- static void _bind_methods();
-
-public:
-
- void set_phonemes(const Ref<SampleLibrary>& p_phonemes);
- Ref<SampleLibrary> get_phonemes() const;
-
- virtual void play();
- virtual void stop();
- virtual bool is_playing() const;
-
- virtual void set_paused(bool p_paused);
- virtual bool is_paused(bool p_paused) const;
-
- virtual void set_loop(bool p_enable);
- virtual bool has_loop() const;
-
- virtual float get_length() const;
-
- virtual String get_stream_name() const;
-
- virtual int get_loop_count() const;
-
- virtual float get_pos() const;
- virtual void seek_pos(float p_time);
-
- virtual UpdateMode get_update_mode() const;
- virtual void update();
-
- void set_xfade_time(float p_xfade);
- float get_xfade_time() const;
-
- void set_pitch_scale(float p_scale);
- float get_pitch_scale() const;
-
- void set_pitch_random_scale(float p_random_scale);
- float get_pitch_random_scale() const;
-
- AudioStreamGibberish();
-};
-
-#endif
-
-#endif // GIBBERISH_STREAM_H
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 555c94a512..f3d790eef5 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "material.h"
+
#include "scene/scene_string_names.h"
void Material::set_next_pass(const Ref<Material> &p_pass) {
@@ -47,6 +48,19 @@ Ref<Material> Material::get_next_pass() const {
return next_pass;
}
+void Material::set_render_priority(int p_priority) {
+
+ ERR_FAIL_COND(p_priority < RENDER_PRIORITY_MIN);
+ ERR_FAIL_COND(p_priority > RENDER_PRIORITY_MAX);
+ render_priority = p_priority;
+ VS::get_singleton()->material_set_render_priority(material, p_priority);
+}
+
+int Material::get_render_priority() const {
+
+ return render_priority;
+}
+
RID Material::get_rid() const {
return material;
@@ -57,12 +71,20 @@ void Material::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_next_pass", "next_pass"), &Material::set_next_pass);
ClassDB::bind_method(D_METHOD("get_next_pass"), &Material::get_next_pass);
+ ClassDB::bind_method(D_METHOD("set_render_priority", "priority"), &Material::set_render_priority);
+ ClassDB::bind_method(D_METHOD("get_render_priority"), &Material::get_render_priority);
+
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "render_priority", PROPERTY_HINT_RANGE, itos(RENDER_PRIORITY_MIN) + "," + itos(RENDER_PRIORITY_MAX) + ",1"), "set_render_priority", "get_render_priority");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "next_pass", PROPERTY_HINT_RESOURCE_TYPE, "Material"), "set_next_pass", "get_next_pass");
+
+ BIND_CONSTANT(RENDER_PRIORITY_MAX);
+ BIND_CONSTANT(RENDER_PRIORITY_MIN);
}
Material::Material() {
material = VisualServer::get_singleton()->material_create();
+ render_priority = 0;
}
Material::~Material() {
@@ -226,8 +248,8 @@ void SpatialMaterial::init_shaders() {
shader_names->uv1_blend_sharpness = "uv1_blend_sharpness";
shader_names->uv2_blend_sharpness = "uv2_blend_sharpness";
- shader_names->particle_h_frames = "particle_h_frames";
- shader_names->particle_v_frames = "particle_v_frames";
+ shader_names->particles_anim_h_frames = "particles_anim_h_frames";
+ shader_names->particles_anim_v_frames = "particles_anim_v_frames";
shader_names->particles_anim_loop = "particles_anim_loop";
shader_names->depth_min_layers = "depth_min_layers";
shader_names->depth_max_layers = "depth_max_layers";
@@ -346,14 +368,14 @@ void SpatialMaterial::_update_shader() {
if (flags[FLAG_UNSHADED]) {
code += ",unshaded";
}
- if (flags[FLAG_ONTOP]) {
- code += ",ontop";
+ if (flags[FLAG_DISABLE_DEPTH_TEST]) {
+ code += ",depth_test_disable";
}
if (flags[FLAG_USE_VERTEX_LIGHTING]) {
code += ",vertex_lighting";
}
- if (flags[FLAG_UV1_USE_TRIPLANAR] || flags[FLAG_UV2_USE_TRIPLANAR]) {
+ if (flags[FLAG_TRIPLANAR_USE_WORLD] && (flags[FLAG_UV1_USE_TRIPLANAR] || flags[FLAG_UV2_USE_TRIPLANAR])) {
code += ",world_vertex_coords";
}
code += ";\n";
@@ -436,10 +458,10 @@ void SpatialMaterial::_update_shader() {
code += "uniform int depth_max_layers;\n";
}
if (flags[FLAG_UV1_USE_TRIPLANAR]) {
- code += "varying vec3 uv1_world_pos;\n";
+ code += "varying vec3 uv1_triplanar_pos;\n";
}
if (flags[FLAG_UV2_USE_TRIPLANAR]) {
- code += "varying vec3 uv2_world_pos;\n";
+ code += "varying vec3 uv2_triplanar_pos;\n";
}
if (flags[FLAG_UV1_USE_TRIPLANAR]) {
code += "uniform float uv1_blend_sharpness;\n";
@@ -502,8 +524,8 @@ void SpatialMaterial::_update_shader() {
code += "\tint particle_total_frames = particles_anim_h_frames * particles_anim_v_frames;\n";
code += "\tint particle_frame = int(INSTANCE_CUSTOM.y * float(particle_total_frames));\n";
code += "\tif (particles_anim_loop) particle_frame=clamp(particle_frame,0,particle_total_frames-1); else particle_frame=abs(particle_frame)%particle_total_frames;\n";
- //code += "\tUV /= vec2(float(particles_anim_h_frames),float(particles_anim_v_frames));\n";
- //code += "\tUV+= UV * vec2(float(particle_frame % particles_anim_h_frames),float(particle_frame / particles_anim_v_frames));\n";
+ code += "\tUV /= vec2(float(particles_anim_h_frames),float(particles_anim_v_frames));\n";
+ code += "\tUV += vec2(float(particle_frame % particles_anim_h_frames) / float(particles_anim_h_frames),float(particle_frame / particles_anim_h_frames) / float(particles_anim_v_frames));\n";
//handle rotation
// code += "\tmat4 rotation = mat4("
} break;
@@ -529,7 +551,7 @@ void SpatialMaterial::_update_shader() {
}
if (detail_uv == DETAIL_UV_2 && !flags[FLAG_UV2_USE_TRIPLANAR]) {
- code += "\tUV2=UV2*uv2_scale+uv2_offset;\n";
+ code += "\tUV2=UV2*uv2_scale.xy+uv2_offset.xy;\n";
}
if (flags[FLAG_UV1_USE_TRIPLANAR] || flags[FLAG_UV2_USE_TRIPLANAR]) {
//generate tangent and binormal in world space
@@ -548,16 +570,16 @@ void SpatialMaterial::_update_shader() {
code += "\tuv1_power_normal=pow(abs(NORMAL),vec3(uv1_blend_sharpness));\n";
code += "\tuv1_power_normal/=dot(uv1_power_normal,vec3(1.0));\n";
- code += "\tuv1_world_pos = VERTEX * uv1_scale + uv1_offset;\n";
- code += "\tuv1_world_pos *= vec3(1.0,-1.0, 1.0);\n";
+ code += "\tuv1_triplanar_pos = VERTEX * uv1_scale + uv1_offset;\n";
+ code += "\tuv1_triplanar_pos *= vec3(1.0,-1.0, 1.0);\n";
}
if (flags[FLAG_UV2_USE_TRIPLANAR]) {
code += "\tuv2_power_normal=pow(abs(NORMAL), vec3(uv2_blend_sharpness));\n";
code += "\tuv2_power_normal/=dot(uv2_power_normal,vec3(1.0));\n";
- code += "\tuv2_world_pos = VERTEX * uv2_scale + uv2_offset;\n";
- code += "\tuv2_world_pos *= vec3(1.0,-1.0, 1.0);\n";
+ code += "\tuv2_triplanar_pos = VERTEX * uv2_scale + uv2_offset;\n";
+ code += "\tuv2_triplanar_pos *= vec3(1.0,-1.0, 1.0);\n";
}
if (grow_enabled) {
@@ -567,11 +589,11 @@ void SpatialMaterial::_update_shader() {
code += "}\n";
code += "\n\n";
if (flags[FLAG_UV1_USE_TRIPLANAR] || flags[FLAG_UV2_USE_TRIPLANAR]) {
- code += "vec4 triplanar_texture(sampler2D p_sampler,vec3 p_weights,vec3 p_world_pos) {\n";
+ code += "vec4 triplanar_texture(sampler2D p_sampler,vec3 p_weights,vec3 p_triplanar_pos) {\n";
code += "\tvec4 samp=vec4(0.0);\n";
- code += "\tsamp+= texture(p_sampler,p_world_pos.xy) * p_weights.z;\n";
- code += "\tsamp+= texture(p_sampler,p_world_pos.xz) * p_weights.y;\n";
- code += "\tsamp+= texture(p_sampler,p_world_pos.zy * vec2(-1.0,1.0)) * p_weights.x;\n";
+ code += "\tsamp+= texture(p_sampler,p_triplanar_pos.xy) * p_weights.z;\n";
+ code += "\tsamp+= texture(p_sampler,p_triplanar_pos.xz) * p_weights.y;\n";
+ code += "\tsamp+= texture(p_sampler,p_triplanar_pos.zy * vec2(-1.0,1.0)) * p_weights.x;\n";
code += "\treturn samp;\n";
code += "}\n";
}
@@ -627,7 +649,7 @@ void SpatialMaterial::_update_shader() {
code += "\tvec4 albedo_tex = texture(texture_albedo,POINT_COORD);\n";
} else {
if (flags[FLAG_UV1_USE_TRIPLANAR]) {
- code += "\tvec4 albedo_tex = triplanar_texture(texture_albedo,uv1_power_normal,uv1_world_pos);\n";
+ code += "\tvec4 albedo_tex = triplanar_texture(texture_albedo,uv1_power_normal,uv1_triplanar_pos);\n";
} else {
code += "\tvec4 albedo_tex = texture(texture_albedo,base_uv);\n";
}
@@ -639,13 +661,13 @@ void SpatialMaterial::_update_shader() {
code += "\tALBEDO = albedo.rgb * albedo_tex.rgb;\n";
if (flags[FLAG_UV1_USE_TRIPLANAR]) {
- code += "\tfloat metallic_tex = dot(triplanar_texture(texture_metallic,uv1_power_normal,uv1_world_pos),metallic_texture_channel);\n";
+ code += "\tfloat metallic_tex = dot(triplanar_texture(texture_metallic,uv1_power_normal,uv1_triplanar_pos),metallic_texture_channel);\n";
} else {
code += "\tfloat metallic_tex = dot(texture(texture_metallic,base_uv),metallic_texture_channel);\n";
}
code += "\tMETALLIC = metallic_tex * metallic;\n";
if (flags[FLAG_UV1_USE_TRIPLANAR]) {
- code += "\tfloat roughness_tex = dot(triplanar_texture(texture_roughness,uv1_power_normal,uv1_world_pos),roughness_texture_channel);\n";
+ code += "\tfloat roughness_tex = dot(triplanar_texture(texture_roughness,uv1_power_normal,uv1_triplanar_pos),roughness_texture_channel);\n";
} else {
code += "\tfloat roughness_tex = dot(texture(texture_roughness,base_uv),roughness_texture_channel);\n";
}
@@ -654,7 +676,7 @@ void SpatialMaterial::_update_shader() {
if (features[FEATURE_NORMAL_MAPPING]) {
if (flags[FLAG_UV1_USE_TRIPLANAR]) {
- code += "\tNORMALMAP = triplanar_texture(texture_normal,uv1_power_normal,uv1_world_pos).rgb;\n";
+ code += "\tNORMALMAP = triplanar_texture(texture_normal,uv1_power_normal,uv1_triplanar_pos).rgb;\n";
} else {
code += "\tNORMALMAP = texture(texture_normal,base_uv).rgb;\n";
}
@@ -663,7 +685,7 @@ void SpatialMaterial::_update_shader() {
if (features[FEATURE_EMISSION]) {
if (flags[FLAG_UV1_USE_TRIPLANAR]) {
- code += "\tvec3 emission_tex = triplanar_texture(texture_emission,uv1_power_normal,uv1_world_pos).rgb;\n";
+ code += "\tvec3 emission_tex = triplanar_texture(texture_emission,uv1_power_normal,uv1_triplanar_pos).rgb;\n";
} else {
code += "\tvec3 emission_tex = texture(texture_emission,base_uv).rgb;\n";
}
@@ -690,7 +712,7 @@ void SpatialMaterial::_update_shader() {
if (features[FEATURE_RIM]) {
if (flags[FLAG_UV1_USE_TRIPLANAR]) {
- code += "\tvec2 rim_tex = triplanar_texture(texture_rim,uv1_power_normal,uv1_world_pos).xy;\n";
+ code += "\tvec2 rim_tex = triplanar_texture(texture_rim,uv1_power_normal,uv1_triplanar_pos).xy;\n";
} else {
code += "\tvec2 rim_tex = texture(texture_rim,base_uv).xy;\n";
}
@@ -700,7 +722,7 @@ void SpatialMaterial::_update_shader() {
if (features[FEATURE_CLEARCOAT]) {
if (flags[FLAG_UV1_USE_TRIPLANAR]) {
- code += "\tvec2 clearcoat_tex = triplanar_texture(texture_clearcoat,uv1_power_normal,uv1_world_pos).xy;\n";
+ code += "\tvec2 clearcoat_tex = triplanar_texture(texture_clearcoat,uv1_power_normal,uv1_triplanar_pos).xy;\n";
} else {
code += "\tvec2 clearcoat_tex = texture(texture_clearcoat,base_uv).xy;\n";
}
@@ -710,7 +732,7 @@ void SpatialMaterial::_update_shader() {
if (features[FEATURE_ANISOTROPY]) {
if (flags[FLAG_UV1_USE_TRIPLANAR]) {
- code += "\tvec3 anisotropy_tex = triplanar_texture(texture_flowmap,uv1_power_normal,uv1_world_pos).rga;\n";
+ code += "\tvec3 anisotropy_tex = triplanar_texture(texture_flowmap,uv1_power_normal,uv1_triplanar_pos).rga;\n";
} else {
code += "\tvec3 anisotropy_tex = texture(texture_flowmap,base_uv).rga;\n";
}
@@ -721,13 +743,13 @@ void SpatialMaterial::_update_shader() {
if (features[FEATURE_AMBIENT_OCCLUSION]) {
if (flags[FLAG_AO_ON_UV2]) {
if (flags[FLAG_UV2_USE_TRIPLANAR]) {
- code += "\tAO = dot(triplanar_texture(texture_ambient_occlusion,uv2_power_normal,uv2_world_pos),ao_texture_channel);\n";
+ code += "\tAO = dot(triplanar_texture(texture_ambient_occlusion,uv2_power_normal,uv2_triplanar_pos),ao_texture_channel);\n";
} else {
code += "\tAO = dot(texture(texture_ambient_occlusion,base_uv2),ao_texture_channel);\n";
}
} else {
if (flags[FLAG_UV1_USE_TRIPLANAR]) {
- code += "\tAO = dot(triplanar_texture(texture_ambient_occlusion,uv1_power_normal,uv1_world_pos),ao_texture_channel);\n";
+ code += "\tAO = dot(triplanar_texture(texture_ambient_occlusion,uv1_power_normal,uv1_triplanar_pos),ao_texture_channel);\n";
} else {
code += "\tAO = dot(texture(texture_ambient_occlusion,base_uv),ao_texture_channel);\n";
}
@@ -737,7 +759,7 @@ void SpatialMaterial::_update_shader() {
if (features[FEATURE_SUBSURACE_SCATTERING]) {
if (flags[FLAG_UV1_USE_TRIPLANAR]) {
- code += "\tfloat sss_tex = triplanar_texture(texture_subsurface_scattering,uv1_power_normal,uv1_world_pos).r;\n";
+ code += "\tfloat sss_tex = triplanar_texture(texture_subsurface_scattering,uv1_power_normal,uv1_triplanar_pos).r;\n";
} else {
code += "\tfloat sss_tex = texture(texture_subsurface_scattering,base_uv).r;\n";
}
@@ -750,8 +772,8 @@ void SpatialMaterial::_update_shader() {
if (triplanar) {
String tp_uv = detail_uv == DETAIL_UV_1 ? "uv1" : "uv2";
- code += "\tvec4 detail_tex = triplanar_texture(texture_detail_albedo," + tp_uv + "_power_normal," + tp_uv + "_world_pos);\n";
- code += "\tvec4 detail_norm_tex = triplanar_texture(texture_detail_normal," + tp_uv + "_power_normal," + tp_uv + "_world_pos);\n";
+ code += "\tvec4 detail_tex = triplanar_texture(texture_detail_albedo," + tp_uv + "_power_normal," + tp_uv + "_triplanar_pos);\n";
+ code += "\tvec4 detail_norm_tex = triplanar_texture(texture_detail_normal," + tp_uv + "_power_normal," + tp_uv + "_triplanar_pos);\n";
} else {
String det_uv = detail_uv == DETAIL_UV_1 ? "base_uv" : "base_uv2";
@@ -1280,7 +1302,7 @@ SpatialMaterial::BillboardMode SpatialMaterial::get_billboard_mode() const {
void SpatialMaterial::set_particles_anim_h_frames(int p_frames) {
particles_anim_h_frames = p_frames;
- VS::get_singleton()->material_set_param(_get_material(), shader_names->particle_h_frames, p_frames);
+ VS::get_singleton()->material_set_param(_get_material(), shader_names->particles_anim_h_frames, p_frames);
}
int SpatialMaterial::get_particles_anim_h_frames() const {
@@ -1290,7 +1312,7 @@ int SpatialMaterial::get_particles_anim_h_frames() const {
void SpatialMaterial::set_particles_anim_v_frames(int p_frames) {
particles_anim_v_frames = p_frames;
- VS::get_singleton()->material_set_param(_get_material(), shader_names->particle_v_frames, p_frames);
+ VS::get_singleton()->material_set_param(_get_material(), shader_names->particles_anim_v_frames, p_frames);
}
int SpatialMaterial::get_particles_anim_v_frames() const {
@@ -1458,6 +1480,12 @@ RID SpatialMaterial::get_material_rid_for_2d(bool p_shaded, bool p_transparent,
return materials_for_2d[version]->get_rid();
}
+void SpatialMaterial::set_on_top_of_alpha() {
+ set_feature(FEATURE_TRANSPARENT, true);
+ set_render_priority(RENDER_PRIORITY_MAX);
+ set_flag(FLAG_DISABLE_DEPTH_TEST, true);
+}
+
void SpatialMaterial::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_albedo", "albedo"), &SpatialMaterial::set_albedo);
@@ -1605,8 +1633,9 @@ void SpatialMaterial::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flags_transparent"), "set_feature", "get_feature", FEATURE_TRANSPARENT);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flags_unshaded"), "set_flag", "get_flag", FLAG_UNSHADED);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flags_vertex_lighting"), "set_flag", "get_flag", FLAG_USE_VERTEX_LIGHTING);
- ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flags_on_top"), "set_flag", "get_flag", FLAG_ONTOP);
+ ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flags_no_depth_test"), "set_flag", "get_flag", FLAG_DISABLE_DEPTH_TEST);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flags_use_point_size"), "set_flag", "get_flag", FLAG_USE_POINT_SIZE);
+ ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flags_world_triplanar"), "set_flag", "get_flag", FLAG_TRIPLANAR_USE_WORLD);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "flags_fixed_size"), "set_flag", "get_flag", FLAG_FIXED_SIZE);
ADD_GROUP("Vertex Color", "vertex_color");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "vertex_color_use_as_albedo"), "set_flag", "get_flag", FLAG_ALBEDO_FROM_VERTEX_COLOR);
@@ -1767,7 +1796,7 @@ void SpatialMaterial::_bind_methods() {
BIND_ENUM_CONSTANT(FLAG_UNSHADED);
BIND_ENUM_CONSTANT(FLAG_USE_VERTEX_LIGHTING);
- BIND_ENUM_CONSTANT(FLAG_ONTOP);
+ BIND_ENUM_CONSTANT(FLAG_DISABLE_DEPTH_TEST);
BIND_ENUM_CONSTANT(FLAG_ALBEDO_FROM_VERTEX_COLOR);
BIND_ENUM_CONSTANT(FLAG_SRGB_VERTEX_COLOR);
BIND_ENUM_CONSTANT(FLAG_USE_POINT_SIZE);
@@ -1776,6 +1805,7 @@ void SpatialMaterial::_bind_methods() {
BIND_ENUM_CONSTANT(FLAG_UV2_USE_TRIPLANAR);
BIND_ENUM_CONSTANT(FLAG_AO_ON_UV2);
BIND_ENUM_CONSTANT(FLAG_USE_ALPHA_SCISSOR);
+ BIND_ENUM_CONSTANT(FLAG_TRIPLANAR_USE_WORLD);
BIND_ENUM_CONSTANT(FLAG_MAX);
BIND_ENUM_CONSTANT(DIFFUSE_LAMBERT);
diff --git a/scene/resources/material.h b/scene/resources/material.h
index 140b2142c9..d560d7af55 100644
--- a/scene/resources/material.h
+++ b/scene/resources/material.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -48,15 +48,23 @@ class Material : public Resource {
RID material;
Ref<Material> next_pass;
+ int render_priority;
protected:
_FORCE_INLINE_ RID _get_material() const { return material; }
static void _bind_methods();
public:
+ enum {
+ RENDER_PRIORITY_MAX = VS::MATERIAL_RENDER_PRIORITY_MAX,
+ RENDER_PRIORITY_MIN = VS::MATERIAL_RENDER_PRIORITY_MIN,
+ };
void set_next_pass(const Ref<Material> &p_pass);
Ref<Material> get_next_pass() const;
+ void set_render_priority(int p_priority);
+ int get_render_priority() const;
+
virtual RID get_rid() const;
Material();
virtual ~Material();
@@ -156,13 +164,14 @@ public:
enum Flags {
FLAG_UNSHADED,
FLAG_USE_VERTEX_LIGHTING,
- FLAG_ONTOP,
+ FLAG_DISABLE_DEPTH_TEST,
FLAG_ALBEDO_FROM_VERTEX_COLOR,
FLAG_SRGB_VERTEX_COLOR,
FLAG_USE_POINT_SIZE,
FLAG_FIXED_SIZE,
FLAG_UV1_USE_TRIPLANAR,
FLAG_UV2_USE_TRIPLANAR,
+ FLAG_TRIPLANAR_USE_WORLD,
FLAG_AO_ON_UV2,
FLAG_USE_ALPHA_SCISSOR,
FLAG_MAX
@@ -208,7 +217,7 @@ private:
uint64_t blend_mode : 2;
uint64_t depth_draw_mode : 2;
uint64_t cull_mode : 2;
- uint64_t flags : 11;
+ uint64_t flags : 12;
uint64_t detail_blend_mode : 2;
uint64_t diffuse_mode : 3;
uint64_t specular_mode : 2;
@@ -283,8 +292,8 @@ private:
StringName uv1_offset;
StringName uv2_scale;
StringName uv2_offset;
- StringName particle_h_frames;
- StringName particle_v_frames;
+ StringName particles_anim_h_frames;
+ StringName particles_anim_v_frames;
StringName particles_anim_loop;
StringName depth_min_layers;
StringName depth_max_layers;
@@ -511,6 +520,8 @@ public:
void set_alpha_scissor_threshold(float p_treshold);
float get_alpha_scissor_threshold() const;
+ void set_on_top_of_alpha();
+
void set_metallic_texture_channel(TextureChannel p_channel);
TextureChannel get_metallic_texture_channel() const;
void set_roughness_texture_channel(TextureChannel p_channel);
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index ebba0ba67f..aa7827a61a 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -1035,6 +1035,7 @@ void ArrayMesh::_bind_methods() {
BIND_ENUM_CONSTANT(ARRAY_BONES);
BIND_ENUM_CONSTANT(ARRAY_WEIGHTS);
BIND_ENUM_CONSTANT(ARRAY_INDEX);
+ BIND_ENUM_CONSTANT(ARRAY_MAX);
BIND_ENUM_CONSTANT(ARRAY_FORMAT_VERTEX);
BIND_ENUM_CONSTANT(ARRAY_FORMAT_NORMAL);
diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h
index bccb39e8cd..53c6eb2d89 100644
--- a/scene/resources/mesh.h
+++ b/scene/resources/mesh.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/mesh_data_tool.cpp b/scene/resources/mesh_data_tool.cpp
index f1092a90cb..116ddc4ac6 100644
--- a/scene/resources/mesh_data_tool.cpp
+++ b/scene/resources/mesh_data_tool.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/mesh_data_tool.h b/scene/resources/mesh_data_tool.h
index ad771edbd1..119b49161b 100644
--- a/scene/resources/mesh_data_tool.h
+++ b/scene/resources/mesh_data_tool.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/mesh_library.cpp b/scene/resources/mesh_library.cpp
index 7d51a2617e..4e1ffd2ab3 100644
--- a/scene/resources/mesh_library.cpp
+++ b/scene/resources/mesh_library.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -43,9 +43,15 @@ bool MeshLibrary::_set(const StringName &p_name, const Variant &p_value) {
set_item_name(idx, p_value);
else if (what == "mesh")
set_item_mesh(idx, p_value);
- else if (what == "shape")
- set_item_shape(idx, p_value);
- else if (what == "preview")
+ else if (what == "shape") {
+ Vector<ShapeData> shapes;
+ ShapeData sd;
+ sd.shape = p_value;
+ shapes.push_back(sd);
+ set_item_shapes(idx, shapes);
+ } else if (what == "shapes") {
+ _set_item_shapes(idx, p_value);
+ } else if (what == "preview")
set_item_preview(idx, p_value);
else if (what == "navmesh")
set_item_navmesh(idx, p_value);
@@ -69,8 +75,8 @@ bool MeshLibrary::_get(const StringName &p_name, Variant &r_ret) const {
r_ret = get_item_name(idx);
else if (what == "mesh")
r_ret = get_item_mesh(idx);
- else if (what == "shape")
- r_ret = get_item_shape(idx);
+ else if (what == "shapes")
+ r_ret = _get_item_shapes(idx);
else if (what == "navmesh")
r_ret = get_item_navmesh(idx);
else if (what == "preview")
@@ -88,7 +94,7 @@ void MeshLibrary::_get_property_list(List<PropertyInfo> *p_list) const {
String name = "item/" + itos(E->key()) + "/";
p_list->push_back(PropertyInfo(Variant::STRING, name + "name"));
p_list->push_back(PropertyInfo(Variant::OBJECT, name + "mesh", PROPERTY_HINT_RESOURCE_TYPE, "Mesh"));
- p_list->push_back(PropertyInfo(Variant::OBJECT, name + "shape", PROPERTY_HINT_RESOURCE_TYPE, "Shape"));
+ p_list->push_back(PropertyInfo(Variant::ARRAY, name + "shapes"));
p_list->push_back(PropertyInfo(Variant::OBJECT, name + "navmesh", PROPERTY_HINT_RESOURCE_TYPE, "NavigationMesh"));
p_list->push_back(PropertyInfo(Variant::OBJECT, name + "preview", PROPERTY_HINT_RESOURCE_TYPE, "Texture", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_EDITOR_HELPER));
}
@@ -118,10 +124,10 @@ void MeshLibrary::set_item_mesh(int p_item, const Ref<Mesh> &p_mesh) {
_change_notify();
}
-void MeshLibrary::set_item_shape(int p_item, const Ref<Shape> &p_shape) {
+void MeshLibrary::set_item_shapes(int p_item, const Vector<ShapeData> &p_shapes) {
ERR_FAIL_COND(!item_map.has(p_item));
- item_map[p_item].shape = p_shape;
+ item_map[p_item].shapes = p_shapes;
_change_notify();
notify_change_to_owners();
emit_changed();
@@ -156,10 +162,10 @@ Ref<Mesh> MeshLibrary::get_item_mesh(int p_item) const {
return item_map[p_item].mesh;
}
-Ref<Shape> MeshLibrary::get_item_shape(int p_item) const {
+Vector<MeshLibrary::ShapeData> MeshLibrary::get_item_shapes(int p_item) const {
- ERR_FAIL_COND_V(!item_map.has(p_item), Ref<Shape>());
- return item_map[p_item].shape;
+ ERR_FAIL_COND_V(!item_map.has(p_item), Vector<ShapeData>());
+ return item_map[p_item].shapes;
}
Ref<NavigationMesh> MeshLibrary::get_item_navmesh(int p_item) const {
@@ -226,17 +232,48 @@ int MeshLibrary::get_last_unused_item_id() const {
return item_map.back()->key() + 1;
}
+void MeshLibrary::_set_item_shapes(int p_item, const Array &p_shapes) {
+
+ ERR_FAIL_COND(p_shapes.size() & 1);
+ Vector<ShapeData> shapes;
+ for (int i = 0; i < p_shapes.size(); i += 2) {
+ ShapeData sd;
+ sd.shape = p_shapes[i + 0];
+ sd.local_transform = p_shapes[i + 1];
+
+ if (sd.shape.is_valid()) {
+ shapes.push_back(sd);
+ }
+ }
+
+ set_item_shapes(p_item, shapes);
+}
+
+Array MeshLibrary::_get_item_shapes(int p_item) const {
+
+ Vector<ShapeData> shapes = get_item_shapes(p_item);
+ Array ret;
+ for (int i = 0; i < shapes.size(); i++) {
+ ret.push_back(shapes[i].shape);
+ ret.push_back(shapes[i].local_transform);
+ }
+
+ return ret;
+}
+
void MeshLibrary::_bind_methods() {
ClassDB::bind_method(D_METHOD("create_item", "id"), &MeshLibrary::create_item);
ClassDB::bind_method(D_METHOD("set_item_name", "id", "name"), &MeshLibrary::set_item_name);
ClassDB::bind_method(D_METHOD("set_item_mesh", "id", "mesh"), &MeshLibrary::set_item_mesh);
ClassDB::bind_method(D_METHOD("set_item_navmesh", "id", "navmesh"), &MeshLibrary::set_item_navmesh);
- ClassDB::bind_method(D_METHOD("set_item_shape", "id", "shape"), &MeshLibrary::set_item_shape);
+ ClassDB::bind_method(D_METHOD("set_item_shapes", "id", "shapes"), &MeshLibrary::_set_item_shapes);
+ ClassDB::bind_method(D_METHOD("set_item_preview", "id", "texture"), &MeshLibrary::set_item_preview);
ClassDB::bind_method(D_METHOD("get_item_name", "id"), &MeshLibrary::get_item_name);
ClassDB::bind_method(D_METHOD("get_item_mesh", "id"), &MeshLibrary::get_item_mesh);
ClassDB::bind_method(D_METHOD("get_item_navmesh", "id"), &MeshLibrary::get_item_navmesh);
- ClassDB::bind_method(D_METHOD("get_item_shape", "id"), &MeshLibrary::get_item_shape);
+ ClassDB::bind_method(D_METHOD("get_item_shapes", "id"), &MeshLibrary::_get_item_shapes);
+ ClassDB::bind_method(D_METHOD("get_item_preview", "id"), &MeshLibrary::get_item_preview);
ClassDB::bind_method(D_METHOD("remove_item", "id"), &MeshLibrary::remove_item);
ClassDB::bind_method(D_METHOD("clear"), &MeshLibrary::clear);
ClassDB::bind_method(D_METHOD("get_item_list"), &MeshLibrary::get_item_list);
diff --git a/scene/resources/mesh_library.h b/scene/resources/mesh_library.h
index cc39110a99..99b6b48d61 100644
--- a/scene/resources/mesh_library.h
+++ b/scene/resources/mesh_library.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -41,16 +41,24 @@ class MeshLibrary : public Resource {
GDCLASS(MeshLibrary, Resource);
RES_BASE_EXTENSION("meshlib");
+public:
+ struct ShapeData {
+ Ref<Shape> shape;
+ Transform local_transform;
+ };
struct Item {
String name;
Ref<Mesh> mesh;
- Ref<Shape> shape;
+ Vector<ShapeData> shapes;
Ref<Texture> preview;
Ref<NavigationMesh> navmesh;
};
Map<int, Item> item_map;
+ void _set_item_shapes(int p_item, const Array &p_shapes);
+ Array _get_item_shapes(int p_item) const;
+
protected:
bool _set(const StringName &p_name, const Variant &p_value);
bool _get(const StringName &p_name, Variant &r_ret) const;
@@ -63,12 +71,12 @@ public:
void set_item_name(int p_item, const String &p_name);
void set_item_mesh(int p_item, const Ref<Mesh> &p_mesh);
void set_item_navmesh(int p_item, const Ref<NavigationMesh> &p_navmesh);
- void set_item_shape(int p_item, const Ref<Shape> &p_shape);
+ void set_item_shapes(int p_item, const Vector<ShapeData> &p_shapes);
void set_item_preview(int p_item, const Ref<Texture> &p_preview);
String get_item_name(int p_item) const;
Ref<Mesh> get_item_mesh(int p_item) const;
Ref<NavigationMesh> get_item_navmesh(int p_item) const;
- Ref<Shape> get_item_shape(int p_item) const;
+ Vector<ShapeData> get_item_shapes(int p_item) const;
Ref<Texture> get_item_preview(int p_item) const;
void remove_item(int p_item);
diff --git a/scene/resources/multimesh.cpp b/scene/resources/multimesh.cpp
index b65800ebbd..15f1e15542 100644
--- a/scene/resources/multimesh.cpp
+++ b/scene/resources/multimesh.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/multimesh.h b/scene/resources/multimesh.h
index 7d6a0ce44f..7ca66b0b46 100644
--- a/scene/resources/multimesh.h
+++ b/scene/resources/multimesh.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index d7ea675a47..c525ca600a 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "packed_scene.h"
+
#include "core/core_string_names.h"
#include "io/resource_loader.h"
#include "project_settings.h"
@@ -35,6 +36,7 @@
#include "scene/3d/spatial.h"
#include "scene/gui/control.h"
#include "scene/main/instance_placeholder.h"
+
#define PACK_VERSION 2
bool SceneState::can_instance() const {
@@ -143,7 +145,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
node = parent->_get_child_by_name(snames[n.name]);
#ifdef DEBUG_ENABLED
if (!node) {
- WARN_PRINT(String("Node '" + String(ret_nodes[0]->get_path_to(parent)) + "/" + String(snames[n.name]) + "' was modified from inside a instance, but it has vanished.").ascii().get_data());
+ WARN_PRINT(String("Node '" + String(ret_nodes[0]->get_path_to(parent)) + "/" + String(snames[n.name]) + "' was modified from inside an instance, but it has vanished.").ascii().get_data());
}
#endif
}
@@ -151,18 +153,18 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
//print_line("created");
//node belongs to this scene and must be created
Object *obj = ClassDB::instance(snames[n.type]);
- if (!obj || !obj->cast_to<Node>()) {
+ if (!Object::cast_to<Node>(obj)) {
if (obj) {
memdelete(obj);
obj = NULL;
}
WARN_PRINT(String("Warning node of type " + snames[n.type].operator String() + " does not exist.").ascii().get_data());
if (n.parent >= 0 && n.parent < nc && ret_nodes[n.parent]) {
- if (ret_nodes[n.parent]->cast_to<Spatial>()) {
+ if (Object::cast_to<Spatial>(ret_nodes[n.parent])) {
obj = memnew(Spatial);
- } else if (ret_nodes[n.parent]->cast_to<Control>()) {
+ } else if (Object::cast_to<Control>(ret_nodes[n.parent])) {
obj = memnew(Control);
- } else if (ret_nodes[n.parent]->cast_to<Node2D>()) {
+ } else if (Object::cast_to<Node2D>(ret_nodes[n.parent])) {
obj = memnew(Node2D);
}
}
@@ -172,7 +174,7 @@ Node *SceneState::instance(GenEditState p_edit_state) const {
}
}
- node = obj->cast_to<Node>();
+ node = Object::cast_to<Node>(obj);
} else {
print_line("wtf class is disabled for: " + itos(n.type));
@@ -451,60 +453,6 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map
}
}
-#if 0
-
- Ref<SceneState> base_scene = p_node->get_scene_inherited_state(); //for inheritance
- Ref<SceneState> instance_state;
- int instance_state_node=-1;
-
- if (base_scene.is_valid() && (p_node==p_owner || p_node->get_owner()==p_owner)) {
- //scene inheritance in use, see if this node is actually inherited
- NodePath path = p_owner->get_path_to(p_node);
- instance_state_node = base_scene->find_node_by_path(path);
- if (instance_state_node>=0) {
- instance_state=base_scene;
- }
- }
-
- // check that this is a directly instanced scene from the scene being packed, if so
- // this information must be saved. Of course, if using scene instancing and this node
- // does belong to base scene, ignore.
-
- if (instance_state.is_null() && p_node!=p_owner && p_node->get_owner()==p_owner && p_node->get_filename()!="") {
-
- //instanced, only direct sub-scnes are supported of course
- Ref<PackedScene> instance = ResourceLoader::load(p_node->get_filename());
- if (!instance.is_valid()) {
- return ERR_CANT_OPEN;
- }
-
- nd.instance=_vm_get_variant(instance,variant_map);
-
- } else {
-
- nd.instance=-1;
- }
-
- // finally, if this does not belong to scene inheritance, check
- // if it belongs to scene instancing
-
- if (instance_state.is_null() && p_node!=p_owner) {
- //if not affected by scene inheritance, this may be
- if (p_node->get_owner()==p_owner && p_node->get_filename()!=String()) {
- instance_state=p_node->get_scene_instance_state();
- if (instance_state.is_valid()) {
- instance_state_node=instance_state->find_node_by_path(p_node->get_path_to(p_node));
- }
-
- } else if (p_node->get_owner()!=p_owner && p_owner->is_editable_instance(p_node->get_owner())) {
- instance_state=p_node->get_owner()->get_scene_instance_state();
- if (instance_state.is_valid()) {
- instance_state_node=instance_state->find_node_by_path(p_node->get_owner()->get_path_to(p_node));
- }
- }
- }
-#endif
-
// all setup, we then proceed to check all properties for the node
// and save the ones that are worth saving
@@ -641,27 +589,6 @@ Error SceneState::_parse_node(Node *p_owner, Node *p_node, int p_parent_idx, Map
} else {
nd.owner = -1;
-#if 0
- // this is pointless, if this was instanced by something else,
- // the owner will already be set.
-
- if (node_map.has(p_node->get_owner())) {
- //maybe an existing saved node
- nd.owner=node_map[p_node->get_owner()];
- } else {
- //not saved, use nodepath map
- int sidx;
- if (nodepath_map.has(p_node->get_owner())) {
- sidx=nodepath_map[p_node->get_owner()];
- } else {
- sidx=nodepath_map.size();
- nodepath_map[p_node->get_owner()]=sidx;
- }
-
- nd.owner=FLAG_ID_IS_PATH|sidx;
-
- }
-#endif
}
// Save the right type. If this node was created by an instance
@@ -754,7 +681,7 @@ Error SceneState::_parse_connections(Node *p_owner, Node *p_node, Map<StringName
// only connections that originate or end into main saved scene are saved
// everything else is discarded
- Node *target = c.target->cast_to<Node>();
+ Node *target = Object::cast_to<Node>(c.target);
if (!target) {
continue;
diff --git a/scene/resources/packed_scene.h b/scene/resources/packed_scene.h
index 2f18f5c263..20bfb19b1f 100644
--- a/scene/resources/packed_scene.h
+++ b/scene/resources/packed_scene.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/plane_shape.cpp b/scene/resources/plane_shape.cpp
index d3ad454afc..2b1e890a5d 100644
--- a/scene/resources/plane_shape.cpp
+++ b/scene/resources/plane_shape.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/plane_shape.h b/scene/resources/plane_shape.h
index 2ed297a97e..1384b7521b 100644
--- a/scene/resources/plane_shape.h
+++ b/scene/resources/plane_shape.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/polygon_path_finder.cpp b/scene/resources/polygon_path_finder.cpp
index 80b413630a..053369e8d8 100644
--- a/scene/resources/polygon_path_finder.cpp
+++ b/scene/resources/polygon_path_finder.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/polygon_path_finder.h b/scene/resources/polygon_path_finder.h
index 2d2fb1678e..9b760caa2e 100644
--- a/scene/resources/polygon_path_finder.h
+++ b/scene/resources/polygon_path_finder.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp
index 2b8c0ddedd..cfc1468533 100644
--- a/scene/resources/primitive_meshes.cpp
+++ b/scene/resources/primitive_meshes.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/primitive_meshes.h b/scene/resources/primitive_meshes.h
index bcd5d30dd3..34fb75a196 100644
--- a/scene/resources/primitive_meshes.h
+++ b/scene/resources/primitive_meshes.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/ray_shape.cpp b/scene/resources/ray_shape.cpp
index 3abb2a4fa1..ccce7660c6 100644
--- a/scene/resources/ray_shape.cpp
+++ b/scene/resources/ray_shape.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/ray_shape.h b/scene/resources/ray_shape.h
index 5a17e9414e..06b68adbae 100644
--- a/scene/resources/ray_shape.h
+++ b/scene/resources/ray_shape.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/rectangle_shape_2d.cpp b/scene/resources/rectangle_shape_2d.cpp
index bd9ec8cbc4..507dbce861 100644
--- a/scene/resources/rectangle_shape_2d.cpp
+++ b/scene/resources/rectangle_shape_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/rectangle_shape_2d.h b/scene/resources/rectangle_shape_2d.h
index 23db58ba07..81d9cb1f4a 100644
--- a/scene/resources/rectangle_shape_2d.h
+++ b/scene/resources/rectangle_shape_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/room.cpp b/scene/resources/room.cpp
index c89b7c72c7..487975dd4e 100644
--- a/scene/resources/room.cpp
+++ b/scene/resources/room.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -31,6 +31,8 @@
#include "servers/visual_server.h"
+// FIXME: Left for reference for reimplementation using Area
+#if 0
RID RoomBounds::get_rid() const {
return area;
@@ -64,3 +66,4 @@ RoomBounds::~RoomBounds() {
VisualServer::get_singleton()->free(area);
}
+#endif
diff --git a/scene/resources/room.h b/scene/resources/room.h
index ba5c0eee1c..aadee858c2 100644
--- a/scene/resources/room.h
+++ b/scene/resources/room.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -36,6 +36,9 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
+//left for reference but will be removed when portals are reimplemented using Area
+#if 0
+
class RoomBounds : public Resource {
GDCLASS(RoomBounds, Resource);
@@ -57,4 +60,5 @@ public:
~RoomBounds();
};
+#endif
#endif // ROOM_H
diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/scene_format_text.cpp
index 49cd030a9a..14e2ef83f8 100644
--- a/scene/resources/scene_format_text.cpp
+++ b/scene/resources/scene_format_text.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -239,7 +239,7 @@ Error ResourceInteractiveLoaderText::poll() {
return error;
}
- Resource *r = obj->cast_to<Resource>();
+ Resource *r = Object::cast_to<Resource>(obj);
if (!r) {
error_text += "Can't create sub resource of type, because not a resource: " + type;
@@ -305,7 +305,7 @@ Error ResourceInteractiveLoaderText::poll() {
return error;
}
- Resource *r = obj->cast_to<Resource>();
+ Resource *r = Object::cast_to<Resource>(obj);
if (!r) {
error_text += "Can't create sub resource of type, because not a resource: " + res_type;
@@ -891,7 +891,7 @@ String ResourceInteractiveLoaderText::recognize(FileAccess *p_f) {
/////////////////////
-Ref<ResourceInteractiveLoader> ResourceFormatLoaderText::load_interactive(const String &p_path, Error *r_error) {
+Ref<ResourceInteractiveLoader> ResourceFormatLoaderText::load_interactive(const String &p_path, const String &p_original_path, Error *r_error) {
if (r_error)
*r_error = ERR_CANT_OPEN;
@@ -905,7 +905,8 @@ Ref<ResourceInteractiveLoader> ResourceFormatLoaderText::load_interactive(const
}
Ref<ResourceInteractiveLoaderText> ria = memnew(ResourceInteractiveLoaderText);
- ria->local_path = ProjectSettings::get_singleton()->localize_path(p_path);
+ String path = p_original_path != "" ? p_original_path : p_path;
+ ria->local_path = ProjectSettings::get_singleton()->localize_path(path);
ria->res_path = ria->local_path;
//ria->set_local_path( ProjectSettings::get_singleton()->localize_path(p_path) );
ria->open(f);
diff --git a/scene/resources/scene_format_text.h b/scene/resources/scene_format_text.h
index 1ea6465c21..a72a62037c 100644
--- a/scene/resources/scene_format_text.h
+++ b/scene/resources/scene_format_text.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -108,7 +108,7 @@ public:
class ResourceFormatLoaderText : public ResourceFormatLoader {
public:
- virtual Ref<ResourceInteractiveLoader> load_interactive(const String &p_path, Error *r_error = NULL);
+ virtual Ref<ResourceInteractiveLoader> load_interactive(const String &p_path, const String &p_original_path = "", Error *r_error = NULL);
virtual void get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const;
virtual void get_recognized_extensions(List<String> *p_extensions) const;
virtual bool handles_type(const String &p_type) const;
diff --git a/scene/resources/segment_shape_2d.cpp b/scene/resources/segment_shape_2d.cpp
index 99062d693b..1171db5c02 100644
--- a/scene/resources/segment_shape_2d.cpp
+++ b/scene/resources/segment_shape_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/segment_shape_2d.h b/scene/resources/segment_shape_2d.h
index 22fc1ab6e3..eb9c228c83 100644
--- a/scene/resources/segment_shape_2d.h
+++ b/scene/resources/segment_shape_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp
index acd04a9321..ec41630258 100644
--- a/scene/resources/shader.cpp
+++ b/scene/resources/shader.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/shader.h b/scene/resources/shader.h
index 0e8e48d82e..5cc70629c7 100644
--- a/scene/resources/shader.h
+++ b/scene/resources/shader.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/shader_graph.cpp b/scene/resources/shader_graph.cpp
index ed63e84d4c..2ca9a14562 100644
--- a/scene/resources/shader_graph.cpp
+++ b/scene/resources/shader_graph.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,8 +28,10 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "shader_graph.h"
+
#include "scene/scene_string_names.h"
+// FIXME: Needs to be ported to the new 3.0 shader API
#if 0
Array ShaderGraph::_get_node_list(ShaderType p_type) const {
@@ -397,79 +399,6 @@ void ShaderGraph::_bind_methods() {
BIND_ENUM_CONSTANT( VEC_MAX_FUNC );
ADD_SIGNAL(MethodInfo("updated"));
-
-#if 0
- ClassDB::bind_method(D_METHOD("node_add"),&ShaderGraph::node_add );
- ClassDB::bind_method(D_METHOD("node_remove"),&ShaderGraph::node_remove );
- ClassDB::bind_method(D_METHOD("node_set_param"),&ShaderGraph::node_set_param );
- ClassDB::bind_method(D_METHOD("node_set_pos"),&ShaderGraph::node_set_pos );
-
- ClassDB::bind_method(D_METHOD("node_get_pos"),&ShaderGraph::node_get_pos );
- ClassDB::bind_method(D_METHOD("node_get_param"),&ShaderGraph::node_get_param);
- ClassDB::bind_method(D_METHOD("node_get_type"),&ShaderGraph::node_get_type);
-
- ClassDB::bind_method(D_METHOD("connect"),&ShaderGraph::connect );
- ClassDB::bind_method(D_METHOD("disconnect"),&ShaderGraph::disconnect );
-
- ClassDB::bind_method(D_METHOD("get_connections"),&ShaderGraph::_get_connections_helper );
-
- ClassDB::bind_method(D_METHOD("clear"),&ShaderGraph::clear );
-
- BIND_ENUM_CONSTANT( NODE_IN ); ///< param 0: name
- BIND_ENUM_CONSTANT( NODE_OUT ); ///< param 0: name
- BIND_ENUM_CONSTANT( NODE_CONSTANT ); ///< param 0: value
- BIND_ENUM_CONSTANT( NODE_PARAMETER ); ///< param 0: name
- BIND_ENUM_CONSTANT( NODE_ADD );
- BIND_ENUM_CONSTANT( NODE_SUB );
- BIND_ENUM_CONSTANT( NODE_MUL );
- BIND_ENUM_CONSTANT( NODE_DIV );
- BIND_ENUM_CONSTANT( NODE_MOD );
- BIND_ENUM_CONSTANT( NODE_SIN );
- BIND_ENUM_CONSTANT( NODE_COS );
- BIND_ENUM_CONSTANT( NODE_TAN );
- BIND_ENUM_CONSTANT( NODE_ARCSIN );
- BIND_ENUM_CONSTANT( NODE_ARCCOS );
- BIND_ENUM_CONSTANT( NODE_ARCTAN );
- BIND_ENUM_CONSTANT( NODE_POW );
- BIND_ENUM_CONSTANT( NODE_LOG );
- BIND_ENUM_CONSTANT( NODE_MAX );
- BIND_ENUM_CONSTANT( NODE_MIN );
- BIND_ENUM_CONSTANT( NODE_COMPARE );
- BIND_ENUM_CONSTANT( NODE_TEXTURE ); ///< param 0: texture
- BIND_ENUM_CONSTANT( NODE_TIME ); ///< param 0: interval length
- BIND_ENUM_CONSTANT( NODE_NOISE );
- BIND_ENUM_CONSTANT( NODE_PASS );
- BIND_ENUM_CONSTANT( NODE_VEC_IN ); ///< param 0: name
- BIND_ENUM_CONSTANT( NODE_VEC_OUT ); ///< param 0: name
- BIND_ENUM_CONSTANT( NODE_VEC_CONSTANT ); ///< param 0: value
- BIND_ENUM_CONSTANT( NODE_VEC_PARAMETER ); ///< param 0: name
- BIND_ENUM_CONSTANT( NODE_VEC_ADD );
- BIND_ENUM_CONSTANT( NODE_VEC_SUB );
- BIND_ENUM_CONSTANT( NODE_VEC_MUL );
- BIND_ENUM_CONSTANT( NODE_VEC_DIV );
- BIND_ENUM_CONSTANT( NODE_VEC_MOD );
- BIND_ENUM_CONSTANT( NODE_VEC_CROSS );
- BIND_ENUM_CONSTANT( NODE_VEC_DOT );
- BIND_ENUM_CONSTANT( NODE_VEC_POW );
- BIND_ENUM_CONSTANT( NODE_VEC_NORMALIZE );
- BIND_ENUM_CONSTANT( NODE_VEC_TRANSFORM3 );
- BIND_ENUM_CONSTANT( NODE_VEC_TRANSFORM4 );
- BIND_ENUM_CONSTANT( NODE_VEC_COMPARE );
- BIND_ENUM_CONSTANT( NODE_VEC_TEXTURE_2D );
- BIND_ENUM_CONSTANT( NODE_VEC_TEXTURE_CUBE );
- BIND_ENUM_CONSTANT( NODE_VEC_NOISE );
- BIND_ENUM_CONSTANT( NODE_VEC_0 );
- BIND_ENUM_CONSTANT( NODE_VEC_1 );
- BIND_ENUM_CONSTANT( NODE_VEC_2 );
- BIND_ENUM_CONSTANT( NODE_VEC_BUILD );
- BIND_ENUM_CONSTANT( NODE_VEC_PASS );
- BIND_ENUM_CONSTANT( NODE_COLOR_CONSTANT );
- BIND_ENUM_CONSTANT( NODE_COLOR_PARAMETER );
- BIND_ENUM_CONSTANT( NODE_TEXTURE_PARAMETER );
- BIND_ENUM_CONSTANT( NODE_TEXTURE_2D_PARAMETER );
- BIND_ENUM_CONSTANT( NODE_TEXTURE_CUBE_PARAMETER );
- BIND_ENUM_CONSTANT( NODE_TYPE_MAX );
-#endif
}
diff --git a/scene/resources/shader_graph.h b/scene/resources/shader_graph.h
index 36578ce1f7..9a74b6c53a 100644
--- a/scene/resources/shader_graph.h
+++ b/scene/resources/shader_graph.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -30,6 +30,7 @@
#ifndef SHADER_GRAPH_H
#define SHADER_GRAPH_H
+// FIXME: Needs to be ported to the new 3.0 shader API
#if 0
#include "map.h"
#include "scene/resources/shader.h"
diff --git a/scene/resources/shape.cpp b/scene/resources/shape.cpp
index 6be88374e5..0046ff58a8 100644
--- a/scene/resources/shape.cpp
+++ b/scene/resources/shape.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -74,7 +74,7 @@ Ref<ArrayMesh> Shape::get_debug_mesh() {
arr.resize(Mesh::ARRAY_MAX);
arr[Mesh::ARRAY_VERTEX] = array;
- SceneTree *st = OS::get_singleton()->get_main_loop()->cast_to<SceneTree>();
+ SceneTree *st = Object::cast_to<SceneTree>(OS::get_singleton()->get_main_loop());
debug_mesh_cache->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, arr);
diff --git a/scene/resources/shape.h b/scene/resources/shape.h
index c15638aeed..bc75e723e9 100644
--- a/scene/resources/shape.h
+++ b/scene/resources/shape.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/shape_2d.cpp b/scene/resources/shape_2d.cpp
index 818c749e8c..4423c78bbe 100644
--- a/scene/resources/shape_2d.cpp
+++ b/scene/resources/shape_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/shape_2d.h b/scene/resources/shape_2d.h
index c020fb9141..fffc7011f1 100644
--- a/scene/resources/shape_2d.h
+++ b/scene/resources/shape_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/shape_line_2d.cpp b/scene/resources/shape_line_2d.cpp
index c38ae04eff..4dcc5ac981 100644
--- a/scene/resources/shape_line_2d.cpp
+++ b/scene/resources/shape_line_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/shape_line_2d.h b/scene/resources/shape_line_2d.h
index 3e59bbc687..68298b63be 100644
--- a/scene/resources/shape_line_2d.h
+++ b/scene/resources/shape_line_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/sky_box.cpp b/scene/resources/sky_box.cpp
index b7f2feb58d..9af8c42110 100644
--- a/scene/resources/sky_box.cpp
+++ b/scene/resources/sky_box.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/sky_box.h b/scene/resources/sky_box.h
index 9bd60cddaf..8934463b6f 100644
--- a/scene/resources/sky_box.h
+++ b/scene/resources/sky_box.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/space_2d.cpp b/scene/resources/space_2d.cpp
index 2a618bb868..4177364de7 100644
--- a/scene/resources/space_2d.cpp
+++ b/scene/resources/space_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/space_2d.h b/scene/resources/space_2d.h
index 3e08612d99..8ba392f85d 100644
--- a/scene/resources/space_2d.h
+++ b/scene/resources/space_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/sphere_shape.cpp b/scene/resources/sphere_shape.cpp
index 960554562f..00203c2b4b 100644
--- a/scene/resources/sphere_shape.cpp
+++ b/scene/resources/sphere_shape.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/sphere_shape.h b/scene/resources/sphere_shape.h
index a3b5d2424b..43d7956246 100644
--- a/scene/resources/sphere_shape.h
+++ b/scene/resources/sphere_shape.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp
index 7b2a9ffbc2..b8a0a7864e 100644
--- a/scene/resources/style_box.cpp
+++ b/scene/resources/style_box.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -165,13 +165,13 @@ void StyleBoxTexture::draw(RID p_canvas_item, const Rect2 &p_rect) const {
VisualServer::get_singleton()->canvas_item_add_nine_patch(p_canvas_item, rect, src_rect, texture->get_rid(), Vector2(margin[MARGIN_LEFT], margin[MARGIN_TOP]), Vector2(margin[MARGIN_RIGHT], margin[MARGIN_BOTTOM]), VS::NinePatchAxisMode(axis_h), VS::NinePatchAxisMode(axis_v), draw_center, modulate, normal_rid);
}
-void StyleBoxTexture::set_draw_center(bool p_draw) {
+void StyleBoxTexture::set_draw_center(bool p_enabled) {
- draw_center = p_draw;
+ draw_center = p_enabled;
emit_changed();
}
-bool StyleBoxTexture::get_draw_center() const {
+bool StyleBoxTexture::is_draw_center_enabled() const {
return draw_center;
}
@@ -281,7 +281,7 @@ void StyleBoxTexture::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_region_rect"), &StyleBoxTexture::get_region_rect);
ClassDB::bind_method(D_METHOD("set_draw_center", "enable"), &StyleBoxTexture::set_draw_center);
- ClassDB::bind_method(D_METHOD("get_draw_center"), &StyleBoxTexture::get_draw_center);
+ ClassDB::bind_method(D_METHOD("is_draw_center_enabled"), &StyleBoxTexture::is_draw_center_enabled);
ClassDB::bind_method(D_METHOD("set_modulate", "color"), &StyleBoxTexture::set_modulate);
ClassDB::bind_method(D_METHOD("get_modulate"), &StyleBoxTexture::get_modulate);
@@ -312,7 +312,7 @@ void StyleBoxTexture::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "axis_stretch_vertical", PROPERTY_HINT_ENUM, "Stretch,Tile,Tile Fit"), "set_v_axis_stretch_mode", "get_v_axis_stretch_mode");
ADD_GROUP("Modulate", "modulate_");
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "modulate_color"), "set_modulate", "get_modulate");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "draw_center"), "set_draw_center", "get_draw_center");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "draw_center"), "set_draw_center", "is_draw_center_enabled");
BIND_ENUM_CONSTANT(AXIS_STRETCH_MODE_STRETCH);
BIND_ENUM_CONSTANT(AXIS_STRETCH_MODE_TILE);
@@ -460,14 +460,14 @@ float StyleBoxFlat::get_expand_margin_size(Margin p_expand_margin) const {
return expand_margin[p_expand_margin];
}
-void StyleBoxFlat::set_filled(bool p_filled) {
+void StyleBoxFlat::set_draw_center(bool p_enabled) {
- filled = p_filled;
+ draw_center = p_enabled;
emit_changed();
}
-bool StyleBoxFlat::is_filled() const {
+bool StyleBoxFlat::is_draw_center_enabled() const {
- return filled;
+ return draw_center;
}
void StyleBoxFlat::set_shadow_color(const Color &p_color) {
@@ -691,7 +691,7 @@ void StyleBoxFlat::draw(RID p_canvas_item, const Rect2 &p_rect) const {
style_rect, adapted_border, inner_color, border_color.read().ptr(), corner_detail);
//DRAW INFILL
- if (filled) {
+ if (draw_center) {
int temp_vert_offset = verts.size();
int no_border[4] = { 0, 0, 0, 0 };
draw_ring(verts, indices, colors, style_rect, adapted_corner,
@@ -724,7 +724,7 @@ void StyleBoxFlat::draw(RID p_canvas_item, const Rect2 &p_rect) const {
int aa_border_width[4] = { aa_size, aa_size, aa_size, aa_size };
- if (filled) {
+ if (draw_center) {
if (!blend_border) {
//INFILL AA
draw_ring(verts, indices, colors, style_rect, adapted_corner,
@@ -776,8 +776,8 @@ void StyleBoxFlat::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_expand_margin_individual", "size_left", "size_top", "size_right", "size_bottom"), &StyleBoxFlat::set_expand_margin_size_individual);
ClassDB::bind_method(D_METHOD("get_expand_margin", "margin"), &StyleBoxFlat::get_expand_margin_size);
- ClassDB::bind_method(D_METHOD("set_filled", "filled"), &StyleBoxFlat::set_filled);
- ClassDB::bind_method(D_METHOD("is_filled"), &StyleBoxFlat::is_filled);
+ ClassDB::bind_method(D_METHOD("set_draw_center", "draw_center"), &StyleBoxFlat::set_draw_center);
+ ClassDB::bind_method(D_METHOD("is_draw_center_enabled"), &StyleBoxFlat::is_draw_center_enabled);
ClassDB::bind_method(D_METHOD("set_shadow_color", "color"), &StyleBoxFlat::set_shadow_color);
ClassDB::bind_method(D_METHOD("get_shadow_color"), &StyleBoxFlat::get_shadow_color);
@@ -796,7 +796,7 @@ void StyleBoxFlat::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::COLOR, "bg_color"), "set_bg_color", "get_bg_color");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "filled"), "set_filled", "is_filled");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "draw_center"), "set_draw_center", "is_draw_center_enabled");
ADD_GROUP("Border Width", "border_width_");
ADD_PROPERTYI(PropertyInfo(Variant::INT, "border_width_left", PROPERTY_HINT_RANGE, "0,1024,1"), "set_border_width", "get_border_width", MARGIN_LEFT);
@@ -843,7 +843,7 @@ StyleBoxFlat::StyleBoxFlat() {
border_color.append(Color(0.8, 0.8, 0.8));
blend_border = false;
- filled = true;
+ draw_center = true;
anti_aliased = true;
shadow_size = 0;
diff --git a/scene/resources/style_box.h b/scene/resources/style_box.h
index 30eb9543e8..3d085f7166 100644
--- a/scene/resources/style_box.h
+++ b/scene/resources/style_box.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -117,8 +117,8 @@ public:
void set_normal_map(RES p_normal_map);
RES get_normal_map() const;
- void set_draw_center(bool p_draw);
- bool get_draw_center() const;
+ void set_draw_center(bool p_enabled);
+ bool is_draw_center_enabled() const;
virtual Size2 get_center_size() const;
void set_h_axis_stretch_mode(AxisStretchMode p_mode);
@@ -150,7 +150,7 @@ class StyleBoxFlat : public StyleBox {
int expand_margin[4];
int corner_radius[4];
- bool filled;
+ bool draw_center;
bool blend_border;
bool anti_aliased;
@@ -202,9 +202,9 @@ public:
void set_expand_margin_size_individual(float p_left, float p_top, float p_right, float p_bottom);
float get_expand_margin_size(Margin p_expand_margin) const;
- //FILLED
- void set_filled(bool p_draw);
- bool is_filled() const;
+ //DRAW CENTER
+ void set_draw_center(bool p_enabled);
+ bool is_draw_center_enabled() const;
//SHADOW
void set_shadow_color(const Color &p_color);
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp
index 9320676016..bf89e704bc 100644
--- a/scene/resources/surface_tool.cpp
+++ b/scene/resources/surface_tool.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -691,6 +691,17 @@ void SurfaceTool::mikktGetTexCoord(const SMikkTSpaceContext *pContext, float fvT
fvTexcOut[1] = v.y;
//fvTexcOut[1]=1.0-v.y;
}
+
+void SurfaceTool::mikktSetTSpaceDefault(const SMikkTSpaceContext *pContext, const float fvTangent[], const float fvBiTangent[], const float fMagS, const float fMagT,
+ const tbool bIsOrientationPreserving, const int iFace, const int iVert) {
+
+ Vector<List<Vertex>::Element *> &varr = *((Vector<List<Vertex>::Element *> *)pContext->m_pUserData);
+ Vertex *vtx = &varr[iFace * 3 + iVert]->get();
+
+ vtx->tangent = Vector3(fvTangent[0], fvTangent[1], fvTangent[2]);
+ vtx->binormal = Vector3(fvBiTangent[0], fvBiTangent[1], fvBiTangent[2]);
+}
+
void SurfaceTool::mikktSetTSpaceBasic(const SMikkTSpaceContext *pContext, const float fvTangent[], const float fSign, const int iFace, const int iVert) {
Vector<List<Vertex>::Element *> &varr = *((Vector<List<Vertex>::Element *> *)pContext->m_pUserData);
@@ -715,8 +726,8 @@ void SurfaceTool::generate_tangents() {
mkif.m_getNumVerticesOfFace = mikktGetNumVerticesOfFace;
mkif.m_getPosition = mikktGetPosition;
mkif.m_getTexCoord = mikktGetTexCoord;
- mkif.m_setTSpaceBasic = mikktSetTSpaceBasic;
- mkif.m_setTSpace = NULL;
+ mkif.m_setTSpace = mikktSetTSpaceDefault;
+ mkif.m_setTSpaceBasic = NULL;
SMikkTSpaceContext msc;
msc.m_pInterface = &mkif;
diff --git a/scene/resources/surface_tool.h b/scene/resources/surface_tool.h
index fcc94753ca..cdaac643de 100644
--- a/scene/resources/surface_tool.h
+++ b/scene/resources/surface_tool.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -90,6 +90,8 @@ private:
static void mikktGetNormal(const SMikkTSpaceContext *pContext, float fvNormOut[], const int iFace, const int iVert);
static void mikktGetTexCoord(const SMikkTSpaceContext *pContext, float fvTexcOut[], const int iFace, const int iVert);
static void mikktSetTSpaceBasic(const SMikkTSpaceContext *pContext, const float fvTangent[], const float fSign, const int iFace, const int iVert);
+ static void mikktSetTSpaceDefault(const SMikkTSpaceContext *pContext, const float fvTangent[], const float fvBiTangent[], const float fMagS, const float fMagT,
+ const tbool bIsOrientationPreserving, const int iFace, const int iVert);
protected:
static void _bind_methods();
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index f542d2a8de..6a9ded9ea3 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -501,9 +501,9 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
Vector<Ref<Image> > mipmap_images;
int total_size = 0;
- for (int i = 0; i < mipmaps; i++) {
+ for (uint32_t i = 0; i < mipmaps; i++) {
- if (i > 0) {
+ if (i) {
size = f->get_32();
}
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index 6c20c71af0..207436e4a7 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp
index ac1bb105ac..e2e29b037b 100644
--- a/scene/resources/theme.cpp
+++ b/scene/resources/theme.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -1030,14 +1030,13 @@ RES ResourceFormatLoaderTheme::load(const String &p_path, const String &p_origin
ERR_FAIL_V(RES());
}
- if (res->cast_to<StyleBox>()) {
-
+ if (Object::cast_to<StyleBox>(*res)) {
theme->set_stylebox(item, control, res);
- } else if (res->cast_to<Font>()) {
+ } else if (Object::cast_to<Font>(*res)) {
theme->set_font(item, control, res);
- } else if (res->cast_to<Font>()) {
+ } else if (Object::cast_to<Font>(*res)) {
theme->set_font(item, control, res);
- } else if (res->cast_to<Texture>()) {
+ } else if (Object::cast_to<Texture>(*res)) {
theme->set_icon(item, control, res);
} else {
memdelete(f);
diff --git a/scene/resources/theme.h b/scene/resources/theme.h
index 5744c142d4..5b375d5585 100644
--- a/scene/resources/theme.h
+++ b/scene/resources/theme.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index 44fe676ddc..50e8c28c22 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/tile_set.h b/scene/resources/tile_set.h
index 7d7855811f..fe782ff987 100644
--- a/scene/resources/tile_set.h
+++ b/scene/resources/tile_set.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/video_stream.cpp b/scene/resources/video_stream.cpp
index 1b0e34b8db..2298e2ca9f 100644
--- a/scene/resources/video_stream.cpp
+++ b/scene/resources/video_stream.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/video_stream.h b/scene/resources/video_stream.h
index 544973f581..e08be02a07 100644
--- a/scene/resources/video_stream.h
+++ b/scene/resources/video_stream.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -30,7 +30,6 @@
#ifndef VIDEO_STREAM_H
#define VIDEO_STREAM_H
-#include "audio_stream_resampled.h"
#include "scene/resources/texture.h"
class VideoStreamPlayback : public Resource {
diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp
index b0d14125a0..af159975ca 100644
--- a/scene/resources/world.cpp
+++ b/scene/resources/world.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,10 +28,10 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "world.h"
+
#include "camera_matrix.h"
#include "octree.h"
#include "scene/3d/camera.h"
-#include "scene/3d/spatial_indexer.h"
#include "scene/3d/visibility_notifier.h"
#include "scene/scene_string_names.h"
diff --git a/scene/resources/world.h b/scene/resources/world.h
index 158086974c..767d1b5b6e 100644
--- a/scene/resources/world.h
+++ b/scene/resources/world.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/world_2d.cpp b/scene/resources/world_2d.cpp
index 2f43f903ba..a644793bd8 100644
--- a/scene/resources/world_2d.cpp
+++ b/scene/resources/world_2d.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/resources/world_2d.h b/scene/resources/world_2d.h
index f968b08a15..63d32473e0 100644
--- a/scene/resources/world_2d.h
+++ b/scene/resources/world_2d.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/scene_string_names.cpp b/scene/scene_string_names.cpp
index f247e7cde8..6b7168a529 100644
--- a/scene/scene_string_names.cpp
+++ b/scene/scene_string_names.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/scene/scene_string_names.h b/scene/scene_string_names.h
index 0b70cd36ff..8676b8436e 100644
--- a/scene/scene_string_names.h
+++ b/scene/scene_string_names.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/arvr/arvr_interface.cpp b/servers/arvr/arvr_interface.cpp
index 1f2e6028b0..0705df17b1 100644
--- a/servers/arvr/arvr_interface.cpp
+++ b/servers/arvr/arvr_interface.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/arvr/arvr_interface.h b/servers/arvr/arvr_interface.h
index e405499fbb..d4fb383bbc 100644
--- a/servers/arvr/arvr_interface.h
+++ b/servers/arvr/arvr_interface.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/arvr/arvr_positional_tracker.cpp b/servers/arvr/arvr_positional_tracker.cpp
index 9f3d01267b..539bac6703 100644
--- a/servers/arvr/arvr_positional_tracker.cpp
+++ b/servers/arvr/arvr_positional_tracker.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/arvr/arvr_positional_tracker.h b/servers/arvr/arvr_positional_tracker.h
index dba203b73c..f91f862ba3 100644
--- a/servers/arvr/arvr_positional_tracker.h
+++ b/servers/arvr/arvr_positional_tracker.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/arvr_server.cpp b/servers/arvr_server.cpp
index 8a064f9cce..bac24f6438 100644
--- a/servers/arvr_server.cpp
+++ b/servers/arvr_server.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/arvr_server.h b/servers/arvr_server.h
index 06e0a4561c..2645637ad5 100644
--- a/servers/arvr_server.h
+++ b/servers/arvr_server.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/audio_driver_dummy.cpp b/servers/audio/audio_driver_dummy.cpp
index dfb6406b38..1ae0e7b96b 100644
--- a/servers/audio/audio_driver_dummy.cpp
+++ b/servers/audio/audio_driver_dummy.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -37,17 +37,16 @@ Error AudioDriverDummy::init() {
active = false;
thread_exited = false;
exit_thread = false;
- pcm_open = false;
samples_in = NULL;
- mix_rate = 44100;
+ mix_rate = DEFAULT_MIX_RATE;
speaker_mode = SPEAKER_MODE_STEREO;
channels = 2;
- int latency = GLOBAL_DEF("audio/output_latency", 25);
- buffer_size = next_power_of_2(latency * mix_rate / 1000);
+ int latency = GLOBAL_DEF("audio/output_latency", DEFAULT_OUTPUT_LATENCY);
+ buffer_frames = closest_power_of_2(latency * mix_rate / 1000);
- samples_in = memnew_arr(int32_t, buffer_size * channels);
+ samples_in = memnew_arr(int32_t, buffer_frames * channels);
mutex = Mutex::create();
thread = Thread::create(AudioDriverDummy::thread_func, this);
@@ -59,17 +58,15 @@ void AudioDriverDummy::thread_func(void *p_udata) {
AudioDriverDummy *ad = (AudioDriverDummy *)p_udata;
- uint64_t usdelay = (ad->buffer_size / float(ad->mix_rate)) * 1000000;
+ uint64_t usdelay = (ad->buffer_frames / float(ad->mix_rate)) * 1000000;
while (!ad->exit_thread) {
- if (!ad->active) {
-
- } else {
+ if (ad->active) {
ad->lock();
- ad->audio_server_process(ad->buffer_size, ad->samples_in);
+ ad->audio_server_process(ad->buffer_frames, ad->samples_in);
ad->unlock();
};
diff --git a/servers/audio/audio_driver_dummy.h b/servers/audio/audio_driver_dummy.h
index eadac44c5a..90af1961b7 100644
--- a/servers/audio/audio_driver_dummy.h
+++ b/servers/audio/audio_driver_dummy.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -43,8 +43,8 @@ class AudioDriverDummy : public AudioDriver {
int32_t *samples_in;
static void thread_func(void *p_udata);
- int buffer_size;
+ unsigned int buffer_frames;
unsigned int mix_rate;
SpeakerMode speaker_mode;
@@ -53,7 +53,6 @@ class AudioDriverDummy : public AudioDriver {
bool active;
bool thread_exited;
mutable bool exit_thread;
- bool pcm_open;
public:
const char *get_name() const {
diff --git a/servers/audio/audio_effect.cpp b/servers/audio/audio_effect.cpp
index edb79adb60..2a9f991d3f 100644
--- a/servers/audio/audio_effect.cpp
+++ b/servers/audio/audio_effect.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/audio_effect.h b/servers/audio/audio_effect.h
index 570b2025b1..3dbeb402eb 100644
--- a/servers/audio/audio_effect.h
+++ b/servers/audio/audio_effect.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/audio_filter_sw.cpp b/servers/audio/audio_filter_sw.cpp
index 4bf1cebf12..477bc59b73 100644
--- a/servers/audio/audio_filter_sw.cpp
+++ b/servers/audio/audio_filter_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/audio_filter_sw.h b/servers/audio/audio_filter_sw.h
index caf735436a..1c01e5f8da 100644
--- a/servers/audio/audio_filter_sw.h
+++ b/servers/audio/audio_filter_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/audio_rb_resampler.cpp b/servers/audio/audio_rb_resampler.cpp
index a5d0a53be6..113e356612 100644
--- a/servers/audio/audio_rb_resampler.cpp
+++ b/servers/audio/audio_rb_resampler.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -173,60 +173,23 @@ bool AudioRBResampler::mix(int32_t *p_dest, int p_frames) {
}
int todo = MIN(((int64_t(rb_todo) << MIX_FRAC_BITS) / increment) + 1, p_frames);
-#if 0
- if (int(src_mix_rate)==target_mix_rate) {
-
- if (channels==6) {
-
- for(int i=0;i<p_frames;i++) {
-
- int from = ((rb_read_pos+i)&rb_mask)*6;
- int to = i*6;
-
- p_dest[from+0]=int32_t(rb[to+0])<<16;
- p_dest[from+1]=int32_t(rb[to+1])<<16;
- p_dest[from+2]=int32_t(rb[to+2])<<16;
- p_dest[from+3]=int32_t(rb[to+3])<<16;
- p_dest[from+4]=int32_t(rb[to+4])<<16;
- p_dest[from+5]=int32_t(rb[to+5])<<16;
- }
-
- } else {
- int len=p_frames*channels;
- int from=rb_read_pos*channels;
- int mask=0;
- switch(channels) {
- case 1: mask=rb_len-1; break;
- case 2: mask=(rb_len*2)-1; break;
- case 4: mask=(rb_len*4)-1; break;
- }
-
- for(int i=0;i<len;i++) {
-
- p_dest[i]=int32_t(rb[(from+i)&mask])<<16;
- }
- }
-
- rb_read_pos = (rb_read_pos+p_frames)&rb_mask;
- } else
-#endif
{
- uint32_t read = 0;
+ int read = 0;
switch (channels) {
case 1: read = _resample<1>(p_dest, todo, increment); break;
case 2: read = _resample<2>(p_dest, todo, increment); break;
case 4: read = _resample<4>(p_dest, todo, increment); break;
case 6: read = _resample<6>(p_dest, todo, increment); break;
}
-#if 1
+
//end of stream, fadeout
int remaining = p_frames - todo;
if (remaining && todo > 0) {
//print_line("fadeout");
- for (int c = 0; c < channels; c++) {
+ for (uint32_t c = 0; c < channels; c++) {
for (int i = 0; i < todo; i++) {
@@ -238,25 +201,8 @@ bool AudioRBResampler::mix(int32_t *p_dest, int p_frames) {
}
}
-#else
- int remaining = p_frames - todo;
- if (remaining && todo > 0) {
-
- for (int c = 0; c < channels; c++) {
-
- int32_t from = p_dest[(todo - 1) * channels + c] >> 8;
-
- for (int i = 0; i < remaining; i++) {
-
- uint32_t mul = (remaining - i) * 256 / remaining;
- p_dest[(todo + i) * channels + c] = from * mul;
- }
- }
- }
-#endif
-
//zero out what remains there to avoid glitches
- for (int i = todo * channels; i < int(p_frames) * channels; i++) {
+ for (uint32_t i = todo * channels; i < int(p_frames) * channels; i++) {
p_dest[i] = 0;
}
@@ -304,7 +250,7 @@ Error AudioRBResampler::setup(int p_channels, int p_src_mix_rate, int p_target_m
rb_write_pos = 0;
//avoid maybe strange noises upon load
- for (int i = 0; i < (rb_len * channels); i++) {
+ for (unsigned int i = 0; i < (rb_len * channels); i++) {
rb[i] = 0;
read_buf[i] = 0;
diff --git a/servers/audio/audio_rb_resampler.h b/servers/audio/audio_rb_resampler.h
index a906f1bb20..bc1f924ab5 100644
--- a/servers/audio/audio_rb_resampler.h
+++ b/servers/audio/audio_rb_resampler.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp
index aa498cccad..dd4240f028 100644
--- a/servers/audio/audio_stream.cpp
+++ b/servers/audio/audio_stream.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/audio_stream.h b/servers/audio/audio_stream.h
index 0d63e7af82..c7cb63ef2c 100644
--- a/servers/audio/audio_stream.h
+++ b/servers/audio/audio_stream.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_amplify.cpp b/servers/audio/effects/audio_effect_amplify.cpp
index 91d1e84182..58da99ab85 100644
--- a/servers/audio/effects/audio_effect_amplify.cpp
+++ b/servers/audio/effects/audio_effect_amplify.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_amplify.h b/servers/audio/effects/audio_effect_amplify.h
index bba9e352b2..a4c2cbc2fd 100644
--- a/servers/audio/effects/audio_effect_amplify.h
+++ b/servers/audio/effects/audio_effect_amplify.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_chorus.cpp b/servers/audio/effects/audio_effect_chorus.cpp
index 8fb7ef2cd0..76dd585ffa 100644
--- a/servers/audio/effects/audio_effect_chorus.cpp
+++ b/servers/audio/effects/audio_effect_chorus.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -78,7 +78,7 @@ void AudioEffectChorusInstance::_process_chunk(const AudioFrame *p_src_frames, A
uint64_t increment = llrint(cycles_to_mix / (double)p_frame_count * (double)(1 << AudioEffectChorus::CYCLES_FRAC));
//check the LFO doesn't read ahead of the write pos
- if ((((int)max_depth_frames) + 10) > delay_frames) { //10 as some threshold to avoid precision stuff
+ if ((((unsigned int)max_depth_frames) + 10) > delay_frames) { //10 as some threshold to avoid precision stuff
delay_frames += (int)max_depth_frames - delay_frames;
delay_frames += 10; //threshold to avoid precision stuff
}
diff --git a/servers/audio/effects/audio_effect_chorus.h b/servers/audio/effects/audio_effect_chorus.h
index 5db335e288..47065c4dd5 100644
--- a/servers/audio/effects/audio_effect_chorus.h
+++ b/servers/audio/effects/audio_effect_chorus.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_compressor.cpp b/servers/audio/effects/audio_effect_compressor.cpp
index 491e6ecc81..420f279da0 100644
--- a/servers/audio/effects/audio_effect_compressor.cpp
+++ b/servers/audio/effects/audio_effect_compressor.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_compressor.h b/servers/audio/effects/audio_effect_compressor.h
index 550302056c..5c76fb902a 100644
--- a/servers/audio/effects/audio_effect_compressor.h
+++ b/servers/audio/effects/audio_effect_compressor.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_delay.cpp b/servers/audio/effects/audio_effect_delay.cpp
index de301fba6f..b8a8603546 100644
--- a/servers/audio/effects/audio_effect_delay.cpp
+++ b/servers/audio/effects/audio_effect_delay.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_delay.h b/servers/audio/effects/audio_effect_delay.h
index 9d80c752d3..50a32c94f6 100644
--- a/servers/audio/effects/audio_effect_delay.h
+++ b/servers/audio/effects/audio_effect_delay.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_distortion.cpp b/servers/audio/effects/audio_effect_distortion.cpp
index 87cf520e19..f2bcabc3cb 100644
--- a/servers/audio/effects/audio_effect_distortion.cpp
+++ b/servers/audio/effects/audio_effect_distortion.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_distortion.h b/servers/audio/effects/audio_effect_distortion.h
index afeb6ac7ec..7c04b4f98e 100644
--- a/servers/audio/effects/audio_effect_distortion.h
+++ b/servers/audio/effects/audio_effect_distortion.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_eq.cpp b/servers/audio/effects/audio_effect_eq.cpp
index 87f793f95e..15905e3e0e 100644
--- a/servers/audio/effects/audio_effect_eq.cpp
+++ b/servers/audio/effects/audio_effect_eq.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_eq.h b/servers/audio/effects/audio_effect_eq.h
index 62041fe4f7..440f46c0c2 100644
--- a/servers/audio/effects/audio_effect_eq.h
+++ b/servers/audio/effects/audio_effect_eq.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_filter.cpp b/servers/audio/effects/audio_effect_filter.cpp
index bcf1cc5756..64a9db51a5 100644
--- a/servers/audio/effects/audio_effect_filter.cpp
+++ b/servers/audio/effects/audio_effect_filter.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_filter.h b/servers/audio/effects/audio_effect_filter.h
index 51932cdbf5..903977cb97 100644
--- a/servers/audio/effects/audio_effect_filter.h
+++ b/servers/audio/effects/audio_effect_filter.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_limiter.cpp b/servers/audio/effects/audio_effect_limiter.cpp
index 9f39db0440..391e5db639 100644
--- a/servers/audio/effects/audio_effect_limiter.cpp
+++ b/servers/audio/effects/audio_effect_limiter.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_limiter.h b/servers/audio/effects/audio_effect_limiter.h
index e15ffe5b34..5fc54a2dd3 100644
--- a/servers/audio/effects/audio_effect_limiter.h
+++ b/servers/audio/effects/audio_effect_limiter.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_panner.cpp b/servers/audio/effects/audio_effect_panner.cpp
index a6103f580a..8b268ef9f7 100644
--- a/servers/audio/effects/audio_effect_panner.cpp
+++ b/servers/audio/effects/audio_effect_panner.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_panner.h b/servers/audio/effects/audio_effect_panner.h
index 8c3edfbde0..4739373485 100644
--- a/servers/audio/effects/audio_effect_panner.h
+++ b/servers/audio/effects/audio_effect_panner.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_phaser.cpp b/servers/audio/effects/audio_effect_phaser.cpp
index 9af344d876..fe362ef831 100644
--- a/servers/audio/effects/audio_effect_phaser.cpp
+++ b/servers/audio/effects/audio_effect_phaser.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_phaser.h b/servers/audio/effects/audio_effect_phaser.h
index c587ca8239..d77b44e738 100644
--- a/servers/audio/effects/audio_effect_phaser.h
+++ b/servers/audio/effects/audio_effect_phaser.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_pitch_shift.cpp b/servers/audio/effects/audio_effect_pitch_shift.cpp
index 1889934f29..ec70e7b902 100644
--- a/servers/audio/effects/audio_effect_pitch_shift.cpp
+++ b/servers/audio/effects/audio_effect_pitch_shift.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_pitch_shift.h b/servers/audio/effects/audio_effect_pitch_shift.h
index 08c8c59cc7..10a72465dc 100644
--- a/servers/audio/effects/audio_effect_pitch_shift.h
+++ b/servers/audio/effects/audio_effect_pitch_shift.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_reverb.cpp b/servers/audio/effects/audio_effect_reverb.cpp
index 7049204645..f5225bec96 100644
--- a/servers/audio/effects/audio_effect_reverb.cpp
+++ b/servers/audio/effects/audio_effect_reverb.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_reverb.h b/servers/audio/effects/audio_effect_reverb.h
index d8f13da8b7..795d38d3d5 100644
--- a/servers/audio/effects/audio_effect_reverb.h
+++ b/servers/audio/effects/audio_effect_reverb.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_stereo_enhance.cpp b/servers/audio/effects/audio_effect_stereo_enhance.cpp
index ebd48c0546..1ee393f533 100644
--- a/servers/audio/effects/audio_effect_stereo_enhance.cpp
+++ b/servers/audio/effects/audio_effect_stereo_enhance.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/audio_effect_stereo_enhance.h b/servers/audio/effects/audio_effect_stereo_enhance.h
index bad55614c6..f187fe50b3 100644
--- a/servers/audio/effects/audio_effect_stereo_enhance.h
+++ b/servers/audio/effects/audio_effect_stereo_enhance.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/eq.cpp b/servers/audio/effects/eq.cpp
index 4dd5eb0ebe..05630e61ae 100644
--- a/servers/audio/effects/eq.cpp
+++ b/servers/audio/effects/eq.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/eq.h b/servers/audio/effects/eq.h
index 90d19e6e91..97dd4615d1 100644
--- a/servers/audio/effects/eq.h
+++ b/servers/audio/effects/eq.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/reverb.cpp b/servers/audio/effects/reverb.cpp
index 7bc8c5cac3..8e745f979a 100644
--- a/servers/audio/effects/reverb.cpp
+++ b/servers/audio/effects/reverb.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/effects/reverb.h b/servers/audio/effects/reverb.h
index d4ddb3902a..2fa21d68d5 100644
--- a/servers/audio/effects/reverb.h
+++ b/servers/audio/effects/reverb.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/reverb_sw.cpp b/servers/audio/reverb_sw.cpp
index 45fd7fd7de..96d2ad848b 100644
--- a/servers/audio/reverb_sw.cpp
+++ b/servers/audio/reverb_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/reverb_sw.h b/servers/audio/reverb_sw.h
index f912734e65..b91beea039 100644
--- a/servers/audio/reverb_sw.h
+++ b/servers/audio/reverb_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio/voice_rb_sw.h b/servers/audio/voice_rb_sw.h
index a4a5ec3ddd..6d9eb73860 100644
--- a/servers/audio/voice_rb_sw.h
+++ b/servers/audio/voice_rb_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index f9fdd9432d..3139c6bb7a 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -155,6 +155,29 @@ void AudioServer::_driver_process(int p_frames, int32_t *p_buffer) {
todo -= to_copy;
to_mix -= to_copy;
}
+
+#ifdef DEBUG_ENABLED
+ if (OS::get_singleton() && OS::get_singleton()->is_stdout_verbose()) {
+ static uint64_t first_ticks = 0;
+ static uint64_t last_ticks = 0;
+ static uint64_t ticks = 0;
+ static int count = 0;
+ static int total = 0;
+
+ ticks = OS::get_singleton()->get_ticks_msec();
+ if ((ticks - first_ticks) > 10 * 1000) {
+ print_line("Audio Driver " + String(AudioDriver::get_singleton()->get_name()) + " average latency: " + itos(total / count) + "ms (frame=" + itos(p_frames) + ")");
+ first_ticks = ticks;
+ total = 0;
+ count = 0;
+ }
+
+ total += ticks - last_ticks;
+ count++;
+
+ last_ticks = ticks;
+ }
+#endif
}
void AudioServer::_mix_step() {
@@ -654,8 +677,8 @@ void AudioServer::_update_bus_effects(int p_bus) {
buses[p_bus]->channels[i].effect_instances.resize(buses[p_bus]->effects.size());
for (int j = 0; j < buses[p_bus]->effects.size(); j++) {
Ref<AudioEffectInstance> fx = buses[p_bus]->effects[j].effect->instance();
- if (fx->cast_to<AudioEffectCompressorInstance>()) {
- fx->cast_to<AudioEffectCompressorInstance>()->set_current_channel(i);
+ if (Object::cast_to<AudioEffectCompressorInstance>(*fx)) {
+ Object::cast_to<AudioEffectCompressorInstance>(*fx)->set_current_channel(i);
}
buses[p_bus]->channels[i].effect_instances[j] = fx;
}
diff --git a/servers/audio_server.h b/servers/audio_server.h
index c92ff6d3a0..13a74856c8 100644
--- a/servers/audio_server.h
+++ b/servers/audio_server.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -54,6 +54,9 @@ public:
SPEAKER_SURROUND_71,
};
+ static const int DEFAULT_MIX_RATE = 44100;
+ static const int DEFAULT_OUTPUT_LATENCY = 15;
+
static AudioDriver *get_singleton();
void set_singleton();
diff --git a/servers/physics/area_pair_sw.cpp b/servers/physics/area_pair_sw.cpp
index 5c418c473f..3e8d148f08 100644
--- a/servers/physics/area_pair_sw.cpp
+++ b/servers/physics/area_pair_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/area_pair_sw.h b/servers/physics/area_pair_sw.h
index 75df6043ea..483f63284b 100644
--- a/servers/physics/area_pair_sw.h
+++ b/servers/physics/area_pair_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/area_sw.cpp b/servers/physics/area_sw.cpp
index a310ed3411..387230a478 100644
--- a/servers/physics/area_sw.cpp
+++ b/servers/physics/area_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/area_sw.h b/servers/physics/area_sw.h
index 3dae1db13f..455c0b5c8b 100644
--- a/servers/physics/area_sw.h
+++ b/servers/physics/area_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/body_pair_sw.cpp b/servers/physics/body_pair_sw.cpp
index 9ada1fbc50..a289b4b0ca 100644
--- a/servers/physics/body_pair_sw.cpp
+++ b/servers/physics/body_pair_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "body_pair_sw.h"
+
#include "collision_solver_sw.h"
#include "os/os.h"
#include "space_sw.h"
@@ -296,17 +297,7 @@ bool BodyPairSW::setup(real_t p_step) {
c.rA = global_A - A->get_center_of_mass();
c.rB = global_B - B->get_center_of_mass() - offset_B;
-// contact query reporting...
-#if 0
- if (A->get_body_type() == PhysicsServer::BODY_CHARACTER)
- static_cast<CharacterBodySW*>(A)->report_character_contact( global_A, global_B, B );
- if (B->get_body_type() == PhysicsServer::BODY_CHARACTER)
- static_cast<CharacterBodySW*>(B)->report_character_contact( global_B, global_A, A );
- if (A->has_contact_query())
- A->report_contact( global_A, global_B, B );
- if (B->has_contact_query())
- B->report_contact( global_B, global_A, A );
-#endif
+ // contact query reporting...
if (A->can_report_contacts()) {
Vector3 crA = A->get_angular_velocity().cross(c.rA) + A->get_linear_velocity();
@@ -327,18 +318,7 @@ bool BodyPairSW::setup(real_t p_step) {
kNormal += c.normal.dot(inertia_A.cross(c.rA)) + c.normal.dot(inertia_B.cross(c.rB));
c.mass_normal = 1.0f / kNormal;
-#if 1
c.bias = -bias * inv_dt * MIN(0.0f, -depth + max_penetration);
-
-#else
- if (depth > max_penetration) {
- c.bias = (depth - max_penetration) * (1.0 / (p_step * (1.0 / RELAXATION_TIMESTEPS)));
- } else {
- real_t approach = -0.1 * (depth - max_penetration) / (CMP_EPSILON + max_penetration);
- approach = CLAMP(approach, CMP_EPSILON, 1.0);
- c.bias = approach * (depth - max_penetration) * (1.0 / p_step);
- }
-#endif
c.depth = depth;
Vector3 j_vec = c.normal * c.acc_normal_impulse + c.acc_tangent_impulse;
diff --git a/servers/physics/body_pair_sw.h b/servers/physics/body_pair_sw.h
index cb16849399..f09c977950 100644
--- a/servers/physics/body_pair_sw.h
+++ b/servers/physics/body_pair_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/body_sw.cpp b/servers/physics/body_sw.cpp
index e065fae2be..46a5192e52 100644
--- a/servers/physics/body_sw.cpp
+++ b/servers/physics/body_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/body_sw.h b/servers/physics/body_sw.h
index 512b868570..7e8d31f8eb 100644
--- a/servers/physics/body_sw.h
+++ b/servers/physics/body_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/broad_phase_basic.cpp b/servers/physics/broad_phase_basic.cpp
index 05a2e1fdf8..959718a252 100644
--- a/servers/physics/broad_phase_basic.cpp
+++ b/servers/physics/broad_phase_basic.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -30,17 +30,14 @@
#include "broad_phase_basic.h"
#include "list.h"
#include "print_string.h"
-BroadPhaseSW::ID BroadPhaseBasic::create(CollisionObjectSW *p_object_, int p_subindex) {
+BroadPhaseSW::ID BroadPhaseBasic::create(CollisionObjectSW *p_object, int p_subindex) {
- if (p_object_ == NULL) {
-
- ERR_FAIL_COND_V(p_object_ == NULL, 0);
- }
+ ERR_FAIL_COND_V(p_object == NULL, NULL);
current++;
Element e;
- e.owner = p_object_;
+ e.owner = p_object;
e._static = false;
e.subindex = p_subindex;
diff --git a/servers/physics/broad_phase_basic.h b/servers/physics/broad_phase_basic.h
index 8dabf72f11..51a24f4678 100644
--- a/servers/physics/broad_phase_basic.h
+++ b/servers/physics/broad_phase_basic.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/broad_phase_octree.cpp b/servers/physics/broad_phase_octree.cpp
index fb2144bd03..e7111d9580 100644
--- a/servers/physics/broad_phase_octree.cpp
+++ b/servers/physics/broad_phase_octree.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/broad_phase_octree.h b/servers/physics/broad_phase_octree.h
index bd3ba6677a..d28f2da13f 100644
--- a/servers/physics/broad_phase_octree.h
+++ b/servers/physics/broad_phase_octree.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/broad_phase_sw.cpp b/servers/physics/broad_phase_sw.cpp
index c3d42d4c2f..3e5b7e72c6 100644
--- a/servers/physics/broad_phase_sw.cpp
+++ b/servers/physics/broad_phase_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/broad_phase_sw.h b/servers/physics/broad_phase_sw.h
index 5564cf5077..2b5ed629fe 100644
--- a/servers/physics/broad_phase_sw.h
+++ b/servers/physics/broad_phase_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/collision_object_sw.cpp b/servers/physics/collision_object_sw.cpp
index d673088304..ab716a8f6e 100644
--- a/servers/physics/collision_object_sw.cpp
+++ b/servers/physics/collision_object_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/collision_object_sw.h b/servers/physics/collision_object_sw.h
index 44786829af..dc988aae86 100644
--- a/servers/physics/collision_object_sw.h
+++ b/servers/physics/collision_object_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/collision_solver_sat.cpp b/servers/physics/collision_solver_sat.cpp
index 128f78e46e..a044df7f31 100644
--- a/servers/physics/collision_solver_sat.cpp
+++ b/servers/physics/collision_solver_sat.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/collision_solver_sat.h b/servers/physics/collision_solver_sat.h
index d5fae7798a..efe9bc87ac 100644
--- a/servers/physics/collision_solver_sat.h
+++ b/servers/physics/collision_solver_sat.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/collision_solver_sw.cpp b/servers/physics/collision_solver_sw.cpp
index 32a42bcaf4..7bef208237 100644
--- a/servers/physics/collision_solver_sw.cpp
+++ b/servers/physics/collision_solver_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -271,7 +271,7 @@ bool CollisionSolverSW::solve_distance_plane(const ShapeSW *p_shape_A, const Tra
bool collided = false;
Vector3 closest;
- real_t closest_d;
+ real_t closest_d = 0;
for (int i = 0; i < support_count; i++) {
diff --git a/servers/physics/collision_solver_sw.h b/servers/physics/collision_solver_sw.h
index 5a4e864eb5..1e38b1b54e 100644
--- a/servers/physics/collision_solver_sw.h
+++ b/servers/physics/collision_solver_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/constraint_sw.h b/servers/physics/constraint_sw.h
index d9f153a6a6..047513f635 100644
--- a/servers/physics/constraint_sw.h
+++ b/servers/physics/constraint_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/gjk_epa.cpp b/servers/physics/gjk_epa.cpp
index ab2a9b507a..0f03bd917a 100644
--- a/servers/physics/gjk_epa.cpp
+++ b/servers/physics/gjk_epa.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -410,8 +410,8 @@ struct GJK
if(l>GJK_SIMPLEX3_EPS)
{
real_t mindist=-1;
- real_t subw[2];
- U subm;
+ real_t subw[2] = { 0 , 0};
+ U subm = 0;
for(U i=0;i<3;++i)
{
if(vec3_dot(*vt[i],vec3_cross(dl[i],n))>0)
@@ -458,7 +458,7 @@ struct GJK
{
real_t mindist=-1;
real_t subw[3];
- U subm;
+ U subm=0;
for(U i=0;i<3;++i)
{
const U j=imd3[i];
diff --git a/servers/physics/gjk_epa.h b/servers/physics/gjk_epa.h
index 316b991477..6d8539d365 100644
--- a/servers/physics/gjk_epa.h
+++ b/servers/physics/gjk_epa.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/joints/cone_twist_joint_sw.cpp b/servers/physics/joints/cone_twist_joint_sw.cpp
index d00eab53d3..3c900d4fbe 100644
--- a/servers/physics/joints/cone_twist_joint_sw.cpp
+++ b/servers/physics/joints/cone_twist_joint_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/joints/cone_twist_joint_sw.h b/servers/physics/joints/cone_twist_joint_sw.h
index f0e029712c..0c722463be 100644
--- a/servers/physics/joints/cone_twist_joint_sw.h
+++ b/servers/physics/joints/cone_twist_joint_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/joints/generic_6dof_joint_sw.cpp b/servers/physics/joints/generic_6dof_joint_sw.cpp
index e1cd6ee7e5..70cc549e2d 100644
--- a/servers/physics/joints/generic_6dof_joint_sw.cpp
+++ b/servers/physics/joints/generic_6dof_joint_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/joints/generic_6dof_joint_sw.h b/servers/physics/joints/generic_6dof_joint_sw.h
index 587a5850df..f6af0b1d6f 100644
--- a/servers/physics/joints/generic_6dof_joint_sw.h
+++ b/servers/physics/joints/generic_6dof_joint_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/joints/hinge_joint_sw.cpp b/servers/physics/joints/hinge_joint_sw.cpp
index 3938427cea..fe20a55b60 100644
--- a/servers/physics/joints/hinge_joint_sw.cpp
+++ b/servers/physics/joints/hinge_joint_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/joints/hinge_joint_sw.h b/servers/physics/joints/hinge_joint_sw.h
index 5ebf0cb165..8e0f9a4da0 100644
--- a/servers/physics/joints/hinge_joint_sw.h
+++ b/servers/physics/joints/hinge_joint_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/joints/jacobian_entry_sw.h b/servers/physics/joints/jacobian_entry_sw.h
index 537a9a8f3d..79ce0e6157 100644
--- a/servers/physics/joints/jacobian_entry_sw.h
+++ b/servers/physics/joints/jacobian_entry_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/joints/pin_joint_sw.cpp b/servers/physics/joints/pin_joint_sw.cpp
index 0792ffeecd..779e086858 100644
--- a/servers/physics/joints/pin_joint_sw.cpp
+++ b/servers/physics/joints/pin_joint_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/joints/pin_joint_sw.h b/servers/physics/joints/pin_joint_sw.h
index 1d580b6c21..670c1ab61f 100644
--- a/servers/physics/joints/pin_joint_sw.h
+++ b/servers/physics/joints/pin_joint_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/joints/slider_joint_sw.cpp b/servers/physics/joints/slider_joint_sw.cpp
index 947f46e960..66585f2605 100644
--- a/servers/physics/joints/slider_joint_sw.cpp
+++ b/servers/physics/joints/slider_joint_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/joints/slider_joint_sw.h b/servers/physics/joints/slider_joint_sw.h
index 7818ee2a5c..5079c65707 100644
--- a/servers/physics/joints/slider_joint_sw.h
+++ b/servers/physics/joints/slider_joint_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/joints_sw.h b/servers/physics/joints_sw.h
index b25939d523..b15ae08049 100644
--- a/servers/physics/joints_sw.h
+++ b/servers/physics/joints_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/physics_server_sw.cpp b/servers/physics/physics_server_sw.cpp
index 151fc44476..8d6f7b3fd8 100644
--- a/servers/physics/physics_server_sw.cpp
+++ b/servers/physics/physics_server_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "physics_server_sw.h"
+
#include "broad_phase_basic.h"
#include "broad_phase_octree.h"
#include "joints/cone_twist_joint_sw.h"
@@ -1206,117 +1207,6 @@ bool PhysicsServerSW::generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis p_a
return generic_6dof_joint->get_flag(p_axis, p_flag);
}
-#if 0
-void PhysicsServerSW::joint_set_param(RID p_joint, JointParam p_param, real_t p_value) {
-
- JointSW *joint = joint_owner.get(p_joint);
- ERR_FAIL_COND(!joint);
-
- switch(p_param) {
- case JOINT_PARAM_BIAS: joint->set_bias(p_value); break;
- case JOINT_PARAM_MAX_BIAS: joint->set_max_bias(p_value); break;
- case JOINT_PARAM_MAX_FORCE: joint->set_max_force(p_value); break;
- }
-
-
-}
-
-real_t PhysicsServerSW::joint_get_param(RID p_joint,JointParam p_param) const {
-
- const JointSW *joint = joint_owner.get(p_joint);
- ERR_FAIL_COND_V(!joint,-1);
-
- switch(p_param) {
- case JOINT_PARAM_BIAS: return joint->get_bias(); break;
- case JOINT_PARAM_MAX_BIAS: return joint->get_max_bias(); break;
- case JOINT_PARAM_MAX_FORCE: return joint->get_max_force(); break;
- }
-
- return 0;
-}
-
-
-RID PhysicsServerSW::pin_joint_create(const Vector3& p_pos,RID p_body_a,RID p_body_b) {
-
- BodySW *A=body_owner.get(p_body_a);
- ERR_FAIL_COND_V(!A,RID());
- BodySW *B=NULL;
- if (body_owner.owns(p_body_b)) {
- B=body_owner.get(p_body_b);
- ERR_FAIL_COND_V(!B,RID());
- }
-
- JointSW *joint = memnew( PinJointSW(p_pos,A,B) );
- RID self = joint_owner.make_rid(joint);
- joint->set_self(self);
-
- return self;
-}
-
-RID PhysicsServerSW::groove_joint_create(const Vector3& p_a_groove1,const Vector3& p_a_groove2, const Vector3& p_b_anchor, RID p_body_a,RID p_body_b) {
-
-
- BodySW *A=body_owner.get(p_body_a);
- ERR_FAIL_COND_V(!A,RID());
-
- BodySW *B=body_owner.get(p_body_b);
- ERR_FAIL_COND_V(!B,RID());
-
- JointSW *joint = memnew( GrooveJointSW(p_a_groove1,p_a_groove2,p_b_anchor,A,B) );
- RID self = joint_owner.make_rid(joint);
- joint->set_self(self);
- return self;
-
-
-}
-
-RID PhysicsServerSW::damped_spring_joint_create(const Vector3& p_anchor_a,const Vector3& p_anchor_b,RID p_body_a,RID p_body_b) {
-
- BodySW *A=body_owner.get(p_body_a);
- ERR_FAIL_COND_V(!A,RID());
-
- BodySW *B=body_owner.get(p_body_b);
- ERR_FAIL_COND_V(!B,RID());
-
- JointSW *joint = memnew( DampedSpringJointSW(p_anchor_a,p_anchor_b,A,B) );
- RID self = joint_owner.make_rid(joint);
- joint->set_self(self);
- return self;
-
-}
-
-void PhysicsServerSW::damped_string_joint_set_param(RID p_joint, DampedStringParam p_param, real_t p_value) {
-
-
- JointSW *j = joint_owner.get(p_joint);
- ERR_FAIL_COND(!j);
- ERR_FAIL_COND(j->get_type()!=JOINT_DAMPED_SPRING);
-
- DampedSpringJointSW *dsj = static_cast<DampedSpringJointSW*>(j);
- dsj->set_param(p_param,p_value);
-}
-
-real_t PhysicsServerSW::damped_string_joint_get_param(RID p_joint, DampedStringParam p_param) const {
-
- JointSW *j = joint_owner.get(p_joint);
- ERR_FAIL_COND_V(!j,0);
- ERR_FAIL_COND_V(j->get_type()!=JOINT_DAMPED_SPRING,0);
-
- DampedSpringJointSW *dsj = static_cast<DampedSpringJointSW*>(j);
- return dsj->get_param(p_param);
-}
-
-PhysicsServer::JointType PhysicsServerSW::joint_get_type(RID p_joint) const {
-
-
- JointSW *joint = joint_owner.get(p_joint);
- ERR_FAIL_COND_V(!joint,JOINT_PIN);
-
- return joint->get_type();
-}
-
-#endif
-
void PhysicsServerSW::free(RID p_rid) {
if (shape_owner.owns(p_rid)) {
diff --git a/servers/physics/physics_server_sw.h b/servers/physics/physics_server_sw.h
index 818922a989..2e1fa7065a 100644
--- a/servers/physics/physics_server_sw.h
+++ b/servers/physics/physics_server_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -264,18 +264,6 @@ public:
virtual void joint_set_solver_priority(RID p_joint, int p_priority);
virtual int joint_get_solver_priority(RID p_joint) const;
-#if 0
- virtual void joint_set_param(RID p_joint, JointParam p_param, real_t p_value);
- virtual real_t joint_get_param(RID p_joint,JointParam p_param) const;
-
- virtual RID pin_joint_create(const Vector3& p_pos,RID p_body_a,RID p_body_b=RID());
- virtual RID groove_joint_create(const Vector3& p_a_groove1,const Vector3& p_a_groove2, const Vector3& p_b_anchor, RID p_body_a,RID p_body_b);
- virtual RID damped_spring_joint_create(const Vector3& p_anchor_a,const Vector3& p_anchor_b,RID p_body_a,RID p_body_b=RID());
- virtual void damped_string_joint_set_param(RID p_joint, DampedStringParam p_param, real_t p_value);
- virtual real_t damped_string_joint_get_param(RID p_joint, DampedStringParam p_param) const;
-
- virtual JointType joint_get_type(RID p_joint) const;
-#endif
/* MISC */
virtual void free(RID p_rid);
diff --git a/servers/physics/shape_sw.cpp b/servers/physics/shape_sw.cpp
index b4004c8c94..1845188089 100644
--- a/servers/physics/shape_sw.cpp
+++ b/servers/physics/shape_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,9 +28,11 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "shape_sw.h"
+
#include "geometry.h"
#include "quick_hull.h"
#include "sort.h"
+
#define _POINT_SNAP 0.001953125
#define _EDGE_IS_VALID_SUPPORT_THRESHOLD 0.0002
#define _FACE_IS_VALID_SUPPORT_THRESHOLD 0.9998
@@ -732,7 +734,7 @@ Vector3 ConvexPolygonShapeSW::get_support(const Vector3 &p_normal) const {
Vector3 n = p_normal;
int vert_support_idx = -1;
- real_t support_max;
+ real_t support_max = 0;
int vertex_count = mesh.vertices.size();
if (vertex_count == 0)
@@ -765,8 +767,8 @@ void ConvexPolygonShapeSW::get_supports(const Vector3 &p_normal, int p_max, Vect
int vc = mesh.vertices.size();
//find vertex first
- real_t max;
- int vtx;
+ real_t max = 0;
+ int vtx = 0;
for (int i = 0; i < vc; i++) {
@@ -998,7 +1000,7 @@ void FaceShapeSW::project_range(const Vector3 &p_normal, const Transform &p_tran
Vector3 FaceShapeSW::get_support(const Vector3 &p_normal) const {
int vert_support_idx = -1;
- real_t support_max;
+ real_t support_max = 0;
for (int i = 0; i < 3; i++) {
@@ -1152,7 +1154,7 @@ Vector3 ConcavePolygonShapeSW::get_support(const Vector3 &p_normal) const {
Vector3 n = p_normal;
int vert_support_idx = -1;
- real_t support_max;
+ real_t support_max = 0;
for (int i = 0; i < count; i++) {
@@ -1473,119 +1475,6 @@ void ConcavePolygonShapeSW::_setup(PoolVector<Vector3> p_faces) {
PoolVector<Vector3>::Read r = p_faces.read();
const Vector3 *facesr = r.ptr();
-#if 0
- Map<Vector3,int> point_map;
- List<Face> face_list;
-
-
- for(int i=0;i<src_face_count;i++) {
-
- Face3 faceaux;
-
- for(int j=0;j<3;j++) {
-
- faceaux.vertex[j]=facesr[i*3+j].snapped(_POINT_SNAP);
- //faceaux.vertex[j]=facesr[i*3+j];//facesr[i*3+j].snapped(_POINT_SNAP);
- }
-
- ERR_CONTINUE( faceaux.is_degenerate() );
-
- Face face;
-
- for(int j=0;j<3;j++) {
-
-
- Map<Vector3,int>::Element *E=point_map.find(faceaux.vertex[j]);
- if (E) {
-
- face.indices[j]=E->value();
- } else {
-
- face.indices[j]=point_map.size();
- point_map.insert(faceaux.vertex[j],point_map.size());
-
- }
- }
-
- face_list.push_back(face);
- }
-
- vertices.resize( point_map.size() );
-
- PoolVector<Vector3>::Write vw = vertices.write();
- Vector3 *verticesw=vw.ptr();
-
- AABB _aabb;
-
- for( Map<Vector3,int>::Element *E=point_map.front();E;E=E->next()) {
-
- if (E==point_map.front()) {
- _aabb.pos=E->key();
- } else {
-
- _aabb.expand_to(E->key());
- }
- verticesw[E->value()]=E->key();
- }
-
- point_map.clear(); // not needed anymore
-
- faces.resize(face_list.size());
- PoolVector<Face>::Write w = faces.write();
- Face *facesw=w.ptr();
-
- int fc=0;
-
- for( List<Face>::Element *E=face_list.front();E;E=E->next()) {
-
- facesw[fc++]=E->get();
- }
-
- face_list.clear();
-
-
- PoolVector<_VolumeSW_BVH_Element> bvh_array;
- bvh_array.resize( fc );
-
- PoolVector<_VolumeSW_BVH_Element>::Write bvhw = bvh_array.write();
- _VolumeSW_BVH_Element *bvh_arrayw=bvhw.ptr();
-
-
- for(int i=0;i<fc;i++) {
-
- AABB face_aabb;
- face_aabb.pos=verticesw[facesw[i].indices[0]];
- face_aabb.expand_to( verticesw[facesw[i].indices[1]] );
- face_aabb.expand_to( verticesw[facesw[i].indices[2]] );
-
- bvh_arrayw[i].face_index=i;
- bvh_arrayw[i].aabb=face_aabb;
- bvh_arrayw[i].center=face_aabb.pos+face_aabb.size*0.5;
-
- }
-
- w=PoolVector<Face>::Write();
- vw=PoolVector<Vector3>::Write();
-
-
- int count=0;
- _VolumeSW_BVH *bvh_tree=_volume_sw_build_bvh(bvh_arrayw,fc,count);
-
- ERR_FAIL_COND(count==0);
-
- bvhw=PoolVector<_VolumeSW_BVH_Element>::Write();
-
- bvh.resize( count+1 );
-
- PoolVector<BVH>::Write bvhw2 = bvh.write();
- BVH*bvh_arrayw2=bvhw2.ptr();
-
- int idx=0;
- _fill_bvh(bvh_tree,bvh_arrayw2,idx);
-
- set_aabb(_aabb);
-
-#else
PoolVector<_VolumeSW_BVH_Element> bvh_array;
bvh_array.resize(src_face_count);
@@ -1638,8 +1527,6 @@ void ConcavePolygonShapeSW::_setup(PoolVector<Vector3> p_faces) {
_fill_bvh(bvh_tree, bvh_arrayw2, idx);
configure(_aabb); // this type of shape has no margin
-
-#endif
}
void ConcavePolygonShapeSW::set_data(const Variant &p_data) {
diff --git a/servers/physics/shape_sw.h b/servers/physics/shape_sw.h
index 52623c019d..151b84c054 100644
--- a/servers/physics/shape_sw.h
+++ b/servers/physics/shape_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp
index fc52aa45aa..17e2df6c9e 100644
--- a/servers/physics/space_sw.cpp
+++ b/servers/physics/space_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "space_sw.h"
+
#include "collision_solver_sw.h"
#include "physics_server_sw.h"
#include "project_settings.h"
@@ -267,20 +268,13 @@ bool PhysicsDirectSpaceStateSW::cast_motion(const RID &p_shape, const Transform
continue;
}
-//test initial overlap
-#if 0
- if (CollisionSolverSW::solve_static(shape,p_xform,col_obj->get_shape(shape_idx),col_obj_xform,NULL,NULL,&sep_axis)) {
- print_line("failed initial cast (collision at beginning)");
- return false;
- }
-#else
+ //test initial overlap
sep_axis = p_motion.normalized();
if (!CollisionSolverSW::solve_distance(shape, p_xform, col_obj->get_shape(shape_idx), col_obj_xform, point_A, point_B, aabb, &sep_axis)) {
//print_line("failed motion cast (no collision)");
return false;
}
-#endif
//just do kinematic solving
real_t low = 0;
@@ -631,21 +625,6 @@ bool SpaceSW::test_body_motion(BodySW *p_body, const Transform &p_from, const Ve
Vector3 a = sr[i * 2 + 0];
Vector3 b = sr[i * 2 + 1];
-
-#if 0
- Vector3 rel = b-a;
- real_t d = rel.length();
- if (d==0)
- continue;
-
- Vector3 n = rel/d;
- real_t traveled = n.dot(recover_motion);
- a+=n*traveled;
-
- real_t d = a.distance_to(b);
- if (d<margin)
- continue;
-#endif
recover_motion += (b - a) * 0.4;
}
diff --git a/servers/physics/space_sw.h b/servers/physics/space_sw.h
index dc7799d992..56f4d2f10d 100644
--- a/servers/physics/space_sw.h
+++ b/servers/physics/space_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/step_sw.cpp b/servers/physics/step_sw.cpp
index 5b5f5201db..79a55e0af1 100644
--- a/servers/physics/step_sw.cpp
+++ b/servers/physics/step_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics/step_sw.h b/servers/physics/step_sw.h
index 893bcfa6ad..56acd8ac37 100644
--- a/servers/physics/step_sw.h
+++ b/servers/physics/step_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/area_2d_sw.cpp b/servers/physics_2d/area_2d_sw.cpp
index fc5167c720..6c0bc2c186 100644
--- a/servers/physics_2d/area_2d_sw.cpp
+++ b/servers/physics_2d/area_2d_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/area_2d_sw.h b/servers/physics_2d/area_2d_sw.h
index 6d74a4b0f6..622729bfe8 100644
--- a/servers/physics_2d/area_2d_sw.h
+++ b/servers/physics_2d/area_2d_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/area_pair_2d_sw.cpp b/servers/physics_2d/area_pair_2d_sw.cpp
index 184db944da..9b43305a61 100644
--- a/servers/physics_2d/area_pair_2d_sw.cpp
+++ b/servers/physics_2d/area_pair_2d_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/area_pair_2d_sw.h b/servers/physics_2d/area_pair_2d_sw.h
index 05954424f8..4a046c5f55 100644
--- a/servers/physics_2d/area_pair_2d_sw.h
+++ b/servers/physics_2d/area_pair_2d_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp
index 91b5646ef5..eb5fb5a729 100644
--- a/servers/physics_2d/body_2d_sw.cpp
+++ b/servers/physics_2d/body_2d_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/body_2d_sw.h b/servers/physics_2d/body_2d_sw.h
index 412f2f51cd..0ffad62f45 100644
--- a/servers/physics_2d/body_2d_sw.h
+++ b/servers/physics_2d/body_2d_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/body_pair_2d_sw.cpp b/servers/physics_2d/body_pair_2d_sw.cpp
index 484d4503d0..828b90e5d0 100644
--- a/servers/physics_2d/body_pair_2d_sw.cpp
+++ b/servers/physics_2d/body_pair_2d_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/body_pair_2d_sw.h b/servers/physics_2d/body_pair_2d_sw.h
index 4d2b3b31f9..4817ea72f6 100644
--- a/servers/physics_2d/body_pair_2d_sw.h
+++ b/servers/physics_2d/body_pair_2d_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/broad_phase_2d_basic.cpp b/servers/physics_2d/broad_phase_2d_basic.cpp
index 76094ad98c..e15f47a946 100644
--- a/servers/physics_2d/broad_phase_2d_basic.cpp
+++ b/servers/physics_2d/broad_phase_2d_basic.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/broad_phase_2d_basic.h b/servers/physics_2d/broad_phase_2d_basic.h
index edd788266a..1e9a4280db 100644
--- a/servers/physics_2d/broad_phase_2d_basic.h
+++ b/servers/physics_2d/broad_phase_2d_basic.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/broad_phase_2d_hash_grid.cpp b/servers/physics_2d/broad_phase_2d_hash_grid.cpp
index 0330bfa9f3..db18995bee 100644
--- a/servers/physics_2d/broad_phase_2d_hash_grid.cpp
+++ b/servers/physics_2d/broad_phase_2d_hash_grid.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -640,7 +640,7 @@ BroadPhase2DHashGrid::BroadPhase2DHashGrid() {
cell_size = GLOBAL_DEF("physics/2d/cell_size", 128);
large_object_min_surface = GLOBAL_DEF("physics/2d/large_object_surface_threshold_in_cells", 512);
- for (int i = 0; i < hash_table_size; i++)
+ for (uint32_t i = 0; i < hash_table_size; i++)
hash_table[i] = NULL;
pass = 1;
@@ -649,7 +649,7 @@ BroadPhase2DHashGrid::BroadPhase2DHashGrid() {
BroadPhase2DHashGrid::~BroadPhase2DHashGrid() {
- for (int i = 0; i < hash_table_size; i++) {
+ for (uint32_t i = 0; i < hash_table_size; i++) {
while (hash_table[i]) {
PosBin *pb = hash_table[i];
hash_table[i] = pb->next;
diff --git a/servers/physics_2d/broad_phase_2d_hash_grid.h b/servers/physics_2d/broad_phase_2d_hash_grid.h
index 0cb3edb94f..8da72c5fe0 100644
--- a/servers/physics_2d/broad_phase_2d_hash_grid.h
+++ b/servers/physics_2d/broad_phase_2d_hash_grid.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/broad_phase_2d_sw.cpp b/servers/physics_2d/broad_phase_2d_sw.cpp
index a412f76567..d3840d570e 100644
--- a/servers/physics_2d/broad_phase_2d_sw.cpp
+++ b/servers/physics_2d/broad_phase_2d_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/broad_phase_2d_sw.h b/servers/physics_2d/broad_phase_2d_sw.h
index 0309cbe730..7e7fc7d1da 100644
--- a/servers/physics_2d/broad_phase_2d_sw.h
+++ b/servers/physics_2d/broad_phase_2d_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/collision_object_2d_sw.cpp b/servers/physics_2d/collision_object_2d_sw.cpp
index 8f13f1130a..b68fa14f4b 100644
--- a/servers/physics_2d/collision_object_2d_sw.cpp
+++ b/servers/physics_2d/collision_object_2d_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/collision_object_2d_sw.h b/servers/physics_2d/collision_object_2d_sw.h
index ad8edb0b3d..db1270633f 100644
--- a/servers/physics_2d/collision_object_2d_sw.h
+++ b/servers/physics_2d/collision_object_2d_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/collision_solver_2d_sat.cpp b/servers/physics_2d/collision_solver_2d_sat.cpp
index a5a6cd7eac..bf8478d0b1 100644
--- a/servers/physics_2d/collision_solver_2d_sat.cpp
+++ b/servers/physics_2d/collision_solver_2d_sat.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "collision_solver_2d_sat.h"
+
#include "geometry.h"
struct _CollectorCallback2D {
@@ -89,124 +90,6 @@ _FORCE_INLINE_ static void _generate_contacts_edge_edge(const Vector2 *p_points_
ERR_FAIL_COND(p_point_count_B != 2); // circle is actually a 4x3 matrix
#endif
-#if 0
- Vector2 rel_A=p_points_A[1]-p_points_A[0];
- Vector2 rel_B=p_points_B[1]-p_points_B[0];
-
- Vector2 t = p_collector->normal.tangent();
-
- print_line("tangent: "+t);
-
- real_t dA[2]={t.dot(p_points_A[0]),t.dot(p_points_A[1])};
- Vector2 pA[2]={p_points_A[0],p_points_A[1]};
-
- if (dA[0]>dA[1]) {
- SWAP(dA[0],dA[1]);
- SWAP(pA[0],pA[1]);
- }
-
- real_t dB[2]={t.dot(p_points_B[0]),t.dot(p_points_B[1])};
- Vector2 pB[2]={p_points_B[0],p_points_B[1]};
- if (dB[0]>dB[1]) {
- SWAP(dB[0],dB[1]);
- SWAP(pB[0],pB[1]);
- }
-
-
- if (dA[0]<dB[0]) {
-
- Vector2 n = (p_points_A[1]-p_points_A[0]).normalized().tangent();
- real_t d = n.dot(p_points_A[1]);
-
- if (dA[1]>dB[1]) {
- //A contains B
- for(int i=0;i<2;i++) {
-
- Vector2 b = p_points_B[i];
- Vector2 a = n.plane_project(d,b);
- if (p_collector->normal.dot(a) > p_collector->normal.dot(b)-CMP_EPSILON)
- continue;
- p_collector->call(a,b);
-
- }
- } else {
-
- // B0,A1 containment
-
- Vector2 n_B = (p_points_B[1]-p_points_B[0]).normalized().tangent();
- real_t d_B = n_B.dot(p_points_B[1]);
-
- // first, B on A
-
- {
- Vector2 b = p_points_B[0];
- Vector2 a = n.plane_project(d,b);
- if (p_collector->normal.dot(a) < p_collector->normal.dot(b)-CMP_EPSILON)
- p_collector->call(a,b);
- }
-
- // second, A on B
-
- {
- Vector2 a = p_points_A[1];
- Vector2 b = n_B.plane_project(d_B,a);
- if (p_collector->normal.dot(a) < p_collector->normal.dot(b)-CMP_EPSILON)
- p_collector->call(a,b);
- }
-
-
-
- }
-
-
- } else {
-
- Vector2 n = (p_points_B[1]-p_points_B[0]).normalized().tangent();
- real_t d = n.dot(p_points_B[1]);
-
- if (dB[1]>dA[1]) {
- //B contains A
- for(int i=0;i<2;i++) {
-
- Vector2 a = p_points_A[i];
- Vector2 b = n.plane_project(d,a);
- if (p_collector->normal.dot(a) > p_collector->normal.dot(b)-CMP_EPSILON)
- continue;
- p_collector->call(a,b);
- }
- } else {
-
- // A0,B1 containment
- Vector2 n_A = (p_points_A[1]-p_points_A[0]).normalized().tangent();
- real_t d_A = n_A.dot(p_points_A[1]);
-
- // first A on B
-
- {
- Vector2 a = p_points_A[0];
- Vector2 b = n.plane_project(d,a);
- if (p_collector->normal.dot(a) < p_collector->normal.dot(b)-CMP_EPSILON)
- p_collector->call(a,b);
-
- }
-
- //second, B on A
-
- {
-
- Vector2 b = p_points_B[1];
- Vector2 a = n_A.plane_project(d_A,b);
- if (p_collector->normal.dot(a) < p_collector->normal.dot(b)-CMP_EPSILON)
- p_collector->call(a,b);
- }
-
- }
- }
-
-#endif
-
-#if 1
-
Vector2 n = p_collector->normal;
Vector2 t = n.tangent();
real_t dA = n.dot(p_points_A[0]);
@@ -246,38 +129,6 @@ _FORCE_INLINE_ static void _generate_contacts_edge_edge(const Vector2 *p_points_
p_collector->call(a, b);
}
}
-
-#elif 0
- Vector2 axis = rel_A.normalized(); //make an axis
- Vector2 axis_B = rel_B.normalized();
- if (axis.dot(axis_B) < 0)
- axis_B = -axis_B;
- axis = (axis + axis_B) * 0.5;
- Vector2 base_A = p_points_A[0] - axis * axis.dot(p_points_A[0]);
- Vector2 base_B = p_points_B[0] - axis * axis.dot(p_points_B[0]);
-
- //sort all 4 points in axis
- real_t dvec[4] = { axis.dot(p_points_A[0]), axis.dot(p_points_A[1]), axis.dot(p_points_B[0]), axis.dot(p_points_B[1]) };
-
- //todo , find max/min and then use 2 central points
- SortArray<real_t> sa;
- sa.sort(dvec, 4);
-
- //use the middle ones as contacts
- for (int i = 1; i <= 2; i++) {
-
- Vector2 a = base_A + axis * dvec[i];
- Vector2 b = base_B + axis * dvec[i];
- if (p_collector->normal.dot(a) > p_collector->normal.dot(b) - 0.01) {
- print_line("fail a: " + a);
- print_line("fail b: " + b);
- continue;
- }
- print_line("res a: " + a);
- print_line("res b: " + b);
- p_collector->call(a, b);
- }
-#endif
}
static void _generate_contacts_from_supports(const Vector2 *p_points_A, int p_point_count_A, const Vector2 *p_points_B, int p_point_count_B, _CollectorCallback2D *p_collector) {
@@ -504,37 +355,11 @@ public:
}
}
- /*
-
-
- print_line("**************************");
- printf("CBK: %p\n",callback->userdata);
- print_line("type A: "+itos(shape_A->get_type()));
- print_line("type B: "+itos(shape_B->get_type()));
- print_line("xform A: "+*transform_A);
- print_line("xform B: "+*transform_B);
- print_line("normal: "+best_axis);
- print_line("depth: "+rtos(best_depth));
- print_line("index: "+itos(best_axis_index));
-
- for(int i=0;i<support_count_A;i++) {
-
- print_line("A-"+itos(i)+": "+supports_A[i]);
- }
-
- for(int i=0;i<support_count_B;i++) {
-
- print_line("B-"+itos(i)+": "+supports_B[i]);
- }
-//*/
-
callback->normal = best_axis;
_generate_contacts_from_supports(supports_A, support_count_A, supports_B, support_count_B, callback);
if (callback && callback->sep_axis && *callback->sep_axis != Vector2())
*callback->sep_axis = Vector2(); //invalidate previous axis (no test)
- //CollisionSolver2DSW::CallbackResult cbk=NULL;
- //cbk(Vector2(),Vector2(),NULL);
}
_FORCE_INLINE_ SeparatorAxisTest2D(const ShapeA *p_shape_A, const Transform2D &p_transform_a, const ShapeB *p_shape_B, const Transform2D &p_transform_b, _CollectorCallback2D *p_collector, const Vector2 &p_motion_A = Vector2(), const Vector2 &p_motion_B = Vector2(), real_t p_margin_A = 0, real_t p_margin_B = 0) {
@@ -558,9 +383,6 @@ public:
};
/****** SAT TESTS *******/
-/****** SAT TESTS *******/
-/****** SAT TESTS *******/
-/****** SAT TESTS *******/
#define TEST_POINT(m_a, m_b) \
((!separator.test_axis(((m_a) - (m_b)).normalized())) || \
@@ -582,11 +404,6 @@ static void _collision_segment_segment(const Shape2DSW *p_a, const Transform2D &
return;
//this collision is kind of pointless
- /*
- if (!separator.test_previous_axis())
- return;
- */
-
if (!separator.test_cast())
return;
diff --git a/servers/physics_2d/collision_solver_2d_sat.h b/servers/physics_2d/collision_solver_2d_sat.h
index 2a075e2a30..520083c5fa 100644
--- a/servers/physics_2d/collision_solver_2d_sat.h
+++ b/servers/physics_2d/collision_solver_2d_sat.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/collision_solver_2d_sw.cpp b/servers/physics_2d/collision_solver_2d_sw.cpp
index b482f826c2..d66b917bcd 100644
--- a/servers/physics_2d/collision_solver_2d_sw.cpp
+++ b/servers/physics_2d/collision_solver_2d_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/collision_solver_2d_sw.h b/servers/physics_2d/collision_solver_2d_sw.h
index aefd4d315d..9f3d348e91 100644
--- a/servers/physics_2d/collision_solver_2d_sw.h
+++ b/servers/physics_2d/collision_solver_2d_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/constraint_2d_sw.h b/servers/physics_2d/constraint_2d_sw.h
index 7ff28b0cf4..252d0ee9b4 100644
--- a/servers/physics_2d/constraint_2d_sw.h
+++ b/servers/physics_2d/constraint_2d_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/joints_2d_sw.cpp b/servers/physics_2d/joints_2d_sw.cpp
index 93091f55cf..897e145a3e 100644
--- a/servers/physics_2d/joints_2d_sw.cpp
+++ b/servers/physics_2d/joints_2d_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "joints_2d_sw.h"
+
#include "space_2d_sw.h"
//based on chipmunk joint constraints
@@ -87,127 +88,12 @@ normal_relative_velocity(Body2DSW *a, Body2DSW *b, Vector2 rA, Vector2 rB, Vecto
return relative_velocity(a, b, rA, rB).dot(n);
}
-#if 0
-
-bool PinJoint2DSW::setup(real_t p_step) {
-
- Space2DSW *space = A->get_space();
- ERR_FAIL_COND_V(!space,false;)
- rA = A->get_transform().basis_xform(anchor_A);
- rB = B?B->get_transform().basis_xform(anchor_B):anchor_B;
-
- Vector2 gA = A->get_transform().get_origin();
- Vector2 gB = B?B->get_transform().get_origin():Vector2();
-
- Vector2 delta = gB - gA;
- delta = (delta+rB) -rA;
-
- real_t jdist = delta.length();
- correct=false;
- if (jdist==0)
- return false; // do not correct
-
- correct=true;
-
- n = delta / jdist;
-
- // calculate mass normal
- mass_normal = 1.0f/k_scalar(A, B, rA, rB, n);
-
- // calculate bias velocity
- //real_t maxBias = joint->constraint.maxBias;
- bias = -(get_bias()==0?space->get_constraint_bias():get_bias())*(1.0/p_step)*(jdist-dist);
- bias = CLAMP(bias, -get_max_bias(), +get_max_bias());
-
- // compute max impulse
- jn_max = get_max_force() * p_step;
-
- // apply accumulated impulse
- Vector2 j = n * jn_acc;
- A->apply_impulse(rA,-j);
- if (B)
- B->apply_impulse(rB,j);
-
- print_line("setup");
- return true;
-}
-
-
-
-void PinJoint2DSW::solve(real_t p_step){
-
- if (!correct)
- return;
-
- Vector2 ln = n;
-
- // compute relative velocity
- real_t vrn = normal_relative_velocity(A,B, rA, rB, ln);
-
- // compute normal impulse
- real_t jn = (bias - vrn)*mass_normal;
- real_t jnOld = jn_acc;
- jn_acc = CLAMP(jnOld + jn,-jn_max,jn_max); //cpfclamp(jnOld + jn, -joint->jnMax, joint->jnMax);
- jn = jn_acc - jnOld;
- print_line("jn_acc: "+rtos(jn_acc));
- Vector2 j = jn*ln;
-
- A->apply_impulse(rA,-j);
- if (B)
- B->apply_impulse(rB,j);
-
-}
-
-
-PinJoint2DSW::PinJoint2DSW(const Vector2& p_pos,Body2DSW* p_body_a,Body2DSW* p_body_b) : Joint2DSW(_arr,p_body_b?2:1) {
-
- A=p_body_a;
- B=p_body_b;
- anchor_A = p_body_a->get_inv_transform().xform(p_pos);
- anchor_B = p_body_b?p_body_b->get_inv_transform().xform(p_pos):p_pos;
-
- jn_acc=0;
- dist=0;
-
- p_body_a->add_constraint(this,0);
- if (p_body_b)
- p_body_b->add_constraint(this,1);
-
-}
-
-PinJoint2DSW::~PinJoint2DSW() {
-
- if (A)
- A->remove_constraint(this);
- if (B)
- B->remove_constraint(this);
-
-}
-
-#else
-
bool PinJoint2DSW::setup(real_t p_step) {
Space2DSW *space = A->get_space();
ERR_FAIL_COND_V(!space, false;)
rA = A->get_transform().basis_xform(anchor_A);
rB = B ? B->get_transform().basis_xform(anchor_B) : anchor_B;
-#if 0
- Vector2 gA = rA+A->get_transform().get_origin();
- Vector2 gB = B?rB+B->get_transform().get_origin():rB;
-
- VectorB delta = gB - gA;
-
- real_t jdist = delta.length();
- correct=false;
- if (jdist==0)
- return false; // do not correct
-#endif
-
- // deltaV = deltaV0 + K * impulse
- // invM = [(1/m1 + 1/m2) * eye(2) - skew(rA) * invI1 * skew(rA) - skew(rB) * invI2 * skew(rB)]
- // = [1/m1+1/m2 0 ] + invI1 * [rA.y*rA.y -rA.x*rA.y] + invI2 * [rA.y*rA.y -rA.x*rA.y]
- // [ 0 1/m1+1/m2] [-rA.x*rA.y rA.x*rA.x] [-rA.x*rA.y rA.x*rA.x]
real_t B_inv_mass = B ? B->get_inv_mass() : 0.0;
@@ -315,8 +201,6 @@ PinJoint2DSW::~PinJoint2DSW() {
B->remove_constraint(this);
}
-#endif
-
//////////////////////////////////////////////
//////////////////////////////////////////////
//////////////////////////////////////////////
diff --git a/servers/physics_2d/joints_2d_sw.h b/servers/physics_2d/joints_2d_sw.h
index 548a8b778f..11cb41d9d1 100644
--- a/servers/physics_2d/joints_2d_sw.h
+++ b/servers/physics_2d/joints_2d_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -56,46 +56,6 @@ public:
max_force = max_bias = 3.40282e+38;
};
};
-#if 0
-
-class PinJoint2DSW : public Joint2DSW {
-
- union {
- struct {
- Body2DSW *A;
- Body2DSW *B;
- };
-
- Body2DSW *_arr[2];
- };
-
- Vector2 anchor_A;
- Vector2 anchor_B;
- real_t dist;
- real_t jn_acc;
- real_t jn_max;
- real_t max_distance;
- real_t mass_normal;
- real_t bias;
-
- Vector2 rA,rB;
- Vector2 n; //normal
- bool correct;
-
-
-public:
-
- virtual Physics2DServer::JointType get_type() const { return Physics2DServer::JOINT_PIN; }
-
- virtual bool setup(real_t p_step);
- virtual void solve(real_t p_step);
-
-
- PinJoint2DSW(const Vector2& p_pos,Body2DSW* p_body_a,Body2DSW* p_body_b=NULL);
- ~PinJoint2DSW();
-};
-
-#else
class PinJoint2DSW : public Joint2DSW {
@@ -129,7 +89,6 @@ public:
~PinJoint2DSW();
};
-#endif
class GrooveJoint2DSW : public Joint2DSW {
union {
diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp
index 3805075ac3..e9e7122af3 100644
--- a/servers/physics_2d/physics_2d_server_sw.cpp
+++ b/servers/physics_2d/physics_2d_server_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -130,9 +130,12 @@ void Physics2DServerSW::_shape_col_cbk(const Vector2 &p_point_A, const Vector2 &
if (cbk->valid_dir != Vector2()) {
if (p_point_A.distance_squared_to(p_point_B) > cbk->valid_depth * cbk->valid_depth) {
+ cbk->invalid_by_dir++;
return;
}
if (cbk->valid_dir.dot((p_point_A - p_point_B).normalized()) < 0.7071) {
+ cbk->invalid_by_dir++;
+ ;
/* print_line("A: "+p_point_A);
print_line("B: "+p_point_B);
print_line("discard too angled "+rtos(cbk->valid_dir.dot((p_point_A-p_point_B))));
diff --git a/servers/physics_2d/physics_2d_server_sw.h b/servers/physics_2d/physics_2d_server_sw.h
index e767aad1da..dd310d7a93 100644
--- a/servers/physics_2d/physics_2d_server_sw.h
+++ b/servers/physics_2d/physics_2d_server_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -74,6 +74,7 @@ public:
real_t valid_depth;
int max;
int amount;
+ int invalid_by_dir;
Vector2 *ptr;
};
diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.cpp b/servers/physics_2d/physics_2d_server_wrap_mt.cpp
index 8d19153268..a4e6abfd45 100644
--- a/servers/physics_2d/physics_2d_server_wrap_mt.cpp
+++ b/servers/physics_2d/physics_2d_server_wrap_mt.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.h b/servers/physics_2d/physics_2d_server_wrap_mt.h
index 8058709c06..189419e8e4 100644
--- a/servers/physics_2d/physics_2d_server_wrap_mt.h
+++ b/servers/physics_2d/physics_2d_server_wrap_mt.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp
index e153ee985c..20d0d38b17 100644
--- a/servers/physics_2d/shape_2d_sw.cpp
+++ b/servers/physics_2d/shape_2d_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "shape_2d_sw.h"
+
#include "geometry.h"
#include "sort.h"
diff --git a/servers/physics_2d/shape_2d_sw.h b/servers/physics_2d/shape_2d_sw.h
index a75a4338e7..0128f7ee70 100644
--- a/servers/physics_2d/shape_2d_sw.h
+++ b/servers/physics_2d/shape_2d_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index 718669988c..779f0d54ac 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,9 +28,10 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "space_2d_sw.h"
+
#include "collision_solver_2d_sw.h"
+#include "pair.h"
#include "physics_2d_server_sw.h"
-
_FORCE_INLINE_ static bool _match_object_type_query(CollisionObject2DSW *p_object, uint32_t p_collision_layer, uint32_t p_type_mask) {
if ((p_object->get_collision_layer() & p_collision_layer) == 0)
@@ -516,6 +517,10 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
body_aabb = p_from.xform(p_body->get_inv_transform().xform(body_aabb));
body_aabb = body_aabb.grow(p_margin);
+ static const int max_excluded_shape_pairs = 32;
+ Pair<Shape2DSW *, Shape2DSW *> excluded_shape_pairs[max_excluded_shape_pairs];
+ int excluded_shape_pair_count = 0;
+
Transform2D body_transform = p_from;
{
@@ -531,6 +536,8 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
cbk.max = max_results;
cbk.amount = 0;
cbk.ptr = sr;
+ cbk.invalid_by_dir = 0;
+ excluded_shape_pair_count = 0; //last step is the one valid
Physics2DServerSW::CollCbkData *cbkptr = &cbk;
CollisionSolver2DSW::CallbackResult cbkres = Physics2DServerSW::_shape_col_cbk;
@@ -554,14 +561,25 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
cbk.valid_dir = body_shape_xform.get_axis(1).normalized();
cbk.valid_depth = p_margin; //only valid depth is the collision margin
+ cbk.invalid_by_dir = 0;
+
} else {
cbk.valid_dir = Vector2();
cbk.valid_depth = 0;
+ cbk.invalid_by_dir = 0;
}
- if (CollisionSolver2DSW::solve(body_shape, body_shape_xform, Vector2(), col_obj->get_shape(shape_idx), col_obj->get_transform() * col_obj->get_shape_transform(shape_idx), Vector2(), cbkres, cbkptr, NULL, p_margin)) {
+ Shape2DSW *against_shape = col_obj->get_shape(shape_idx);
+ if (CollisionSolver2DSW::solve(body_shape, body_shape_xform, Vector2(), against_shape, col_obj->get_transform() * col_obj->get_shape_transform(shape_idx), Vector2(), cbkres, cbkptr, NULL, p_margin)) {
collided = cbk.amount > 0;
}
+
+ if (!collided && cbk.invalid_by_dir > 0) {
+ //this shape must be excluded
+ if (excluded_shape_pair_count < max_excluded_shape_pairs) {
+ excluded_shape_pairs[excluded_shape_pair_count++] = Pair<Shape2DSW *, Shape2DSW *>(body_shape, against_shape);
+ }
+ }
}
}
@@ -575,21 +593,6 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
Vector2 a = sr[i * 2 + 0];
Vector2 b = sr[i * 2 + 1];
-
-#if 0
- Vector2 rel = b-a;
- real_t d = rel.length();
- if (d==0)
- continue;
-
- Vector2 n = rel/d;
- real_t traveled = n.dot(recover_motion);
- a+=n*traveled;
-
- real_t d = a.distance_to(b);
- if (d<margin)
- continue;
-#endif
recover_motion += (b - a) * 0.4;
}
@@ -636,15 +639,31 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
const CollisionObject2DSW *col_obj = intersection_query_results[i];
int shape_idx = intersection_query_subindex_results[i];
+ Shape2DSW *against_shape = col_obj->get_shape(shape_idx);
+
+ bool excluded = false;
+
+ for (int k = 0; k < excluded_shape_pair_count; k++) {
+
+ if (excluded_shape_pairs[k].first == body_shape && excluded_shape_pairs[k].second == against_shape) {
+ excluded = true;
+ break;
+ }
+ }
+
+ if (excluded) {
+
+ continue;
+ }
Transform2D col_obj_xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx);
//test initial overlap, does it collide if going all the way?
- if (!CollisionSolver2DSW::solve(body_shape, body_shape_xform, p_motion, col_obj->get_shape(shape_idx), col_obj_xform, Vector2(), NULL, NULL, NULL, 0)) {
+ if (!CollisionSolver2DSW::solve(body_shape, body_shape_xform, p_motion, against_shape, col_obj_xform, Vector2(), NULL, NULL, NULL, 0)) {
continue;
}
//test initial overlap
- if (CollisionSolver2DSW::solve(body_shape, body_shape_xform, Vector2(), col_obj->get_shape(shape_idx), col_obj_xform, Vector2(), NULL, NULL, NULL, 0)) {
+ if (CollisionSolver2DSW::solve(body_shape, body_shape_xform, Vector2(), against_shape, col_obj_xform, Vector2(), NULL, NULL, NULL, 0)) {
if (col_obj->is_shape_set_as_one_way_collision(j)) {
continue;
@@ -664,7 +683,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
real_t ofs = (low + hi) * 0.5;
Vector2 sep = mnormal; //important optimization for this to work fast enough
- bool collided = CollisionSolver2DSW::solve(body_shape, body_shape_xform, p_motion * ofs, col_obj->get_shape(shape_idx), col_obj_xform, Vector2(), NULL, NULL, &sep, 0);
+ bool collided = CollisionSolver2DSW::solve(body_shape, body_shape_xform, p_motion * ofs, against_shape, col_obj_xform, Vector2(), NULL, NULL, &sep, 0);
if (collided) {
@@ -683,7 +702,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
cbk.amount = 0;
cbk.ptr = cd;
cbk.valid_dir = body_shape_xform.get_axis(1).normalized();
- ;
+
cbk.valid_depth = 10e20;
Vector2 sep = mnormal; //important optimization for this to work fast enough
@@ -752,6 +771,19 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
const CollisionObject2DSW *col_obj = intersection_query_results[i];
int shape_idx = intersection_query_subindex_results[i];
+ Shape2DSW *against_shape = col_obj->get_shape(shape_idx);
+
+ bool excluded = false;
+ for (int k = 0; k < excluded_shape_pair_count; k++) {
+
+ if (excluded_shape_pairs[k].first == body_shape && excluded_shape_pairs[k].second == against_shape) {
+ excluded = true;
+ break;
+ }
+ }
+ if (excluded)
+ continue;
+
if (col_obj->is_shape_set_as_one_way_collision(shape_idx)) {
rcd.valid_dir = body_shape_xform.get_axis(1).normalized();
@@ -763,7 +795,7 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
rcd.object = col_obj;
rcd.shape = shape_idx;
- bool sc = CollisionSolver2DSW::solve(body_shape, body_shape_xform, Vector2(), col_obj->get_shape(shape_idx), col_obj->get_transform() * col_obj->get_shape_transform(shape_idx), Vector2(), _rest_cbk_result, &rcd, NULL, p_margin);
+ bool sc = CollisionSolver2DSW::solve(body_shape, body_shape_xform, Vector2(), against_shape, col_obj->get_transform() * col_obj->get_shape_transform(shape_idx), Vector2(), _rest_cbk_result, &rcd, NULL, p_margin);
if (!sc)
continue;
}
diff --git a/servers/physics_2d/space_2d_sw.h b/servers/physics_2d/space_2d_sw.h
index 4bd81c054f..ed6136e372 100644
--- a/servers/physics_2d/space_2d_sw.h
+++ b/servers/physics_2d/space_2d_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/step_2d_sw.cpp b/servers/physics_2d/step_2d_sw.cpp
index f43fef4eef..8d6adf004d 100644
--- a/servers/physics_2d/step_2d_sw.cpp
+++ b/servers/physics_2d/step_2d_sw.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d/step_2d_sw.h b/servers/physics_2d/step_2d_sw.h
index bdcb34f3ae..41227d8e9a 100644
--- a/servers/physics_2d/step_2d_sw.h
+++ b/servers/physics_2d/step_2d_sw.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d_server.cpp b/servers/physics_2d_server.cpp
index 898c49a1eb..06966e2452 100644
--- a/servers/physics_2d_server.cpp
+++ b/servers/physics_2d_server.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_2d_server.h b/servers/physics_2d_server.h
index 905f96a5a9..cd6a20e6b8 100644
--- a/servers/physics_2d_server.h
+++ b/servers/physics_2d_server.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp
index c51a59973c..d4e37be882 100644
--- a/servers/physics_server.cpp
+++ b/servers/physics_server.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -75,7 +75,7 @@ void PhysicsDirectBodyState::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_total_angular_damp"), &PhysicsDirectBodyState::get_total_angular_damp);
ClassDB::bind_method(D_METHOD("get_center_of_mass"), &PhysicsDirectBodyState::get_center_of_mass);
- ClassDB::bind_method(D_METHOD("get_principal_inetria_axes"), &PhysicsDirectBodyState::get_principal_inertia_axes);
+ ClassDB::bind_method(D_METHOD("get_principal_inertia_axes"), &PhysicsDirectBodyState::get_principal_inertia_axes);
ClassDB::bind_method(D_METHOD("get_inverse_mass"), &PhysicsDirectBodyState::get_inverse_mass);
ClassDB::bind_method(D_METHOD("get_inverse_inertia"), &PhysicsDirectBodyState::get_inverse_inertia);
diff --git a/servers/physics_server.h b/servers/physics_server.h
index a8c2a7761d..c6d312e0fe 100644
--- a/servers/physics_server.h
+++ b/servers/physics_server.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -96,6 +96,7 @@ class PhysicsShapeQueryParameters : public Reference {
GDCLASS(PhysicsShapeQueryParameters, Reference);
friend class PhysicsDirectSpaceState;
+
RID shape;
Transform transform;
float margin;
@@ -133,8 +134,6 @@ class PhysicsDirectSpaceState : public Object {
GDCLASS(PhysicsDirectSpaceState, Object);
- //Variant _intersect_ray(const Vector3& p_from, const Vector3& p_to,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_collision_mask=0);
- //Variant _intersect_shape(const RID& p_shape, const Transform& p_xform,int p_result_max=64,const Vector<RID>& p_exclude=Vector<RID>(),uint32_t p_collision_mask=0);
public:
enum ObjectTypeMask {
TYPE_MASK_STATIC_BODY = 1 << 0,
@@ -625,37 +624,6 @@ public:
virtual void generic_6dof_joint_set_flag(RID p_joint, Vector3::Axis, G6DOFJointAxisFlag p_flag, bool p_enable) = 0;
virtual bool generic_6dof_joint_get_flag(RID p_joint, Vector3::Axis, G6DOFJointAxisFlag p_flag) = 0;
-#if 0
- enum JointType {
-
- JOINT_PIN,
- JOINT_GROOVE,
- JOINT_DAMPED_SPRING
- };
-
- enum JointParam {
- JOINT_PARAM_BIAS,
- JOINT_PARAM_MAX_BIAS,
- JOINT_PARAM_MAX_FORCE,
- };
-
- virtual void joint_set_param(RID p_joint, JointParam p_param, real_t p_value)=0;
- virtual real_t joint_get_param(RID p_joint,JointParam p_param) const=0;
-
- virtual RID pin_joint_create(const Vector3& p_anchor,RID p_body_a,RID p_body_b=RID())=0;
- virtual RID groove_joint_create(const Vector3& p_a_groove1,const Vector3& p_a_groove2, const Vector3& p_b_anchor, RID p_body_a,RID p_body_b)=0;
- virtual RID damped_spring_joint_create(const Vector3& p_anchor_a,const Vector3& p_anchor_b,RID p_body_a,RID p_body_b=RID())=0;
-
- enum DampedStringParam {
- DAMPED_STRING_REST_LENGTH,
- DAMPED_STRING_STIFFNESS,
- DAMPED_STRING_DAMPING
- };
- virtual void damped_string_joint_set_param(RID p_joint, DampedStringParam p_param, real_t p_value)=0;
- virtual real_t damped_string_joint_get_param(RID p_joint, DampedStringParam p_param) const=0;
-
- virtual JointType joint_get_type(RID p_joint) const=0;
-#endif
/* QUERY API */
enum AreaBodyStatus {
@@ -703,7 +671,6 @@ VARIANT_ENUM_CAST(PhysicsServer::SliderJointParam);
VARIANT_ENUM_CAST(PhysicsServer::ConeTwistJointParam);
VARIANT_ENUM_CAST(PhysicsServer::G6DOFJointAxisParam);
VARIANT_ENUM_CAST(PhysicsServer::G6DOFJointAxisFlag);
-//VARIANT_ENUM_CAST( PhysicsServer::ObjectType );
VARIANT_ENUM_CAST(PhysicsServer::AreaBodyStatus);
VARIANT_ENUM_CAST(PhysicsServer::ProcessInfo);
diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp
index 092f445c13..845a3443b7 100644
--- a/servers/register_server_types.cpp
+++ b/servers/register_server_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/register_server_types.h b/servers/register_server_types.h
index c183ccc8a4..2b3ac816ac 100644
--- a/servers/register_server_types.h
+++ b/servers/register_server_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/server_wrap_mt_common.h b/servers/server_wrap_mt_common.h
index 1ffa5ad14c..267e5c63b9 100644
--- a/servers/server_wrap_mt_common.h
+++ b/servers/server_wrap_mt_common.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/visual/rasterizer.cpp b/servers/visual/rasterizer.cpp
index f7ea158646..fd594fa3ee 100644
--- a/servers/visual/rasterizer.cpp
+++ b/servers/visual/rasterizer.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "rasterizer.h"
+
#include "os/os.h"
#include "print_string.h"
@@ -44,614 +45,3 @@ RasterizerStorage::RasterizerStorage() {
base_singleton = this;
}
-
-#if 0
-
-RID Rasterizer::create_default_material() {
-
- return material_create();
-}
-
-
-/* Fixed MAterial SHADER API */
-
-RID Rasterizer::_create_shader(const SpatialMaterialShaderKey& p_key) {
-
- ERR_FAIL_COND_V(!p_key.valid,RID());
- Map<SpatialMaterialShaderKey,SpatialMaterialShader>::Element *E=fixed_material_shaders.find(p_key);
-
- if (E) {
- E->get().refcount++;
- return E->get().shader;
- }
-
- uint64_t t = OS::get_singleton()->get_ticks_usec();
-
- SpatialMaterialShader fms;
- fms.refcount=1;
- fms.shader=shader_create();
-
- //create shader code
-
-
- int texcoords_used=0;
- String code;
-
- static const char* _uv_str[4]={"UV","uv_xform","UV2","uv_sphere"};
-#define _TEXUVSTR(m_idx) String(_uv_str[(p_key.texcoord_mask >> (m_idx * 2)) & 0x3])
-
-
- if (p_key.use_pointsize) {
-
- code+="UV=POINT_COORD;\n";
- }
-
-
- for(int i=0;i<VS::FIXED_MATERIAL_PARAM_MAX;i++) {
-
- if (p_key.texture_mask&(1<<i))
- texcoords_used|=(1<<((p_key.texcoord_mask>>(i*2))&0x3));
- }
-
- if (texcoords_used&(1<<VS::FIXED_MATERIAL_TEXCOORD_UV_TRANSFORM)) {
-
- code+="uniform mat4 fmp_uv_xform;\n";
- code+="vec2 uv_xform = (fmp_uv_xform * vec4(UV,0,1)).xy;\n";
- }
-
- /* HANDLE NORMAL MAPPING */
-
-
- if (p_key.texture_mask&(1<<VS::FIXED_MATERIAL_PARAM_NORMAL)) {
-
- String scode;
- scode+="uniform float fmp_normal;\n";
- scode+="uniform texture fmp_normal_tex;\n";
- String uv_str;
- if (((p_key.texcoord_mask>>(VS::FIXED_MATERIAL_PARAM_NORMAL*2))&0x3)==VS::FIXED_MATERIAL_TEXCOORD_SPHERE) {
- uv_str="uv"; //sorry not supported
- } else {
- uv_str=_TEXUVSTR(VS::FIXED_MATERIAL_PARAM_NORMAL);
- }
- if (p_key.use_xy_normalmap) {
- scode+="vec2 ywnormal=tex( fmp_normal_tex,"+uv_str+").wy * vec2(2.0,2.0) - vec2(1.0,1.0);\n";
- scode+="NORMALMAP=vec3(ywnormal,sqrt(1 - (ywnormal.x * ywnormal.x) - (ywnormal.y * ywnormal.y) ));\n";
- } else {
- scode+="NORMALMAP=tex( fmp_normal_tex,"+uv_str+").xyz * vec3(2.0,2.0,1.0) - vec3(1.0,1.0,0.0);\n";
- }
- scode+="NORMALMAP_DEPTH=fmp_normal;\n";
-
- code+=scode;
- }
-
- //handle sphere uv if used, do it here because it needs the normal, which may be transformed by a normal map
-
- if (texcoords_used&(1<<VS::FIXED_MATERIAL_TEXCOORD_SPHERE)) {
-
- String tcode;
- tcode="vec3 eye_normal = normalize(VERTEX);\n";
- tcode+="vec3 ref = (eye_normal - 2.0*dot(NORMAL, eye_normal)*NORMAL);\n";
- tcode+="ref.z+=1.0;\n";
- tcode+="vec2 uv_sphere = ref.xy*vec2(0.5,0.0-0.5)+vec2(0.5,0.0-0.5);\n";
- code+=tcode;
- }
-
- /* HANDLE DIFFUSE LIGHTING */
-
- code+="uniform color fmp_diffuse;\n";
- code+="color diffuse=fmp_diffuse;\n";
-
- if (p_key.use_color_array)
- code+="diffuse*=COLOR;\n";
-
- if (p_key.texture_mask&(1<<VS::FIXED_MATERIAL_PARAM_DIFFUSE)) {
-
-
- code+="uniform texture fmp_diffuse_tex;\n";
- code+="diffuse*=tex( fmp_diffuse_tex,"+_TEXUVSTR(VS::FIXED_MATERIAL_PARAM_DIFFUSE)+");\n";
- }
-
- if (p_key.texture_mask&(1<<VS::FIXED_MATERIAL_PARAM_DETAIL)) {
-
- String dcode;
- dcode+="uniform texture fmp_detail_tex;\n";
- dcode+="uniform float fmp_detail;\n";
- dcode+="color detail=tex( fmp_detail_tex,"+_TEXUVSTR(VS::FIXED_MATERIAL_PARAM_DETAIL)+");\n";
- //aways mix
- dcode+="diffuse=vec4(mix(diffuse.rgb,detail.rgb,detail.a*fmp_detail),diffuse.a);\n";
-
- code+=dcode;
- }
-
- if (p_key.use_alpha) {
- code+="DIFFUSE_ALPHA=diffuse;\n";
- if (p_key.discard_alpha) {
- code+="DISCARD=diffuse.a<0.5;\n";
- }
- } else {
- code+="DIFFUSE=diffuse.rgb;\n";
- }
-
- /* HANDLE SPECULAR LIGHTING */
-
- code+="uniform color fmp_specular;\n";
- code+="color specular=fmp_specular;\n";
-
- if (p_key.texture_mask&(1<<VS::FIXED_MATERIAL_PARAM_SPECULAR)) {
-
- String scode;
- scode+="uniform texture fmp_specular_tex;\n";
- scode+="specular*=tex( fmp_specular_tex,"+_TEXUVSTR(VS::FIXED_MATERIAL_PARAM_SPECULAR)+");\n";
- code+=scode;
- }
-
- code+="SPECULAR=specular.rgb;\n";
-
- code+="uniform float fmp_specular_exp;\n";
- code+="float specular_exp=fmp_specular_exp;\n";
-
- if (p_key.texture_mask&(1<<VS::FIXED_MATERIAL_PARAM_SPECULAR_EXP)) {
-
- String scode;
- scode+="uniform texture fmp_specular_exp_tex;\n";
- scode+="specular_exp*=tex( fmp_specular_exp_tex,"+_TEXUVSTR(VS::FIXED_MATERIAL_PARAM_SPECULAR_EXP)+").r;\n";
- code+=scode;
- }
-
- code+="SPEC_EXP=specular_exp;\n";
-
- /* HANDLE EMISSION LIGHTING */
-
- code+="uniform color fmp_emission;\n";
- code+="color emission=fmp_emission;\n";
-
- if (p_key.texture_mask&(1<<VS::FIXED_MATERIAL_PARAM_EMISSION)) {
-
- String scode;
- scode+="uniform texture fmp_emission_tex;\n";
- scode+="emission*=tex( fmp_emission_tex,"+_TEXUVSTR(VS::FIXED_MATERIAL_PARAM_EMISSION)+");\n";
- code+=scode;
- }
-
- code+="EMISSION=emission.rgb;\n";
-
-
- /* HANDLE GLOW */
-
- code+="uniform float fmp_glow;\n";
- code+="float glow=fmp_glow;\n";
-
- if (p_key.texture_mask&(1<<VS::FIXED_MATERIAL_PARAM_GLOW)) {
-
- String scode;
- scode+="uniform texture fmp_glow_tex;\n";
- scode+="glow*=tex( fmp_glow_tex,"+_TEXUVSTR(VS::FIXED_MATERIAL_PARAM_GLOW)+").r;\n";
- code+=scode;
- }
-
- code+="GLOW=glow;\n";
-
- if (p_key.texture_mask&(1<<VS::FIXED_MATERIAL_PARAM_SHADE_PARAM)) {
-
- String scode;
- scode+="uniform texture fmp_shade_param_tex;\n";
- scode+="SHADE_PARAM=tex( fmp_shade_param_tex,"+_TEXUVSTR(VS::FIXED_MATERIAL_PARAM_SHADE_PARAM)+").r;\n";
- code+=scode;
- } else {
-
- String scode;
- scode+="uniform float fmp_shade_param;\n";
- scode+="SHADE_PARAM=fmp_shade_param;\n";
- code+=scode;
-
- }
-
-
- //print_line("**FRAGMENT SHADER GENERATED code: \n"+code);
-
- String vcode;
- vcode="uniform float "+_fixed_material_param_names[VS::FIXED_MATERIAL_PARAM_SPECULAR_EXP]+";\n";
- vcode+="SPEC_EXP="+_fixed_material_param_names[VS::FIXED_MATERIAL_PARAM_SPECULAR_EXP]+";\n";
- if (p_key.use_pointsize) {
-
- vcode+="uniform float "+_fixed_material_point_size_name+";\n";
- vcode+="POINT_SIZE="+_fixed_material_point_size_name+";\n";
- //vcode+="POINT_SIZE=10.0;\n";
- }
-
- String lcode;
-
- switch(p_key.light_shader) {
-
- case VS::FIXED_MATERIAL_LIGHT_SHADER_LAMBERT: {
- //do nothing
-
- } break;
- case VS::FIXED_MATERIAL_LIGHT_SHADER_WRAP: {
-
- lcode+="float NdotL = max(0.0,((dot( NORMAL, LIGHT_DIR )+SHADE_PARAM)/(1.0+SHADE_PARAM)));";
- lcode+="vec3 half_vec = normalize(LIGHT_DIR + EYE_VEC);";
- lcode+="float eye_light = max(dot(NORMAL, half_vec),0.0);";
- lcode+="LIGHT = LIGHT_DIFFUSE * DIFFUSE * NdotL;";
- lcode+="if (NdotL > 0.0) {";
- lcode+="\tLIGHT+=LIGHT_SPECULAR * SPECULAR * pow( eye_light, SPECULAR_EXP );";
- lcode+="};";
-
- } break;
- case VS::FIXED_MATERIAL_LIGHT_SHADER_VELVET: {
- lcode+="float NdotL = max(0.0,dot( NORMAL, LIGHT_DIR ));";
- lcode+="vec3 half_vec = normalize(LIGHT_DIR + EYE_VEC);";
- lcode+="float eye_light = max(dot(NORMAL, half_vec),0.0);";
- lcode+="LIGHT = LIGHT_DIFFUSE * DIFFUSE * NdotL;";
- lcode+="float rim = (1.0-abs(dot(NORMAL,vec3(0,0,1))))*SHADE_PARAM;";
- lcode+="LIGHT += LIGHT_DIFFUSE * DIFFUSE * rim;";
- lcode+="if (NdotL > 0.0) {";
- lcode+="\tLIGHT+=LIGHT_SPECULAR * SPECULAR * pow( eye_light, SPECULAR_EXP );";
- lcode+="};";
-
-
- } break;
- case VS::FIXED_MATERIAL_LIGHT_SHADER_TOON: {
-
- lcode+="float NdotL = dot( NORMAL, LIGHT_DIR );";
- lcode+="vec3 light_ref = reflect( LIGHT_DIR, NORMAL );";
- lcode+="float eye_light = clamp( dot( light_ref, vec3(0,0,0)-EYE_VEC), 0.0, 1.0 );";
- lcode+="float NdotL_diffuse = smoothstep( max( SHADE_PARAM-0.05, 0.0-1.0), min( SHADE_PARAM+0.05, 1.0), NdotL );";
- lcode+="float spec_radius=clamp((1.0-(SPECULAR_EXP/64.0)),0.0,1.0);";
- lcode+="float NdotL_specular = smoothstep( max( spec_radius-0.05, 0.0), min( spec_radius+0.05, 1.0), eye_light )*max(NdotL,0);";
- lcode+="LIGHT = NdotL_diffuse * LIGHT_DIFFUSE*DIFFUSE + NdotL_specular * LIGHT_SPECULAR*SPECULAR;";
-
- } break;
-
- }
-
- //print_line("**VERTEX SHADER GENERATED code: \n"+vcode);
-
- shader_set_code(fms.shader,vcode,code,lcode,0,0);
-
- fixed_material_shaders[p_key]=fms;
- return fms.shader;
-}
-
-void Rasterizer::_free_shader(const SpatialMaterialShaderKey& p_key) {
-
- if (p_key.valid==0)
- return; //not a valid key
-
- Map<SpatialMaterialShaderKey,SpatialMaterialShader>::Element *E=fixed_material_shaders.find(p_key);
-
- ERR_FAIL_COND(!E);
- E->get().refcount--;
- if (E->get().refcount==0) {
- free(E->get().shader);
- fixed_material_shaders.erase(E);
- }
-
-}
-
-
-void Rasterizer::fixed_material_set_flag(RID p_material, VS::SpatialMaterialFlags p_flag, bool p_enabled) {
-
-
- Map<RID,SpatialMaterial*>::Element *E = fixed_materials.find(p_material);
- ERR_FAIL_COND(!E);
- SpatialMaterial &fm=*E->get();
-
- switch(p_flag) {
-
- case VS::FIXED_MATERIAL_FLAG_USE_ALPHA: fm.use_alpha=p_enabled; break;
- case VS::FIXED_MATERIAL_FLAG_USE_COLOR_ARRAY: fm.use_color_array=p_enabled; break;
- case VS::FIXED_MATERIAL_FLAG_USE_POINT_SIZE: fm.use_pointsize=p_enabled; break;
- case VS::FIXED_MATERIAL_FLAG_DISCARD_ALPHA: fm.discard_alpha=p_enabled; break;
- case VS::FIXED_MATERIAL_FLAG_USE_XY_NORMALMAP: fm.use_xy_normalmap=p_enabled; break;
- }
-
- if (!fm.dirty_list.in_list())
- fixed_material_dirty_list.add( &fm.dirty_list );
-
-}
-
-bool Rasterizer::fixed_material_get_flag(RID p_material, VS::SpatialMaterialFlags p_flag) const{
-
- const Map<RID,SpatialMaterial*>::Element *E = fixed_materials.find(p_material);
- ERR_FAIL_COND_V(!E,false);
- const SpatialMaterial &fm=*E->get();
- switch(p_flag) {
-
- case VS::FIXED_MATERIAL_FLAG_USE_ALPHA: return fm.use_alpha;; break;
- case VS::FIXED_MATERIAL_FLAG_USE_COLOR_ARRAY: return fm.use_color_array;; break;
- case VS::FIXED_MATERIAL_FLAG_USE_POINT_SIZE: return fm.use_pointsize;; break;
- case VS::FIXED_MATERIAL_FLAG_DISCARD_ALPHA: return fm.discard_alpha;; break;
- case VS::FIXED_MATERIAL_FLAG_USE_XY_NORMALMAP: return fm.use_xy_normalmap;; break;
-
- }
-
-
- return false;
-}
-
-
-RID Rasterizer::fixed_material_create() {
-
- RID mat = material_create();
- fixed_materials[mat]=memnew( SpatialMaterial() );
- SpatialMaterial &fm=*fixed_materials[mat];
- fm.self=mat;
- fm.get_key();
- material_set_flag(mat,VS::MATERIAL_FLAG_COLOR_ARRAY_SRGB,true);
- for(int i=0;i<VS::FIXED_MATERIAL_PARAM_MAX;i++) {
-
- material_set_param(mat,_fixed_material_param_names[i],fm.param[i]); //must be there
- }
- fixed_material_dirty_list.add(&fm.dirty_list);
- //print_line("FMC: "+itos(mat.get_id()));
- return mat;
-}
-
-
-
-
-void Rasterizer::fixed_material_set_parameter(RID p_material, VS::SpatialMaterialParam p_parameter, const Variant& p_value){
-
- Map<RID,SpatialMaterial*>::Element *E = fixed_materials.find(p_material);
- ERR_FAIL_COND(!E);
- SpatialMaterial &fm=*E->get();
- RID material=E->key();
- ERR_FAIL_INDEX(p_parameter,VS::FIXED_MATERIAL_PARAM_MAX);
-
- if ((p_parameter==VS::FIXED_MATERIAL_PARAM_DIFFUSE || p_parameter==VS::FIXED_MATERIAL_PARAM_SPECULAR || p_parameter==VS::FIXED_MATERIAL_PARAM_EMISSION)) {
-
- if (p_value.get_type()!=Variant::COLOR) {
- ERR_EXPLAIN(String(_fixed_material_param_names[p_parameter])+" expects Color");
- ERR_FAIL();
- }
- } else {
-
- if (!p_value.is_num()) {
- ERR_EXPLAIN(String(_fixed_material_param_names[p_parameter])+" expects scalar");
- ERR_FAIL();
- }
- }
-
- fm.param[p_parameter]=p_value;
- VS::get_singleton()->material_set_param(material,_fixed_material_param_names[p_parameter],p_value);
-
-
-}
-Variant Rasterizer::fixed_material_get_parameter(RID p_material,VS::SpatialMaterialParam p_parameter) const{
-
- const Map<RID,SpatialMaterial*>::Element *E = fixed_materials.find(p_material);
- ERR_FAIL_COND_V(!E,Variant());
- const SpatialMaterial &fm=*E->get();
- ERR_FAIL_INDEX_V(p_parameter,VS::FIXED_MATERIAL_PARAM_MAX,Variant());
- return fm.param[p_parameter];
-}
-
-void Rasterizer::fixed_material_set_texture(RID p_material,VS::SpatialMaterialParam p_parameter, RID p_texture){
-
- Map<RID,SpatialMaterial*>::Element *E = fixed_materials.find(p_material);
- if (!E) {
-
- print_line("Not found: "+itos(p_material.get_id()));
- }
- ERR_FAIL_COND(!E);
- SpatialMaterial &fm=*E->get();
-
-
- ERR_FAIL_INDEX(p_parameter,VS::FIXED_MATERIAL_PARAM_MAX);
- RID material=E->key();
- fm.texture[p_parameter]=p_texture;
- VS::get_singleton()->material_set_param(material,_fixed_material_tex_names[p_parameter],p_texture);
-
- if (!fm.dirty_list.in_list())
- fixed_material_dirty_list.add( &fm.dirty_list );
-
-
-
-
-}
-RID Rasterizer::fixed_material_get_texture(RID p_material,VS::SpatialMaterialParam p_parameter) const{
-
- const Map<RID,SpatialMaterial*>::Element *E = fixed_materials.find(p_material);
- ERR_FAIL_COND_V(!E,RID());
- const SpatialMaterial &fm=*E->get();
- ERR_FAIL_INDEX_V(p_parameter,VS::FIXED_MATERIAL_PARAM_MAX,RID());
-
- return fm.texture[p_parameter];
-}
-
-
-void Rasterizer::fixed_material_set_texcoord_mode(RID p_material,VS::SpatialMaterialParam p_parameter, VS::SpatialMaterialTexCoordMode p_mode) {
-
- Map<RID,SpatialMaterial*>::Element *E = fixed_materials.find(p_material);
- ERR_FAIL_COND(!E);
- SpatialMaterial &fm=*E->get();
- ERR_FAIL_INDEX(p_parameter,VS::FIXED_MATERIAL_PARAM_MAX);
-
- fm.get_key();
-
- fm.texture_tc[p_parameter]=p_mode;
-
- if (!fm.dirty_list.in_list())
- fixed_material_dirty_list.add( &fm.dirty_list );
-
-}
-
-VS::SpatialMaterialTexCoordMode Rasterizer::fixed_material_get_texcoord_mode(RID p_material,VS::SpatialMaterialParam p_parameter) const {
-
- const Map<RID,SpatialMaterial*>::Element *E = fixed_materials.find(p_material);
- ERR_FAIL_COND_V(!E,VS::FIXED_MATERIAL_TEXCOORD_UV);
- const SpatialMaterial &fm=*E->get();
- ERR_FAIL_INDEX_V(p_parameter,VS::FIXED_MATERIAL_PARAM_MAX,VS::FIXED_MATERIAL_TEXCOORD_UV);
-
- return fm.texture_tc[p_parameter];
-}
-
-void Rasterizer::fixed_material_set_uv_transform(RID p_material,const Transform& p_transform) {
-
- Map<RID,SpatialMaterial*>::Element *E = fixed_materials.find(p_material);
- ERR_FAIL_COND(!E);
- SpatialMaterial &fm=*E->get();
- RID material=E->key();
-
- VS::get_singleton()->material_set_param(material,_fixed_material_uv_xform_name,p_transform);
-
- fm.uv_xform=p_transform;
-
-}
-
-
-
-Transform Rasterizer::fixed_material_get_uv_transform(RID p_material) const {
-
- const Map<RID,SpatialMaterial*>::Element *E = fixed_materials.find(p_material);
- ERR_FAIL_COND_V(!E,Transform());
- const SpatialMaterial &fm=*E->get();
-
- return fm.uv_xform;
-}
-
-void Rasterizer::fixed_material_set_light_shader(RID p_material,VS::SpatialMaterialLightShader p_shader) {
-
- Map<RID,SpatialMaterial*>::Element *E = fixed_materials.find(p_material);
- ERR_FAIL_COND(!E);
- SpatialMaterial &fm=*E->get();
-
- fm.light_shader=p_shader;
-
- if (!fm.dirty_list.in_list())
- fixed_material_dirty_list.add( &fm.dirty_list );
-
-}
-
-VS::SpatialMaterialLightShader Rasterizer::fixed_material_get_light_shader(RID p_material) const {
-
- const Map<RID,SpatialMaterial*>::Element *E = fixed_materials.find(p_material);
- ERR_FAIL_COND_V(!E,VS::FIXED_MATERIAL_LIGHT_SHADER_LAMBERT);
- const SpatialMaterial &fm=*E->get();
-
- return fm.light_shader;
-}
-
-void Rasterizer::fixed_material_set_point_size(RID p_material,float p_size) {
-
- Map<RID,SpatialMaterial*>::Element *E = fixed_materials.find(p_material);
- ERR_FAIL_COND(!E);
- SpatialMaterial &fm=*E->get();
- RID material=E->key();
-
- VS::get_singleton()->material_set_param(material,_fixed_material_point_size_name,p_size);
-
- fm.point_size=p_size;
-
-
-}
-
-float Rasterizer::fixed_material_get_point_size(RID p_material) const{
-
- const Map<RID,SpatialMaterial*>::Element *E = fixed_materials.find(p_material);
- ERR_FAIL_COND_V(!E,1.0);
- const SpatialMaterial &fm=*E->get();
-
- return fm.point_size;
-
-}
-
-void Rasterizer::_update_fixed_materials() {
-
-
- while(fixed_material_dirty_list.first()) {
-
- SpatialMaterial &fm=*fixed_material_dirty_list.first()->self();
-
- SpatialMaterialShaderKey new_key = fm.get_key();
- if (new_key.key!=fm.current_key.key) {
-
- _free_shader(fm.current_key);
- RID new_rid = _create_shader(new_key);
- fm.current_key=new_key;
- material_set_shader(fm.self,new_rid);
-
- if (fm.texture[VS::FIXED_MATERIAL_PARAM_DETAIL].is_valid()) {
- //send these again just in case.
- material_set_param(fm.self,_fixed_material_param_names[VS::FIXED_MATERIAL_PARAM_DETAIL],fm.param[VS::FIXED_MATERIAL_PARAM_DETAIL]);
- }
- if (fm.texture[VS::FIXED_MATERIAL_PARAM_NORMAL].is_valid()) {
- //send these again just in case.
- material_set_param(fm.self,_fixed_material_param_names[VS::FIXED_MATERIAL_PARAM_NORMAL],fm.param[VS::FIXED_MATERIAL_PARAM_NORMAL]);
- }
-
- material_set_param(fm.self,_fixed_material_uv_xform_name,fm.uv_xform);
- if (fm.use_pointsize) {
- material_set_param(fm.self,_fixed_material_point_size_name,fm.point_size);
- }
- }
-
- fixed_material_dirty_list.remove(fixed_material_dirty_list.first());
- }
-}
-
-
-void Rasterizer::_free_fixed_material(const RID& p_material) {
-
- Map<RID,SpatialMaterial*>::Element *E = fixed_materials.find(p_material);
-
- if (E) {
-
- _free_shader(E->get()->current_key); //free shader
- if (E->get()->dirty_list.in_list())
- fixed_material_dirty_list.remove( &E->get()->dirty_list);
- memdelete(E->get());
- fixed_materials.erase(E); //free material
- }
-
-
-}
-
-
-void Rasterizer::flush_frame() {
-
- //not really necessary to implement
-}
-
-Rasterizer::Rasterizer() {
-
- static const char* fm_names[VS::FIXED_MATERIAL_PARAM_MAX]={
- "diffuse",
- "detail",
- "specular",
- "emission",
- "specular_exp",
- "glow",
- "normal",
- "shade_param"};
-
- for(int i=0;i<VS::FIXED_MATERIAL_PARAM_MAX;i++) {
-
- _fixed_material_param_names[i]=String("fmp_")+fm_names[i];
- _fixed_material_tex_names[i]=String("fmp_")+fm_names[i]+"_tex";
- }
-
- _fixed_material_uv_xform_name="fmp_uv_xform";
- _fixed_material_point_size_name="fmp_point_size";
-
- draw_viewport_func=NULL;
-
- ERR_FAIL_COND( sizeof(SpatialMaterialShaderKey)!=4);
-
-}
-
-RID Rasterizer::create_overdraw_debug_material() {
- RID mat = fixed_material_create();
- fixed_material_set_parameter( mat,VisualServer::FIXED_MATERIAL_PARAM_SPECULAR,Color(0,0,0) );
- fixed_material_set_parameter( mat,VisualServer::FIXED_MATERIAL_PARAM_DIFFUSE,Color(0.1,0.1,0.2) );
- fixed_material_set_parameter( mat,VisualServer::FIXED_MATERIAL_PARAM_EMISSION,Color(0,0,0) );
- fixed_material_set_flag( mat, VS::FIXED_MATERIAL_FLAG_USE_ALPHA, true);
- material_set_flag( mat, VisualServer::MATERIAL_FLAG_UNSHADED, true );
- material_set_blend_mode( mat,VisualServer::MATERIAL_BLEND_MODE_ADD );
-
-
- return mat;
-}
-
-#endif
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 3b4ba313e6..187a0b180b 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -101,10 +101,7 @@ public:
Vector<float> blend_values;
- //BakedLightData *baked_light;
VS::ShadowCastingSetting cast_shadows;
- //Transform *baked_light_octree_xform;
- //int baked_lightmap_id;
bool mirror : 8;
bool receive_shadows : 8;
@@ -114,8 +111,6 @@ public:
float depth; //used for sorting
SelfList<InstanceBase> dependency_item;
- //InstanceBase *baked_light; //baked light to use
- //SelfList<InstanceBase> baked_light_item;
virtual void base_removed() = 0;
virtual void base_changed() = 0;
@@ -218,6 +213,7 @@ public:
virtual RID material_create() = 0;
+ virtual void material_set_render_priority(RID p_material, int priority) = 0;
virtual void material_set_shader(RID p_shader_material, RID p_shader) = 0;
virtual RID material_get_shader(RID p_shader_material) const = 0;
@@ -376,23 +372,6 @@ public:
virtual float reflection_probe_get_origin_max_distance(RID p_probe) const = 0;
virtual bool reflection_probe_renders_shadows(RID p_probe) const = 0;
- /* ROOM API */
-
- virtual RID room_create() = 0;
- virtual void room_add_bounds(RID p_room, const PoolVector<Vector2> &p_convex_polygon, float p_height, const Transform &p_transform) = 0;
- virtual void room_clear_bounds(RID p_room) = 0;
-
- /* PORTAL API */
-
- // portals are only (x/y) points, forming a convex shape, which its clockwise
- // order points outside. (z is 0)=0;
-
- virtual RID portal_create() = 0;
- virtual void portal_set_shape(RID p_portal, const Vector<Point2> &p_shape) = 0;
- virtual void portal_set_enabled(RID p_portal, bool p_enabled) = 0;
- virtual void portal_set_disable_distance(RID p_portal, float p_distance) = 0;
- virtual void portal_set_disabled_color(RID p_portal, const Color &p_color) = 0;
-
virtual void instance_add_skeleton(RID p_skeleton, RasterizerScene::InstanceBase *p_instance) = 0;
virtual void instance_remove_skeleton(RID p_skeleton, RasterizerScene::InstanceBase *p_instance) = 0;
@@ -1046,1026 +1025,4 @@ public:
virtual ~Rasterizer() {}
};
-#if 0
-/**
- @author Juan Linietsky <reduzio@gmail.com>
-*/
-#include "camera_matrix.h"
-#include "map.h"
-#include "self_list.h"
-#include "servers/visual_server.h"
-
-class Rasterizer {
-protected:
-
-
- typedef void (*ItemDrawViewportFunc)(VisualServer*owner,void*ud,const Rect2& p_rect);
-
- RID create_default_material();
- RID create_overdraw_debug_material();
-
-
- /* Fixed Material Shader API */
-
- union SpatialMaterialShaderKey {
-
- struct {
- uint16_t texcoord_mask;
- uint8_t texture_mask;
- uint8_t light_shader:2;
- bool use_alpha:1;
- bool use_color_array:1;
- bool use_pointsize:1;
- bool discard_alpha:1;
- bool use_xy_normalmap:1;
- bool valid:1;
- };
-
- uint32_t key;
-
- _FORCE_INLINE_ bool operator<(const SpatialMaterialShaderKey& p_key) const { return key<p_key.key; }
- };
-
- struct SpatialMaterialShader {
-
- int refcount;
- RID shader;
- };
-
- Map<SpatialMaterialShaderKey,SpatialMaterialShader> fixed_material_shaders;
-
- RID _create_shader(const SpatialMaterialShaderKey& p_key);
- void _free_shader(const SpatialMaterialShaderKey& p_key);
-
- struct SpatialMaterial {
-
-
- RID self;
- bool use_alpha;
- bool use_color_array;
- bool discard_alpha;
- bool use_pointsize;
- bool use_xy_normalmap;
- float point_size;
- Transform uv_xform;
- VS::SpatialMaterialLightShader light_shader;
- RID texture[VS::FIXED_MATERIAL_PARAM_MAX];
- Variant param[VS::FIXED_MATERIAL_PARAM_MAX];
- VS::SpatialMaterialTexCoordMode texture_tc[VS::FIXED_MATERIAL_PARAM_MAX];
-
- SelfList<SpatialMaterial> dirty_list;
-
- SpatialMaterialShaderKey current_key;
-
- _FORCE_INLINE_ SpatialMaterialShaderKey get_key() const {
-
-
- SpatialMaterialShaderKey k;
- k.key=0;
- k.use_alpha=use_alpha;
- k.use_color_array=use_color_array;
- k.use_pointsize=use_pointsize;
- k.use_xy_normalmap=use_xy_normalmap;
- k.discard_alpha=discard_alpha;
- k.light_shader=light_shader;
- k.valid=true;
- for(int i=0;i<VS::FIXED_MATERIAL_PARAM_MAX;i++) {
- if (texture[i].is_valid()) {
- //print_line("valid: "+itos(i));
- k.texture_mask|=(1<<i);
- k.texcoord_mask|=(texture_tc[i])<<(i*2);
- }
- }
-
- return k;
- }
-
-
- SpatialMaterial() : dirty_list(this) {
-
- use_alpha=false;
- use_color_array=false;
- use_pointsize=false;
- discard_alpha=false;
- use_xy_normalmap=false;
- point_size=1.0;
- light_shader=VS::FIXED_MATERIAL_LIGHT_SHADER_LAMBERT;
- for(int i=0;i<VS::FIXED_MATERIAL_PARAM_MAX;i++) {
- texture_tc[i]=VS::FIXED_MATERIAL_TEXCOORD_UV;
- }
- param[VS::FIXED_MATERIAL_PARAM_DIFFUSE]=Color(1,1,1);
- param[VS::FIXED_MATERIAL_PARAM_DETAIL]=1.0;
- param[VS::FIXED_MATERIAL_PARAM_EMISSION]=Color(0,0,0);
- param[VS::FIXED_MATERIAL_PARAM_GLOW]=0;
- param[VS::FIXED_MATERIAL_PARAM_SHADE_PARAM]=0;
- param[VS::FIXED_MATERIAL_PARAM_SPECULAR]=Color(0.0,0.0,0.0);
- param[VS::FIXED_MATERIAL_PARAM_SPECULAR_EXP]=40;
- param[VS::FIXED_MATERIAL_PARAM_NORMAL]=1;
-
- current_key.key=0;
-
-
- }
- };
-
- StringName _fixed_material_param_names[VS::FIXED_MATERIAL_PARAM_MAX];
- StringName _fixed_material_tex_names[VS::FIXED_MATERIAL_PARAM_MAX];
- StringName _fixed_material_uv_xform_name;
- StringName _fixed_material_point_size_name;
-
- Map<RID,SpatialMaterial*> fixed_materials;
-
- SelfList<SpatialMaterial>::List fixed_material_dirty_list;
-
-protected:
- void _update_fixed_materials();
- void _free_fixed_material(const RID& p_material);
-
-public:
-
- enum ShadowFilterTechnique {
- SHADOW_FILTER_NONE,
- SHADOW_FILTER_PCF5,
- SHADOW_FILTER_PCF13,
- SHADOW_FILTER_ESM,
- SHADOW_FILTER_VSM,
- };
-
-
-
- /* TEXTURE API */
-
- virtual RID texture_create()=0;
- RID texture_create_from_image(const Image& p_image,uint32_t p_flags=VS::TEXTURE_FLAGS_DEFAULT); // helper
- virtual void texture_allocate(RID p_texture,int p_width, int p_height,Image::Format p_format,uint32_t p_flags=VS::TEXTURE_FLAGS_DEFAULT)=0;
- virtual void texture_set_data(RID p_texture,const Image& p_image,VS::CubeMapSide p_cube_side=VS::CUBEMAP_LEFT)=0;
- virtual Image texture_get_data(RID p_texture,VS::CubeMapSide p_cube_side=VS::CUBEMAP_LEFT) const=0;
- virtual void texture_set_flags(RID p_texture,uint32_t p_flags)=0;
- virtual uint32_t texture_get_flags(RID p_texture) const=0;
- virtual Image::Format texture_get_format(RID p_texture) const=0;
- virtual uint32_t texture_get_width(RID p_texture) const=0;
- virtual uint32_t texture_get_height(RID p_texture) const=0;
- virtual bool texture_has_alpha(RID p_texture) const=0;
- virtual void texture_set_size_override(RID p_texture,int p_width, int p_height)=0;
-
- virtual void texture_set_reload_hook(RID p_texture,ObjectID p_owner,const StringName& p_function) const=0;
-
- virtual void texture_set_path(RID p_texture,const String& p_path)=0;
- virtual String texture_get_path(RID p_texture) const=0;
- virtual void texture_debug_usage(List<VS::TextureInfo> *r_info)=0;
-
- virtual void texture_set_shrink_all_x2_on_set_data(bool p_enable)=0;
-
- /* SHADER API */
-
- virtual RID shader_create(VS::ShaderMode p_mode=VS::SHADER_MATERIAL)=0;
-
- virtual void shader_set_mode(RID p_shader,VS::ShaderMode p_mode)=0;
- virtual VS::ShaderMode shader_get_mode(RID p_shader) const=0;
-
- virtual void shader_set_code(RID p_shader, const String& p_vertex, const String& p_fragment,const String& p_light,int p_vertex_ofs=0,int p_fragment_ofs=0,int p_light_ofs=0)=0;
- virtual String shader_get_fragment_code(RID p_shader) const=0;
- virtual String shader_get_vertex_code(RID p_shader) const=0;
- virtual String shader_get_light_code(RID p_shader) const=0;
-
- virtual void shader_get_param_list(RID p_shader, List<PropertyInfo> *p_param_list) const=0;
-
- virtual void shader_set_default_texture_param(RID p_shader, const StringName& p_name, RID p_texture)=0;
- virtual RID shader_get_default_texture_param(RID p_shader, const StringName& p_name) const=0;
-
- virtual Variant shader_get_default_param(RID p_shader, const StringName& p_name)=0;
-
- /* COMMON MATERIAL API */
-
- virtual RID material_create()=0;
-
- virtual void material_set_shader(RID p_shader_material, RID p_shader)=0;
- virtual RID material_get_shader(RID p_shader_material) const=0;
-
- virtual void material_set_param(RID p_material, const StringName& p_param, const Variant& p_value)=0;
- virtual Variant material_get_param(RID p_material, const StringName& p_param) const=0;
-
- virtual void material_set_flag(RID p_material, VS::MaterialFlag p_flag,bool p_enabled)=0;
- virtual bool material_get_flag(RID p_material,VS::MaterialFlag p_flag) const=0;
-
- virtual void material_set_depth_draw_mode(RID p_material, VS::MaterialDepthDrawMode p_mode)=0;
- virtual VS::MaterialDepthDrawMode material_get_depth_draw_mode(RID p_material) const=0;
-
- virtual void material_set_blend_mode(RID p_material,VS::MaterialBlendMode p_mode)=0;
- virtual VS::MaterialBlendMode material_get_blend_mode(RID p_material) const=0;
-
- virtual void material_set_line_width(RID p_material,float p_line_width)=0;
- virtual float material_get_line_width(RID p_material) const=0;
-
-
- /* FIXED MATERIAL */
-
- virtual RID fixed_material_create();
-
- virtual void fixed_material_set_flag(RID p_material, VS::SpatialMaterialFlags p_flag, bool p_enabled);
- virtual bool fixed_material_get_flag(RID p_material, VS::SpatialMaterialFlags p_flag) const;
-
- virtual void fixed_material_set_parameter(RID p_material, VS::SpatialMaterialParam p_parameter, const Variant& p_value);
- virtual Variant fixed_material_get_parameter(RID p_material,VS::SpatialMaterialParam p_parameter) const;
-
- virtual void fixed_material_set_texture(RID p_material,VS::SpatialMaterialParam p_parameter, RID p_texture);
- virtual RID fixed_material_get_texture(RID p_material,VS::SpatialMaterialParam p_parameter) const;
-
- virtual void fixed_material_set_texcoord_mode(RID p_material,VS::SpatialMaterialParam p_parameter, VS::SpatialMaterialTexCoordMode p_mode);
- virtual VS::SpatialMaterialTexCoordMode fixed_material_get_texcoord_mode(RID p_material,VS::SpatialMaterialParam p_parameter) const;
-
- virtual void fixed_material_set_uv_transform(RID p_material,const Transform& p_transform);
- virtual Transform fixed_material_get_uv_transform(RID p_material) const;
-
- virtual void fixed_material_set_light_shader(RID p_material,VS::SpatialMaterialLightShader p_shader);
- virtual VS::SpatialMaterialLightShader fixed_material_get_light_shader(RID p_material) const;
-
- virtual void fixed_material_set_point_size(RID p_material,float p_size);
- virtual float fixed_material_get_point_size(RID p_material) const;
-
- /* MESH API */
-
- virtual RID mesh_create()=0;
-
-
- virtual void mesh_add_surface(RID p_mesh,VS::PrimitiveType p_primitive,const Array& p_arrays,const Array& p_blend_shapes=Array(),bool p_alpha_sort=false)=0;
- virtual Array mesh_get_surface_arrays(RID p_mesh,int p_surface) const=0;
- virtual Array mesh_get_surface_morph_arrays(RID p_mesh,int p_surface) const=0;
-
- virtual void mesh_add_custom_surface(RID p_mesh,const Variant& p_dat)=0;
-
- virtual void mesh_set_morph_target_count(RID p_mesh,int p_amount)=0;
- virtual int mesh_get_morph_target_count(RID p_mesh) const=0;
-
- virtual void mesh_set_morph_target_mode(RID p_mesh,VS::MorphTargetMode p_mode)=0;
- virtual VS::MorphTargetMode mesh_get_morph_target_mode(RID p_mesh) const=0;
-
- virtual void mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material,bool p_owned=false)=0;
- virtual RID mesh_surface_get_material(RID p_mesh, int p_surface) const=0;
-
- virtual int mesh_surface_get_array_len(RID p_mesh, int p_surface) const=0;
- virtual int mesh_surface_get_array_index_len(RID p_mesh, int p_surface) const=0;
- virtual uint32_t mesh_surface_get_format(RID p_mesh, int p_surface) const=0;
- virtual VS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const=0;
-
- virtual void mesh_remove_surface(RID p_mesh,int p_index)=0;
- virtual int mesh_get_surface_count(RID p_mesh) const=0;
-
- virtual AABB mesh_get_aabb(RID p_mesh,RID p_skeleton=RID()) const=0;
-
- virtual void mesh_set_custom_aabb(RID p_mesh,const AABB& p_aabb)=0;
- virtual AABB mesh_get_custom_aabb(RID p_mesh) const=0;
-
- /* MULTIMESH API */
-
- virtual RID multimesh_create()=0;
-
- virtual void multimesh_set_instance_count(RID p_multimesh,int p_count)=0;
- virtual int multimesh_get_instance_count(RID p_multimesh) const=0;
-
- virtual void multimesh_set_mesh(RID p_multimesh,RID p_mesh)=0;
- virtual void multimesh_set_aabb(RID p_multimesh,const AABB& p_aabb)=0;
- virtual void multimesh_instance_set_transform(RID p_multimesh,int p_index,const Transform& p_transform)=0;
- virtual void multimesh_instance_set_color(RID p_multimesh,int p_index,const Color& p_color)=0;
-
- virtual RID multimesh_get_mesh(RID p_multimesh) const=0;
- virtual AABB multimesh_get_aabb(RID p_multimesh) const=0;
-
- virtual Transform multimesh_instance_get_transform(RID p_multimesh,int p_index) const=0;
- virtual Color multimesh_instance_get_color(RID p_multimesh,int p_index) const=0;
-
- virtual void multimesh_set_visible_instances(RID p_multimesh,int p_visible)=0;
- virtual int multimesh_get_visible_instances(RID p_multimesh) const=0;
-
- /* BAKED LIGHT */
-
-
-
-
- /* IMMEDIATE API */
-
- virtual RID immediate_create()=0;
- virtual void immediate_begin(RID p_immediate,VS::PrimitiveType p_rimitive,RID p_texture=RID())=0;
- virtual void immediate_vertex(RID p_immediate,const Vector3& p_vertex)=0;
- virtual void immediate_normal(RID p_immediate,const Vector3& p_normal)=0;
- virtual void immediate_tangent(RID p_immediate,const Plane& p_tangent)=0;
- virtual void immediate_color(RID p_immediate,const Color& p_color)=0;
- virtual void immediate_uv(RID p_immediate,const Vector2& tex_uv)=0;
- virtual void immediate_uv2(RID p_immediate,const Vector2& tex_uv)=0;
- virtual void immediate_end(RID p_immediate)=0;
- virtual void immediate_clear(RID p_immediate)=0;
- virtual AABB immediate_get_aabb(RID p_immediate) const=0;
- virtual void immediate_set_material(RID p_immediate,RID p_material)=0;
- virtual RID immediate_get_material(RID p_immediate) const=0;
-
-
- /* PARTICLES API */
-
- virtual RID particles_create()=0;
-
- virtual void particles_set_amount(RID p_particles, int p_amount)=0;
- virtual int particles_get_amount(RID p_particles) const=0;
-
- virtual void particles_set_emitting(RID p_particles, bool p_emitting)=0;
- virtual bool particles_is_emitting(RID p_particles) const=0;
-
- virtual void particles_set_visibility_aabb(RID p_particles, const AABB& p_visibility)=0;
- virtual AABB particles_get_visibility_aabb(RID p_particles) const=0;
-
- virtual void particles_set_emission_half_extents(RID p_particles, const Vector3& p_half_extents)=0;
- virtual Vector3 particles_get_emission_half_extents(RID p_particles) const=0;
-
- virtual void particles_set_emission_base_velocity(RID p_particles, const Vector3& p_base_velocity)=0;
- virtual Vector3 particles_get_emission_base_velocity(RID p_particles) const=0;
-
- virtual void particles_set_emission_points(RID p_particles, const PoolVector<Vector3>& p_points)=0;
- virtual PoolVector<Vector3> particles_get_emission_points(RID p_particles) const=0;
-
- virtual void particles_set_gravity_normal(RID p_particles, const Vector3& p_normal)=0;
- virtual Vector3 particles_get_gravity_normal(RID p_particles) const=0;
-
- virtual void particles_set_variable(RID p_particles, VS::ParticleVariable p_variable,float p_value)=0;
- virtual float particles_get_variable(RID p_particles, VS::ParticleVariable p_variable) const=0;
-
- virtual void particles_set_randomness(RID p_particles, VS::ParticleVariable p_variable,float p_randomness)=0;
- virtual float particles_get_randomness(RID p_particles, VS::ParticleVariable p_variable) const=0;
-
- virtual void particles_set_color_phase_pos(RID p_particles, int p_phase, float p_pos)=0;
- virtual float particles_get_color_phase_pos(RID p_particles, int p_phase) const=0;
-
- virtual void particles_set_color_phases(RID p_particles, int p_phases)=0;
- virtual int particles_get_color_phases(RID p_particles) const=0;
-
- virtual void particles_set_color_phase_color(RID p_particles, int p_phase, const Color& p_color)=0;
- virtual Color particles_get_color_phase_color(RID p_particles, int p_phase) const=0;
-
- virtual void particles_set_attractors(RID p_particles, int p_attractors)=0;
- virtual int particles_get_attractors(RID p_particles) const=0;
-
- virtual void particles_set_attractor_pos(RID p_particles, int p_attractor, const Vector3& p_pos)=0;
- virtual Vector3 particles_get_attractor_pos(RID p_particles,int p_attractor) const=0;
-
- virtual void particles_set_attractor_strength(RID p_particles, int p_attractor, float p_force)=0;
- virtual float particles_get_attractor_strength(RID p_particles,int p_attractor) const=0;
-
- virtual void particles_set_material(RID p_particles, RID p_material,bool p_owned=false)=0;
- virtual RID particles_get_material(RID p_particles) const=0;
-
- virtual AABB particles_get_aabb(RID p_particles) const=0;
-
- virtual void particles_set_height_from_velocity(RID p_particles, bool p_enable)=0;
- virtual bool particles_has_height_from_velocity(RID p_particles) const=0;
-
- virtual void particles_set_use_local_coordinates(RID p_particles, bool p_enable)=0;
- virtual bool particles_is_using_local_coordinates(RID p_particles) const=0;
-
- /* SKELETON API */
-
- virtual RID skeleton_create()=0;
- virtual void skeleton_resize(RID p_skeleton,int p_bones)=0;
- virtual int skeleton_get_bone_count(RID p_skeleton) const=0;
- virtual void skeleton_bone_set_transform(RID p_skeleton,int p_bone, const Transform& p_transform)=0;
- virtual Transform skeleton_bone_get_transform(RID p_skeleton,int p_bone)=0;
-
-
- /* LIGHT API */
-
- virtual RID light_create(VS::LightType p_type)=0;
- virtual VS::LightType light_get_type(RID p_light) const=0;
-
- virtual void light_set_color(RID p_light,VS::LightColor p_type, const Color& p_color)=0;
- virtual Color light_get_color(RID p_light,VS::LightColor p_type) const=0;
-
- virtual void light_set_shadow(RID p_light,bool p_enabled)=0;
- virtual bool light_has_shadow(RID p_light) const=0;
-
- virtual void light_set_volumetric(RID p_light,bool p_enabled)=0;
- virtual bool light_is_volumetric(RID p_light) const=0;
-
- virtual void light_set_projector(RID p_light,RID p_texture)=0;
- virtual RID light_get_projector(RID p_light) const=0;
-
- virtual void light_set_var(RID p_light, VS::LightParam p_var, float p_value)=0;
- virtual float light_get_var(RID p_light, VS::LightParam p_var) const=0;
-
- virtual void light_set_operator(RID p_light,VS::LightOp p_op)=0;
- virtual VS::LightOp light_get_operator(RID p_light) const=0;
-
- virtual void light_omni_set_shadow_mode(RID p_light,VS::LightOmniShadowMode p_mode)=0;
- virtual VS::LightOmniShadowMode light_omni_get_shadow_mode(RID p_light) const=0;
-
- virtual void light_directional_set_shadow_mode(RID p_light,VS::LightDirectionalShadowMode p_mode)=0;
- virtual VS::LightDirectionalShadowMode light_directional_get_shadow_mode(RID p_light) const=0;
- virtual void light_directional_set_shadow_param(RID p_light,VS::LightDirectionalShadowParam p_param, float p_value)=0;
- virtual float light_directional_get_shadow_param(RID p_light,VS::LightDirectionalShadowParam p_param) const=0;
-
- virtual AABB light_get_aabb(RID p_poly) const=0;
-
- virtual RID light_instance_create(RID p_light)=0;
- virtual void light_instance_set_transform(RID p_light_instance,const Transform& p_transform)=0;
-
-
- enum ShadowType {
- SHADOW_NONE,
- SHADOW_SIMPLE,
- SHADOW_ORTHOGONAL,
- SHADOW_DUAL_PARABOLOID,
- SHADOW_CUBE,
- SHADOW_PSSM, //parallel split shadow map
- SHADOW_PSM //perspective shadow map
- };
-
- enum ShadowPass {
- PASS_DUAL_PARABOLOID_FRONT=0,
- PASS_DUAL_PARABOLOID_BACK=1,
- PASS_CUBE_FRONT=0,
- PASS_CUBE_BACK=1,
- PASS_CUBE_TOP=2,
- PASS_CUBE_BOTTOM=3,
- PASS_CUBE_LEFT=4,
- PASS_CUBE_RIGHT=5,
- };
-
- virtual ShadowType light_instance_get_shadow_type(RID p_light_instance,bool p_far=false) const=0;
- virtual int light_instance_get_shadow_passes(RID p_light_instance) const=0;
- virtual void light_instance_set_shadow_transform(RID p_light_instance, int p_index, const CameraMatrix& p_camera, const Transform& p_transform, float p_split_near=0,float p_split_far=0)=0;
- virtual int light_instance_get_shadow_size(RID p_light_instance, int p_index=0) const=0;
- virtual bool light_instance_get_pssm_shadow_overlap(RID p_light_instance) const=0;
-
- /* SHADOWS */
-
- virtual void shadow_clear_near()=0;
- virtual bool shadow_allocate_near(RID p_light)=0; //true on successful alloc
- virtual bool shadow_allocate_far(RID p_light)=0; //true on successful alloc
-
- /* PARTICLES INSTANCE */
-
- virtual RID particles_instance_create(RID p_particles)=0;
- virtual void particles_instance_set_transform(RID p_particles_instance,const Transform& p_transform)=0;
-
- /* RENDER API */
- /* all calls (inside begin/end shadow) are always warranted to be in the following order: */
-
- /* VIEWPORT API */
-
- virtual RID viewport_data_create()=0;
-
- virtual RID render_target_create()=0;
- virtual void render_target_set_size(RID p_render_target, int p_width, int p_height)=0;
- virtual RID render_target_get_texture(RID p_render_target) const=0;
- virtual bool render_target_renedered_in_frame(RID p_render_target)=0;
-
- virtual void begin_frame()=0;
-
- virtual void set_viewport(const VS::ViewportRect& p_viewport)=0;
- virtual void set_render_target(RID p_render_target,bool p_transparent_bg=false,bool p_vflip=false)=0;
- virtual void clear_viewport(const Color& p_color)=0;
- virtual void capture_viewport(Image* r_capture)=0;
-
- virtual void begin_scene(RID p_viewport_data,RID p_env,VS::ScenarioDebugMode p_debug)=0;
- virtual void begin_shadow_map( RID p_light_instance, int p_shadow_pass )=0;
-
- virtual void set_camera(const Transform& p_world,const CameraMatrix& p_projection,bool p_ortho_hint)=0;
-
- virtual void add_light( RID p_light_instance )=0; ///< all "add_light" calls happen before add_geometry calls
-
- typedef Map<StringName,Variant> ParamOverrideMap;
-
- struct BakedLightData {
-
- VS::BakedLightMode mode;
- RID octree_texture;
- RID light_texture;
- float color_multiplier; //used for both lightmaps and octree
- Transform octree_transform;
- Map<int,RID> lightmaps;
- //cache
-
- float octree_lattice_size;
- float octree_lattice_divide;
- float texture_multiplier;
- float lightmap_multiplier;
- int octree_steps;
- Vector2 octree_tex_pixel_size;
- Vector2 light_tex_pixel_size;
-
- bool realtime_color_enabled;
- Color realtime_color;
- float realtime_energy;
- };
-
- struct InstanceData {
-
- Transform transform;
- RID skeleton;
- RID material_override;
- RID sampled_light;
- Vector<RID> materials;
- Vector<RID> light_instances;
- Vector<float> morph_values;
- BakedLightData *baked_light;
- VS::ShadowCastingSetting cast_shadows;
- Transform *baked_light_octree_xform;
- int baked_lightmap_id;
- bool mirror :8;
- bool depth_scale :8;
- bool billboard :8;
- bool billboard_y :8;
- bool receive_shadows : 8;
-
- };
-
- virtual void add_mesh( const RID& p_mesh, const InstanceData *p_data)=0;
- virtual void add_multimesh( const RID& p_multimesh, const InstanceData *p_data)=0;
- virtual void add_immediate( const RID& p_immediate, const InstanceData *p_data)=0;
- virtual void add_particles( const RID& p_particle_instance, const InstanceData *p_data)=0;
-
-
- virtual void end_scene()=0;
- virtual void end_shadow_map()=0;
-
- virtual void end_frame()=0;
- virtual void flush_frame(); //not necessary in most cases
-
- /* CANVAS API */
-
- enum CanvasRectFlags {
-
- CANVAS_RECT_REGION=1,
- CANVAS_RECT_TILE=2,
- CANVAS_RECT_FLIP_H=4,
- CANVAS_RECT_FLIP_V=8,
- CANVAS_RECT_TRANSPOSE=16
- };
-
-
- struct Light {
-
-
-
- bool enabled;
- Color color;
- Matrix32 xform;
- float height;
- float energy;
- float scale;
- int z_min;
- int z_max;
- int layer_min;
- int layer_max;
- int item_mask;
- int item_shadow_mask;
- VS::LightMode mode;
- RID texture;
- Vector2 texture_offset;
- RID canvas;
- RID shadow_buffer;
- int shadow_buffer_size;
- float shadow_esm_mult;
- Color shadow_color;
-
-
- void *texture_cache; // implementation dependent
- Rect2 rect_cache;
- Matrix32 xform_cache;
- float radius_cache; //used for shadow far plane
- CameraMatrix shadow_matrix_cache;
-
- Matrix32 light_shader_xform;
- Vector2 light_shader_pos;
-
- Light *shadows_next_ptr;
- Light *filter_next_ptr;
- Light *next_ptr;
- Light *mask_next_ptr;
-
- Light() {
- enabled=true;
- color=Color(1,1,1);
- shadow_color=Color(0,0,0,0);
- height=0;
- z_min=-1024;
- z_max=1024;
- layer_min=0;
- layer_max=0;
- item_mask=1;
- scale=1.0;
- energy=1.0;
- item_shadow_mask=-1;
- mode=VS::CANVAS_LIGHT_MODE_ADD;
- texture_cache=NULL;
- next_ptr=NULL;
- mask_next_ptr=NULL;
- filter_next_ptr=NULL;
- shadow_buffer_size=2048;
- shadow_esm_mult=80;
-
- }
- };
-
- struct Item;
-
- struct ItemMaterial {
-
- RID shader;
- Map<StringName,Variant> shader_param;
- uint32_t shader_version;
- Set<Item*> owners;
- VS::ItemShadingMode shading_mode;
-
- ItemMaterial() {shading_mode=VS::CANVAS_ITEM_SHADING_NORMAL; shader_version=0; }
- };
-
- struct Item {
-
- struct Command {
-
- enum Type {
-
- TYPE_LINE,
- TYPE_RECT,
- TYPE_STYLE,
- TYPE_PRIMITIVE,
- TYPE_POLYGON,
- TYPE_POLYGON_PTR,
- TYPE_CIRCLE,
- TYPE_TRANSFORM,
- TYPE_BLEND_MODE,
- TYPE_CLIP_IGNORE,
- };
-
- Type type;
- virtual ~Command(){}
- };
-
- struct CommandLine : public Command {
-
- Point2 from,to;
- Color color;
- float width;
- bool antialiased;
- CommandLine() { type = TYPE_LINE; }
- };
-
- struct CommandRect : public Command {
-
- Rect2 rect;
- RID texture;
- Color modulate;
- Rect2 source;
- uint8_t flags;
-
- CommandRect() { flags=0; type = TYPE_RECT; }
- };
-
- struct CommandStyle : public Command {
-
- Rect2 rect;
- Rect2 source;
- RID texture;
- float margin[4];
- bool draw_center;
- Color color;
- CommandStyle() { draw_center=true; type = TYPE_STYLE; }
- };
-
- struct CommandPrimitive : public Command {
-
- Vector<Point2> points;
- Vector<Point2> uvs;
- Vector<Color> colors;
- RID texture;
- float width;
-
- CommandPrimitive() { type = TYPE_PRIMITIVE; width=1;}
- };
-
- struct CommandPolygon : public Command {
-
- Vector<int> indices;
- Vector<Point2> points;
- Vector<Point2> uvs;
- Vector<Color> colors;
- RID texture;
- int count;
-
- CommandPolygon() { type = TYPE_POLYGON; count = 0; }
- };
-
- struct CommandPolygonPtr : public Command {
-
- const int* indices;
- const Point2* points;
- const Point2* uvs;
- const Color* colors;
- RID texture;
- int count;
-
- CommandPolygonPtr() { type = TYPE_POLYGON_PTR; count = 0; }
- };
-
- struct CommandCircle : public Command {
-
- Point2 pos;
- float radius;
- Color color;
- CommandCircle() { type = TYPE_CIRCLE; }
- };
-
- struct CommandTransform : public Command {
-
- Matrix32 xform;
- CommandTransform() { type = TYPE_TRANSFORM; }
- };
-
- struct CommandBlendMode : public Command {
-
- VS::MaterialBlendMode blend_mode;
- CommandBlendMode() { type = TYPE_BLEND_MODE; blend_mode = VS::MATERIAL_BLEND_MODE_MIX; }
- };
- struct CommandClipIgnore : public Command {
-
- bool ignore;
- CommandClipIgnore() { type = TYPE_CLIP_IGNORE; ignore=false; }
- };
-
-
- struct ViewportRender {
- VisualServer*owner;
- void* udata;
- Rect2 rect;
- };
-
- Matrix32 xform;
- bool clip;
- bool visible;
- bool ontop;
- VS::MaterialBlendMode blend_mode;
- int light_mask;
- Vector<Command*> commands;
- mutable bool custom_rect;
- mutable bool rect_dirty;
- mutable Rect2 rect;
- Item*next;
- ItemMaterial* material;
- struct CopyBackBuffer {
- Rect2 rect;
- Rect2 screen_rect;
- bool full;
- };
- CopyBackBuffer *copy_back_buffer;
-
-
- float final_opacity;
- Matrix32 final_transform;
- Rect2 final_clip_rect;
- Item* final_clip_owner;
- Item* material_owner;
- ViewportRender *vp_render;
- bool distance_field;
- bool light_masked;
-
- Rect2 global_rect_cache;
-
- const Rect2& get_rect() const {
- if (custom_rect || !rect_dirty)
- return rect;
-
- //must update rect
- int s=commands.size();
- if (s==0) {
-
- rect=Rect2();
- rect_dirty=false;
- return rect;
- }
-
- Matrix32 xf;
- bool found_xform=false;
- bool first=true;
-
- const Item::Command * const *cmd = &commands[0];
-
-
- for (int i=0;i<s;i++) {
-
- const Item::Command *c=cmd[i];
- Rect2 r;
-
- switch(c->type) {
- case Item::Command::TYPE_LINE: {
-
- const Item::CommandLine* line = static_cast< const Item::CommandLine*>(c);
- r.pos=line->from;
- r.expand_to(line->to);
- } break;
- case Item::Command::TYPE_RECT: {
-
- const Item::CommandRect* crect = static_cast< const Item::CommandRect*>(c);
- r=crect->rect;
-
- } break;
- case Item::Command::TYPE_STYLE: {
-
- const Item::CommandStyle* style = static_cast< const Item::CommandStyle*>(c);
- r=style->rect;
- } break;
- case Item::Command::TYPE_PRIMITIVE: {
-
- const Item::CommandPrimitive* primitive = static_cast< const Item::CommandPrimitive*>(c);
- r.pos=primitive->points[0];
- for(int i=1;i<primitive->points.size();i++) {
-
- r.expand_to(primitive->points[i]);
-
- }
- } break;
- case Item::Command::TYPE_POLYGON: {
-
- const Item::CommandPolygon* polygon = static_cast< const Item::CommandPolygon*>(c);
- int l = polygon->points.size();
- const Point2*pp=&polygon->points[0];
- r.pos=pp[0];
- for(int i=1;i<l;i++) {
-
- r.expand_to(pp[i]);
-
- }
- } break;
-
- case Item::Command::TYPE_POLYGON_PTR: {
-
- const Item::CommandPolygonPtr* polygon = static_cast< const Item::CommandPolygonPtr*>(c);
- int l = polygon->count;
- if (polygon->indices != NULL) {
-
- r.pos=polygon->points[polygon->indices[0]];
- for (int i=1; i<l; i++) {
-
- r.expand_to(polygon->points[polygon->indices[i]]);
- }
- } else {
- r.pos=polygon->points[0];
- for (int i=1; i<l; i++) {
-
- r.expand_to(polygon->points[i]);
- }
- }
- } break;
- case Item::Command::TYPE_CIRCLE: {
-
- const Item::CommandCircle* circle = static_cast< const Item::CommandCircle*>(c);
- r.pos=Point2(-circle->radius,-circle->radius)+circle->pos;
- r.size=Point2(circle->radius*2.0,circle->radius*2.0);
- } break;
- case Item::Command::TYPE_TRANSFORM: {
-
- const Item::CommandTransform* transform = static_cast<const Item::CommandTransform*>(c);
- xf=transform->xform;
- found_xform=true;
- continue;
- } break;
- case Item::Command::TYPE_BLEND_MODE: {
-
- } break;
- case Item::Command::TYPE_CLIP_IGNORE: {
-
- } break;
- }
-
- if (found_xform) {
- r = xf.xform(r);
- found_xform=false;
- }
-
-
- if (first) {
- rect=r;
- first=false;
- } else
- rect=rect.merge(r);
- }
-
- rect_dirty=false;
- return rect;
- }
-
- void clear() { for (int i=0;i<commands.size();i++) memdelete( commands[i] ); commands.clear(); clip=false; rect_dirty=true; final_clip_owner=NULL; material_owner=NULL; light_masked=false; }
- Item() { light_mask=1; vp_render=NULL; next=NULL; final_clip_owner=NULL; clip=false; final_opacity=1; blend_mode=VS::MATERIAL_BLEND_MODE_MIX; visible=true; rect_dirty=true; custom_rect=false; ontop=true; material_owner=NULL; material=NULL; copy_back_buffer=NULL; distance_field=false; light_masked=false; }
- virtual ~Item() { clear(); if (copy_back_buffer) memdelete(copy_back_buffer); }
- };
-
-
- ItemDrawViewportFunc draw_viewport_func;
-
-
- virtual void begin_canvas_bg()=0;
- virtual void canvas_begin()=0;
- virtual void canvas_disable_blending()=0;
- virtual void canvas_set_opacity(float p_opacity)=0;
- virtual void canvas_set_blend_mode(VS::MaterialBlendMode p_mode)=0;
- virtual void canvas_begin_rect(const Matrix32& p_transform)=0;
- virtual void canvas_set_clip(bool p_clip, const Rect2& p_rect)=0;
- virtual void canvas_end_rect()=0;
- virtual void canvas_draw_line(const Point2& p_from, const Point2& p_to,const Color& p_color,float p_width,bool p_antialiased)=0;
- virtual void canvas_draw_rect(const Rect2& p_rect, int p_flags, const Rect2& p_source,RID p_texture,const Color& p_modulate)=0;
- virtual void canvas_draw_style_box(const Rect2& p_rect, const Rect2& p_src_region, RID p_texture,const float *p_margins, bool p_draw_center=true,const Color& p_modulate=Color(1,1,1))=0;
- virtual void canvas_draw_primitive(const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs, RID p_texture,float p_width)=0;
- virtual void canvas_draw_polygon(int p_vertex_count, const int* p_indices, const Vector2* p_vertices, const Vector2* p_uvs, const Color* p_colors,const RID& p_texture,bool p_singlecolor)=0;
- virtual void canvas_set_transform(const Matrix32& p_transform)=0;
-
- virtual void canvas_render_items(Item *p_item_list,int p_z,const Color& p_modulate,Light *p_light)=0;
- virtual void canvas_debug_viewport_shadows(Light* p_lights_with_shadow)=0;
- /* LIGHT SHADOW MAPPING */
-
- virtual RID canvas_light_occluder_create()=0;
- virtual void canvas_light_occluder_set_polylines(RID p_occluder, const PoolVector<Vector2>& p_lines)=0;
-
-
- virtual RID canvas_light_shadow_buffer_create(int p_width)=0;
-
- struct LightOccluderInstance {
-
-
- bool enabled;
- RID canvas;
- RID polygon;
- RID polygon_buffer;
- Rect2 aabb_cache;
- Matrix32 xform;
- Matrix32 xform_cache;
- int light_mask;
- VS::CanvasOccluderPolygonCullMode cull_cache;
-
- LightOccluderInstance *next;
-
- LightOccluderInstance() { enabled=true; next=NULL; light_mask=1; cull_cache=VS::CANVAS_OCCLUDER_POLYGON_CULL_DISABLED; }
- };
-
-
-
- virtual void canvas_light_shadow_buffer_update(RID p_buffer, const Matrix32& p_light_xform, int p_light_mask,float p_near, float p_far, LightOccluderInstance* p_occluders, CameraMatrix *p_xform_cache)=0;
-
- /* ENVIRONMENT */
-
-
- virtual RID environment_create()=0;
-
- virtual void environment_set_background(RID p_env,VS::EnvironmentBG p_bg)=0;
- virtual VS::EnvironmentBG environment_get_background(RID p_env) const=0;
-
- virtual void environment_set_background_param(RID p_env,VS::EnvironmentBGParam p_param, const Variant& p_value)=0;
- virtual Variant environment_get_background_param(RID p_env,VS::EnvironmentBGParam p_param) const=0;
-
- virtual void environment_set_enable_fx(RID p_env,VS::EnvironmentFx p_effect,bool p_enabled)=0;
- virtual bool environment_is_fx_enabled(RID p_env,VS::EnvironmentFx p_effect) const=0;
-
- virtual void environment_fx_set_param(RID p_env,VS::EnvironmentFxParam p_param,const Variant& p_value)=0;
- virtual Variant environment_fx_get_param(RID p_env,VS::EnvironmentFxParam p_param) const=0;
-
- /* SAMPLED LIGHT */
- virtual RID sampled_light_dp_create(int p_width,int p_height)=0;
- virtual void sampled_light_dp_update(RID p_sampled_light,const Color *p_data,float p_multiplier)=0;
-
-
- /*MISC*/
-
- virtual bool is_texture(const RID& p_rid) const=0;
- virtual bool is_material(const RID& p_rid) const=0;
- virtual bool is_mesh(const RID& p_rid) const=0;
- virtual bool is_multimesh(const RID& p_rid) const=0;
- virtual bool is_immediate(const RID& p_rid) const=0;
- virtual bool is_particles(const RID &p_beam) const=0;
-
- virtual bool is_light(const RID& p_rid) const=0;
- virtual bool is_light_instance(const RID& p_rid) const=0;
- virtual bool is_particles_instance(const RID& p_rid) const=0;
- virtual bool is_skeleton(const RID& p_rid) const=0;
- virtual bool is_environment(const RID& p_rid) const=0;
- virtual bool is_shader(const RID& p_rid) const=0;
-
- virtual bool is_canvas_light_occluder(const RID& p_rid) const=0;
-
- virtual void free(const RID& p_rid)=0;
-
- virtual void init()=0;
- virtual void finish()=0;
-
- virtual bool needs_to_draw_next_frame() const=0;
-
- virtual void reload_vram() {}
-
- virtual bool has_feature(VS::Features p_feature) const=0;
-
- virtual void restore_framebuffer()=0;
-
- virtual int get_render_info(VS::RenderInfo p_info)=0;
-
- virtual void set_force_16_bits_fbo(bool p_force) {}
-
- Rasterizer();
- virtual ~Rasterizer() {}
-};
-
-#endif
-#endif
+#endif // RASTERIZER_H
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index 3e0a1a6f45..0684cb1701 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -165,6 +165,7 @@ const char *ShaderLanguage::token_names[TK_MAX] = {
"CF_BREAK",
"CF_CONTINUE",
"CF_RETURN",
+ "CF_DISCARD",
"BRACKET_OPEN",
"BRACKET_CLOSE",
"CURLY_BRACKET_OPEN",
@@ -2585,7 +2586,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
}
bool index_valid = false;
- DataType member_type;
+ DataType member_type = TYPE_VOID;
switch (expr->get_datatype()) {
case TYPE_BVEC2:
@@ -2952,7 +2953,7 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
if (expression[next_op + 1].is_op) {
// this is not invalid and can really appear
// but it becomes invalid anyway because no binary op
- // can be followed by an unary op in a valid combination,
+ // can be followed by a unary op in a valid combination,
// due to how precedence works, unaries will always disappear first
_set_error("Parser bug..");
@@ -3291,6 +3292,34 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Dat
}
p_block->statements.push_back(flow);
+ } else if (tk.type == TK_CF_DISCARD) {
+
+ //check return type
+ BlockNode *b = p_block;
+ while (b && !b->parent_function) {
+ b = b->parent_block;
+ }
+ if (!b) {
+ _set_error("Bug");
+ return ERR_BUG;
+ }
+
+ if (!b->parent_function->can_discard) {
+ _set_error("Use of 'discard' is not allowed here.");
+ return ERR_PARSE_ERROR;
+ }
+
+ ControlFlowNode *flow = alloc_node<ControlFlowNode>();
+ flow->flow_op = FLOW_OP_DISCARD;
+
+ pos = _get_tkpos();
+ tk = _get_token();
+ if (tk.type != TK_SEMICOLON) {
+ //all is good
+ _set_error("Expected ';' after discard");
+ }
+
+ p_block->statements.push_back(flow);
} else {
@@ -3315,12 +3344,12 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Dat
return OK;
}
-Error ShaderLanguage::_parse_shader(const Map<StringName, Map<StringName, DataType> > &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types) {
+Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types) {
Token tk = _get_token();
if (tk.type != TK_SHADER_TYPE) {
- _set_error("Expected 'shader_type' at the begining of shader.");
+ _set_error("Expected 'shader_type' at the beginning of shader.");
return ERR_PARSE_ERROR;
}
@@ -3652,7 +3681,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, Map<StringName, DataTy
Map<StringName, DataType> builtin_types;
if (p_functions.has(name)) {
- builtin_types = p_functions[name];
+ builtin_types = p_functions[name].built_ins;
}
ShaderNode::Function function;
@@ -3816,7 +3845,7 @@ String ShaderLanguage::get_shader_type(const String &p_code) {
return String();
}
-Error ShaderLanguage::compile(const String &p_code, const Map<StringName, Map<StringName, DataType> > &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types) {
+Error ShaderLanguage::compile(const String &p_code, const Map<StringName, FunctionInfo> &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types) {
clear();
@@ -3833,7 +3862,7 @@ Error ShaderLanguage::compile(const String &p_code, const Map<StringName, Map<St
return OK;
}
-Error ShaderLanguage::complete(const String &p_code, const Map<StringName, Map<StringName, DataType> > &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types, List<String> *r_options, String &r_call_hint) {
+Error ShaderLanguage::complete(const String &p_code, const Map<StringName, FunctionInfo> &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types, List<String> *r_options, String &r_call_hint) {
clear();
@@ -3860,7 +3889,7 @@ Error ShaderLanguage::complete(const String &p_code, const Map<StringName, Map<S
} break;
case COMPLETION_MAIN_FUNCTION: {
- for (const Map<StringName, Map<StringName, DataType> >::Element *E = p_functions.front(); E; E = E->next()) {
+ for (const Map<StringName, FunctionInfo>::Element *E = p_functions.front(); E; E = E->next()) {
r_options->push_back(E->key());
}
@@ -3901,7 +3930,7 @@ Error ShaderLanguage::complete(const String &p_code, const Map<StringName, Map<S
if (comp_ident && skip_function != StringName() && p_functions.has(skip_function)) {
- for (Map<StringName, DataType>::Element *E = p_functions[skip_function].front(); E; E = E->next()) {
+ for (Map<StringName, DataType>::Element *E = p_functions[skip_function].built_ins.front(); E; E = E->next()) {
matches.insert(E->key());
}
}
diff --git a/servers/visual/shader_language.h b/servers/visual/shader_language.h
index c92cbf2abb..f00b4c5a97 100644
--- a/servers/visual/shader_language.h
+++ b/servers/visual/shader_language.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -118,6 +118,7 @@ public:
TK_CF_BREAK,
TK_CF_CONTINUE,
TK_CF_RETURN,
+ TK_CF_DISCARD,
TK_BRACKET_OPEN,
TK_BRACKET_CLOSE,
TK_CURLY_BRACKET_OPEN,
@@ -244,7 +245,8 @@ public:
FLOW_OP_DO,
FLOW_OP_BREAK,
FLOW_OP_SWITCH,
- FLOW_OP_CONTINUE
+ FLOW_OP_CONTINUE,
+ FLOW_OP_DISCARD
};
@@ -387,10 +389,12 @@ public:
DataPrecision return_precision;
Vector<Argument> arguments;
BlockNode *body;
+ bool can_discard;
FunctionNode() {
type = TYPE_FUNCTION;
return_precision = PRECISION_DEFAULT;
+ can_discard = false;
}
};
@@ -499,6 +503,11 @@ public:
static void get_keyword_list(List<String> *r_keywords);
static void get_builtin_funcs(List<String> *r_keywords);
+ struct FunctionInfo {
+ Map<StringName, DataType> built_ins;
+ bool can_discard;
+ };
+
private:
struct KeyWord {
TokenType token;
@@ -591,7 +600,7 @@ private:
Error _parse_block(BlockNode *p_block, const Map<StringName, DataType> &p_builtin_types, bool p_just_one = false, bool p_can_break = false, bool p_can_continue = false);
- Error _parse_shader(const Map<StringName, Map<StringName, DataType> > &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types);
+ Error _parse_shader(const Map<StringName, FunctionInfo> &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types);
public:
//static void get_keyword_list(ShaderType p_type,List<String> *p_keywords);
@@ -599,8 +608,8 @@ public:
void clear();
static String get_shader_type(const String &p_code);
- Error compile(const String &p_code, const Map<StringName, Map<StringName, DataType> > &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types);
- Error complete(const String &p_code, const Map<StringName, Map<StringName, DataType> > &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types, List<String> *r_options, String &r_call_hint);
+ Error compile(const String &p_code, const Map<StringName, FunctionInfo> &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types);
+ Error complete(const String &p_code, const Map<StringName, FunctionInfo> &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types, List<String> *r_options, String &r_call_hint);
String get_error_text();
int get_error_line();
diff --git a/servers/visual/shader_types.cpp b/servers/visual/shader_types.cpp
index 3f1403d532..ef0d063f83 100644
--- a/servers/visual/shader_types.cpp
+++ b/servers/visual/shader_types.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "shader_types.h"
-const Map<StringName, Map<StringName, ShaderLanguage::DataType> > &ShaderTypes::get_functions(VS::ShaderMode p_mode) {
+const Map<StringName, ShaderLanguage::FunctionInfo> &ShaderTypes::get_functions(VS::ShaderMode p_mode) {
return shader_modes[p_mode].functions;
}
@@ -50,72 +50,73 @@ ShaderTypes::ShaderTypes() {
/*************** SPATIAL ***********************/
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["SRC_VERTEX"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["SRC_NORMAL"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["SRC_BONES"] = ShaderLanguage::TYPE_IVEC4;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["SRC_WEIGHTS"] = ShaderLanguage::TYPE_VEC4;
-
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["POSITION"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["VERTEX"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["NORMAL"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["TANGENT"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["BINORMAL"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["UV"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["UV2"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["COLOR"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["POINT_SIZE"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["INSTANCE_ID"] = ShaderLanguage::TYPE_INT;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["INSTANCE_CUSTOM"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["ROUGHNESS"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["SRC_VERTEX"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["SRC_NORMAL"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["SRC_BONES"] = ShaderLanguage::TYPE_IVEC4;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["SRC_WEIGHTS"] = ShaderLanguage::TYPE_VEC4;
+
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["POSITION"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["VERTEX"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["NORMAL"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["TANGENT"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["BINORMAL"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["UV"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["UV2"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["COLOR"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["POINT_SIZE"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["INSTANCE_ID"] = ShaderLanguage::TYPE_INT;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["INSTANCE_CUSTOM"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["ROUGHNESS"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].can_discard = false;
//builtins
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["WORLD_MATRIX"] = ShaderLanguage::TYPE_MAT4;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["INV_CAMERA_MATRIX"] = ShaderLanguage::TYPE_MAT4;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["CAMERA_MATRIX"] = ShaderLanguage::TYPE_MAT4;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["PROJECTION_MATRIX"] = ShaderLanguage::TYPE_MAT4;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["MODELVIEW_MATRIX"] = ShaderLanguage::TYPE_MAT4;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["TIME"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["VIEWPORT_SIZE"] = ShaderLanguage::TYPE_VEC2;
-
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["VERTEX"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["FRAGCOORD"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["FRONT_FACING"] = ShaderLanguage::TYPE_BOOL;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["NORMAL"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["TANGENT"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["BINORMAL"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["NORMALMAP"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["NORMALMAP_DEPTH"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["UV"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["UV2"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["COLOR"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["NORMAL"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["ALBEDO"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["ALPHA"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["METALLIC"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["SPECULAR"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["ROUGHNESS"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["RIM"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["RIM_TINT"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["CLEARCOAT"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["CLEARCOAT_GLOSS"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["ANISOTROPY"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["ANISOTROPY_FLOW"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["SSS_STRENGTH"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["AO"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["EMISSION"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["DISCARD"] = ShaderLanguage::TYPE_BOOL;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["SCREEN_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["DEPTH_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["POINT_COORD"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["SIDE"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["ALPHA_SCISSOR"] = ShaderLanguage::TYPE_FLOAT;
-
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["WORLD_MATRIX"] = ShaderLanguage::TYPE_MAT4;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["INV_CAMERA_MATRIX"] = ShaderLanguage::TYPE_MAT4;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["PROJECTION_MATRIX"] = ShaderLanguage::TYPE_MAT4;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["TIME"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_SPATIAL].functions["fragment"]["VIEWPORT_SIZE"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["WORLD_MATRIX"] = ShaderLanguage::TYPE_MAT4;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["INV_CAMERA_MATRIX"] = ShaderLanguage::TYPE_MAT4;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["CAMERA_MATRIX"] = ShaderLanguage::TYPE_MAT4;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["PROJECTION_MATRIX"] = ShaderLanguage::TYPE_MAT4;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["MODELVIEW_MATRIX"] = ShaderLanguage::TYPE_MAT4;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["TIME"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"].built_ins["VIEWPORT_SIZE"] = ShaderLanguage::TYPE_VEC2;
+
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["VERTEX"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["FRAGCOORD"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["FRONT_FACING"] = ShaderLanguage::TYPE_BOOL;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["NORMAL"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["TANGENT"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["BINORMAL"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["NORMALMAP"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["NORMALMAP_DEPTH"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["UV"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["UV2"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["COLOR"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["NORMAL"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["ALBEDO"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["ALPHA"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["METALLIC"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["SPECULAR"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["ROUGHNESS"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["RIM"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["RIM_TINT"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["CLEARCOAT"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["CLEARCOAT_GLOSS"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["ANISOTROPY"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["ANISOTROPY_FLOW"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["SSS_STRENGTH"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["AO"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["EMISSION"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["SCREEN_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["DEPTH_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["POINT_COORD"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["SIDE"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["ALPHA_SCISSOR"] = ShaderLanguage::TYPE_FLOAT;
+
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["WORLD_MATRIX"] = ShaderLanguage::TYPE_MAT4;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["INV_CAMERA_MATRIX"] = ShaderLanguage::TYPE_MAT4;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["PROJECTION_MATRIX"] = ShaderLanguage::TYPE_MAT4;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["TIME"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].built_ins["VIEWPORT_SIZE"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_SPATIAL].functions["fragment"].can_discard = true;
shader_modes[VS::SHADER_SPATIAL].modes.insert("blend_mix");
shader_modes[VS::SHADER_SPATIAL].modes.insert("blend_add");
@@ -127,12 +128,13 @@ ShaderTypes::ShaderTypes() {
shader_modes[VS::SHADER_SPATIAL].modes.insert("depth_draw_never");
shader_modes[VS::SHADER_SPATIAL].modes.insert("depth_draw_alpha_prepass");
+ shader_modes[VS::SHADER_SPATIAL].modes.insert("depth_test_disable");
+
shader_modes[VS::SHADER_SPATIAL].modes.insert("cull_front");
shader_modes[VS::SHADER_SPATIAL].modes.insert("cull_back");
shader_modes[VS::SHADER_SPATIAL].modes.insert("cull_disabled");
shader_modes[VS::SHADER_SPATIAL].modes.insert("unshaded");
- shader_modes[VS::SHADER_SPATIAL].modes.insert("ontop");
shader_modes[VS::SHADER_SPATIAL].modes.insert("diffuse_lambert");
shader_modes[VS::SHADER_SPATIAL].modes.insert("diffuse_half_lambert");
@@ -153,52 +155,55 @@ ShaderTypes::ShaderTypes() {
/************ CANVAS ITEM **************************/
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["SRC_VERTEX"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["VERTEX"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["UV"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["VERTEX_COLOR"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["POINT_SIZE"] = ShaderLanguage::TYPE_FLOAT;
-
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["WORLD_MATRIX"] = ShaderLanguage::TYPE_MAT4;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["PROJECTION_MATRIX"] = ShaderLanguage::TYPE_MAT4;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["EXTRA_MATRIX"] = ShaderLanguage::TYPE_MAT4;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["TIME"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["PARTICLE_CUSTOM"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["AT_LIGHT_PASS"] = ShaderLanguage::TYPE_BOOL;
-
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["SRC_COLOR"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["FRAGCOORD"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["NORMAL"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["NORMALMAP"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["NORMALMAP_DEPTH"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["UV"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["COLOR"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["TEXTURE_PIXEL_SIZE"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["SCREEN_PIXEL_SIZE"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["POINT_COORD"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["TIME"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["AT_LIGHT_PASS"] = ShaderLanguage::TYPE_BOOL;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["SCREEN_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"]["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2;
-
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["POSITION"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["NORMAL"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["UV"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["COLOR"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["TEXTURE_PIXEL_SIZE"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["LIGHT_VEC"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["LIGHT_HEIGHT"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["LIGHT_COLOR"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["LIGHT_UV"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["LIGHT_SHADOW"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["LIGHT"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["SHADOW"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["POINT_COORD"] = ShaderLanguage::TYPE_VEC2;
- shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"]["TIME"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["SRC_VERTEX"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["VERTEX"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["UV"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["VERTEX_COLOR"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["POINT_SIZE"] = ShaderLanguage::TYPE_FLOAT;
+
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["WORLD_MATRIX"] = ShaderLanguage::TYPE_MAT4;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["PROJECTION_MATRIX"] = ShaderLanguage::TYPE_MAT4;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["EXTRA_MATRIX"] = ShaderLanguage::TYPE_MAT4;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["TIME"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["PARTICLE_CUSTOM"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].built_ins["AT_LIGHT_PASS"] = ShaderLanguage::TYPE_BOOL;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"].can_discard = false;
+
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["SRC_COLOR"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["FRAGCOORD"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["NORMAL"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["NORMALMAP"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["NORMALMAP_DEPTH"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["UV"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["COLOR"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["TEXTURE_PIXEL_SIZE"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["SCREEN_PIXEL_SIZE"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["POINT_COORD"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["TIME"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["AT_LIGHT_PASS"] = ShaderLanguage::TYPE_BOOL;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["SCREEN_TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].built_ins["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["fragment"].can_discard = true;
+
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["POSITION"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["NORMAL"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["UV"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["COLOR"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["TEXTURE"] = ShaderLanguage::TYPE_SAMPLER2D;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["TEXTURE_PIXEL_SIZE"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["SCREEN_UV"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT_VEC"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT_HEIGHT"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT_COLOR"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT_UV"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT_SHADOW"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["SHADOW"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["POINT_COORD"] = ShaderLanguage::TYPE_VEC2;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["TIME"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].can_discard = true;
shader_modes[VS::SHADER_CANVAS_ITEM].modes.insert("skip_vertex_transform");
@@ -213,20 +218,21 @@ ShaderTypes::ShaderTypes() {
/************ PARTICLES **************************/
- shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["COLOR"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["VELOCITY"] = ShaderLanguage::TYPE_VEC3;
- shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["MASS"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["ACTIVE"] = ShaderLanguage::TYPE_BOOL;
- shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["RESTART"] = ShaderLanguage::TYPE_BOOL;
- shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["CUSTOM"] = ShaderLanguage::TYPE_VEC4;
- shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["TRANSFORM"] = ShaderLanguage::TYPE_MAT4;
- shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["TIME"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["LIFETIME"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["DELTA"] = ShaderLanguage::TYPE_FLOAT;
- shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["NUMBER"] = ShaderLanguage::TYPE_UINT;
- shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["INDEX"] = ShaderLanguage::TYPE_INT;
- shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["EMISSION_TRANSFORM"] = ShaderLanguage::TYPE_MAT4;
- shader_modes[VS::SHADER_PARTICLES].functions["vertex"]["RANDOM_SEED"] = ShaderLanguage::TYPE_UINT;
+ shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["COLOR"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["VELOCITY"] = ShaderLanguage::TYPE_VEC3;
+ shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["MASS"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["ACTIVE"] = ShaderLanguage::TYPE_BOOL;
+ shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["RESTART"] = ShaderLanguage::TYPE_BOOL;
+ shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["CUSTOM"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["TRANSFORM"] = ShaderLanguage::TYPE_MAT4;
+ shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["TIME"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["LIFETIME"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["DELTA"] = ShaderLanguage::TYPE_FLOAT;
+ shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["NUMBER"] = ShaderLanguage::TYPE_UINT;
+ shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["INDEX"] = ShaderLanguage::TYPE_INT;
+ shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["EMISSION_TRANSFORM"] = ShaderLanguage::TYPE_MAT4;
+ shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["RANDOM_SEED"] = ShaderLanguage::TYPE_UINT;
+ shader_modes[VS::SHADER_PARTICLES].functions["vertex"].can_discard = false;
shader_modes[VS::SHADER_PARTICLES].modes.insert("billboard");
shader_modes[VS::SHADER_PARTICLES].modes.insert("disable_force");
diff --git a/servers/visual/shader_types.h b/servers/visual/shader_types.h
index b8cbabeec1..725217ba2e 100644
--- a/servers/visual/shader_types.h
+++ b/servers/visual/shader_types.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -36,7 +36,7 @@ class ShaderTypes {
struct Type {
- Map<StringName, Map<StringName, ShaderLanguage::DataType> > functions;
+ Map<StringName, ShaderLanguage::FunctionInfo> functions;
Set<String> modes;
};
@@ -49,7 +49,7 @@ class ShaderTypes {
public:
static ShaderTypes *get_singleton() { return singleton; }
- const Map<StringName, Map<StringName, ShaderLanguage::DataType> > &get_functions(VS::ShaderMode p_mode);
+ const Map<StringName, ShaderLanguage::FunctionInfo> &get_functions(VS::ShaderMode p_mode);
const Set<String> &get_modes(VS::ShaderMode p_mode);
const Set<String> &get_types();
diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp
index 13517fa409..25724981eb 100644
--- a/servers/visual/visual_server_canvas.cpp
+++ b/servers/visual/visual_server_canvas.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -37,10 +37,8 @@ void VisualServerCanvas::_render_canvas_item_tree(Item *p_canvas_item, const Tra
RasterizerCanvas::Item *z_list[z_range];
RasterizerCanvas::Item *z_last_list[z_range];
- for (int i = 0; i < z_range; i++) {
- z_list[i] = NULL;
- z_last_list[i] = NULL;
- }
+ memset(z_list, 0, z_range * sizeof(RasterizerCanvas::Item *));
+ memset(z_last_list, 0, z_range * sizeof(RasterizerCanvas::Item *));
_render_canvas_item(p_canvas_item, p_transform, p_clip_rect, Color(1, 1, 1, 1), 0, z_list, z_last_list, NULL, NULL);
@@ -200,10 +198,9 @@ void VisualServerCanvas::render_canvas(Canvas *p_canvas, const Transform2D &p_tr
RasterizerCanvas::Item *z_list[z_range];
RasterizerCanvas::Item *z_last_list[z_range];
- for (int i = 0; i < z_range; i++) {
- z_list[i] = NULL;
- z_last_list[i] = NULL;
- }
+ memset(z_list, 0, z_range * sizeof(RasterizerCanvas::Item *));
+ memset(z_last_list, 0, z_range * sizeof(RasterizerCanvas::Item *));
+
for (int i = 0; i < l; i++) {
_render_canvas_item(ci[i].item, p_transform, p_clip_rect, Color(1, 1, 1, 1), 0, z_list, z_last_list, NULL, NULL);
}
@@ -701,6 +698,7 @@ void VisualServerCanvas::canvas_item_add_triangle_array(RID p_item, const Vector
polygon->colors = p_colors;
polygon->indices = indices;
polygon->count = count;
+ polygon->antialiased = false;
canvas_item->rect_dirty = true;
canvas_item->commands.push_back(polygon);
@@ -1099,13 +1097,15 @@ void VisualServerCanvas::canvas_light_occluder_set_polygon(RID p_occluder, RID p
if (occluder->polygon.is_valid()) {
LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get(p_polygon);
- if (!occluder_poly)
+ if (!occluder_poly) {
occluder->polygon = RID();
- ERR_FAIL_COND(!occluder_poly);
- occluder_poly->owners.insert(occluder);
- occluder->polygon_buffer = occluder_poly->occluder;
- occluder->aabb_cache = occluder_poly->aabb;
- occluder->cull_cache = occluder_poly->cull_mode;
+ ERR_FAIL_COND(!occluder_poly);
+ } else {
+ occluder_poly->owners.insert(occluder);
+ occluder->polygon_buffer = occluder_poly->occluder;
+ occluder->aabb_cache = occluder_poly->aabb;
+ occluder->cull_cache = occluder_poly->cull_mode;
+ }
}
}
void VisualServerCanvas::canvas_light_occluder_set_transform(RID p_occluder, const Transform2D &p_xform) {
diff --git a/servers/visual/visual_server_canvas.h b/servers/visual/visual_server_canvas.h
index b9ad88286d..09ac9959f9 100644
--- a/servers/visual/visual_server_canvas.h
+++ b/servers/visual/visual_server_canvas.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/visual/visual_server_global.cpp b/servers/visual/visual_server_global.cpp
index a0f118dd67..1c86fb0264 100644
--- a/servers/visual/visual_server_global.cpp
+++ b/servers/visual/visual_server_global.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/visual/visual_server_global.h b/servers/visual/visual_server_global.h
index 079f03f1b1..c65abc75f8 100644
--- a/servers/visual/visual_server_global.h
+++ b/servers/visual/visual_server_global.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/visual/visual_server_light_baker.cpp b/servers/visual/visual_server_light_baker.cpp
index 67048eb54e..88a0c8166f 100644
--- a/servers/visual/visual_server_light_baker.cpp
+++ b/servers/visual/visual_server_light_baker.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/visual/visual_server_light_baker.h b/servers/visual/visual_server_light_baker.h
index 218c42bb1b..173dbd9e19 100644
--- a/servers/visual/visual_server_light_baker.h
+++ b/servers/visual/visual_server_light_baker.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index e66c8a1e21..68ca586caf 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "visual_server_raster.h"
+
#include "default_mouse_cursor.xpm"
#include "io/marshalls.h"
#include "os/os.h"
@@ -208,7743 +209,3 @@ VisualServerRaster::~VisualServerRaster() {
memdelete(VSG::viewport);
memdelete(VSG::rasterizer);
}
-
-#if 0
-
-BalloonAllocator<> *VisualServerRaster::OctreeAllocator::allocator=NULL;
-
-#define VS_CHANGED \
- changes++;\
-
- //print_line(__FUNCTION__);
-
-
-
-
-RID VisualServerRaster::texture_create() {
-
- return rasterizer->texture_create();
-}
-
-
-void VisualServerRaster::texture_allocate(RID p_texture, int p_width, int p_height,Image::Format p_format,uint32_t p_flags) {
-
- rasterizer->texture_allocate(p_texture,p_width,p_height,p_format,p_flags);
-}
-
-void VisualServerRaster::texture_set_flags(RID p_texture,uint32_t p_flags) {
-
- VS_CHANGED;
- rasterizer->texture_set_flags(p_texture,p_flags);
-}
-
-
-void VisualServerRaster::texture_set_data(RID p_texture,const Image& p_image,CubeMapSide p_cube_side) {
-
- VS_CHANGED;
- rasterizer->texture_set_data(p_texture,p_image,p_cube_side);
-
-
-}
-
-Image VisualServerRaster::texture_get_data(RID p_texture,CubeMapSide p_cube_side) const {
-
-
- return rasterizer->texture_get_data(p_texture,p_cube_side);
-}
-
-
-uint32_t VisualServerRaster::texture_get_flags(RID p_texture) const {
-
- return rasterizer->texture_get_flags(p_texture);
-
-}
-Image::Format VisualServerRaster::texture_get_format(RID p_texture) const {
-
- return rasterizer->texture_get_format(p_texture);
-
-}
-uint32_t VisualServerRaster::texture_get_width(RID p_texture) const {
-
- return rasterizer->texture_get_width(p_texture);
-}
-
-uint32_t VisualServerRaster::texture_get_height(RID p_texture) const {
-
- return rasterizer->texture_get_height(p_texture);
-}
-
-void VisualServerRaster::texture_set_size_override(RID p_texture,int p_width, int p_height) {
-
- rasterizer->texture_set_size_override(p_texture,p_width,p_height);
-}
-
-bool VisualServerRaster::texture_can_stream(RID p_texture) const {
-
- return false;
-}
-
-void VisualServerRaster::texture_set_reload_hook(RID p_texture,ObjectID p_owner,const StringName& p_function) const {
-
- rasterizer->texture_set_reload_hook(p_texture,p_owner,p_function);
-}
-
-void VisualServerRaster::texture_set_path(RID p_texture,const String& p_path) {
-
- rasterizer->texture_set_path(p_texture,p_path);
-}
-
-String VisualServerRaster::texture_get_path(RID p_texture) const{
-
- return rasterizer->texture_get_path(p_texture);
-}
-
-void VisualServerRaster::texture_debug_usage(List<TextureInfo> *r_info){
-
- rasterizer->texture_debug_usage(r_info);
-}
-
-void VisualServerRaster::texture_set_shrink_all_x2_on_set_data(bool p_enable) {
-
- rasterizer->texture_set_shrink_all_x2_on_set_data(p_enable);
-}
-
-/* SHADER API */
-
-RID VisualServerRaster::shader_create(ShaderMode p_mode) {
-
- return rasterizer->shader_create(p_mode);
-}
-
-void VisualServerRaster::shader_set_mode(RID p_shader,ShaderMode p_mode){
-
- VS_CHANGED;
- rasterizer->shader_set_mode(p_shader,p_mode);
-}
-VisualServer::ShaderMode VisualServerRaster::shader_get_mode(RID p_shader) const{
-
- return rasterizer->shader_get_mode(p_shader);
-}
-
-
-void VisualServerRaster::shader_set_code(RID p_shader, const String& p_vertex, const String& p_fragment,const String& p_light,int p_vertex_ofs,int p_fragment_ofs,int p_light_ofs) {
-
- VS_CHANGED;
- rasterizer->shader_set_code(p_shader,p_vertex,p_fragment,p_light,p_vertex_ofs,p_fragment_ofs,p_light_ofs);
-}
-
-String VisualServerRaster::shader_get_vertex_code(RID p_shader) const{
-
- return rasterizer->shader_get_vertex_code(p_shader);
-}
-
-String VisualServerRaster::shader_get_fragment_code(RID p_shader) const{
-
- return rasterizer->shader_get_fragment_code(p_shader);
-}
-
-String VisualServerRaster::shader_get_light_code(RID p_shader) const{
-
- return rasterizer->shader_get_light_code(p_shader);
-}
-
-void VisualServerRaster::shader_get_param_list(RID p_shader, List<PropertyInfo> *p_param_list) const {
-
- return rasterizer->shader_get_param_list(p_shader,p_param_list);
-}
-
-
-void VisualServerRaster::shader_set_default_texture_param(RID p_shader, const StringName& p_name, RID p_texture) {
-
- rasterizer->shader_set_default_texture_param(p_shader,p_name,p_texture);
-}
-
-RID VisualServerRaster::shader_get_default_texture_param(RID p_shader, const StringName& p_name) const{
-
- return rasterizer->shader_get_default_texture_param(p_shader,p_name);
-}
-
-
-/* Material */
-
-RID VisualServerRaster::material_create() {
-
- return rasterizer->material_create();
-}
-
-void VisualServerRaster::material_set_shader(RID p_material, RID p_shader) {
-
- VS_CHANGED;
- rasterizer->material_set_shader(p_material, p_shader );
-}
-
-RID VisualServerRaster::material_get_shader(RID p_material) const {
-
- return rasterizer->material_get_shader(p_material);
-}
-
-void VisualServerRaster::material_set_param(RID p_material, const StringName& p_param, const Variant& p_value) {
-
- VS_CHANGED;
- rasterizer->material_set_param(p_material, p_param,p_value );
-}
-
-Variant VisualServerRaster::material_get_param(RID p_material, const StringName& p_param) const {
-
- return rasterizer->material_get_param(p_material,p_param);
-}
-
-void VisualServerRaster::material_set_flag(RID p_material, MaterialFlag p_flag,bool p_enabled) {
- VS_CHANGED;
- rasterizer->material_set_flag(p_material,p_flag,p_enabled);
-}
-
-void VisualServerRaster::material_set_depth_draw_mode(RID p_material, MaterialDepthDrawMode p_mode) {
-
- VS_CHANGED;
- rasterizer->material_set_depth_draw_mode(p_material,p_mode);
-
-}
-
-VS::MaterialDepthDrawMode VisualServerRaster::material_get_depth_draw_mode(RID p_material) const {
-
- return rasterizer->material_get_depth_draw_mode(p_material);
-}
-
-
-bool VisualServerRaster::material_get_flag(RID p_material,MaterialFlag p_flag) const {
-
- return rasterizer->material_get_flag(p_material,p_flag);
-}
-
-void VisualServerRaster::material_set_blend_mode(RID p_material,MaterialBlendMode p_mode) {
- VS_CHANGED;
- rasterizer->material_set_blend_mode(p_material,p_mode);
-}
-VS::MaterialBlendMode VisualServerRaster::material_get_blend_mode(RID p_material) const {
-
- return rasterizer->material_get_blend_mode(p_material);
-}
-
-void VisualServerRaster::material_set_line_width(RID p_material,float p_line_width) {
- VS_CHANGED;
- rasterizer->material_set_line_width(p_material,p_line_width);
-}
-float VisualServerRaster::material_get_line_width(RID p_material) const {
-
- return rasterizer->material_get_line_width(p_material);
-}
-
-/* FIXED MATERIAL */
-
-RID VisualServerRaster::fixed_material_create() {
-
- return rasterizer->fixed_material_create();
-}
-
-void VisualServerRaster::fixed_material_set_flag(RID p_material, SpatialMaterialFlags p_flag, bool p_enabled) {
-
- rasterizer->fixed_material_set_flag(p_material,p_flag,p_enabled);
-}
-
-bool VisualServerRaster::fixed_material_get_flag(RID p_material, SpatialMaterialFlags p_flag) const {
-
- return rasterizer->fixed_material_get_flag(p_material,p_flag);
-}
-
-void VisualServerRaster::fixed_material_set_param(RID p_material, SpatialMaterialParam p_parameter, const Variant& p_value) {
- VS_CHANGED;
- rasterizer->fixed_material_set_parameter(p_material,p_parameter,p_value);
-}
-
-Variant VisualServerRaster::fixed_material_get_param(RID p_material,SpatialMaterialParam p_parameter) const {
-
- return rasterizer->fixed_material_get_parameter(p_material,p_parameter);
-}
-
-
-void VisualServerRaster::fixed_material_set_texture(RID p_material,SpatialMaterialParam p_parameter, RID p_texture) {
- VS_CHANGED;
- rasterizer->fixed_material_set_texture(p_material,p_parameter,p_texture);
-}
-
-RID VisualServerRaster::fixed_material_get_texture(RID p_material,SpatialMaterialParam p_parameter) const {
-
- return rasterizer->fixed_material_get_texture(p_material,p_parameter);
-}
-
-
-
-
-void VisualServerRaster::fixed_material_set_texcoord_mode(RID p_material,SpatialMaterialParam p_parameter, SpatialMaterialTexCoordMode p_mode) {
- VS_CHANGED;
- rasterizer->fixed_material_set_texcoord_mode(p_material,p_parameter,p_mode);
-}
-
-VS::SpatialMaterialTexCoordMode VisualServerRaster::fixed_material_get_texcoord_mode(RID p_material,SpatialMaterialParam p_parameter) const {
-
- return rasterizer->fixed_material_get_texcoord_mode(p_material,p_parameter);
-}
-
-void VisualServerRaster::fixed_material_set_point_size(RID p_material,float p_size) {
- VS_CHANGED
-
- rasterizer->fixed_material_set_point_size(p_material,p_size);
-}
-
-float VisualServerRaster::fixed_material_get_point_size(RID p_material) const{
-
- return rasterizer->fixed_material_get_point_size(p_material);
-}
-
-
-void VisualServerRaster::fixed_material_set_uv_transform(RID p_material,const Transform& p_transform) {
- VS_CHANGED;
- rasterizer->fixed_material_set_uv_transform(p_material,p_transform);
-}
-
-Transform VisualServerRaster::fixed_material_get_uv_transform(RID p_material) const {
-
- return rasterizer->fixed_material_get_uv_transform(p_material);
-}
-
-void VisualServerRaster::fixed_material_set_light_shader(RID p_material,SpatialMaterialLightShader p_shader) {
-
- VS_CHANGED;
- rasterizer->fixed_material_set_light_shader(p_material,p_shader);
-
-}
-
-VisualServerRaster::SpatialMaterialLightShader VisualServerRaster::fixed_material_get_light_shader(RID p_material) const{
-
- return rasterizer->fixed_material_get_light_shader(p_material);
-}
-
-
-
-/* MESH API */
-
-RID VisualServerRaster::mesh_create() {
-
- return rasterizer->mesh_create();
-}
-
-void VisualServerRaster::mesh_set_morph_target_count(RID p_mesh,int p_amount) {
-
- rasterizer->mesh_set_morph_target_count(p_mesh,p_amount);
- int amount = rasterizer->mesh_get_morph_target_count(p_mesh);
-
-
- Map< RID, Set<RID> >::Element * E = instance_dependency_map.find( p_mesh );
-
- if (!E)
- return;
-
-
- Set<RID>::Element *I = E->get().front();
-
- while(I) {
-
- Instance *ins = instance_owner.get( I->get() );
- ins->data.morph_values.resize(amount);
- I = I->next();
- }
-}
-
-int VisualServerRaster::mesh_get_morph_target_count(RID p_mesh) const {
-
- return rasterizer->mesh_get_morph_target_count(p_mesh);
-}
-
-void VisualServerRaster::mesh_set_morph_target_mode(RID p_mesh,MorphTargetMode p_mode) {
-
- rasterizer->mesh_set_morph_target_mode(p_mesh,p_mode);
-}
-
-VisualServer::MorphTargetMode VisualServerRaster::mesh_get_morph_target_mode(RID p_mesh) const{
-
- return rasterizer->mesh_get_morph_target_mode(p_mesh);
-}
-
-void VisualServerRaster::mesh_add_custom_surface(RID p_mesh,const Variant& p_dat) {
-
-
-}
-
-
-void VisualServerRaster::mesh_add_surface(RID p_mesh,PrimitiveType p_primitive,const Array& p_arrays,const Array& p_blend_shapes,bool p_alpha_sort) {
-
- VS_CHANGED;
- _dependency_queue_update(p_mesh,true,true);
- rasterizer->mesh_add_surface(p_mesh,p_primitive,p_arrays,p_blend_shapes,p_alpha_sort);
-
-}
-
-Array VisualServerRaster::mesh_get_surface_arrays(RID p_mesh,int p_surface) const {
-
- return rasterizer->mesh_get_surface_arrays(p_mesh,p_surface);
-}
-Array VisualServerRaster::mesh_get_surface_morph_arrays(RID p_mesh,int p_surface) const {
-
- return rasterizer->mesh_get_surface_morph_arrays(p_mesh,p_surface);
-}
-
-
-
-
-void VisualServerRaster::mesh_surface_set_material(RID p_mesh, int p_surface, RID p_material,bool p_owned){
- VS_CHANGED;
- rasterizer->mesh_surface_set_material(p_mesh,p_surface,p_material,p_owned);
-}
-
-RID VisualServerRaster::mesh_surface_get_material(RID p_mesh,int p_surface) const {
-
- return rasterizer->mesh_surface_get_material(p_mesh,p_surface);
-
-}
-
-
-int VisualServerRaster::mesh_surface_get_array_len(RID p_mesh, int p_surface) const{
-
- return rasterizer->mesh_surface_get_array_len(p_mesh,p_surface);
-}
-
-int VisualServerRaster::mesh_surface_get_array_index_len(RID p_mesh, int p_surface) const{
-
-
- return rasterizer->mesh_surface_get_array_index_len(p_mesh,p_surface);
-}
-
-uint32_t VisualServerRaster::mesh_surface_get_format(RID p_mesh, int p_surface) const{
-
- return rasterizer->mesh_surface_get_format(p_mesh,p_surface);
-}
-
-VisualServer::PrimitiveType VisualServerRaster::mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const{
-
- return rasterizer->mesh_surface_get_primitive_type(p_mesh,p_surface);
-}
-
-
-void VisualServerRaster::mesh_remove_surface(RID p_mesh,int p_surface){
-
- rasterizer->mesh_remove_surface(p_mesh,p_surface);
- _dependency_queue_update(p_mesh,true,true);
-}
-
-int VisualServerRaster::mesh_get_surface_count(RID p_mesh) const{
-
- return rasterizer->mesh_get_surface_count(p_mesh);
-
-}
-
-
-void VisualServerRaster::mesh_set_custom_aabb(RID p_mesh,const AABB& p_aabb) {
-
- VS_CHANGED;
- _dependency_queue_update(p_mesh,true);
- rasterizer->mesh_set_custom_aabb(p_mesh,p_aabb);
-
-}
-
-AABB VisualServerRaster::mesh_get_custom_aabb(RID p_mesh) const {
-
- return rasterizer->mesh_get_custom_aabb(p_mesh);
-}
-
-void VisualServerRaster::mesh_clear(RID p_mesh) {
-
- ERR_FAIL_COND(!rasterizer->is_mesh(p_mesh));
- while(rasterizer->mesh_get_surface_count(p_mesh)) {
- rasterizer->mesh_remove_surface(p_mesh,0);
- }
-
- _dependency_queue_update(p_mesh,true,true);
-}
-
-
-/* MULTIMESH */
-
-RID VisualServerRaster::multimesh_create() {
-
- return rasterizer->multimesh_create();
-}
-
-void VisualServerRaster::multimesh_set_instance_count(RID p_multimesh,int p_count) {
- VS_CHANGED;
- rasterizer->multimesh_set_instance_count(p_multimesh,p_count);
-}
-
-int VisualServerRaster::multimesh_get_instance_count(RID p_multimesh) const {
-
- return rasterizer->multimesh_get_instance_count(p_multimesh);
-}
-
-void VisualServerRaster::multimesh_set_mesh(RID p_multimesh,RID p_mesh) {
- VS_CHANGED;
- rasterizer->multimesh_set_mesh(p_multimesh,p_mesh);
-
-}
-void VisualServerRaster::multimesh_set_aabb(RID p_multimesh,const AABB& p_aabb) {
- VS_CHANGED;
- rasterizer->multimesh_set_aabb(p_multimesh,p_aabb);
- _dependency_queue_update(p_multimesh,true);
-
-}
-
-void VisualServerRaster::multimesh_instance_set_transform(RID p_multimesh,int p_index,const Transform& p_transform) {
- VS_CHANGED;
- rasterizer->multimesh_instance_set_transform(p_multimesh,p_index,p_transform);
-
-}
-void VisualServerRaster::multimesh_instance_set_color(RID p_multimesh,int p_index,const Color& p_color) {
- VS_CHANGED;
- rasterizer->multimesh_instance_set_color(p_multimesh,p_index,p_color);
-
-}
-RID VisualServerRaster::multimesh_get_mesh(RID p_multimesh) const {
-
- return rasterizer->multimesh_get_mesh(p_multimesh);
-}
-AABB VisualServerRaster::multimesh_get_aabb(RID p_multimesh,const AABB& p_aabb) const {
-
-
- return rasterizer->multimesh_get_aabb(p_multimesh);
-}
-
-Transform VisualServerRaster::multimesh_instance_get_transform(RID p_multimesh,int p_index) const {
-
- return rasterizer->multimesh_instance_get_transform(p_multimesh,p_index);
-}
-Color VisualServerRaster::multimesh_instance_get_color(RID p_multimesh,int p_index) const {
-
- return rasterizer->multimesh_instance_get_color(p_multimesh,p_index);
-}
-
-void VisualServerRaster::multimesh_set_visible_instances(RID p_multimesh,int p_visible) {
-
- rasterizer->multimesh_set_visible_instances(p_multimesh,p_visible);
-
-}
-
-int VisualServerRaster::multimesh_get_visible_instances(RID p_multimesh) const {
-
- return rasterizer->multimesh_get_visible_instances(p_multimesh);
-}
-
-
-/* IMMEDIATE API */
-
-
-RID VisualServerRaster::immediate_create() {
-
- return rasterizer->immediate_create();
-}
-
-void VisualServerRaster::immediate_begin(RID p_immediate,PrimitiveType p_primitive,RID p_texture){
-
- rasterizer->immediate_begin(p_immediate,p_primitive,p_texture);
-}
-void VisualServerRaster::immediate_vertex(RID p_immediate,const Vector3& p_vertex){
-
- rasterizer->immediate_vertex(p_immediate,p_vertex);
-
-}
-void VisualServerRaster::immediate_normal(RID p_immediate,const Vector3& p_normal){
-
- rasterizer->immediate_normal(p_immediate,p_normal);
-
-}
-void VisualServerRaster::immediate_tangent(RID p_immediate,const Plane& p_tangent){
-
- rasterizer->immediate_tangent(p_immediate,p_tangent);
-
-}
-void VisualServerRaster::immediate_color(RID p_immediate,const Color& p_color){
-
- rasterizer->immediate_color(p_immediate,p_color);
-
-}
-void VisualServerRaster::immediate_uv(RID p_immediate,const Vector2& p_uv){
-
- rasterizer->immediate_uv(p_immediate,p_uv);
-
-}
-void VisualServerRaster::immediate_uv2(RID p_immediate,const Vector2& p_uv2){
-
- rasterizer->immediate_uv2(p_immediate,p_uv2);
-
-}
-void VisualServerRaster::immediate_end(RID p_immediate){
-
- VS_CHANGED;
- _dependency_queue_update(p_immediate,true);
- rasterizer->immediate_end(p_immediate);
-
-}
-void VisualServerRaster::immediate_clear(RID p_immediate){
-
- VS_CHANGED;
- _dependency_queue_update(p_immediate,true);
- rasterizer->immediate_clear(p_immediate);
-
-}
-
-void VisualServerRaster::immediate_set_material(RID p_immediate,RID p_material) {
-
- rasterizer->immediate_set_material(p_immediate,p_material);
-}
-
-RID VisualServerRaster::immediate_get_material(RID p_immediate) const {
-
- return rasterizer->immediate_get_material(p_immediate);
-}
-
-
-/* PARTICLES API */
-
-RID VisualServerRaster::particles_create() {
-
- return rasterizer->particles_create();
-}
-
-void VisualServerRaster::particles_set_amount(RID p_particles, int p_amount) {
- VS_CHANGED;
- rasterizer->particles_set_amount(p_particles,p_amount);
-}
-
-int VisualServerRaster::particles_get_amount(RID p_particles) const {
-
- return rasterizer->particles_get_amount(p_particles);
-}
-
-void VisualServerRaster::particles_set_emitting(RID p_particles, bool p_emitting) {
- VS_CHANGED;
- rasterizer->particles_set_emitting(p_particles,p_emitting);
-}
-bool VisualServerRaster::particles_is_emitting(RID p_particles) const {
-
- return rasterizer->particles_is_emitting(p_particles);
-}
-
-void VisualServerRaster::particles_set_visibility_aabb(RID p_particles, const AABB& p_visibility) {
- VS_CHANGED;
- rasterizer->particles_set_visibility_aabb(p_particles, p_visibility);
-}
-AABB VisualServerRaster::particles_get_visibility_aabb(RID p_particles) const {
-
- return rasterizer->particles_get_visibility_aabb(p_particles);
-}
-
-void VisualServerRaster::particles_set_emission_half_extents(RID p_particles, const Vector3& p_half_extents) {
- VS_CHANGED;
- rasterizer->particles_set_emission_half_extents(p_particles,p_half_extents);
-}
-Vector3 VisualServerRaster::particles_get_emission_half_extents(RID p_particles) const {
-
- return rasterizer->particles_get_emission_half_extents(p_particles);
-}
-
-void VisualServerRaster::particles_set_emission_base_velocity(RID p_particles, const Vector3& p_base_velocity) {
- VS_CHANGED;
- rasterizer->particles_set_emission_base_velocity(p_particles,p_base_velocity);
-}
-Vector3 VisualServerRaster::particles_get_emission_base_velocity(RID p_particles) const {
-
- return rasterizer->particles_get_emission_base_velocity(p_particles);
-}
-
-void VisualServerRaster::particles_set_emission_points(RID p_particles, const PoolVector<Vector3>& p_points) {
-
- VS_CHANGED;
- rasterizer->particles_set_emission_points(p_particles,p_points);
-}
-
-PoolVector<Vector3> VisualServerRaster::particles_get_emission_points(RID p_particles) const {
-
- return rasterizer->particles_get_emission_points(p_particles);
-}
-
-void VisualServerRaster::particles_set_gravity_normal(RID p_particles, const Vector3& p_normal) {
- VS_CHANGED;
- rasterizer->particles_set_gravity_normal(p_particles,p_normal);
-}
-Vector3 VisualServerRaster::particles_get_gravity_normal(RID p_particles) const {
-
- return rasterizer->particles_get_gravity_normal(p_particles);
-}
-
-void VisualServerRaster::particles_set_variable(RID p_particles, ParticleVariable p_variable,float p_value) {
- VS_CHANGED;
- rasterizer->particles_set_variable(p_particles,p_variable,p_value);
-}
-float VisualServerRaster::particles_get_variable(RID p_particles, ParticleVariable p_variable) const {
-
- return rasterizer->particles_get_variable(p_particles,p_variable);
-}
-
-void VisualServerRaster::particles_set_randomness(RID p_particles, ParticleVariable p_variable,float p_randomness) {
- VS_CHANGED;
- rasterizer->particles_set_randomness(p_particles,p_variable,p_randomness);
-}
-float VisualServerRaster::particles_get_randomness(RID p_particles, ParticleVariable p_variable) const {
-
- return rasterizer->particles_get_randomness(p_particles,p_variable);
-}
-
-void VisualServerRaster::particles_set_color_phases(RID p_particles, int p_phases) {
- VS_CHANGED;
- rasterizer->particles_set_color_phases(p_particles,p_phases);
-}
-int VisualServerRaster::particles_get_color_phases(RID p_particles) const {
-
- return rasterizer->particles_get_color_phases(p_particles);
-}
-
-void VisualServerRaster::particles_set_color_phase_pos(RID p_particles, int p_phase, float p_pos) {
- VS_CHANGED;
- rasterizer->particles_set_color_phase_pos(p_particles,p_phase,p_pos);
-}
-float VisualServerRaster::particles_get_color_phase_pos(RID p_particles, int p_phase) const {
-
- return rasterizer->particles_get_color_phase_pos(p_particles,p_phase);
-}
-
-void VisualServerRaster::particles_set_attractors(RID p_particles, int p_attractors) {
- VS_CHANGED;
- rasterizer->particles_set_attractors(p_particles,p_attractors);
-}
-int VisualServerRaster::particles_get_attractors(RID p_particles) const {
-
- return rasterizer->particles_get_attractors(p_particles);
-}
-
-void VisualServerRaster::particles_set_attractor_pos(RID p_particles, int p_attractor, const Vector3& p_pos) {
- VS_CHANGED;
- rasterizer->particles_set_attractor_pos(p_particles,p_attractor,p_pos);
-}
-Vector3 VisualServerRaster::particles_get_attractor_pos(RID p_particles,int p_attractor) const {
-
- return rasterizer->particles_get_attractor_pos(p_particles,p_attractor);
-}
-
-void VisualServerRaster::particles_set_attractor_strength(RID p_particles, int p_attractor, float p_force) {
- VS_CHANGED;
- rasterizer->particles_set_attractor_strength(p_particles,p_attractor,p_force);
-}
-
-float VisualServerRaster::particles_get_attractor_strength(RID p_particles,int p_attractor) const {
-
- return rasterizer->particles_get_attractor_strength(p_particles,p_attractor);
-}
-
-void VisualServerRaster::particles_set_color_phase_color(RID p_particles, int p_phase, const Color& p_color) {
- VS_CHANGED;
- rasterizer->particles_set_color_phase_color(p_particles,p_phase,p_color);
-}
-Color VisualServerRaster::particles_get_color_phase_color(RID p_particles, int p_phase) const {
-
- return rasterizer->particles_get_color_phase_color(p_particles,p_phase);
-}
-
-void VisualServerRaster::particles_set_material(RID p_particles, RID p_material,bool p_owned) {
- VS_CHANGED;
- rasterizer->particles_set_material(p_particles,p_material,p_owned);
-}
-RID VisualServerRaster::particles_get_material(RID p_particles) const {
-
- return rasterizer->particles_get_material(p_particles);
-}
-
-
-void VisualServerRaster::particles_set_height_from_velocity(RID p_particles, bool p_enable) {
-
- VS_CHANGED;
- rasterizer->particles_set_height_from_velocity(p_particles,p_enable);
-
-}
-
-bool VisualServerRaster::particles_has_height_from_velocity(RID p_particles) const {
-
- return rasterizer->particles_has_height_from_velocity(p_particles);
-}
-
-void VisualServerRaster::particles_set_use_local_coordinates(RID p_particles, bool p_enable) {
-
- rasterizer->particles_set_use_local_coordinates(p_particles,p_enable);
-}
-
-bool VisualServerRaster::particles_is_using_local_coordinates(RID p_particles) const {
-
- return rasterizer->particles_is_using_local_coordinates(p_particles);
-}
-
-
-/* Light API */
-
-RID VisualServerRaster::light_create(LightType p_type) {
-
- return rasterizer->light_create(p_type);
-}
-VisualServer::LightType VisualServerRaster::light_get_type(RID p_light) const {
-
- return rasterizer->light_get_type(p_light);
-}
-
-void VisualServerRaster::light_set_color(RID p_light,LightColor p_type, const Color& p_color) {
- VS_CHANGED;
- rasterizer->light_set_color(p_light,p_type,p_color);
-
-}
-Color VisualServerRaster::light_get_color(RID p_light,LightColor p_type) const {
-
- return rasterizer->light_get_color(p_light,p_type);
-
-}
-
-
-void VisualServerRaster::light_set_shadow(RID p_light,bool p_enabled) {
- VS_CHANGED;
- rasterizer->light_set_shadow(p_light,p_enabled);
-}
-
-bool VisualServerRaster::light_has_shadow(RID p_light) const {
-
- return rasterizer->light_has_shadow(p_light);
-}
-
-
-
-void VisualServerRaster::light_set_volumetric(RID p_light,bool p_enabled) {
- VS_CHANGED;
- rasterizer->light_set_volumetric(p_light,p_enabled);
-}
-
-bool VisualServerRaster::light_is_volumetric(RID p_light) const {
-
- return rasterizer->light_is_volumetric(p_light);
-}
-
-void VisualServerRaster::light_set_projector(RID p_light,RID p_texture) {
- VS_CHANGED;
- rasterizer->light_set_projector(p_light,p_texture);
-}
-
-RID VisualServerRaster::light_get_projector(RID p_light) const {
-
- return rasterizer->light_get_projector(p_light);
-}
-
-void VisualServerRaster::light_set_param(RID p_light, LightParam p_var, float p_value) {
- VS_CHANGED;
- rasterizer->light_set_var(p_light,p_var,p_value);
- _dependency_queue_update(p_light,true);
-
-}
-
-float VisualServerRaster::light_get_param(RID p_light, LightParam p_var) const {
-
-
- return rasterizer->light_get_var(p_light,p_var);
-}
-
-void VisualServerRaster::light_set_operator(RID p_light,LightOp p_op) {
- VS_CHANGED;
- rasterizer->light_set_operator(p_light,p_op);
-}
-
-VisualServerRaster::LightOp VisualServerRaster::light_get_operator(RID p_light) const {
-
- return rasterizer->light_get_operator(p_light);
-}
-
-void VisualServerRaster::light_omni_set_shadow_mode(RID p_light,LightOmniShadowMode p_mode) {
- VS_CHANGED;
- rasterizer->light_omni_set_shadow_mode(p_light,p_mode);
-}
-
-VisualServerRaster::LightOmniShadowMode VisualServerRaster::light_omni_get_shadow_mode(RID p_light) const {
-
- return rasterizer->light_omni_get_shadow_mode(p_light);
-}
-
-void VisualServerRaster::light_directional_set_shadow_mode(RID p_light,LightDirectionalShadowMode p_mode){
- VS_CHANGED;
- rasterizer->light_directional_set_shadow_mode(p_light,p_mode);
-}
-
-VS::LightDirectionalShadowMode VisualServerRaster::light_directional_get_shadow_mode(RID p_light) const{
-
- return rasterizer->light_directional_get_shadow_mode(p_light);
-}
-
-void VisualServerRaster::light_directional_set_shadow_param(RID p_light,LightDirectionalShadowParam p_param, float p_value) {
- VS_CHANGED;
- rasterizer->light_directional_set_shadow_param(p_light,p_param,p_value);
-}
-
-float VisualServerRaster::light_directional_get_shadow_param(RID p_light,LightDirectionalShadowParam p_param) const {
-
- return rasterizer->light_directional_get_shadow_param(p_light,p_param);
-}
-
-
-RID VisualServerRaster::skeleton_create() {
-
- return rasterizer->skeleton_create();
-}
-
-void VisualServerRaster::skeleton_resize(RID p_skeleton,int p_bones) {
- VS_CHANGED;
- rasterizer->skeleton_resize(p_skeleton,p_bones);
-}
-
-int VisualServerRaster::skeleton_get_bone_count(RID p_skeleton) const {
-
- return rasterizer->skeleton_get_bone_count(p_skeleton);
-}
-
-void VisualServerRaster::skeleton_bone_set_transform(RID p_skeleton,int p_bone, const Transform& p_transform) {
- VS_CHANGED;
- rasterizer->skeleton_bone_set_transform(p_skeleton,p_bone,p_transform);
-
- Map< RID, Set<Instance*> >::Element *E=skeleton_dependency_map.find(p_skeleton);
-
- if (E) {
- //detach skeletons
- for (Set<Instance*>::Element *F=E->get().front();F;F=F->next()) {
-
- _instance_queue_update( F->get() , true);
- }
- }
-}
-
-Transform VisualServerRaster::skeleton_bone_get_transform(RID p_skeleton,int p_bone) {
-
-
- return rasterizer->skeleton_bone_get_transform(p_skeleton,p_bone);
-
-}
-
-
-/* VISIBILITY API */
-
-/* ROOM API */
-
-RID VisualServerRaster::room_create() {
-
- Room *room = memnew( Room );
- ERR_FAIL_COND_V(!room,RID());
- return room_owner.make_rid( room );
-
-}
-
-void VisualServerRaster::room_set_bounds(RID p_room, const BSP_Tree& p_bounds) {
- VS_CHANGED;
- Room *room = room_owner.get(p_room);
- ERR_FAIL_COND(!room);
- room->bounds=p_bounds;
- _dependency_queue_update(p_room,true);
-
-}
-
-BSP_Tree VisualServerRaster::room_get_bounds(RID p_room) const {
-
- Room *room = room_owner.get(p_room);
- ERR_FAIL_COND_V(!room, BSP_Tree());
- return room->bounds;
-
-}
-
-/* PORTAL API */
-
-RID VisualServerRaster::portal_create() {
- VS_CHANGED;
- Portal *portal = memnew( Portal );
- ERR_FAIL_COND_V(!portal,RID());
- return portal_owner.make_rid( portal );
-
-
-}
-
-
-void VisualServerRaster::portal_set_shape(RID p_portal, const Vector<Point2>& p_shape) {
- VS_CHANGED;
- Portal *portal = portal_owner.get(p_portal);
- ERR_FAIL_COND(!portal);
- portal->shape=p_shape;
-
- portal->bounds=Rect2();
-
- for(int i=0;i<p_shape.size();i++) {
-
- if (i==0)
- portal->bounds.pos=p_shape[i];
- else
- portal->bounds.expand_to(p_shape[i]);
- }
-
- _dependency_queue_update(p_portal,true);
-}
-
-
-Vector<Point2> VisualServerRaster::portal_get_shape(RID p_portal) const {
-
- Portal *portal = portal_owner.get(p_portal);
- ERR_FAIL_COND_V(!portal, Vector<Point2>());
- return portal->shape;
-
-
-}
-
-void VisualServerRaster::portal_set_enabled(RID p_portal, bool p_enabled) {
- VS_CHANGED;
- Portal *portal = portal_owner.get(p_portal);
- ERR_FAIL_COND(!portal);
- portal->enabled=p_enabled;
-
-}
-
-bool VisualServerRaster::portal_is_enabled(RID p_portal) const {
-
- Portal *portal = portal_owner.get(p_portal);
- ERR_FAIL_COND_V(!portal, false);
- return portal->enabled;
-
-}
-void VisualServerRaster::portal_set_disable_distance(RID p_portal, float p_distance) {
- VS_CHANGED;
- Portal *portal = portal_owner.get(p_portal);
- ERR_FAIL_COND(!portal);
- portal->disable_distance=p_distance;
-
-}
-float VisualServerRaster::portal_get_disable_distance(RID p_portal) const {
-
- Portal *portal = portal_owner.get(p_portal);
- ERR_FAIL_COND_V(!portal, -1);
- return portal->disable_distance;
-
-}
-void VisualServerRaster::portal_set_disabled_color(RID p_portal, const Color& p_color) {
- VS_CHANGED;
- Portal *portal = portal_owner.get(p_portal);
- ERR_FAIL_COND(!portal);
- portal->disable_color=p_color;
-
-}
-Color VisualServerRaster::portal_get_disabled_color(RID p_portal) const {
-
- Portal *portal = portal_owner.get(p_portal);
- ERR_FAIL_COND_V(!portal, Color());
- return portal->disable_color;
-}
-
-void VisualServerRaster::portal_set_connect_range(RID p_portal, float p_range) {
- VS_CHANGED;
- Portal *portal = portal_owner.get(p_portal);
- ERR_FAIL_COND(!portal);
- portal->connect_range=p_range;
- _dependency_queue_update(p_portal,true);
-}
-
-float VisualServerRaster::portal_get_connect_range(RID p_portal) const {
-
- Portal *portal = portal_owner.get(p_portal);
- ERR_FAIL_COND_V(!portal,0);
- return portal->connect_range;
-}
-
-
-RID VisualServerRaster::baked_light_create() {
-
- BakedLight *baked_light = memnew( BakedLight );
- ERR_FAIL_COND_V(!baked_light,RID());
- baked_light->data.mode=BAKED_LIGHT_OCTREE;
-
- baked_light->data.octree_lattice_size=0;
- baked_light->data.octree_lattice_divide=0;
- baked_light->data.octree_steps=1;
- baked_light->data.lightmap_multiplier=1.0;
- baked_light->data.realtime_color_enabled=false;
- baked_light->data.realtime_color=Color(1.0, 1.0, 1.0);
- baked_light->data.realtime_energy = 1.0;
-
- return baked_light_owner.make_rid( baked_light );
-
-}
-
-void VisualServerRaster::baked_light_set_mode(RID p_baked_light,BakedLightMode p_mode){
-
- VS_CHANGED;
- BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND(!baked_light);
- baked_light->data.mode=p_mode;
- baked_light->data.color_multiplier=1.0;
- _dependency_queue_update(p_baked_light,true);
-
-
-}
-
-VisualServer::BakedLightMode VisualServerRaster::baked_light_get_mode(RID p_baked_light) const{
-
- const BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND_V(!baked_light,BAKED_LIGHT_OCTREE);
- return baked_light->data.mode;
-
-}
-
-void VisualServerRaster::baked_light_set_lightmap_multiplier(RID p_baked_light,float p_multiplier) {
-
- VS_CHANGED;
- BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND(!baked_light);
-
- baked_light->data.lightmap_multiplier=p_multiplier;
-
-}
-
-float VisualServerRaster::baked_light_get_lightmap_multiplier(RID p_baked_light) const{
-
- const BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND_V(!baked_light,0);
-
- return baked_light->data.lightmap_multiplier;
-
-}
-
-
-void VisualServerRaster::baked_light_set_octree(RID p_baked_light,const PoolVector<uint8_t> p_octree){
-
- VS_CHANGED;
- BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND(!baked_light);
-
- if (p_octree.size()==0) {
- if (baked_light->data.octree_texture.is_valid())
- rasterizer->free(baked_light->data.octree_texture);
- baked_light->data.octree_texture;
- baked_light->octree_aabb=AABB();
- baked_light->octree_tex_size=Size2();
- } else {
-
- int tex_w;
- int tex_h;
- int light_tex_w;
- int light_tex_h;
- bool is16;
- bool has_light_tex=false;
- {
-
- PoolVector<uint8_t>::Read r=p_octree.read();
- tex_w = decode_uint32(&r[0]);
- tex_h = decode_uint32(&r[4]);
- print_line("TEX W: "+itos(tex_w)+" TEX H:"+itos(tex_h)+" LEN: "+itos(p_octree.size()));
- is16=decode_uint32(&r[8]);
- baked_light->data.octree_lattice_size=decode_float(&r[12]);
- baked_light->data.octree_lattice_divide=tex_w/4.0;
- print_line("LATTICE SIZE: "+rtos(baked_light->data.octree_lattice_size));
- print_line("LATTICE DIVIDE: "+rtos(baked_light->data.octree_lattice_divide));
- baked_light->data.octree_steps=decode_uint32(&r[16]);
- baked_light->data.octree_tex_pixel_size.x=1.0/tex_w;
- baked_light->data.octree_tex_pixel_size.y=1.0/tex_h;
-
- baked_light->data.texture_multiplier=decode_uint32(&r[20]);
- light_tex_w=decode_uint16(&r[24]);
- light_tex_h=decode_uint16(&r[26]);
- print_line("ltexw "+itos(light_tex_w));
- print_line("ltexh "+itos(light_tex_h));
-
- if (light_tex_w>0 && light_tex_h>0) {
- baked_light->data.light_tex_pixel_size.x=1.0/light_tex_w;
- baked_light->data.light_tex_pixel_size.y=1.0/light_tex_h;
- has_light_tex=true;
- } else {
- baked_light->data.light_tex_pixel_size=baked_light->data.octree_tex_pixel_size;
-
- }
-
-
-
- baked_light->octree_aabb.pos.x=decode_float(&r[32]);
- baked_light->octree_aabb.pos.y=decode_float(&r[36]);
- baked_light->octree_aabb.pos.z=decode_float(&r[40]);
- baked_light->octree_aabb.size.x=decode_float(&r[44]);
- baked_light->octree_aabb.size.y=decode_float(&r[48]);
- baked_light->octree_aabb.size.z=decode_float(&r[52]);
-
-
- }
-
- if (baked_light->data.octree_texture.is_valid()) {
- if (tex_w!=baked_light->octree_tex_size.x || tex_h!=baked_light->octree_tex_size.y) {
-
- rasterizer->free(baked_light->data.octree_texture);
- baked_light->data.octree_texture;
- baked_light->octree_tex_size.x=0;
- baked_light->octree_tex_size.y=0;
- }
- }
-
- if (baked_light->data.light_texture.is_valid()) {
- if (!has_light_tex || light_tex_w!=baked_light->light_tex_size.x || light_tex_h!=baked_light->light_tex_size.y) {
- rasterizer->free(baked_light->data.light_texture);
- baked_light->data.light_texture;
- baked_light->light_tex_size.x=0;
- baked_light->light_tex_size.y=0;
- }
- }
-
- if (!baked_light->data.octree_texture.is_valid()) {
- baked_light->data.octree_texture=rasterizer->texture_create();
- rasterizer->texture_allocate(baked_light->data.octree_texture,tex_w,tex_h,Image::FORMAT_RGBA8,TEXTURE_FLAG_FILTER);
- baked_light->octree_tex_size.x=tex_w;
- baked_light->octree_tex_size.y=tex_h;
- }
-
- if (!baked_light->data.light_texture.is_valid() && has_light_tex) {
- baked_light->data.light_texture=rasterizer->texture_create();
- rasterizer->texture_allocate(baked_light->data.light_texture,light_tex_w,light_tex_h,Image::FORMAT_RGBA8,TEXTURE_FLAG_FILTER);
- baked_light->light_tex_size.x=light_tex_w;
- baked_light->light_tex_size.y=light_tex_h;
-
- }
-
- Image img(tex_w,tex_h,0,Image::FORMAT_RGBA8,p_octree);
- rasterizer->texture_set_data(baked_light->data.octree_texture,img);
-
- }
-
-
- _dependency_queue_update(p_baked_light,true);
-
-}
-
-
-PoolVector<uint8_t> VisualServerRaster::baked_light_get_octree(RID p_baked_light) const{
-
-
- BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND_V(!baked_light,PoolVector<uint8_t>());
-
- if (rasterizer->is_texture(baked_light->data.octree_texture)) {
-
- Image img = rasterizer->texture_get_data(baked_light->data.octree_texture);
- return img.get_data();
- } else {
- return PoolVector<uint8_t>();
- }
-}
-
-void VisualServerRaster::baked_light_set_light(RID p_baked_light,const PoolVector<uint8_t> p_light) {
-
- VS_CHANGED;
- BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND(!baked_light);
- ERR_FAIL_COND(p_light.size()==0);
-
- int tex_w=baked_light->light_tex_size.x;
- int tex_h=baked_light->light_tex_size.y;
-
- ERR_FAIL_COND(tex_w==0 && tex_h==0);
- ERR_FAIL_COND(!baked_light->data.light_texture.is_valid());
-
-
-
- print_line("w: "+itos(tex_w)+" h: "+itos(tex_h)+" lightsize: "+itos(p_light.size()));
-
- Image img(tex_w,tex_h,0,Image::FORMAT_RGBA8,p_light);
- rasterizer->texture_set_data(baked_light->data.light_texture,img);
-
-
-
-}
-
-PoolVector<uint8_t> VisualServerRaster::baked_light_get_light(RID p_baked_light) const{
-
- BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND_V(!baked_light,PoolVector<uint8_t>());
-
- if (rasterizer->is_texture(baked_light->data.light_texture)) {
-
- Image img = rasterizer->texture_get_data(baked_light->data.light_texture);
- return img.get_data();
- } else {
- return PoolVector<uint8_t>();
- }
-}
-
-
-
-void VisualServerRaster::baked_light_set_sampler_octree(RID p_baked_light, const PoolVector<int> &p_sampler) {
-
- BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND(!baked_light);
-
- baked_light->sampler=p_sampler;
-
-
-
-}
-
-PoolVector<int> VisualServerRaster::baked_light_get_sampler_octree(RID p_baked_light) const {
-
- BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND_V(!baked_light,PoolVector<int>());
-
- return baked_light->sampler;
-
-}
-
-
-void VisualServerRaster::baked_light_add_lightmap(RID p_baked_light,const RID p_texture,int p_id){
-
- VS_CHANGED;
- BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND(!baked_light);
- baked_light->data.lightmaps.insert(p_id,p_texture);
-
-}
-void VisualServerRaster::baked_light_clear_lightmaps(RID p_baked_light){
-
- VS_CHANGED;
- BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND(!baked_light);
- baked_light->data.lightmaps.clear();
-
-}
-
-void VisualServerRaster::baked_light_set_realtime_color_enabled(RID p_baked_light, const bool p_enabled) {
-
- VS_CHANGED;
- BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND(!baked_light);
-
- baked_light->data.realtime_color_enabled = p_enabled;
-
-}
-
-bool VisualServerRaster::baked_light_get_realtime_color_enabled(RID p_baked_light) const{
-
- const BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND_V(!baked_light, false);
-
- return baked_light->data.realtime_color_enabled;
-
-}
-
-void VisualServerRaster::baked_light_set_realtime_color(RID p_baked_light, const Color& p_color) {
-
- VS_CHANGED;
- BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND(!baked_light);
-
- baked_light->data.realtime_color = p_color;
-
-}
-
-Color VisualServerRaster::baked_light_get_realtime_color(RID p_baked_light) const{
-
- const BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND_V(!baked_light, Color(1.0, 1.0, 1.0));
-
- return baked_light->data.realtime_color;
-
-}
-
-void VisualServerRaster::baked_light_set_realtime_energy(RID p_baked_light, const float p_energy) {
-
- VS_CHANGED;
- BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND(!baked_light);
-
- baked_light->data.realtime_energy = p_energy;
-
-}
-
-float VisualServerRaster::baked_light_get_realtime_energy(RID p_baked_light) const{
-
- const BakedLight *baked_light = baked_light_owner.get(p_baked_light);
- ERR_FAIL_COND_V(!baked_light, 1.0f);
-
- return baked_light->data.realtime_energy;
-
-}
-
-
-/* BAKED LIGHT SAMPLER */
-
-RID VisualServerRaster::baked_light_sampler_create() {
-
- BakedLightSampler * blsamp = memnew( BakedLightSampler );
- RID rid = baked_light_sampler_owner.make_rid(blsamp);
- _update_baked_light_sampler_dp_cache(blsamp);
- return rid;
-}
-
-void VisualServerRaster::baked_light_sampler_set_param(RID p_baked_light_sampler,BakedLightSamplerParam p_param,float p_value){
-
- VS_CHANGED;
- BakedLightSampler * blsamp = baked_light_sampler_owner.get(p_baked_light_sampler);
- ERR_FAIL_COND(!blsamp);
- ERR_FAIL_INDEX(p_param,BAKED_LIGHT_SAMPLER_MAX);
- blsamp->params[p_param]=p_value;
- _dependency_queue_update(p_baked_light_sampler,true);
-}
-
-float VisualServerRaster::baked_light_sampler_get_param(RID p_baked_light_sampler,BakedLightSamplerParam p_param) const{
-
-
- BakedLightSampler * blsamp = baked_light_sampler_owner.get(p_baked_light_sampler);
- ERR_FAIL_COND_V(!blsamp,0);
- ERR_FAIL_INDEX_V(p_param,BAKED_LIGHT_SAMPLER_MAX,0);
- return blsamp->params[p_param];
-}
-
-void VisualServerRaster::_update_baked_light_sampler_dp_cache(BakedLightSampler * blsamp) {
-
- int res = blsamp->resolution;
- blsamp->dp_cache.resize(res*res*2);
- Vector3 *dp_normals=blsamp->dp_cache.ptr();
-
- for(int p=0;p<2;p++) {
- float sign = p==0?1:-1;
- int ofs = res*res*p;
- for(int i=0;i<res;i++) {
- for(int j=0;j<res;j++) {
-
- Vector2 v(
- (i/float(res))*2.0-1.0,
- (j/float(res))*2.0-1.0
- );
-
- float l=v.length();
- if (l>1.0) {
- v/=l;
- l=1.0; //clamp to avoid imaginary
- }
- v*=(2*l)/(l*l+1); //inverse of the dual paraboloid function
- Vector3 n = Vector3(v.x,v.y,sign*sqrtf(MAX(1 - v.dot(v),0))); //reconstruction of z
- n.y*=sign;
- dp_normals[j*res+i+ofs]=n;
- }
- }
- }
-
-}
-
-void VisualServerRaster::baked_light_sampler_set_resolution(RID p_baked_light_sampler,int p_resolution){
-
- ERR_FAIL_COND(p_resolution<4 || p_resolution>64);
- VS_CHANGED;
- BakedLightSampler * blsamp = baked_light_sampler_owner.get(p_baked_light_sampler);
- ERR_FAIL_COND(!blsamp);
- blsamp->resolution=p_resolution;
- _update_baked_light_sampler_dp_cache(blsamp);
-
-}
-int VisualServerRaster::baked_light_sampler_get_resolution(RID p_baked_light_sampler) const{
-
- BakedLightSampler * blsamp = baked_light_sampler_owner.get(p_baked_light_sampler);
- ERR_FAIL_COND_V(!blsamp,0);
- return blsamp->resolution;
-}
-
-/* CAMERA API */
-
-RID VisualServerRaster::camera_create() {
-
- Camera * camera = memnew( Camera );
- return camera_owner.make_rid( camera );
-
-}
-
-void VisualServerRaster::camera_set_perspective(RID p_camera,float p_fovy_degrees, float p_z_near, float p_z_far) {
- VS_CHANGED
- Camera *camera = camera_owner.get( p_camera );
- ERR_FAIL_COND(!camera);
- camera->type=Camera::PERSPECTIVE;
- camera->fov=p_fovy_degrees;
- camera->znear=p_z_near;
- camera->zfar=p_z_far;
-
-}
-
-void VisualServerRaster::camera_set_orthogonal(RID p_camera,float p_size, float p_z_near, float p_z_far) {
- VS_CHANGED;
- Camera *camera = camera_owner.get( p_camera );
- ERR_FAIL_COND(!camera);
- camera->type=Camera::ORTHOGONAL;
- camera->size=p_size;
- camera->znear=p_z_near;
- camera->zfar=p_z_far;
-}
-
-void VisualServerRaster::camera_set_transform(RID p_camera,const Transform& p_transform) {
- VS_CHANGED;
- Camera *camera = camera_owner.get( p_camera );
- ERR_FAIL_COND(!camera);
- camera->transform=p_transform.orthonormalized();
-
-
-}
-
-void VisualServerRaster::camera_set_visible_layers(RID p_camera,uint32_t p_layers) {
-
- VS_CHANGED;
- Camera *camera = camera_owner.get( p_camera );
- ERR_FAIL_COND(!camera);
-
- camera->visible_layers=p_layers;
-
-}
-
-uint32_t VisualServerRaster::camera_get_visible_layers(RID p_camera) const{
-
- const Camera *camera = camera_owner.get( p_camera );
- ERR_FAIL_COND_V(!camera,0);
-
- return camera->visible_layers;
-}
-
-void VisualServerRaster::camera_set_environment(RID p_camera,RID p_env) {
-
- Camera *camera = camera_owner.get( p_camera );
- ERR_FAIL_COND(!camera);
- camera->env=p_env;
-
-}
-
-RID VisualServerRaster::camera_get_environment(RID p_camera) const {
-
- const Camera *camera = camera_owner.get( p_camera );
- ERR_FAIL_COND_V(!camera,RID());
- return camera->env;
-
-}
-
-void VisualServerRaster::camera_set_use_vertical_aspect(RID p_camera,bool p_enable) {
-
- Camera *camera = camera_owner.get( p_camera );
- ERR_FAIL_COND(!camera);
- camera->vaspect=p_enable;
-
-}
-bool VisualServerRaster::camera_is_using_vertical_aspect(RID p_camera,bool p_enable) const{
-
- const Camera *camera = camera_owner.get( p_camera );
- ERR_FAIL_COND_V(!camera,false);
- return camera->vaspect;
-
-}
-
-
-/* VIEWPORT API */
-
-
-RID VisualServerRaster::viewport_create() {
-
- Viewport *viewport = memnew( Viewport );
- RID rid = viewport_owner.make_rid( viewport );
- ERR_FAIL_COND_V( !rid.is_valid(), rid );
-
- viewport->self=rid;
- viewport->hide_scenario=false;
- viewport->hide_canvas=false;
- viewport->viewport_data=rasterizer->viewport_data_create();
-
- return rid;
-}
-
-void VisualServerRaster::viewport_attach_to_screen(RID p_viewport,int p_screen) {
-
- VS_CHANGED;
- Viewport *viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
-
- screen_viewports[p_viewport]=p_screen;
-}
-
-void VisualServerRaster::viewport_detach(RID p_viewport) {
-
- VS_CHANGED;
- Viewport *viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- ERR_FAIL_COND(!screen_viewports.has(p_viewport));
- screen_viewports.erase(p_viewport);
-
-}
-
-void VisualServerRaster::viewport_set_as_render_target(RID p_viewport,bool p_enable) {
-
- VS_CHANGED;
- Viewport *viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- if (viewport->render_target.is_valid()==p_enable)
- return;
- if (!p_enable) {
-
- rasterizer->free(viewport->render_target);
- viewport->render_target;
- viewport->render_target_texture;
- if (viewport->update_list.in_list())
- viewport_update_list.remove(&viewport->update_list);
-
- } else {
-
- viewport->render_target=rasterizer->render_target_create();
- rasterizer->render_target_set_size(viewport->render_target,viewport->rect.width,viewport->rect.height);
- viewport->render_target_texture=rasterizer->render_target_get_texture(viewport->render_target);
- if (viewport->render_target_update_mode!=RENDER_TARGET_UPDATE_DISABLED)
- viewport_update_list.add(&viewport->update_list);
- }
-
-}
-
-void VisualServerRaster::viewport_set_render_target_update_mode(RID p_viewport,RenderTargetUpdateMode p_mode){
-
- VS_CHANGED;
- Viewport *viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- if (viewport->render_target.is_valid() && viewport->update_list.in_list())
- viewport_update_list.remove(&viewport->update_list);
-
- viewport->render_target_update_mode=p_mode;
-
- if (viewport->render_target.is_valid() &&viewport->render_target_update_mode!=RENDER_TARGET_UPDATE_DISABLED)
- viewport_update_list.add(&viewport->update_list);
-
-}
-VisualServer::RenderTargetUpdateMode VisualServerRaster::viewport_get_render_target_update_mode(RID p_viewport) const{
-
- const Viewport *viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND_V(!viewport,RENDER_TARGET_UPDATE_DISABLED);
-
- return viewport->render_target_update_mode;
-}
-RID VisualServerRaster::viewport_get_render_target_texture(RID p_viewport) const{
-
- Viewport *viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND_V(!viewport,RID());
-
- return viewport->render_target_texture;
-
-}
-
-void VisualServerRaster::viewport_set_render_target_vflip(RID p_viewport,bool p_enable) {
-
- Viewport *viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- viewport->render_target_vflip=p_enable;
-
-}
-
-void VisualServerRaster::viewport_set_render_target_clear_on_new_frame(RID p_viewport,bool p_enable) {
-
- Viewport *viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- viewport->render_target_clear_on_new_frame=p_enable;
-
-}
-
-void VisualServerRaster::viewport_set_render_target_to_screen_rect(RID p_viewport,const Rect2& p_rect) {
-
- Viewport *viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- viewport->rt_to_screen_rect=p_rect;
-
-}
-
-bool VisualServerRaster::viewport_get_render_target_vflip(RID p_viewport) const{
-
- const Viewport *viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND_V(!viewport,false);
-
- return viewport->render_target_vflip;
-
-}
-
-bool VisualServerRaster::viewport_get_render_target_clear_on_new_frame(RID p_viewport) const{
-
- const Viewport *viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND_V(!viewport,false);
-
- return viewport->render_target_clear_on_new_frame;
-
-}
-
-void VisualServerRaster::viewport_render_target_clear(RID p_viewport) {
-
- Viewport *viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- viewport->render_target_clear=true;
-
-}
-
-void VisualServerRaster::viewport_queue_screen_capture(RID p_viewport) {
-
- VS_CHANGED;
- Viewport *viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
- viewport->queue_capture=true;
-
-}
-
-Image VisualServerRaster::viewport_get_screen_capture(RID p_viewport) const {
-
- Viewport *viewport = (Viewport*)viewport_owner.get( p_viewport );
- ERR_FAIL_COND_V(!viewport,Image());
-
- Image ret = viewport->capture;
- viewport->capture=Image();
- return ret;
-}
-
-void VisualServerRaster::viewport_set_rect(RID p_viewport,const ViewportRect& p_rect) {
- VS_CHANGED;
- Viewport *viewport=NULL;
-
- viewport = viewport_owner.get( p_viewport );
-
- ERR_FAIL_COND(!viewport);
-
- viewport->rect=p_rect;
- if (viewport->render_target.is_valid()) {
- rasterizer->render_target_set_size(viewport->render_target,viewport->rect.width,viewport->rect.height);
- }
-}
-
-
-VisualServer::ViewportRect VisualServerRaster::viewport_get_rect(RID p_viewport) const {
-
- const Viewport *viewport=NULL;
-
- viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND_V(!viewport, ViewportRect());
-
- return viewport->rect;
-}
-
-void VisualServerRaster::viewport_set_hide_scenario(RID p_viewport,bool p_hide) {
-
- VS_CHANGED;
-
- Viewport *viewport=NULL;
-
- viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- viewport->hide_scenario=p_hide;
-
-
-}
-
-void VisualServerRaster::viewport_set_hide_canvas(RID p_viewport,bool p_hide) {
-
- VS_CHANGED;
-
- Viewport *viewport=NULL;
-
- viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- viewport->hide_canvas=p_hide;
-
-
-}
-
-void VisualServerRaster::viewport_set_disable_environment(RID p_viewport,bool p_disable) {
-
- VS_CHANGED;
-
- Viewport *viewport=NULL;
- viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
- viewport->disable_environment=p_disable;
-
-}
-
-void VisualServerRaster::viewport_attach_camera(RID p_viewport,RID p_camera) {
- VS_CHANGED;
-
- Viewport *viewport=NULL;
- viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
-
-
-
- if (p_camera.is_valid()) {
-
- ERR_FAIL_COND(!camera_owner.owns(p_camera));
- // a camera
- viewport->camera=p_camera;
- } else {
- viewport->camera;
- }
-
-}
-
-void VisualServerRaster::viewport_set_scenario(RID p_viewport,RID p_scenario) {
-
- VS_CHANGED;
-
- Viewport *viewport=NULL;
- viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- if (p_scenario.is_valid()) {
-
- ERR_FAIL_COND(!scenario_owner.owns(p_scenario));
- // a camera
- viewport->scenario=p_scenario;
- } else {
- viewport->scenario;
- }
-
-}
-
-RID VisualServerRaster::viewport_get_attached_camera(RID p_viewport) const {
-
- const Viewport *viewport=NULL;
-
- viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND_V(!viewport, RID());
-
- return viewport->camera;
-}
-
-void VisualServerRaster::viewport_attach_canvas(RID p_viewport,RID p_canvas) {
- VS_CHANGED;
- Viewport *viewport=NULL;
-
- viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- Canvas *canvas = canvas_owner.get( p_canvas );
- ERR_FAIL_COND(!canvas);
-
- ERR_EXPLAIN("Canvas already attached.");
- ERR_FAIL_COND(viewport->canvas_map.has(p_canvas));
-
-
- Viewport::CanvasData cd;
- cd.canvas=canvas;
- cd.layer=0;
-
- viewport->canvas_map[p_canvas]=cd;
- canvas->viewports.insert(p_viewport);
-
-}
-
-
-void VisualServerRaster::viewport_set_canvas_transform(RID p_viewport,RID p_canvas,const Matrix32& p_transform) {
-
- VS_CHANGED;
- Viewport *viewport=NULL;
- viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- Map<RID,Viewport::CanvasData>::Element *E=viewport->canvas_map.find(p_canvas);
- if (!E) {
- ERR_EXPLAIN("Viewport does not contain the canvas");
- ERR_FAIL_COND(!E);
- }
-
- E->get().transform=p_transform;
-
-}
-
-Matrix32 VisualServerRaster::viewport_get_canvas_transform(RID p_viewport,RID p_canvas) const {
-
- Viewport *viewport=NULL;
- viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND_V(!viewport,Matrix32());
-
- Map<RID,Viewport::CanvasData>::Element *E=viewport->canvas_map.find(p_canvas);
- if (!E) {
- ERR_EXPLAIN("Viewport does not contain the canvas");
- ERR_FAIL_COND_V(!E,Matrix32());
- }
-
-
- return E->get().transform;
-}
-
-
-void VisualServerRaster::viewport_set_global_canvas_transform(RID p_viewport,const Matrix32& p_transform) {
-
- VS_CHANGED
- Viewport *viewport=NULL;
- viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- viewport->global_transform=p_transform;
-
-}
-
-Matrix32 VisualServerRaster::viewport_get_global_canvas_transform(RID p_viewport) const{
-
- Viewport *viewport=NULL;
- viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND_V(!viewport,Matrix32());
- return viewport->global_transform;
-}
-
-void VisualServerRaster::viewport_remove_canvas(RID p_viewport,RID p_canvas) {
-
- VS_CHANGED;
- Viewport *viewport=NULL;
-
- viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- Canvas *canvas = canvas_owner.get( p_canvas );
- ERR_FAIL_COND(!canvas);
-
-
- Map<RID,Viewport::CanvasData>::Element *E=viewport->canvas_map.find(p_canvas);
- if (!E) {
- ERR_EXPLAIN("Viewport does not contain the canvas");
- ERR_FAIL_COND(!E);
- }
-
-
- canvas->viewports.erase(p_viewport);
- viewport->canvas_map.erase(E);
-
-}
-
-
-void VisualServerRaster::viewport_set_canvas_layer(RID p_viewport,RID p_canvas,int p_layer) {
-
- VS_CHANGED;
- Viewport *viewport=NULL;
-
- viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- Map<RID,Viewport::CanvasData>::Element *E=viewport->canvas_map.find(p_canvas);
- if (!E) {
- ERR_EXPLAIN("Viewport does not contain the canvas");
- ERR_FAIL_COND(!E);
- }
-
- E->get().layer=p_layer;
-
-}
-
-void VisualServerRaster::viewport_set_transparent_background(RID p_viewport,bool p_enabled) {
-
- VS_CHANGED;
- Viewport *viewport=viewport_owner.get( p_viewport );
- ERR_FAIL_COND(!viewport);
-
- viewport->transparent_bg=p_enabled;
-}
-
-bool VisualServerRaster::viewport_has_transparent_background(RID p_viewport) const {
-
- Viewport *viewport=viewport_owner.get( p_viewport );
- ERR_FAIL_COND_V(!viewport, false);
-
- return viewport->transparent_bg;
-}
-
-
-RID VisualServerRaster::viewport_get_scenario(RID p_viewport) const {
-
- const Viewport *viewport=NULL;
-
- viewport = viewport_owner.get( p_viewport );
- ERR_FAIL_COND_V(!viewport, RID());
-
- return viewport->scenario;
-}
-
-
-RID VisualServerRaster::environment_create() {
-
- return rasterizer->environment_create();
-}
-
-void VisualServerRaster::environment_set_background(RID p_env,EnvironmentBG p_bg){
-
- rasterizer->environment_set_background(p_env,p_bg);
-}
-VisualServer::EnvironmentBG VisualServerRaster::environment_get_background(RID p_env) const{
-
- return rasterizer->environment_get_background(p_env);
-}
-
-void VisualServerRaster::environment_set_background_param(RID p_env,EnvironmentBGParam p_param, const Variant& p_value){
-
-
- rasterizer->environment_set_background_param(p_env,p_param,p_value);
-}
-Variant VisualServerRaster::environment_get_background_param(RID p_env,EnvironmentBGParam p_param) const{
-
- return rasterizer->environment_get_background_param(p_env,p_param);
-}
-
-void VisualServerRaster::environment_set_enable_fx(RID p_env,EnvironmentFx p_effect,bool p_enabled){
-
- rasterizer->environment_set_enable_fx(p_env,p_effect,p_enabled);
-}
-bool VisualServerRaster::environment_is_fx_enabled(RID p_env,EnvironmentFx p_effect) const{
-
- return rasterizer->environment_is_fx_enabled(p_env,p_effect);
-}
-
-
-void VisualServerRaster::environment_fx_set_param(RID p_env,EnvironmentFxParam p_param,const Variant& p_value){
-
- rasterizer->environment_fx_set_param(p_env,p_param,p_value);
-}
-Variant VisualServerRaster::environment_fx_get_param(RID p_env,EnvironmentFxParam p_param) const {
-
- return environment_fx_get_param(p_env,p_param);
-}
-
-
-
-/* SCENARIO API */
-
-void VisualServerRaster::_dependency_queue_update(RID p_rid,bool p_update_aabb,bool p_update_materials) {
-
- Map< RID, Set<RID> >::Element * E = instance_dependency_map.find( p_rid );
-
- if (!E)
- return;
-
-
- Set<RID>::Element *I = E->get().front();
-
- while(I) {
-
- Instance *ins = instance_owner.get( I->get() );
- _instance_queue_update( ins , p_update_aabb, p_update_materials );
-
- I = I->next();
- }
-
-}
-
-void VisualServerRaster::_instance_queue_update(Instance *p_instance,bool p_update_aabb,bool p_update_materials) {
-
- if (p_update_aabb)
- p_instance->update_aabb=true;
- if (p_update_materials)
- p_instance->update_materials=true;
-
- if (p_instance->update)
- return;
- p_instance->update_next=instance_update_list;
- instance_update_list=p_instance;
- p_instance->update=true;
-
-}
-
-RID VisualServerRaster::scenario_create() {
-
- Scenario *scenario = memnew( Scenario );
- ERR_FAIL_COND_V(!scenario,RID());
- RID scenario_rid = scenario_owner.make_rid( scenario );
- scenario->self=scenario_rid;
- scenario->octree.set_pair_callback(instance_pair,this);
- scenario->octree.set_unpair_callback(instance_unpair,this);
-
- return scenario_rid;
-}
-
-void VisualServerRaster::scenario_set_debug(RID p_scenario,ScenarioDebugMode p_debug_mode) {
- VS_CHANGED;
-
- Scenario *scenario = scenario_owner.get(p_scenario);
- ERR_FAIL_COND(!scenario);
- scenario->debug=p_debug_mode;
-}
-
-void VisualServerRaster::scenario_set_environment(RID p_scenario, RID p_environment) {
-
- VS_CHANGED;
-
- Scenario *scenario = scenario_owner.get(p_scenario);
- ERR_FAIL_COND(!scenario);
- scenario->environment=p_environment;
-
-}
-
-void VisualServerRaster::scenario_set_fallback_environment(RID p_scenario, RID p_environment) {
-
- VS_CHANGED;
-
- Scenario *scenario = scenario_owner.get(p_scenario);
- ERR_FAIL_COND(!scenario);
- scenario->fallback_environment=p_environment;
-
-
-}
-
-RID VisualServerRaster::scenario_get_environment(RID p_scenario, RID p_environment) const{
-
- const Scenario *scenario = scenario_owner.get(p_scenario);
- ERR_FAIL_COND_V(!scenario,RID());
- return scenario->environment;
-
-}
-
-
-/* INSTANCING API */
-
-
-RID VisualServerRaster::instance_create() {
-
- Instance *instance = memnew( Instance );
- ERR_FAIL_COND_V(!instance,RID());
-
- RID instance_rid = instance_owner.make_rid(instance);
- instance->self=instance_rid;
- instance->base_type=INSTANCE_NONE;
- instance->scenario=NULL;
-
- return instance_rid;
-}
-
-void VisualServerRaster::instance_set_base(RID p_instance, RID p_base) {
-
- VS_CHANGED;
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
-
- if (instance->base_type!=INSTANCE_NONE) {
- //free anything related to that base
-
- Map< RID, Set<RID> >::Element * E = instance_dependency_map.find( instance->base_rid );
-
- if (E) {
- // wtf, no E?
- E->get().erase( instance->self );
-
- } else {
-
- ERR_PRINT("no base E? Bug?");
- }
-
- if ( instance->room ) {
-
- instance_set_room(p_instance,RID());
- /*
- if((1<<instance->base_type)&INSTANCE_GEOMETRY_MASK)
- instance->room->room_info->owned_geometry_instances.erase(instance->RE);
- else if (instance->base_type==INSTANCE_PORTAL) {
- print_line("freeing portal, is it there? "+itos(instance->room->room_info->owned_portal_instances.(instance->RE)));
- instance->room->room_info->owned_portal_instances.erase(instance->RE);
- } else if (instance->base_type==INSTANCE_ROOM)
- instance->room->room_info->owned_room_instances.erase(instance->RE);
- else if (instance->base_type==INSTANCE_LIGHT)
- instance->room->room_info->owned_light_instances.erase(instance->RE);
-
- instance->RE=NULL;*/
- }
-
-
-
-
-
- if (instance->light_info) {
-
- if (instance->scenario && instance->light_info->D)
- instance->scenario->directional_lights.erase( instance->light_info->D );
- rasterizer->free(instance->light_info->instance);
- memdelete(instance->light_info);
- instance->light_info=NULL;
- }
-
-
- if (instance->portal_info) {
-
- _portal_disconnect(instance,true);
- memdelete(instance->portal_info);
- instance->portal_info=NULL;
-
- }
-
- if (instance->baked_light_info) {
-
- while(instance->baked_light_info->owned_instances.size()) {
-
- Instance *owned=instance->baked_light_info->owned_instances.front()->get();
- owned->baked_light=NULL;
- owned->data.baked_light=NULL;
- owned->data.baked_light_octree_xform=NULL;
- owned->BLE=NULL;
- instance->baked_light_info->owned_instances.pop_front();
- }
-
- memdelete(instance->baked_light_info);
- instance->baked_light_info=NULL;
-
- }
-
- if (instance->scenario && instance->octree_id) {
- instance->scenario->octree.erase( instance->octree_id );
- instance->octree_id=0;
- }
-
-
- if (instance->room_info) {
-
- for(List<Instance*>::Element *E=instance->room_info->owned_geometry_instances.front();E;E=E->next()) {
-
- Instance *owned = E->get();
- owned->room=NULL;
- owned->RE=NULL;
- }
- for(List<Instance*>::Element *E=instance->room_info->owned_portal_instances.front();E;E=E->next()) {
-
- _portal_disconnect(E->get(),true);
- Instance *owned = E->get();
- owned->room=NULL;
- owned->RE=NULL;
- }
-
- for(List<Instance*>::Element *E=instance->room_info->owned_room_instances.front();E;E=E->next()) {
-
- Instance *owned = E->get();
- owned->room=NULL;
- owned->RE=NULL;
- }
-
- if (instance->room_info->disconnected_child_portals.size()) {
- ERR_PRINT("BUG: Disconnected portals remain!");
- }
- memdelete(instance->room_info);
- instance->room_info=NULL;
-
- }
-
- if (instance->particles_info) {
-
- rasterizer->free( instance->particles_info->instance );
- memdelete(instance->particles_info);
- instance->particles_info=NULL;
-
- }
-
- if (instance->baked_light_sampler_info) {
-
- while (instance->baked_light_sampler_info->owned_instances.size()) {
-
- instance_geometry_set_baked_light_sampler(instance->baked_light_sampler_info->owned_instances.front()->get()->self,RID());
- }
-
- if (instance->baked_light_sampler_info->sampled_light.is_valid()) {
- rasterizer->free(instance->baked_light_sampler_info->sampled_light);
- }
- memdelete( instance->baked_light_sampler_info );
- instance->baked_light_sampler_info=NULL;
- }
-
- instance->data.morph_values.clear();
- instance->data.materials.clear();
-
- }
-
-
- instance->base_type=INSTANCE_NONE;
- instance->base_rid;
-
-
- if (p_base.is_valid()) {
-
- if (rasterizer->is_mesh(p_base)) {
- instance->base_type=INSTANCE_MESH;
- instance->data.morph_values.resize( rasterizer->mesh_get_morph_target_count(p_base));
- instance->data.materials.resize( rasterizer->mesh_get_surface_count(p_base));
- } else if (rasterizer->is_multimesh(p_base)) {
- instance->base_type=INSTANCE_MULTIMESH;
- } else if (rasterizer->is_immediate(p_base)) {
- instance->base_type=INSTANCE_IMMEDIATE;
- } else if (rasterizer->is_particles(p_base)) {
- instance->base_type=INSTANCE_PARTICLES;
- instance->particles_info=memnew( Instance::ParticlesInfo );
- instance->particles_info->instance = rasterizer->particles_instance_create( p_base );
- } else if (rasterizer->is_light(p_base)) {
-
- instance->base_type=INSTANCE_LIGHT;
- instance->light_info = memnew( Instance::LightInfo );
- instance->light_info->instance = rasterizer->light_instance_create(p_base);
- if (instance->scenario && rasterizer->light_get_type(p_base)==LIGHT_DIRECTIONAL) {
-
- instance->light_info->D = instance->scenario->directional_lights.push_back(instance->self);
- }
-
- } else if (room_owner.owns(p_base)) {
- instance->base_type=INSTANCE_ROOM;
- instance->room_info = memnew( Instance::RoomInfo );
- instance->room_info->room=room_owner.get(p_base);
- } else if (portal_owner.owns(p_base)) {
-
- instance->base_type=INSTANCE_PORTAL;
- instance->portal_info = memnew(Instance::PortalInfo);
- instance->portal_info->portal=portal_owner.get(p_base);
- } else if (baked_light_owner.owns(p_base)) {
-
- instance->base_type=INSTANCE_BAKED_LIGHT;
- instance->baked_light_info=memnew(Instance::BakedLightInfo);
- instance->baked_light_info->baked_light=baked_light_owner.get(p_base);
-
- //instance->portal_info = memnew(Instance::PortalInfo);
- //instance->portal_info->portal=portal_owner.get(p_base);
- } else if (baked_light_sampler_owner.owns(p_base)) {
-
-
- instance->base_type=INSTANCE_BAKED_LIGHT_SAMPLER;
- instance->baked_light_sampler_info=memnew( Instance::BakedLightSamplerInfo);
- instance->baked_light_sampler_info->sampler=baked_light_sampler_owner.get(p_base);
-
- //instance->portal_info = memnew(Instance::PortalInfo);
- //instance->portal_info->portal=portal_owner.get(p_base);
-
- } else {
- ERR_EXPLAIN("Invalid base RID for instance!")
- ERR_FAIL();
- }
-
- instance_dependency_map[ p_base ].insert( instance->self );
-
- instance->base_rid=p_base;
-
- if (instance->scenario)
- _instance_queue_update(instance,true);
- }
-
-}
-
-RID VisualServerRaster::instance_get_base(RID p_instance) const {
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance, RID() );
- return instance->base_rid;
-
-}
-
-void VisualServerRaster::instance_set_scenario(RID p_instance, RID p_scenario) {
-
- VS_CHANGED;
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
-
- if (instance->scenario) {
-
- Map< RID, Set<RID> >::Element *E = instance_dependency_map.find( instance->scenario->self );
-
- if (E) {
- // wtf, no E?
- E->get().erase( instance->self );
-
- } else {
-
- ERR_PRINT("no scenario E? Bug?");
- }
-
- if (instance->light_info) {
-
- if (instance->light_info->D)
- instance->scenario->directional_lights.erase( instance->light_info->D );
- }
-
- if (instance->portal_info) {
-
- _portal_disconnect(instance,true);
- }
-
- if (instance->octree_id) {
- instance->scenario->octree.erase( instance->octree_id );
- instance->octree_id=0;
- }
-
- instance->scenario=NULL;
- }
-
-
- if (p_scenario.is_valid()) {
- Scenario *scenario = scenario_owner.get( p_scenario );
- ERR_FAIL_COND(!scenario);
-
- instance->scenario=scenario;
-
- instance_dependency_map[ p_scenario ].insert( instance->self );
- instance->scenario=scenario;
-
- if (instance->base_type==INSTANCE_LIGHT && rasterizer->light_get_type(instance->base_rid)==LIGHT_DIRECTIONAL) {
-
- instance->light_info->D = instance->scenario->directional_lights.push_back(instance->self);
- }
-
- _instance_queue_update(instance,true);
- }
-
-}
-RID VisualServerRaster::instance_get_scenario(RID p_instance) const {
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance, RID() );
- if (instance->scenario)
- return instance->scenario->self;
- else
- return RID();
-
-
-}
-
-
-void VisualServerRaster::instance_set_layer_mask(RID p_instance, uint32_t p_mask) {
-
- VS_CHANGED;
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
-
- instance->layer_mask=p_mask;
-
-}
-
-uint32_t VisualServerRaster::instance_get_layer_mask(RID p_instance) const{
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance, 0 );
-
- return instance->layer_mask;
-}
-
-
-AABB VisualServerRaster::instance_get_base_aabb(RID p_instance) const {
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance, AABB() );
- return instance->aabb;
-
-}
-
-void VisualServerRaster::instance_attach_object_instance_id(RID p_instance,uint32_t p_ID) {
- VS_CHANGED;
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
-
- instance->object_ID=p_ID;
-}
-uint32_t VisualServerRaster::instance_get_object_instance_id(RID p_instance) const {
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance, 0 );
- return instance->object_ID;
-
-}
-
-void VisualServerRaster::instance_attach_skeleton(RID p_instance,RID p_skeleton) {
- VS_CHANGED;
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
-
- if (instance->data.skeleton.is_valid()) {
- skeleton_dependency_map[instance->data.skeleton].erase(instance);
- }
-
- instance->data.skeleton=p_skeleton;
-
- if (instance->data.skeleton.is_valid()) {
- skeleton_dependency_map[instance->data.skeleton].insert(instance);
- }
-
-}
-
-RID VisualServerRaster::instance_get_skeleton(RID p_instance) const {
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance, RID() );
- return instance->data.skeleton;
-
-}
-
-void VisualServerRaster::instance_set_morph_target_weight(RID p_instance,int p_shape, float p_weight) {
-
- VS_CHANGED;
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
- ERR_FAIL_INDEX( p_shape, instance->data.morph_values.size() );
- instance->data.morph_values[p_shape]=p_weight;
-}
-
-float VisualServerRaster::instance_get_morph_target_weight(RID p_instance,int p_shape) const {
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance, 0 );
- ERR_FAIL_INDEX_V( p_shape, instance->data.morph_values.size(), 0 );
- return instance->data.morph_values[p_shape];
-}
-
-void VisualServerRaster::instance_set_surface_material(RID p_instance,int p_surface, RID p_material) {
-
- VS_CHANGED;
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance);
- ERR_FAIL_INDEX( p_surface, instance->data.materials.size() );
- instance->data.materials[p_surface]=p_material;
-}
-
-
-void VisualServerRaster::instance_set_transform(RID p_instance, const Transform& p_transform) {
- VS_CHANGED;
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
-
- if (p_transform==instance->data.transform) // must improve somehow
- return;
-
- instance->data.transform=p_transform;
- if (instance->base_type==INSTANCE_LIGHT)
- instance->data.transform.orthonormalize();
- _instance_queue_update(instance);
-
-}
-
-Transform VisualServerRaster::instance_get_transform(RID p_instance) const {
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance, Transform() );
-
- return instance->data.transform;
-
-}
-
-void VisualServerRaster::instance_set_exterior( RID p_instance, bool p_enabled ) {
- VS_CHANGED;
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
-
- ERR_EXPLAIN("Portals can't be assigned to be exterior");
-
- ERR_FAIL_COND( instance->base_type == INSTANCE_PORTAL );
- if (instance->exterior==p_enabled)
- return;
- instance->exterior=p_enabled;
- _instance_queue_update( instance );
-
-
-}
-
-bool VisualServerRaster::instance_is_exterior( RID p_instance) const {
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance, false );
-
- return instance->exterior;
-}
-
-
-void VisualServerRaster::instance_set_room( RID p_instance, RID p_room ) {
- VS_CHANGED;
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
-
- if (instance->room && instance->RE) {
-
- //instance already havs a room, remove it from there
-
- if ( (1<<instance->base_type) & INSTANCE_GEOMETRY_MASK ) {
-
- instance->room->room_info->owned_geometry_instances.erase(instance->RE);
-
- if (!p_room.is_valid() && instance->octree_id) {
- //remove from the octree, so it's re-added with different flags
- instance->scenario->octree.erase( instance->octree_id );
- instance->octree_id=0;
- _instance_queue_update( instance,true );
- }
-
-
- } else if ( instance->base_type==INSTANCE_ROOM ) {
-
- instance->room->room_info->owned_room_instances.erase(instance->RE);
-
- for(List<Instance*>::Element *E=instance->room_info->owned_portal_instances.front();E;E=E->next()) {
- _portal_disconnect(E->get());
- _instance_queue_update( E->get(),false );
- }
-
- } else if ( instance->base_type==INSTANCE_PORTAL ) {
-
- _portal_disconnect(instance,true);
- bool ss = instance->room->room_info->owned_portal_instances.erase(instance->RE);
-
- } else if ( instance->base_type==INSTANCE_LIGHT ) {
-
- instance->room->room_info->owned_light_instances.erase(instance->RE);
- } else {
-
- ERR_FAIL();
-
- }
-
- instance->RE=NULL;
- instance->room=NULL;
-
-
- } else {
-
- if (p_room.is_valid() && instance->octree_id) {
- //remove from the octree, so it's re-added with different flags
- instance->scenario->octree.erase( instance->octree_id );
- instance->octree_id=0;
- _instance_queue_update( instance,true );
- }
-
- }
-
- if (!p_room.is_valid())
- return; // just clearning the room
-
- Instance *room = instance_owner.get( p_room );
-
- ERR_FAIL_COND( !room );
- ERR_FAIL_COND( room->base_type!=INSTANCE_ROOM );
-
-
- if (instance->base_type==INSTANCE_ROOM) {
-
- //perform cycle test
-
- Instance *parent = instance;
-
- while(parent) {
-
- ERR_EXPLAIN("Cycle in room assignment");
- ERR_FAIL_COND( parent == room );
- parent=parent->room;
- }
- }
-
- if ( (1<<instance->base_type) & INSTANCE_GEOMETRY_MASK ) {
-
- instance->RE = room->room_info->owned_geometry_instances.push_back(instance);
- } else if ( instance->base_type==INSTANCE_ROOM ) {
-
- instance->RE = room->room_info->owned_room_instances.push_back(instance);
- for(List<Instance*>::Element *E=instance->room_info->owned_portal_instances.front();E;E=E->next())
- _instance_queue_update( E->get(),false );
-
-
- } else if ( instance->base_type==INSTANCE_PORTAL ) {
-
- instance->RE = room->room_info->owned_portal_instances.push_back(instance);
- } else if ( instance->base_type==INSTANCE_LIGHT ) {
-
- instance->RE = room->room_info->owned_light_instances.push_back(instance);
- } else {
-
- ERR_FAIL();
-
- }
-
- instance->room=room;
-}
-
-RID VisualServerRaster::instance_get_room( RID p_instance ) const {
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance, RID() );
-
- if (instance->room)
- return instance->room->self;
- else
- return RID();
-}
-
-void VisualServerRaster::instance_set_extra_visibility_margin( RID p_instance, real_t p_margin ) {
-
- VS_CHANGED;
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
-
- instance->extra_margin=p_margin;
-}
-real_t VisualServerRaster::instance_get_extra_visibility_margin( RID p_instance ) const{
-
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance, 0 );
-
- return instance->extra_margin;
-}
-
-
-Vector<RID> VisualServerRaster::instances_cull_aabb(const AABB& p_aabb, RID p_scenario) const {
-
-
- Vector<RID> instances;
- Scenario *scenario=scenario_owner.get(p_scenario);
- ERR_FAIL_COND_V(!scenario,instances);
-
- const_cast<VisualServerRaster*>(this)->_update_instances(); // check dirty instances before culling
-
- int culled=0;
- Instance *cull[1024];
- culled=scenario->octree.cull_aabb(p_aabb,cull,1024);
-
- for (int i=0;i<culled;i++) {
-
- Instance *instance=cull[i];
- ERR_CONTINUE(!instance);
- instances.push_back(instance->self);
- }
-
- return instances;
-}
-Vector<RID> VisualServerRaster::instances_cull_ray(const Vector3& p_from, const Vector3& p_to, RID p_scenario) const{
-
- Vector<RID> instances;
- Scenario *scenario=scenario_owner.get(p_scenario);
- ERR_FAIL_COND_V(!scenario,instances);
- const_cast<VisualServerRaster*>(this)->_update_instances(); // check dirty instances before culling
-
- int culled=0;
- Instance *cull[1024];
- culled=scenario->octree.cull_segment(p_from,p_to*10000,cull,1024);
-
-
- for (int i=0;i<culled;i++) {
-
- Instance *instance=cull[i];
- ERR_CONTINUE(!instance);
- instances.push_back(instance->self);
- }
-
- return instances;
-
-}
-Vector<RID> VisualServerRaster::instances_cull_convex(const Vector<Plane>& p_convex, RID p_scenario) const{
-
- Vector<RID> instances;
- Scenario *scenario=scenario_owner.get(p_scenario);
- ERR_FAIL_COND_V(!scenario,instances);
- const_cast<VisualServerRaster*>(this)->_update_instances(); // check dirty instances before culling
-
- int culled=0;
- Instance *cull[1024];
-
-
- culled=scenario->octree.cull_convex(p_convex,cull,1024);
-
- for (int i=0;i<culled;i++) {
-
- Instance *instance=cull[i];
- ERR_CONTINUE(!instance);
- instances.push_back(instance->self);
- }
-
- return instances;
-
-}
-
-void VisualServerRaster::instance_geometry_set_flag(RID p_instance,InstanceFlags p_flags,bool p_enabled) {
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
- //ERR_FAIL_COND( ! ( (1<<instance->base_type) & INSTANCE_GEOMETRY_MASK) );
-
- switch(p_flags) {
-
- case INSTANCE_FLAG_VISIBLE: {
-
- instance->visible=p_enabled;
-
- } break;
- case INSTANCE_FLAG_BILLBOARD: {
-
- instance->data.billboard=p_enabled;
-
- } break;
- case INSTANCE_FLAG_BILLBOARD_FIX_Y: {
-
- instance->data.billboard_y=p_enabled;
-
- } break;
- case INSTANCE_FLAG_CAST_SHADOW: {
- if (p_enabled == true) {
- instance->data.cast_shadows = SHADOW_CASTING_SETTING_ON;
- }
- else {
- instance->data.cast_shadows = SHADOW_CASTING_SETTING_OFF;
- }
-
- } break;
- case INSTANCE_FLAG_RECEIVE_SHADOWS: {
-
- instance->data.receive_shadows=p_enabled;
-
- } break;
- case INSTANCE_FLAG_DEPH_SCALE: {
-
- instance->data.depth_scale=p_enabled;
-
- } break;
- case INSTANCE_FLAG_VISIBLE_IN_ALL_ROOMS: {
-
- instance->visible_in_all_rooms=p_enabled;
-
- } break;
-
- }
-
-}
-
-bool VisualServerRaster::instance_geometry_get_flag(RID p_instance,InstanceFlags p_flags) const{
-
- const Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance, false );
- //ERR_FAIL_COND_V( ! ( (1<<instance->base_type) & INSTANCE_GEOMETRY_MASK), false );
-
- switch(p_flags) {
-
- case INSTANCE_FLAG_VISIBLE: {
-
- return instance->visible;
-
- } break;
- case INSTANCE_FLAG_BILLBOARD: {
-
- return instance->data.billboard;
-
- } break;
- case INSTANCE_FLAG_BILLBOARD_FIX_Y: {
-
- return instance->data.billboard_y;
-
- } break;
- case INSTANCE_FLAG_CAST_SHADOW: {
- if(instance->data.cast_shadows == SHADOW_CASTING_SETTING_OFF) {
- return false;
- }
- else {
- return true;
- }
-
- } break;
- case INSTANCE_FLAG_RECEIVE_SHADOWS: {
-
- return instance->data.receive_shadows;
-
- } break;
- case INSTANCE_FLAG_DEPH_SCALE: {
-
- return instance->data.depth_scale;
-
- } break;
- case INSTANCE_FLAG_VISIBLE_IN_ALL_ROOMS: {
-
- return instance->visible_in_all_rooms;
-
- } break;
-
- }
-
- return false;
-}
-
-void VisualServerRaster::instance_geometry_set_cast_shadows_setting(RID p_instance, VS::ShadowCastingSetting p_shadow_casting_setting) {
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
-
- instance->data.cast_shadows = p_shadow_casting_setting;
-}
-
-VS::ShadowCastingSetting VisualServerRaster::instance_geometry_get_cast_shadows_setting(RID p_instance) const{
-
- const Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance, SHADOW_CASTING_SETTING_OFF );
-
- return instance->data.cast_shadows;
-}
-
-
-void VisualServerRaster::instance_geometry_set_material_override(RID p_instance, RID p_material) {
-
- VS_CHANGED;
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
- instance->data.material_override=p_material;
-
-}
-
-RID VisualServerRaster::instance_geometry_get_material_override(RID p_instance) const{
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance, RID() );
- return instance->data.material_override;
-
-}
-
-void VisualServerRaster::instance_geometry_set_draw_range(RID p_instance,float p_min,float p_max){
-
- VS_CHANGED;
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
-
- instance->draw_range_begin=p_min;
- instance->draw_range_end=p_max;
-
-}
-
-float VisualServerRaster::instance_geometry_get_draw_range_min(RID p_instance) const{
-
- const Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance,0 );
-
- return instance->draw_range_begin;
-
-
-}
-
-float VisualServerRaster::instance_geometry_get_draw_range_max(RID p_instance) const{
-
- const Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance,0 );
-
- return instance->draw_range_end;
-
-
-}
-
-
-void VisualServerRaster::instance_geometry_set_baked_light(RID p_instance,RID p_baked_light) {
-
- VS_CHANGED;
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
-
-
- if (instance->baked_light) {
-
-
- instance->baked_light->baked_light_info->owned_instances.erase(instance->BLE);
- instance->BLE=NULL;
- instance->baked_light=NULL;
- instance->data.baked_light=NULL;
- instance->data.baked_light_octree_xform=NULL;
-
- }
-
- if (!p_baked_light.is_valid())
- return;
- Instance *bl_instance = instance_owner.get( p_baked_light );
- ERR_FAIL_COND( !bl_instance );
- ERR_FAIL_COND( bl_instance->base_type!=INSTANCE_BAKED_LIGHT );
-
- instance->baked_light=bl_instance;
- instance->BLE=bl_instance->baked_light_info->owned_instances.push_back(instance);
- instance->data.baked_light=&bl_instance->baked_light_info->baked_light->data;
- instance->data.baked_light_octree_xform=&bl_instance->baked_light_info->affine_inverse;
-
-}
-
-RID VisualServerRaster::instance_geometry_get_baked_light(RID p_instance) const{
-
- const Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance,RID() );
- if (instance->baked_light)
- return instance->baked_light->self;
- return RID();
-
-}
-
-
-void VisualServerRaster::instance_geometry_set_baked_light_sampler(RID p_instance,RID p_baked_light_sampler) {
-
- VS_CHANGED;
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
-
- if (instance->sampled_light) {
- instance->sampled_light->baked_light_sampler_info->owned_instances.erase(instance);
- instance->data.sampled_light;
- }
-
- if(p_baked_light_sampler.is_valid()) {
- Instance *sampler_instance = instance_owner.get( p_baked_light_sampler );
- ERR_FAIL_COND( !sampler_instance );
- ERR_FAIL_COND( sampler_instance->base_type!=INSTANCE_BAKED_LIGHT_SAMPLER );
- instance->sampled_light=sampler_instance;
- instance->sampled_light->baked_light_sampler_info->owned_instances.insert(instance);
- } else {
- instance->sampled_light=NULL;
- }
-
- instance->data.sampled_light;
-
-}
-
-RID VisualServerRaster::instance_geometry_get_baked_light_sampler(RID p_instance) const {
-
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance,RID() );
-
- if (instance->sampled_light)
- return instance->sampled_light->self;
- else
- return RID();
-
-}
-
-
-void VisualServerRaster::instance_geometry_set_baked_light_texture_index(RID p_instance,int p_tex_id){
-
- VS_CHANGED;
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
-
- instance->data.baked_lightmap_id=p_tex_id;
-
-
-}
-int VisualServerRaster::instance_geometry_get_baked_light_texture_index(RID p_instance) const{
-
- const Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance,0 );
-
- return instance->data.baked_lightmap_id;
-
-}
-
-
-void VisualServerRaster::_update_instance(Instance *p_instance) {
-
- p_instance->version++;
-
- if (p_instance->base_type == INSTANCE_LIGHT) {
-
- rasterizer->light_instance_set_transform( p_instance->light_info->instance, p_instance->data.transform );
-
- }
-
-
- if (p_instance->aabb.has_no_surface())
- return;
-
-
- if (p_instance->base_type == INSTANCE_PARTICLES) {
-
- rasterizer->particles_instance_set_transform( p_instance->particles_info->instance, p_instance->data.transform );
- }
-
-
- if ((1<<p_instance->base_type)&INSTANCE_GEOMETRY_MASK) {
-
- //make sure lights are updated
- InstanceSet::Element *E=p_instance->lights.front();
- while(E) {
-
- E->get()->version++;
- E=E->next();
- }
-
- } else if (p_instance->base_type == INSTANCE_ROOM) {
-
- p_instance->room_info->affine_inverse=p_instance->data.transform.affine_inverse();
- } else if (p_instance->base_type == INSTANCE_BAKED_LIGHT) {
-
- Transform scale;
- scale.basis.scale(p_instance->baked_light_info->baked_light->octree_aabb.size);
- scale.origin=p_instance->baked_light_info->baked_light->octree_aabb.pos;
- //print_line("scale: "+scale);
- p_instance->baked_light_info->affine_inverse=(p_instance->data.transform*scale).affine_inverse();
- }
-
-
-
- p_instance->data.mirror = p_instance->data.transform.basis.determinant() < 0.0;
-
- AABB new_aabb;
-
- if (p_instance->base_type==INSTANCE_PORTAL) {
-
- //portals need to be transformed in a special way, so they don't become too wide if they have scale..
- Transform portal_xform = p_instance->data.transform;
- portal_xform.basis.set_axis(2,portal_xform.basis.get_axis(2).normalized());
-
- p_instance->portal_info->plane_cache=Plane( p_instance->data.transform.origin, portal_xform.basis.get_axis(2));
- int point_count=p_instance->portal_info->portal->shape.size();
- p_instance->portal_info->transformed_point_cache.resize(point_count);
-
- AABB portal_aabb;
-
- for(int i=0;i<point_count;i++) {
-
- Point2 src = p_instance->portal_info->portal->shape[i];
- Vector3 point = portal_xform.xform(Vector3(src.x,src.y,0));
- p_instance->portal_info->transformed_point_cache[i]=point;
- if (i==0)
- portal_aabb.pos=point;
- else
- portal_aabb.expand_to(point);
- }
-
- portal_aabb.grow_by(p_instance->portal_info->portal->connect_range);
-
- new_aabb = portal_aabb;
-
- } else {
-
- new_aabb = p_instance->data.transform.xform(p_instance->aabb);
- }
-
-
- for(InstanceSet::Element *E=p_instance->lights.front();E;E=E->next()) {
- Instance *light = E->get();
- light->version++;
- }
-
-
- p_instance->transformed_aabb=new_aabb;
-
- if (!p_instance->scenario) {
-
-
- return;
- }
-
-
-
- if (p_instance->octree_id==0) {
-
- uint32_t base_type = 1<<p_instance->base_type;
- uint32_t pairable_mask=0;
- bool pairable=false;
-
- if (p_instance->base_type == INSTANCE_LIGHT) {
-
- pairable_mask=p_instance->light_info->enabled?INSTANCE_GEOMETRY_MASK:0;
- pairable=true;
- }
-
- if (p_instance->base_type == INSTANCE_PORTAL) {
-
- pairable_mask=(1<<INSTANCE_PORTAL);
- pairable=true;
- }
-
- if (p_instance->base_type == INSTANCE_BAKED_LIGHT_SAMPLER) {
-
- pairable_mask=(1<<INSTANCE_BAKED_LIGHT);
- pairable=true;
- }
-
-
- if (!p_instance->room && (1<<p_instance->base_type)&INSTANCE_GEOMETRY_MASK) {
-
- base_type|=INSTANCE_ROOMLESS_MASK;
- }
-
- if (p_instance->base_type == INSTANCE_ROOM) {
-
- pairable_mask=INSTANCE_ROOMLESS_MASK;
- pairable=true;
- }
-
-
- // not inside octree
- p_instance->octree_id = p_instance->scenario->octree.create(p_instance,new_aabb,0,pairable,base_type,pairable_mask);
-
- } else {
-
- /*
- if (new_aabb==p_instance->data.transformed_aabb)
- return;
- */
-
- p_instance->scenario->octree.move(p_instance->octree_id,new_aabb);
- }
-
- if (p_instance->base_type==INSTANCE_PORTAL) {
-
- _portal_attempt_connect(p_instance);
- }
-
- if (!p_instance->room && (1<<p_instance->base_type)&INSTANCE_GEOMETRY_MASK) {
-
- _instance_validate_autorooms(p_instance);
- }
-
- if (p_instance->base_type == INSTANCE_ROOM) {
-
- for(Set<Instance*>::Element *E=p_instance->room_info->owned_autoroom_geometry.front();E;E=E->next())
- _instance_validate_autorooms(E->get());
- }
-
-
-}
-
-void VisualServerRaster::_update_instance_aabb(Instance *p_instance) {
-
- AABB new_aabb;
-
- ERR_FAIL_COND(p_instance->base_type!=INSTANCE_NONE && !p_instance->base_rid.is_valid());
-
- switch(p_instance->base_type) {
- case VisualServer::INSTANCE_NONE: {
-
- // do nothing
- } break;
- case VisualServer::INSTANCE_MESH: {
-
- new_aabb = rasterizer->mesh_get_aabb(p_instance->base_rid,p_instance->data.skeleton);
-
- } break;
- case VisualServer::INSTANCE_MULTIMESH: {
-
- new_aabb = rasterizer->multimesh_get_aabb(p_instance->base_rid);
-
- } break;
- case VisualServer::INSTANCE_IMMEDIATE: {
-
- new_aabb = rasterizer->immediate_get_aabb(p_instance->base_rid);
-
-
- } break;
- case VisualServer::INSTANCE_PARTICLES: {
-
- new_aabb = rasterizer->particles_get_aabb(p_instance->base_rid);
-
-
- } break;
- case VisualServer::INSTANCE_LIGHT: {
-
- new_aabb = rasterizer->light_get_aabb(p_instance->base_rid);
-
- } break;
- case VisualServer::INSTANCE_ROOM: {
-
- Room *room = room_owner.get( p_instance->base_rid );
- ERR_FAIL_COND(!room);
- new_aabb=room->bounds.get_aabb();
-
- } break;
- case VisualServer::INSTANCE_PORTAL: {
-
- Portal *portal = portal_owner.get( p_instance->base_rid );
- ERR_FAIL_COND(!portal);
- for (int i=0;i<portal->shape.size();i++) {
-
- Vector3 point( portal->shape[i].x, portal->shape[i].y, 0 );
- if (i==0) {
-
- new_aabb.pos=point;
- new_aabb.size.z=0.01; // make it not flat for octree
- } else {
-
- new_aabb.expand_to(point);
- }
- }
-
- } break;
- case VisualServer::INSTANCE_BAKED_LIGHT: {
-
- BakedLight *baked_light = baked_light_owner.get( p_instance->base_rid );
- ERR_FAIL_COND(!baked_light);
- new_aabb=baked_light->octree_aabb;
-
- } break;
- case VisualServer::INSTANCE_BAKED_LIGHT_SAMPLER: {
-
- BakedLightSampler *baked_light_sampler = baked_light_sampler_owner.get( p_instance->base_rid );
- ERR_FAIL_COND(!baked_light_sampler);
- float radius = baked_light_sampler->params[VS::BAKED_LIGHT_SAMPLER_RADIUS];
-
- new_aabb=AABB(Vector3(-radius,-radius,-radius),Vector3(radius*2,radius*2,radius*2));
-
- } break;
-
- default: {}
- }
-
- if (p_instance->extra_margin)
- new_aabb.grow_by(p_instance->extra_margin);
-
- p_instance->aabb=new_aabb;
-
-}
-
-void VisualServerRaster::_update_instances() {
-
- while(instance_update_list) {
-
- Instance *instance=instance_update_list;
-
- instance_update_list=instance_update_list->update_next;
-
- if (instance->update_aabb)
- _update_instance_aabb(instance);
-
- if (instance->update_materials) {
- if (instance->base_type==INSTANCE_MESH) {
- instance->data.materials.resize(rasterizer->mesh_get_surface_count(instance->base_rid));
- }
- }
-
- _update_instance(instance);
-
- instance->update=false;
- instance->update_aabb=false;
- instance->update_materials=false;
- instance->update_next=0;
- }
-}
-
-void VisualServerRaster::instance_light_set_enabled(RID p_instance,bool p_enabled) {
-
- VS_CHANGED;
- Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND( !instance );
- ERR_FAIL_COND( instance->base_type!=INSTANCE_LIGHT );
-
- if (p_enabled==instance->light_info->enabled)
- return;
-
- instance->light_info->enabled=p_enabled;
- if (light_get_type(instance->base_rid)!=VS::LIGHT_DIRECTIONAL && instance->octree_id && instance->scenario)
- instance->scenario->octree.set_pairable(instance->octree_id,p_enabled,1<<INSTANCE_LIGHT,p_enabled?INSTANCE_GEOMETRY_MASK:0);
-
- //_instance_queue_update( instance , true );
-
-}
-
-bool VisualServerRaster::instance_light_is_enabled(RID p_instance) const {
-
- const Instance *instance = instance_owner.get( p_instance );
- ERR_FAIL_COND_V( !instance,false );
- ERR_FAIL_COND_V( instance->base_type!=INSTANCE_LIGHT,false );
-
- return instance->light_info->enabled;
-}
-
-/****** CANVAS *********/
-RID VisualServerRaster::canvas_create() {
-
- Canvas * canvas = memnew( Canvas );
- ERR_FAIL_COND_V(!canvas,RID());
- RID rid = canvas_owner.make_rid( canvas );
-
- return rid;
-}
-
-
-void VisualServerRaster::canvas_set_item_mirroring(RID p_canvas,RID p_item,const Point2& p_mirroring) {
-
- Canvas * canvas = canvas_owner.get(p_canvas);
- ERR_FAIL_COND(!canvas);
- CanvasItem *canvas_item = canvas_item_owner.get(p_item);
- ERR_FAIL_COND(!canvas_item);
-
- int idx = canvas->find_item(canvas_item);
- ERR_FAIL_COND(idx==-1);
- canvas->child_items[idx].mirror=p_mirroring;
-
-}
-
-Point2 VisualServerRaster::canvas_get_item_mirroring(RID p_canvas,RID p_item) const {
-
- Canvas * canvas = canvas_owner.get(p_canvas);
- ERR_FAIL_COND_V(!canvas,Point2());
- CanvasItem *canvas_item = memnew( CanvasItem );
- ERR_FAIL_COND_V(!canvas_item,Point2());
-
- int idx = canvas->find_item(canvas_item);
- ERR_FAIL_COND_V(idx==-1,Point2());
- return canvas->child_items[idx].mirror;
-}
-
-void VisualServerRaster::canvas_set_modulate(RID p_canvas,const Color& p_color) {
-
- Canvas * canvas = canvas_owner.get(p_canvas);
- ERR_FAIL_COND(!canvas);
- canvas->modulate=p_color;
-}
-
-
-
-RID VisualServerRaster::canvas_item_create() {
-
- CanvasItem *canvas_item = memnew( CanvasItem );
- ERR_FAIL_COND_V(!canvas_item,RID());
-
- return canvas_item_owner.make_rid( canvas_item );
-}
-
-void VisualServerRaster::canvas_item_set_parent(RID p_item,RID p_parent) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- if (canvas_item->parent.is_valid()) {
-
- if (canvas_owner.owns(canvas_item->parent)) {
-
- Canvas *canvas = canvas_owner.get(canvas_item->parent);
- canvas->erase_item(canvas_item);
- } else if (canvas_item_owner.owns(canvas_item->parent)) {
-
- CanvasItem *item_owner = canvas_item_owner.get(canvas_item->parent);
- item_owner->child_items.erase(canvas_item);
- }
-
- canvas_item->parent;
- }
-
-
- if (p_parent.is_valid()) {
- if (canvas_owner.owns(p_parent)) {
-
- Canvas *canvas = canvas_owner.get(p_parent);
- Canvas::ChildItem ci;
- ci.item=canvas_item;
- canvas->child_items.push_back(ci);
- } else if (canvas_item_owner.owns(p_parent)) {
-
- CanvasItem *item_owner = canvas_item_owner.get(p_parent);
- item_owner->child_items.push_back(canvas_item);
-
- } else {
-
- ERR_EXPLAIN("Invalid parent");
- ERR_FAIL();
- }
-
-
- }
-
- canvas_item->parent=p_parent;
-
-
-}
-
-RID VisualServerRaster::canvas_item_get_parent(RID p_canvas_item) const {
-
- CanvasItem *canvas_item = canvas_item_owner.get( p_canvas_item );
- ERR_FAIL_COND_V(!canvas_item,RID());
-
- return canvas_item->parent;
-}
-
-void VisualServerRaster::canvas_item_set_visible(RID p_item,bool p_visible) {
-
- VS_CHANGED;
-
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- canvas_item->visible=p_visible;
-}
-
-
-bool VisualServerRaster::canvas_item_is_visible(RID p_item) const {
-
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND_V(!canvas_item,RID());
-
- return canvas_item->visible;
-
-}
-
-void VisualServerRaster::canvas_item_set_light_mask(RID p_canvas_item,int p_mask) {
-
- VS_CHANGED;
-
- CanvasItem *canvas_item = canvas_item_owner.get( p_canvas_item );
- ERR_FAIL_COND(!canvas_item);
-
- if (canvas_item->light_mask==p_mask)
- return;
- VS_CHANGED;
-
- canvas_item->light_mask=p_mask;
-
-}
-
-
-void VisualServerRaster::canvas_item_set_blend_mode(RID p_canvas_item,MaterialBlendMode p_blend) {
-
- VS_CHANGED;
-
- CanvasItem *canvas_item = canvas_item_owner.get( p_canvas_item );
- ERR_FAIL_COND(!canvas_item);
-
- if (canvas_item->blend_mode==p_blend)
- return;
- VS_CHANGED;
-
- canvas_item->blend_mode=p_blend;
-
-}
-
-void VisualServerRaster::canvas_item_attach_viewport(RID p_canvas_item, RID p_viewport) {
-
- CanvasItem *canvas_item = canvas_item_owner.get( p_canvas_item );
- ERR_FAIL_COND(!canvas_item);
-
- VS_CHANGED;
-
- canvas_item->viewport=p_viewport;
-
-}
-
-
-/*
-void VisualServerRaster::canvas_item_set_rect(RID p_item, const Rect2& p_rect) {
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- canvas_item->rect=p_rect;
-}*/
-
-void VisualServerRaster::canvas_item_set_clip(RID p_item, bool p_clip) {
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- canvas_item->clip=p_clip;
-}
-
-void VisualServerRaster::canvas_item_set_distance_field_mode(RID p_item, bool p_distance_field) {
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- canvas_item->distance_field=p_distance_field;
-}
-
-
-void VisualServerRaster::canvas_item_set_transform(RID p_item, const Matrix32& p_transform) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- canvas_item->xform=p_transform;
-
-}
-
-
-void VisualServerRaster::canvas_item_set_custom_rect(RID p_item, bool p_custom_rect,const Rect2& p_rect) {
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- canvas_item->custom_rect=p_custom_rect;
- if (p_custom_rect)
- canvas_item->rect=p_rect;
-
-}
-
-void VisualServerRaster::canvas_item_set_opacity(RID p_item, float p_opacity) {
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
- canvas_item->opacity=p_opacity;
-
-}
-float VisualServerRaster::canvas_item_get_opacity(RID p_item, float p_opacity) const {
-
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND_V(!canvas_item,-1);
- return canvas_item->opacity;
-
-}
-
-void VisualServerRaster::canvas_item_set_on_top(RID p_item, bool p_on_top) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
- canvas_item->ontop=p_on_top;
-
-}
-
-bool VisualServerRaster::canvas_item_is_on_top(RID p_item) const{
- const CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND_V(!canvas_item,false);
- return canvas_item->ontop;
-
-}
-
-
-void VisualServerRaster::canvas_item_set_self_opacity(RID p_item, float p_self_opacity) {
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
- canvas_item->self_opacity=p_self_opacity;
-
-}
-float VisualServerRaster::canvas_item_get_self_opacity(RID p_item, float p_self_opacity) const {
-
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND_V(!canvas_item,-1);
- return canvas_item->self_opacity;
-
-}
-
-
-void VisualServerRaster::canvas_item_add_line(RID p_item, const Point2& p_from, const Point2& p_to,const Color& p_color,float p_width,bool p_antialiased) {
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- CanvasItem::CommandLine * line = memnew( CanvasItem::CommandLine );
- ERR_FAIL_COND(!line);
- line->color=p_color;
- line->from=p_from;
- line->to=p_to;
- line->width=p_width;
- line->antialiased=p_antialiased;
- canvas_item->rect_dirty=true;
-
-
- canvas_item->commands.push_back(line);
-}
-
-void VisualServerRaster::canvas_item_add_rect(RID p_item, const Rect2& p_rect, const Color& p_color) {
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- CanvasItem::CommandRect * rect = memnew( CanvasItem::CommandRect );
- ERR_FAIL_COND(!rect);
- rect->modulate=p_color;
- rect->rect=p_rect;
- canvas_item->rect_dirty=true;
-
- canvas_item->commands.push_back(rect);
-}
-
-void VisualServerRaster::canvas_item_add_circle(RID p_item, const Point2& p_pos, float p_radius,const Color& p_color) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- CanvasItem::CommandCircle * circle = memnew( CanvasItem::CommandCircle );
- ERR_FAIL_COND(!circle);
- circle->color=p_color;
- circle->pos=p_pos;
- circle->radius=p_radius;
-
- canvas_item->commands.push_back(circle);
-
-}
-
-void VisualServerRaster::canvas_item_add_texture_rect(RID p_item, const Rect2& p_rect, RID p_texture,bool p_tile,const Color& p_modulate,bool p_transpose) {
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- CanvasItem::CommandRect * rect = memnew( CanvasItem::CommandRect );
- ERR_FAIL_COND(!rect);
- rect->modulate=p_modulate;
- rect->rect=p_rect;
- rect->flags=0;
- if (p_tile) {
- rect->flags|=Rasterizer::CANVAS_RECT_TILE;
- rect->flags|=Rasterizer::CANVAS_RECT_REGION;
- rect->source=Rect2(0,0,p_rect.size.width,p_rect.size.height);
- }
-
- if (p_rect.size.x<0) {
-
- rect->flags|=Rasterizer::CANVAS_RECT_FLIP_H;
- rect->rect.size.x = -rect->rect.size.x;
- }
- if (p_rect.size.y<0) {
-
- rect->flags|=Rasterizer::CANVAS_RECT_FLIP_V;
- rect->rect.size.y = -rect->rect.size.y;
- }
- if (p_transpose) {
- rect->flags|=Rasterizer::CANVAS_RECT_TRANSPOSE;
- SWAP(rect->rect.size.x, rect->rect.size.y);
- }
- rect->texture=p_texture;
- canvas_item->rect_dirty=true;
- canvas_item->commands.push_back(rect);
-}
-
-void VisualServerRaster::canvas_item_add_texture_rect_region(RID p_item, const Rect2& p_rect, RID p_texture,const Rect2& p_src_rect,const Color& p_modulate,bool p_transpose) {
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- CanvasItem::CommandRect * rect = memnew( CanvasItem::CommandRect );
- ERR_FAIL_COND(!rect);
- rect->modulate=p_modulate;
- rect->rect=p_rect;
- rect->texture=p_texture;
- rect->source=p_src_rect;
- rect->flags=Rasterizer::CANVAS_RECT_REGION;
-
- if (p_rect.size.x<0) {
-
- rect->flags|=Rasterizer::CANVAS_RECT_FLIP_H;
- rect->rect.size.x = -rect->rect.size.x;
- }
- if (p_rect.size.y<0) {
-
- rect->flags|=Rasterizer::CANVAS_RECT_FLIP_V;
- rect->rect.size.y = -rect->rect.size.y;
- }
- if (p_transpose) {
- rect->flags|=Rasterizer::CANVAS_RECT_TRANSPOSE;
- SWAP(rect->rect.size.x, rect->rect.size.y);
- }
-
- canvas_item->rect_dirty=true;
-
- canvas_item->commands.push_back(rect);
-
-}
-
-void VisualServerRaster::canvas_item_add_style_box(RID p_item, const Rect2& p_rect, const Rect2& p_source, RID p_texture, const Vector2& p_topleft, const Vector2& p_bottomright, bool p_draw_center,const Color& p_modulate) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- CanvasItem::CommandStyle * style = memnew( CanvasItem::CommandStyle );
- ERR_FAIL_COND(!style);
- style->texture=p_texture;
- style->rect=p_rect;
- style->source=p_source;
- style->draw_center=p_draw_center;
- style->color=p_modulate;
- style->margin[MARGIN_LEFT]=p_topleft.x;
- style->margin[MARGIN_TOP]=p_topleft.y;
- style->margin[MARGIN_RIGHT]=p_bottomright.x;
- style->margin[MARGIN_BOTTOM]=p_bottomright.y;
- canvas_item->rect_dirty=true;
-
- canvas_item->commands.push_back(style);
-}
-void VisualServerRaster::canvas_item_add_primitive(RID p_item,const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs, RID p_texture,float p_width) {
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- CanvasItem::CommandPrimitive * prim = memnew( CanvasItem::CommandPrimitive );
- ERR_FAIL_COND(!prim);
- prim->texture=p_texture;
- prim->points=p_points;
- prim->uvs=p_uvs;
- prim->colors=p_colors;
- prim->width=p_width;
- canvas_item->rect_dirty=true;
-
- canvas_item->commands.push_back(prim);
-}
-
-void VisualServerRaster::canvas_item_add_polygon(RID p_item, const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs, RID p_texture) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-#ifdef DEBUG_ENABLED
- int pointcount = p_points.size();
- ERR_FAIL_COND(pointcount<3);
- int color_size=p_colors.size();
- int uv_size=p_uvs.size();
- ERR_FAIL_COND(color_size!=0 && color_size!=1 && color_size!=pointcount);
- ERR_FAIL_COND(uv_size!=0 && (uv_size!=pointcount || !p_texture.is_valid()));
-#endif
- Vector<int> indices = Geometry::triangulate_polygon(p_points);
-
- if (indices.empty()) {
-
- ERR_EXPLAIN("Bad Polygon!");
- ERR_FAIL_V();
- }
-
- CanvasItem::CommandPolygon * polygon = memnew( CanvasItem::CommandPolygon );
- ERR_FAIL_COND(!polygon);
- polygon->texture=p_texture;
- polygon->points=p_points;
- polygon->uvs=p_uvs;
- polygon->colors=p_colors;
- polygon->indices=indices;
- polygon->count=indices.size();
- canvas_item->rect_dirty=true;
-
- canvas_item->commands.push_back(polygon);
-
-}
-
-void VisualServerRaster::canvas_item_add_triangle_array_ptr(RID p_item, int p_count, const int* p_indices, const Point2* p_points, const Color* p_colors,const Point2* p_uvs, RID p_texture) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- ERR_FAIL_COND(p_count <= 0);
-
- ERR_FAIL_COND(p_points == NULL);
-
- CanvasItem::CommandPolygonPtr * polygon = memnew( CanvasItem::CommandPolygonPtr );
- ERR_FAIL_COND(!polygon);
- polygon->texture=p_texture;
- polygon->points=p_points;
- polygon->uvs=p_uvs;
- polygon->colors=p_colors;
- polygon->indices=p_indices;
- polygon->count = p_count * 3;
- canvas_item->rect_dirty=true;
-
- canvas_item->commands.push_back(polygon);
-};
-
-void VisualServerRaster::canvas_item_add_triangle_array(RID p_item, const Vector<int>& p_indices, const Vector<Point2>& p_points, const Vector<Color>& p_colors,const Vector<Point2>& p_uvs, RID p_texture, int p_count) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- int ps = p_points.size();
- ERR_FAIL_COND(!p_colors.empty() && p_colors.size()!=ps && p_colors.size()!=1);
- ERR_FAIL_COND(!p_uvs.empty() && p_uvs.size()!=ps);
-
- Vector<int> indices = p_indices;
-
- int count = p_count * 3;
-
- if (indices.empty()) {
-
- ERR_FAIL_COND( ps % 3 != 0 );
- if (p_count == -1)
- count = ps;
- } else {
-
- ERR_FAIL_COND( indices.size() % 3 != 0 );
- if (p_count == -1)
- count = indices.size();
- }
-
- CanvasItem::CommandPolygon * polygon = memnew( CanvasItem::CommandPolygon );
- ERR_FAIL_COND(!polygon);
- polygon->texture=p_texture;
- polygon->points=p_points;
- polygon->uvs=p_uvs;
- polygon->colors=p_colors;
- polygon->indices=indices;
- polygon->count = count;
- canvas_item->rect_dirty=true;
-
- canvas_item->commands.push_back(polygon);
-}
-
-
-void VisualServerRaster::canvas_item_add_set_transform(RID p_item,const Matrix32& p_transform) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- CanvasItem::CommandTransform * tr = memnew( CanvasItem::CommandTransform );
- ERR_FAIL_COND(!tr);
- tr->xform=p_transform;
-
- canvas_item->commands.push_back(tr);
-
-}
-
-void VisualServerRaster::canvas_item_add_set_blend_mode(RID p_item, MaterialBlendMode p_blend) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- CanvasItem::CommandBlendMode * bm = memnew( CanvasItem::CommandBlendMode );
- ERR_FAIL_COND(!bm);
- bm->blend_mode = p_blend;
-
- canvas_item->commands.push_back(bm);
-};
-
-void VisualServerRaster::canvas_item_set_z(RID p_item, int p_z) {
-
- ERR_FAIL_COND(p_z<CANVAS_ITEM_Z_MIN || p_z>CANVAS_ITEM_Z_MAX);
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
- canvas_item->z=p_z;
-
-}
-
-void VisualServerRaster::canvas_item_set_z_as_relative_to_parent(RID p_item, bool p_enable) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
- canvas_item->z_relative=p_enable;
-
-}
-
-void VisualServerRaster::canvas_item_set_copy_to_backbuffer(RID p_item, bool p_enable, const Rect2& p_rect) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
- if (bool(canvas_item->copy_back_buffer!=NULL) !=p_enable) {
- if (p_enable) {
- canvas_item->copy_back_buffer = memnew( Rasterizer::CanvasItem::CopyBackBuffer );
- } else {
- memdelete(canvas_item->copy_back_buffer);
- canvas_item->copy_back_buffer=NULL;
- }
- }
-
- if (p_enable) {
- canvas_item->copy_back_buffer->rect=p_rect;
- canvas_item->copy_back_buffer->full=p_rect==Rect2();
- }
-
-}
-
-void VisualServerRaster::canvas_item_set_use_parent_material(RID p_item, bool p_enable) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
- canvas_item->use_parent_material=p_enable;
-
-}
-
-void VisualServerRaster::canvas_item_set_material(RID p_item, RID p_material) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- if (canvas_item->material)
- canvas_item->material->owners.erase(canvas_item);
-
- canvas_item->material=NULL;
-
- if (canvas_item_material_owner.owns(p_material)) {
- canvas_item->material=canvas_item_material_owner.get(p_material);
- canvas_item->material->owners.insert(canvas_item);
- }
-}
-
-void VisualServerRaster::canvas_item_set_sort_children_by_y(RID p_item, bool p_enable) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
- canvas_item->sort_y=p_enable;
-}
-
-
-void VisualServerRaster::canvas_item_add_clip_ignore(RID p_item, bool p_ignore) {
-
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- CanvasItem::CommandClipIgnore * ci = memnew( CanvasItem::CommandClipIgnore);
- ERR_FAIL_COND(!ci);
- ci->ignore=p_ignore;
-
- canvas_item->commands.push_back(ci);
-
-}
-
-void VisualServerRaster::canvas_item_clear(RID p_item) {
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
-
- canvas_item->clear();
-
-}
-
-void VisualServerRaster::canvas_item_raise(RID p_item) {
- VS_CHANGED;
- CanvasItem *canvas_item = canvas_item_owner.get( p_item );
- ERR_FAIL_COND(!canvas_item);
-
- if (canvas_item->parent.is_valid()) {
-
- if (canvas_owner.owns(canvas_item->parent)) {
-
- Canvas *canvas = canvas_owner.get(canvas_item->parent);
- int idx = canvas->find_item(canvas_item);
- ERR_FAIL_COND(idx<0);
- Canvas::ChildItem ci = canvas->child_items[idx];
- canvas->child_items.remove(idx);
- canvas->child_items.push_back(ci);
-
- } else if (canvas_item_owner.owns(canvas_item->parent)) {
-
- CanvasItem *item_owner = canvas_item_owner.get(canvas_item->parent);
- int idx = item_owner->child_items.find(canvas_item);
- ERR_FAIL_COND(idx<0);
- item_owner->child_items.remove(idx);
- item_owner->child_items.push_back(canvas_item);
-
- }
- }
-
-}
-
-/***** CANVAS LIGHT *******/
-
-RID VisualServerRaster::canvas_light_create() {
-
- Rasterizer::CanvasLight *clight = memnew( Rasterizer::CanvasLight );
- return canvas_light_owner.make_rid(clight);
-}
-
-void VisualServerRaster::canvas_light_attach_to_canvas(RID p_light,RID p_canvas){
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
-
- if (clight->canvas.is_valid()) {
-
- Canvas *canvas = canvas_owner.get(clight->canvas);
- canvas->lights.erase(clight);
- }
-
- if (!canvas_owner.owns(p_canvas))
- p_canvas;
- clight->canvas=p_canvas;
-
- if (clight->canvas.is_valid()) {
-
- Canvas *canvas = canvas_owner.get(clight->canvas);
- canvas->lights.insert(clight);
- }
-
-
-
-}
-void VisualServerRaster::canvas_light_set_enabled(RID p_light, bool p_enabled){
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
- clight->enabled=p_enabled;
-
-}
-void VisualServerRaster::canvas_light_set_transform(RID p_light, const Matrix32& p_transform){
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
- clight->xform=p_transform;
-
-}
-void VisualServerRaster::canvas_light_set_scale(RID p_light, float p_scale) {
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
- clight->scale=p_scale;
-
-}
-
-
-void VisualServerRaster::canvas_light_set_texture(RID p_light, RID p_texture){
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
- clight->texture=p_texture;
-
-}
-void VisualServerRaster::canvas_light_set_texture_offset(RID p_light, const Vector2& p_offset){
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
- clight->texture_offset=p_offset;
-
-}
-void VisualServerRaster::canvas_light_set_color(RID p_light, const Color& p_color){
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
- clight->color=p_color;
-
-
-}
-void VisualServerRaster::canvas_light_set_height(RID p_light, float p_height){
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
- clight->height=p_height;
-
-}
-
-void VisualServerRaster::canvas_light_set_energy(RID p_light, float p_energy){
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
- clight->energy=p_energy;
-
-}
-
-void VisualServerRaster::canvas_light_set_z_range(RID p_light, int p_min_z,int p_max_z){
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
- clight->z_min=p_min_z;
- clight->z_max=p_max_z;
-
-}
-
-void VisualServerRaster::canvas_light_set_layer_range(RID p_light, int p_min_layer,int p_max_layer) {
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
- clight->layer_min=p_min_layer;
- clight->layer_max=p_max_layer;
-
-}
-
-void VisualServerRaster::canvas_light_set_item_mask(RID p_light, int p_mask){
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
- clight->item_mask=p_mask;
-
-}
-
-void VisualServerRaster::canvas_light_set_item_shadow_mask(RID p_light, int p_mask){
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
- clight->item_shadow_mask=p_mask;
-
-}
-
-
-void VisualServerRaster::canvas_light_set_mode(RID p_light, CanvasLightMode p_mode) {
-
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
- clight->mode=p_mode;
-
-}
-void VisualServerRaster::canvas_light_set_shadow_enabled(RID p_light, bool p_enabled){
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
-
- if (clight->shadow_buffer.is_valid()==p_enabled)
- return;
- if (p_enabled) {
- clight->shadow_buffer=rasterizer->canvas_light_shadow_buffer_create(clight->shadow_buffer_size);
- } else {
- rasterizer->free(clight->shadow_buffer);
- clight->shadow_buffer;
-
- }
-
-}
-
-void VisualServerRaster::canvas_light_set_shadow_buffer_size(RID p_light, int p_size){
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
-
- ERR_FAIL_COND(p_size<32 || p_size>16384);
-
- clight->shadow_buffer_size=next_power_of_2(p_size);
-
-
- if (clight->shadow_buffer.is_valid()) {
- rasterizer->free(clight->shadow_buffer);
- clight->shadow_buffer=rasterizer->canvas_light_shadow_buffer_create(clight->shadow_buffer_size);
- }
-
-}
-
-void VisualServerRaster::canvas_light_set_shadow_esm_multiplier(RID p_light, float p_multiplier) {
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
- clight->shadow_esm_mult=p_multiplier;
-
-}
-
-void VisualServerRaster::canvas_light_set_shadow_color(RID p_light, const Color& p_color) {
-
- Rasterizer::CanvasLight *clight = canvas_light_owner.get(p_light);
- ERR_FAIL_COND(!clight);
- clight->shadow_color=p_color;
-
-}
-
-
-/****** CANVAS LIGHT OCCLUDER ******/
-
-RID VisualServerRaster::canvas_light_occluder_create() {
-
- Rasterizer::CanvasLightOccluderInstance *occluder = memnew( Rasterizer::CanvasLightOccluderInstance );
-
- return canvas_light_occluder_owner.make_rid( occluder );
-
-}
-
-void VisualServerRaster::canvas_light_occluder_attach_to_canvas(RID p_occluder,RID p_canvas) {
-
- Rasterizer::CanvasLightOccluderInstance *occluder = canvas_light_occluder_owner.get(p_occluder);
- ERR_FAIL_COND(!occluder);
-
- if (occluder->canvas.is_valid()) {
-
- Canvas *canvas = canvas_owner.get(occluder->canvas);
- canvas->occluders.erase(occluder);
- }
-
- if (!canvas_owner.owns(p_canvas))
- p_canvas;
-
- occluder->canvas=p_canvas;
-
- if (occluder->canvas.is_valid()) {
-
- Canvas *canvas = canvas_owner.get(occluder->canvas);
- canvas->occluders.insert(occluder);
- }
-}
-
-void VisualServerRaster::canvas_light_occluder_set_enabled(RID p_occluder,bool p_enabled){
-
- Rasterizer::CanvasLightOccluderInstance *occluder = canvas_light_occluder_owner.get(p_occluder);
- ERR_FAIL_COND(!occluder);
-
- occluder->enabled=p_enabled;
-
-}
-
-void VisualServerRaster::canvas_light_occluder_set_polygon(RID p_occluder,RID p_polygon) {
-
- Rasterizer::CanvasLightOccluderInstance *occluder = canvas_light_occluder_owner.get(p_occluder);
- ERR_FAIL_COND(!occluder);
-
- if (occluder->polygon.is_valid()) {
- CanvasLightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get(p_polygon);
- if (occluder_poly) {
- occluder_poly->owners.erase(occluder);
- }
- }
-
- occluder->polygon=p_polygon;
- occluder->polygon_buffer;
-
- if (occluder->polygon.is_valid()) {
- CanvasLightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get(p_polygon);
- if (!occluder_poly)
- occluder->polygon;
- ERR_FAIL_COND(!occluder_poly);
- occluder_poly->owners.insert(occluder);
- occluder->polygon_buffer=occluder_poly->occluder;
- occluder->aabb_cache=occluder_poly->aabb;
- occluder->cull_cache=occluder_poly->cull_mode;
- }
-
-}
-
-
-
-
-void VisualServerRaster::canvas_light_occluder_set_transform(RID p_occluder,const Matrix32& p_xform) {
-
- Rasterizer::CanvasLightOccluderInstance *occluder = canvas_light_occluder_owner.get(p_occluder);
- ERR_FAIL_COND(!occluder);
-
- occluder->xform=p_xform;
-
-}
-
-void VisualServerRaster::canvas_light_occluder_set_light_mask(RID p_occluder,int p_mask) {
-
- Rasterizer::CanvasLightOccluderInstance *occluder = canvas_light_occluder_owner.get(p_occluder);
- ERR_FAIL_COND(!occluder);
-
- occluder->light_mask=p_mask;
-
-}
-
-
-RID VisualServerRaster::canvas_occluder_polygon_create() {
-
- CanvasLightOccluderPolygon * occluder_poly = memnew( CanvasLightOccluderPolygon );
- occluder_poly->occluder=rasterizer->canvas_light_occluder_create();
- return canvas_light_occluder_polygon_owner.make_rid(occluder_poly);
-
-}
-
-void VisualServerRaster::canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const PoolVector<Vector2>& p_shape, bool p_close){
-
- if (p_shape.size()<3) {
- canvas_occluder_polygon_set_shape_as_lines(p_occluder_polygon,p_shape);
- return;
- }
-
- PoolVector<Vector2> lines;
- int lc = p_shape.size()*2;
-
- lines.resize(lc-(p_close?0:2));
- {
- PoolVector<Vector2>::Write w = lines.write();
- PoolVector<Vector2>::Read r = p_shape.read();
-
- int max=lc/2;
- if (!p_close) {
- max--;
- }
- for(int i=0;i<max;i++) {
-
- Vector2 a = r[i];
- Vector2 b = r[(i+1)%(lc/2)];
- w[i*2+0]=a;
- w[i*2+1]=b;
- }
-
- }
-
- canvas_occluder_polygon_set_shape_as_lines(p_occluder_polygon,lines);
-}
-
-void VisualServerRaster::canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon,const PoolVector<Vector2>& p_shape) {
-
- CanvasLightOccluderPolygon * occluder_poly = canvas_light_occluder_polygon_owner.get(p_occluder_polygon);
- ERR_FAIL_COND(!occluder_poly);
- ERR_FAIL_COND(p_shape.size()&1);
-
- int lc = p_shape.size();
- occluder_poly->aabb=Rect2();
- {
- PoolVector<Vector2>::Read r = p_shape.read();
- for(int i=0;i<lc;i++) {
- if (i==0)
- occluder_poly->aabb.pos=r[i];
- else
- occluder_poly->aabb.expand_to(r[i]);
- }
- }
-
- rasterizer->canvas_light_occluder_set_polylines(occluder_poly->occluder,p_shape);
- for( Set<Rasterizer::CanvasLightOccluderInstance*>::Element *E=occluder_poly->owners.front();E;E=E->next()) {
- E->get()->aabb_cache=occluder_poly->aabb;
- }
-}
-
-void VisualServerRaster::canvas_occluder_polygon_set_cull_mode(RID p_occluder_polygon,CanvasOccluderPolygonCullMode p_mode) {
-
- CanvasLightOccluderPolygon * occluder_poly = canvas_light_occluder_polygon_owner.get(p_occluder_polygon);
- ERR_FAIL_COND(!occluder_poly);
- occluder_poly->cull_mode=p_mode;
- for( Set<Rasterizer::CanvasLightOccluderInstance*>::Element *E=occluder_poly->owners.front();E;E=E->next()) {
- E->get()->cull_cache=p_mode;
- }
-
-}
-
-RID VisualServerRaster::canvas_item_material_create() {
-
- Rasterizer::ShaderMaterial *material = memnew( Rasterizer::ShaderMaterial );
- return canvas_item_material_owner.make_rid(material);
-
-}
-
-void VisualServerRaster::canvas_item_material_set_shader(RID p_material, RID p_shader){
-
- VS_CHANGED;
- Rasterizer::ShaderMaterial *material = canvas_item_material_owner.get( p_material );
- ERR_FAIL_COND(!material);
- material->shader=p_shader;
-
-}
-void VisualServerRaster::canvas_item_material_set_shader_param(RID p_material, const StringName& p_param, const Variant& p_value){
-
- VS_CHANGED;
- Rasterizer::ShaderMaterial *material = canvas_item_material_owner.get( p_material );
- ERR_FAIL_COND(!material);
- if (p_value.get_type()==Variant::NIL)
- material->shader_param.erase(p_param);
- else
- material->shader_param[p_param]=p_value;
-
-
-}
-Variant VisualServerRaster::canvas_item_material_get_shader_param(RID p_material, const StringName& p_param) const{
- Rasterizer::ShaderMaterial *material = canvas_item_material_owner.get( p_material );
- ERR_FAIL_COND_V(!material,Variant());
- if (!material->shader_param.has(p_param)) {
- ERR_FAIL_COND_V(!material->shader.is_valid(),Variant());
- return rasterizer->shader_get_default_param(material->shader,p_param);
- }
-
- return material->shader_param[p_param];
-}
-
-void VisualServerRaster::canvas_item_material_set_shading_mode(RID p_material, CanvasItemShadingMode p_mode) {
-
- VS_CHANGED;
- Rasterizer::ShaderMaterial *material = canvas_item_material_owner.get( p_material );
- ERR_FAIL_COND(!material);
- material->shading_mode=p_mode;
-
-}
-
-
-/******** CANVAS *********/
-
-
-void VisualServerRaster::cursor_set_rotation(float p_rotation, int p_cursor) {
- VS_CHANGED;
- ERR_FAIL_INDEX(p_cursor, MAX_CURSORS);
-
- cursors[p_cursor].rot = p_rotation;
-};
-
-void VisualServerRaster::cursor_set_texture(RID p_texture, const Point2 &p_center_offset, int p_cursor, const Rect2 &p_region) {
- VS_CHANGED;
- ERR_FAIL_INDEX(p_cursor, MAX_CURSORS);
-
- cursors[p_cursor].texture = p_texture;
- cursors[p_cursor].center = p_center_offset;
- cursors[p_cursor].region = p_region;
-};
-
-void VisualServerRaster::cursor_set_visible(bool p_visible, int p_cursor) {
- VS_CHANGED;
- ERR_FAIL_INDEX(p_cursor, MAX_CURSORS);
-
- cursors[p_cursor].visible = p_visible;
-};
-
-void VisualServerRaster::cursor_set_pos(const Point2& p_pos, int p_cursor) {
-
- ERR_FAIL_INDEX(p_cursor, MAX_CURSORS);
- if (cursors[p_cursor].pos==p_pos)
- return;
- VS_CHANGED;
- cursors[p_cursor].pos = p_pos;
-};
-
-
-void VisualServerRaster::black_bars_set_margins(int p_left, int p_top, int p_right, int p_bottom) {
-
- black_margin[MARGIN_LEFT]=p_left;
- black_margin[MARGIN_TOP]=p_top;
- black_margin[MARGIN_RIGHT]=p_right;
- black_margin[MARGIN_BOTTOM]=p_bottom;
-}
-
-void VisualServerRaster::black_bars_set_images(RID p_left, RID p_top, RID p_right, RID p_bottom) {
-
- black_image[MARGIN_LEFT]=p_left;
- black_image[MARGIN_TOP]=p_top;
- black_image[MARGIN_RIGHT]=p_right;
- black_image[MARGIN_BOTTOM]=p_bottom;
-}
-
-void VisualServerRaster::_free_attached_instances(RID p_rid,bool p_free_scenario) {
-
- Map< RID, Set<RID> >::Element * E = instance_dependency_map.find( p_rid );
-
- if (E) {
- // has instances
- while( E->get().size() ) {
- // erase all attached instances
- if (p_free_scenario)
- instance_set_scenario( E->get().front()->get(), RID() );
- else
- instance_set_base( E->get().front()->get(), RID() );
-
- }
- }
-
- instance_dependency_map.erase(p_rid);
-
-}
-
-void VisualServerRaster::custom_shade_model_set_shader(int p_model, RID p_shader) {
-
- VS_CHANGED;
- //rasterizer->custom_shade_model_set_shader(p_model,p_shader);
-}
-
-RID VisualServerRaster::custom_shade_model_get_shader(int p_model) const {
-
- //return rasterizer->custom_shade_model_get_shader(p_model);
- return RID();
-
-}
-void VisualServerRaster::custom_shade_model_set_name(int p_model, const String& p_name) {
-
- //rasterizer->custom_shade_model_set_name(p_model,p_name);
-
-}
-String VisualServerRaster::custom_shade_model_get_name(int p_model) const {
-
- //return rasterizer->custom_shade_model_get_name(p_model);
- return "";
-}
-void VisualServerRaster::custom_shade_model_set_param_info(int p_model, const List<PropertyInfo>& p_info) {
-
- VS_CHANGED;
- //rasterizer->custom_shade_model_set_param_info(p_model,p_info);
-}
-void VisualServerRaster::custom_shade_model_get_param_info(int p_model, List<PropertyInfo>* p_info) const {
-
- //rasterizer->custom_shade_model_get_param_info(p_model,p_info);
-}
-
-void VisualServerRaster::free( RID p_rid ) {
-
- VS_CHANGED;
-
- if (rasterizer->is_texture(p_rid) || rasterizer->is_material(p_rid) || rasterizer->is_shader(p_rid) || rasterizer->is_environment(p_rid)) {
-
- rasterizer->free(p_rid);
- } else if (rasterizer->is_skeleton(p_rid)) {
-
- Map< RID, Set<Instance*> >::Element *E=skeleton_dependency_map.find(p_rid);
-
- if (E) {
- //detach skeletons
- for (Set<Instance*>::Element *F=E->get().front();F;F=F->next()) {
-
- F->get()->data.skeleton;
- }
- skeleton_dependency_map.erase(E);
- }
-
- rasterizer->free(p_rid);
- } else if (rasterizer->is_mesh(p_rid) || rasterizer->is_multimesh(p_rid) || rasterizer->is_light(p_rid) || rasterizer->is_particles(p_rid) || rasterizer->is_immediate(p_rid)) {
- //delete the resource
-
- _free_attached_instances(p_rid);
- rasterizer->free(p_rid);
- } else if (room_owner.owns(p_rid)) {
-
- _free_attached_instances(p_rid);
- Room *room = room_owner.get(p_rid);
- ERR_FAIL_COND(!room);
- room_owner.free(p_rid);
- memdelete(room);
-
-
- } else if (portal_owner.owns(p_rid)) {
-
- _free_attached_instances(p_rid);
-
- Portal *portal = portal_owner.get(p_rid);
- ERR_FAIL_COND(!portal);
- portal_owner.free(p_rid);
- memdelete(portal);
-
- } else if (baked_light_owner.owns(p_rid)) {
-
- _free_attached_instances(p_rid);
-
- BakedLight *baked_light = baked_light_owner.get(p_rid);
- ERR_FAIL_COND(!baked_light);
- if (baked_light->data.octree_texture.is_valid())
- rasterizer->free(baked_light->data.octree_texture);
- baked_light_owner.free(p_rid);
- memdelete(baked_light);
-
- } else if (baked_light_sampler_owner.owns(p_rid)) {
-
- _free_attached_instances(p_rid);
-
- BakedLightSampler *baked_light_sampler = baked_light_sampler_owner.get(p_rid);
- ERR_FAIL_COND(!baked_light_sampler);
- /*
- if (baked_light->data.octree_texture.is_valid())
- rasterizer->free(baked_light->data.octree_texture);
- */
- baked_light_sampler_owner.free(p_rid);
- memdelete(baked_light_sampler);
-
- } else if (camera_owner.owns(p_rid)) {
- // delete te camera
-
- Camera *camera = camera_owner.get(p_rid);
- ERR_FAIL_COND(!camera);
-
- camera_owner.free( p_rid );
- memdelete(camera);
-
- } else if (viewport_owner.owns(p_rid)) {
- // delete the viewport
-
- Viewport *viewport = viewport_owner.get( p_rid );
- ERR_FAIL_COND(!viewport);
-
- //Viewport *parent=NULL;
-
- rasterizer->free(viewport->viewport_data);
- if (viewport->render_target.is_valid()) {
-
- rasterizer->free(viewport->render_target);
- }
-
- if (viewport->update_list.in_list())
- viewport_update_list.remove(&viewport->update_list);
- if (screen_viewports.has(p_rid))
- screen_viewports.erase(p_rid);
-
- while(viewport->canvas_map.size()) {
-
- Canvas *c = viewport->canvas_map.front()->get().canvas;
- c->viewports.erase(p_rid);
-
- viewport->canvas_map.erase(viewport->canvas_map.front());
- }
-
-
- viewport_owner.free(p_rid);
- memdelete(viewport);
-
- } else if (instance_owner.owns(p_rid)) {
- // delete the instance
-
- _update_instances(); // be sure
-
- Instance *instance = instance_owner.get(p_rid);
- ERR_FAIL_COND(!instance);
-
- instance_set_room(p_rid,RID());
- instance_set_scenario(p_rid,RID());
- instance_geometry_set_baked_light(p_rid,RID());
- instance_geometry_set_baked_light_sampler(p_rid,RID());
- instance_set_base(p_rid,RID());
-
- if (instance->data.skeleton.is_valid())
- instance_attach_skeleton(p_rid,RID());
-
- instance_owner.free(p_rid);
- memdelete(instance);
-
- } else if (canvas_owner.owns(p_rid)) {
-
- Canvas *canvas = canvas_owner.get(p_rid);
- ERR_FAIL_COND(!canvas);
-
- while(canvas->viewports.size()) {
-
- Viewport *vp = viewport_owner.get(canvas->viewports.front()->get());
- ERR_FAIL_COND(!vp);
-
- Map<RID,Viewport::CanvasData>::Element *E=vp->canvas_map.find(p_rid);
- ERR_FAIL_COND(!E);
- vp->canvas_map.erase(p_rid);
-
- canvas->viewports.erase( canvas->viewports.front() );
- }
-
- for (int i=0;i<canvas->child_items.size();i++) {
-
- canvas->child_items[i].item->parent;
- }
-
- for (Set<Rasterizer::CanvasLight*>::Element *E=canvas->lights.front();E;E=E->next()) {
-
- E->get()->canvas;
- }
-
- for (Set<Rasterizer::CanvasLightOccluderInstance*>::Element *E=canvas->occluders.front();E;E=E->next()) {
-
- E->get()->canvas;
- }
-
- canvas_owner.free( p_rid );
-
- memdelete( canvas );
-
- } else if (canvas_item_owner.owns(p_rid)) {
-
- CanvasItem *canvas_item = canvas_item_owner.get(p_rid);
- ERR_FAIL_COND(!canvas_item);
-
- if (canvas_item->parent.is_valid()) {
-
- if (canvas_owner.owns(canvas_item->parent)) {
-
- Canvas *canvas = canvas_owner.get(canvas_item->parent);
- canvas->erase_item(canvas_item);
- } else if (canvas_item_owner.owns(canvas_item->parent)) {
-
- CanvasItem *item_owner = canvas_item_owner.get(canvas_item->parent);
- item_owner->child_items.erase(canvas_item);
-
- }
- }
-
- for (int i=0;i<canvas_item->child_items.size();i++) {
-
- canvas_item->child_items[i]->parent;
- }
-
- if (canvas_item->material) {
- canvas_item->material->owners.erase(canvas_item);
- }
-
- canvas_item_owner.free( p_rid );
-
- memdelete( canvas_item );
-
- } else if (canvas_item_material_owner.owns(p_rid)) {
-
- Rasterizer::ShaderMaterial *material = canvas_item_material_owner.get(p_rid);
- ERR_FAIL_COND(!material);
- for(Set<Rasterizer::CanvasItem*>::Element *E=material->owners.front();E;E=E->next()) {
-
- E->get()->material=NULL;
- }
-
- canvas_item_material_owner.free(p_rid);
- memdelete(material);
-
- } else if (canvas_light_owner.owns(p_rid)) {
-
- Rasterizer::CanvasLight *canvas_light = canvas_light_owner.get(p_rid);
- ERR_FAIL_COND(!canvas_light);
-
- if (canvas_light->canvas.is_valid()) {
- Canvas* canvas = canvas_owner.get(canvas_light->canvas);
- if (canvas)
- canvas->lights.erase(canvas_light);
- }
-
- if (canvas_light->shadow_buffer.is_valid())
- rasterizer->free(canvas_light->shadow_buffer);
-
- canvas_light_owner.free( p_rid );
- memdelete( canvas_light );
-
- } else if (canvas_light_occluder_owner.owns(p_rid)) {
-
- Rasterizer::CanvasLightOccluderInstance *occluder = canvas_light_occluder_owner.get(p_rid);
- ERR_FAIL_COND(!occluder);
-
- if (occluder->polygon.is_valid()) {
-
- CanvasLightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get(occluder->polygon);
- if (occluder_poly) {
- occluder_poly->owners.erase(occluder);
- }
-
- }
-
- if (occluder->canvas.is_valid() && canvas_owner.owns(occluder->canvas)) {
-
- Canvas *canvas = canvas_owner.get(occluder->canvas);
- canvas->occluders.erase(occluder);
-
- }
-
- canvas_light_occluder_owner.free( p_rid );
- memdelete(occluder);
-
- } else if (canvas_light_occluder_polygon_owner.owns(p_rid)) {
-
- CanvasLightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.get(p_rid);
- ERR_FAIL_COND(!occluder_poly);
- rasterizer->free(occluder_poly->occluder);
-
- while(occluder_poly->owners.size()) {
-
- occluder_poly->owners.front()->get()->polygon;
- occluder_poly->owners.erase( occluder_poly->owners.front() );
- }
-
- canvas_light_occluder_polygon_owner.free( p_rid );
- memdelete(occluder_poly);
-
- } else if (scenario_owner.owns(p_rid)) {
-
- Scenario *scenario=scenario_owner.get(p_rid);
- ERR_FAIL_COND(!scenario);
-
- _update_instances(); // be sure
- _free_attached_instances(p_rid,true);
-
- //rasterizer->free( scenario->environment );
- scenario_owner.free(p_rid);
- memdelete(scenario);
-
- } else {
-
- ERR_FAIL();
- }
-
-}
-
-
-
-void VisualServerRaster::_instance_draw(Instance *p_instance) {
-
- if (p_instance->light_cache_dirty) {
- int l=0;
- //add positional lights
- InstanceSet::Element *LE=p_instance->lights.front();
- p_instance->data.light_instances.resize(p_instance->lights.size());
- while(LE) {
-
- p_instance->data.light_instances[l++]=LE->get()->light_info->instance;
- LE=LE->next();
- }
- p_instance->light_cache_dirty=false;
- }
-
-
- switch(p_instance->base_type) {
-
- case INSTANCE_MESH: {
- rasterizer->add_mesh(p_instance->base_rid, &p_instance->data);
- } break;
- case INSTANCE_MULTIMESH: {
- rasterizer->add_multimesh(p_instance->base_rid, &p_instance->data);
- } break;
- case INSTANCE_IMMEDIATE: {
- rasterizer->add_immediate(p_instance->base_rid, &p_instance->data);
- } break;
- case INSTANCE_PARTICLES: {
- rasterizer->add_particles(p_instance->particles_info->instance, &p_instance->data);
- } break;
- default: {};
- }
-}
-
-
-Vector<Vector3> VisualServerRaster::_camera_generate_endpoints(Instance *p_light,Camera *p_camera,float p_range_min, float p_range_max) {
-
- // setup a camera matrix for that range!
- CameraMatrix camera_matrix;
-
- switch(p_camera->type) {
-
- case Camera::ORTHOGONAL: {
-
- camera_matrix.set_orthogonal(p_camera->size,viewport_rect.width / (float)viewport_rect.height,p_range_min,p_range_max,p_camera->vaspect);
- } break;
- case Camera::PERSPECTIVE: {
-
- camera_matrix.set_perspective(
- p_camera->fov,
- viewport_rect.width / (float)viewport_rect.height,
- p_range_min,
- p_range_max,
- p_camera->vaspect
- );
-
- } break;
- }
-
- //obtain the frustum endpoints
-
- Vector<Vector3> endpoints;
- endpoints.resize(8);
- bool res = camera_matrix.get_endpoints(p_camera->transform,&endpoints[0]);
- ERR_FAIL_COND_V(!res,Vector<Vector3>());
-
- return endpoints;
-}
-
-Vector<Plane> VisualServerRaster::_camera_generate_orthogonal_planes(Instance *p_light,Camera *p_camera,float p_range_min, float p_range_max) {
-
- Vector<Vector3> endpoints=_camera_generate_endpoints(p_light,p_camera,p_range_min,p_range_max); // frustum plane endpoints
- ERR_FAIL_COND_V(endpoints.empty(),Vector<Plane>());
-
- // obtain the light frustm ranges (given endpoints)
-
- Vector3 x_vec=p_light->data.transform.basis.get_axis( Vector3::AXIS_X ).normalized();
- Vector3 y_vec=p_light->data.transform.basis.get_axis( Vector3::AXIS_Y ).normalized();
- Vector3 z_vec=p_light->data.transform.basis.get_axis( Vector3::AXIS_Z ).normalized();
-
- float x_min,x_max;
- float y_min,y_max;
- float z_min,z_max;
-
- for(int j=0;j<8;j++) {
-
- float d_x=x_vec.dot(endpoints[j]);
- float d_y=y_vec.dot(endpoints[j]);
- float d_z=z_vec.dot(endpoints[j]);
-
- if (j==0 || d_x<x_min)
- x_min=d_x;
- if (j==0 || d_x>x_max)
- x_max=d_x;
-
- if (j==0 || d_y<y_min)
- y_min=d_y;
- if (j==0 || d_y>y_max)
- y_max=d_y;
-
- if (j==0 || d_z<z_min)
- z_min=d_z;
- if (j==0 || d_z>z_max)
- z_max=d_z;
-
-
- }
- //now that we now all ranges, we can proceed to make the light frustum planes, for culling octree
-
- Vector<Plane> light_frustum_planes;
- light_frustum_planes.resize(6);
-
- //right/left
- light_frustum_planes[0]=Plane( x_vec, x_max );
- light_frustum_planes[1]=Plane( -x_vec, -x_min );
- //top/bottom
- light_frustum_planes[2]=Plane( y_vec, y_max );
- light_frustum_planes[3]=Plane( -y_vec, -y_min );
- //near/far
- light_frustum_planes[4]=Plane( z_vec, z_max+1e6 );
- light_frustum_planes[5]=Plane( -z_vec, -z_min ); // z_min is ok, since casters further than far-light plane are not needed
-
- //TODO@ add more actual frustum planes to minimize get
-
- return light_frustum_planes;
-
-}
-void VisualServerRaster::_light_instance_update_pssm_shadow(Instance *p_light,Scenario *p_scenario,Camera *p_camera,const CullRange& p_cull_range) {
-
- int splits = rasterizer->light_instance_get_shadow_passes( p_light->light_info->instance );
-
- float split_weight=rasterizer->light_directional_get_shadow_param(p_light->base_rid,LIGHT_DIRECTIONAL_SHADOW_PARAM_PSSM_SPLIT_WEIGHT);
-
-
- float distances[5];
- float texsize=rasterizer->light_instance_get_shadow_size( p_light->light_info->instance );
-
- //float cull_min=p_cull_range.min;
- //float cull_max=p_cull_range.max;
-
-
- bool overlap = rasterizer->light_instance_get_pssm_shadow_overlap(p_light->light_info->instance);
-
- float cull_min=p_camera->znear;
- float cull_max=p_camera->zfar;
- float max_dist = rasterizer->light_directional_get_shadow_param(p_light->base_rid,VS::LIGHT_DIRECTIONAL_SHADOW_PARAM_MAX_DISTANCE);
- if (max_dist>0.0)
- cull_max=MIN(cull_max,max_dist);
-
- for(int i = 0; i < splits; i++) {
- float idm = i / (float)splits;
- float lg = cull_min * Math::pow(cull_max/cull_min, idm);
- float uniform = cull_min + (cull_max - cull_min) * idm;
- distances[i] = lg * split_weight + uniform * (1.0 - split_weight);
-
- }
-
- distances[0]=cull_min;
- distances[splits]=cull_max;
-
- for (int i=0;i<splits;i++) {
-
- // setup a camera matrix for that range!
- CameraMatrix camera_matrix;
-
- switch(p_camera->type) {
-
- case Camera::ORTHOGONAL: {
-
- camera_matrix.set_orthogonal(
- p_camera->size,
- viewport_rect.width / (float)viewport_rect.height,
- distances[(i==0 || !overlap )?i:i-1],
- distances[i+1],
- p_camera->vaspect
-
- );
- } break;
- case Camera::PERSPECTIVE: {
-
-
- camera_matrix.set_perspective(
- p_camera->fov,
- viewport_rect.width / (float)viewport_rect.height,
- distances[(i==0 || !overlap )?i:i-1],
- distances[i+1],
- p_camera->vaspect
-
- );
-
- } break;
- }
-
- //obtain the frustum endpoints
-
- Vector3 endpoints[8]; // frustum plane endpoints
- bool res = camera_matrix.get_endpoints(p_camera->transform,endpoints);
- ERR_CONTINUE(!res);
-
- // obtain the light frustm ranges (given endpoints)
-
- Vector3 x_vec=p_light->data.transform.basis.get_axis( Vector3::AXIS_X ).normalized();
- Vector3 y_vec=p_light->data.transform.basis.get_axis( Vector3::AXIS_Y ).normalized();
- Vector3 z_vec=p_light->data.transform.basis.get_axis( Vector3::AXIS_Z ).normalized();
- //z_vec points agsint the camera, like in default opengl
-
- float x_min,x_max;
- float y_min,y_max;
- float z_min,z_max;
-
- float x_min_cam,x_max_cam;
- float y_min_cam,y_max_cam;
- float z_min_cam,z_max_cam;
-
-
- //used for culling
- for(int j=0;j<8;j++) {
-
- float d_x=x_vec.dot(endpoints[j]);
- float d_y=y_vec.dot(endpoints[j]);
- float d_z=z_vec.dot(endpoints[j]);
-
- if (j==0 || d_x<x_min)
- x_min=d_x;
- if (j==0 || d_x>x_max)
- x_max=d_x;
-
- if (j==0 || d_y<y_min)
- y_min=d_y;
- if (j==0 || d_y>y_max)
- y_max=d_y;
-
- if (j==0 || d_z<z_min)
- z_min=d_z;
- if (j==0 || d_z>z_max)
- z_max=d_z;
-
-
- }
-
-
-
-
-
- {
- //camera viewport stuff
- //this trick here is what stabilizes the shadow (make potential jaggies to not move)
- //at the cost of some wasted resolution. Still the quality increase is very well worth it
-
-
- Vector3 center;
-
- for(int j=0;j<8;j++) {
-
- center+=endpoints[j];
- }
- center/=8.0;
-
- //center=x_vec*(x_max-x_min)*0.5 + y_vec*(y_max-y_min)*0.5 + z_vec*(z_max-z_min)*0.5;
-
- float radius=0;
-
- for(int j=0;j<8;j++) {
-
- float d = center.distance_to(endpoints[j]);
- if (d>radius)
- radius=d;
- }
-
-
- radius *= texsize/(texsize-2.0); //add a texel by each side, so stepified texture will always fit
-
- x_max_cam=x_vec.dot(center)+radius;
- x_min_cam=x_vec.dot(center)-radius;
- y_max_cam=y_vec.dot(center)+radius;
- y_min_cam=y_vec.dot(center)-radius;
- z_max_cam=z_vec.dot(center)+radius;
- z_min_cam=z_vec.dot(center)-radius;
-
- float unit = radius*2.0/texsize;
-
- x_max_cam=Math::stepify(x_max_cam,unit);
- x_min_cam=Math::stepify(x_min_cam,unit);
- y_max_cam=Math::stepify(y_max_cam,unit);
- y_min_cam=Math::stepify(y_min_cam,unit);
-
- }
-
- //now that we now all ranges, we can proceed to make the light frustum planes, for culling octree
-
- Vector<Plane> light_frustum_planes;
- light_frustum_planes.resize(6);
-
- //right/left
- light_frustum_planes[0]=Plane( x_vec, x_max );
- light_frustum_planes[1]=Plane( -x_vec, -x_min );
- //top/bottom
- light_frustum_planes[2]=Plane( y_vec, y_max );
- light_frustum_planes[3]=Plane( -y_vec, -y_min );
- //near/far
- light_frustum_planes[4]=Plane( z_vec, z_max+1e6 );
- light_frustum_planes[5]=Plane( -z_vec, -z_min ); // z_min is ok, since casters further than far-light plane are not needed
-
- int caster_cull_count = p_scenario->octree.cull_convex(light_frustum_planes,instance_shadow_cull_result,MAX_INSTANCE_CULL,INSTANCE_GEOMETRY_MASK);
-
- // a pre pass will need to be needed to determine the actual z-near to be used
- for(int j=0;j<caster_cull_count;j++) {
-
- float min,max;
- Instance *ins=instance_shadow_cull_result[j];
- if (!ins->visible || ins->data.cast_shadows == VS::SHADOW_CASTING_SETTING_OFF)
- continue;
- ins->transformed_aabb.project_range_in_plane(Plane(z_vec,0),min,max);
-
- if (max>z_max)
- z_max=max;
- }
-
- {
- CameraMatrix ortho_camera;
- real_t half_x = (x_max_cam-x_min_cam) * 0.5;
- real_t half_y = (y_max_cam-y_min_cam) * 0.5;
-
-
- ortho_camera.set_orthogonal( -half_x, half_x,-half_y,half_y, 0, (z_max-z_min_cam) );
-
- Transform ortho_transform;
- ortho_transform.basis=p_light->data.transform.basis;
- ortho_transform.origin=x_vec*(x_min_cam+half_x)+y_vec*(y_min_cam+half_y)+z_vec*z_max;
-
- rasterizer->light_instance_set_shadow_transform(p_light->light_info->instance, i, ortho_camera, ortho_transform,distances[i],distances[i+1] );
- }
-
- rasterizer->begin_shadow_map( p_light->light_info->instance, i );
-
- for (int j=0;j<caster_cull_count;j++) {
-
- Instance *instance = instance_shadow_cull_result[j];
- if (!instance->visible || instance->data.cast_shadows==VS::SHADOW_CASTING_SETTING_OFF)
- continue;
- _instance_draw(instance);
- }
-
- rasterizer->end_shadow_map();
-
-
- }
-
-
-}
-
-
-CameraMatrix _lispm_look( const Vector3 pos, const Vector3 dir, const Vector3 up) {
-
- Vector3 dirN;
- Vector3 upN;
- Vector3 lftN;
-
- lftN=dir.cross(up);
- lftN.normalize();
-
- upN=lftN.cross(dir);
- upN.normalize();
- dirN=dir.normalized();
-
- CameraMatrix cmout;
- float *output=&cmout.matrix[0][0];
- output[ 0] = lftN[0];
- output[ 1] = upN[0];
- output[ 2] = -dirN[0];
- output[ 3] = 0.0;
-
- output[ 4] = lftN[1];
- output[ 5] = upN[1];
- output[ 6] = -dirN[1];
- output[ 7] = 0.0;
-
- output[ 8] = lftN[2];
- output[ 9] = upN[2];
- output[10] = -dirN[2];
- output[11] = 0.0;
-
- output[12] = -lftN.dot(pos);
- output[13] = -upN.dot(pos);
- output[14] = dirN.dot(pos);
- output[15] = 1.0;
-
- return cmout;
-}
-
-#if 1
-
-void VisualServerRaster::_light_instance_update_lispsm_shadow(Instance *p_light,Scenario *p_scenario,Camera *p_camera,const CullRange& p_cull_range) {
-
- Vector3 light_vec = -p_light->data.transform.basis.get_axis(2);
- Vector3 view_vec = -p_camera->transform.basis.get_axis(2);
-
- float near_dist=1;
-
- Vector<Plane> light_frustum_planes = _camera_generate_orthogonal_planes(p_light,p_camera,p_cull_range.min,p_cull_range.max);
- int caster_count = p_scenario->octree.cull_convex(light_frustum_planes,instance_shadow_cull_result,MAX_INSTANCE_CULL,INSTANCE_GEOMETRY_MASK);
-
- // this could be faster by just getting supports from the AABBs..
- // but, safer to do as the original implementation explains for now..
-
- Vector<Vector3> caster_pointcloud;
- caster_pointcloud.resize(caster_count*8);
- int caster_pointcloud_size=0;
-
- {
-
- //fill pointcloud
- Vector3* caster_pointcloud_ptr=&caster_pointcloud[0];
-
- for(int i=0;i<caster_count;i++) {
-
- Instance *ins = instance_shadow_cull_result[i];
- if (!ins->visible || ins->data.cast_shadows == VS::SHADOW_CASTING_SETTING_OFF)
- continue;
-
- for(int j=0;j<8;j++) {
-
- Vector3 v = ins->aabb.get_endpoint(j);
- v = ins->data.transform.xform(v);
- caster_pointcloud_ptr[caster_pointcloud_size+j]=v;
- }
-
- caster_pointcloud_size+=8;
-
- }
- }
-
- // now generate a pointcloud that contains the maximum bound (camera extruded by light)
-
- Vector<Vector3> camera_pointcloud = _camera_generate_endpoints(p_light,p_camera,p_cull_range.min,p_cull_range.max);
- int cpcsize=camera_pointcloud.size();
- camera_pointcloud.resize( cpcsize*2 );
-
- for(int i=0;i<cpcsize;i++) {
-
- camera_pointcloud[i+cpcsize]=camera_pointcloud[i]-light_vec*1000;
- }
-
-
-
- // Vector<Vector3> frustum_points=_camera_generate_endpoints(p_light,p_camera,p_cull_range.min,p_cull_range.max);
-
-
- // compute the "light-space" basis, using the algorithm described in the paper
- // note: since bodyB is defined in eye space, all of these vectors should also be defined in eye space
-
-
- Vector3 eye = p_camera->transform.origin;
- Vector3 up = light_vec.cross(view_vec).cross(light_vec).normalized();
-
-
- CameraMatrix light_space_basis = _lispm_look(eye,light_vec,up);
-
- AABB light_space_aabb;
-
-
- { //create an optimal AABB from both the camera pointcloud and the objects pointcloud
- AABB light_space_pointcloud_aabb;
- AABB light_space_camera_aabb;
- //xform pointcloud
- const Vector3* caster_pointcloud_ptr=&caster_pointcloud[0];
-
- for(int i=0;i<caster_pointcloud_size;i++) {
-
- Vector3 p = light_space_basis.xform(caster_pointcloud_ptr[i]);
- if (i==0) {
- light_space_pointcloud_aabb.pos=p;
- } else {
- light_space_pointcloud_aabb.expand_to(p);
- }
- }
- for(int i=0;i<camera_pointcloud.size();i++) {
-
- Vector3 p = light_space_basis.xform(camera_pointcloud[i]);
- if (i==0) {
- light_space_camera_aabb.pos=p;
- } else {
- light_space_camera_aabb.expand_to(p);
- }
- }
-
- light_space_aabb=light_space_pointcloud_aabb.intersection(light_space_camera_aabb);
- }
-
- float lvdp = light_vec.dot(view_vec);
-
- float sin_gamma = Math::sqrt(1.0-lvdp*lvdp);
- //use the formulas of the paper to get n (and f)
- float factor = 1.0/sin_gamma;
- float z_n = factor*near_dist; //often 1
- float d = Math::abs(light_space_aabb.size.y); //perspective transform depth //light space y extents
- float z_f = z_n + d*sin_gamma;
- float n = (z_n+Math::sqrt(z_f*z_n))/sin_gamma;
- float f = n+d;
-
- Vector3 pos = eye - up*(n-near_dist);
-
- CameraMatrix light_space_basis2 = _lispm_look(pos,light_vec,up);
- //Transform light_space_basis2;
- //light_space_basis2.set_look_at(pos,light_vec-pos,up);
- //light_space_basis2.affine_invert();
-
- //one possibility for a simple perspective transformation matrix
- //with the two parameters n(near) and f(far) in y direction
-
- CameraMatrix lisp_matrix;
- lisp_matrix.matrix[1][1]=(f+n)/(f-n);
- lisp_matrix.matrix[3][1]=-2*f*n/(f-n);
- lisp_matrix.matrix[1][3]=1;
- lisp_matrix.matrix[3][3]=0;
-
- CameraMatrix projection = lisp_matrix * light_space_basis2;
- //CameraMatrix projection = light_space_basis2 * lisp_matrix;
-
-
- AABB proj_space_aabb;
-
- {
-
- AABB proj_space_pointcloud_aabb;
- AABB proj_space_camera_aabb;
- //xform pointcloud
- Vector3* caster_pointcloud_ptr=&caster_pointcloud[0];
- for(int i=0;i<caster_pointcloud_size;i++) {
-
- Vector3 p = projection.xform(caster_pointcloud_ptr[i]);
- if (i==0) {
- proj_space_pointcloud_aabb.pos=p;
- } else {
- proj_space_pointcloud_aabb.expand_to(p);
- }
- }
-
- for(int i=0;i<camera_pointcloud.size();i++) {
-
- Vector3 p = projection.xform(camera_pointcloud[i]);
- if (i==0) {
- proj_space_camera_aabb.pos=p;
- } else {
- proj_space_camera_aabb.expand_to(p);
- }
- }
-
- //proj_space_aabb=proj_space_pointcloud_aabb.intersection_with(proj_space_camera_aabb);
- proj_space_aabb=proj_space_pointcloud_aabb;
- }
-
- projection.scale_translate_to_fit(proj_space_aabb);
- projection=projection * lisp_matrix;
-
- CameraMatrix scale;
- scale.make_scale(Vector3(1.0,1.0,-1.0)); // transform to left handed
-
- projection=scale * projection;
-
- rasterizer->light_instance_set_shadow_transform(p_light->light_info->instance,0, projection , light_space_basis2.inverse() );
-
- rasterizer->begin_shadow_map( p_light->light_info->instance, 0 );
-
- for(int i=0;i<caster_count;i++) {
-
- Instance *instance = instance_shadow_cull_result[i];
-
- if (!instance->visible || instance->data.cast_shadows == VS::SHADOW_CASTING_SETTING_OFF)
- continue;
- _instance_draw(instance);
- }
-
- rasterizer->end_shadow_map();
-
-
-}
-
-#else
-
-
-void VisualServerRaster::_light_instance_update_lispsm_shadow(Instance *p_light,Scenario *p_scenario,Camera *p_camera,const CullRange& p_cull_range) {
-
- /* STEP 1: GENERATE LIGHT TRANSFORM */
-
-
-
- Vector3 light_vec = -p_light->data.transform.basis.get_axis(2);
- Vector3 view_vec = -p_camera->transform.basis.get_axis(2);
- float viewdot = Math::absf(light_vec.dot(view_vec));
-
- Vector3 up = light_vec.cross(view_vec).cross(light_vec).normalized();
-
- Transform light_transform;
- light_transform.set_look_at(Vector3(),light_vec,up);
-
-
- /* STEP 2: GENERATE WORDLSPACE PLANES AND VECTORS*/
- float range_min=0.01; //p_cull_range.min
- float range_max=20;//p_cull_range.max;
-
- Vector<Vector3> camera_endpoints=_camera_generate_endpoints(p_light,p_camera,range_min,range_max); // frustum plane endpoints
- ERR_FAIL_COND(camera_endpoints.empty());
-
- // obtain the light frustm ranges (given endpoints)
-
-
- Vector3 light_x_vec=light_transform.basis.get_axis( Vector3::AXIS_X ).normalized();
- Vector3 light_y_vec=light_transform.basis.get_axis( Vector3::AXIS_Y ).normalized();
- Vector3 light_z_vec=light_transform.basis.get_axis( Vector3::AXIS_Z ).normalized();
-
- Vector3 light_axis_max;
- Vector3 light_axis_min;
-
- for(int j=0;j<8;j++) {
-
- float d_x=light_x_vec.dot(camera_endpoints[j]);
- float d_y=light_y_vec.dot(camera_endpoints[j]);
- float d_z=light_z_vec.dot(camera_endpoints[j]);
-
- if (j==0 || d_x<light_axis_min.x)
- light_axis_min.x=d_x;
- if (j==0 || d_x>light_axis_max.x)
- light_axis_max.x=d_x;
-
- if (j==0 || d_y<light_axis_min.y)
- light_axis_min.y=d_y;
- if (j==0 || d_y>light_axis_max.y)
- light_axis_max.y=d_y;
-
- if (j==0 || d_z<light_axis_min.z)
- light_axis_min.z=d_z;
- if (j==0 || d_z>light_axis_max.z)
- light_axis_max.z=d_z;
-
-
- }
-
- //now that we now all ranges, we can proceed to make the light frustum planes, for culling octree
-
- Vector<Plane> light_cull_planes;
- light_cull_planes.resize(6);
-
-
- //right/left
- light_cull_planes[0]=Plane( light_x_vec, light_axis_max.x );
- light_cull_planes[1]=Plane( -light_x_vec, -light_axis_min.x );
- //top/bottom
- light_cull_planes[2]=Plane( light_y_vec, light_axis_max.y );
- light_cull_planes[3]=Plane( -light_y_vec, -light_axis_min.y );
- //near/far
- light_cull_planes[4]=Plane( light_z_vec, light_axis_max.z+1e6 );
- light_cull_planes[5]=Plane( -light_z_vec, -light_axis_min.z ); // z_min is ok, since casters further than far-light plane are not needed
-
-
- /* STEP 3: CULL CASTERS */
-
- int caster_count = p_scenario->octree.cull_convex(light_cull_planes,instance_shadow_cull_result,MAX_INSTANCE_CULL,INSTANCE_GEOMETRY_MASK);
-
- /* STEP 4: ADJUST FAR Z PLANE */
-
- float caster_max_z=1e-1;
- for(int i=0;i<caster_count;i++) {
-
- Instance *ins=instance_shadow_cull_result[i];
- if (!ins->visible || ins->cast_shadows==VS::SHADOW_CASTING_SETTING_OFF)
- continue;
-
- //@TODO optimize using support mapping
- for(int j=0;j<8;j++) {
-
- Vector3 v=ins->data.transform.xform(ins->aabb.get_endpoint(j));
- float d = light_z_vec.dot(v);
- if (d>caster_max_z)
- caster_max_z=d;
-
- }
-
- }
-
- float expand = caster_max_z-light_axis_max.z;
- if (expand<0)
- expand=0;
- light_axis_max.z=MAX(caster_max_z,light_axis_max.z);
-
- /* STEP 5: CREATE ORTHOGONAL PROJECTION */
-
- CameraMatrix light_projection;
-
- real_t half_x = (light_axis_max.x-light_axis_min.x) * 0.5;
- real_t half_y = (light_axis_max.y-light_axis_min.y) * 0.5;
- light_projection.set_orthogonal( -half_x, half_x,half_y, -half_y, 0, (light_axis_max.z-light_axis_min.z) );
- light_transform.origin=light_x_vec*(light_axis_min.x+half_x)+light_y_vec*(light_axis_min.y+half_y)+light_z_vec*light_axis_max.z;
-
-
- if (/*false &&*/ viewdot<0.96) {
-
- float lvdp = light_vec.dot(view_vec);
-
- float near_dist=1.0;
- float sin_gamma = Math::sqrt(1.0-lvdp*lvdp);
- //use the formulas of the paper to get n (and f)
- float factor = 1.0/sin_gamma;
- float z_n = factor*near_dist; //often 1
- float d = Math::abs(light_axis_max.y-light_axis_min.y); //perspective transform depth //light space y extents
- float z_f = z_n + d*sin_gamma;
- float n = (z_n+Math::sqrt(z_f*z_n))/sin_gamma;
- float f = n+d;
-
- CameraMatrix lisp_matrix;
- lisp_matrix.matrix[1][1]=(f+n)/(f-n);
- lisp_matrix.matrix[3][1]=-2*f*n/(f-n);
- lisp_matrix.matrix[1][3]=1;
- lisp_matrix.matrix[3][3]=0;
-
- Vector3 pos = p_camera->transform.origin - up*(n-near_dist);
-
- CameraMatrix world2light = _lispm_look(pos,light_vec,up);
- CameraMatrix projection = lisp_matrix * world2light;
-
- AABB projection_bounds;
- for(int i=0;i<camera_endpoints.size();i++) {
-
- Vector3 p=camera_endpoints[i];
- if (i==0)
- projection_bounds.pos=projection.xform(p);
- else
- projection_bounds.expand_to(projection.xform(p));
-
- projection_bounds.expand_to(projection.xform(p+light_vec*-expand));
- }
-
- CameraMatrix scaletrans;
- scaletrans.scale_translate_to_fit(projection_bounds);
- projection=scaletrans * lisp_matrix;
-
- CameraMatrix scale;
- scale.make_scale(Vector3(1.0,1.0,-1.0)); // transform to left handed
-
- projection=scale * projection;
-
-
- rasterizer->light_instance_set_shadow_transform(p_light->light_info->instance,0, projection, world2light.inverse(), viewdot);
-
- } else {
- //orthogonal
- rasterizer->light_instance_set_shadow_transform(p_light->light_info->instance,0, light_projection , light_transform, viewdot);
- }
-
- rasterizer->begin_shadow_map( p_light->light_info->instance, 0 );
-
- for(int i=0;i<caster_count;i++) {
-
- Instance *instance = instance_shadow_cull_result[i];
-
- if (!instance->visible || instance->cast_shadows==VS::SHADOW_CASTING_SETTING_OFF)
- continue;
- _instance_draw(instance);
- }
-
- rasterizer->end_shadow_map();
-
-}
-
-#endif
-
-
-void VisualServerRaster::_light_instance_update_shadow(Instance *p_light,Scenario *p_scenario,Camera *p_camera,const CullRange& p_cull_range) {
-
-
-
- if (!rasterizer->shadow_allocate_near( p_light->light_info->instance ))
- return; // shadow could not be updated
-
-
- /* VisualServerRaster supports for many shadow techniques, using the one the rasterizer requests */
-
- Rasterizer::ShadowType shadow_type = rasterizer->light_instance_get_shadow_type(p_light->light_info->instance);
-
- switch(shadow_type) {
-
- case Rasterizer::SHADOW_SIMPLE: {
- /* SPOT SHADOW */
-
-
- rasterizer->begin_shadow_map( p_light->light_info->instance, 0 );
-
- //using this one ensures that raster deferred will have it
-
- float far = rasterizer->light_get_var( p_light->base_rid, VS::LIGHT_PARAM_RADIUS);
-
- float angle = rasterizer->light_get_var( p_light->base_rid, VS::LIGHT_PARAM_SPOT_ANGLE );
-
- CameraMatrix cm;
- cm.set_perspective( angle*2.0, 1.0, 0.001, far );
-
- Vector<Plane> planes = cm.get_projection_planes(p_light->data.transform);
- int cull_count = p_scenario->octree.cull_convex(planes,instance_shadow_cull_result,MAX_INSTANCE_CULL,INSTANCE_GEOMETRY_MASK);
-
-
- for (int i=0;i<cull_count;i++) {
-
- Instance *instance = instance_shadow_cull_result[i];
- if (!instance->visible || instance->data.cast_shadows == VS::SHADOW_CASTING_SETTING_OFF)
- continue;
- _instance_draw(instance);
- }
-
- rasterizer->end_shadow_map();
-
- } break;
- case Rasterizer::SHADOW_DUAL_PARABOLOID: {
-
- /* OMNI SHADOW */
-
- int passes = rasterizer->light_instance_get_shadow_passes( p_light->light_info->instance );
-
- if (passes==2) {
-
- for(int i=0;i<2;i++) {
-
- rasterizer->begin_shadow_map( p_light->light_info->instance, i );
-
-
- //using this one ensures that raster deferred will have it
-
- float radius = rasterizer->light_get_var( p_light->base_rid, VS::LIGHT_PARAM_RADIUS);
-
- float z =i==0?-1:1;
- Vector<Plane> planes;
- planes.resize(5);
- planes[0]=p_light->data.transform.xform(Plane(Vector3(0,0,z),radius));
- planes[1]=p_light->data.transform.xform(Plane(Vector3(1,0,z).normalized(),radius));
- planes[2]=p_light->data.transform.xform(Plane(Vector3(-1,0,z).normalized(),radius));
- planes[3]=p_light->data.transform.xform(Plane(Vector3(0,1,z).normalized(),radius));
- planes[4]=p_light->data.transform.xform(Plane(Vector3(0,-1,z).normalized(),radius));
-
-
- int cull_count = p_scenario->octree.cull_convex(planes,instance_shadow_cull_result,MAX_INSTANCE_CULL,INSTANCE_GEOMETRY_MASK);
-
-
- for (int j=0;j<cull_count;j++) {
-
- Instance *instance = instance_shadow_cull_result[j];
- if (!instance->visible || instance->data.cast_shadows == VS::SHADOW_CASTING_SETTING_OFF)
- continue;
-
- _instance_draw(instance);
- }
-
- rasterizer->end_shadow_map();
- }
- } else if (passes==1) {
- //one go
-
-
-
- }
-
- } break;
- case Rasterizer::SHADOW_CUBE: {
-
- // todo
- } break;
- case Rasterizer::SHADOW_ORTHOGONAL: {
-
- _light_instance_update_pssm_shadow(p_light,p_scenario,p_camera,p_cull_range);
- } break;
- case Rasterizer::SHADOW_PSSM: {
-
- _light_instance_update_pssm_shadow(p_light,p_scenario,p_camera,p_cull_range);
- } break;
- case Rasterizer::SHADOW_PSM: {
-
- _light_instance_update_lispsm_shadow(p_light,p_scenario,p_camera,p_cull_range);
- // todo
- } break;
- default: {}
- }
-
-}
-
-void VisualServerRaster::_portal_disconnect(Instance *p_portal,bool p_cleanup) {
-
- if (p_portal->portal_info->connected) {
-
- //disconnect first
- p_portal->portal_info->connected->portal_info->connected=NULL;
- p_portal->portal_info->connected=NULL;
-
- }
-
- if (p_portal->room && p_portal->room->room) {
-
- if (p_cleanup) {
-
- p_portal->room->room->room_info->disconnected_child_portals.erase(p_portal);
- //p_portal->room->room->room_info->disconnected_child_portals.erase(p_portal);
- } else {
- p_portal->room->room->room_info->disconnected_child_portals.insert(p_portal);
- }
- }
-
-}
-
-void VisualServerRaster::_instance_validate_autorooms(Instance *p_geometry) {
-
- if (p_geometry->auto_rooms.size()==0)
- return;
-
- p_geometry->valid_auto_rooms.clear();
-
- int point_count = aabb_random_points.size();
- const Vector3 * src_points = &aabb_random_points[0];
-
- for(Set<Instance*>::Element *E=p_geometry->valid_auto_rooms.front();E;E=E->next()) {
-
- Instance *room = E->get();
- Vector3 *dst_points=&transformed_aabb_random_points[0];
-
- //generate points
- for(int i=0;i<point_count;i++) {
-
- dst_points[i] = room->room_info->affine_inverse.xform(p_geometry->data.transform.xform((src_points[i]*p_geometry->transformed_aabb.size)+p_geometry->transformed_aabb.pos));
- }
-
- int pass = room->room_info->room->bounds.get_points_inside(dst_points,point_count);
-
- float ratio = pass;
- if( point_count != 0 ) {
- ratio /= (float)point_count;
- }
-
- if (ratio>0.5) // should make some constant
- p_geometry->valid_auto_rooms.insert(room);
- }
-}
-
-void VisualServerRaster::_portal_attempt_connect(Instance *p_portal) {
-
-
- _portal_disconnect(p_portal);
-
- Vector3 A_norm = p_portal->data.transform.basis.get_axis(Vector3::AXIS_Z).normalized();
- Plane A_plane( p_portal->data.transform.origin, A_norm );
- float A_surface = p_portal->portal_info->portal->bounds.get_area();
- if (A_surface==0)
- return; //wtf
-
- Instance *found=NULL;
- Transform affine_inverse = p_portal->data.transform.affine_inverse();
-
- for(Set<Instance*>::Element *E=p_portal->portal_info->candidate_set.front();E;E=E->next()) {
-
- Instance *B = E->get();
-
- if (B->portal_info->connected)
- continue; // in use
-
- Vector3 B_norm = B->data.transform.basis.get_axis(Vector3::AXIS_Z).normalized();
-
- // check that they are in front of another
- float dot = A_norm.dot(-B_norm);
-
- if (dot<0.707) // 45 degrees, TODO unharcode this
- continue;
-
- // check the max distance to the other portal
-
- bool valid=true;
-
- Rect2 local_bounds;
-
- for(int i=0;i<B->portal_info->portal->shape.size();i++) {
-
- Point2 point2 = B->portal_info->portal->shape[i];
-
- Vector3 point = B->data.transform.xform( Vector3( point2.x, point2.y, 0 ) );
-
- float dist = Math::abs(A_plane.distance_to(point));
-
- if (
- dist>p_portal->portal_info->portal->connect_range ||
- dist>B->portal_info->portal->connect_range ) {
- valid=false;
- break;
- }
-
-
- Vector3 point_local = affine_inverse.xform(A_plane.project(point));
- point2 = Point2(point_local.x,point_local.y);
-
- if (i==0)
- local_bounds.pos=point2;
- else
- local_bounds.expand_to(point2);
-
-
- }
-
- if (!valid)
- continue;
-
- float B_surface = B->portal_info->portal->bounds.get_area();
- if (B_surface==0)
- continue; //wtf
-
- float clip_area = p_portal->portal_info->portal->bounds.clip(local_bounds).get_area();
-
-
- //check that most of the area is shared
-
- if ( (clip_area/A_surface) < 0.5 || (clip_area/B_surface) < 0.5) // TODO change for something else
- continue;
-
- found=B;
- break;
-
-
-
- }
-
-
- if (!found) {
-
- if (p_portal->room && p_portal->room->room) {
-
- p_portal->room->room->room_info->disconnected_child_portals.insert(p_portal);
- }
-
- return;
- }
-
- p_portal->portal_info->connected=found;
- found->portal_info->connected=p_portal;
-
-
-}
-
-void* VisualServerRaster::instance_pair(void *p_self, OctreeElementID, Instance *p_A,int, OctreeElementID, Instance *p_B,int) {
-
- VisualServerRaster *self = (VisualServerRaster*)p_self;
- Instance *A = p_A;
- Instance *B = p_B;
-
- if (A->base_type==INSTANCE_PORTAL) {
-
- ERR_FAIL_COND_V( B->base_type!=INSTANCE_PORTAL,NULL );
-
- A->portal_info->candidate_set.insert(B);
- B->portal_info->candidate_set.insert(A);
-
- self->_portal_attempt_connect(A);
- //attempt to conncet portal A (will go through B anyway)
- //this is a little hackish, but works fine in practice
-
- } else if (A->base_type==INSTANCE_BAKED_LIGHT || B->base_type==INSTANCE_BAKED_LIGHT) {
-
- if (B->base_type==INSTANCE_BAKED_LIGHT) {
- SWAP(A,B);
- }
-
- ERR_FAIL_COND_V(B->base_type!=INSTANCE_BAKED_LIGHT_SAMPLER,NULL);
- B->baked_light_sampler_info->baked_lights.insert(A);
-
- } else if (A->base_type==INSTANCE_ROOM || B->base_type==INSTANCE_ROOM) {
-
- if (B->base_type==INSTANCE_ROOM)
- SWAP(A,B);
-
- ERR_FAIL_COND_V(! ((1<<B->base_type)&INSTANCE_GEOMETRY_MASK ),NULL);
-
- B->auto_rooms.insert(A);
- A->room_info->owned_autoroom_geometry.insert(B);
-
- self->_instance_validate_autorooms(B);
-
-
- } else {
-
- if (B->base_type==INSTANCE_LIGHT) {
-
- SWAP(A,B);
- } else if (A->base_type!=INSTANCE_LIGHT) {
- return NULL;
- }
-
-
- A->light_info->affected.insert(B);
- B->lights.insert(A);
- B->light_cache_dirty=true;
- }
-
- return NULL;
-
-}
-void VisualServerRaster::instance_unpair(void *p_self, OctreeElementID, Instance *p_A,int, OctreeElementID, Instance *p_B,int,void*) {
-
- VisualServerRaster *self = (VisualServerRaster*)p_self;
- Instance *A = p_A;
- Instance *B = p_B;
-
- if (A->base_type==INSTANCE_PORTAL) {
-
- ERR_FAIL_COND( B->base_type!=INSTANCE_PORTAL );
-
-
- A->portal_info->candidate_set.erase(B);
- B->portal_info->candidate_set.erase(A);
-
- //after disconnecting them, see if they can connect again
- self->_portal_attempt_connect(A);
- self->_portal_attempt_connect(B);
-
- } else if (A->base_type==INSTANCE_BAKED_LIGHT || B->base_type==INSTANCE_BAKED_LIGHT) {
-
- if (B->base_type==INSTANCE_BAKED_LIGHT) {
- SWAP(A,B);
- }
-
- ERR_FAIL_COND(B->base_type!=INSTANCE_BAKED_LIGHT_SAMPLER);
- B->baked_light_sampler_info->baked_lights.erase(A);
-
- } else if (A->base_type==INSTANCE_ROOM || B->base_type==INSTANCE_ROOM) {
-
- if (B->base_type==INSTANCE_ROOM)
- SWAP(A,B);
-
- ERR_FAIL_COND(! ((1<<B->base_type)&INSTANCE_GEOMETRY_MASK ));
-
- B->auto_rooms.erase(A);
- B->valid_auto_rooms.erase(A);
- A->room_info->owned_autoroom_geometry.erase(B);
-
- }else {
-
-
- if (B->base_type==INSTANCE_LIGHT) {
-
- SWAP(A,B);
- } else if (A->base_type!=INSTANCE_LIGHT) {
- return;
- }
-
-
- A->light_info->affected.erase(B);
- B->lights.erase(A);
- B->light_cache_dirty=true;
- }
-}
-
-bool VisualServerRaster::_test_portal_cull(Camera *p_camera, Instance *p_from_portal, Instance *p_to_portal) {
-
-
- int src_point_count=p_from_portal->portal_info->transformed_point_cache.size();
- int dst_point_count=p_to_portal->portal_info->transformed_point_cache.size();
-
- if (src_point_count<2 || dst_point_count<2)
- return false;
-
- const Vector3 *src_points=&p_from_portal->portal_info->transformed_point_cache[0];
- const Vector3 *dst_points=&p_to_portal->portal_info->transformed_point_cache[0];
-
- bool outside=false;
-
- bool clockwise = !p_from_portal->portal_info->plane_cache.is_point_over(p_camera->transform.origin);
-
- for(int i=0;i<src_point_count;i++) {
-
- const Vector3& point_prev = src_points[i?(i-1):(src_point_count-1)];
- const Vector3& point = src_points[i];
-
- Plane p = clockwise?Plane(p_camera->transform.origin,point,point_prev):Plane(p_camera->transform.origin,point_prev,point);
-
- bool all_over=true;
-
- for(int j=0;j<dst_point_count;j++) {
-
- if (!p.is_point_over(dst_points[j])) {
-
- all_over=false;
- break;
- }
-
- }
-
- if (all_over) {
- outside=true;
- break;
- }
-
- }
-
- return !outside;
-
-}
-
-void VisualServerRaster::_cull_portal(Camera *p_camera, Instance *p_portal,Instance *p_from_portal) {
-
- ERR_FAIL_COND(!p_portal->scenario); //scenario outside
-
- Instance *portal = p_portal;
-
- if (!portal->room) {
-
- return; //portals need all to belong to a room, it may be unconfigured yet
- } else if (portal->last_render_pass!=render_pass) {
-
- return; //invalid portal, ignore
- } else if (portal->portal_info->last_visited_pass==render_pass) {
-
- return; //portal already visited
- } else if (portal==p_from_portal) {
-
- return; // came from this portal, don't even bother testing
- }
-
- /* TEST DISABLE DISTANCE */
-
- float disable_distance = p_portal->portal_info->portal->disable_distance;
- if (disable_distance) {
- //has disable distance..
- float distance = p_camera->transform.origin.distance_to(portal->data.transform.origin);
- if (disable_distance < distance) {
-
- return;
- }
- }
-
- /* TEST PORTAL NOT FACING OPTIMIZATION */
-
-
- if (p_portal->portal_info->connected) {
- //connected portal means, it must face against the camera to be seen
- if (p_portal->portal_info->plane_cache.is_point_over(p_camera->transform.origin)) { //portal facing against camera (exterior)
-
- return;
- }
- } else {
- //disconencted portals (go from room to parent room or exterior) must face towards the canera
- if (!p_portal->portal_info->plane_cache.is_point_over(p_camera->transform.origin)) { //portal facing against camera (exterior)
-
- return;
- }
- }
-
- if (p_from_portal && !_test_portal_cull(p_camera, p_from_portal, portal)) {
- return; // portal not visible (culled)
- }
-
- portal->portal_info->last_visited_pass=render_pass;
-
- if (portal->portal_info->connected) {
-
- //interior<->interior portal
- Instance *to_room = portal->portal_info->connected->room;
- if (!to_room) {
- return; //wtf.. oh well, connected to a roomless (invalid) portal
- }
-
- _cull_room(p_camera, to_room, portal->portal_info->connected);
-
- } else {
- //to exterior/to parent roomportal
-
- Instance *parent_room = portal->room->room;
-
- _cull_room(p_camera, parent_room, portal);
- }
-
-}
-
-void VisualServerRaster::_cull_room(Camera *p_camera, Instance *p_room,Instance *p_from_portal) {
-
- if (p_room==NULL) {
- //exterior
- exterior_visited=true;
-
- for(int i=0;i<exterior_portal_cull_count;i++) {
-
- _cull_portal(p_camera, exterior_portal_cull_result[i],p_from_portal);
- }
-
- } else {
-
- ERR_FAIL_COND(!p_room->scenario);
-
- if (p_room->last_render_pass!=render_pass)
- return; //this room is invalid
-
- //interior
- //first of all, validate the room
- p_room->room_info->last_visited_pass=render_pass;
- //see about going around portals
- if (!p_room->room_info->room->occlude_exterior)
- exterior_visited=true;
-
- for(List<Instance*>::Element * E=p_room->room_info->owned_portal_instances.front();E;E=E->next()) {
-
- _cull_portal(p_camera, E->get(),p_from_portal);
-
- }
-
- for(Set<Instance*>::Element * E=p_room->room_info->disconnected_child_portals.front();E;E=E->next()) {
-
- _cull_portal(p_camera, E->get(),p_from_portal);
-
- }
-
-
- }
-
-}
-
-void VisualServerRaster::_process_sampled_light(const Transform& p_camera,Instance *p_sampled_light,bool p_linear_colorspace) {
-
-
- BakedLightSampler *sampler_opts = p_sampled_light->baked_light_sampler_info->sampler;
- int res = sampler_opts->resolution;
- int dp_size = res*res*2;
- Color * dp_map = (Color*)alloca( sizeof(Color)*dp_size); //allocate the dual parabolloid colors
- Vector3 * dp_normals = (Vector3*)alloca( sizeof(Vector3)*dp_size); //allocate the dual parabolloid normals
- const Vector3 * dp_src_normals = p_sampled_light->baked_light_sampler_info->sampler->dp_cache.ptr();
-
-
- if (!p_sampled_light->baked_light_sampler_info->sampled_light.is_valid() || p_sampled_light->baked_light_sampler_info->resolution!=sampler_opts->resolution) {
- if (p_sampled_light->baked_light_sampler_info->sampled_light.is_valid()) {
- rasterizer->free(p_sampled_light->baked_light_sampler_info->sampled_light);
- }
-
- p_sampled_light->baked_light_sampler_info->resolution=sampler_opts->resolution;
- p_sampled_light->baked_light_sampler_info->sampled_light=rasterizer->sampled_light_dp_create(sampler_opts->resolution,sampler_opts->resolution*2);
-
-
- }
-
-
- zeromem(dp_map,sizeof(Color)*dp_size);
- bool valid=false;
- int samples=0;
-
-
- for(Set<Instance*>::Element *E=p_sampled_light->baked_light_sampler_info->baked_lights.front();E;E=E->next()) {
-
- Instance *bl = E->get();
- if (bl->baked_light_info->baked_light->sampler.size()==0)
- continue; //not usable
-
-
- Matrix3 norm_xform = bl->baked_light_info->affine_inverse.basis;//.inverse();
- for(int i=0;i<dp_size;i++) {
- dp_normals[i]=norm_xform.xform(dp_src_normals[i]).normalized();
- }
-
- //normals in place
-
-
- //sample octree
-
- float r = sampler_opts->params[VS::BAKED_LIGHT_SAMPLER_RADIUS];
- float att = sampler_opts->params[VS::BAKED_LIGHT_SAMPLER_ATTENUATION];
- float str = sampler_opts->params[VS::BAKED_LIGHT_SAMPLER_STRENGTH];
- Vector3 s = p_sampled_light->data.transform.basis.get_scale();
-
- r*=MAX(MAX(s.x,s.y),s.z);
- AABB sample_aabb= bl->data.transform.affine_inverse().xform(AABB(Vector3(-r,-r,-r)+p_sampled_light->data.transform.origin,Vector3(r*2,r*2,r*2)));
- //ok got octree local AABB
-
- PoolVector<int>::Read rp = bl->baked_light_info->baked_light->sampler.read();
- const int *rptr = rp.ptr();
-
- int first = rptr[1];
- int depth = rptr[2];
- bool islinear = rptr[3]&1;
- depth+=1;
-
- AABB aabb;
- aabb.pos.x=decode_float((const uint8_t*)&rptr[4]);
- aabb.pos.y=decode_float((const uint8_t*)&rptr[5]);
- aabb.pos.z=decode_float((const uint8_t*)&rptr[6]);
- aabb.size.x=decode_float((const uint8_t*)&rptr[7]);
- aabb.size.y=decode_float((const uint8_t*)&rptr[8]);
- aabb.size.z=decode_float((const uint8_t*)&rptr[9]);
-
- uint32_t *stack=(uint32_t*)alloca(depth*sizeof(uint32_t));
- int *stack_ptr=(int*)alloca(depth*sizeof(int));
- AABB *aabb_stack=(AABB*)alloca(depth*sizeof(AABB));
-
- stack[0]=0;
- stack_ptr[0]=first;
- aabb_stack[0]=aabb;
- Vector3 center = sample_aabb.pos + sample_aabb.size * 0.5;
-
-
- int stack_pos=0;
- Color max_col;
-
- //int reso = sampler_opts->params[VS::BAKED_LIGHT_SAMPLER_DETAIL_RATIO];
-
- int lalimit = sample_aabb.get_longest_axis_index();
- float limit = sampler_opts->params[VS::BAKED_LIGHT_SAMPLER_DETAIL_RATIO]*sample_aabb.size[lalimit];
-
-
- while(true) {
-
-
- bool leaf = (rptr[ stack_ptr[stack_pos] ]>>16)==0;
-
- if (aabb_stack[stack_pos].size[lalimit]<limit) {
- leaf=true;
- }
-
-
- if (leaf) {
-
- Vector3 from = aabb_stack[stack_pos].pos + aabb_stack[stack_pos].size * 0.5;
- Vector3 norm = (from-center).normalized();
-
-
- Color col;
- col.r = ((rptr[ stack_ptr[stack_pos] ]&0xFFFF)/256.0);
- col.g = ((rptr[ stack_ptr[stack_pos]+1 ]>>16)/256.0);
- col.b = ((rptr[ stack_ptr[stack_pos]+1 ]&0xFFFF)/256.0);
-
-
- max_col.r = MAX(max_col.r,col.r);
- max_col.g = MAX(max_col.g,col.g);
- max_col.b = MAX(max_col.b,col.b);
-
- if (!islinear && p_linear_colorspace) {
- col=col.to_linear();
- }
-
- float distance;
-
- if (aabb_stack[stack_pos].has_point(center)) {
- distance=0;
- } else {
-
- Vector3 support = aabb_stack[stack_pos].get_support(norm);
- distance = Math::absf(norm.dot(support)-norm.dot(center));
-
- }
-
- if (distance>r)
- distance=r;
-
- float mult = Math::pow(1.0-distance/r,att)*str;
- if (mult>0) {
- col.r*=mult;
- col.g*=mult;
- col.b*=mult;
-
-
-
- for(int i=0;i<dp_size;i++) {
- float mult2 = norm.dot(dp_normals[i]);
- if (mult2<0)
- mult2=0;
- Color col2(col.r*mult2,col.g*mult2,col.b*mult2,1.0);
- dp_map[i].r=MAX(dp_map[i].r,col2.r);
- dp_map[i].g=MAX(dp_map[i].g,col2.g);
- dp_map[i].b=MAX(dp_map[i].b,col2.b);
- }
-
- }
-
- samples++;
- //nothing is valid unless you hit a leaf
- valid=true;
- stack_pos--;
- } else if ((stack[stack_pos]&0xFF)<8) {
-
- int i = stack[stack_pos]&0xFF;
- int base = (stack[stack_pos]>>8);
-
- if (!((rptr[ stack_ptr[stack_pos] ]>>16)&(1<<i))) {
- //no bit, no test
- stack[stack_pos]=(base<<8)+(i+1);
- continue;
- }
-
- stack[stack_pos]=((base+1)<<8)+(i+1);
-
- AABB child_aabb = aabb_stack[stack_pos];
- child_aabb.size*=0.5;
- if (i&1)
- child_aabb.pos.x+=child_aabb.size.x;
- if (i&2)
- child_aabb.pos.y+=child_aabb.size.y;
- if (i&4)
- child_aabb.pos.z+=child_aabb.size.z;
-
- if (!child_aabb.intersects(sample_aabb)) {
- continue;
- }
-
- if (child_aabb.encloses(sample_aabb)) {
- stack[stack_pos]=(base<<8)|8; //don't test the rest
- }
-
- stack_pos++;
- ERR_FAIL_COND(stack_pos>=depth);
-
- stack[stack_pos]=0;
- stack_ptr[stack_pos]=rptr[ stack_ptr[stack_pos-1]+2+base ];
- aabb_stack[stack_pos]=child_aabb;
- } else {
- stack_pos--;
- if (stack_pos<0)
- break;
- }
- }
-
-
- }
-
- //print_line("samples "+itos(samples) );
-
- if (valid) {
-
- for(int i=0;i<res;i++) {
- //average seams to avoid aliasing
- {
- //top
- int ofs1 = i;
- int ofs2 = dp_size-res+i;
- Color avg(
- (dp_map[ofs1].r+dp_map[ofs2].r)*0.5,
- (dp_map[ofs1].g+dp_map[ofs2].g)*0.5,
- (dp_map[ofs1].b+dp_map[ofs2].b)*0.5,
- 1.0
- );
- dp_map[ofs1]=avg;
- dp_map[ofs2]=avg;
- }
- {
- //bottom
- int ofs1 = res*res-res+i;
- int ofs2 = res*res+i;
- Color avg(
- (dp_map[ofs1].r+dp_map[ofs2].r)*0.5,
- (dp_map[ofs1].g+dp_map[ofs2].g)*0.5,
- (dp_map[ofs1].b+dp_map[ofs2].b)*0.5,
- 1.0
- );
- dp_map[ofs1]=avg;
- dp_map[ofs2]=avg;
- }
- {
- //left
- int ofs1 = i*res;
- int ofs2 = res*res+(res-i-1)*res;
- Color avg(
- (dp_map[ofs1].r+dp_map[ofs2].r)*0.5,
- (dp_map[ofs1].g+dp_map[ofs2].g)*0.5,
- (dp_map[ofs1].b+dp_map[ofs2].b)*0.5,
- 1.0
- );
- dp_map[ofs1]=avg;
- dp_map[ofs2]=avg;
- }
- {
- //right
- int ofs1 = i*res+(res-1);
- int ofs2 = res*res+(res-i-1)*res+(res-1);
- Color avg(
- (dp_map[ofs1].r+dp_map[ofs2].r)*0.5,
- (dp_map[ofs1].g+dp_map[ofs2].g)*0.5,
- (dp_map[ofs1].b+dp_map[ofs2].b)*0.5,
- 1.0
- );
- dp_map[ofs1]=avg;
- dp_map[ofs2]=avg;
- }
-
- }
-
- rasterizer->sampled_light_dp_update(p_sampled_light->baked_light_sampler_info->sampled_light,dp_map,1.0);
- for(Set<Instance*>::Element *F=p_sampled_light->baked_light_sampler_info->owned_instances.front();F;F=F->next()) {
-
- F->get()->data.sampled_light=p_sampled_light->baked_light_sampler_info->sampled_light;
- }
-
-
- } else {
-
- for(Set<Instance*>::Element *F=p_sampled_light->baked_light_sampler_info->owned_instances.front();F;F=F->next()) {
-
- F->get()->data.sampled_light; //do not use because nothing close
- }
- }
-
-
-
-
-/*
- highp vec3 vtx = vertex_interp;
- vtx.z*=dual_paraboloid.y; //side to affect
- vtx.z+=0.01;
- dp_clip=vtx.z;
- highp float len=length( vtx );
- vtx=normalize(vtx);
- vtx.xy/=1.0+vtx.z;
- vtx.z = len*dual_paraboloid.x; // it's a reciprocal(len - z_near) / (z_far - z_near);
- vtx+=normalize(vtx)*0.025;
- vtx.z = vtx.z * 2.0 - 1.0; // fit to clipspace
- vertex_interp=vtx;
-*/
-
-
-
-
-}
-
-
-void VisualServerRaster::_render_no_camera(Viewport *p_viewport,Camera *p_camera, Scenario *p_scenario) {
- RID environment;
- if (p_scenario->environment.is_valid())
- environment=p_scenario->environment;
- else
- environment=p_scenario->fallback_environment;
-
- rasterizer->set_camera(Transform(),CameraMatrix(),false);
- rasterizer->begin_scene(p_viewport->viewport_data,environment,p_scenario->debug);
- rasterizer->set_viewport(viewport_rect);
- rasterizer->end_scene();
-}
-
-
-void VisualServerRaster::_render_camera(Viewport *p_viewport,Camera *p_camera, Scenario *p_scenario) {
-
-
- render_pass++;
- uint32_t camera_layer_mask=p_camera->visible_layers;
-
- /* STEP 1 - SETUP CAMERA */
- CameraMatrix camera_matrix;
- bool ortho=false;
-
- switch(p_camera->type) {
- case Camera::ORTHOGONAL: {
-
- camera_matrix.set_orthogonal(
- p_camera->size,
- viewport_rect.width / (float)viewport_rect.height,
- p_camera->znear,
- p_camera->zfar,
- p_camera->vaspect
-
- );
- ortho=true;
- } break;
- case Camera::PERSPECTIVE: {
-
- camera_matrix.set_perspective(
- p_camera->fov,
- viewport_rect.width / (float)viewport_rect.height,
- p_camera->znear,
- p_camera->zfar,
- p_camera->vaspect
-
- );
- ortho=false;
-
- } break;
- }
-
-
- rasterizer->set_camera(p_camera->transform, camera_matrix,ortho);
-
- Vector<Plane> planes = camera_matrix.get_projection_planes(p_camera->transform);
-
- CullRange cull_range; // cull range is used for PSSM, and having an idea of the rendering depth
- cull_range.nearp=Plane(p_camera->transform.origin,-p_camera->transform.basis.get_axis(2).normalized());
- cull_range.z_near=camera_matrix.get_z_near();
- cull_range.z_far=camera_matrix.get_z_far();
- cull_range.min=cull_range.z_far;
- cull_range.max=cull_range.z_near;
-
- /* STEP 2 - CULL */
- int cull_count = p_scenario->octree.cull_convex(planes,instance_cull_result,MAX_INSTANCE_CULL);
- light_cull_count=0;
- light_samplers_culled=0;
-
-/* print_line("OT: "+rtos( (OS::get_singleton()->get_ticks_usec()-t)/1000.0));
- print_line("OTO: "+itos(p_scenario->octree.get_octant_count()));
- //print_line("OTE: "+itos(p_scenario->octree.get_elem_count()));
- print_line("OTP: "+itos(p_scenario->octree.get_pair_count()));
-*/
-
- /* STEP 3 - PROCESS PORTALS, VALIDATE ROOMS */
-
-
- // compute portals
-
- exterior_visited=false;
- exterior_portal_cull_count=0;
-
- if (room_cull_enabled) {
- for(int i=0;i<cull_count;i++) {
-
- Instance *ins = instance_cull_result[i];
- ins->last_render_pass=render_pass;
-
- if (ins->base_type!=INSTANCE_PORTAL)
- continue;
-
- if (ins->room)
- continue;
-
- ERR_CONTINUE(exterior_portal_cull_count>=MAX_EXTERIOR_PORTALS);
- exterior_portal_cull_result[exterior_portal_cull_count++]=ins;
-
- }
-
- room_cull_count = p_scenario->octree.cull_point(p_camera->transform.origin,room_cull_result,MAX_ROOM_CULL,NULL,(1<<INSTANCE_ROOM)|(1<<INSTANCE_PORTAL));
-
-
- Set<Instance*> current_rooms;
- Set<Instance*> portal_rooms;
- //add to set
- for(int i=0;i<room_cull_count;i++) {
-
- if (room_cull_result[i]->base_type==INSTANCE_ROOM) {
- current_rooms.insert(room_cull_result[i]);
- }
- if (room_cull_result[i]->base_type==INSTANCE_PORTAL) {
- //assume inside that room if also inside the portal..
- if (room_cull_result[i]->room) {
- portal_rooms.insert(room_cull_result[i]->room);
- }
-
- SWAP(room_cull_result[i],room_cull_result[room_cull_count-1]);
- room_cull_count--;
- i--;
- }
- }
-
- //remove from set if it has a parent room or BSP doesn't contain
- for(int i=0;i<room_cull_count;i++) {
- Instance *r = room_cull_result[i];
-
- //check inside BSP
- Vector3 room_local_point = r->room_info->affine_inverse.xform( p_camera->transform.origin );
-
- if (!portal_rooms.has(r) && !r->room_info->room->bounds.point_is_inside(room_local_point)) {
-
- current_rooms.erase(r);
- continue;
- }
-
- //check parent
- while (r->room) {// has parent room
-
- current_rooms.erase(r);
- r=r->room;
- }
-
- }
-
- if (current_rooms.size()) {
- //camera is inside a room
- // go through rooms
- for(Set<Instance*>::Element *E=current_rooms.front();E;E=E->next()) {
- _cull_room(p_camera,E->get());
- }
-
- } else {
- //start from exterior
- _cull_room(p_camera,NULL);
-
- }
- }
-
- /* STEP 4 - REMOVE FURTHER CULLED OBJECTS, ADD LIGHTS */
-
- for(int i=0;i<cull_count;i++) {
-
- Instance *ins = instance_cull_result[i];
-
- bool keep=false;
-
-
- if ((camera_layer_mask&ins->layer_mask)==0) {
-
- //failure
- } else if (ins->base_type==INSTANCE_LIGHT) {
-
- if (light_cull_count<MAX_LIGHTS_CULLED) {
- light_cull_result[light_cull_count++]=ins;
- //rasterizer->light_instance_set_active_hint(ins->light_info->instance);
- {
- //compute distance to camera using aabb support
- Vector3 n = ins->data.transform.basis.xform_inv(cull_range.nearp.normal).normalized();
- Vector3 s = ins->data.transform.xform(ins->aabb.get_support(n));
- ins->light_info->dtc=cull_range.nearp.distance_to(s);
- }
- }
-
- } else if ((1<<ins->base_type)&INSTANCE_GEOMETRY_MASK && ins->visible && ins->data.cast_shadows!=VS::SHADOW_CASTING_SETTING_SHADOWS_ONLY) {
-
-
- bool discarded=false;
-
- if (ins->draw_range_end>0) {
-
- float d = cull_range.nearp.distance_to(ins->data.transform.origin);
- if (d<0)
- d=0;
- discarded=(d<ins->draw_range_begin || d>=ins->draw_range_end);
-
-
- }
-
- if (!discarded) {
-
- // test if this geometry should be visible
-
- if (room_cull_enabled) {
-
-
- if (ins->visible_in_all_rooms) {
- keep=true;
- } else if (ins->room) {
-
- if (ins->room->room_info->last_visited_pass==render_pass)
- keep=true;
- } else if (ins->auto_rooms.size()) {
-
-
- for(Set<Instance*>::Element *E=ins->auto_rooms.front();E;E=E->next()) {
-
- if (E->get()->room_info->last_visited_pass==render_pass) {
- keep=true;
- break;
- }
- }
- } else if(exterior_visited)
- keep=true;
- } else {
-
- keep=true;
- }
-
-
- }
-
-
- if (keep) {
- // update cull range
- float min,max;
- ins->transformed_aabb.project_range_in_plane(cull_range.nearp,min,max);
-
- if (min<cull_range.min)
- cull_range.min=min;
- if (max>cull_range.max)
- cull_range.max=max;
-
- if (ins->sampled_light && ins->sampled_light->baked_light_sampler_info->last_pass!=render_pass) {
- if (light_samplers_culled<MAX_LIGHT_SAMPLERS) {
- light_sampler_cull_result[light_samplers_culled++]=ins->sampled_light;
- ins->sampled_light->baked_light_sampler_info->last_pass=render_pass;
- }
- }
- }
-
- }
-
- if (!keep) {
- // remove, no reason to keep
- cull_count--;
- SWAP( instance_cull_result[i], instance_cull_result[ cull_count ] );
- i--;
- ins->last_render_pass=0; // make invalid
- } else {
-
- ins->last_render_pass=render_pass;
- }
- }
-
- if (cull_range.max > cull_range.z_far )
- cull_range.max=cull_range.z_far;
- if (cull_range.min < cull_range.z_near )
- cull_range.min=cull_range.z_near;
-
- /* STEP 5 - PROCESS LIGHTS */
-
- rasterizer->shadow_clear_near(); //clear near shadows, will be recreated
-
- // directional lights
- {
- List<RID>::Element *E=p_scenario->directional_lights.front();
-
-
- while(E) {
-
- Instance *light = E->get().is_valid()?instance_owner.get(E->get()):NULL;
-
- if (light && light->light_info->enabled && rasterizer->light_has_shadow(light->base_rid)) {
- //rasterizer->light_instance_set_active_hint(light->light_info->instance);
- _light_instance_update_shadow(light,p_scenario,p_camera,cull_range);
- }
-
- E=E->next();
- }
- }
-
-
- //discard lights not affecting anything (useful for deferred rendering, shadowmaps, etc)
-
- for (int i=0;i<light_cull_count;i++) {
-
- Instance *ins = light_cull_result[i];
-
- if (light_discard_enabled) {
-
- //see if the light should be pre discarded because no one is seeing it
- //this test may seem expensive, but in reality, it shouldn't be
- //because of early out condition. It will only go through everything
- //if it's being discarded.
-
- bool valid=false;
- InstanceSet::Element *E =ins->light_info->affected.front();
- while(E) {
-
- if (E->get()->last_render_pass==render_pass) {
-
- valid=true; // early out.
- break;
- }
- E=E->next();
- }
- if (!valid) {
-
- light_cull_count--;
- SWAP( light_cull_result[i], light_cull_result[ light_cull_count ] );
- i--;
-
- }
- }
-
- }
-
- { //this should eventually change to
- //assign shadows by distance to camera
- SortArray<Instance*,_InstanceLightsort> sorter;
- sorter.sort(light_cull_result,light_cull_count);
- for (int i=0;i<light_cull_count;i++) {
-
- Instance *ins = light_cull_result[i];
-
- if (!rasterizer->light_has_shadow(ins->base_rid) || !shadows_enabled)
- continue;
-
- /* for far shadows?
- if (ins->version == ins->light_info->last_version && rasterizer->light_instance_has_far_shadow(ins->light_info->instance))
- continue; // didn't change
- */
-
- _light_instance_update_shadow(ins,p_scenario,p_camera,cull_range);
- ins->light_info->last_version=ins->version;
- }
- }
-
- /* ENVIRONMENT */
-
- RID environment;
- if (p_camera->env.is_valid()) //camera has more environment priority
- environment=p_camera->env;
- else if (p_scenario->environment.is_valid())
- environment=p_scenario->environment;
- else
- environment=p_scenario->fallback_environment;
-
-
- /* STEP 6 - SAMPLE BAKED LIGHT */
-
- bool islinear =false;
- if (environment.is_valid()) {
- islinear = rasterizer->environment_is_fx_enabled(environment,VS::ENV_FX_SRGB);
- }
-
- for(int i=0;i<light_samplers_culled;i++) {
-
- _process_sampled_light(p_camera->transform,light_sampler_cull_result[i],islinear);
- }
-
- /* STEP 7 - PROCESS GEOMETRY AND DRAW SCENE*/
-
-
- rasterizer->begin_scene(p_viewport->viewport_data,environment,p_scenario->debug);
- rasterizer->set_viewport(viewport_rect);
-
- // add lights
-
- {
- List<RID>::Element *E=p_scenario->directional_lights.front();
-
-
- for(;E;E=E->next()) {
- Instance *light = E->get().is_valid()?instance_owner.get(E->get()):NULL;
-
- ERR_CONTINUE(!light);
- if (!light->light_info->enabled)
- continue;
-
- rasterizer->add_light(light->light_info->instance);
- light->light_info->last_add_pass=render_pass;
- }
-
- for (int i=0;i<light_cull_count;i++) {
-
- Instance *ins = light_cull_result[i];
- rasterizer->add_light(ins->light_info->instance);
- ins->light_info->last_add_pass=render_pass;
- }
- }
- // add geometry
-
- for(int i=0;i<cull_count;i++) {
-
- Instance *ins = instance_cull_result[i];
-
- ERR_CONTINUE(!((1<<ins->base_type)&INSTANCE_GEOMETRY_MASK));
-
- _instance_draw(ins);
- }
-
- rasterizer->end_scene();
-}
-
-
-void VisualServerRaster::_render_canvas_item_tree(CanvasItem *p_canvas_item, const Matrix32& p_transform, const Rect2& p_clip_rect, const Color& p_modulate, Rasterizer::CanvasLight *p_lights) {
-
-
- static const int z_range = CANVAS_ITEM_Z_MAX-CANVAS_ITEM_Z_MIN+1;
- Rasterizer::CanvasItem *z_list[z_range];
- Rasterizer::CanvasItem *z_last_list[z_range];
-
- for(int i=0;i<z_range;i++) {
- z_list[i]=NULL;
- z_last_list[i]=NULL;
- }
-
-
- _render_canvas_item(p_canvas_item,p_transform,p_clip_rect,1.0,0,z_list,z_last_list,NULL,NULL);
-
- for(int i=0;i<z_range;i++) {
- if (!z_list[i])
- continue;
- rasterizer->canvas_render_items(z_list[i],CANVAS_ITEM_Z_MIN+i,p_modulate,p_lights);
- }
-
-}
-
-
-void VisualServerRaster::_render_canvas_item_viewport(VisualServer* p_self,void *p_vp,const Rect2& p_rect) {
-
- VisualServerRaster *self=(VisualServerRaster*)(p_self);
- Viewport *vp=(Viewport*)p_vp;
- self->_draw_viewport(vp,p_rect.pos.x,p_rect.pos.y,p_rect.size.x,p_rect.size.y);
- self->rasterizer->canvas_begin();
-
-}
-
-
-void VisualServerRaster::_render_canvas_item(CanvasItem *p_canvas_item,const Matrix32& p_transform,const Rect2& p_clip_rect, float p_opacity,int p_z,Rasterizer::CanvasItem **z_list,Rasterizer::CanvasItem **z_last_list,CanvasItem *p_canvas_clip,CanvasItem *p_material_owner) {
-
- CanvasItem *ci = p_canvas_item;
-
- if (!ci->visible)
- return;
-
- if (p_opacity<0.007)
- return;
-
-
- Rect2 rect = ci->get_rect();
- Matrix32 xform = p_transform * ci->xform;
- Rect2 global_rect = xform.xform(rect);
- global_rect.pos+=p_clip_rect.pos;
-
-
- if (global_rect.intersects(p_clip_rect) && ci->viewport.is_valid() && viewport_owner.owns(ci->viewport)) {
-
- Viewport *vp = viewport_owner.get(ci->viewport);
-
- Point2i from = xform.get_origin() + Point2(viewport_rect.x,viewport_rect.y);
- Point2i size = rect.size;
- size.x *= xform[0].length();
- size.y *= xform[1].length();
-
- ci->vp_render = memnew( Rasterizer::CanvasItem::ViewportRender );
- ci->vp_render->owner=this;
- ci->vp_render->udata=vp;
- ci->vp_render->rect=Rect2(from.x,
- from.y,
- size.x,
- size.y);
-/*
- _draw_viewport(vp,
- from.x,
- from.y,
- size.x,
- size.y);
-*/
- //rasterizer->canvas_begin();
- } else {
- ci->vp_render=NULL;
- }
-
- if (ci->use_parent_material && p_material_owner)
- ci->material_owner=p_material_owner;
- else {
- p_material_owner=ci;
- ci->material_owner=NULL;
- }
-
-
- float opacity = ci->opacity * p_opacity;
-
-
- int child_item_count=ci->child_items.size();
- CanvasItem **child_items=(CanvasItem**)alloca(child_item_count*sizeof(CanvasItem*));
- copymem(child_items,ci->child_items.ptr(),child_item_count*sizeof(CanvasItem*));
-
- if (ci->clip) {
- if (p_canvas_clip != NULL) {
- ci->final_clip_rect=p_canvas_clip->final_clip_rect.clip(global_rect);
- } else {
- ci->final_clip_rect=global_rect;
- }
- ci->final_clip_owner=ci;
-
- } else {
- ci->final_clip_owner=p_canvas_clip;
- }
-
- if (ci->sort_y) {
-
- SortArray<CanvasItem*,CanvasItemPtrSort> sorter;
- sorter.sort(child_items,child_item_count);
- }
-
- if (ci->z_relative)
- p_z=CLAMP(p_z+ci->z,CANVAS_ITEM_Z_MIN,CANVAS_ITEM_Z_MAX);
- else
- p_z=ci->z;
-
- for(int i=0;i<child_item_count;i++) {
-
- if (child_items[i]->ontop)
- continue;
- _render_canvas_item(child_items[i],xform,p_clip_rect,opacity,p_z,z_list,z_last_list,(CanvasItem*)ci->final_clip_owner,p_material_owner);
- }
-
- if (ci->copy_back_buffer) {
-
- ci->copy_back_buffer->screen_rect = xform.xform(ci->copy_back_buffer->rect).clip(p_clip_rect);
- }
-
- if ((!ci->commands.empty() && p_clip_rect.intersects(global_rect)) || ci->vp_render || ci->copy_back_buffer) {
- //something to draw?
- ci->final_transform=xform;
- ci->final_opacity=opacity * ci->self_opacity;
- ci->global_rect_cache=global_rect;
- ci->global_rect_cache.pos-=p_clip_rect.pos;
- ci->light_masked=false;
-
- int zidx = p_z-CANVAS_ITEM_Z_MIN;
-
- if (z_last_list[zidx]) {
- z_last_list[zidx]->next=ci;
- z_last_list[zidx]=ci;
-
- } else {
- z_list[zidx]=ci;
- z_last_list[zidx]=ci;
- }
-
-
-
- ci->next=NULL;
-
- }
-
- for(int i=0;i<child_item_count;i++) {
-
- if (!child_items[i]->ontop)
- continue;
- _render_canvas_item(child_items[i],xform,p_clip_rect,opacity,p_z,z_list,z_last_list,(CanvasItem*)ci->final_clip_owner,p_material_owner);
- }
-
-}
-
-void VisualServerRaster::_light_mask_canvas_items(int p_z,Rasterizer::CanvasItem *p_canvas_item,Rasterizer::CanvasLight *p_masked_lights) {
-
- if (!p_masked_lights)
- return;
-
- Rasterizer::CanvasItem *ci=p_canvas_item;
-
- while(ci) {
-
- Rasterizer::CanvasLight *light=p_masked_lights;
- while(light) {
-
- if (ci->light_mask&light->item_mask && p_z>=light->z_min && p_z<=light->z_max && ci->global_rect_cache.intersects_transformed(light->xform_cache,light->rect_cache)) {
- ci->light_masked=true;
- }
-
- light=light->mask_next_ptr;
- }
-
- ci=ci->next;
- }
-
-
-
-
-}
-
-void VisualServerRaster::_render_canvas(Canvas *p_canvas,const Matrix32 &p_transform,Rasterizer::CanvasLight *p_lights,Rasterizer::CanvasLight *p_masked_lights) {
-
- rasterizer->canvas_begin();
-
- int l = p_canvas->child_items.size();
- Canvas::ChildItem *ci=p_canvas->child_items.ptr();
-
- bool has_mirror=false;
- for(int i=0;i<l;i++) {
- if (ci[i].mirror.x || ci[i].mirror.y) {
- has_mirror=true;
- break;
- }
- }
-
- Rect2 clip_rect(viewport_rect.x,viewport_rect.y,viewport_rect.width,viewport_rect.height);
- if (!has_mirror) {
-
- static const int z_range = CANVAS_ITEM_Z_MAX-CANVAS_ITEM_Z_MIN+1;
- Rasterizer::CanvasItem *z_list[z_range];
- Rasterizer::CanvasItem *z_last_list[z_range];
-
- for(int i=0;i<z_range;i++) {
- z_list[i]=NULL;
- z_last_list[i]=NULL;
- }
- for(int i=0;i<l;i++) {
- _render_canvas_item(ci[i].item,p_transform,clip_rect,1.0,0,z_list,z_last_list,NULL,NULL);
- }
-
- for(int i=0;i<z_range;i++) {
- if (!z_list[i])
- continue;
-
- if (p_masked_lights) {
- _light_mask_canvas_items(CANVAS_ITEM_Z_MIN+i,z_list[i],p_masked_lights);
- }
-
- rasterizer->canvas_render_items(z_list[i],CANVAS_ITEM_Z_MIN+i,p_canvas->modulate,p_lights);
- }
- } else {
-
- for(int i=0;i<l;i++) {
-
- Canvas::ChildItem& ci=p_canvas->child_items[i];
- _render_canvas_item_tree(ci.item,p_transform,clip_rect,p_canvas->modulate,p_lights);
-
- //mirroring (useful for scrolling backgrounds)
- if (ci.mirror.x!=0) {
-
- Matrix32 xform2 = p_transform * Matrix32(0,Vector2(ci.mirror.x,0));
- _render_canvas_item_tree(ci.item,xform2,clip_rect,p_canvas->modulate,p_lights);
- }
- if (ci.mirror.y!=0) {
-
- Matrix32 xform2 = p_transform * Matrix32(0,Vector2(0,ci.mirror.y));
- _render_canvas_item_tree(ci.item,xform2,clip_rect,p_canvas->modulate,p_lights);
- }
- if (ci.mirror.y!=0 && ci.mirror.x!=0) {
-
- Matrix32 xform2 = p_transform * Matrix32(0,ci.mirror);
- _render_canvas_item_tree(ci.item,xform2,clip_rect,p_canvas->modulate,p_lights);
- }
-
- }
- }
-
-}
-
-
-void VisualServerRaster::_draw_viewport_camera(Viewport *p_viewport,bool p_ignore_camera) {
-
-
- Camera *camera=NULL;
- if (camera_owner.owns( p_viewport->camera ))
- camera=camera_owner.get( p_viewport->camera );
- Scenario *scenario = scenario_owner.get( p_viewport->scenario );
-
- _update_instances(); // check dirty instances before rendering
-
- if (p_ignore_camera)
- _render_no_camera(p_viewport, camera,scenario );
- else
- _render_camera(p_viewport, camera,scenario );
-
-}
-
-void VisualServerRaster::_draw_viewport(Viewport *p_viewport,int p_ofs_x, int p_ofs_y,int p_parent_w,int p_parent_h) {
-
- ViewportRect desired_rect=p_viewport->rect;
- ViewportRect old_rect = viewport_rect;
- //bool vpchanged=false;
- // convert default expanding viewports to actual size
- //if (desired_rect.x==0 && desired_rect.y==0 && desired_rect.width==0 && desired_rect.height==0) {
- if (p_parent_w != 0 && p_parent_h != 0) {
-
- desired_rect.width=p_parent_w;
- desired_rect.height=p_parent_h;
- }
-
- ERR_FAIL_COND(desired_rect.width<=0 || desired_rect.height<=0);
-
- desired_rect.x+=p_ofs_x;
- desired_rect.y+=p_ofs_y;
-
-
- // if the viewport is different than the actual one, change it
-
- if ( p_viewport->render_target.is_valid() || viewport_rect.x != desired_rect.x ||
- viewport_rect.y != desired_rect.y ||
- viewport_rect.width != desired_rect.width ||
- viewport_rect.height != desired_rect.height ) {
-
-
- viewport_rect=desired_rect;
- rasterizer->set_viewport(viewport_rect);
-
- }
-
- /* Camera should always be BEFORE any other 3D */
-
- bool scenario_draw_canvas_bg=false;
- int scenario_canvas_max_layer=0;
-
- if (!p_viewport->hide_canvas && !p_viewport->disable_environment && scenario_owner.owns(p_viewport->scenario)) {
-
- Scenario *scenario=scenario_owner.get(p_viewport->scenario);
- if (scenario->environment.is_valid()) {
- if (rasterizer->is_environment(scenario->environment)) {
- scenario_draw_canvas_bg=rasterizer->environment_get_background(scenario->environment)==VS::ENV_BG_CANVAS;
- scenario_canvas_max_layer=rasterizer->environment_get_background_param(scenario->environment,VS::ENV_BG_PARAM_CANVAS_MAX_LAYER);
- }
- }
- }
-
- bool can_draw_3d=!p_viewport->hide_scenario && camera_owner.owns(p_viewport->camera) && scenario_owner.owns(p_viewport->scenario);
-
-
- if (scenario_draw_canvas_bg) {
-
- rasterizer->begin_canvas_bg();
- }
-
- if (!scenario_draw_canvas_bg && can_draw_3d) {
-
- _draw_viewport_camera(p_viewport,false);
-
- } else if (true /*|| !p_viewport->canvas_list.empty()*/){
-
- //clear the viewport black because of no camera? i seriously should..
- if (p_viewport->render_target_clear_on_new_frame || p_viewport->render_target_clear) {
- if (p_viewport->transparent_bg) {
- rasterizer->clear_viewport(Color(0,0,0,0));
- }
- else {
- Color cc=clear_color;
- if (scenario_draw_canvas_bg)
- cc.a=0;
- rasterizer->clear_viewport(cc);
- }
- p_viewport->render_target_clear=false;
- }
- }
-
- if (!p_viewport->hide_canvas) {
- int i=0;
-
- Map<Viewport::CanvasKey,Viewport::CanvasData*> canvas_map;
-
- Rect2 clip_rect(0,0,viewport_rect.width,viewport_rect.height);
- Rasterizer::CanvasLight *lights=NULL;
- Rasterizer::CanvasLight *lights_with_shadow=NULL;
- Rasterizer::CanvasLight *lights_with_mask=NULL;
- Rect2 shadow_rect;
-
- int light_count=0;
-
- for (Map<RID,Viewport::CanvasData>::Element *E=p_viewport->canvas_map.front();E;E=E->next()) {
-
- Matrix32 xf = p_viewport->global_transform * E->get().transform;
-
- //find lights in canvas
-
-
- for(Set<Rasterizer::CanvasLight*>::Element *F=E->get().canvas->lights.front();F;F=F->next()) {
-
-
- Rasterizer::CanvasLight* cl=F->get();
- if (cl->enabled && cl->texture.is_valid()) {
- //not super efficient..
- Size2 tsize(rasterizer->texture_get_width(cl->texture),rasterizer->texture_get_height(cl->texture));
- tsize*=cl->scale;
-
- Vector2 offset=tsize/2.0;
- cl->rect_cache=Rect2(-offset+cl->texture_offset,tsize);
- cl->xform_cache=xf * cl->xform;
-
-
- if (clip_rect.intersects_transformed(cl->xform_cache,cl->rect_cache)) {
-
- cl->filter_next_ptr=lights;
- lights=cl;
- cl->texture_cache=NULL;
- Matrix32 scale;
- scale.scale(cl->rect_cache.size);
- scale.elements[2]=cl->rect_cache.pos;
- cl->light_shader_xform = (cl->xform_cache * scale).affine_inverse();
- cl->light_shader_pos=cl->xform_cache[2];
- if (cl->shadow_buffer.is_valid()) {
-
- cl->shadows_next_ptr=lights_with_shadow;
- if (lights_with_shadow==NULL) {
- shadow_rect = cl->xform_cache.xform(cl->rect_cache);
- } else {
- shadow_rect=shadow_rect.merge( cl->xform_cache.xform(cl->rect_cache) );
- }
- lights_with_shadow=cl;
- cl->radius_cache=cl->rect_cache.size.length();
-
- }
- if (cl->mode==CANVAS_LIGHT_MODE_MASK) {
- cl->mask_next_ptr=lights_with_mask;
- lights_with_mask=cl;
- }
-
- light_count++;
- }
-
- }
- }
-
- //print_line("lights: "+itos(light_count));
- canvas_map[ Viewport::CanvasKey( E->key(), E->get().layer) ]=&E->get();
-
- }
-
- if (lights_with_shadow) {
- //update shadows if any
-
- Rasterizer::CanvasLightOccluderInstance * occluders=NULL;
-
- //make list of occluders
- for (Map<RID,Viewport::CanvasData>::Element *E=p_viewport->canvas_map.front();E;E=E->next()) {
-
- Matrix32 xf = p_viewport->global_transform * E->get().transform;
-
- for(Set<Rasterizer::CanvasLightOccluderInstance*>::Element *F=E->get().canvas->occluders.front();F;F=F->next()) {
-
- if (!F->get()->enabled)
- continue;
- F->get()->xform_cache = xf * F->get()->xform;
- if (shadow_rect.intersects_transformed(F->get()->xform_cache,F->get()->aabb_cache)) {
-
- F->get()->next=occluders;
- occluders=F->get();
-
- }
- }
- }
- //update the light shadowmaps with them
- Rasterizer::CanvasLight *light=lights_with_shadow;
- while(light) {
-
- rasterizer->canvas_light_shadow_buffer_update(light->shadow_buffer,light->xform_cache.affine_inverse(),light->item_mask,light->radius_cache/1000.0,light->radius_cache*1.1,occluders,&light->shadow_matrix_cache);
- light=light->shadows_next_ptr;
- }
-
- rasterizer->set_viewport(viewport_rect); //must reset viewport afterwards
- }
-
-
-
-
- if (scenario_draw_canvas_bg && canvas_map.front() && canvas_map.front()->key().layer>scenario_canvas_max_layer) {
-
- _draw_viewport_camera(p_viewport,!can_draw_3d);
- scenario_draw_canvas_bg=false;
-
- }
-
- for (Map<Viewport::CanvasKey,Viewport::CanvasData*>::Element *E=canvas_map.front();E;E=E->next()) {
-
-
- //print_line("canvas "+itos(i)+" size: "+itos(I->get()->canvas->child_items.size()));
- //print_line("GT "+p_viewport->global_transform+". CT: "+E->get()->transform);
- Matrix32 xform = p_viewport->global_transform * E->get()->transform;
-
- Rasterizer::CanvasLight *canvas_lights=NULL;
-
- Rasterizer::CanvasLight *ptr=lights;
- while(ptr) {
- if (E->get()->layer>=ptr->layer_min && E->get()->layer<=ptr->layer_max) {
- ptr->next_ptr=canvas_lights;
- canvas_lights=ptr;
- }
- ptr=ptr->filter_next_ptr;
- }
-
- _render_canvas( E->get()->canvas,xform,canvas_lights,lights_with_mask );
- i++;
-
- if (scenario_draw_canvas_bg && E->key().layer>=scenario_canvas_max_layer) {
- _draw_viewport_camera(p_viewport,!can_draw_3d);
- scenario_draw_canvas_bg=false;
- }
-
-
- }
-
- if (scenario_draw_canvas_bg) {
- _draw_viewport_camera(p_viewport,!can_draw_3d);
- scenario_draw_canvas_bg=false;
- }
-
-
- //rasterizer->canvas_debug_viewport_shadows(lights_with_shadow);
- }
-
- //capture
-
- if (p_viewport->queue_capture) {
-
- rasterizer->capture_viewport(&p_viewport->capture);
- p_viewport->queue_capture = false;
- }
-
- //restore
- if ( viewport_rect.x != old_rect.x ||
- viewport_rect.y != old_rect.y ||
- viewport_rect.width != old_rect.width ||
- viewport_rect.height != old_rect.height ) {
-
- viewport_rect=old_rect;
-
- rasterizer->set_viewport(viewport_rect);
- }
-
-
-}
-
-void VisualServerRaster::_draw_viewports() {
-
- //draw viewports for render targets
-
- List<Viewport*> to_blit;
- List<Viewport*> to_disable;
- for(SelfList<Viewport> *E=viewport_update_list.first();E;E=E->next()) {
-
- Viewport *vp = E->self();
- ERR_CONTINUE(!vp);
- if (
- vp->render_target_update_mode==RENDER_TARGET_UPDATE_WHEN_VISIBLE &&
- !vp->rendered_in_prev_frame &&
- !vp->queue_capture
- ) {
-
- continue;
- }
-
- if (vp->rt_to_screen_rect!=Rect2())
- to_blit.push_back(vp);
-
- rasterizer->set_render_target(vp->render_target,vp->transparent_bg,vp->render_target_vflip);
- _draw_viewport(vp,0,0,vp->rect.width,vp->rect.height);
-
- if ( (vp->queue_capture && vp->render_target_update_mode==RENDER_TARGET_UPDATE_DISABLED) || vp->render_target_update_mode==RENDER_TARGET_UPDATE_ONCE) {
- //was only enabled for capture
- to_disable.push_back(vp);
- vp->render_target_update_mode=RENDER_TARGET_UPDATE_DISABLED;
- }
-
- }
-
- rasterizer->set_render_target(RID());
-
- while(to_disable.size()) {
- //disable again because it was only for capture
- viewport_update_list.remove(&to_disable.front()->get()->update_list);
- to_disable.pop_front();
- }
-
-
- //draw RTs directly to screen when requested
-
- for (List<Viewport*>::Element *E=to_blit.front();E;E=E->next()) {
-
- int window_w = OS::get_singleton()->get_video_mode().width;
- int window_h = OS::get_singleton()->get_video_mode().height;
-
- ViewportRect desired_rect;
- desired_rect.x = desired_rect.y = 0;
- desired_rect.width = window_w;
- desired_rect.height = window_h;
-
- if ( viewport_rect.x != desired_rect.x ||
- viewport_rect.y != desired_rect.y ||
- viewport_rect.width != desired_rect.width ||
- viewport_rect.height != desired_rect.height ) {
-
- viewport_rect=desired_rect;
-
- rasterizer->set_viewport(viewport_rect);
- }
-
- rasterizer->canvas_begin();
- rasterizer->canvas_disable_blending();
- rasterizer->canvas_begin_rect(Matrix32());
- rasterizer->canvas_draw_rect(E->get()->rt_to_screen_rect,0,Rect2(Point2(),E->get()->rt_to_screen_rect.size),E->get()->render_target_texture,Color(1,1,1));
-
- }
-
-
-
- //draw viewports attached to screen
-
- for(Map<RID,int>::Element *E=screen_viewports.front();E;E=E->next()) {
-
- Viewport *vp = viewport_owner.get(E->key());
- ERR_CONTINUE(!vp);
-
- int window_w = OS::get_singleton()->get_video_mode(E->get()).width;
- int window_h = OS::get_singleton()->get_video_mode(E->get()).height;
-
- Rect2 r(0,0,vp->rect.width,vp->rect.height);
- if (r.size.width==0)
- r.size.width=window_w;
- if (r.size.height==0)
- r.size.height=window_h;
-
-
- _draw_viewport(vp,r.pos.x,r.pos.y,r.size.width,r.size.height);
- }
-
-
- //check when a viewport associated to a render target was drawn
-
- for(SelfList<Viewport> *E=viewport_update_list.first();E;E=E->next()) {
-
- Viewport *vp = E->self();
- ERR_CONTINUE(!vp);
- if (vp->render_target_update_mode!=RENDER_TARGET_UPDATE_WHEN_VISIBLE)
- continue;
- vp->rendered_in_prev_frame=rasterizer->render_target_renedered_in_frame(vp->render_target);
- }
-
-}
-
-
-
-void VisualServerRaster::_draw_cursors_and_margins() {
-
- int window_w = OS::get_singleton()->get_video_mode().width;
- int window_h = OS::get_singleton()->get_video_mode().height;
-
- ViewportRect desired_rect;
- desired_rect.x = desired_rect.y = 0;
- desired_rect.width = window_w;
- desired_rect.height = window_h;
-
- if ( viewport_rect.x != desired_rect.x ||
- viewport_rect.y != desired_rect.y ||
- viewport_rect.width != desired_rect.width ||
- viewport_rect.height != desired_rect.height ) {
-
- viewport_rect=desired_rect;
-
- rasterizer->set_viewport(viewport_rect);
- }
-
- rasterizer->canvas_begin();
- rasterizer->canvas_begin_rect(Matrix32());
-
- for (int i=0; i<MAX_CURSORS; i++) {
-
- if (!cursors[i].visible) {
-
- continue;
- };
-
- RID tex = cursors[i].texture?cursors[i].texture:default_cursor_texture;
- ERR_CONTINUE( !tex );
- if (cursors[i].region.has_no_area()) {
- Point2 size(texture_get_width(tex), texture_get_height(tex));
- rasterizer->canvas_draw_rect(Rect2(cursors[i].pos-cursors[i].center, size), 0, Rect2(), tex, Color(1, 1, 1, 1));
- } else {
- Point2 size = cursors[i].region.size;
- rasterizer->canvas_draw_rect(Rect2(cursors[i].pos-cursors[i].center, size), Rasterizer::CANVAS_RECT_REGION, cursors[i].region, tex, Color(1, 1, 1, 1));
- }
- };
-
-
-
- if (black_image[MARGIN_LEFT].is_valid()) {
- Size2 sz(rasterizer->texture_get_width(black_image[MARGIN_LEFT]),rasterizer->texture_get_height(black_image[MARGIN_LEFT]));
- rasterizer->canvas_draw_rect(Rect2(0,0,black_margin[MARGIN_LEFT],window_h),0,Rect2(0,0,sz.x,sz.y),black_image[MARGIN_LEFT],Color(1,1,1));
- } else if (black_margin[MARGIN_LEFT])
- rasterizer->canvas_draw_rect(Rect2(0,0,black_margin[MARGIN_LEFT],window_h),0,Rect2(0,0,1,1),RID(),Color(0,0,0));
-
- if (black_image[MARGIN_RIGHT].is_valid()) {
- Size2 sz(rasterizer->texture_get_width(black_image[MARGIN_RIGHT]),rasterizer->texture_get_height(black_image[MARGIN_RIGHT]));
- rasterizer->canvas_draw_rect(Rect2(window_w-black_margin[MARGIN_RIGHT],0,black_margin[MARGIN_RIGHT],window_h),0,Rect2(0,0,sz.x,sz.y),black_image[MARGIN_RIGHT],Color(1,1,1));
- } else if (black_margin[MARGIN_RIGHT])
- rasterizer->canvas_draw_rect(Rect2(window_w-black_margin[MARGIN_RIGHT],0,black_margin[MARGIN_RIGHT],window_h),0,Rect2(0,0,1,1),RID(),Color(0,0,0));
-
- if (black_image[MARGIN_TOP].is_valid()) {
- Size2 sz(rasterizer->texture_get_width(black_image[MARGIN_TOP]),rasterizer->texture_get_height(black_image[MARGIN_TOP]));
- rasterizer->canvas_draw_rect(Rect2(0,0,window_w,black_margin[MARGIN_TOP]),0,Rect2(0,0,sz.x,sz.y),black_image[MARGIN_TOP],Color(1,1,1));
-
- } else if (black_margin[MARGIN_TOP]) {
- rasterizer->canvas_draw_rect(Rect2(0,0,window_w,black_margin[MARGIN_TOP]),0,Rect2(0,0,1,1),RID(),Color(0,0,0));
- }
-
- if (black_image[MARGIN_BOTTOM].is_valid()) {
-
- Size2 sz(rasterizer->texture_get_width(black_image[MARGIN_BOTTOM]),rasterizer->texture_get_height(black_image[MARGIN_BOTTOM]));
- rasterizer->canvas_draw_rect(Rect2(0,window_h-black_margin[MARGIN_BOTTOM],window_w,black_margin[MARGIN_BOTTOM]),0,Rect2(0,0,sz.x,sz.y),black_image[MARGIN_BOTTOM],Color(1,1,1));
- } else if (black_margin[MARGIN_BOTTOM]) {
- rasterizer->canvas_draw_rect(Rect2(0,window_h-black_margin[MARGIN_BOTTOM],window_w,black_margin[MARGIN_BOTTOM]),0,Rect2(0,0,1,1),RID(),Color(0,0,0));
- }
-
- rasterizer->canvas_end_rect();
-};
-
-void VisualServerRaster::sync() {
- //do none
-}
-
-void VisualServerRaster::draw() {
- /*
- if (changes)
- print_line("changes: "+itos(changes));
- */
- changes=0;
- shadows_enabled=GLOBAL_DEF("render/shadows_enabled",true);
- room_cull_enabled = GLOBAL_DEF("render/room_cull_enabled",true);
- light_discard_enabled = GLOBAL_DEF("render/light_discard_enabled",true);
- rasterizer->begin_frame();
- _draw_viewports();
- _draw_cursors_and_margins();
- rasterizer->end_frame();
- draw_extra_frame=rasterizer->needs_to_draw_next_frame();
-}
-
-bool VisualServerRaster::has_changed() const {
-
- return changes>0 || draw_extra_frame;
-}
-
-int VisualServerRaster::get_render_info(RenderInfo p_info) {
-
- return rasterizer->get_render_info(p_info);
-}
-
-bool VisualServerRaster::has_feature(Features p_feature) const {
-
- return rasterizer->has_feature(p_feature); // lies for now
-}
-
-void VisualServerRaster::set_default_clear_color(const Color& p_color) {
-
- clear_color=p_color;
-}
-
-void VisualServerRaster::set_boot_image(const Image& p_image, const Color& p_color,bool p_scale) {
-
- if (p_image.empty())
- return;
-
- rasterizer->restore_framebuffer();
-
- rasterizer->begin_frame();
-
- int window_w = OS::get_singleton()->get_video_mode(0).width;
- int window_h = OS::get_singleton()->get_video_mode(0).height;
- ViewportRect vr;
- vr.x=0;
- vr.y=0;
- vr.width=OS::get_singleton()->get_video_mode(0).width;
- vr.height=OS::get_singleton()->get_video_mode(0).height;
- rasterizer->set_viewport(vr);
- rasterizer->clear_viewport(p_color);
- rasterizer->canvas_begin();
- RID texture = texture_create();
- texture_allocate(texture,p_image.get_width(),p_image.get_height(),p_image.get_format(),TEXTURE_FLAG_FILTER);
- texture_set_data(texture,p_image);
- rasterizer->canvas_begin_rect(Matrix32());
- Rect2 imgrect(0,0,p_image.get_width(),p_image.get_height());
- Rect2 screenrect;
- if (p_scale) {
-
- if (window_w > window_h) {
- //scale horizontally
- screenrect.size.y = window_h;
- screenrect.size.x = imgrect.size.x * window_h / imgrect.size.y;
- screenrect.pos.x = (window_w - screenrect.size.x)/2;
-
- } else {
- //scale vertically
- screenrect.size.x = window_w;
- screenrect.size.y = imgrect.size.y * window_w / imgrect.size.x;
- screenrect.pos.y = (window_h - screenrect.size.y)/2;
- }
- } else {
-
- screenrect=imgrect;
- screenrect.pos+=((Size2(vr.width,vr.height)-screenrect.size)/2.0).floor();
-
- }
- rasterizer->canvas_draw_rect(screenrect,0,imgrect,texture,Color(1,1,1,1));
- rasterizer->canvas_end_rect();
-
- rasterizer->end_frame();
- rasterizer->flush_frame();
-
- free(texture); // free since it's only one frame that stays there
-
-}
-
-void VisualServerRaster::init() {
-
- rasterizer->init();
-
- shadows_enabled=GLOBAL_DEF("render/shadows_enabled",true);
- //default_scenario = scenario_create();
- //default_viewport = viewport_create();
- for(int i=0;i<4;i++)
- black_margin[i]=0;
-
- Image img;
- img.create(default_mouse_cursor_xpm);
- //img.convert(Image::FORMAT_RGB8);
- default_cursor_texture = texture_create_from_image(img, 0);
-
- aabb_random_points.resize( GLOBAL_DEF("render/aabb_random_points",16) );
- for(int i=0;i<aabb_random_points.size();i++)
- aabb_random_points[i]=Vector3(Math::random(0,1),Math::random(0,1),Math::random(0,1));
- transformed_aabb_random_points.resize(aabb_random_points.size());
- changes=0;
-}
-
-void VisualServerRaster::_clean_up_owner(RID_OwnerBase *p_owner,String p_type) {
-
- List<RID> rids;
- p_owner->get_owned_list(&rids);
-
- int lost=0;
- for(List<RID>::Element *I=rids.front();I;I=I->next()) {
- if (OS::get_singleton()->is_stdout_verbose()) {
- lost++;
- }
- free(I->get());
- }
-
- if (lost)
- print_line("VisualServerRaster: WARNING: Lost "+itos(lost)+" RIDs of type "+p_type);
-
-}
-
-void VisualServerRaster::finish() {
-
-
- free(default_cursor_texture);
- if (test_cube.is_valid())
- free(test_cube);
-
- _free_internal_rids();
-
- _clean_up_owner( &room_owner,"Room" );
- _clean_up_owner( &portal_owner,"Portal" );
-
- _clean_up_owner( &camera_owner,"Camera" );
- _clean_up_owner( &viewport_owner,"Viewport" );
-
- _clean_up_owner( &scenario_owner,"Scenario" );
- _clean_up_owner( &instance_owner,"Instance" );
-
- _clean_up_owner( &canvas_owner,"Canvas" );
- _clean_up_owner( &canvas_item_owner,"CanvasItem" );
-
- rasterizer->finish();
- octree_allocator.clear();
-
- if (instance_dependency_map.size()) {
- print_line("Base resources missing amount: "+itos(instance_dependency_map.size()));
- }
- ERR_FAIL_COND( instance_dependency_map.size() );
-}
-
-
-RID VisualServerRaster::get_test_cube() {
-
- if (test_cube.is_valid())
- return test_cube;
-
- test_cube=_make_test_cube();
- return test_cube;
-
-}
-
-
-
-VisualServerRaster::VisualServerRaster(Rasterizer *p_rasterizer) {
-
- rasterizer=p_rasterizer;
- rasterizer->draw_viewport_func=_render_canvas_item_viewport;
- instance_update_list=NULL;
- render_pass=0;
- clear_color=Color(0.3,0.3,0.3,1.0);
- OctreeAllocator::allocator=&octree_allocator;
- draw_extra_frame=false;
-
-}
-
-
-VisualServerRaster::~VisualServerRaster()
-{
-}
-#endif
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index fff37a71b3..3953bc5f48 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -73,6 +73,7 @@ class VisualServerRaster : public VisualServer {
List<FrameDrawnCallbacks> frame_drawn_callbacks;
+// FIXME: Kept as reference for future implementation
#if 0
struct Room {
@@ -689,6 +690,7 @@ public:
BIND3(material_set_param, RID, const StringName &, const Variant &)
BIND2RC(Variant, material_get_param, RID, const StringName &)
+ BIND2(material_set_render_priority, RID, int)
BIND2(material_set_line_width, RID, float)
BIND2(material_set_next_pass, RID, RID)
@@ -811,23 +813,6 @@ public:
BIND2(reflection_probe_set_enable_shadows, RID, bool)
BIND2(reflection_probe_set_cull_mask, RID, uint32_t)
- /* ROOM API */
-
- BIND0R(RID, room_create)
- BIND4(room_add_bounds, RID, const PoolVector<Vector2> &, float, const Transform &)
- BIND1(room_clear_bounds, RID)
-
- /* PORTAL API */
-
- // portals are only (x/y) points, forming a convex shape, which its clockwise
- // order points outside. (z is 0);
-
- BIND0R(RID, portal_create)
- BIND2(portal_set_shape, RID, const Vector<Point2> &)
- BIND2(portal_set_enabled, RID, bool)
- BIND2(portal_set_disable_distance, RID, float)
- BIND2(portal_set_disabled_color, RID, const Color &)
-
/* BAKED LIGHT API */
BIND0R(RID, gi_probe_create)
@@ -1011,7 +996,6 @@ public:
BIND2(instance_attach_skeleton, RID, RID)
BIND2(instance_set_exterior, RID, bool)
- BIND2(instance_set_room, RID, RID)
BIND2(instance_set_extra_visibility_margin, RID, real_t)
diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp
index fb298e3ed7..0d70b7fc0e 100644
--- a/servers/visual/visual_server_scene.cpp
+++ b/servers/visual/visual_server_scene.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -156,58 +156,6 @@ void *VisualServerScene::_instance_pair(void *p_self, OctreeElementID, Instance
return gi_probe->lights.insert(A);
}
-#if 0
- if (A->base_type==INSTANCE_PORTAL) {
-
- ERR_FAIL_COND_V( B->base_type!=INSTANCE_PORTAL,NULL );
-
- A->portal_info->candidate_set.insert(B);
- B->portal_info->candidate_set.insert(A);
-
- self->_portal_attempt_connect(A);
- //attempt to conncet portal A (will go through B anyway)
- //this is a little hackish, but works fine in practice
-
- } else if (A->base_type==INSTANCE_GI_PROBE || B->base_type==INSTANCE_GI_PROBE) {
-
- if (B->base_type==INSTANCE_GI_PROBE) {
- SWAP(A,B);
- }
-
- ERR_FAIL_COND_V(B->base_type!=INSTANCE_GI_PROBE_SAMPLER,NULL);
- B->gi_probe_sampler_info->gi_probes.insert(A);
-
- } else if (A->base_type==INSTANCE_ROOM || B->base_type==INSTANCE_ROOM) {
-
- if (B->base_type==INSTANCE_ROOM)
- SWAP(A,B);
-
- ERR_FAIL_COND_V(! ((1<<B->base_type)&INSTANCE_GEOMETRY_MASK ),NULL);
-
- B->auto_rooms.insert(A);
- A->room_info->owned_autoroom_geometry.insert(B);
-
- self->_instance_validate_autorooms(B);
-
-
- } else {
-
- if (B->base_type==INSTANCE_LIGHT) {
-
- SWAP(A,B);
- } else if (A->base_type!=INSTANCE_LIGHT) {
- return NULL;
- }
-
-
- A->light_info->affected.insert(B);
- B->lights.insert(A);
- B->light_cache_dirty=true;
-
-
- }
-#endif
-
return NULL;
}
void VisualServerScene::_instance_unpair(void *p_self, OctreeElementID, Instance *p_A, int, OctreeElementID, Instance *p_B, int, void *udata) {
@@ -269,57 +217,6 @@ void VisualServerScene::_instance_unpair(void *p_self, OctreeElementID, Instance
gi_probe->lights.erase(E);
}
-#if 0
- if (A->base_type==INSTANCE_PORTAL) {
-
- ERR_FAIL_COND( B->base_type!=INSTANCE_PORTAL );
-
-
- A->portal_info->candidate_set.erase(B);
- B->portal_info->candidate_set.erase(A);
-
- //after disconnecting them, see if they can connect again
- self->_portal_attempt_connect(A);
- self->_portal_attempt_connect(B);
-
- } else if (A->base_type==INSTANCE_GI_PROBE || B->base_type==INSTANCE_GI_PROBE) {
-
- if (B->base_type==INSTANCE_GI_PROBE) {
- SWAP(A,B);
- }
-
- ERR_FAIL_COND(B->base_type!=INSTANCE_GI_PROBE_SAMPLER);
- B->gi_probe_sampler_info->gi_probes.erase(A);
-
- } else if (A->base_type==INSTANCE_ROOM || B->base_type==INSTANCE_ROOM) {
-
- if (B->base_type==INSTANCE_ROOM)
- SWAP(A,B);
-
- ERR_FAIL_COND(! ((1<<B->base_type)&INSTANCE_GEOMETRY_MASK ));
-
- B->auto_rooms.erase(A);
- B->valid_auto_rooms.erase(A);
- A->room_info->owned_autoroom_geometry.erase(B);
-
- }else {
-
-
-
- if (B->base_type==INSTANCE_LIGHT) {
-
- SWAP(A,B);
- } else if (A->base_type!=INSTANCE_LIGHT) {
- return;
- }
-
-
- A->light_info->affected.erase(B);
- B->lights.erase(A);
- B->light_cache_dirty=true;
-
- }
-#endif
}
RID VisualServerScene::scenario_create() {
@@ -467,125 +364,6 @@ void VisualServerScene::instance_set_base(RID p_instance, RID p_base) {
}
}
instance->materials.clear();
-
-#if 0
- if (instance->light_info) {
-
- if (instance->scenario && instance->light_info->D)
- instance->scenario->directional_lights.erase( instance->light_info->D );
- rasterizer->free(instance->light_info->instance);
- memdelete(instance->light_info);
- instance->light_info=NULL;
- }
-
-
-
- if ( instance->room ) {
-
- instance_set_room(p_instance,RID());
- /*
- if((1<<instance->base_type)&INSTANCE_GEOMETRY_MASK)
- instance->room->room_info->owned_geometry_instances.erase(instance->RE);
- else if (instance->base_type==INSTANCE_PORTAL) {
- print_line("freeing portal, is it there? "+itos(instance->room->room_info->owned_portal_instances.(instance->RE)));
- instance->room->room_info->owned_portal_instances.erase(instance->RE);
- } else if (instance->base_type==INSTANCE_ROOM)
- instance->room->room_info->owned_room_instances.erase(instance->RE);
- else if (instance->base_type==INSTANCE_LIGHT)
- instance->room->room_info->owned_light_instances.erase(instance->RE);
-
- instance->RE=NULL;*/
- }
-
-
-
-
-
-
- if (instance->portal_info) {
-
- _portal_disconnect(instance,true);
- memdelete(instance->portal_info);
- instance->portal_info=NULL;
-
- }
-
- if (instance->gi_probe_info) {
-
- while(instance->gi_probe_info->owned_instances.size()) {
-
- Instance *owned=instance->gi_probe_info->owned_instances.front()->get();
- owned->gi_probe=NULL;
- owned->data.gi_probe=NULL;
- owned->data.gi_probe_octree_xform=NULL;
- owned->BLE=NULL;
- instance->gi_probe_info->owned_instances.pop_front();
- }
-
- memdelete(instance->gi_probe_info);
- instance->gi_probe_info=NULL;
-
- }
-
- if (instance->scenario && instance->octree_id) {
- instance->scenario->octree.erase( instance->octree_id );
- instance->octree_id=0;
- }
-
-
- if (instance->room_info) {
-
- for(List<Instance*>::Element *E=instance->room_info->owned_geometry_instances.front();E;E=E->next()) {
-
- Instance *owned = E->get();
- owned->room=NULL;
- owned->RE=NULL;
- }
- for(List<Instance*>::Element *E=instance->room_info->owned_portal_instances.front();E;E=E->next()) {
-
- _portal_disconnect(E->get(),true);
- Instance *owned = E->get();
- owned->room=NULL;
- owned->RE=NULL;
- }
-
- for(List<Instance*>::Element *E=instance->room_info->owned_room_instances.front();E;E=E->next()) {
-
- Instance *owned = E->get();
- owned->room=NULL;
- owned->RE=NULL;
- }
-
- if (instance->room_info->disconnected_child_portals.size()) {
- ERR_PRINT("BUG: Disconnected portals remain!");
- }
- memdelete(instance->room_info);
- instance->room_info=NULL;
-
- }
-
- if (instance->particles_info) {
-
- rasterizer->free( instance->particles_info->instance );
- memdelete(instance->particles_info);
- instance->particles_info=NULL;
-
- }
-
- if (instance->gi_probe_sampler_info) {
-
- while (instance->gi_probe_sampler_info->owned_instances.size()) {
-
- instance_geometry_set_gi_probe_sampler(instance->gi_probe_sampler_info->owned_instances.front()->get()->self,RID());
- }
-
- if (instance->gi_probe_sampler_info->sampled_light.is_valid()) {
- rasterizer->free(instance->gi_probe_sampler_info->sampled_light);
- }
- memdelete( instance->gi_probe_sampler_info );
- instance->gi_probe_sampler_info=NULL;
- }
-#endif
}
instance->base_type = VS::INSTANCE_NONE;
@@ -646,64 +424,6 @@ void VisualServerScene::instance_set_base(RID p_instance, RID p_base) {
if (scenario)
_instance_queue_update(instance, true, true);
-
-#if 0
- if (rasterizer->is_mesh(p_base)) {
- instance->base_type=INSTANCE_MESH;
- instance->data.morph_values.resize( rasterizer->mesh_get_morph_target_count(p_base));
- instance->data.materials.resize( rasterizer->mesh_get_surface_count(p_base));
- } else if (rasterizer->is_multimesh(p_base)) {
- instance->base_type=INSTANCE_MULTIMESH;
- } else if (rasterizer->is_immediate(p_base)) {
- instance->base_type=INSTANCE_IMMEDIATE;
- } else if (rasterizer->is_particles(p_base)) {
- instance->base_type=INSTANCE_PARTICLES;
- instance->particles_info=memnew( Instance::ParticlesInfo );
- instance->particles_info->instance = rasterizer->particles_instance_create( p_base );
- } else if (rasterizer->is_light(p_base)) {
-
- instance->base_type=INSTANCE_LIGHT;
- instance->light_info = memnew( Instance::LightInfo );
- instance->light_info->instance = rasterizer->light_instance_create(p_base);
- if (instance->scenario && rasterizer->light_get_type(p_base)==LIGHT_DIRECTIONAL) {
-
- instance->light_info->D = instance->scenario->directional_lights.push_back(instance->self);
- }
-
- } else if (room_owner.owns(p_base)) {
- instance->base_type=INSTANCE_ROOM;
- instance->room_info = memnew( Instance::RoomInfo );
- instance->room_info->room=room_owner.get(p_base);
- } else if (portal_owner.owns(p_base)) {
-
- instance->base_type=INSTANCE_PORTAL;
- instance->portal_info = memnew(Instance::PortalInfo);
- instance->portal_info->portal=portal_owner.get(p_base);
- } else if (gi_probe_owner.owns(p_base)) {
-
- instance->base_type=INSTANCE_GI_PROBE;
- instance->gi_probe_info=memnew(Instance::BakedLightInfo);
- instance->gi_probe_info->gi_probe=gi_probe_owner.get(p_base);
-
- //instance->portal_info = memnew(Instance::PortalInfo);
- //instance->portal_info->portal=portal_owner.get(p_base);
- } else if (gi_probe_sampler_owner.owns(p_base)) {
-
-
- instance->base_type=INSTANCE_GI_PROBE_SAMPLER;
- instance->gi_probe_sampler_info=memnew( Instance::BakedLightSamplerInfo);
- instance->gi_probe_sampler_info->sampler=gi_probe_sampler_owner.get(p_base);
-
- //instance->portal_info = memnew(Instance::PortalInfo);
- //instance->portal_info->portal=portal_owner.get(p_base);
-
- } else {
- ERR_EXPLAIN("Invalid base RID for instance!")
- ERR_FAIL();
- }
-
- instance_dependency_map[ p_base ].insert( instance->self );
-#endif
}
}
void VisualServerScene::instance_set_scenario(RID p_instance, RID p_scenario) {
@@ -894,8 +614,6 @@ void VisualServerScene::instance_attach_skeleton(RID p_instance, RID p_skeleton)
void VisualServerScene::instance_set_exterior(RID p_instance, bool p_enabled) {
}
-void VisualServerScene::instance_set_room(RID p_instance, RID p_room) {
-}
void VisualServerScene::instance_set_extra_visibility_margin(RID p_instance, real_t p_margin) {
}
@@ -978,11 +696,6 @@ void VisualServerScene::instance_geometry_set_flag(RID p_instance, VS::InstanceF
switch (p_flags) {
- case VS::INSTANCE_FLAG_VISIBLE_IN_ALL_ROOMS: {
-
- instance->visible_in_all_rooms = p_enabled;
-
- } break;
case VS::INSTANCE_FLAG_USE_BAKED_LIGHT: {
instance->baked_light = p_enabled;
@@ -1048,13 +761,6 @@ void VisualServerScene::_update_instance(Instance *p_instance) {
return;
}
-#if 0
- if (p_instance->base_type == VS::INSTANCE_PARTICLES) {
-
- rasterizer->particles_instance_set_transform( p_instance->particles_info->instance, p_instance->data.transform );
- }
-
-#endif
if ((1 << p_instance->base_type) & VS::INSTANCE_GEOMETRY_MASK) {
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(p_instance->base_data);
@@ -1067,58 +773,12 @@ void VisualServerScene::_update_instance(Instance *p_instance) {
}
}
}
-#if 0
- else if (p_instance->base_type == INSTANCE_ROOM) {
-
- p_instance->room_info->affine_inverse=p_instance->data.transform.affine_inverse();
- } else if (p_instance->base_type == INSTANCE_GI_PROBE) {
-
- Transform scale;
- scale.basis.scale(p_instance->gi_probe_info->gi_probe->octree_aabb.size);
- scale.origin=p_instance->gi_probe_info->gi_probe->octree_aabb.pos;
- //print_line("scale: "+scale);
- p_instance->gi_probe_info->affine_inverse=(p_instance->data.transform*scale).affine_inverse();
- }
-
-#endif
p_instance->mirror = p_instance->transform.basis.determinant() < 0.0;
Rect3 new_aabb;
-#if 0
- if (p_instance->base_type==INSTANCE_PORTAL) {
-
- //portals need to be transformed in a special way, so they don't become too wide if they have scale..
- Transform portal_xform = p_instance->data.transform;
- portal_xform.basis.set_axis(2,portal_xform.basis.get_axis(2).normalized());
-
- p_instance->portal_info->plane_cache=Plane( p_instance->data.transform.origin, portal_xform.basis.get_axis(2));
- int point_count=p_instance->portal_info->portal->shape.size();
- p_instance->portal_info->transformed_point_cache.resize(point_count);
-
- AABB portal_aabb;
-
- for(int i=0;i<point_count;i++) {
-
- Point2 src = p_instance->portal_info->portal->shape[i];
- Vector3 point = portal_xform.xform(Vector3(src.x,src.y,0));
- p_instance->portal_info->transformed_point_cache[i]=point;
- if (i==0)
- portal_aabb.pos=point;
- else
- portal_aabb.expand_to(point);
- }
- portal_aabb.grow_by(p_instance->portal_info->portal->connect_range);
-
- new_aabb = portal_aabb;
-
- } else {
-#endif
new_aabb = p_instance->transform.xform(p_instance->aabb);
-#if 0
- }
-#endif
p_instance->transformed_aabb = new_aabb;
@@ -1145,33 +805,6 @@ void VisualServerScene::_update_instance(Instance *p_instance) {
pairable = true;
}
-#if 0
-
- if (p_instance->base_type == VS::INSTANCE_PORTAL) {
-
- pairable_mask=(1<<INSTANCE_PORTAL);
- pairable=true;
- }
-
- if (p_instance->base_type == VS::INSTANCE_GI_PROBE_SAMPLER) {
-
- pairable_mask=(1<<INSTANCE_GI_PROBE);
- pairable=true;
- }
-
-
- if (!p_instance->room && (1<<p_instance->base_type)&VS::INSTANCE_GEOMETRY_MASK) {
-
- base_type|=VS::INSTANCE_ROOMLESS_MASK;
- }
-
- if (p_instance->base_type == VS::INSTANCE_ROOM) {
-
- pairable_mask=INSTANCE_ROOMLESS_MASK;
- pairable=true;
- }
-#endif
-
// not inside octree
p_instance->octree_id = p_instance->scenario->octree.create(p_instance, new_aabb, 0, pairable, base_type, pairable_mask);
@@ -1184,23 +817,6 @@ void VisualServerScene::_update_instance(Instance *p_instance) {
p_instance->scenario->octree.move(p_instance->octree_id, new_aabb);
}
-#if 0
- if (p_instance->base_type==INSTANCE_PORTAL) {
-
- _portal_attempt_connect(p_instance);
- }
-
- if (!p_instance->room && (1<<p_instance->base_type)&INSTANCE_GEOMETRY_MASK) {
-
- _instance_validate_autorooms(p_instance);
- }
-
- if (p_instance->base_type == INSTANCE_ROOM) {
-
- for(Set<Instance*>::Element *E=p_instance->room_info->owned_autoroom_geometry.front();E;E=E->next())
- _instance_validate_autorooms(E->get());
- }
-#endif
}
void VisualServerScene::_update_instance_aabb(Instance *p_instance) {
@@ -1235,15 +851,6 @@ void VisualServerScene::_update_instance_aabb(Instance *p_instance) {
new_aabb = VSG::storage->particles_get_aabb(p_instance->base);
} break;
-#if 0
-
- case VisualServer::INSTANCE_PARTICLES: {
-
- new_aabb = rasterizer->particles_get_aabb(p_instance->base);
-
-
- } break;
-#endif
case VisualServer::INSTANCE_LIGHT: {
new_aabb = VSG::storage->light_get_aabb(p_instance->base);
@@ -1260,49 +867,6 @@ void VisualServerScene::_update_instance_aabb(Instance *p_instance) {
} break;
-#if 0
- case VisualServer::INSTANCE_ROOM: {
-
- Room *room = room_owner.get( p_instance->base );
- ERR_FAIL_COND(!room);
- new_aabb=room->bounds.get_aabb();
-
- } break;
- case VisualServer::INSTANCE_PORTAL: {
-
- Portal *portal = portal_owner.get( p_instance->base );
- ERR_FAIL_COND(!portal);
- for (int i=0;i<portal->shape.size();i++) {
-
- Vector3 point( portal->shape[i].x, portal->shape[i].y, 0 );
- if (i==0) {
-
- new_aabb.pos=point;
- new_aabb.size.z=0.01; // make it not flat for octree
- } else {
-
- new_aabb.expand_to(point);
- }
- }
-
- } break;
- case VisualServer::INSTANCE_GI_PROBE: {
-
- BakedLight *gi_probe = gi_probe_owner.get( p_instance->base );
- ERR_FAIL_COND(!gi_probe);
- new_aabb=gi_probe->octree_aabb;
-
- } break;
- case VisualServer::INSTANCE_GI_PROBE_SAMPLER: {
-
- BakedLightSampler *gi_probe_sampler = gi_probe_sampler_owner.get( p_instance->base );
- ERR_FAIL_COND(!gi_probe_sampler);
- float radius = gi_probe_sampler->params[VS::BAKED_LIGHT_SAMPLER_RADIUS];
-
- new_aabb=AABB(Vector3(-radius,-radius,-radius),Vector3(radius*2,radius*2,radius*2));
-
- } break;
-#endif
default: {}
}
@@ -1384,13 +948,13 @@ void VisualServerScene::_light_instance_update_shadow(Instance *p_instance, cons
Vector3 z_vec = transform.basis.get_axis(Vector3::AXIS_Z).normalized();
//z_vec points agsint the camera, like in default opengl
- float x_min, x_max;
- float y_min, y_max;
- float z_min, z_max;
+ float x_min = 0.f, x_max = 0.f;
+ float y_min = 0.f, y_max = 0.f;
+ float z_min = 0.f, z_max = 0.f;
- float x_min_cam, x_max_cam;
- float y_min_cam, y_max_cam;
- float z_min_cam, z_max_cam;
+ float x_min_cam = 0.f, x_max_cam = 0.f;
+ float y_min_cam = 0.f, y_max_cam = 0.f;
+ float z_min_cam = 0.f, z_max_cam = 0.f;
float bias_scale = 1.0;
@@ -1736,98 +1300,17 @@ void VisualServerScene::_render_scene(const Transform p_cam_transform, const Cam
reflection_probe_cull_count = 0;
-//light_samplers_culled=0;
+ //light_samplers_culled=0;
-/* print_line("OT: "+rtos( (OS::get_singleton()->get_ticks_usec()-t)/1000.0));
+ /* print_line("OT: "+rtos( (OS::get_singleton()->get_ticks_usec()-t)/1000.0));
print_line("OTO: "+itos(p_scenario->octree.get_octant_count()));
//print_line("OTE: "+itos(p_scenario->octree.get_elem_count()));
print_line("OTP: "+itos(p_scenario->octree.get_pair_count()));
*/
-/* STEP 3 - PROCESS PORTALS, VALIDATE ROOMS */
-
-// compute portals
-#if 0
- exterior_visited=false;
- exterior_portal_cull_count=0;
-
- if (room_cull_enabled) {
- for(int i=0;i<cull_count;i++) {
-
- Instance *ins = instance_cull_result[i];
- ins->last_render_pass=render_pass;
-
- if (ins->base_type!=INSTANCE_PORTAL)
- continue;
-
- if (ins->room)
- continue;
-
- ERR_CONTINUE(exterior_portal_cull_count>=MAX_EXTERIOR_PORTALS);
- exterior_portal_cull_result[exterior_portal_cull_count++]=ins;
-
- }
-
- room_cull_count = p_scenario->octree.cull_point(camera->transform.origin,room_cull_result,MAX_ROOM_CULL,NULL,(1<<INSTANCE_ROOM)|(1<<INSTANCE_PORTAL));
-
-
- Set<Instance*> current_rooms;
- Set<Instance*> portal_rooms;
- //add to set
- for(int i=0;i<room_cull_count;i++) {
-
- if (room_cull_result[i]->base_type==INSTANCE_ROOM) {
- current_rooms.insert(room_cull_result[i]);
- }
- if (room_cull_result[i]->base_type==INSTANCE_PORTAL) {
- //assume inside that room if also inside the portal..
- if (room_cull_result[i]->room) {
- portal_rooms.insert(room_cull_result[i]->room);
- }
-
- SWAP(room_cull_result[i],room_cull_result[room_cull_count-1]);
- room_cull_count--;
- i--;
- }
- }
-
- //remove from set if it has a parent room or BSP doesn't contain
- for(int i=0;i<room_cull_count;i++) {
- Instance *r = room_cull_result[i];
-
- //check inside BSP
- Vector3 room_local_point = r->room_info->affine_inverse.xform( camera->transform.origin );
-
- if (!portal_rooms.has(r) && !r->room_info->room->bounds.point_is_inside(room_local_point)) {
-
- current_rooms.erase(r);
- continue;
- }
-
- //check parent
- while (r->room) {// has parent room
-
- current_rooms.erase(r);
- r=r->room;
- }
-
- }
-
- if (current_rooms.size()) {
- //camera is inside a room
- // go through rooms
- for(Set<Instance*>::Element *E=current_rooms.front();E;E=E->next()) {
- _cull_room(camera,E->get());
- }
+ /* STEP 3 - PROCESS PORTALS, VALIDATE ROOMS */
+ //removed, will replace with culling
- } else {
- //start from exterior
- _cull_room(camera,NULL);
-
- }
- }
-
-#endif
/* STEP 4 - REMOVE FURTHER CULLED OBJECTS, ADD LIGHTS */
for (int i = 0; i < cull_count; i++) {
@@ -1895,71 +1378,6 @@ void VisualServerScene::_render_scene(const Transform p_cam_transform, const Cam
} else if ((1 << ins->base_type) & VS::INSTANCE_GEOMETRY_MASK && ins->visible && ins->cast_shadows != VS::SHADOW_CASTING_SETTING_SHADOWS_ONLY) {
keep = true;
-#if 0
- bool discarded=false;
-
- if (ins->draw_range_end>0) {
-
- float d = cull_range.nearp.distance_to(ins->data.transform.origin);
- if (d<0)
- d=0;
- discarded=(d<ins->draw_range_begin || d>=ins->draw_range_end);
-
-
- }
-
- if (!discarded) {
-
- // test if this geometry should be visible
-
- if (room_cull_enabled) {
-
-
- if (ins->visible_in_all_rooms) {
- keep=true;
- } else if (ins->room) {
-
- if (ins->room->room_info->last_visited_pass==render_pass)
- keep=true;
- } else if (ins->auto_rooms.size()) {
-
-
- for(Set<Instance*>::Element *E=ins->auto_rooms.front();E;E=E->next()) {
-
- if (E->get()->room_info->last_visited_pass==render_pass) {
- keep=true;
- break;
- }
- }
- } else if(exterior_visited)
- keep=true;
- } else {
-
- keep=true;
- }
-
-
- }
-
-
- if (keep) {
- // update cull range
- float min,max;
- ins->transformed_aabb.project_range_in_plane(cull_range.nearp,min,max);
-
- if (min<cull_range.min)
- cull_range.min=min;
- if (max>cull_range.max)
- cull_range.max=max;
-
- if (ins->sampled_light && ins->sampled_light->gi_probe_sampler_info->last_pass!=render_pass) {
- if (light_samplers_culled<MAX_LIGHT_SAMPLERS) {
- light_sampler_cull_result[light_samplers_culled++]=ins->sampled_light;
- ins->sampled_light->gi_probe_sampler_info->last_pass=render_pass;
- }
- }
- }
-#endif
InstanceGeometryData *geom = static_cast<InstanceGeometryData *>(ins->base_data);
@@ -2016,7 +1434,7 @@ void VisualServerScene::_render_scene(const Transform p_cam_transform, const Cam
}
ins->depth = near_plane.distance_to(ins->transform.origin);
- ins->depth_layer = CLAMP(int(ins->depth * 8 / z_far), 0, 7);
+ ins->depth_layer = CLAMP(int(ins->depth * 16 / z_far), 0, 15);
}
if (!keep) {
@@ -2055,13 +1473,13 @@ void VisualServerScene::_render_scene(const Transform p_cam_transform, const Cam
//check shadow..
- if (light && p_shadow_atlas.is_valid() && VSG::storage->light_has_shadow(E->get()->base)) {
- lights_with_shadow[directional_shadow_count++] = E->get();
+ if (light) {
+ if (p_shadow_atlas.is_valid() && VSG::storage->light_has_shadow(E->get()->base)) {
+ lights_with_shadow[directional_shadow_count++] = E->get();
+ }
+ //add to list
+ directional_light_ptr[directional_light_count++] = light->instance;
}
-
- //add to list
-
- directional_light_ptr[directional_light_count++] = light->instance;
}
VSG::scene_render->set_directional_shadow_count(directional_shadow_count);
@@ -2085,7 +1503,7 @@ void VisualServerScene::_render_scene(const Transform p_cam_transform, const Cam
InstanceLightData *light = static_cast<InstanceLightData *>(ins->base_data);
- float coverage;
+ float coverage = 0.f;
{ //compute coverage
@@ -2182,20 +1600,7 @@ void VisualServerScene::_render_scene(const Transform p_cam_transform, const Cam
else
environment = scenario->fallback_environment;
-#if 0
- /* STEP 6 - SAMPLE BAKED LIGHT */
-
- bool islinear =false;
- if (environment.is_valid()) {
- islinear = rasterizer->environment_is_fx_enabled(environment,VS::ENV_FX_SRGB);
- }
-
- for(int i=0;i<light_samplers_culled;i++) {
-
- _process_sampled_light(camera->transform,light_sampler_cull_result[i],islinear);
- }
-#endif
- /* STEP 7 - PROCESS GEOMETRY AND DRAW SCENE*/
+ /* STEP 6 - PROCESS GEOMETRY AND DRAW SCENE*/
VSG::scene_render->render_scene(p_cam_transform, p_cam_projection, p_cam_orthogonal, (RasterizerScene::InstanceBase **)instance_cull_result, cull_count, light_instance_cull_result, light_cull_count + directional_light_count, reflection_probe_instance_cull_result, reflection_probe_cull_count, environment, p_shadow_atlas, scenario->reflection_atlas, p_reflection_probe, p_reflection_probe_pass);
}
@@ -2282,7 +1687,7 @@ bool VisualServerScene::_render_reflection_probe_step(Instance *p_instance, int
void VisualServerScene::_gi_probe_fill_local_data(int p_idx, int p_level, int p_x, int p_y, int p_z, const GIProbeDataCell *p_cell, const GIProbeDataHeader *p_header, InstanceGIProbeData::LocalData *p_local_data, Vector<uint32_t> *prev_cell) {
- if (p_level == p_header->cell_subdiv - 1) {
+ if ((uint32_t)p_level == p_header->cell_subdiv - 1) {
Vector3 emission;
emission.x = (p_cell[p_idx].emission >> 24) / 255.0;
@@ -2393,9 +1798,9 @@ void VisualServerScene::_setup_gi_probe(Instance *p_instance) {
}
for (int i = 0; i < (int)header->cell_subdiv; i++) {
- uint32_t x = header->width >> i;
- uint32_t y = header->height >> i;
- uint32_t z = header->depth >> i;
+ int x = header->width >> i;
+ int y = header->height >> i;
+ int z = header->depth >> i;
//create and clear mipmap
PoolVector<uint8_t> mipmap;
@@ -2491,7 +1896,7 @@ void VisualServerScene::_setup_gi_probe(Instance *p_instance) {
uint8_t alpha_block[4][4] = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 } };
- for (int j = 0; j < k.source_count; j++) {
+ for (uint32_t j = 0; j < k.source_count; j++) {
int alpha = (cells[k.sources[j]].level_alpha >> 8) & 0xFF;
if (alpha < min_alpha)
@@ -2984,7 +2389,7 @@ void VisualServerScene::_bake_gi_probe(Instance *p_gi_probe) {
Vector3 colors[16];
- for (int j = 0; j < b.source_count; j++) {
+ for (uint32_t j = 0; j < b.source_count; j++) {
colors[j].x = (local_data[b.sources[j]].energy[0] / float(probe_data->dynamic.bake_dynamic_range)) / 1024.0;
colors[j].y = (local_data[b.sources[j]].energy[1] / float(probe_data->dynamic.bake_dynamic_range)) / 1024.0;
@@ -2998,8 +2403,8 @@ void VisualServerScene::_bake_gi_probe(Instance *p_gi_probe) {
if (b.source_count == 16) {
//all cells are used so, find minmax between them
int further_apart[2] = { 0, 0 };
- for (int j = 0; j < b.source_count; j++) {
- for (int k = j + 1; k < b.source_count; k++) {
+ for (uint32_t j = 0; j < b.source_count; j++) {
+ for (uint32_t k = j + 1; k < b.source_count; k++) {
float d = colors[j].distance_squared_to(colors[k]);
if (d > distance) {
distance = d;
@@ -3019,12 +2424,12 @@ void VisualServerScene::_bake_gi_probe(Instance *p_gi_probe) {
//average all colors first
Vector3 average;
- for (int j = 0; j < b.source_count; j++) {
+ for (uint32_t j = 0; j < b.source_count; j++) {
average += colors[j];
}
average.normalize();
//find max distance in normal from average
- for (int j = 0; j < b.source_count; j++) {
+ for (uint32_t j = 0; j < b.source_count; j++) {
float d = average.dot(colors[j]);
distance = MAX(d, distance);
}
@@ -3054,7 +2459,7 @@ void VisualServerScene::_bake_gi_probe(Instance *p_gi_probe) {
Vector3 dir = (to - from).normalized();
- for (int j = 0; j < b.source_count; j++) {
+ for (uint32_t j = 0; j < b.source_count; j++) {
float d = (colors[j] - from).dot(dir) / distance;
indices[j] = int(d * 3 + 0.5);
@@ -3064,7 +2469,7 @@ void VisualServerScene::_bake_gi_probe(Instance *p_gi_probe) {
indices[j] = index_swap[CLAMP(indices[j], 0, 3)];
}
} else {
- for (int j = 0; j < b.source_count; j++) {
+ for (uint32_t j = 0; j < b.source_count; j++) {
indices[j] = 0;
}
}
@@ -3073,7 +2478,7 @@ void VisualServerScene::_bake_gi_probe(Instance *p_gi_probe) {
uint32_t index_block[16] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
- for (int j = 0; j < b.source_count; j++) {
+ for (uint32_t j = 0; j < b.source_count; j++) {
int x = local_data[b.sources[j]].pos[0] % 4;
int y = local_data[b.sources[j]].pos[1] % 4;
@@ -3467,7 +2872,6 @@ bool VisualServerScene::free(RID p_rid) {
Instance *instance = instance_owner.get(p_rid);
- instance_set_room(p_rid, RID());
instance_set_scenario(p_rid, RID());
instance_set_base(p_rid, RID());
instance_geometry_set_material_override(p_rid, RID());
diff --git a/servers/visual/visual_server_scene.h b/servers/visual/visual_server_scene.h
index 910e75c3e3..ac771030cf 100644
--- a/servers/visual/visual_server_scene.h
+++ b/servers/visual/visual_server_scene.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -54,6 +54,8 @@ public:
uint64_t render_pass;
static VisualServerScene *singleton;
+
+// FIXME: Kept as reference for future implementation
#if 0
struct Portal {
@@ -137,38 +139,6 @@ public:
virtual void camera_set_environment(RID p_camera, RID p_env);
virtual void camera_set_use_vertical_aspect(RID p_camera, bool p_enable);
- /*
-
- struct RoomInfo {
-
- Transform affine_inverse;
- Room *room;
- List<Instance*> owned_geometry_instances;
- List<Instance*> owned_portal_instances;
- List<Instance*> owned_room_instances;
- List<Instance*> owned_light_instances; //not used, but just for the sake of it
- Set<Instance*> disconnected_child_portals;
- Set<Instance*> owned_autoroom_geometry;
- uint64_t last_visited_pass;
- RoomInfo() { last_visited_pass=0; }
-
- };
-
- struct InstancePortal {
-
- Portal *portal;
- Set<Instance*> candidate_set;
- Instance *connected;
- uint64_t last_visited_pass;
-
- Plane plane_cache;
- Vector<Vector3> transformed_point_cache;
-
-
- PortalInfo() { connected=NULL; last_visited_pass=0;}
- };
-*/
-
/* SCENARIO API */
struct Instance;
@@ -236,10 +206,6 @@ public:
float lod_end_hysteresis;
RID lod_instance;
- Instance *room;
- SelfList<Instance> room_item;
- bool visible_in_all_rooms;
-
uint64_t last_render_pass;
uint64_t last_frame_pass;
@@ -263,7 +229,7 @@ public:
}
Instance()
- : scenario_item(this), update_item(this), room_item(this) {
+ : scenario_item(this), update_item(this) {
octree_id = 0;
scenario = NULL;
@@ -281,9 +247,6 @@ public:
lod_begin_hysteresis = 0;
lod_end_hysteresis = 0;
- room = NULL;
- visible_in_all_rooms = false;
-
last_render_pass = 0;
last_frame_pass = 0;
version = 1;
@@ -496,7 +459,6 @@ public:
virtual void instance_attach_skeleton(RID p_instance, RID p_skeleton);
virtual void instance_set_exterior(RID p_instance, bool p_enabled);
- virtual void instance_set_room(RID p_instance, RID p_room);
virtual void instance_set_extra_visibility_margin(RID p_instance, real_t p_margin);
diff --git a/servers/visual/visual_server_viewport.cpp b/servers/visual/visual_server_viewport.cpp
index ad9dec090a..0dca09a5bf 100644
--- a/servers/visual/visual_server_viewport.cpp
+++ b/servers/visual/visual_server_viewport.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "visual_server_viewport.h"
+
#include "project_settings.h"
#include "visual_server_canvas.h"
#include "visual_server_global.h"
@@ -51,36 +52,6 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport, ARVRInterface::E
}
bool can_draw_3d = !p_viewport->disable_3d && !p_viewport->disable_3d_by_usage && VSG::scene->camera_owner.owns(p_viewport->camera);
-#if 0
-
-
-
- if (scenario_draw_canvas_bg) {
-
- rasterizer->begin_canvas_bg();
- }
-
- if (!scenario_draw_canvas_bg && can_draw_3d) {
-
- _draw_viewport_camera(p_viewport,false);
-
- } else if (true /*|| !p_viewport->canvas_list.empty()*/){
-
- //clear the viewport black because of no camera? i seriously should..
- if (p_viewport->render_target_clear_on_new_frame || p_viewport->render_target_clear) {
- if (p_viewport->transparent_bg) {
- rasterizer->clear_viewport(Color(0,0,0,0));
- }
- else {
- Color cc=clear_color;
- if (scenario_draw_canvas_bg)
- cc.a=0;
- rasterizer->clear_viewport(cc);
- }
- p_viewport->render_target_clear=false;
- }
- }
-#endif
if (p_viewport->clear_mode != VS::VIEWPORT_CLEAR_NEVER) {
VSG::rasterizer->clear_render_target(clear_color);
diff --git a/servers/visual/visual_server_viewport.h b/servers/visual/visual_server_viewport.h
index 93227d1c31..8a294a9129 100644
--- a/servers/visual/visual_server_viewport.h
+++ b/servers/visual/visual_server_viewport.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/servers/visual/visual_server_wrap_mt.cpp b/servers/visual/visual_server_wrap_mt.cpp
index 827f47a16e..d9a0077e60 100644
--- a/servers/visual/visual_server_wrap_mt.cpp
+++ b/servers/visual/visual_server_wrap_mt.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h
index ca040e9355..f24049be92 100644
--- a/servers/visual/visual_server_wrap_mt.h
+++ b/servers/visual/visual_server_wrap_mt.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
@@ -128,6 +128,7 @@ public:
FUNC3(material_set_param, RID, const StringName &, const Variant &)
FUNC2RC(Variant, material_get_param, RID, const StringName &)
+ FUNC2(material_set_render_priority, RID, int)
FUNC2(material_set_line_width, RID, float)
FUNC2(material_set_next_pass, RID, RID)
@@ -250,23 +251,6 @@ public:
FUNC2(reflection_probe_set_enable_shadows, RID, bool)
FUNC2(reflection_probe_set_cull_mask, RID, uint32_t)
- /* ROOM API */
-
- FUNC0R(RID, room_create)
- FUNC4(room_add_bounds, RID, const PoolVector<Vector2> &, float, const Transform &)
- FUNC1(room_clear_bounds, RID)
-
- /* PORTAL API */
-
- // portals are only (x/y) points, forming a convex shape, which its clockwise
- // order points outside. (z is 0);
-
- FUNC0R(RID, portal_create)
- FUNC2(portal_set_shape, RID, const Vector<Point2> &)
- FUNC2(portal_set_enabled, RID, bool)
- FUNC2(portal_set_disable_distance, RID, float)
- FUNC2(portal_set_disabled_color, RID, const Color &)
-
/* BAKED LIGHT API */
FUNC0R(RID, gi_probe_create)
@@ -438,7 +422,6 @@ public:
FUNC2(instance_attach_skeleton, RID, RID)
FUNC2(instance_set_exterior, RID, bool)
- FUNC2(instance_set_room, RID, RID)
FUNC2(instance_set_extra_visibility_margin, RID, real_t)
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index cb1f96c23f..67b847d127 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -28,6 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "visual_server.h"
+
#include "method_bind_ext.gen.inc"
#include "project_settings.h"
@@ -39,25 +40,6 @@ VisualServer *VisualServer::get_singleton() {
return singleton;
}
-PoolVector<String> VisualServer::_shader_get_param_list(RID p_shader) const {
-
- //remove at some point
-
- PoolVector<String> pl;
-
-#if 0
- List<StringName> params;
- shader_get_param_list(p_shader,&params);
-
-
- for(List<StringName>::Element *E=params.front();E;E=E->next()) {
-
- pl.push_back(E->get());
- }
-#endif
- return pl;
-}
-
VisualServer *VisualServer::create() {
ERR_FAIL_COND_V(singleton, NULL);
@@ -1440,6 +1422,7 @@ Array VisualServer::mesh_surface_get_arrays(RID p_mesh, int p_surface) const {
void VisualServer::_bind_methods() {
+ ClassDB::bind_method(D_METHOD("force_draw"), &VisualServer::draw);
ClassDB::bind_method(D_METHOD("texture_create"), &VisualServer::texture_create);
ClassDB::bind_method(D_METHOD("texture_create_from_image", "image", "flags"), &VisualServer::texture_create_from_image, DEFVAL(TEXTURE_FLAGS_DEFAULT));
//ClassDB::bind_method(D_METHOD("texture_allocate"),&VisualServer::texture_allocate,DEFVAL( TEXTURE_FLAGS_DEFAULT ) );
@@ -1466,7 +1449,6 @@ void VisualServer::_camera_set_orthogonal(RID p_camera, float p_size, float p_z_
void VisualServer::mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry::MeshData &p_mesh_data) {
-#if 1
PoolVector<Vector3> vertices;
PoolVector<Vector3> normals;
@@ -1491,24 +1473,6 @@ void VisualServer::mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry::M
d[ARRAY_VERTEX] = vertices;
d[ARRAY_NORMAL] = normals;
mesh_add_surface_from_arrays(p_mesh, PRIMITIVE_TRIANGLES, d);
-
-#else
-
- PoolVector<Vector3> vertices;
-
- for (int i = 0; i < p_mesh_data.edges.size(); i++) {
-
- const Geometry::MeshData::Edge &f = p_mesh_data.edges[i];
- vertices.push_back(p_mesh_data.vertices[f.a]);
- vertices.push_back(p_mesh_data.vertices[f.b]);
- }
-
- Array d;
- d.resize(VS::ARRAY_MAX);
- d[ARRAY_VERTEX] = vertices;
- mesh_add_surface(p_mesh, PRIMITIVE_LINES, d);
-
-#endif
}
void VisualServer::mesh_add_surface_from_planes(RID p_mesh, const PoolVector<Plane> &p_planes) {
diff --git a/servers/visual_server.h b/servers/visual_server.h
index 5e0a390a21..d516013ee2 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -49,7 +49,6 @@ class VisualServer : public Object {
int mm_policy;
- PoolVector<String> _shader_get_param_list(RID p_shader) const;
void _camera_set_orthogonal(RID p_camera, float p_size, float p_z_near, float p_z_far);
void _canvas_item_add_style_box(RID p_item, const Rect2 &p_rect, const Rect2 &p_source, RID p_texture, const Vector<float> &p_margins, const Color &p_modulate = Color(1, 1, 1));
Array _get_array_from_surface(uint32_t p_format, PoolVector<uint8_t> p_vertex_data, int p_vertex_len, PoolVector<uint8_t> p_index_data, int p_index_len) const;
@@ -167,6 +166,11 @@ public:
/* COMMON MATERIAL API */
+ enum {
+ MATERIAL_RENDER_PRIORITY_MIN = -128,
+ MATERIAL_RENDER_PRIORITY_MAX = 127,
+
+ };
virtual RID material_create() = 0;
virtual void material_set_shader(RID p_shader_material, RID p_shader) = 0;
@@ -175,6 +179,8 @@ public:
virtual void material_set_param(RID p_material, const StringName &p_param, const Variant &p_value) = 0;
virtual Variant material_get_param(RID p_material, const StringName &p_param) const = 0;
+ virtual void material_set_render_priority(RID p_material, int priority) = 0;
+
virtual void material_set_line_width(RID p_material, float p_width) = 0;
virtual void material_set_next_pass(RID p_material, RID p_next_material) = 0;
@@ -359,6 +365,7 @@ public:
LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET,
LIGHT_PARAM_SHADOW_NORMAL_BIAS,
LIGHT_PARAM_SHADOW_BIAS,
+ LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE,
LIGHT_PARAM_MAX
};
@@ -421,23 +428,6 @@ public:
virtual void reflection_probe_set_enable_shadows(RID p_probe, bool p_enable) = 0;
virtual void reflection_probe_set_cull_mask(RID p_probe, uint32_t p_layers) = 0;
- /* ROOM API */
-
- virtual RID room_create() = 0;
- virtual void room_add_bounds(RID p_room, const PoolVector<Vector2> &p_convex_polygon, float p_height, const Transform &p_transform) = 0;
- virtual void room_clear_bounds(RID p_room) = 0;
-
- /* PORTAL API */
-
- // portals are only (x/y) points, forming a convex shape, which its clockwise
- // order points outside. (z is 0);
-
- virtual RID portal_create() = 0;
- virtual void portal_set_shape(RID p_portal, const Vector<Point2> &p_shape) = 0;
- virtual void portal_set_enabled(RID p_portal, bool p_enabled) = 0;
- virtual void portal_set_disable_distance(RID p_portal, float p_distance) = 0;
- virtual void portal_set_disabled_color(RID p_portal, const Color &p_color) = 0;
-
/* GI PROBE API */
virtual RID gi_probe_create() = 0;
@@ -709,8 +699,6 @@ public:
INSTANCE_PARTICLES,
INSTANCE_LIGHT,
INSTANCE_REFLECTION_PROBE,
- INSTANCE_ROOM,
- INSTANCE_PORTAL,
INSTANCE_GI_PROBE,
INSTANCE_MAX,
/*INSTANCE_BAKED_LIGHT_SAMPLER,*/
@@ -734,7 +722,6 @@ public:
virtual void instance_attach_skeleton(RID p_instance, RID p_skeleton) = 0;
virtual void instance_set_exterior(RID p_instance, bool p_enabled) = 0;
- virtual void instance_set_room(RID p_instance, RID p_room) = 0;
virtual void instance_set_extra_visibility_margin(RID p_instance, real_t p_margin) = 0;
@@ -744,7 +731,6 @@ public:
virtual Vector<ObjectID> instances_cull_convex(const Vector<Plane> &p_convex, RID p_scenario = RID()) const = 0;
enum InstanceFlags {
- INSTANCE_FLAG_VISIBLE_IN_ALL_ROOMS,
INSTANCE_FLAG_USE_BAKED_LIGHT,
INSTANCE_FLAG_MAX
};
@@ -845,6 +831,7 @@ public:
CANVAS_LIGHT_FILTER_NONE,
CANVAS_LIGHT_FILTER_PCF3,
CANVAS_LIGHT_FILTER_PCF5,
+ CANVAS_LIGHT_FILTER_PCF7,
CANVAS_LIGHT_FILTER_PCF9,
CANVAS_LIGHT_FILTER_PCF13,
};
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 804395f8d3..76d51d7066 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -51,9 +51,23 @@ Files extracted from upstream source:
## fonts
-- Upstream: ?
+### Noto Sans
-TODO.
+- Upstream: https://github.com/googlei18n/noto-fonts
+- Version: 1.06
+- License: OFL-1.1
+
+Use UI font if exists, because it has tight vertial metrix and good for UI.
+
+### Adobe Source Code Pro Regular
+
+- Upstream: https://github.com/adobe-fonts/source-code-pro
+- Version: 2.030
+- License: OFL-1.1
+
+### DroidSans*.ttf
+
+- Upstream: ?
## freetype
@@ -107,7 +121,7 @@ Files extracted from upstream source:
## libpng
- Upstream: http://libpng.org/pub/png/libpng.html
-- Version: 1.6.31rc01
+- Version: 1.6.32
- License: libpng/zlib
Files extracted from upstream source:
@@ -129,6 +143,19 @@ Files extracted from upstream source:
TODO.
+## libtheora
+
+- Upstream: https://www.theora.org
+- Version: 1.1.1
+- License: BSD-3-Clause
+
+Files extracted from upstream source:
+
+- all .c, .h in lib/
+- all .h files in include/theora/ as theora/
+- COPYING and LICENSE
+
+
## libvorbis
- Upstream: https://www.xiph.org/vorbis
@@ -247,18 +274,30 @@ Collection of single-file libraries used in Godot components.
* License: zlib
- `stb_truetype.h`
* Upstream: https://github.com/nothings/stb
- * Version: 1.11
+ * Version: 1.17
* License: Public Domain (Unlicense) or MIT
- `stb_vorbis.c`
* Upstream: https://github.com/nothings/stb
- * Version: 1.09
+ * Version: 1.11
* License: Public Domain (Unlicense) or MIT
+## nanosvg
+
+- Upstream: https://github.com/memononen/nanosvg
+- Version: 9a74da4 (git)
+- License: zlib
+
+Files extracted from the upstream source:
+
+- All .h files in `src/`
+- LICENSE.txt
+
+
## openssl
- Upstream: https://www.openssl.org
-- Version: 1.0.2h
+- Version: 1.0.2l
- License: OpenSSL license / BSD-like
Files extracted from the upstream source:
@@ -296,6 +335,18 @@ Files extracted from upstream source:
- celt/ and silk/ subfolders
- COPYING
+## pcre2
+
+- Upstream: http://www.pcre.org/
+- Version: 10.23
+- License: BSD-3-Clause
+
+Files extracted from upstream source:
+
+- Files listed in NON-AUTOTOOLS-BUILD steps 1-4
+- All .h files in src/
+- src/pcre2_jit_*.c and src/sljit/*
+- AUTHORS and COPYING
## pvrtccompressor
@@ -331,19 +382,6 @@ Files extracted from upstream source:
- all .cpp, .h and .inl files
-## theora
-
-- Upstream: https://www.theora.org
-- Version: 1.1.1
-- License: BSD-3-Clause
-
-Files extracted from upstream source:
-
-- all .c, .h in lib/
-- all .h files in include/theora/ as theora/
-- COPYING and LICENSE
-
-
## tinyexr
- Upstream: https://github.com/syoyo/tinyexr
@@ -369,13 +407,14 @@ Files extracted from upstream source:
- all .c and .h files
+
## zstd
- Upstream: https://github.com/facebook/zstd
-- Version: 1.3.0
+- Version: 1.3.1
- License: BSD-3-Clause
Files extracted from upstream source:
-- all .c and .h under lib/
-- README.md, LICENSE, PATENTS
+- lib/{common/,compress/,decompress/,zstd.h}
+- README.md, LICENSE
diff --git a/thirdparty/enet/enet/godot.h b/thirdparty/enet/enet/godot.h
index 75645153dd..937c4fa60e 100644
--- a/thirdparty/enet/enet/godot.h
+++ b/thirdparty/enet/enet/godot.h
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/thirdparty/enet/godot.cpp b/thirdparty/enet/godot.cpp
index f050b7b916..2fc264345b 100644
--- a/thirdparty/enet/godot.cpp
+++ b/thirdparty/enet/godot.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
diff --git a/thirdparty/fonts/DroidSans.ttf b/thirdparty/fonts/DroidSans.ttf
deleted file mode 100644
index 767c63ad00..0000000000
--- a/thirdparty/fonts/DroidSans.ttf
+++ /dev/null
Binary files differ
diff --git a/thirdparty/fonts/DroidSansArabic.ttf b/thirdparty/fonts/DroidSansArabic.ttf
deleted file mode 100644
index 660e2a9916..0000000000
--- a/thirdparty/fonts/DroidSansArabic.ttf
+++ /dev/null
Binary files differ
diff --git a/thirdparty/fonts/DroidSansHebrew.ttf b/thirdparty/fonts/DroidSansHebrew.ttf
deleted file mode 100644
index 8d77e3e4cf..0000000000
--- a/thirdparty/fonts/DroidSansHebrew.ttf
+++ /dev/null
Binary files differ
diff --git a/thirdparty/fonts/LICENSE.Noto.txt b/thirdparty/fonts/LICENSE.Noto.txt
new file mode 100644
index 0000000000..d952d62c06
--- /dev/null
+++ b/thirdparty/fonts/LICENSE.Noto.txt
@@ -0,0 +1,92 @@
+This Font Software is licensed under the SIL Open Font License,
+Version 1.1.
+
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font
+creation efforts of academic and linguistic communities, and to
+provide a free and open framework in which fonts may be shared and
+improved in partnership with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply to
+any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software
+components as distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to,
+deleting, or substituting -- in part or in whole -- any of the
+components of the Original Version, by changing formats or by porting
+the Font Software to a new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed,
+modify, redistribute, and sell modified and unmodified copies of the
+Font Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components, in
+Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the
+corresponding Copyright Holder. This restriction only applies to the
+primary font name as presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created using
+the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/thirdparty/fonts/NotoNaskhArabicUI_Regular.ttf b/thirdparty/fonts/NotoNaskhArabicUI_Regular.ttf
new file mode 100644
index 0000000000..67713c697e
--- /dev/null
+++ b/thirdparty/fonts/NotoNaskhArabicUI_Regular.ttf
Binary files differ
diff --git a/thirdparty/fonts/NotoSansHebrew_Regular.ttf b/thirdparty/fonts/NotoSansHebrew_Regular.ttf
new file mode 100644
index 0000000000..5027f5c228
--- /dev/null
+++ b/thirdparty/fonts/NotoSansHebrew_Regular.ttf
Binary files differ
diff --git a/thirdparty/fonts/DroidSansThai.ttf b/thirdparty/fonts/NotoSansThaiUI_Regular.ttf
index f849baeff9..9c50a1b8f5 100644
--- a/thirdparty/fonts/DroidSansThai.ttf
+++ b/thirdparty/fonts/NotoSansThaiUI_Regular.ttf
Binary files differ
diff --git a/thirdparty/fonts/NotoSansUI_Regular.ttf b/thirdparty/fonts/NotoSansUI_Regular.ttf
new file mode 100644
index 0000000000..65b29fcff1
--- /dev/null
+++ b/thirdparty/fonts/NotoSansUI_Regular.ttf
Binary files differ
diff --git a/thirdparty/fonts/source_code_pro.otf b/thirdparty/fonts/source_code_pro.otf
index 4e3b9d0bcd..1bae0027ff 100644
--- a/thirdparty/fonts/source_code_pro.otf
+++ b/thirdparty/fonts/source_code_pro.otf
Binary files differ
diff --git a/thirdparty/libpng/arm/filter_neon.S b/thirdparty/libpng/arm/filter_neon.S
index 09267c6030..000764cd21 100644
--- a/thirdparty/libpng/arm/filter_neon.S
+++ b/thirdparty/libpng/arm/filter_neon.S
@@ -3,7 +3,7 @@
*
* Copyright (c) 2014,2017 Glenn Randers-Pehrson
* Written by Mans Rullgard, 2011.
- * Last changed in libpng 1.6.31 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.31 [July 27, 2017]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
diff --git a/thirdparty/libpng/png.c b/thirdparty/libpng/png.c
index 87fda0b306..2352df13cb 100644
--- a/thirdparty/libpng/png.c
+++ b/thirdparty/libpng/png.c
@@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions
*
- * Last changed in libpng 1.6.31 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.32 [August 24, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -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_31rc01 Your_png_h_is_not_version_1_6_31rc01;
+typedef png_libpng_version_1_6_32 Your_png_h_is_not_version_1_6_32;
#ifdef __GNUC__
/* The version tests may need to be added to, but the problem warning has
@@ -619,8 +619,18 @@ png_free_data(png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 mask,
/* Free any eXIf entry */
if (((mask & PNG_FREE_EXIF) & info_ptr->free_me) != 0)
{
- png_free(png_ptr, info_ptr->exif);
- info_ptr->exif = NULL;
+# ifdef PNG_READ_eXIf_SUPPORTED
+ if (info_ptr->eXIf_buf)
+ {
+ png_free(png_ptr, info_ptr->eXIf_buf);
+ info_ptr->eXIf_buf = NULL;
+ }
+# endif
+ if (info_ptr->exif)
+ {
+ png_free(png_ptr, info_ptr->exif);
+ info_ptr->exif = NULL;
+ }
info_ptr->valid &= ~PNG_INFO_eXIf;
}
#endif
@@ -806,14 +816,14 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
- "libpng version 1.6.31rc01 - July 19, 2017" PNG_STRING_NEWLINE \
+ "libpng version 1.6.32 - August 24, 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.31rc01 - July 19, 2017\
+ return "libpng version 1.6.32 - August 24, 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 80ecc82c3a..51ac8abe74 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.31rc01, July 19, 2017
+ * libpng version 1.6.32, August 24, 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.31rc01, July 19, 2017:
+ * libpng versions 0.97, January 1998, through 1.6.32, August 24, 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.31rc01, July 19, 2017 are
+ * libpng versions 1.0.7, July 1, 2000 through 1.6.32, August 24, 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
@@ -213,7 +213,7 @@
* ...
* 1.5.28 15 10527 15.so.15.28[.0]
* ...
- * 1.6.31 16 10631 16.so.16.31[.0]
+ * 1.6.32 16 10632 16.so.16.32[.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:
* =========================
*
- * July 19, 2017
+ * August 24, 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.31rc01 are Y2K compliant. It is my belief that
+ * upward through 1.6.32 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.31rc01"
-#define PNG_HEADER_VERSION_STRING " libpng version 1.6.31rc01 - July 19, 2017\n"
+#define PNG_LIBPNG_VER_STRING "1.6.32"
+#define PNG_HEADER_VERSION_STRING " libpng version 1.6.32 - August 24, 2017\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@@ -318,13 +318,13 @@
/* 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 31
+#define PNG_LIBPNG_VER_RELEASE 32
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
*/
-#define PNG_LIBPNG_VER_BUILD 01
+#define PNG_LIBPNG_VER_BUILD 0
/* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1
@@ -341,7 +341,7 @@
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
PNG_LIBPNG_BUILD_PRIVATE */
-#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_RC
+#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
* We must not include leading zeros.
@@ -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 10631 /* 1.6.31 */
+#define PNG_LIBPNG_VER 10632 /* 1.6.32 */
/* 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_31rc01;
+typedef char* png_libpng_version_1_6_32;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*
@@ -2014,6 +2014,11 @@ PNG_EXPORT(246, png_uint_32, png_get_eXIf, (png_const_structrp png_ptr,
png_inforp info_ptr, png_bytep *exif));
PNG_EXPORT(247, void, png_set_eXIf, (png_const_structrp png_ptr,
png_inforp info_ptr, const png_bytep exif));
+
+PNG_EXPORT(248, png_uint_32, png_get_eXIf_1, (png_const_structrp png_ptr,
+ png_const_inforp info_ptr, png_uint_32 *num_exif, png_bytep *exif));
+PNG_EXPORT(249, void, png_set_eXIf_1, (png_const_structrp png_ptr,
+ png_inforp info_ptr, const png_uint_32 num_exif, const png_bytep exif));
#endif
#ifdef PNG_gAMA_SUPPORTED
@@ -3259,7 +3264,7 @@ PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option,
* one to use is one more than this.)
*/
#ifdef PNG_EXPORT_LAST_ORDINAL
- PNG_EXPORT_LAST_ORDINAL(247);
+ PNG_EXPORT_LAST_ORDINAL(249);
#endif
#ifdef __cplusplus
diff --git a/thirdparty/libpng/pngconf.h b/thirdparty/libpng/pngconf.h
index 9308d6a60a..c0f15547be 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.31rc01, July 19, 2017
+ * libpng version 1.6.32, August 24, 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/pngerror.c b/thirdparty/libpng/pngerror.c
index 37f26c6558..ad48bfb986 100644
--- a/thirdparty/libpng/pngerror.c
+++ b/thirdparty/libpng/pngerror.c
@@ -1,7 +1,7 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
- * Last changed in libpng 1.6.31 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.31 [July 27, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
diff --git a/thirdparty/libpng/pngget.c b/thirdparty/libpng/pngget.c
index ace9e6351f..26e9fb1c35 100644
--- a/thirdparty/libpng/pngget.c
+++ b/thirdparty/libpng/pngget.c
@@ -1,8 +1,8 @@
/* pngget.c - retrieval of values from info struct
*
- * Last changed in libpng 1.6.26 [October 20, 2016]
- * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
+ * Last changed in libpng 1.6.32 [August 24, 2017]
+ * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -778,11 +778,22 @@ png_uint_32 PNGAPI
png_get_eXIf(png_const_structrp png_ptr, png_inforp info_ptr,
png_bytep *exif)
{
+ png_warning(png_ptr, "png_get_eXIf does not work; use png_get_eXIf_1");
+ PNG_UNUSED(info_ptr)
+ PNG_UNUSED(exif)
+ return 0;
+}
+
+png_uint_32 PNGAPI
+png_get_eXIf_1(png_const_structrp png_ptr, png_const_inforp info_ptr,
+ png_uint_32 *num_exif, png_bytep *exif)
+{
png_debug1(1, "in %s retrieval function", "eXIf");
if (png_ptr != NULL && info_ptr != NULL &&
(info_ptr->valid & PNG_INFO_eXIf) != 0 && exif != NULL)
{
+ *num_exif = info_ptr->num_exif;
*exif = info_ptr->exif;
return (PNG_INFO_eXIf);
}
diff --git a/thirdparty/libpng/pnginfo.h b/thirdparty/libpng/pnginfo.h
index 6e6d46a62b..d5f6149dbd 100644
--- a/thirdparty/libpng/pnginfo.h
+++ b/thirdparty/libpng/pnginfo.h
@@ -186,8 +186,11 @@ defined(PNG_READ_BACKGROUND_SUPPORTED)
#endif
#ifdef PNG_eXIf_SUPPORTED
- int num_exif;
+ int num_exif; /* Added at libpng-1.6.31 */
png_bytep exif;
+# ifdef PNG_READ_eXIf_SUPPORTED
+ png_bytep eXIf_buf; /* Added at libpng-1.6.32 */
+# endif
#endif
#ifdef PNG_hIST_SUPPORTED
diff --git a/thirdparty/libpng/pnglibconf.h b/thirdparty/libpng/pnglibconf.h
index 8738ebdfc2..9e45f73129 100644
--- a/thirdparty/libpng/pnglibconf.h
+++ b/thirdparty/libpng/pnglibconf.h
@@ -1,8 +1,8 @@
-/* libpng 1.6.31rc01 STANDARD API DEFINITION */
+/* libpng 1.6.32 STANDARD API DEFINITION */
/* pnglibconf.h - library build configuration */
-/* Libpng version 1.6.31rc01 - July 19, 2017 */
+/* Libpng version 1.6.32 - August 24, 2017 */
/* Copyright (c) 1998-2017 Glenn Randers-Pehrson */
diff --git a/thirdparty/libpng/pngpread.c b/thirdparty/libpng/pngpread.c
index 650ba1e232..fbe361dc34 100644
--- a/thirdparty/libpng/pngpread.c
+++ b/thirdparty/libpng/pngpread.c
@@ -1,8 +1,8 @@
/* pngpread.c - read a png file in push mode
*
- * Last changed in libpng 1.6.24 [August 4, 2016]
- * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
+ * Last changed in libpng 1.6.32 [August 24, 2017]
+ * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -189,6 +189,7 @@ png_push_read_chunk(png_structrp png_ptr, png_inforp info_ptr)
png_crc_read(png_ptr, chunk_tag, 4);
png_ptr->chunk_name = PNG_CHUNK_FROM_STRING(chunk_tag);
png_check_chunk_name(png_ptr, png_ptr->chunk_name);
+ png_check_chunk_length(png_ptr, png_ptr->push_length);
png_ptr->mode |= PNG_HAVE_CHUNK_HEADER;
}
diff --git a/thirdparty/libpng/pngpriv.h b/thirdparty/libpng/pngpriv.h
index 7c273bd5e3..1f2e90f2b3 100644
--- a/thirdparty/libpng/pngpriv.h
+++ b/thirdparty/libpng/pngpriv.h
@@ -1,7 +1,7 @@
/* pngpriv.h - private declarations for use inside libpng
*
- * Last changed in libpng 1.6.31 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.32 [August 24, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -1143,6 +1143,11 @@ PNG_INTERNAL_FUNCTION(void,png_write_sRGB,(png_structrp png_ptr,
int intent),PNG_EMPTY);
#endif
+#ifdef PNG_WRITE_eXIf_SUPPORTED
+PNG_INTERNAL_FUNCTION(void,png_write_eXIf,(png_structrp png_ptr,
+ png_bytep exif, int num_exif),PNG_EMPTY);
+#endif
+
#ifdef PNG_WRITE_iCCP_SUPPORTED
PNG_INTERNAL_FUNCTION(void,png_write_iCCP,(png_structrp png_ptr,
png_const_charp name, png_const_bytep profile), PNG_EMPTY);
@@ -1522,8 +1527,11 @@ PNG_INTERNAL_FUNCTION(void,png_handle_zTXt,(png_structrp png_ptr,
png_inforp info_ptr, png_uint_32 length),PNG_EMPTY);
#endif
-PNG_INTERNAL_FUNCTION(void,png_check_chunk_name,(png_structrp png_ptr,
- png_uint_32 chunk_name),PNG_EMPTY);
+PNG_INTERNAL_FUNCTION(void,png_check_chunk_name,(png_const_structrp png_ptr,
+ const png_uint_32 chunk_name),PNG_EMPTY);
+
+PNG_INTERNAL_FUNCTION(void,png_check_chunk_length,(png_const_structrp png_ptr,
+ const png_uint_32 chunk_length),PNG_EMPTY);
PNG_INTERNAL_FUNCTION(void,png_handle_unknown,(png_structrp png_ptr,
png_inforp info_ptr, png_uint_32 length, int keep),PNG_EMPTY);
diff --git a/thirdparty/libpng/pngread.c b/thirdparty/libpng/pngread.c
index b44d4dfbb5..e34ddd99a0 100644
--- a/thirdparty/libpng/pngread.c
+++ b/thirdparty/libpng/pngread.c
@@ -1,7 +1,7 @@
/* pngread.c - read a PNG file
*
- * Last changed in libpng 1.6.31 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.32 [August 24, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -175,6 +175,11 @@ png_read_info(png_structrp png_ptr, png_inforp info_ptr)
png_handle_cHRM(png_ptr, info_ptr, length);
#endif
+#ifdef PNG_READ_eXIf_SUPPORTED
+ else if (chunk_name == png_eXIf)
+ png_handle_eXIf(png_ptr, info_ptr, length);
+#endif
+
#ifdef PNG_READ_gAMA_SUPPORTED
else if (chunk_name == png_gAMA)
png_handle_gAMA(png_ptr, info_ptr, length);
@@ -534,6 +539,7 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
png_error(png_ptr, "Invalid attempt to read row data");
/* Fill the row with IDAT data: */
+ png_ptr->row_buf[0]=255; /* to force error if no data was found */
png_read_IDAT_data(png_ptr, png_ptr->row_buf, row_info.rowbytes + 1);
if (png_ptr->row_buf[0] > PNG_FILTER_VALUE_NONE)
@@ -842,6 +848,11 @@ png_read_end(png_structrp png_ptr, png_inforp info_ptr)
png_handle_cHRM(png_ptr, info_ptr, length);
#endif
+#ifdef PNG_READ_eXIf_SUPPORTED
+ else if (chunk_name == png_eXIf)
+ png_handle_eXIf(png_ptr, info_ptr, length);
+#endif
+
#ifdef PNG_READ_gAMA_SUPPORTED
else if (chunk_name == png_gAMA)
png_handle_gAMA(png_ptr, info_ptr, length);
diff --git a/thirdparty/libpng/pngrtran.c b/thirdparty/libpng/pngrtran.c
index 9285983848..9a30ddf22b 100644
--- a/thirdparty/libpng/pngrtran.c
+++ b/thirdparty/libpng/pngrtran.c
@@ -1,7 +1,7 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
- * Last changed in libpng 1.6.31 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.31 [July 27, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
diff --git a/thirdparty/libpng/pngrutil.c b/thirdparty/libpng/pngrutil.c
index 9cde64845c..a4fa71457b 100644
--- a/thirdparty/libpng/pngrutil.c
+++ b/thirdparty/libpng/pngrutil.c
@@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
- * Last changed in libpng 1.6.31 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.32 [August 24, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -181,6 +181,9 @@ png_read_chunk_header(png_structrp png_ptr)
/* Check to see if chunk name is valid. */
png_check_chunk_name(png_ptr, png_ptr->chunk_name);
+ /* Check for too-large chunk length */
+ png_check_chunk_length(png_ptr, length);
+
#ifdef PNG_IO_STATE_SUPPORTED
png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_DATA;
#endif
@@ -1377,11 +1380,13 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
* chunk is just ignored, so does not invalidate the color space. An
* alternative is to set the 'invalid' flags at the start of this routine
* and only clear them in they were not set before and all the tests pass.
- * The minimum 'deflate' stream is assumed to be just the 2 byte header and
- * 4 byte checksum. The keyword must be at least one character and there is
- * a terminator (0) byte and the compression method.
*/
- if (length < 9)
+
+ /* The keyword must be at least one character and there is a
+ * terminator (0) byte and the compression method byte, and the
+ * 'zlib' datastream is at least 11 bytes.
+ */
+ if (length < 14)
{
png_crc_finish(png_ptr, length);
png_chunk_benign_error(png_ptr, "too short");
@@ -1413,6 +1418,16 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
png_crc_read(png_ptr, (png_bytep)keyword, read_length);
length -= read_length;
+ /* The minimum 'zlib' stream is assumed to be just the 2 byte header,
+ * 5 bytes minimum 'deflate' stream, and the 4 byte checksum.
+ */
+ if (length < 11)
+ {
+ png_crc_finish(png_ptr, length);
+ png_chunk_benign_error(png_ptr, "too short");
+ return;
+ }
+
keyword_length = 0;
while (keyword_length < 80 && keyword_length < read_length &&
keyword[keyword_length] != 0)
@@ -1431,7 +1446,7 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
if (png_inflate_claim(png_ptr, png_iCCP) == Z_OK)
{
- Byte profile_header[132];
+ Byte profile_header[132]={0};
Byte local_buffer[PNG_INFLATE_BUF_SIZE];
png_alloc_size_t size = (sizeof profile_header);
@@ -2014,36 +2029,61 @@ void /* PRIVATE */
png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
{
unsigned int i;
- png_bytep eXIf_buf;
png_debug(1, "in png_handle_eXIf");
if ((png_ptr->mode & PNG_HAVE_IHDR) == 0)
png_chunk_error(png_ptr, "missing IHDR");
- else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_eXIf) != 0)
+ if (length < 2)
+ {
+ png_crc_finish(png_ptr, length);
+ png_chunk_benign_error(png_ptr, "too short");
+ return;
+ }
+
+ else if (info_ptr == NULL || (info_ptr->valid & PNG_INFO_eXIf) != 0)
{
png_crc_finish(png_ptr, length);
png_chunk_benign_error(png_ptr, "duplicate");
return;
}
- eXIf_buf = png_voidcast(png_bytep,
+ info_ptr->free_me |= PNG_FREE_EXIF;
+
+ info_ptr->eXIf_buf = png_voidcast(png_bytep,
png_malloc_warn(png_ptr, length));
+ if (info_ptr->eXIf_buf == NULL)
+ {
+ png_crc_finish(png_ptr, length);
+ png_chunk_benign_error(png_ptr, "out of memory");
+ return;
+ }
+
for (i = 0; i < length; i++)
{
png_byte buf[1];
png_crc_read(png_ptr, buf, 1);
- eXIf_buf[i] = buf[0];
+ info_ptr->eXIf_buf[i] = buf[0];
+ if (i == 1 && buf[0] != 'M' && buf[0] != 'I'
+ && info_ptr->eXIf_buf[0] != buf[0])
+ {
+ png_crc_finish(png_ptr, length);
+ png_chunk_benign_error(png_ptr, "incorrect byte-order specifier");
+ png_free(png_ptr, info_ptr->eXIf_buf);
+ info_ptr->eXIf_buf = NULL;
+ return;
+ }
}
if (png_crc_finish(png_ptr, 0) != 0)
return;
- info_ptr->num_exif = length;
+ png_set_eXIf_1(png_ptr, info_ptr, length, info_ptr->eXIf_buf);
- png_set_eXIf(png_ptr, info_ptr, eXIf_buf);
+ png_free(png_ptr, info_ptr->eXIf_buf);
+ info_ptr->eXIf_buf = NULL;
}
#endif
@@ -2624,23 +2664,28 @@ png_handle_zTXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
{
png_text text;
- /* It worked; png_ptr->read_buffer now looks like a tEXt chunk except
- * for the extra compression type byte and the fact that it isn't
- * necessarily '\0' terminated.
- */
- buffer = png_ptr->read_buffer;
- buffer[uncompressed_length+(keyword_length+2)] = 0;
-
- text.compression = PNG_TEXT_COMPRESSION_zTXt;
- text.key = (png_charp)buffer;
- text.text = (png_charp)(buffer + keyword_length+2);
- text.text_length = uncompressed_length;
- text.itxt_length = 0;
- text.lang = NULL;
- text.lang_key = NULL;
-
- if (png_set_text_2(png_ptr, info_ptr, &text, 1) != 0)
- errmsg = "insufficient memory";
+ if (png_ptr->read_buffer == NULL)
+ errmsg="Read failure in png_handle_zTXt";
+ else
+ {
+ /* It worked; png_ptr->read_buffer now looks like a tEXt chunk
+ * except for the extra compression type byte and the fact that
+ * it isn't necessarily '\0' terminated.
+ */
+ buffer = png_ptr->read_buffer;
+ buffer[uncompressed_length+(keyword_length+2)] = 0;
+
+ text.compression = PNG_TEXT_COMPRESSION_zTXt;
+ text.key = (png_charp)buffer;
+ text.text = (png_charp)(buffer + keyword_length+2);
+ text.text_length = uncompressed_length;
+ text.itxt_length = 0;
+ text.lang = NULL;
+ text.lang_key = NULL;
+
+ if (png_set_text_2(png_ptr, info_ptr, &text, 1) != 0)
+ errmsg = "insufficient memory";
+ }
}
else
@@ -3076,20 +3121,58 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
*/
void /* PRIVATE */
-png_check_chunk_name(png_structrp png_ptr, png_uint_32 chunk_name)
+png_check_chunk_name(png_const_structrp png_ptr, const png_uint_32 chunk_name)
{
int i;
+ png_uint_32 cn=chunk_name;
png_debug(1, "in png_check_chunk_name");
for (i=1; i<=4; ++i)
{
- int c = chunk_name & 0xff;
+ int c = cn & 0xff;
if (c < 65 || c > 122 || (c > 90 && c < 97))
png_chunk_error(png_ptr, "invalid chunk type");
- chunk_name >>= 8;
+ cn >>= 8;
+ }
+}
+
+void /* PRIVATE */
+png_check_chunk_length(png_const_structrp png_ptr, const png_uint_32 length)
+{
+ png_alloc_size_t limit = PNG_UINT_31_MAX;
+
+ if (png_ptr->chunk_name != png_IDAT)
+ {
+# ifdef PNG_SET_USER_LIMITS_SUPPORTED
+ if (png_ptr->user_chunk_malloc_max > 0 &&
+ png_ptr->user_chunk_malloc_max < limit)
+ limit = png_ptr->user_chunk_malloc_max;
+# elif PNG_USER_CHUNK_MALLOC_MAX > 0
+ if (PNG_USER_CHUNK_MALLOC_MAX < limit)
+ limit = PNG_USER_CHUNK_MALLOC_MAX;
+# endif
+ }
+ else
+ {
+ size_t row_factor =
+ (png_ptr->width * png_ptr->channels * (png_ptr->bit_depth > 8? 2: 1)
+ + 1 + (png_ptr->interlaced? 6: 0));
+ if (png_ptr->height > PNG_UINT_32_MAX/row_factor)
+ limit=PNG_UINT_31_MAX;
+ else
+ limit = png_ptr->height * row_factor;
+ limit += 6 + 5*(limit/32566+1); /* zlib+deflate overhead */
+ limit=limit < PNG_UINT_31_MAX? limit : PNG_UINT_31_MAX;
+ }
+
+ if (length > limit)
+ {
+ png_debug2(0," length = %lu, limit = %lu",
+ (unsigned long)length,(unsigned long)limit);
+ png_chunk_error(png_ptr, "chunk data is too large");
}
}
diff --git a/thirdparty/libpng/pngset.c b/thirdparty/libpng/pngset.c
index 998473557f..6f3a1ee11e 100644
--- a/thirdparty/libpng/pngset.c
+++ b/thirdparty/libpng/pngset.c
@@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
- * Last changed in libpng 1.6.30 [June 28, 2017]
+ * Last changed in libpng 1.6.32 [August 24, 2017]
* Copyright (c) 1998-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -139,6 +139,15 @@ void PNGAPI
png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr,
const png_bytep eXIf_buf)
{
+ png_warning(png_ptr, "png_set_eXIf does not work; use png_set_eXIf_1");
+ PNG_UNUSED(info_ptr)
+ PNG_UNUSED(eXIf_buf)
+}
+
+void PNGAPI
+png_set_eXIf_1(png_const_structrp png_ptr, png_inforp info_ptr,
+ const png_uint_32 num_exif, const png_bytep eXIf_buf)
+{
int i;
png_debug1(1, "in %s storage function", "eXIf");
@@ -146,7 +155,13 @@ png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr,
if (png_ptr == NULL || info_ptr == NULL)
return;
- png_free_data(png_ptr, info_ptr, PNG_FREE_EXIF, 0);
+ if (info_ptr->exif)
+ {
+ png_free(png_ptr, info_ptr->exif);
+ info_ptr->exif = NULL;
+ }
+
+ info_ptr->num_exif = num_exif;
info_ptr->exif = png_voidcast(png_bytep, png_malloc_warn(png_ptr,
info_ptr->num_exif));
@@ -154,13 +169,12 @@ png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr,
if (info_ptr->exif == NULL)
{
png_warning(png_ptr, "Insufficient memory for eXIf chunk data");
-
return;
}
info_ptr->free_me |= PNG_FREE_EXIF;
- for (i = 0; i < info_ptr->num_exif; i++)
+ for (i = 0; i < (int) info_ptr->num_exif; i++)
info_ptr->exif[i] = eXIf_buf[i];
info_ptr->valid |= PNG_INFO_eXIf;
@@ -1388,6 +1402,7 @@ png_set_keep_unknown_chunks(png_structrp png_ptr, int keep,
static PNG_CONST png_byte chunks_to_ignore[] = {
98, 75, 71, 68, '\0', /* bKGD */
99, 72, 82, 77, '\0', /* cHRM */
+ 101, 88, 73, 102, '\0', /* eXIf */
103, 65, 77, 65, '\0', /* gAMA */
104, 73, 83, 84, '\0', /* hIST */
105, 67, 67, 80, '\0', /* iCCP */
diff --git a/thirdparty/libpng/pngstruct.h b/thirdparty/libpng/pngstruct.h
index 44b79dea74..d83f971253 100644
--- a/thirdparty/libpng/pngstruct.h
+++ b/thirdparty/libpng/pngstruct.h
@@ -1,7 +1,7 @@
/* pngstruct.h - header file for PNG reference library
*
- * Last changed in libpng 1.6.28 [January 5, 2017]
+ * Last changed in libpng 1.6.32 [August 24, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -479,8 +479,5 @@ struct png_struct_def
png_colorspace colorspace;
#endif
#endif
-
-/* New member added in libpng-1.6.31 */
- int num_exif;
};
#endif /* PNGSTRUCT_H */
diff --git a/thirdparty/libpng/pngwrite.c b/thirdparty/libpng/pngwrite.c
index 8c2952e794..a7662acb71 100644
--- a/thirdparty/libpng/pngwrite.c
+++ b/thirdparty/libpng/pngwrite.c
@@ -1,7 +1,7 @@
/* pngwrite.c - general routines to write a PNG file
*
- * Last changed in libpng 1.6.31 [(PENDING RELEASE)]
+ * Last changed in libpng 1.6.32 [August 24, 2017]
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -237,6 +237,11 @@ png_write_info(png_structrp png_ptr, png_const_inforp info_ptr)
png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type);
#endif
+#ifdef PNG_WRITE_eXIf_SUPPORTED
+ if ((info_ptr->valid & PNG_INFO_eXIf) != 0)
+ png_write_eXIf(png_ptr, info_ptr->exif, info_ptr->num_exif);
+#endif
+
#ifdef PNG_WRITE_hIST_SUPPORTED
if ((info_ptr->valid & PNG_INFO_hIST) != 0)
png_write_hIST(png_ptr, info_ptr->hist, info_ptr->num_palette);
@@ -432,6 +437,12 @@ png_write_end(png_structrp png_ptr, png_inforp info_ptr)
}
}
#endif
+
+#ifdef PNG_WRITE_eXIf_SUPPORTED
+ if ((info_ptr->valid & PNG_INFO_eXIf) != 0)
+ png_write_eXIf(png_ptr, info_ptr->exif, info_ptr->num_exif);
+#endif
+
#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
write_unknown_chunks(png_ptr, info_ptr, PNG_AFTER_IDAT);
#endif
diff --git a/thirdparty/libpng/pngwutil.c b/thirdparty/libpng/pngwutil.c
index 348bb524dd..0d4fb1336c 100644
--- a/thirdparty/libpng/pngwutil.c
+++ b/thirdparty/libpng/pngwutil.c
@@ -1,8 +1,8 @@
/* pngwutil.c - utilities to write a PNG file
*
- * Last changed in libpng 1.6.26 [October 20, 2016]
- * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
+ * Last changed in libpng 1.6.32 [August 24, 2017]
+ * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -1479,24 +1479,15 @@ void /* PRIVATE */
png_write_eXIf(png_structrp png_ptr, png_bytep exif, int num_exif)
{
int i;
- png_byte buf[3];
+ png_byte buf[1];
png_debug(1, "in png_write_eXIf");
- if (num_exif > (int)png_ptr->num_exif)
- {
- png_debug2(3, "num_exif = %d, png_ptr->num_exif = %d", num_exif,
- png_ptr->num_exif);
-
- png_warning(png_ptr, "Invalid number of exif bytes specified");
- return;
- }
-
png_write_chunk_header(png_ptr, png_eXIf, (png_uint_32)(num_exif));
for (i = 0; i < num_exif; i++)
{
- buf[i] = exif[i];
+ buf[0] = exif[i];
png_write_chunk_data(png_ptr, buf, (png_size_t)1);
}
diff --git a/thirdparty/misc/stb_truetype.h b/thirdparty/misc/stb_truetype.h
index 016972785a..cec2425471 100644
--- a/thirdparty/misc/stb_truetype.h
+++ b/thirdparty/misc/stb_truetype.h
@@ -1,11 +1,12 @@
-// stb_truetype.h - v1.11 - public domain
-// authored from 2009-2015 by Sean Barrett / RAD Game Tools
+// stb_truetype.h - v1.17 - public domain
+// authored from 2009-2016 by Sean Barrett / RAD Game Tools
//
// This library processes TrueType files:
// parse files
// extract glyph metrics
// extract glyph shapes
// render glyphs to one-channel bitmaps with antialiasing (box filter)
+// render glyphs to one-channel SDF bitmaps (signed-distance field/function)
//
// Todo:
// non-MS cmaps
@@ -20,16 +21,19 @@
//
// Mikko Mononen: compound shape support, more cmap formats
// Tor Andersson: kerning, subpixel rendering
+// Dougall Johnson: OpenType / Type 2 font handling
//
// Misc other:
// Ryan Gordon
// Simon Glass
+// github:IntellectualKitty
+// Imanol Celaya
//
// Bug/warning reports/fixes:
-// "Zer" on mollyrocket (with fix)
+// "Zer" on mollyrocket
// Cass Everitt
// stoiko (Haemimont Games)
-// Brian Hook
+// Brian Hook
// Walter van Niftrik
// David Gow
// David Given
@@ -48,9 +52,17 @@
// Higor Euripedes
// Thomas Fields
// Derek Vinyard
+// Cort Stratton
+// github:oyvindjam
//
// VERSION HISTORY
//
+// 1.17 (2017-07-23) make more arguments const; doc fix
+// 1.16 (2017-07-12) SDF support
+// 1.15 (2017-03-03) make more arguments const
+// 1.14 (2017-01-16) num-fonts-in-TTC function
+// 1.13 (2017-01-02) support OpenType fonts, certain Apple fonts
+// 1.12 (2016-10-25) suppress warnings about casting away const with -Wcast-qual
// 1.11 (2016-04-02) fix unused-variable warning
// 1.10 (2016-04-02) user-defined fabs(); rare memory leak; remove duplicate typedef
// 1.09 (2016-01-16) warning fix; avoid crash on outofmem; use allocation userdata properly
@@ -60,20 +72,12 @@
// fix stbtt_GetFontOFfsetForIndex (never worked for non-0 input?);
// fixed an assert() bug in the new rasterizer
// replace assert() with STBTT_assert() in new rasterizer
-// 1.06 (2015-07-14) performance improvements (~35% faster on x86 and x64 on test machine)
-// also more precise AA rasterizer, except if shapes overlap
-// remove need for STBTT_sort
-// 1.05 (2015-04-15) fix misplaced definitions for STBTT_STATIC
-// 1.04 (2015-04-15) typo in example
-// 1.03 (2015-04-12) STBTT_STATIC, fix memory leak in new packing, various fixes
//
// Full history can be found at the end of this file.
//
// LICENSE
//
-// This software is dual-licensed to the public domain and under the following
-// license: you are granted a perpetual, irrevocable license to copy, modify,
-// publish, and distribute this file as you see fit.
+// See end of file for license information.
//
// USAGE
//
@@ -93,14 +97,15 @@
// Improved 3D API (more shippable):
// #include "stb_rect_pack.h" -- optional, but you really want it
// stbtt_PackBegin()
-// stbtt_PackSetOversample() -- for improved quality on small fonts
+// stbtt_PackSetOversampling() -- for improved quality on small fonts
// stbtt_PackFontRanges() -- pack and renders
// stbtt_PackEnd()
// stbtt_GetPackedQuad()
//
// "Load" a font file from a memory buffer (you have to keep the buffer loaded)
// stbtt_InitFont()
-// stbtt_GetFontOffsetForIndex() -- use for TTC font collections
+// stbtt_GetFontOffsetForIndex() -- indexing for TTC font collections
+// stbtt_GetNumberOfFonts() -- number of fonts for TTC font collections
//
// Render a unicode codepoint to a bitmap
// stbtt_GetCodepointBitmap() -- allocates and returns a bitmap
@@ -110,6 +115,7 @@
// Character advance/positioning
// stbtt_GetCodepointHMetrics()
// stbtt_GetFontVMetrics()
+// stbtt_GetFontVMetricsOS2()
// stbtt_GetCodepointKernAdvance()
//
// Starting with version 1.06, the rasterizer was replaced with a new,
@@ -218,7 +224,7 @@
// Curve tesselation 120 LOC \__ 550 LOC Bitmap creation
// Bitmap management 100 LOC /
// Baked bitmap interface 70 LOC /
-// Font name matching & access 150 LOC ---- 150
+// Font name matching & access 150 LOC ---- 150
// C runtime library abstraction 60 LOC ---- 60
//
//
@@ -311,7 +317,7 @@ int main(int argc, char **argv)
}
return 0;
}
-#endif
+#endif
//
// Output:
//
@@ -325,9 +331,9 @@ int main(int argc, char **argv)
// :@@. M@M
// @@@o@@@@
// :M@@V:@@.
-//
+//
//////////////////////////////////////////////////////////////////////////////
-//
+//
// Complete program: print "Hello World!" banner, with bugs
//
#if 0
@@ -407,6 +413,18 @@ int main(int arg, char **argv)
#ifndef STBTT_sqrt
#include <math.h>
#define STBTT_sqrt(x) sqrt(x)
+ #define STBTT_pow(x,y) pow(x,y)
+ #endif
+
+ #ifndef STBTT_cos
+ #include <math.h>
+ #define STBTT_cos(x) cos(x)
+ #define STBTT_acos(x) acos(x)
+ #endif
+
+ #ifndef STBTT_fabs
+ #include <math.h>
+ #define STBTT_fabs(x) fabs(x)
#endif
#ifndef STBTT_fabs
@@ -432,7 +450,7 @@ int main(int arg, char **argv)
#endif
#ifndef STBTT_memcpy
- #include <memory.h>
+ #include <string.h>
#define STBTT_memcpy memcpy
#define STBTT_memset memset
#endif
@@ -458,6 +476,14 @@ int main(int arg, char **argv)
extern "C" {
#endif
+// private structure
+typedef struct
+{
+ unsigned char *data;
+ int cursor;
+ int size;
+} stbtt__buf;
+
//////////////////////////////////////////////////////////////////////////////
//
// TEXTURE BAKING API
@@ -487,7 +513,7 @@ typedef struct
float x1,y1,s1,t1; // bottom-right
} stbtt_aligned_quad;
-STBTT_DEF void stbtt_GetBakedQuad(stbtt_bakedchar *chardata, int pw, int ph, // same data as above
+STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int pw, int ph, // same data as above
int char_index, // character to display
float *xpos, float *ypos, // pointers to current position in screen pixel space
stbtt_aligned_quad *q, // output: quad to draw
@@ -527,7 +553,7 @@ typedef struct stbrp_rect stbrp_rect;
STBTT_DEF int stbtt_PackBegin(stbtt_pack_context *spc, unsigned char *pixels, int width, int height, int stride_in_bytes, int padding, void *alloc_context);
// Initializes a packing context stored in the passed-in stbtt_pack_context.
// Future calls using this context will pack characters into the bitmap passed
-// in here: a 1-channel bitmap that is weight x height. stride_in_bytes is
+// in here: a 1-channel bitmap that is width * height. stride_in_bytes is
// the distance from one row to the next (or 0 to mean they are packed tightly
// together). "padding" is the amount of padding to leave between each
// character (normally you want '1' for bitmaps you'll use as textures with
@@ -540,7 +566,7 @@ STBTT_DEF void stbtt_PackEnd (stbtt_pack_context *spc);
#define STBTT_POINT_SIZE(x) (-(x))
-STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context *spc, unsigned char *fontdata, int font_index, float font_size,
+STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, float font_size,
int first_unicode_char_in_range, int num_chars_in_range, stbtt_packedchar *chardata_for_range);
// Creates character bitmaps from the font_index'th font found in fontdata (use
// font_index=0 if you don't know what that is). It creates num_chars_in_range
@@ -565,7 +591,7 @@ typedef struct
unsigned char h_oversample, v_oversample; // don't set these, they're used internally
} stbtt_pack_range;
-STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, unsigned char *fontdata, int font_index, stbtt_pack_range *ranges, int num_ranges);
+STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, stbtt_pack_range *ranges, int num_ranges);
// Creates character bitmaps from multiple ranges of characters stored in
// ranges. This will usually create a better-packed bitmap than multiple
// calls to stbtt_PackFontRange. Note that you can call this multiple
@@ -587,19 +613,19 @@ STBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context *spc, unsigned int h
// To use with PackFontRangesGather etc., you must set it before calls
// call to PackFontRangesGatherRects.
-STBTT_DEF void stbtt_GetPackedQuad(stbtt_packedchar *chardata, int pw, int ph, // same data as above
+STBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int pw, int ph, // same data as above
int char_index, // character to display
float *xpos, float *ypos, // pointers to current position in screen pixel space
stbtt_aligned_quad *q, // output: quad to draw
int align_to_integer);
-STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects);
+STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects);
STBTT_DEF void stbtt_PackFontRangesPackRects(stbtt_pack_context *spc, stbrp_rect *rects, int num_rects);
-STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects);
+STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects);
// Calling these functions in sequence is roughly equivalent to calling
// stbtt_PackFontRanges(). If you more control over the packing of multiple
// fonts, or if you want to pack custom data into a font texture, take a look
-// at the source to of stbtt_PackFontRanges() and create a custom version
+// at the source to of stbtt_PackFontRanges() and create a custom version
// using these functions, e.g. call GatherRects multiple times,
// building up a single array of rects, then call PackRects once,
// then call RenderIntoRects repeatedly. This may result in a
@@ -626,14 +652,19 @@ struct stbtt_pack_context {
//
//
+STBTT_DEF int stbtt_GetNumberOfFonts(const unsigned char *data);
+// This function will determine the number of fonts in a font file. TrueType
+// collection (.ttc) files may contain multiple fonts, while TrueType font
+// (.ttf) files only contain one font. The number of fonts can be used for
+// indexing with the previous function where the index is between zero and one
+// less than the total fonts. If an error occurs, -1 is returned.
+
STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *data, int index);
// Each .ttf/.ttc file may have more than one font. Each font has a sequential
// index number starting from 0. Call this function to get the font offset for
// a given index; it returns -1 if the index is out of range. A regular .ttf
// file will only define one font and it always be at offset 0, so it will
-// return '0' for index 0, and -1 for all other indices. You can just skip
-// this step if you know it's that kind of font.
-
+// return '0' for index 0, and -1 for all other indices.
// The following structure is defined publically so you can declare one on
// the stack or as a global or etc, but you should treat it as opaque.
@@ -648,6 +679,13 @@ struct stbtt_fontinfo
int loca,head,glyf,hhea,hmtx,kern; // table locations as offset from start of .ttf
int index_map; // a cmap mapping for our chosen character encoding
int indexToLocFormat; // format needed to map from glyph index to glyph
+
+ stbtt__buf cff; // cff font data
+ stbtt__buf charstrings; // the charstring index
+ stbtt__buf gsubrs; // global charstring subroutines index
+ stbtt__buf subrs; // private charstring subroutines index
+ stbtt__buf fontdicts; // array of font dicts
+ stbtt__buf fdselect; // map from glyph to fontdict
};
STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data, int offset);
@@ -695,6 +733,12 @@ STBTT_DEF void stbtt_GetFontVMetrics(const stbtt_fontinfo *info, int *ascent, in
// these are expressed in unscaled coordinates, so you must multiply by
// the scale factor for a given size
+STBTT_DEF int stbtt_GetFontVMetricsOS2(const stbtt_fontinfo *info, int *typoAscent, int *typoDescent, int *typoLineGap);
+// analogous to GetFontVMetrics, but returns the "typographic" values from the OS/2
+// table (specific to MS/Windows TTF files).
+//
+// Returns 1 on success (table present), 0 on failure.
+
STBTT_DEF void stbtt_GetFontBoundingBox(const stbtt_fontinfo *info, int *x0, int *y0, int *x1, int *y1);
// the bounding box around all possible characters
@@ -725,7 +769,8 @@ STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, in
enum {
STBTT_vmove=1,
STBTT_vline,
- STBTT_vcurve
+ STBTT_vcurve,
+ STBTT_vcubic
};
#endif
@@ -734,7 +779,7 @@ STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, in
#define stbtt_vertex_type short // can't use stbtt_int16 because that's not visible in the header file
typedef struct
{
- stbtt_vertex_type x,y,cx,cy;
+ stbtt_vertex_type x,y,cx,cy,cx1,cy1;
unsigned char type,padding;
} stbtt_vertex;
#endif
@@ -788,6 +833,10 @@ STBTT_DEF void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo *info, uns
// same as stbtt_MakeCodepointBitmap, but you can specify a subpixel
// shift for the character
+STBTT_DEF void stbtt_MakeCodepointBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float *sub_x, float *sub_y, int codepoint);
+// same as stbtt_MakeCodepointBitmapSubpixel, but prefiltering
+// is performed (see stbtt_PackSetOversampling)
+
STBTT_DEF void stbtt_GetCodepointBitmapBox(const stbtt_fontinfo *font, int codepoint, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1);
// get the bbox of the bitmap centered around the glyph origin; so the
// bitmap width is ix1-ix0, height is iy1-iy0, and location to place
@@ -805,6 +854,7 @@ STBTT_DEF unsigned char *stbtt_GetGlyphBitmap(const stbtt_fontinfo *info, float
STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int glyph, int *width, int *height, int *xoff, int *yoff);
STBTT_DEF void stbtt_MakeGlyphBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int glyph);
STBTT_DEF void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int glyph);
+STBTT_DEF void stbtt_MakeGlyphBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float *sub_x, float *sub_y, int glyph);
STBTT_DEF void stbtt_GetGlyphBitmapBox(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1);
STBTT_DEF void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y,float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1);
@@ -829,6 +879,64 @@ STBTT_DEF void stbtt_Rasterize(stbtt__bitmap *result, // 1-channel bitmap
//////////////////////////////////////////////////////////////////////////////
//
+// Signed Distance Function (or Field) rendering
+
+STBTT_DEF void stbtt_FreeSDF(unsigned char *bitmap, void *userdata);
+// frees the SDF bitmap allocated below
+
+STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float scale, int glyph, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff);
+STBTT_DEF unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo *info, float scale, int codepoint, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff);
+// These functions compute a discretized SDF field for a single character, suitable for storing
+// in a single-channel texture, sampling with bilinear filtering, and testing against
+// larger than some threshhold to produce scalable fonts.
+// info -- the font
+// scale -- controls the size of the resulting SDF bitmap, same as it would be creating a regular bitmap
+// glyph/codepoint -- the character to generate the SDF for
+// padding -- extra "pixels" around the character which are filled with the distance to the character (not 0),
+// which allows effects like bit outlines
+// onedge_value -- value 0-255 to test the SDF against to reconstruct the character (i.e. the isocontour of the character)
+// pixel_dist_scale -- what value the SDF should increase by when moving one SDF "pixel" away from the edge (on the 0..255 scale)
+// if positive, > onedge_value is inside; if negative, < onedge_value is inside
+// width,height -- output height & width of the SDF bitmap (including padding)
+// xoff,yoff -- output origin of the character
+// return value -- a 2D array of bytes 0..255, width*height in size
+//
+// pixel_dist_scale & onedge_value are a scale & bias that allows you to make
+// optimal use of the limited 0..255 for your application, trading off precision
+// and special effects. SDF values outside the range 0..255 are clamped to 0..255.
+//
+// Example:
+// scale = stbtt_ScaleForPixelHeight(22)
+// padding = 5
+// onedge_value = 180
+// pixel_dist_scale = 180/5.0 = 36.0
+//
+// This will create an SDF bitmap in which the character is about 22 pixels
+// high but the whole bitmap is about 22+5+5=32 pixels high. To produce a filled
+// shape, sample the SDF at each pixel and fill the pixel if the SDF value
+// is greater than or equal to 180/255. (You'll actually want to antialias,
+// which is beyond the scope of this example.) Additionally, you can compute
+// offset outlines (e.g. to stroke the character border inside & outside,
+// or only outside). For example, to fill outside the character up to 3 SDF
+// pixels, you would compare against (180-36.0*3)/255 = 72/255. The above
+// choice of variables maps a range from 5 pixels outside the shape to
+// 2 pixels inside the shape to 0..255; this is intended primarily for apply
+// outside effects only (the interior range is needed to allow proper
+// antialiasing of the font at *smaller* sizes)
+//
+// The function computes the SDF analytically at each SDF pixel, not by e.g.
+// building a higher-res bitmap and approximating it. In theory the quality
+// should be as high as possible for an SDF of this size & representation, but
+// unclear if this is true in practice (perhaps building a higher-res bitmap
+// and computing from that can allow drop-out prevention).
+//
+// The algorithm has not been optimized at all, so expect it to be slow
+// if computing lots of characters or very large sizes.
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
// Finding the right font...
//
// You should really just solve this offline, keep your own tables
@@ -958,6 +1066,152 @@ typedef int stbtt__test_oversample_pow2[(STBTT_MAX_OVERSAMPLE & (STBTT_MAX_OVERS
//////////////////////////////////////////////////////////////////////////
//
+// stbtt__buf helpers to parse data from file
+//
+
+static stbtt_uint8 stbtt__buf_get8(stbtt__buf *b)
+{
+ if (b->cursor >= b->size)
+ return 0;
+ return b->data[b->cursor++];
+}
+
+static stbtt_uint8 stbtt__buf_peek8(stbtt__buf *b)
+{
+ if (b->cursor >= b->size)
+ return 0;
+ return b->data[b->cursor];
+}
+
+static void stbtt__buf_seek(stbtt__buf *b, int o)
+{
+ STBTT_assert(!(o > b->size || o < 0));
+ b->cursor = (o > b->size || o < 0) ? b->size : o;
+}
+
+static void stbtt__buf_skip(stbtt__buf *b, int o)
+{
+ stbtt__buf_seek(b, b->cursor + o);
+}
+
+static stbtt_uint32 stbtt__buf_get(stbtt__buf *b, int n)
+{
+ stbtt_uint32 v = 0;
+ int i;
+ STBTT_assert(n >= 1 && n <= 4);
+ for (i = 0; i < n; i++)
+ v = (v << 8) | stbtt__buf_get8(b);
+ return v;
+}
+
+static stbtt__buf stbtt__new_buf(const void *p, size_t size)
+{
+ stbtt__buf r;
+ STBTT_assert(size < 0x40000000);
+ r.data = (stbtt_uint8*) p;
+ r.size = (int) size;
+ r.cursor = 0;
+ return r;
+}
+
+#define stbtt__buf_get16(b) stbtt__buf_get((b), 2)
+#define stbtt__buf_get32(b) stbtt__buf_get((b), 4)
+
+static stbtt__buf stbtt__buf_range(const stbtt__buf *b, int o, int s)
+{
+ stbtt__buf r = stbtt__new_buf(NULL, 0);
+ if (o < 0 || s < 0 || o > b->size || s > b->size - o) return r;
+ r.data = b->data + o;
+ r.size = s;
+ return r;
+}
+
+static stbtt__buf stbtt__cff_get_index(stbtt__buf *b)
+{
+ int count, start, offsize;
+ start = b->cursor;
+ count = stbtt__buf_get16(b);
+ if (count) {
+ offsize = stbtt__buf_get8(b);
+ STBTT_assert(offsize >= 1 && offsize <= 4);
+ stbtt__buf_skip(b, offsize * count);
+ stbtt__buf_skip(b, stbtt__buf_get(b, offsize) - 1);
+ }
+ return stbtt__buf_range(b, start, b->cursor - start);
+}
+
+static stbtt_uint32 stbtt__cff_int(stbtt__buf *b)
+{
+ int b0 = stbtt__buf_get8(b);
+ if (b0 >= 32 && b0 <= 246) return b0 - 139;
+ else if (b0 >= 247 && b0 <= 250) return (b0 - 247)*256 + stbtt__buf_get8(b) + 108;
+ else if (b0 >= 251 && b0 <= 254) return -(b0 - 251)*256 - stbtt__buf_get8(b) - 108;
+ else if (b0 == 28) return stbtt__buf_get16(b);
+ else if (b0 == 29) return stbtt__buf_get32(b);
+ STBTT_assert(0);
+ return 0;
+}
+
+static void stbtt__cff_skip_operand(stbtt__buf *b) {
+ int v, b0 = stbtt__buf_peek8(b);
+ STBTT_assert(b0 >= 28);
+ if (b0 == 30) {
+ stbtt__buf_skip(b, 1);
+ while (b->cursor < b->size) {
+ v = stbtt__buf_get8(b);
+ if ((v & 0xF) == 0xF || (v >> 4) == 0xF)
+ break;
+ }
+ } else {
+ stbtt__cff_int(b);
+ }
+}
+
+static stbtt__buf stbtt__dict_get(stbtt__buf *b, int key)
+{
+ stbtt__buf_seek(b, 0);
+ while (b->cursor < b->size) {
+ int start = b->cursor, end, op;
+ while (stbtt__buf_peek8(b) >= 28)
+ stbtt__cff_skip_operand(b);
+ end = b->cursor;
+ op = stbtt__buf_get8(b);
+ if (op == 12) op = stbtt__buf_get8(b) | 0x100;
+ if (op == key) return stbtt__buf_range(b, start, end-start);
+ }
+ return stbtt__buf_range(b, 0, 0);
+}
+
+static void stbtt__dict_get_ints(stbtt__buf *b, int key, int outcount, stbtt_uint32 *out)
+{
+ int i;
+ stbtt__buf operands = stbtt__dict_get(b, key);
+ for (i = 0; i < outcount && operands.cursor < operands.size; i++)
+ out[i] = stbtt__cff_int(&operands);
+}
+
+static int stbtt__cff_index_count(stbtt__buf *b)
+{
+ stbtt__buf_seek(b, 0);
+ return stbtt__buf_get16(b);
+}
+
+static stbtt__buf stbtt__cff_index_get(stbtt__buf b, int i)
+{
+ int count, offsize, start, end;
+ stbtt__buf_seek(&b, 0);
+ count = stbtt__buf_get16(&b);
+ offsize = stbtt__buf_get8(&b);
+ STBTT_assert(i >= 0 && i < count);
+ STBTT_assert(offsize >= 1 && offsize <= 4);
+ stbtt__buf_skip(&b, i*offsize);
+ start = stbtt__buf_get(&b, offsize);
+ end = stbtt__buf_get(&b, offsize);
+ return stbtt__buf_range(&b, 2+(count+1)*offsize+start, end - start);
+}
+
+//////////////////////////////////////////////////////////////////////////
+//
// accessors to parse data from file
//
@@ -968,32 +1222,22 @@ typedef int stbtt__test_oversample_pow2[(STBTT_MAX_OVERSAMPLE & (STBTT_MAX_OVERS
#define ttCHAR(p) (* (stbtt_int8 *) (p))
#define ttFixed(p) ttLONG(p)
-#if defined(STB_TRUETYPE_BIGENDIAN) && !defined(ALLOW_UNALIGNED_TRUETYPE)
-
- #define ttUSHORT(p) (* (stbtt_uint16 *) (p))
- #define ttSHORT(p) (* (stbtt_int16 *) (p))
- #define ttULONG(p) (* (stbtt_uint32 *) (p))
- #define ttLONG(p) (* (stbtt_int32 *) (p))
-
-#else
-
- static stbtt_uint16 ttUSHORT(const stbtt_uint8 *p) { return p[0]*256 + p[1]; }
- static stbtt_int16 ttSHORT(const stbtt_uint8 *p) { return p[0]*256 + p[1]; }
- static stbtt_uint32 ttULONG(const stbtt_uint8 *p) { return (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]; }
- static stbtt_int32 ttLONG(const stbtt_uint8 *p) { return (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]; }
-
-#endif
+static stbtt_uint16 ttUSHORT(stbtt_uint8 *p) { return p[0]*256 + p[1]; }
+static stbtt_int16 ttSHORT(stbtt_uint8 *p) { return p[0]*256 + p[1]; }
+static stbtt_uint32 ttULONG(stbtt_uint8 *p) { return (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]; }
+static stbtt_int32 ttLONG(stbtt_uint8 *p) { return (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]; }
#define stbtt_tag4(p,c0,c1,c2,c3) ((p)[0] == (c0) && (p)[1] == (c1) && (p)[2] == (c2) && (p)[3] == (c3))
#define stbtt_tag(p,str) stbtt_tag4(p,str[0],str[1],str[2],str[3])
-static int stbtt__isfont(const stbtt_uint8 *font)
+static int stbtt__isfont(stbtt_uint8 *font)
{
// check the version number
if (stbtt_tag4(font, '1',0,0,0)) return 1; // TrueType 1
if (stbtt_tag(font, "typ1")) return 1; // TrueType with type 1 font -- we don't support this!
if (stbtt_tag(font, "OTTO")) return 1; // OpenType with CFF
if (stbtt_tag4(font, 0,1,0,0)) return 1; // OpenType 1.0
+ if (stbtt_tag(font, "true")) return 1; // Apple specification for TrueType fonts
return 0;
}
@@ -1011,7 +1255,7 @@ static stbtt_uint32 stbtt__find_table(stbtt_uint8 *data, stbtt_uint32 fontstart,
return 0;
}
-STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *font_collection, int index)
+static int stbtt_GetFontOffsetForIndex_internal(unsigned char *font_collection, int index)
{
// if it's just a font, there's only one valid index
if (stbtt__isfont(font_collection))
@@ -1030,14 +1274,43 @@ STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *font_collection,
return -1;
}
-STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data2, int fontstart)
+static int stbtt_GetNumberOfFonts_internal(unsigned char *font_collection)
+{
+ // if it's just a font, there's only one valid font
+ if (stbtt__isfont(font_collection))
+ return 1;
+
+ // check if it's a TTC
+ if (stbtt_tag(font_collection, "ttcf")) {
+ // version 1?
+ if (ttULONG(font_collection+4) == 0x00010000 || ttULONG(font_collection+4) == 0x00020000) {
+ return ttLONG(font_collection+8);
+ }
+ }
+ return 0;
+}
+
+static stbtt__buf stbtt__get_subrs(stbtt__buf cff, stbtt__buf fontdict)
+{
+ stbtt_uint32 subrsoff = 0, private_loc[2] = { 0, 0 };
+ stbtt__buf pdict;
+ stbtt__dict_get_ints(&fontdict, 18, 2, private_loc);
+ if (!private_loc[1] || !private_loc[0]) return stbtt__new_buf(NULL, 0);
+ pdict = stbtt__buf_range(&cff, private_loc[1], private_loc[0]);
+ stbtt__dict_get_ints(&pdict, 19, 1, &subrsoff);
+ if (!subrsoff) return stbtt__new_buf(NULL, 0);
+ stbtt__buf_seek(&cff, private_loc[1]+subrsoff);
+ return stbtt__cff_get_index(&cff);
+}
+
+static int stbtt_InitFont_internal(stbtt_fontinfo *info, unsigned char *data, int fontstart)
{
- stbtt_uint8 *data = (stbtt_uint8 *) data2;
stbtt_uint32 cmap, t;
stbtt_int32 i,numTables;
info->data = data;
info->fontstart = fontstart;
+ info->cff = stbtt__new_buf(NULL, 0);
cmap = stbtt__find_table(data, fontstart, "cmap"); // required
info->loca = stbtt__find_table(data, fontstart, "loca"); // required
@@ -1046,8 +1319,61 @@ STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data2, i
info->hhea = stbtt__find_table(data, fontstart, "hhea"); // required
info->hmtx = stbtt__find_table(data, fontstart, "hmtx"); // required
info->kern = stbtt__find_table(data, fontstart, "kern"); // not required
- if (!cmap || !info->loca || !info->head || !info->glyf || !info->hhea || !info->hmtx)
+
+ if (!cmap || !info->head || !info->hhea || !info->hmtx)
return 0;
+ if (info->glyf) {
+ // required for truetype
+ if (!info->loca) return 0;
+ } else {
+ // initialization for CFF / Type2 fonts (OTF)
+ stbtt__buf b, topdict, topdictidx;
+ stbtt_uint32 cstype = 2, charstrings = 0, fdarrayoff = 0, fdselectoff = 0;
+ stbtt_uint32 cff;
+
+ cff = stbtt__find_table(data, fontstart, "CFF ");
+ if (!cff) return 0;
+
+ info->fontdicts = stbtt__new_buf(NULL, 0);
+ info->fdselect = stbtt__new_buf(NULL, 0);
+
+ // @TODO this should use size from table (not 512MB)
+ info->cff = stbtt__new_buf(data+cff, 512*1024*1024);
+ b = info->cff;
+
+ // read the header
+ stbtt__buf_skip(&b, 2);
+ stbtt__buf_seek(&b, stbtt__buf_get8(&b)); // hdrsize
+
+ // @TODO the name INDEX could list multiple fonts,
+ // but we just use the first one.
+ stbtt__cff_get_index(&b); // name INDEX
+ topdictidx = stbtt__cff_get_index(&b);
+ topdict = stbtt__cff_index_get(topdictidx, 0);
+ stbtt__cff_get_index(&b); // string INDEX
+ info->gsubrs = stbtt__cff_get_index(&b);
+
+ stbtt__dict_get_ints(&topdict, 17, 1, &charstrings);
+ stbtt__dict_get_ints(&topdict, 0x100 | 6, 1, &cstype);
+ stbtt__dict_get_ints(&topdict, 0x100 | 36, 1, &fdarrayoff);
+ stbtt__dict_get_ints(&topdict, 0x100 | 37, 1, &fdselectoff);
+ info->subrs = stbtt__get_subrs(b, topdict);
+
+ // we only support Type 2 charstrings
+ if (cstype != 2) return 0;
+ if (charstrings == 0) return 0;
+
+ if (fdarrayoff) {
+ // looks like a CID font
+ if (!fdselectoff) return 0;
+ stbtt__buf_seek(&b, fdarrayoff);
+ info->fontdicts = stbtt__cff_get_index(&b);
+ info->fdselect = stbtt__buf_range(&b, fdselectoff, b.size-fdselectoff);
+ }
+
+ stbtt__buf_seek(&b, charstrings);
+ info->charstrings = stbtt__cff_get_index(&b);
+ }
t = stbtt__find_table(data, fontstart, "maxp");
if (t)
@@ -1198,6 +1524,8 @@ static int stbtt__GetGlyfOffset(const stbtt_fontinfo *info, int glyph_index)
{
int g1,g2;
+ STBTT_assert(!info->cff.size);
+
if (glyph_index >= info->numGlyphs) return -1; // glyph index out of range
if (info->indexToLocFormat >= 2) return -1; // unknown index->glyph map format
@@ -1212,15 +1540,21 @@ static int stbtt__GetGlyfOffset(const stbtt_fontinfo *info, int glyph_index)
return g1==g2 ? -1 : g1; // if length is 0, return -1
}
+static int stbtt__GetGlyphInfoT2(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1);
+
STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1)
{
- int g = stbtt__GetGlyfOffset(info, glyph_index);
- if (g < 0) return 0;
+ if (info->cff.size) {
+ stbtt__GetGlyphInfoT2(info, glyph_index, x0, y0, x1, y1);
+ } else {
+ int g = stbtt__GetGlyfOffset(info, glyph_index);
+ if (g < 0) return 0;
- if (x0) *x0 = ttSHORT(info->data + g + 2);
- if (y0) *y0 = ttSHORT(info->data + g + 4);
- if (x1) *x1 = ttSHORT(info->data + g + 6);
- if (y1) *y1 = ttSHORT(info->data + g + 8);
+ if (x0) *x0 = ttSHORT(info->data + g + 2);
+ if (y0) *y0 = ttSHORT(info->data + g + 4);
+ if (x1) *x1 = ttSHORT(info->data + g + 6);
+ if (y1) *y1 = ttSHORT(info->data + g + 8);
+ }
return 1;
}
@@ -1232,7 +1566,10 @@ STBTT_DEF int stbtt_GetCodepointBox(const stbtt_fontinfo *info, int codepoint, i
STBTT_DEF int stbtt_IsGlyphEmpty(const stbtt_fontinfo *info, int glyph_index)
{
stbtt_int16 numberOfContours;
- int g = stbtt__GetGlyfOffset(info, glyph_index);
+ int g;
+ if (info->cff.size)
+ return stbtt__GetGlyphInfoT2(info, glyph_index, NULL, NULL, NULL, NULL) == 0;
+ g = stbtt__GetGlyfOffset(info, glyph_index);
if (g < 0) return 1;
numberOfContours = ttSHORT(info->data + g);
return numberOfContours == 0;
@@ -1254,7 +1591,7 @@ static int stbtt__close_shape(stbtt_vertex *vertices, int num_vertices, int was_
return num_vertices;
}
-STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices)
+static int stbtt__GetGlyphShapeTT(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices)
{
stbtt_int16 numberOfContours;
stbtt_uint8 *endPtsOfContours;
@@ -1350,7 +1687,7 @@ STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, s
if (i != 0)
num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy);
- // now start the new one
+ // now start the new one
start_off = !(flags & 1);
if (start_off) {
// if we start off with an off-curve point, then when we need to find a point on the curve
@@ -1403,7 +1740,7 @@ STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, s
int comp_num_verts = 0, i;
stbtt_vertex *comp_verts = 0, *tmp = 0;
float mtx[6] = {1,0,0,1,0,0}, m, n;
-
+
flags = ttSHORT(comp); comp+=2;
gidx = ttSHORT(comp); comp+=2;
@@ -1433,7 +1770,7 @@ STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, s
mtx[2] = ttSHORT(comp)/16384.0f; comp+=2;
mtx[3] = ttSHORT(comp)/16384.0f; comp+=2;
}
-
+
// Find transformation scales.
m = (float) STBTT_sqrt(mtx[0]*mtx[0] + mtx[1]*mtx[1]);
n = (float) STBTT_sqrt(mtx[2]*mtx[2] + mtx[3]*mtx[3]);
@@ -1480,6 +1817,416 @@ STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, s
return num_vertices;
}
+typedef struct
+{
+ int bounds;
+ int started;
+ float first_x, first_y;
+ float x, y;
+ stbtt_int32 min_x, max_x, min_y, max_y;
+
+ stbtt_vertex *pvertices;
+ int num_vertices;
+} stbtt__csctx;
+
+#define STBTT__CSCTX_INIT(bounds) {bounds,0, 0,0, 0,0, 0,0,0,0, NULL, 0}
+
+static void stbtt__track_vertex(stbtt__csctx *c, stbtt_int32 x, stbtt_int32 y)
+{
+ if (x > c->max_x || !c->started) c->max_x = x;
+ if (y > c->max_y || !c->started) c->max_y = y;
+ if (x < c->min_x || !c->started) c->min_x = x;
+ if (y < c->min_y || !c->started) c->min_y = y;
+ c->started = 1;
+}
+
+static void stbtt__csctx_v(stbtt__csctx *c, stbtt_uint8 type, stbtt_int32 x, stbtt_int32 y, stbtt_int32 cx, stbtt_int32 cy, stbtt_int32 cx1, stbtt_int32 cy1)
+{
+ if (c->bounds) {
+ stbtt__track_vertex(c, x, y);
+ if (type == STBTT_vcubic) {
+ stbtt__track_vertex(c, cx, cy);
+ stbtt__track_vertex(c, cx1, cy1);
+ }
+ } else {
+ stbtt_setvertex(&c->pvertices[c->num_vertices], type, x, y, cx, cy);
+ c->pvertices[c->num_vertices].cx1 = (stbtt_int16) cx1;
+ c->pvertices[c->num_vertices].cy1 = (stbtt_int16) cy1;
+ }
+ c->num_vertices++;
+}
+
+static void stbtt__csctx_close_shape(stbtt__csctx *ctx)
+{
+ if (ctx->first_x != ctx->x || ctx->first_y != ctx->y)
+ stbtt__csctx_v(ctx, STBTT_vline, (int)ctx->first_x, (int)ctx->first_y, 0, 0, 0, 0);
+}
+
+static void stbtt__csctx_rmove_to(stbtt__csctx *ctx, float dx, float dy)
+{
+ stbtt__csctx_close_shape(ctx);
+ ctx->first_x = ctx->x = ctx->x + dx;
+ ctx->first_y = ctx->y = ctx->y + dy;
+ stbtt__csctx_v(ctx, STBTT_vmove, (int)ctx->x, (int)ctx->y, 0, 0, 0, 0);
+}
+
+static void stbtt__csctx_rline_to(stbtt__csctx *ctx, float dx, float dy)
+{
+ ctx->x += dx;
+ ctx->y += dy;
+ stbtt__csctx_v(ctx, STBTT_vline, (int)ctx->x, (int)ctx->y, 0, 0, 0, 0);
+}
+
+static void stbtt__csctx_rccurve_to(stbtt__csctx *ctx, float dx1, float dy1, float dx2, float dy2, float dx3, float dy3)
+{
+ float cx1 = ctx->x + dx1;
+ float cy1 = ctx->y + dy1;
+ float cx2 = cx1 + dx2;
+ float cy2 = cy1 + dy2;
+ ctx->x = cx2 + dx3;
+ ctx->y = cy2 + dy3;
+ stbtt__csctx_v(ctx, STBTT_vcubic, (int)ctx->x, (int)ctx->y, (int)cx1, (int)cy1, (int)cx2, (int)cy2);
+}
+
+static stbtt__buf stbtt__get_subr(stbtt__buf idx, int n)
+{
+ int count = stbtt__cff_index_count(&idx);
+ int bias = 107;
+ if (count >= 33900)
+ bias = 32768;
+ else if (count >= 1240)
+ bias = 1131;
+ n += bias;
+ if (n < 0 || n >= count)
+ return stbtt__new_buf(NULL, 0);
+ return stbtt__cff_index_get(idx, n);
+}
+
+static stbtt__buf stbtt__cid_get_glyph_subrs(const stbtt_fontinfo *info, int glyph_index)
+{
+ stbtt__buf fdselect = info->fdselect;
+ int nranges, start, end, v, fmt, fdselector = -1, i;
+
+ stbtt__buf_seek(&fdselect, 0);
+ fmt = stbtt__buf_get8(&fdselect);
+ if (fmt == 0) {
+ // untested
+ stbtt__buf_skip(&fdselect, glyph_index);
+ fdselector = stbtt__buf_get8(&fdselect);
+ } else if (fmt == 3) {
+ nranges = stbtt__buf_get16(&fdselect);
+ start = stbtt__buf_get16(&fdselect);
+ for (i = 0; i < nranges; i++) {
+ v = stbtt__buf_get8(&fdselect);
+ end = stbtt__buf_get16(&fdselect);
+ if (glyph_index >= start && glyph_index < end) {
+ fdselector = v;
+ break;
+ }
+ start = end;
+ }
+ }
+ if (fdselector == -1) stbtt__new_buf(NULL, 0);
+ return stbtt__get_subrs(info->cff, stbtt__cff_index_get(info->fontdicts, fdselector));
+}
+
+static int stbtt__run_charstring(const stbtt_fontinfo *info, int glyph_index, stbtt__csctx *c)
+{
+ int in_header = 1, maskbits = 0, subr_stack_height = 0, sp = 0, v, i, b0;
+ int has_subrs = 0, clear_stack;
+ float s[48];
+ stbtt__buf subr_stack[10], subrs = info->subrs, b;
+ float f;
+
+#define STBTT__CSERR(s) (0)
+
+ // this currently ignores the initial width value, which isn't needed if we have hmtx
+ b = stbtt__cff_index_get(info->charstrings, glyph_index);
+ while (b.cursor < b.size) {
+ i = 0;
+ clear_stack = 1;
+ b0 = stbtt__buf_get8(&b);
+ switch (b0) {
+ // @TODO implement hinting
+ case 0x13: // hintmask
+ case 0x14: // cntrmask
+ if (in_header)
+ maskbits += (sp / 2); // implicit "vstem"
+ in_header = 0;
+ stbtt__buf_skip(&b, (maskbits + 7) / 8);
+ break;
+
+ case 0x01: // hstem
+ case 0x03: // vstem
+ case 0x12: // hstemhm
+ case 0x17: // vstemhm
+ maskbits += (sp / 2);
+ break;
+
+ case 0x15: // rmoveto
+ in_header = 0;
+ if (sp < 2) return STBTT__CSERR("rmoveto stack");
+ stbtt__csctx_rmove_to(c, s[sp-2], s[sp-1]);
+ break;
+ case 0x04: // vmoveto
+ in_header = 0;
+ if (sp < 1) return STBTT__CSERR("vmoveto stack");
+ stbtt__csctx_rmove_to(c, 0, s[sp-1]);
+ break;
+ case 0x16: // hmoveto
+ in_header = 0;
+ if (sp < 1) return STBTT__CSERR("hmoveto stack");
+ stbtt__csctx_rmove_to(c, s[sp-1], 0);
+ break;
+
+ case 0x05: // rlineto
+ if (sp < 2) return STBTT__CSERR("rlineto stack");
+ for (; i + 1 < sp; i += 2)
+ stbtt__csctx_rline_to(c, s[i], s[i+1]);
+ break;
+
+ // hlineto/vlineto and vhcurveto/hvcurveto alternate horizontal and vertical
+ // starting from a different place.
+
+ case 0x07: // vlineto
+ if (sp < 1) return STBTT__CSERR("vlineto stack");
+ goto vlineto;
+ case 0x06: // hlineto
+ if (sp < 1) return STBTT__CSERR("hlineto stack");
+ for (;;) {
+ if (i >= sp) break;
+ stbtt__csctx_rline_to(c, s[i], 0);
+ i++;
+ vlineto:
+ if (i >= sp) break;
+ stbtt__csctx_rline_to(c, 0, s[i]);
+ i++;
+ }
+ break;
+
+ case 0x1F: // hvcurveto
+ if (sp < 4) return STBTT__CSERR("hvcurveto stack");
+ goto hvcurveto;
+ case 0x1E: // vhcurveto
+ if (sp < 4) return STBTT__CSERR("vhcurveto stack");
+ for (;;) {
+ if (i + 3 >= sp) break;
+ stbtt__csctx_rccurve_to(c, 0, s[i], s[i+1], s[i+2], s[i+3], (sp - i == 5) ? s[i + 4] : 0.0f);
+ i += 4;
+ hvcurveto:
+ if (i + 3 >= sp) break;
+ stbtt__csctx_rccurve_to(c, s[i], 0, s[i+1], s[i+2], (sp - i == 5) ? s[i+4] : 0.0f, s[i+3]);
+ i += 4;
+ }
+ break;
+
+ case 0x08: // rrcurveto
+ if (sp < 6) return STBTT__CSERR("rcurveline stack");
+ for (; i + 5 < sp; i += 6)
+ stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]);
+ break;
+
+ case 0x18: // rcurveline
+ if (sp < 8) return STBTT__CSERR("rcurveline stack");
+ for (; i + 5 < sp - 2; i += 6)
+ stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]);
+ if (i + 1 >= sp) return STBTT__CSERR("rcurveline stack");
+ stbtt__csctx_rline_to(c, s[i], s[i+1]);
+ break;
+
+ case 0x19: // rlinecurve
+ if (sp < 8) return STBTT__CSERR("rlinecurve stack");
+ for (; i + 1 < sp - 6; i += 2)
+ stbtt__csctx_rline_to(c, s[i], s[i+1]);
+ if (i + 5 >= sp) return STBTT__CSERR("rlinecurve stack");
+ stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]);
+ break;
+
+ case 0x1A: // vvcurveto
+ case 0x1B: // hhcurveto
+ if (sp < 4) return STBTT__CSERR("(vv|hh)curveto stack");
+ f = 0.0;
+ if (sp & 1) { f = s[i]; i++; }
+ for (; i + 3 < sp; i += 4) {
+ if (b0 == 0x1B)
+ stbtt__csctx_rccurve_to(c, s[i], f, s[i+1], s[i+2], s[i+3], 0.0);
+ else
+ stbtt__csctx_rccurve_to(c, f, s[i], s[i+1], s[i+2], 0.0, s[i+3]);
+ f = 0.0;
+ }
+ break;
+
+ case 0x0A: // callsubr
+ if (!has_subrs) {
+ if (info->fdselect.size)
+ subrs = stbtt__cid_get_glyph_subrs(info, glyph_index);
+ has_subrs = 1;
+ }
+ // fallthrough
+ case 0x1D: // callgsubr
+ if (sp < 1) return STBTT__CSERR("call(g|)subr stack");
+ v = (int) s[--sp];
+ if (subr_stack_height >= 10) return STBTT__CSERR("recursion limit");
+ subr_stack[subr_stack_height++] = b;
+ b = stbtt__get_subr(b0 == 0x0A ? subrs : info->gsubrs, v);
+ if (b.size == 0) return STBTT__CSERR("subr not found");
+ b.cursor = 0;
+ clear_stack = 0;
+ break;
+
+ case 0x0B: // return
+ if (subr_stack_height <= 0) return STBTT__CSERR("return outside subr");
+ b = subr_stack[--subr_stack_height];
+ clear_stack = 0;
+ break;
+
+ case 0x0E: // endchar
+ stbtt__csctx_close_shape(c);
+ return 1;
+
+ case 0x0C: { // two-byte escape
+ float dx1, dx2, dx3, dx4, dx5, dx6, dy1, dy2, dy3, dy4, dy5, dy6;
+ float dx, dy;
+ int b1 = stbtt__buf_get8(&b);
+ switch (b1) {
+ // @TODO These "flex" implementations ignore the flex-depth and resolution,
+ // and always draw beziers.
+ case 0x22: // hflex
+ if (sp < 7) return STBTT__CSERR("hflex stack");
+ dx1 = s[0];
+ dx2 = s[1];
+ dy2 = s[2];
+ dx3 = s[3];
+ dx4 = s[4];
+ dx5 = s[5];
+ dx6 = s[6];
+ stbtt__csctx_rccurve_to(c, dx1, 0, dx2, dy2, dx3, 0);
+ stbtt__csctx_rccurve_to(c, dx4, 0, dx5, -dy2, dx6, 0);
+ break;
+
+ case 0x23: // flex
+ if (sp < 13) return STBTT__CSERR("flex stack");
+ dx1 = s[0];
+ dy1 = s[1];
+ dx2 = s[2];
+ dy2 = s[3];
+ dx3 = s[4];
+ dy3 = s[5];
+ dx4 = s[6];
+ dy4 = s[7];
+ dx5 = s[8];
+ dy5 = s[9];
+ dx6 = s[10];
+ dy6 = s[11];
+ //fd is s[12]
+ stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3);
+ stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6);
+ break;
+
+ case 0x24: // hflex1
+ if (sp < 9) return STBTT__CSERR("hflex1 stack");
+ dx1 = s[0];
+ dy1 = s[1];
+ dx2 = s[2];
+ dy2 = s[3];
+ dx3 = s[4];
+ dx4 = s[5];
+ dx5 = s[6];
+ dy5 = s[7];
+ dx6 = s[8];
+ stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, 0);
+ stbtt__csctx_rccurve_to(c, dx4, 0, dx5, dy5, dx6, -(dy1+dy2+dy5));
+ break;
+
+ case 0x25: // flex1
+ if (sp < 11) return STBTT__CSERR("flex1 stack");
+ dx1 = s[0];
+ dy1 = s[1];
+ dx2 = s[2];
+ dy2 = s[3];
+ dx3 = s[4];
+ dy3 = s[5];
+ dx4 = s[6];
+ dy4 = s[7];
+ dx5 = s[8];
+ dy5 = s[9];
+ dx6 = dy6 = s[10];
+ dx = dx1+dx2+dx3+dx4+dx5;
+ dy = dy1+dy2+dy3+dy4+dy5;
+ if (STBTT_fabs(dx) > STBTT_fabs(dy))
+ dy6 = -dy;
+ else
+ dx6 = -dx;
+ stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3);
+ stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6);
+ break;
+
+ default:
+ return STBTT__CSERR("unimplemented");
+ }
+ } break;
+
+ default:
+ if (b0 != 255 && b0 != 28 && (b0 < 32 || b0 > 254))
+ return STBTT__CSERR("reserved operator");
+
+ // push immediate
+ if (b0 == 255) {
+ f = (float)stbtt__buf_get32(&b) / 0x10000;
+ } else {
+ stbtt__buf_skip(&b, -1);
+ f = (float)(stbtt_int16)stbtt__cff_int(&b);
+ }
+ if (sp >= 48) return STBTT__CSERR("push stack overflow");
+ s[sp++] = f;
+ clear_stack = 0;
+ break;
+ }
+ if (clear_stack) sp = 0;
+ }
+ return STBTT__CSERR("no endchar");
+
+#undef STBTT__CSERR
+}
+
+static int stbtt__GetGlyphShapeT2(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices)
+{
+ // runs the charstring twice, once to count and once to output (to avoid realloc)
+ stbtt__csctx count_ctx = STBTT__CSCTX_INIT(1);
+ stbtt__csctx output_ctx = STBTT__CSCTX_INIT(0);
+ if (stbtt__run_charstring(info, glyph_index, &count_ctx)) {
+ *pvertices = (stbtt_vertex*)STBTT_malloc(count_ctx.num_vertices*sizeof(stbtt_vertex), info->userdata);
+ output_ctx.pvertices = *pvertices;
+ if (stbtt__run_charstring(info, glyph_index, &output_ctx)) {
+ STBTT_assert(output_ctx.num_vertices == count_ctx.num_vertices);
+ return output_ctx.num_vertices;
+ }
+ }
+ *pvertices = NULL;
+ return 0;
+}
+
+static int stbtt__GetGlyphInfoT2(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1)
+{
+ stbtt__csctx c = STBTT__CSCTX_INIT(1);
+ int r = stbtt__run_charstring(info, glyph_index, &c);
+ if (x0) {
+ *x0 = r ? c.min_x : 0;
+ *y0 = r ? c.min_y : 0;
+ *x1 = r ? c.max_x : 0;
+ *y1 = r ? c.max_y : 0;
+ }
+ return r ? c.num_vertices : 0;
+}
+
+STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices)
+{
+ if (!info->cff.size)
+ return stbtt__GetGlyphShapeTT(info, glyph_index, pvertices);
+ else
+ return stbtt__GetGlyphShapeT2(info, glyph_index, pvertices);
+}
+
STBTT_DEF void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int glyph_index, int *advanceWidth, int *leftSideBearing)
{
stbtt_uint16 numOfLongHorMetrics = ttUSHORT(info->data+info->hhea + 34);
@@ -1541,6 +2288,17 @@ STBTT_DEF void stbtt_GetFontVMetrics(const stbtt_fontinfo *info, int *ascent, in
if (lineGap) *lineGap = ttSHORT(info->data+info->hhea + 8);
}
+STBTT_DEF int stbtt_GetFontVMetricsOS2(const stbtt_fontinfo *info, int *typoAscent, int *typoDescent, int *typoLineGap)
+{
+ int tab = stbtt__find_table(info->data, info->fontstart, "OS/2");
+ if (!tab)
+ return 0;
+ if (typoAscent ) *typoAscent = ttSHORT(info->data+tab + 68);
+ if (typoDescent) *typoDescent = ttSHORT(info->data+tab + 70);
+ if (typoLineGap) *typoLineGap = ttSHORT(info->data+tab + 72);
+ return 1;
+}
+
STBTT_DEF void stbtt_GetFontBoundingBox(const stbtt_fontinfo *info, int *x0, int *y0, int *x1, int *y1)
{
*x0 = ttSHORT(info->data + info->head + 36);
@@ -1691,7 +2449,7 @@ static stbtt__active_edge *stbtt__new_active(stbtt__hheap *hh, stbtt__edge *e, i
float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);
STBTT_assert(z != NULL);
if (!z) return z;
-
+
// round dx down to avoid overshooting
if (dxdy < 0)
z->dx = -STBTT_ifloor(STBTT_FIX * -dxdy);
@@ -1769,7 +2527,7 @@ static void stbtt__fill_active_edges(unsigned char *scanline, int len, stbtt__ac
}
}
}
-
+
e = e->next;
}
}
@@ -2033,19 +2791,18 @@ static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill,
// from the other y segment, and it might ignored as an empty segment. to avoid
// that, we need to explicitly produce segments based on x positions.
- // rename variables to clear pairs
+ // rename variables to clearly-defined pairs
float y0 = y_top;
float x1 = (float) (x);
float x2 = (float) (x+1);
float x3 = xb;
float y3 = y_bottom;
- float y1,y2;
// x = e->x + e->dx * (y-y_top)
// (y-y_top) = (x - e->x) / e->dx
// y = (x - e->x) / e->dx + y_top
- y1 = (x - x0) / dx + y_top;
- y2 = (x+1 - x0) / dx + y_top;
+ float y1 = (x - x0) / dx + y_top;
+ float y2 = (x+1 - x0) / dx + y_top;
if (x0 < x1 && x3 > x2) { // three segments descending down-right
stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x1,y1);
@@ -2350,6 +3107,48 @@ static int stbtt__tesselate_curve(stbtt__point *points, int *num_points, float x
return 1;
}
+static void stbtt__tesselate_cubic(stbtt__point *points, int *num_points, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, float objspace_flatness_squared, int n)
+{
+ // @TODO this "flatness" calculation is just made-up nonsense that seems to work well enough
+ float dx0 = x1-x0;
+ float dy0 = y1-y0;
+ float dx1 = x2-x1;
+ float dy1 = y2-y1;
+ float dx2 = x3-x2;
+ float dy2 = y3-y2;
+ float dx = x3-x0;
+ float dy = y3-y0;
+ float longlen = (float) (STBTT_sqrt(dx0*dx0+dy0*dy0)+STBTT_sqrt(dx1*dx1+dy1*dy1)+STBTT_sqrt(dx2*dx2+dy2*dy2));
+ float shortlen = (float) STBTT_sqrt(dx*dx+dy*dy);
+ float flatness_squared = longlen*longlen-shortlen*shortlen;
+
+ if (n > 16) // 65536 segments on one curve better be enough!
+ return;
+
+ if (flatness_squared > objspace_flatness_squared) {
+ float x01 = (x0+x1)/2;
+ float y01 = (y0+y1)/2;
+ float x12 = (x1+x2)/2;
+ float y12 = (y1+y2)/2;
+ float x23 = (x2+x3)/2;
+ float y23 = (y2+y3)/2;
+
+ float xa = (x01+x12)/2;
+ float ya = (y01+y12)/2;
+ float xb = (x12+x23)/2;
+ float yb = (y12+y23)/2;
+
+ float mx = (xa+xb)/2;
+ float my = (ya+yb)/2;
+
+ stbtt__tesselate_cubic(points, num_points, x0,y0, x01,y01, xa,ya, mx,my, objspace_flatness_squared,n+1);
+ stbtt__tesselate_cubic(points, num_points, mx,my, xb,yb, x23,y23, x3,y3, objspace_flatness_squared,n+1);
+ } else {
+ stbtt__add_point(points, *num_points,x3,y3);
+ *num_points = *num_points+1;
+ }
+}
+
// returns number of contours
static stbtt__point *stbtt_FlattenCurves(stbtt_vertex *vertices, int num_verts, float objspace_flatness, int **contour_lengths, int *num_contours, void *userdata)
{
@@ -2406,6 +3205,14 @@ static stbtt__point *stbtt_FlattenCurves(stbtt_vertex *vertices, int num_verts,
objspace_flatness_squared, 0);
x = vertices[i].x, y = vertices[i].y;
break;
+ case STBTT_vcubic:
+ stbtt__tesselate_cubic(points, &num_points, x,y,
+ vertices[i].cx, vertices[i].cy,
+ vertices[i].cx1, vertices[i].cy1,
+ vertices[i].x, vertices[i].y,
+ objspace_flatness_squared, 0);
+ x = vertices[i].x, y = vertices[i].y;
+ break;
}
}
(*contour_lengths)[n] = num_points - start;
@@ -2441,7 +3248,7 @@ STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info
{
int ix0,iy0,ix1,iy1;
stbtt__bitmap gbm;
- stbtt_vertex *vertices;
+ stbtt_vertex *vertices;
int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices);
if (scale_x == 0) scale_x = scale_y;
@@ -2464,7 +3271,7 @@ STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info
if (height) *height = gbm.h;
if (xoff ) *xoff = ix0;
if (yoff ) *yoff = iy0;
-
+
if (gbm.w && gbm.h) {
gbm.pixels = (unsigned char *) STBTT_malloc(gbm.w * gbm.h, info->userdata);
if (gbm.pixels) {
@@ -2475,7 +3282,7 @@ STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info
}
STBTT_free(vertices, info->userdata);
return gbm.pixels;
-}
+}
STBTT_DEF unsigned char *stbtt_GetGlyphBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int glyph, int *width, int *height, int *xoff, int *yoff)
{
@@ -2487,7 +3294,7 @@ STBTT_DEF void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo *info, unsigne
int ix0,iy0;
stbtt_vertex *vertices;
int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices);
- stbtt__bitmap gbm;
+ stbtt__bitmap gbm;
stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x, shift_y, &ix0,&iy0,0,0);
gbm.pixels = output;
@@ -2509,7 +3316,7 @@ STBTT_DEF void stbtt_MakeGlyphBitmap(const stbtt_fontinfo *info, unsigned char *
STBTT_DEF unsigned char *stbtt_GetCodepointBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint, int *width, int *height, int *xoff, int *yoff)
{
return stbtt_GetGlyphBitmapSubpixel(info, scale_x, scale_y,shift_x,shift_y, stbtt_FindGlyphIndex(info,codepoint), width,height,xoff,yoff);
-}
+}
STBTT_DEF void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint)
{
@@ -2519,7 +3326,7 @@ STBTT_DEF void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo *info, uns
STBTT_DEF unsigned char *stbtt_GetCodepointBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int codepoint, int *width, int *height, int *xoff, int *yoff)
{
return stbtt_GetCodepointBitmapSubpixel(info, scale_x, scale_y, 0.0f,0.0f, codepoint, width,height,xoff,yoff);
-}
+}
STBTT_DEF void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int codepoint)
{
@@ -2532,7 +3339,7 @@ STBTT_DEF void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, unsigned ch
//
// This is SUPER-CRAPPY packing to keep source code small
-STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset, // font location (use offset=0 for plain .ttf)
+static int stbtt_BakeFontBitmap_internal(unsigned char *data, int offset, // font location (use offset=0 for plain .ttf)
float pixel_height, // height of font in pixels
unsigned char *pixels, int pw, int ph, // bitmap to be filled in
int first_char, int num_chars, // characters to bake
@@ -2578,11 +3385,11 @@ STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset, // fo
return bottom_y;
}
-STBTT_DEF void stbtt_GetBakedQuad(stbtt_bakedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int opengl_fillrule)
+STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int opengl_fillrule)
{
float d3d_bias = opengl_fillrule ? 0 : -0.5f;
float ipw = 1.0f / pw, iph = 1.0f / ph;
- stbtt_bakedchar *b = chardata + char_index;
+ const stbtt_bakedchar *b = chardata + char_index;
int round_x = STBTT_ifloor((*xpos + b->xoff) + 0.5f);
int round_y = STBTT_ifloor((*ypos + b->yoff) + 0.5f);
@@ -2644,7 +3451,7 @@ static void stbrp_init_target(stbrp_context *con, int pw, int ph, stbrp_node *no
con->y = 0;
con->bottom_y = 0;
STBTT__NOTUSED(nodes);
- STBTT__NOTUSED(num_nodes);
+ STBTT__NOTUSED(num_nodes);
}
static void stbrp_pack_rects(stbrp_context *con, stbrp_rect *rects, int num_rects)
@@ -2862,7 +3669,7 @@ static float stbtt__oversample_shift(int oversample)
}
// rects array must be big enough to accommodate all characters in the given ranges
-STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects)
+STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects)
{
int i,j,k;
@@ -2890,8 +3697,31 @@ STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, stbtt_fon
return k;
}
+STBTT_DEF void stbtt_MakeGlyphBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int prefilter_x, int prefilter_y, float *sub_x, float *sub_y, int glyph)
+{
+ stbtt_MakeGlyphBitmapSubpixel(info,
+ output,
+ out_w - (prefilter_x - 1),
+ out_h - (prefilter_y - 1),
+ out_stride,
+ scale_x,
+ scale_y,
+ shift_x,
+ shift_y,
+ glyph);
+
+ if (prefilter_x > 1)
+ stbtt__h_prefilter(output, out_w, out_h, out_stride, prefilter_x);
+
+ if (prefilter_y > 1)
+ stbtt__v_prefilter(output, out_w, out_h, out_stride, prefilter_y);
+
+ *sub_x = stbtt__oversample_shift(prefilter_x);
+ *sub_y = stbtt__oversample_shift(prefilter_y);
+}
+
// rects array must be big enough to accommodate all characters in the given ranges
-STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects)
+STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects)
{
int i,j,k, return_value = 1;
@@ -2978,7 +3808,7 @@ STBTT_DEF void stbtt_PackFontRangesPackRects(stbtt_pack_context *spc, stbrp_rect
stbrp_pack_rects((stbrp_context *) spc->pack_info, rects, num_rects);
}
-STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, unsigned char *fontdata, int font_index, stbtt_pack_range *ranges, int num_ranges)
+STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, stbtt_pack_range *ranges, int num_ranges)
{
stbtt_fontinfo info;
int i,j,n, return_value = 1;
@@ -2996,7 +3826,7 @@ STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, unsigned char *fontd
n = 0;
for (i=0; i < num_ranges; ++i)
n += ranges[i].num_chars;
-
+
rects = (stbrp_rect *) STBTT_malloc(sizeof(*rects) * n, spc->user_allocator_context);
if (rects == NULL)
return 0;
@@ -3007,14 +3837,14 @@ STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, unsigned char *fontd
n = stbtt_PackFontRangesGatherRects(spc, &info, ranges, num_ranges, rects);
stbtt_PackFontRangesPackRects(spc, rects, n);
-
+
return_value = stbtt_PackFontRangesRenderIntoRects(spc, &info, ranges, num_ranges, rects);
STBTT_free(rects, spc->user_allocator_context);
return return_value;
}
-STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context *spc, unsigned char *fontdata, int font_index, float font_size,
+STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, float font_size,
int first_unicode_codepoint_in_range, int num_chars_in_range, stbtt_packedchar *chardata_for_range)
{
stbtt_pack_range range;
@@ -3026,10 +3856,10 @@ STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context *spc, unsigned char *fontda
return stbtt_PackFontRanges(spc, fontdata, font_index, &range, 1);
}
-STBTT_DEF void stbtt_GetPackedQuad(stbtt_packedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int align_to_integer)
+STBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int align_to_integer)
{
float ipw = 1.0f / pw, iph = 1.0f / ph;
- stbtt_packedchar *b = chardata + char_index;
+ const stbtt_packedchar *b = chardata + char_index;
if (align_to_integer) {
float x = (float) STBTT_ifloor((*xpos + b->xoff) + 0.5f);
@@ -3053,6 +3883,387 @@ STBTT_DEF void stbtt_GetPackedQuad(stbtt_packedchar *chardata, int pw, int ph, i
*xpos += b->xadvance;
}
+//////////////////////////////////////////////////////////////////////////////
+//
+// sdf computation
+//
+
+#define STBTT_min(a,b) ((a) < (b) ? (a) : (b))
+#define STBTT_max(a,b) ((a) < (b) ? (b) : (a))
+
+static int stbtt__ray_intersect_bezier(float orig[2], float ray[2], float q0[2], float q1[2], float q2[2], float hits[2][2])
+{
+ float q0perp = q0[1]*ray[0] - q0[0]*ray[1];
+ float q1perp = q1[1]*ray[0] - q1[0]*ray[1];
+ float q2perp = q2[1]*ray[0] - q2[0]*ray[1];
+ float roperp = orig[1]*ray[0] - orig[0]*ray[1];
+
+ float a = q0perp - 2*q1perp + q2perp;
+ float b = q1perp - q0perp;
+ float c = q0perp - roperp;
+
+ float s0 = 0., s1 = 0.;
+ int num_s = 0;
+
+ if (a != 0.0) {
+ float discr = b*b - a*c;
+ if (discr > 0.0) {
+ float rcpna = -1 / a;
+ float d = (float) sqrt(discr);
+ s0 = (b+d) * rcpna;
+ s1 = (b-d) * rcpna;
+ if (s0 >= 0.0 && s0 <= 1.0)
+ num_s = 1;
+ if (d > 0.0 && s1 >= 0.0 && s1 <= 1.0) {
+ if (num_s == 0) s0 = s1;
+ ++num_s;
+ }
+ }
+ } else {
+ // 2*b*s + c = 0
+ // s = -c / (2*b)
+ s0 = c / (-2 * b);
+ if (s0 >= 0.0 && s0 <= 1.0)
+ num_s = 1;
+ }
+
+ if (num_s == 0)
+ return 0;
+ else {
+ float rcp_len2 = 1 / (ray[0]*ray[0] + ray[1]*ray[1]);
+ float rayn_x = ray[0] * rcp_len2, rayn_y = ray[1] * rcp_len2;
+
+ float q0d = q0[0]*rayn_x + q0[1]*rayn_y;
+ float q1d = q1[0]*rayn_x + q1[1]*rayn_y;
+ float q2d = q2[0]*rayn_x + q2[1]*rayn_y;
+ float rod = orig[0]*rayn_x + orig[1]*rayn_y;
+
+ float q10d = q1d - q0d;
+ float q20d = q2d - q0d;
+ float q0rd = q0d - rod;
+
+ hits[0][0] = q0rd + s0*(2.0f - 2.0f*s0)*q10d + s0*s0*q20d;
+ hits[0][1] = a*s0+b;
+
+ if (num_s > 1) {
+ hits[1][0] = q0rd + s1*(2.0f - 2.0f*s1)*q10d + s1*s1*q20d;
+ hits[1][1] = a*s1+b;
+ return 2;
+ } else {
+ return 1;
+ }
+ }
+}
+
+static int equal(float *a, float *b)
+{
+ return (a[0] == b[0] && a[1] == b[1]);
+}
+
+static int stbtt__compute_crossings_x(float x, float y, int nverts, stbtt_vertex *verts)
+{
+ int i;
+ float orig[2], ray[2] = { 1, 0 };
+ float y_frac;
+ int winding = 0;
+
+ orig[0] = x;
+ orig[1] = y;
+
+ // make sure y never passes through a vertex of the shape
+ y_frac = (float) fmod(y, 1.0f);
+ if (y_frac < 0.01f)
+ y += 0.01f;
+ else if (y_frac > 0.99f)
+ y -= 0.01f;
+ orig[1] = y;
+
+ // test a ray from (-infinity,y) to (x,y)
+ for (i=0; i < nverts; ++i) {
+ if (verts[i].type == STBTT_vline) {
+ int x0 = (int) verts[i-1].x, y0 = (int) verts[i-1].y;
+ int x1 = (int) verts[i ].x, y1 = (int) verts[i ].y;
+ if (y > STBTT_min(y0,y1) && y < STBTT_max(y0,y1) && x > STBTT_min(x0,x1)) {
+ float x_inter = (y - y0) / (y1 - y0) * (x1-x0) + x0;
+ if (x_inter < x)
+ winding += (y0 < y1) ? 1 : -1;
+ }
+ }
+ if (verts[i].type == STBTT_vcurve) {
+ int x0 = (int) verts[i-1].x , y0 = (int) verts[i-1].y ;
+ int x1 = (int) verts[i ].cx, y1 = (int) verts[i ].cy;
+ int x2 = (int) verts[i ].x , y2 = (int) verts[i ].y ;
+ int ax = STBTT_min(x0,STBTT_min(x1,x2)), ay = STBTT_min(y0,STBTT_min(y1,y2));
+ int by = STBTT_max(y0,STBTT_max(y1,y2));
+ if (y > ay && y < by && x > ax) {
+ float q0[2],q1[2],q2[2];
+ float hits[2][2];
+ q0[0] = (float)x0;
+ q0[1] = (float)y0;
+ q1[0] = (float)x1;
+ q1[1] = (float)y1;
+ q2[0] = (float)x2;
+ q2[1] = (float)y2;
+ if (equal(q0,q1) || equal(q1,q2)) {
+ x0 = (int)verts[i-1].x;
+ y0 = (int)verts[i-1].y;
+ x1 = (int)verts[i ].x;
+ y1 = (int)verts[i ].y;
+ if (y > STBTT_min(y0,y1) && y < STBTT_max(y0,y1) && x > STBTT_min(x0,x1)) {
+ float x_inter = (y - y0) / (y1 - y0) * (x1-x0) + x0;
+ if (x_inter < x)
+ winding += (y0 < y1) ? 1 : -1;
+ }
+ } else {
+ int num_hits = stbtt__ray_intersect_bezier(orig, ray, q0, q1, q2, hits);
+ if (num_hits >= 1)
+ if (hits[0][0] < 0)
+ winding += (hits[0][1] < 0 ? -1 : 1);
+ if (num_hits >= 2)
+ if (hits[1][0] < 0)
+ winding += (hits[1][1] < 0 ? -1 : 1);
+ }
+ }
+ }
+ }
+ return winding;
+}
+
+static float stbtt__cuberoot( float x )
+{
+ if (x<0)
+ return -(float) STBTT_pow(-x,1.0f/3.0f);
+ else
+ return (float) STBTT_pow( x,1.0f/3.0f);
+}
+
+// x^3 + c*x^2 + b*x + a = 0
+static int stbtt__solve_cubic(float a, float b, float c, float* r)
+{
+ float s = -a / 3;
+ float p = b - a*a / 3;
+ float q = a * (2*a*a - 9*b) / 27 + c;
+ float p3 = p*p*p;
+ float d = q*q + 4*p3 / 27;
+ if (d >= 0) {
+ float z = (float) STBTT_sqrt(d);
+ float u = (-q + z) / 2;
+ float v = (-q - z) / 2;
+ u = stbtt__cuberoot(u);
+ v = stbtt__cuberoot(v);
+ r[0] = s + u + v;
+ return 1;
+ } else {
+ float u = (float) STBTT_sqrt(-p/3);
+ float v = (float) STBTT_acos(-STBTT_sqrt(-27/p3) * q / 2) / 3; // p3 must be negative, since d is negative
+ float m = (float) STBTT_cos(v);
+ float n = (float) STBTT_cos(v-3.141592/2)*1.732050808f;
+ r[0] = s + u * 2 * m;
+ r[1] = s - u * (m + n);
+ r[2] = s - u * (m - n);
+
+ //STBTT_assert( STBTT_fabs(((r[0]+a)*r[0]+b)*r[0]+c) < 0.05f); // these asserts may not be safe at all scales, though they're in bezier t parameter units so maybe?
+ //STBTT_assert( STBTT_fabs(((r[1]+a)*r[1]+b)*r[1]+c) < 0.05f);
+ //STBTT_assert( STBTT_fabs(((r[2]+a)*r[2]+b)*r[2]+c) < 0.05f);
+ return 3;
+ }
+}
+
+STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float scale, int glyph, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff)
+{
+ float scale_x = scale, scale_y = scale;
+ int ix0,iy0,ix1,iy1;
+ int w,h;
+ unsigned char *data;
+
+ // if one scale is 0, use same scale for both
+ if (scale_x == 0) scale_x = scale_y;
+ if (scale_y == 0) {
+ if (scale_x == 0) return NULL; // if both scales are 0, return NULL
+ scale_y = scale_x;
+ }
+
+ stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale, scale, 0.0f,0.0f, &ix0,&iy0,&ix1,&iy1);
+
+ // if empty, return NULL
+ if (ix0 == ix1 || iy0 == iy1)
+ return NULL;
+
+ ix0 -= padding;
+ iy0 -= padding;
+ ix1 += padding;
+ iy1 += padding;
+
+ w = (ix1 - ix0);
+ h = (iy1 - iy0);
+
+ if (width ) *width = w;
+ if (height) *height = h;
+ if (xoff ) *xoff = ix0;
+ if (yoff ) *yoff = iy0;
+
+ // invert for y-downwards bitmaps
+ scale_y = -scale_y;
+
+ {
+ int x,y,i,j;
+ float *precompute;
+ stbtt_vertex *verts;
+ int num_verts = stbtt_GetGlyphShape(info, glyph, &verts);
+ data = (unsigned char *) STBTT_malloc(w * h, info->userdata);
+ precompute = (float *) STBTT_malloc(num_verts * sizeof(float), info->userdata);
+
+ for (i=0,j=num_verts-1; i < num_verts; j=i++) {
+ if (verts[i].type == STBTT_vline) {
+ float x0 = verts[i].x*scale_x, y0 = verts[i].y*scale_y;
+ float x1 = verts[j].x*scale_x, y1 = verts[j].y*scale_y;
+ float dist = (float) STBTT_sqrt((x1-x0)*(x1-x0) + (y1-y0)*(y1-y0));
+ precompute[i] = (dist == 0) ? 0.0f : 1.0f / dist;
+ } else if (verts[i].type == STBTT_vcurve) {
+ float x2 = verts[j].x *scale_x, y2 = verts[j].y *scale_y;
+ float x1 = verts[i].cx*scale_x, y1 = verts[i].cy*scale_y;
+ float x0 = verts[i].x *scale_x, y0 = verts[i].y *scale_y;
+ float bx = x0 - 2*x1 + x2, by = y0 - 2*y1 + y2;
+ float len2 = bx*bx + by*by;
+ if (len2 != 0.0f)
+ precompute[i] = 1.0f / (bx*bx + by*by);
+ else
+ precompute[i] = 0.0f;
+ } else
+ precompute[i] = 0.0f;
+ }
+
+ for (y=iy0; y < iy1; ++y) {
+ for (x=ix0; x < ix1; ++x) {
+ float val;
+ float min_dist = 999999.0f;
+ float sx = (float) x + 0.5f;
+ float sy = (float) y + 0.5f;
+ float x_gspace = (sx / scale_x);
+ float y_gspace = (sy / scale_y);
+
+ int winding = stbtt__compute_crossings_x(x_gspace, y_gspace, num_verts, verts); // @OPTIMIZE: this could just be a rasterization, but needs to be line vs. non-tesselated curves so a new path
+
+ for (i=0; i < num_verts; ++i) {
+ float x0 = verts[i].x*scale_x, y0 = verts[i].y*scale_y;
+
+ // check against every point here rather than inside line/curve primitives -- @TODO: wrong if multiple 'moves' in a row produce a garbage point, and given culling, probably more efficient to do within line/curve
+ float dist2 = (x0-sx)*(x0-sx) + (y0-sy)*(y0-sy);
+ if (dist2 < min_dist*min_dist)
+ min_dist = (float) STBTT_sqrt(dist2);
+
+ if (verts[i].type == STBTT_vline) {
+ float x1 = verts[i-1].x*scale_x, y1 = verts[i-1].y*scale_y;
+
+ // coarse culling against bbox
+ //if (sx > STBTT_min(x0,x1)-min_dist && sx < STBTT_max(x0,x1)+min_dist &&
+ // sy > STBTT_min(y0,y1)-min_dist && sy < STBTT_max(y0,y1)+min_dist)
+ float dist = (float) STBTT_fabs((x1-x0)*(y0-sy) - (y1-y0)*(x0-sx)) * precompute[i];
+ STBTT_assert(i != 0);
+ if (dist < min_dist) {
+ // check position along line
+ // x' = x0 + t*(x1-x0), y' = y0 + t*(y1-y0)
+ // minimize (x'-sx)*(x'-sx)+(y'-sy)*(y'-sy)
+ float dx = x1-x0, dy = y1-y0;
+ float px = x0-sx, py = y0-sy;
+ // minimize (px+t*dx)^2 + (py+t*dy)^2 = px*px + 2*px*dx*t + t^2*dx*dx + py*py + 2*py*dy*t + t^2*dy*dy
+ // derivative: 2*px*dx + 2*py*dy + (2*dx*dx+2*dy*dy)*t, set to 0 and solve
+ float t = -(px*dx + py*dy) / (dx*dx + dy*dy);
+ if (t >= 0.0f && t <= 1.0f)
+ min_dist = dist;
+ }
+ } else if (verts[i].type == STBTT_vcurve) {
+ float x2 = verts[i-1].x *scale_x, y2 = verts[i-1].y *scale_y;
+ float x1 = verts[i ].cx*scale_x, y1 = verts[i ].cy*scale_y;
+ float box_x0 = STBTT_min(STBTT_min(x0,x1),x2);
+ float box_y0 = STBTT_min(STBTT_min(y0,y1),y2);
+ float box_x1 = STBTT_max(STBTT_max(x0,x1),x2);
+ float box_y1 = STBTT_max(STBTT_max(y0,y1),y2);
+ // coarse culling against bbox to avoid computing cubic unnecessarily
+ if (sx > box_x0-min_dist && sx < box_x1+min_dist && sy > box_y0-min_dist && sy < box_y1+min_dist) {
+ int num=0;
+ float ax = x1-x0, ay = y1-y0;
+ float bx = x0 - 2*x1 + x2, by = y0 - 2*y1 + y2;
+ float mx = x0 - sx, my = y0 - sy;
+ float res[3],px,py,t,it;
+ float a_inv = precompute[i];
+ if (a_inv == 0.0) { // if a_inv is 0, it's 2nd degree so use quadratic formula
+ float a = 3*(ax*bx + ay*by);
+ float b = 2*(ax*ax + ay*ay) + (mx*bx+my*by);
+ float c = mx*ax+my*ay;
+ if (a == 0.0) { // if a is 0, it's linear
+ if (b != 0.0) {
+ res[num++] = -c/b;
+ }
+ } else {
+ float discriminant = b*b - 4*a*c;
+ if (discriminant < 0)
+ num = 0;
+ else {
+ float root = (float) STBTT_sqrt(discriminant);
+ res[0] = (-b - root)/(2*a);
+ res[1] = (-b + root)/(2*a);
+ num = 2; // don't bother distinguishing 1-solution case, as code below will still work
+ }
+ }
+ } else {
+ float b = 3*(ax*bx + ay*by) * a_inv; // could precompute this as it doesn't depend on sample point
+ float c = (2*(ax*ax + ay*ay) + (mx*bx+my*by)) * a_inv;
+ float d = (mx*ax+my*ay) * a_inv;
+ num = stbtt__solve_cubic(b, c, d, res);
+ }
+ if (num >= 1 && res[0] >= 0.0f && res[0] <= 1.0f) {
+ t = res[0], it = 1.0f - t;
+ px = it*it*x0 + 2*t*it*x1 + t*t*x2;
+ py = it*it*y0 + 2*t*it*y1 + t*t*y2;
+ dist2 = (px-sx)*(px-sx) + (py-sy)*(py-sy);
+ if (dist2 < min_dist * min_dist)
+ min_dist = (float) STBTT_sqrt(dist2);
+ }
+ if (num >= 2 && res[1] >= 0.0f && res[1] <= 1.0f) {
+ t = res[1], it = 1.0f - t;
+ px = it*it*x0 + 2*t*it*x1 + t*t*x2;
+ py = it*it*y0 + 2*t*it*y1 + t*t*y2;
+ dist2 = (px-sx)*(px-sx) + (py-sy)*(py-sy);
+ if (dist2 < min_dist * min_dist)
+ min_dist = (float) STBTT_sqrt(dist2);
+ }
+ if (num >= 3 && res[2] >= 0.0f && res[2] <= 1.0f) {
+ t = res[2], it = 1.0f - t;
+ px = it*it*x0 + 2*t*it*x1 + t*t*x2;
+ py = it*it*y0 + 2*t*it*y1 + t*t*y2;
+ dist2 = (px-sx)*(px-sx) + (py-sy)*(py-sy);
+ if (dist2 < min_dist * min_dist)
+ min_dist = (float) STBTT_sqrt(dist2);
+ }
+ }
+ }
+ }
+ if (winding == 0)
+ min_dist = -min_dist; // if outside the shape, value is negative
+ val = onedge_value + pixel_dist_scale * min_dist;
+ if (val < 0)
+ val = 0;
+ else if (val > 255)
+ val = 255;
+ data[(y-iy0)*w+(x-ix0)] = (unsigned char) val;
+ }
+ }
+ STBTT_free(precompute, info->userdata);
+ STBTT_free(verts, info->userdata);
+ }
+ return data;
+}
+
+STBTT_DEF unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo *info, float scale, int codepoint, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff)
+{
+ return stbtt_GetGlyphSDF(info, scale, stbtt_FindGlyphIndex(info, codepoint), padding, onedge_value, pixel_dist_scale, width, height, xoff, yoff);
+}
+
+STBTT_DEF void stbtt_FreeSDF(unsigned char *bitmap, void *userdata)
+{
+ STBTT_free(bitmap, userdata);
+}
//////////////////////////////////////////////////////////////////////////////
//
@@ -3060,7 +4271,7 @@ STBTT_DEF void stbtt_GetPackedQuad(stbtt_packedchar *chardata, int pw, int ph, i
//
// check if a utf8 string contains a prefix which is the utf16 string; if so return length of matching utf8 string
-static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(const stbtt_uint8 *s1, stbtt_int32 len1, const stbtt_uint8 *s2, stbtt_int32 len2)
+static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(stbtt_uint8 *s1, stbtt_int32 len1, stbtt_uint8 *s2, stbtt_int32 len2)
{
stbtt_int32 i=0;
@@ -3099,9 +4310,9 @@ static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(const stbtt_uint8
return i;
}
-STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len1, const char *s2, int len2)
+static int stbtt_CompareUTF8toUTF16_bigendian_internal(char *s1, int len1, char *s2, int len2)
{
- return len1 == stbtt__CompareUTF8toUTF16_bigendian_prefix((const stbtt_uint8*) s1, len1, (const stbtt_uint8*) s2, len2);
+ return len1 == stbtt__CompareUTF8toUTF16_bigendian_prefix((stbtt_uint8*) s1, len1, (stbtt_uint8*) s2, len2);
}
// returns results in whatever encoding you request... but note that 2-byte encodings
@@ -3157,7 +4368,7 @@ static int stbtt__matchpair(stbtt_uint8 *fc, stbtt_uint32 nm, stbtt_uint8 *name,
return 1;
} else if (matchlen < nlen && name[matchlen] == ' ') {
++matchlen;
- if (stbtt_CompareUTF8toUTF16_bigendian((char*) (name+matchlen), nlen-matchlen, (char*)(fc+stringOffset+off),slen))
+ if (stbtt_CompareUTF8toUTF16_bigendian_internal((char*) (name+matchlen), nlen-matchlen, (char*)(fc+stringOffset+off),slen))
return 1;
}
} else {
@@ -3203,7 +4414,7 @@ static int stbtt__matches(stbtt_uint8 *fc, stbtt_uint32 offset, stbtt_uint8 *nam
return 0;
}
-STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *font_collection, const char *name_utf8, stbtt_int32 flags)
+static int stbtt_FindMatchingFont_internal(unsigned char *font_collection, char *name_utf8, stbtt_int32 flags)
{
stbtt_int32 i;
for (i=0;;++i) {
@@ -3214,11 +4425,57 @@ STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *font_collection, const
}
}
+#if defined(__GNUC__) || defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-qual"
+#endif
+
+STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset,
+ float pixel_height, unsigned char *pixels, int pw, int ph,
+ int first_char, int num_chars, stbtt_bakedchar *chardata)
+{
+ return stbtt_BakeFontBitmap_internal((unsigned char *) data, offset, pixel_height, pixels, pw, ph, first_char, num_chars, chardata);
+}
+
+STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *data, int index)
+{
+ return stbtt_GetFontOffsetForIndex_internal((unsigned char *) data, index);
+}
+
+STBTT_DEF int stbtt_GetNumberOfFonts(const unsigned char *data)
+{
+ return stbtt_GetNumberOfFonts_internal((unsigned char *) data);
+}
+
+STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data, int offset)
+{
+ return stbtt_InitFont_internal(info, (unsigned char *) data, offset);
+}
+
+STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *fontdata, const char *name, int flags)
+{
+ return stbtt_FindMatchingFont_internal((unsigned char *) fontdata, (char *) name, flags);
+}
+
+STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len1, const char *s2, int len2)
+{
+ return stbtt_CompareUTF8toUTF16_bigendian_internal((char *) s1, len1, (char *) s2, len2);
+}
+
+#if defined(__GNUC__) || defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
+
#endif // STB_TRUETYPE_IMPLEMENTATION
// FULL VERSION HISTORY
//
+// 1.16 (2017-07-12) SDF support
+// 1.15 (2017-03-03) make more arguments const
+// 1.14 (2017-01-16) num-fonts-in-TTC function
+// 1.13 (2017-01-02) support OpenType fonts, certain Apple fonts
+// 1.12 (2016-10-25) suppress warnings about casting away const with -Wcast-qual
// 1.11 (2016-04-02) fix unused-variable warning
// 1.10 (2016-04-02) allow user-defined fabs() replacement
// fix memory leak if fontsize=0.0
@@ -3265,3 +4522,45 @@ STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *font_collection, const
// 0.2 (2009-03-11) Fix unsigned/signed char warnings
// 0.1 (2009-03-09) First public release
//
+
+/*
+------------------------------------------------------------------------------
+This software is available under 2 licenses -- choose whichever you prefer.
+------------------------------------------------------------------------------
+ALTERNATIVE A - MIT License
+Copyright (c) 2017 Sean Barrett
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+------------------------------------------------------------------------------
+ALTERNATIVE B - Public Domain (www.unlicense.org)
+This is free and unencumbered software released into the public domain.
+Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
+software, either in source code form or as a compiled binary, for any purpose,
+commercial or non-commercial, and by any means.
+In jurisdictions that recognize copyright laws, the author or authors of this
+software dedicate any and all copyright interest in the software to the public
+domain. We make this dedication for the benefit of the public at large and to
+the detriment of our heirs and successors. We intend this dedication to be an
+overt act of relinquishment in perpetuity of all present and future rights to
+this software under copyright law.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+------------------------------------------------------------------------------
+*/
diff --git a/thirdparty/misc/stb_vorbis.c b/thirdparty/misc/stb_vorbis.c
index c4f24d5898..14cebbf87e 100644
--- a/thirdparty/misc/stb_vorbis.c
+++ b/thirdparty/misc/stb_vorbis.c
@@ -1,4 +1,4 @@
-// Ogg Vorbis audio decoder - v1.09 - public domain
+// Ogg Vorbis audio decoder - v1.11 - public domain
// http://nothings.org/stb_vorbis/
//
// Original version written by Sean Barrett in 2007.
@@ -9,12 +9,7 @@
//
// LICENSE
//
-// This software is dual-licensed to the public domain and under the following
-// license: you are granted a perpetual, irrevocable license to copy, modify,
-// publish, and distribute this file as you see fit.
-//
-// No warranty for any purpose is expressed or implied by the author (nor
-// by RAD Game Tools). Report bugs and send enhancements to the author.
+// See end of file for license information.
//
// Limitations:
//
@@ -34,9 +29,11 @@
// Bernhard Wodo Evan Balster alxprd@github
// Tom Beaumont Ingo Leitgeb Nicolas Guillemot
// Phillip Bennefall Rohit Thiago Goulart
-// manxorist@github saga musix
+// manxorist@github saga musix github:infatum
//
// Partial history:
+// 1.11 - 2017/07/23 - fix MinGW compilation
+// 1.10 - 2017/03/03 - more robust seeking; fix negative ilog(); clear error in open_memory
// 1.09 - 2016/04/04 - back out 'truncation of last frame' fix from previous version
// 1.08 - 2016/04/02 - warnings; setup memory leaks; truncation of last frame
// 1.07 - 2015/01/16 - fixes for crashes on invalid files; warning fixes; const
@@ -275,7 +272,7 @@ extern int stb_vorbis_seek(stb_vorbis *f, unsigned int sample_number);
// do not need to seek to EXACTLY the target sample when using get_samples_*,
// you can also use seek_frame().
-extern void stb_vorbis_seek_start(stb_vorbis *f);
+extern int stb_vorbis_seek_start(stb_vorbis *f);
// this function is equivalent to stb_vorbis_seek(f,0)
extern unsigned int stb_vorbis_stream_length_in_samples(stb_vorbis *f);
@@ -555,7 +552,7 @@ enum STBVorbisError
#include <math.h>
// find definition of alloca if it's not in stdlib.h:
- #ifdef _MSC_VER
+ #if defined(_MSC_VER) || defined(__MINGW32__)
#include <malloc.h>
#endif
#if defined(__linux__) || defined(__linux) || defined(__EMSCRIPTEN__)
@@ -580,6 +577,7 @@ enum STBVorbisError
#undef __forceinline
#endif
#define __forceinline
+ #define alloca __builtin_alloca
#elif !defined(_MSC_VER)
#if __GNUC__
#define __forceinline inline
@@ -986,17 +984,18 @@ static int ilog(int32 n)
{
static signed char log2_4[16] = { 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4 };
+ if (n < 0) return 0; // signed n returns 0
+
// 2 compares if n < 16, 3 compares otherwise (4 if signed or n > 1<<29)
if (n < (1 << 14))
- if (n < (1 << 4)) return 0 + log2_4[n ];
- else if (n < (1 << 9)) return 5 + log2_4[n >> 5];
+ if (n < (1 << 4)) return 0 + log2_4[n ];
+ else if (n < (1 << 9)) return 5 + log2_4[n >> 5];
else return 10 + log2_4[n >> 10];
else if (n < (1 << 24))
- if (n < (1 << 19)) return 15 + log2_4[n >> 15];
+ if (n < (1 << 19)) return 15 + log2_4[n >> 15];
else return 20 + log2_4[n >> 20];
- else if (n < (1 << 29)) return 25 + log2_4[n >> 25];
- else if (n < (1 << 31)) return 30 + log2_4[n >> 30];
- else return 0; // signed n returns 0
+ else if (n < (1 << 29)) return 25 + log2_4[n >> 25];
+ else return 30 + log2_4[n >> 30];
}
#ifndef M_PI
@@ -1269,13 +1268,13 @@ static void neighbors(uint16 *x, int n, int *plow, int *phigh)
// this has been repurposed so y is now the original index instead of y
typedef struct
{
- uint16 x,y;
-} Point;
+ uint16 x,id;
+} stbv__floor_ordering;
static int STBV_CDECL point_compare(const void *p, const void *q)
{
- Point *a = (Point *) p;
- Point *b = (Point *) q;
+ stbv__floor_ordering *a = (stbv__floor_ordering *) p;
+ stbv__floor_ordering *b = (stbv__floor_ordering *) q;
return a->x < b->x ? -1 : a->x > b->x;
}
@@ -3484,11 +3483,13 @@ static int vorbis_finish_frame(stb_vorbis *f, int len, int left, int right)
return right - left;
}
-static void vorbis_pump_first_frame(stb_vorbis *f)
+static int vorbis_pump_first_frame(stb_vorbis *f)
{
- int len, right, left;
- if (vorbis_decode_packet(f, &len, &left, &right))
+ int len, right, left, res;
+ res = vorbis_decode_packet(f, &len, &left, &right);
+ if (res)
vorbis_finish_frame(f, len, left, right);
+ return res;
}
#ifndef STB_VORBIS_NO_PUSHDATA_API
@@ -3871,7 +3872,7 @@ static int start_decoder(vorb *f)
g->book_list[j] = get_bits(f,8);
return error(f, VORBIS_feature_not_supported);
} else {
- Point p[31*8+2];
+ stbv__floor_ordering p[31*8+2];
Floor1 *g = &f->floor_config[i].floor1;
int max_class = -1;
g->partitions = get_bits(f, 5);
@@ -3907,11 +3908,11 @@ static int start_decoder(vorb *f)
// precompute the sorting
for (j=0; j < g->values; ++j) {
p[j].x = g->Xlist[j];
- p[j].y = j;
+ p[j].id = j;
}
qsort(p, g->values, sizeof(p[0]), point_compare);
for (j=0; j < g->values; ++j)
- g->sorted_order[j] = (uint8) p[j].y;
+ g->sorted_order[j] = (uint8) p[j].id;
// precompute the neighbors
for (j=2; j < g->values; ++j) {
int low,hi;
@@ -4615,8 +4616,9 @@ static int seek_to_sample_coarse(stb_vorbis *f, uint32 sample_number)
// starting from the start is handled differently
if (sample_number <= left.last_decoded_sample) {
- stb_vorbis_seek_start(f);
- return 1;
+ if (stb_vorbis_seek_start(f))
+ return 1;
+ return 0;
}
while (left.page_end != right.page_start) {
@@ -4717,7 +4719,10 @@ static int seek_to_sample_coarse(stb_vorbis *f, uint32 sample_number)
skip(f, f->segments[i]);
// start decoding (optimizable - this frame is generally discarded)
- vorbis_pump_first_frame(f);
+ if (!vorbis_pump_first_frame(f))
+ return 0;
+ if (f->current_loc > sample_number)
+ return error(f, VORBIS_seek_failed);
return 1;
error:
@@ -4808,14 +4813,14 @@ int stb_vorbis_seek(stb_vorbis *f, unsigned int sample_number)
return 1;
}
-void stb_vorbis_seek_start(stb_vorbis *f)
+int stb_vorbis_seek_start(stb_vorbis *f)
{
- if (IS_PUSH_MODE(f)) { error(f, VORBIS_invalid_api_mixing); return; }
+ if (IS_PUSH_MODE(f)) { return error(f, VORBIS_invalid_api_mixing); }
set_file_offset(f, f->first_audio_page_offset);
f->previous_length = 0;
f->first_decode = TRUE;
f->next_seg = -1;
- vorbis_pump_first_frame(f);
+ return vorbis_pump_first_frame(f);
}
unsigned int stb_vorbis_stream_length_in_samples(stb_vorbis *f)
@@ -4980,6 +4985,7 @@ stb_vorbis * stb_vorbis_open_memory(const unsigned char *data, int len, int *err
if (f) {
*f = p;
vorbis_pump_first_frame(f);
+ if (error) *error = VORBIS__no_error;
return f;
}
}
@@ -5345,6 +5351,7 @@ int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buffer, in
#endif // STB_VORBIS_NO_PULLDATA_API
/* Version history
+ 1.10 - 2017/03/03 - more robust seeking; fix negative ilog(); clear error in open_memory
1.09 - 2016/04/04 - back out 'avoid discarding last frame' fix from previous version
1.08 - 2016/04/02 - fixed multiple warnings; fix setup memory leaks;
avoid discarding last frame of audio data
@@ -5397,3 +5404,46 @@ int stb_vorbis_get_samples_float(stb_vorbis *f, int channels, float **buffer, in
*/
#endif // STB_VORBIS_HEADER_ONLY
+
+
+/*
+------------------------------------------------------------------------------
+This software is available under 2 licenses -- choose whichever you prefer.
+------------------------------------------------------------------------------
+ALTERNATIVE A - MIT License
+Copyright (c) 2017 Sean Barrett
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+------------------------------------------------------------------------------
+ALTERNATIVE B - Public Domain (www.unlicense.org)
+This is free and unencumbered software released into the public domain.
+Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
+software, either in source code form or as a compiled binary, for any purpose,
+commercial or non-commercial, and by any means.
+In jurisdictions that recognize copyright laws, the author or authors of this
+software dedicate any and all copyright interest in the software to the public
+domain. We make this dedication for the benefit of the public at large and to
+the detriment of our heirs and successors. We intend this dedication to be an
+overt act of relinquishment in perpetuity of all present and future rights to
+this software under copyright law.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+------------------------------------------------------------------------------
+*/
diff --git a/thirdparty/nanosvg/README.md b/thirdparty/nanosvg/README.md
deleted file mode 100644
index 919a1ec5e8..0000000000
--- a/thirdparty/nanosvg/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-See:
-https://github.com/memononen/nanosvg
diff --git a/thirdparty/nanosvg/src/nanosvg.cc b/thirdparty/nanosvg/nanosvg.cc
index 3e8e86c792..3e8e86c792 100644
--- a/thirdparty/nanosvg/src/nanosvg.cc
+++ b/thirdparty/nanosvg/nanosvg.cc
diff --git a/thirdparty/nanosvg/src/nanosvg.h b/thirdparty/nanosvg/nanosvg.h
index 2321c56fd2..2321c56fd2 100644
--- a/thirdparty/nanosvg/src/nanosvg.h
+++ b/thirdparty/nanosvg/nanosvg.h
diff --git a/thirdparty/nanosvg/src/nanosvgrast.h b/thirdparty/nanosvg/nanosvgrast.h
index 2940c1f916..2940c1f916 100644
--- a/thirdparty/nanosvg/src/nanosvgrast.h
+++ b/thirdparty/nanosvg/nanosvgrast.h
diff --git a/thirdparty/pcre2/AUTHORS b/thirdparty/pcre2/AUTHORS
new file mode 100644
index 0000000000..e056ad6868
--- /dev/null
+++ b/thirdparty/pcre2/AUTHORS
@@ -0,0 +1,36 @@
+THE MAIN PCRE2 LIBRARY CODE
+---------------------------
+
+Written by: Philip Hazel
+Email local part: ph10
+Email domain: cam.ac.uk
+
+University of Cambridge Computing Service,
+Cambridge, England.
+
+Copyright (c) 1997-2017 University of Cambridge
+All rights reserved
+
+
+PCRE2 JUST-IN-TIME COMPILATION SUPPORT
+--------------------------------------
+
+Written by: Zoltan Herczeg
+Email local part: hzmester
+Emain domain: freemail.hu
+
+Copyright(c) 2010-2017 Zoltan Herczeg
+All rights reserved.
+
+
+STACK-LESS JUST-IN-TIME COMPILER
+--------------------------------
+
+Written by: Zoltan Herczeg
+Email local part: hzmester
+Emain domain: freemail.hu
+
+Copyright(c) 2009-2017 Zoltan Herczeg
+All rights reserved.
+
+####
diff --git a/thirdparty/pcre2/LICENCE b/thirdparty/pcre2/LICENCE
new file mode 100644
index 0000000000..402fe2435c
--- /dev/null
+++ b/thirdparty/pcre2/LICENCE
@@ -0,0 +1,83 @@
+PCRE2 LICENCE
+-------------
+
+PCRE2 is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+Release 10 of PCRE2 is distributed under the terms of the "BSD" licence, as
+specified below. The documentation for PCRE2, supplied in the "doc"
+directory, is distributed under the same terms as the software itself. The data
+in the testdata directory is not copyrighted and is in the public domain.
+
+The basic library functions are written in C and are freestanding. Also
+included in the distribution is a just-in-time compiler that can be used to
+optimize pattern matching. This is an optional feature that can be omitted when
+the library is built.
+
+
+THE BASIC LIBRARY FUNCTIONS
+---------------------------
+
+Written by: Philip Hazel
+Email local part: ph10
+Email domain: cam.ac.uk
+
+University of Cambridge Computing Service,
+Cambridge, England.
+
+Copyright (c) 1997-2017 University of Cambridge
+All rights reserved.
+
+
+PCRE2 JUST-IN-TIME COMPILATION SUPPORT
+--------------------------------------
+
+Written by: Zoltan Herczeg
+Email local part: hzmester
+Emain domain: freemail.hu
+
+Copyright(c) 2010-2017 Zoltan Herczeg
+All rights reserved.
+
+
+STACK-LESS JUST-IN-TIME COMPILER
+--------------------------------
+
+Written by: Zoltan Herczeg
+Email local part: hzmester
+Emain domain: freemail.hu
+
+Copyright(c) 2009-2017 Zoltan Herczeg
+All rights reserved.
+
+
+THE "BSD" LICENCE
+-----------------
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of any
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+End
diff --git a/thirdparty/pcre2/src/config.h b/thirdparty/pcre2/src/config.h
new file mode 100644
index 0000000000..3315b7770e
--- /dev/null
+++ b/thirdparty/pcre2/src/config.h
@@ -0,0 +1,359 @@
+/* src/config.h. Generated from config.h.in by configure. */
+/* src/config.h.in. Generated from configure.ac by autoheader. */
+
+/* PCRE2 is written in Standard C, but there are a few non-standard things it
+can cope with, allowing it to run on SunOS4 and other "close to standard"
+systems.
+
+In environments that support the GNU autotools, config.h.in is converted into
+config.h by the "configure" script. In environments that use CMake,
+config-cmake.in is converted into config.h. If you are going to build PCRE2 "by
+hand" without using "configure" or CMake, you should copy the distributed
+config.h.generic to config.h, and edit the macro definitions to be the way you
+need them. You must then add -DHAVE_CONFIG_H to all of your compile commands,
+so that config.h is included at the start of every source.
+
+Alternatively, you can avoid editing by using -D on the compiler command line
+to set the macro values. In this case, you do not have to set -DHAVE_CONFIG_H,
+but if you do, default values will be taken from config.h for non-boolean
+macros that are not defined on the command line.
+
+Boolean macros such as HAVE_STDLIB_H and SUPPORT_PCRE2_8 should either be defined
+(conventionally to 1) for TRUE, and not defined at all for FALSE. All such
+macros are listed as a commented #undef in config.h.generic. Macros such as
+MATCH_LIMIT, whose actual value is relevant, have defaults defined, but are
+surrounded by #ifndef/#endif lines so that the value can be overridden by -D.
+
+PCRE2 uses memmove() if HAVE_MEMMOVE is defined; otherwise it uses bcopy() if
+HAVE_BCOPY is defined. If your system has neither bcopy() nor memmove(), make
+sure both macros are undefined; an emulation function will then be used. */
+
+/* By default, the \R escape sequence matches any Unicode line ending
+ character or sequence of characters. If BSR_ANYCRLF is defined (to any
+ value), this is changed so that backslash-R matches only CR, LF, or CRLF.
+ The build-time default can be overridden by the user of PCRE2 at runtime.
+ */
+/* #undef BSR_ANYCRLF */
+
+/* If you are compiling for a system that uses EBCDIC instead of ASCII
+ character codes, define this macro to any value. When EBCDIC is set, PCRE2
+ assumes that all input strings are in EBCDIC. If you do not define this
+ macro, PCRE2 will assume input strings are ASCII or UTF-8/16/32 Unicode. It
+ is not possible to build a version of PCRE2 that supports both EBCDIC and
+ UTF-8/16/32. */
+/* #undef EBCDIC */
+
+/* In an EBCDIC environment, define this macro to any value to arrange for the
+ NL character to be 0x25 instead of the default 0x15. NL plays the role that
+ LF does in an ASCII/Unicode environment. */
+/* #undef EBCDIC_NL25 */
+
+/* Define to 1 if you have the `bcopy' function. */
+/* #undef HAVE_BCOPY */
+
+/* Define to 1 if you have the <bzlib.h> header file. */
+/* #undef HAVE_BZLIB_H */
+
+/* Define to 1 if you have the <dirent.h> header file. */
+/* #undef HAVE_DIRENT_H */
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+/* #undef HAVE_DLFCN_H */
+
+/* Define to 1 if you have the <editline/readline.h> header file. */
+/* #undef HAVE_EDITLINE_READLINE_H */
+
+/* Define to 1 if you have the <edit/readline/readline.h> header file. */
+/* #undef HAVE_EDIT_READLINE_READLINE_H */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+/* #undef HAVE_INTTYPES_H */
+
+/* Define to 1 if you have the <limits.h> header file. */
+/* #undef HAVE_LIMITS_H */
+
+/* Define to 1 if you have the `memmove' function. */
+/* #undef HAVE_MEMMOVE */
+
+/* Define to 1 if you have the <memory.h> header file. */
+/* #undef HAVE_MEMORY_H */
+
+/* Define to 1 if you have the `mkostemp' function. */
+/* #undef HAVE_MKOSTEMP */
+
+/* Define if you have POSIX threads libraries and header files. */
+/* #undef HAVE_PTHREAD */
+
+/* Have PTHREAD_PRIO_INHERIT. */
+/* #undef HAVE_PTHREAD_PRIO_INHERIT */
+
+/* Define to 1 if you have the <readline/history.h> header file. */
+/* #undef HAVE_READLINE_HISTORY_H */
+
+/* Define to 1 if you have the <readline/readline.h> header file. */
+/* #undef HAVE_READLINE_READLINE_H */
+
+/* Define to 1 if you have the `secure_getenv' function. */
+/* #undef HAVE_SECURE_GETENV */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+/* #undef HAVE_STDINT_H */
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+/* #undef HAVE_STDLIB_H */
+
+/* Define to 1 if you have the `strerror' function. */
+/* #undef HAVE_STRERROR */
+
+/* Define to 1 if you have the <strings.h> header file. */
+/* #undef HAVE_STRINGS_H */
+
+/* Define to 1 if you have the <string.h> header file. */
+/* #undef HAVE_STRING_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+/* #undef HAVE_SYS_STAT_H */
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+/* #undef HAVE_SYS_TYPES_H */
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+/* #undef HAVE_SYS_WAIT_H */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+/* #undef HAVE_UNISTD_H */
+
+/* Define to 1 if the compiler supports simple visibility declarations. */
+/* #undef HAVE_VISIBILITY */
+
+/* Define to 1 if you have the <windows.h> header file. */
+/* #undef HAVE_WINDOWS_H */
+
+/* Define to 1 if you have the <zlib.h> header file. */
+/* #undef HAVE_ZLIB_H */
+
+/* PCRE2 uses recursive function calls to handle backtracking while matching.
+ This can sometimes be a problem on systems that have stacks of limited
+ size. Define HEAP_MATCH_RECURSE to any value to get a version that doesn't
+ use recursion in the match() function; instead it creates its own stack by
+ steam using memory from the heap. For more detail, see the comments and
+ other stuff just above the match() function. */
+/* #undef HEAP_MATCH_RECURSE */
+
+/* The value of LINK_SIZE determines the number of bytes used to store links
+ as offsets within the compiled regex. The default is 2, which allows for
+ compiled patterns up to 64K long. This covers the vast majority of cases.
+ However, PCRE2 can also be compiled to use 3 or 4 bytes instead. This
+ allows for longer patterns in extreme cases. */
+#ifndef LINK_SIZE
+#define LINK_SIZE 2
+#endif
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+/* This is ignored unless you are using libtool. */
+#ifndef LT_OBJDIR
+#define LT_OBJDIR ".libs/"
+#endif
+
+/* The value of MATCH_LIMIT determines the default number of times the
+ internal match() function can be called during a single execution of
+ pcre2_match(). There is a runtime interface for setting a different limit.
+ The limit exists in order to catch runaway regular expressions that take
+ for ever to determine that they do not match. The default is set very large
+ so that it does not accidentally catch legitimate cases. */
+#ifndef MATCH_LIMIT
+#define MATCH_LIMIT 10000000
+#endif
+
+/* The above limit applies to all calls of match(), whether or not they
+ increase the recursion depth. In some environments it is desirable to limit
+ the depth of recursive calls of match() more strictly, in order to restrict
+ the maximum amount of stack (or heap, if HEAP_MATCH_RECURSE is defined)
+ that is used. The value of MATCH_LIMIT_RECURSION applies only to recursive
+ calls of match(). To have any useful effect, it must be less than the value
+ of MATCH_LIMIT. The default is to use the same value as MATCH_LIMIT. There
+ is a runtime method for setting a different limit. */
+#ifndef MATCH_LIMIT_RECURSION
+#define MATCH_LIMIT_RECURSION MATCH_LIMIT
+#endif
+
+/* This limit is parameterized just in case anybody ever wants to change it.
+ Care must be taken if it is increased, because it guards against integer
+ overflow caused by enormously large patterns. */
+#ifndef MAX_NAME_COUNT
+#define MAX_NAME_COUNT 10000
+#endif
+
+/* This limit is parameterized just in case anybody ever wants to change it.
+ Care must be taken if it is increased, because it guards against integer
+ overflow caused by enormously large patterns. */
+#ifndef MAX_NAME_SIZE
+#define MAX_NAME_SIZE 32
+#endif
+
+/* Defining NEVER_BACKSLASH_C locks out the use of \C in all patterns. */
+/* #undef NEVER_BACKSLASH_C */
+
+/* The value of NEWLINE_DEFAULT determines the default newline character
+ sequence. PCRE2 client programs can override this by selecting other values
+ at run time. The valid values are 1 (CR), 2 (LF), 3 (CRLF), 4 (ANY), and 5
+ (ANYCRLF). */
+#ifndef NEWLINE_DEFAULT
+#define NEWLINE_DEFAULT 2
+#endif
+
+/* Name of package */
+#define PACKAGE "pcre2"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "PCRE2"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "PCRE2 10.23"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "pcre2"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "10.23"
+
+/* The value of PARENS_NEST_LIMIT specifies the maximum depth of nested
+ parentheses (of any kind) in a pattern. This limits the amount of system
+ stack that is used while compiling a pattern. */
+#ifndef PARENS_NEST_LIMIT
+#define PARENS_NEST_LIMIT 250
+#endif
+
+/* The value of PCRE2GREP_BUFSIZE is the starting size of the buffer used by
+ pcre2grep to hold parts of the file it is searching. The buffer will be
+ expanded up to PCRE2GREP_MAX_BUFSIZE if necessary, for files containing
+ very long lines. The actual amount of memory used by pcre2grep is three
+ times this number, because it allows for the buffering of "before" and
+ "after" lines. */
+#ifndef PCRE2GREP_BUFSIZE
+#define PCRE2GREP_BUFSIZE 20480
+#endif
+
+/* The value of PCRE2GREP_MAX_BUFSIZE specifies the maximum size of the buffer
+ used by pcre2grep to hold parts of the file it is searching. The actual
+ amount of memory used by pcre2grep is three times this number, because it
+ allows for the buffering of "before" and "after" lines. */
+#ifndef PCRE2GREP_MAX_BUFSIZE
+#define PCRE2GREP_MAX_BUFSIZE 1048576
+#endif
+
+/* Define to any value to include debugging code. */
+/* #undef PCRE2_DEBUG */
+
+/* If you are compiling for a system other than a Unix-like system or
+ Win32, and it needs some magic to be inserted before the definition
+ of a function that is exported by the library, define this macro to
+ contain the relevant magic. If you do not define this macro, a suitable
+ __declspec value is used for Windows systems; in other environments
+ "extern" is used for a C compiler and "extern C" for a C++ compiler.
+ This macro apears at the start of every exported function that is part
+ of the external API. It does not appear on functions that are "external"
+ in the C sense, but which are internal to the library. */
+/* #undef PCRE2_EXP_DEFN */
+
+/* Define to any value if linking statically (TODO: make nice with Libtool) */
+/* #undef PCRE2_STATIC */
+
+/* Define to necessary symbol if this constant uses a non-standard name on
+ your system. */
+/* #undef PTHREAD_CREATE_JOINABLE */
+
+/* Define to 1 if you have the ANSI C header files. */
+/* #undef STDC_HEADERS */
+
+/* Define to any value to enable support for Just-In-Time compiling. */
+/* #undef SUPPORT_JIT */
+
+/* Define to any value to allow pcre2grep to be linked with libbz2, so that it
+ is able to handle .bz2 files. */
+/* #undef SUPPORT_LIBBZ2 */
+
+/* Define to any value to allow pcre2test to be linked with libedit. */
+/* #undef SUPPORT_LIBEDIT */
+
+/* Define to any value to allow pcre2test to be linked with libreadline. */
+/* #undef SUPPORT_LIBREADLINE */
+
+/* Define to any value to allow pcre2grep to be linked with libz, so that it
+ is able to handle .gz files. */
+/* #undef SUPPORT_LIBZ */
+
+/* Define to any value to enable callout script support in pcre2grep. */
+/* #undef SUPPORT_PCRE2GREP_CALLOUT */
+
+/* Define to any value to enable JIT support in pcre2grep. Note that this will
+ have no effect unless SUPPORT_JIT is also defined. */
+/* #undef SUPPORT_PCRE2GREP_JIT */
+
+/* Define to any value to enable the 16 bit PCRE2 library. */
+/* #undef SUPPORT_PCRE2_16 */
+
+/* Define to any value to enable the 32 bit PCRE2 library. */
+/* #undef SUPPORT_PCRE2_32 */
+
+/* Define to any value to enable the 8 bit PCRE2 library. */
+/* #undef SUPPORT_PCRE2_8 */
+
+/* Define to any value to enable support for Unicode and UTF encoding. This
+ will work even in an EBCDIC environment, but it is incompatible with the
+ EBCDIC macro. That is, PCRE2 can support *either* EBCDIC code *or*
+ ASCII/Unicode, but not both at once. */
+/* #undef SUPPORT_UNICODE */
+
+/* Define to any value for valgrind support to find invalid memory reads. */
+/* #undef SUPPORT_VALGRIND */
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# define _ALL_SOURCE 1
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS 1
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# define _TANDEM_SOURCE 1
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# define __EXTENSIONS__ 1
+#endif
+
+/* Version number of package */
+#define VERSION "10.23"
+
+/* Define to 1 if on MINIX. */
+/* #undef _MINIX */
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+/* #undef _POSIX_1_SOURCE */
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+/* #undef _POSIX_SOURCE */
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to the type of a signed integer type of width exactly 64 bits if
+ such a type exists and the standard includes do not define it. */
+/* #undef int64_t */
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
diff --git a/thirdparty/pcre2/src/pcre2.h b/thirdparty/pcre2/src/pcre2.h
new file mode 100644
index 0000000000..86503208e8
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2.h
@@ -0,0 +1,771 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* This is the public header file for the PCRE library, second API, to be
+#included by applications that call PCRE2 functions.
+
+ Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+#ifndef PCRE2_H_IDEMPOTENT_GUARD
+#define PCRE2_H_IDEMPOTENT_GUARD
+
+/* The current PCRE version information. */
+
+#define PCRE2_MAJOR 10
+#define PCRE2_MINOR 23
+#define PCRE2_PRERELEASE
+#define PCRE2_DATE 2017-02-14
+
+/* When an application links to a PCRE DLL in Windows, the symbols that are
+imported have to be identified as such. When building PCRE2, the appropriate
+export setting is defined in pcre2_internal.h, which includes this file. So we
+don't change existing definitions of PCRE2_EXP_DECL. */
+
+#if defined(_WIN32) && !defined(PCRE2_STATIC)
+# ifndef PCRE2_EXP_DECL
+# define PCRE2_EXP_DECL extern __declspec(dllimport)
+# endif
+#endif
+
+/* By default, we use the standard "extern" declarations. */
+
+#ifndef PCRE2_EXP_DECL
+# ifdef __cplusplus
+# define PCRE2_EXP_DECL extern "C"
+# else
+# define PCRE2_EXP_DECL extern
+# endif
+#endif
+
+/* When compiling with the MSVC compiler, it is sometimes necessary to include
+a "calling convention" before exported function names. (This is secondhand
+information; I know nothing about MSVC myself). For example, something like
+
+ void __cdecl function(....)
+
+might be needed. In order so make this easy, all the exported functions have
+PCRE2_CALL_CONVENTION just before their names. It is rarely needed; if not
+set, we ensure here that it has no effect. */
+
+#ifndef PCRE2_CALL_CONVENTION
+#define PCRE2_CALL_CONVENTION
+#endif
+
+/* Have to include limits.h, stdlib.h and stdint.h to ensure that size_t and
+uint8_t, UCHAR_MAX, etc are defined. */
+
+#include <limits.h>
+#include <stdlib.h>
+#include <stdint.h>
+
+/* Allow for C++ users compiling this directly. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* The following option bits can be passed to pcre2_compile(), pcre2_match(),
+or pcre2_dfa_match(). PCRE2_NO_UTF_CHECK affects only the function to which it
+is passed. Put these bits at the most significant end of the options word so
+others can be added next to them */
+
+#define PCRE2_ANCHORED 0x80000000u
+#define PCRE2_NO_UTF_CHECK 0x40000000u
+
+/* The following option bits can be passed only to pcre2_compile(). However,
+they may affect compilation, JIT compilation, and/or interpretive execution.
+The following tags indicate which:
+
+C alters what is compiled by pcre2_compile()
+J alters what is compiled by pcre2_jit_compile()
+M is inspected during pcre2_match() execution
+D is inspected during pcre2_dfa_match() execution
+*/
+
+#define PCRE2_ALLOW_EMPTY_CLASS 0x00000001u /* C */
+#define PCRE2_ALT_BSUX 0x00000002u /* C */
+#define PCRE2_AUTO_CALLOUT 0x00000004u /* C */
+#define PCRE2_CASELESS 0x00000008u /* C */
+#define PCRE2_DOLLAR_ENDONLY 0x00000010u /* J M D */
+#define PCRE2_DOTALL 0x00000020u /* C */
+#define PCRE2_DUPNAMES 0x00000040u /* C */
+#define PCRE2_EXTENDED 0x00000080u /* C */
+#define PCRE2_FIRSTLINE 0x00000100u /* J M D */
+#define PCRE2_MATCH_UNSET_BACKREF 0x00000200u /* C J M */
+#define PCRE2_MULTILINE 0x00000400u /* C */
+#define PCRE2_NEVER_UCP 0x00000800u /* C */
+#define PCRE2_NEVER_UTF 0x00001000u /* C */
+#define PCRE2_NO_AUTO_CAPTURE 0x00002000u /* C */
+#define PCRE2_NO_AUTO_POSSESS 0x00004000u /* C */
+#define PCRE2_NO_DOTSTAR_ANCHOR 0x00008000u /* C */
+#define PCRE2_NO_START_OPTIMIZE 0x00010000u /* J M D */
+#define PCRE2_UCP 0x00020000u /* C J M D */
+#define PCRE2_UNGREEDY 0x00040000u /* C */
+#define PCRE2_UTF 0x00080000u /* C J M D */
+#define PCRE2_NEVER_BACKSLASH_C 0x00100000u /* C */
+#define PCRE2_ALT_CIRCUMFLEX 0x00200000u /* J M D */
+#define PCRE2_ALT_VERBNAMES 0x00400000u /* C */
+#define PCRE2_USE_OFFSET_LIMIT 0x00800000u /* J M D */
+
+/* These are for pcre2_jit_compile(). */
+
+#define PCRE2_JIT_COMPLETE 0x00000001u /* For full matching */
+#define PCRE2_JIT_PARTIAL_SOFT 0x00000002u
+#define PCRE2_JIT_PARTIAL_HARD 0x00000004u
+
+/* These are for pcre2_match(), pcre2_dfa_match(), and pcre2_jit_match(). Note
+that PCRE2_ANCHORED and PCRE2_NO_UTF_CHECK can also be passed to these
+functions (though pcre2_jit_match() ignores the latter since it bypasses all
+sanity checks). */
+
+#define PCRE2_NOTBOL 0x00000001u
+#define PCRE2_NOTEOL 0x00000002u
+#define PCRE2_NOTEMPTY 0x00000004u /* ) These two must be kept */
+#define PCRE2_NOTEMPTY_ATSTART 0x00000008u /* ) adjacent to each other. */
+#define PCRE2_PARTIAL_SOFT 0x00000010u
+#define PCRE2_PARTIAL_HARD 0x00000020u
+
+/* These are additional options for pcre2_dfa_match(). */
+
+#define PCRE2_DFA_RESTART 0x00000040u
+#define PCRE2_DFA_SHORTEST 0x00000080u
+
+/* These are additional options for pcre2_substitute(), which passes any others
+through to pcre2_match(). */
+
+#define PCRE2_SUBSTITUTE_GLOBAL 0x00000100u
+#define PCRE2_SUBSTITUTE_EXTENDED 0x00000200u
+#define PCRE2_SUBSTITUTE_UNSET_EMPTY 0x00000400u
+#define PCRE2_SUBSTITUTE_UNKNOWN_UNSET 0x00000800u
+#define PCRE2_SUBSTITUTE_OVERFLOW_LENGTH 0x00001000u
+
+/* A further option for pcre2_match(), not allowed for pcre2_dfa_match(),
+ignored for pcre2_jit_match(). */
+
+#define PCRE2_NO_JIT 0x00002000u
+
+/* Newline and \R settings, for use in compile contexts. The newline values
+must be kept in step with values set in config.h and both sets must all be
+greater than zero. */
+
+#define PCRE2_NEWLINE_CR 1
+#define PCRE2_NEWLINE_LF 2
+#define PCRE2_NEWLINE_CRLF 3
+#define PCRE2_NEWLINE_ANY 4
+#define PCRE2_NEWLINE_ANYCRLF 5
+
+#define PCRE2_BSR_UNICODE 1
+#define PCRE2_BSR_ANYCRLF 2
+
+/* Error codes: no match and partial match are "expected" errors. */
+
+#define PCRE2_ERROR_NOMATCH (-1)
+#define PCRE2_ERROR_PARTIAL (-2)
+
+/* Error codes for UTF-8 validity checks */
+
+#define PCRE2_ERROR_UTF8_ERR1 (-3)
+#define PCRE2_ERROR_UTF8_ERR2 (-4)
+#define PCRE2_ERROR_UTF8_ERR3 (-5)
+#define PCRE2_ERROR_UTF8_ERR4 (-6)
+#define PCRE2_ERROR_UTF8_ERR5 (-7)
+#define PCRE2_ERROR_UTF8_ERR6 (-8)
+#define PCRE2_ERROR_UTF8_ERR7 (-9)
+#define PCRE2_ERROR_UTF8_ERR8 (-10)
+#define PCRE2_ERROR_UTF8_ERR9 (-11)
+#define PCRE2_ERROR_UTF8_ERR10 (-12)
+#define PCRE2_ERROR_UTF8_ERR11 (-13)
+#define PCRE2_ERROR_UTF8_ERR12 (-14)
+#define PCRE2_ERROR_UTF8_ERR13 (-15)
+#define PCRE2_ERROR_UTF8_ERR14 (-16)
+#define PCRE2_ERROR_UTF8_ERR15 (-17)
+#define PCRE2_ERROR_UTF8_ERR16 (-18)
+#define PCRE2_ERROR_UTF8_ERR17 (-19)
+#define PCRE2_ERROR_UTF8_ERR18 (-20)
+#define PCRE2_ERROR_UTF8_ERR19 (-21)
+#define PCRE2_ERROR_UTF8_ERR20 (-22)
+#define PCRE2_ERROR_UTF8_ERR21 (-23)
+
+/* Error codes for UTF-16 validity checks */
+
+#define PCRE2_ERROR_UTF16_ERR1 (-24)
+#define PCRE2_ERROR_UTF16_ERR2 (-25)
+#define PCRE2_ERROR_UTF16_ERR3 (-26)
+
+/* Error codes for UTF-32 validity checks */
+
+#define PCRE2_ERROR_UTF32_ERR1 (-27)
+#define PCRE2_ERROR_UTF32_ERR2 (-28)
+
+/* Error codes for pcre2[_dfa]_match(), substring extraction functions, context
+functions, and serializing functions. They are in numerical order. Originally
+they were in alphabetical order too, but now that PCRE2 is released, the
+numbers must not be changed. */
+
+#define PCRE2_ERROR_BADDATA (-29)
+#define PCRE2_ERROR_MIXEDTABLES (-30) /* Name was changed */
+#define PCRE2_ERROR_BADMAGIC (-31)
+#define PCRE2_ERROR_BADMODE (-32)
+#define PCRE2_ERROR_BADOFFSET (-33)
+#define PCRE2_ERROR_BADOPTION (-34)
+#define PCRE2_ERROR_BADREPLACEMENT (-35)
+#define PCRE2_ERROR_BADUTFOFFSET (-36)
+#define PCRE2_ERROR_CALLOUT (-37) /* Never used by PCRE2 itself */
+#define PCRE2_ERROR_DFA_BADRESTART (-38)
+#define PCRE2_ERROR_DFA_RECURSE (-39)
+#define PCRE2_ERROR_DFA_UCOND (-40)
+#define PCRE2_ERROR_DFA_UFUNC (-41)
+#define PCRE2_ERROR_DFA_UITEM (-42)
+#define PCRE2_ERROR_DFA_WSSIZE (-43)
+#define PCRE2_ERROR_INTERNAL (-44)
+#define PCRE2_ERROR_JIT_BADOPTION (-45)
+#define PCRE2_ERROR_JIT_STACKLIMIT (-46)
+#define PCRE2_ERROR_MATCHLIMIT (-47)
+#define PCRE2_ERROR_NOMEMORY (-48)
+#define PCRE2_ERROR_NOSUBSTRING (-49)
+#define PCRE2_ERROR_NOUNIQUESUBSTRING (-50)
+#define PCRE2_ERROR_NULL (-51)
+#define PCRE2_ERROR_RECURSELOOP (-52)
+#define PCRE2_ERROR_RECURSIONLIMIT (-53)
+#define PCRE2_ERROR_UNAVAILABLE (-54)
+#define PCRE2_ERROR_UNSET (-55)
+#define PCRE2_ERROR_BADOFFSETLIMIT (-56)
+#define PCRE2_ERROR_BADREPESCAPE (-57)
+#define PCRE2_ERROR_REPMISSINGBRACE (-58)
+#define PCRE2_ERROR_BADSUBSTITUTION (-59)
+#define PCRE2_ERROR_BADSUBSPATTERN (-60)
+#define PCRE2_ERROR_TOOMANYREPLACE (-61)
+#define PCRE2_ERROR_BADSERIALIZEDDATA (-62)
+
+/* Request types for pcre2_pattern_info() */
+
+#define PCRE2_INFO_ALLOPTIONS 0
+#define PCRE2_INFO_ARGOPTIONS 1
+#define PCRE2_INFO_BACKREFMAX 2
+#define PCRE2_INFO_BSR 3
+#define PCRE2_INFO_CAPTURECOUNT 4
+#define PCRE2_INFO_FIRSTCODEUNIT 5
+#define PCRE2_INFO_FIRSTCODETYPE 6
+#define PCRE2_INFO_FIRSTBITMAP 7
+#define PCRE2_INFO_HASCRORLF 8
+#define PCRE2_INFO_JCHANGED 9
+#define PCRE2_INFO_JITSIZE 10
+#define PCRE2_INFO_LASTCODEUNIT 11
+#define PCRE2_INFO_LASTCODETYPE 12
+#define PCRE2_INFO_MATCHEMPTY 13
+#define PCRE2_INFO_MATCHLIMIT 14
+#define PCRE2_INFO_MAXLOOKBEHIND 15
+#define PCRE2_INFO_MINLENGTH 16
+#define PCRE2_INFO_NAMECOUNT 17
+#define PCRE2_INFO_NAMEENTRYSIZE 18
+#define PCRE2_INFO_NAMETABLE 19
+#define PCRE2_INFO_NEWLINE 20
+#define PCRE2_INFO_RECURSIONLIMIT 21
+#define PCRE2_INFO_SIZE 22
+#define PCRE2_INFO_HASBACKSLASHC 23
+
+/* Request types for pcre2_config(). */
+
+#define PCRE2_CONFIG_BSR 0
+#define PCRE2_CONFIG_JIT 1
+#define PCRE2_CONFIG_JITTARGET 2
+#define PCRE2_CONFIG_LINKSIZE 3
+#define PCRE2_CONFIG_MATCHLIMIT 4
+#define PCRE2_CONFIG_NEWLINE 5
+#define PCRE2_CONFIG_PARENSLIMIT 6
+#define PCRE2_CONFIG_RECURSIONLIMIT 7
+#define PCRE2_CONFIG_STACKRECURSE 8
+#define PCRE2_CONFIG_UNICODE 9
+#define PCRE2_CONFIG_UNICODE_VERSION 10
+#define PCRE2_CONFIG_VERSION 11
+
+/* Types for code units in patterns and subject strings. */
+
+typedef uint8_t PCRE2_UCHAR8;
+typedef uint16_t PCRE2_UCHAR16;
+typedef uint32_t PCRE2_UCHAR32;
+
+typedef const PCRE2_UCHAR8 *PCRE2_SPTR8;
+typedef const PCRE2_UCHAR16 *PCRE2_SPTR16;
+typedef const PCRE2_UCHAR32 *PCRE2_SPTR32;
+
+/* The PCRE2_SIZE type is used for all string lengths and offsets in PCRE2,
+including pattern offsets for errors and subject offsets after a match. We
+define special values to indicate zero-terminated strings and unset offsets in
+the offset vector (ovector). */
+
+#define PCRE2_SIZE size_t
+#define PCRE2_SIZE_MAX SIZE_MAX
+#define PCRE2_ZERO_TERMINATED (~(PCRE2_SIZE)0)
+#define PCRE2_UNSET (~(PCRE2_SIZE)0)
+
+/* Generic types for opaque structures and JIT callback functions. These
+declarations are defined in a macro that is expanded for each width later. */
+
+#define PCRE2_TYPES_LIST \
+struct pcre2_real_general_context; \
+typedef struct pcre2_real_general_context pcre2_general_context; \
+\
+struct pcre2_real_compile_context; \
+typedef struct pcre2_real_compile_context pcre2_compile_context; \
+\
+struct pcre2_real_match_context; \
+typedef struct pcre2_real_match_context pcre2_match_context; \
+\
+struct pcre2_real_code; \
+typedef struct pcre2_real_code pcre2_code; \
+\
+struct pcre2_real_match_data; \
+typedef struct pcre2_real_match_data pcre2_match_data; \
+\
+struct pcre2_real_jit_stack; \
+typedef struct pcre2_real_jit_stack pcre2_jit_stack; \
+\
+typedef pcre2_jit_stack *(*pcre2_jit_callback)(void *);
+
+
+/* The structure for passing out data via the pcre_callout_function. We use a
+structure so that new fields can be added on the end in future versions,
+without changing the API of the function, thereby allowing old clients to work
+without modification. Define the generic version in a macro; the width-specific
+versions are generated from this macro below. */
+
+#define PCRE2_STRUCTURE_LIST \
+typedef struct pcre2_callout_block { \
+ uint32_t version; /* Identifies version of block */ \
+ /* ------------------------ Version 0 ------------------------------- */ \
+ uint32_t callout_number; /* Number compiled into pattern */ \
+ uint32_t capture_top; /* Max current capture */ \
+ uint32_t capture_last; /* Most recently closed capture */ \
+ PCRE2_SIZE *offset_vector; /* The offset vector */ \
+ PCRE2_SPTR mark; /* Pointer to current mark or NULL */ \
+ PCRE2_SPTR subject; /* The subject being matched */ \
+ PCRE2_SIZE subject_length; /* The length of the subject */ \
+ PCRE2_SIZE start_match; /* Offset to start of this match attempt */ \
+ PCRE2_SIZE current_position; /* Where we currently are in the subject */ \
+ PCRE2_SIZE pattern_position; /* Offset to next item in the pattern */ \
+ PCRE2_SIZE next_item_length; /* Length of next item in the pattern */ \
+ /* ------------------- Added for Version 1 -------------------------- */ \
+ PCRE2_SIZE callout_string_offset; /* Offset to string within pattern */ \
+ PCRE2_SIZE callout_string_length; /* Length of string compiled into pattern */ \
+ PCRE2_SPTR callout_string; /* String compiled into pattern */ \
+ /* ------------------------------------------------------------------ */ \
+} pcre2_callout_block; \
+\
+typedef struct pcre2_callout_enumerate_block { \
+ uint32_t version; /* Identifies version of block */ \
+ /* ------------------------ Version 0 ------------------------------- */ \
+ PCRE2_SIZE pattern_position; /* Offset to next item in the pattern */ \
+ PCRE2_SIZE next_item_length; /* Length of next item in the pattern */ \
+ uint32_t callout_number; /* Number compiled into pattern */ \
+ PCRE2_SIZE callout_string_offset; /* Offset to string within pattern */ \
+ PCRE2_SIZE callout_string_length; /* Length of string compiled into pattern */ \
+ PCRE2_SPTR callout_string; /* String compiled into pattern */ \
+ /* ------------------------------------------------------------------ */ \
+} pcre2_callout_enumerate_block;
+
+
+/* List the generic forms of all other functions in macros, which will be
+expanded for each width below. Start with functions that give general
+information. */
+
+#define PCRE2_GENERAL_INFO_FUNCTIONS \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION pcre2_config(uint32_t, void *);
+
+
+/* Functions for manipulating contexts. */
+
+#define PCRE2_GENERAL_CONTEXT_FUNCTIONS \
+PCRE2_EXP_DECL pcre2_general_context PCRE2_CALL_CONVENTION \
+ *pcre2_general_context_copy(pcre2_general_context *); \
+PCRE2_EXP_DECL pcre2_general_context PCRE2_CALL_CONVENTION \
+ *pcre2_general_context_create(void *(*)(PCRE2_SIZE, void *), \
+ void (*)(void *, void *), void *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_general_context_free(pcre2_general_context *);
+
+#define PCRE2_COMPILE_CONTEXT_FUNCTIONS \
+PCRE2_EXP_DECL pcre2_compile_context PCRE2_CALL_CONVENTION \
+ *pcre2_compile_context_copy(pcre2_compile_context *); \
+PCRE2_EXP_DECL pcre2_compile_context PCRE2_CALL_CONVENTION \
+ *pcre2_compile_context_create(pcre2_general_context *);\
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_compile_context_free(pcre2_compile_context *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_bsr(pcre2_compile_context *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_character_tables(pcre2_compile_context *, const unsigned char *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_max_pattern_length(pcre2_compile_context *, PCRE2_SIZE); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_newline(pcre2_compile_context *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_parens_nest_limit(pcre2_compile_context *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_compile_recursion_guard(pcre2_compile_context *, \
+ int (*)(uint32_t, void *), void *);
+
+#define PCRE2_MATCH_CONTEXT_FUNCTIONS \
+PCRE2_EXP_DECL pcre2_match_context PCRE2_CALL_CONVENTION \
+ *pcre2_match_context_copy(pcre2_match_context *); \
+PCRE2_EXP_DECL pcre2_match_context PCRE2_CALL_CONVENTION \
+ *pcre2_match_context_create(pcre2_general_context *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_match_context_free(pcre2_match_context *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_callout(pcre2_match_context *, \
+ int (*)(pcre2_callout_block *, void *), void *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_match_limit(pcre2_match_context *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_offset_limit(pcre2_match_context *, PCRE2_SIZE); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_recursion_limit(pcre2_match_context *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_set_recursion_memory_management(pcre2_match_context *, \
+ void *(*)(PCRE2_SIZE, void *), void (*)(void *, void *), void *);
+
+
+/* Functions concerned with compiling a pattern to PCRE internal code. */
+
+#define PCRE2_COMPILE_FUNCTIONS \
+PCRE2_EXP_DECL pcre2_code PCRE2_CALL_CONVENTION \
+ *pcre2_compile(PCRE2_SPTR, PCRE2_SIZE, uint32_t, int *, PCRE2_SIZE *, \
+ pcre2_compile_context *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_code_free(pcre2_code *); \
+PCRE2_EXP_DECL pcre2_code PCRE2_CALL_CONVENTION \
+ *pcre2_code_copy(const pcre2_code *); \
+PCRE2_EXP_DECL pcre2_code PCRE2_CALL_CONVENTION \
+ *pcre2_code_copy_with_tables(const pcre2_code *);
+
+
+/* Functions that give information about a compiled pattern. */
+
+#define PCRE2_PATTERN_INFO_FUNCTIONS \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_pattern_info(const pcre2_code *, uint32_t, void *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_callout_enumerate(const pcre2_code *, \
+ int (*)(pcre2_callout_enumerate_block *, void *), void *);
+
+
+/* Functions for running a match and inspecting the result. */
+
+#define PCRE2_MATCH_FUNCTIONS \
+PCRE2_EXP_DECL pcre2_match_data PCRE2_CALL_CONVENTION \
+ *pcre2_match_data_create(uint32_t, pcre2_general_context *); \
+PCRE2_EXP_DECL pcre2_match_data PCRE2_CALL_CONVENTION \
+ *pcre2_match_data_create_from_pattern(const pcre2_code *, \
+ pcre2_general_context *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_dfa_match(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \
+ uint32_t, pcre2_match_data *, pcre2_match_context *, int *, PCRE2_SIZE); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_match(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \
+ uint32_t, pcre2_match_data *, pcre2_match_context *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_match_data_free(pcre2_match_data *); \
+PCRE2_EXP_DECL PCRE2_SPTR PCRE2_CALL_CONVENTION \
+ pcre2_get_mark(pcre2_match_data *); \
+PCRE2_EXP_DECL uint32_t PCRE2_CALL_CONVENTION \
+ pcre2_get_ovector_count(pcre2_match_data *); \
+PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \
+ *pcre2_get_ovector_pointer(pcre2_match_data *); \
+PCRE2_EXP_DECL PCRE2_SIZE PCRE2_CALL_CONVENTION \
+ pcre2_get_startchar(pcre2_match_data *);
+
+
+/* Convenience functions for handling matched substrings. */
+
+#define PCRE2_SUBSTRING_FUNCTIONS \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_copy_byname(pcre2_match_data *, PCRE2_SPTR, PCRE2_UCHAR *, \
+ PCRE2_SIZE *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_copy_bynumber(pcre2_match_data *, uint32_t, PCRE2_UCHAR *, \
+ PCRE2_SIZE *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_substring_free(PCRE2_UCHAR *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_get_byname(pcre2_match_data *, PCRE2_SPTR, PCRE2_UCHAR **, \
+ PCRE2_SIZE *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_get_bynumber(pcre2_match_data *, uint32_t, PCRE2_UCHAR **, \
+ PCRE2_SIZE *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_length_byname(pcre2_match_data *, PCRE2_SPTR, PCRE2_SIZE *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_length_bynumber(pcre2_match_data *, uint32_t, PCRE2_SIZE *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_nametable_scan(const pcre2_code *, PCRE2_SPTR, PCRE2_SPTR *, \
+ PCRE2_SPTR *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_number_from_name(const pcre2_code *, PCRE2_SPTR); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_substring_list_free(PCRE2_SPTR *); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substring_list_get(pcre2_match_data *, PCRE2_UCHAR ***, PCRE2_SIZE **);
+
+/* Functions for serializing / deserializing compiled patterns. */
+
+#define PCRE2_SERIALIZE_FUNCTIONS \
+PCRE2_EXP_DECL int32_t PCRE2_CALL_CONVENTION \
+ pcre2_serialize_encode(const pcre2_code **, int32_t, uint8_t **, \
+ PCRE2_SIZE *, pcre2_general_context *); \
+PCRE2_EXP_DECL int32_t PCRE2_CALL_CONVENTION \
+ pcre2_serialize_decode(pcre2_code **, int32_t, const uint8_t *, \
+ pcre2_general_context *); \
+PCRE2_EXP_DECL int32_t PCRE2_CALL_CONVENTION \
+ pcre2_serialize_get_number_of_codes(const uint8_t *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_serialize_free(uint8_t *);
+
+
+/* Convenience function for match + substitute. */
+
+#define PCRE2_SUBSTITUTE_FUNCTION \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_substitute(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \
+ uint32_t, pcre2_match_data *, pcre2_match_context *, PCRE2_SPTR, \
+ PCRE2_SIZE, PCRE2_UCHAR *, PCRE2_SIZE *);
+
+
+/* Functions for JIT processing */
+
+#define PCRE2_JIT_FUNCTIONS \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_jit_compile(pcre2_code *, uint32_t); \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_jit_match(const pcre2_code *, PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE, \
+ uint32_t, pcre2_match_data *, pcre2_match_context *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_jit_free_unused_memory(pcre2_general_context *); \
+PCRE2_EXP_DECL pcre2_jit_stack PCRE2_CALL_CONVENTION \
+ *pcre2_jit_stack_create(PCRE2_SIZE, PCRE2_SIZE, pcre2_general_context *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_jit_stack_assign(pcre2_match_context *, pcre2_jit_callback, void *); \
+PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
+ pcre2_jit_stack_free(pcre2_jit_stack *);
+
+
+/* Other miscellaneous functions. */
+
+#define PCRE2_OTHER_FUNCTIONS \
+PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
+ pcre2_get_error_message(int, PCRE2_UCHAR *, PCRE2_SIZE); \
+PCRE2_EXP_DECL const uint8_t PCRE2_CALL_CONVENTION \
+ *pcre2_maketables(pcre2_general_context *); \
+
+
+/* Define macros that generate width-specific names from generic versions. The
+three-level macro scheme is necessary to get the macros expanded when we want
+them to be. First we get the width from PCRE2_LOCAL_WIDTH, which is used for
+generating three versions of everything below. After that, PCRE2_SUFFIX will be
+re-defined to use PCRE2_CODE_UNIT_WIDTH, for use when macros such as
+pcre2_compile are called by application code. */
+
+#define PCRE2_JOIN(a,b) a ## b
+#define PCRE2_GLUE(a,b) PCRE2_JOIN(a,b)
+#define PCRE2_SUFFIX(a) PCRE2_GLUE(a,PCRE2_LOCAL_WIDTH)
+
+
+/* Data types */
+
+#define PCRE2_UCHAR PCRE2_SUFFIX(PCRE2_UCHAR)
+#define PCRE2_SPTR PCRE2_SUFFIX(PCRE2_SPTR)
+
+#define pcre2_code PCRE2_SUFFIX(pcre2_code_)
+#define pcre2_jit_callback PCRE2_SUFFIX(pcre2_jit_callback_)
+#define pcre2_jit_stack PCRE2_SUFFIX(pcre2_jit_stack_)
+
+#define pcre2_real_code PCRE2_SUFFIX(pcre2_real_code_)
+#define pcre2_real_general_context PCRE2_SUFFIX(pcre2_real_general_context_)
+#define pcre2_real_compile_context PCRE2_SUFFIX(pcre2_real_compile_context_)
+#define pcre2_real_match_context PCRE2_SUFFIX(pcre2_real_match_context_)
+#define pcre2_real_jit_stack PCRE2_SUFFIX(pcre2_real_jit_stack_)
+#define pcre2_real_match_data PCRE2_SUFFIX(pcre2_real_match_data_)
+
+
+/* Data blocks */
+
+#define pcre2_callout_block PCRE2_SUFFIX(pcre2_callout_block_)
+#define pcre2_callout_enumerate_block PCRE2_SUFFIX(pcre2_callout_enumerate_block_)
+#define pcre2_general_context PCRE2_SUFFIX(pcre2_general_context_)
+#define pcre2_compile_context PCRE2_SUFFIX(pcre2_compile_context_)
+#define pcre2_match_context PCRE2_SUFFIX(pcre2_match_context_)
+#define pcre2_match_data PCRE2_SUFFIX(pcre2_match_data_)
+
+
+/* Functions: the complete list in alphabetical order */
+
+#define pcre2_callout_enumerate PCRE2_SUFFIX(pcre2_callout_enumerate_)
+#define pcre2_code_copy PCRE2_SUFFIX(pcre2_code_copy_)
+#define pcre2_code_copy_with_tables PCRE2_SUFFIX(pcre2_code_copy_with_tables_)
+#define pcre2_code_free PCRE2_SUFFIX(pcre2_code_free_)
+#define pcre2_compile PCRE2_SUFFIX(pcre2_compile_)
+#define pcre2_compile_context_copy PCRE2_SUFFIX(pcre2_compile_context_copy_)
+#define pcre2_compile_context_create PCRE2_SUFFIX(pcre2_compile_context_create_)
+#define pcre2_compile_context_free PCRE2_SUFFIX(pcre2_compile_context_free_)
+#define pcre2_config PCRE2_SUFFIX(pcre2_config_)
+#define pcre2_dfa_match PCRE2_SUFFIX(pcre2_dfa_match_)
+#define pcre2_general_context_copy PCRE2_SUFFIX(pcre2_general_context_copy_)
+#define pcre2_general_context_create PCRE2_SUFFIX(pcre2_general_context_create_)
+#define pcre2_general_context_free PCRE2_SUFFIX(pcre2_general_context_free_)
+#define pcre2_get_error_message PCRE2_SUFFIX(pcre2_get_error_message_)
+#define pcre2_get_mark PCRE2_SUFFIX(pcre2_get_mark_)
+#define pcre2_get_ovector_pointer PCRE2_SUFFIX(pcre2_get_ovector_pointer_)
+#define pcre2_get_ovector_count PCRE2_SUFFIX(pcre2_get_ovector_count_)
+#define pcre2_get_startchar PCRE2_SUFFIX(pcre2_get_startchar_)
+#define pcre2_jit_compile PCRE2_SUFFIX(pcre2_jit_compile_)
+#define pcre2_jit_match PCRE2_SUFFIX(pcre2_jit_match_)
+#define pcre2_jit_free_unused_memory PCRE2_SUFFIX(pcre2_jit_free_unused_memory_)
+#define pcre2_jit_stack_assign PCRE2_SUFFIX(pcre2_jit_stack_assign_)
+#define pcre2_jit_stack_create PCRE2_SUFFIX(pcre2_jit_stack_create_)
+#define pcre2_jit_stack_free PCRE2_SUFFIX(pcre2_jit_stack_free_)
+#define pcre2_maketables PCRE2_SUFFIX(pcre2_maketables_)
+#define pcre2_match PCRE2_SUFFIX(pcre2_match_)
+#define pcre2_match_context_copy PCRE2_SUFFIX(pcre2_match_context_copy_)
+#define pcre2_match_context_create PCRE2_SUFFIX(pcre2_match_context_create_)
+#define pcre2_match_context_free PCRE2_SUFFIX(pcre2_match_context_free_)
+#define pcre2_match_data_create PCRE2_SUFFIX(pcre2_match_data_create_)
+#define pcre2_match_data_create_from_pattern PCRE2_SUFFIX(pcre2_match_data_create_from_pattern_)
+#define pcre2_match_data_free PCRE2_SUFFIX(pcre2_match_data_free_)
+#define pcre2_pattern_info PCRE2_SUFFIX(pcre2_pattern_info_)
+#define pcre2_serialize_decode PCRE2_SUFFIX(pcre2_serialize_decode_)
+#define pcre2_serialize_encode PCRE2_SUFFIX(pcre2_serialize_encode_)
+#define pcre2_serialize_free PCRE2_SUFFIX(pcre2_serialize_free_)
+#define pcre2_serialize_get_number_of_codes PCRE2_SUFFIX(pcre2_serialize_get_number_of_codes_)
+#define pcre2_set_bsr PCRE2_SUFFIX(pcre2_set_bsr_)
+#define pcre2_set_callout PCRE2_SUFFIX(pcre2_set_callout_)
+#define pcre2_set_character_tables PCRE2_SUFFIX(pcre2_set_character_tables_)
+#define pcre2_set_compile_recursion_guard PCRE2_SUFFIX(pcre2_set_compile_recursion_guard_)
+#define pcre2_set_match_limit PCRE2_SUFFIX(pcre2_set_match_limit_)
+#define pcre2_set_max_pattern_length PCRE2_SUFFIX(pcre2_set_max_pattern_length_)
+#define pcre2_set_newline PCRE2_SUFFIX(pcre2_set_newline_)
+#define pcre2_set_parens_nest_limit PCRE2_SUFFIX(pcre2_set_parens_nest_limit_)
+#define pcre2_set_offset_limit PCRE2_SUFFIX(pcre2_set_offset_limit_)
+#define pcre2_set_recursion_limit PCRE2_SUFFIX(pcre2_set_recursion_limit_)
+#define pcre2_set_recursion_memory_management PCRE2_SUFFIX(pcre2_set_recursion_memory_management_)
+#define pcre2_substitute PCRE2_SUFFIX(pcre2_substitute_)
+#define pcre2_substring_copy_byname PCRE2_SUFFIX(pcre2_substring_copy_byname_)
+#define pcre2_substring_copy_bynumber PCRE2_SUFFIX(pcre2_substring_copy_bynumber_)
+#define pcre2_substring_free PCRE2_SUFFIX(pcre2_substring_free_)
+#define pcre2_substring_get_byname PCRE2_SUFFIX(pcre2_substring_get_byname_)
+#define pcre2_substring_get_bynumber PCRE2_SUFFIX(pcre2_substring_get_bynumber_)
+#define pcre2_substring_length_byname PCRE2_SUFFIX(pcre2_substring_length_byname_)
+#define pcre2_substring_length_bynumber PCRE2_SUFFIX(pcre2_substring_length_bynumber_)
+#define pcre2_substring_list_get PCRE2_SUFFIX(pcre2_substring_list_get_)
+#define pcre2_substring_list_free PCRE2_SUFFIX(pcre2_substring_list_free_)
+#define pcre2_substring_nametable_scan PCRE2_SUFFIX(pcre2_substring_nametable_scan_)
+#define pcre2_substring_number_from_name PCRE2_SUFFIX(pcre2_substring_number_from_name_)
+
+
+/* Now generate all three sets of width-specific structures and function
+prototypes. */
+
+#define PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS \
+PCRE2_TYPES_LIST \
+PCRE2_STRUCTURE_LIST \
+PCRE2_GENERAL_INFO_FUNCTIONS \
+PCRE2_GENERAL_CONTEXT_FUNCTIONS \
+PCRE2_COMPILE_CONTEXT_FUNCTIONS \
+PCRE2_MATCH_CONTEXT_FUNCTIONS \
+PCRE2_COMPILE_FUNCTIONS \
+PCRE2_PATTERN_INFO_FUNCTIONS \
+PCRE2_MATCH_FUNCTIONS \
+PCRE2_SUBSTRING_FUNCTIONS \
+PCRE2_SERIALIZE_FUNCTIONS \
+PCRE2_SUBSTITUTE_FUNCTION \
+PCRE2_JIT_FUNCTIONS \
+PCRE2_OTHER_FUNCTIONS
+
+#define PCRE2_LOCAL_WIDTH 8
+PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
+#undef PCRE2_LOCAL_WIDTH
+
+#define PCRE2_LOCAL_WIDTH 16
+PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
+#undef PCRE2_LOCAL_WIDTH
+
+#define PCRE2_LOCAL_WIDTH 32
+PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
+#undef PCRE2_LOCAL_WIDTH
+
+/* Undefine the list macros; they are no longer needed. */
+
+#undef PCRE2_TYPES_LIST
+#undef PCRE2_STRUCTURE_LIST
+#undef PCRE2_GENERAL_INFO_FUNCTIONS
+#undef PCRE2_GENERAL_CONTEXT_FUNCTIONS
+#undef PCRE2_COMPILE_CONTEXT_FUNCTIONS
+#undef PCRE2_MATCH_CONTEXT_FUNCTIONS
+#undef PCRE2_COMPILE_FUNCTIONS
+#undef PCRE2_PATTERN_INFO_FUNCTIONS
+#undef PCRE2_MATCH_FUNCTIONS
+#undef PCRE2_SUBSTRING_FUNCTIONS
+#undef PCRE2_SERIALIZE_FUNCTIONS
+#undef PCRE2_SUBSTITUTE_FUNCTION
+#undef PCRE2_JIT_FUNCTIONS
+#undef PCRE2_OTHER_FUNCTIONS
+#undef PCRE2_TYPES_STRUCTURES_AND_FUNCTIONS
+
+/* PCRE2_CODE_UNIT_WIDTH must be defined. If it is 8, 16, or 32, redefine
+PCRE2_SUFFIX to use it. If it is 0, undefine the other macros and make
+PCRE2_SUFFIX a no-op. Otherwise, generate an error. */
+
+#undef PCRE2_SUFFIX
+#ifndef PCRE2_CODE_UNIT_WIDTH
+#error PCRE2_CODE_UNIT_WIDTH must be defined before including pcre2.h.
+#error Use 8, 16, or 32; or 0 for a multi-width application.
+#else /* PCRE2_CODE_UNIT_WIDTH is defined */
+#if PCRE2_CODE_UNIT_WIDTH == 8 || \
+ PCRE2_CODE_UNIT_WIDTH == 16 || \
+ PCRE2_CODE_UNIT_WIDTH == 32
+#define PCRE2_SUFFIX(a) PCRE2_GLUE(a, PCRE2_CODE_UNIT_WIDTH)
+#elif PCRE2_CODE_UNIT_WIDTH == 0
+#undef PCRE2_JOIN
+#undef PCRE2_GLUE
+#define PCRE2_SUFFIX(a) a
+#else
+#error PCRE2_CODE_UNIT_WIDTH must be 0, 8, 16, or 32.
+#endif
+#endif /* PCRE2_CODE_UNIT_WIDTH is defined */
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* PCRE2_H_IDEMPOTENT_GUARD */
+
+/* End of pcre2.h */
diff --git a/thirdparty/pcre2/src/pcre2_auto_possess.c b/thirdparty/pcre2/src/pcre2_auto_possess.c
new file mode 100644
index 0000000000..64ec6dfbbc
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_auto_possess.c
@@ -0,0 +1,1293 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+/* This module contains functions that scan a compiled pattern and change
+repeats into possessive repeats where possible. */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
+#include "pcre2_internal.h"
+
+
+/*************************************************
+* Tables for auto-possessification *
+*************************************************/
+
+/* This table is used to check whether auto-possessification is possible
+between adjacent character-type opcodes. The left-hand (repeated) opcode is
+used to select the row, and the right-hand opcode is use to select the column.
+A value of 1 means that auto-possessification is OK. For example, the second
+value in the first row means that \D+\d can be turned into \D++\d.
+
+The Unicode property types (\P and \p) have to be present to fill out the table
+because of what their opcode values are, but the table values should always be
+zero because property types are handled separately in the code. The last four
+columns apply to items that cannot be repeated, so there is no need to have
+rows for them. Note that OP_DIGIT etc. are generated only when PCRE_UCP is
+*not* set. When it is set, \d etc. are converted into OP_(NOT_)PROP codes. */
+
+#define APTROWS (LAST_AUTOTAB_LEFT_OP - FIRST_AUTOTAB_OP + 1)
+#define APTCOLS (LAST_AUTOTAB_RIGHT_OP - FIRST_AUTOTAB_OP + 1)
+
+static const uint8_t autoposstab[APTROWS][APTCOLS] = {
+/* \D \d \S \s \W \w . .+ \C \P \p \R \H \h \V \v \X \Z \z $ $M */
+ { 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, /* \D */
+ { 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1 }, /* \d */
+ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1 }, /* \S */
+ { 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, /* \s */
+ { 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, /* \W */
+ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1 }, /* \w */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, /* . */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, /* .+ */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 }, /* \C */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* \P */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* \p */
+ { 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 }, /* \R */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0 }, /* \H */
+ { 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0 }, /* \h */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0 }, /* \V */
+ { 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0 }, /* \v */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 } /* \X */
+};
+
+#ifdef SUPPORT_UNICODE
+/* This table is used to check whether auto-possessification is possible
+between adjacent Unicode property opcodes (OP_PROP and OP_NOTPROP). The
+left-hand (repeated) opcode is used to select the row, and the right-hand
+opcode is used to select the column. The values are as follows:
+
+ 0 Always return FALSE (never auto-possessify)
+ 1 Character groups are distinct (possessify if both are OP_PROP)
+ 2 Check character categories in the same group (general or particular)
+ 3 TRUE if the two opcodes are not the same (PROP vs NOTPROP)
+
+ 4 Check left general category vs right particular category
+ 5 Check right general category vs left particular category
+
+ 6 Left alphanum vs right general category
+ 7 Left space vs right general category
+ 8 Left word vs right general category
+
+ 9 Right alphanum vs left general category
+ 10 Right space vs left general category
+ 11 Right word vs left general category
+
+ 12 Left alphanum vs right particular category
+ 13 Left space vs right particular category
+ 14 Left word vs right particular category
+
+ 15 Right alphanum vs left particular category
+ 16 Right space vs left particular category
+ 17 Right word vs left particular category
+*/
+
+static const uint8_t propposstab[PT_TABSIZE][PT_TABSIZE] = {
+/* ANY LAMP GC PC SC ALNUM SPACE PXSPACE WORD CLIST UCNC */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_ANY */
+ { 0, 3, 0, 0, 0, 3, 1, 1, 0, 0, 0 }, /* PT_LAMP */
+ { 0, 0, 2, 4, 0, 9, 10, 10, 11, 0, 0 }, /* PT_GC */
+ { 0, 0, 5, 2, 0, 15, 16, 16, 17, 0, 0 }, /* PT_PC */
+ { 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0 }, /* PT_SC */
+ { 0, 3, 6, 12, 0, 3, 1, 1, 0, 0, 0 }, /* PT_ALNUM */
+ { 0, 1, 7, 13, 0, 1, 3, 3, 1, 0, 0 }, /* PT_SPACE */
+ { 0, 1, 7, 13, 0, 1, 3, 3, 1, 0, 0 }, /* PT_PXSPACE */
+ { 0, 0, 8, 14, 0, 0, 1, 1, 3, 0, 0 }, /* PT_WORD */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_CLIST */
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 } /* PT_UCNC */
+};
+
+/* This table is used to check whether auto-possessification is possible
+between adjacent Unicode property opcodes (OP_PROP and OP_NOTPROP) when one
+specifies a general category and the other specifies a particular category. The
+row is selected by the general category and the column by the particular
+category. The value is 1 if the particular category is not part of the general
+category. */
+
+static const uint8_t catposstab[7][30] = {
+/* Cc Cf Cn Co Cs Ll Lm Lo Lt Lu Mc Me Mn Nd Nl No Pc Pd Pe Pf Pi Po Ps Sc Sk Sm So Zl Zp Zs */
+ { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* C */
+ { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* L */
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* M */
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* N */
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1 }, /* P */
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1 }, /* S */
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0 } /* Z */
+};
+
+/* This table is used when checking ALNUM, (PX)SPACE, SPACE, and WORD against
+a general or particular category. The properties in each row are those
+that apply to the character set in question. Duplication means that a little
+unnecessary work is done when checking, but this keeps things much simpler
+because they can all use the same code. For more details see the comment where
+this table is used.
+
+Note: SPACE and PXSPACE used to be different because Perl excluded VT from
+"space", but from Perl 5.18 it's included, so both categories are treated the
+same here. */
+
+static const uint8_t posspropstab[3][4] = {
+ { ucp_L, ucp_N, ucp_N, ucp_Nl }, /* ALNUM, 3rd and 4th values redundant */
+ { ucp_Z, ucp_Z, ucp_C, ucp_Cc }, /* SPACE and PXSPACE, 2nd value redundant */
+ { ucp_L, ucp_N, ucp_P, ucp_Po } /* WORD */
+};
+#endif /* SUPPORT_UNICODE */
+
+
+
+#ifdef SUPPORT_UNICODE
+/*************************************************
+* Check a character and a property *
+*************************************************/
+
+/* This function is called by compare_opcodes() when a property item is
+adjacent to a fixed character.
+
+Arguments:
+ c the character
+ ptype the property type
+ pdata the data for the type
+ negated TRUE if it's a negated property (\P or \p{^)
+
+Returns: TRUE if auto-possessifying is OK
+*/
+
+static BOOL
+check_char_prop(uint32_t c, unsigned int ptype, unsigned int pdata,
+ BOOL negated)
+{
+const uint32_t *p;
+const ucd_record *prop = GET_UCD(c);
+
+switch(ptype)
+ {
+ case PT_LAMP:
+ return (prop->chartype == ucp_Lu ||
+ prop->chartype == ucp_Ll ||
+ prop->chartype == ucp_Lt) == negated;
+
+ case PT_GC:
+ return (pdata == PRIV(ucp_gentype)[prop->chartype]) == negated;
+
+ case PT_PC:
+ return (pdata == prop->chartype) == negated;
+
+ case PT_SC:
+ return (pdata == prop->script) == negated;
+
+ /* These are specials */
+
+ case PT_ALNUM:
+ return (PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N) == negated;
+
+ /* Perl space used to exclude VT, but from Perl 5.18 it is included, which
+ means that Perl space and POSIX space are now identical. PCRE was changed
+ at release 8.34. */
+
+ case PT_SPACE: /* Perl space */
+ case PT_PXSPACE: /* POSIX space */
+ switch(c)
+ {
+ HSPACE_CASES:
+ VSPACE_CASES:
+ return negated;
+
+ default:
+ return (PRIV(ucp_gentype)[prop->chartype] == ucp_Z) == negated;
+ }
+ break; /* Control never reaches here */
+
+ case PT_WORD:
+ return (PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
+ c == CHAR_UNDERSCORE) == negated;
+
+ case PT_CLIST:
+ p = PRIV(ucd_caseless_sets) + prop->caseset;
+ for (;;)
+ {
+ if (c < *p) return !negated;
+ if (c == *p++) return negated;
+ }
+ break; /* Control never reaches here */
+ }
+
+return FALSE;
+}
+#endif /* SUPPORT_UNICODE */
+
+
+
+/*************************************************
+* Base opcode of repeated opcodes *
+*************************************************/
+
+/* Returns the base opcode for repeated single character type opcodes. If the
+opcode is not a repeated character type, it returns with the original value.
+
+Arguments: c opcode
+Returns: base opcode for the type
+*/
+
+static PCRE2_UCHAR
+get_repeat_base(PCRE2_UCHAR c)
+{
+return (c > OP_TYPEPOSUPTO)? c :
+ (c >= OP_TYPESTAR)? OP_TYPESTAR :
+ (c >= OP_NOTSTARI)? OP_NOTSTARI :
+ (c >= OP_NOTSTAR)? OP_NOTSTAR :
+ (c >= OP_STARI)? OP_STARI :
+ OP_STAR;
+}
+
+
+/*************************************************
+* Fill the character property list *
+*************************************************/
+
+/* Checks whether the code points to an opcode that can take part in auto-
+possessification, and if so, fills a list with its properties.
+
+Arguments:
+ code points to start of expression
+ utf TRUE if in UTF mode
+ fcc points to the case-flipping table
+ list points to output list
+ list[0] will be filled with the opcode
+ list[1] will be non-zero if this opcode
+ can match an empty character string
+ list[2..7] depends on the opcode
+
+Returns: points to the start of the next opcode if *code is accepted
+ NULL if *code is not accepted
+*/
+
+static PCRE2_SPTR
+get_chr_property_list(PCRE2_SPTR code, BOOL utf, const uint8_t *fcc,
+ uint32_t *list)
+{
+PCRE2_UCHAR c = *code;
+PCRE2_UCHAR base;
+PCRE2_SPTR end;
+uint32_t chr;
+
+#ifdef SUPPORT_UNICODE
+uint32_t *clist_dest;
+const uint32_t *clist_src;
+#else
+(void)utf; /* Suppress "unused parameter" compiler warning */
+#endif
+
+list[0] = c;
+list[1] = FALSE;
+code++;
+
+if (c >= OP_STAR && c <= OP_TYPEPOSUPTO)
+ {
+ base = get_repeat_base(c);
+ c -= (base - OP_STAR);
+
+ if (c == OP_UPTO || c == OP_MINUPTO || c == OP_EXACT || c == OP_POSUPTO)
+ code += IMM2_SIZE;
+
+ list[1] = (c != OP_PLUS && c != OP_MINPLUS && c != OP_EXACT &&
+ c != OP_POSPLUS);
+
+ switch(base)
+ {
+ case OP_STAR:
+ list[0] = OP_CHAR;
+ break;
+
+ case OP_STARI:
+ list[0] = OP_CHARI;
+ break;
+
+ case OP_NOTSTAR:
+ list[0] = OP_NOT;
+ break;
+
+ case OP_NOTSTARI:
+ list[0] = OP_NOTI;
+ break;
+
+ case OP_TYPESTAR:
+ list[0] = *code;
+ code++;
+ break;
+ }
+ c = list[0];
+ }
+
+switch(c)
+ {
+ case OP_NOT_DIGIT:
+ case OP_DIGIT:
+ case OP_NOT_WHITESPACE:
+ case OP_WHITESPACE:
+ case OP_NOT_WORDCHAR:
+ case OP_WORDCHAR:
+ case OP_ANY:
+ case OP_ALLANY:
+ case OP_ANYNL:
+ case OP_NOT_HSPACE:
+ case OP_HSPACE:
+ case OP_NOT_VSPACE:
+ case OP_VSPACE:
+ case OP_EXTUNI:
+ case OP_EODN:
+ case OP_EOD:
+ case OP_DOLL:
+ case OP_DOLLM:
+ return code;
+
+ case OP_CHAR:
+ case OP_NOT:
+ GETCHARINCTEST(chr, code);
+ list[2] = chr;
+ list[3] = NOTACHAR;
+ return code;
+
+ case OP_CHARI:
+ case OP_NOTI:
+ list[0] = (c == OP_CHARI) ? OP_CHAR : OP_NOT;
+ GETCHARINCTEST(chr, code);
+ list[2] = chr;
+
+#ifdef SUPPORT_UNICODE
+ if (chr < 128 || (chr < 256 && !utf))
+ list[3] = fcc[chr];
+ else
+ list[3] = UCD_OTHERCASE(chr);
+#elif defined SUPPORT_WIDE_CHARS
+ list[3] = (chr < 256) ? fcc[chr] : chr;
+#else
+ list[3] = fcc[chr];
+#endif
+
+ /* The othercase might be the same value. */
+
+ if (chr == list[3])
+ list[3] = NOTACHAR;
+ else
+ list[4] = NOTACHAR;
+ return code;
+
+#ifdef SUPPORT_UNICODE
+ case OP_PROP:
+ case OP_NOTPROP:
+ if (code[0] != PT_CLIST)
+ {
+ list[2] = code[0];
+ list[3] = code[1];
+ return code + 2;
+ }
+
+ /* Convert only if we have enough space. */
+
+ clist_src = PRIV(ucd_caseless_sets) + code[1];
+ clist_dest = list + 2;
+ code += 2;
+
+ do {
+ if (clist_dest >= list + 8)
+ {
+ /* Early return if there is not enough space. This should never
+ happen, since all clists are shorter than 5 character now. */
+ list[2] = code[0];
+ list[3] = code[1];
+ return code;
+ }
+ *clist_dest++ = *clist_src;
+ }
+ while(*clist_src++ != NOTACHAR);
+
+ /* All characters are stored. The terminating NOTACHAR is copied from the
+ clist itself. */
+
+ list[0] = (c == OP_PROP) ? OP_CHAR : OP_NOT;
+ return code;
+#endif
+
+ case OP_NCLASS:
+ case OP_CLASS:
+#ifdef SUPPORT_WIDE_CHARS
+ case OP_XCLASS:
+ if (c == OP_XCLASS)
+ end = code + GET(code, 0) - 1;
+ else
+#endif
+ end = code + 32 / sizeof(PCRE2_UCHAR);
+
+ switch(*end)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ case OP_CRPOSSTAR:
+ case OP_CRPOSQUERY:
+ list[1] = TRUE;
+ end++;
+ break;
+
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRPOSPLUS:
+ end++;
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ case OP_CRPOSRANGE:
+ list[1] = (GET2(end, 1) == 0);
+ end += 1 + 2 * IMM2_SIZE;
+ break;
+ }
+ list[2] = (uint32_t)(end - code);
+ return end;
+ }
+return NULL; /* Opcode not accepted */
+}
+
+
+
+/*************************************************
+* Scan further character sets for match *
+*************************************************/
+
+/* Checks whether the base and the current opcode have a common character, in
+which case the base cannot be possessified.
+
+Arguments:
+ code points to the byte code
+ utf TRUE in UTF mode
+ cb compile data block
+ base_list the data list of the base opcode
+ base_end the end of the data list
+ rec_limit points to recursion depth counter
+
+Returns: TRUE if the auto-possessification is possible
+*/
+
+static BOOL
+compare_opcodes(PCRE2_SPTR code, BOOL utf, const compile_block *cb,
+ const uint32_t *base_list, PCRE2_SPTR base_end, int *rec_limit)
+{
+PCRE2_UCHAR c;
+uint32_t list[8];
+const uint32_t *chr_ptr;
+const uint32_t *ochr_ptr;
+const uint32_t *list_ptr;
+PCRE2_SPTR next_code;
+#ifdef SUPPORT_WIDE_CHARS
+PCRE2_SPTR xclass_flags;
+#endif
+const uint8_t *class_bitset;
+const uint8_t *set1, *set2, *set_end;
+uint32_t chr;
+BOOL accepted, invert_bits;
+BOOL entered_a_group = FALSE;
+
+if (--(*rec_limit) <= 0) return FALSE; /* Recursion has gone too deep */
+
+/* Note: the base_list[1] contains whether the current opcode has a greedy
+(represented by a non-zero value) quantifier. This is a different from
+other character type lists, which store here that the character iterator
+matches to an empty string (also represented by a non-zero value). */
+
+for(;;)
+ {
+ /* All operations move the code pointer forward.
+ Therefore infinite recursions are not possible. */
+
+ c = *code;
+
+ /* Skip over callouts */
+
+ if (c == OP_CALLOUT)
+ {
+ code += PRIV(OP_lengths)[c];
+ continue;
+ }
+
+ if (c == OP_CALLOUT_STR)
+ {
+ code += GET(code, 1 + 2*LINK_SIZE);
+ continue;
+ }
+
+ if (c == OP_ALT)
+ {
+ do code += GET(code, 1); while (*code == OP_ALT);
+ c = *code;
+ }
+
+ switch(c)
+ {
+ case OP_END:
+ case OP_KETRPOS:
+ /* TRUE only in greedy case. The non-greedy case could be replaced by
+ an OP_EXACT, but it is probably not worth it. (And note that OP_EXACT
+ uses more memory, which we cannot get at this stage.) */
+
+ return base_list[1] != 0;
+
+ case OP_KET:
+ /* If the bracket is capturing, and referenced by an OP_RECURSE, or
+ it is an atomic sub-pattern (assert, once, etc.) the non-greedy case
+ cannot be converted to a possessive form. */
+
+ if (base_list[1] == 0) return FALSE;
+
+ switch(*(code - GET(code, 1)))
+ {
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ case OP_ONCE:
+ case OP_ONCE_NC:
+
+ /* Atomic sub-patterns and assertions can always auto-possessify their
+ last iterator. However, if the group was entered as a result of checking
+ a previous iterator, this is not possible. */
+
+ return !entered_a_group;
+ }
+
+ code += PRIV(OP_lengths)[c];
+ continue;
+
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_BRA:
+ case OP_CBRA:
+ next_code = code + GET(code, 1);
+ code += PRIV(OP_lengths)[c];
+
+ /* Check each branch. We have to recurse a level for all but the last
+ branch. */
+
+ while (*next_code == OP_ALT)
+ {
+ if (!compare_opcodes(code, utf, cb, base_list, base_end, rec_limit))
+ return FALSE;
+ code = next_code + 1 + LINK_SIZE;
+ next_code += GET(next_code, 1);
+ }
+
+ entered_a_group = TRUE;
+ continue;
+
+ case OP_BRAZERO:
+ case OP_BRAMINZERO:
+
+ next_code = code + 1;
+ if (*next_code != OP_BRA && *next_code != OP_CBRA
+ && *next_code != OP_ONCE && *next_code != OP_ONCE_NC) return FALSE;
+
+ do next_code += GET(next_code, 1); while (*next_code == OP_ALT);
+
+ /* The bracket content will be checked by the OP_BRA/OP_CBRA case above. */
+
+ next_code += 1 + LINK_SIZE;
+ if (!compare_opcodes(next_code, utf, cb, base_list, base_end, rec_limit))
+ return FALSE;
+
+ code += PRIV(OP_lengths)[c];
+ continue;
+
+ default:
+ break;
+ }
+
+ /* Check for a supported opcode, and load its properties. */
+
+ code = get_chr_property_list(code, utf, cb->fcc, list);
+ if (code == NULL) return FALSE; /* Unsupported */
+
+ /* If either opcode is a small character list, set pointers for comparing
+ characters from that list with another list, or with a property. */
+
+ if (base_list[0] == OP_CHAR)
+ {
+ chr_ptr = base_list + 2;
+ list_ptr = list;
+ }
+ else if (list[0] == OP_CHAR)
+ {
+ chr_ptr = list + 2;
+ list_ptr = base_list;
+ }
+
+ /* Character bitsets can also be compared to certain opcodes. */
+
+ else if (base_list[0] == OP_CLASS || list[0] == OP_CLASS
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ /* In 8 bit, non-UTF mode, OP_CLASS and OP_NCLASS are the same. */
+ || (!utf && (base_list[0] == OP_NCLASS || list[0] == OP_NCLASS))
+#endif
+ )
+ {
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ if (base_list[0] == OP_CLASS || (!utf && base_list[0] == OP_NCLASS))
+#else
+ if (base_list[0] == OP_CLASS)
+#endif
+ {
+ set1 = (uint8_t *)(base_end - base_list[2]);
+ list_ptr = list;
+ }
+ else
+ {
+ set1 = (uint8_t *)(code - list[2]);
+ list_ptr = base_list;
+ }
+
+ invert_bits = FALSE;
+ switch(list_ptr[0])
+ {
+ case OP_CLASS:
+ case OP_NCLASS:
+ set2 = (uint8_t *)
+ ((list_ptr == list ? code : base_end) - list_ptr[2]);
+ break;
+
+#ifdef SUPPORT_WIDE_CHARS
+ case OP_XCLASS:
+ xclass_flags = (list_ptr == list ? code : base_end) - list_ptr[2] + LINK_SIZE;
+ if ((*xclass_flags & XCL_HASPROP) != 0) return FALSE;
+ if ((*xclass_flags & XCL_MAP) == 0)
+ {
+ /* No bits are set for characters < 256. */
+ if (list[1] == 0) return TRUE;
+ /* Might be an empty repeat. */
+ continue;
+ }
+ set2 = (uint8_t *)(xclass_flags + 1);
+ break;
+#endif
+
+ case OP_NOT_DIGIT:
+ invert_bits = TRUE;
+ /* Fall through */
+ case OP_DIGIT:
+ set2 = (uint8_t *)(cb->cbits + cbit_digit);
+ break;
+
+ case OP_NOT_WHITESPACE:
+ invert_bits = TRUE;
+ /* Fall through */
+ case OP_WHITESPACE:
+ set2 = (uint8_t *)(cb->cbits + cbit_space);
+ break;
+
+ case OP_NOT_WORDCHAR:
+ invert_bits = TRUE;
+ /* Fall through */
+ case OP_WORDCHAR:
+ set2 = (uint8_t *)(cb->cbits + cbit_word);
+ break;
+
+ default:
+ return FALSE;
+ }
+
+ /* Because the bit sets are unaligned bytes, we need to perform byte
+ comparison here. */
+
+ set_end = set1 + 32;
+ if (invert_bits)
+ {
+ do
+ {
+ if ((*set1++ & ~(*set2++)) != 0) return FALSE;
+ }
+ while (set1 < set_end);
+ }
+ else
+ {
+ do
+ {
+ if ((*set1++ & *set2++) != 0) return FALSE;
+ }
+ while (set1 < set_end);
+ }
+
+ if (list[1] == 0) return TRUE;
+ /* Might be an empty repeat. */
+ continue;
+ }
+
+ /* Some property combinations also acceptable. Unicode property opcodes are
+ processed specially; the rest can be handled with a lookup table. */
+
+ else
+ {
+ uint32_t leftop, rightop;
+
+ leftop = base_list[0];
+ rightop = list[0];
+
+#ifdef SUPPORT_UNICODE
+ accepted = FALSE; /* Always set in non-unicode case. */
+ if (leftop == OP_PROP || leftop == OP_NOTPROP)
+ {
+ if (rightop == OP_EOD)
+ accepted = TRUE;
+ else if (rightop == OP_PROP || rightop == OP_NOTPROP)
+ {
+ int n;
+ const uint8_t *p;
+ BOOL same = leftop == rightop;
+ BOOL lisprop = leftop == OP_PROP;
+ BOOL risprop = rightop == OP_PROP;
+ BOOL bothprop = lisprop && risprop;
+
+ /* There's a table that specifies how each combination is to be
+ processed:
+ 0 Always return FALSE (never auto-possessify)
+ 1 Character groups are distinct (possessify if both are OP_PROP)
+ 2 Check character categories in the same group (general or particular)
+ 3 Return TRUE if the two opcodes are not the same
+ ... see comments below
+ */
+
+ n = propposstab[base_list[2]][list[2]];
+ switch(n)
+ {
+ case 0: break;
+ case 1: accepted = bothprop; break;
+ case 2: accepted = (base_list[3] == list[3]) != same; break;
+ case 3: accepted = !same; break;
+
+ case 4: /* Left general category, right particular category */
+ accepted = risprop && catposstab[base_list[3]][list[3]] == same;
+ break;
+
+ case 5: /* Right general category, left particular category */
+ accepted = lisprop && catposstab[list[3]][base_list[3]] == same;
+ break;
+
+ /* This code is logically tricky. Think hard before fiddling with it.
+ The posspropstab table has four entries per row. Each row relates to
+ one of PCRE's special properties such as ALNUM or SPACE or WORD.
+ Only WORD actually needs all four entries, but using repeats for the
+ others means they can all use the same code below.
+
+ The first two entries in each row are Unicode general categories, and
+ apply always, because all the characters they include are part of the
+ PCRE character set. The third and fourth entries are a general and a
+ particular category, respectively, that include one or more relevant
+ characters. One or the other is used, depending on whether the check
+ is for a general or a particular category. However, in both cases the
+ category contains more characters than the specials that are defined
+ for the property being tested against. Therefore, it cannot be used
+ in a NOTPROP case.
+
+ Example: the row for WORD contains ucp_L, ucp_N, ucp_P, ucp_Po.
+ Underscore is covered by ucp_P or ucp_Po. */
+
+ case 6: /* Left alphanum vs right general category */
+ case 7: /* Left space vs right general category */
+ case 8: /* Left word vs right general category */
+ p = posspropstab[n-6];
+ accepted = risprop && lisprop ==
+ (list[3] != p[0] &&
+ list[3] != p[1] &&
+ (list[3] != p[2] || !lisprop));
+ break;
+
+ case 9: /* Right alphanum vs left general category */
+ case 10: /* Right space vs left general category */
+ case 11: /* Right word vs left general category */
+ p = posspropstab[n-9];
+ accepted = lisprop && risprop ==
+ (base_list[3] != p[0] &&
+ base_list[3] != p[1] &&
+ (base_list[3] != p[2] || !risprop));
+ break;
+
+ case 12: /* Left alphanum vs right particular category */
+ case 13: /* Left space vs right particular category */
+ case 14: /* Left word vs right particular category */
+ p = posspropstab[n-12];
+ accepted = risprop && lisprop ==
+ (catposstab[p[0]][list[3]] &&
+ catposstab[p[1]][list[3]] &&
+ (list[3] != p[3] || !lisprop));
+ break;
+
+ case 15: /* Right alphanum vs left particular category */
+ case 16: /* Right space vs left particular category */
+ case 17: /* Right word vs left particular category */
+ p = posspropstab[n-15];
+ accepted = lisprop && risprop ==
+ (catposstab[p[0]][base_list[3]] &&
+ catposstab[p[1]][base_list[3]] &&
+ (base_list[3] != p[3] || !risprop));
+ break;
+ }
+ }
+ }
+
+ else
+#endif /* SUPPORT_UNICODE */
+
+ accepted = leftop >= FIRST_AUTOTAB_OP && leftop <= LAST_AUTOTAB_LEFT_OP &&
+ rightop >= FIRST_AUTOTAB_OP && rightop <= LAST_AUTOTAB_RIGHT_OP &&
+ autoposstab[leftop - FIRST_AUTOTAB_OP][rightop - FIRST_AUTOTAB_OP];
+
+ if (!accepted) return FALSE;
+
+ if (list[1] == 0) return TRUE;
+ /* Might be an empty repeat. */
+ continue;
+ }
+
+ /* Control reaches here only if one of the items is a small character list.
+ All characters are checked against the other side. */
+
+ do
+ {
+ chr = *chr_ptr;
+
+ switch(list_ptr[0])
+ {
+ case OP_CHAR:
+ ochr_ptr = list_ptr + 2;
+ do
+ {
+ if (chr == *ochr_ptr) return FALSE;
+ ochr_ptr++;
+ }
+ while(*ochr_ptr != NOTACHAR);
+ break;
+
+ case OP_NOT:
+ ochr_ptr = list_ptr + 2;
+ do
+ {
+ if (chr == *ochr_ptr)
+ break;
+ ochr_ptr++;
+ }
+ while(*ochr_ptr != NOTACHAR);
+ if (*ochr_ptr == NOTACHAR) return FALSE; /* Not found */
+ break;
+
+ /* Note that OP_DIGIT etc. are generated only when PCRE2_UCP is *not*
+ set. When it is set, \d etc. are converted into OP_(NOT_)PROP codes. */
+
+ case OP_DIGIT:
+ if (chr < 256 && (cb->ctypes[chr] & ctype_digit) != 0) return FALSE;
+ break;
+
+ case OP_NOT_DIGIT:
+ if (chr > 255 || (cb->ctypes[chr] & ctype_digit) == 0) return FALSE;
+ break;
+
+ case OP_WHITESPACE:
+ if (chr < 256 && (cb->ctypes[chr] & ctype_space) != 0) return FALSE;
+ break;
+
+ case OP_NOT_WHITESPACE:
+ if (chr > 255 || (cb->ctypes[chr] & ctype_space) == 0) return FALSE;
+ break;
+
+ case OP_WORDCHAR:
+ if (chr < 255 && (cb->ctypes[chr] & ctype_word) != 0) return FALSE;
+ break;
+
+ case OP_NOT_WORDCHAR:
+ if (chr > 255 || (cb->ctypes[chr] & ctype_word) == 0) return FALSE;
+ break;
+
+ case OP_HSPACE:
+ switch(chr)
+ {
+ HSPACE_CASES: return FALSE;
+ default: break;
+ }
+ break;
+
+ case OP_NOT_HSPACE:
+ switch(chr)
+ {
+ HSPACE_CASES: break;
+ default: return FALSE;
+ }
+ break;
+
+ case OP_ANYNL:
+ case OP_VSPACE:
+ switch(chr)
+ {
+ VSPACE_CASES: return FALSE;
+ default: break;
+ }
+ break;
+
+ case OP_NOT_VSPACE:
+ switch(chr)
+ {
+ VSPACE_CASES: break;
+ default: return FALSE;
+ }
+ break;
+
+ case OP_DOLL:
+ case OP_EODN:
+ switch (chr)
+ {
+ case CHAR_CR:
+ case CHAR_LF:
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#ifndef EBCDIC
+ case 0x2028:
+ case 0x2029:
+#endif /* Not EBCDIC */
+ return FALSE;
+ }
+ break;
+
+ case OP_EOD: /* Can always possessify before \z */
+ break;
+
+#ifdef SUPPORT_UNICODE
+ case OP_PROP:
+ case OP_NOTPROP:
+ if (!check_char_prop(chr, list_ptr[2], list_ptr[3],
+ list_ptr[0] == OP_NOTPROP))
+ return FALSE;
+ break;
+#endif
+
+ case OP_NCLASS:
+ if (chr > 255) return FALSE;
+ /* Fall through */
+
+ case OP_CLASS:
+ if (chr > 255) break;
+ class_bitset = (uint8_t *)
+ ((list_ptr == list ? code : base_end) - list_ptr[2]);
+ if ((class_bitset[chr >> 3] & (1 << (chr & 7))) != 0) return FALSE;
+ break;
+
+#ifdef SUPPORT_WIDE_CHARS
+ case OP_XCLASS:
+ if (PRIV(xclass)(chr, (list_ptr == list ? code : base_end) -
+ list_ptr[2] + LINK_SIZE, utf)) return FALSE;
+ break;
+#endif
+
+ default:
+ return FALSE;
+ }
+
+ chr_ptr++;
+ }
+ while(*chr_ptr != NOTACHAR);
+
+ /* At least one character must be matched from this opcode. */
+
+ if (list[1] == 0) return TRUE;
+ }
+
+/* Control never reaches here. There used to be a fail-save return FALSE; here,
+but some compilers complain about an unreachable statement. */
+}
+
+
+
+/*************************************************
+* Scan compiled regex for auto-possession *
+*************************************************/
+
+/* Replaces single character iterations with their possessive alternatives
+if appropriate. This function modifies the compiled opcode! Hitting a
+non-existent opcode may indicate a bug in PCRE2, but it can also be caused if a
+bad UTF string was compiled with PCRE2_NO_UTF_CHECK. The rec_limit catches
+overly complicated or large patterns. In these cases, the check just stops,
+leaving the remainder of the pattern unpossessified.
+
+Arguments:
+ code points to start of the byte code
+ utf TRUE in UTF mode
+ cb compile data block
+
+Returns: 0 for success
+ -1 if a non-existant opcode is encountered
+*/
+
+int
+PRIV(auto_possessify)(PCRE2_UCHAR *code, BOOL utf, const compile_block *cb)
+{
+PCRE2_UCHAR c;
+PCRE2_SPTR end;
+PCRE2_UCHAR *repeat_opcode;
+uint32_t list[8];
+int rec_limit = 1000; /* Was 10,000 but clang+ASAN uses a lot of stack. */
+
+for (;;)
+ {
+ c = *code;
+
+ if (c > OP_TABLE_LENGTH) return -1; /* Something gone wrong */
+
+ if (c >= OP_STAR && c <= OP_TYPEPOSUPTO)
+ {
+ c -= get_repeat_base(c) - OP_STAR;
+ end = (c <= OP_MINUPTO) ?
+ get_chr_property_list(code, utf, cb->fcc, list) : NULL;
+ list[1] = c == OP_STAR || c == OP_PLUS || c == OP_QUERY || c == OP_UPTO;
+
+ if (end != NULL && compare_opcodes(end, utf, cb, list, end, &rec_limit))
+ {
+ switch(c)
+ {
+ case OP_STAR:
+ *code += OP_POSSTAR - OP_STAR;
+ break;
+
+ case OP_MINSTAR:
+ *code += OP_POSSTAR - OP_MINSTAR;
+ break;
+
+ case OP_PLUS:
+ *code += OP_POSPLUS - OP_PLUS;
+ break;
+
+ case OP_MINPLUS:
+ *code += OP_POSPLUS - OP_MINPLUS;
+ break;
+
+ case OP_QUERY:
+ *code += OP_POSQUERY - OP_QUERY;
+ break;
+
+ case OP_MINQUERY:
+ *code += OP_POSQUERY - OP_MINQUERY;
+ break;
+
+ case OP_UPTO:
+ *code += OP_POSUPTO - OP_UPTO;
+ break;
+
+ case OP_MINUPTO:
+ *code += OP_POSUPTO - OP_MINUPTO;
+ break;
+ }
+ }
+ c = *code;
+ }
+ else if (c == OP_CLASS || c == OP_NCLASS || c == OP_XCLASS)
+ {
+#ifdef SUPPORT_WIDE_CHARS
+ if (c == OP_XCLASS)
+ repeat_opcode = code + GET(code, 1);
+ else
+#endif
+ repeat_opcode = code + 1 + (32 / sizeof(PCRE2_UCHAR));
+
+ c = *repeat_opcode;
+ if (c >= OP_CRSTAR && c <= OP_CRMINRANGE)
+ {
+ /* end must not be NULL. */
+ end = get_chr_property_list(code, utf, cb->fcc, list);
+
+ list[1] = (c & 1) == 0;
+
+ if (compare_opcodes(end, utf, cb, list, end, &rec_limit))
+ {
+ switch (c)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ *repeat_opcode = OP_CRPOSSTAR;
+ break;
+
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ *repeat_opcode = OP_CRPOSPLUS;
+ break;
+
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ *repeat_opcode = OP_CRPOSQUERY;
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ *repeat_opcode = OP_CRPOSRANGE;
+ break;
+ }
+ }
+ }
+ c = *code;
+ }
+
+ switch(c)
+ {
+ case OP_END:
+ return 0;
+
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEPOSQUERY:
+ if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2;
+ break;
+
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEEXACT:
+ case OP_TYPEPOSUPTO:
+ if (code[1 + IMM2_SIZE] == OP_PROP || code[1 + IMM2_SIZE] == OP_NOTPROP)
+ code += 2;
+ break;
+
+ case OP_CALLOUT_STR:
+ code += GET(code, 1 + 2*LINK_SIZE);
+ break;
+
+#ifdef SUPPORT_WIDE_CHARS
+ case OP_XCLASS:
+ code += GET(code, 1);
+ break;
+#endif
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_SKIP_ARG:
+ case OP_THEN_ARG:
+ code += code[1];
+ break;
+ }
+
+ /* Add in the fixed length from the table */
+
+ code += PRIV(OP_lengths)[c];
+
+ /* In UTF-8 and UTF-16 modes, opcodes that are followed by a character may be
+ followed by a multi-byte character. The length in the table is a minimum, so
+ we have to arrange to skip the extra code units. */
+
+#ifdef MAYBE_UTF_MULTI
+ if (utf) switch(c)
+ {
+ case OP_CHAR:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_QUERY:
+ case OP_MINQUERY:
+ case OP_UPTO:
+ case OP_MINUPTO:
+ case OP_EXACT:
+ case OP_POSSTAR:
+ case OP_POSPLUS:
+ case OP_POSQUERY:
+ case OP_POSUPTO:
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_UPTOI:
+ case OP_MINUPTOI:
+ case OP_EXACTI:
+ case OP_POSSTARI:
+ case OP_POSPLUSI:
+ case OP_POSQUERYI:
+ case OP_POSUPTOI:
+ case OP_NOTSTAR:
+ case OP_NOTMINSTAR:
+ case OP_NOTPLUS:
+ case OP_NOTMINPLUS:
+ case OP_NOTQUERY:
+ case OP_NOTMINQUERY:
+ case OP_NOTUPTO:
+ case OP_NOTMINUPTO:
+ case OP_NOTEXACT:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSUPTO:
+ case OP_NOTSTARI:
+ case OP_NOTMINSTARI:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUSI:
+ case OP_NOTQUERYI:
+ case OP_NOTMINQUERYI:
+ case OP_NOTUPTOI:
+ case OP_NOTMINUPTOI:
+ case OP_NOTEXACTI:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSUPTOI:
+ if (HAS_EXTRALEN(code[-1])) code += GET_EXTRALEN(code[-1]);
+ break;
+ }
+#else
+ (void)(utf); /* Keep compiler happy by referencing function argument */
+#endif /* SUPPORT_WIDE_CHARS */
+ }
+}
+
+/* End of pcre2_auto_possess.c */
diff --git a/thirdparty/pcre2/src/pcre2_chartables.c b/thirdparty/pcre2/src/pcre2_chartables.c
new file mode 100644
index 0000000000..203cb1a4ab
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_chartables.c
@@ -0,0 +1,198 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* This file contains character tables that are used when no external tables
+are passed to PCRE2 by the application that calls it. The tables are used only
+for characters whose code values are less than 256.
+
+This is a default version of the tables that assumes ASCII encoding. A program
+called dftables (which is distributed with PCRE2) can be used to build
+alternative versions of this file. This is necessary if you are running in an
+EBCDIC environment, or if you want to default to a different encoding, for
+example ISO-8859-1. When dftables is run, it creates these tables in the
+current locale. If PCRE2 is configured with --enable-rebuild-chartables, this
+happens automatically.
+
+The following #includes are present because without them gcc 4.x may remove the
+array definition from the final binary if PCRE2 is built into a static library
+and dead code stripping is activated. This leads to link errors. Pulling in the
+header ensures that the array gets flagged as "someone outside this compilation
+unit might reference this" and so it will always be supplied to the linker. */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre2_internal.h"
+
+const uint8_t PRIV(default_tables)[] = {
+
+/* This table is a lower casing table. */
+
+ 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, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,
+ 104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,
+ 120,121,122, 91, 92, 93, 94, 95,
+ 96, 97, 98, 99,100,101,102,103,
+ 104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,
+ 120,121,122,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,
+ 136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,
+ 152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,
+ 168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,
+ 184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,
+ 200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,
+ 216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,
+ 232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,
+ 248,249,250,251,252,253,254,255,
+
+/* This table is a case flipping table. */
+
+ 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, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 97, 98, 99,100,101,102,103,
+ 104,105,106,107,108,109,110,111,
+ 112,113,114,115,116,117,118,119,
+ 120,121,122, 91, 92, 93, 94, 95,
+ 96, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79,
+ 80, 81, 82, 83, 84, 85, 86, 87,
+ 88, 89, 90,123,124,125,126,127,
+ 128,129,130,131,132,133,134,135,
+ 136,137,138,139,140,141,142,143,
+ 144,145,146,147,148,149,150,151,
+ 152,153,154,155,156,157,158,159,
+ 160,161,162,163,164,165,166,167,
+ 168,169,170,171,172,173,174,175,
+ 176,177,178,179,180,181,182,183,
+ 184,185,186,187,188,189,190,191,
+ 192,193,194,195,196,197,198,199,
+ 200,201,202,203,204,205,206,207,
+ 208,209,210,211,212,213,214,215,
+ 216,217,218,219,220,221,222,223,
+ 224,225,226,227,228,229,230,231,
+ 232,233,234,235,236,237,238,239,
+ 240,241,242,243,244,245,246,247,
+ 248,249,250,251,252,253,254,255,
+
+/* This table contains bit maps for various character classes. Each map is 32
+bytes long and the bits run from the least significant end of each byte. The
+classes that have their own maps are: space, xdigit, digit, upper, lower, word,
+graph, print, punct, and cntrl. Other classes are built from combinations. */
+
+ 0x00,0x3e,0x00,0x00,0x01,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,
+ 0x7e,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xfe,0xff,0xff,0x07,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0x07,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x03,
+ 0xfe,0xff,0xff,0x87,0xfe,0xff,0xff,0x07,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+
+ 0x00,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+
+ 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+
+ 0x00,0x00,0x00,0x00,0xfe,0xff,0x00,0xfc,
+ 0x01,0x00,0x00,0xf8,0x01,0x00,0x00,0x78,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+
+ 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+
+/* This table identifies various classes of character by individual bits:
+ 0x01 white space character
+ 0x02 letter
+ 0x04 decimal digit
+ 0x08 hexadecimal digit
+ 0x10 alphanumeric or '_'
+ 0x80 regular expression metacharacter or binary zero
+*/
+
+ 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 0- 7 */
+ 0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00, /* 8- 15 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 16- 23 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 24- 31 */
+ 0x01,0x00,0x00,0x00,0x80,0x00,0x00,0x00, /* - ' */
+ 0x80,0x80,0x80,0x80,0x00,0x00,0x80,0x00, /* ( - / */
+ 0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c, /* 0 - 7 */
+ 0x1c,0x1c,0x00,0x00,0x00,0x00,0x00,0x80, /* 8 - ? */
+ 0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* @ - G */
+ 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* H - O */
+ 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* P - W */
+ 0x12,0x12,0x12,0x80,0x80,0x00,0x80,0x10, /* X - _ */
+ 0x00,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x12, /* ` - g */
+ 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* h - o */
+ 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, /* p - w */
+ 0x12,0x12,0x12,0x80,0x80,0x00,0x00,0x00, /* x -127 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 128-135 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 136-143 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 144-151 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 152-159 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 160-167 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 168-175 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 176-183 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 184-191 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 192-199 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 200-207 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 208-215 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 216-223 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 224-231 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 232-239 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 240-247 */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};/* 248-255 */
+
+/* End of pcre2_chartables.c */
diff --git a/thirdparty/pcre2/src/pcre2_compile.c b/thirdparty/pcre2/src/pcre2_compile.c
new file mode 100644
index 0000000000..6d98a68caa
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_compile.c
@@ -0,0 +1,9517 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define NLBLOCK cb /* Block containing newline information */
+#define PSSTART start_pattern /* Field containing processed string start */
+#define PSEND end_pattern /* Field containing processed string end */
+
+#include "pcre2_internal.h"
+
+/* In rare error cases debugging might require calling pcre2_printint(). */
+
+#if 0
+#ifdef EBCDIC
+#define PRINTABLE(c) ((c) >= 64 && (c) < 255)
+#else
+#define PRINTABLE(c) ((c) >= 32 && (c) < 127)
+#endif
+#include "pcre2_printint.c"
+#define DEBUG_CALL_PRINTINT
+#endif
+
+/* Other debugging code can be enabled by these defines. */
+
+// #define DEBUG_SHOW_CAPTURES
+// #define DEBUG_SHOW_PARSED
+
+/* There are a few things that vary with different code unit sizes. Handle them
+by defining macros in order to minimize #if usage. */
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+#define STRING_UTFn_RIGHTPAR STRING_UTF8_RIGHTPAR, 5
+#define XDIGIT(c) xdigitab[c]
+
+#else /* Either 16-bit or 32-bit */
+#define XDIGIT(c) (MAX_255(c)? xdigitab[c] : 0xff)
+
+#if PCRE2_CODE_UNIT_WIDTH == 16
+#define STRING_UTFn_RIGHTPAR STRING_UTF16_RIGHTPAR, 6
+
+#else /* 32-bit */
+#define STRING_UTFn_RIGHTPAR STRING_UTF32_RIGHTPAR, 6
+#endif
+#endif
+
+/* Macros to store and retrieve a PCRE2_SIZE value in the parsed pattern, which
+consists of uint32_t elements. Assume that if uint32_t can't hold it, two of
+them will be able to (i.e. assume a 64-bit world). */
+
+#if PCRE2_SIZE_MAX <= UINT32_MAX
+#define PUTOFFSET(s,p) *p++ = s
+#define GETOFFSET(s,p) s = *p++
+#define GETPLUSOFFSET(s,p) s = *(++p)
+#define READPLUSOFFSET(s,p) s = p[1]
+#define SKIPOFFSET(p) p++
+#define SIZEOFFSET 1
+#else
+#define PUTOFFSET(s,p) \
+ { *p++ = (uint32_t)(s >> 32); *p++ = (uint32_t)(s & 0xffffffff); }
+#define GETOFFSET(s,p) \
+ { s = ((PCRE2_SIZE)p[0] << 32) | (PCRE2_SIZE)p[1]; p += 2; }
+#define GETPLUSOFFSET(s,p) \
+ { s = ((PCRE2_SIZE)p[1] << 32) | (PCRE2_SIZE)p[2]; p += 2; }
+#define READPLUSOFFSET(s,p) \
+ { s = ((PCRE2_SIZE)p[1] << 32) | (PCRE2_SIZE)p[2]; }
+#define SKIPOFFSET(p) p += 2
+#define SIZEOFFSET 2
+#endif
+
+/* Macros for manipulating elements of the parsed pattern vector. */
+
+#define META_CODE(x) (x & 0xffff0000u)
+#define META_DATA(x) (x & 0x0000ffffu)
+#define META_DIFF(x,y) ((x-y)>>16)
+
+/* Function definitions to allow mutual recursion */
+
+#ifdef SUPPORT_UNICODE
+static unsigned int
+ add_list_to_class_internal(uint8_t *, PCRE2_UCHAR **, uint32_t,
+ compile_block *, const uint32_t *, unsigned int);
+#endif
+
+static int
+ compile_regex(uint32_t, PCRE2_UCHAR **, uint32_t **, int *, uint32_t,
+ uint32_t *, int32_t *, uint32_t *, int32_t *, branch_chain *,
+ compile_block *, PCRE2_SIZE *);
+
+static int
+ get_branchlength(uint32_t **, int *, int *, parsed_recurse_check *,
+ compile_block *);
+
+static BOOL
+ set_lookbehind_lengths(uint32_t **, int *, int *, parsed_recurse_check *,
+ compile_block *);
+
+
+
+/*************************************************
+* Code parameters and static tables *
+*************************************************/
+
+#define MAX_GROUP_NUMBER 65535u
+#define MAX_REPEAT_COUNT 65535u
+#define REPEAT_UNLIMITED (MAX_REPEAT_COUNT+1)
+
+/* COMPILE_WORK_SIZE specifies the size of stack workspace, which is used in
+different ways in the different pattern scans. The parsing and group-
+identifying pre-scan uses it to handle nesting, and needs it to be 16-bit
+aligned for this. Having defined the size in code units, we set up
+C16_WORK_SIZE as the number of elements in the 16-bit vector.
+
+During the first compiling phase, when determining how much memory is required,
+the regex is partly compiled into this space, but the compiled parts are
+discarded as soon as they can be, so that hopefully there will never be an
+overrun. The code does, however, check for an overrun, which can occur for
+pathological patterns. The size of the workspace depends on LINK_SIZE because
+the length of compiled items varies with this.
+
+In the real compile phase, this workspace is not currently used. */
+
+#define COMPILE_WORK_SIZE (2048*LINK_SIZE) /* Size in code units */
+
+#define C16_WORK_SIZE \
+ ((COMPILE_WORK_SIZE * sizeof(PCRE2_UCHAR))/sizeof(uint16_t))
+
+/* A uint32_t vector is used for caching information about the size of
+capturing groups, to improve performance. A default is created on the stack of
+this size. */
+
+#define GROUPINFO_DEFAULT_SIZE 256
+
+/* The overrun tests check for a slightly smaller size so that they detect the
+overrun before it actually does run off the end of the data block. */
+
+#define WORK_SIZE_SAFETY_MARGIN (100)
+
+/* This value determines the size of the initial vector that is used for
+remembering named groups during the pre-compile. It is allocated on the stack,
+but if it is too small, it is expanded, in a similar way to the workspace. The
+value is the number of slots in the list. */
+
+#define NAMED_GROUP_LIST_SIZE 20
+
+/* The pre-compiling pass over the pattern creates a parsed pattern in a vector
+of uint32_t. For short patterns this lives on the stack, with this size. Heap
+memory is used for longer patterns. */
+
+#define PARSED_PATTERN_DEFAULT_SIZE 1024
+
+/* Maximum length value to check against when making sure that the variable
+that holds the compiled pattern length does not overflow. We make it a bit less
+than INT_MAX to allow for adding in group terminating code units, so that we
+don't have to check them every time. */
+
+#define OFLOW_MAX (INT_MAX - 20)
+
+/* Code values for parsed patterns, which are stored in a vector of 32-bit
+unsigned ints. Values less than META_END are literal data values. The coding
+for identifying the item is in the top 16-bits, leaving 16 bits for the
+additional data that some of them need. The META_CODE, META_DATA, and META_DIFF
+macros are used to manipulate parsed pattern elements.
+
+NOTE: When these definitions are changed, the table of extra lengths for each
+code (meta_extra_lengths, just below) must be updated to remain in step. */
+
+#define META_END 0x80000000u /* End of pattern */
+
+#define META_ALT 0x80010000u /* alternation */
+#define META_ATOMIC 0x80020000u /* atomic group */
+#define META_BACKREF 0x80030000u /* Back ref */
+#define META_BACKREF_BYNAME 0x80040000u /* \k'name' */
+#define META_BIGVALUE 0x80050000u /* Next is a literal > META_END */
+#define META_CALLOUT_NUMBER 0x80060000u /* (?C with numerical argument */
+#define META_CALLOUT_STRING 0x80070000u /* (?C with string argument */
+#define META_CAPTURE 0x80080000u /* Capturing parenthesis */
+#define META_CIRCUMFLEX 0x80090000u /* ^ metacharacter */
+#define META_CLASS 0x800a0000u /* start non-empty class */
+#define META_CLASS_EMPTY 0x800b0000u /* empty class */
+#define META_CLASS_EMPTY_NOT 0x800c0000u /* negative empty class */
+#define META_CLASS_END 0x800d0000u /* end of non-empty class */
+#define META_CLASS_NOT 0x800e0000u /* start non-empty negative class */
+#define META_COND_ASSERT 0x800f0000u /* (?(?assertion)... */
+#define META_COND_DEFINE 0x80100000u /* (?(DEFINE)... */
+#define META_COND_NAME 0x80110000u /* (?(<name>)... */
+#define META_COND_NUMBER 0x80120000u /* (?(digits)... */
+#define META_COND_RNAME 0x80130000u /* (?(R&name)... */
+#define META_COND_RNUMBER 0x80140000u /* (?(Rdigits)... */
+#define META_COND_VERSION 0x80150000u /* (?(VERSION<op>x.y)... */
+#define META_DOLLAR 0x80160000u /* $ metacharacter */
+#define META_DOT 0x80170000u /* . metacharacter */
+#define META_ESCAPE 0x80180000u /* \d and friends */
+#define META_KET 0x80190000u /* closing parenthesis */
+#define META_NOCAPTURE 0x801a0000u /* no capture parens */
+#define META_OPTIONS 0x801b0000u /* (?i) and friends */
+#define META_POSIX 0x801c0000u /* POSIX class item */
+#define META_POSIX_NEG 0x801d0000u /* negative POSIX class item */
+#define META_RANGE_ESCAPED 0x801e0000u /* range with at least one escape */
+#define META_RANGE_LITERAL 0x801f0000u /* range defined literally */
+#define META_RECURSE 0x80200000u /* Recursion */
+#define META_RECURSE_BYNAME 0x80210000u /* (?&name) */
+
+/* These must be kept together to make it easy to check that an assertion
+is present where expected in a conditional group. */
+
+#define META_LOOKAHEAD 0x80220000u /* (?= */
+#define META_LOOKAHEADNOT 0x80230000u /* (?! */
+#define META_LOOKBEHIND 0x80240000u /* (?<= */
+#define META_LOOKBEHINDNOT 0x80250000u /* (?<! */
+
+/* These must be kept in this order, with consecutive values, and the _ARG
+versions of PRUNE, SKIP, and THEN immediately after their non-argument
+versions. */
+
+#define META_MARK 0x80260000u /* (*MARK) */
+#define META_ACCEPT 0x80270000u /* (*ACCEPT) */
+#define META_COMMIT 0x80280000u /* (*COMMIT) */
+#define META_FAIL 0x80290000u /* (*FAIL) */
+#define META_PRUNE 0x802a0000u /* These pairs must */
+#define META_PRUNE_ARG 0x802b0000u /* be */
+#define META_SKIP 0x802c0000u /* kept */
+#define META_SKIP_ARG 0x802d0000u /* in */
+#define META_THEN 0x802e0000u /* this */
+#define META_THEN_ARG 0x802f0000u /* order */
+
+/* These must be kept in groups of adjacent 3 values, and all together. */
+
+#define META_ASTERISK 0x80300000u /* * */
+#define META_ASTERISK_PLUS 0x80310000u /* *+ */
+#define META_ASTERISK_QUERY 0x80320000u /* *? */
+#define META_PLUS 0x80330000u /* + */
+#define META_PLUS_PLUS 0x80340000u /* ++ */
+#define META_PLUS_QUERY 0x80350000u /* +? */
+#define META_QUERY 0x80360000u /* ? */
+#define META_QUERY_PLUS 0x80370000u /* ?+ */
+#define META_QUERY_QUERY 0x80380000u /* ?? */
+#define META_MINMAX 0x80390000u /* {n,m} repeat */
+#define META_MINMAX_PLUS 0x803a0000u /* {n,m}+ repeat */
+#define META_MINMAX_QUERY 0x803b0000u /* {n,m}? repeat */
+
+#define META_FIRST_QUANTIFIER META_ASTERISK
+#define META_LAST_QUANTIFIER META_MINMAX_QUERY
+
+/* Table of extra lengths for each of the meta codes. Must be kept in step with
+the definitions above. For some items these values are a basic length to which
+a variable amount has to be added. */
+
+static unsigned char meta_extra_lengths[] = {
+ 0, /* META_END */
+ 0, /* META_ALT */
+ 0, /* META_ATOMIC */
+ 0, /* META_BACKREF - more if group is >= 10 */
+ 1+SIZEOFFSET, /* META_BACKREF_BYNAME */
+ 1, /* META_BIGVALUE */
+ 3, /* META_CALLOUT_NUMBER */
+ 3+SIZEOFFSET, /* META_CALLOUT_STRING */
+ 0, /* META_CAPTURE */
+ 0, /* META_CIRCUMFLEX */
+ 0, /* META_CLASS */
+ 0, /* META_CLASS_EMPTY */
+ 0, /* META_CLASS_EMPTY_NOT */
+ 0, /* META_CLASS_END */
+ 0, /* META_CLASS_NOT */
+ 0, /* META_COND_ASSERT */
+ SIZEOFFSET, /* META_COND_DEFINE */
+ 1+SIZEOFFSET, /* META_COND_NAME */
+ 1+SIZEOFFSET, /* META_COND_NUMBER */
+ 1+SIZEOFFSET, /* META_COND_RNAME */
+ 1+SIZEOFFSET, /* META_COND_RNUMBER */
+ 3, /* META_COND_VERSION */
+ 0, /* META_DOLLAR */
+ 0, /* META_DOT */
+ 0, /* META_ESCAPE - more for ESC_P, ESC_p, ESC_g, ESC_k */
+ 0, /* META_KET */
+ 0, /* META_NOCAPTURE */
+ 1, /* META_OPTIONS */
+ 1, /* META_POSIX */
+ 1, /* META_POSIX_NEG */
+ 0, /* META_RANGE_ESCAPED */
+ 0, /* META_RANGE_LITERAL */
+ SIZEOFFSET, /* META_RECURSE */
+ 1+SIZEOFFSET, /* META_RECURSE_BYNAME */
+ 0, /* META_LOOKAHEAD */
+ 0, /* META_LOOKAHEADNOT */
+ SIZEOFFSET, /* META_LOOKBEHIND */
+ SIZEOFFSET, /* META_LOOKBEHINDNOT */
+ 1, /* META_MARK - plus the string length */
+ 0, /* META_ACCEPT */
+ 0, /* META_COMMIT */
+ 0, /* META_FAIL */
+ 0, /* META_PRUNE */
+ 1, /* META_PRUNE_ARG - plus the string length */
+ 0, /* META_SKIP */
+ 1, /* META_SKIP_ARG - plus the string length */
+ 0, /* META_THEN */
+ 1, /* META_THEN_ARG - plus the string length */
+ 0, /* META_ASTERISK */
+ 0, /* META_ASTERISK_PLUS */
+ 0, /* META_ASTERISK_QUERY */
+ 0, /* META_PLUS */
+ 0, /* META_PLUS_PLUS */
+ 0, /* META_PLUS_QUERY */
+ 0, /* META_QUERY */
+ 0, /* META_QUERY_PLUS */
+ 0, /* META_QUERY_QUERY */
+ 2, /* META_MINMAX */
+ 2, /* META_MINMAX_PLUS */
+ 2 /* META_MINMAX_QUERY */
+};
+
+/* Types for skipping parts of a parsed pattern. */
+
+enum { PSKIP_ALT, PSKIP_CLASS, PSKIP_KET };
+
+/* Macro for setting individual bits in class bitmaps. It took some
+experimenting to figure out how to stop gcc 5.3.0 from warning with
+-Wconversion. This version gets a warning:
+
+ #define SETBIT(a,b) a[(b)/8] |= (uint8_t)(1 << ((b)&7))
+
+Let's hope the apparently less efficient version isn't actually so bad if the
+compiler is clever with identical subexpressions. */
+
+#define SETBIT(a,b) a[(b)/8] = (uint8_t)(a[(b)/8] | (1 << ((b)&7)))
+
+/* Private flags added to firstcu and reqcu. */
+
+#define REQ_CASELESS (1 << 0) /* Indicates caselessness */
+#define REQ_VARY (1 << 1) /* reqcu followed non-literal item */
+/* Negative values for the firstcu and reqcu flags */
+#define REQ_UNSET (-2) /* Not yet found anything */
+#define REQ_NONE (-1) /* Found not fixed char */
+
+/* These flags are used in the groupinfo vector. */
+
+#define GI_SET_FIXED_LENGTH 0x80000000u
+#define GI_NOT_FIXED_LENGTH 0x40000000u
+#define GI_FIXED_LENGTH_MASK 0x0000ffffu
+
+/* This simple test for a decimal digit works for both ASCII/Unicode and EBCDIC
+and is fast (a good compiler can turn it into a subtraction and unsigned
+comparison). */
+
+#define IS_DIGIT(x) ((x) >= CHAR_0 && (x) <= CHAR_9)
+
+/* Table to identify hex digits. The tables in chartables are dependent on the
+locale, and may mark arbitrary characters as digits. We want to recognize only
+0-9, a-z, and A-Z as hex digits, which is why we have a private table here. It
+costs 256 bytes, but it is a lot faster than doing character value tests (at
+least in some simple cases I timed), and in some applications one wants PCRE2
+to compile efficiently as well as match efficiently. The value in the table is
+the binary hex digit value, or 0xff for non-hex digits. */
+
+/* This is the "normal" case, for ASCII systems, and EBCDIC systems running in
+UTF-8 mode. */
+
+#ifndef EBCDIC
+static const uint8_t xdigitab[] =
+ {
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 0- 7 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 8- 15 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 16- 23 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 24- 31 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* - ' */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* ( - / */
+ 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, /* 0 - 7 */
+ 0x08,0x09,0xff,0xff,0xff,0xff,0xff,0xff, /* 8 - ? */
+ 0xff,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0xff, /* @ - G */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* H - O */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* P - W */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* X - _ */
+ 0xff,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0xff, /* ` - g */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* h - o */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* p - w */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* x -127 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 128-135 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 136-143 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 144-151 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 152-159 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 160-167 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 168-175 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 176-183 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 184-191 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 192-199 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 2ff-207 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 208-215 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 216-223 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 224-231 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 232-239 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 240-247 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff};/* 248-255 */
+
+#else
+
+/* This is the "abnormal" case, for EBCDIC systems not running in UTF-8 mode. */
+
+static const uint8_t xdigitab[] =
+ {
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 0- 7 0 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 8- 15 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 16- 23 10 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 24- 31 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 32- 39 20 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 40- 47 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 48- 55 30 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 56- 63 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* - 71 40 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 72- | */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* & - 87 50 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 88- 95 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* - -103 60 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 104- ? */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 112-119 70 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 120- " */
+ 0xff,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0xff, /* 128- g 80 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* h -143 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 144- p 90 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* q -159 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 160- x A0 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* y -175 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* ^ -183 B0 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* 184-191 */
+ 0xff,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0xff, /* { - G C0 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* H -207 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* } - P D0 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* Q -223 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* \ - X E0 */
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, /* Y -239 */
+ 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, /* 0 - 7 F0 */
+ 0x08,0x09,0xff,0xff,0xff,0xff,0xff,0xff};/* 8 -255 */
+#endif /* EBCDIC */
+
+
+/* Table for handling alphanumeric escaped characters. Positive returns are
+simple data values; negative values are for special things like \d and so on.
+Zero means further processing is needed (for things like \x), or the escape is
+invalid. */
+
+/* This is the "normal" table for ASCII systems or for EBCDIC systems running
+in UTF-8 mode. It runs from '0' to 'z'. */
+
+#ifndef EBCDIC
+#define ESCAPES_FIRST CHAR_0
+#define ESCAPES_LAST CHAR_z
+#define UPPER_CASE(c) (c-32)
+
+static const short int escapes[] = {
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ CHAR_COLON, CHAR_SEMICOLON,
+ CHAR_LESS_THAN_SIGN, CHAR_EQUALS_SIGN,
+ CHAR_GREATER_THAN_SIGN, CHAR_QUESTION_MARK,
+ CHAR_COMMERCIAL_AT, -ESC_A,
+ -ESC_B, -ESC_C,
+ -ESC_D, -ESC_E,
+ 0, -ESC_G,
+ -ESC_H, 0,
+ 0, -ESC_K,
+ 0, 0,
+ -ESC_N, 0,
+ -ESC_P, -ESC_Q,
+ -ESC_R, -ESC_S,
+ 0, 0,
+ -ESC_V, -ESC_W,
+ -ESC_X, 0,
+ -ESC_Z, CHAR_LEFT_SQUARE_BRACKET,
+ CHAR_BACKSLASH, CHAR_RIGHT_SQUARE_BRACKET,
+ CHAR_CIRCUMFLEX_ACCENT, CHAR_UNDERSCORE,
+ CHAR_GRAVE_ACCENT, ESC_a,
+ -ESC_b, 0,
+ -ESC_d, ESC_e,
+ ESC_f, 0,
+ -ESC_h, 0,
+ 0, -ESC_k,
+ 0, 0,
+ ESC_n, 0,
+ -ESC_p, 0,
+ ESC_r, -ESC_s,
+ ESC_tee, 0,
+ -ESC_v, -ESC_w,
+ 0, 0,
+ -ESC_z
+};
+
+#else
+
+/* This is the "abnormal" table for EBCDIC systems without UTF-8 support.
+It runs from 'a' to '9'. For some minimal testing of EBCDIC features, the code
+is sometimes compiled on an ASCII system. In this case, we must not use CHAR_a
+because it is defined as 'a', which of course picks up the ASCII value. */
+
+#if 'a' == 0x81 /* Check for a real EBCDIC environment */
+#define ESCAPES_FIRST CHAR_a
+#define ESCAPES_LAST CHAR_9
+#define UPPER_CASE(c) (c+64)
+#else /* Testing in an ASCII environment */
+#define ESCAPES_FIRST ((unsigned char)'\x81') /* EBCDIC 'a' */
+#define ESCAPES_LAST ((unsigned char)'\xf9') /* EBCDIC '9' */
+#define UPPER_CASE(c) (c-32)
+#endif
+
+static const short int escapes[] = {
+/* 80 */ ESC_a, -ESC_b, 0, -ESC_d, ESC_e, ESC_f, 0,
+/* 88 */-ESC_h, 0, 0, '{', 0, 0, 0, 0,
+/* 90 */ 0, 0, -ESC_k, 0, 0, ESC_n, 0, -ESC_p,
+/* 98 */ 0, ESC_r, 0, '}', 0, 0, 0, 0,
+/* A0 */ 0, '~', -ESC_s, ESC_tee, 0,-ESC_v, -ESC_w, 0,
+/* A8 */ 0,-ESC_z, 0, 0, 0, '[', 0, 0,
+/* B0 */ 0, 0, 0, 0, 0, 0, 0, 0,
+/* B8 */ 0, 0, 0, 0, 0, ']', '=', '-',
+/* C0 */ '{',-ESC_A, -ESC_B, -ESC_C, -ESC_D,-ESC_E, 0, -ESC_G,
+/* C8 */-ESC_H, 0, 0, 0, 0, 0, 0, 0,
+/* D0 */ '}', 0, -ESC_K, 0, 0,-ESC_N, 0, -ESC_P,
+/* D8 */-ESC_Q,-ESC_R, 0, 0, 0, 0, 0, 0,
+/* E0 */ '\\', 0, -ESC_S, 0, 0,-ESC_V, -ESC_W, -ESC_X,
+/* E8 */ 0,-ESC_Z, 0, 0, 0, 0, 0, 0,
+/* F0 */ 0, 0, 0, 0, 0, 0, 0, 0,
+/* F8 */ 0, 0
+};
+
+/* We also need a table of characters that may follow \c in an EBCDIC
+environment for characters 0-31. */
+
+static unsigned char ebcdic_escape_c[] = "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_";
+
+#endif /* EBCDIC */
+
+
+/* Table of special "verbs" like (*PRUNE). This is a short table, so it is
+searched linearly. Put all the names into a single string, in order to reduce
+the number of relocations when a shared library is dynamically linked. The
+string is built from string macros so that it works in UTF-8 mode on EBCDIC
+platforms. */
+
+typedef struct verbitem {
+ unsigned int len; /* Length of verb name */
+ uint32_t meta; /* Base META_ code */
+ int has_arg; /* Argument requirement */
+} verbitem;
+
+static const char verbnames[] =
+ "\0" /* Empty name is a shorthand for MARK */
+ STRING_MARK0
+ STRING_ACCEPT0
+ STRING_COMMIT0
+ STRING_F0
+ STRING_FAIL0
+ STRING_PRUNE0
+ STRING_SKIP0
+ STRING_THEN;
+
+static const verbitem verbs[] = {
+ { 0, META_MARK, +1 }, /* > 0 => must have an argument */
+ { 4, META_MARK, +1 },
+ { 6, META_ACCEPT, -1 }, /* < 0 => must not have an argument */
+ { 6, META_COMMIT, -1 },
+ { 1, META_FAIL, -1 },
+ { 4, META_FAIL, -1 },
+ { 5, META_PRUNE, 0 }, /* Argument is optional; bump META code if found */
+ { 4, META_SKIP, 0 },
+ { 4, META_THEN, 0 }
+};
+
+static const int verbcount = sizeof(verbs)/sizeof(verbitem);
+
+/* Verb opcodes, indexed by their META code offset from META_MARK. */
+
+static const uint32_t verbops[] = {
+ OP_MARK, OP_ACCEPT, OP_COMMIT, OP_FAIL, OP_PRUNE, OP_PRUNE_ARG, OP_SKIP,
+ OP_SKIP_ARG, OP_THEN, OP_THEN_ARG };
+
+/* Offsets from OP_STAR for case-independent and negative repeat opcodes. */
+
+static uint32_t chartypeoffset[] = {
+ OP_STAR - OP_STAR, OP_STARI - OP_STAR,
+ OP_NOTSTAR - OP_STAR, OP_NOTSTARI - OP_STAR };
+
+/* Tables of names of POSIX character classes and their lengths. The names are
+now all in a single string, to reduce the number of relocations when a shared
+library is dynamically loaded. The list of lengths is terminated by a zero
+length entry. The first three must be alpha, lower, upper, as this is assumed
+for handling case independence. The indices for graph, print, and punct are
+needed, so identify them. */
+
+static const char posix_names[] =
+ STRING_alpha0 STRING_lower0 STRING_upper0 STRING_alnum0
+ STRING_ascii0 STRING_blank0 STRING_cntrl0 STRING_digit0
+ STRING_graph0 STRING_print0 STRING_punct0 STRING_space0
+ STRING_word0 STRING_xdigit;
+
+static const uint8_t posix_name_lengths[] = {
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 6, 0 };
+
+#define PC_GRAPH 8
+#define PC_PRINT 9
+#define PC_PUNCT 10
+
+/* Table of class bit maps for each POSIX class. Each class is formed from a
+base map, with an optional addition or removal of another map. Then, for some
+classes, there is some additional tweaking: for [:blank:] the vertical space
+characters are removed, and for [:alpha:] and [:alnum:] the underscore
+character is removed. The triples in the table consist of the base map offset,
+second map offset or -1 if no second map, and a non-negative value for map
+addition or a negative value for map subtraction (if there are two maps). The
+absolute value of the third field has these meanings: 0 => no tweaking, 1 =>
+remove vertical space characters, 2 => remove underscore. */
+
+static const int posix_class_maps[] = {
+ cbit_word, cbit_digit, -2, /* alpha */
+ cbit_lower, -1, 0, /* lower */
+ cbit_upper, -1, 0, /* upper */
+ cbit_word, -1, 2, /* alnum - word without underscore */
+ cbit_print, cbit_cntrl, 0, /* ascii */
+ cbit_space, -1, 1, /* blank - a GNU extension */
+ cbit_cntrl, -1, 0, /* cntrl */
+ cbit_digit, -1, 0, /* digit */
+ cbit_graph, -1, 0, /* graph */
+ cbit_print, -1, 0, /* print */
+ cbit_punct, -1, 0, /* punct */
+ cbit_space, -1, 0, /* space */
+ cbit_word, -1, 0, /* word - a Perl extension */
+ cbit_xdigit,-1, 0 /* xdigit */
+};
+
+#ifdef SUPPORT_UNICODE
+
+/* The POSIX class Unicode property substitutes that are used in UCP mode must
+be in the order of the POSIX class names, defined above. */
+
+static int posix_substitutes[] = {
+ PT_GC, ucp_L, /* alpha */
+ PT_PC, ucp_Ll, /* lower */
+ PT_PC, ucp_Lu, /* upper */
+ PT_ALNUM, 0, /* alnum */
+ -1, 0, /* ascii, treat as non-UCP */
+ -1, 1, /* blank, treat as \h */
+ PT_PC, ucp_Cc, /* cntrl */
+ PT_PC, ucp_Nd, /* digit */
+ PT_PXGRAPH, 0, /* graph */
+ PT_PXPRINT, 0, /* print */
+ PT_PXPUNCT, 0, /* punct */
+ PT_PXSPACE, 0, /* space */ /* Xps is POSIX space, but from 8.34 */
+ PT_WORD, 0, /* word */ /* Perl and POSIX space are the same */
+ -1, 0 /* xdigit, treat as non-UCP */
+};
+#define POSIX_SUBSIZE (sizeof(posix_substitutes) / (2*sizeof(uint32_t)))
+#endif /* SUPPORT_UNICODE */
+
+/* Masks for checking option settings. */
+
+#define PUBLIC_COMPILE_OPTIONS \
+ (PCRE2_ANCHORED|PCRE2_ALLOW_EMPTY_CLASS|PCRE2_ALT_BSUX|PCRE2_ALT_CIRCUMFLEX| \
+ PCRE2_ALT_VERBNAMES|PCRE2_AUTO_CALLOUT|PCRE2_CASELESS|PCRE2_DOLLAR_ENDONLY| \
+ PCRE2_DOTALL|PCRE2_DUPNAMES|PCRE2_EXTENDED|PCRE2_FIRSTLINE| \
+ PCRE2_MATCH_UNSET_BACKREF|PCRE2_MULTILINE|PCRE2_NEVER_BACKSLASH_C| \
+ PCRE2_NEVER_UCP|PCRE2_NEVER_UTF|PCRE2_NO_AUTO_CAPTURE| \
+ PCRE2_NO_AUTO_POSSESS|PCRE2_NO_DOTSTAR_ANCHOR|PCRE2_NO_START_OPTIMIZE| \
+ PCRE2_NO_UTF_CHECK|PCRE2_UCP|PCRE2_UNGREEDY|PCRE2_USE_OFFSET_LIMIT| \
+ PCRE2_UTF)
+
+/* Compile time error code numbers. They are given names so that they can more
+easily be tracked. When a new number is added, the tables called eint1 and
+eint2 in pcre2posix.c may need to be updated, and a new error text must be
+added to compile_error_texts in pcre2_error.c. */
+
+enum { ERR0 = COMPILE_ERROR_BASE,
+ ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9, ERR10,
+ ERR11, ERR12, ERR13, ERR14, ERR15, ERR16, ERR17, ERR18, ERR19, ERR20,
+ ERR21, ERR22, ERR23, ERR24, ERR25, ERR26, ERR27, ERR28, ERR29, ERR30,
+ ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39, ERR40,
+ ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49, ERR50,
+ ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59, ERR60,
+ ERR61, ERR62, ERR63, ERR64, ERR65, ERR66, ERR67, ERR68, ERR69, ERR70,
+ ERR71, ERR72, ERR73, ERR74, ERR75, ERR76, ERR77, ERR78, ERR79, ERR80,
+ ERR81, ERR82, ERR83, ERR84, ERR85, ERR86, ERR87, ERR88, ERR89, ERR90 };
+
+/* This is a table of start-of-pattern options such as (*UTF) and settings such
+as (*LIMIT_MATCH=nnnn) and (*CRLF). For completeness and backward
+compatibility, (*UTFn) is supported in the relevant libraries, but (*UTF) is
+generic and always supported. */
+
+enum { PSO_OPT, /* Value is an option bit */
+ PSO_FLG, /* Value is a flag bit */
+ PSO_NL, /* Value is a newline type */
+ PSO_BSR, /* Value is a \R type */
+ PSO_LIMM, /* Read integer value for match limit */
+ PSO_LIMR }; /* Read integer value for recursion limit */
+
+typedef struct pso {
+ const uint8_t *name;
+ uint16_t length;
+ uint16_t type;
+ uint32_t value;
+} pso;
+
+/* NB: STRING_UTFn_RIGHTPAR contains the length as well */
+
+static pso pso_list[] = {
+ { (uint8_t *)STRING_UTFn_RIGHTPAR, PSO_OPT, PCRE2_UTF },
+ { (uint8_t *)STRING_UTF_RIGHTPAR, 4, PSO_OPT, PCRE2_UTF },
+ { (uint8_t *)STRING_UCP_RIGHTPAR, 4, PSO_OPT, PCRE2_UCP },
+ { (uint8_t *)STRING_NOTEMPTY_RIGHTPAR, 9, PSO_FLG, PCRE2_NOTEMPTY_SET },
+ { (uint8_t *)STRING_NOTEMPTY_ATSTART_RIGHTPAR, 17, PSO_FLG, PCRE2_NE_ATST_SET },
+ { (uint8_t *)STRING_NO_AUTO_POSSESS_RIGHTPAR, 16, PSO_OPT, PCRE2_NO_AUTO_POSSESS },
+ { (uint8_t *)STRING_NO_DOTSTAR_ANCHOR_RIGHTPAR, 18, PSO_OPT, PCRE2_NO_DOTSTAR_ANCHOR },
+ { (uint8_t *)STRING_NO_JIT_RIGHTPAR, 7, PSO_FLG, PCRE2_NOJIT },
+ { (uint8_t *)STRING_NO_START_OPT_RIGHTPAR, 13, PSO_OPT, PCRE2_NO_START_OPTIMIZE },
+ { (uint8_t *)STRING_LIMIT_MATCH_EQ, 12, PSO_LIMM, 0 },
+ { (uint8_t *)STRING_LIMIT_RECURSION_EQ, 16, PSO_LIMR, 0 },
+ { (uint8_t *)STRING_CR_RIGHTPAR, 3, PSO_NL, PCRE2_NEWLINE_CR },
+ { (uint8_t *)STRING_LF_RIGHTPAR, 3, PSO_NL, PCRE2_NEWLINE_LF },
+ { (uint8_t *)STRING_CRLF_RIGHTPAR, 5, PSO_NL, PCRE2_NEWLINE_CRLF },
+ { (uint8_t *)STRING_ANY_RIGHTPAR, 4, PSO_NL, PCRE2_NEWLINE_ANY },
+ { (uint8_t *)STRING_ANYCRLF_RIGHTPAR, 8, PSO_NL, PCRE2_NEWLINE_ANYCRLF },
+ { (uint8_t *)STRING_BSR_ANYCRLF_RIGHTPAR, 12, PSO_BSR, PCRE2_BSR_ANYCRLF },
+ { (uint8_t *)STRING_BSR_UNICODE_RIGHTPAR, 12, PSO_BSR, PCRE2_BSR_UNICODE }
+};
+
+/* This table is used when converting repeating opcodes into possessified
+versions as a result of an explicit possessive quantifier such as ++. A zero
+value means there is no possessified version - in those cases the item in
+question must be wrapped in ONCE brackets. The table is truncated at OP_CALLOUT
+because all relevant opcodes are less than that. */
+
+static const uint8_t opcode_possessify[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0 - 15 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16 - 31 */
+
+ 0, /* NOTI */
+ OP_POSSTAR, 0, /* STAR, MINSTAR */
+ OP_POSPLUS, 0, /* PLUS, MINPLUS */
+ OP_POSQUERY, 0, /* QUERY, MINQUERY */
+ OP_POSUPTO, 0, /* UPTO, MINUPTO */
+ 0, /* EXACT */
+ 0, 0, 0, 0, /* POS{STAR,PLUS,QUERY,UPTO} */
+
+ OP_POSSTARI, 0, /* STARI, MINSTARI */
+ OP_POSPLUSI, 0, /* PLUSI, MINPLUSI */
+ OP_POSQUERYI, 0, /* QUERYI, MINQUERYI */
+ OP_POSUPTOI, 0, /* UPTOI, MINUPTOI */
+ 0, /* EXACTI */
+ 0, 0, 0, 0, /* POS{STARI,PLUSI,QUERYI,UPTOI} */
+
+ OP_NOTPOSSTAR, 0, /* NOTSTAR, NOTMINSTAR */
+ OP_NOTPOSPLUS, 0, /* NOTPLUS, NOTMINPLUS */
+ OP_NOTPOSQUERY, 0, /* NOTQUERY, NOTMINQUERY */
+ OP_NOTPOSUPTO, 0, /* NOTUPTO, NOTMINUPTO */
+ 0, /* NOTEXACT */
+ 0, 0, 0, 0, /* NOTPOS{STAR,PLUS,QUERY,UPTO} */
+
+ OP_NOTPOSSTARI, 0, /* NOTSTARI, NOTMINSTARI */
+ OP_NOTPOSPLUSI, 0, /* NOTPLUSI, NOTMINPLUSI */
+ OP_NOTPOSQUERYI, 0, /* NOTQUERYI, NOTMINQUERYI */
+ OP_NOTPOSUPTOI, 0, /* NOTUPTOI, NOTMINUPTOI */
+ 0, /* NOTEXACTI */
+ 0, 0, 0, 0, /* NOTPOS{STARI,PLUSI,QUERYI,UPTOI} */
+
+ OP_TYPEPOSSTAR, 0, /* TYPESTAR, TYPEMINSTAR */
+ OP_TYPEPOSPLUS, 0, /* TYPEPLUS, TYPEMINPLUS */
+ OP_TYPEPOSQUERY, 0, /* TYPEQUERY, TYPEMINQUERY */
+ OP_TYPEPOSUPTO, 0, /* TYPEUPTO, TYPEMINUPTO */
+ 0, /* TYPEEXACT */
+ 0, 0, 0, 0, /* TYPEPOS{STAR,PLUS,QUERY,UPTO} */
+
+ OP_CRPOSSTAR, 0, /* CRSTAR, CRMINSTAR */
+ OP_CRPOSPLUS, 0, /* CRPLUS, CRMINPLUS */
+ OP_CRPOSQUERY, 0, /* CRQUERY, CRMINQUERY */
+ OP_CRPOSRANGE, 0, /* CRRANGE, CRMINRANGE */
+ 0, 0, 0, 0, /* CRPOS{STAR,PLUS,QUERY,RANGE} */
+
+ 0, 0, 0, /* CLASS, NCLASS, XCLASS */
+ 0, 0, /* REF, REFI */
+ 0, 0, /* DNREF, DNREFI */
+ 0, 0 /* RECURSE, CALLOUT */
+};
+
+
+#ifdef DEBUG_SHOW_PARSED
+/*************************************************
+* Show the parsed pattern for debugging *
+*************************************************/
+
+/* For debugging the pre-scan, this code, which outputs the parsed data vector,
+can be enabled. */
+
+static void show_parsed(compile_block *cb)
+{
+uint32_t *pptr = cb->parsed_pattern;
+
+for (;;)
+ {
+ int max, min;
+ PCRE2_SIZE offset;
+ uint32_t i;
+ uint32_t length;
+ uint32_t meta_arg = META_DATA(*pptr);
+
+ fprintf(stderr, "+++ %02d %.8x ", (int)(pptr - cb->parsed_pattern), *pptr);
+
+ if (*pptr < META_END)
+ {
+ if (*pptr > 32 && *pptr < 128) fprintf(stderr, "%c", *pptr);
+ pptr++;
+ }
+
+ else switch (META_CODE(*pptr++))
+ {
+ default:
+ fprintf(stderr, "**** OOPS - unknown META value - giving up ****\n");
+ return;
+
+ case META_END:
+ fprintf(stderr, "META_END\n");
+ return;
+
+ case META_CAPTURE:
+ fprintf(stderr, "META_CAPTURE %d", meta_arg);
+ break;
+
+ case META_RECURSE:
+ GETOFFSET(offset, pptr);
+ fprintf(stderr, "META_RECURSE %d %zd", meta_arg, offset);
+ break;
+
+ case META_BACKREF:
+ if (meta_arg < 10)
+ offset = cb->small_ref_offset[meta_arg];
+ else
+ GETOFFSET(offset, pptr);
+ fprintf(stderr, "META_BACKREF %d %zd", meta_arg, offset);
+ break;
+
+ case META_ESCAPE:
+ if (meta_arg == ESC_P || meta_arg == ESC_p)
+ {
+ uint32_t ptype = *pptr >> 16;
+ uint32_t pvalue = *pptr++ & 0xffff;
+ fprintf(stderr, "META \\%c %d %d", (meta_arg == ESC_P)? 'P':'p',
+ ptype, pvalue);
+ }
+ else
+ {
+ uint32_t cc;
+ /* There's just one escape we might have here that isn't negated in the
+ escapes table. */
+ if (meta_arg == ESC_g) cc = CHAR_g;
+ else for (cc = ESCAPES_FIRST; cc <= ESCAPES_LAST; cc++)
+ {
+ if (meta_arg == (uint32_t)(-escapes[cc - ESCAPES_FIRST])) break;
+ }
+ if (cc > ESCAPES_LAST) cc = CHAR_QUESTION_MARK;
+ fprintf(stderr, "META \\%c", cc);
+ }
+ break;
+
+ case META_MINMAX:
+ min = *pptr++;
+ max = *pptr++;
+ if (max != REPEAT_UNLIMITED)
+ fprintf(stderr, "META {%d,%d}", min, max);
+ else
+ fprintf(stderr, "META {%d,}", min);
+ break;
+
+ case META_MINMAX_QUERY:
+ min = *pptr++;
+ max = *pptr++;
+ if (max != REPEAT_UNLIMITED)
+ fprintf(stderr, "META {%d,%d}?", min, max);
+ else
+ fprintf(stderr, "META {%d,}?", min);
+ break;
+
+ case META_MINMAX_PLUS:
+ min = *pptr++;
+ max = *pptr++;
+ if (max != REPEAT_UNLIMITED)
+ fprintf(stderr, "META {%d,%d}+", min, max);
+ else
+ fprintf(stderr, "META {%d,}+", min);
+ break;
+
+ case META_BIGVALUE: fprintf(stderr, "META_BIGVALUE %.8x", *pptr++); break;
+ case META_CIRCUMFLEX: fprintf(stderr, "META_CIRCUMFLEX"); break;
+ case META_COND_ASSERT: fprintf(stderr, "META_COND_ASSERT"); break;
+ case META_DOLLAR: fprintf(stderr, "META_DOLLAR"); break;
+ case META_DOT: fprintf(stderr, "META_DOT"); break;
+ case META_ASTERISK: fprintf(stderr, "META *"); break;
+ case META_ASTERISK_QUERY: fprintf(stderr, "META *?"); break;
+ case META_ASTERISK_PLUS: fprintf(stderr, "META *+"); break;
+ case META_PLUS: fprintf(stderr, "META +"); break;
+ case META_PLUS_QUERY: fprintf(stderr, "META +?"); break;
+ case META_PLUS_PLUS: fprintf(stderr, "META ++"); break;
+ case META_QUERY: fprintf(stderr, "META ?"); break;
+ case META_QUERY_QUERY: fprintf(stderr, "META ??"); break;
+ case META_QUERY_PLUS: fprintf(stderr, "META ?+"); break;
+
+ case META_ATOMIC: fprintf(stderr, "META (?>"); break;
+ case META_NOCAPTURE: fprintf(stderr, "META (?:"); break;
+ case META_LOOKAHEAD: fprintf(stderr, "META (?="); break;
+ case META_LOOKAHEADNOT: fprintf(stderr, "META (?!"); break;
+ case META_KET: fprintf(stderr, "META )"); break;
+ case META_ALT: fprintf(stderr, "META | %d", meta_arg); break;
+
+ case META_CLASS: fprintf(stderr, "META ["); break;
+ case META_CLASS_NOT: fprintf(stderr, "META [^"); break;
+ case META_CLASS_END: fprintf(stderr, "META ]"); break;
+ case META_CLASS_EMPTY: fprintf(stderr, "META []"); break;
+ case META_CLASS_EMPTY_NOT: fprintf(stderr, "META [^]"); break;
+
+ case META_RANGE_LITERAL: fprintf(stderr, "META - (literal)"); break;
+ case META_RANGE_ESCAPED: fprintf(stderr, "META - (escaped)"); break;
+
+ case META_POSIX: fprintf(stderr, "META_POSIX %d", *pptr++); break;
+ case META_POSIX_NEG: fprintf(stderr, "META_POSIX_NEG %d", *pptr++); break;
+
+ case META_ACCEPT: fprintf(stderr, "META (*ACCEPT)"); break;
+ case META_COMMIT: fprintf(stderr, "META (*COMMIT)"); break;
+ case META_FAIL: fprintf(stderr, "META (*FAIL)"); break;
+ case META_PRUNE: fprintf(stderr, "META (*PRUNE)"); break;
+ case META_SKIP: fprintf(stderr, "META (*SKIP)"); break;
+ case META_THEN: fprintf(stderr, "META (*THEN)"); break;
+
+ case META_OPTIONS: fprintf(stderr, "META_OPTIONS 0x%02x", *pptr++); break;
+
+ case META_LOOKBEHIND:
+ fprintf(stderr, "META (?<= %d offset=", meta_arg);
+ GETOFFSET(offset, pptr);
+ fprintf(stderr, "%zd", offset);
+ break;
+
+ case META_LOOKBEHINDNOT:
+ fprintf(stderr, "META (?<! %d offset=", meta_arg);
+ GETOFFSET(offset, pptr);
+ fprintf(stderr, "%zd", offset);
+ break;
+
+ case META_CALLOUT_NUMBER:
+ fprintf(stderr, "META (?C%d) next=%d/%d", pptr[2], pptr[0],
+ pptr[1]);
+ pptr += 3;
+ break;
+
+ case META_CALLOUT_STRING:
+ {
+ uint32_t patoffset = *pptr++; /* Offset of next pattern item */
+ uint32_t patlength = *pptr++; /* Length of next pattern item */
+ fprintf(stderr, "META (?Cstring) length=%d offset=", *pptr++);
+ GETOFFSET(offset, pptr);
+ fprintf(stderr, "%zd next=%d/%d", offset, patoffset, patlength);
+ }
+ break;
+
+ case META_RECURSE_BYNAME:
+ fprintf(stderr, "META (?(&name) length=%d offset=", *pptr++);
+ GETOFFSET(offset, pptr);
+ fprintf(stderr, "%zd", offset);
+ break;
+
+ case META_BACKREF_BYNAME:
+ fprintf(stderr, "META_BACKREF_BYNAME length=%d offset=", *pptr++);
+ GETOFFSET(offset, pptr);
+ fprintf(stderr, "%zd", offset);
+ break;
+
+ case META_COND_NUMBER:
+ fprintf(stderr, "META_COND_NUMBER %d offset=", pptr[SIZEOFFSET]);
+ GETOFFSET(offset, pptr);
+ fprintf(stderr, "%zd", offset);
+ pptr++;
+ break;
+
+ case META_COND_DEFINE:
+ fprintf(stderr, "META (?(DEFINE) offset=");
+ GETOFFSET(offset, pptr);
+ fprintf(stderr, "%zd", offset);
+ break;
+
+ case META_COND_VERSION:
+ fprintf(stderr, "META (?(VERSION%s", (*pptr++ == 0)? "=" : ">=");
+ fprintf(stderr, "%d.", *pptr++);
+ fprintf(stderr, "%d)", *pptr++);
+ break;
+
+ case META_COND_NAME:
+ fprintf(stderr, "META (?(<name>) length=%d offset=", *pptr++);
+ GETOFFSET(offset, pptr);
+ fprintf(stderr, "%zd", offset);
+ break;
+
+ case META_COND_RNAME:
+ fprintf(stderr, "META (?(R&name) length=%d offset=", *pptr++);
+ GETOFFSET(offset, pptr);
+ fprintf(stderr, "%zd", offset);
+ break;
+
+ /* This is kept as a name, because it might be. */
+
+ case META_COND_RNUMBER:
+ fprintf(stderr, "META (?(Rnumber) length=%d offset=", *pptr++);
+ GETOFFSET(offset, pptr);
+ fprintf(stderr, "%zd", offset);
+ break;
+
+ case META_MARK:
+ fprintf(stderr, "META (*MARK:");
+ goto SHOWARG;
+
+ case META_PRUNE_ARG:
+ fprintf(stderr, "META (*PRUNE:");
+ goto SHOWARG;
+
+ case META_SKIP_ARG:
+ fprintf(stderr, "META (*SKIP:");
+ goto SHOWARG;
+
+ case META_THEN_ARG:
+ fprintf(stderr, "META (*THEN:");
+ SHOWARG:
+ length = *pptr++;
+ for (i = 0; i < length; i++)
+ {
+ uint32_t cc = *pptr++;
+ if (cc > 32 && cc < 128) fprintf(stderr, "%c", cc);
+ else fprintf(stderr, "\\x{%x}", cc);
+ }
+ fprintf(stderr, ") length=%u", length);
+ break;
+ }
+ fprintf(stderr, "\n");
+ }
+return;
+}
+#endif /* DEBUG_SHOW_PARSED */
+
+
+
+/*************************************************
+* Copy compiled code *
+*************************************************/
+
+/* Compiled JIT code cannot be copied, so the new compiled block has no
+associated JIT data. */
+
+PCRE2_EXP_DEFN pcre2_code * PCRE2_CALL_CONVENTION
+pcre2_code_copy(const pcre2_code *code)
+{
+PCRE2_SIZE* ref_count;
+pcre2_code *newcode;
+
+if (code == NULL) return NULL;
+newcode = code->memctl.malloc(code->blocksize, code->memctl.memory_data);
+if (newcode == NULL) return NULL;
+memcpy(newcode, code, code->blocksize);
+newcode->executable_jit = NULL;
+
+/* If the code is one that has been deserialized, increment the reference count
+in the decoded tables. */
+
+if ((code->flags & PCRE2_DEREF_TABLES) != 0)
+ {
+ ref_count = (PCRE2_SIZE *)(code->tables + tables_length);
+ (*ref_count)++;
+ }
+
+return newcode;
+}
+
+
+
+/*************************************************
+* Copy compiled code and character tables *
+*************************************************/
+
+/* Compiled JIT code cannot be copied, so the new compiled block has no
+associated JIT data. This version of code_copy also makes a separate copy of
+the character tables. */
+
+PCRE2_EXP_DEFN pcre2_code * PCRE2_CALL_CONVENTION
+pcre2_code_copy_with_tables(const pcre2_code *code)
+{
+PCRE2_SIZE* ref_count;
+pcre2_code *newcode;
+uint8_t *newtables;
+
+if (code == NULL) return NULL;
+newcode = code->memctl.malloc(code->blocksize, code->memctl.memory_data);
+if (newcode == NULL) return NULL;
+memcpy(newcode, code, code->blocksize);
+newcode->executable_jit = NULL;
+
+newtables = code->memctl.malloc(tables_length + sizeof(PCRE2_SIZE),
+ code->memctl.memory_data);
+if (newtables == NULL)
+ {
+ code->memctl.free((void *)newcode, code->memctl.memory_data);
+ return NULL;
+ }
+memcpy(newtables, code->tables, tables_length);
+ref_count = (PCRE2_SIZE *)(newtables + tables_length);
+*ref_count = 1;
+
+newcode->tables = newtables;
+newcode->flags |= PCRE2_DEREF_TABLES;
+return newcode;
+}
+
+
+
+/*************************************************
+* Free compiled code *
+*************************************************/
+
+PCRE2_EXP_DEFN void PCRE2_CALL_CONVENTION
+pcre2_code_free(pcre2_code *code)
+{
+PCRE2_SIZE* ref_count;
+
+if (code != NULL)
+ {
+ if (code->executable_jit != NULL)
+ PRIV(jit_free)(code->executable_jit, &code->memctl);
+
+ if ((code->flags & PCRE2_DEREF_TABLES) != 0)
+ {
+ /* Decoded tables belong to the codes after deserialization, and they must
+ be freed when there are no more reference to them. The *ref_count should
+ always be > 0. */
+
+ ref_count = (PCRE2_SIZE *)(code->tables + tables_length);
+ if (*ref_count > 0)
+ {
+ (*ref_count)--;
+ if (*ref_count == 0)
+ code->memctl.free((void *)code->tables, code->memctl.memory_data);
+ }
+ }
+
+ code->memctl.free(code, code->memctl.memory_data);
+ }
+}
+
+
+
+/*************************************************
+* Read a number, possibly signed *
+*************************************************/
+
+/* This function is used to read numbers in the pattern. The initial pointer
+must be the sign or first digit of the number. When relative values (introduced
+by + or -) are allowed, they are relative group numbers, and the result must be
+greater than zero.
+
+Arguments:
+ ptrptr points to the character pointer variable
+ ptrend points to the end of the input string
+ allow_sign if < 0, sign not allowed; if >= 0, sign is relative to this
+ max_value the largest number allowed
+ max_error the error to give for an over-large number
+ intptr where to put the result
+ errcodeptr where to put an error code
+
+Returns: TRUE - a number was read
+ FALSE - errorcode == 0 => no number was found
+ errorcode != 0 => an error occurred
+*/
+
+static BOOL
+read_number(PCRE2_SPTR *ptrptr, PCRE2_SPTR ptrend, int32_t allow_sign,
+ uint32_t max_value, uint32_t max_error, int *intptr, int *errorcodeptr)
+{
+int sign = 0;
+uint32_t n = 0;
+PCRE2_SPTR ptr = *ptrptr;
+BOOL yield = FALSE;
+
+*errorcodeptr = 0;
+
+if (allow_sign >= 0 && ptr < ptrend)
+ {
+ if (*ptr == CHAR_PLUS)
+ {
+ sign = +1;
+ max_value -= allow_sign;
+ ptr++;
+ }
+ else if (*ptr == CHAR_MINUS)
+ {
+ sign = -1;
+ ptr++;
+ }
+ }
+
+if (ptr >= ptrend || !IS_DIGIT(*ptr)) return FALSE;
+while (ptr < ptrend && IS_DIGIT(*ptr))
+ {
+ n = n * 10 + *ptr++ - CHAR_0;
+ if (n > max_value)
+ {
+ *errorcodeptr = max_error;
+ goto EXIT;
+ }
+ }
+
+if (allow_sign >= 0 && sign != 0)
+ {
+ if (n == 0)
+ {
+ *errorcodeptr = ERR26; /* +0 and -0 are not allowed */
+ goto EXIT;
+ }
+
+ if (sign > 0) n += allow_sign;
+ else if ((int)n > allow_sign)
+ {
+ *errorcodeptr = ERR15; /* Non-existent subpattern */
+ goto EXIT;
+ }
+ else n = allow_sign + 1 - n;
+ }
+
+yield = TRUE;
+
+EXIT:
+*intptr = n;
+*ptrptr = ptr;
+return yield;
+}
+
+
+
+/*************************************************
+* Read repeat counts *
+*************************************************/
+
+/* Read an item of the form {n,m} and return the values if non-NULL pointers
+are supplied. Repeat counts must be less than 65536 (MAX_REPEAT_COUNT); a
+larger value is used for "unlimited". We have to use signed arguments for
+read_number() because it is capable of returning a signed value.
+
+Arguments:
+ ptrptr points to pointer to character after'{'
+ ptrend pointer to end of input
+ minp if not NULL, pointer to int for min
+ maxp if not NULL, pointer to int for max (-1 if no max)
+ returned as -1 if no max
+ errorcodeptr points to error code variable
+
+Returns: FALSE if not a repeat quantifier, errorcode set zero
+ FALSE on error, with errorcode set non-zero
+ TRUE on success, with pointer updated to point after '}'
+*/
+
+static BOOL
+read_repeat_counts(PCRE2_SPTR *ptrptr, PCRE2_SPTR ptrend, uint32_t *minp,
+ uint32_t *maxp, int *errorcodeptr)
+{
+PCRE2_SPTR p = *ptrptr;
+BOOL yield = FALSE;
+int32_t min = 0;
+int32_t max = REPEAT_UNLIMITED; /* This value is larger than MAX_REPEAT_COUNT */
+
+/* NB read_number() initializes the error code to zero. The only error is for a
+number that is too big. */
+
+if (!read_number(&p, ptrend, -1, MAX_REPEAT_COUNT, ERR5, &min, errorcodeptr))
+ goto EXIT;
+
+if (p >= ptrend) goto EXIT;
+
+if (*p == CHAR_RIGHT_CURLY_BRACKET)
+ {
+ p++;
+ max = min;
+ }
+
+else
+ {
+ if (*p++ != CHAR_COMMA || p >= ptrend) goto EXIT;
+ if (*p != CHAR_RIGHT_CURLY_BRACKET)
+ {
+ if (!read_number(&p, ptrend, -1, MAX_REPEAT_COUNT, ERR5, &max,
+ errorcodeptr) || p >= ptrend || *p != CHAR_RIGHT_CURLY_BRACKET)
+ goto EXIT;
+ if (max < min)
+ {
+ *errorcodeptr = ERR4;
+ goto EXIT;
+ }
+ }
+ p++;
+ }
+
+yield = TRUE;
+if (minp != NULL) *minp = (uint32_t)min;
+if (maxp != NULL) *maxp = (uint32_t)max;
+
+/* Update the pattern pointer on success, or after an error, but not when
+the result is "not a repeat quantifier". */
+
+EXIT:
+if (yield || *errorcodeptr != 0) *ptrptr = p;
+return yield;
+
+
+
+}
+
+
+
+/*************************************************
+* Handle escapes *
+*************************************************/
+
+/* This function is called when a \ has been encountered. It either returns a
+positive value for a simple escape such as \d, or 0 for a data character, which
+is placed in chptr. A backreference to group n is returned as negative n. On
+entry, ptr is pointing at the character after \. On exit, it points after the
+final code unit of the escape sequence.
+
+This function is also called from pcre2_substitute() to handle escape sequences
+in replacement strings. In this case, the cb argument is NULL, and in the case
+of escapes that have further processing, only sequences that define a data
+character are recognised. The isclass argument is not relevant; the options
+argument is the final value of the compiled pattern's options.
+
+Arguments:
+ ptrptr points to the input position pointer
+ ptrend points to the end of the input
+ chptr points to a returned data character
+ errorcodeptr points to the errorcode variable (containing zero)
+ options the current options bits
+ isclass TRUE if inside a character class
+ cb compile data block
+
+Returns: zero => a data character
+ positive => a special escape sequence
+ negative => a numerical back reference
+ on error, errorcodeptr is set non-zero
+*/
+
+int
+PRIV(check_escape)(PCRE2_SPTR *ptrptr, PCRE2_SPTR ptrend, uint32_t *chptr,
+ int *errorcodeptr, uint32_t options, BOOL isclass, compile_block *cb)
+{
+BOOL utf = (options & PCRE2_UTF) != 0;
+PCRE2_SPTR ptr = *ptrptr;
+uint32_t c, cc;
+int escape = 0;
+int i;
+
+/* If backslash is at the end of the string, it's an error. */
+
+if (ptr >= ptrend)
+ {
+ *errorcodeptr = ERR1;
+ return 0;
+ }
+
+GETCHARINCTEST(c, ptr); /* Get character value, increment pointer */
+*errorcodeptr = 0; /* Be optimistic */
+
+/* Non-alphanumerics are literals, so we just leave the value in c. An initial
+value test saves a memory lookup for code points outside the alphanumeric
+range. Otherwise, do a table lookup. A non-zero result is something that can be
+returned immediately. Otherwise further processing is required. */
+
+if (c < ESCAPES_FIRST || c > ESCAPES_LAST) {} /* Definitely literal */
+
+else if ((i = escapes[c - ESCAPES_FIRST]) != 0)
+ {
+ if (i > 0) c = (uint32_t)i; else /* Positive is a data character */
+ {
+ escape = -i; /* Else return a special escape */
+ if (cb != NULL && (escape == ESC_P || escape == ESC_p || escape == ESC_X))
+ cb->external_flags |= PCRE2_HASBKPORX; /* Note \P, \p, or \X */
+ }
+ }
+
+/* Escapes that need further processing, including those that are unknown.
+When called from pcre2_substitute(), only \c, \o, and \x are recognized (and \u
+when BSUX is set). */
+
+else
+ {
+ PCRE2_SPTR oldptr;
+ BOOL overflow;
+ int s;
+
+ /* Filter calls from pcre2_substitute(). */
+
+ if (cb == NULL && c != CHAR_c && c != CHAR_o && c != CHAR_x &&
+ (c != CHAR_u || (options & PCRE2_ALT_BSUX) != 0))
+ {
+ *errorcodeptr = ERR3;
+ return 0;
+ }
+
+ switch (c)
+ {
+ /* A number of Perl escapes are not handled by PCRE. We give an explicit
+ error. */
+
+ case CHAR_l:
+ case CHAR_L:
+ *errorcodeptr = ERR37;
+ break;
+
+ /* \u is unrecognized when PCRE2_ALT_BSUX is not set. When it is treated
+ specially, \u must be followed by four hex digits. Otherwise it is a
+ lowercase u letter. */
+
+ case CHAR_u:
+ if ((options & PCRE2_ALT_BSUX) == 0) *errorcodeptr = ERR37; else
+ {
+ uint32_t xc;
+ if (ptrend - ptr < 4) break; /* Less than 4 chars */
+ if ((cc = XDIGIT(ptr[0])) == 0xff) break; /* Not a hex digit */
+ if ((xc = XDIGIT(ptr[1])) == 0xff) break; /* Not a hex digit */
+ cc = (cc << 4) | xc;
+ if ((xc = XDIGIT(ptr[2])) == 0xff) break; /* Not a hex digit */
+ cc = (cc << 4) | xc;
+ if ((xc = XDIGIT(ptr[3])) == 0xff) break; /* Not a hex digit */
+ c = (cc << 4) | xc;
+ ptr += 4;
+ if (utf)
+ {
+ if (c > 0x10ffffU) *errorcodeptr = ERR77;
+ else if (c >= 0xd800 && c <= 0xdfff) *errorcodeptr = ERR73;
+ }
+ else if (c > MAX_NON_UTF_CHAR) *errorcodeptr = ERR77;
+ }
+ break;
+
+ /* \U is unrecognized unless PCRE2_ALT_BSUX is set, in which case it is an
+ upper case letter. */
+
+ case CHAR_U:
+ if ((options & PCRE2_ALT_BSUX) == 0) *errorcodeptr = ERR37;
+ break;
+
+ /* In a character class, \g is just a literal "g". Outside a character
+ class, \g must be followed by one of a number of specific things:
+
+ (1) A number, either plain or braced. If positive, it is an absolute
+ backreference. If negative, it is a relative backreference. This is a Perl
+ 5.10 feature.
+
+ (2) Perl 5.10 also supports \g{name} as a reference to a named group. This
+ is part of Perl's movement towards a unified syntax for back references. As
+ this is synonymous with \k{name}, we fudge it up by pretending it really
+ was \k{name}.
+
+ (3) For Oniguruma compatibility we also support \g followed by a name or a
+ number either in angle brackets or in single quotes. However, these are
+ (possibly recursive) subroutine calls, _not_ backreferences. We return
+ the ESC_g code.
+
+ Summary: Return a negative number for a numerical back reference, ESC_k for
+ a named back reference, and ESC_g for a named or numbered subroutine call.
+ */
+
+ case CHAR_g:
+ if (isclass) break;
+
+ if (ptr >= ptrend)
+ {
+ *errorcodeptr = ERR57;
+ break;
+ }
+
+ if (*ptr == CHAR_LESS_THAN_SIGN || *ptr == CHAR_APOSTROPHE)
+ {
+ escape = ESC_g;
+ break;
+ }
+
+ /* If there is a brace delimiter, try to read a numerical reference. If
+ there isn't one, assume we have a name and treat it as \k. */
+
+ if (*ptr == CHAR_LEFT_CURLY_BRACKET)
+ {
+ PCRE2_SPTR p = ptr + 1;
+ if (!read_number(&p, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &s,
+ errorcodeptr))
+ {
+ if (*errorcodeptr == 0) escape = ESC_k; /* No number found */
+ break;
+ }
+ if (p >= ptrend || *p != CHAR_RIGHT_CURLY_BRACKET)
+ {
+ *errorcodeptr = ERR57;
+ break;
+ }
+ ptr = p + 1;
+ }
+
+ /* Read an undelimited number */
+
+ else
+ {
+ if (!read_number(&ptr, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &s,
+ errorcodeptr))
+ {
+ if (*errorcodeptr == 0) *errorcodeptr = ERR57; /* No number found */
+ break;
+ }
+ }
+
+ if (s <= 0)
+ {
+ *errorcodeptr = ERR15;
+ break;
+ }
+
+ escape = -s;
+ break;
+
+ /* The handling of escape sequences consisting of a string of digits
+ starting with one that is not zero is not straightforward. Perl has changed
+ over the years. Nowadays \g{} for backreferences and \o{} for octal are
+ recommended to avoid the ambiguities in the old syntax.
+
+ Outside a character class, the digits are read as a decimal number. If the
+ number is less than 10, or if there are that many previous extracting left
+ brackets, it is a back reference. Otherwise, up to three octal digits are
+ read to form an escaped character code. Thus \123 is likely to be octal 123
+ (cf \0123, which is octal 012 followed by the literal 3).
+
+ Inside a character class, \ followed by a digit is always either a literal
+ 8 or 9 or an octal number. */
+
+ case CHAR_1: case CHAR_2: case CHAR_3: case CHAR_4: case CHAR_5:
+ case CHAR_6: case CHAR_7: case CHAR_8: case CHAR_9:
+
+ if (!isclass)
+ {
+ oldptr = ptr;
+ ptr--; /* Back to the digit */
+ if (!read_number(&ptr, ptrend, -1, INT_MAX/10 - 1, ERR61, &s,
+ errorcodeptr))
+ break;
+
+ /* \1 to \9 are always back references. \8x and \9x are too; \1x to \7x
+ are octal escapes if there are not that many previous captures. */
+
+ if (s < 10 || oldptr[-1] >= CHAR_8 || s <= (int)cb->bracount)
+ {
+ if (s > (int)MAX_GROUP_NUMBER) *errorcodeptr = ERR61;
+ else escape = -s; /* Indicates a back reference */
+ break;
+ }
+ ptr = oldptr; /* Put the pointer back and fall through */
+ }
+
+ /* Handle a digit following \ when the number is not a back reference, or
+ we are within a character class. If the first digit is 8 or 9, Perl used to
+ generate a binary zero and then treat the digit as a following literal. At
+ least by Perl 5.18 this changed so as not to insert the binary zero. */
+
+ if (c >= CHAR_8) break;
+
+ /* Fall through with a digit less than 8 */
+
+ /* \0 always starts an octal number, but we may drop through to here with a
+ larger first octal digit. The original code used just to take the least
+ significant 8 bits of octal numbers (I think this is what early Perls used
+ to do). Nowadays we allow for larger numbers in UTF-8 mode and 16-bit mode,
+ but no more than 3 octal digits. */
+
+ case CHAR_0:
+ c -= CHAR_0;
+ while(i++ < 2 && ptr < ptrend && *ptr >= CHAR_0 && *ptr <= CHAR_7)
+ c = c * 8 + *ptr++ - CHAR_0;
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ if (!utf && c > 0xff) *errorcodeptr = ERR51;
+#endif
+ break;
+
+ /* \o is a relatively new Perl feature, supporting a more general way of
+ specifying character codes in octal. The only supported form is \o{ddd}. */
+
+ case CHAR_o:
+ if (ptr >= ptrend || *ptr++ != CHAR_LEFT_CURLY_BRACKET)
+ {
+ ptr--;
+ *errorcodeptr = ERR55;
+ }
+ else if (ptr >= ptrend || *ptr == CHAR_RIGHT_CURLY_BRACKET)
+ *errorcodeptr = ERR78;
+ else
+ {
+ c = 0;
+ overflow = FALSE;
+ while (ptr < ptrend && *ptr >= CHAR_0 && *ptr <= CHAR_7)
+ {
+ cc = *ptr++;
+ if (c == 0 && cc == CHAR_0) continue; /* Leading zeroes */
+#if PCRE2_CODE_UNIT_WIDTH == 32
+ if (c >= 0x20000000l) { overflow = TRUE; break; }
+#endif
+ c = (c << 3) + (cc - CHAR_0);
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ if (c > (utf ? 0x10ffffU : 0xffU)) { overflow = TRUE; break; }
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+ if (c > (utf ? 0x10ffffU : 0xffffU)) { overflow = TRUE; break; }
+#elif PCRE2_CODE_UNIT_WIDTH == 32
+ if (utf && c > 0x10ffffU) { overflow = TRUE; break; }
+#endif
+ }
+ if (overflow)
+ {
+ while (ptr < ptrend && *ptr >= CHAR_0 && *ptr <= CHAR_7) ptr++;
+ *errorcodeptr = ERR34;
+ }
+ else if (ptr < ptrend && *ptr++ == CHAR_RIGHT_CURLY_BRACKET)
+ {
+ if (utf && c >= 0xd800 && c <= 0xdfff)
+ {
+ ptr--;
+ *errorcodeptr = ERR73;
+ }
+ }
+ else
+ {
+ ptr--;
+ *errorcodeptr = ERR64;
+ }
+ }
+ break;
+
+ /* \x is complicated. When PCRE2_ALT_BSUX is set, \x must be followed by
+ two hexadecimal digits. Otherwise it is a lowercase x letter. */
+
+ case CHAR_x:
+ if ((options & PCRE2_ALT_BSUX) != 0)
+ {
+ uint32_t xc;
+ if (ptrend - ptr < 2) break; /* Less than 2 characters */
+ if ((cc = XDIGIT(ptr[0])) == 0xff) break; /* Not a hex digit */
+ if ((xc = XDIGIT(ptr[1])) == 0xff) break; /* Not a hex digit */
+ c = (cc << 4) | xc;
+ ptr += 2;
+ } /* End PCRE2_ALT_BSUX handling */
+
+ /* Handle \x in Perl's style. \x{ddd} is a character number which can be
+ greater than 0xff in UTF-8 or non-8bit mode, but only if the ddd are hex
+ digits. If not, { used to be treated as a data character. However, Perl
+ seems to read hex digits up to the first non-such, and ignore the rest, so
+ that, for example \x{zz} matches a binary zero. This seems crazy, so PCRE
+ now gives an error. */
+
+ else
+ {
+ if (ptr < ptrend && *ptr == CHAR_LEFT_CURLY_BRACKET)
+ {
+ if (++ptr >= ptrend || *ptr == CHAR_RIGHT_CURLY_BRACKET)
+ {
+ *errorcodeptr = ERR78;
+ break;
+ }
+ c = 0;
+ overflow = FALSE;
+
+ while (ptr < ptrend && (cc = XDIGIT(*ptr)) != 0xff)
+ {
+ ptr++;
+ if (c == 0 && cc == 0) continue; /* Leading zeroes */
+#if PCRE2_CODE_UNIT_WIDTH == 32
+ if (c >= 0x10000000l) { overflow = TRUE; break; }
+#endif
+ c = (c << 4) | cc;
+ if ((utf && c > 0x10ffffU) || (!utf && c > MAX_NON_UTF_CHAR))
+ {
+ overflow = TRUE;
+ break;
+ }
+ }
+
+ if (overflow)
+ {
+ while (ptr < ptrend && XDIGIT(*ptr) != 0xff) ptr++;
+ *errorcodeptr = ERR34;
+ }
+ else if (ptr < ptrend && *ptr++ == CHAR_RIGHT_CURLY_BRACKET)
+ {
+ if (utf && c >= 0xd800 && c <= 0xdfff)
+ {
+ ptr--;
+ *errorcodeptr = ERR73;
+ }
+ }
+
+ /* If the sequence of hex digits does not end with '}', give an error.
+ We used just to recognize this construct and fall through to the normal
+ \x handling, but nowadays Perl gives an error, which seems much more
+ sensible, so we do too. */
+
+ else
+ {
+ ptr--;
+ *errorcodeptr = ERR67;
+ }
+ } /* End of \x{} processing */
+
+ /* Read a up to two hex digits after \x */
+
+ else
+ {
+ c = 0;
+ if (ptr >= ptrend || (cc = XDIGIT(*ptr)) == 0xff) break; /* Not a hex digit */
+ ptr++;
+ c = cc;
+ if (ptr >= ptrend || (cc = XDIGIT(*ptr)) == 0xff) break; /* Not a hex digit */
+ ptr++;
+ c = (c << 4) | cc;
+ } /* End of \xdd handling */
+ } /* End of Perl-style \x handling */
+ break;
+
+ /* The handling of \c is different in ASCII and EBCDIC environments. In an
+ ASCII (or Unicode) environment, an error is given if the character
+ following \c is not a printable ASCII character. Otherwise, the following
+ character is upper-cased if it is a letter, and after that the 0x40 bit is
+ flipped. The result is the value of the escape.
+
+ In an EBCDIC environment the handling of \c is compatible with the
+ specification in the perlebcdic document. The following character must be
+ a letter or one of small number of special characters. These provide a
+ means of defining the character values 0-31.
+
+ For testing the EBCDIC handling of \c in an ASCII environment, recognize
+ the EBCDIC value of 'c' explicitly. */
+
+#if defined EBCDIC && 'a' != 0x81
+ case 0x83:
+#else
+ case CHAR_c:
+#endif
+ if (ptr >= ptrend)
+ {
+ *errorcodeptr = ERR2;
+ break;
+ }
+ c = *ptr;
+ if (c >= CHAR_a && c <= CHAR_z) c = UPPER_CASE(c);
+
+ /* Handle \c in an ASCII/Unicode environment. */
+
+#ifndef EBCDIC /* ASCII/UTF-8 coding */
+ if (c < 32 || c > 126) /* Excludes all non-printable ASCII */
+ {
+ *errorcodeptr = ERR68;
+ break;
+ }
+ c ^= 0x40;
+
+ /* Handle \c in an EBCDIC environment. The special case \c? is converted to
+ 255 (0xff) or 95 (0x5f) if other character suggest we are using th POSIX-BC
+ encoding. (This is the way Perl indicates that it handles \c?.) The other
+ valid sequences correspond to a list of specific characters. */
+
+#else
+ if (c == CHAR_QUESTION_MARK)
+ c = ('\\' == 188 && '`' == 74)? 0x5f : 0xff;
+ else
+ {
+ for (i = 0; i < 32; i++)
+ {
+ if (c == ebcdic_escape_c[i]) break;
+ }
+ if (i < 32) c = i; else *errorcodeptr = ERR68;
+ }
+#endif /* EBCDIC */
+
+ ptr++;
+ break;
+
+ /* Any other alphanumeric following \ is an error. Perl gives an error only
+ if in warning mode, but PCRE doesn't have a warning mode. */
+
+ default:
+ *errorcodeptr = ERR3;
+ *ptrptr = ptr - 1; /* Point to the character at fault */
+ return 0;
+ }
+ }
+
+/* Perl supports \N{name} for character names, as well as plain \N for "not
+newline". PCRE does not support \N{name}. However, it does support
+quantification such as \N{2,3}. */
+
+if (escape == ESC_N && ptr < ptrend && *ptr == CHAR_LEFT_CURLY_BRACKET &&
+ ptrend - ptr > 2)
+ {
+ PCRE2_SPTR p = ptr + 1;
+ if (!read_repeat_counts(&p, ptrend, NULL, NULL, errorcodeptr) &&
+ *errorcodeptr == 0)
+ *errorcodeptr = ERR37;
+ }
+
+/* Set the pointer to the next character before returning. */
+
+*ptrptr = ptr;
+*chptr = c;
+return escape;
+}
+
+
+
+#ifdef SUPPORT_UNICODE
+/*************************************************
+* Handle \P and \p *
+*************************************************/
+
+/* This function is called after \P or \p has been encountered, provided that
+PCRE2 is compiled with support for UTF and Unicode properties. On entry, the
+contents of ptrptr are pointing after the P or p. On exit, it is left pointing
+after the final code unit of the escape sequence.
+
+Arguments:
+ ptrptr the pattern position pointer
+ negptr a boolean that is set TRUE for negation else FALSE
+ ptypeptr an unsigned int that is set to the type value
+ pdataptr an unsigned int that is set to the detailed property value
+ errorcodeptr the error code variable
+ cb the compile data
+
+Returns: TRUE if the type value was found, or FALSE for an invalid type
+*/
+
+static BOOL
+get_ucp(PCRE2_SPTR *ptrptr, BOOL *negptr, uint16_t *ptypeptr,
+ uint16_t *pdataptr, int *errorcodeptr, compile_block *cb)
+{
+PCRE2_UCHAR c;
+PCRE2_SIZE i, bot, top;
+PCRE2_SPTR ptr = *ptrptr;
+PCRE2_UCHAR name[32];
+
+if (ptr >= cb->end_pattern) goto ERROR_RETURN;
+c = *ptr++;
+*negptr = FALSE;
+
+/* \P or \p can be followed by a name in {}, optionally preceded by ^ for
+negation. */
+
+if (c == CHAR_LEFT_CURLY_BRACKET)
+ {
+ if (ptr >= cb->end_pattern) goto ERROR_RETURN;
+ if (*ptr == CHAR_CIRCUMFLEX_ACCENT)
+ {
+ *negptr = TRUE;
+ ptr++;
+ }
+ for (i = 0; i < (int)(sizeof(name) / sizeof(PCRE2_UCHAR)) - 1; i++)
+ {
+ if (ptr >= cb->end_pattern) goto ERROR_RETURN;
+ c = *ptr++;
+ if (c == CHAR_NULL) goto ERROR_RETURN;
+ if (c == CHAR_RIGHT_CURLY_BRACKET) break;
+ name[i] = c;
+ }
+ if (c != CHAR_RIGHT_CURLY_BRACKET) goto ERROR_RETURN;
+ name[i] = 0;
+ }
+
+/* Otherwise there is just one following character, which must be an ASCII
+letter. */
+
+else if (MAX_255(c) && (cb->ctypes[c] & ctype_letter) != 0)
+ {
+ name[0] = c;
+ name[1] = 0;
+ }
+else goto ERROR_RETURN;
+
+*ptrptr = ptr;
+
+/* Search for a recognized property name using binary chop. */
+
+bot = 0;
+top = PRIV(utt_size);
+
+while (bot < top)
+ {
+ int r;
+ i = (bot + top) >> 1;
+ r = PRIV(strcmp_c8)(name, PRIV(utt_names) + PRIV(utt)[i].name_offset);
+ if (r == 0)
+ {
+ *ptypeptr = PRIV(utt)[i].type;
+ *pdataptr = PRIV(utt)[i].value;
+ return TRUE;
+ }
+ if (r > 0) bot = i + 1; else top = i;
+ }
+*errorcodeptr = ERR47; /* Unrecognized name */
+return FALSE;
+
+ERROR_RETURN: /* Malformed \P or \p */
+*errorcodeptr = ERR46;
+*ptrptr = ptr;
+return FALSE;
+}
+#endif
+
+
+
+/*************************************************
+* Check for POSIX class syntax *
+*************************************************/
+
+/* This function is called when the sequence "[:" or "[." or "[=" is
+encountered in a character class. It checks whether this is followed by a
+sequence of characters terminated by a matching ":]" or ".]" or "=]". If we
+reach an unescaped ']' without the special preceding character, return FALSE.
+
+Originally, this function only recognized a sequence of letters between the
+terminators, but it seems that Perl recognizes any sequence of characters,
+though of course unknown POSIX names are subsequently rejected. Perl gives an
+"Unknown POSIX class" error for [:f\oo:] for example, where previously PCRE
+didn't consider this to be a POSIX class. Likewise for [:1234:].
+
+The problem in trying to be exactly like Perl is in the handling of escapes. We
+have to be sure that [abc[:x\]pqr] is *not* treated as containing a POSIX
+class, but [abc[:x\]pqr:]] is (so that an error can be generated). The code
+below handles the special cases \\ and \], but does not try to do any other
+escape processing. This makes it different from Perl for cases such as
+[:l\ower:] where Perl recognizes it as the POSIX class "lower" but PCRE does
+not recognize "l\ower". This is a lesser evil than not diagnosing bad classes
+when Perl does, I think.
+
+A user pointed out that PCRE was rejecting [:a[:digit:]] whereas Perl was not.
+It seems that the appearance of a nested POSIX class supersedes an apparent
+external class. For example, [:a[:digit:]b:] matches "a", "b", ":", or
+a digit. This is handled by returning FALSE if the start of a new group with
+the same terminator is encountered, since the next closing sequence must close
+the nested group, not the outer one.
+
+In Perl, unescaped square brackets may also appear as part of class names. For
+example, [:a[:abc]b:] gives unknown POSIX class "[:abc]b:]". However, for
+[:a[:abc]b][b:] it gives unknown POSIX class "[:abc]b][b:]", which does not
+seem right at all. PCRE does not allow closing square brackets in POSIX class
+names.
+
+Arguments:
+ ptr pointer to the character after the initial [ (colon, dot, equals)
+ ptrend pointer to the end of the pattern
+ endptr where to return a pointer to the terminating ':', '.', or '='
+
+Returns: TRUE or FALSE
+*/
+
+static BOOL
+check_posix_syntax(PCRE2_SPTR ptr, PCRE2_SPTR ptrend, PCRE2_SPTR *endptr)
+{
+PCRE2_UCHAR terminator; /* Don't combine these lines; the Solaris cc */
+terminator = *ptr++; /* compiler warns about "non-constant" initializer. */
+
+for (; ptrend - ptr >= 2; ptr++)
+ {
+ if (*ptr == CHAR_BACKSLASH &&
+ (ptr[1] == CHAR_RIGHT_SQUARE_BRACKET || ptr[1] == CHAR_BACKSLASH))
+ ptr++;
+
+ else if ((*ptr == CHAR_LEFT_SQUARE_BRACKET && ptr[1] == terminator) ||
+ *ptr == CHAR_RIGHT_SQUARE_BRACKET) return FALSE;
+
+ else if (*ptr == terminator && ptr[1] == CHAR_RIGHT_SQUARE_BRACKET)
+ {
+ *endptr = ptr;
+ return TRUE;
+ }
+ }
+
+return FALSE;
+}
+
+
+
+/*************************************************
+* Check POSIX class name *
+*************************************************/
+
+/* This function is called to check the name given in a POSIX-style class entry
+such as [:alnum:].
+
+Arguments:
+ ptr points to the first letter
+ len the length of the name
+
+Returns: a value representing the name, or -1 if unknown
+*/
+
+static int
+check_posix_name(PCRE2_SPTR ptr, int len)
+{
+const char *pn = posix_names;
+int yield = 0;
+while (posix_name_lengths[yield] != 0)
+ {
+ if (len == posix_name_lengths[yield] &&
+ PRIV(strncmp_c8)(ptr, pn, (unsigned int)len) == 0) return yield;
+ pn += posix_name_lengths[yield] + 1;
+ yield++;
+ }
+return -1;
+}
+
+
+
+/*************************************************
+* Read a subpattern or VERB name *
+*************************************************/
+
+/* This function is called from parse_regex() below whenever it needs to read
+the name of a subpattern or a (*VERB). The initial pointer must be to the
+character before the name. If that character is '*' we are reading a verb name.
+The pointer is updated to point after the name, for a VERB, or after tha name's
+terminator for a subpattern name. Returning both the offset and the name
+pointer is redundant information, but some callers use one and some the other,
+so it is simplest just to return both.
+
+Arguments:
+ ptrptr points to the character pointer variable
+ ptrend points to the end of the input string
+ terminator the terminator of a subpattern name must be this
+ offsetptr where to put the offset from the start of the pattern
+ nameptr where to put a pointer to the name in the input
+ namelenptr where to put the length of the name
+ errcodeptr where to put an error code
+ cb pointer to the compile data block
+
+Returns: TRUE if a name was read
+ FALSE otherwise, with error code set
+*/
+
+static BOOL
+read_name(PCRE2_SPTR *ptrptr, PCRE2_SPTR ptrend, uint32_t terminator,
+ PCRE2_SIZE *offsetptr, PCRE2_SPTR *nameptr, uint32_t *namelenptr,
+ int *errorcodeptr, compile_block *cb)
+{
+PCRE2_SPTR ptr = *ptrptr;
+BOOL is_verb = (*ptr == CHAR_ASTERISK);
+uint32_t namelen = 0;
+uint32_t ctype = is_verb? ctype_letter : ctype_word;
+
+if (++ptr >= ptrend)
+ {
+ *errorcodeptr = is_verb? ERR60: /* Verb not recognized or malformed */
+ ERR62; /* Subpattern name expected */
+ goto FAILED;
+ }
+
+*nameptr = ptr;
+*offsetptr = (PCRE2_SIZE)(ptr - cb->start_pattern);
+
+if (IS_DIGIT(*ptr))
+ {
+ *errorcodeptr = ERR44; /* Group name must not start with digit */
+ goto FAILED;
+ }
+
+while (ptr < ptrend && MAX_255(*ptr) && (cb->ctypes[*ptr] & ctype) != 0)
+ {
+ ptr++;
+ namelen++;
+ if (namelen > MAX_NAME_SIZE)
+ {
+ *errorcodeptr = ERR48;
+ goto FAILED;
+ }
+ }
+
+/* Subpattern names must not be empty, and their terminator is checked here.
+(What follows a verb name is checked separately.) */
+
+if (!is_verb)
+ {
+ if (namelen == 0)
+ {
+ *errorcodeptr = ERR62; /* Subpattern name expected */
+ goto FAILED;
+ }
+ if (ptr >= ptrend || *ptr != (PCRE2_UCHAR)terminator)
+ {
+ *errorcodeptr = ERR42;
+ goto FAILED;
+ }
+ ptr++;
+ }
+
+*namelenptr = namelen;
+*ptrptr = ptr;
+return TRUE;
+
+FAILED:
+*ptrptr = ptr;
+return FALSE;
+}
+
+
+
+/*************************************************
+* Manage callouts at start of cycle *
+*************************************************/
+
+/* At the start of a new item in parse_regex() we are able to record the
+details of the previous item in a prior callout, and also to set up an
+automatic callout if enabled. Avoid having two adjacent automatic callouts,
+which would otherwise happen for items such as \Q that contribute nothing to
+the parsed pattern.
+
+Arguments:
+ ptr current pattern pointer
+ pcalloutptr points to a pointer to previous callout, or NULL
+ options the compiling options
+ parsed_pattern the parsed pattern pointer
+ cb compile block
+
+Returns: possibly updated parsed_pattern pointer.
+*/
+
+static uint32_t *
+manage_callouts(PCRE2_SPTR ptr, uint32_t **pcalloutptr, uint32_t options,
+ uint32_t *parsed_pattern, compile_block *cb)
+{
+uint32_t *previous_callout = *pcalloutptr;
+
+if (previous_callout != NULL) previous_callout[2] = ptr - cb->start_pattern -
+ (PCRE2_SIZE)previous_callout[1];
+
+if ((options & PCRE2_AUTO_CALLOUT) == 0) previous_callout = NULL; else
+ {
+ if (previous_callout == NULL ||
+ previous_callout != parsed_pattern - 4 ||
+ previous_callout[3] != 255)
+ {
+ previous_callout = parsed_pattern; /* Set up new automatic callout */
+ parsed_pattern += 4;
+ previous_callout[0] = META_CALLOUT_NUMBER;
+ previous_callout[2] = 0;
+ previous_callout[3] = 255;
+ }
+ previous_callout[1] = (uint32_t)(ptr - cb->start_pattern);
+ }
+
+*pcalloutptr = previous_callout;
+return parsed_pattern;
+}
+
+
+
+/*************************************************
+* Parse regex and identify named groups *
+*************************************************/
+
+/* This function is called first of all. It scans the pattern and does two
+things: (1) It identifies capturing groups and makes a table of named capturing
+groups so that information about them is fully available to both the compiling
+scans. (2) It writes a parsed version of the pattern with comments omitted and
+escapes processed into the parsed_pattern vector.
+
+Arguments:
+ ptr points to the start of the pattern
+ options compiling dynamic options (may change during the scan)
+ has_lookbehind points to a boolean, set TRUE if a lookbehind is found
+ cb pointer to the compile data block
+
+Returns: zero on success or a non-zero error code, with the
+ error offset placed in the cb field
+*/
+
+/* A structure and some flags for dealing with nested groups. */
+
+typedef struct nest_save {
+ uint16_t nest_depth;
+ uint16_t reset_group;
+ uint16_t max_group;
+ uint16_t flags;
+} nest_save;
+
+#define NSF_RESET 0x0001u
+#define NSF_EXTENDED 0x0002u
+#define NSF_DUPNAMES 0x0004u
+#define NSF_CONDASSERT 0x0008u
+
+/* States used for analyzing ranges in character classes. The two OK values
+must be last. */
+
+enum { RANGE_NO, RANGE_STARTED, RANGE_OK_ESCAPED, RANGE_OK_LITERAL };
+
+/* Only in 32-bit mode can there be literals > META_END. A macros encapsulates
+the storing of literal values in the parsed pattern. */
+
+#if PCRE2_CODE_UNIT_WIDTH == 32
+#define PARSED_LITERAL(c, p) \
+ { \
+ if (c >= META_END) *p++ = META_BIGVALUE; \
+ *p++ = c; \
+ okquantifier = TRUE; \
+ }
+#else
+#define PARSED_LITERAL(c, p) *p++ = c; okquantifier = TRUE;
+#endif
+
+/* Here's the actual function. */
+
+static int parse_regex(PCRE2_SPTR ptr, uint32_t options, BOOL *has_lookbehind,
+ compile_block *cb)
+{
+uint32_t c;
+uint32_t delimiter;
+uint32_t namelen;
+uint32_t class_range_state;
+uint32_t *verblengthptr = NULL; /* Value avoids compiler warning */
+uint32_t *previous_callout = NULL;
+uint32_t *parsed_pattern = cb->parsed_pattern;
+uint32_t *parsed_pattern_end = cb->parsed_pattern_end;
+uint32_t meta_quantifier = 0;
+uint16_t nest_depth = 0;
+int after_manual_callout = 0;
+int expect_cond_assert = 0;
+int errorcode = 0;
+int escape;
+int i;
+BOOL inescq = FALSE;
+BOOL inverbname = FALSE;
+BOOL utf = (options & PCRE2_UTF) != 0;
+BOOL isdupname;
+BOOL negate_class;
+BOOL okquantifier = FALSE;
+PCRE2_SPTR name;
+PCRE2_SPTR ptrend = cb->end_pattern;
+PCRE2_SPTR verbnamestart = NULL; /* Value avoids compiler warning */
+named_group *ng;
+nest_save *top_nest = NULL;
+nest_save *end_nests = (nest_save *)(cb->start_workspace + cb->workspace_size);
+
+/* The size of the nest_save structure might not be a factor of the size of the
+workspace. Therefore we must round down end_nests so as to correctly avoid
+creating a nest_save that spans the end of the workspace. */
+
+end_nests = (nest_save *)((char *)end_nests -
+ ((cb->workspace_size * sizeof(PCRE2_UCHAR)) % sizeof(nest_save)));
+
+/* Now scan the pattern */
+
+*has_lookbehind = FALSE;
+
+while (ptr < ptrend)
+ {
+ int prev_expect_cond_assert;
+ uint32_t min_repeat, max_repeat;
+ uint32_t set, unset, *optset;
+ uint32_t terminator;
+ uint32_t prev_meta_quantifier;
+ BOOL prev_okquantifier;
+ PCRE2_SPTR tempptr;
+ PCRE2_SPTR thisptr;
+ PCRE2_SIZE offset;
+
+ if (parsed_pattern >= parsed_pattern_end)
+ {
+ errorcode = ERR63; /* Internal error (parsed pattern overflow) */
+ goto FAILED;
+ }
+
+ if (nest_depth > cb->cx->parens_nest_limit)
+ {
+ errorcode = ERR19;
+ goto FAILED;
+ }
+
+ /* Get next input character, save its position for callout handling. */
+
+ thisptr = ptr;
+ GETCHARINCTEST(c, ptr);
+
+ /* Copy quoted literals until \E, allowing for the possibility of automatic
+ callouts, except when processing a (*VERB) "name". */
+
+ if (inescq)
+ {
+ if (c == CHAR_BACKSLASH && ptr < ptrend && *ptr == CHAR_E)
+ {
+ inescq = FALSE;
+ ptr++; /* Skip E */
+ }
+ else
+ {
+ if (expect_cond_assert > 0) /* A literal is not allowed if we are */
+ { /* expecting a conditional assertion, */
+ ptr--; /* but an empty \Q\E sequence is OK. */
+ errorcode = ERR28;
+ goto FAILED;
+ }
+ if (!inverbname && after_manual_callout-- <= 0)
+ parsed_pattern = manage_callouts(thisptr, &previous_callout, options,
+ parsed_pattern, cb);
+ PARSED_LITERAL(c, parsed_pattern);
+ meta_quantifier = 0;
+ }
+ continue; /* Next character */
+ }
+
+ /* If we are processing the "name" part of a (*VERB:NAME) item, all
+ characters up to the closing parenthesis are literals except when
+ PCRE2_ALT_VERBNAMES is set. That causes backslash interpretation, but only \Q
+ and \E and escaped characters are allowed (no character types such as \d). If
+ PCRE2_EXTENDED is also set, we must ignore white space and # comments. Do
+ this by not entering the special (*VERB:NAME) processing - they are then
+ picked up below. Note that c is a character, not a code unit, so we must not
+ use MAX_255 to test its size because MAX_255 tests code units and is assumed
+ TRUE in 8-bit mode. */
+
+ if (inverbname &&
+ (
+ /* EITHER: not both options set */
+ ((options & (PCRE2_EXTENDED | PCRE2_ALT_VERBNAMES)) !=
+ (PCRE2_EXTENDED | PCRE2_ALT_VERBNAMES)) ||
+ /* OR: character > 255 */
+ c > 255 ||
+ /* OR: not a # comment or white space */
+ (c != CHAR_NUMBER_SIGN && (cb->ctypes[c] & ctype_space) == 0)
+ ))
+ {
+ PCRE2_SIZE verbnamelength;
+
+ switch(c)
+ {
+ default:
+ PARSED_LITERAL(c, parsed_pattern);
+ break;
+
+ case CHAR_RIGHT_PARENTHESIS:
+ inverbname = FALSE;
+ okquantifier = FALSE; /* Was probably set by literals */
+ /* This is the length in characters */
+ verbnamelength = (PCRE2_SIZE)(parsed_pattern - verblengthptr - 1);
+ /* But the limit on the length is in code units */
+ if (ptr - verbnamestart - 1 > (int)MAX_MARK)
+ {
+ ptr--;
+ errorcode = ERR76;
+ goto FAILED;
+ }
+ *verblengthptr = (uint32_t)verbnamelength;
+ break;
+
+ case CHAR_BACKSLASH:
+ if ((options & PCRE2_ALT_VERBNAMES) != 0)
+ {
+ escape = PRIV(check_escape)(&ptr, ptrend, &c, &errorcode, options,
+ FALSE, cb);
+ if (errorcode != 0) goto FAILED;
+ }
+ else escape = 0; /* Treat all as literal */
+
+ switch(escape)
+ {
+ case 0:
+ PARSED_LITERAL(c, parsed_pattern);
+ break;
+
+ case ESC_Q:
+ inescq = TRUE;
+ break;
+
+ case ESC_E: /* Ignore */
+ break;
+
+ default:
+ errorcode = ERR40; /* Invalid in verb name */
+ goto FAILED;
+ }
+ }
+ continue; /* Next character in pattern */
+ }
+
+ /* Not a verb name character. At this point we must process everything that
+ must not change the quantification state. This is mainly comments, but we
+ handle \Q and \E here as well, so that an item such as A\Q\E+ is treated as
+ A+, as in Perl. An isolated \E is ignored. */
+
+ if (c == CHAR_BACKSLASH && ptr < ptrend)
+ {
+ if (*ptr == CHAR_Q || *ptr == CHAR_E)
+ {
+ inescq = *ptr == CHAR_Q;
+ ptr++;
+ continue;
+ }
+ }
+
+ /* Skip over whitespace and # comments in extended mode. Note that c is a
+ character, not a code unit, so we must not use MAX_255 to test its size
+ because MAX_255 tests code units and is assumed TRUE in 8-bit mode. */
+
+ if ((options & PCRE2_EXTENDED) != 0)
+ {
+ if (c < 256 && (cb->ctypes[c] & ctype_space) != 0) continue;
+ if (c == CHAR_NUMBER_SIGN)
+ {
+ while (ptr < ptrend)
+ {
+ if (IS_NEWLINE(ptr)) /* For non-fixed-length newline cases, */
+ { /* IS_NEWLINE sets cb->nllen. */
+ ptr += cb->nllen;
+ break;
+ }
+ ptr++;
+#ifdef SUPPORT_UNICODE
+ if (utf) FORWARDCHARTEST(ptr, ptrend);
+#endif
+ }
+ continue; /* Next character in pattern */
+ }
+ }
+
+ /* Skip over bracketed comments */
+
+ if (c == CHAR_LEFT_PARENTHESIS && ptrend - ptr >= 2 &&
+ ptr[0] == CHAR_QUESTION_MARK && ptr[1] == CHAR_NUMBER_SIGN)
+ {
+ while (++ptr < ptrend && *ptr != CHAR_RIGHT_PARENTHESIS);
+ if (ptr >= ptrend)
+ {
+ errorcode = ERR18; /* A special error for missing ) in a comment */
+ goto FAILED; /* to make it easier to debug. */
+ }
+ ptr++;
+ continue; /* Next character in pattern */
+ }
+
+ /* If the next item is not a quantifier, fill in length of any previous
+ callout and create an auto callout if required. */
+
+ if (c != CHAR_ASTERISK && c != CHAR_PLUS && c != CHAR_QUESTION_MARK &&
+ (c != CHAR_LEFT_CURLY_BRACKET ||
+ (tempptr = ptr,
+ !read_repeat_counts(&tempptr, ptrend, NULL, NULL, &errorcode))))
+ {
+ if (after_manual_callout-- <= 0)
+ parsed_pattern = manage_callouts(thisptr, &previous_callout, options,
+ parsed_pattern, cb);
+ }
+
+ /* If expect_cond_assert is 2, we have just passed (?( and are expecting an
+ assertion, possibly preceded by a callout. If the value is 1, we have just
+ had the callout and expect an assertion. There must be at least 3 more
+ characters in all cases. When expect_cond_assert is 2, we know that the
+ current character is an opening parenthesis, as otherwise we wouldn't be
+ here. However, when it is 1, we need to check, and it's easiest just to check
+ always. Note that expect_cond_assert may be negative, since all callouts just
+ decrement it. */
+
+ if (expect_cond_assert > 0)
+ {
+ BOOL ok = c == CHAR_LEFT_PARENTHESIS && ptrend - ptr >= 3 &&
+ ptr[0] == CHAR_QUESTION_MARK;
+ if (ok) switch(ptr[1])
+ {
+ case CHAR_C:
+ ok = expect_cond_assert == 2;
+ break;
+
+ case CHAR_EQUALS_SIGN:
+ case CHAR_EXCLAMATION_MARK:
+ break;
+
+ case CHAR_LESS_THAN_SIGN:
+ ok = ptr[2] == CHAR_EQUALS_SIGN || ptr[2] == CHAR_EXCLAMATION_MARK;
+ break;
+
+ default:
+ ok = FALSE;
+ }
+
+ if (!ok)
+ {
+ ptr--; /* Adjust error offset */
+ errorcode = ERR28;
+ goto FAILED;
+ }
+ }
+
+ /* Remember whether we are expecting a conditional assertion, and set the
+ default for this item. */
+
+ prev_expect_cond_assert = expect_cond_assert;
+ expect_cond_assert = 0;
+
+ /* Remember quantification status for the previous significant item, then set
+ default for this item. */
+
+ prev_okquantifier = okquantifier;
+ prev_meta_quantifier = meta_quantifier;
+ okquantifier = FALSE;
+ meta_quantifier = 0;
+
+ /* If the previous significant item was a quantifier, adjust the parsed code
+ if there is a following modifier. The base meta value is always followed by
+ the PLUS and QUERY values, in that order. We do this here rather than after
+ reading a quantifier so that intervening comments and /x whitespace can be
+ ignored without having to replicate code. */
+
+ if (prev_meta_quantifier != 0 && (c == CHAR_QUESTION_MARK || c == CHAR_PLUS))
+ {
+ parsed_pattern[(prev_meta_quantifier == META_MINMAX)? -3 : -1] =
+ prev_meta_quantifier + ((c == CHAR_QUESTION_MARK)?
+ 0x00020000u : 0x00010000u);
+ continue; /* Next character in pattern */
+ }
+
+
+ /* Process the next item in the main part of a pattern. */
+
+ switch(c)
+ {
+ default: /* Non-special character */
+ PARSED_LITERAL(c, parsed_pattern);
+ break;
+
+
+ /* ---- Escape sequence ---- */
+
+ case CHAR_BACKSLASH:
+ escape = PRIV(check_escape)(&ptr, ptrend, &c, &errorcode, options,
+ FALSE, cb);
+ if (errorcode != 0) goto FAILED;
+
+ /* The escape was a data character. */
+
+ if (escape == 0)
+ {
+ PARSED_LITERAL(c, parsed_pattern);
+ }
+
+ /* The escape was a back (or forward) reference. We keep the offset in
+ order to give a more useful diagnostic for a bad forward reference. For
+ references to groups numbered less than 10 we can't use more than two items
+ in parsed_pattern because they may be just two characters in the input (and
+ in a 64-bit world an offset may need two elements). So for them, the offset
+ of the first occurrent is held in a special vector. */
+
+ else if (escape < 0)
+ {
+ offset = (PCRE2_SIZE)(ptr - cb->start_pattern - 1);
+ escape = -escape;
+ *parsed_pattern++ = META_BACKREF | (uint32_t)escape;
+ if (escape < 10)
+ {
+ if (cb->small_ref_offset[escape] == PCRE2_UNSET)
+ cb->small_ref_offset[escape] = offset;
+ }
+ else
+ {
+ PUTOFFSET(offset, parsed_pattern);
+ }
+ okquantifier = TRUE;
+ }
+
+ /* The escape was a character class such as \d etc. or other special
+ escape indicator such as \A or \X. Most of them generate just a single
+ parsed item, but \P and \p are followed by a 16-bit type and a 16-bit
+ value. They are supported only when Unicode is available. The type and
+ value are packed into a single 32-bit value so that the whole sequences
+ uses only two elements in the parsed_vector. This is because the same
+ coding is used if \d (for example) is turned into \p{Nd} when PCRE2_UCP is
+ set.
+
+ There are also some cases where the escape sequence is followed by a name:
+ \k{name}, \k<name>, and \k'name' are backreferences by name, and \g<name>
+ and \g'name' are subroutine calls by name; \g{name} is a synonym for
+ \k{name}. Note that \g<number> and \g'number' are handled by check_escape()
+ and returned as a negative value (handled above). A name is coded as an
+ offset into the pattern and a length. */
+
+ else switch (escape)
+ {
+ case ESC_C:
+#ifdef NEVER_BACKSLASH_C
+ errorcode = ERR85;
+ goto FAILED;
+#else
+ if ((options & PCRE2_NEVER_BACKSLASH_C) != 0)
+ {
+ errorcode = ERR83;
+ goto FAILED;
+ }
+#endif
+ okquantifier = TRUE;
+ *parsed_pattern++ = META_ESCAPE + escape;
+ break;
+
+ case ESC_X:
+#ifndef SUPPORT_UNICODE
+ errorcode = ERR45; /* Supported only with Unicode support */
+ goto FAILED;
+#endif
+ case ESC_H:
+ case ESC_h:
+ case ESC_N:
+ case ESC_R:
+ case ESC_V:
+ case ESC_v:
+ okquantifier = TRUE;
+ *parsed_pattern++ = META_ESCAPE + escape;
+ break;
+
+ default: /* \A, \B, \b, \G, \K, \Z, \z cannot be quantified. */
+ *parsed_pattern++ = META_ESCAPE + escape;
+ break;
+
+ /* Escapes that change in UCP mode. Note that PCRE2_UCP will never be set
+ without Unicode support because it is checked when pcre2_compile() is
+ called. */
+
+ case ESC_d:
+ case ESC_D:
+ case ESC_s:
+ case ESC_S:
+ case ESC_w:
+ case ESC_W:
+ okquantifier = TRUE;
+ if ((options & PCRE2_UCP) == 0)
+ {
+ *parsed_pattern++ = META_ESCAPE + escape;
+ }
+ else
+ {
+ *parsed_pattern++ = META_ESCAPE +
+ ((escape == ESC_d || escape == ESC_s || escape == ESC_w)?
+ ESC_p : ESC_P);
+ switch(escape)
+ {
+ case ESC_d:
+ case ESC_D:
+ *parsed_pattern++ = (PT_PC << 16) | ucp_Nd;
+ break;
+
+ case ESC_s:
+ case ESC_S:
+ *parsed_pattern++ = PT_SPACE << 16;
+ break;
+
+ case ESC_w:
+ case ESC_W:
+ *parsed_pattern++ = PT_WORD << 16;
+ break;
+ }
+ }
+ break;
+
+ /* Unicode property matching */
+
+ case ESC_P:
+ case ESC_p:
+#ifdef SUPPORT_UNICODE
+ {
+ BOOL negated;
+ uint16_t ptype = 0, pdata = 0;
+ if (!get_ucp(&ptr, &negated, &ptype, &pdata, &errorcode, cb))
+ goto FAILED;
+ if (negated) escape = (escape == ESC_P)? ESC_p : ESC_P;
+ *parsed_pattern++ = META_ESCAPE + escape;
+ *parsed_pattern++ = (ptype << 16) | pdata;
+ okquantifier = TRUE;
+ }
+#else
+ errorcode = ERR45;
+ goto FAILED;
+#endif
+ break; /* End \P and \p */
+
+ /* When \g is used with quotes or angle brackets as delimiters, it is a
+ numerical or named subroutine call, and control comes here. When used
+ with brace delimiters it is a numberical back reference and does not come
+ here because check_escape() returns it directly as a reference. \k is
+ always a named back reference. */
+
+ case ESC_g:
+ case ESC_k:
+ if (ptr >= ptrend || (*ptr != CHAR_LEFT_CURLY_BRACKET &&
+ *ptr != CHAR_LESS_THAN_SIGN && *ptr != CHAR_APOSTROPHE))
+ {
+ errorcode = (escape == ESC_g)? ERR57 : ERR69;
+ goto FAILED;
+ }
+ terminator = (*ptr == CHAR_LESS_THAN_SIGN)?
+ CHAR_GREATER_THAN_SIGN : (*ptr == CHAR_APOSTROPHE)?
+ CHAR_APOSTROPHE : CHAR_RIGHT_CURLY_BRACKET;
+
+ /* For a non-braced \g, check for a numerical recursion. */
+
+ if (escape == ESC_g && terminator != CHAR_RIGHT_CURLY_BRACKET)
+ {
+ PCRE2_SPTR p = ptr + 1;
+
+ if (read_number(&p, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &i,
+ &errorcode))
+ {
+ if (p >= ptrend || *p != terminator)
+ {
+ errorcode = ERR57;
+ goto FAILED;
+ }
+ ptr = p;
+ goto SET_RECURSION;
+ }
+ if (errorcode != 0) goto FAILED;
+ }
+
+ /* Not a numerical recursion */
+
+ if (!read_name(&ptr, ptrend, terminator, &offset, &name, &namelen,
+ &errorcode, cb)) goto FAILED;
+
+ /* \k and \g when used with braces are back references, whereas \g used
+ with quotes or angle brackets is a recursion */
+
+ *parsed_pattern++ =
+ (escape == ESC_k || terminator == CHAR_RIGHT_CURLY_BRACKET)?
+ META_BACKREF_BYNAME : META_RECURSE_BYNAME;
+ *parsed_pattern++ = namelen;
+
+ PUTOFFSET(offset, parsed_pattern);
+ okquantifier = TRUE;
+ break;
+ }
+ break; /* End escape sequence processing */
+
+
+ /* ---- Single-character special items ---- */
+
+ case CHAR_CIRCUMFLEX_ACCENT:
+ *parsed_pattern++ = META_CIRCUMFLEX;
+ break;
+
+ case CHAR_DOLLAR_SIGN:
+ *parsed_pattern++ = META_DOLLAR;
+ break;
+
+ case CHAR_DOT:
+ *parsed_pattern++ = META_DOT;
+ okquantifier = TRUE;
+ break;
+
+
+ /* ---- Single-character quantifiers ---- */
+
+ case CHAR_ASTERISK:
+ meta_quantifier = META_ASTERISK;
+ goto CHECK_QUANTIFIER;
+
+ case CHAR_PLUS:
+ meta_quantifier = META_PLUS;
+ goto CHECK_QUANTIFIER;
+
+ case CHAR_QUESTION_MARK:
+ meta_quantifier = META_QUERY;
+ goto CHECK_QUANTIFIER;
+
+
+ /* ---- Potential {n,m} quantifier ---- */
+
+ case CHAR_LEFT_CURLY_BRACKET:
+ if (!read_repeat_counts(&ptr, ptrend, &min_repeat, &max_repeat,
+ &errorcode))
+ {
+ if (errorcode != 0) goto FAILED; /* Error in quantifier. */
+ PARSED_LITERAL(c, parsed_pattern); /* Not a quantifier */
+ break; /* No more quantifier processing */
+ }
+ meta_quantifier = META_MINMAX;
+ /* Fall through */
+
+
+ /* ---- Quantifier post-processing ---- */
+
+ /* Check that a quantifier is allowed after the previous item. */
+
+ CHECK_QUANTIFIER:
+ if (!prev_okquantifier)
+ {
+ errorcode = ERR9;
+ goto FAILED_BACK;
+ }
+
+ /* Now we can put the quantifier into the parsed pattern vector. At this
+ stage, we have only the basic quantifier. The check for a following + or ?
+ modifier happens at the top of the loop, after any intervening comments
+ have been removed. */
+
+ *parsed_pattern++ = meta_quantifier;
+ if (c == CHAR_LEFT_CURLY_BRACKET)
+ {
+ *parsed_pattern++ = min_repeat;
+ *parsed_pattern++ = max_repeat;
+ }
+ break;
+
+
+ /* ---- Character class ---- */
+
+ case CHAR_LEFT_SQUARE_BRACKET:
+ okquantifier = TRUE;
+
+ /* In another (POSIX) regex library, the ugly syntax [[:<:]] and [[:>:]] is
+ used for "start of word" and "end of word". As these are otherwise illegal
+ sequences, we don't break anything by recognizing them. They are replaced
+ by \b(?=\w) and \b(?<=\w) respectively. Sequences like [a[:<:]] are
+ erroneous and are handled by the normal code below. */
+
+ if (ptrend - ptr >= 6 &&
+ (PRIV(strncmp_c8)(ptr, STRING_WEIRD_STARTWORD, 6) == 0 ||
+ PRIV(strncmp_c8)(ptr, STRING_WEIRD_ENDWORD, 6) == 0))
+ {
+ *parsed_pattern++ = META_ESCAPE + ESC_b;
+
+ if (ptr[2] == CHAR_LESS_THAN_SIGN)
+ {
+ *parsed_pattern++ = META_LOOKAHEAD;
+ }
+ else
+ {
+ *parsed_pattern++ = META_LOOKBEHIND;
+ *has_lookbehind = TRUE;
+
+ /* The offset is used only for the "non-fixed length" error; this won't
+ occur here, so just store zero. */
+
+ PUTOFFSET((PCRE2_SIZE)0, parsed_pattern);
+ }
+
+ if ((options & PCRE2_UCP) == 0)
+ *parsed_pattern++ = META_ESCAPE + ESC_w;
+ else
+ {
+ *parsed_pattern++ = META_ESCAPE + ESC_p;
+ *parsed_pattern++ = PT_WORD << 16;
+ }
+ *parsed_pattern++ = META_KET;
+ ptr += 6;
+ break;
+ }
+
+ /* PCRE supports POSIX class stuff inside a class. Perl gives an error if
+ they are encountered at the top level, so we'll do that too. */
+
+ if (ptr < ptrend && (*ptr == CHAR_COLON || *ptr == CHAR_DOT ||
+ *ptr == CHAR_EQUALS_SIGN) &&
+ check_posix_syntax(ptr, ptrend, &tempptr))
+ {
+ errorcode = (*ptr-- == CHAR_COLON)? ERR12 : ERR13;
+ goto FAILED;
+ }
+
+ /* Process a regular character class. If the first character is '^', set
+ the negation flag. If the first few characters (either before or after ^)
+ are \Q\E or \E we skip them too. This makes for compatibility with Perl. */
+
+ negate_class = FALSE;
+ while (ptr < ptrend)
+ {
+ GETCHARINCTEST(c, ptr);
+ if (c == CHAR_BACKSLASH)
+ {
+ if (ptr < ptrend && *ptr == CHAR_E) ptr++;
+ else if (ptrend - ptr >= 3 &&
+ PRIV(strncmp_c8)(ptr, STR_Q STR_BACKSLASH STR_E, 3) == 0)
+ ptr += 3;
+ else
+ break;
+ }
+ else if (!negate_class && c == CHAR_CIRCUMFLEX_ACCENT)
+ negate_class = TRUE;
+ else break;
+ }
+
+ /* Now the real contents of the class; c has the first "real" character.
+ Empty classes are permitted only if the option is set. */
+
+ if (c == CHAR_RIGHT_SQUARE_BRACKET &&
+ (cb->external_options & PCRE2_ALLOW_EMPTY_CLASS) != 0)
+ {
+ *parsed_pattern++ = negate_class? META_CLASS_EMPTY_NOT : META_CLASS_EMPTY;
+ break; /* End of class processing */
+ }
+
+ /* Process a non-empty class. */
+
+ *parsed_pattern++ = negate_class? META_CLASS_NOT : META_CLASS;
+ class_range_state = RANGE_NO;
+
+ /* In an EBCDIC environment, Perl treats alphabetic ranges specially
+ because there are holes in the encoding, and simply using the range A-Z
+ (for example) would include the characters in the holes. This applies only
+ to ranges where both values are literal; [\xC1-\xE9] is different to [A-Z]
+ in this respect. In order to accommodate this, we keep track of whether
+ character values are literal or not, and a state variable for handling
+ ranges. */
+
+ /* Loop for the contents of the class */
+
+ for (;;)
+ {
+ BOOL char_is_literal = TRUE;
+
+ /* Inside \Q...\E everything is literal except \E */
+
+ if (inescq)
+ {
+ if (c == CHAR_BACKSLASH && ptr < ptrend && *ptr == CHAR_E)
+ {
+ inescq = FALSE; /* Reset literal state */
+ ptr++; /* Skip the 'E' */
+ goto CLASS_CONTINUE;
+ }
+ goto CLASS_LITERAL;
+ }
+
+ /* Handle POSIX class names. Perl allows a negation extension of the
+ form [:^name:]. A square bracket that doesn't match the syntax is
+ treated as a literal. We also recognize the POSIX constructions
+ [.ch.] and [=ch=] ("collating elements") and fault them, as Perl
+ 5.6 and 5.8 do. */
+
+ if (c == CHAR_LEFT_SQUARE_BRACKET &&
+ ptrend - ptr >= 3 &&
+ (*ptr == CHAR_COLON || *ptr == CHAR_DOT ||
+ *ptr == CHAR_EQUALS_SIGN) &&
+ check_posix_syntax(ptr, ptrend, &tempptr))
+ {
+ BOOL posix_negate = FALSE;
+ int posix_class;
+
+ /* Perl treats a hyphen before a POSIX class as a literal, not the
+ start of a range. However, it gives a warning in its warning mode. PCRE
+ does not have a warning mode, so we give an error, because this is
+ likely an error on the user's part. */
+
+ if (class_range_state == RANGE_STARTED)
+ {
+ errorcode = ERR50;
+ goto FAILED;
+ }
+
+ if (*ptr != CHAR_COLON)
+ {
+ errorcode = ERR13;
+ goto FAILED_BACK;
+ }
+
+ if (*(++ptr) == CHAR_CIRCUMFLEX_ACCENT)
+ {
+ posix_negate = TRUE;
+ ptr++;
+ }
+
+ posix_class = check_posix_name(ptr, (int)(tempptr - ptr));
+ if (posix_class < 0)
+ {
+ errorcode = ERR30;
+ goto FAILED;
+ }
+ ptr = tempptr + 2;
+
+ /* Perl treats a hyphen after a POSIX class as a literal, not the
+ start of a range. However, it gives a warning in its warning mode. PCRE
+ does not have a warning mode, so we give an error, because this is
+ likely an error on the user's part. */
+
+ if (ptr < ptrend && *ptr == CHAR_MINUS)
+ {
+ errorcode = ERR50;
+ goto FAILED;
+ }
+
+ /* Set "a hyphen is not the start of a range" just in case the POSIX
+ class is followed by \E or \Q\E (possibly repeated - fuzzers do that
+ kind of thing) and *then* a hyphen. This causes that hyphen to be
+ treated as a literal. I don't think it's worth setting up special
+ apparatus to do otherwise. */
+
+ class_range_state = RANGE_NO;
+
+ /* When PCRE2_UCP is set, some of the POSIX classes are converted to
+ use Unicode properties \p or \P or, in one case, \h or \H. The
+ substitutes table has two values per class, containing the type and
+ value of a \p or \P item. The special cases are specified with a
+ negative type: a non-zero value causes \h or \H to be used, and a zero
+ value falls through to behave like a non-UCP POSIX class. */
+
+#ifdef SUPPORT_UNICODE
+ if ((options & PCRE2_UCP) != 0)
+ {
+ int ptype = posix_substitutes[2*posix_class];
+ int pvalue = posix_substitutes[2*posix_class + 1];
+ if (ptype >= 0)
+ {
+ *parsed_pattern++ = META_ESCAPE + (posix_negate? ESC_P : ESC_p);
+ *parsed_pattern++ = (ptype << 16) | pvalue;
+ goto CLASS_CONTINUE;
+ }
+
+ if (pvalue != 0)
+ {
+ *parsed_pattern++ = META_ESCAPE + (posix_negate? ESC_H : ESC_h);
+ goto CLASS_CONTINUE;
+ }
+
+ /* Fall through */
+ }
+#endif /* SUPPORT_UNICODE */
+
+ /* Non-UCP POSIX class */
+
+ *parsed_pattern++ = posix_negate? META_POSIX_NEG : META_POSIX;
+ *parsed_pattern++ = posix_class;
+ }
+
+ /* Handle potential start of range */
+
+ else if (c == CHAR_MINUS && class_range_state >= RANGE_OK_ESCAPED)
+ {
+ *parsed_pattern++ = (class_range_state == RANGE_OK_LITERAL)?
+ META_RANGE_LITERAL : META_RANGE_ESCAPED;
+ class_range_state = RANGE_STARTED;
+ }
+
+ /* Handle a literal character */
+
+ else if (c != CHAR_BACKSLASH)
+ {
+ CLASS_LITERAL:
+ if (class_range_state == RANGE_STARTED)
+ {
+ if (c == parsed_pattern[-2]) /* Optimize one-char range */
+ parsed_pattern--;
+ else if (parsed_pattern[-2] > c) /* Check range is in order */
+ {
+ errorcode = ERR8;
+ goto FAILED_BACK;
+ }
+ else
+ {
+ if (!char_is_literal && parsed_pattern[-1] == META_RANGE_LITERAL)
+ parsed_pattern[-1] = META_RANGE_ESCAPED;
+ PARSED_LITERAL(c, parsed_pattern);
+ }
+ class_range_state = RANGE_NO;
+ }
+ else /* Potential start of range */
+ {
+ class_range_state = char_is_literal?
+ RANGE_OK_LITERAL : RANGE_OK_ESCAPED;
+ PARSED_LITERAL(c, parsed_pattern);
+ }
+ }
+
+ /* Handle escapes in a class */
+
+ else
+ {
+ escape = PRIV(check_escape)(&ptr, ptrend, &c, &errorcode,
+ options, TRUE, cb);
+
+ if (errorcode != 0) goto FAILED;
+ if (escape == 0) /* Escaped character code point is in c */
+ {
+ char_is_literal = FALSE;
+ goto CLASS_LITERAL;
+ }
+
+ /* These three escapes do not alter the class range state. */
+
+ if (escape == ESC_b)
+ {
+ c = CHAR_BS; /* \b is backspace in a class */
+ char_is_literal = FALSE;
+ goto CLASS_LITERAL;
+ }
+
+ else if (escape == ESC_Q)
+ {
+ inescq = TRUE; /* Enter literal mode */
+ goto CLASS_CONTINUE;
+ }
+
+ else if (escape == ESC_E) /* Ignore orphan \E */
+ goto CLASS_CONTINUE;
+
+ /* The second part of a range can be a single-character escape
+ sequence (detected above), but not any of the other escapes. Perl
+ treats a hyphen as a literal in such circumstances. However, in Perl's
+ warning mode, a warning is given, so PCRE now faults it, as it is
+ almost certainly a mistake on the user's part. */
+
+ if (class_range_state == RANGE_STARTED)
+ {
+ errorcode = ERR50;
+ goto FAILED;
+ }
+
+ /* Of the remaining escapes, only those that define characters are
+ allowed in a class. None may start a range. */
+
+ class_range_state = RANGE_NO;
+ switch(escape)
+ {
+ case ESC_N:
+ errorcode = ERR71; /* Not supported in a class */
+ goto FAILED;
+
+ case ESC_H:
+ case ESC_h:
+ case ESC_V:
+ case ESC_v:
+ *parsed_pattern++ = META_ESCAPE + escape;
+ break;
+
+ /* These escapes are converted to Unicode property tests when
+ PCRE2_UCP is set. */
+
+ case ESC_d:
+ case ESC_D:
+ case ESC_s:
+ case ESC_S:
+ case ESC_w:
+ case ESC_W:
+ if ((options & PCRE2_UCP) == 0)
+ {
+ *parsed_pattern++ = META_ESCAPE + escape;
+ }
+ else
+ {
+ *parsed_pattern++ = META_ESCAPE +
+ ((escape == ESC_d || escape == ESC_s || escape == ESC_w)?
+ ESC_p : ESC_P);
+ switch(escape)
+ {
+ case ESC_d:
+ case ESC_D:
+ *parsed_pattern++ = (PT_PC << 16) | ucp_Nd;
+ break;
+
+ case ESC_s:
+ case ESC_S:
+ *parsed_pattern++ = PT_SPACE << 16;
+ break;
+
+ case ESC_w:
+ case ESC_W:
+ *parsed_pattern++ = PT_WORD << 16;
+ break;
+ }
+ }
+ break;
+
+ /* Explicit Unicode property matching */
+
+ case ESC_P:
+ case ESC_p:
+#ifdef SUPPORT_UNICODE
+ {
+ BOOL negated;
+ uint16_t ptype = 0, pdata = 0;
+ if (!get_ucp(&ptr, &negated, &ptype, &pdata, &errorcode, cb))
+ goto FAILED;
+ if (negated) escape = (escape == ESC_P)? ESC_p : ESC_P;
+ *parsed_pattern++ = META_ESCAPE + escape;
+ *parsed_pattern++ = (ptype << 16) | pdata;
+ }
+#else
+ errorcode = ERR45;
+ goto FAILED;
+#endif
+ break; /* End \P and \p */
+
+ default: /* All others are not allowed in a class */
+ errorcode = ERR7;
+ goto FAILED_BACK;
+ }
+ }
+
+ /* Proceed to next thing in the class. */
+
+ CLASS_CONTINUE:
+ if (ptr >= ptrend)
+ {
+ errorcode = ERR6; /* Missing terminating ']' */
+ goto FAILED;
+ }
+ GETCHARINCTEST(c, ptr);
+ if (c == CHAR_RIGHT_SQUARE_BRACKET && !inescq) break;
+ } /* End of class-processing loop */
+
+ if (class_range_state == RANGE_STARTED)
+ {
+ parsed_pattern[-1] = CHAR_MINUS;
+ class_range_state = RANGE_NO;
+ }
+
+ *parsed_pattern++ = META_CLASS_END;
+ break; /* End of character class */
+
+
+ /* ---- Opening parenthesis ---- */
+
+ case CHAR_LEFT_PARENTHESIS:
+ if (ptr >= ptrend) goto UNCLOSED_PARENTHESIS;
+
+ /* If ( is not followed by ? it is either a capture or a special verb. */
+
+ if (*ptr != CHAR_QUESTION_MARK)
+ {
+ const char *vn;
+
+ /* Handle capturing brackets (or non-capturing if auto-capture is turned
+ off). */
+
+ if (*ptr != CHAR_ASTERISK)
+ {
+ nest_depth++;
+ if ((options & PCRE2_NO_AUTO_CAPTURE) == 0)
+ {
+ cb->bracount++;
+ *parsed_pattern++ = META_CAPTURE | cb->bracount;
+ }
+ else *parsed_pattern++ = META_NOCAPTURE;
+ }
+
+
+ /* ---- Handle (*VERB) and (*VERB:NAME) ---- */
+
+ /* Do nothing for (*) so it gives a "bad quantifier" error rather than
+ "(*MARK) must have an argument". */
+
+ else if (ptrend - ptr > 1 && ptr[1] != CHAR_RIGHT_PARENTHESIS)
+ {
+ vn = verbnames;
+ if (!read_name(&ptr, ptrend, 0, &offset, &name, &namelen, &errorcode,
+ cb)) goto FAILED;
+ if (ptr >= ptrend || (*ptr != CHAR_COLON &&
+ *ptr != CHAR_RIGHT_PARENTHESIS))
+ {
+ errorcode = ERR60; /* Malformed */
+ goto FAILED;
+ }
+
+ /* Scan the table of verb names */
+
+ for (i = 0; i < verbcount; i++)
+ {
+ if (namelen == verbs[i].len &&
+ PRIV(strncmp_c8)(name, vn, namelen) == 0)
+ break;
+ vn += verbs[i].len + 1;
+ }
+
+ if (i >= verbcount)
+ {
+ errorcode = ERR60; /* Verb not recognized */
+ goto FAILED;
+ }
+
+ /* An empty argument is treated as no argument. */
+
+ if (*ptr == CHAR_COLON && ptr + 1 < ptrend &&
+ ptr[1] == CHAR_RIGHT_PARENTHESIS)
+ ptr++; /* Advance to the closing parens */
+
+ /* Check for mandatory non-empty argument; this is (*MARK) */
+
+ if (verbs[i].has_arg > 0 && *ptr != CHAR_COLON)
+ {
+ errorcode = ERR66;
+ goto FAILED;
+ }
+
+ /* It appears that Perl allows any characters whatsoever, other than a
+ closing parenthesis, to appear in arguments ("names"), so we no longer
+ insist on letters, digits, and underscores. Perl does not, however, do
+ any interpretation within arguments, and has no means of including a
+ closing parenthesis. PCRE supports escape processing but only when it
+ is requested by an option. We set inverbname TRUE here, and let the
+ main loop take care of this so that escape and \x processing is done by
+ the main code above. */
+
+ if (*ptr++ == CHAR_COLON) /* Skip past : or ) */
+ {
+ if (verbs[i].has_arg < 0) /* Argument is forbidden */
+ {
+ errorcode = ERR59;
+ goto FAILED;
+ }
+ *parsed_pattern++ = verbs[i].meta +
+ ((verbs[i].meta != META_MARK)? 0x00010000u:0);
+ verblengthptr = parsed_pattern++;
+ verbnamestart = ptr;
+ inverbname = TRUE;
+ }
+ else /* No verb "name" argument */
+ {
+ *parsed_pattern++ = verbs[i].meta;
+ }
+ } /* End of (*VERB) handling */
+ break; /* Done with this parenthesis */
+ } /* End of groups that don't start with (? */
+
+
+ /* ---- Items starting (? ---- */
+
+ /* The type of item is determined by what follows (?. Handle (?| and option
+ changes under "default" because both need a new block on the nest stack.
+ Comments starting with (?# are handled above. Note that there is some
+ ambiguity about the sequence (?- because if a digit follows it's a relative
+ recursion or subroutine call whereas otherwise it's an option unsetting. */
+
+ if (++ptr >= ptrend) goto UNCLOSED_PARENTHESIS;
+
+ switch(*ptr)
+ {
+ default:
+ if (*ptr == CHAR_MINUS && ptrend - ptr > 1 && IS_DIGIT(ptr[1]))
+ goto RECURSION_BYNUMBER; /* The + case is handled by CHAR_PLUS */
+
+ /* We now have either (?| or a (possibly empty) option setting,
+ optionally followed by a non-capturing group. */
+
+ nest_depth++;
+ if (top_nest == NULL) top_nest = (nest_save *)(cb->start_workspace);
+ else if (++top_nest >= end_nests)
+ {
+ errorcode = ERR84;
+ goto FAILED;
+ }
+ top_nest->nest_depth = nest_depth;
+ top_nest->flags = 0;
+ if ((options & PCRE2_EXTENDED) != 0) top_nest->flags |= NSF_EXTENDED;
+ if ((options & PCRE2_DUPNAMES) != 0) top_nest->flags |= NSF_DUPNAMES;
+
+ /* Start of non-capturing group that resets the capture count for each
+ branch. */
+
+ if (*ptr == CHAR_VERTICAL_LINE)
+ {
+ top_nest->reset_group = (uint16_t)cb->bracount;
+ top_nest->max_group = (uint16_t)cb->bracount;
+ top_nest->flags |= NSF_RESET;
+ cb->external_flags |= PCRE2_DUPCAPUSED;
+ *parsed_pattern++ = META_NOCAPTURE;
+ ptr++;
+ }
+
+ /* Scan for options imsxJU. We need to keep track of (?x) and (?J) for
+ use while scanning. The other options are used during the compiling
+ phases. */
+
+ else
+ {
+ top_nest->reset_group = 0;
+ top_nest->max_group = 0;
+ set = unset = 0;
+ optset = &set;
+
+ while (ptr < ptrend && *ptr != CHAR_RIGHT_PARENTHESIS &&
+ *ptr != CHAR_COLON)
+ {
+ switch (*ptr++)
+ {
+ case CHAR_MINUS: optset = &unset; break;
+
+ case CHAR_J: /* Record that it changed in the external options */
+ *optset |= PCRE2_DUPNAMES;
+ cb->external_flags |= PCRE2_JCHANGED;
+ break;
+
+ case CHAR_i: *optset |= PCRE2_CASELESS; break;
+ case CHAR_m: *optset |= PCRE2_MULTILINE; break;
+ case CHAR_s: *optset |= PCRE2_DOTALL; break;
+ case CHAR_x: *optset |= PCRE2_EXTENDED; break;
+ case CHAR_U: *optset |= PCRE2_UNGREEDY; break;
+
+ default:
+ errorcode = ERR11;
+ ptr--; /* Correct the offset */
+ goto FAILED;
+ }
+ }
+ options = (options | set) & (~unset);
+
+ /* If the options ended with ')' this is not the start of a nested
+ group with option changes, so the options change at this level.
+ In this case, if the previous level set up a nest block, discard the
+ one we have just created. Otherwise adjust it for the previous level.
+ If the options ended with ':' we are starting a non-capturing group,
+ possibly with an options setting. */
+
+ if (ptr >= ptrend) goto UNCLOSED_PARENTHESIS;
+ if (*ptr++ == CHAR_RIGHT_PARENTHESIS)
+ {
+ nest_depth--; /* This is not a nested group after all. */
+ if (top_nest > (nest_save *)(cb->start_workspace) &&
+ (top_nest-1)->nest_depth == nest_depth) top_nest--;
+ else top_nest->nest_depth = nest_depth;
+ }
+ else *parsed_pattern++ = META_NOCAPTURE;
+
+ /* If nothing changed, no need to record. */
+
+ if (set != 0 || unset != 0)
+ {
+ *parsed_pattern++ = META_OPTIONS;
+ *parsed_pattern++ = options;
+ }
+ } /* End options processing */
+ break; /* End default case after (? */
+
+
+ /* ---- Python syntax support ---- */
+
+ case CHAR_P:
+ if (++ptr >= ptrend) goto UNCLOSED_PARENTHESIS;
+
+ /* (?P<name> is the same as (?<name>, which defines a named group. */
+
+ if (*ptr == CHAR_LESS_THAN_SIGN)
+ {
+ terminator = CHAR_GREATER_THAN_SIGN;
+ goto DEFINE_NAME;
+ }
+
+ /* (?P>name) is the same as (?&name), which is a recursion or subroutine
+ call. */
+
+ if (*ptr == CHAR_GREATER_THAN_SIGN) goto RECURSE_BY_NAME;
+
+ /* (?P=name) is the same as \k<name>, a back reference by name. Anything
+ else after (?P is an error. */
+
+ if (*ptr != CHAR_EQUALS_SIGN)
+ {
+ errorcode = ERR41;
+ goto FAILED;
+ }
+ if (!read_name(&ptr, ptrend, CHAR_RIGHT_PARENTHESIS, &offset, &name,
+ &namelen, &errorcode, cb)) goto FAILED;
+ *parsed_pattern++ = META_BACKREF_BYNAME;
+ *parsed_pattern++ = namelen;
+ PUTOFFSET(offset, parsed_pattern);
+ okquantifier = TRUE;
+ break; /* End of (?P processing */
+
+
+ /* ---- Recursion/subroutine calls by number ---- */
+
+ case CHAR_R:
+ i = 0; /* (?R) == (?R0) */
+ ptr++;
+ if (ptr >= ptrend || *ptr != CHAR_RIGHT_PARENTHESIS)
+ {
+ errorcode = ERR58;
+ goto FAILED;
+ }
+ goto SET_RECURSION;
+
+ /* An item starting (?- followed by a digit comes here via the "default"
+ case because (?- followed by a non-digit is an options setting. */
+
+ case CHAR_PLUS:
+ if (ptrend - ptr < 2 || !IS_DIGIT(ptr[1]))
+ {
+ errorcode = ERR29; /* Missing number */
+ goto FAILED;
+ }
+ /* Fall through */
+
+ case CHAR_0: case CHAR_1: case CHAR_2: case CHAR_3: case CHAR_4:
+ case CHAR_5: case CHAR_6: case CHAR_7: case CHAR_8: case CHAR_9:
+ RECURSION_BYNUMBER:
+ if (!read_number(&ptr, ptrend,
+ (IS_DIGIT(*ptr))? -1:(int)(cb->bracount), /* + and - are relative */
+ MAX_GROUP_NUMBER, ERR61,
+ &i, &errorcode)) goto FAILED;
+ if (i < 0) /* NB (?0) is permitted */
+ {
+ errorcode = ERR15; /* Unknown group */
+ goto FAILED_BACK;
+ }
+ if (ptr >= ptrend || *ptr != CHAR_RIGHT_PARENTHESIS)
+ goto UNCLOSED_PARENTHESIS;
+
+ SET_RECURSION:
+ *parsed_pattern++ = META_RECURSE | (uint32_t)i;
+ offset = (PCRE2_SIZE)(ptr - cb->start_pattern);
+ ptr++;
+ PUTOFFSET(offset, parsed_pattern);
+ okquantifier = TRUE;
+ break; /* End of recursive call by number handling */
+
+
+ /* ---- Recursion/subroutine calls by name ---- */
+
+ case CHAR_AMPERSAND:
+ RECURSE_BY_NAME:
+ if (!read_name(&ptr, ptrend, CHAR_RIGHT_PARENTHESIS, &offset, &name,
+ &namelen, &errorcode, cb)) goto FAILED;
+ *parsed_pattern++ = META_RECURSE_BYNAME;
+ *parsed_pattern++ = namelen;
+ PUTOFFSET(offset, parsed_pattern);
+ okquantifier = TRUE;
+ break;
+
+ /* ---- Callout with numerical or string argument ---- */
+
+ case CHAR_C:
+ if (++ptr >= ptrend) goto UNCLOSED_PARENTHESIS;
+
+ /* If the previous item was a condition starting (?(? an assertion,
+ optionally preceded by a callout, is expected. This is checked later on,
+ during actual compilation. However we need to identify this kind of
+ assertion in this pass because it must not be qualified. The value of
+ expect_cond_assert is set to 2 after (?(? is processed. We decrement it
+ for a callout - still leaving a positive value that identifies the
+ assertion. Multiple callouts or any other items will make it zero or
+ less, which doesn't matter because they will cause an error later. */
+
+ expect_cond_assert = prev_expect_cond_assert - 1;
+
+ /* If previous_callout is not NULL, it means this follows a previous
+ callout. If it was a manual callout, do nothing; this means its "length
+ of next pattern item" field will remain zero. If it was an automatic
+ callout, abolish it. */
+
+ if (previous_callout != NULL && (options & PCRE2_AUTO_CALLOUT) != 0 &&
+ previous_callout == parsed_pattern - 4 &&
+ parsed_pattern[-1] == 255)
+ parsed_pattern = previous_callout;
+
+ /* Save for updating next pattern item length, and skip one item before
+ completing. */
+
+ previous_callout = parsed_pattern;
+ after_manual_callout = 1;
+
+ /* Handle a string argument; specific delimiter is required. */
+
+ if (*ptr != CHAR_RIGHT_PARENTHESIS && !IS_DIGIT(*ptr))
+ {
+ PCRE2_SIZE calloutlength;
+ PCRE2_SPTR startptr = ptr;
+
+ delimiter = 0;
+ for (i = 0; PRIV(callout_start_delims)[i] != 0; i++)
+ {
+ if (*ptr == PRIV(callout_start_delims)[i])
+ {
+ delimiter = PRIV(callout_end_delims)[i];
+ break;
+ }
+ }
+ if (delimiter == 0)
+ {
+ errorcode = ERR82;
+ goto FAILED;
+ }
+
+ *parsed_pattern = META_CALLOUT_STRING;
+ parsed_pattern += 3; /* Skip pattern info */
+
+ for (;;)
+ {
+ if (++ptr >= ptrend)
+ {
+ errorcode = ERR81;
+ ptr = startptr; /* To give a more useful message */
+ goto FAILED;
+ }
+ if (*ptr == delimiter && (++ptr >= ptrend || *ptr != delimiter))
+ break;
+ }
+
+ calloutlength = (PCRE2_SIZE)(ptr - startptr);
+ if (calloutlength > UINT32_MAX)
+ {
+ errorcode = ERR72;
+ goto FAILED;
+ }
+ *parsed_pattern++ = (uint32_t)calloutlength;
+ offset = (PCRE2_SIZE)(startptr - cb->start_pattern);
+ PUTOFFSET(offset, parsed_pattern);
+ }
+
+ /* Handle a callout with an optional numerical argument, which must be
+ less than or equal to 255. A missing argument gives 0. */
+
+ else
+ {
+ int n = 0;
+ *parsed_pattern = META_CALLOUT_NUMBER; /* Numerical callout */
+ parsed_pattern += 3; /* Skip pattern info */
+ while (ptr < ptrend && IS_DIGIT(*ptr))
+ {
+ n = n * 10 + *ptr++ - CHAR_0;
+ if (n > 255)
+ {
+ errorcode = ERR38;
+ goto FAILED;
+ }
+ }
+ *parsed_pattern++ = n;
+ }
+
+ /* Both formats must have a closing parenthesis */
+
+ if (ptr >= ptrend || *ptr != CHAR_RIGHT_PARENTHESIS)
+ {
+ errorcode = ERR39;
+ goto FAILED;
+ }
+ ptr++;
+
+ /* Remember the offset to the next item in the pattern, and set a default
+ length. This should get updated after the next item is read. */
+
+ previous_callout[1] = ptr - cb->start_pattern;
+ previous_callout[2] = 0;
+ break; /* End callout */
+
+
+ /* ---- Conditional group ---- */
+
+ /* A condition can be an assertion, a number (referring to a numbered
+ group's having been set), a name (referring to a named group), or 'R',
+ referring to overall recursion. R<digits> and R&name are also permitted
+ for recursion state tests. Numbers may be preceded by + or - to specify a
+ relative group number.
+
+ There are several syntaxes for testing a named group: (?(name)) is used
+ by Python; Perl 5.10 onwards uses (?(<name>) or (?('name')).
+
+ There are two unfortunate ambiguities. 'R' can be the recursive thing or
+ the name 'R' (and similarly for 'R' followed by digits). 'DEFINE' can be
+ the Perl DEFINE feature or the Python named test. We look for a name
+ first; if not found, we try the other case.
+
+ For compatibility with auto-callouts, we allow a callout to be specified
+ before a condition that is an assertion. */
+
+ case CHAR_LEFT_PARENTHESIS:
+ if (++ptr >= ptrend) goto UNCLOSED_PARENTHESIS;
+ nest_depth++;
+
+ /* If the next character is ? there must be an assertion next (optionally
+ preceded by a callout). We do not check this here, but instead we set
+ expect_cond_assert to 2. If this is still greater than zero (callouts
+ decrement it) when the next assertion is read, it will be marked as a
+ condition that must not be repeated. A value greater than zero also
+ causes checking that an assertion (possibly with callout) follows. */
+
+ if (*ptr == CHAR_QUESTION_MARK)
+ {
+ *parsed_pattern++ = META_COND_ASSERT;
+ ptr--; /* Pull pointer back to the opening parenthesis. */
+ expect_cond_assert = 2;
+ break; /* End of conditional */
+ }
+
+ /* Handle (?([+-]number)... */
+
+ if (read_number(&ptr, ptrend, cb->bracount, MAX_GROUP_NUMBER, ERR61, &i,
+ &errorcode))
+ {
+ if (i <= 0)
+ {
+ errorcode = ERR15;
+ goto FAILED;
+ }
+ *parsed_pattern++ = META_COND_NUMBER;
+ offset = (PCRE2_SIZE)(ptr - cb->start_pattern - 2);
+ PUTOFFSET(offset, parsed_pattern);
+ *parsed_pattern++ = i;
+ }
+ else if (errorcode != 0) goto FAILED; /* Number too big */
+
+ /* No number found. Handle the special case (?(VERSION[>]=n.m)... */
+
+ else if (ptrend - ptr >= 10 &&
+ PRIV(strncmp_c8)(ptr, STRING_VERSION, 7) == 0 &&
+ ptr[7] != CHAR_RIGHT_PARENTHESIS)
+ {
+ uint32_t ge = 0;
+ int major = 0;
+ int minor = 0;
+
+ ptr += 7;
+ if (*ptr == CHAR_GREATER_THAN_SIGN)
+ {
+ ge = 1;
+ ptr++;
+ }
+
+ /* NOTE: cannot write IS_DIGIT(*(++ptr)) here because IS_DIGIT
+ references its argument twice. */
+
+ if (*ptr != CHAR_EQUALS_SIGN || (ptr++, !IS_DIGIT(*ptr)))
+ goto BAD_VERSION_CONDITION;
+
+ if (!read_number(&ptr, ptrend, -1, 1000, ERR79, &major, &errorcode))
+ goto FAILED;
+
+ if (ptr >= ptrend) goto BAD_VERSION_CONDITION;
+ if (*ptr == CHAR_DOT)
+ {
+ if (++ptr >= ptrend || !IS_DIGIT(*ptr)) goto BAD_VERSION_CONDITION;
+ if (!read_number(&ptr, ptrend, -1, 99 , ERR79, &minor, &errorcode))
+ goto FAILED;
+ if (minor < 10) minor *= 10;
+ if (ptr >= ptrend || *ptr != CHAR_RIGHT_PARENTHESIS)
+ goto BAD_VERSION_CONDITION;
+ }
+
+ *parsed_pattern++ = META_COND_VERSION;
+ *parsed_pattern++ = ge;
+ *parsed_pattern++ = major;
+ *parsed_pattern++ = minor;
+ }
+
+ /* All the remaining cases now require us to read a name. We cannot at
+ this stage distinguish ambiguous cases such as (?(R12) which might be a
+ recursion test by number or a name, because the named groups have not yet
+ all been identified. Those cases are treated as names, but given a
+ different META code. */
+
+ else
+ {
+ BOOL was_r_ampersand = FALSE;
+
+ if (*ptr == CHAR_R && ptrend - ptr > 1 && ptr[1] == CHAR_AMPERSAND)
+ {
+ terminator = CHAR_RIGHT_PARENTHESIS;
+ was_r_ampersand = TRUE;
+ ptr++;
+ }
+ else if (*ptr == CHAR_LESS_THAN_SIGN)
+ terminator = CHAR_GREATER_THAN_SIGN;
+ else if (*ptr == CHAR_APOSTROPHE)
+ terminator = CHAR_APOSTROPHE;
+ else
+ {
+ terminator = CHAR_RIGHT_PARENTHESIS;
+ ptr--; /* Point to char before name */
+ }
+ if (!read_name(&ptr, ptrend, terminator, &offset, &name, &namelen,
+ &errorcode, cb)) goto FAILED;
+
+ /* Handle (?(R&name) */
+
+ if (was_r_ampersand)
+ {
+ *parsed_pattern = META_COND_RNAME;
+ ptr--; /* Back to closing parens */
+ }
+
+ /* Handle (?(name). If the name is "DEFINE" we identify it with a
+ special code. Likewise if the name consists of R followed only by
+ digits. Otherwise, handle it like a quoted name. */
+
+ else if (terminator == CHAR_RIGHT_PARENTHESIS)
+ {
+ if (namelen == 6 && PRIV(strncmp_c8)(name, STRING_DEFINE, 6) == 0)
+ *parsed_pattern = META_COND_DEFINE;
+ else
+ {
+ for (i = 1; i < (int)namelen; i++)
+ if (!IS_DIGIT(name[i])) break;
+ *parsed_pattern = (*name == CHAR_R && i >= (int)namelen)?
+ META_COND_RNUMBER : META_COND_NAME;
+ }
+ ptr--; /* Back to closing parens */
+ }
+
+ /* Handle (?('name') or (?(<name>) */
+
+ else *parsed_pattern = META_COND_NAME;
+
+ /* All these cases except DEFINE end with the name length and offset;
+ DEFINE just has an offset (for the "too many branches" error). */
+
+ if (*parsed_pattern++ != META_COND_DEFINE) *parsed_pattern++ = namelen;
+ PUTOFFSET(offset, parsed_pattern);
+ } /* End cases that read a name */
+
+ /* Check the closing parenthesis of the condition */
+
+ if (ptr >= ptrend || *ptr != CHAR_RIGHT_PARENTHESIS)
+ {
+ errorcode = ERR24;
+ goto FAILED;
+ }
+ ptr++;
+ break; /* End of condition processing */
+
+
+ /* ---- Atomic group ---- */
+
+ case CHAR_GREATER_THAN_SIGN:
+ *parsed_pattern++ = META_ATOMIC;
+ nest_depth++;
+ ptr++;
+ break;
+
+
+ /* ---- Lookahead assertions ---- */
+
+ case CHAR_EQUALS_SIGN:
+ *parsed_pattern++ = META_LOOKAHEAD;
+ ptr++;
+ goto POST_ASSERTION;
+
+ case CHAR_EXCLAMATION_MARK:
+ *parsed_pattern++ = META_LOOKAHEADNOT;
+ ptr++;
+ goto POST_ASSERTION;
+
+
+ /* ---- Lookbehind assertions ---- */
+
+ /* (?< followed by = or ! is a lookbehind assertion. Otherwise (?< is the
+ start of the name of a capturing group. */
+
+ case CHAR_LESS_THAN_SIGN:
+ if (ptrend - ptr <= 1 ||
+ (ptr[1] != CHAR_EQUALS_SIGN && ptr[1] != CHAR_EXCLAMATION_MARK))
+ {
+ terminator = CHAR_GREATER_THAN_SIGN;
+ goto DEFINE_NAME;
+ }
+ *parsed_pattern++ = (ptr[1] == CHAR_EQUALS_SIGN)?
+ META_LOOKBEHIND : META_LOOKBEHINDNOT;
+ *has_lookbehind = TRUE;
+ offset = (PCRE2_SIZE)(ptr - cb->start_pattern - 2);
+ PUTOFFSET(offset, parsed_pattern);
+ ptr += 2;
+ /* Fall through */
+
+ /* If the previous item was a condition starting (?(? an assertion,
+ optionally preceded by a callout, is expected. This is checked later on,
+ during actual compilation. However we need to identify this kind of
+ assertion in this pass because it must not be qualified. The value of
+ expect_cond_assert is set to 2 after (?(? is processed. We decrement it
+ for a callout - still leaving a positive value that identifies the
+ assertion. Multiple callouts or any other items will make it zero or
+ less, which doesn't matter because they will cause an error later. */
+
+ POST_ASSERTION:
+ nest_depth++;
+ if (prev_expect_cond_assert > 0)
+ {
+ if (top_nest == NULL) top_nest = (nest_save *)(cb->start_workspace);
+ else if (++top_nest >= end_nests)
+ {
+ errorcode = ERR84;
+ goto FAILED;
+ }
+ top_nest->nest_depth = nest_depth;
+ top_nest->flags = NSF_CONDASSERT;
+ if ((options & PCRE2_EXTENDED) != 0) top_nest->flags |= NSF_EXTENDED;
+ if ((options & PCRE2_DUPNAMES) != 0) top_nest->flags |= NSF_DUPNAMES;
+ }
+ break;
+
+
+ /* ---- Define a named group ---- */
+
+ /* A named group may be defined as (?'name') or (?<name>). In the latter
+ case we jump to DEFINE_NAME from the disambiguation of (?< above with the
+ terminator set to '>'. */
+
+ case CHAR_APOSTROPHE:
+ terminator = CHAR_APOSTROPHE; /* Terminator */
+
+ DEFINE_NAME:
+ if (!read_name(&ptr, ptrend, terminator, &offset, &name, &namelen,
+ &errorcode, cb)) goto FAILED;
+
+ /* We have a name for this capturing group. It is also assigned a number,
+ which is its primary means of identification. */
+
+ cb->bracount++;
+ *parsed_pattern++ = META_CAPTURE | cb->bracount;
+ nest_depth++;
+
+ /* Check not too many names */
+
+ if (cb->names_found >= MAX_NAME_COUNT)
+ {
+ errorcode = ERR49;
+ goto FAILED;
+ }
+
+ /* Adjust the entry size to accommodate the longest name found. */
+
+ if (namelen + IMM2_SIZE + 1 > cb->name_entry_size)
+ cb->name_entry_size = (uint16_t)(namelen + IMM2_SIZE + 1);
+
+ /* Scan the list to check for duplicates. For duplicate names, if the
+ number is the same, break the loop, which causes the name to be
+ discarded; otherwise, if DUPNAMES is not set, give an error.
+ If it is set, allow the name with a different number, but continue
+ scanning in case this is a duplicate with the same number. For
+ non-duplicate names, give an error if the number is duplicated. */
+
+ isdupname = FALSE;
+ ng = cb->named_groups;
+ for (i = 0; i < cb->names_found; i++, ng++)
+ {
+ if (namelen == ng->length &&
+ PRIV(strncmp)(name, ng->name, (PCRE2_SIZE)namelen) == 0)
+ {
+ if (ng->number == cb->bracount) break;
+ if ((options & PCRE2_DUPNAMES) == 0)
+ {
+ errorcode = ERR43;
+ goto FAILED;
+ }
+ isdupname = ng->isdup = TRUE; /* Mark as a duplicate */
+ cb->dupnames = TRUE; /* Duplicate names exist */
+ }
+ else if (ng->number == cb->bracount)
+ {
+ errorcode = ERR65;
+ goto FAILED;
+ }
+ }
+
+ if (i < cb->names_found) break; /* Ignore duplicate with same number */
+
+ /* Increase the list size if necessary */
+
+ if (cb->names_found >= cb->named_group_list_size)
+ {
+ uint32_t newsize = cb->named_group_list_size * 2;
+ named_group *newspace =
+ cb->cx->memctl.malloc(newsize * sizeof(named_group),
+ cb->cx->memctl.memory_data);
+ if (newspace == NULL)
+ {
+ errorcode = ERR21;
+ goto FAILED;
+ }
+
+ memcpy(newspace, cb->named_groups,
+ cb->named_group_list_size * sizeof(named_group));
+ if (cb->named_group_list_size > NAMED_GROUP_LIST_SIZE)
+ cb->cx->memctl.free((void *)cb->named_groups,
+ cb->cx->memctl.memory_data);
+ cb->named_groups = newspace;
+ cb->named_group_list_size = newsize;
+ }
+
+ /* Add this name to the list */
+
+ cb->named_groups[cb->names_found].name = name;
+ cb->named_groups[cb->names_found].length = (uint16_t)namelen;
+ cb->named_groups[cb->names_found].number = cb->bracount;
+ cb->named_groups[cb->names_found].isdup = (uint16_t)isdupname;
+ cb->names_found++;
+ break;
+ } /* End of (? switch */
+ break; /* End of ( handling */
+
+
+ /* ---- Branch terminators ---- */
+
+ /* Alternation: reset the capture count if we are in a (?| group. */
+
+ case CHAR_VERTICAL_LINE:
+ if (top_nest != NULL && top_nest->nest_depth == nest_depth &&
+ (top_nest->flags & NSF_RESET) != 0)
+ {
+ if (cb->bracount > top_nest->max_group)
+ top_nest->max_group = (uint16_t)cb->bracount;
+ cb->bracount = top_nest->reset_group;
+ }
+ *parsed_pattern++ = META_ALT;
+ break;
+
+ /* End of group; reset the capture count to the maximum if we are in a (?|
+ group and/or reset the extended and dupnames options. Disallow quantifier
+ for a condition that is an assertion. */
+
+ case CHAR_RIGHT_PARENTHESIS:
+ okquantifier = TRUE;
+ if (top_nest != NULL && top_nest->nest_depth == nest_depth)
+ {
+ if ((top_nest->flags & NSF_RESET) != 0 &&
+ top_nest->max_group > cb->bracount)
+ cb->bracount = top_nest->max_group;
+ if ((top_nest->flags & NSF_EXTENDED) != 0) options |= PCRE2_EXTENDED;
+ else options &= ~PCRE2_EXTENDED;
+ if ((top_nest->flags & NSF_DUPNAMES) != 0) options |= PCRE2_DUPNAMES;
+ else options &= ~PCRE2_DUPNAMES;
+ if ((top_nest->flags & NSF_CONDASSERT) != 0)
+ okquantifier = FALSE;
+ if (top_nest == (nest_save *)(cb->start_workspace)) top_nest = NULL;
+ else top_nest--;
+ }
+ if (nest_depth == 0) /* Unmatched closing parenthesis */
+ {
+ errorcode = ERR22;
+ goto FAILED_BACK;
+ }
+ nest_depth--;
+ *parsed_pattern++ = META_KET;
+ break;
+ } /* End of switch on pattern character */
+ } /* End of main character scan loop */
+
+/* End of pattern reached. Check for missing ) at the end of a verb name. */
+
+if (inverbname && ptr >= ptrend)
+ {
+ errorcode = ERR60;
+ goto FAILED;
+ }
+
+/* Manage callout for the final item */
+
+parsed_pattern = manage_callouts(ptr, &previous_callout, options,
+ parsed_pattern, cb);
+
+/* Terminate the parsed pattern, then return success if all groups are closed.
+Otherwise we have unclosed parentheses. */
+
+if (parsed_pattern >= parsed_pattern_end)
+ {
+ errorcode = ERR63; /* Internal error (parsed pattern overflow) */
+ goto FAILED;
+ }
+*parsed_pattern = META_END;
+if (nest_depth == 0) return 0;
+
+UNCLOSED_PARENTHESIS:
+errorcode = ERR14;
+
+/* Come here for all failures. */
+
+FAILED:
+cb->erroroffset = (PCRE2_SIZE)(ptr - cb->start_pattern);
+return errorcode;
+
+/* Some errors need to indicate the previous character. */
+
+FAILED_BACK:
+ptr--;
+goto FAILED;
+
+/* This failure happens several times. */
+
+BAD_VERSION_CONDITION:
+errorcode = ERR79;
+goto FAILED;
+}
+
+
+
+/*************************************************
+* Find first significant op code *
+*************************************************/
+
+/* This is called by several functions that scan a compiled expression looking
+for a fixed first character, or an anchoring op code etc. It skips over things
+that do not influence this. For some calls, it makes sense to skip negative
+forward and all backward assertions, and also the \b assertion; for others it
+does not.
+
+Arguments:
+ code pointer to the start of the group
+ skipassert TRUE if certain assertions are to be skipped
+
+Returns: pointer to the first significant opcode
+*/
+
+static const PCRE2_UCHAR*
+first_significant_code(PCRE2_SPTR code, BOOL skipassert)
+{
+for (;;)
+ {
+ switch ((int)*code)
+ {
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ if (!skipassert) return code;
+ do code += GET(code, 1); while (*code == OP_ALT);
+ code += PRIV(OP_lengths)[*code];
+ break;
+
+ case OP_WORD_BOUNDARY:
+ case OP_NOT_WORD_BOUNDARY:
+ if (!skipassert) return code;
+ /* Fall through */
+
+ case OP_CALLOUT:
+ case OP_CREF:
+ case OP_DNCREF:
+ case OP_RREF:
+ case OP_DNRREF:
+ case OP_FALSE:
+ case OP_TRUE:
+ code += PRIV(OP_lengths)[*code];
+ break;
+
+ case OP_CALLOUT_STR:
+ code += GET(code, 1 + 2*LINK_SIZE);
+ break;
+
+ default:
+ return code;
+ }
+ }
+/* Control never reaches here */
+}
+
+
+
+#ifdef SUPPORT_UNICODE
+/*************************************************
+* Get othercase range *
+*************************************************/
+
+/* This function is passed the start and end of a class range in UCP mode. It
+searches up the characters, looking for ranges of characters in the "other"
+case. Each call returns the next one, updating the start address. A character
+with multiple other cases is returned on its own with a special return value.
+
+Arguments:
+ cptr points to starting character value; updated
+ d end value
+ ocptr where to put start of othercase range
+ odptr where to put end of othercase range
+
+Yield: -1 when no more
+ 0 when a range is returned
+ >0 the CASESET offset for char with multiple other cases
+ in this case, ocptr contains the original
+*/
+
+static int
+get_othercase_range(uint32_t *cptr, uint32_t d, uint32_t *ocptr,
+ uint32_t *odptr)
+{
+uint32_t c, othercase, next;
+unsigned int co;
+
+/* Find the first character that has an other case. If it has multiple other
+cases, return its case offset value. */
+
+for (c = *cptr; c <= d; c++)
+ {
+ if ((co = UCD_CASESET(c)) != 0)
+ {
+ *ocptr = c++; /* Character that has the set */
+ *cptr = c; /* Rest of input range */
+ return (int)co;
+ }
+ if ((othercase = UCD_OTHERCASE(c)) != c) break;
+ }
+
+if (c > d) return -1; /* Reached end of range */
+
+/* Found a character that has a single other case. Search for the end of the
+range, which is either the end of the input range, or a character that has zero
+or more than one other cases. */
+
+*ocptr = othercase;
+next = othercase + 1;
+
+for (++c; c <= d; c++)
+ {
+ if ((co = UCD_CASESET(c)) != 0 || UCD_OTHERCASE(c) != next) break;
+ next++;
+ }
+
+*odptr = next - 1; /* End of othercase range */
+*cptr = c; /* Rest of input range */
+return 0;
+}
+#endif /* SUPPORT_UNICODE */
+
+
+
+/*************************************************
+* Add a character or range to a class (internal) *
+*************************************************/
+
+/* This function packages up the logic of adding a character or range of
+characters to a class. The character values in the arguments will be within the
+valid values for the current mode (8-bit, 16-bit, UTF, etc). This function is
+called only from within the "add to class" group of functions, some of which
+are recursive and mutually recursive. The external entry point is
+add_to_class().
+
+Arguments:
+ classbits the bit map for characters < 256
+ uchardptr points to the pointer for extra data
+ options the options word
+ cb compile data
+ start start of range character
+ end end of range character
+
+Returns: the number of < 256 characters added
+ the pointer to extra data is updated
+*/
+
+static unsigned int
+add_to_class_internal(uint8_t *classbits, PCRE2_UCHAR **uchardptr,
+ uint32_t options, compile_block *cb, uint32_t start, uint32_t end)
+{
+uint32_t c;
+uint32_t classbits_end = (end <= 0xff ? end : 0xff);
+unsigned int n8 = 0;
+
+/* If caseless matching is required, scan the range and process alternate
+cases. In Unicode, there are 8-bit characters that have alternate cases that
+are greater than 255 and vice-versa. Sometimes we can just extend the original
+range. */
+
+if ((options & PCRE2_CASELESS) != 0)
+ {
+#ifdef SUPPORT_UNICODE
+ if ((options & PCRE2_UTF) != 0)
+ {
+ int rc;
+ uint32_t oc, od;
+
+ options &= ~PCRE2_CASELESS; /* Remove for recursive calls */
+ c = start;
+
+ while ((rc = get_othercase_range(&c, end, &oc, &od)) >= 0)
+ {
+ /* Handle a single character that has more than one other case. */
+
+ if (rc > 0) n8 += add_list_to_class_internal(classbits, uchardptr, options, cb,
+ PRIV(ucd_caseless_sets) + rc, oc);
+
+ /* Do nothing if the other case range is within the original range. */
+
+ else if (oc >= cb->class_range_start && od <= cb->class_range_end) continue;
+
+ /* Extend the original range if there is overlap, noting that if oc < c, we
+ can't have od > end because a subrange is always shorter than the basic
+ range. Otherwise, use a recursive call to add the additional range. */
+
+ else if (oc < start && od >= start - 1) start = oc; /* Extend downwards */
+ else if (od > end && oc <= end + 1)
+ {
+ end = od; /* Extend upwards */
+ if (end > classbits_end) classbits_end = (end <= 0xff ? end : 0xff);
+ }
+ else n8 += add_to_class_internal(classbits, uchardptr, options, cb, oc, od);
+ }
+ }
+ else
+#endif /* SUPPORT_UNICODE */
+
+ /* Not UTF mode */
+
+ for (c = start; c <= classbits_end; c++)
+ {
+ SETBIT(classbits, cb->fcc[c]);
+ n8++;
+ }
+ }
+
+/* Now handle the originally supplied range. Adjust the final value according
+to the bit length - this means that the same lists of (e.g.) horizontal spaces
+can be used in all cases. */
+
+if ((options & PCRE2_UTF) == 0 && end > MAX_NON_UTF_CHAR)
+ end = MAX_NON_UTF_CHAR;
+
+if (start > cb->class_range_start && end < cb->class_range_end) return n8;
+
+/* Use the bitmap for characters < 256. Otherwise use extra data.*/
+
+for (c = start; c <= classbits_end; c++)
+ {
+ /* Regardless of start, c will always be <= 255. */
+ SETBIT(classbits, c);
+ n8++;
+ }
+
+#ifdef SUPPORT_WIDE_CHARS
+if (start <= 0xff) start = 0xff + 1;
+
+if (end >= start)
+ {
+ PCRE2_UCHAR *uchardata = *uchardptr;
+
+#ifdef SUPPORT_UNICODE
+ if ((options & PCRE2_UTF) != 0)
+ {
+ if (start < end)
+ {
+ *uchardata++ = XCL_RANGE;
+ uchardata += PRIV(ord2utf)(start, uchardata);
+ uchardata += PRIV(ord2utf)(end, uchardata);
+ }
+ else if (start == end)
+ {
+ *uchardata++ = XCL_SINGLE;
+ uchardata += PRIV(ord2utf)(start, uchardata);
+ }
+ }
+ else
+#endif /* SUPPORT_UNICODE */
+
+ /* Without UTF support, character values are constrained by the bit length,
+ and can only be > 256 for 16-bit and 32-bit libraries. */
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ {}
+#else
+ if (start < end)
+ {
+ *uchardata++ = XCL_RANGE;
+ *uchardata++ = start;
+ *uchardata++ = end;
+ }
+ else if (start == end)
+ {
+ *uchardata++ = XCL_SINGLE;
+ *uchardata++ = start;
+ }
+#endif /* PCRE2_CODE_UNIT_WIDTH == 8 */
+ *uchardptr = uchardata; /* Updata extra data pointer */
+ }
+#else /* SUPPORT_WIDE_CHARS */
+ (void)uchardptr; /* Avoid compiler warning */
+#endif /* SUPPORT_WIDE_CHARS */
+
+return n8; /* Number of 8-bit characters */
+}
+
+
+
+#ifdef SUPPORT_UNICODE
+/*************************************************
+* Add a list of characters to a class (internal) *
+*************************************************/
+
+/* This function is used for adding a list of case-equivalent characters to a
+class when in UTF mode. This function is called only from within
+add_to_class_internal(), with which it is mutually recursive.
+
+Arguments:
+ classbits the bit map for characters < 256
+ uchardptr points to the pointer for extra data
+ options the options word
+ cb contains pointers to tables etc.
+ p points to row of 32-bit values, terminated by NOTACHAR
+ except character to omit; this is used when adding lists of
+ case-equivalent characters to avoid including the one we
+ already know about
+
+Returns: the number of < 256 characters added
+ the pointer to extra data is updated
+*/
+
+static unsigned int
+add_list_to_class_internal(uint8_t *classbits, PCRE2_UCHAR **uchardptr,
+ uint32_t options, compile_block *cb, const uint32_t *p, unsigned int except)
+{
+unsigned int n8 = 0;
+while (p[0] < NOTACHAR)
+ {
+ unsigned int n = 0;
+ if (p[0] != except)
+ {
+ while(p[n+1] == p[0] + n + 1) n++;
+ n8 += add_to_class_internal(classbits, uchardptr, options, cb, p[0], p[n]);
+ }
+ p += n + 1;
+ }
+return n8;
+}
+#endif
+
+
+
+/*************************************************
+* External entry point for add range to class *
+*************************************************/
+
+/* This function sets the overall range so that the internal functions can try
+to avoid duplication when handling case-independence.
+
+Arguments:
+ classbits the bit map for characters < 256
+ uchardptr points to the pointer for extra data
+ options the options word
+ cb compile data
+ start start of range character
+ end end of range character
+
+Returns: the number of < 256 characters added
+ the pointer to extra data is updated
+*/
+
+static unsigned int
+add_to_class(uint8_t *classbits, PCRE2_UCHAR **uchardptr, uint32_t options,
+ compile_block *cb, uint32_t start, uint32_t end)
+{
+cb->class_range_start = start;
+cb->class_range_end = end;
+return add_to_class_internal(classbits, uchardptr, options, cb, start, end);
+}
+
+
+/*************************************************
+* External entry point for add list to class *
+*************************************************/
+
+/* This function is used for adding a list of horizontal or vertical whitespace
+characters to a class. The list must be in order so that ranges of characters
+can be detected and handled appropriately. This function sets the overall range
+so that the internal functions can try to avoid duplication when handling
+case-independence.
+
+Arguments:
+ classbits the bit map for characters < 256
+ uchardptr points to the pointer for extra data
+ options the options word
+ cb contains pointers to tables etc.
+ p points to row of 32-bit values, terminated by NOTACHAR
+ except character to omit; this is used when adding lists of
+ case-equivalent characters to avoid including the one we
+ already know about
+
+Returns: the number of < 256 characters added
+ the pointer to extra data is updated
+*/
+
+static unsigned int
+add_list_to_class(uint8_t *classbits, PCRE2_UCHAR **uchardptr, uint32_t options,
+ compile_block *cb, const uint32_t *p, unsigned int except)
+{
+unsigned int n8 = 0;
+while (p[0] < NOTACHAR)
+ {
+ unsigned int n = 0;
+ if (p[0] != except)
+ {
+ while(p[n+1] == p[0] + n + 1) n++;
+ cb->class_range_start = p[0];
+ cb->class_range_end = p[n];
+ n8 += add_to_class_internal(classbits, uchardptr, options, cb, p[0], p[n]);
+ }
+ p += n + 1;
+ }
+return n8;
+}
+
+
+
+/*************************************************
+* Add characters not in a list to a class *
+*************************************************/
+
+/* This function is used for adding the complement of a list of horizontal or
+vertical whitespace to a class. The list must be in order.
+
+Arguments:
+ classbits the bit map for characters < 256
+ uchardptr points to the pointer for extra data
+ options the options word
+ cb contains pointers to tables etc.
+ p points to row of 32-bit values, terminated by NOTACHAR
+
+Returns: the number of < 256 characters added
+ the pointer to extra data is updated
+*/
+
+static unsigned int
+add_not_list_to_class(uint8_t *classbits, PCRE2_UCHAR **uchardptr,
+ uint32_t options, compile_block *cb, const uint32_t *p)
+{
+BOOL utf = (options & PCRE2_UTF) != 0;
+unsigned int n8 = 0;
+if (p[0] > 0)
+ n8 += add_to_class(classbits, uchardptr, options, cb, 0, p[0] - 1);
+while (p[0] < NOTACHAR)
+ {
+ while (p[1] == p[0] + 1) p++;
+ n8 += add_to_class(classbits, uchardptr, options, cb, p[0] + 1,
+ (p[1] == NOTACHAR) ? (utf ? 0x10ffffu : 0xffffffffu) : p[1] - 1);
+ p++;
+ }
+return n8;
+}
+
+
+
+/*************************************************
+* Find details of duplicate group names *
+*************************************************/
+
+/* This is called from compile_branch() when it needs to know the index and
+count of duplicates in the names table when processing named backreferences,
+either directly, or as conditions.
+
+Arguments:
+ name points to the name
+ length the length of the name
+ indexptr where to put the index
+ countptr where to put the count of duplicates
+ errorcodeptr where to put an error code
+ cb the compile block
+
+Returns: TRUE if OK, FALSE if not, error code set
+*/
+
+static BOOL
+find_dupname_details(PCRE2_SPTR name, uint32_t length, int *indexptr,
+ int *countptr, int *errorcodeptr, compile_block *cb)
+{
+uint32_t i, groupnumber;
+int count;
+PCRE2_UCHAR *slot = cb->name_table;
+
+/* Find the first entry in the table */
+
+for (i = 0; i < cb->names_found; i++)
+ {
+ if (PRIV(strncmp)(name, slot+IMM2_SIZE, length) == 0 &&
+ slot[IMM2_SIZE+length] == 0) break;
+ slot += cb->name_entry_size;
+ }
+
+/* This should not occur, because this function is called only when we know we
+have duplicate names. Give an internal error. */
+
+if (i >= cb->names_found)
+ {
+ *errorcodeptr = ERR53;
+ cb->erroroffset = name - cb->start_pattern;
+ return FALSE;
+ }
+
+/* Record the index and then see how many duplicates there are, updating the
+backref map and maximum back reference as we do. */
+
+*indexptr = i;
+count = 0;
+
+for (;;)
+ {
+ count++;
+ groupnumber = GET2(slot,0);
+ cb->backref_map |= (groupnumber < 32)? (1u << groupnumber) : 1;
+ if (groupnumber > cb->top_backref) cb->top_backref = groupnumber;
+ if (++i >= cb->names_found) break;
+ slot += cb->name_entry_size;
+ if (PRIV(strncmp)(name, slot+IMM2_SIZE, length) != 0 ||
+ (slot+IMM2_SIZE)[length] != 0) break;
+ }
+
+*countptr = count;
+return TRUE;
+}
+
+
+
+/*************************************************
+* Compile one branch *
+*************************************************/
+
+/* Scan the parsed pattern, compiling it into the a vector of PCRE2_UCHAR. If
+the options are changed during the branch, the pointer is used to change the
+external options bits. This function is used during the pre-compile phase when
+we are trying to find out the amount of memory needed, as well as during the
+real compile phase. The value of lengthptr distinguishes the two phases.
+
+Arguments:
+ optionsptr pointer to the option bits
+ codeptr points to the pointer to the current code point
+ pptrptr points to the current parsed pattern pointer
+ errorcodeptr points to error code variable
+ firstcuptr place to put the first required code unit
+ firstcuflagsptr place to put the first code unit flags, or a negative number
+ reqcuptr place to put the last required code unit
+ reqcuflagsptr place to put the last required code unit flags, or a negative number
+ bcptr points to current branch chain
+ cb contains pointers to tables etc.
+ lengthptr NULL during the real compile phase
+ points to length accumulator during pre-compile phase
+
+Returns: 0 There's been an error, *errorcodeptr is non-zero
+ +1 Success, this branch must match at least one character
+ -1 Success, this branch may match an empty string
+*/
+
+static int
+compile_branch(uint32_t *optionsptr, PCRE2_UCHAR **codeptr, uint32_t **pptrptr,
+ int *errorcodeptr, uint32_t *firstcuptr, int32_t *firstcuflagsptr,
+ uint32_t *reqcuptr, int32_t *reqcuflagsptr, branch_chain *bcptr,
+ compile_block *cb, PCRE2_SIZE *lengthptr)
+{
+int bravalue = 0;
+int okreturn = -1;
+int group_return = 0;
+uint32_t repeat_min = 0, repeat_max = 0; /* To please picky compilers */
+uint32_t greedy_default, greedy_non_default;
+uint32_t repeat_type, op_type;
+uint32_t options = *optionsptr; /* May change dynamically */
+uint32_t firstcu, reqcu;
+uint32_t zeroreqcu, zerofirstcu;
+uint32_t escape;
+uint32_t *pptr = *pptrptr;
+uint32_t meta, meta_arg;
+int32_t firstcuflags, reqcuflags;
+int32_t zeroreqcuflags, zerofirstcuflags;
+int32_t req_caseopt, reqvary, tempreqvary;
+PCRE2_SIZE offset = 0;
+PCRE2_SIZE length_prevgroup = 0;
+PCRE2_UCHAR *code = *codeptr;
+PCRE2_UCHAR *last_code = code;
+PCRE2_UCHAR *orig_code = code;
+PCRE2_UCHAR *tempcode;
+PCRE2_UCHAR *previous = NULL;
+PCRE2_UCHAR op_previous;
+BOOL groupsetfirstcu = FALSE;
+BOOL matched_char = FALSE;
+BOOL previous_matched_char = FALSE;
+const uint8_t *cbits = cb->cbits;
+uint8_t classbits[32];
+
+/* We can fish out the UTF setting once and for all into a BOOL, but we must
+not do this for other options (e.g. PCRE2_EXTENDED) because they may change
+dynamically as we process the pattern. */
+
+#ifdef SUPPORT_UNICODE
+BOOL utf = (options & PCRE2_UTF) != 0;
+#else /* No UTF support */
+BOOL utf = FALSE;
+#endif
+
+/* Helper variables for OP_XCLASS opcode (for characters > 255). We define
+class_uchardata always so that it can be passed to add_to_class() always,
+though it will not be used in non-UTF 8-bit cases. This avoids having to supply
+alternative calls for the different cases. */
+
+PCRE2_UCHAR *class_uchardata;
+#ifdef SUPPORT_WIDE_CHARS
+BOOL xclass;
+PCRE2_UCHAR *class_uchardata_base;
+#endif
+
+/* Set up the default and non-default settings for greediness */
+
+greedy_default = ((options & PCRE2_UNGREEDY) != 0);
+greedy_non_default = greedy_default ^ 1;
+
+/* Initialize no first unit, no required unit. REQ_UNSET means "no char
+matching encountered yet". It gets changed to REQ_NONE if we hit something that
+matches a non-fixed first unit; reqcu just remains unset if we never find one.
+
+When we hit a repeat whose minimum is zero, we may have to adjust these values
+to take the zero repeat into account. This is implemented by setting them to
+zerofirstcu and zeroreqcu when such a repeat is encountered. The individual
+item types that can be repeated set these backoff variables appropriately. */
+
+firstcu = reqcu = zerofirstcu = zeroreqcu = 0;
+firstcuflags = reqcuflags = zerofirstcuflags = zeroreqcuflags = REQ_UNSET;
+
+/* The variable req_caseopt contains either the REQ_CASELESS value or zero,
+according to the current setting of the caseless flag. The REQ_CASELESS value
+leaves the lower 28 bit empty. It is added into the firstcu or reqcu variables
+to record the case status of the value. This is used only for ASCII characters.
+*/
+
+req_caseopt = ((options & PCRE2_CASELESS) != 0)? REQ_CASELESS:0;
+
+/* Switch on next META item until the end of the branch */
+
+for (;; pptr++)
+ {
+#ifdef SUPPORT_WIDE_CHARS
+ BOOL xclass_has_prop;
+#endif
+ BOOL negate_class;
+ BOOL should_flip_negation;
+ BOOL match_all_or_no_wide_chars;
+ BOOL possessive_quantifier;
+ BOOL note_group_empty;
+ int class_has_8bitchar;
+ int i;
+ uint32_t mclength;
+ uint32_t templastcapture;
+ uint32_t skipunits;
+ uint32_t subreqcu, subfirstcu;
+ uint32_t groupnumber;
+ uint32_t verbarglen, verbculen;
+ int32_t subreqcuflags, subfirstcuflags; /* Must be signed */
+ open_capitem *oc;
+ PCRE2_UCHAR mcbuffer[8];
+
+ /* Get next META item in the pattern and its potential argument. */
+
+ meta = META_CODE(*pptr);
+ meta_arg = META_DATA(*pptr);
+
+ /* If we are in the pre-compile phase, accumulate the length used for the
+ previous cycle of this loop, unless the next item is a quantifier. */
+
+ if (lengthptr != NULL)
+ {
+ if (code > cb->start_workspace + cb->workspace_size -
+ WORK_SIZE_SAFETY_MARGIN) /* Check for overrun */
+ {
+ *errorcodeptr = (code >= cb->start_workspace + cb->workspace_size)?
+ ERR52 : ERR86;
+ return 0;
+ }
+
+ /* There is at least one situation where code goes backwards: this is the
+ case of a zero quantifier after a class (e.g. [ab]{0}). When the quantifier
+ is processed, the whole class is eliminated. However, it is created first,
+ so we have to allow memory for it. Therefore, don't ever reduce the length
+ at this point. */
+
+ if (code < last_code) code = last_code;
+
+ /* If the next thing is not a quantifier, we add the length of the previous
+ item into the total, and reset the code pointer to the start of the
+ workspace. Otherwise leave the previous item available to be quantified. */
+
+ if (meta < META_ASTERISK || meta > META_MINMAX_QUERY)
+ {
+ if (OFLOW_MAX - *lengthptr < (PCRE2_SIZE)(code - orig_code))
+ {
+ *errorcodeptr = ERR20; /* Integer overflow */
+ return 0;
+ }
+ *lengthptr += (PCRE2_SIZE)(code - orig_code);
+ if (*lengthptr > MAX_PATTERN_SIZE)
+ {
+ *errorcodeptr = ERR20; /* Pattern is too large */
+ return 0;
+ }
+ code = orig_code;
+ }
+
+ /* Remember where this code item starts so we can catch the "backwards"
+ case above next time round. */
+
+ last_code = code;
+ }
+
+ /* Process the next parsed pattern item. If it is not a quantifier, remember
+ where it starts so that it can be quantified when a quantifier follows.
+ Checking for the legality of quantifiers happens in parse_regex(), except for
+ a quantifier after an assertion that is a condition. */
+
+ if (meta < META_ASTERISK || meta > META_MINMAX_QUERY)
+ {
+ previous = code;
+ if (matched_char) okreturn = 1;
+ }
+
+ previous_matched_char = matched_char;
+ matched_char = FALSE;
+ note_group_empty = FALSE;
+ skipunits = 0; /* Default value for most subgroups */
+
+ switch(meta)
+ {
+ /* ===================================================================*/
+ /* The branch terminates at pattern end or | or ) */
+
+ case META_END:
+ case META_ALT:
+ case META_KET:
+ *firstcuptr = firstcu;
+ *firstcuflagsptr = firstcuflags;
+ *reqcuptr = reqcu;
+ *reqcuflagsptr = reqcuflags;
+ *codeptr = code;
+ *pptrptr = pptr;
+ return okreturn;
+
+
+ /* ===================================================================*/
+ /* Handle single-character metacharacters. In multiline mode, ^ disables
+ the setting of any following char as a first character. */
+
+ case META_CIRCUMFLEX:
+ if ((options & PCRE2_MULTILINE) != 0)
+ {
+ if (firstcuflags == REQ_UNSET)
+ zerofirstcuflags = firstcuflags = REQ_NONE;
+ *code++ = OP_CIRCM;
+ }
+ else *code++ = OP_CIRC;
+ break;
+
+ case META_DOLLAR:
+ *code++ = ((options & PCRE2_MULTILINE) != 0)? OP_DOLLM : OP_DOLL;
+ break;
+
+ /* There can never be a first char if '.' is first, whatever happens about
+ repeats. The value of reqcu doesn't change either. */
+
+ case META_DOT:
+ matched_char = TRUE;
+ if (firstcuflags == REQ_UNSET) firstcuflags = REQ_NONE;
+ zerofirstcu = firstcu;
+ zerofirstcuflags = firstcuflags;
+ zeroreqcu = reqcu;
+ zeroreqcuflags = reqcuflags;
+ *code++ = ((options & PCRE2_DOTALL) != 0)? OP_ALLANY: OP_ANY;
+ break;
+
+
+ /* ===================================================================*/
+ /* Empty character classes are allowed if PCRE2_ALLOW_EMPTY_CLASS is set.
+ Otherwise, an initial ']' is taken as a data character. When empty classes
+ are allowed, [] must always fail, so generate OP_FAIL, whereas [^] must
+ match any character, so generate OP_ALLANY. */
+
+ case META_CLASS_EMPTY:
+ case META_CLASS_EMPTY_NOT:
+ matched_char = TRUE;
+ *code++ = (meta == META_CLASS_EMPTY_NOT)? OP_ALLANY : OP_FAIL;
+ if (firstcuflags == REQ_UNSET) firstcuflags = REQ_NONE;
+ zerofirstcu = firstcu;
+ zerofirstcuflags = firstcuflags;
+ break;
+
+
+ /* ===================================================================*/
+ /* Non-empty character class. If the included characters are all < 256, we
+ build a 32-byte bitmap of the permitted characters, except in the special
+ case where there is only one such character. For negated classes, we build
+ the map as usual, then invert it at the end. However, we use a different
+ opcode so that data characters > 255 can be handled correctly.
+
+ If the class contains characters outside the 0-255 range, a different
+ opcode is compiled. It may optionally have a bit map for characters < 256,
+ but those above are are explicitly listed afterwards. A flag code unit
+ tells whether the bitmap is present, and whether this is a negated class or
+ not. */
+
+ case META_CLASS_NOT:
+ case META_CLASS:
+ matched_char = TRUE;
+ negate_class = meta == META_CLASS_NOT;
+
+ /* We can optimize the case of a single character in a class by generating
+ OP_CHAR or OP_CHARI if it's positive, or OP_NOT or OP_NOTI if it's
+ negative. In the negative case there can be no first char if this item is
+ first, whatever repeat count may follow. In the case of reqcu, save the
+ previous value for reinstating. */
+
+ /* NOTE: at present this optimization is not effective if the only
+ character in a class in 32-bit, non-UCP mode has its top bit set. */
+
+ if (pptr[1] < META_END && pptr[2] == META_CLASS_END)
+ {
+#ifdef SUPPORT_UNICODE
+ uint32_t d;
+#endif
+ uint32_t c = pptr[1];
+
+ pptr += 2; /* Move on to class end */
+ if (meta == META_CLASS) /* A positive one-char class can be */
+ { /* handled as a normal literal character. */
+ meta = c; /* Set up the character */
+ goto NORMAL_CHAR_SET;
+ }
+
+ /* Handle a negative one-character class */
+
+ zeroreqcu = reqcu;
+ zeroreqcuflags = reqcuflags;
+ if (firstcuflags == REQ_UNSET) firstcuflags = REQ_NONE;
+ zerofirstcu = firstcu;
+ zerofirstcuflags = firstcuflags;
+
+ /* For caseless UTF mode, check whether this character has more than
+ one other case. If so, generate a special OP_NOTPROP item instead of
+ OP_NOTI. */
+
+#ifdef SUPPORT_UNICODE
+ if (utf && (options & PCRE2_CASELESS) != 0 &&
+ (d = UCD_CASESET(c)) != 0)
+ {
+ *code++ = OP_NOTPROP;
+ *code++ = PT_CLIST;
+ *code++ = d;
+ break; /* We are finished with this class */
+ }
+#endif
+ /* Char has only one other case, or UCP not available */
+
+ *code++ = ((options & PCRE2_CASELESS) != 0)? OP_NOTI: OP_NOT;
+ code += PUTCHAR(c, code);
+ break; /* We are finished with this class */
+ } /* End of 1-char optimization */
+
+ /* Handle character classes that contain more than just one literal
+ character. */
+
+ /* If a non-extended class contains a negative special such as \S, we need
+ to flip the negation flag at the end, so that support for characters > 255
+ works correctly (they are all included in the class). An extended class may
+ need to insert specific matching or non-matching code for wide characters.
+ */
+
+ should_flip_negation = match_all_or_no_wide_chars = FALSE;
+
+ /* Extended class (xclass) will be used when characters > 255
+ might match. */
+
+#ifdef SUPPORT_WIDE_CHARS
+ xclass = FALSE;
+ class_uchardata = code + LINK_SIZE + 2; /* For XCLASS items */
+ class_uchardata_base = class_uchardata; /* Save the start */
+#endif
+
+ /* For optimization purposes, we track some properties of the class:
+ class_has_8bitchar will be non-zero if the class contains at least one
+ character with a code point less than 256; xclass_has_prop will be TRUE if
+ Unicode property checks are present in the class. */
+
+ class_has_8bitchar = 0;
+#ifdef SUPPORT_WIDE_CHARS
+ xclass_has_prop = FALSE;
+#endif
+
+ /* Initialize the 256-bit (32-byte) bit map to all zeros. We build the map
+ in a temporary bit of memory, in case the class contains fewer than two
+ 8-bit characters because in that case the compiled code doesn't use the bit
+ map. */
+
+ memset(classbits, 0, 32 * sizeof(uint8_t));
+
+ /* Process items until META_CLASS_END is reached. */
+
+ while ((meta = *(++pptr)) != META_CLASS_END)
+ {
+ /* Handle POSIX classes such as [:alpha:] etc. */
+
+ if (meta == META_POSIX || meta == META_POSIX_NEG)
+ {
+ BOOL local_negate = (meta == META_POSIX_NEG);
+ int posix_class = *(++pptr);
+ int taboffset, tabopt;
+ uint8_t pbits[32];
+
+ should_flip_negation = local_negate; /* Note negative special */
+
+ /* If matching is caseless, upper and lower are converted to alpha.
+ This relies on the fact that the class table starts with alpha,
+ lower, upper as the first 3 entries. */
+
+ if ((options & PCRE2_CASELESS) != 0 && posix_class <= 2)
+ posix_class = 0;
+
+ /* When PCRE2_UCP is set, some of the POSIX classes are converted to
+ different escape sequences that use Unicode properties \p or \P.
+ Others that are not available via \p or \P have to generate
+ XCL_PROP/XCL_NOTPROP directly, which is done here. */
+
+#ifdef SUPPORT_UNICODE
+ if ((options & PCRE2_UCP) != 0) switch(posix_class)
+ {
+ case PC_GRAPH:
+ case PC_PRINT:
+ case PC_PUNCT:
+ *class_uchardata++ = local_negate? XCL_NOTPROP : XCL_PROP;
+ *class_uchardata++ = (PCRE2_UCHAR)
+ ((posix_class == PC_GRAPH)? PT_PXGRAPH :
+ (posix_class == PC_PRINT)? PT_PXPRINT : PT_PXPUNCT);
+ *class_uchardata++ = 0;
+ xclass_has_prop = TRUE;
+ goto CONTINUE_CLASS;
+
+ /* For the other POSIX classes (ascii, xdigit) we are going to
+ fall through to the non-UCP case and build a bit map for
+ characters with code points less than 256. However, if we are in
+ a negated POSIX class, characters with code points greater than
+ 255 must either all match or all not match, depending on whether
+ the whole class is not or is negated. For example, for
+ [[:^ascii:]... they must all match, whereas for [^[:^xdigit:]...
+ they must not.
+
+ In the special case where there are no xclass items, this is
+ automatically handled by the use of OP_CLASS or OP_NCLASS, but an
+ explicit range is needed for OP_XCLASS. Setting a flag here
+ causes the range to be generated later when it is known that
+ OP_XCLASS is required. In the 8-bit library this is relevant only in
+ utf mode, since no wide characters can exist otherwise. */
+
+ default:
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ if (utf)
+#endif
+ match_all_or_no_wide_chars |= local_negate;
+ break;
+ }
+#endif /* SUPPORT_UNICODE */
+
+ /* In the non-UCP case, or when UCP makes no difference, we build the
+ bit map for the POSIX class in a chunk of local store because we may
+ be adding and subtracting from it, and we don't want to subtract bits
+ that may be in the main map already. At the end we or the result into
+ the bit map that is being built. */
+
+ posix_class *= 3;
+
+ /* Copy in the first table (always present) */
+
+ memcpy(pbits, cbits + posix_class_maps[posix_class],
+ 32 * sizeof(uint8_t));
+
+ /* If there is a second table, add or remove it as required. */
+
+ taboffset = posix_class_maps[posix_class + 1];
+ tabopt = posix_class_maps[posix_class + 2];
+
+ if (taboffset >= 0)
+ {
+ if (tabopt >= 0)
+ for (i = 0; i < 32; i++) pbits[i] |= cbits[(int)i + taboffset];
+ else
+ for (i = 0; i < 32; i++) pbits[i] &= ~cbits[(int)i + taboffset];
+ }
+
+ /* Now see if we need to remove any special characters. An option
+ value of 1 removes vertical space and 2 removes underscore. */
+
+ if (tabopt < 0) tabopt = -tabopt;
+ if (tabopt == 1) pbits[1] &= ~0x3c;
+ else if (tabopt == 2) pbits[11] &= 0x7f;
+
+ /* Add the POSIX table or its complement into the main table that is
+ being built and we are done. */
+
+ if (local_negate)
+ for (i = 0; i < 32; i++) classbits[i] |= ~pbits[i];
+ else
+ for (i = 0; i < 32; i++) classbits[i] |= pbits[i];
+
+ /* Every class contains at least one < 256 character. */
+
+ class_has_8bitchar = 1;
+ goto CONTINUE_CLASS; /* End of POSIX handling */
+ }
+
+ /* Other than POSIX classes, the only items we should encounter are
+ \d-type escapes and literal characters (possibly as ranges). */
+
+ if (meta == META_BIGVALUE)
+ {
+ meta = *(++pptr);
+ goto CLASS_LITERAL;
+ }
+
+ /* Any other non-literal must be an escape */
+
+ if (meta >= META_END)
+ {
+ if (META_CODE(meta) != META_ESCAPE)
+ {
+#ifdef DEBUG_SHOW_PARSED
+ fprintf(stderr, "** Unrecognized parsed pattern item 0x%.8x "
+ "in character class\n", meta);
+#endif
+ *errorcodeptr = ERR89; /* Internal error - unrecognized. */
+ return 0;
+ }
+ escape = META_DATA(meta);
+
+ /* Every class contains at least one < 256 character. */
+
+ class_has_8bitchar++;
+
+ switch(escape)
+ {
+ case ESC_d:
+ for (i = 0; i < 32; i++) classbits[i] |= cbits[i+cbit_digit];
+ break;
+
+ case ESC_D:
+ should_flip_negation = TRUE;
+ for (i = 0; i < 32; i++) classbits[i] |= ~cbits[i+cbit_digit];
+ break;
+
+ case ESC_w:
+ for (i = 0; i < 32; i++) classbits[i] |= cbits[i+cbit_word];
+ break;
+
+ case ESC_W:
+ should_flip_negation = TRUE;
+ for (i = 0; i < 32; i++) classbits[i] |= ~cbits[i+cbit_word];
+ break;
+
+ /* Perl 5.004 onwards omitted VT from \s, but restored it at Perl
+ 5.18. Before PCRE 8.34, we had to preserve the VT bit if it was
+ previously set by something earlier in the character class.
+ Luckily, the value of CHAR_VT is 0x0b in both ASCII and EBCDIC, so
+ we could just adjust the appropriate bit. From PCRE 8.34 we no
+ longer treat \s and \S specially. */
+
+ case ESC_s:
+ for (i = 0; i < 32; i++) classbits[i] |= cbits[i+cbit_space];
+ break;
+
+ case ESC_S:
+ should_flip_negation = TRUE;
+ for (i = 0; i < 32; i++) classbits[i] |= ~cbits[i+cbit_space];
+ break;
+
+ /* When adding the horizontal or vertical space lists to a class, or
+ their complements, disable PCRE2_CASELESS, because it justs wastes
+ time, and in the "not-x" UTF cases can create unwanted duplicates in
+ the XCLASS list (provoked by characters that have more than one other
+ case and by both cases being in the same "not-x" sublist). */
+
+ case ESC_h:
+ (void)add_list_to_class(classbits, &class_uchardata,
+ options & ~PCRE2_CASELESS, cb, PRIV(hspace_list), NOTACHAR);
+ break;
+
+ case ESC_H:
+ (void)add_not_list_to_class(classbits, &class_uchardata,
+ options & ~PCRE2_CASELESS, cb, PRIV(hspace_list));
+ break;
+
+ case ESC_v:
+ (void)add_list_to_class(classbits, &class_uchardata,
+ options & ~PCRE2_CASELESS, cb, PRIV(vspace_list), NOTACHAR);
+ break;
+
+ case ESC_V:
+ (void)add_not_list_to_class(classbits, &class_uchardata,
+ options & ~PCRE2_CASELESS, cb, PRIV(vspace_list));
+ break;
+
+ case ESC_p:
+ case ESC_P:
+ {
+ uint32_t ptype = *(++pptr) >> 16;
+ uint32_t pdata = *pptr & 0xffff;
+ *class_uchardata++ = (escape == ESC_p)? XCL_PROP : XCL_NOTPROP;
+ *class_uchardata++ = ptype;
+ *class_uchardata++ = pdata;
+#ifdef SUPPORT_WIDE_CHARS
+ xclass_has_prop = TRUE;
+#endif
+ class_has_8bitchar--; /* Undo! */
+ }
+ break;
+ }
+
+ goto CONTINUE_CLASS;
+ } /* End handling \d-type escapes */
+
+ /* A literal character may be followed by a range meta. At parse time
+ there are checks for out-of-order characters, for ranges where the two
+ characters are equal, and for hyphens that cannot indicate a range. At
+ this point, therefore, no checking is needed. */
+
+ else
+ {
+ uint32_t c, d;
+
+ CLASS_LITERAL:
+ c = d = meta;
+
+ /* Remember if \r or \n were explicitly used */
+
+ if (c == CHAR_CR || c == CHAR_NL) cb->external_flags |= PCRE2_HASCRORLF;
+
+ /* Process a character range */
+
+ if (pptr[1] == META_RANGE_LITERAL || pptr[1] == META_RANGE_ESCAPED)
+ {
+#ifdef EBCDIC
+ BOOL range_is_literal = (pptr[1] == META_RANGE_LITERAL);
+#endif
+ pptr += 2;
+ d = *pptr;
+ if (d == META_BIGVALUE) d = *(++pptr);
+
+ /* Remember an explicit \r or \n, and add the range to the class. */
+
+ if (d == CHAR_CR || d == CHAR_NL) cb->external_flags |= PCRE2_HASCRORLF;
+
+ /* In an EBCDIC environment, Perl treats alphabetic ranges specially
+ because there are holes in the encoding, and simply using the range
+ A-Z (for example) would include the characters in the holes. This
+ applies only to literal ranges; [\xC1-\xE9] is different to [A-Z]. */
+
+#ifdef EBCDIC
+ if (range_is_literal &&
+ (cb->ctypes[c] & ctype_letter) != 0 &&
+ (cb->ctypes[d] & ctype_letter) != 0 &&
+ (d <= CHAR_z) == (d <= CHAR_z))
+ {
+ uint32_t uc = (d <= CHAR_z)? 0 : 64;
+ uint32_t C = d - uc;
+ uint32_t D = d - uc;
+
+ if (C <= CHAR_i)
+ {
+ class_has_8bitchar +=
+ add_to_class(classbits, &class_uchardata, options, cb, C + uc,
+ ((D < CHAR_i)? D : CHAR_i) + uc);
+ C = CHAR_j;
+ }
+
+ if (C <= D && C <= CHAR_r)
+ {
+ class_has_8bitchar +=
+ add_to_class(classbits, &class_uchardata, options, cb, C + uc,
+ ((D < CHAR_r)? D : CHAR_r) + uc);
+ C = CHAR_s;
+ }
+
+ if (C <= D)
+ {
+ class_has_8bitchar +=
+ add_to_class(classbits, &class_uchardata, options, cb, C + uc,
+ D + uc);
+ }
+ }
+ else
+#endif
+ /* Not an EBCDIC special range */
+
+ class_has_8bitchar +=
+ add_to_class(classbits, &class_uchardata, options, cb, c, d);
+ goto CONTINUE_CLASS; /* Go get the next char in the class */
+ } /* End of range handling */
+
+
+ /* Handle a single character. */
+
+ class_has_8bitchar +=
+ add_to_class(classbits, &class_uchardata, options, cb, meta, meta);
+ }
+
+ /* Continue to the next item in the class. */
+
+ CONTINUE_CLASS:
+
+#ifdef SUPPORT_WIDE_CHARS
+ /* If any wide characters or Unicode properties have been encountered,
+ set xclass = TRUE. Then, in the pre-compile phase, accumulate the length
+ of the extra data and reset the pointer. This is so that very large
+ classes that contain a zillion wide characters or Unicode property tests
+ do not overwrite the work space (which is on the stack). */
+
+ if (class_uchardata > class_uchardata_base)
+ {
+ xclass = TRUE;
+ if (lengthptr != NULL)
+ {
+ *lengthptr += class_uchardata - class_uchardata_base;
+ class_uchardata = class_uchardata_base;
+ }
+ }
+#endif
+
+ continue; /* Needed to avoid error when not supporting wide chars */
+ } /* End of main class-processing loop */
+
+ /* If this class is the first thing in the branch, there can be no first
+ char setting, whatever the repeat count. Any reqcu setting must remain
+ unchanged after any kind of repeat. */
+
+ if (firstcuflags == REQ_UNSET) firstcuflags = REQ_NONE;
+ zerofirstcu = firstcu;
+ zerofirstcuflags = firstcuflags;
+ zeroreqcu = reqcu;
+ zeroreqcuflags = reqcuflags;
+
+ /* If there are characters with values > 255, or Unicode property settings
+ (\p or \P), we have to compile an extended class, with its own opcode,
+ unless there were no property settings and there was a negated special such
+ as \S in the class, and PCRE2_UCP is not set, because in that case all
+ characters > 255 are in or not in the class, so any that were explicitly
+ given as well can be ignored.
+
+ In the UCP case, if certain negated POSIX classes ([:^ascii:] or
+ [^:xdigit:]) were present in a class, we either have to match or not match
+ all wide characters (depending on whether the whole class is or is not
+ negated). This requirement is indicated by match_all_or_no_wide_chars being
+ true. We do this by including an explicit range, which works in both cases.
+ This applies only in UTF and 16-bit and 32-bit non-UTF modes, since there
+ cannot be any wide characters in 8-bit non-UTF mode.
+
+ When there *are* properties in a positive UTF-8 or any 16-bit or 32_bit
+ class where \S etc is present without PCRE2_UCP, causing an extended class
+ to be compiled, we make sure that all characters > 255 are included by
+ forcing match_all_or_no_wide_chars to be true.
+
+ If, when generating an xclass, there are no characters < 256, we can omit
+ the bitmap in the actual compiled code. */
+
+#ifdef SUPPORT_WIDE_CHARS /* Defined for 16/32 bits, or 8-bit with Unicode */
+ if (xclass && (
+#ifdef SUPPORT_UNICODE
+ (options & PCRE2_UCP) != 0 ||
+#endif
+ xclass_has_prop || !should_flip_negation))
+ {
+ if (match_all_or_no_wide_chars || (
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ utf &&
+#endif
+ should_flip_negation && !negate_class && (options & PCRE2_UCP) == 0))
+ {
+ *class_uchardata++ = XCL_RANGE;
+ if (utf) /* Will always be utf in the 8-bit library */
+ {
+ class_uchardata += PRIV(ord2utf)(0x100, class_uchardata);
+ class_uchardata += PRIV(ord2utf)(MAX_UTF_CODE_POINT, class_uchardata);
+ }
+ else /* Can only happen for the 16-bit & 32-bit libraries */
+ {
+#if PCRE2_CODE_UNIT_WIDTH == 16
+ *class_uchardata++ = 0x100;
+ *class_uchardata++ = 0xffffu;
+#elif PCRE2_CODE_UNIT_WIDTH == 32
+ *class_uchardata++ = 0x100;
+ *class_uchardata++ = 0xffffffffu;
+#endif
+ }
+ }
+ *class_uchardata++ = XCL_END; /* Marks the end of extra data */
+ *code++ = OP_XCLASS;
+ code += LINK_SIZE;
+ *code = negate_class? XCL_NOT:0;
+ if (xclass_has_prop) *code |= XCL_HASPROP;
+
+ /* If the map is required, move up the extra data to make room for it;
+ otherwise just move the code pointer to the end of the extra data. */
+
+ if (class_has_8bitchar > 0)
+ {
+ *code++ |= XCL_MAP;
+ memmove(code + (32 / sizeof(PCRE2_UCHAR)), code,
+ CU2BYTES(class_uchardata - code));
+ if (negate_class && !xclass_has_prop)
+ for (i = 0; i < 32; i++) classbits[i] = ~classbits[i];
+ memcpy(code, classbits, 32);
+ code = class_uchardata + (32 / sizeof(PCRE2_UCHAR));
+ }
+ else code = class_uchardata;
+
+ /* Now fill in the complete length of the item */
+
+ PUT(previous, 1, (int)(code - previous));
+ break; /* End of class handling */
+ }
+#endif /* SUPPORT_WIDE_CHARS */
+
+ /* If there are no characters > 255, or they are all to be included or
+ excluded, set the opcode to OP_CLASS or OP_NCLASS, depending on whether the
+ whole class was negated and whether there were negative specials such as \S
+ (non-UCP) in the class. Then copy the 32-byte map into the code vector,
+ negating it if necessary. */
+
+ *code++ = (negate_class == should_flip_negation) ? OP_CLASS : OP_NCLASS;
+ if (lengthptr == NULL) /* Save time in the pre-compile phase */
+ {
+ if (negate_class)
+ for (i = 0; i < 32; i++) classbits[i] = ~classbits[i];
+ memcpy(code, classbits, 32);
+ }
+ code += 32 / sizeof(PCRE2_UCHAR);
+ break; /* End of class processing */
+
+
+ /* ===================================================================*/
+ /* Deal with (*VERB)s. */
+
+ /* Check for open captures before ACCEPT and convert it to ASSERT_ACCEPT if
+ in an assertion. In the first pass, just accumulate the length required;
+ otherwise hitting (*ACCEPT) inside many nested parentheses can cause
+ workspace overflow. Do not set firstcu after *ACCEPT. */
+
+ case META_ACCEPT:
+ cb->had_accept = TRUE;
+ for (oc = cb->open_caps; oc != NULL; oc = oc->next)
+ {
+ if (lengthptr != NULL)
+ {
+ *lengthptr += CU2BYTES(1) + IMM2_SIZE;
+ }
+ else
+ {
+ *code++ = OP_CLOSE;
+ PUT2INC(code, 0, oc->number);
+ }
+ }
+ *code++ = (cb->assert_depth > 0)? OP_ASSERT_ACCEPT : OP_ACCEPT;
+ if (firstcuflags == REQ_UNSET) firstcuflags = REQ_NONE;
+ break;
+
+ case META_PRUNE:
+ case META_SKIP:
+ cb->had_pruneorskip = TRUE;
+ /* Fall through */
+ case META_COMMIT:
+ case META_FAIL:
+ *code++ = verbops[(meta - META_MARK) >> 16];
+ break;
+
+ case META_THEN:
+ cb->external_flags |= PCRE2_HASTHEN;
+ *code++ = OP_THEN;
+ break;
+
+ /* Handle verbs with arguments. Arguments can be very long, especially in
+ 16- and 32-bit modes, and can overflow the workspace in the first pass.
+ However, the argument length is constrained to be small enough to fit in
+ one code unit. This check happens in parse_regex(). In the first pass,
+ instead of putting the argument into memory, we just update the length
+ counter and set up an empty argument. */
+
+ case META_THEN_ARG:
+ cb->external_flags |= PCRE2_HASTHEN;
+ goto VERB_ARG;
+
+ case META_PRUNE_ARG:
+ case META_SKIP_ARG:
+ cb->had_pruneorskip = TRUE;
+ /* Fall through */
+ case META_MARK:
+ VERB_ARG:
+ *code++ = verbops[(meta - META_MARK) >> 16];
+ /* The length is in characters. */
+ verbarglen = *(++pptr);
+ verbculen = 0;
+ tempcode = code++;
+ for (i = 0; i < (int)verbarglen; i++)
+ {
+ meta = *(++pptr);
+#ifdef SUPPORT_UNICODE
+ if (utf) mclength = PRIV(ord2utf)(meta, mcbuffer); else
+#endif
+ {
+ mclength = 1;
+ mcbuffer[0] = meta;
+ }
+ if (lengthptr != NULL) *lengthptr += mclength; else
+ {
+ memcpy(code, mcbuffer, CU2BYTES(mclength));
+ code += mclength;
+ verbculen += mclength;
+ }
+ }
+
+ *tempcode = verbculen; /* Fill in the code unit length */
+ *code++ = 0; /* Terminating zero */
+ break;
+
+
+ /* ===================================================================*/
+ /* Handle options change. The new setting must be passed back for use in
+ subsequent branches. Reset the greedy defaults and the case value for
+ firstcu and reqcu. */
+
+ case META_OPTIONS:
+ *optionsptr = options = *(++pptr);
+ greedy_default = ((options & PCRE2_UNGREEDY) != 0);
+ greedy_non_default = greedy_default ^ 1;
+ req_caseopt = ((options & PCRE2_CASELESS) != 0)? REQ_CASELESS : 0;
+ break;
+
+
+ /* ===================================================================*/
+ /* Handle conditional subpatterns. The case of (?(Rdigits) is ambiguous
+ because it could be a numerical check on recursion, or a name check on a
+ group's being set. The pre-pass sets up META_COND_RNUMBER as a name so that
+ we can handle it either way. We first try for a name; if not found, process
+ the number. */
+
+ case META_COND_RNUMBER: /* (?(Rdigits) */
+ case META_COND_NAME: /* (?(name) or (?'name') or ?(<name>) */
+ case META_COND_RNAME: /* (?(R&name) - test for recursion */
+ bravalue = OP_COND;
+ {
+ int count, index;
+ PCRE2_SPTR name;
+ named_group *ng = cb->named_groups;
+ uint32_t length = *(++pptr);
+
+ GETPLUSOFFSET(offset, pptr);
+ name = cb->start_pattern + offset;
+
+ /* In the first pass, the names generated in the pre-pass are available,
+ but the main name table has not yet been created. Scan the list of names
+ generated in the pre-pass in order to get a number and whether or not
+ this name is duplicated. If it is not duplicated, we can handle it as a
+ numerical group. */
+
+ for (i = 0; i < cb->names_found; i++, ng++)
+ {
+ if (length == ng->length &&
+ PRIV(strncmp)(name, ng->name, length) == 0)
+ {
+ if (!ng->isdup)
+ {
+ code[1+LINK_SIZE] = (meta == META_COND_RNAME)? OP_RREF : OP_CREF;
+ PUT2(code, 2+LINK_SIZE, ng->number);
+ if (ng->number > cb->top_backref) cb->top_backref = ng->number;
+ skipunits = 1+IMM2_SIZE;
+ goto GROUP_PROCESS_NOTE_EMPTY;
+ }
+ break; /* Found a duplicated name */
+ }
+ }
+
+ /* If the name was not found we have a bad reference, unless we are
+ dealing with R<digits>, which is treated as a recursion test by number.
+ */
+
+ if (i >= cb->names_found)
+ {
+ groupnumber = 0;
+ if (meta == META_COND_RNUMBER)
+ {
+ for (i = 1; i < (int)length; i++)
+ {
+ groupnumber = groupnumber * 10 + name[i] - CHAR_0;
+ if (groupnumber > MAX_GROUP_NUMBER)
+ {
+ *errorcodeptr = ERR61;
+ cb->erroroffset = offset + i;
+ return 0;
+ }
+ }
+ }
+
+ if (meta != META_COND_RNUMBER || groupnumber > cb->bracount)
+ {
+ *errorcodeptr = ERR15;
+ cb->erroroffset = offset;
+ return 0;
+ }
+
+ /* (?Rdigits) treated as a recursion reference by number. A value of
+ zero (which is the result of both (?R) and (?R0)) means "any", and is
+ translated into RREF_ANY (which is 0xffff). */
+
+ if (groupnumber == 0) groupnumber = RREF_ANY;
+ code[1+LINK_SIZE] = OP_RREF;
+ PUT2(code, 2+LINK_SIZE, groupnumber);
+ skipunits = 1+IMM2_SIZE;
+ goto GROUP_PROCESS_NOTE_EMPTY;
+ }
+
+ /* A duplicated name was found. Note that if an R<digits> name is found
+ (META_COND_RNUMBER), it is a reference test, not a recursion test. */
+
+ code[1+LINK_SIZE] = (meta == META_COND_RNAME)? OP_RREF : OP_CREF;
+
+ /* We have a duplicated name. In the compile pass we have to search the
+ main table in order to get the index and count values. */
+
+ count = 0; /* Values for first pass (avoids compiler warning) */
+ index = 0;
+ if (lengthptr == NULL && !find_dupname_details(name, length, &index,
+ &count, errorcodeptr, cb)) return 0;
+
+ /* Add one to the opcode to change CREF/RREF into DNCREF/DNRREF and
+ insert appropriate data values. */
+
+ code[1+LINK_SIZE]++;
+ skipunits = 1+2*IMM2_SIZE;
+ PUT2(code, 2+LINK_SIZE, index);
+ PUT2(code, 2+LINK_SIZE+IMM2_SIZE, count);
+ }
+ goto GROUP_PROCESS_NOTE_EMPTY;
+
+ /* The DEFINE condition is always false. It's internal groups may never
+ be called, so matched_char must remain false, hence the jump to
+ GROUP_PROCESS rather than GROUP_PROCESS_NOTE_EMPTY. */
+
+ case META_COND_DEFINE:
+ bravalue = OP_COND;
+ GETPLUSOFFSET(offset, pptr);
+ code[1+LINK_SIZE] = OP_DEFINE;
+ skipunits = 1;
+ goto GROUP_PROCESS;
+
+ /* Conditional test of a group's being set. */
+
+ case META_COND_NUMBER:
+ bravalue = OP_COND;
+ GETPLUSOFFSET(offset, pptr);
+ groupnumber = *(++pptr);
+ if (groupnumber > cb->bracount)
+ {
+ *errorcodeptr = ERR15;
+ cb->erroroffset = offset;
+ return 0;
+ }
+ if (groupnumber > cb->top_backref) cb->top_backref = groupnumber;
+ offset -= 2; /* Point at initial ( for too many branches error */
+ code[1+LINK_SIZE] = OP_CREF;
+ skipunits = 1+IMM2_SIZE;
+ PUT2(code, 2+LINK_SIZE, groupnumber);
+ goto GROUP_PROCESS_NOTE_EMPTY;
+
+ /* Test for the PCRE2 version. */
+
+ case META_COND_VERSION:
+ bravalue = OP_COND;
+ if (pptr[1] > 0)
+ code[1+LINK_SIZE] = ((PCRE2_MAJOR > pptr[2]) ||
+ (PCRE2_MAJOR == pptr[2] && PCRE2_MINOR >= pptr[3]))?
+ OP_TRUE : OP_FALSE;
+ else
+ code[1+LINK_SIZE] = (PCRE2_MAJOR == pptr[2] && PCRE2_MINOR == pptr[3])?
+ OP_TRUE : OP_FALSE;
+ skipunits = 1;
+ pptr += 3;
+ goto GROUP_PROCESS_NOTE_EMPTY;
+
+ /* The condition is an assertion, possibly preceded by a callout. */
+
+ case META_COND_ASSERT:
+ bravalue = OP_COND;
+ goto GROUP_PROCESS_NOTE_EMPTY;
+
+
+ /* ===================================================================*/
+ /* Handle all kinds of nested bracketed groups. The non-capturing,
+ non-conditional cases are here; others come to GROUP_PROCESS via goto. */
+
+ case META_LOOKAHEAD:
+ bravalue = OP_ASSERT;
+ cb->assert_depth += 1;
+ goto GROUP_PROCESS;
+
+ /* Optimize (?!) to (*FAIL) unless it is quantified - which is a weird
+ thing to do, but Perl allows all assertions to be quantified, and when
+ they contain capturing parentheses there may be a potential use for
+ this feature. Not that that applies to a quantified (?!) but we allow
+ it for uniformity. */
+
+ case META_LOOKAHEADNOT:
+ if (pptr[1] == META_KET &&
+ (pptr[2] < META_ASTERISK || pptr[2] > META_MINMAX_QUERY))
+ {
+ *code++ = OP_FAIL;
+ pptr++;
+ }
+ else
+ {
+ bravalue = OP_ASSERT_NOT;
+ cb->assert_depth += 1;
+ goto GROUP_PROCESS;
+ }
+ break;
+
+ case META_LOOKBEHIND:
+ bravalue = OP_ASSERTBACK;
+ cb->assert_depth += 1;
+ goto GROUP_PROCESS;
+
+ case META_LOOKBEHINDNOT:
+ bravalue = OP_ASSERTBACK_NOT;
+ cb->assert_depth += 1;
+ goto GROUP_PROCESS;
+
+ case META_ATOMIC:
+ bravalue = OP_ONCE;
+ goto GROUP_PROCESS_NOTE_EMPTY;
+
+ case META_NOCAPTURE:
+ bravalue = OP_BRA;
+ /* Fall through */
+
+ /* Process nested bracketed regex. The nesting depth is maintained for the
+ benefit of the stackguard function. The test for too deep nesting is now
+ done in parse_regex(). Assertion and DEFINE groups come to GROUP_PROCESS;
+ others come to GROUP_PROCESS_NOTE_EMPTY, to indicate that we need to take
+ note of whether or not they may match an empty string. */
+
+ GROUP_PROCESS_NOTE_EMPTY:
+ note_group_empty = TRUE;
+
+ GROUP_PROCESS:
+ cb->parens_depth += 1;
+ *code = bravalue;
+ pptr++;
+ tempcode = code;
+ tempreqvary = cb->req_varyopt; /* Save value before group */
+ templastcapture = cb->lastcapture; /* Save value before group */
+ length_prevgroup = 0; /* Initialize for pre-compile phase */
+
+ if ((group_return =
+ compile_regex(
+ options, /* The option state */
+ &tempcode, /* Where to put code (updated) */
+ &pptr, /* Input pointer (updated) */
+ errorcodeptr, /* Where to put an error message */
+ skipunits, /* Skip over bracket number */
+ &subfirstcu, /* For possible first char */
+ &subfirstcuflags,
+ &subreqcu, /* For possible last char */
+ &subreqcuflags,
+ bcptr, /* Current branch chain */
+ cb, /* Compile data block */
+ (lengthptr == NULL)? NULL : /* Actual compile phase */
+ &length_prevgroup /* Pre-compile phase */
+ )) == 0)
+ return 0; /* Error */
+
+ cb->parens_depth -= 1;
+
+ /* If that was a non-conditional significant group (not an assertion, not a
+ DEFINE) that matches at least one character, then the current item matches
+ a character. Conditionals are handled below. */
+
+ if (note_group_empty && bravalue != OP_COND && group_return > 0)
+ matched_char = TRUE;
+
+ /* If that was an atomic group and there are no capturing groups within it,
+ generate OP_ONCE_NC instead of OP_ONCE. */
+
+ if (bravalue == OP_ONCE && cb->lastcapture <= templastcapture)
+ *code = OP_ONCE_NC;
+
+ /* If we've just compiled an assertion, pop the assert depth. */
+
+ if (bravalue >= OP_ASSERT && bravalue <= OP_ASSERTBACK_NOT)
+ cb->assert_depth -= 1;
+
+ /* At the end of compiling, code is still pointing to the start of the
+ group, while tempcode has been updated to point past the end of the group.
+ The parsed pattern pointer (pptr) is on the closing META_KET.
+
+ If this is a conditional bracket, check that there are no more than
+ two branches in the group, or just one if it's a DEFINE group. We do this
+ in the real compile phase, not in the pre-pass, where the whole group may
+ not be available. */
+
+ if (bravalue == OP_COND && lengthptr == NULL)
+ {
+ PCRE2_UCHAR *tc = code;
+ int condcount = 0;
+
+ do {
+ condcount++;
+ tc += GET(tc,1);
+ }
+ while (*tc != OP_KET);
+
+ /* A DEFINE group is never obeyed inline (the "condition" is always
+ false). It must have only one branch. Having checked this, change the
+ opcode to OP_FALSE. */
+
+ if (code[LINK_SIZE+1] == OP_DEFINE)
+ {
+ if (condcount > 1)
+ {
+ cb->erroroffset = offset;
+ *errorcodeptr = ERR54;
+ return 0;
+ }
+ code[LINK_SIZE+1] = OP_FALSE;
+ bravalue = OP_DEFINE; /* A flag to suppress char handling below */
+ }
+
+ /* A "normal" conditional group. If there is just one branch, we must not
+ make use of its firstcu or reqcu, because this is equivalent to an
+ empty second branch. Also, it may match an empty string. If there are two
+ branches, this item must match a character if the group must. */
+
+ else
+ {
+ if (condcount > 2)
+ {
+ cb->erroroffset = offset;
+ *errorcodeptr = ERR27;
+ return 0;
+ }
+ if (condcount == 1) subfirstcuflags = subreqcuflags = REQ_NONE;
+ else if (group_return > 0) matched_char = TRUE;
+ }
+ }
+
+ /* In the pre-compile phase, update the length by the length of the group,
+ less the brackets at either end. Then reduce the compiled code to just a
+ set of non-capturing brackets so that it doesn't use much memory if it is
+ duplicated by a quantifier.*/
+
+ if (lengthptr != NULL)
+ {
+ if (OFLOW_MAX - *lengthptr < length_prevgroup - 2 - 2*LINK_SIZE)
+ {
+ *errorcodeptr = ERR20;
+ return 0;
+ }
+ *lengthptr += length_prevgroup - 2 - 2*LINK_SIZE;
+ code++; /* This already contains bravalue */
+ PUTINC(code, 0, 1 + LINK_SIZE);
+ *code++ = OP_KET;
+ PUTINC(code, 0, 1 + LINK_SIZE);
+ break; /* No need to waste time with special character handling */
+ }
+
+ /* Otherwise update the main code pointer to the end of the group. */
+
+ code = tempcode;
+
+ /* For a DEFINE group, required and first character settings are not
+ relevant. */
+
+ if (bravalue == OP_DEFINE) break;
+
+ /* Handle updating of the required and first code units for other types of
+ group. Update for normal brackets of all kinds, and conditions with two
+ branches (see code above). If the bracket is followed by a quantifier with
+ zero repeat, we have to back off. Hence the definition of zeroreqcu and
+ zerofirstcu outside the main loop so that they can be accessed for the back
+ off. */
+
+ zeroreqcu = reqcu;
+ zeroreqcuflags = reqcuflags;
+ zerofirstcu = firstcu;
+ zerofirstcuflags = firstcuflags;
+ groupsetfirstcu = FALSE;
+
+ if (bravalue >= OP_ONCE) /* Not an assertion */
+ {
+ /* If we have not yet set a firstcu in this branch, take it from the
+ subpattern, remembering that it was set here so that a repeat of more
+ than one can replicate it as reqcu if necessary. If the subpattern has
+ no firstcu, set "none" for the whole branch. In both cases, a zero
+ repeat forces firstcu to "none". */
+
+ if (firstcuflags == REQ_UNSET && subfirstcuflags != REQ_UNSET)
+ {
+ if (subfirstcuflags >= 0)
+ {
+ firstcu = subfirstcu;
+ firstcuflags = subfirstcuflags;
+ groupsetfirstcu = TRUE;
+ }
+ else firstcuflags = REQ_NONE;
+ zerofirstcuflags = REQ_NONE;
+ }
+
+ /* If firstcu was previously set, convert the subpattern's firstcu
+ into reqcu if there wasn't one, using the vary flag that was in
+ existence beforehand. */
+
+ else if (subfirstcuflags >= 0 && subreqcuflags < 0)
+ {
+ subreqcu = subfirstcu;
+ subreqcuflags = subfirstcuflags | tempreqvary;
+ }
+
+ /* If the subpattern set a required code unit (or set a first code unit
+ that isn't really the first code unit - see above), set it. */
+
+ if (subreqcuflags >= 0)
+ {
+ reqcu = subreqcu;
+ reqcuflags = subreqcuflags;
+ }
+ }
+
+ /* For a forward assertion, we take the reqcu, if set, provided that the
+ group has also set a firstcu. This can be helpful if the pattern that
+ follows the assertion doesn't set a different char. For example, it's
+ useful for /(?=abcde).+/. We can't set firstcu for an assertion, however
+ because it leads to incorrect effect for patterns such as /(?=a)a.+/ when
+ the "real" "a" would then become a reqcu instead of a firstcu. This is
+ overcome by a scan at the end if there's no firstcu, looking for an
+ asserted first char. A similar effect for patterns like /(?=.*X)X$/ means
+ we must only take the reqcu when the group also set a firstcu. Otherwise,
+ in that example, 'X' ends up set for both. */
+
+ else if (bravalue == OP_ASSERT && subreqcuflags >= 0 &&
+ subfirstcuflags >= 0)
+ {
+ reqcu = subreqcu;
+ reqcuflags = subreqcuflags;
+ }
+
+ break; /* End of nested group handling */
+
+
+ /* ===================================================================*/
+ /* Handle named backreferences and recursions. */
+
+ case META_BACKREF_BYNAME:
+ case META_RECURSE_BYNAME:
+ {
+ int count, index;
+ PCRE2_SPTR name;
+ BOOL is_dupname = FALSE;
+ named_group *ng = cb->named_groups;
+ uint32_t length = *(++pptr);
+
+ GETPLUSOFFSET(offset, pptr);
+ name = cb->start_pattern + offset;
+
+ /* In the first pass, the names generated in the pre-pass are available,
+ but the main name table has not yet been created. Scan the list of names
+ generated in the pre-pass in order to get a number and whether or not
+ this name is duplicated. */
+
+ groupnumber = 0;
+ for (i = 0; i < cb->names_found; i++, ng++)
+ {
+ if (length == ng->length &&
+ PRIV(strncmp)(name, ng->name, length) == 0)
+ {
+ is_dupname = ng->isdup;
+ groupnumber = ng->number;
+
+ /* For a recursion, that's all that is needed. We can now go to
+ the code above that handles numerical recursion, applying it to
+ the first group with the given name. */
+
+ if (meta == META_RECURSE_BYNAME)
+ {
+ meta_arg = groupnumber;
+ goto HANDLE_NUMERICAL_RECURSION;
+ }
+
+ /* For a back reference, update the back reference map and the
+ maximum back reference. Then, for each group, we must check to
+ see if it is recursive, that is, it is inside the group that it
+ references. A flag is set so that the group can be made atomic.
+ */
+
+ cb->backref_map |= (groupnumber < 32)? (1u << groupnumber) : 1;
+ if (groupnumber > cb->top_backref)
+ cb->top_backref = groupnumber;
+
+ for (oc = cb->open_caps; oc != NULL; oc = oc->next)
+ {
+ if (oc->number == groupnumber)
+ {
+ oc->flag = TRUE;
+ break;
+ }
+ }
+ }
+ }
+
+ /* If the name was not found we have a bad reference. */
+
+ if (groupnumber == 0)
+ {
+ *errorcodeptr = ERR15;
+ cb->erroroffset = offset;
+ return 0;
+ }
+
+ /* If a back reference name is not duplicated, we can handle it as
+ a numerical reference. */
+
+ if (!is_dupname)
+ {
+ meta_arg = groupnumber;
+ goto HANDLE_SINGLE_REFERENCE;
+ }
+
+ /* If a back reference name is duplicated, we generate a different
+ opcode to a numerical back reference. In the second pass we must
+ search for the index and count in the final name table. */
+
+ count = 0; /* Values for first pass (avoids compiler warning) */
+ index = 0;
+ if (lengthptr == NULL && !find_dupname_details(name, length, &index,
+ &count, errorcodeptr, cb)) return 0;
+
+ if (firstcuflags == REQ_UNSET) firstcuflags = REQ_NONE;
+ *code++ = ((options & PCRE2_CASELESS) != 0)? OP_DNREFI : OP_DNREF;
+ PUT2INC(code, 0, index);
+ PUT2INC(code, 0, count);
+ }
+ break;
+
+
+ /* ===================================================================*/
+ /* Handle a numerical callout. */
+
+ case META_CALLOUT_NUMBER:
+ code[0] = OP_CALLOUT;
+ PUT(code, 1, pptr[1]); /* Offset to next pattern item */
+ PUT(code, 1 + LINK_SIZE, pptr[2]); /* Length of next pattern item */
+ code[1 + 2*LINK_SIZE] = pptr[3];
+ pptr += 3;
+ code += PRIV(OP_lengths)[OP_CALLOUT];
+ break;
+
+
+ /* ===================================================================*/
+ /* Handle a callout with a string argument. In the pre-pass we just compute
+ the length without generating anything. The length in pptr[3] includes both
+ delimiters; in the actual compile only the first one is copied, but a
+ terminating zero is added. Any doubled delimiters within the string make
+ this an overestimate, but it is not worth bothering about. */
+
+ case META_CALLOUT_STRING:
+ if (lengthptr != NULL)
+ {
+ *lengthptr += pptr[3] + (1 + 4*LINK_SIZE);
+ pptr += 3;
+ SKIPOFFSET(pptr);
+ }
+
+ /* In the real compile we can copy the string. The starting delimiter is
+ included so that the client can discover it if they want. We also pass the
+ start offset to help a script language give better error messages. */
+
+ else
+ {
+ PCRE2_SPTR pp;
+ uint32_t delimiter;
+ uint32_t length = pptr[3];
+ PCRE2_UCHAR *callout_string = code + (1 + 4*LINK_SIZE);
+
+ code[0] = OP_CALLOUT_STR;
+ PUT(code, 1, pptr[1]); /* Offset to next pattern item */
+ PUT(code, 1 + LINK_SIZE, pptr[2]); /* Length of next pattern item */
+
+ pptr += 3;
+ GETPLUSOFFSET(offset, pptr); /* Offset to string in pattern */
+ pp = cb->start_pattern + offset;
+ delimiter = *callout_string++ = *pp++;
+ if (delimiter == CHAR_LEFT_CURLY_BRACKET)
+ delimiter = CHAR_RIGHT_CURLY_BRACKET;
+ PUT(code, 1 + 3*LINK_SIZE, (int)(offset + 1)); /* One after delimiter */
+
+ /* The syntax of the pattern was checked in the parsing scan. The length
+ includes both delimiters, but we have passed the opening one just above,
+ so we reduce length before testing it. The test is for > 1 because we do
+ not want to copy the final delimiter. This also ensures that pp[1] is
+ accessible. */
+
+ while (--length > 1)
+ {
+ if (*pp == delimiter && pp[1] == delimiter)
+ {
+ *callout_string++ = delimiter;
+ pp += 2;
+ length--;
+ }
+ else *callout_string++ = *pp++;
+ }
+ *callout_string++ = CHAR_NULL;
+
+ /* Set the length of the entire item, the advance to its end. */
+
+ PUT(code, 1 + 2*LINK_SIZE, (int)(callout_string - code));
+ code = callout_string;
+ }
+ break;
+
+
+ /* ===================================================================*/
+ /* Handle repetition. The different types are all sorted out in the parsing
+ pass. */
+
+ case META_MINMAX_PLUS:
+ case META_MINMAX_QUERY:
+ case META_MINMAX:
+ repeat_min = *(++pptr);
+ repeat_max = *(++pptr);
+ goto REPEAT;
+
+ case META_ASTERISK:
+ case META_ASTERISK_PLUS:
+ case META_ASTERISK_QUERY:
+ repeat_min = 0;
+ repeat_max = REPEAT_UNLIMITED;
+ goto REPEAT;
+
+ case META_PLUS:
+ case META_PLUS_PLUS:
+ case META_PLUS_QUERY:
+ repeat_min = 1;
+ repeat_max = REPEAT_UNLIMITED;
+ goto REPEAT;
+
+ case META_QUERY:
+ case META_QUERY_PLUS:
+ case META_QUERY_QUERY:
+ repeat_min = 0;
+ repeat_max = 1;
+
+ REPEAT:
+ if (previous_matched_char && repeat_min > 0) matched_char = TRUE;
+
+ /* Remember whether this is a variable length repeat, and default to
+ single-char opcodes. */
+
+ reqvary = (repeat_min == repeat_max)? 0 : REQ_VARY;
+ op_type = 0;
+
+ /* If the repeat is {1} we can ignore it. */
+
+ if (repeat_max == 1 && repeat_min == 1) goto END_REPEAT;
+
+ /* Adjust first and required code units for a zero repeat. */
+
+ if (repeat_min == 0)
+ {
+ firstcu = zerofirstcu;
+ firstcuflags = zerofirstcuflags;
+ reqcu = zeroreqcu;
+ reqcuflags = zeroreqcuflags;
+ }
+
+ /* Note the greediness and possessiveness. */
+
+ switch (meta)
+ {
+ case META_MINMAX_PLUS:
+ case META_ASTERISK_PLUS:
+ case META_PLUS_PLUS:
+ case META_QUERY_PLUS:
+ repeat_type = 0; /* Force greedy */
+ possessive_quantifier = TRUE;
+ break;
+
+ case META_MINMAX_QUERY:
+ case META_ASTERISK_QUERY:
+ case META_PLUS_QUERY:
+ case META_QUERY_QUERY:
+ repeat_type = greedy_non_default;
+ possessive_quantifier = FALSE;
+ break;
+
+ default:
+ repeat_type = greedy_default;
+ possessive_quantifier = FALSE;
+ break;
+ }
+
+ /* Save start of previous item, in case we have to move it up in order to
+ insert something before it, and remember what it was. */
+
+ tempcode = previous;
+ op_previous = *previous;
+
+ /* If previous was a recursion call, wrap it in atomic brackets so that
+ previous becomes the atomic group. All recursions were so wrapped in the
+ past, but it no longer happens for non-repeated recursions. In fact, the
+ repeated ones could be re-implemented independently so as not to need this,
+ but for the moment we rely on the code for repeating groups. */
+
+ if (op_previous == OP_RECURSE)
+ {
+ memmove(previous + 1 + LINK_SIZE, previous, CU2BYTES(1 + LINK_SIZE));
+ op_previous = *previous = OP_ONCE;
+ PUT(previous, 1, 2 + 2*LINK_SIZE);
+ previous[2 + 2*LINK_SIZE] = OP_KET;
+ PUT(previous, 3 + 2*LINK_SIZE, 2 + 2*LINK_SIZE);
+ code += 2 + 2 * LINK_SIZE;
+ length_prevgroup = 3 + 3*LINK_SIZE;
+ group_return = -1; /* Set "may match empty string" */
+ }
+
+ /* Now handle repetition for the different types of item. */
+
+ switch (op_previous)
+ {
+ /* If previous was a character or negated character match, abolish the
+ item and generate a repeat item instead. If a char item has a minimum of
+ more than one, ensure that it is set in reqcu - it might not be if a
+ sequence such as x{3} is the first thing in a branch because the x will
+ have gone into firstcu instead. */
+
+ case OP_CHAR:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
+ op_type = chartypeoffset[op_previous - OP_CHAR];
+
+ /* Deal with UTF characters that take up more than one code unit. */
+
+#ifdef MAYBE_UTF_MULTI
+ if (utf && NOT_FIRSTCU(code[-1]))
+ {
+ PCRE2_UCHAR *lastchar = code - 1;
+ BACKCHAR(lastchar);
+ mclength = (uint32_t)(code - lastchar); /* Length of UTF character */
+ memcpy(mcbuffer, lastchar, CU2BYTES(mclength)); /* Save the char */
+ }
+ else
+#endif /* MAYBE_UTF_MULTI */
+
+ /* Handle the case of a single code unit - either with no UTF support, or
+ with UTF disabled, or for a single-code-unit UTF character. */
+ {
+ mcbuffer[0] = code[-1];
+ mclength = 1;
+ if (op_previous <= OP_CHARI && repeat_min > 1)
+ {
+ reqcu = mcbuffer[0];
+ reqcuflags = req_caseopt | cb->req_varyopt;
+ }
+ }
+ goto OUTPUT_SINGLE_REPEAT; /* Code shared with single character types */
+
+ /* If previous was a character class or a back reference, we put the
+ repeat stuff after it, but just skip the item if the repeat was {0,0}. */
+
+#ifdef SUPPORT_WIDE_CHARS
+ case OP_XCLASS:
+#endif
+ case OP_CLASS:
+ case OP_NCLASS:
+ case OP_REF:
+ case OP_REFI:
+ case OP_DNREF:
+ case OP_DNREFI:
+
+ if (repeat_max == 0)
+ {
+ code = previous;
+ goto END_REPEAT;
+ }
+
+ if (repeat_min == 0 && repeat_max == REPEAT_UNLIMITED)
+ *code++ = OP_CRSTAR + repeat_type;
+ else if (repeat_min == 1 && repeat_max == REPEAT_UNLIMITED)
+ *code++ = OP_CRPLUS + repeat_type;
+ else if (repeat_min == 0 && repeat_max == 1)
+ *code++ = OP_CRQUERY + repeat_type;
+ else
+ {
+ *code++ = OP_CRRANGE + repeat_type;
+ PUT2INC(code, 0, repeat_min);
+ if (repeat_max == REPEAT_UNLIMITED) repeat_max = 0; /* 2-byte encoding for max */
+ PUT2INC(code, 0, repeat_max);
+ }
+ break;
+
+ /* If previous is OP_FAIL, it was generated by an empty class []
+ (PCRE2_ALLOW_EMPTY_CLASS is set). The other ways in which OP_FAIL can be
+ generated, that is by (*FAIL) or (?!), disallow a quantifier at parse
+ time. We can just ignore this repeat. */
+
+ case OP_FAIL:
+ goto END_REPEAT;
+
+ /* If previous was a bracket group, we may have to replicate it in
+ certain cases. Note that at this point we can encounter only the "basic"
+ bracket opcodes such as BRA and CBRA, as this is the place where they get
+ converted into the more special varieties such as BRAPOS and SBRA.
+ Originally, PCRE did not allow repetition of assertions, but now it does,
+ for Perl compatibility. */
+
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_BRA:
+ case OP_CBRA:
+ case OP_COND:
+ {
+ int len = (int)(code - previous);
+ PCRE2_UCHAR *bralink = NULL;
+ PCRE2_UCHAR *brazeroptr = NULL;
+
+ /* Repeating a DEFINE group (or any group where the condition is always
+ FALSE and there is only one branch) is pointless, but Perl allows the
+ syntax, so we just ignore the repeat. */
+
+ if (op_previous == OP_COND && previous[LINK_SIZE+1] == OP_FALSE &&
+ previous[GET(previous, 1)] != OP_ALT)
+ goto END_REPEAT;
+
+ /* There is no sense in actually repeating assertions. The only potential
+ use of repetition is in cases when the assertion is optional. Therefore,
+ if the minimum is greater than zero, just ignore the repeat. If the
+ maximum is not zero or one, set it to 1. */
+
+ if (op_previous < OP_ONCE) /* Assertion */
+ {
+ if (repeat_min > 0) goto END_REPEAT;
+ if (repeat_max > 1) repeat_max = 1;
+ }
+
+ /* The case of a zero minimum is special because of the need to stick
+ OP_BRAZERO in front of it, and because the group appears once in the
+ data, whereas in other cases it appears the minimum number of times. For
+ this reason, it is simplest to treat this case separately, as otherwise
+ the code gets far too messy. There are several special subcases when the
+ minimum is zero. */
+
+ if (repeat_min == 0)
+ {
+ /* If the maximum is also zero, we used to just omit the group from
+ the output altogether, like this:
+
+ ** if (repeat_max == 0)
+ ** {
+ ** code = previous;
+ ** goto END_REPEAT;
+ ** }
+
+ However, that fails when a group or a subgroup within it is
+ referenced as a subroutine from elsewhere in the pattern, so now we
+ stick in OP_SKIPZERO in front of it so that it is skipped on
+ execution. As we don't have a list of which groups are referenced, we
+ cannot do this selectively.
+
+ If the maximum is 1 or unlimited, we just have to stick in the
+ BRAZERO and do no more at this point. */
+
+ if (repeat_max <= 1 || repeat_max == REPEAT_UNLIMITED)
+ {
+ memmove(previous + 1, previous, CU2BYTES(len));
+ code++;
+ if (repeat_max == 0)
+ {
+ *previous++ = OP_SKIPZERO;
+ goto END_REPEAT;
+ }
+ brazeroptr = previous; /* Save for possessive optimizing */
+ *previous++ = OP_BRAZERO + repeat_type;
+ }
+
+ /* If the maximum is greater than 1 and limited, we have to replicate
+ in a nested fashion, sticking OP_BRAZERO before each set of brackets.
+ The first one has to be handled carefully because it's the original
+ copy, which has to be moved up. The remainder can be handled by code
+ that is common with the non-zero minimum case below. We have to
+ adjust the value or repeat_max, since one less copy is required. */
+
+ else
+ {
+ int linkoffset;
+ memmove(previous + 2 + LINK_SIZE, previous, CU2BYTES(len));
+ code += 2 + LINK_SIZE;
+ *previous++ = OP_BRAZERO + repeat_type;
+ *previous++ = OP_BRA;
+
+ /* We chain together the bracket link offset fields that have to be
+ filled in later when the ends of the brackets are reached. */
+
+ linkoffset = (bralink == NULL)? 0 : (int)(previous - bralink);
+ bralink = previous;
+ PUTINC(previous, 0, linkoffset);
+ }
+
+ if (repeat_max != REPEAT_UNLIMITED) repeat_max--;
+ }
+
+ /* If the minimum is greater than zero, replicate the group as many
+ times as necessary, and adjust the maximum to the number of subsequent
+ copies that we need. */
+
+ else
+ {
+ if (repeat_min > 1)
+ {
+ /* In the pre-compile phase, we don't actually do the replication.
+ We just adjust the length as if we had. Do some paranoid checks for
+ potential integer overflow. The INT64_OR_DOUBLE type is a 64-bit
+ integer type when available, otherwise double. */
+
+ if (lengthptr != NULL)
+ {
+ PCRE2_SIZE delta = (repeat_min - 1)*length_prevgroup;
+ if ((INT64_OR_DOUBLE)(repeat_min - 1)*
+ (INT64_OR_DOUBLE)length_prevgroup >
+ (INT64_OR_DOUBLE)INT_MAX ||
+ OFLOW_MAX - *lengthptr < delta)
+ {
+ *errorcodeptr = ERR20;
+ return 0;
+ }
+ *lengthptr += delta;
+ }
+
+ /* This is compiling for real. If there is a set first code unit
+ for the group, and we have not yet set a "required code unit", set
+ it. */
+
+ else
+ {
+ if (groupsetfirstcu && reqcuflags < 0)
+ {
+ reqcu = firstcu;
+ reqcuflags = firstcuflags;
+ }
+ for (i = 1; (uint32_t)i < repeat_min; i++)
+ {
+ memcpy(code, previous, CU2BYTES(len));
+ code += len;
+ }
+ }
+ }
+
+ if (repeat_max != REPEAT_UNLIMITED) repeat_max -= repeat_min;
+ }
+
+ /* This code is common to both the zero and non-zero minimum cases. If
+ the maximum is limited, it replicates the group in a nested fashion,
+ remembering the bracket starts on a stack. In the case of a zero
+ minimum, the first one was set up above. In all cases the repeat_max
+ now specifies the number of additional copies needed. Again, we must
+ remember to replicate entries on the forward reference list. */
+
+ if (repeat_max != REPEAT_UNLIMITED)
+ {
+ /* In the pre-compile phase, we don't actually do the replication. We
+ just adjust the length as if we had. For each repetition we must add
+ 1 to the length for BRAZERO and for all but the last repetition we
+ must add 2 + 2*LINKSIZE to allow for the nesting that occurs. Do some
+ paranoid checks to avoid integer overflow. The INT64_OR_DOUBLE type
+ is a 64-bit integer type when available, otherwise double. */
+
+ if (lengthptr != NULL && repeat_max > 0)
+ {
+ PCRE2_SIZE delta = repeat_max*(length_prevgroup + 1 + 2 + 2*LINK_SIZE) -
+ 2 - 2*LINK_SIZE; /* Last one doesn't nest */
+ if ((INT64_OR_DOUBLE)repeat_max *
+ (INT64_OR_DOUBLE)(length_prevgroup + 1 + 2 + 2*LINK_SIZE)
+ > (INT64_OR_DOUBLE)INT_MAX ||
+ OFLOW_MAX - *lengthptr < delta)
+ {
+ *errorcodeptr = ERR20;
+ return 0;
+ }
+ *lengthptr += delta;
+ }
+
+ /* This is compiling for real */
+
+ else for (i = repeat_max - 1; i >= 0; i--)
+ {
+ *code++ = OP_BRAZERO + repeat_type;
+
+ /* All but the final copy start a new nesting, maintaining the
+ chain of brackets outstanding. */
+
+ if (i != 0)
+ {
+ int linkoffset;
+ *code++ = OP_BRA;
+ linkoffset = (bralink == NULL)? 0 : (int)(code - bralink);
+ bralink = code;
+ PUTINC(code, 0, linkoffset);
+ }
+
+ memcpy(code, previous, CU2BYTES(len));
+ code += len;
+ }
+
+ /* Now chain through the pending brackets, and fill in their length
+ fields (which are holding the chain links pro tem). */
+
+ while (bralink != NULL)
+ {
+ int oldlinkoffset;
+ int linkoffset = (int)(code - bralink + 1);
+ PCRE2_UCHAR *bra = code - linkoffset;
+ oldlinkoffset = GET(bra, 1);
+ bralink = (oldlinkoffset == 0)? NULL : bralink - oldlinkoffset;
+ *code++ = OP_KET;
+ PUTINC(code, 0, linkoffset);
+ PUT(bra, 1, linkoffset);
+ }
+ }
+
+ /* If the maximum is unlimited, set a repeater in the final copy. For
+ ONCE brackets, that's all we need to do. However, possessively repeated
+ ONCE brackets can be converted into non-capturing brackets, as the
+ behaviour of (?:xx)++ is the same as (?>xx)++ and this saves having to
+ deal with possessive ONCEs specially.
+
+ Otherwise, when we are doing the actual compile phase, check to see
+ whether this group is one that could match an empty string. If so,
+ convert the initial operator to the S form (e.g. OP_BRA -> OP_SBRA) so
+ that runtime checking can be done. [This check is also applied to ONCE
+ groups at runtime, but in a different way.]
+
+ Then, if the quantifier was possessive and the bracket is not a
+ conditional, we convert the BRA code to the POS form, and the KET code to
+ KETRPOS. (It turns out to be convenient at runtime to detect this kind of
+ subpattern at both the start and at the end.) The use of special opcodes
+ makes it possible to reduce greatly the stack usage in pcre2_match(). If
+ the group is preceded by OP_BRAZERO, convert this to OP_BRAPOSZERO.
+
+ Then, if the minimum number of matches is 1 or 0, cancel the possessive
+ flag so that the default action below, of wrapping everything inside
+ atomic brackets, does not happen. When the minimum is greater than 1,
+ there will be earlier copies of the group, and so we still have to wrap
+ the whole thing. */
+
+ else
+ {
+ PCRE2_UCHAR *ketcode = code - 1 - LINK_SIZE;
+ PCRE2_UCHAR *bracode = ketcode - GET(ketcode, 1);
+
+ /* Convert possessive ONCE brackets to non-capturing */
+
+ if ((*bracode == OP_ONCE || *bracode == OP_ONCE_NC) &&
+ possessive_quantifier) *bracode = OP_BRA;
+
+ /* For non-possessive ONCE brackets, all we need to do is to
+ set the KET. */
+
+ if (*bracode == OP_ONCE || *bracode == OP_ONCE_NC)
+ *ketcode = OP_KETRMAX + repeat_type;
+
+ /* Handle non-ONCE brackets and possessive ONCEs (which have been
+ converted to non-capturing above). */
+
+ else
+ {
+ /* In the compile phase, adjust the opcode if the group can match
+ an empty string. For a conditional group with only one branch, the
+ value of group_return will not show "could be empty", so we must
+ check that separately. */
+
+ if (lengthptr == NULL)
+ {
+ if (group_return < 0) *bracode += OP_SBRA - OP_BRA;
+ if (*bracode == OP_COND && bracode[GET(bracode,1)] != OP_ALT)
+ *bracode = OP_SCOND;
+ }
+
+ /* Handle possessive quantifiers. */
+
+ if (possessive_quantifier)
+ {
+ /* For COND brackets, we wrap the whole thing in a possessively
+ repeated non-capturing bracket, because we have not invented POS
+ versions of the COND opcodes. */
+
+ if (*bracode == OP_COND || *bracode == OP_SCOND)
+ {
+ int nlen = (int)(code - bracode);
+ memmove(bracode + 1 + LINK_SIZE, bracode, CU2BYTES(nlen));
+ code += 1 + LINK_SIZE;
+ nlen += 1 + LINK_SIZE;
+ *bracode = (*bracode == OP_COND)? OP_BRAPOS : OP_SBRAPOS;
+ *code++ = OP_KETRPOS;
+ PUTINC(code, 0, nlen);
+ PUT(bracode, 1, nlen);
+ }
+
+ /* For non-COND brackets, we modify the BRA code and use KETRPOS. */
+
+ else
+ {
+ *bracode += 1; /* Switch to xxxPOS opcodes */
+ *ketcode = OP_KETRPOS;
+ }
+
+ /* If the minimum is zero, mark it as possessive, then unset the
+ possessive flag when the minimum is 0 or 1. */
+
+ if (brazeroptr != NULL) *brazeroptr = OP_BRAPOSZERO;
+ if (repeat_min < 2) possessive_quantifier = FALSE;
+ }
+
+ /* Non-possessive quantifier */
+
+ else *ketcode = OP_KETRMAX + repeat_type;
+ }
+ }
+ }
+ break;
+
+ /* If previous was a character type match (\d or similar), abolish it and
+ create a suitable repeat item. The code is shared with single-character
+ repeats by setting op_type to add a suitable offset into repeat_type.
+ Note the the Unicode property types will be present only when
+ SUPPORT_UNICODE is defined, but we don't wrap the little bits of code
+ here because it just makes it horribly messy. */
+
+ default:
+ if (op_previous >= OP_EODN) /* Not a character type - internal error */
+ {
+ *errorcodeptr = ERR10;
+ return 0;
+ }
+ else
+ {
+ int prop_type, prop_value;
+ PCRE2_UCHAR *oldcode;
+
+ op_type = OP_TYPESTAR - OP_STAR; /* Use type opcodes */
+ mclength = 0; /* Not a character */
+
+ if (op_previous == OP_PROP || op_previous == OP_NOTPROP)
+ {
+ prop_type = previous[1];
+ prop_value = previous[2];
+ }
+ else
+ {
+ /* Come here from just above with a character in mcbuffer/mclength. */
+ OUTPUT_SINGLE_REPEAT:
+ prop_type = prop_value = -1;
+ }
+
+ /* At this point, if prop_type == prop_value == -1 we either have a
+ character in mcbuffer when mclength is greater than zero, or we have
+ mclength zero, in which case there is a non-property character type in
+ op_previous. If prop_type/value are not negative, we have a property
+ character type in op_previous. */
+
+ oldcode = code; /* Save where we were */
+ code = previous; /* Usually overwrite previous item */
+
+ /* If the maximum is zero then the minimum must also be zero; Perl allows
+ this case, so we do too - by simply omitting the item altogether. */
+
+ if (repeat_max == 0) goto END_REPEAT;
+
+ /* Combine the op_type with the repeat_type */
+
+ repeat_type += op_type;
+
+ /* A minimum of zero is handled either as the special case * or ?, or as
+ an UPTO, with the maximum given. */
+
+ if (repeat_min == 0)
+ {
+ if (repeat_max == REPEAT_UNLIMITED) *code++ = OP_STAR + repeat_type;
+ else if (repeat_max == 1) *code++ = OP_QUERY + repeat_type;
+ else
+ {
+ *code++ = OP_UPTO + repeat_type;
+ PUT2INC(code, 0, repeat_max);
+ }
+ }
+
+ /* A repeat minimum of 1 is optimized into some special cases. If the
+ maximum is unlimited, we use OP_PLUS. Otherwise, the original item is
+ left in place and, if the maximum is greater than 1, we use OP_UPTO with
+ one less than the maximum. */
+
+ else if (repeat_min == 1)
+ {
+ if (repeat_max == REPEAT_UNLIMITED)
+ *code++ = OP_PLUS + repeat_type;
+ else
+ {
+ code = oldcode; /* Leave previous item in place */
+ if (repeat_max == 1) goto END_REPEAT;
+ *code++ = OP_UPTO + repeat_type;
+ PUT2INC(code, 0, repeat_max - 1);
+ }
+ }
+
+ /* The case {n,n} is just an EXACT, while the general case {n,m} is
+ handled as an EXACT followed by an UPTO or STAR or QUERY. */
+
+ else
+ {
+ *code++ = OP_EXACT + op_type; /* NB EXACT doesn't have repeat_type */
+ PUT2INC(code, 0, repeat_min);
+
+ /* Unless repeat_max equals repeat_min, fill in the data for EXACT,
+ and then generate the second opcode. For a repeated Unicode property
+ match, there are two extra values that define the required property,
+ and mclength is set zero to indicate this. */
+
+ if (repeat_max != repeat_min)
+ {
+ if (mclength > 0)
+ {
+ memcpy(code, mcbuffer, CU2BYTES(mclength));
+ code += mclength;
+ }
+ else
+ {
+ *code++ = op_previous;
+ if (prop_type >= 0)
+ {
+ *code++ = prop_type;
+ *code++ = prop_value;
+ }
+ }
+
+ /* Now set up the following opcode */
+
+ if (repeat_max == REPEAT_UNLIMITED)
+ *code++ = OP_STAR + repeat_type;
+ else
+ {
+ repeat_max -= repeat_min;
+ if (repeat_max == 1)
+ {
+ *code++ = OP_QUERY + repeat_type;
+ }
+ else
+ {
+ *code++ = OP_UPTO + repeat_type;
+ PUT2INC(code, 0, repeat_max);
+ }
+ }
+ }
+ }
+
+ /* Fill in the character or character type for the final opcode. */
+
+ if (mclength > 0)
+ {
+ memcpy(code, mcbuffer, CU2BYTES(mclength));
+ code += mclength;
+ }
+ else
+ {
+ *code++ = op_previous;
+ if (prop_type >= 0)
+ {
+ *code++ = prop_type;
+ *code++ = prop_value;
+ }
+ }
+ }
+ break;
+ } /* End of switch on different op_previous values */
+
+
+ /* If the character following a repeat is '+', possessive_quantifier is
+ TRUE. For some opcodes, there are special alternative opcodes for this
+ case. For anything else, we wrap the entire repeated item inside OP_ONCE
+ brackets. Logically, the '+' notation is just syntactic sugar, taken from
+ Sun's Java package, but the special opcodes can optimize it.
+
+ Some (but not all) possessively repeated subpatterns have already been
+ completely handled in the code just above. For them, possessive_quantifier
+ is always FALSE at this stage. Note that the repeated item starts at
+ tempcode, not at previous, which might be the first part of a string whose
+ (former) last char we repeated. */
+
+ if (possessive_quantifier)
+ {
+ int len;
+
+ /* Possessifying an EXACT quantifier has no effect, so we can ignore it.
+ However, QUERY, STAR, or UPTO may follow (for quantifiers such as {5,6},
+ {5,}, or {5,10}). We skip over an EXACT item; if the length of what
+ remains is greater than zero, there's a further opcode that can be
+ handled. If not, do nothing, leaving the EXACT alone. */
+
+ switch(*tempcode)
+ {
+ case OP_TYPEEXACT:
+ tempcode += PRIV(OP_lengths)[*tempcode] +
+ ((tempcode[1 + IMM2_SIZE] == OP_PROP
+ || tempcode[1 + IMM2_SIZE] == OP_NOTPROP)? 2 : 0);
+ break;
+
+ /* CHAR opcodes are used for exacts whose count is 1. */
+
+ case OP_CHAR:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
+ case OP_EXACT:
+ case OP_EXACTI:
+ case OP_NOTEXACT:
+ case OP_NOTEXACTI:
+ tempcode += PRIV(OP_lengths)[*tempcode];
+#ifdef SUPPORT_UNICODE
+ if (utf && HAS_EXTRALEN(tempcode[-1]))
+ tempcode += GET_EXTRALEN(tempcode[-1]);
+#endif
+ break;
+
+ /* For the class opcodes, the repeat operator appears at the end;
+ adjust tempcode to point to it. */
+
+ case OP_CLASS:
+ case OP_NCLASS:
+ tempcode += 1 + 32/sizeof(PCRE2_UCHAR);
+ break;
+
+#ifdef SUPPORT_WIDE_CHARS
+ case OP_XCLASS:
+ tempcode += GET(tempcode, 1);
+ break;
+#endif
+ }
+
+ /* If tempcode is equal to code (which points to the end of the repeated
+ item), it means we have skipped an EXACT item but there is no following
+ QUERY, STAR, or UPTO; the value of len will be 0, and we do nothing. In
+ all other cases, tempcode will be pointing to the repeat opcode, and will
+ be less than code, so the value of len will be greater than 0. */
+
+ len = (int)(code - tempcode);
+ if (len > 0)
+ {
+ unsigned int repcode = *tempcode;
+
+ /* There is a table for possessifying opcodes, all of which are less
+ than OP_CALLOUT. A zero entry means there is no possessified version.
+ */
+
+ if (repcode < OP_CALLOUT && opcode_possessify[repcode] > 0)
+ *tempcode = opcode_possessify[repcode];
+
+ /* For opcode without a special possessified version, wrap the item in
+ ONCE brackets. */
+
+ else
+ {
+ memmove(tempcode + 1 + LINK_SIZE, tempcode, CU2BYTES(len));
+ code += 1 + LINK_SIZE;
+ len += 1 + LINK_SIZE;
+ tempcode[0] = OP_ONCE;
+ *code++ = OP_KET;
+ PUTINC(code, 0, len);
+ PUT(tempcode, 1, len);
+ }
+ }
+ }
+
+ /* We set the "follows varying string" flag for subsequently encountered
+ reqcus if it isn't already set and we have just passed a varying length
+ item. */
+
+ END_REPEAT:
+ cb->req_varyopt |= reqvary;
+ break;
+
+
+ /* ===================================================================*/
+ /* Handle a 32-bit data character with a value greater than META_END. */
+
+ case META_BIGVALUE:
+ pptr++;
+ goto NORMAL_CHAR;
+
+
+ /* ===============================================================*/
+ /* Handle a back reference by number, which is the meta argument. The
+ pattern offsets for back references to group numbers less than 10 are held
+ in a special vector, to avoid using more than two parsed pattern elements
+ in 64-bit environments. We only need the offset to the first occurrence,
+ because if that doesn't fail, subsequent ones will also be OK. */
+
+ case META_BACKREF:
+ if (meta_arg < 10) offset = cb->small_ref_offset[meta_arg];
+ else GETPLUSOFFSET(offset, pptr);
+
+ if (meta_arg > cb->bracount)
+ {
+ cb->erroroffset = offset;
+ *errorcodeptr = ERR15; /* Non-existent subpattern */
+ return 0;
+ }
+
+ /* Come here from named backref handling when the reference is to a
+ single group (that is, not to a duplicated name). The back reference
+ data will have already been updated. We must disable firstcu if not
+ set, to cope with cases like (?=(\w+))\1: which would otherwise set ':'
+ later. */
+
+ HANDLE_SINGLE_REFERENCE:
+ if (firstcuflags == REQ_UNSET) firstcuflags = REQ_NONE;
+ *code++ = ((options & PCRE2_CASELESS) != 0)? OP_REFI : OP_REF;
+ PUT2INC(code, 0, meta_arg);
+
+ /* Update the map of back references, and keep the highest one. We
+ could do this in parse_regex() for numerical back references, but not
+ for named back references, because we don't know the numbers to which
+ named back references refer. So we do it all in this function. */
+
+ cb->backref_map |= (meta_arg < 32)? (1u << meta_arg) : 1;
+ if (meta_arg > cb->top_backref) cb->top_backref = meta_arg;
+
+ /* Check to see if this back reference is recursive, that it, it
+ is inside the group that it references. A flag is set so that the
+ group can be made atomic. */
+
+ for (oc = cb->open_caps; oc != NULL; oc = oc->next)
+ {
+ if (oc->number == meta_arg)
+ {
+ oc->flag = TRUE;
+ break;
+ }
+ }
+ break;
+
+
+ /* ===============================================================*/
+ /* Handle recursion by inserting the number of the called group (which is
+ the meta argument) after OP_RECURSE. At the end of compiling the pattern is
+ scanned and these numbers are replaced by offsets within the pattern. It is
+ done like this to avoid problems with forward references and adjusting
+ offsets when groups are duplicated and moved (as discovered in previous
+ implementations). Note that a recursion does not have a set first character
+ (relevant if it is repeated, because it will then be wrapped with ONCE
+ brackets). */
+
+ case META_RECURSE:
+ GETPLUSOFFSET(offset, pptr);
+ if (meta_arg > cb->bracount)
+ {
+ cb->erroroffset = offset;
+ *errorcodeptr = ERR15; /* Non-existent subpattern */
+ return 0;
+ }
+ HANDLE_NUMERICAL_RECURSION:
+ *code = OP_RECURSE;
+ PUT(code, 1, meta_arg);
+ code += 1 + LINK_SIZE;
+ groupsetfirstcu = FALSE;
+ cb->had_recurse = TRUE;
+ if (firstcuflags == REQ_UNSET) firstcuflags = REQ_NONE;
+ break;
+
+
+ /* ===============================================================*/
+ /* Handle capturing parentheses; the number is the meta argument. */
+
+ case META_CAPTURE:
+ bravalue = OP_CBRA;
+ skipunits = IMM2_SIZE;
+ PUT2(code, 1+LINK_SIZE, meta_arg);
+ cb->lastcapture = meta_arg;
+ goto GROUP_PROCESS_NOTE_EMPTY;
+
+
+ /* ===============================================================*/
+ /* Handle escape sequence items. For ones like \d, the ESC_values are
+ arranged to be the same as the corresponding OP_values in the default case
+ when PCRE2_UCP is not set (which is the only case in which they will appear
+ here).
+
+ Note: \Q and \E are never seen here, as they were dealt with in
+ parse_pattern(). Neither are numerical back references or recursions, which
+ were turned into META_BACKREF or META_RECURSE items, respectively. \k and
+ \g, when followed by names, are turned into META_BACKREF_BYNAME or
+ META_RECURSE_BYNAME. */
+
+ case META_ESCAPE:
+
+ /* We can test for escape sequences that consume a character because their
+ values lie between ESC_b and ESC_Z; this may have to change if any new ones
+ are ever created. For these sequences, we disable the setting of a first
+ character if it hasn't already been set. */
+
+ if (meta_arg > ESC_b && meta_arg < ESC_Z)
+ {
+ matched_char = TRUE;
+ if (firstcuflags == REQ_UNSET) firstcuflags = REQ_NONE;
+ }
+
+ /* Set values to reset to if this is followed by a zero repeat. */
+
+ zerofirstcu = firstcu;
+ zerofirstcuflags = firstcuflags;
+ zeroreqcu = reqcu;
+ zeroreqcuflags = reqcuflags;
+
+ /* If Unicode is not supported, \P and \p are not allowed and are
+ faulted at parse time, so will never appear here. */
+
+#ifdef SUPPORT_UNICODE
+ if (meta_arg == ESC_P || meta_arg == ESC_p)
+ {
+ uint32_t ptype = *(++pptr) >> 16;
+ uint32_t pdata = *pptr & 0xffff;
+ *code++ = (meta_arg == ESC_p)? OP_PROP : OP_NOTPROP;
+ *code++ = ptype;
+ *code++ = pdata;
+ break; /* End META_ESCAPE */
+ }
+#endif
+
+ /* For the rest (including \X when Unicode is supported - if not it's
+ faulted at parse time), the OP value is the escape value when PCRE2_UCP is
+ not set; if it is set, these escapes do not show up here because they are
+ converted into Unicode property tests in parse_regex(). Note that \b and \B
+ do a one-character lookbehind, and \A also behaves as if it does. */
+
+ if (meta_arg == ESC_C) cb->external_flags |= PCRE2_HASBKC; /* Record */
+ if ((meta_arg == ESC_b || meta_arg == ESC_B || meta_arg == ESC_A) &&
+ cb->max_lookbehind == 0)
+ cb->max_lookbehind = 1;
+
+ /* In non-UTF mode, and for both 32-bit modes, we turn \C into OP_ALLANY
+ instead of OP_ANYBYTE so that it works in DFA mode and in lookbehinds. */
+
+#if PCRE2_CODE_UNIT_WIDTH == 32
+ *code++ = (meta_arg == ESC_C)? OP_ALLANY : meta_arg;
+#else
+ *code++ = (!utf && meta_arg == ESC_C)? OP_ALLANY : meta_arg;
+#endif
+ break; /* End META_ESCAPE */
+
+
+ /* ===================================================================*/
+ /* Handle an unrecognized meta value. A parsed pattern value less than
+ META_END is a literal. Otherwise we have a problem. */
+
+ default:
+ if (meta >= META_END)
+ {
+#ifdef DEBUG_SHOW_PARSED
+ fprintf(stderr, "** Unrecognized parsed pattern item 0x%.8x\n", *pptr);
+#endif
+ *errorcodeptr = ERR89; /* Internal error - unrecognized. */
+ return 0;
+ }
+
+ /* Handle a literal character. We come here by goto in the case of a
+ 32-bit, non-UTF character whose value is greater than META_END. */
+
+ NORMAL_CHAR:
+ meta = *pptr; /* Get the full 32 bits */
+ NORMAL_CHAR_SET: /* Character is already in meta */
+ matched_char = TRUE;
+
+ /* For caseless UTF mode, check whether this character has more than one
+ other case. If so, generate a special OP_PROP item instead of OP_CHARI. */
+
+#ifdef SUPPORT_UNICODE
+ if (utf && (options & PCRE2_CASELESS) != 0)
+ {
+ uint32_t caseset = UCD_CASESET(meta);
+ if (caseset != 0)
+ {
+ *code++ = OP_PROP;
+ *code++ = PT_CLIST;
+ *code++ = caseset;
+ if (firstcuflags == REQ_UNSET)
+ firstcuflags = zerofirstcuflags = REQ_NONE;
+ break; /* End handling this meta item */
+ }
+ }
+#endif
+
+ /* Caseful matches, or not one of the multicase characters. Get the
+ character's code units into mcbuffer, with the length in mclength. When not
+ in UTF mode, the length is always 1. */
+
+#ifdef SUPPORT_UNICODE
+ if (utf) mclength = PRIV(ord2utf)(meta, mcbuffer); else
+#endif
+ {
+ mclength = 1;
+ mcbuffer[0] = meta;
+ }
+
+ /* Generate the appropriate code */
+
+ *code++ = ((options & PCRE2_CASELESS) != 0)? OP_CHARI : OP_CHAR;
+ memcpy(code, mcbuffer, CU2BYTES(mclength));
+ code += mclength;
+
+ /* Remember if \r or \n were seen */
+
+ if (mcbuffer[0] == CHAR_CR || mcbuffer[0] == CHAR_NL)
+ cb->external_flags |= PCRE2_HASCRORLF;
+
+ /* Set the first and required code units appropriately. If no previous
+ first code unit, set it from this character, but revert to none on a zero
+ repeat. Otherwise, leave the firstcu value alone, and don't change it on
+ a zero repeat. */
+
+ if (firstcuflags == REQ_UNSET)
+ {
+ zerofirstcuflags = REQ_NONE;
+ zeroreqcu = reqcu;
+ zeroreqcuflags = reqcuflags;
+
+ /* If the character is more than one code unit long, we can set firstcu
+ only if it is not to be matched caselessly. */
+
+ if (mclength == 1 || req_caseopt == 0)
+ {
+ firstcu = mcbuffer[0] | req_caseopt;
+ firstcu = mcbuffer[0];
+ firstcuflags = req_caseopt;
+ if (mclength != 1)
+ {
+ reqcu = code[-1];
+ reqcuflags = cb->req_varyopt;
+ }
+ }
+ else firstcuflags = reqcuflags = REQ_NONE;
+ }
+
+ /* firstcu was previously set; we can set reqcu only if the length is
+ 1 or the matching is caseful. */
+
+ else
+ {
+ zerofirstcu = firstcu;
+ zerofirstcuflags = firstcuflags;
+ zeroreqcu = reqcu;
+ zeroreqcuflags = reqcuflags;
+ if (mclength == 1 || req_caseopt == 0)
+ {
+ reqcu = code[-1];
+ reqcuflags = req_caseopt | cb->req_varyopt;
+ }
+ }
+ break; /* End default meta handling */
+ } /* End of big switch */
+ } /* End of big loop */
+
+/* Control never reaches here. */
+}
+
+
+
+/*************************************************
+* Compile regex: a sequence of alternatives *
+*************************************************/
+
+/* On entry, pptr is pointing past the bracket meta, but on return it points to
+the closing bracket or META_END. The code variable is pointing at the code unit
+into which the BRA operator has been stored. This function is used during the
+pre-compile phase when we are trying to find out the amount of memory needed,
+as well as during the real compile phase. The value of lengthptr distinguishes
+the two phases.
+
+Arguments:
+ options option bits, including any changes for this subpattern
+ codeptr -> the address of the current code pointer
+ pptrptr -> the address of the current parsed pattern pointer
+ errorcodeptr -> pointer to error code variable
+ skipunits skip this many code units at start (for brackets and OP_COND)
+ firstcuptr place to put the first required code unit
+ firstcuflagsptr place to put the first code unit flags, or a negative number
+ reqcuptr place to put the last required code unit
+ reqcuflagsptr place to put the last required code unit flags, or a negative number
+ bcptr pointer to the chain of currently open branches
+ cb points to the data block with tables pointers etc.
+ lengthptr NULL during the real compile phase
+ points to length accumulator during pre-compile phase
+
+Returns: 0 There has been an error
+ +1 Success, this group must match at least one character
+ -1 Success, this group may match an empty string
+*/
+
+static int
+compile_regex(uint32_t options, PCRE2_UCHAR **codeptr, uint32_t **pptrptr,
+ int *errorcodeptr, uint32_t skipunits, uint32_t *firstcuptr,
+ int32_t *firstcuflagsptr, uint32_t *reqcuptr,int32_t *reqcuflagsptr,
+ branch_chain *bcptr, compile_block *cb, PCRE2_SIZE *lengthptr)
+{
+PCRE2_UCHAR *code = *codeptr;
+PCRE2_UCHAR *last_branch = code;
+PCRE2_UCHAR *start_bracket = code;
+BOOL lookbehind;
+open_capitem capitem;
+int capnumber = 0;
+int okreturn = 1;
+uint32_t *pptr = *pptrptr;
+uint32_t firstcu, reqcu;
+uint32_t lookbehindlength;
+int32_t firstcuflags, reqcuflags;
+uint32_t branchfirstcu, branchreqcu;
+int32_t branchfirstcuflags, branchreqcuflags;
+PCRE2_SIZE length;
+branch_chain bc;
+
+/* If set, call the external function that checks for stack availability. */
+
+if (cb->cx->stack_guard != NULL &&
+ cb->cx->stack_guard(cb->parens_depth, cb->cx->stack_guard_data))
+ {
+ *errorcodeptr= ERR33;
+ return 0;
+ }
+
+/* Miscellaneous initialization */
+
+bc.outer = bcptr;
+bc.current_branch = code;
+
+firstcu = reqcu = 0;
+firstcuflags = reqcuflags = REQ_UNSET;
+
+/* Accumulate the length for use in the pre-compile phase. Start with the
+length of the BRA and KET and any extra code units that are required at the
+beginning. We accumulate in a local variable to save frequent testing of
+lengthptr for NULL. We cannot do this by looking at the value of 'code' at the
+start and end of each alternative, because compiled items are discarded during
+the pre-compile phase so that the work space is not exceeded. */
+
+length = 2 + 2*LINK_SIZE + skipunits;
+
+/* Remember if this is a lookbehind assertion, and if it is, save its length
+and skip over the pattern offset. */
+
+lookbehind = *code == OP_ASSERTBACK || *code == OP_ASSERTBACK_NOT;
+if (lookbehind)
+ {
+ lookbehindlength = META_DATA(pptr[-1]);
+ pptr += SIZEOFFSET;
+ }
+else lookbehindlength = 0;
+
+/* If this is a capturing subpattern, add to the chain of open capturing items
+so that we can detect them if (*ACCEPT) is encountered. Note that only OP_CBRA
+need be tested here; changing this opcode to one of its variants, e.g.
+OP_SCBRAPOS, happens later, after the group has been compiled. */
+
+if (*code == OP_CBRA)
+ {
+ capnumber = GET2(code, 1 + LINK_SIZE);
+ capitem.number = capnumber;
+ capitem.next = cb->open_caps;
+ capitem.flag = FALSE;
+ cb->open_caps = &capitem;
+ }
+
+/* Offset is set zero to mark that this bracket is still open */
+
+PUT(code, 1, 0);
+code += 1 + LINK_SIZE + skipunits;
+
+/* Loop for each alternative branch */
+
+for (;;)
+ {
+ int branch_return;
+
+ /* Insert OP_REVERSE if this is as lookbehind assertion. */
+
+ if (lookbehind && lookbehindlength > 0)
+ {
+ *code++ = OP_REVERSE;
+ PUTINC(code, 0, lookbehindlength);
+ length += 1 + LINK_SIZE;
+ }
+
+ /* Now compile the branch; in the pre-compile phase its length gets added
+ into the length. */
+
+ if ((branch_return =
+ compile_branch(&options, &code, &pptr, errorcodeptr, &branchfirstcu,
+ &branchfirstcuflags, &branchreqcu, &branchreqcuflags, &bc,
+ cb, (lengthptr == NULL)? NULL : &length)) == 0)
+ return 0;
+
+ /* If a branch can match an empty string, so can the whole group. */
+
+ if (branch_return < 0) okreturn = -1;
+
+ /* In the real compile phase, there is some post-processing to be done. */
+
+ if (lengthptr == NULL)
+ {
+ /* If this is the first branch, the firstcu and reqcu values for the
+ branch become the values for the regex. */
+
+ if (*last_branch != OP_ALT)
+ {
+ firstcu = branchfirstcu;
+ firstcuflags = branchfirstcuflags;
+ reqcu = branchreqcu;
+ reqcuflags = branchreqcuflags;
+ }
+
+ /* If this is not the first branch, the first char and reqcu have to
+ match the values from all the previous branches, except that if the
+ previous value for reqcu didn't have REQ_VARY set, it can still match,
+ and we set REQ_VARY for the regex. */
+
+ else
+ {
+ /* If we previously had a firstcu, but it doesn't match the new branch,
+ we have to abandon the firstcu for the regex, but if there was
+ previously no reqcu, it takes on the value of the old firstcu. */
+
+ if (firstcuflags != branchfirstcuflags || firstcu != branchfirstcu)
+ {
+ if (firstcuflags >= 0)
+ {
+ if (reqcuflags < 0)
+ {
+ reqcu = firstcu;
+ reqcuflags = firstcuflags;
+ }
+ }
+ firstcuflags = REQ_NONE;
+ }
+
+ /* If we (now or from before) have no firstcu, a firstcu from the
+ branch becomes a reqcu if there isn't a branch reqcu. */
+
+ if (firstcuflags < 0 && branchfirstcuflags >= 0 &&
+ branchreqcuflags < 0)
+ {
+ branchreqcu = branchfirstcu;
+ branchreqcuflags = branchfirstcuflags;
+ }
+
+ /* Now ensure that the reqcus match */
+
+ if (((reqcuflags & ~REQ_VARY) != (branchreqcuflags & ~REQ_VARY)) ||
+ reqcu != branchreqcu)
+ reqcuflags = REQ_NONE;
+ else
+ {
+ reqcu = branchreqcu;
+ reqcuflags |= branchreqcuflags; /* To "or" REQ_VARY */
+ }
+ }
+ }
+
+ /* Handle reaching the end of the expression, either ')' or end of pattern.
+ In the real compile phase, go back through the alternative branches and
+ reverse the chain of offsets, with the field in the BRA item now becoming an
+ offset to the first alternative. If there are no alternatives, it points to
+ the end of the group. The length in the terminating ket is always the length
+ of the whole bracketed item. Return leaving the pointer at the terminating
+ char. */
+
+ if (META_CODE(*pptr) != META_ALT)
+ {
+ if (lengthptr == NULL)
+ {
+ PCRE2_SIZE branch_length = code - last_branch;
+ do
+ {
+ PCRE2_SIZE prev_length = GET(last_branch, 1);
+ PUT(last_branch, 1, branch_length);
+ branch_length = prev_length;
+ last_branch -= branch_length;
+ }
+ while (branch_length > 0);
+ }
+
+ /* Fill in the ket */
+
+ *code = OP_KET;
+ PUT(code, 1, (int)(code - start_bracket));
+ code += 1 + LINK_SIZE;
+
+ /* If it was a capturing subpattern, check to see if it contained any
+ recursive back references. If so, we must wrap it in atomic brackets. In
+ any event, remove the block from the chain. */
+
+ if (capnumber > 0)
+ {
+ if (cb->open_caps->flag)
+ {
+ memmove(start_bracket + 1 + LINK_SIZE, start_bracket,
+ CU2BYTES(code - start_bracket));
+ *start_bracket = OP_ONCE;
+ code += 1 + LINK_SIZE;
+ PUT(start_bracket, 1, (int)(code - start_bracket));
+ *code = OP_KET;
+ PUT(code, 1, (int)(code - start_bracket));
+ code += 1 + LINK_SIZE;
+ length += 2 + 2*LINK_SIZE;
+ }
+ cb->open_caps = cb->open_caps->next;
+ }
+
+ /* Set values to pass back */
+
+ *codeptr = code;
+ *pptrptr = pptr;
+ *firstcuptr = firstcu;
+ *firstcuflagsptr = firstcuflags;
+ *reqcuptr = reqcu;
+ *reqcuflagsptr = reqcuflags;
+ if (lengthptr != NULL)
+ {
+ if (OFLOW_MAX - *lengthptr < length)
+ {
+ *errorcodeptr = ERR20;
+ return 0;
+ }
+ *lengthptr += length;
+ }
+ return okreturn;
+ }
+
+ /* Another branch follows. In the pre-compile phase, we can move the code
+ pointer back to where it was for the start of the first branch. (That is,
+ pretend that each branch is the only one.)
+
+ In the real compile phase, insert an ALT node. Its length field points back
+ to the previous branch while the bracket remains open. At the end the chain
+ is reversed. It's done like this so that the start of the bracket has a
+ zero offset until it is closed, making it possible to detect recursion. */
+
+ if (lengthptr != NULL)
+ {
+ code = *codeptr + 1 + LINK_SIZE + skipunits;
+ length += 1 + LINK_SIZE;
+ }
+ else
+ {
+ *code = OP_ALT;
+ PUT(code, 1, (int)(code - last_branch));
+ bc.current_branch = last_branch = code;
+ code += 1 + LINK_SIZE;
+ }
+
+ /* Set the lookbehind length (if not in a lookbehind the value will be zero)
+ and then advance past the vertical bar. */
+
+ lookbehindlength = META_DATA(*pptr);
+ pptr++;
+ }
+/* Control never reaches here */
+}
+
+
+
+/*************************************************
+* Check for anchored pattern *
+*************************************************/
+
+/* Try to find out if this is an anchored regular expression. Consider each
+alternative branch. If they all start with OP_SOD or OP_CIRC, or with a bracket
+all of whose alternatives start with OP_SOD or OP_CIRC (recurse ad lib), then
+it's anchored. However, if this is a multiline pattern, then only OP_SOD will
+be found, because ^ generates OP_CIRCM in that mode.
+
+We can also consider a regex to be anchored if OP_SOM starts all its branches.
+This is the code for \G, which means "match at start of match position, taking
+into account the match offset".
+
+A branch is also implicitly anchored if it starts with .* and DOTALL is set,
+because that will try the rest of the pattern at all possible matching points,
+so there is no point trying again.... er ....
+
+.... except when the .* appears inside capturing parentheses, and there is a
+subsequent back reference to those parentheses. We haven't enough information
+to catch that case precisely.
+
+At first, the best we could do was to detect when .* was in capturing brackets
+and the highest back reference was greater than or equal to that level.
+However, by keeping a bitmap of the first 31 back references, we can catch some
+of the more common cases more precisely.
+
+... A second exception is when the .* appears inside an atomic group, because
+this prevents the number of characters it matches from being adjusted.
+
+Arguments:
+ code points to start of the compiled pattern
+ bracket_map a bitmap of which brackets we are inside while testing; this
+ handles up to substring 31; after that we just have to take
+ the less precise approach
+ cb points to the compile data block
+ atomcount atomic group level
+ inassert TRUE if in an assertion
+
+Returns: TRUE or FALSE
+*/
+
+static BOOL
+is_anchored(PCRE2_SPTR code, unsigned int bracket_map, compile_block *cb,
+ int atomcount, BOOL inassert)
+{
+do {
+ PCRE2_SPTR scode = first_significant_code(
+ code + PRIV(OP_lengths)[*code], FALSE);
+ int op = *scode;
+
+ /* Non-capturing brackets */
+
+ if (op == OP_BRA || op == OP_BRAPOS ||
+ op == OP_SBRA || op == OP_SBRAPOS)
+ {
+ if (!is_anchored(scode, bracket_map, cb, atomcount, inassert))
+ return FALSE;
+ }
+
+ /* Capturing brackets */
+
+ else if (op == OP_CBRA || op == OP_CBRAPOS ||
+ op == OP_SCBRA || op == OP_SCBRAPOS)
+ {
+ int n = GET2(scode, 1+LINK_SIZE);
+ int new_map = bracket_map | ((n < 32)? (1u << n) : 1);
+ if (!is_anchored(scode, new_map, cb, atomcount, inassert)) return FALSE;
+ }
+
+ /* Positive forward assertion */
+
+ else if (op == OP_ASSERT)
+ {
+ if (!is_anchored(scode, bracket_map, cb, atomcount, TRUE)) return FALSE;
+ }
+
+ /* Condition */
+
+ else if (op == OP_COND)
+ {
+ if (!is_anchored(scode, bracket_map, cb, atomcount, inassert))
+ return FALSE;
+ }
+
+ /* Atomic groups */
+
+ else if (op == OP_ONCE || op == OP_ONCE_NC)
+ {
+ if (!is_anchored(scode, bracket_map, cb, atomcount + 1, inassert))
+ return FALSE;
+ }
+
+ /* .* is not anchored unless DOTALL is set (which generates OP_ALLANY) and
+ it isn't in brackets that are or may be referenced or inside an atomic
+ group or an assertion. Also the pattern must not contain *PRUNE or *SKIP,
+ because these break the feature. Consider, for example, /(?s).*?(*PRUNE)b/
+ with the subject "aab", which matches "b", i.e. not at the start of a line.
+ There is also an option that disables auto-anchoring. */
+
+ else if ((op == OP_TYPESTAR || op == OP_TYPEMINSTAR ||
+ op == OP_TYPEPOSSTAR))
+ {
+ if (scode[1] != OP_ALLANY || (bracket_map & cb->backref_map) != 0 ||
+ atomcount > 0 || cb->had_pruneorskip || inassert ||
+ (cb->external_options & PCRE2_NO_DOTSTAR_ANCHOR) != 0)
+ return FALSE;
+ }
+
+ /* Check for explicit anchoring */
+
+ else if (op != OP_SOD && op != OP_SOM && op != OP_CIRC) return FALSE;
+
+ code += GET(code, 1);
+ }
+while (*code == OP_ALT); /* Loop for each alternative */
+return TRUE;
+}
+
+
+
+/*************************************************
+* Check for starting with ^ or .* *
+*************************************************/
+
+/* This is called to find out if every branch starts with ^ or .* so that
+"first char" processing can be done to speed things up in multiline
+matching and for non-DOTALL patterns that start with .* (which must start at
+the beginning or after \n). As in the case of is_anchored() (see above), we
+have to take account of back references to capturing brackets that contain .*
+because in that case we can't make the assumption. Also, the appearance of .*
+inside atomic brackets or in an assertion, or in a pattern that contains *PRUNE
+or *SKIP does not count, because once again the assumption no longer holds.
+
+Arguments:
+ code points to start of the compiled pattern or a group
+ bracket_map a bitmap of which brackets we are inside while testing; this
+ handles up to substring 31; after that we just have to take
+ the less precise approach
+ cb points to the compile data
+ atomcount atomic group level
+ inassert TRUE if in an assertion
+
+Returns: TRUE or FALSE
+*/
+
+static BOOL
+is_startline(PCRE2_SPTR code, unsigned int bracket_map, compile_block *cb,
+ int atomcount, BOOL inassert)
+{
+do {
+ PCRE2_SPTR scode = first_significant_code(
+ code + PRIV(OP_lengths)[*code], FALSE);
+ int op = *scode;
+
+ /* If we are at the start of a conditional assertion group, *both* the
+ conditional assertion *and* what follows the condition must satisfy the test
+ for start of line. Other kinds of condition fail. Note that there may be an
+ auto-callout at the start of a condition. */
+
+ if (op == OP_COND)
+ {
+ scode += 1 + LINK_SIZE;
+
+ if (*scode == OP_CALLOUT) scode += PRIV(OP_lengths)[OP_CALLOUT];
+ else if (*scode == OP_CALLOUT_STR) scode += GET(scode, 1 + 2*LINK_SIZE);
+
+ switch (*scode)
+ {
+ case OP_CREF:
+ case OP_DNCREF:
+ case OP_RREF:
+ case OP_DNRREF:
+ case OP_FAIL:
+ case OP_FALSE:
+ case OP_TRUE:
+ return FALSE;
+
+ default: /* Assertion */
+ if (!is_startline(scode, bracket_map, cb, atomcount, TRUE)) return FALSE;
+ do scode += GET(scode, 1); while (*scode == OP_ALT);
+ scode += 1 + LINK_SIZE;
+ break;
+ }
+ scode = first_significant_code(scode, FALSE);
+ op = *scode;
+ }
+
+ /* Non-capturing brackets */
+
+ if (op == OP_BRA || op == OP_BRAPOS ||
+ op == OP_SBRA || op == OP_SBRAPOS)
+ {
+ if (!is_startline(scode, bracket_map, cb, atomcount, inassert))
+ return FALSE;
+ }
+
+ /* Capturing brackets */
+
+ else if (op == OP_CBRA || op == OP_CBRAPOS ||
+ op == OP_SCBRA || op == OP_SCBRAPOS)
+ {
+ int n = GET2(scode, 1+LINK_SIZE);
+ int new_map = bracket_map | ((n < 32)? (1u << n) : 1);
+ if (!is_startline(scode, new_map, cb, atomcount, inassert)) return FALSE;
+ }
+
+ /* Positive forward assertions */
+
+ else if (op == OP_ASSERT)
+ {
+ if (!is_startline(scode, bracket_map, cb, atomcount, TRUE))
+ return FALSE;
+ }
+
+ /* Atomic brackets */
+
+ else if (op == OP_ONCE || op == OP_ONCE_NC)
+ {
+ if (!is_startline(scode, bracket_map, cb, atomcount + 1, inassert))
+ return FALSE;
+ }
+
+ /* .* means "start at start or after \n" if it isn't in atomic brackets or
+ brackets that may be referenced or an assertion, and as long as the pattern
+ does not contain *PRUNE or *SKIP, because these break the feature. Consider,
+ for example, /.*?a(*PRUNE)b/ with the subject "aab", which matches "ab",
+ i.e. not at the start of a line. There is also an option that disables this
+ optimization. */
+
+ else if (op == OP_TYPESTAR || op == OP_TYPEMINSTAR || op == OP_TYPEPOSSTAR)
+ {
+ if (scode[1] != OP_ANY || (bracket_map & cb->backref_map) != 0 ||
+ atomcount > 0 || cb->had_pruneorskip || inassert ||
+ (cb->external_options & PCRE2_NO_DOTSTAR_ANCHOR) != 0)
+ return FALSE;
+ }
+
+ /* Check for explicit circumflex; anything else gives a FALSE result. Note
+ in particular that this includes atomic brackets OP_ONCE and OP_ONCE_NC
+ because the number of characters matched by .* cannot be adjusted inside
+ them. */
+
+ else if (op != OP_CIRC && op != OP_CIRCM) return FALSE;
+
+ /* Move on to the next alternative */
+
+ code += GET(code, 1);
+ }
+while (*code == OP_ALT); /* Loop for each alternative */
+return TRUE;
+}
+
+
+
+/*************************************************
+* Scan compiled regex for recursion reference *
+*************************************************/
+
+/* This function scans through a compiled pattern until it finds an instance of
+OP_RECURSE.
+
+Arguments:
+ code points to start of expression
+ utf TRUE in UTF mode
+
+Returns: pointer to the opcode for OP_RECURSE, or NULL if not found
+*/
+
+static PCRE2_SPTR
+find_recurse(PCRE2_SPTR code, BOOL utf)
+{
+for (;;)
+ {
+ PCRE2_UCHAR c = *code;
+ if (c == OP_END) return NULL;
+ if (c == OP_RECURSE) return code;
+
+ /* XCLASS is used for classes that cannot be represented just by a bit map.
+ This includes negated single high-valued characters. CALLOUT_STR is used for
+ callouts with string arguments. In both cases the length in the table is
+ zero; the actual length is stored in the compiled code. */
+
+ if (c == OP_XCLASS) code += GET(code, 1);
+ else if (c == OP_CALLOUT_STR) code += GET(code, 1 + 2*LINK_SIZE);
+
+ /* Otherwise, we can get the item's length from the table, except that for
+ repeated character types, we have to test for \p and \P, which have an extra
+ two code units of parameters, and for MARK/PRUNE/SKIP/THEN with an argument,
+ we must add in its length. */
+
+ else
+ {
+ switch(c)
+ {
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEPOSQUERY:
+ if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2;
+ break;
+
+ case OP_TYPEPOSUPTO:
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEEXACT:
+ if (code[1 + IMM2_SIZE] == OP_PROP || code[1 + IMM2_SIZE] == OP_NOTPROP)
+ code += 2;
+ break;
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_SKIP_ARG:
+ case OP_THEN_ARG:
+ code += code[1];
+ break;
+ }
+
+ /* Add in the fixed length from the table */
+
+ code += PRIV(OP_lengths)[c];
+
+ /* In UTF-8 and UTF-16 modes, opcodes that are followed by a character may
+ be followed by a multi-unit character. The length in the table is a
+ minimum, so we have to arrange to skip the extra units. */
+
+#ifdef MAYBE_UTF_MULTI
+ if (utf) switch(c)
+ {
+ case OP_CHAR:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
+ case OP_EXACT:
+ case OP_EXACTI:
+ case OP_NOTEXACT:
+ case OP_NOTEXACTI:
+ case OP_UPTO:
+ case OP_UPTOI:
+ case OP_NOTUPTO:
+ case OP_NOTUPTOI:
+ case OP_MINUPTO:
+ case OP_MINUPTOI:
+ case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
+ case OP_POSUPTO:
+ case OP_POSUPTOI:
+ case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
+ case OP_STAR:
+ case OP_STARI:
+ case OP_NOTSTAR:
+ case OP_NOTSTARI:
+ case OP_MINSTAR:
+ case OP_MINSTARI:
+ case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
+ case OP_POSSTAR:
+ case OP_POSSTARI:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
+ case OP_PLUS:
+ case OP_PLUSI:
+ case OP_NOTPLUS:
+ case OP_NOTPLUSI:
+ case OP_MINPLUS:
+ case OP_MINPLUSI:
+ case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
+ case OP_POSPLUS:
+ case OP_POSPLUSI:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
+ case OP_QUERY:
+ case OP_QUERYI:
+ case OP_NOTQUERY:
+ case OP_NOTQUERYI:
+ case OP_MINQUERY:
+ case OP_MINQUERYI:
+ case OP_NOTMINQUERY:
+ case OP_NOTMINQUERYI:
+ case OP_POSQUERY:
+ case OP_POSQUERYI:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSQUERYI:
+ if (HAS_EXTRALEN(code[-1])) code += GET_EXTRALEN(code[-1]);
+ break;
+ }
+#else
+ (void)(utf); /* Keep compiler happy by referencing function argument */
+#endif /* MAYBE_UTF_MULTI */
+ }
+ }
+}
+
+
+
+/*************************************************
+* Check for asserted fixed first code unit *
+*************************************************/
+
+/* During compilation, the "first code unit" settings from forward assertions
+are discarded, because they can cause conflicts with actual literals that
+follow. However, if we end up without a first code unit setting for an
+unanchored pattern, it is worth scanning the regex to see if there is an
+initial asserted first code unit. If all branches start with the same asserted
+code unit, or with a non-conditional bracket all of whose alternatives start
+with the same asserted code unit (recurse ad lib), then we return that code
+unit, with the flags set to zero or REQ_CASELESS; otherwise return zero with
+REQ_NONE in the flags.
+
+Arguments:
+ code points to start of compiled pattern
+ flags points to the first code unit flags
+ inassert TRUE if in an assertion
+
+Returns: the fixed first code unit, or 0 with REQ_NONE in flags
+*/
+
+static uint32_t
+find_firstassertedcu(PCRE2_SPTR code, int32_t *flags, BOOL inassert)
+{
+uint32_t c = 0;
+int cflags = REQ_NONE;
+
+*flags = REQ_NONE;
+do {
+ uint32_t d;
+ int dflags;
+ int xl = (*code == OP_CBRA || *code == OP_SCBRA ||
+ *code == OP_CBRAPOS || *code == OP_SCBRAPOS)? IMM2_SIZE:0;
+ PCRE2_SPTR scode = first_significant_code(code + 1+LINK_SIZE + xl, TRUE);
+ PCRE2_UCHAR op = *scode;
+
+ switch(op)
+ {
+ default:
+ return 0;
+
+ case OP_BRA:
+ case OP_BRAPOS:
+ case OP_CBRA:
+ case OP_SCBRA:
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ case OP_ASSERT:
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ d = find_firstassertedcu(scode, &dflags, op == OP_ASSERT);
+ if (dflags < 0)
+ return 0;
+ if (cflags < 0) { c = d; cflags = dflags; }
+ else if (c != d || cflags != dflags) return 0;
+ break;
+
+ case OP_EXACT:
+ scode += IMM2_SIZE;
+ /* Fall through */
+
+ case OP_CHAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_POSPLUS:
+ if (!inassert) return 0;
+ if (cflags < 0) { c = scode[1]; cflags = 0; }
+ else if (c != scode[1]) return 0;
+ break;
+
+ case OP_EXACTI:
+ scode += IMM2_SIZE;
+ /* Fall through */
+
+ case OP_CHARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_POSPLUSI:
+ if (!inassert) return 0;
+ if (cflags < 0) { c = scode[1]; cflags = REQ_CASELESS; }
+ else if (c != scode[1]) return 0;
+ break;
+ }
+
+ code += GET(code, 1);
+ }
+while (*code == OP_ALT);
+
+*flags = cflags;
+return c;
+}
+
+
+
+/*************************************************
+* Add an entry to the name/number table *
+*************************************************/
+
+/* This function is called between compiling passes to add an entry to the
+name/number table, maintaining alphabetical order. Checking for permitted
+and forbidden duplicates has already been done.
+
+Arguments:
+ cb the compile data block
+ name the name to add
+ length the length of the name
+ groupno the group number
+ tablecount the count of names in the table so far
+
+Returns: nothing
+*/
+
+static void
+add_name_to_table(compile_block *cb, PCRE2_SPTR name, int length,
+ unsigned int groupno, uint32_t tablecount)
+{
+uint32_t i;
+PCRE2_UCHAR *slot = cb->name_table;
+
+for (i = 0; i < tablecount; i++)
+ {
+ int crc = memcmp(name, slot+IMM2_SIZE, CU2BYTES(length));
+ if (crc == 0 && slot[IMM2_SIZE+length] != 0)
+ crc = -1; /* Current name is a substring */
+
+ /* Make space in the table and break the loop for an earlier name. For a
+ duplicate or later name, carry on. We do this for duplicates so that in the
+ simple case (when ?(| is not used) they are in order of their numbers. In all
+ cases they are in the order in which they appear in the pattern. */
+
+ if (crc < 0)
+ {
+ memmove(slot + cb->name_entry_size, slot,
+ CU2BYTES((tablecount - i) * cb->name_entry_size));
+ break;
+ }
+
+ /* Continue the loop for a later or duplicate name */
+
+ slot += cb->name_entry_size;
+ }
+
+PUT2(slot, 0, groupno);
+memcpy(slot + IMM2_SIZE, name, CU2BYTES(length));
+
+/* Add a terminating zero and fill the rest of the slot with zeroes so that
+the memory is all initialized. Otherwise valgrind moans about uninitialized
+memory when saving serialized compiled patterns. */
+
+memset(slot + IMM2_SIZE + length, 0,
+ CU2BYTES(cb->name_entry_size - length - IMM2_SIZE));
+}
+
+
+
+/*************************************************
+* Skip in parsed pattern *
+*************************************************/
+
+/* This function is called to skip parts of the parsed pattern when finding the
+length of a lookbehind branch. It is called after (*ACCEPT) and (*FAIL) to find
+the end of the branch, it is called to skip over an internal lookaround, and it
+is also called to skip to the end of a class, during which it will never
+encounter nested groups (but there's no need to have special code for that).
+
+Arguments:
+ pptr current pointer to skip from
+ skiptype PSKIP_CLASS when skipping to end of class
+ PSKIP_ALT when META_ALT ends the skip
+ PSKIP_KET when only META_KET ends the skip
+
+Returns: new value of pptr
+ NULL if META_END is reached - should never occur
+ or for an unknown meta value - likewise
+*/
+
+static uint32_t *
+parsed_skip(uint32_t *pptr, uint32_t skiptype)
+{
+uint32_t nestlevel = 0;
+
+for (pptr += 1;; pptr++)
+ {
+ uint32_t meta = META_CODE(*pptr);
+
+ switch(meta)
+ {
+ default: /* Just skip over most items */
+ if (meta < META_END) continue; /* Literal */
+ break;
+
+ /* This should never occur. */
+
+ case META_END:
+ return NULL;
+
+ /* The data for these items is variable in length. */
+
+ case META_BACKREF: /* Offset is present only if group >= 10 */
+ if (META_DATA(*pptr) >= 10) pptr += SIZEOFFSET;
+ break;
+
+ case META_ESCAPE: /* A few escapes are followed by data items. */
+ switch (META_DATA(*pptr))
+ {
+ case ESC_P:
+ case ESC_p:
+ pptr += 1;
+ break;
+
+ case ESC_g:
+ case ESC_k:
+ pptr += 1 + SIZEOFFSET;
+ break;
+ }
+ break;
+
+ case META_MARK: /* Add the length of the name. */
+ case META_PRUNE_ARG:
+ case META_SKIP_ARG:
+ case META_THEN_ARG:
+ pptr += pptr[1];
+ break;
+
+ /* These are the "active" items in this loop. */
+
+ case META_CLASS_END:
+ if (skiptype == PSKIP_CLASS) return pptr;
+ break;
+
+ case META_ATOMIC:
+ case META_CAPTURE:
+ case META_COND_ASSERT:
+ case META_COND_DEFINE:
+ case META_COND_NAME:
+ case META_COND_NUMBER:
+ case META_COND_RNAME:
+ case META_COND_RNUMBER:
+ case META_COND_VERSION:
+ case META_LOOKAHEAD:
+ case META_LOOKAHEADNOT:
+ case META_LOOKBEHIND:
+ case META_LOOKBEHINDNOT:
+ case META_NOCAPTURE:
+ nestlevel++;
+ break;
+
+ case META_ALT:
+ if (nestlevel == 0 && skiptype == PSKIP_ALT) return pptr;
+ break;
+
+ case META_KET:
+ if (nestlevel == 0) return pptr;
+ nestlevel--;
+ break;
+ }
+
+ /* The extra data item length for each meta is in a table. */
+
+ meta = (meta >> 16) & 0x7fff;
+ if (meta >= sizeof(meta_extra_lengths)) return NULL;
+ pptr += meta_extra_lengths[meta];
+ }
+/* Control never reaches here */
+return pptr;
+}
+
+
+
+/*************************************************
+* Find length of a parsed group *
+*************************************************/
+
+/* This is called for nested groups within a branch of a lookbehind whose
+length is being computed. If all the branches in the nested group have the same
+length, that is OK. On entry, the pointer must be at the first element after
+the group initializing code. Caching is used to improve processing speed when
+the same capturing group occurs many times.
+
+Arguments:
+ pptrptr pointer to pointer in the parsed pattern
+ errcodeptr pointer to the errorcode
+ lcptr pointer to the loop counter
+ group number of captured group or -1 for a non-capturing group
+ recurses chain of recurse_check to catch mutual recursion
+ cb pointer to the compile data
+
+Returns: the group length or a negative number
+*/
+
+static int
+get_grouplength(uint32_t **pptrptr, int *errcodeptr, int *lcptr,
+ int group, parsed_recurse_check *recurses, compile_block *cb)
+{
+int branchlength;
+int grouplength = -1;
+
+/* The cache can be used only if there is no possibility of there being two
+groups with the same number. */
+
+if (group > 0)
+ {
+ uint32_t groupinfo = cb->groupinfo[group];
+ if ((cb->external_flags & PCRE2_DUPCAPUSED) == 0)
+ {
+ if ((groupinfo & GI_NOT_FIXED_LENGTH) != 0) return -1;
+ if ((groupinfo & GI_SET_FIXED_LENGTH) != 0)
+ return groupinfo & GI_FIXED_LENGTH_MASK;
+ }
+ }
+
+/* Scan the group */
+
+for(;;)
+ {
+ branchlength = get_branchlength(pptrptr, errcodeptr, lcptr, recurses, cb);
+ if (branchlength < 0) goto ISNOTFIXED;
+ if (grouplength == -1) grouplength = branchlength;
+ else if (grouplength != branchlength) goto ISNOTFIXED;
+ if (**pptrptr == META_KET) break;
+ *pptrptr += 1; /* Skip META_ALT */
+ }
+
+if (group > 0)
+ cb->groupinfo[group] |= (uint32_t)(GI_SET_FIXED_LENGTH | grouplength);
+return grouplength;
+
+ISNOTFIXED:
+if (group > 0) cb->groupinfo[group] |= GI_NOT_FIXED_LENGTH;
+return -1;
+}
+
+
+
+/*************************************************
+* Find length of a parsed branch *
+*************************************************/
+
+/* Return a fixed length for a branch in a lookbehind, giving an error if the
+length is not fixed. If any lookbehinds are encountered on the way, they get
+their length set. On entry, *pptrptr points to the first element inside the
+branch. On exit it is set to point to the ALT or KET.
+
+Arguments:
+ pptrptr pointer to pointer in the parsed pattern
+ errcodeptr pointer to error code
+ lcptr pointer to loop counter
+ recurses chain of recurse_check to catch mutual recursion
+ cb pointer to compile block
+
+Returns: the length, or a negative value on error
+*/
+
+static int
+get_branchlength(uint32_t **pptrptr, int *errcodeptr, int *lcptr,
+ parsed_recurse_check *recurses, compile_block *cb)
+{
+int branchlength = 0;
+int grouplength;
+uint32_t lastitemlength = 0;
+uint32_t *pptr = *pptrptr;
+PCRE2_SIZE offset;
+parsed_recurse_check this_recurse;
+
+/* A large and/or complex regex can take too long to process. This can happen
+more often when (?| groups are present in the pattern because their length
+cannot be cached. */
+
+if ((*lcptr)++ > 2000)
+ {
+ *errcodeptr = ERR35; /* Lookbehind is too complicated */
+ return -1;
+ }
+
+/* Scan the branch, accumulating the length. */
+
+for (;; pptr++)
+ {
+ parsed_recurse_check *r;
+ uint32_t *gptr, *gptrend;
+ uint32_t escape;
+ uint32_t group = 0;
+ uint32_t itemlength = 0;
+
+ if (*pptr < META_END)
+ {
+ itemlength = 1;
+ }
+
+ else switch (META_CODE(*pptr))
+ {
+ case META_KET:
+ case META_ALT:
+ goto EXIT;
+
+ /* (*ACCEPT) and (*FAIL) terminate the branch, but we must skip to the
+ actual termination. */
+
+ case META_ACCEPT:
+ case META_FAIL:
+ pptr = parsed_skip(pptr, PSKIP_ALT);
+ if (pptr == NULL) goto PARSED_SKIP_FAILED;
+ goto EXIT;
+
+ case META_MARK:
+ case META_PRUNE_ARG:
+ case META_SKIP_ARG:
+ case META_THEN_ARG:
+ pptr += pptr[1] + 1;
+ break;
+
+ case META_CIRCUMFLEX:
+ case META_COMMIT:
+ case META_DOLLAR:
+ case META_PRUNE:
+ case META_SKIP:
+ case META_THEN:
+ break;
+
+ case META_OPTIONS:
+ pptr += 1;
+ break;
+
+ case META_BIGVALUE:
+ itemlength = 1;
+ pptr += 1;
+ break;
+
+ case META_CLASS:
+ case META_CLASS_NOT:
+ itemlength = 1;
+ pptr = parsed_skip(pptr, PSKIP_CLASS);
+ if (pptr == NULL) goto PARSED_SKIP_FAILED;
+ break;
+
+ case META_CLASS_EMPTY_NOT:
+ case META_DOT:
+ itemlength = 1;
+ break;
+
+ case META_CALLOUT_NUMBER:
+ pptr += 3;
+ break;
+
+ case META_CALLOUT_STRING:
+ pptr += 3 + SIZEOFFSET;
+ break;
+
+ /* Only some escapes consume a character. Of those, \R and \X are never
+ allowed because they might match more than character. \C is allowed only in
+ 32-bit and non-UTF 8/16-bit modes. */
+
+ case META_ESCAPE:
+ escape = META_DATA(*pptr);
+ if (escape == ESC_R || escape == ESC_X) return -1;
+ if (escape > ESC_b && escape < ESC_Z)
+ {
+#if PCRE2_CODE_UNIT_WIDTH != 32
+ if ((cb->external_options & PCRE2_UTF) != 0 && escape == ESC_C)
+ {
+ *errcodeptr = ERR36;
+ return -1;
+ }
+#endif
+ itemlength = 1;
+ if (escape == ESC_p || escape == ESC_P) pptr++; /* Skip prop data */
+ }
+ break;
+
+ /* Lookaheads can be ignored. */
+
+ case META_LOOKAHEAD:
+ case META_LOOKAHEADNOT:
+ pptr = parsed_skip(pptr, PSKIP_KET);
+ if (pptr == NULL) goto PARSED_SKIP_FAILED;
+ break;
+
+ /* Lookbehinds can be ignored, but must themselves be checked. */
+
+ case META_LOOKBEHIND:
+ case META_LOOKBEHINDNOT:
+ if (!set_lookbehind_lengths(&pptr, errcodeptr, lcptr, recurses, cb))
+ return -1;
+ break;
+
+ /* Back references and recursions are handled by very similar code. At this
+ stage, the names generated in the parsing pass are available, but the main
+ name table has not yet been created. So for the named varieties, scan the
+ list of names in order to get the number of the first one in the pattern,
+ and whether or not this name is duplicated. */
+
+ case META_BACKREF_BYNAME:
+ if ((cb->external_options & PCRE2_MATCH_UNSET_BACKREF) != 0)
+ goto ISNOTFIXED;
+
+ case META_RECURSE_BYNAME:
+ {
+ int i;
+ PCRE2_SPTR name;
+ BOOL is_dupname = FALSE;
+ named_group *ng = cb->named_groups;
+ uint32_t meta_code = META_CODE(*pptr);
+ uint32_t length = *(++pptr);
+
+ GETPLUSOFFSET(offset, pptr);
+ name = cb->start_pattern + offset;
+ for (i = 0; i < cb->names_found; i++, ng++)
+ {
+ if (length == ng->length && PRIV(strncmp)(name, ng->name, length) == 0)
+ {
+ group = ng->number;
+ is_dupname = ng->isdup;
+ break;
+ }
+ }
+
+ if (group == 0)
+ {
+ *errcodeptr = ERR15; /* Non-existent subpattern */
+ cb->erroroffset = offset;
+ return -1;
+ }
+
+ /* A numerical back reference can be fixed length if duplicate capturing
+ groups are not being used. A non-duplicate named back reference can also
+ be handled. */
+
+ if (meta_code == META_RECURSE_BYNAME ||
+ (!is_dupname && (cb->external_flags & PCRE2_DUPCAPUSED) == 0))
+ goto RECURSE_OR_BACKREF_LENGTH; /* Handle as a numbered version. */
+ }
+ goto ISNOTFIXED; /* Duplicate name or number */
+
+ /* The offset values for back references < 10 are in a separate vector
+ because otherwise they would use more than two parsed pattern elements on
+ 64-bit systems. */
+
+ case META_BACKREF:
+ if ((cb->external_options & PCRE2_MATCH_UNSET_BACKREF) != 0 ||
+ (cb->external_flags & PCRE2_DUPCAPUSED) != 0)
+ goto ISNOTFIXED;
+ group = META_DATA(*pptr);
+ if (group < 10)
+ {
+ offset = cb->small_ref_offset[group];
+ goto RECURSE_OR_BACKREF_LENGTH;
+ }
+
+ /* Fall through for groups >= 10 - picking up group twice does no harm. */
+
+ /* A true recursion implies not fixed length, but a subroutine call may
+ be OK. Back reference "recursions" are also failed. */
+
+ case META_RECURSE:
+ group = META_DATA(*pptr);
+ GETPLUSOFFSET(offset, pptr);
+
+ RECURSE_OR_BACKREF_LENGTH:
+ if (group > cb->bracount)
+ {
+ cb->erroroffset = offset;
+ *errcodeptr = ERR15; /* Non-existent subpattern */
+ return -1;
+ }
+ if (group == 0) goto ISNOTFIXED; /* Local recursion */
+ for (gptr = cb->parsed_pattern; *gptr != META_END; gptr++)
+ {
+ if (META_CODE(*gptr) == META_BIGVALUE) gptr++;
+ else if (*gptr == (META_CAPTURE | group)) break;
+ }
+
+ gptrend = parsed_skip(gptr, PSKIP_KET);
+ if (gptrend == NULL) goto PARSED_SKIP_FAILED;
+ if (pptr > gptr && pptr < gptrend) goto ISNOTFIXED; /* Local recursion */
+ for (r = recurses; r != NULL; r = r->prev) if (r->groupptr == gptr) break;
+ if (r != NULL) goto ISNOTFIXED; /* Mutual recursion */
+ this_recurse.prev = recurses;
+ this_recurse.groupptr = gptr;
+ gptr++;
+ grouplength = get_grouplength(&gptr, errcodeptr, lcptr, group,
+ &this_recurse, cb);
+ if (grouplength < 0)
+ {
+ if (*errcodeptr == 0) goto ISNOTFIXED;
+ return -1; /* Error already set */
+ }
+ itemlength = grouplength;
+ break;
+
+ /* Check nested groups - advance past the initial data for each type and
+ then seek a fixed length with get_grouplength(). */
+
+ case META_COND_NAME:
+ case META_COND_NUMBER:
+ case META_COND_RNAME:
+ case META_COND_RNUMBER:
+ case META_COND_DEFINE:
+ pptr += 2 + SIZEOFFSET;
+ goto CHECK_GROUP;
+
+ case META_COND_ASSERT:
+ pptr += 1;
+ goto CHECK_GROUP;
+
+ case META_COND_VERSION:
+ pptr += 4;
+ goto CHECK_GROUP;
+
+ case META_CAPTURE:
+ group = META_DATA(*pptr);
+ /* Fall through */
+
+ case META_ATOMIC:
+ case META_NOCAPTURE:
+ pptr++;
+ CHECK_GROUP:
+ grouplength = get_grouplength(&pptr, errcodeptr, lcptr, group, recurses, cb);
+ if (grouplength < 0) return -1;
+ itemlength = grouplength;
+ break;
+
+ /* Exact repetition is OK; variable repetition is not. A repetition of zero
+ must subtract the length that has already been added. */
+
+ case META_MINMAX:
+ case META_MINMAX_PLUS:
+ case META_MINMAX_QUERY:
+ if (pptr[1] == pptr[2])
+ {
+ if (pptr[1] == 0) branchlength -= lastitemlength;
+ else itemlength = (pptr[1] - 1) * lastitemlength;
+ pptr += 2;
+ break;
+ }
+ /* Fall through */
+
+ /* Any other item means this branch does not have a fixed length. */
+
+ default:
+ ISNOTFIXED:
+ *errcodeptr = ERR25; /* Not fixed length */
+ return -1;
+ }
+
+ /* Add the item length to the branchlength, and save it for use if the next
+ thing is a quantifier. */
+
+ branchlength += itemlength;
+ lastitemlength = itemlength;
+
+ /* Ensure that the length does not overflow the limit. */
+
+ if (branchlength > LOOKBEHIND_MAX)
+ {
+ *errcodeptr = ERR87;
+ return -1;
+ }
+ }
+
+EXIT:
+*pptrptr = pptr;
+if (branchlength > cb->max_lookbehind) cb->max_lookbehind = branchlength;
+return branchlength;
+
+PARSED_SKIP_FAILED:
+*errcodeptr = ERR90;
+return -1;
+}
+
+
+
+/*************************************************
+* Set lengths in a lookbehind *
+*************************************************/
+
+/* This function is called for each lookbehind, to set the lengths in its
+branches. An error occurs if any branch does not have a fixed length that is
+less than the maximum (65535). On exit, the pointer must be left on the final
+ket.
+
+Arguments:
+ pptrptr pointer to pointer in the parsed pattern
+ errcodeptr pointer to error code
+ lcptr pointer to loop counter
+ recurses chain of recurse_check to catch mutual recursion
+ cb pointer to compile block
+
+Returns: TRUE if all is well
+ FALSE otherwise, with error code and offset set
+*/
+
+static BOOL
+set_lookbehind_lengths(uint32_t **pptrptr, int *errcodeptr, int *lcptr,
+ parsed_recurse_check *recurses, compile_block *cb)
+{
+PCRE2_SIZE offset;
+int branchlength;
+uint32_t *bptr = *pptrptr;
+
+READPLUSOFFSET(offset, bptr); /* Offset for error messages */
+*pptrptr += SIZEOFFSET;
+
+do
+ {
+ *pptrptr += 1;
+ branchlength = get_branchlength(pptrptr, errcodeptr, lcptr, recurses, cb);
+ if (branchlength < 0)
+ {
+ /* The errorcode and offset may already be set from a nested lookbehind. */
+ if (*errcodeptr == 0) *errcodeptr = ERR25;
+ if (cb->erroroffset == PCRE2_UNSET) cb->erroroffset = offset;
+ return FALSE;
+ }
+ *bptr |= branchlength; /* branchlength never more than 65535 */
+ bptr = *pptrptr;
+ }
+while (*bptr == META_ALT);
+
+return TRUE;
+}
+
+
+
+/*************************************************
+* Check parsed pattern lookbehinds *
+*************************************************/
+
+/* This function is called at the end of parsing a pattern if any lookbehinds
+were encountered. It scans the parsed pattern for them, calling
+set_lookbehind_lengths() for each one. At the start, the errorcode is zero and
+the error offset is marked unset. The enables the functions above not to
+override settings from deeper nestings.
+
+Arguments cb points to the compile block
+Returns: 0 on success, or an errorcode (cb->erroroffset will be set)
+*/
+
+static int
+check_lookbehinds(compile_block *cb)
+{
+uint32_t *pptr;
+int errorcode = 0;
+int loopcount = 0;
+
+cb->erroroffset = PCRE2_UNSET;
+
+for (pptr = cb->parsed_pattern; *pptr != META_END; pptr++)
+ {
+ if (*pptr < META_END) continue; /* Literal */
+
+ switch (META_CODE(*pptr))
+ {
+ default:
+ return ERR70; /* Unrecognized meta code */
+
+ case META_ESCAPE:
+ if (*pptr - META_ESCAPE == ESC_P || *pptr - META_ESCAPE == ESC_p)
+ pptr += 1;
+ break;
+
+ case META_ACCEPT:
+ case META_ALT:
+ case META_ASTERISK:
+ case META_ASTERISK_PLUS:
+ case META_ASTERISK_QUERY:
+ case META_ATOMIC:
+ case META_BACKREF:
+ case META_CAPTURE:
+ case META_CIRCUMFLEX:
+ case META_CLASS:
+ case META_CLASS_EMPTY:
+ case META_CLASS_EMPTY_NOT:
+ case META_CLASS_END:
+ case META_CLASS_NOT:
+ case META_COMMIT:
+ case META_COND_ASSERT:
+ case META_DOLLAR:
+ case META_DOT:
+ case META_FAIL:
+ case META_KET:
+ case META_LOOKAHEAD:
+ case META_LOOKAHEADNOT:
+ case META_NOCAPTURE:
+ case META_PLUS:
+ case META_PLUS_PLUS:
+ case META_PLUS_QUERY:
+ case META_PRUNE:
+ case META_QUERY:
+ case META_QUERY_PLUS:
+ case META_QUERY_QUERY:
+ case META_RANGE_ESCAPED:
+ case META_RANGE_LITERAL:
+ case META_SKIP:
+ case META_THEN:
+ break;
+
+ case META_RECURSE:
+ pptr += SIZEOFFSET;
+ break;
+
+ case META_BACKREF_BYNAME:
+ case META_COND_DEFINE:
+ case META_COND_NAME:
+ case META_COND_NUMBER:
+ case META_COND_RNAME:
+ case META_COND_RNUMBER:
+ case META_RECURSE_BYNAME:
+ pptr += 1 + SIZEOFFSET;
+ break;
+
+ case META_CALLOUT_STRING:
+ pptr += 3 + SIZEOFFSET;
+ break;
+
+ case META_BIGVALUE:
+ case META_OPTIONS:
+ case META_POSIX:
+ case META_POSIX_NEG:
+ pptr += 1;
+ break;
+
+ case META_MINMAX:
+ case META_MINMAX_QUERY:
+ case META_MINMAX_PLUS:
+ pptr += 2;
+ break;
+
+ case META_CALLOUT_NUMBER:
+ case META_COND_VERSION:
+ pptr += 3;
+ break;
+
+ case META_MARK:
+ case META_PRUNE_ARG:
+ case META_SKIP_ARG:
+ case META_THEN_ARG:
+ pptr += 1 + pptr[1];
+ break;
+
+ case META_LOOKBEHIND:
+ case META_LOOKBEHINDNOT:
+ if (!set_lookbehind_lengths(&pptr, &errorcode, &loopcount, NULL, cb))
+ return errorcode;
+ break;
+ }
+ }
+
+return 0;
+}
+
+
+
+/*************************************************
+* External function to compile a pattern *
+*************************************************/
+
+/* This function reads a regular expression in the form of a string and returns
+a pointer to a block of store holding a compiled version of the expression.
+
+Arguments:
+ pattern the regular expression
+ patlen the length of the pattern, or PCRE2_ZERO_TERMINATED
+ options option bits
+ errorptr pointer to errorcode
+ erroroffset pointer to error offset
+ ccontext points to a compile context or is NULL
+
+Returns: pointer to compiled data block, or NULL on error,
+ with errorcode and erroroffset set
+*/
+
+PCRE2_EXP_DEFN pcre2_code * PCRE2_CALL_CONVENTION
+pcre2_compile(PCRE2_SPTR pattern, PCRE2_SIZE patlen, uint32_t options,
+ int *errorptr, PCRE2_SIZE *erroroffset, pcre2_compile_context *ccontext)
+{
+BOOL utf; /* Set TRUE for UTF mode */
+BOOL has_lookbehind; /* Set TRUE if a lookbehind is found */
+BOOL zero_terminated; /* Set TRUE for zero-terminated pattern */
+pcre2_real_code *re = NULL; /* What we will return */
+compile_block cb; /* "Static" compile-time data */
+const uint8_t *tables; /* Char tables base pointer */
+
+PCRE2_UCHAR *code; /* Current pointer in compiled code */
+PCRE2_SPTR codestart; /* Start of compiled code */
+PCRE2_SPTR ptr; /* Current pointer in pattern */
+uint32_t *pptr; /* Current pointer in parsed pattern */
+
+PCRE2_SIZE length = 1; /* Allow for final END opcode */
+PCRE2_SIZE usedlength; /* Actual length used */
+PCRE2_SIZE re_blocksize; /* Size of memory block */
+PCRE2_SIZE big32count = 0; /* 32-bit literals >= 0x80000000 */
+PCRE2_SIZE parsed_size_needed; /* Needed for parsed pattern */
+
+int32_t firstcuflags, reqcuflags; /* Type of first/req code unit */
+uint32_t firstcu, reqcu; /* Value of first/req code unit */
+uint32_t setflags = 0; /* NL and BSR set flags */
+
+uint32_t skipatstart; /* When checking (*UTF) etc */
+uint32_t limit_match = UINT32_MAX; /* Unset match limits */
+uint32_t limit_recursion = UINT32_MAX;
+
+int newline = 0; /* Unset; can be set by the pattern */
+int bsr = 0; /* Unset; can be set by the pattern */
+int errorcode = 0; /* Initialize to avoid compiler warn */
+int regexrc; /* Return from compile */
+
+uint32_t i; /* Local loop counter */
+
+/* Comments at the head of this file explain about these variables. */
+
+uint32_t stack_groupinfo[GROUPINFO_DEFAULT_SIZE];
+uint32_t stack_parsed_pattern[PARSED_PATTERN_DEFAULT_SIZE];
+named_group named_groups[NAMED_GROUP_LIST_SIZE];
+
+/* The workspace is used in different ways in the different compiling phases.
+It needs to be 16-bit aligned for the preliminary parsing scan. */
+
+uint32_t c16workspace[C16_WORK_SIZE];
+PCRE2_UCHAR *cworkspace = (PCRE2_UCHAR *)c16workspace;
+
+
+/* -------------- Check arguments and set up the pattern ----------------- */
+
+/* There must be error code and offset pointers. */
+
+if (errorptr == NULL || erroroffset == NULL) return NULL;
+*errorptr = ERR0;
+*erroroffset = 0;
+
+/* There must be a pattern! */
+
+if (pattern == NULL)
+ {
+ *errorptr = ERR16;
+ return NULL;
+ }
+
+/* Check that all undefined public option bits are zero. */
+
+if ((options & ~PUBLIC_COMPILE_OPTIONS) != 0)
+ {
+ *errorptr = ERR17;
+ return NULL;
+ }
+
+/* A NULL compile context means "use a default context" */
+
+if (ccontext == NULL)
+ ccontext = (pcre2_compile_context *)(&PRIV(default_compile_context));
+
+/* A zero-terminated pattern is indicated by the special length value
+PCRE2_ZERO_TERMINATED. Check for an overlong pattern. */
+
+if ((zero_terminated = (patlen == PCRE2_ZERO_TERMINATED)))
+ patlen = PRIV(strlen)(pattern);
+
+if (patlen > ccontext->max_pattern_length)
+ {
+ *errorptr = ERR88;
+ return NULL;
+ }
+
+/* From here on, all returns from this function should end up going via the
+EXIT label. */
+
+
+/* ------------ Initialize the "static" compile data -------------- */
+
+tables = (ccontext->tables != NULL)? ccontext->tables : PRIV(default_tables);
+
+cb.lcc = tables + lcc_offset; /* Individual */
+cb.fcc = tables + fcc_offset; /* character */
+cb.cbits = tables + cbits_offset; /* tables */
+cb.ctypes = tables + ctypes_offset;
+
+cb.assert_depth = 0;
+cb.bracount = 0;
+cb.cx = ccontext;
+cb.dupnames = FALSE;
+cb.end_pattern = pattern + patlen;
+cb.erroroffset = 0;
+cb.external_flags = 0;
+cb.external_options = options;
+cb.groupinfo = stack_groupinfo;
+cb.had_recurse = FALSE;
+cb.lastcapture = 0;
+cb.max_lookbehind = 0;
+cb.name_entry_size = 0;
+cb.name_table = NULL;
+cb.named_groups = named_groups;
+cb.named_group_list_size = NAMED_GROUP_LIST_SIZE;
+cb.names_found = 0;
+cb.open_caps = NULL;
+cb.parens_depth = 0;
+cb.parsed_pattern = stack_parsed_pattern;
+cb.req_varyopt = 0;
+cb.start_code = cworkspace;
+cb.start_pattern = pattern;
+cb.start_workspace = cworkspace;
+cb.workspace_size = COMPILE_WORK_SIZE;
+
+/* Maximum back reference and backref bitmap. The bitmap records up to 31 back
+references to help in deciding whether (.*) can be treated as anchored or not.
+*/
+
+cb.top_backref = 0;
+cb.backref_map = 0;
+
+/* Escape sequences \1 to \9 are always back references, but as they are only
+two characters long, only two elements can be used in the parsed_pattern
+vector. The first contains the reference, and we'd like to use the second to
+record the offset in the pattern, so that forward references to non-existent
+groups can be diagnosed later with an offset. However, on 64-bit systems,
+PCRE2_SIZE won't fit. Instead, we have a vector of offsets for the first
+occurrence of \1 to \9, indexed by the second parsed_pattern value. All other
+references have enough space for the offset to be put into the parsed pattern.
+*/
+
+for (i = 0; i < 10; i++) cb.small_ref_offset[i] = PCRE2_UNSET;
+
+
+/* --------------- Start looking at the pattern --------------- */
+
+/* Check for global one-time option settings at the start of the pattern, and
+remember the offset to the actual regex. With valgrind support, make the
+terminator of a zero-terminated pattern inaccessible. This catches bugs that
+would otherwise only show up for non-zero-terminated patterns. */
+
+#ifdef SUPPORT_VALGRIND
+if (zero_terminated) VALGRIND_MAKE_MEM_NOACCESS(pattern + patlen, CU2BYTES(1));
+#endif
+
+ptr = pattern;
+skipatstart = 0;
+
+while (patlen - skipatstart >= 2 &&
+ ptr[skipatstart] == CHAR_LEFT_PARENTHESIS &&
+ ptr[skipatstart+1] == CHAR_ASTERISK)
+ {
+ for (i = 0; i < sizeof(pso_list)/sizeof(pso); i++)
+ {
+ pso *p = pso_list + i;
+
+ if (patlen - skipatstart - 2 >= p->length &&
+ PRIV(strncmp_c8)(ptr+skipatstart+2, (char *)(p->name), p->length) == 0)
+ {
+ uint32_t c, pp;
+
+ skipatstart += p->length + 2;
+ switch(p->type)
+ {
+ case PSO_OPT:
+ cb.external_options |= p->value;
+ break;
+
+ case PSO_FLG:
+ setflags |= p->value;
+ break;
+
+ case PSO_NL:
+ newline = p->value;
+ setflags |= PCRE2_NL_SET;
+ break;
+
+ case PSO_BSR:
+ bsr = p->value;
+ setflags |= PCRE2_BSR_SET;
+ break;
+
+ case PSO_LIMM:
+ case PSO_LIMR:
+ c = 0;
+ pp = skipatstart;
+ if (!IS_DIGIT(ptr[pp]))
+ {
+ errorcode = ERR60;
+ ptr += pp;
+ goto HAD_EARLY_ERROR;
+ }
+ while (IS_DIGIT(ptr[pp]))
+ {
+ if (c > UINT32_MAX / 10 - 1) break; /* Integer overflow */
+ c = c*10 + (ptr[pp++] - CHAR_0);
+ }
+ if (ptr[pp++] != CHAR_RIGHT_PARENTHESIS)
+ {
+ errorcode = ERR60;
+ ptr += pp;
+ goto HAD_EARLY_ERROR;
+ }
+ if (p->type == PSO_LIMM) limit_match = c;
+ else limit_recursion = c;
+ skipatstart += pp - skipatstart;
+ break;
+ }
+ break; /* Out of the table scan loop */
+ }
+ }
+ if (i >= sizeof(pso_list)/sizeof(pso)) break; /* Out of pso loop */
+ }
+
+/* End of pattern-start options; advance to start of real regex. */
+
+ptr += skipatstart;
+
+/* Can't support UTF or UCP unless PCRE2 has been compiled with UTF support. */
+
+#ifndef SUPPORT_UNICODE
+if ((cb.external_options & (PCRE2_UTF|PCRE2_UCP)) != 0)
+ {
+ errorcode = ERR32;
+ goto HAD_EARLY_ERROR;
+ }
+#endif
+
+/* Check UTF. We have the original options in 'options', with that value as
+modified by (*UTF) etc in cb->external_options. */
+
+utf = (cb.external_options & PCRE2_UTF) != 0;
+if (utf)
+ {
+ if ((options & PCRE2_NEVER_UTF) != 0)
+ {
+ errorcode = ERR74;
+ goto HAD_EARLY_ERROR;
+ }
+ if ((options & PCRE2_NO_UTF_CHECK) == 0 &&
+ (errorcode = PRIV(valid_utf)(pattern, patlen, erroroffset)) != 0)
+ goto HAD_ERROR; /* Offset was set by valid_utf() */
+ }
+
+/* Check UCP lockout. */
+
+if ((cb.external_options & (PCRE2_UCP|PCRE2_NEVER_UCP)) ==
+ (PCRE2_UCP|PCRE2_NEVER_UCP))
+ {
+ errorcode = ERR75;
+ goto HAD_EARLY_ERROR;
+ }
+
+/* Process the BSR setting. */
+
+if (bsr == 0) bsr = ccontext->bsr_convention;
+
+/* Process the newline setting. */
+
+if (newline == 0) newline = ccontext->newline_convention;
+cb.nltype = NLTYPE_FIXED;
+switch(newline)
+ {
+ case PCRE2_NEWLINE_CR:
+ cb.nllen = 1;
+ cb.nl[0] = CHAR_CR;
+ break;
+
+ case PCRE2_NEWLINE_LF:
+ cb.nllen = 1;
+ cb.nl[0] = CHAR_NL;
+ break;
+
+ case PCRE2_NEWLINE_CRLF:
+ cb.nllen = 2;
+ cb.nl[0] = CHAR_CR;
+ cb.nl[1] = CHAR_NL;
+ break;
+
+ case PCRE2_NEWLINE_ANY:
+ cb.nltype = NLTYPE_ANY;
+ break;
+
+ case PCRE2_NEWLINE_ANYCRLF:
+ cb.nltype = NLTYPE_ANYCRLF;
+ break;
+
+ default:
+ errorcode = ERR56;
+ goto HAD_EARLY_ERROR;
+ }
+
+/* Pre-scan the pattern to do two things: (1) Discover the named groups and
+their numerical equivalents, so that this information is always available for
+the remaining processing. (2) At the same time, parse the pattern and put a
+processed version into the parsed_pattern vector. This has escapes interpreted
+and comments removed (amongst other things).
+
+In all but one case, when PCRE2_AUTO_CALLOUT is not set, the number of unsigned
+32-bit ints in the parsed pattern is bounded by the length of the pattern plus
+one (for the terminator). The exceptional case is when running in 32-bit,
+non-UTF mode, when literal characters greater than META_END (0x80000000) have
+to be coded as two units. In this case, therefore, we scan the pattern to check
+for such values. */
+
+#if PCRE2_CODE_UNIT_WIDTH == 32
+if (!utf)
+ {
+ PCRE2_SPTR p;
+ for (p = ptr; p < cb.end_pattern; p++) if (*p >= META_END) big32count++;
+ }
+#endif
+
+/* Ensure that the parsed pattern buffer is big enough. When PCRE2_AUTO_CALLOUT
+is set we have to assume a numerical callout (4 elements) for each character
+plus one at the end. This is overkill, but memory is plentiful these days. For
+many smaller patterns the vector on the stack (which was set up above) can be
+used. */
+
+parsed_size_needed = patlen - skipatstart + big32count;
+if ((options & PCRE2_AUTO_CALLOUT) != 0)
+ parsed_size_needed = (parsed_size_needed + 1) * 5;
+
+if (parsed_size_needed >= PARSED_PATTERN_DEFAULT_SIZE)
+ {
+ uint32_t *heap_parsed_pattern = ccontext->memctl.malloc(
+ (parsed_size_needed + 1) * sizeof(uint32_t), ccontext->memctl.memory_data);
+ if (heap_parsed_pattern == NULL)
+ {
+ *errorptr = ERR21;
+ goto EXIT;
+ }
+ cb.parsed_pattern = heap_parsed_pattern;
+ }
+cb.parsed_pattern_end = cb.parsed_pattern + parsed_size_needed + 1;
+
+/* Do the parsing scan. */
+
+errorcode = parse_regex(ptr, cb.external_options, &has_lookbehind, &cb);
+if (errorcode != 0) goto HAD_CB_ERROR;
+
+/* Workspace is needed to remember information about numbered groups: whether a
+group can match an empty string and what its fixed length is. This is done to
+avoid the possibility of recursive references causing very long compile times
+when checking these features. Unnumbered groups do not have this exposure since
+they cannot be referenced. We use an indexed vector for this purpose. If there
+are sufficiently few groups, the default vector on the stack, as set up above,
+can be used. Otherwise we have to get/free a special vector. The vector must be
+initialized to zero. */
+
+if (cb.bracount >= GROUPINFO_DEFAULT_SIZE)
+ {
+ cb.groupinfo = ccontext->memctl.malloc(
+ (cb.bracount + 1)*sizeof(uint32_t), ccontext->memctl.memory_data);
+ if (cb.groupinfo == NULL)
+ {
+ errorcode = ERR21;
+ cb.erroroffset = 0;
+ goto HAD_CB_ERROR;
+ }
+ }
+memset(cb.groupinfo, 0, (cb.bracount + 1) * sizeof(uint32_t));
+
+/* If there were any lookbehinds, scan the parsed pattern to figure out their
+lengths. */
+
+if (has_lookbehind)
+ {
+ errorcode = check_lookbehinds(&cb);
+ if (errorcode != 0) goto HAD_CB_ERROR;
+ }
+
+/* For debugging, there is a function that shows the parsed data vector. */
+
+#ifdef DEBUG_SHOW_PARSED
+fprintf(stderr, "+++ Pre-scan complete:\n");
+show_parsed(&cb);
+#endif
+
+/* For debugging capturing information this code can be enabled. */
+
+#ifdef DEBUG_SHOW_CAPTURES
+ {
+ named_group *ng = cb.named_groups;
+ fprintf(stderr, "+++Captures: %d\n", cb.bracount);
+ for (i = 0; i < cb.names_found; i++, ng++)
+ {
+ fprintf(stderr, "+++%3d %.*s\n", ng->number, ng->length, ng->name);
+ }
+ }
+#endif
+
+/* Pretend to compile the pattern while actually just accumulating the amount
+of memory required in the 'length' variable. This behaviour is triggered by
+passing a non-NULL final argument to compile_regex(). We pass a block of
+workspace (cworkspace) for it to compile parts of the pattern into; the
+compiled code is discarded when it is no longer needed, so hopefully this
+workspace will never overflow, though there is a test for its doing so.
+
+On error, errorcode will be set non-zero, so we don't need to look at the
+result of the function. The initial options have been put into the cb block,
+but we still have to pass a separate options variable (the first argument)
+because the options may change as the pattern is processed. */
+
+cb.erroroffset = patlen; /* For any subsequent errors that do not set it */
+pptr = cb.parsed_pattern;
+code = cworkspace;
+*code = OP_BRA;
+
+(void)compile_regex(cb.external_options, &code, &pptr, &errorcode, 0, &firstcu,
+ &firstcuflags, &reqcu, &reqcuflags, NULL, &cb, &length);
+
+if (errorcode != 0) goto HAD_CB_ERROR; /* Offset is in cb.erroroffset */
+
+/* This should be caught in compile_regex(), but just in case... */
+
+if (length > MAX_PATTERN_SIZE)
+ {
+ errorcode = ERR20;
+ goto HAD_CB_ERROR;
+ }
+
+/* Compute the size of, and then get and initialize, the data block for storing
+the compiled pattern and names table. Integer overflow should no longer be
+possible because nowadays we limit the maximum value of cb.names_found and
+cb.name_entry_size. */
+
+re_blocksize = sizeof(pcre2_real_code) +
+ CU2BYTES(length + cb.names_found * cb.name_entry_size);
+re = (pcre2_real_code *)
+ ccontext->memctl.malloc(re_blocksize, ccontext->memctl.memory_data);
+if (re == NULL)
+ {
+ errorcode = ERR21;
+ goto HAD_CB_ERROR;
+ }
+
+re->memctl = ccontext->memctl;
+re->tables = tables;
+re->executable_jit = NULL;
+memset(re->start_bitmap, 0, 32 * sizeof(uint8_t));
+re->blocksize = re_blocksize;
+re->magic_number = MAGIC_NUMBER;
+re->compile_options = options;
+re->overall_options = cb.external_options;
+re->flags = PCRE2_CODE_UNIT_WIDTH/8 | cb.external_flags | setflags;
+re->limit_match = limit_match;
+re->limit_recursion = limit_recursion;
+re->first_codeunit = 0;
+re->last_codeunit = 0;
+re->bsr_convention = bsr;
+re->newline_convention = newline;
+re->max_lookbehind = 0;
+re->minlength = 0;
+re->top_bracket = 0;
+re->top_backref = 0;
+re->name_entry_size = cb.name_entry_size;
+re->name_count = cb.names_found;
+
+/* The basic block is immediately followed by the name table, and the compiled
+code follows after that. */
+
+codestart = (PCRE2_SPTR)((uint8_t *)re + sizeof(pcre2_real_code)) +
+ re->name_entry_size * re->name_count;
+
+/* Update the compile data block for the actual compile. The starting points of
+the name/number translation table and of the code are passed around in the
+compile data block. The start/end pattern and initial options are already set
+from the pre-compile phase, as is the name_entry_size field. */
+
+cb.parens_depth = 0;
+cb.assert_depth = 0;
+cb.lastcapture = 0;
+cb.name_table = (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code));
+cb.start_code = codestart;
+cb.req_varyopt = 0;
+cb.had_accept = FALSE;
+cb.had_pruneorskip = FALSE;
+cb.open_caps = NULL;
+
+/* If any named groups were found, create the name/number table from the list
+created in the pre-pass. */
+
+if (cb.names_found > 0)
+ {
+ named_group *ng = cb.named_groups;
+ for (i = 0; i < cb.names_found; i++, ng++)
+ add_name_to_table(&cb, ng->name, ng->length, ng->number, i);
+ }
+
+/* Set up a starting, non-extracting bracket, then compile the expression. On
+error, errorcode will be set non-zero, so we don't need to look at the result
+of the function here. */
+
+pptr = cb.parsed_pattern;
+code = (PCRE2_UCHAR *)codestart;
+*code = OP_BRA;
+regexrc = compile_regex(re->overall_options, &code, &pptr, &errorcode, 0,
+ &firstcu, &firstcuflags, &reqcu, &reqcuflags, NULL, &cb, NULL);
+if (regexrc < 0) re->flags |= PCRE2_MATCH_EMPTY;
+re->top_bracket = cb.bracount;
+re->top_backref = cb.top_backref;
+re->max_lookbehind = cb.max_lookbehind;
+
+if (cb.had_accept)
+ {
+ reqcu = 0; /* Must disable after (*ACCEPT) */
+ reqcuflags = REQ_NONE;
+ }
+
+/* Fill in the final opcode and check for disastrous overflow. If no overflow,
+but the estimated length exceeds the really used length, adjust the value of
+re->blocksize, and if valgrind support is configured, mark the extra allocated
+memory as unaddressable, so that any out-of-bound reads can be detected. */
+
+*code++ = OP_END;
+usedlength = code - codestart;
+if (usedlength > length) errorcode = ERR23; else
+ {
+ re->blocksize -= CU2BYTES(length - usedlength);
+#ifdef SUPPORT_VALGRIND
+ VALGRIND_MAKE_MEM_NOACCESS(code, CU2BYTES(length - usedlength));
+#endif
+ }
+
+/* Scan the pattern for recursion/subroutine calls and convert the group
+numbers into offsets. Maintain a small cache so that repeated groups containing
+recursions are efficiently handled. */
+
+#define RSCAN_CACHE_SIZE 8
+
+if (errorcode == 0 && cb.had_recurse)
+ {
+ PCRE2_UCHAR *rcode;
+ PCRE2_SPTR rgroup;
+ unsigned int ccount = 0;
+ int start = RSCAN_CACHE_SIZE;
+ recurse_cache rc[RSCAN_CACHE_SIZE];
+
+ for (rcode = (PCRE2_UCHAR *)find_recurse(codestart, utf);
+ rcode != NULL;
+ rcode = (PCRE2_UCHAR *)find_recurse(rcode + 1 + LINK_SIZE, utf))
+ {
+ int p, groupnumber;
+
+ groupnumber = (int)GET(rcode, 1);
+ if (groupnumber == 0) rgroup = codestart; else
+ {
+ PCRE2_SPTR search_from = codestart;
+ rgroup = NULL;
+ for (i = 0, p = start; i < ccount; i++, p = (p + 1) & 7)
+ {
+ if (groupnumber == rc[p].groupnumber)
+ {
+ rgroup = rc[p].group;
+ break;
+ }
+
+ /* Group n+1 must always start to the right of group n, so we can save
+ search time below when the new group number is greater than any of the
+ previously found groups. */
+
+ if (groupnumber > rc[p].groupnumber) search_from = rc[p].group;
+ }
+
+ if (rgroup == NULL)
+ {
+ rgroup = PRIV(find_bracket)(search_from, utf, groupnumber);
+ if (rgroup == NULL)
+ {
+ errorcode = ERR53;
+ break;
+ }
+ if (--start < 0) start = RSCAN_CACHE_SIZE - 1;
+ rc[start].groupnumber = groupnumber;
+ rc[start].group = rgroup;
+ if (ccount < RSCAN_CACHE_SIZE) ccount++;
+ }
+ }
+
+ PUT(rcode, 1, rgroup - codestart);
+ }
+ }
+
+/* In rare debugging situations we sometimes need to look at the compiled code
+at this stage. */
+
+#ifdef DEBUG_CALL_PRINTINT
+pcre2_printint(re, stderr, TRUE);
+fprintf(stderr, "Length=%lu Used=%lu\n", length, usedlength);
+#endif
+
+/* Unless disabled, check whether any single character iterators can be
+auto-possessified. The function overwrites the appropriate opcode values, so
+the type of the pointer must be cast. NOTE: the intermediate variable "temp" is
+used in this code because at least one compiler gives a warning about loss of
+"const" attribute if the cast (PCRE2_UCHAR *)codestart is used directly in the
+function call. */
+
+if (errorcode == 0 && (re->overall_options & PCRE2_NO_AUTO_POSSESS) == 0)
+ {
+ PCRE2_UCHAR *temp = (PCRE2_UCHAR *)codestart;
+ if (PRIV(auto_possessify)(temp, utf, &cb) != 0) errorcode = ERR80;
+ }
+
+/* Failed to compile, or error while post-processing. */
+
+if (errorcode != 0) goto HAD_CB_ERROR;
+
+/* Successful compile. If the anchored option was not passed, set it if
+we can determine that the pattern is anchored by virtue of ^ characters or \A
+or anything else, such as starting with non-atomic .* when DOTALL is set and
+there are no occurrences of *PRUNE or *SKIP (though there is an option to
+disable this case). */
+
+if ((re->overall_options & PCRE2_ANCHORED) == 0 &&
+ is_anchored(codestart, 0, &cb, 0, FALSE))
+ re->overall_options |= PCRE2_ANCHORED;
+
+/* If the pattern is still not anchored and we do not have a first code unit,
+see if there is one that is asserted (these are not saved during the compile
+because they can cause conflicts with actual literals that follow). This code
+need not be obeyed if PCRE2_NO_START_OPTIMIZE is set, as the data it would
+create will not be used. */
+
+if ((re->overall_options & (PCRE2_ANCHORED|PCRE2_NO_START_OPTIMIZE)) == 0)
+ {
+ if (firstcuflags < 0)
+ firstcu = find_firstassertedcu(codestart, &firstcuflags, FALSE);
+
+ /* Save the data for a first code unit. */
+
+ if (firstcuflags >= 0)
+ {
+ re->first_codeunit = firstcu;
+ re->flags |= PCRE2_FIRSTSET;
+
+ /* Handle caseless first code units. */
+
+ if ((firstcuflags & REQ_CASELESS) != 0)
+ {
+ if (firstcu < 128 || (!utf && firstcu < 255))
+ {
+ if (cb.fcc[firstcu] != firstcu) re->flags |= PCRE2_FIRSTCASELESS;
+ }
+
+ /* The first code unit is > 128 in UTF mode, or > 255 otherwise. In
+ 8-bit UTF mode, codepoints in the range 128-255 are introductory code
+ points and cannot have another case. In 16-bit and 32-bit modes, we can
+ check wide characters when UTF (and therefore UCP) is supported. */
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 8
+ else if (firstcu <= MAX_UTF_CODE_POINT &&
+ UCD_OTHERCASE(firstcu) != firstcu)
+ re->flags |= PCRE2_FIRSTCASELESS;
+#endif
+ }
+ }
+
+ /* When there is no first code unit, see if we can set the PCRE2_STARTLINE
+ flag. This is helpful for multiline matches when all branches start with ^
+ and also when all branches start with non-atomic .* for non-DOTALL matches
+ when *PRUNE and SKIP are not present. (There is an option that disables this
+ case.) */
+
+ else if (is_startline(codestart, 0, &cb, 0, FALSE))
+ re->flags |= PCRE2_STARTLINE;
+ }
+
+/* Handle the "required code unit", if one is set. In the case of an anchored
+pattern, do this only if it follows a variable length item in the pattern.
+Again, skip this if PCRE2_NO_START_OPTIMIZE is set. */
+
+if (reqcuflags >= 0 &&
+ ((re->overall_options & (PCRE2_ANCHORED|PCRE2_NO_START_OPTIMIZE)) == 0 ||
+ (reqcuflags & REQ_VARY) != 0))
+ {
+ re->last_codeunit = reqcu;
+ re->flags |= PCRE2_LASTSET;
+
+ /* Handle caseless required code units as for first code units (above). */
+
+ if ((reqcuflags & REQ_CASELESS) != 0)
+ {
+ if (reqcu < 128 || (!utf && reqcu < 255))
+ {
+ if (cb.fcc[reqcu] != reqcu) re->flags |= PCRE2_LASTCASELESS;
+ }
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 8
+ else if (reqcu <= MAX_UTF_CODE_POINT && UCD_OTHERCASE(reqcu) != reqcu)
+ re->flags |= PCRE2_LASTCASELESS;
+#endif
+ }
+ }
+
+/* Finally, unless PCRE2_NO_START_OPTIMIZE is set, study the compiled pattern
+to set up information such as a bitmap of starting code units and a minimum
+matching length. */
+
+if ((re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0 &&
+ PRIV(study)(re) != 0)
+ {
+ errorcode = ERR31;
+ goto HAD_CB_ERROR;
+ }
+
+/* Control ends up here in all cases. When running under valgrind, make a
+pattern's terminating zero defined again. If memory was obtained for the parsed
+version of the pattern, free it before returning. Also free the list of named
+groups if a larger one had to be obtained, and likewise the group information
+vector. */
+
+EXIT:
+#ifdef SUPPORT_VALGRIND
+if (zero_terminated) VALGRIND_MAKE_MEM_DEFINED(pattern + patlen, CU2BYTES(1));
+#endif
+if (cb.parsed_pattern != stack_parsed_pattern)
+ ccontext->memctl.free(cb.parsed_pattern, ccontext->memctl.memory_data);
+if (cb.named_group_list_size > NAMED_GROUP_LIST_SIZE)
+ ccontext->memctl.free((void *)cb.named_groups, ccontext->memctl.memory_data);
+if (cb.groupinfo != stack_groupinfo)
+ ccontext->memctl.free((void *)cb.groupinfo, ccontext->memctl.memory_data);
+return re; /* Will be NULL after an error */
+
+/* Errors discovered in parse_regex() set the offset value in the compile
+block. Errors discovered before it is called must compute it from the ptr
+value. After parse_regex() is called, the offset in the compile block is set to
+the end of the pattern, but certain errors in compile_regex() may reset it if
+an offset is available in the parsed pattern. */
+
+HAD_CB_ERROR:
+ptr = pattern + cb.erroroffset;
+
+HAD_EARLY_ERROR:
+*erroroffset = ptr - pattern;
+
+HAD_ERROR:
+*errorptr = errorcode;
+pcre2_code_free(re);
+re = NULL;
+goto EXIT;
+}
+
+/* End of pcre2_compile.c */
diff --git a/thirdparty/pcre2/src/pcre2_config.c b/thirdparty/pcre2/src/pcre2_config.c
new file mode 100644
index 0000000000..e99272f577
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_config.c
@@ -0,0 +1,218 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* Save the configured link size, which is in bytes. In 16-bit and 32-bit modes
+its value gets changed by pcre2_internal.h to be in code units. */
+
+static int configured_link_size = LINK_SIZE;
+
+#include "pcre2_internal.h"
+
+/* These macros are the standard way of turning unquoted text into C strings.
+They allow macros like PCRE2_MAJOR to be defined without quotes, which is
+convenient for user programs that want to test their values. */
+
+#define STRING(a) # a
+#define XSTRING(s) STRING(s)
+
+
+/*************************************************
+* Return info about what features are configured *
+*************************************************/
+
+/* If where is NULL, the length of memory required is returned.
+
+Arguments:
+ what what information is required
+ where where to put the information
+
+Returns: 0 if a numerical value is returned
+ >= 0 if a string value
+ PCRE2_ERROR_BADOPTION if "where" not recognized
+ or JIT target requested when JIT not enabled
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_config(uint32_t what, void *where)
+{
+if (where == NULL) /* Requests a length */
+ {
+ switch(what)
+ {
+ default:
+ return PCRE2_ERROR_BADOPTION;
+
+ case PCRE2_CONFIG_BSR:
+ case PCRE2_CONFIG_JIT:
+ case PCRE2_CONFIG_LINKSIZE:
+ case PCRE2_CONFIG_MATCHLIMIT:
+ case PCRE2_CONFIG_NEWLINE:
+ case PCRE2_CONFIG_PARENSLIMIT:
+ case PCRE2_CONFIG_RECURSIONLIMIT:
+ case PCRE2_CONFIG_STACKRECURSE:
+ case PCRE2_CONFIG_UNICODE:
+ return sizeof(uint32_t);
+
+ /* These are handled below */
+
+ case PCRE2_CONFIG_JITTARGET:
+ case PCRE2_CONFIG_UNICODE_VERSION:
+ case PCRE2_CONFIG_VERSION:
+ break;
+ }
+ }
+
+switch (what)
+ {
+ default:
+ return PCRE2_ERROR_BADOPTION;
+
+ case PCRE2_CONFIG_BSR:
+#ifdef BSR_ANYCRLF
+ *((uint32_t *)where) = PCRE2_BSR_ANYCRLF;
+#else
+ *((uint32_t *)where) = PCRE2_BSR_UNICODE;
+#endif
+ break;
+
+ case PCRE2_CONFIG_JIT:
+#ifdef SUPPORT_JIT
+ *((uint32_t *)where) = 1;
+#else
+ *((uint32_t *)where) = 0;
+#endif
+ break;
+
+ case PCRE2_CONFIG_JITTARGET:
+#ifdef SUPPORT_JIT
+ {
+ const char *v = PRIV(jit_get_target)();
+ return (int)(1 + ((where == NULL)?
+ strlen(v) : PRIV(strcpy_c8)((PCRE2_UCHAR *)where, v)));
+ }
+#else
+ return PCRE2_ERROR_BADOPTION;
+#endif
+
+ case PCRE2_CONFIG_LINKSIZE:
+ *((uint32_t *)where) = (uint32_t)configured_link_size;
+ break;
+
+ case PCRE2_CONFIG_MATCHLIMIT:
+ *((uint32_t *)where) = MATCH_LIMIT;
+ break;
+
+ case PCRE2_CONFIG_NEWLINE:
+ *((uint32_t *)where) = NEWLINE_DEFAULT;
+ break;
+
+ case PCRE2_CONFIG_PARENSLIMIT:
+ *((uint32_t *)where) = PARENS_NEST_LIMIT;
+ break;
+
+ case PCRE2_CONFIG_RECURSIONLIMIT:
+ *((uint32_t *)where) = MATCH_LIMIT_RECURSION;
+ break;
+
+ case PCRE2_CONFIG_STACKRECURSE:
+#ifdef HEAP_MATCH_RECURSE
+ *((uint32_t *)where) = 0;
+#else
+ *((uint32_t *)where) = 1;
+#endif
+ break;
+
+ case PCRE2_CONFIG_UNICODE_VERSION:
+ {
+#if defined SUPPORT_UNICODE
+ const char *v = PRIV(unicode_version);
+#else
+ const char *v = "Unicode not supported";
+#endif
+ return (int)(1 + ((where == NULL)?
+ strlen(v) : PRIV(strcpy_c8)((PCRE2_UCHAR *)where, v)));
+ }
+ break;
+
+ case PCRE2_CONFIG_UNICODE:
+#if defined SUPPORT_UNICODE
+ *((uint32_t *)where) = 1;
+#else
+ *((uint32_t *)where) = 0;
+#endif
+ break;
+
+ /* The hackery in setting "v" below is to cope with the case when
+ PCRE2_PRERELEASE is set to an empty string (which it is for real releases).
+ If the second alternative is used in this case, it does not leave a space
+ before the date. On the other hand, if all four macros are put into a single
+ XSTRING when PCRE2_PRERELEASE is not empty, an unwanted space is inserted.
+ There are problems using an "obvious" approach like this:
+
+ XSTRING(PCRE2_MAJOR) "." XSTRING(PCRE_MINOR)
+ XSTRING(PCRE2_PRERELEASE) " " XSTRING(PCRE_DATE)
+
+ because, when PCRE2_PRERELEASE is empty, this leads to an attempted expansion
+ of STRING(). The C standard states: "If (before argument substitution) any
+ argument consists of no preprocessing tokens, the behavior is undefined." It
+ turns out the gcc treats this case as a single empty string - which is what
+ we really want - but Visual C grumbles about the lack of an argument for the
+ macro. Unfortunately, both are within their rights. As there seems to be no
+ way to test for a macro's value being empty at compile time, we have to
+ resort to a runtime test. */
+
+ case PCRE2_CONFIG_VERSION:
+ {
+ const char *v = (XSTRING(Z PCRE2_PRERELEASE)[1] == 0)?
+ XSTRING(PCRE2_MAJOR.PCRE2_MINOR PCRE2_DATE) :
+ XSTRING(PCRE2_MAJOR.PCRE2_MINOR) XSTRING(PCRE2_PRERELEASE PCRE2_DATE);
+ return (int)(1 + ((where == NULL)?
+ strlen(v) : PRIV(strcpy_c8)((PCRE2_UCHAR *)where, v)));
+ }
+ }
+
+return 0;
+}
+
+/* End of pcre2_config.c */
diff --git a/thirdparty/pcre2/src/pcre2_context.c b/thirdparty/pcre2/src/pcre2_context.c
new file mode 100644
index 0000000000..ae050fe92c
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_context.c
@@ -0,0 +1,391 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre2_internal.h"
+
+
+
+/*************************************************
+* Default malloc/free functions *
+*************************************************/
+
+/* Ignore the "user data" argument in each case. */
+
+static void *default_malloc(size_t size, void *data)
+{
+(void)data;
+return malloc(size);
+}
+
+
+static void default_free(void *block, void *data)
+{
+(void)data;
+free(block);
+}
+
+
+
+/*************************************************
+* Get a block and save memory control *
+*************************************************/
+
+/* This internal function is called to get a block of memory in which the
+memory control data is to be stored at the start for future use.
+
+Arguments:
+ size amount of memory required
+ memctl pointer to a memctl block or NULL
+
+Returns: pointer to memory or NULL on failure
+*/
+
+extern void *
+PRIV(memctl_malloc)(size_t size, pcre2_memctl *memctl)
+{
+pcre2_memctl *newmemctl;
+void *yield = (memctl == NULL)? malloc(size) :
+ memctl->malloc(size, memctl->memory_data);
+if (yield == NULL) return NULL;
+newmemctl = (pcre2_memctl *)yield;
+if (memctl == NULL)
+ {
+ newmemctl->malloc = default_malloc;
+ newmemctl->free = default_free;
+ newmemctl->memory_data = NULL;
+ }
+else *newmemctl = *memctl;
+return yield;
+}
+
+
+
+/*************************************************
+* Create and initialize contexts *
+*************************************************/
+
+/* Initializing for compile and match contexts is done in separate, private
+functions so that these can be called from functions such as pcre2_compile()
+when an external context is not supplied. The initializing functions have an
+option to set up default memory management. */
+
+PCRE2_EXP_DEFN pcre2_general_context * PCRE2_CALL_CONVENTION
+pcre2_general_context_create(void *(*private_malloc)(size_t, void *),
+ void (*private_free)(void *, void *), void *memory_data)
+{
+pcre2_general_context *gcontext;
+if (private_malloc == NULL) private_malloc = default_malloc;
+if (private_free == NULL) private_free = default_free;
+gcontext = private_malloc(sizeof(pcre2_real_general_context), memory_data);
+if (gcontext == NULL) return NULL;
+gcontext->memctl.malloc = private_malloc;
+gcontext->memctl.free = private_free;
+gcontext->memctl.memory_data = memory_data;
+return gcontext;
+}
+
+
+/* A default compile context is set up to save having to initialize at run time
+when no context is supplied to the compile function. */
+
+const pcre2_compile_context PRIV(default_compile_context) = {
+ { default_malloc, default_free, NULL }, /* Default memory handling */
+ NULL, /* Stack guard */
+ NULL, /* Stack guard data */
+ PRIV(default_tables), /* Character tables */
+ PCRE2_UNSET, /* Max pattern length */
+ BSR_DEFAULT, /* Backslash R default */
+ NEWLINE_DEFAULT, /* Newline convention */
+ PARENS_NEST_LIMIT }; /* As it says */
+
+/* The create function copies the default into the new memory, but must
+override the default memory handling functions if a gcontext was provided. */
+
+PCRE2_EXP_DEFN pcre2_compile_context * PCRE2_CALL_CONVENTION
+pcre2_compile_context_create(pcre2_general_context *gcontext)
+{
+pcre2_compile_context *ccontext = PRIV(memctl_malloc)(
+ sizeof(pcre2_real_compile_context), (pcre2_memctl *)gcontext);
+if (ccontext == NULL) return NULL;
+*ccontext = PRIV(default_compile_context);
+if (gcontext != NULL)
+ *((pcre2_memctl *)ccontext) = *((pcre2_memctl *)gcontext);
+return ccontext;
+}
+
+
+/* A default match context is set up to save having to initialize at run time
+when no context is supplied to a match function. */
+
+const pcre2_match_context PRIV(default_match_context) = {
+ { default_malloc, default_free, NULL },
+#ifdef HEAP_MATCH_RECURSE
+ { default_malloc, default_free, NULL },
+#endif
+#ifdef SUPPORT_JIT
+ NULL,
+ NULL,
+#endif
+ NULL,
+ NULL,
+ PCRE2_UNSET, /* Offset limit */
+ MATCH_LIMIT,
+ MATCH_LIMIT_RECURSION };
+
+/* The create function copies the default into the new memory, but must
+override the default memory handling functions if a gcontext was provided. */
+
+PCRE2_EXP_DEFN pcre2_match_context * PCRE2_CALL_CONVENTION
+pcre2_match_context_create(pcre2_general_context *gcontext)
+{
+pcre2_match_context *mcontext = PRIV(memctl_malloc)(
+ sizeof(pcre2_real_match_context), (pcre2_memctl *)gcontext);
+if (mcontext == NULL) return NULL;
+*mcontext = PRIV(default_match_context);
+if (gcontext != NULL)
+ *((pcre2_memctl *)mcontext) = *((pcre2_memctl *)gcontext);
+return mcontext;
+}
+
+
+/*************************************************
+* Context copy functions *
+*************************************************/
+
+PCRE2_EXP_DEFN pcre2_general_context * PCRE2_CALL_CONVENTION
+pcre2_general_context_copy(pcre2_general_context *gcontext)
+{
+pcre2_general_context *new =
+ gcontext->memctl.malloc(sizeof(pcre2_real_general_context),
+ gcontext->memctl.memory_data);
+if (new == NULL) return NULL;
+memcpy(new, gcontext, sizeof(pcre2_real_general_context));
+return new;
+}
+
+
+PCRE2_EXP_DEFN pcre2_compile_context * PCRE2_CALL_CONVENTION
+pcre2_compile_context_copy(pcre2_compile_context *ccontext)
+{
+pcre2_compile_context *new =
+ ccontext->memctl.malloc(sizeof(pcre2_real_compile_context),
+ ccontext->memctl.memory_data);
+if (new == NULL) return NULL;
+memcpy(new, ccontext, sizeof(pcre2_real_compile_context));
+return new;
+}
+
+
+PCRE2_EXP_DEFN pcre2_match_context * PCRE2_CALL_CONVENTION
+pcre2_match_context_copy(pcre2_match_context *mcontext)
+{
+pcre2_match_context *new =
+ mcontext->memctl.malloc(sizeof(pcre2_real_match_context),
+ mcontext->memctl.memory_data);
+if (new == NULL) return NULL;
+memcpy(new, mcontext, sizeof(pcre2_real_match_context));
+return new;
+}
+
+
+
+/*************************************************
+* Context free functions *
+*************************************************/
+
+
+PCRE2_EXP_DEFN void PCRE2_CALL_CONVENTION
+pcre2_general_context_free(pcre2_general_context *gcontext)
+{
+if (gcontext != NULL)
+ gcontext->memctl.free(gcontext, gcontext->memctl.memory_data);
+}
+
+
+PCRE2_EXP_DEFN void PCRE2_CALL_CONVENTION
+pcre2_compile_context_free(pcre2_compile_context *ccontext)
+{
+if (ccontext != NULL)
+ ccontext->memctl.free(ccontext, ccontext->memctl.memory_data);
+}
+
+
+PCRE2_EXP_DEFN void PCRE2_CALL_CONVENTION
+pcre2_match_context_free(pcre2_match_context *mcontext)
+{
+if (mcontext != NULL)
+ mcontext->memctl.free(mcontext, mcontext->memctl.memory_data);
+}
+
+
+
+
+/*************************************************
+* Set values in contexts *
+*************************************************/
+
+/* All these functions return 0 for success or PCRE2_ERROR_BADDATA if invalid
+data is given. Only some of the functions are able to test the validity of the
+data. */
+
+
+/* ------------ Compile contexts ------------ */
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_set_character_tables(pcre2_compile_context *ccontext,
+ const unsigned char *tables)
+{
+ccontext->tables = tables;
+return 0;
+}
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_set_bsr(pcre2_compile_context *ccontext, uint32_t value)
+{
+switch(value)
+ {
+ case PCRE2_BSR_ANYCRLF:
+ case PCRE2_BSR_UNICODE:
+ ccontext->bsr_convention = value;
+ return 0;
+
+ default:
+ return PCRE2_ERROR_BADDATA;
+ }
+}
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_set_max_pattern_length(pcre2_compile_context *ccontext, PCRE2_SIZE length)
+{
+ccontext->max_pattern_length = length;
+return 0;
+}
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_set_newline(pcre2_compile_context *ccontext, uint32_t newline)
+{
+switch(newline)
+ {
+ case PCRE2_NEWLINE_CR:
+ case PCRE2_NEWLINE_LF:
+ case PCRE2_NEWLINE_CRLF:
+ case PCRE2_NEWLINE_ANY:
+ case PCRE2_NEWLINE_ANYCRLF:
+ ccontext->newline_convention = newline;
+ return 0;
+
+ default:
+ return PCRE2_ERROR_BADDATA;
+ }
+}
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_set_parens_nest_limit(pcre2_compile_context *ccontext, uint32_t limit)
+{
+ccontext->parens_nest_limit = limit;
+return 0;
+}
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_set_compile_recursion_guard(pcre2_compile_context *ccontext,
+ int (*guard)(uint32_t, void *), void *user_data)
+{
+ccontext->stack_guard = guard;
+ccontext->stack_guard_data = user_data;
+return 0;
+}
+
+
+/* ------------ Match contexts ------------ */
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_set_callout(pcre2_match_context *mcontext,
+ int (*callout)(pcre2_callout_block *, void *), void *callout_data)
+{
+mcontext->callout = callout;
+mcontext->callout_data = callout_data;
+return 0;
+}
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_set_match_limit(pcre2_match_context *mcontext, uint32_t limit)
+{
+mcontext->match_limit = limit;
+return 0;
+}
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_set_offset_limit(pcre2_match_context *mcontext, PCRE2_SIZE limit)
+{
+mcontext->offset_limit = limit;
+return 0;
+}
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_set_recursion_limit(pcre2_match_context *mcontext, uint32_t limit)
+{
+mcontext->recursion_limit = limit;
+return 0;
+}
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_set_recursion_memory_management(pcre2_match_context *mcontext,
+ void *(*mymalloc)(size_t, void *), void (*myfree)(void *, void *),
+ void *mydata)
+{
+#ifdef HEAP_MATCH_RECURSE
+mcontext->stack_memctl.malloc = mymalloc;
+mcontext->stack_memctl.free = myfree;
+mcontext->stack_memctl.memory_data = mydata;
+#else
+(void)mcontext;
+(void)mymalloc;
+(void)myfree;
+(void)mydata;
+#endif
+return 0;
+}
+
+/* End of pcre2_context.c */
diff --git a/thirdparty/pcre2/src/pcre2_dfa_match.c b/thirdparty/pcre2/src/pcre2_dfa_match.c
new file mode 100644
index 0000000000..c909d61285
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_dfa_match.c
@@ -0,0 +1,3628 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+/* This module contains the external function pcre2_dfa_match(), which is an
+alternative matching function that uses a sort of DFA algorithm (not a true
+FSM). This is NOT Perl-compatible, but it has advantages in certain
+applications. */
+
+
+/* NOTE ABOUT PERFORMANCE: A user of this function sent some code that improved
+the performance of his patterns greatly. I could not use it as it stood, as it
+was not thread safe, and made assumptions about pattern sizes. Also, it caused
+test 7 to loop, and test 9 to crash with a segfault.
+
+The issue is the check for duplicate states, which is done by a simple linear
+search up the state list. (Grep for "duplicate" below to find the code.) For
+many patterns, there will never be many states active at one time, so a simple
+linear search is fine. In patterns that have many active states, it might be a
+bottleneck. The suggested code used an indexing scheme to remember which states
+had previously been used for each character, and avoided the linear search when
+it knew there was no chance of a duplicate. This was implemented when adding
+states to the state lists.
+
+I wrote some thread-safe, not-limited code to try something similar at the time
+of checking for duplicates (instead of when adding states), using index vectors
+on the stack. It did give a 13% improvement with one specially constructed
+pattern for certain subject strings, but on other strings and on many of the
+simpler patterns in the test suite it did worse. The major problem, I think,
+was the extra time to initialize the index. This had to be done for each call
+of internal_dfa_match(). (The supplied patch used a static vector, initialized
+only once - I suspect this was the cause of the problems with the tests.)
+
+Overall, I concluded that the gains in some cases did not outweigh the losses
+in others, so I abandoned this code. */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define NLBLOCK mb /* Block containing newline information */
+#define PSSTART start_subject /* Field containing processed string start */
+#define PSEND end_subject /* Field containing processed string end */
+
+#include "pcre2_internal.h"
+
+#define PUBLIC_DFA_MATCH_OPTIONS \
+ (PCRE2_ANCHORED|PCRE2_NOTBOL|PCRE2_NOTEOL|PCRE2_NOTEMPTY| \
+ PCRE2_NOTEMPTY_ATSTART|PCRE2_NO_UTF_CHECK|PCRE2_PARTIAL_HARD| \
+ PCRE2_PARTIAL_SOFT|PCRE2_DFA_SHORTEST|PCRE2_DFA_RESTART)
+
+
+/*************************************************
+* Code parameters and static tables *
+*************************************************/
+
+/* These are offsets that are used to turn the OP_TYPESTAR and friends opcodes
+into others, under special conditions. A gap of 20 between the blocks should be
+enough. The resulting opcodes don't have to be less than 256 because they are
+never stored, so we push them well clear of the normal opcodes. */
+
+#define OP_PROP_EXTRA 300
+#define OP_EXTUNI_EXTRA 320
+#define OP_ANYNL_EXTRA 340
+#define OP_HSPACE_EXTRA 360
+#define OP_VSPACE_EXTRA 380
+
+
+/* This table identifies those opcodes that are followed immediately by a
+character that is to be tested in some way. This makes it possible to
+centralize the loading of these characters. In the case of Type * etc, the
+"character" is the opcode for \D, \d, \S, \s, \W, or \w, which will always be a
+small value. Non-zero values in the table are the offsets from the opcode where
+the character is to be found. ***NOTE*** If the start of this table is
+modified, the three tables that follow must also be modified. */
+
+static const uint8_t coptable[] = {
+ 0, /* End */
+ 0, 0, 0, 0, 0, /* \A, \G, \K, \B, \b */
+ 0, 0, 0, 0, 0, 0, /* \D, \d, \S, \s, \W, \w */
+ 0, 0, 0, /* Any, AllAny, Anybyte */
+ 0, 0, /* \P, \p */
+ 0, 0, 0, 0, 0, /* \R, \H, \h, \V, \v */
+ 0, /* \X */
+ 0, 0, 0, 0, 0, 0, /* \Z, \z, $, $M, ^, ^M */
+ 1, /* Char */
+ 1, /* Chari */
+ 1, /* not */
+ 1, /* noti */
+ /* Positive single-char repeats */
+ 1, 1, 1, 1, 1, 1, /* *, *?, +, +?, ?, ?? */
+ 1+IMM2_SIZE, 1+IMM2_SIZE, /* upto, minupto */
+ 1+IMM2_SIZE, /* exact */
+ 1, 1, 1, 1+IMM2_SIZE, /* *+, ++, ?+, upto+ */
+ 1, 1, 1, 1, 1, 1, /* *I, *?I, +I, +?I, ?I, ??I */
+ 1+IMM2_SIZE, 1+IMM2_SIZE, /* upto I, minupto I */
+ 1+IMM2_SIZE, /* exact I */
+ 1, 1, 1, 1+IMM2_SIZE, /* *+I, ++I, ?+I, upto+I */
+ /* Negative single-char repeats - only for chars < 256 */
+ 1, 1, 1, 1, 1, 1, /* NOT *, *?, +, +?, ?, ?? */
+ 1+IMM2_SIZE, 1+IMM2_SIZE, /* NOT upto, minupto */
+ 1+IMM2_SIZE, /* NOT exact */
+ 1, 1, 1, 1+IMM2_SIZE, /* NOT *+, ++, ?+, upto+ */
+ 1, 1, 1, 1, 1, 1, /* NOT *I, *?I, +I, +?I, ?I, ??I */
+ 1+IMM2_SIZE, 1+IMM2_SIZE, /* NOT upto I, minupto I */
+ 1+IMM2_SIZE, /* NOT exact I */
+ 1, 1, 1, 1+IMM2_SIZE, /* NOT *+I, ++I, ?+I, upto+I */
+ /* Positive type repeats */
+ 1, 1, 1, 1, 1, 1, /* Type *, *?, +, +?, ?, ?? */
+ 1+IMM2_SIZE, 1+IMM2_SIZE, /* Type upto, minupto */
+ 1+IMM2_SIZE, /* Type exact */
+ 1, 1, 1, 1+IMM2_SIZE, /* Type *+, ++, ?+, upto+ */
+ /* Character class & ref repeats */
+ 0, 0, 0, 0, 0, 0, /* *, *?, +, +?, ?, ?? */
+ 0, 0, /* CRRANGE, CRMINRANGE */
+ 0, 0, 0, 0, /* Possessive *+, ++, ?+, CRPOSRANGE */
+ 0, /* CLASS */
+ 0, /* NCLASS */
+ 0, /* XCLASS - variable length */
+ 0, /* REF */
+ 0, /* REFI */
+ 0, /* DNREF */
+ 0, /* DNREFI */
+ 0, /* RECURSE */
+ 0, /* CALLOUT */
+ 0, /* CALLOUT_STR */
+ 0, /* Alt */
+ 0, /* Ket */
+ 0, /* KetRmax */
+ 0, /* KetRmin */
+ 0, /* KetRpos */
+ 0, /* Reverse */
+ 0, /* Assert */
+ 0, /* Assert not */
+ 0, /* Assert behind */
+ 0, /* Assert behind not */
+ 0, 0, /* ONCE, ONCE_NC */
+ 0, 0, 0, 0, 0, /* BRA, BRAPOS, CBRA, CBRAPOS, COND */
+ 0, 0, 0, 0, 0, /* SBRA, SBRAPOS, SCBRA, SCBRAPOS, SCOND */
+ 0, 0, /* CREF, DNCREF */
+ 0, 0, /* RREF, DNRREF */
+ 0, 0, /* FALSE, TRUE */
+ 0, 0, 0, /* BRAZERO, BRAMINZERO, BRAPOSZERO */
+ 0, 0, 0, /* MARK, PRUNE, PRUNE_ARG */
+ 0, 0, 0, 0, /* SKIP, SKIP_ARG, THEN, THEN_ARG */
+ 0, 0, 0, 0, /* COMMIT, FAIL, ACCEPT, ASSERT_ACCEPT */
+ 0, 0, 0 /* CLOSE, SKIPZERO, DEFINE */
+};
+
+/* This table identifies those opcodes that inspect a character. It is used to
+remember the fact that a character could have been inspected when the end of
+the subject is reached. ***NOTE*** If the start of this table is modified, the
+two tables that follow must also be modified. */
+
+static const uint8_t poptable[] = {
+ 0, /* End */
+ 0, 0, 0, 1, 1, /* \A, \G, \K, \B, \b */
+ 1, 1, 1, 1, 1, 1, /* \D, \d, \S, \s, \W, \w */
+ 1, 1, 1, /* Any, AllAny, Anybyte */
+ 1, 1, /* \P, \p */
+ 1, 1, 1, 1, 1, /* \R, \H, \h, \V, \v */
+ 1, /* \X */
+ 0, 0, 0, 0, 0, 0, /* \Z, \z, $, $M, ^, ^M */
+ 1, /* Char */
+ 1, /* Chari */
+ 1, /* not */
+ 1, /* noti */
+ /* Positive single-char repeats */
+ 1, 1, 1, 1, 1, 1, /* *, *?, +, +?, ?, ?? */
+ 1, 1, 1, /* upto, minupto, exact */
+ 1, 1, 1, 1, /* *+, ++, ?+, upto+ */
+ 1, 1, 1, 1, 1, 1, /* *I, *?I, +I, +?I, ?I, ??I */
+ 1, 1, 1, /* upto I, minupto I, exact I */
+ 1, 1, 1, 1, /* *+I, ++I, ?+I, upto+I */
+ /* Negative single-char repeats - only for chars < 256 */
+ 1, 1, 1, 1, 1, 1, /* NOT *, *?, +, +?, ?, ?? */
+ 1, 1, 1, /* NOT upto, minupto, exact */
+ 1, 1, 1, 1, /* NOT *+, ++, ?+, upto+ */
+ 1, 1, 1, 1, 1, 1, /* NOT *I, *?I, +I, +?I, ?I, ??I */
+ 1, 1, 1, /* NOT upto I, minupto I, exact I */
+ 1, 1, 1, 1, /* NOT *+I, ++I, ?+I, upto+I */
+ /* Positive type repeats */
+ 1, 1, 1, 1, 1, 1, /* Type *, *?, +, +?, ?, ?? */
+ 1, 1, 1, /* Type upto, minupto, exact */
+ 1, 1, 1, 1, /* Type *+, ++, ?+, upto+ */
+ /* Character class & ref repeats */
+ 1, 1, 1, 1, 1, 1, /* *, *?, +, +?, ?, ?? */
+ 1, 1, /* CRRANGE, CRMINRANGE */
+ 1, 1, 1, 1, /* Possessive *+, ++, ?+, CRPOSRANGE */
+ 1, /* CLASS */
+ 1, /* NCLASS */
+ 1, /* XCLASS - variable length */
+ 0, /* REF */
+ 0, /* REFI */
+ 0, /* DNREF */
+ 0, /* DNREFI */
+ 0, /* RECURSE */
+ 0, /* CALLOUT */
+ 0, /* CALLOUT_STR */
+ 0, /* Alt */
+ 0, /* Ket */
+ 0, /* KetRmax */
+ 0, /* KetRmin */
+ 0, /* KetRpos */
+ 0, /* Reverse */
+ 0, /* Assert */
+ 0, /* Assert not */
+ 0, /* Assert behind */
+ 0, /* Assert behind not */
+ 0, 0, /* ONCE, ONCE_NC */
+ 0, 0, 0, 0, 0, /* BRA, BRAPOS, CBRA, CBRAPOS, COND */
+ 0, 0, 0, 0, 0, /* SBRA, SBRAPOS, SCBRA, SCBRAPOS, SCOND */
+ 0, 0, /* CREF, DNCREF */
+ 0, 0, /* RREF, DNRREF */
+ 0, 0, /* FALSE, TRUE */
+ 0, 0, 0, /* BRAZERO, BRAMINZERO, BRAPOSZERO */
+ 0, 0, 0, /* MARK, PRUNE, PRUNE_ARG */
+ 0, 0, 0, 0, /* SKIP, SKIP_ARG, THEN, THEN_ARG */
+ 0, 0, 0, 0, /* COMMIT, FAIL, ACCEPT, ASSERT_ACCEPT */
+ 0, 0, 0 /* CLOSE, SKIPZERO, DEFINE */
+};
+
+/* These 2 tables allow for compact code for testing for \D, \d, \S, \s, \W,
+and \w */
+
+static const uint8_t toptable1[] = {
+ 0, 0, 0, 0, 0, 0,
+ ctype_digit, ctype_digit,
+ ctype_space, ctype_space,
+ ctype_word, ctype_word,
+ 0, 0 /* OP_ANY, OP_ALLANY */
+};
+
+static const uint8_t toptable2[] = {
+ 0, 0, 0, 0, 0, 0,
+ ctype_digit, 0,
+ ctype_space, 0,
+ ctype_word, 0,
+ 1, 1 /* OP_ANY, OP_ALLANY */
+};
+
+
+/* Structure for holding data about a particular state, which is in effect the
+current data for an active path through the match tree. It must consist
+entirely of ints because the working vector we are passed, and which we put
+these structures in, is a vector of ints. */
+
+typedef struct stateblock {
+ int offset; /* Offset to opcode (-ve has meaning) */
+ int count; /* Count for repeats */
+ int data; /* Some use extra data */
+} stateblock;
+
+#define INTS_PER_STATEBLOCK (int)(sizeof(stateblock)/sizeof(int))
+
+
+
+/*************************************************
+* Match a Regular Expression - DFA engine *
+*************************************************/
+
+/* This internal function applies a compiled pattern to a subject string,
+starting at a given point, using a DFA engine. This function is called from the
+external one, possibly multiple times if the pattern is not anchored. The
+function calls itself recursively for some kinds of subpattern.
+
+Arguments:
+ mb the match_data block with fixed information
+ this_start_code the opening bracket of this subexpression's code
+ current_subject where we currently are in the subject string
+ start_offset start offset in the subject string
+ offsets vector to contain the matching string offsets
+ offsetcount size of same
+ workspace vector of workspace
+ wscount size of same
+ rlevel function call recursion level
+
+Returns: > 0 => number of match offset pairs placed in offsets
+ = 0 => offsets overflowed; longest matches are present
+ -1 => failed to match
+ < -1 => some kind of unexpected problem
+
+The following macros are used for adding states to the two state vectors (one
+for the current character, one for the following character). */
+
+#define ADD_ACTIVE(x,y) \
+ if (active_count++ < wscount) \
+ { \
+ next_active_state->offset = (x); \
+ next_active_state->count = (y); \
+ next_active_state++; \
+ } \
+ else return PCRE2_ERROR_DFA_WSSIZE
+
+#define ADD_ACTIVE_DATA(x,y,z) \
+ if (active_count++ < wscount) \
+ { \
+ next_active_state->offset = (x); \
+ next_active_state->count = (y); \
+ next_active_state->data = (z); \
+ next_active_state++; \
+ } \
+ else return PCRE2_ERROR_DFA_WSSIZE
+
+#define ADD_NEW(x,y) \
+ if (new_count++ < wscount) \
+ { \
+ next_new_state->offset = (x); \
+ next_new_state->count = (y); \
+ next_new_state++; \
+ } \
+ else return PCRE2_ERROR_DFA_WSSIZE
+
+#define ADD_NEW_DATA(x,y,z) \
+ if (new_count++ < wscount) \
+ { \
+ next_new_state->offset = (x); \
+ next_new_state->count = (y); \
+ next_new_state->data = (z); \
+ next_new_state++; \
+ } \
+ else return PCRE2_ERROR_DFA_WSSIZE
+
+/* And now, here is the code */
+
+static int
+internal_dfa_match(
+ dfa_match_block *mb,
+ PCRE2_SPTR this_start_code,
+ PCRE2_SPTR current_subject,
+ PCRE2_SIZE start_offset,
+ PCRE2_SIZE *offsets,
+ uint32_t offsetcount,
+ int *workspace,
+ int wscount,
+ uint32_t rlevel)
+{
+stateblock *active_states, *new_states, *temp_states;
+stateblock *next_active_state, *next_new_state;
+
+const uint8_t *ctypes, *lcc, *fcc;
+PCRE2_SPTR ptr;
+PCRE2_SPTR end_code;
+PCRE2_SPTR first_op;
+
+dfa_recursion_info new_recursive;
+
+int active_count, new_count, match_count;
+
+/* Some fields in the mb block are frequently referenced, so we load them into
+independent variables in the hope that this will perform better. */
+
+PCRE2_SPTR start_subject = mb->start_subject;
+PCRE2_SPTR end_subject = mb->end_subject;
+PCRE2_SPTR start_code = mb->start_code;
+
+#ifdef SUPPORT_UNICODE
+BOOL utf = (mb->poptions & PCRE2_UTF) != 0;
+#else
+BOOL utf = FALSE;
+#endif
+
+BOOL reset_could_continue = FALSE;
+
+if (rlevel++ > mb->match_limit_recursion) return PCRE2_ERROR_RECURSIONLIMIT;
+offsetcount &= (uint32_t)(-2); /* Round down */
+
+wscount -= 2;
+wscount = (wscount - (wscount % (INTS_PER_STATEBLOCK * 2))) /
+ (2 * INTS_PER_STATEBLOCK);
+
+ctypes = mb->tables + ctypes_offset;
+lcc = mb->tables + lcc_offset;
+fcc = mb->tables + fcc_offset;
+
+match_count = PCRE2_ERROR_NOMATCH; /* A negative number */
+
+active_states = (stateblock *)(workspace + 2);
+next_new_state = new_states = active_states + wscount;
+new_count = 0;
+
+first_op = this_start_code + 1 + LINK_SIZE +
+ ((*this_start_code == OP_CBRA || *this_start_code == OP_SCBRA ||
+ *this_start_code == OP_CBRAPOS || *this_start_code == OP_SCBRAPOS)
+ ? IMM2_SIZE:0);
+
+/* The first thing in any (sub) pattern is a bracket of some sort. Push all
+the alternative states onto the list, and find out where the end is. This
+makes is possible to use this function recursively, when we want to stop at a
+matching internal ket rather than at the end.
+
+If the first opcode in the first alternative is OP_REVERSE, we are dealing with
+a backward assertion. In that case, we have to find out the maximum amount to
+move back, and set up each alternative appropriately. */
+
+if (*first_op == OP_REVERSE)
+ {
+ size_t max_back = 0;
+ size_t gone_back;
+
+ end_code = this_start_code;
+ do
+ {
+ size_t back = (size_t)GET(end_code, 2+LINK_SIZE);
+ if (back > max_back) max_back = back;
+ end_code += GET(end_code, 1);
+ }
+ while (*end_code == OP_ALT);
+
+ /* If we can't go back the amount required for the longest lookbehind
+ pattern, go back as far as we can; some alternatives may still be viable. */
+
+#ifdef SUPPORT_UNICODE
+ /* In character mode we have to step back character by character */
+
+ if (utf)
+ {
+ for (gone_back = 0; gone_back < max_back; gone_back++)
+ {
+ if (current_subject <= start_subject) break;
+ current_subject--;
+ ACROSSCHAR(current_subject > start_subject, *current_subject, current_subject--);
+ }
+ }
+ else
+#endif
+
+ /* In byte-mode we can do this quickly. */
+
+ {
+ size_t current_offset = (size_t)(current_subject - start_subject);
+ gone_back = (current_offset < max_back)? current_offset : max_back;
+ current_subject -= gone_back;
+ }
+
+ /* Save the earliest consulted character */
+
+ if (current_subject < mb->start_used_ptr)
+ mb->start_used_ptr = current_subject;
+
+ /* Now we can process the individual branches. */
+
+ end_code = this_start_code;
+ do
+ {
+ size_t back = (size_t)GET(end_code, 2+LINK_SIZE);
+ if (back <= gone_back)
+ {
+ int bstate = (int)(end_code - start_code + 2 + 2*LINK_SIZE);
+ ADD_NEW_DATA(-bstate, 0, (int)(gone_back - back));
+ }
+ end_code += GET(end_code, 1);
+ }
+ while (*end_code == OP_ALT);
+ }
+
+/* This is the code for a "normal" subpattern (not a backward assertion). The
+start of a whole pattern is always one of these. If we are at the top level,
+we may be asked to restart matching from the same point that we reached for a
+previous partial match. We still have to scan through the top-level branches to
+find the end state. */
+
+else
+ {
+ end_code = this_start_code;
+
+ /* Restarting */
+
+ if (rlevel == 1 && (mb->moptions & PCRE2_DFA_RESTART) != 0)
+ {
+ do { end_code += GET(end_code, 1); } while (*end_code == OP_ALT);
+ new_count = workspace[1];
+ if (!workspace[0])
+ memcpy(new_states, active_states, (size_t)new_count * sizeof(stateblock));
+ }
+
+ /* Not restarting */
+
+ else
+ {
+ int length = 1 + LINK_SIZE +
+ ((*this_start_code == OP_CBRA || *this_start_code == OP_SCBRA ||
+ *this_start_code == OP_CBRAPOS || *this_start_code == OP_SCBRAPOS)
+ ? IMM2_SIZE:0);
+ do
+ {
+ ADD_NEW((int)(end_code - start_code + length), 0);
+ end_code += GET(end_code, 1);
+ length = 1 + LINK_SIZE;
+ }
+ while (*end_code == OP_ALT);
+ }
+ }
+
+workspace[0] = 0; /* Bit indicating which vector is current */
+
+/* Loop for scanning the subject */
+
+ptr = current_subject;
+for (;;)
+ {
+ int i, j;
+ int clen, dlen;
+ uint32_t c, d;
+ int forced_fail = 0;
+ BOOL partial_newline = FALSE;
+ BOOL could_continue = reset_could_continue;
+ reset_could_continue = FALSE;
+
+ if (ptr > mb->last_used_ptr) mb->last_used_ptr = ptr;
+
+ /* Make the new state list into the active state list and empty the
+ new state list. */
+
+ temp_states = active_states;
+ active_states = new_states;
+ new_states = temp_states;
+ active_count = new_count;
+ new_count = 0;
+
+ workspace[0] ^= 1; /* Remember for the restarting feature */
+ workspace[1] = active_count;
+
+ /* Set the pointers for adding new states */
+
+ next_active_state = active_states + active_count;
+ next_new_state = new_states;
+
+ /* Load the current character from the subject outside the loop, as many
+ different states may want to look at it, and we assume that at least one
+ will. */
+
+ if (ptr < end_subject)
+ {
+ clen = 1; /* Number of data items in the character */
+#ifdef SUPPORT_UNICODE
+ GETCHARLENTEST(c, ptr, clen);
+#else
+ c = *ptr;
+#endif /* SUPPORT_UNICODE */
+ }
+ else
+ {
+ clen = 0; /* This indicates the end of the subject */
+ c = NOTACHAR; /* This value should never actually be used */
+ }
+
+ /* Scan up the active states and act on each one. The result of an action
+ may be to add more states to the currently active list (e.g. on hitting a
+ parenthesis) or it may be to put states on the new list, for considering
+ when we move the character pointer on. */
+
+ for (i = 0; i < active_count; i++)
+ {
+ stateblock *current_state = active_states + i;
+ BOOL caseless = FALSE;
+ PCRE2_SPTR code;
+ uint32_t codevalue;
+ int state_offset = current_state->offset;
+ int rrc;
+ int count;
+
+ /* A negative offset is a special case meaning "hold off going to this
+ (negated) state until the number of characters in the data field have
+ been skipped". If the could_continue flag was passed over from a previous
+ state, arrange for it to passed on. */
+
+ if (state_offset < 0)
+ {
+ if (current_state->data > 0)
+ {
+ ADD_NEW_DATA(state_offset, current_state->count,
+ current_state->data - 1);
+ if (could_continue) reset_could_continue = TRUE;
+ continue;
+ }
+ else
+ {
+ current_state->offset = state_offset = -state_offset;
+ }
+ }
+
+ /* Check for a duplicate state with the same count, and skip if found.
+ See the note at the head of this module about the possibility of improving
+ performance here. */
+
+ for (j = 0; j < i; j++)
+ {
+ if (active_states[j].offset == state_offset &&
+ active_states[j].count == current_state->count)
+ goto NEXT_ACTIVE_STATE;
+ }
+
+ /* The state offset is the offset to the opcode */
+
+ code = start_code + state_offset;
+ codevalue = *code;
+
+ /* If this opcode inspects a character, but we are at the end of the
+ subject, remember the fact for use when testing for a partial match. */
+
+ if (clen == 0 && poptable[codevalue] != 0)
+ could_continue = TRUE;
+
+ /* If this opcode is followed by an inline character, load it. It is
+ tempting to test for the presence of a subject character here, but that
+ is wrong, because sometimes zero repetitions of the subject are
+ permitted.
+
+ We also use this mechanism for opcodes such as OP_TYPEPLUS that take an
+ argument that is not a data character - but is always one byte long because
+ the values are small. We have to take special action to deal with \P, \p,
+ \H, \h, \V, \v and \X in this case. To keep the other cases fast, convert
+ these ones to new opcodes. */
+
+ if (coptable[codevalue] > 0)
+ {
+ dlen = 1;
+#ifdef SUPPORT_UNICODE
+ if (utf) { GETCHARLEN(d, (code + coptable[codevalue]), dlen); } else
+#endif /* SUPPORT_UNICODE */
+ d = code[coptable[codevalue]];
+ if (codevalue >= OP_TYPESTAR)
+ {
+ switch(d)
+ {
+ case OP_ANYBYTE: return PCRE2_ERROR_DFA_UITEM;
+ case OP_NOTPROP:
+ case OP_PROP: codevalue += OP_PROP_EXTRA; break;
+ case OP_ANYNL: codevalue += OP_ANYNL_EXTRA; break;
+ case OP_EXTUNI: codevalue += OP_EXTUNI_EXTRA; break;
+ case OP_NOT_HSPACE:
+ case OP_HSPACE: codevalue += OP_HSPACE_EXTRA; break;
+ case OP_NOT_VSPACE:
+ case OP_VSPACE: codevalue += OP_VSPACE_EXTRA; break;
+ default: break;
+ }
+ }
+ }
+ else
+ {
+ dlen = 0; /* Not strictly necessary, but compilers moan */
+ d = NOTACHAR; /* if these variables are not set. */
+ }
+
+
+ /* Now process the individual opcodes */
+
+ switch (codevalue)
+ {
+/* ========================================================================== */
+ /* These cases are never obeyed. This is a fudge that causes a compile-
+ time error if the vectors coptable or poptable, which are indexed by
+ opcode, are not the correct length. It seems to be the only way to do
+ such a check at compile time, as the sizeof() operator does not work
+ in the C preprocessor. */
+
+ case OP_TABLE_LENGTH:
+ case OP_TABLE_LENGTH +
+ ((sizeof(coptable) == OP_TABLE_LENGTH) &&
+ (sizeof(poptable) == OP_TABLE_LENGTH)):
+ break;
+
+/* ========================================================================== */
+ /* Reached a closing bracket. If not at the end of the pattern, carry
+ on with the next opcode. For repeating opcodes, also add the repeat
+ state. Note that KETRPOS will always be encountered at the end of the
+ subpattern, because the possessive subpattern repeats are always handled
+ using recursive calls. Thus, it never adds any new states.
+
+ At the end of the (sub)pattern, unless we have an empty string and
+ PCRE2_NOTEMPTY is set, or PCRE2_NOTEMPTY_ATSTART is set and we are at the
+ start of the subject, save the match data, shifting up all previous
+ matches so we always have the longest first. */
+
+ case OP_KET:
+ case OP_KETRMIN:
+ case OP_KETRMAX:
+ case OP_KETRPOS:
+ if (code != end_code)
+ {
+ ADD_ACTIVE(state_offset + 1 + LINK_SIZE, 0);
+ if (codevalue != OP_KET)
+ {
+ ADD_ACTIVE(state_offset - (int)GET(code, 1), 0);
+ }
+ }
+ else
+ {
+ if (ptr > current_subject ||
+ ((mb->moptions & PCRE2_NOTEMPTY) == 0 &&
+ ((mb->moptions & PCRE2_NOTEMPTY_ATSTART) == 0 ||
+ current_subject > start_subject + mb->start_offset)))
+ {
+ if (match_count < 0) match_count = (offsetcount >= 2)? 1 : 0;
+ else if (match_count > 0 && ++match_count * 2 > (int)offsetcount)
+ match_count = 0;
+ count = ((match_count == 0)? (int)offsetcount : match_count * 2) - 2;
+ if (count > 0) memmove(offsets + 2, offsets,
+ (size_t)count * sizeof(PCRE2_SIZE));
+ if (offsetcount >= 2)
+ {
+ offsets[0] = (PCRE2_SIZE)(current_subject - start_subject);
+ offsets[1] = (PCRE2_SIZE)(ptr - start_subject);
+ }
+ if ((mb->moptions & PCRE2_DFA_SHORTEST) != 0) return match_count;
+ }
+ }
+ break;
+
+/* ========================================================================== */
+ /* These opcodes add to the current list of states without looking
+ at the current character. */
+
+ /*-----------------------------------------------------------------*/
+ case OP_ALT:
+ do { code += GET(code, 1); } while (*code == OP_ALT);
+ ADD_ACTIVE((int)(code - start_code), 0);
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_BRA:
+ case OP_SBRA:
+ do
+ {
+ ADD_ACTIVE((int)(code - start_code + 1 + LINK_SIZE), 0);
+ code += GET(code, 1);
+ }
+ while (*code == OP_ALT);
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_CBRA:
+ case OP_SCBRA:
+ ADD_ACTIVE((int)(code - start_code + 1 + LINK_SIZE + IMM2_SIZE), 0);
+ code += GET(code, 1);
+ while (*code == OP_ALT)
+ {
+ ADD_ACTIVE((int)(code - start_code + 1 + LINK_SIZE), 0);
+ code += GET(code, 1);
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_BRAZERO:
+ case OP_BRAMINZERO:
+ ADD_ACTIVE(state_offset + 1, 0);
+ code += 1 + GET(code, 2);
+ while (*code == OP_ALT) code += GET(code, 1);
+ ADD_ACTIVE((int)(code - start_code + 1 + LINK_SIZE), 0);
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_SKIPZERO:
+ code += 1 + GET(code, 2);
+ while (*code == OP_ALT) code += GET(code, 1);
+ ADD_ACTIVE((int)(code - start_code + 1 + LINK_SIZE), 0);
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_CIRC:
+ if (ptr == start_subject && (mb->moptions & PCRE2_NOTBOL) == 0)
+ { ADD_ACTIVE(state_offset + 1, 0); }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_CIRCM:
+ if ((ptr == start_subject && (mb->moptions & PCRE2_NOTBOL) == 0) ||
+ ((ptr != end_subject || (mb->poptions & PCRE2_ALT_CIRCUMFLEX) != 0 )
+ && WAS_NEWLINE(ptr)))
+ { ADD_ACTIVE(state_offset + 1, 0); }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_EOD:
+ if (ptr >= end_subject)
+ {
+ if ((mb->moptions & PCRE2_PARTIAL_HARD) != 0)
+ could_continue = TRUE;
+ else { ADD_ACTIVE(state_offset + 1, 0); }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_SOD:
+ if (ptr == start_subject) { ADD_ACTIVE(state_offset + 1, 0); }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_SOM:
+ if (ptr == start_subject + start_offset) { ADD_ACTIVE(state_offset + 1, 0); }
+ break;
+
+
+/* ========================================================================== */
+ /* These opcodes inspect the next subject character, and sometimes
+ the previous one as well, but do not have an argument. The variable
+ clen contains the length of the current character and is zero if we are
+ at the end of the subject. */
+
+ /*-----------------------------------------------------------------*/
+ case OP_ANY:
+ if (clen > 0 && !IS_NEWLINE(ptr))
+ {
+ if (ptr + 1 >= mb->end_subject &&
+ (mb->moptions & (PCRE2_PARTIAL_HARD)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ could_continue = partial_newline = TRUE;
+ }
+ else
+ {
+ ADD_NEW(state_offset + 1, 0);
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_ALLANY:
+ if (clen > 0)
+ { ADD_NEW(state_offset + 1, 0); }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_EODN:
+ if (clen == 0 && (mb->moptions & PCRE2_PARTIAL_HARD) != 0)
+ could_continue = TRUE;
+ else if (clen == 0 || (IS_NEWLINE(ptr) && ptr == end_subject - mb->nllen))
+ { ADD_ACTIVE(state_offset + 1, 0); }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_DOLL:
+ if ((mb->moptions & PCRE2_NOTEOL) == 0)
+ {
+ if (clen == 0 && (mb->moptions & PCRE2_PARTIAL_HARD) != 0)
+ could_continue = TRUE;
+ else if (clen == 0 ||
+ ((mb->poptions & PCRE2_DOLLAR_ENDONLY) == 0 && IS_NEWLINE(ptr) &&
+ (ptr == end_subject - mb->nllen)
+ ))
+ { ADD_ACTIVE(state_offset + 1, 0); }
+ else if (ptr + 1 >= mb->end_subject &&
+ (mb->moptions & (PCRE2_PARTIAL_HARD|PCRE2_PARTIAL_SOFT)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ if ((mb->moptions & PCRE2_PARTIAL_HARD) != 0)
+ {
+ reset_could_continue = TRUE;
+ ADD_NEW_DATA(-(state_offset + 1), 0, 1);
+ }
+ else could_continue = partial_newline = TRUE;
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_DOLLM:
+ if ((mb->moptions & PCRE2_NOTEOL) == 0)
+ {
+ if (clen == 0 && (mb->moptions & PCRE2_PARTIAL_HARD) != 0)
+ could_continue = TRUE;
+ else if (clen == 0 ||
+ ((mb->poptions & PCRE2_DOLLAR_ENDONLY) == 0 && IS_NEWLINE(ptr)))
+ { ADD_ACTIVE(state_offset + 1, 0); }
+ else if (ptr + 1 >= mb->end_subject &&
+ (mb->moptions & (PCRE2_PARTIAL_HARD|PCRE2_PARTIAL_SOFT)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ if ((mb->moptions & PCRE2_PARTIAL_HARD) != 0)
+ {
+ reset_could_continue = TRUE;
+ ADD_NEW_DATA(-(state_offset + 1), 0, 1);
+ }
+ else could_continue = partial_newline = TRUE;
+ }
+ }
+ else if (IS_NEWLINE(ptr))
+ { ADD_ACTIVE(state_offset + 1, 0); }
+ break;
+
+ /*-----------------------------------------------------------------*/
+
+ case OP_DIGIT:
+ case OP_WHITESPACE:
+ case OP_WORDCHAR:
+ if (clen > 0 && c < 256 &&
+ ((ctypes[c] & toptable1[codevalue]) ^ toptable2[codevalue]) != 0)
+ { ADD_NEW(state_offset + 1, 0); }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_NOT_DIGIT:
+ case OP_NOT_WHITESPACE:
+ case OP_NOT_WORDCHAR:
+ if (clen > 0 && (c >= 256 ||
+ ((ctypes[c] & toptable1[codevalue]) ^ toptable2[codevalue]) != 0))
+ { ADD_NEW(state_offset + 1, 0); }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_WORD_BOUNDARY:
+ case OP_NOT_WORD_BOUNDARY:
+ {
+ int left_word, right_word;
+
+ if (ptr > start_subject)
+ {
+ PCRE2_SPTR temp = ptr - 1;
+ if (temp < mb->start_used_ptr) mb->start_used_ptr = temp;
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+ if (utf) { BACKCHAR(temp); }
+#endif
+ GETCHARTEST(d, temp);
+#ifdef SUPPORT_UNICODE
+ if ((mb->poptions & PCRE2_UCP) != 0)
+ {
+ if (d == '_') left_word = TRUE; else
+ {
+ uint32_t cat = UCD_CATEGORY(d);
+ left_word = (cat == ucp_L || cat == ucp_N);
+ }
+ }
+ else
+#endif
+ left_word = d < 256 && (ctypes[d] & ctype_word) != 0;
+ }
+ else left_word = FALSE;
+
+ if (clen > 0)
+ {
+ if (ptr >= mb->last_used_ptr)
+ {
+ PCRE2_SPTR temp = ptr + 1;
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+ if (utf) { FORWARDCHARTEST(temp, mb->end_subject); }
+#endif
+ mb->last_used_ptr = temp;
+ }
+#ifdef SUPPORT_UNICODE
+ if ((mb->poptions & PCRE2_UCP) != 0)
+ {
+ if (c == '_') right_word = TRUE; else
+ {
+ uint32_t cat = UCD_CATEGORY(c);
+ right_word = (cat == ucp_L || cat == ucp_N);
+ }
+ }
+ else
+#endif
+ right_word = c < 256 && (ctypes[c] & ctype_word) != 0;
+ }
+ else right_word = FALSE;
+
+ if ((left_word == right_word) == (codevalue == OP_NOT_WORD_BOUNDARY))
+ { ADD_ACTIVE(state_offset + 1, 0); }
+ }
+ break;
+
+
+ /*-----------------------------------------------------------------*/
+ /* Check the next character by Unicode property. We will get here only
+ if the support is in the binary; otherwise a compile-time error occurs.
+ */
+
+#ifdef SUPPORT_UNICODE
+ case OP_PROP:
+ case OP_NOTPROP:
+ if (clen > 0)
+ {
+ BOOL OK;
+ const uint32_t *cp;
+ const ucd_record * prop = GET_UCD(c);
+ switch(code[1])
+ {
+ case PT_ANY:
+ OK = TRUE;
+ break;
+
+ case PT_LAMP:
+ OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll ||
+ prop->chartype == ucp_Lt;
+ break;
+
+ case PT_GC:
+ OK = PRIV(ucp_gentype)[prop->chartype] == code[2];
+ break;
+
+ case PT_PC:
+ OK = prop->chartype == code[2];
+ break;
+
+ case PT_SC:
+ OK = prop->script == code[2];
+ break;
+
+ /* These are specials for combination cases. */
+
+ case PT_ALNUM:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N;
+ break;
+
+ /* Perl space used to exclude VT, but from Perl 5.18 it is included,
+ which means that Perl space and POSIX space are now identical. PCRE
+ was changed at release 8.34. */
+
+ case PT_SPACE: /* Perl space */
+ case PT_PXSPACE: /* POSIX space */
+ switch(c)
+ {
+ HSPACE_CASES:
+ VSPACE_CASES:
+ OK = TRUE;
+ break;
+
+ default:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z;
+ break;
+ }
+ break;
+
+ case PT_WORD:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
+ c == CHAR_UNDERSCORE;
+ break;
+
+ case PT_CLIST:
+ cp = PRIV(ucd_caseless_sets) + code[2];
+ for (;;)
+ {
+ if (c < *cp) { OK = FALSE; break; }
+ if (c == *cp++) { OK = TRUE; break; }
+ }
+ break;
+
+ case PT_UCNC:
+ OK = c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000;
+ break;
+
+ /* Should never occur, but keep compilers from grumbling. */
+
+ default:
+ OK = codevalue != OP_PROP;
+ break;
+ }
+
+ if (OK == (codevalue == OP_PROP)) { ADD_NEW(state_offset + 3, 0); }
+ }
+ break;
+#endif
+
+
+
+/* ========================================================================== */
+ /* These opcodes likewise inspect the subject character, but have an
+ argument that is not a data character. It is one of these opcodes:
+ OP_ANY, OP_ALLANY, OP_DIGIT, OP_NOT_DIGIT, OP_WHITESPACE, OP_NOT_SPACE,
+ OP_WORDCHAR, OP_NOT_WORDCHAR. The value is loaded into d. */
+
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEPOSPLUS:
+ count = current_state->count; /* Already matched */
+ if (count > 0) { ADD_ACTIVE(state_offset + 2, 0); }
+ if (clen > 0)
+ {
+ if (d == OP_ANY && ptr + 1 >= mb->end_subject &&
+ (mb->moptions & (PCRE2_PARTIAL_HARD)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ could_continue = partial_newline = TRUE;
+ }
+ else if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
+ (c < 256 &&
+ (d != OP_ANY || !IS_NEWLINE(ptr)) &&
+ ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
+ {
+ if (count > 0 && codevalue == OP_TYPEPOSPLUS)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ count++;
+ ADD_NEW(state_offset, count);
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEPOSQUERY:
+ ADD_ACTIVE(state_offset + 2, 0);
+ if (clen > 0)
+ {
+ if (d == OP_ANY && ptr + 1 >= mb->end_subject &&
+ (mb->moptions & (PCRE2_PARTIAL_HARD)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ could_continue = partial_newline = TRUE;
+ }
+ else if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
+ (c < 256 &&
+ (d != OP_ANY || !IS_NEWLINE(ptr)) &&
+ ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
+ {
+ if (codevalue == OP_TYPEPOSQUERY)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ ADD_NEW(state_offset + 2, 0);
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPOSSTAR:
+ ADD_ACTIVE(state_offset + 2, 0);
+ if (clen > 0)
+ {
+ if (d == OP_ANY && ptr + 1 >= mb->end_subject &&
+ (mb->moptions & (PCRE2_PARTIAL_HARD)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ could_continue = partial_newline = TRUE;
+ }
+ else if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
+ (c < 256 &&
+ (d != OP_ANY || !IS_NEWLINE(ptr)) &&
+ ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
+ {
+ if (codevalue == OP_TYPEPOSSTAR)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ ADD_NEW(state_offset, 0);
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_TYPEEXACT:
+ count = current_state->count; /* Number already matched */
+ if (clen > 0)
+ {
+ if (d == OP_ANY && ptr + 1 >= mb->end_subject &&
+ (mb->moptions & (PCRE2_PARTIAL_HARD)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ could_continue = partial_newline = TRUE;
+ }
+ else if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
+ (c < 256 &&
+ (d != OP_ANY || !IS_NEWLINE(ptr)) &&
+ ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
+ {
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW(state_offset + 1 + IMM2_SIZE + 1, 0); }
+ else
+ { ADD_NEW(state_offset, count); }
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEPOSUPTO:
+ ADD_ACTIVE(state_offset + 2 + IMM2_SIZE, 0);
+ count = current_state->count; /* Number already matched */
+ if (clen > 0)
+ {
+ if (d == OP_ANY && ptr + 1 >= mb->end_subject &&
+ (mb->moptions & (PCRE2_PARTIAL_HARD)) != 0 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ could_continue = partial_newline = TRUE;
+ }
+ else if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) ||
+ (c < 256 &&
+ (d != OP_ANY || !IS_NEWLINE(ptr)) &&
+ ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0))
+ {
+ if (codevalue == OP_TYPEPOSUPTO)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW(state_offset + 2 + IMM2_SIZE, 0); }
+ else
+ { ADD_NEW(state_offset, count); }
+ }
+ }
+ break;
+
+/* ========================================================================== */
+ /* These are virtual opcodes that are used when something like
+ OP_TYPEPLUS has OP_PROP, OP_NOTPROP, OP_ANYNL, or OP_EXTUNI as its
+ argument. It keeps the code above fast for the other cases. The argument
+ is in the d variable. */
+
+#ifdef SUPPORT_UNICODE
+ case OP_PROP_EXTRA + OP_TYPEPLUS:
+ case OP_PROP_EXTRA + OP_TYPEMINPLUS:
+ case OP_PROP_EXTRA + OP_TYPEPOSPLUS:
+ count = current_state->count; /* Already matched */
+ if (count > 0) { ADD_ACTIVE(state_offset + 4, 0); }
+ if (clen > 0)
+ {
+ BOOL OK;
+ const uint32_t *cp;
+ const ucd_record * prop = GET_UCD(c);
+ switch(code[2])
+ {
+ case PT_ANY:
+ OK = TRUE;
+ break;
+
+ case PT_LAMP:
+ OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll ||
+ prop->chartype == ucp_Lt;
+ break;
+
+ case PT_GC:
+ OK = PRIV(ucp_gentype)[prop->chartype] == code[3];
+ break;
+
+ case PT_PC:
+ OK = prop->chartype == code[3];
+ break;
+
+ case PT_SC:
+ OK = prop->script == code[3];
+ break;
+
+ /* These are specials for combination cases. */
+
+ case PT_ALNUM:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N;
+ break;
+
+ /* Perl space used to exclude VT, but from Perl 5.18 it is included,
+ which means that Perl space and POSIX space are now identical. PCRE
+ was changed at release 8.34. */
+
+ case PT_SPACE: /* Perl space */
+ case PT_PXSPACE: /* POSIX space */
+ switch(c)
+ {
+ HSPACE_CASES:
+ VSPACE_CASES:
+ OK = TRUE;
+ break;
+
+ default:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z;
+ break;
+ }
+ break;
+
+ case PT_WORD:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
+ c == CHAR_UNDERSCORE;
+ break;
+
+ case PT_CLIST:
+ cp = PRIV(ucd_caseless_sets) + code[3];
+ for (;;)
+ {
+ if (c < *cp) { OK = FALSE; break; }
+ if (c == *cp++) { OK = TRUE; break; }
+ }
+ break;
+
+ case PT_UCNC:
+ OK = c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000;
+ break;
+
+ /* Should never occur, but keep compilers from grumbling. */
+
+ default:
+ OK = codevalue != OP_PROP;
+ break;
+ }
+
+ if (OK == (d == OP_PROP))
+ {
+ if (count > 0 && codevalue == OP_PROP_EXTRA + OP_TYPEPOSPLUS)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ count++;
+ ADD_NEW(state_offset, count);
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_EXTUNI_EXTRA + OP_TYPEPLUS:
+ case OP_EXTUNI_EXTRA + OP_TYPEMINPLUS:
+ case OP_EXTUNI_EXTRA + OP_TYPEPOSPLUS:
+ count = current_state->count; /* Already matched */
+ if (count > 0) { ADD_ACTIVE(state_offset + 2, 0); }
+ if (clen > 0)
+ {
+ uint32_t lgb, rgb;
+ PCRE2_SPTR nptr = ptr + clen;
+ int ncount = 0;
+ if (count > 0 && codevalue == OP_EXTUNI_EXTRA + OP_TYPEPOSPLUS)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ lgb = UCD_GRAPHBREAK(c);
+ while (nptr < end_subject)
+ {
+ dlen = 1;
+ if (!utf) d = *nptr; else { GETCHARLEN(d, nptr, dlen); }
+ rgb = UCD_GRAPHBREAK(d);
+ if ((PRIV(ucp_gbtable)[lgb] & (1u << rgb)) == 0) break;
+ ncount++;
+ lgb = rgb;
+ nptr += dlen;
+ }
+ count++;
+ ADD_NEW_DATA(-state_offset, count, ncount);
+ }
+ break;
+#endif
+
+ /*-----------------------------------------------------------------*/
+ case OP_ANYNL_EXTRA + OP_TYPEPLUS:
+ case OP_ANYNL_EXTRA + OP_TYPEMINPLUS:
+ case OP_ANYNL_EXTRA + OP_TYPEPOSPLUS:
+ count = current_state->count; /* Already matched */
+ if (count > 0) { ADD_ACTIVE(state_offset + 2, 0); }
+ if (clen > 0)
+ {
+ int ncount = 0;
+ switch (c)
+ {
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#ifndef EBCDIC
+ case 0x2028:
+ case 0x2029:
+#endif /* Not EBCDIC */
+ if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) break;
+ goto ANYNL01;
+
+ case CHAR_CR:
+ if (ptr + 1 < end_subject && UCHAR21TEST(ptr + 1) == CHAR_LF) ncount = 1;
+ /* Fall through */
+
+ ANYNL01:
+ case CHAR_LF:
+ if (count > 0 && codevalue == OP_ANYNL_EXTRA + OP_TYPEPOSPLUS)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ count++;
+ ADD_NEW_DATA(-state_offset, count, ncount);
+ break;
+
+ default:
+ break;
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_VSPACE_EXTRA + OP_TYPEPLUS:
+ case OP_VSPACE_EXTRA + OP_TYPEMINPLUS:
+ case OP_VSPACE_EXTRA + OP_TYPEPOSPLUS:
+ count = current_state->count; /* Already matched */
+ if (count > 0) { ADD_ACTIVE(state_offset + 2, 0); }
+ if (clen > 0)
+ {
+ BOOL OK;
+ switch (c)
+ {
+ VSPACE_CASES:
+ OK = TRUE;
+ break;
+
+ default:
+ OK = FALSE;
+ break;
+ }
+
+ if (OK == (d == OP_VSPACE))
+ {
+ if (count > 0 && codevalue == OP_VSPACE_EXTRA + OP_TYPEPOSPLUS)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ count++;
+ ADD_NEW_DATA(-state_offset, count, 0);
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_HSPACE_EXTRA + OP_TYPEPLUS:
+ case OP_HSPACE_EXTRA + OP_TYPEMINPLUS:
+ case OP_HSPACE_EXTRA + OP_TYPEPOSPLUS:
+ count = current_state->count; /* Already matched */
+ if (count > 0) { ADD_ACTIVE(state_offset + 2, 0); }
+ if (clen > 0)
+ {
+ BOOL OK;
+ switch (c)
+ {
+ HSPACE_CASES:
+ OK = TRUE;
+ break;
+
+ default:
+ OK = FALSE;
+ break;
+ }
+
+ if (OK == (d == OP_HSPACE))
+ {
+ if (count > 0 && codevalue == OP_HSPACE_EXTRA + OP_TYPEPOSPLUS)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ count++;
+ ADD_NEW_DATA(-state_offset, count, 0);
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+#ifdef SUPPORT_UNICODE
+ case OP_PROP_EXTRA + OP_TYPEQUERY:
+ case OP_PROP_EXTRA + OP_TYPEMINQUERY:
+ case OP_PROP_EXTRA + OP_TYPEPOSQUERY:
+ count = 4;
+ goto QS1;
+
+ case OP_PROP_EXTRA + OP_TYPESTAR:
+ case OP_PROP_EXTRA + OP_TYPEMINSTAR:
+ case OP_PROP_EXTRA + OP_TYPEPOSSTAR:
+ count = 0;
+
+ QS1:
+
+ ADD_ACTIVE(state_offset + 4, 0);
+ if (clen > 0)
+ {
+ BOOL OK;
+ const uint32_t *cp;
+ const ucd_record * prop = GET_UCD(c);
+ switch(code[2])
+ {
+ case PT_ANY:
+ OK = TRUE;
+ break;
+
+ case PT_LAMP:
+ OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll ||
+ prop->chartype == ucp_Lt;
+ break;
+
+ case PT_GC:
+ OK = PRIV(ucp_gentype)[prop->chartype] == code[3];
+ break;
+
+ case PT_PC:
+ OK = prop->chartype == code[3];
+ break;
+
+ case PT_SC:
+ OK = prop->script == code[3];
+ break;
+
+ /* These are specials for combination cases. */
+
+ case PT_ALNUM:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N;
+ break;
+
+ /* Perl space used to exclude VT, but from Perl 5.18 it is included,
+ which means that Perl space and POSIX space are now identical. PCRE
+ was changed at release 8.34. */
+
+ case PT_SPACE: /* Perl space */
+ case PT_PXSPACE: /* POSIX space */
+ switch(c)
+ {
+ HSPACE_CASES:
+ VSPACE_CASES:
+ OK = TRUE;
+ break;
+
+ default:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z;
+ break;
+ }
+ break;
+
+ case PT_WORD:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
+ c == CHAR_UNDERSCORE;
+ break;
+
+ case PT_CLIST:
+ cp = PRIV(ucd_caseless_sets) + code[3];
+ for (;;)
+ {
+ if (c < *cp) { OK = FALSE; break; }
+ if (c == *cp++) { OK = TRUE; break; }
+ }
+ break;
+
+ case PT_UCNC:
+ OK = c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000;
+ break;
+
+ /* Should never occur, but keep compilers from grumbling. */
+
+ default:
+ OK = codevalue != OP_PROP;
+ break;
+ }
+
+ if (OK == (d == OP_PROP))
+ {
+ if (codevalue == OP_PROP_EXTRA + OP_TYPEPOSSTAR ||
+ codevalue == OP_PROP_EXTRA + OP_TYPEPOSQUERY)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ ADD_NEW(state_offset + count, 0);
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_EXTUNI_EXTRA + OP_TYPEQUERY:
+ case OP_EXTUNI_EXTRA + OP_TYPEMINQUERY:
+ case OP_EXTUNI_EXTRA + OP_TYPEPOSQUERY:
+ count = 2;
+ goto QS2;
+
+ case OP_EXTUNI_EXTRA + OP_TYPESTAR:
+ case OP_EXTUNI_EXTRA + OP_TYPEMINSTAR:
+ case OP_EXTUNI_EXTRA + OP_TYPEPOSSTAR:
+ count = 0;
+
+ QS2:
+
+ ADD_ACTIVE(state_offset + 2, 0);
+ if (clen > 0)
+ {
+ uint32_t lgb, rgb;
+ PCRE2_SPTR nptr = ptr + clen;
+ int ncount = 0;
+ if (codevalue == OP_EXTUNI_EXTRA + OP_TYPEPOSSTAR ||
+ codevalue == OP_EXTUNI_EXTRA + OP_TYPEPOSQUERY)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ lgb = UCD_GRAPHBREAK(c);
+ while (nptr < end_subject)
+ {
+ dlen = 1;
+ if (!utf) d = *nptr; else { GETCHARLEN(d, nptr, dlen); }
+ rgb = UCD_GRAPHBREAK(d);
+ if ((PRIV(ucp_gbtable)[lgb] & (1u << rgb)) == 0) break;
+ ncount++;
+ lgb = rgb;
+ nptr += dlen;
+ }
+ ADD_NEW_DATA(-(state_offset + count), 0, ncount);
+ }
+ break;
+#endif
+
+ /*-----------------------------------------------------------------*/
+ case OP_ANYNL_EXTRA + OP_TYPEQUERY:
+ case OP_ANYNL_EXTRA + OP_TYPEMINQUERY:
+ case OP_ANYNL_EXTRA + OP_TYPEPOSQUERY:
+ count = 2;
+ goto QS3;
+
+ case OP_ANYNL_EXTRA + OP_TYPESTAR:
+ case OP_ANYNL_EXTRA + OP_TYPEMINSTAR:
+ case OP_ANYNL_EXTRA + OP_TYPEPOSSTAR:
+ count = 0;
+
+ QS3:
+ ADD_ACTIVE(state_offset + 2, 0);
+ if (clen > 0)
+ {
+ int ncount = 0;
+ switch (c)
+ {
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#ifndef EBCDIC
+ case 0x2028:
+ case 0x2029:
+#endif /* Not EBCDIC */
+ if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) break;
+ goto ANYNL02;
+
+ case CHAR_CR:
+ if (ptr + 1 < end_subject && UCHAR21TEST(ptr + 1) == CHAR_LF) ncount = 1;
+ /* Fall through */
+
+ ANYNL02:
+ case CHAR_LF:
+ if (codevalue == OP_ANYNL_EXTRA + OP_TYPEPOSSTAR ||
+ codevalue == OP_ANYNL_EXTRA + OP_TYPEPOSQUERY)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ ADD_NEW_DATA(-(state_offset + (int)count), 0, ncount);
+ break;
+
+ default:
+ break;
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_VSPACE_EXTRA + OP_TYPEQUERY:
+ case OP_VSPACE_EXTRA + OP_TYPEMINQUERY:
+ case OP_VSPACE_EXTRA + OP_TYPEPOSQUERY:
+ count = 2;
+ goto QS4;
+
+ case OP_VSPACE_EXTRA + OP_TYPESTAR:
+ case OP_VSPACE_EXTRA + OP_TYPEMINSTAR:
+ case OP_VSPACE_EXTRA + OP_TYPEPOSSTAR:
+ count = 0;
+
+ QS4:
+ ADD_ACTIVE(state_offset + 2, 0);
+ if (clen > 0)
+ {
+ BOOL OK;
+ switch (c)
+ {
+ VSPACE_CASES:
+ OK = TRUE;
+ break;
+
+ default:
+ OK = FALSE;
+ break;
+ }
+ if (OK == (d == OP_VSPACE))
+ {
+ if (codevalue == OP_VSPACE_EXTRA + OP_TYPEPOSSTAR ||
+ codevalue == OP_VSPACE_EXTRA + OP_TYPEPOSQUERY)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ ADD_NEW_DATA(-(state_offset + (int)count), 0, 0);
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_HSPACE_EXTRA + OP_TYPEQUERY:
+ case OP_HSPACE_EXTRA + OP_TYPEMINQUERY:
+ case OP_HSPACE_EXTRA + OP_TYPEPOSQUERY:
+ count = 2;
+ goto QS5;
+
+ case OP_HSPACE_EXTRA + OP_TYPESTAR:
+ case OP_HSPACE_EXTRA + OP_TYPEMINSTAR:
+ case OP_HSPACE_EXTRA + OP_TYPEPOSSTAR:
+ count = 0;
+
+ QS5:
+ ADD_ACTIVE(state_offset + 2, 0);
+ if (clen > 0)
+ {
+ BOOL OK;
+ switch (c)
+ {
+ HSPACE_CASES:
+ OK = TRUE;
+ break;
+
+ default:
+ OK = FALSE;
+ break;
+ }
+
+ if (OK == (d == OP_HSPACE))
+ {
+ if (codevalue == OP_HSPACE_EXTRA + OP_TYPEPOSSTAR ||
+ codevalue == OP_HSPACE_EXTRA + OP_TYPEPOSQUERY)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ ADD_NEW_DATA(-(state_offset + (int)count), 0, 0);
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+#ifdef SUPPORT_UNICODE
+ case OP_PROP_EXTRA + OP_TYPEEXACT:
+ case OP_PROP_EXTRA + OP_TYPEUPTO:
+ case OP_PROP_EXTRA + OP_TYPEMINUPTO:
+ case OP_PROP_EXTRA + OP_TYPEPOSUPTO:
+ if (codevalue != OP_PROP_EXTRA + OP_TYPEEXACT)
+ { ADD_ACTIVE(state_offset + 1 + IMM2_SIZE + 3, 0); }
+ count = current_state->count; /* Number already matched */
+ if (clen > 0)
+ {
+ BOOL OK;
+ const uint32_t *cp;
+ const ucd_record * prop = GET_UCD(c);
+ switch(code[1 + IMM2_SIZE + 1])
+ {
+ case PT_ANY:
+ OK = TRUE;
+ break;
+
+ case PT_LAMP:
+ OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll ||
+ prop->chartype == ucp_Lt;
+ break;
+
+ case PT_GC:
+ OK = PRIV(ucp_gentype)[prop->chartype] == code[1 + IMM2_SIZE + 2];
+ break;
+
+ case PT_PC:
+ OK = prop->chartype == code[1 + IMM2_SIZE + 2];
+ break;
+
+ case PT_SC:
+ OK = prop->script == code[1 + IMM2_SIZE + 2];
+ break;
+
+ /* These are specials for combination cases. */
+
+ case PT_ALNUM:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N;
+ break;
+
+ /* Perl space used to exclude VT, but from Perl 5.18 it is included,
+ which means that Perl space and POSIX space are now identical. PCRE
+ was changed at release 8.34. */
+
+ case PT_SPACE: /* Perl space */
+ case PT_PXSPACE: /* POSIX space */
+ switch(c)
+ {
+ HSPACE_CASES:
+ VSPACE_CASES:
+ OK = TRUE;
+ break;
+
+ default:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_Z;
+ break;
+ }
+ break;
+
+ case PT_WORD:
+ OK = PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
+ c == CHAR_UNDERSCORE;
+ break;
+
+ case PT_CLIST:
+ cp = PRIV(ucd_caseless_sets) + code[1 + IMM2_SIZE + 2];
+ for (;;)
+ {
+ if (c < *cp) { OK = FALSE; break; }
+ if (c == *cp++) { OK = TRUE; break; }
+ }
+ break;
+
+ case PT_UCNC:
+ OK = c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000;
+ break;
+
+ /* Should never occur, but keep compilers from grumbling. */
+
+ default:
+ OK = codevalue != OP_PROP;
+ break;
+ }
+
+ if (OK == (d == OP_PROP))
+ {
+ if (codevalue == OP_PROP_EXTRA + OP_TYPEPOSUPTO)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW(state_offset + 1 + IMM2_SIZE + 3, 0); }
+ else
+ { ADD_NEW(state_offset, count); }
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_EXTUNI_EXTRA + OP_TYPEEXACT:
+ case OP_EXTUNI_EXTRA + OP_TYPEUPTO:
+ case OP_EXTUNI_EXTRA + OP_TYPEMINUPTO:
+ case OP_EXTUNI_EXTRA + OP_TYPEPOSUPTO:
+ if (codevalue != OP_EXTUNI_EXTRA + OP_TYPEEXACT)
+ { ADD_ACTIVE(state_offset + 2 + IMM2_SIZE, 0); }
+ count = current_state->count; /* Number already matched */
+ if (clen > 0)
+ {
+ uint32_t lgb, rgb;
+ PCRE2_SPTR nptr = ptr + clen;
+ int ncount = 0;
+ if (codevalue == OP_EXTUNI_EXTRA + OP_TYPEPOSUPTO)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ lgb = UCD_GRAPHBREAK(c);
+ while (nptr < end_subject)
+ {
+ dlen = 1;
+ if (!utf) d = *nptr; else { GETCHARLEN(d, nptr, dlen); }
+ rgb = UCD_GRAPHBREAK(d);
+ if ((PRIV(ucp_gbtable)[lgb] & (1u << rgb)) == 0) break;
+ ncount++;
+ lgb = rgb;
+ nptr += dlen;
+ }
+ if (nptr >= end_subject && (mb->moptions & PCRE2_PARTIAL_HARD) != 0)
+ reset_could_continue = TRUE;
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW_DATA(-(state_offset + 2 + IMM2_SIZE), 0, ncount); }
+ else
+ { ADD_NEW_DATA(-state_offset, count, ncount); }
+ }
+ break;
+#endif
+
+ /*-----------------------------------------------------------------*/
+ case OP_ANYNL_EXTRA + OP_TYPEEXACT:
+ case OP_ANYNL_EXTRA + OP_TYPEUPTO:
+ case OP_ANYNL_EXTRA + OP_TYPEMINUPTO:
+ case OP_ANYNL_EXTRA + OP_TYPEPOSUPTO:
+ if (codevalue != OP_ANYNL_EXTRA + OP_TYPEEXACT)
+ { ADD_ACTIVE(state_offset + 2 + IMM2_SIZE, 0); }
+ count = current_state->count; /* Number already matched */
+ if (clen > 0)
+ {
+ int ncount = 0;
+ switch (c)
+ {
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#ifndef EBCDIC
+ case 0x2028:
+ case 0x2029:
+#endif /* Not EBCDIC */
+ if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) break;
+ goto ANYNL03;
+
+ case CHAR_CR:
+ if (ptr + 1 < end_subject && UCHAR21TEST(ptr + 1) == CHAR_LF) ncount = 1;
+ /* Fall through */
+
+ ANYNL03:
+ case CHAR_LF:
+ if (codevalue == OP_ANYNL_EXTRA + OP_TYPEPOSUPTO)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW_DATA(-(state_offset + 2 + IMM2_SIZE), 0, ncount); }
+ else
+ { ADD_NEW_DATA(-state_offset, count, ncount); }
+ break;
+
+ default:
+ break;
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_VSPACE_EXTRA + OP_TYPEEXACT:
+ case OP_VSPACE_EXTRA + OP_TYPEUPTO:
+ case OP_VSPACE_EXTRA + OP_TYPEMINUPTO:
+ case OP_VSPACE_EXTRA + OP_TYPEPOSUPTO:
+ if (codevalue != OP_VSPACE_EXTRA + OP_TYPEEXACT)
+ { ADD_ACTIVE(state_offset + 2 + IMM2_SIZE, 0); }
+ count = current_state->count; /* Number already matched */
+ if (clen > 0)
+ {
+ BOOL OK;
+ switch (c)
+ {
+ VSPACE_CASES:
+ OK = TRUE;
+ break;
+
+ default:
+ OK = FALSE;
+ }
+
+ if (OK == (d == OP_VSPACE))
+ {
+ if (codevalue == OP_VSPACE_EXTRA + OP_TYPEPOSUPTO)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW_DATA(-(state_offset + 2 + IMM2_SIZE), 0, 0); }
+ else
+ { ADD_NEW_DATA(-state_offset, count, 0); }
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_HSPACE_EXTRA + OP_TYPEEXACT:
+ case OP_HSPACE_EXTRA + OP_TYPEUPTO:
+ case OP_HSPACE_EXTRA + OP_TYPEMINUPTO:
+ case OP_HSPACE_EXTRA + OP_TYPEPOSUPTO:
+ if (codevalue != OP_HSPACE_EXTRA + OP_TYPEEXACT)
+ { ADD_ACTIVE(state_offset + 2 + IMM2_SIZE, 0); }
+ count = current_state->count; /* Number already matched */
+ if (clen > 0)
+ {
+ BOOL OK;
+ switch (c)
+ {
+ HSPACE_CASES:
+ OK = TRUE;
+ break;
+
+ default:
+ OK = FALSE;
+ break;
+ }
+
+ if (OK == (d == OP_HSPACE))
+ {
+ if (codevalue == OP_HSPACE_EXTRA + OP_TYPEPOSUPTO)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW_DATA(-(state_offset + 2 + IMM2_SIZE), 0, 0); }
+ else
+ { ADD_NEW_DATA(-state_offset, count, 0); }
+ }
+ }
+ break;
+
+/* ========================================================================== */
+ /* These opcodes are followed by a character that is usually compared
+ to the current subject character; it is loaded into d. We still get
+ here even if there is no subject character, because in some cases zero
+ repetitions are permitted. */
+
+ /*-----------------------------------------------------------------*/
+ case OP_CHAR:
+ if (clen > 0 && c == d) { ADD_NEW(state_offset + dlen + 1, 0); }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_CHARI:
+ if (clen == 0) break;
+
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ if (c == d) { ADD_NEW(state_offset + dlen + 1, 0); } else
+ {
+ unsigned int othercase;
+ if (c < 128)
+ othercase = fcc[c];
+ else
+ othercase = UCD_OTHERCASE(c);
+ if (d == othercase) { ADD_NEW(state_offset + dlen + 1, 0); }
+ }
+ }
+ else
+#endif /* SUPPORT_UNICODE */
+ /* Not UTF mode */
+ {
+ if (TABLE_GET(c, lcc, c) == TABLE_GET(d, lcc, d))
+ { ADD_NEW(state_offset + 2, 0); }
+ }
+ break;
+
+
+#ifdef SUPPORT_UNICODE
+ /*-----------------------------------------------------------------*/
+ /* This is a tricky one because it can match more than one character.
+ Find out how many characters to skip, and then set up a negative state
+ to wait for them to pass before continuing. */
+
+ case OP_EXTUNI:
+ if (clen > 0)
+ {
+ uint32_t lgb, rgb;
+ PCRE2_SPTR nptr = ptr + clen;
+ int ncount = 0;
+ lgb = UCD_GRAPHBREAK(c);
+ while (nptr < end_subject)
+ {
+ dlen = 1;
+ if (!utf) d = *nptr; else { GETCHARLEN(d, nptr, dlen); }
+ rgb = UCD_GRAPHBREAK(d);
+ if ((PRIV(ucp_gbtable)[lgb] & (1u << rgb)) == 0) break;
+ ncount++;
+ lgb = rgb;
+ nptr += dlen;
+ }
+ if (nptr >= end_subject && (mb->moptions & PCRE2_PARTIAL_HARD) != 0)
+ reset_could_continue = TRUE;
+ ADD_NEW_DATA(-(state_offset + 1), 0, ncount);
+ }
+ break;
+#endif
+
+ /*-----------------------------------------------------------------*/
+ /* This is a tricky like EXTUNI because it too can match more than one
+ character (when CR is followed by LF). In this case, set up a negative
+ state to wait for one character to pass before continuing. */
+
+ case OP_ANYNL:
+ if (clen > 0) switch(c)
+ {
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#ifndef EBCDIC
+ case 0x2028:
+ case 0x2029:
+#endif /* Not EBCDIC */
+ if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) break;
+
+ case CHAR_LF:
+ ADD_NEW(state_offset + 1, 0);
+ break;
+
+ case CHAR_CR:
+ if (ptr + 1 >= end_subject)
+ {
+ ADD_NEW(state_offset + 1, 0);
+ if ((mb->moptions & PCRE2_PARTIAL_HARD) != 0)
+ reset_could_continue = TRUE;
+ }
+ else if (UCHAR21TEST(ptr + 1) == CHAR_LF)
+ {
+ ADD_NEW_DATA(-(state_offset + 1), 0, 1);
+ }
+ else
+ {
+ ADD_NEW(state_offset + 1, 0);
+ }
+ break;
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_NOT_VSPACE:
+ if (clen > 0) switch(c)
+ {
+ VSPACE_CASES:
+ break;
+
+ default:
+ ADD_NEW(state_offset + 1, 0);
+ break;
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_VSPACE:
+ if (clen > 0) switch(c)
+ {
+ VSPACE_CASES:
+ ADD_NEW(state_offset + 1, 0);
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_NOT_HSPACE:
+ if (clen > 0) switch(c)
+ {
+ HSPACE_CASES:
+ break;
+
+ default:
+ ADD_NEW(state_offset + 1, 0);
+ break;
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_HSPACE:
+ if (clen > 0) switch(c)
+ {
+ HSPACE_CASES:
+ ADD_NEW(state_offset + 1, 0);
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ /* Match a negated single character casefully. */
+
+ case OP_NOT:
+ if (clen > 0 && c != d) { ADD_NEW(state_offset + dlen + 1, 0); }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ /* Match a negated single character caselessly. */
+
+ case OP_NOTI:
+ if (clen > 0)
+ {
+ unsigned int otherd;
+#ifdef SUPPORT_UNICODE
+ if (utf && d >= 128)
+ otherd = UCD_OTHERCASE(d);
+ else
+#endif /* SUPPORT_UNICODE */
+ otherd = TABLE_GET(d, fcc, d);
+ if (c != d && c != otherd)
+ { ADD_NEW(state_offset + dlen + 1, 0); }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_POSPLUSI:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUSI:
+ case OP_NOTPOSPLUSI:
+ caseless = TRUE;
+ codevalue -= OP_STARI - OP_STAR;
+
+ /* Fall through */
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_POSPLUS:
+ case OP_NOTPLUS:
+ case OP_NOTMINPLUS:
+ case OP_NOTPOSPLUS:
+ count = current_state->count; /* Already matched */
+ if (count > 0) { ADD_ACTIVE(state_offset + dlen + 1, 0); }
+ if (clen > 0)
+ {
+ uint32_t otherd = NOTACHAR;
+ if (caseless)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf && d >= 128)
+ otherd = UCD_OTHERCASE(d);
+ else
+#endif /* SUPPORT_UNICODE */
+ otherd = TABLE_GET(d, fcc, d);
+ }
+ if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR))
+ {
+ if (count > 0 &&
+ (codevalue == OP_POSPLUS || codevalue == OP_NOTPOSPLUS))
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ count++;
+ ADD_NEW(state_offset, count);
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_POSQUERYI:
+ case OP_NOTQUERYI:
+ case OP_NOTMINQUERYI:
+ case OP_NOTPOSQUERYI:
+ caseless = TRUE;
+ codevalue -= OP_STARI - OP_STAR;
+ /* Fall through */
+ case OP_QUERY:
+ case OP_MINQUERY:
+ case OP_POSQUERY:
+ case OP_NOTQUERY:
+ case OP_NOTMINQUERY:
+ case OP_NOTPOSQUERY:
+ ADD_ACTIVE(state_offset + dlen + 1, 0);
+ if (clen > 0)
+ {
+ uint32_t otherd = NOTACHAR;
+ if (caseless)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf && d >= 128)
+ otherd = UCD_OTHERCASE(d);
+ else
+#endif /* SUPPORT_UNICODE */
+ otherd = TABLE_GET(d, fcc, d);
+ }
+ if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR))
+ {
+ if (codevalue == OP_POSQUERY || codevalue == OP_NOTPOSQUERY)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ ADD_NEW(state_offset + dlen + 1, 0);
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_POSSTARI:
+ case OP_NOTSTARI:
+ case OP_NOTMINSTARI:
+ case OP_NOTPOSSTARI:
+ caseless = TRUE;
+ codevalue -= OP_STARI - OP_STAR;
+ /* Fall through */
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_POSSTAR:
+ case OP_NOTSTAR:
+ case OP_NOTMINSTAR:
+ case OP_NOTPOSSTAR:
+ ADD_ACTIVE(state_offset + dlen + 1, 0);
+ if (clen > 0)
+ {
+ uint32_t otherd = NOTACHAR;
+ if (caseless)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf && d >= 128)
+ otherd = UCD_OTHERCASE(d);
+ else
+#endif /* SUPPORT_UNICODE */
+ otherd = TABLE_GET(d, fcc, d);
+ }
+ if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR))
+ {
+ if (codevalue == OP_POSSTAR || codevalue == OP_NOTPOSSTAR)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ ADD_NEW(state_offset, 0);
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_EXACTI:
+ case OP_NOTEXACTI:
+ caseless = TRUE;
+ codevalue -= OP_STARI - OP_STAR;
+ /* Fall through */
+ case OP_EXACT:
+ case OP_NOTEXACT:
+ count = current_state->count; /* Number already matched */
+ if (clen > 0)
+ {
+ uint32_t otherd = NOTACHAR;
+ if (caseless)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf && d >= 128)
+ otherd = UCD_OTHERCASE(d);
+ else
+#endif /* SUPPORT_UNICODE */
+ otherd = TABLE_GET(d, fcc, d);
+ }
+ if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR))
+ {
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW(state_offset + dlen + 1 + IMM2_SIZE, 0); }
+ else
+ { ADD_NEW(state_offset, count); }
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_UPTOI:
+ case OP_MINUPTOI:
+ case OP_POSUPTOI:
+ case OP_NOTUPTOI:
+ case OP_NOTMINUPTOI:
+ case OP_NOTPOSUPTOI:
+ caseless = TRUE;
+ codevalue -= OP_STARI - OP_STAR;
+ /* Fall through */
+ case OP_UPTO:
+ case OP_MINUPTO:
+ case OP_POSUPTO:
+ case OP_NOTUPTO:
+ case OP_NOTMINUPTO:
+ case OP_NOTPOSUPTO:
+ ADD_ACTIVE(state_offset + dlen + 1 + IMM2_SIZE, 0);
+ count = current_state->count; /* Number already matched */
+ if (clen > 0)
+ {
+ uint32_t otherd = NOTACHAR;
+ if (caseless)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf && d >= 128)
+ otherd = UCD_OTHERCASE(d);
+ else
+#endif /* SUPPORT_UNICODE */
+ otherd = TABLE_GET(d, fcc, d);
+ }
+ if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR))
+ {
+ if (codevalue == OP_POSUPTO || codevalue == OP_NOTPOSUPTO)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ if (++count >= (int)GET2(code, 1))
+ { ADD_NEW(state_offset + dlen + 1 + IMM2_SIZE, 0); }
+ else
+ { ADD_NEW(state_offset, count); }
+ }
+ }
+ break;
+
+
+/* ========================================================================== */
+ /* These are the class-handling opcodes */
+
+ case OP_CLASS:
+ case OP_NCLASS:
+ case OP_XCLASS:
+ {
+ BOOL isinclass = FALSE;
+ int next_state_offset;
+ PCRE2_SPTR ecode;
+
+ /* For a simple class, there is always just a 32-byte table, and we
+ can set isinclass from it. */
+
+ if (codevalue != OP_XCLASS)
+ {
+ ecode = code + 1 + (32 / sizeof(PCRE2_UCHAR));
+ if (clen > 0)
+ {
+ isinclass = (c > 255)? (codevalue == OP_NCLASS) :
+ ((((uint8_t *)(code + 1))[c/8] & (1 << (c&7))) != 0);
+ }
+ }
+
+ /* An extended class may have a table or a list of single characters,
+ ranges, or both, and it may be positive or negative. There's a
+ function that sorts all this out. */
+
+ else
+ {
+ ecode = code + GET(code, 1);
+ if (clen > 0) isinclass = PRIV(xclass)(c, code + 1 + LINK_SIZE, utf);
+ }
+
+ /* At this point, isinclass is set for all kinds of class, and ecode
+ points to the byte after the end of the class. If there is a
+ quantifier, this is where it will be. */
+
+ next_state_offset = (int)(ecode - start_code);
+
+ switch (*ecode)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPOSSTAR:
+ ADD_ACTIVE(next_state_offset + 1, 0);
+ if (isinclass)
+ {
+ if (*ecode == OP_CRPOSSTAR)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ ADD_NEW(state_offset, 0);
+ }
+ break;
+
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRPOSPLUS:
+ count = current_state->count; /* Already matched */
+ if (count > 0) { ADD_ACTIVE(next_state_offset + 1, 0); }
+ if (isinclass)
+ {
+ if (count > 0 && *ecode == OP_CRPOSPLUS)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ count++;
+ ADD_NEW(state_offset, count);
+ }
+ break;
+
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ case OP_CRPOSQUERY:
+ ADD_ACTIVE(next_state_offset + 1, 0);
+ if (isinclass)
+ {
+ if (*ecode == OP_CRPOSQUERY)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ ADD_NEW(next_state_offset + 1, 0);
+ }
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ case OP_CRPOSRANGE:
+ count = current_state->count; /* Already matched */
+ if (count >= (int)GET2(ecode, 1))
+ { ADD_ACTIVE(next_state_offset + 1 + 2 * IMM2_SIZE, 0); }
+ if (isinclass)
+ {
+ int max = (int)GET2(ecode, 1 + IMM2_SIZE);
+ if (*ecode == OP_CRPOSRANGE)
+ {
+ active_count--; /* Remove non-match possibility */
+ next_active_state--;
+ }
+ if (++count >= max && max != 0) /* Max 0 => no limit */
+ { ADD_NEW(next_state_offset + 1 + 2 * IMM2_SIZE, 0); }
+ else
+ { ADD_NEW(state_offset, count); }
+ }
+ break;
+
+ default:
+ if (isinclass) { ADD_NEW(next_state_offset, 0); }
+ break;
+ }
+ }
+ break;
+
+/* ========================================================================== */
+ /* These are the opcodes for fancy brackets of various kinds. We have
+ to use recursion in order to handle them. The "always failing" assertion
+ (?!) is optimised to OP_FAIL when compiling, so we have to support that,
+ though the other "backtracking verbs" are not supported. */
+
+ case OP_FAIL:
+ forced_fail++; /* Count FAILs for multiple states */
+ break;
+
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ {
+ PCRE2_SPTR endasscode = code + GET(code, 1);
+ PCRE2_SIZE local_offsets[2];
+ int rc;
+ int local_workspace[1000];
+
+ while (*endasscode == OP_ALT) endasscode += GET(endasscode, 1);
+
+ rc = internal_dfa_match(
+ mb, /* static match data */
+ code, /* this subexpression's code */
+ ptr, /* where we currently are */
+ (PCRE2_SIZE)(ptr - start_subject), /* start offset */
+ local_offsets, /* offset vector */
+ sizeof(local_offsets)/sizeof(PCRE2_SIZE), /* size of same */
+ local_workspace, /* workspace vector */
+ sizeof(local_workspace)/sizeof(int), /* size of same */
+ rlevel); /* function recursion level */
+
+ if (rc < 0 && rc != PCRE2_ERROR_NOMATCH) return rc;
+ if ((rc >= 0) == (codevalue == OP_ASSERT || codevalue == OP_ASSERTBACK))
+ { ADD_ACTIVE((int)(endasscode + LINK_SIZE + 1 - start_code), 0); }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_COND:
+ case OP_SCOND:
+ {
+ PCRE2_SIZE local_offsets[1000];
+ int local_workspace[1000];
+ int codelink = (int)GET(code, 1);
+ PCRE2_UCHAR condcode;
+
+ /* Because of the way auto-callout works during compile, a callout item
+ is inserted between OP_COND and an assertion condition. This does not
+ happen for the other conditions. */
+
+ if (code[LINK_SIZE + 1] == OP_CALLOUT
+ || code[LINK_SIZE + 1] == OP_CALLOUT_STR)
+ {
+ PCRE2_SIZE callout_length = (code[LINK_SIZE + 1] == OP_CALLOUT)?
+ (PCRE2_SIZE)PRIV(OP_lengths)[OP_CALLOUT] :
+ (PCRE2_SIZE)GET(code, 2 + 3*LINK_SIZE);
+
+ rrc = 0;
+ if (mb->callout != NULL)
+ {
+ pcre2_callout_block cb;
+ cb.version = 1;
+ cb.capture_top = 1;
+ cb.capture_last = 0;
+ cb.offset_vector = offsets;
+ cb.mark = NULL; /* No (*MARK) support */
+ cb.subject = start_subject;
+ cb.subject_length = (PCRE2_SIZE)(end_subject - start_subject);
+ cb.start_match = (PCRE2_SIZE)(current_subject - start_subject);
+ cb.current_position = (PCRE2_SIZE)(ptr - start_subject);
+ cb.pattern_position = GET(code, LINK_SIZE + 2);
+ cb.next_item_length = GET(code, LINK_SIZE + 2 + LINK_SIZE);
+
+ if (code[LINK_SIZE + 1] == OP_CALLOUT)
+ {
+ cb.callout_number = code[2 + 3*LINK_SIZE];
+ cb.callout_string_offset = 0;
+ cb.callout_string = NULL;
+ cb.callout_string_length = 0;
+ }
+ else
+ {
+ cb.callout_number = 0;
+ cb.callout_string_offset = GET(code, 2 + 4*LINK_SIZE);
+ cb.callout_string = code + (2 + 5*LINK_SIZE) + 1;
+ cb.callout_string_length =
+ callout_length - (1 + 4*LINK_SIZE) - 2;
+ }
+
+ if ((rrc = (mb->callout)(&cb, mb->callout_data)) < 0)
+ return rrc; /* Abandon */
+ }
+ if (rrc > 0) break; /* Fail this thread */
+ code += callout_length; /* Skip callout data */
+ }
+
+ condcode = code[LINK_SIZE+1];
+
+ /* Back reference conditions and duplicate named recursion conditions
+ are not supported */
+
+ if (condcode == OP_CREF || condcode == OP_DNCREF ||
+ condcode == OP_DNRREF)
+ return PCRE2_ERROR_DFA_UCOND;
+
+ /* The DEFINE condition is always false, and the assertion (?!) is
+ converted to OP_FAIL. */
+
+ if (condcode == OP_FALSE || condcode == OP_FAIL)
+ { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); }
+
+ /* There is also an always-true condition */
+
+ else if (condcode == OP_TRUE)
+ { ADD_ACTIVE(state_offset + LINK_SIZE + 2 + IMM2_SIZE, 0); }
+
+ /* The only supported version of OP_RREF is for the value RREF_ANY,
+ which means "test if in any recursion". We can't test for specifically
+ recursed groups. */
+
+ else if (condcode == OP_RREF)
+ {
+ unsigned int value = GET2(code, LINK_SIZE + 2);
+ if (value != RREF_ANY) return PCRE2_ERROR_DFA_UCOND;
+ if (mb->recursive != NULL)
+ { ADD_ACTIVE(state_offset + LINK_SIZE + 2 + IMM2_SIZE, 0); }
+ else { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); }
+ }
+
+ /* Otherwise, the condition is an assertion */
+
+ else
+ {
+ int rc;
+ PCRE2_SPTR asscode = code + LINK_SIZE + 1;
+ PCRE2_SPTR endasscode = asscode + GET(asscode, 1);
+
+ while (*endasscode == OP_ALT) endasscode += GET(endasscode, 1);
+
+ rc = internal_dfa_match(
+ mb, /* fixed match data */
+ asscode, /* this subexpression's code */
+ ptr, /* where we currently are */
+ (PCRE2_SIZE)(ptr - start_subject), /* start offset */
+ local_offsets, /* offset vector */
+ sizeof(local_offsets)/sizeof(PCRE2_SIZE), /* size of same */
+ local_workspace, /* workspace vector */
+ sizeof(local_workspace)/sizeof(int), /* size of same */
+ rlevel); /* function recursion level */
+
+ if (rc < 0 && rc != PCRE2_ERROR_NOMATCH) return rc;
+ if ((rc >= 0) ==
+ (condcode == OP_ASSERT || condcode == OP_ASSERTBACK))
+ { ADD_ACTIVE((int)(endasscode + LINK_SIZE + 1 - start_code), 0); }
+ else
+ { ADD_ACTIVE(state_offset + codelink + LINK_SIZE + 1, 0); }
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_RECURSE:
+ {
+ dfa_recursion_info *ri;
+ PCRE2_SIZE local_offsets[1000];
+ int local_workspace[1000];
+ PCRE2_SPTR callpat = start_code + GET(code, 1);
+ uint32_t recno = (callpat == mb->start_code)? 0 :
+ GET2(callpat, 1 + LINK_SIZE);
+ int rc;
+
+ /* Check for repeating a recursion without advancing the subject
+ pointer. This should catch convoluted mutual recursions. (Some simple
+ cases are caught at compile time.) */
+
+ for (ri = mb->recursive; ri != NULL; ri = ri->prevrec)
+ if (recno == ri->group_num && ptr == ri->subject_position)
+ return PCRE2_ERROR_RECURSELOOP;
+
+ /* Remember this recursion and where we started it so as to
+ catch infinite loops. */
+
+ new_recursive.group_num = recno;
+ new_recursive.subject_position = ptr;
+ new_recursive.prevrec = mb->recursive;
+ mb->recursive = &new_recursive;
+
+ rc = internal_dfa_match(
+ mb, /* fixed match data */
+ callpat, /* this subexpression's code */
+ ptr, /* where we currently are */
+ (PCRE2_SIZE)(ptr - start_subject), /* start offset */
+ local_offsets, /* offset vector */
+ sizeof(local_offsets)/sizeof(PCRE2_SIZE), /* size of same */
+ local_workspace, /* workspace vector */
+ sizeof(local_workspace)/sizeof(int), /* size of same */
+ rlevel); /* function recursion level */
+
+ mb->recursive = new_recursive.prevrec; /* Done this recursion */
+
+ /* Ran out of internal offsets */
+
+ if (rc == 0) return PCRE2_ERROR_DFA_RECURSE;
+
+ /* For each successful matched substring, set up the next state with a
+ count of characters to skip before trying it. Note that the count is in
+ characters, not bytes. */
+
+ if (rc > 0)
+ {
+ for (rc = rc*2 - 2; rc >= 0; rc -= 2)
+ {
+ PCRE2_SIZE charcount = local_offsets[rc+1] - local_offsets[rc];
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+ if (utf)
+ {
+ PCRE2_SPTR p = start_subject + local_offsets[rc];
+ PCRE2_SPTR pp = start_subject + local_offsets[rc+1];
+ while (p < pp) if (NOT_FIRSTCU(*p++)) charcount--;
+ }
+#endif
+ if (charcount > 0)
+ {
+ ADD_NEW_DATA(-(state_offset + LINK_SIZE + 1), 0,
+ (int)(charcount - 1));
+ }
+ else
+ {
+ ADD_ACTIVE(state_offset + LINK_SIZE + 1, 0);
+ }
+ }
+ }
+ else if (rc != PCRE2_ERROR_NOMATCH) return rc;
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_BRAPOS:
+ case OP_SBRAPOS:
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ case OP_BRAPOSZERO:
+ {
+ PCRE2_SIZE charcount, matched_count;
+ PCRE2_SPTR local_ptr = ptr;
+ BOOL allow_zero;
+
+ if (codevalue == OP_BRAPOSZERO)
+ {
+ allow_zero = TRUE;
+ codevalue = *(++code); /* Codevalue will be one of above BRAs */
+ }
+ else allow_zero = FALSE;
+
+ /* Loop to match the subpattern as many times as possible as if it were
+ a complete pattern. */
+
+ for (matched_count = 0;; matched_count++)
+ {
+ PCRE2_SIZE local_offsets[2];
+ int local_workspace[1000];
+
+ int rc = internal_dfa_match(
+ mb, /* fixed match data */
+ code, /* this subexpression's code */
+ local_ptr, /* where we currently are */
+ (PCRE2_SIZE)(ptr - start_subject), /* start offset */
+ local_offsets, /* offset vector */
+ sizeof(local_offsets)/sizeof(PCRE2_SIZE), /* size of same */
+ local_workspace, /* workspace vector */
+ sizeof(local_workspace)/sizeof(int), /* size of same */
+ rlevel); /* function recursion level */
+
+ /* Failed to match */
+
+ if (rc < 0)
+ {
+ if (rc != PCRE2_ERROR_NOMATCH) return rc;
+ break;
+ }
+
+ /* Matched: break the loop if zero characters matched. */
+
+ charcount = local_offsets[1] - local_offsets[0];
+ if (charcount == 0) break;
+ local_ptr += charcount; /* Advance temporary position ptr */
+ }
+
+ /* At this point we have matched the subpattern matched_count
+ times, and local_ptr is pointing to the character after the end of the
+ last match. */
+
+ if (matched_count > 0 || allow_zero)
+ {
+ PCRE2_SPTR end_subpattern = code;
+ int next_state_offset;
+
+ do { end_subpattern += GET(end_subpattern, 1); }
+ while (*end_subpattern == OP_ALT);
+ next_state_offset =
+ (int)(end_subpattern - start_code + LINK_SIZE + 1);
+
+ /* Optimization: if there are no more active states, and there
+ are no new states yet set up, then skip over the subject string
+ right here, to save looping. Otherwise, set up the new state to swing
+ into action when the end of the matched substring is reached. */
+
+ if (i + 1 >= active_count && new_count == 0)
+ {
+ ptr = local_ptr;
+ clen = 0;
+ ADD_NEW(next_state_offset, 0);
+ }
+ else
+ {
+ PCRE2_SPTR p = ptr;
+ PCRE2_SPTR pp = local_ptr;
+ charcount = (PCRE2_SIZE)(pp - p);
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+ if (utf) while (p < pp) if (NOT_FIRSTCU(*p++)) charcount--;
+#endif
+ ADD_NEW_DATA(-next_state_offset, 0, (int)(charcount - 1));
+ }
+ }
+ }
+ break;
+
+ /*-----------------------------------------------------------------*/
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ {
+ PCRE2_SIZE local_offsets[2];
+ int local_workspace[1000];
+
+ int rc = internal_dfa_match(
+ mb, /* fixed match data */
+ code, /* this subexpression's code */
+ ptr, /* where we currently are */
+ (PCRE2_SIZE)(ptr - start_subject), /* start offset */
+ local_offsets, /* offset vector */
+ sizeof(local_offsets)/sizeof(PCRE2_SIZE), /* size of same */
+ local_workspace, /* workspace vector */
+ sizeof(local_workspace)/sizeof(int), /* size of same */
+ rlevel); /* function recursion level */
+
+ if (rc >= 0)
+ {
+ PCRE2_SPTR end_subpattern = code;
+ PCRE2_SIZE charcount = local_offsets[1] - local_offsets[0];
+ int next_state_offset, repeat_state_offset;
+
+ do { end_subpattern += GET(end_subpattern, 1); }
+ while (*end_subpattern == OP_ALT);
+ next_state_offset =
+ (int)(end_subpattern - start_code + LINK_SIZE + 1);
+
+ /* If the end of this subpattern is KETRMAX or KETRMIN, we must
+ arrange for the repeat state also to be added to the relevant list.
+ Calculate the offset, or set -1 for no repeat. */
+
+ repeat_state_offset = (*end_subpattern == OP_KETRMAX ||
+ *end_subpattern == OP_KETRMIN)?
+ (int)(end_subpattern - start_code - GET(end_subpattern, 1)) : -1;
+
+ /* If we have matched an empty string, add the next state at the
+ current character pointer. This is important so that the duplicate
+ checking kicks in, which is what breaks infinite loops that match an
+ empty string. */
+
+ if (charcount == 0)
+ {
+ ADD_ACTIVE(next_state_offset, 0);
+ }
+
+ /* Optimization: if there are no more active states, and there
+ are no new states yet set up, then skip over the subject string
+ right here, to save looping. Otherwise, set up the new state to swing
+ into action when the end of the matched substring is reached. */
+
+ else if (i + 1 >= active_count && new_count == 0)
+ {
+ ptr += charcount;
+ clen = 0;
+ ADD_NEW(next_state_offset, 0);
+
+ /* If we are adding a repeat state at the new character position,
+ we must fudge things so that it is the only current state.
+ Otherwise, it might be a duplicate of one we processed before, and
+ that would cause it to be skipped. */
+
+ if (repeat_state_offset >= 0)
+ {
+ next_active_state = active_states;
+ active_count = 0;
+ i = -1;
+ ADD_ACTIVE(repeat_state_offset, 0);
+ }
+ }
+ else
+ {
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+ if (utf)
+ {
+ PCRE2_SPTR p = start_subject + local_offsets[0];
+ PCRE2_SPTR pp = start_subject + local_offsets[1];
+ while (p < pp) if (NOT_FIRSTCU(*p++)) charcount--;
+ }
+#endif
+ ADD_NEW_DATA(-next_state_offset, 0, (int)(charcount - 1));
+ if (repeat_state_offset >= 0)
+ { ADD_NEW_DATA(-repeat_state_offset, 0, (int)(charcount - 1)); }
+ }
+ }
+ else if (rc != PCRE2_ERROR_NOMATCH) return rc;
+ }
+ break;
+
+
+/* ========================================================================== */
+ /* Handle callouts */
+
+ case OP_CALLOUT:
+ case OP_CALLOUT_STR:
+ {
+ unsigned int callout_length = (*code == OP_CALLOUT)
+ ? PRIV(OP_lengths)[OP_CALLOUT] : GET(code, 1 + 2*LINK_SIZE);
+ rrc = 0;
+
+ if (mb->callout != NULL)
+ {
+ pcre2_callout_block cb;
+ cb.version = 1;
+ cb.capture_top = 1;
+ cb.capture_last = 0;
+ cb.offset_vector = offsets;
+ cb.mark = NULL; /* No (*MARK) support */
+ cb.subject = start_subject;
+ cb.subject_length = (PCRE2_SIZE)(end_subject - start_subject);
+ cb.start_match = (PCRE2_SIZE)(current_subject - start_subject);
+ cb.current_position = (PCRE2_SIZE)(ptr - start_subject);
+ cb.pattern_position = GET(code, 1);
+ cb.next_item_length = GET(code, 1 + LINK_SIZE);
+
+ if (*code == OP_CALLOUT)
+ {
+ cb.callout_number = code[1 + 2*LINK_SIZE];
+ cb.callout_string_offset = 0;
+ cb.callout_string = NULL;
+ cb.callout_string_length = 0;
+ }
+ else
+ {
+ cb.callout_number = 0;
+ cb.callout_string_offset = GET(code, 1 + 3*LINK_SIZE);
+ cb.callout_string = code + (1 + 4*LINK_SIZE) + 1;
+ cb.callout_string_length =
+ callout_length - (1 + 4*LINK_SIZE) - 2;
+ }
+
+ if ((rrc = (mb->callout)(&cb, mb->callout_data)) < 0)
+ return rrc; /* Abandon */
+ }
+ if (rrc == 0)
+ { ADD_ACTIVE(state_offset + (int)callout_length, 0); }
+ }
+ break;
+
+
+/* ========================================================================== */
+ default: /* Unsupported opcode */
+ return PCRE2_ERROR_DFA_UITEM;
+ }
+
+ NEXT_ACTIVE_STATE: continue;
+
+ } /* End of loop scanning active states */
+
+ /* We have finished the processing at the current subject character. If no
+ new states have been set for the next character, we have found all the
+ matches that we are going to find. If we are at the top level and partial
+ matching has been requested, check for appropriate conditions.
+
+ The "forced_ fail" variable counts the number of (*F) encountered for the
+ character. If it is equal to the original active_count (saved in
+ workspace[1]) it means that (*F) was found on every active state. In this
+ case we don't want to give a partial match.
+
+ The "could_continue" variable is true if a state could have continued but
+ for the fact that the end of the subject was reached. */
+
+ if (new_count <= 0)
+ {
+ if (rlevel == 1 && /* Top level, and */
+ could_continue && /* Some could go on, and */
+ forced_fail != workspace[1] && /* Not all forced fail & */
+ ( /* either... */
+ (mb->moptions & PCRE2_PARTIAL_HARD) != 0 /* Hard partial */
+ || /* or... */
+ ((mb->moptions & PCRE2_PARTIAL_SOFT) != 0 && /* Soft partial and */
+ match_count < 0) /* no matches */
+ ) && /* And... */
+ (
+ partial_newline || /* Either partial NL */
+ ( /* or ... */
+ ptr >= end_subject && /* End of subject and */
+ ptr > mb->start_used_ptr) /* Inspected non-empty string */
+ )
+ )
+ match_count = PCRE2_ERROR_PARTIAL;
+ break; /* In effect, "return", but see the comment below */
+ }
+
+ /* One or more states are active for the next character. */
+
+ ptr += clen; /* Advance to next subject character */
+ } /* Loop to move along the subject string */
+
+/* Control gets here from "break" a few lines above. We do it this way because
+if we use "return" above, we have compiler trouble. Some compilers warn if
+there's nothing here because they think the function doesn't return a value. On
+the other hand, if we put a dummy statement here, some more clever compilers
+complain that it can't be reached. Sigh. */
+
+return match_count;
+}
+
+
+
+/*************************************************
+* Match a pattern using the DFA algorithm *
+*************************************************/
+
+/* This function matches a compiled pattern to a subject string, using the
+alternate matching algorithm that finds all matches at once.
+
+Arguments:
+ code points to the compiled pattern
+ subject subject string
+ length length of subject string
+ startoffset where to start matching in the subject
+ options option bits
+ match_data points to a match data structure
+ gcontext points to a match context
+ workspace pointer to workspace
+ wscount size of workspace
+
+Returns: > 0 => number of match offset pairs placed in offsets
+ = 0 => offsets overflowed; longest matches are present
+ -1 => failed to match
+ < -1 => some kind of unexpected problem
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_dfa_match(const pcre2_code *code, PCRE2_SPTR subject, PCRE2_SIZE length,
+ PCRE2_SIZE start_offset, uint32_t options, pcre2_match_data *match_data,
+ pcre2_match_context *mcontext, int *workspace, PCRE2_SIZE wscount)
+{
+const pcre2_real_code *re = (const pcre2_real_code *)code;
+
+PCRE2_SPTR start_match;
+PCRE2_SPTR end_subject;
+PCRE2_SPTR bumpalong_limit;
+PCRE2_SPTR req_cu_ptr;
+
+BOOL utf, anchored, startline, firstline;
+
+BOOL has_first_cu = FALSE;
+BOOL has_req_cu = FALSE;
+PCRE2_UCHAR first_cu = 0;
+PCRE2_UCHAR first_cu2 = 0;
+PCRE2_UCHAR req_cu = 0;
+PCRE2_UCHAR req_cu2 = 0;
+
+const uint8_t *start_bits = NULL;
+
+/* We need to have mb pointing to a match block, because the IS_NEWLINE macro
+is used below, and it expects NLBLOCK to be defined as a pointer. */
+
+dfa_match_block actual_match_block;
+dfa_match_block *mb = &actual_match_block;
+
+/* A length equal to PCRE2_ZERO_TERMINATED implies a zero-terminated
+subject string. */
+
+if (length == PCRE2_ZERO_TERMINATED) length = PRIV(strlen)(subject);
+
+/* Plausibility checks */
+
+if ((options & ~PUBLIC_DFA_MATCH_OPTIONS) != 0) return PCRE2_ERROR_BADOPTION;
+if (re == NULL || subject == NULL || workspace == NULL || match_data == NULL)
+ return PCRE2_ERROR_NULL;
+if (wscount < 20) return PCRE2_ERROR_DFA_WSSIZE;
+if (start_offset > length) return PCRE2_ERROR_BADOFFSET;
+
+/* Check that the first field in the block is the magic number. If it is not,
+return with PCRE2_ERROR_BADMAGIC. */
+
+if (re->magic_number != MAGIC_NUMBER) return PCRE2_ERROR_BADMAGIC;
+
+/* Check the code unit width. */
+
+if ((re->flags & PCRE2_MODE_MASK) != PCRE2_CODE_UNIT_WIDTH/8)
+ return PCRE2_ERROR_BADMODE;
+
+/* PCRE2_NOTEMPTY and PCRE2_NOTEMPTY_ATSTART are match-time flags in the
+options variable for this function. Users of PCRE2 who are not calling the
+function directly would like to have a way of setting these flags, in the same
+way that they can set pcre2_compile() flags like PCRE2_NO_AUTOPOSSESS with
+constructions like (*NO_AUTOPOSSESS). To enable this, (*NOTEMPTY) and
+(*NOTEMPTY_ATSTART) set bits in the pattern's "flag" function which can now be
+transferred to the options for this function. The bits are guaranteed to be
+adjacent, but do not have the same values. This bit of Boolean trickery assumes
+that the match-time bits are not more significant than the flag bits. If by
+accident this is not the case, a compile-time division by zero error will
+occur. */
+
+#define FF (PCRE2_NOTEMPTY_SET|PCRE2_NE_ATST_SET)
+#define OO (PCRE2_NOTEMPTY|PCRE2_NOTEMPTY_ATSTART)
+options |= (re->flags & FF) / ((FF & (~FF+1)) / (OO & (~OO+1)));
+#undef FF
+#undef OO
+
+/* If restarting after a partial match, do some sanity checks on the contents
+of the workspace. */
+
+if ((options & PCRE2_DFA_RESTART) != 0)
+ {
+ if ((workspace[0] & (-2)) != 0 || workspace[1] < 1 ||
+ workspace[1] > (int)((wscount - 2)/INTS_PER_STATEBLOCK))
+ return PCRE2_ERROR_DFA_BADRESTART;
+ }
+
+/* Set some local values */
+
+utf = (re->overall_options & PCRE2_UTF) != 0;
+start_match = subject + start_offset;
+end_subject = subject + length;
+req_cu_ptr = start_match - 1;
+anchored = (options & (PCRE2_ANCHORED|PCRE2_DFA_RESTART)) != 0 ||
+ (re->overall_options & PCRE2_ANCHORED) != 0;
+
+/* The "must be at the start of a line" flags are used in a loop when finding
+where to start. */
+
+startline = (re->flags & PCRE2_STARTLINE) != 0;
+firstline = (re->overall_options & PCRE2_FIRSTLINE) != 0;
+bumpalong_limit = end_subject;
+
+/* Get data from the match context, if present, and fill in the fields in the
+match block. It is an error to set an offset limit without setting the flag at
+compile time. */
+
+if (mcontext == NULL)
+ {
+ mb->callout = NULL;
+ mb->memctl = re->memctl;
+ mb->match_limit_recursion = PRIV(default_match_context).recursion_limit;
+ }
+else
+ {
+ if (mcontext->offset_limit != PCRE2_UNSET)
+ {
+ if ((re->overall_options & PCRE2_USE_OFFSET_LIMIT) == 0)
+ return PCRE2_ERROR_BADOFFSETLIMIT;
+ bumpalong_limit = subject + mcontext->offset_limit;
+ }
+ mb->callout = mcontext->callout;
+ mb->callout_data = mcontext->callout_data;
+ mb->memctl = mcontext->memctl;
+ mb->match_limit_recursion = mcontext->recursion_limit;
+ }
+if (mb->match_limit_recursion > re->limit_recursion)
+ mb->match_limit_recursion = re->limit_recursion;
+
+mb->start_code = (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code)) +
+ re->name_count * re->name_entry_size;
+mb->tables = re->tables;
+mb->start_subject = subject;
+mb->end_subject = end_subject;
+mb->start_offset = start_offset;
+mb->moptions = options;
+mb->poptions = re->overall_options;
+
+/* Process the \R and newline settings. */
+
+mb->bsr_convention = re->bsr_convention;
+mb->nltype = NLTYPE_FIXED;
+switch(re->newline_convention)
+ {
+ case PCRE2_NEWLINE_CR:
+ mb->nllen = 1;
+ mb->nl[0] = CHAR_CR;
+ break;
+
+ case PCRE2_NEWLINE_LF:
+ mb->nllen = 1;
+ mb->nl[0] = CHAR_NL;
+ break;
+
+ case PCRE2_NEWLINE_CRLF:
+ mb->nllen = 2;
+ mb->nl[0] = CHAR_CR;
+ mb->nl[1] = CHAR_NL;
+ break;
+
+ case PCRE2_NEWLINE_ANY:
+ mb->nltype = NLTYPE_ANY;
+ break;
+
+ case PCRE2_NEWLINE_ANYCRLF:
+ mb->nltype = NLTYPE_ANYCRLF;
+ break;
+
+ default: return PCRE2_ERROR_INTERNAL;
+ }
+
+/* Check a UTF string for validity if required. For 8-bit and 16-bit strings,
+we must also check that a starting offset does not point into the middle of a
+multiunit character. We check only the portion of the subject that is going to
+be inspected during matching - from the offset minus the maximum back reference
+to the given length. This saves time when a small part of a large subject is
+being matched by the use of a starting offset. Note that the maximum lookbehind
+is a number of characters, not code units. */
+
+#ifdef SUPPORT_UNICODE
+if (utf && (options & PCRE2_NO_UTF_CHECK) == 0)
+ {
+ PCRE2_SPTR check_subject = start_match; /* start_match includes offset */
+
+ if (start_offset > 0)
+ {
+#if PCRE2_CODE_UNIT_WIDTH != 32
+ unsigned int i;
+ if (start_match < end_subject && NOT_FIRSTCU(*start_match))
+ return PCRE2_ERROR_BADUTFOFFSET;
+ for (i = re->max_lookbehind; i > 0 && check_subject > subject; i--)
+ {
+ check_subject--;
+ while (check_subject > subject &&
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ (*check_subject & 0xc0) == 0x80)
+#else /* 16-bit */
+ (*check_subject & 0xfc00) == 0xdc00)
+#endif /* PCRE2_CODE_UNIT_WIDTH == 8 */
+ check_subject--;
+ }
+#else /* In the 32-bit library, one code unit equals one character. */
+ check_subject -= re->max_lookbehind;
+ if (check_subject < subject) check_subject = subject;
+#endif /* PCRE2_CODE_UNIT_WIDTH != 32 */
+ }
+
+ /* Validate the relevant portion of the subject. After an error, adjust the
+ offset to be an absolute offset in the whole string. */
+
+ match_data->rc = PRIV(valid_utf)(check_subject,
+ length - (PCRE2_SIZE)(check_subject - subject), &(match_data->startchar));
+ if (match_data->rc != 0)
+ {
+ match_data->startchar += (PCRE2_SIZE)(check_subject - subject);
+ return match_data->rc;
+ }
+ }
+#endif /* SUPPORT_UNICODE */
+
+/* Set up the first code unit to match, if available. The first_codeunit value
+is never set for an anchored regular expression, but the anchoring may be
+forced at run time, so we have to test for anchoring. The first code unit may
+be unset for an unanchored pattern, of course. If there's no first code unit
+there may be a bitmap of possible first characters. */
+
+if (!anchored)
+ {
+ if ((re->flags & PCRE2_FIRSTSET) != 0)
+ {
+ has_first_cu = TRUE;
+ first_cu = first_cu2 = (PCRE2_UCHAR)(re->first_codeunit);
+ if ((re->flags & PCRE2_FIRSTCASELESS) != 0)
+ {
+ first_cu2 = TABLE_GET(first_cu, mb->tables + fcc_offset, first_cu);
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 8
+ if (utf && first_cu > 127)
+ first_cu2 = (PCRE2_UCHAR)UCD_OTHERCASE(first_cu);
+#endif
+ }
+ }
+ else
+ if (!startline && (re->flags & PCRE2_FIRSTMAPSET) != 0)
+ start_bits = re->start_bitmap;
+ }
+
+/* For anchored or unanchored matches, there may be a "last known required
+character" set. */
+
+if ((re->flags & PCRE2_LASTSET) != 0)
+ {
+ has_req_cu = TRUE;
+ req_cu = req_cu2 = (PCRE2_UCHAR)(re->last_codeunit);
+ if ((re->flags & PCRE2_LASTCASELESS) != 0)
+ {
+ req_cu2 = TABLE_GET(req_cu, mb->tables + fcc_offset, req_cu);
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 8
+ if (utf && req_cu > 127) req_cu2 = (PCRE2_UCHAR)UCD_OTHERCASE(req_cu);
+#endif
+ }
+ }
+
+/* Fill in fields that are always returned in the match data. */
+
+match_data->code = re;
+match_data->subject = subject;
+match_data->mark = NULL;
+match_data->matchedby = PCRE2_MATCHEDBY_DFA_INTERPRETER;
+
+/* Call the main matching function, looping for a non-anchored regex after a
+failed match. If not restarting, perform certain optimizations at the start of
+a match. */
+
+for (;;)
+ {
+ int rc;
+
+ /* ----------------- Start of match optimizations ---------------- */
+
+ /* There are some optimizations that avoid running the match if a known
+ starting point is not found, or if a known later code unit is not present.
+ However, there is an option (settable at compile time) that disables
+ these, for testing and for ensuring that all callouts do actually occur.
+ The optimizations must also be avoided when restarting a DFA match. */
+
+ if ((re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0 &&
+ (options & PCRE2_DFA_RESTART) == 0)
+ {
+ PCRE2_SPTR save_end_subject = end_subject;
+
+ /* If firstline is TRUE, the start of the match is constrained to the first
+ line of a multiline string. That is, the match must be before or at the
+ first newline. Implement this by temporarily adjusting end_subject so that
+ we stop the optimization scans at a newline. If the match fails at the
+ newline, later code breaks this loop. */
+
+ if (firstline)
+ {
+ PCRE2_SPTR t = start_match;
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ while (t < mb->end_subject && !IS_NEWLINE(t))
+ {
+ t++;
+ ACROSSCHAR(t < end_subject, *t, t++);
+ }
+ }
+ else
+#endif
+ while (t < mb->end_subject && !IS_NEWLINE(t)) t++;
+ end_subject = t;
+ }
+
+ /* Advance to a unique first code unit if there is one. */
+
+ if (has_first_cu)
+ {
+ PCRE2_UCHAR smc;
+ if (first_cu != first_cu2)
+ while (start_match < end_subject &&
+ (smc = UCHAR21TEST(start_match)) != first_cu && smc != first_cu2)
+ start_match++;
+ else
+ while (start_match < end_subject && UCHAR21TEST(start_match) != first_cu)
+ start_match++;
+ }
+
+ /* Or to just after a linebreak for a multiline match */
+
+ else if (startline)
+ {
+ if (start_match > mb->start_subject + start_offset)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ while (start_match < end_subject && !WAS_NEWLINE(start_match))
+ {
+ start_match++;
+ ACROSSCHAR(start_match < end_subject, *start_match,
+ start_match++);
+ }
+ }
+ else
+#endif
+ while (start_match < end_subject && !WAS_NEWLINE(start_match))
+ start_match++;
+
+ /* If we have just passed a CR and the newline option is ANY or
+ ANYCRLF, and we are now at a LF, advance the match position by one more
+ code unit. */
+
+ if (start_match[-1] == CHAR_CR &&
+ (mb->nltype == NLTYPE_ANY || mb->nltype == NLTYPE_ANYCRLF) &&
+ start_match < end_subject &&
+ UCHAR21TEST(start_match) == CHAR_NL)
+ start_match++;
+ }
+ }
+
+ /* Or to a non-unique first code unit if any have been identified. The
+ bitmap contains only 256 bits. When code units are 16 or 32 bits wide, all
+ code units greater than 254 set the 255 bit. */
+
+ else if (start_bits != NULL)
+ {
+ while (start_match < end_subject)
+ {
+ uint32_t c = UCHAR21TEST(start_match);
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ if (c > 255) c = 255;
+#endif
+ if ((start_bits[c/8] & (1 << (c&7))) != 0) break;
+ start_match++;
+ }
+ }
+
+ /* Restore fudged end_subject */
+
+ end_subject = save_end_subject;
+
+ /* The following two optimizations are disabled for partial matching. */
+
+ if ((mb->moptions & (PCRE2_PARTIAL_HARD|PCRE2_PARTIAL_SOFT)) == 0)
+ {
+ /* The minimum matching length is a lower bound; no actual string of that
+ length may actually match the pattern. Although the value is, strictly,
+ in characters, we treat it as code units to avoid spending too much time
+ in this optimization. */
+
+ if (end_subject - start_match < re->minlength) return PCRE2_ERROR_NOMATCH;
+
+ /* If req_cu is set, we know that that code unit must appear in the
+ subject for the match to succeed. If the first code unit is set, req_cu
+ must be later in the subject; otherwise the test starts at the match
+ point. This optimization can save a huge amount of backtracking in
+ patterns with nested unlimited repeats that aren't going to match.
+ Writing separate code for cased/caseless versions makes it go faster, as
+ does using an autoincrement and backing off on a match.
+
+ HOWEVER: when the subject string is very, very long, searching to its end
+ can take a long time, and give bad performance on quite ordinary
+ patterns. This showed up when somebody was matching something like
+ /^\d+C/ on a 32-megabyte string... so we don't do this when the string is
+ sufficiently long. */
+
+ if (has_req_cu && end_subject - start_match < REQ_CU_MAX)
+ {
+ PCRE2_SPTR p = start_match + (has_first_cu? 1:0);
+
+ /* We don't need to repeat the search if we haven't yet reached the
+ place we found it at last time. */
+
+ if (p > req_cu_ptr)
+ {
+ if (req_cu != req_cu2)
+ {
+ while (p < end_subject)
+ {
+ uint32_t pp = UCHAR21INCTEST(p);
+ if (pp == req_cu || pp == req_cu2) { p--; break; }
+ }
+ }
+ else
+ {
+ while (p < end_subject)
+ {
+ if (UCHAR21INCTEST(p) == req_cu) { p--; break; }
+ }
+ }
+
+ /* If we can't find the required code unit, break the matching loop,
+ forcing a match failure. */
+
+ if (p >= end_subject) break;
+
+ /* If we have found the required code unit, save the point where we
+ found it, so that we don't search again next time round the loop if
+ the start hasn't passed this code unit yet. */
+
+ req_cu_ptr = p;
+ }
+ }
+ }
+ }
+
+ /* ------------ End of start of match optimizations ------------ */
+
+ /* Give no match if we have passed the bumpalong limit. */
+
+ if (start_match > bumpalong_limit) break;
+
+ /* OK, now we can do the business */
+
+ mb->start_used_ptr = start_match;
+ mb->last_used_ptr = start_match;
+ mb->recursive = NULL;
+
+ rc = internal_dfa_match(
+ mb, /* fixed match data */
+ mb->start_code, /* this subexpression's code */
+ start_match, /* where we currently are */
+ start_offset, /* start offset in subject */
+ match_data->ovector, /* offset vector */
+ (uint32_t)match_data->oveccount * 2, /* actual size of same */
+ workspace, /* workspace vector */
+ (int)wscount, /* size of same */
+ 0); /* function recurse level */
+
+ /* Anything other than "no match" means we are done, always; otherwise, carry
+ on only if not anchored. */
+
+ if (rc != PCRE2_ERROR_NOMATCH || anchored)
+ {
+ if (rc == PCRE2_ERROR_PARTIAL && match_data->oveccount > 0)
+ {
+ match_data->ovector[0] = (PCRE2_SIZE)(start_match - subject);
+ match_data->ovector[1] = (PCRE2_SIZE)(end_subject - subject);
+ }
+ match_data->leftchar = (PCRE2_SIZE)(mb->start_used_ptr - subject);
+ match_data->rightchar = (PCRE2_SIZE)( mb->last_used_ptr - subject);
+ match_data->startchar = (PCRE2_SIZE)(start_match - subject);
+ match_data->rc = rc;
+ return rc;
+ }
+
+ /* Advance to the next subject character unless we are at the end of a line
+ and firstline is set. */
+
+ if (firstline && IS_NEWLINE(start_match)) break;
+ start_match++;
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ ACROSSCHAR(start_match < end_subject, *start_match,
+ start_match++);
+ }
+#endif
+ if (start_match > end_subject) break;
+
+ /* If we have just passed a CR and we are now at a LF, and the pattern does
+ not contain any explicit matches for \r or \n, and the newline option is CRLF
+ or ANY or ANYCRLF, advance the match position by one more character. */
+
+ if (UCHAR21TEST(start_match - 1) == CHAR_CR &&
+ start_match < end_subject &&
+ UCHAR21TEST(start_match) == CHAR_NL &&
+ (re->flags & PCRE2_HASCRORLF) == 0 &&
+ (mb->nltype == NLTYPE_ANY ||
+ mb->nltype == NLTYPE_ANYCRLF ||
+ mb->nllen == 2))
+ start_match++;
+
+ } /* "Bumpalong" loop */
+
+
+return PCRE2_ERROR_NOMATCH;
+}
+
+/* End of pcre2_dfa_match.c */
diff --git a/thirdparty/pcre2/src/pcre2_error.c b/thirdparty/pcre2/src/pcre2_error.c
new file mode 100644
index 0000000000..437bdfd202
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_error.c
@@ -0,0 +1,325 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre2_internal.h"
+
+#define STRING(a) # a
+#define XSTRING(s) STRING(s)
+
+/* The texts of compile-time error messages. Compile-time error numbers start
+at COMPILE_ERROR_BASE (100).
+
+This used to be a table of strings, but in order to reduce the number of
+relocations needed when a shared library is loaded dynamically, it is now one
+long string. We cannot use a table of offsets, because the lengths of inserts
+such as XSTRING(MAX_NAME_SIZE) are not known. Instead,
+pcre2_get_error_message() counts through to the one it wants - this isn't a
+performance issue because these strings are used only when there is an error.
+
+Each substring ends with \0 to insert a null character. This includes the final
+substring, so that the whole string ends with \0\0, which can be detected when
+counting through. */
+
+static const unsigned char compile_error_texts[] =
+ "no error\0"
+ "\\ at end of pattern\0"
+ "\\c at end of pattern\0"
+ "unrecognized character follows \\\0"
+ "numbers out of order in {} quantifier\0"
+ /* 5 */
+ "number too big in {} quantifier\0"
+ "missing terminating ] for character class\0"
+ "invalid escape sequence in character class\0"
+ "range out of order in character class\0"
+ "quantifier does not follow a repeatable item\0"
+ /* 10 */
+ "internal error: unexpected repeat\0"
+ "unrecognized character after (? or (?-\0"
+ "POSIX named classes are supported only within a class\0"
+ "POSIX collating elements are not supported\0"
+ "missing closing parenthesis\0"
+ /* 15 */
+ "reference to non-existent subpattern\0"
+ "pattern passed as NULL\0"
+ "unrecognised compile-time option bit(s)\0"
+ "missing ) after (?# comment\0"
+ "parentheses are too deeply nested\0"
+ /* 20 */
+ "regular expression is too large\0"
+ "failed to allocate heap memory\0"
+ "unmatched closing parenthesis\0"
+ "internal error: code overflow\0"
+ "missing closing parenthesis for condition\0"
+ /* 25 */
+ "lookbehind assertion is not fixed length\0"
+ "a relative value of zero is not allowed\0"
+ "conditional group contains more than two branches\0"
+ "assertion expected after (?( or (?(?C)\0"
+ "digit expected after (?+ or (?-\0"
+ /* 30 */
+ "unknown POSIX class name\0"
+ "internal error in pcre2_study(): should not occur\0"
+ "this version of PCRE2 does not have Unicode support\0"
+ "parentheses are too deeply nested (stack check)\0"
+ "character code point value in \\x{} or \\o{} is too large\0"
+ /* 35 */
+ "lookbehind is too complicated\0"
+ "\\C is not allowed in a lookbehind assertion in UTF-" XSTRING(PCRE2_CODE_UNIT_WIDTH) " mode\0"
+ "PCRE does not support \\L, \\l, \\N{name}, \\U, or \\u\0"
+ "number after (?C is greater than 255\0"
+ "closing parenthesis for (?C expected\0"
+ /* 40 */
+ "invalid escape sequence in (*VERB) name\0"
+ "unrecognized character after (?P\0"
+ "syntax error in subpattern name (missing terminator)\0"
+ "two named subpatterns have the same name (PCRE2_DUPNAMES not set)\0"
+ "group name must start with a non-digit\0"
+ /* 45 */
+ "this version of PCRE2 does not have support for \\P, \\p, or \\X\0"
+ "malformed \\P or \\p sequence\0"
+ "unknown property name after \\P or \\p\0"
+ "subpattern name is too long (maximum " XSTRING(MAX_NAME_SIZE) " characters)\0"
+ "too many named subpatterns (maximum " XSTRING(MAX_NAME_COUNT) ")\0"
+ /* 50 */
+ "invalid range in character class\0"
+ "octal value is greater than \\377 in 8-bit non-UTF-8 mode\0"
+ "internal error: overran compiling workspace\0"
+ "internal error: previously-checked referenced subpattern not found\0"
+ "DEFINE group contains more than one branch\0"
+ /* 55 */
+ "missing opening brace after \\o\0"
+ "internal error: unknown newline setting\0"
+ "\\g is not followed by a braced, angle-bracketed, or quoted name/number or by a plain number\0"
+ "(?R (recursive pattern call) must be followed by a closing parenthesis\0"
+ "an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)\0"
+ /* 60 */
+ "(*VERB) not recognized or malformed\0"
+ "group number is too big\0"
+ "subpattern name expected\0"
+ "internal error: parsed pattern overflow\0"
+ "non-octal character in \\o{} (closing brace missing?)\0"
+ /* 65 */
+ "different names for subpatterns of the same number are not allowed\0"
+ "(*MARK) must have an argument\0"
+ "non-hex character in \\x{} (closing brace missing?)\0"
+#ifndef EBCDIC
+ "\\c must be followed by a printable ASCII character\0"
+#else
+ "\\c must be followed by a letter or one of [\\]^_?\0"
+#endif
+ "\\k is not followed by a braced, angle-bracketed, or quoted name\0"
+ /* 70 */
+ "internal error: unknown meta code in check_lookbehinds()\0"
+ "\\N is not supported in a class\0"
+ "callout string is too long\0"
+ "disallowed Unicode code point (>= 0xd800 && <= 0xdfff)\0"
+ "using UTF is disabled by the application\0"
+ /* 75 */
+ "using UCP is disabled by the application\0"
+ "name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)\0"
+ "character code point value in \\u.... sequence is too large\0"
+ "digits missing in \\x{} or \\o{}\0"
+ "syntax error or number too big in (?(VERSION condition\0"
+ /* 80 */
+ "internal error: unknown opcode in auto_possessify()\0"
+ "missing terminating delimiter for callout with string argument\0"
+ "unrecognized string delimiter follows (?C\0"
+ "using \\C is disabled by the application\0"
+ "(?| and/or (?J: or (?x: parentheses are too deeply nested\0"
+ /* 85 */
+ "using \\C is disabled in this PCRE2 library\0"
+ "regular expression is too complicated\0"
+ "lookbehind assertion is too long\0"
+ "pattern string is longer than the limit set by the application\0"
+ "internal error: unknown code in parsed pattern\0"
+ /* 90 */
+ "internal error: bad code value in parsed_skip()\0"
+ ;
+
+/* Match-time and UTF error texts are in the same format. */
+
+static const unsigned char match_error_texts[] =
+ "no error\0"
+ "no match\0"
+ "partial match\0"
+ "UTF-8 error: 1 byte missing at end\0"
+ "UTF-8 error: 2 bytes missing at end\0"
+ /* 5 */
+ "UTF-8 error: 3 bytes missing at end\0"
+ "UTF-8 error: 4 bytes missing at end\0"
+ "UTF-8 error: 5 bytes missing at end\0"
+ "UTF-8 error: byte 2 top bits not 0x80\0"
+ "UTF-8 error: byte 3 top bits not 0x80\0"
+ /* 10 */
+ "UTF-8 error: byte 4 top bits not 0x80\0"
+ "UTF-8 error: byte 5 top bits not 0x80\0"
+ "UTF-8 error: byte 6 top bits not 0x80\0"
+ "UTF-8 error: 5-byte character is not allowed (RFC 3629)\0"
+ "UTF-8 error: 6-byte character is not allowed (RFC 3629)\0"
+ /* 15 */
+ "UTF-8 error: code points greater than 0x10ffff are not defined\0"
+ "UTF-8 error: code points 0xd800-0xdfff are not defined\0"
+ "UTF-8 error: overlong 2-byte sequence\0"
+ "UTF-8 error: overlong 3-byte sequence\0"
+ "UTF-8 error: overlong 4-byte sequence\0"
+ /* 20 */
+ "UTF-8 error: overlong 5-byte sequence\0"
+ "UTF-8 error: overlong 6-byte sequence\0"
+ "UTF-8 error: isolated byte with 0x80 bit set\0"
+ "UTF-8 error: illegal byte (0xfe or 0xff)\0"
+ "UTF-16 error: missing low surrogate at end\0"
+ /* 25 */
+ "UTF-16 error: invalid low surrogate\0"
+ "UTF-16 error: isolated low surrogate\0"
+ "UTF-32 error: code points 0xd800-0xdfff are not defined\0"
+ "UTF-32 error: code points greater than 0x10ffff are not defined\0"
+ "bad data value\0"
+ /* 30 */
+ "patterns do not all use the same character tables\0"
+ "magic number missing\0"
+ "pattern compiled in wrong mode: 8/16/32-bit error\0"
+ "bad offset value\0"
+ "bad option value\0"
+ /* 35 */
+ "invalid replacement string\0"
+ "bad offset into UTF string\0"
+ "callout error code\0" /* Never returned by PCRE2 itself */
+ "invalid data in workspace for DFA restart\0"
+ "too much recursion for DFA matching\0"
+ /* 40 */
+ "backreference condition or recursion test is not supported for DFA matching\0"
+ "function is not supported for DFA matching\0"
+ "pattern contains an item that is not supported for DFA matching\0"
+ "workspace size exceeded in DFA matching\0"
+ "internal error - pattern overwritten?\0"
+ /* 45 */
+ "bad JIT option\0"
+ "JIT stack limit reached\0"
+ "match limit exceeded\0"
+ "no more memory\0"
+ "unknown substring\0"
+ /* 50 */
+ "non-unique substring name\0"
+ "NULL argument passed\0"
+ "nested recursion at the same subject position\0"
+ "recursion limit exceeded\0"
+ "requested value is not available\0"
+ /* 55 */
+ "requested value is not set\0"
+ "offset limit set without PCRE2_USE_OFFSET_LIMIT\0"
+ "bad escape sequence in replacement string\0"
+ "expected closing curly bracket in replacement string\0"
+ "bad substitution in replacement string\0"
+ /* 60 */
+ "match with end before start is not supported\0"
+ "too many replacements (more than INT_MAX)\0"
+ "bad serialized data\0"
+ ;
+
+
+/*************************************************
+* Return error message *
+*************************************************/
+
+/* This function copies an error message into a buffer whose units are of an
+appropriate width. Error numbers are positive for compile-time errors, and
+negative for match-time errors (except for UTF errors), but the numbers are all
+distinct.
+
+Arguments:
+ enumber error number
+ buffer where to put the message (zero terminated)
+ size size of the buffer
+
+Returns: length of message if all is well
+ negative on error
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_get_error_message(int enumber, PCRE2_UCHAR *buffer, PCRE2_SIZE size)
+{
+const unsigned char *message;
+PCRE2_SIZE i;
+int n;
+
+if (size == 0) return PCRE2_ERROR_NOMEMORY;
+
+if (enumber >= COMPILE_ERROR_BASE) /* Compile error */
+ {
+ message = compile_error_texts;
+ n = enumber - COMPILE_ERROR_BASE;
+ }
+else if (enumber < 0) /* Match or UTF error */
+ {
+ message = match_error_texts;
+ n = -enumber;
+ }
+else /* Invalid error number */
+ {
+ message = (unsigned char *)"\0"; /* Empty message list */
+ n = 1;
+ }
+
+for (; n > 0; n--)
+ {
+ while (*message++ != CHAR_NULL) {};
+ if (*message == CHAR_NULL) return PCRE2_ERROR_BADDATA;
+ }
+
+for (i = 0; *message != 0; i++)
+ {
+ if (i >= size - 1)
+ {
+ buffer[i] = 0; /* Terminate partial message */
+ return PCRE2_ERROR_NOMEMORY;
+ }
+ buffer[i] = *message++;
+ }
+
+buffer[i] = 0;
+return (int)i;
+}
+
+/* End of pcre2_error.c */
diff --git a/thirdparty/pcre2/src/pcre2_find_bracket.c b/thirdparty/pcre2/src/pcre2_find_bracket.c
new file mode 100644
index 0000000000..357385a11c
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_find_bracket.c
@@ -0,0 +1,218 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+/* This module contains a single function that scans through a compiled pattern
+until it finds a capturing bracket with the given number, or, if the number is
+negative, an instance of OP_REVERSE for a lookbehind. The function is called
+from pcre2_compile.c and also from pcre2_study.c when finding the minimum
+matching length. */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre2_internal.h"
+
+
+/*************************************************
+* Scan compiled regex for specific bracket *
+*************************************************/
+
+/*
+Arguments:
+ code points to start of expression
+ utf TRUE in UTF mode
+ number the required bracket number or negative to find a lookbehind
+
+Returns: pointer to the opcode for the bracket, or NULL if not found
+*/
+
+PCRE2_SPTR
+PRIV(find_bracket)(PCRE2_SPTR code, BOOL utf, int number)
+{
+for (;;)
+ {
+ PCRE2_UCHAR c = *code;
+
+ if (c == OP_END) return NULL;
+
+ /* XCLASS is used for classes that cannot be represented just by a bit map.
+ This includes negated single high-valued characters. CALLOUT_STR is used for
+ callouts with string arguments. In both cases the length in the table is
+ zero; the actual length is stored in the compiled code. */
+
+ if (c == OP_XCLASS) code += GET(code, 1);
+ else if (c == OP_CALLOUT_STR) code += GET(code, 1 + 2*LINK_SIZE);
+
+ /* Handle lookbehind */
+
+ else if (c == OP_REVERSE)
+ {
+ if (number < 0) return (PCRE2_UCHAR *)code;
+ code += PRIV(OP_lengths)[c];
+ }
+
+ /* Handle capturing bracket */
+
+ else if (c == OP_CBRA || c == OP_SCBRA ||
+ c == OP_CBRAPOS || c == OP_SCBRAPOS)
+ {
+ int n = (int)GET2(code, 1+LINK_SIZE);
+ if (n == number) return (PCRE2_UCHAR *)code;
+ code += PRIV(OP_lengths)[c];
+ }
+
+ /* Otherwise, we can get the item's length from the table, except that for
+ repeated character types, we have to test for \p and \P, which have an extra
+ two bytes of parameters, and for MARK/PRUNE/SKIP/THEN with an argument, we
+ must add in its length. */
+
+ else
+ {
+ switch(c)
+ {
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEPOSQUERY:
+ if (code[1] == OP_PROP || code[1] == OP_NOTPROP) code += 2;
+ break;
+
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEEXACT:
+ case OP_TYPEPOSUPTO:
+ if (code[1 + IMM2_SIZE] == OP_PROP || code[1 + IMM2_SIZE] == OP_NOTPROP)
+ code += 2;
+ break;
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_SKIP_ARG:
+ case OP_THEN_ARG:
+ code += code[1];
+ break;
+ }
+
+ /* Add in the fixed length from the table */
+
+ code += PRIV(OP_lengths)[c];
+
+ /* In UTF-8 and UTF-16 modes, opcodes that are followed by a character may be
+ followed by a multi-byte character. The length in the table is a minimum, so
+ we have to arrange to skip the extra bytes. */
+
+#ifdef MAYBE_UTF_MULTI
+ if (utf) switch(c)
+ {
+ case OP_CHAR:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
+ case OP_EXACT:
+ case OP_EXACTI:
+ case OP_NOTEXACT:
+ case OP_NOTEXACTI:
+ case OP_UPTO:
+ case OP_UPTOI:
+ case OP_NOTUPTO:
+ case OP_NOTUPTOI:
+ case OP_MINUPTO:
+ case OP_MINUPTOI:
+ case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
+ case OP_POSUPTO:
+ case OP_POSUPTOI:
+ case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
+ case OP_STAR:
+ case OP_STARI:
+ case OP_NOTSTAR:
+ case OP_NOTSTARI:
+ case OP_MINSTAR:
+ case OP_MINSTARI:
+ case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
+ case OP_POSSTAR:
+ case OP_POSSTARI:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
+ case OP_PLUS:
+ case OP_PLUSI:
+ case OP_NOTPLUS:
+ case OP_NOTPLUSI:
+ case OP_MINPLUS:
+ case OP_MINPLUSI:
+ case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
+ case OP_POSPLUS:
+ case OP_POSPLUSI:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
+ case OP_QUERY:
+ case OP_QUERYI:
+ case OP_NOTQUERY:
+ case OP_NOTQUERYI:
+ case OP_MINQUERY:
+ case OP_MINQUERYI:
+ case OP_NOTMINQUERY:
+ case OP_NOTMINQUERYI:
+ case OP_POSQUERY:
+ case OP_POSQUERYI:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSQUERYI:
+ if (HAS_EXTRALEN(code[-1])) code += GET_EXTRALEN(code[-1]);
+ break;
+ }
+#else
+ (void)(utf); /* Keep compiler happy by referencing function argument */
+#endif /* MAYBE_UTF_MULTI */
+ }
+ }
+}
+
+/* End of pcre2_find_bracket.c */
diff --git a/thirdparty/pcre2/src/pcre2_internal.h b/thirdparty/pcre2/src/pcre2_internal.h
new file mode 100644
index 0000000000..6a8774ce8c
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_internal.h
@@ -0,0 +1,1940 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE2 is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+/* We do not support both EBCDIC and Unicode at the same time. The "configure"
+script prevents both being selected, but not everybody uses "configure". EBCDIC
+is only supported for the 8-bit library, but the check for this has to be later
+in this file, because the first part is not width-dependent, and is included by
+pcre2test.c with CODE_UNIT_WIDTH == 0. */
+
+#if defined EBCDIC && defined SUPPORT_UNICODE
+#error The use of both EBCDIC and SUPPORT_UNICODE is not supported.
+#endif
+
+/* Standard C headers */
+
+#include <ctype.h>
+#include <limits.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Macros to make boolean values more obvious. The #ifndef is to pacify
+compiler warnings in environments where these macros are defined elsewhere.
+Unfortunately, there is no way to do the same for the typedef. */
+
+typedef int BOOL;
+#ifndef FALSE
+#define FALSE 0
+#define TRUE 1
+#endif
+
+/* Valgrind (memcheck) support */
+
+#ifdef SUPPORT_VALGRIND
+#include <valgrind/memcheck.h>
+#endif
+
+/* Older versions of MSVC lack snprintf(). This define allows for
+warning/error-free compilation and testing with MSVC compilers back to at least
+MSVC 10/2010. Except for VC6 (which is missing some fundamentals and fails). */
+
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
+#define snprintf _snprintf
+#endif
+
+/* When compiling a DLL for Windows, the exported symbols have to be declared
+using some MS magic. I found some useful information on this web page:
+http://msdn2.microsoft.com/en-us/library/y4h7bcy6(VS.80).aspx. According to the
+information there, using __declspec(dllexport) without "extern" we have a
+definition; with "extern" we have a declaration. The settings here override the
+setting in pcre2.h (which is included below); it defines only PCRE2_EXP_DECL,
+which is all that is needed for applications (they just import the symbols). We
+use:
+
+ PCRE2_EXP_DECL for declarations
+ PCRE2_EXP_DEFN for definitions
+
+The reason for wrapping this in #ifndef PCRE2_EXP_DECL is so that pcre2test,
+which is an application, but needs to import this file in order to "peek" at
+internals, can #include pcre2.h first to get an application's-eye view.
+
+In principle, people compiling for non-Windows, non-Unix-like (i.e. uncommon,
+special-purpose environments) might want to stick other stuff in front of
+exported symbols. That's why, in the non-Windows case, we set PCRE2_EXP_DEFN
+only if it is not already set. */
+
+#ifndef PCRE2_EXP_DECL
+# ifdef _WIN32
+# ifndef PCRE2_STATIC
+# define PCRE2_EXP_DECL extern __declspec(dllexport)
+# define PCRE2_EXP_DEFN __declspec(dllexport)
+# else
+# define PCRE2_EXP_DECL extern
+# define PCRE2_EXP_DEFN
+# endif
+# else
+# ifdef __cplusplus
+# define PCRE2_EXP_DECL extern "C"
+# else
+# define PCRE2_EXP_DECL extern
+# endif
+# ifndef PCRE2_EXP_DEFN
+# define PCRE2_EXP_DEFN PCRE2_EXP_DECL
+# endif
+# endif
+#endif
+
+/* Include the public PCRE2 header and the definitions of UCP character
+property values. This must follow the setting of PCRE2_EXP_DECL above. */
+
+#include "pcre2.h"
+#include "pcre2_ucp.h"
+
+/* When PCRE2 is compiled as a C++ library, the subject pointer can be replaced
+with a custom type. This makes it possible, for example, to allow pcre2_match()
+to process subject strings that are discontinuous by using a smart pointer
+class. It must always be possible to inspect all of the subject string in
+pcre2_match() because of the way it backtracks. */
+
+/* WARNING: This is as yet untested for PCRE2. */
+
+#ifdef CUSTOM_SUBJECT_PTR
+#undef PCRE2_SPTR
+#define PCRE2_SPTR CUSTOM_SUBJECT_PTR
+#endif
+
+/* When checking for integer overflow in pcre2_compile(), we need to handle
+large integers. If a 64-bit integer type is available, we can use that.
+Otherwise we have to cast to double, which of course requires floating point
+arithmetic. Handle this by defining a macro for the appropriate type. If
+stdint.h is available, include it; it may define INT64_MAX. Systems that do not
+have stdint.h (e.g. Solaris) may have inttypes.h. The macro int64_t may be set
+by "configure". */
+
+#if defined HAVE_STDINT_H
+#include <stdint.h>
+#elif defined HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+
+#if defined INT64_MAX || defined int64_t
+#define INT64_OR_DOUBLE int64_t
+#else
+#define INT64_OR_DOUBLE double
+#endif
+
+/* When compiling for use with the Virtual Pascal compiler, these functions
+need to have their names changed. PCRE2 must be compiled with the -DVPCOMPAT
+option on the command line. */
+
+#ifdef VPCOMPAT
+#define strlen(s) _strlen(s)
+#define strncmp(s1,s2,m) _strncmp(s1,s2,m)
+#define memcmp(s,c,n) _memcmp(s,c,n)
+#define memcpy(d,s,n) _memcpy(d,s,n)
+#define memmove(d,s,n) _memmove(d,s,n)
+#define memset(s,c,n) _memset(s,c,n)
+#else /* VPCOMPAT */
+
+/* To cope with SunOS4 and other systems that lack memmove() but have bcopy(),
+define a macro for memmove() if HAVE_MEMMOVE is false, provided that HAVE_BCOPY
+is set. Otherwise, include an emulating function for those systems that have
+neither (there some non-Unix environments where this is the case). */
+
+#ifndef HAVE_MEMMOVE
+#undef memmove /* some systems may have a macro */
+#ifdef HAVE_BCOPY
+#define memmove(a, b, c) bcopy(b, a, c)
+#else /* HAVE_BCOPY */
+static void *
+pcre2_memmove(void *d, const void *s, size_t n)
+{
+size_t i;
+unsigned char *dest = (unsigned char *)d;
+const unsigned char *src = (const unsigned char *)s;
+if (dest > src)
+ {
+ dest += n;
+ src += n;
+ for (i = 0; i < n; ++i) *(--dest) = *(--src);
+ return (void *)dest;
+ }
+else
+ {
+ for (i = 0; i < n; ++i) *dest++ = *src++;
+ return (void *)(dest - n);
+ }
+}
+#define memmove(a, b, c) pcre2_memmove(a, b, c)
+#endif /* not HAVE_BCOPY */
+#endif /* not HAVE_MEMMOVE */
+#endif /* not VPCOMPAT */
+
+/* External (in the C sense) functions and tables that are private to the
+libraries are always referenced using the PRIV macro. This makes it possible
+for pcre2test.c to include some of the source files from the libraries using a
+different PRIV definition to avoid name clashes. It also makes it clear in the
+code that a non-static object is being referenced. */
+
+#ifndef PRIV
+#define PRIV(name) _pcre2_##name
+#endif
+
+/* This is an unsigned int value that no UTF character can ever have, as
+Unicode doesn't go beyond 0x0010ffff. */
+
+#define NOTACHAR 0xffffffff
+
+/* This is the largest valid UTF/Unicode code point. */
+
+#define MAX_UTF_CODE_POINT 0x10ffff
+
+/* Compile-time positive error numbers (all except UTF errors, which are
+negative) start at this value. It should probably never be changed, in case
+some application is checking for specific numbers. There is a copy of this
+#define in pcre2posix.c (which now no longer includes this file). Ideally, a
+way of having a single definition should be found, but as the number is
+unlikely to change, this is not a pressing issue. The original reason for
+having a base other than 0 was to keep the absolute values of compile-time and
+run-time error numbers numerically different, but in the event the code does
+not rely on this. */
+
+#define COMPILE_ERROR_BASE 100
+
+/* Define the default BSR convention. */
+
+#ifdef BSR_ANYCRLF
+#define BSR_DEFAULT PCRE2_BSR_ANYCRLF
+#else
+#define BSR_DEFAULT PCRE2_BSR_UNICODE
+#endif
+
+
+/* ---------------- Basic UTF-8 macros ---------------- */
+
+/* These UTF-8 macros are always defined because they are used in pcre2test for
+handling wide characters in 16-bit and 32-bit modes, even if an 8-bit library
+is not supported. */
+
+/* Tests whether a UTF-8 code point needs extra bytes to decode. */
+
+#define HASUTF8EXTRALEN(c) ((c) >= 0xc0)
+
+/* The following macros were originally written in the form of loops that used
+data from the tables whose names start with PRIV(utf8_table). They were
+rewritten by a user so as not to use loops, because in some environments this
+gives a significant performance advantage, and it seems never to do any harm.
+*/
+
+/* Base macro to pick up the remaining bytes of a UTF-8 character, not
+advancing the pointer. */
+
+#define GETUTF8(c, eptr) \
+ { \
+ if ((c & 0x20u) == 0) \
+ c = ((c & 0x1fu) << 6) | (eptr[1] & 0x3fu); \
+ else if ((c & 0x10u) == 0) \
+ c = ((c & 0x0fu) << 12) | ((eptr[1] & 0x3fu) << 6) | (eptr[2] & 0x3fu); \
+ else if ((c & 0x08u) == 0) \
+ c = ((c & 0x07u) << 18) | ((eptr[1] & 0x3fu) << 12) | \
+ ((eptr[2] & 0x3fu) << 6) | (eptr[3] & 0x3fu); \
+ else if ((c & 0x04u) == 0) \
+ c = ((c & 0x03u) << 24) | ((eptr[1] & 0x3fu) << 18) | \
+ ((eptr[2] & 0x3fu) << 12) | ((eptr[3] & 0x3fu) << 6) | \
+ (eptr[4] & 0x3fu); \
+ else \
+ c = ((c & 0x01u) << 30) | ((eptr[1] & 0x3fu) << 24) | \
+ ((eptr[2] & 0x3fu) << 18) | ((eptr[3] & 0x3fu) << 12) | \
+ ((eptr[4] & 0x3fu) << 6) | (eptr[5] & 0x3fu); \
+ }
+
+/* Base macro to pick up the remaining bytes of a UTF-8 character, advancing
+the pointer. */
+
+#define GETUTF8INC(c, eptr) \
+ { \
+ if ((c & 0x20u) == 0) \
+ c = ((c & 0x1fu) << 6) | (*eptr++ & 0x3fu); \
+ else if ((c & 0x10u) == 0) \
+ { \
+ c = ((c & 0x0fu) << 12) | ((*eptr & 0x3fu) << 6) | (eptr[1] & 0x3fu); \
+ eptr += 2; \
+ } \
+ else if ((c & 0x08u) == 0) \
+ { \
+ c = ((c & 0x07u) << 18) | ((*eptr & 0x3fu) << 12) | \
+ ((eptr[1] & 0x3fu) << 6) | (eptr[2] & 0x3fu); \
+ eptr += 3; \
+ } \
+ else if ((c & 0x04u) == 0) \
+ { \
+ c = ((c & 0x03u) << 24) | ((*eptr & 0x3fu) << 18) | \
+ ((eptr[1] & 0x3fu) << 12) | ((eptr[2] & 0x3fu) << 6) | \
+ (eptr[3] & 0x3fu); \
+ eptr += 4; \
+ } \
+ else \
+ { \
+ c = ((c & 0x01u) << 30) | ((*eptr & 0x3fu) << 24) | \
+ ((eptr[1] & 0x3fu) << 18) | ((eptr[2] & 0x3fu) << 12) | \
+ ((eptr[3] & 0x3fu) << 6) | (eptr[4] & 0x3fu); \
+ eptr += 5; \
+ } \
+ }
+
+/* Base macro to pick up the remaining bytes of a UTF-8 character, not
+advancing the pointer, incrementing the length. */
+
+#define GETUTF8LEN(c, eptr, len) \
+ { \
+ if ((c & 0x20u) == 0) \
+ { \
+ c = ((c & 0x1fu) << 6) | (eptr[1] & 0x3fu); \
+ len++; \
+ } \
+ else if ((c & 0x10u) == 0) \
+ { \
+ c = ((c & 0x0fu) << 12) | ((eptr[1] & 0x3fu) << 6) | (eptr[2] & 0x3fu); \
+ len += 2; \
+ } \
+ else if ((c & 0x08u) == 0) \
+ {\
+ c = ((c & 0x07u) << 18) | ((eptr[1] & 0x3fu) << 12) | \
+ ((eptr[2] & 0x3fu) << 6) | (eptr[3] & 0x3fu); \
+ len += 3; \
+ } \
+ else if ((c & 0x04u) == 0) \
+ { \
+ c = ((c & 0x03u) << 24) | ((eptr[1] & 0x3fu) << 18) | \
+ ((eptr[2] & 0x3fu) << 12) | ((eptr[3] & 0x3fu) << 6) | \
+ (eptr[4] & 0x3fu); \
+ len += 4; \
+ } \
+ else \
+ {\
+ c = ((c & 0x01u) << 30) | ((eptr[1] & 0x3fu) << 24) | \
+ ((eptr[2] & 0x3fu) << 18) | ((eptr[3] & 0x3fu) << 12) | \
+ ((eptr[4] & 0x3fu) << 6) | (eptr[5] & 0x3fu); \
+ len += 5; \
+ } \
+ }
+
+/* --------------- Whitespace macros ---------------- */
+
+/* Tests for Unicode horizontal and vertical whitespace characters must check a
+number of different values. Using a switch statement for this generates the
+fastest code (no loop, no memory access), and there are several places in the
+interpreter code where this happens. In order to ensure that all the case lists
+remain in step, we use macros so that there is only one place where the lists
+are defined.
+
+These values are also required as lists in pcre2_compile.c when processing \h,
+\H, \v and \V in a character class. The lists are defined in pcre2_tables.c,
+but macros that define the values are here so that all the definitions are
+together. The lists must be in ascending character order, terminated by
+NOTACHAR (which is 0xffffffff).
+
+Any changes should ensure that the various macros are kept in step with each
+other. NOTE: The values also appear in pcre2_jit_compile.c. */
+
+/* -------------- ASCII/Unicode environments -------------- */
+
+#ifndef EBCDIC
+
+/* Character U+180E (Mongolian Vowel Separator) is not included in the list of
+spaces in the Unicode file PropList.txt, and Perl does not recognize it as a
+space. However, in many other sources it is listed as a space and has been in
+PCRE (both APIs) for a long time. */
+
+#define HSPACE_LIST \
+ CHAR_HT, CHAR_SPACE, CHAR_NBSP, \
+ 0x1680, 0x180e, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, \
+ 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202f, 0x205f, 0x3000, \
+ NOTACHAR
+
+#define HSPACE_MULTIBYTE_CASES \
+ case 0x1680: /* OGHAM SPACE MARK */ \
+ case 0x180e: /* MONGOLIAN VOWEL SEPARATOR */ \
+ case 0x2000: /* EN QUAD */ \
+ case 0x2001: /* EM QUAD */ \
+ case 0x2002: /* EN SPACE */ \
+ case 0x2003: /* EM SPACE */ \
+ case 0x2004: /* THREE-PER-EM SPACE */ \
+ case 0x2005: /* FOUR-PER-EM SPACE */ \
+ case 0x2006: /* SIX-PER-EM SPACE */ \
+ case 0x2007: /* FIGURE SPACE */ \
+ case 0x2008: /* PUNCTUATION SPACE */ \
+ case 0x2009: /* THIN SPACE */ \
+ case 0x200A: /* HAIR SPACE */ \
+ case 0x202f: /* NARROW NO-BREAK SPACE */ \
+ case 0x205f: /* MEDIUM MATHEMATICAL SPACE */ \
+ case 0x3000 /* IDEOGRAPHIC SPACE */
+
+#define HSPACE_BYTE_CASES \
+ case CHAR_HT: \
+ case CHAR_SPACE: \
+ case CHAR_NBSP
+
+#define HSPACE_CASES \
+ HSPACE_BYTE_CASES: \
+ HSPACE_MULTIBYTE_CASES
+
+#define VSPACE_LIST \
+ CHAR_LF, CHAR_VT, CHAR_FF, CHAR_CR, CHAR_NEL, 0x2028, 0x2029, NOTACHAR
+
+#define VSPACE_MULTIBYTE_CASES \
+ case 0x2028: /* LINE SEPARATOR */ \
+ case 0x2029 /* PARAGRAPH SEPARATOR */
+
+#define VSPACE_BYTE_CASES \
+ case CHAR_LF: \
+ case CHAR_VT: \
+ case CHAR_FF: \
+ case CHAR_CR: \
+ case CHAR_NEL
+
+#define VSPACE_CASES \
+ VSPACE_BYTE_CASES: \
+ VSPACE_MULTIBYTE_CASES
+
+/* -------------- EBCDIC environments -------------- */
+
+#else
+#define HSPACE_LIST CHAR_HT, CHAR_SPACE, CHAR_NBSP, NOTACHAR
+
+#define HSPACE_BYTE_CASES \
+ case CHAR_HT: \
+ case CHAR_SPACE: \
+ case CHAR_NBSP
+
+#define HSPACE_CASES HSPACE_BYTE_CASES
+
+#ifdef EBCDIC_NL25
+#define VSPACE_LIST \
+ CHAR_VT, CHAR_FF, CHAR_CR, CHAR_NEL, CHAR_LF, NOTACHAR
+#else
+#define VSPACE_LIST \
+ CHAR_VT, CHAR_FF, CHAR_CR, CHAR_LF, CHAR_NEL, NOTACHAR
+#endif
+
+#define VSPACE_BYTE_CASES \
+ case CHAR_LF: \
+ case CHAR_VT: \
+ case CHAR_FF: \
+ case CHAR_CR: \
+ case CHAR_NEL
+
+#define VSPACE_CASES VSPACE_BYTE_CASES
+#endif /* EBCDIC */
+
+/* -------------- End of whitespace macros -------------- */
+
+
+/* PCRE2 is able to support several different kinds of newline (CR, LF, CRLF,
+"any" and "anycrlf" at present). The following macros are used to package up
+testing for newlines. NLBLOCK, PSSTART, and PSEND are defined in the various
+modules to indicate in which datablock the parameters exist, and what the
+start/end of string field names are. */
+
+#define NLTYPE_FIXED 0 /* Newline is a fixed length string */
+#define NLTYPE_ANY 1 /* Newline is any Unicode line ending */
+#define NLTYPE_ANYCRLF 2 /* Newline is CR, LF, or CRLF */
+
+/* This macro checks for a newline at the given position */
+
+#define IS_NEWLINE(p) \
+ ((NLBLOCK->nltype != NLTYPE_FIXED)? \
+ ((p) < NLBLOCK->PSEND && \
+ PRIV(is_newline)((p), NLBLOCK->nltype, NLBLOCK->PSEND, \
+ &(NLBLOCK->nllen), utf)) \
+ : \
+ ((p) <= NLBLOCK->PSEND - NLBLOCK->nllen && \
+ UCHAR21TEST(p) == NLBLOCK->nl[0] && \
+ (NLBLOCK->nllen == 1 || UCHAR21TEST(p+1) == NLBLOCK->nl[1]) \
+ ) \
+ )
+
+/* This macro checks for a newline immediately preceding the given position */
+
+#define WAS_NEWLINE(p) \
+ ((NLBLOCK->nltype != NLTYPE_FIXED)? \
+ ((p) > NLBLOCK->PSSTART && \
+ PRIV(was_newline)((p), NLBLOCK->nltype, NLBLOCK->PSSTART, \
+ &(NLBLOCK->nllen), utf)) \
+ : \
+ ((p) >= NLBLOCK->PSSTART + NLBLOCK->nllen && \
+ UCHAR21TEST(p - NLBLOCK->nllen) == NLBLOCK->nl[0] && \
+ (NLBLOCK->nllen == 1 || UCHAR21TEST(p - NLBLOCK->nllen + 1) == NLBLOCK->nl[1]) \
+ ) \
+ )
+
+/* Private flags containing information about the compiled pattern. The first
+three must not be changed, because whichever is set is actually the number of
+bytes in a code unit in that mode. */
+
+#define PCRE2_MODE8 0x00000001 /* compiled in 8 bit mode */
+#define PCRE2_MODE16 0x00000002 /* compiled in 16 bit mode */
+#define PCRE2_MODE32 0x00000004 /* compiled in 32 bit mode */
+#define PCRE2_FIRSTSET 0x00000010 /* first_code unit is set */
+#define PCRE2_FIRSTCASELESS 0x00000020 /* caseless first code unit */
+#define PCRE2_FIRSTMAPSET 0x00000040 /* bitmap of first code units is set */
+#define PCRE2_LASTSET 0x00000080 /* last code unit is set */
+#define PCRE2_LASTCASELESS 0x00000100 /* caseless last code unit */
+#define PCRE2_STARTLINE 0x00000200 /* start after \n for multiline */
+#define PCRE2_JCHANGED 0x00000400 /* j option used in pattern */
+#define PCRE2_HASCRORLF 0x00000800 /* explicit \r or \n in pattern */
+#define PCRE2_HASTHEN 0x00001000 /* pattern contains (*THEN) */
+#define PCRE2_MATCH_EMPTY 0x00002000 /* pattern can match empty string */
+#define PCRE2_BSR_SET 0x00004000 /* BSR was set in the pattern */
+#define PCRE2_NL_SET 0x00008000 /* newline was set in the pattern */
+#define PCRE2_NOTEMPTY_SET 0x00010000 /* (*NOTEMPTY) used ) keep */
+#define PCRE2_NE_ATST_SET 0x00020000 /* (*NOTEMPTY_ATSTART) used) together */
+#define PCRE2_DEREF_TABLES 0x00040000 /* release character tables */
+#define PCRE2_NOJIT 0x00080000 /* (*NOJIT) used */
+#define PCRE2_HASBKPORX 0x00100000 /* contains \P, \p, or \X */
+#define PCRE2_DUPCAPUSED 0x00200000 /* contains (?| */
+#define PCRE2_HASBKC 0x00400000 /* contains \C */
+
+#define PCRE2_MODE_MASK (PCRE2_MODE8 | PCRE2_MODE16 | PCRE2_MODE32)
+
+/* Values for the matchedby field in a match data block. */
+
+enum { PCRE2_MATCHEDBY_INTERPRETER, /* pcre2_match() */
+ PCRE2_MATCHEDBY_DFA_INTERPRETER, /* pcre2_dfa_match() */
+ PCRE2_MATCHEDBY_JIT }; /* pcre2_jit_match() */
+
+/* Magic number to provide a small check against being handed junk. */
+
+#define MAGIC_NUMBER 0x50435245UL /* 'PCRE' */
+
+/* The maximum remaining length of subject we are prepared to search for a
+req_unit match. */
+
+#define REQ_CU_MAX 1000
+
+/* Offsets for the bitmap tables in the cbits set of tables. Each table
+contains a set of bits for a class map. Some classes are built by combining
+these tables. */
+
+#define cbit_space 0 /* [:space:] or \s */
+#define cbit_xdigit 32 /* [:xdigit:] */
+#define cbit_digit 64 /* [:digit:] or \d */
+#define cbit_upper 96 /* [:upper:] */
+#define cbit_lower 128 /* [:lower:] */
+#define cbit_word 160 /* [:word:] or \w */
+#define cbit_graph 192 /* [:graph:] */
+#define cbit_print 224 /* [:print:] */
+#define cbit_punct 256 /* [:punct:] */
+#define cbit_cntrl 288 /* [:cntrl:] */
+#define cbit_length 320 /* Length of the cbits table */
+
+/* Bit definitions for entries in the ctypes table. */
+
+#define ctype_space 0x01
+#define ctype_letter 0x02
+#define ctype_digit 0x04
+#define ctype_xdigit 0x08
+#define ctype_word 0x10 /* alphanumeric or '_' */
+#define ctype_meta 0x80 /* regexp meta char or zero (end pattern) */
+
+/* Offsets of the various tables from the base tables pointer, and
+total length of the tables. */
+
+#define lcc_offset 0 /* Lower case */
+#define fcc_offset 256 /* Flip case */
+#define cbits_offset 512 /* Character classes */
+#define ctypes_offset (cbits_offset + cbit_length) /* Character types */
+#define tables_length (ctypes_offset + 256)
+
+
+/* -------------------- Character and string names ------------------------ */
+
+/* If PCRE2 is to support UTF-8 on EBCDIC platforms, we cannot use normal
+character constants like '*' because the compiler would emit their EBCDIC code,
+which is different from their ASCII/UTF-8 code. Instead we define macros for
+the characters so that they always use the ASCII/UTF-8 code when UTF-8 support
+is enabled. When UTF-8 support is not enabled, the definitions use character
+literals. Both character and string versions of each character are needed, and
+there are some longer strings as well.
+
+This means that, on EBCDIC platforms, the PCRE2 library can handle either
+EBCDIC, or UTF-8, but not both. To support both in the same compiled library
+would need different lookups depending on whether PCRE2_UTF was set or not.
+This would make it impossible to use characters in switch/case statements,
+which would reduce performance. For a theoretical use (which nobody has asked
+for) in a minority area (EBCDIC platforms), this is not sensible. Any
+application that did need both could compile two versions of the library, using
+macros to give the functions distinct names. */
+
+#ifndef SUPPORT_UNICODE
+
+/* UTF-8 support is not enabled; use the platform-dependent character literals
+so that PCRE2 works in both ASCII and EBCDIC environments, but only in non-UTF
+mode. Newline characters are problematic in EBCDIC. Though it has CR and LF
+characters, a common practice has been to use its NL (0x15) character as the
+line terminator in C-like processing environments. However, sometimes the LF
+(0x25) character is used instead, according to this Unicode document:
+
+http://unicode.org/standard/reports/tr13/tr13-5.html
+
+PCRE2 defaults EBCDIC NL to 0x15, but has a build-time option to select 0x25
+instead. Whichever is *not* chosen is defined as NEL.
+
+In both ASCII and EBCDIC environments, CHAR_NL and CHAR_LF are synonyms for the
+same code point. */
+
+#ifdef EBCDIC
+
+#ifndef EBCDIC_NL25
+#define CHAR_NL '\x15'
+#define CHAR_NEL '\x25'
+#define STR_NL "\x15"
+#define STR_NEL "\x25"
+#else
+#define CHAR_NL '\x25'
+#define CHAR_NEL '\x15'
+#define STR_NL "\x25"
+#define STR_NEL "\x15"
+#endif
+
+#define CHAR_LF CHAR_NL
+#define STR_LF STR_NL
+
+#define CHAR_ESC '\047'
+#define CHAR_DEL '\007'
+#define CHAR_NBSP ((unsigned char)'\x41')
+#define STR_ESC "\047"
+#define STR_DEL "\007"
+
+#else /* Not EBCDIC */
+
+/* In ASCII/Unicode, linefeed is '\n' and we equate this to NL for
+compatibility. NEL is the Unicode newline character; make sure it is
+a positive value. */
+
+#define CHAR_LF '\n'
+#define CHAR_NL CHAR_LF
+#define CHAR_NEL ((unsigned char)'\x85')
+#define CHAR_ESC '\033'
+#define CHAR_DEL '\177'
+#define CHAR_NBSP ((unsigned char)'\xa0')
+
+#define STR_LF "\n"
+#define STR_NL STR_LF
+#define STR_NEL "\x85"
+#define STR_ESC "\033"
+#define STR_DEL "\177"
+
+#endif /* EBCDIC */
+
+/* The remaining definitions work in both environments. */
+
+#define CHAR_NULL '\0'
+#define CHAR_HT '\t'
+#define CHAR_VT '\v'
+#define CHAR_FF '\f'
+#define CHAR_CR '\r'
+#define CHAR_BS '\b'
+#define CHAR_BEL '\a'
+
+#define CHAR_SPACE ' '
+#define CHAR_EXCLAMATION_MARK '!'
+#define CHAR_QUOTATION_MARK '"'
+#define CHAR_NUMBER_SIGN '#'
+#define CHAR_DOLLAR_SIGN '$'
+#define CHAR_PERCENT_SIGN '%'
+#define CHAR_AMPERSAND '&'
+#define CHAR_APOSTROPHE '\''
+#define CHAR_LEFT_PARENTHESIS '('
+#define CHAR_RIGHT_PARENTHESIS ')'
+#define CHAR_ASTERISK '*'
+#define CHAR_PLUS '+'
+#define CHAR_COMMA ','
+#define CHAR_MINUS '-'
+#define CHAR_DOT '.'
+#define CHAR_SLASH '/'
+#define CHAR_0 '0'
+#define CHAR_1 '1'
+#define CHAR_2 '2'
+#define CHAR_3 '3'
+#define CHAR_4 '4'
+#define CHAR_5 '5'
+#define CHAR_6 '6'
+#define CHAR_7 '7'
+#define CHAR_8 '8'
+#define CHAR_9 '9'
+#define CHAR_COLON ':'
+#define CHAR_SEMICOLON ';'
+#define CHAR_LESS_THAN_SIGN '<'
+#define CHAR_EQUALS_SIGN '='
+#define CHAR_GREATER_THAN_SIGN '>'
+#define CHAR_QUESTION_MARK '?'
+#define CHAR_COMMERCIAL_AT '@'
+#define CHAR_A 'A'
+#define CHAR_B 'B'
+#define CHAR_C 'C'
+#define CHAR_D 'D'
+#define CHAR_E 'E'
+#define CHAR_F 'F'
+#define CHAR_G 'G'
+#define CHAR_H 'H'
+#define CHAR_I 'I'
+#define CHAR_J 'J'
+#define CHAR_K 'K'
+#define CHAR_L 'L'
+#define CHAR_M 'M'
+#define CHAR_N 'N'
+#define CHAR_O 'O'
+#define CHAR_P 'P'
+#define CHAR_Q 'Q'
+#define CHAR_R 'R'
+#define CHAR_S 'S'
+#define CHAR_T 'T'
+#define CHAR_U 'U'
+#define CHAR_V 'V'
+#define CHAR_W 'W'
+#define CHAR_X 'X'
+#define CHAR_Y 'Y'
+#define CHAR_Z 'Z'
+#define CHAR_LEFT_SQUARE_BRACKET '['
+#define CHAR_BACKSLASH '\\'
+#define CHAR_RIGHT_SQUARE_BRACKET ']'
+#define CHAR_CIRCUMFLEX_ACCENT '^'
+#define CHAR_UNDERSCORE '_'
+#define CHAR_GRAVE_ACCENT '`'
+#define CHAR_a 'a'
+#define CHAR_b 'b'
+#define CHAR_c 'c'
+#define CHAR_d 'd'
+#define CHAR_e 'e'
+#define CHAR_f 'f'
+#define CHAR_g 'g'
+#define CHAR_h 'h'
+#define CHAR_i 'i'
+#define CHAR_j 'j'
+#define CHAR_k 'k'
+#define CHAR_l 'l'
+#define CHAR_m 'm'
+#define CHAR_n 'n'
+#define CHAR_o 'o'
+#define CHAR_p 'p'
+#define CHAR_q 'q'
+#define CHAR_r 'r'
+#define CHAR_s 's'
+#define CHAR_t 't'
+#define CHAR_u 'u'
+#define CHAR_v 'v'
+#define CHAR_w 'w'
+#define CHAR_x 'x'
+#define CHAR_y 'y'
+#define CHAR_z 'z'
+#define CHAR_LEFT_CURLY_BRACKET '{'
+#define CHAR_VERTICAL_LINE '|'
+#define CHAR_RIGHT_CURLY_BRACKET '}'
+#define CHAR_TILDE '~'
+
+#define STR_HT "\t"
+#define STR_VT "\v"
+#define STR_FF "\f"
+#define STR_CR "\r"
+#define STR_BS "\b"
+#define STR_BEL "\a"
+
+#define STR_SPACE " "
+#define STR_EXCLAMATION_MARK "!"
+#define STR_QUOTATION_MARK "\""
+#define STR_NUMBER_SIGN "#"
+#define STR_DOLLAR_SIGN "$"
+#define STR_PERCENT_SIGN "%"
+#define STR_AMPERSAND "&"
+#define STR_APOSTROPHE "'"
+#define STR_LEFT_PARENTHESIS "("
+#define STR_RIGHT_PARENTHESIS ")"
+#define STR_ASTERISK "*"
+#define STR_PLUS "+"
+#define STR_COMMA ","
+#define STR_MINUS "-"
+#define STR_DOT "."
+#define STR_SLASH "/"
+#define STR_0 "0"
+#define STR_1 "1"
+#define STR_2 "2"
+#define STR_3 "3"
+#define STR_4 "4"
+#define STR_5 "5"
+#define STR_6 "6"
+#define STR_7 "7"
+#define STR_8 "8"
+#define STR_9 "9"
+#define STR_COLON ":"
+#define STR_SEMICOLON ";"
+#define STR_LESS_THAN_SIGN "<"
+#define STR_EQUALS_SIGN "="
+#define STR_GREATER_THAN_SIGN ">"
+#define STR_QUESTION_MARK "?"
+#define STR_COMMERCIAL_AT "@"
+#define STR_A "A"
+#define STR_B "B"
+#define STR_C "C"
+#define STR_D "D"
+#define STR_E "E"
+#define STR_F "F"
+#define STR_G "G"
+#define STR_H "H"
+#define STR_I "I"
+#define STR_J "J"
+#define STR_K "K"
+#define STR_L "L"
+#define STR_M "M"
+#define STR_N "N"
+#define STR_O "O"
+#define STR_P "P"
+#define STR_Q "Q"
+#define STR_R "R"
+#define STR_S "S"
+#define STR_T "T"
+#define STR_U "U"
+#define STR_V "V"
+#define STR_W "W"
+#define STR_X "X"
+#define STR_Y "Y"
+#define STR_Z "Z"
+#define STR_LEFT_SQUARE_BRACKET "["
+#define STR_BACKSLASH "\\"
+#define STR_RIGHT_SQUARE_BRACKET "]"
+#define STR_CIRCUMFLEX_ACCENT "^"
+#define STR_UNDERSCORE "_"
+#define STR_GRAVE_ACCENT "`"
+#define STR_a "a"
+#define STR_b "b"
+#define STR_c "c"
+#define STR_d "d"
+#define STR_e "e"
+#define STR_f "f"
+#define STR_g "g"
+#define STR_h "h"
+#define STR_i "i"
+#define STR_j "j"
+#define STR_k "k"
+#define STR_l "l"
+#define STR_m "m"
+#define STR_n "n"
+#define STR_o "o"
+#define STR_p "p"
+#define STR_q "q"
+#define STR_r "r"
+#define STR_s "s"
+#define STR_t "t"
+#define STR_u "u"
+#define STR_v "v"
+#define STR_w "w"
+#define STR_x "x"
+#define STR_y "y"
+#define STR_z "z"
+#define STR_LEFT_CURLY_BRACKET "{"
+#define STR_VERTICAL_LINE "|"
+#define STR_RIGHT_CURLY_BRACKET "}"
+#define STR_TILDE "~"
+
+#define STRING_ACCEPT0 "ACCEPT\0"
+#define STRING_COMMIT0 "COMMIT\0"
+#define STRING_F0 "F\0"
+#define STRING_FAIL0 "FAIL\0"
+#define STRING_MARK0 "MARK\0"
+#define STRING_PRUNE0 "PRUNE\0"
+#define STRING_SKIP0 "SKIP\0"
+#define STRING_THEN "THEN"
+
+#define STRING_alpha0 "alpha\0"
+#define STRING_lower0 "lower\0"
+#define STRING_upper0 "upper\0"
+#define STRING_alnum0 "alnum\0"
+#define STRING_ascii0 "ascii\0"
+#define STRING_blank0 "blank\0"
+#define STRING_cntrl0 "cntrl\0"
+#define STRING_digit0 "digit\0"
+#define STRING_graph0 "graph\0"
+#define STRING_print0 "print\0"
+#define STRING_punct0 "punct\0"
+#define STRING_space0 "space\0"
+#define STRING_word0 "word\0"
+#define STRING_xdigit "xdigit"
+
+#define STRING_DEFINE "DEFINE"
+#define STRING_VERSION "VERSION"
+#define STRING_WEIRD_STARTWORD "[:<:]]"
+#define STRING_WEIRD_ENDWORD "[:>:]]"
+
+#define STRING_CR_RIGHTPAR "CR)"
+#define STRING_LF_RIGHTPAR "LF)"
+#define STRING_CRLF_RIGHTPAR "CRLF)"
+#define STRING_ANY_RIGHTPAR "ANY)"
+#define STRING_ANYCRLF_RIGHTPAR "ANYCRLF)"
+#define STRING_BSR_ANYCRLF_RIGHTPAR "BSR_ANYCRLF)"
+#define STRING_BSR_UNICODE_RIGHTPAR "BSR_UNICODE)"
+#define STRING_UTF8_RIGHTPAR "UTF8)"
+#define STRING_UTF16_RIGHTPAR "UTF16)"
+#define STRING_UTF32_RIGHTPAR "UTF32)"
+#define STRING_UTF_RIGHTPAR "UTF)"
+#define STRING_UCP_RIGHTPAR "UCP)"
+#define STRING_NO_AUTO_POSSESS_RIGHTPAR "NO_AUTO_POSSESS)"
+#define STRING_NO_DOTSTAR_ANCHOR_RIGHTPAR "NO_DOTSTAR_ANCHOR)"
+#define STRING_NO_JIT_RIGHTPAR "NO_JIT)"
+#define STRING_NO_START_OPT_RIGHTPAR "NO_START_OPT)"
+#define STRING_NOTEMPTY_RIGHTPAR "NOTEMPTY)"
+#define STRING_NOTEMPTY_ATSTART_RIGHTPAR "NOTEMPTY_ATSTART)"
+#define STRING_LIMIT_MATCH_EQ "LIMIT_MATCH="
+#define STRING_LIMIT_RECURSION_EQ "LIMIT_RECURSION="
+#define STRING_MARK "MARK"
+
+#else /* SUPPORT_UNICODE */
+
+/* UTF-8 support is enabled; always use UTF-8 (=ASCII) character codes. This
+works in both modes non-EBCDIC platforms, and on EBCDIC platforms in UTF-8 mode
+only. */
+
+#define CHAR_HT '\011'
+#define CHAR_VT '\013'
+#define CHAR_FF '\014'
+#define CHAR_CR '\015'
+#define CHAR_LF '\012'
+#define CHAR_NL CHAR_LF
+#define CHAR_NEL ((unsigned char)'\x85')
+#define CHAR_BS '\010'
+#define CHAR_BEL '\007'
+#define CHAR_ESC '\033'
+#define CHAR_DEL '\177'
+
+#define CHAR_NULL '\0'
+#define CHAR_SPACE '\040'
+#define CHAR_EXCLAMATION_MARK '\041'
+#define CHAR_QUOTATION_MARK '\042'
+#define CHAR_NUMBER_SIGN '\043'
+#define CHAR_DOLLAR_SIGN '\044'
+#define CHAR_PERCENT_SIGN '\045'
+#define CHAR_AMPERSAND '\046'
+#define CHAR_APOSTROPHE '\047'
+#define CHAR_LEFT_PARENTHESIS '\050'
+#define CHAR_RIGHT_PARENTHESIS '\051'
+#define CHAR_ASTERISK '\052'
+#define CHAR_PLUS '\053'
+#define CHAR_COMMA '\054'
+#define CHAR_MINUS '\055'
+#define CHAR_DOT '\056'
+#define CHAR_SLASH '\057'
+#define CHAR_0 '\060'
+#define CHAR_1 '\061'
+#define CHAR_2 '\062'
+#define CHAR_3 '\063'
+#define CHAR_4 '\064'
+#define CHAR_5 '\065'
+#define CHAR_6 '\066'
+#define CHAR_7 '\067'
+#define CHAR_8 '\070'
+#define CHAR_9 '\071'
+#define CHAR_COLON '\072'
+#define CHAR_SEMICOLON '\073'
+#define CHAR_LESS_THAN_SIGN '\074'
+#define CHAR_EQUALS_SIGN '\075'
+#define CHAR_GREATER_THAN_SIGN '\076'
+#define CHAR_QUESTION_MARK '\077'
+#define CHAR_COMMERCIAL_AT '\100'
+#define CHAR_A '\101'
+#define CHAR_B '\102'
+#define CHAR_C '\103'
+#define CHAR_D '\104'
+#define CHAR_E '\105'
+#define CHAR_F '\106'
+#define CHAR_G '\107'
+#define CHAR_H '\110'
+#define CHAR_I '\111'
+#define CHAR_J '\112'
+#define CHAR_K '\113'
+#define CHAR_L '\114'
+#define CHAR_M '\115'
+#define CHAR_N '\116'
+#define CHAR_O '\117'
+#define CHAR_P '\120'
+#define CHAR_Q '\121'
+#define CHAR_R '\122'
+#define CHAR_S '\123'
+#define CHAR_T '\124'
+#define CHAR_U '\125'
+#define CHAR_V '\126'
+#define CHAR_W '\127'
+#define CHAR_X '\130'
+#define CHAR_Y '\131'
+#define CHAR_Z '\132'
+#define CHAR_LEFT_SQUARE_BRACKET '\133'
+#define CHAR_BACKSLASH '\134'
+#define CHAR_RIGHT_SQUARE_BRACKET '\135'
+#define CHAR_CIRCUMFLEX_ACCENT '\136'
+#define CHAR_UNDERSCORE '\137'
+#define CHAR_GRAVE_ACCENT '\140'
+#define CHAR_a '\141'
+#define CHAR_b '\142'
+#define CHAR_c '\143'
+#define CHAR_d '\144'
+#define CHAR_e '\145'
+#define CHAR_f '\146'
+#define CHAR_g '\147'
+#define CHAR_h '\150'
+#define CHAR_i '\151'
+#define CHAR_j '\152'
+#define CHAR_k '\153'
+#define CHAR_l '\154'
+#define CHAR_m '\155'
+#define CHAR_n '\156'
+#define CHAR_o '\157'
+#define CHAR_p '\160'
+#define CHAR_q '\161'
+#define CHAR_r '\162'
+#define CHAR_s '\163'
+#define CHAR_t '\164'
+#define CHAR_u '\165'
+#define CHAR_v '\166'
+#define CHAR_w '\167'
+#define CHAR_x '\170'
+#define CHAR_y '\171'
+#define CHAR_z '\172'
+#define CHAR_LEFT_CURLY_BRACKET '\173'
+#define CHAR_VERTICAL_LINE '\174'
+#define CHAR_RIGHT_CURLY_BRACKET '\175'
+#define CHAR_TILDE '\176'
+#define CHAR_NBSP ((unsigned char)'\xa0')
+
+#define STR_HT "\011"
+#define STR_VT "\013"
+#define STR_FF "\014"
+#define STR_CR "\015"
+#define STR_NL "\012"
+#define STR_BS "\010"
+#define STR_BEL "\007"
+#define STR_ESC "\033"
+#define STR_DEL "\177"
+
+#define STR_SPACE "\040"
+#define STR_EXCLAMATION_MARK "\041"
+#define STR_QUOTATION_MARK "\042"
+#define STR_NUMBER_SIGN "\043"
+#define STR_DOLLAR_SIGN "\044"
+#define STR_PERCENT_SIGN "\045"
+#define STR_AMPERSAND "\046"
+#define STR_APOSTROPHE "\047"
+#define STR_LEFT_PARENTHESIS "\050"
+#define STR_RIGHT_PARENTHESIS "\051"
+#define STR_ASTERISK "\052"
+#define STR_PLUS "\053"
+#define STR_COMMA "\054"
+#define STR_MINUS "\055"
+#define STR_DOT "\056"
+#define STR_SLASH "\057"
+#define STR_0 "\060"
+#define STR_1 "\061"
+#define STR_2 "\062"
+#define STR_3 "\063"
+#define STR_4 "\064"
+#define STR_5 "\065"
+#define STR_6 "\066"
+#define STR_7 "\067"
+#define STR_8 "\070"
+#define STR_9 "\071"
+#define STR_COLON "\072"
+#define STR_SEMICOLON "\073"
+#define STR_LESS_THAN_SIGN "\074"
+#define STR_EQUALS_SIGN "\075"
+#define STR_GREATER_THAN_SIGN "\076"
+#define STR_QUESTION_MARK "\077"
+#define STR_COMMERCIAL_AT "\100"
+#define STR_A "\101"
+#define STR_B "\102"
+#define STR_C "\103"
+#define STR_D "\104"
+#define STR_E "\105"
+#define STR_F "\106"
+#define STR_G "\107"
+#define STR_H "\110"
+#define STR_I "\111"
+#define STR_J "\112"
+#define STR_K "\113"
+#define STR_L "\114"
+#define STR_M "\115"
+#define STR_N "\116"
+#define STR_O "\117"
+#define STR_P "\120"
+#define STR_Q "\121"
+#define STR_R "\122"
+#define STR_S "\123"
+#define STR_T "\124"
+#define STR_U "\125"
+#define STR_V "\126"
+#define STR_W "\127"
+#define STR_X "\130"
+#define STR_Y "\131"
+#define STR_Z "\132"
+#define STR_LEFT_SQUARE_BRACKET "\133"
+#define STR_BACKSLASH "\134"
+#define STR_RIGHT_SQUARE_BRACKET "\135"
+#define STR_CIRCUMFLEX_ACCENT "\136"
+#define STR_UNDERSCORE "\137"
+#define STR_GRAVE_ACCENT "\140"
+#define STR_a "\141"
+#define STR_b "\142"
+#define STR_c "\143"
+#define STR_d "\144"
+#define STR_e "\145"
+#define STR_f "\146"
+#define STR_g "\147"
+#define STR_h "\150"
+#define STR_i "\151"
+#define STR_j "\152"
+#define STR_k "\153"
+#define STR_l "\154"
+#define STR_m "\155"
+#define STR_n "\156"
+#define STR_o "\157"
+#define STR_p "\160"
+#define STR_q "\161"
+#define STR_r "\162"
+#define STR_s "\163"
+#define STR_t "\164"
+#define STR_u "\165"
+#define STR_v "\166"
+#define STR_w "\167"
+#define STR_x "\170"
+#define STR_y "\171"
+#define STR_z "\172"
+#define STR_LEFT_CURLY_BRACKET "\173"
+#define STR_VERTICAL_LINE "\174"
+#define STR_RIGHT_CURLY_BRACKET "\175"
+#define STR_TILDE "\176"
+
+#define STRING_ACCEPT0 STR_A STR_C STR_C STR_E STR_P STR_T "\0"
+#define STRING_COMMIT0 STR_C STR_O STR_M STR_M STR_I STR_T "\0"
+#define STRING_F0 STR_F "\0"
+#define STRING_FAIL0 STR_F STR_A STR_I STR_L "\0"
+#define STRING_MARK0 STR_M STR_A STR_R STR_K "\0"
+#define STRING_PRUNE0 STR_P STR_R STR_U STR_N STR_E "\0"
+#define STRING_SKIP0 STR_S STR_K STR_I STR_P "\0"
+#define STRING_THEN STR_T STR_H STR_E STR_N
+
+#define STRING_alpha0 STR_a STR_l STR_p STR_h STR_a "\0"
+#define STRING_lower0 STR_l STR_o STR_w STR_e STR_r "\0"
+#define STRING_upper0 STR_u STR_p STR_p STR_e STR_r "\0"
+#define STRING_alnum0 STR_a STR_l STR_n STR_u STR_m "\0"
+#define STRING_ascii0 STR_a STR_s STR_c STR_i STR_i "\0"
+#define STRING_blank0 STR_b STR_l STR_a STR_n STR_k "\0"
+#define STRING_cntrl0 STR_c STR_n STR_t STR_r STR_l "\0"
+#define STRING_digit0 STR_d STR_i STR_g STR_i STR_t "\0"
+#define STRING_graph0 STR_g STR_r STR_a STR_p STR_h "\0"
+#define STRING_print0 STR_p STR_r STR_i STR_n STR_t "\0"
+#define STRING_punct0 STR_p STR_u STR_n STR_c STR_t "\0"
+#define STRING_space0 STR_s STR_p STR_a STR_c STR_e "\0"
+#define STRING_word0 STR_w STR_o STR_r STR_d "\0"
+#define STRING_xdigit STR_x STR_d STR_i STR_g STR_i STR_t
+
+#define STRING_DEFINE STR_D STR_E STR_F STR_I STR_N STR_E
+#define STRING_VERSION STR_V STR_E STR_R STR_S STR_I STR_O STR_N
+#define STRING_WEIRD_STARTWORD STR_LEFT_SQUARE_BRACKET STR_COLON STR_LESS_THAN_SIGN STR_COLON STR_RIGHT_SQUARE_BRACKET STR_RIGHT_SQUARE_BRACKET
+#define STRING_WEIRD_ENDWORD STR_LEFT_SQUARE_BRACKET STR_COLON STR_GREATER_THAN_SIGN STR_COLON STR_RIGHT_SQUARE_BRACKET STR_RIGHT_SQUARE_BRACKET
+
+#define STRING_CR_RIGHTPAR STR_C STR_R STR_RIGHT_PARENTHESIS
+#define STRING_LF_RIGHTPAR STR_L STR_F STR_RIGHT_PARENTHESIS
+#define STRING_CRLF_RIGHTPAR STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS
+#define STRING_ANY_RIGHTPAR STR_A STR_N STR_Y STR_RIGHT_PARENTHESIS
+#define STRING_ANYCRLF_RIGHTPAR STR_A STR_N STR_Y STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS
+#define STRING_BSR_ANYCRLF_RIGHTPAR STR_B STR_S STR_R STR_UNDERSCORE STR_A STR_N STR_Y STR_C STR_R STR_L STR_F STR_RIGHT_PARENTHESIS
+#define STRING_BSR_UNICODE_RIGHTPAR STR_B STR_S STR_R STR_UNDERSCORE STR_U STR_N STR_I STR_C STR_O STR_D STR_E STR_RIGHT_PARENTHESIS
+#define STRING_UTF8_RIGHTPAR STR_U STR_T STR_F STR_8 STR_RIGHT_PARENTHESIS
+#define STRING_UTF16_RIGHTPAR STR_U STR_T STR_F STR_1 STR_6 STR_RIGHT_PARENTHESIS
+#define STRING_UTF32_RIGHTPAR STR_U STR_T STR_F STR_3 STR_2 STR_RIGHT_PARENTHESIS
+#define STRING_UTF_RIGHTPAR STR_U STR_T STR_F STR_RIGHT_PARENTHESIS
+#define STRING_UCP_RIGHTPAR STR_U STR_C STR_P STR_RIGHT_PARENTHESIS
+#define STRING_NO_AUTO_POSSESS_RIGHTPAR STR_N STR_O STR_UNDERSCORE STR_A STR_U STR_T STR_O STR_UNDERSCORE STR_P STR_O STR_S STR_S STR_E STR_S STR_S STR_RIGHT_PARENTHESIS
+#define STRING_NO_DOTSTAR_ANCHOR_RIGHTPAR STR_N STR_O STR_UNDERSCORE STR_D STR_O STR_T STR_S STR_T STR_A STR_R STR_UNDERSCORE STR_A STR_N STR_C STR_H STR_O STR_R STR_RIGHT_PARENTHESIS
+#define STRING_NO_JIT_RIGHTPAR STR_N STR_O STR_UNDERSCORE STR_J STR_I STR_T STR_RIGHT_PARENTHESIS
+#define STRING_NO_START_OPT_RIGHTPAR STR_N STR_O STR_UNDERSCORE STR_S STR_T STR_A STR_R STR_T STR_UNDERSCORE STR_O STR_P STR_T STR_RIGHT_PARENTHESIS
+#define STRING_NOTEMPTY_RIGHTPAR STR_N STR_O STR_T STR_E STR_M STR_P STR_T STR_Y STR_RIGHT_PARENTHESIS
+#define STRING_NOTEMPTY_ATSTART_RIGHTPAR STR_N STR_O STR_T STR_E STR_M STR_P STR_T STR_Y STR_UNDERSCORE STR_A STR_T STR_S STR_T STR_A STR_R STR_T STR_RIGHT_PARENTHESIS
+#define STRING_LIMIT_MATCH_EQ STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_M STR_A STR_T STR_C STR_H STR_EQUALS_SIGN
+#define STRING_LIMIT_RECURSION_EQ STR_L STR_I STR_M STR_I STR_T STR_UNDERSCORE STR_R STR_E STR_C STR_U STR_R STR_S STR_I STR_O STR_N STR_EQUALS_SIGN
+#define STRING_MARK STR_M STR_A STR_R STR_K
+
+#endif /* SUPPORT_UNICODE */
+
+/* -------------------- End of character and string names -------------------*/
+
+/* -------------------- Definitions for compiled patterns -------------------*/
+
+/* Codes for different types of Unicode property */
+
+#define PT_ANY 0 /* Any property - matches all chars */
+#define PT_LAMP 1 /* L& - the union of Lu, Ll, Lt */
+#define PT_GC 2 /* Specified general characteristic (e.g. L) */
+#define PT_PC 3 /* Specified particular characteristic (e.g. Lu) */
+#define PT_SC 4 /* Script (e.g. Han) */
+#define PT_ALNUM 5 /* Alphanumeric - the union of L and N */
+#define PT_SPACE 6 /* Perl space - Z plus 9,10,12,13 */
+#define PT_PXSPACE 7 /* POSIX space - Z plus 9,10,11,12,13 */
+#define PT_WORD 8 /* Word - L plus N plus underscore */
+#define PT_CLIST 9 /* Pseudo-property: match character list */
+#define PT_UCNC 10 /* Universal Character nameable character */
+#define PT_TABSIZE 11 /* Size of square table for autopossessify tests */
+
+/* The following special properties are used only in XCLASS items, when POSIX
+classes are specified and PCRE2_UCP is set - in other words, for Unicode
+handling of these classes. They are not available via the \p or \P escapes like
+those in the above list, and so they do not take part in the autopossessifying
+table. */
+
+#define PT_PXGRAPH 11 /* [:graph:] - characters that mark the paper */
+#define PT_PXPRINT 12 /* [:print:] - [:graph:] plus non-control spaces */
+#define PT_PXPUNCT 13 /* [:punct:] - punctuation characters */
+
+/* Flag bits and data types for the extended class (OP_XCLASS) for classes that
+contain characters with values greater than 255. */
+
+#define XCL_NOT 0x01 /* Flag: this is a negative class */
+#define XCL_MAP 0x02 /* Flag: a 32-byte map is present */
+#define XCL_HASPROP 0x04 /* Flag: property checks are present. */
+
+#define XCL_END 0 /* Marks end of individual items */
+#define XCL_SINGLE 1 /* Single item (one multibyte char) follows */
+#define XCL_RANGE 2 /* A range (two multibyte chars) follows */
+#define XCL_PROP 3 /* Unicode property (2-byte property code follows) */
+#define XCL_NOTPROP 4 /* Unicode inverted property (ditto) */
+
+/* Escape items that are just an encoding of a particular data value. These
+appear in the escapes[] table in pcre2_compile.c as positive numbers. */
+
+#ifndef ESC_a
+#define ESC_a CHAR_BEL
+#endif
+
+#ifndef ESC_e
+#define ESC_e CHAR_ESC
+#endif
+
+#ifndef ESC_f
+#define ESC_f CHAR_FF
+#endif
+
+#ifndef ESC_n
+#define ESC_n CHAR_LF
+#endif
+
+#ifndef ESC_r
+#define ESC_r CHAR_CR
+#endif
+
+/* We can't officially use ESC_t because it is a POSIX reserved identifier
+(presumably because of all the others like size_t). */
+
+#ifndef ESC_tee
+#define ESC_tee CHAR_HT
+#endif
+
+/* These are escaped items that aren't just an encoding of a particular data
+value such as \n. They must have non-zero values, as check_escape() returns 0
+for a data character. In the escapes[] table in pcre2_compile.c their values
+are negated in order to distinguish them from data values.
+
+They must appear here in the same order as in the opcode definitions below, up
+to ESC_z. There's a dummy for OP_ALLANY because it corresponds to "." in DOTALL
+mode rather than an escape sequence. It is also used for [^] in JavaScript
+compatibility mode, and for \C in non-utf mode. In non-DOTALL mode, "." behaves
+like \N.
+
+Negative numbers are used to encode a backreference (\1, \2, \3, etc.) in
+check_escape(). There are tests in the code for an escape greater than ESC_b
+and less than ESC_Z to detect the types that may be repeated. These are the
+types that consume characters. If any new escapes are put in between that don't
+consume a character, that code will have to change. */
+
+enum { ESC_A = 1, ESC_G, ESC_K, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s,
+ ESC_W, ESC_w, ESC_N, ESC_dum, ESC_C, ESC_P, ESC_p, ESC_R, ESC_H,
+ ESC_h, ESC_V, ESC_v, ESC_X, ESC_Z, ESC_z,
+ ESC_E, ESC_Q, ESC_g, ESC_k };
+
+
+/********************** Opcode definitions ******************/
+
+/****** NOTE NOTE NOTE ******
+
+Starting from 1 (i.e. after OP_END), the values up to OP_EOD must correspond in
+order to the list of escapes immediately above. Furthermore, values up to
+OP_DOLLM must not be changed without adjusting the table called autoposstab in
+pcre2_auto_possess.c
+
+Whenever this list is updated, the two macro definitions that follow must be
+updated to match. The possessification table called "opcode_possessify" in
+pcre2_compile.c must also be updated, and also the tables called "coptable"
+and "poptable" in pcre2_dfa_match.c.
+
+****** NOTE NOTE NOTE ******/
+
+
+/* The values between FIRST_AUTOTAB_OP and LAST_AUTOTAB_RIGHT_OP, inclusive,
+are used in a table for deciding whether a repeated character type can be
+auto-possessified. */
+
+#define FIRST_AUTOTAB_OP OP_NOT_DIGIT
+#define LAST_AUTOTAB_LEFT_OP OP_EXTUNI
+#define LAST_AUTOTAB_RIGHT_OP OP_DOLLM
+
+enum {
+ OP_END, /* 0 End of pattern */
+
+ /* Values corresponding to backslashed metacharacters */
+
+ OP_SOD, /* 1 Start of data: \A */
+ OP_SOM, /* 2 Start of match (subject + offset): \G */
+ OP_SET_SOM, /* 3 Set start of match (\K) */
+ OP_NOT_WORD_BOUNDARY, /* 4 \B */
+ OP_WORD_BOUNDARY, /* 5 \b */
+ OP_NOT_DIGIT, /* 6 \D */
+ OP_DIGIT, /* 7 \d */
+ OP_NOT_WHITESPACE, /* 8 \S */
+ OP_WHITESPACE, /* 9 \s */
+ OP_NOT_WORDCHAR, /* 10 \W */
+ OP_WORDCHAR, /* 11 \w */
+
+ OP_ANY, /* 12 Match any character except newline (\N) */
+ OP_ALLANY, /* 13 Match any character */
+ OP_ANYBYTE, /* 14 Match any byte (\C); different to OP_ANY for UTF-8 */
+ OP_NOTPROP, /* 15 \P (not Unicode property) */
+ OP_PROP, /* 16 \p (Unicode property) */
+ OP_ANYNL, /* 17 \R (any newline sequence) */
+ OP_NOT_HSPACE, /* 18 \H (not horizontal whitespace) */
+ OP_HSPACE, /* 19 \h (horizontal whitespace) */
+ OP_NOT_VSPACE, /* 20 \V (not vertical whitespace) */
+ OP_VSPACE, /* 21 \v (vertical whitespace) */
+ OP_EXTUNI, /* 22 \X (extended Unicode sequence */
+ OP_EODN, /* 23 End of data or \n at end of data (\Z) */
+ OP_EOD, /* 24 End of data (\z) */
+
+ /* Line end assertions */
+
+ OP_DOLL, /* 25 End of line - not multiline */
+ OP_DOLLM, /* 26 End of line - multiline */
+ OP_CIRC, /* 27 Start of line - not multiline */
+ OP_CIRCM, /* 28 Start of line - multiline */
+
+ /* Single characters; caseful must precede the caseless ones, and these
+ must remain in this order, and adjacent. */
+
+ OP_CHAR, /* 29 Match one character, casefully */
+ OP_CHARI, /* 30 Match one character, caselessly */
+ OP_NOT, /* 31 Match one character, not the given one, casefully */
+ OP_NOTI, /* 32 Match one character, not the given one, caselessly */
+
+ /* The following sets of 13 opcodes must always be kept in step because
+ the offset from the first one is used to generate the others. */
+
+ /* Repeated characters; caseful must precede the caseless ones */
+
+ OP_STAR, /* 33 The maximizing and minimizing versions of */
+ OP_MINSTAR, /* 34 these six opcodes must come in pairs, with */
+ OP_PLUS, /* 35 the minimizing one second. */
+ OP_MINPLUS, /* 36 */
+ OP_QUERY, /* 37 */
+ OP_MINQUERY, /* 38 */
+
+ OP_UPTO, /* 39 From 0 to n matches of one character, caseful*/
+ OP_MINUPTO, /* 40 */
+ OP_EXACT, /* 41 Exactly n matches */
+
+ OP_POSSTAR, /* 42 Possessified star, caseful */
+ OP_POSPLUS, /* 43 Possessified plus, caseful */
+ OP_POSQUERY, /* 44 Posesssified query, caseful */
+ OP_POSUPTO, /* 45 Possessified upto, caseful */
+
+ /* Repeated characters; caseless must follow the caseful ones */
+
+ OP_STARI, /* 46 */
+ OP_MINSTARI, /* 47 */
+ OP_PLUSI, /* 48 */
+ OP_MINPLUSI, /* 49 */
+ OP_QUERYI, /* 50 */
+ OP_MINQUERYI, /* 51 */
+
+ OP_UPTOI, /* 52 From 0 to n matches of one character, caseless */
+ OP_MINUPTOI, /* 53 */
+ OP_EXACTI, /* 54 */
+
+ OP_POSSTARI, /* 55 Possessified star, caseless */
+ OP_POSPLUSI, /* 56 Possessified plus, caseless */
+ OP_POSQUERYI, /* 57 Posesssified query, caseless */
+ OP_POSUPTOI, /* 58 Possessified upto, caseless */
+
+ /* The negated ones must follow the non-negated ones, and match them */
+ /* Negated repeated character, caseful; must precede the caseless ones */
+
+ OP_NOTSTAR, /* 59 The maximizing and minimizing versions of */
+ OP_NOTMINSTAR, /* 60 these six opcodes must come in pairs, with */
+ OP_NOTPLUS, /* 61 the minimizing one second. They must be in */
+ OP_NOTMINPLUS, /* 62 exactly the same order as those above. */
+ OP_NOTQUERY, /* 63 */
+ OP_NOTMINQUERY, /* 64 */
+
+ OP_NOTUPTO, /* 65 From 0 to n matches, caseful */
+ OP_NOTMINUPTO, /* 66 */
+ OP_NOTEXACT, /* 67 Exactly n matches */
+
+ OP_NOTPOSSTAR, /* 68 Possessified versions, caseful */
+ OP_NOTPOSPLUS, /* 69 */
+ OP_NOTPOSQUERY, /* 70 */
+ OP_NOTPOSUPTO, /* 71 */
+
+ /* Negated repeated character, caseless; must follow the caseful ones */
+
+ OP_NOTSTARI, /* 72 */
+ OP_NOTMINSTARI, /* 73 */
+ OP_NOTPLUSI, /* 74 */
+ OP_NOTMINPLUSI, /* 75 */
+ OP_NOTQUERYI, /* 76 */
+ OP_NOTMINQUERYI, /* 77 */
+
+ OP_NOTUPTOI, /* 78 From 0 to n matches, caseless */
+ OP_NOTMINUPTOI, /* 79 */
+ OP_NOTEXACTI, /* 80 Exactly n matches */
+
+ OP_NOTPOSSTARI, /* 81 Possessified versions, caseless */
+ OP_NOTPOSPLUSI, /* 82 */
+ OP_NOTPOSQUERYI, /* 83 */
+ OP_NOTPOSUPTOI, /* 84 */
+
+ /* Character types */
+
+ OP_TYPESTAR, /* 85 The maximizing and minimizing versions of */
+ OP_TYPEMINSTAR, /* 86 these six opcodes must come in pairs, with */
+ OP_TYPEPLUS, /* 87 the minimizing one second. These codes must */
+ OP_TYPEMINPLUS, /* 88 be in exactly the same order as those above. */
+ OP_TYPEQUERY, /* 89 */
+ OP_TYPEMINQUERY, /* 90 */
+
+ OP_TYPEUPTO, /* 91 From 0 to n matches */
+ OP_TYPEMINUPTO, /* 92 */
+ OP_TYPEEXACT, /* 93 Exactly n matches */
+
+ OP_TYPEPOSSTAR, /* 94 Possessified versions */
+ OP_TYPEPOSPLUS, /* 95 */
+ OP_TYPEPOSQUERY, /* 96 */
+ OP_TYPEPOSUPTO, /* 97 */
+
+ /* These are used for character classes and back references; only the
+ first six are the same as the sets above. */
+
+ OP_CRSTAR, /* 98 The maximizing and minimizing versions of */
+ OP_CRMINSTAR, /* 99 all these opcodes must come in pairs, with */
+ OP_CRPLUS, /* 100 the minimizing one second. These codes must */
+ OP_CRMINPLUS, /* 101 be in exactly the same order as those above. */
+ OP_CRQUERY, /* 102 */
+ OP_CRMINQUERY, /* 103 */
+
+ OP_CRRANGE, /* 104 These are different to the three sets above. */
+ OP_CRMINRANGE, /* 105 */
+
+ OP_CRPOSSTAR, /* 106 Possessified versions */
+ OP_CRPOSPLUS, /* 107 */
+ OP_CRPOSQUERY, /* 108 */
+ OP_CRPOSRANGE, /* 109 */
+
+ /* End of quantifier opcodes */
+
+ OP_CLASS, /* 110 Match a character class, chars < 256 only */
+ OP_NCLASS, /* 111 Same, but the bitmap was created from a negative
+ class - the difference is relevant only when a
+ character > 255 is encountered. */
+ OP_XCLASS, /* 112 Extended class for handling > 255 chars within the
+ class. This does both positive and negative. */
+ OP_REF, /* 113 Match a back reference, casefully */
+ OP_REFI, /* 114 Match a back reference, caselessly */
+ OP_DNREF, /* 115 Match a duplicate name backref, casefully */
+ OP_DNREFI, /* 116 Match a duplicate name backref, caselessly */
+ OP_RECURSE, /* 117 Match a numbered subpattern (possibly recursive) */
+ OP_CALLOUT, /* 118 Call out to external function if provided */
+ OP_CALLOUT_STR, /* 119 Call out with string argument */
+
+ OP_ALT, /* 120 Start of alternation */
+ OP_KET, /* 121 End of group that doesn't have an unbounded repeat */
+ OP_KETRMAX, /* 122 These two must remain together and in this */
+ OP_KETRMIN, /* 123 order. They are for groups the repeat for ever. */
+ OP_KETRPOS, /* 124 Possessive unlimited repeat. */
+
+ /* The assertions must come before BRA, CBRA, ONCE, and COND, and the four
+ asserts must remain in order. */
+
+ OP_REVERSE, /* 125 Move pointer back - used in lookbehind assertions */
+ OP_ASSERT, /* 126 Positive lookahead */
+ OP_ASSERT_NOT, /* 127 Negative lookahead */
+ OP_ASSERTBACK, /* 128 Positive lookbehind */
+ OP_ASSERTBACK_NOT, /* 129 Negative lookbehind */
+
+ /* ONCE, ONCE_NC, BRA, BRAPOS, CBRA, CBRAPOS, and COND must come immediately
+ after the assertions, with ONCE first, as there's a test for >= ONCE for a
+ subpattern that isn't an assertion. The POS versions must immediately follow
+ the non-POS versions in each case. */
+
+ OP_ONCE, /* 130 Atomic group, contains captures */
+ OP_ONCE_NC, /* 131 Atomic group containing no captures */
+ OP_BRA, /* 132 Start of non-capturing bracket */
+ OP_BRAPOS, /* 133 Ditto, with unlimited, possessive repeat */
+ OP_CBRA, /* 134 Start of capturing bracket */
+ OP_CBRAPOS, /* 135 Ditto, with unlimited, possessive repeat */
+ OP_COND, /* 136 Conditional group */
+
+ /* These five must follow the previous five, in the same order. There's a
+ check for >= SBRA to distinguish the two sets. */
+
+ OP_SBRA, /* 137 Start of non-capturing bracket, check empty */
+ OP_SBRAPOS, /* 138 Ditto, with unlimited, possessive repeat */
+ OP_SCBRA, /* 139 Start of capturing bracket, check empty */
+ OP_SCBRAPOS, /* 140 Ditto, with unlimited, possessive repeat */
+ OP_SCOND, /* 141 Conditional group, check empty */
+
+ /* The next two pairs must (respectively) be kept together. */
+
+ OP_CREF, /* 142 Used to hold a capture number as condition */
+ OP_DNCREF, /* 143 Used to point to duplicate names as a condition */
+ OP_RREF, /* 144 Used to hold a recursion number as condition */
+ OP_DNRREF, /* 145 Used to point to duplicate names as a condition */
+ OP_FALSE, /* 146 Always false (used by DEFINE and VERSION) */
+ OP_TRUE, /* 147 Always true (used by VERSION) */
+
+ OP_BRAZERO, /* 148 These two must remain together and in this */
+ OP_BRAMINZERO, /* 149 order. */
+ OP_BRAPOSZERO, /* 150 */
+
+ /* These are backtracking control verbs */
+
+ OP_MARK, /* 151 always has an argument */
+ OP_PRUNE, /* 152 */
+ OP_PRUNE_ARG, /* 153 same, but with argument */
+ OP_SKIP, /* 154 */
+ OP_SKIP_ARG, /* 155 same, but with argument */
+ OP_THEN, /* 156 */
+ OP_THEN_ARG, /* 157 same, but with argument */
+ OP_COMMIT, /* 158 */
+
+ /* These are forced failure and success verbs */
+
+ OP_FAIL, /* 159 */
+ OP_ACCEPT, /* 160 */
+ OP_ASSERT_ACCEPT, /* 161 Used inside assertions */
+ OP_CLOSE, /* 162 Used before OP_ACCEPT to close open captures */
+
+ /* This is used to skip a subpattern with a {0} quantifier */
+
+ OP_SKIPZERO, /* 163 */
+
+ /* This is used to identify a DEFINE group during compilation so that it can
+ be checked for having only one branch. It is changed to OP_FALSE before
+ compilation finishes. */
+
+ OP_DEFINE, /* 164 */
+
+ /* This is not an opcode, but is used to check that tables indexed by opcode
+ are the correct length, in order to catch updating errors - there have been
+ some in the past. */
+
+ OP_TABLE_LENGTH
+
+};
+
+/* *** NOTE NOTE NOTE *** Whenever the list above is updated, the two macro
+definitions that follow must also be updated to match. There are also tables
+called "opcode_possessify" in pcre2_compile.c and "coptable" and "poptable" in
+pcre2_dfa_exec.c that must be updated. */
+
+
+/* This macro defines textual names for all the opcodes. These are used only
+for debugging, and some of them are only partial names. The macro is referenced
+only in pcre2_printint.c, which fills out the full names in many cases (and in
+some cases doesn't actually use these names at all). */
+
+#define OP_NAME_LIST \
+ "End", "\\A", "\\G", "\\K", "\\B", "\\b", "\\D", "\\d", \
+ "\\S", "\\s", "\\W", "\\w", "Any", "AllAny", "Anybyte", \
+ "notprop", "prop", "\\R", "\\H", "\\h", "\\V", "\\v", \
+ "extuni", "\\Z", "\\z", \
+ "$", "$", "^", "^", "char", "chari", "not", "noti", \
+ "*", "*?", "+", "+?", "?", "??", \
+ "{", "{", "{", \
+ "*+","++", "?+", "{", \
+ "*", "*?", "+", "+?", "?", "??", \
+ "{", "{", "{", \
+ "*+","++", "?+", "{", \
+ "*", "*?", "+", "+?", "?", "??", \
+ "{", "{", "{", \
+ "*+","++", "?+", "{", \
+ "*", "*?", "+", "+?", "?", "??", \
+ "{", "{", "{", \
+ "*+","++", "?+", "{", \
+ "*", "*?", "+", "+?", "?", "??", "{", "{", "{", \
+ "*+","++", "?+", "{", \
+ "*", "*?", "+", "+?", "?", "??", "{", "{", \
+ "*+","++", "?+", "{", \
+ "class", "nclass", "xclass", "Ref", "Refi", "DnRef", "DnRefi", \
+ "Recurse", "Callout", "CalloutStr", \
+ "Alt", "Ket", "KetRmax", "KetRmin", "KetRpos", \
+ "Reverse", "Assert", "Assert not", "AssertB", "AssertB not", \
+ "Once", "Once_NC", \
+ "Bra", "BraPos", "CBra", "CBraPos", \
+ "Cond", \
+ "SBra", "SBraPos", "SCBra", "SCBraPos", \
+ "SCond", \
+ "Cond ref", "Cond dnref", "Cond rec", "Cond dnrec", \
+ "Cond false", "Cond true", \
+ "Brazero", "Braminzero", "Braposzero", \
+ "*MARK", "*PRUNE", "*PRUNE", "*SKIP", "*SKIP", \
+ "*THEN", "*THEN", "*COMMIT", "*FAIL", \
+ "*ACCEPT", "*ASSERT_ACCEPT", \
+ "Close", "Skip zero", "Define"
+
+
+/* This macro defines the length of fixed length operations in the compiled
+regex. The lengths are used when searching for specific things, and also in the
+debugging printing of a compiled regex. We use a macro so that it can be
+defined close to the definitions of the opcodes themselves.
+
+As things have been extended, some of these are no longer fixed lenths, but are
+minima instead. For example, the length of a single-character repeat may vary
+in UTF-8 mode. The code that uses this table must know about such things. */
+
+#define OP_LENGTHS \
+ 1, /* End */ \
+ 1, 1, 1, 1, 1, /* \A, \G, \K, \B, \b */ \
+ 1, 1, 1, 1, 1, 1, /* \D, \d, \S, \s, \W, \w */ \
+ 1, 1, 1, /* Any, AllAny, Anybyte */ \
+ 3, 3, /* \P, \p */ \
+ 1, 1, 1, 1, 1, /* \R, \H, \h, \V, \v */ \
+ 1, /* \X */ \
+ 1, 1, 1, 1, 1, 1, /* \Z, \z, $, $M ^, ^M */ \
+ 2, /* Char - the minimum length */ \
+ 2, /* Chari - the minimum length */ \
+ 2, /* not */ \
+ 2, /* noti */ \
+ /* Positive single-char repeats ** These are */ \
+ 2, 2, 2, 2, 2, 2, /* *, *?, +, +?, ?, ?? ** minima in */ \
+ 2+IMM2_SIZE, 2+IMM2_SIZE, /* upto, minupto ** mode */ \
+ 2+IMM2_SIZE, /* exact */ \
+ 2, 2, 2, 2+IMM2_SIZE, /* *+, ++, ?+, upto+ */ \
+ 2, 2, 2, 2, 2, 2, /* *I, *?I, +I, +?I, ?I, ??I ** UTF-8 */ \
+ 2+IMM2_SIZE, 2+IMM2_SIZE, /* upto I, minupto I */ \
+ 2+IMM2_SIZE, /* exact I */ \
+ 2, 2, 2, 2+IMM2_SIZE, /* *+I, ++I, ?+I, upto+I */ \
+ /* Negative single-char repeats - only for chars < 256 */ \
+ 2, 2, 2, 2, 2, 2, /* NOT *, *?, +, +?, ?, ?? */ \
+ 2+IMM2_SIZE, 2+IMM2_SIZE, /* NOT upto, minupto */ \
+ 2+IMM2_SIZE, /* NOT exact */ \
+ 2, 2, 2, 2+IMM2_SIZE, /* Possessive NOT *, +, ?, upto */ \
+ 2, 2, 2, 2, 2, 2, /* NOT *I, *?I, +I, +?I, ?I, ??I */ \
+ 2+IMM2_SIZE, 2+IMM2_SIZE, /* NOT upto I, minupto I */ \
+ 2+IMM2_SIZE, /* NOT exact I */ \
+ 2, 2, 2, 2+IMM2_SIZE, /* Possessive NOT *I, +I, ?I, upto I */ \
+ /* Positive type repeats */ \
+ 2, 2, 2, 2, 2, 2, /* Type *, *?, +, +?, ?, ?? */ \
+ 2+IMM2_SIZE, 2+IMM2_SIZE, /* Type upto, minupto */ \
+ 2+IMM2_SIZE, /* Type exact */ \
+ 2, 2, 2, 2+IMM2_SIZE, /* Possessive *+, ++, ?+, upto+ */ \
+ /* Character class & ref repeats */ \
+ 1, 1, 1, 1, 1, 1, /* *, *?, +, +?, ?, ?? */ \
+ 1+2*IMM2_SIZE, 1+2*IMM2_SIZE, /* CRRANGE, CRMINRANGE */ \
+ 1, 1, 1, 1+2*IMM2_SIZE, /* Possessive *+, ++, ?+, CRPOSRANGE */ \
+ 1+(32/sizeof(PCRE2_UCHAR)), /* CLASS */ \
+ 1+(32/sizeof(PCRE2_UCHAR)), /* NCLASS */ \
+ 0, /* XCLASS - variable length */ \
+ 1+IMM2_SIZE, /* REF */ \
+ 1+IMM2_SIZE, /* REFI */ \
+ 1+2*IMM2_SIZE, /* DNREF */ \
+ 1+2*IMM2_SIZE, /* DNREFI */ \
+ 1+LINK_SIZE, /* RECURSE */ \
+ 1+2*LINK_SIZE+1, /* CALLOUT */ \
+ 0, /* CALLOUT_STR - variable length */ \
+ 1+LINK_SIZE, /* Alt */ \
+ 1+LINK_SIZE, /* Ket */ \
+ 1+LINK_SIZE, /* KetRmax */ \
+ 1+LINK_SIZE, /* KetRmin */ \
+ 1+LINK_SIZE, /* KetRpos */ \
+ 1+LINK_SIZE, /* Reverse */ \
+ 1+LINK_SIZE, /* Assert */ \
+ 1+LINK_SIZE, /* Assert not */ \
+ 1+LINK_SIZE, /* Assert behind */ \
+ 1+LINK_SIZE, /* Assert behind not */ \
+ 1+LINK_SIZE, /* ONCE */ \
+ 1+LINK_SIZE, /* ONCE_NC */ \
+ 1+LINK_SIZE, /* BRA */ \
+ 1+LINK_SIZE, /* BRAPOS */ \
+ 1+LINK_SIZE+IMM2_SIZE, /* CBRA */ \
+ 1+LINK_SIZE+IMM2_SIZE, /* CBRAPOS */ \
+ 1+LINK_SIZE, /* COND */ \
+ 1+LINK_SIZE, /* SBRA */ \
+ 1+LINK_SIZE, /* SBRAPOS */ \
+ 1+LINK_SIZE+IMM2_SIZE, /* SCBRA */ \
+ 1+LINK_SIZE+IMM2_SIZE, /* SCBRAPOS */ \
+ 1+LINK_SIZE, /* SCOND */ \
+ 1+IMM2_SIZE, 1+2*IMM2_SIZE, /* CREF, DNCREF */ \
+ 1+IMM2_SIZE, 1+2*IMM2_SIZE, /* RREF, DNRREF */ \
+ 1, 1, /* FALSE, TRUE */ \
+ 1, 1, 1, /* BRAZERO, BRAMINZERO, BRAPOSZERO */ \
+ 3, 1, 3, /* MARK, PRUNE, PRUNE_ARG */ \
+ 1, 3, /* SKIP, SKIP_ARG */ \
+ 1, 3, /* THEN, THEN_ARG */ \
+ 1, 1, 1, 1, /* COMMIT, FAIL, ACCEPT, ASSERT_ACCEPT */ \
+ 1+IMM2_SIZE, 1, /* CLOSE, SKIPZERO */ \
+ 1 /* DEFINE */
+
+/* A magic value for OP_RREF to indicate the "any recursion" condition. */
+
+#define RREF_ANY 0xffff
+
+
+/* ---------- Private structures that are mode-independent. ---------- */
+
+/* Structure to hold data for custom memory management. */
+
+typedef struct pcre2_memctl {
+ void * (*malloc)(size_t, void *);
+ void (*free)(void *, void *);
+ void *memory_data;
+} pcre2_memctl;
+
+/* Structure for building a chain of open capturing subpatterns during
+compiling, so that instructions to close them can be compiled when (*ACCEPT) is
+encountered. This is also used to identify subpatterns that contain recursive
+back references to themselves, so that they can be made atomic. */
+
+typedef struct open_capitem {
+ struct open_capitem *next; /* Chain link */
+ uint16_t number; /* Capture number */
+ uint16_t flag; /* Set TRUE if recursive back ref */
+} open_capitem;
+
+/* Layout of the UCP type table that translates property names into types and
+codes. Each entry used to point directly to a name, but to reduce the number of
+relocations in shared libraries, it now has an offset into a single string
+instead. */
+
+typedef struct {
+ uint16_t name_offset;
+ uint16_t type;
+ uint16_t value;
+} ucp_type_table;
+
+/* Unicode character database (UCD) record format */
+
+typedef struct {
+ uint8_t script; /* ucp_Arabic, etc. */
+ uint8_t chartype; /* ucp_Cc, etc. (general categories) */
+ uint8_t gbprop; /* ucp_gbControl, etc. (grapheme break property) */
+ uint8_t caseset; /* offset to multichar other cases or zero */
+ int32_t other_case; /* offset to other case, or zero if none */
+} ucd_record;
+
+/* UCD access macros */
+
+#define UCD_BLOCK_SIZE 128
+#define GET_UCD(ch) (PRIV(ucd_records) + \
+ PRIV(ucd_stage2)[PRIV(ucd_stage1)[(int)(ch) / UCD_BLOCK_SIZE] * \
+ UCD_BLOCK_SIZE + (int)(ch) % UCD_BLOCK_SIZE])
+
+#define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype
+#define UCD_SCRIPT(ch) GET_UCD(ch)->script
+#define UCD_CATEGORY(ch) PRIV(ucp_gentype)[UCD_CHARTYPE(ch)]
+#define UCD_GRAPHBREAK(ch) GET_UCD(ch)->gbprop
+#define UCD_CASESET(ch) GET_UCD(ch)->caseset
+#define UCD_OTHERCASE(ch) ((uint32_t)((int)ch + (int)(GET_UCD(ch)->other_case)))
+
+/* Header for serialized pcre2 codes. */
+
+typedef struct pcre2_serialized_data {
+ uint32_t magic;
+ uint32_t version;
+ uint32_t config;
+ int32_t number_of_codes;
+} pcre2_serialized_data;
+
+
+
+/* ----------------- Items that need PCRE2_CODE_UNIT_WIDTH ----------------- */
+
+/* When this file is included by pcre2test, PCRE2_CODE_UNIT_WIDTH is defined as
+0, so the following items are omitted. */
+
+#if defined PCRE2_CODE_UNIT_WIDTH && PCRE2_CODE_UNIT_WIDTH != 0
+
+/* EBCDIC is supported only for the 8-bit library. */
+
+#if defined EBCDIC && PCRE2_CODE_UNIT_WIDTH != 8
+#error EBCDIC is not supported for the 16-bit or 32-bit libraries
+#endif
+
+/* This is the largest non-UTF code point. */
+
+#define MAX_NON_UTF_CHAR (0xffffffffU >> (32 - PCRE2_CODE_UNIT_WIDTH))
+
+/* Internal shared data tables and variables. These are used by more than one
+of the exported public functions. They have to be "external" in the C sense,
+but are not part of the PCRE2 public API. Although the data for some of them is
+identical in all libraries, they must have different names so that multiple
+libraries can be simultaneously linked to a single application. However, UTF-8
+tables are needed only when compiling the 8-bit library. */
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+extern const int PRIV(utf8_table1)[];
+extern const int PRIV(utf8_table1_size);
+extern const int PRIV(utf8_table2)[];
+extern const int PRIV(utf8_table3)[];
+extern const uint8_t PRIV(utf8_table4)[];
+#endif
+
+#define _pcre2_OP_lengths PCRE2_SUFFIX(_pcre2_OP_lengths_)
+#define _pcre2_callout_end_delims PCRE2_SUFFIX(_pcre2_callout_end_delims_)
+#define _pcre2_callout_start_delims PCRE2_SUFFIX(_pcre2_callout_start_delims_)
+#define _pcre2_default_compile_context PCRE2_SUFFIX(_pcre2_default_compile_context_)
+#define _pcre2_default_match_context PCRE2_SUFFIX(_pcre2_default_match_context_)
+#define _pcre2_default_tables PCRE2_SUFFIX(_pcre2_default_tables_)
+#define _pcre2_hspace_list PCRE2_SUFFIX(_pcre2_hspace_list_)
+#define _pcre2_vspace_list PCRE2_SUFFIX(_pcre2_vspace_list_)
+#define _pcre2_ucd_caseless_sets PCRE2_SUFFIX(_pcre2_ucd_caseless_sets_)
+#define _pcre2_ucd_records PCRE2_SUFFIX(_pcre2_ucd_records_)
+#define _pcre2_ucd_stage1 PCRE2_SUFFIX(_pcre2_ucd_stage1_)
+#define _pcre2_ucd_stage2 PCRE2_SUFFIX(_pcre2_ucd_stage2_)
+#define _pcre2_ucp_gbtable PCRE2_SUFFIX(_pcre2_ucp_gbtable_)
+#define _pcre2_ucp_gentype PCRE2_SUFFIX(_pcre2_ucp_gentype_)
+#define _pcre2_ucp_typerange PCRE2_SUFFIX(_pcre2_ucp_typerange_)
+#define _pcre2_unicode_version PCRE2_SUFFIX(_pcre2_unicode_version_)
+#define _pcre2_utt PCRE2_SUFFIX(_pcre2_utt_)
+#define _pcre2_utt_names PCRE2_SUFFIX(_pcre2_utt_names_)
+#define _pcre2_utt_size PCRE2_SUFFIX(_pcre2_utt_size_)
+
+extern const uint8_t PRIV(OP_lengths)[];
+extern const uint32_t PRIV(callout_end_delims)[];
+extern const uint32_t PRIV(callout_start_delims)[];
+extern const pcre2_compile_context PRIV(default_compile_context);
+extern const pcre2_match_context PRIV(default_match_context);
+extern const uint8_t PRIV(default_tables)[];
+extern const uint32_t PRIV(hspace_list)[];
+extern const uint32_t PRIV(vspace_list)[];
+extern const uint32_t PRIV(ucd_caseless_sets)[];
+extern const ucd_record PRIV(ucd_records)[];
+extern const uint8_t PRIV(ucd_stage1)[];
+extern const uint16_t PRIV(ucd_stage2)[];
+extern const uint32_t PRIV(ucp_gbtable)[];
+extern const uint32_t PRIV(ucp_gentype)[];
+#ifdef SUPPORT_JIT
+extern const int PRIV(ucp_typerange)[];
+#endif
+extern const char *PRIV(unicode_version);
+extern const ucp_type_table PRIV(utt)[];
+extern const char PRIV(utt_names)[];
+extern const size_t PRIV(utt_size);
+
+/* Mode-dependent macros and hidden and private structures are defined in a
+separate file so that pcre2test can include them at all supported widths. When
+compiling the library, PCRE2_CODE_UNIT_WIDTH will be defined, and we can
+include them at the appropriate width, after setting up suffix macros for the
+private structures. */
+
+#define branch_chain PCRE2_SUFFIX(branch_chain_)
+#define compile_block PCRE2_SUFFIX(compile_block_)
+#define dfa_match_block PCRE2_SUFFIX(dfa_match_block_)
+#define match_block PCRE2_SUFFIX(match_block_)
+#define named_group PCRE2_SUFFIX(named_group_)
+
+#include "pcre2_intmodedep.h"
+
+/* Private "external" functions. These are internal functions that are called
+from modules other than the one in which they are defined. They have to be
+"external" in the C sense, but are not part of the PCRE2 public API. They are
+not referenced from pcre2test, and must not be defined when no code unit width
+is available. */
+
+#define _pcre2_auto_possessify PCRE2_SUFFIX(_pcre2_auto_possessify_)
+#define _pcre2_check_escape PCRE2_SUFFIX(_pcre2_check_escape_)
+#define _pcre2_find_bracket PCRE2_SUFFIX(_pcre2_find_bracket_)
+#define _pcre2_is_newline PCRE2_SUFFIX(_pcre2_is_newline_)
+#define _pcre2_jit_free_rodata PCRE2_SUFFIX(_pcre2_jit_free_rodata_)
+#define _pcre2_jit_free PCRE2_SUFFIX(_pcre2_jit_free_)
+#define _pcre2_jit_get_size PCRE2_SUFFIX(_pcre2_jit_get_size_)
+#define _pcre2_jit_get_target PCRE2_SUFFIX(_pcre2_jit_get_target_)
+#define _pcre2_memctl_malloc PCRE2_SUFFIX(_pcre2_memctl_malloc_)
+#define _pcre2_ord2utf PCRE2_SUFFIX(_pcre2_ord2utf_)
+#define _pcre2_strcmp PCRE2_SUFFIX(_pcre2_strcmp_)
+#define _pcre2_strcmp_c8 PCRE2_SUFFIX(_pcre2_strcmp_c8_)
+#define _pcre2_strcpy_c8 PCRE2_SUFFIX(_pcre2_strcpy_c8_)
+#define _pcre2_strlen PCRE2_SUFFIX(_pcre2_strlen_)
+#define _pcre2_strncmp PCRE2_SUFFIX(_pcre2_strncmp_)
+#define _pcre2_strncmp_c8 PCRE2_SUFFIX(_pcre2_strncmp_c8_)
+#define _pcre2_study PCRE2_SUFFIX(_pcre2_study_)
+#define _pcre2_valid_utf PCRE2_SUFFIX(_pcre2_valid_utf_)
+#define _pcre2_was_newline PCRE2_SUFFIX(_pcre2_was_newline_)
+#define _pcre2_xclass PCRE2_SUFFIX(_pcre2_xclass_)
+
+extern int _pcre2_auto_possessify(PCRE2_UCHAR *, BOOL,
+ const compile_block *);
+extern int _pcre2_check_escape(PCRE2_SPTR *, PCRE2_SPTR, uint32_t *,
+ int *, uint32_t, BOOL, compile_block *);
+extern PCRE2_SPTR _pcre2_find_bracket(PCRE2_SPTR, BOOL, int);
+extern BOOL _pcre2_is_newline(PCRE2_SPTR, uint32_t, PCRE2_SPTR,
+ uint32_t *, BOOL);
+extern void _pcre2_jit_free_rodata(void *, void *);
+extern void _pcre2_jit_free(void *, pcre2_memctl *);
+extern size_t _pcre2_jit_get_size(void *);
+const char * _pcre2_jit_get_target(void);
+extern void * _pcre2_memctl_malloc(size_t, pcre2_memctl *);
+extern unsigned int _pcre2_ord2utf(uint32_t, PCRE2_UCHAR *);
+extern int _pcre2_strcmp(PCRE2_SPTR, PCRE2_SPTR);
+extern int _pcre2_strcmp_c8(PCRE2_SPTR, const char *);
+extern PCRE2_SIZE _pcre2_strcpy_c8(PCRE2_UCHAR *, const char *);
+extern PCRE2_SIZE _pcre2_strlen(PCRE2_SPTR);
+extern int _pcre2_strncmp(PCRE2_SPTR, PCRE2_SPTR, size_t);
+extern int _pcre2_strncmp_c8(PCRE2_SPTR, const char *, size_t);
+extern int _pcre2_study(pcre2_real_code *);
+extern int _pcre2_valid_utf(PCRE2_SPTR, PCRE2_SIZE, PCRE2_SIZE *);
+extern BOOL _pcre2_was_newline(PCRE2_SPTR, uint32_t, PCRE2_SPTR,
+ uint32_t *, BOOL);
+extern BOOL _pcre2_xclass(uint32_t, PCRE2_SPTR, BOOL);
+#endif /* PCRE2_CODE_UNIT_WIDTH */
+
+/* End of pcre2_internal.h */
diff --git a/thirdparty/pcre2/src/pcre2_intmodedep.h b/thirdparty/pcre2/src/pcre2_intmodedep.h
new file mode 100644
index 0000000000..ebff7e3066
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_intmodedep.h
@@ -0,0 +1,862 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+/* This module contains mode-dependent macro and structure definitions. The
+file is #included by pcre2_internal.h if PCRE2_CODE_UNIT_WIDTH is defined.
+These mode-dependent items are kept in a separate file so that they can also be
+#included multiple times for different code unit widths by pcre2test in order
+to have access to the hidden structures at all supported widths.
+
+Some of the mode-dependent macros are required at different widths for
+different parts of the pcre2test code (in particular, the included
+pcre_printint.c file). We undefine them here so that they can be re-defined for
+multiple inclusions. Not all of these are used in pcre2test, but it's easier
+just to undefine them all. */
+
+#undef ACROSSCHAR
+#undef BACKCHAR
+#undef BYTES2CU
+#undef CU2BYTES
+#undef FORWARDCHAR
+#undef FORWARDCHARTEST
+#undef GET
+#undef GET2
+#undef GETCHAR
+#undef GETCHARINC
+#undef GETCHARINCTEST
+#undef GETCHARLEN
+#undef GETCHARLENTEST
+#undef GETCHARTEST
+#undef GET_EXTRALEN
+#undef HAS_EXTRALEN
+#undef IMM2_SIZE
+#undef MAX_255
+#undef MAX_MARK
+#undef MAX_PATTERN_SIZE
+#undef MAX_UTF_SINGLE_CU
+#undef NOT_FIRSTCU
+#undef PUT
+#undef PUT2
+#undef PUT2INC
+#undef PUTCHAR
+#undef PUTINC
+#undef TABLE_GET
+
+
+
+/* -------------------------- MACROS ----------------------------- */
+
+/* PCRE keeps offsets in its compiled code as at least 16-bit quantities
+(always stored in big-endian order in 8-bit mode) by default. These are used,
+for example, to link from the start of a subpattern to its alternatives and its
+end. The use of 16 bits per offset limits the size of an 8-bit compiled regex
+to around 64K, which is big enough for almost everybody. However, I received a
+request for an even bigger limit. For this reason, and also to make the code
+easier to maintain, the storing and loading of offsets from the compiled code
+unit string is now handled by the macros that are defined here.
+
+The macros are controlled by the value of LINK_SIZE. This defaults to 2, but
+values of 3 or 4 are also supported. */
+
+/* ------------------- 8-bit support ------------------ */
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+
+#if LINK_SIZE == 2
+#define PUT(a,n,d) \
+ (a[n] = (PCRE2_UCHAR)((d) >> 8)), \
+ (a[(n)+1] = (PCRE2_UCHAR)((d) & 255))
+#define GET(a,n) \
+ (unsigned int)(((a)[n] << 8) | (a)[(n)+1])
+#define MAX_PATTERN_SIZE (1 << 16)
+
+#elif LINK_SIZE == 3
+#define PUT(a,n,d) \
+ (a[n] = (PCRE2_UCHAR)((d) >> 16)), \
+ (a[(n)+1] = (PCRE2_UCHAR)((d) >> 8)), \
+ (a[(n)+2] = (PCRE2_UCHAR)((d) & 255))
+#define GET(a,n) \
+ (unsigned int)(((a)[n] << 16) | ((a)[(n)+1] << 8) | (a)[(n)+2])
+#define MAX_PATTERN_SIZE (1 << 24)
+
+#elif LINK_SIZE == 4
+#define PUT(a,n,d) \
+ (a[n] = (PCRE2_UCHAR)((d) >> 24)), \
+ (a[(n)+1] = (PCRE2_UCHAR)((d) >> 16)), \
+ (a[(n)+2] = (PCRE2_UCHAR)((d) >> 8)), \
+ (a[(n)+3] = (PCRE2_UCHAR)((d) & 255))
+#define GET(a,n) \
+ (unsigned int)(((a)[n] << 24) | ((a)[(n)+1] << 16) | ((a)[(n)+2] << 8) | (a)[(n)+3])
+#define MAX_PATTERN_SIZE (1 << 30) /* Keep it positive */
+
+#else
+#error LINK_SIZE must be 2, 3, or 4
+#endif
+
+
+/* ------------------- 16-bit support ------------------ */
+
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+
+#if LINK_SIZE == 2
+#undef LINK_SIZE
+#define LINK_SIZE 1
+#define PUT(a,n,d) \
+ (a[n] = (PCRE2_UCHAR)(d))
+#define GET(a,n) \
+ (a[n])
+#define MAX_PATTERN_SIZE (1 << 16)
+
+#elif LINK_SIZE == 3 || LINK_SIZE == 4
+#undef LINK_SIZE
+#define LINK_SIZE 2
+#define PUT(a,n,d) \
+ (a[n] = (PCRE2_UCHAR)((d) >> 16)), \
+ (a[(n)+1] = (PCRE2_UCHAR)((d) & 65535))
+#define GET(a,n) \
+ (unsigned int)(((a)[n] << 16) | (a)[(n)+1])
+#define MAX_PATTERN_SIZE (1 << 30) /* Keep it positive */
+
+#else
+#error LINK_SIZE must be 2, 3, or 4
+#endif
+
+
+/* ------------------- 32-bit support ------------------ */
+
+#elif PCRE2_CODE_UNIT_WIDTH == 32
+#undef LINK_SIZE
+#define LINK_SIZE 1
+#define PUT(a,n,d) \
+ (a[n] = (d))
+#define GET(a,n) \
+ (a[n])
+#define MAX_PATTERN_SIZE (1 << 30) /* Keep it positive */
+
+#else
+#error Unsupported compiling mode
+#endif
+
+
+/* --------------- Other mode-specific macros ----------------- */
+
+/* PCRE uses some other (at least) 16-bit quantities that do not change when
+the size of offsets changes. There are used for repeat counts and for other
+things such as capturing parenthesis numbers in back references.
+
+Define the number of code units required to hold a 16-bit count/offset, and
+macros to load and store such a value. For reasons that I do not understand,
+the expression in the 8-bit GET2 macro is treated by gcc as a signed
+expression, even when a is declared as unsigned. It seems that any kind of
+arithmetic results in a signed value. Hence the cast. */
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+#define IMM2_SIZE 2
+#define GET2(a,n) (unsigned int)(((a)[n] << 8) | (a)[(n)+1])
+#define PUT2(a,n,d) a[n] = (d) >> 8, a[(n)+1] = (d) & 255
+
+#else /* Code units are 16 or 32 bits */
+#define IMM2_SIZE 1
+#define GET2(a,n) a[n]
+#define PUT2(a,n,d) a[n] = d
+#endif
+
+/* Other macros that are different for 8-bit mode. The MAX_255 macro checks
+whether its argument, which is assumed to be one code unit, is less than 256.
+The maximum length of a MARK name must fit in one code unit; currently it is
+set to 255 or 65535. The TABLE_GET macro is used to access elements of tables
+containing exactly 256 items. When code points can be greater than 255, a check
+is needed before accessing these tables. */
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+#define MAX_255(c) TRUE
+#define MAX_MARK ((1u << 8) - 1)
+#ifdef SUPPORT_UNICODE
+#define SUPPORT_WIDE_CHARS
+#endif /* SUPPORT_UNICODE */
+#define TABLE_GET(c, table, default) ((table)[c])
+
+#else /* Code units are 16 or 32 bits */
+#define MAX_255(c) ((c) <= 255u)
+#define MAX_MARK ((1u << 16) - 1)
+#define SUPPORT_WIDE_CHARS
+#define TABLE_GET(c, table, default) (MAX_255(c)? ((table)[c]):(default))
+#endif
+
+
+
+/* ----------------- Character-handling macros ----------------- */
+
+/* There is a proposed future special "UTF-21" mode, in which only the lowest
+21 bits of a 32-bit character are interpreted as UTF, with the remaining 11
+high-order bits available to the application for other uses. In preparation for
+the future implementation of this mode, there are macros that load a data item
+and, if in this special mode, mask it to 21 bits. These macros all have names
+starting with UCHAR21. In all other modes, including the normal 32-bit
+library, the macros all have the same simple definitions. When the new mode is
+implemented, it is expected that these definitions will be varied appropriately
+using #ifdef when compiling the library that supports the special mode. */
+
+#define UCHAR21(eptr) (*(eptr))
+#define UCHAR21TEST(eptr) (*(eptr))
+#define UCHAR21INC(eptr) (*(eptr)++)
+#define UCHAR21INCTEST(eptr) (*(eptr)++)
+
+/* When UTF encoding is being used, a character is no longer just a single
+byte in 8-bit mode or a single short in 16-bit mode. The macros for character
+handling generate simple sequences when used in the basic mode, and more
+complicated ones for UTF characters. GETCHARLENTEST and other macros are not
+used when UTF is not supported. To make sure they can never even appear when
+UTF support is omitted, we don't even define them. */
+
+#ifndef SUPPORT_UNICODE
+
+/* #define MAX_UTF_SINGLE_CU */
+/* #define HAS_EXTRALEN(c) */
+/* #define GET_EXTRALEN(c) */
+/* #define NOT_FIRSTCU(c) */
+#define GETCHAR(c, eptr) c = *eptr;
+#define GETCHARTEST(c, eptr) c = *eptr;
+#define GETCHARINC(c, eptr) c = *eptr++;
+#define GETCHARINCTEST(c, eptr) c = *eptr++;
+#define GETCHARLEN(c, eptr, len) c = *eptr;
+#define PUTCHAR(c, p) (*p = c, 1)
+/* #define GETCHARLENTEST(c, eptr, len) */
+/* #define BACKCHAR(eptr) */
+/* #define FORWARDCHAR(eptr) */
+/* #define FORWARCCHARTEST(eptr,end) */
+/* #define ACROSSCHAR(condition, eptr, action) */
+
+#else /* SUPPORT_UNICODE */
+
+/* ------------------- 8-bit support ------------------ */
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+#define MAYBE_UTF_MULTI /* UTF chars may use multiple code units */
+
+/* The largest UTF code point that can be encoded as a single code unit. */
+
+#define MAX_UTF_SINGLE_CU 127
+
+/* Tests whether the code point needs extra characters to decode. */
+
+#define HAS_EXTRALEN(c) HASUTF8EXTRALEN(c)
+
+/* Returns with the additional number of characters if IS_MULTICHAR(c) is TRUE.
+Otherwise it has an undefined behaviour. */
+
+#define GET_EXTRALEN(c) (PRIV(utf8_table4)[(c) & 0x3fu])
+
+/* Returns TRUE, if the given value is not the first code unit of a UTF
+sequence. */
+
+#define NOT_FIRSTCU(c) (((c) & 0xc0u) == 0x80u)
+
+/* Get the next UTF-8 character, not advancing the pointer. This is called when
+we know we are in UTF-8 mode. */
+
+#define GETCHAR(c, eptr) \
+ c = *eptr; \
+ if (c >= 0xc0u) GETUTF8(c, eptr);
+
+/* Get the next UTF-8 character, testing for UTF-8 mode, and not advancing the
+pointer. */
+
+#define GETCHARTEST(c, eptr) \
+ c = *eptr; \
+ if (utf && c >= 0xc0u) GETUTF8(c, eptr);
+
+/* Get the next UTF-8 character, advancing the pointer. This is called when we
+know we are in UTF-8 mode. */
+
+#define GETCHARINC(c, eptr) \
+ c = *eptr++; \
+ if (c >= 0xc0u) GETUTF8INC(c, eptr);
+
+/* Get the next character, testing for UTF-8 mode, and advancing the pointer.
+This is called when we don't know if we are in UTF-8 mode. */
+
+#define GETCHARINCTEST(c, eptr) \
+ c = *eptr++; \
+ if (utf && c >= 0xc0u) GETUTF8INC(c, eptr);
+
+/* Get the next UTF-8 character, not advancing the pointer, incrementing length
+if there are extra bytes. This is called when we know we are in UTF-8 mode. */
+
+#define GETCHARLEN(c, eptr, len) \
+ c = *eptr; \
+ if (c >= 0xc0u) GETUTF8LEN(c, eptr, len);
+
+/* Get the next UTF-8 character, testing for UTF-8 mode, not advancing the
+pointer, incrementing length if there are extra bytes. This is called when we
+do not know if we are in UTF-8 mode. */
+
+#define GETCHARLENTEST(c, eptr, len) \
+ c = *eptr; \
+ if (utf && c >= 0xc0u) GETUTF8LEN(c, eptr, len);
+
+/* If the pointer is not at the start of a character, move it back until
+it is. This is called only in UTF-8 mode - we don't put a test within the macro
+because almost all calls are already within a block of UTF-8 only code. */
+
+#define BACKCHAR(eptr) while((*eptr & 0xc0u) == 0x80u) eptr--
+
+/* Same as above, just in the other direction. */
+#define FORWARDCHAR(eptr) while((*eptr & 0xc0u) == 0x80u) eptr++
+#define FORWARDCHARTEST(eptr,end) while(eptr < end && (*eptr & 0xc0u) == 0x80u) eptr++
+
+/* Same as above, but it allows a fully customizable form. */
+#define ACROSSCHAR(condition, eptr, action) \
+ while((condition) && ((eptr) & 0xc0u) == 0x80u) action
+
+/* Deposit a character into memory, returning the number of code units. */
+
+#define PUTCHAR(c, p) ((utf && c > MAX_UTF_SINGLE_CU)? \
+ PRIV(ord2utf)(c,p) : (*p = c, 1))
+
+
+/* ------------------- 16-bit support ------------------ */
+
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+#define MAYBE_UTF_MULTI /* UTF chars may use multiple code units */
+
+/* The largest UTF code point that can be encoded as a single code unit. */
+
+#define MAX_UTF_SINGLE_CU 65535
+
+/* Tests whether the code point needs extra characters to decode. */
+
+#define HAS_EXTRALEN(c) (((c) & 0xfc00u) == 0xd800u)
+
+/* Returns with the additional number of characters if IS_MULTICHAR(c) is TRUE.
+Otherwise it has an undefined behaviour. */
+
+#define GET_EXTRALEN(c) 1
+
+/* Returns TRUE, if the given value is not the first code unit of a UTF
+sequence. */
+
+#define NOT_FIRSTCU(c) (((c) & 0xfc00u) == 0xdc00u)
+
+/* Base macro to pick up the low surrogate of a UTF-16 character, not
+advancing the pointer. */
+
+#define GETUTF16(c, eptr) \
+ { c = (((c & 0x3ffu) << 10) | (eptr[1] & 0x3ffu)) + 0x10000u; }
+
+/* Get the next UTF-16 character, not advancing the pointer. This is called when
+we know we are in UTF-16 mode. */
+
+#define GETCHAR(c, eptr) \
+ c = *eptr; \
+ if ((c & 0xfc00u) == 0xd800u) GETUTF16(c, eptr);
+
+/* Get the next UTF-16 character, testing for UTF-16 mode, and not advancing the
+pointer. */
+
+#define GETCHARTEST(c, eptr) \
+ c = *eptr; \
+ if (utf && (c & 0xfc00u) == 0xd800u) GETUTF16(c, eptr);
+
+/* Base macro to pick up the low surrogate of a UTF-16 character, advancing
+the pointer. */
+
+#define GETUTF16INC(c, eptr) \
+ { c = (((c & 0x3ffu) << 10) | (*eptr++ & 0x3ffu)) + 0x10000u; }
+
+/* Get the next UTF-16 character, advancing the pointer. This is called when we
+know we are in UTF-16 mode. */
+
+#define GETCHARINC(c, eptr) \
+ c = *eptr++; \
+ if ((c & 0xfc00u) == 0xd800u) GETUTF16INC(c, eptr);
+
+/* Get the next character, testing for UTF-16 mode, and advancing the pointer.
+This is called when we don't know if we are in UTF-16 mode. */
+
+#define GETCHARINCTEST(c, eptr) \
+ c = *eptr++; \
+ if (utf && (c & 0xfc00u) == 0xd800u) GETUTF16INC(c, eptr);
+
+/* Base macro to pick up the low surrogate of a UTF-16 character, not
+advancing the pointer, incrementing the length. */
+
+#define GETUTF16LEN(c, eptr, len) \
+ { c = (((c & 0x3ffu) << 10) | (eptr[1] & 0x3ffu)) + 0x10000u; len++; }
+
+/* Get the next UTF-16 character, not advancing the pointer, incrementing
+length if there is a low surrogate. This is called when we know we are in
+UTF-16 mode. */
+
+#define GETCHARLEN(c, eptr, len) \
+ c = *eptr; \
+ if ((c & 0xfc00u) == 0xd800u) GETUTF16LEN(c, eptr, len);
+
+/* Get the next UTF-816character, testing for UTF-16 mode, not advancing the
+pointer, incrementing length if there is a low surrogate. This is called when
+we do not know if we are in UTF-16 mode. */
+
+#define GETCHARLENTEST(c, eptr, len) \
+ c = *eptr; \
+ if (utf && (c & 0xfc00u) == 0xd800u) GETUTF16LEN(c, eptr, len);
+
+/* If the pointer is not at the start of a character, move it back until
+it is. This is called only in UTF-16 mode - we don't put a test within the
+macro because almost all calls are already within a block of UTF-16 only
+code. */
+
+#define BACKCHAR(eptr) if ((*eptr & 0xfc00u) == 0xdc00u) eptr--
+
+/* Same as above, just in the other direction. */
+#define FORWARDCHAR(eptr) if ((*eptr & 0xfc00u) == 0xdc00u) eptr++
+#define FORWARDCHARTEST(eptr,end) if (eptr < end && (*eptr & 0xfc00u) == 0xdc00u) eptr++
+
+/* Same as above, but it allows a fully customizable form. */
+#define ACROSSCHAR(condition, eptr, action) \
+ if ((condition) && ((eptr) & 0xfc00u) == 0xdc00u) action
+
+/* Deposit a character into memory, returning the number of code units. */
+
+#define PUTCHAR(c, p) ((utf && c > MAX_UTF_SINGLE_CU)? \
+ PRIV(ord2utf)(c,p) : (*p = c, 1))
+
+
+/* ------------------- 32-bit support ------------------ */
+
+#else
+
+/* These are trivial for the 32-bit library, since all UTF-32 characters fit
+into one PCRE2_UCHAR unit. */
+
+#define MAX_UTF_SINGLE_CU (0x10ffffu)
+#define HAS_EXTRALEN(c) (0)
+#define GET_EXTRALEN(c) (0)
+#define NOT_FIRSTCU(c) (0)
+
+/* Get the next UTF-32 character, not advancing the pointer. This is called when
+we know we are in UTF-32 mode. */
+
+#define GETCHAR(c, eptr) \
+ c = *(eptr);
+
+/* Get the next UTF-32 character, testing for UTF-32 mode, and not advancing the
+pointer. */
+
+#define GETCHARTEST(c, eptr) \
+ c = *(eptr);
+
+/* Get the next UTF-32 character, advancing the pointer. This is called when we
+know we are in UTF-32 mode. */
+
+#define GETCHARINC(c, eptr) \
+ c = *((eptr)++);
+
+/* Get the next character, testing for UTF-32 mode, and advancing the pointer.
+This is called when we don't know if we are in UTF-32 mode. */
+
+#define GETCHARINCTEST(c, eptr) \
+ c = *((eptr)++);
+
+/* Get the next UTF-32 character, not advancing the pointer, not incrementing
+length (since all UTF-32 is of length 1). This is called when we know we are in
+UTF-32 mode. */
+
+#define GETCHARLEN(c, eptr, len) \
+ GETCHAR(c, eptr)
+
+/* Get the next UTF-32character, testing for UTF-32 mode, not advancing the
+pointer, not incrementing the length (since all UTF-32 is of length 1).
+This is called when we do not know if we are in UTF-32 mode. */
+
+#define GETCHARLENTEST(c, eptr, len) \
+ GETCHARTEST(c, eptr)
+
+/* If the pointer is not at the start of a character, move it back until
+it is. This is called only in UTF-32 mode - we don't put a test within the
+macro because almost all calls are already within a block of UTF-32 only
+code.
+
+These are all no-ops since all UTF-32 characters fit into one pcre_uchar. */
+
+#define BACKCHAR(eptr) do { } while (0)
+
+/* Same as above, just in the other direction. */
+
+#define FORWARDCHAR(eptr) do { } while (0)
+#define FORWARDCHARTEST(eptr,end) do { } while (0)
+
+/* Same as above, but it allows a fully customizable form. */
+
+#define ACROSSCHAR(condition, eptr, action) do { } while (0)
+
+/* Deposit a character into memory, returning the number of code units. */
+
+#define PUTCHAR(c, p) (*p = c, 1)
+
+#endif /* UTF-32 character handling */
+#endif /* SUPPORT_UNICODE */
+
+
+/* Mode-dependent macros that have the same definition in all modes. */
+
+#define CU2BYTES(x) ((x)*((PCRE2_CODE_UNIT_WIDTH/8)))
+#define BYTES2CU(x) ((x)/((PCRE2_CODE_UNIT_WIDTH/8)))
+#define PUTINC(a,n,d) PUT(a,n,d), a += LINK_SIZE
+#define PUT2INC(a,n,d) PUT2(a,n,d), a += IMM2_SIZE
+
+
+/* ----------------------- HIDDEN STRUCTURES ----------------------------- */
+
+/* NOTE: All these structures *must* start with a pcre2_memctl structure. The
+code that uses them is simpler because it assumes this. */
+
+/* The real general context structure. At present it holds only data for custom
+memory control. */
+
+typedef struct pcre2_real_general_context {
+ pcre2_memctl memctl;
+} pcre2_real_general_context;
+
+/* The real compile context structure */
+
+typedef struct pcre2_real_compile_context {
+ pcre2_memctl memctl;
+ int (*stack_guard)(uint32_t, void *);
+ void *stack_guard_data;
+ const uint8_t *tables;
+ PCRE2_SIZE max_pattern_length;
+ uint16_t bsr_convention;
+ uint16_t newline_convention;
+ uint32_t parens_nest_limit;
+} pcre2_real_compile_context;
+
+/* The real match context structure. */
+
+typedef struct pcre2_real_match_context {
+ pcre2_memctl memctl;
+#ifdef HEAP_MATCH_RECURSE
+ pcre2_memctl stack_memctl;
+#endif
+#ifdef SUPPORT_JIT
+ pcre2_jit_callback jit_callback;
+ void *jit_callback_data;
+#endif
+ int (*callout)(pcre2_callout_block *, void *);
+ void *callout_data;
+ PCRE2_SIZE offset_limit;
+ uint32_t match_limit;
+ uint32_t recursion_limit;
+} pcre2_real_match_context;
+
+/* The real compiled code structure. The type for the blocksize field is
+defined specially because it is required in pcre2_serialize_decode() when
+copying the size from possibly unaligned memory into a variable of the same
+type. Use a macro rather than a typedef to avoid compiler warnings when this
+file is included multiple times by pcre2test. LOOKBEHIND_MAX specifies the
+largest lookbehind that is supported. (OP_REVERSE in a pattern has a 16-bit
+argument in 8-bit and 16-bit modes, so we need no more than a 16-bit field
+here.) */
+
+#undef CODE_BLOCKSIZE_TYPE
+#define CODE_BLOCKSIZE_TYPE size_t
+
+#undef LOOKBEHIND_MAX
+#define LOOKBEHIND_MAX UINT16_MAX
+
+typedef struct pcre2_real_code {
+ pcre2_memctl memctl; /* Memory control fields */
+ const uint8_t *tables; /* The character tables */
+ void *executable_jit; /* Pointer to JIT code */
+ uint8_t start_bitmap[32]; /* Bitmap for starting code unit < 256 */
+ CODE_BLOCKSIZE_TYPE blocksize; /* Total (bytes) that was malloc-ed */
+ uint32_t magic_number; /* Paranoid and endianness check */
+ uint32_t compile_options; /* Options passed to pcre2_compile() */
+ uint32_t overall_options; /* Options after processing the pattern */
+ uint32_t flags; /* Various state flags */
+ uint32_t limit_match; /* Limit set in the pattern */
+ uint32_t limit_recursion; /* Limit set in the pattern */
+ uint32_t first_codeunit; /* Starting code unit */
+ uint32_t last_codeunit; /* This codeunit must be seen */
+ uint16_t bsr_convention; /* What \R matches */
+ uint16_t newline_convention; /* What is a newline? */
+ uint16_t max_lookbehind; /* Longest lookbehind (characters) */
+ uint16_t minlength; /* Minimum length of match */
+ uint16_t top_bracket; /* Highest numbered group */
+ uint16_t top_backref; /* Highest numbered back reference */
+ uint16_t name_entry_size; /* Size (code units) of table entries */
+ uint16_t name_count; /* Number of name entries in the table */
+} pcre2_real_code;
+
+/* The real match data structure. */
+
+typedef struct pcre2_real_match_data {
+ pcre2_memctl memctl;
+ const pcre2_real_code *code; /* The pattern used for the match */
+ PCRE2_SPTR subject; /* The subject that was matched */
+ PCRE2_SPTR mark; /* Pointer to last mark */
+ PCRE2_SIZE leftchar; /* Offset to leftmost code unit */
+ PCRE2_SIZE rightchar; /* Offset to rightmost code unit */
+ PCRE2_SIZE startchar; /* Offset to starting code unit */
+ uint16_t matchedby; /* Type of match (normal, JIT, DFA) */
+ uint16_t oveccount; /* Number of pairs */
+ int rc; /* The return code from the match */
+ PCRE2_SIZE ovector[1]; /* The first field */
+} pcre2_real_match_data;
+
+
+/* ----------------------- PRIVATE STRUCTURES ----------------------------- */
+
+/* These structures are not needed for pcre2test. */
+
+#ifndef PCRE2_PCRE2TEST
+
+/* Structures for checking for mutual recursion when scanning compiled or
+parsed code. */
+
+typedef struct recurse_check {
+ struct recurse_check *prev;
+ PCRE2_SPTR group;
+} recurse_check;
+
+typedef struct parsed_recurse_check {
+ struct parsed_recurse_check *prev;
+ uint32_t *groupptr;
+} parsed_recurse_check;
+
+/* Structure for building a cache when filling in recursion offsets. */
+
+typedef struct recurse_cache {
+ PCRE2_SPTR group;
+ int groupnumber;
+} recurse_cache;
+
+/* Structure for maintaining a chain of pointers to the currently incomplete
+branches, for testing for left recursion while compiling. */
+
+typedef struct branch_chain {
+ struct branch_chain *outer;
+ PCRE2_UCHAR *current_branch;
+} branch_chain;
+
+/* Structure for building a list of named groups during the first pass of
+compiling. */
+
+typedef struct named_group {
+ PCRE2_SPTR name; /* Points to the name in the pattern */
+ uint32_t number; /* Group number */
+ uint16_t length; /* Length of the name */
+ uint16_t isdup; /* TRUE if a duplicate */
+} named_group;
+
+/* Structure for passing "static" information around between the functions
+doing the compiling, so that they are thread-safe. */
+
+typedef struct compile_block {
+ pcre2_real_compile_context *cx; /* Points to the compile context */
+ const uint8_t *lcc; /* Points to lower casing table */
+ const uint8_t *fcc; /* Points to case-flipping table */
+ const uint8_t *cbits; /* Points to character type table */
+ const uint8_t *ctypes; /* Points to table of type maps */
+ PCRE2_SPTR start_workspace; /* The start of working space */
+ PCRE2_SPTR start_code; /* The start of the compiled code */
+ PCRE2_SPTR start_pattern; /* The start of the pattern */
+ PCRE2_SPTR end_pattern; /* The end of the pattern */
+ PCRE2_UCHAR *name_table; /* The name/number table */
+ PCRE2_SIZE workspace_size; /* Size of workspace */
+ PCRE2_SIZE small_ref_offset[10]; /* Offsets for \1 to \9 */
+ PCRE2_SIZE erroroffset; /* Offset of error in pattern */
+ uint16_t names_found; /* Number of entries so far */
+ uint16_t name_entry_size; /* Size of each entry */
+ open_capitem *open_caps; /* Chain of open capture items */
+ named_group *named_groups; /* Points to vector in pre-compile */
+ uint32_t named_group_list_size; /* Number of entries in the list */
+ uint32_t external_options; /* External (initial) options */
+ uint32_t external_flags; /* External flag bits to be set */
+ uint32_t bracount; /* Count of capturing parentheses */
+ uint32_t lastcapture; /* Last capture encountered */
+ uint32_t *parsed_pattern; /* Parsed pattern buffer */
+ uint32_t *parsed_pattern_end; /* Parsed pattern should not get here */
+ uint32_t *groupinfo; /* Group info vector */
+ uint32_t top_backref; /* Maximum back reference */
+ uint32_t backref_map; /* Bitmap of low back refs */
+ uint32_t nltype; /* Newline type */
+ uint32_t nllen; /* Newline string length */
+ uint32_t class_range_start; /* Overall class range start */
+ uint32_t class_range_end; /* Overall class range end */
+ PCRE2_UCHAR nl[4]; /* Newline string when fixed length */
+ int max_lookbehind; /* Maximum lookbehind (characters) */
+ int parens_depth; /* Depth of nested parentheses */
+ int assert_depth; /* Depth of nested assertions */
+ int req_varyopt; /* "After variable item" flag for reqbyte */
+ BOOL had_accept; /* (*ACCEPT) encountered */
+ BOOL had_pruneorskip; /* (*PRUNE) or (*SKIP) encountered */
+ BOOL had_recurse; /* Had a recursion or subroutine call */
+ BOOL dupnames; /* Duplicate names exist */
+} compile_block;
+
+/* Structure for keeping the properties of the in-memory stack used
+by the JIT matcher. */
+
+typedef struct pcre2_real_jit_stack {
+ pcre2_memctl memctl;
+ void* stack;
+} pcre2_real_jit_stack;
+
+/* Structure for keeping a chain of heap blocks used for saving ovectors
+during pattern recursion when the ovector is larger than can be saved on
+the system stack. */
+
+typedef struct ovecsave_frame {
+ struct ovecsave_frame *next; /* Next frame on free chain */
+ PCRE2_SIZE saved_ovec[1]; /* First vector element */
+} ovecsave_frame;
+
+/* Structure for items in a linked list that represents an explicit recursive
+call within the pattern; used by pcre_match(). */
+
+typedef struct recursion_info {
+ struct recursion_info *prevrec; /* Previous recursion record (or NULL) */
+ unsigned int group_num; /* Number of group that was called */
+ PCRE2_SIZE *ovec_save; /* Pointer to saved ovector frame */
+ uint32_t saved_capture_last; /* Last capture number */
+ PCRE2_SPTR subject_position; /* Position at start of recursion */
+} recursion_info;
+
+/* A similar structure for pcre_dfa_match(). */
+
+typedef struct dfa_recursion_info {
+ struct dfa_recursion_info *prevrec;
+ PCRE2_SPTR subject_position;
+ uint32_t group_num;
+} dfa_recursion_info;
+
+/* Structure for building a chain of data for holding the values of the subject
+pointer at the start of each subpattern, so as to detect when an empty string
+has been matched by a subpattern - to break infinite loops; used by
+pcre2_match(). */
+
+typedef struct eptrblock {
+ struct eptrblock *epb_prev;
+ PCRE2_SPTR epb_saved_eptr;
+} eptrblock;
+
+/* Structure for passing "static" information around between the functions
+doing traditional NFA matching (pcre2_match() and friends). */
+
+typedef struct match_block {
+ pcre2_memctl memctl; /* For general use */
+#ifdef HEAP_MATCH_RECURSE
+ pcre2_memctl stack_memctl; /* For "stack" frames */
+#endif
+ uint32_t match_call_count; /* As it says */
+ uint32_t match_limit; /* As it says */
+ uint32_t match_limit_recursion; /* As it says */
+ BOOL hitend; /* Hit the end of the subject at some point */
+ BOOL hasthen; /* Pattern contains (*THEN) */
+ const uint8_t *lcc; /* Points to lower casing table */
+ const uint8_t *fcc; /* Points to case-flipping table */
+ const uint8_t *ctypes; /* Points to table of type maps */
+ PCRE2_SIZE *ovector; /* Pointer to the offset vector */
+ PCRE2_SIZE offset_end; /* One past the end */
+ PCRE2_SIZE offset_max; /* The maximum usable for return data */
+ PCRE2_SIZE start_offset; /* The start offset value */
+ PCRE2_SIZE end_offset_top; /* Highwater mark at end of match */
+ uint16_t partial; /* PARTIAL options */
+ uint16_t bsr_convention; /* \R interpretation */
+ uint16_t name_count; /* Number of names in name table */
+ uint16_t name_entry_size; /* Size of entry in names table */
+ PCRE2_SPTR name_table; /* Table of group names */
+ PCRE2_SPTR start_code; /* For use when recursing */
+ PCRE2_SPTR start_subject; /* Start of the subject string */
+ PCRE2_SPTR end_subject; /* End of the subject string */
+ PCRE2_SPTR start_match_ptr; /* Start of matched string */
+ PCRE2_SPTR end_match_ptr; /* Subject position at end match */
+ PCRE2_SPTR start_used_ptr; /* Earliest consulted character */
+ PCRE2_SPTR last_used_ptr; /* Latest consulted character */
+ PCRE2_SPTR mark; /* Mark pointer to pass back on success */
+ PCRE2_SPTR nomatch_mark; /* Mark pointer to pass back on failure */
+ PCRE2_SPTR once_target; /* Where to back up to for atomic groups */
+ uint32_t moptions; /* Match options */
+ uint32_t poptions; /* Pattern options */
+ uint32_t capture_last; /* Most recent capture number + overflow flag */
+ uint32_t skip_arg_count; /* For counting SKIP_ARGs */
+ uint32_t ignore_skip_arg; /* For re-run when SKIP arg name not found */
+ uint32_t match_function_type; /* Set for certain special calls of match() */
+ uint32_t nltype; /* Newline type */
+ uint32_t nllen; /* Newline string length */
+ PCRE2_UCHAR nl[4]; /* Newline string when fixed */
+ eptrblock *eptrchain; /* Chain of eptrblocks for tail recursions */
+ recursion_info *recursive; /* Linked list of recursion data */
+ ovecsave_frame *ovecsave_chain; /* Linked list of free ovecsave blocks */
+ void *callout_data; /* To pass back to callouts */
+ int (*callout)(pcre2_callout_block *,void *); /* Callout function or NULL */
+#ifdef HEAP_MATCH_RECURSE
+ void *match_frames_base; /* For remembering malloc'd frames */
+#endif
+} match_block;
+
+/* A similar structure is used for the same purpose by the DFA matching
+functions. */
+
+typedef struct dfa_match_block {
+ pcre2_memctl memctl; /* For general use */
+ PCRE2_SPTR start_code; /* Start of the compiled pattern */
+ PCRE2_SPTR start_subject ; /* Start of the subject string */
+ PCRE2_SPTR end_subject; /* End of subject string */
+ PCRE2_SPTR start_used_ptr; /* Earliest consulted character */
+ PCRE2_SPTR last_used_ptr; /* Latest consulted character */
+ const uint8_t *tables; /* Character tables */
+ PCRE2_SIZE start_offset; /* The start offset value */
+ uint32_t match_limit_recursion; /* As it says */
+ uint32_t moptions; /* Match options */
+ uint32_t poptions; /* Pattern options */
+ uint32_t nltype; /* Newline type */
+ uint32_t nllen; /* Newline string length */
+ PCRE2_UCHAR nl[4]; /* Newline string when fixed */
+ uint16_t bsr_convention; /* \R interpretation */
+ void *callout_data; /* To pass back to callouts */
+ int (*callout)(pcre2_callout_block *,void *); /* Callout function or NULL */
+ dfa_recursion_info *recursive; /* Linked list of recursion data */
+} dfa_match_block;
+
+#endif /* PCRE2_PCRE2TEST */
+
+/* End of pcre2_intmodedep.h */
diff --git a/thirdparty/pcre2/src/pcre2_jit_compile.c b/thirdparty/pcre2/src/pcre2_jit_compile.c
new file mode 100644
index 0000000000..8dea90a1c5
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_jit_compile.c
@@ -0,0 +1,11501 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre2_internal.h"
+
+#ifdef SUPPORT_JIT
+
+/* All-in-one: Since we use the JIT compiler only from here,
+we just include it. This way we don't need to touch the build
+system files. */
+
+#define SLJIT_CONFIG_AUTO 1
+#define SLJIT_CONFIG_STATIC 1
+#define SLJIT_VERBOSE 0
+
+#ifdef PCRE2_DEBUG
+#define SLJIT_DEBUG 1
+#else
+#define SLJIT_DEBUG 0
+#endif
+
+#define SLJIT_MALLOC(size, allocator_data) pcre2_jit_malloc(size, allocator_data)
+#define SLJIT_FREE(ptr, allocator_data) pcre2_jit_free(ptr, allocator_data)
+
+static void * pcre2_jit_malloc(size_t size, void *allocator_data)
+{
+pcre2_memctl *allocator = ((pcre2_memctl*)allocator_data);
+return allocator->malloc(size, allocator->memory_data);
+}
+
+static void pcre2_jit_free(void *ptr, void *allocator_data)
+{
+pcre2_memctl *allocator = ((pcre2_memctl*)allocator_data);
+allocator->free(ptr, allocator->memory_data);
+}
+
+#include "sljit/sljitLir.c"
+
+#if defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED
+#error Unsupported architecture
+#endif
+
+/* Defines for debugging purposes. */
+
+/* 1 - Use unoptimized capturing brackets.
+ 2 - Enable capture_last_ptr (includes option 1). */
+/* #define DEBUG_FORCE_UNOPTIMIZED_CBRAS 2 */
+
+/* 1 - Always have a control head. */
+/* #define DEBUG_FORCE_CONTROL_HEAD 1 */
+
+/* Allocate memory for the regex stack on the real machine stack.
+Fast, but limited size. */
+#define MACHINE_STACK_SIZE 32768
+
+/* Growth rate for stack allocated by the OS. Should be the multiply
+of page size. */
+#define STACK_GROWTH_RATE 8192
+
+/* Enable to check that the allocation could destroy temporaries. */
+#if defined SLJIT_DEBUG && SLJIT_DEBUG
+#define DESTROY_REGISTERS 1
+#endif
+
+/*
+Short summary about the backtracking mechanism empolyed by the jit code generator:
+
+The code generator follows the recursive nature of the PERL compatible regular
+expressions. The basic blocks of regular expressions are condition checkers
+whose execute different commands depending on the result of the condition check.
+The relationship between the operators can be horizontal (concatenation) and
+vertical (sub-expression) (See struct backtrack_common for more details).
+
+ 'ab' - 'a' and 'b' regexps are concatenated
+ 'a+' - 'a' is the sub-expression of the '+' operator
+
+The condition checkers are boolean (true/false) checkers. Machine code is generated
+for the checker itself and for the actions depending on the result of the checker.
+The 'true' case is called as the matching path (expected path), and the other is called as
+the 'backtrack' path. Branch instructions are expesive for all CPUs, so we avoid taken
+branches on the matching path.
+
+ Greedy star operator (*) :
+ Matching path: match happens.
+ Backtrack path: match failed.
+ Non-greedy star operator (*?) :
+ Matching path: no need to perform a match.
+ Backtrack path: match is required.
+
+The following example shows how the code generated for a capturing bracket
+with two alternatives. Let A, B, C, D are arbirary regular expressions, and
+we have the following regular expression:
+
+ A(B|C)D
+
+The generated code will be the following:
+
+ A matching path
+ '(' matching path (pushing arguments to the stack)
+ B matching path
+ ')' matching path (pushing arguments to the stack)
+ D matching path
+ return with successful match
+
+ D backtrack path
+ ')' backtrack path (If we arrived from "C" jump to the backtrack of "C")
+ B backtrack path
+ C expected path
+ jump to D matching path
+ C backtrack path
+ A backtrack path
+
+ Notice, that the order of backtrack code paths are the opposite of the fast
+ code paths. In this way the topmost value on the stack is always belong
+ to the current backtrack code path. The backtrack path must check
+ whether there is a next alternative. If so, it needs to jump back to
+ the matching path eventually. Otherwise it needs to clear out its own stack
+ frame and continue the execution on the backtrack code paths.
+*/
+
+/*
+Saved stack frames:
+
+Atomic blocks and asserts require reloading the values of private data
+when the backtrack mechanism performed. Because of OP_RECURSE, the data
+are not necessarly known in compile time, thus we need a dynamic restore
+mechanism.
+
+The stack frames are stored in a chain list, and have the following format:
+([ capturing bracket offset ][ start value ][ end value ])+ ... [ 0 ] [ previous head ]
+
+Thus we can restore the private data to a particular point in the stack.
+*/
+
+typedef struct jit_arguments {
+ /* Pointers first. */
+ struct sljit_stack *stack;
+ PCRE2_SPTR str;
+ PCRE2_SPTR begin;
+ PCRE2_SPTR end;
+ pcre2_match_data *match_data;
+ PCRE2_SPTR startchar_ptr;
+ PCRE2_UCHAR *mark_ptr;
+ int (*callout)(pcre2_callout_block *, void *);
+ void *callout_data;
+ /* Everything else after. */
+ sljit_uw offset_limit;
+ sljit_u32 limit_match;
+ sljit_u32 oveccount;
+ sljit_u32 options;
+} jit_arguments;
+
+#define JIT_NUMBER_OF_COMPILE_MODES 3
+
+typedef struct executable_functions {
+ void *executable_funcs[JIT_NUMBER_OF_COMPILE_MODES];
+ void *read_only_data_heads[JIT_NUMBER_OF_COMPILE_MODES];
+ sljit_uw executable_sizes[JIT_NUMBER_OF_COMPILE_MODES];
+ sljit_u32 top_bracket;
+ sljit_u32 limit_match;
+} executable_functions;
+
+typedef struct jump_list {
+ struct sljit_jump *jump;
+ struct jump_list *next;
+} jump_list;
+
+typedef struct stub_list {
+ struct sljit_jump *start;
+ struct sljit_label *quit;
+ struct stub_list *next;
+} stub_list;
+
+typedef struct label_addr_list {
+ struct sljit_label *label;
+ sljit_uw *update_addr;
+ struct label_addr_list *next;
+} label_addr_list;
+
+enum frame_types {
+ no_frame = -1,
+ no_stack = -2
+};
+
+enum control_types {
+ type_mark = 0,
+ type_then_trap = 1
+};
+
+typedef int (SLJIT_CALL *jit_function)(jit_arguments *args);
+
+/* The following structure is the key data type for the recursive
+code generator. It is allocated by compile_matchingpath, and contains
+the arguments for compile_backtrackingpath. Must be the first member
+of its descendants. */
+typedef struct backtrack_common {
+ /* Concatenation stack. */
+ struct backtrack_common *prev;
+ jump_list *nextbacktracks;
+ /* Internal stack (for component operators). */
+ struct backtrack_common *top;
+ jump_list *topbacktracks;
+ /* Opcode pointer. */
+ PCRE2_SPTR cc;
+} backtrack_common;
+
+typedef struct assert_backtrack {
+ backtrack_common common;
+ jump_list *condfailed;
+ /* Less than 0 if a frame is not needed. */
+ int framesize;
+ /* Points to our private memory word on the stack. */
+ int private_data_ptr;
+ /* For iterators. */
+ struct sljit_label *matchingpath;
+} assert_backtrack;
+
+typedef struct bracket_backtrack {
+ backtrack_common common;
+ /* Where to coninue if an alternative is successfully matched. */
+ struct sljit_label *alternative_matchingpath;
+ /* For rmin and rmax iterators. */
+ struct sljit_label *recursive_matchingpath;
+ /* For greedy ? operator. */
+ struct sljit_label *zero_matchingpath;
+ /* Contains the branches of a failed condition. */
+ union {
+ /* Both for OP_COND, OP_SCOND. */
+ jump_list *condfailed;
+ assert_backtrack *assert;
+ /* For OP_ONCE. Less than 0 if not needed. */
+ int framesize;
+ } u;
+ /* Points to our private memory word on the stack. */
+ int private_data_ptr;
+} bracket_backtrack;
+
+typedef struct bracketpos_backtrack {
+ backtrack_common common;
+ /* Points to our private memory word on the stack. */
+ int private_data_ptr;
+ /* Reverting stack is needed. */
+ int framesize;
+ /* Allocated stack size. */
+ int stacksize;
+} bracketpos_backtrack;
+
+typedef struct braminzero_backtrack {
+ backtrack_common common;
+ struct sljit_label *matchingpath;
+} braminzero_backtrack;
+
+typedef struct char_iterator_backtrack {
+ backtrack_common common;
+ /* Next iteration. */
+ struct sljit_label *matchingpath;
+ union {
+ jump_list *backtracks;
+ struct {
+ unsigned int othercasebit;
+ PCRE2_UCHAR chr;
+ BOOL enabled;
+ } charpos;
+ } u;
+} char_iterator_backtrack;
+
+typedef struct ref_iterator_backtrack {
+ backtrack_common common;
+ /* Next iteration. */
+ struct sljit_label *matchingpath;
+} ref_iterator_backtrack;
+
+typedef struct recurse_entry {
+ struct recurse_entry *next;
+ /* Contains the function entry. */
+ struct sljit_label *entry;
+ /* Collects the calls until the function is not created. */
+ jump_list *calls;
+ /* Points to the starting opcode. */
+ sljit_sw start;
+} recurse_entry;
+
+typedef struct recurse_backtrack {
+ backtrack_common common;
+ BOOL inlined_pattern;
+} recurse_backtrack;
+
+#define OP_THEN_TRAP OP_TABLE_LENGTH
+
+typedef struct then_trap_backtrack {
+ backtrack_common common;
+ /* If then_trap is not NULL, this structure contains the real
+ then_trap for the backtracking path. */
+ struct then_trap_backtrack *then_trap;
+ /* Points to the starting opcode. */
+ sljit_sw start;
+ /* Exit point for the then opcodes of this alternative. */
+ jump_list *quit;
+ /* Frame size of the current alternative. */
+ int framesize;
+} then_trap_backtrack;
+
+#define MAX_RANGE_SIZE 4
+
+typedef struct compiler_common {
+ /* The sljit ceneric compiler. */
+ struct sljit_compiler *compiler;
+ /* First byte code. */
+ PCRE2_SPTR start;
+ /* Maps private data offset to each opcode. */
+ sljit_s32 *private_data_ptrs;
+ /* Chain list of read-only data ptrs. */
+ void *read_only_data_head;
+ /* Tells whether the capturing bracket is optimized. */
+ sljit_u8 *optimized_cbracket;
+ /* Tells whether the starting offset is a target of then. */
+ sljit_u8 *then_offsets;
+ /* Current position where a THEN must jump. */
+ then_trap_backtrack *then_trap;
+ /* Starting offset of private data for capturing brackets. */
+ sljit_s32 cbra_ptr;
+ /* Output vector starting point. Must be divisible by 2. */
+ sljit_s32 ovector_start;
+ /* Points to the starting character of the current match. */
+ sljit_s32 start_ptr;
+ /* Last known position of the requested byte. */
+ sljit_s32 req_char_ptr;
+ /* Head of the last recursion. */
+ sljit_s32 recursive_head_ptr;
+ /* First inspected character for partial matching.
+ (Needed for avoiding zero length partial matches.) */
+ sljit_s32 start_used_ptr;
+ /* Starting pointer for partial soft matches. */
+ sljit_s32 hit_start;
+ /* Pointer of the match end position. */
+ sljit_s32 match_end_ptr;
+ /* Points to the marked string. */
+ sljit_s32 mark_ptr;
+ /* Recursive control verb management chain. */
+ sljit_s32 control_head_ptr;
+ /* Points to the last matched capture block index. */
+ sljit_s32 capture_last_ptr;
+ /* Fast forward skipping byte code pointer. */
+ PCRE2_SPTR fast_forward_bc_ptr;
+ /* Locals used by fast fail optimization. */
+ sljit_s32 fast_fail_start_ptr;
+ sljit_s32 fast_fail_end_ptr;
+
+ /* Flipped and lower case tables. */
+ const sljit_u8 *fcc;
+ sljit_sw lcc;
+ /* Mode can be PCRE2_JIT_COMPLETE and others. */
+ int mode;
+ /* TRUE, when minlength is greater than 0. */
+ BOOL might_be_empty;
+ /* \K is found in the pattern. */
+ BOOL has_set_som;
+ /* (*SKIP:arg) is found in the pattern. */
+ BOOL has_skip_arg;
+ /* (*THEN) is found in the pattern. */
+ BOOL has_then;
+ /* (*SKIP) or (*SKIP:arg) is found in lookbehind assertion. */
+ BOOL has_skip_in_assert_back;
+ /* Currently in recurse or negative assert. */
+ BOOL local_exit;
+ /* Currently in a positive assert. */
+ BOOL positive_assert;
+ /* Newline control. */
+ int nltype;
+ sljit_u32 nlmax;
+ sljit_u32 nlmin;
+ int newline;
+ int bsr_nltype;
+ sljit_u32 bsr_nlmax;
+ sljit_u32 bsr_nlmin;
+ /* Dollar endonly. */
+ int endonly;
+ /* Tables. */
+ sljit_sw ctypes;
+ /* Named capturing brackets. */
+ PCRE2_SPTR name_table;
+ sljit_sw name_count;
+ sljit_sw name_entry_size;
+
+ /* Labels and jump lists. */
+ struct sljit_label *partialmatchlabel;
+ struct sljit_label *quit_label;
+ struct sljit_label *forced_quit_label;
+ struct sljit_label *accept_label;
+ struct sljit_label *ff_newline_shortcut;
+ stub_list *stubs;
+ label_addr_list *label_addrs;
+ recurse_entry *entries;
+ recurse_entry *currententry;
+ jump_list *partialmatch;
+ jump_list *quit;
+ jump_list *positive_assert_quit;
+ jump_list *forced_quit;
+ jump_list *accept;
+ jump_list *calllimit;
+ jump_list *stackalloc;
+ jump_list *revertframes;
+ jump_list *wordboundary;
+ jump_list *anynewline;
+ jump_list *hspace;
+ jump_list *vspace;
+ jump_list *casefulcmp;
+ jump_list *caselesscmp;
+ jump_list *reset_match;
+ BOOL unset_backref;
+ BOOL alt_circumflex;
+#ifdef SUPPORT_UNICODE
+ BOOL utf;
+ BOOL use_ucp;
+ jump_list *getucd;
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ jump_list *utfreadchar;
+ jump_list *utfreadchar16;
+ jump_list *utfreadtype8;
+#endif
+#endif /* SUPPORT_UNICODE */
+} compiler_common;
+
+/* For byte_sequence_compare. */
+
+typedef struct compare_context {
+ int length;
+ int sourcereg;
+#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
+ int ucharptr;
+ union {
+ sljit_s32 asint;
+ sljit_u16 asushort;
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ sljit_u8 asbyte;
+ sljit_u8 asuchars[4];
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+ sljit_u16 asuchars[2];
+#elif PCRE2_CODE_UNIT_WIDTH == 32
+ sljit_u32 asuchars[1];
+#endif
+ } c;
+ union {
+ sljit_s32 asint;
+ sljit_u16 asushort;
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ sljit_u8 asbyte;
+ sljit_u8 asuchars[4];
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+ sljit_u16 asuchars[2];
+#elif PCRE2_CODE_UNIT_WIDTH == 32
+ sljit_u32 asuchars[1];
+#endif
+ } oc;
+#endif
+} compare_context;
+
+/* Undefine sljit macros. */
+#undef CMP
+
+/* Used for accessing the elements of the stack. */
+#define STACK(i) ((-(i) - 1) * (int)sizeof(sljit_sw))
+
+#define TMP1 SLJIT_R0
+#define TMP2 SLJIT_R2
+#define TMP3 SLJIT_R3
+#define STR_PTR SLJIT_S0
+#define STR_END SLJIT_S1
+#define STACK_TOP SLJIT_R1
+#define STACK_LIMIT SLJIT_S2
+#define COUNT_MATCH SLJIT_S3
+#define ARGUMENTS SLJIT_S4
+#define RETURN_ADDR SLJIT_R4
+
+/* Local space layout. */
+/* These two locals can be used by the current opcode. */
+#define LOCALS0 (0 * sizeof(sljit_sw))
+#define LOCALS1 (1 * sizeof(sljit_sw))
+/* Two local variables for possessive quantifiers (char1 cannot use them). */
+#define POSSESSIVE0 (2 * sizeof(sljit_sw))
+#define POSSESSIVE1 (3 * sizeof(sljit_sw))
+/* Max limit of recursions. */
+#define LIMIT_MATCH (4 * sizeof(sljit_sw))
+/* The output vector is stored on the stack, and contains pointers
+to characters. The vector data is divided into two groups: the first
+group contains the start / end character pointers, and the second is
+the start pointers when the end of the capturing group has not yet reached. */
+#define OVECTOR_START (common->ovector_start)
+#define OVECTOR(i) (OVECTOR_START + (i) * (sljit_sw)sizeof(sljit_sw))
+#define OVECTOR_PRIV(i) (common->cbra_ptr + (i) * (sljit_sw)sizeof(sljit_sw))
+#define PRIVATE_DATA(cc) (common->private_data_ptrs[(cc) - common->start])
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+#define MOV_UCHAR SLJIT_MOV_U8
+#define MOVU_UCHAR SLJIT_MOVU_U8
+#define IN_UCHARS(x) (x)
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+#define MOV_UCHAR SLJIT_MOV_U16
+#define MOVU_UCHAR SLJIT_MOVU_U16
+#define UCHAR_SHIFT (1)
+#define IN_UCHARS(x) ((x) * 2)
+#elif PCRE2_CODE_UNIT_WIDTH == 32
+#define MOV_UCHAR SLJIT_MOV_U32
+#define MOVU_UCHAR SLJIT_MOVU_U32
+#define UCHAR_SHIFT (2)
+#define IN_UCHARS(x) ((x) * 4)
+#else
+#error Unsupported compiling mode
+#endif
+
+/* Shortcuts. */
+#define DEFINE_COMPILER \
+ struct sljit_compiler *compiler = common->compiler
+#define OP1(op, dst, dstw, src, srcw) \
+ sljit_emit_op1(compiler, (op), (dst), (dstw), (src), (srcw))
+#define OP2(op, dst, dstw, src1, src1w, src2, src2w) \
+ sljit_emit_op2(compiler, (op), (dst), (dstw), (src1), (src1w), (src2), (src2w))
+#define LABEL() \
+ sljit_emit_label(compiler)
+#define JUMP(type) \
+ sljit_emit_jump(compiler, (type))
+#define JUMPTO(type, label) \
+ sljit_set_label(sljit_emit_jump(compiler, (type)), (label))
+#define JUMPHERE(jump) \
+ sljit_set_label((jump), sljit_emit_label(compiler))
+#define SET_LABEL(jump, label) \
+ sljit_set_label((jump), (label))
+#define CMP(type, src1, src1w, src2, src2w) \
+ sljit_emit_cmp(compiler, (type), (src1), (src1w), (src2), (src2w))
+#define CMPTO(type, src1, src1w, src2, src2w, label) \
+ sljit_set_label(sljit_emit_cmp(compiler, (type), (src1), (src1w), (src2), (src2w)), (label))
+#define OP_FLAGS(op, dst, dstw, src, srcw, type) \
+ sljit_emit_op_flags(compiler, (op), (dst), (dstw), (src), (srcw), (type))
+#define GET_LOCAL_BASE(dst, dstw, offset) \
+ sljit_get_local_base(compiler, (dst), (dstw), (offset))
+
+#define READ_CHAR_MAX 0x7fffffff
+
+static PCRE2_SPTR bracketend(PCRE2_SPTR cc)
+{
+SLJIT_ASSERT((*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NOT) || (*cc >= OP_ONCE && *cc <= OP_SCOND));
+do cc += GET(cc, 1); while (*cc == OP_ALT);
+SLJIT_ASSERT(*cc >= OP_KET && *cc <= OP_KETRPOS);
+cc += 1 + LINK_SIZE;
+return cc;
+}
+
+static int no_alternatives(PCRE2_SPTR cc)
+{
+int count = 0;
+SLJIT_ASSERT((*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NOT) || (*cc >= OP_ONCE && *cc <= OP_SCOND));
+do
+ {
+ cc += GET(cc, 1);
+ count++;
+ }
+while (*cc == OP_ALT);
+SLJIT_ASSERT(*cc >= OP_KET && *cc <= OP_KETRPOS);
+return count;
+}
+
+/* Functions whose might need modification for all new supported opcodes:
+ next_opcode
+ check_opcode_types
+ set_private_data_ptrs
+ get_framesize
+ init_frame
+ get_private_data_copy_length
+ copy_private_data
+ compile_matchingpath
+ compile_backtrackingpath
+*/
+
+static PCRE2_SPTR next_opcode(compiler_common *common, PCRE2_SPTR cc)
+{
+SLJIT_UNUSED_ARG(common);
+switch(*cc)
+ {
+ case OP_SOD:
+ case OP_SOM:
+ case OP_SET_SOM:
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ case OP_NOT_DIGIT:
+ case OP_DIGIT:
+ case OP_NOT_WHITESPACE:
+ case OP_WHITESPACE:
+ case OP_NOT_WORDCHAR:
+ case OP_WORDCHAR:
+ case OP_ANY:
+ case OP_ALLANY:
+ case OP_NOTPROP:
+ case OP_PROP:
+ case OP_ANYNL:
+ case OP_NOT_HSPACE:
+ case OP_HSPACE:
+ case OP_NOT_VSPACE:
+ case OP_VSPACE:
+ case OP_EXTUNI:
+ case OP_EODN:
+ case OP_EOD:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_DOLL:
+ case OP_DOLLM:
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ case OP_CRPOSSTAR:
+ case OP_CRPOSPLUS:
+ case OP_CRPOSQUERY:
+ case OP_CRPOSRANGE:
+ case OP_CLASS:
+ case OP_NCLASS:
+ case OP_REF:
+ case OP_REFI:
+ case OP_DNREF:
+ case OP_DNREFI:
+ case OP_RECURSE:
+ case OP_CALLOUT:
+ case OP_ALT:
+ case OP_KET:
+ case OP_KETRMAX:
+ case OP_KETRMIN:
+ case OP_KETRPOS:
+ case OP_REVERSE:
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_BRA:
+ case OP_BRAPOS:
+ case OP_CBRA:
+ case OP_CBRAPOS:
+ case OP_COND:
+ case OP_SBRA:
+ case OP_SBRAPOS:
+ case OP_SCBRA:
+ case OP_SCBRAPOS:
+ case OP_SCOND:
+ case OP_CREF:
+ case OP_DNCREF:
+ case OP_RREF:
+ case OP_DNRREF:
+ case OP_FALSE:
+ case OP_TRUE:
+ case OP_BRAZERO:
+ case OP_BRAMINZERO:
+ case OP_BRAPOSZERO:
+ case OP_PRUNE:
+ case OP_SKIP:
+ case OP_THEN:
+ case OP_COMMIT:
+ case OP_FAIL:
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
+ case OP_CLOSE:
+ case OP_SKIPZERO:
+ return cc + PRIV(OP_lengths)[*cc];
+
+ case OP_CHAR:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_QUERY:
+ case OP_MINQUERY:
+ case OP_UPTO:
+ case OP_MINUPTO:
+ case OP_EXACT:
+ case OP_POSSTAR:
+ case OP_POSPLUS:
+ case OP_POSQUERY:
+ case OP_POSUPTO:
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_UPTOI:
+ case OP_MINUPTOI:
+ case OP_EXACTI:
+ case OP_POSSTARI:
+ case OP_POSPLUSI:
+ case OP_POSQUERYI:
+ case OP_POSUPTOI:
+ case OP_NOTSTAR:
+ case OP_NOTMINSTAR:
+ case OP_NOTPLUS:
+ case OP_NOTMINPLUS:
+ case OP_NOTQUERY:
+ case OP_NOTMINQUERY:
+ case OP_NOTUPTO:
+ case OP_NOTMINUPTO:
+ case OP_NOTEXACT:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSUPTO:
+ case OP_NOTSTARI:
+ case OP_NOTMINSTARI:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUSI:
+ case OP_NOTQUERYI:
+ case OP_NOTMINQUERYI:
+ case OP_NOTUPTOI:
+ case OP_NOTMINUPTOI:
+ case OP_NOTEXACTI:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSUPTOI:
+ cc += PRIV(OP_lengths)[*cc];
+#ifdef SUPPORT_UNICODE
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ return cc;
+
+ /* Special cases. */
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEEXACT:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEPOSQUERY:
+ case OP_TYPEPOSUPTO:
+ return cc + PRIV(OP_lengths)[*cc] - 1;
+
+ case OP_ANYBYTE:
+#ifdef SUPPORT_UNICODE
+ if (common->utf) return NULL;
+#endif
+ return cc + 1;
+
+ case OP_CALLOUT_STR:
+ return cc + GET(cc, 1 + 2*LINK_SIZE);
+
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8
+ case OP_XCLASS:
+ return cc + GET(cc, 1);
+#endif
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_SKIP_ARG:
+ case OP_THEN_ARG:
+ return cc + 1 + 2 + cc[1];
+
+ default:
+ /* All opcodes are supported now! */
+ SLJIT_ASSERT_STOP();
+ return NULL;
+ }
+}
+
+static BOOL check_opcode_types(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend)
+{
+int count;
+PCRE2_SPTR slot;
+PCRE2_SPTR assert_back_end = cc - 1;
+
+/* Calculate important variables (like stack size) and checks whether all opcodes are supported. */
+while (cc < ccend)
+ {
+ switch(*cc)
+ {
+ case OP_SET_SOM:
+ common->has_set_som = TRUE;
+ common->might_be_empty = TRUE;
+ cc += 1;
+ break;
+
+ case OP_REF:
+ case OP_REFI:
+ common->optimized_cbracket[GET2(cc, 1)] = 0;
+ cc += 1 + IMM2_SIZE;
+ break;
+
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] = 0;
+ cc += 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ case OP_COND:
+ case OP_SCOND:
+ /* Only AUTO_CALLOUT can insert this opcode. We do
+ not intend to support this case. */
+ if (cc[1 + LINK_SIZE] == OP_CALLOUT || cc[1 + LINK_SIZE] == OP_CALLOUT_STR)
+ return FALSE;
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_CREF:
+ common->optimized_cbracket[GET2(cc, 1)] = 0;
+ cc += 1 + IMM2_SIZE;
+ break;
+
+ case OP_DNREF:
+ case OP_DNREFI:
+ case OP_DNCREF:
+ count = GET2(cc, 1 + IMM2_SIZE);
+ slot = common->name_table + GET2(cc, 1) * common->name_entry_size;
+ while (count-- > 0)
+ {
+ common->optimized_cbracket[GET2(slot, 0)] = 0;
+ slot += common->name_entry_size;
+ }
+ cc += 1 + 2 * IMM2_SIZE;
+ break;
+
+ case OP_RECURSE:
+ /* Set its value only once. */
+ if (common->recursive_head_ptr == 0)
+ {
+ common->recursive_head_ptr = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ }
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_CALLOUT:
+ case OP_CALLOUT_STR:
+ if (common->capture_last_ptr == 0)
+ {
+ common->capture_last_ptr = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ }
+ cc += (*cc == OP_CALLOUT) ? PRIV(OP_lengths)[OP_CALLOUT] : GET(cc, 1 + 2*LINK_SIZE);
+ break;
+
+ case OP_ASSERTBACK:
+ slot = bracketend(cc);
+ if (slot > assert_back_end)
+ assert_back_end = slot;
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_THEN_ARG:
+ common->has_then = TRUE;
+ common->control_head_ptr = 1;
+ /* Fall through. */
+
+ case OP_PRUNE_ARG:
+ case OP_MARK:
+ if (common->mark_ptr == 0)
+ {
+ common->mark_ptr = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ }
+ cc += 1 + 2 + cc[1];
+ break;
+
+ case OP_THEN:
+ common->has_then = TRUE;
+ common->control_head_ptr = 1;
+ cc += 1;
+ break;
+
+ case OP_SKIP:
+ if (cc < assert_back_end)
+ common->has_skip_in_assert_back = TRUE;
+ cc += 1;
+ break;
+
+ case OP_SKIP_ARG:
+ common->control_head_ptr = 1;
+ common->has_skip_arg = TRUE;
+ if (cc < assert_back_end)
+ common->has_skip_in_assert_back = TRUE;
+ cc += 1 + 2 + cc[1];
+ break;
+
+ default:
+ cc = next_opcode(common, cc);
+ if (cc == NULL)
+ return FALSE;
+ break;
+ }
+ }
+return TRUE;
+}
+
+static BOOL is_accelerated_repeat(PCRE2_SPTR cc)
+{
+switch(*cc)
+ {
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSPLUS:
+ return (cc[1] != OP_ANYNL && cc[1] != OP_EXTUNI);
+
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_POSSTAR:
+ case OP_POSPLUS:
+
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_POSSTARI:
+ case OP_POSPLUSI:
+
+ case OP_NOTSTAR:
+ case OP_NOTMINSTAR:
+ case OP_NOTPLUS:
+ case OP_NOTMINPLUS:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSPLUS:
+
+ case OP_NOTSTARI:
+ case OP_NOTMINSTARI:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUSI:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSPLUSI:
+ return TRUE;
+
+ case OP_CLASS:
+ case OP_NCLASS:
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8
+ case OP_XCLASS:
+ cc += (*cc == OP_XCLASS) ? GET(cc, 1) : (int)(1 + (32 / sizeof(PCRE2_UCHAR)));
+#else
+ cc += (1 + (32 / sizeof(PCRE2_UCHAR)));
+#endif
+
+ switch(*cc)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRPOSSTAR:
+ case OP_CRPOSPLUS:
+ return TRUE;
+ }
+ break;
+ }
+return FALSE;
+}
+
+static SLJIT_INLINE BOOL detect_fast_forward_skip(compiler_common *common, int *private_data_start)
+{
+PCRE2_SPTR cc = common->start;
+PCRE2_SPTR end;
+
+/* Skip not repeated brackets. */
+while (TRUE)
+ {
+ switch(*cc)
+ {
+ case OP_SOD:
+ case OP_SOM:
+ case OP_SET_SOM:
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ case OP_EODN:
+ case OP_EOD:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_DOLL:
+ case OP_DOLLM:
+ /* Zero width assertions. */
+ cc++;
+ continue;
+ }
+
+ if (*cc != OP_BRA && *cc != OP_CBRA)
+ break;
+
+ end = cc + GET(cc, 1);
+ if (*end != OP_KET || PRIVATE_DATA(end) != 0)
+ return FALSE;
+ if (*cc == OP_CBRA)
+ {
+ if (common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0)
+ return FALSE;
+ cc += IMM2_SIZE;
+ }
+ cc += 1 + LINK_SIZE;
+ }
+
+if (is_accelerated_repeat(cc))
+ {
+ common->fast_forward_bc_ptr = cc;
+ common->private_data_ptrs[(cc + 1) - common->start] = *private_data_start;
+ *private_data_start += sizeof(sljit_sw);
+ return TRUE;
+ }
+return FALSE;
+}
+
+static SLJIT_INLINE void detect_fast_fail(compiler_common *common, PCRE2_SPTR cc, int *private_data_start, sljit_s32 depth)
+{
+ PCRE2_SPTR next_alt;
+
+ SLJIT_ASSERT(*cc == OP_BRA || *cc == OP_CBRA);
+
+ if (*cc == OP_CBRA && common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0)
+ return;
+
+ next_alt = bracketend(cc) - (1 + LINK_SIZE);
+ if (*next_alt != OP_KET || PRIVATE_DATA(next_alt) != 0)
+ return;
+
+ do
+ {
+ next_alt = cc + GET(cc, 1);
+
+ cc += 1 + LINK_SIZE + ((*cc == OP_CBRA) ? IMM2_SIZE : 0);
+
+ while (TRUE)
+ {
+ switch(*cc)
+ {
+ case OP_SOD:
+ case OP_SOM:
+ case OP_SET_SOM:
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ case OP_EODN:
+ case OP_EOD:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_DOLL:
+ case OP_DOLLM:
+ /* Zero width assertions. */
+ cc++;
+ continue;
+ }
+ break;
+ }
+
+ if (depth > 0 && (*cc == OP_BRA || *cc == OP_CBRA))
+ detect_fast_fail(common, cc, private_data_start, depth - 1);
+
+ if (is_accelerated_repeat(cc))
+ {
+ common->private_data_ptrs[(cc + 1) - common->start] = *private_data_start;
+
+ if (common->fast_fail_start_ptr == 0)
+ common->fast_fail_start_ptr = *private_data_start;
+
+ *private_data_start += sizeof(sljit_sw);
+ common->fast_fail_end_ptr = *private_data_start;
+
+ if (*private_data_start > SLJIT_MAX_LOCAL_SIZE)
+ return;
+ }
+
+ cc = next_alt;
+ }
+ while (*cc == OP_ALT);
+}
+
+static int get_class_iterator_size(PCRE2_SPTR cc)
+{
+sljit_u32 min;
+sljit_u32 max;
+switch(*cc)
+ {
+ case OP_CRSTAR:
+ case OP_CRPLUS:
+ return 2;
+
+ case OP_CRMINSTAR:
+ case OP_CRMINPLUS:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ return 1;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ min = GET2(cc, 1);
+ max = GET2(cc, 1 + IMM2_SIZE);
+ if (max == 0)
+ return (*cc == OP_CRRANGE) ? 2 : 1;
+ max -= min;
+ if (max > 2)
+ max = 2;
+ return max;
+
+ default:
+ return 0;
+ }
+}
+
+static BOOL detect_repeat(compiler_common *common, PCRE2_SPTR begin)
+{
+PCRE2_SPTR end = bracketend(begin);
+PCRE2_SPTR next;
+PCRE2_SPTR next_end;
+PCRE2_SPTR max_end;
+PCRE2_UCHAR type;
+sljit_sw length = end - begin;
+sljit_s32 min, max, i;
+
+/* Detect fixed iterations first. */
+if (end[-(1 + LINK_SIZE)] != OP_KET)
+ return FALSE;
+
+/* Already detected repeat. */
+if (common->private_data_ptrs[end - common->start - LINK_SIZE] != 0)
+ return TRUE;
+
+next = end;
+min = 1;
+while (1)
+ {
+ if (*next != *begin)
+ break;
+ next_end = bracketend(next);
+ if (next_end - next != length || memcmp(begin, next, IN_UCHARS(length)) != 0)
+ break;
+ next = next_end;
+ min++;
+ }
+
+if (min == 2)
+ return FALSE;
+
+max = 0;
+max_end = next;
+if (*next == OP_BRAZERO || *next == OP_BRAMINZERO)
+ {
+ type = *next;
+ while (1)
+ {
+ if (next[0] != type || next[1] != OP_BRA || next[2 + LINK_SIZE] != *begin)
+ break;
+ next_end = bracketend(next + 2 + LINK_SIZE);
+ if (next_end - next != (length + 2 + LINK_SIZE) || memcmp(begin, next + 2 + LINK_SIZE, IN_UCHARS(length)) != 0)
+ break;
+ next = next_end;
+ max++;
+ }
+
+ if (next[0] == type && next[1] == *begin && max >= 1)
+ {
+ next_end = bracketend(next + 1);
+ if (next_end - next == (length + 1) && memcmp(begin, next + 1, IN_UCHARS(length)) == 0)
+ {
+ for (i = 0; i < max; i++, next_end += 1 + LINK_SIZE)
+ if (*next_end != OP_KET)
+ break;
+
+ if (i == max)
+ {
+ common->private_data_ptrs[max_end - common->start - LINK_SIZE] = next_end - max_end;
+ common->private_data_ptrs[max_end - common->start - LINK_SIZE + 1] = (type == OP_BRAZERO) ? OP_UPTO : OP_MINUPTO;
+ /* +2 the original and the last. */
+ common->private_data_ptrs[max_end - common->start - LINK_SIZE + 2] = max + 2;
+ if (min == 1)
+ return TRUE;
+ min--;
+ max_end -= (1 + LINK_SIZE) + GET(max_end, -LINK_SIZE);
+ }
+ }
+ }
+ }
+
+if (min >= 3)
+ {
+ common->private_data_ptrs[end - common->start - LINK_SIZE] = max_end - end;
+ common->private_data_ptrs[end - common->start - LINK_SIZE + 1] = OP_EXACT;
+ common->private_data_ptrs[end - common->start - LINK_SIZE + 2] = min;
+ return TRUE;
+ }
+
+return FALSE;
+}
+
+#define CASE_ITERATOR_PRIVATE_DATA_1 \
+ case OP_MINSTAR: \
+ case OP_MINPLUS: \
+ case OP_QUERY: \
+ case OP_MINQUERY: \
+ case OP_MINSTARI: \
+ case OP_MINPLUSI: \
+ case OP_QUERYI: \
+ case OP_MINQUERYI: \
+ case OP_NOTMINSTAR: \
+ case OP_NOTMINPLUS: \
+ case OP_NOTQUERY: \
+ case OP_NOTMINQUERY: \
+ case OP_NOTMINSTARI: \
+ case OP_NOTMINPLUSI: \
+ case OP_NOTQUERYI: \
+ case OP_NOTMINQUERYI:
+
+#define CASE_ITERATOR_PRIVATE_DATA_2A \
+ case OP_STAR: \
+ case OP_PLUS: \
+ case OP_STARI: \
+ case OP_PLUSI: \
+ case OP_NOTSTAR: \
+ case OP_NOTPLUS: \
+ case OP_NOTSTARI: \
+ case OP_NOTPLUSI:
+
+#define CASE_ITERATOR_PRIVATE_DATA_2B \
+ case OP_UPTO: \
+ case OP_MINUPTO: \
+ case OP_UPTOI: \
+ case OP_MINUPTOI: \
+ case OP_NOTUPTO: \
+ case OP_NOTMINUPTO: \
+ case OP_NOTUPTOI: \
+ case OP_NOTMINUPTOI:
+
+#define CASE_ITERATOR_TYPE_PRIVATE_DATA_1 \
+ case OP_TYPEMINSTAR: \
+ case OP_TYPEMINPLUS: \
+ case OP_TYPEQUERY: \
+ case OP_TYPEMINQUERY:
+
+#define CASE_ITERATOR_TYPE_PRIVATE_DATA_2A \
+ case OP_TYPESTAR: \
+ case OP_TYPEPLUS:
+
+#define CASE_ITERATOR_TYPE_PRIVATE_DATA_2B \
+ case OP_TYPEUPTO: \
+ case OP_TYPEMINUPTO:
+
+static void set_private_data_ptrs(compiler_common *common, int *private_data_start, PCRE2_SPTR ccend)
+{
+PCRE2_SPTR cc = common->start;
+PCRE2_SPTR alternative;
+PCRE2_SPTR end = NULL;
+int private_data_ptr = *private_data_start;
+int space, size, bracketlen;
+BOOL repeat_check = TRUE;
+
+while (cc < ccend)
+ {
+ space = 0;
+ size = 0;
+ bracketlen = 0;
+ if (private_data_ptr > SLJIT_MAX_LOCAL_SIZE)
+ break;
+
+ if (repeat_check && (*cc == OP_ONCE || *cc == OP_ONCE_NC || *cc == OP_BRA || *cc == OP_CBRA || *cc == OP_COND))
+ {
+ if (detect_repeat(common, cc))
+ {
+ /* These brackets are converted to repeats, so no global
+ based single character repeat is allowed. */
+ if (cc >= end)
+ end = bracketend(cc);
+ }
+ }
+ repeat_check = TRUE;
+
+ switch(*cc)
+ {
+ case OP_KET:
+ if (common->private_data_ptrs[cc + 1 - common->start] != 0)
+ {
+ common->private_data_ptrs[cc - common->start] = private_data_ptr;
+ private_data_ptr += sizeof(sljit_sw);
+ cc += common->private_data_ptrs[cc + 1 - common->start];
+ }
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_BRAPOS:
+ case OP_SBRA:
+ case OP_SBRAPOS:
+ case OP_SCOND:
+ common->private_data_ptrs[cc - common->start] = private_data_ptr;
+ private_data_ptr += sizeof(sljit_sw);
+ bracketlen = 1 + LINK_SIZE;
+ break;
+
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ common->private_data_ptrs[cc - common->start] = private_data_ptr;
+ private_data_ptr += sizeof(sljit_sw);
+ bracketlen = 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ case OP_COND:
+ /* Might be a hidden SCOND. */
+ alternative = cc + GET(cc, 1);
+ if (*alternative == OP_KETRMAX || *alternative == OP_KETRMIN)
+ {
+ common->private_data_ptrs[cc - common->start] = private_data_ptr;
+ private_data_ptr += sizeof(sljit_sw);
+ }
+ bracketlen = 1 + LINK_SIZE;
+ break;
+
+ case OP_BRA:
+ bracketlen = 1 + LINK_SIZE;
+ break;
+
+ case OP_CBRA:
+ case OP_SCBRA:
+ bracketlen = 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ case OP_BRAZERO:
+ case OP_BRAMINZERO:
+ case OP_BRAPOSZERO:
+ repeat_check = FALSE;
+ size = 1;
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_1
+ space = 1;
+ size = -2;
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_2A
+ space = 2;
+ size = -2;
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_2B
+ space = 2;
+ size = -(2 + IMM2_SIZE);
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_1
+ space = 1;
+ size = 1;
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_2A
+ if (cc[1] != OP_ANYNL && cc[1] != OP_EXTUNI)
+ space = 2;
+ size = 1;
+ break;
+
+ case OP_TYPEUPTO:
+ if (cc[1 + IMM2_SIZE] != OP_ANYNL && cc[1 + IMM2_SIZE] != OP_EXTUNI)
+ space = 2;
+ size = 1 + IMM2_SIZE;
+ break;
+
+ case OP_TYPEMINUPTO:
+ space = 2;
+ size = 1 + IMM2_SIZE;
+ break;
+
+ case OP_CLASS:
+ case OP_NCLASS:
+ space = get_class_iterator_size(cc + size);
+ size = 1 + 32 / sizeof(PCRE2_UCHAR);
+ break;
+
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8
+ case OP_XCLASS:
+ space = get_class_iterator_size(cc + size);
+ size = GET(cc, 1);
+ break;
+#endif
+
+ default:
+ cc = next_opcode(common, cc);
+ SLJIT_ASSERT(cc != NULL);
+ break;
+ }
+
+ /* Character iterators, which are not inside a repeated bracket,
+ gets a private slot instead of allocating it on the stack. */
+ if (space > 0 && cc >= end)
+ {
+ common->private_data_ptrs[cc - common->start] = private_data_ptr;
+ private_data_ptr += sizeof(sljit_sw) * space;
+ }
+
+ if (size != 0)
+ {
+ if (size < 0)
+ {
+ cc += -size;
+#ifdef SUPPORT_UNICODE
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ }
+ else
+ cc += size;
+ }
+
+ if (bracketlen > 0)
+ {
+ if (cc >= end)
+ {
+ end = bracketend(cc);
+ if (end[-1 - LINK_SIZE] == OP_KET)
+ end = NULL;
+ }
+ cc += bracketlen;
+ }
+ }
+*private_data_start = private_data_ptr;
+}
+
+/* Returns with a frame_types (always < 0) if no need for frame. */
+static int get_framesize(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, BOOL recursive, BOOL *needs_control_head)
+{
+int length = 0;
+int possessive = 0;
+BOOL stack_restore = FALSE;
+BOOL setsom_found = recursive;
+BOOL setmark_found = recursive;
+/* The last capture is a local variable even for recursions. */
+BOOL capture_last_found = FALSE;
+
+#if defined DEBUG_FORCE_CONTROL_HEAD && DEBUG_FORCE_CONTROL_HEAD
+SLJIT_ASSERT(common->control_head_ptr != 0);
+*needs_control_head = TRUE;
+#else
+*needs_control_head = FALSE;
+#endif
+
+if (ccend == NULL)
+ {
+ ccend = bracketend(cc) - (1 + LINK_SIZE);
+ if (!recursive && (*cc == OP_CBRAPOS || *cc == OP_SCBRAPOS))
+ {
+ possessive = length = (common->capture_last_ptr != 0) ? 5 : 3;
+ /* This is correct regardless of common->capture_last_ptr. */
+ capture_last_found = TRUE;
+ }
+ cc = next_opcode(common, cc);
+ }
+
+SLJIT_ASSERT(cc != NULL);
+while (cc < ccend)
+ switch(*cc)
+ {
+ case OP_SET_SOM:
+ SLJIT_ASSERT(common->has_set_som);
+ stack_restore = TRUE;
+ if (!setsom_found)
+ {
+ length += 2;
+ setsom_found = TRUE;
+ }
+ cc += 1;
+ break;
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_THEN_ARG:
+ SLJIT_ASSERT(common->mark_ptr != 0);
+ stack_restore = TRUE;
+ if (!setmark_found)
+ {
+ length += 2;
+ setmark_found = TRUE;
+ }
+ if (common->control_head_ptr != 0)
+ *needs_control_head = TRUE;
+ cc += 1 + 2 + cc[1];
+ break;
+
+ case OP_RECURSE:
+ stack_restore = TRUE;
+ if (common->has_set_som && !setsom_found)
+ {
+ length += 2;
+ setsom_found = TRUE;
+ }
+ if (common->mark_ptr != 0 && !setmark_found)
+ {
+ length += 2;
+ setmark_found = TRUE;
+ }
+ if (common->capture_last_ptr != 0 && !capture_last_found)
+ {
+ length += 2;
+ capture_last_found = TRUE;
+ }
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_CBRA:
+ case OP_CBRAPOS:
+ case OP_SCBRA:
+ case OP_SCBRAPOS:
+ stack_restore = TRUE;
+ if (common->capture_last_ptr != 0 && !capture_last_found)
+ {
+ length += 2;
+ capture_last_found = TRUE;
+ }
+ length += 3;
+ cc += 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ case OP_THEN:
+ stack_restore = TRUE;
+ if (common->control_head_ptr != 0)
+ *needs_control_head = TRUE;
+ cc ++;
+ break;
+
+ default:
+ stack_restore = TRUE;
+ /* Fall through. */
+
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ case OP_NOT_DIGIT:
+ case OP_DIGIT:
+ case OP_NOT_WHITESPACE:
+ case OP_WHITESPACE:
+ case OP_NOT_WORDCHAR:
+ case OP_WORDCHAR:
+ case OP_ANY:
+ case OP_ALLANY:
+ case OP_ANYBYTE:
+ case OP_NOTPROP:
+ case OP_PROP:
+ case OP_ANYNL:
+ case OP_NOT_HSPACE:
+ case OP_HSPACE:
+ case OP_NOT_VSPACE:
+ case OP_VSPACE:
+ case OP_EXTUNI:
+ case OP_EODN:
+ case OP_EOD:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_DOLL:
+ case OP_DOLLM:
+ case OP_CHAR:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
+
+ case OP_EXACT:
+ case OP_POSSTAR:
+ case OP_POSPLUS:
+ case OP_POSQUERY:
+ case OP_POSUPTO:
+
+ case OP_EXACTI:
+ case OP_POSSTARI:
+ case OP_POSPLUSI:
+ case OP_POSQUERYI:
+ case OP_POSUPTOI:
+
+ case OP_NOTEXACT:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSUPTO:
+
+ case OP_NOTEXACTI:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSUPTOI:
+
+ case OP_TYPEEXACT:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEPOSQUERY:
+ case OP_TYPEPOSUPTO:
+
+ case OP_CLASS:
+ case OP_NCLASS:
+ case OP_XCLASS:
+
+ case OP_CALLOUT:
+ case OP_CALLOUT_STR:
+
+ cc = next_opcode(common, cc);
+ SLJIT_ASSERT(cc != NULL);
+ break;
+ }
+
+/* Possessive quantifiers can use a special case. */
+if (SLJIT_UNLIKELY(possessive == length))
+ return stack_restore ? no_frame : no_stack;
+
+if (length > 0)
+ return length + 1;
+return stack_restore ? no_frame : no_stack;
+}
+
+static void init_frame(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, int stackpos, int stacktop, BOOL recursive)
+{
+DEFINE_COMPILER;
+BOOL setsom_found = recursive;
+BOOL setmark_found = recursive;
+/* The last capture is a local variable even for recursions. */
+BOOL capture_last_found = FALSE;
+int offset;
+
+/* >= 1 + shortest item size (2) */
+SLJIT_UNUSED_ARG(stacktop);
+SLJIT_ASSERT(stackpos >= stacktop + 2);
+
+stackpos = STACK(stackpos);
+if (ccend == NULL)
+ {
+ ccend = bracketend(cc) - (1 + LINK_SIZE);
+ if (recursive || (*cc != OP_CBRAPOS && *cc != OP_SCBRAPOS))
+ cc = next_opcode(common, cc);
+ }
+
+SLJIT_ASSERT(cc != NULL);
+while (cc < ccend)
+ switch(*cc)
+ {
+ case OP_SET_SOM:
+ SLJIT_ASSERT(common->has_set_som);
+ if (!setsom_found)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(0));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -OVECTOR(0));
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
+ stackpos += (int)sizeof(sljit_sw);
+ setsom_found = TRUE;
+ }
+ cc += 1;
+ break;
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_THEN_ARG:
+ SLJIT_ASSERT(common->mark_ptr != 0);
+ if (!setmark_found)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->mark_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -common->mark_ptr);
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
+ stackpos += (int)sizeof(sljit_sw);
+ setmark_found = TRUE;
+ }
+ cc += 1 + 2 + cc[1];
+ break;
+
+ case OP_RECURSE:
+ if (common->has_set_som && !setsom_found)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(0));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -OVECTOR(0));
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
+ stackpos += (int)sizeof(sljit_sw);
+ setsom_found = TRUE;
+ }
+ if (common->mark_ptr != 0 && !setmark_found)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->mark_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -common->mark_ptr);
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
+ stackpos += (int)sizeof(sljit_sw);
+ setmark_found = TRUE;
+ }
+ if (common->capture_last_ptr != 0 && !capture_last_found)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->capture_last_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -common->capture_last_ptr);
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
+ stackpos += (int)sizeof(sljit_sw);
+ capture_last_found = TRUE;
+ }
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_CBRA:
+ case OP_CBRAPOS:
+ case OP_SCBRA:
+ case OP_SCBRAPOS:
+ if (common->capture_last_ptr != 0 && !capture_last_found)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->capture_last_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, -common->capture_last_ptr);
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
+ stackpos += (int)sizeof(sljit_sw);
+ capture_last_found = TRUE;
+ }
+ offset = (GET2(cc, 1 + LINK_SIZE)) << 1;
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, OVECTOR(offset));
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP1, 0);
+ stackpos += (int)sizeof(sljit_sw);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, TMP2, 0);
+ stackpos += (int)sizeof(sljit_sw);
+
+ cc += 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ default:
+ cc = next_opcode(common, cc);
+ SLJIT_ASSERT(cc != NULL);
+ break;
+ }
+
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackpos, SLJIT_IMM, 0);
+SLJIT_ASSERT(stackpos == STACK(stacktop));
+}
+
+static SLJIT_INLINE int get_private_data_copy_length(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, BOOL needs_control_head)
+{
+int private_data_length = needs_control_head ? 3 : 2;
+int size;
+PCRE2_SPTR alternative;
+/* Calculate the sum of the private machine words. */
+while (cc < ccend)
+ {
+ size = 0;
+ switch(*cc)
+ {
+ case OP_KET:
+ if (PRIVATE_DATA(cc) != 0)
+ {
+ private_data_length++;
+ SLJIT_ASSERT(PRIVATE_DATA(cc + 1) != 0);
+ cc += PRIVATE_DATA(cc + 1);
+ }
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_BRAPOS:
+ case OP_SBRA:
+ case OP_SBRAPOS:
+ case OP_SCOND:
+ private_data_length++;
+ SLJIT_ASSERT(PRIVATE_DATA(cc) != 0);
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_CBRA:
+ case OP_SCBRA:
+ if (common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0)
+ private_data_length++;
+ cc += 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ private_data_length += 2;
+ cc += 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ case OP_COND:
+ /* Might be a hidden SCOND. */
+ alternative = cc + GET(cc, 1);
+ if (*alternative == OP_KETRMAX || *alternative == OP_KETRMIN)
+ private_data_length++;
+ cc += 1 + LINK_SIZE;
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_1
+ if (PRIVATE_DATA(cc))
+ private_data_length++;
+ cc += 2;
+#ifdef SUPPORT_UNICODE
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_2A
+ if (PRIVATE_DATA(cc))
+ private_data_length += 2;
+ cc += 2;
+#ifdef SUPPORT_UNICODE
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_2B
+ if (PRIVATE_DATA(cc))
+ private_data_length += 2;
+ cc += 2 + IMM2_SIZE;
+#ifdef SUPPORT_UNICODE
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_1
+ if (PRIVATE_DATA(cc))
+ private_data_length++;
+ cc += 1;
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_2A
+ if (PRIVATE_DATA(cc))
+ private_data_length += 2;
+ cc += 1;
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_2B
+ if (PRIVATE_DATA(cc))
+ private_data_length += 2;
+ cc += 1 + IMM2_SIZE;
+ break;
+
+ case OP_CLASS:
+ case OP_NCLASS:
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8
+ case OP_XCLASS:
+ size = (*cc == OP_XCLASS) ? GET(cc, 1) : 1 + 32 / (int)sizeof(PCRE2_UCHAR);
+#else
+ size = 1 + 32 / (int)sizeof(PCRE2_UCHAR);
+#endif
+ if (PRIVATE_DATA(cc))
+ private_data_length += get_class_iterator_size(cc + size);
+ cc += size;
+ break;
+
+ default:
+ cc = next_opcode(common, cc);
+ SLJIT_ASSERT(cc != NULL);
+ break;
+ }
+ }
+SLJIT_ASSERT(cc == ccend);
+return private_data_length;
+}
+
+static void copy_private_data(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend,
+ BOOL save, int stackptr, int stacktop, BOOL needs_control_head)
+{
+DEFINE_COMPILER;
+int srcw[2];
+int count, size;
+BOOL tmp1next = TRUE;
+BOOL tmp1empty = TRUE;
+BOOL tmp2empty = TRUE;
+PCRE2_SPTR alternative;
+enum {
+ start,
+ loop,
+ end
+} status;
+
+status = save ? start : loop;
+stackptr = STACK(stackptr - 2);
+stacktop = STACK(stacktop - 1);
+
+if (!save)
+ {
+ stackptr += (needs_control_head ? 2 : 1) * sizeof(sljit_sw);
+ if (stackptr < stacktop)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), stackptr);
+ stackptr += sizeof(sljit_sw);
+ tmp1empty = FALSE;
+ }
+ if (stackptr < stacktop)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), stackptr);
+ stackptr += sizeof(sljit_sw);
+ tmp2empty = FALSE;
+ }
+ /* The tmp1next must be TRUE in either way. */
+ }
+
+do
+ {
+ count = 0;
+ switch(status)
+ {
+ case start:
+ SLJIT_ASSERT(save && common->recursive_head_ptr != 0);
+ count = 1;
+ srcw[0] = common->recursive_head_ptr;
+ if (needs_control_head)
+ {
+ SLJIT_ASSERT(common->control_head_ptr != 0);
+ count = 2;
+ srcw[1] = common->control_head_ptr;
+ }
+ status = loop;
+ break;
+
+ case loop:
+ if (cc >= ccend)
+ {
+ status = end;
+ break;
+ }
+
+ switch(*cc)
+ {
+ case OP_KET:
+ if (PRIVATE_DATA(cc) != 0)
+ {
+ count = 1;
+ srcw[0] = PRIVATE_DATA(cc);
+ SLJIT_ASSERT(PRIVATE_DATA(cc + 1) != 0);
+ cc += PRIVATE_DATA(cc + 1);
+ }
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_BRAPOS:
+ case OP_SBRA:
+ case OP_SBRAPOS:
+ case OP_SCOND:
+ count = 1;
+ srcw[0] = PRIVATE_DATA(cc);
+ SLJIT_ASSERT(srcw[0] != 0);
+ cc += 1 + LINK_SIZE;
+ break;
+
+ case OP_CBRA:
+ case OP_SCBRA:
+ if (common->optimized_cbracket[GET2(cc, 1 + LINK_SIZE)] == 0)
+ {
+ count = 1;
+ srcw[0] = OVECTOR_PRIV(GET2(cc, 1 + LINK_SIZE));
+ }
+ cc += 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ count = 2;
+ srcw[0] = PRIVATE_DATA(cc);
+ srcw[1] = OVECTOR_PRIV(GET2(cc, 1 + LINK_SIZE));
+ SLJIT_ASSERT(srcw[0] != 0 && srcw[1] != 0);
+ cc += 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ case OP_COND:
+ /* Might be a hidden SCOND. */
+ alternative = cc + GET(cc, 1);
+ if (*alternative == OP_KETRMAX || *alternative == OP_KETRMIN)
+ {
+ count = 1;
+ srcw[0] = PRIVATE_DATA(cc);
+ SLJIT_ASSERT(srcw[0] != 0);
+ }
+ cc += 1 + LINK_SIZE;
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_1
+ if (PRIVATE_DATA(cc))
+ {
+ count = 1;
+ srcw[0] = PRIVATE_DATA(cc);
+ }
+ cc += 2;
+#ifdef SUPPORT_UNICODE
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_2A
+ if (PRIVATE_DATA(cc))
+ {
+ count = 2;
+ srcw[0] = PRIVATE_DATA(cc);
+ srcw[1] = PRIVATE_DATA(cc) + sizeof(sljit_sw);
+ }
+ cc += 2;
+#ifdef SUPPORT_UNICODE
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ CASE_ITERATOR_PRIVATE_DATA_2B
+ if (PRIVATE_DATA(cc))
+ {
+ count = 2;
+ srcw[0] = PRIVATE_DATA(cc);
+ srcw[1] = PRIVATE_DATA(cc) + sizeof(sljit_sw);
+ }
+ cc += 2 + IMM2_SIZE;
+#ifdef SUPPORT_UNICODE
+ if (common->utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_1
+ if (PRIVATE_DATA(cc))
+ {
+ count = 1;
+ srcw[0] = PRIVATE_DATA(cc);
+ }
+ cc += 1;
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_2A
+ if (PRIVATE_DATA(cc))
+ {
+ count = 2;
+ srcw[0] = PRIVATE_DATA(cc);
+ srcw[1] = srcw[0] + sizeof(sljit_sw);
+ }
+ cc += 1;
+ break;
+
+ CASE_ITERATOR_TYPE_PRIVATE_DATA_2B
+ if (PRIVATE_DATA(cc))
+ {
+ count = 2;
+ srcw[0] = PRIVATE_DATA(cc);
+ srcw[1] = srcw[0] + sizeof(sljit_sw);
+ }
+ cc += 1 + IMM2_SIZE;
+ break;
+
+ case OP_CLASS:
+ case OP_NCLASS:
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8
+ case OP_XCLASS:
+ size = (*cc == OP_XCLASS) ? GET(cc, 1) : 1 + 32 / (int)sizeof(PCRE2_UCHAR);
+#else
+ size = 1 + 32 / (int)sizeof(PCRE2_UCHAR);
+#endif
+ if (PRIVATE_DATA(cc))
+ switch(get_class_iterator_size(cc + size))
+ {
+ case 1:
+ count = 1;
+ srcw[0] = PRIVATE_DATA(cc);
+ break;
+
+ case 2:
+ count = 2;
+ srcw[0] = PRIVATE_DATA(cc);
+ srcw[1] = srcw[0] + sizeof(sljit_sw);
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+ cc += size;
+ break;
+
+ default:
+ cc = next_opcode(common, cc);
+ SLJIT_ASSERT(cc != NULL);
+ break;
+ }
+ break;
+
+ case end:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+
+ while (count > 0)
+ {
+ count--;
+ if (save)
+ {
+ if (tmp1next)
+ {
+ if (!tmp1empty)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP1, 0);
+ stackptr += sizeof(sljit_sw);
+ }
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), srcw[count]);
+ tmp1empty = FALSE;
+ tmp1next = FALSE;
+ }
+ else
+ {
+ if (!tmp2empty)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP2, 0);
+ stackptr += sizeof(sljit_sw);
+ }
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), srcw[count]);
+ tmp2empty = FALSE;
+ tmp1next = TRUE;
+ }
+ }
+ else
+ {
+ if (tmp1next)
+ {
+ SLJIT_ASSERT(!tmp1empty);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), srcw[count], TMP1, 0);
+ tmp1empty = stackptr >= stacktop;
+ if (!tmp1empty)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), stackptr);
+ stackptr += sizeof(sljit_sw);
+ }
+ tmp1next = FALSE;
+ }
+ else
+ {
+ SLJIT_ASSERT(!tmp2empty);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), srcw[count], TMP2, 0);
+ tmp2empty = stackptr >= stacktop;
+ if (!tmp2empty)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), stackptr);
+ stackptr += sizeof(sljit_sw);
+ }
+ tmp1next = TRUE;
+ }
+ }
+ }
+ }
+while (status != end);
+
+if (save)
+ {
+ if (tmp1next)
+ {
+ if (!tmp1empty)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP1, 0);
+ stackptr += sizeof(sljit_sw);
+ }
+ if (!tmp2empty)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP2, 0);
+ stackptr += sizeof(sljit_sw);
+ }
+ }
+ else
+ {
+ if (!tmp2empty)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP2, 0);
+ stackptr += sizeof(sljit_sw);
+ }
+ if (!tmp1empty)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), stackptr, TMP1, 0);
+ stackptr += sizeof(sljit_sw);
+ }
+ }
+ }
+SLJIT_ASSERT(cc == ccend && stackptr == stacktop && (save || (tmp1empty && tmp2empty)));
+}
+
+static SLJIT_INLINE PCRE2_SPTR set_then_offsets(compiler_common *common, PCRE2_SPTR cc, sljit_u8 *current_offset)
+{
+PCRE2_SPTR end = bracketend(cc);
+BOOL has_alternatives = cc[GET(cc, 1)] == OP_ALT;
+
+/* Assert captures then. */
+if (*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NOT)
+ current_offset = NULL;
+/* Conditional block does not. */
+if (*cc == OP_COND || *cc == OP_SCOND)
+ has_alternatives = FALSE;
+
+cc = next_opcode(common, cc);
+if (has_alternatives)
+ current_offset = common->then_offsets + (cc - common->start);
+
+while (cc < end)
+ {
+ if ((*cc >= OP_ASSERT && *cc <= OP_ASSERTBACK_NOT) || (*cc >= OP_ONCE && *cc <= OP_SCOND))
+ cc = set_then_offsets(common, cc, current_offset);
+ else
+ {
+ if (*cc == OP_ALT && has_alternatives)
+ current_offset = common->then_offsets + (cc + 1 + LINK_SIZE - common->start);
+ if (*cc >= OP_THEN && *cc <= OP_THEN_ARG && current_offset != NULL)
+ *current_offset = 1;
+ cc = next_opcode(common, cc);
+ }
+ }
+
+return end;
+}
+
+#undef CASE_ITERATOR_PRIVATE_DATA_1
+#undef CASE_ITERATOR_PRIVATE_DATA_2A
+#undef CASE_ITERATOR_PRIVATE_DATA_2B
+#undef CASE_ITERATOR_TYPE_PRIVATE_DATA_1
+#undef CASE_ITERATOR_TYPE_PRIVATE_DATA_2A
+#undef CASE_ITERATOR_TYPE_PRIVATE_DATA_2B
+
+static SLJIT_INLINE BOOL is_powerof2(unsigned int value)
+{
+return (value & (value - 1)) == 0;
+}
+
+static SLJIT_INLINE void set_jumps(jump_list *list, struct sljit_label *label)
+{
+while (list)
+ {
+ /* sljit_set_label is clever enough to do nothing
+ if either the jump or the label is NULL. */
+ SET_LABEL(list->jump, label);
+ list = list->next;
+ }
+}
+
+static SLJIT_INLINE void add_jump(struct sljit_compiler *compiler, jump_list **list, struct sljit_jump *jump)
+{
+jump_list *list_item = sljit_alloc_memory(compiler, sizeof(jump_list));
+if (list_item)
+ {
+ list_item->next = *list;
+ list_item->jump = jump;
+ *list = list_item;
+ }
+}
+
+static void add_stub(compiler_common *common, struct sljit_jump *start)
+{
+DEFINE_COMPILER;
+stub_list *list_item = sljit_alloc_memory(compiler, sizeof(stub_list));
+
+if (list_item)
+ {
+ list_item->start = start;
+ list_item->quit = LABEL();
+ list_item->next = common->stubs;
+ common->stubs = list_item;
+ }
+}
+
+static void flush_stubs(compiler_common *common)
+{
+DEFINE_COMPILER;
+stub_list *list_item = common->stubs;
+
+while (list_item)
+ {
+ JUMPHERE(list_item->start);
+ add_jump(compiler, &common->stackalloc, JUMP(SLJIT_FAST_CALL));
+ JUMPTO(SLJIT_JUMP, list_item->quit);
+ list_item = list_item->next;
+ }
+common->stubs = NULL;
+}
+
+static void add_label_addr(compiler_common *common, sljit_uw *update_addr)
+{
+DEFINE_COMPILER;
+label_addr_list *label_addr;
+
+label_addr = sljit_alloc_memory(compiler, sizeof(label_addr_list));
+if (label_addr == NULL)
+ return;
+label_addr->label = LABEL();
+label_addr->update_addr = update_addr;
+label_addr->next = common->label_addrs;
+common->label_addrs = label_addr;
+}
+
+static SLJIT_INLINE void count_match(compiler_common *common)
+{
+DEFINE_COMPILER;
+
+OP2(SLJIT_SUB | SLJIT_SET_E, COUNT_MATCH, 0, COUNT_MATCH, 0, SLJIT_IMM, 1);
+add_jump(compiler, &common->calllimit, JUMP(SLJIT_ZERO));
+}
+
+static SLJIT_INLINE void allocate_stack(compiler_common *common, int size)
+{
+/* May destroy all locals and registers except TMP2. */
+DEFINE_COMPILER;
+
+SLJIT_ASSERT(size > 0);
+OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, size * sizeof(sljit_sw));
+#ifdef DESTROY_REGISTERS
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 12345);
+OP1(SLJIT_MOV, TMP3, 0, TMP1, 0);
+OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP1, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, TMP1, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS1, TMP1, 0);
+#endif
+add_stub(common, CMP(SLJIT_GREATER, STACK_TOP, 0, STACK_LIMIT, 0));
+}
+
+static SLJIT_INLINE void free_stack(compiler_common *common, int size)
+{
+DEFINE_COMPILER;
+
+SLJIT_ASSERT(size > 0);
+OP2(SLJIT_SUB, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, size * sizeof(sljit_sw));
+}
+
+static sljit_uw * allocate_read_only_data(compiler_common *common, sljit_uw size)
+{
+DEFINE_COMPILER;
+sljit_uw *result;
+
+if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return NULL;
+
+result = (sljit_uw *)SLJIT_MALLOC(size + sizeof(sljit_uw), compiler->allocator_data);
+if (SLJIT_UNLIKELY(result == NULL))
+ {
+ sljit_set_compiler_memory_error(compiler);
+ return NULL;
+ }
+
+*(void**)result = common->read_only_data_head;
+common->read_only_data_head = (void *)result;
+return result + 1;
+}
+
+static SLJIT_INLINE void reset_ovector(compiler_common *common, int length)
+{
+DEFINE_COMPILER;
+struct sljit_label *loop;
+sljit_s32 i;
+
+/* At this point we can freely use all temporary registers. */
+SLJIT_ASSERT(length > 1);
+/* TMP1 returns with begin - 1. */
+OP2(SLJIT_SUB, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_S0), SLJIT_OFFSETOF(jit_arguments, begin), SLJIT_IMM, IN_UCHARS(1));
+if (length < 8)
+ {
+ for (i = 1; i < length; i++)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(i), SLJIT_R0, 0);
+ }
+else
+ {
+ GET_LOCAL_BASE(SLJIT_R1, 0, OVECTOR_START);
+ OP1(SLJIT_MOV, SLJIT_R2, 0, SLJIT_IMM, length - 1);
+ loop = LABEL();
+ OP1(SLJIT_MOVU, SLJIT_MEM1(SLJIT_R1), sizeof(sljit_sw), SLJIT_R0, 0);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_R2, 0, SLJIT_R2, 0, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, loop);
+ }
+}
+
+static SLJIT_INLINE void reset_fast_fail(compiler_common *common)
+{
+DEFINE_COMPILER;
+sljit_s32 i;
+
+SLJIT_ASSERT(common->fast_fail_start_ptr < common->fast_fail_end_ptr);
+
+OP2(SLJIT_SUB, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+for (i = common->fast_fail_start_ptr; i < common->fast_fail_end_ptr; i += sizeof(sljit_sw))
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), i, TMP1, 0);
+}
+
+static SLJIT_INLINE void do_reset_match(compiler_common *common, int length)
+{
+DEFINE_COMPILER;
+struct sljit_label *loop;
+int i;
+
+SLJIT_ASSERT(length > 1);
+/* OVECTOR(1) contains the "string begin - 1" constant. */
+if (length > 2)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(1));
+if (length < 8)
+ {
+ for (i = 2; i < length; i++)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(i), TMP1, 0);
+ }
+else
+ {
+ GET_LOCAL_BASE(TMP2, 0, OVECTOR_START + sizeof(sljit_sw));
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_IMM, length - 2);
+ loop = LABEL();
+ OP1(SLJIT_MOVU, SLJIT_MEM1(TMP2), sizeof(sljit_sw), TMP1, 0);
+ OP2(SLJIT_SUB | SLJIT_SET_E, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, loop);
+ }
+
+OP1(SLJIT_MOV, STACK_TOP, 0, ARGUMENTS, 0);
+if (common->mark_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->mark_ptr, SLJIT_IMM, 0);
+if (common->control_head_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_IMM, 0);
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), SLJIT_OFFSETOF(jit_arguments, stack));
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->start_ptr);
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), SLJIT_OFFSETOF(struct sljit_stack, base));
+}
+
+static sljit_sw SLJIT_CALL do_search_mark(sljit_sw *current, PCRE2_SPTR skip_arg)
+{
+while (current != NULL)
+ {
+ switch (current[-2])
+ {
+ case type_then_trap:
+ break;
+
+ case type_mark:
+ if (PRIV(strcmp)(skip_arg, (PCRE2_SPTR)current[-3]) == 0)
+ return current[-4];
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+ SLJIT_ASSERT(current > (sljit_sw*)current[-1]);
+ current = (sljit_sw*)current[-1];
+ }
+return -1;
+}
+
+static SLJIT_INLINE void copy_ovector(compiler_common *common, int topbracket)
+{
+DEFINE_COMPILER;
+struct sljit_label *loop;
+
+/* At this point we can freely use all registers. */
+OP1(SLJIT_MOV, SLJIT_S2, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(1));
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(1), STR_PTR, 0);
+
+OP1(SLJIT_MOV, SLJIT_R0, 0, ARGUMENTS, 0);
+OP1(SLJIT_MOV, SLJIT_S0, 0, SLJIT_MEM1(SLJIT_SP), common->start_ptr);
+if (common->mark_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP), common->mark_ptr);
+OP1(SLJIT_MOV_U32, SLJIT_R1, 0, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, oveccount));
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, startchar_ptr), SLJIT_S0, 0);
+if (common->mark_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, mark_ptr), SLJIT_R2, 0);
+OP2(SLJIT_ADD, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, match_data),
+ SLJIT_IMM, SLJIT_OFFSETOF(pcre2_match_data, ovector) - sizeof(PCRE2_SIZE));
+
+GET_LOCAL_BASE(SLJIT_S0, 0, OVECTOR_START);
+OP1(SLJIT_MOV, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_R0), SLJIT_OFFSETOF(jit_arguments, begin));
+
+loop = LABEL();
+OP2(SLJIT_SUB, SLJIT_S1, 0, SLJIT_MEM1(SLJIT_S0), 0, SLJIT_R0, 0);
+OP2(SLJIT_ADD, SLJIT_S0, 0, SLJIT_S0, 0, SLJIT_IMM, sizeof(sljit_sw));
+/* Copy the integer value to the output buffer */
+#if PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
+OP2(SLJIT_ASHR, SLJIT_S1, 0, SLJIT_S1, 0, SLJIT_IMM, UCHAR_SHIFT);
+#endif
+SLJIT_ASSERT(sizeof(PCRE2_SIZE) == 4 || sizeof(PCRE2_SIZE) == 8);
+if (sizeof(PCRE2_SIZE) == 4)
+ OP1(SLJIT_MOVU_U32, SLJIT_MEM1(SLJIT_R2), sizeof(PCRE2_SIZE), SLJIT_S1, 0);
+else
+ OP1(SLJIT_MOVU, SLJIT_MEM1(SLJIT_R2), sizeof(PCRE2_SIZE), SLJIT_S1, 0);
+OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_R1, 0, SLJIT_R1, 0, SLJIT_IMM, 1);
+JUMPTO(SLJIT_NOT_ZERO, loop);
+
+/* Calculate the return value, which is the maximum ovector value. */
+if (topbracket > 1)
+ {
+ GET_LOCAL_BASE(SLJIT_R0, 0, OVECTOR_START + topbracket * 2 * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_R1, 0, SLJIT_IMM, topbracket + 1);
+
+ /* OVECTOR(0) is never equal to SLJIT_S2. */
+ loop = LABEL();
+ OP1(SLJIT_MOVU, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_R0), -(2 * (sljit_sw)sizeof(sljit_sw)));
+ OP2(SLJIT_SUB, SLJIT_R1, 0, SLJIT_R1, 0, SLJIT_IMM, 1);
+ CMPTO(SLJIT_EQUAL, SLJIT_R2, 0, SLJIT_S2, 0, loop);
+ OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_R1, 0);
+ }
+else
+ OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, 1);
+}
+
+static SLJIT_INLINE void return_with_partial_match(compiler_common *common, struct sljit_label *quit)
+{
+DEFINE_COMPILER;
+sljit_s32 mov_opcode;
+
+SLJIT_COMPILE_ASSERT(STR_END == SLJIT_S1, str_end_must_be_saved_reg2);
+SLJIT_ASSERT(common->start_used_ptr != 0 && common->start_ptr != 0
+ && (common->mode == PCRE2_JIT_PARTIAL_SOFT ? common->hit_start != 0 : common->hit_start == 0));
+
+OP1(SLJIT_MOV, SLJIT_R1, 0, ARGUMENTS, 0);
+OP1(SLJIT_MOV, SLJIT_R2, 0, SLJIT_MEM1(SLJIT_SP),
+ common->mode == PCRE2_JIT_PARTIAL_SOFT ? common->hit_start : common->start_ptr);
+OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE2_ERROR_PARTIAL);
+
+/* Store match begin and end. */
+OP1(SLJIT_MOV, SLJIT_S0, 0, SLJIT_MEM1(SLJIT_R1), SLJIT_OFFSETOF(jit_arguments, begin));
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_R1), SLJIT_OFFSETOF(jit_arguments, startchar_ptr), SLJIT_R2, 0);
+OP1(SLJIT_MOV, SLJIT_R1, 0, SLJIT_MEM1(SLJIT_R1), SLJIT_OFFSETOF(jit_arguments, match_data));
+
+mov_opcode = (sizeof(PCRE2_SIZE) == 4) ? SLJIT_MOV_U32 : SLJIT_MOV;
+
+OP2(SLJIT_SUB, SLJIT_R2, 0, SLJIT_R2, 0, SLJIT_S0, 0);
+#if PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
+OP2(SLJIT_ASHR, SLJIT_R2, 0, SLJIT_R2, 0, SLJIT_IMM, UCHAR_SHIFT);
+#endif
+OP1(mov_opcode, SLJIT_MEM1(SLJIT_R1), SLJIT_OFFSETOF(pcre2_match_data, ovector), SLJIT_R2, 0);
+
+OP2(SLJIT_SUB, STR_END, 0, STR_END, 0, SLJIT_S0, 0);
+#if PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
+OP2(SLJIT_ASHR, STR_END, 0, STR_END, 0, SLJIT_IMM, UCHAR_SHIFT);
+#endif
+OP1(mov_opcode, SLJIT_MEM1(SLJIT_R1), SLJIT_OFFSETOF(pcre2_match_data, ovector) + sizeof(PCRE2_SIZE), STR_END, 0);
+
+JUMPTO(SLJIT_JUMP, quit);
+}
+
+static SLJIT_INLINE void check_start_used_ptr(compiler_common *common)
+{
+/* May destroy TMP1. */
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+
+if (common->mode == PCRE2_JIT_PARTIAL_SOFT)
+ {
+ /* The value of -1 must be kept for start_used_ptr! */
+ OP2(SLJIT_ADD, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, SLJIT_IMM, 1);
+ /* Jumps if start_used_ptr < STR_PTR, or start_used_ptr == -1. Although overwriting
+ is not necessary if start_used_ptr == STR_PTR, it does not hurt as well. */
+ jump = CMP(SLJIT_LESS_EQUAL, TMP1, 0, STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0);
+ JUMPHERE(jump);
+ }
+else if (common->mode == PCRE2_JIT_PARTIAL_HARD)
+ {
+ jump = CMP(SLJIT_LESS_EQUAL, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0);
+ JUMPHERE(jump);
+ }
+}
+
+static SLJIT_INLINE BOOL char_has_othercase(compiler_common *common, PCRE2_SPTR cc)
+{
+/* Detects if the character has an othercase. */
+unsigned int c;
+
+#ifdef SUPPORT_UNICODE
+if (common->utf)
+ {
+ GETCHAR(c, cc);
+ if (c > 127)
+ {
+ return c != UCD_OTHERCASE(c);
+ }
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ return common->fcc[c] != c;
+#endif
+ }
+else
+#endif
+ c = *cc;
+return MAX_255(c) ? common->fcc[c] != c : FALSE;
+}
+
+static SLJIT_INLINE unsigned int char_othercase(compiler_common *common, unsigned int c)
+{
+/* Returns with the othercase. */
+#ifdef SUPPORT_UNICODE
+if (common->utf && c > 127)
+ {
+ return UCD_OTHERCASE(c);
+ }
+#endif
+return TABLE_GET(c, common->fcc, c);
+}
+
+static unsigned int char_get_othercase_bit(compiler_common *common, PCRE2_SPTR cc)
+{
+/* Detects if the character and its othercase has only 1 bit difference. */
+unsigned int c, oc, bit;
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+int n;
+#endif
+
+#ifdef SUPPORT_UNICODE
+if (common->utf)
+ {
+ GETCHAR(c, cc);
+ if (c <= 127)
+ oc = common->fcc[c];
+ else
+ {
+ oc = UCD_OTHERCASE(c);
+ }
+ }
+else
+ {
+ c = *cc;
+ oc = TABLE_GET(c, common->fcc, c);
+ }
+#else
+c = *cc;
+oc = TABLE_GET(c, common->fcc, c);
+#endif
+
+SLJIT_ASSERT(c != oc);
+
+bit = c ^ oc;
+/* Optimized for English alphabet. */
+if (c <= 127 && bit == 0x20)
+ return (0 << 8) | 0x20;
+
+/* Since c != oc, they must have at least 1 bit difference. */
+if (!is_powerof2(bit))
+ return 0;
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+
+#ifdef SUPPORT_UNICODE
+if (common->utf && c > 127)
+ {
+ n = GET_EXTRALEN(*cc);
+ while ((bit & 0x3f) == 0)
+ {
+ n--;
+ bit >>= 6;
+ }
+ return (n << 8) | bit;
+ }
+#endif /* SUPPORT_UNICODE */
+return (0 << 8) | bit;
+
+#elif PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
+
+#ifdef SUPPORT_UNICODE
+if (common->utf && c > 65535)
+ {
+ if (bit >= (1 << 10))
+ bit >>= 10;
+ else
+ return (bit < 256) ? ((2 << 8) | bit) : ((3 << 8) | (bit >> 8));
+ }
+#endif /* SUPPORT_UNICODE */
+return (bit < 256) ? ((0 << 8) | bit) : ((1 << 8) | (bit >> 8));
+
+#endif /* PCRE2_CODE_UNIT_WIDTH == [8|16|32] */
+}
+
+static void check_partial(compiler_common *common, BOOL force)
+{
+/* Checks whether a partial matching is occurred. Does not modify registers. */
+DEFINE_COMPILER;
+struct sljit_jump *jump = NULL;
+
+SLJIT_ASSERT(!force || common->mode != PCRE2_JIT_COMPLETE);
+
+if (common->mode == PCRE2_JIT_COMPLETE)
+ return;
+
+if (!force)
+ jump = CMP(SLJIT_GREATER_EQUAL, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0);
+else if (common->mode == PCRE2_JIT_PARTIAL_SOFT)
+ jump = CMP(SLJIT_EQUAL, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, SLJIT_IMM, -1);
+
+if (common->mode == PCRE2_JIT_PARTIAL_SOFT)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->hit_start, SLJIT_IMM, 0);
+else
+ {
+ if (common->partialmatchlabel != NULL)
+ JUMPTO(SLJIT_JUMP, common->partialmatchlabel);
+ else
+ add_jump(compiler, &common->partialmatch, JUMP(SLJIT_JUMP));
+ }
+
+if (jump != NULL)
+ JUMPHERE(jump);
+}
+
+static void check_str_end(compiler_common *common, jump_list **end_reached)
+{
+/* Does not affect registers. Usually used in a tight spot. */
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+
+if (common->mode == PCRE2_JIT_COMPLETE)
+ {
+ add_jump(compiler, end_reached, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
+ return;
+ }
+
+jump = CMP(SLJIT_LESS, STR_PTR, 0, STR_END, 0);
+if (common->mode == PCRE2_JIT_PARTIAL_SOFT)
+ {
+ add_jump(compiler, end_reached, CMP(SLJIT_GREATER_EQUAL, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->hit_start, SLJIT_IMM, 0);
+ add_jump(compiler, end_reached, JUMP(SLJIT_JUMP));
+ }
+else
+ {
+ add_jump(compiler, end_reached, CMP(SLJIT_GREATER_EQUAL, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0));
+ if (common->partialmatchlabel != NULL)
+ JUMPTO(SLJIT_JUMP, common->partialmatchlabel);
+ else
+ add_jump(compiler, &common->partialmatch, JUMP(SLJIT_JUMP));
+ }
+JUMPHERE(jump);
+}
+
+static void detect_partial_match(compiler_common *common, jump_list **backtracks)
+{
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+
+if (common->mode == PCRE2_JIT_COMPLETE)
+ {
+ add_jump(compiler, backtracks, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
+ return;
+ }
+
+/* Partial matching mode. */
+jump = CMP(SLJIT_LESS, STR_PTR, 0, STR_END, 0);
+add_jump(compiler, backtracks, CMP(SLJIT_GREATER_EQUAL, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0));
+if (common->mode == PCRE2_JIT_PARTIAL_SOFT)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->hit_start, SLJIT_IMM, 0);
+ add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
+ }
+else
+ {
+ if (common->partialmatchlabel != NULL)
+ JUMPTO(SLJIT_JUMP, common->partialmatchlabel);
+ else
+ add_jump(compiler, &common->partialmatch, JUMP(SLJIT_JUMP));
+ }
+JUMPHERE(jump);
+}
+
+static void peek_char(compiler_common *common, sljit_u32 max)
+{
+/* Reads the character into TMP1, keeps STR_PTR.
+Does not check STR_END. TMP2 Destroyed. */
+DEFINE_COMPILER;
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+struct sljit_jump *jump;
+#endif
+
+SLJIT_UNUSED_ARG(max);
+
+OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+if (common->utf)
+ {
+ if (max < 128) return;
+
+ jump = CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, 0xc0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ add_jump(compiler, &common->utfreadchar, JUMP(SLJIT_FAST_CALL));
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+ JUMPHERE(jump);
+ }
+#endif /* SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 */
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 16
+if (common->utf)
+ {
+ if (max < 0xd800) return;
+
+ OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xd800);
+ jump = CMP(SLJIT_GREATER, TMP2, 0, SLJIT_IMM, 0xdc00 - 0xd800 - 1);
+ /* TMP2 contains the high surrogate. */
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x40);
+ OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 10);
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3ff);
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+ JUMPHERE(jump);
+ }
+#endif
+}
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+
+static BOOL is_char7_bitset(const sljit_u8 *bitset, BOOL nclass)
+{
+/* Tells whether the character codes below 128 are enough
+to determine a match. */
+const sljit_u8 value = nclass ? 0xff : 0;
+const sljit_u8 *end = bitset + 32;
+
+bitset += 16;
+do
+ {
+ if (*bitset++ != value)
+ return FALSE;
+ }
+while (bitset < end);
+return TRUE;
+}
+
+static void read_char7_type(compiler_common *common, BOOL full_read)
+{
+/* Reads the precise character type of a character into TMP1, if the character
+is less than 128. Otherwise it returns with zero. Does not check STR_END. The
+full_read argument tells whether characters above max are accepted or not. */
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+
+SLJIT_ASSERT(common->utf);
+
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), 0);
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+
+OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP2), common->ctypes);
+
+if (full_read)
+ {
+ jump = CMP(SLJIT_LESS, TMP2, 0, SLJIT_IMM, 0xc0);
+ OP1(SLJIT_MOV_U8, TMP2, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(utf8_table4) - 0xc0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+ JUMPHERE(jump);
+ }
+}
+
+#endif /* SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8 */
+
+static void read_char_range(compiler_common *common, sljit_u32 min, sljit_u32 max, BOOL update_str_ptr)
+{
+/* Reads the precise value of a character into TMP1, if the character is
+between min and max (c >= min && c <= max). Otherwise it returns with a value
+outside the range. Does not check STR_END. */
+DEFINE_COMPILER;
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+struct sljit_jump *jump;
+#endif
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+struct sljit_jump *jump2;
+#endif
+
+SLJIT_UNUSED_ARG(update_str_ptr);
+SLJIT_UNUSED_ARG(min);
+SLJIT_UNUSED_ARG(max);
+SLJIT_ASSERT(min <= max);
+
+OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+if (common->utf)
+ {
+ if (max < 128 && !update_str_ptr) return;
+
+ jump = CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, 0xc0);
+ if (min >= 0x10000)
+ {
+ OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xf0);
+ if (update_str_ptr)
+ OP1(SLJIT_MOV_U8, RETURN_ADDR, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ jump2 = CMP(SLJIT_GREATER, TMP2, 0, SLJIT_IMM, 0x7);
+ OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 6);
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3f);
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
+ OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(2));
+ if (!update_str_ptr)
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(3));
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
+ OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+ JUMPHERE(jump2);
+ if (update_str_ptr)
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, RETURN_ADDR, 0);
+ }
+ else if (min >= 0x800 && max <= 0xffff)
+ {
+ OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xe0);
+ if (update_str_ptr)
+ OP1(SLJIT_MOV_U8, RETURN_ADDR, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ jump2 = CMP(SLJIT_GREATER, TMP2, 0, SLJIT_IMM, 0xf);
+ OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 6);
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3f);
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+ if (!update_str_ptr)
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
+ OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+ JUMPHERE(jump2);
+ if (update_str_ptr)
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, RETURN_ADDR, 0);
+ }
+ else if (max >= 0x800)
+ add_jump(compiler, (max < 0x10000) ? &common->utfreadchar16 : &common->utfreadchar, JUMP(SLJIT_FAST_CALL));
+ else if (max < 128)
+ {
+ OP1(SLJIT_MOV_U8, TMP2, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+ }
+ else
+ {
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ if (!update_str_ptr)
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ else
+ OP1(SLJIT_MOV_U8, RETURN_ADDR, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3f);
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
+ OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+ if (update_str_ptr)
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, RETURN_ADDR, 0);
+ }
+ JUMPHERE(jump);
+ }
+#endif
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 16
+if (common->utf)
+ {
+ if (max >= 0x10000)
+ {
+ OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xd800);
+ jump = CMP(SLJIT_GREATER, TMP2, 0, SLJIT_IMM, 0xdc00 - 0xd800 - 1);
+ /* TMP2 contains the high surrogate. */
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x40);
+ OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 10);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3ff);
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+ JUMPHERE(jump);
+ return;
+ }
+
+ if (max < 0xd800 && !update_str_ptr) return;
+
+ /* Skip low surrogate if necessary. */
+ OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, 0xd800);
+ jump = CMP(SLJIT_GREATER, TMP2, 0, SLJIT_IMM, 0xdc00 - 0xd800 - 1);
+ if (update_str_ptr)
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ if (max >= 0xd800)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0x10000);
+ JUMPHERE(jump);
+ }
+#endif
+}
+
+static SLJIT_INLINE void read_char(compiler_common *common)
+{
+read_char_range(common, 0, READ_CHAR_MAX, TRUE);
+}
+
+static void read_char8_type(compiler_common *common, BOOL update_str_ptr)
+{
+/* Reads the character type into TMP1, updates STR_PTR. Does not check STR_END. */
+DEFINE_COMPILER;
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8
+struct sljit_jump *jump;
+#endif
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+struct sljit_jump *jump2;
+#endif
+
+SLJIT_UNUSED_ARG(update_str_ptr);
+
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), 0);
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+if (common->utf)
+ {
+ /* This can be an extra read in some situations, but hopefully
+ it is needed in most cases. */
+ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP2), common->ctypes);
+ jump = CMP(SLJIT_LESS, TMP2, 0, SLJIT_IMM, 0xc0);
+ if (!update_str_ptr)
+ {
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+ OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 6);
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3f);
+ OP2(SLJIT_OR, TMP2, 0, TMP2, 0, TMP1, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0);
+ jump2 = CMP(SLJIT_GREATER, TMP2, 0, SLJIT_IMM, 255);
+ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP2), common->ctypes);
+ JUMPHERE(jump2);
+ }
+ else
+ add_jump(compiler, &common->utfreadtype8, JUMP(SLJIT_FAST_CALL));
+ JUMPHERE(jump);
+ return;
+ }
+#endif /* SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8 */
+
+#if PCRE2_CODE_UNIT_WIDTH != 8
+/* The ctypes array contains only 256 values. */
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0);
+jump = CMP(SLJIT_GREATER, TMP2, 0, SLJIT_IMM, 255);
+#endif
+OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP2), common->ctypes);
+#if PCRE2_CODE_UNIT_WIDTH != 8
+JUMPHERE(jump);
+#endif
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 16
+if (common->utf && update_str_ptr)
+ {
+ /* Skip low surrogate if necessary. */
+ OP2(SLJIT_SUB, TMP2, 0, TMP2, 0, SLJIT_IMM, 0xd800);
+ jump = CMP(SLJIT_GREATER, TMP2, 0, SLJIT_IMM, 0xdc00 - 0xd800 - 1);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ JUMPHERE(jump);
+ }
+#endif /* SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 16 */
+}
+
+static void skip_char_back(compiler_common *common)
+{
+/* Goes one character back. Affects STR_PTR and TMP1. Does not check begin. */
+DEFINE_COMPILER;
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+#if PCRE2_CODE_UNIT_WIDTH == 8
+struct sljit_label *label;
+
+if (common->utf)
+ {
+ label = LABEL();
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), -IN_UCHARS(1));
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xc0);
+ CMPTO(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, 0x80, label);
+ return;
+ }
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+if (common->utf)
+ {
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), -IN_UCHARS(1));
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ /* Skip low surrogate if necessary. */
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xdc00);
+ OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ return;
+ }
+#endif /* PCRE2_CODE_UNIT_WIDTH == [8|16] */
+#endif /* SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 */
+OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+}
+
+static void check_newlinechar(compiler_common *common, int nltype, jump_list **backtracks, BOOL jumpifmatch)
+{
+/* Character comes in TMP1. Checks if it is a newline. TMP2 may be destroyed. */
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+
+if (nltype == NLTYPE_ANY)
+ {
+ add_jump(compiler, &common->anynewline, JUMP(SLJIT_FAST_CALL));
+ add_jump(compiler, backtracks, JUMP(jumpifmatch ? SLJIT_NOT_ZERO : SLJIT_ZERO));
+ }
+else if (nltype == NLTYPE_ANYCRLF)
+ {
+ if (jumpifmatch)
+ {
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_CR));
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_NL));
+ }
+ else
+ {
+ jump = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_CR);
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_NL));
+ JUMPHERE(jump);
+ }
+ }
+else
+ {
+ SLJIT_ASSERT(nltype == NLTYPE_FIXED && common->newline < 256);
+ add_jump(compiler, backtracks, CMP(jumpifmatch ? SLJIT_EQUAL : SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, common->newline));
+ }
+}
+
+#ifdef SUPPORT_UNICODE
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+static void do_utfreadchar(compiler_common *common)
+{
+/* Fast decoding a UTF-8 character. TMP1 contains the first byte
+of the character (>= 0xc0). Return char value in TMP1, length in TMP2. */
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3f);
+OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
+OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+
+/* Searching for the first zero. */
+OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x800);
+jump = JUMP(SLJIT_NOT_ZERO);
+/* Two byte sequence. */
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, IN_UCHARS(2));
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+
+JUMPHERE(jump);
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+OP2(SLJIT_XOR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x800);
+OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
+OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+
+OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x10000);
+jump = JUMP(SLJIT_NOT_ZERO);
+/* Three byte sequence. */
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, IN_UCHARS(3));
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+
+/* Four byte sequence. */
+JUMPHERE(jump);
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(2));
+OP2(SLJIT_XOR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x10000);
+OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(3));
+OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, IN_UCHARS(4));
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+static void do_utfreadchar16(compiler_common *common)
+{
+/* Fast decoding a UTF-8 character. TMP1 contains the first byte
+of the character (>= 0xc0). Return value in TMP1. */
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3f);
+OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
+OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+
+/* Searching for the first zero. */
+OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x800);
+jump = JUMP(SLJIT_NOT_ZERO);
+/* Two byte sequence. */
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+
+JUMPHERE(jump);
+OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x400);
+OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_NOT_ZERO);
+/* This code runs only in 8 bit mode. No need to shift the value. */
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+OP2(SLJIT_XOR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x800);
+OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 6);
+OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x3f);
+OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+/* Three byte sequence. */
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+static void do_utfreadtype8(compiler_common *common)
+{
+/* Fast decoding a UTF-8 character type. TMP2 contains the first byte
+of the character (>= 0xc0). Return value in TMP1. */
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+struct sljit_jump *compare;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+
+OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0x20);
+jump = JUMP(SLJIT_NOT_ZERO);
+/* Two byte sequence. */
+OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 0x1f);
+/* The upper 5 bits are known at this point. */
+compare = CMP(SLJIT_GREATER, TMP2, 0, SLJIT_IMM, 0x3);
+OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 6);
+OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x3f);
+OP2(SLJIT_OR, TMP2, 0, TMP2, 0, TMP1, 0);
+OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP2), common->ctypes);
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+
+JUMPHERE(compare);
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0);
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+
+/* We only have types for characters less than 256. */
+JUMPHERE(jump);
+OP1(SLJIT_MOV_U8, TMP2, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(utf8_table4) - 0xc0);
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 0);
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+#endif /* PCRE2_CODE_UNIT_WIDTH == 8 */
+
+/* UCD_BLOCK_SIZE must be 128 (see the assert below). */
+#define UCD_BLOCK_MASK 127
+#define UCD_BLOCK_SHIFT 7
+
+static void do_getucd(compiler_common *common)
+{
+/* Search the UCD record for the character comes in TMP1.
+Returns chartype in TMP1 and UCD offset in TMP2. */
+DEFINE_COMPILER;
+
+SLJIT_ASSERT(UCD_BLOCK_SIZE == 128 && sizeof(ucd_record) == 8);
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+OP2(SLJIT_LSHR, TMP2, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_SHIFT);
+OP1(SLJIT_MOV_U8, TMP2, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_stage1));
+OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_MASK);
+OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, UCD_BLOCK_SHIFT);
+OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0);
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_stage2));
+OP1(SLJIT_MOV_U16, TMP2, 0, SLJIT_MEM2(TMP2, TMP1), 1);
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype));
+OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM2(TMP1, TMP2), 3);
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+#endif /* SUPPORT_UNICODE */
+
+static SLJIT_INLINE struct sljit_label *mainloop_entry(compiler_common *common, BOOL hascrorlf, sljit_u32 overall_options)
+{
+DEFINE_COMPILER;
+struct sljit_label *mainloop;
+struct sljit_label *newlinelabel = NULL;
+struct sljit_jump *start;
+struct sljit_jump *end = NULL;
+struct sljit_jump *end2 = NULL;
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+struct sljit_jump *singlechar;
+#endif
+jump_list *newline = NULL;
+BOOL newlinecheck = FALSE;
+BOOL readuchar = FALSE;
+
+if (!(hascrorlf || (overall_options & PCRE2_FIRSTLINE) != 0)
+ && (common->nltype == NLTYPE_ANY || common->nltype == NLTYPE_ANYCRLF || common->newline > 255))
+ newlinecheck = TRUE;
+
+SLJIT_ASSERT(common->forced_quit_label == NULL);
+
+if ((overall_options & PCRE2_FIRSTLINE) != 0)
+ {
+ /* Search for the end of the first line. */
+ SLJIT_ASSERT(common->match_end_ptr != 0);
+ OP1(SLJIT_MOV, TMP3, 0, STR_PTR, 0);
+
+ if (common->nltype == NLTYPE_FIXED && common->newline > 255)
+ {
+ mainloop = LABEL();
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ end = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-1));
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff, mainloop);
+ CMPTO(SLJIT_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff, mainloop);
+ JUMPHERE(end);
+ OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ }
+ else
+ {
+ end = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ mainloop = LABEL();
+ /* Continual stores does not cause data dependency. */
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr, STR_PTR, 0);
+ read_char_range(common, common->nlmin, common->nlmax, TRUE);
+ check_newlinechar(common, common->nltype, &newline, TRUE);
+ CMPTO(SLJIT_LESS, STR_PTR, 0, STR_END, 0, mainloop);
+ JUMPHERE(end);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr, STR_PTR, 0);
+ set_jumps(newline, LABEL());
+ }
+
+ OP1(SLJIT_MOV, STR_PTR, 0, TMP3, 0);
+ }
+else if ((overall_options & PCRE2_USE_OFFSET_LIMIT) != 0)
+ {
+ /* Check whether offset limit is set and valid. */
+ SLJIT_ASSERT(common->match_end_ptr != 0);
+
+ OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, offset_limit));
+ OP1(SLJIT_MOV, TMP2, 0, STR_END, 0);
+ end = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, (sljit_sw) PCRE2_UNSET);
+ OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0);
+#if PCRE2_CODE_UNIT_WIDTH == 16
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+#elif PCRE2_CODE_UNIT_WIDTH == 32
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 2);
+#endif
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, begin));
+ OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0);
+ end2 = CMP(SLJIT_LESS_EQUAL, TMP2, 0, STR_END, 0);
+ OP1(SLJIT_MOV, TMP2, 0, STR_END, 0);
+ JUMPHERE(end2);
+ OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE2_ERROR_NOMATCH);
+ add_jump(compiler, &common->forced_quit, CMP(SLJIT_LESS, TMP2, 0, STR_PTR, 0));
+ JUMPHERE(end);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr, TMP2, 0);
+ }
+
+start = JUMP(SLJIT_JUMP);
+
+if (newlinecheck)
+ {
+ newlinelabel = LABEL();
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ end = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, common->newline & 0xff);
+ OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
+#if PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, UCHAR_SHIFT);
+#endif
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ end2 = JUMP(SLJIT_JUMP);
+ }
+
+mainloop = LABEL();
+
+/* Increasing the STR_PTR here requires one less jump in the most common case. */
+#ifdef SUPPORT_UNICODE
+if (common->utf) readuchar = TRUE;
+#endif
+if (newlinecheck) readuchar = TRUE;
+
+if (readuchar)
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+
+if (newlinecheck)
+ CMPTO(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff, newlinelabel);
+
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+#if PCRE2_CODE_UNIT_WIDTH == 8
+if (common->utf)
+ {
+ singlechar = CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, 0xc0);
+ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ JUMPHERE(singlechar);
+ }
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+if (common->utf)
+ {
+ singlechar = CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, 0xd800);
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xd800);
+ OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ JUMPHERE(singlechar);
+ }
+#endif /* PCRE2_CODE_UNIT_WIDTH == [8|16] */
+#endif /* SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32 */
+JUMPHERE(start);
+
+if (newlinecheck)
+ {
+ JUMPHERE(end);
+ JUMPHERE(end2);
+ }
+
+return mainloop;
+}
+
+#define MAX_N_CHARS 16
+#define MAX_DIFF_CHARS 6
+
+static SLJIT_INLINE void add_prefix_char(PCRE2_UCHAR chr, PCRE2_UCHAR *chars)
+{
+PCRE2_UCHAR i, len;
+
+len = chars[0];
+if (len == 255)
+ return;
+
+if (len == 0)
+ {
+ chars[0] = 1;
+ chars[1] = chr;
+ return;
+ }
+
+for (i = len; i > 0; i--)
+ if (chars[i] == chr)
+ return;
+
+if (len >= MAX_DIFF_CHARS - 1)
+ {
+ chars[0] = 255;
+ return;
+ }
+
+len++;
+chars[len] = chr;
+chars[0] = len;
+}
+
+static int scan_prefix(compiler_common *common, PCRE2_SPTR cc, PCRE2_UCHAR *chars, int max_chars, sljit_u32 *rec_count)
+{
+/* Recursive function, which scans prefix literals. */
+BOOL last, any, class, caseless;
+int len, repeat, len_save, consumed = 0;
+sljit_u32 chr; /* Any unicode character. */
+sljit_u8 *bytes, *bytes_end, byte;
+PCRE2_SPTR alternative, cc_save, oc;
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+PCRE2_UCHAR othercase[8];
+#elif defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 16
+PCRE2_UCHAR othercase[2];
+#else
+PCRE2_UCHAR othercase[1];
+#endif
+
+repeat = 1;
+while (TRUE)
+ {
+ if (*rec_count == 0)
+ return 0;
+ (*rec_count)--;
+
+ last = TRUE;
+ any = FALSE;
+ class = FALSE;
+ caseless = FALSE;
+
+ switch (*cc)
+ {
+ case OP_CHARI:
+ caseless = TRUE;
+ case OP_CHAR:
+ last = FALSE;
+ cc++;
+ break;
+
+ case OP_SOD:
+ case OP_SOM:
+ case OP_SET_SOM:
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ case OP_EODN:
+ case OP_EOD:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_DOLL:
+ case OP_DOLLM:
+ /* Zero width assertions. */
+ cc++;
+ continue;
+
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ cc = bracketend(cc);
+ continue;
+
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_POSPLUSI:
+ caseless = TRUE;
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_POSPLUS:
+ cc++;
+ break;
+
+ case OP_EXACTI:
+ caseless = TRUE;
+ case OP_EXACT:
+ repeat = GET2(cc, 1);
+ last = FALSE;
+ cc += 1 + IMM2_SIZE;
+ break;
+
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_POSQUERYI:
+ caseless = TRUE;
+ case OP_QUERY:
+ case OP_MINQUERY:
+ case OP_POSQUERY:
+ len = 1;
+ cc++;
+#ifdef SUPPORT_UNICODE
+ if (common->utf && HAS_EXTRALEN(*cc)) len += GET_EXTRALEN(*cc);
+#endif
+ max_chars = scan_prefix(common, cc + len, chars, max_chars, rec_count);
+ if (max_chars == 0)
+ return consumed;
+ last = FALSE;
+ break;
+
+ case OP_KET:
+ cc += 1 + LINK_SIZE;
+ continue;
+
+ case OP_ALT:
+ cc += GET(cc, 1);
+ continue;
+
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_BRA:
+ case OP_BRAPOS:
+ case OP_CBRA:
+ case OP_CBRAPOS:
+ alternative = cc + GET(cc, 1);
+ while (*alternative == OP_ALT)
+ {
+ max_chars = scan_prefix(common, alternative + 1 + LINK_SIZE, chars, max_chars, rec_count);
+ if (max_chars == 0)
+ return consumed;
+ alternative += GET(alternative, 1);
+ }
+
+ if (*cc == OP_CBRA || *cc == OP_CBRAPOS)
+ cc += IMM2_SIZE;
+ cc += 1 + LINK_SIZE;
+ continue;
+
+ case OP_CLASS:
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+ if (common->utf && !is_char7_bitset((const sljit_u8 *)(cc + 1), FALSE))
+ return consumed;
+#endif
+ class = TRUE;
+ break;
+
+ case OP_NCLASS:
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+ if (common->utf) return consumed;
+#endif
+ class = TRUE;
+ break;
+
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8
+ case OP_XCLASS:
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+ if (common->utf) return consumed;
+#endif
+ any = TRUE;
+ cc += GET(cc, 1);
+ break;
+#endif
+
+ case OP_DIGIT:
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+ if (common->utf && !is_char7_bitset((const sljit_u8 *)common->ctypes - cbit_length + cbit_digit, FALSE))
+ return consumed;
+#endif
+ any = TRUE;
+ cc++;
+ break;
+
+ case OP_WHITESPACE:
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+ if (common->utf && !is_char7_bitset((const sljit_u8 *)common->ctypes - cbit_length + cbit_space, FALSE))
+ return consumed;
+#endif
+ any = TRUE;
+ cc++;
+ break;
+
+ case OP_WORDCHAR:
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+ if (common->utf && !is_char7_bitset((const sljit_u8 *)common->ctypes - cbit_length + cbit_word, FALSE))
+ return consumed;
+#endif
+ any = TRUE;
+ cc++;
+ break;
+
+ case OP_NOT:
+ case OP_NOTI:
+ cc++;
+ /* Fall through. */
+ case OP_NOT_DIGIT:
+ case OP_NOT_WHITESPACE:
+ case OP_NOT_WORDCHAR:
+ case OP_ANY:
+ case OP_ALLANY:
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+ if (common->utf) return consumed;
+#endif
+ any = TRUE;
+ cc++;
+ break;
+
+#ifdef SUPPORT_UNICODE
+ case OP_NOTPROP:
+ case OP_PROP:
+#if PCRE2_CODE_UNIT_WIDTH != 32
+ if (common->utf) return consumed;
+#endif
+ any = TRUE;
+ cc += 1 + 2;
+ break;
+#endif
+
+ case OP_TYPEEXACT:
+ repeat = GET2(cc, 1);
+ cc += 1 + IMM2_SIZE;
+ continue;
+
+ case OP_NOTEXACT:
+ case OP_NOTEXACTI:
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+ if (common->utf) return consumed;
+#endif
+ any = TRUE;
+ repeat = GET2(cc, 1);
+ cc += 1 + IMM2_SIZE + 1;
+ break;
+
+ default:
+ return consumed;
+ }
+
+ if (any)
+ {
+ do
+ {
+ chars[0] = 255;
+
+ consumed++;
+ if (--max_chars == 0)
+ return consumed;
+ chars += MAX_DIFF_CHARS;
+ }
+ while (--repeat > 0);
+
+ repeat = 1;
+ continue;
+ }
+
+ if (class)
+ {
+ bytes = (sljit_u8*) (cc + 1);
+ cc += 1 + 32 / sizeof(PCRE2_UCHAR);
+
+ switch (*cc)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPOSSTAR:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ case OP_CRPOSQUERY:
+ max_chars = scan_prefix(common, cc + 1, chars, max_chars, rec_count);
+ if (max_chars == 0)
+ return consumed;
+ break;
+
+ default:
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRPOSPLUS:
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ case OP_CRPOSRANGE:
+ repeat = GET2(cc, 1);
+ if (repeat <= 0)
+ return consumed;
+ break;
+ }
+
+ do
+ {
+ if (bytes[31] & 0x80)
+ chars[0] = 255;
+ else if (chars[0] != 255)
+ {
+ bytes_end = bytes + 32;
+ chr = 0;
+ do
+ {
+ byte = *bytes++;
+ SLJIT_ASSERT((chr & 0x7) == 0);
+ if (byte == 0)
+ chr += 8;
+ else
+ {
+ do
+ {
+ if ((byte & 0x1) != 0)
+ add_prefix_char(chr, chars);
+ byte >>= 1;
+ chr++;
+ }
+ while (byte != 0);
+ chr = (chr + 7) & ~7;
+ }
+ }
+ while (chars[0] != 255 && bytes < bytes_end);
+ bytes = bytes_end - 32;
+ }
+
+ consumed++;
+ if (--max_chars == 0)
+ return consumed;
+ chars += MAX_DIFF_CHARS;
+ }
+ while (--repeat > 0);
+
+ switch (*cc)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPOSSTAR:
+ return consumed;
+
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ case OP_CRPOSQUERY:
+ cc++;
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ case OP_CRPOSRANGE:
+ if (GET2(cc, 1) != GET2(cc, 1 + IMM2_SIZE))
+ return consumed;
+ cc += 1 + 2 * IMM2_SIZE;
+ break;
+ }
+
+ repeat = 1;
+ continue;
+ }
+
+ len = 1;
+#ifdef SUPPORT_UNICODE
+ if (common->utf && HAS_EXTRALEN(*cc)) len += GET_EXTRALEN(*cc);
+#endif
+
+ if (caseless && char_has_othercase(common, cc))
+ {
+#ifdef SUPPORT_UNICODE
+ if (common->utf)
+ {
+ GETCHAR(chr, cc);
+ if ((int)PRIV(ord2utf)(char_othercase(common, chr), othercase) != len)
+ return consumed;
+ }
+ else
+#endif
+ {
+ chr = *cc;
+ othercase[0] = TABLE_GET(chr, common->fcc, chr);
+ }
+ }
+ else
+ {
+ caseless = FALSE;
+ othercase[0] = 0; /* Stops compiler warning - PH */
+ }
+
+ len_save = len;
+ cc_save = cc;
+ while (TRUE)
+ {
+ oc = othercase;
+ do
+ {
+ chr = *cc;
+ add_prefix_char(*cc, chars);
+
+ if (caseless)
+ add_prefix_char(*oc, chars);
+
+ len--;
+ consumed++;
+ if (--max_chars == 0)
+ return consumed;
+ chars += MAX_DIFF_CHARS;
+ cc++;
+ oc++;
+ }
+ while (len > 0);
+
+ if (--repeat == 0)
+ break;
+
+ len = len_save;
+ cc = cc_save;
+ }
+
+ repeat = 1;
+ if (last)
+ return consumed;
+ }
+}
+
+#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+
+static sljit_s32 character_to_int32(PCRE2_UCHAR chr)
+{
+sljit_s32 value = (sljit_s32)chr;
+#if PCRE2_CODE_UNIT_WIDTH == 8
+#define SSE2_COMPARE_TYPE_INDEX 0
+return (value << 24) | (value << 16) | (value << 8) | value;
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+#define SSE2_COMPARE_TYPE_INDEX 1
+return (value << 16) | value;
+#elif PCRE2_CODE_UNIT_WIDTH == 32
+#define SSE2_COMPARE_TYPE_INDEX 2
+return value;
+#else
+#error "Unsupported unit width"
+#endif
+}
+
+static SLJIT_INLINE void fast_forward_first_char2_sse2(compiler_common *common, PCRE2_UCHAR char1, PCRE2_UCHAR char2)
+{
+DEFINE_COMPILER;
+struct sljit_label *start;
+struct sljit_jump *quit[3];
+struct sljit_jump *nomatch;
+sljit_u8 instruction[8];
+sljit_s32 tmp1_ind = sljit_get_register_index(TMP1);
+sljit_s32 tmp2_ind = sljit_get_register_index(TMP2);
+sljit_s32 str_ptr_ind = sljit_get_register_index(STR_PTR);
+BOOL load_twice = FALSE;
+PCRE2_UCHAR bit;
+
+bit = char1 ^ char2;
+if (!is_powerof2(bit))
+ bit = 0;
+
+if ((char1 != char2) && bit == 0)
+ load_twice = TRUE;
+
+quit[0] = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+
+/* First part (unaligned start) */
+
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(char1 | bit));
+
+SLJIT_ASSERT(tmp1_ind < 8 && tmp2_ind == 1);
+
+/* MOVD xmm, r/m32 */
+instruction[0] = 0x66;
+instruction[1] = 0x0f;
+instruction[2] = 0x6e;
+instruction[3] = 0xc0 | (2 << 3) | tmp1_ind;
+sljit_emit_op_custom(compiler, instruction, 4);
+
+if (char1 != char2)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, character_to_int32(bit != 0 ? bit : char2));
+
+ /* MOVD xmm, r/m32 */
+ instruction[3] = 0xc0 | (3 << 3) | tmp1_ind;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+
+/* PSHUFD xmm1, xmm2/m128, imm8 */
+instruction[2] = 0x70;
+instruction[3] = 0xc0 | (2 << 3) | 2;
+instruction[4] = 0;
+sljit_emit_op_custom(compiler, instruction, 5);
+
+if (char1 != char2)
+ {
+ /* PSHUFD xmm1, xmm2/m128, imm8 */
+ instruction[3] = 0xc0 | (3 << 3) | 3;
+ instruction[4] = 0;
+ sljit_emit_op_custom(compiler, instruction, 5);
+ }
+
+OP2(SLJIT_AND, TMP2, 0, STR_PTR, 0, SLJIT_IMM, 0xf);
+OP2(SLJIT_AND, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, ~0xf);
+
+/* MOVDQA xmm1, xmm2/m128 */
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+
+if (str_ptr_ind < 8)
+ {
+ instruction[2] = 0x6f;
+ instruction[3] = (0 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 4);
+
+ if (load_twice)
+ {
+ instruction[3] = (1 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+ }
+else
+ {
+ instruction[1] = 0x41;
+ instruction[2] = 0x0f;
+ instruction[3] = 0x6f;
+ instruction[4] = (0 << 3) | (str_ptr_ind & 0x7);
+ sljit_emit_op_custom(compiler, instruction, 5);
+
+ if (load_twice)
+ {
+ instruction[4] = (1 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 5);
+ }
+ instruction[1] = 0x0f;
+ }
+
+#else
+
+instruction[2] = 0x6f;
+instruction[3] = (0 << 3) | str_ptr_ind;
+sljit_emit_op_custom(compiler, instruction, 4);
+
+if (load_twice)
+ {
+ instruction[3] = (1 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+
+#endif
+
+if (bit != 0)
+ {
+ /* POR xmm1, xmm2/m128 */
+ instruction[2] = 0xeb;
+ instruction[3] = 0xc0 | (0 << 3) | 3;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+
+/* PCMPEQB/W/D xmm1, xmm2/m128 */
+instruction[2] = 0x74 + SSE2_COMPARE_TYPE_INDEX;
+instruction[3] = 0xc0 | (0 << 3) | 2;
+sljit_emit_op_custom(compiler, instruction, 4);
+
+if (load_twice)
+ {
+ instruction[3] = 0xc0 | (1 << 3) | 3;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+
+/* PMOVMSKB reg, xmm */
+instruction[2] = 0xd7;
+instruction[3] = 0xc0 | (tmp1_ind << 3) | 0;
+sljit_emit_op_custom(compiler, instruction, 4);
+
+if (load_twice)
+ {
+ OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP2, 0);
+ instruction[3] = 0xc0 | (tmp2_ind << 3) | 1;
+ sljit_emit_op_custom(compiler, instruction, 4);
+
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+ OP1(SLJIT_MOV, TMP2, 0, RETURN_ADDR, 0);
+ }
+
+OP2(SLJIT_ASHR, TMP1, 0, TMP1, 0, TMP2, 0);
+
+/* BSF r32, r/m32 */
+instruction[0] = 0x0f;
+instruction[1] = 0xbc;
+instruction[2] = 0xc0 | (tmp1_ind << 3) | tmp1_ind;
+sljit_emit_op_custom(compiler, instruction, 3);
+
+nomatch = JUMP(SLJIT_ZERO);
+
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+quit[1] = JUMP(SLJIT_JUMP);
+
+JUMPHERE(nomatch);
+
+start = LABEL();
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, 16);
+quit[2] = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+
+/* Second part (aligned) */
+
+instruction[0] = 0x66;
+instruction[1] = 0x0f;
+
+/* MOVDQA xmm1, xmm2/m128 */
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+
+if (str_ptr_ind < 8)
+ {
+ instruction[2] = 0x6f;
+ instruction[3] = (0 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 4);
+
+ if (load_twice)
+ {
+ instruction[3] = (1 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+ }
+else
+ {
+ instruction[1] = 0x41;
+ instruction[2] = 0x0f;
+ instruction[3] = 0x6f;
+ instruction[4] = (0 << 3) | (str_ptr_ind & 0x7);
+ sljit_emit_op_custom(compiler, instruction, 5);
+
+ if (load_twice)
+ {
+ instruction[4] = (1 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 5);
+ }
+ instruction[1] = 0x0f;
+ }
+
+#else
+
+instruction[2] = 0x6f;
+instruction[3] = (0 << 3) | str_ptr_ind;
+sljit_emit_op_custom(compiler, instruction, 4);
+
+if (load_twice)
+ {
+ instruction[3] = (1 << 3) | str_ptr_ind;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+
+#endif
+
+if (bit != 0)
+ {
+ /* POR xmm1, xmm2/m128 */
+ instruction[2] = 0xeb;
+ instruction[3] = 0xc0 | (0 << 3) | 3;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+
+/* PCMPEQB/W/D xmm1, xmm2/m128 */
+instruction[2] = 0x74 + SSE2_COMPARE_TYPE_INDEX;
+instruction[3] = 0xc0 | (0 << 3) | 2;
+sljit_emit_op_custom(compiler, instruction, 4);
+
+if (load_twice)
+ {
+ instruction[3] = 0xc0 | (1 << 3) | 3;
+ sljit_emit_op_custom(compiler, instruction, 4);
+ }
+
+/* PMOVMSKB reg, xmm */
+instruction[2] = 0xd7;
+instruction[3] = 0xc0 | (tmp1_ind << 3) | 0;
+sljit_emit_op_custom(compiler, instruction, 4);
+
+if (load_twice)
+ {
+ instruction[3] = 0xc0 | (tmp2_ind << 3) | 1;
+ sljit_emit_op_custom(compiler, instruction, 4);
+
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, TMP2, 0);
+ }
+
+/* BSF r32, r/m32 */
+instruction[0] = 0x0f;
+instruction[1] = 0xbc;
+instruction[2] = 0xc0 | (tmp1_ind << 3) | tmp1_ind;
+sljit_emit_op_custom(compiler, instruction, 3);
+
+JUMPTO(SLJIT_ZERO, start);
+
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+
+start = LABEL();
+SET_LABEL(quit[0], start);
+SET_LABEL(quit[1], start);
+SET_LABEL(quit[2], start);
+}
+
+#undef SSE2_COMPARE_TYPE_INDEX
+
+#endif
+
+static void fast_forward_first_char2(compiler_common *common, PCRE2_UCHAR char1, PCRE2_UCHAR char2, sljit_s32 offset)
+{
+DEFINE_COMPILER;
+struct sljit_label *start;
+struct sljit_jump *quit;
+struct sljit_jump *found;
+PCRE2_UCHAR mask;
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+struct sljit_label *utf_start = NULL;
+struct sljit_jump *utf_quit = NULL;
+#endif
+BOOL has_match_end = (common->match_end_ptr != 0);
+
+if (offset > 0)
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offset));
+
+if (has_match_end)
+ {
+ OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
+
+ OP2(SLJIT_ADD, STR_END, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr, SLJIT_IMM, IN_UCHARS(offset + 1));
+#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+ if (sljit_x86_is_cmov_available())
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, STR_END, 0, TMP3, 0);
+ sljit_x86_emit_cmov(compiler, SLJIT_GREATER, STR_END, TMP3, 0);
+ }
+#endif
+ {
+ quit = CMP(SLJIT_LESS_EQUAL, STR_END, 0, TMP3, 0);
+ OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
+ JUMPHERE(quit);
+ }
+ }
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+if (common->utf && offset > 0)
+ utf_start = LABEL();
+#endif
+
+#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+
+/* SSE2 accelerated first character search. */
+
+if (sljit_x86_is_sse2_available())
+ {
+ fast_forward_first_char2_sse2(common, char1, char2);
+
+ SLJIT_ASSERT(common->mode == PCRE2_JIT_COMPLETE || offset == 0);
+ if (common->mode == PCRE2_JIT_COMPLETE)
+ {
+ /* In complete mode, we don't need to run a match when STR_PTR == STR_END. */
+ SLJIT_ASSERT(common->forced_quit_label == NULL);
+ OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE2_ERROR_NOMATCH);
+ add_jump(compiler, &common->forced_quit, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+ if (common->utf && offset > 0)
+ {
+ SLJIT_ASSERT(common->mode == PCRE2_JIT_COMPLETE);
+
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-offset));
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xc0);
+ CMPTO(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, 0x80, utf_start);
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
+ CMPTO(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, 0xdc00, utf_start);
+#else
+#error "Unknown code width"
+#endif
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ }
+#endif
+
+ if (offset > 0)
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offset));
+ }
+ else if (sljit_x86_is_cmov_available())
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, STR_PTR, 0, STR_END, 0);
+ sljit_x86_emit_cmov(compiler, SLJIT_GREATER_EQUAL, STR_PTR, has_match_end ? SLJIT_MEM1(SLJIT_SP) : STR_END, has_match_end ? common->match_end_ptr : 0);
+ }
+ else
+ {
+ quit = CMP(SLJIT_LESS, STR_PTR, 0, STR_END, 0);
+ OP1(SLJIT_MOV, STR_PTR, 0, has_match_end ? SLJIT_MEM1(SLJIT_SP) : STR_END, has_match_end ? common->match_end_ptr : 0);
+ JUMPHERE(quit);
+ }
+
+ if (has_match_end)
+ OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
+ return;
+ }
+
+#endif
+
+quit = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+
+start = LABEL();
+OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+
+if (char1 == char2)
+ found = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, char1);
+else
+ {
+ mask = char1 ^ char2;
+ if (is_powerof2(mask))
+ {
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, mask);
+ found = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, char1 | mask);
+ }
+ else
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, char1);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, char2);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+ found = JUMP(SLJIT_NOT_ZERO);
+ }
+ }
+
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+CMPTO(SLJIT_LESS, STR_PTR, 0, STR_END, 0, start);
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+if (common->utf && offset > 0)
+ utf_quit = JUMP(SLJIT_JUMP);
+#endif
+
+JUMPHERE(found);
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+if (common->utf && offset > 0)
+ {
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-offset));
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xc0);
+ CMPTO(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, 0x80, utf_start);
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
+ CMPTO(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, 0xdc00, utf_start);
+#else
+#error "Unknown code width"
+#endif
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ JUMPHERE(utf_quit);
+ }
+#endif
+
+JUMPHERE(quit);
+
+if (has_match_end)
+ {
+ quit = CMP(SLJIT_LESS, STR_PTR, 0, STR_END, 0);
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr);
+ if (offset > 0)
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offset));
+ JUMPHERE(quit);
+ OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
+ }
+
+if (offset > 0)
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(offset));
+}
+
+static SLJIT_INLINE BOOL fast_forward_first_n_chars(compiler_common *common)
+{
+DEFINE_COMPILER;
+struct sljit_label *start;
+struct sljit_jump *quit;
+struct sljit_jump *match;
+/* bytes[0] represent the number of characters between 0
+and MAX_N_BYTES - 1, 255 represents any character. */
+PCRE2_UCHAR chars[MAX_N_CHARS * MAX_DIFF_CHARS];
+sljit_s32 offset;
+PCRE2_UCHAR mask;
+PCRE2_UCHAR *char_set, *char_set_end;
+int i, max, from;
+int range_right = -1, range_len;
+sljit_u8 *update_table = NULL;
+BOOL in_range;
+sljit_u32 rec_count;
+
+for (i = 0; i < MAX_N_CHARS; i++)
+ chars[i * MAX_DIFF_CHARS] = 0;
+
+rec_count = 10000;
+max = scan_prefix(common, common->start, chars, MAX_N_CHARS, &rec_count);
+
+if (max < 1)
+ return FALSE;
+
+in_range = FALSE;
+/* Prevent compiler "uninitialized" warning */
+from = 0;
+range_len = 4 /* minimum length */ - 1;
+for (i = 0; i <= max; i++)
+ {
+ if (in_range && (i - from) > range_len && (chars[(i - 1) * MAX_DIFF_CHARS] < 255))
+ {
+ range_len = i - from;
+ range_right = i - 1;
+ }
+
+ if (i < max && chars[i * MAX_DIFF_CHARS] < 255)
+ {
+ SLJIT_ASSERT(chars[i * MAX_DIFF_CHARS] > 0);
+ if (!in_range)
+ {
+ in_range = TRUE;
+ from = i;
+ }
+ }
+ else
+ in_range = FALSE;
+ }
+
+if (range_right >= 0)
+ {
+ update_table = (sljit_u8 *)allocate_read_only_data(common, 256);
+ if (update_table == NULL)
+ return TRUE;
+ memset(update_table, IN_UCHARS(range_len), 256);
+
+ for (i = 0; i < range_len; i++)
+ {
+ char_set = chars + ((range_right - i) * MAX_DIFF_CHARS);
+ SLJIT_ASSERT(char_set[0] > 0 && char_set[0] < 255);
+ char_set_end = char_set + char_set[0];
+ char_set++;
+ while (char_set <= char_set_end)
+ {
+ if (update_table[(*char_set) & 0xff] > IN_UCHARS(i))
+ update_table[(*char_set) & 0xff] = IN_UCHARS(i);
+ char_set++;
+ }
+ }
+ }
+
+offset = -1;
+/* Scan forward. */
+for (i = 0; i < max; i++)
+ {
+ if (offset == -1)
+ {
+ if (chars[i * MAX_DIFF_CHARS] <= 2)
+ offset = i;
+ }
+ else if (chars[offset * MAX_DIFF_CHARS] == 2 && chars[i * MAX_DIFF_CHARS] <= 2)
+ {
+ if (chars[i * MAX_DIFF_CHARS] == 1)
+ offset = i;
+ else
+ {
+ mask = chars[offset * MAX_DIFF_CHARS + 1] ^ chars[offset * MAX_DIFF_CHARS + 2];
+ if (!is_powerof2(mask))
+ {
+ mask = chars[i * MAX_DIFF_CHARS + 1] ^ chars[i * MAX_DIFF_CHARS + 2];
+ if (is_powerof2(mask))
+ offset = i;
+ }
+ }
+ }
+ }
+
+if (range_right < 0)
+ {
+ if (offset < 0)
+ return FALSE;
+ SLJIT_ASSERT(chars[offset * MAX_DIFF_CHARS] >= 1 && chars[offset * MAX_DIFF_CHARS] <= 2);
+ /* Works regardless the value is 1 or 2. */
+ mask = chars[offset * MAX_DIFF_CHARS + chars[offset * MAX_DIFF_CHARS]];
+ fast_forward_first_char2(common, chars[offset * MAX_DIFF_CHARS + 1], mask, offset);
+ return TRUE;
+ }
+
+if (range_right == offset)
+ offset = -1;
+
+SLJIT_ASSERT(offset == -1 || (chars[offset * MAX_DIFF_CHARS] >= 1 && chars[offset * MAX_DIFF_CHARS] <= 2));
+
+max -= 1;
+SLJIT_ASSERT(max > 0);
+if (common->match_end_ptr != 0)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr);
+ OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
+ OP2(SLJIT_SUB, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS(max));
+ quit = CMP(SLJIT_LESS_EQUAL, STR_END, 0, TMP1, 0);
+ OP1(SLJIT_MOV, STR_END, 0, TMP1, 0);
+ JUMPHERE(quit);
+ }
+else
+ OP2(SLJIT_SUB, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS(max));
+
+SLJIT_ASSERT(range_right >= 0);
+
+#if !(defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+OP1(SLJIT_MOV, RETURN_ADDR, 0, SLJIT_IMM, (sljit_sw)update_table);
+#endif
+
+start = LABEL();
+quit = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+
+#if PCRE2_CODE_UNIT_WIDTH == 8 || (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
+OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(range_right));
+#else
+OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(range_right + 1) - 1);
+#endif
+
+#if !(defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM2(RETURN_ADDR, TMP1), 0);
+#else
+OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)update_table);
+#endif
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0, start);
+
+if (offset >= 0)
+ {
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(offset));
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+
+ if (chars[offset * MAX_DIFF_CHARS] == 1)
+ CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, chars[offset * MAX_DIFF_CHARS + 1], start);
+ else
+ {
+ mask = chars[offset * MAX_DIFF_CHARS + 1] ^ chars[offset * MAX_DIFF_CHARS + 2];
+ if (is_powerof2(mask))
+ {
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, mask);
+ CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, chars[offset * MAX_DIFF_CHARS + 1] | mask, start);
+ }
+ else
+ {
+ match = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, chars[offset * MAX_DIFF_CHARS + 1]);
+ CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, chars[offset * MAX_DIFF_CHARS + 2], start);
+ JUMPHERE(match);
+ }
+ }
+ }
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+if (common->utf && offset != 0)
+ {
+ if (offset < 0)
+ {
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ }
+ else
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-1));
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xc0);
+ CMPTO(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, 0x80, start);
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
+ CMPTO(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, 0xdc00, start);
+#else
+#error "Unknown code width"
+#endif
+ if (offset < 0)
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ }
+#endif
+
+if (offset >= 0)
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+
+JUMPHERE(quit);
+
+if (common->match_end_ptr != 0)
+ {
+ if (range_right >= 0)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr);
+ OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
+ if (range_right >= 0)
+ {
+ quit = CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, TMP1, 0);
+ OP1(SLJIT_MOV, STR_PTR, 0, TMP1, 0);
+ JUMPHERE(quit);
+ }
+ }
+else
+ OP2(SLJIT_ADD, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS(max));
+return TRUE;
+}
+
+#undef MAX_N_CHARS
+
+static SLJIT_INLINE void fast_forward_first_char(compiler_common *common, PCRE2_UCHAR first_char, BOOL caseless)
+{
+PCRE2_UCHAR oc;
+
+oc = first_char;
+if (caseless)
+ {
+ oc = TABLE_GET(first_char, common->fcc, first_char);
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 8
+ if (first_char > 127 && common->utf)
+ oc = UCD_OTHERCASE(first_char);
+#endif
+ }
+
+fast_forward_first_char2(common, first_char, oc, 0);
+}
+
+static SLJIT_INLINE void fast_forward_newline(compiler_common *common)
+{
+DEFINE_COMPILER;
+struct sljit_label *loop;
+struct sljit_jump *lastchar;
+struct sljit_jump *firstchar;
+struct sljit_jump *quit;
+struct sljit_jump *foundcr = NULL;
+struct sljit_jump *notfoundnl;
+jump_list *newline = NULL;
+
+if (common->match_end_ptr != 0)
+ {
+ OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
+ OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr);
+ }
+
+if (common->nltype == NLTYPE_FIXED && common->newline > 255)
+ {
+ lastchar = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin));
+ firstchar = CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, TMP2, 0);
+
+ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(2));
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, STR_PTR, 0, TMP1, 0);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_GREATER_EQUAL);
+#if PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
+ OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, UCHAR_SHIFT);
+#endif
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+
+ loop = LABEL();
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ quit = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-2));
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-1));
+ CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff, loop);
+ CMPTO(SLJIT_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff, loop);
+
+ JUMPHERE(quit);
+ JUMPHERE(firstchar);
+ JUMPHERE(lastchar);
+
+ if (common->match_end_ptr != 0)
+ OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
+ return;
+ }
+
+OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
+firstchar = CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, TMP2, 0);
+skip_char_back(common);
+
+loop = LABEL();
+common->ff_newline_shortcut = loop;
+
+read_char_range(common, common->nlmin, common->nlmax, TRUE);
+lastchar = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+if (common->nltype == NLTYPE_ANY || common->nltype == NLTYPE_ANYCRLF)
+ foundcr = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_CR);
+check_newlinechar(common, common->nltype, &newline, FALSE);
+set_jumps(newline, loop);
+
+if (common->nltype == NLTYPE_ANY || common->nltype == NLTYPE_ANYCRLF)
+ {
+ quit = JUMP(SLJIT_JUMP);
+ JUMPHERE(foundcr);
+ notfoundnl = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, CHAR_NL);
+ OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
+#if PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, UCHAR_SHIFT);
+#endif
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ JUMPHERE(notfoundnl);
+ JUMPHERE(quit);
+ }
+JUMPHERE(lastchar);
+JUMPHERE(firstchar);
+
+if (common->match_end_ptr != 0)
+ OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
+}
+
+static BOOL check_class_ranges(compiler_common *common, const sljit_u8 *bits, BOOL nclass, BOOL invert, jump_list **backtracks);
+
+static SLJIT_INLINE void fast_forward_start_bits(compiler_common *common, const sljit_u8 *start_bits)
+{
+DEFINE_COMPILER;
+struct sljit_label *start;
+struct sljit_jump *quit;
+struct sljit_jump *found = NULL;
+jump_list *matches = NULL;
+#if PCRE2_CODE_UNIT_WIDTH != 8
+struct sljit_jump *jump;
+#endif
+
+if (common->match_end_ptr != 0)
+ {
+ OP1(SLJIT_MOV, RETURN_ADDR, 0, STR_END, 0);
+ OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr);
+ }
+
+start = LABEL();
+quit = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+#ifdef SUPPORT_UNICODE
+if (common->utf)
+ OP1(SLJIT_MOV, TMP3, 0, TMP1, 0);
+#endif
+
+if (!check_class_ranges(common, start_bits, (start_bits[31] & 0x80) != 0, TRUE, &matches))
+ {
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ jump = CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, 255);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, 255);
+ JUMPHERE(jump);
+#endif
+ OP2(SLJIT_AND, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x7);
+ OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3);
+ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)start_bits);
+ OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0);
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
+ found = JUMP(SLJIT_NOT_ZERO);
+ }
+
+#ifdef SUPPORT_UNICODE
+if (common->utf)
+ OP1(SLJIT_MOV, TMP1, 0, TMP3, 0);
+#endif
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+#ifdef SUPPORT_UNICODE
+#if PCRE2_CODE_UNIT_WIDTH == 8
+if (common->utf)
+ {
+ CMPTO(SLJIT_LESS, TMP1, 0, SLJIT_IMM, 0xc0, start);
+ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ }
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+if (common->utf)
+ {
+ CMPTO(SLJIT_LESS, TMP1, 0, SLJIT_IMM, 0xd800, start);
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xd800);
+ OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ }
+#endif /* PCRE2_CODE_UNIT_WIDTH == [8|16] */
+#endif /* SUPPORT_UNICODE */
+JUMPTO(SLJIT_JUMP, start);
+if (found != NULL)
+ JUMPHERE(found);
+if (matches != NULL)
+ set_jumps(matches, LABEL());
+JUMPHERE(quit);
+
+if (common->match_end_ptr != 0)
+ OP1(SLJIT_MOV, STR_END, 0, RETURN_ADDR, 0);
+}
+
+static SLJIT_INLINE struct sljit_jump *search_requested_char(compiler_common *common, PCRE2_UCHAR req_char, BOOL caseless, BOOL has_firstchar)
+{
+DEFINE_COMPILER;
+struct sljit_label *loop;
+struct sljit_jump *toolong;
+struct sljit_jump *alreadyfound;
+struct sljit_jump *found;
+struct sljit_jump *foundoc = NULL;
+struct sljit_jump *notfound;
+sljit_u32 oc, bit;
+
+SLJIT_ASSERT(common->req_char_ptr != 0);
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), common->req_char_ptr);
+OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, REQ_CU_MAX);
+toolong = CMP(SLJIT_LESS, TMP1, 0, STR_END, 0);
+alreadyfound = CMP(SLJIT_LESS, STR_PTR, 0, TMP2, 0);
+
+if (has_firstchar)
+ OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+else
+ OP1(SLJIT_MOV, TMP1, 0, STR_PTR, 0);
+
+loop = LABEL();
+notfound = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, STR_END, 0);
+
+OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(TMP1), 0);
+oc = req_char;
+if (caseless)
+ {
+ oc = TABLE_GET(req_char, common->fcc, req_char);
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 8
+ if (req_char > 127 && common->utf)
+ oc = UCD_OTHERCASE(req_char);
+#endif
+ }
+if (req_char == oc)
+ found = CMP(SLJIT_EQUAL, TMP2, 0, SLJIT_IMM, req_char);
+else
+ {
+ bit = req_char ^ oc;
+ if (is_powerof2(bit))
+ {
+ OP2(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_IMM, bit);
+ found = CMP(SLJIT_EQUAL, TMP2, 0, SLJIT_IMM, req_char | bit);
+ }
+ else
+ {
+ found = CMP(SLJIT_EQUAL, TMP2, 0, SLJIT_IMM, req_char);
+ foundoc = CMP(SLJIT_EQUAL, TMP2, 0, SLJIT_IMM, oc);
+ }
+ }
+OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1));
+JUMPTO(SLJIT_JUMP, loop);
+
+JUMPHERE(found);
+if (foundoc)
+ JUMPHERE(foundoc);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->req_char_ptr, TMP1, 0);
+JUMPHERE(alreadyfound);
+JUMPHERE(toolong);
+return notfound;
+}
+
+static void do_revertframes(compiler_common *common)
+{
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+struct sljit_label *mainloop;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+OP1(SLJIT_MOV, TMP1, 0, STACK_TOP, 0);
+GET_LOCAL_BASE(TMP3, 0, 0);
+
+/* Drop frames until we reach STACK_TOP. */
+mainloop = LABEL();
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), 0);
+OP2(SLJIT_SUB | SLJIT_SET_S, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, 0);
+jump = JUMP(SLJIT_SIG_LESS_EQUAL);
+
+OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP3, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), 0, SLJIT_MEM1(TMP1), sizeof(sljit_sw));
+OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), sizeof(sljit_sw), SLJIT_MEM1(TMP1), 2 * sizeof(sljit_sw));
+OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 3 * sizeof(sljit_sw));
+JUMPTO(SLJIT_JUMP, mainloop);
+
+JUMPHERE(jump);
+jump = JUMP(SLJIT_SIG_LESS);
+/* End of dropping frames. */
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+
+JUMPHERE(jump);
+OP1(SLJIT_NEG, TMP2, 0, TMP2, 0);
+OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP3, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), 0, SLJIT_MEM1(TMP1), sizeof(sljit_sw));
+OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 2 * sizeof(sljit_sw));
+JUMPTO(SLJIT_JUMP, mainloop);
+}
+
+static void check_wordboundary(compiler_common *common)
+{
+DEFINE_COMPILER;
+struct sljit_jump *skipread;
+jump_list *skipread_list = NULL;
+#if PCRE2_CODE_UNIT_WIDTH != 8 || defined SUPPORT_UNICODE
+struct sljit_jump *jump;
+#endif
+
+SLJIT_COMPILE_ASSERT(ctype_word == 0x10, ctype_word_must_be_16);
+
+sljit_emit_fast_enter(compiler, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+/* Get type of the previous char, and put it to LOCALS1. */
+OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin));
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS1, SLJIT_IMM, 0);
+skipread = CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, TMP1, 0);
+skip_char_back(common);
+check_start_used_ptr(common);
+read_char(common);
+
+/* Testing char type. */
+#ifdef SUPPORT_UNICODE
+if (common->use_ucp)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 1);
+ jump = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_UNDERSCORE);
+ add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL));
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Ll);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_Lu - ucp_Ll);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_LESS_EQUAL);
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Nd - ucp_Ll);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_No - ucp_Nd);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_LESS_EQUAL);
+ JUMPHERE(jump);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS1, TMP2, 0);
+ }
+else
+#endif
+ {
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ jump = CMP(SLJIT_GREATER, TMP1, 0, SLJIT_IMM, 255);
+#elif defined SUPPORT_UNICODE
+ /* Here LOCALS1 has already been zeroed. */
+ jump = NULL;
+ if (common->utf)
+ jump = CMP(SLJIT_GREATER, TMP1, 0, SLJIT_IMM, 255);
+#endif /* PCRE2_CODE_UNIT_WIDTH == 8 */
+ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), common->ctypes);
+ OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 4 /* ctype_word */);
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS1, TMP1, 0);
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ JUMPHERE(jump);
+#elif defined SUPPORT_UNICODE
+ if (jump != NULL)
+ JUMPHERE(jump);
+#endif /* PCRE2_CODE_UNIT_WIDTH == 8 */
+ }
+JUMPHERE(skipread);
+
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 0);
+check_str_end(common, &skipread_list);
+peek_char(common, READ_CHAR_MAX);
+
+/* Testing char type. This is a code duplication. */
+#ifdef SUPPORT_UNICODE
+if (common->use_ucp)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 1);
+ jump = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_UNDERSCORE);
+ add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL));
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Ll);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_Lu - ucp_Ll);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_LESS_EQUAL);
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ucp_Nd - ucp_Ll);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ucp_No - ucp_Nd);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_LESS_EQUAL);
+ JUMPHERE(jump);
+ }
+else
+#endif
+ {
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ /* TMP2 may be destroyed by peek_char. */
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 0);
+ jump = CMP(SLJIT_GREATER, TMP1, 0, SLJIT_IMM, 255);
+#elif defined SUPPORT_UNICODE
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, 0);
+ jump = NULL;
+ if (common->utf)
+ jump = CMP(SLJIT_GREATER, TMP1, 0, SLJIT_IMM, 255);
+#endif
+ OP1(SLJIT_MOV_U8, TMP2, 0, SLJIT_MEM1(TMP1), common->ctypes);
+ OP2(SLJIT_LSHR, TMP2, 0, TMP2, 0, SLJIT_IMM, 4 /* ctype_word */);
+ OP2(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_IMM, 1);
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ JUMPHERE(jump);
+#elif defined SUPPORT_UNICODE
+ if (jump != NULL)
+ JUMPHERE(jump);
+#endif /* PCRE2_CODE_UNIT_WIDTH == 8 */
+ }
+set_jumps(skipread_list, LABEL());
+
+OP2(SLJIT_XOR | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_MEM1(SLJIT_SP), LOCALS1);
+sljit_emit_fast_return(compiler, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+}
+
+static BOOL check_class_ranges(compiler_common *common, const sljit_u8 *bits, BOOL nclass, BOOL invert, jump_list **backtracks)
+{
+/* May destroy TMP1. */
+DEFINE_COMPILER;
+int ranges[MAX_RANGE_SIZE];
+sljit_u8 bit, cbit, all;
+int i, byte, length = 0;
+
+bit = bits[0] & 0x1;
+/* All bits will be zero or one (since bit is zero or one). */
+all = -bit;
+
+for (i = 0; i < 256; )
+ {
+ byte = i >> 3;
+ if ((i & 0x7) == 0 && bits[byte] == all)
+ i += 8;
+ else
+ {
+ cbit = (bits[byte] >> (i & 0x7)) & 0x1;
+ if (cbit != bit)
+ {
+ if (length >= MAX_RANGE_SIZE)
+ return FALSE;
+ ranges[length] = i;
+ length++;
+ bit = cbit;
+ all = -cbit;
+ }
+ i++;
+ }
+ }
+
+if (((bit == 0) && nclass) || ((bit == 1) && !nclass))
+ {
+ if (length >= MAX_RANGE_SIZE)
+ return FALSE;
+ ranges[length] = 256;
+ length++;
+ }
+
+if (length < 0 || length > 4)
+ return FALSE;
+
+bit = bits[0] & 0x1;
+if (invert) bit ^= 0x1;
+
+/* No character is accepted. */
+if (length == 0 && bit == 0)
+ add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
+
+switch(length)
+ {
+ case 0:
+ /* When bit != 0, all characters are accepted. */
+ return TRUE;
+
+ case 1:
+ add_jump(compiler, backtracks, CMP(bit == 0 ? SLJIT_LESS : SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, ranges[0]));
+ return TRUE;
+
+ case 2:
+ if (ranges[0] + 1 != ranges[1])
+ {
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[0]);
+ add_jump(compiler, backtracks, CMP(bit != 0 ? SLJIT_LESS : SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, ranges[1] - ranges[0]));
+ }
+ else
+ add_jump(compiler, backtracks, CMP(bit != 0 ? SLJIT_EQUAL : SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, ranges[0]));
+ return TRUE;
+
+ case 3:
+ if (bit != 0)
+ {
+ add_jump(compiler, backtracks, CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, ranges[2]));
+ if (ranges[0] + 1 != ranges[1])
+ {
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[0]);
+ add_jump(compiler, backtracks, CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, ranges[1] - ranges[0]));
+ }
+ else
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, ranges[0]));
+ return TRUE;
+ }
+
+ add_jump(compiler, backtracks, CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, ranges[0]));
+ if (ranges[1] + 1 != ranges[2])
+ {
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[1]);
+ add_jump(compiler, backtracks, CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, ranges[2] - ranges[1]));
+ }
+ else
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, ranges[1]));
+ return TRUE;
+
+ case 4:
+ if ((ranges[1] - ranges[0]) == (ranges[3] - ranges[2])
+ && (ranges[0] | (ranges[2] - ranges[0])) == ranges[2]
+ && (ranges[1] & (ranges[2] - ranges[0])) == 0
+ && is_powerof2(ranges[2] - ranges[0]))
+ {
+ SLJIT_ASSERT((ranges[0] & (ranges[2] - ranges[0])) == 0 && (ranges[2] & ranges[3] & (ranges[2] - ranges[0])) != 0);
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[2] - ranges[0]);
+ if (ranges[2] + 1 != ranges[3])
+ {
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[2]);
+ add_jump(compiler, backtracks, CMP(bit != 0 ? SLJIT_LESS : SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, ranges[3] - ranges[2]));
+ }
+ else
+ add_jump(compiler, backtracks, CMP(bit != 0 ? SLJIT_EQUAL : SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, ranges[2]));
+ return TRUE;
+ }
+
+ if (bit != 0)
+ {
+ i = 0;
+ if (ranges[0] + 1 != ranges[1])
+ {
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[0]);
+ add_jump(compiler, backtracks, CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, ranges[1] - ranges[0]));
+ i = ranges[0];
+ }
+ else
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, ranges[0]));
+
+ if (ranges[2] + 1 != ranges[3])
+ {
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[2] - i);
+ add_jump(compiler, backtracks, CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, ranges[3] - ranges[2]));
+ }
+ else
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, ranges[2] - i));
+ return TRUE;
+ }
+
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[0]);
+ add_jump(compiler, backtracks, CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, ranges[3] - ranges[0]));
+ if (ranges[1] + 1 != ranges[2])
+ {
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, ranges[1] - ranges[0]);
+ add_jump(compiler, backtracks, CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, ranges[2] - ranges[1]));
+ }
+ else
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, ranges[1] - ranges[0]));
+ return TRUE;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ return FALSE;
+ }
+}
+
+static void check_anynewline(compiler_common *common)
+{
+/* Check whether TMP1 contains a newline character. TMP2 destroyed. */
+DEFINE_COMPILER;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+
+OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x0a);
+OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x0d - 0x0a);
+OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_LESS_EQUAL);
+OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x85 - 0x0a);
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
+#if PCRE2_CODE_UNIT_WIDTH == 8
+if (common->utf)
+ {
+#endif
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x1);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2029 - 0x0a);
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ }
+#endif
+#endif /* SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH == [16|32] */
+OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+static void check_hspace(compiler_common *common)
+{
+/* Check whether TMP1 contains a newline character. TMP2 destroyed. */
+DEFINE_COMPILER;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+
+OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x09);
+OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
+OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x20);
+OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xa0);
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
+#if PCRE2_CODE_UNIT_WIDTH == 8
+if (common->utf)
+ {
+#endif
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x1680);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x180e);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x2000);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x200A - 0x2000);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_LESS_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x202f - 0x2000);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x205f - 0x2000);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x3000 - 0x2000);
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ }
+#endif
+#endif /* SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH == [16|32] */
+OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+static void check_vspace(compiler_common *common)
+{
+/* Check whether TMP1 contains a newline character. TMP2 destroyed. */
+DEFINE_COMPILER;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+
+OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x0a);
+OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x0d - 0x0a);
+OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_LESS_EQUAL);
+OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x85 - 0x0a);
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
+#if PCRE2_CODE_UNIT_WIDTH == 8
+if (common->utf)
+ {
+#endif
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, 0x1);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2029 - 0x0a);
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ }
+#endif
+#endif /* SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH == [16|32] */
+OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+#define CHAR1 STR_END
+#define CHAR2 STACK_TOP
+
+static void do_casefulcmp(compiler_common *common)
+{
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+struct sljit_label *label;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+OP1(SLJIT_MOV, TMP3, 0, CHAR1, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, CHAR2, 0);
+OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1));
+OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+
+label = LABEL();
+OP1(MOVU_UCHAR, CHAR1, 0, SLJIT_MEM1(TMP1), IN_UCHARS(1));
+OP1(MOVU_UCHAR, CHAR2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+jump = CMP(SLJIT_NOT_EQUAL, CHAR1, 0, CHAR2, 0);
+OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_IMM, IN_UCHARS(1));
+JUMPTO(SLJIT_NOT_ZERO, label);
+
+JUMPHERE(jump);
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+OP1(SLJIT_MOV, CHAR1, 0, TMP3, 0);
+OP1(SLJIT_MOV, CHAR2, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+#define LCC_TABLE STACK_LIMIT
+
+static void do_caselesscmp(compiler_common *common)
+{
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+struct sljit_label *label;
+
+sljit_emit_fast_enter(compiler, RETURN_ADDR, 0);
+OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+
+OP1(SLJIT_MOV, TMP3, 0, LCC_TABLE, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, CHAR1, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS1, CHAR2, 0);
+OP1(SLJIT_MOV, LCC_TABLE, 0, SLJIT_IMM, common->lcc);
+OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, IN_UCHARS(1));
+OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+
+label = LABEL();
+OP1(MOVU_UCHAR, CHAR1, 0, SLJIT_MEM1(TMP1), IN_UCHARS(1));
+OP1(MOVU_UCHAR, CHAR2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+#if PCRE2_CODE_UNIT_WIDTH != 8
+jump = CMP(SLJIT_GREATER, CHAR1, 0, SLJIT_IMM, 255);
+#endif
+OP1(SLJIT_MOV_U8, CHAR1, 0, SLJIT_MEM2(LCC_TABLE, CHAR1), 0);
+#if PCRE2_CODE_UNIT_WIDTH != 8
+JUMPHERE(jump);
+jump = CMP(SLJIT_GREATER, CHAR2, 0, SLJIT_IMM, 255);
+#endif
+OP1(SLJIT_MOV_U8, CHAR2, 0, SLJIT_MEM2(LCC_TABLE, CHAR2), 0);
+#if PCRE2_CODE_UNIT_WIDTH != 8
+JUMPHERE(jump);
+#endif
+jump = CMP(SLJIT_NOT_EQUAL, CHAR1, 0, CHAR2, 0);
+OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_IMM, IN_UCHARS(1));
+JUMPTO(SLJIT_NOT_ZERO, label);
+
+JUMPHERE(jump);
+OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+OP1(SLJIT_MOV, LCC_TABLE, 0, TMP3, 0);
+OP1(SLJIT_MOV, CHAR1, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+OP1(SLJIT_MOV, CHAR2, 0, SLJIT_MEM1(SLJIT_SP), LOCALS1);
+sljit_emit_fast_return(compiler, RETURN_ADDR, 0);
+}
+
+#undef LCC_TABLE
+#undef CHAR1
+#undef CHAR2
+
+#if defined SUPPORT_UNICODE
+
+static PCRE2_SPTR SLJIT_CALL do_utf_caselesscmp(PCRE2_SPTR src1, jit_arguments *args, PCRE2_SPTR end1)
+{
+/* This function would be ineffective to do in JIT level. */
+sljit_u32 c1, c2;
+PCRE2_SPTR src2 = args->startchar_ptr;
+PCRE2_SPTR end2 = args->end;
+const ucd_record *ur;
+const sljit_u32 *pp;
+
+while (src1 < end1)
+ {
+ if (src2 >= end2)
+ return (PCRE2_SPTR)1;
+ GETCHARINC(c1, src1);
+ GETCHARINC(c2, src2);
+ ur = GET_UCD(c2);
+ if (c1 != c2 && c1 != c2 + ur->other_case)
+ {
+ pp = PRIV(ucd_caseless_sets) + ur->caseset;
+ for (;;)
+ {
+ if (c1 < *pp) return NULL;
+ if (c1 == *pp++) break;
+ }
+ }
+ }
+return src2;
+}
+
+#endif /* SUPPORT_UNICODE */
+
+static PCRE2_SPTR byte_sequence_compare(compiler_common *common, BOOL caseless, PCRE2_SPTR cc,
+ compare_context *context, jump_list **backtracks)
+{
+DEFINE_COMPILER;
+unsigned int othercasebit = 0;
+PCRE2_SPTR othercasechar = NULL;
+#ifdef SUPPORT_UNICODE
+int utflength;
+#endif
+
+if (caseless && char_has_othercase(common, cc))
+ {
+ othercasebit = char_get_othercase_bit(common, cc);
+ SLJIT_ASSERT(othercasebit);
+ /* Extracting bit difference info. */
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ othercasechar = cc + (othercasebit >> 8);
+ othercasebit &= 0xff;
+#elif PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
+ /* Note that this code only handles characters in the BMP. If there
+ ever are characters outside the BMP whose othercase differs in only one
+ bit from itself (there currently are none), this code will need to be
+ revised for PCRE2_CODE_UNIT_WIDTH == 32. */
+ othercasechar = cc + (othercasebit >> 9);
+ if ((othercasebit & 0x100) != 0)
+ othercasebit = (othercasebit & 0xff) << 8;
+ else
+ othercasebit &= 0xff;
+#endif /* PCRE2_CODE_UNIT_WIDTH == [8|16|32] */
+ }
+
+if (context->sourcereg == -1)
+ {
+#if PCRE2_CODE_UNIT_WIDTH == 8
+#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
+ if (context->length >= 4)
+ OP1(SLJIT_MOV_S32, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
+ else if (context->length >= 2)
+ OP1(SLJIT_MOV_U16, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
+ else
+#endif
+ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
+ if (context->length >= 4)
+ OP1(SLJIT_MOV_S32, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
+ else
+#endif
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
+#elif PCRE2_CODE_UNIT_WIDTH == 32
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
+#endif /* PCRE2_CODE_UNIT_WIDTH == [8|16|32] */
+ context->sourcereg = TMP2;
+ }
+
+#ifdef SUPPORT_UNICODE
+utflength = 1;
+if (common->utf && HAS_EXTRALEN(*cc))
+ utflength += GET_EXTRALEN(*cc);
+
+do
+ {
+#endif
+
+ context->length -= IN_UCHARS(1);
+#if (defined SLJIT_UNALIGNED && SLJIT_UNALIGNED) && (PCRE2_CODE_UNIT_WIDTH == 8 || PCRE2_CODE_UNIT_WIDTH == 16)
+
+ /* Unaligned read is supported. */
+ if (othercasebit != 0 && othercasechar == cc)
+ {
+ context->c.asuchars[context->ucharptr] = *cc | othercasebit;
+ context->oc.asuchars[context->ucharptr] = othercasebit;
+ }
+ else
+ {
+ context->c.asuchars[context->ucharptr] = *cc;
+ context->oc.asuchars[context->ucharptr] = 0;
+ }
+ context->ucharptr++;
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ if (context->ucharptr >= 4 || context->length == 0 || (context->ucharptr == 2 && context->length == 1))
+#else
+ if (context->ucharptr >= 2 || context->length == 0)
+#endif
+ {
+ if (context->length >= 4)
+ OP1(SLJIT_MOV_S32, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
+ else if (context->length >= 2)
+ OP1(SLJIT_MOV_U16, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ else if (context->length >= 1)
+ OP1(SLJIT_MOV_U8, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
+#endif /* PCRE2_CODE_UNIT_WIDTH == 8 */
+ context->sourcereg = context->sourcereg == TMP1 ? TMP2 : TMP1;
+
+ switch(context->ucharptr)
+ {
+ case 4 / sizeof(PCRE2_UCHAR):
+ if (context->oc.asint != 0)
+ OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, context->oc.asint);
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, context->c.asint | context->oc.asint));
+ break;
+
+ case 2 / sizeof(PCRE2_UCHAR):
+ if (context->oc.asushort != 0)
+ OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, context->oc.asushort);
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, context->c.asushort | context->oc.asushort));
+ break;
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ case 1:
+ if (context->oc.asbyte != 0)
+ OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, context->oc.asbyte);
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, context->c.asbyte | context->oc.asbyte));
+ break;
+#endif
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+ context->ucharptr = 0;
+ }
+
+#else
+
+ /* Unaligned read is unsupported or in 32 bit mode. */
+ if (context->length >= 1)
+ OP1(MOV_UCHAR, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
+
+ context->sourcereg = context->sourcereg == TMP1 ? TMP2 : TMP1;
+
+ if (othercasebit != 0 && othercasechar == cc)
+ {
+ OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, othercasebit);
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, *cc | othercasebit));
+ }
+ else
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, *cc));
+
+#endif
+
+ cc++;
+#ifdef SUPPORT_UNICODE
+ utflength--;
+ }
+while (utflength > 0);
+#endif
+
+return cc;
+}
+
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8
+
+#define SET_TYPE_OFFSET(value) \
+ if ((value) != typeoffset) \
+ { \
+ if ((value) < typeoffset) \
+ OP2(SLJIT_ADD, typereg, 0, typereg, 0, SLJIT_IMM, typeoffset - (value)); \
+ else \
+ OP2(SLJIT_SUB, typereg, 0, typereg, 0, SLJIT_IMM, (value) - typeoffset); \
+ } \
+ typeoffset = (value);
+
+#define SET_CHAR_OFFSET(value) \
+ if ((value) != charoffset) \
+ { \
+ if ((value) < charoffset) \
+ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(charoffset - (value))); \
+ else \
+ OP2(SLJIT_SUB, TMP1, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)((value) - charoffset)); \
+ } \
+ charoffset = (value);
+
+static PCRE2_SPTR compile_char1_matchingpath(compiler_common *common, PCRE2_UCHAR type, PCRE2_SPTR cc, jump_list **backtracks, BOOL check_str_ptr);
+
+static void compile_xclass_matchingpath(compiler_common *common, PCRE2_SPTR cc, jump_list **backtracks)
+{
+DEFINE_COMPILER;
+jump_list *found = NULL;
+jump_list **list = (cc[0] & XCL_NOT) == 0 ? &found : backtracks;
+sljit_uw c, charoffset, max = 256, min = READ_CHAR_MAX;
+struct sljit_jump *jump = NULL;
+PCRE2_SPTR ccbegin;
+int compares, invertcmp, numberofcmps;
+#if defined SUPPORT_UNICODE && (PCRE2_CODE_UNIT_WIDTH == 8 || PCRE2_CODE_UNIT_WIDTH == 16)
+BOOL utf = common->utf;
+#endif
+
+#ifdef SUPPORT_UNICODE
+BOOL needstype = FALSE, needsscript = FALSE, needschar = FALSE;
+BOOL charsaved = FALSE;
+int typereg = TMP1;
+const sljit_u32 *other_cases;
+sljit_uw typeoffset;
+#endif
+
+/* Scanning the necessary info. */
+cc++;
+ccbegin = cc;
+compares = 0;
+
+if (cc[-1] & XCL_MAP)
+ {
+ min = 0;
+ cc += 32 / sizeof(PCRE2_UCHAR);
+ }
+
+while (*cc != XCL_END)
+ {
+ compares++;
+ if (*cc == XCL_SINGLE)
+ {
+ cc ++;
+ GETCHARINCTEST(c, cc);
+ if (c > max) max = c;
+ if (c < min) min = c;
+#ifdef SUPPORT_UNICODE
+ needschar = TRUE;
+#endif
+ }
+ else if (*cc == XCL_RANGE)
+ {
+ cc ++;
+ GETCHARINCTEST(c, cc);
+ if (c < min) min = c;
+ GETCHARINCTEST(c, cc);
+ if (c > max) max = c;
+#ifdef SUPPORT_UNICODE
+ needschar = TRUE;
+#endif
+ }
+#ifdef SUPPORT_UNICODE
+ else
+ {
+ SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP);
+ cc++;
+ if (*cc == PT_CLIST)
+ {
+ other_cases = PRIV(ucd_caseless_sets) + cc[1];
+ while (*other_cases != NOTACHAR)
+ {
+ if (*other_cases > max) max = *other_cases;
+ if (*other_cases < min) min = *other_cases;
+ other_cases++;
+ }
+ }
+ else
+ {
+ max = READ_CHAR_MAX;
+ min = 0;
+ }
+
+ switch(*cc)
+ {
+ case PT_ANY:
+ /* Any either accepts everything or ignored. */
+ if (cc[-1] == XCL_PROP)
+ {
+ compile_char1_matchingpath(common, OP_ALLANY, cc, backtracks, FALSE);
+ if (list == backtracks)
+ add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
+ return;
+ }
+ break;
+
+ case PT_LAMP:
+ case PT_GC:
+ case PT_PC:
+ case PT_ALNUM:
+ needstype = TRUE;
+ break;
+
+ case PT_SC:
+ needsscript = TRUE;
+ break;
+
+ case PT_SPACE:
+ case PT_PXSPACE:
+ case PT_WORD:
+ case PT_PXGRAPH:
+ case PT_PXPRINT:
+ case PT_PXPUNCT:
+ needstype = TRUE;
+ needschar = TRUE;
+ break;
+
+ case PT_CLIST:
+ case PT_UCNC:
+ needschar = TRUE;
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+ cc += 2;
+ }
+#endif
+ }
+SLJIT_ASSERT(compares > 0);
+
+/* We are not necessary in utf mode even in 8 bit mode. */
+cc = ccbegin;
+read_char_range(common, min, max, (cc[-1] & XCL_NOT) != 0);
+
+if ((cc[-1] & XCL_HASPROP) == 0)
+ {
+ if ((cc[-1] & XCL_MAP) != 0)
+ {
+ jump = CMP(SLJIT_GREATER, TMP1, 0, SLJIT_IMM, 255);
+ if (!check_class_ranges(common, (const sljit_u8 *)cc, (((const sljit_u8 *)cc)[31] & 0x80) != 0, TRUE, &found))
+ {
+ OP2(SLJIT_AND, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x7);
+ OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3);
+ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)cc);
+ OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0);
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
+ add_jump(compiler, &found, JUMP(SLJIT_NOT_ZERO));
+ }
+
+ add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
+ JUMPHERE(jump);
+
+ cc += 32 / sizeof(PCRE2_UCHAR);
+ }
+ else
+ {
+ OP2(SLJIT_SUB, TMP2, 0, TMP1, 0, SLJIT_IMM, min);
+ add_jump(compiler, (cc[-1] & XCL_NOT) == 0 ? backtracks : &found, CMP(SLJIT_GREATER, TMP2, 0, SLJIT_IMM, max - min));
+ }
+ }
+else if ((cc[-1] & XCL_MAP) != 0)
+ {
+ OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP1, 0);
+#ifdef SUPPORT_UNICODE
+ charsaved = TRUE;
+#endif
+ if (!check_class_ranges(common, (const sljit_u8 *)cc, FALSE, TRUE, list))
+ {
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ jump = NULL;
+ if (common->utf)
+#endif
+ jump = CMP(SLJIT_GREATER, TMP1, 0, SLJIT_IMM, 255);
+
+ OP2(SLJIT_AND, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x7);
+ OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3);
+ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)cc);
+ OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0);
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
+ add_jump(compiler, list, JUMP(SLJIT_NOT_ZERO));
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ if (common->utf)
+#endif
+ JUMPHERE(jump);
+ }
+
+ OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0);
+ cc += 32 / sizeof(PCRE2_UCHAR);
+ }
+
+#ifdef SUPPORT_UNICODE
+if (needstype || needsscript)
+ {
+ if (needschar && !charsaved)
+ OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP1, 0);
+
+ OP2(SLJIT_LSHR, TMP2, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_SHIFT);
+ OP1(SLJIT_MOV_U8, TMP2, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_stage1));
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, UCD_BLOCK_MASK);
+ OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, UCD_BLOCK_SHIFT);
+ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_stage2));
+ OP1(SLJIT_MOV_U16, TMP2, 0, SLJIT_MEM2(TMP2, TMP1), 1);
+
+ /* Before anything else, we deal with scripts. */
+ if (needsscript)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, script));
+ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM2(TMP1, TMP2), 3);
+
+ ccbegin = cc;
+
+ while (*cc != XCL_END)
+ {
+ if (*cc == XCL_SINGLE)
+ {
+ cc ++;
+ GETCHARINCTEST(c, cc);
+ }
+ else if (*cc == XCL_RANGE)
+ {
+ cc ++;
+ GETCHARINCTEST(c, cc);
+ GETCHARINCTEST(c, cc);
+ }
+ else
+ {
+ SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP);
+ cc++;
+ if (*cc == PT_SC)
+ {
+ compares--;
+ invertcmp = (compares == 0 && list != backtracks);
+ if (cc[-1] == XCL_NOTPROP)
+ invertcmp ^= 0x1;
+ jump = CMP(SLJIT_EQUAL ^ invertcmp, TMP1, 0, SLJIT_IMM, (int)cc[1]);
+ add_jump(compiler, compares > 0 ? list : backtracks, jump);
+ }
+ cc += 2;
+ }
+ }
+
+ cc = ccbegin;
+ }
+
+ if (needschar)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0);
+ }
+
+ if (needstype)
+ {
+ if (!needschar)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype));
+ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM2(TMP1, TMP2), 3);
+ }
+ else
+ {
+ OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 3);
+ OP1(SLJIT_MOV_U8, RETURN_ADDR, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype));
+ typereg = RETURN_ADDR;
+ }
+ }
+ }
+#endif
+
+/* Generating code. */
+charoffset = 0;
+numberofcmps = 0;
+#ifdef SUPPORT_UNICODE
+typeoffset = 0;
+#endif
+
+while (*cc != XCL_END)
+ {
+ compares--;
+ invertcmp = (compares == 0 && list != backtracks);
+ jump = NULL;
+
+ if (*cc == XCL_SINGLE)
+ {
+ cc ++;
+ GETCHARINCTEST(c, cc);
+
+ if (numberofcmps < 3 && (*cc == XCL_SINGLE || *cc == XCL_RANGE))
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset));
+ OP_FLAGS(numberofcmps == 0 ? SLJIT_MOV : SLJIT_OR, TMP2, 0, numberofcmps == 0 ? SLJIT_UNUSED : TMP2, 0, SLJIT_EQUAL);
+ numberofcmps++;
+ }
+ else if (numberofcmps > 0)
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset));
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+ jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp);
+ numberofcmps = 0;
+ }
+ else
+ {
+ jump = CMP(SLJIT_EQUAL ^ invertcmp, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset));
+ numberofcmps = 0;
+ }
+ }
+ else if (*cc == XCL_RANGE)
+ {
+ cc ++;
+ GETCHARINCTEST(c, cc);
+ SET_CHAR_OFFSET(c);
+ GETCHARINCTEST(c, cc);
+
+ if (numberofcmps < 3 && (*cc == XCL_SINGLE || *cc == XCL_RANGE))
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset));
+ OP_FLAGS(numberofcmps == 0 ? SLJIT_MOV : SLJIT_OR, TMP2, 0, numberofcmps == 0 ? SLJIT_UNUSED : TMP2, 0, SLJIT_LESS_EQUAL);
+ numberofcmps++;
+ }
+ else if (numberofcmps > 0)
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset));
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_LESS_EQUAL);
+ jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp);
+ numberofcmps = 0;
+ }
+ else
+ {
+ jump = CMP(SLJIT_LESS_EQUAL ^ invertcmp, TMP1, 0, SLJIT_IMM, (sljit_sw)(c - charoffset));
+ numberofcmps = 0;
+ }
+ }
+#ifdef SUPPORT_UNICODE
+ else
+ {
+ SLJIT_ASSERT(*cc == XCL_PROP || *cc == XCL_NOTPROP);
+ if (*cc == XCL_NOTPROP)
+ invertcmp ^= 0x1;
+ cc++;
+ switch(*cc)
+ {
+ case PT_ANY:
+ if (!invertcmp)
+ jump = JUMP(SLJIT_JUMP);
+ break;
+
+ case PT_LAMP:
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Lu - typeoffset);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Ll - typeoffset);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Lt - typeoffset);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+ jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp);
+ break;
+
+ case PT_GC:
+ c = PRIV(ucp_typerange)[(int)cc[1] * 2];
+ SET_TYPE_OFFSET(c);
+ jump = CMP(SLJIT_LESS_EQUAL ^ invertcmp, typereg, 0, SLJIT_IMM, PRIV(ucp_typerange)[(int)cc[1] * 2 + 1] - c);
+ break;
+
+ case PT_PC:
+ jump = CMP(SLJIT_EQUAL ^ invertcmp, typereg, 0, SLJIT_IMM, (int)cc[1] - typeoffset);
+ break;
+
+ case PT_SC:
+ compares++;
+ /* Do nothing. */
+ break;
+
+ case PT_SPACE:
+ case PT_PXSPACE:
+ SET_CHAR_OFFSET(9);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xd - 0x9);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_LESS_EQUAL);
+
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x85 - 0x9);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x180e - 0x9);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+
+ SET_TYPE_OFFSET(ucp_Zl);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Zs - ucp_Zl);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_LESS_EQUAL);
+ jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp);
+ break;
+
+ case PT_WORD:
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_UNDERSCORE - charoffset));
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
+ /* Fall through. */
+
+ case PT_ALNUM:
+ SET_TYPE_OFFSET(ucp_Ll);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Lu - ucp_Ll);
+ OP_FLAGS((*cc == PT_ALNUM) ? SLJIT_MOV : SLJIT_OR, TMP2, 0, (*cc == PT_ALNUM) ? SLJIT_UNUSED : TMP2, 0, SLJIT_LESS_EQUAL);
+ SET_TYPE_OFFSET(ucp_Nd);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_No - ucp_Nd);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_LESS_EQUAL);
+ jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp);
+ break;
+
+ case PT_CLIST:
+ other_cases = PRIV(ucd_caseless_sets) + cc[1];
+
+ /* At least three characters are required.
+ Otherwise this case would be handled by the normal code path. */
+ SLJIT_ASSERT(other_cases[0] != NOTACHAR && other_cases[1] != NOTACHAR && other_cases[2] != NOTACHAR);
+ SLJIT_ASSERT(other_cases[0] < other_cases[1] && other_cases[1] < other_cases[2]);
+
+ /* Optimizing character pairs, if their difference is power of 2. */
+ if (is_powerof2(other_cases[1] ^ other_cases[0]))
+ {
+ if (charoffset == 0)
+ OP2(SLJIT_OR, TMP2, 0, TMP1, 0, SLJIT_IMM, other_cases[1] ^ other_cases[0]);
+ else
+ {
+ OP2(SLJIT_ADD, TMP2, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)charoffset);
+ OP2(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_IMM, other_cases[1] ^ other_cases[0]);
+ }
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, other_cases[1]);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
+ other_cases += 2;
+ }
+ else if (is_powerof2(other_cases[2] ^ other_cases[1]))
+ {
+ if (charoffset == 0)
+ OP2(SLJIT_OR, TMP2, 0, TMP1, 0, SLJIT_IMM, other_cases[2] ^ other_cases[1]);
+ else
+ {
+ OP2(SLJIT_ADD, TMP2, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)charoffset);
+ OP2(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_IMM, other_cases[1] ^ other_cases[0]);
+ }
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, other_cases[2]);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
+
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(other_cases[0] - charoffset));
+ OP_FLAGS(SLJIT_OR | ((other_cases[3] == NOTACHAR) ? SLJIT_SET_E : 0), TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+
+ other_cases += 3;
+ }
+ else
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(*other_cases++ - charoffset));
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
+ }
+
+ while (*other_cases != NOTACHAR)
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(*other_cases++ - charoffset));
+ OP_FLAGS(SLJIT_OR | ((*other_cases == NOTACHAR) ? SLJIT_SET_E : 0), TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+ }
+ jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp);
+ break;
+
+ case PT_UCNC:
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_DOLLAR_SIGN - charoffset));
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_COMMERCIAL_AT - charoffset));
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(CHAR_GRAVE_ACCENT - charoffset));
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+
+ SET_CHAR_OFFSET(0xa0);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (sljit_sw)(0xd7ff - charoffset));
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_LESS_EQUAL);
+ SET_CHAR_OFFSET(0);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xe000 - 0);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_GREATER_EQUAL);
+ jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp);
+ break;
+
+ case PT_PXGRAPH:
+ /* C and Z groups are the farthest two groups. */
+ SET_TYPE_OFFSET(ucp_Ll);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_So - ucp_Ll);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_GREATER);
+
+ jump = CMP(SLJIT_NOT_EQUAL, typereg, 0, SLJIT_IMM, ucp_Cf - ucp_Ll);
+
+ /* In case of ucp_Cf, we overwrite the result. */
+ SET_CHAR_OFFSET(0x2066);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2069 - 0x2066);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_LESS_EQUAL);
+
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x061c - 0x2066);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x180e - 0x2066);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+
+ JUMPHERE(jump);
+ jump = CMP(SLJIT_ZERO ^ invertcmp, TMP2, 0, SLJIT_IMM, 0);
+ break;
+
+ case PT_PXPRINT:
+ /* C and Z groups are the farthest two groups. */
+ SET_TYPE_OFFSET(ucp_Ll);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_So - ucp_Ll);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_GREATER);
+
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Zs - ucp_Ll);
+ OP_FLAGS(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_NOT_EQUAL);
+
+ jump = CMP(SLJIT_NOT_EQUAL, typereg, 0, SLJIT_IMM, ucp_Cf - ucp_Ll);
+
+ /* In case of ucp_Cf, we overwrite the result. */
+ SET_CHAR_OFFSET(0x2066);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2069 - 0x2066);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_LESS_EQUAL);
+
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x061c - 0x2066);
+ OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_EQUAL);
+
+ JUMPHERE(jump);
+ jump = CMP(SLJIT_ZERO ^ invertcmp, TMP2, 0, SLJIT_IMM, 0);
+ break;
+
+ case PT_PXPUNCT:
+ SET_TYPE_OFFSET(ucp_Sc);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_So - ucp_Sc);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_LESS_EQUAL);
+
+ SET_CHAR_OFFSET(0);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x7f);
+ OP_FLAGS(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_LESS_EQUAL);
+
+ SET_TYPE_OFFSET(ucp_Pc);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Ps - ucp_Pc);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_LESS_EQUAL);
+ jump = JUMP(SLJIT_NOT_ZERO ^ invertcmp);
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+ cc += 2;
+ }
+#endif
+
+ if (jump != NULL)
+ add_jump(compiler, compares > 0 ? list : backtracks, jump);
+ }
+
+if (found != NULL)
+ set_jumps(found, LABEL());
+}
+
+#undef SET_TYPE_OFFSET
+#undef SET_CHAR_OFFSET
+
+#endif
+
+static PCRE2_SPTR compile_simple_assertion_matchingpath(compiler_common *common, PCRE2_UCHAR type, PCRE2_SPTR cc, jump_list **backtracks)
+{
+DEFINE_COMPILER;
+int length;
+struct sljit_jump *jump[4];
+#ifdef SUPPORT_UNICODE
+struct sljit_label *label;
+#endif /* SUPPORT_UNICODE */
+
+switch(type)
+ {
+ case OP_SOD:
+ OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin));
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, STR_PTR, 0, TMP1, 0));
+ return cc;
+
+ case OP_SOM:
+ OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, STR_PTR, 0, TMP1, 0));
+ return cc;
+
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ add_jump(compiler, &common->wordboundary, JUMP(SLJIT_FAST_CALL));
+ add_jump(compiler, backtracks, JUMP(type == OP_NOT_WORD_BOUNDARY ? SLJIT_NOT_ZERO : SLJIT_ZERO));
+ return cc;
+
+ case OP_EODN:
+ /* Requires rather complex checks. */
+ jump[0] = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ if (common->nltype == NLTYPE_FIXED && common->newline > 255)
+ {
+ OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ if (common->mode == PCRE2_JIT_COMPLETE)
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP2, 0, STR_END, 0));
+ else
+ {
+ jump[1] = CMP(SLJIT_EQUAL, TMP2, 0, STR_END, 0);
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP2, 0, STR_END, 0);
+ OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_LESS);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff);
+ OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_NOT_EQUAL);
+ add_jump(compiler, backtracks, JUMP(SLJIT_NOT_EQUAL));
+ check_partial(common, TRUE);
+ add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
+ JUMPHERE(jump[1]);
+ }
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff));
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff));
+ }
+ else if (common->nltype == NLTYPE_FIXED)
+ {
+ OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP2, 0, STR_END, 0));
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, common->newline));
+ }
+ else
+ {
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ jump[1] = CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_CR);
+ OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
+ OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP2, 0, STR_END, 0);
+ jump[2] = JUMP(SLJIT_GREATER);
+ add_jump(compiler, backtracks, JUMP(SLJIT_LESS));
+ /* Equal. */
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+ jump[3] = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_NL);
+ add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
+
+ JUMPHERE(jump[1]);
+ if (common->nltype == NLTYPE_ANYCRLF)
+ {
+ OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ add_jump(compiler, backtracks, CMP(SLJIT_LESS, TMP2, 0, STR_END, 0));
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_NL));
+ }
+ else
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS1, STR_PTR, 0);
+ read_char_range(common, common->nlmin, common->nlmax, TRUE);
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, STR_PTR, 0, STR_END, 0));
+ add_jump(compiler, &common->anynewline, JUMP(SLJIT_FAST_CALL));
+ add_jump(compiler, backtracks, JUMP(SLJIT_ZERO));
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), LOCALS1);
+ }
+ JUMPHERE(jump[2]);
+ JUMPHERE(jump[3]);
+ }
+ JUMPHERE(jump[0]);
+ check_partial(common, FALSE);
+ return cc;
+
+ case OP_EOD:
+ add_jump(compiler, backtracks, CMP(SLJIT_LESS, STR_PTR, 0, STR_END, 0));
+ check_partial(common, FALSE);
+ return cc;
+
+ case OP_DOLL:
+ OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0);
+ OP2(SLJIT_AND32 | SLJIT_SET_E, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL);
+ add_jump(compiler, backtracks, JUMP(SLJIT_NOT_ZERO));
+
+ if (!common->endonly)
+ compile_simple_assertion_matchingpath(common, OP_EODN, cc, backtracks);
+ else
+ {
+ add_jump(compiler, backtracks, CMP(SLJIT_LESS, STR_PTR, 0, STR_END, 0));
+ check_partial(common, FALSE);
+ }
+ return cc;
+
+ case OP_DOLLM:
+ jump[1] = CMP(SLJIT_LESS, STR_PTR, 0, STR_END, 0);
+ OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0);
+ OP2(SLJIT_AND32 | SLJIT_SET_E, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTEOL);
+ add_jump(compiler, backtracks, JUMP(SLJIT_NOT_ZERO));
+ check_partial(common, FALSE);
+ jump[0] = JUMP(SLJIT_JUMP);
+ JUMPHERE(jump[1]);
+
+ if (common->nltype == NLTYPE_FIXED && common->newline > 255)
+ {
+ OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ if (common->mode == PCRE2_JIT_COMPLETE)
+ add_jump(compiler, backtracks, CMP(SLJIT_GREATER, TMP2, 0, STR_END, 0));
+ else
+ {
+ jump[1] = CMP(SLJIT_LESS_EQUAL, TMP2, 0, STR_END, 0);
+ /* STR_PTR = STR_END - IN_UCHARS(1) */
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff));
+ check_partial(common, TRUE);
+ add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
+ JUMPHERE(jump[1]);
+ }
+
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(1));
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff));
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff));
+ }
+ else
+ {
+ peek_char(common, common->nlmax);
+ check_newlinechar(common, common->nltype, backtracks, FALSE);
+ }
+ JUMPHERE(jump[0]);
+ return cc;
+
+ case OP_CIRC:
+ OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, begin));
+ add_jump(compiler, backtracks, CMP(SLJIT_GREATER, STR_PTR, 0, TMP1, 0));
+ OP2(SLJIT_AND32 | SLJIT_SET_E, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL);
+ add_jump(compiler, backtracks, JUMP(SLJIT_NOT_ZERO));
+ return cc;
+
+ case OP_CIRCM:
+ OP1(SLJIT_MOV, TMP2, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, begin));
+ jump[1] = CMP(SLJIT_GREATER, STR_PTR, 0, TMP1, 0);
+ OP2(SLJIT_AND32 | SLJIT_SET_E, SLJIT_UNUSED, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(jit_arguments, options), SLJIT_IMM, PCRE2_NOTBOL);
+ add_jump(compiler, backtracks, JUMP(SLJIT_NOT_ZERO));
+ jump[0] = JUMP(SLJIT_JUMP);
+ JUMPHERE(jump[1]);
+
+ if (!common->alt_circumflex)
+ add_jump(compiler, backtracks, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
+
+ if (common->nltype == NLTYPE_FIXED && common->newline > 255)
+ {
+ OP2(SLJIT_SUB, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(2));
+ add_jump(compiler, backtracks, CMP(SLJIT_LESS, TMP2, 0, TMP1, 0));
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-2));
+ OP1(MOV_UCHAR, TMP2, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-1));
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff));
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP2, 0, SLJIT_IMM, common->newline & 0xff));
+ }
+ else
+ {
+ skip_char_back(common);
+ read_char_range(common, common->nlmin, common->nlmax, TRUE);
+ check_newlinechar(common, common->nltype, backtracks, FALSE);
+ }
+ JUMPHERE(jump[0]);
+ return cc;
+
+ case OP_REVERSE:
+ length = GET(cc, 0);
+ if (length == 0)
+ return cc + LINK_SIZE;
+ OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+#ifdef SUPPORT_UNICODE
+ if (common->utf)
+ {
+ OP1(SLJIT_MOV, TMP3, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, length);
+ label = LABEL();
+ add_jump(compiler, backtracks, CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, TMP3, 0));
+ skip_char_back(common);
+ OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, label);
+ }
+ else
+#endif
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, begin));
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(length));
+ add_jump(compiler, backtracks, CMP(SLJIT_LESS, STR_PTR, 0, TMP1, 0));
+ }
+ check_start_used_ptr(common);
+ return cc + LINK_SIZE;
+ }
+SLJIT_ASSERT_STOP();
+return cc;
+}
+
+static PCRE2_SPTR compile_char1_matchingpath(compiler_common *common, PCRE2_UCHAR type, PCRE2_SPTR cc, jump_list **backtracks, BOOL check_str_ptr)
+{
+DEFINE_COMPILER;
+int length;
+unsigned int c, oc, bit;
+compare_context context;
+struct sljit_jump *jump[3];
+jump_list *end_list;
+#ifdef SUPPORT_UNICODE
+struct sljit_label *label;
+PCRE2_UCHAR propdata[5];
+#endif /* SUPPORT_UNICODE */
+
+switch(type)
+ {
+ case OP_NOT_DIGIT:
+ case OP_DIGIT:
+ /* Digits are usually 0-9, so it is worth to optimize them. */
+ if (check_str_ptr)
+ detect_partial_match(common, backtracks);
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+ if (common->utf && is_char7_bitset((const sljit_u8*)common->ctypes - cbit_length + cbit_digit, FALSE))
+ read_char7_type(common, type == OP_NOT_DIGIT);
+ else
+#endif
+ read_char8_type(common, type == OP_NOT_DIGIT);
+ /* Flip the starting bit in the negative case. */
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ctype_digit);
+ add_jump(compiler, backtracks, JUMP(type == OP_DIGIT ? SLJIT_ZERO : SLJIT_NOT_ZERO));
+ return cc;
+
+ case OP_NOT_WHITESPACE:
+ case OP_WHITESPACE:
+ if (check_str_ptr)
+ detect_partial_match(common, backtracks);
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+ if (common->utf && is_char7_bitset((const sljit_u8*)common->ctypes - cbit_length + cbit_space, FALSE))
+ read_char7_type(common, type == OP_NOT_WHITESPACE);
+ else
+#endif
+ read_char8_type(common, type == OP_NOT_WHITESPACE);
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ctype_space);
+ add_jump(compiler, backtracks, JUMP(type == OP_WHITESPACE ? SLJIT_ZERO : SLJIT_NOT_ZERO));
+ return cc;
+
+ case OP_NOT_WORDCHAR:
+ case OP_WORDCHAR:
+ if (check_str_ptr)
+ detect_partial_match(common, backtracks);
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+ if (common->utf && is_char7_bitset((const sljit_u8*)common->ctypes - cbit_length + cbit_word, FALSE))
+ read_char7_type(common, type == OP_NOT_WORDCHAR);
+ else
+#endif
+ read_char8_type(common, type == OP_NOT_WORDCHAR);
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, ctype_word);
+ add_jump(compiler, backtracks, JUMP(type == OP_WORDCHAR ? SLJIT_ZERO : SLJIT_NOT_ZERO));
+ return cc;
+
+ case OP_ANY:
+ if (check_str_ptr)
+ detect_partial_match(common, backtracks);
+ read_char_range(common, common->nlmin, common->nlmax, TRUE);
+ if (common->nltype == NLTYPE_FIXED && common->newline > 255)
+ {
+ jump[0] = CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, (common->newline >> 8) & 0xff);
+ end_list = NULL;
+ if (common->mode != PCRE2_JIT_PARTIAL_HARD)
+ add_jump(compiler, &end_list, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
+ else
+ check_str_end(common, &end_list);
+
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, common->newline & 0xff));
+ set_jumps(end_list, LABEL());
+ JUMPHERE(jump[0]);
+ }
+ else
+ check_newlinechar(common, common->nltype, backtracks, TRUE);
+ return cc;
+
+ case OP_ALLANY:
+ if (check_str_ptr)
+ detect_partial_match(common, backtracks);
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+ if (common->utf)
+ {
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+#if PCRE2_CODE_UNIT_WIDTH == 8 || PCRE2_CODE_UNIT_WIDTH == 16
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ jump[0] = CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, 0xc0);
+ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+ jump[0] = CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, 0xd800);
+ OP2(SLJIT_AND, TMP1, 0, TMP1, 0, SLJIT_IMM, 0xfc00);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xd800);
+ OP_FLAGS(SLJIT_MOV, TMP1, 0, SLJIT_UNUSED, 0, SLJIT_EQUAL);
+ OP2(SLJIT_SHL, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+#endif
+ JUMPHERE(jump[0]);
+#endif /* PCRE2_CODE_UNIT_WIDTH == [8|16] */
+ return cc;
+ }
+#endif
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ return cc;
+
+ case OP_ANYBYTE:
+ if (check_str_ptr)
+ detect_partial_match(common, backtracks);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ return cc;
+
+#ifdef SUPPORT_UNICODE
+ case OP_NOTPROP:
+ case OP_PROP:
+ propdata[0] = XCL_HASPROP;
+ propdata[1] = type == OP_NOTPROP ? XCL_NOTPROP : XCL_PROP;
+ propdata[2] = cc[0];
+ propdata[3] = cc[1];
+ propdata[4] = XCL_END;
+ if (check_str_ptr)
+ detect_partial_match(common, backtracks);
+ compile_xclass_matchingpath(common, propdata, backtracks);
+ return cc + 2;
+#endif
+
+ case OP_ANYNL:
+ if (check_str_ptr)
+ detect_partial_match(common, backtracks);
+ read_char_range(common, common->bsr_nlmin, common->bsr_nlmax, FALSE);
+ jump[0] = CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_CR);
+ /* We don't need to handle soft partial matching case. */
+ end_list = NULL;
+ if (common->mode != PCRE2_JIT_PARTIAL_HARD)
+ add_jump(compiler, &end_list, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));
+ else
+ check_str_end(common, &end_list);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+ jump[1] = CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, CHAR_NL);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ jump[2] = JUMP(SLJIT_JUMP);
+ JUMPHERE(jump[0]);
+ check_newlinechar(common, common->bsr_nltype, backtracks, FALSE);
+ set_jumps(end_list, LABEL());
+ JUMPHERE(jump[1]);
+ JUMPHERE(jump[2]);
+ return cc;
+
+ case OP_NOT_HSPACE:
+ case OP_HSPACE:
+ if (check_str_ptr)
+ detect_partial_match(common, backtracks);
+ read_char_range(common, 0x9, 0x3000, type == OP_NOT_HSPACE);
+ add_jump(compiler, &common->hspace, JUMP(SLJIT_FAST_CALL));
+ add_jump(compiler, backtracks, JUMP(type == OP_NOT_HSPACE ? SLJIT_NOT_ZERO : SLJIT_ZERO));
+ return cc;
+
+ case OP_NOT_VSPACE:
+ case OP_VSPACE:
+ if (check_str_ptr)
+ detect_partial_match(common, backtracks);
+ read_char_range(common, 0xa, 0x2029, type == OP_NOT_VSPACE);
+ add_jump(compiler, &common->vspace, JUMP(SLJIT_FAST_CALL));
+ add_jump(compiler, backtracks, JUMP(type == OP_NOT_VSPACE ? SLJIT_NOT_ZERO : SLJIT_ZERO));
+ return cc;
+
+#ifdef SUPPORT_UNICODE
+ case OP_EXTUNI:
+ if (check_str_ptr)
+ detect_partial_match(common, backtracks);
+ read_char(common);
+ add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL));
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, gbprop));
+ /* Optimize register allocation: use a real register. */
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, STACK_TOP, 0);
+ OP1(SLJIT_MOV_U8, STACK_TOP, 0, SLJIT_MEM2(TMP1, TMP2), 3);
+
+ label = LABEL();
+ jump[0] = CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0);
+ OP1(SLJIT_MOV, TMP3, 0, STR_PTR, 0);
+ read_char(common);
+ add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL));
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, gbprop));
+ OP1(SLJIT_MOV_U8, TMP2, 0, SLJIT_MEM2(TMP1, TMP2), 3);
+
+ OP2(SLJIT_SHL, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, 2);
+ OP1(SLJIT_MOV_U32, TMP1, 0, SLJIT_MEM1(STACK_TOP), (sljit_sw)PRIV(ucp_gbtable));
+ OP1(SLJIT_MOV, STACK_TOP, 0, TMP2, 0);
+ OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0);
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
+ JUMPTO(SLJIT_NOT_ZERO, label);
+
+ OP1(SLJIT_MOV, STR_PTR, 0, TMP3, 0);
+ JUMPHERE(jump[0]);
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+
+ if (common->mode == PCRE2_JIT_PARTIAL_HARD)
+ {
+ jump[0] = CMP(SLJIT_LESS, STR_PTR, 0, STR_END, 0);
+ /* Since we successfully read a char above, partial matching must occure. */
+ check_partial(common, TRUE);
+ JUMPHERE(jump[0]);
+ }
+ return cc;
+#endif
+
+ case OP_CHAR:
+ case OP_CHARI:
+ length = 1;
+#ifdef SUPPORT_UNICODE
+ if (common->utf && HAS_EXTRALEN(*cc)) length += GET_EXTRALEN(*cc);
+#endif
+ if (common->mode == PCRE2_JIT_COMPLETE && check_str_ptr
+ && (type == OP_CHAR || !char_has_othercase(common, cc) || char_get_othercase_bit(common, cc) != 0))
+ {
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(length));
+ add_jump(compiler, backtracks, CMP(SLJIT_GREATER, STR_PTR, 0, STR_END, 0));
+
+ context.length = IN_UCHARS(length);
+ context.sourcereg = -1;
+#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
+ context.ucharptr = 0;
+#endif
+ return byte_sequence_compare(common, type == OP_CHARI, cc, &context, backtracks);
+ }
+
+ if (check_str_ptr)
+ detect_partial_match(common, backtracks);
+#ifdef SUPPORT_UNICODE
+ if (common->utf)
+ {
+ GETCHAR(c, cc);
+ }
+ else
+#endif
+ c = *cc;
+
+ if (type == OP_CHAR || !char_has_othercase(common, cc))
+ {
+ read_char_range(common, c, c, FALSE);
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, c));
+ return cc + length;
+ }
+ oc = char_othercase(common, c);
+ read_char_range(common, c < oc ? c : oc, c > oc ? c : oc, FALSE);
+ bit = c ^ oc;
+ if (is_powerof2(bit))
+ {
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, bit);
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, c | bit));
+ return cc + length;
+ }
+ jump[0] = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, c);
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, oc));
+ JUMPHERE(jump[0]);
+ return cc + length;
+
+ case OP_NOT:
+ case OP_NOTI:
+ if (check_str_ptr)
+ detect_partial_match(common, backtracks);
+
+ length = 1;
+#ifdef SUPPORT_UNICODE
+ if (common->utf)
+ {
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ c = *cc;
+ if (c < 128)
+ {
+ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(STR_PTR), 0);
+ if (type == OP_NOT || !char_has_othercase(common, cc))
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, c));
+ else
+ {
+ /* Since UTF8 code page is fixed, we know that c is in [a-z] or [A-Z] range. */
+ OP2(SLJIT_OR, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x20);
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, TMP2, 0, SLJIT_IMM, c | 0x20));
+ }
+ /* Skip the variable-length character. */
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ jump[0] = CMP(SLJIT_LESS, TMP1, 0, SLJIT_IMM, 0xc0);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(utf8_table4) - 0xc0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP1, 0);
+ JUMPHERE(jump[0]);
+ return cc + 1;
+ }
+ else
+#endif /* PCRE2_CODE_UNIT_WIDTH == 8 */
+ {
+ GETCHARLEN(c, cc, length);
+ }
+ }
+ else
+#endif /* SUPPORT_UNICODE */
+ c = *cc;
+
+ if (type == OP_NOT || !char_has_othercase(common, cc))
+ {
+ read_char_range(common, c, c, TRUE);
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, c));
+ }
+ else
+ {
+ oc = char_othercase(common, c);
+ read_char_range(common, c < oc ? c : oc, c > oc ? c : oc, TRUE);
+ bit = c ^ oc;
+ if (is_powerof2(bit))
+ {
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, bit);
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, c | bit));
+ }
+ else
+ {
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, c));
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, oc));
+ }
+ }
+ return cc + length;
+
+ case OP_CLASS:
+ case OP_NCLASS:
+ if (check_str_ptr)
+ detect_partial_match(common, backtracks);
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+ bit = (common->utf && is_char7_bitset((const sljit_u8 *)cc, type == OP_NCLASS)) ? 127 : 255;
+ read_char_range(common, 0, bit, type == OP_NCLASS);
+#else
+ read_char_range(common, 0, 255, type == OP_NCLASS);
+#endif
+
+ if (check_class_ranges(common, (const sljit_u8 *)cc, type == OP_NCLASS, FALSE, backtracks))
+ return cc + 32 / sizeof(PCRE2_UCHAR);
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+ jump[0] = NULL;
+ if (common->utf)
+ {
+ jump[0] = CMP(SLJIT_GREATER, TMP1, 0, SLJIT_IMM, bit);
+ if (type == OP_CLASS)
+ {
+ add_jump(compiler, backtracks, jump[0]);
+ jump[0] = NULL;
+ }
+ }
+#elif PCRE2_CODE_UNIT_WIDTH != 8
+ jump[0] = CMP(SLJIT_GREATER, TMP1, 0, SLJIT_IMM, 255);
+ if (type == OP_CLASS)
+ {
+ add_jump(compiler, backtracks, jump[0]);
+ jump[0] = NULL;
+ }
+#endif /* SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8 */
+
+ OP2(SLJIT_AND, TMP2, 0, TMP1, 0, SLJIT_IMM, 0x7);
+ OP2(SLJIT_LSHR, TMP1, 0, TMP1, 0, SLJIT_IMM, 3);
+ OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)cc);
+ OP2(SLJIT_SHL, TMP2, 0, SLJIT_IMM, 1, TMP2, 0);
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP1, 0, TMP2, 0);
+ add_jump(compiler, backtracks, JUMP(SLJIT_ZERO));
+
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8
+ if (jump[0] != NULL)
+ JUMPHERE(jump[0]);
+#endif
+ return cc + 32 / sizeof(PCRE2_UCHAR);
+
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
+ case OP_XCLASS:
+ if (check_str_ptr)
+ detect_partial_match(common, backtracks);
+ compile_xclass_matchingpath(common, cc + LINK_SIZE, backtracks);
+ return cc + GET(cc, 0) - 1;
+#endif
+ }
+SLJIT_ASSERT_STOP();
+return cc;
+}
+
+static SLJIT_INLINE PCRE2_SPTR compile_charn_matchingpath(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, jump_list **backtracks)
+{
+/* This function consumes at least one input character. */
+/* To decrease the number of length checks, we try to concatenate the fixed length character sequences. */
+DEFINE_COMPILER;
+PCRE2_SPTR ccbegin = cc;
+compare_context context;
+int size;
+
+context.length = 0;
+do
+ {
+ if (cc >= ccend)
+ break;
+
+ if (*cc == OP_CHAR)
+ {
+ size = 1;
+#ifdef SUPPORT_UNICODE
+ if (common->utf && HAS_EXTRALEN(cc[1]))
+ size += GET_EXTRALEN(cc[1]);
+#endif
+ }
+ else if (*cc == OP_CHARI)
+ {
+ size = 1;
+#ifdef SUPPORT_UNICODE
+ if (common->utf)
+ {
+ if (char_has_othercase(common, cc + 1) && char_get_othercase_bit(common, cc + 1) == 0)
+ size = 0;
+ else if (HAS_EXTRALEN(cc[1]))
+ size += GET_EXTRALEN(cc[1]);
+ }
+ else
+#endif
+ if (char_has_othercase(common, cc + 1) && char_get_othercase_bit(common, cc + 1) == 0)
+ size = 0;
+ }
+ else
+ size = 0;
+
+ cc += 1 + size;
+ context.length += IN_UCHARS(size);
+ }
+while (size > 0 && context.length <= 128);
+
+cc = ccbegin;
+if (context.length > 0)
+ {
+ /* We have a fixed-length byte sequence. */
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, context.length);
+ add_jump(compiler, backtracks, CMP(SLJIT_GREATER, STR_PTR, 0, STR_END, 0));
+
+ context.sourcereg = -1;
+#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED
+ context.ucharptr = 0;
+#endif
+ do cc = byte_sequence_compare(common, *cc == OP_CHARI, cc + 1, &context, backtracks); while (context.length > 0);
+ return cc;
+ }
+
+/* A non-fixed length character will be checked if length == 0. */
+return compile_char1_matchingpath(common, *cc, cc + 1, backtracks, TRUE);
+}
+
+/* Forward definitions. */
+static void compile_matchingpath(compiler_common *, PCRE2_SPTR, PCRE2_SPTR, backtrack_common *);
+static void compile_backtrackingpath(compiler_common *, struct backtrack_common *);
+
+#define PUSH_BACKTRACK(size, ccstart, error) \
+ do \
+ { \
+ backtrack = sljit_alloc_memory(compiler, (size)); \
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler))) \
+ return error; \
+ memset(backtrack, 0, size); \
+ backtrack->prev = parent->top; \
+ backtrack->cc = (ccstart); \
+ parent->top = backtrack; \
+ } \
+ while (0)
+
+#define PUSH_BACKTRACK_NOVALUE(size, ccstart) \
+ do \
+ { \
+ backtrack = sljit_alloc_memory(compiler, (size)); \
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler))) \
+ return; \
+ memset(backtrack, 0, size); \
+ backtrack->prev = parent->top; \
+ backtrack->cc = (ccstart); \
+ parent->top = backtrack; \
+ } \
+ while (0)
+
+#define BACKTRACK_AS(type) ((type *)backtrack)
+
+static void compile_dnref_search(compiler_common *common, PCRE2_SPTR cc, jump_list **backtracks)
+{
+/* The OVECTOR offset goes to TMP2. */
+DEFINE_COMPILER;
+int count = GET2(cc, 1 + IMM2_SIZE);
+PCRE2_SPTR slot = common->name_table + GET2(cc, 1) * common->name_entry_size;
+unsigned int offset;
+jump_list *found = NULL;
+
+SLJIT_ASSERT(*cc == OP_DNREF || *cc == OP_DNREFI);
+
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(1));
+
+count--;
+while (count-- > 0)
+ {
+ offset = GET2(slot, 0) << 1;
+ GET_LOCAL_BASE(TMP2, 0, OVECTOR(offset));
+ add_jump(compiler, &found, CMP(SLJIT_NOT_EQUAL, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset), TMP1, 0));
+ slot += common->name_entry_size;
+ }
+
+offset = GET2(slot, 0) << 1;
+GET_LOCAL_BASE(TMP2, 0, OVECTOR(offset));
+if (backtracks != NULL && !common->unset_backref)
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset), TMP1, 0));
+
+set_jumps(found, LABEL());
+}
+
+static void compile_ref_matchingpath(compiler_common *common, PCRE2_SPTR cc, jump_list **backtracks, BOOL withchecks, BOOL emptyfail)
+{
+DEFINE_COMPILER;
+BOOL ref = (*cc == OP_REF || *cc == OP_REFI);
+int offset = 0;
+struct sljit_jump *jump = NULL;
+struct sljit_jump *partial;
+struct sljit_jump *nopartial;
+
+if (ref)
+ {
+ offset = GET2(cc, 1) << 1;
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset));
+ /* OVECTOR(1) contains the "string begin - 1" constant. */
+ if (withchecks && !common->unset_backref)
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(1)));
+ }
+else
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), 0);
+
+#if defined SUPPORT_UNICODE
+if (common->utf && *cc == OP_REFI)
+ {
+ SLJIT_ASSERT(TMP1 == SLJIT_R0 && STACK_TOP == SLJIT_R1 && TMP2 == SLJIT_R2);
+ if (ref)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1));
+ else
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw));
+
+ if (withchecks)
+ jump = CMP(SLJIT_EQUAL, TMP1, 0, TMP2, 0);
+
+ /* Needed to save important temporary registers. */
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, STACK_TOP, 0);
+ OP1(SLJIT_MOV, SLJIT_R1, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_R1), SLJIT_OFFSETOF(jit_arguments, startchar_ptr), STR_PTR, 0);
+ sljit_emit_ijump(compiler, SLJIT_CALL3, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_utf_caselesscmp));
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+ if (common->mode == PCRE2_JIT_COMPLETE)
+ add_jump(compiler, backtracks, CMP(SLJIT_LESS_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 1));
+ else
+ {
+ add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0));
+ nopartial = CMP(SLJIT_NOT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 1);
+ check_partial(common, FALSE);
+ add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
+ JUMPHERE(nopartial);
+ }
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_RETURN_REG, 0);
+ }
+else
+#endif /* SUPPORT_UNICODE */
+ {
+ if (ref)
+ OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1), TMP1, 0);
+ else
+ OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw), TMP1, 0);
+
+ if (withchecks)
+ jump = JUMP(SLJIT_ZERO);
+
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, TMP2, 0);
+ partial = CMP(SLJIT_GREATER, STR_PTR, 0, STR_END, 0);
+ if (common->mode == PCRE2_JIT_COMPLETE)
+ add_jump(compiler, backtracks, partial);
+
+ add_jump(compiler, *cc == OP_REF ? &common->casefulcmp : &common->caselesscmp, JUMP(SLJIT_FAST_CALL));
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
+
+ if (common->mode != PCRE2_JIT_COMPLETE)
+ {
+ nopartial = JUMP(SLJIT_JUMP);
+ JUMPHERE(partial);
+ /* TMP2 -= STR_END - STR_PTR */
+ OP2(SLJIT_SUB, TMP2, 0, TMP2, 0, STR_PTR, 0);
+ OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, STR_END, 0);
+ partial = CMP(SLJIT_EQUAL, TMP2, 0, SLJIT_IMM, 0);
+ OP1(SLJIT_MOV, STR_PTR, 0, STR_END, 0);
+ add_jump(compiler, *cc == OP_REF ? &common->casefulcmp : &common->caselesscmp, JUMP(SLJIT_FAST_CALL));
+ add_jump(compiler, backtracks, CMP(SLJIT_NOT_EQUAL, TMP2, 0, SLJIT_IMM, 0));
+ JUMPHERE(partial);
+ check_partial(common, FALSE);
+ add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));
+ JUMPHERE(nopartial);
+ }
+ }
+
+if (jump != NULL)
+ {
+ if (emptyfail)
+ add_jump(compiler, backtracks, jump);
+ else
+ JUMPHERE(jump);
+ }
+}
+
+static SLJIT_INLINE PCRE2_SPTR compile_ref_iterator_matchingpath(compiler_common *common, PCRE2_SPTR cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+BOOL ref = (*cc == OP_REF || *cc == OP_REFI);
+backtrack_common *backtrack;
+PCRE2_UCHAR type;
+int offset = 0;
+struct sljit_label *label;
+struct sljit_jump *zerolength;
+struct sljit_jump *jump = NULL;
+PCRE2_SPTR ccbegin = cc;
+int min = 0, max = 0;
+BOOL minimize;
+
+PUSH_BACKTRACK(sizeof(ref_iterator_backtrack), cc, NULL);
+
+if (ref)
+ offset = GET2(cc, 1) << 1;
+else
+ cc += IMM2_SIZE;
+type = cc[1 + IMM2_SIZE];
+
+SLJIT_COMPILE_ASSERT((OP_CRSTAR & 0x1) == 0, crstar_opcode_must_be_even);
+minimize = (type & 0x1) != 0;
+switch(type)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ min = 0;
+ max = 0;
+ cc += 1 + IMM2_SIZE + 1;
+ break;
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ min = 1;
+ max = 0;
+ cc += 1 + IMM2_SIZE + 1;
+ break;
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ min = 0;
+ max = 1;
+ cc += 1 + IMM2_SIZE + 1;
+ break;
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ min = GET2(cc, 1 + IMM2_SIZE + 1);
+ max = GET2(cc, 1 + IMM2_SIZE + 1 + IMM2_SIZE);
+ cc += 1 + IMM2_SIZE + 1 + 2 * IMM2_SIZE;
+ break;
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+
+if (!minimize)
+ {
+ if (min == 0)
+ {
+ allocate_stack(common, 2);
+ if (ref)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 0);
+ /* Temporary release of STR_PTR. */
+ OP2(SLJIT_SUB, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
+ /* Handles both invalid and empty cases. Since the minimum repeat,
+ is zero the invalid case is basically the same as an empty case. */
+ if (ref)
+ zerolength = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1));
+ else
+ {
+ compile_dnref_search(common, ccbegin, NULL);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), POSSESSIVE1, TMP2, 0);
+ zerolength = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw));
+ }
+ /* Restore if not zero length. */
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
+ }
+ else
+ {
+ allocate_stack(common, 1);
+ if (ref)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ if (ref)
+ {
+ add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(1)));
+ zerolength = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1));
+ }
+ else
+ {
+ compile_dnref_search(common, ccbegin, &backtrack->topbacktracks);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), POSSESSIVE1, TMP2, 0);
+ zerolength = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw));
+ }
+ }
+
+ if (min > 1 || max > 1)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), POSSESSIVE0, SLJIT_IMM, 0);
+
+ label = LABEL();
+ if (!ref)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), POSSESSIVE1);
+ compile_ref_matchingpath(common, ccbegin, &backtrack->topbacktracks, FALSE, FALSE);
+
+ if (min > 1 || max > 1)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), POSSESSIVE0);
+ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), POSSESSIVE0, TMP1, 0);
+ if (min > 1)
+ CMPTO(SLJIT_LESS, TMP1, 0, SLJIT_IMM, min, label);
+ if (max > 1)
+ {
+ jump = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, max);
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ JUMPTO(SLJIT_JUMP, label);
+ JUMPHERE(jump);
+ }
+ }
+
+ if (max == 0)
+ {
+ /* Includes min > 1 case as well. */
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ JUMPTO(SLJIT_JUMP, label);
+ }
+
+ JUMPHERE(zerolength);
+ BACKTRACK_AS(ref_iterator_backtrack)->matchingpath = LABEL();
+
+ count_match(common);
+ return cc;
+ }
+
+allocate_stack(common, ref ? 2 : 3);
+if (ref)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset));
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+if (type != OP_CRMINSTAR)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 0);
+
+if (min == 0)
+ {
+ /* Handles both invalid and empty cases. Since the minimum repeat,
+ is zero the invalid case is basically the same as an empty case. */
+ if (ref)
+ zerolength = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1));
+ else
+ {
+ compile_dnref_search(common, ccbegin, NULL);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), TMP2, 0);
+ zerolength = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw));
+ }
+ /* Length is non-zero, we can match real repeats. */
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ jump = JUMP(SLJIT_JUMP);
+ }
+else
+ {
+ if (ref)
+ {
+ add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(1)));
+ zerolength = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1));
+ }
+ else
+ {
+ compile_dnref_search(common, ccbegin, &backtrack->topbacktracks);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), TMP2, 0);
+ zerolength = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_MEM1(TMP2), sizeof(sljit_sw));
+ }
+ }
+
+BACKTRACK_AS(ref_iterator_backtrack)->matchingpath = LABEL();
+if (max > 0)
+ add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_GREATER_EQUAL, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, max));
+
+if (!ref)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(2));
+compile_ref_matchingpath(common, ccbegin, &backtrack->topbacktracks, TRUE, TRUE);
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+
+if (min > 1)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP1, 0);
+ CMPTO(SLJIT_LESS, TMP1, 0, SLJIT_IMM, min, BACKTRACK_AS(ref_iterator_backtrack)->matchingpath);
+ }
+else if (max > 0)
+ OP2(SLJIT_ADD, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 1);
+
+if (jump != NULL)
+ JUMPHERE(jump);
+JUMPHERE(zerolength);
+
+count_match(common);
+return cc;
+}
+
+static SLJIT_INLINE PCRE2_SPTR compile_recurse_matchingpath(compiler_common *common, PCRE2_SPTR cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+recurse_entry *entry = common->entries;
+recurse_entry *prev = NULL;
+sljit_sw start = GET(cc, 1);
+PCRE2_SPTR start_cc;
+BOOL needs_control_head;
+
+PUSH_BACKTRACK(sizeof(recurse_backtrack), cc, NULL);
+
+/* Inlining simple patterns. */
+if (get_framesize(common, common->start + start, NULL, TRUE, &needs_control_head) == no_stack)
+ {
+ start_cc = common->start + start;
+ compile_matchingpath(common, next_opcode(common, start_cc), bracketend(start_cc) - (1 + LINK_SIZE), backtrack);
+ BACKTRACK_AS(recurse_backtrack)->inlined_pattern = TRUE;
+ return cc + 1 + LINK_SIZE;
+ }
+
+while (entry != NULL)
+ {
+ if (entry->start == start)
+ break;
+ prev = entry;
+ entry = entry->next;
+ }
+
+if (entry == NULL)
+ {
+ entry = sljit_alloc_memory(compiler, sizeof(recurse_entry));
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return NULL;
+ entry->next = NULL;
+ entry->entry = NULL;
+ entry->calls = NULL;
+ entry->start = start;
+
+ if (prev != NULL)
+ prev->next = entry;
+ else
+ common->entries = entry;
+ }
+
+if (common->has_set_som && common->mark_ptr != 0)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(0));
+ allocate_stack(common, 2);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->mark_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP1, 0);
+ }
+else if (common->has_set_som || common->mark_ptr != 0)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), common->has_set_som ? (int)(OVECTOR(0)) : common->mark_ptr);
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+ }
+
+if (entry->entry == NULL)
+ add_jump(compiler, &entry->calls, JUMP(SLJIT_FAST_CALL));
+else
+ JUMPTO(SLJIT_FAST_CALL, entry->entry);
+/* Leave if the match is failed. */
+add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, 0));
+return cc + 1 + LINK_SIZE;
+}
+
+static int SLJIT_CALL do_callout(struct jit_arguments *arguments, pcre2_callout_block *callout_block, PCRE2_SPTR *jit_ovector)
+{
+PCRE2_SPTR begin = arguments->begin;
+PCRE2_SIZE *ovector = arguments->match_data->ovector;
+sljit_u32 oveccount = arguments->oveccount;
+sljit_u32 i;
+
+if (arguments->callout == NULL)
+ return 0;
+
+callout_block->version = 1;
+
+/* Offsets in subject. */
+callout_block->subject_length = arguments->end - arguments->begin;
+callout_block->start_match = (PCRE2_SPTR)callout_block->subject - arguments->begin;
+callout_block->current_position = (PCRE2_SPTR)callout_block->offset_vector - arguments->begin;
+callout_block->subject = begin;
+
+/* Convert and copy the JIT offset vector to the ovector array. */
+callout_block->capture_top = 0;
+callout_block->offset_vector = ovector;
+for (i = 2; i < oveccount; i += 2)
+ {
+ ovector[i] = jit_ovector[i] - begin;
+ ovector[i + 1] = jit_ovector[i + 1] - begin;
+ if (jit_ovector[i] >= begin)
+ callout_block->capture_top = i;
+ }
+
+callout_block->capture_top = (callout_block->capture_top >> 1) + 1;
+ovector[0] = PCRE2_UNSET;
+ovector[1] = PCRE2_UNSET;
+return (arguments->callout)(callout_block, arguments->callout_data);
+}
+
+/* Aligning to 8 byte. */
+#define CALLOUT_ARG_SIZE \
+ (((int)sizeof(pcre2_callout_block) + 7) & ~7)
+
+#define CALLOUT_ARG_OFFSET(arg) \
+ (-CALLOUT_ARG_SIZE + SLJIT_OFFSETOF(pcre2_callout_block, arg))
+
+static SLJIT_INLINE PCRE2_SPTR compile_callout_matchingpath(compiler_common *common, PCRE2_SPTR cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+sljit_s32 mov_opcode;
+unsigned int callout_length = (*cc == OP_CALLOUT)
+ ? PRIV(OP_lengths)[OP_CALLOUT] : GET(cc, 1 + 2 * LINK_SIZE);
+sljit_sw value1;
+sljit_sw value2;
+sljit_sw value3;
+
+PUSH_BACKTRACK(sizeof(backtrack_common), cc, NULL);
+
+allocate_stack(common, CALLOUT_ARG_SIZE / sizeof(sljit_sw));
+
+SLJIT_ASSERT(common->capture_last_ptr != 0);
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), common->capture_last_ptr);
+OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+value1 = (*cc == OP_CALLOUT) ? cc[1 + 2 * LINK_SIZE] : 0;
+OP1(SLJIT_MOV_U32, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(callout_number), SLJIT_IMM, value1);
+OP1(SLJIT_MOV_U32, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(capture_last), TMP2, 0);
+
+/* These pointer sized fields temporarly stores internal variables. */
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(0));
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(offset_vector), STR_PTR, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(subject), TMP2, 0);
+
+if (common->mark_ptr != 0)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, mark_ptr));
+mov_opcode = (sizeof(PCRE2_SIZE) == 4) ? SLJIT_MOV_U32 : SLJIT_MOV;
+OP1(mov_opcode, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(pattern_position), SLJIT_IMM, GET(cc, 1));
+OP1(mov_opcode, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(next_item_length), SLJIT_IMM, GET(cc, 1 + LINK_SIZE));
+
+if (*cc == OP_CALLOUT)
+ {
+ value1 = 0;
+ value2 = 0;
+ value3 = 0;
+ }
+else
+ {
+ value1 = (sljit_sw) (cc + (1 + 4*LINK_SIZE) + 1);
+ value2 = (callout_length - (1 + 4*LINK_SIZE + 2));
+ value3 = (sljit_sw) (GET(cc, 1 + 3*LINK_SIZE));
+ }
+
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(callout_string), SLJIT_IMM, value1);
+OP1(mov_opcode, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(callout_string_length), SLJIT_IMM, value2);
+OP1(mov_opcode, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(callout_string_offset), SLJIT_IMM, value3);
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), CALLOUT_ARG_OFFSET(mark), (common->mark_ptr != 0) ? TMP2 : SLJIT_IMM, 0);
+
+/* Needed to save important temporary registers. */
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, STACK_TOP, 0);
+OP2(SLJIT_SUB, SLJIT_R1, 0, STACK_TOP, 0, SLJIT_IMM, CALLOUT_ARG_SIZE);
+GET_LOCAL_BASE(SLJIT_R2, 0, OVECTOR_START);
+sljit_emit_ijump(compiler, SLJIT_CALL3, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_callout));
+OP1(SLJIT_MOV_S32, SLJIT_RETURN_REG, 0, SLJIT_RETURN_REG, 0);
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+free_stack(common, CALLOUT_ARG_SIZE / sizeof(sljit_sw));
+
+/* Check return value. */
+OP2(SLJIT_SUB | SLJIT_SET_S, SLJIT_UNUSED, 0, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0);
+add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_SIG_GREATER));
+if (common->forced_quit_label == NULL)
+ add_jump(compiler, &common->forced_quit, JUMP(SLJIT_SIG_LESS));
+else
+ JUMPTO(SLJIT_SIG_LESS, common->forced_quit_label);
+return cc + callout_length;
+}
+
+#undef CALLOUT_ARG_SIZE
+#undef CALLOUT_ARG_OFFSET
+
+static SLJIT_INLINE BOOL assert_needs_str_ptr_saving(PCRE2_SPTR cc)
+{
+while (TRUE)
+ {
+ switch (*cc)
+ {
+ case OP_CALLOUT_STR:
+ cc += GET(cc, 1 + 2*LINK_SIZE);
+ break;
+
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_DOLL:
+ case OP_DOLLM:
+ case OP_CALLOUT:
+ case OP_ALT:
+ cc += PRIV(OP_lengths)[*cc];
+ break;
+
+ case OP_KET:
+ return FALSE;
+
+ default:
+ return TRUE;
+ }
+ }
+}
+
+static PCRE2_SPTR compile_assert_matchingpath(compiler_common *common, PCRE2_SPTR cc, assert_backtrack *backtrack, BOOL conditional)
+{
+DEFINE_COMPILER;
+int framesize;
+int extrasize;
+BOOL needs_control_head;
+int private_data_ptr;
+backtrack_common altbacktrack;
+PCRE2_SPTR ccbegin;
+PCRE2_UCHAR opcode;
+PCRE2_UCHAR bra = OP_BRA;
+jump_list *tmp = NULL;
+jump_list **target = (conditional) ? &backtrack->condfailed : &backtrack->common.topbacktracks;
+jump_list **found;
+/* Saving previous accept variables. */
+BOOL save_local_exit = common->local_exit;
+BOOL save_positive_assert = common->positive_assert;
+then_trap_backtrack *save_then_trap = common->then_trap;
+struct sljit_label *save_quit_label = common->quit_label;
+struct sljit_label *save_accept_label = common->accept_label;
+jump_list *save_quit = common->quit;
+jump_list *save_positive_assert_quit = common->positive_assert_quit;
+jump_list *save_accept = common->accept;
+struct sljit_jump *jump;
+struct sljit_jump *brajump = NULL;
+
+/* Assert captures then. */
+common->then_trap = NULL;
+
+if (*cc == OP_BRAZERO || *cc == OP_BRAMINZERO)
+ {
+ SLJIT_ASSERT(!conditional);
+ bra = *cc;
+ cc++;
+ }
+private_data_ptr = PRIVATE_DATA(cc);
+SLJIT_ASSERT(private_data_ptr != 0);
+framesize = get_framesize(common, cc, NULL, FALSE, &needs_control_head);
+backtrack->framesize = framesize;
+backtrack->private_data_ptr = private_data_ptr;
+opcode = *cc;
+SLJIT_ASSERT(opcode >= OP_ASSERT && opcode <= OP_ASSERTBACK_NOT);
+found = (opcode == OP_ASSERT || opcode == OP_ASSERTBACK) ? &tmp : target;
+ccbegin = cc;
+cc += GET(cc, 1);
+
+if (bra == OP_BRAMINZERO)
+ {
+ /* This is a braminzero backtrack path. */
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ brajump = CMP(SLJIT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
+ }
+
+if (framesize < 0)
+ {
+ extrasize = 1;
+ if (bra == OP_BRA && !assert_needs_str_ptr_saving(ccbegin + 1 + LINK_SIZE))
+ extrasize = 0;
+
+ if (needs_control_head)
+ extrasize++;
+
+ if (framesize == no_frame)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, STACK_TOP, 0);
+
+ if (extrasize > 0)
+ allocate_stack(common, extrasize);
+
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr);
+
+ if (extrasize > 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+
+ if (needs_control_head)
+ {
+ SLJIT_ASSERT(extrasize == 2);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_IMM, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP1, 0);
+ }
+ }
+else
+ {
+ extrasize = needs_control_head ? 3 : 2;
+ allocate_stack(common, framesize + extrasize);
+
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ OP2(SLJIT_SUB, TMP2, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + extrasize) * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, TMP2, 0);
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+
+ if (needs_control_head)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), TMP1, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_IMM, 0);
+ }
+ else
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP1, 0);
+
+ init_frame(common, ccbegin, NULL, framesize + extrasize - 1, extrasize, FALSE);
+ }
+
+memset(&altbacktrack, 0, sizeof(backtrack_common));
+if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
+ {
+ /* Negative assert is stronger than positive assert. */
+ common->local_exit = TRUE;
+ common->quit_label = NULL;
+ common->quit = NULL;
+ common->positive_assert = FALSE;
+ }
+else
+ common->positive_assert = TRUE;
+common->positive_assert_quit = NULL;
+
+while (1)
+ {
+ common->accept_label = NULL;
+ common->accept = NULL;
+ altbacktrack.top = NULL;
+ altbacktrack.topbacktracks = NULL;
+
+ if (*ccbegin == OP_ALT && extrasize > 0)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+
+ altbacktrack.cc = ccbegin;
+ compile_matchingpath(common, ccbegin + 1 + LINK_SIZE, cc, &altbacktrack);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ {
+ if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
+ {
+ common->local_exit = save_local_exit;
+ common->quit_label = save_quit_label;
+ common->quit = save_quit;
+ }
+ common->positive_assert = save_positive_assert;
+ common->then_trap = save_then_trap;
+ common->accept_label = save_accept_label;
+ common->positive_assert_quit = save_positive_assert_quit;
+ common->accept = save_accept;
+ return NULL;
+ }
+ common->accept_label = LABEL();
+ if (common->accept != NULL)
+ set_jumps(common->accept, common->accept_label);
+
+ /* Reset stack. */
+ if (framesize < 0)
+ {
+ if (framesize == no_frame)
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ else if (extrasize > 0)
+ free_stack(common, extrasize);
+
+ if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), 0);
+ }
+ else
+ {
+ if ((opcode != OP_ASSERT_NOT && opcode != OP_ASSERTBACK_NOT) || conditional)
+ {
+ /* We don't need to keep the STR_PTR, only the previous private_data_ptr. */
+ OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr, SLJIT_IMM, (framesize + 1) * sizeof(sljit_sw));
+ if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), 0);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), (framesize + 1) * sizeof(sljit_sw));
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ }
+ }
+
+ if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
+ {
+ /* We know that STR_PTR was stored on the top of the stack. */
+ if (conditional)
+ {
+ if (extrasize > 0)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), needs_control_head ? sizeof(sljit_sw) : 0);
+ }
+ else if (bra == OP_BRAZERO)
+ {
+ if (framesize < 0)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), (extrasize - 1) * sizeof(sljit_sw));
+ else
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), framesize * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), (framesize + extrasize - 1) * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, TMP1, 0);
+ }
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ else if (framesize >= 0)
+ {
+ /* For OP_BRA and OP_BRAMINZERO. */
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, SLJIT_MEM1(STACK_TOP), framesize * sizeof(sljit_sw));
+ }
+ }
+ add_jump(compiler, found, JUMP(SLJIT_JUMP));
+
+ compile_backtrackingpath(common, altbacktrack.top);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ {
+ if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
+ {
+ common->local_exit = save_local_exit;
+ common->quit_label = save_quit_label;
+ common->quit = save_quit;
+ }
+ common->positive_assert = save_positive_assert;
+ common->then_trap = save_then_trap;
+ common->accept_label = save_accept_label;
+ common->positive_assert_quit = save_positive_assert_quit;
+ common->accept = save_accept;
+ return NULL;
+ }
+ set_jumps(altbacktrack.topbacktracks, LABEL());
+
+ if (*cc != OP_ALT)
+ break;
+
+ ccbegin = cc;
+ cc += GET(cc, 1);
+ }
+
+if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
+ {
+ SLJIT_ASSERT(common->positive_assert_quit == NULL);
+ /* Makes the check less complicated below. */
+ common->positive_assert_quit = common->quit;
+ }
+
+/* None of them matched. */
+if (common->positive_assert_quit != NULL)
+ {
+ jump = JUMP(SLJIT_JUMP);
+ set_jumps(common->positive_assert_quit, LABEL());
+ SLJIT_ASSERT(framesize != no_stack);
+ if (framesize < 0)
+ OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr, SLJIT_IMM, extrasize * sizeof(sljit_sw));
+ else
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + extrasize) * sizeof(sljit_sw));
+ }
+ JUMPHERE(jump);
+ }
+
+if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), STACK(1));
+
+if (opcode == OP_ASSERT || opcode == OP_ASSERTBACK)
+ {
+ /* Assert is failed. */
+ if ((conditional && extrasize > 0) || bra == OP_BRAZERO)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+
+ if (framesize < 0)
+ {
+ /* The topmost item should be 0. */
+ if (bra == OP_BRAZERO)
+ {
+ if (extrasize == 2)
+ free_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ else if (extrasize > 0)
+ free_stack(common, extrasize);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(extrasize - 1));
+ /* The topmost item should be 0. */
+ if (bra == OP_BRAZERO)
+ {
+ free_stack(common, framesize + extrasize - 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ else
+ free_stack(common, framesize + extrasize);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, TMP1, 0);
+ }
+ jump = JUMP(SLJIT_JUMP);
+ if (bra != OP_BRAZERO)
+ add_jump(compiler, target, jump);
+
+ /* Assert is successful. */
+ set_jumps(tmp, LABEL());
+ if (framesize < 0)
+ {
+ /* We know that STR_PTR was stored on the top of the stack. */
+ if (extrasize > 0)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), (extrasize - 1) * sizeof(sljit_sw));
+
+ /* Keep the STR_PTR on the top of the stack. */
+ if (bra == OP_BRAZERO)
+ {
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
+ if (extrasize == 2)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ }
+ else if (bra == OP_BRAMINZERO)
+ {
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ }
+ else
+ {
+ if (bra == OP_BRA)
+ {
+ /* We don't need to keep the STR_PTR, only the previous private_data_ptr. */
+ OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr, SLJIT_IMM, (framesize + 1) * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), (extrasize - 2) * sizeof(sljit_sw));
+ }
+ else
+ {
+ /* We don't need to keep the STR_PTR, only the previous private_data_ptr. */
+ OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr, SLJIT_IMM, (framesize + 2) * sizeof(sljit_sw));
+ if (extrasize == 2)
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ if (bra == OP_BRAMINZERO)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), bra == OP_BRAZERO ? STR_PTR : SLJIT_IMM, 0);
+ }
+ }
+ }
+
+ if (bra == OP_BRAZERO)
+ {
+ backtrack->matchingpath = LABEL();
+ SET_LABEL(jump, backtrack->matchingpath);
+ }
+ else if (bra == OP_BRAMINZERO)
+ {
+ JUMPTO(SLJIT_JUMP, backtrack->matchingpath);
+ JUMPHERE(brajump);
+ if (framesize >= 0)
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, SLJIT_MEM1(STACK_TOP), framesize * sizeof(sljit_sw));
+ }
+ set_jumps(backtrack->common.topbacktracks, LABEL());
+ }
+ }
+else
+ {
+ /* AssertNot is successful. */
+ if (framesize < 0)
+ {
+ if (extrasize > 0)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+
+ if (bra != OP_BRA)
+ {
+ if (extrasize == 2)
+ free_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ else if (extrasize > 0)
+ free_stack(common, extrasize);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(extrasize - 1));
+ /* The topmost item should be 0. */
+ if (bra != OP_BRA)
+ {
+ free_stack(common, framesize + extrasize - 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ else
+ free_stack(common, framesize + extrasize);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, TMP1, 0);
+ }
+
+ if (bra == OP_BRAZERO)
+ backtrack->matchingpath = LABEL();
+ else if (bra == OP_BRAMINZERO)
+ {
+ JUMPTO(SLJIT_JUMP, backtrack->matchingpath);
+ JUMPHERE(brajump);
+ }
+
+ if (bra != OP_BRA)
+ {
+ SLJIT_ASSERT(found == &backtrack->common.topbacktracks);
+ set_jumps(backtrack->common.topbacktracks, LABEL());
+ backtrack->common.topbacktracks = NULL;
+ }
+ }
+
+if (opcode == OP_ASSERT_NOT || opcode == OP_ASSERTBACK_NOT)
+ {
+ common->local_exit = save_local_exit;
+ common->quit_label = save_quit_label;
+ common->quit = save_quit;
+ }
+common->positive_assert = save_positive_assert;
+common->then_trap = save_then_trap;
+common->accept_label = save_accept_label;
+common->positive_assert_quit = save_positive_assert_quit;
+common->accept = save_accept;
+return cc + 1 + LINK_SIZE;
+}
+
+static SLJIT_INLINE void match_once_common(compiler_common *common, PCRE2_UCHAR ket, int framesize, int private_data_ptr, BOOL has_alternatives, BOOL needs_control_head)
+{
+DEFINE_COMPILER;
+int stacksize;
+
+if (framesize < 0)
+ {
+ if (framesize == no_frame)
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ else
+ {
+ stacksize = needs_control_head ? 1 : 0;
+ if (ket != OP_KET || has_alternatives)
+ stacksize++;
+
+ if (stacksize > 0)
+ free_stack(common, stacksize);
+ }
+
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), (ket != OP_KET || has_alternatives) ? sizeof(sljit_sw) : 0);
+
+ /* TMP2 which is set here used by OP_KETRMAX below. */
+ if (ket == OP_KETRMAX)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), 0);
+ else if (ket == OP_KETRMIN)
+ {
+ /* Move the STR_PTR to the private_data_ptr. */
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, SLJIT_MEM1(STACK_TOP), 0);
+ }
+ }
+else
+ {
+ stacksize = (ket != OP_KET || has_alternatives) ? 2 : 1;
+ OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr, SLJIT_IMM, (framesize + stacksize) * sizeof(sljit_sw));
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), 0);
+
+ if (ket == OP_KETRMAX)
+ {
+ /* TMP2 which is set here used by OP_KETRMAX below. */
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ }
+ }
+if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, TMP1, 0);
+}
+
+static SLJIT_INLINE int match_capture_common(compiler_common *common, int stacksize, int offset, int private_data_ptr)
+{
+DEFINE_COMPILER;
+
+if (common->capture_last_ptr != 0)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->capture_last_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->capture_last_ptr, SLJIT_IMM, offset >> 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
+ stacksize++;
+ }
+if (common->optimized_cbracket[offset >> 1] == 0)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize + 1), TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset), TMP1, 0);
+ stacksize += 2;
+ }
+return stacksize;
+}
+
+/*
+ Handling bracketed expressions is probably the most complex part.
+
+ Stack layout naming characters:
+ S - Push the current STR_PTR
+ 0 - Push a 0 (NULL)
+ A - Push the current STR_PTR. Needed for restoring the STR_PTR
+ before the next alternative. Not pushed if there are no alternatives.
+ M - Any values pushed by the current alternative. Can be empty, or anything.
+ C - Push the previous OVECTOR(i), OVECTOR(i+1) and OVECTOR_PRIV(i) to the stack.
+ L - Push the previous local (pointed by localptr) to the stack
+ () - opional values stored on the stack
+ ()* - optonal, can be stored multiple times
+
+ The following list shows the regular expression templates, their PCRE byte codes
+ and stack layout supported by pcre-sljit.
+
+ (?:) OP_BRA | OP_KET A M
+ () OP_CBRA | OP_KET C M
+ (?:)+ OP_BRA | OP_KETRMAX 0 A M S ( A M S )*
+ OP_SBRA | OP_KETRMAX 0 L M S ( L M S )*
+ (?:)+? OP_BRA | OP_KETRMIN 0 A M S ( A M S )*
+ OP_SBRA | OP_KETRMIN 0 L M S ( L M S )*
+ ()+ OP_CBRA | OP_KETRMAX 0 C M S ( C M S )*
+ OP_SCBRA | OP_KETRMAX 0 C M S ( C M S )*
+ ()+? OP_CBRA | OP_KETRMIN 0 C M S ( C M S )*
+ OP_SCBRA | OP_KETRMIN 0 C M S ( C M S )*
+ (?:)? OP_BRAZERO | OP_BRA | OP_KET S ( A M 0 )
+ (?:)?? OP_BRAMINZERO | OP_BRA | OP_KET S ( A M 0 )
+ ()? OP_BRAZERO | OP_CBRA | OP_KET S ( C M 0 )
+ ()?? OP_BRAMINZERO | OP_CBRA | OP_KET S ( C M 0 )
+ (?:)* OP_BRAZERO | OP_BRA | OP_KETRMAX S 0 ( A M S )*
+ OP_BRAZERO | OP_SBRA | OP_KETRMAX S 0 ( L M S )*
+ (?:)*? OP_BRAMINZERO | OP_BRA | OP_KETRMIN S 0 ( A M S )*
+ OP_BRAMINZERO | OP_SBRA | OP_KETRMIN S 0 ( L M S )*
+ ()* OP_BRAZERO | OP_CBRA | OP_KETRMAX S 0 ( C M S )*
+ OP_BRAZERO | OP_SCBRA | OP_KETRMAX S 0 ( C M S )*
+ ()*? OP_BRAMINZERO | OP_CBRA | OP_KETRMIN S 0 ( C M S )*
+ OP_BRAMINZERO | OP_SCBRA | OP_KETRMIN S 0 ( C M S )*
+
+
+ Stack layout naming characters:
+ A - Push the alternative index (starting from 0) on the stack.
+ Not pushed if there is no alternatives.
+ M - Any values pushed by the current alternative. Can be empty, or anything.
+
+ The next list shows the possible content of a bracket:
+ (|) OP_*BRA | OP_ALT ... M A
+ (?()|) OP_*COND | OP_ALT M A
+ (?>|) OP_ONCE | OP_ALT ... [stack trace] M A
+ (?>|) OP_ONCE_NC | OP_ALT ... [stack trace] M A
+ Or nothing, if trace is unnecessary
+*/
+
+static PCRE2_SPTR compile_bracket_matchingpath(compiler_common *common, PCRE2_SPTR cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+PCRE2_UCHAR opcode;
+int private_data_ptr = 0;
+int offset = 0;
+int i, stacksize;
+int repeat_ptr = 0, repeat_length = 0;
+int repeat_type = 0, repeat_count = 0;
+PCRE2_SPTR ccbegin;
+PCRE2_SPTR matchingpath;
+PCRE2_SPTR slot;
+PCRE2_UCHAR bra = OP_BRA;
+PCRE2_UCHAR ket;
+assert_backtrack *assert;
+BOOL has_alternatives;
+BOOL needs_control_head = FALSE;
+struct sljit_jump *jump;
+struct sljit_jump *skip;
+struct sljit_label *rmax_label = NULL;
+struct sljit_jump *braminzero = NULL;
+
+PUSH_BACKTRACK(sizeof(bracket_backtrack), cc, NULL);
+
+if (*cc == OP_BRAZERO || *cc == OP_BRAMINZERO)
+ {
+ bra = *cc;
+ cc++;
+ opcode = *cc;
+ }
+
+opcode = *cc;
+ccbegin = cc;
+matchingpath = bracketend(cc) - 1 - LINK_SIZE;
+ket = *matchingpath;
+if (ket == OP_KET && PRIVATE_DATA(matchingpath) != 0)
+ {
+ repeat_ptr = PRIVATE_DATA(matchingpath);
+ repeat_length = PRIVATE_DATA(matchingpath + 1);
+ repeat_type = PRIVATE_DATA(matchingpath + 2);
+ repeat_count = PRIVATE_DATA(matchingpath + 3);
+ SLJIT_ASSERT(repeat_length != 0 && repeat_type != 0 && repeat_count != 0);
+ if (repeat_type == OP_UPTO)
+ ket = OP_KETRMAX;
+ if (repeat_type == OP_MINUPTO)
+ ket = OP_KETRMIN;
+ }
+
+matchingpath = ccbegin + 1 + LINK_SIZE;
+SLJIT_ASSERT(ket == OP_KET || ket == OP_KETRMAX || ket == OP_KETRMIN);
+SLJIT_ASSERT(!((bra == OP_BRAZERO && ket == OP_KETRMIN) || (bra == OP_BRAMINZERO && ket == OP_KETRMAX)));
+cc += GET(cc, 1);
+
+has_alternatives = *cc == OP_ALT;
+if (SLJIT_UNLIKELY(opcode == OP_COND || opcode == OP_SCOND))
+ {
+ SLJIT_COMPILE_ASSERT(OP_DNRREF == OP_RREF + 1 && OP_FALSE == OP_RREF + 2 && OP_TRUE == OP_RREF + 3,
+ compile_time_checks_must_be_grouped_together);
+ has_alternatives = ((*matchingpath >= OP_RREF && *matchingpath <= OP_TRUE) || *matchingpath == OP_FAIL) ? FALSE : TRUE;
+ }
+
+if (SLJIT_UNLIKELY(opcode == OP_COND) && (*cc == OP_KETRMAX || *cc == OP_KETRMIN))
+ opcode = OP_SCOND;
+if (SLJIT_UNLIKELY(opcode == OP_ONCE_NC))
+ opcode = OP_ONCE;
+
+if (opcode == OP_CBRA || opcode == OP_SCBRA)
+ {
+ /* Capturing brackets has a pre-allocated space. */
+ offset = GET2(ccbegin, 1 + LINK_SIZE);
+ if (common->optimized_cbracket[offset] == 0)
+ {
+ private_data_ptr = OVECTOR_PRIV(offset);
+ offset <<= 1;
+ }
+ else
+ {
+ offset <<= 1;
+ private_data_ptr = OVECTOR(offset);
+ }
+ BACKTRACK_AS(bracket_backtrack)->private_data_ptr = private_data_ptr;
+ matchingpath += IMM2_SIZE;
+ }
+else if (opcode == OP_ONCE || opcode == OP_SBRA || opcode == OP_SCOND)
+ {
+ /* Other brackets simply allocate the next entry. */
+ private_data_ptr = PRIVATE_DATA(ccbegin);
+ SLJIT_ASSERT(private_data_ptr != 0);
+ BACKTRACK_AS(bracket_backtrack)->private_data_ptr = private_data_ptr;
+ if (opcode == OP_ONCE)
+ BACKTRACK_AS(bracket_backtrack)->u.framesize = get_framesize(common, ccbegin, NULL, FALSE, &needs_control_head);
+ }
+
+/* Instructions before the first alternative. */
+stacksize = 0;
+if (ket == OP_KETRMAX || (ket == OP_KETRMIN && bra != OP_BRAMINZERO))
+ stacksize++;
+if (bra == OP_BRAZERO)
+ stacksize++;
+
+if (stacksize > 0)
+ allocate_stack(common, stacksize);
+
+stacksize = 0;
+if (ket == OP_KETRMAX || (ket == OP_KETRMIN && bra != OP_BRAMINZERO))
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0);
+ stacksize++;
+ }
+
+if (bra == OP_BRAZERO)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
+
+if (bra == OP_BRAMINZERO)
+ {
+ /* This is a backtrack path! (Since the try-path of OP_BRAMINZERO matches to the empty string) */
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ if (ket != OP_KETRMIN)
+ {
+ free_stack(common, 1);
+ braminzero = CMP(SLJIT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
+ }
+ else
+ {
+ if (opcode == OP_ONCE || opcode >= OP_SBRA)
+ {
+ jump = CMP(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ /* Nothing stored during the first run. */
+ skip = JUMP(SLJIT_JUMP);
+ JUMPHERE(jump);
+ /* Checking zero-length iteration. */
+ if (opcode != OP_ONCE || BACKTRACK_AS(bracket_backtrack)->u.framesize < 0)
+ {
+ /* When we come from outside, private_data_ptr contains the previous STR_PTR. */
+ braminzero = CMP(SLJIT_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ }
+ else
+ {
+ /* Except when the whole stack frame must be saved. */
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ braminzero = CMP(SLJIT_EQUAL, STR_PTR, 0, SLJIT_MEM1(TMP1), (BACKTRACK_AS(bracket_backtrack)->u.framesize + 1) * sizeof(sljit_sw));
+ }
+ JUMPHERE(skip);
+ }
+ else
+ {
+ jump = CMP(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ JUMPHERE(jump);
+ }
+ }
+ }
+
+if (repeat_type != 0)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), repeat_ptr, SLJIT_IMM, repeat_count);
+ if (repeat_type == OP_EXACT)
+ rmax_label = LABEL();
+ }
+
+if (ket == OP_KETRMIN)
+ BACKTRACK_AS(bracket_backtrack)->recursive_matchingpath = LABEL();
+
+if (ket == OP_KETRMAX)
+ {
+ rmax_label = LABEL();
+ if (has_alternatives && opcode != OP_ONCE && opcode < OP_SBRA && repeat_type == 0)
+ BACKTRACK_AS(bracket_backtrack)->alternative_matchingpath = rmax_label;
+ }
+
+/* Handling capturing brackets and alternatives. */
+if (opcode == OP_ONCE)
+ {
+ stacksize = 0;
+ if (needs_control_head)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr);
+ stacksize++;
+ }
+
+ if (BACKTRACK_AS(bracket_backtrack)->u.framesize < 0)
+ {
+ /* Neither capturing brackets nor recursions are found in the block. */
+ if (ket == OP_KETRMIN)
+ {
+ stacksize += 2;
+ if (!needs_control_head)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ }
+ else
+ {
+ if (BACKTRACK_AS(bracket_backtrack)->u.framesize == no_frame)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, STACK_TOP, 0);
+ if (ket == OP_KETRMAX || has_alternatives)
+ stacksize++;
+ }
+
+ if (stacksize > 0)
+ allocate_stack(common, stacksize);
+
+ stacksize = 0;
+ if (needs_control_head)
+ {
+ stacksize++;
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+ }
+
+ if (ket == OP_KETRMIN)
+ {
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
+ if (BACKTRACK_AS(bracket_backtrack)->u.framesize == no_frame)
+ OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_SP), private_data_ptr, STACK_TOP, 0, SLJIT_IMM, needs_control_head ? (2 * sizeof(sljit_sw)) : sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize + 1), TMP2, 0);
+ }
+ else if (ket == OP_KETRMAX || has_alternatives)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
+ }
+ else
+ {
+ if (ket != OP_KET || has_alternatives)
+ stacksize++;
+
+ stacksize += BACKTRACK_AS(bracket_backtrack)->u.framesize + 1;
+ allocate_stack(common, stacksize);
+
+ if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ OP2(SLJIT_SUB, TMP2, 0, STACK_TOP, 0, SLJIT_IMM, stacksize * sizeof(sljit_sw));
+
+ stacksize = needs_control_head ? 1 : 0;
+ if (ket != OP_KET || has_alternatives)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, TMP2, 0);
+ stacksize++;
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);
+ }
+ init_frame(common, ccbegin, NULL, BACKTRACK_AS(bracket_backtrack)->u.framesize + stacksize, stacksize + 1, FALSE);
+ }
+ }
+else if (opcode == OP_CBRA || opcode == OP_SCBRA)
+ {
+ /* Saving the previous values. */
+ if (common->optimized_cbracket[offset >> 1] != 0)
+ {
+ SLJIT_ASSERT(private_data_ptr == OVECTOR(offset));
+ allocate_stack(common, 2);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr + sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP1, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP2, 0);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+ }
+ }
+else if (opcode == OP_SBRA || opcode == OP_SCOND)
+ {
+ /* Saving the previous value. */
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+ }
+else if (has_alternatives)
+ {
+ /* Pushing the starting string pointer. */
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ }
+
+/* Generating code for the first alternative. */
+if (opcode == OP_COND || opcode == OP_SCOND)
+ {
+ if (*matchingpath == OP_CREF)
+ {
+ SLJIT_ASSERT(has_alternatives);
+ add_jump(compiler, &(BACKTRACK_AS(bracket_backtrack)->u.condfailed),
+ CMP(SLJIT_EQUAL, SLJIT_MEM1(SLJIT_SP), OVECTOR(GET2(matchingpath, 1) << 1), SLJIT_MEM1(SLJIT_SP), OVECTOR(1)));
+ matchingpath += 1 + IMM2_SIZE;
+ }
+ else if (*matchingpath == OP_DNCREF)
+ {
+ SLJIT_ASSERT(has_alternatives);
+
+ i = GET2(matchingpath, 1 + IMM2_SIZE);
+ slot = common->name_table + GET2(matchingpath, 1) * common->name_entry_size;
+ OP1(SLJIT_MOV, TMP3, 0, STR_PTR, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(1));
+ OP2(SLJIT_SUB | SLJIT_SET_E, TMP2, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(GET2(slot, 0) << 1), TMP1, 0);
+ slot += common->name_entry_size;
+ i--;
+ while (i-- > 0)
+ {
+ OP2(SLJIT_SUB, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(GET2(slot, 0) << 1), TMP1, 0);
+ OP2(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, STR_PTR, 0);
+ slot += common->name_entry_size;
+ }
+ OP1(SLJIT_MOV, STR_PTR, 0, TMP3, 0);
+ add_jump(compiler, &(BACKTRACK_AS(bracket_backtrack)->u.condfailed), JUMP(SLJIT_ZERO));
+ matchingpath += 1 + 2 * IMM2_SIZE;
+ }
+ else if ((*matchingpath >= OP_RREF && *matchingpath <= OP_TRUE) || *matchingpath == OP_FAIL)
+ {
+ /* Never has other case. */
+ BACKTRACK_AS(bracket_backtrack)->u.condfailed = NULL;
+ SLJIT_ASSERT(!has_alternatives);
+
+ if (*matchingpath == OP_TRUE)
+ {
+ stacksize = 1;
+ matchingpath++;
+ }
+ else if (*matchingpath == OP_FALSE || *matchingpath == OP_FAIL)
+ stacksize = 0;
+ else if (*matchingpath == OP_RREF)
+ {
+ stacksize = GET2(matchingpath, 1);
+ if (common->currententry == NULL)
+ stacksize = 0;
+ else if (stacksize == RREF_ANY)
+ stacksize = 1;
+ else if (common->currententry->start == 0)
+ stacksize = stacksize == 0;
+ else
+ stacksize = stacksize == (int)GET2(common->start, common->currententry->start + 1 + LINK_SIZE);
+
+ if (stacksize != 0)
+ matchingpath += 1 + IMM2_SIZE;
+ }
+ else
+ {
+ if (common->currententry == NULL || common->currententry->start == 0)
+ stacksize = 0;
+ else
+ {
+ stacksize = GET2(matchingpath, 1 + IMM2_SIZE);
+ slot = common->name_table + GET2(matchingpath, 1) * common->name_entry_size;
+ i = (int)GET2(common->start, common->currententry->start + 1 + LINK_SIZE);
+ while (stacksize > 0)
+ {
+ if ((int)GET2(slot, 0) == i)
+ break;
+ slot += common->name_entry_size;
+ stacksize--;
+ }
+ }
+
+ if (stacksize != 0)
+ matchingpath += 1 + 2 * IMM2_SIZE;
+ }
+
+ /* The stacksize == 0 is a common "else" case. */
+ if (stacksize == 0)
+ {
+ if (*cc == OP_ALT)
+ {
+ matchingpath = cc + 1 + LINK_SIZE;
+ cc += GET(cc, 1);
+ }
+ else
+ matchingpath = cc;
+ }
+ }
+ else
+ {
+ SLJIT_ASSERT(has_alternatives && *matchingpath >= OP_ASSERT && *matchingpath <= OP_ASSERTBACK_NOT);
+ /* Similar code as PUSH_BACKTRACK macro. */
+ assert = sljit_alloc_memory(compiler, sizeof(assert_backtrack));
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return NULL;
+ memset(assert, 0, sizeof(assert_backtrack));
+ assert->common.cc = matchingpath;
+ BACKTRACK_AS(bracket_backtrack)->u.assert = assert;
+ matchingpath = compile_assert_matchingpath(common, matchingpath, assert, TRUE);
+ }
+ }
+
+compile_matchingpath(common, matchingpath, cc, backtrack);
+if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return NULL;
+
+if (opcode == OP_ONCE)
+ match_once_common(common, ket, BACKTRACK_AS(bracket_backtrack)->u.framesize, private_data_ptr, has_alternatives, needs_control_head);
+
+stacksize = 0;
+if (repeat_type == OP_MINUPTO)
+ {
+ /* We need to preserve the counter. TMP2 will be used below. */
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), repeat_ptr);
+ stacksize++;
+ }
+if (ket != OP_KET || bra != OP_BRA)
+ stacksize++;
+if (offset != 0)
+ {
+ if (common->capture_last_ptr != 0)
+ stacksize++;
+ if (common->optimized_cbracket[offset >> 1] == 0)
+ stacksize += 2;
+ }
+if (has_alternatives && opcode != OP_ONCE)
+ stacksize++;
+
+if (stacksize > 0)
+ allocate_stack(common, stacksize);
+
+stacksize = 0;
+if (repeat_type == OP_MINUPTO)
+ {
+ /* TMP2 was set above. */
+ OP2(SLJIT_SUB, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP2, 0, SLJIT_IMM, 1);
+ stacksize++;
+ }
+
+if (ket != OP_KET || bra != OP_BRA)
+ {
+ if (ket != OP_KET)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
+ else
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0);
+ stacksize++;
+ }
+
+if (offset != 0)
+ stacksize = match_capture_common(common, stacksize, offset, private_data_ptr);
+
+if (has_alternatives)
+ {
+ if (opcode != OP_ONCE)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0);
+ if (ket != OP_KETRMAX)
+ BACKTRACK_AS(bracket_backtrack)->alternative_matchingpath = LABEL();
+ }
+
+/* Must be after the matchingpath label. */
+if (offset != 0 && common->optimized_cbracket[offset >> 1] != 0)
+ {
+ SLJIT_ASSERT(private_data_ptr == OVECTOR(offset + 0));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1), STR_PTR, 0);
+ }
+
+if (ket == OP_KETRMAX)
+ {
+ if (repeat_type != 0)
+ {
+ if (has_alternatives)
+ BACKTRACK_AS(bracket_backtrack)->alternative_matchingpath = LABEL();
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_MEM1(SLJIT_SP), repeat_ptr, SLJIT_MEM1(SLJIT_SP), repeat_ptr, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, rmax_label);
+ /* Drop STR_PTR for greedy plus quantifier. */
+ if (opcode != OP_ONCE)
+ free_stack(common, 1);
+ }
+ else if (opcode == OP_ONCE || opcode >= OP_SBRA)
+ {
+ if (has_alternatives)
+ BACKTRACK_AS(bracket_backtrack)->alternative_matchingpath = LABEL();
+ /* Checking zero-length iteration. */
+ if (opcode != OP_ONCE)
+ {
+ CMPTO(SLJIT_NOT_EQUAL, SLJIT_MEM1(SLJIT_SP), private_data_ptr, STR_PTR, 0, rmax_label);
+ /* Drop STR_PTR for greedy plus quantifier. */
+ if (bra != OP_BRAZERO)
+ free_stack(common, 1);
+ }
+ else
+ /* TMP2 must contain the starting STR_PTR. */
+ CMPTO(SLJIT_NOT_EQUAL, TMP2, 0, STR_PTR, 0, rmax_label);
+ }
+ else
+ JUMPTO(SLJIT_JUMP, rmax_label);
+ BACKTRACK_AS(bracket_backtrack)->recursive_matchingpath = LABEL();
+ }
+
+if (repeat_type == OP_EXACT)
+ {
+ count_match(common);
+ OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_MEM1(SLJIT_SP), repeat_ptr, SLJIT_MEM1(SLJIT_SP), repeat_ptr, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, rmax_label);
+ }
+else if (repeat_type == OP_UPTO)
+ {
+ /* We need to preserve the counter. */
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), repeat_ptr);
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+ }
+
+if (bra == OP_BRAZERO)
+ BACKTRACK_AS(bracket_backtrack)->zero_matchingpath = LABEL();
+
+if (bra == OP_BRAMINZERO)
+ {
+ /* This is a backtrack path! (From the viewpoint of OP_BRAMINZERO) */
+ JUMPTO(SLJIT_JUMP, ((braminzero_backtrack *)parent)->matchingpath);
+ if (braminzero != NULL)
+ {
+ JUMPHERE(braminzero);
+ /* We need to release the end pointer to perform the
+ backtrack for the zero-length iteration. When
+ framesize is < 0, OP_ONCE will do the release itself. */
+ if (opcode == OP_ONCE && BACKTRACK_AS(bracket_backtrack)->u.framesize >= 0)
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ }
+ else if (ket == OP_KETRMIN && opcode != OP_ONCE)
+ free_stack(common, 1);
+ }
+ /* Continue to the normal backtrack. */
+ }
+
+if ((ket != OP_KET && bra != OP_BRAMINZERO) || bra == OP_BRAZERO)
+ count_match(common);
+
+/* Skip the other alternatives. */
+while (*cc == OP_ALT)
+ cc += GET(cc, 1);
+cc += 1 + LINK_SIZE;
+
+if (opcode == OP_ONCE)
+ {
+ /* We temporarily encode the needs_control_head in the lowest bit.
+ Note: on the target architectures of SLJIT the ((x << 1) >> 1) returns
+ the same value for small signed numbers (including negative numbers). */
+ BACKTRACK_AS(bracket_backtrack)->u.framesize = (BACKTRACK_AS(bracket_backtrack)->u.framesize << 1) | (needs_control_head ? 1 : 0);
+ }
+return cc + repeat_length;
+}
+
+static PCRE2_SPTR compile_bracketpos_matchingpath(compiler_common *common, PCRE2_SPTR cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+PCRE2_UCHAR opcode;
+int private_data_ptr;
+int cbraprivptr = 0;
+BOOL needs_control_head;
+int framesize;
+int stacksize;
+int offset = 0;
+BOOL zero = FALSE;
+PCRE2_SPTR ccbegin = NULL;
+int stack; /* Also contains the offset of control head. */
+struct sljit_label *loop = NULL;
+struct jump_list *emptymatch = NULL;
+
+PUSH_BACKTRACK(sizeof(bracketpos_backtrack), cc, NULL);
+if (*cc == OP_BRAPOSZERO)
+ {
+ zero = TRUE;
+ cc++;
+ }
+
+opcode = *cc;
+private_data_ptr = PRIVATE_DATA(cc);
+SLJIT_ASSERT(private_data_ptr != 0);
+BACKTRACK_AS(bracketpos_backtrack)->private_data_ptr = private_data_ptr;
+switch(opcode)
+ {
+ case OP_BRAPOS:
+ case OP_SBRAPOS:
+ ccbegin = cc + 1 + LINK_SIZE;
+ break;
+
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ offset = GET2(cc, 1 + LINK_SIZE);
+ /* This case cannot be optimized in the same was as
+ normal capturing brackets. */
+ SLJIT_ASSERT(common->optimized_cbracket[offset] == 0);
+ cbraprivptr = OVECTOR_PRIV(offset);
+ offset <<= 1;
+ ccbegin = cc + 1 + LINK_SIZE + IMM2_SIZE;
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+
+framesize = get_framesize(common, cc, NULL, FALSE, &needs_control_head);
+BACKTRACK_AS(bracketpos_backtrack)->framesize = framesize;
+if (framesize < 0)
+ {
+ if (offset != 0)
+ {
+ stacksize = 2;
+ if (common->capture_last_ptr != 0)
+ stacksize++;
+ }
+ else
+ stacksize = 1;
+
+ if (needs_control_head)
+ stacksize++;
+ if (!zero)
+ stacksize++;
+
+ BACKTRACK_AS(bracketpos_backtrack)->stacksize = stacksize;
+ allocate_stack(common, stacksize);
+ if (framesize == no_frame)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, STACK_TOP, 0);
+
+ stack = 0;
+ if (offset != 0)
+ {
+ stack = 2;
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP1, 0);
+ if (common->capture_last_ptr != 0)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->capture_last_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), TMP2, 0);
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr);
+ if (common->capture_last_ptr != 0)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), TMP1, 0);
+ stack = 3;
+ }
+ }
+ else
+ {
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ stack = 1;
+ }
+
+ if (needs_control_head)
+ stack++;
+ if (!zero)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), SLJIT_IMM, 1);
+ if (needs_control_head)
+ {
+ stack--;
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), TMP2, 0);
+ }
+ }
+else
+ {
+ stacksize = framesize + 1;
+ if (!zero)
+ stacksize++;
+ if (needs_control_head)
+ stacksize++;
+ if (offset == 0)
+ stacksize++;
+ BACKTRACK_AS(bracketpos_backtrack)->stacksize = stacksize;
+
+ allocate_stack(common, stacksize);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ if (needs_control_head)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr);
+ OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_SP), private_data_ptr, STACK_TOP, 0, SLJIT_IMM, -STACK(stacksize - 1));
+
+ stack = 0;
+ if (!zero)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 1);
+ stack = 1;
+ }
+ if (needs_control_head)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), TMP2, 0);
+ stack++;
+ }
+ if (offset == 0)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), STR_PTR, 0);
+ stack++;
+ }
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stack), TMP1, 0);
+ init_frame(common, cc, NULL, stacksize - 1, stacksize - framesize, FALSE);
+ stack -= 1 + (offset == 0);
+ }
+
+if (offset != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), cbraprivptr, STR_PTR, 0);
+
+loop = LABEL();
+while (*cc != OP_KETRPOS)
+ {
+ backtrack->top = NULL;
+ backtrack->topbacktracks = NULL;
+ cc += GET(cc, 1);
+
+ compile_matchingpath(common, ccbegin, cc, backtrack);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return NULL;
+
+ if (framesize < 0)
+ {
+ if (framesize == no_frame)
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+
+ if (offset != 0)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), cbraprivptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), cbraprivptr, STR_PTR, 0);
+ if (common->capture_last_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->capture_last_ptr, SLJIT_IMM, offset >> 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset), TMP1, 0);
+ }
+ else
+ {
+ if (opcode == OP_SBRAPOS)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ }
+
+ /* Even if the match is empty, we need to reset the control head. */
+ if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), STACK(stack));
+
+ if (opcode == OP_SBRAPOS || opcode == OP_SCBRAPOS)
+ add_jump(compiler, &emptymatch, CMP(SLJIT_EQUAL, TMP1, 0, STR_PTR, 0));
+
+ if (!zero)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize - 1), SLJIT_IMM, 0);
+ }
+ else
+ {
+ if (offset != 0)
+ {
+ OP2(SLJIT_ADD, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr, SLJIT_IMM, stacksize * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), cbraprivptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), cbraprivptr, STR_PTR, 0);
+ if (common->capture_last_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->capture_last_ptr, SLJIT_IMM, offset >> 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset), TMP1, 0);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ OP2(SLJIT_ADD, STACK_TOP, 0, TMP2, 0, SLJIT_IMM, stacksize * sizeof(sljit_sw));
+ if (opcode == OP_SBRAPOS)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP2), (framesize + 1) * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(TMP2), (framesize + 1) * sizeof(sljit_sw), STR_PTR, 0);
+ }
+
+ /* Even if the match is empty, we need to reset the control head. */
+ if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_MEM1(STACK_TOP), STACK(stack));
+
+ if (opcode == OP_SBRAPOS || opcode == OP_SCBRAPOS)
+ add_jump(compiler, &emptymatch, CMP(SLJIT_EQUAL, TMP1, 0, STR_PTR, 0));
+
+ if (!zero)
+ {
+ if (framesize < 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize - 1), SLJIT_IMM, 0);
+ else
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ }
+ }
+
+ JUMPTO(SLJIT_JUMP, loop);
+ flush_stubs(common);
+
+ compile_backtrackingpath(common, backtrack->top);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return NULL;
+ set_jumps(backtrack->topbacktracks, LABEL());
+
+ if (framesize < 0)
+ {
+ if (offset != 0)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), cbraprivptr);
+ else
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ }
+ else
+ {
+ if (offset != 0)
+ {
+ /* Last alternative. */
+ if (*cc == OP_KETRPOS)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), cbraprivptr);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(TMP2), (framesize + 1) * sizeof(sljit_sw));
+ }
+ }
+
+ if (*cc == OP_KETRPOS)
+ break;
+ ccbegin = cc + 1 + LINK_SIZE;
+ }
+
+/* We don't have to restore the control head in case of a failed match. */
+
+backtrack->topbacktracks = NULL;
+if (!zero)
+ {
+ if (framesize < 0)
+ add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_NOT_EQUAL, SLJIT_MEM1(STACK_TOP), STACK(stacksize - 1), SLJIT_IMM, 0));
+ else /* TMP2 is set to [private_data_ptr] above. */
+ add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_NOT_EQUAL, SLJIT_MEM1(TMP2), (stacksize - 1) * sizeof(sljit_sw), SLJIT_IMM, 0));
+ }
+
+/* None of them matched. */
+set_jumps(emptymatch, LABEL());
+count_match(common);
+return cc + 1 + LINK_SIZE;
+}
+
+static SLJIT_INLINE PCRE2_SPTR get_iterator_parameters(compiler_common *common, PCRE2_SPTR cc, PCRE2_UCHAR *opcode, PCRE2_UCHAR *type, sljit_u32 *max, sljit_u32 *exact, PCRE2_SPTR *end)
+{
+int class_len;
+
+*opcode = *cc;
+*exact = 0;
+
+if (*opcode >= OP_STAR && *opcode <= OP_POSUPTO)
+ {
+ cc++;
+ *type = OP_CHAR;
+ }
+else if (*opcode >= OP_STARI && *opcode <= OP_POSUPTOI)
+ {
+ cc++;
+ *type = OP_CHARI;
+ *opcode -= OP_STARI - OP_STAR;
+ }
+else if (*opcode >= OP_NOTSTAR && *opcode <= OP_NOTPOSUPTO)
+ {
+ cc++;
+ *type = OP_NOT;
+ *opcode -= OP_NOTSTAR - OP_STAR;
+ }
+else if (*opcode >= OP_NOTSTARI && *opcode <= OP_NOTPOSUPTOI)
+ {
+ cc++;
+ *type = OP_NOTI;
+ *opcode -= OP_NOTSTARI - OP_STAR;
+ }
+else if (*opcode >= OP_TYPESTAR && *opcode <= OP_TYPEPOSUPTO)
+ {
+ cc++;
+ *opcode -= OP_TYPESTAR - OP_STAR;
+ *type = OP_END;
+ }
+else
+ {
+ SLJIT_ASSERT(*opcode == OP_CLASS || *opcode == OP_NCLASS || *opcode == OP_XCLASS);
+ *type = *opcode;
+ cc++;
+ class_len = (*type < OP_XCLASS) ? (int)(1 + (32 / sizeof(PCRE2_UCHAR))) : GET(cc, 0);
+ *opcode = cc[class_len - 1];
+
+ if (*opcode >= OP_CRSTAR && *opcode <= OP_CRMINQUERY)
+ {
+ *opcode -= OP_CRSTAR - OP_STAR;
+ *end = cc + class_len;
+
+ if (*opcode == OP_PLUS || *opcode == OP_MINPLUS)
+ {
+ *exact = 1;
+ *opcode -= OP_PLUS - OP_STAR;
+ }
+ }
+ else if (*opcode >= OP_CRPOSSTAR && *opcode <= OP_CRPOSQUERY)
+ {
+ *opcode -= OP_CRPOSSTAR - OP_POSSTAR;
+ *end = cc + class_len;
+
+ if (*opcode == OP_POSPLUS)
+ {
+ *exact = 1;
+ *opcode = OP_POSSTAR;
+ }
+ }
+ else
+ {
+ SLJIT_ASSERT(*opcode == OP_CRRANGE || *opcode == OP_CRMINRANGE || *opcode == OP_CRPOSRANGE);
+ *max = GET2(cc, (class_len + IMM2_SIZE));
+ *exact = GET2(cc, class_len);
+
+ if (*max == 0)
+ {
+ if (*opcode == OP_CRPOSRANGE)
+ *opcode = OP_POSSTAR;
+ else
+ *opcode -= OP_CRRANGE - OP_STAR;
+ }
+ else
+ {
+ *max -= *exact;
+ if (*max == 0)
+ *opcode = OP_EXACT;
+ else if (*max == 1)
+ {
+ if (*opcode == OP_CRPOSRANGE)
+ *opcode = OP_POSQUERY;
+ else
+ *opcode -= OP_CRRANGE - OP_QUERY;
+ }
+ else
+ {
+ if (*opcode == OP_CRPOSRANGE)
+ *opcode = OP_POSUPTO;
+ else
+ *opcode -= OP_CRRANGE - OP_UPTO;
+ }
+ }
+ *end = cc + class_len + 2 * IMM2_SIZE;
+ }
+ return cc;
+ }
+
+switch(*opcode)
+ {
+ case OP_EXACT:
+ *exact = GET2(cc, 0);
+ cc += IMM2_SIZE;
+ break;
+
+ case OP_PLUS:
+ case OP_MINPLUS:
+ *exact = 1;
+ *opcode -= OP_PLUS - OP_STAR;
+ break;
+
+ case OP_POSPLUS:
+ *exact = 1;
+ *opcode = OP_POSSTAR;
+ break;
+
+ case OP_UPTO:
+ case OP_MINUPTO:
+ case OP_POSUPTO:
+ *max = GET2(cc, 0);
+ cc += IMM2_SIZE;
+ break;
+ }
+
+if (*type == OP_END)
+ {
+ *type = *cc;
+ *end = next_opcode(common, cc);
+ cc++;
+ return cc;
+ }
+
+*end = cc + 1;
+#ifdef SUPPORT_UNICODE
+if (common->utf && HAS_EXTRALEN(*cc)) *end += GET_EXTRALEN(*cc);
+#endif
+return cc;
+}
+
+static PCRE2_SPTR compile_iterator_matchingpath(compiler_common *common, PCRE2_SPTR cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+PCRE2_UCHAR opcode;
+PCRE2_UCHAR type;
+sljit_u32 max = 0, exact;
+BOOL fast_fail;
+sljit_s32 fast_str_ptr;
+BOOL charpos_enabled;
+PCRE2_UCHAR charpos_char;
+unsigned int charpos_othercasebit;
+PCRE2_SPTR end;
+jump_list *no_match = NULL;
+jump_list *no_char1_match = NULL;
+struct sljit_jump *jump = NULL;
+struct sljit_label *label;
+int private_data_ptr = PRIVATE_DATA(cc);
+int base = (private_data_ptr == 0) ? SLJIT_MEM1(STACK_TOP) : SLJIT_MEM1(SLJIT_SP);
+int offset0 = (private_data_ptr == 0) ? STACK(0) : private_data_ptr;
+int offset1 = (private_data_ptr == 0) ? STACK(1) : private_data_ptr + (int)sizeof(sljit_sw);
+int tmp_base, tmp_offset;
+
+PUSH_BACKTRACK(sizeof(char_iterator_backtrack), cc, NULL);
+
+fast_str_ptr = PRIVATE_DATA(cc + 1);
+fast_fail = TRUE;
+
+SLJIT_ASSERT(common->fast_forward_bc_ptr == NULL || fast_str_ptr == 0 || cc == common->fast_forward_bc_ptr);
+
+if (cc == common->fast_forward_bc_ptr)
+ fast_fail = FALSE;
+else if (common->fast_fail_start_ptr == 0)
+ fast_str_ptr = 0;
+
+SLJIT_ASSERT(common->fast_forward_bc_ptr != NULL || fast_str_ptr == 0
+ || (fast_str_ptr >= common->fast_fail_start_ptr && fast_str_ptr <= common->fast_fail_end_ptr));
+
+cc = get_iterator_parameters(common, cc, &opcode, &type, &max, &exact, &end);
+
+if (type != OP_EXTUNI)
+ {
+ tmp_base = TMP3;
+ tmp_offset = 0;
+ }
+else
+ {
+ tmp_base = SLJIT_MEM1(SLJIT_SP);
+ tmp_offset = POSSESSIVE0;
+ }
+
+if (fast_fail && fast_str_ptr != 0)
+ add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), fast_str_ptr));
+
+/* Handle fixed part first. */
+if (exact > 1)
+ {
+ SLJIT_ASSERT(fast_str_ptr == 0);
+ if (common->mode == PCRE2_JIT_COMPLETE
+#ifdef SUPPORT_UNICODE
+ && !common->utf
+#endif
+ )
+ {
+ OP2(SLJIT_ADD, TMP1, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(exact));
+ add_jump(compiler, &backtrack->topbacktracks, CMP(SLJIT_GREATER, TMP1, 0, STR_END, 0));
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, exact);
+ label = LABEL();
+ compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks, FALSE);
+ OP2(SLJIT_SUB | SLJIT_SET_E, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, label);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, exact);
+ label = LABEL();
+ compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks, TRUE);
+ OP2(SLJIT_SUB | SLJIT_SET_E, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, label);
+ }
+ }
+else if (exact == 1)
+ compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks, TRUE);
+
+switch(opcode)
+ {
+ case OP_STAR:
+ case OP_UPTO:
+ SLJIT_ASSERT(fast_str_ptr == 0 || opcode == OP_STAR);
+
+ if (type == OP_ANYNL || type == OP_EXTUNI)
+ {
+ SLJIT_ASSERT(private_data_ptr == 0);
+ SLJIT_ASSERT(fast_str_ptr == 0);
+
+ allocate_stack(common, 2);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, 0);
+
+ if (opcode == OP_UPTO)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), POSSESSIVE0, SLJIT_IMM, max);
+
+ label = LABEL();
+ compile_char1_matchingpath(common, type, cc, &BACKTRACK_AS(char_iterator_backtrack)->u.backtracks, TRUE);
+ if (opcode == OP_UPTO)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), POSSESSIVE0);
+ OP2(SLJIT_SUB | SLJIT_SET_E, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ jump = JUMP(SLJIT_ZERO);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), POSSESSIVE0, TMP1, 0);
+ }
+
+ /* We cannot use TMP3 because of this allocate_stack. */
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ JUMPTO(SLJIT_JUMP, label);
+ if (jump != NULL)
+ JUMPHERE(jump);
+ }
+ else
+ {
+ charpos_enabled = FALSE;
+ charpos_char = 0;
+ charpos_othercasebit = 0;
+
+ if ((type != OP_CHAR && type != OP_CHARI) && (*end == OP_CHAR || *end == OP_CHARI))
+ {
+ charpos_enabled = TRUE;
+#ifdef SUPPORT_UNICODE
+ charpos_enabled = !common->utf || !HAS_EXTRALEN(end[1]);
+#endif
+ if (charpos_enabled && *end == OP_CHARI && char_has_othercase(common, end + 1))
+ {
+ charpos_othercasebit = char_get_othercase_bit(common, end + 1);
+ if (charpos_othercasebit == 0)
+ charpos_enabled = FALSE;
+ }
+
+ if (charpos_enabled)
+ {
+ charpos_char = end[1];
+ /* Consumpe the OP_CHAR opcode. */
+ end += 2;
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ SLJIT_ASSERT((charpos_othercasebit >> 8) == 0);
+#elif PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
+ SLJIT_ASSERT((charpos_othercasebit >> 9) == 0);
+ if ((charpos_othercasebit & 0x100) != 0)
+ charpos_othercasebit = (charpos_othercasebit & 0xff) << 8;
+#endif
+ if (charpos_othercasebit != 0)
+ charpos_char |= charpos_othercasebit;
+
+ BACKTRACK_AS(char_iterator_backtrack)->u.charpos.enabled = TRUE;
+ BACKTRACK_AS(char_iterator_backtrack)->u.charpos.chr = charpos_char;
+ BACKTRACK_AS(char_iterator_backtrack)->u.charpos.othercasebit = charpos_othercasebit;
+ }
+ }
+
+ if (charpos_enabled)
+ {
+ if (opcode == OP_UPTO)
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, max + 1);
+
+ /* Search the first instance of charpos_char. */
+ jump = JUMP(SLJIT_JUMP);
+ label = LABEL();
+ if (opcode == OP_UPTO)
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1);
+ add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_ZERO));
+ }
+ compile_char1_matchingpath(common, type, cc, &backtrack->topbacktracks, FALSE);
+ if (fast_str_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0);
+ JUMPHERE(jump);
+
+ detect_partial_match(common, &backtrack->topbacktracks);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ if (charpos_othercasebit != 0)
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, charpos_othercasebit);
+ CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, charpos_char, label);
+
+ if (private_data_ptr == 0)
+ allocate_stack(common, 2);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ OP1(SLJIT_MOV, base, offset1, STR_PTR, 0);
+ if (opcode == OP_UPTO)
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1);
+ add_jump(compiler, &no_match, JUMP(SLJIT_ZERO));
+ }
+
+ /* Search the last instance of charpos_char. */
+ label = LABEL();
+ compile_char1_matchingpath(common, type, cc, &no_match, FALSE);
+ if (fast_str_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0);
+ detect_partial_match(common, &no_match);
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(0));
+ if (charpos_othercasebit != 0)
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, charpos_othercasebit);
+ if (opcode == OP_STAR)
+ {
+ CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, charpos_char, label);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ }
+ else
+ {
+ jump = CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, charpos_char);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ JUMPHERE(jump);
+ }
+
+ if (opcode == OP_UPTO)
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, label);
+ }
+ else
+ JUMPTO(SLJIT_JUMP, label);
+
+ set_jumps(no_match, LABEL());
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ }
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+ else if (common->utf)
+ {
+ if (private_data_ptr == 0)
+ allocate_stack(common, 2);
+
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ OP1(SLJIT_MOV, base, offset1, STR_PTR, 0);
+
+ if (opcode == OP_UPTO)
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, max);
+
+ label = LABEL();
+ compile_char1_matchingpath(common, type, cc, &no_match, TRUE);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+
+ if (opcode == OP_UPTO)
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, label);
+ }
+ else
+ JUMPTO(SLJIT_JUMP, label);
+
+ set_jumps(no_match, LABEL());
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ if (fast_str_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0);
+ }
+#endif
+ else
+ {
+ if (private_data_ptr == 0)
+ allocate_stack(common, 2);
+
+ OP1(SLJIT_MOV, base, offset1, STR_PTR, 0);
+ if (opcode == OP_UPTO)
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, max);
+
+ label = LABEL();
+ detect_partial_match(common, &no_match);
+ compile_char1_matchingpath(common, type, cc, &no_char1_match, FALSE);
+ if (opcode == OP_UPTO)
+ {
+ OP2(SLJIT_SUB | SLJIT_SET_E, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, label);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ }
+ else
+ JUMPTO(SLJIT_JUMP, label);
+
+ set_jumps(no_char1_match, LABEL());
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ set_jumps(no_match, LABEL());
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ if (fast_str_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0);
+ }
+ }
+ BACKTRACK_AS(char_iterator_backtrack)->matchingpath = LABEL();
+ break;
+
+ case OP_MINSTAR:
+ if (private_data_ptr == 0)
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ BACKTRACK_AS(char_iterator_backtrack)->matchingpath = LABEL();
+ if (fast_str_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0);
+ break;
+
+ case OP_MINUPTO:
+ SLJIT_ASSERT(fast_str_ptr == 0);
+ if (private_data_ptr == 0)
+ allocate_stack(common, 2);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ OP1(SLJIT_MOV, base, offset1, SLJIT_IMM, max + 1);
+ BACKTRACK_AS(char_iterator_backtrack)->matchingpath = LABEL();
+ break;
+
+ case OP_QUERY:
+ case OP_MINQUERY:
+ SLJIT_ASSERT(fast_str_ptr == 0);
+ if (private_data_ptr == 0)
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ if (opcode == OP_QUERY)
+ compile_char1_matchingpath(common, type, cc, &BACKTRACK_AS(char_iterator_backtrack)->u.backtracks, TRUE);
+ BACKTRACK_AS(char_iterator_backtrack)->matchingpath = LABEL();
+ break;
+
+ case OP_EXACT:
+ break;
+
+ case OP_POSSTAR:
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+ if (common->utf)
+ {
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
+ label = LABEL();
+ compile_char1_matchingpath(common, type, cc, &no_match, TRUE);
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
+ JUMPTO(SLJIT_JUMP, label);
+ set_jumps(no_match, LABEL());
+ OP1(SLJIT_MOV, STR_PTR, 0, tmp_base, tmp_offset);
+ if (fast_str_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0);
+ break;
+ }
+#endif
+ label = LABEL();
+ detect_partial_match(common, &no_match);
+ compile_char1_matchingpath(common, type, cc, &no_char1_match, FALSE);
+ JUMPTO(SLJIT_JUMP, label);
+ set_jumps(no_char1_match, LABEL());
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ set_jumps(no_match, LABEL());
+ if (fast_str_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), fast_str_ptr, STR_PTR, 0);
+ break;
+
+ case OP_POSUPTO:
+ SLJIT_ASSERT(fast_str_ptr == 0);
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
+ if (common->utf)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), POSSESSIVE1, STR_PTR, 0);
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, max);
+ label = LABEL();
+ compile_char1_matchingpath(common, type, cc, &no_match, TRUE);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), POSSESSIVE1, STR_PTR, 0);
+ OP2(SLJIT_SUB | SLJIT_SET_E, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, label);
+ set_jumps(no_match, LABEL());
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), POSSESSIVE1);
+ break;
+ }
+#endif
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, SLJIT_IMM, max);
+ label = LABEL();
+ detect_partial_match(common, &no_match);
+ compile_char1_matchingpath(common, type, cc, &no_char1_match, FALSE);
+ OP2(SLJIT_SUB | SLJIT_SET_E, tmp_base, tmp_offset, tmp_base, tmp_offset, SLJIT_IMM, 1);
+ JUMPTO(SLJIT_NOT_ZERO, label);
+ OP2(SLJIT_ADD, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ set_jumps(no_char1_match, LABEL());
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+ set_jumps(no_match, LABEL());
+ break;
+
+ case OP_POSQUERY:
+ SLJIT_ASSERT(fast_str_ptr == 0);
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
+ compile_char1_matchingpath(common, type, cc, &no_match, TRUE);
+ OP1(SLJIT_MOV, tmp_base, tmp_offset, STR_PTR, 0);
+ set_jumps(no_match, LABEL());
+ OP1(SLJIT_MOV, STR_PTR, 0, tmp_base, tmp_offset);
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+
+count_match(common);
+return end;
+}
+
+static SLJIT_INLINE PCRE2_SPTR compile_fail_accept_matchingpath(compiler_common *common, PCRE2_SPTR cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+
+PUSH_BACKTRACK(sizeof(backtrack_common), cc, NULL);
+
+if (*cc == OP_FAIL)
+ {
+ add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_JUMP));
+ return cc + 1;
+ }
+
+if (*cc == OP_ASSERT_ACCEPT || common->currententry != NULL || !common->might_be_empty)
+ {
+ /* No need to check notempty conditions. */
+ if (common->accept_label == NULL)
+ add_jump(compiler, &common->accept, JUMP(SLJIT_JUMP));
+ else
+ JUMPTO(SLJIT_JUMP, common->accept_label);
+ return cc + 1;
+ }
+
+if (common->accept_label == NULL)
+ add_jump(compiler, &common->accept, CMP(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(0)));
+else
+ CMPTO(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(0), common->accept_label);
+OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+OP1(SLJIT_MOV_U32, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, options));
+OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, PCRE2_NOTEMPTY);
+add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_NOT_ZERO));
+OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, PCRE2_NOTEMPTY_ATSTART);
+if (common->accept_label == NULL)
+ add_jump(compiler, &common->accept, JUMP(SLJIT_ZERO));
+else
+ JUMPTO(SLJIT_ZERO, common->accept_label);
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
+if (common->accept_label == NULL)
+ add_jump(compiler, &common->accept, CMP(SLJIT_NOT_EQUAL, TMP2, 0, STR_PTR, 0));
+else
+ CMPTO(SLJIT_NOT_EQUAL, TMP2, 0, STR_PTR, 0, common->accept_label);
+add_jump(compiler, &backtrack->topbacktracks, JUMP(SLJIT_JUMP));
+return cc + 1;
+}
+
+static SLJIT_INLINE PCRE2_SPTR compile_close_matchingpath(compiler_common *common, PCRE2_SPTR cc)
+{
+DEFINE_COMPILER;
+int offset = GET2(cc, 1);
+BOOL optimized_cbracket = common->optimized_cbracket[offset] != 0;
+
+/* Data will be discarded anyway... */
+if (common->currententry != NULL)
+ return cc + 1 + IMM2_SIZE;
+
+if (!optimized_cbracket)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR_PRIV(offset));
+offset <<= 1;
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1), STR_PTR, 0);
+if (!optimized_cbracket)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset), TMP1, 0);
+return cc + 1 + IMM2_SIZE;
+}
+
+static SLJIT_INLINE PCRE2_SPTR compile_control_verb_matchingpath(compiler_common *common, PCRE2_SPTR cc, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+PCRE2_UCHAR opcode = *cc;
+PCRE2_SPTR ccend = cc + 1;
+
+if (opcode == OP_PRUNE_ARG || opcode == OP_SKIP_ARG || opcode == OP_THEN_ARG)
+ ccend += 2 + cc[1];
+
+PUSH_BACKTRACK(sizeof(backtrack_common), cc, NULL);
+
+if (opcode == OP_SKIP)
+ {
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ return ccend;
+ }
+
+if (opcode == OP_PRUNE_ARG || opcode == OP_THEN_ARG)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)(cc + 2));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->mark_ptr, TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, mark_ptr), TMP2, 0);
+ }
+
+return ccend;
+}
+
+static PCRE2_UCHAR then_trap_opcode[1] = { OP_THEN_TRAP };
+
+static SLJIT_INLINE void compile_then_trap_matchingpath(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+BOOL needs_control_head;
+int size;
+
+PUSH_BACKTRACK_NOVALUE(sizeof(then_trap_backtrack), cc);
+common->then_trap = BACKTRACK_AS(then_trap_backtrack);
+BACKTRACK_AS(then_trap_backtrack)->common.cc = then_trap_opcode;
+BACKTRACK_AS(then_trap_backtrack)->start = (sljit_sw)(cc - common->start);
+BACKTRACK_AS(then_trap_backtrack)->framesize = get_framesize(common, cc, ccend, FALSE, &needs_control_head);
+
+size = BACKTRACK_AS(then_trap_backtrack)->framesize;
+size = 3 + (size < 0 ? 0 : size);
+
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr);
+allocate_stack(common, size);
+if (size > 3)
+ OP2(SLJIT_SUB, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, STACK_TOP, 0, SLJIT_IMM, (size - 3) * sizeof(sljit_sw));
+else
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, STACK_TOP, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(size - 1), SLJIT_IMM, BACKTRACK_AS(then_trap_backtrack)->start);
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(size - 2), SLJIT_IMM, type_then_trap);
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(size - 3), TMP2, 0);
+
+size = BACKTRACK_AS(then_trap_backtrack)->framesize;
+if (size >= 0)
+ init_frame(common, cc, ccend, size - 1, 0, FALSE);
+}
+
+static void compile_matchingpath(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, backtrack_common *parent)
+{
+DEFINE_COMPILER;
+backtrack_common *backtrack;
+BOOL has_then_trap = FALSE;
+then_trap_backtrack *save_then_trap = NULL;
+
+SLJIT_ASSERT(*ccend == OP_END || (*ccend >= OP_ALT && *ccend <= OP_KETRPOS));
+
+if (common->has_then && common->then_offsets[cc - common->start] != 0)
+ {
+ SLJIT_ASSERT(*ccend != OP_END && common->control_head_ptr != 0);
+ has_then_trap = TRUE;
+ save_then_trap = common->then_trap;
+ /* Tail item on backtrack. */
+ compile_then_trap_matchingpath(common, cc, ccend, parent);
+ }
+
+while (cc < ccend)
+ {
+ switch(*cc)
+ {
+ case OP_SOD:
+ case OP_SOM:
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ case OP_EODN:
+ case OP_EOD:
+ case OP_DOLL:
+ case OP_DOLLM:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_REVERSE:
+ cc = compile_simple_assertion_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks);
+ break;
+
+ case OP_NOT_DIGIT:
+ case OP_DIGIT:
+ case OP_NOT_WHITESPACE:
+ case OP_WHITESPACE:
+ case OP_NOT_WORDCHAR:
+ case OP_WORDCHAR:
+ case OP_ANY:
+ case OP_ALLANY:
+ case OP_ANYBYTE:
+ case OP_NOTPROP:
+ case OP_PROP:
+ case OP_ANYNL:
+ case OP_NOT_HSPACE:
+ case OP_HSPACE:
+ case OP_NOT_VSPACE:
+ case OP_VSPACE:
+ case OP_EXTUNI:
+ case OP_NOT:
+ case OP_NOTI:
+ cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks, TRUE);
+ break;
+
+ case OP_SET_SOM:
+ PUSH_BACKTRACK_NOVALUE(sizeof(backtrack_common), cc);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(0));
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(0), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP2, 0);
+ cc++;
+ break;
+
+ case OP_CHAR:
+ case OP_CHARI:
+ if (common->mode == PCRE2_JIT_COMPLETE)
+ cc = compile_charn_matchingpath(common, cc, ccend, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks);
+ else
+ cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks, TRUE);
+ break;
+
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_QUERY:
+ case OP_MINQUERY:
+ case OP_UPTO:
+ case OP_MINUPTO:
+ case OP_EXACT:
+ case OP_POSSTAR:
+ case OP_POSPLUS:
+ case OP_POSQUERY:
+ case OP_POSUPTO:
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_UPTOI:
+ case OP_MINUPTOI:
+ case OP_EXACTI:
+ case OP_POSSTARI:
+ case OP_POSPLUSI:
+ case OP_POSQUERYI:
+ case OP_POSUPTOI:
+ case OP_NOTSTAR:
+ case OP_NOTMINSTAR:
+ case OP_NOTPLUS:
+ case OP_NOTMINPLUS:
+ case OP_NOTQUERY:
+ case OP_NOTMINQUERY:
+ case OP_NOTUPTO:
+ case OP_NOTMINUPTO:
+ case OP_NOTEXACT:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSUPTO:
+ case OP_NOTSTARI:
+ case OP_NOTMINSTARI:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUSI:
+ case OP_NOTQUERYI:
+ case OP_NOTMINQUERYI:
+ case OP_NOTUPTOI:
+ case OP_NOTMINUPTOI:
+ case OP_NOTEXACTI:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSUPTOI:
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEEXACT:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEPOSQUERY:
+ case OP_TYPEPOSUPTO:
+ cc = compile_iterator_matchingpath(common, cc, parent);
+ break;
+
+ case OP_CLASS:
+ case OP_NCLASS:
+ if (cc[1 + (32 / sizeof(PCRE2_UCHAR))] >= OP_CRSTAR && cc[1 + (32 / sizeof(PCRE2_UCHAR))] <= OP_CRPOSRANGE)
+ cc = compile_iterator_matchingpath(common, cc, parent);
+ else
+ cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks, TRUE);
+ break;
+
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
+ case OP_XCLASS:
+ if (*(cc + GET(cc, 1)) >= OP_CRSTAR && *(cc + GET(cc, 1)) <= OP_CRPOSRANGE)
+ cc = compile_iterator_matchingpath(common, cc, parent);
+ else
+ cc = compile_char1_matchingpath(common, *cc, cc + 1, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks, TRUE);
+ break;
+#endif
+
+ case OP_REF:
+ case OP_REFI:
+ if (cc[1 + IMM2_SIZE] >= OP_CRSTAR && cc[1 + IMM2_SIZE] <= OP_CRPOSRANGE)
+ cc = compile_ref_iterator_matchingpath(common, cc, parent);
+ else
+ {
+ compile_ref_matchingpath(common, cc, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks, TRUE, FALSE);
+ cc += 1 + IMM2_SIZE;
+ }
+ break;
+
+ case OP_DNREF:
+ case OP_DNREFI:
+ if (cc[1 + 2 * IMM2_SIZE] >= OP_CRSTAR && cc[1 + 2 * IMM2_SIZE] <= OP_CRPOSRANGE)
+ cc = compile_ref_iterator_matchingpath(common, cc, parent);
+ else
+ {
+ compile_dnref_search(common, cc, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks);
+ compile_ref_matchingpath(common, cc, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks, TRUE, FALSE);
+ cc += 1 + 2 * IMM2_SIZE;
+ }
+ break;
+
+ case OP_RECURSE:
+ cc = compile_recurse_matchingpath(common, cc, parent);
+ break;
+
+ case OP_CALLOUT:
+ case OP_CALLOUT_STR:
+ cc = compile_callout_matchingpath(common, cc, parent);
+ break;
+
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ PUSH_BACKTRACK_NOVALUE(sizeof(assert_backtrack), cc);
+ cc = compile_assert_matchingpath(common, cc, BACKTRACK_AS(assert_backtrack), FALSE);
+ break;
+
+ case OP_BRAMINZERO:
+ PUSH_BACKTRACK_NOVALUE(sizeof(braminzero_backtrack), cc);
+ cc = bracketend(cc + 1);
+ if (*(cc - 1 - LINK_SIZE) != OP_KETRMIN)
+ {
+ allocate_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+ }
+ else
+ {
+ allocate_stack(common, 2);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), STR_PTR, 0);
+ }
+ BACKTRACK_AS(braminzero_backtrack)->matchingpath = LABEL();
+ count_match(common);
+ break;
+
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_BRA:
+ case OP_CBRA:
+ case OP_COND:
+ case OP_SBRA:
+ case OP_SCBRA:
+ case OP_SCOND:
+ cc = compile_bracket_matchingpath(common, cc, parent);
+ break;
+
+ case OP_BRAZERO:
+ if (cc[1] > OP_ASSERTBACK_NOT)
+ cc = compile_bracket_matchingpath(common, cc, parent);
+ else
+ {
+ PUSH_BACKTRACK_NOVALUE(sizeof(assert_backtrack), cc);
+ cc = compile_assert_matchingpath(common, cc, BACKTRACK_AS(assert_backtrack), FALSE);
+ }
+ break;
+
+ case OP_BRAPOS:
+ case OP_CBRAPOS:
+ case OP_SBRAPOS:
+ case OP_SCBRAPOS:
+ case OP_BRAPOSZERO:
+ cc = compile_bracketpos_matchingpath(common, cc, parent);
+ break;
+
+ case OP_MARK:
+ PUSH_BACKTRACK_NOVALUE(sizeof(backtrack_common), cc);
+ SLJIT_ASSERT(common->mark_ptr != 0);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), common->mark_ptr);
+ allocate_stack(common, common->has_skip_arg ? 5 : 1);
+ OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(common->has_skip_arg ? 4 : 0), TMP2, 0);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, (sljit_sw)(cc + 2));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->mark_ptr, TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, mark_ptr), TMP2, 0);
+ if (common->has_skip_arg)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, STACK_TOP, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), SLJIT_IMM, type_mark);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(2), SLJIT_IMM, (sljit_sw)(cc + 2));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(3), STR_PTR, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), TMP1, 0);
+ }
+ cc += 1 + 2 + cc[1];
+ break;
+
+ case OP_PRUNE:
+ case OP_PRUNE_ARG:
+ case OP_SKIP:
+ case OP_SKIP_ARG:
+ case OP_THEN:
+ case OP_THEN_ARG:
+ case OP_COMMIT:
+ cc = compile_control_verb_matchingpath(common, cc, parent);
+ break;
+
+ case OP_FAIL:
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
+ cc = compile_fail_accept_matchingpath(common, cc, parent);
+ break;
+
+ case OP_CLOSE:
+ cc = compile_close_matchingpath(common, cc);
+ break;
+
+ case OP_SKIPZERO:
+ cc = bracketend(cc + 1);
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ return;
+ }
+ if (cc == NULL)
+ return;
+ }
+
+if (has_then_trap)
+ {
+ /* Head item on backtrack. */
+ PUSH_BACKTRACK_NOVALUE(sizeof(then_trap_backtrack), cc);
+ BACKTRACK_AS(then_trap_backtrack)->common.cc = then_trap_opcode;
+ BACKTRACK_AS(then_trap_backtrack)->then_trap = common->then_trap;
+ common->then_trap = save_then_trap;
+ }
+SLJIT_ASSERT(cc == ccend);
+}
+
+#undef PUSH_BACKTRACK
+#undef PUSH_BACKTRACK_NOVALUE
+#undef BACKTRACK_AS
+
+#define COMPILE_BACKTRACKINGPATH(current) \
+ do \
+ { \
+ compile_backtrackingpath(common, (current)); \
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler))) \
+ return; \
+ } \
+ while (0)
+
+#define CURRENT_AS(type) ((type *)current)
+
+static void compile_iterator_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+PCRE2_SPTR cc = current->cc;
+PCRE2_UCHAR opcode;
+PCRE2_UCHAR type;
+sljit_u32 max = 0, exact;
+struct sljit_label *label = NULL;
+struct sljit_jump *jump = NULL;
+jump_list *jumplist = NULL;
+PCRE2_SPTR end;
+int private_data_ptr = PRIVATE_DATA(cc);
+int base = (private_data_ptr == 0) ? SLJIT_MEM1(STACK_TOP) : SLJIT_MEM1(SLJIT_SP);
+int offset0 = (private_data_ptr == 0) ? STACK(0) : private_data_ptr;
+int offset1 = (private_data_ptr == 0) ? STACK(1) : private_data_ptr + (int)sizeof(sljit_sw);
+
+cc = get_iterator_parameters(common, cc, &opcode, &type, &max, &exact, &end);
+
+switch(opcode)
+ {
+ case OP_STAR:
+ case OP_UPTO:
+ if (type == OP_ANYNL || type == OP_EXTUNI)
+ {
+ SLJIT_ASSERT(private_data_ptr == 0);
+ set_jumps(CURRENT_AS(char_iterator_backtrack)->u.backtracks, LABEL());
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ CMPTO(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(char_iterator_backtrack)->matchingpath);
+ }
+ else
+ {
+ if (CURRENT_AS(char_iterator_backtrack)->u.charpos.enabled)
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ OP1(SLJIT_MOV, TMP2, 0, base, offset1);
+ OP2(SLJIT_SUB, STR_PTR, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(1));
+
+ jump = CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, TMP2, 0);
+ label = LABEL();
+ OP1(MOV_UCHAR, TMP1, 0, SLJIT_MEM1(STR_PTR), IN_UCHARS(-1));
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ if (CURRENT_AS(char_iterator_backtrack)->u.charpos.othercasebit != 0)
+ OP2(SLJIT_OR, TMP1, 0, TMP1, 0, SLJIT_IMM, CURRENT_AS(char_iterator_backtrack)->u.charpos.othercasebit);
+ CMPTO(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, CURRENT_AS(char_iterator_backtrack)->u.charpos.chr, CURRENT_AS(char_iterator_backtrack)->matchingpath);
+ skip_char_back(common);
+ CMPTO(SLJIT_GREATER, STR_PTR, 0, TMP2, 0, label);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ jump = CMP(SLJIT_LESS_EQUAL, STR_PTR, 0, base, offset1);
+ skip_char_back(common);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(char_iterator_backtrack)->matchingpath);
+ }
+ JUMPHERE(jump);
+ if (private_data_ptr == 0)
+ free_stack(common, 2);
+ }
+ break;
+
+ case OP_MINSTAR:
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ compile_char1_matchingpath(common, type, cc, &jumplist, TRUE);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(char_iterator_backtrack)->matchingpath);
+ set_jumps(jumplist, LABEL());
+ if (private_data_ptr == 0)
+ free_stack(common, 1);
+ break;
+
+ case OP_MINUPTO:
+ OP1(SLJIT_MOV, TMP1, 0, base, offset1);
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ OP2(SLJIT_SUB | SLJIT_SET_E, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+ add_jump(compiler, &jumplist, JUMP(SLJIT_ZERO));
+
+ OP1(SLJIT_MOV, base, offset1, TMP1, 0);
+ compile_char1_matchingpath(common, type, cc, &jumplist, TRUE);
+ OP1(SLJIT_MOV, base, offset0, STR_PTR, 0);
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(char_iterator_backtrack)->matchingpath);
+
+ set_jumps(jumplist, LABEL());
+ if (private_data_ptr == 0)
+ free_stack(common, 2);
+ break;
+
+ case OP_QUERY:
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ OP1(SLJIT_MOV, base, offset0, SLJIT_IMM, 0);
+ CMPTO(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(char_iterator_backtrack)->matchingpath);
+ jump = JUMP(SLJIT_JUMP);
+ set_jumps(CURRENT_AS(char_iterator_backtrack)->u.backtracks, LABEL());
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ OP1(SLJIT_MOV, base, offset0, SLJIT_IMM, 0);
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(char_iterator_backtrack)->matchingpath);
+ JUMPHERE(jump);
+ if (private_data_ptr == 0)
+ free_stack(common, 1);
+ break;
+
+ case OP_MINQUERY:
+ OP1(SLJIT_MOV, STR_PTR, 0, base, offset0);
+ OP1(SLJIT_MOV, base, offset0, SLJIT_IMM, 0);
+ jump = CMP(SLJIT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
+ compile_char1_matchingpath(common, type, cc, &jumplist, TRUE);
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(char_iterator_backtrack)->matchingpath);
+ set_jumps(jumplist, LABEL());
+ JUMPHERE(jump);
+ if (private_data_ptr == 0)
+ free_stack(common, 1);
+ break;
+
+ case OP_EXACT:
+ case OP_POSSTAR:
+ case OP_POSQUERY:
+ case OP_POSUPTO:
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+
+set_jumps(current->topbacktracks, LABEL());
+}
+
+static SLJIT_INLINE void compile_ref_iterator_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+PCRE2_SPTR cc = current->cc;
+BOOL ref = (*cc == OP_REF || *cc == OP_REFI);
+PCRE2_UCHAR type;
+
+type = cc[ref ? 1 + IMM2_SIZE : 1 + 2 * IMM2_SIZE];
+
+if ((type & 0x1) == 0)
+ {
+ /* Maximize case. */
+ set_jumps(current->topbacktracks, LABEL());
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ CMPTO(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(ref_iterator_backtrack)->matchingpath);
+ return;
+ }
+
+OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+CMPTO(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(ref_iterator_backtrack)->matchingpath);
+set_jumps(current->topbacktracks, LABEL());
+free_stack(common, ref ? 2 : 3);
+}
+
+static SLJIT_INLINE void compile_recurse_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+
+if (CURRENT_AS(recurse_backtrack)->inlined_pattern)
+ compile_backtrackingpath(common, current->top);
+set_jumps(current->topbacktracks, LABEL());
+if (CURRENT_AS(recurse_backtrack)->inlined_pattern)
+ return;
+
+if (common->has_set_som && common->mark_ptr != 0)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ free_stack(common, 2);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(0), TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->mark_ptr, TMP1, 0);
+ }
+else if (common->has_set_som || common->mark_ptr != 0)
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->has_set_som ? (int)(OVECTOR(0)) : common->mark_ptr, TMP2, 0);
+ }
+}
+
+static void compile_assert_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+PCRE2_SPTR cc = current->cc;
+PCRE2_UCHAR bra = OP_BRA;
+struct sljit_jump *brajump = NULL;
+
+SLJIT_ASSERT(*cc != OP_BRAMINZERO);
+if (*cc == OP_BRAZERO)
+ {
+ bra = *cc;
+ cc++;
+ }
+
+if (bra == OP_BRAZERO)
+ {
+ SLJIT_ASSERT(current->topbacktracks == NULL);
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ }
+
+if (CURRENT_AS(assert_backtrack)->framesize < 0)
+ {
+ set_jumps(current->topbacktracks, LABEL());
+
+ if (bra == OP_BRAZERO)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ CMPTO(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(assert_backtrack)->matchingpath);
+ free_stack(common, 1);
+ }
+ return;
+ }
+
+if (bra == OP_BRAZERO)
+ {
+ if (*cc == OP_ASSERT_NOT || *cc == OP_ASSERTBACK_NOT)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ CMPTO(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(assert_backtrack)->matchingpath);
+ free_stack(common, 1);
+ return;
+ }
+ free_stack(common, 1);
+ brajump = CMP(SLJIT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0);
+ }
+
+if (*cc == OP_ASSERT || *cc == OP_ASSERTBACK)
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), CURRENT_AS(assert_backtrack)->private_data_ptr);
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), CURRENT_AS(assert_backtrack)->private_data_ptr, SLJIT_MEM1(STACK_TOP), CURRENT_AS(assert_backtrack)->framesize * sizeof(sljit_sw));
+
+ set_jumps(current->topbacktracks, LABEL());
+ }
+else
+ set_jumps(current->topbacktracks, LABEL());
+
+if (bra == OP_BRAZERO)
+ {
+ /* We know there is enough place on the stack. */
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), SLJIT_IMM, 0);
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(assert_backtrack)->matchingpath);
+ JUMPHERE(brajump);
+ }
+}
+
+static void compile_bracket_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+int opcode, stacksize, alt_count, alt_max;
+int offset = 0;
+int private_data_ptr = CURRENT_AS(bracket_backtrack)->private_data_ptr;
+int repeat_ptr = 0, repeat_type = 0, repeat_count = 0;
+PCRE2_SPTR cc = current->cc;
+PCRE2_SPTR ccbegin;
+PCRE2_SPTR ccprev;
+PCRE2_UCHAR bra = OP_BRA;
+PCRE2_UCHAR ket;
+assert_backtrack *assert;
+sljit_uw *next_update_addr = NULL;
+BOOL has_alternatives;
+BOOL needs_control_head = FALSE;
+struct sljit_jump *brazero = NULL;
+struct sljit_jump *alt1 = NULL;
+struct sljit_jump *alt2 = NULL;
+struct sljit_jump *once = NULL;
+struct sljit_jump *cond = NULL;
+struct sljit_label *rmin_label = NULL;
+struct sljit_label *exact_label = NULL;
+
+if (*cc == OP_BRAZERO || *cc == OP_BRAMINZERO)
+ {
+ bra = *cc;
+ cc++;
+ }
+
+opcode = *cc;
+ccbegin = bracketend(cc) - 1 - LINK_SIZE;
+ket = *ccbegin;
+if (ket == OP_KET && PRIVATE_DATA(ccbegin) != 0)
+ {
+ repeat_ptr = PRIVATE_DATA(ccbegin);
+ repeat_type = PRIVATE_DATA(ccbegin + 2);
+ repeat_count = PRIVATE_DATA(ccbegin + 3);
+ SLJIT_ASSERT(repeat_type != 0 && repeat_count != 0);
+ if (repeat_type == OP_UPTO)
+ ket = OP_KETRMAX;
+ if (repeat_type == OP_MINUPTO)
+ ket = OP_KETRMIN;
+ }
+ccbegin = cc;
+cc += GET(cc, 1);
+has_alternatives = *cc == OP_ALT;
+if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND))
+ has_alternatives = (ccbegin[1 + LINK_SIZE] >= OP_ASSERT && ccbegin[1 + LINK_SIZE] <= OP_ASSERTBACK_NOT) || CURRENT_AS(bracket_backtrack)->u.condfailed != NULL;
+if (opcode == OP_CBRA || opcode == OP_SCBRA)
+ offset = (GET2(ccbegin, 1 + LINK_SIZE)) << 1;
+if (SLJIT_UNLIKELY(opcode == OP_COND) && (*cc == OP_KETRMAX || *cc == OP_KETRMIN))
+ opcode = OP_SCOND;
+if (SLJIT_UNLIKELY(opcode == OP_ONCE_NC))
+ opcode = OP_ONCE;
+
+alt_max = has_alternatives ? no_alternatives(ccbegin) : 0;
+
+/* Decoding the needs_control_head in framesize. */
+if (opcode == OP_ONCE)
+ {
+ needs_control_head = (CURRENT_AS(bracket_backtrack)->u.framesize & 0x1) != 0;
+ CURRENT_AS(bracket_backtrack)->u.framesize >>= 1;
+ }
+
+if (ket != OP_KET && repeat_type != 0)
+ {
+ /* TMP1 is used in OP_KETRMIN below. */
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ if (repeat_type == OP_UPTO)
+ OP2(SLJIT_ADD, SLJIT_MEM1(SLJIT_SP), repeat_ptr, TMP1, 0, SLJIT_IMM, 1);
+ else
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), repeat_ptr, TMP1, 0);
+ }
+
+if (ket == OP_KETRMAX)
+ {
+ if (bra == OP_BRAZERO)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ brazero = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, 0);
+ }
+ }
+else if (ket == OP_KETRMIN)
+ {
+ if (bra != OP_BRAMINZERO)
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ if (repeat_type != 0)
+ {
+ /* TMP1 was set a few lines above. */
+ CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0, CURRENT_AS(bracket_backtrack)->recursive_matchingpath);
+ /* Drop STR_PTR for non-greedy plus quantifier. */
+ if (opcode != OP_ONCE)
+ free_stack(common, 1);
+ }
+ else if (opcode >= OP_SBRA || opcode == OP_ONCE)
+ {
+ /* Checking zero-length iteration. */
+ if (opcode != OP_ONCE || CURRENT_AS(bracket_backtrack)->u.framesize < 0)
+ CMPTO(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr, CURRENT_AS(bracket_backtrack)->recursive_matchingpath);
+ else
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ CMPTO(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_MEM1(TMP1), (CURRENT_AS(bracket_backtrack)->u.framesize + 1) * sizeof(sljit_sw), CURRENT_AS(bracket_backtrack)->recursive_matchingpath);
+ }
+ /* Drop STR_PTR for non-greedy plus quantifier. */
+ if (opcode != OP_ONCE)
+ free_stack(common, 1);
+ }
+ else
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(bracket_backtrack)->recursive_matchingpath);
+ }
+ rmin_label = LABEL();
+ if (repeat_type != 0)
+ OP2(SLJIT_ADD, SLJIT_MEM1(SLJIT_SP), repeat_ptr, SLJIT_MEM1(SLJIT_SP), repeat_ptr, SLJIT_IMM, 1);
+ }
+else if (bra == OP_BRAZERO)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ brazero = CMP(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0);
+ }
+else if (repeat_type == OP_EXACT)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), repeat_ptr, SLJIT_IMM, 1);
+ exact_label = LABEL();
+ }
+
+if (offset != 0)
+ {
+ if (common->capture_last_ptr != 0)
+ {
+ SLJIT_ASSERT(common->optimized_cbracket[offset >> 1] == 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->capture_last_ptr, TMP1, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(2));
+ free_stack(common, 3);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset), TMP2, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1), TMP1, 0);
+ }
+ else if (common->optimized_cbracket[offset >> 1] == 0)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ free_stack(common, 2);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset), TMP1, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1), TMP2, 0);
+ }
+ }
+
+if (SLJIT_UNLIKELY(opcode == OP_ONCE))
+ {
+ if (CURRENT_AS(bracket_backtrack)->u.framesize >= 0)
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ }
+ once = JUMP(SLJIT_JUMP);
+ }
+else if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND))
+ {
+ if (has_alternatives)
+ {
+ /* Always exactly one alternative. */
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+
+ alt_max = 2;
+ alt1 = CMP(SLJIT_EQUAL, TMP1, 0, SLJIT_IMM, sizeof(sljit_uw));
+ }
+ }
+else if (has_alternatives)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+
+ if (alt_max > 4)
+ {
+ /* Table jump if alt_max is greater than 4. */
+ next_update_addr = allocate_read_only_data(common, alt_max * sizeof(sljit_uw));
+ if (SLJIT_UNLIKELY(next_update_addr == NULL))
+ return;
+ sljit_emit_ijump(compiler, SLJIT_JUMP, SLJIT_MEM1(TMP1), (sljit_sw)next_update_addr);
+ add_label_addr(common, next_update_addr++);
+ }
+ else
+ {
+ if (alt_max == 4)
+ alt2 = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 2 * sizeof(sljit_uw));
+ alt1 = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, sizeof(sljit_uw));
+ }
+ }
+
+COMPILE_BACKTRACKINGPATH(current->top);
+if (current->topbacktracks)
+ set_jumps(current->topbacktracks, LABEL());
+
+if (SLJIT_UNLIKELY(opcode == OP_COND) || SLJIT_UNLIKELY(opcode == OP_SCOND))
+ {
+ /* Conditional block always has at most one alternative. */
+ if (ccbegin[1 + LINK_SIZE] >= OP_ASSERT && ccbegin[1 + LINK_SIZE] <= OP_ASSERTBACK_NOT)
+ {
+ SLJIT_ASSERT(has_alternatives);
+ assert = CURRENT_AS(bracket_backtrack)->u.assert;
+ if (assert->framesize >= 0 && (ccbegin[1 + LINK_SIZE] == OP_ASSERT || ccbegin[1 + LINK_SIZE] == OP_ASSERTBACK))
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), assert->private_data_ptr);
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), assert->private_data_ptr, SLJIT_MEM1(STACK_TOP), assert->framesize * sizeof(sljit_sw));
+ }
+ cond = JUMP(SLJIT_JUMP);
+ set_jumps(CURRENT_AS(bracket_backtrack)->u.assert->condfailed, LABEL());
+ }
+ else if (CURRENT_AS(bracket_backtrack)->u.condfailed != NULL)
+ {
+ SLJIT_ASSERT(has_alternatives);
+ cond = JUMP(SLJIT_JUMP);
+ set_jumps(CURRENT_AS(bracket_backtrack)->u.condfailed, LABEL());
+ }
+ else
+ SLJIT_ASSERT(!has_alternatives);
+ }
+
+if (has_alternatives)
+ {
+ alt_count = sizeof(sljit_uw);
+ do
+ {
+ current->top = NULL;
+ current->topbacktracks = NULL;
+ current->nextbacktracks = NULL;
+ /* Conditional blocks always have an additional alternative, even if it is empty. */
+ if (*cc == OP_ALT)
+ {
+ ccprev = cc + 1 + LINK_SIZE;
+ cc += GET(cc, 1);
+ if (opcode != OP_COND && opcode != OP_SCOND)
+ {
+ if (opcode != OP_ONCE)
+ {
+ if (private_data_ptr != 0)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);
+ else
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ }
+ else
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(needs_control_head ? 1 : 0));
+ }
+ compile_matchingpath(common, ccprev, cc, current);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return;
+ }
+
+ /* Instructions after the current alternative is successfully matched. */
+ /* There is a similar code in compile_bracket_matchingpath. */
+ if (opcode == OP_ONCE)
+ match_once_common(common, ket, CURRENT_AS(bracket_backtrack)->u.framesize, private_data_ptr, has_alternatives, needs_control_head);
+
+ stacksize = 0;
+ if (repeat_type == OP_MINUPTO)
+ {
+ /* We need to preserve the counter. TMP2 will be used below. */
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), repeat_ptr);
+ stacksize++;
+ }
+ if (ket != OP_KET || bra != OP_BRA)
+ stacksize++;
+ if (offset != 0)
+ {
+ if (common->capture_last_ptr != 0)
+ stacksize++;
+ if (common->optimized_cbracket[offset >> 1] == 0)
+ stacksize += 2;
+ }
+ if (opcode != OP_ONCE)
+ stacksize++;
+
+ if (stacksize > 0)
+ allocate_stack(common, stacksize);
+
+ stacksize = 0;
+ if (repeat_type == OP_MINUPTO)
+ {
+ /* TMP2 was set above. */
+ OP2(SLJIT_SUB, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP2, 0, SLJIT_IMM, 1);
+ stacksize++;
+ }
+
+ if (ket != OP_KET || bra != OP_BRA)
+ {
+ if (ket != OP_KET)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), STR_PTR, 0);
+ else
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, 0);
+ stacksize++;
+ }
+
+ if (offset != 0)
+ stacksize = match_capture_common(common, stacksize, offset, private_data_ptr);
+
+ if (opcode != OP_ONCE)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), SLJIT_IMM, alt_count);
+
+ if (offset != 0 && ket == OP_KETRMAX && common->optimized_cbracket[offset >> 1] != 0)
+ {
+ /* If ket is not OP_KETRMAX, this code path is executed after the jump to alternative_matchingpath. */
+ SLJIT_ASSERT(private_data_ptr == OVECTOR(offset + 0));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1), STR_PTR, 0);
+ }
+
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(bracket_backtrack)->alternative_matchingpath);
+
+ if (opcode != OP_ONCE)
+ {
+ if (alt_max > 4)
+ add_label_addr(common, next_update_addr++);
+ else
+ {
+ if (alt_count != 2 * sizeof(sljit_uw))
+ {
+ JUMPHERE(alt1);
+ if (alt_max == 3 && alt_count == sizeof(sljit_uw))
+ alt2 = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 2 * sizeof(sljit_uw));
+ }
+ else
+ {
+ JUMPHERE(alt2);
+ if (alt_max == 4)
+ alt1 = CMP(SLJIT_GREATER_EQUAL, TMP1, 0, SLJIT_IMM, 3 * sizeof(sljit_uw));
+ }
+ }
+ alt_count += sizeof(sljit_uw);
+ }
+
+ COMPILE_BACKTRACKINGPATH(current->top);
+ if (current->topbacktracks)
+ set_jumps(current->topbacktracks, LABEL());
+ SLJIT_ASSERT(!current->nextbacktracks);
+ }
+ while (*cc == OP_ALT);
+
+ if (cond != NULL)
+ {
+ SLJIT_ASSERT(opcode == OP_COND || opcode == OP_SCOND);
+ assert = CURRENT_AS(bracket_backtrack)->u.assert;
+ if ((ccbegin[1 + LINK_SIZE] == OP_ASSERT_NOT || ccbegin[1 + LINK_SIZE] == OP_ASSERTBACK_NOT) && assert->framesize >= 0)
+ {
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), assert->private_data_ptr);
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), assert->private_data_ptr, SLJIT_MEM1(STACK_TOP), assert->framesize * sizeof(sljit_sw));
+ }
+ JUMPHERE(cond);
+ }
+
+ /* Free the STR_PTR. */
+ if (private_data_ptr == 0)
+ free_stack(common, 1);
+ }
+
+if (offset != 0)
+ {
+ /* Using both tmp register is better for instruction scheduling. */
+ if (common->optimized_cbracket[offset >> 1] != 0)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ free_stack(common, 2);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset), TMP1, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1), TMP2, 0);
+ }
+ else
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, TMP1, 0);
+ }
+ }
+else if (opcode == OP_SBRA || opcode == OP_SCOND)
+ {
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ }
+else if (opcode == OP_ONCE)
+ {
+ cc = ccbegin + GET(ccbegin, 1);
+ stacksize = needs_control_head ? 1 : 0;
+
+ if (CURRENT_AS(bracket_backtrack)->u.framesize >= 0)
+ {
+ /* Reset head and drop saved frame. */
+ stacksize += CURRENT_AS(bracket_backtrack)->u.framesize + ((ket != OP_KET || *cc == OP_ALT) ? 2 : 1);
+ }
+ else if (ket == OP_KETRMAX || (*cc == OP_ALT && ket != OP_KETRMIN))
+ {
+ /* The STR_PTR must be released. */
+ stacksize++;
+ }
+
+ if (stacksize > 0)
+ free_stack(common, stacksize);
+
+ JUMPHERE(once);
+ /* Restore previous private_data_ptr */
+ if (CURRENT_AS(bracket_backtrack)->u.framesize >= 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, SLJIT_MEM1(STACK_TOP), CURRENT_AS(bracket_backtrack)->u.framesize * sizeof(sljit_sw));
+ else if (ket == OP_KETRMIN)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ /* See the comment below. */
+ free_stack(common, 2);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), private_data_ptr, TMP1, 0);
+ }
+ }
+
+if (repeat_type == OP_EXACT)
+ {
+ OP2(SLJIT_ADD, TMP1, 0, SLJIT_MEM1(SLJIT_SP), repeat_ptr, SLJIT_IMM, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), repeat_ptr, TMP1, 0);
+ CMPTO(SLJIT_LESS_EQUAL, TMP1, 0, SLJIT_IMM, repeat_count, exact_label);
+ }
+else if (ket == OP_KETRMAX)
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ if (bra != OP_BRAZERO)
+ free_stack(common, 1);
+
+ CMPTO(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, 0, CURRENT_AS(bracket_backtrack)->recursive_matchingpath);
+ if (bra == OP_BRAZERO)
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(bracket_backtrack)->zero_matchingpath);
+ JUMPHERE(brazero);
+ free_stack(common, 1);
+ }
+ }
+else if (ket == OP_KETRMIN)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+
+ /* OP_ONCE removes everything in case of a backtrack, so we don't
+ need to explicitly release the STR_PTR. The extra release would
+ affect badly the free_stack(2) above. */
+ if (opcode != OP_ONCE)
+ free_stack(common, 1);
+ CMPTO(SLJIT_NOT_EQUAL, TMP1, 0, SLJIT_IMM, 0, rmin_label);
+ if (opcode == OP_ONCE)
+ free_stack(common, bra == OP_BRAMINZERO ? 2 : 1);
+ else if (bra == OP_BRAMINZERO)
+ free_stack(common, 1);
+ }
+else if (bra == OP_BRAZERO)
+ {
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ JUMPTO(SLJIT_JUMP, CURRENT_AS(bracket_backtrack)->zero_matchingpath);
+ JUMPHERE(brazero);
+ }
+}
+
+static SLJIT_INLINE void compile_bracketpos_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+int offset;
+struct sljit_jump *jump;
+
+if (CURRENT_AS(bracketpos_backtrack)->framesize < 0)
+ {
+ if (*current->cc == OP_CBRAPOS || *current->cc == OP_SCBRAPOS)
+ {
+ offset = (GET2(current->cc, 1 + LINK_SIZE)) << 1;
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(1));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset), TMP1, 0);
+ if (common->capture_last_ptr != 0)
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(2));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1), TMP2, 0);
+ if (common->capture_last_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->capture_last_ptr, TMP1, 0);
+ }
+ set_jumps(current->topbacktracks, LABEL());
+ free_stack(common, CURRENT_AS(bracketpos_backtrack)->stacksize);
+ return;
+ }
+
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), CURRENT_AS(bracketpos_backtrack)->private_data_ptr);
+add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+
+if (current->topbacktracks)
+ {
+ jump = JUMP(SLJIT_JUMP);
+ set_jumps(current->topbacktracks, LABEL());
+ /* Drop the stack frame. */
+ free_stack(common, CURRENT_AS(bracketpos_backtrack)->stacksize);
+ JUMPHERE(jump);
+ }
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), CURRENT_AS(bracketpos_backtrack)->private_data_ptr, SLJIT_MEM1(STACK_TOP), CURRENT_AS(bracketpos_backtrack)->framesize * sizeof(sljit_sw));
+}
+
+static SLJIT_INLINE void compile_braminzero_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+assert_backtrack backtrack;
+
+current->top = NULL;
+current->topbacktracks = NULL;
+current->nextbacktracks = NULL;
+if (current->cc[1] > OP_ASSERTBACK_NOT)
+ {
+ /* Manual call of compile_bracket_matchingpath and compile_bracket_backtrackingpath. */
+ compile_bracket_matchingpath(common, current->cc, current);
+ compile_bracket_backtrackingpath(common, current->top);
+ }
+else
+ {
+ memset(&backtrack, 0, sizeof(backtrack));
+ backtrack.common.cc = current->cc;
+ backtrack.matchingpath = CURRENT_AS(braminzero_backtrack)->matchingpath;
+ /* Manual call of compile_assert_matchingpath. */
+ compile_assert_matchingpath(common, current->cc, &backtrack, FALSE);
+ }
+SLJIT_ASSERT(!current->nextbacktracks && !current->topbacktracks);
+}
+
+static SLJIT_INLINE void compile_control_verb_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+PCRE2_UCHAR opcode = *current->cc;
+struct sljit_label *loop;
+struct sljit_jump *jump;
+
+if (opcode == OP_THEN || opcode == OP_THEN_ARG)
+ {
+ if (common->then_trap != NULL)
+ {
+ SLJIT_ASSERT(common->control_head_ptr != 0);
+
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, type_then_trap);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_IMM, common->then_trap->start);
+ jump = JUMP(SLJIT_JUMP);
+
+ loop = LABEL();
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(STACK_TOP), -(int)sizeof(sljit_sw));
+ JUMPHERE(jump);
+ CMPTO(SLJIT_NOT_EQUAL, SLJIT_MEM1(STACK_TOP), -(int)(2 * sizeof(sljit_sw)), TMP1, 0, loop);
+ CMPTO(SLJIT_NOT_EQUAL, SLJIT_MEM1(STACK_TOP), -(int)(3 * sizeof(sljit_sw)), TMP2, 0, loop);
+ add_jump(compiler, &common->then_trap->quit, JUMP(SLJIT_JUMP));
+ return;
+ }
+ else if (common->positive_assert)
+ {
+ add_jump(compiler, &common->positive_assert_quit, JUMP(SLJIT_JUMP));
+ return;
+ }
+ }
+
+if (common->local_exit)
+ {
+ if (common->quit_label == NULL)
+ add_jump(compiler, &common->quit, JUMP(SLJIT_JUMP));
+ else
+ JUMPTO(SLJIT_JUMP, common->quit_label);
+ return;
+ }
+
+if (opcode == OP_SKIP_ARG)
+ {
+ SLJIT_ASSERT(common->control_head_ptr != 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS0, STACK_TOP, 0);
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_IMM, (sljit_sw)(current->cc + 2));
+ sljit_emit_ijump(compiler, SLJIT_CALL2, SLJIT_IMM, SLJIT_FUNC_OFFSET(do_search_mark));
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+
+ OP1(SLJIT_MOV, STR_PTR, 0, TMP1, 0);
+ add_jump(compiler, &common->reset_match, CMP(SLJIT_NOT_EQUAL, STR_PTR, 0, SLJIT_IMM, -1));
+ return;
+ }
+
+if (opcode == OP_SKIP)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+else
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_IMM, 0);
+add_jump(compiler, &common->reset_match, JUMP(SLJIT_JUMP));
+}
+
+static SLJIT_INLINE void compile_then_trap_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+struct sljit_jump *jump;
+int size;
+
+if (CURRENT_AS(then_trap_backtrack)->then_trap)
+ {
+ common->then_trap = CURRENT_AS(then_trap_backtrack)->then_trap;
+ return;
+ }
+
+size = CURRENT_AS(then_trap_backtrack)->framesize;
+size = 3 + (size < 0 ? 0 : size);
+
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(size - 3));
+free_stack(common, size);
+jump = JUMP(SLJIT_JUMP);
+
+set_jumps(CURRENT_AS(then_trap_backtrack)->quit, LABEL());
+/* STACK_TOP is set by THEN. */
+if (CURRENT_AS(then_trap_backtrack)->framesize >= 0)
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+free_stack(common, 3);
+
+JUMPHERE(jump);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, TMP1, 0);
+}
+
+static void compile_backtrackingpath(compiler_common *common, struct backtrack_common *current)
+{
+DEFINE_COMPILER;
+then_trap_backtrack *save_then_trap = common->then_trap;
+
+while (current)
+ {
+ if (current->nextbacktracks != NULL)
+ set_jumps(current->nextbacktracks, LABEL());
+ switch(*current->cc)
+ {
+ case OP_SET_SOM:
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(0), TMP1, 0);
+ break;
+
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_QUERY:
+ case OP_MINQUERY:
+ case OP_UPTO:
+ case OP_MINUPTO:
+ case OP_EXACT:
+ case OP_POSSTAR:
+ case OP_POSPLUS:
+ case OP_POSQUERY:
+ case OP_POSUPTO:
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_UPTOI:
+ case OP_MINUPTOI:
+ case OP_EXACTI:
+ case OP_POSSTARI:
+ case OP_POSPLUSI:
+ case OP_POSQUERYI:
+ case OP_POSUPTOI:
+ case OP_NOTSTAR:
+ case OP_NOTMINSTAR:
+ case OP_NOTPLUS:
+ case OP_NOTMINPLUS:
+ case OP_NOTQUERY:
+ case OP_NOTMINQUERY:
+ case OP_NOTUPTO:
+ case OP_NOTMINUPTO:
+ case OP_NOTEXACT:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSUPTO:
+ case OP_NOTSTARI:
+ case OP_NOTMINSTARI:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUSI:
+ case OP_NOTQUERYI:
+ case OP_NOTMINQUERYI:
+ case OP_NOTUPTOI:
+ case OP_NOTMINUPTOI:
+ case OP_NOTEXACTI:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSUPTOI:
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEEXACT:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEPOSQUERY:
+ case OP_TYPEPOSUPTO:
+ case OP_CLASS:
+ case OP_NCLASS:
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8
+ case OP_XCLASS:
+#endif
+ compile_iterator_backtrackingpath(common, current);
+ break;
+
+ case OP_REF:
+ case OP_REFI:
+ case OP_DNREF:
+ case OP_DNREFI:
+ compile_ref_iterator_backtrackingpath(common, current);
+ break;
+
+ case OP_RECURSE:
+ compile_recurse_backtrackingpath(common, current);
+ break;
+
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ compile_assert_backtrackingpath(common, current);
+ break;
+
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_BRA:
+ case OP_CBRA:
+ case OP_COND:
+ case OP_SBRA:
+ case OP_SCBRA:
+ case OP_SCOND:
+ compile_bracket_backtrackingpath(common, current);
+ break;
+
+ case OP_BRAZERO:
+ if (current->cc[1] > OP_ASSERTBACK_NOT)
+ compile_bracket_backtrackingpath(common, current);
+ else
+ compile_assert_backtrackingpath(common, current);
+ break;
+
+ case OP_BRAPOS:
+ case OP_CBRAPOS:
+ case OP_SBRAPOS:
+ case OP_SCBRAPOS:
+ case OP_BRAPOSZERO:
+ compile_bracketpos_backtrackingpath(common, current);
+ break;
+
+ case OP_BRAMINZERO:
+ compile_braminzero_backtrackingpath(common, current);
+ break;
+
+ case OP_MARK:
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), STACK(common->has_skip_arg ? 4 : 0));
+ if (common->has_skip_arg)
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+ free_stack(common, common->has_skip_arg ? 5 : 1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->mark_ptr, TMP1, 0);
+ if (common->has_skip_arg)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, TMP2, 0);
+ break;
+
+ case OP_THEN:
+ case OP_THEN_ARG:
+ case OP_PRUNE:
+ case OP_PRUNE_ARG:
+ case OP_SKIP:
+ case OP_SKIP_ARG:
+ compile_control_verb_backtrackingpath(common, current);
+ break;
+
+ case OP_COMMIT:
+ if (!common->local_exit)
+ OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE2_ERROR_NOMATCH);
+ if (common->quit_label == NULL)
+ add_jump(compiler, &common->quit, JUMP(SLJIT_JUMP));
+ else
+ JUMPTO(SLJIT_JUMP, common->quit_label);
+ break;
+
+ case OP_CALLOUT:
+ case OP_CALLOUT_STR:
+ case OP_FAIL:
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
+ set_jumps(current->topbacktracks, LABEL());
+ break;
+
+ case OP_THEN_TRAP:
+ /* A virtual opcode for then traps. */
+ compile_then_trap_backtrackingpath(common, current);
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+ current = current->prev;
+ }
+common->then_trap = save_then_trap;
+}
+
+static SLJIT_INLINE void compile_recurse(compiler_common *common)
+{
+DEFINE_COMPILER;
+PCRE2_SPTR cc = common->start + common->currententry->start;
+PCRE2_SPTR ccbegin = cc + 1 + LINK_SIZE + (*cc == OP_BRA ? 0 : IMM2_SIZE);
+PCRE2_SPTR ccend = bracketend(cc) - (1 + LINK_SIZE);
+BOOL needs_control_head;
+int framesize = get_framesize(common, cc, NULL, TRUE, &needs_control_head);
+int private_data_size = get_private_data_copy_length(common, ccbegin, ccend, needs_control_head);
+int alternativesize;
+BOOL needs_frame;
+backtrack_common altbacktrack;
+struct sljit_jump *jump;
+
+/* Recurse captures then. */
+common->then_trap = NULL;
+
+SLJIT_ASSERT(*cc == OP_BRA || *cc == OP_CBRA || *cc == OP_CBRAPOS || *cc == OP_SCBRA || *cc == OP_SCBRAPOS);
+needs_frame = framesize >= 0;
+if (!needs_frame)
+ framesize = 0;
+alternativesize = *(cc + GET(cc, 1)) == OP_ALT ? 1 : 0;
+
+SLJIT_ASSERT(common->currententry->entry == NULL && common->recursive_head_ptr != 0);
+common->currententry->entry = LABEL();
+set_jumps(common->currententry->calls, common->currententry->entry);
+
+sljit_emit_fast_enter(compiler, TMP2, 0);
+count_match(common);
+allocate_stack(common, private_data_size + framesize + alternativesize);
+OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(private_data_size + framesize + alternativesize - 1), TMP2, 0);
+copy_private_data(common, ccbegin, ccend, TRUE, private_data_size + framesize + alternativesize, framesize + alternativesize, needs_control_head);
+if (needs_control_head)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_IMM, 0);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->recursive_head_ptr, STACK_TOP, 0);
+if (needs_frame)
+ init_frame(common, cc, NULL, framesize + alternativesize - 1, alternativesize, TRUE);
+
+if (alternativesize > 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), STR_PTR, 0);
+
+memset(&altbacktrack, 0, sizeof(backtrack_common));
+common->quit_label = NULL;
+common->accept_label = NULL;
+common->quit = NULL;
+common->accept = NULL;
+altbacktrack.cc = ccbegin;
+cc += GET(cc, 1);
+while (1)
+ {
+ altbacktrack.top = NULL;
+ altbacktrack.topbacktracks = NULL;
+
+ if (altbacktrack.cc != ccbegin)
+ OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(0));
+
+ compile_matchingpath(common, altbacktrack.cc, cc, &altbacktrack);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return;
+
+ add_jump(compiler, &common->accept, JUMP(SLJIT_JUMP));
+
+ compile_backtrackingpath(common, altbacktrack.top);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ return;
+ set_jumps(altbacktrack.topbacktracks, LABEL());
+
+ if (*cc != OP_ALT)
+ break;
+
+ altbacktrack.cc = cc + 1 + LINK_SIZE;
+ cc += GET(cc, 1);
+ }
+
+/* None of them matched. */
+OP1(SLJIT_MOV, TMP3, 0, SLJIT_IMM, 0);
+jump = JUMP(SLJIT_JUMP);
+
+if (common->quit != NULL)
+ {
+ set_jumps(common->quit, LABEL());
+ OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), common->recursive_head_ptr);
+ if (needs_frame)
+ {
+ OP2(SLJIT_SUB, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + alternativesize) * sizeof(sljit_sw));
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + alternativesize) * sizeof(sljit_sw));
+ }
+ OP1(SLJIT_MOV, TMP3, 0, SLJIT_IMM, 0);
+ common->quit = NULL;
+ add_jump(compiler, &common->quit, JUMP(SLJIT_JUMP));
+ }
+
+set_jumps(common->accept, LABEL());
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(SLJIT_SP), common->recursive_head_ptr);
+if (needs_frame)
+ {
+ OP2(SLJIT_SUB, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + alternativesize) * sizeof(sljit_sw));
+ add_jump(compiler, &common->revertframes, JUMP(SLJIT_FAST_CALL));
+ OP2(SLJIT_ADD, STACK_TOP, 0, STACK_TOP, 0, SLJIT_IMM, (framesize + alternativesize) * sizeof(sljit_sw));
+ }
+OP1(SLJIT_MOV, TMP3, 0, SLJIT_IMM, 1);
+
+JUMPHERE(jump);
+if (common->quit != NULL)
+ set_jumps(common->quit, LABEL());
+copy_private_data(common, ccbegin, ccend, FALSE, private_data_size + framesize + alternativesize, framesize + alternativesize, needs_control_head);
+free_stack(common, private_data_size + framesize + alternativesize);
+if (needs_control_head)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(STACK_TOP), 2 * sizeof(sljit_sw));
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), sizeof(sljit_sw));
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->recursive_head_ptr, TMP1, 0);
+ OP1(SLJIT_MOV, TMP1, 0, TMP3, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, TMP2, 0);
+ }
+else
+ {
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(STACK_TOP), sizeof(sljit_sw));
+ OP1(SLJIT_MOV, TMP1, 0, TMP3, 0);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->recursive_head_ptr, TMP2, 0);
+ }
+sljit_emit_fast_return(compiler, SLJIT_MEM1(STACK_TOP), 0);
+}
+
+#undef COMPILE_BACKTRACKINGPATH
+#undef CURRENT_AS
+
+static int jit_compile(pcre2_code *code, sljit_u32 mode)
+{
+pcre2_real_code *re = (pcre2_real_code *)code;
+struct sljit_compiler *compiler;
+backtrack_common rootbacktrack;
+compiler_common common_data;
+compiler_common *common = &common_data;
+const sljit_u8 *tables = re->tables;
+void *allocator_data = &re->memctl;
+int private_data_size;
+PCRE2_SPTR ccend;
+executable_functions *functions;
+void *executable_func;
+sljit_uw executable_size;
+sljit_uw total_length;
+label_addr_list *label_addr;
+struct sljit_label *mainloop_label = NULL;
+struct sljit_label *continue_match_label;
+struct sljit_label *empty_match_found_label = NULL;
+struct sljit_label *empty_match_backtrack_label = NULL;
+struct sljit_label *reset_match_label;
+struct sljit_label *quit_label;
+struct sljit_jump *jump;
+struct sljit_jump *minlength_check_failed = NULL;
+struct sljit_jump *reqbyte_notfound = NULL;
+struct sljit_jump *empty_match = NULL;
+
+SLJIT_ASSERT(tables);
+
+memset(&rootbacktrack, 0, sizeof(backtrack_common));
+memset(common, 0, sizeof(compiler_common));
+common->name_table = (PCRE2_SPTR)((uint8_t *)re + sizeof(pcre2_real_code));
+rootbacktrack.cc = common->name_table + re->name_count * re->name_entry_size;
+
+common->start = rootbacktrack.cc;
+common->read_only_data_head = NULL;
+common->fcc = tables + fcc_offset;
+common->lcc = (sljit_sw)(tables + lcc_offset);
+common->mode = mode;
+common->might_be_empty = re->minlength == 0;
+common->nltype = NLTYPE_FIXED;
+switch(re->newline_convention)
+ {
+ case PCRE2_NEWLINE_CR: common->newline = CHAR_CR; break;
+ case PCRE2_NEWLINE_LF: common->newline = CHAR_NL; break;
+ case PCRE2_NEWLINE_CRLF: common->newline = (CHAR_CR << 8) | CHAR_NL; break;
+ case PCRE2_NEWLINE_ANY: common->newline = (CHAR_CR << 8) | CHAR_NL; common->nltype = NLTYPE_ANY; break;
+ case PCRE2_NEWLINE_ANYCRLF: common->newline = (CHAR_CR << 8) | CHAR_NL; common->nltype = NLTYPE_ANYCRLF; break;
+ default: return PCRE2_ERROR_INTERNAL;
+ }
+common->nlmax = READ_CHAR_MAX;
+common->nlmin = 0;
+if (re->bsr_convention == PCRE2_BSR_UNICODE)
+ common->bsr_nltype = NLTYPE_ANY;
+else if (re->bsr_convention == PCRE2_BSR_ANYCRLF)
+ common->bsr_nltype = NLTYPE_ANYCRLF;
+else
+ {
+#ifdef BSR_ANYCRLF
+ common->bsr_nltype = NLTYPE_ANYCRLF;
+#else
+ common->bsr_nltype = NLTYPE_ANY;
+#endif
+ }
+common->bsr_nlmax = READ_CHAR_MAX;
+common->bsr_nlmin = 0;
+common->endonly = (re->overall_options & PCRE2_DOLLAR_ENDONLY) != 0;
+common->ctypes = (sljit_sw)(tables + ctypes_offset);
+common->name_count = re->name_count;
+common->name_entry_size = re->name_entry_size;
+common->unset_backref = (re->overall_options & PCRE2_MATCH_UNSET_BACKREF) != 0;
+common->alt_circumflex = (re->overall_options & PCRE2_ALT_CIRCUMFLEX) != 0;
+#ifdef SUPPORT_UNICODE
+/* PCRE_UTF[16|32] have the same value as PCRE_UTF8. */
+common->utf = (re->overall_options & PCRE2_UTF) != 0;
+common->use_ucp = (re->overall_options & PCRE2_UCP) != 0;
+if (common->utf)
+ {
+ if (common->nltype == NLTYPE_ANY)
+ common->nlmax = 0x2029;
+ else if (common->nltype == NLTYPE_ANYCRLF)
+ common->nlmax = (CHAR_CR > CHAR_NL) ? CHAR_CR : CHAR_NL;
+ else
+ {
+ /* We only care about the first newline character. */
+ common->nlmax = common->newline & 0xff;
+ }
+
+ if (common->nltype == NLTYPE_FIXED)
+ common->nlmin = common->newline & 0xff;
+ else
+ common->nlmin = (CHAR_CR < CHAR_NL) ? CHAR_CR : CHAR_NL;
+
+ if (common->bsr_nltype == NLTYPE_ANY)
+ common->bsr_nlmax = 0x2029;
+ else
+ common->bsr_nlmax = (CHAR_CR > CHAR_NL) ? CHAR_CR : CHAR_NL;
+ common->bsr_nlmin = (CHAR_CR < CHAR_NL) ? CHAR_CR : CHAR_NL;
+ }
+#endif /* SUPPORT_UNICODE */
+ccend = bracketend(common->start);
+
+/* Calculate the local space size on the stack. */
+common->ovector_start = LIMIT_MATCH + sizeof(sljit_sw);
+common->optimized_cbracket = (sljit_u8 *)SLJIT_MALLOC(re->top_bracket + 1, allocator_data);
+if (!common->optimized_cbracket)
+ return PCRE2_ERROR_NOMEMORY;
+#if defined DEBUG_FORCE_UNOPTIMIZED_CBRAS && DEBUG_FORCE_UNOPTIMIZED_CBRAS == 1
+memset(common->optimized_cbracket, 0, re->top_bracket + 1);
+#else
+memset(common->optimized_cbracket, 1, re->top_bracket + 1);
+#endif
+
+SLJIT_ASSERT(*common->start == OP_BRA && ccend[-(1 + LINK_SIZE)] == OP_KET);
+#if defined DEBUG_FORCE_UNOPTIMIZED_CBRAS && DEBUG_FORCE_UNOPTIMIZED_CBRAS == 2
+common->capture_last_ptr = common->ovector_start;
+common->ovector_start += sizeof(sljit_sw);
+#endif
+if (!check_opcode_types(common, common->start, ccend))
+ {
+ SLJIT_FREE(common->optimized_cbracket, allocator_data);
+ return PCRE2_ERROR_NOMEMORY;
+ }
+
+/* Checking flags and updating ovector_start. */
+if (mode == PCRE2_JIT_COMPLETE && (re->flags & PCRE2_LASTSET) != 0 && (re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0)
+ {
+ common->req_char_ptr = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ }
+if (mode != PCRE2_JIT_COMPLETE)
+ {
+ common->start_used_ptr = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ if (mode == PCRE2_JIT_PARTIAL_SOFT)
+ {
+ common->hit_start = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ }
+ }
+if ((re->overall_options & (PCRE2_FIRSTLINE | PCRE2_USE_OFFSET_LIMIT)) != 0)
+ {
+ common->match_end_ptr = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ }
+#if defined DEBUG_FORCE_CONTROL_HEAD && DEBUG_FORCE_CONTROL_HEAD
+common->control_head_ptr = 1;
+#endif
+if (common->control_head_ptr != 0)
+ {
+ common->control_head_ptr = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ }
+if (common->has_set_som)
+ {
+ /* Saving the real start pointer is necessary. */
+ common->start_ptr = common->ovector_start;
+ common->ovector_start += sizeof(sljit_sw);
+ }
+
+/* Aligning ovector to even number of sljit words. */
+if ((common->ovector_start & sizeof(sljit_sw)) != 0)
+ common->ovector_start += sizeof(sljit_sw);
+
+if (common->start_ptr == 0)
+ common->start_ptr = OVECTOR(0);
+
+/* Capturing brackets cannot be optimized if callouts are allowed. */
+if (common->capture_last_ptr != 0)
+ memset(common->optimized_cbracket, 0, re->top_bracket + 1);
+
+SLJIT_ASSERT(!(common->req_char_ptr != 0 && common->start_used_ptr != 0));
+common->cbra_ptr = OVECTOR_START + (re->top_bracket + 1) * 2 * sizeof(sljit_sw);
+
+total_length = ccend - common->start;
+common->private_data_ptrs = (sljit_s32 *)SLJIT_MALLOC(total_length * (sizeof(sljit_s32) + (common->has_then ? 1 : 0)), allocator_data);
+if (!common->private_data_ptrs)
+ {
+ SLJIT_FREE(common->optimized_cbracket, allocator_data);
+ return PCRE2_ERROR_NOMEMORY;
+ }
+memset(common->private_data_ptrs, 0, total_length * sizeof(sljit_s32));
+
+private_data_size = common->cbra_ptr + (re->top_bracket + 1) * sizeof(sljit_sw);
+set_private_data_ptrs(common, &private_data_size, ccend);
+if ((re->overall_options & PCRE2_ANCHORED) == 0 && (re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0)
+ {
+ if (!detect_fast_forward_skip(common, &private_data_size) && !common->has_skip_in_assert_back)
+ detect_fast_fail(common, common->start, &private_data_size, 4);
+ }
+
+SLJIT_ASSERT(common->fast_fail_start_ptr <= common->fast_fail_end_ptr);
+
+if (private_data_size > SLJIT_MAX_LOCAL_SIZE)
+ {
+ SLJIT_FREE(common->private_data_ptrs, allocator_data);
+ SLJIT_FREE(common->optimized_cbracket, allocator_data);
+ return PCRE2_ERROR_NOMEMORY;
+ }
+
+if (common->has_then)
+ {
+ common->then_offsets = (sljit_u8 *)(common->private_data_ptrs + total_length);
+ memset(common->then_offsets, 0, total_length);
+ set_then_offsets(common, common->start, NULL);
+ }
+
+compiler = sljit_create_compiler(allocator_data);
+if (!compiler)
+ {
+ SLJIT_FREE(common->optimized_cbracket, allocator_data);
+ SLJIT_FREE(common->private_data_ptrs, allocator_data);
+ return PCRE2_ERROR_NOMEMORY;
+ }
+common->compiler = compiler;
+
+/* Main pcre_jit_exec entry. */
+sljit_emit_enter(compiler, 0, 1, 5, 5, 0, 0, private_data_size);
+
+/* Register init. */
+reset_ovector(common, (re->top_bracket + 1) * 2);
+if (common->req_char_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->req_char_ptr, SLJIT_R0, 0);
+
+OP1(SLJIT_MOV, ARGUMENTS, 0, SLJIT_S0, 0);
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_S0, 0);
+OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
+OP1(SLJIT_MOV, STR_END, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, end));
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, stack));
+OP1(SLJIT_MOV_U32, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, limit_match));
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(struct sljit_stack, base));
+OP1(SLJIT_MOV, STACK_LIMIT, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(struct sljit_stack, limit));
+OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, SLJIT_IMM, 1);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LIMIT_MATCH, TMP1, 0);
+
+if (common->fast_fail_start_ptr < common->fast_fail_end_ptr)
+ reset_fast_fail(common);
+
+if (mode == PCRE2_JIT_PARTIAL_SOFT)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->hit_start, SLJIT_IMM, -1);
+if (common->mark_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->mark_ptr, SLJIT_IMM, 0);
+if (common->control_head_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->control_head_ptr, SLJIT_IMM, 0);
+
+/* Main part of the matching */
+if ((re->overall_options & PCRE2_ANCHORED) == 0)
+ {
+ mainloop_label = mainloop_entry(common, (re->flags & PCRE2_HASCRORLF) != 0, re->overall_options);
+ continue_match_label = LABEL();
+ /* Forward search if possible. */
+ if ((re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0)
+ {
+ if (mode == PCRE2_JIT_COMPLETE && fast_forward_first_n_chars(common))
+ ;
+ else if ((re->flags & PCRE2_FIRSTSET) != 0)
+ fast_forward_first_char(common, (PCRE2_UCHAR)(re->first_codeunit), (re->flags & PCRE2_FIRSTCASELESS) != 0);
+ else if ((re->flags & PCRE2_STARTLINE) != 0)
+ fast_forward_newline(common);
+ else if ((re->flags & PCRE2_FIRSTMAPSET) != 0)
+ fast_forward_start_bits(common, re->start_bitmap);
+ }
+ }
+else
+ continue_match_label = LABEL();
+
+if (mode == PCRE2_JIT_COMPLETE && re->minlength > 0 && (re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0)
+ {
+ OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE2_ERROR_NOMATCH);
+ OP2(SLJIT_ADD, TMP2, 0, STR_PTR, 0, SLJIT_IMM, IN_UCHARS(re->minlength));
+ minlength_check_failed = CMP(SLJIT_GREATER, TMP2, 0, STR_END, 0);
+ }
+if (common->req_char_ptr != 0)
+ reqbyte_notfound = search_requested_char(common, (PCRE2_UCHAR)(re->last_codeunit), (re->flags & PCRE2_LASTCASELESS) != 0, (re->flags & PCRE2_FIRSTSET) != 0);
+
+/* Store the current STR_PTR in OVECTOR(0). */
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(0), STR_PTR, 0);
+/* Copy the limit of allowed recursions. */
+OP1(SLJIT_MOV, COUNT_MATCH, 0, SLJIT_MEM1(SLJIT_SP), LIMIT_MATCH);
+if (common->capture_last_ptr != 0)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->capture_last_ptr, SLJIT_IMM, 0);
+if (common->fast_forward_bc_ptr != NULL)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), PRIVATE_DATA(common->fast_forward_bc_ptr + 1), STR_PTR, 0);
+
+if (common->start_ptr != OVECTOR(0))
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->start_ptr, STR_PTR, 0);
+
+/* Copy the beginning of the string. */
+if (mode == PCRE2_JIT_PARTIAL_SOFT)
+ {
+ jump = CMP(SLJIT_NOT_EQUAL, SLJIT_MEM1(SLJIT_SP), common->hit_start, SLJIT_IMM, -1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0);
+ JUMPHERE(jump);
+ }
+else if (mode == PCRE2_JIT_PARTIAL_HARD)
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0);
+
+compile_matchingpath(common, common->start, ccend, &rootbacktrack);
+if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ {
+ sljit_free_compiler(compiler);
+ SLJIT_FREE(common->optimized_cbracket, allocator_data);
+ SLJIT_FREE(common->private_data_ptrs, allocator_data);
+ PRIV(jit_free_rodata)(common->read_only_data_head, compiler->allocator_data);
+ return PCRE2_ERROR_NOMEMORY;
+ }
+
+if (common->might_be_empty)
+ {
+ empty_match = CMP(SLJIT_EQUAL, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(0));
+ empty_match_found_label = LABEL();
+ }
+
+common->accept_label = LABEL();
+if (common->accept != NULL)
+ set_jumps(common->accept, common->accept_label);
+
+/* This means we have a match. Update the ovector. */
+copy_ovector(common, re->top_bracket + 1);
+common->quit_label = common->forced_quit_label = LABEL();
+if (common->quit != NULL)
+ set_jumps(common->quit, common->quit_label);
+if (common->forced_quit != NULL)
+ set_jumps(common->forced_quit, common->forced_quit_label);
+if (minlength_check_failed != NULL)
+ SET_LABEL(minlength_check_failed, common->forced_quit_label);
+sljit_emit_return(compiler, SLJIT_MOV, SLJIT_RETURN_REG, 0);
+
+if (mode != PCRE2_JIT_COMPLETE)
+ {
+ common->partialmatchlabel = LABEL();
+ set_jumps(common->partialmatch, common->partialmatchlabel);
+ return_with_partial_match(common, common->quit_label);
+ }
+
+if (common->might_be_empty)
+ empty_match_backtrack_label = LABEL();
+compile_backtrackingpath(common, rootbacktrack.top);
+if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ {
+ sljit_free_compiler(compiler);
+ SLJIT_FREE(common->optimized_cbracket, allocator_data);
+ SLJIT_FREE(common->private_data_ptrs, allocator_data);
+ PRIV(jit_free_rodata)(common->read_only_data_head, compiler->allocator_data);
+ return PCRE2_ERROR_NOMEMORY;
+ }
+
+SLJIT_ASSERT(rootbacktrack.prev == NULL);
+reset_match_label = LABEL();
+
+if (mode == PCRE2_JIT_PARTIAL_SOFT)
+ {
+ /* Update hit_start only in the first time. */
+ jump = CMP(SLJIT_NOT_EQUAL, SLJIT_MEM1(SLJIT_SP), common->hit_start, SLJIT_IMM, 0);
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->start_ptr);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, SLJIT_IMM, -1);
+ OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->hit_start, TMP1, 0);
+ JUMPHERE(jump);
+ }
+
+/* Check we have remaining characters. */
+if ((re->overall_options & PCRE2_ANCHORED) == 0 && common->match_end_ptr != 0)
+ {
+ OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->match_end_ptr);
+ }
+
+OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(SLJIT_SP),
+ (common->fast_forward_bc_ptr != NULL) ? (PRIVATE_DATA(common->fast_forward_bc_ptr + 1)) : common->start_ptr);
+
+if ((re->overall_options & PCRE2_ANCHORED) == 0)
+ {
+ if (common->ff_newline_shortcut != NULL)
+ {
+ /* There cannot be more newlines if PCRE2_FIRSTLINE is set. */
+ if ((re->overall_options & PCRE2_FIRSTLINE) == 0)
+ {
+ if (common->match_end_ptr != 0)
+ {
+ OP1(SLJIT_MOV, TMP3, 0, STR_END, 0);
+ OP1(SLJIT_MOV, STR_END, 0, TMP1, 0);
+ CMPTO(SLJIT_LESS, STR_PTR, 0, TMP1, 0, common->ff_newline_shortcut);
+ OP1(SLJIT_MOV, STR_END, 0, TMP3, 0);
+ }
+ else
+ CMPTO(SLJIT_LESS, STR_PTR, 0, STR_END, 0, common->ff_newline_shortcut);
+ }
+ }
+ else
+ CMPTO(SLJIT_LESS, STR_PTR, 0, (common->match_end_ptr == 0) ? STR_END : TMP1, 0, mainloop_label);
+ }
+
+/* No more remaining characters. */
+if (reqbyte_notfound != NULL)
+ JUMPHERE(reqbyte_notfound);
+
+if (mode == PCRE2_JIT_PARTIAL_SOFT)
+ CMPTO(SLJIT_NOT_EQUAL, SLJIT_MEM1(SLJIT_SP), common->hit_start, SLJIT_IMM, -1, common->partialmatchlabel);
+
+OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE2_ERROR_NOMATCH);
+JUMPTO(SLJIT_JUMP, common->quit_label);
+
+flush_stubs(common);
+
+if (common->might_be_empty)
+ {
+ JUMPHERE(empty_match);
+ OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+ OP1(SLJIT_MOV_U32, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, options));
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, PCRE2_NOTEMPTY);
+ JUMPTO(SLJIT_NOT_ZERO, empty_match_backtrack_label);
+ OP2(SLJIT_AND | SLJIT_SET_E, SLJIT_UNUSED, 0, TMP2, 0, SLJIT_IMM, PCRE2_NOTEMPTY_ATSTART);
+ JUMPTO(SLJIT_ZERO, empty_match_found_label);
+ OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, str));
+ CMPTO(SLJIT_NOT_EQUAL, TMP2, 0, STR_PTR, 0, empty_match_found_label);
+ JUMPTO(SLJIT_JUMP, empty_match_backtrack_label);
+ }
+
+common->fast_forward_bc_ptr = NULL;
+common->fast_fail_start_ptr = 0;
+common->fast_fail_end_ptr = 0;
+common->currententry = common->entries;
+common->local_exit = TRUE;
+quit_label = common->quit_label;
+while (common->currententry != NULL)
+ {
+ /* Might add new entries. */
+ compile_recurse(common);
+ if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
+ {
+ sljit_free_compiler(compiler);
+ SLJIT_FREE(common->optimized_cbracket, allocator_data);
+ SLJIT_FREE(common->private_data_ptrs, allocator_data);
+ PRIV(jit_free_rodata)(common->read_only_data_head, compiler->allocator_data);
+ return PCRE2_ERROR_NOMEMORY;
+ }
+ flush_stubs(common);
+ common->currententry = common->currententry->next;
+ }
+common->local_exit = FALSE;
+common->quit_label = quit_label;
+
+/* Allocating stack, returns with PCRE_ERROR_JIT_STACKLIMIT if fails. */
+/* This is a (really) rare case. */
+set_jumps(common->stackalloc, LABEL());
+/* RETURN_ADDR is not a saved register. */
+sljit_emit_fast_enter(compiler, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), LOCALS1, TMP2, 0);
+OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, stack));
+OP1(SLJIT_MOV, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, top), STACK_TOP, 0);
+OP2(SLJIT_ADD, TMP2, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, limit), SLJIT_IMM, STACK_GROWTH_RATE);
+
+sljit_emit_ijump(compiler, SLJIT_CALL2, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_stack_resize));
+jump = CMP(SLJIT_NOT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0);
+OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
+OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(jit_arguments, stack));
+OP1(SLJIT_MOV, STACK_TOP, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, top));
+OP1(SLJIT_MOV, STACK_LIMIT, 0, SLJIT_MEM1(TMP1), SLJIT_OFFSETOF(struct sljit_stack, limit));
+OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), LOCALS1);
+sljit_emit_fast_return(compiler, SLJIT_MEM1(SLJIT_SP), LOCALS0);
+
+/* Allocation failed. */
+JUMPHERE(jump);
+/* We break the return address cache here, but this is a really rare case. */
+OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE2_ERROR_JIT_STACKLIMIT);
+JUMPTO(SLJIT_JUMP, common->quit_label);
+
+/* Call limit reached. */
+set_jumps(common->calllimit, LABEL());
+OP1(SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, PCRE2_ERROR_MATCHLIMIT);
+JUMPTO(SLJIT_JUMP, common->quit_label);
+
+if (common->revertframes != NULL)
+ {
+ set_jumps(common->revertframes, LABEL());
+ do_revertframes(common);
+ }
+if (common->wordboundary != NULL)
+ {
+ set_jumps(common->wordboundary, LABEL());
+ check_wordboundary(common);
+ }
+if (common->anynewline != NULL)
+ {
+ set_jumps(common->anynewline, LABEL());
+ check_anynewline(common);
+ }
+if (common->hspace != NULL)
+ {
+ set_jumps(common->hspace, LABEL());
+ check_hspace(common);
+ }
+if (common->vspace != NULL)
+ {
+ set_jumps(common->vspace, LABEL());
+ check_vspace(common);
+ }
+if (common->casefulcmp != NULL)
+ {
+ set_jumps(common->casefulcmp, LABEL());
+ do_casefulcmp(common);
+ }
+if (common->caselesscmp != NULL)
+ {
+ set_jumps(common->caselesscmp, LABEL());
+ do_caselesscmp(common);
+ }
+if (common->reset_match != NULL)
+ {
+ set_jumps(common->reset_match, LABEL());
+ do_reset_match(common, (re->top_bracket + 1) * 2);
+ CMPTO(SLJIT_GREATER, STR_PTR, 0, TMP1, 0, continue_match_label);
+ OP1(SLJIT_MOV, STR_PTR, 0, TMP1, 0);
+ JUMPTO(SLJIT_JUMP, reset_match_label);
+ }
+#ifdef SUPPORT_UNICODE
+#if PCRE2_CODE_UNIT_WIDTH == 8
+if (common->utfreadchar != NULL)
+ {
+ set_jumps(common->utfreadchar, LABEL());
+ do_utfreadchar(common);
+ }
+if (common->utfreadchar16 != NULL)
+ {
+ set_jumps(common->utfreadchar16, LABEL());
+ do_utfreadchar16(common);
+ }
+if (common->utfreadtype8 != NULL)
+ {
+ set_jumps(common->utfreadtype8, LABEL());
+ do_utfreadtype8(common);
+ }
+#endif /* PCRE2_CODE_UNIT_WIDTH == 8 */
+if (common->getucd != NULL)
+ {
+ set_jumps(common->getucd, LABEL());
+ do_getucd(common);
+ }
+#endif /* SUPPORT_UNICODE */
+
+SLJIT_FREE(common->optimized_cbracket, allocator_data);
+SLJIT_FREE(common->private_data_ptrs, allocator_data);
+
+executable_func = sljit_generate_code(compiler);
+executable_size = sljit_get_generated_code_size(compiler);
+label_addr = common->label_addrs;
+while (label_addr != NULL)
+ {
+ *label_addr->update_addr = sljit_get_label_addr(label_addr->label);
+ label_addr = label_addr->next;
+ }
+sljit_free_compiler(compiler);
+if (executable_func == NULL)
+ {
+ PRIV(jit_free_rodata)(common->read_only_data_head, compiler->allocator_data);
+ return PCRE2_ERROR_NOMEMORY;
+ }
+
+/* Reuse the function descriptor if possible. */
+if (re->executable_jit != NULL)
+ functions = (executable_functions *)re->executable_jit;
+else
+ {
+ functions = SLJIT_MALLOC(sizeof(executable_functions), allocator_data);
+ if (functions == NULL)
+ {
+ /* This case is highly unlikely since we just recently
+ freed a lot of memory. Not impossible though. */
+ sljit_free_code(executable_func);
+ PRIV(jit_free_rodata)(common->read_only_data_head, compiler->allocator_data);
+ return PCRE2_ERROR_NOMEMORY;
+ }
+ memset(functions, 0, sizeof(executable_functions));
+ functions->top_bracket = re->top_bracket + 1;
+ functions->limit_match = re->limit_match;
+ re->executable_jit = functions;
+ }
+
+/* Turn mode into an index. */
+if (mode == PCRE2_JIT_COMPLETE)
+ mode = 0;
+else
+ mode = (mode == PCRE2_JIT_PARTIAL_SOFT) ? 1 : 2;
+
+SLJIT_ASSERT(mode < JIT_NUMBER_OF_COMPILE_MODES);
+functions->executable_funcs[mode] = executable_func;
+functions->read_only_data_heads[mode] = common->read_only_data_head;
+functions->executable_sizes[mode] = executable_size;
+return 0;
+}
+
+#endif
+
+/*************************************************
+* JIT compile a Regular Expression *
+*************************************************/
+
+/* This function used JIT to convert a previously-compiled pattern into machine
+code.
+
+Arguments:
+ code a compiled pattern
+ options JIT option bits
+
+Returns: 0: success or (*NOJIT) was used
+ <0: an error code
+*/
+
+#define PUBLIC_JIT_COMPILE_OPTIONS \
+ (PCRE2_JIT_COMPLETE|PCRE2_JIT_PARTIAL_SOFT|PCRE2_JIT_PARTIAL_HARD)
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_jit_compile(pcre2_code *code, uint32_t options)
+{
+#ifndef SUPPORT_JIT
+
+(void)code;
+(void)options;
+return PCRE2_ERROR_JIT_BADOPTION;
+
+#else /* SUPPORT_JIT */
+
+pcre2_real_code *re = (pcre2_real_code *)code;
+executable_functions *functions;
+int result;
+
+if (code == NULL)
+ return PCRE2_ERROR_NULL;
+
+if ((options & ~PUBLIC_JIT_COMPILE_OPTIONS) != 0)
+ return PCRE2_ERROR_JIT_BADOPTION;
+
+if ((re->flags & PCRE2_NOJIT) != 0) return 0;
+
+functions = (executable_functions *)re->executable_jit;
+
+if ((options & PCRE2_JIT_COMPLETE) != 0 && (functions == NULL
+ || functions->executable_funcs[0] == NULL)) {
+ result = jit_compile(code, PCRE2_JIT_COMPLETE);
+ if (result != 0)
+ return result;
+ }
+
+if ((options & PCRE2_JIT_PARTIAL_SOFT) != 0 && (functions == NULL
+ || functions->executable_funcs[1] == NULL)) {
+ result = jit_compile(code, PCRE2_JIT_PARTIAL_SOFT);
+ if (result != 0)
+ return result;
+ }
+
+if ((options & PCRE2_JIT_PARTIAL_HARD) != 0 && (functions == NULL
+ || functions->executable_funcs[2] == NULL)) {
+ result = jit_compile(code, PCRE2_JIT_PARTIAL_HARD);
+ if (result != 0)
+ return result;
+ }
+
+return 0;
+
+#endif /* SUPPORT_JIT */
+}
+
+/* JIT compiler uses an all-in-one approach. This improves security,
+ since the code generator functions are not exported. */
+
+#define INCLUDED_FROM_PCRE2_JIT_COMPILE
+
+#include "pcre2_jit_match.c"
+#include "pcre2_jit_misc.c"
+
+/* End of pcre2_jit_compile.c */
diff --git a/thirdparty/pcre2/src/pcre2_jit_match.c b/thirdparty/pcre2/src/pcre2_jit_match.c
new file mode 100644
index 0000000000..a323971ff3
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_jit_match.c
@@ -0,0 +1,189 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+#ifndef INCLUDED_FROM_PCRE2_JIT_COMPILE
+#error This file must be included from pcre2_jit_compile.c.
+#endif
+
+#ifdef SUPPORT_JIT
+
+static SLJIT_NOINLINE int jit_machine_stack_exec(jit_arguments *arguments, jit_function executable_func)
+{
+sljit_u8 local_space[MACHINE_STACK_SIZE];
+struct sljit_stack local_stack;
+
+local_stack.top = (sljit_sw)&local_space;
+local_stack.base = local_stack.top;
+local_stack.limit = local_stack.base + MACHINE_STACK_SIZE;
+local_stack.max_limit = local_stack.limit;
+arguments->stack = &local_stack;
+return executable_func(arguments);
+}
+
+#endif
+
+
+/*************************************************
+* Do a JIT pattern match *
+*************************************************/
+
+/* This function runs a JIT pattern match.
+
+Arguments:
+ code points to the compiled expression
+ subject points to the subject string
+ length length of subject string (may contain binary zeros)
+ start_offset where to start in the subject string
+ options option bits
+ match_data points to a match_data block
+ mcontext points to a match context
+ jit_stack points to a JIT stack
+
+Returns: > 0 => success; value is the number of ovector pairs filled
+ = 0 => success, but ovector is not big enough
+ -1 => failed to match (PCRE_ERROR_NOMATCH)
+ < -1 => some kind of unexpected problem
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_jit_match(const pcre2_code *code, PCRE2_SPTR subject, PCRE2_SIZE length,
+ PCRE2_SIZE start_offset, uint32_t options, pcre2_match_data *match_data,
+ pcre2_match_context *mcontext)
+{
+#ifndef SUPPORT_JIT
+
+(void)code;
+(void)subject;
+(void)length;
+(void)start_offset;
+(void)options;
+(void)match_data;
+(void)mcontext;
+return PCRE2_ERROR_JIT_BADOPTION;
+
+#else /* SUPPORT_JIT */
+
+pcre2_real_code *re = (pcre2_real_code *)code;
+executable_functions *functions = (executable_functions *)re->executable_jit;
+pcre2_jit_stack *jit_stack;
+uint32_t oveccount = match_data->oveccount;
+uint32_t max_oveccount;
+union {
+ void *executable_func;
+ jit_function call_executable_func;
+} convert_executable_func;
+jit_arguments arguments;
+int rc;
+int index = 0;
+
+if ((options & PCRE2_PARTIAL_HARD) != 0)
+ index = 2;
+else if ((options & PCRE2_PARTIAL_SOFT) != 0)
+ index = 1;
+
+if (functions->executable_funcs[index] == NULL)
+ return PCRE2_ERROR_JIT_BADOPTION;
+
+/* Sanity checks should be handled by pcre_exec. */
+arguments.str = subject + start_offset;
+arguments.begin = subject;
+arguments.end = subject + length;
+arguments.match_data = match_data;
+arguments.startchar_ptr = subject;
+arguments.mark_ptr = NULL;
+arguments.options = options;
+
+if (mcontext != NULL)
+ {
+ arguments.callout = mcontext->callout;
+ arguments.callout_data = mcontext->callout_data;
+ arguments.offset_limit = mcontext->offset_limit;
+ arguments.limit_match = (mcontext->match_limit < re->limit_match)?
+ mcontext->match_limit : re->limit_match;
+ if (mcontext->jit_callback != NULL)
+ jit_stack = mcontext->jit_callback(mcontext->jit_callback_data);
+ else
+ jit_stack = (pcre2_jit_stack *)mcontext->jit_callback_data;
+ }
+else
+ {
+ arguments.callout = NULL;
+ arguments.callout_data = NULL;
+ arguments.offset_limit = PCRE2_UNSET;
+ arguments.limit_match = (MATCH_LIMIT < re->limit_match)?
+ MATCH_LIMIT : re->limit_match;
+ jit_stack = NULL;
+ }
+
+/* JIT only need two offsets for each ovector entry. Hence
+ the last 1/3 of the ovector will never be touched. */
+
+max_oveccount = functions->top_bracket;
+if (oveccount > max_oveccount)
+ oveccount = max_oveccount;
+arguments.oveccount = oveccount << 1;
+
+
+convert_executable_func.executable_func = functions->executable_funcs[index];
+if (jit_stack != NULL)
+ {
+ arguments.stack = (struct sljit_stack *)(jit_stack->stack);
+ rc = convert_executable_func.call_executable_func(&arguments);
+ }
+else
+ rc = jit_machine_stack_exec(&arguments, convert_executable_func.call_executable_func);
+
+if (rc > (int)oveccount)
+ rc = 0;
+match_data->code = re;
+match_data->subject = subject;
+match_data->rc = rc;
+match_data->startchar = arguments.startchar_ptr - subject;
+match_data->leftchar = 0;
+match_data->rightchar = 0;
+match_data->mark = arguments.mark_ptr;
+match_data->matchedby = PCRE2_MATCHEDBY_JIT;
+
+return match_data->rc;
+
+#endif /* SUPPORT_JIT */
+}
+
+/* End of pcre2_jit_match.c */
diff --git a/thirdparty/pcre2/src/pcre2_jit_misc.c b/thirdparty/pcre2/src/pcre2_jit_misc.c
new file mode 100644
index 0000000000..efdb05580f
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_jit_misc.c
@@ -0,0 +1,227 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+#ifndef INCLUDED_FROM_PCRE2_JIT_COMPILE
+#error This file must be included from pcre2_jit_compile.c.
+#endif
+
+
+
+/*************************************************
+* Free JIT read-only data *
+*************************************************/
+
+void
+PRIV(jit_free_rodata)(void *current, void *allocator_data)
+{
+#ifndef SUPPORT_JIT
+(void)current;
+(void)allocator_data;
+#else /* SUPPORT_JIT */
+void *next;
+
+SLJIT_UNUSED_ARG(allocator_data);
+
+while (current != NULL)
+ {
+ next = *(void**)current;
+ SLJIT_FREE(current, allocator_data);
+ current = next;
+ }
+
+#endif /* SUPPORT_JIT */
+}
+
+/*************************************************
+* Free JIT compiled code *
+*************************************************/
+
+void
+PRIV(jit_free)(void *executable_jit, pcre2_memctl *memctl)
+{
+#ifndef SUPPORT_JIT
+(void)executable_jit;
+(void)memctl;
+#else /* SUPPORT_JIT */
+
+executable_functions *functions = (executable_functions *)executable_jit;
+void *allocator_data = memctl;
+int i;
+
+for (i = 0; i < JIT_NUMBER_OF_COMPILE_MODES; i++)
+ {
+ if (functions->executable_funcs[i] != NULL)
+ sljit_free_code(functions->executable_funcs[i]);
+ PRIV(jit_free_rodata)(functions->read_only_data_heads[i], allocator_data);
+ }
+
+SLJIT_FREE(functions, allocator_data);
+
+#endif /* SUPPORT_JIT */
+}
+
+
+/*************************************************
+* Free unused JIT memory *
+*************************************************/
+
+PCRE2_EXP_DEFN void PCRE2_CALL_CONVENTION
+pcre2_jit_free_unused_memory(pcre2_general_context *gcontext)
+{
+#ifndef SUPPORT_JIT
+(void)gcontext; /* Suppress warning */
+#else /* SUPPORT_JIT */
+SLJIT_UNUSED_ARG(gcontext);
+sljit_free_unused_memory_exec();
+#endif /* SUPPORT_JIT */
+}
+
+
+
+/*************************************************
+* Allocate a JIT stack *
+*************************************************/
+
+PCRE2_EXP_DEFN pcre2_jit_stack * PCRE2_CALL_CONVENTION
+pcre2_jit_stack_create(size_t startsize, size_t maxsize,
+ pcre2_general_context *gcontext)
+{
+#ifndef SUPPORT_JIT
+
+(void)gcontext;
+(void)startsize;
+(void)maxsize;
+return NULL;
+
+#else /* SUPPORT_JIT */
+
+pcre2_jit_stack *jit_stack;
+
+if (startsize < 1 || maxsize < 1)
+ return NULL;
+if (startsize > maxsize)
+ startsize = maxsize;
+startsize = (startsize + STACK_GROWTH_RATE - 1) & ~(STACK_GROWTH_RATE - 1);
+maxsize = (maxsize + STACK_GROWTH_RATE - 1) & ~(STACK_GROWTH_RATE - 1);
+
+jit_stack = PRIV(memctl_malloc)(sizeof(pcre2_real_jit_stack), (pcre2_memctl *)gcontext);
+if (jit_stack == NULL) return NULL;
+jit_stack->stack = sljit_allocate_stack(startsize, maxsize, &jit_stack->memctl);
+return jit_stack;
+
+#endif
+}
+
+
+/*************************************************
+* Assign a JIT stack to a pattern *
+*************************************************/
+
+PCRE2_EXP_DEFN void PCRE2_CALL_CONVENTION
+pcre2_jit_stack_assign(pcre2_match_context *mcontext, pcre2_jit_callback callback,
+ void *callback_data)
+{
+#ifndef SUPPORT_JIT
+(void)mcontext;
+(void)callback;
+(void)callback_data;
+#else /* SUPPORT_JIT */
+
+if (mcontext == NULL) return;
+mcontext->jit_callback = callback;
+mcontext->jit_callback_data = callback_data;
+
+#endif /* SUPPORT_JIT */
+}
+
+
+/*************************************************
+* Free a JIT stack *
+*************************************************/
+
+PCRE2_EXP_DEFN void PCRE2_CALL_CONVENTION
+pcre2_jit_stack_free(pcre2_jit_stack *jit_stack)
+{
+#ifndef SUPPORT_JIT
+(void)jit_stack;
+#else /* SUPPORT_JIT */
+if (jit_stack != NULL)
+ {
+ sljit_free_stack((struct sljit_stack *)(jit_stack->stack), &jit_stack->memctl);
+ jit_stack->memctl.free(jit_stack, jit_stack->memctl.memory_data);
+ }
+#endif /* SUPPORT_JIT */
+}
+
+
+/*************************************************
+* Get target CPU type *
+*************************************************/
+
+const char*
+PRIV(jit_get_target)(void)
+{
+#ifndef SUPPORT_JIT
+return "JIT is not supported";
+#else /* SUPPORT_JIT */
+return sljit_get_platform_name();
+#endif /* SUPPORT_JIT */
+}
+
+
+/*************************************************
+* Get size of JIT code *
+*************************************************/
+
+size_t
+PRIV(jit_get_size)(void *executable_jit)
+{
+#ifndef SUPPORT_JIT
+(void)executable_jit;
+return 0;
+#else /* SUPPORT_JIT */
+sljit_uw *executable_sizes = ((executable_functions *)executable_jit)->executable_sizes;
+SLJIT_COMPILE_ASSERT(JIT_NUMBER_OF_COMPILE_MODES == 3, number_of_compile_modes_changed);
+return executable_sizes[0] + executable_sizes[1] + executable_sizes[2];
+#endif
+}
+
+/* End of pcre2_jit_misc.c */
diff --git a/thirdparty/pcre2/src/pcre2_jit_test.c b/thirdparty/pcre2/src/pcre2_jit_test.c
new file mode 100644
index 0000000000..705ba181eb
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_jit_test.c
@@ -0,0 +1,1735 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <string.h>
+
+#define PCRE2_CODE_UNIT_WIDTH 0
+#include "pcre2.h"
+
+/*
+ Letter characters:
+ \xe6\x92\xad = 0x64ad = 25773 (kanji)
+ Non-letter characters:
+ \xc2\xa1 = 0xa1 = (Inverted Exclamation Mark)
+ \xf3\xa9\xb7\x80 = 0xe9dc0 = 957888
+ \xed\xa0\x80 = 55296 = 0xd800 (Invalid UTF character)
+ \xed\xb0\x80 = 56320 = 0xdc00 (Invalid UTF character)
+ Newlines:
+ \xc2\x85 = 0x85 = 133 (NExt Line = NEL)
+ \xe2\x80\xa8 = 0x2028 = 8232 (Line Separator)
+ Othercase pairs:
+ \xc3\xa9 = 0xe9 = 233 (e')
+ \xc3\x89 = 0xc9 = 201 (E')
+ \xc3\xa1 = 0xe1 = 225 (a')
+ \xc3\x81 = 0xc1 = 193 (A')
+ \x53 = 0x53 = S
+ \x73 = 0x73 = s
+ \xc5\xbf = 0x17f = 383 (long S)
+ \xc8\xba = 0x23a = 570
+ \xe2\xb1\xa5 = 0x2c65 = 11365
+ \xe1\xbd\xb8 = 0x1f78 = 8056
+ \xe1\xbf\xb8 = 0x1ff8 = 8184
+ \xf0\x90\x90\x80 = 0x10400 = 66560
+ \xf0\x90\x90\xa8 = 0x10428 = 66600
+ \xc7\x84 = 0x1c4 = 452
+ \xc7\x85 = 0x1c5 = 453
+ \xc7\x86 = 0x1c6 = 454
+ Caseless sets:
+ ucp_Armenian - \x{531}-\x{556} -> \x{561}-\x{586}
+ ucp_Coptic - \x{2c80}-\x{2ce3} -> caseless: XOR 0x1
+ ucp_Latin - \x{ff21}-\x{ff3a} -> \x{ff41]-\x{ff5a}
+
+ Mark property:
+ \xcc\x8d = 0x30d = 781
+ Special:
+ \xc2\x80 = 0x80 = 128 (lowest 2 byte character)
+ \xdf\xbf = 0x7ff = 2047 (highest 2 byte character)
+ \xe0\xa0\x80 = 0x800 = 2048 (lowest 2 byte character)
+ \xef\xbf\xbf = 0xffff = 65535 (highest 3 byte character)
+ \xf0\x90\x80\x80 = 0x10000 = 65536 (lowest 4 byte character)
+ \xf4\x8f\xbf\xbf = 0x10ffff = 1114111 (highest allowed utf character)
+*/
+
+static int regression_tests(void);
+
+int main(void)
+{
+ int jit = 0;
+#if defined SUPPORT_PCRE2_8
+ pcre2_config_8(PCRE2_CONFIG_JIT, &jit);
+#elif defined SUPPORT_PCRE2_16
+ pcre2_config_16(PCRE2_CONFIG_JIT, &jit);
+#elif defined SUPPORT_PCRE2_32
+ pcre2_config_32(PCRE2_CONFIG_JIT, &jit);
+#endif
+ if (!jit) {
+ printf("JIT must be enabled to run pcre_jit_test\n");
+ return 1;
+ }
+ return regression_tests();
+}
+
+/* --------------------------------------------------------------------------------------- */
+
+#if !(defined SUPPORT_PCRE2_8) && !(defined SUPPORT_PCRE2_16) && !(defined SUPPORT_PCRE2_32)
+#error SUPPORT_PCRE2_8 or SUPPORT_PCRE2_16 or SUPPORT_PCRE2_32 must be defined
+#endif
+
+#define MU (PCRE2_MULTILINE | PCRE2_UTF)
+#define MUP (PCRE2_MULTILINE | PCRE2_UTF | PCRE2_UCP)
+#define CMU (PCRE2_CASELESS | PCRE2_MULTILINE | PCRE2_UTF)
+#define CMUP (PCRE2_CASELESS | PCRE2_MULTILINE | PCRE2_UTF | PCRE2_UCP)
+#define M (PCRE2_MULTILINE)
+#define MP (PCRE2_MULTILINE | PCRE2_UCP)
+#define U (PCRE2_UTF)
+#define CM (PCRE2_CASELESS | PCRE2_MULTILINE)
+
+#define BSR(x) ((x) << 16)
+#define A PCRE2_NEWLINE_ANYCRLF
+
+#define GET_NEWLINE(x) ((x) & 0xffff)
+#define GET_BSR(x) ((x) >> 16)
+
+#define OFFSET_MASK 0x00ffff
+#define F_NO8 0x010000
+#define F_NO16 0x020000
+#define F_NO32 0x020000
+#define F_NOMATCH 0x040000
+#define F_DIFF 0x080000
+#define F_FORCECONV 0x100000
+#define F_PROPERTY 0x200000
+
+struct regression_test_case {
+ int compile_options;
+ int newline;
+ int match_options;
+ int start_offset;
+ const char *pattern;
+ const char *input;
+};
+
+static struct regression_test_case regression_test_cases[] = {
+ /* Constant strings. */
+ { MU, A, 0, 0, "AbC", "AbAbC" },
+ { MU, A, 0, 0, "ACCEPT", "AACACCACCEACCEPACCEPTACCEPTT" },
+ { CMU, A, 0, 0, "aA#\xc3\xa9\xc3\x81", "aA#Aa#\xc3\x89\xc3\xa1" },
+ { M, A, 0, 0, "[^a]", "aAbB" },
+ { CM, A, 0, 0, "[^m]", "mMnN" },
+ { M, A, 0, 0, "a[^b][^#]", "abacd" },
+ { CM, A, 0, 0, "A[^B][^E]", "abacd" },
+ { CMU, A, 0, 0, "[^x][^#]", "XxBll" },
+ { MU, A, 0, 0, "[^a]", "aaa\xc3\xa1#Ab" },
+ { CMU, A, 0, 0, "[^A]", "aA\xe6\x92\xad" },
+ { MU, A, 0, 0, "\\W(\\W)?\\w", "\r\n+bc" },
+ { MU, A, 0, 0, "\\W(\\W)?\\w", "\n\r+bc" },
+ { MU, A, 0, 0, "\\W(\\W)?\\w", "\r\r+bc" },
+ { MU, A, 0, 0, "\\W(\\W)?\\w", "\n\n+bc" },
+ { MU, A, 0, 0, "[axd]", "sAXd" },
+ { CMU, A, 0, 0, "[axd]", "sAXd" },
+ { CMU, A, 0, 0 | F_NOMATCH, "[^axd]", "DxA" },
+ { MU, A, 0, 0, "[a-dA-C]", "\xe6\x92\xad\xc3\xa9.B" },
+ { MU, A, 0, 0, "[^a-dA-C]", "\xe6\x92\xad\xc3\xa9" },
+ { CMU, A, 0, 0, "[^\xc3\xa9]", "\xc3\xa9\xc3\x89." },
+ { MU, A, 0, 0, "[^\xc3\xa9]", "\xc3\xa9\xc3\x89." },
+ { MU, A, 0, 0, "[^a]", "\xc2\x80[]" },
+ { CMU, A, 0, 0, "\xf0\x90\x90\xa7", "\xf0\x90\x91\x8f" },
+ { CM, A, 0, 0, "1a2b3c4", "1a2B3c51A2B3C4" },
+ { PCRE2_CASELESS, 0, 0, 0, "\xff#a", "\xff#\xff\xfe##\xff#A" },
+ { PCRE2_CASELESS, 0, 0, 0, "\xfe", "\xff\xfc#\xfe\xfe" },
+ { PCRE2_CASELESS, 0, 0, 0, "a1", "Aa1" },
+ { M, A, 0, 0, "\\Ca", "cda" },
+ { CM, A, 0, 0, "\\Ca", "CDA" },
+ { M, A, 0, 0 | F_NOMATCH, "\\Cx", "cda" },
+ { CM, A, 0, 0 | F_NOMATCH, "\\Cx", "CDA" },
+ { CMUP, A, 0, 0, "\xf0\x90\x90\x80\xf0\x90\x90\xa8", "\xf0\x90\x90\xa8\xf0\x90\x90\x80" },
+ { CMUP, A, 0, 0, "\xf0\x90\x90\x80{2}", "\xf0\x90\x90\x80#\xf0\x90\x90\xa8\xf0\x90\x90\x80" },
+ { CMUP, A, 0, 0, "\xf0\x90\x90\xa8{2}", "\xf0\x90\x90\x80#\xf0\x90\x90\xa8\xf0\x90\x90\x80" },
+ { CMUP, A, 0, 0, "\xe1\xbd\xb8\xe1\xbf\xb8", "\xe1\xbf\xb8\xe1\xbd\xb8" },
+ { M, A, 0, 0, "[3-57-9]", "5" },
+
+ /* Assertions. */
+ { MU, A, 0, 0, "\\b[^A]", "A_B#" },
+ { M, A, 0, 0 | F_NOMATCH, "\\b\\W", "\n*" },
+ { MU, A, 0, 0, "\\B[^,]\\b[^s]\\b", "#X" },
+ { MP, A, 0, 0, "\\B", "_\xa1" },
+ { MP, A, 0, 0 | F_PROPERTY, "\\b_\\b[,A]\\B", "_," },
+ { MUP, A, 0, 0, "\\b", "\xe6\x92\xad!" },
+ { MUP, A, 0, 0, "\\B", "_\xc2\xa1\xc3\xa1\xc2\x85" },
+ { MUP, A, 0, 0, "\\b[^A]\\B[^c]\\b[^_]\\B", "_\xc3\xa1\xe2\x80\xa8" },
+ { MUP, A, 0, 0, "\\b\\w+\\B", "\xc3\x89\xc2\xa1\xe6\x92\xad\xc3\x81\xc3\xa1" },
+ { MU, A, 0, 0 | F_NOMATCH, "\\b.", "\xcd\xbe" },
+ { CMUP, A, 0, 0, "\\By", "\xf0\x90\x90\xa8y" },
+ { M, A, 0, 0 | F_NOMATCH, "\\R^", "\n" },
+ { M, A, 0, 1 | F_NOMATCH, "^", "\n" },
+ { 0, 0, 0, 0, "^ab", "ab" },
+ { 0, 0, 0, 0 | F_NOMATCH, "^ab", "aab" },
+ { M, PCRE2_NEWLINE_CRLF, 0, 0, "^a", "\r\raa\n\naa\r\naa" },
+ { MU, A, 0, 0, "^-", "\xe2\x80\xa8--\xc2\x85-\r\n-" },
+ { M, PCRE2_NEWLINE_ANY, 0, 0, "^-", "a--b--\x85--" },
+ { MU, PCRE2_NEWLINE_ANY, 0, 0, "^-", "a--\xe2\x80\xa8--" },
+ { MU, PCRE2_NEWLINE_ANY, 0, 0, "^-", "a--\xc2\x85--" },
+ { 0, 0, 0, 0, "ab$", "ab" },
+ { 0, 0, 0, 0 | F_NOMATCH, "ab$", "abab\n\n" },
+ { PCRE2_DOLLAR_ENDONLY, 0, 0, 0 | F_NOMATCH, "ab$", "abab\r\n" },
+ { M, PCRE2_NEWLINE_CRLF, 0, 0, "a$", "\r\raa\n\naa\r\naa" },
+ { M, PCRE2_NEWLINE_ANY, 0, 0, "a$", "aaa" },
+ { MU, PCRE2_NEWLINE_ANYCRLF, 0, 0, "#$", "#\xc2\x85###\r#" },
+ { MU, PCRE2_NEWLINE_ANY, 0, 0, "#$", "#\xe2\x80\xa9" },
+ { 0, PCRE2_NEWLINE_ANY, PCRE2_NOTBOL, 0 | F_NOMATCH, "^a", "aa\naa" },
+ { M, PCRE2_NEWLINE_ANY, PCRE2_NOTBOL, 0, "^a", "aa\naa" },
+ { 0, PCRE2_NEWLINE_ANY, PCRE2_NOTEOL, 0 | F_NOMATCH, "a$", "aa\naa" },
+ { 0, PCRE2_NEWLINE_ANY, PCRE2_NOTEOL, 0 | F_NOMATCH, "a$", "aa\r\n" },
+ { U | PCRE2_DOLLAR_ENDONLY, PCRE2_NEWLINE_ANY, 0, 0 | F_PROPERTY, "\\p{Any}{2,}$", "aa\r\n" },
+ { M, PCRE2_NEWLINE_ANY, PCRE2_NOTEOL, 0, "a$", "aa\naa" },
+ { 0, PCRE2_NEWLINE_CR, 0, 0, ".\\Z", "aaa" },
+ { U, PCRE2_NEWLINE_CR, 0, 0, "a\\Z", "aaa\r" },
+ { 0, PCRE2_NEWLINE_CR, 0, 0, ".\\Z", "aaa\n" },
+ { 0, PCRE2_NEWLINE_CRLF, 0, 0, ".\\Z", "aaa\r" },
+ { U, PCRE2_NEWLINE_CRLF, 0, 0, ".\\Z", "aaa\n" },
+ { 0, PCRE2_NEWLINE_CRLF, 0, 0, ".\\Z", "aaa\r\n" },
+ { U, PCRE2_NEWLINE_ANYCRLF, 0, 0, ".\\Z", "aaa" },
+ { U, PCRE2_NEWLINE_ANYCRLF, 0, 0, ".\\Z", "aaa\r" },
+ { U, PCRE2_NEWLINE_ANYCRLF, 0, 0, ".\\Z", "aaa\n" },
+ { U, PCRE2_NEWLINE_ANYCRLF, 0, 0, ".\\Z", "aaa\r\n" },
+ { U, PCRE2_NEWLINE_ANYCRLF, 0, 0, ".\\Z", "aaa\xe2\x80\xa8" },
+ { U, PCRE2_NEWLINE_ANYCRLF, 0, 0, ".\\Z", "aaa" },
+ { U, PCRE2_NEWLINE_ANYCRLF, 0, 0, ".\\Z", "aaa\r" },
+ { U, PCRE2_NEWLINE_ANYCRLF, 0, 0, ".\\Z", "aaa\n" },
+ { U, PCRE2_NEWLINE_ANYCRLF, 0, 0, ".\\Z", "aaa\r\n" },
+ { U, PCRE2_NEWLINE_ANY, 0, 0, ".\\Z", "aaa\xc2\x85" },
+ { U, PCRE2_NEWLINE_ANY, 0, 0, ".\\Z", "aaa\xe2\x80\xa8" },
+ { M, A, 0, 0, "\\Aa", "aaa" },
+ { M, A, 0, 1 | F_NOMATCH, "\\Aa", "aaa" },
+ { M, A, 0, 1, "\\Ga", "aaa" },
+ { M, A, 0, 1 | F_NOMATCH, "\\Ga", "aba" },
+ { M, A, 0, 0, "a\\z", "aaa" },
+ { M, A, 0, 0 | F_NOMATCH, "a\\z", "aab" },
+
+ /* Brackets and alternatives. */
+ { MU, A, 0, 0, "(ab|bb|cd)", "bacde" },
+ { MU, A, 0, 0, "(?:ab|a)(bc|c)", "ababc" },
+ { MU, A, 0, 0, "((ab|(cc))|(bb)|(?:cd|efg))", "abac" },
+ { CMU, A, 0, 0, "((aB|(Cc))|(bB)|(?:cd|EFg))", "AcCe" },
+ { MU, A, 0, 0, "((ab|(cc))|(bb)|(?:cd|ebg))", "acebebg" },
+ { MU, A, 0, 0, "(?:(a)|(?:b))(cc|(?:d|e))(a|b)k", "accabdbbccbk" },
+ { MU, A, 0, 0, "\xc7\x82|\xc6\x82", "\xf1\x83\x82\x82\xc7\x82\xc7\x83" },
+ { MU, A, 0, 0, "=\xc7\x82|#\xc6\x82", "\xf1\x83\x82\x82=\xc7\x82\xc7\x83" },
+ { MU, A, 0, 0, "\xc7\x82\xc7\x83|\xc6\x82\xc6\x82", "\xf1\x83\x82\x82\xc7\x82\xc7\x83" },
+ { MU, A, 0, 0, "\xc6\x82\xc6\x82|\xc7\x83\xc7\x83|\xc8\x84\xc8\x84", "\xf1\x83\x82\x82\xc8\x84\xc8\x84" },
+
+ /* Greedy and non-greedy ? operators. */
+ { MU, A, 0, 0, "(?:a)?a", "laab" },
+ { CMU, A, 0, 0, "(A)?A", "llaab" },
+ { MU, A, 0, 0, "(a)?\?a", "aab" }, /* ?? is the prefix of trygraphs in GCC. */
+ { MU, A, 0, 0, "(a)?a", "manm" },
+ { CMU, A, 0, 0, "(a|b)?\?d((?:e)?)", "ABABdx" },
+ { MU, A, 0, 0, "(a|b)?\?d((?:e)?)", "abcde" },
+ { MU, A, 0, 0, "((?:ab)?\?g|b(?:g(nn|d)?\?)?)?\?(?:n)?m", "abgnbgnnbgdnmm" },
+
+ /* Greedy and non-greedy + operators */
+ { MU, A, 0, 0, "(aa)+aa", "aaaaaaa" },
+ { MU, A, 0, 0, "(aa)+?aa", "aaaaaaa" },
+ { MU, A, 0, 0, "(?:aba|ab|a)+l", "ababamababal" },
+ { MU, A, 0, 0, "(?:aba|ab|a)+?l", "ababamababal" },
+ { MU, A, 0, 0, "(a(?:bc|cb|b|c)+?|ss)+e", "accssabccbcacbccbbXaccssabccbcacbccbbe" },
+ { MU, A, 0, 0, "(a(?:bc|cb|b|c)+|ss)+?e", "accssabccbcacbccbbXaccssabccbcacbccbbe" },
+ { MU, A, 0, 0, "(?:(b(c)+?)+)?\?(?:(bc)+|(cb)+)+(?:m)+", "bccbcccbcbccbcbPbccbcccbcbccbcbmmn" },
+
+ /* Greedy and non-greedy * operators */
+ { CMU, A, 0, 0, "(?:AA)*AB", "aaaaaaamaaaaaaab" },
+ { MU, A, 0, 0, "(?:aa)*?ab", "aaaaaaamaaaaaaab" },
+ { MU, A, 0, 0, "(aa|ab)*ab", "aaabaaab" },
+ { CMU, A, 0, 0, "(aa|Ab)*?aB", "aaabaaab" },
+ { MU, A, 0, 0, "(a|b)*(?:a)*(?:b)*m", "abbbaaababanabbbaaababamm" },
+ { MU, A, 0, 0, "(a|b)*?(?:a)*?(?:b)*?m", "abbbaaababanabbbaaababamm" },
+ { M, A, 0, 0, "a(a(\\1*)a|(b)b+){0}a", "aa" },
+ { M, A, 0, 0, "((?:a|)*){0}a", "a" },
+
+ /* Combining ? + * operators */
+ { MU, A, 0, 0, "((bm)+)?\?(?:a)*(bm)+n|((am)+?)?(?:a)+(am)*n", "bmbmabmamaaamambmaman" },
+ { MU, A, 0, 0, "(((ab)?cd)*ef)+g", "abcdcdefcdefefmabcdcdefcdefefgg" },
+ { MU, A, 0, 0, "(((ab)?\?cd)*?ef)+?g", "abcdcdefcdefefmabcdcdefcdefefgg" },
+ { MU, A, 0, 0, "(?:(ab)?c|(?:ab)+?d)*g", "ababcdccababddg" },
+ { MU, A, 0, 0, "(?:(?:ab)?\?c|(ab)+d)*?g", "ababcdccababddg" },
+
+ /* Single character iterators. */
+ { MU, A, 0, 0, "(a+aab)+aaaab", "aaaabcaaaabaabcaabcaaabaaaab" },
+ { MU, A, 0, 0, "(a*a*aab)+x", "aaaaabaabaaabmaabx" },
+ { MU, A, 0, 0, "(a*?(b|ab)a*?)+x", "aaaabcxbbaabaacbaaabaabax" },
+ { MU, A, 0, 0, "(a+(ab|ad)a+)+x", "aaabaaaadaabaaabaaaadaaax" },
+ { MU, A, 0, 0, "(a?(a)a?)+(aaa)", "abaaabaaaaaaaa" },
+ { MU, A, 0, 0, "(a?\?(a)a?\?)+(b)", "aaaacaaacaacacbaaab" },
+ { MU, A, 0, 0, "(a{0,4}(b))+d", "aaaaaabaabcaaaaabaaaaabd" },
+ { MU, A, 0, 0, "(a{0,4}?[^b])+d+(a{0,4}[^b])d+", "aaaaadaaaacaadddaaddd" },
+ { MU, A, 0, 0, "(ba{2})+c", "baabaaabacbaabaac" },
+ { MU, A, 0, 0, "(a*+bc++)+", "aaabbcaaabcccab" },
+ { MU, A, 0, 0, "(a?+[^b])+", "babaacacb" },
+ { MU, A, 0, 0, "(a{0,3}+b)(a{0,3}+b)(a{0,3}+)[^c]", "abaabaaacbaabaaaac" },
+ { CMU, A, 0, 0, "([a-c]+[d-f]+?)+?g", "aBdacdehAbDaFgA" },
+ { CMU, A, 0, 0, "[c-f]+k", "DemmFke" },
+ { MU, A, 0, 0, "([DGH]{0,4}M)+", "GGDGHDGMMHMDHHGHM" },
+ { MU, A, 0, 0, "([a-c]{4,}s)+", "abasabbasbbaabsbba" },
+ { CMU, A, 0, 0, "[ace]{3,7}", "AcbDAcEEcEd" },
+ { CMU, A, 0, 0, "[ace]{3,7}?", "AcbDAcEEcEd" },
+ { CMU, A, 0, 0, "[ace]{3,}", "AcbDAcEEcEd" },
+ { CMU, A, 0, 0, "[ace]{3,}?", "AcbDAcEEcEd" },
+ { MU, A, 0, 0, "[ckl]{2,}?g", "cdkkmlglglkcg" },
+ { CMU, A, 0, 0, "[ace]{5}?", "AcCebDAcEEcEd" },
+ { MU, A, 0, 0, "([AbC]{3,5}?d)+", "BACaAbbAEAACCbdCCbdCCAAbb" },
+ { MU, A, 0, 0, "([^ab]{0,}s){2}", "abaabcdsABamsDDs" },
+ { MU, A, 0, 0, "\\b\\w+\\B", "x,a_cd" },
+ { MUP, A, 0, 0, "\\b[^\xc2\xa1]+\\B", "\xc3\x89\xc2\xa1\xe6\x92\xad\xc3\x81\xc3\xa1" },
+ { CMU, A, 0, 0, "[^b]+(a*)([^c]?d{3})", "aaaaddd" },
+ { CMUP, A, 0, 0, "\xe1\xbd\xb8{2}", "\xe1\xbf\xb8#\xe1\xbf\xb8\xe1\xbd\xb8" },
+ { CMU, A, 0, 0, "[^\xf0\x90\x90\x80]{2,4}@", "\xf0\x90\x90\xa8\xf0\x90\x90\x80###\xf0\x90\x90\x80@@@" },
+ { CMU, A, 0, 0, "[^\xe1\xbd\xb8][^\xc3\xa9]", "\xe1\xbd\xb8\xe1\xbf\xb8\xc3\xa9\xc3\x89#" },
+ { MU, A, 0, 0, "[^\xe1\xbd\xb8][^\xc3\xa9]", "\xe1\xbd\xb8\xe1\xbf\xb8\xc3\xa9\xc3\x89#" },
+ { MU, A, 0, 0, "[^\xe1\xbd\xb8]{3,}?", "##\xe1\xbd\xb8#\xe1\xbd\xb8#\xc3\x89#\xe1\xbd\xb8" },
+ { MU, A, 0, 0, "\\d+123", "987654321,01234" },
+ { MU, A, 0, 0, "abcd*|\\w+xy", "aaaaa,abxyz" },
+ { MU, A, 0, 0, "(?:abc|((?:amc|\\b\\w*xy)))", "aaaaa,abxyz" },
+ { MU, A, 0, 0, "a(?R)|([a-z]++)#", ".abcd.abcd#."},
+ { MU, A, 0, 0, "a(?R)|([a-z]++)#", ".abcd.mbcd#."},
+ { MU, A, 0, 0, ".[ab]*.", "xx" },
+ { MU, A, 0, 0, ".[ab]*a", "xxa" },
+ { MU, A, 0, 0, ".[ab]?.", "xx" },
+
+ /* Bracket repeats with limit. */
+ { MU, A, 0, 0, "(?:(ab){2}){5}M", "abababababababababababM" },
+ { MU, A, 0, 0, "(?:ab|abab){1,5}M", "abababababababababababM" },
+ { MU, A, 0, 0, "(?>ab|abab){1,5}M", "abababababababababababM" },
+ { MU, A, 0, 0, "(?:ab|abab){1,5}?M", "abababababababababababM" },
+ { MU, A, 0, 0, "(?>ab|abab){1,5}?M", "abababababababababababM" },
+ { MU, A, 0, 0, "(?:(ab){1,4}?){1,3}?M", "abababababababababababababM" },
+ { MU, A, 0, 0, "(?:(ab){1,4}){1,3}abababababababababababM", "ababababababababababababM" },
+ { MU, A, 0, 0 | F_NOMATCH, "(?:(ab){1,4}){1,3}abababababababababababM", "abababababababababababM" },
+ { MU, A, 0, 0, "(ab){4,6}?M", "abababababababM" },
+
+ /* Basic character sets. */
+ { MU, A, 0, 0, "(?:\\s)+(?:\\S)+", "ab \t\xc3\xa9\xe6\x92\xad " },
+ { MU, A, 0, 0, "(\\w)*(k)(\\W)?\?", "abcdef abck11" },
+ { MU, A, 0, 0, "\\((\\d)+\\)\\D", "a() (83 (8)2 (9)ab" },
+ { MU, A, 0, 0, "\\w(\\s|(?:\\d)*,)+\\w\\wb", "a 5, 4,, bb 5, 4,, aab" },
+ { MU, A, 0, 0, "(\\v+)(\\V+)", "\x0e\xc2\x85\xe2\x80\xa8\x0b\x09\xe2\x80\xa9" },
+ { MU, A, 0, 0, "(\\h+)(\\H+)", "\xe2\x80\xa8\xe2\x80\x80\x20\xe2\x80\x8a\xe2\x81\x9f\xe3\x80\x80\x09\x20\xc2\xa0\x0a" },
+ { MU, A, 0, 0, "x[bcef]+", "xaxdxecbfg" },
+ { MU, A, 0, 0, "x[bcdghij]+", "xaxexfxdgbjk" },
+ { MU, A, 0, 0, "x[^befg]+", "xbxexacdhg" },
+ { MU, A, 0, 0, "x[^bcdl]+", "xlxbxaekmd" },
+ { MU, A, 0, 0, "x[^bcdghi]+", "xbxdxgxaefji" },
+ { MU, A, 0, 0, "x[B-Fb-f]+", "xaxAxgxbfBFG" },
+ { CMU, A, 0, 0, "\\x{e9}+", "#\xf0\x90\x90\xa8\xc3\xa8\xc3\xa9\xc3\x89\xc3\x88" },
+ { CMU, A, 0, 0, "[^\\x{e9}]+", "\xc3\xa9#\xf0\x90\x90\xa8\xc3\xa8\xc3\x88\xc3\x89" },
+ { MU, A, 0, 0, "[\\x02\\x7e]+", "\xc3\x81\xe1\xbf\xb8\xf0\x90\x90\xa8\x01\x02\x7e\x7f" },
+ { MU, A, 0, 0, "[^\\x02\\x7e]+", "\x02\xc3\x81\xe1\xbf\xb8\xf0\x90\x90\xa8\x01\x7f\x7e" },
+ { MU, A, 0, 0, "[\\x{81}-\\x{7fe}]+", "#\xe1\xbf\xb8\xf0\x90\x90\xa8\xc2\x80\xc2\x81\xdf\xbe\xdf\xbf" },
+ { MU, A, 0, 0, "[^\\x{81}-\\x{7fe}]+", "\xc2\x81#\xe1\xbf\xb8\xf0\x90\x90\xa8\xc2\x80\xdf\xbf\xdf\xbe" },
+ { MU, A, 0, 0, "[\\x{801}-\\x{fffe}]+", "#\xc3\xa9\xf0\x90\x90\x80\xe0\xa0\x80\xe0\xa0\x81\xef\xbf\xbe\xef\xbf\xbf" },
+ { MU, A, 0, 0, "[^\\x{801}-\\x{fffe}]+", "\xe0\xa0\x81#\xc3\xa9\xf0\x90\x90\x80\xe0\xa0\x80\xef\xbf\xbf\xef\xbf\xbe" },
+ { MU, A, 0, 0, "[\\x{10001}-\\x{10fffe}]+", "#\xc3\xa9\xe2\xb1\xa5\xf0\x90\x80\x80\xf0\x90\x80\x81\xf4\x8f\xbf\xbe\xf4\x8f\xbf\xbf" },
+ { MU, A, 0, 0, "[^\\x{10001}-\\x{10fffe}]+", "\xf0\x90\x80\x81#\xc3\xa9\xe2\xb1\xa5\xf0\x90\x80\x80\xf4\x8f\xbf\xbf\xf4\x8f\xbf\xbe" },
+
+ /* Unicode properties. */
+ { MUP, A, 0, 0, "[1-5\xc3\xa9\\w]", "\xc3\xa1_" },
+ { MUP, A, 0, 0 | F_PROPERTY, "[\xc3\x81\\p{Ll}]", "A_\xc3\x89\xc3\xa1" },
+ { MUP, A, 0, 0, "[\\Wd-h_x-z]+", "a\xc2\xa1#_yhzdxi" },
+ { MUP, A, 0, 0 | F_NOMATCH | F_PROPERTY, "[\\P{Any}]", "abc" },
+ { MUP, A, 0, 0 | F_NOMATCH | F_PROPERTY, "[^\\p{Any}]", "abc" },
+ { MUP, A, 0, 0 | F_NOMATCH | F_PROPERTY, "[\\P{Any}\xc3\xa1-\xc3\xa8]", "abc" },
+ { MUP, A, 0, 0 | F_NOMATCH | F_PROPERTY, "[^\\p{Any}\xc3\xa1-\xc3\xa8]", "abc" },
+ { MUP, A, 0, 0 | F_NOMATCH | F_PROPERTY, "[\xc3\xa1-\xc3\xa8\\P{Any}]", "abc" },
+ { MUP, A, 0, 0 | F_NOMATCH | F_PROPERTY, "[^\xc3\xa1-\xc3\xa8\\p{Any}]", "abc" },
+ { MUP, A, 0, 0 | F_PROPERTY, "[\xc3\xa1-\xc3\xa8\\p{Any}]", "abc" },
+ { MUP, A, 0, 0 | F_PROPERTY, "[^\xc3\xa1-\xc3\xa8\\P{Any}]", "abc" },
+ { MUP, A, 0, 0, "[b-\xc3\xa9\\s]", "a\xc\xe6\x92\xad" },
+ { CMUP, A, 0, 0, "[\xc2\x85-\xc2\x89\xc3\x89]", "\xc2\x84\xc3\xa9" },
+ { MUP, A, 0, 0, "[^b-d^&\\s]{3,}", "db^ !a\xe2\x80\xa8_ae" },
+ { MUP, A, 0, 0 | F_PROPERTY, "[^\\S\\P{Any}][\\sN]{1,3}[\\P{N}]{4}", "\xe2\x80\xaa\xa N\x9\xc3\xa9_0" },
+ { MU, A, 0, 0 | F_PROPERTY, "[^\\P{L}\x9!D-F\xa]{2,3}", "\x9,.DF\xa.CG\xc3\x81" },
+ { CMUP, A, 0, 0, "[\xc3\xa1-\xc3\xa9_\xe2\x80\xa0-\xe2\x80\xaf]{1,5}[^\xe2\x80\xa0-\xe2\x80\xaf]", "\xc2\xa1\xc3\x89\xc3\x89\xe2\x80\xaf_\xe2\x80\xa0" },
+ { MUP, A, 0, 0 | F_PROPERTY, "[\xc3\xa2-\xc3\xa6\xc3\x81-\xc3\x84\xe2\x80\xa8-\xe2\x80\xa9\xe6\x92\xad\\p{Zs}]{2,}", "\xe2\x80\xa7\xe2\x80\xa9\xe6\x92\xad \xe6\x92\xae" },
+ { MUP, A, 0, 0 | F_PROPERTY, "[\\P{L&}]{2}[^\xc2\x85-\xc2\x89\\p{Ll}\\p{Lu}]{2}", "\xc3\xa9\xe6\x92\xad.a\xe6\x92\xad|\xc2\x8a#" },
+ { PCRE2_UCP, 0, 0, 0 | F_PROPERTY, "[a-b\\s]{2,5}[^a]", "AB baaa" },
+
+ /* Possible empty brackets. */
+ { MU, A, 0, 0, "(?:|ab||bc|a)+d", "abcxabcabd" },
+ { MU, A, 0, 0, "(|ab||bc|a)+d", "abcxabcabd" },
+ { MU, A, 0, 0, "(?:|ab||bc|a)*d", "abcxabcabd" },
+ { MU, A, 0, 0, "(|ab||bc|a)*d", "abcxabcabd" },
+ { MU, A, 0, 0, "(?:|ab||bc|a)+?d", "abcxabcabd" },
+ { MU, A, 0, 0, "(|ab||bc|a)+?d", "abcxabcabd" },
+ { MU, A, 0, 0, "(?:|ab||bc|a)*?d", "abcxabcabd" },
+ { MU, A, 0, 0, "(|ab||bc|a)*?d", "abcxabcabd" },
+ { MU, A, 0, 0, "(((a)*?|(?:ba)+)+?|(?:|c|ca)*)*m", "abaacaccabacabalabaacaccabacabamm" },
+ { MU, A, 0, 0, "(?:((?:a)*|(ba)+?)+|(|c|ca)*?)*?m", "abaacaccabacabalabaacaccabacabamm" },
+
+ /* Start offset. */
+ { MU, A, 0, 3, "(\\d|(?:\\w)*\\w)+", "0ac01Hb" },
+ { MU, A, 0, 4 | F_NOMATCH, "(\\w\\W\\w)+", "ab#d" },
+ { MU, A, 0, 2 | F_NOMATCH, "(\\w\\W\\w)+", "ab#d" },
+ { MU, A, 0, 1, "(\\w\\W\\w)+", "ab#d" },
+
+ /* Newline. */
+ { M, PCRE2_NEWLINE_CRLF, 0, 0, "\\W{0,2}[^#]{3}", "\r\n#....." },
+ { M, PCRE2_NEWLINE_CR, 0, 0, "\\W{0,2}[^#]{3}", "\r\n#....." },
+ { M, PCRE2_NEWLINE_CRLF, 0, 0, "\\W{1,3}[^#]", "\r\n##...." },
+ { MU, A, PCRE2_NO_UTF_CHECK, 1, "^.a", "\n\x80\nxa" },
+ { MU, A, 0, 1, "^", "\r\n" },
+ { M, PCRE2_NEWLINE_CRLF, 0, 1 | F_NOMATCH, "^", "\r\n" },
+ { M, PCRE2_NEWLINE_CRLF, 0, 1, "^", "\r\na" },
+
+ /* Any character except newline or any newline. */
+ { 0, PCRE2_NEWLINE_CRLF, 0, 0, ".", "\r" },
+ { U, PCRE2_NEWLINE_CRLF, 0, 0, ".(.).", "a\xc3\xa1\r\n\n\r\r" },
+ { 0, PCRE2_NEWLINE_ANYCRLF, 0, 0, ".(.)", "a\rb\nc\r\n\xc2\x85\xe2\x80\xa8" },
+ { U, PCRE2_NEWLINE_ANYCRLF, 0, 0, ".(.)", "a\rb\nc\r\n\xc2\x85\xe2\x80\xa8" },
+ { U, PCRE2_NEWLINE_ANY, 0, 0, "(.).", "a\rb\nc\r\n\xc2\x85\xe2\x80\xa9$de" },
+ { U, PCRE2_NEWLINE_ANYCRLF, 0, 0 | F_NOMATCH, ".(.).", "\xe2\x80\xa8\nb\r" },
+ { 0, PCRE2_NEWLINE_ANY, 0, 0, "(.)(.)", "#\x85#\r#\n#\r\n#\x84" },
+ { U, PCRE2_NEWLINE_ANY, 0, 0, "(.+)#", "#\rMn\xc2\x85#\n###" },
+ { 0, BSR(PCRE2_BSR_ANYCRLF), 0, 0, "\\R", "\r" },
+ { 0, BSR(PCRE2_BSR_ANYCRLF), 0, 0, "\\R", "\x85#\r\n#" },
+ { U, BSR(PCRE2_BSR_UNICODE), 0, 0, "\\R", "ab\xe2\x80\xa8#c" },
+ { U, BSR(PCRE2_BSR_UNICODE), 0, 0, "\\R", "ab\r\nc" },
+ { U, PCRE2_NEWLINE_CRLF | BSR(PCRE2_BSR_UNICODE), 0, 0, "(\\R.)+", "\xc2\x85\r\n#\xe2\x80\xa8\n\r\n\r" },
+ { MU, A, 0, 0 | F_NOMATCH, "\\R+", "ab" },
+ { MU, A, 0, 0, "\\R+", "ab\r\n\r" },
+ { MU, A, 0, 0, "\\R*", "ab\r\n\r" },
+ { MU, A, 0, 0, "\\R*", "\r\n\r" },
+ { MU, A, 0, 0, "\\R{2,4}", "\r\nab\r\r" },
+ { MU, A, 0, 0, "\\R{2,4}", "\r\nab\n\n\n\r\r\r" },
+ { MU, A, 0, 0, "\\R{2,}", "\r\nab\n\n\n\r\r\r" },
+ { MU, A, 0, 0, "\\R{0,3}", "\r\n\r\n\r\n\r\n\r\n" },
+ { MU, A, 0, 0 | F_NOMATCH, "\\R+\\R\\R", "\r\n\r\n" },
+ { MU, A, 0, 0, "\\R+\\R\\R", "\r\r\r" },
+ { MU, A, 0, 0, "\\R*\\R\\R", "\n\r" },
+ { MU, A, 0, 0 | F_NOMATCH, "\\R{2,4}\\R\\R", "\r\r\r" },
+ { MU, A, 0, 0, "\\R{2,4}\\R\\R", "\r\r\r\r" },
+
+ /* Atomic groups (no fallback from "next" direction). */
+ { MU, A, 0, 0 | F_NOMATCH, "(?>ab)ab", "bab" },
+ { MU, A, 0, 0 | F_NOMATCH, "(?>(ab))ab", "bab" },
+ { MU, A, 0, 0, "(?>ab)+abc(?>de)*def(?>gh)?ghe(?>ij)+?k(?>lm)*?n(?>op)?\?op",
+ "bababcdedefgheijijklmlmnop" },
+ { MU, A, 0, 0, "(?>a(b)+a|(ab)?\?(b))an", "abban" },
+ { MU, A, 0, 0, "(?>ab+a|(?:ab)?\?b)an", "abban" },
+ { MU, A, 0, 0, "((?>ab|ad|)*?)(?>|c)*abad", "abababcababad" },
+ { MU, A, 0, 0, "(?>(aa|b|)*+(?>(##)|###)*d|(aa)(?>(baa)?)m)", "aabaa#####da" },
+ { MU, A, 0, 0, "((?>a|)+?)b", "aaacaaab" },
+ { MU, A, 0, 0, "(?>x|)*$", "aaa" },
+ { MU, A, 0, 0, "(?>(x)|)*$", "aaa" },
+ { MU, A, 0, 0, "(?>x|())*$", "aaa" },
+ { MU, A, 0, 0, "((?>[cxy]a|[a-d])*?)b", "aaa+ aaab" },
+ { MU, A, 0, 0, "((?>[cxy](a)|[a-d])*?)b", "aaa+ aaab" },
+ { MU, A, 0, 0, "(?>((?>(a+))))bab|(?>((?>(a+))))bb", "aaaabaaabaabab" },
+ { MU, A, 0, 0, "(?>(?>a+))bab|(?>(?>a+))bb", "aaaabaaabaabab" },
+ { MU, A, 0, 0, "(?>(a)c|(?>(c)|(a))a)b*?bab", "aaaabaaabaabab" },
+ { MU, A, 0, 0, "(?>ac|(?>c|a)a)b*?bab", "aaaabaaabaabab" },
+ { MU, A, 0, 0, "(?>(b)b|(a))*b(?>(c)|d)?x", "ababcaaabdbx" },
+ { MU, A, 0, 0, "(?>bb|a)*b(?>c|d)?x", "ababcaaabdbx" },
+ { MU, A, 0, 0, "(?>(bb)|a)*b(?>c|(d))?x", "ababcaaabdbx" },
+ { MU, A, 0, 0, "(?>(a))*?(?>(a))+?(?>(a))??x", "aaaaaacccaaaaabax" },
+ { MU, A, 0, 0, "(?>a)*?(?>a)+?(?>a)??x", "aaaaaacccaaaaabax" },
+ { MU, A, 0, 0, "(?>(a)|)*?(?>(a)|)+?(?>(a)|)??x", "aaaaaacccaaaaabax" },
+ { MU, A, 0, 0, "(?>a|)*?(?>a|)+?(?>a|)??x", "aaaaaacccaaaaabax" },
+ { MU, A, 0, 0, "(?>a(?>(a{0,2}))*?b|aac)+b", "aaaaaaacaaaabaaaaacaaaabaacaaabb" },
+ { CM, A, 0, 0, "(?>((?>a{32}|b+|(a*))?(?>c+|d*)?\?)+e)+?f", "aaccebbdde bbdaaaccebbdee bbdaaaccebbdeef" },
+ { MU, A, 0, 0, "(?>(?:(?>aa|a||x)+?b|(?>aa|a||(x))+?c)?(?>[ad]{0,2})*?d)+d", "aaacdbaabdcabdbaaacd aacaabdbdcdcaaaadaabcbaadd" },
+ { MU, A, 0, 0, "(?>(?:(?>aa|a||(x))+?b|(?>aa|a||x)+?c)?(?>[ad]{0,2})*?d)+d", "aaacdbaabdcabdbaaacd aacaabdbdcdcaaaadaabcbaadd" },
+ { MU, A, 0, 0 | F_PROPERTY, "\\X", "\xcc\x8d\xcc\x8d" },
+ { MU, A, 0, 0 | F_PROPERTY, "\\X", "\xcc\x8d\xcc\x8d#\xcc\x8d\xcc\x8d" },
+ { MU, A, 0, 0 | F_PROPERTY, "\\X+..", "\xcc\x8d#\xcc\x8d#\xcc\x8d\xcc\x8d" },
+ { MU, A, 0, 0 | F_PROPERTY, "\\X{2,4}", "abcdef" },
+ { MU, A, 0, 0 | F_PROPERTY, "\\X{2,4}?", "abcdef" },
+ { MU, A, 0, 0 | F_NOMATCH | F_PROPERTY, "\\X{2,4}..", "#\xcc\x8d##" },
+ { MU, A, 0, 0 | F_PROPERTY, "\\X{2,4}..", "#\xcc\x8d#\xcc\x8d##" },
+ { MU, A, 0, 0, "(c(ab)?+ab)+", "cabcababcab" },
+ { MU, A, 0, 0, "(?>(a+)b)+aabab", "aaaabaaabaabab" },
+
+ /* Possessive quantifiers. */
+ { MU, A, 0, 0, "(?:a|b)++m", "mababbaaxababbaam" },
+ { MU, A, 0, 0, "(?:a|b)*+m", "mababbaaxababbaam" },
+ { MU, A, 0, 0, "(?:a|b)*+m", "ababbaaxababbaam" },
+ { MU, A, 0, 0, "(a|b)++m", "mababbaaxababbaam" },
+ { MU, A, 0, 0, "(a|b)*+m", "mababbaaxababbaam" },
+ { MU, A, 0, 0, "(a|b)*+m", "ababbaaxababbaam" },
+ { MU, A, 0, 0, "(a|b(*ACCEPT))++m", "maaxab" },
+ { MU, A, 0, 0, "(?:b*)++m", "bxbbxbbbxm" },
+ { MU, A, 0, 0, "(?:b*)++m", "bxbbxbbbxbbm" },
+ { MU, A, 0, 0, "(?:b*)*+m", "bxbbxbbbxm" },
+ { MU, A, 0, 0, "(?:b*)*+m", "bxbbxbbbxbbm" },
+ { MU, A, 0, 0, "(b*)++m", "bxbbxbbbxm" },
+ { MU, A, 0, 0, "(b*)++m", "bxbbxbbbxbbm" },
+ { MU, A, 0, 0, "(b*)*+m", "bxbbxbbbxm" },
+ { MU, A, 0, 0, "(b*)*+m", "bxbbxbbbxbbm" },
+ { MU, A, 0, 0, "(?:a|(b))++m", "mababbaaxababbaam" },
+ { MU, A, 0, 0, "(?:(a)|b)*+m", "mababbaaxababbaam" },
+ { MU, A, 0, 0, "(?:(a)|(b))*+m", "ababbaaxababbaam" },
+ { MU, A, 0, 0, "(a|(b))++m", "mababbaaxababbaam" },
+ { MU, A, 0, 0, "((a)|b)*+m", "mababbaaxababbaam" },
+ { MU, A, 0, 0, "((a)|(b))*+m", "ababbaaxababbaam" },
+ { MU, A, 0, 0, "(a|(b)(*ACCEPT))++m", "maaxab" },
+ { MU, A, 0, 0, "(?:(b*))++m", "bxbbxbbbxm" },
+ { MU, A, 0, 0, "(?:(b*))++m", "bxbbxbbbxbbm" },
+ { MU, A, 0, 0, "(?:(b*))*+m", "bxbbxbbbxm" },
+ { MU, A, 0, 0, "(?:(b*))*+m", "bxbbxbbbxbbm" },
+ { MU, A, 0, 0, "((b*))++m", "bxbbxbbbxm" },
+ { MU, A, 0, 0, "((b*))++m", "bxbbxbbbxbbm" },
+ { MU, A, 0, 0, "((b*))*+m", "bxbbxbbbxm" },
+ { MU, A, 0, 0, "((b*))*+m", "bxbbxbbbxbbm" },
+ { MU, A, 0, 0 | F_NOMATCH, "(?>(b{2,4}))(?:(?:(aa|c))++m|(?:(aa|c))+n)", "bbaacaaccaaaacxbbbmbn" },
+ { MU, A, 0, 0, "((?:b)++a)+(cd)*+m", "bbababbacdcdnbbababbacdcdm" },
+ { MU, A, 0, 0, "((?:(b))++a)+((c)d)*+m", "bbababbacdcdnbbababbacdcdm" },
+ { MU, A, 0, 0, "(?:(?:(?:ab)*+k)++(?:n(?:cd)++)*+)*+m", "ababkkXababkkabkncXababkkabkncdcdncdXababkkabkncdcdncdkkabkncdXababkkabkncdcdncdkkabkncdm" },
+ { MU, A, 0, 0, "(?:((ab)*+(k))++(n(?:c(d))++)*+)*+m", "ababkkXababkkabkncXababkkabkncdcdncdXababkkabkncdcdncdkkabkncdXababkkabkncdcdncdkkabkncdm" },
+
+ /* Back references. */
+ { MU, A, 0, 0, "(aa|bb)(\\1*)(ll|)(\\3*)bbbbbbc", "aaaaaabbbbbbbbc" },
+ { CMU, A, 0, 0, "(aa|bb)(\\1+)(ll|)(\\3+)bbbbbbc", "bBbbBbCbBbbbBbbcbbBbbbBBbbC" },
+ { CM, A, 0, 0, "(a{2,4})\\1", "AaAaaAaA" },
+ { MU, A, 0, 0, "(aa|bb)(\\1?)aa(\\1?)(ll|)(\\4+)bbc", "aaaaaaaabbaabbbbaabbbbc" },
+ { MU, A, 0, 0, "(aa|bb)(\\1{0,5})(ll|)(\\3{0,5})cc", "bbxxbbbbxxaaaaaaaaaaaaaaaacc" },
+ { MU, A, 0, 0, "(aa|bb)(\\1{3,5})(ll|)(\\3{3,5})cc", "bbbbbbbbbbbbaaaaaaccbbbbbbbbbbbbbbcc" },
+ { MU, A, 0, 0, "(aa|bb)(\\1{3,})(ll|)(\\3{3,})cc", "bbbbbbbbbbbbaaaaaaccbbbbbbbbbbbbbbcc" },
+ { MU, A, 0, 0, "(\\w+)b(\\1+)c", "GabGaGaDbGaDGaDc" },
+ { MU, A, 0, 0, "(?:(aa)|b)\\1?b", "bb" },
+ { CMU, A, 0, 0, "(aa|bb)(\\1*?)aa(\\1+?)", "bBBbaaAAaaAAaa" },
+ { MU, A, 0, 0, "(aa|bb)(\\1*?)(dd|)cc(\\3+?)", "aaaaaccdd" },
+ { CMU, A, 0, 0, "(?:(aa|bb)(\\1?\?)cc){2}(\\1?\?)", "aAaABBbbAAaAcCaAcCaA" },
+ { MU, A, 0, 0, "(?:(aa|bb)(\\1{3,5}?)){2}(dd|)(\\3{3,5}?)", "aaaaaabbbbbbbbbbaaaaaaaaaaaaaa" },
+ { CM, A, 0, 0, "(?:(aa|bb)(\\1{3,}?)){2}(dd|)(\\3{3,}?)", "aaaaaabbbbbbbbbbaaaaaaaaaaaaaa" },
+ { MU, A, 0, 0, "(?:(aa|bb)(\\1{0,3}?)){2}(dd|)(\\3{0,3}?)b(\\1{0,3}?)(\\1{0,3})", "aaaaaaaaaaaaaaabaaaaa" },
+ { MU, A, 0, 0, "(a(?:\\1|)a){3}b", "aaaaaaaaaaab" },
+ { M, A, 0, 0, "(a?)b(\\1\\1*\\1+\\1?\\1*?\\1+?\\1??\\1*+\\1++\\1?+\\1{4}\\1{3,5}\\1{4,}\\1{0,5}\\1{3,5}?\\1{4,}?\\1{0,5}?\\1{3,5}+\\1{4,}+\\1{0,5}+#){2}d", "bb#b##d" },
+ { MUP, A, 0, 0 | F_PROPERTY, "(\\P{N})\\1{2,}", ".www." },
+ { MUP, A, 0, 0 | F_PROPERTY, "(\\P{N})\\1{0,2}", "wwwww." },
+ { MUP, A, 0, 0 | F_PROPERTY, "(\\P{N})\\1{1,2}ww", "wwww" },
+ { MUP, A, 0, 0 | F_PROPERTY, "(\\P{N})\\1{1,2}ww", "wwwww" },
+ { PCRE2_UCP, 0, 0, 0 | F_PROPERTY, "(\\P{N})\\1{2,}", ".www." },
+ { CMUP, A, 0, 0, "(\xf0\x90\x90\x80)\\1", "\xf0\x90\x90\xa8\xf0\x90\x90\xa8" },
+ { MU | PCRE2_DUPNAMES, A, 0, 0 | F_NOMATCH, "\\k<A>{1,3}(?<A>aa)(?<A>bb)", "aabb" },
+ { MU | PCRE2_DUPNAMES | PCRE2_MATCH_UNSET_BACKREF, A, 0, 0, "\\k<A>{1,3}(?<A>aa)(?<A>bb)", "aabb" },
+ { MU | PCRE2_DUPNAMES | PCRE2_MATCH_UNSET_BACKREF, A, 0, 0, "\\k<A>*(?<A>aa)(?<A>bb)", "aabb" },
+ { MU | PCRE2_DUPNAMES, A, 0, 0, "(?<A>aa)(?<A>bb)\\k<A>{0,3}aaaaaa", "aabbaaaaaa" },
+ { MU | PCRE2_DUPNAMES, A, 0, 0, "(?<A>aa)(?<A>bb)\\k<A>{2,5}bb", "aabbaaaabb" },
+ { MU | PCRE2_DUPNAMES, A, 0, 0, "(?:(?<A>aa)|(?<A>bb))\\k<A>{0,3}m", "aaaaaaaabbbbaabbbbm" },
+ { MU | PCRE2_DUPNAMES, A, 0, 0 | F_NOMATCH, "\\k<A>{1,3}?(?<A>aa)(?<A>bb)", "aabb" },
+ { MU | PCRE2_DUPNAMES | PCRE2_MATCH_UNSET_BACKREF, A, 0, 0, "\\k<A>{1,3}?(?<A>aa)(?<A>bb)", "aabb" },
+ { MU | PCRE2_DUPNAMES, A, 0, 0, "\\k<A>*?(?<A>aa)(?<A>bb)", "aabb" },
+ { MU | PCRE2_DUPNAMES, A, 0, 0, "(?:(?<A>aa)|(?<A>bb))\\k<A>{0,3}?m", "aaaaaabbbbbbaabbbbbbbbbbm" },
+ { MU | PCRE2_DUPNAMES, A, 0, 0, "(?:(?<A>aa)|(?<A>bb))\\k<A>*?m", "aaaaaabbbbbbaabbbbbbbbbbm" },
+ { MU | PCRE2_DUPNAMES, A, 0, 0, "(?:(?<A>aa)|(?<A>bb))\\k<A>{2,3}?", "aaaabbbbaaaabbbbbbbbbb" },
+ { CMU | PCRE2_DUPNAMES, A, 0, 0, "(?:(?<A>AA)|(?<A>BB))\\k<A>{0,3}M", "aaaaaaaabbbbaabbbbm" },
+ { CMU | PCRE2_DUPNAMES, A, 0, 0, "(?:(?<A>AA)|(?<A>BB))\\k<A>{1,3}M", "aaaaaaaabbbbaabbbbm" },
+ { CMU | PCRE2_DUPNAMES, A, 0, 0, "(?:(?<A>AA)|(?<A>BB))\\k<A>{0,3}?M", "aaaaaabbbbbbaabbbbbbbbbbm" },
+ { CMU | PCRE2_DUPNAMES, A, 0, 0, "(?:(?<A>AA)|(?<A>BB))\\k<A>{2,3}?", "aaaabbbbaaaabbbbbbbbbb" },
+
+ /* Assertions. */
+ { MU, A, 0, 0, "(?=xx|yy|zz)\\w{4}", "abczzdefg" },
+ { MU, A, 0, 0, "(?=((\\w+)b){3}|ab)", "dbbbb ab" },
+ { MU, A, 0, 0, "(?!ab|bc|cd)[a-z]{2}", "Xabcdef" },
+ { MU, A, 0, 0, "(?<=aaa|aa|a)a", "aaa" },
+ { MU, A, 0, 2, "(?<=aaa|aa|a)a", "aaa" },
+ { M, A, 0, 0, "(?<=aaa|aa|a)a", "aaa" },
+ { M, A, 0, 2, "(?<=aaa|aa|a)a", "aaa" },
+ { MU, A, 0, 0, "(\\d{2})(?!\\w+c|(((\\w?)m){2}n)+|\\1)", "x5656" },
+ { MU, A, 0, 0, "((?=((\\d{2,6}\\w){2,}))\\w{5,20}K){2,}", "567v09708K12l00M00 567v09708K12l00M00K45K" },
+ { MU, A, 0, 0, "(?=(?:(?=\\S+a)\\w*(b)){3})\\w+\\d", "bba bbab nbbkba nbbkba0kl" },
+ { MU, A, 0, 0, "(?>a(?>(b+))a(?=(..)))*?k", "acabbcabbaabacabaabbakk" },
+ { MU, A, 0, 0, "((?(?=(a))a)+k)", "bbak" },
+ { MU, A, 0, 0, "((?(?=a)a)+k)", "bbak" },
+ { MU, A, 0, 0 | F_NOMATCH, "(?=(?>(a))m)amk", "a k" },
+ { MU, A, 0, 0 | F_NOMATCH, "(?!(?>(a))m)amk", "a k" },
+ { MU, A, 0, 0 | F_NOMATCH, "(?>(?=(a))am)amk", "a k" },
+ { MU, A, 0, 0, "(?=(?>a|(?=(?>(b+))a|c)[a-c]+)*?m)[a-cm]+k", "aaam bbam baaambaam abbabba baaambaamk" },
+ { MU, A, 0, 0, "(?> ?\?\\b(?(?=\\w{1,4}(a))m)\\w{0,8}bc){2,}?", "bca ssbc mabd ssbc mabc" },
+ { MU, A, 0, 0, "(?:(?=ab)?[^n][^n])+m", "ababcdabcdcdabnababcdabcdcdabm" },
+ { MU, A, 0, 0, "(?:(?=a(b))?[^n][^n])+m", "ababcdabcdcdabnababcdabcdcdabm" },
+ { MU, A, 0, 0, "(?:(?=.(.))??\\1.)+m", "aabbbcbacccanaabbbcbacccam" },
+ { MU, A, 0, 0, "(?:(?=.)??[a-c])+m", "abacdcbacacdcaccam" },
+ { MU, A, 0, 0, "((?!a)?(?!([^a]))?)+$", "acbab" },
+ { MU, A, 0, 0, "((?!a)?\?(?!([^a]))?\?)+$", "acbab" },
+ { MU, A, 0, 0, "a(?=(?C)\\B(?C`x`))b", "ab" },
+ { MU, A, 0, 0, "a(?!(?C)\\B(?C`x`))bb|ab", "abb" },
+ { MU, A, 0, 0, "a(?=\\b|(?C)\\B(?C`x`))b", "ab" },
+ { MU, A, 0, 0, "a(?!\\b|(?C)\\B(?C`x`))bb|ab", "abb" },
+ { MU, A, 0, 0, "c(?(?=(?C)\\B(?C`x`))ab|a)", "cab" },
+ { MU, A, 0, 0, "c(?(?!(?C)\\B(?C`x`))ab|a)", "cab" },
+ { MU, A, 0, 0, "c(?(?=\\b|(?C)\\B(?C`x`))ab|a)", "cab" },
+ { MU, A, 0, 0, "c(?(?!\\b|(?C)\\B(?C`x`))ab|a)", "cab" },
+ { MU, A, 0, 0, "a(?=)b", "ab" },
+ { MU, A, 0, 0 | F_NOMATCH, "a(?!)b", "ab" },
+
+ /* Not empty, ACCEPT, FAIL */
+ { MU, A, PCRE2_NOTEMPTY, 0 | F_NOMATCH, "a*", "bcx" },
+ { MU, A, PCRE2_NOTEMPTY, 0, "a*", "bcaad" },
+ { MU, A, PCRE2_NOTEMPTY, 0, "a*?", "bcaad" },
+ { MU, A, PCRE2_NOTEMPTY_ATSTART, 0, "a*", "bcaad" },
+ { MU, A, 0, 0, "a(*ACCEPT)b", "ab" },
+ { MU, A, PCRE2_NOTEMPTY, 0 | F_NOMATCH, "a*(*ACCEPT)b", "bcx" },
+ { MU, A, PCRE2_NOTEMPTY, 0, "a*(*ACCEPT)b", "bcaad" },
+ { MU, A, PCRE2_NOTEMPTY, 0, "a*?(*ACCEPT)b", "bcaad" },
+ { MU, A, PCRE2_NOTEMPTY, 0 | F_NOMATCH, "(?:z|a*(*ACCEPT)b)", "bcx" },
+ { MU, A, PCRE2_NOTEMPTY, 0, "(?:z|a*(*ACCEPT)b)", "bcaad" },
+ { MU, A, PCRE2_NOTEMPTY, 0, "(?:z|a*?(*ACCEPT)b)", "bcaad" },
+ { MU, A, PCRE2_NOTEMPTY_ATSTART, 0, "a*(*ACCEPT)b", "bcx" },
+ { MU, A, PCRE2_NOTEMPTY_ATSTART, 0 | F_NOMATCH, "a*(*ACCEPT)b", "" },
+ { MU, A, 0, 0, "((a(*ACCEPT)b))", "ab" },
+ { MU, A, 0, 0, "(a(*FAIL)a|a)", "aaa" },
+ { MU, A, 0, 0, "(?=ab(*ACCEPT)b)a", "ab" },
+ { MU, A, 0, 0, "(?=(?:x|ab(*ACCEPT)b))", "ab" },
+ { MU, A, 0, 0, "(?=(a(b(*ACCEPT)b)))a", "ab" },
+ { MU, A, PCRE2_NOTEMPTY, 0, "(?=a*(*ACCEPT))c", "c" },
+
+ /* Conditional blocks. */
+ { MU, A, 0, 0, "(?(?=(a))a|b)+k", "ababbalbbadabak" },
+ { MU, A, 0, 0, "(?(?!(b))a|b)+k", "ababbalbbadabak" },
+ { MU, A, 0, 0, "(?(?=a)a|b)+k", "ababbalbbadabak" },
+ { MU, A, 0, 0, "(?(?!b)a|b)+k", "ababbalbbadabak" },
+ { MU, A, 0, 0, "(?(?=(a))a*|b*)+k", "ababbalbbadabak" },
+ { MU, A, 0, 0, "(?(?!(b))a*|b*)+k", "ababbalbbadabak" },
+ { MU, A, 0, 0, "(?(?!(b))(?:aaaaaa|a)|(?:bbbbbb|b))+aaaak", "aaaaaaaaaaaaaa bbbbbbbbbbbbbbb aaaaaaak" },
+ { MU, A, 0, 0, "(?(?!b)(?:aaaaaa|a)|(?:bbbbbb|b))+aaaak", "aaaaaaaaaaaaaa bbbbbbbbbbbbbbb aaaaaaak" },
+ { MU, A, 0, 0 | F_DIFF, "(?(?!(b))(?:aaaaaa|a)|(?:bbbbbb|b))+bbbbk", "aaaaaaaaaaaaaa bbbbbbbbbbbbbbb bbbbbbbk" },
+ { MU, A, 0, 0, "(?(?!b)(?:aaaaaa|a)|(?:bbbbbb|b))+bbbbk", "aaaaaaaaaaaaaa bbbbbbbbbbbbbbb bbbbbbbk" },
+ { MU, A, 0, 0, "(?(?=a)a*|b*)+k", "ababbalbbadabak" },
+ { MU, A, 0, 0, "(?(?!b)a*|b*)+k", "ababbalbbadabak" },
+ { MU, A, 0, 0, "(?(?=a)ab)", "a" },
+ { MU, A, 0, 0, "(?(?<!b)c)", "b" },
+ { MU, A, 0, 0, "(?(DEFINE)a(b))", "a" },
+ { MU, A, 0, 0, "a(?(DEFINE)(?:b|(?:c?)+)*)", "a" },
+ { MU, A, 0, 0, "(?(?=.[a-c])[k-l]|[A-D])", "kdB" },
+ { MU, A, 0, 0, "(?(?!.{0,4}[cd])(aa|bb)|(cc|dd))+", "aabbccddaa" },
+ { MU, A, 0, 0, "(?(?=[^#@]*@)(aaab|aa|aba)|(aba|aab)){3,}", "aaabaaaba#aaabaaaba#aaabaaaba@" },
+ { MU, A, 0, 0, "((?=\\w{5})\\w(?(?=\\w*k)\\d|[a-f_])*\\w\\s)+", "mol m10kk m088k _f_a_ mbkkl" },
+ { MU, A, 0, 0, "(c)?\?(?(1)a|b)", "cdcaa" },
+ { MU, A, 0, 0, "(c)?\?(?(1)a|b)", "cbb" },
+ { MU, A, 0, 0 | F_DIFF, "(?(?=(a))(aaaa|a?))+aak", "aaaaab aaaaak" },
+ { MU, A, 0, 0, "(?(?=a)(aaaa|a?))+aak", "aaaaab aaaaak" },
+ { MU, A, 0, 0, "(?(?!(b))(aaaa|a?))+aak", "aaaaab aaaaak" },
+ { MU, A, 0, 0, "(?(?!b)(aaaa|a?))+aak", "aaaaab aaaaak" },
+ { MU, A, 0, 0 | F_DIFF, "(?(?=(a))a*)+aak", "aaaaab aaaaak" },
+ { MU, A, 0, 0, "(?(?=a)a*)+aak", "aaaaab aaaaak" },
+ { MU, A, 0, 0, "(?(?!(b))a*)+aak", "aaaaab aaaaak" },
+ { MU, A, 0, 0, "(?(?!b)a*)+aak", "aaaaab aaaaak" },
+ { MU, A, 0, 0, "(?(?=(?=(?!(x))a)aa)aaa|(?(?=(?!y)bb)bbb))*k", "abaabbaaabbbaaabbb abaabbaaabbbaaabbbk" },
+ { MU, A, 0, 0, "(?P<Name>a)?(?P<Name2>b)?(?(Name)c|d)*l", "bc ddd abccabccl" },
+ { MU, A, 0, 0, "(?P<Name>a)?(?P<Name2>b)?(?(Name)c|d)+?dd", "bcabcacdb bdddd" },
+ { MU, A, 0, 0, "(?P<Name>a)?(?P<Name2>b)?(?(Name)c|d)+l", "ababccddabdbccd abcccl" },
+ { MU, A, 0, 0, "((?:a|aa)(?(1)aaa))x", "aax" },
+ { MU, A, 0, 0, "(?(?!)a|b)", "ab" },
+ { MU, A, 0, 0, "(?(?!)a)", "ab" },
+ { MU, A, 0, 0 | F_NOMATCH, "(?(?!)a|b)", "ac" },
+
+ /* Set start of match. */
+ { MU, A, 0, 0, "(?:\\Ka)*aaaab", "aaaaaaaa aaaaaaabb" },
+ { MU, A, 0, 0, "(?>\\Ka\\Ka)*aaaab", "aaaaaaaa aaaaaaaaaabb" },
+ { MU, A, 0, 0, "a+\\K(?<=\\Gaa)a", "aaaaaa" },
+ { MU, A, PCRE2_NOTEMPTY, 0 | F_NOMATCH, "a\\K(*ACCEPT)b", "aa" },
+ { MU, A, PCRE2_NOTEMPTY_ATSTART, 0, "a\\K(*ACCEPT)b", "aa" },
+
+ /* First line. */
+ { MU | PCRE2_FIRSTLINE, A, 0, 0 | F_PROPERTY, "\\p{Any}a", "bb\naaa" },
+ { MU | PCRE2_FIRSTLINE, A, 0, 0 | F_NOMATCH | F_PROPERTY, "\\p{Any}a", "bb\r\naaa" },
+ { MU | PCRE2_FIRSTLINE, A, 0, 0, "(?<=a)", "a" },
+ { MU | PCRE2_FIRSTLINE, A, 0, 0 | F_NOMATCH, "[^a][^b]", "ab" },
+ { MU | PCRE2_FIRSTLINE, A, 0, 0 | F_NOMATCH, "a", "\na" },
+ { MU | PCRE2_FIRSTLINE, A, 0, 0 | F_NOMATCH, "[abc]", "\na" },
+ { MU | PCRE2_FIRSTLINE, A, 0, 0 | F_NOMATCH, "^a", "\na" },
+ { MU | PCRE2_FIRSTLINE, A, 0, 0 | F_NOMATCH, "^(?<=\n)", "\na" },
+ { MU | PCRE2_FIRSTLINE, A, 0, 0, "\xf0\x90\x90\x80", "\xf0\x90\x90\x80" },
+ { MU | PCRE2_FIRSTLINE, PCRE2_NEWLINE_ANY, 0, 0 | F_NOMATCH, "#", "\xc2\x85#" },
+ { M | PCRE2_FIRSTLINE, PCRE2_NEWLINE_ANY, 0, 0 | F_NOMATCH, "#", "\x85#" },
+ { MU | PCRE2_FIRSTLINE, PCRE2_NEWLINE_ANY, 0, 0 | F_NOMATCH, "^#", "\xe2\x80\xa8#" },
+ { MU | PCRE2_FIRSTLINE, PCRE2_NEWLINE_CRLF, 0, 0 | F_PROPERTY, "\\p{Any}", "\r\na" },
+ { MU | PCRE2_FIRSTLINE, PCRE2_NEWLINE_CRLF, 0, 0, ".", "\r" },
+ { MU | PCRE2_FIRSTLINE, PCRE2_NEWLINE_CRLF, 0, 0, "a", "\ra" },
+ { MU | PCRE2_FIRSTLINE, PCRE2_NEWLINE_CRLF, 0, 0 | F_NOMATCH, "ba", "bbb\r\nba" },
+ { MU | PCRE2_FIRSTLINE, PCRE2_NEWLINE_CRLF, 0, 0 | F_NOMATCH | F_PROPERTY, "\\p{Any}{4}|a", "\r\na" },
+ { MU | PCRE2_FIRSTLINE, PCRE2_NEWLINE_CRLF, 0, 1, ".", "\r\n" },
+ { PCRE2_FIRSTLINE | PCRE2_DOTALL, PCRE2_NEWLINE_LF, 0, 0 | F_NOMATCH, "ab.", "ab" },
+ { MU | PCRE2_FIRSTLINE, A, 0, 1 | F_NOMATCH, "^[a-d0-9]", "\nxx\nd" },
+ { PCRE2_FIRSTLINE | PCRE2_DOTALL, PCRE2_NEWLINE_ANY, 0, 0, "....a", "012\n0a" },
+ { MU | PCRE2_FIRSTLINE, A, 0, 0, "[aC]", "a" },
+
+ /* Recurse. */
+ { MU, A, 0, 0, "(a)(?1)", "aa" },
+ { MU, A, 0, 0, "((a))(?1)", "aa" },
+ { MU, A, 0, 0, "(b|a)(?1)", "aa" },
+ { MU, A, 0, 0, "(b|(a))(?1)", "aa" },
+ { MU, A, 0, 0 | F_NOMATCH, "((a)(b)(?:a*))(?1)", "aba" },
+ { MU, A, 0, 0, "((a)(b)(?:a*))(?1)", "abab" },
+ { MU, A, 0, 0, "((a+)c(?2))b(?1)", "aacaabaca" },
+ { MU, A, 0, 0, "((?2)b|(a)){2}(?1)", "aabab" },
+ { MU, A, 0, 0, "(?1)(a)*+(?2)(b(?1))", "aababa" },
+ { MU, A, 0, 0, "(?1)(((a(*ACCEPT)))b)", "axaa" },
+ { MU, A, 0, 0, "(?1)(?(DEFINE) (((ac(*ACCEPT)))b) )", "akaac" },
+ { MU, A, 0, 0, "(a+)b(?1)b\\1", "abaaabaaaaa" },
+ { MU, A, 0, 0 | F_NOMATCH, "(?(DEFINE)(aa|a))(?1)ab", "aab" },
+ { MU, A, 0, 0, "(?(DEFINE)(a\\Kb))(?1)+ababc", "abababxabababc" },
+ { MU, A, 0, 0, "(a\\Kb)(?1)+ababc", "abababxababababc" },
+ { MU, A, 0, 0 | F_NOMATCH, "(a\\Kb)(?1)+ababc", "abababxababababxc" },
+ { MU, A, 0, 0, "b|<(?R)*>", "<<b>" },
+ { MU, A, 0, 0, "(a\\K){0}(?:(?1)b|ac)", "ac" },
+ { MU, A, 0, 0, "(?(DEFINE)(a(?2)|b)(b(?1)|(a)))(?:(?1)|(?2))m", "ababababnababababaam" },
+ { MU, A, 0, 0, "(a)((?(R)a|b))(?2)", "aabbabaa" },
+ { MU, A, 0, 0, "(a)((?(R2)a|b))(?2)", "aabbabaa" },
+ { MU, A, 0, 0, "(a)((?(R1)a|b))(?2)", "ababba" },
+ { MU, A, 0, 0, "(?(R0)aa|bb(?R))", "abba aabb bbaa" },
+ { MU, A, 0, 0, "((?(R)(?:aaaa|a)|(?:(aaaa)|(a)))+)(?1)$", "aaaaaaaaaa aaaa" },
+ { MU, A, 0, 0, "(?P<Name>a(?(R&Name)a|b))(?1)", "aab abb abaa" },
+ { MU, A, 0, 0, "((?(R)a|(?1)){3})", "XaaaaaaaaaX" },
+ { MU, A, 0, 0, "((?:(?(R)a|(?1))){3})", "XaaaaaaaaaX" },
+ { MU, A, 0, 0, "((?(R)a|(?1)){1,3})aaaaaa", "aaaaaaaaXaaaaaaaaa" },
+ { MU, A, 0, 0, "((?(R)a|(?1)){1,3}?)M", "aaaM" },
+
+ /* 16 bit specific tests. */
+ { CM, A, 0, 0 | F_FORCECONV, "\xc3\xa1", "\xc3\x81\xc3\xa1" },
+ { CM, A, 0, 0 | F_FORCECONV, "\xe1\xbd\xb8", "\xe1\xbf\xb8\xe1\xbd\xb8" },
+ { CM, A, 0, 0 | F_FORCECONV, "[\xc3\xa1]", "\xc3\x81\xc3\xa1" },
+ { CM, A, 0, 0 | F_FORCECONV, "[\xe1\xbd\xb8]", "\xe1\xbf\xb8\xe1\xbd\xb8" },
+ { CM, A, 0, 0 | F_FORCECONV, "[a-\xed\xb0\x80]", "A" },
+ { CM, A, 0, 0 | F_NO8 | F_FORCECONV, "[a-\\x{dc00}]", "B" },
+ { CM, A, 0, 0 | F_NO8 | F_NOMATCH | F_FORCECONV, "[b-\\x{dc00}]", "a" },
+ { CM, A, 0, 0 | F_NO8 | F_FORCECONV, "\xed\xa0\x80\\x{d800}\xed\xb0\x80\\x{dc00}", "\xed\xa0\x80\xed\xa0\x80\xed\xb0\x80\xed\xb0\x80" },
+ { CM, A, 0, 0 | F_NO8 | F_FORCECONV, "[\xed\xa0\x80\\x{d800}]{1,2}?[\xed\xb0\x80\\x{dc00}]{1,2}?#", "\xed\xa0\x80\xed\xa0\x80\xed\xb0\x80\xed\xb0\x80#" },
+ { CM, A, 0, 0 | F_FORCECONV, "[\xed\xa0\x80\xed\xb0\x80#]{0,3}(?<=\xed\xb0\x80.)", "\xed\xa0\x80#\xed\xa0\x80##\xed\xb0\x80\xed\xa0\x80" },
+ { CM, A, 0, 0 | F_FORCECONV, "[\xed\xa0\x80-\xed\xb3\xbf]", "\xed\x9f\xbf\xed\xa0\x83" },
+ { CM, A, 0, 0 | F_FORCECONV, "[\xed\xa0\x80-\xed\xb3\xbf]", "\xed\xb4\x80\xed\xb3\xb0" },
+ { CM, A, 0, 0 | F_NO8 | F_FORCECONV, "[\\x{d800}-\\x{dcff}]", "\xed\x9f\xbf\xed\xa0\x83" },
+ { CM, A, 0, 0 | F_NO8 | F_FORCECONV, "[\\x{d800}-\\x{dcff}]", "\xed\xb4\x80\xed\xb3\xb0" },
+ { CM, A, 0, 0 | F_FORCECONV, "[\xed\xa0\x80-\xef\xbf\xbf]+[\x1-\xed\xb0\x80]+#", "\xed\xa0\x85\xc3\x81\xed\xa0\x85\xef\xbf\xb0\xc2\x85\xed\xa9\x89#" },
+ { CM, A, 0, 0 | F_FORCECONV, "[\xed\xa0\x80][\xed\xb0\x80]{2,}", "\xed\xa0\x80\xed\xb0\x80\xed\xa0\x80\xed\xb0\x80\xed\xb0\x80\xed\xb0\x80" },
+ { M, A, 0, 0 | F_FORCECONV, "[^\xed\xb0\x80]{3,}?", "##\xed\xb0\x80#\xed\xb0\x80#\xc3\x89#\xed\xb0\x80" },
+ { M, A, 0, 0 | F_NO8 | F_FORCECONV, "[^\\x{dc00}]{3,}?", "##\xed\xb0\x80#\xed\xb0\x80#\xc3\x89#\xed\xb0\x80" },
+ { CM, A, 0, 0 | F_FORCECONV, ".\\B.", "\xed\xa0\x80\xed\xb0\x80" },
+ { CM, A, 0, 0 | F_FORCECONV, "\\D+(?:\\d+|.)\\S+(?:\\s+|.)\\W+(?:\\w+|.)\xed\xa0\x80\xed\xa0\x80", "\xed\xa0\x80\xed\xa0\x80\xed\xa0\x80\xed\xa0\x80\xed\xa0\x80\xed\xa0\x80\xed\xa0\x80\xed\xa0\x80" },
+ { CM, A, 0, 0 | F_FORCECONV, "\\d*\\s*\\w*\xed\xa0\x80\xed\xa0\x80", "\xed\xa0\x80\xed\xa0\x80" },
+ { CM, A, 0, 0 | F_FORCECONV | F_NOMATCH, "\\d*?\\D*?\\s*?\\S*?\\w*?\\W*?##", "\xed\xa0\x80\xed\xa0\x80\xed\xa0\x80\xed\xa0\x80#" },
+ { CM | PCRE2_EXTENDED, A, 0, 0 | F_FORCECONV, "\xed\xa0\x80 \xed\xb0\x80 !", "\xed\xa0\x80\xed\xb0\x80!" },
+ { CM, A, 0, 0 | F_FORCECONV, "\xed\xa0\x80+#[^#]+\xed\xa0\x80", "\xed\xa0\x80#a\xed\xa0\x80" },
+ { CM, A, 0, 0 | F_FORCECONV, "(\xed\xa0\x80+)#\\1", "\xed\xa0\x80\xed\xa0\x80#\xed\xa0\x80\xed\xa0\x80" },
+ { M, PCRE2_NEWLINE_ANY, 0, 0 | F_NO8 | F_FORCECONV, "^-", "a--\xe2\x80\xa8--" },
+ { 0, BSR(PCRE2_BSR_UNICODE), 0, 0 | F_NO8 | F_FORCECONV, "\\R", "ab\xe2\x80\xa8" },
+ { 0, 0, 0, 0 | F_NO8 | F_FORCECONV, "\\v", "ab\xe2\x80\xa9" },
+ { 0, 0, 0, 0 | F_NO8 | F_FORCECONV, "\\h", "ab\xe1\xa0\x8e" },
+ { 0, 0, 0, 0 | F_NO8 | F_FORCECONV, "\\v+?\\V+?#", "\xe2\x80\xa9\xe2\x80\xa9\xef\xbf\xbf\xef\xbf\xbf#" },
+ { 0, 0, 0, 0 | F_NO8 | F_FORCECONV, "\\h+?\\H+?#", "\xe1\xa0\x8e\xe1\xa0\x8e\xef\xbf\xbf\xef\xbf\xbf#" },
+
+ /* Partial matching. */
+ { MU, A, PCRE2_PARTIAL_SOFT, 0, "ab", "a" },
+ { MU, A, PCRE2_PARTIAL_SOFT, 0, "ab|a", "a" },
+ { MU, A, PCRE2_PARTIAL_HARD, 0, "ab|a", "a" },
+ { MU, A, PCRE2_PARTIAL_SOFT, 0, "\\b#", "a" },
+ { MU, A, PCRE2_PARTIAL_SOFT, 0, "(?<=a)b", "a" },
+ { MU, A, PCRE2_PARTIAL_SOFT, 0, "abc|(?<=xxa)bc", "xxab" },
+ { MU, A, PCRE2_PARTIAL_SOFT, 0, "a\\B", "a" },
+ { MU, A, PCRE2_PARTIAL_HARD, 0, "a\\b", "a" },
+
+ /* (*MARK) verb. */
+ { MU, A, 0, 0, "a(*MARK:aa)a", "ababaa" },
+ { MU, A, 0, 0 | F_NOMATCH, "a(*:aa)a", "abab" },
+ { MU, A, 0, 0, "a(*:aa)(b(*:bb)b|bc)", "abc" },
+ { MU, A, 0, 0 | F_NOMATCH, "a(*:1)x|b(*:2)y", "abc" },
+ { MU, A, 0, 0, "(?>a(*:aa))b|ac", "ac" },
+ { MU, A, 0, 0, "(?(DEFINE)(a(*:aa)))(?1)", "a" },
+ { MU, A, 0, 0 | F_NOMATCH, "(?(DEFINE)((a)(*:aa)))(?1)b", "aa" },
+ { MU, A, 0, 0, "(?(DEFINE)(a(*:aa)))a(?1)b|aac", "aac" },
+ { MU, A, 0, 0, "(a(*:aa)){0}(?:b(?1)b|c)+c", "babbab cc" },
+ { MU, A, 0, 0, "(a(*:aa)){0}(?:b(?1)b)+", "babba" },
+ { MU, A, 0, 0 | F_NOMATCH, "(a(*:aa)){0}(?:b(?1)b)+", "ba" },
+ { MU, A, 0, 0, "(a\\K(*:aa)){0}(?:b(?1)b|c)+c", "babbab cc" },
+ { MU, A, 0, 0, "(a\\K(*:aa)){0}(?:b(?1)b)+", "babba" },
+ { MU, A, 0, 0 | F_NOMATCH, "(a\\K(*:aa)){0}(?:b(?1)b)+", "ba" },
+ { MU, A, 0, 0 | F_NOMATCH, "(*:mark)m", "a" },
+
+ /* (*COMMIT) verb. */
+ { MU, A, 0, 0 | F_NOMATCH, "a(*COMMIT)b", "ac" },
+ { MU, A, 0, 0, "aa(*COMMIT)b", "xaxaab" },
+ { MU, A, 0, 0 | F_NOMATCH, "a(*COMMIT)(*:msg)b|ac", "ac" },
+ { MU, A, 0, 0 | F_NOMATCH, "(a(*COMMIT)b)++", "abac" },
+ { MU, A, 0, 0 | F_NOMATCH, "((a)(*COMMIT)b)++", "abac" },
+ { MU, A, 0, 0 | F_NOMATCH, "(?=a(*COMMIT)b)ab|ad", "ad" },
+
+ /* (*PRUNE) verb. */
+ { MU, A, 0, 0, "aa\\K(*PRUNE)b", "aaab" },
+ { MU, A, 0, 0, "aa(*PRUNE:bb)b|a", "aa" },
+ { MU, A, 0, 0, "(a)(a)(*PRUNE)b|(a)", "aa" },
+ { MU, A, 0, 0, "(a)(a)(a)(a)(a)(a)(a)(a)(*PRUNE)b|(a)", "aaaaaaaa" },
+ { MU, A, PCRE2_PARTIAL_SOFT, 0, "a(*PRUNE)a|", "a" },
+ { MU, A, PCRE2_PARTIAL_SOFT, 0, "a(*PRUNE)a|m", "a" },
+ { MU, A, 0, 0 | F_NOMATCH, "(?=a(*PRUNE)b)ab|ad", "ad" },
+ { MU, A, 0, 0, "a(*COMMIT)(*PRUNE)d|bc", "abc" },
+ { MU, A, 0, 0, "(?=a(*COMMIT)b)a(*PRUNE)c|bc", "abc" },
+ { MU, A, 0, 0 | F_NOMATCH, "(*COMMIT)(?=a(*COMMIT)b)a(*PRUNE)c|bc", "abc" },
+ { MU, A, 0, 0, "(?=(a)(*COMMIT)b)a(*PRUNE)c|bc", "abc" },
+ { MU, A, 0, 0 | F_NOMATCH, "(*COMMIT)(?=(a)(*COMMIT)b)a(*PRUNE)c|bc", "abc" },
+ { MU, A, 0, 0, "(a(*COMMIT)b){0}a(?1)(*PRUNE)c|bc", "abc" },
+ { MU, A, 0, 0 | F_NOMATCH, "(a(*COMMIT)b){0}a(*COMMIT)(?1)(*PRUNE)c|bc", "abc" },
+ { MU, A, 0, 0, "(a(*COMMIT)b)++(*PRUNE)d|c", "ababc" },
+ { MU, A, 0, 0 | F_NOMATCH, "(*COMMIT)(a(*COMMIT)b)++(*PRUNE)d|c", "ababc" },
+ { MU, A, 0, 0, "((a)(*COMMIT)b)++(*PRUNE)d|c", "ababc" },
+ { MU, A, 0, 0 | F_NOMATCH, "(*COMMIT)((a)(*COMMIT)b)++(*PRUNE)d|c", "ababc" },
+ { MU, A, 0, 0, "(?>a(*COMMIT)b)*abab(*PRUNE)d|ba", "ababab" },
+ { MU, A, 0, 0 | F_NOMATCH, "(*COMMIT)(?>a(*COMMIT)b)*abab(*PRUNE)d|ba", "ababab" },
+ { MU, A, 0, 0, "(?>a(*COMMIT)b)+abab(*PRUNE)d|ba", "ababab" },
+ { MU, A, 0, 0 | F_NOMATCH, "(*COMMIT)(?>a(*COMMIT)b)+abab(*PRUNE)d|ba", "ababab" },
+ { MU, A, 0, 0, "(?>a(*COMMIT)b)?ab(*PRUNE)d|ba", "aba" },
+ { MU, A, 0, 0 | F_NOMATCH, "(*COMMIT)(?>a(*COMMIT)b)?ab(*PRUNE)d|ba", "aba" },
+ { MU, A, 0, 0, "(?>a(*COMMIT)b)*?n(*PRUNE)d|ba", "abababn" },
+ { MU, A, 0, 0 | F_NOMATCH, "(*COMMIT)(?>a(*COMMIT)b)*?n(*PRUNE)d|ba", "abababn" },
+ { MU, A, 0, 0, "(?>a(*COMMIT)b)+?n(*PRUNE)d|ba", "abababn" },
+ { MU, A, 0, 0 | F_NOMATCH, "(*COMMIT)(?>a(*COMMIT)b)+?n(*PRUNE)d|ba", "abababn" },
+ { MU, A, 0, 0, "(?>a(*COMMIT)b)??n(*PRUNE)d|bn", "abn" },
+ { MU, A, 0, 0 | F_NOMATCH, "(*COMMIT)(?>a(*COMMIT)b)??n(*PRUNE)d|bn", "abn" },
+
+ /* (*SKIP) verb. */
+ { MU, A, 0, 0 | F_NOMATCH, "(?=a(*SKIP)b)ab|ad", "ad" },
+ { MU, A, 0, 0, "(\\w+(*SKIP)#)", "abcd,xyz#," },
+ { MU, A, 0, 0, "\\w+(*SKIP)#|mm", "abcd,xyz#," },
+ { MU, A, 0, 0 | F_NOMATCH, "b+(?<=(*SKIP)#c)|b+", "#bbb" },
+
+ /* (*THEN) verb. */
+ { MU, A, 0, 0, "((?:a(*THEN)|aab)(*THEN)c|a+)+m", "aabcaabcaabcaabcnacm" },
+ { MU, A, 0, 0 | F_NOMATCH, "((?:a(*THEN)|aab)(*THEN)c|a+)+m", "aabcm" },
+ { MU, A, 0, 0, "((?:a(*THEN)|aab)c|a+)+m", "aabcaabcnmaabcaabcm" },
+ { MU, A, 0, 0, "((?:a|aab)(*THEN)c|a+)+m", "aam" },
+ { MU, A, 0, 0, "((?:a(*COMMIT)|aab)(*THEN)c|a+)+m", "aam" },
+ { MU, A, 0, 0, "(?(?=a(*THEN)b)ab|ad)", "ad" },
+ { MU, A, 0, 0, "(?(?!a(*THEN)b)ad|add)", "add" },
+ { MU, A, 0, 0 | F_NOMATCH, "(?(?=a)a(*THEN)b|ad)", "ad" },
+ { MU, A, 0, 0, "(?!(?(?=a)ab|b(*THEN)d))bn|bnn", "bnn" },
+
+ /* Deep recursion. */
+ { MU, A, 0, 0, "((((?:(?:(?:\\w)+)?)*|(?>\\w)+?)+|(?>\\w)?\?)*)?\\s", "aaaaa+ " },
+ { MU, A, 0, 0, "(?:((?:(?:(?:\\w*?)+)??|(?>\\w)?|\\w*+)*)+)+?\\s", "aa+ " },
+ { MU, A, 0, 0, "((a?)+)+b", "aaaaaaaaaaaa b" },
+
+ /* Deep recursion: Stack limit reached. */
+ { M, A, 0, 0 | F_NOMATCH, "a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaaaaa", "aaaaaaaaaaaaaaaaaaaaaaa" },
+ { M, A, 0, 0 | F_NOMATCH, "(?:a+)+b", "aaaaaaaaaaaaaaaaaaaaaaaa b" },
+ { M, A, 0, 0 | F_NOMATCH, "(?:a+?)+?b", "aaaaaaaaaaaaaaaaaaaaaaaa b" },
+ { M, A, 0, 0 | F_NOMATCH, "(?:a*)*b", "aaaaaaaaaaaaaaaaaaaaaaaa b" },
+ { M, A, 0, 0 | F_NOMATCH, "(?:a*?)*?b", "aaaaaaaaaaaaaaaaaaaaaaaa b" },
+
+ { 0, 0, 0, 0, NULL, NULL }
+};
+
+#ifdef SUPPORT_PCRE2_8
+static pcre2_jit_stack_8* callback8(void *arg)
+{
+ return (pcre2_jit_stack_8 *)arg;
+}
+#endif
+
+#ifdef SUPPORT_PCRE2_16
+static pcre2_jit_stack_16* callback16(void *arg)
+{
+ return (pcre2_jit_stack_16 *)arg;
+}
+#endif
+
+#ifdef SUPPORT_PCRE2_32
+static pcre2_jit_stack_32* callback32(void *arg)
+{
+ return (pcre2_jit_stack_32 *)arg;
+}
+#endif
+
+#ifdef SUPPORT_PCRE2_8
+static pcre2_jit_stack_8 *stack8;
+
+static pcre2_jit_stack_8 *getstack8(void)
+{
+ if (!stack8)
+ stack8 = pcre2_jit_stack_create_8(1, 1024 * 1024, NULL);
+ return stack8;
+}
+
+static void setstack8(pcre2_match_context_8 *mcontext)
+{
+ if (!mcontext) {
+ if (stack8)
+ pcre2_jit_stack_free_8(stack8);
+ stack8 = NULL;
+ return;
+ }
+
+ pcre2_jit_stack_assign_8(mcontext, callback8, getstack8());
+}
+#endif /* SUPPORT_PCRE2_8 */
+
+#ifdef SUPPORT_PCRE2_16
+static pcre2_jit_stack_16 *stack16;
+
+static pcre2_jit_stack_16 *getstack16(void)
+{
+ if (!stack16)
+ stack16 = pcre2_jit_stack_create_16(1, 1024 * 1024, NULL);
+ return stack16;
+}
+
+static void setstack16(pcre2_match_context_16 *mcontext)
+{
+ if (!mcontext) {
+ if (stack16)
+ pcre2_jit_stack_free_16(stack16);
+ stack16 = NULL;
+ return;
+ }
+
+ pcre2_jit_stack_assign_16(mcontext, callback16, getstack16());
+}
+#endif /* SUPPORT_PCRE2_16 */
+
+#ifdef SUPPORT_PCRE2_32
+static pcre2_jit_stack_32 *stack32;
+
+static pcre2_jit_stack_32 *getstack32(void)
+{
+ if (!stack32)
+ stack32 = pcre2_jit_stack_create_32(1, 1024 * 1024, NULL);
+ return stack32;
+}
+
+static void setstack32(pcre2_match_context_32 *mcontext)
+{
+ if (!mcontext) {
+ if (stack32)
+ pcre2_jit_stack_free_32(stack32);
+ stack32 = NULL;
+ return;
+ }
+
+ pcre2_jit_stack_assign_32(mcontext, callback32, getstack32());
+}
+#endif /* SUPPORT_PCRE2_32 */
+
+#ifdef SUPPORT_PCRE2_16
+
+static int convert_utf8_to_utf16(PCRE2_SPTR8 input, PCRE2_UCHAR16 *output, int *offsetmap, int max_length)
+{
+ PCRE2_SPTR8 iptr = input;
+ PCRE2_UCHAR16 *optr = output;
+ unsigned int c;
+
+ if (max_length == 0)
+ return 0;
+
+ while (*iptr && max_length > 1) {
+ c = 0;
+ if (offsetmap)
+ *offsetmap++ = (int)(iptr - (unsigned char*)input);
+
+ if (*iptr < 0xc0)
+ c = *iptr++;
+ else if (!(*iptr & 0x20)) {
+ c = ((iptr[0] & 0x1f) << 6) | (iptr[1] & 0x3f);
+ iptr += 2;
+ } else if (!(*iptr & 0x10)) {
+ c = ((iptr[0] & 0x0f) << 12) | ((iptr[1] & 0x3f) << 6) | (iptr[2] & 0x3f);
+ iptr += 3;
+ } else if (!(*iptr & 0x08)) {
+ c = ((iptr[0] & 0x07) << 18) | ((iptr[1] & 0x3f) << 12) | ((iptr[2] & 0x3f) << 6) | (iptr[3] & 0x3f);
+ iptr += 4;
+ }
+
+ if (c < 65536) {
+ *optr++ = c;
+ max_length--;
+ } else if (max_length <= 2) {
+ *optr = '\0';
+ return (int)(optr - output);
+ } else {
+ c -= 0x10000;
+ *optr++ = 0xd800 | ((c >> 10) & 0x3ff);
+ *optr++ = 0xdc00 | (c & 0x3ff);
+ max_length -= 2;
+ if (offsetmap)
+ offsetmap++;
+ }
+ }
+ if (offsetmap)
+ *offsetmap = (int)(iptr - (unsigned char*)input);
+ *optr = '\0';
+ return (int)(optr - output);
+}
+
+static int copy_char8_to_char16(PCRE2_SPTR8 input, PCRE2_UCHAR16 *output, int max_length)
+{
+ PCRE2_SPTR8 iptr = input;
+ PCRE2_UCHAR16 *optr = output;
+
+ if (max_length == 0)
+ return 0;
+
+ while (*iptr && max_length > 1) {
+ *optr++ = *iptr++;
+ max_length--;
+ }
+ *optr = '\0';
+ return (int)(optr - output);
+}
+
+#define REGTEST_MAX_LENGTH16 4096
+static PCRE2_UCHAR16 regtest_buf16[REGTEST_MAX_LENGTH16];
+static int regtest_offsetmap16[REGTEST_MAX_LENGTH16];
+
+#endif /* SUPPORT_PCRE2_16 */
+
+#ifdef SUPPORT_PCRE2_32
+
+static int convert_utf8_to_utf32(PCRE2_SPTR8 input, PCRE2_UCHAR32 *output, int *offsetmap, int max_length)
+{
+ PCRE2_SPTR8 iptr = input;
+ PCRE2_UCHAR32 *optr = output;
+ unsigned int c;
+
+ if (max_length == 0)
+ return 0;
+
+ while (*iptr && max_length > 1) {
+ c = 0;
+ if (offsetmap)
+ *offsetmap++ = (int)(iptr - (unsigned char*)input);
+
+ if (*iptr < 0xc0)
+ c = *iptr++;
+ else if (!(*iptr & 0x20)) {
+ c = ((iptr[0] & 0x1f) << 6) | (iptr[1] & 0x3f);
+ iptr += 2;
+ } else if (!(*iptr & 0x10)) {
+ c = ((iptr[0] & 0x0f) << 12) | ((iptr[1] & 0x3f) << 6) | (iptr[2] & 0x3f);
+ iptr += 3;
+ } else if (!(*iptr & 0x08)) {
+ c = ((iptr[0] & 0x07) << 18) | ((iptr[1] & 0x3f) << 12) | ((iptr[2] & 0x3f) << 6) | (iptr[3] & 0x3f);
+ iptr += 4;
+ }
+
+ *optr++ = c;
+ max_length--;
+ }
+ if (offsetmap)
+ *offsetmap = (int)(iptr - (unsigned char*)input);
+ *optr = 0;
+ return (int)(optr - output);
+}
+
+static int copy_char8_to_char32(PCRE2_SPTR8 input, PCRE2_UCHAR32 *output, int max_length)
+{
+ PCRE2_SPTR8 iptr = input;
+ PCRE2_UCHAR32 *optr = output;
+
+ if (max_length == 0)
+ return 0;
+
+ while (*iptr && max_length > 1) {
+ *optr++ = *iptr++;
+ max_length--;
+ }
+ *optr = '\0';
+ return (int)(optr - output);
+}
+
+#define REGTEST_MAX_LENGTH32 4096
+static PCRE2_UCHAR32 regtest_buf32[REGTEST_MAX_LENGTH32];
+static int regtest_offsetmap32[REGTEST_MAX_LENGTH32];
+
+#endif /* SUPPORT_PCRE2_32 */
+
+static int check_ascii(const char *input)
+{
+ const unsigned char *ptr = (unsigned char *)input;
+ while (*ptr) {
+ if (*ptr > 127)
+ return 0;
+ ptr++;
+ }
+ return 1;
+}
+
+#define OVECTOR_SIZE 15
+
+static int regression_tests(void)
+{
+ struct regression_test_case *current = regression_test_cases;
+ int error;
+ PCRE2_SIZE err_offs;
+ int is_successful;
+ int is_ascii;
+ int total = 0;
+ int successful = 0;
+ int successful_row = 0;
+ int counter = 0;
+ int jit_compile_mode;
+ int utf = 0;
+ int disabled_options = 0;
+ int i;
+#ifdef SUPPORT_PCRE2_8
+ pcre2_code_8 *re8;
+ pcre2_compile_context_8 *ccontext8;
+ pcre2_match_data_8 *mdata8_1;
+ pcre2_match_data_8 *mdata8_2;
+ pcre2_match_context_8 *mcontext8;
+ PCRE2_SIZE *ovector8_1 = NULL;
+ PCRE2_SIZE *ovector8_2 = NULL;
+ int return_value8[2];
+#endif
+#ifdef SUPPORT_PCRE2_16
+ pcre2_code_16 *re16;
+ pcre2_compile_context_16 *ccontext16;
+ pcre2_match_data_16 *mdata16_1;
+ pcre2_match_data_16 *mdata16_2;
+ pcre2_match_context_16 *mcontext16;
+ PCRE2_SIZE *ovector16_1 = NULL;
+ PCRE2_SIZE *ovector16_2 = NULL;
+ int return_value16[2];
+ int length16;
+#endif
+#ifdef SUPPORT_PCRE2_32
+ pcre2_code_32 *re32;
+ pcre2_compile_context_32 *ccontext32;
+ pcre2_match_data_32 *mdata32_1;
+ pcre2_match_data_32 *mdata32_2;
+ pcre2_match_context_32 *mcontext32;
+ PCRE2_SIZE *ovector32_1 = NULL;
+ PCRE2_SIZE *ovector32_2 = NULL;
+ int return_value32[2];
+ int length32;
+#endif
+
+#if defined SUPPORT_PCRE2_8
+ PCRE2_UCHAR8 cpu_info[128];
+#elif defined SUPPORT_PCRE2_16
+ PCRE2_UCHAR16 cpu_info[128];
+#elif defined SUPPORT_PCRE2_32
+ PCRE2_UCHAR32 cpu_info[128];
+#endif
+#if defined SUPPORT_UTF && ((defined(SUPPORT_PCRE2_8) + defined(SUPPORT_PCRE2_16) + defined(SUPPORT_PCRE2_32)) >= 2)
+ int return_value;
+#endif
+
+ /* This test compares the behaviour of interpreter and JIT. Although disabling
+ utf or ucp may make tests fail, if the pcre_exec result is the SAME, it is
+ still considered successful from pcre_jit_test point of view. */
+
+#if defined SUPPORT_PCRE2_8
+ pcre2_config_8(PCRE2_CONFIG_JITTARGET, &cpu_info);
+#elif defined SUPPORT_PCRE2_16
+ pcre2_config_16(PCRE2_CONFIG_JITTARGET, &cpu_info);
+#elif defined SUPPORT_PCRE2_32
+ pcre2_config_32(PCRE2_CONFIG_JITTARGET, &cpu_info);
+#endif
+
+ printf("Running JIT regression tests\n");
+ printf(" target CPU of SLJIT compiler: ");
+ for (i = 0; cpu_info[i]; i++)
+ printf("%c", (char)(cpu_info[i]));
+ printf("\n");
+
+#if defined SUPPORT_PCRE2_8
+ pcre2_config_8(PCRE2_CONFIG_UNICODE, &utf);
+#elif defined SUPPORT_PCRE2_16
+ pcre2_config_16(PCRE2_CONFIG_UNICODE, &utf);
+#elif defined SUPPORT_PCRE2_32
+ pcre2_config_32(PCRE2_CONFIG_UNICODE, &utf);
+#endif
+
+ if (!utf)
+ disabled_options |= PCRE2_UTF;
+#ifdef SUPPORT_PCRE2_8
+ printf(" in 8 bit mode with UTF-8 %s:\n", utf ? "enabled" : "disabled");
+#endif
+#ifdef SUPPORT_PCRE2_16
+ printf(" in 16 bit mode with UTF-16 %s:\n", utf ? "enabled" : "disabled");
+#endif
+#ifdef SUPPORT_PCRE2_32
+ printf(" in 32 bit mode with UTF-32 %s:\n", utf ? "enabled" : "disabled");
+#endif
+
+ while (current->pattern) {
+ /* printf("\nPattern: %s :\n", current->pattern); */
+ total++;
+ is_ascii = 0;
+ if (!(current->start_offset & F_PROPERTY))
+ is_ascii = check_ascii(current->pattern) && check_ascii(current->input);
+
+ if (current->match_options & PCRE2_PARTIAL_SOFT)
+ jit_compile_mode = PCRE2_JIT_PARTIAL_SOFT;
+ else if (current->match_options & PCRE2_PARTIAL_HARD)
+ jit_compile_mode = PCRE2_JIT_PARTIAL_HARD;
+ else
+ jit_compile_mode = PCRE2_JIT_COMPLETE;
+ error = 0;
+#ifdef SUPPORT_PCRE2_8
+ re8 = NULL;
+ ccontext8 = pcre2_compile_context_create_8(NULL);
+ if (ccontext8) {
+ if (GET_NEWLINE(current->newline))
+ pcre2_set_newline_8(ccontext8, GET_NEWLINE(current->newline));
+ if (GET_BSR(current->newline))
+ pcre2_set_bsr_8(ccontext8, GET_BSR(current->newline));
+
+ if (!(current->start_offset & F_NO8)) {
+ re8 = pcre2_compile_8((PCRE2_SPTR8)current->pattern, PCRE2_ZERO_TERMINATED,
+ current->compile_options & ~disabled_options,
+ &error, &err_offs, ccontext8);
+
+ if (!re8 && (utf || is_ascii))
+ printf("\n8 bit: Cannot compile pattern \"%s\": %d\n", current->pattern, error);
+ }
+ pcre2_compile_context_free_8(ccontext8);
+ }
+ else
+ printf("\n8 bit: Cannot allocate compile context\n");
+#endif
+#ifdef SUPPORT_PCRE2_16
+ if ((current->compile_options & PCRE2_UTF) || (current->start_offset & F_FORCECONV))
+ convert_utf8_to_utf16((PCRE2_SPTR8)current->pattern, regtest_buf16, NULL, REGTEST_MAX_LENGTH16);
+ else
+ copy_char8_to_char16((PCRE2_SPTR8)current->pattern, regtest_buf16, REGTEST_MAX_LENGTH16);
+
+ re16 = NULL;
+ ccontext16 = pcre2_compile_context_create_16(NULL);
+ if (ccontext16) {
+ if (GET_NEWLINE(current->newline))
+ pcre2_set_newline_16(ccontext16, GET_NEWLINE(current->newline));
+ if (GET_BSR(current->newline))
+ pcre2_set_bsr_16(ccontext16, GET_BSR(current->newline));
+
+ if (!(current->start_offset & F_NO16)) {
+ re16 = pcre2_compile_16(regtest_buf16, PCRE2_ZERO_TERMINATED,
+ current->compile_options & ~disabled_options,
+ &error, &err_offs, ccontext16);
+
+ if (!re16 && (utf || is_ascii))
+ printf("\n16 bit: Cannot compile pattern \"%s\": %d\n", current->pattern, error);
+ }
+ pcre2_compile_context_free_16(ccontext16);
+ }
+ else
+ printf("\n16 bit: Cannot allocate compile context\n");
+#endif
+#ifdef SUPPORT_PCRE2_32
+ if ((current->compile_options & PCRE2_UTF) || (current->start_offset & F_FORCECONV))
+ convert_utf8_to_utf32((PCRE2_SPTR8)current->pattern, regtest_buf32, NULL, REGTEST_MAX_LENGTH32);
+ else
+ copy_char8_to_char32((PCRE2_SPTR8)current->pattern, regtest_buf32, REGTEST_MAX_LENGTH32);
+
+ re32 = NULL;
+ ccontext32 = pcre2_compile_context_create_32(NULL);
+ if (ccontext32) {
+ if (GET_NEWLINE(current->newline))
+ pcre2_set_newline_32(ccontext32, GET_NEWLINE(current->newline));
+ if (GET_BSR(current->newline))
+ pcre2_set_bsr_32(ccontext32, GET_BSR(current->newline));
+
+ if (!(current->start_offset & F_NO32)) {
+ re32 = pcre2_compile_32(regtest_buf32, PCRE2_ZERO_TERMINATED,
+ current->compile_options & ~disabled_options,
+ &error, &err_offs, ccontext32);
+
+ if (!re32 && (utf || is_ascii))
+ printf("\n32 bit: Cannot compile pattern \"%s\": %d\n", current->pattern, error);
+ }
+ pcre2_compile_context_free_32(ccontext32);
+ }
+ else
+ printf("\n32 bit: Cannot allocate compile context\n");
+#endif
+
+ counter++;
+ if ((counter & 0x3) != 0) {
+#ifdef SUPPORT_PCRE2_8
+ setstack8(NULL);
+#endif
+#ifdef SUPPORT_PCRE2_16
+ setstack16(NULL);
+#endif
+#ifdef SUPPORT_PCRE2_32
+ setstack32(NULL);
+#endif
+ }
+
+#ifdef SUPPORT_PCRE2_8
+ return_value8[0] = -1000;
+ return_value8[1] = -1000;
+ mdata8_1 = pcre2_match_data_create_8(OVECTOR_SIZE, NULL);
+ mdata8_2 = pcre2_match_data_create_8(OVECTOR_SIZE, NULL);
+ mcontext8 = pcre2_match_context_create_8(NULL);
+ if (!mdata8_1 || !mdata8_2 || !mcontext8) {
+ printf("\n8 bit: Cannot allocate match data\n");
+ pcre2_match_data_free_8(mdata8_1);
+ pcre2_match_data_free_8(mdata8_2);
+ pcre2_match_context_free_8(mcontext8);
+ pcre2_code_free_8(re8);
+ re8 = NULL;
+ } else {
+ ovector8_1 = pcre2_get_ovector_pointer_8(mdata8_1);
+ ovector8_2 = pcre2_get_ovector_pointer_8(mdata8_2);
+ for (i = 0; i < OVECTOR_SIZE * 3; ++i)
+ ovector8_1[i] = -2;
+ for (i = 0; i < OVECTOR_SIZE * 3; ++i)
+ ovector8_2[i] = -2;
+ }
+ if (re8) {
+ return_value8[1] = pcre2_match_8(re8, (PCRE2_SPTR8)current->input, strlen(current->input),
+ current->start_offset & OFFSET_MASK, current->match_options, mdata8_2, NULL);
+
+ if (pcre2_jit_compile_8(re8, jit_compile_mode)) {
+ printf("\n8 bit: JIT compiler does not support \"%s\"\n", current->pattern);
+ } else if ((counter & 0x1) != 0) {
+ setstack8(mcontext8);
+ return_value8[0] = pcre2_match_8(re8, (PCRE2_SPTR8)current->input, strlen(current->input),
+ current->start_offset & OFFSET_MASK, current->match_options, mdata8_1, mcontext8);
+ } else {
+ pcre2_jit_stack_assign_8(mcontext8, NULL, getstack8());
+ return_value8[0] = pcre2_jit_match_8(re8, (PCRE2_SPTR8)current->input, strlen(current->input),
+ current->start_offset & OFFSET_MASK, current->match_options, mdata8_1, mcontext8);
+ }
+ }
+#endif
+
+#ifdef SUPPORT_PCRE2_16
+ return_value16[0] = -1000;
+ return_value16[1] = -1000;
+ mdata16_1 = pcre2_match_data_create_16(OVECTOR_SIZE, NULL);
+ mdata16_2 = pcre2_match_data_create_16(OVECTOR_SIZE, NULL);
+ mcontext16 = pcre2_match_context_create_16(NULL);
+ if (!mdata16_1 || !mdata16_2 || !mcontext16) {
+ printf("\n16 bit: Cannot allocate match data\n");
+ pcre2_match_data_free_16(mdata16_1);
+ pcre2_match_data_free_16(mdata16_2);
+ pcre2_match_context_free_16(mcontext16);
+ pcre2_code_free_16(re16);
+ re16 = NULL;
+ } else {
+ ovector16_1 = pcre2_get_ovector_pointer_16(mdata16_1);
+ ovector16_2 = pcre2_get_ovector_pointer_16(mdata16_2);
+ for (i = 0; i < OVECTOR_SIZE * 3; ++i)
+ ovector16_1[i] = -2;
+ for (i = 0; i < OVECTOR_SIZE * 3; ++i)
+ ovector16_2[i] = -2;
+ }
+ if (re16) {
+ if ((current->compile_options & PCRE2_UTF) || (current->start_offset & F_FORCECONV))
+ length16 = convert_utf8_to_utf16((PCRE2_SPTR8)current->input, regtest_buf16, regtest_offsetmap16, REGTEST_MAX_LENGTH16);
+ else
+ length16 = copy_char8_to_char16((PCRE2_SPTR8)current->input, regtest_buf16, REGTEST_MAX_LENGTH16);
+
+ return_value16[1] = pcre2_match_16(re16, regtest_buf16, length16,
+ current->start_offset & OFFSET_MASK, current->match_options, mdata16_2, NULL);
+
+ if (pcre2_jit_compile_16(re16, jit_compile_mode)) {
+ printf("\n16 bit: JIT compiler does not support \"%s\"\n", current->pattern);
+ } else if ((counter & 0x1) != 0) {
+ setstack16(mcontext16);
+ return_value16[0] = pcre2_match_16(re16, regtest_buf16, length16,
+ current->start_offset & OFFSET_MASK, current->match_options, mdata16_1, mcontext16);
+ } else {
+ pcre2_jit_stack_assign_16(mcontext16, NULL, getstack16());
+ return_value16[0] = pcre2_jit_match_16(re16, regtest_buf16, length16,
+ current->start_offset & OFFSET_MASK, current->match_options, mdata16_1, mcontext16);
+ }
+ }
+#endif
+
+#ifdef SUPPORT_PCRE2_32
+ return_value32[0] = -1000;
+ return_value32[1] = -1000;
+ mdata32_1 = pcre2_match_data_create_32(OVECTOR_SIZE, NULL);
+ mdata32_2 = pcre2_match_data_create_32(OVECTOR_SIZE, NULL);
+ mcontext32 = pcre2_match_context_create_32(NULL);
+ if (!mdata32_1 || !mdata32_2 || !mcontext32) {
+ printf("\n32 bit: Cannot allocate match data\n");
+ pcre2_match_data_free_32(mdata32_1);
+ pcre2_match_data_free_32(mdata32_2);
+ pcre2_match_context_free_32(mcontext32);
+ pcre2_code_free_32(re32);
+ re32 = NULL;
+ } else {
+ ovector32_1 = pcre2_get_ovector_pointer_32(mdata32_1);
+ ovector32_2 = pcre2_get_ovector_pointer_32(mdata32_2);
+ for (i = 0; i < OVECTOR_SIZE * 3; ++i)
+ ovector32_1[i] = -2;
+ for (i = 0; i < OVECTOR_SIZE * 3; ++i)
+ ovector32_2[i] = -2;
+ }
+ if (re32) {
+ if ((current->compile_options & PCRE2_UTF) || (current->start_offset & F_FORCECONV))
+ length32 = convert_utf8_to_utf32((PCRE2_SPTR8)current->input, regtest_buf32, regtest_offsetmap32, REGTEST_MAX_LENGTH32);
+ else
+ length32 = copy_char8_to_char32((PCRE2_SPTR8)current->input, regtest_buf32, REGTEST_MAX_LENGTH32);
+
+ return_value32[1] = pcre2_match_32(re32, regtest_buf32, length32,
+ current->start_offset & OFFSET_MASK, current->match_options, mdata32_2, NULL);
+
+ if (pcre2_jit_compile_32(re32, jit_compile_mode)) {
+ printf("\n32 bit: JIT compiler does not support \"%s\"\n", current->pattern);
+ } else if ((counter & 0x1) != 0) {
+ setstack32(mcontext32);
+ return_value32[0] = pcre2_match_32(re32, regtest_buf32, length32,
+ current->start_offset & OFFSET_MASK, current->match_options, mdata32_1, mcontext32);
+ } else {
+ pcre2_jit_stack_assign_32(mcontext32, NULL, getstack32());
+ return_value32[0] = pcre2_jit_match_32(re32, regtest_buf32, length32,
+ current->start_offset & OFFSET_MASK, current->match_options, mdata32_1, mcontext32);
+ }
+ }
+#endif
+
+ /* printf("[%d-%d-%d|%d-%d|%d-%d|%d-%d]%s",
+ return_value8[0], return_value16[0], return_value32[0],
+ (int)ovector8_1[0], (int)ovector8_1[1],
+ (int)ovector16_1[0], (int)ovector16_1[1],
+ (int)ovector32_1[0], (int)ovector32_1[1],
+ (current->compile_options & PCRE2_CASELESS) ? "C" : ""); */
+
+ /* If F_DIFF is set, just run the test, but do not compare the results.
+ Segfaults can still be captured. */
+
+ is_successful = 1;
+ if (!(current->start_offset & F_DIFF)) {
+#if defined SUPPORT_UTF && ((defined(SUPPORT_PCRE2_8) + defined(SUPPORT_PCRE2_16) + defined(SUPPORT_PCRE2_32)) >= 2)
+ if (!(current->start_offset & F_FORCECONV)) {
+
+ /* All results must be the same. */
+#ifdef SUPPORT_PCRE2_8
+ if ((return_value = return_value8[0]) != return_value8[1]) {
+ printf("\n8 bit: Return value differs(J8:%d,I8:%d): [%d] '%s' @ '%s'\n",
+ return_value8[0], return_value8[1], total, current->pattern, current->input);
+ is_successful = 0;
+ } else
+#endif
+#ifdef SUPPORT_PCRE2_16
+ if ((return_value = return_value16[0]) != return_value16[1]) {
+ printf("\n16 bit: Return value differs(J16:%d,I16:%d): [%d] '%s' @ '%s'\n",
+ return_value16[0], return_value16[1], total, current->pattern, current->input);
+ is_successful = 0;
+ } else
+#endif
+#ifdef SUPPORT_PCRE2_32
+ if ((return_value = return_value32[0]) != return_value32[1]) {
+ printf("\n32 bit: Return value differs(J32:%d,I32:%d): [%d] '%s' @ '%s'\n",
+ return_value32[0], return_value32[1], total, current->pattern, current->input);
+ is_successful = 0;
+ } else
+#endif
+#if defined SUPPORT_PCRE2_8 && defined SUPPORT_PCRE2_16
+ if (return_value8[0] != return_value16[0]) {
+ printf("\n8 and 16 bit: Return value differs(J8:%d,J16:%d): [%d] '%s' @ '%s'\n",
+ return_value8[0], return_value16[0],
+ total, current->pattern, current->input);
+ is_successful = 0;
+ } else
+#endif
+#if defined SUPPORT_PCRE2_8 && defined SUPPORT_PCRE2_32
+ if (return_value8[0] != return_value32[0]) {
+ printf("\n8 and 32 bit: Return value differs(J8:%d,J32:%d): [%d] '%s' @ '%s'\n",
+ return_value8[0], return_value32[0],
+ total, current->pattern, current->input);
+ is_successful = 0;
+ } else
+#endif
+#if defined SUPPORT_PCRE2_16 && defined SUPPORT_PCRE2_32
+ if (return_value16[0] != return_value32[0]) {
+ printf("\n16 and 32 bit: Return value differs(J16:%d,J32:%d): [%d] '%s' @ '%s'\n",
+ return_value16[0], return_value32[0],
+ total, current->pattern, current->input);
+ is_successful = 0;
+ } else
+#endif
+ if (return_value >= 0 || return_value == PCRE_ERROR_PARTIAL) {
+ if (return_value == PCRE_ERROR_PARTIAL) {
+ return_value = 2;
+ } else {
+ return_value *= 2;
+ }
+#ifdef SUPPORT_PCRE2_8
+ return_value8[0] = return_value;
+#endif
+#ifdef SUPPORT_PCRE2_16
+ return_value16[0] = return_value;
+#endif
+#ifdef SUPPORT_PCRE2_32
+ return_value32[0] = return_value;
+#endif
+ /* Transform back the results. */
+ if (current->flags & PCRE_UTF8) {
+#ifdef SUPPORT_PCRE2_16
+ for (i = 0; i < return_value; ++i) {
+ if (ovector16_1[i] >= 0)
+ ovector16_1[i] = regtest_offsetmap16[ovector16_1[i]];
+ if (ovector16_2[i] >= 0)
+ ovector16_2[i] = regtest_offsetmap16[ovector16_2[i]];
+ }
+#endif
+#ifdef SUPPORT_PCRE2_32
+ for (i = 0; i < return_value; ++i) {
+ if (ovector32_1[i] >= 0)
+ ovector32_1[i] = regtest_offsetmap32[ovector32_1[i]];
+ if (ovector32_2[i] >= 0)
+ ovector32_2[i] = regtest_offsetmap32[ovector32_2[i]];
+ }
+#endif
+ }
+
+ for (i = 0; i < return_value; ++i) {
+#if defined SUPPORT_PCRE2_8 && defined SUPPORT_PCRE2_16
+ if (ovector8_1[i] != ovector8_2[i] || ovector8_1[i] != ovector16_1[i] || ovector8_1[i] != ovector16_2[i]) {
+ printf("\n8 and 16 bit: Ovector[%d] value differs(J8:%d,I8:%d,J16:%d,I16:%d): [%d] '%s' @ '%s' \n",
+ i, ovector8_1[i], ovector8_2[i], ovector16_1[i], ovector16_2[i],
+ total, current->pattern, current->input);
+ is_successful = 0;
+ }
+#endif
+#if defined SUPPORT_PCRE2_8 && defined SUPPORT_PCRE2_32
+ if (ovector8_1[i] != ovector8_2[i] || ovector8_1[i] != ovector32_1[i] || ovector8_1[i] != ovector32_2[i]) {
+ printf("\n8 and 32 bit: Ovector[%d] value differs(J8:%d,I8:%d,J32:%d,I32:%d): [%d] '%s' @ '%s' \n",
+ i, ovector8_1[i], ovector8_2[i], ovector32_1[i], ovector32_2[i],
+ total, current->pattern, current->input);
+ is_successful = 0;
+ }
+#endif
+#if defined SUPPORT_PCRE2_16 && defined SUPPORT_PCRE2_32
+ if (ovector16_1[i] != ovector16_2[i] || ovector16_1[i] != ovector32_1[i] || ovector16_1[i] != ovector32_2[i]) {
+ printf("\n16 and 32 bit: Ovector[%d] value differs(J16:%d,I16:%d,J32:%d,I32:%d): [%d] '%s' @ '%s' \n",
+ i, ovector16_1[i], ovector16_2[i], ovector32_1[i], ovector32_2[i],
+ total, current->pattern, current->input);
+ is_successful = 0;
+ }
+#endif
+ }
+ }
+ } else
+#endif /* more than one of SUPPORT_PCRE2_8, SUPPORT_PCRE2_16 and SUPPORT_PCRE2_32 */
+ {
+#ifdef SUPPORT_PCRE2_8
+ if (return_value8[0] != return_value8[1]) {
+ printf("\n8 bit: Return value differs(%d:%d): [%d] '%s' @ '%s'\n",
+ return_value8[0], return_value8[1], total, current->pattern, current->input);
+ is_successful = 0;
+ } else if (return_value8[0] >= 0 || return_value8[0] == PCRE2_ERROR_PARTIAL) {
+ if (return_value8[0] == PCRE2_ERROR_PARTIAL)
+ return_value8[0] = 2;
+ else
+ return_value8[0] *= 2;
+
+ for (i = 0; i < return_value8[0]; ++i)
+ if (ovector8_1[i] != ovector8_2[i]) {
+ printf("\n8 bit: Ovector[%d] value differs(%d:%d): [%d] '%s' @ '%s'\n",
+ i, (int)ovector8_1[i], (int)ovector8_2[i], total, current->pattern, current->input);
+ is_successful = 0;
+ }
+ }
+#endif
+
+#ifdef SUPPORT_PCRE2_16
+ if (return_value16[0] != return_value16[1]) {
+ printf("\n16 bit: Return value differs(%d:%d): [%d] '%s' @ '%s'\n",
+ return_value16[0], return_value16[1], total, current->pattern, current->input);
+ is_successful = 0;
+ } else if (return_value16[0] >= 0 || return_value16[0] == PCRE2_ERROR_PARTIAL) {
+ if (return_value16[0] == PCRE2_ERROR_PARTIAL)
+ return_value16[0] = 2;
+ else
+ return_value16[0] *= 2;
+
+ for (i = 0; i < return_value16[0]; ++i)
+ if (ovector16_1[i] != ovector16_2[i]) {
+ printf("\n16 bit: Ovector[%d] value differs(%d:%d): [%d] '%s' @ '%s'\n",
+ i, (int)ovector16_1[i], (int)ovector16_2[i], total, current->pattern, current->input);
+ is_successful = 0;
+ }
+ }
+#endif
+
+#ifdef SUPPORT_PCRE2_32
+ if (return_value32[0] != return_value32[1]) {
+ printf("\n32 bit: Return value differs(%d:%d): [%d] '%s' @ '%s'\n",
+ return_value32[0], return_value32[1], total, current->pattern, current->input);
+ is_successful = 0;
+ } else if (return_value32[0] >= 0 || return_value32[0] == PCRE2_ERROR_PARTIAL) {
+ if (return_value32[0] == PCRE2_ERROR_PARTIAL)
+ return_value32[0] = 2;
+ else
+ return_value32[0] *= 2;
+
+ for (i = 0; i < return_value32[0]; ++i)
+ if (ovector32_1[i] != ovector32_2[i]) {
+ printf("\n32 bit: Ovector[%d] value differs(%d:%d): [%d] '%s' @ '%s'\n",
+ i, (int)ovector32_1[i], (int)ovector32_2[i], total, current->pattern, current->input);
+ is_successful = 0;
+ }
+ }
+#endif
+ }
+ }
+
+ if (is_successful) {
+#ifdef SUPPORT_PCRE2_8
+ if (!(current->start_offset & F_NO8) && (utf || is_ascii)) {
+ if (return_value8[0] < 0 && !(current->start_offset & F_NOMATCH)) {
+ printf("8 bit: Test should match: [%d] '%s' @ '%s'\n",
+ total, current->pattern, current->input);
+ is_successful = 0;
+ }
+
+ if (return_value8[0] >= 0 && (current->start_offset & F_NOMATCH)) {
+ printf("8 bit: Test should not match: [%d] '%s' @ '%s'\n",
+ total, current->pattern, current->input);
+ is_successful = 0;
+ }
+ }
+#endif
+#ifdef SUPPORT_PCRE2_16
+ if (!(current->start_offset & F_NO16) && (utf || is_ascii)) {
+ if (return_value16[0] < 0 && !(current->start_offset & F_NOMATCH)) {
+ printf("16 bit: Test should match: [%d] '%s' @ '%s'\n",
+ total, current->pattern, current->input);
+ is_successful = 0;
+ }
+
+ if (return_value16[0] >= 0 && (current->start_offset & F_NOMATCH)) {
+ printf("16 bit: Test should not match: [%d] '%s' @ '%s'\n",
+ total, current->pattern, current->input);
+ is_successful = 0;
+ }
+ }
+#endif
+#ifdef SUPPORT_PCRE2_32
+ if (!(current->start_offset & F_NO32) && (utf || is_ascii)) {
+ if (return_value32[0] < 0 && !(current->start_offset & F_NOMATCH)) {
+ printf("32 bit: Test should match: [%d] '%s' @ '%s'\n",
+ total, current->pattern, current->input);
+ is_successful = 0;
+ }
+
+ if (return_value32[0] >= 0 && (current->start_offset & F_NOMATCH)) {
+ printf("32 bit: Test should not match: [%d] '%s' @ '%s'\n",
+ total, current->pattern, current->input);
+ is_successful = 0;
+ }
+ }
+#endif
+ }
+
+ if (is_successful) {
+#ifdef SUPPORT_PCRE2_8
+ if (re8 && !(current->start_offset & F_NO8) && pcre2_get_mark_8(mdata8_1) != pcre2_get_mark_8(mdata8_2)) {
+ printf("8 bit: Mark value mismatch: [%d] '%s' @ '%s'\n",
+ total, current->pattern, current->input);
+ is_successful = 0;
+ }
+#endif
+#ifdef SUPPORT_PCRE2_16
+ if (re16 && !(current->start_offset & F_NO16) && pcre2_get_mark_16(mdata16_1) != pcre2_get_mark_16(mdata16_2)) {
+ printf("16 bit: Mark value mismatch: [%d] '%s' @ '%s'\n",
+ total, current->pattern, current->input);
+ is_successful = 0;
+ }
+#endif
+#ifdef SUPPORT_PCRE2_32
+ if (re32 && !(current->start_offset & F_NO32) && pcre2_get_mark_32(mdata32_1) != pcre2_get_mark_32(mdata32_2)) {
+ printf("32 bit: Mark value mismatch: [%d] '%s' @ '%s'\n",
+ total, current->pattern, current->input);
+ is_successful = 0;
+ }
+#endif
+ }
+
+#ifdef SUPPORT_PCRE2_8
+ pcre2_code_free_8(re8);
+ pcre2_match_data_free_8(mdata8_1);
+ pcre2_match_data_free_8(mdata8_2);
+ pcre2_match_context_free_8(mcontext8);
+#endif
+#ifdef SUPPORT_PCRE2_16
+ pcre2_code_free_16(re16);
+ pcre2_match_data_free_16(mdata16_1);
+ pcre2_match_data_free_16(mdata16_2);
+ pcre2_match_context_free_16(mcontext16);
+#endif
+#ifdef SUPPORT_PCRE2_32
+ pcre2_code_free_32(re32);
+ pcre2_match_data_free_32(mdata32_1);
+ pcre2_match_data_free_32(mdata32_2);
+ pcre2_match_context_free_32(mcontext32);
+#endif
+
+ if (is_successful) {
+ successful++;
+ successful_row++;
+ printf(".");
+ if (successful_row >= 60) {
+ successful_row = 0;
+ printf("\n");
+ }
+ } else
+ successful_row = 0;
+
+ fflush(stdout);
+ current++;
+ }
+#ifdef SUPPORT_PCRE2_8
+ setstack8(NULL);
+#endif
+#ifdef SUPPORT_PCRE2_16
+ setstack16(NULL);
+#endif
+#ifdef SUPPORT_PCRE2_32
+ setstack32(NULL);
+#endif
+
+ if (total == successful) {
+ printf("\nAll JIT regression tests are successfully passed.\n");
+ return 0;
+ } else {
+ printf("\nSuccessful test ratio: %d%% (%d failed)\n", successful * 100 / total, total - successful);
+ return 1;
+ }
+}
+
+/* End of pcre2_jit_test.c */
diff --git a/thirdparty/pcre2/src/pcre2_maketables.c b/thirdparty/pcre2/src/pcre2_maketables.c
new file mode 100644
index 0000000000..2c7ae84d86
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_maketables.c
@@ -0,0 +1,157 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+/* This module contains the external function pcre2_maketables(), which builds
+character tables for PCRE2 in the current locale. The file is compiled on its
+own as part of the PCRE2 library. However, it is also included in the
+compilation of dftables.c, in which case the macro DFTABLES is defined. */
+
+#ifndef DFTABLES
+# ifdef HAVE_CONFIG_H
+# include "config.h"
+# endif
+# include "pcre2_internal.h"
+#endif
+
+
+
+/*************************************************
+* Create PCRE2 character tables *
+*************************************************/
+
+/* This function builds a set of character tables for use by PCRE2 and returns
+a pointer to them. They are build using the ctype functions, and consequently
+their contents will depend upon the current locale setting. When compiled as
+part of the library, the store is obtained via a general context malloc, if
+supplied, but when DFTABLES is defined (when compiling the dftables auxiliary
+program) malloc() is used, and the function has a different name so as not to
+clash with the prototype in pcre2.h.
+
+Arguments: none when DFTABLES is defined
+ else a PCRE2 general context or NULL
+Returns: pointer to the contiguous block of data
+*/
+
+#ifdef DFTABLES /* Included in freestanding dftables.c program */
+static const uint8_t *maketables(void)
+{
+uint8_t *yield = (uint8_t *)malloc(tables_length);
+
+#else /* Not DFTABLES, compiling the library */
+PCRE2_EXP_DEFN const uint8_t * PCRE2_CALL_CONVENTION
+pcre2_maketables(pcre2_general_context *gcontext)
+{
+uint8_t *yield = (uint8_t *)((gcontext != NULL)?
+ gcontext->memctl.malloc(tables_length, gcontext->memctl.memory_data) :
+ malloc(tables_length));
+#endif /* DFTABLES */
+
+int i;
+uint8_t *p;
+
+if (yield == NULL) return NULL;
+p = yield;
+
+/* First comes the lower casing table */
+
+for (i = 0; i < 256; i++) *p++ = tolower(i);
+
+/* Next the case-flipping table */
+
+for (i = 0; i < 256; i++) *p++ = islower(i)? toupper(i) : tolower(i);
+
+/* Then the character class tables. Don't try to be clever and save effort on
+exclusive ones - in some locales things may be different.
+
+Note that the table for "space" includes everything "isspace" gives, including
+VT in the default locale. This makes it work for the POSIX class [:space:].
+From release 8.34 is is also correct for Perl space, because Perl added VT at
+release 5.18.
+
+Note also that it is possible for a character to be alnum or alpha without
+being lower or upper, such as "male and female ordinals" (\xAA and \xBA) in the
+fr_FR locale (at least under Debian Linux's locales as of 12/2005). So we must
+test for alnum specially. */
+
+memset(p, 0, cbit_length);
+for (i = 0; i < 256; i++)
+ {
+ if (isdigit(i)) p[cbit_digit + i/8] |= 1 << (i&7);
+ if (isupper(i)) p[cbit_upper + i/8] |= 1 << (i&7);
+ if (islower(i)) p[cbit_lower + i/8] |= 1 << (i&7);
+ if (isalnum(i)) p[cbit_word + i/8] |= 1 << (i&7);
+ if (i == '_') p[cbit_word + i/8] |= 1 << (i&7);
+ if (isspace(i)) p[cbit_space + i/8] |= 1 << (i&7);
+ if (isxdigit(i))p[cbit_xdigit + i/8] |= 1 << (i&7);
+ if (isgraph(i)) p[cbit_graph + i/8] |= 1 << (i&7);
+ if (isprint(i)) p[cbit_print + i/8] |= 1 << (i&7);
+ if (ispunct(i)) p[cbit_punct + i/8] |= 1 << (i&7);
+ if (iscntrl(i)) p[cbit_cntrl + i/8] |= 1 << (i&7);
+ }
+p += cbit_length;
+
+/* Finally, the character type table. In this, we used to exclude VT from the
+white space chars, because Perl didn't recognize it as such for \s and for
+comments within regexes. However, Perl changed at release 5.18, so PCRE changed
+at release 8.34. */
+
+for (i = 0; i < 256; i++)
+ {
+ int x = 0;
+ if (isspace(i)) x += ctype_space;
+ if (isalpha(i)) x += ctype_letter;
+ if (isdigit(i)) x += ctype_digit;
+ if (isxdigit(i)) x += ctype_xdigit;
+ if (isalnum(i) || i == '_') x += ctype_word;
+
+ /* Note: strchr includes the terminating zero in the characters it considers.
+ In this instance, that is ok because we want binary zero to be flagged as a
+ meta-character, which in this sense is any character that terminates a run
+ of data characters. */
+
+ if (strchr("\\*+?{^.$|()[", i) != 0) x += ctype_meta;
+ *p++ = x;
+ }
+
+return yield;
+}
+
+/* End of pcre2_maketables.c */
diff --git a/thirdparty/pcre2/src/pcre2_match.c b/thirdparty/pcre2/src/pcre2_match.c
new file mode 100644
index 0000000000..78a9bacbc8
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_match.c
@@ -0,0 +1,7238 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#define NLBLOCK mb /* Block containing newline information */
+#define PSSTART start_subject /* Field containing processed string start */
+#define PSEND end_subject /* Field containing processed string end */
+
+#include "pcre2_internal.h"
+
+/* Masks for identifying the public options that are permitted at match time.
+*/
+
+#define PUBLIC_MATCH_OPTIONS \
+ (PCRE2_ANCHORED|PCRE2_NOTBOL|PCRE2_NOTEOL|PCRE2_NOTEMPTY| \
+ PCRE2_NOTEMPTY_ATSTART|PCRE2_NO_UTF_CHECK|PCRE2_PARTIAL_HARD| \
+ PCRE2_PARTIAL_SOFT|PCRE2_NO_JIT)
+
+#define PUBLIC_JIT_MATCH_OPTIONS \
+ (PCRE2_NO_UTF_CHECK|PCRE2_NOTBOL|PCRE2_NOTEOL|PCRE2_NOTEMPTY|\
+ PCRE2_NOTEMPTY_ATSTART|PCRE2_PARTIAL_SOFT|PCRE2_PARTIAL_HARD)
+
+/* The mb->capture_last field uses the lower 16 bits for the last captured
+substring (which can never be greater than 65535) and a bit in the top half
+to mean "capture vector overflowed". This odd way of doing things was
+implemented when it was realized that preserving and restoring the overflow bit
+whenever the last capture number was saved/restored made for a neater
+interface, and doing it this way saved on (a) another variable, which would
+have increased the stack frame size (a big NO-NO in PCRE) and (b) another
+separate set of save/restore instructions. The following defines are used in
+implementing this. */
+
+#define CAPLMASK 0x0000ffff /* The bits used for last_capture */
+#define OVFLMASK 0xffff0000 /* The bits used for the overflow flag */
+#define OVFLBIT 0x00010000 /* The bit that is set for overflow */
+
+/* Bits for setting in mb->match_function_type to indicate two special types
+of call to match(). We do it this way to save on using another stack variable,
+as stack usage is to be discouraged. */
+
+#define MATCH_CONDASSERT 1 /* Called to check a condition assertion */
+#define MATCH_CBEGROUP 2 /* Could-be-empty unlimited repeat group */
+
+/* Non-error returns from the match() function. Error returns are externally
+defined PCRE2_ERROR_xxx codes, which are all negative. */
+
+#define MATCH_MATCH 1
+#define MATCH_NOMATCH 0
+
+/* Special internal returns from the match() function. Make them sufficiently
+negative to avoid the external error codes. */
+
+#define MATCH_ACCEPT (-999)
+#define MATCH_KETRPOS (-998)
+#define MATCH_ONCE (-997)
+/* The next 5 must be kept together and in sequence so that a test that checks
+for any one of them can use a range. */
+#define MATCH_COMMIT (-996)
+#define MATCH_PRUNE (-995)
+#define MATCH_SKIP (-994)
+#define MATCH_SKIP_ARG (-993)
+#define MATCH_THEN (-992)
+#define MATCH_BACKTRACK_MAX MATCH_THEN
+#define MATCH_BACKTRACK_MIN MATCH_COMMIT
+
+/* Min and max values for the common repeats; for the maxima, 0 => infinity */
+
+static const char rep_min[] = { 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, };
+static const char rep_max[] = { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, };
+
+/* Maximum number of ovector elements that can be saved on the system stack
+when processing OP_RECURSE in non-HEAP_MATCH_RECURSE mode. If the ovector is
+bigger, malloc() is used. This value should be a multiple of 3, because the
+ovector length is always a multiple of 3. */
+
+#define OP_RECURSE_STACK_SAVE_MAX 45
+
+
+
+/*************************************************
+* Match a back-reference *
+*************************************************/
+
+/* This function is called only when it is known that the offset lies within
+the offsets that have so far been used in the match. Note that in caseless
+UTF-8 mode, the number of subject bytes matched may be different to the number
+of reference bytes. (In theory this could also happen in UTF-16 mode, but it
+seems unlikely.)
+
+Arguments:
+ offset index into the offset vector
+ offset_top top of the used offset vector
+ eptr pointer into the subject
+ mb points to match block
+ caseless TRUE if caseless
+ lengthptr pointer for returning the length matched
+
+Returns: = 0 sucessful match; number of code units matched is set
+ < 0 no match
+ > 0 partial match
+*/
+
+static int
+match_ref(PCRE2_SIZE offset, PCRE2_SIZE offset_top, PCRE2_SPTR eptr,
+ match_block *mb, BOOL caseless, PCRE2_SIZE *lengthptr)
+{
+#if defined SUPPORT_UNICODE
+BOOL utf = (mb->poptions & PCRE2_UTF) != 0;
+#endif
+
+PCRE2_SPTR p;
+PCRE2_SIZE length;
+PCRE2_SPTR eptr_start = eptr;
+
+/* Deal with an unset group. The default is no match, but there is an option to
+match an empty string. */
+
+if (offset >= offset_top || mb->ovector[offset] == PCRE2_UNSET)
+ {
+ if ((mb->poptions & PCRE2_MATCH_UNSET_BACKREF) != 0)
+ {
+ *lengthptr = 0;
+ return 0; /* Match */
+ }
+ else return -1; /* No match */
+ }
+
+/* Separate the caseless and UTF cases for speed. */
+
+p = mb->start_subject + mb->ovector[offset];
+length = mb->ovector[offset+1] - mb->ovector[offset];
+
+if (caseless)
+ {
+#if defined SUPPORT_UNICODE
+ if (utf)
+ {
+ /* Match characters up to the end of the reference. NOTE: the number of
+ code units matched may differ, because in UTF-8 there are some characters
+ whose upper and lower case versions code have different numbers of bytes.
+ For example, U+023A (2 bytes in UTF-8) is the upper case version of U+2C65
+ (3 bytes in UTF-8); a sequence of 3 of the former uses 6 bytes, as does a
+ sequence of two of the latter. It is important, therefore, to check the
+ length along the reference, not along the subject (earlier code did this
+ wrong). */
+
+ PCRE2_SPTR endptr = p + length;
+ while (p < endptr)
+ {
+ uint32_t c, d;
+ const ucd_record *ur;
+ if (eptr >= mb->end_subject) return 1; /* Partial match */
+ GETCHARINC(c, eptr);
+ GETCHARINC(d, p);
+ ur = GET_UCD(d);
+ if (c != d && c != (uint32_t)((int)d + ur->other_case))
+ {
+ const uint32_t *pp = PRIV(ucd_caseless_sets) + ur->caseset;
+ for (;;)
+ {
+ if (c < *pp) return -1; /* No match */
+ if (c == *pp++) break;
+ }
+ }
+ }
+ }
+ else
+#endif
+
+ /* Not in UTF mode */
+
+ {
+ for (; length > 0; length--)
+ {
+ uint32_t cc, cp;
+ if (eptr >= mb->end_subject) return 1; /* Partial match */
+ cc = UCHAR21TEST(eptr);
+ cp = UCHAR21TEST(p);
+ if (TABLE_GET(cp, mb->lcc, cp) != TABLE_GET(cc, mb->lcc, cc))
+ return -1; /* No match */
+ p++;
+ eptr++;
+ }
+ }
+ }
+
+/* In the caseful case, we can just compare the code units, whether or not we
+are in UTF mode. */
+
+else
+ {
+ for (; length > 0; length--)
+ {
+ if (eptr >= mb->end_subject) return 1; /* Partial match */
+ if (UCHAR21INCTEST(p) != UCHAR21INCTEST(eptr)) return -1; /*No match */
+ }
+ }
+
+*lengthptr = eptr - eptr_start;
+return 0; /* Match */
+}
+
+
+
+/***************************************************************************
+****************************************************************************
+ RECURSION IN THE match() FUNCTION
+
+The match() function is highly recursive, though not every recursive call
+increases the recursion depth. Nevertheless, some regular expressions can cause
+it to recurse to a great depth. I was writing for Unix, so I just let it call
+itself recursively. This uses the stack for saving everything that has to be
+saved for a recursive call. On Unix, the stack can be large, and this works
+fine.
+
+It turns out that on some non-Unix-like systems there are problems with
+programs that use a lot of stack. (This despite the fact that every last chip
+has oodles of memory these days, and techniques for extending the stack have
+been known for decades.) So....
+
+There is a fudge, triggered by defining HEAP_MATCH_RECURSE, which avoids
+recursive calls by keeping local variables that need to be preserved in blocks
+of memory on the heap instead instead of on the stack. Macros are used to
+achieve this so that the actual code doesn't look very different to what it
+always used to.
+
+The original heap-recursive code used longjmp(). However, it seems that this
+can be very slow on some operating systems. Following a suggestion from Stan
+Switzer, the use of longjmp() has been abolished, at the cost of having to
+provide a unique number for each call to RMATCH. There is no way of generating
+a sequence of numbers at compile time in C. I have given them names, to make
+them stand out more clearly.
+
+Crude tests on x86 Linux show a small speedup of around 5-8%. However, on
+FreeBSD, avoiding longjmp() more than halves the time taken to run the standard
+tests. Furthermore, not using longjmp() means that local dynamic variables
+don't have indeterminate values; this has meant that the frame size can be
+reduced because the result can be "passed back" by straight setting of the
+variable instead of being passed in the frame.
+****************************************************************************
+***************************************************************************/
+
+/* Numbers for RMATCH calls. When this list is changed, the code at HEAP_RETURN
+below must be updated in sync. */
+
+enum { RM1=1, RM2, RM3, RM4, RM5, RM6, RM7, RM8, RM9, RM10,
+ RM11, RM12, RM13, RM14, RM15, RM16, RM17, RM18, RM19, RM20,
+ RM21, RM22, RM23, RM24, RM25, RM26, RM27, RM28, RM29, RM30,
+ RM31, RM32, RM33, RM34, RM35, RM36, RM37, RM38, RM39, RM40,
+ RM41, RM42, RM43, RM44, RM45, RM46, RM47, RM48, RM49, RM50,
+ RM51, RM52, RM53, RM54, RM55, RM56, RM57, RM58, RM59, RM60,
+ RM61, RM62, RM63, RM64, RM65, RM66, RM67, RM68 };
+
+/* These versions of the macros use the stack, as normal. Note that the "rw"
+argument of RMATCH isn't actually used in this definition. */
+
+#ifndef HEAP_MATCH_RECURSE
+#define RMATCH(ra,rb,rc,rd,re,rw) \
+ rrc = match(ra,rb,mstart,rc,rd,re,rdepth+1)
+#define RRETURN(ra) return ra
+#else
+
+/* These versions of the macros manage a private stack on the heap. Note that
+the "rd" argument of RMATCH isn't actually used in this definition. It's the mb
+argument of match(), which never changes. */
+
+#define RMATCH(ra,rb,rc,rd,re,rw)\
+ {\
+ heapframe *newframe = frame->Xnextframe;\
+ if (newframe == NULL)\
+ {\
+ newframe = (heapframe *)(mb->stack_memctl.malloc)\
+ (sizeof(heapframe), mb->stack_memctl.memory_data);\
+ if (newframe == NULL) RRETURN(PCRE2_ERROR_NOMEMORY);\
+ newframe->Xnextframe = NULL;\
+ frame->Xnextframe = newframe;\
+ }\
+ frame->Xwhere = rw;\
+ newframe->Xeptr = ra;\
+ newframe->Xecode = rb;\
+ newframe->Xmstart = mstart;\
+ newframe->Xoffset_top = rc;\
+ newframe->Xeptrb = re;\
+ newframe->Xrdepth = frame->Xrdepth + 1;\
+ newframe->Xprevframe = frame;\
+ frame = newframe;\
+ goto HEAP_RECURSE;\
+ L_##rw:;\
+ }
+
+#define RRETURN(ra)\
+ {\
+ heapframe *oldframe = frame;\
+ frame = oldframe->Xprevframe;\
+ if (frame != NULL)\
+ {\
+ rrc = ra;\
+ goto HEAP_RETURN;\
+ }\
+ return ra;\
+ }
+
+
+/* Structure for remembering the local variables in a private frame. Arrange it
+so as to minimize the number of holes. */
+
+typedef struct heapframe {
+ struct heapframe *Xprevframe;
+ struct heapframe *Xnextframe;
+
+#ifdef SUPPORT_UNICODE
+ PCRE2_SPTR Xcharptr;
+#endif
+ PCRE2_SPTR Xeptr;
+ PCRE2_SPTR Xecode;
+ PCRE2_SPTR Xmstart;
+ PCRE2_SPTR Xcallpat;
+ PCRE2_SPTR Xdata;
+ PCRE2_SPTR Xnext_ecode;
+ PCRE2_SPTR Xpp;
+ PCRE2_SPTR Xprev;
+ PCRE2_SPTR Xsaved_eptr;
+
+ eptrblock *Xeptrb;
+
+ PCRE2_SIZE Xlength;
+ PCRE2_SIZE Xoffset;
+ PCRE2_SIZE Xoffset_top;
+ PCRE2_SIZE Xsave_offset1, Xsave_offset2, Xsave_offset3;
+
+ uint32_t Xfc;
+ uint32_t Xnumber;
+ uint32_t Xrdepth;
+ uint32_t Xop;
+ uint32_t Xsave_capture_last;
+
+#ifdef SUPPORT_UNICODE
+ uint32_t Xprop_value;
+ int Xprop_type;
+ int Xprop_fail_result;
+ int Xoclength;
+#endif
+
+ int Xcodelink;
+ int Xctype;
+ int Xfi;
+ int Xmax;
+ int Xmin;
+ int Xwhere; /* Where to jump back to */
+
+ BOOL Xcondition;
+ BOOL Xcur_is_word;
+ BOOL Xprev_is_word;
+
+ eptrblock Xnewptrb;
+ recursion_info Xnew_recursive;
+
+#ifdef SUPPORT_UNICODE
+ PCRE2_UCHAR Xocchars[6];
+#endif
+} heapframe;
+
+#endif
+
+
+/***************************************************************************
+***************************************************************************/
+
+
+/* When HEAP_MATCH_RECURSE is not defined, the match() function implements
+backtrack points by calling itself recursively in all but one case. The one
+special case is when processing OP_RECURSE, which specifies recursion in the
+pattern. The entire ovector must be saved and restored while processing
+OP_RECURSE. If the ovector is small enough, instead of calling match()
+directly, op_recurse_ovecsave() is called. This function uses the system stack
+to save the ovector while calling match() to process the pattern recursion. */
+
+#ifndef HEAP_MATCH_RECURSE
+
+/* We need a prototype for match() because it is mutually recursive with
+op_recurse_ovecsave(). */
+
+static int
+match(PCRE2_SPTR eptr, PCRE2_SPTR ecode, PCRE2_SPTR mstart,
+ PCRE2_SIZE offset_top, match_block *mb, eptrblock *eptrb, uint32_t rdepth);
+
+
+/*************************************************
+* Process OP_RECURSE, stacking ovector *
+*************************************************/
+
+/* When this function is called, mb->recursive has already been updated to
+point to a new recursion data block, and all its fields other than ovec_save
+have been set.
+
+This function exists so that the local vector variable ovecsave is no longer
+defined in the match() function, as it was in PCRE1. It is used only when there
+is recursion in the pattern, so it wastes a lot of stack to have it defined for
+every call of match(). We now use this function as an indirect way of calling
+match() only in the case when ovecsave is needed. (David Wheeler used to say
+"All problems in computer science can be solved by another level of
+indirection.")
+
+HOWEVER: when this file is compiled by gcc in an optimizing mode, because this
+function is called only once, and only from within match(), gcc will "inline"
+it - that is, move it inside match() - and this completely negates its reason
+for existence. Therefore, we mark it as non-inline when gcc is in use.
+
+Arguments:
+ eptr pointer to current character in subject
+ callpat the recursion point in the pattern
+ mstart pointer to the current match start position (can be modified
+ by encountering \K)
+ offset_top current top pointer (highest ovector offset used + 1)
+ mb pointer to "static" info block for the match
+ eptrb pointer to chain of blocks containing eptr at start of
+ brackets - for testing for empty matches
+ rdepth the recursion depth
+
+Returns: a match() return code
+*/
+
+static int
+#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
+__attribute__ ((noinline))
+#endif
+op_recurse_ovecsave(PCRE2_SPTR eptr, PCRE2_SPTR callpat,
+ PCRE2_SPTR mstart, PCRE2_SIZE offset_top, match_block *mb, eptrblock *eptrb,
+ uint32_t rdepth)
+{
+int rrc;
+BOOL cbegroup = *callpat >= OP_SBRA;
+recursion_info *new_recursive = mb->recursive;
+PCRE2_SIZE ovecsave[OP_RECURSE_STACK_SAVE_MAX];
+
+/* Save the ovector */
+
+new_recursive->ovec_save = ovecsave;
+memcpy(ovecsave, mb->ovector, mb->offset_end * sizeof(PCRE2_SIZE));
+
+/* Do the recursion. After processing each alternative, restore the ovector
+data and the last captured value. */
+
+do
+ {
+ if (cbegroup) mb->match_function_type |= MATCH_CBEGROUP;
+ rrc = match(eptr, callpat + PRIV(OP_lengths)[*callpat], mstart, offset_top,
+ mb, eptrb, rdepth + 1);
+ memcpy(mb->ovector, new_recursive->ovec_save,
+ mb->offset_end * sizeof(PCRE2_SIZE));
+ mb->capture_last = new_recursive->saved_capture_last;
+ if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) return rrc;
+
+ /* PCRE does not allow THEN, SKIP, PRUNE or COMMIT to escape beyond a
+ recursion; they cause a NOMATCH for the entire recursion. These codes
+ are defined in a range that can be tested for. */
+
+ if (rrc >= MATCH_BACKTRACK_MIN && rrc <= MATCH_BACKTRACK_MAX)
+ return MATCH_NOMATCH;
+
+ /* Any return code other than NOMATCH is an error. Otherwise, advance to the
+ next alternative or to the end of the recursing subpattern. If there were
+ nested recursions, mb->recursive might be changed, so reset it before
+ looping. */
+
+ if (rrc != MATCH_NOMATCH) return rrc;
+ mb->recursive = new_recursive;
+ callpat += GET(callpat, 1);
+ }
+while (*callpat == OP_ALT); /* Loop for the alternatives */
+
+/* None of the alternatives matched. */
+
+return MATCH_NOMATCH;
+}
+#endif /* HEAP_MATCH_RECURSE */
+
+
+
+/*************************************************
+* Match from current position *
+*************************************************/
+
+/* This function is called recursively in many circumstances. Whenever it
+returns a negative (error) response, the outer incarnation must also return the
+same response. */
+
+/* These macros pack up tests that are used for partial matching, and which
+appear several times in the code. We set the "hit end" flag if the pointer is
+at the end of the subject and also past the earliest inspected character (i.e.
+something has been matched, even if not part of the actual matched string). For
+hard partial matching, we then return immediately. The second one is used when
+we already know we are past the end of the subject. */
+
+#define CHECK_PARTIAL()\
+ if (mb->partial != 0 && eptr >= mb->end_subject && \
+ eptr > mb->start_used_ptr) \
+ { \
+ mb->hitend = TRUE; \
+ if (mb->partial > 1) RRETURN(PCRE2_ERROR_PARTIAL); \
+ }
+
+#define SCHECK_PARTIAL()\
+ if (mb->partial != 0 && eptr > mb->start_used_ptr) \
+ { \
+ mb->hitend = TRUE; \
+ if (mb->partial > 1) RRETURN(PCRE2_ERROR_PARTIAL); \
+ }
+
+
+/* Performance note: It might be tempting to extract commonly used fields from
+the mb structure (e.g. utf, end_subject) into individual variables to improve
+performance. Tests using gcc on a SPARC disproved this; in the first case, it
+made performance worse.
+
+Arguments:
+ eptr pointer to current character in subject
+ ecode pointer to current position in compiled code
+ mstart pointer to the current match start position (can be modified
+ by encountering \K)
+ offset_top current top pointer (highest ovector offset used + 1)
+ mb pointer to "static" info block for the match
+ eptrb pointer to chain of blocks containing eptr at start of
+ brackets - for testing for empty matches
+ rdepth the recursion depth
+
+Returns: MATCH_MATCH if matched ) these values are >= 0
+ MATCH_NOMATCH if failed to match )
+ a negative MATCH_xxx value for PRUNE, SKIP, etc
+ a negative PCRE2_ERROR_xxx value if aborted by an error condition
+ (e.g. stopped by repeated call or recursion limit)
+*/
+
+static int
+match(PCRE2_SPTR eptr, PCRE2_SPTR ecode, PCRE2_SPTR mstart,
+ PCRE2_SIZE offset_top, match_block *mb, eptrblock *eptrb, uint32_t rdepth)
+{
+/* These variables do not need to be preserved over recursion in this function,
+so they can be ordinary variables in all cases. Mark some of them with
+"register" because they are used a lot in loops. */
+
+int rrc; /* Returns from recursive calls */
+int i; /* Used for loops not involving calls to RMATCH() */
+uint32_t c; /* Character values not kept over RMATCH() calls */
+BOOL utf; /* Local copy of UTF flag for speed */
+
+BOOL minimize, possessive; /* Quantifier options */
+int condcode;
+
+/* When recursion is not being used, all "local" variables that have to be
+preserved over calls to RMATCH() are part of a "frame". We set up the top-level
+frame on the stack here; subsequent instantiations are obtained from the heap
+whenever RMATCH() does a "recursion". See the macro definitions above. Putting
+the top-level on the stack rather than malloc-ing them all gives a performance
+boost in many cases where there is not much "recursion". */
+
+#ifdef HEAP_MATCH_RECURSE
+heapframe *frame = (heapframe *)mb->match_frames_base;
+
+/* Copy in the original argument variables */
+
+frame->Xeptr = eptr;
+frame->Xecode = ecode;
+frame->Xmstart = mstart;
+frame->Xoffset_top = offset_top;
+frame->Xeptrb = eptrb;
+frame->Xrdepth = rdepth;
+
+/* This is where control jumps back to to effect "recursion" */
+
+HEAP_RECURSE:
+
+/* Macros make the argument variables come from the current frame */
+
+#define eptr frame->Xeptr
+#define ecode frame->Xecode
+#define mstart frame->Xmstart
+#define offset_top frame->Xoffset_top
+#define eptrb frame->Xeptrb
+#define rdepth frame->Xrdepth
+
+/* Ditto for the local variables */
+
+#ifdef SUPPORT_UNICODE
+#define charptr frame->Xcharptr
+#define prop_value frame->Xprop_value
+#define prop_type frame->Xprop_type
+#define prop_fail_result frame->Xprop_fail_result
+#define oclength frame->Xoclength
+#define occhars frame->Xocchars
+#endif
+
+
+#define callpat frame->Xcallpat
+#define codelink frame->Xcodelink
+#define data frame->Xdata
+#define next_ecode frame->Xnext_ecode
+#define pp frame->Xpp
+#define prev frame->Xprev
+#define saved_eptr frame->Xsaved_eptr
+
+#define new_recursive frame->Xnew_recursive
+
+#define ctype frame->Xctype
+#define fc frame->Xfc
+#define fi frame->Xfi
+#define length frame->Xlength
+#define max frame->Xmax
+#define min frame->Xmin
+#define number frame->Xnumber
+#define offset frame->Xoffset
+#define op frame->Xop
+#define save_capture_last frame->Xsave_capture_last
+#define save_offset1 frame->Xsave_offset1
+#define save_offset2 frame->Xsave_offset2
+#define save_offset3 frame->Xsave_offset3
+
+#define condition frame->Xcondition
+#define cur_is_word frame->Xcur_is_word
+#define prev_is_word frame->Xprev_is_word
+
+#define newptrb frame->Xnewptrb
+
+/* When normal stack-based recursion is being used for match(), local variables
+are allocated on the stack and get preserved during recursion in the usual way.
+In this environment, fi and i, and fc and c, can be the same variables. */
+
+#else /* HEAP_MATCH_RECURSE not defined */
+#define fi i
+#define fc c
+
+/* Many of the following variables are used only in small blocks of the code.
+My normal style of coding would have declared them within each of those blocks.
+However, in order to accommodate the version of this code that uses an external
+"stack" implemented on the heap, it is easier to declare them all here, so the
+declarations can be cut out in a block. The only declarations within blocks
+below are for variables that do not have to be preserved over a recursive call
+to RMATCH(). */
+
+#ifdef SUPPORT_UNICODE
+PCRE2_SPTR charptr;
+#endif
+PCRE2_SPTR callpat;
+PCRE2_SPTR data;
+PCRE2_SPTR next_ecode;
+PCRE2_SPTR pp;
+PCRE2_SPTR prev;
+PCRE2_SPTR saved_eptr;
+
+PCRE2_SIZE length;
+PCRE2_SIZE offset;
+PCRE2_SIZE save_offset1, save_offset2, save_offset3;
+
+uint32_t number;
+uint32_t op;
+uint32_t save_capture_last;
+
+#ifdef SUPPORT_UNICODE
+uint32_t prop_value;
+int prop_type;
+int prop_fail_result;
+int oclength;
+PCRE2_UCHAR occhars[6];
+#endif
+
+int codelink;
+int ctype;
+int max;
+int min;
+
+BOOL condition;
+BOOL cur_is_word;
+BOOL prev_is_word;
+
+eptrblock newptrb;
+recursion_info new_recursive;
+#endif /* HEAP_MATCH_RECURSE not defined */
+
+/* To save space on the stack and in the heap frame, I have doubled up on some
+of the local variables that are used only in localised parts of the code, but
+still need to be preserved over recursive calls of match(). These macros define
+the alternative names that are used. */
+
+#define allow_zero cur_is_word
+#define caseless cur_is_word
+#define cbegroup condition
+#define code_offset codelink
+#define condassert condition
+#define foc number
+#define matched_once prev_is_word
+#define save_mark data
+
+/* These statements are here to stop the compiler complaining about unitialized
+variables. */
+
+#ifdef SUPPORT_UNICODE
+prop_value = 0;
+prop_fail_result = 0;
+#endif
+
+
+/* This label is used for tail recursion, which is used in a few cases even
+when HEAP_MATCH_RECURSE is not defined, in order to reduce the amount of stack
+that is used. Thanks to Ian Taylor for noticing this possibility and sending
+the original patch. */
+
+TAIL_RECURSE:
+
+/* OK, now we can get on with the real code of the function. Recursive calls
+are specified by the macro RMATCH and RRETURN is used to return. When
+HEAP_MATCH_RECURSE is *not* defined, these just turn into a recursive call to
+match() and a "return", respectively. However, RMATCH isn't like a function
+call because it's quite a complicated macro. It has to be used in one
+particular way. This shouldn't, however, impact performance when true recursion
+is being used. */
+
+#ifdef SUPPORT_UNICODE
+utf = (mb->poptions & PCRE2_UTF) != 0;
+#else
+utf = FALSE;
+#endif
+
+/* First check that we haven't called match() too many times, or that we
+haven't exceeded the recursive call limit. */
+
+if (mb->match_call_count++ >= mb->match_limit) RRETURN(PCRE2_ERROR_MATCHLIMIT);
+if (rdepth >= mb->match_limit_recursion) RRETURN(PCRE2_ERROR_RECURSIONLIMIT);
+
+/* At the start of a group with an unlimited repeat that may match an empty
+string, the variable mb->match_function_type contains the MATCH_CBEGROUP bit.
+It is done this way to save having to use another function argument, which
+would take up space on the stack. See also MATCH_CONDASSERT below.
+
+When MATCH_CBEGROUP is set, add the current subject pointer to the chain of
+such remembered pointers, to be checked when we hit the closing ket, in order
+to break infinite loops that match no characters. When match() is called in
+other circumstances, don't add to the chain. The MATCH_CBEGROUP feature must
+NOT be used with tail recursion, because the memory block that is used is on
+the stack, so a new one may be required for each match(). */
+
+if ((mb->match_function_type & MATCH_CBEGROUP) != 0)
+ {
+ newptrb.epb_saved_eptr = eptr;
+ newptrb.epb_prev = eptrb;
+ eptrb = &newptrb;
+ mb->match_function_type &= ~MATCH_CBEGROUP;
+ }
+
+/* Now, at last, we can start processing the opcodes. */
+
+for (;;)
+ {
+ minimize = possessive = FALSE;
+ op = *ecode;
+
+ switch(op)
+ {
+ case OP_MARK:
+ mb->nomatch_mark = ecode + 2;
+ mb->mark = NULL; /* In case previously set by assertion */
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, mb,
+ eptrb, RM55);
+ if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) &&
+ mb->mark == NULL) mb->mark = ecode + 2;
+
+ /* A return of MATCH_SKIP_ARG means that matching failed at SKIP with an
+ argument, and we must check whether that argument matches this MARK's
+ argument. It is passed back in mb->start_match_ptr (an overloading of that
+ variable). If it does match, we reset that variable to the current subject
+ position and return MATCH_SKIP. Otherwise, pass back the return code
+ unaltered. */
+
+ else if (rrc == MATCH_SKIP_ARG &&
+ PRIV(strcmp)(ecode + 2, mb->start_match_ptr) == 0)
+ {
+ mb->start_match_ptr = eptr;
+ RRETURN(MATCH_SKIP);
+ }
+ RRETURN(rrc);
+
+ case OP_FAIL:
+ RRETURN(MATCH_NOMATCH);
+
+ case OP_COMMIT:
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, mb,
+ eptrb, RM52);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ RRETURN(MATCH_COMMIT);
+
+ case OP_PRUNE:
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, mb,
+ eptrb, RM51);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ RRETURN(MATCH_PRUNE);
+
+ case OP_PRUNE_ARG:
+ mb->nomatch_mark = ecode + 2;
+ mb->mark = NULL; /* In case previously set by assertion */
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, mb,
+ eptrb, RM56);
+ if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) &&
+ mb->mark == NULL) mb->mark = ecode + 2;
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ RRETURN(MATCH_PRUNE);
+
+ case OP_SKIP:
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, mb,
+ eptrb, RM53);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ mb->start_match_ptr = eptr; /* Pass back current position */
+ RRETURN(MATCH_SKIP);
+
+ /* Note that, for Perl compatibility, SKIP with an argument does NOT set
+ nomatch_mark. When a pattern match ends with a SKIP_ARG for which there was
+ not a matching mark, we have to re-run the match, ignoring the SKIP_ARG
+ that failed and any that precede it (either they also failed, or were not
+ triggered). To do this, we maintain a count of executed SKIP_ARGs. If a
+ SKIP_ARG gets to top level, the match is re-run with mb->ignore_skip_arg
+ set to the count of the one that failed. */
+
+ case OP_SKIP_ARG:
+ mb->skip_arg_count++;
+ if (mb->skip_arg_count <= mb->ignore_skip_arg)
+ {
+ ecode += PRIV(OP_lengths)[*ecode] + ecode[1];
+ break;
+ }
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top, mb,
+ eptrb, RM57);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+
+ /* Pass back the current skip name by overloading mb->start_match_ptr and
+ returning the special MATCH_SKIP_ARG return code. This will either be
+ caught by a matching MARK, or get to the top, where it causes a rematch
+ with mb->ignore_skip_arg set to the value of mb->skip_arg_count. */
+
+ mb->start_match_ptr = ecode + 2;
+ RRETURN(MATCH_SKIP_ARG);
+
+ /* For THEN (and THEN_ARG) we pass back the address of the opcode, so that
+ the branch in which it occurs can be determined. Overload the start of
+ match pointer to do this. */
+
+ case OP_THEN:
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, mb,
+ eptrb, RM54);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ mb->start_match_ptr = ecode;
+ RRETURN(MATCH_THEN);
+
+ case OP_THEN_ARG:
+ mb->nomatch_mark = ecode + 2;
+ mb->mark = NULL; /* In case previously set by assertion */
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode] + ecode[1], offset_top,
+ mb, eptrb, RM58);
+ if ((rrc == MATCH_MATCH || rrc == MATCH_ACCEPT) &&
+ mb->mark == NULL) mb->mark = ecode + 2;
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ mb->start_match_ptr = ecode;
+ RRETURN(MATCH_THEN);
+
+ /* Handle an atomic group that does not contain any capturing parentheses.
+ This can be handled like an assertion. Prior to 8.13, all atomic groups
+ were handled this way. In 8.13, the code was changed as below for ONCE, so
+ that backups pass through the group and thereby reset captured values.
+ However, this uses a lot more stack, so in 8.20, atomic groups that do not
+ contain any captures generate OP_ONCE_NC, which can be handled in the old,
+ less stack intensive way.
+
+ Check the alternative branches in turn - the matching won't pass the KET
+ for this kind of subpattern. If any one branch matches, we carry on as at
+ the end of a normal bracket, leaving the subject pointer, but resetting
+ the start-of-match value in case it was changed by \K. */
+
+ case OP_ONCE_NC:
+ prev = ecode;
+ saved_eptr = eptr;
+ save_mark = mb->mark;
+ do
+ {
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, mb, eptrb, RM64);
+ if (rrc == MATCH_MATCH) /* Note: _not_ MATCH_ACCEPT */
+ {
+ mstart = mb->start_match_ptr;
+ break;
+ }
+ if (rrc == MATCH_THEN)
+ {
+ next_ecode = ecode + GET(ecode,1);
+ if (mb->start_match_ptr < next_ecode &&
+ (*ecode == OP_ALT || *next_ecode == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode += GET(ecode,1);
+ mb->mark = save_mark;
+ }
+ while (*ecode == OP_ALT);
+
+ /* If hit the end of the group (which could be repeated), fail */
+
+ if (*ecode != OP_ONCE_NC && *ecode != OP_ALT) RRETURN(MATCH_NOMATCH);
+
+ /* Continue as from after the group, updating the offsets high water
+ mark, since extracts may have been taken. */
+
+ do ecode += GET(ecode, 1); while (*ecode == OP_ALT);
+
+ offset_top = mb->end_offset_top;
+ eptr = mb->end_match_ptr;
+
+ /* For a non-repeating ket, just continue at this level. This also
+ happens for a repeating ket if no characters were matched in the group.
+ This is the forcible breaking of infinite loops as implemented in Perl
+ 5.005. */
+
+ if (*ecode == OP_KET || eptr == saved_eptr)
+ {
+ ecode += 1+LINK_SIZE;
+ break;
+ }
+
+ /* The repeating kets try the rest of the pattern or restart from the
+ preceding bracket, in the appropriate order. The second "call" of match()
+ uses tail recursion, to avoid using another stack frame. */
+
+ if (*ecode == OP_KETRMIN)
+ {
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, mb, eptrb, RM65);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode = prev;
+ goto TAIL_RECURSE;
+ }
+ else /* OP_KETRMAX */
+ {
+ RMATCH(eptr, prev, offset_top, mb, eptrb, RM66);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode += 1 + LINK_SIZE;
+ goto TAIL_RECURSE;
+ }
+ /* Control never gets here */
+
+ /* Handle a capturing bracket, other than those that are possessive with an
+ unlimited repeat. If there is space in the offset vector, save the current
+ subject position in the working slot at the top of the vector. We mustn't
+ change the current values of the data slot, because they may be set from a
+ previous iteration of this group, and be referred to by a reference inside
+ the group. A failure to match might occur after the group has succeeded,
+ if something later on doesn't match. For this reason, we need to restore
+ the working value and also the values of the final offsets, in case they
+ were set by a previous iteration of the same bracket.
+
+ If there isn't enough space in the offset vector, treat this as if it were
+ a non-capturing bracket. Don't worry about setting the flag for the error
+ case here; that is handled in the code for KET. */
+
+ case OP_CBRA:
+ case OP_SCBRA:
+ number = GET2(ecode, 1+LINK_SIZE);
+ offset = number << 1;
+
+ if (offset < mb->offset_max)
+ {
+ save_offset1 = mb->ovector[offset];
+ save_offset2 = mb->ovector[offset+1];
+ save_offset3 = mb->ovector[mb->offset_end - number];
+ save_capture_last = mb->capture_last;
+ save_mark = mb->mark;
+
+ mb->ovector[mb->offset_end - number] = eptr - mb->start_subject;
+
+ for (;;)
+ {
+ if (op >= OP_SBRA) mb->match_function_type |= MATCH_CBEGROUP;
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, mb,
+ eptrb, RM1);
+ if (rrc == MATCH_ONCE) break; /* Backing up through an atomic group */
+
+ /* If we backed up to a THEN, check whether it is within the current
+ branch by comparing the address of the THEN that is passed back with
+ the end of the branch. If it is within the current branch, and the
+ branch is one of two or more alternatives (it either starts or ends
+ with OP_ALT), we have reached the limit of THEN's action, so convert
+ the return code to NOMATCH, which will cause normal backtracking to
+ happen from now on. Otherwise, THEN is passed back to an outer
+ alternative. This implements Perl's treatment of parenthesized groups,
+ where a group not containing | does not affect the current alternative,
+ that is, (X) is NOT the same as (X|(*F)). */
+
+ if (rrc == MATCH_THEN)
+ {
+ next_ecode = ecode + GET(ecode,1);
+ if (mb->start_match_ptr < next_ecode &&
+ (*ecode == OP_ALT || *next_ecode == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ /* Anything other than NOMATCH is passed back. */
+
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ mb->capture_last = save_capture_last;
+ ecode += GET(ecode, 1);
+ mb->mark = save_mark;
+ if (*ecode != OP_ALT) break;
+ }
+
+ mb->ovector[offset] = save_offset1;
+ mb->ovector[offset+1] = save_offset2;
+ mb->ovector[mb->offset_end - number] = save_offset3;
+
+ /* At this point, rrc will be one of MATCH_ONCE or MATCH_NOMATCH. */
+
+ RRETURN(rrc);
+ }
+
+ /* FALL THROUGH ... Insufficient room for saving captured contents. Treat
+ as a non-capturing bracket. */
+
+ /* VVVVVVVVVVVVVVVVVVVVVVVVV */
+ /* VVVVVVVVVVVVVVVVVVVVVVVVV */
+
+ /* Non-capturing or atomic group, except for possessive with unlimited
+ repeat and ONCE group with no captures. Loop for all the alternatives.
+
+ When we get to the final alternative within the brackets, we used to return
+ the result of a recursive call to match() whatever happened so it was
+ possible to reduce stack usage by turning this into a tail recursion,
+ except in the case of a possibly empty group. However, now that there is
+ the possiblity of (*THEN) occurring in the final alternative, this
+ optimization is no longer always possible.
+
+ We can optimize if we know there are no (*THEN)s in the pattern; at present
+ this is the best that can be done.
+
+ MATCH_ONCE is returned when the end of an atomic group is successfully
+ reached, but subsequent matching fails. It passes back up the tree (causing
+ captured values to be reset) until the original atomic group level is
+ reached. This is tested by comparing mb->once_target with the start of the
+ group. At this point, the return is converted into MATCH_NOMATCH so that
+ previous backup points can be taken. */
+
+ case OP_ONCE:
+ case OP_BRA:
+ case OP_SBRA:
+
+ for (;;)
+ {
+ if (op >= OP_SBRA || op == OP_ONCE)
+ mb->match_function_type |= MATCH_CBEGROUP;
+
+ /* If this is not a possibly empty group, and there are no (*THEN)s in
+ the pattern, and this is the final alternative, optimize as described
+ above. */
+
+ else if (!mb->hasthen && ecode[GET(ecode, 1)] != OP_ALT)
+ {
+ ecode += PRIV(OP_lengths)[*ecode];
+ goto TAIL_RECURSE;
+ }
+
+ /* In all other cases, we have to make another call to match(). */
+
+ save_mark = mb->mark;
+ save_capture_last = mb->capture_last;
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, mb, eptrb,
+ RM2);
+
+ /* See comment in the code for capturing groups above about handling
+ THEN. */
+
+ if (rrc == MATCH_THEN)
+ {
+ next_ecode = ecode + GET(ecode,1);
+ if (mb->start_match_ptr < next_ecode &&
+ (*ecode == OP_ALT || *next_ecode == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ if (rrc != MATCH_NOMATCH)
+ {
+ if (rrc == MATCH_ONCE)
+ {
+ PCRE2_SPTR scode = ecode;
+ if (*scode != OP_ONCE) /* If not at start, find it */
+ {
+ while (*scode == OP_ALT) scode += GET(scode, 1);
+ scode -= GET(scode, 1);
+ }
+ if (mb->once_target == scode) rrc = MATCH_NOMATCH;
+ }
+ RRETURN(rrc);
+ }
+ ecode += GET(ecode, 1);
+ mb->mark = save_mark;
+ if (*ecode != OP_ALT) break;
+ mb->capture_last = save_capture_last;
+ }
+
+ RRETURN(MATCH_NOMATCH);
+
+ /* Handle possessive capturing brackets with an unlimited repeat. We come
+ here from BRAZERO with allow_zero set TRUE. The ovector values are
+ handled similarly to the normal case above. However, the matching is
+ different. The end of these brackets will always be OP_KETRPOS, which
+ returns MATCH_KETRPOS without going further in the pattern. By this means
+ we can handle the group by iteration rather than recursion, thereby
+ reducing the amount of stack needed. If the ovector is too small for
+ capturing, treat as non-capturing. */
+
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ allow_zero = FALSE;
+
+ POSSESSIVE_CAPTURE:
+ number = GET2(ecode, 1+LINK_SIZE);
+ offset = number << 1;
+ if (offset >= mb->offset_max) goto POSSESSIVE_NON_CAPTURE;
+
+ matched_once = FALSE;
+ code_offset = (int)(ecode - mb->start_code);
+
+ save_offset1 = mb->ovector[offset];
+ save_offset2 = mb->ovector[offset+1];
+ save_offset3 = mb->ovector[mb->offset_end - number];
+ save_capture_last = mb->capture_last;
+
+ /* Each time round the loop, save the current subject position for use
+ when the group matches. For MATCH_MATCH, the group has matched, so we
+ restart it with a new subject starting position, remembering that we had
+ at least one match. For MATCH_NOMATCH, carry on with the alternatives, as
+ usual. If we haven't matched any alternatives in any iteration, check to
+ see if a previous iteration matched. If so, the group has matched;
+ continue from afterwards. Otherwise it has failed; restore the previous
+ capture values before returning NOMATCH. */
+
+ for (;;)
+ {
+ mb->ovector[mb->offset_end - number] = eptr - mb->start_subject;
+ if (op >= OP_SBRA) mb->match_function_type |= MATCH_CBEGROUP;
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, mb,
+ eptrb, RM63);
+ if (rrc == MATCH_KETRPOS)
+ {
+ offset_top = mb->end_offset_top;
+ ecode = mb->start_code + code_offset;
+ save_capture_last = mb->capture_last;
+ matched_once = TRUE;
+ mstart = mb->start_match_ptr; /* In case \K changed it */
+ if (eptr == mb->end_match_ptr) /* Matched an empty string */
+ {
+ do ecode += GET(ecode, 1); while (*ecode == OP_ALT);
+ break;
+ }
+ eptr = mb->end_match_ptr;
+ continue;
+ }
+
+ /* See comment in the code for capturing groups above about handling
+ THEN. */
+
+ if (rrc == MATCH_THEN)
+ {
+ next_ecode = ecode + GET(ecode,1);
+ if (mb->start_match_ptr < next_ecode &&
+ (*ecode == OP_ALT || *next_ecode == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ mb->capture_last = save_capture_last;
+ ecode += GET(ecode, 1);
+ if (*ecode != OP_ALT) break;
+ }
+
+ if (!matched_once)
+ {
+ mb->ovector[offset] = save_offset1;
+ mb->ovector[offset+1] = save_offset2;
+ mb->ovector[mb->offset_end - number] = save_offset3;
+ }
+
+ if (allow_zero || matched_once)
+ {
+ ecode += 1 + LINK_SIZE;
+ break;
+ }
+ RRETURN(MATCH_NOMATCH);
+
+ /* Non-capturing possessive bracket with unlimited repeat. We come here
+ from BRAZERO with allow_zero = TRUE. The code is similar to the above,
+ without the capturing complication. It is written out separately for speed
+ and cleanliness. */
+
+ case OP_BRAPOS:
+ case OP_SBRAPOS:
+ allow_zero = FALSE;
+
+ POSSESSIVE_NON_CAPTURE:
+ matched_once = FALSE;
+ code_offset = (int)(ecode - mb->start_code);
+ save_capture_last = mb->capture_last;
+
+ for (;;)
+ {
+ if (op >= OP_SBRA) mb->match_function_type |= MATCH_CBEGROUP;
+ RMATCH(eptr, ecode + PRIV(OP_lengths)[*ecode], offset_top, mb,
+ eptrb, RM48);
+ if (rrc == MATCH_KETRPOS)
+ {
+ offset_top = mb->end_offset_top;
+ ecode = mb->start_code + code_offset;
+ matched_once = TRUE;
+ mstart = mb->start_match_ptr; /* In case \K reset it */
+ if (eptr == mb->end_match_ptr) /* Matched an empty string */
+ {
+ do ecode += GET(ecode, 1); while (*ecode == OP_ALT);
+ break;
+ }
+ eptr = mb->end_match_ptr;
+ continue;
+ }
+
+ /* See comment in the code for capturing groups above about handling
+ THEN. */
+
+ if (rrc == MATCH_THEN)
+ {
+ next_ecode = ecode + GET(ecode,1);
+ if (mb->start_match_ptr < next_ecode &&
+ (*ecode == OP_ALT || *next_ecode == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode += GET(ecode, 1);
+ if (*ecode != OP_ALT) break;
+ mb->capture_last = save_capture_last;
+ }
+
+ if (matched_once || allow_zero)
+ {
+ ecode += 1 + LINK_SIZE;
+ break;
+ }
+ RRETURN(MATCH_NOMATCH);
+
+ /* Control never reaches here. */
+
+ /* Conditional group: compilation checked that there are no more than two
+ branches. If the condition is false, skipping the first branch takes us
+ past the end of the item if there is only one branch, but that's exactly
+ what we want. */
+
+ case OP_COND:
+ case OP_SCOND:
+
+ /* The variable codelink will be added to ecode when the condition is
+ false, to get to the second branch. Setting it to the offset to the ALT
+ or KET, then incrementing ecode achieves this effect. We now have ecode
+ pointing to the condition or callout. */
+
+ codelink = GET(ecode, 1); /* Offset to the second branch */
+ ecode += 1 + LINK_SIZE; /* From this opcode */
+
+ /* Because of the way auto-callout works during compile, a callout item is
+ inserted between OP_COND and an assertion condition. */
+
+ if (*ecode == OP_CALLOUT || *ecode == OP_CALLOUT_STR)
+ {
+ unsigned int callout_length = (*ecode == OP_CALLOUT)
+ ? PRIV(OP_lengths)[OP_CALLOUT] : GET(ecode, 1 + 2*LINK_SIZE);
+
+ if (mb->callout != NULL)
+ {
+ pcre2_callout_block cb;
+ cb.version = 1;
+ cb.capture_top = (uint32_t)offset_top/2;
+ cb.capture_last = mb->capture_last & CAPLMASK;
+ cb.offset_vector = mb->ovector;
+ cb.mark = mb->nomatch_mark;
+ cb.subject = mb->start_subject;
+ cb.subject_length = (PCRE2_SIZE)(mb->end_subject - mb->start_subject);
+ cb.start_match = (PCRE2_SIZE)(mstart - mb->start_subject);
+ cb.current_position = (PCRE2_SIZE)(eptr - mb->start_subject);
+ cb.pattern_position = GET(ecode, 1);
+ cb.next_item_length = GET(ecode, 1 + LINK_SIZE);
+
+ if (*ecode == OP_CALLOUT)
+ {
+ cb.callout_number = ecode[1 + 2*LINK_SIZE];
+ cb.callout_string_offset = 0;
+ cb.callout_string = NULL;
+ cb.callout_string_length = 0;
+ }
+ else
+ {
+ cb.callout_number = 0;
+ cb.callout_string_offset = GET(ecode, 1 + 3*LINK_SIZE);
+ cb.callout_string = ecode + (1 + 4*LINK_SIZE) + 1;
+ cb.callout_string_length =
+ callout_length - (1 + 4*LINK_SIZE) - 2;
+ }
+
+ if ((rrc = mb->callout(&cb, mb->callout_data)) > 0)
+ RRETURN(MATCH_NOMATCH);
+ if (rrc < 0) RRETURN(rrc);
+ }
+
+ /* Advance ecode past the callout, so it now points to the condition. We
+ must adjust codelink so that the value of ecode+codelink is unchanged. */
+
+ ecode += callout_length;
+ codelink -= callout_length;
+ }
+
+ /* Test the various possible conditions */
+
+ condition = FALSE;
+ switch(condcode = *ecode)
+ {
+ case OP_RREF: /* Numbered group recursion test */
+ if (mb->recursive != NULL) /* Not recursing => FALSE */
+ {
+ uint32_t recno = GET2(ecode, 1); /* Recursion group number*/
+ condition = (recno == RREF_ANY || recno == mb->recursive->group_num);
+ }
+ break;
+
+ case OP_DNRREF: /* Duplicate named group recursion test */
+ if (mb->recursive != NULL)
+ {
+ int count = GET2(ecode, 1 + IMM2_SIZE);
+ PCRE2_SPTR slot = mb->name_table + GET2(ecode, 1) * mb->name_entry_size;
+ while (count-- > 0)
+ {
+ uint32_t recno = GET2(slot, 0);
+ condition = recno == mb->recursive->group_num;
+ if (condition) break;
+ slot += mb->name_entry_size;
+ }
+ }
+ break;
+
+ case OP_CREF: /* Numbered group used test */
+ offset = GET2(ecode, 1) << 1; /* Doubled ref number */
+ condition = offset < offset_top &&
+ mb->ovector[offset] != PCRE2_UNSET;
+ break;
+
+ case OP_DNCREF: /* Duplicate named group used test */
+ {
+ int count = GET2(ecode, 1 + IMM2_SIZE);
+ PCRE2_SPTR slot = mb->name_table + GET2(ecode, 1) * mb->name_entry_size;
+ while (count-- > 0)
+ {
+ offset = GET2(slot, 0) << 1;
+ condition = offset < offset_top &&
+ mb->ovector[offset] != PCRE2_UNSET;
+ if (condition) break;
+ slot += mb->name_entry_size;
+ }
+ }
+ break;
+
+ case OP_FALSE:
+ case OP_FAIL: /* The assertion (?!) becomes OP_FAIL */
+ break;
+
+ case OP_TRUE:
+ condition = TRUE;
+ break;
+
+ /* The condition is an assertion. Call match() to evaluate it - setting
+ the MATCH_CONDASSERT bit in mb->match_function_type causes it to stop at
+ the end of an assertion. */
+
+ default:
+ mb->match_function_type |= MATCH_CONDASSERT;
+ RMATCH(eptr, ecode, offset_top, mb, NULL, RM3);
+ if (rrc == MATCH_MATCH)
+ {
+ if (mb->end_offset_top > offset_top)
+ offset_top = mb->end_offset_top; /* Captures may have happened */
+ condition = TRUE;
+
+ /* Advance ecode past the assertion to the start of the first branch,
+ but adjust it so that the general choosing code below works. If the
+ assertion has a quantifier that allows zero repeats we must skip over
+ the BRAZERO. This is a lunatic thing to do, but somebody did! */
+
+ if (*ecode == OP_BRAZERO) ecode++;
+ ecode += GET(ecode, 1);
+ while (*ecode == OP_ALT) ecode += GET(ecode, 1);
+ ecode += 1 + LINK_SIZE - PRIV(OP_lengths)[condcode];
+ }
+
+ /* PCRE doesn't allow the effect of (*THEN) to escape beyond an
+ assertion; it is therefore treated as NOMATCH. Any other return is an
+ error. */
+
+ else if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN)
+ {
+ RRETURN(rrc); /* Need braces because of following else */
+ }
+ break;
+ }
+
+ /* Choose branch according to the condition */
+
+ ecode += condition? PRIV(OP_lengths)[condcode] : codelink;
+
+ /* We are now at the branch that is to be obeyed. As there is only one, we
+ can use tail recursion to avoid using another stack frame, except when
+ there is unlimited repeat of a possibly empty group. In the latter case, a
+ recursive call to match() is always required, unless the second alternative
+ doesn't exist, in which case we can just plough on. Note that, for
+ compatibility with Perl, the | in a conditional group is NOT treated as
+ creating two alternatives. If a THEN is encountered in the branch, it
+ propagates out to the enclosing alternative (unless nested in a deeper set
+ of alternatives, of course). */
+
+ if (condition || ecode[-(1+LINK_SIZE)] == OP_ALT)
+ {
+ if (op != OP_SCOND)
+ {
+ goto TAIL_RECURSE;
+ }
+
+ mb->match_function_type |= MATCH_CBEGROUP;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM49);
+ RRETURN(rrc);
+ }
+
+ /* Condition false & no alternative; continue after the group. */
+
+ else
+ {
+ }
+ break;
+
+
+ /* Before OP_ACCEPT there may be any number of OP_CLOSE opcodes,
+ to close any currently open capturing brackets. */
+
+ case OP_CLOSE:
+ number = GET2(ecode, 1); /* Must be less than 65536 */
+ offset = number << 1;
+ mb->capture_last = (mb->capture_last & OVFLMASK) | number;
+ if (offset >= mb->offset_max) mb->capture_last |= OVFLBIT; else
+ {
+ mb->ovector[offset] =
+ mb->ovector[mb->offset_end - number];
+ mb->ovector[offset+1] = eptr - mb->start_subject;
+
+ /* If this group is at or above the current highwater mark, ensure that
+ any groups between the current high water mark and this group are marked
+ unset and then update the high water mark. */
+
+ if (offset >= offset_top)
+ {
+ PCRE2_SIZE *iptr = mb->ovector + offset_top;
+ PCRE2_SIZE *iend = mb->ovector + offset;
+ while (iptr < iend) *iptr++ = PCRE2_UNSET;
+ offset_top = offset + 2;
+ }
+ }
+ ecode += 1 + IMM2_SIZE;
+ break;
+
+
+ /* End of the pattern, either real or forced. In an assertion ACCEPT,
+ update the last used pointer. */
+
+ case OP_ASSERT_ACCEPT:
+ if (eptr > mb->last_used_ptr) mb->last_used_ptr = eptr;
+
+ case OP_ACCEPT:
+ case OP_END:
+
+ /* If we have matched an empty string, fail if not in an assertion and not
+ in a recursion if either PCRE2_NOTEMPTY is set, or if PCRE2_NOTEMPTY_ATSTART
+ is set and we have matched at the start of the subject. In both cases,
+ backtracking will then try other alternatives, if any. */
+
+ if (eptr == mstart && op != OP_ASSERT_ACCEPT &&
+ mb->recursive == NULL &&
+ ((mb->moptions & PCRE2_NOTEMPTY) != 0 ||
+ ((mb->moptions & PCRE2_NOTEMPTY_ATSTART) != 0 &&
+ mstart == mb->start_subject + mb->start_offset)))
+ RRETURN(MATCH_NOMATCH);
+
+ /* Otherwise, we have a match. */
+
+ mb->end_match_ptr = eptr; /* Record where we ended */
+ mb->end_offset_top = offset_top; /* and how many extracts were taken */
+ mb->start_match_ptr = mstart; /* and the start (\K can modify) */
+
+ /* For some reason, the macros don't work properly if an expression is
+ given as the argument to RRETURN when the heap is in use. */
+
+ rrc = (op == OP_END)? MATCH_MATCH : MATCH_ACCEPT;
+ RRETURN(rrc);
+
+ /* Assertion brackets. Check the alternative branches in turn - the
+ matching won't pass the KET for an assertion. If any one branch matches,
+ the assertion is true. Lookbehind assertions have an OP_REVERSE item at the
+ start of each branch to move the current point backwards, so the code at
+ this level is identical to the lookahead case. When the assertion is part
+ of a condition, we want to return immediately afterwards. The caller of
+ this incarnation of the match() function will have set MATCH_CONDASSERT in
+ mb->match_function type, and one of these opcodes will be the first opcode
+ that is processed. We use a local variable that is preserved over calls to
+ match() to remember this case. */
+
+ case OP_ASSERT:
+ case OP_ASSERTBACK:
+ save_mark = mb->mark;
+ if ((mb->match_function_type & MATCH_CONDASSERT) != 0)
+ {
+ condassert = TRUE;
+ mb->match_function_type &= ~MATCH_CONDASSERT;
+ }
+ else condassert = FALSE;
+
+ /* Loop for each branch */
+
+ do
+ {
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, mb, NULL, RM4);
+
+ /* A match means that the assertion is true; break out of the loop
+ that matches its alternatives. */
+
+ if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT)
+ {
+ mstart = mb->start_match_ptr; /* In case \K reset it */
+ break;
+ }
+
+ /* If not matched, restore the previous mark setting. */
+
+ mb->mark = save_mark;
+
+ /* See comment in the code for capturing groups above about handling
+ THEN. */
+
+ if (rrc == MATCH_THEN)
+ {
+ next_ecode = ecode + GET(ecode,1);
+ if (mb->start_match_ptr < next_ecode &&
+ (*ecode == OP_ALT || *next_ecode == OP_ALT))
+ rrc = MATCH_NOMATCH;
+ }
+
+ /* Anything other than NOMATCH causes the entire assertion to fail,
+ passing back the return code. This includes COMMIT, SKIP, PRUNE and an
+ uncaptured THEN, which means they take their normal effect. This
+ consistent approach does not always have exactly the same effect as in
+ Perl. */
+
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode += GET(ecode, 1);
+ }
+ while (*ecode == OP_ALT); /* Continue for next alternative */
+
+ /* If we have tried all the alternative branches, the assertion has
+ failed. If not, we broke out after a match. */
+
+ if (*ecode == OP_KET) RRETURN(MATCH_NOMATCH);
+
+ /* If checking an assertion for a condition, return MATCH_MATCH. */
+
+ if (condassert) RRETURN(MATCH_MATCH);
+
+ /* Continue from after a successful assertion, updating the offsets high
+ water mark, since extracts may have been taken during the assertion. */
+
+ do ecode += GET(ecode,1); while (*ecode == OP_ALT);
+ ecode += 1 + LINK_SIZE;
+ offset_top = mb->end_offset_top;
+ continue;
+
+ /* Negative assertion: all branches must fail to match for the assertion to
+ succeed. */
+
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK_NOT:
+ save_mark = mb->mark;
+ if ((mb->match_function_type & MATCH_CONDASSERT) != 0)
+ {
+ condassert = TRUE;
+ mb->match_function_type &= ~MATCH_CONDASSERT;
+ }
+ else condassert = FALSE;
+
+ /* Loop for each alternative branch. */
+
+ do
+ {
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, mb, NULL, RM5);
+ mb->mark = save_mark; /* Always restore the mark setting */
+
+ switch(rrc)
+ {
+ case MATCH_MATCH: /* A successful match means */
+ case MATCH_ACCEPT: /* the assertion has failed. */
+ RRETURN(MATCH_NOMATCH);
+
+ case MATCH_NOMATCH: /* Carry on with next branch */
+ break;
+
+ /* See comment in the code for capturing groups above about handling
+ THEN. */
+
+ case MATCH_THEN:
+ next_ecode = ecode + GET(ecode,1);
+ if (mb->start_match_ptr < next_ecode &&
+ (*ecode == OP_ALT || *next_ecode == OP_ALT))
+ {
+ rrc = MATCH_NOMATCH;
+ break;
+ }
+ /* Otherwise fall through. */
+
+ /* COMMIT, SKIP, PRUNE, and an uncaptured THEN cause the whole
+ assertion to fail to match, without considering any more alternatives.
+ Failing to match means the assertion is true. This is a consistent
+ approach, but does not always have the same effect as in Perl. */
+
+ case MATCH_COMMIT:
+ case MATCH_SKIP:
+ case MATCH_SKIP_ARG:
+ case MATCH_PRUNE:
+ do ecode += GET(ecode,1); while (*ecode == OP_ALT);
+ goto NEG_ASSERT_TRUE; /* Break out of alternation loop */
+
+ /* Anything else is an error */
+
+ default:
+ RRETURN(rrc);
+ }
+
+ /* Continue with next branch */
+
+ ecode += GET(ecode,1);
+ }
+ while (*ecode == OP_ALT);
+
+ /* All branches in the assertion failed to match. */
+
+ NEG_ASSERT_TRUE:
+ if (condassert) RRETURN(MATCH_MATCH); /* Condition assertion */
+ ecode += 1 + LINK_SIZE; /* Continue with current branch */
+ continue;
+
+ /* Move the subject pointer back. This occurs only at the start of
+ each branch of a lookbehind assertion. If we are too close to the start to
+ move back, this match function fails. When working with UTF-8 we move
+ back a number of characters, not bytes. */
+
+ case OP_REVERSE:
+ i = GET(ecode, 1);
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ while (i-- > 0)
+ {
+ if (eptr <= mb->start_subject) RRETURN(MATCH_NOMATCH);
+ eptr--;
+ BACKCHAR(eptr);
+ }
+ }
+ else
+#endif
+
+ /* No UTF-8 support, or not in UTF-8 mode: count is byte count */
+
+ {
+ if (i > eptr - mb->start_subject) RRETURN(MATCH_NOMATCH);
+ eptr -= i;
+ }
+
+ /* Save the earliest consulted character, then skip to next op code */
+
+ if (eptr < mb->start_used_ptr) mb->start_used_ptr = eptr;
+ ecode += 1 + LINK_SIZE;
+ break;
+
+ /* The callout item calls an external function, if one is provided, passing
+ details of the match so far. This is mainly for debugging, though the
+ function is able to force a failure. */
+
+ case OP_CALLOUT:
+ case OP_CALLOUT_STR:
+ {
+ unsigned int callout_length = (*ecode == OP_CALLOUT)
+ ? PRIV(OP_lengths)[OP_CALLOUT] : GET(ecode, 1 + 2*LINK_SIZE);
+
+ if (mb->callout != NULL)
+ {
+ pcre2_callout_block cb;
+ cb.version = 1;
+ cb.callout_number = ecode[LINK_SIZE + 1];
+ cb.capture_top = (uint32_t)offset_top/2;
+ cb.capture_last = mb->capture_last & CAPLMASK;
+ cb.offset_vector = mb->ovector;
+ cb.mark = mb->nomatch_mark;
+ cb.subject = mb->start_subject;
+ cb.subject_length = (PCRE2_SIZE)(mb->end_subject - mb->start_subject);
+ cb.start_match = (PCRE2_SIZE)(mstart - mb->start_subject);
+ cb.current_position = (PCRE2_SIZE)(eptr - mb->start_subject);
+ cb.pattern_position = GET(ecode, 1);
+ cb.next_item_length = GET(ecode, 1 + LINK_SIZE);
+
+ if (*ecode == OP_CALLOUT)
+ {
+ cb.callout_number = ecode[1 + 2*LINK_SIZE];
+ cb.callout_string_offset = 0;
+ cb.callout_string = NULL;
+ cb.callout_string_length = 0;
+ }
+ else
+ {
+ cb.callout_number = 0;
+ cb.callout_string_offset = GET(ecode, 1 + 3*LINK_SIZE);
+ cb.callout_string = ecode + (1 + 4*LINK_SIZE) + 1;
+ cb.callout_string_length =
+ callout_length - (1 + 4*LINK_SIZE) - 2;
+ }
+
+ if ((rrc = mb->callout(&cb, mb->callout_data)) > 0)
+ RRETURN(MATCH_NOMATCH);
+ if (rrc < 0) RRETURN(rrc);
+ }
+ ecode += callout_length;
+ }
+ break;
+
+ /* Recursion either matches the current regex, or some subexpression. The
+ offset data is the offset to the starting bracket from the start of the
+ whole pattern. (This is so that it works from duplicated subpatterns.)
+
+ The state of the capturing groups is preserved over recursion, and
+ re-instated afterwards. We don't know how many are started and not yet
+ finished (offset_top records the completed total) so we just have to save
+ all the potential data. There may be up to 65535 such values, which is too
+ large to put on the stack, but using malloc for small numbers seems
+ expensive. As a compromise, the stack is used when there are no more than
+ OP_RECURSE_STACK_SAVE_MAX values to store; otherwise malloc is used.
+
+ There are also other values that have to be saved. We use a chained
+ sequence of blocks that actually live on the stack. Thanks to Robin Houston
+ for the original version of this logic. It has, however, been hacked around
+ a lot, so he is not to blame for the current way it works. */
+
+ case OP_RECURSE:
+ {
+ ovecsave_frame *fr;
+ recursion_info *ri;
+ uint32_t recno;
+
+ callpat = mb->start_code + GET(ecode, 1);
+ recno = (callpat == mb->start_code)? 0 : GET2(callpat, 1 + LINK_SIZE);
+
+ /* Check for repeating a pattern recursion without advancing the subject
+ pointer. This should catch convoluted mutual recursions. (Some simple
+ cases are caught at compile time.) */
+
+ for (ri = mb->recursive; ri != NULL; ri = ri->prevrec)
+ if (recno == ri->group_num && eptr == ri->subject_position)
+ RRETURN(PCRE2_ERROR_RECURSELOOP);
+
+ /* Add to "recursing stack" */
+
+ new_recursive.group_num = recno;
+ new_recursive.saved_capture_last = mb->capture_last;
+ new_recursive.subject_position = eptr;
+ new_recursive.prevrec = mb->recursive;
+ mb->recursive = &new_recursive;
+
+ /* Where to continue from afterwards */
+
+ ecode += 1 + LINK_SIZE;
+
+ /* When we are using the system stack for match() recursion we can call a
+ function that uses the system stack for preserving the ovector while
+ processing the pattern recursion, but only if the ovector is small
+ enough. */
+
+#ifndef HEAP_MATCH_RECURSE
+ if (mb->offset_end <= OP_RECURSE_STACK_SAVE_MAX)
+ {
+ rrc = op_recurse_ovecsave(eptr, callpat, mstart, offset_top, mb,
+ eptrb, rdepth);
+ mb->recursive = new_recursive.prevrec;
+ if (rrc != MATCH_MATCH && rrc != MATCH_ACCEPT) RRETURN(rrc);
+
+ /* Set where we got to in the subject, and reset the start, in case
+ it was changed by \K. This *is* propagated back out of a recursion,
+ for Perl compatibility. */
+
+ eptr = mb->end_match_ptr;
+ mstart = mb->start_match_ptr;
+ break; /* End of processing OP_RECURSE */
+ }
+#endif
+ /* If the ovector is too big, or if we are using the heap for match()
+ recursion, we have to use the heap for saving the ovector. Used ovecsave
+ frames are kept on a chain and re-used. This makes a small improvement in
+ execution time on Linux. */
+
+ if (mb->ovecsave_chain != NULL)
+ {
+ new_recursive.ovec_save = mb->ovecsave_chain->saved_ovec;
+ mb->ovecsave_chain = mb->ovecsave_chain->next;
+ }
+ else
+ {
+ fr = (ovecsave_frame *)(mb->memctl.malloc(sizeof(ovecsave_frame *) +
+ mb->offset_end * sizeof(PCRE2_SIZE), mb->memctl.memory_data));
+ if (fr == NULL) RRETURN(PCRE2_ERROR_NOMEMORY);
+ new_recursive.ovec_save = fr->saved_ovec;
+ }
+
+ memcpy(new_recursive.ovec_save, mb->ovector,
+ mb->offset_end * sizeof(PCRE2_SIZE));
+
+ /* Do the recursion. After processing each alternative, restore the
+ ovector data and the last captured value. This code has the same overall
+ logic as the code in the op_recurse_ovecsave() function, but is adapted
+ to use RMATCH/RRETURN and to release the heap block containing the saved
+ ovector. */
+
+ cbegroup = (*callpat >= OP_SBRA);
+ do
+ {
+ if (cbegroup) mb->match_function_type |= MATCH_CBEGROUP;
+ RMATCH(eptr, callpat + PRIV(OP_lengths)[*callpat], offset_top,
+ mb, eptrb, RM6);
+ memcpy(mb->ovector, new_recursive.ovec_save,
+ mb->offset_end * sizeof(PCRE2_SIZE));
+ mb->capture_last = new_recursive.saved_capture_last;
+ mb->recursive = new_recursive.prevrec;
+
+ if (rrc == MATCH_MATCH || rrc == MATCH_ACCEPT)
+ {
+ fr = (ovecsave_frame *)
+ ((uint8_t *)new_recursive.ovec_save - sizeof(ovecsave_frame *));
+ fr->next = mb->ovecsave_chain;
+ mb->ovecsave_chain = fr;
+
+ /* Set where we got to in the subject, and reset the start, in case
+ it was changed by \K. This *is* propagated back out of a recursion,
+ for Perl compatibility. */
+
+ eptr = mb->end_match_ptr;
+ mstart = mb->start_match_ptr;
+ goto RECURSION_MATCHED; /* Exit loop; end processing */
+ }
+
+ /* PCRE does not allow THEN, SKIP, PRUNE or COMMIT to escape beyond a
+ recursion; they cause a NOMATCH for the entire recursion. These codes
+ are defined in a range that can be tested for. */
+
+ if (rrc >= MATCH_BACKTRACK_MIN && rrc <= MATCH_BACKTRACK_MAX)
+ {
+ rrc = MATCH_NOMATCH;
+ goto RECURSION_RETURN;
+ }
+
+ /* Any return code other than NOMATCH is an error. */
+
+ if (rrc != MATCH_NOMATCH) goto RECURSION_RETURN;
+ mb->recursive = &new_recursive;
+ callpat += GET(callpat, 1);
+ }
+ while (*callpat == OP_ALT);
+
+ RECURSION_RETURN:
+ mb->recursive = new_recursive.prevrec;
+ fr = (ovecsave_frame *)
+ ((uint8_t *)new_recursive.ovec_save - sizeof(ovecsave_frame *));
+ fr->next = mb->ovecsave_chain;
+ mb->ovecsave_chain = fr;
+ RRETURN(rrc);
+ }
+
+ RECURSION_MATCHED:
+ break;
+
+ /* An alternation is the end of a branch; scan along to find the end of the
+ bracketed group and go to there. */
+
+ case OP_ALT:
+ do ecode += GET(ecode,1); while (*ecode == OP_ALT);
+ break;
+
+ /* BRAZERO, BRAMINZERO and SKIPZERO occur just before a bracket group,
+ indicating that it may occur zero times. It may repeat infinitely, or not
+ at all - i.e. it could be ()* or ()? or even (){0} in the pattern. Brackets
+ with fixed upper repeat limits are compiled as a number of copies, with the
+ optional ones preceded by BRAZERO or BRAMINZERO. */
+
+ case OP_BRAZERO:
+ next_ecode = ecode + 1;
+ RMATCH(eptr, next_ecode, offset_top, mb, eptrb, RM10);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ do next_ecode += GET(next_ecode, 1); while (*next_ecode == OP_ALT);
+ ecode = next_ecode + 1 + LINK_SIZE;
+ break;
+
+ case OP_BRAMINZERO:
+ next_ecode = ecode + 1;
+ do next_ecode += GET(next_ecode, 1); while (*next_ecode == OP_ALT);
+ RMATCH(eptr, next_ecode + 1+LINK_SIZE, offset_top, mb, eptrb, RM11);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ ecode++;
+ break;
+
+ case OP_SKIPZERO:
+ next_ecode = ecode+1;
+ do next_ecode += GET(next_ecode,1); while (*next_ecode == OP_ALT);
+ ecode = next_ecode + 1 + LINK_SIZE;
+ break;
+
+ /* BRAPOSZERO occurs before a possessive bracket group. Don't do anything
+ here; just jump to the group, with allow_zero set TRUE. */
+
+ case OP_BRAPOSZERO:
+ op = *(++ecode);
+ allow_zero = TRUE;
+ if (op == OP_CBRAPOS || op == OP_SCBRAPOS) goto POSSESSIVE_CAPTURE;
+ goto POSSESSIVE_NON_CAPTURE;
+
+ /* End of a group, repeated or non-repeating. */
+
+ case OP_KET:
+ case OP_KETRMIN:
+ case OP_KETRMAX:
+ case OP_KETRPOS:
+ prev = ecode - GET(ecode, 1);
+
+ /* If this was a group that remembered the subject start, in order to break
+ infinite repeats of empty string matches, retrieve the subject start from
+ the chain. Otherwise, set it NULL. */
+
+ if (*prev >= OP_SBRA || *prev == OP_ONCE)
+ {
+ saved_eptr = eptrb->epb_saved_eptr; /* Value at start of group */
+ eptrb = eptrb->epb_prev; /* Backup to previous group */
+ }
+ else saved_eptr = NULL;
+
+ /* If we are at the end of an assertion group or a non-capturing atomic
+ group, stop matching and return MATCH_MATCH, but record the current high
+ water mark for use by positive assertions. We also need to record the match
+ start in case it was changed by \K. */
+
+ if ((*prev >= OP_ASSERT && *prev <= OP_ASSERTBACK_NOT) ||
+ *prev == OP_ONCE_NC)
+ {
+ mb->end_match_ptr = eptr; /* For ONCE_NC */
+ mb->end_offset_top = offset_top;
+ mb->start_match_ptr = mstart;
+ if (eptr > mb->last_used_ptr) mb->last_used_ptr = eptr;
+ RRETURN(MATCH_MATCH); /* Sets mb->mark */
+ }
+
+ /* For capturing groups we have to check the group number back at the start
+ and if necessary complete handling an extraction by setting the offsets and
+ bumping the high water mark. Whole-pattern recursion is coded as a recurse
+ into group 0, so it won't be picked up here. Instead, we catch it when the
+ OP_END is reached. Other recursion is handled here. We just have to record
+ the current subject position and start match pointer and give a MATCH
+ return. */
+
+ if (*prev == OP_CBRA || *prev == OP_SCBRA ||
+ *prev == OP_CBRAPOS || *prev == OP_SCBRAPOS)
+ {
+ number = GET2(prev, 1+LINK_SIZE);
+ offset = number << 1;
+
+ /* Handle a recursively called group. */
+
+ if (mb->recursive != NULL && mb->recursive->group_num == number)
+ {
+ mb->end_match_ptr = eptr;
+ mb->start_match_ptr = mstart;
+ if (eptr > mb->last_used_ptr) mb->last_used_ptr = eptr;
+ RRETURN(MATCH_MATCH);
+ }
+
+ /* Deal with capturing */
+
+ mb->capture_last = (mb->capture_last & OVFLMASK) | number;
+ if (offset >= mb->offset_max) mb->capture_last |= OVFLBIT; else
+ {
+ /* If offset is greater than offset_top, it means that we are
+ "skipping" a capturing group, and that group's offsets must be marked
+ unset. In earlier versions of PCRE, all the offsets were unset at the
+ start of matching, but this doesn't work because atomic groups and
+ assertions can cause a value to be set that should later be unset.
+ Example: matching /(?>(a))b|(a)c/ against "ac". This sets group 1 as
+ part of the atomic group, but this is not on the final matching path,
+ so must be unset when 2 is set. (If there is no group 2, there is no
+ problem, because offset_top will then be 2, indicating no capture.) */
+
+ if (offset > offset_top)
+ {
+ PCRE2_SIZE *iptr = mb->ovector + offset_top;
+ PCRE2_SIZE *iend = mb->ovector + offset;
+ while (iptr < iend) *iptr++ = PCRE2_UNSET;
+ }
+
+ /* Now make the extraction */
+
+ mb->ovector[offset] = mb->ovector[mb->offset_end - number];
+ mb->ovector[offset+1] = eptr - mb->start_subject;
+ if (offset_top <= offset) offset_top = offset + 2;
+ }
+ }
+
+ /* OP_KETRPOS is a possessive repeating ket. Remember the current position,
+ and return the MATCH_KETRPOS. This makes it possible to do the repeats one
+ at a time from the outer level, thus saving stack. This must precede the
+ empty string test - in this case that test is done at the outer level. */
+
+ if (*ecode == OP_KETRPOS)
+ {
+ mb->start_match_ptr = mstart; /* In case \K reset it */
+ mb->end_match_ptr = eptr;
+ mb->end_offset_top = offset_top;
+ if (eptr > mb->last_used_ptr) mb->last_used_ptr = eptr;
+ RRETURN(MATCH_KETRPOS);
+ }
+
+ /* For an ordinary non-repeating ket, just continue at this level. This
+ also happens for a repeating ket if no characters were matched in the
+ group. This is the forcible breaking of infinite loops as implemented in
+ Perl 5.005. For a non-repeating atomic group that includes captures,
+ establish a backup point by processing the rest of the pattern at a lower
+ level. If this results in a NOMATCH return, pass MATCH_ONCE back to the
+ original OP_ONCE level, thereby bypassing intermediate backup points, but
+ resetting any captures that happened along the way. */
+
+ if (*ecode == OP_KET || eptr == saved_eptr)
+ {
+ if (*prev == OP_ONCE)
+ {
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, mb, eptrb, RM12);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ mb->once_target = prev; /* Level at which to change to MATCH_NOMATCH */
+ RRETURN(MATCH_ONCE);
+ }
+ ecode += 1 + LINK_SIZE; /* Carry on at this level */
+ break;
+ }
+
+ /* The normal repeating kets try the rest of the pattern or restart from
+ the preceding bracket, in the appropriate order. In the second case, we can
+ use tail recursion to avoid using another stack frame, unless we have an
+ an atomic group or an unlimited repeat of a group that can match an empty
+ string. */
+
+ if (*ecode == OP_KETRMIN)
+ {
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, mb, eptrb, RM7);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (*prev == OP_ONCE)
+ {
+ RMATCH(eptr, prev, offset_top, mb, eptrb, RM8);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ mb->once_target = prev; /* Level at which to change to MATCH_NOMATCH */
+ RRETURN(MATCH_ONCE);
+ }
+ if (*prev >= OP_SBRA) /* Could match an empty string */
+ {
+ RMATCH(eptr, prev, offset_top, mb, eptrb, RM50);
+ RRETURN(rrc);
+ }
+ ecode = prev;
+ goto TAIL_RECURSE;
+ }
+ else /* OP_KETRMAX */
+ {
+ RMATCH(eptr, prev, offset_top, mb, eptrb, RM13);
+ if (rrc == MATCH_ONCE && mb->once_target == prev) rrc = MATCH_NOMATCH;
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (*prev == OP_ONCE)
+ {
+ RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, mb, eptrb, RM9);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ mb->once_target = prev;
+ RRETURN(MATCH_ONCE);
+ }
+ ecode += 1 + LINK_SIZE;
+ goto TAIL_RECURSE;
+ }
+ /* Control never gets here */
+
+ /* Not multiline mode: start of subject assertion, unless notbol. */
+
+ case OP_CIRC:
+ if ((mb->moptions & PCRE2_NOTBOL) != 0 && eptr == mb->start_subject)
+ RRETURN(MATCH_NOMATCH);
+
+ /* Start of subject assertion */
+
+ case OP_SOD:
+ if (eptr != mb->start_subject) RRETURN(MATCH_NOMATCH);
+ ecode++;
+ break;
+
+ /* Multiline mode: start of subject unless notbol, or after any newline
+ except for one at the very end, unless PCRE2_ALT_CIRCUMFLEX is set. */
+
+ case OP_CIRCM:
+ if ((mb->moptions & PCRE2_NOTBOL) != 0 && eptr == mb->start_subject)
+ RRETURN(MATCH_NOMATCH);
+ if (eptr != mb->start_subject &&
+ ((eptr == mb->end_subject &&
+ (mb->poptions & PCRE2_ALT_CIRCUMFLEX) == 0) ||
+ !WAS_NEWLINE(eptr)))
+ RRETURN(MATCH_NOMATCH);
+ ecode++;
+ break;
+
+ /* Start of match assertion */
+
+ case OP_SOM:
+ if (eptr != mb->start_subject + mb->start_offset) RRETURN(MATCH_NOMATCH);
+ ecode++;
+ break;
+
+ /* Reset the start of match point */
+
+ case OP_SET_SOM:
+ mstart = eptr;
+ ecode++;
+ break;
+
+ /* Multiline mode: assert before any newline, or before end of subject
+ unless noteol is set. */
+
+ case OP_DOLLM:
+ if (eptr < mb->end_subject)
+ {
+ if (!IS_NEWLINE(eptr))
+ {
+ if (mb->partial != 0 &&
+ eptr + 1 >= mb->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ UCHAR21TEST(eptr) == NLBLOCK->nl[0])
+ {
+ mb->hitend = TRUE;
+ if (mb->partial > 1) RRETURN(PCRE2_ERROR_PARTIAL);
+ }
+ RRETURN(MATCH_NOMATCH);
+ }
+ }
+ else
+ {
+ if ((mb->moptions & PCRE2_NOTEOL) != 0) RRETURN(MATCH_NOMATCH);
+ SCHECK_PARTIAL();
+ }
+ ecode++;
+ break;
+
+ /* Not multiline mode: assert before a terminating newline or before end of
+ subject unless noteol is set. */
+
+ case OP_DOLL:
+ if ((mb->moptions & PCRE2_NOTEOL) != 0) RRETURN(MATCH_NOMATCH);
+ if ((mb->poptions & PCRE2_DOLLAR_ENDONLY) == 0) goto ASSERT_NL_OR_EOS;
+
+ /* ... else fall through for endonly */
+
+ /* End of subject assertion (\z) */
+
+ case OP_EOD:
+ if (eptr < mb->end_subject) RRETURN(MATCH_NOMATCH);
+ SCHECK_PARTIAL();
+ ecode++;
+ break;
+
+ /* End of subject or ending \n assertion (\Z) */
+
+ case OP_EODN:
+ ASSERT_NL_OR_EOS:
+ if (eptr < mb->end_subject &&
+ (!IS_NEWLINE(eptr) || eptr != mb->end_subject - mb->nllen))
+ {
+ if (mb->partial != 0 &&
+ eptr + 1 >= mb->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ UCHAR21TEST(eptr) == NLBLOCK->nl[0])
+ {
+ mb->hitend = TRUE;
+ if (mb->partial > 1) RRETURN(PCRE2_ERROR_PARTIAL);
+ }
+ RRETURN(MATCH_NOMATCH);
+ }
+
+ /* Either at end of string or \n before end. */
+
+ SCHECK_PARTIAL();
+ ecode++;
+ break;
+
+ /* Word boundary assertions */
+
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ {
+
+ /* Find out if the previous and current characters are "word" characters.
+ It takes a bit more work in UTF-8 mode. Characters > 255 are assumed to
+ be "non-word" characters. Remember the earliest consulted character for
+ partial matching. */
+
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ /* Get status of previous character */
+
+ if (eptr == mb->start_subject) prev_is_word = FALSE; else
+ {
+ PCRE2_SPTR lastptr = eptr - 1;
+ BACKCHAR(lastptr);
+ if (lastptr < mb->start_used_ptr) mb->start_used_ptr = lastptr;
+ GETCHAR(c, lastptr);
+ if ((mb->poptions & PCRE2_UCP) != 0)
+ {
+ if (c == '_') prev_is_word = TRUE; else
+ {
+ int cat = UCD_CATEGORY(c);
+ prev_is_word = (cat == ucp_L || cat == ucp_N);
+ }
+ }
+ else
+ prev_is_word = c < 256 && (mb->ctypes[c] & ctype_word) != 0;
+ }
+
+ /* Get status of next character */
+
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ cur_is_word = FALSE;
+ }
+ else
+ {
+ PCRE2_SPTR nextptr = eptr + 1;
+ FORWARDCHARTEST(nextptr, mb->end_subject);
+ if (nextptr > mb->last_used_ptr) mb->last_used_ptr = nextptr;
+ GETCHAR(c, eptr);
+ if ((mb->poptions & PCRE2_UCP) != 0)
+ {
+ if (c == '_') cur_is_word = TRUE; else
+ {
+ int cat = UCD_CATEGORY(c);
+ cur_is_word = (cat == ucp_L || cat == ucp_N);
+ }
+ }
+ else
+ cur_is_word = c < 256 && (mb->ctypes[c] & ctype_word) != 0;
+ }
+ }
+ else
+#endif /* SUPPORT UTF */
+
+ /* Not in UTF-8 mode, but we may still have PCRE2_UCP set, and for
+ consistency with the behaviour of \w we do use it in this case. */
+
+ {
+ /* Get status of previous character */
+
+ if (eptr == mb->start_subject) prev_is_word = FALSE; else
+ {
+ if (eptr <= mb->start_used_ptr) mb->start_used_ptr = eptr - 1;
+#ifdef SUPPORT_UNICODE
+ if ((mb->poptions & PCRE2_UCP) != 0)
+ {
+ c = eptr[-1];
+ if (c == '_') prev_is_word = TRUE; else
+ {
+ int cat = UCD_CATEGORY(c);
+ prev_is_word = (cat == ucp_L || cat == ucp_N);
+ }
+ }
+ else
+#endif
+ prev_is_word = MAX_255(eptr[-1])
+ && ((mb->ctypes[eptr[-1]] & ctype_word) != 0);
+ }
+
+ /* Get status of next character */
+
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ cur_is_word = FALSE;
+ }
+ else
+ {
+ if (eptr >= mb->last_used_ptr) mb->last_used_ptr = eptr + 1;
+#ifdef SUPPORT_UNICODE
+ if ((mb->poptions & PCRE2_UCP) != 0)
+ {
+ c = *eptr;
+ if (c == '_') cur_is_word = TRUE; else
+ {
+ int cat = UCD_CATEGORY(c);
+ cur_is_word = (cat == ucp_L || cat == ucp_N);
+ }
+ }
+ else
+#endif
+ cur_is_word = MAX_255(*eptr)
+ && ((mb->ctypes[*eptr] & ctype_word) != 0);
+ }
+ }
+
+ /* Now see if the situation is what we want */
+
+ if ((*ecode++ == OP_WORD_BOUNDARY)?
+ cur_is_word == prev_is_word : cur_is_word != prev_is_word)
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ /* Match any single character type except newline; have to take care with
+ CRLF newlines and partial matching. */
+
+ case OP_ANY:
+ if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
+ if (mb->partial != 0 &&
+ eptr == mb->end_subject - 1 &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ UCHAR21TEST(eptr) == NLBLOCK->nl[0])
+ {
+ mb->hitend = TRUE;
+ if (mb->partial > 1) RRETURN(PCRE2_ERROR_PARTIAL);
+ }
+
+ /* Fall through */
+
+ /* Match any single character whatsoever. */
+
+ case OP_ALLANY:
+ if (eptr >= mb->end_subject) /* DO NOT merge the eptr++ here; it must */
+ { /* not be updated before SCHECK_PARTIAL. */
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ eptr++;
+#ifdef SUPPORT_UNICODE
+ if (utf) ACROSSCHAR(eptr < mb->end_subject, *eptr, eptr++);
+#endif
+ ecode++;
+ break;
+
+ /* Match a single code unit, even in UTF-8 mode. This opcode really does
+ match any code unit, even newline. (It really should be called ANYCODEUNIT,
+ of course - the byte name is from pre-16 bit days.) */
+
+ case OP_ANYBYTE:
+ if (eptr >= mb->end_subject) /* DO NOT merge the eptr++ here; it must */
+ { /* not be updated before SCHECK_PARTIAL. */
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ eptr++;
+ ecode++;
+ break;
+
+ case OP_NOT_DIGIT:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if (
+#ifdef SUPPORT_WIDE_CHARS
+ c < 256 &&
+#endif
+ (mb->ctypes[c] & ctype_digit) != 0
+ )
+ RRETURN(MATCH_NOMATCH);
+ ecode++;
+ break;
+
+ case OP_DIGIT:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if (
+#ifdef SUPPORT_WIDE_CHARS
+ c > 255 ||
+#endif
+ (mb->ctypes[c] & ctype_digit) == 0
+ )
+ RRETURN(MATCH_NOMATCH);
+ ecode++;
+ break;
+
+ case OP_NOT_WHITESPACE:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if (
+#ifdef SUPPORT_WIDE_CHARS
+ c < 256 &&
+#endif
+ (mb->ctypes[c] & ctype_space) != 0
+ )
+ RRETURN(MATCH_NOMATCH);
+ ecode++;
+ break;
+
+ case OP_WHITESPACE:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if (
+#ifdef SUPPORT_WIDE_CHARS
+ c > 255 ||
+#endif
+ (mb->ctypes[c] & ctype_space) == 0
+ )
+ RRETURN(MATCH_NOMATCH);
+ ecode++;
+ break;
+
+ case OP_NOT_WORDCHAR:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if (
+#ifdef SUPPORT_WIDE_CHARS
+ c < 256 &&
+#endif
+ (mb->ctypes[c] & ctype_word) != 0
+ )
+ RRETURN(MATCH_NOMATCH);
+ ecode++;
+ break;
+
+ case OP_WORDCHAR:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if (
+#ifdef SUPPORT_WIDE_CHARS
+ c > 255 ||
+#endif
+ (mb->ctypes[c] & ctype_word) == 0
+ )
+ RRETURN(MATCH_NOMATCH);
+ ecode++;
+ break;
+
+ case OP_ANYNL:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ switch(c)
+ {
+ default: RRETURN(MATCH_NOMATCH);
+
+ case CHAR_CR:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ }
+ else if (UCHAR21TEST(eptr) == CHAR_LF) eptr++;
+ break;
+
+ case CHAR_LF:
+ break;
+
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#ifndef EBCDIC
+ case 0x2028:
+ case 0x2029:
+#endif /* Not EBCDIC */
+ if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) RRETURN(MATCH_NOMATCH);
+ break;
+ }
+ ecode++;
+ break;
+
+ case OP_NOT_HSPACE:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ switch(c)
+ {
+ HSPACE_CASES: RRETURN(MATCH_NOMATCH); /* Byte and multibyte cases */
+ default: break;
+ }
+ ecode++;
+ break;
+
+ case OP_HSPACE:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ switch(c)
+ {
+ HSPACE_CASES: break; /* Byte and multibyte cases */
+ default: RRETURN(MATCH_NOMATCH);
+ }
+ ecode++;
+ break;
+
+ case OP_NOT_VSPACE:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ switch(c)
+ {
+ VSPACE_CASES: RRETURN(MATCH_NOMATCH);
+ default: break;
+ }
+ ecode++;
+ break;
+
+ case OP_VSPACE:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ switch(c)
+ {
+ VSPACE_CASES: break;
+ default: RRETURN(MATCH_NOMATCH);
+ }
+ ecode++;
+ break;
+
+#ifdef SUPPORT_UNICODE
+ /* Check the next character by Unicode property. We will get here only
+ if the support is in the binary; otherwise a compile-time error occurs. */
+
+ case OP_PROP:
+ case OP_NOTPROP:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ {
+ const uint32_t *cp;
+ const ucd_record *prop = GET_UCD(c);
+
+ switch(ecode[1])
+ {
+ case PT_ANY:
+ if (op == OP_NOTPROP) RRETURN(MATCH_NOMATCH);
+ break;
+
+ case PT_LAMP:
+ if ((prop->chartype == ucp_Lu ||
+ prop->chartype == ucp_Ll ||
+ prop->chartype == ucp_Lt) == (op == OP_NOTPROP))
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case PT_GC:
+ if ((ecode[2] != PRIV(ucp_gentype)[prop->chartype]) == (op == OP_PROP))
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case PT_PC:
+ if ((ecode[2] != prop->chartype) == (op == OP_PROP))
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case PT_SC:
+ if ((ecode[2] != prop->script) == (op == OP_PROP))
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ /* These are specials */
+
+ case PT_ALNUM:
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N) == (op == OP_NOTPROP))
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ /* Perl space used to exclude VT, but from Perl 5.18 it is included,
+ which means that Perl space and POSIX space are now identical. PCRE
+ was changed at release 8.34. */
+
+ case PT_SPACE: /* Perl space */
+ case PT_PXSPACE: /* POSIX space */
+ switch(c)
+ {
+ HSPACE_CASES:
+ VSPACE_CASES:
+ if (op == OP_NOTPROP) RRETURN(MATCH_NOMATCH);
+ break;
+
+ default:
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z) ==
+ (op == OP_NOTPROP)) RRETURN(MATCH_NOMATCH);
+ break;
+ }
+ break;
+
+ case PT_WORD:
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N ||
+ c == CHAR_UNDERSCORE) == (op == OP_NOTPROP))
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case PT_CLIST:
+ cp = PRIV(ucd_caseless_sets) + ecode[2];
+ for (;;)
+ {
+ if (c < *cp)
+ { if (op == OP_PROP) { RRETURN(MATCH_NOMATCH); } else break; }
+ if (c == *cp++)
+ { if (op == OP_PROP) break; else { RRETURN(MATCH_NOMATCH); } }
+ }
+ break;
+
+ case PT_UCNC:
+ if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000) == (op == OP_NOTPROP))
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ /* This should never occur */
+
+ default:
+ RRETURN(PCRE2_ERROR_INTERNAL);
+ }
+
+ ecode += 3;
+ }
+ break;
+
+ /* Match an extended Unicode sequence. We will get here only if the support
+ is in the binary; otherwise a compile-time error occurs. */
+
+ case OP_EXTUNI:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ else
+ {
+ int lgb, rgb;
+ GETCHARINCTEST(c, eptr);
+ lgb = UCD_GRAPHBREAK(c);
+ while (eptr < mb->end_subject)
+ {
+ int len = 1;
+ if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
+ rgb = UCD_GRAPHBREAK(c);
+ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
+ lgb = rgb;
+ eptr += len;
+ }
+ }
+ CHECK_PARTIAL();
+ ecode++;
+ break;
+#endif /* SUPPORT_UNICODE */
+
+
+ /* Match a back reference, possibly repeatedly. Look past the end of the
+ item to see if there is repeat information following.
+
+ The OP_REF and OP_REFI opcodes are used for a reference to a numbered group
+ or to a non-duplicated named group. For a duplicated named group, OP_DNREF
+ and OP_DNREFI are used. In this case we must scan the list of groups to
+ which the name refers, and use the first one that is set. */
+
+ case OP_DNREF:
+ case OP_DNREFI:
+ caseless = op == OP_DNREFI;
+ {
+ int count = GET2(ecode, 1+IMM2_SIZE);
+ PCRE2_SPTR slot = mb->name_table + GET2(ecode, 1) * mb->name_entry_size;
+ ecode += 1 + 2*IMM2_SIZE;
+
+ /* Initializing 'offset' avoids a compiler warning in the REF_REPEAT
+ code. */
+
+ offset = 0;
+ while (count-- > 0)
+ {
+ offset = GET2(slot, 0) << 1;
+ if (offset < offset_top && mb->ovector[offset] != PCRE2_UNSET) break;
+ slot += mb->name_entry_size;
+ }
+ }
+ goto REF_REPEAT;
+
+ case OP_REF:
+ case OP_REFI:
+ caseless = op == OP_REFI;
+ offset = GET2(ecode, 1) << 1; /* Doubled ref number */
+ ecode += 1 + IMM2_SIZE;
+
+ /* Set up for repetition, or handle the non-repeated case */
+
+ REF_REPEAT:
+ switch (*ecode)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ c = *ecode++ - OP_CRSTAR;
+ minimize = (c & 1) != 0;
+ min = rep_min[c]; /* Pick up values from tables; */
+ max = rep_max[c]; /* zero for max => infinity */
+ if (max == 0) max = INT_MAX;
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ minimize = (*ecode == OP_CRMINRANGE);
+ min = GET2(ecode, 1);
+ max = GET2(ecode, 1 + IMM2_SIZE);
+ if (max == 0) max = INT_MAX;
+ ecode += 1 + 2 * IMM2_SIZE;
+ break;
+
+ default: /* No repeat follows */
+ {
+ int rc = match_ref(offset, offset_top, eptr, mb, caseless, &length);
+ if (rc != 0)
+ {
+ if (rc > 0) eptr = mb->end_subject; /* Partial match */
+ CHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ }
+ eptr += length;
+ continue; /* With the main loop */
+ }
+
+ /* Handle repeated back references. If a set group has length zero, just
+ continue with the main loop, because it matches however many times. For an
+ unset reference, if the minimum is zero, we can also just continue. We an
+ also continue if PCRE2_MATCH_UNSET_BACKREF is set, because this makes unset
+ group be have as a zero-length group. For any other unset cases, carrying
+ on will result in NOMATCH. */
+
+ if (offset < offset_top && mb->ovector[offset] != PCRE2_UNSET)
+ {
+ if (mb->ovector[offset] == mb->ovector[offset + 1]) continue;
+ }
+ else /* Group is not set */
+ {
+ if (min == 0 || (mb->poptions & PCRE2_MATCH_UNSET_BACKREF) != 0)
+ continue;
+ }
+
+ /* First, ensure the minimum number of matches are present. */
+
+ for (i = 1; i <= min; i++)
+ {
+ PCRE2_SIZE slength;
+ int rc = match_ref(offset, offset_top, eptr, mb, caseless, &slength);
+ if (rc != 0)
+ {
+ if (rc > 0) eptr = mb->end_subject; /* Partial match */
+ CHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ eptr += slength;
+ }
+
+ /* If min = max, continue at the same level without recursion.
+ They are not both allowed to be zero. */
+
+ if (min == max) continue;
+
+ /* If minimizing, keep trying and advancing the pointer */
+
+ if (minimize)
+ {
+ for (fi = min;; fi++)
+ {
+ int rc;
+ PCRE2_SIZE slength;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM14);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ rc = match_ref(offset, offset_top, eptr, mb, caseless, &slength);
+ if (rc != 0)
+ {
+ if (rc > 0) eptr = mb->end_subject; /* Partial match */
+ CHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ eptr += slength;
+ }
+ /* Control never gets here */
+ }
+
+ /* If maximizing, find the longest string and work backwards, as long as
+ the matched lengths for each iteration are the same. */
+
+ else
+ {
+ BOOL samelengths = TRUE;
+ pp = eptr;
+ length = mb->ovector[offset+1] - mb->ovector[offset];
+
+ for (i = min; i < max; i++)
+ {
+ PCRE2_SIZE slength;
+ int rc = match_ref(offset, offset_top, eptr, mb, caseless, &slength);
+
+ if (rc != 0)
+ {
+ /* Can't use CHECK_PARTIAL because we don't want to update eptr in
+ the soft partial matching case. */
+
+ if (rc > 0 && mb->partial != 0 &&
+ mb->end_subject > mb->start_used_ptr)
+ {
+ mb->hitend = TRUE;
+ if (mb->partial > 1) RRETURN(PCRE2_ERROR_PARTIAL);
+ }
+ break;
+ }
+
+ if (slength != length) samelengths = FALSE;
+ eptr += slength;
+ }
+
+ /* If the length matched for each repetition is the same as the length of
+ the captured group, we can easily work backwards. This is the normal
+ case. However, in caseless UTF-8 mode there are pairs of case-equivalent
+ characters whose lengths (in terms of code units) differ. However, this
+ is very rare, so we handle it by re-matching fewer and fewer times. */
+
+ if (samelengths)
+ {
+ while (eptr >= pp)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM15);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr -= length;
+ }
+ }
+
+ /* The rare case of non-matching lengths. Re-scan the repetition for each
+ iteration. We know that match_ref() will succeed every time. */
+
+ else
+ {
+ max = i;
+ for (;;)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM68);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (eptr == pp) break; /* Failed after minimal repetition */
+ eptr = pp;
+ max--;
+ for (i = min; i < max; i++)
+ {
+ PCRE2_SIZE slength;
+ (void)match_ref(offset, offset_top, eptr, mb, caseless, &slength);
+ eptr += slength;
+ }
+ }
+ }
+
+ RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+
+ /* Match a bit-mapped character class, possibly repeatedly. This op code is
+ used when all the characters in the class have values in the range 0-255,
+ and either the matching is caseful, or the characters are in the range
+ 0-127 when UTF-8 processing is enabled. The only difference between
+ OP_CLASS and OP_NCLASS occurs when a data character outside the range is
+ encountered.
+
+ First, look past the end of the item to see if there is repeat information
+ following. Then obey similar code to character type repeats - written out
+ again for speed. */
+
+ case OP_NCLASS:
+ case OP_CLASS:
+ {
+ /* The data variable is saved across frames, so the byte map needs to
+ be stored there. */
+#define BYTE_MAP ((uint8_t *)data)
+ data = ecode + 1; /* Save for matching */
+ ecode += 1 + (32 / sizeof(PCRE2_UCHAR)); /* Advance past the item */
+
+ switch (*ecode)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ case OP_CRPOSSTAR:
+ case OP_CRPOSPLUS:
+ case OP_CRPOSQUERY:
+ c = *ecode++ - OP_CRSTAR;
+ if (c < OP_CRPOSSTAR - OP_CRSTAR) minimize = (c & 1) != 0;
+ else possessive = TRUE;
+ min = rep_min[c]; /* Pick up values from tables; */
+ max = rep_max[c]; /* zero for max => infinity */
+ if (max == 0) max = INT_MAX;
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ case OP_CRPOSRANGE:
+ minimize = (*ecode == OP_CRMINRANGE);
+ possessive = (*ecode == OP_CRPOSRANGE);
+ min = GET2(ecode, 1);
+ max = GET2(ecode, 1 + IMM2_SIZE);
+ if (max == 0) max = INT_MAX;
+ ecode += 1 + 2 * IMM2_SIZE;
+ break;
+
+ default: /* No repeat follows */
+ min = max = 1;
+ break;
+ }
+
+ /* First, ensure the minimum number of matches are present. */
+
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINC(c, eptr);
+ if (c > 255)
+ {
+ if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
+ }
+ else
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
+ }
+ }
+ else
+#endif
+ /* Not UTF mode */
+ {
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ c = *eptr++;
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ if (c > 255)
+ {
+ if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
+ }
+ else
+#endif
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
+ }
+ }
+
+ /* If max == min we can continue with the main loop without the
+ need to recurse. */
+
+ if (min == max) continue;
+
+ /* If minimizing, keep testing the rest of the expression and advancing
+ the pointer while it matches the class. */
+
+ if (minimize)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM16);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINC(c, eptr);
+ if (c > 255)
+ {
+ if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
+ }
+ else
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
+ }
+ }
+ else
+#endif
+ /* Not UTF mode */
+ {
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM17);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ c = *eptr++;
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ if (c > 255)
+ {
+ if (op == OP_CLASS) RRETURN(MATCH_NOMATCH);
+ }
+ else
+#endif
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) RRETURN(MATCH_NOMATCH);
+ }
+ }
+ /* Control never gets here */
+ }
+
+ /* If maximizing, find the longest possible run, then work backwards. */
+
+ else
+ {
+ pp = eptr;
+
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLEN(c, eptr, len);
+ if (c > 255)
+ {
+ if (op == OP_CLASS) break;
+ }
+ else
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) break;
+ eptr += len;
+ }
+
+ if (possessive) continue; /* No backtracking */
+
+ for (;;)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM18);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (eptr-- == pp) break; /* Stop if tried at original pos */
+ BACKCHAR(eptr);
+ }
+ }
+ else
+#endif
+ /* Not UTF mode */
+ {
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ c = *eptr;
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ if (c > 255)
+ {
+ if (op == OP_CLASS) break;
+ }
+ else
+#endif
+ if ((BYTE_MAP[c/8] & (1 << (c&7))) == 0) break;
+ eptr++;
+ }
+
+ if (possessive) continue; /* No backtracking */
+
+ while (eptr >= pp)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM19);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr--;
+ }
+ }
+
+ RRETURN(MATCH_NOMATCH);
+ }
+#undef BYTE_MAP
+ }
+ /* Control never gets here */
+
+
+ /* Match an extended character class. In the 8-bit library, this opcode is
+ encountered only when UTF-8 mode mode is supported. In the 16-bit and
+ 32-bit libraries, codepoints greater than 255 may be encountered even when
+ UTF is not supported. */
+
+#ifdef SUPPORT_WIDE_CHARS
+ case OP_XCLASS:
+ {
+ data = ecode + 1 + LINK_SIZE; /* Save for matching */
+ ecode += GET(ecode, 1); /* Advance past the item */
+
+ switch (*ecode)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ case OP_CRPOSSTAR:
+ case OP_CRPOSPLUS:
+ case OP_CRPOSQUERY:
+ c = *ecode++ - OP_CRSTAR;
+ if (c < OP_CRPOSSTAR - OP_CRSTAR) minimize = (c & 1) != 0;
+ else possessive = TRUE;
+ min = rep_min[c]; /* Pick up values from tables; */
+ max = rep_max[c]; /* zero for max => infinity */
+ if (max == 0) max = INT_MAX;
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ case OP_CRPOSRANGE:
+ minimize = (*ecode == OP_CRMINRANGE);
+ possessive = (*ecode == OP_CRPOSRANGE);
+ min = GET2(ecode, 1);
+ max = GET2(ecode, 1 + IMM2_SIZE);
+ if (max == 0) max = INT_MAX;
+ ecode += 1 + 2 * IMM2_SIZE;
+ break;
+
+ default: /* No repeat follows */
+ min = max = 1;
+ break;
+ }
+
+ /* First, ensure the minimum number of matches are present. */
+
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if (!PRIV(xclass)(c, data, utf)) RRETURN(MATCH_NOMATCH);
+ }
+
+ /* If max == min we can continue with the main loop without the
+ need to recurse. */
+
+ if (min == max) continue;
+
+ /* If minimizing, keep testing the rest of the expression and advancing
+ the pointer while it matches the class. */
+
+ if (minimize)
+ {
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM20);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if (!PRIV(xclass)(c, data, utf)) RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+ }
+
+ /* If maximizing, find the longest possible run, then work backwards. */
+
+ else
+ {
+ pp = eptr;
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+#ifdef SUPPORT_UNICODE
+ GETCHARLENTEST(c, eptr, len);
+#else
+ c = *eptr;
+#endif
+ if (!PRIV(xclass)(c, data, utf)) break;
+ eptr += len;
+ }
+
+ if (possessive) continue; /* No backtracking */
+
+ for(;;)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM21);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (eptr-- == pp) break; /* Stop if tried at original pos */
+#ifdef SUPPORT_UNICODE
+ if (utf) BACKCHAR(eptr);
+#endif
+ }
+ RRETURN(MATCH_NOMATCH);
+ }
+
+ /* Control never gets here */
+ }
+#endif /* End of XCLASS */
+
+ /* Match a single character, casefully */
+
+ case OP_CHAR:
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ length = 1;
+ ecode++;
+ GETCHARLEN(fc, ecode, length);
+ if (length > (PCRE2_SIZE)(mb->end_subject - eptr))
+ {
+ CHECK_PARTIAL(); /* Not SCHECK_PARTIAL() */
+ RRETURN(MATCH_NOMATCH);
+ }
+ for (; length > 0; length--)
+ {
+ if (*ecode++ != UCHAR21INC(eptr)) RRETURN(MATCH_NOMATCH);
+ }
+ }
+ else
+#endif
+ /* Not UTF mode */
+ {
+ if (mb->end_subject - eptr < 1)
+ {
+ SCHECK_PARTIAL(); /* This one can use SCHECK_PARTIAL() */
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (ecode[1] != *eptr++) RRETURN(MATCH_NOMATCH);
+ ecode += 2;
+ }
+ break;
+
+ /* Match a single character, caselessly. If we are at the end of the
+ subject, give up immediately. */
+
+ case OP_CHARI:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ length = 1;
+ ecode++;
+ GETCHARLEN(fc, ecode, length);
+
+ /* If the pattern character's value is < 128, we have only one byte, and
+ we know that its other case must also be one byte long, so we can use the
+ fast lookup table. We know that there is at least one byte left in the
+ subject. */
+
+ if (fc < 128)
+ {
+ uint32_t cc = UCHAR21(eptr);
+ if (mb->lcc[fc] != TABLE_GET(cc, mb->lcc, cc)) RRETURN(MATCH_NOMATCH);
+ ecode++;
+ eptr++;
+ }
+
+ /* Otherwise we must pick up the subject character. Note that we cannot
+ use the value of "length" to check for sufficient bytes left, because the
+ other case of the character may have more or fewer bytes. */
+
+ else
+ {
+ uint32_t dc;
+ GETCHARINC(dc, eptr);
+ ecode += length;
+
+ /* If we have Unicode property support, we can use it to test the other
+ case of the character, if there is one. */
+
+ if (fc != dc)
+ {
+#ifdef SUPPORT_UNICODE
+ if (dc != UCD_OTHERCASE(fc))
+#endif
+ RRETURN(MATCH_NOMATCH);
+ }
+ }
+ }
+ else
+#endif /* SUPPORT_UNICODE */
+
+ /* Not UTF mode */
+ {
+ if (TABLE_GET(ecode[1], mb->lcc, ecode[1])
+ != TABLE_GET(*eptr, mb->lcc, *eptr)) RRETURN(MATCH_NOMATCH);
+ eptr++;
+ ecode += 2;
+ }
+ break;
+
+ /* Match a single character repeatedly. */
+
+ case OP_EXACT:
+ case OP_EXACTI:
+ min = max = GET2(ecode, 1);
+ ecode += 1 + IMM2_SIZE;
+ goto REPEATCHAR;
+
+ case OP_POSUPTO:
+ case OP_POSUPTOI:
+ possessive = TRUE;
+ /* Fall through */
+
+ case OP_UPTO:
+ case OP_UPTOI:
+ case OP_MINUPTO:
+ case OP_MINUPTOI:
+ min = 0;
+ max = GET2(ecode, 1);
+ minimize = *ecode == OP_MINUPTO || *ecode == OP_MINUPTOI;
+ ecode += 1 + IMM2_SIZE;
+ goto REPEATCHAR;
+
+ case OP_POSSTAR:
+ case OP_POSSTARI:
+ possessive = TRUE;
+ min = 0;
+ max = INT_MAX;
+ ecode++;
+ goto REPEATCHAR;
+
+ case OP_POSPLUS:
+ case OP_POSPLUSI:
+ possessive = TRUE;
+ min = 1;
+ max = INT_MAX;
+ ecode++;
+ goto REPEATCHAR;
+
+ case OP_POSQUERY:
+ case OP_POSQUERYI:
+ possessive = TRUE;
+ min = 0;
+ max = 1;
+ ecode++;
+ goto REPEATCHAR;
+
+ case OP_STAR:
+ case OP_STARI:
+ case OP_MINSTAR:
+ case OP_MINSTARI:
+ case OP_PLUS:
+ case OP_PLUSI:
+ case OP_MINPLUS:
+ case OP_MINPLUSI:
+ case OP_QUERY:
+ case OP_QUERYI:
+ case OP_MINQUERY:
+ case OP_MINQUERYI:
+ c = *ecode++ - ((op < OP_STARI)? OP_STAR : OP_STARI);
+ minimize = (c & 1) != 0;
+ min = rep_min[c]; /* Pick up values from tables; */
+ max = rep_max[c]; /* zero for max => infinity */
+ if (max == 0) max = INT_MAX;
+
+ /* Common code for all repeated single-character matches. We first check
+ for the minimum number of characters. If the minimum equals the maximum, we
+ are done. Otherwise, if minimizing, check the rest of the pattern for a
+ match; if there isn't one, advance up to the maximum, one character at a
+ time.
+
+ If maximizing, advance up to the maximum number of matching characters,
+ until eptr is past the end of the maximum run. If possessive, we are
+ then done (no backing up). Otherwise, match at this position; anything
+ other than no match is immediately returned. For nomatch, back up one
+ character, unless we are matching \R and the last thing matched was
+ \r\n, in which case, back up two bytes. When we reach the first optional
+ character position, we can save stack by doing a tail recurse.
+
+ The various UTF/non-UTF and caseful/caseless cases are handled separately,
+ for speed. */
+
+ REPEATCHAR:
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ length = 1;
+ charptr = ecode;
+ GETCHARLEN(fc, ecode, length);
+ ecode += length;
+
+ /* Handle multibyte character matching specially here. There is
+ support for caseless matching if UCP support is present. */
+
+ if (length > 1)
+ {
+ uint32_t othercase;
+ if (op >= OP_STARI && /* Caseless */
+ (othercase = UCD_OTHERCASE(fc)) != fc)
+ oclength = PRIV(ord2utf)(othercase, occhars);
+ else oclength = 0;
+
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr <= mb->end_subject - length &&
+ memcmp(eptr, charptr, CU2BYTES(length)) == 0) eptr += length;
+ else if (oclength > 0 &&
+ eptr <= mb->end_subject - oclength &&
+ memcmp(eptr, occhars, CU2BYTES(oclength)) == 0) eptr += oclength;
+ else
+ {
+ CHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ }
+
+ if (min == max) continue;
+
+ if (minimize)
+ {
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM22);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr <= mb->end_subject - length &&
+ memcmp(eptr, charptr, CU2BYTES(length)) == 0) eptr += length;
+ else if (oclength > 0 &&
+ eptr <= mb->end_subject - oclength &&
+ memcmp(eptr, occhars, CU2BYTES(oclength)) == 0) eptr += oclength;
+ else
+ {
+ CHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ }
+ /* Control never gets here */
+ }
+
+ else /* Maximize */
+ {
+ pp = eptr;
+ for (i = min; i < max; i++)
+ {
+ if (eptr <= mb->end_subject - length &&
+ memcmp(eptr, charptr, CU2BYTES(length)) == 0) eptr += length;
+ else if (oclength > 0 &&
+ eptr <= mb->end_subject - oclength &&
+ memcmp(eptr, occhars, CU2BYTES(oclength)) == 0) eptr += oclength;
+ else
+ {
+ CHECK_PARTIAL();
+ break;
+ }
+ }
+
+ if (possessive) continue; /* No backtracking */
+
+ /* After \C in UTF mode, pp might be in the middle of a Unicode
+ character. Use <= pp to ensure backtracking doesn't go too far. */
+
+ for(;;)
+ {
+ if (eptr <= pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM23);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr--;
+ BACKCHAR(eptr);
+ }
+ }
+ /* Control never gets here */
+ }
+
+ /* If the length of a UTF-8 character is 1, we fall through here, and
+ obey the code as for non-UTF-8 characters below, though in this case the
+ value of fc will always be < 128. */
+ }
+ else
+#endif /* SUPPORT_UNICODE */
+
+ /* When not in UTF-8 mode, load a single-byte character. */
+ fc = *ecode++;
+
+ /* The value of fc at this point is always one character, though we may
+ or may not be in UTF mode. The code is duplicated for the caseless and
+ caseful cases, for speed, since matching characters is likely to be quite
+ common. First, ensure the minimum number of matches are present. If min =
+ max, continue at the same level without recursing. Otherwise, if
+ minimizing, keep trying the rest of the expression and advancing one
+ matching character if failing, up to the maximum. Alternatively, if
+ maximizing, find the maximum number of characters and work backwards. */
+
+ if (op >= OP_STARI) /* Caseless */
+ {
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ /* fc must be < 128 if UTF is enabled. */
+ foc = mb->fcc[fc];
+#else
+#ifdef SUPPORT_UNICODE
+ if (utf && fc > 127)
+ foc = UCD_OTHERCASE(fc);
+ else
+#endif /* SUPPORT_UNICODE */
+ foc = TABLE_GET(fc, mb->fcc, fc);
+#endif /* PCRE2_CODE_UNIT_WIDTH == 8 */
+
+ for (i = 1; i <= min; i++)
+ {
+ uint32_t cc; /* Faster than PCRE2_UCHAR */
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ cc = UCHAR21TEST(eptr);
+ if (fc != cc && foc != cc) RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
+ if (min == max) continue;
+ if (minimize)
+ {
+ for (fi = min;; fi++)
+ {
+ uint32_t cc; /* Faster than PCRE2_UCHAR */
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM24);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ cc = UCHAR21TEST(eptr);
+ if (fc != cc && foc != cc) RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
+ /* Control never gets here */
+ }
+ else /* Maximize */
+ {
+ pp = eptr;
+ for (i = min; i < max; i++)
+ {
+ uint32_t cc; /* Faster than PCRE2_UCHAR */
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ cc = UCHAR21TEST(eptr);
+ if (fc != cc && foc != cc) break;
+ eptr++;
+ }
+ if (possessive) continue; /* No backtracking */
+ for (;;)
+ {
+ if (eptr == pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM25);
+ eptr--;
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ }
+ /* Control never gets here */
+ }
+ }
+
+ /* Caseful comparisons (includes all multi-byte characters) */
+
+ else
+ {
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (fc != UCHAR21INCTEST(eptr)) RRETURN(MATCH_NOMATCH);
+ }
+
+ if (min == max) continue;
+
+ if (minimize)
+ {
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM26);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (fc != UCHAR21INCTEST(eptr)) RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+ }
+ else /* Maximize */
+ {
+ pp = eptr;
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ if (fc != UCHAR21TEST(eptr)) break;
+ eptr++;
+ }
+ if (possessive) continue; /* No backtracking */
+ for (;;)
+ {
+ if (eptr == pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM27);
+ eptr--;
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ }
+ /* Control never gets here */
+ }
+ }
+ /* Control never gets here */
+
+ /* Match a negated single one-byte character. The character we are
+ checking can be multibyte. */
+
+ case OP_NOT:
+ case OP_NOTI:
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ uint32_t ch, och;
+
+ ecode++;
+ GETCHARINC(ch, ecode);
+ GETCHARINC(c, eptr);
+
+ if (op == OP_NOT)
+ {
+ if (ch == c) RRETURN(MATCH_NOMATCH);
+ }
+ else
+ {
+ if (ch > 127)
+ och = UCD_OTHERCASE(ch);
+ else
+ och = TABLE_GET(ch, mb->fcc, ch);
+ if (ch == c || och == c) RRETURN(MATCH_NOMATCH);
+ }
+ }
+ else
+#endif /* SUPPORT_UNICODE */
+ {
+ uint32_t ch = ecode[1];
+ c = *eptr++;
+ if (ch == c || (op == OP_NOTI && TABLE_GET(ch, mb->fcc, ch) == c))
+ RRETURN(MATCH_NOMATCH);
+ ecode += 2;
+ }
+ break;
+
+ /* Match a negated single one-byte character repeatedly. This is almost a
+ repeat of the code for a repeated single character, but I haven't found a
+ nice way of commoning these up that doesn't require a test of the
+ positive/negative option for each character match. Maybe that wouldn't add
+ very much to the time taken, but character matching *is* what this is all
+ about... */
+
+ case OP_NOTEXACT:
+ case OP_NOTEXACTI:
+ min = max = GET2(ecode, 1);
+ ecode += 1 + IMM2_SIZE;
+ goto REPEATNOTCHAR;
+
+ case OP_NOTUPTO:
+ case OP_NOTUPTOI:
+ case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
+ min = 0;
+ max = GET2(ecode, 1);
+ minimize = *ecode == OP_NOTMINUPTO || *ecode == OP_NOTMINUPTOI;
+ ecode += 1 + IMM2_SIZE;
+ goto REPEATNOTCHAR;
+
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
+ possessive = TRUE;
+ min = 0;
+ max = INT_MAX;
+ ecode++;
+ goto REPEATNOTCHAR;
+
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
+ possessive = TRUE;
+ min = 1;
+ max = INT_MAX;
+ ecode++;
+ goto REPEATNOTCHAR;
+
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSQUERYI:
+ possessive = TRUE;
+ min = 0;
+ max = 1;
+ ecode++;
+ goto REPEATNOTCHAR;
+
+ case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
+ possessive = TRUE;
+ min = 0;
+ max = GET2(ecode, 1);
+ ecode += 1 + IMM2_SIZE;
+ goto REPEATNOTCHAR;
+
+ case OP_NOTSTAR:
+ case OP_NOTSTARI:
+ case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
+ case OP_NOTPLUS:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
+ case OP_NOTQUERY:
+ case OP_NOTQUERYI:
+ case OP_NOTMINQUERY:
+ case OP_NOTMINQUERYI:
+ c = *ecode++ - ((op >= OP_NOTSTARI)? OP_NOTSTARI: OP_NOTSTAR);
+ minimize = (c & 1) != 0;
+ min = rep_min[c]; /* Pick up values from tables; */
+ max = rep_max[c]; /* zero for max => infinity */
+ if (max == 0) max = INT_MAX;
+
+ /* Common code for all repeated single-byte matches. */
+
+ REPEATNOTCHAR:
+ GETCHARINCTEST(fc, ecode);
+
+ /* The code is duplicated for the caseless and caseful cases, for speed,
+ since matching characters is likely to be quite common. First, ensure the
+ minimum number of matches are present. If min = max, continue at the same
+ level without recursing. Otherwise, if minimizing, keep trying the rest of
+ the expression and advancing one matching character if failing, up to the
+ maximum. Alternatively, if maximizing, find the maximum number of
+ characters and work backwards. */
+
+ if (op >= OP_NOTSTARI) /* Caseless */
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf && fc > 127)
+ foc = UCD_OTHERCASE(fc);
+ else
+#endif /* SUPPORT_UNICODE */
+ foc = TABLE_GET(fc, mb->fcc, fc);
+
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ uint32_t d;
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINC(d, eptr);
+ if (fc == d || (uint32_t)foc == d) RRETURN(MATCH_NOMATCH);
+ }
+ }
+ else
+#endif /* SUPPORT_UNICODE */
+ /* Not UTF mode */
+ {
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (fc == *eptr || foc == *eptr) RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
+ }
+
+ if (min == max) continue;
+
+ if (minimize)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ uint32_t d;
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM28);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINC(d, eptr);
+ if (fc == d || (uint32_t)foc == d) RRETURN(MATCH_NOMATCH);
+ }
+ }
+ else
+#endif /*SUPPORT_UNICODE */
+ /* Not UTF mode */
+ {
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM29);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (fc == *eptr || foc == *eptr) RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
+ }
+ /* Control never gets here */
+ }
+
+ /* Maximize case */
+
+ else
+ {
+ pp = eptr;
+
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ uint32_t d;
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLEN(d, eptr, len);
+ if (fc == d || (uint32_t)foc == d) break;
+ eptr += len;
+ }
+ if (possessive) continue; /* No backtracking */
+
+ /* After \C in UTF mode, pp might be in the middle of a Unicode
+ character. Use <= pp to ensure backtracking doesn't go too far. */
+
+ for(;;)
+ {
+ if (eptr <= pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM30);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr--;
+ BACKCHAR(eptr);
+ }
+ }
+ else
+#endif /* SUPPORT_UNICODE */
+ /* Not UTF mode */
+ {
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ if (fc == *eptr || foc == *eptr) break;
+ eptr++;
+ }
+ if (possessive) continue; /* No backtracking */
+ for (;;)
+ {
+ if (eptr == pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM31);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr--;
+ }
+ }
+ /* Control never gets here */
+ }
+ }
+
+ /* Caseful comparisons */
+
+ else
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ uint32_t d;
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINC(d, eptr);
+ if (fc == d) RRETURN(MATCH_NOMATCH);
+ }
+ }
+ else
+#endif
+ /* Not UTF mode */
+ {
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (fc == *eptr++) RRETURN(MATCH_NOMATCH);
+ }
+ }
+
+ if (min == max) continue;
+
+ if (minimize)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ uint32_t d;
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM32);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINC(d, eptr);
+ if (fc == d) RRETURN(MATCH_NOMATCH);
+ }
+ }
+ else
+#endif
+ /* Not UTF mode */
+ {
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM33);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (fc == *eptr++) RRETURN(MATCH_NOMATCH);
+ }
+ }
+ /* Control never gets here */
+ }
+
+ /* Maximize case */
+
+ else
+ {
+ pp = eptr;
+
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ uint32_t d;
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLEN(d, eptr, len);
+ if (fc == d) break;
+ eptr += len;
+ }
+ if (possessive) continue; /* No backtracking */
+
+ /* After \C in UTF mode, pp might be in the middle of a Unicode
+ character. Use <= pp to ensure backtracking doesn't go too far. */
+
+ for(;;)
+ {
+ if (eptr <= pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM34);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr--;
+ BACKCHAR(eptr);
+ }
+ }
+ else
+#endif
+ /* Not UTF mode */
+ {
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ if (fc == *eptr) break;
+ eptr++;
+ }
+ if (possessive) continue; /* No backtracking */
+ for (;;)
+ {
+ if (eptr == pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM35);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr--;
+ }
+ }
+ /* Control never gets here */
+ }
+ }
+ /* Control never gets here */
+
+ /* Match a single character type repeatedly; several different opcodes
+ share code. This is very similar to the code for single characters, but we
+ repeat it in the interests of efficiency. */
+
+ case OP_TYPEEXACT:
+ min = max = GET2(ecode, 1);
+ minimize = TRUE;
+ ecode += 1 + IMM2_SIZE;
+ goto REPEATTYPE;
+
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ min = 0;
+ max = GET2(ecode, 1);
+ minimize = *ecode == OP_TYPEMINUPTO;
+ ecode += 1 + IMM2_SIZE;
+ goto REPEATTYPE;
+
+ case OP_TYPEPOSSTAR:
+ possessive = TRUE;
+ min = 0;
+ max = INT_MAX;
+ ecode++;
+ goto REPEATTYPE;
+
+ case OP_TYPEPOSPLUS:
+ possessive = TRUE;
+ min = 1;
+ max = INT_MAX;
+ ecode++;
+ goto REPEATTYPE;
+
+ case OP_TYPEPOSQUERY:
+ possessive = TRUE;
+ min = 0;
+ max = 1;
+ ecode++;
+ goto REPEATTYPE;
+
+ case OP_TYPEPOSUPTO:
+ possessive = TRUE;
+ min = 0;
+ max = GET2(ecode, 1);
+ ecode += 1 + IMM2_SIZE;
+ goto REPEATTYPE;
+
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ c = *ecode++ - OP_TYPESTAR;
+ minimize = (c & 1) != 0;
+ min = rep_min[c]; /* Pick up values from tables; */
+ max = rep_max[c]; /* zero for max => infinity */
+ if (max == 0) max = INT_MAX;
+
+ /* Common code for all repeated single character type matches. Note that
+ in UTF-8 mode, '.' matches a character of any length, but for the other
+ character types, the valid characters are all one-byte long. */
+
+ REPEATTYPE:
+ ctype = *ecode++; /* Code for the character type */
+
+#ifdef SUPPORT_UNICODE
+ if (ctype == OP_PROP || ctype == OP_NOTPROP)
+ {
+ prop_fail_result = ctype == OP_NOTPROP;
+ prop_type = *ecode++;
+ prop_value = *ecode++;
+ }
+ else prop_type = -1;
+#endif
+
+ /* First, ensure the minimum number of matches are present. Use inline
+ code for maximizing the speed, and do the type test once at the start
+ (i.e. keep it out of the loop). Separate the UTF-8 code completely as that
+ is tidier. Also separate the UCP code, which can be the same for both UTF-8
+ and single-bytes. */
+
+ if (min > 0)
+ {
+#ifdef SUPPORT_UNICODE
+ if (prop_type >= 0)
+ {
+ switch(prop_type)
+ {
+ case PT_ANY:
+ if (prop_fail_result) RRETURN(MATCH_NOMATCH);
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ }
+ break;
+
+ case PT_LAMP:
+ for (i = 1; i <= min; i++)
+ {
+ int chartype;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ chartype = UCD_CHARTYPE(c);
+ if ((chartype == ucp_Lu ||
+ chartype == ucp_Ll ||
+ chartype == ucp_Lt) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ case PT_GC:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ case PT_PC:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ case PT_SC:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ case PT_ALNUM:
+ for (i = 1; i <= min; i++)
+ {
+ int category;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L || category == ucp_N) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ /* Perl space used to exclude VT, but from Perl 5.18 it is included,
+ which means that Perl space and POSIX space are now identical. PCRE
+ was changed at release 8.34. */
+
+ case PT_SPACE: /* Perl space */
+ case PT_PXSPACE: /* POSIX space */
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ switch(c)
+ {
+ HSPACE_CASES:
+ VSPACE_CASES:
+ if (prop_fail_result) RRETURN(MATCH_NOMATCH);
+ break;
+
+ default:
+ if ((UCD_CATEGORY(c) == ucp_Z) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ break;
+ }
+ }
+ break;
+
+ case PT_WORD:
+ for (i = 1; i <= min; i++)
+ {
+ int category;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L || category == ucp_N || c == CHAR_UNDERSCORE)
+ == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ case PT_CLIST:
+ for (i = 1; i <= min; i++)
+ {
+ const uint32_t *cp;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ cp = PRIV(ucd_caseless_sets) + prop_value;
+ for (;;)
+ {
+ if (c < *cp)
+ { if (prop_fail_result) break; else { RRETURN(MATCH_NOMATCH); } }
+ if (c == *cp++)
+ { if (prop_fail_result) { RRETURN(MATCH_NOMATCH); } else break; }
+ }
+ }
+ break;
+
+ case PT_UCNC:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ /* This should not occur */
+
+ default:
+ RRETURN(PCRE2_ERROR_INTERNAL);
+ }
+ }
+
+ /* Match extended Unicode sequences. We will get here only if the
+ support is in the binary; otherwise a compile-time error occurs. */
+
+ else if (ctype == OP_EXTUNI)
+ {
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ else
+ {
+ int lgb, rgb;
+ GETCHARINCTEST(c, eptr);
+ lgb = UCD_GRAPHBREAK(c);
+ while (eptr < mb->end_subject)
+ {
+ int len = 1;
+ if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
+ rgb = UCD_GRAPHBREAK(c);
+ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
+ lgb = rgb;
+ eptr += len;
+ }
+ }
+ CHECK_PARTIAL();
+ }
+ }
+
+ else
+#endif /* SUPPORT_UNICODE */
+
+/* Handle all other cases when the coding is UTF-8 */
+
+#ifdef SUPPORT_UNICODE
+ if (utf) switch(ctype)
+ {
+ case OP_ANY:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
+ if (mb->partial != 0 &&
+ eptr + 1 >= mb->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ UCHAR21(eptr) == NLBLOCK->nl[0])
+ {
+ mb->hitend = TRUE;
+ if (mb->partial > 1) RRETURN(PCRE2_ERROR_PARTIAL);
+ }
+ eptr++;
+ ACROSSCHAR(eptr < mb->end_subject, *eptr, eptr++);
+ }
+ break;
+
+ case OP_ALLANY:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ eptr++;
+ ACROSSCHAR(eptr < mb->end_subject, *eptr, eptr++);
+ }
+ break;
+
+ case OP_ANYBYTE:
+ if (eptr > mb->end_subject - min) RRETURN(MATCH_NOMATCH);
+ eptr += min;
+ break;
+
+ case OP_ANYNL:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINC(c, eptr);
+ switch(c)
+ {
+ default: RRETURN(MATCH_NOMATCH);
+
+ case CHAR_CR:
+ if (eptr < mb->end_subject && UCHAR21(eptr) == CHAR_LF) eptr++;
+ break;
+
+ case CHAR_LF:
+ break;
+
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#ifndef EBCDIC
+ case 0x2028:
+ case 0x2029:
+#endif /* Not EBCDIC */
+ if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) RRETURN(MATCH_NOMATCH);
+ break;
+ }
+ }
+ break;
+
+ case OP_NOT_HSPACE:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINC(c, eptr);
+ switch(c)
+ {
+ HSPACE_CASES: RRETURN(MATCH_NOMATCH); /* Byte and multibyte cases */
+ default: break;
+ }
+ }
+ break;
+
+ case OP_HSPACE:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINC(c, eptr);
+ switch(c)
+ {
+ HSPACE_CASES: break; /* Byte and multibyte cases */
+ default: RRETURN(MATCH_NOMATCH);
+ }
+ }
+ break;
+
+ case OP_NOT_VSPACE:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINC(c, eptr);
+ switch(c)
+ {
+ VSPACE_CASES: RRETURN(MATCH_NOMATCH);
+ default: break;
+ }
+ }
+ break;
+
+ case OP_VSPACE:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINC(c, eptr);
+ switch(c)
+ {
+ VSPACE_CASES: break;
+ default: RRETURN(MATCH_NOMATCH);
+ }
+ }
+ break;
+
+ case OP_NOT_DIGIT:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINC(c, eptr);
+ if (c < 128 && (mb->ctypes[c] & ctype_digit) != 0)
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ case OP_DIGIT:
+ for (i = 1; i <= min; i++)
+ {
+ uint32_t cc;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ cc = UCHAR21(eptr);
+ if (cc >= 128 || (mb->ctypes[cc] & ctype_digit) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ /* No need to skip more bytes - we know it's a 1-byte character */
+ }
+ break;
+
+ case OP_NOT_WHITESPACE:
+ for (i = 1; i <= min; i++)
+ {
+ uint32_t cc;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ cc = UCHAR21(eptr);
+ if (cc < 128 && (mb->ctypes[cc] & ctype_space) != 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ ACROSSCHAR(eptr < mb->end_subject, *eptr, eptr++);
+ }
+ break;
+
+ case OP_WHITESPACE:
+ for (i = 1; i <= min; i++)
+ {
+ uint32_t cc;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ cc = UCHAR21(eptr);
+ if (cc >= 128 || (mb->ctypes[cc] & ctype_space) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ /* No need to skip more bytes - we know it's a 1-byte character */
+ }
+ break;
+
+ case OP_NOT_WORDCHAR:
+ for (i = 1; i <= min; i++)
+ {
+ uint32_t cc;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ cc = UCHAR21(eptr);
+ if (cc < 128 && (mb->ctypes[cc] & ctype_word) != 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ ACROSSCHAR(eptr < mb->end_subject, *eptr, eptr++);
+ }
+ break;
+
+ case OP_WORDCHAR:
+ for (i = 1; i <= min; i++)
+ {
+ uint32_t cc;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ cc = UCHAR21(eptr);
+ if (cc >= 128 || (mb->ctypes[cc] & ctype_word) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ /* No need to skip more bytes - we know it's a 1-byte character */
+ }
+ break;
+
+ default:
+ RRETURN(PCRE2_ERROR_INTERNAL);
+ } /* End switch(ctype) */
+
+ else
+#endif /* SUPPORT_UNICODE */
+
+ /* Code for the non-UTF-8 case for minimum matching of operators other
+ than OP_PROP and OP_NOTPROP. */
+
+ switch(ctype)
+ {
+ case OP_ANY:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (IS_NEWLINE(eptr)) RRETURN(MATCH_NOMATCH);
+ if (mb->partial != 0 &&
+ eptr + 1 >= mb->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ *eptr == NLBLOCK->nl[0])
+ {
+ mb->hitend = TRUE;
+ if (mb->partial > 1) RRETURN(PCRE2_ERROR_PARTIAL);
+ }
+ eptr++;
+ }
+ break;
+
+ case OP_ALLANY:
+ if (eptr > mb->end_subject - min)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ eptr += min;
+ break;
+
+ case OP_ANYBYTE:
+ if (eptr > mb->end_subject - min)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ eptr += min;
+ break;
+
+ case OP_ANYNL:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ switch(*eptr++)
+ {
+ default: RRETURN(MATCH_NOMATCH);
+
+ case CHAR_CR:
+ if (eptr < mb->end_subject && *eptr == CHAR_LF) eptr++;
+ break;
+
+ case CHAR_LF:
+ break;
+
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ case 0x2028:
+ case 0x2029:
+#endif
+ if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) RRETURN(MATCH_NOMATCH);
+ break;
+ }
+ }
+ break;
+
+ case OP_NOT_HSPACE:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ switch(*eptr++)
+ {
+ default: break;
+ HSPACE_BYTE_CASES:
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ HSPACE_MULTIBYTE_CASES:
+#endif
+ RRETURN(MATCH_NOMATCH);
+ }
+ }
+ break;
+
+ case OP_HSPACE:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ switch(*eptr++)
+ {
+ default: RRETURN(MATCH_NOMATCH);
+ HSPACE_BYTE_CASES:
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ HSPACE_MULTIBYTE_CASES:
+#endif
+ break;
+ }
+ }
+ break;
+
+ case OP_NOT_VSPACE:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ switch(*eptr++)
+ {
+ VSPACE_BYTE_CASES:
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ VSPACE_MULTIBYTE_CASES:
+#endif
+ RRETURN(MATCH_NOMATCH);
+ default: break;
+ }
+ }
+ break;
+
+ case OP_VSPACE:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ switch(*eptr++)
+ {
+ default: RRETURN(MATCH_NOMATCH);
+ VSPACE_BYTE_CASES:
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ VSPACE_MULTIBYTE_CASES:
+#endif
+ break;
+ }
+ }
+ break;
+
+ case OP_NOT_DIGIT:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (MAX_255(*eptr) && (mb->ctypes[*eptr] & ctype_digit) != 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
+ break;
+
+ case OP_DIGIT:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (!MAX_255(*eptr) || (mb->ctypes[*eptr] & ctype_digit) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
+ break;
+
+ case OP_NOT_WHITESPACE:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (MAX_255(*eptr) && (mb->ctypes[*eptr] & ctype_space) != 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
+ break;
+
+ case OP_WHITESPACE:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (!MAX_255(*eptr) || (mb->ctypes[*eptr] & ctype_space) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
+ break;
+
+ case OP_NOT_WORDCHAR:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (MAX_255(*eptr) && (mb->ctypes[*eptr] & ctype_word) != 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
+ break;
+
+ case OP_WORDCHAR:
+ for (i = 1; i <= min; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (!MAX_255(*eptr) || (mb->ctypes[*eptr] & ctype_word) == 0)
+ RRETURN(MATCH_NOMATCH);
+ eptr++;
+ }
+ break;
+
+ default:
+ RRETURN(PCRE2_ERROR_INTERNAL);
+ }
+ }
+
+ /* If min = max, continue at the same level without recursing */
+
+ if (min == max) continue;
+
+ /* If minimizing, we have to test the rest of the pattern before each
+ subsequent match. Again, separate the UTF-8 case for speed, and also
+ separate the UCP cases. */
+
+ if (minimize)
+ {
+#ifdef SUPPORT_UNICODE
+ if (prop_type >= 0)
+ {
+ switch(prop_type)
+ {
+ case PT_ANY:
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM36);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if (prop_fail_result) RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+
+ case PT_LAMP:
+ for (fi = min;; fi++)
+ {
+ int chartype;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM37);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ chartype = UCD_CHARTYPE(c);
+ if ((chartype == ucp_Lu ||
+ chartype == ucp_Ll ||
+ chartype == ucp_Lt) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+
+ case PT_GC:
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM38);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+
+ case PT_PC:
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM39);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+
+ case PT_SC:
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM40);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+
+ case PT_ALNUM:
+ for (fi = min;; fi++)
+ {
+ int category;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM59);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L || category == ucp_N) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+
+ /* Perl space used to exclude VT, but from Perl 5.18 it is included,
+ which means that Perl space and POSIX space are now identical. PCRE
+ was changed at release 8.34. */
+
+ case PT_SPACE: /* Perl space */
+ case PT_PXSPACE: /* POSIX space */
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM61);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ switch(c)
+ {
+ HSPACE_CASES:
+ VSPACE_CASES:
+ if (prop_fail_result) RRETURN(MATCH_NOMATCH);
+ break;
+
+ default:
+ if ((UCD_CATEGORY(c) == ucp_Z) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ break;
+ }
+ }
+ /* Control never gets here */
+
+ case PT_WORD:
+ for (fi = min;; fi++)
+ {
+ int category;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM62);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L ||
+ category == ucp_N ||
+ c == CHAR_UNDERSCORE)
+ == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+
+ case PT_CLIST:
+ for (fi = min;; fi++)
+ {
+ const uint32_t *cp;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM67);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ cp = PRIV(ucd_caseless_sets) + prop_value;
+ for (;;)
+ {
+ if (c < *cp)
+ { if (prop_fail_result) break; else { RRETURN(MATCH_NOMATCH); } }
+ if (c == *cp++)
+ { if (prop_fail_result) { RRETURN(MATCH_NOMATCH); } else break; }
+ }
+ }
+ /* Control never gets here */
+
+ case PT_UCNC:
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM60);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ GETCHARINCTEST(c, eptr);
+ if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000) == prop_fail_result)
+ RRETURN(MATCH_NOMATCH);
+ }
+ /* Control never gets here */
+
+ /* This should never occur */
+ default:
+ RRETURN(PCRE2_ERROR_INTERNAL);
+ }
+ }
+
+ /* Match extended Unicode sequences. We will get here only if the
+ support is in the binary; otherwise a compile-time error occurs. */
+
+ else if (ctype == OP_EXTUNI)
+ {
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM41);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ else
+ {
+ int lgb, rgb;
+ GETCHARINCTEST(c, eptr);
+ lgb = UCD_GRAPHBREAK(c);
+ while (eptr < mb->end_subject)
+ {
+ int len = 1;
+ if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
+ rgb = UCD_GRAPHBREAK(c);
+ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
+ lgb = rgb;
+ eptr += len;
+ }
+ }
+ CHECK_PARTIAL();
+ }
+ }
+ else
+#endif /* SUPPORT_UNICODE */
+
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM42);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (ctype == OP_ANY && IS_NEWLINE(eptr))
+ RRETURN(MATCH_NOMATCH);
+ GETCHARINC(c, eptr);
+ switch(ctype)
+ {
+ case OP_ANY: /* This is the non-NL case */
+ if (mb->partial != 0 && /* Take care with CRLF partial */
+ eptr >= mb->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ mb->hitend = TRUE;
+ if (mb->partial > 1) RRETURN(PCRE2_ERROR_PARTIAL);
+ }
+ break;
+
+ case OP_ALLANY:
+ case OP_ANYBYTE:
+ break;
+
+ case OP_ANYNL:
+ switch(c)
+ {
+ default: RRETURN(MATCH_NOMATCH);
+ case CHAR_CR:
+ if (eptr < mb->end_subject && UCHAR21(eptr) == CHAR_LF) eptr++;
+ break;
+
+ case CHAR_LF:
+ break;
+
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#ifndef EBCDIC
+ case 0x2028:
+ case 0x2029:
+#endif /* Not EBCDIC */
+ if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) RRETURN(MATCH_NOMATCH);
+ break;
+ }
+ break;
+
+ case OP_NOT_HSPACE:
+ switch(c)
+ {
+ HSPACE_CASES: RRETURN(MATCH_NOMATCH);
+ default: break;
+ }
+ break;
+
+ case OP_HSPACE:
+ switch(c)
+ {
+ HSPACE_CASES: break;
+ default: RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ case OP_NOT_VSPACE:
+ switch(c)
+ {
+ VSPACE_CASES: RRETURN(MATCH_NOMATCH);
+ default: break;
+ }
+ break;
+
+ case OP_VSPACE:
+ switch(c)
+ {
+ VSPACE_CASES: break;
+ default: RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ case OP_NOT_DIGIT:
+ if (c < 256 && (mb->ctypes[c] & ctype_digit) != 0)
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_DIGIT:
+ if (c >= 256 || (mb->ctypes[c] & ctype_digit) == 0)
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_NOT_WHITESPACE:
+ if (c < 256 && (mb->ctypes[c] & ctype_space) != 0)
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_WHITESPACE:
+ if (c >= 256 || (mb->ctypes[c] & ctype_space) == 0)
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_NOT_WORDCHAR:
+ if (c < 256 && (mb->ctypes[c] & ctype_word) != 0)
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_WORDCHAR:
+ if (c >= 256 || (mb->ctypes[c] & ctype_word) == 0)
+ RRETURN(MATCH_NOMATCH);
+ break;
+
+ default:
+ RRETURN(PCRE2_ERROR_INTERNAL);
+ }
+ }
+ }
+ else
+#endif
+ /* Not UTF mode */
+ {
+ for (fi = min;; fi++)
+ {
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM43);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ if (fi >= max) RRETURN(MATCH_NOMATCH);
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ RRETURN(MATCH_NOMATCH);
+ }
+ if (ctype == OP_ANY && IS_NEWLINE(eptr))
+ RRETURN(MATCH_NOMATCH);
+ c = *eptr++;
+ switch(ctype)
+ {
+ case OP_ANY: /* This is the non-NL case */
+ if (mb->partial != 0 && /* Take care with CRLF partial */
+ eptr >= mb->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ c == NLBLOCK->nl[0])
+ {
+ mb->hitend = TRUE;
+ if (mb->partial > 1) RRETURN(PCRE2_ERROR_PARTIAL);
+ }
+ break;
+
+ case OP_ALLANY:
+ case OP_ANYBYTE:
+ break;
+
+ case OP_ANYNL:
+ switch(c)
+ {
+ default: RRETURN(MATCH_NOMATCH);
+ case CHAR_CR:
+ if (eptr < mb->end_subject && *eptr == CHAR_LF) eptr++;
+ break;
+
+ case CHAR_LF:
+ break;
+
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_NEL:
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ case 0x2028:
+ case 0x2029:
+#endif
+ if (mb->bsr_convention == PCRE2_BSR_ANYCRLF) RRETURN(MATCH_NOMATCH);
+ break;
+ }
+ break;
+
+ case OP_NOT_HSPACE:
+ switch(c)
+ {
+ default: break;
+ HSPACE_BYTE_CASES:
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ HSPACE_MULTIBYTE_CASES:
+#endif
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ case OP_HSPACE:
+ switch(c)
+ {
+ default: RRETURN(MATCH_NOMATCH);
+ HSPACE_BYTE_CASES:
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ HSPACE_MULTIBYTE_CASES:
+#endif
+ break;
+ }
+ break;
+
+ case OP_NOT_VSPACE:
+ switch(c)
+ {
+ default: break;
+ VSPACE_BYTE_CASES:
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ VSPACE_MULTIBYTE_CASES:
+#endif
+ RRETURN(MATCH_NOMATCH);
+ }
+ break;
+
+ case OP_VSPACE:
+ switch(c)
+ {
+ default: RRETURN(MATCH_NOMATCH);
+ VSPACE_BYTE_CASES:
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ VSPACE_MULTIBYTE_CASES:
+#endif
+ break;
+ }
+ break;
+
+ case OP_NOT_DIGIT:
+ if (MAX_255(c) && (mb->ctypes[c] & ctype_digit) != 0) RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_DIGIT:
+ if (!MAX_255(c) || (mb->ctypes[c] & ctype_digit) == 0) RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_NOT_WHITESPACE:
+ if (MAX_255(c) && (mb->ctypes[c] & ctype_space) != 0) RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_WHITESPACE:
+ if (!MAX_255(c) || (mb->ctypes[c] & ctype_space) == 0) RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_NOT_WORDCHAR:
+ if (MAX_255(c) && (mb->ctypes[c] & ctype_word) != 0) RRETURN(MATCH_NOMATCH);
+ break;
+
+ case OP_WORDCHAR:
+ if (!MAX_255(c) || (mb->ctypes[c] & ctype_word) == 0) RRETURN(MATCH_NOMATCH);
+ break;
+
+ default:
+ RRETURN(PCRE2_ERROR_INTERNAL);
+ }
+ }
+ }
+ /* Control never gets here */
+ }
+
+ /* If maximizing, it is worth using inline code for speed, doing the type
+ test once at the start (i.e. keep it out of the loop). Again, keep the
+ UTF-8 and UCP stuff separate. */
+
+ else
+ {
+ pp = eptr; /* Remember where we started */
+
+#ifdef SUPPORT_UNICODE
+ if (prop_type >= 0)
+ {
+ switch(prop_type)
+ {
+ case PT_ANY:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ if (prop_fail_result) break;
+ eptr+= len;
+ }
+ break;
+
+ case PT_LAMP:
+ for (i = min; i < max; i++)
+ {
+ int chartype;
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ chartype = UCD_CHARTYPE(c);
+ if ((chartype == ucp_Lu ||
+ chartype == ucp_Ll ||
+ chartype == ucp_Lt) == prop_fail_result)
+ break;
+ eptr+= len;
+ }
+ break;
+
+ case PT_GC:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ if ((UCD_CATEGORY(c) == prop_value) == prop_fail_result) break;
+ eptr+= len;
+ }
+ break;
+
+ case PT_PC:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ if ((UCD_CHARTYPE(c) == prop_value) == prop_fail_result) break;
+ eptr+= len;
+ }
+ break;
+
+ case PT_SC:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ if ((UCD_SCRIPT(c) == prop_value) == prop_fail_result) break;
+ eptr+= len;
+ }
+ break;
+
+ case PT_ALNUM:
+ for (i = min; i < max; i++)
+ {
+ int category;
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L || category == ucp_N) == prop_fail_result)
+ break;
+ eptr+= len;
+ }
+ break;
+
+ /* Perl space used to exclude VT, but from Perl 5.18 it is included,
+ which means that Perl space and POSIX space are now identical. PCRE
+ was changed at release 8.34. */
+
+ case PT_SPACE: /* Perl space */
+ case PT_PXSPACE: /* POSIX space */
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ switch(c)
+ {
+ HSPACE_CASES:
+ VSPACE_CASES:
+ if (prop_fail_result) goto ENDLOOP99; /* Break the loop */
+ break;
+
+ default:
+ if ((UCD_CATEGORY(c) == ucp_Z) == prop_fail_result)
+ goto ENDLOOP99; /* Break the loop */
+ break;
+ }
+ eptr+= len;
+ }
+ ENDLOOP99:
+ break;
+
+ case PT_WORD:
+ for (i = min; i < max; i++)
+ {
+ int category;
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ category = UCD_CATEGORY(c);
+ if ((category == ucp_L || category == ucp_N ||
+ c == CHAR_UNDERSCORE) == prop_fail_result)
+ break;
+ eptr+= len;
+ }
+ break;
+
+ case PT_CLIST:
+ for (i = min; i < max; i++)
+ {
+ const uint32_t *cp;
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ cp = PRIV(ucd_caseless_sets) + prop_value;
+ for (;;)
+ {
+ if (c < *cp)
+ { if (prop_fail_result) break; else goto GOT_MAX; }
+ if (c == *cp++)
+ { if (prop_fail_result) goto GOT_MAX; else break; }
+ }
+ eptr += len;
+ }
+ GOT_MAX:
+ break;
+
+ case PT_UCNC:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLENTEST(c, eptr, len);
+ if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT || (c >= 0xa0 && c <= 0xd7ff) ||
+ c >= 0xe000) == prop_fail_result)
+ break;
+ eptr += len;
+ }
+ break;
+
+ default:
+ RRETURN(PCRE2_ERROR_INTERNAL);
+ }
+
+ /* eptr is now past the end of the maximum run */
+
+ if (possessive) continue; /* No backtracking */
+
+ /* After \C in UTF mode, pp might be in the middle of a Unicode
+ character. Use <= pp to ensure backtracking doesn't go too far. */
+
+ for(;;)
+ {
+ if (eptr <= pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM44);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr--;
+ if (utf) BACKCHAR(eptr);
+ }
+ }
+
+ /* Match extended Unicode grapheme clusters. We will get here only if the
+ support is in the binary; otherwise a compile-time error occurs. */
+
+ else if (ctype == OP_EXTUNI)
+ {
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ else
+ {
+ int lgb, rgb;
+ GETCHARINCTEST(c, eptr);
+ lgb = UCD_GRAPHBREAK(c);
+ while (eptr < mb->end_subject)
+ {
+ int len = 1;
+ if (!utf) c = *eptr; else { GETCHARLEN(c, eptr, len); }
+ rgb = UCD_GRAPHBREAK(c);
+ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
+ lgb = rgb;
+ eptr += len;
+ }
+ }
+ CHECK_PARTIAL();
+ }
+
+ /* eptr is now past the end of the maximum run */
+
+ if (possessive) continue; /* No backtracking */
+
+ /* We use <= pp rather than == pp to detect the start of the run while
+ backtracking because the use of \C in UTF mode can cause BACKCHAR to
+ move back past pp. This is just palliative; the use of \C in UTF mode
+ is fraught with danger. */
+
+ for(;;)
+ {
+ int lgb, rgb;
+ PCRE2_SPTR fptr;
+
+ if (eptr <= pp) goto TAIL_RECURSE; /* At start of char run */
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM45);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+
+ /* Backtracking over an extended grapheme cluster involves inspecting
+ the previous two characters (if present) to see if a break is
+ permitted between them. */
+
+ eptr--;
+ if (!utf) c = *eptr; else
+ {
+ BACKCHAR(eptr);
+ GETCHAR(c, eptr);
+ }
+ rgb = UCD_GRAPHBREAK(c);
+
+ for (;;)
+ {
+ if (eptr <= pp) goto TAIL_RECURSE; /* At start of char run */
+ fptr = eptr - 1;
+ if (!utf) c = *fptr; else
+ {
+ BACKCHAR(fptr);
+ GETCHAR(c, fptr);
+ }
+ lgb = UCD_GRAPHBREAK(c);
+ if ((PRIV(ucp_gbtable)[lgb] & (1 << rgb)) == 0) break;
+ eptr = fptr;
+ rgb = lgb;
+ }
+ }
+ }
+
+ else
+#endif /* SUPPORT_UNICODE */
+
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ switch(ctype)
+ {
+ case OP_ANY:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ if (IS_NEWLINE(eptr)) break;
+ if (mb->partial != 0 && /* Take care with CRLF partial */
+ eptr + 1 >= mb->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ UCHAR21(eptr) == NLBLOCK->nl[0])
+ {
+ mb->hitend = TRUE;
+ if (mb->partial > 1) RRETURN(PCRE2_ERROR_PARTIAL);
+ }
+ eptr++;
+ ACROSSCHAR(eptr < mb->end_subject, *eptr, eptr++);
+ }
+ break;
+
+ case OP_ALLANY:
+ if (max < INT_MAX)
+ {
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ eptr++;
+ ACROSSCHAR(eptr < mb->end_subject, *eptr, eptr++);
+ }
+ }
+ else
+ {
+ eptr = mb->end_subject; /* Unlimited UTF-8 repeat */
+ SCHECK_PARTIAL();
+ }
+ break;
+
+ /* The byte case is the same as non-UTF8 */
+
+ case OP_ANYBYTE:
+ c = max - min;
+ if (c > (uint32_t)(mb->end_subject - eptr))
+ {
+ eptr = mb->end_subject;
+ SCHECK_PARTIAL();
+ }
+ else eptr += c;
+ break;
+
+ case OP_ANYNL:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLEN(c, eptr, len);
+ if (c == CHAR_CR)
+ {
+ if (++eptr >= mb->end_subject) break;
+ if (UCHAR21(eptr) == CHAR_LF) eptr++;
+ }
+ else
+ {
+ if (c != CHAR_LF &&
+ (mb->bsr_convention == PCRE2_BSR_ANYCRLF ||
+ (c != CHAR_VT && c != CHAR_FF && c != CHAR_NEL
+#ifndef EBCDIC
+ && c != 0x2028 && c != 0x2029
+#endif /* Not EBCDIC */
+ )))
+ break;
+ eptr += len;
+ }
+ }
+ break;
+
+ case OP_NOT_HSPACE:
+ case OP_HSPACE:
+ for (i = min; i < max; i++)
+ {
+ BOOL gotspace;
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLEN(c, eptr, len);
+ switch(c)
+ {
+ HSPACE_CASES: gotspace = TRUE; break;
+ default: gotspace = FALSE; break;
+ }
+ if (gotspace == (ctype == OP_NOT_HSPACE)) break;
+ eptr += len;
+ }
+ break;
+
+ case OP_NOT_VSPACE:
+ case OP_VSPACE:
+ for (i = min; i < max; i++)
+ {
+ BOOL gotspace;
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLEN(c, eptr, len);
+ switch(c)
+ {
+ VSPACE_CASES: gotspace = TRUE; break;
+ default: gotspace = FALSE; break;
+ }
+ if (gotspace == (ctype == OP_NOT_VSPACE)) break;
+ eptr += len;
+ }
+ break;
+
+ case OP_NOT_DIGIT:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLEN(c, eptr, len);
+ if (c < 256 && (mb->ctypes[c] & ctype_digit) != 0) break;
+ eptr+= len;
+ }
+ break;
+
+ case OP_DIGIT:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLEN(c, eptr, len);
+ if (c >= 256 ||(mb->ctypes[c] & ctype_digit) == 0) break;
+ eptr+= len;
+ }
+ break;
+
+ case OP_NOT_WHITESPACE:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLEN(c, eptr, len);
+ if (c < 256 && (mb->ctypes[c] & ctype_space) != 0) break;
+ eptr+= len;
+ }
+ break;
+
+ case OP_WHITESPACE:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLEN(c, eptr, len);
+ if (c >= 256 ||(mb->ctypes[c] & ctype_space) == 0) break;
+ eptr+= len;
+ }
+ break;
+
+ case OP_NOT_WORDCHAR:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLEN(c, eptr, len);
+ if (c < 256 && (mb->ctypes[c] & ctype_word) != 0) break;
+ eptr+= len;
+ }
+ break;
+
+ case OP_WORDCHAR:
+ for (i = min; i < max; i++)
+ {
+ int len = 1;
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ GETCHARLEN(c, eptr, len);
+ if (c >= 256 || (mb->ctypes[c] & ctype_word) == 0) break;
+ eptr+= len;
+ }
+ break;
+
+ default:
+ RRETURN(PCRE2_ERROR_INTERNAL);
+ }
+
+ if (possessive) continue; /* No backtracking */
+
+ /* After \C in UTF mode, pp might be in the middle of a Unicode
+ character. Use <= pp to ensure backtracking doesn't go too far. */
+
+ for(;;)
+ {
+ if (eptr <= pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM46);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr--;
+ BACKCHAR(eptr);
+ if (ctype == OP_ANYNL && eptr > pp && UCHAR21(eptr) == CHAR_NL &&
+ UCHAR21(eptr - 1) == CHAR_CR) eptr--;
+ }
+ }
+ else
+#endif /* SUPPORT_UNICODE */
+ /* Not UTF mode */
+ {
+ switch(ctype)
+ {
+ case OP_ANY:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ if (IS_NEWLINE(eptr)) break;
+ if (mb->partial != 0 && /* Take care with CRLF partial */
+ eptr + 1 >= mb->end_subject &&
+ NLBLOCK->nltype == NLTYPE_FIXED &&
+ NLBLOCK->nllen == 2 &&
+ *eptr == NLBLOCK->nl[0])
+ {
+ mb->hitend = TRUE;
+ if (mb->partial > 1) RRETURN(PCRE2_ERROR_PARTIAL);
+ }
+ eptr++;
+ }
+ break;
+
+ case OP_ALLANY:
+ case OP_ANYBYTE:
+ c = max - min;
+ if (c > (uint32_t)(mb->end_subject - eptr))
+ {
+ eptr = mb->end_subject;
+ SCHECK_PARTIAL();
+ }
+ else eptr += c;
+ break;
+
+ case OP_ANYNL:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ c = *eptr;
+ if (c == CHAR_CR)
+ {
+ if (++eptr >= mb->end_subject) break;
+ if (*eptr == CHAR_LF) eptr++;
+ }
+ else
+ {
+ if (c != CHAR_LF && (mb->bsr_convention == PCRE2_BSR_ANYCRLF ||
+ (c != CHAR_VT && c != CHAR_FF && c != CHAR_NEL
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ && c != 0x2028 && c != 0x2029
+#endif
+ ))) break;
+ eptr++;
+ }
+ }
+ break;
+
+ case OP_NOT_HSPACE:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ switch(*eptr)
+ {
+ default: eptr++; break;
+ HSPACE_BYTE_CASES:
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ HSPACE_MULTIBYTE_CASES:
+#endif
+ goto ENDLOOP00;
+ }
+ }
+ ENDLOOP00:
+ break;
+
+ case OP_HSPACE:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ switch(*eptr)
+ {
+ default: goto ENDLOOP01;
+ HSPACE_BYTE_CASES:
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ HSPACE_MULTIBYTE_CASES:
+#endif
+ eptr++; break;
+ }
+ }
+ ENDLOOP01:
+ break;
+
+ case OP_NOT_VSPACE:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ switch(*eptr)
+ {
+ default: eptr++; break;
+ VSPACE_BYTE_CASES:
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ VSPACE_MULTIBYTE_CASES:
+#endif
+ goto ENDLOOP02;
+ }
+ }
+ ENDLOOP02:
+ break;
+
+ case OP_VSPACE:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ switch(*eptr)
+ {
+ default: goto ENDLOOP03;
+ VSPACE_BYTE_CASES:
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ VSPACE_MULTIBYTE_CASES:
+#endif
+ eptr++; break;
+ }
+ }
+ ENDLOOP03:
+ break;
+
+ case OP_NOT_DIGIT:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ if (MAX_255(*eptr) && (mb->ctypes[*eptr] & ctype_digit) != 0) break;
+ eptr++;
+ }
+ break;
+
+ case OP_DIGIT:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ if (!MAX_255(*eptr) || (mb->ctypes[*eptr] & ctype_digit) == 0) break;
+ eptr++;
+ }
+ break;
+
+ case OP_NOT_WHITESPACE:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ if (MAX_255(*eptr) && (mb->ctypes[*eptr] & ctype_space) != 0) break;
+ eptr++;
+ }
+ break;
+
+ case OP_WHITESPACE:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ if (!MAX_255(*eptr) || (mb->ctypes[*eptr] & ctype_space) == 0) break;
+ eptr++;
+ }
+ break;
+
+ case OP_NOT_WORDCHAR:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ if (MAX_255(*eptr) && (mb->ctypes[*eptr] & ctype_word) != 0) break;
+ eptr++;
+ }
+ break;
+
+ case OP_WORDCHAR:
+ for (i = min; i < max; i++)
+ {
+ if (eptr >= mb->end_subject)
+ {
+ SCHECK_PARTIAL();
+ break;
+ }
+ if (!MAX_255(*eptr) || (mb->ctypes[*eptr] & ctype_word) == 0) break;
+ eptr++;
+ }
+ break;
+
+ default:
+ RRETURN(PCRE2_ERROR_INTERNAL);
+ }
+
+ if (possessive) continue; /* No backtracking */
+ for (;;)
+ {
+ if (eptr == pp) goto TAIL_RECURSE;
+ RMATCH(eptr, ecode, offset_top, mb, eptrb, RM47);
+ if (rrc != MATCH_NOMATCH) RRETURN(rrc);
+ eptr--;
+ if (ctype == OP_ANYNL && eptr > pp && *eptr == CHAR_LF &&
+ eptr[-1] == CHAR_CR) eptr--;
+ }
+ }
+
+ /* Control never gets here */
+ }
+
+ /* There's been some horrible disaster. Arrival here can only mean there is
+ something seriously wrong in the code above or the OP_xxx definitions. */
+
+ default:
+ RRETURN(PCRE2_ERROR_INTERNAL);
+ }
+
+ /* Do not stick any code in here without much thought; it is assumed
+ that "continue" in the code above comes out to here to repeat the main
+ loop. */
+
+ } /* End of main loop */
+/* Control never reaches here */
+
+
+/* When compiling to use the heap rather than the stack for recursive calls to
+match(), the RRETURN() macro jumps here. The number that is saved in
+frame->Xwhere indicates which label we actually want to return to. */
+
+#ifdef HEAP_MATCH_RECURSE
+#define LBL(val) case val: goto L_RM##val;
+HEAP_RETURN:
+switch (frame->Xwhere)
+ {
+ LBL( 1) LBL( 2) LBL( 3) LBL( 4) LBL( 5) LBL( 6) LBL( 7) LBL( 8)
+ LBL( 9) LBL(10) LBL(11) LBL(12) LBL(13) LBL(14) LBL(15) LBL(17)
+ LBL(19) LBL(24) LBL(25) LBL(26) LBL(27) LBL(29) LBL(31) LBL(33)
+ LBL(35) LBL(43) LBL(47) LBL(48) LBL(49) LBL(50) LBL(51) LBL(52)
+ LBL(53) LBL(54) LBL(55) LBL(56) LBL(57) LBL(58) LBL(63) LBL(64)
+ LBL(65) LBL(66) LBL(68)
+#ifdef SUPPORT_WIDE_CHARS
+ LBL(20) LBL(21)
+#endif
+#ifdef SUPPORT_UNICODE
+ LBL(16) LBL(18)
+ LBL(22) LBL(23) LBL(28) LBL(30)
+ LBL(32) LBL(34) LBL(42) LBL(46)
+ LBL(36) LBL(37) LBL(38) LBL(39) LBL(40) LBL(41) LBL(44) LBL(45)
+ LBL(59) LBL(60) LBL(61) LBL(62) LBL(67)
+#endif /* SUPPORT_UNICODE */
+ default:
+ return PCRE2_ERROR_INTERNAL;
+ }
+#undef LBL
+#endif /* HEAP_MATCH_RECURSE */
+}
+
+
+/***************************************************************************
+****************************************************************************
+ RECURSION IN THE match() FUNCTION
+
+Undefine all the macros that were defined above to handle this. */
+
+#ifdef HEAP_MATCH_RECURSE
+#undef eptr
+#undef ecode
+#undef mstart
+#undef offset_top
+#undef eptrb
+#undef flags
+
+#undef callpat
+#undef charptr
+#undef data
+#undef next_ecode
+#undef pp
+#undef prev
+#undef saved_eptr
+
+#undef new_recursive
+
+#undef cur_is_word
+#undef condition
+#undef prev_is_word
+
+#undef ctype
+#undef length
+#undef max
+#undef min
+#undef number
+#undef offset
+#undef op
+#undef save_capture_last
+#undef save_offset1
+#undef save_offset2
+#undef save_offset3
+
+#undef newptrb
+#endif /* HEAP_MATCH_RECURSE */
+
+/* These two are defined as macros in both cases */
+
+#undef fc
+#undef fi
+
+/***************************************************************************
+***************************************************************************/
+
+
+#ifdef HEAP_MATCH_RECURSE
+/*************************************************
+* Release allocated heap frames *
+*************************************************/
+
+/* This function releases all the allocated frames. The base frame is on the
+machine stack, and so must not be freed.
+
+Argument:
+ frame_base the address of the base frame
+ mb the match block
+
+Returns: nothing
+*/
+
+static void
+release_match_heapframes (heapframe *frame_base, match_block *mb)
+{
+heapframe *nextframe = frame_base->Xnextframe;
+while (nextframe != NULL)
+ {
+ heapframe *oldframe = nextframe;
+ nextframe = nextframe->Xnextframe;
+ mb->stack_memctl.free(oldframe, mb->stack_memctl.memory_data);
+ }
+}
+#endif /* HEAP_MATCH_RECURSE */
+
+
+
+/*************************************************
+* Match a Regular Expression *
+*************************************************/
+
+/* This function applies a compiled pattern to a subject string and picks out
+portions of the string if it matches. Two elements in the vector are set for
+each substring: the offsets to the start and end of the substring.
+
+Arguments:
+ code points to the compiled expression
+ subject points to the subject string
+ length length of subject string (may contain binary zeros)
+ start_offset where to start in the subject string
+ options option bits
+ match_data points to a match_data block
+ mcontext points a PCRE2 context
+
+Returns: > 0 => success; value is the number of ovector pairs filled
+ = 0 => success, but ovector is not big enough
+ -1 => failed to match (PCRE2_ERROR_NOMATCH)
+ -2 => partial match (PCRE2_ERROR_PARTIAL)
+ < -2 => some kind of unexpected problem
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_match(const pcre2_code *code, PCRE2_SPTR subject, PCRE2_SIZE length,
+ PCRE2_SIZE start_offset, uint32_t options, pcre2_match_data *match_data,
+ pcre2_match_context *mcontext)
+{
+int rc;
+int ocount;
+
+const uint8_t *start_bits = NULL;
+
+const pcre2_real_code *re = (const pcre2_real_code *)code;
+
+BOOL anchored;
+BOOL firstline;
+BOOL has_first_cu = FALSE;
+BOOL has_req_cu = FALSE;
+BOOL startline;
+BOOL using_temporary_offsets = FALSE;
+BOOL utf;
+
+PCRE2_UCHAR first_cu = 0;
+PCRE2_UCHAR first_cu2 = 0;
+PCRE2_UCHAR req_cu = 0;
+PCRE2_UCHAR req_cu2 = 0;
+
+PCRE2_SPTR bumpalong_limit;
+PCRE2_SPTR end_subject;
+PCRE2_SPTR start_match = subject + start_offset;
+PCRE2_SPTR req_cu_ptr = start_match - 1;
+PCRE2_SPTR start_partial = NULL;
+PCRE2_SPTR match_partial = NULL;
+
+/* We need to have mb pointing to a match block, because the IS_NEWLINE macro
+is used below, and it expects NLBLOCK to be defined as a pointer. */
+
+match_block actual_match_block;
+match_block *mb = &actual_match_block;
+
+#ifdef HEAP_MATCH_RECURSE
+heapframe frame_zero;
+frame_zero.Xprevframe = NULL; /* Marks the top level */
+frame_zero.Xnextframe = NULL; /* None are allocated yet */
+mb->match_frames_base = &frame_zero;
+#endif
+
+/* A length equal to PCRE2_ZERO_TERMINATED implies a zero-terminated
+subject string. */
+
+if (length == PCRE2_ZERO_TERMINATED) length = PRIV(strlen)(subject);
+end_subject = subject + length;
+
+/* Plausibility checks */
+
+if ((options & ~PUBLIC_MATCH_OPTIONS) != 0) return PCRE2_ERROR_BADOPTION;
+if (code == NULL || subject == NULL || match_data == NULL)
+ return PCRE2_ERROR_NULL;
+if (start_offset > length) return PCRE2_ERROR_BADOFFSET;
+
+/* Check that the first field in the block is the magic number. */
+
+if (re->magic_number != MAGIC_NUMBER) return PCRE2_ERROR_BADMAGIC;
+
+/* Check the code unit width. */
+
+if ((re->flags & PCRE2_MODE_MASK) != PCRE2_CODE_UNIT_WIDTH/8)
+ return PCRE2_ERROR_BADMODE;
+
+/* PCRE2_NOTEMPTY and PCRE2_NOTEMPTY_ATSTART are match-time flags in the
+options variable for this function. Users of PCRE2 who are not calling the
+function directly would like to have a way of setting these flags, in the same
+way that they can set pcre2_compile() flags like PCRE2_NO_AUTOPOSSESS with
+constructions like (*NO_AUTOPOSSESS). To enable this, (*NOTEMPTY) and
+(*NOTEMPTY_ATSTART) set bits in the pattern's "flag" function which can now be
+transferred to the options for this function. The bits are guaranteed to be
+adjacent, but do not have the same values. This bit of Boolean trickery assumes
+that the match-time bits are not more significant than the flag bits. If by
+accident this is not the case, a compile-time division by zero error will
+occur. */
+
+#define FF (PCRE2_NOTEMPTY_SET|PCRE2_NE_ATST_SET)
+#define OO (PCRE2_NOTEMPTY|PCRE2_NOTEMPTY_ATSTART)
+options |= (re->flags & FF) / ((FF & (~FF+1)) / (OO & (~OO+1)));
+#undef FF
+#undef OO
+
+/* A NULL match context means "use a default context" */
+
+if (mcontext == NULL)
+ mcontext = (pcre2_match_context *)(&PRIV(default_match_context));
+
+/* These two settings are used in the code for checking a UTF string that
+follows immediately afterwards. Other values in the mb block are used only
+during interpretive pcre_match() processing, not when the JIT support is in
+use, so they are set up later. */
+
+utf = (re->overall_options & PCRE2_UTF) != 0;
+mb->partial = ((options & PCRE2_PARTIAL_HARD) != 0)? 2 :
+ ((options & PCRE2_PARTIAL_SOFT) != 0)? 1 : 0;
+
+/* Check a UTF string for validity if required. For 8-bit and 16-bit strings,
+we must also check that a starting offset does not point into the middle of a
+multiunit character. We check only the portion of the subject that is going to
+be inspected during matching - from the offset minus the maximum back reference
+to the given length. This saves time when a small part of a large subject is
+being matched by the use of a starting offset. Note that the maximum lookbehind
+is a number of characters, not code units. */
+
+#ifdef SUPPORT_UNICODE
+if (utf && (options & PCRE2_NO_UTF_CHECK) == 0)
+ {
+ PCRE2_SPTR check_subject = start_match; /* start_match includes offset */
+
+ if (start_offset > 0)
+ {
+#if PCRE2_CODE_UNIT_WIDTH != 32
+ unsigned int i;
+ if (start_match < end_subject && NOT_FIRSTCU(*start_match))
+ return PCRE2_ERROR_BADUTFOFFSET;
+ for (i = re->max_lookbehind; i > 0 && check_subject > subject; i--)
+ {
+ check_subject--;
+ while (check_subject > subject &&
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ (*check_subject & 0xc0) == 0x80)
+#else /* 16-bit */
+ (*check_subject & 0xfc00) == 0xdc00)
+#endif /* PCRE2_CODE_UNIT_WIDTH == 8 */
+ check_subject--;
+ }
+#else
+ /* In the 32-bit library, one code unit equals one character. However,
+ we cannot just subtract the lookbehind and then compare pointers, because
+ a very large lookbehind could create an invalid pointer. */
+
+ if (start_offset >= re->max_lookbehind)
+ check_subject -= re->max_lookbehind;
+ else
+ check_subject = subject;
+#endif /* PCRE2_CODE_UNIT_WIDTH != 32 */
+ }
+
+ /* Validate the relevant portion of the subject. After an error, adjust the
+ offset to be an absolute offset in the whole string. */
+
+ match_data->rc = PRIV(valid_utf)(check_subject,
+ length - (check_subject - subject), &(match_data->startchar));
+ if (match_data->rc != 0)
+ {
+ match_data->startchar += check_subject - subject;
+ return match_data->rc;
+ }
+ }
+#endif /* SUPPORT_UNICODE */
+
+/* It is an error to set an offset limit without setting the flag at compile
+time. */
+
+if (mcontext->offset_limit != PCRE2_UNSET &&
+ (re->overall_options & PCRE2_USE_OFFSET_LIMIT) == 0)
+ return PCRE2_ERROR_BADOFFSETLIMIT;
+
+/* If the pattern was successfully studied with JIT support, run the JIT
+executable instead of the rest of this function. Most options must be set at
+compile time for the JIT code to be usable. Fallback to the normal code path if
+an unsupported option is set or if JIT returns BADOPTION (which means that the
+selected normal or partial matching mode was not compiled). */
+
+#ifdef SUPPORT_JIT
+if (re->executable_jit != NULL && (options & ~PUBLIC_JIT_MATCH_OPTIONS) == 0)
+ {
+ rc = pcre2_jit_match(code, subject, length, start_offset, options,
+ match_data, mcontext);
+ if (rc != PCRE2_ERROR_JIT_BADOPTION) return rc;
+ }
+#endif
+
+/* Carry on with non-JIT matching. */
+
+anchored = ((re->overall_options | options) & PCRE2_ANCHORED) != 0;
+firstline = (re->overall_options & PCRE2_FIRSTLINE) != 0;
+startline = (re->flags & PCRE2_STARTLINE) != 0;
+bumpalong_limit = (mcontext->offset_limit == PCRE2_UNSET)?
+ end_subject : subject + mcontext->offset_limit;
+
+/* Fill in the fields in the match block. */
+
+mb->callout = mcontext->callout;
+mb->callout_data = mcontext->callout_data;
+mb->memctl = mcontext->memctl;
+#ifdef HEAP_MATCH_RECURSE
+mb->stack_memctl = mcontext->stack_memctl;
+#endif
+
+mb->start_subject = subject;
+mb->start_offset = start_offset;
+mb->end_subject = end_subject;
+mb->hasthen = (re->flags & PCRE2_HASTHEN) != 0;
+
+mb->moptions = options; /* Match options */
+mb->poptions = re->overall_options; /* Pattern options */
+
+mb->ignore_skip_arg = 0;
+mb->mark = mb->nomatch_mark = NULL; /* In case never set */
+mb->recursive = NULL; /* No recursion at top level */
+mb->ovecsave_chain = NULL; /* No ovecsave blocks yet */
+mb->hitend = FALSE;
+
+/* The name table is needed for finding all the numbers associated with a
+given name, for condition testing. The code follows the name table. */
+
+mb->name_table = (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code));
+mb->name_count = re->name_count;
+mb->name_entry_size = re->name_entry_size;
+mb->start_code = mb->name_table + re->name_count * re->name_entry_size;
+
+/* Limits set in the pattern override the match context only if they are
+smaller. */
+
+mb->match_limit = (mcontext->match_limit < re->limit_match)?
+ mcontext->match_limit : re->limit_match;
+mb->match_limit_recursion = (mcontext->recursion_limit < re->limit_recursion)?
+ mcontext->recursion_limit : re->limit_recursion;
+
+/* Pointers to the individual character tables */
+
+mb->lcc = re->tables + lcc_offset;
+mb->fcc = re->tables + fcc_offset;
+mb->ctypes = re->tables + ctypes_offset;
+
+/* Process the \R and newline settings. */
+
+mb->bsr_convention = re->bsr_convention;
+mb->nltype = NLTYPE_FIXED;
+switch(re->newline_convention)
+ {
+ case PCRE2_NEWLINE_CR:
+ mb->nllen = 1;
+ mb->nl[0] = CHAR_CR;
+ break;
+
+ case PCRE2_NEWLINE_LF:
+ mb->nllen = 1;
+ mb->nl[0] = CHAR_NL;
+ break;
+
+ case PCRE2_NEWLINE_CRLF:
+ mb->nllen = 2;
+ mb->nl[0] = CHAR_CR;
+ mb->nl[1] = CHAR_NL;
+ break;
+
+ case PCRE2_NEWLINE_ANY:
+ mb->nltype = NLTYPE_ANY;
+ break;
+
+ case PCRE2_NEWLINE_ANYCRLF:
+ mb->nltype = NLTYPE_ANYCRLF;
+ break;
+
+ default: return PCRE2_ERROR_INTERNAL;
+ }
+
+/* If the expression has got more back references than the offsets supplied can
+hold, we get a temporary chunk of memory to use during the matching. Otherwise,
+we can use the vector supplied. The size of the ovector is three times the
+value in the oveccount field. Two-thirds of it is pairs for storing matching
+offsets, and the top third is working space. */
+
+if (re->top_backref >= match_data->oveccount)
+ {
+ ocount = re->top_backref * 3 + 3;
+ mb->ovector = (PCRE2_SIZE *)(mb->memctl.malloc(ocount * sizeof(PCRE2_SIZE),
+ mb->memctl.memory_data));
+ if (mb->ovector == NULL) return PCRE2_ERROR_NOMEMORY;
+ using_temporary_offsets = TRUE;
+ }
+else
+ {
+ ocount = 3 * match_data->oveccount;
+ mb->ovector = match_data->ovector;
+ }
+
+mb->offset_end = ocount;
+mb->offset_max = (2*ocount)/3;
+
+/* Reset the working variable associated with each extraction. These should
+never be used unless previously set, but they get saved and restored, and so we
+initialize them to avoid reading uninitialized locations. Also, unset the
+offsets for the matched string. This is really just for tidiness with callouts,
+in case they inspect these fields. */
+
+if (ocount > 0)
+ {
+ PCRE2_SIZE *iptr = mb->ovector + ocount;
+ PCRE2_SIZE *iend = iptr - re->top_bracket;
+ if (iend < mb->ovector + 2) iend = mb->ovector + 2;
+ while (--iptr >= iend) *iptr = PCRE2_UNSET;
+ mb->ovector[0] = mb->ovector[1] = PCRE2_UNSET;
+ }
+
+/* Set up the first code unit to match, if available. The first_codeunit value
+is never set for an anchored regular expression, but the anchoring may be
+forced at run time, so we have to test for anchoring. The first code unit may
+be unset for an unanchored pattern, of course. If there's no first code unit
+there may be a bitmap of possible first characters. */
+
+if (!anchored)
+ {
+ if ((re->flags & PCRE2_FIRSTSET) != 0)
+ {
+ has_first_cu = TRUE;
+ first_cu = first_cu2 = (PCRE2_UCHAR)(re->first_codeunit);
+ if ((re->flags & PCRE2_FIRSTCASELESS) != 0)
+ {
+ first_cu2 = TABLE_GET(first_cu, mb->fcc, first_cu);
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 8
+ if (utf && first_cu > 127) first_cu2 = UCD_OTHERCASE(first_cu);
+#endif
+ }
+ }
+ else
+ if (!startline && (re->flags & PCRE2_FIRSTMAPSET) != 0)
+ start_bits = re->start_bitmap;
+ }
+
+/* For anchored or unanchored matches, there may be a "last known required
+character" set. */
+
+if ((re->flags & PCRE2_LASTSET) != 0)
+ {
+ has_req_cu = TRUE;
+ req_cu = req_cu2 = (PCRE2_UCHAR)(re->last_codeunit);
+ if ((re->flags & PCRE2_LASTCASELESS) != 0)
+ {
+ req_cu2 = TABLE_GET(req_cu, mb->fcc, req_cu);
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 8
+ if (utf && req_cu > 127) req_cu2 = UCD_OTHERCASE(req_cu);
+#endif
+ }
+ }
+
+
+/* ==========================================================================*/
+
+/* Loop for handling unanchored repeated matching attempts; for anchored regexs
+the loop runs just once. */
+
+for(;;)
+ {
+ PCRE2_SPTR new_start_match;
+ mb->capture_last = 0;
+
+ /* ----------------- Start of match optimizations ---------------- */
+
+ /* There are some optimizations that avoid running the match if a known
+ starting point is not found, or if a known later code unit is not present.
+ However, there is an option (settable at compile time) that disables these,
+ for testing and for ensuring that all callouts do actually occur. */
+
+ if ((re->overall_options & PCRE2_NO_START_OPTIMIZE) == 0)
+ {
+ PCRE2_SPTR save_end_subject = end_subject;
+
+ /* If firstline is TRUE, the start of the match is constrained to the first
+ line of a multiline string. That is, the match must be before or at the
+ first newline. Implement this by temporarily adjusting end_subject so that
+ we stop the optimization scans at a newline. If the match fails at the
+ newline, later code breaks this loop. */
+
+ if (firstline)
+ {
+ PCRE2_SPTR t = start_match;
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ while (t < mb->end_subject && !IS_NEWLINE(t))
+ {
+ t++;
+ ACROSSCHAR(t < end_subject, *t, t++);
+ }
+ }
+ else
+#endif
+ while (t < mb->end_subject && !IS_NEWLINE(t)) t++;
+ end_subject = t;
+ }
+
+ /* Advance to a unique first code unit if there is one. In 8-bit mode, the
+ use of memchr() gives a big speed up. */
+
+ if (has_first_cu)
+ {
+ PCRE2_UCHAR smc;
+ if (first_cu != first_cu2)
+ while (start_match < end_subject &&
+ (smc = UCHAR21TEST(start_match)) != first_cu && smc != first_cu2)
+ start_match++;
+ else
+ {
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ while (start_match < end_subject && UCHAR21TEST(start_match) != first_cu)
+ start_match++;
+#else
+ start_match = memchr(start_match, first_cu, end_subject - start_match);
+ if (start_match == NULL) start_match = end_subject;
+#endif
+ }
+ }
+
+ /* Or to just after a linebreak for a multiline match */
+
+ else if (startline)
+ {
+ if (start_match > mb->start_subject + start_offset)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ while (start_match < end_subject && !WAS_NEWLINE(start_match))
+ {
+ start_match++;
+ ACROSSCHAR(start_match < end_subject, *start_match,
+ start_match++);
+ }
+ }
+ else
+#endif
+ while (start_match < end_subject && !WAS_NEWLINE(start_match))
+ start_match++;
+
+ /* If we have just passed a CR and the newline option is ANY or
+ ANYCRLF, and we are now at a LF, advance the match position by one more
+ code unit. */
+
+ if (start_match[-1] == CHAR_CR &&
+ (mb->nltype == NLTYPE_ANY || mb->nltype == NLTYPE_ANYCRLF) &&
+ start_match < end_subject &&
+ UCHAR21TEST(start_match) == CHAR_NL)
+ start_match++;
+ }
+ }
+
+ /* Or to a non-unique first code unit if any have been identified. The
+ bitmap contains only 256 bits. When code units are 16 or 32 bits wide, all
+ code units greater than 254 set the 255 bit. */
+
+ else if (start_bits != NULL)
+ {
+ while (start_match < end_subject)
+ {
+ uint32_t c = UCHAR21TEST(start_match);
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ if (c > 255) c = 255;
+#endif
+ if ((start_bits[c/8] & (1 << (c&7))) != 0) break;
+ start_match++;
+ }
+ }
+
+ /* Restore fudged end_subject */
+
+ end_subject = save_end_subject;
+
+ /* The following two optimizations are disabled for partial matching. */
+
+ if (!mb->partial)
+ {
+ /* The minimum matching length is a lower bound; no actual string of that
+ length may actually match the pattern. Although the value is, strictly,
+ in characters, we treat it as code units to avoid spending too much time
+ in this optimization. */
+
+ if (end_subject - start_match < re->minlength)
+ {
+ rc = MATCH_NOMATCH;
+ break;
+ }
+
+ /* If req_cu is set, we know that that code unit must appear in the
+ subject for the match to succeed. If the first code unit is set, req_cu
+ must be later in the subject; otherwise the test starts at the match
+ point. This optimization can save a huge amount of backtracking in
+ patterns with nested unlimited repeats that aren't going to match.
+ Writing separate code for cased/caseless versions makes it go faster, as
+ does using an autoincrement and backing off on a match.
+
+ HOWEVER: when the subject string is very, very long, searching to its end
+ can take a long time, and give bad performance on quite ordinary
+ patterns. This showed up when somebody was matching something like
+ /^\d+C/ on a 32-megabyte string... so we don't do this when the string is
+ sufficiently long. */
+
+ if (has_req_cu && end_subject - start_match < REQ_CU_MAX)
+ {
+ PCRE2_SPTR p = start_match + (has_first_cu? 1:0);
+
+ /* We don't need to repeat the search if we haven't yet reached the
+ place we found it at last time. */
+
+ if (p > req_cu_ptr)
+ {
+ if (req_cu != req_cu2)
+ {
+ while (p < end_subject)
+ {
+ uint32_t pp = UCHAR21INCTEST(p);
+ if (pp == req_cu || pp == req_cu2) { p--; break; }
+ }
+ }
+ else
+ {
+ while (p < end_subject)
+ {
+ if (UCHAR21INCTEST(p) == req_cu) { p--; break; }
+ }
+ }
+
+ /* If we can't find the required code unit, break the matching loop,
+ forcing a match failure. */
+
+ if (p >= end_subject)
+ {
+ rc = MATCH_NOMATCH;
+ break;
+ }
+
+ /* If we have found the required code unit, save the point where we
+ found it, so that we don't search again next time round the loop if
+ the start hasn't passed this code unit yet. */
+
+ req_cu_ptr = p;
+ }
+ }
+ }
+ }
+
+ /* ------------ End of start of match optimizations ------------ */
+
+ /* Give no match if we have passed the bumpalong limit. */
+
+ if (start_match > bumpalong_limit)
+ {
+ rc = MATCH_NOMATCH;
+ break;
+ }
+
+ /* OK, we can now run the match. If "hitend" is set afterwards, remember the
+ first starting point for which a partial match was found. */
+
+ mb->start_match_ptr = start_match;
+ mb->start_used_ptr = start_match;
+ mb->last_used_ptr = start_match;
+ mb->match_call_count = 0;
+ mb->match_function_type = 0;
+ mb->end_offset_top = 0;
+ mb->skip_arg_count = 0;
+ rc = match(start_match, mb->start_code, start_match, 2, mb, NULL, 0);
+
+ if (mb->hitend && start_partial == NULL)
+ {
+ start_partial = mb->start_used_ptr;
+ match_partial = start_match;
+ }
+
+ switch(rc)
+ {
+ /* If MATCH_SKIP_ARG reaches this level it means that a MARK that matched
+ the SKIP's arg was not found. In this circumstance, Perl ignores the SKIP
+ entirely. The only way we can do that is to re-do the match at the same
+ point, with a flag to force SKIP with an argument to be ignored. Just
+ treating this case as NOMATCH does not work because it does not check other
+ alternatives in patterns such as A(*SKIP:A)B|AC when the subject is AC. */
+
+ case MATCH_SKIP_ARG:
+ new_start_match = start_match;
+ mb->ignore_skip_arg = mb->skip_arg_count;
+ break;
+
+ /* SKIP passes back the next starting point explicitly, but if it is no
+ greater than the match we have just done, treat it as NOMATCH. */
+
+ case MATCH_SKIP:
+ if (mb->start_match_ptr > start_match)
+ {
+ new_start_match = mb->start_match_ptr;
+ break;
+ }
+ /* Fall through */
+
+ /* NOMATCH and PRUNE advance by one character. THEN at this level acts
+ exactly like PRUNE. Unset ignore SKIP-with-argument. */
+
+ case MATCH_NOMATCH:
+ case MATCH_PRUNE:
+ case MATCH_THEN:
+ mb->ignore_skip_arg = 0;
+ new_start_match = start_match + 1;
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ ACROSSCHAR(new_start_match < end_subject, *new_start_match,
+ new_start_match++);
+#endif
+ break;
+
+ /* COMMIT disables the bumpalong, but otherwise behaves as NOMATCH. */
+
+ case MATCH_COMMIT:
+ rc = MATCH_NOMATCH;
+ goto ENDLOOP;
+
+ /* Any other return is either a match, or some kind of error. */
+
+ default:
+ goto ENDLOOP;
+ }
+
+ /* Control reaches here for the various types of "no match at this point"
+ result. Reset the code to MATCH_NOMATCH for subsequent checking. */
+
+ rc = MATCH_NOMATCH;
+
+ /* If PCRE2_FIRSTLINE is set, the match must happen before or at the first
+ newline in the subject (though it may continue over the newline). Therefore,
+ if we have just failed to match, starting at a newline, do not continue. */
+
+ if (firstline && IS_NEWLINE(start_match)) break;
+
+ /* Advance to new matching position */
+
+ start_match = new_start_match;
+
+ /* Break the loop if the pattern is anchored or if we have passed the end of
+ the subject. */
+
+ if (anchored || start_match > end_subject) break;
+
+ /* If we have just passed a CR and we are now at a LF, and the pattern does
+ not contain any explicit matches for \r or \n, and the newline option is CRLF
+ or ANY or ANYCRLF, advance the match position by one more code unit. In
+ normal matching start_match will aways be greater than the first position at
+ this stage, but a failed *SKIP can cause a return at the same point, which is
+ why the first test exists. */
+
+ if (start_match > subject + start_offset &&
+ start_match[-1] == CHAR_CR &&
+ start_match < end_subject &&
+ *start_match == CHAR_NL &&
+ (re->flags & PCRE2_HASCRORLF) == 0 &&
+ (mb->nltype == NLTYPE_ANY ||
+ mb->nltype == NLTYPE_ANYCRLF ||
+ mb->nllen == 2))
+ start_match++;
+
+ mb->mark = NULL; /* Reset for start of next match attempt */
+ } /* End of for(;;) "bumpalong" loop */
+
+/* ==========================================================================*/
+
+/* When we reach here, one of the stopping conditions is true:
+
+(1) The match succeeded, either completely, or partially;
+
+(2) The pattern is anchored or the match was failed by (*COMMIT);
+
+(3) We are past the end of the subject or the bumpalong limit;
+
+(4) PCRE2_FIRSTLINE is set and we have failed to match at a newline, because
+ this option requests that a match occur at or before the first newline in
+ the subject.
+
+(5) Some kind of error occurred.
+
+*/
+
+ENDLOOP:
+
+#ifdef HEAP_MATCH_RECURSE
+release_match_heapframes(&frame_zero, mb);
+#endif
+
+/* Release any frames that were saved from recursions. */
+
+while (mb->ovecsave_chain != NULL)
+ {
+ ovecsave_frame *this = mb->ovecsave_chain;
+ mb->ovecsave_chain = this->next;
+ mb->memctl.free(this, mb->memctl.memory_data);
+ }
+
+/* Fill in fields that are always returned in the match data. */
+
+match_data->code = re;
+match_data->subject = subject;
+match_data->mark = mb->mark;
+match_data->matchedby = PCRE2_MATCHEDBY_INTERPRETER;
+
+/* Handle a fully successful match. */
+
+if (rc == MATCH_MATCH || rc == MATCH_ACCEPT)
+ {
+ uint32_t arg_offset_max = 2 * match_data->oveccount;
+
+ /* When the offset vector is big enough to deal with any backreferences,
+ captured substring offsets will already be set up. In the case where we had
+ to get some local memory to hold offsets for backreference processing, copy
+ those that we can. In this case there need not be overflow if certain parts
+ of the pattern were not used, even though there are more capturing
+ parentheses than vector slots. */
+
+ if (using_temporary_offsets)
+ {
+ if (arg_offset_max >= 4)
+ {
+ memcpy(match_data->ovector + 2, mb->ovector + 2,
+ (arg_offset_max - 2) * sizeof(PCRE2_SIZE));
+ }
+ if (mb->end_offset_top > arg_offset_max) mb->capture_last |= OVFLBIT;
+ mb->memctl.free(mb->ovector, mb->memctl.memory_data);
+ }
+
+ /* Set the return code to the number of captured strings, or 0 if there were
+ too many to fit into the ovector. */
+
+ match_data->rc = ((mb->capture_last & OVFLBIT) != 0)?
+ 0 : (int)mb->end_offset_top/2;
+
+ /* If there is space in the offset vector, set any pairs that follow the
+ highest-numbered captured string but are less than the number of capturing
+ groups in the pattern (and are within the ovector) to PCRE2_UNSET. It is
+ documented that this happens. In earlier versions, the whole set of potential
+ capturing offsets was initialized each time round the loop, but this is
+ handled differently now. "Gaps" are set to PCRE2_UNSET dynamically instead
+ (this fixed a bug). Thus, it is only those at the end that need setting here.
+ We can't just mark them all unset at the start of the whole thing because
+ they may get set in one branch that is not the final matching branch. */
+
+ if (mb->end_offset_top/2 <= re->top_bracket)
+ {
+ PCRE2_SIZE *iptr, *iend;
+ int resetcount = re->top_bracket + 1;
+ if (resetcount > match_data->oveccount) resetcount = match_data->oveccount;
+ iptr = match_data->ovector + mb->end_offset_top;
+ iend = match_data->ovector + 2 * resetcount;
+ while (iptr < iend) *iptr++ = PCRE2_UNSET;
+ }
+
+ /* If there is space, set up the whole thing as substring 0. The value of
+ mb->start_match_ptr might be modified if \K was encountered on the success
+ matching path. */
+
+ if (match_data->oveccount < 1) rc = 0; else
+ {
+ match_data->ovector[0] = mb->start_match_ptr - mb->start_subject;
+ match_data->ovector[1] = mb->end_match_ptr - mb->start_subject;
+ }
+
+ /* Set the remaining returned values */
+
+ match_data->startchar = start_match - subject;
+ match_data->leftchar = mb->start_used_ptr - subject;
+ match_data->rightchar = ((mb->last_used_ptr > mb->end_match_ptr)?
+ mb->last_used_ptr : mb->end_match_ptr) - subject;
+ return match_data->rc;
+ }
+
+/* Control gets here if there has been a partial match, an error, or if the
+overall match attempt has failed at all permitted starting positions. Any mark
+data is in the nomatch_mark field. */
+
+match_data->mark = mb->nomatch_mark;
+
+/* For anything other than nomatch or partial match, just return the code. */
+
+if (rc != MATCH_NOMATCH && rc != PCRE2_ERROR_PARTIAL)
+ match_data->rc = rc;
+
+/* Else handle a partial match. */
+
+else if (match_partial != NULL)
+ {
+ if (match_data->oveccount > 0)
+ {
+ match_data->ovector[0] = match_partial - subject;
+ match_data->ovector[1] = end_subject - subject;
+ }
+ match_data->startchar = match_partial - subject;
+ match_data->leftchar = start_partial - subject;
+ match_data->rightchar = end_subject - subject;
+ match_data->rc = PCRE2_ERROR_PARTIAL;
+ }
+
+/* Else this is the classic nomatch case. */
+
+else match_data->rc = PCRE2_ERROR_NOMATCH;
+
+/* Free any temporary offsets. */
+
+if (using_temporary_offsets)
+ mb->memctl.free(mb->ovector, mb->memctl.memory_data);
+return match_data->rc;
+}
+
+/* End of pcre2_match.c */
diff --git a/thirdparty/pcre2/src/pcre2_match_data.c b/thirdparty/pcre2/src/pcre2_match_data.c
new file mode 100644
index 0000000000..85ac998348
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_match_data.c
@@ -0,0 +1,147 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre2_internal.h"
+
+
+
+/*************************************************
+* Create a match data block given ovector size *
+*************************************************/
+
+/* A minimum of 1 is imposed on the number of ovector triplets. */
+
+PCRE2_EXP_DEFN pcre2_match_data * PCRE2_CALL_CONVENTION
+pcre2_match_data_create(uint32_t oveccount, pcre2_general_context *gcontext)
+{
+pcre2_match_data *yield;
+if (oveccount < 1) oveccount = 1;
+yield = PRIV(memctl_malloc)(
+ sizeof(pcre2_match_data) + 3*oveccount*sizeof(PCRE2_SIZE),
+ (pcre2_memctl *)gcontext);
+if (yield == NULL) return NULL;
+yield->oveccount = oveccount;
+return yield;
+}
+
+
+
+/*************************************************
+* Create a match data block using pattern data *
+*************************************************/
+
+/* If no context is supplied, use the memory allocator from the code. */
+
+PCRE2_EXP_DEFN pcre2_match_data * PCRE2_CALL_CONVENTION
+pcre2_match_data_create_from_pattern(const pcre2_code *code,
+ pcre2_general_context *gcontext)
+{
+if (gcontext == NULL) gcontext = (pcre2_general_context *)code;
+return pcre2_match_data_create(((pcre2_real_code *)code)->top_bracket + 1,
+ gcontext);
+}
+
+
+
+/*************************************************
+* Free a match data block *
+*************************************************/
+
+PCRE2_EXP_DEFN void PCRE2_CALL_CONVENTION
+pcre2_match_data_free(pcre2_match_data *match_data)
+{
+if (match_data != NULL)
+ match_data->memctl.free(match_data, match_data->memctl.memory_data);
+}
+
+
+
+/*************************************************
+* Get last mark in match *
+*************************************************/
+
+PCRE2_EXP_DEFN PCRE2_SPTR PCRE2_CALL_CONVENTION
+pcre2_get_mark(pcre2_match_data *match_data)
+{
+return match_data->mark;
+}
+
+
+
+/*************************************************
+* Get pointer to ovector *
+*************************************************/
+
+PCRE2_EXP_DEFN PCRE2_SIZE * PCRE2_CALL_CONVENTION
+pcre2_get_ovector_pointer(pcre2_match_data *match_data)
+{
+return match_data->ovector;
+}
+
+
+
+/*************************************************
+* Get number of ovector slots *
+*************************************************/
+
+PCRE2_EXP_DEFN uint32_t PCRE2_CALL_CONVENTION
+pcre2_get_ovector_count(pcre2_match_data *match_data)
+{
+return match_data->oveccount;
+}
+
+
+
+/*************************************************
+* Get starting code unit in match *
+*************************************************/
+
+PCRE2_EXP_DEFN PCRE2_SIZE PCRE2_CALL_CONVENTION
+pcre2_get_startchar(pcre2_match_data *match_data)
+{
+return match_data->startchar;
+}
+
+/* End of pcre2_match_data.c */
diff --git a/thirdparty/pcre2/src/pcre2_newline.c b/thirdparty/pcre2/src/pcre2_newline.c
new file mode 100644
index 0000000000..6e9366db93
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_newline.c
@@ -0,0 +1,243 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+/* This module contains internal functions for testing newlines when more than
+one kind of newline is to be recognized. When a newline is found, its length is
+returned. In principle, we could implement several newline "types", each
+referring to a different set of newline characters. At present, PCRE2 supports
+only NLTYPE_FIXED, which gets handled without these functions, NLTYPE_ANYCRLF,
+and NLTYPE_ANY. The full list of Unicode newline characters is taken from
+http://unicode.org/unicode/reports/tr18/. */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre2_internal.h"
+
+
+
+/*************************************************
+* Check for newline at given position *
+*************************************************/
+
+/* This function is called only via the IS_NEWLINE macro, which does so only
+when the newline type is NLTYPE_ANY or NLTYPE_ANYCRLF. The case of a fixed
+newline (NLTYPE_FIXED) is handled inline. It is guaranteed that the code unit
+pointed to by ptr is less than the end of the string.
+
+Arguments:
+ ptr pointer to possible newline
+ type the newline type
+ endptr pointer to the end of the string
+ lenptr where to return the length
+ utf TRUE if in utf mode
+
+Returns: TRUE or FALSE
+*/
+
+BOOL
+PRIV(is_newline)(PCRE2_SPTR ptr, uint32_t type, PCRE2_SPTR endptr,
+ uint32_t *lenptr, BOOL utf)
+{
+uint32_t c;
+
+#ifdef SUPPORT_UNICODE
+if (utf) { GETCHAR(c, ptr); } else c = *ptr;
+#else
+(void)utf;
+c = *ptr;
+#endif /* SUPPORT_UNICODE */
+
+if (type == NLTYPE_ANYCRLF) switch(c)
+ {
+ case CHAR_LF:
+ *lenptr = 1;
+ return TRUE;
+
+ case CHAR_CR:
+ *lenptr = (ptr < endptr - 1 && ptr[1] == CHAR_LF)? 2 : 1;
+ return TRUE;
+
+ default:
+ return FALSE;
+ }
+
+/* NLTYPE_ANY */
+
+else switch(c)
+ {
+#ifdef EBCDIC
+ case CHAR_NEL:
+#endif
+ case CHAR_LF:
+ case CHAR_VT:
+ case CHAR_FF:
+ *lenptr = 1;
+ return TRUE;
+
+ case CHAR_CR:
+ *lenptr = (ptr < endptr - 1 && ptr[1] == CHAR_LF)? 2 : 1;
+ return TRUE;
+
+#ifndef EBCDIC
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ case CHAR_NEL:
+ *lenptr = utf? 2 : 1;
+ return TRUE;
+
+ case 0x2028: /* LS */
+ case 0x2029: /* PS */
+ *lenptr = 3;
+ return TRUE;
+
+#else /* 16-bit or 32-bit code units */
+ case CHAR_NEL:
+ case 0x2028: /* LS */
+ case 0x2029: /* PS */
+ *lenptr = 1;
+ return TRUE;
+#endif
+#endif /* Not EBCDIC */
+
+ default:
+ return FALSE;
+ }
+}
+
+
+
+/*************************************************
+* Check for newline at previous position *
+*************************************************/
+
+/* This function is called only via the WAS_NEWLINE macro, which does so only
+when the newline type is NLTYPE_ANY or NLTYPE_ANYCRLF. The case of a fixed
+newline (NLTYPE_FIXED) is handled inline. It is guaranteed that the initial
+value of ptr is greater than the start of the string that is being processed.
+
+Arguments:
+ ptr pointer to possible newline
+ type the newline type
+ startptr pointer to the start of the string
+ lenptr where to return the length
+ utf TRUE if in utf mode
+
+Returns: TRUE or FALSE
+*/
+
+BOOL
+PRIV(was_newline)(PCRE2_SPTR ptr, uint32_t type, PCRE2_SPTR startptr,
+ uint32_t *lenptr, BOOL utf)
+{
+uint32_t c;
+ptr--;
+
+#ifdef SUPPORT_UNICODE
+if (utf)
+ {
+ BACKCHAR(ptr);
+ GETCHAR(c, ptr);
+ }
+else c = *ptr;
+#else
+(void)utf;
+c = *ptr;
+#endif /* SUPPORT_UNICODE */
+
+if (type == NLTYPE_ANYCRLF) switch(c)
+ {
+ case CHAR_LF:
+ *lenptr = (ptr > startptr && ptr[-1] == CHAR_CR)? 2 : 1;
+ return TRUE;
+
+ case CHAR_CR:
+ *lenptr = 1;
+ return TRUE;
+
+ default:
+ return FALSE;
+ }
+
+/* NLTYPE_ANY */
+
+else switch(c)
+ {
+ case CHAR_LF:
+ *lenptr = (ptr > startptr && ptr[-1] == CHAR_CR)? 2 : 1;
+ return TRUE;
+
+#ifdef EBCDIC
+ case CHAR_NEL:
+#endif
+ case CHAR_VT:
+ case CHAR_FF:
+ case CHAR_CR:
+ *lenptr = 1;
+ return TRUE;
+
+#ifndef EBCDIC
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ case CHAR_NEL:
+ *lenptr = utf? 2 : 1;
+ return TRUE;
+
+ case 0x2028: /* LS */
+ case 0x2029: /* PS */
+ *lenptr = 3;
+ return TRUE;
+
+#else /* 16-bit or 32-bit code units */
+ case CHAR_NEL:
+ case 0x2028: /* LS */
+ case 0x2029: /* PS */
+ *lenptr = 1;
+ return TRUE;
+#endif
+#endif /* Not EBCDIC */
+
+ default:
+ return FALSE;
+ }
+}
+
+/* End of pcre2_newline.c */
diff --git a/thirdparty/pcre2/src/pcre2_ord2utf.c b/thirdparty/pcre2/src/pcre2_ord2utf.c
new file mode 100644
index 0000000000..1403730996
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_ord2utf.c
@@ -0,0 +1,120 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+/* This file contains a function that converts a Unicode character code point
+into a UTF string. The behaviour is different for each code unit width. */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre2_internal.h"
+
+
+/* If SUPPORT_UNICODE is not defined, this function will never be called.
+Supply a dummy function because some compilers do not like empty source
+modules. */
+
+#ifndef SUPPORT_UNICODE
+unsigned int
+PRIV(ord2utf)(uint32_t cvalue, PCRE2_UCHAR *buffer)
+{
+(void)(cvalue);
+(void)(buffer);
+return 0;
+}
+#else /* SUPPORT_UNICODE */
+
+
+/*************************************************
+* Convert code point to UTF *
+*************************************************/
+
+/*
+Arguments:
+ cvalue the character value
+ buffer pointer to buffer for result
+
+Returns: number of code units placed in the buffer
+*/
+
+unsigned int
+PRIV(ord2utf)(uint32_t cvalue, PCRE2_UCHAR *buffer)
+{
+/* Convert to UTF-8 */
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+int i, j;
+for (i = 0; i < PRIV(utf8_table1_size); i++)
+ if ((int)cvalue <= PRIV(utf8_table1)[i]) break;
+buffer += i;
+for (j = i; j > 0; j--)
+ {
+ *buffer-- = 0x80 | (cvalue & 0x3f);
+ cvalue >>= 6;
+ }
+*buffer = PRIV(utf8_table2)[i] | cvalue;
+return i + 1;
+
+/* Convert to UTF-16 */
+
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+if (cvalue <= 0xffff)
+ {
+ *buffer = (PCRE2_UCHAR)cvalue;
+ return 1;
+ }
+cvalue -= 0x10000;
+*buffer++ = 0xd800 | (cvalue >> 10);
+*buffer = 0xdc00 | (cvalue & 0x3ff);
+return 2;
+
+/* Convert to UTF-32 */
+
+#else
+*buffer = (PCRE2_UCHAR)cvalue;
+return 1;
+#endif
+}
+#endif /* SUPPORT_UNICODE */
+
+/* End of pcre_ord2utf.c */
diff --git a/thirdparty/pcre2/src/pcre2_pattern_info.c b/thirdparty/pcre2/src/pcre2_pattern_info.c
new file mode 100644
index 0000000000..5b32a905b0
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_pattern_info.c
@@ -0,0 +1,410 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre2_internal.h"
+
+
+/*************************************************
+* Return info about compiled pattern *
+*************************************************/
+
+/*
+Arguments:
+ code points to compiled code
+ what what information is required
+ where where to put the information; if NULL, return length
+
+Returns: 0 when data returned
+ > 0 when length requested
+ < 0 on error or unset value
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_pattern_info(const pcre2_code *code, uint32_t what, void *where)
+{
+const pcre2_real_code *re = (pcre2_real_code *)code;
+
+if (where == NULL) /* Requests field length */
+ {
+ switch(what)
+ {
+ case PCRE2_INFO_ALLOPTIONS:
+ case PCRE2_INFO_ARGOPTIONS:
+ case PCRE2_INFO_BACKREFMAX:
+ case PCRE2_INFO_BSR:
+ case PCRE2_INFO_CAPTURECOUNT:
+ case PCRE2_INFO_FIRSTCODETYPE:
+ case PCRE2_INFO_FIRSTCODEUNIT:
+ case PCRE2_INFO_HASBACKSLASHC:
+ case PCRE2_INFO_HASCRORLF:
+ case PCRE2_INFO_JCHANGED:
+ case PCRE2_INFO_LASTCODETYPE:
+ case PCRE2_INFO_LASTCODEUNIT:
+ case PCRE2_INFO_MATCHEMPTY:
+ case PCRE2_INFO_MATCHLIMIT:
+ case PCRE2_INFO_MAXLOOKBEHIND:
+ case PCRE2_INFO_MINLENGTH:
+ case PCRE2_INFO_NAMEENTRYSIZE:
+ case PCRE2_INFO_NAMECOUNT:
+ case PCRE2_INFO_NEWLINE:
+ case PCRE2_INFO_RECURSIONLIMIT:
+ return sizeof(uint32_t);
+
+ case PCRE2_INFO_FIRSTBITMAP:
+ return sizeof(const uint8_t *);
+
+ case PCRE2_INFO_JITSIZE:
+ case PCRE2_INFO_SIZE:
+ return sizeof(size_t);
+
+ case PCRE2_INFO_NAMETABLE:
+ return sizeof(PCRE2_SPTR);
+ }
+ }
+
+if (re == NULL) return PCRE2_ERROR_NULL;
+
+/* Check that the first field in the block is the magic number. If it is not,
+return with PCRE2_ERROR_BADMAGIC. */
+
+if (re->magic_number != MAGIC_NUMBER) return PCRE2_ERROR_BADMAGIC;
+
+/* Check that this pattern was compiled in the correct bit mode */
+
+if ((re->flags & (PCRE2_CODE_UNIT_WIDTH/8)) == 0) return PCRE2_ERROR_BADMODE;
+
+switch(what)
+ {
+ case PCRE2_INFO_ALLOPTIONS:
+ *((uint32_t *)where) = re->overall_options;
+ break;
+
+ case PCRE2_INFO_ARGOPTIONS:
+ *((uint32_t *)where) = re->compile_options;
+ break;
+
+ case PCRE2_INFO_BACKREFMAX:
+ *((uint32_t *)where) = re->top_backref;
+ break;
+
+ case PCRE2_INFO_BSR:
+ *((uint32_t *)where) = re->bsr_convention;
+ break;
+
+ case PCRE2_INFO_CAPTURECOUNT:
+ *((uint32_t *)where) = re->top_bracket;
+ break;
+
+ case PCRE2_INFO_FIRSTCODETYPE:
+ *((uint32_t *)where) = ((re->flags & PCRE2_FIRSTSET) != 0)? 1 :
+ ((re->flags & PCRE2_STARTLINE) != 0)? 2 : 0;
+ break;
+
+ case PCRE2_INFO_FIRSTCODEUNIT:
+ *((uint32_t *)where) = ((re->flags & PCRE2_FIRSTSET) != 0)?
+ re->first_codeunit : 0;
+ break;
+
+ case PCRE2_INFO_FIRSTBITMAP:
+ *((const uint8_t **)where) = ((re->flags & PCRE2_FIRSTMAPSET) != 0)?
+ &(re->start_bitmap[0]) : NULL;
+ break;
+
+ case PCRE2_INFO_HASBACKSLASHC:
+ *((uint32_t *)where) = (re->flags & PCRE2_HASBKC) != 0;
+ break;
+
+ case PCRE2_INFO_HASCRORLF:
+ *((uint32_t *)where) = (re->flags & PCRE2_HASCRORLF) != 0;
+ break;
+
+ case PCRE2_INFO_JCHANGED:
+ *((uint32_t *)where) = (re->flags & PCRE2_JCHANGED) != 0;
+ break;
+
+ case PCRE2_INFO_JITSIZE:
+#ifdef SUPPORT_JIT
+ *((size_t *)where) = (re->executable_jit != NULL)?
+ PRIV(jit_get_size)(re->executable_jit) : 0;
+#else
+ *((size_t *)where) = 0;
+#endif
+ break;
+
+ case PCRE2_INFO_LASTCODETYPE:
+ *((uint32_t *)where) = ((re->flags & PCRE2_LASTSET) != 0)? 1 : 0;
+ break;
+
+ case PCRE2_INFO_LASTCODEUNIT:
+ *((uint32_t *)where) = ((re->flags & PCRE2_LASTSET) != 0)?
+ re->last_codeunit : 0;
+ break;
+
+ case PCRE2_INFO_MATCHEMPTY:
+ *((uint32_t *)where) = (re->flags & PCRE2_MATCH_EMPTY) != 0;
+ break;
+
+ case PCRE2_INFO_MATCHLIMIT:
+ *((uint32_t *)where) = re->limit_match;
+ if (re->limit_match == UINT32_MAX) return PCRE2_ERROR_UNSET;
+ break;
+
+ case PCRE2_INFO_MAXLOOKBEHIND:
+ *((uint32_t *)where) = re->max_lookbehind;
+ break;
+
+ case PCRE2_INFO_MINLENGTH:
+ *((uint32_t *)where) = re->minlength;
+ break;
+
+ case PCRE2_INFO_NAMEENTRYSIZE:
+ *((uint32_t *)where) = re->name_entry_size;
+ break;
+
+ case PCRE2_INFO_NAMECOUNT:
+ *((uint32_t *)where) = re->name_count;
+ break;
+
+ case PCRE2_INFO_NAMETABLE:
+ *((PCRE2_SPTR *)where) = (PCRE2_SPTR)((char *)re + sizeof(pcre2_real_code));
+ break;
+
+ case PCRE2_INFO_NEWLINE:
+ *((uint32_t *)where) = re->newline_convention;
+ break;
+
+ case PCRE2_INFO_RECURSIONLIMIT:
+ *((uint32_t *)where) = re->limit_recursion;
+ if (re->limit_recursion == UINT32_MAX) return PCRE2_ERROR_UNSET;
+ break;
+
+ case PCRE2_INFO_SIZE:
+ *((size_t *)where) = re->blocksize;
+ break;
+
+ default: return PCRE2_ERROR_BADOPTION;
+ }
+
+return 0;
+}
+
+
+
+/*************************************************
+* Callout enumerator *
+*************************************************/
+
+/*
+Arguments:
+ code points to compiled code
+ callback function called for each callout block
+ callout_data user data passed to the callback
+
+Returns: 0 when successfully completed
+ < 0 on local error
+ != 0 for callback error
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_callout_enumerate(const pcre2_code *code,
+ int (*callback)(pcre2_callout_enumerate_block *, void *), void *callout_data)
+{
+pcre2_real_code *re = (pcre2_real_code *)code;
+pcre2_callout_enumerate_block cb;
+PCRE2_SPTR cc;
+#ifdef SUPPORT_UNICODE
+BOOL utf = (re->overall_options & PCRE2_UTF) != 0;
+#endif
+
+if (re == NULL) return PCRE2_ERROR_NULL;
+
+/* Check that the first field in the block is the magic number. If it is not,
+return with PCRE2_ERROR_BADMAGIC. */
+
+if (re->magic_number != MAGIC_NUMBER) return PCRE2_ERROR_BADMAGIC;
+
+/* Check that this pattern was compiled in the correct bit mode */
+
+if ((re->flags & (PCRE2_CODE_UNIT_WIDTH/8)) == 0) return PCRE2_ERROR_BADMODE;
+
+cb.version = 0;
+cc = (PCRE2_SPTR)((uint8_t *)re + sizeof(pcre2_real_code))
+ + re->name_count * re->name_entry_size;
+
+while (TRUE)
+ {
+ int rc;
+ switch (*cc)
+ {
+ case OP_END:
+ return 0;
+
+ case OP_CHAR:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_QUERY:
+ case OP_MINQUERY:
+ case OP_UPTO:
+ case OP_MINUPTO:
+ case OP_EXACT:
+ case OP_POSSTAR:
+ case OP_POSPLUS:
+ case OP_POSQUERY:
+ case OP_POSUPTO:
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_UPTOI:
+ case OP_MINUPTOI:
+ case OP_EXACTI:
+ case OP_POSSTARI:
+ case OP_POSPLUSI:
+ case OP_POSQUERYI:
+ case OP_POSUPTOI:
+ case OP_NOTSTAR:
+ case OP_NOTMINSTAR:
+ case OP_NOTPLUS:
+ case OP_NOTMINPLUS:
+ case OP_NOTQUERY:
+ case OP_NOTMINQUERY:
+ case OP_NOTUPTO:
+ case OP_NOTMINUPTO:
+ case OP_NOTEXACT:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSUPTO:
+ case OP_NOTSTARI:
+ case OP_NOTMINSTARI:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUSI:
+ case OP_NOTQUERYI:
+ case OP_NOTMINQUERYI:
+ case OP_NOTUPTOI:
+ case OP_NOTMINUPTOI:
+ case OP_NOTEXACTI:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSUPTOI:
+ cc += PRIV(OP_lengths)[*cc];
+#ifdef SUPPORT_UNICODE
+ if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEEXACT:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEPOSQUERY:
+ case OP_TYPEPOSUPTO:
+ cc += PRIV(OP_lengths)[*cc];
+#ifdef SUPPORT_UNICODE
+ if (cc[-1] == OP_PROP || cc[-1] == OP_NOTPROP) cc += 2;
+#endif
+ break;
+
+#if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8
+ case OP_XCLASS:
+ cc += GET(cc, 1);
+ break;
+#endif
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_SKIP_ARG:
+ case OP_THEN_ARG:
+ cc += PRIV(OP_lengths)[*cc] + cc[1];
+ break;
+
+ case OP_CALLOUT:
+ cb.pattern_position = GET(cc, 1);
+ cb.next_item_length = GET(cc, 1 + LINK_SIZE);
+ cb.callout_number = cc[1 + 2*LINK_SIZE];
+ cb.callout_string_offset = 0;
+ cb.callout_string_length = 0;
+ cb.callout_string = NULL;
+ rc = callback(&cb, callout_data);
+ if (rc != 0) return rc;
+ cc += PRIV(OP_lengths)[*cc];
+ break;
+
+ case OP_CALLOUT_STR:
+ cb.pattern_position = GET(cc, 1);
+ cb.next_item_length = GET(cc, 1 + LINK_SIZE);
+ cb.callout_number = 0;
+ cb.callout_string_offset = GET(cc, 1 + 3*LINK_SIZE);
+ cb.callout_string_length =
+ GET(cc, 1 + 2*LINK_SIZE) - (1 + 4*LINK_SIZE) - 2;
+ cb.callout_string = cc + (1 + 4*LINK_SIZE) + 1;
+ rc = callback(&cb, callout_data);
+ if (rc != 0) return rc;
+ cc += GET(cc, 1 + 2*LINK_SIZE);
+ break;
+
+ default:
+ cc += PRIV(OP_lengths)[*cc];
+ break;
+ }
+ }
+}
+
+/* End of pcre2_pattern_info.c */
diff --git a/thirdparty/pcre2/src/pcre2_printint.c b/thirdparty/pcre2/src/pcre2_printint.c
new file mode 100644
index 0000000000..6207497648
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_printint.c
@@ -0,0 +1,832 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+/* This module contains a PCRE private debugging function for printing out the
+internal form of a compiled regular expression, along with some supporting
+local functions. This source file is #included in pcre2test.c at each supported
+code unit width, with PCRE2_SUFFIX set appropriately, just like the functions
+that comprise the library. It can also optionally be included in
+pcre2_compile.c for detailed debugging in error situations. */
+
+
+/* Tables of operator names. The same 8-bit table is used for all code unit
+widths, so it must be defined only once. The list itself is defined in
+pcre2_internal.h, which is #included by pcre2test before this file. */
+
+#ifndef OP_LISTS_DEFINED
+static const char *OP_names[] = { OP_NAME_LIST };
+#define OP_LISTS_DEFINED
+#endif
+
+/* The functions and tables herein must all have mode-dependent names. */
+
+#define OP_lengths PCRE2_SUFFIX(OP_lengths_)
+#define get_ucpname PCRE2_SUFFIX(get_ucpname_)
+#define pcre2_printint PCRE2_SUFFIX(pcre2_printint_)
+#define print_char PCRE2_SUFFIX(print_char_)
+#define print_custring PCRE2_SUFFIX(print_custring_)
+#define print_custring_bylen PCRE2_SUFFIX(print_custring_bylen_)
+#define print_prop PCRE2_SUFFIX(print_prop_)
+
+/* Table of sizes for the fixed-length opcodes. It's defined in a macro so that
+the definition is next to the definition of the opcodes in pcre2_internal.h.
+The contents of the table are, however, mode-dependent. */
+
+static const uint8_t OP_lengths[] = { OP_LENGTHS };
+
+
+
+/*************************************************
+* Print one character from a string *
+*************************************************/
+
+/* In UTF mode the character may occupy more than one code unit.
+
+Arguments:
+ f file to write to
+ ptr pointer to first code unit of the character
+ utf TRUE if string is UTF (will be FALSE if UTF is not supported)
+
+Returns: number of additional code units used
+*/
+
+static unsigned int
+print_char(FILE *f, PCRE2_SPTR ptr, BOOL utf)
+{
+uint32_t c = *ptr;
+BOOL one_code_unit = !utf;
+
+/* If UTF is supported and requested, check for a valid single code unit. */
+
+#ifdef SUPPORT_UNICODE
+if (utf)
+ {
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ one_code_unit = c < 0x80;
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+ one_code_unit = (c & 0xfc00) != 0xd800;
+#else
+ one_code_unit = (c & 0xfffff800u) != 0xd800u;
+#endif /* CODE_UNIT_WIDTH */
+ }
+#endif /* SUPPORT_UNICODE */
+
+/* Handle a valid one-code-unit character at any width. */
+
+if (one_code_unit)
+ {
+ if (PRINTABLE(c)) fprintf(f, "%c", (char)c);
+ else if (c < 0x80) fprintf(f, "\\x%02x", c);
+ else fprintf(f, "\\x{%02x}", c);
+ return 0;
+ }
+
+/* Code for invalid UTF code units and multi-unit UTF characters is different
+for each width. If UTF is not supported, control should never get here, but we
+need a return statement to keep the compiler happy. */
+
+#ifndef SUPPORT_UNICODE
+return 0;
+#else
+
+/* Malformed UTF-8 should occur only if the sanity check has been turned off.
+Rather than swallow random bytes, just stop if we hit a bad one. Print it with
+\X instead of \x as an indication. */
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+if ((c & 0xc0) != 0xc0)
+ {
+ fprintf(f, "\\X{%x}", c); /* Invalid starting byte */
+ return 0;
+ }
+else
+ {
+ int i;
+ int a = PRIV(utf8_table4)[c & 0x3f]; /* Number of additional bytes */
+ int s = 6*a;
+ c = (c & PRIV(utf8_table3)[a]) << s;
+ for (i = 1; i <= a; i++)
+ {
+ if ((ptr[i] & 0xc0) != 0x80)
+ {
+ fprintf(f, "\\X{%x}", c); /* Invalid secondary byte */
+ return i - 1;
+ }
+ s -= 6;
+ c |= (ptr[i] & 0x3f) << s;
+ }
+ fprintf(f, "\\x{%x}", c);
+ return a;
+}
+#endif /* PCRE2_CODE_UNIT_WIDTH == 8 */
+
+/* UTF-16: rather than swallow a low surrogate, just stop if we hit a bad one.
+Print it with \X instead of \x as an indication. */
+
+#if PCRE2_CODE_UNIT_WIDTH == 16
+if ((ptr[1] & 0xfc00) != 0xdc00)
+ {
+ fprintf(f, "\\X{%x}", c);
+ return 0;
+ }
+c = (((c & 0x3ff) << 10) | (ptr[1] & 0x3ff)) + 0x10000;
+fprintf(f, "\\x{%x}", c);
+return 1;
+#endif /* PCRE2_CODE_UNIT_WIDTH == 16 */
+
+/* For UTF-32 we get here only for a malformed code unit, which should only
+occur if the sanity check has been turned off. Print it with \X instead of \x
+as an indication. */
+
+#if PCRE2_CODE_UNIT_WIDTH == 32
+fprintf(f, "\\X{%x}", c);
+return 0;
+#endif /* PCRE2_CODE_UNIT_WIDTH == 32 */
+#endif /* SUPPORT_UNICODE */
+}
+
+
+
+/*************************************************
+* Print string as a list of code units *
+*************************************************/
+
+/* These take no account of UTF as they always print each individual code unit.
+The string is zero-terminated for print_custring(); the length is given for
+print_custring_bylen().
+
+Arguments:
+ f file to write to
+ ptr point to the string
+ len length for print_custring_bylen()
+
+Returns: nothing
+*/
+
+static void
+print_custring(FILE *f, PCRE2_SPTR ptr)
+{
+while (*ptr != '\0')
+ {
+ uint32_t c = *ptr++;
+ if (PRINTABLE(c)) fprintf(f, "%c", c); else fprintf(f, "\\x{%x}", c);
+ }
+}
+
+static void
+print_custring_bylen(FILE *f, PCRE2_SPTR ptr, PCRE2_UCHAR len)
+{
+for (; len > 0; len--)
+ {
+ uint32_t c = *ptr++;
+ if (PRINTABLE(c)) fprintf(f, "%c", c); else fprintf(f, "\\x{%x}", c);
+ }
+}
+
+
+
+/*************************************************
+* Find Unicode property name *
+*************************************************/
+
+/* When there is no UTF/UCP support, the table of names does not exist. This
+function should not be called in such configurations, because a pattern that
+tries to use Unicode properties won't compile. Rather than put lots of #ifdefs
+into the main code, however, we just put one into this function. */
+
+static const char *
+get_ucpname(unsigned int ptype, unsigned int pvalue)
+{
+#ifdef SUPPORT_UNICODE
+int i;
+for (i = PRIV(utt_size) - 1; i >= 0; i--)
+ {
+ if (ptype == PRIV(utt)[i].type && pvalue == PRIV(utt)[i].value) break;
+ }
+return (i >= 0)? PRIV(utt_names) + PRIV(utt)[i].name_offset : "??";
+#else /* No UTF support */
+(void)ptype;
+(void)pvalue;
+return "??";
+#endif /* SUPPORT_UNICODE */
+}
+
+
+
+/*************************************************
+* Print Unicode property value *
+*************************************************/
+
+/* "Normal" properties can be printed from tables. The PT_CLIST property is a
+pseudo-property that contains a pointer to a list of case-equivalent
+characters.
+
+Arguments:
+ f file to write to
+ code pointer in the compiled code
+ before text to print before
+ after text to print after
+
+Returns: nothing
+*/
+
+static void
+print_prop(FILE *f, PCRE2_SPTR code, const char *before, const char *after)
+{
+if (code[1] != PT_CLIST)
+ {
+ fprintf(f, "%s%s %s%s", before, OP_names[*code], get_ucpname(code[1],
+ code[2]), after);
+ }
+else
+ {
+ const char *not = (*code == OP_PROP)? "" : "not ";
+ const uint32_t *p = PRIV(ucd_caseless_sets) + code[2];
+ fprintf (f, "%s%sclist", before, not);
+ while (*p < NOTACHAR) fprintf(f, " %04x", *p++);
+ fprintf(f, "%s", after);
+ }
+}
+
+
+
+/*************************************************
+* Print compiled pattern *
+*************************************************/
+
+/* The print_lengths flag controls whether offsets and lengths of items are
+printed. Lenths can be turned off from pcre2test so that automatic tests on
+bytecode can be written that do not depend on the value of LINK_SIZE.
+
+Arguments:
+ re a compiled pattern
+ f the file to write to
+ print_lengths show various lengths
+
+Returns: nothing
+*/
+
+static void
+pcre2_printint(pcre2_code *re, FILE *f, BOOL print_lengths)
+{
+PCRE2_SPTR codestart, nametable, code;
+uint32_t nesize = re->name_entry_size;
+BOOL utf = (re->overall_options & PCRE2_UTF) != 0;
+
+nametable = (PCRE2_SPTR)((uint8_t *)re + sizeof(pcre2_real_code));
+code = codestart = nametable + re->name_count * re->name_entry_size;
+
+for(;;)
+ {
+ PCRE2_SPTR ccode;
+ uint32_t c;
+ int i;
+ const char *flag = " ";
+ unsigned int extra = 0;
+
+ if (print_lengths)
+ fprintf(f, "%3d ", (int)(code - codestart));
+ else
+ fprintf(f, " ");
+
+ switch(*code)
+ {
+/* ========================================================================== */
+ /* These cases are never obeyed. This is a fudge that causes a compile-
+ time error if the vectors OP_names or OP_lengths, which are indexed
+ by opcode, are not the correct length. It seems to be the only way to do
+ such a check at compile time, as the sizeof() operator does not work in
+ the C preprocessor. */
+
+ case OP_TABLE_LENGTH:
+ case OP_TABLE_LENGTH +
+ ((sizeof(OP_names)/sizeof(const char *) == OP_TABLE_LENGTH) &&
+ (sizeof(OP_lengths) == OP_TABLE_LENGTH)):
+ break;
+/* ========================================================================== */
+
+ case OP_END:
+ fprintf(f, " %s\n", OP_names[*code]);
+ fprintf(f, "------------------------------------------------------------------\n");
+ return;
+
+ case OP_CHAR:
+ fprintf(f, " ");
+ do
+ {
+ code++;
+ code += 1 + print_char(f, code, utf);
+ }
+ while (*code == OP_CHAR);
+ fprintf(f, "\n");
+ continue;
+
+ case OP_CHARI:
+ fprintf(f, " /i ");
+ do
+ {
+ code++;
+ code += 1 + print_char(f, code, utf);
+ }
+ while (*code == OP_CHARI);
+ fprintf(f, "\n");
+ continue;
+
+ case OP_CBRA:
+ case OP_CBRAPOS:
+ case OP_SCBRA:
+ case OP_SCBRAPOS:
+ if (print_lengths) fprintf(f, "%3d ", GET(code, 1));
+ else fprintf(f, " ");
+ fprintf(f, "%s %d", OP_names[*code], GET2(code, 1+LINK_SIZE));
+ break;
+
+ case OP_BRA:
+ case OP_BRAPOS:
+ case OP_SBRA:
+ case OP_SBRAPOS:
+ case OP_KETRMAX:
+ case OP_KETRMIN:
+ case OP_KETRPOS:
+ case OP_ALT:
+ case OP_KET:
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_COND:
+ case OP_SCOND:
+ case OP_REVERSE:
+ if (print_lengths) fprintf(f, "%3d ", GET(code, 1));
+ else fprintf(f, " ");
+ fprintf(f, "%s", OP_names[*code]);
+ break;
+
+ case OP_CLOSE:
+ fprintf(f, " %s %d", OP_names[*code], GET2(code, 1));
+ break;
+
+ case OP_CREF:
+ fprintf(f, "%3d %s", GET2(code,1), OP_names[*code]);
+ break;
+
+ case OP_DNCREF:
+ {
+ PCRE2_SPTR entry = nametable + (GET2(code, 1) * nesize) + IMM2_SIZE;
+ fprintf(f, " %s Cond ref <", flag);
+ print_custring(f, entry);
+ fprintf(f, ">%d", GET2(code, 1 + IMM2_SIZE));
+ }
+ break;
+
+ case OP_RREF:
+ c = GET2(code, 1);
+ if (c == RREF_ANY)
+ fprintf(f, " Cond recurse any");
+ else
+ fprintf(f, " Cond recurse %d", c);
+ break;
+
+ case OP_DNRREF:
+ {
+ PCRE2_SPTR entry = nametable + (GET2(code, 1) * nesize) + IMM2_SIZE;
+ fprintf(f, " %s Cond recurse <", flag);
+ print_custring(f, entry);
+ fprintf(f, ">%d", GET2(code, 1 + IMM2_SIZE));
+ }
+ break;
+
+ case OP_FALSE:
+ fprintf(f, " Cond false");
+ break;
+
+ case OP_TRUE:
+ fprintf(f, " Cond true");
+ break;
+
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_POSSTARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_POSPLUSI:
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_POSQUERYI:
+ flag = "/i";
+ /* Fall through */
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_POSSTAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_POSPLUS:
+ case OP_QUERY:
+ case OP_MINQUERY:
+ case OP_POSQUERY:
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEPOSPLUS:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEPOSQUERY:
+ fprintf(f, " %s ", flag);
+
+ if (*code >= OP_TYPESTAR)
+ {
+ if (code[1] == OP_PROP || code[1] == OP_NOTPROP)
+ {
+ print_prop(f, code + 1, "", " ");
+ extra = 2;
+ }
+ else fprintf(f, "%s", OP_names[code[1]]);
+ }
+ else extra = print_char(f, code+1, utf);
+ fprintf(f, "%s", OP_names[*code]);
+ break;
+
+ case OP_EXACTI:
+ case OP_UPTOI:
+ case OP_MINUPTOI:
+ case OP_POSUPTOI:
+ flag = "/i";
+ /* Fall through */
+ case OP_EXACT:
+ case OP_UPTO:
+ case OP_MINUPTO:
+ case OP_POSUPTO:
+ fprintf(f, " %s ", flag);
+ extra = print_char(f, code + 1 + IMM2_SIZE, utf);
+ fprintf(f, "{");
+ if (*code != OP_EXACT && *code != OP_EXACTI) fprintf(f, "0,");
+ fprintf(f, "%d}", GET2(code,1));
+ if (*code == OP_MINUPTO || *code == OP_MINUPTOI) fprintf(f, "?");
+ else if (*code == OP_POSUPTO || *code == OP_POSUPTOI) fprintf(f, "+");
+ break;
+
+ case OP_TYPEEXACT:
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEPOSUPTO:
+ if (code[1 + IMM2_SIZE] == OP_PROP || code[1 + IMM2_SIZE] == OP_NOTPROP)
+ {
+ print_prop(f, code + IMM2_SIZE + 1, " ", " ");
+ extra = 2;
+ }
+ else fprintf(f, " %s", OP_names[code[1 + IMM2_SIZE]]);
+ fprintf(f, "{");
+ if (*code != OP_TYPEEXACT) fprintf(f, "0,");
+ fprintf(f, "%d}", GET2(code,1));
+ if (*code == OP_TYPEMINUPTO) fprintf(f, "?");
+ else if (*code == OP_TYPEPOSUPTO) fprintf(f, "+");
+ break;
+
+ case OP_NOTI:
+ flag = "/i";
+ /* Fall through */
+ case OP_NOT:
+ fprintf(f, " %s [^", flag);
+ extra = print_char(f, code + 1, utf);
+ fprintf(f, "]");
+ break;
+
+ case OP_NOTSTARI:
+ case OP_NOTMINSTARI:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUSI:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTQUERYI:
+ case OP_NOTMINQUERYI:
+ case OP_NOTPOSQUERYI:
+ flag = "/i";
+ /* Fall through */
+
+ case OP_NOTSTAR:
+ case OP_NOTMINSTAR:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPLUS:
+ case OP_NOTMINPLUS:
+ case OP_NOTPOSPLUS:
+ case OP_NOTQUERY:
+ case OP_NOTMINQUERY:
+ case OP_NOTPOSQUERY:
+ fprintf(f, " %s [^", flag);
+ extra = print_char(f, code + 1, utf);
+ fprintf(f, "]%s", OP_names[*code]);
+ break;
+
+ case OP_NOTEXACTI:
+ case OP_NOTUPTOI:
+ case OP_NOTMINUPTOI:
+ case OP_NOTPOSUPTOI:
+ flag = "/i";
+ /* Fall through */
+
+ case OP_NOTEXACT:
+ case OP_NOTUPTO:
+ case OP_NOTMINUPTO:
+ case OP_NOTPOSUPTO:
+ fprintf(f, " %s [^", flag);
+ extra = print_char(f, code + 1 + IMM2_SIZE, utf);
+ fprintf(f, "]{");
+ if (*code != OP_NOTEXACT && *code != OP_NOTEXACTI) fprintf(f, "0,");
+ fprintf(f, "%d}", GET2(code,1));
+ if (*code == OP_NOTMINUPTO || *code == OP_NOTMINUPTOI) fprintf(f, "?");
+ else
+ if (*code == OP_NOTPOSUPTO || *code == OP_NOTPOSUPTOI) fprintf(f, "+");
+ break;
+
+ case OP_RECURSE:
+ if (print_lengths) fprintf(f, "%3d ", GET(code, 1));
+ else fprintf(f, " ");
+ fprintf(f, "%s", OP_names[*code]);
+ break;
+
+ case OP_REFI:
+ flag = "/i";
+ /* Fall through */
+ case OP_REF:
+ fprintf(f, " %s \\%d", flag, GET2(code,1));
+ ccode = code + OP_lengths[*code];
+ goto CLASS_REF_REPEAT;
+
+ case OP_DNREFI:
+ flag = "/i";
+ /* Fall through */
+ case OP_DNREF:
+ {
+ PCRE2_SPTR entry = nametable + (GET2(code, 1) * nesize) + IMM2_SIZE;
+ fprintf(f, " %s \\k<", flag);
+ print_custring(f, entry);
+ fprintf(f, ">%d", GET2(code, 1 + IMM2_SIZE));
+ }
+ ccode = code + OP_lengths[*code];
+ goto CLASS_REF_REPEAT;
+
+ case OP_CALLOUT:
+ fprintf(f, " %s %d %d %d", OP_names[*code], code[1 + 2*LINK_SIZE],
+ GET(code, 1), GET(code, 1 + LINK_SIZE));
+ break;
+
+ case OP_CALLOUT_STR:
+ c = code[1 + 4*LINK_SIZE];
+ fprintf(f, " %s %c", OP_names[*code], c);
+ extra = GET(code, 1 + 2*LINK_SIZE);
+ print_custring_bylen(f, code + 2 + 4*LINK_SIZE, extra - 3 - 4*LINK_SIZE);
+ for (i = 0; PRIV(callout_start_delims)[i] != 0; i++)
+ if (c == PRIV(callout_start_delims)[i])
+ {
+ c = PRIV(callout_end_delims)[i];
+ break;
+ }
+ fprintf(f, "%c %d %d %d", c, GET(code, 1 + 3*LINK_SIZE), GET(code, 1),
+ GET(code, 1 + LINK_SIZE));
+ break;
+
+ case OP_PROP:
+ case OP_NOTPROP:
+ print_prop(f, code, " ", "");
+ break;
+
+ /* OP_XCLASS cannot occur in 8-bit, non-UTF mode. However, there's no harm
+ in having this code always here, and it makes it less messy without all
+ those #ifdefs. */
+
+ case OP_CLASS:
+ case OP_NCLASS:
+ case OP_XCLASS:
+ {
+ unsigned int min, max;
+ BOOL printmap;
+ BOOL invertmap = FALSE;
+ uint8_t *map;
+ uint8_t inverted_map[32];
+
+ fprintf(f, " [");
+
+ if (*code == OP_XCLASS)
+ {
+ extra = GET(code, 1);
+ ccode = code + LINK_SIZE + 1;
+ printmap = (*ccode & XCL_MAP) != 0;
+ if ((*ccode & XCL_NOT) != 0)
+ {
+ invertmap = (*ccode & XCL_HASPROP) == 0;
+ fprintf(f, "^");
+ }
+ ccode++;
+ }
+ else
+ {
+ printmap = TRUE;
+ ccode = code + 1;
+ }
+
+ /* Print a bit map */
+
+ if (printmap)
+ {
+ map = (uint8_t *)ccode;
+ if (invertmap)
+ {
+ for (i = 0; i < 32; i++) inverted_map[i] = ~map[i];
+ map = inverted_map;
+ }
+
+ for (i = 0; i < 256; i++)
+ {
+ if ((map[i/8] & (1 << (i&7))) != 0)
+ {
+ int j;
+ for (j = i+1; j < 256; j++)
+ if ((map[j/8] & (1 << (j&7))) == 0) break;
+ if (i == '-' || i == ']') fprintf(f, "\\");
+ if (PRINTABLE(i)) fprintf(f, "%c", i);
+ else fprintf(f, "\\x%02x", i);
+ if (--j > i)
+ {
+ if (j != i + 1) fprintf(f, "-");
+ if (j == '-' || j == ']') fprintf(f, "\\");
+ if (PRINTABLE(j)) fprintf(f, "%c", j);
+ else fprintf(f, "\\x%02x", j);
+ }
+ i = j;
+ }
+ }
+ ccode += 32 / sizeof(PCRE2_UCHAR);
+ }
+
+ /* For an XCLASS there is always some additional data */
+
+ if (*code == OP_XCLASS)
+ {
+ PCRE2_UCHAR ch;
+ while ((ch = *ccode++) != XCL_END)
+ {
+ BOOL not = FALSE;
+ const char *notch = "";
+
+ switch(ch)
+ {
+ case XCL_NOTPROP:
+ not = TRUE;
+ notch = "^";
+ /* Fall through */
+
+ case XCL_PROP:
+ {
+ unsigned int ptype = *ccode++;
+ unsigned int pvalue = *ccode++;
+
+ switch(ptype)
+ {
+ case PT_PXGRAPH:
+ fprintf(f, "[:%sgraph:]", notch);
+ break;
+
+ case PT_PXPRINT:
+ fprintf(f, "[:%sprint:]", notch);
+ break;
+
+ case PT_PXPUNCT:
+ fprintf(f, "[:%spunct:]", notch);
+ break;
+
+ default:
+ fprintf(f, "\\%c{%s}", (not? 'P':'p'),
+ get_ucpname(ptype, pvalue));
+ break;
+ }
+ }
+ break;
+
+ default:
+ ccode += 1 + print_char(f, ccode, utf);
+ if (ch == XCL_RANGE)
+ {
+ fprintf(f, "-");
+ ccode += 1 + print_char(f, ccode, utf);
+ }
+ break;
+ }
+ }
+ }
+
+ /* Indicate a non-UTF class which was created by negation */
+
+ fprintf(f, "]%s", (*code == OP_NCLASS)? " (neg)" : "");
+
+ /* Handle repeats after a class or a back reference */
+
+ CLASS_REF_REPEAT:
+ switch(*ccode)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ case OP_CRPOSSTAR:
+ case OP_CRPOSPLUS:
+ case OP_CRPOSQUERY:
+ fprintf(f, "%s", OP_names[*ccode]);
+ extra += OP_lengths[*ccode];
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ case OP_CRPOSRANGE:
+ min = GET2(ccode,1);
+ max = GET2(ccode,1 + IMM2_SIZE);
+ if (max == 0) fprintf(f, "{%u,}", min);
+ else fprintf(f, "{%u,%u}", min, max);
+ if (*ccode == OP_CRMINRANGE) fprintf(f, "?");
+ else if (*ccode == OP_CRPOSRANGE) fprintf(f, "+");
+ extra += OP_lengths[*ccode];
+ break;
+
+ /* Do nothing if it's not a repeat; this code stops picky compilers
+ warning about the lack of a default code path. */
+
+ default:
+ break;
+ }
+ }
+ break;
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_SKIP_ARG:
+ case OP_THEN_ARG:
+ fprintf(f, " %s ", OP_names[*code]);
+ print_custring_bylen(f, code + 2, code[1]);
+ extra += code[1];
+ break;
+
+ case OP_THEN:
+ fprintf(f, " %s", OP_names[*code]);
+ break;
+
+ case OP_CIRCM:
+ case OP_DOLLM:
+ flag = "/m";
+ /* Fall through */
+
+ /* Anything else is just an item with no data, but possibly a flag. */
+
+ default:
+ fprintf(f, " %s %s", flag, OP_names[*code]);
+ break;
+ }
+
+ code += OP_lengths[*code] + extra;
+ fprintf(f, "\n");
+ }
+}
+
+/* End of pcre2_printint.c */
diff --git a/thirdparty/pcre2/src/pcre2_serialize.c b/thirdparty/pcre2/src/pcre2_serialize.c
new file mode 100644
index 0000000000..0af26d8fc3
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_serialize.c
@@ -0,0 +1,265 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+/* This module contains functions for serializing and deserializing
+a sequence of compiled codes. */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
+#include "pcre2_internal.h"
+
+/* Magic number to provide a small check against being handed junk. */
+
+#define SERIALIZED_DATA_MAGIC 0x50523253u
+
+/* Deserialization is limited to the current PCRE version and
+character width. */
+
+#define SERIALIZED_DATA_VERSION \
+ ((PCRE2_MAJOR) | ((PCRE2_MINOR) << 16))
+
+#define SERIALIZED_DATA_CONFIG \
+ (sizeof(PCRE2_UCHAR) | ((sizeof(void*)) << 8) | ((sizeof(PCRE2_SIZE)) << 16))
+
+
+
+/*************************************************
+* Serialize compiled patterns *
+*************************************************/
+
+PCRE2_EXP_DEFN int32_t PCRE2_CALL_CONVENTION
+pcre2_serialize_encode(const pcre2_code **codes, int32_t number_of_codes,
+ uint8_t **serialized_bytes, PCRE2_SIZE *serialized_size,
+ pcre2_general_context *gcontext)
+{
+uint8_t *bytes;
+uint8_t *dst_bytes;
+int32_t i;
+PCRE2_SIZE total_size;
+const pcre2_real_code *re;
+const uint8_t *tables;
+pcre2_serialized_data *data;
+
+const pcre2_memctl *memctl = (gcontext != NULL) ?
+ &gcontext->memctl : &PRIV(default_compile_context).memctl;
+
+if (codes == NULL || serialized_bytes == NULL || serialized_size == NULL)
+ return PCRE2_ERROR_NULL;
+
+if (number_of_codes <= 0) return PCRE2_ERROR_BADDATA;
+
+/* Compute total size. */
+total_size = sizeof(pcre2_serialized_data) + tables_length;
+tables = NULL;
+
+for (i = 0; i < number_of_codes; i++)
+ {
+ if (codes[i] == NULL) return PCRE2_ERROR_NULL;
+ re = (const pcre2_real_code *)(codes[i]);
+ if (re->magic_number != MAGIC_NUMBER) return PCRE2_ERROR_BADMAGIC;
+ if (tables == NULL)
+ tables = re->tables;
+ else if (tables != re->tables)
+ return PCRE2_ERROR_MIXEDTABLES;
+ total_size += re->blocksize;
+ }
+
+/* Initialize the byte stream. */
+bytes = memctl->malloc(total_size + sizeof(pcre2_memctl), memctl->memory_data);
+if (bytes == NULL) return PCRE2_ERROR_NOMEMORY;
+
+/* The controller is stored as a hidden parameter. */
+memcpy(bytes, memctl, sizeof(pcre2_memctl));
+bytes += sizeof(pcre2_memctl);
+
+data = (pcre2_serialized_data *)bytes;
+data->magic = SERIALIZED_DATA_MAGIC;
+data->version = SERIALIZED_DATA_VERSION;
+data->config = SERIALIZED_DATA_CONFIG;
+data->number_of_codes = number_of_codes;
+
+/* Copy all compiled code data. */
+dst_bytes = bytes + sizeof(pcre2_serialized_data);
+memcpy(dst_bytes, tables, tables_length);
+dst_bytes += tables_length;
+
+for (i = 0; i < number_of_codes; i++)
+ {
+ re = (const pcre2_real_code *)(codes[i]);
+ memcpy(dst_bytes, (char *)re, re->blocksize);
+ dst_bytes += re->blocksize;
+ }
+
+*serialized_bytes = bytes;
+*serialized_size = total_size;
+return number_of_codes;
+}
+
+
+/*************************************************
+* Deserialize compiled patterns *
+*************************************************/
+
+PCRE2_EXP_DEFN int32_t PCRE2_CALL_CONVENTION
+pcre2_serialize_decode(pcre2_code **codes, int32_t number_of_codes,
+ const uint8_t *bytes, pcre2_general_context *gcontext)
+{
+const pcre2_serialized_data *data = (const pcre2_serialized_data *)bytes;
+const pcre2_memctl *memctl = (gcontext != NULL) ?
+ &gcontext->memctl : &PRIV(default_compile_context).memctl;
+
+const uint8_t *src_bytes;
+pcre2_real_code *dst_re;
+uint8_t *tables;
+int32_t i, j;
+
+/* Sanity checks. */
+
+if (data == NULL || codes == NULL) return PCRE2_ERROR_NULL;
+if (number_of_codes <= 0) return PCRE2_ERROR_BADDATA;
+if (data->number_of_codes <= 0) return PCRE2_ERROR_BADSERIALIZEDDATA;
+if (data->magic != SERIALIZED_DATA_MAGIC) return PCRE2_ERROR_BADMAGIC;
+if (data->version != SERIALIZED_DATA_VERSION) return PCRE2_ERROR_BADMODE;
+if (data->config != SERIALIZED_DATA_CONFIG) return PCRE2_ERROR_BADMODE;
+
+if (number_of_codes > data->number_of_codes)
+ number_of_codes = data->number_of_codes;
+
+src_bytes = bytes + sizeof(pcre2_serialized_data);
+
+/* Decode tables. The reference count for the tables is stored immediately
+following them. */
+
+tables = memctl->malloc(tables_length + sizeof(PCRE2_SIZE), memctl->memory_data);
+if (tables == NULL) return PCRE2_ERROR_NOMEMORY;
+
+memcpy(tables, src_bytes, tables_length);
+*(PCRE2_SIZE *)(tables + tables_length) = number_of_codes;
+src_bytes += tables_length;
+
+/* Decode the byte stream. We must not try to read the size from the compiled
+code block in the stream, because it might be unaligned, which causes errors on
+hardware such as Sparc-64 that doesn't like unaligned memory accesses. The type
+of the blocksize field is given its own name to ensure that it is the same here
+as in the block. */
+
+for (i = 0; i < number_of_codes; i++)
+ {
+ CODE_BLOCKSIZE_TYPE blocksize;
+ memcpy(&blocksize, src_bytes + offsetof(pcre2_real_code, blocksize),
+ sizeof(CODE_BLOCKSIZE_TYPE));
+ if (blocksize <= sizeof(pcre2_real_code))
+ return PCRE2_ERROR_BADSERIALIZEDDATA;
+
+ /* The allocator provided by gcontext replaces the original one. */
+
+ dst_re = (pcre2_real_code *)PRIV(memctl_malloc)(blocksize,
+ (pcre2_memctl *)gcontext);
+ if (dst_re == NULL)
+ {
+ memctl->free(tables, memctl->memory_data);
+ for (j = 0; j < i; j++)
+ {
+ memctl->free(codes[j], memctl->memory_data);
+ codes[j] = NULL;
+ }
+ return PCRE2_ERROR_NOMEMORY;
+ }
+
+ /* The new allocator must be preserved. */
+
+ memcpy(((uint8_t *)dst_re) + sizeof(pcre2_memctl),
+ src_bytes + sizeof(pcre2_memctl), blocksize - sizeof(pcre2_memctl));
+ if (dst_re->magic_number != MAGIC_NUMBER ||
+ dst_re->name_entry_size > MAX_NAME_SIZE + IMM2_SIZE + 1 ||
+ dst_re->name_count > MAX_NAME_COUNT)
+ return PCRE2_ERROR_BADSERIALIZEDDATA;
+
+ /* At the moment only one table is supported. */
+
+ dst_re->tables = tables;
+ dst_re->executable_jit = NULL;
+ dst_re->flags |= PCRE2_DEREF_TABLES;
+
+ codes[i] = dst_re;
+ src_bytes += blocksize;
+ }
+
+return number_of_codes;
+}
+
+
+/*************************************************
+* Get the number of serialized patterns *
+*************************************************/
+
+PCRE2_EXP_DEFN int32_t PCRE2_CALL_CONVENTION
+pcre2_serialize_get_number_of_codes(const uint8_t *bytes)
+{
+const pcre2_serialized_data *data = (const pcre2_serialized_data *)bytes;
+
+if (data == NULL) return PCRE2_ERROR_NULL;
+if (data->magic != SERIALIZED_DATA_MAGIC) return PCRE2_ERROR_BADMAGIC;
+if (data->version != SERIALIZED_DATA_VERSION) return PCRE2_ERROR_BADMODE;
+if (data->config != SERIALIZED_DATA_CONFIG) return PCRE2_ERROR_BADMODE;
+
+return data->number_of_codes;
+}
+
+
+/*************************************************
+* Free the allocated stream *
+*************************************************/
+
+PCRE2_EXP_DEFN void PCRE2_CALL_CONVENTION
+pcre2_serialize_free(uint8_t *bytes)
+{
+if (bytes != NULL)
+ {
+ pcre2_memctl *memctl = (pcre2_memctl *)(bytes - sizeof(pcre2_memctl));
+ memctl->free(memctl, memctl->memory_data);
+ }
+}
+
+/* End of pcre2_serialize.c */
diff --git a/thirdparty/pcre2/src/pcre2_string_utils.c b/thirdparty/pcre2/src/pcre2_string_utils.c
new file mode 100644
index 0000000000..2a1f282629
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_string_utils.c
@@ -0,0 +1,201 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+/* This module contains internal functions for comparing and finding the length
+of strings. These are used instead of strcmp() etc because the standard
+functions work only on 8-bit data. */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre2_internal.h"
+
+
+/*************************************************
+* Compare two zero-terminated PCRE2 strings *
+*************************************************/
+
+/*
+Arguments:
+ str1 first string
+ str2 second string
+
+Returns: 0, 1, or -1
+*/
+
+int
+PRIV(strcmp)(PCRE2_SPTR str1, PCRE2_SPTR str2)
+{
+PCRE2_UCHAR c1, c2;
+while (*str1 != '\0' || *str2 != '\0')
+ {
+ c1 = *str1++;
+ c2 = *str2++;
+ if (c1 != c2) return ((c1 > c2) << 1) - 1;
+ }
+return 0;
+}
+
+
+/*************************************************
+* Compare zero-terminated PCRE2 & 8-bit strings *
+*************************************************/
+
+/* As the 8-bit string is almost always a literal, its type is specified as
+const char *.
+
+Arguments:
+ str1 first string
+ str2 second string
+
+Returns: 0, 1, or -1
+*/
+
+int
+PRIV(strcmp_c8)(PCRE2_SPTR str1, const char *str2)
+{
+PCRE2_UCHAR c1, c2;
+while (*str1 != '\0' || *str2 != '\0')
+ {
+ c1 = *str1++;
+ c2 = *str2++;
+ if (c1 != c2) return ((c1 > c2) << 1) - 1;
+ }
+return 0;
+}
+
+
+/*************************************************
+* Compare two PCRE2 strings, given a length *
+*************************************************/
+
+/*
+Arguments:
+ str1 first string
+ str2 second string
+ len the length
+
+Returns: 0, 1, or -1
+*/
+
+int
+PRIV(strncmp)(PCRE2_SPTR str1, PCRE2_SPTR str2, size_t len)
+{
+PCRE2_UCHAR c1, c2;
+for (; len > 0; len--)
+ {
+ c1 = *str1++;
+ c2 = *str2++;
+ if (c1 != c2) return ((c1 > c2) << 1) - 1;
+ }
+return 0;
+}
+
+
+/*************************************************
+* Compare PCRE2 string to 8-bit string by length *
+*************************************************/
+
+/* As the 8-bit string is almost always a literal, its type is specified as
+const char *.
+
+Arguments:
+ str1 first string
+ str2 second string
+ len the length
+
+Returns: 0, 1, or -1
+*/
+
+int
+PRIV(strncmp_c8)(PCRE2_SPTR str1, const char *str2, size_t len)
+{
+PCRE2_UCHAR c1, c2;
+for (; len > 0; len--)
+ {
+ c1 = *str1++;
+ c2 = *str2++;
+ if (c1 != c2) return ((c1 > c2) << 1) - 1;
+ }
+return 0;
+}
+
+
+/*************************************************
+* Find the length of a PCRE2 string *
+*************************************************/
+
+/*
+Argument: the string
+Returns: the length
+*/
+
+PCRE2_SIZE
+PRIV(strlen)(PCRE2_SPTR str)
+{
+PCRE2_SIZE c = 0;
+while (*str++ != 0) c++;
+return c;
+}
+
+
+/*************************************************
+* Copy 8-bit 0-terminated string to PCRE2 string *
+*************************************************/
+
+/* Arguments:
+ str1 buffer to receive the string
+ str2 8-bit string to be copied
+
+Returns: the number of code units used (excluding trailing zero)
+*/
+
+PCRE2_SIZE
+PRIV(strcpy_c8)(PCRE2_UCHAR *str1, const char *str2)
+{
+PCRE2_UCHAR *t = str1;
+while (*str2 != 0) *t++ = *str2++;
+*t = 0;
+return t - str1;
+}
+
+/* End of pcre2_string_utils.c */
diff --git a/thirdparty/pcre2/src/pcre2_study.c b/thirdparty/pcre2/src/pcre2_study.c
new file mode 100644
index 0000000000..5a4d520c09
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_study.c
@@ -0,0 +1,1625 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+/* This module contains functions for scanning a compiled pattern and
+collecting data (e.g. minimum matching length). */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
+#include "pcre2_internal.h"
+
+
+/* The maximum remembered capturing brackets minimum. */
+
+#define MAX_CACHE_BACKREF 128
+
+/* Set a bit in the starting code unit bit map. */
+
+#define SET_BIT(c) re->start_bitmap[(c)/8] |= (1 << ((c)&7))
+
+/* Returns from set_start_bits() */
+
+enum { SSB_FAIL, SSB_DONE, SSB_CONTINUE, SSB_UNKNOWN };
+
+
+/*************************************************
+* Find the minimum subject length for a group *
+*************************************************/
+
+/* Scan a parenthesized group and compute the minimum length of subject that
+is needed to match it. This is a lower bound; it does not mean there is a
+string of that length that matches. In UTF mode, the result is in characters
+rather than code units. The field in a compiled pattern for storing the minimum
+length is 16-bits long (on the grounds that anything longer than that is
+pathological), so we give up when we reach that amount. This also means that
+integer overflow for really crazy patterns cannot happen.
+
+Backreference minimum lengths are cached to speed up multiple references. This
+function is called only when the highest back reference in the pattern is less
+than or equal to MAX_CACHE_BACKREF, which is one less than the size of the
+caching vector. The zeroth element contains the number of the highest set
+value.
+
+Arguments:
+ re compiled pattern block
+ code pointer to start of group (the bracket)
+ startcode pointer to start of the whole pattern's code
+ utf UTF flag
+ recurses chain of recurse_check to catch mutual recursion
+ countptr pointer to call count (to catch over complexity)
+ backref_cache vector for caching back references.
+
+Returns: the minimum length
+ -1 \C in UTF-8 mode
+ or (*ACCEPT)
+ or pattern too complicated
+ or back reference to duplicate name/number
+ -2 internal error (missing capturing bracket)
+ -3 internal error (opcode not listed)
+*/
+
+static int
+find_minlength(const pcre2_real_code *re, PCRE2_SPTR code,
+ PCRE2_SPTR startcode, BOOL utf, recurse_check *recurses, int *countptr,
+ int *backref_cache)
+{
+int length = -1;
+int prev_cap_recno = -1;
+int prev_cap_d = 0;
+int prev_recurse_recno = -1;
+int prev_recurse_d = 0;
+uint32_t once_fudge = 0;
+BOOL had_recurse = FALSE;
+BOOL dupcapused = (re->flags & PCRE2_DUPCAPUSED) != 0;
+recurse_check this_recurse;
+int branchlength = 0;
+PCRE2_UCHAR *cc = (PCRE2_UCHAR *)code + 1 + LINK_SIZE;
+
+/* If this is a "could be empty" group, its minimum length is 0. */
+
+if (*code >= OP_SBRA && *code <= OP_SCOND) return 0;
+
+/* Skip over capturing bracket number */
+
+if (*code == OP_CBRA || *code == OP_CBRAPOS) cc += IMM2_SIZE;
+
+/* A large and/or complex regex can take too long to process. */
+
+if ((*countptr)++ > 1000) return -1;
+
+/* Scan along the opcodes for this branch. If we get to the end of the branch,
+check the length against that of the other branches. If the accumulated length
+passes 16-bits, stop. */
+
+for (;;)
+ {
+ int d, min, recno;
+ PCRE2_UCHAR *cs, *ce;
+ PCRE2_UCHAR op = *cc;
+
+ if (branchlength >= UINT16_MAX) return UINT16_MAX;
+
+ switch (op)
+ {
+ case OP_COND:
+ case OP_SCOND:
+
+ /* If there is only one branch in a condition, the implied branch has zero
+ length, so we don't add anything. This covers the DEFINE "condition"
+ automatically. If there are two branches we can treat it the same as any
+ other non-capturing subpattern. */
+
+ cs = cc + GET(cc, 1);
+ if (*cs != OP_ALT)
+ {
+ cc = cs + 1 + LINK_SIZE;
+ break;
+ }
+ goto PROCESS_NON_CAPTURE;
+
+ /* There's a special case of OP_ONCE, when it is wrapped round an
+ OP_RECURSE. We'd like to process the latter at this level so that
+ remembering the value works for repeated cases. So we do nothing, but
+ set a fudge value to skip over the OP_KET after the recurse. */
+
+ case OP_ONCE:
+ if (cc[1+LINK_SIZE] == OP_RECURSE && cc[2*(1+LINK_SIZE)] == OP_KET)
+ {
+ once_fudge = 1 + LINK_SIZE;
+ cc += 1 + LINK_SIZE;
+ break;
+ }
+ /* Fall through */
+
+ case OP_ONCE_NC:
+ case OP_BRA:
+ case OP_SBRA:
+ case OP_BRAPOS:
+ case OP_SBRAPOS:
+ PROCESS_NON_CAPTURE:
+ d = find_minlength(re, cc, startcode, utf, recurses, countptr,
+ backref_cache);
+ if (d < 0) return d;
+ branchlength += d;
+ do cc += GET(cc, 1); while (*cc == OP_ALT);
+ cc += 1 + LINK_SIZE;
+ break;
+
+ /* To save time for repeated capturing subpatterns, we remember the
+ length of the previous one. Unfortunately we can't do the same for
+ the unnumbered ones above. Nor can we do this if (?| is present in the
+ pattern because captures with the same number are not then identical. */
+
+ case OP_CBRA:
+ case OP_SCBRA:
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ recno = (int)GET2(cc, 1+LINK_SIZE);
+ if (dupcapused || recno != prev_cap_recno)
+ {
+ prev_cap_recno = recno;
+ prev_cap_d = find_minlength(re, cc, startcode, utf, recurses, countptr,
+ backref_cache);
+ if (prev_cap_d < 0) return prev_cap_d;
+ }
+ branchlength += prev_cap_d;
+ do cc += GET(cc, 1); while (*cc == OP_ALT);
+ cc += 1 + LINK_SIZE;
+ break;
+
+ /* ACCEPT makes things far too complicated; we have to give up. */
+
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
+ return -1;
+
+ /* Reached end of a branch; if it's a ket it is the end of a nested
+ call. If it's ALT it is an alternation in a nested call. If it is END it's
+ the end of the outer call. All can be handled by the same code. If an
+ ACCEPT was previously encountered, use the length that was in force at that
+ time, and pass back the shortest ACCEPT length. */
+
+ case OP_ALT:
+ case OP_KET:
+ case OP_KETRMAX:
+ case OP_KETRMIN:
+ case OP_KETRPOS:
+ case OP_END:
+ if (length < 0 || (!had_recurse && branchlength < length))
+ length = branchlength;
+ if (op != OP_ALT) return length;
+ cc += 1 + LINK_SIZE;
+ branchlength = 0;
+ had_recurse = FALSE;
+ break;
+
+ /* Skip over assertive subpatterns */
+
+ case OP_ASSERT:
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ do cc += GET(cc, 1); while (*cc == OP_ALT);
+ /* Fall through */
+
+ /* Skip over things that don't match chars */
+
+ case OP_REVERSE:
+ case OP_CREF:
+ case OP_DNCREF:
+ case OP_RREF:
+ case OP_DNRREF:
+ case OP_FALSE:
+ case OP_TRUE:
+ case OP_CALLOUT:
+ case OP_SOD:
+ case OP_SOM:
+ case OP_EOD:
+ case OP_EODN:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_DOLL:
+ case OP_DOLLM:
+ case OP_NOT_WORD_BOUNDARY:
+ case OP_WORD_BOUNDARY:
+ cc += PRIV(OP_lengths)[*cc];
+ break;
+
+ case OP_CALLOUT_STR:
+ cc += GET(cc, 1 + 2*LINK_SIZE);
+ break;
+
+ /* Skip over a subpattern that has a {0} or {0,x} quantifier */
+
+ case OP_BRAZERO:
+ case OP_BRAMINZERO:
+ case OP_BRAPOSZERO:
+ case OP_SKIPZERO:
+ cc += PRIV(OP_lengths)[*cc];
+ do cc += GET(cc, 1); while (*cc == OP_ALT);
+ cc += 1 + LINK_SIZE;
+ break;
+
+ /* Handle literal characters and + repetitions */
+
+ case OP_CHAR:
+ case OP_CHARI:
+ case OP_NOT:
+ case OP_NOTI:
+ case OP_PLUS:
+ case OP_PLUSI:
+ case OP_MINPLUS:
+ case OP_MINPLUSI:
+ case OP_POSPLUS:
+ case OP_POSPLUSI:
+ case OP_NOTPLUS:
+ case OP_NOTPLUSI:
+ case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
+ branchlength++;
+ cc += 2;
+#ifdef SUPPORT_UNICODE
+ if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEPOSPLUS:
+ branchlength++;
+ cc += (cc[1] == OP_PROP || cc[1] == OP_NOTPROP)? 4 : 2;
+ break;
+
+ /* Handle exact repetitions. The count is already in characters, but we
+ may need to skip over a multibyte character in UTF mode. */
+
+ case OP_EXACT:
+ case OP_EXACTI:
+ case OP_NOTEXACT:
+ case OP_NOTEXACTI:
+ branchlength += GET2(cc,1);
+ cc += 2 + IMM2_SIZE;
+#ifdef SUPPORT_UNICODE
+ if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ case OP_TYPEEXACT:
+ branchlength += GET2(cc,1);
+ cc += 2 + IMM2_SIZE + ((cc[1 + IMM2_SIZE] == OP_PROP
+ || cc[1 + IMM2_SIZE] == OP_NOTPROP)? 2 : 0);
+ break;
+
+ /* Handle single-char non-literal matchers */
+
+ case OP_PROP:
+ case OP_NOTPROP:
+ cc += 2;
+ /* Fall through */
+
+ case OP_NOT_DIGIT:
+ case OP_DIGIT:
+ case OP_NOT_WHITESPACE:
+ case OP_WHITESPACE:
+ case OP_NOT_WORDCHAR:
+ case OP_WORDCHAR:
+ case OP_ANY:
+ case OP_ALLANY:
+ case OP_EXTUNI:
+ case OP_HSPACE:
+ case OP_NOT_HSPACE:
+ case OP_VSPACE:
+ case OP_NOT_VSPACE:
+ branchlength++;
+ cc++;
+ break;
+
+ /* "Any newline" might match two characters, but it also might match just
+ one. */
+
+ case OP_ANYNL:
+ branchlength += 1;
+ cc++;
+ break;
+
+ /* The single-byte matcher means we can't proceed in UTF mode. (In
+ non-UTF mode \C will actually be turned into OP_ALLANY, so won't ever
+ appear, but leave the code, just in case.) */
+
+ case OP_ANYBYTE:
+#ifdef SUPPORT_UNICODE
+ if (utf) return -1;
+#endif
+ branchlength++;
+ cc++;
+ break;
+
+ /* For repeated character types, we have to test for \p and \P, which have
+ an extra two bytes of parameters. */
+
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEPOSQUERY:
+ if (cc[1] == OP_PROP || cc[1] == OP_NOTPROP) cc += 2;
+ cc += PRIV(OP_lengths)[op];
+ break;
+
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEPOSUPTO:
+ if (cc[1 + IMM2_SIZE] == OP_PROP
+ || cc[1 + IMM2_SIZE] == OP_NOTPROP) cc += 2;
+ cc += PRIV(OP_lengths)[op];
+ break;
+
+ /* Check a class for variable quantification */
+
+ case OP_CLASS:
+ case OP_NCLASS:
+#ifdef SUPPORT_WIDE_CHARS
+ case OP_XCLASS:
+ /* The original code caused an unsigned overflow in 64 bit systems,
+ so now we use a conditional statement. */
+ if (op == OP_XCLASS)
+ cc += GET(cc, 1);
+ else
+ cc += PRIV(OP_lengths)[OP_CLASS];
+#else
+ cc += PRIV(OP_lengths)[OP_CLASS];
+#endif
+
+ switch (*cc)
+ {
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRPOSPLUS:
+ branchlength++;
+ /* Fall through */
+
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ case OP_CRPOSSTAR:
+ case OP_CRPOSQUERY:
+ cc++;
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ case OP_CRPOSRANGE:
+ branchlength += GET2(cc,1);
+ cc += 1 + 2 * IMM2_SIZE;
+ break;
+
+ default:
+ branchlength++;
+ break;
+ }
+ break;
+
+ /* Backreferences and subroutine calls (OP_RECURSE) are treated in the same
+ way: we find the minimum length for the subpattern. A recursion
+ (backreference or subroutine) causes an a flag to be set that causes the
+ length of this branch to be ignored. The logic is that a recursion can only
+ make sense if there is another alternative that stops the recursing. That
+ will provide the minimum length (when no recursion happens).
+
+ If PCRE2_MATCH_UNSET_BACKREF is set, a backreference to an unset bracket
+ matches an empty string (by default it causes a matching failure), so in
+ that case we must set the minimum length to zero. */
+
+ /* Duplicate named pattern back reference. We cannot reliably find a length
+ for this if duplicate numbers are present in the pattern. */
+
+ case OP_DNREF:
+ case OP_DNREFI:
+ if (dupcapused) return -1;
+ if ((re->overall_options & PCRE2_MATCH_UNSET_BACKREF) == 0)
+ {
+ int count = GET2(cc, 1+IMM2_SIZE);
+ PCRE2_UCHAR *slot =
+ (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code)) +
+ GET2(cc, 1) * re->name_entry_size;
+
+ d = INT_MAX;
+
+ /* Scan all groups with the same name; find the shortest. */
+
+ while (count-- > 0)
+ {
+ int dd, i;
+ recno = GET2(slot, 0);
+
+ if (recno <= backref_cache[0] && backref_cache[recno] >= 0)
+ dd = backref_cache[recno];
+ else
+ {
+ ce = cs = (PCRE2_UCHAR *)PRIV(find_bracket)(startcode, utf, recno);
+ if (cs == NULL) return -2;
+ do ce += GET(ce, 1); while (*ce == OP_ALT);
+ if (cc > cs && cc < ce) /* Simple recursion */
+ {
+ dd = 0;
+ had_recurse = TRUE;
+ }
+ else
+ {
+ recurse_check *r = recurses;
+ for (r = recurses; r != NULL; r = r->prev)
+ if (r->group == cs) break;
+ if (r != NULL) /* Mutual recursion */
+ {
+ dd = 0;
+ had_recurse = TRUE;
+ }
+ else
+ {
+ this_recurse.prev = recurses;
+ this_recurse.group = cs;
+ dd = find_minlength(re, cs, startcode, utf, &this_recurse,
+ countptr, backref_cache);
+ if (dd < 0) return dd;
+ }
+ }
+
+ backref_cache[recno] = dd;
+ for (i = backref_cache[0] + 1; i < recno; i++) backref_cache[i] = -1;
+ backref_cache[0] = recno;
+ }
+
+ if (dd < d) d = dd;
+ if (d <= 0) break; /* No point looking at any more */
+ slot += re->name_entry_size;
+ }
+ }
+ else d = 0;
+ cc += 1 + 2*IMM2_SIZE;
+ goto REPEAT_BACK_REFERENCE;
+
+ /* Single back reference. We cannot find a length for this if duplicate
+ numbers are present in the pattern. */
+
+ case OP_REF:
+ case OP_REFI:
+ if (dupcapused) return -1;
+ recno = GET2(cc, 1);
+ if (recno <= backref_cache[0] && backref_cache[recno] >= 0)
+ d = backref_cache[recno];
+ else
+ {
+ int i;
+ if ((re->overall_options & PCRE2_MATCH_UNSET_BACKREF) == 0)
+ {
+ ce = cs = (PCRE2_UCHAR *)PRIV(find_bracket)(startcode, utf, recno);
+ if (cs == NULL) return -2;
+ do ce += GET(ce, 1); while (*ce == OP_ALT);
+ if (cc > cs && cc < ce) /* Simple recursion */
+ {
+ d = 0;
+ had_recurse = TRUE;
+ }
+ else
+ {
+ recurse_check *r = recurses;
+ for (r = recurses; r != NULL; r = r->prev) if (r->group == cs) break;
+ if (r != NULL) /* Mutual recursion */
+ {
+ d = 0;
+ had_recurse = TRUE;
+ }
+ else
+ {
+ this_recurse.prev = recurses;
+ this_recurse.group = cs;
+ d = find_minlength(re, cs, startcode, utf, &this_recurse, countptr,
+ backref_cache);
+ if (d < 0) return d;
+ }
+ }
+ }
+ else d = 0;
+
+ backref_cache[recno] = d;
+ for (i = backref_cache[0] + 1; i < recno; i++) backref_cache[i] = -1;
+ backref_cache[0] = recno;
+ }
+
+ cc += 1 + IMM2_SIZE;
+
+ /* Handle repeated back references */
+
+ REPEAT_BACK_REFERENCE:
+ switch (*cc)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ case OP_CRPOSSTAR:
+ case OP_CRPOSQUERY:
+ min = 0;
+ cc++;
+ break;
+
+ case OP_CRPLUS:
+ case OP_CRMINPLUS:
+ case OP_CRPOSPLUS:
+ min = 1;
+ cc++;
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ case OP_CRPOSRANGE:
+ min = GET2(cc, 1);
+ cc += 1 + 2 * IMM2_SIZE;
+ break;
+
+ default:
+ min = 1;
+ break;
+ }
+
+ /* Take care not to overflow: (1) min and d are ints, so check that their
+ product is not greater than INT_MAX. (2) branchlength is limited to
+ UINT16_MAX (checked at the top of the loop). */
+
+ if ((d > 0 && (INT_MAX/d) < min) || UINT16_MAX - branchlength < min*d)
+ branchlength = UINT16_MAX;
+ else branchlength += min * d;
+ break;
+
+ /* Recursion always refers to the first occurrence of a subpattern with a
+ given number. Therefore, we can always make use of caching, even when the
+ pattern contains multiple subpatterns with the same number. */
+
+ case OP_RECURSE:
+ cs = ce = (PCRE2_UCHAR *)startcode + GET(cc, 1);
+ recno = GET2(cs, 1+LINK_SIZE);
+ if (recno == prev_recurse_recno)
+ {
+ branchlength += prev_recurse_d;
+ }
+ else
+ {
+ do ce += GET(ce, 1); while (*ce == OP_ALT);
+ if (cc > cs && cc < ce) /* Simple recursion */
+ had_recurse = TRUE;
+ else
+ {
+ recurse_check *r = recurses;
+ for (r = recurses; r != NULL; r = r->prev) if (r->group == cs) break;
+ if (r != NULL) /* Mutual recursion */
+ had_recurse = TRUE;
+ else
+ {
+ this_recurse.prev = recurses;
+ this_recurse.group = cs;
+ prev_recurse_d = find_minlength(re, cs, startcode, utf, &this_recurse,
+ countptr, backref_cache);
+ if (prev_recurse_d < 0) return prev_recurse_d;
+ prev_recurse_recno = recno;
+ branchlength += prev_recurse_d;
+ }
+ }
+ }
+ cc += 1 + LINK_SIZE + once_fudge;
+ once_fudge = 0;
+ break;
+
+ /* Anything else does not or need not match a character. We can get the
+ item's length from the table, but for those that can match zero occurrences
+ of a character, we must take special action for UTF-8 characters. As it
+ happens, the "NOT" versions of these opcodes are used at present only for
+ ASCII characters, so they could be omitted from this list. However, in
+ future that may change, so we include them here so as not to leave a
+ gotcha for a future maintainer. */
+
+ case OP_UPTO:
+ case OP_UPTOI:
+ case OP_NOTUPTO:
+ case OP_NOTUPTOI:
+ case OP_MINUPTO:
+ case OP_MINUPTOI:
+ case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
+ case OP_POSUPTO:
+ case OP_POSUPTOI:
+ case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
+
+ case OP_STAR:
+ case OP_STARI:
+ case OP_NOTSTAR:
+ case OP_NOTSTARI:
+ case OP_MINSTAR:
+ case OP_MINSTARI:
+ case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
+ case OP_POSSTAR:
+ case OP_POSSTARI:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
+
+ case OP_QUERY:
+ case OP_QUERYI:
+ case OP_NOTQUERY:
+ case OP_NOTQUERYI:
+ case OP_MINQUERY:
+ case OP_MINQUERYI:
+ case OP_NOTMINQUERY:
+ case OP_NOTMINQUERYI:
+ case OP_POSQUERY:
+ case OP_POSQUERYI:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSQUERYI:
+
+ cc += PRIV(OP_lengths)[op];
+#ifdef SUPPORT_UNICODE
+ if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]);
+#endif
+ break;
+
+ /* Skip these, but we need to add in the name length. */
+
+ case OP_MARK:
+ case OP_PRUNE_ARG:
+ case OP_SKIP_ARG:
+ case OP_THEN_ARG:
+ cc += PRIV(OP_lengths)[op] + cc[1];
+ break;
+
+ /* The remaining opcodes are just skipped over. */
+
+ case OP_CLOSE:
+ case OP_COMMIT:
+ case OP_FAIL:
+ case OP_PRUNE:
+ case OP_SET_SOM:
+ case OP_SKIP:
+ case OP_THEN:
+ cc += PRIV(OP_lengths)[op];
+ break;
+
+ /* This should not occur: we list all opcodes explicitly so that when
+ new ones get added they are properly considered. */
+
+ default:
+ return -3;
+ }
+ }
+/* Control never gets here */
+}
+
+
+
+/*************************************************
+* Set a bit and maybe its alternate case *
+*************************************************/
+
+/* Given a character, set its first code unit's bit in the table, and also the
+corresponding bit for the other version of a letter if we are caseless.
+
+Arguments:
+ re points to the regex block
+ p points to the first code unit of the character
+ caseless TRUE if caseless
+ utf TRUE for UTF mode
+
+Returns: pointer after the character
+*/
+
+static PCRE2_SPTR
+set_table_bit(pcre2_real_code *re, PCRE2_SPTR p, BOOL caseless, BOOL utf)
+{
+uint32_t c = *p++; /* First code unit */
+(void)utf; /* Stop compiler warning when UTF not supported */
+
+/* In 16-bit and 32-bit modes, code units greater than 0xff set the bit for
+0xff. */
+
+#if PCRE2_CODE_UNIT_WIDTH != 8
+if (c > 0xff) SET_BIT(0xff); else
+#endif
+
+SET_BIT(c);
+
+/* In UTF-8 or UTF-16 mode, pick up the remaining code units in order to find
+the end of the character, even when caseless. */
+
+#ifdef SUPPORT_UNICODE
+if (utf)
+ {
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ if (c >= 0xc0) GETUTF8INC(c, p);
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+ if ((c & 0xfc00) == 0xd800) GETUTF16INC(c, p);
+#endif
+ }
+#endif /* SUPPORT_UNICODE */
+
+/* If caseless, handle the other case of the character. */
+
+if (caseless)
+ {
+ if (utf)
+ {
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ PCRE2_UCHAR buff[6];
+ c = UCD_OTHERCASE(c);
+ (void)PRIV(ord2utf)(c, buff);
+ SET_BIT(buff[0]);
+#else /* 16-bit or 32-bit mode */
+ c = UCD_OTHERCASE(c);
+ if (c > 0xff) SET_BIT(0xff); else SET_BIT(c);
+#endif
+ }
+
+ /* Not UTF */
+
+ else if (MAX_255(c)) SET_BIT(re->tables[fcc_offset + c]);
+ }
+
+return p;
+}
+
+
+
+/*************************************************
+* Set bits for a positive character type *
+*************************************************/
+
+/* This function sets starting bits for a character type. In UTF-8 mode, we can
+only do a direct setting for bytes less than 128, as otherwise there can be
+confusion with bytes in the middle of UTF-8 characters. In a "traditional"
+environment, the tables will only recognize ASCII characters anyway, but in at
+least one Windows environment, some higher bytes bits were set in the tables.
+So we deal with that case by considering the UTF-8 encoding.
+
+Arguments:
+ re the regex block
+ cbit type the type of character wanted
+ table_limit 32 for non-UTF-8; 16 for UTF-8
+
+Returns: nothing
+*/
+
+static void
+set_type_bits(pcre2_real_code *re, int cbit_type, unsigned int table_limit)
+{
+uint32_t c;
+for (c = 0; c < table_limit; c++)
+ re->start_bitmap[c] |= re->tables[c+cbits_offset+cbit_type];
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+if (table_limit == 32) return;
+for (c = 128; c < 256; c++)
+ {
+ if ((re->tables[cbits_offset + c/8] & (1 << (c&7))) != 0)
+ {
+ PCRE2_UCHAR buff[6];
+ (void)PRIV(ord2utf)(c, buff);
+ SET_BIT(buff[0]);
+ }
+ }
+#endif /* UTF-8 */
+}
+
+
+/*************************************************
+* Set bits for a negative character type *
+*************************************************/
+
+/* This function sets starting bits for a negative character type such as \D.
+In UTF-8 mode, we can only do a direct setting for bytes less than 128, as
+otherwise there can be confusion with bytes in the middle of UTF-8 characters.
+Unlike in the positive case, where we can set appropriate starting bits for
+specific high-valued UTF-8 characters, in this case we have to set the bits for
+all high-valued characters. The lowest is 0xc2, but we overkill by starting at
+0xc0 (192) for simplicity.
+
+Arguments:
+ re the regex block
+ cbit type the type of character wanted
+ table_limit 32 for non-UTF-8; 16 for UTF-8
+
+Returns: nothing
+*/
+
+static void
+set_nottype_bits(pcre2_real_code *re, int cbit_type, unsigned int table_limit)
+{
+uint32_t c;
+for (c = 0; c < table_limit; c++)
+ re->start_bitmap[c] |= ~(re->tables[c+cbits_offset+cbit_type]);
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+if (table_limit != 32) for (c = 24; c < 32; c++) re->start_bitmap[c] = 0xff;
+#endif
+}
+
+
+
+/*************************************************
+* Create bitmap of starting bytes *
+*************************************************/
+
+/* This function scans a compiled unanchored expression recursively and
+attempts to build a bitmap of the set of possible starting code units whose
+values are less than 256. In 16-bit and 32-bit mode, values above 255 all cause
+the 255 bit to be set. When calling set[_not]_type_bits() in UTF-8 (sic) mode
+we pass a value of 16 rather than 32 as the final argument. (See comments in
+those functions for the reason.)
+
+The SSB_CONTINUE return is useful for parenthesized groups in patterns such as
+(a*)b where the group provides some optional starting code units but scanning
+must continue at the outer level to find at least one mandatory code unit. At
+the outermost level, this function fails unless the result is SSB_DONE.
+
+Arguments:
+ re points to the compiled regex block
+ code points to an expression
+ utf TRUE if in UTF mode
+
+Returns: SSB_FAIL => Failed to find any starting code units
+ SSB_DONE => Found mandatory starting code units
+ SSB_CONTINUE => Found optional starting code units
+ SSB_UNKNOWN => Hit an unrecognized opcode
+*/
+
+static int
+set_start_bits(pcre2_real_code *re, PCRE2_SPTR code, BOOL utf)
+{
+uint32_t c;
+int yield = SSB_DONE;
+
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+int table_limit = utf? 16:32;
+#else
+int table_limit = 32;
+#endif
+
+do
+ {
+ BOOL try_next = TRUE;
+ PCRE2_SPTR tcode = code + 1 + LINK_SIZE;
+
+ if (*code == OP_CBRA || *code == OP_SCBRA ||
+ *code == OP_CBRAPOS || *code == OP_SCBRAPOS) tcode += IMM2_SIZE;
+
+ while (try_next) /* Loop for items in this branch */
+ {
+ int rc;
+ uint8_t *classmap = NULL;
+
+ switch(*tcode)
+ {
+ /* If we reach something we don't understand, it means a new opcode has
+ been created that hasn't been added to this function. Hopefully this
+ problem will be discovered during testing. */
+
+ default:
+ return SSB_UNKNOWN;
+
+ /* Fail for a valid opcode that implies no starting bits. */
+
+ case OP_ACCEPT:
+ case OP_ASSERT_ACCEPT:
+ case OP_ALLANY:
+ case OP_ANY:
+ case OP_ANYBYTE:
+ case OP_CIRC:
+ case OP_CIRCM:
+ case OP_CLOSE:
+ case OP_COMMIT:
+ case OP_COND:
+ case OP_CREF:
+ case OP_FALSE:
+ case OP_TRUE:
+ case OP_DNCREF:
+ case OP_DNREF:
+ case OP_DNREFI:
+ case OP_DNRREF:
+ case OP_DOLL:
+ case OP_DOLLM:
+ case OP_END:
+ case OP_EOD:
+ case OP_EODN:
+ case OP_EXTUNI:
+ case OP_FAIL:
+ case OP_MARK:
+ case OP_NOT:
+ case OP_NOTEXACT:
+ case OP_NOTEXACTI:
+ case OP_NOTI:
+ case OP_NOTMINPLUS:
+ case OP_NOTMINPLUSI:
+ case OP_NOTMINQUERY:
+ case OP_NOTMINQUERYI:
+ case OP_NOTMINSTAR:
+ case OP_NOTMINSTARI:
+ case OP_NOTMINUPTO:
+ case OP_NOTMINUPTOI:
+ case OP_NOTPLUS:
+ case OP_NOTPLUSI:
+ case OP_NOTPOSPLUS:
+ case OP_NOTPOSPLUSI:
+ case OP_NOTPOSQUERY:
+ case OP_NOTPOSQUERYI:
+ case OP_NOTPOSSTAR:
+ case OP_NOTPOSSTARI:
+ case OP_NOTPOSUPTO:
+ case OP_NOTPOSUPTOI:
+ case OP_NOTPROP:
+ case OP_NOTQUERY:
+ case OP_NOTQUERYI:
+ case OP_NOTSTAR:
+ case OP_NOTSTARI:
+ case OP_NOTUPTO:
+ case OP_NOTUPTOI:
+ case OP_NOT_HSPACE:
+ case OP_NOT_VSPACE:
+ case OP_PRUNE:
+ case OP_PRUNE_ARG:
+ case OP_RECURSE:
+ case OP_REF:
+ case OP_REFI:
+ case OP_REVERSE:
+ case OP_RREF:
+ case OP_SCOND:
+ case OP_SET_SOM:
+ case OP_SKIP:
+ case OP_SKIP_ARG:
+ case OP_SOD:
+ case OP_SOM:
+ case OP_THEN:
+ case OP_THEN_ARG:
+ return SSB_FAIL;
+
+ /* A "real" property test implies no starting bits, but the fake property
+ PT_CLIST identifies a list of characters. These lists are short, as they
+ are used for characters with more than one "other case", so there is no
+ point in recognizing them for OP_NOTPROP. */
+
+ case OP_PROP:
+ if (tcode[1] != PT_CLIST) return SSB_FAIL;
+ {
+ const uint32_t *p = PRIV(ucd_caseless_sets) + tcode[2];
+ while ((c = *p++) < NOTACHAR)
+ {
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+ if (utf)
+ {
+ PCRE2_UCHAR buff[6];
+ (void)PRIV(ord2utf)(c, buff);
+ c = buff[0];
+ }
+#endif
+ if (c > 0xff) SET_BIT(0xff); else SET_BIT(c);
+ }
+ }
+ try_next = FALSE;
+ break;
+
+ /* We can ignore word boundary tests. */
+
+ case OP_WORD_BOUNDARY:
+ case OP_NOT_WORD_BOUNDARY:
+ tcode++;
+ break;
+
+ /* If we hit a bracket or a positive lookahead assertion, recurse to set
+ bits from within the subpattern. If it can't find anything, we have to
+ give up. If it finds some mandatory character(s), we are done for this
+ branch. Otherwise, carry on scanning after the subpattern. */
+
+ case OP_BRA:
+ case OP_SBRA:
+ case OP_CBRA:
+ case OP_SCBRA:
+ case OP_BRAPOS:
+ case OP_SBRAPOS:
+ case OP_CBRAPOS:
+ case OP_SCBRAPOS:
+ case OP_ONCE:
+ case OP_ONCE_NC:
+ case OP_ASSERT:
+ rc = set_start_bits(re, tcode, utf);
+ if (rc == SSB_FAIL || rc == SSB_UNKNOWN) return rc;
+ if (rc == SSB_DONE) try_next = FALSE; else
+ {
+ do tcode += GET(tcode, 1); while (*tcode == OP_ALT);
+ tcode += 1 + LINK_SIZE;
+ }
+ break;
+
+ /* If we hit ALT or KET, it means we haven't found anything mandatory in
+ this branch, though we might have found something optional. For ALT, we
+ continue with the next alternative, but we have to arrange that the final
+ result from subpattern is SSB_CONTINUE rather than SSB_DONE. For KET,
+ return SSB_CONTINUE: if this is the top level, that indicates failure,
+ but after a nested subpattern, it causes scanning to continue. */
+
+ case OP_ALT:
+ yield = SSB_CONTINUE;
+ try_next = FALSE;
+ break;
+
+ case OP_KET:
+ case OP_KETRMAX:
+ case OP_KETRMIN:
+ case OP_KETRPOS:
+ return SSB_CONTINUE;
+
+ /* Skip over callout */
+
+ case OP_CALLOUT:
+ tcode += PRIV(OP_lengths)[OP_CALLOUT];
+ break;
+
+ case OP_CALLOUT_STR:
+ tcode += GET(tcode, 1 + 2*LINK_SIZE);
+ break;
+
+ /* Skip over lookbehind and negative lookahead assertions */
+
+ case OP_ASSERT_NOT:
+ case OP_ASSERTBACK:
+ case OP_ASSERTBACK_NOT:
+ do tcode += GET(tcode, 1); while (*tcode == OP_ALT);
+ tcode += 1 + LINK_SIZE;
+ break;
+
+ /* BRAZERO does the bracket, but carries on. */
+
+ case OP_BRAZERO:
+ case OP_BRAMINZERO:
+ case OP_BRAPOSZERO:
+ rc = set_start_bits(re, ++tcode, utf);
+ if (rc == SSB_FAIL || rc == SSB_UNKNOWN) return rc;
+ do tcode += GET(tcode,1); while (*tcode == OP_ALT);
+ tcode += 1 + LINK_SIZE;
+ break;
+
+ /* SKIPZERO skips the bracket. */
+
+ case OP_SKIPZERO:
+ tcode++;
+ do tcode += GET(tcode,1); while (*tcode == OP_ALT);
+ tcode += 1 + LINK_SIZE;
+ break;
+
+ /* Single-char * or ? sets the bit and tries the next item */
+
+ case OP_STAR:
+ case OP_MINSTAR:
+ case OP_POSSTAR:
+ case OP_QUERY:
+ case OP_MINQUERY:
+ case OP_POSQUERY:
+ tcode = set_table_bit(re, tcode + 1, FALSE, utf);
+ break;
+
+ case OP_STARI:
+ case OP_MINSTARI:
+ case OP_POSSTARI:
+ case OP_QUERYI:
+ case OP_MINQUERYI:
+ case OP_POSQUERYI:
+ tcode = set_table_bit(re, tcode + 1, TRUE, utf);
+ break;
+
+ /* Single-char upto sets the bit and tries the next */
+
+ case OP_UPTO:
+ case OP_MINUPTO:
+ case OP_POSUPTO:
+ tcode = set_table_bit(re, tcode + 1 + IMM2_SIZE, FALSE, utf);
+ break;
+
+ case OP_UPTOI:
+ case OP_MINUPTOI:
+ case OP_POSUPTOI:
+ tcode = set_table_bit(re, tcode + 1 + IMM2_SIZE, TRUE, utf);
+ break;
+
+ /* At least one single char sets the bit and stops */
+
+ case OP_EXACT:
+ tcode += IMM2_SIZE;
+ /* Fall through */
+ case OP_CHAR:
+ case OP_PLUS:
+ case OP_MINPLUS:
+ case OP_POSPLUS:
+ (void)set_table_bit(re, tcode + 1, FALSE, utf);
+ try_next = FALSE;
+ break;
+
+ case OP_EXACTI:
+ tcode += IMM2_SIZE;
+ /* Fall through */
+ case OP_CHARI:
+ case OP_PLUSI:
+ case OP_MINPLUSI:
+ case OP_POSPLUSI:
+ (void)set_table_bit(re, tcode + 1, TRUE, utf);
+ try_next = FALSE;
+ break;
+
+ /* Special spacing and line-terminating items. These recognize specific
+ lists of characters. The difference between VSPACE and ANYNL is that the
+ latter can match the two-character CRLF sequence, but that is not
+ relevant for finding the first character, so their code here is
+ identical. */
+
+ case OP_HSPACE:
+ SET_BIT(CHAR_HT);
+ SET_BIT(CHAR_SPACE);
+
+ /* For the 16-bit and 32-bit libraries (which can never be EBCDIC), set
+ the bits for 0xA0 and for code units >= 255, independently of UTF. */
+
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ SET_BIT(0xA0);
+ SET_BIT(0xFF);
+#else
+ /* For the 8-bit library in UTF-8 mode, set the bits for the first code
+ units of horizontal space characters. */
+
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ SET_BIT(0xC2); /* For U+00A0 */
+ SET_BIT(0xE1); /* For U+1680, U+180E */
+ SET_BIT(0xE2); /* For U+2000 - U+200A, U+202F, U+205F */
+ SET_BIT(0xE3); /* For U+3000 */
+ }
+ else
+#endif
+ /* For the 8-bit library not in UTF-8 mode, set the bit for 0xA0, unless
+ the code is EBCDIC. */
+ {
+#ifndef EBCDIC
+ SET_BIT(0xA0);
+#endif /* Not EBCDIC */
+ }
+#endif /* 8-bit support */
+
+ try_next = FALSE;
+ break;
+
+ case OP_ANYNL:
+ case OP_VSPACE:
+ SET_BIT(CHAR_LF);
+ SET_BIT(CHAR_VT);
+ SET_BIT(CHAR_FF);
+ SET_BIT(CHAR_CR);
+
+ /* For the 16-bit and 32-bit libraries (which can never be EBCDIC), set
+ the bits for NEL and for code units >= 255, independently of UTF. */
+
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ SET_BIT(CHAR_NEL);
+ SET_BIT(0xFF);
+#else
+ /* For the 8-bit library in UTF-8 mode, set the bits for the first code
+ units of vertical space characters. */
+
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ SET_BIT(0xC2); /* For U+0085 (NEL) */
+ SET_BIT(0xE2); /* For U+2028, U+2029 */
+ }
+ else
+#endif
+ /* For the 8-bit library not in UTF-8 mode, set the bit for NEL. */
+ {
+ SET_BIT(CHAR_NEL);
+ }
+#endif /* 8-bit support */
+
+ try_next = FALSE;
+ break;
+
+ /* Single character types set the bits and stop. Note that if PCRE2_UCP
+ is set, we do not see these op codes because \d etc are converted to
+ properties. Therefore, these apply in the case when only characters less
+ than 256 are recognized to match the types. */
+
+ case OP_NOT_DIGIT:
+ set_nottype_bits(re, cbit_digit, table_limit);
+ try_next = FALSE;
+ break;
+
+ case OP_DIGIT:
+ set_type_bits(re, cbit_digit, table_limit);
+ try_next = FALSE;
+ break;
+
+ case OP_NOT_WHITESPACE:
+ set_nottype_bits(re, cbit_space, table_limit);
+ try_next = FALSE;
+ break;
+
+ case OP_WHITESPACE:
+ set_type_bits(re, cbit_space, table_limit);
+ try_next = FALSE;
+ break;
+
+ case OP_NOT_WORDCHAR:
+ set_nottype_bits(re, cbit_word, table_limit);
+ try_next = FALSE;
+ break;
+
+ case OP_WORDCHAR:
+ set_type_bits(re, cbit_word, table_limit);
+ try_next = FALSE;
+ break;
+
+ /* One or more character type fudges the pointer and restarts, knowing
+ it will hit a single character type and stop there. */
+
+ case OP_TYPEPLUS:
+ case OP_TYPEMINPLUS:
+ case OP_TYPEPOSPLUS:
+ tcode++;
+ break;
+
+ case OP_TYPEEXACT:
+ tcode += 1 + IMM2_SIZE;
+ break;
+
+ /* Zero or more repeats of character types set the bits and then
+ try again. */
+
+ case OP_TYPEUPTO:
+ case OP_TYPEMINUPTO:
+ case OP_TYPEPOSUPTO:
+ tcode += IMM2_SIZE; /* Fall through */
+
+ case OP_TYPESTAR:
+ case OP_TYPEMINSTAR:
+ case OP_TYPEPOSSTAR:
+ case OP_TYPEQUERY:
+ case OP_TYPEMINQUERY:
+ case OP_TYPEPOSQUERY:
+ switch(tcode[1])
+ {
+ default:
+ case OP_ANY:
+ case OP_ALLANY:
+ return SSB_FAIL;
+
+ case OP_HSPACE:
+ SET_BIT(CHAR_HT);
+ SET_BIT(CHAR_SPACE);
+
+ /* For the 16-bit and 32-bit libraries (which can never be EBCDIC), set
+ the bits for 0xA0 and for code units >= 255, independently of UTF. */
+
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ SET_BIT(0xA0);
+ SET_BIT(0xFF);
+#else
+ /* For the 8-bit library in UTF-8 mode, set the bits for the first code
+ units of horizontal space characters. */
+
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ SET_BIT(0xC2); /* For U+00A0 */
+ SET_BIT(0xE1); /* For U+1680, U+180E */
+ SET_BIT(0xE2); /* For U+2000 - U+200A, U+202F, U+205F */
+ SET_BIT(0xE3); /* For U+3000 */
+ }
+ else
+#endif
+ /* For the 8-bit library not in UTF-8 mode, set the bit for 0xA0, unless
+ the code is EBCDIC. */
+ {
+#ifndef EBCDIC
+ SET_BIT(0xA0);
+#endif /* Not EBCDIC */
+ }
+#endif /* 8-bit support */
+ break;
+
+ case OP_ANYNL:
+ case OP_VSPACE:
+ SET_BIT(CHAR_LF);
+ SET_BIT(CHAR_VT);
+ SET_BIT(CHAR_FF);
+ SET_BIT(CHAR_CR);
+
+ /* For the 16-bit and 32-bit libraries (which can never be EBCDIC), set
+ the bits for NEL and for code units >= 255, independently of UTF. */
+
+#if PCRE2_CODE_UNIT_WIDTH != 8
+ SET_BIT(CHAR_NEL);
+ SET_BIT(0xFF);
+#else
+ /* For the 8-bit library in UTF-8 mode, set the bits for the first code
+ units of vertical space characters. */
+
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ SET_BIT(0xC2); /* For U+0085 (NEL) */
+ SET_BIT(0xE2); /* For U+2028, U+2029 */
+ }
+ else
+#endif
+ /* For the 8-bit library not in UTF-8 mode, set the bit for NEL. */
+ {
+ SET_BIT(CHAR_NEL);
+ }
+#endif /* 8-bit support */
+ break;
+
+ case OP_NOT_DIGIT:
+ set_nottype_bits(re, cbit_digit, table_limit);
+ break;
+
+ case OP_DIGIT:
+ set_type_bits(re, cbit_digit, table_limit);
+ break;
+
+ case OP_NOT_WHITESPACE:
+ set_nottype_bits(re, cbit_space, table_limit);
+ break;
+
+ case OP_WHITESPACE:
+ set_type_bits(re, cbit_space, table_limit);
+ break;
+
+ case OP_NOT_WORDCHAR:
+ set_nottype_bits(re, cbit_word, table_limit);
+ break;
+
+ case OP_WORDCHAR:
+ set_type_bits(re, cbit_word, table_limit);
+ break;
+ }
+
+ tcode += 2;
+ break;
+
+ /* Extended class: if there are any property checks, or if this is a
+ negative XCLASS without a map, give up. If there are no property checks,
+ there must be wide characters on the XCLASS list, because otherwise an
+ XCLASS would not have been created. This means that code points >= 255
+ are always potential starters. */
+
+#ifdef SUPPORT_WIDE_CHARS
+ case OP_XCLASS:
+ if ((tcode[1 + LINK_SIZE] & XCL_HASPROP) != 0 ||
+ (tcode[1 + LINK_SIZE] & (XCL_MAP|XCL_NOT)) == XCL_NOT)
+ return SSB_FAIL;
+
+ /* We have a positive XCLASS or a negative one without a map. Set up the
+ map pointer if there is one, and fall through. */
+
+ classmap = ((tcode[1 + LINK_SIZE] & XCL_MAP) == 0)? NULL :
+ (uint8_t *)(tcode + 1 + LINK_SIZE + 1);
+#endif
+
+ /* Enter here for a negative non-XCLASS. In the 8-bit library, if we are
+ in UTF mode, any byte with a value >= 0xc4 is a potentially valid starter
+ because it starts a character with a value > 255. In 8-bit non-UTF mode,
+ there is no difference between CLASS and NCLASS. In all other wide
+ character modes, set the 0xFF bit to indicate code units >= 255. */
+
+ case OP_NCLASS:
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+ if (utf)
+ {
+ re->start_bitmap[24] |= 0xf0; /* Bits for 0xc4 - 0xc8 */
+ memset(re->start_bitmap+25, 0xff, 7); /* Bits for 0xc9 - 0xff */
+ }
+#elif PCRE2_CODE_UNIT_WIDTH != 8
+ SET_BIT(0xFF); /* For characters >= 255 */
+#endif
+ /* Fall through */
+
+ /* Enter here for a positive non-XCLASS. If we have fallen through from
+ an XCLASS, classmap will already be set; just advance the code pointer.
+ Otherwise, set up classmap for a a non-XCLASS and advance past it. */
+
+ case OP_CLASS:
+ if (*tcode == OP_XCLASS) tcode += GET(tcode, 1); else
+ {
+ classmap = (uint8_t *)(++tcode);
+ tcode += 32 / sizeof(PCRE2_UCHAR);
+ }
+
+ /* When wide characters are supported, classmap may be NULL. In UTF-8
+ (sic) mode, the bits in a class bit map correspond to character values,
+ not to byte values. However, the bit map we are constructing is for byte
+ values. So we have to do a conversion for characters whose code point is
+ greater than 127. In fact, there are only two possible starting bytes for
+ characters in the range 128 - 255. */
+
+ if (classmap != NULL)
+ {
+#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH == 8
+ if (utf)
+ {
+ for (c = 0; c < 16; c++) re->start_bitmap[c] |= classmap[c];
+ for (c = 128; c < 256; c++)
+ {
+ if ((classmap[c/8] & (1 << (c&7))) != 0)
+ {
+ int d = (c >> 6) | 0xc0; /* Set bit for this starter */
+ re->start_bitmap[d/8] |= (1 << (d&7)); /* and then skip on to the */
+ c = (c & 0xc0) + 0x40 - 1; /* next relevant character. */
+ }
+ }
+ }
+ else
+#endif
+ /* In all modes except UTF-8, the two bit maps are compatible. */
+
+ {
+ for (c = 0; c < 32; c++) re->start_bitmap[c] |= classmap[c];
+ }
+ }
+
+ /* Act on what follows the class. For a zero minimum repeat, continue;
+ otherwise stop processing. */
+
+ switch (*tcode)
+ {
+ case OP_CRSTAR:
+ case OP_CRMINSTAR:
+ case OP_CRQUERY:
+ case OP_CRMINQUERY:
+ case OP_CRPOSSTAR:
+ case OP_CRPOSQUERY:
+ tcode++;
+ break;
+
+ case OP_CRRANGE:
+ case OP_CRMINRANGE:
+ case OP_CRPOSRANGE:
+ if (GET2(tcode, 1) == 0) tcode += 1 + 2 * IMM2_SIZE;
+ else try_next = FALSE;
+ break;
+
+ default:
+ try_next = FALSE;
+ break;
+ }
+ break; /* End of class handling case */
+ } /* End of switch for opcodes */
+ } /* End of try_next loop */
+
+ code += GET(code, 1); /* Advance to next branch */
+ }
+while (*code == OP_ALT);
+
+return yield;
+}
+
+
+
+/*************************************************
+* Study a compiled expression *
+*************************************************/
+
+/* This function is handed a compiled expression that it must study to produce
+information that will speed up the matching.
+
+Argument: points to the compiled expression
+Returns: 0 normally; non-zero should never normally occur
+ 1 unknown opcode in set_start_bits
+ 2 missing capturing bracket
+ 3 unknown opcode in find_minlength
+*/
+
+int
+PRIV(study)(pcre2_real_code *re)
+{
+int min;
+int count = 0;
+PCRE2_UCHAR *code;
+BOOL utf = (re->overall_options & PCRE2_UTF) != 0;
+
+/* Find start of compiled code */
+
+code = (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code)) +
+ re->name_entry_size * re->name_count;
+
+/* For an anchored pattern, or an unanchored pattern that has a first code
+unit, or a multiline pattern that matches only at "line start", there is no
+point in seeking a list of starting code units. */
+
+if ((re->overall_options & PCRE2_ANCHORED) == 0 &&
+ (re->flags & (PCRE2_FIRSTSET|PCRE2_STARTLINE)) == 0)
+ {
+ int rc = set_start_bits(re, code, utf);
+ if (rc == SSB_UNKNOWN) return 1;
+ if (rc == SSB_DONE) re->flags |= PCRE2_FIRSTMAPSET;
+ }
+
+/* Find the minimum length of subject string. If the pattern can match an empty
+string, the minimum length is already known. If there are more back references
+than the size of the vector we are going to cache them in, do nothing. A
+pattern that complicated will probably take a long time to analyze and may in
+any case turn out to be too complicated. Note that back reference minima are
+held as 16-bit numbers. */
+
+if ((re->flags & PCRE2_MATCH_EMPTY) == 0 &&
+ re->top_backref <= MAX_CACHE_BACKREF)
+ {
+ int backref_cache[MAX_CACHE_BACKREF+1];
+ backref_cache[0] = 0; /* Highest one that is set */
+ min = find_minlength(re, code, code, utf, NULL, &count, backref_cache);
+ switch(min)
+ {
+ case -1: /* \C in UTF mode or (*ACCEPT) or over-complex regex */
+ break; /* Leave minlength unchanged (will be zero) */
+
+ case -2:
+ return 2; /* missing capturing bracket */
+
+ case -3:
+ return 3; /* unrecognized opcode */
+
+ default:
+ if (min > UINT16_MAX) min = UINT16_MAX;
+ re->minlength = min;
+ break;
+ }
+ }
+
+return 0;
+}
+
+/* End of pcre2_study.c */
diff --git a/thirdparty/pcre2/src/pcre2_substitute.c b/thirdparty/pcre2/src/pcre2_substitute.c
new file mode 100644
index 0000000000..8da951fc6e
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_substitute.c
@@ -0,0 +1,858 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre2_internal.h"
+
+#define PTR_STACK_SIZE 20
+
+#define SUBSTITUTE_OPTIONS \
+ (PCRE2_SUBSTITUTE_EXTENDED|PCRE2_SUBSTITUTE_GLOBAL| \
+ PCRE2_SUBSTITUTE_OVERFLOW_LENGTH|PCRE2_SUBSTITUTE_UNKNOWN_UNSET| \
+ PCRE2_SUBSTITUTE_UNSET_EMPTY)
+
+
+
+/*************************************************
+* Find end of substitute text *
+*************************************************/
+
+/* In extended mode, we recognize ${name:+set text:unset text} and similar
+constructions. This requires the identification of unescaped : and }
+characters. This function scans for such. It must deal with nested ${
+constructions. The pointer to the text is updated, either to the required end
+character, or to where an error was detected.
+
+Arguments:
+ code points to the compiled expression (for options)
+ ptrptr points to the pointer to the start of the text (updated)
+ ptrend end of the whole string
+ last TRUE if the last expected string (only } recognized)
+
+Returns: 0 on success
+ negative error code on failure
+*/
+
+static int
+find_text_end(const pcre2_code *code, PCRE2_SPTR *ptrptr, PCRE2_SPTR ptrend,
+ BOOL last)
+{
+int rc = 0;
+uint32_t nestlevel = 0;
+BOOL literal = FALSE;
+PCRE2_SPTR ptr = *ptrptr;
+
+for (; ptr < ptrend; ptr++)
+ {
+ if (literal)
+ {
+ if (ptr[0] == CHAR_BACKSLASH && ptr < ptrend - 1 && ptr[1] == CHAR_E)
+ {
+ literal = FALSE;
+ ptr += 1;
+ }
+ }
+
+ else if (*ptr == CHAR_RIGHT_CURLY_BRACKET)
+ {
+ if (nestlevel == 0) goto EXIT;
+ nestlevel--;
+ }
+
+ else if (*ptr == CHAR_COLON && !last && nestlevel == 0) goto EXIT;
+
+ else if (*ptr == CHAR_DOLLAR_SIGN)
+ {
+ if (ptr < ptrend - 1 && ptr[1] == CHAR_LEFT_CURLY_BRACKET)
+ {
+ nestlevel++;
+ ptr += 1;
+ }
+ }
+
+ else if (*ptr == CHAR_BACKSLASH)
+ {
+ int erc;
+ int errorcode;
+ uint32_t ch;
+
+ if (ptr < ptrend - 1) switch (ptr[1])
+ {
+ case CHAR_L:
+ case CHAR_l:
+ case CHAR_U:
+ case CHAR_u:
+ ptr += 1;
+ continue;
+ }
+
+ ptr += 1; /* Must point after \ */
+ erc = PRIV(check_escape)(&ptr, ptrend, &ch, &errorcode,
+ code->overall_options, FALSE, NULL);
+ ptr -= 1; /* Back to last code unit of escape */
+ if (errorcode != 0)
+ {
+ rc = errorcode;
+ goto EXIT;
+ }
+
+ switch(erc)
+ {
+ case 0: /* Data character */
+ case ESC_E: /* Isolated \E is ignored */
+ break;
+
+ case ESC_Q:
+ literal = TRUE;
+ break;
+
+ default:
+ rc = PCRE2_ERROR_BADREPESCAPE;
+ goto EXIT;
+ }
+ }
+ }
+
+rc = PCRE2_ERROR_REPMISSINGBRACE; /* Terminator not found */
+
+EXIT:
+*ptrptr = ptr;
+return rc;
+}
+
+
+
+/*************************************************
+* Match and substitute *
+*************************************************/
+
+/* This function applies a compiled re to a subject string and creates a new
+string with substitutions. The first 7 arguments are the same as for
+pcre2_match(). Either string length may be PCRE2_ZERO_TERMINATED.
+
+Arguments:
+ code points to the compiled expression
+ subject points to the subject string
+ length length of subject string (may contain binary zeros)
+ start_offset where to start in the subject string
+ options option bits
+ match_data points to a match_data block, or is NULL
+ context points a PCRE2 context
+ replacement points to the replacement string
+ rlength length of replacement string
+ buffer where to put the substituted string
+ blength points to length of buffer; updated to length of string
+
+Returns: >= 0 number of substitutions made
+ < 0 an error code
+ PCRE2_ERROR_BADREPLACEMENT means invalid use of $
+*/
+
+/* This macro checks for space in the buffer before copying into it. On
+overflow, either give an error immediately, or keep on, accumulating the
+length. */
+
+#define CHECKMEMCPY(from,length) \
+ if (!overflowed && lengthleft < length) \
+ { \
+ if ((suboptions & PCRE2_SUBSTITUTE_OVERFLOW_LENGTH) == 0) goto NOROOM; \
+ overflowed = TRUE; \
+ extra_needed = length - lengthleft; \
+ } \
+ else if (overflowed) \
+ { \
+ extra_needed += length; \
+ } \
+ else \
+ { \
+ memcpy(buffer + buff_offset, from, CU2BYTES(length)); \
+ buff_offset += length; \
+ lengthleft -= length; \
+ }
+
+/* Here's the function */
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_substitute(const pcre2_code *code, PCRE2_SPTR subject, PCRE2_SIZE length,
+ PCRE2_SIZE start_offset, uint32_t options, pcre2_match_data *match_data,
+ pcre2_match_context *mcontext, PCRE2_SPTR replacement, PCRE2_SIZE rlength,
+ PCRE2_UCHAR *buffer, PCRE2_SIZE *blength)
+{
+int rc;
+int subs;
+int forcecase = 0;
+int forcecasereset = 0;
+uint32_t ovector_count;
+uint32_t goptions = 0;
+uint32_t suboptions;
+BOOL match_data_created = FALSE;
+BOOL literal = FALSE;
+BOOL overflowed = FALSE;
+#ifdef SUPPORT_UNICODE
+BOOL utf = (code->overall_options & PCRE2_UTF) != 0;
+#endif
+PCRE2_UCHAR temp[6];
+PCRE2_SPTR ptr;
+PCRE2_SPTR repend;
+PCRE2_SIZE extra_needed = 0;
+PCRE2_SIZE buff_offset, buff_length, lengthleft, fraglength;
+PCRE2_SIZE *ovector;
+
+buff_offset = 0;
+lengthleft = buff_length = *blength;
+*blength = PCRE2_UNSET;
+
+/* Partial matching is not valid. */
+
+if ((options & (PCRE2_PARTIAL_HARD|PCRE2_PARTIAL_SOFT)) != 0)
+ return PCRE2_ERROR_BADOPTION;
+
+/* If no match data block is provided, create one. */
+
+if (match_data == NULL)
+ {
+ pcre2_general_context *gcontext = (mcontext == NULL)?
+ (pcre2_general_context *)code :
+ (pcre2_general_context *)mcontext;
+ match_data = pcre2_match_data_create_from_pattern(code, gcontext);
+ if (match_data == NULL) return PCRE2_ERROR_NOMEMORY;
+ match_data_created = TRUE;
+ }
+ovector = pcre2_get_ovector_pointer(match_data);
+ovector_count = pcre2_get_ovector_count(match_data);
+
+/* Find lengths of zero-terminated strings and the end of the replacement. */
+
+if (length == PCRE2_ZERO_TERMINATED) length = PRIV(strlen)(subject);
+if (rlength == PCRE2_ZERO_TERMINATED) rlength = PRIV(strlen)(replacement);
+repend = replacement + rlength;
+
+/* Check UTF replacement string if necessary. */
+
+#ifdef SUPPORT_UNICODE
+if (utf && (options & PCRE2_NO_UTF_CHECK) == 0)
+ {
+ rc = PRIV(valid_utf)(replacement, rlength, &(match_data->rightchar));
+ if (rc != 0)
+ {
+ match_data->leftchar = 0;
+ goto EXIT;
+ }
+ }
+#endif /* SUPPORT_UNICODE */
+
+/* Save the substitute options and remove them from the match options. */
+
+suboptions = options & SUBSTITUTE_OPTIONS;
+options &= ~SUBSTITUTE_OPTIONS;
+
+/* Copy up to the start offset */
+
+if (start_offset > length)
+ {
+ match_data->leftchar = 0;
+ rc = PCRE2_ERROR_BADOFFSET;
+ goto EXIT;
+ }
+CHECKMEMCPY(subject, start_offset);
+
+/* Loop for global substituting. */
+
+subs = 0;
+do
+ {
+ PCRE2_SPTR ptrstack[PTR_STACK_SIZE];
+ uint32_t ptrstackptr = 0;
+
+ rc = pcre2_match(code, subject, length, start_offset, options|goptions,
+ match_data, mcontext);
+
+#ifdef SUPPORT_UNICODE
+ if (utf) options |= PCRE2_NO_UTF_CHECK; /* Only need to check once */
+#endif
+
+ /* Any error other than no match returns the error code. No match when not
+ doing the special after-empty-match global rematch, or when at the end of the
+ subject, breaks the global loop. Otherwise, advance the starting point by one
+ character, copying it to the output, and try again. */
+
+ if (rc < 0)
+ {
+ PCRE2_SIZE save_start;
+
+ if (rc != PCRE2_ERROR_NOMATCH) goto EXIT;
+ if (goptions == 0 || start_offset >= length) break;
+
+ /* Advance by one code point. Then, if CRLF is a valid newline sequence and
+ we have advanced into the middle of it, advance one more code point. In
+ other words, do not start in the middle of CRLF, even if CR and LF on their
+ own are valid newlines. */
+
+ save_start = start_offset++;
+ if (subject[start_offset-1] == CHAR_CR &&
+ code->newline_convention != PCRE2_NEWLINE_CR &&
+ code->newline_convention != PCRE2_NEWLINE_LF &&
+ start_offset < length &&
+ subject[start_offset] == CHAR_LF)
+ start_offset++;
+
+ /* Otherwise, in UTF mode, advance past any secondary code points. */
+
+ else if ((code->overall_options & PCRE2_UTF) != 0)
+ {
+#if PCRE2_CODE_UNIT_WIDTH == 8
+ while (start_offset < length && (subject[start_offset] & 0xc0) == 0x80)
+ start_offset++;
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+ while (start_offset < length &&
+ (subject[start_offset] & 0xfc00) == 0xdc00)
+ start_offset++;
+#endif
+ }
+
+ /* Copy what we have advanced past, reset the special global options, and
+ continue to the next match. */
+
+ fraglength = start_offset - save_start;
+ CHECKMEMCPY(subject + save_start, fraglength);
+ goptions = 0;
+ continue;
+ }
+
+ /* Handle a successful match. Matches that use \K to end before they start
+ are not supported. */
+
+ if (ovector[1] < ovector[0])
+ {
+ rc = PCRE2_ERROR_BADSUBSPATTERN;
+ goto EXIT;
+ }
+
+ /* Count substitutions with a paranoid check for integer overflow; surely no
+ real call to this function would ever hit this! */
+
+ if (subs == INT_MAX)
+ {
+ rc = PCRE2_ERROR_TOOMANYREPLACE;
+ goto EXIT;
+ }
+ subs++;
+
+ /* Copy the text leading up to the match. */
+
+ if (rc == 0) rc = ovector_count;
+ fraglength = ovector[0] - start_offset;
+ CHECKMEMCPY(subject + start_offset, fraglength);
+
+ /* Process the replacement string. Literal mode is set by \Q, but only in
+ extended mode when backslashes are being interpreted. In extended mode we
+ must handle nested substrings that are to be reprocessed. */
+
+ ptr = replacement;
+ for (;;)
+ {
+ uint32_t ch;
+ unsigned int chlen;
+
+ /* If at the end of a nested substring, pop the stack. */
+
+ if (ptr >= repend)
+ {
+ if (ptrstackptr <= 0) break; /* End of replacement string */
+ repend = ptrstack[--ptrstackptr];
+ ptr = ptrstack[--ptrstackptr];
+ continue;
+ }
+
+ /* Handle the next character */
+
+ if (literal)
+ {
+ if (ptr[0] == CHAR_BACKSLASH && ptr < repend - 1 && ptr[1] == CHAR_E)
+ {
+ literal = FALSE;
+ ptr += 2;
+ continue;
+ }
+ goto LOADLITERAL;
+ }
+
+ /* Not in literal mode. */
+
+ if (*ptr == CHAR_DOLLAR_SIGN)
+ {
+ int group, n;
+ uint32_t special = 0;
+ BOOL inparens;
+ BOOL star;
+ PCRE2_SIZE sublength;
+ PCRE2_SPTR text1_start = NULL;
+ PCRE2_SPTR text1_end = NULL;
+ PCRE2_SPTR text2_start = NULL;
+ PCRE2_SPTR text2_end = NULL;
+ PCRE2_UCHAR next;
+ PCRE2_UCHAR name[33];
+
+ if (++ptr >= repend) goto BAD;
+ if ((next = *ptr) == CHAR_DOLLAR_SIGN) goto LOADLITERAL;
+
+ group = -1;
+ n = 0;
+ inparens = FALSE;
+ star = FALSE;
+
+ if (next == CHAR_LEFT_CURLY_BRACKET)
+ {
+ if (++ptr >= repend) goto BAD;
+ next = *ptr;
+ inparens = TRUE;
+ }
+
+ if (next == CHAR_ASTERISK)
+ {
+ if (++ptr >= repend) goto BAD;
+ next = *ptr;
+ star = TRUE;
+ }
+
+ if (!star && next >= CHAR_0 && next <= CHAR_9)
+ {
+ group = next - CHAR_0;
+ while (++ptr < repend)
+ {
+ next = *ptr;
+ if (next < CHAR_0 || next > CHAR_9) break;
+ group = group * 10 + next - CHAR_0;
+
+ /* A check for a number greater than the hightest captured group
+ is sufficient here; no need for a separate overflow check. If unknown
+ groups are to be treated as unset, just skip over any remaining
+ digits and carry on. */
+
+ if (group > code->top_bracket)
+ {
+ if ((suboptions & PCRE2_SUBSTITUTE_UNKNOWN_UNSET) != 0)
+ {
+ while (++ptr < repend && *ptr >= CHAR_0 && *ptr <= CHAR_9);
+ break;
+ }
+ else
+ {
+ rc = PCRE2_ERROR_NOSUBSTRING;
+ goto PTREXIT;
+ }
+ }
+ }
+ }
+ else
+ {
+ const uint8_t *ctypes = code->tables + ctypes_offset;
+ while (MAX_255(next) && (ctypes[next] & ctype_word) != 0)
+ {
+ name[n++] = next;
+ if (n > 32) goto BAD;
+ if (++ptr >= repend) break;
+ next = *ptr;
+ }
+ if (n == 0) goto BAD;
+ name[n] = 0;
+ }
+
+ /* In extended mode we recognize ${name:+set text:unset text} and
+ ${name:-default text}. */
+
+ if (inparens)
+ {
+ if ((suboptions & PCRE2_SUBSTITUTE_EXTENDED) != 0 &&
+ !star && ptr < repend - 2 && next == CHAR_COLON)
+ {
+ special = *(++ptr);
+ if (special != CHAR_PLUS && special != CHAR_MINUS)
+ {
+ rc = PCRE2_ERROR_BADSUBSTITUTION;
+ goto PTREXIT;
+ }
+
+ text1_start = ++ptr;
+ rc = find_text_end(code, &ptr, repend, special == CHAR_MINUS);
+ if (rc != 0) goto PTREXIT;
+ text1_end = ptr;
+
+ if (special == CHAR_PLUS && *ptr == CHAR_COLON)
+ {
+ text2_start = ++ptr;
+ rc = find_text_end(code, &ptr, repend, TRUE);
+ if (rc != 0) goto PTREXIT;
+ text2_end = ptr;
+ }
+ }
+
+ else
+ {
+ if (ptr >= repend || *ptr != CHAR_RIGHT_CURLY_BRACKET)
+ {
+ rc = PCRE2_ERROR_REPMISSINGBRACE;
+ goto PTREXIT;
+ }
+ }
+
+ ptr++;
+ }
+
+ /* Have found a syntactically correct group number or name, or *name.
+ Only *MARK is currently recognized. */
+
+ if (star)
+ {
+ if (PRIV(strcmp_c8)(name, STRING_MARK) == 0)
+ {
+ PCRE2_SPTR mark = pcre2_get_mark(match_data);
+ if (mark != NULL)
+ {
+ PCRE2_SPTR mark_start = mark;
+ while (*mark != 0) mark++;
+ fraglength = mark - mark_start;
+ CHECKMEMCPY(mark_start, fraglength);
+ }
+ }
+ else goto BAD;
+ }
+
+ /* Substitute the contents of a group. We don't use substring_copy
+ functions any more, in order to support case forcing. */
+
+ else
+ {
+ PCRE2_SPTR subptr, subptrend;
+
+ /* Find a number for a named group. In case there are duplicate names,
+ search for the first one that is set. If the name is not found when
+ PCRE2_SUBSTITUTE_UNKNOWN_EMPTY is set, set the group number to a
+ non-existent group. */
+
+ if (group < 0)
+ {
+ PCRE2_SPTR first, last, entry;
+ rc = pcre2_substring_nametable_scan(code, name, &first, &last);
+ if (rc == PCRE2_ERROR_NOSUBSTRING &&
+ (suboptions & PCRE2_SUBSTITUTE_UNKNOWN_UNSET) != 0)
+ {
+ group = code->top_bracket + 1;
+ }
+ else
+ {
+ if (rc < 0) goto PTREXIT;
+ for (entry = first; entry <= last; entry += rc)
+ {
+ uint32_t ng = GET2(entry, 0);
+ if (ng < ovector_count)
+ {
+ if (group < 0) group = ng; /* First in ovector */
+ if (ovector[ng*2] != PCRE2_UNSET)
+ {
+ group = ng; /* First that is set */
+ break;
+ }
+ }
+ }
+
+ /* If group is still negative, it means we did not find a group
+ that is in the ovector. Just set the first group. */
+
+ if (group < 0) group = GET2(first, 0);
+ }
+ }
+
+ /* We now have a group that is identified by number. Find the length of
+ the captured string. If a group in a non-special substitution is unset
+ when PCRE2_SUBSTITUTE_UNSET_EMPTY is set, substitute nothing. */
+
+ rc = pcre2_substring_length_bynumber(match_data, group, &sublength);
+ if (rc < 0)
+ {
+ if (rc == PCRE2_ERROR_NOSUBSTRING &&
+ (suboptions & PCRE2_SUBSTITUTE_UNKNOWN_UNSET) != 0)
+ {
+ rc = PCRE2_ERROR_UNSET;
+ }
+ if (rc != PCRE2_ERROR_UNSET) goto PTREXIT; /* Non-unset errors */
+ if (special == 0) /* Plain substitution */
+ {
+ if ((suboptions & PCRE2_SUBSTITUTE_UNSET_EMPTY) != 0) continue;
+ goto PTREXIT; /* Else error */
+ }
+ }
+
+ /* If special is '+' we have a 'set' and possibly an 'unset' text,
+ both of which are reprocessed when used. If special is '-' we have a
+ default text for when the group is unset; it must be reprocessed. */
+
+ if (special != 0)
+ {
+ if (special == CHAR_MINUS)
+ {
+ if (rc == 0) goto LITERAL_SUBSTITUTE;
+ text2_start = text1_start;
+ text2_end = text1_end;
+ }
+
+ if (ptrstackptr >= PTR_STACK_SIZE) goto BAD;
+ ptrstack[ptrstackptr++] = ptr;
+ ptrstack[ptrstackptr++] = repend;
+
+ if (rc == 0)
+ {
+ ptr = text1_start;
+ repend = text1_end;
+ }
+ else
+ {
+ ptr = text2_start;
+ repend = text2_end;
+ }
+ continue;
+ }
+
+ /* Otherwise we have a literal substitution of a group's contents. */
+
+ LITERAL_SUBSTITUTE:
+ subptr = subject + ovector[group*2];
+ subptrend = subject + ovector[group*2 + 1];
+
+ /* Substitute a literal string, possibly forcing alphabetic case. */
+
+ while (subptr < subptrend)
+ {
+ GETCHARINCTEST(ch, subptr);
+ if (forcecase != 0)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ uint32_t type = UCD_CHARTYPE(ch);
+ if (PRIV(ucp_gentype)[type] == ucp_L &&
+ type != ((forcecase > 0)? ucp_Lu : ucp_Ll))
+ ch = UCD_OTHERCASE(ch);
+ }
+ else
+#endif
+ {
+ if (((code->tables + cbits_offset +
+ ((forcecase > 0)? cbit_upper:cbit_lower)
+ )[ch/8] & (1 << (ch%8))) == 0)
+ ch = (code->tables + fcc_offset)[ch];
+ }
+ forcecase = forcecasereset;
+ }
+
+#ifdef SUPPORT_UNICODE
+ if (utf) chlen = PRIV(ord2utf)(ch, temp); else
+#endif
+ {
+ temp[0] = ch;
+ chlen = 1;
+ }
+ CHECKMEMCPY(temp, chlen);
+ }
+ }
+ }
+
+ /* Handle an escape sequence in extended mode. We can use check_escape()
+ to process \Q, \E, \c, \o, \x and \ followed by non-alphanumerics, but
+ the case-forcing escapes are not supported in pcre2_compile() so must be
+ recognized here. */
+
+ else if ((suboptions & PCRE2_SUBSTITUTE_EXTENDED) != 0 &&
+ *ptr == CHAR_BACKSLASH)
+ {
+ int errorcode;
+
+ if (ptr < repend - 1) switch (ptr[1])
+ {
+ case CHAR_L:
+ forcecase = forcecasereset = -1;
+ ptr += 2;
+ continue;
+
+ case CHAR_l:
+ forcecase = -1;
+ forcecasereset = 0;
+ ptr += 2;
+ continue;
+
+ case CHAR_U:
+ forcecase = forcecasereset = 1;
+ ptr += 2;
+ continue;
+
+ case CHAR_u:
+ forcecase = 1;
+ forcecasereset = 0;
+ ptr += 2;
+ continue;
+
+ default:
+ break;
+ }
+
+ ptr++; /* Point after \ */
+ rc = PRIV(check_escape)(&ptr, repend, &ch, &errorcode,
+ code->overall_options, FALSE, NULL);
+ if (errorcode != 0) goto BADESCAPE;
+
+ switch(rc)
+ {
+ case ESC_E:
+ forcecase = forcecasereset = 0;
+ continue;
+
+ case ESC_Q:
+ literal = TRUE;
+ continue;
+
+ case 0: /* Data character */
+ goto LITERAL;
+
+ default:
+ goto BADESCAPE;
+ }
+ }
+
+ /* Handle a literal code unit */
+
+ else
+ {
+ LOADLITERAL:
+ GETCHARINCTEST(ch, ptr); /* Get character value, increment pointer */
+
+ LITERAL:
+ if (forcecase != 0)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ uint32_t type = UCD_CHARTYPE(ch);
+ if (PRIV(ucp_gentype)[type] == ucp_L &&
+ type != ((forcecase > 0)? ucp_Lu : ucp_Ll))
+ ch = UCD_OTHERCASE(ch);
+ }
+ else
+#endif
+ {
+ if (((code->tables + cbits_offset +
+ ((forcecase > 0)? cbit_upper:cbit_lower)
+ )[ch/8] & (1 << (ch%8))) == 0)
+ ch = (code->tables + fcc_offset)[ch];
+ }
+ forcecase = forcecasereset;
+ }
+
+#ifdef SUPPORT_UNICODE
+ if (utf) chlen = PRIV(ord2utf)(ch, temp); else
+#endif
+ {
+ temp[0] = ch;
+ chlen = 1;
+ }
+ CHECKMEMCPY(temp, chlen);
+ } /* End handling a literal code unit */
+ } /* End of loop for scanning the replacement. */
+
+ /* The replacement has been copied to the output. Update the start offset to
+ point to the rest of the subject string. If we matched an empty string,
+ do the magic for global matches. */
+
+ start_offset = ovector[1];
+ goptions = (ovector[0] != ovector[1])? 0 :
+ PCRE2_ANCHORED|PCRE2_NOTEMPTY_ATSTART;
+ } while ((suboptions & PCRE2_SUBSTITUTE_GLOBAL) != 0); /* Repeat "do" loop */
+
+/* Copy the rest of the subject. */
+
+fraglength = length - start_offset;
+CHECKMEMCPY(subject + start_offset, fraglength);
+temp[0] = 0;
+CHECKMEMCPY(temp , 1);
+
+/* If overflowed is set it means the PCRE2_SUBSTITUTE_OVERFLOW_LENGTH is set,
+and matching has carried on after a full buffer, in order to compute the length
+needed. Otherwise, an overflow generates an immediate error return. */
+
+if (overflowed)
+ {
+ rc = PCRE2_ERROR_NOMEMORY;
+ *blength = buff_length + extra_needed;
+ }
+
+/* After a successful execution, return the number of substitutions and set the
+length of buffer used, excluding the trailing zero. */
+
+else
+ {
+ rc = subs;
+ *blength = buff_offset - 1;
+ }
+
+EXIT:
+if (match_data_created) pcre2_match_data_free(match_data);
+ else match_data->rc = rc;
+return rc;
+
+NOROOM:
+rc = PCRE2_ERROR_NOMEMORY;
+goto EXIT;
+
+BAD:
+rc = PCRE2_ERROR_BADREPLACEMENT;
+goto PTREXIT;
+
+BADESCAPE:
+rc = PCRE2_ERROR_BADREPESCAPE;
+
+PTREXIT:
+*blength = (PCRE2_SIZE)(ptr - replacement);
+goto EXIT;
+}
+
+/* End of pcre2_substitute.c */
diff --git a/thirdparty/pcre2/src/pcre2_substring.c b/thirdparty/pcre2/src/pcre2_substring.c
new file mode 100644
index 0000000000..f6d7c39722
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_substring.c
@@ -0,0 +1,542 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre2_internal.h"
+
+
+
+/*************************************************
+* Copy named captured string to given buffer *
+*************************************************/
+
+/* This function copies a single captured substring into a given buffer,
+identifying it by name. If the regex permits duplicate names, the first
+substring that is set is chosen.
+
+Arguments:
+ match_data points to the match data
+ stringname the name of the required substring
+ buffer where to put the substring
+ sizeptr the size of the buffer, updated to the size of the substring
+
+Returns: if successful: zero
+ if not successful, a negative error code:
+ (1) an error from nametable_scan()
+ (2) an error from copy_bynumber()
+ (3) PCRE2_ERROR_UNAVAILABLE: no group is in ovector
+ (4) PCRE2_ERROR_UNSET: all named groups in ovector are unset
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_substring_copy_byname(pcre2_match_data *match_data, PCRE2_SPTR stringname,
+ PCRE2_UCHAR *buffer, PCRE2_SIZE *sizeptr)
+{
+PCRE2_SPTR first, last, entry;
+int failrc, entrysize;
+if (match_data->matchedby == PCRE2_MATCHEDBY_DFA_INTERPRETER)
+ return PCRE2_ERROR_DFA_UFUNC;
+entrysize = pcre2_substring_nametable_scan(match_data->code, stringname,
+ &first, &last);
+if (entrysize < 0) return entrysize;
+failrc = PCRE2_ERROR_UNAVAILABLE;
+for (entry = first; entry <= last; entry += entrysize)
+ {
+ uint32_t n = GET2(entry, 0);
+ if (n < match_data->oveccount)
+ {
+ if (match_data->ovector[n*2] != PCRE2_UNSET)
+ return pcre2_substring_copy_bynumber(match_data, n, buffer, sizeptr);
+ failrc = PCRE2_ERROR_UNSET;
+ }
+ }
+return failrc;
+}
+
+
+
+/*************************************************
+* Copy numbered captured string to given buffer *
+*************************************************/
+
+/* This function copies a single captured substring into a given buffer,
+identifying it by number.
+
+Arguments:
+ match_data points to the match data
+ stringnumber the number of the required substring
+ buffer where to put the substring
+ sizeptr the size of the buffer, updated to the size of the substring
+
+Returns: if successful: 0
+ if not successful, a negative error code:
+ PCRE2_ERROR_NOMEMORY: buffer too small
+ PCRE2_ERROR_NOSUBSTRING: no such substring
+ PCRE2_ERROR_UNAVAILABLE: ovector too small
+ PCRE2_ERROR_UNSET: substring is not set
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_substring_copy_bynumber(pcre2_match_data *match_data,
+ uint32_t stringnumber, PCRE2_UCHAR *buffer, PCRE2_SIZE *sizeptr)
+{
+int rc;
+PCRE2_SIZE size;
+rc = pcre2_substring_length_bynumber(match_data, stringnumber, &size);
+if (rc < 0) return rc;
+if (size + 1 > *sizeptr) return PCRE2_ERROR_NOMEMORY;
+memcpy(buffer, match_data->subject + match_data->ovector[stringnumber*2],
+ CU2BYTES(size));
+buffer[size] = 0;
+*sizeptr = size;
+return 0;
+}
+
+
+
+/*************************************************
+* Extract named captured string *
+*************************************************/
+
+/* This function copies a single captured substring, identified by name, into
+new memory. If the regex permits duplicate names, the first substring that is
+set is chosen.
+
+Arguments:
+ match_data pointer to match_data
+ stringname the name of the required substring
+ stringptr where to put the pointer to the new memory
+ sizeptr where to put the length of the substring
+
+Returns: if successful: zero
+ if not successful, a negative value:
+ (1) an error from nametable_scan()
+ (2) an error from get_bynumber()
+ (3) PCRE2_ERROR_UNAVAILABLE: no group is in ovector
+ (4) PCRE2_ERROR_UNSET: all named groups in ovector are unset
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_substring_get_byname(pcre2_match_data *match_data,
+ PCRE2_SPTR stringname, PCRE2_UCHAR **stringptr, PCRE2_SIZE *sizeptr)
+{
+PCRE2_SPTR first, last, entry;
+int failrc, entrysize;
+if (match_data->matchedby == PCRE2_MATCHEDBY_DFA_INTERPRETER)
+ return PCRE2_ERROR_DFA_UFUNC;
+entrysize = pcre2_substring_nametable_scan(match_data->code, stringname,
+ &first, &last);
+if (entrysize < 0) return entrysize;
+failrc = PCRE2_ERROR_UNAVAILABLE;
+for (entry = first; entry <= last; entry += entrysize)
+ {
+ uint32_t n = GET2(entry, 0);
+ if (n < match_data->oveccount)
+ {
+ if (match_data->ovector[n*2] != PCRE2_UNSET)
+ return pcre2_substring_get_bynumber(match_data, n, stringptr, sizeptr);
+ failrc = PCRE2_ERROR_UNSET;
+ }
+ }
+return failrc;
+}
+
+
+
+/*************************************************
+* Extract captured string to new memory *
+*************************************************/
+
+/* This function copies a single captured substring into a piece of new
+memory.
+
+Arguments:
+ match_data points to match data
+ stringnumber the number of the required substring
+ stringptr where to put a pointer to the new memory
+ sizeptr where to put the size of the substring
+
+Returns: if successful: 0
+ if not successful, a negative error code:
+ PCRE2_ERROR_NOMEMORY: failed to get memory
+ PCRE2_ERROR_NOSUBSTRING: no such substring
+ PCRE2_ERROR_UNAVAILABLE: ovector too small
+ PCRE2_ERROR_UNSET: substring is not set
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_substring_get_bynumber(pcre2_match_data *match_data,
+ uint32_t stringnumber, PCRE2_UCHAR **stringptr, PCRE2_SIZE *sizeptr)
+{
+int rc;
+PCRE2_SIZE size;
+PCRE2_UCHAR *yield;
+rc = pcre2_substring_length_bynumber(match_data, stringnumber, &size);
+if (rc < 0) return rc;
+yield = PRIV(memctl_malloc)(sizeof(pcre2_memctl) +
+ (size + 1)*PCRE2_CODE_UNIT_WIDTH, (pcre2_memctl *)match_data);
+if (yield == NULL) return PCRE2_ERROR_NOMEMORY;
+yield = (PCRE2_UCHAR *)(((char *)yield) + sizeof(pcre2_memctl));
+memcpy(yield, match_data->subject + match_data->ovector[stringnumber*2],
+ CU2BYTES(size));
+yield[size] = 0;
+*stringptr = yield;
+*sizeptr = size;
+return 0;
+}
+
+
+
+/*************************************************
+* Free memory obtained by get_substring *
+*************************************************/
+
+/*
+Argument: the result of a previous pcre2_substring_get_byxxx()
+Returns: nothing
+*/
+
+PCRE2_EXP_DEFN void PCRE2_CALL_CONVENTION
+pcre2_substring_free(PCRE2_UCHAR *string)
+{
+if (string != NULL)
+ {
+ pcre2_memctl *memctl = (pcre2_memctl *)((char *)string - sizeof(pcre2_memctl));
+ memctl->free(memctl, memctl->memory_data);
+ }
+}
+
+
+
+/*************************************************
+* Get length of a named substring *
+*************************************************/
+
+/* This function returns the length of a named captured substring. If the regex
+permits duplicate names, the first substring that is set is chosen.
+
+Arguments:
+ match_data pointer to match data
+ stringname the name of the required substring
+ sizeptr where to put the length
+
+Returns: 0 if successful, else a negative error number
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_substring_length_byname(pcre2_match_data *match_data,
+ PCRE2_SPTR stringname, PCRE2_SIZE *sizeptr)
+{
+PCRE2_SPTR first, last, entry;
+int failrc, entrysize;
+if (match_data->matchedby == PCRE2_MATCHEDBY_DFA_INTERPRETER)
+ return PCRE2_ERROR_DFA_UFUNC;
+entrysize = pcre2_substring_nametable_scan(match_data->code, stringname,
+ &first, &last);
+if (entrysize < 0) return entrysize;
+failrc = PCRE2_ERROR_UNAVAILABLE;
+for (entry = first; entry <= last; entry += entrysize)
+ {
+ uint32_t n = GET2(entry, 0);
+ if (n < match_data->oveccount)
+ {
+ if (match_data->ovector[n*2] != PCRE2_UNSET)
+ return pcre2_substring_length_bynumber(match_data, n, sizeptr);
+ failrc = PCRE2_ERROR_UNSET;
+ }
+ }
+return failrc;
+}
+
+
+
+/*************************************************
+* Get length of a numbered substring *
+*************************************************/
+
+/* This function returns the length of a captured substring. If the start is
+beyond the end (which can happen when \K is used in an assertion), it sets the
+length to zero.
+
+Arguments:
+ match_data pointer to match data
+ stringnumber the number of the required substring
+ sizeptr where to put the length, if not NULL
+
+Returns: if successful: 0
+ if not successful, a negative error code:
+ PCRE2_ERROR_NOSUBSTRING: no such substring
+ PCRE2_ERROR_UNAVAILABLE: ovector is too small
+ PCRE2_ERROR_UNSET: substring is not set
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_substring_length_bynumber(pcre2_match_data *match_data,
+ uint32_t stringnumber, PCRE2_SIZE *sizeptr)
+{
+PCRE2_SIZE left, right;
+int count = match_data->rc;
+if (count == PCRE2_ERROR_PARTIAL)
+ {
+ if (stringnumber > 0) return PCRE2_ERROR_PARTIAL;
+ count = 0;
+ }
+else if (count < 0) return count; /* Match failed */
+
+if (match_data->matchedby != PCRE2_MATCHEDBY_DFA_INTERPRETER)
+ {
+ if (stringnumber > match_data->code->top_bracket)
+ return PCRE2_ERROR_NOSUBSTRING;
+ if (stringnumber >= match_data->oveccount)
+ return PCRE2_ERROR_UNAVAILABLE;
+ if (match_data->ovector[stringnumber*2] == PCRE2_UNSET)
+ return PCRE2_ERROR_UNSET;
+ }
+else /* Matched using pcre2_dfa_match() */
+ {
+ if (stringnumber >= match_data->oveccount) return PCRE2_ERROR_UNAVAILABLE;
+ if (count != 0 && stringnumber >= (uint32_t)count) return PCRE2_ERROR_UNSET;
+ }
+
+left = match_data->ovector[stringnumber*2];
+right = match_data->ovector[stringnumber*2+1];
+if (sizeptr != NULL) *sizeptr = (left > right)? 0 : right - left;
+return 0;
+}
+
+
+
+/*************************************************
+* Extract all captured strings to new memory *
+*************************************************/
+
+/* This function gets one chunk of memory and builds a list of pointers and all
+the captured substrings in it. A NULL pointer is put on the end of the list.
+The substrings are zero-terminated, but also, if the final argument is
+non-NULL, a list of lengths is also returned. This allows binary data to be
+handled.
+
+Arguments:
+ match_data points to the match data
+ listptr set to point to the list of pointers
+ lengthsptr set to point to the list of lengths (may be NULL)
+
+Returns: if successful: 0
+ if not successful, a negative error code:
+ PCRE2_ERROR_NOMEMORY: failed to get memory,
+ or a match failure code
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_substring_list_get(pcre2_match_data *match_data, PCRE2_UCHAR ***listptr,
+ PCRE2_SIZE **lengthsptr)
+{
+int i, count, count2;
+PCRE2_SIZE size;
+PCRE2_SIZE *lensp;
+pcre2_memctl *memp;
+PCRE2_UCHAR **listp;
+PCRE2_UCHAR *sp;
+PCRE2_SIZE *ovector;
+
+if ((count = match_data->rc) < 0) return count; /* Match failed */
+if (count == 0) count = match_data->oveccount; /* Ovector too small */
+
+count2 = 2*count;
+ovector = match_data->ovector;
+size = sizeof(pcre2_memctl) + sizeof(PCRE2_UCHAR *); /* For final NULL */
+if (lengthsptr != NULL) size += sizeof(PCRE2_SIZE) * count; /* For lengths */
+
+for (i = 0; i < count2; i += 2)
+ {
+ size += sizeof(PCRE2_UCHAR *) + CU2BYTES(1);
+ if (ovector[i+1] > ovector[i]) size += CU2BYTES(ovector[i+1] - ovector[i]);
+ }
+
+memp = PRIV(memctl_malloc)(size, (pcre2_memctl *)match_data);
+if (memp == NULL) return PCRE2_ERROR_NOMEMORY;
+
+*listptr = listp = (PCRE2_UCHAR **)((char *)memp + sizeof(pcre2_memctl));
+lensp = (PCRE2_SIZE *)((char *)listp + sizeof(PCRE2_UCHAR *) * (count + 1));
+
+if (lengthsptr == NULL)
+ {
+ sp = (PCRE2_UCHAR *)lensp;
+ lensp = NULL;
+ }
+else
+ {
+ *lengthsptr = lensp;
+ sp = (PCRE2_UCHAR *)((char *)lensp + sizeof(PCRE2_SIZE) * count);
+ }
+
+for (i = 0; i < count2; i += 2)
+ {
+ size = (ovector[i+1] > ovector[i])? (ovector[i+1] - ovector[i]) : 0;
+ memcpy(sp, match_data->subject + ovector[i], CU2BYTES(size));
+ *listp++ = sp;
+ if (lensp != NULL) *lensp++ = size;
+ sp += size;
+ *sp++ = 0;
+ }
+
+*listp = NULL;
+return 0;
+}
+
+
+
+/*************************************************
+* Free memory obtained by substring_list_get *
+*************************************************/
+
+/*
+Argument: the result of a previous pcre2_substring_list_get()
+Returns: nothing
+*/
+
+PCRE2_EXP_DEFN void PCRE2_CALL_CONVENTION
+pcre2_substring_list_free(PCRE2_SPTR *list)
+{
+if (list != NULL)
+ {
+ pcre2_memctl *memctl = (pcre2_memctl *)((char *)list - sizeof(pcre2_memctl));
+ memctl->free(memctl, memctl->memory_data);
+ }
+}
+
+
+
+/*************************************************
+* Find (multiple) entries for named string *
+*************************************************/
+
+/* This function scans the nametable for a given name, using binary chop. It
+returns either two pointers to the entries in the table, or, if no pointers are
+given, the number of a unique group with the given name. If duplicate names are
+permitted, and the name is not unique, an error is generated.
+
+Arguments:
+ code the compiled regex
+ stringname the name whose entries required
+ firstptr where to put the pointer to the first entry
+ lastptr where to put the pointer to the last entry
+
+Returns: PCRE2_ERROR_NOSUBSTRING if the name is not found
+ otherwise, if firstptr and lastptr are NULL:
+ a group number for a unique substring
+ else PCRE2_ERROR_NOUNIQUESUBSTRING
+ otherwise:
+ the length of each entry, having set firstptr and lastptr
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_substring_nametable_scan(const pcre2_code *code, PCRE2_SPTR stringname,
+ PCRE2_SPTR *firstptr, PCRE2_SPTR *lastptr)
+{
+uint16_t bot = 0;
+uint16_t top = code->name_count;
+uint16_t entrysize = code->name_entry_size;
+PCRE2_SPTR nametable = (PCRE2_SPTR)((char *)code + sizeof(pcre2_real_code));
+
+while (top > bot)
+ {
+ uint16_t mid = (top + bot) / 2;
+ PCRE2_SPTR entry = nametable + entrysize*mid;
+ int c = PRIV(strcmp)(stringname, entry + IMM2_SIZE);
+ if (c == 0)
+ {
+ PCRE2_SPTR first;
+ PCRE2_SPTR last;
+ PCRE2_SPTR lastentry;
+ lastentry = nametable + entrysize * (code->name_count - 1);
+ first = last = entry;
+ while (first > nametable)
+ {
+ if (PRIV(strcmp)(stringname, (first - entrysize + IMM2_SIZE)) != 0) break;
+ first -= entrysize;
+ }
+ while (last < lastentry)
+ {
+ if (PRIV(strcmp)(stringname, (last + entrysize + IMM2_SIZE)) != 0) break;
+ last += entrysize;
+ }
+ if (firstptr == NULL) return (first == last)?
+ (int)GET2(entry, 0) : PCRE2_ERROR_NOUNIQUESUBSTRING;
+ *firstptr = first;
+ *lastptr = last;
+ return entrysize;
+ }
+ if (c > 0) bot = mid + 1; else top = mid;
+ }
+
+return PCRE2_ERROR_NOSUBSTRING;
+}
+
+
+/*************************************************
+* Find number for named string *
+*************************************************/
+
+/* This function is a convenience wrapper for pcre2_substring_nametable_scan()
+when it is known that names are unique. If there are duplicate names, it is not
+defined which number is returned.
+
+Arguments:
+ code the compiled regex
+ stringname the name whose number is required
+
+Returns: the number of the named parenthesis, or a negative number
+ PCRE2_ERROR_NOSUBSTRING if not found
+ PCRE2_ERROR_NOUNIQUESUBSTRING if not unique
+*/
+
+PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
+pcre2_substring_number_from_name(const pcre2_code *code,
+ PCRE2_SPTR stringname)
+{
+return pcre2_substring_nametable_scan(code, stringname, NULL, NULL);
+}
+
+/* End of pcre2_substring.c */
diff --git a/thirdparty/pcre2/src/pcre2_tables.c b/thirdparty/pcre2/src/pcre2_tables.c
new file mode 100644
index 0000000000..b945ed7a7f
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_tables.c
@@ -0,0 +1,765 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+/* This module contains some fixed tables that are used by more than one of the
+PCRE code modules. The tables are also #included by the pcre2test program,
+which uses macros to change their names from _pcre2_xxx to xxxx, thereby
+avoiding name clashes with the library. In this case, PCRE2_PCRE2TEST is
+defined. */
+
+#ifndef PCRE2_PCRE2TEST /* We're compiling the library */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include "pcre2_internal.h"
+#endif /* PCRE2_PCRE2TEST */
+
+
+/* Table of sizes for the fixed-length opcodes. It's defined in a macro so that
+the definition is next to the definition of the opcodes in pcre2_internal.h.
+This is mode-dependent, so is skipped when this file is included by pcre2test. */
+
+#ifndef PCRE2_PCRE2TEST
+const uint8_t PRIV(OP_lengths)[] = { OP_LENGTHS };
+#endif
+
+/* Tables of horizontal and vertical whitespace characters, suitable for
+adding to classes. */
+
+const uint32_t PRIV(hspace_list)[] = { HSPACE_LIST };
+const uint32_t PRIV(vspace_list)[] = { VSPACE_LIST };
+
+/* These tables are the pairs of delimiters that are valid for callout string
+arguments. For each starting delimiter there must be a matching ending
+delimiter, which in fact is different only for bracket-like delimiters. */
+
+const uint32_t PRIV(callout_start_delims)[] = {
+ CHAR_GRAVE_ACCENT, CHAR_APOSTROPHE, CHAR_QUOTATION_MARK,
+ CHAR_CIRCUMFLEX_ACCENT, CHAR_PERCENT_SIGN, CHAR_NUMBER_SIGN,
+ CHAR_DOLLAR_SIGN, CHAR_LEFT_CURLY_BRACKET, 0 };
+
+const uint32_t PRIV(callout_end_delims[]) = {
+ CHAR_GRAVE_ACCENT, CHAR_APOSTROPHE, CHAR_QUOTATION_MARK,
+ CHAR_CIRCUMFLEX_ACCENT, CHAR_PERCENT_SIGN, CHAR_NUMBER_SIGN,
+ CHAR_DOLLAR_SIGN, CHAR_RIGHT_CURLY_BRACKET, 0 };
+
+
+/*************************************************
+* Tables for UTF-8 support *
+*************************************************/
+
+/* These tables are required by pcre2test in 16- or 32-bit mode, as well
+as for the library in 8-bit mode, because pcre2test uses UTF-8 internally for
+handling wide characters. */
+
+#if defined PCRE2_PCRE2TEST || \
+ (defined SUPPORT_UNICODE && \
+ defined PCRE2_CODE_UNIT_WIDTH && \
+ PCRE2_CODE_UNIT_WIDTH == 8)
+
+/* These are the breakpoints for different numbers of bytes in a UTF-8
+character. */
+
+const int PRIV(utf8_table1)[] =
+ { 0x7f, 0x7ff, 0xffff, 0x1fffff, 0x3ffffff, 0x7fffffff};
+
+const int PRIV(utf8_table1_size) = sizeof(PRIV(utf8_table1)) / sizeof(int);
+
+/* These are the indicator bits and the mask for the data bits to set in the
+first byte of a character, indexed by the number of additional bytes. */
+
+const int PRIV(utf8_table2)[] = { 0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc};
+const int PRIV(utf8_table3)[] = { 0xff, 0x1f, 0x0f, 0x07, 0x03, 0x01};
+
+/* Table of the number of extra bytes, indexed by the first byte masked with
+0x3f. The highest number for a valid UTF-8 first byte is in fact 0x3d. */
+
+const uint8_t PRIV(utf8_table4)[] = {
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
+ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+ 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 };
+
+#endif /* UTF-8 support needed */
+
+
+#ifdef SUPPORT_UNICODE
+
+/* Table to translate from particular type value to the general value. */
+
+const uint32_t PRIV(ucp_gentype)[] = {
+ ucp_C, ucp_C, ucp_C, ucp_C, ucp_C, /* Cc, Cf, Cn, Co, Cs */
+ ucp_L, ucp_L, ucp_L, ucp_L, ucp_L, /* Ll, Lu, Lm, Lo, Lt */
+ ucp_M, ucp_M, ucp_M, /* Mc, Me, Mn */
+ ucp_N, ucp_N, ucp_N, /* Nd, Nl, No */
+ ucp_P, ucp_P, ucp_P, ucp_P, ucp_P, /* Pc, Pd, Pe, Pf, Pi */
+ ucp_P, ucp_P, /* Ps, Po */
+ ucp_S, ucp_S, ucp_S, ucp_S, /* Sc, Sk, Sm, So */
+ ucp_Z, ucp_Z, ucp_Z /* Zl, Zp, Zs */
+};
+
+/* This table encodes the rules for finding the end of an extended grapheme
+cluster. Every code point has a grapheme break property which is one of the
+ucp_gbXX values defined in pcre2_ucp.h. The 2-dimensional table is indexed by
+the properties of two adjacent code points. The left property selects a word
+from the table, and the right property selects a bit from that word like this:
+
+ PRIV(ucp_gbtable)[left-property] & (1 << right-property)
+
+The value is non-zero if a grapheme break is NOT permitted between the relevant
+two code points. The breaking rules are as follows:
+
+1. Break at the start and end of text (pretty obviously).
+
+2. Do not break between a CR and LF; otherwise, break before and after
+ controls.
+
+3. Do not break Hangul syllable sequences, the rules for which are:
+
+ L may be followed by L, V, LV or LVT
+ LV or V may be followed by V or T
+ LVT or T may be followed by T
+
+4. Do not break before extending characters.
+
+The next two rules are only for extended grapheme clusters (but that's what we
+are implementing).
+
+5. Do not break before SpacingMarks.
+
+6. Do not break after Prepend characters.
+
+7. Otherwise, break everywhere.
+*/
+
+const uint32_t PRIV(ucp_gbtable)[] = {
+ (1<<ucp_gbLF), /* 0 CR */
+ 0, /* 1 LF */
+ 0, /* 2 Control */
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark), /* 3 Extend */
+ (1<<ucp_gbExtend)|(1<<ucp_gbPrepend)| /* 4 Prepend */
+ (1<<ucp_gbSpacingMark)|(1<<ucp_gbL)|
+ (1<<ucp_gbV)|(1<<ucp_gbT)|(1<<ucp_gbLV)|
+ (1<<ucp_gbLVT)|(1<<ucp_gbOther),
+
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark), /* 5 SpacingMark */
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbL)| /* 6 L */
+ (1<<ucp_gbL)|(1<<ucp_gbV)|(1<<ucp_gbLV)|(1<<ucp_gbLVT),
+
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbV)| /* 7 V */
+ (1<<ucp_gbT),
+
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbT), /* 8 T */
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbV)| /* 9 LV */
+ (1<<ucp_gbT),
+
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark)|(1<<ucp_gbT), /* 10 LVT */
+ (1<<ucp_gbRegionalIndicator), /* 11 RegionalIndicator */
+ (1<<ucp_gbExtend)|(1<<ucp_gbSpacingMark) /* 12 Other */
+};
+
+#ifdef SUPPORT_JIT
+/* This table reverses PRIV(ucp_gentype). We can save the cost
+of a memory load. */
+
+const int PRIV(ucp_typerange)[] = {
+ ucp_Cc, ucp_Cs,
+ ucp_Ll, ucp_Lu,
+ ucp_Mc, ucp_Mn,
+ ucp_Nd, ucp_No,
+ ucp_Pc, ucp_Ps,
+ ucp_Sc, ucp_So,
+ ucp_Zl, ucp_Zs,
+};
+#endif /* SUPPORT_JIT */
+
+/* The PRIV(utt)[] table below translates Unicode property names into type and
+code values. It is searched by binary chop, so must be in collating sequence of
+name. Originally, the table contained pointers to the name strings in the first
+field of each entry. However, that leads to a large number of relocations when
+a shared library is dynamically loaded. A significant reduction is made by
+putting all the names into a single, large string and then using offsets in the
+table itself. Maintenance is more error-prone, but frequent changes to this
+data are unlikely.
+
+July 2008: There is now a script called maint/GenerateUtt.py that can be used
+to generate this data automatically instead of maintaining it by hand.
+
+The script was updated in March 2009 to generate a new EBCDIC-compliant
+version. Like all other character and string literals that are compared against
+the regular expression pattern, we must use STR_ macros instead of literal
+strings to make sure that UTF-8 support works on EBCDIC platforms. */
+
+#define STRING_Ahom0 STR_A STR_h STR_o STR_m "\0"
+#define STRING_Anatolian_Hieroglyphs0 STR_A STR_n STR_a STR_t STR_o STR_l STR_i STR_a STR_n STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0"
+#define STRING_Any0 STR_A STR_n STR_y "\0"
+#define STRING_Arabic0 STR_A STR_r STR_a STR_b STR_i STR_c "\0"
+#define STRING_Armenian0 STR_A STR_r STR_m STR_e STR_n STR_i STR_a STR_n "\0"
+#define STRING_Avestan0 STR_A STR_v STR_e STR_s STR_t STR_a STR_n "\0"
+#define STRING_Balinese0 STR_B STR_a STR_l STR_i STR_n STR_e STR_s STR_e "\0"
+#define STRING_Bamum0 STR_B STR_a STR_m STR_u STR_m "\0"
+#define STRING_Bassa_Vah0 STR_B STR_a STR_s STR_s STR_a STR_UNDERSCORE STR_V STR_a STR_h "\0"
+#define STRING_Batak0 STR_B STR_a STR_t STR_a STR_k "\0"
+#define STRING_Bengali0 STR_B STR_e STR_n STR_g STR_a STR_l STR_i "\0"
+#define STRING_Bopomofo0 STR_B STR_o STR_p STR_o STR_m STR_o STR_f STR_o "\0"
+#define STRING_Brahmi0 STR_B STR_r STR_a STR_h STR_m STR_i "\0"
+#define STRING_Braille0 STR_B STR_r STR_a STR_i STR_l STR_l STR_e "\0"
+#define STRING_Buginese0 STR_B STR_u STR_g STR_i STR_n STR_e STR_s STR_e "\0"
+#define STRING_Buhid0 STR_B STR_u STR_h STR_i STR_d "\0"
+#define STRING_C0 STR_C "\0"
+#define STRING_Canadian_Aboriginal0 STR_C STR_a STR_n STR_a STR_d STR_i STR_a STR_n STR_UNDERSCORE STR_A STR_b STR_o STR_r STR_i STR_g STR_i STR_n STR_a STR_l "\0"
+#define STRING_Carian0 STR_C STR_a STR_r STR_i STR_a STR_n "\0"
+#define STRING_Caucasian_Albanian0 STR_C STR_a STR_u STR_c STR_a STR_s STR_i STR_a STR_n STR_UNDERSCORE STR_A STR_l STR_b STR_a STR_n STR_i STR_a STR_n "\0"
+#define STRING_Cc0 STR_C STR_c "\0"
+#define STRING_Cf0 STR_C STR_f "\0"
+#define STRING_Chakma0 STR_C STR_h STR_a STR_k STR_m STR_a "\0"
+#define STRING_Cham0 STR_C STR_h STR_a STR_m "\0"
+#define STRING_Cherokee0 STR_C STR_h STR_e STR_r STR_o STR_k STR_e STR_e "\0"
+#define STRING_Cn0 STR_C STR_n "\0"
+#define STRING_Co0 STR_C STR_o "\0"
+#define STRING_Common0 STR_C STR_o STR_m STR_m STR_o STR_n "\0"
+#define STRING_Coptic0 STR_C STR_o STR_p STR_t STR_i STR_c "\0"
+#define STRING_Cs0 STR_C STR_s "\0"
+#define STRING_Cuneiform0 STR_C STR_u STR_n STR_e STR_i STR_f STR_o STR_r STR_m "\0"
+#define STRING_Cypriot0 STR_C STR_y STR_p STR_r STR_i STR_o STR_t "\0"
+#define STRING_Cyrillic0 STR_C STR_y STR_r STR_i STR_l STR_l STR_i STR_c "\0"
+#define STRING_Deseret0 STR_D STR_e STR_s STR_e STR_r STR_e STR_t "\0"
+#define STRING_Devanagari0 STR_D STR_e STR_v STR_a STR_n STR_a STR_g STR_a STR_r STR_i "\0"
+#define STRING_Duployan0 STR_D STR_u STR_p STR_l STR_o STR_y STR_a STR_n "\0"
+#define STRING_Egyptian_Hieroglyphs0 STR_E STR_g STR_y STR_p STR_t STR_i STR_a STR_n STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0"
+#define STRING_Elbasan0 STR_E STR_l STR_b STR_a STR_s STR_a STR_n "\0"
+#define STRING_Ethiopic0 STR_E STR_t STR_h STR_i STR_o STR_p STR_i STR_c "\0"
+#define STRING_Georgian0 STR_G STR_e STR_o STR_r STR_g STR_i STR_a STR_n "\0"
+#define STRING_Glagolitic0 STR_G STR_l STR_a STR_g STR_o STR_l STR_i STR_t STR_i STR_c "\0"
+#define STRING_Gothic0 STR_G STR_o STR_t STR_h STR_i STR_c "\0"
+#define STRING_Grantha0 STR_G STR_r STR_a STR_n STR_t STR_h STR_a "\0"
+#define STRING_Greek0 STR_G STR_r STR_e STR_e STR_k "\0"
+#define STRING_Gujarati0 STR_G STR_u STR_j STR_a STR_r STR_a STR_t STR_i "\0"
+#define STRING_Gurmukhi0 STR_G STR_u STR_r STR_m STR_u STR_k STR_h STR_i "\0"
+#define STRING_Han0 STR_H STR_a STR_n "\0"
+#define STRING_Hangul0 STR_H STR_a STR_n STR_g STR_u STR_l "\0"
+#define STRING_Hanunoo0 STR_H STR_a STR_n STR_u STR_n STR_o STR_o "\0"
+#define STRING_Hatran0 STR_H STR_a STR_t STR_r STR_a STR_n "\0"
+#define STRING_Hebrew0 STR_H STR_e STR_b STR_r STR_e STR_w "\0"
+#define STRING_Hiragana0 STR_H STR_i STR_r STR_a STR_g STR_a STR_n STR_a "\0"
+#define STRING_Imperial_Aramaic0 STR_I STR_m STR_p STR_e STR_r STR_i STR_a STR_l STR_UNDERSCORE STR_A STR_r STR_a STR_m STR_a STR_i STR_c "\0"
+#define STRING_Inherited0 STR_I STR_n STR_h STR_e STR_r STR_i STR_t STR_e STR_d "\0"
+#define STRING_Inscriptional_Pahlavi0 STR_I STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_UNDERSCORE STR_P STR_a STR_h STR_l STR_a STR_v STR_i "\0"
+#define STRING_Inscriptional_Parthian0 STR_I STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_UNDERSCORE STR_P STR_a STR_r STR_t STR_h STR_i STR_a STR_n "\0"
+#define STRING_Javanese0 STR_J STR_a STR_v STR_a STR_n STR_e STR_s STR_e "\0"
+#define STRING_Kaithi0 STR_K STR_a STR_i STR_t STR_h STR_i "\0"
+#define STRING_Kannada0 STR_K STR_a STR_n STR_n STR_a STR_d STR_a "\0"
+#define STRING_Katakana0 STR_K STR_a STR_t STR_a STR_k STR_a STR_n STR_a "\0"
+#define STRING_Kayah_Li0 STR_K STR_a STR_y STR_a STR_h STR_UNDERSCORE STR_L STR_i "\0"
+#define STRING_Kharoshthi0 STR_K STR_h STR_a STR_r STR_o STR_s STR_h STR_t STR_h STR_i "\0"
+#define STRING_Khmer0 STR_K STR_h STR_m STR_e STR_r "\0"
+#define STRING_Khojki0 STR_K STR_h STR_o STR_j STR_k STR_i "\0"
+#define STRING_Khudawadi0 STR_K STR_h STR_u STR_d STR_a STR_w STR_a STR_d STR_i "\0"
+#define STRING_L0 STR_L "\0"
+#define STRING_L_AMPERSAND0 STR_L STR_AMPERSAND "\0"
+#define STRING_Lao0 STR_L STR_a STR_o "\0"
+#define STRING_Latin0 STR_L STR_a STR_t STR_i STR_n "\0"
+#define STRING_Lepcha0 STR_L STR_e STR_p STR_c STR_h STR_a "\0"
+#define STRING_Limbu0 STR_L STR_i STR_m STR_b STR_u "\0"
+#define STRING_Linear_A0 STR_L STR_i STR_n STR_e STR_a STR_r STR_UNDERSCORE STR_A "\0"
+#define STRING_Linear_B0 STR_L STR_i STR_n STR_e STR_a STR_r STR_UNDERSCORE STR_B "\0"
+#define STRING_Lisu0 STR_L STR_i STR_s STR_u "\0"
+#define STRING_Ll0 STR_L STR_l "\0"
+#define STRING_Lm0 STR_L STR_m "\0"
+#define STRING_Lo0 STR_L STR_o "\0"
+#define STRING_Lt0 STR_L STR_t "\0"
+#define STRING_Lu0 STR_L STR_u "\0"
+#define STRING_Lycian0 STR_L STR_y STR_c STR_i STR_a STR_n "\0"
+#define STRING_Lydian0 STR_L STR_y STR_d STR_i STR_a STR_n "\0"
+#define STRING_M0 STR_M "\0"
+#define STRING_Mahajani0 STR_M STR_a STR_h STR_a STR_j STR_a STR_n STR_i "\0"
+#define STRING_Malayalam0 STR_M STR_a STR_l STR_a STR_y STR_a STR_l STR_a STR_m "\0"
+#define STRING_Mandaic0 STR_M STR_a STR_n STR_d STR_a STR_i STR_c "\0"
+#define STRING_Manichaean0 STR_M STR_a STR_n STR_i STR_c STR_h STR_a STR_e STR_a STR_n "\0"
+#define STRING_Mc0 STR_M STR_c "\0"
+#define STRING_Me0 STR_M STR_e "\0"
+#define STRING_Meetei_Mayek0 STR_M STR_e STR_e STR_t STR_e STR_i STR_UNDERSCORE STR_M STR_a STR_y STR_e STR_k "\0"
+#define STRING_Mende_Kikakui0 STR_M STR_e STR_n STR_d STR_e STR_UNDERSCORE STR_K STR_i STR_k STR_a STR_k STR_u STR_i "\0"
+#define STRING_Meroitic_Cursive0 STR_M STR_e STR_r STR_o STR_i STR_t STR_i STR_c STR_UNDERSCORE STR_C STR_u STR_r STR_s STR_i STR_v STR_e "\0"
+#define STRING_Meroitic_Hieroglyphs0 STR_M STR_e STR_r STR_o STR_i STR_t STR_i STR_c STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0"
+#define STRING_Miao0 STR_M STR_i STR_a STR_o "\0"
+#define STRING_Mn0 STR_M STR_n "\0"
+#define STRING_Modi0 STR_M STR_o STR_d STR_i "\0"
+#define STRING_Mongolian0 STR_M STR_o STR_n STR_g STR_o STR_l STR_i STR_a STR_n "\0"
+#define STRING_Mro0 STR_M STR_r STR_o "\0"
+#define STRING_Multani0 STR_M STR_u STR_l STR_t STR_a STR_n STR_i "\0"
+#define STRING_Myanmar0 STR_M STR_y STR_a STR_n STR_m STR_a STR_r "\0"
+#define STRING_N0 STR_N "\0"
+#define STRING_Nabataean0 STR_N STR_a STR_b STR_a STR_t STR_a STR_e STR_a STR_n "\0"
+#define STRING_Nd0 STR_N STR_d "\0"
+#define STRING_New_Tai_Lue0 STR_N STR_e STR_w STR_UNDERSCORE STR_T STR_a STR_i STR_UNDERSCORE STR_L STR_u STR_e "\0"
+#define STRING_Nko0 STR_N STR_k STR_o "\0"
+#define STRING_Nl0 STR_N STR_l "\0"
+#define STRING_No0 STR_N STR_o "\0"
+#define STRING_Ogham0 STR_O STR_g STR_h STR_a STR_m "\0"
+#define STRING_Ol_Chiki0 STR_O STR_l STR_UNDERSCORE STR_C STR_h STR_i STR_k STR_i "\0"
+#define STRING_Old_Hungarian0 STR_O STR_l STR_d STR_UNDERSCORE STR_H STR_u STR_n STR_g STR_a STR_r STR_i STR_a STR_n "\0"
+#define STRING_Old_Italic0 STR_O STR_l STR_d STR_UNDERSCORE STR_I STR_t STR_a STR_l STR_i STR_c "\0"
+#define STRING_Old_North_Arabian0 STR_O STR_l STR_d STR_UNDERSCORE STR_N STR_o STR_r STR_t STR_h STR_UNDERSCORE STR_A STR_r STR_a STR_b STR_i STR_a STR_n "\0"
+#define STRING_Old_Permic0 STR_O STR_l STR_d STR_UNDERSCORE STR_P STR_e STR_r STR_m STR_i STR_c "\0"
+#define STRING_Old_Persian0 STR_O STR_l STR_d STR_UNDERSCORE STR_P STR_e STR_r STR_s STR_i STR_a STR_n "\0"
+#define STRING_Old_South_Arabian0 STR_O STR_l STR_d STR_UNDERSCORE STR_S STR_o STR_u STR_t STR_h STR_UNDERSCORE STR_A STR_r STR_a STR_b STR_i STR_a STR_n "\0"
+#define STRING_Old_Turkic0 STR_O STR_l STR_d STR_UNDERSCORE STR_T STR_u STR_r STR_k STR_i STR_c "\0"
+#define STRING_Oriya0 STR_O STR_r STR_i STR_y STR_a "\0"
+#define STRING_Osmanya0 STR_O STR_s STR_m STR_a STR_n STR_y STR_a "\0"
+#define STRING_P0 STR_P "\0"
+#define STRING_Pahawh_Hmong0 STR_P STR_a STR_h STR_a STR_w STR_h STR_UNDERSCORE STR_H STR_m STR_o STR_n STR_g "\0"
+#define STRING_Palmyrene0 STR_P STR_a STR_l STR_m STR_y STR_r STR_e STR_n STR_e "\0"
+#define STRING_Pau_Cin_Hau0 STR_P STR_a STR_u STR_UNDERSCORE STR_C STR_i STR_n STR_UNDERSCORE STR_H STR_a STR_u "\0"
+#define STRING_Pc0 STR_P STR_c "\0"
+#define STRING_Pd0 STR_P STR_d "\0"
+#define STRING_Pe0 STR_P STR_e "\0"
+#define STRING_Pf0 STR_P STR_f "\0"
+#define STRING_Phags_Pa0 STR_P STR_h STR_a STR_g STR_s STR_UNDERSCORE STR_P STR_a "\0"
+#define STRING_Phoenician0 STR_P STR_h STR_o STR_e STR_n STR_i STR_c STR_i STR_a STR_n "\0"
+#define STRING_Pi0 STR_P STR_i "\0"
+#define STRING_Po0 STR_P STR_o "\0"
+#define STRING_Ps0 STR_P STR_s "\0"
+#define STRING_Psalter_Pahlavi0 STR_P STR_s STR_a STR_l STR_t STR_e STR_r STR_UNDERSCORE STR_P STR_a STR_h STR_l STR_a STR_v STR_i "\0"
+#define STRING_Rejang0 STR_R STR_e STR_j STR_a STR_n STR_g "\0"
+#define STRING_Runic0 STR_R STR_u STR_n STR_i STR_c "\0"
+#define STRING_S0 STR_S "\0"
+#define STRING_Samaritan0 STR_S STR_a STR_m STR_a STR_r STR_i STR_t STR_a STR_n "\0"
+#define STRING_Saurashtra0 STR_S STR_a STR_u STR_r STR_a STR_s STR_h STR_t STR_r STR_a "\0"
+#define STRING_Sc0 STR_S STR_c "\0"
+#define STRING_Sharada0 STR_S STR_h STR_a STR_r STR_a STR_d STR_a "\0"
+#define STRING_Shavian0 STR_S STR_h STR_a STR_v STR_i STR_a STR_n "\0"
+#define STRING_Siddham0 STR_S STR_i STR_d STR_d STR_h STR_a STR_m "\0"
+#define STRING_SignWriting0 STR_S STR_i STR_g STR_n STR_W STR_r STR_i STR_t STR_i STR_n STR_g "\0"
+#define STRING_Sinhala0 STR_S STR_i STR_n STR_h STR_a STR_l STR_a "\0"
+#define STRING_Sk0 STR_S STR_k "\0"
+#define STRING_Sm0 STR_S STR_m "\0"
+#define STRING_So0 STR_S STR_o "\0"
+#define STRING_Sora_Sompeng0 STR_S STR_o STR_r STR_a STR_UNDERSCORE STR_S STR_o STR_m STR_p STR_e STR_n STR_g "\0"
+#define STRING_Sundanese0 STR_S STR_u STR_n STR_d STR_a STR_n STR_e STR_s STR_e "\0"
+#define STRING_Syloti_Nagri0 STR_S STR_y STR_l STR_o STR_t STR_i STR_UNDERSCORE STR_N STR_a STR_g STR_r STR_i "\0"
+#define STRING_Syriac0 STR_S STR_y STR_r STR_i STR_a STR_c "\0"
+#define STRING_Tagalog0 STR_T STR_a STR_g STR_a STR_l STR_o STR_g "\0"
+#define STRING_Tagbanwa0 STR_T STR_a STR_g STR_b STR_a STR_n STR_w STR_a "\0"
+#define STRING_Tai_Le0 STR_T STR_a STR_i STR_UNDERSCORE STR_L STR_e "\0"
+#define STRING_Tai_Tham0 STR_T STR_a STR_i STR_UNDERSCORE STR_T STR_h STR_a STR_m "\0"
+#define STRING_Tai_Viet0 STR_T STR_a STR_i STR_UNDERSCORE STR_V STR_i STR_e STR_t "\0"
+#define STRING_Takri0 STR_T STR_a STR_k STR_r STR_i "\0"
+#define STRING_Tamil0 STR_T STR_a STR_m STR_i STR_l "\0"
+#define STRING_Telugu0 STR_T STR_e STR_l STR_u STR_g STR_u "\0"
+#define STRING_Thaana0 STR_T STR_h STR_a STR_a STR_n STR_a "\0"
+#define STRING_Thai0 STR_T STR_h STR_a STR_i "\0"
+#define STRING_Tibetan0 STR_T STR_i STR_b STR_e STR_t STR_a STR_n "\0"
+#define STRING_Tifinagh0 STR_T STR_i STR_f STR_i STR_n STR_a STR_g STR_h "\0"
+#define STRING_Tirhuta0 STR_T STR_i STR_r STR_h STR_u STR_t STR_a "\0"
+#define STRING_Ugaritic0 STR_U STR_g STR_a STR_r STR_i STR_t STR_i STR_c "\0"
+#define STRING_Vai0 STR_V STR_a STR_i "\0"
+#define STRING_Warang_Citi0 STR_W STR_a STR_r STR_a STR_n STR_g STR_UNDERSCORE STR_C STR_i STR_t STR_i "\0"
+#define STRING_Xan0 STR_X STR_a STR_n "\0"
+#define STRING_Xps0 STR_X STR_p STR_s "\0"
+#define STRING_Xsp0 STR_X STR_s STR_p "\0"
+#define STRING_Xuc0 STR_X STR_u STR_c "\0"
+#define STRING_Xwd0 STR_X STR_w STR_d "\0"
+#define STRING_Yi0 STR_Y STR_i "\0"
+#define STRING_Z0 STR_Z "\0"
+#define STRING_Zl0 STR_Z STR_l "\0"
+#define STRING_Zp0 STR_Z STR_p "\0"
+#define STRING_Zs0 STR_Z STR_s "\0"
+
+const char PRIV(utt_names)[] =
+ STRING_Ahom0
+ STRING_Anatolian_Hieroglyphs0
+ STRING_Any0
+ STRING_Arabic0
+ STRING_Armenian0
+ STRING_Avestan0
+ STRING_Balinese0
+ STRING_Bamum0
+ STRING_Bassa_Vah0
+ STRING_Batak0
+ STRING_Bengali0
+ STRING_Bopomofo0
+ STRING_Brahmi0
+ STRING_Braille0
+ STRING_Buginese0
+ STRING_Buhid0
+ STRING_C0
+ STRING_Canadian_Aboriginal0
+ STRING_Carian0
+ STRING_Caucasian_Albanian0
+ STRING_Cc0
+ STRING_Cf0
+ STRING_Chakma0
+ STRING_Cham0
+ STRING_Cherokee0
+ STRING_Cn0
+ STRING_Co0
+ STRING_Common0
+ STRING_Coptic0
+ STRING_Cs0
+ STRING_Cuneiform0
+ STRING_Cypriot0
+ STRING_Cyrillic0
+ STRING_Deseret0
+ STRING_Devanagari0
+ STRING_Duployan0
+ STRING_Egyptian_Hieroglyphs0
+ STRING_Elbasan0
+ STRING_Ethiopic0
+ STRING_Georgian0
+ STRING_Glagolitic0
+ STRING_Gothic0
+ STRING_Grantha0
+ STRING_Greek0
+ STRING_Gujarati0
+ STRING_Gurmukhi0
+ STRING_Han0
+ STRING_Hangul0
+ STRING_Hanunoo0
+ STRING_Hatran0
+ STRING_Hebrew0
+ STRING_Hiragana0
+ STRING_Imperial_Aramaic0
+ STRING_Inherited0
+ STRING_Inscriptional_Pahlavi0
+ STRING_Inscriptional_Parthian0
+ STRING_Javanese0
+ STRING_Kaithi0
+ STRING_Kannada0
+ STRING_Katakana0
+ STRING_Kayah_Li0
+ STRING_Kharoshthi0
+ STRING_Khmer0
+ STRING_Khojki0
+ STRING_Khudawadi0
+ STRING_L0
+ STRING_L_AMPERSAND0
+ STRING_Lao0
+ STRING_Latin0
+ STRING_Lepcha0
+ STRING_Limbu0
+ STRING_Linear_A0
+ STRING_Linear_B0
+ STRING_Lisu0
+ STRING_Ll0
+ STRING_Lm0
+ STRING_Lo0
+ STRING_Lt0
+ STRING_Lu0
+ STRING_Lycian0
+ STRING_Lydian0
+ STRING_M0
+ STRING_Mahajani0
+ STRING_Malayalam0
+ STRING_Mandaic0
+ STRING_Manichaean0
+ STRING_Mc0
+ STRING_Me0
+ STRING_Meetei_Mayek0
+ STRING_Mende_Kikakui0
+ STRING_Meroitic_Cursive0
+ STRING_Meroitic_Hieroglyphs0
+ STRING_Miao0
+ STRING_Mn0
+ STRING_Modi0
+ STRING_Mongolian0
+ STRING_Mro0
+ STRING_Multani0
+ STRING_Myanmar0
+ STRING_N0
+ STRING_Nabataean0
+ STRING_Nd0
+ STRING_New_Tai_Lue0
+ STRING_Nko0
+ STRING_Nl0
+ STRING_No0
+ STRING_Ogham0
+ STRING_Ol_Chiki0
+ STRING_Old_Hungarian0
+ STRING_Old_Italic0
+ STRING_Old_North_Arabian0
+ STRING_Old_Permic0
+ STRING_Old_Persian0
+ STRING_Old_South_Arabian0
+ STRING_Old_Turkic0
+ STRING_Oriya0
+ STRING_Osmanya0
+ STRING_P0
+ STRING_Pahawh_Hmong0
+ STRING_Palmyrene0
+ STRING_Pau_Cin_Hau0
+ STRING_Pc0
+ STRING_Pd0
+ STRING_Pe0
+ STRING_Pf0
+ STRING_Phags_Pa0
+ STRING_Phoenician0
+ STRING_Pi0
+ STRING_Po0
+ STRING_Ps0
+ STRING_Psalter_Pahlavi0
+ STRING_Rejang0
+ STRING_Runic0
+ STRING_S0
+ STRING_Samaritan0
+ STRING_Saurashtra0
+ STRING_Sc0
+ STRING_Sharada0
+ STRING_Shavian0
+ STRING_Siddham0
+ STRING_SignWriting0
+ STRING_Sinhala0
+ STRING_Sk0
+ STRING_Sm0
+ STRING_So0
+ STRING_Sora_Sompeng0
+ STRING_Sundanese0
+ STRING_Syloti_Nagri0
+ STRING_Syriac0
+ STRING_Tagalog0
+ STRING_Tagbanwa0
+ STRING_Tai_Le0
+ STRING_Tai_Tham0
+ STRING_Tai_Viet0
+ STRING_Takri0
+ STRING_Tamil0
+ STRING_Telugu0
+ STRING_Thaana0
+ STRING_Thai0
+ STRING_Tibetan0
+ STRING_Tifinagh0
+ STRING_Tirhuta0
+ STRING_Ugaritic0
+ STRING_Vai0
+ STRING_Warang_Citi0
+ STRING_Xan0
+ STRING_Xps0
+ STRING_Xsp0
+ STRING_Xuc0
+ STRING_Xwd0
+ STRING_Yi0
+ STRING_Z0
+ STRING_Zl0
+ STRING_Zp0
+ STRING_Zs0;
+
+const ucp_type_table PRIV(utt)[] = {
+ { 0, PT_SC, ucp_Ahom },
+ { 5, PT_SC, ucp_Anatolian_Hieroglyphs },
+ { 27, PT_ANY, 0 },
+ { 31, PT_SC, ucp_Arabic },
+ { 38, PT_SC, ucp_Armenian },
+ { 47, PT_SC, ucp_Avestan },
+ { 55, PT_SC, ucp_Balinese },
+ { 64, PT_SC, ucp_Bamum },
+ { 70, PT_SC, ucp_Bassa_Vah },
+ { 80, PT_SC, ucp_Batak },
+ { 86, PT_SC, ucp_Bengali },
+ { 94, PT_SC, ucp_Bopomofo },
+ { 103, PT_SC, ucp_Brahmi },
+ { 110, PT_SC, ucp_Braille },
+ { 118, PT_SC, ucp_Buginese },
+ { 127, PT_SC, ucp_Buhid },
+ { 133, PT_GC, ucp_C },
+ { 135, PT_SC, ucp_Canadian_Aboriginal },
+ { 155, PT_SC, ucp_Carian },
+ { 162, PT_SC, ucp_Caucasian_Albanian },
+ { 181, PT_PC, ucp_Cc },
+ { 184, PT_PC, ucp_Cf },
+ { 187, PT_SC, ucp_Chakma },
+ { 194, PT_SC, ucp_Cham },
+ { 199, PT_SC, ucp_Cherokee },
+ { 208, PT_PC, ucp_Cn },
+ { 211, PT_PC, ucp_Co },
+ { 214, PT_SC, ucp_Common },
+ { 221, PT_SC, ucp_Coptic },
+ { 228, PT_PC, ucp_Cs },
+ { 231, PT_SC, ucp_Cuneiform },
+ { 241, PT_SC, ucp_Cypriot },
+ { 249, PT_SC, ucp_Cyrillic },
+ { 258, PT_SC, ucp_Deseret },
+ { 266, PT_SC, ucp_Devanagari },
+ { 277, PT_SC, ucp_Duployan },
+ { 286, PT_SC, ucp_Egyptian_Hieroglyphs },
+ { 307, PT_SC, ucp_Elbasan },
+ { 315, PT_SC, ucp_Ethiopic },
+ { 324, PT_SC, ucp_Georgian },
+ { 333, PT_SC, ucp_Glagolitic },
+ { 344, PT_SC, ucp_Gothic },
+ { 351, PT_SC, ucp_Grantha },
+ { 359, PT_SC, ucp_Greek },
+ { 365, PT_SC, ucp_Gujarati },
+ { 374, PT_SC, ucp_Gurmukhi },
+ { 383, PT_SC, ucp_Han },
+ { 387, PT_SC, ucp_Hangul },
+ { 394, PT_SC, ucp_Hanunoo },
+ { 402, PT_SC, ucp_Hatran },
+ { 409, PT_SC, ucp_Hebrew },
+ { 416, PT_SC, ucp_Hiragana },
+ { 425, PT_SC, ucp_Imperial_Aramaic },
+ { 442, PT_SC, ucp_Inherited },
+ { 452, PT_SC, ucp_Inscriptional_Pahlavi },
+ { 474, PT_SC, ucp_Inscriptional_Parthian },
+ { 497, PT_SC, ucp_Javanese },
+ { 506, PT_SC, ucp_Kaithi },
+ { 513, PT_SC, ucp_Kannada },
+ { 521, PT_SC, ucp_Katakana },
+ { 530, PT_SC, ucp_Kayah_Li },
+ { 539, PT_SC, ucp_Kharoshthi },
+ { 550, PT_SC, ucp_Khmer },
+ { 556, PT_SC, ucp_Khojki },
+ { 563, PT_SC, ucp_Khudawadi },
+ { 573, PT_GC, ucp_L },
+ { 575, PT_LAMP, 0 },
+ { 578, PT_SC, ucp_Lao },
+ { 582, PT_SC, ucp_Latin },
+ { 588, PT_SC, ucp_Lepcha },
+ { 595, PT_SC, ucp_Limbu },
+ { 601, PT_SC, ucp_Linear_A },
+ { 610, PT_SC, ucp_Linear_B },
+ { 619, PT_SC, ucp_Lisu },
+ { 624, PT_PC, ucp_Ll },
+ { 627, PT_PC, ucp_Lm },
+ { 630, PT_PC, ucp_Lo },
+ { 633, PT_PC, ucp_Lt },
+ { 636, PT_PC, ucp_Lu },
+ { 639, PT_SC, ucp_Lycian },
+ { 646, PT_SC, ucp_Lydian },
+ { 653, PT_GC, ucp_M },
+ { 655, PT_SC, ucp_Mahajani },
+ { 664, PT_SC, ucp_Malayalam },
+ { 674, PT_SC, ucp_Mandaic },
+ { 682, PT_SC, ucp_Manichaean },
+ { 693, PT_PC, ucp_Mc },
+ { 696, PT_PC, ucp_Me },
+ { 699, PT_SC, ucp_Meetei_Mayek },
+ { 712, PT_SC, ucp_Mende_Kikakui },
+ { 726, PT_SC, ucp_Meroitic_Cursive },
+ { 743, PT_SC, ucp_Meroitic_Hieroglyphs },
+ { 764, PT_SC, ucp_Miao },
+ { 769, PT_PC, ucp_Mn },
+ { 772, PT_SC, ucp_Modi },
+ { 777, PT_SC, ucp_Mongolian },
+ { 787, PT_SC, ucp_Mro },
+ { 791, PT_SC, ucp_Multani },
+ { 799, PT_SC, ucp_Myanmar },
+ { 807, PT_GC, ucp_N },
+ { 809, PT_SC, ucp_Nabataean },
+ { 819, PT_PC, ucp_Nd },
+ { 822, PT_SC, ucp_New_Tai_Lue },
+ { 834, PT_SC, ucp_Nko },
+ { 838, PT_PC, ucp_Nl },
+ { 841, PT_PC, ucp_No },
+ { 844, PT_SC, ucp_Ogham },
+ { 850, PT_SC, ucp_Ol_Chiki },
+ { 859, PT_SC, ucp_Old_Hungarian },
+ { 873, PT_SC, ucp_Old_Italic },
+ { 884, PT_SC, ucp_Old_North_Arabian },
+ { 902, PT_SC, ucp_Old_Permic },
+ { 913, PT_SC, ucp_Old_Persian },
+ { 925, PT_SC, ucp_Old_South_Arabian },
+ { 943, PT_SC, ucp_Old_Turkic },
+ { 954, PT_SC, ucp_Oriya },
+ { 960, PT_SC, ucp_Osmanya },
+ { 968, PT_GC, ucp_P },
+ { 970, PT_SC, ucp_Pahawh_Hmong },
+ { 983, PT_SC, ucp_Palmyrene },
+ { 993, PT_SC, ucp_Pau_Cin_Hau },
+ { 1005, PT_PC, ucp_Pc },
+ { 1008, PT_PC, ucp_Pd },
+ { 1011, PT_PC, ucp_Pe },
+ { 1014, PT_PC, ucp_Pf },
+ { 1017, PT_SC, ucp_Phags_Pa },
+ { 1026, PT_SC, ucp_Phoenician },
+ { 1037, PT_PC, ucp_Pi },
+ { 1040, PT_PC, ucp_Po },
+ { 1043, PT_PC, ucp_Ps },
+ { 1046, PT_SC, ucp_Psalter_Pahlavi },
+ { 1062, PT_SC, ucp_Rejang },
+ { 1069, PT_SC, ucp_Runic },
+ { 1075, PT_GC, ucp_S },
+ { 1077, PT_SC, ucp_Samaritan },
+ { 1087, PT_SC, ucp_Saurashtra },
+ { 1098, PT_PC, ucp_Sc },
+ { 1101, PT_SC, ucp_Sharada },
+ { 1109, PT_SC, ucp_Shavian },
+ { 1117, PT_SC, ucp_Siddham },
+ { 1125, PT_SC, ucp_SignWriting },
+ { 1137, PT_SC, ucp_Sinhala },
+ { 1145, PT_PC, ucp_Sk },
+ { 1148, PT_PC, ucp_Sm },
+ { 1151, PT_PC, ucp_So },
+ { 1154, PT_SC, ucp_Sora_Sompeng },
+ { 1167, PT_SC, ucp_Sundanese },
+ { 1177, PT_SC, ucp_Syloti_Nagri },
+ { 1190, PT_SC, ucp_Syriac },
+ { 1197, PT_SC, ucp_Tagalog },
+ { 1205, PT_SC, ucp_Tagbanwa },
+ { 1214, PT_SC, ucp_Tai_Le },
+ { 1221, PT_SC, ucp_Tai_Tham },
+ { 1230, PT_SC, ucp_Tai_Viet },
+ { 1239, PT_SC, ucp_Takri },
+ { 1245, PT_SC, ucp_Tamil },
+ { 1251, PT_SC, ucp_Telugu },
+ { 1258, PT_SC, ucp_Thaana },
+ { 1265, PT_SC, ucp_Thai },
+ { 1270, PT_SC, ucp_Tibetan },
+ { 1278, PT_SC, ucp_Tifinagh },
+ { 1287, PT_SC, ucp_Tirhuta },
+ { 1295, PT_SC, ucp_Ugaritic },
+ { 1304, PT_SC, ucp_Vai },
+ { 1308, PT_SC, ucp_Warang_Citi },
+ { 1320, PT_ALNUM, 0 },
+ { 1324, PT_PXSPACE, 0 },
+ { 1328, PT_SPACE, 0 },
+ { 1332, PT_UCNC, 0 },
+ { 1336, PT_WORD, 0 },
+ { 1340, PT_SC, ucp_Yi },
+ { 1343, PT_GC, ucp_Z },
+ { 1345, PT_PC, ucp_Zl },
+ { 1348, PT_PC, ucp_Zp },
+ { 1351, PT_PC, ucp_Zs }
+};
+
+const size_t PRIV(utt_size) = sizeof(PRIV(utt)) / sizeof(ucp_type_table);
+
+#endif /* SUPPORT_UNICODE */
+
+/* End of pcre2_tables.c */
diff --git a/thirdparty/pcre2/src/pcre2_ucd.c b/thirdparty/pcre2/src/pcre2_ucd.c
new file mode 100644
index 0000000000..116f537b38
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_ucd.c
@@ -0,0 +1,3747 @@
+/* This module is generated by the maint/MultiStage2.py script.
+Do not modify it by hand. Instead modify the script and run it
+to regenerate this code.
+
+As well as being part of the PCRE2 library, this module is #included
+by the pcre2test program, which redefines the PRIV macro to change
+table names from _pcre2_xxx to xxxx, thereby avoiding name clashes
+with the library. At present, just one of these tables is actually
+needed. */
+
+#ifndef PCRE2_PCRE2TEST
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "pcre2_internal.h"
+
+#endif /* PCRE2_PCRE2TEST */
+
+/* Unicode character database. */
+/* This file was autogenerated by the MultiStage2.py script. */
+/* Total size: 75072 bytes, block size: 128. */
+
+/* The tables herein are needed only when UCP support is built,
+and in PCRE2 that happens automatically with UTF support.
+This module should not be referenced otherwise, so
+it should not matter whether it is compiled or not. However
+a comment was received about space saving - maybe the guy linked
+all the modules rather than using a library - so we include a
+condition to cut out the tables when not needed. But don't leave
+a totally empty module because some compilers barf at that.
+Instead, just supply small dummy tables. */
+
+#ifndef SUPPORT_UNICODE
+const ucd_record PRIV(ucd_records)[] = {{0,0,0,0,0 }};
+const uint8_t PRIV(ucd_stage1)[] = {0};
+const uint16_t PRIV(ucd_stage2)[] = {0};
+const uint32_t PRIV(ucd_caseless_sets)[] = {0};
+#else
+
+const char *PRIV(unicode_version) = "8.0.0";
+
+/* When recompiling tables with a new Unicode version, please check the
+types in this structure definition from pcre2_internal.h (the actual
+field names will be different):
+
+typedef struct {
+uint8_t property_0;
+uint8_t property_1;
+uint8_t property_2;
+uint8_t property_3;
+pcre_int32 property_4;
+} ucd_record;
+*/
+
+
+const uint32_t PRIV(ucd_caseless_sets)[] = {
+ NOTACHAR,
+ 0x0053, 0x0073, 0x017f, NOTACHAR,
+ 0x01c4, 0x01c5, 0x01c6, NOTACHAR,
+ 0x01c7, 0x01c8, 0x01c9, NOTACHAR,
+ 0x01ca, 0x01cb, 0x01cc, NOTACHAR,
+ 0x01f1, 0x01f2, 0x01f3, NOTACHAR,
+ 0x0345, 0x0399, 0x03b9, 0x1fbe, NOTACHAR,
+ 0x00b5, 0x039c, 0x03bc, NOTACHAR,
+ 0x03a3, 0x03c2, 0x03c3, NOTACHAR,
+ 0x0392, 0x03b2, 0x03d0, NOTACHAR,
+ 0x0398, 0x03b8, 0x03d1, 0x03f4, NOTACHAR,
+ 0x03a6, 0x03c6, 0x03d5, NOTACHAR,
+ 0x03a0, 0x03c0, 0x03d6, NOTACHAR,
+ 0x039a, 0x03ba, 0x03f0, NOTACHAR,
+ 0x03a1, 0x03c1, 0x03f1, NOTACHAR,
+ 0x0395, 0x03b5, 0x03f5, NOTACHAR,
+ 0x1e60, 0x1e61, 0x1e9b, NOTACHAR,
+ 0x03a9, 0x03c9, 0x2126, NOTACHAR,
+ 0x004b, 0x006b, 0x212a, NOTACHAR,
+ 0x00c5, 0x00e5, 0x212b, NOTACHAR,
+};
+
+/* When #included in pcre2test, we don't need this large table. */
+
+#ifndef PCRE2_PCRE2TEST
+
+const ucd_record PRIV(ucd_records)[] = { /* 5952 bytes, record size 8 */
+ { 9, 0, 2, 0, 0, }, /* 0 */
+ { 9, 0, 1, 0, 0, }, /* 1 */
+ { 9, 0, 0, 0, 0, }, /* 2 */
+ { 9, 29, 12, 0, 0, }, /* 3 */
+ { 9, 21, 12, 0, 0, }, /* 4 */
+ { 9, 23, 12, 0, 0, }, /* 5 */
+ { 9, 22, 12, 0, 0, }, /* 6 */
+ { 9, 18, 12, 0, 0, }, /* 7 */
+ { 9, 25, 12, 0, 0, }, /* 8 */
+ { 9, 17, 12, 0, 0, }, /* 9 */
+ { 9, 13, 12, 0, 0, }, /* 10 */
+ { 33, 9, 12, 0, 32, }, /* 11 */
+ { 33, 9, 12, 71, 32, }, /* 12 */
+ { 33, 9, 12, 1, 32, }, /* 13 */
+ { 9, 24, 12, 0, 0, }, /* 14 */
+ { 9, 16, 12, 0, 0, }, /* 15 */
+ { 33, 5, 12, 0, -32, }, /* 16 */
+ { 33, 5, 12, 71, -32, }, /* 17 */
+ { 33, 5, 12, 1, -32, }, /* 18 */
+ { 9, 26, 12, 0, 0, }, /* 19 */
+ { 33, 7, 12, 0, 0, }, /* 20 */
+ { 9, 20, 12, 0, 0, }, /* 21 */
+ { 9, 1, 2, 0, 0, }, /* 22 */
+ { 9, 15, 12, 0, 0, }, /* 23 */
+ { 9, 5, 12, 26, 775, }, /* 24 */
+ { 9, 19, 12, 0, 0, }, /* 25 */
+ { 33, 9, 12, 75, 32, }, /* 26 */
+ { 33, 5, 12, 0, 7615, }, /* 27 */
+ { 33, 5, 12, 75, -32, }, /* 28 */
+ { 33, 5, 12, 0, 121, }, /* 29 */
+ { 33, 9, 12, 0, 1, }, /* 30 */
+ { 33, 5, 12, 0, -1, }, /* 31 */
+ { 33, 9, 12, 0, 0, }, /* 32 */
+ { 33, 5, 12, 0, 0, }, /* 33 */
+ { 33, 9, 12, 0, -121, }, /* 34 */
+ { 33, 5, 12, 1, -268, }, /* 35 */
+ { 33, 5, 12, 0, 195, }, /* 36 */
+ { 33, 9, 12, 0, 210, }, /* 37 */
+ { 33, 9, 12, 0, 206, }, /* 38 */
+ { 33, 9, 12, 0, 205, }, /* 39 */
+ { 33, 9, 12, 0, 79, }, /* 40 */
+ { 33, 9, 12, 0, 202, }, /* 41 */
+ { 33, 9, 12, 0, 203, }, /* 42 */
+ { 33, 9, 12, 0, 207, }, /* 43 */
+ { 33, 5, 12, 0, 97, }, /* 44 */
+ { 33, 9, 12, 0, 211, }, /* 45 */
+ { 33, 9, 12, 0, 209, }, /* 46 */
+ { 33, 5, 12, 0, 163, }, /* 47 */
+ { 33, 9, 12, 0, 213, }, /* 48 */
+ { 33, 5, 12, 0, 130, }, /* 49 */
+ { 33, 9, 12, 0, 214, }, /* 50 */
+ { 33, 9, 12, 0, 218, }, /* 51 */
+ { 33, 9, 12, 0, 217, }, /* 52 */
+ { 33, 9, 12, 0, 219, }, /* 53 */
+ { 33, 5, 12, 0, 56, }, /* 54 */
+ { 33, 9, 12, 5, 2, }, /* 55 */
+ { 33, 8, 12, 5, 1, }, /* 56 */
+ { 33, 5, 12, 5, -2, }, /* 57 */
+ { 33, 9, 12, 9, 2, }, /* 58 */
+ { 33, 8, 12, 9, 1, }, /* 59 */
+ { 33, 5, 12, 9, -2, }, /* 60 */
+ { 33, 9, 12, 13, 2, }, /* 61 */
+ { 33, 8, 12, 13, 1, }, /* 62 */
+ { 33, 5, 12, 13, -2, }, /* 63 */
+ { 33, 5, 12, 0, -79, }, /* 64 */
+ { 33, 9, 12, 17, 2, }, /* 65 */
+ { 33, 8, 12, 17, 1, }, /* 66 */
+ { 33, 5, 12, 17, -2, }, /* 67 */
+ { 33, 9, 12, 0, -97, }, /* 68 */
+ { 33, 9, 12, 0, -56, }, /* 69 */
+ { 33, 9, 12, 0, -130, }, /* 70 */
+ { 33, 9, 12, 0, 10795, }, /* 71 */
+ { 33, 9, 12, 0, -163, }, /* 72 */
+ { 33, 9, 12, 0, 10792, }, /* 73 */
+ { 33, 5, 12, 0, 10815, }, /* 74 */
+ { 33, 9, 12, 0, -195, }, /* 75 */
+ { 33, 9, 12, 0, 69, }, /* 76 */
+ { 33, 9, 12, 0, 71, }, /* 77 */
+ { 33, 5, 12, 0, 10783, }, /* 78 */
+ { 33, 5, 12, 0, 10780, }, /* 79 */
+ { 33, 5, 12, 0, 10782, }, /* 80 */
+ { 33, 5, 12, 0, -210, }, /* 81 */
+ { 33, 5, 12, 0, -206, }, /* 82 */
+ { 33, 5, 12, 0, -205, }, /* 83 */
+ { 33, 5, 12, 0, -202, }, /* 84 */
+ { 33, 5, 12, 0, -203, }, /* 85 */
+ { 33, 5, 12, 0, 42319, }, /* 86 */
+ { 33, 5, 12, 0, 42315, }, /* 87 */
+ { 33, 5, 12, 0, -207, }, /* 88 */
+ { 33, 5, 12, 0, 42280, }, /* 89 */
+ { 33, 5, 12, 0, 42308, }, /* 90 */
+ { 33, 5, 12, 0, -209, }, /* 91 */
+ { 33, 5, 12, 0, -211, }, /* 92 */
+ { 33, 5, 12, 0, 10743, }, /* 93 */
+ { 33, 5, 12, 0, 42305, }, /* 94 */
+ { 33, 5, 12, 0, 10749, }, /* 95 */
+ { 33, 5, 12, 0, -213, }, /* 96 */
+ { 33, 5, 12, 0, -214, }, /* 97 */
+ { 33, 5, 12, 0, 10727, }, /* 98 */
+ { 33, 5, 12, 0, -218, }, /* 99 */
+ { 33, 5, 12, 0, 42282, }, /* 100 */
+ { 33, 5, 12, 0, -69, }, /* 101 */
+ { 33, 5, 12, 0, -217, }, /* 102 */
+ { 33, 5, 12, 0, -71, }, /* 103 */
+ { 33, 5, 12, 0, -219, }, /* 104 */
+ { 33, 5, 12, 0, 42261, }, /* 105 */
+ { 33, 5, 12, 0, 42258, }, /* 106 */
+ { 33, 6, 12, 0, 0, }, /* 107 */
+ { 9, 6, 12, 0, 0, }, /* 108 */
+ { 3, 24, 12, 0, 0, }, /* 109 */
+ { 27, 12, 3, 0, 0, }, /* 110 */
+ { 27, 12, 3, 21, 116, }, /* 111 */
+ { 19, 9, 12, 0, 1, }, /* 112 */
+ { 19, 5, 12, 0, -1, }, /* 113 */
+ { 19, 24, 12, 0, 0, }, /* 114 */
+ { 9, 2, 12, 0, 0, }, /* 115 */
+ { 19, 6, 12, 0, 0, }, /* 116 */
+ { 19, 5, 12, 0, 130, }, /* 117 */
+ { 19, 9, 12, 0, 116, }, /* 118 */
+ { 19, 9, 12, 0, 38, }, /* 119 */
+ { 19, 9, 12, 0, 37, }, /* 120 */
+ { 19, 9, 12, 0, 64, }, /* 121 */
+ { 19, 9, 12, 0, 63, }, /* 122 */
+ { 19, 5, 12, 0, 0, }, /* 123 */
+ { 19, 9, 12, 0, 32, }, /* 124 */
+ { 19, 9, 12, 34, 32, }, /* 125 */
+ { 19, 9, 12, 59, 32, }, /* 126 */
+ { 19, 9, 12, 38, 32, }, /* 127 */
+ { 19, 9, 12, 21, 32, }, /* 128 */
+ { 19, 9, 12, 51, 32, }, /* 129 */
+ { 19, 9, 12, 26, 32, }, /* 130 */
+ { 19, 9, 12, 47, 32, }, /* 131 */
+ { 19, 9, 12, 55, 32, }, /* 132 */
+ { 19, 9, 12, 30, 32, }, /* 133 */
+ { 19, 9, 12, 43, 32, }, /* 134 */
+ { 19, 9, 12, 67, 32, }, /* 135 */
+ { 19, 5, 12, 0, -38, }, /* 136 */
+ { 19, 5, 12, 0, -37, }, /* 137 */
+ { 19, 5, 12, 0, -32, }, /* 138 */
+ { 19, 5, 12, 34, -32, }, /* 139 */
+ { 19, 5, 12, 59, -32, }, /* 140 */
+ { 19, 5, 12, 38, -32, }, /* 141 */
+ { 19, 5, 12, 21, -116, }, /* 142 */
+ { 19, 5, 12, 51, -32, }, /* 143 */
+ { 19, 5, 12, 26, -775, }, /* 144 */
+ { 19, 5, 12, 47, -32, }, /* 145 */
+ { 19, 5, 12, 55, -32, }, /* 146 */
+ { 19, 5, 12, 30, 1, }, /* 147 */
+ { 19, 5, 12, 30, -32, }, /* 148 */
+ { 19, 5, 12, 43, -32, }, /* 149 */
+ { 19, 5, 12, 67, -32, }, /* 150 */
+ { 19, 5, 12, 0, -64, }, /* 151 */
+ { 19, 5, 12, 0, -63, }, /* 152 */
+ { 19, 9, 12, 0, 8, }, /* 153 */
+ { 19, 5, 12, 34, -30, }, /* 154 */
+ { 19, 5, 12, 38, -25, }, /* 155 */
+ { 19, 9, 12, 0, 0, }, /* 156 */
+ { 19, 5, 12, 43, -15, }, /* 157 */
+ { 19, 5, 12, 47, -22, }, /* 158 */
+ { 19, 5, 12, 0, -8, }, /* 159 */
+ { 10, 9, 12, 0, 1, }, /* 160 */
+ { 10, 5, 12, 0, -1, }, /* 161 */
+ { 19, 5, 12, 51, -54, }, /* 162 */
+ { 19, 5, 12, 55, -48, }, /* 163 */
+ { 19, 5, 12, 0, 7, }, /* 164 */
+ { 19, 5, 12, 0, -116, }, /* 165 */
+ { 19, 9, 12, 38, -60, }, /* 166 */
+ { 19, 5, 12, 59, -64, }, /* 167 */
+ { 19, 25, 12, 0, 0, }, /* 168 */
+ { 19, 9, 12, 0, -7, }, /* 169 */
+ { 19, 9, 12, 0, -130, }, /* 170 */
+ { 12, 9, 12, 0, 80, }, /* 171 */
+ { 12, 9, 12, 0, 32, }, /* 172 */
+ { 12, 5, 12, 0, -32, }, /* 173 */
+ { 12, 5, 12, 0, -80, }, /* 174 */
+ { 12, 9, 12, 0, 1, }, /* 175 */
+ { 12, 5, 12, 0, -1, }, /* 176 */
+ { 12, 26, 12, 0, 0, }, /* 177 */
+ { 12, 12, 3, 0, 0, }, /* 178 */
+ { 12, 11, 3, 0, 0, }, /* 179 */
+ { 12, 9, 12, 0, 15, }, /* 180 */
+ { 12, 5, 12, 0, -15, }, /* 181 */
+ { 1, 9, 12, 0, 48, }, /* 182 */
+ { 1, 6, 12, 0, 0, }, /* 183 */
+ { 1, 21, 12, 0, 0, }, /* 184 */
+ { 1, 5, 12, 0, -48, }, /* 185 */
+ { 1, 5, 12, 0, 0, }, /* 186 */
+ { 1, 17, 12, 0, 0, }, /* 187 */
+ { 1, 26, 12, 0, 0, }, /* 188 */
+ { 1, 23, 12, 0, 0, }, /* 189 */
+ { 25, 12, 3, 0, 0, }, /* 190 */
+ { 25, 17, 12, 0, 0, }, /* 191 */
+ { 25, 21, 12, 0, 0, }, /* 192 */
+ { 25, 7, 12, 0, 0, }, /* 193 */
+ { 0, 1, 2, 0, 0, }, /* 194 */
+ { 0, 25, 12, 0, 0, }, /* 195 */
+ { 0, 21, 12, 0, 0, }, /* 196 */
+ { 0, 23, 12, 0, 0, }, /* 197 */
+ { 0, 26, 12, 0, 0, }, /* 198 */
+ { 0, 12, 3, 0, 0, }, /* 199 */
+ { 0, 7, 12, 0, 0, }, /* 200 */
+ { 0, 13, 12, 0, 0, }, /* 201 */
+ { 0, 6, 12, 0, 0, }, /* 202 */
+ { 49, 21, 12, 0, 0, }, /* 203 */
+ { 49, 1, 2, 0, 0, }, /* 204 */
+ { 49, 7, 12, 0, 0, }, /* 205 */
+ { 49, 12, 3, 0, 0, }, /* 206 */
+ { 55, 7, 12, 0, 0, }, /* 207 */
+ { 55, 12, 3, 0, 0, }, /* 208 */
+ { 63, 13, 12, 0, 0, }, /* 209 */
+ { 63, 7, 12, 0, 0, }, /* 210 */
+ { 63, 12, 3, 0, 0, }, /* 211 */
+ { 63, 6, 12, 0, 0, }, /* 212 */
+ { 63, 26, 12, 0, 0, }, /* 213 */
+ { 63, 21, 12, 0, 0, }, /* 214 */
+ { 89, 7, 12, 0, 0, }, /* 215 */
+ { 89, 12, 3, 0, 0, }, /* 216 */
+ { 89, 6, 12, 0, 0, }, /* 217 */
+ { 89, 21, 12, 0, 0, }, /* 218 */
+ { 94, 7, 12, 0, 0, }, /* 219 */
+ { 94, 12, 3, 0, 0, }, /* 220 */
+ { 94, 21, 12, 0, 0, }, /* 221 */
+ { 14, 12, 3, 0, 0, }, /* 222 */
+ { 14, 10, 5, 0, 0, }, /* 223 */
+ { 14, 7, 12, 0, 0, }, /* 224 */
+ { 14, 13, 12, 0, 0, }, /* 225 */
+ { 14, 21, 12, 0, 0, }, /* 226 */
+ { 14, 6, 12, 0, 0, }, /* 227 */
+ { 2, 7, 12, 0, 0, }, /* 228 */
+ { 2, 12, 3, 0, 0, }, /* 229 */
+ { 2, 10, 5, 0, 0, }, /* 230 */
+ { 2, 10, 3, 0, 0, }, /* 231 */
+ { 2, 13, 12, 0, 0, }, /* 232 */
+ { 2, 23, 12, 0, 0, }, /* 233 */
+ { 2, 15, 12, 0, 0, }, /* 234 */
+ { 2, 26, 12, 0, 0, }, /* 235 */
+ { 21, 12, 3, 0, 0, }, /* 236 */
+ { 21, 10, 5, 0, 0, }, /* 237 */
+ { 21, 7, 12, 0, 0, }, /* 238 */
+ { 21, 13, 12, 0, 0, }, /* 239 */
+ { 20, 12, 3, 0, 0, }, /* 240 */
+ { 20, 10, 5, 0, 0, }, /* 241 */
+ { 20, 7, 12, 0, 0, }, /* 242 */
+ { 20, 13, 12, 0, 0, }, /* 243 */
+ { 20, 21, 12, 0, 0, }, /* 244 */
+ { 20, 23, 12, 0, 0, }, /* 245 */
+ { 43, 12, 3, 0, 0, }, /* 246 */
+ { 43, 10, 5, 0, 0, }, /* 247 */
+ { 43, 7, 12, 0, 0, }, /* 248 */
+ { 43, 10, 3, 0, 0, }, /* 249 */
+ { 43, 13, 12, 0, 0, }, /* 250 */
+ { 43, 26, 12, 0, 0, }, /* 251 */
+ { 43, 15, 12, 0, 0, }, /* 252 */
+ { 53, 12, 3, 0, 0, }, /* 253 */
+ { 53, 7, 12, 0, 0, }, /* 254 */
+ { 53, 10, 3, 0, 0, }, /* 255 */
+ { 53, 10, 5, 0, 0, }, /* 256 */
+ { 53, 13, 12, 0, 0, }, /* 257 */
+ { 53, 15, 12, 0, 0, }, /* 258 */
+ { 53, 26, 12, 0, 0, }, /* 259 */
+ { 53, 23, 12, 0, 0, }, /* 260 */
+ { 54, 12, 3, 0, 0, }, /* 261 */
+ { 54, 10, 5, 0, 0, }, /* 262 */
+ { 54, 7, 12, 0, 0, }, /* 263 */
+ { 54, 13, 12, 0, 0, }, /* 264 */
+ { 54, 15, 12, 0, 0, }, /* 265 */
+ { 54, 26, 12, 0, 0, }, /* 266 */
+ { 28, 12, 3, 0, 0, }, /* 267 */
+ { 28, 10, 5, 0, 0, }, /* 268 */
+ { 28, 7, 12, 0, 0, }, /* 269 */
+ { 28, 10, 3, 0, 0, }, /* 270 */
+ { 28, 13, 12, 0, 0, }, /* 271 */
+ { 36, 12, 3, 0, 0, }, /* 272 */
+ { 36, 10, 5, 0, 0, }, /* 273 */
+ { 36, 7, 12, 0, 0, }, /* 274 */
+ { 36, 10, 3, 0, 0, }, /* 275 */
+ { 36, 13, 12, 0, 0, }, /* 276 */
+ { 36, 15, 12, 0, 0, }, /* 277 */
+ { 36, 26, 12, 0, 0, }, /* 278 */
+ { 47, 10, 5, 0, 0, }, /* 279 */
+ { 47, 7, 12, 0, 0, }, /* 280 */
+ { 47, 12, 3, 0, 0, }, /* 281 */
+ { 47, 10, 3, 0, 0, }, /* 282 */
+ { 47, 13, 12, 0, 0, }, /* 283 */
+ { 47, 21, 12, 0, 0, }, /* 284 */
+ { 56, 7, 12, 0, 0, }, /* 285 */
+ { 56, 12, 3, 0, 0, }, /* 286 */
+ { 56, 7, 5, 0, 0, }, /* 287 */
+ { 56, 6, 12, 0, 0, }, /* 288 */
+ { 56, 21, 12, 0, 0, }, /* 289 */
+ { 56, 13, 12, 0, 0, }, /* 290 */
+ { 32, 7, 12, 0, 0, }, /* 291 */
+ { 32, 12, 3, 0, 0, }, /* 292 */
+ { 32, 7, 5, 0, 0, }, /* 293 */
+ { 32, 6, 12, 0, 0, }, /* 294 */
+ { 32, 13, 12, 0, 0, }, /* 295 */
+ { 57, 7, 12, 0, 0, }, /* 296 */
+ { 57, 26, 12, 0, 0, }, /* 297 */
+ { 57, 21, 12, 0, 0, }, /* 298 */
+ { 57, 12, 3, 0, 0, }, /* 299 */
+ { 57, 13, 12, 0, 0, }, /* 300 */
+ { 57, 15, 12, 0, 0, }, /* 301 */
+ { 57, 22, 12, 0, 0, }, /* 302 */
+ { 57, 18, 12, 0, 0, }, /* 303 */
+ { 57, 10, 5, 0, 0, }, /* 304 */
+ { 38, 7, 12, 0, 0, }, /* 305 */
+ { 38, 10, 12, 0, 0, }, /* 306 */
+ { 38, 12, 3, 0, 0, }, /* 307 */
+ { 38, 10, 5, 0, 0, }, /* 308 */
+ { 38, 13, 12, 0, 0, }, /* 309 */
+ { 38, 21, 12, 0, 0, }, /* 310 */
+ { 38, 26, 12, 0, 0, }, /* 311 */
+ { 16, 9, 12, 0, 7264, }, /* 312 */
+ { 16, 7, 12, 0, 0, }, /* 313 */
+ { 16, 6, 12, 0, 0, }, /* 314 */
+ { 23, 7, 6, 0, 0, }, /* 315 */
+ { 23, 7, 7, 0, 0, }, /* 316 */
+ { 23, 7, 8, 0, 0, }, /* 317 */
+ { 15, 7, 12, 0, 0, }, /* 318 */
+ { 15, 12, 3, 0, 0, }, /* 319 */
+ { 15, 21, 12, 0, 0, }, /* 320 */
+ { 15, 15, 12, 0, 0, }, /* 321 */
+ { 15, 26, 12, 0, 0, }, /* 322 */
+ { 8, 9, 12, 0, 38864, }, /* 323 */
+ { 8, 9, 12, 0, 8, }, /* 324 */
+ { 8, 5, 12, 0, -8, }, /* 325 */
+ { 7, 17, 12, 0, 0, }, /* 326 */
+ { 7, 7, 12, 0, 0, }, /* 327 */
+ { 7, 21, 12, 0, 0, }, /* 328 */
+ { 40, 29, 12, 0, 0, }, /* 329 */
+ { 40, 7, 12, 0, 0, }, /* 330 */
+ { 40, 22, 12, 0, 0, }, /* 331 */
+ { 40, 18, 12, 0, 0, }, /* 332 */
+ { 45, 7, 12, 0, 0, }, /* 333 */
+ { 45, 14, 12, 0, 0, }, /* 334 */
+ { 50, 7, 12, 0, 0, }, /* 335 */
+ { 50, 12, 3, 0, 0, }, /* 336 */
+ { 24, 7, 12, 0, 0, }, /* 337 */
+ { 24, 12, 3, 0, 0, }, /* 338 */
+ { 6, 7, 12, 0, 0, }, /* 339 */
+ { 6, 12, 3, 0, 0, }, /* 340 */
+ { 51, 7, 12, 0, 0, }, /* 341 */
+ { 51, 12, 3, 0, 0, }, /* 342 */
+ { 31, 7, 12, 0, 0, }, /* 343 */
+ { 31, 12, 3, 0, 0, }, /* 344 */
+ { 31, 10, 5, 0, 0, }, /* 345 */
+ { 31, 21, 12, 0, 0, }, /* 346 */
+ { 31, 6, 12, 0, 0, }, /* 347 */
+ { 31, 23, 12, 0, 0, }, /* 348 */
+ { 31, 13, 12, 0, 0, }, /* 349 */
+ { 31, 15, 12, 0, 0, }, /* 350 */
+ { 37, 21, 12, 0, 0, }, /* 351 */
+ { 37, 17, 12, 0, 0, }, /* 352 */
+ { 37, 12, 3, 0, 0, }, /* 353 */
+ { 37, 1, 2, 0, 0, }, /* 354 */
+ { 37, 13, 12, 0, 0, }, /* 355 */
+ { 37, 7, 12, 0, 0, }, /* 356 */
+ { 37, 6, 12, 0, 0, }, /* 357 */
+ { 34, 7, 12, 0, 0, }, /* 358 */
+ { 34, 12, 3, 0, 0, }, /* 359 */
+ { 34, 10, 5, 0, 0, }, /* 360 */
+ { 34, 26, 12, 0, 0, }, /* 361 */
+ { 34, 21, 12, 0, 0, }, /* 362 */
+ { 34, 13, 12, 0, 0, }, /* 363 */
+ { 52, 7, 12, 0, 0, }, /* 364 */
+ { 39, 7, 12, 0, 0, }, /* 365 */
+ { 39, 13, 12, 0, 0, }, /* 366 */
+ { 39, 15, 12, 0, 0, }, /* 367 */
+ { 39, 26, 12, 0, 0, }, /* 368 */
+ { 31, 26, 12, 0, 0, }, /* 369 */
+ { 5, 7, 12, 0, 0, }, /* 370 */
+ { 5, 12, 3, 0, 0, }, /* 371 */
+ { 5, 10, 5, 0, 0, }, /* 372 */
+ { 5, 21, 12, 0, 0, }, /* 373 */
+ { 90, 7, 12, 0, 0, }, /* 374 */
+ { 90, 10, 5, 0, 0, }, /* 375 */
+ { 90, 12, 3, 0, 0, }, /* 376 */
+ { 90, 10, 12, 0, 0, }, /* 377 */
+ { 90, 13, 12, 0, 0, }, /* 378 */
+ { 90, 21, 12, 0, 0, }, /* 379 */
+ { 90, 6, 12, 0, 0, }, /* 380 */
+ { 27, 11, 3, 0, 0, }, /* 381 */
+ { 61, 12, 3, 0, 0, }, /* 382 */
+ { 61, 10, 5, 0, 0, }, /* 383 */
+ { 61, 7, 12, 0, 0, }, /* 384 */
+ { 61, 13, 12, 0, 0, }, /* 385 */
+ { 61, 21, 12, 0, 0, }, /* 386 */
+ { 61, 26, 12, 0, 0, }, /* 387 */
+ { 75, 12, 3, 0, 0, }, /* 388 */
+ { 75, 10, 5, 0, 0, }, /* 389 */
+ { 75, 7, 12, 0, 0, }, /* 390 */
+ { 75, 13, 12, 0, 0, }, /* 391 */
+ { 92, 7, 12, 0, 0, }, /* 392 */
+ { 92, 12, 3, 0, 0, }, /* 393 */
+ { 92, 10, 5, 0, 0, }, /* 394 */
+ { 92, 21, 12, 0, 0, }, /* 395 */
+ { 69, 7, 12, 0, 0, }, /* 396 */
+ { 69, 10, 5, 0, 0, }, /* 397 */
+ { 69, 12, 3, 0, 0, }, /* 398 */
+ { 69, 21, 12, 0, 0, }, /* 399 */
+ { 69, 13, 12, 0, 0, }, /* 400 */
+ { 72, 13, 12, 0, 0, }, /* 401 */
+ { 72, 7, 12, 0, 0, }, /* 402 */
+ { 72, 6, 12, 0, 0, }, /* 403 */
+ { 72, 21, 12, 0, 0, }, /* 404 */
+ { 75, 21, 12, 0, 0, }, /* 405 */
+ { 9, 10, 5, 0, 0, }, /* 406 */
+ { 9, 7, 12, 0, 0, }, /* 407 */
+ { 12, 5, 12, 0, 0, }, /* 408 */
+ { 12, 6, 12, 0, 0, }, /* 409 */
+ { 33, 5, 12, 0, 35332, }, /* 410 */
+ { 33, 5, 12, 0, 3814, }, /* 411 */
+ { 33, 9, 12, 63, 1, }, /* 412 */
+ { 33, 5, 12, 63, -1, }, /* 413 */
+ { 33, 5, 12, 63, -58, }, /* 414 */
+ { 33, 9, 12, 0, -7615, }, /* 415 */
+ { 19, 5, 12, 0, 8, }, /* 416 */
+ { 19, 9, 12, 0, -8, }, /* 417 */
+ { 19, 5, 12, 0, 74, }, /* 418 */
+ { 19, 5, 12, 0, 86, }, /* 419 */
+ { 19, 5, 12, 0, 100, }, /* 420 */
+ { 19, 5, 12, 0, 128, }, /* 421 */
+ { 19, 5, 12, 0, 112, }, /* 422 */
+ { 19, 5, 12, 0, 126, }, /* 423 */
+ { 19, 8, 12, 0, -8, }, /* 424 */
+ { 19, 5, 12, 0, 9, }, /* 425 */
+ { 19, 9, 12, 0, -74, }, /* 426 */
+ { 19, 8, 12, 0, -9, }, /* 427 */
+ { 19, 5, 12, 21, -7173, }, /* 428 */
+ { 19, 9, 12, 0, -86, }, /* 429 */
+ { 19, 9, 12, 0, -100, }, /* 430 */
+ { 19, 9, 12, 0, -112, }, /* 431 */
+ { 19, 9, 12, 0, -128, }, /* 432 */
+ { 19, 9, 12, 0, -126, }, /* 433 */
+ { 27, 1, 3, 0, 0, }, /* 434 */
+ { 9, 27, 2, 0, 0, }, /* 435 */
+ { 9, 28, 2, 0, 0, }, /* 436 */
+ { 9, 2, 2, 0, 0, }, /* 437 */
+ { 9, 9, 12, 0, 0, }, /* 438 */
+ { 9, 5, 12, 0, 0, }, /* 439 */
+ { 19, 9, 12, 67, -7517, }, /* 440 */
+ { 33, 9, 12, 71, -8383, }, /* 441 */
+ { 33, 9, 12, 75, -8262, }, /* 442 */
+ { 33, 9, 12, 0, 28, }, /* 443 */
+ { 33, 5, 12, 0, -28, }, /* 444 */
+ { 33, 14, 12, 0, 16, }, /* 445 */
+ { 33, 14, 12, 0, -16, }, /* 446 */
+ { 33, 14, 12, 0, 0, }, /* 447 */
+ { 9, 26, 12, 0, 26, }, /* 448 */
+ { 9, 26, 12, 0, -26, }, /* 449 */
+ { 4, 26, 12, 0, 0, }, /* 450 */
+ { 17, 9, 12, 0, 48, }, /* 451 */
+ { 17, 5, 12, 0, -48, }, /* 452 */
+ { 33, 9, 12, 0, -10743, }, /* 453 */
+ { 33, 9, 12, 0, -3814, }, /* 454 */
+ { 33, 9, 12, 0, -10727, }, /* 455 */
+ { 33, 5, 12, 0, -10795, }, /* 456 */
+ { 33, 5, 12, 0, -10792, }, /* 457 */
+ { 33, 9, 12, 0, -10780, }, /* 458 */
+ { 33, 9, 12, 0, -10749, }, /* 459 */
+ { 33, 9, 12, 0, -10783, }, /* 460 */
+ { 33, 9, 12, 0, -10782, }, /* 461 */
+ { 33, 9, 12, 0, -10815, }, /* 462 */
+ { 10, 5, 12, 0, 0, }, /* 463 */
+ { 10, 26, 12, 0, 0, }, /* 464 */
+ { 10, 12, 3, 0, 0, }, /* 465 */
+ { 10, 21, 12, 0, 0, }, /* 466 */
+ { 10, 15, 12, 0, 0, }, /* 467 */
+ { 16, 5, 12, 0, -7264, }, /* 468 */
+ { 58, 7, 12, 0, 0, }, /* 469 */
+ { 58, 6, 12, 0, 0, }, /* 470 */
+ { 58, 21, 12, 0, 0, }, /* 471 */
+ { 58, 12, 3, 0, 0, }, /* 472 */
+ { 22, 26, 12, 0, 0, }, /* 473 */
+ { 22, 6, 12, 0, 0, }, /* 474 */
+ { 22, 14, 12, 0, 0, }, /* 475 */
+ { 23, 10, 3, 0, 0, }, /* 476 */
+ { 26, 7, 12, 0, 0, }, /* 477 */
+ { 26, 6, 12, 0, 0, }, /* 478 */
+ { 29, 7, 12, 0, 0, }, /* 479 */
+ { 29, 6, 12, 0, 0, }, /* 480 */
+ { 3, 7, 12, 0, 0, }, /* 481 */
+ { 23, 7, 12, 0, 0, }, /* 482 */
+ { 23, 26, 12, 0, 0, }, /* 483 */
+ { 29, 26, 12, 0, 0, }, /* 484 */
+ { 22, 7, 12, 0, 0, }, /* 485 */
+ { 60, 7, 12, 0, 0, }, /* 486 */
+ { 60, 6, 12, 0, 0, }, /* 487 */
+ { 60, 26, 12, 0, 0, }, /* 488 */
+ { 85, 7, 12, 0, 0, }, /* 489 */
+ { 85, 6, 12, 0, 0, }, /* 490 */
+ { 85, 21, 12, 0, 0, }, /* 491 */
+ { 76, 7, 12, 0, 0, }, /* 492 */
+ { 76, 6, 12, 0, 0, }, /* 493 */
+ { 76, 21, 12, 0, 0, }, /* 494 */
+ { 76, 13, 12, 0, 0, }, /* 495 */
+ { 12, 7, 12, 0, 0, }, /* 496 */
+ { 12, 21, 12, 0, 0, }, /* 497 */
+ { 78, 7, 12, 0, 0, }, /* 498 */
+ { 78, 14, 12, 0, 0, }, /* 499 */
+ { 78, 12, 3, 0, 0, }, /* 500 */
+ { 78, 21, 12, 0, 0, }, /* 501 */
+ { 33, 9, 12, 0, -35332, }, /* 502 */
+ { 33, 9, 12, 0, -42280, }, /* 503 */
+ { 33, 9, 12, 0, -42308, }, /* 504 */
+ { 33, 9, 12, 0, -42319, }, /* 505 */
+ { 33, 9, 12, 0, -42315, }, /* 506 */
+ { 33, 9, 12, 0, -42305, }, /* 507 */
+ { 33, 9, 12, 0, -42258, }, /* 508 */
+ { 33, 9, 12, 0, -42282, }, /* 509 */
+ { 33, 9, 12, 0, -42261, }, /* 510 */
+ { 33, 9, 12, 0, 928, }, /* 511 */
+ { 48, 7, 12, 0, 0, }, /* 512 */
+ { 48, 12, 3, 0, 0, }, /* 513 */
+ { 48, 10, 5, 0, 0, }, /* 514 */
+ { 48, 26, 12, 0, 0, }, /* 515 */
+ { 64, 7, 12, 0, 0, }, /* 516 */
+ { 64, 21, 12, 0, 0, }, /* 517 */
+ { 74, 10, 5, 0, 0, }, /* 518 */
+ { 74, 7, 12, 0, 0, }, /* 519 */
+ { 74, 12, 3, 0, 0, }, /* 520 */
+ { 74, 21, 12, 0, 0, }, /* 521 */
+ { 74, 13, 12, 0, 0, }, /* 522 */
+ { 68, 13, 12, 0, 0, }, /* 523 */
+ { 68, 7, 12, 0, 0, }, /* 524 */
+ { 68, 12, 3, 0, 0, }, /* 525 */
+ { 68, 21, 12, 0, 0, }, /* 526 */
+ { 73, 7, 12, 0, 0, }, /* 527 */
+ { 73, 12, 3, 0, 0, }, /* 528 */
+ { 73, 10, 5, 0, 0, }, /* 529 */
+ { 73, 21, 12, 0, 0, }, /* 530 */
+ { 83, 12, 3, 0, 0, }, /* 531 */
+ { 83, 10, 5, 0, 0, }, /* 532 */
+ { 83, 7, 12, 0, 0, }, /* 533 */
+ { 83, 21, 12, 0, 0, }, /* 534 */
+ { 83, 13, 12, 0, 0, }, /* 535 */
+ { 38, 6, 12, 0, 0, }, /* 536 */
+ { 67, 7, 12, 0, 0, }, /* 537 */
+ { 67, 12, 3, 0, 0, }, /* 538 */
+ { 67, 10, 5, 0, 0, }, /* 539 */
+ { 67, 13, 12, 0, 0, }, /* 540 */
+ { 67, 21, 12, 0, 0, }, /* 541 */
+ { 91, 7, 12, 0, 0, }, /* 542 */
+ { 91, 12, 3, 0, 0, }, /* 543 */
+ { 91, 6, 12, 0, 0, }, /* 544 */
+ { 91, 21, 12, 0, 0, }, /* 545 */
+ { 86, 7, 12, 0, 0, }, /* 546 */
+ { 86, 10, 5, 0, 0, }, /* 547 */
+ { 86, 12, 3, 0, 0, }, /* 548 */
+ { 86, 21, 12, 0, 0, }, /* 549 */
+ { 86, 6, 12, 0, 0, }, /* 550 */
+ { 33, 5, 12, 0, -928, }, /* 551 */
+ { 8, 5, 12, 0, -38864, }, /* 552 */
+ { 86, 13, 12, 0, 0, }, /* 553 */
+ { 23, 7, 9, 0, 0, }, /* 554 */
+ { 23, 7, 10, 0, 0, }, /* 555 */
+ { 9, 4, 2, 0, 0, }, /* 556 */
+ { 9, 3, 12, 0, 0, }, /* 557 */
+ { 25, 25, 12, 0, 0, }, /* 558 */
+ { 0, 24, 12, 0, 0, }, /* 559 */
+ { 9, 6, 3, 0, 0, }, /* 560 */
+ { 35, 7, 12, 0, 0, }, /* 561 */
+ { 19, 14, 12, 0, 0, }, /* 562 */
+ { 19, 15, 12, 0, 0, }, /* 563 */
+ { 19, 26, 12, 0, 0, }, /* 564 */
+ { 70, 7, 12, 0, 0, }, /* 565 */
+ { 66, 7, 12, 0, 0, }, /* 566 */
+ { 41, 7, 12, 0, 0, }, /* 567 */
+ { 41, 15, 12, 0, 0, }, /* 568 */
+ { 18, 7, 12, 0, 0, }, /* 569 */
+ { 18, 14, 12, 0, 0, }, /* 570 */
+ { 117, 7, 12, 0, 0, }, /* 571 */
+ { 117, 12, 3, 0, 0, }, /* 572 */
+ { 59, 7, 12, 0, 0, }, /* 573 */
+ { 59, 21, 12, 0, 0, }, /* 574 */
+ { 42, 7, 12, 0, 0, }, /* 575 */
+ { 42, 21, 12, 0, 0, }, /* 576 */
+ { 42, 14, 12, 0, 0, }, /* 577 */
+ { 13, 9, 12, 0, 40, }, /* 578 */
+ { 13, 5, 12, 0, -40, }, /* 579 */
+ { 46, 7, 12, 0, 0, }, /* 580 */
+ { 44, 7, 12, 0, 0, }, /* 581 */
+ { 44, 13, 12, 0, 0, }, /* 582 */
+ { 105, 7, 12, 0, 0, }, /* 583 */
+ { 103, 7, 12, 0, 0, }, /* 584 */
+ { 103, 21, 12, 0, 0, }, /* 585 */
+ { 109, 7, 12, 0, 0, }, /* 586 */
+ { 11, 7, 12, 0, 0, }, /* 587 */
+ { 80, 7, 12, 0, 0, }, /* 588 */
+ { 80, 21, 12, 0, 0, }, /* 589 */
+ { 80, 15, 12, 0, 0, }, /* 590 */
+ { 119, 7, 12, 0, 0, }, /* 591 */
+ { 119, 26, 12, 0, 0, }, /* 592 */
+ { 119, 15, 12, 0, 0, }, /* 593 */
+ { 115, 7, 12, 0, 0, }, /* 594 */
+ { 115, 15, 12, 0, 0, }, /* 595 */
+ { 127, 7, 12, 0, 0, }, /* 596 */
+ { 127, 15, 12, 0, 0, }, /* 597 */
+ { 65, 7, 12, 0, 0, }, /* 598 */
+ { 65, 15, 12, 0, 0, }, /* 599 */
+ { 65, 21, 12, 0, 0, }, /* 600 */
+ { 71, 7, 12, 0, 0, }, /* 601 */
+ { 71, 21, 12, 0, 0, }, /* 602 */
+ { 97, 7, 12, 0, 0, }, /* 603 */
+ { 96, 7, 12, 0, 0, }, /* 604 */
+ { 96, 15, 12, 0, 0, }, /* 605 */
+ { 30, 7, 12, 0, 0, }, /* 606 */
+ { 30, 12, 3, 0, 0, }, /* 607 */
+ { 30, 15, 12, 0, 0, }, /* 608 */
+ { 30, 21, 12, 0, 0, }, /* 609 */
+ { 87, 7, 12, 0, 0, }, /* 610 */
+ { 87, 15, 12, 0, 0, }, /* 611 */
+ { 87, 21, 12, 0, 0, }, /* 612 */
+ { 116, 7, 12, 0, 0, }, /* 613 */
+ { 116, 15, 12, 0, 0, }, /* 614 */
+ { 111, 7, 12, 0, 0, }, /* 615 */
+ { 111, 26, 12, 0, 0, }, /* 616 */
+ { 111, 12, 3, 0, 0, }, /* 617 */
+ { 111, 15, 12, 0, 0, }, /* 618 */
+ { 111, 21, 12, 0, 0, }, /* 619 */
+ { 77, 7, 12, 0, 0, }, /* 620 */
+ { 77, 21, 12, 0, 0, }, /* 621 */
+ { 82, 7, 12, 0, 0, }, /* 622 */
+ { 82, 15, 12, 0, 0, }, /* 623 */
+ { 81, 7, 12, 0, 0, }, /* 624 */
+ { 81, 15, 12, 0, 0, }, /* 625 */
+ { 120, 7, 12, 0, 0, }, /* 626 */
+ { 120, 21, 12, 0, 0, }, /* 627 */
+ { 120, 15, 12, 0, 0, }, /* 628 */
+ { 88, 7, 12, 0, 0, }, /* 629 */
+ { 129, 9, 12, 0, 64, }, /* 630 */
+ { 129, 5, 12, 0, -64, }, /* 631 */
+ { 129, 15, 12, 0, 0, }, /* 632 */
+ { 0, 15, 12, 0, 0, }, /* 633 */
+ { 93, 10, 5, 0, 0, }, /* 634 */
+ { 93, 12, 3, 0, 0, }, /* 635 */
+ { 93, 7, 12, 0, 0, }, /* 636 */
+ { 93, 21, 12, 0, 0, }, /* 637 */
+ { 93, 15, 12, 0, 0, }, /* 638 */
+ { 93, 13, 12, 0, 0, }, /* 639 */
+ { 84, 12, 3, 0, 0, }, /* 640 */
+ { 84, 10, 5, 0, 0, }, /* 641 */
+ { 84, 7, 12, 0, 0, }, /* 642 */
+ { 84, 21, 12, 0, 0, }, /* 643 */
+ { 84, 1, 2, 0, 0, }, /* 644 */
+ { 100, 7, 12, 0, 0, }, /* 645 */
+ { 100, 13, 12, 0, 0, }, /* 646 */
+ { 95, 12, 3, 0, 0, }, /* 647 */
+ { 95, 7, 12, 0, 0, }, /* 648 */
+ { 95, 10, 5, 0, 0, }, /* 649 */
+ { 95, 13, 12, 0, 0, }, /* 650 */
+ { 95, 21, 12, 0, 0, }, /* 651 */
+ { 110, 7, 12, 0, 0, }, /* 652 */
+ { 110, 12, 3, 0, 0, }, /* 653 */
+ { 110, 21, 12, 0, 0, }, /* 654 */
+ { 99, 12, 3, 0, 0, }, /* 655 */
+ { 99, 10, 5, 0, 0, }, /* 656 */
+ { 99, 7, 12, 0, 0, }, /* 657 */
+ { 99, 21, 12, 0, 0, }, /* 658 */
+ { 99, 13, 12, 0, 0, }, /* 659 */
+ { 47, 15, 12, 0, 0, }, /* 660 */
+ { 107, 7, 12, 0, 0, }, /* 661 */
+ { 107, 10, 5, 0, 0, }, /* 662 */
+ { 107, 12, 3, 0, 0, }, /* 663 */
+ { 107, 21, 12, 0, 0, }, /* 664 */
+ { 128, 7, 12, 0, 0, }, /* 665 */
+ { 128, 21, 12, 0, 0, }, /* 666 */
+ { 108, 7, 12, 0, 0, }, /* 667 */
+ { 108, 12, 3, 0, 0, }, /* 668 */
+ { 108, 10, 5, 0, 0, }, /* 669 */
+ { 108, 13, 12, 0, 0, }, /* 670 */
+ { 106, 12, 3, 0, 0, }, /* 671 */
+ { 106, 10, 5, 0, 0, }, /* 672 */
+ { 106, 7, 12, 0, 0, }, /* 673 */
+ { 106, 10, 3, 0, 0, }, /* 674 */
+ { 123, 7, 12, 0, 0, }, /* 675 */
+ { 123, 10, 3, 0, 0, }, /* 676 */
+ { 123, 10, 5, 0, 0, }, /* 677 */
+ { 123, 12, 3, 0, 0, }, /* 678 */
+ { 123, 21, 12, 0, 0, }, /* 679 */
+ { 123, 13, 12, 0, 0, }, /* 680 */
+ { 122, 7, 12, 0, 0, }, /* 681 */
+ { 122, 10, 3, 0, 0, }, /* 682 */
+ { 122, 10, 5, 0, 0, }, /* 683 */
+ { 122, 12, 3, 0, 0, }, /* 684 */
+ { 122, 21, 12, 0, 0, }, /* 685 */
+ { 113, 7, 12, 0, 0, }, /* 686 */
+ { 113, 10, 5, 0, 0, }, /* 687 */
+ { 113, 12, 3, 0, 0, }, /* 688 */
+ { 113, 21, 12, 0, 0, }, /* 689 */
+ { 113, 13, 12, 0, 0, }, /* 690 */
+ { 101, 7, 12, 0, 0, }, /* 691 */
+ { 101, 12, 3, 0, 0, }, /* 692 */
+ { 101, 10, 5, 0, 0, }, /* 693 */
+ { 101, 13, 12, 0, 0, }, /* 694 */
+ { 125, 7, 12, 0, 0, }, /* 695 */
+ { 125, 12, 3, 0, 0, }, /* 696 */
+ { 125, 10, 5, 0, 0, }, /* 697 */
+ { 125, 13, 12, 0, 0, }, /* 698 */
+ { 125, 15, 12, 0, 0, }, /* 699 */
+ { 125, 21, 12, 0, 0, }, /* 700 */
+ { 125, 26, 12, 0, 0, }, /* 701 */
+ { 124, 9, 12, 0, 32, }, /* 702 */
+ { 124, 5, 12, 0, -32, }, /* 703 */
+ { 124, 13, 12, 0, 0, }, /* 704 */
+ { 124, 15, 12, 0, 0, }, /* 705 */
+ { 124, 7, 12, 0, 0, }, /* 706 */
+ { 121, 7, 12, 0, 0, }, /* 707 */
+ { 62, 7, 12, 0, 0, }, /* 708 */
+ { 62, 14, 12, 0, 0, }, /* 709 */
+ { 62, 21, 12, 0, 0, }, /* 710 */
+ { 79, 7, 12, 0, 0, }, /* 711 */
+ { 126, 7, 12, 0, 0, }, /* 712 */
+ { 114, 7, 12, 0, 0, }, /* 713 */
+ { 114, 13, 12, 0, 0, }, /* 714 */
+ { 114, 21, 12, 0, 0, }, /* 715 */
+ { 102, 7, 12, 0, 0, }, /* 716 */
+ { 102, 12, 3, 0, 0, }, /* 717 */
+ { 102, 21, 12, 0, 0, }, /* 718 */
+ { 118, 7, 12, 0, 0, }, /* 719 */
+ { 118, 12, 3, 0, 0, }, /* 720 */
+ { 118, 21, 12, 0, 0, }, /* 721 */
+ { 118, 26, 12, 0, 0, }, /* 722 */
+ { 118, 6, 12, 0, 0, }, /* 723 */
+ { 118, 13, 12, 0, 0, }, /* 724 */
+ { 118, 15, 12, 0, 0, }, /* 725 */
+ { 98, 7, 12, 0, 0, }, /* 726 */
+ { 98, 10, 5, 0, 0, }, /* 727 */
+ { 98, 12, 3, 0, 0, }, /* 728 */
+ { 98, 6, 12, 0, 0, }, /* 729 */
+ { 104, 7, 12, 0, 0, }, /* 730 */
+ { 104, 26, 12, 0, 0, }, /* 731 */
+ { 104, 12, 3, 0, 0, }, /* 732 */
+ { 104, 21, 12, 0, 0, }, /* 733 */
+ { 9, 10, 3, 0, 0, }, /* 734 */
+ { 19, 12, 3, 0, 0, }, /* 735 */
+ { 130, 26, 12, 0, 0, }, /* 736 */
+ { 130, 12, 3, 0, 0, }, /* 737 */
+ { 130, 21, 12, 0, 0, }, /* 738 */
+ { 112, 7, 12, 0, 0, }, /* 739 */
+ { 112, 15, 12, 0, 0, }, /* 740 */
+ { 112, 12, 3, 0, 0, }, /* 741 */
+ { 9, 26, 11, 0, 0, }, /* 742 */
+ { 26, 26, 12, 0, 0, }, /* 743 */
+};
+
+const uint8_t PRIV(ucd_stage1)[] = { /* 8704 bytes */
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* U+0000 */
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* U+0800 */
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 41, 41, 42, 43, 44, 45, /* U+1000 */
+ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, /* U+1800 */
+ 62, 63, 64, 65, 66, 66, 67, 68, 69, 70, 71, 72, 73, 71, 74, 75, /* U+2000 */
+ 76, 76, 66, 77, 66, 66, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, /* U+2800 */
+ 88, 89, 90, 91, 92, 93, 94, 71, 95, 95, 95, 95, 95, 95, 95, 95, /* U+3000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+3800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+4000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 96, 95, 95, 95, 95, /* U+4800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+5000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+5800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+6000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+6800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+7000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+7800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+8000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+8800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+9000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 97, /* U+9800 */
+ 98, 99, 99, 99, 99, 99, 99, 99, 99,100,101,101,102,103,104,105, /* U+A000 */
+106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,114, /* U+A800 */
+115,116,117,118,119,120,114,115,116,117,118,119,120,114,115,116, /* U+B000 */
+117,118,119,120,114,115,116,117,118,119,120,114,115,116,117,118, /* U+B800 */
+119,120,114,115,116,117,118,119,120,114,115,116,117,118,119,120, /* U+C000 */
+114,115,116,117,118,119,120,114,115,116,117,118,119,120,114,115, /* U+C800 */
+116,117,118,119,120,114,115,116,117,118,119,120,114,115,116,121, /* U+D000 */
+122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122, /* U+D800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+E000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+E800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F000 */
+123,123, 95, 95,124,125,126,127,128,128,129,130,131,132,133,134, /* U+F800 */
+135,136,137,138,139,140,141,142,143,144,145,139,146,146,147,139, /* U+10000 */
+148,149,150,151,152,153,154,155,156,157,139,139,158,139,139,139, /* U+10800 */
+159,160,161,162,163,164,165,139,139,166,139,167,168,169,170,139, /* U+11000 */
+139,171,139,139,139,172,139,139,139,139,139,139,139,139,139,139, /* U+11800 */
+173,173,173,173,173,173,173,174,175,173,176,139,139,139,139,139, /* U+12000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+12800 */
+177,177,177,177,177,177,177,177,178,139,139,139,139,139,139,139, /* U+13000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+13800 */
+139,139,139,139,139,139,139,139,179,179,179,179,180,139,139,139, /* U+14000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+14800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+15000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+15800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+16000 */
+181,181,181,181,182,183,184,185,139,139,139,139,139,139,186,187, /* U+16800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+17000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+17800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+18000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+18800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+19000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+19800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1A000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1A800 */
+188,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1B000 */
+139,139,139,139,139,139,139,139,189,190,139,139,139,139,139,139, /* U+1B800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1C000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1C800 */
+ 71,191,192,193,194,139,195,139,196,197,198,199,200,201,202,203, /* U+1D000 */
+204,204,204,204,205,206,139,139,139,139,139,139,139,139,139,139, /* U+1D800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1E000 */
+207,208,139,139,139,139,139,139,139,139,139,139,209,210,139,139, /* U+1E800 */
+211,212,213,214,215,139, 71,216, 71, 71,217,218, 71,219,220,221, /* U+1F000 */
+222,223,224,225,139,139,139,139,139,139,139,139,139,139,139,139, /* U+1F800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+20000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+20800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+21000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+21800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+22000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+22800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+23000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+23800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+24000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+24800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+25000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+25800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+26000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+26800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+27000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+27800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+28000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+28800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+29000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+29800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,226, 95, 95, /* U+2A000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+2A800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,227, 95, /* U+2B000 */
+228, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+2B800 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, /* U+2C000 */
+ 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,229,139,139, /* U+2C800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+2D000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+2D800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+2E000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+2E800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+2F000 */
+ 95, 95, 95, 95,230,139,139,139,139,139,139,139,139,139,139,139, /* U+2F800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+30000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+30800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+31000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+31800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+32000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+32800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+33000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+33800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+34000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+34800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+35000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+35800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+36000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+36800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+37000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+37800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+38000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+38800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+39000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+39800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+3A000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+3A800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+3B000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+3B800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+3C000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+3C800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+3D000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+3D800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+3E000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+3E800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+3F000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+3F800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+40000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+40800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+41000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+41800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+42000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+42800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+43000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+43800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+44000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+44800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+45000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+45800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+46000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+46800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+47000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+47800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+48000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+48800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+49000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+49800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+4A000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+4A800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+4B000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+4B800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+4C000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+4C800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+4D000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+4D800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+4E000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+4E800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+4F000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+4F800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+50000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+50800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+51000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+51800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+52000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+52800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+53000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+53800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+54000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+54800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+55000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+55800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+56000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+56800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+57000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+57800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+58000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+58800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+59000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+59800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+5A000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+5A800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+5B000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+5B800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+5C000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+5C800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+5D000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+5D800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+5E000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+5E800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+5F000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+5F800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+60000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+60800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+61000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+61800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+62000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+62800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+63000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+63800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+64000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+64800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+65000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+65800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+66000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+66800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+67000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+67800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+68000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+68800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+69000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+69800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+6A000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+6A800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+6B000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+6B800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+6C000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+6C800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+6D000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+6D800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+6E000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+6E800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+6F000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+6F800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+70000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+70800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+71000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+71800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+72000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+72800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+73000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+73800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+74000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+74800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+75000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+75800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+76000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+76800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+77000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+77800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+78000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+78800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+79000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+79800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+7A000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+7A800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+7B000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+7B800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+7C000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+7C800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+7D000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+7D800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+7E000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+7E800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+7F000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+7F800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+80000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+80800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+81000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+81800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+82000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+82800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+83000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+83800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+84000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+84800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+85000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+85800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+86000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+86800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+87000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+87800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+88000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+88800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+89000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+89800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+8A000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+8A800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+8B000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+8B800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+8C000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+8C800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+8D000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+8D800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+8E000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+8E800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+8F000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+8F800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+90000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+90800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+91000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+91800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+92000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+92800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+93000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+93800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+94000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+94800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+95000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+95800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+96000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+96800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+97000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+97800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+98000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+98800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+99000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+99800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+9A000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+9A800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+9B000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+9B800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+9C000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+9C800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+9D000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+9D800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+9E000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+9E800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+9F000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+9F800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A0000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A0800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A1000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A1800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A2000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A2800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A3000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A3800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A4000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A4800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A5000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A5800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A6000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A6800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A7000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A7800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A8000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A8800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A9000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+A9800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+AA000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+AA800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+AB000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+AB800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+AC000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+AC800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+AD000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+AD800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+AE000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+AE800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+AF000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+AF800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B0000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B0800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B1000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B1800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B2000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B2800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B3000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B3800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B4000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B4800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B5000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B5800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B6000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B6800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B7000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B7800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B8000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B8800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B9000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+B9800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+BA000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+BA800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+BB000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+BB800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+BC000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+BC800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+BD000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+BD800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+BE000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+BE800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+BF000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+BF800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C0000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C0800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C1000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C1800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C2000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C2800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C3000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C3800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C4000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C4800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C5000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C5800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C6000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C6800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C7000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C7800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C8000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C8800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C9000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+C9800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+CA000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+CA800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+CB000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+CB800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+CC000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+CC800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+CD000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+CD800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+CE000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+CE800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+CF000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+CF800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D0000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D0800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D1000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D1800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D2000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D2800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D3000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D3800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D4000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D4800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D5000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D5800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D6000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D6800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D7000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D7800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D8000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D8800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D9000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+D9800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+DA000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+DA800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+DB000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+DB800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+DC000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+DC800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+DD000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+DD800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+DE000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+DE800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+DF000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+DF800 */
+231,232,233,234,232,232,232,232,232,232,232,232,232,232,232,232, /* U+E0000 */
+232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232, /* U+E0800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E1000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E1800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E2000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E2800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E3000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E3800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E4000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E4800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E5000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E5800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E6000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E6800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E7000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E7800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E8000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E8800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E9000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+E9800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+EA000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+EA800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+EB000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+EB800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+EC000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+EC800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+ED000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+ED800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+EE000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+EE800 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+EF000 */
+139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, /* U+EF800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F0000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F0800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F1000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F1800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F2000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F2800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F3000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F3800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F4000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F4800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F5000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F5800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F6000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F6800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F7000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F7800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F8000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F8800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F9000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+F9800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FA000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FA800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FB000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FB800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FC000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FC800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FD000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FD800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FE000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FE800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+FF000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,235, /* U+FF800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+100000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+100800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+101000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+101800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+102000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+102800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+103000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+103800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+104000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+104800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+105000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+105800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+106000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+106800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+107000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+107800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+108000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+108800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+109000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+109800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10A000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10A800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10B000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10B800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10C000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10C800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10D000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10D800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10E000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10E800 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, /* U+10F000 */
+123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,235, /* U+10F800 */
+};
+
+const uint16_t PRIV(ucd_stage2)[] = { /* 60416 bytes, block = 128 */
+/* block 0 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3, 4, 4, 4, 5, 4, 4, 4, 6, 7, 4, 8, 4, 9, 4, 4,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 4, 4, 8, 8, 8, 4,
+ 4, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 11, 11, 11, 11,
+ 11, 11, 11, 13, 11, 11, 11, 11, 11, 11, 11, 6, 4, 7, 14, 15,
+ 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 16, 16, 16, 16,
+ 16, 16, 16, 18, 16, 16, 16, 16, 16, 16, 16, 6, 8, 7, 8, 0,
+
+/* block 1 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 3, 4, 5, 5, 5, 5, 19, 4, 14, 19, 20, 21, 8, 22, 19, 14,
+ 19, 8, 23, 23, 14, 24, 4, 4, 14, 23, 20, 25, 23, 23, 23, 4,
+ 11, 11, 11, 11, 11, 26, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 8, 11, 11, 11, 11, 11, 11, 11, 27,
+ 16, 16, 16, 16, 16, 28, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 8, 16, 16, 16, 16, 16, 16, 16, 29,
+
+/* block 2 */
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 32, 33, 30, 31, 30, 31, 30, 31, 33, 30, 31, 30, 31, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 33, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 34, 30, 31, 30, 31, 30, 31, 35,
+
+/* block 3 */
+ 36, 37, 30, 31, 30, 31, 38, 30, 31, 39, 39, 30, 31, 33, 40, 41,
+ 42, 30, 31, 39, 43, 44, 45, 46, 30, 31, 47, 33, 45, 48, 49, 50,
+ 30, 31, 30, 31, 30, 31, 51, 30, 31, 51, 33, 33, 30, 31, 51, 30,
+ 31, 52, 52, 30, 31, 30, 31, 53, 30, 31, 33, 20, 30, 31, 33, 54,
+ 20, 20, 20, 20, 55, 56, 57, 58, 59, 60, 61, 62, 63, 30, 31, 30,
+ 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 64, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 33, 65, 66, 67, 30, 31, 68, 69, 30, 31, 30, 31, 30, 31, 30, 31,
+
+/* block 4 */
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 70, 33, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 33, 33, 33, 33, 33, 33, 71, 30, 31, 72, 73, 74,
+ 74, 30, 31, 75, 76, 77, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 78, 79, 80, 81, 82, 33, 83, 83, 33, 84, 33, 85, 86, 33, 33, 33,
+ 83, 87, 33, 88, 33, 89, 90, 33, 91, 92, 33, 93, 94, 33, 33, 92,
+ 33, 95, 96, 33, 33, 97, 33, 33, 33, 33, 33, 33, 33, 98, 33, 33,
+
+/* block 5 */
+ 99, 33, 33, 99, 33, 33, 33,100, 99,101,102,102,103, 33, 33, 33,
+ 33, 33,104, 33, 20, 33, 33, 33, 33, 33, 33, 33, 33,105,106, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+107,107,107,107,107,107,107,107,107,108,108,108,108,108,108,108,
+108,108, 14, 14, 14, 14,108,108,108,108,108,108,108,108,108,108,
+108,108, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+107,107,107,107,107, 14, 14, 14, 14, 14,109,109,108, 14,108, 14,
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+
+/* block 6 */
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,111,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+112,113,112,113,108,114,112,113,115,115,116,117,117,117, 4,118,
+
+/* block 7 */
+115,115,115,115,114, 14,119, 4,120,120,120,115,121,115,122,122,
+123,124,125,124,124,126,124,124,127,128,129,124,130,124,124,124,
+131,132,115,133,124,124,134,124,124,135,124,124,136,137,137,137,
+123,138,139,138,138,140,138,138,141,142,143,138,144,138,138,138,
+145,146,147,148,138,138,149,138,138,150,138,138,151,152,152,153,
+154,155,156,156,156,157,158,159,112,113,112,113,112,113,112,113,
+112,113,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
+162,163,164,165,166,167,168,112,113,169,112,113,123,170,170,170,
+
+/* block 8 */
+171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,
+172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
+172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,
+173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
+173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,
+174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+
+/* block 9 */
+175,176,177,178,178,110,110,178,179,179,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+180,175,176,175,176,175,176,175,176,175,176,175,176,175,176,181,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+
+/* block 10 */
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+115,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
+182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,
+182,182,182,182,182,182,182,115,115,183,184,184,184,184,184,184,
+115,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
+185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,
+
+/* block 11 */
+185,185,185,185,185,185,185,186,115, 4,187,115,115,188,188,189,
+115,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
+190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,190,
+190,190,190,190,190,190,190,190,190,190,190,190,190,190,191,190,
+192,190,190,192,190,190,192,190,115,115,115,115,115,115,115,115,
+193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,193,
+193,193,193,193,193,193,193,193,193,193,193,115,115,115,115,115,
+193,193,193,192,192,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 12 */
+194,194,194,194,194, 22,195,195,195,196,196,197, 4,196,198,198,
+199,199,199,199,199,199,199,199,199,199,199, 4, 22,115,196, 4,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+108,200,200,200,200,200,200,200,200,200,200,110,110,110,110,110,
+110,110,110,110,110,110,199,199,199,199,199,199,199,199,199,199,
+201,201,201,201,201,201,201,201,201,201,196,196,196,196,200,200,
+110,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+
+/* block 13 */
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,196,200,199,199,199,199,199,199,199, 22,198,199,
+199,199,199,199,199,202,202,199,199,198,199,199,199,199,200,200,
+201,201,201,201,201,201,201,201,201,201,200,200,200,198,198,200,
+
+/* block 14 */
+203,203,203,203,203,203,203,203,203,203,203,203,203,203,115,204,
+205,206,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
+205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,205,
+206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,206,
+206,206,206,206,206,206,206,206,206,206,206,115,115,205,205,205,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+
+/* block 15 */
+207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
+207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,
+207,207,207,207,207,207,208,208,208,208,208,208,208,208,208,208,
+208,207,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+209,209,209,209,209,209,209,209,209,209,210,210,210,210,210,210,
+210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,210,
+210,210,210,210,210,210,210,210,210,210,210,211,211,211,211,211,
+211,211,211,211,212,212,213,214,214,214,212,115,115,115,115,115,
+
+/* block 16 */
+215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,215,
+215,215,215,215,215,215,216,216,216,216,217,216,216,216,216,216,
+216,216,216,216,217,216,216,216,217,216,216,216,216,216,115,115,
+218,218,218,218,218,218,218,218,218,218,218,218,218,218,218,115,
+219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,219,
+219,219,219,219,219,219,219,219,219,220,220,220,115,115,221,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 17 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,199,199,199,199,199,199,199,199,199,199,199,199,199,
+199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,199,
+
+/* block 18 */
+222,222,222,223,224,224,224,224,224,224,224,224,224,224,224,224,
+224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,
+224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,
+224,224,224,224,224,224,224,224,224,224,222,223,222,224,223,223,
+223,222,222,222,222,222,222,222,222,223,223,223,223,222,223,223,
+224,110,110,222,222,222,222,222,224,224,224,224,224,224,224,224,
+224,224,222,222, 4, 4,225,225,225,225,225,225,225,225,225,225,
+226,227,224,224,224,224,224,224,224,224,224,224,224,224,224,224,
+
+/* block 19 */
+228,229,230,230,115,228,228,228,228,228,228,228,228,115,115,228,
+228,115,115,228,228,228,228,228,228,228,228,228,228,228,228,228,
+228,228,228,228,228,228,228,228,228,115,228,228,228,228,228,228,
+228,115,228,115,115,115,228,228,228,228,115,115,229,228,231,230,
+230,229,229,229,229,115,115,230,230,115,115,230,230,229,228,115,
+115,115,115,115,115,115,115,231,115,115,115,115,228,228,115,228,
+228,228,229,229,115,115,232,232,232,232,232,232,232,232,232,232,
+228,228,233,233,234,234,234,234,234,234,235,233,115,115,115,115,
+
+/* block 20 */
+115,236,236,237,115,238,238,238,238,238,238,115,115,115,115,238,
+238,115,115,238,238,238,238,238,238,238,238,238,238,238,238,238,
+238,238,238,238,238,238,238,238,238,115,238,238,238,238,238,238,
+238,115,238,238,115,238,238,115,238,238,115,115,236,115,237,237,
+237,236,236,115,115,115,115,236,236,115,115,236,236,236,115,115,
+115,236,115,115,115,115,115,115,115,238,238,238,238,115,238,115,
+115,115,115,115,115,115,239,239,239,239,239,239,239,239,239,239,
+236,236,238,238,238,236,115,115,115,115,115,115,115,115,115,115,
+
+/* block 21 */
+115,240,240,241,115,242,242,242,242,242,242,242,242,242,115,242,
+242,242,115,242,242,242,242,242,242,242,242,242,242,242,242,242,
+242,242,242,242,242,242,242,242,242,115,242,242,242,242,242,242,
+242,115,242,242,115,242,242,242,242,242,115,115,240,242,241,241,
+241,240,240,240,240,240,115,240,240,241,115,241,241,240,115,115,
+242,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+242,242,240,240,115,115,243,243,243,243,243,243,243,243,243,243,
+244,245,115,115,115,115,115,115,115,242,115,115,115,115,115,115,
+
+/* block 22 */
+115,246,247,247,115,248,248,248,248,248,248,248,248,115,115,248,
+248,115,115,248,248,248,248,248,248,248,248,248,248,248,248,248,
+248,248,248,248,248,248,248,248,248,115,248,248,248,248,248,248,
+248,115,248,248,115,248,248,248,248,248,115,115,246,248,249,246,
+247,246,246,246,246,115,115,247,247,115,115,247,247,246,115,115,
+115,115,115,115,115,115,246,249,115,115,115,115,248,248,115,248,
+248,248,246,246,115,115,250,250,250,250,250,250,250,250,250,250,
+251,248,252,252,252,252,252,252,115,115,115,115,115,115,115,115,
+
+/* block 23 */
+115,115,253,254,115,254,254,254,254,254,254,115,115,115,254,254,
+254,115,254,254,254,254,115,115,115,254,254,115,254,115,254,254,
+115,115,115,254,254,115,115,115,254,254,254,115,115,115,254,254,
+254,254,254,254,254,254,254,254,254,254,115,115,115,115,255,256,
+253,256,256,115,115,115,256,256,256,115,256,256,256,253,115,115,
+254,115,115,115,115,115,115,255,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,257,257,257,257,257,257,257,257,257,257,
+258,258,258,259,259,259,259,259,259,260,259,115,115,115,115,115,
+
+/* block 24 */
+261,262,262,262,115,263,263,263,263,263,263,263,263,115,263,263,
+263,115,263,263,263,263,263,263,263,263,263,263,263,263,263,263,
+263,263,263,263,263,263,263,263,263,115,263,263,263,263,263,263,
+263,263,263,263,263,263,263,263,263,263,115,115,115,263,261,261,
+261,262,262,262,262,115,261,261,261,115,261,261,261,261,115,115,
+115,115,115,115,115,261,261,115,263,263,263,115,115,115,115,115,
+263,263,261,261,115,115,264,264,264,264,264,264,264,264,264,264,
+115,115,115,115,115,115,115,115,265,265,265,265,265,265,265,266,
+
+/* block 25 */
+115,267,268,268,115,269,269,269,269,269,269,269,269,115,269,269,
+269,115,269,269,269,269,269,269,269,269,269,269,269,269,269,269,
+269,269,269,269,269,269,269,269,269,115,269,269,269,269,269,269,
+269,269,269,269,115,269,269,269,269,269,115,115,267,269,268,267,
+268,268,270,268,268,115,267,268,268,115,268,268,267,267,115,115,
+115,115,115,115,115,270,270,115,115,115,115,115,115,115,269,115,
+269,269,267,267,115,115,271,271,271,271,271,271,271,271,271,271,
+115,269,269,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 26 */
+115,272,273,273,115,274,274,274,274,274,274,274,274,115,274,274,
+274,115,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
+274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,274,
+274,274,274,274,274,274,274,274,274,274,274,115,115,274,275,273,
+273,272,272,272,272,115,273,273,273,115,273,273,273,272,274,115,
+115,115,115,115,115,115,115,275,115,115,115,115,115,115,115,274,
+274,274,272,272,115,115,276,276,276,276,276,276,276,276,276,276,
+277,277,277,277,277,277,115,115,115,278,274,274,274,274,274,274,
+
+/* block 27 */
+115,115,279,279,115,280,280,280,280,280,280,280,280,280,280,280,
+280,280,280,280,280,280,280,115,115,115,280,280,280,280,280,280,
+280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,
+280,280,115,280,280,280,280,280,280,280,280,280,115,280,115,115,
+280,280,280,280,280,280,280,115,115,115,281,115,115,115,115,282,
+279,279,281,281,281,115,281,115,279,279,279,279,279,279,279,282,
+115,115,115,115,115,115,283,283,283,283,283,283,283,283,283,283,
+115,115,279,279,284,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 28 */
+115,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,
+285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,
+285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,
+285,286,285,287,286,286,286,286,286,286,286,115,115,115,115, 5,
+285,285,285,285,285,285,288,286,286,286,286,286,286,286,286,289,
+290,290,290,290,290,290,290,290,290,290,289,289,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 29 */
+115,291,291,115,291,115,115,291,291,115,291,115,115,291,115,115,
+115,115,115,115,291,291,291,291,115,291,291,291,291,291,291,291,
+115,291,291,291,115,291,115,291,115,115,291,291,115,291,291,291,
+291,292,291,293,292,292,292,292,292,292,115,292,292,291,115,115,
+291,291,291,291,291,115,294,115,292,292,292,292,292,292,115,115,
+295,295,295,295,295,295,295,295,295,295,115,115,291,291,291,291,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 30 */
+296,297,297,297,298,298,298,298,298,298,298,298,298,298,298,298,
+298,298,298,297,298,297,297,297,299,299,297,297,297,297,297,297,
+300,300,300,300,300,300,300,300,300,300,301,301,301,301,301,301,
+301,301,301,301,297,299,297,299,297,299,302,303,302,303,304,304,
+296,296,296,296,296,296,296,296,115,296,296,296,296,296,296,296,
+296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,296,
+296,296,296,296,296,296,296,296,296,296,296,296,296,115,115,115,
+115,299,299,299,299,299,299,299,299,299,299,299,299,299,299,304,
+
+/* block 31 */
+299,299,299,299,299,298,299,299,296,296,296,296,296,299,299,299,
+299,299,299,299,299,299,299,299,115,299,299,299,299,299,299,299,
+299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,
+299,299,299,299,299,299,299,299,299,299,299,299,299,115,297,297,
+297,297,297,297,297,297,299,297,297,297,297,297,297,115,297,297,
+298,298,298,298,298, 19, 19, 19, 19,298,298,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 32 */
+305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
+305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
+305,305,305,305,305,305,305,305,305,305,305,306,306,307,307,307,
+307,308,307,307,307,307,307,307,306,307,307,308,308,307,307,305,
+309,309,309,309,309,309,309,309,309,309,310,310,310,310,310,310,
+305,305,305,305,305,305,308,308,307,307,305,305,305,305,307,307,
+307,305,306,306,306,305,305,306,306,306,306,306,306,306,305,305,
+305,307,307,307,307,305,305,305,305,305,305,305,305,305,305,305,
+
+/* block 33 */
+305,305,307,306,308,307,307,306,306,306,306,306,306,307,305,306,
+309,309,309,309,309,309,309,309,309,309,306,306,306,307,311,311,
+312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
+312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,
+312,312,312,312,312,312,115,312,115,115,115,115,115,312,115,115,
+313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
+313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,313,
+313,313,313,313,313,313,313,313,313,313,313, 4,314,313,313,313,
+
+/* block 34 */
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
+316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
+
+/* block 35 */
+316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
+316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
+316,316,316,316,316,316,316,316,317,317,317,317,317,317,317,317,
+317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
+317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
+317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
+317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
+317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
+
+/* block 36 */
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,115,318,318,318,318,115,115,
+318,318,318,318,318,318,318,115,318,115,318,318,318,318,115,115,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+
+/* block 37 */
+318,318,318,318,318,318,318,318,318,115,318,318,318,318,115,115,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,115,318,318,318,318,115,115,318,318,318,318,318,318,318,115,
+318,115,318,318,318,318,115,115,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,115,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+
+/* block 38 */
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,115,318,318,318,318,115,115,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,318,318,318,318,115,115,319,319,319,
+320,320,320,320,320,320,320,320,320,321,321,321,321,321,321,321,
+321,321,321,321,321,321,321,321,321,321,321,321,321,115,115,115,
+
+/* block 39 */
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+322,322,322,322,322,322,322,322,322,322,115,115,115,115,115,115,
+323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,
+323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,
+323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,
+323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,
+323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,323,
+324,324,324,324,324,324,115,115,325,325,325,325,325,325,115,115,
+
+/* block 40 */
+326,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+
+/* block 41 */
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+
+/* block 42 */
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,328,328,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+
+/* block 43 */
+329,330,330,330,330,330,330,330,330,330,330,330,330,330,330,330,
+330,330,330,330,330,330,330,330,330,330,330,331,332,115,115,115,
+333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
+333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
+333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
+333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,333,
+333,333,333,333,333,333,333,333,333,333,333, 4, 4, 4,334,334,
+334,333,333,333,333,333,333,333,333,115,115,115,115,115,115,115,
+
+/* block 44 */
+335,335,335,335,335,335,335,335,335,335,335,335,335,115,335,335,
+335,335,336,336,336,115,115,115,115,115,115,115,115,115,115,115,
+337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,337,
+337,337,338,338,338, 4, 4,115,115,115,115,115,115,115,115,115,
+339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,339,
+339,339,340,340,115,115,115,115,115,115,115,115,115,115,115,115,
+341,341,341,341,341,341,341,341,341,341,341,341,341,115,341,341,
+341,115,342,342,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 45 */
+343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,
+343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,
+343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,
+343,343,343,343,344,344,345,344,344,344,344,344,344,344,345,345,
+345,345,345,345,345,345,344,345,345,344,344,344,344,344,344,344,
+344,344,344,344,346,346,346,347,346,346,346,348,343,344,115,115,
+349,349,349,349,349,349,349,349,349,349,115,115,115,115,115,115,
+350,350,350,350,350,350,350,350,350,350,115,115,115,115,115,115,
+
+/* block 46 */
+351,351, 4, 4,351, 4,352,351,351,351,351,353,353,353,354,115,
+355,355,355,355,355,355,355,355,355,355,115,115,115,115,115,115,
+356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,
+356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,
+356,356,356,357,356,356,356,356,356,356,356,356,356,356,356,356,
+356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,
+356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,
+356,356,356,356,356,356,356,356,115,115,115,115,115,115,115,115,
+
+/* block 47 */
+356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,
+356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,
+356,356,356,356,356,356,356,356,356,353,356,115,115,115,115,115,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,327,
+327,327,327,327,327,327,115,115,115,115,115,115,115,115,115,115,
+
+/* block 48 */
+358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,
+358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,115,
+359,359,359,360,360,360,360,359,359,360,360,360,115,115,115,115,
+360,360,359,360,360,360,360,360,360,359,359,359,115,115,115,115,
+361,115,115,115,362,362,363,363,363,363,363,363,363,363,363,363,
+364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,364,
+364,364,364,364,364,364,364,364,364,364,364,364,364,364,115,115,
+364,364,364,364,364,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 49 */
+365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,
+365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,
+365,365,365,365,365,365,365,365,365,365,365,365,115,115,115,115,
+365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,
+365,365,365,365,365,365,365,365,365,365,115,115,115,115,115,115,
+366,366,366,366,366,366,366,366,366,366,367,115,115,115,368,368,
+369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
+369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,
+
+/* block 50 */
+370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,
+370,370,370,370,370,370,370,371,371,372,372,371,115,115,373,373,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,
+374,374,374,374,374,375,376,375,376,376,376,376,376,376,376,115,
+376,377,376,377,377,376,376,376,376,376,376,376,376,375,375,375,
+375,375,375,376,376,376,376,376,376,376,376,376,376,115,115,376,
+
+/* block 51 */
+378,378,378,378,378,378,378,378,378,378,115,115,115,115,115,115,
+378,378,378,378,378,378,378,378,378,378,115,115,115,115,115,115,
+379,379,379,379,379,379,379,380,379,379,379,379,379,379,115,115,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,381,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 52 */
+382,382,382,382,383,384,384,384,384,384,384,384,384,384,384,384,
+384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,
+384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,
+384,384,384,384,382,383,382,382,382,382,382,383,382,383,383,383,
+383,383,382,383,383,384,384,384,384,384,384,384,115,115,115,115,
+385,385,385,385,385,385,385,385,385,385,386,386,386,386,386,386,
+386,387,387,387,387,387,387,387,387,387,387,382,382,382,382,382,
+382,382,382,382,387,387,387,387,387,387,387,387,387,115,115,115,
+
+/* block 53 */
+388,388,389,390,390,390,390,390,390,390,390,390,390,390,390,390,
+390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,390,
+390,389,388,388,388,388,389,389,388,388,389,388,388,388,390,390,
+391,391,391,391,391,391,391,391,391,391,390,390,390,390,390,390,
+392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,
+392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,392,
+392,392,392,392,392,392,393,394,393,393,394,394,394,393,394,393,
+393,393,394,394,115,115,115,115,115,115,115,115,395,395,395,395,
+
+/* block 54 */
+396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
+396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,
+396,396,396,396,397,397,397,397,397,397,397,397,398,398,398,398,
+398,398,398,398,397,397,398,398,115,115,115,399,399,399,399,399,
+400,400,400,400,400,400,400,400,400,400,115,115,115,396,396,396,
+401,401,401,401,401,401,401,401,401,401,402,402,402,402,402,402,
+402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,
+402,402,402,402,402,402,402,402,403,403,403,403,403,403,404,404,
+
+/* block 55 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+405,405,405,405,405,405,405,405,115,115,115,115,115,115,115,115,
+110,110,110, 4,110,110,110,110,110,110,110,110,110,110,110,110,
+110,406,110,110,110,110,110,110,110,407,407,407,407,110,407,407,
+407,407,406,406,110,407,407,115,110,110,115,115,115,115,115,115,
+
+/* block 56 */
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33,123,123,123,123,123,408,107,107,107,107,
+107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
+107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
+107,107,107,107,107,107,107,107,107,107,107,107,107,116,116,116,
+116,116,107,107,107,107,116,116,116,116,116, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33,409,410, 33, 33, 33,411, 33, 33,
+
+/* block 57 */
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,107,107,107,107,107,
+107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,
+107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,116,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,115,115,115,115,115,115,110,110,110,110,
+
+/* block 58 */
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+412,413, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+
+/* block 59 */
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 33, 33, 33, 33, 33,414, 33, 33,415, 33,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+
+/* block 60 */
+416,416,416,416,416,416,416,416,417,417,417,417,417,417,417,417,
+416,416,416,416,416,416,115,115,417,417,417,417,417,417,115,115,
+416,416,416,416,416,416,416,416,417,417,417,417,417,417,417,417,
+416,416,416,416,416,416,416,416,417,417,417,417,417,417,417,417,
+416,416,416,416,416,416,115,115,417,417,417,417,417,417,115,115,
+123,416,123,416,123,416,123,416,115,417,115,417,115,417,115,417,
+416,416,416,416,416,416,416,416,417,417,417,417,417,417,417,417,
+418,418,419,419,419,419,420,420,421,421,422,422,423,423,115,115,
+
+/* block 61 */
+416,416,416,416,416,416,416,416,424,424,424,424,424,424,424,424,
+416,416,416,416,416,416,416,416,424,424,424,424,424,424,424,424,
+416,416,416,416,416,416,416,416,424,424,424,424,424,424,424,424,
+416,416,123,425,123,115,123,123,417,417,426,426,427,114,428,114,
+114,114,123,425,123,115,123,123,429,429,429,429,427,114,114,114,
+416,416,123,123,115,115,123,123,417,417,430,430,115,114,114,114,
+416,416,123,123,123,164,123,123,417,417,431,431,169,114,114,114,
+115,115,123,425,123,115,123,123,432,432,433,433,427,114,114,115,
+
+/* block 62 */
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 22,434,434, 22, 22,
+ 9, 9, 9, 9, 9, 9, 4, 4, 21, 25, 6, 21, 21, 25, 6, 21,
+ 4, 4, 4, 4, 4, 4, 4, 4,435,436, 22, 22, 22, 22, 22, 3,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 21, 25, 4, 4, 4, 4, 15,
+ 15, 4, 4, 4, 8, 6, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 8, 4, 15, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3,
+ 22, 22, 22, 22, 22,437, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 23,107,115,115, 23, 23, 23, 23, 23, 23, 8, 8, 8, 6, 7,107,
+
+/* block 63 */
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 8, 8, 8, 6, 7,115,
+107,107,107,107,107,107,107,107,107,107,107,107,107,115,115,115,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+110,110,110,110,110,110,110,110,110,110,110,110,110,381,381,381,
+381,110,381,381,381,110,110,110,110,110,110,110,110,110,110,110,
+110,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 64 */
+ 19, 19,438, 19, 19, 19, 19,438, 19, 19,439,438,438,438,439,439,
+438,438,438,439, 19,438, 19, 19, 8,438,438,438,438,438, 19, 19,
+ 19, 19, 19, 19,438, 19,440, 19,438, 19,441,442,438,438, 19,439,
+438,438,443,438,439,407,407,407,407,439, 19, 19,439,439,438,438,
+ 8, 8, 8, 8, 8,438,439,439,439,439, 19, 8, 19, 19,444, 19,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,
+446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,
+
+/* block 65 */
+447,447,447, 30, 31,447,447,447,447, 23, 19, 19,115,115,115,115,
+ 8, 8, 8, 8, 8, 19, 19, 19, 19, 19, 8, 8, 19, 19, 19, 19,
+ 8, 19, 19, 8, 19, 19, 8, 19, 19, 19, 19, 19, 19, 19, 8, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8, 8,
+ 19, 19, 8, 19, 8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+
+/* block 66 */
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+
+/* block 67 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 6, 7, 6, 7, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 8, 8, 19, 19, 19, 19, 19, 19, 19, 6, 7, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8, 19, 19, 19,
+
+/* block 68 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8, 8, 8, 8,
+ 8, 8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,
+
+/* block 69 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+
+/* block 70 */
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19,448,448,448,448,448,448,448,448,448,448,
+448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,
+449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,449,
+449,449,449,449,449,449,449,449,449,449, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+
+/* block 71 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 72 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 8, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 8, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 8, 8, 8, 8, 8, 8, 8, 8,
+
+/* block 73 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 8,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 74 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 6, 7, 6, 7, 6, 7, 6, 7,
+ 6, 7, 6, 7, 6, 7, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+
+/* block 75 */
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 8, 8, 8, 8, 8, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+
+/* block 76 */
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
+450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,450,
+
+/* block 77 */
+ 8, 8, 8, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6,
+ 7, 6, 7, 6, 7, 6, 7, 6, 7, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 6, 7, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 8,
+
+/* block 78 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
+ 8, 8, 8, 8, 8, 19, 19, 8, 8, 8, 8, 8, 8, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,115,115, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 79 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19,115,115, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19,115, 19, 19, 19, 19, 19, 19,
+ 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115, 19, 19, 19, 19,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 80 */
+451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,
+451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,
+451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,115,
+452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,
+452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,
+452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,115,
+ 30, 31,453,454,455,456,457, 30, 31, 30, 31, 30, 31,458,459,460,
+461, 33, 30, 31, 33, 30, 31, 33, 33, 33, 33, 33,107,107,462,462,
+
+/* block 81 */
+160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
+160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
+160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
+160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
+160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
+160,161,160,161,160,161,160,161,160,161,160,161,160,161,160,161,
+160,161,160,161,463,464,464,464,464,464,464,160,161,160,161,465,
+465,465,160,161,115,115,115,115,115,466,466,466,466,467,466,466,
+
+/* block 82 */
+468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,
+468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,
+468,468,468,468,468,468,115,468,115,115,115,115,115,468,115,115,
+469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
+469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
+469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,
+469,469,469,469,469,469,469,469,115,115,115,115,115,115,115,470,
+471,115,115,115,115,115,115,115,115,115,115,115,115,115,115,472,
+
+/* block 83 */
+318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,318,
+318,318,318,318,318,318,318,115,115,115,115,115,115,115,115,115,
+318,318,318,318,318,318,318,115,318,318,318,318,318,318,318,115,
+318,318,318,318,318,318,318,115,318,318,318,318,318,318,318,115,
+318,318,318,318,318,318,318,115,318,318,318,318,318,318,318,115,
+318,318,318,318,318,318,318,115,318,318,318,318,318,318,318,115,
+178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,
+178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,
+
+/* block 84 */
+ 4, 4, 21, 25, 21, 25, 4, 4, 4, 21, 25, 4, 21, 25, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 9, 4, 4, 9, 4, 21, 25, 4, 4,
+ 21, 25, 6, 7, 6, 7, 6, 7, 6, 7, 4, 4, 4, 4, 4,108,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, 9, 4, 4, 4, 4,
+ 9, 4, 6,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 85 */
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,115,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 86 */
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+
+/* block 87 */
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,
+473,473,473,473,473,473,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
+
+/* block 88 */
+ 3, 4, 4, 4, 19,474,407,475, 6, 7, 6, 7, 6, 7, 6, 7,
+ 6, 7, 19, 19, 6, 7, 6, 7, 6, 7, 6, 7, 9, 6, 7, 7,
+ 19,475,475,475,475,475,475,475,475,475,110,110,110,110,476,476,
+ 9,108,108,108,108,108, 19, 19,475,475,475,474,407, 4, 19, 19,
+115,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,
+477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,
+477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,
+477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,
+
+/* block 89 */
+477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,477,
+477,477,477,477,477,477,477,115,115,110,110, 14, 14,478,478,477,
+ 9,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+479,479,479,479,479,479,479,479,479,479,479, 4,108,480,480,479,
+
+/* block 90 */
+115,115,115,115,115,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,115,115,
+115,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+
+/* block 91 */
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,115,
+ 19, 19, 23, 23, 23, 23, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,
+481,481,481,481,481,481,481,481,481,481,481,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+
+/* block 92 */
+483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,
+483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,115,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 23, 23,
+ 19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,
+483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, 19,
+
+/* block 93 */
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,115,
+
+/* block 94 */
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,
+484,484,484,484,484,484,484,484, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 95 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+
+/* block 96 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 97 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 98 */
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,487,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+
+/* block 99 */
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,486,
+
+/* block 100 */
+486,486,486,486,486,486,486,486,486,486,486,486,486,115,115,115,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,488,
+488,488,488,488,488,488,488,115,115,115,115,115,115,115,115,115,
+489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,
+489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,489,
+489,489,489,489,489,489,489,489,490,490,490,490,490,490,491,491,
+
+/* block 101 */
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+
+/* block 102 */
+492,492,492,492,492,492,492,492,492,492,492,492,493,494,494,494,
+492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,
+495,495,495,495,495,495,495,495,495,495,492,492,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,496,178,
+179,179,179,497,178,178,178,178,178,178,178,178,178,178,497,409,
+
+/* block 103 */
+175,176,175,176,175,176,175,176,175,176,175,176,175,176,175,176,
+175,176,175,176,175,176,175,176,175,176,175,176,409,409,178,178,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,499,499,499,499,499,499,499,499,499,499,
+500,500,501,501,501,501,501,501,115,115,115,115,115,115,115,115,
+
+/* block 104 */
+ 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
+ 14, 14, 14, 14, 14, 14, 14,108,108,108,108,108,108,108,108,108,
+ 14, 14, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 33, 33, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+107, 33, 33, 33, 33, 33, 33, 33, 33, 30, 31, 30, 31,502, 30, 31,
+
+/* block 105 */
+ 30, 31, 30, 31, 30, 31, 30, 31,108, 14, 14, 30, 31,503, 33, 20,
+ 30, 31, 30, 31, 33, 33, 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,
+ 30, 31, 30, 31, 30, 31, 30, 31, 30, 31,504,505,506,507,115,115,
+508,509,510,511, 30, 31, 30, 31,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115, 20,107,107, 33, 20, 20, 20, 20, 20,
+
+/* block 106 */
+512,512,513,512,512,512,513,512,512,512,512,513,512,512,512,512,
+512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,
+512,512,512,514,514,513,513,514,515,515,515,515,115,115,115,115,
+ 23, 23, 23, 23, 23, 23, 19, 19, 5, 19,115,115,115,115,115,115,
+516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
+516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
+516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,516,
+516,516,516,516,517,517,517,517,115,115,115,115,115,115,115,115,
+
+/* block 107 */
+518,518,519,519,519,519,519,519,519,519,519,519,519,519,519,519,
+519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,
+519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,519,
+519,519,519,519,518,518,518,518,518,518,518,518,518,518,518,518,
+518,518,518,518,520,115,115,115,115,115,115,115,115,115,521,521,
+522,522,522,522,522,522,522,522,522,522,115,115,115,115,115,115,
+222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,222,
+222,222,224,224,224,224,224,224,226,226,226,224,226,224,115,115,
+
+/* block 108 */
+523,523,523,523,523,523,523,523,523,523,524,524,524,524,524,524,
+524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,524,
+524,524,524,524,524,524,525,525,525,525,525,525,525,525, 4,526,
+527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,527,
+527,527,527,527,527,527,527,528,528,528,528,528,528,528,528,528,
+528,528,529,529,115,115,115,115,115,115,115,115,115,115,115,530,
+315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,315,
+315,315,315,315,315,315,315,315,315,315,315,315,315,115,115,115,
+
+/* block 109 */
+531,531,531,532,533,533,533,533,533,533,533,533,533,533,533,533,
+533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,
+533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,533,
+533,533,533,531,532,532,531,531,531,531,532,532,531,532,532,532,
+532,534,534,534,534,534,534,534,534,534,534,534,534,534,115,108,
+535,535,535,535,535,535,535,535,535,535,115,115,115,115,534,534,
+305,305,305,305,305,307,536,305,305,305,305,305,305,305,305,305,
+309,309,309,309,309,309,309,309,309,309,305,305,305,305,305,115,
+
+/* block 110 */
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,537,
+537,537,537,537,537,537,537,537,537,538,538,538,538,538,538,539,
+539,538,538,539,539,538,538,115,115,115,115,115,115,115,115,115,
+537,537,537,538,537,537,537,537,537,537,537,537,538,539,115,115,
+540,540,540,540,540,540,540,540,540,540,115,115,541,541,541,541,
+305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,305,
+536,305,305,305,305,305,305,311,311,311,305,306,307,306,305,305,
+
+/* block 111 */
+542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,
+542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,
+542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,542,
+543,542,543,543,543,542,542,543,543,542,542,542,542,542,543,543,
+542,543,542,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,542,542,544,545,545,
+546,546,546,546,546,546,546,546,546,546,546,547,548,548,547,547,
+549,549,546,550,550,547,548,115,115,115,115,115,115,115,115,115,
+
+/* block 112 */
+115,318,318,318,318,318,318,115,115,318,318,318,318,318,318,115,
+115,318,318,318,318,318,318,115,115,115,115,115,115,115,115,115,
+318,318,318,318,318,318,318,115,318,318,318,318,318,318,318,115,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33,551, 33, 33, 33, 33, 33, 33, 33, 14,107,107,107,107,
+ 33, 33, 33, 33, 33,123,115,115,115,115,115,115,115,115,115,115,
+552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
+
+/* block 113 */
+552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
+552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
+552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
+552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,552,
+546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,
+546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,546,
+546,546,546,547,547,548,547,547,548,547,547,549,547,548,115,115,
+553,553,553,553,553,553,553,553,553,553,115,115,115,115,115,115,
+
+/* block 114 */
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+
+/* block 115 */
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
+
+/* block 116 */
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+
+/* block 117 */
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+
+/* block 118 */
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+
+/* block 119 */
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
+
+/* block 120 */
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+554,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,554,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,554,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+
+/* block 121 */
+555,555,555,555,555,555,555,555,554,555,555,555,555,555,555,555,
+555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,555,
+555,555,555,555,115,115,115,115,115,115,115,115,115,115,115,115,
+316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,316,
+316,316,316,316,316,316,316,115,115,115,115,317,317,317,317,317,
+317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
+317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,
+317,317,317,317,317,317,317,317,317,317,317,317,115,115,115,115,
+
+/* block 122 */
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,556,
+
+/* block 123 */
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+
+/* block 124 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,115,115,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+
+/* block 125 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 126 */
+ 33, 33, 33, 33, 33, 33, 33,115,115,115,115,115,115,115,115,115,
+115,115,115,186,186,186,186,186,115,115,115,115,115,193,190,193,
+193,193,193,193,193,193,193,193,193,558,193,193,193,193,193,193,
+193,193,193,193,193,193,193,115,193,193,193,193,193,115,193,115,
+193,193,115,193,193,115,193,193,193,193,193,193,193,193,193,193,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+
+/* block 127 */
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,559,559,559,559,559,559,559,559,559,559,559,559,559,559,
+559,559,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+
+/* block 128 */
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+
+/* block 129 */
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200, 7, 6,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+
+/* block 130 */
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+115,115,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+200,200,200,200,200,200,200,200,200,200,200,200,197,198,115,115,
+
+/* block 131 */
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+ 4, 4, 4, 4, 4, 4, 4, 6, 7, 4,115,115,115,115,115,115,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,178,178,
+ 4, 9, 9, 15, 15, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6,
+ 7, 6, 7, 6, 7, 4, 4, 6, 7, 4, 4, 4, 4, 15, 15, 15,
+ 4, 4, 4,115, 4, 4, 4, 4, 9, 6, 7, 6, 7, 6, 7, 4,
+ 4, 4, 8, 9, 8, 8, 8,115, 4, 5, 4, 4,115,115,115,115,
+200,200,200,200,200,115,200,200,200,200,200,200,200,200,200,200,
+
+/* block 132 */
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,115,115, 22,
+
+/* block 133 */
+115, 4, 4, 4, 5, 4, 4, 4, 6, 7, 4, 8, 4, 9, 4, 4,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 4, 4, 8, 8, 8, 4,
+ 4, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
+ 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 6, 4, 7, 14, 15,
+ 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 6, 8, 7, 8, 6,
+ 7, 4, 6, 7, 4, 4,479,479,479,479,479,479,479,479,479,479,
+108,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+
+/* block 134 */
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,
+479,479,479,479,479,479,479,479,479,479,479,479,479,479,560,560,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,
+482,482,482,482,482,482,482,482,482,482,482,482,482,482,482,115,
+115,115,482,482,482,482,482,482,115,115,482,482,482,482,482,482,
+115,115,482,482,482,482,482,482,115,115,482,482,482,115,115,115,
+ 5, 5, 8, 14, 19, 5, 5,115, 19, 8, 8, 8, 8, 19, 19,115,
+437,437,437,437,437,437,437,437,437, 22, 22, 22, 19, 19,115,115,
+
+/* block 135 */
+561,561,561,561,561,561,561,561,561,561,561,561,115,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,115,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,115,561,561,115,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,115,115,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 136 */
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,561,
+561,561,561,561,561,561,561,561,561,561,561,115,115,115,115,115,
+
+/* block 137 */
+ 4, 4, 4,115,115,115,115, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23,115,115,115, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,
+562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,
+562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,562,
+562,562,562,562,562,563,563,563,563,564,564,564,564,564,564,564,
+
+/* block 138 */
+564,564,564,564,564,564,564,564,564,564,563,563,564,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
+564,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,110,115,115,
+
+/* block 139 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 140 */
+565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,565,
+565,565,565,565,565,565,565,565,565,565,565,565,565,115,115,115,
+566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,
+566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,
+566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,566,
+566,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+110, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,115,115,115,115,
+
+/* block 141 */
+567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,
+567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,567,
+568,568,568,568,115,115,115,115,115,115,115,115,115,115,115,115,
+569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,569,
+569,570,569,569,569,569,569,569,569,569,570,115,115,115,115,115,
+571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,
+571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,571,
+571,571,571,571,571,571,572,572,572,572,572,115,115,115,115,115,
+
+/* block 142 */
+573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,573,
+573,573,573,573,573,573,573,573,573,573,573,573,573,573,115,574,
+575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,
+575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,575,
+575,575,575,575,115,115,115,115,575,575,575,575,575,575,575,575,
+576,577,577,577,577,577,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 143 */
+578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,
+578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,578,
+578,578,578,578,578,578,578,578,579,579,579,579,579,579,579,579,
+579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,
+579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,579,
+580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,
+580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,
+580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,580,
+
+/* block 144 */
+581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,581,
+581,581,581,581,581,581,581,581,581,581,581,581,581,581,115,115,
+582,582,582,582,582,582,582,582,582,582,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 145 */
+583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,
+583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,583,
+583,583,583,583,583,583,583,583,115,115,115,115,115,115,115,115,
+584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,
+584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,
+584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,584,
+584,584,584,584,115,115,115,115,115,115,115,115,115,115,115,585,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 146 */
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+
+/* block 147 */
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,586,115,115,115,115,115,115,115,115,115,
+586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,586,
+586,586,586,586,586,586,115,115,115,115,115,115,115,115,115,115,
+586,586,586,586,586,586,586,586,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 148 */
+587,587,587,587,587,587,115,115,587,115,587,587,587,587,587,587,
+587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
+587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,587,
+587,587,587,587,587,587,115,587,587,115,115,115,587,115,115,587,
+588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,588,
+588,588,588,588,588,588,115,589,590,590,590,590,590,590,590,590,
+591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,591,
+591,591,591,591,591,591,591,592,592,593,593,593,593,593,593,593,
+
+/* block 149 */
+594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,
+594,594,594,594,594,594,594,594,594,594,594,594,594,594,594,115,
+115,115,115,115,115,115,115,595,595,595,595,595,595,595,595,595,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,596,
+596,596,596,115,596,596,115,115,115,115,115,597,597,597,597,597,
+
+/* block 150 */
+598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,598,
+598,598,598,598,598,598,599,599,599,599,599,599,115,115,115,600,
+601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,601,
+601,601,601,601,601,601,601,601,601,601,115,115,115,115,115,602,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 151 */
+603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,
+603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,603,
+604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,604,
+604,604,604,604,604,604,604,604,115,115,115,115,605,605,604,604,
+605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,
+115,115,605,605,605,605,605,605,605,605,605,605,605,605,605,605,
+605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,
+605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,605,
+
+/* block 152 */
+606,607,607,607,115,607,607,115,115,115,115,115,607,607,607,607,
+606,606,606,606,115,606,606,606,115,606,606,606,606,606,606,606,
+606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,606,
+606,606,606,606,115,115,115,115,607,607,607,115,115,115,115,607,
+608,608,608,608,608,608,608,608,115,115,115,115,115,115,115,115,
+609,609,609,609,609,609,609,609,609,115,115,115,115,115,115,115,
+610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,610,
+610,610,610,610,610,610,610,610,610,610,610,610,610,611,611,612,
+
+/* block 153 */
+613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,613,
+613,613,613,613,613,613,613,613,613,613,613,613,613,614,614,614,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+615,615,615,615,615,615,615,615,616,615,615,615,615,615,615,615,
+615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,615,
+615,615,615,615,615,617,617,115,115,115,115,618,618,618,618,618,
+619,619,619,619,619,619,619,115,115,115,115,115,115,115,115,115,
+
+/* block 154 */
+620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
+620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
+620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,620,
+620,620,620,620,620,620,115,115,115,621,621,621,621,621,621,621,
+622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,622,
+622,622,622,622,622,622,115,115,623,623,623,623,623,623,623,623,
+624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,624,
+624,624,624,115,115,115,115,115,625,625,625,625,625,625,625,625,
+
+/* block 155 */
+626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,626,
+626,626,115,115,115,115,115,115,115,627,627,627,627,115,115,115,
+115,115,115,115,115,115,115,115,115,628,628,628,628,628,628,628,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 156 */
+629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,
+629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,
+629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,
+629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,629,
+629,629,629,629,629,629,629,629,629,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 157 */
+630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,
+630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,
+630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,630,
+630,630,630,115,115,115,115,115,115,115,115,115,115,115,115,115,
+631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,
+631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,
+631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,631,
+631,631,631,115,115,115,115,115,115,115,632,632,632,632,632,632,
+
+/* block 158 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,
+633,633,633,633,633,633,633,633,633,633,633,633,633,633,633,115,
+
+/* block 159 */
+634,635,634,636,636,636,636,636,636,636,636,636,636,636,636,636,
+636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,
+636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,636,
+636,636,636,636,636,636,636,636,635,635,635,635,635,635,635,635,
+635,635,635,635,635,635,635,637,637,637,637,637,637,637,115,115,
+115,115,638,638,638,638,638,638,638,638,638,638,638,638,638,638,
+638,638,638,638,638,638,639,639,639,639,639,639,639,639,639,639,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,635,
+
+/* block 160 */
+640,640,641,642,642,642,642,642,642,642,642,642,642,642,642,642,
+642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,
+642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,642,
+641,641,641,640,640,640,640,641,641,640,640,643,643,644,643,643,
+643,643,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,645,
+645,645,645,645,645,645,645,645,645,115,115,115,115,115,115,115,
+646,646,646,646,646,646,646,646,646,646,115,115,115,115,115,115,
+
+/* block 161 */
+647,647,647,648,648,648,648,648,648,648,648,648,648,648,648,648,
+648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,648,
+648,648,648,648,648,648,648,647,647,647,647,647,649,647,647,647,
+647,647,647,647,647,115,650,650,650,650,650,650,650,650,650,650,
+651,651,651,651,115,115,115,115,115,115,115,115,115,115,115,115,
+652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,
+652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,652,
+652,652,652,653,654,654,652,115,115,115,115,115,115,115,115,115,
+
+/* block 162 */
+655,655,656,657,657,657,657,657,657,657,657,657,657,657,657,657,
+657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,
+657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,657,
+657,657,657,656,656,656,655,655,655,655,655,655,655,655,655,656,
+656,657,657,657,657,658,658,658,658,658,655,655,655,658,115,115,
+659,659,659,659,659,659,659,659,659,659,657,658,657,658,658,658,
+115,660,660,660,660,660,660,660,660,660,660,660,660,660,660,660,
+660,660,660,660,660,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 163 */
+661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,661,
+661,661,115,661,661,661,661,661,661,661,661,661,661,661,661,661,
+661,661,661,661,661,661,661,661,661,661,661,661,662,662,662,663,
+663,663,662,662,663,662,663,663,664,664,664,664,664,664,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 164 */
+665,665,665,665,665,665,665,115,665,115,665,665,665,665,115,665,
+665,665,665,665,665,665,665,665,665,665,665,665,665,665,115,665,
+665,665,665,665,665,665,665,665,665,666,115,115,115,115,115,115,
+667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,
+667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,
+667,667,667,667,667,667,667,667,667,667,667,667,667,667,667,668,
+669,669,669,668,668,668,668,668,668,668,668,115,115,115,115,115,
+670,670,670,670,670,670,670,670,670,670,115,115,115,115,115,115,
+
+/* block 165 */
+671,671,672,672,115,673,673,673,673,673,673,673,673,115,115,673,
+673,115,115,673,673,673,673,673,673,673,673,673,673,673,673,673,
+673,673,673,673,673,673,673,673,673,115,673,673,673,673,673,673,
+673,115,673,673,115,673,673,673,673,673,115,115,671,673,674,672,
+671,672,672,672,672,115,115,672,672,115,115,672,672,672,115,115,
+673,115,115,115,115,115,115,674,115,115,115,115,115,673,673,673,
+673,673,672,672,115,115,671,671,671,671,671,671,671,115,115,115,
+671,671,671,671,671,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 166 */
+675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,
+675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,
+675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,675,
+676,677,677,678,678,678,678,678,678,677,678,677,677,676,677,678,
+678,677,678,678,675,675,679,675,115,115,115,115,115,115,115,115,
+680,680,680,680,680,680,680,680,680,680,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 167 */
+681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,
+681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,
+681,681,681,681,681,681,681,681,681,681,681,681,681,681,681,682,
+683,683,684,684,684,684,115,115,683,683,683,683,684,684,683,684,
+684,685,685,685,685,685,685,685,685,685,685,685,685,685,685,685,
+685,685,685,685,685,685,685,685,681,681,681,681,684,684,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 168 */
+686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,
+686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,
+686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,686,
+687,687,687,688,688,688,688,688,688,688,688,687,687,688,687,688,
+688,689,689,689,686,115,115,115,115,115,115,115,115,115,115,115,
+690,690,690,690,690,690,690,690,690,690,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 169 */
+691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
+691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,691,
+691,691,691,691,691,691,691,691,691,691,691,692,693,692,693,693,
+692,692,692,692,692,692,693,692,115,115,115,115,115,115,115,115,
+694,694,694,694,694,694,694,694,694,694,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 170 */
+695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,695,
+695,695,695,695,695,695,695,695,695,695,115,115,115,696,696,696,
+697,697,696,696,696,696,697,696,696,696,696,696,115,115,115,115,
+698,698,698,698,698,698,698,698,698,698,699,699,700,700,700,701,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 171 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,
+702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,702,
+703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,
+703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,703,
+704,704,704,704,704,704,704,704,704,704,705,705,705,705,705,705,
+705,705,705,115,115,115,115,115,115,115,115,115,115,115,115,706,
+
+/* block 172 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,
+707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,
+707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,707,
+707,707,707,707,707,707,707,707,707,115,115,115,115,115,115,115,
+
+/* block 173 */
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+
+/* block 174 */
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 175 */
+709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
+709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
+709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
+709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
+709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
+709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,
+709,709,709,709,709,709,709,709,709,709,709,709,709,709,709,115,
+710,710,710,710,710,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 176 */
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,
+708,708,708,708,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 177 */
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+
+/* block 178 */
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,
+711,711,711,711,711,711,711,711,711,711,711,711,711,711,711,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 179 */
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+
+/* block 180 */
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,712,
+712,712,712,712,712,712,712,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 181 */
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+
+/* block 182 */
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,
+498,498,498,498,498,498,498,498,498,115,115,115,115,115,115,115,
+713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,
+713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,115,
+714,714,714,714,714,714,714,714,714,714,115,115,115,115,715,715,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 183 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,716,
+716,716,716,716,716,716,716,716,716,716,716,716,716,716,115,115,
+717,717,717,717,717,718,115,115,115,115,115,115,115,115,115,115,
+
+/* block 184 */
+719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,
+719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,
+719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,
+720,720,720,720,720,720,720,721,721,721,721,721,722,722,722,722,
+723,723,723,723,721,722,115,115,115,115,115,115,115,115,115,115,
+724,724,724,724,724,724,724,724,724,724,115,725,725,725,725,725,
+725,725,115,719,719,719,719,719,719,719,719,719,719,719,719,719,
+719,719,719,719,719,719,719,719,115,115,115,115,115,719,719,719,
+
+/* block 185 */
+719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,719,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 186 */
+726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,
+726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,
+726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,
+726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,726,
+726,726,726,726,726,115,115,115,115,115,115,115,115,115,115,115,
+726,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,
+727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,
+727,727,727,727,727,727,727,727,727,727,727,727,727,727,727,115,
+
+/* block 187 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,728,
+728,728,728,729,729,729,729,729,729,729,729,729,729,729,729,729,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 188 */
+479,477,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 189 */
+730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,
+730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,
+730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,
+730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,
+730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,
+730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,730,
+730,730,730,730,730,730,730,730,730,730,730,115,115,115,115,115,
+730,730,730,730,730,730,730,730,730,730,730,730,730,115,115,115,
+
+/* block 190 */
+730,730,730,730,730,730,730,730,730,115,115,115,115,115,115,115,
+730,730,730,730,730,730,730,730,730,730,115,115,731,732,732,733,
+ 22, 22, 22, 22,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 191 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,
+
+/* block 192 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19,115,115, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19,734,406,110,110,110, 19, 19, 19,406,734,734,
+734,734,734, 22, 22, 22, 22, 22, 22, 22, 22,110,110,110,110,110,
+
+/* block 193 */
+110,110,110, 19, 19,110,110,110,110,110,110,110, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,110,110,110,110, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 194 */
+564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,
+564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,
+564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,
+564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,564,
+564,564,735,735,735,564,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 195 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 196 */
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,438,438,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,439,439,
+439,439,439,439,439,115,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+
+/* block 197 */
+438,438,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,438,115,438,438,
+115,115,438,115,115,438,438,115,115,438,438,438,438,115,438,438,
+438,438,438,438,438,438,439,439,439,439,115,439,115,439,439,439,
+439,439,439,439,115,439,439,439,439,439,439,439,439,439,439,439,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+
+/* block 198 */
+439,439,439,439,438,438,115,438,438,438,438,115,115,438,438,438,
+438,438,438,438,438,115,438,438,438,438,438,438,438,115,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,438,438,115,438,438,438,438,115,
+438,438,438,438,438,115,438,115,115,115,438,438,438,438,438,438,
+438,115,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+
+/* block 199 */
+438,438,438,438,438,438,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,438,438,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+
+/* block 200 */
+439,439,439,439,439,439,439,439,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+438,438,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+
+/* block 201 */
+438,438,438,438,438,438,438,438,438,438,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,115,115,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+438, 8,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439, 8,439,439,439,439,
+439,439,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,438, 8,439,439,439,439,
+
+/* block 202 */
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439, 8,439,439,439,439,439,439,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438, 8,439,439,439,439,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439, 8,
+439,439,439,439,439,439,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,438, 8,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+
+/* block 203 */
+439,439,439,439,439,439,439,439,439, 8,439,439,439,439,439,439,
+438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,
+438,438,438,438,438,438,438,438,438, 8,439,439,439,439,439,439,
+439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,
+439,439,439, 8,439,439,439,439,439,439,438,439,115,115, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
+
+/* block 204 */
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
+736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,736,
+
+/* block 205 */
+737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,
+737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,
+737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,
+737,737,737,737,737,737,737,736,736,736,736,737,737,737,737,737,
+737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,
+737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,
+737,737,737,737,737,737,737,737,737,737,737,737,737,736,736,736,
+736,736,736,736,736,737,736,736,736,736,736,736,736,736,736,736,
+
+/* block 206 */
+736,736,736,736,737,736,736,738,738,738,738,738,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,737,737,737,737,737,
+115,737,737,737,737,737,737,737,737,737,737,737,737,737,737,737,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 207 */
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+
+/* block 208 */
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,739,
+739,739,739,739,739,115,115,740,740,740,740,740,740,740,740,740,
+741,741,741,741,741,741,741,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 209 */
+200,200,200,200,115,200,200,200,200,200,200,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,
+115,200,200,115,200,115,115,200,115,200,200,200,200,200,200,200,
+200,200,200,115,200,200,200,200,115,200,115,200,115,115,115,115,
+115,115,200,115,115,115,115,200,115,200,115,200,115,200,200,200,
+115,200,200,115,200,115,115,200,115,200,115,200,115,200,115,200,
+115,200,200,115,200,115,115,200,200,200,200,115,200,200,200,200,
+200,200,200,115,200,200,200,200,115,200,200,200,200,115,200,115,
+
+/* block 210 */
+200,200,200,200,200,200,200,200,200,200,115,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,115,115,115,115,
+115,200,200,200,115,200,200,200,200,200,115,200,200,200,200,200,
+200,200,200,200,200,200,200,200,200,200,200,200,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+195,195,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 211 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 212 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,
+115, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+115, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+115, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,
+
+/* block 213 */
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 214 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,742,742,742,742,742,742,742,742,742,742,
+742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,742,
+
+/* block 215 */
+743, 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,
+ 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 216 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 14, 14, 14, 14, 14,
+
+/* block 217 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115, 19, 19, 19, 19, 19,
+
+/* block 218 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,115, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 219 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,
+ 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 220 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 221 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 222 */
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+
+/* block 223 */
+ 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 224 */
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19, 19, 19, 19, 19, 19, 19, 19, 19,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 225 */
+ 19, 19, 19, 19, 19,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+ 19,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 226 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 227 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,115,115,115,115,115,115,115,115,115,115,115,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+
+/* block 228 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,115,115,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+
+/* block 229 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 230 */
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,485,
+485,485,485,485,485,485,485,485,485,485,485,485,485,485,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,115,
+
+/* block 231 */
+437, 22,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+
+/* block 232 */
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+
+/* block 233 */
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+
+/* block 234 */
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,
+437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,
+
+/* block 235 */
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,557,
+557,557,557,557,557,557,557,557,557,557,557,557,557,557,115,115,
+
+};
+
+#if UCD_BLOCK_SIZE != 128
+#error Please correct UCD_BLOCK_SIZE in pcre2_internal.h
+#endif
+#endif /* SUPPORT_UNICODE */
+
+#endif /* PCRE2_PCRE2TEST */
diff --git a/thirdparty/pcre2/src/pcre2_ucp.h b/thirdparty/pcre2/src/pcre2_ucp.h
new file mode 100644
index 0000000000..02e5012c29
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_ucp.h
@@ -0,0 +1,268 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+#ifndef PCRE2_UCP_H_IDEMPOTENT_GUARD
+#define PCRE2_UCP_H_IDEMPOTENT_GUARD
+
+/* This file contains definitions of the property values that are returned by
+the UCD access macros. New values that are added for new releases of Unicode
+should always be at the end of each enum, for backwards compatibility.
+
+IMPORTANT: Note also that the specific numeric values of the enums have to be
+the same as the values that are generated by the maint/MultiStage2.py script,
+where the equivalent property descriptive names are listed in vectors.
+
+ALSO: The specific values of the first two enums are assumed for the table
+called catposstab in pcre2_compile.c. */
+
+/* These are the general character categories. */
+
+enum {
+ ucp_C, /* Other */
+ ucp_L, /* Letter */
+ ucp_M, /* Mark */
+ ucp_N, /* Number */
+ ucp_P, /* Punctuation */
+ ucp_S, /* Symbol */
+ ucp_Z /* Separator */
+};
+
+/* These are the particular character categories. */
+
+enum {
+ ucp_Cc, /* Control */
+ ucp_Cf, /* Format */
+ ucp_Cn, /* Unassigned */
+ ucp_Co, /* Private use */
+ ucp_Cs, /* Surrogate */
+ ucp_Ll, /* Lower case letter */
+ ucp_Lm, /* Modifier letter */
+ ucp_Lo, /* Other letter */
+ ucp_Lt, /* Title case letter */
+ ucp_Lu, /* Upper case letter */
+ ucp_Mc, /* Spacing mark */
+ ucp_Me, /* Enclosing mark */
+ ucp_Mn, /* Non-spacing mark */
+ ucp_Nd, /* Decimal number */
+ ucp_Nl, /* Letter number */
+ ucp_No, /* Other number */
+ ucp_Pc, /* Connector punctuation */
+ ucp_Pd, /* Dash punctuation */
+ ucp_Pe, /* Close punctuation */
+ ucp_Pf, /* Final punctuation */
+ ucp_Pi, /* Initial punctuation */
+ ucp_Po, /* Other punctuation */
+ ucp_Ps, /* Open punctuation */
+ ucp_Sc, /* Currency symbol */
+ ucp_Sk, /* Modifier symbol */
+ ucp_Sm, /* Mathematical symbol */
+ ucp_So, /* Other symbol */
+ ucp_Zl, /* Line separator */
+ ucp_Zp, /* Paragraph separator */
+ ucp_Zs /* Space separator */
+};
+
+/* These are grapheme break properties. Note that the code for processing them
+assumes that the values are less than 16. If more values are added that take
+the number to 16 or more, the code will have to be rewritten. */
+
+enum {
+ ucp_gbCR, /* 0 */
+ ucp_gbLF, /* 1 */
+ ucp_gbControl, /* 2 */
+ ucp_gbExtend, /* 3 */
+ ucp_gbPrepend, /* 4 */
+ ucp_gbSpacingMark, /* 5 */
+ ucp_gbL, /* 6 Hangul syllable type L */
+ ucp_gbV, /* 7 Hangul syllable type V */
+ ucp_gbT, /* 8 Hangul syllable type T */
+ ucp_gbLV, /* 9 Hangul syllable type LV */
+ ucp_gbLVT, /* 10 Hangul syllable type LVT */
+ ucp_gbRegionalIndicator, /* 11 */
+ ucp_gbOther /* 12 */
+};
+
+/* These are the script identifications. */
+
+enum {
+ ucp_Arabic,
+ ucp_Armenian,
+ ucp_Bengali,
+ ucp_Bopomofo,
+ ucp_Braille,
+ ucp_Buginese,
+ ucp_Buhid,
+ ucp_Canadian_Aboriginal,
+ ucp_Cherokee,
+ ucp_Common,
+ ucp_Coptic,
+ ucp_Cypriot,
+ ucp_Cyrillic,
+ ucp_Deseret,
+ ucp_Devanagari,
+ ucp_Ethiopic,
+ ucp_Georgian,
+ ucp_Glagolitic,
+ ucp_Gothic,
+ ucp_Greek,
+ ucp_Gujarati,
+ ucp_Gurmukhi,
+ ucp_Han,
+ ucp_Hangul,
+ ucp_Hanunoo,
+ ucp_Hebrew,
+ ucp_Hiragana,
+ ucp_Inherited,
+ ucp_Kannada,
+ ucp_Katakana,
+ ucp_Kharoshthi,
+ ucp_Khmer,
+ ucp_Lao,
+ ucp_Latin,
+ ucp_Limbu,
+ ucp_Linear_B,
+ ucp_Malayalam,
+ ucp_Mongolian,
+ ucp_Myanmar,
+ ucp_New_Tai_Lue,
+ ucp_Ogham,
+ ucp_Old_Italic,
+ ucp_Old_Persian,
+ ucp_Oriya,
+ ucp_Osmanya,
+ ucp_Runic,
+ ucp_Shavian,
+ ucp_Sinhala,
+ ucp_Syloti_Nagri,
+ ucp_Syriac,
+ ucp_Tagalog,
+ ucp_Tagbanwa,
+ ucp_Tai_Le,
+ ucp_Tamil,
+ ucp_Telugu,
+ ucp_Thaana,
+ ucp_Thai,
+ ucp_Tibetan,
+ ucp_Tifinagh,
+ ucp_Ugaritic,
+ ucp_Yi,
+ /* New for Unicode 5.0: */
+ ucp_Balinese,
+ ucp_Cuneiform,
+ ucp_Nko,
+ ucp_Phags_Pa,
+ ucp_Phoenician,
+ /* New for Unicode 5.1: */
+ ucp_Carian,
+ ucp_Cham,
+ ucp_Kayah_Li,
+ ucp_Lepcha,
+ ucp_Lycian,
+ ucp_Lydian,
+ ucp_Ol_Chiki,
+ ucp_Rejang,
+ ucp_Saurashtra,
+ ucp_Sundanese,
+ ucp_Vai,
+ /* New for Unicode 5.2: */
+ ucp_Avestan,
+ ucp_Bamum,
+ ucp_Egyptian_Hieroglyphs,
+ ucp_Imperial_Aramaic,
+ ucp_Inscriptional_Pahlavi,
+ ucp_Inscriptional_Parthian,
+ ucp_Javanese,
+ ucp_Kaithi,
+ ucp_Lisu,
+ ucp_Meetei_Mayek,
+ ucp_Old_South_Arabian,
+ ucp_Old_Turkic,
+ ucp_Samaritan,
+ ucp_Tai_Tham,
+ ucp_Tai_Viet,
+ /* New for Unicode 6.0.0: */
+ ucp_Batak,
+ ucp_Brahmi,
+ ucp_Mandaic,
+ /* New for Unicode 6.1.0: */
+ ucp_Chakma,
+ ucp_Meroitic_Cursive,
+ ucp_Meroitic_Hieroglyphs,
+ ucp_Miao,
+ ucp_Sharada,
+ ucp_Sora_Sompeng,
+ ucp_Takri,
+ /* New for Unicode 7.0.0: */
+ ucp_Bassa_Vah,
+ ucp_Caucasian_Albanian,
+ ucp_Duployan,
+ ucp_Elbasan,
+ ucp_Grantha,
+ ucp_Khojki,
+ ucp_Khudawadi,
+ ucp_Linear_A,
+ ucp_Mahajani,
+ ucp_Manichaean,
+ ucp_Mende_Kikakui,
+ ucp_Modi,
+ ucp_Mro,
+ ucp_Nabataean,
+ ucp_Old_North_Arabian,
+ ucp_Old_Permic,
+ ucp_Pahawh_Hmong,
+ ucp_Palmyrene,
+ ucp_Psalter_Pahlavi,
+ ucp_Pau_Cin_Hau,
+ ucp_Siddham,
+ ucp_Tirhuta,
+ ucp_Warang_Citi,
+ /* New for Unicode 8.0.0: */
+ ucp_Ahom,
+ ucp_Anatolian_Hieroglyphs,
+ ucp_Hatran,
+ ucp_Multani,
+ ucp_Old_Hungarian,
+ ucp_SignWriting
+};
+
+#endif /* PCRE2_UCP_H_IDEMPOTENT_GUARD */
+
+/* End of pcre2_ucp.h */
diff --git a/thirdparty/pcre2/src/pcre2_valid_utf.c b/thirdparty/pcre2/src/pcre2_valid_utf.c
new file mode 100644
index 0000000000..3e18f1200b
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_valid_utf.c
@@ -0,0 +1,398 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+
+/* This module contains an internal function for validating UTF character
+strings. This file is also #included by the pcre2test program, which uses
+macros to change names from _pcre2_xxx to xxxx, thereby avoiding name clashes
+with the library. In this case, PCRE2_PCRE2TEST is defined. */
+
+#ifndef PCRE2_PCRE2TEST /* We're compiling the library */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include "pcre2_internal.h"
+#endif /* PCRE2_PCRE2TEST */
+
+
+#ifndef SUPPORT_UNICODE
+/*************************************************
+* Dummy function when Unicode is not supported *
+*************************************************/
+
+/* This function should never be called when Unicode is not supported. */
+
+int
+PRIV(valid_utf)(PCRE2_SPTR string, PCRE2_SIZE length, PCRE2_SIZE *erroroffset)
+{
+(void)string;
+(void)length;
+(void)erroroffset;
+return 0;
+}
+#else /* UTF is supported */
+
+
+
+/*************************************************
+* Validate a UTF string *
+*************************************************/
+
+/* This function is called (optionally) at the start of compile or match, to
+check that a supposed UTF string is actually valid. The early check means
+that subsequent code can assume it is dealing with a valid string. The check
+can be turned off for maximum performance, but the consequences of supplying an
+invalid string are then undefined.
+
+Arguments:
+ string points to the string
+ length length of string
+ errp pointer to an error position offset variable
+
+Returns: == 0 if the string is a valid UTF string
+ != 0 otherwise, setting the offset of the bad character
+*/
+
+int
+PRIV(valid_utf)(PCRE2_SPTR string, PCRE2_SIZE length, PCRE2_SIZE *erroroffset)
+{
+PCRE2_SPTR p;
+uint32_t c;
+
+/* ----------------- Check a UTF-8 string ----------------- */
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+
+/* Originally, this function checked according to RFC 2279, allowing for values
+in the range 0 to 0x7fffffff, up to 6 bytes long, but ensuring that they were
+in the canonical format. Once somebody had pointed out RFC 3629 to me (it
+obsoletes 2279), additional restrictions were applied. The values are now
+limited to be between 0 and 0x0010ffff, no more than 4 bytes long, and the
+subrange 0xd000 to 0xdfff is excluded. However, the format of 5-byte and 6-byte
+characters is still checked. Error returns are as follows:
+
+PCRE2_ERROR_UTF8_ERR1 Missing 1 byte at the end of the string
+PCRE2_ERROR_UTF8_ERR2 Missing 2 bytes at the end of the string
+PCRE2_ERROR_UTF8_ERR3 Missing 3 bytes at the end of the string
+PCRE2_ERROR_UTF8_ERR4 Missing 4 bytes at the end of the string
+PCRE2_ERROR_UTF8_ERR5 Missing 5 bytes at the end of the string
+PCRE2_ERROR_UTF8_ERR6 2nd-byte's two top bits are not 0x80
+PCRE2_ERROR_UTF8_ERR7 3rd-byte's two top bits are not 0x80
+PCRE2_ERROR_UTF8_ERR8 4th-byte's two top bits are not 0x80
+PCRE2_ERROR_UTF8_ERR9 5th-byte's two top bits are not 0x80
+PCRE2_ERROR_UTF8_ERR10 6th-byte's two top bits are not 0x80
+PCRE2_ERROR_UTF8_ERR11 5-byte character is not permitted by RFC 3629
+PCRE2_ERROR_UTF8_ERR12 6-byte character is not permitted by RFC 3629
+PCRE2_ERROR_UTF8_ERR13 4-byte character with value > 0x10ffff is not permitted
+PCRE2_ERROR_UTF8_ERR14 3-byte character with value 0xd800-0xdfff is not permitted
+PCRE2_ERROR_UTF8_ERR15 Overlong 2-byte sequence
+PCRE2_ERROR_UTF8_ERR16 Overlong 3-byte sequence
+PCRE2_ERROR_UTF8_ERR17 Overlong 4-byte sequence
+PCRE2_ERROR_UTF8_ERR18 Overlong 5-byte sequence (won't ever occur)
+PCRE2_ERROR_UTF8_ERR19 Overlong 6-byte sequence (won't ever occur)
+PCRE2_ERROR_UTF8_ERR20 Isolated 0x80 byte (not within UTF-8 character)
+PCRE2_ERROR_UTF8_ERR21 Byte with the illegal value 0xfe or 0xff
+*/
+
+for (p = string; length > 0; p++)
+ {
+ uint32_t ab, d;
+
+ c = *p;
+ length--;
+
+ if (c < 128) continue; /* ASCII character */
+
+ if (c < 0xc0) /* Isolated 10xx xxxx byte */
+ {
+ *erroroffset = (int)(p - string);
+ return PCRE2_ERROR_UTF8_ERR20;
+ }
+
+ if (c >= 0xfe) /* Invalid 0xfe or 0xff bytes */
+ {
+ *erroroffset = (int)(p - string);
+ return PCRE2_ERROR_UTF8_ERR21;
+ }
+
+ ab = PRIV(utf8_table4)[c & 0x3f]; /* Number of additional bytes (1-5) */
+ if (length < ab) /* Missing bytes */
+ {
+ *erroroffset = (int)(p - string);
+ switch(ab - length)
+ {
+ case 1: return PCRE2_ERROR_UTF8_ERR1;
+ case 2: return PCRE2_ERROR_UTF8_ERR2;
+ case 3: return PCRE2_ERROR_UTF8_ERR3;
+ case 4: return PCRE2_ERROR_UTF8_ERR4;
+ case 5: return PCRE2_ERROR_UTF8_ERR5;
+ }
+ }
+ length -= ab; /* Length remaining */
+
+ /* Check top bits in the second byte */
+
+ if (((d = *(++p)) & 0xc0) != 0x80)
+ {
+ *erroroffset = (int)(p - string) - 1;
+ return PCRE2_ERROR_UTF8_ERR6;
+ }
+
+ /* For each length, check that the remaining bytes start with the 0x80 bit
+ set and not the 0x40 bit. Then check for an overlong sequence, and for the
+ excluded range 0xd800 to 0xdfff. */
+
+ switch (ab)
+ {
+ /* 2-byte character. No further bytes to check for 0x80. Check first byte
+ for for xx00 000x (overlong sequence). */
+
+ case 1: if ((c & 0x3e) == 0)
+ {
+ *erroroffset = (int)(p - string) - 1;
+ return PCRE2_ERROR_UTF8_ERR15;
+ }
+ break;
+
+ /* 3-byte character. Check third byte for 0x80. Then check first 2 bytes
+ for 1110 0000, xx0x xxxx (overlong sequence) or
+ 1110 1101, 1010 xxxx (0xd800 - 0xdfff) */
+
+ case 2:
+ if ((*(++p) & 0xc0) != 0x80) /* Third byte */
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE2_ERROR_UTF8_ERR7;
+ }
+ if (c == 0xe0 && (d & 0x20) == 0)
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE2_ERROR_UTF8_ERR16;
+ }
+ if (c == 0xed && d >= 0xa0)
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE2_ERROR_UTF8_ERR14;
+ }
+ break;
+
+ /* 4-byte character. Check 3rd and 4th bytes for 0x80. Then check first 2
+ bytes for for 1111 0000, xx00 xxxx (overlong sequence), then check for a
+ character greater than 0x0010ffff (f4 8f bf bf) */
+
+ case 3:
+ if ((*(++p) & 0xc0) != 0x80) /* Third byte */
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE2_ERROR_UTF8_ERR7;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Fourth byte */
+ {
+ *erroroffset = (int)(p - string) - 3;
+ return PCRE2_ERROR_UTF8_ERR8;
+ }
+ if (c == 0xf0 && (d & 0x30) == 0)
+ {
+ *erroroffset = (int)(p - string) - 3;
+ return PCRE2_ERROR_UTF8_ERR17;
+ }
+ if (c > 0xf4 || (c == 0xf4 && d > 0x8f))
+ {
+ *erroroffset = (int)(p - string) - 3;
+ return PCRE2_ERROR_UTF8_ERR13;
+ }
+ break;
+
+ /* 5-byte and 6-byte characters are not allowed by RFC 3629, and will be
+ rejected by the length test below. However, we do the appropriate tests
+ here so that overlong sequences get diagnosed, and also in case there is
+ ever an option for handling these larger code points. */
+
+ /* 5-byte character. Check 3rd, 4th, and 5th bytes for 0x80. Then check for
+ 1111 1000, xx00 0xxx */
+
+ case 4:
+ if ((*(++p) & 0xc0) != 0x80) /* Third byte */
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE2_ERROR_UTF8_ERR7;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Fourth byte */
+ {
+ *erroroffset = (int)(p - string) - 3;
+ return PCRE2_ERROR_UTF8_ERR8;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Fifth byte */
+ {
+ *erroroffset = (int)(p - string) - 4;
+ return PCRE2_ERROR_UTF8_ERR9;
+ }
+ if (c == 0xf8 && (d & 0x38) == 0)
+ {
+ *erroroffset = (int)(p - string) - 4;
+ return PCRE2_ERROR_UTF8_ERR18;
+ }
+ break;
+
+ /* 6-byte character. Check 3rd-6th bytes for 0x80. Then check for
+ 1111 1100, xx00 00xx. */
+
+ case 5:
+ if ((*(++p) & 0xc0) != 0x80) /* Third byte */
+ {
+ *erroroffset = (int)(p - string) - 2;
+ return PCRE2_ERROR_UTF8_ERR7;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Fourth byte */
+ {
+ *erroroffset = (int)(p - string) - 3;
+ return PCRE2_ERROR_UTF8_ERR8;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Fifth byte */
+ {
+ *erroroffset = (int)(p - string) - 4;
+ return PCRE2_ERROR_UTF8_ERR9;
+ }
+ if ((*(++p) & 0xc0) != 0x80) /* Sixth byte */
+ {
+ *erroroffset = (int)(p - string) - 5;
+ return PCRE2_ERROR_UTF8_ERR10;
+ }
+ if (c == 0xfc && (d & 0x3c) == 0)
+ {
+ *erroroffset = (int)(p - string) - 5;
+ return PCRE2_ERROR_UTF8_ERR19;
+ }
+ break;
+ }
+
+ /* Character is valid under RFC 2279, but 4-byte and 5-byte characters are
+ excluded by RFC 3629. The pointer p is currently at the last byte of the
+ character. */
+
+ if (ab > 3)
+ {
+ *erroroffset = (int)(p - string) - ab;
+ return (ab == 4)? PCRE2_ERROR_UTF8_ERR11 : PCRE2_ERROR_UTF8_ERR12;
+ }
+ }
+return 0;
+
+
+/* ----------------- Check a UTF-16 string ----------------- */
+
+#elif PCRE2_CODE_UNIT_WIDTH == 16
+
+/* There's not so much work, nor so many errors, for UTF-16.
+PCRE2_ERROR_UTF16_ERR1 Missing low surrogate at the end of the string
+PCRE2_ERROR_UTF16_ERR2 Invalid low surrogate
+PCRE2_ERROR_UTF16_ERR3 Isolated low surrogate
+*/
+
+for (p = string; length > 0; p++)
+ {
+ c = *p;
+ length--;
+
+ if ((c & 0xf800) != 0xd800)
+ {
+ /* Normal UTF-16 code point. Neither high nor low surrogate. */
+ }
+ else if ((c & 0x0400) == 0)
+ {
+ /* High surrogate. Must be a followed by a low surrogate. */
+ if (length == 0)
+ {
+ *erroroffset = p - string;
+ return PCRE2_ERROR_UTF16_ERR1;
+ }
+ p++;
+ length--;
+ if ((*p & 0xfc00) != 0xdc00)
+ {
+ *erroroffset = p - string;
+ return PCRE2_ERROR_UTF16_ERR2;
+ }
+ }
+ else
+ {
+ /* Isolated low surrogate. Always an error. */
+ *erroroffset = p - string;
+ return PCRE2_ERROR_UTF16_ERR3;
+ }
+ }
+return 0;
+
+
+
+/* ----------------- Check a UTF-32 string ----------------- */
+
+#else
+
+/* There is very little to do for a UTF-32 string.
+PCRE2_ERROR_UTF32_ERR1 Surrogate character
+PCRE2_ERROR_UTF32_ERR2 Character > 0x10ffff
+*/
+
+for (p = string; length > 0; length--, p++)
+ {
+ c = *p;
+ if ((c & 0xfffff800u) != 0xd800u)
+ {
+ /* Normal UTF-32 code point. Neither high nor low surrogate. */
+ if (c > 0x10ffffu)
+ {
+ *erroroffset = p - string;
+ return PCRE2_ERROR_UTF32_ERR2;
+ }
+ }
+ else
+ {
+ /* A surrogate */
+ *erroroffset = p - string;
+ return PCRE2_ERROR_UTF32_ERR1;
+ }
+ }
+return 0;
+#endif /* CODE_UNIT_WIDTH */
+}
+#endif /* SUPPORT_UNICODE */
+
+/* End of pcre2_valid_utf.c */
diff --git a/thirdparty/pcre2/src/pcre2_xclass.c b/thirdparty/pcre2/src/pcre2_xclass.c
new file mode 100644
index 0000000000..407d3f5b87
--- /dev/null
+++ b/thirdparty/pcre2/src/pcre2_xclass.c
@@ -0,0 +1,271 @@
+/*************************************************
+* Perl-Compatible Regular Expressions *
+*************************************************/
+
+/* PCRE is a library of functions to support regular expressions whose syntax
+and semantics are as close as possible to those of the Perl 5 language.
+
+ Written by Philip Hazel
+ Original API code Copyright (c) 1997-2012 University of Cambridge
+ New API code Copyright (c) 2016 University of Cambridge
+
+-----------------------------------------------------------------------------
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ * Neither the name of the University of Cambridge nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------------
+*/
+
+/* This module contains an internal function that is used to match an extended
+class. It is used by pcre2_auto_possessify() and by both pcre2_match() and
+pcre2_def_match(). */
+
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+
+#include "pcre2_internal.h"
+
+/*************************************************
+* Match character against an XCLASS *
+*************************************************/
+
+/* This function is called to match a character against an extended class that
+might contain codepoints above 255 and/or Unicode properties.
+
+Arguments:
+ c the character
+ data points to the flag code unit of the XCLASS data
+ utf TRUE if in UTF mode
+
+Returns: TRUE if character matches, else FALSE
+*/
+
+BOOL
+PRIV(xclass)(uint32_t c, PCRE2_SPTR data, BOOL utf)
+{
+PCRE2_UCHAR t;
+BOOL negated = (*data & XCL_NOT) != 0;
+
+#if PCRE2_CODE_UNIT_WIDTH == 8
+/* In 8 bit mode, this must always be TRUE. Help the compiler to know that. */
+utf = TRUE;
+#endif
+
+/* Code points < 256 are matched against a bitmap, if one is present. If not,
+we still carry on, because there may be ranges that start below 256 in the
+additional data. */
+
+if (c < 256)
+ {
+ if ((*data & XCL_HASPROP) == 0)
+ {
+ if ((*data & XCL_MAP) == 0) return negated;
+ return (((uint8_t *)(data + 1))[c/8] & (1 << (c&7))) != 0;
+ }
+ if ((*data & XCL_MAP) != 0 &&
+ (((uint8_t *)(data + 1))[c/8] & (1 << (c&7))) != 0)
+ return !negated; /* char found */
+ }
+
+/* First skip the bit map if present. Then match against the list of Unicode
+properties or large chars or ranges that end with a large char. We won't ever
+encounter XCL_PROP or XCL_NOTPROP when UTF support is not compiled. */
+
+if ((*data++ & XCL_MAP) != 0) data += 32 / sizeof(PCRE2_UCHAR);
+
+while ((t = *data++) != XCL_END)
+ {
+ uint32_t x, y;
+ if (t == XCL_SINGLE)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ GETCHARINC(x, data); /* macro generates multiple statements */
+ }
+ else
+#endif
+ x = *data++;
+ if (c == x) return !negated;
+ }
+ else if (t == XCL_RANGE)
+ {
+#ifdef SUPPORT_UNICODE
+ if (utf)
+ {
+ GETCHARINC(x, data); /* macro generates multiple statements */
+ GETCHARINC(y, data); /* macro generates multiple statements */
+ }
+ else
+#endif
+ {
+ x = *data++;
+ y = *data++;
+ }
+ if (c >= x && c <= y) return !negated;
+ }
+
+#ifdef SUPPORT_UNICODE
+ else /* XCL_PROP & XCL_NOTPROP */
+ {
+ const ucd_record *prop = GET_UCD(c);
+ BOOL isprop = t == XCL_PROP;
+
+ switch(*data)
+ {
+ case PT_ANY:
+ if (isprop) return !negated;
+ break;
+
+ case PT_LAMP:
+ if ((prop->chartype == ucp_Lu || prop->chartype == ucp_Ll ||
+ prop->chartype == ucp_Lt) == isprop) return !negated;
+ break;
+
+ case PT_GC:
+ if ((data[1] == PRIV(ucp_gentype)[prop->chartype]) == isprop)
+ return !negated;
+ break;
+
+ case PT_PC:
+ if ((data[1] == prop->chartype) == isprop) return !negated;
+ break;
+
+ case PT_SC:
+ if ((data[1] == prop->script) == isprop) return !negated;
+ break;
+
+ case PT_ALNUM:
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N) == isprop)
+ return !negated;
+ break;
+
+ /* Perl space used to exclude VT, but from Perl 5.18 it is included,
+ which means that Perl space and POSIX space are now identical. PCRE
+ was changed at release 8.34. */
+
+ case PT_SPACE: /* Perl space */
+ case PT_PXSPACE: /* POSIX space */
+ switch(c)
+ {
+ HSPACE_CASES:
+ VSPACE_CASES:
+ if (isprop) return !negated;
+ break;
+
+ default:
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_Z) == isprop)
+ return !negated;
+ break;
+ }
+ break;
+
+ case PT_WORD:
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_L ||
+ PRIV(ucp_gentype)[prop->chartype] == ucp_N || c == CHAR_UNDERSCORE)
+ == isprop)
+ return !negated;
+ break;
+
+ case PT_UCNC:
+ if (c < 0xa0)
+ {
+ if ((c == CHAR_DOLLAR_SIGN || c == CHAR_COMMERCIAL_AT ||
+ c == CHAR_GRAVE_ACCENT) == isprop)
+ return !negated;
+ }
+ else
+ {
+ if ((c < 0xd800 || c > 0xdfff) == isprop)
+ return !negated;
+ }
+ break;
+
+ /* The following three properties can occur only in an XCLASS, as there
+ is no \p or \P coding for them. */
+
+ /* Graphic character. Implement this as not Z (space or separator) and
+ not C (other), except for Cf (format) with a few exceptions. This seems
+ to be what Perl does. The exceptional characters are:
+
+ U+061C Arabic Letter Mark
+ U+180E Mongolian Vowel Separator
+ U+2066 - U+2069 Various "isolate"s
+ */
+
+ case PT_PXGRAPH:
+ if ((PRIV(ucp_gentype)[prop->chartype] != ucp_Z &&
+ (PRIV(ucp_gentype)[prop->chartype] != ucp_C ||
+ (prop->chartype == ucp_Cf &&
+ c != 0x061c && c != 0x180e && (c < 0x2066 || c > 0x2069))
+ )) == isprop)
+ return !negated;
+ break;
+
+ /* Printable character: same as graphic, with the addition of Zs, i.e.
+ not Zl and not Zp, and U+180E. */
+
+ case PT_PXPRINT:
+ if ((prop->chartype != ucp_Zl &&
+ prop->chartype != ucp_Zp &&
+ (PRIV(ucp_gentype)[prop->chartype] != ucp_C ||
+ (prop->chartype == ucp_Cf &&
+ c != 0x061c && (c < 0x2066 || c > 0x2069))
+ )) == isprop)
+ return !negated;
+ break;
+
+ /* Punctuation: all Unicode punctuation, plus ASCII characters that
+ Unicode treats as symbols rather than punctuation, for Perl
+ compatibility (these are $+<=>^`|~). */
+
+ case PT_PXPUNCT:
+ if ((PRIV(ucp_gentype)[prop->chartype] == ucp_P ||
+ (c < 128 && PRIV(ucp_gentype)[prop->chartype] == ucp_S)) == isprop)
+ return !negated;
+ break;
+
+ /* This should never occur, but compilers may mutter if there is no
+ default. */
+
+ default:
+ return FALSE;
+ }
+
+ data += 2;
+ }
+#else
+ (void)utf; /* Avoid compiler warning */
+#endif /* SUPPORT_UNICODE */
+ }
+
+return negated; /* char did not match */
+}
+
+/* End of pcre2_xclass.c */
diff --git a/thirdparty/pcre2/src/sljit/sljitConfig.h b/thirdparty/pcre2/src/sljit/sljitConfig.h
new file mode 100644
index 0000000000..2e70224da8
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitConfig.h
@@ -0,0 +1,145 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _SLJIT_CONFIG_H_
+#define _SLJIT_CONFIG_H_
+
+/* --------------------------------------------------------------------- */
+/* Custom defines */
+/* --------------------------------------------------------------------- */
+
+/* Put your custom defines here. This empty section will never change
+ which helps maintaining patches (with diff / patch utilities). */
+
+/* --------------------------------------------------------------------- */
+/* Architecture */
+/* --------------------------------------------------------------------- */
+
+/* Architecture selection. */
+/* #define SLJIT_CONFIG_X86_32 1 */
+/* #define SLJIT_CONFIG_X86_64 1 */
+/* #define SLJIT_CONFIG_ARM_V5 1 */
+/* #define SLJIT_CONFIG_ARM_V7 1 */
+/* #define SLJIT_CONFIG_ARM_THUMB2 1 */
+/* #define SLJIT_CONFIG_ARM_64 1 */
+/* #define SLJIT_CONFIG_PPC_32 1 */
+/* #define SLJIT_CONFIG_PPC_64 1 */
+/* #define SLJIT_CONFIG_MIPS_32 1 */
+/* #define SLJIT_CONFIG_MIPS_64 1 */
+/* #define SLJIT_CONFIG_SPARC_32 1 */
+/* #define SLJIT_CONFIG_TILEGX 1 */
+
+/* #define SLJIT_CONFIG_AUTO 1 */
+/* #define SLJIT_CONFIG_UNSUPPORTED 1 */
+
+/* --------------------------------------------------------------------- */
+/* Utilities */
+/* --------------------------------------------------------------------- */
+
+/* Useful for thread-safe compiling of global functions. */
+#ifndef SLJIT_UTIL_GLOBAL_LOCK
+/* Enabled by default */
+#define SLJIT_UTIL_GLOBAL_LOCK 1
+#endif
+
+/* Implements a stack like data structure (by using mmap / VirtualAlloc). */
+#ifndef SLJIT_UTIL_STACK
+/* Enabled by default */
+#define SLJIT_UTIL_STACK 1
+#endif
+
+/* Single threaded application. Does not require any locks. */
+#ifndef SLJIT_SINGLE_THREADED
+/* Disabled by default. */
+#define SLJIT_SINGLE_THREADED 0
+#endif
+
+/* --------------------------------------------------------------------- */
+/* Configuration */
+/* --------------------------------------------------------------------- */
+
+/* If SLJIT_STD_MACROS_DEFINED is not defined, the application should
+ define SLJIT_MALLOC, SLJIT_FREE, SLJIT_MEMCPY, and NULL. */
+#ifndef SLJIT_STD_MACROS_DEFINED
+/* Disabled by default. */
+#define SLJIT_STD_MACROS_DEFINED 0
+#endif
+
+/* Executable code allocation:
+ If SLJIT_EXECUTABLE_ALLOCATOR is not defined, the application should
+ define SLJIT_MALLOC_EXEC, SLJIT_FREE_EXEC, and SLJIT_EXEC_OFFSET. */
+#ifndef SLJIT_EXECUTABLE_ALLOCATOR
+/* Enabled by default. */
+#define SLJIT_EXECUTABLE_ALLOCATOR 1
+
+/* When SLJIT_PROT_EXECUTABLE_ALLOCATOR is enabled SLJIT uses
+ an allocator which does not set writable and executable
+ permission flags at the same time. The trade-of is increased
+ memory consumption and disabled dynamic code modifications. */
+#ifndef SLJIT_PROT_EXECUTABLE_ALLOCATOR
+/* Disabled by default. */
+#define SLJIT_PROT_EXECUTABLE_ALLOCATOR 0
+#endif
+
+#endif
+
+/* Force cdecl calling convention even if a better calling
+ convention (e.g. fastcall) is supported by the C compiler.
+ If this option is enabled, C functions without
+ SLJIT_CALL can also be called from JIT code. */
+#ifndef SLJIT_USE_CDECL_CALLING_CONVENTION
+/* Disabled by default */
+#define SLJIT_USE_CDECL_CALLING_CONVENTION 0
+#endif
+
+/* Return with error when an invalid argument is passed. */
+#ifndef SLJIT_ARGUMENT_CHECKS
+/* Disabled by default */
+#define SLJIT_ARGUMENT_CHECKS 0
+#endif
+
+/* Debug checks (assertions, etc.). */
+#ifndef SLJIT_DEBUG
+/* Enabled by default */
+#define SLJIT_DEBUG 1
+#endif
+
+/* Verbose operations. */
+#ifndef SLJIT_VERBOSE
+/* Enabled by default */
+#define SLJIT_VERBOSE 1
+#endif
+
+/*
+ SLJIT_IS_FPU_AVAILABLE
+ The availability of the FPU can be controlled by SLJIT_IS_FPU_AVAILABLE.
+ zero value - FPU is NOT present.
+ nonzero value - FPU is present.
+*/
+
+/* For further configurations, see the beginning of sljitConfigInternal.h */
+
+#endif
diff --git a/thirdparty/pcre2/src/sljit/sljitConfigInternal.h b/thirdparty/pcre2/src/sljit/sljitConfigInternal.h
new file mode 100644
index 0000000000..5d461017e4
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitConfigInternal.h
@@ -0,0 +1,724 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _SLJIT_CONFIG_INTERNAL_H_
+#define _SLJIT_CONFIG_INTERNAL_H_
+
+/*
+ SLJIT defines the following architecture dependent types and macros:
+
+ Types:
+ sljit_s8, sljit_u8 : signed and unsigned 8 bit integer type
+ sljit_s16, sljit_u16 : signed and unsigned 16 bit integer type
+ sljit_s32, sljit_u32 : signed and unsigned 32 bit integer type
+ sljit_sw, sljit_uw : signed and unsigned machine word, enough to store a pointer
+ sljit_p : unsgined pointer value (usually the same as sljit_uw, but
+ some 64 bit ABIs may use 32 bit pointers)
+ sljit_f32 : 32 bit single precision floating point value
+ sljit_f64 : 64 bit double precision floating point value
+
+ Macros for feature detection (boolean):
+ SLJIT_32BIT_ARCHITECTURE : 32 bit architecture
+ SLJIT_64BIT_ARCHITECTURE : 64 bit architecture
+ SLJIT_LITTLE_ENDIAN : little endian architecture
+ SLJIT_BIG_ENDIAN : big endian architecture
+ SLJIT_UNALIGNED : allows unaligned memory accesses for non-fpu operations (only!)
+ SLJIT_INDIRECT_CALL : see SLJIT_FUNC_OFFSET() for more information
+
+ Constants:
+ SLJIT_NUMBER_OF_REGISTERS : number of available registers
+ SLJIT_NUMBER_OF_SCRATCH_REGISTERS : number of available scratch registers
+ SLJIT_NUMBER_OF_SAVED_REGISTERS : number of available saved registers
+ SLJIT_NUMBER_OF_FLOAT_REGISTERS : number of available floating point registers
+ SLJIT_NUMBER_OF_SCRATCH_FLOAT_REGISTERS : number of available floating point scratch registers
+ SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS : number of available floating point saved registers
+ SLJIT_WORD_SHIFT : the shift required to apply when accessing a sljit_sw/sljit_uw array by index
+ SLJIT_F32_SHIFT : the shift required to apply when accessing
+ a single precision floating point array by index
+ SLJIT_F64_SHIFT : the shift required to apply when accessing
+ a double precision floating point array by index
+ SLJIT_LOCALS_OFFSET : local space starting offset (SLJIT_SP + SLJIT_LOCALS_OFFSET)
+ SLJIT_RETURN_ADDRESS_OFFSET : a return instruction always adds this offset to the return address
+
+ Other macros:
+ SLJIT_CALL : C calling convention define for both calling JIT form C and C callbacks for JIT
+ SLJIT_W(number) : defining 64 bit constants on 64 bit architectures (compiler independent helper)
+*/
+
+/*****************/
+/* Sanity check. */
+/*****************/
+
+#if !((defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) \
+ || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) \
+ || (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) \
+ || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) \
+ || (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) \
+ || (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64) \
+ || (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) \
+ || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) \
+ || (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) \
+ || (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64) \
+ || (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) \
+ || (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX) \
+ || (defined SLJIT_CONFIG_AUTO && SLJIT_CONFIG_AUTO) \
+ || (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED))
+#error "An architecture must be selected"
+#endif
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) \
+ + (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) \
+ + (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) \
+ + (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) \
+ + (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) \
+ + (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64) \
+ + (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) \
+ + (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) \
+ + (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX) \
+ + (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) \
+ + (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64) \
+ + (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) \
+ + (defined SLJIT_CONFIG_AUTO && SLJIT_CONFIG_AUTO) \
+ + (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED) >= 2
+#error "Multiple architectures are selected"
+#endif
+
+/********************************************************/
+/* Automatic CPU detection (requires compiler support). */
+/********************************************************/
+
+#if (defined SLJIT_CONFIG_AUTO && SLJIT_CONFIG_AUTO)
+
+#ifndef _WIN32
+
+#if defined(__i386__) || defined(__i386)
+#define SLJIT_CONFIG_X86_32 1
+#elif defined(__x86_64__)
+#define SLJIT_CONFIG_X86_64 1
+#elif defined(__arm__) || defined(__ARM__)
+#ifdef __thumb2__
+#define SLJIT_CONFIG_ARM_THUMB2 1
+#elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__)
+#define SLJIT_CONFIG_ARM_V7 1
+#else
+#define SLJIT_CONFIG_ARM_V5 1
+#endif
+#elif defined (__aarch64__)
+#define SLJIT_CONFIG_ARM_64 1
+#elif defined(__ppc64__) || defined(__powerpc64__) || defined(_ARCH_PPC64) || (defined(_POWER) && defined(__64BIT__))
+#define SLJIT_CONFIG_PPC_64 1
+#elif defined(__ppc__) || defined(__powerpc__) || defined(_ARCH_PPC) || defined(_ARCH_PWR) || defined(_ARCH_PWR2) || defined(_POWER)
+#define SLJIT_CONFIG_PPC_32 1
+#elif defined(__mips__) && !defined(_LP64)
+#define SLJIT_CONFIG_MIPS_32 1
+#elif defined(__mips64)
+#define SLJIT_CONFIG_MIPS_64 1
+#elif defined(__sparc__) || defined(__sparc)
+#define SLJIT_CONFIG_SPARC_32 1
+#elif defined(__tilegx__)
+#define SLJIT_CONFIG_TILEGX 1
+#else
+/* Unsupported architecture */
+#define SLJIT_CONFIG_UNSUPPORTED 1
+#endif
+
+#else /* !_WIN32 */
+
+#if defined(_M_X64) || defined(__x86_64__)
+#define SLJIT_CONFIG_X86_64 1
+#elif defined(_ARM_)
+#define SLJIT_CONFIG_ARM_V5 1
+#else
+#define SLJIT_CONFIG_X86_32 1
+#endif
+
+#endif /* !WIN32 */
+#endif /* SLJIT_CONFIG_AUTO */
+
+#if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
+#undef SLJIT_EXECUTABLE_ALLOCATOR
+#endif
+
+/******************************/
+/* CPU family type detection. */
+/******************************/
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) \
+ || (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
+#define SLJIT_CONFIG_ARM_32 1
+#endif
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+#define SLJIT_CONFIG_X86 1
+#elif (defined SLJIT_CONFIG_ARM_32 && SLJIT_CONFIG_ARM_32) || (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64)
+#define SLJIT_CONFIG_ARM 1
+#elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+#define SLJIT_CONFIG_PPC 1
+#elif (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) || (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
+#define SLJIT_CONFIG_MIPS 1
+#elif (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) || (defined SLJIT_CONFIG_SPARC_64 && SLJIT_CONFIG_SPARC_64)
+#define SLJIT_CONFIG_SPARC 1
+#endif
+
+/**********************************/
+/* External function definitions. */
+/**********************************/
+
+/* General macros:
+ Note: SLJIT is designed to be independent from them as possible.
+
+ In release mode (SLJIT_DEBUG is not defined) only the following
+ external functions are needed:
+*/
+
+#ifndef SLJIT_MALLOC
+#define SLJIT_MALLOC(size, allocator_data) malloc(size)
+#endif
+
+#ifndef SLJIT_FREE
+#define SLJIT_FREE(ptr, allocator_data) free(ptr)
+#endif
+
+#ifndef SLJIT_MEMCPY
+#define SLJIT_MEMCPY(dest, src, len) memcpy(dest, src, len)
+#endif
+
+#ifndef SLJIT_ZEROMEM
+#define SLJIT_ZEROMEM(dest, len) memset(dest, 0, len)
+#endif
+
+/***************************/
+/* Compiler helper macros. */
+/***************************/
+
+#if !defined(SLJIT_LIKELY) && !defined(SLJIT_UNLIKELY)
+
+#if defined(__GNUC__) && (__GNUC__ >= 3)
+#define SLJIT_LIKELY(x) __builtin_expect((x), 1)
+#define SLJIT_UNLIKELY(x) __builtin_expect((x), 0)
+#else
+#define SLJIT_LIKELY(x) (x)
+#define SLJIT_UNLIKELY(x) (x)
+#endif
+
+#endif /* !defined(SLJIT_LIKELY) && !defined(SLJIT_UNLIKELY) */
+
+#ifndef SLJIT_INLINE
+/* Inline functions. Some old compilers do not support them. */
+#if defined(__SUNPRO_C) && __SUNPRO_C <= 0x510
+#define SLJIT_INLINE
+#else
+#define SLJIT_INLINE __inline
+#endif
+#endif /* !SLJIT_INLINE */
+
+#ifndef SLJIT_NOINLINE
+/* Not inline functions. */
+#if defined(__GNUC__)
+#define SLJIT_NOINLINE __attribute__ ((noinline))
+#else
+#define SLJIT_NOINLINE
+#endif
+#endif /* !SLJIT_INLINE */
+
+#ifndef SLJIT_UNUSED_ARG
+/* Unused arguments. */
+#define SLJIT_UNUSED_ARG(arg) (void)arg
+#endif
+
+/*********************************/
+/* Type of public API functions. */
+/*********************************/
+
+#if (defined SLJIT_CONFIG_STATIC && SLJIT_CONFIG_STATIC)
+/* Static ABI functions. For all-in-one programs. */
+
+#if defined(__GNUC__)
+/* Disable unused warnings in gcc. */
+#define SLJIT_API_FUNC_ATTRIBUTE static __attribute__((unused))
+#else
+#define SLJIT_API_FUNC_ATTRIBUTE static
+#endif
+
+#else
+#define SLJIT_API_FUNC_ATTRIBUTE
+#endif /* (defined SLJIT_CONFIG_STATIC && SLJIT_CONFIG_STATIC) */
+
+/****************************/
+/* Instruction cache flush. */
+/****************************/
+
+#if (!defined SLJIT_CACHE_FLUSH && defined __has_builtin)
+#if __has_builtin(__builtin___clear_cache)
+
+#define SLJIT_CACHE_FLUSH(from, to) \
+ __builtin___clear_cache((char*)from, (char*)to)
+
+#endif /* __has_builtin(__builtin___clear_cache) */
+#endif /* (!defined SLJIT_CACHE_FLUSH && defined __has_builtin) */
+
+#ifndef SLJIT_CACHE_FLUSH
+
+#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+
+/* Not required to implement on archs with unified caches. */
+#define SLJIT_CACHE_FLUSH(from, to)
+
+#elif defined __APPLE__
+
+/* Supported by all macs since Mac OS 10.5.
+ However, it does not work on non-jailbroken iOS devices,
+ although the compilation is successful. */
+
+#define SLJIT_CACHE_FLUSH(from, to) \
+ sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from))
+
+#elif (defined(__GNUC__) && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
+
+#define SLJIT_CACHE_FLUSH(from, to) \
+ __builtin___clear_cache((char*)from, (char*)to)
+
+#elif defined __ANDROID__
+
+/* Android lacks __clear_cache; instead, cacheflush should be used. */
+
+#define SLJIT_CACHE_FLUSH(from, to) \
+ cacheflush((long)(from), (long)(to), 0)
+
+#elif (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC)
+
+/* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */
+#define SLJIT_CACHE_FLUSH(from, to) \
+ ppc_cache_flush((from), (to))
+#define SLJIT_CACHE_FLUSH_OWN_IMPL 1
+
+#elif (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+
+/* The __clear_cache() implementation of GCC is a dummy function on Sparc. */
+#define SLJIT_CACHE_FLUSH(from, to) \
+ sparc_cache_flush((from), (to))
+#define SLJIT_CACHE_FLUSH_OWN_IMPL 1
+
+#else
+
+/* Calls __ARM_NR_cacheflush on ARM-Linux. */
+#define SLJIT_CACHE_FLUSH(from, to) \
+ __clear_cache((char*)(from), (char*)(to))
+
+#endif
+
+#endif /* !SLJIT_CACHE_FLUSH */
+
+/******************************************************/
+/* Integer and floating point type definitions. */
+/******************************************************/
+
+/* 8 bit byte type. */
+typedef unsigned char sljit_u8;
+typedef signed char sljit_s8;
+
+/* 16 bit half-word type. */
+typedef unsigned short int sljit_u16;
+typedef signed short int sljit_s16;
+
+/* 32 bit integer type. */
+typedef unsigned int sljit_u32;
+typedef signed int sljit_s32;
+
+/* Machine word type. Enough for storing a pointer.
+ 32 bit for 32 bit machines.
+ 64 bit for 64 bit machines. */
+#if (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
+/* Just to have something. */
+#define SLJIT_WORD_SHIFT 0
+typedef unsigned long int sljit_uw;
+typedef long int sljit_sw;
+#elif !(defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) \
+ && !(defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64) \
+ && !(defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) \
+ && !(defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64) \
+ && !(defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX)
+#define SLJIT_32BIT_ARCHITECTURE 1
+#define SLJIT_WORD_SHIFT 2
+typedef unsigned int sljit_uw;
+typedef int sljit_sw;
+#else
+#define SLJIT_64BIT_ARCHITECTURE 1
+#define SLJIT_WORD_SHIFT 3
+#ifdef _WIN32
+typedef unsigned __int64 sljit_uw;
+typedef __int64 sljit_sw;
+#else
+typedef unsigned long int sljit_uw;
+typedef long int sljit_sw;
+#endif
+#endif
+
+typedef sljit_uw sljit_p;
+
+/* Floating point types. */
+typedef float sljit_f32;
+typedef double sljit_f64;
+
+/* Shift for pointer sized data. */
+#define SLJIT_POINTER_SHIFT SLJIT_WORD_SHIFT
+
+/* Shift for double precision sized data. */
+#define SLJIT_F32_SHIFT 2
+#define SLJIT_F64_SHIFT 3
+
+#ifndef SLJIT_W
+
+/* Defining long constants. */
+#if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
+#define SLJIT_W(w) (w##ll)
+#else
+#define SLJIT_W(w) (w)
+#endif
+
+#endif /* !SLJIT_W */
+
+/*************************/
+/* Endianness detection. */
+/*************************/
+
+#if !defined(SLJIT_BIG_ENDIAN) && !defined(SLJIT_LITTLE_ENDIAN)
+
+/* These macros are mostly useful for the applications. */
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) \
+ || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+
+#ifdef __LITTLE_ENDIAN__
+#define SLJIT_LITTLE_ENDIAN 1
+#else
+#define SLJIT_BIG_ENDIAN 1
+#endif
+
+#elif (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) \
+ || (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
+
+#ifdef __MIPSEL__
+#define SLJIT_LITTLE_ENDIAN 1
+#else
+#define SLJIT_BIG_ENDIAN 1
+#endif
+
+#elif (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+
+#define SLJIT_BIG_ENDIAN 1
+
+#else
+#define SLJIT_LITTLE_ENDIAN 1
+#endif
+
+#endif /* !defined(SLJIT_BIG_ENDIAN) && !defined(SLJIT_LITTLE_ENDIAN) */
+
+/* Sanity check. */
+#if (defined SLJIT_BIG_ENDIAN && SLJIT_BIG_ENDIAN) && (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
+#error "Exactly one endianness must be selected"
+#endif
+
+#if !(defined SLJIT_BIG_ENDIAN && SLJIT_BIG_ENDIAN) && !(defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
+#error "Exactly one endianness must be selected"
+#endif
+
+#ifndef SLJIT_UNALIGNED
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) \
+ || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) \
+ || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) \
+ || (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) \
+ || (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64) \
+ || (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) \
+ || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+#define SLJIT_UNALIGNED 1
+#endif
+
+#endif /* !SLJIT_UNALIGNED */
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+/* Auto detect SSE2 support using CPUID.
+ On 64 bit x86 cpus, sse2 must be present. */
+#define SLJIT_DETECT_SSE2 1
+#endif
+
+/*****************************************************************************************/
+/* Calling convention of functions generated by SLJIT or called from the generated code. */
+/*****************************************************************************************/
+
+#ifndef SLJIT_CALL
+
+#if (defined SLJIT_USE_CDECL_CALLING_CONVENTION && SLJIT_USE_CDECL_CALLING_CONVENTION)
+
+/* Force cdecl. */
+#define SLJIT_CALL
+
+#elif (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+
+#if defined(__GNUC__) && !defined(__APPLE__)
+
+#define SLJIT_CALL __attribute__ ((fastcall))
+#define SLJIT_X86_32_FASTCALL 1
+
+#elif defined(_MSC_VER)
+
+#define SLJIT_CALL __fastcall
+#define SLJIT_X86_32_FASTCALL 1
+
+#elif defined(__BORLANDC__)
+
+#define SLJIT_CALL __msfastcall
+#define SLJIT_X86_32_FASTCALL 1
+
+#else /* Unknown compiler. */
+
+/* The cdecl attribute is the default. */
+#define SLJIT_CALL
+
+#endif
+
+#else /* Non x86-32 architectures. */
+
+#define SLJIT_CALL
+
+#endif /* SLJIT_CONFIG_X86_32 */
+
+#endif /* !SLJIT_CALL */
+
+#ifndef SLJIT_INDIRECT_CALL
+#if ((defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) && (defined SLJIT_BIG_ENDIAN && SLJIT_BIG_ENDIAN)) \
+ || ((defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) && defined _AIX)
+/* It seems certain ppc compilers use an indirect addressing for functions
+ which makes things complicated. */
+#define SLJIT_INDIRECT_CALL 1
+#endif
+#endif /* SLJIT_INDIRECT_CALL */
+
+/* The offset which needs to be substracted from the return address to
+determine the next executed instruction after return. */
+#ifndef SLJIT_RETURN_ADDRESS_OFFSET
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+#define SLJIT_RETURN_ADDRESS_OFFSET 8
+#else
+#define SLJIT_RETURN_ADDRESS_OFFSET 0
+#endif
+#endif /* SLJIT_RETURN_ADDRESS_OFFSET */
+
+/***************************************************/
+/* Functions of the built-in executable allocator. */
+/***************************************************/
+
+#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
+SLJIT_API_FUNC_ATTRIBUTE void* sljit_malloc_exec(sljit_uw size);
+SLJIT_API_FUNC_ATTRIBUTE void sljit_free_exec(void* ptr);
+SLJIT_API_FUNC_ATTRIBUTE void sljit_free_unused_memory_exec(void);
+#define SLJIT_MALLOC_EXEC(size) sljit_malloc_exec(size)
+#define SLJIT_FREE_EXEC(ptr) sljit_free_exec(ptr)
+
+#if (defined SLJIT_PROT_EXECUTABLE_ALLOCATOR && SLJIT_PROT_EXECUTABLE_ALLOCATOR)
+SLJIT_API_FUNC_ATTRIBUTE sljit_sw sljit_exec_offset(void* ptr);
+#define SLJIT_EXEC_OFFSET(ptr) sljit_exec_offset(ptr)
+#else
+#define SLJIT_EXEC_OFFSET(ptr) 0
+#endif
+
+#endif
+
+/**********************************************/
+/* Registers and locals offset determination. */
+/**********************************************/
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+
+#define SLJIT_NUMBER_OF_REGISTERS 10
+#define SLJIT_NUMBER_OF_SAVED_REGISTERS 7
+#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
+#define SLJIT_LOCALS_OFFSET_BASE ((2 + 4) * sizeof(sljit_sw))
+#else
+/* Maximum 3 arguments are passed on the stack, +1 for double alignment. */
+#define SLJIT_LOCALS_OFFSET_BASE ((3 + 1 + 4) * sizeof(sljit_sw))
+#endif /* SLJIT_X86_32_FASTCALL */
+
+#elif (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+
+#ifndef _WIN64
+#define SLJIT_NUMBER_OF_REGISTERS 12
+#define SLJIT_NUMBER_OF_SAVED_REGISTERS 6
+#define SLJIT_LOCALS_OFFSET_BASE (sizeof(sljit_sw))
+#else
+#define SLJIT_NUMBER_OF_REGISTERS 12
+#define SLJIT_NUMBER_OF_SAVED_REGISTERS 8
+#define SLJIT_LOCALS_OFFSET_BASE ((4 + 2) * sizeof(sljit_sw))
+#endif /* _WIN64 */
+
+#elif (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
+
+#define SLJIT_NUMBER_OF_REGISTERS 11
+#define SLJIT_NUMBER_OF_SAVED_REGISTERS 8
+#define SLJIT_LOCALS_OFFSET_BASE 0
+
+#elif (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
+
+#define SLJIT_NUMBER_OF_REGISTERS 11
+#define SLJIT_NUMBER_OF_SAVED_REGISTERS 7
+#define SLJIT_LOCALS_OFFSET_BASE 0
+
+#elif (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64)
+
+#define SLJIT_NUMBER_OF_REGISTERS 25
+#define SLJIT_NUMBER_OF_SAVED_REGISTERS 10
+#define SLJIT_LOCALS_OFFSET_BASE (2 * sizeof(sljit_sw))
+
+#elif (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC)
+
+#define SLJIT_NUMBER_OF_REGISTERS 22
+#define SLJIT_NUMBER_OF_SAVED_REGISTERS 17
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) || (defined _AIX)
+#define SLJIT_LOCALS_OFFSET_BASE ((6 + 8) * sizeof(sljit_sw))
+#elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
+/* Add +1 for double alignment. */
+#define SLJIT_LOCALS_OFFSET_BASE ((3 + 1) * sizeof(sljit_sw))
+#else
+#define SLJIT_LOCALS_OFFSET_BASE (3 * sizeof(sljit_sw))
+#endif /* SLJIT_CONFIG_PPC_64 || _AIX */
+
+#elif (defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS)
+
+#define SLJIT_NUMBER_OF_REGISTERS 17
+#define SLJIT_NUMBER_OF_SAVED_REGISTERS 8
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+#define SLJIT_LOCALS_OFFSET_BASE (4 * sizeof(sljit_sw))
+#else
+#define SLJIT_LOCALS_OFFSET_BASE 0
+#endif
+
+#elif (defined SLJIT_CONFIG_SPARC && SLJIT_CONFIG_SPARC)
+
+#define SLJIT_NUMBER_OF_REGISTERS 18
+#define SLJIT_NUMBER_OF_SAVED_REGISTERS 14
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+/* Add +1 for double alignment. */
+#define SLJIT_LOCALS_OFFSET_BASE ((23 + 1) * sizeof(sljit_sw))
+#endif
+
+#elif (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX)
+
+#define SLJIT_NUMBER_OF_REGISTERS 10
+#define SLJIT_NUMBER_OF_SAVED_REGISTERS 5
+#define SLJIT_LOCALS_OFFSET_BASE 0
+
+#elif (defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
+
+#define SLJIT_NUMBER_OF_REGISTERS 0
+#define SLJIT_NUMBER_OF_SAVED_REGISTERS 0
+#define SLJIT_LOCALS_OFFSET_BASE 0
+
+#endif
+
+#define SLJIT_LOCALS_OFFSET (SLJIT_LOCALS_OFFSET_BASE)
+
+#define SLJIT_NUMBER_OF_SCRATCH_REGISTERS \
+ (SLJIT_NUMBER_OF_REGISTERS - SLJIT_NUMBER_OF_SAVED_REGISTERS)
+
+#define SLJIT_NUMBER_OF_FLOAT_REGISTERS 6
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) && (defined _WIN64)
+#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 1
+#else
+#define SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS 0
+#endif
+
+#define SLJIT_NUMBER_OF_SCRATCH_FLOAT_REGISTERS \
+ (SLJIT_NUMBER_OF_FLOAT_REGISTERS - SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS)
+
+/*************************************/
+/* Debug and verbose related macros. */
+/*************************************/
+
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+#include <stdio.h>
+#endif
+
+#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
+
+#if !defined(SLJIT_ASSERT) || !defined(SLJIT_ASSERT_STOP)
+
+/* SLJIT_HALT_PROCESS must halt the process. */
+#ifndef SLJIT_HALT_PROCESS
+#include <stdlib.h>
+
+#define SLJIT_HALT_PROCESS() \
+ abort();
+#endif /* !SLJIT_HALT_PROCESS */
+
+#include <stdio.h>
+
+#endif /* !SLJIT_ASSERT || !SLJIT_ASSERT_STOP */
+
+/* Feel free to redefine these two macros. */
+#ifndef SLJIT_ASSERT
+
+#define SLJIT_ASSERT(x) \
+ do { \
+ if (SLJIT_UNLIKELY(!(x))) { \
+ printf("Assertion failed at " __FILE__ ":%d\n", __LINE__); \
+ SLJIT_HALT_PROCESS(); \
+ } \
+ } while (0)
+
+#endif /* !SLJIT_ASSERT */
+
+#ifndef SLJIT_ASSERT_STOP
+
+#define SLJIT_ASSERT_STOP() \
+ do { \
+ printf("Should never been reached " __FILE__ ":%d\n", __LINE__); \
+ SLJIT_HALT_PROCESS(); \
+ } while (0)
+
+#endif /* !SLJIT_ASSERT_STOP */
+
+#else /* (defined SLJIT_DEBUG && SLJIT_DEBUG) */
+
+/* Forcing empty, but valid statements. */
+#undef SLJIT_ASSERT
+#undef SLJIT_ASSERT_STOP
+
+#define SLJIT_ASSERT(x) \
+ do { } while (0)
+#define SLJIT_ASSERT_STOP() \
+ do { } while (0)
+
+#endif /* (defined SLJIT_DEBUG && SLJIT_DEBUG) */
+
+#ifndef SLJIT_COMPILE_ASSERT
+
+/* Should be improved eventually. */
+#define SLJIT_COMPILE_ASSERT(x, description) \
+ SLJIT_ASSERT(x)
+
+#endif /* !SLJIT_COMPILE_ASSERT */
+
+#endif
diff --git a/thirdparty/pcre2/src/sljit/sljitExecAllocator.c b/thirdparty/pcre2/src/sljit/sljitExecAllocator.c
new file mode 100644
index 0000000000..9f88f990b0
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitExecAllocator.c
@@ -0,0 +1,312 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ This file contains a simple executable memory allocator
+
+ It is assumed, that executable code blocks are usually medium (or sometimes
+ large) memory blocks, and the allocator is not too frequently called (less
+ optimized than other allocators). Thus, using it as a generic allocator is
+ not suggested.
+
+ How does it work:
+ Memory is allocated in continuous memory areas called chunks by alloc_chunk()
+ Chunk format:
+ [ block ][ block ] ... [ block ][ block terminator ]
+
+ All blocks and the block terminator is started with block_header. The block
+ header contains the size of the previous and the next block. These sizes
+ can also contain special values.
+ Block size:
+ 0 - The block is a free_block, with a different size member.
+ 1 - The block is a block terminator.
+ n - The block is used at the moment, and the value contains its size.
+ Previous block size:
+ 0 - This is the first block of the memory chunk.
+ n - The size of the previous block.
+
+ Using these size values we can go forward or backward on the block chain.
+ The unused blocks are stored in a chain list pointed by free_blocks. This
+ list is useful if we need to find a suitable memory area when the allocator
+ is called.
+
+ When a block is freed, the new free block is connected to its adjacent free
+ blocks if possible.
+
+ [ free block ][ used block ][ free block ]
+ and "used block" is freed, the three blocks are connected together:
+ [ one big free block ]
+*/
+
+/* --------------------------------------------------------------------- */
+/* System (OS) functions */
+/* --------------------------------------------------------------------- */
+
+/* 64 KByte. */
+#define CHUNK_SIZE 0x10000
+
+/*
+ alloc_chunk / free_chunk :
+ * allocate executable system memory chunks
+ * the size is always divisible by CHUNK_SIZE
+ allocator_grab_lock / allocator_release_lock :
+ * make the allocator thread safe
+ * can be empty if the OS (or the application) does not support threading
+ * only the allocator requires this lock, sljit is fully thread safe
+ as it only uses local variables
+*/
+
+#ifdef _WIN32
+
+static SLJIT_INLINE void* alloc_chunk(sljit_uw size)
+{
+ return VirtualAlloc(NULL, size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
+}
+
+static SLJIT_INLINE void free_chunk(void *chunk, sljit_uw size)
+{
+ SLJIT_UNUSED_ARG(size);
+ VirtualFree(chunk, 0, MEM_RELEASE);
+}
+
+#else
+
+static SLJIT_INLINE void* alloc_chunk(sljit_uw size)
+{
+ void *retval;
+
+#ifdef MAP_ANON
+ retval = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON, -1, 0);
+#else
+ if (dev_zero < 0) {
+ if (open_dev_zero())
+ return NULL;
+ }
+ retval = mmap(NULL, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, dev_zero, 0);
+#endif
+
+ return (retval != MAP_FAILED) ? retval : NULL;
+}
+
+static SLJIT_INLINE void free_chunk(void *chunk, sljit_uw size)
+{
+ munmap(chunk, size);
+}
+
+#endif
+
+/* --------------------------------------------------------------------- */
+/* Common functions */
+/* --------------------------------------------------------------------- */
+
+#define CHUNK_MASK (~(CHUNK_SIZE - 1))
+
+struct block_header {
+ sljit_uw size;
+ sljit_uw prev_size;
+};
+
+struct free_block {
+ struct block_header header;
+ struct free_block *next;
+ struct free_block *prev;
+ sljit_uw size;
+};
+
+#define AS_BLOCK_HEADER(base, offset) \
+ ((struct block_header*)(((sljit_u8*)base) + offset))
+#define AS_FREE_BLOCK(base, offset) \
+ ((struct free_block*)(((sljit_u8*)base) + offset))
+#define MEM_START(base) ((void*)(((sljit_u8*)base) + sizeof(struct block_header)))
+#define ALIGN_SIZE(size) (((size) + sizeof(struct block_header) + 7) & ~7)
+
+static struct free_block* free_blocks;
+static sljit_uw allocated_size;
+static sljit_uw total_size;
+
+static SLJIT_INLINE void sljit_insert_free_block(struct free_block *free_block, sljit_uw size)
+{
+ free_block->header.size = 0;
+ free_block->size = size;
+
+ free_block->next = free_blocks;
+ free_block->prev = NULL;
+ if (free_blocks)
+ free_blocks->prev = free_block;
+ free_blocks = free_block;
+}
+
+static SLJIT_INLINE void sljit_remove_free_block(struct free_block *free_block)
+{
+ if (free_block->next)
+ free_block->next->prev = free_block->prev;
+
+ if (free_block->prev)
+ free_block->prev->next = free_block->next;
+ else {
+ SLJIT_ASSERT(free_blocks == free_block);
+ free_blocks = free_block->next;
+ }
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void* sljit_malloc_exec(sljit_uw size)
+{
+ struct block_header *header;
+ struct block_header *next_header;
+ struct free_block *free_block;
+ sljit_uw chunk_size;
+
+ allocator_grab_lock();
+ if (size < (64 - sizeof(struct block_header)))
+ size = (64 - sizeof(struct block_header));
+ size = ALIGN_SIZE(size);
+
+ free_block = free_blocks;
+ while (free_block) {
+ if (free_block->size >= size) {
+ chunk_size = free_block->size;
+ if (chunk_size > size + 64) {
+ /* We just cut a block from the end of the free block. */
+ chunk_size -= size;
+ free_block->size = chunk_size;
+ header = AS_BLOCK_HEADER(free_block, chunk_size);
+ header->prev_size = chunk_size;
+ AS_BLOCK_HEADER(header, size)->prev_size = size;
+ }
+ else {
+ sljit_remove_free_block(free_block);
+ header = (struct block_header*)free_block;
+ size = chunk_size;
+ }
+ allocated_size += size;
+ header->size = size;
+ allocator_release_lock();
+ return MEM_START(header);
+ }
+ free_block = free_block->next;
+ }
+
+ chunk_size = (size + sizeof(struct block_header) + CHUNK_SIZE - 1) & CHUNK_MASK;
+ header = (struct block_header*)alloc_chunk(chunk_size);
+ if (!header) {
+ allocator_release_lock();
+ return NULL;
+ }
+
+ chunk_size -= sizeof(struct block_header);
+ total_size += chunk_size;
+
+ header->prev_size = 0;
+ if (chunk_size > size + 64) {
+ /* Cut the allocated space into a free and a used block. */
+ allocated_size += size;
+ header->size = size;
+ chunk_size -= size;
+
+ free_block = AS_FREE_BLOCK(header, size);
+ free_block->header.prev_size = size;
+ sljit_insert_free_block(free_block, chunk_size);
+ next_header = AS_BLOCK_HEADER(free_block, chunk_size);
+ }
+ else {
+ /* All space belongs to this allocation. */
+ allocated_size += chunk_size;
+ header->size = chunk_size;
+ next_header = AS_BLOCK_HEADER(header, chunk_size);
+ }
+ next_header->size = 1;
+ next_header->prev_size = chunk_size;
+ allocator_release_lock();
+ return MEM_START(header);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_free_exec(void* ptr)
+{
+ struct block_header *header;
+ struct free_block* free_block;
+
+ allocator_grab_lock();
+ header = AS_BLOCK_HEADER(ptr, -(sljit_sw)sizeof(struct block_header));
+ allocated_size -= header->size;
+
+ /* Connecting free blocks together if possible. */
+
+ /* If header->prev_size == 0, free_block will equal to header.
+ In this case, free_block->header.size will be > 0. */
+ free_block = AS_FREE_BLOCK(header, -(sljit_sw)header->prev_size);
+ if (SLJIT_UNLIKELY(!free_block->header.size)) {
+ free_block->size += header->size;
+ header = AS_BLOCK_HEADER(free_block, free_block->size);
+ header->prev_size = free_block->size;
+ }
+ else {
+ free_block = (struct free_block*)header;
+ sljit_insert_free_block(free_block, header->size);
+ }
+
+ header = AS_BLOCK_HEADER(free_block, free_block->size);
+ if (SLJIT_UNLIKELY(!header->size)) {
+ free_block->size += ((struct free_block*)header)->size;
+ sljit_remove_free_block((struct free_block*)header);
+ header = AS_BLOCK_HEADER(free_block, free_block->size);
+ header->prev_size = free_block->size;
+ }
+
+ /* The whole chunk is free. */
+ if (SLJIT_UNLIKELY(!free_block->header.prev_size && header->size == 1)) {
+ /* If this block is freed, we still have (allocated_size / 2) free space. */
+ if (total_size - free_block->size > (allocated_size * 3 / 2)) {
+ total_size -= free_block->size;
+ sljit_remove_free_block(free_block);
+ free_chunk(free_block, free_block->size + sizeof(struct block_header));
+ }
+ }
+
+ allocator_release_lock();
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_free_unused_memory_exec(void)
+{
+ struct free_block* free_block;
+ struct free_block* next_free_block;
+
+ allocator_grab_lock();
+
+ free_block = free_blocks;
+ while (free_block) {
+ next_free_block = free_block->next;
+ if (!free_block->header.prev_size &&
+ AS_BLOCK_HEADER(free_block, free_block->size)->size == 1) {
+ total_size -= free_block->size;
+ sljit_remove_free_block(free_block);
+ free_chunk(free_block, free_block->size + sizeof(struct block_header));
+ }
+ free_block = next_free_block;
+ }
+
+ SLJIT_ASSERT((total_size && free_blocks) || (!total_size && !free_blocks));
+ allocator_release_lock();
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitLir.c b/thirdparty/pcre2/src/sljit/sljitLir.c
new file mode 100644
index 0000000000..0b39ec90a9
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitLir.c
@@ -0,0 +1,2067 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "sljitLir.h"
+
+#if !(defined SLJIT_STD_MACROS_DEFINED && SLJIT_STD_MACROS_DEFINED)
+
+/* These libraries are needed for the macros below. */
+#include <stdlib.h>
+#include <string.h>
+
+#endif /* SLJIT_STD_MACROS_DEFINED */
+
+#define CHECK_ERROR() \
+ do { \
+ if (SLJIT_UNLIKELY(compiler->error)) \
+ return compiler->error; \
+ } while (0)
+
+#define CHECK_ERROR_PTR() \
+ do { \
+ if (SLJIT_UNLIKELY(compiler->error)) \
+ return NULL; \
+ } while (0)
+
+#define FAIL_IF(expr) \
+ do { \
+ if (SLJIT_UNLIKELY(expr)) \
+ return compiler->error; \
+ } while (0)
+
+#define PTR_FAIL_IF(expr) \
+ do { \
+ if (SLJIT_UNLIKELY(expr)) \
+ return NULL; \
+ } while (0)
+
+#define FAIL_IF_NULL(ptr) \
+ do { \
+ if (SLJIT_UNLIKELY(!(ptr))) { \
+ compiler->error = SLJIT_ERR_ALLOC_FAILED; \
+ return SLJIT_ERR_ALLOC_FAILED; \
+ } \
+ } while (0)
+
+#define PTR_FAIL_IF_NULL(ptr) \
+ do { \
+ if (SLJIT_UNLIKELY(!(ptr))) { \
+ compiler->error = SLJIT_ERR_ALLOC_FAILED; \
+ return NULL; \
+ } \
+ } while (0)
+
+#define PTR_FAIL_WITH_EXEC_IF(ptr) \
+ do { \
+ if (SLJIT_UNLIKELY(!(ptr))) { \
+ compiler->error = SLJIT_ERR_EX_ALLOC_FAILED; \
+ return NULL; \
+ } \
+ } while (0)
+
+#if !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
+
+#define GET_OPCODE(op) \
+ ((op) & ~(SLJIT_I32_OP | SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))
+
+#define GET_FLAGS(op) \
+ ((op) & (SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O | SLJIT_SET_C))
+
+#define GET_ALL_FLAGS(op) \
+ ((op) & (SLJIT_I32_OP | SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))
+
+#define TYPE_CAST_NEEDED(op) \
+ (((op) >= SLJIT_MOV_U8 && (op) <= SLJIT_MOV_S16) || ((op) >= SLJIT_MOVU_U8 && (op) <= SLJIT_MOVU_S16))
+
+#define BUF_SIZE 4096
+
+#if (defined SLJIT_32BIT_ARCHITECTURE && SLJIT_32BIT_ARCHITECTURE)
+#define ABUF_SIZE 2048
+#else
+#define ABUF_SIZE 4096
+#endif
+
+/* Parameter parsing. */
+#define REG_MASK 0x3f
+#define OFFS_REG(reg) (((reg) >> 8) & REG_MASK)
+#define OFFS_REG_MASK (REG_MASK << 8)
+#define TO_OFFS_REG(reg) ((reg) << 8)
+/* When reg cannot be unused. */
+#define FAST_IS_REG(reg) ((reg) <= REG_MASK)
+/* When reg can be unused. */
+#define SLOW_IS_REG(reg) ((reg) > 0 && (reg) <= REG_MASK)
+
+/* Jump flags. */
+#define JUMP_LABEL 0x1
+#define JUMP_ADDR 0x2
+/* SLJIT_REWRITABLE_JUMP is 0x1000. */
+
+#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+# define PATCH_MB 0x4
+# define PATCH_MW 0x8
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+# define PATCH_MD 0x10
+#endif
+#endif
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
+# define IS_BL 0x4
+# define PATCH_B 0x8
+#endif
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+# define CPOOL_SIZE 512
+#endif
+
+#if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
+# define IS_COND 0x04
+# define IS_BL 0x08
+ /* conditional + imm8 */
+# define PATCH_TYPE1 0x10
+ /* conditional + imm20 */
+# define PATCH_TYPE2 0x20
+ /* IT + imm24 */
+# define PATCH_TYPE3 0x30
+ /* imm11 */
+# define PATCH_TYPE4 0x40
+ /* imm24 */
+# define PATCH_TYPE5 0x50
+ /* BL + imm24 */
+# define PATCH_BL 0x60
+ /* 0xf00 cc code for branches */
+#endif
+
+#if (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64)
+# define IS_COND 0x004
+# define IS_CBZ 0x008
+# define IS_BL 0x010
+# define PATCH_B 0x020
+# define PATCH_COND 0x040
+# define PATCH_ABS48 0x080
+# define PATCH_ABS64 0x100
+#endif
+
+#if (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC)
+# define IS_COND 0x004
+# define IS_CALL 0x008
+# define PATCH_B 0x010
+# define PATCH_ABS_B 0x020
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+# define PATCH_ABS32 0x040
+# define PATCH_ABS48 0x080
+#endif
+# define REMOVE_COND 0x100
+#endif
+
+#if (defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS)
+# define IS_MOVABLE 0x004
+# define IS_JAL 0x008
+# define IS_CALL 0x010
+# define IS_BIT26_COND 0x020
+# define IS_BIT16_COND 0x040
+
+# define IS_COND (IS_BIT26_COND | IS_BIT16_COND)
+
+# define PATCH_B 0x080
+# define PATCH_J 0x100
+
+#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
+# define PATCH_ABS32 0x200
+# define PATCH_ABS48 0x400
+#endif
+
+ /* instruction types */
+# define MOVABLE_INS 0
+ /* 1 - 31 last destination register */
+ /* no destination (i.e: store) */
+# define UNMOVABLE_INS 32
+ /* FPU status register */
+# define FCSR_FCC 33
+#endif
+
+#if (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX)
+# define IS_JAL 0x04
+# define IS_COND 0x08
+
+# define PATCH_B 0x10
+# define PATCH_J 0x20
+#endif
+
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+# define IS_MOVABLE 0x04
+# define IS_COND 0x08
+# define IS_CALL 0x10
+
+# define PATCH_B 0x20
+# define PATCH_CALL 0x40
+
+ /* instruction types */
+# define MOVABLE_INS 0
+ /* 1 - 31 last destination register */
+ /* no destination (i.e: store) */
+# define UNMOVABLE_INS 32
+
+# define DST_INS_MASK 0xff
+
+ /* ICC_SET is the same as SET_FLAGS. */
+# define ICC_IS_SET (1 << 23)
+# define FCC_IS_SET (1 << 24)
+#endif
+
+/* Stack management. */
+
+#define GET_SAVED_REGISTERS_SIZE(scratches, saveds, extra) \
+ (((scratches < SLJIT_NUMBER_OF_SCRATCH_REGISTERS ? 0 : (scratches - SLJIT_NUMBER_OF_SCRATCH_REGISTERS)) + \
+ (saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? saveds : SLJIT_NUMBER_OF_SAVED_REGISTERS) + \
+ extra) * sizeof(sljit_sw))
+
+#define ADJUST_LOCAL_OFFSET(p, i) \
+ if ((p) == (SLJIT_MEM1(SLJIT_SP))) \
+ (i) += SLJIT_LOCALS_OFFSET;
+
+#endif /* !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED) */
+
+/* Utils can still be used even if SLJIT_CONFIG_UNSUPPORTED is set. */
+#include "sljitUtils.c"
+
+#if !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
+
+#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
+
+#if (defined SLJIT_PROT_EXECUTABLE_ALLOCATOR && SLJIT_PROT_EXECUTABLE_ALLOCATOR)
+#include "sljitProtExecAllocator.c"
+#else
+#include "sljitExecAllocator.c"
+#endif
+
+#endif
+
+#if (defined SLJIT_PROT_EXECUTABLE_ALLOCATOR && SLJIT_PROT_EXECUTABLE_ALLOCATOR)
+#define SLJIT_ADD_EXEC_OFFSET(ptr, exec_offset) ((sljit_u8 *)(ptr) + (exec_offset))
+#else
+#define SLJIT_ADD_EXEC_OFFSET(ptr, exec_offset) ((sljit_u8 *)(ptr))
+#endif
+
+/* Argument checking features. */
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+
+/* Returns with error when an invalid argument is passed. */
+
+#define CHECK_ARGUMENT(x) \
+ do { \
+ if (SLJIT_UNLIKELY(!(x))) \
+ return 1; \
+ } while (0)
+
+#define CHECK_RETURN_TYPE sljit_s32
+#define CHECK_RETURN_OK return 0
+
+#define CHECK(x) \
+ do { \
+ if (SLJIT_UNLIKELY(x)) { \
+ compiler->error = SLJIT_ERR_BAD_ARGUMENT; \
+ return SLJIT_ERR_BAD_ARGUMENT; \
+ } \
+ } while (0)
+
+#define CHECK_PTR(x) \
+ do { \
+ if (SLJIT_UNLIKELY(x)) { \
+ compiler->error = SLJIT_ERR_BAD_ARGUMENT; \
+ return NULL; \
+ } \
+ } while (0)
+
+#define CHECK_REG_INDEX(x) \
+ do { \
+ if (SLJIT_UNLIKELY(x)) { \
+ return -2; \
+ } \
+ } while (0)
+
+#elif (defined SLJIT_DEBUG && SLJIT_DEBUG)
+
+/* Assertion failure occures if an invalid argument is passed. */
+#undef SLJIT_ARGUMENT_CHECKS
+#define SLJIT_ARGUMENT_CHECKS 1
+
+#define CHECK_ARGUMENT(x) SLJIT_ASSERT(x)
+#define CHECK_RETURN_TYPE void
+#define CHECK_RETURN_OK return
+#define CHECK(x) x
+#define CHECK_PTR(x) x
+#define CHECK_REG_INDEX(x) x
+
+#elif (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+
+/* Arguments are not checked. */
+#define CHECK_RETURN_TYPE void
+#define CHECK_RETURN_OK return
+#define CHECK(x) x
+#define CHECK_PTR(x) x
+#define CHECK_REG_INDEX(x) x
+
+#else
+
+/* Arguments are not checked. */
+#define CHECK(x)
+#define CHECK_PTR(x)
+#define CHECK_REG_INDEX(x)
+
+#endif /* SLJIT_ARGUMENT_CHECKS */
+
+/* --------------------------------------------------------------------- */
+/* Public functions */
+/* --------------------------------------------------------------------- */
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+#define SLJIT_NEEDS_COMPILER_INIT 1
+static sljit_s32 compiler_initialized = 0;
+/* A thread safe initialization. */
+static void init_compiler(void);
+#endif
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void *allocator_data)
+{
+ struct sljit_compiler *compiler = (struct sljit_compiler*)SLJIT_MALLOC(sizeof(struct sljit_compiler), allocator_data);
+ if (!compiler)
+ return NULL;
+ SLJIT_ZEROMEM(compiler, sizeof(struct sljit_compiler));
+
+ SLJIT_COMPILE_ASSERT(
+ sizeof(sljit_s8) == 1 && sizeof(sljit_u8) == 1
+ && sizeof(sljit_s16) == 2 && sizeof(sljit_u16) == 2
+ && sizeof(sljit_s32) == 4 && sizeof(sljit_u32) == 4
+ && (sizeof(sljit_p) == 4 || sizeof(sljit_p) == 8)
+ && sizeof(sljit_p) <= sizeof(sljit_sw)
+ && (sizeof(sljit_sw) == 4 || sizeof(sljit_sw) == 8)
+ && (sizeof(sljit_uw) == 4 || sizeof(sljit_uw) == 8),
+ invalid_integer_types);
+ SLJIT_COMPILE_ASSERT(SLJIT_I32_OP == SLJIT_F32_OP,
+ int_op_and_single_op_must_be_the_same);
+ SLJIT_COMPILE_ASSERT(SLJIT_REWRITABLE_JUMP != SLJIT_F32_OP,
+ rewritable_jump_and_single_op_must_not_be_the_same);
+
+ /* Only the non-zero members must be set. */
+ compiler->error = SLJIT_SUCCESS;
+
+ compiler->allocator_data = allocator_data;
+ compiler->buf = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE, allocator_data);
+ compiler->abuf = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE, allocator_data);
+
+ if (!compiler->buf || !compiler->abuf) {
+ if (compiler->buf)
+ SLJIT_FREE(compiler->buf, allocator_data);
+ if (compiler->abuf)
+ SLJIT_FREE(compiler->abuf, allocator_data);
+ SLJIT_FREE(compiler, allocator_data);
+ return NULL;
+ }
+
+ compiler->buf->next = NULL;
+ compiler->buf->used_size = 0;
+ compiler->abuf->next = NULL;
+ compiler->abuf->used_size = 0;
+
+ compiler->scratches = -1;
+ compiler->saveds = -1;
+ compiler->fscratches = -1;
+ compiler->fsaveds = -1;
+ compiler->local_size = -1;
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ compiler->args = -1;
+#endif
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ compiler->cpool = (sljit_uw*)SLJIT_MALLOC(CPOOL_SIZE * sizeof(sljit_uw)
+ + CPOOL_SIZE * sizeof(sljit_u8), allocator_data);
+ if (!compiler->cpool) {
+ SLJIT_FREE(compiler->buf, allocator_data);
+ SLJIT_FREE(compiler->abuf, allocator_data);
+ SLJIT_FREE(compiler, allocator_data);
+ return NULL;
+ }
+ compiler->cpool_unique = (sljit_u8*)(compiler->cpool + CPOOL_SIZE);
+ compiler->cpool_diff = 0xffffffff;
+#endif
+
+#if (defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS)
+ compiler->delay_slot = UNMOVABLE_INS;
+#endif
+
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+ compiler->delay_slot = UNMOVABLE_INS;
+#endif
+
+#if (defined SLJIT_NEEDS_COMPILER_INIT && SLJIT_NEEDS_COMPILER_INIT)
+ if (!compiler_initialized) {
+ init_compiler();
+ compiler_initialized = 1;
+ }
+#endif
+
+ return compiler;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler)
+{
+ struct sljit_memory_fragment *buf;
+ struct sljit_memory_fragment *curr;
+ void *allocator_data = compiler->allocator_data;
+ SLJIT_UNUSED_ARG(allocator_data);
+
+ buf = compiler->buf;
+ while (buf) {
+ curr = buf;
+ buf = buf->next;
+ SLJIT_FREE(curr, allocator_data);
+ }
+
+ buf = compiler->abuf;
+ while (buf) {
+ curr = buf;
+ buf = buf->next;
+ SLJIT_FREE(curr, allocator_data);
+ }
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ SLJIT_FREE(compiler->cpool, allocator_data);
+#endif
+ SLJIT_FREE(compiler, allocator_data);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_compiler_memory_error(struct sljit_compiler *compiler)
+{
+ if (compiler->error == SLJIT_SUCCESS)
+ compiler->error = SLJIT_ERR_ALLOC_FAILED;
+}
+
+#if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
+SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code)
+{
+ /* Remove thumb mode flag. */
+ SLJIT_FREE_EXEC((void*)((sljit_uw)code & ~0x1));
+}
+#elif (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
+SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code)
+{
+ /* Resolve indirection. */
+ code = (void*)(*(sljit_uw*)code);
+ SLJIT_FREE_EXEC(code);
+}
+#else
+SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code)
+{
+ SLJIT_FREE_EXEC(code);
+}
+#endif
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label)
+{
+ if (SLJIT_LIKELY(!!jump) && SLJIT_LIKELY(!!label)) {
+ jump->flags &= ~JUMP_ADDR;
+ jump->flags |= JUMP_LABEL;
+ jump->u.label = label;
+ }
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw target)
+{
+ if (SLJIT_LIKELY(!!jump)) {
+ jump->flags &= ~JUMP_LABEL;
+ jump->flags |= JUMP_ADDR;
+ jump->u.target = target;
+ }
+}
+
+/* --------------------------------------------------------------------- */
+/* Private functions */
+/* --------------------------------------------------------------------- */
+
+static void* ensure_buf(struct sljit_compiler *compiler, sljit_uw size)
+{
+ sljit_u8 *ret;
+ struct sljit_memory_fragment *new_frag;
+
+ SLJIT_ASSERT(size <= 256);
+ if (compiler->buf->used_size + size <= (BUF_SIZE - (sljit_uw)SLJIT_OFFSETOF(struct sljit_memory_fragment, memory))) {
+ ret = compiler->buf->memory + compiler->buf->used_size;
+ compiler->buf->used_size += size;
+ return ret;
+ }
+ new_frag = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE, compiler->allocator_data);
+ PTR_FAIL_IF_NULL(new_frag);
+ new_frag->next = compiler->buf;
+ compiler->buf = new_frag;
+ new_frag->used_size = size;
+ return new_frag->memory;
+}
+
+static void* ensure_abuf(struct sljit_compiler *compiler, sljit_uw size)
+{
+ sljit_u8 *ret;
+ struct sljit_memory_fragment *new_frag;
+
+ SLJIT_ASSERT(size <= 256);
+ if (compiler->abuf->used_size + size <= (ABUF_SIZE - (sljit_uw)SLJIT_OFFSETOF(struct sljit_memory_fragment, memory))) {
+ ret = compiler->abuf->memory + compiler->abuf->used_size;
+ compiler->abuf->used_size += size;
+ return ret;
+ }
+ new_frag = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE, compiler->allocator_data);
+ PTR_FAIL_IF_NULL(new_frag);
+ new_frag->next = compiler->abuf;
+ compiler->abuf = new_frag;
+ new_frag->used_size = size;
+ return new_frag->memory;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, sljit_s32 size)
+{
+ CHECK_ERROR_PTR();
+
+#if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
+ if (size <= 0 || size > 128)
+ return NULL;
+ size = (size + 7) & ~7;
+#else
+ if (size <= 0 || size > 64)
+ return NULL;
+ size = (size + 3) & ~3;
+#endif
+ return ensure_abuf(compiler, size);
+}
+
+static SLJIT_INLINE void reverse_buf(struct sljit_compiler *compiler)
+{
+ struct sljit_memory_fragment *buf = compiler->buf;
+ struct sljit_memory_fragment *prev = NULL;
+ struct sljit_memory_fragment *tmp;
+
+ do {
+ tmp = buf->next;
+ buf->next = prev;
+ prev = buf;
+ buf = tmp;
+ } while (buf != NULL);
+
+ compiler->buf = prev;
+}
+
+static SLJIT_INLINE void set_emit_enter(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ SLJIT_UNUSED_ARG(args);
+ SLJIT_UNUSED_ARG(local_size);
+
+ compiler->options = options;
+ compiler->scratches = scratches;
+ compiler->saveds = saveds;
+ compiler->fscratches = fscratches;
+ compiler->fsaveds = fsaveds;
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ compiler->logical_local_size = local_size;
+#endif
+}
+
+static SLJIT_INLINE void set_set_context(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ SLJIT_UNUSED_ARG(args);
+ SLJIT_UNUSED_ARG(local_size);
+
+ compiler->options = options;
+ compiler->scratches = scratches;
+ compiler->saveds = saveds;
+ compiler->fscratches = fscratches;
+ compiler->fsaveds = fsaveds;
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ compiler->logical_local_size = local_size;
+#endif
+}
+
+static SLJIT_INLINE void set_label(struct sljit_label *label, struct sljit_compiler *compiler)
+{
+ label->next = NULL;
+ label->size = compiler->size;
+ if (compiler->last_label)
+ compiler->last_label->next = label;
+ else
+ compiler->labels = label;
+ compiler->last_label = label;
+}
+
+static SLJIT_INLINE void set_jump(struct sljit_jump *jump, struct sljit_compiler *compiler, sljit_s32 flags)
+{
+ jump->next = NULL;
+ jump->flags = flags;
+ if (compiler->last_jump)
+ compiler->last_jump->next = jump;
+ else
+ compiler->jumps = jump;
+ compiler->last_jump = jump;
+}
+
+static SLJIT_INLINE void set_const(struct sljit_const *const_, struct sljit_compiler *compiler)
+{
+ const_->next = NULL;
+ const_->addr = compiler->size;
+ if (compiler->last_const)
+ compiler->last_const->next = const_;
+ else
+ compiler->consts = const_;
+ compiler->last_const = const_;
+}
+
+#define ADDRESSING_DEPENDS_ON(exp, reg) \
+ (((exp) & SLJIT_MEM) && (((exp) & REG_MASK) == reg || OFFS_REG(exp) == reg))
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+#define FUNCTION_CHECK_OP() \
+ CHECK_ARGUMENT(!GET_FLAGS(op) || !(op & SLJIT_KEEP_FLAGS)); \
+ switch (GET_OPCODE(op)) { \
+ case SLJIT_NOT: \
+ case SLJIT_CLZ: \
+ case SLJIT_AND: \
+ case SLJIT_OR: \
+ case SLJIT_XOR: \
+ case SLJIT_SHL: \
+ case SLJIT_LSHR: \
+ case SLJIT_ASHR: \
+ CHECK_ARGUMENT(!(op & (SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O | SLJIT_SET_C))); \
+ break; \
+ case SLJIT_NEG: \
+ CHECK_ARGUMENT(!(op & (SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_C))); \
+ break; \
+ case SLJIT_MUL: \
+ CHECK_ARGUMENT(!(op & (SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_C))); \
+ break; \
+ case SLJIT_ADD: \
+ CHECK_ARGUMENT(!(op & (SLJIT_SET_U | SLJIT_SET_S))); \
+ break; \
+ case SLJIT_SUB: \
+ break; \
+ case SLJIT_ADDC: \
+ case SLJIT_SUBC: \
+ CHECK_ARGUMENT(!(op & (SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O))); \
+ break; \
+ case SLJIT_BREAKPOINT: \
+ case SLJIT_NOP: \
+ case SLJIT_LMUL_UW: \
+ case SLJIT_LMUL_SW: \
+ case SLJIT_MOV: \
+ case SLJIT_MOV_U32: \
+ case SLJIT_MOV_P: \
+ case SLJIT_MOVU: \
+ case SLJIT_MOVU_U32: \
+ case SLJIT_MOVU_P: \
+ /* Nothing allowed */ \
+ CHECK_ARGUMENT(!(op & (SLJIT_I32_OP | SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \
+ break; \
+ default: \
+ /* Only SLJIT_I32_OP or SLJIT_F32_OP is allowed. */ \
+ CHECK_ARGUMENT(!(op & (SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \
+ break; \
+ }
+
+#define FUNCTION_CHECK_FOP() \
+ CHECK_ARGUMENT(!GET_FLAGS(op) || !(op & SLJIT_KEEP_FLAGS)); \
+ switch (GET_OPCODE(op)) { \
+ case SLJIT_CMP_F64: \
+ CHECK_ARGUMENT(!(op & (SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \
+ CHECK_ARGUMENT((op & (SLJIT_SET_E | SLJIT_SET_S))); \
+ break; \
+ default: \
+ /* Only SLJIT_I32_OP or SLJIT_F32_OP is allowed. */ \
+ CHECK_ARGUMENT(!(op & (SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \
+ break; \
+ }
+
+#define FUNCTION_CHECK_IS_REG(r) \
+ (((r) >= SLJIT_R0 && (r) < (SLJIT_R0 + compiler->scratches)) || \
+ ((r) > (SLJIT_S0 - compiler->saveds) && (r) <= SLJIT_S0))
+
+#define FUNCTION_CHECK_IS_REG_OR_UNUSED(r) \
+ ((r) == SLJIT_UNUSED || \
+ ((r) >= SLJIT_R0 && (r) < (SLJIT_R0 + compiler->scratches)) || \
+ ((r) > (SLJIT_S0 - compiler->saveds) && (r) <= SLJIT_S0))
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+#define CHECK_NOT_VIRTUAL_REGISTER(p) \
+ CHECK_ARGUMENT((p) < SLJIT_R3 || (p) > SLJIT_R6);
+#else
+#define CHECK_NOT_VIRTUAL_REGISTER(p)
+#endif
+
+#define FUNCTION_CHECK_SRC(p, i) \
+ CHECK_ARGUMENT(compiler->scratches != -1 && compiler->saveds != -1); \
+ if (FUNCTION_CHECK_IS_REG(p)) \
+ CHECK_ARGUMENT((i) == 0); \
+ else if ((p) == SLJIT_IMM) \
+ ; \
+ else if ((p) == (SLJIT_MEM1(SLJIT_SP))) \
+ CHECK_ARGUMENT((i) >= 0 && (i) < compiler->logical_local_size); \
+ else { \
+ CHECK_ARGUMENT((p) & SLJIT_MEM); \
+ CHECK_ARGUMENT(FUNCTION_CHECK_IS_REG_OR_UNUSED((p) & REG_MASK)); \
+ CHECK_NOT_VIRTUAL_REGISTER((p) & REG_MASK); \
+ if ((p) & OFFS_REG_MASK) { \
+ CHECK_ARGUMENT(((p) & REG_MASK) != SLJIT_UNUSED); \
+ CHECK_ARGUMENT(FUNCTION_CHECK_IS_REG(OFFS_REG(p))); \
+ CHECK_NOT_VIRTUAL_REGISTER(OFFS_REG(p)); \
+ CHECK_ARGUMENT(!((i) & ~0x3)); \
+ } \
+ CHECK_ARGUMENT(!((p) & ~(SLJIT_MEM | SLJIT_IMM | REG_MASK | OFFS_REG_MASK))); \
+ }
+
+#define FUNCTION_CHECK_DST(p, i) \
+ CHECK_ARGUMENT(compiler->scratches != -1 && compiler->saveds != -1); \
+ if (FUNCTION_CHECK_IS_REG_OR_UNUSED(p)) \
+ CHECK_ARGUMENT((i) == 0); \
+ else if ((p) == (SLJIT_MEM1(SLJIT_SP))) \
+ CHECK_ARGUMENT((i) >= 0 && (i) < compiler->logical_local_size); \
+ else { \
+ CHECK_ARGUMENT((p) & SLJIT_MEM); \
+ CHECK_ARGUMENT(FUNCTION_CHECK_IS_REG_OR_UNUSED((p) & REG_MASK)); \
+ CHECK_NOT_VIRTUAL_REGISTER((p) & REG_MASK); \
+ if ((p) & OFFS_REG_MASK) { \
+ CHECK_ARGUMENT(((p) & REG_MASK) != SLJIT_UNUSED); \
+ CHECK_ARGUMENT(FUNCTION_CHECK_IS_REG(OFFS_REG(p))); \
+ CHECK_NOT_VIRTUAL_REGISTER(OFFS_REG(p)); \
+ CHECK_ARGUMENT(!((i) & ~0x3)); \
+ } \
+ CHECK_ARGUMENT(!((p) & ~(SLJIT_MEM | SLJIT_IMM | REG_MASK | OFFS_REG_MASK))); \
+ }
+
+#define FUNCTION_FCHECK(p, i) \
+ CHECK_ARGUMENT(compiler->fscratches != -1 && compiler->fsaveds != -1); \
+ if (((p) >= SLJIT_FR0 && (p) < (SLJIT_FR0 + compiler->fscratches)) || \
+ ((p) > (SLJIT_FS0 - compiler->fsaveds) && (p) <= SLJIT_FS0)) \
+ CHECK_ARGUMENT(i == 0); \
+ else if ((p) == (SLJIT_MEM1(SLJIT_SP))) \
+ CHECK_ARGUMENT((i) >= 0 && (i) < compiler->logical_local_size); \
+ else { \
+ CHECK_ARGUMENT((p) & SLJIT_MEM); \
+ CHECK_ARGUMENT(FUNCTION_CHECK_IS_REG_OR_UNUSED((p) & REG_MASK)); \
+ CHECK_NOT_VIRTUAL_REGISTER((p) & REG_MASK); \
+ if ((p) & OFFS_REG_MASK) { \
+ CHECK_ARGUMENT(((p) & REG_MASK) != SLJIT_UNUSED); \
+ CHECK_ARGUMENT(FUNCTION_CHECK_IS_REG(OFFS_REG(p))); \
+ CHECK_NOT_VIRTUAL_REGISTER(OFFS_REG(p)); \
+ CHECK_ARGUMENT(((p) & OFFS_REG_MASK) != TO_OFFS_REG(SLJIT_SP) && !(i & ~0x3)); \
+ } \
+ CHECK_ARGUMENT(!((p) & ~(SLJIT_MEM | SLJIT_IMM | REG_MASK | OFFS_REG_MASK))); \
+ }
+
+#define FUNCTION_CHECK_OP1() \
+ if (GET_OPCODE(op) >= SLJIT_MOVU && GET_OPCODE(op) <= SLJIT_MOVU_P) { \
+ CHECK_ARGUMENT(!(src & SLJIT_MEM) || (src & REG_MASK) != SLJIT_SP); \
+ CHECK_ARGUMENT(!(dst & SLJIT_MEM) || (dst & REG_MASK) != SLJIT_SP); \
+ if ((src & SLJIT_MEM) && (src & REG_MASK)) \
+ CHECK_ARGUMENT((dst & REG_MASK) != (src & REG_MASK) && OFFS_REG(dst) != (src & REG_MASK)); \
+ }
+
+#endif /* SLJIT_ARGUMENT_CHECKS */
+
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose)
+{
+ compiler->verbose = verbose;
+}
+
+#if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
+#ifdef _WIN64
+# define SLJIT_PRINT_D "I64"
+#else
+# define SLJIT_PRINT_D "l"
+#endif
+#else
+# define SLJIT_PRINT_D ""
+#endif
+
+#define sljit_verbose_reg(compiler, r) \
+ do { \
+ if ((r) < (SLJIT_R0 + compiler->scratches)) \
+ fprintf(compiler->verbose, "r%d", (r) - SLJIT_R0); \
+ else \
+ fprintf(compiler->verbose, "s%d", SLJIT_NUMBER_OF_REGISTERS - (r)); \
+ } while (0)
+
+#define sljit_verbose_param(compiler, p, i) \
+ if ((p) & SLJIT_IMM) \
+ fprintf(compiler->verbose, "#%" SLJIT_PRINT_D "d", (i)); \
+ else if ((p) & SLJIT_MEM) { \
+ if ((p) & REG_MASK) { \
+ fputc('[', compiler->verbose); \
+ sljit_verbose_reg(compiler, (p) & REG_MASK); \
+ if ((p) & OFFS_REG_MASK) { \
+ fprintf(compiler->verbose, " + "); \
+ sljit_verbose_reg(compiler, OFFS_REG(p)); \
+ if (i) \
+ fprintf(compiler->verbose, " * %d", 1 << (i)); \
+ } \
+ else if (i) \
+ fprintf(compiler->verbose, " + %" SLJIT_PRINT_D "d", (i)); \
+ fputc(']', compiler->verbose); \
+ } \
+ else \
+ fprintf(compiler->verbose, "[#%" SLJIT_PRINT_D "d]", (i)); \
+ } else if (p) \
+ sljit_verbose_reg(compiler, p); \
+ else \
+ fprintf(compiler->verbose, "unused");
+
+#define sljit_verbose_fparam(compiler, p, i) \
+ if ((p) & SLJIT_MEM) { \
+ if ((p) & REG_MASK) { \
+ fputc('[', compiler->verbose); \
+ sljit_verbose_reg(compiler, (p) & REG_MASK); \
+ if ((p) & OFFS_REG_MASK) { \
+ fprintf(compiler->verbose, " + "); \
+ sljit_verbose_reg(compiler, OFFS_REG(p)); \
+ if (i) \
+ fprintf(compiler->verbose, "%d", 1 << (i)); \
+ } \
+ else if (i) \
+ fprintf(compiler->verbose, "%" SLJIT_PRINT_D "d", (i)); \
+ fputc(']', compiler->verbose); \
+ } \
+ else \
+ fprintf(compiler->verbose, "[#%" SLJIT_PRINT_D "d]", (i)); \
+ } \
+ else { \
+ if ((p) < (SLJIT_FR0 + compiler->fscratches)) \
+ fprintf(compiler->verbose, "fr%d", (p) - SLJIT_FR0); \
+ else \
+ fprintf(compiler->verbose, "fs%d", SLJIT_NUMBER_OF_FLOAT_REGISTERS - (p)); \
+ }
+
+static const char* op0_names[] = {
+ (char*)"breakpoint", (char*)"nop", (char*)"lmul.uw", (char*)"lmul.sw",
+ (char*)"divmod.u", (char*)"divmod.s", (char*)"div.u", (char*)"div.s"
+};
+
+static const char* op1_names[] = {
+ (char*)"", (char*)".u8", (char*)".s8", (char*)".u16",
+ (char*)".s16", (char*)".u32", (char*)".s32", (char*)".p",
+ (char*)"", (char*)".u8", (char*)".s8", (char*)".u16",
+ (char*)".s16", (char*)".u32", (char*)".s32", (char*)".p",
+ (char*)"not", (char*)"neg", (char*)"clz",
+};
+
+static const char* op2_names[] = {
+ (char*)"add", (char*)"addc", (char*)"sub", (char*)"subc",
+ (char*)"mul", (char*)"and", (char*)"or", (char*)"xor",
+ (char*)"shl", (char*)"lshr", (char*)"ashr",
+};
+
+static const char* fop1_names[] = {
+ (char*)"mov", (char*)"conv", (char*)"conv", (char*)"conv",
+ (char*)"conv", (char*)"conv", (char*)"cmp", (char*)"neg",
+ (char*)"abs",
+};
+
+static const char* fop2_names[] = {
+ (char*)"add", (char*)"sub", (char*)"mul", (char*)"div"
+};
+
+#define JUMP_POSTFIX(type) \
+ ((type & 0xff) <= SLJIT_MUL_NOT_OVERFLOW ? ((type & SLJIT_I32_OP) ? "32" : "") \
+ : ((type & 0xff) <= SLJIT_ORDERED_F64 ? ((type & SLJIT_F32_OP) ? ".f32" : ".f64") : ""))
+
+static char* jump_names[] = {
+ (char*)"equal", (char*)"not_equal",
+ (char*)"less", (char*)"greater_equal",
+ (char*)"greater", (char*)"less_equal",
+ (char*)"sig_less", (char*)"sig_greater_equal",
+ (char*)"sig_greater", (char*)"sig_less_equal",
+ (char*)"overflow", (char*)"not_overflow",
+ (char*)"mul_overflow", (char*)"mul_not_overflow",
+ (char*)"equal", (char*)"not_equal",
+ (char*)"less", (char*)"greater_equal",
+ (char*)"greater", (char*)"less_equal",
+ (char*)"unordered", (char*)"ordered",
+ (char*)"jump", (char*)"fast_call",
+ (char*)"call0", (char*)"call1", (char*)"call2", (char*)"call3"
+};
+
+#endif /* SLJIT_VERBOSE */
+
+/* --------------------------------------------------------------------- */
+/* Arch dependent */
+/* --------------------------------------------------------------------- */
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) \
+ || (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_generate_code(struct sljit_compiler *compiler)
+{
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ struct sljit_jump *jump;
+#endif
+
+ SLJIT_UNUSED_ARG(compiler);
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(compiler->size > 0);
+ jump = compiler->jumps;
+ while (jump) {
+ /* All jumps have target. */
+ CHECK_ARGUMENT(jump->flags & (JUMP_LABEL | JUMP_ADDR));
+ jump = jump->next;
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_enter(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ SLJIT_UNUSED_ARG(compiler);
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(!(options & ~SLJIT_DOUBLE_ALIGNMENT));
+ CHECK_ARGUMENT(args >= 0 && args <= 3);
+ CHECK_ARGUMENT(scratches >= 0 && scratches <= SLJIT_NUMBER_OF_REGISTERS);
+ CHECK_ARGUMENT(saveds >= 0 && saveds <= SLJIT_NUMBER_OF_REGISTERS);
+ CHECK_ARGUMENT(scratches + saveds <= SLJIT_NUMBER_OF_REGISTERS);
+ CHECK_ARGUMENT(args <= saveds);
+ CHECK_ARGUMENT(fscratches >= 0 && fscratches <= SLJIT_NUMBER_OF_FLOAT_REGISTERS);
+ CHECK_ARGUMENT(fsaveds >= 0 && fsaveds <= SLJIT_NUMBER_OF_FLOAT_REGISTERS);
+ CHECK_ARGUMENT(fscratches + fsaveds <= SLJIT_NUMBER_OF_FLOAT_REGISTERS);
+ CHECK_ARGUMENT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose))
+ fprintf(compiler->verbose, " enter options:none args:%d scratches:%d saveds:%d fscratches:%d fsaveds:%d local_size:%d\n",
+ args, scratches, saveds, fscratches, fsaveds, local_size);
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_set_context(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ if (SLJIT_UNLIKELY(compiler->skip_checks)) {
+ compiler->skip_checks = 0;
+ CHECK_RETURN_OK;
+ }
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(!(options & ~SLJIT_DOUBLE_ALIGNMENT));
+ CHECK_ARGUMENT(args >= 0 && args <= 3);
+ CHECK_ARGUMENT(scratches >= 0 && scratches <= SLJIT_NUMBER_OF_REGISTERS);
+ CHECK_ARGUMENT(saveds >= 0 && saveds <= SLJIT_NUMBER_OF_REGISTERS);
+ CHECK_ARGUMENT(scratches + saveds <= SLJIT_NUMBER_OF_REGISTERS);
+ CHECK_ARGUMENT(args <= saveds);
+ CHECK_ARGUMENT(fscratches >= 0 && fscratches <= SLJIT_NUMBER_OF_FLOAT_REGISTERS);
+ CHECK_ARGUMENT(fsaveds >= 0 && fsaveds <= SLJIT_NUMBER_OF_FLOAT_REGISTERS);
+ CHECK_ARGUMENT(fscratches + fsaveds <= SLJIT_NUMBER_OF_FLOAT_REGISTERS);
+ CHECK_ARGUMENT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose))
+ fprintf(compiler->verbose, " set_context options:none args:%d scratches:%d saveds:%d fscratches:%d fsaveds:%d local_size:%d\n",
+ args, scratches, saveds, fscratches, fsaveds, local_size);
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
+{
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(compiler->scratches >= 0);
+ if (op != SLJIT_UNUSED) {
+ CHECK_ARGUMENT(op >= SLJIT_MOV && op <= SLJIT_MOV_P);
+ FUNCTION_CHECK_SRC(src, srcw);
+ }
+ else
+ CHECK_ARGUMENT(src == 0 && srcw == 0);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ if (op == SLJIT_UNUSED)
+ fprintf(compiler->verbose, " return\n");
+ else {
+ fprintf(compiler->verbose, " return%s ", op1_names[op - SLJIT_OP1_BASE]);
+ sljit_verbose_param(compiler, src, srcw);
+ fprintf(compiler->verbose, "\n");
+ }
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
+{
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ FUNCTION_CHECK_DST(dst, dstw);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " fast_enter ");
+ sljit_verbose_param(compiler, dst, dstw);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw)
+{
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ FUNCTION_CHECK_SRC(src, srcw);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " fast_return ");
+ sljit_verbose_param(compiler, src, srcw);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op)
+{
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT((op >= SLJIT_BREAKPOINT && op <= SLJIT_LMUL_SW)
+ || ((op & ~SLJIT_I32_OP) >= SLJIT_DIVMOD_UW && (op & ~SLJIT_I32_OP) <= SLJIT_DIV_SW));
+ CHECK_ARGUMENT(op < SLJIT_LMUL_UW || compiler->scratches >= 2);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose))
+ {
+ fprintf(compiler->verbose, " %s", op0_names[GET_OPCODE(op) - SLJIT_OP0_BASE]);
+ if (GET_OPCODE(op) >= SLJIT_DIVMOD_UW) {
+ fprintf(compiler->verbose, (op & SLJIT_I32_OP) ? "32" : "w");
+ }
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ if (SLJIT_UNLIKELY(compiler->skip_checks)) {
+ compiler->skip_checks = 0;
+ CHECK_RETURN_OK;
+ }
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(GET_OPCODE(op) >= SLJIT_MOV && GET_OPCODE(op) <= SLJIT_CLZ);
+ FUNCTION_CHECK_OP();
+ FUNCTION_CHECK_SRC(src, srcw);
+ FUNCTION_CHECK_DST(dst, dstw);
+ FUNCTION_CHECK_OP1();
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ if (GET_OPCODE(op) <= SLJIT_MOVU_P)
+ {
+ fprintf(compiler->verbose, " mov%s%s%s ", (GET_OPCODE(op) >= SLJIT_MOVU) ? "u" : "",
+ !(op & SLJIT_I32_OP) ? "" : "32", (op != SLJIT_MOV32 && op != SLJIT_MOVU32) ? op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE] : "");
+ }
+ else
+ {
+ fprintf(compiler->verbose, " %s%s%s%s%s%s%s%s ", op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE], !(op & SLJIT_I32_OP) ? "" : "32",
+ !(op & SLJIT_SET_E) ? "" : ".e", !(op & SLJIT_SET_U) ? "" : ".u", !(op & SLJIT_SET_S) ? "" : ".s",
+ !(op & SLJIT_SET_O) ? "" : ".o", !(op & SLJIT_SET_C) ? "" : ".c", !(op & SLJIT_KEEP_FLAGS) ? "" : ".k");
+ }
+
+ sljit_verbose_param(compiler, dst, dstw);
+ fprintf(compiler->verbose, ", ");
+ sljit_verbose_param(compiler, src, srcw);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ if (SLJIT_UNLIKELY(compiler->skip_checks)) {
+ compiler->skip_checks = 0;
+ CHECK_RETURN_OK;
+ }
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(GET_OPCODE(op) >= SLJIT_ADD && GET_OPCODE(op) <= SLJIT_ASHR);
+ FUNCTION_CHECK_OP();
+ FUNCTION_CHECK_SRC(src1, src1w);
+ FUNCTION_CHECK_SRC(src2, src2w);
+ FUNCTION_CHECK_DST(dst, dstw);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " %s%s%s%s%s%s%s%s ", op2_names[GET_OPCODE(op) - SLJIT_OP2_BASE], !(op & SLJIT_I32_OP) ? "" : "32",
+ !(op & SLJIT_SET_E) ? "" : ".e", !(op & SLJIT_SET_U) ? "" : ".u", !(op & SLJIT_SET_S) ? "" : ".s",
+ !(op & SLJIT_SET_O) ? "" : ".o", !(op & SLJIT_SET_C) ? "" : ".c", !(op & SLJIT_KEEP_FLAGS) ? "" : ".k");
+ sljit_verbose_param(compiler, dst, dstw);
+ fprintf(compiler->verbose, ", ");
+ sljit_verbose_param(compiler, src1, src1w);
+ fprintf(compiler->verbose, ", ");
+ sljit_verbose_param(compiler, src2, src2w);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_get_register_index(sljit_s32 reg)
+{
+ SLJIT_UNUSED_ARG(reg);
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(reg > 0 && reg <= SLJIT_NUMBER_OF_REGISTERS);
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_get_float_register_index(sljit_s32 reg)
+{
+ SLJIT_UNUSED_ARG(reg);
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(reg > 0 && reg <= SLJIT_NUMBER_OF_FLOAT_REGISTERS);
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_custom(struct sljit_compiler *compiler,
+ void *instruction, sljit_s32 size)
+{
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ int i;
+#endif
+
+ SLJIT_UNUSED_ARG(compiler);
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(instruction);
+#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+ CHECK_ARGUMENT(size > 0 && size < 16);
+#elif (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
+ CHECK_ARGUMENT((size == 2 && (((sljit_sw)instruction) & 0x1) == 0)
+ || (size == 4 && (((sljit_sw)instruction) & 0x3) == 0));
+#else
+ CHECK_ARGUMENT(size == 4 && (((sljit_sw)instruction) & 0x3) == 0);
+#endif
+
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " op_custom");
+ for (i = 0; i < size; i++)
+ fprintf(compiler->verbose, " 0x%x", ((sljit_u8*)instruction)[i]);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ if (SLJIT_UNLIKELY(compiler->skip_checks)) {
+ compiler->skip_checks = 0;
+ CHECK_RETURN_OK;
+ }
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(sljit_is_fpu_available());
+ CHECK_ARGUMENT(GET_OPCODE(op) >= SLJIT_MOV_F64 && GET_OPCODE(op) <= SLJIT_ABS_F64);
+ FUNCTION_CHECK_FOP();
+ FUNCTION_FCHECK(src, srcw);
+ FUNCTION_FCHECK(dst, dstw);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32)
+ fprintf(compiler->verbose, " %s%s ", fop1_names[SLJIT_CONV_F64_FROM_F32 - SLJIT_FOP1_BASE],
+ (op & SLJIT_F32_OP) ? ".f32.from.f64" : ".f64.from.f32");
+ else
+ fprintf(compiler->verbose, " %s%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE],
+ (op & SLJIT_F32_OP) ? ".f32" : ".f64");
+
+ sljit_verbose_fparam(compiler, dst, dstw);
+ fprintf(compiler->verbose, ", ");
+ sljit_verbose_fparam(compiler, src, srcw);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ if (SLJIT_UNLIKELY(compiler->skip_checks)) {
+ compiler->skip_checks = 0;
+ CHECK_RETURN_OK;
+ }
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(sljit_is_fpu_available());
+ CHECK_ARGUMENT(GET_OPCODE(op) == SLJIT_CMP_F64);
+ FUNCTION_CHECK_FOP();
+ FUNCTION_FCHECK(src1, src1w);
+ FUNCTION_FCHECK(src2, src2w);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " %s%s%s%s ", fop1_names[SLJIT_CMP_F64 - SLJIT_FOP1_BASE], (op & SLJIT_F32_OP) ? ".f32" : ".f64",
+ (op & SLJIT_SET_E) ? ".e" : "", (op & SLJIT_SET_S) ? ".s" : "");
+ sljit_verbose_fparam(compiler, src1, src1w);
+ fprintf(compiler->verbose, ", ");
+ sljit_verbose_fparam(compiler, src2, src2w);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ if (SLJIT_UNLIKELY(compiler->skip_checks)) {
+ compiler->skip_checks = 0;
+ CHECK_RETURN_OK;
+ }
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(sljit_is_fpu_available());
+ CHECK_ARGUMENT(GET_OPCODE(op) >= SLJIT_CONV_SW_FROM_F64 && GET_OPCODE(op) <= SLJIT_CONV_S32_FROM_F64);
+ FUNCTION_CHECK_FOP();
+ FUNCTION_FCHECK(src, srcw);
+ FUNCTION_CHECK_DST(dst, dstw);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " %s%s.from%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE],
+ (GET_OPCODE(op) == SLJIT_CONV_S32_FROM_F64) ? ".s32" : ".sw",
+ (op & SLJIT_F32_OP) ? ".f32" : ".f64");
+ sljit_verbose_param(compiler, dst, dstw);
+ fprintf(compiler->verbose, ", ");
+ sljit_verbose_fparam(compiler, src, srcw);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop1_conv_f64_from_sw(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ if (SLJIT_UNLIKELY(compiler->skip_checks)) {
+ compiler->skip_checks = 0;
+ CHECK_RETURN_OK;
+ }
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(sljit_is_fpu_available());
+ CHECK_ARGUMENT(GET_OPCODE(op) >= SLJIT_CONV_F64_FROM_SW && GET_OPCODE(op) <= SLJIT_CONV_F64_FROM_S32);
+ FUNCTION_CHECK_FOP();
+ FUNCTION_CHECK_SRC(src, srcw);
+ FUNCTION_FCHECK(dst, dstw);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " %s%s.from%s ", fop1_names[GET_OPCODE(op) - SLJIT_FOP1_BASE],
+ (op & SLJIT_F32_OP) ? ".f32" : ".f64",
+ (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32) ? ".s32" : ".sw");
+ sljit_verbose_fparam(compiler, dst, dstw);
+ fprintf(compiler->verbose, ", ");
+ sljit_verbose_param(compiler, src, srcw);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(sljit_is_fpu_available());
+ CHECK_ARGUMENT(GET_OPCODE(op) >= SLJIT_ADD_F64 && GET_OPCODE(op) <= SLJIT_DIV_F64);
+ FUNCTION_CHECK_FOP();
+ FUNCTION_FCHECK(src1, src1w);
+ FUNCTION_FCHECK(src2, src2w);
+ FUNCTION_FCHECK(dst, dstw);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " %s%s ", fop2_names[GET_OPCODE(op) - SLJIT_FOP2_BASE], (op & SLJIT_F32_OP) ? ".f32" : ".f64");
+ sljit_verbose_fparam(compiler, dst, dstw);
+ fprintf(compiler->verbose, ", ");
+ sljit_verbose_fparam(compiler, src1, src1w);
+ fprintf(compiler->verbose, ", ");
+ sljit_verbose_fparam(compiler, src2, src2w);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_label(struct sljit_compiler *compiler)
+{
+ SLJIT_UNUSED_ARG(compiler);
+
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose))
+ fprintf(compiler->verbose, "label:\n");
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_jump(struct sljit_compiler *compiler, sljit_s32 type)
+{
+ if (SLJIT_UNLIKELY(compiler->skip_checks)) {
+ compiler->skip_checks = 0;
+ CHECK_RETURN_OK;
+ }
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP | SLJIT_I32_OP)));
+ CHECK_ARGUMENT((type & 0xff) >= SLJIT_EQUAL && (type & 0xff) <= SLJIT_CALL3);
+ CHECK_ARGUMENT((type & 0xff) < SLJIT_JUMP || !(type & SLJIT_I32_OP));
+ CHECK_ARGUMENT((type & 0xff) <= SLJIT_CALL0 || ((type & 0xff) - SLJIT_CALL0) <= compiler->scratches);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose))
+ fprintf(compiler->verbose, " jump%s %s%s\n", !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r",
+ jump_names[type & 0xff], JUMP_POSTFIX(type));
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s32 type,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP | SLJIT_I32_OP)));
+ CHECK_ARGUMENT((type & 0xff) >= SLJIT_EQUAL && (type & 0xff) <= SLJIT_SIG_LESS_EQUAL);
+ FUNCTION_CHECK_SRC(src1, src1w);
+ FUNCTION_CHECK_SRC(src2, src2w);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " cmp%s %s%s, ", !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r",
+ jump_names[type & 0xff], (type & SLJIT_I32_OP) ? "32" : "");
+ sljit_verbose_param(compiler, src1, src1w);
+ fprintf(compiler->verbose, ", ");
+ sljit_verbose_param(compiler, src2, src2w);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_s32 type,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(sljit_is_fpu_available());
+ CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP | SLJIT_F32_OP)));
+ CHECK_ARGUMENT((type & 0xff) >= SLJIT_EQUAL_F64 && (type & 0xff) <= SLJIT_ORDERED_F64);
+ FUNCTION_FCHECK(src1, src1w);
+ FUNCTION_FCHECK(src2, src2w);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " fcmp%s %s%s, ", !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r",
+ jump_names[type & 0xff], (type & SLJIT_F32_OP) ? ".f32" : ".f64");
+ sljit_verbose_fparam(compiler, src1, src1w);
+ fprintf(compiler->verbose, ", ");
+ sljit_verbose_fparam(compiler, src2, src2w);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 src, sljit_sw srcw)
+{
+ if (SLJIT_UNLIKELY(compiler->skip_checks)) {
+ compiler->skip_checks = 0;
+ CHECK_RETURN_OK;
+ }
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(type >= SLJIT_JUMP && type <= SLJIT_CALL3);
+ CHECK_ARGUMENT(type <= SLJIT_CALL0 || (type - SLJIT_CALL0) <= compiler->scratches);
+ FUNCTION_CHECK_SRC(src, srcw);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " ijump.%s ", jump_names[type]);
+ sljit_verbose_param(compiler, src, srcw);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw,
+ sljit_s32 type)
+{
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_I32_OP)));
+ CHECK_ARGUMENT((type & 0xff) >= SLJIT_EQUAL && (type & 0xff) <= SLJIT_ORDERED_F64);
+ CHECK_ARGUMENT(op == SLJIT_MOV || GET_OPCODE(op) == SLJIT_MOV_U32 || GET_OPCODE(op) == SLJIT_MOV_S32
+ || (GET_OPCODE(op) >= SLJIT_AND && GET_OPCODE(op) <= SLJIT_XOR));
+ CHECK_ARGUMENT((op & (SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O | SLJIT_SET_C)) == 0);
+ CHECK_ARGUMENT((op & (SLJIT_SET_E | SLJIT_KEEP_FLAGS)) != (SLJIT_SET_E | SLJIT_KEEP_FLAGS));
+ if (GET_OPCODE(op) < SLJIT_ADD) {
+ CHECK_ARGUMENT(src == SLJIT_UNUSED && srcw == 0);
+ } else {
+ CHECK_ARGUMENT(src == dst && srcw == dstw);
+ }
+ FUNCTION_CHECK_DST(dst, dstw);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " flags %s%s%s%s, ",
+ !(op & SLJIT_SET_E) ? "" : ".e", !(op & SLJIT_KEEP_FLAGS) ? "" : ".k",
+ GET_OPCODE(op) < SLJIT_OP2_BASE ? "mov" : op2_names[GET_OPCODE(op) - SLJIT_OP2_BASE],
+ GET_OPCODE(op) < SLJIT_OP2_BASE ? op1_names[GET_OPCODE(op) - SLJIT_OP1_BASE] : ((op & SLJIT_I32_OP) ? "32" : ""));
+ sljit_verbose_param(compiler, dst, dstw);
+ if (src != SLJIT_UNUSED) {
+ fprintf(compiler->verbose, ", ");
+ sljit_verbose_param(compiler, src, srcw);
+ }
+ fprintf(compiler->verbose, ", %s%s\n", jump_names[type & 0xff], JUMP_POSTFIX(type));
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw offset)
+{
+ SLJIT_UNUSED_ARG(offset);
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ FUNCTION_CHECK_DST(dst, dstw);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " local_base ");
+ sljit_verbose_param(compiler, dst, dstw);
+ fprintf(compiler->verbose, ", #%" SLJIT_PRINT_D "d\n", offset);
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+static SLJIT_INLINE CHECK_RETURN_TYPE check_sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value)
+{
+ SLJIT_UNUSED_ARG(init_value);
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ FUNCTION_CHECK_DST(dst, dstw);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " const ");
+ sljit_verbose_param(compiler, dst, dstw);
+ fprintf(compiler->verbose, ", #%" SLJIT_PRINT_D "d\n", init_value);
+ }
+#endif
+ CHECK_RETURN_OK;
+}
+
+#endif /* SLJIT_ARGUMENT_CHECKS || SLJIT_VERBOSE */
+
+#define SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw) \
+ SLJIT_COMPILE_ASSERT(!(SLJIT_CONV_SW_FROM_F64 & 0x1) && !(SLJIT_CONV_F64_FROM_SW & 0x1), \
+ invalid_float_opcodes); \
+ if (GET_OPCODE(op) >= SLJIT_CONV_SW_FROM_F64 && GET_OPCODE(op) <= SLJIT_CMP_F64) { \
+ if (GET_OPCODE(op) == SLJIT_CMP_F64) { \
+ CHECK(check_sljit_emit_fop1_cmp(compiler, op, dst, dstw, src, srcw)); \
+ ADJUST_LOCAL_OFFSET(dst, dstw); \
+ ADJUST_LOCAL_OFFSET(src, srcw); \
+ return sljit_emit_fop1_cmp(compiler, op, dst, dstw, src, srcw); \
+ } \
+ if ((GET_OPCODE(op) | 0x1) == SLJIT_CONV_S32_FROM_F64) { \
+ CHECK(check_sljit_emit_fop1_conv_sw_from_f64(compiler, op, dst, dstw, src, srcw)); \
+ ADJUST_LOCAL_OFFSET(dst, dstw); \
+ ADJUST_LOCAL_OFFSET(src, srcw); \
+ return sljit_emit_fop1_conv_sw_from_f64(compiler, op, dst, dstw, src, srcw); \
+ } \
+ CHECK(check_sljit_emit_fop1_conv_f64_from_sw(compiler, op, dst, dstw, src, srcw)); \
+ ADJUST_LOCAL_OFFSET(dst, dstw); \
+ ADJUST_LOCAL_OFFSET(src, srcw); \
+ return sljit_emit_fop1_conv_f64_from_sw(compiler, op, dst, dstw, src, srcw); \
+ } \
+ CHECK(check_sljit_emit_fop1(compiler, op, dst, dstw, src, srcw)); \
+ ADJUST_LOCAL_OFFSET(dst, dstw); \
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+static SLJIT_INLINE sljit_s32 emit_mov_before_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
+{
+ /* Return if don't need to do anything. */
+ if (op == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+#if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
+ /* At the moment the pointer size is always equal to sljit_sw. May be changed in the future. */
+ if (src == SLJIT_RETURN_REG && (op == SLJIT_MOV || op == SLJIT_MOV_P))
+ return SLJIT_SUCCESS;
+#else
+ if (src == SLJIT_RETURN_REG && (op == SLJIT_MOV || op == SLJIT_MOV_U32 || op == SLJIT_MOV_S32 || op == SLJIT_MOV_P))
+ return SLJIT_SUCCESS;
+#endif
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) \
+ || (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ compiler->skip_checks = 1;
+#endif
+ return sljit_emit_op1(compiler, op, SLJIT_RETURN_REG, 0, src, srcw);
+}
+
+/* CPU description section */
+
+#if (defined SLJIT_32BIT_ARCHITECTURE && SLJIT_32BIT_ARCHITECTURE)
+#define SLJIT_CPUINFO_PART1 " 32bit ("
+#elif (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
+#define SLJIT_CPUINFO_PART1 " 64bit ("
+#else
+#error "Internal error: CPU type info missing"
+#endif
+
+#if (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
+#define SLJIT_CPUINFO_PART2 "little endian + "
+#elif (defined SLJIT_BIG_ENDIAN && SLJIT_BIG_ENDIAN)
+#define SLJIT_CPUINFO_PART2 "big endian + "
+#else
+#error "Internal error: CPU type info missing"
+#endif
+
+#if (defined SLJIT_UNALIGNED && SLJIT_UNALIGNED)
+#define SLJIT_CPUINFO_PART3 "unaligned)"
+#else
+#define SLJIT_CPUINFO_PART3 "aligned)"
+#endif
+
+#define SLJIT_CPUINFO SLJIT_CPUINFO_PART1 SLJIT_CPUINFO_PART2 SLJIT_CPUINFO_PART3
+
+#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+# include "sljitNativeX86_common.c"
+#elif (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+# include "sljitNativeARM_32.c"
+#elif (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
+# include "sljitNativeARM_32.c"
+#elif (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
+# include "sljitNativeARM_T2_32.c"
+#elif (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64)
+# include "sljitNativeARM_64.c"
+#elif (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC)
+# include "sljitNativePPC_common.c"
+#elif (defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS)
+# include "sljitNativeMIPS_common.c"
+#elif (defined SLJIT_CONFIG_SPARC && SLJIT_CONFIG_SPARC)
+# include "sljitNativeSPARC_common.c"
+#elif (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX)
+# include "sljitNativeTILEGX_64.c"
+#endif
+
+#if !(defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS)
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s32 type,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ /* Default compare for most architectures. */
+ sljit_s32 flags, tmp_src, condition;
+ sljit_sw tmp_srcw;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_cmp(compiler, type, src1, src1w, src2, src2w));
+
+ condition = type & 0xff;
+#if (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64)
+ if ((condition == SLJIT_EQUAL || condition == SLJIT_NOT_EQUAL)) {
+ if ((src1 & SLJIT_IMM) && !src1w) {
+ src1 = src2;
+ src1w = src2w;
+ src2 = SLJIT_IMM;
+ src2w = 0;
+ }
+ if ((src2 & SLJIT_IMM) && !src2w)
+ return emit_cmp_to0(compiler, type, src1, src1w);
+ }
+#endif
+
+ if (SLJIT_UNLIKELY((src1 & SLJIT_IMM) && !(src2 & SLJIT_IMM))) {
+ /* Immediate is prefered as second argument by most architectures. */
+ switch (condition) {
+ case SLJIT_LESS:
+ condition = SLJIT_GREATER;
+ break;
+ case SLJIT_GREATER_EQUAL:
+ condition = SLJIT_LESS_EQUAL;
+ break;
+ case SLJIT_GREATER:
+ condition = SLJIT_LESS;
+ break;
+ case SLJIT_LESS_EQUAL:
+ condition = SLJIT_GREATER_EQUAL;
+ break;
+ case SLJIT_SIG_LESS:
+ condition = SLJIT_SIG_GREATER;
+ break;
+ case SLJIT_SIG_GREATER_EQUAL:
+ condition = SLJIT_SIG_LESS_EQUAL;
+ break;
+ case SLJIT_SIG_GREATER:
+ condition = SLJIT_SIG_LESS;
+ break;
+ case SLJIT_SIG_LESS_EQUAL:
+ condition = SLJIT_SIG_GREATER_EQUAL;
+ break;
+ }
+ type = condition | (type & (SLJIT_I32_OP | SLJIT_REWRITABLE_JUMP));
+ tmp_src = src1;
+ src1 = src2;
+ src2 = tmp_src;
+ tmp_srcw = src1w;
+ src1w = src2w;
+ src2w = tmp_srcw;
+ }
+
+ if (condition <= SLJIT_NOT_ZERO)
+ flags = SLJIT_SET_E;
+ else if (condition <= SLJIT_LESS_EQUAL)
+ flags = SLJIT_SET_U;
+ else
+ flags = SLJIT_SET_S;
+
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
+ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ compiler->skip_checks = 1;
+#endif
+ PTR_FAIL_IF(sljit_emit_op2(compiler, SLJIT_SUB | flags | (type & SLJIT_I32_OP),
+ SLJIT_UNUSED, 0, src1, src1w, src2, src2w));
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
+ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ compiler->skip_checks = 1;
+#endif
+ return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_s32 type,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_s32 flags, condition;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_fcmp(compiler, type, src1, src1w, src2, src2w));
+
+ condition = type & 0xff;
+ flags = (condition <= SLJIT_NOT_EQUAL_F64) ? SLJIT_SET_E : SLJIT_SET_S;
+ if (type & SLJIT_F32_OP)
+ flags |= SLJIT_F32_OP;
+
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
+ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ compiler->skip_checks = 1;
+#endif
+ sljit_emit_fop1(compiler, SLJIT_CMP_F64 | flags, src1, src1w, src2, src2w);
+
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
+ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ compiler->skip_checks = 1;
+#endif
+ return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));
+}
+
+#endif
+
+#if !(defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw offset)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_get_local_base(compiler, dst, dstw, offset));
+
+ ADJUST_LOCAL_OFFSET(SLJIT_MEM1(SLJIT_SP), offset);
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
+ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ compiler->skip_checks = 1;
+#endif
+ if (offset != 0)
+ return sljit_emit_op2(compiler, SLJIT_ADD | SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_SP, 0, SLJIT_IMM, offset);
+ return sljit_emit_op1(compiler, SLJIT_MOV, dst, dstw, SLJIT_SP, 0);
+}
+
+#endif
+
+#else /* SLJIT_CONFIG_UNSUPPORTED */
+
+/* Empty function bodies for those machines, which are not (yet) supported. */
+
+SLJIT_API_FUNC_ATTRIBUTE const char* sljit_get_platform_name(void)
+{
+ return "unsupported";
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void)
+{
+ SLJIT_ASSERT_STOP();
+ return NULL;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_ASSERT_STOP();
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, sljit_s32 size)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(size);
+ SLJIT_ASSERT_STOP();
+ return NULL;
+}
+
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(verbose);
+ SLJIT_ASSERT_STOP();
+}
+#endif
+
+SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_ASSERT_STOP();
+ return NULL;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code)
+{
+ SLJIT_UNUSED_ARG(code);
+ SLJIT_ASSERT_STOP();
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(options);
+ SLJIT_UNUSED_ARG(args);
+ SLJIT_UNUSED_ARG(scratches);
+ SLJIT_UNUSED_ARG(saveds);
+ SLJIT_UNUSED_ARG(fscratches);
+ SLJIT_UNUSED_ARG(fsaveds);
+ SLJIT_UNUSED_ARG(local_size);
+ SLJIT_ASSERT_STOP();
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(options);
+ SLJIT_UNUSED_ARG(args);
+ SLJIT_UNUSED_ARG(scratches);
+ SLJIT_UNUSED_ARG(saveds);
+ SLJIT_UNUSED_ARG(fscratches);
+ SLJIT_UNUSED_ARG(fsaveds);
+ SLJIT_UNUSED_ARG(local_size);
+ SLJIT_ASSERT_STOP();
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(op);
+ SLJIT_UNUSED_ARG(src);
+ SLJIT_UNUSED_ARG(srcw);
+ SLJIT_ASSERT_STOP();
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(dst);
+ SLJIT_UNUSED_ARG(dstw);
+ SLJIT_ASSERT_STOP();
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(src);
+ SLJIT_UNUSED_ARG(srcw);
+ SLJIT_ASSERT_STOP();
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(op);
+ SLJIT_ASSERT_STOP();
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(op);
+ SLJIT_UNUSED_ARG(dst);
+ SLJIT_UNUSED_ARG(dstw);
+ SLJIT_UNUSED_ARG(src);
+ SLJIT_UNUSED_ARG(srcw);
+ SLJIT_ASSERT_STOP();
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(op);
+ SLJIT_UNUSED_ARG(dst);
+ SLJIT_UNUSED_ARG(dstw);
+ SLJIT_UNUSED_ARG(src1);
+ SLJIT_UNUSED_ARG(src1w);
+ SLJIT_UNUSED_ARG(src2);
+ SLJIT_UNUSED_ARG(src2w);
+ SLJIT_ASSERT_STOP();
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_register_index(sljit_s32 reg)
+{
+ SLJIT_ASSERT_STOP();
+ return reg;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler,
+ void *instruction, sljit_s32 size)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(instruction);
+ SLJIT_UNUSED_ARG(size);
+ SLJIT_ASSERT_STOP();
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_is_fpu_available(void)
+{
+ SLJIT_ASSERT_STOP();
+ return 0;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(op);
+ SLJIT_UNUSED_ARG(dst);
+ SLJIT_UNUSED_ARG(dstw);
+ SLJIT_UNUSED_ARG(src);
+ SLJIT_UNUSED_ARG(srcw);
+ SLJIT_ASSERT_STOP();
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(op);
+ SLJIT_UNUSED_ARG(dst);
+ SLJIT_UNUSED_ARG(dstw);
+ SLJIT_UNUSED_ARG(src1);
+ SLJIT_UNUSED_ARG(src1w);
+ SLJIT_UNUSED_ARG(src2);
+ SLJIT_UNUSED_ARG(src2w);
+ SLJIT_ASSERT_STOP();
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_ASSERT_STOP();
+ return NULL;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_s32 type)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(type);
+ SLJIT_ASSERT_STOP();
+ return NULL;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s32 type,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(type);
+ SLJIT_UNUSED_ARG(src1);
+ SLJIT_UNUSED_ARG(src1w);
+ SLJIT_UNUSED_ARG(src2);
+ SLJIT_UNUSED_ARG(src2w);
+ SLJIT_ASSERT_STOP();
+ return NULL;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_s32 type,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(type);
+ SLJIT_UNUSED_ARG(src1);
+ SLJIT_UNUSED_ARG(src1w);
+ SLJIT_UNUSED_ARG(src2);
+ SLJIT_UNUSED_ARG(src2w);
+ SLJIT_ASSERT_STOP();
+ return NULL;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label)
+{
+ SLJIT_UNUSED_ARG(jump);
+ SLJIT_UNUSED_ARG(label);
+ SLJIT_ASSERT_STOP();
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw target)
+{
+ SLJIT_UNUSED_ARG(jump);
+ SLJIT_UNUSED_ARG(target);
+ SLJIT_ASSERT_STOP();
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 src, sljit_sw srcw)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(type);
+ SLJIT_UNUSED_ARG(src);
+ SLJIT_UNUSED_ARG(srcw);
+ SLJIT_ASSERT_STOP();
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw,
+ sljit_s32 type)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(op);
+ SLJIT_UNUSED_ARG(dst);
+ SLJIT_UNUSED_ARG(dstw);
+ SLJIT_UNUSED_ARG(src);
+ SLJIT_UNUSED_ARG(srcw);
+ SLJIT_UNUSED_ARG(type);
+ SLJIT_ASSERT_STOP();
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw offset)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(dst);
+ SLJIT_UNUSED_ARG(dstw);
+ SLJIT_UNUSED_ARG(offset);
+ SLJIT_ASSERT_STOP();
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw initval)
+{
+ SLJIT_UNUSED_ARG(compiler);
+ SLJIT_UNUSED_ARG(dst);
+ SLJIT_UNUSED_ARG(dstw);
+ SLJIT_UNUSED_ARG(initval);
+ SLJIT_ASSERT_STOP();
+ return NULL;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset)
+{
+ SLJIT_UNUSED_ARG(addr);
+ SLJIT_UNUSED_ARG(new_target);
+ SLJIT_UNUSED_ARG(executable_offset);
+ SLJIT_ASSERT_STOP();
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset)
+{
+ SLJIT_UNUSED_ARG(addr);
+ SLJIT_UNUSED_ARG(new_constant);
+ SLJIT_UNUSED_ARG(executable_offset);
+ SLJIT_ASSERT_STOP();
+}
+
+#endif
diff --git a/thirdparty/pcre2/src/sljit/sljitLir.h b/thirdparty/pcre2/src/sljit/sljitLir.h
new file mode 100644
index 0000000000..f24f556b56
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitLir.h
@@ -0,0 +1,1269 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _SLJIT_LIR_H_
+#define _SLJIT_LIR_H_
+
+/*
+ ------------------------------------------------------------------------
+ Stack-Less JIT compiler for multiple architectures (x86, ARM, PowerPC)
+ ------------------------------------------------------------------------
+
+ Short description
+ Advantages:
+ - The execution can be continued from any LIR instruction. In other
+ words, it is possible to jump to any label from anywhere, even from
+ a code fragment, which is compiled later, if both compiled code
+ shares the same context. See sljit_emit_enter for more details
+ - Supports self modifying code: target of (conditional) jump and call
+ instructions and some constant values can be dynamically modified
+ during runtime
+ - although it is not suggested to do it frequently
+ - can be used for inline caching: save an important value once
+ in the instruction stream
+ - since this feature limits the optimization possibilities, a
+ special flag must be passed at compile time when these
+ instructions are emitted
+ - A fixed stack space can be allocated for local variables
+ - The compiler is thread-safe
+ - The compiler is highly configurable through preprocessor macros.
+ You can disable unneeded features (multithreading in single
+ threaded applications), and you can use your own system functions
+ (including memory allocators). See sljitConfig.h
+ Disadvantages:
+ - No automatic register allocation, and temporary results are
+ not stored on the stack. (hence the name comes)
+ In practice:
+ - This approach is very effective for interpreters
+ - One of the saved registers typically points to a stack interface
+ - It can jump to any exception handler anytime (even if it belongs
+ to another function)
+ - Hot paths can be modified during runtime reflecting the changes
+ of the fastest execution path of the dynamic language
+ - SLJIT supports complex memory addressing modes
+ - mainly position and context independent code (except some cases)
+
+ For valgrind users:
+ - pass --smc-check=all argument to valgrind, since JIT is a "self-modifying code"
+*/
+
+#if !(defined SLJIT_NO_DEFAULT_CONFIG && SLJIT_NO_DEFAULT_CONFIG)
+#include "sljitConfig.h"
+#endif
+
+/* The following header file defines useful macros for fine tuning
+sljit based code generators. They are listed in the beginning
+of sljitConfigInternal.h */
+
+#include "sljitConfigInternal.h"
+
+/* --------------------------------------------------------------------- */
+/* Error codes */
+/* --------------------------------------------------------------------- */
+
+/* Indicates no error. */
+#define SLJIT_SUCCESS 0
+/* After the call of sljit_generate_code(), the error code of the compiler
+ is set to this value to avoid future sljit calls (in debug mode at least).
+ The complier should be freed after sljit_generate_code(). */
+#define SLJIT_ERR_COMPILED 1
+/* Cannot allocate non executable memory. */
+#define SLJIT_ERR_ALLOC_FAILED 2
+/* Cannot allocate executable memory.
+ Only for sljit_generate_code() */
+#define SLJIT_ERR_EX_ALLOC_FAILED 3
+/* Return value for SLJIT_CONFIG_UNSUPPORTED placeholder architecture. */
+#define SLJIT_ERR_UNSUPPORTED 4
+/* An ivalid argument is passed to any SLJIT function. */
+#define SLJIT_ERR_BAD_ARGUMENT 5
+/* Dynamic code modification is not enabled. */
+#define SLJIT_ERR_DYN_CODE_MOD 6
+
+/* --------------------------------------------------------------------- */
+/* Registers */
+/* --------------------------------------------------------------------- */
+
+/*
+ Scratch (R) registers: registers whose may not preserve their values
+ across function calls.
+
+ Saved (S) registers: registers whose preserve their values across
+ function calls.
+
+ The scratch and saved register sets are overlap. The last scratch register
+ is the first saved register, the one before the last is the second saved
+ register, and so on.
+
+ If an architecture provides two scratch and three saved registers,
+ its scratch and saved register sets are the following:
+
+ R0 | [S4] | R0 and S4 represent the same physical register
+ R1 | [S3] | R1 and S3 represent the same physical register
+ [R2] | S2 | R2 and S2 represent the same physical register
+ [R3] | S1 | R3 and S1 represent the same physical register
+ [R4] | S0 | R4 and S0 represent the same physical register
+
+ Note: SLJIT_NUMBER_OF_SCRATCH_REGISTERS would be 2 and
+ SLJIT_NUMBER_OF_SAVED_REGISTERS would be 3 for this architecture.
+
+ Note: On all supported architectures SLJIT_NUMBER_OF_REGISTERS >= 10
+ and SLJIT_NUMBER_OF_SAVED_REGISTERS >= 5. However, 4 registers
+ are virtual on x86-32. See below.
+
+ The purpose of this definition is convenience. Although a register
+ is either scratch register or saved register, SLJIT allows accessing
+ them from the other set. For example, four registers can be used as
+ scratch registers and the fifth one as saved register on the architecture
+ above. Of course the last two scratch registers (R2 and R3) from this
+ four will be saved on the stack, because they are defined as saved
+ registers in the application binary interface. Still R2 and R3 can be
+ used for referencing to these registers instead of S2 and S1, which
+ makes easier to write platform independent code. Scratch registers
+ can be saved registers in a similar way, but these extra saved
+ registers will not be preserved across function calls! Hence the
+ application must save them on those platforms, where the number of
+ saved registers is too low. This can be done by copy them onto
+ the stack and restore them after a function call.
+
+ Note: To emphasize that registers assigned to R2-R4 are saved
+ registers, they are enclosed by square brackets. S3-S4
+ are marked in a similar way.
+
+ Note: sljit_emit_enter and sljit_set_context defines whether a register
+ is S or R register. E.g: when 3 scratches and 1 saved is mapped
+ by sljit_emit_enter, the allowed register set will be: R0-R2 and
+ S0. Although S2 is mapped to the same position as R2, it does not
+ available in the current configuration. Furthermore the R3 (S1)
+ register does not available as well.
+*/
+
+/* When SLJIT_UNUSED is specified as destination, the result is discarded. */
+#define SLJIT_UNUSED 0
+
+/* Scratch registers. */
+#define SLJIT_R0 1
+#define SLJIT_R1 2
+#define SLJIT_R2 3
+/* Note: on x86-32, R3 - R6 (same as S3 - S6) are emulated (they
+ are allocated on the stack). These registers are called virtual
+ and cannot be used for memory addressing (cannot be part of
+ any SLJIT_MEM1, SLJIT_MEM2 construct). There is no such
+ limitation on other CPUs. See sljit_get_register_index(). */
+#define SLJIT_R3 4
+#define SLJIT_R4 5
+#define SLJIT_R5 6
+#define SLJIT_R6 7
+#define SLJIT_R7 8
+#define SLJIT_R8 9
+#define SLJIT_R9 10
+/* All R registers provided by the architecture can be accessed by SLJIT_R(i)
+ The i parameter must be >= 0 and < SLJIT_NUMBER_OF_REGISTERS. */
+#define SLJIT_R(i) (1 + (i))
+
+/* Saved registers. */
+#define SLJIT_S0 (SLJIT_NUMBER_OF_REGISTERS)
+#define SLJIT_S1 (SLJIT_NUMBER_OF_REGISTERS - 1)
+#define SLJIT_S2 (SLJIT_NUMBER_OF_REGISTERS - 2)
+/* Note: on x86-32, S3 - S6 (same as R3 - R6) are emulated (they
+ are allocated on the stack). These registers are called virtual
+ and cannot be used for memory addressing (cannot be part of
+ any SLJIT_MEM1, SLJIT_MEM2 construct). There is no such
+ limitation on other CPUs. See sljit_get_register_index(). */
+#define SLJIT_S3 (SLJIT_NUMBER_OF_REGISTERS - 3)
+#define SLJIT_S4 (SLJIT_NUMBER_OF_REGISTERS - 4)
+#define SLJIT_S5 (SLJIT_NUMBER_OF_REGISTERS - 5)
+#define SLJIT_S6 (SLJIT_NUMBER_OF_REGISTERS - 6)
+#define SLJIT_S7 (SLJIT_NUMBER_OF_REGISTERS - 7)
+#define SLJIT_S8 (SLJIT_NUMBER_OF_REGISTERS - 8)
+#define SLJIT_S9 (SLJIT_NUMBER_OF_REGISTERS - 9)
+/* All S registers provided by the architecture can be accessed by SLJIT_S(i)
+ The i parameter must be >= 0 and < SLJIT_NUMBER_OF_SAVED_REGISTERS. */
+#define SLJIT_S(i) (SLJIT_NUMBER_OF_REGISTERS - (i))
+
+/* Registers >= SLJIT_FIRST_SAVED_REG are saved registers. */
+#define SLJIT_FIRST_SAVED_REG (SLJIT_S0 - SLJIT_NUMBER_OF_SAVED_REGISTERS + 1)
+
+/* The SLJIT_SP provides direct access to the linear stack space allocated by
+ sljit_emit_enter. It can only be used in the following form: SLJIT_MEM1(SLJIT_SP).
+ The immediate offset is extended by the relative stack offset automatically.
+ The sljit_get_local_base can be used to obtain the absolute offset. */
+#define SLJIT_SP (SLJIT_NUMBER_OF_REGISTERS + 1)
+
+/* Return with machine word. */
+
+#define SLJIT_RETURN_REG SLJIT_R0
+
+/* x86 prefers specific registers for special purposes. In case of shift
+ by register it supports only SLJIT_R2 for shift argument
+ (which is the src2 argument of sljit_emit_op2). If another register is
+ used, sljit must exchange data between registers which cause a minor
+ slowdown. Other architectures has no such limitation. */
+
+#define SLJIT_PREF_SHIFT_REG SLJIT_R2
+
+/* --------------------------------------------------------------------- */
+/* Floating point registers */
+/* --------------------------------------------------------------------- */
+
+/* Each floating point register can store a 32 or a 64 bit precision
+ value. The FR and FS register sets are overlap in the same way as R
+ and S register sets. See above. */
+
+/* Note: SLJIT_UNUSED as destination is not valid for floating point
+ operations, since they cannot be used for setting flags. */
+
+/* Floating point scratch registers. */
+#define SLJIT_FR0 1
+#define SLJIT_FR1 2
+#define SLJIT_FR2 3
+#define SLJIT_FR3 4
+#define SLJIT_FR4 5
+#define SLJIT_FR5 6
+/* All FR registers provided by the architecture can be accessed by SLJIT_FR(i)
+ The i parameter must be >= 0 and < SLJIT_NUMBER_OF_FLOAT_REGISTERS. */
+#define SLJIT_FR(i) (1 + (i))
+
+/* Floating point saved registers. */
+#define SLJIT_FS0 (SLJIT_NUMBER_OF_FLOAT_REGISTERS)
+#define SLJIT_FS1 (SLJIT_NUMBER_OF_FLOAT_REGISTERS - 1)
+#define SLJIT_FS2 (SLJIT_NUMBER_OF_FLOAT_REGISTERS - 2)
+#define SLJIT_FS3 (SLJIT_NUMBER_OF_FLOAT_REGISTERS - 3)
+#define SLJIT_FS4 (SLJIT_NUMBER_OF_FLOAT_REGISTERS - 4)
+#define SLJIT_FS5 (SLJIT_NUMBER_OF_FLOAT_REGISTERS - 5)
+/* All S registers provided by the architecture can be accessed by SLJIT_FS(i)
+ The i parameter must be >= 0 and < SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS. */
+#define SLJIT_FS(i) (SLJIT_NUMBER_OF_FLOAT_REGISTERS - (i))
+
+/* Float registers >= SLJIT_FIRST_SAVED_FLOAT_REG are saved registers. */
+#define SLJIT_FIRST_SAVED_FLOAT_REG (SLJIT_FS0 - SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS + 1)
+
+/* --------------------------------------------------------------------- */
+/* Main structures and functions */
+/* --------------------------------------------------------------------- */
+
+/*
+ The following structures are private, and can be changed in the
+ future. Keeping them here allows code inlining.
+*/
+
+struct sljit_memory_fragment {
+ struct sljit_memory_fragment *next;
+ sljit_uw used_size;
+ /* Must be aligned to sljit_sw. */
+ sljit_u8 memory[1];
+};
+
+struct sljit_label {
+ struct sljit_label *next;
+ sljit_uw addr;
+ /* The maximum size difference. */
+ sljit_uw size;
+};
+
+struct sljit_jump {
+ struct sljit_jump *next;
+ sljit_uw addr;
+ sljit_sw flags;
+ union {
+ sljit_uw target;
+ struct sljit_label* label;
+ } u;
+};
+
+struct sljit_const {
+ struct sljit_const *next;
+ sljit_uw addr;
+};
+
+struct sljit_compiler {
+ sljit_s32 error;
+ sljit_s32 options;
+
+ struct sljit_label *labels;
+ struct sljit_jump *jumps;
+ struct sljit_const *consts;
+ struct sljit_label *last_label;
+ struct sljit_jump *last_jump;
+ struct sljit_const *last_const;
+
+ void *allocator_data;
+ struct sljit_memory_fragment *buf;
+ struct sljit_memory_fragment *abuf;
+
+ /* Used scratch registers. */
+ sljit_s32 scratches;
+ /* Used saved registers. */
+ sljit_s32 saveds;
+ /* Used float scratch registers. */
+ sljit_s32 fscratches;
+ /* Used float saved registers. */
+ sljit_s32 fsaveds;
+ /* Local stack size. */
+ sljit_s32 local_size;
+ /* Code size. */
+ sljit_uw size;
+ /* Relative offset of the executable mapping from the writable mapping. */
+ sljit_uw executable_offset;
+ /* Executable size for statistical purposes. */
+ sljit_uw executable_size;
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ sljit_s32 args;
+#endif
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ sljit_s32 mode32;
+#endif
+
+#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+ sljit_s32 flags_saved;
+#endif
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ /* Constant pool handling. */
+ sljit_uw *cpool;
+ sljit_u8 *cpool_unique;
+ sljit_uw cpool_diff;
+ sljit_uw cpool_fill;
+ /* Other members. */
+ /* Contains pointer, "ldr pc, [...]" pairs. */
+ sljit_uw patches;
+#endif
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
+ /* Temporary fields. */
+ sljit_uw shift_imm;
+ sljit_s32 cache_arg;
+ sljit_sw cache_argw;
+#endif
+
+#if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
+ sljit_s32 cache_arg;
+ sljit_sw cache_argw;
+#endif
+
+#if (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64)
+ sljit_s32 cache_arg;
+ sljit_sw cache_argw;
+#endif
+
+#if (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC)
+ sljit_sw imm;
+ sljit_s32 cache_arg;
+ sljit_sw cache_argw;
+#endif
+
+#if (defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS)
+ sljit_s32 delay_slot;
+ sljit_s32 cache_arg;
+ sljit_sw cache_argw;
+#endif
+
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+ sljit_s32 delay_slot;
+ sljit_s32 cache_arg;
+ sljit_sw cache_argw;
+#endif
+
+#if (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX)
+ sljit_s32 cache_arg;
+ sljit_sw cache_argw;
+#endif
+
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ FILE* verbose;
+#endif
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) \
+ || (defined SLJIT_DEBUG && SLJIT_DEBUG)
+ /* Local size passed to the functions. */
+ sljit_s32 logical_local_size;
+#endif
+
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) \
+ || (defined SLJIT_DEBUG && SLJIT_DEBUG) \
+ || (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ sljit_s32 skip_checks;
+#endif
+};
+
+/* --------------------------------------------------------------------- */
+/* Main functions */
+/* --------------------------------------------------------------------- */
+
+/* Creates an sljit compiler. The allocator_data is required by some
+ custom memory managers. This pointer is passed to SLJIT_MALLOC
+ and SLJIT_FREE macros. Most allocators (including the default
+ one) ignores this value, and it is recommended to pass NULL
+ as a dummy value for allocator_data.
+
+ Returns NULL if failed. */
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void *allocator_data);
+
+/* Frees everything except the compiled machine code. */
+SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler);
+
+/* Returns the current error code. If an error is occurred, future sljit
+ calls which uses the same compiler argument returns early with the same
+ error code. Thus there is no need for checking the error after every
+ call, it is enough to do it before the code is compiled. Removing
+ these checks increases the performance of the compiling process. */
+static SLJIT_INLINE sljit_s32 sljit_get_compiler_error(struct sljit_compiler *compiler) { return compiler->error; }
+
+/* Sets the compiler error code to SLJIT_ERR_ALLOC_FAILED except
+ if an error was detected before. After the error code is set
+ the compiler behaves as if the allocation failure happened
+ during an sljit function call. This can greatly simplify error
+ checking, since only the compiler status needs to be checked
+ after the compilation. */
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_compiler_memory_error(struct sljit_compiler *compiler);
+
+/*
+ Allocate a small amount of memory. The size must be <= 64 bytes on 32 bit,
+ and <= 128 bytes on 64 bit architectures. The memory area is owned by the
+ compiler, and freed by sljit_free_compiler. The returned pointer is
+ sizeof(sljit_sw) aligned. Excellent for allocating small blocks during
+ the compiling, and no need to worry about freeing them. The size is
+ enough to contain at most 16 pointers. If the size is outside of the range,
+ the function will return with NULL. However, this return value does not
+ indicate that there is no more memory (does not set the current error code
+ of the compiler to out-of-memory status).
+*/
+SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, sljit_s32 size);
+
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+/* Passing NULL disables verbose. */
+SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose);
+#endif
+
+/*
+ Create executable code from the sljit instruction stream. This is the final step
+ of the code generation so no more instructions can be added after this call.
+*/
+
+SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler);
+
+/* Free executable code. */
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code);
+
+/*
+ When the protected executable allocator is used the JIT code is mapped
+ twice. The first mapping has read/write and the second mapping has read/exec
+ permissions. This function returns with the relative offset of the executable
+ mapping using the writable mapping as the base after the machine code is
+ successfully generated. The returned value is always 0 for the normal executable
+ allocator, since it uses only one mapping with read/write/exec permissions.
+ Dynamic code modifications requires this value.
+
+ Before a successful code generation, this function returns with 0.
+*/
+static SLJIT_INLINE sljit_sw sljit_get_executable_offset(struct sljit_compiler *compiler) { return compiler->executable_offset; }
+
+/*
+ The executable memory consumption of the generated code can be retrieved by
+ this function. The returned value can be used for statistical purposes.
+
+ Before a successful code generation, this function returns with 0.
+*/
+static SLJIT_INLINE sljit_uw sljit_get_generated_code_size(struct sljit_compiler *compiler) { return compiler->executable_size; }
+
+/* Instruction generation. Returns with any error code. If there is no
+ error, they return with SLJIT_SUCCESS. */
+
+/*
+ The executable code is a function call from the viewpoint of the C
+ language. The function calls must obey to the ABI (Application
+ Binary Interface) of the platform, which specify the purpose of
+ all machine registers and stack handling among other things. The
+ sljit_emit_enter function emits the necessary instructions for
+ setting up a new context for the executable code and moves function
+ arguments to the saved registers. Furthermore the options argument
+ can be used to pass configuration options to the compiler. The
+ available options are listed before sljit_emit_enter.
+
+ The number of sljit_sw arguments passed to the generated function
+ are specified in the "args" parameter. The number of arguments must
+ be less than or equal to 3. The first argument goes to SLJIT_S0,
+ the second goes to SLJIT_S1 and so on. The register set used by
+ the function must be declared as well. The number of scratch and
+ saved registers used by the function must be passed to sljit_emit_enter.
+ Only R registers between R0 and "scratches" argument can be used
+ later. E.g. if "scratches" is set to 2, the register set will be
+ limited to R0 and R1. The S registers and the floating point
+ registers ("fscratches" and "fsaveds") are specified in a similar
+ way. The sljit_emit_enter is also capable of allocating a stack
+ space for local variables. The "local_size" argument contains the
+ size in bytes of this local area and its staring address is stored
+ in SLJIT_SP. The memory area between SLJIT_SP (inclusive) and
+ SLJIT_SP + local_size (exclusive) can be modified freely until
+ the function returns. The stack space is not initialized.
+
+ Note: the following conditions must met:
+ 0 <= scratches <= SLJIT_NUMBER_OF_REGISTERS
+ 0 <= saveds <= SLJIT_NUMBER_OF_REGISTERS
+ scratches + saveds <= SLJIT_NUMBER_OF_REGISTERS
+ 0 <= fscratches <= SLJIT_NUMBER_OF_FLOAT_REGISTERS
+ 0 <= fsaveds <= SLJIT_NUMBER_OF_FLOAT_REGISTERS
+ fscratches + fsaveds <= SLJIT_NUMBER_OF_FLOAT_REGISTERS
+
+ Note: every call of sljit_emit_enter and sljit_set_context
+ overwrites the previous context.
+*/
+
+/* The absolute address returned by sljit_get_local_base with
+offset 0 is aligned to sljit_d. Otherwise it is aligned to sljit_uw. */
+#define SLJIT_DOUBLE_ALIGNMENT 0x00000001
+
+/* The local_size must be >= 0 and <= SLJIT_MAX_LOCAL_SIZE. */
+#define SLJIT_MAX_LOCAL_SIZE 65536
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size);
+
+/* The machine code has a context (which contains the local stack space size,
+ number of used registers, etc.) which initialized by sljit_emit_enter. Several
+ functions (like sljit_emit_return) requres this context to be able to generate
+ the appropriate code. However, some code fragments (like inline cache) may have
+ no normal entry point so their context is unknown for the compiler. Their context
+ can be provided to the compiler by the sljit_set_context function.
+
+ Note: every call of sljit_emit_enter and sljit_set_context overwrites
+ the previous context. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size);
+
+/* Return from machine code. The op argument can be SLJIT_UNUSED which means the
+ function does not return with anything or any opcode between SLJIT_MOV and
+ SLJIT_MOV_P (see sljit_emit_op1). As for src and srcw they must be 0 if op
+ is SLJIT_UNUSED, otherwise see below the description about source and
+ destination arguments. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 src, sljit_sw srcw);
+
+/* Fast calling mechanism for utility functions (see SLJIT_FAST_CALL). All registers and
+ even the stack frame is passed to the callee. The return address is preserved in
+ dst/dstw by sljit_emit_fast_enter (the type of the value stored by this function
+ is sljit_p), and sljit_emit_fast_return can use this as a return value later. */
+
+/* Note: only for sljit specific, non ABI compilant calls. Fast, since only a few machine
+ instructions are needed. Excellent for small uility functions, where saving registers
+ and setting up a new stack frame would cost too much performance. However, it is still
+ possible to return to the address of the caller (or anywhere else). */
+
+/* Note: flags are not changed (unlike sljit_emit_enter / sljit_emit_return). */
+
+/* Note: although sljit_emit_fast_return could be replaced by an ijump, it is not suggested,
+ since many architectures do clever branch prediction on call / return instruction pairs. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw);
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw);
+
+/*
+ Source and destination values for arithmetical instructions
+ imm - a simple immediate value (cannot be used as a destination)
+ reg - any of the registers (immediate argument must be 0)
+ [imm] - absolute immediate memory address
+ [reg+imm] - indirect memory address
+ [reg+(reg<<imm)] - indirect indexed memory address (shift must be between 0 and 3)
+ useful for (byte, half, int, sljit_sw) array access
+ (fully supported by both x86 and ARM architectures, and cheap operation on others)
+*/
+
+/*
+ IMPORATNT NOTE: memory access MUST be naturally aligned except
+ SLJIT_UNALIGNED macro is defined and its value is 1.
+
+ length | alignment
+ ---------+-----------
+ byte | 1 byte (any physical_address is accepted)
+ half | 2 byte (physical_address & 0x1 == 0)
+ int | 4 byte (physical_address & 0x3 == 0)
+ word | 4 byte if SLJIT_32BIT_ARCHITECTURE is defined and its value is 1
+ | 8 byte if SLJIT_64BIT_ARCHITECTURE is defined and its value is 1
+ pointer | size of sljit_p type (4 byte on 32 bit machines, 4 or 8 byte
+ | on 64 bit machines)
+
+ Note: Different architectures have different addressing limitations.
+ A single instruction is enough for the following addressing
+ modes. Other adrressing modes are emulated by instruction
+ sequences. This information could help to improve those code
+ generators which focuses only a few architectures.
+
+ x86: [reg+imm], -2^32+1 <= imm <= 2^32-1 (full address space on x86-32)
+ [reg+(reg<<imm)] is supported
+ [imm], -2^32+1 <= imm <= 2^32-1 is supported
+ Write-back is not supported
+ arm: [reg+imm], -4095 <= imm <= 4095 or -255 <= imm <= 255 for signed
+ bytes, any halfs or floating point values)
+ [reg+(reg<<imm)] is supported
+ Write-back is supported
+ arm-t2: [reg+imm], -255 <= imm <= 4095
+ [reg+(reg<<imm)] is supported
+ Write back is supported only for [reg+imm], where -255 <= imm <= 255
+ ppc: [reg+imm], -65536 <= imm <= 65535. 64 bit loads/stores and 32 bit
+ signed load on 64 bit requires immediates divisible by 4.
+ [reg+imm] is not supported for signed 8 bit values.
+ [reg+reg] is supported
+ Write-back is supported except for one instruction: 32 bit signed
+ load with [reg+imm] addressing mode on 64 bit.
+ mips: [reg+imm], -65536 <= imm <= 65535
+ sparc: [reg+imm], -4096 <= imm <= 4095
+ [reg+reg] is supported
+*/
+
+/* Register output: simply the name of the register.
+ For destination, you can use SLJIT_UNUSED as well. */
+#define SLJIT_MEM 0x80
+#define SLJIT_MEM0() (SLJIT_MEM)
+#define SLJIT_MEM1(r1) (SLJIT_MEM | (r1))
+#define SLJIT_MEM2(r1, r2) (SLJIT_MEM | (r1) | ((r2) << 8))
+#define SLJIT_IMM 0x40
+
+/* Set 32 bit operation mode (I) on 64 bit CPUs. This flag is ignored on 32
+ bit CPUs. When this flag is set for an arithmetic operation, only the
+ lower 32 bit of the input register(s) are used, and the CPU status flags
+ are set according to the 32 bit result. Although the higher 32 bit of
+ the input and the result registers are not defined by SLJIT, it might be
+ defined by the CPU architecture (e.g. MIPS). To satisfy these requirements
+ all source registers must be computed by operations where this flag is
+ also set. In other words 32 and 64 bit arithmetic operations cannot be
+ mixed. The only exception is SLJIT_IMOV and SLJIT_IMOVU whose source
+ register can hold any 32 or 64 bit value. This source register is
+ converted to a 32 bit compatible format. SLJIT does not generate any
+ instructions on certain CPUs (e.g. on x86 and ARM) if the source and
+ destination operands are the same registers. Affects sljit_emit_op0,
+ sljit_emit_op1 and sljit_emit_op2. */
+#define SLJIT_I32_OP 0x100
+
+/* F32 precision mode (SP). This flag is similar to SLJIT_I32_OP, just
+ it applies to floating point registers (it is even the same bit). When
+ this flag is passed, the CPU performs 32 bit floating point operations.
+ Similar to SLJIT_I32_OP, all register arguments must be computed by
+ floating point operations where this flag is also set. Affects
+ sljit_emit_fop1, sljit_emit_fop2 and sljit_emit_fcmp. */
+#define SLJIT_F32_OP 0x100
+
+/* Common CPU status flags for all architectures (x86, ARM, PPC)
+ - carry flag
+ - overflow flag
+ - zero flag
+ - negative/positive flag (depends on arc)
+ On mips, these flags are emulated by software. */
+
+/* By default, the instructions may, or may not set the CPU status flags.
+ Forcing to set or keep status flags can be done with the following flags: */
+
+/* Note: sljit tries to emit the minimum number of instructions. Using these
+ flags can increase them, so use them wisely to avoid unnecessary code generation. */
+
+/* Set Equal (Zero) status flag (E). */
+#define SLJIT_SET_E 0x0200
+/* Set unsigned status flag (U). */
+#define SLJIT_SET_U 0x0400
+/* Set signed status flag (S). */
+#define SLJIT_SET_S 0x0800
+/* Set signed overflow flag (O). */
+#define SLJIT_SET_O 0x1000
+/* Set carry flag (C).
+ Note: Kinda unsigned overflow, but behaves differently on various cpus. */
+#define SLJIT_SET_C 0x2000
+/* Do not modify the flags (K).
+ Note: This flag cannot be combined with any other SLJIT_SET_* flag. */
+#define SLJIT_KEEP_FLAGS 0x4000
+
+/* Notes:
+ - you cannot postpone conditional jump instructions except if noted that
+ the instruction does not set flags (See: SLJIT_KEEP_FLAGS).
+ - flag combinations: '|' means 'logical or'. */
+
+/* Starting index of opcodes for sljit_emit_op0. */
+#define SLJIT_OP0_BASE 0
+
+/* Flags: - (never set any flags)
+ Note: breakpoint instruction is not supported by all architectures (e.g. ppc)
+ It falls back to SLJIT_NOP in those cases. */
+#define SLJIT_BREAKPOINT (SLJIT_OP0_BASE + 0)
+/* Flags: - (never set any flags)
+ Note: may or may not cause an extra cycle wait
+ it can even decrease the runtime in a few cases. */
+#define SLJIT_NOP (SLJIT_OP0_BASE + 1)
+/* Flags: - (may destroy flags)
+ Unsigned multiplication of SLJIT_R0 and SLJIT_R1.
+ Result is placed into SLJIT_R1:SLJIT_R0 (high:low) word */
+#define SLJIT_LMUL_UW (SLJIT_OP0_BASE + 2)
+/* Flags: - (may destroy flags)
+ Signed multiplication of SLJIT_R0 and SLJIT_R1.
+ Result is placed into SLJIT_R1:SLJIT_R0 (high:low) word */
+#define SLJIT_LMUL_SW (SLJIT_OP0_BASE + 3)
+/* Flags: I - (may destroy flags)
+ Unsigned divide of the value in SLJIT_R0 by the value in SLJIT_R1.
+ The result is placed into SLJIT_R0 and the remainder into SLJIT_R1.
+ Note: if SLJIT_R1 is 0, the behaviour is undefined. */
+#define SLJIT_DIVMOD_UW (SLJIT_OP0_BASE + 4)
+#define SLJIT_DIVMOD_U32 (SLJIT_DIVMOD_UW | SLJIT_I32_OP)
+/* Flags: I - (may destroy flags)
+ Signed divide of the value in SLJIT_R0 by the value in SLJIT_R1.
+ The result is placed into SLJIT_R0 and the remainder into SLJIT_R1.
+ Note: if SLJIT_R1 is 0, the behaviour is undefined.
+ Note: if SLJIT_R1 is -1 and SLJIT_R0 is integer min (0x800..00),
+ the behaviour is undefined. */
+#define SLJIT_DIVMOD_SW (SLJIT_OP0_BASE + 5)
+#define SLJIT_DIVMOD_S32 (SLJIT_DIVMOD_SW | SLJIT_I32_OP)
+/* Flags: I - (may destroy flags)
+ Unsigned divide of the value in SLJIT_R0 by the value in SLJIT_R1.
+ The result is placed into SLJIT_R0. SLJIT_R1 preserves its value.
+ Note: if SLJIT_R1 is 0, the behaviour is undefined. */
+#define SLJIT_DIV_UW (SLJIT_OP0_BASE + 6)
+#define SLJIT_DIV_U32 (SLJIT_DIV_UW | SLJIT_I32_OP)
+/* Flags: I - (may destroy flags)
+ Signed divide of the value in SLJIT_R0 by the value in SLJIT_R1.
+ The result is placed into SLJIT_R0. SLJIT_R1 preserves its value.
+ Note: if SLJIT_R1 is 0, the behaviour is undefined.
+ Note: if SLJIT_R1 is -1 and SLJIT_R0 is integer min (0x800..00),
+ the behaviour is undefined. */
+#define SLJIT_DIV_SW (SLJIT_OP0_BASE + 7)
+#define SLJIT_DIV_S32 (SLJIT_DIV_SW | SLJIT_I32_OP)
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op);
+
+/* Starting index of opcodes for sljit_emit_op1. */
+#define SLJIT_OP1_BASE 32
+
+/* Notes for MOV instructions:
+ U = Mov with update (pre form). If source or destination defined as SLJIT_MEM1(r1)
+ or SLJIT_MEM2(r1, r2), r1 is increased by the sum of r2 and the constant argument
+ UB = unsigned byte (8 bit)
+ SB = signed byte (8 bit)
+ UH = unsigned half (16 bit)
+ SH = signed half (16 bit)
+ UI = unsigned int (32 bit)
+ SI = signed int (32 bit)
+ P = pointer (sljit_p) size */
+
+/* Flags: - (never set any flags) */
+#define SLJIT_MOV (SLJIT_OP1_BASE + 0)
+/* Flags: I - (never set any flags) */
+#define SLJIT_MOV_U8 (SLJIT_OP1_BASE + 1)
+#define SLJIT_MOV32_U8 (SLJIT_MOV_U8 | SLJIT_I32_OP)
+/* Flags: I - (never set any flags) */
+#define SLJIT_MOV_S8 (SLJIT_OP1_BASE + 2)
+#define SLJIT_MOV32_S8 (SLJIT_MOV_S8 | SLJIT_I32_OP)
+/* Flags: I - (never set any flags) */
+#define SLJIT_MOV_U16 (SLJIT_OP1_BASE + 3)
+#define SLJIT_MOV32_U16 (SLJIT_MOV_U16 | SLJIT_I32_OP)
+/* Flags: I - (never set any flags) */
+#define SLJIT_MOV_S16 (SLJIT_OP1_BASE + 4)
+#define SLJIT_MOV32_S16 (SLJIT_MOV_S16 | SLJIT_I32_OP)
+/* Flags: I - (never set any flags)
+ Note: no SLJIT_MOV32_U32 form, since it is the same as SLJIT_MOV32 */
+#define SLJIT_MOV_U32 (SLJIT_OP1_BASE + 5)
+/* Flags: I - (never set any flags)
+ Note: no SLJIT_MOV32_S32 form, since it is the same as SLJIT_MOV32 */
+#define SLJIT_MOV_S32 (SLJIT_OP1_BASE + 6)
+/* Flags: I - (never set any flags) */
+#define SLJIT_MOV32 (SLJIT_MOV_S32 | SLJIT_I32_OP)
+/* Flags: - (never set any flags) */
+#define SLJIT_MOV_P (SLJIT_OP1_BASE + 7)
+/* Flags: - (never set any flags) */
+#define SLJIT_MOVU (SLJIT_OP1_BASE + 8)
+/* Flags: I - (never set any flags) */
+#define SLJIT_MOVU_U8 (SLJIT_OP1_BASE + 9)
+#define SLJIT_MOVU32_U8 (SLJIT_MOVU_U8 | SLJIT_I32_OP)
+/* Flags: I - (never set any flags) */
+#define SLJIT_MOVU_S8 (SLJIT_OP1_BASE + 10)
+#define SLJIT_MOVU32_S8 (SLJIT_MOVU_S8 | SLJIT_I32_OP)
+/* Flags: I - (never set any flags) */
+#define SLJIT_MOVU_U16 (SLJIT_OP1_BASE + 11)
+#define SLJIT_MOVU32_U16 (SLJIT_MOVU_U16 | SLJIT_I32_OP)
+/* Flags: I - (never set any flags) */
+#define SLJIT_MOVU_S16 (SLJIT_OP1_BASE + 12)
+#define SLJIT_MOVU32_S16 (SLJIT_MOVU_S16 | SLJIT_I32_OP)
+/* Flags: I - (never set any flags)
+ Note: no SLJIT_MOVU32_U32 form, since it is the same as SLJIT_MOVU32 */
+#define SLJIT_MOVU_U32 (SLJIT_OP1_BASE + 13)
+/* Flags: I - (never set any flags)
+ Note: no SLJIT_MOVU32_S32 form, since it is the same as SLJIT_MOVU32 */
+#define SLJIT_MOVU_S32 (SLJIT_OP1_BASE + 14)
+/* Flags: I - (never set any flags) */
+#define SLJIT_MOVU32 (SLJIT_MOVU_S32 | SLJIT_I32_OP)
+/* Flags: - (never set any flags) */
+#define SLJIT_MOVU_P (SLJIT_OP1_BASE + 15)
+/* Flags: I | E | K */
+#define SLJIT_NOT (SLJIT_OP1_BASE + 16)
+#define SLJIT_NOT32 (SLJIT_NOT | SLJIT_I32_OP)
+/* Flags: I | E | O | K */
+#define SLJIT_NEG (SLJIT_OP1_BASE + 17)
+#define SLJIT_NEG32 (SLJIT_NEG | SLJIT_I32_OP)
+/* Count leading zeroes
+ Flags: I | E | K
+ Important note! Sparc 32 does not support K flag, since
+ the required popc instruction is introduced only in sparc 64. */
+#define SLJIT_CLZ (SLJIT_OP1_BASE + 18)
+#define SLJIT_CLZ32 (SLJIT_CLZ | SLJIT_I32_OP)
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw);
+
+/* Starting index of opcodes for sljit_emit_op2. */
+#define SLJIT_OP2_BASE 96
+
+/* Flags: I | E | O | C | K */
+#define SLJIT_ADD (SLJIT_OP2_BASE + 0)
+#define SLJIT_ADD32 (SLJIT_ADD | SLJIT_I32_OP)
+/* Flags: I | C | K */
+#define SLJIT_ADDC (SLJIT_OP2_BASE + 1)
+#define SLJIT_ADDC32 (SLJIT_ADDC | SLJIT_I32_OP)
+/* Flags: I | E | U | S | O | C | K */
+#define SLJIT_SUB (SLJIT_OP2_BASE + 2)
+#define SLJIT_SUB32 (SLJIT_SUB | SLJIT_I32_OP)
+/* Flags: I | C | K */
+#define SLJIT_SUBC (SLJIT_OP2_BASE + 3)
+#define SLJIT_SUBC32 (SLJIT_SUBC | SLJIT_I32_OP)
+/* Note: integer mul
+ Flags: I | O (see SLJIT_C_MUL_*) | K */
+#define SLJIT_MUL (SLJIT_OP2_BASE + 4)
+#define SLJIT_MUL32 (SLJIT_MUL | SLJIT_I32_OP)
+/* Flags: I | E | K */
+#define SLJIT_AND (SLJIT_OP2_BASE + 5)
+#define SLJIT_AND32 (SLJIT_AND | SLJIT_I32_OP)
+/* Flags: I | E | K */
+#define SLJIT_OR (SLJIT_OP2_BASE + 6)
+#define SLJIT_OR32 (SLJIT_OR | SLJIT_I32_OP)
+/* Flags: I | E | K */
+#define SLJIT_XOR (SLJIT_OP2_BASE + 7)
+#define SLJIT_XOR32 (SLJIT_XOR | SLJIT_I32_OP)
+/* Flags: I | E | K
+ Let bit_length be the length of the shift operation: 32 or 64.
+ If src2 is immediate, src2w is masked by (bit_length - 1).
+ Otherwise, if the content of src2 is outside the range from 0
+ to bit_length - 1, the result is undefined. */
+#define SLJIT_SHL (SLJIT_OP2_BASE + 8)
+#define SLJIT_SHL32 (SLJIT_SHL | SLJIT_I32_OP)
+/* Flags: I | E | K
+ Let bit_length be the length of the shift operation: 32 or 64.
+ If src2 is immediate, src2w is masked by (bit_length - 1).
+ Otherwise, if the content of src2 is outside the range from 0
+ to bit_length - 1, the result is undefined. */
+#define SLJIT_LSHR (SLJIT_OP2_BASE + 9)
+#define SLJIT_LSHR32 (SLJIT_LSHR | SLJIT_I32_OP)
+/* Flags: I | E | K
+ Let bit_length be the length of the shift operation: 32 or 64.
+ If src2 is immediate, src2w is masked by (bit_length - 1).
+ Otherwise, if the content of src2 is outside the range from 0
+ to bit_length - 1, the result is undefined. */
+#define SLJIT_ASHR (SLJIT_OP2_BASE + 10)
+#define SLJIT_ASHR32 (SLJIT_ASHR | SLJIT_I32_OP)
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w);
+
+/* Returns with non-zero if fpu is available. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_is_fpu_available(void);
+
+/* Starting index of opcodes for sljit_emit_fop1. */
+#define SLJIT_FOP1_BASE 128
+
+/* Flags: SP - (never set any flags) */
+#define SLJIT_MOV_F64 (SLJIT_FOP1_BASE + 0)
+#define SLJIT_MOV_F32 (SLJIT_MOV_F64 | SLJIT_F32_OP)
+/* Convert opcodes: CONV[DST_TYPE].FROM[SRC_TYPE]
+ SRC/DST TYPE can be: D - double, S - single, W - signed word, I - signed int
+ Rounding mode when the destination is W or I: round towards zero. */
+/* Flags: SP - (never set any flags) */
+#define SLJIT_CONV_F64_FROM_F32 (SLJIT_FOP1_BASE + 1)
+#define SLJIT_CONV_F32_FROM_F64 (SLJIT_CONV_F64_FROM_F32 | SLJIT_F32_OP)
+/* Flags: SP - (never set any flags) */
+#define SLJIT_CONV_SW_FROM_F64 (SLJIT_FOP1_BASE + 2)
+#define SLJIT_CONV_SW_FROM_F32 (SLJIT_CONV_SW_FROM_F64 | SLJIT_F32_OP)
+/* Flags: SP - (never set any flags) */
+#define SLJIT_CONV_S32_FROM_F64 (SLJIT_FOP1_BASE + 3)
+#define SLJIT_CONV_S32_FROM_F32 (SLJIT_CONV_S32_FROM_F64 | SLJIT_F32_OP)
+/* Flags: SP - (never set any flags) */
+#define SLJIT_CONV_F64_FROM_SW (SLJIT_FOP1_BASE + 4)
+#define SLJIT_CONV_F32_FROM_SW (SLJIT_CONV_F64_FROM_SW | SLJIT_F32_OP)
+/* Flags: SP - (never set any flags) */
+#define SLJIT_CONV_F64_FROM_S32 (SLJIT_FOP1_BASE + 5)
+#define SLJIT_CONV_F32_FROM_S32 (SLJIT_CONV_F64_FROM_S32 | SLJIT_F32_OP)
+/* Note: dst is the left and src is the right operand for SLJIT_CMPD.
+ Note: NaN check is always performed. If SLJIT_C_FLOAT_UNORDERED flag
+ is set, the comparison result is unpredictable.
+ Flags: SP | E | S (see SLJIT_C_FLOAT_*) */
+#define SLJIT_CMP_F64 (SLJIT_FOP1_BASE + 6)
+#define SLJIT_CMP_F32 (SLJIT_CMP_F64 | SLJIT_F32_OP)
+/* Flags: SP - (never set any flags) */
+#define SLJIT_NEG_F64 (SLJIT_FOP1_BASE + 7)
+#define SLJIT_NEG_F32 (SLJIT_NEG_F64 | SLJIT_F32_OP)
+/* Flags: SP - (never set any flags) */
+#define SLJIT_ABS_F64 (SLJIT_FOP1_BASE + 8)
+#define SLJIT_ABS_F32 (SLJIT_ABS_F64 | SLJIT_F32_OP)
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw);
+
+/* Starting index of opcodes for sljit_emit_fop2. */
+#define SLJIT_FOP2_BASE 160
+
+/* Flags: SP - (never set any flags) */
+#define SLJIT_ADD_F64 (SLJIT_FOP2_BASE + 0)
+#define SLJIT_ADD_F32 (SLJIT_ADD_F64 | SLJIT_F32_OP)
+/* Flags: SP - (never set any flags) */
+#define SLJIT_SUB_F64 (SLJIT_FOP2_BASE + 1)
+#define SLJIT_SUB_F32 (SLJIT_SUB_F64 | SLJIT_F32_OP)
+/* Flags: SP - (never set any flags) */
+#define SLJIT_MUL_F64 (SLJIT_FOP2_BASE + 2)
+#define SLJIT_MUL_F32 (SLJIT_MUL_F64 | SLJIT_F32_OP)
+/* Flags: SP - (never set any flags) */
+#define SLJIT_DIV_F64 (SLJIT_FOP2_BASE + 3)
+#define SLJIT_DIV_F32 (SLJIT_DIV_F64 | SLJIT_F32_OP)
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w);
+
+/* Label and jump instructions. */
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler);
+
+/* Invert (negate) conditional type: xor (^) with 0x1 */
+
+/* Integer comparison types. */
+#define SLJIT_EQUAL 0
+#define SLJIT_EQUAL32 (SLJIT_EQUAL | SLJIT_I32_OP)
+#define SLJIT_ZERO 0
+#define SLJIT_ZERO32 (SLJIT_ZERO | SLJIT_I32_OP)
+#define SLJIT_NOT_EQUAL 1
+#define SLJIT_NOT_EQUAL32 (SLJIT_NOT_EQUAL | SLJIT_I32_OP)
+#define SLJIT_NOT_ZERO 1
+#define SLJIT_NOT_ZERO32 (SLJIT_NOT_ZERO | SLJIT_I32_OP)
+
+#define SLJIT_LESS 2
+#define SLJIT_LESS32 (SLJIT_LESS | SLJIT_I32_OP)
+#define SLJIT_GREATER_EQUAL 3
+#define SLJIT_GREATER_EQUAL32 (SLJIT_GREATER_EQUAL | SLJIT_I32_OP)
+#define SLJIT_GREATER 4
+#define SLJIT_GREATER32 (SLJIT_GREATER | SLJIT_I32_OP)
+#define SLJIT_LESS_EQUAL 5
+#define SLJIT_LESS_EQUAL32 (SLJIT_LESS_EQUAL | SLJIT_I32_OP)
+#define SLJIT_SIG_LESS 6
+#define SLJIT_SIG_LESS32 (SLJIT_SIG_LESS | SLJIT_I32_OP)
+#define SLJIT_SIG_GREATER_EQUAL 7
+#define SLJIT_SIG_GREATER_EQUAL32 (SLJIT_SIG_GREATER_EQUAL | SLJIT_I32_OP)
+#define SLJIT_SIG_GREATER 8
+#define SLJIT_SIG_GREATER32 (SLJIT_SIG_GREATER | SLJIT_I32_OP)
+#define SLJIT_SIG_LESS_EQUAL 9
+#define SLJIT_SIG_LESS_EQUAL32 (SLJIT_SIG_LESS_EQUAL | SLJIT_I32_OP)
+
+#define SLJIT_OVERFLOW 10
+#define SLJIT_OVERFLOW32 (SLJIT_OVERFLOW | SLJIT_I32_OP)
+#define SLJIT_NOT_OVERFLOW 11
+#define SLJIT_NOT_OVERFLOW32 (SLJIT_NOT_OVERFLOW | SLJIT_I32_OP)
+
+#define SLJIT_MUL_OVERFLOW 12
+#define SLJIT_MUL_OVERFLOW32 (SLJIT_MUL_OVERFLOW | SLJIT_I32_OP)
+#define SLJIT_MUL_NOT_OVERFLOW 13
+#define SLJIT_MUL_NOT_OVERFLOW32 (SLJIT_MUL_NOT_OVERFLOW | SLJIT_I32_OP)
+
+/* Floating point comparison types. */
+#define SLJIT_EQUAL_F64 14
+#define SLJIT_EQUAL_F32 (SLJIT_EQUAL_F64 | SLJIT_F32_OP)
+#define SLJIT_NOT_EQUAL_F64 15
+#define SLJIT_NOT_EQUAL_F32 (SLJIT_NOT_EQUAL_F64 | SLJIT_F32_OP)
+#define SLJIT_LESS_F64 16
+#define SLJIT_LESS_F32 (SLJIT_LESS_F64 | SLJIT_F32_OP)
+#define SLJIT_GREATER_EQUAL_F64 17
+#define SLJIT_GREATER_EQUAL_F32 (SLJIT_GREATER_EQUAL_F64 | SLJIT_F32_OP)
+#define SLJIT_GREATER_F64 18
+#define SLJIT_GREATER_F32 (SLJIT_GREATER_F64 | SLJIT_F32_OP)
+#define SLJIT_LESS_EQUAL_F64 19
+#define SLJIT_LESS_EQUAL_F32 (SLJIT_LESS_EQUAL_F64 | SLJIT_F32_OP)
+#define SLJIT_UNORDERED_F64 20
+#define SLJIT_UNORDERED_F32 (SLJIT_UNORDERED_F64 | SLJIT_F32_OP)
+#define SLJIT_ORDERED_F64 21
+#define SLJIT_ORDERED_F32 (SLJIT_ORDERED_F64 | SLJIT_F32_OP)
+
+/* Unconditional jump types. */
+#define SLJIT_JUMP 22
+#define SLJIT_FAST_CALL 23
+#define SLJIT_CALL0 24
+#define SLJIT_CALL1 25
+#define SLJIT_CALL2 26
+#define SLJIT_CALL3 27
+
+/* Fast calling method. See sljit_emit_fast_enter / sljit_emit_fast_return. */
+
+/* The target can be changed during runtime (see: sljit_set_jump_addr). */
+#define SLJIT_REWRITABLE_JUMP 0x1000
+
+/* Emit a jump instruction. The destination is not set, only the type of the jump.
+ type must be between SLJIT_EQUAL and SLJIT_CALL3
+ type can be combined (or'ed) with SLJIT_REWRITABLE_JUMP
+ Flags: - (never set any flags) for both conditional and unconditional jumps.
+ Flags: destroy all flags for calls. */
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_s32 type);
+
+/* Basic arithmetic comparison. In most architectures it is implemented as
+ an SLJIT_SUB operation (with SLJIT_UNUSED destination and setting
+ appropriate flags) followed by a sljit_emit_jump. However some
+ architectures (i.e: ARM64 or MIPS) may employ special optimizations here.
+ It is suggested to use this comparison form when appropriate.
+ type must be between SLJIT_EQUAL and SLJIT_I_SIG_LESS_EQUAL
+ type can be combined (or'ed) with SLJIT_REWRITABLE_JUMP
+ Flags: destroy flags. */
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s32 type,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w);
+
+/* Basic floating point comparison. In most architectures it is implemented as
+ an SLJIT_FCMP operation (setting appropriate flags) followed by a
+ sljit_emit_jump. However some architectures (i.e: MIPS) may employ
+ special optimizations here. It is suggested to use this comparison form
+ when appropriate.
+ type must be between SLJIT_EQUAL_F64 and SLJIT_ORDERED_F32
+ type can be combined (or'ed) with SLJIT_REWRITABLE_JUMP
+ Flags: destroy flags.
+ Note: if either operand is NaN, the behaviour is undefined for
+ types up to SLJIT_S_LESS_EQUAL. */
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_s32 type,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w);
+
+/* Set the destination of the jump to this label. */
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label);
+/* Set the destination address of the jump to this label. */
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw target);
+
+/* Call function or jump anywhere. Both direct and indirect form
+ type must be between SLJIT_JUMP and SLJIT_CALL3
+ Direct form: set src to SLJIT_IMM() and srcw to the address
+ Indirect form: any other valid addressing mode
+ Flags: - (never set any flags) for unconditional jumps.
+ Flags: destroy all flags for calls. */
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 src, sljit_sw srcw);
+
+/* Perform the operation using the conditional flags as the second argument.
+ Type must always be between SLJIT_EQUAL and SLJIT_S_ORDERED. The value
+ represented by the type is 1, if the condition represented by the type
+ is fulfilled, and 0 otherwise.
+
+ If op == SLJIT_MOV, SLJIT_MOV_S32, SLJIT_MOV_U32:
+ Set dst to the value represented by the type (0 or 1).
+ Src must be SLJIT_UNUSED, and srcw must be 0
+ Flags: - (never set any flags)
+ If op == SLJIT_OR, op == SLJIT_AND, op == SLJIT_XOR
+ Performs the binary operation using src as the first, and the value
+ represented by type as the second argument.
+ Important note: only dst=src and dstw=srcw is supported at the moment!
+ Flags: I | E | K
+ Note: sljit_emit_op_flags does nothing, if dst is SLJIT_UNUSED (regardless of op). */
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw,
+ sljit_s32 type);
+
+/* Copies the base address of SLJIT_SP + offset to dst.
+ Flags: - (never set any flags) */
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw offset);
+
+/* The constant can be changed runtime (see: sljit_set_const)
+ Flags: - (never set any flags) */
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value);
+
+/* After the code generation the address for label, jump and const instructions
+ are computed. Since these structures are freed by sljit_free_compiler, the
+ addresses must be preserved by the user program elsewere. */
+static SLJIT_INLINE sljit_uw sljit_get_label_addr(struct sljit_label *label) { return label->addr; }
+static SLJIT_INLINE sljit_uw sljit_get_jump_addr(struct sljit_jump *jump) { return jump->addr; }
+static SLJIT_INLINE sljit_uw sljit_get_const_addr(struct sljit_const *const_) { return const_->addr; }
+
+/* Only the address and executable offset are required to perform dynamic
+ code modifications. See sljit_get_executable_offset function. */
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset);
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset);
+
+/* --------------------------------------------------------------------- */
+/* Miscellaneous utility functions */
+/* --------------------------------------------------------------------- */
+
+#define SLJIT_MAJOR_VERSION 0
+#define SLJIT_MINOR_VERSION 93
+
+/* Get the human readable name of the platform. Can be useful on platforms
+ like ARM, where ARM and Thumb2 functions can be mixed, and
+ it is useful to know the type of the code generator. */
+SLJIT_API_FUNC_ATTRIBUTE const char* sljit_get_platform_name(void);
+
+/* Portable helper function to get an offset of a member. */
+#define SLJIT_OFFSETOF(base, member) ((sljit_sw)(&((base*)0x10)->member) - 0x10)
+
+#if (defined SLJIT_UTIL_GLOBAL_LOCK && SLJIT_UTIL_GLOBAL_LOCK)
+/* This global lock is useful to compile common functions. */
+SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_grab_lock(void);
+SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_release_lock(void);
+#endif
+
+#if (defined SLJIT_UTIL_STACK && SLJIT_UTIL_STACK)
+
+/* The sljit_stack is a utiliy feature of sljit, which allocates a
+ writable memory region between base (inclusive) and limit (exclusive).
+ Both base and limit is a pointer, and base is always <= than limit.
+ This feature uses the "address space reserve" feature
+ of modern operating systems. Basically we don't need to allocate a
+ huge memory block in one step for the worst case, we can start with
+ a smaller chunk and extend it later. Since the address space is
+ reserved, the data never copied to other regions, thus it is safe
+ to store pointers here. */
+
+/* Note: The base field is aligned to PAGE_SIZE bytes (usually 4k or more).
+ Note: stack growing should not happen in small steps: 4k, 16k or even
+ bigger growth is better.
+ Note: this structure may not be supported by all operating systems.
+ Some kind of fallback mechanism is suggested when SLJIT_UTIL_STACK
+ is not defined. */
+
+struct sljit_stack {
+ /* User data, anything can be stored here.
+ Starting with the same value as base. */
+ sljit_uw top;
+ /* These members are read only. */
+ sljit_uw base;
+ sljit_uw limit;
+ sljit_uw max_limit;
+};
+
+/* Returns NULL if unsuccessful.
+ Note: limit and max_limit contains the size for stack allocation.
+ Note: the top field is initialized to base.
+ Note: see sljit_create_compiler for the explanation of allocator_data. */
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_stack* SLJIT_CALL sljit_allocate_stack(sljit_uw limit, sljit_uw max_limit, void *allocator_data);
+SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_free_stack(struct sljit_stack *stack, void *allocator_data);
+
+/* Can be used to increase (allocate) or decrease (free) the memory area.
+ Returns with a non-zero value if unsuccessful. If new_limit is greater than
+ max_limit, it will fail. It is very easy to implement a stack data structure,
+ since the growth ratio can be added to the current limit, and sljit_stack_resize
+ will do all the necessary checks. The fields of the stack are not changed if
+ sljit_stack_resize fails. */
+SLJIT_API_FUNC_ATTRIBUTE sljit_sw SLJIT_CALL sljit_stack_resize(struct sljit_stack *stack, sljit_uw new_limit);
+
+#endif /* (defined SLJIT_UTIL_STACK && SLJIT_UTIL_STACK) */
+
+#if !(defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
+
+/* Get the entry address of a given function. */
+#define SLJIT_FUNC_OFFSET(func_name) ((sljit_sw)func_name)
+
+#else /* !(defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) */
+
+/* All JIT related code should be placed in the same context (library, binary, etc.). */
+
+#define SLJIT_FUNC_OFFSET(func_name) (*(sljit_sw*)(void*)func_name)
+
+/* For powerpc64, the function pointers point to a context descriptor. */
+struct sljit_function_context {
+ sljit_sw addr;
+ sljit_sw r2;
+ sljit_sw r11;
+};
+
+/* Fill the context arguments using the addr and the function.
+ If func_ptr is NULL, it will not be set to the address of context
+ If addr is NULL, the function address also comes from the func pointer. */
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_function_context(void** func_ptr, struct sljit_function_context* context, sljit_sw addr, void* func);
+
+#endif /* !(defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) */
+
+/* --------------------------------------------------------------------- */
+/* CPU specific functions */
+/* --------------------------------------------------------------------- */
+
+/* The following function is a helper function for sljit_emit_op_custom.
+ It returns with the real machine register index ( >=0 ) of any SLJIT_R,
+ SLJIT_S and SLJIT_SP registers.
+
+ Note: it returns with -1 for virtual registers (only on x86-32). */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_register_index(sljit_s32 reg);
+
+/* The following function is a helper function for sljit_emit_op_custom.
+ It returns with the real machine register index of any SLJIT_FLOAT register.
+
+ Note: the index is always an even number on ARM (except ARM-64), MIPS, and SPARC. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg);
+
+/* Any instruction can be inserted into the instruction stream by
+ sljit_emit_op_custom. It has a similar purpose as inline assembly.
+ The size parameter must match to the instruction size of the target
+ architecture:
+
+ x86: 0 < size <= 15. The instruction argument can be byte aligned.
+ Thumb2: if size == 2, the instruction argument must be 2 byte aligned.
+ if size == 4, the instruction argument must be 4 byte aligned.
+ Otherwise: size must be 4 and instruction argument must be 4 byte aligned. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler,
+ void *instruction, sljit_s32 size);
+
+#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
+
+/* Returns with non-zero if sse2 is available. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_x86_is_sse2_available(void);
+
+/* Returns with non-zero if cmov instruction is available. */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_x86_is_cmov_available(void);
+
+/* Emit a conditional mov instruction on x86 CPUs. This instruction
+ moves src to destination, if the condition is satisfied. Unlike
+ other arithmetic instructions, destination must be a register.
+ Before such instructions are emitted, cmov support should be
+ checked by sljit_x86_is_cmov_available function.
+ type must be between SLJIT_EQUAL and SLJIT_S_ORDERED
+ dst_reg must be a valid register and it can be combined
+ with SLJIT_I32_OP to perform 32 bit arithmetic
+ Flags: I - (never set any flags)
+ */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_x86_emit_cmov(struct sljit_compiler *compiler,
+ sljit_s32 type,
+ sljit_s32 dst_reg,
+ sljit_s32 src, sljit_sw srcw);
+
+#endif
+
+#endif /* _SLJIT_LIR_H_ */
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeARM_32.c b/thirdparty/pcre2/src/sljit/sljitNativeARM_32.c
new file mode 100644
index 0000000000..09701d53fc
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativeARM_32.c
@@ -0,0 +1,2583 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+SLJIT_API_FUNC_ATTRIBUTE const char* sljit_get_platform_name(void)
+{
+#if (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
+ return "ARMv7" SLJIT_CPUINFO;
+#elif (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ return "ARMv5" SLJIT_CPUINFO;
+#else
+#error "Internal error: Unknown ARM architecture"
+#endif
+}
+
+/* Last register + 1. */
+#define TMP_REG1 (SLJIT_NUMBER_OF_REGISTERS + 2)
+#define TMP_REG2 (SLJIT_NUMBER_OF_REGISTERS + 3)
+#define TMP_REG3 (SLJIT_NUMBER_OF_REGISTERS + 4)
+#define TMP_PC (SLJIT_NUMBER_OF_REGISTERS + 5)
+
+#define TMP_FREG1 (0)
+#define TMP_FREG2 (SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1)
+
+/* In ARM instruction words.
+ Cache lines are usually 32 byte aligned. */
+#define CONST_POOL_ALIGNMENT 8
+#define CONST_POOL_EMPTY 0xffffffff
+
+#define ALIGN_INSTRUCTION(ptr) \
+ (sljit_uw*)(((sljit_uw)(ptr) + (CONST_POOL_ALIGNMENT * sizeof(sljit_uw)) - 1) & ~((CONST_POOL_ALIGNMENT * sizeof(sljit_uw)) - 1))
+#define MAX_DIFFERENCE(max_diff) \
+ (((max_diff) / (sljit_s32)sizeof(sljit_uw)) - (CONST_POOL_ALIGNMENT - 1))
+
+/* See sljit_emit_enter and sljit_emit_op0 if you want to change them. */
+static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 6] = {
+ 0, 0, 1, 2, 11, 10, 9, 8, 7, 6, 5, 4, 13, 3, 12, 14, 15
+};
+
+#define RM(rm) (reg_map[rm])
+#define RD(rd) (reg_map[rd] << 12)
+#define RN(rn) (reg_map[rn] << 16)
+
+/* --------------------------------------------------------------------- */
+/* Instrucion forms */
+/* --------------------------------------------------------------------- */
+
+/* The instruction includes the AL condition.
+ INST_NAME - CONDITIONAL remove this flag. */
+#define COND_MASK 0xf0000000
+#define CONDITIONAL 0xe0000000
+#define PUSH_POOL 0xff000000
+
+/* DP - Data Processing instruction (use with EMIT_DATA_PROCESS_INS). */
+#define ADC_DP 0x5
+#define ADD_DP 0x4
+#define AND_DP 0x0
+#define B 0xea000000
+#define BIC_DP 0xe
+#define BL 0xeb000000
+#define BLX 0xe12fff30
+#define BX 0xe12fff10
+#define CLZ 0xe16f0f10
+#define CMP_DP 0xa
+#define BKPT 0xe1200070
+#define EOR_DP 0x1
+#define MOV_DP 0xd
+#define MUL 0xe0000090
+#define MVN_DP 0xf
+#define NOP 0xe1a00000
+#define ORR_DP 0xc
+#define PUSH 0xe92d0000
+#define POP 0xe8bd0000
+#define RSB_DP 0x3
+#define RSC_DP 0x7
+#define SBC_DP 0x6
+#define SMULL 0xe0c00090
+#define SUB_DP 0x2
+#define UMULL 0xe0800090
+#define VABS_F32 0xeeb00ac0
+#define VADD_F32 0xee300a00
+#define VCMP_F32 0xeeb40a40
+#define VCVT_F32_S32 0xeeb80ac0
+#define VCVT_F64_F32 0xeeb70ac0
+#define VCVT_S32_F32 0xeebd0ac0
+#define VDIV_F32 0xee800a00
+#define VMOV_F32 0xeeb00a40
+#define VMOV 0xee000a10
+#define VMRS 0xeef1fa10
+#define VMUL_F32 0xee200a00
+#define VNEG_F32 0xeeb10a40
+#define VSTR_F32 0xed000a00
+#define VSUB_F32 0xee300a40
+
+#if (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
+/* Arm v7 specific instructions. */
+#define MOVW 0xe3000000
+#define MOVT 0xe3400000
+#define SXTB 0xe6af0070
+#define SXTH 0xe6bf0070
+#define UXTB 0xe6ef0070
+#define UXTH 0xe6ff0070
+#endif
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+
+static sljit_s32 push_cpool(struct sljit_compiler *compiler)
+{
+ /* Pushing the constant pool into the instruction stream. */
+ sljit_uw* inst;
+ sljit_uw* cpool_ptr;
+ sljit_uw* cpool_end;
+ sljit_s32 i;
+
+ /* The label could point the address after the constant pool. */
+ if (compiler->last_label && compiler->last_label->size == compiler->size)
+ compiler->last_label->size += compiler->cpool_fill + (CONST_POOL_ALIGNMENT - 1) + 1;
+
+ SLJIT_ASSERT(compiler->cpool_fill > 0 && compiler->cpool_fill <= CPOOL_SIZE);
+ inst = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw));
+ FAIL_IF(!inst);
+ compiler->size++;
+ *inst = 0xff000000 | compiler->cpool_fill;
+
+ for (i = 0; i < CONST_POOL_ALIGNMENT - 1; i++) {
+ inst = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw));
+ FAIL_IF(!inst);
+ compiler->size++;
+ *inst = 0;
+ }
+
+ cpool_ptr = compiler->cpool;
+ cpool_end = cpool_ptr + compiler->cpool_fill;
+ while (cpool_ptr < cpool_end) {
+ inst = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw));
+ FAIL_IF(!inst);
+ compiler->size++;
+ *inst = *cpool_ptr++;
+ }
+ compiler->cpool_diff = CONST_POOL_EMPTY;
+ compiler->cpool_fill = 0;
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 push_inst(struct sljit_compiler *compiler, sljit_uw inst)
+{
+ sljit_uw* ptr;
+
+ if (SLJIT_UNLIKELY(compiler->cpool_diff != CONST_POOL_EMPTY && compiler->size - compiler->cpool_diff >= MAX_DIFFERENCE(4092)))
+ FAIL_IF(push_cpool(compiler));
+
+ ptr = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw));
+ FAIL_IF(!ptr);
+ compiler->size++;
+ *ptr = inst;
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 push_inst_with_literal(struct sljit_compiler *compiler, sljit_uw inst, sljit_uw literal)
+{
+ sljit_uw* ptr;
+ sljit_uw cpool_index = CPOOL_SIZE;
+ sljit_uw* cpool_ptr;
+ sljit_uw* cpool_end;
+ sljit_u8* cpool_unique_ptr;
+
+ if (SLJIT_UNLIKELY(compiler->cpool_diff != CONST_POOL_EMPTY && compiler->size - compiler->cpool_diff >= MAX_DIFFERENCE(4092)))
+ FAIL_IF(push_cpool(compiler));
+ else if (compiler->cpool_fill > 0) {
+ cpool_ptr = compiler->cpool;
+ cpool_end = cpool_ptr + compiler->cpool_fill;
+ cpool_unique_ptr = compiler->cpool_unique;
+ do {
+ if ((*cpool_ptr == literal) && !(*cpool_unique_ptr)) {
+ cpool_index = cpool_ptr - compiler->cpool;
+ break;
+ }
+ cpool_ptr++;
+ cpool_unique_ptr++;
+ } while (cpool_ptr < cpool_end);
+ }
+
+ if (cpool_index == CPOOL_SIZE) {
+ /* Must allocate a new entry in the literal pool. */
+ if (compiler->cpool_fill < CPOOL_SIZE) {
+ cpool_index = compiler->cpool_fill;
+ compiler->cpool_fill++;
+ }
+ else {
+ FAIL_IF(push_cpool(compiler));
+ cpool_index = 0;
+ compiler->cpool_fill = 1;
+ }
+ }
+
+ SLJIT_ASSERT((inst & 0xfff) == 0);
+ ptr = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw));
+ FAIL_IF(!ptr);
+ compiler->size++;
+ *ptr = inst | cpool_index;
+
+ compiler->cpool[cpool_index] = literal;
+ compiler->cpool_unique[cpool_index] = 0;
+ if (compiler->cpool_diff == CONST_POOL_EMPTY)
+ compiler->cpool_diff = compiler->size;
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 push_inst_with_unique_literal(struct sljit_compiler *compiler, sljit_uw inst, sljit_uw literal)
+{
+ sljit_uw* ptr;
+ if (SLJIT_UNLIKELY((compiler->cpool_diff != CONST_POOL_EMPTY && compiler->size - compiler->cpool_diff >= MAX_DIFFERENCE(4092)) || compiler->cpool_fill >= CPOOL_SIZE))
+ FAIL_IF(push_cpool(compiler));
+
+ SLJIT_ASSERT(compiler->cpool_fill < CPOOL_SIZE && (inst & 0xfff) == 0);
+ ptr = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw));
+ FAIL_IF(!ptr);
+ compiler->size++;
+ *ptr = inst | compiler->cpool_fill;
+
+ compiler->cpool[compiler->cpool_fill] = literal;
+ compiler->cpool_unique[compiler->cpool_fill] = 1;
+ compiler->cpool_fill++;
+ if (compiler->cpool_diff == CONST_POOL_EMPTY)
+ compiler->cpool_diff = compiler->size;
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 prepare_blx(struct sljit_compiler *compiler)
+{
+ /* Place for at least two instruction (doesn't matter whether the first has a literal). */
+ if (SLJIT_UNLIKELY(compiler->cpool_diff != CONST_POOL_EMPTY && compiler->size - compiler->cpool_diff >= MAX_DIFFERENCE(4088)))
+ return push_cpool(compiler);
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 emit_blx(struct sljit_compiler *compiler)
+{
+ /* Must follow tightly the previous instruction (to be able to convert it to bl instruction). */
+ SLJIT_ASSERT(compiler->cpool_diff == CONST_POOL_EMPTY || compiler->size - compiler->cpool_diff < MAX_DIFFERENCE(4092));
+ return push_inst(compiler, BLX | RM(TMP_REG1));
+}
+
+static sljit_uw patch_pc_relative_loads(sljit_uw *last_pc_patch, sljit_uw *code_ptr, sljit_uw* const_pool, sljit_uw cpool_size)
+{
+ sljit_uw diff;
+ sljit_uw ind;
+ sljit_uw counter = 0;
+ sljit_uw* clear_const_pool = const_pool;
+ sljit_uw* clear_const_pool_end = const_pool + cpool_size;
+
+ SLJIT_ASSERT(const_pool - code_ptr <= CONST_POOL_ALIGNMENT);
+ /* Set unused flag for all literals in the constant pool.
+ I.e.: unused literals can belong to branches, which can be encoded as B or BL.
+ We can "compress" the constant pool by discarding these literals. */
+ while (clear_const_pool < clear_const_pool_end)
+ *clear_const_pool++ = (sljit_uw)(-1);
+
+ while (last_pc_patch < code_ptr) {
+ /* Data transfer instruction with Rn == r15. */
+ if ((*last_pc_patch & 0x0c0f0000) == 0x040f0000) {
+ diff = const_pool - last_pc_patch;
+ ind = (*last_pc_patch) & 0xfff;
+
+ /* Must be a load instruction with immediate offset. */
+ SLJIT_ASSERT(ind < cpool_size && !(*last_pc_patch & (1 << 25)) && (*last_pc_patch & (1 << 20)));
+ if ((sljit_s32)const_pool[ind] < 0) {
+ const_pool[ind] = counter;
+ ind = counter;
+ counter++;
+ }
+ else
+ ind = const_pool[ind];
+
+ SLJIT_ASSERT(diff >= 1);
+ if (diff >= 2 || ind > 0) {
+ diff = (diff + ind - 2) << 2;
+ SLJIT_ASSERT(diff <= 0xfff);
+ *last_pc_patch = (*last_pc_patch & ~0xfff) | diff;
+ }
+ else
+ *last_pc_patch = (*last_pc_patch & ~(0xfff | (1 << 23))) | 0x004;
+ }
+ last_pc_patch++;
+ }
+ return counter;
+}
+
+/* In some rare ocasions we may need future patches. The probability is close to 0 in practice. */
+struct future_patch {
+ struct future_patch* next;
+ sljit_s32 index;
+ sljit_s32 value;
+};
+
+static sljit_s32 resolve_const_pool_index(struct sljit_compiler *compiler, struct future_patch **first_patch, sljit_uw cpool_current_index, sljit_uw *cpool_start_address, sljit_uw *buf_ptr)
+{
+ sljit_s32 value;
+ struct future_patch *curr_patch, *prev_patch;
+
+ SLJIT_UNUSED_ARG(compiler);
+
+ /* Using the values generated by patch_pc_relative_loads. */
+ if (!*first_patch)
+ value = (sljit_s32)cpool_start_address[cpool_current_index];
+ else {
+ curr_patch = *first_patch;
+ prev_patch = NULL;
+ while (1) {
+ if (!curr_patch) {
+ value = (sljit_s32)cpool_start_address[cpool_current_index];
+ break;
+ }
+ if ((sljit_uw)curr_patch->index == cpool_current_index) {
+ value = curr_patch->value;
+ if (prev_patch)
+ prev_patch->next = curr_patch->next;
+ else
+ *first_patch = curr_patch->next;
+ SLJIT_FREE(curr_patch, compiler->allocator_data);
+ break;
+ }
+ prev_patch = curr_patch;
+ curr_patch = curr_patch->next;
+ }
+ }
+
+ if (value >= 0) {
+ if ((sljit_uw)value > cpool_current_index) {
+ curr_patch = (struct future_patch*)SLJIT_MALLOC(sizeof(struct future_patch), compiler->allocator_data);
+ if (!curr_patch) {
+ while (*first_patch) {
+ curr_patch = *first_patch;
+ *first_patch = (*first_patch)->next;
+ SLJIT_FREE(curr_patch, compiler->allocator_data);
+ }
+ return SLJIT_ERR_ALLOC_FAILED;
+ }
+ curr_patch->next = *first_patch;
+ curr_patch->index = value;
+ curr_patch->value = cpool_start_address[value];
+ *first_patch = curr_patch;
+ }
+ cpool_start_address[value] = *buf_ptr;
+ }
+ return SLJIT_SUCCESS;
+}
+
+#else
+
+static sljit_s32 push_inst(struct sljit_compiler *compiler, sljit_uw inst)
+{
+ sljit_uw* ptr;
+
+ ptr = (sljit_uw*)ensure_buf(compiler, sizeof(sljit_uw));
+ FAIL_IF(!ptr);
+ compiler->size++;
+ *ptr = inst;
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 emit_imm(struct sljit_compiler *compiler, sljit_s32 reg, sljit_sw imm)
+{
+ FAIL_IF(push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | (imm & 0xfff)));
+ return push_inst(compiler, MOVT | RD(reg) | ((imm >> 12) & 0xf0000) | ((imm >> 16) & 0xfff));
+}
+
+#endif
+
+static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_uw *code_ptr, sljit_uw *code, sljit_sw executable_offset)
+{
+ sljit_sw diff;
+
+ if (jump->flags & SLJIT_REWRITABLE_JUMP)
+ return 0;
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ if (jump->flags & IS_BL)
+ code_ptr--;
+
+ if (jump->flags & JUMP_ADDR)
+ diff = ((sljit_sw)jump->u.target - (sljit_sw)(code_ptr + 2) - executable_offset);
+ else {
+ SLJIT_ASSERT(jump->flags & JUMP_LABEL);
+ diff = ((sljit_sw)(code + jump->u.label->size) - (sljit_sw)(code_ptr + 2));
+ }
+
+ /* Branch to Thumb code has not been optimized yet. */
+ if (diff & 0x3)
+ return 0;
+
+ if (jump->flags & IS_BL) {
+ if (diff <= 0x01ffffff && diff >= -0x02000000) {
+ *code_ptr = (BL - CONDITIONAL) | (*(code_ptr + 1) & COND_MASK);
+ jump->flags |= PATCH_B;
+ return 1;
+ }
+ }
+ else {
+ if (diff <= 0x01ffffff && diff >= -0x02000000) {
+ *code_ptr = (B - CONDITIONAL) | (*code_ptr & COND_MASK);
+ jump->flags |= PATCH_B;
+ }
+ }
+#else
+ if (jump->flags & JUMP_ADDR)
+ diff = ((sljit_sw)jump->u.target - (sljit_sw)code_ptr - executable_offset);
+ else {
+ SLJIT_ASSERT(jump->flags & JUMP_LABEL);
+ diff = ((sljit_sw)(code + jump->u.label->size) - (sljit_sw)code_ptr);
+ }
+
+ /* Branch to Thumb code has not been optimized yet. */
+ if (diff & 0x3)
+ return 0;
+
+ if (diff <= 0x01ffffff && diff >= -0x02000000) {
+ code_ptr -= 2;
+ *code_ptr = ((jump->flags & IS_BL) ? (BL - CONDITIONAL) : (B - CONDITIONAL)) | (code_ptr[2] & COND_MASK);
+ jump->flags |= PATCH_B;
+ return 1;
+ }
+#endif
+ return 0;
+}
+
+static SLJIT_INLINE void inline_set_jump_addr(sljit_uw jump_ptr, sljit_sw executable_offset, sljit_uw new_addr, sljit_s32 flush_cache)
+{
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ sljit_uw *ptr = (sljit_uw *)jump_ptr;
+ sljit_uw *inst = (sljit_uw *)ptr[0];
+ sljit_uw mov_pc = ptr[1];
+ sljit_s32 bl = (mov_pc & 0x0000f000) != RD(TMP_PC);
+ sljit_sw diff = (sljit_sw)(((sljit_sw)new_addr - (sljit_sw)(inst + 2) - executable_offset) >> 2);
+
+ if (diff <= 0x7fffff && diff >= -0x800000) {
+ /* Turn to branch. */
+ if (!bl) {
+ inst[0] = (mov_pc & COND_MASK) | (B - CONDITIONAL) | (diff & 0xffffff);
+ if (flush_cache) {
+ inst = (sljit_uw *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 1);
+ }
+ } else {
+ inst[0] = (mov_pc & COND_MASK) | (BL - CONDITIONAL) | (diff & 0xffffff);
+ inst[1] = NOP;
+ if (flush_cache) {
+ inst = (sljit_uw *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 2);
+ }
+ }
+ } else {
+ /* Get the position of the constant. */
+ if (mov_pc & (1 << 23))
+ ptr = inst + ((mov_pc & 0xfff) >> 2) + 2;
+ else
+ ptr = inst + 1;
+
+ if (*inst != mov_pc) {
+ inst[0] = mov_pc;
+ if (!bl) {
+ if (flush_cache) {
+ inst = (sljit_uw *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 1);
+ }
+ } else {
+ inst[1] = BLX | RM(TMP_REG1);
+ if (flush_cache) {
+ inst = (sljit_uw *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 2);
+ }
+ }
+ }
+ *ptr = new_addr;
+ }
+#else
+ sljit_uw *inst = (sljit_uw*)jump_ptr;
+ SLJIT_ASSERT((inst[0] & 0xfff00000) == MOVW && (inst[1] & 0xfff00000) == MOVT);
+ inst[0] = MOVW | (inst[0] & 0xf000) | ((new_addr << 4) & 0xf0000) | (new_addr & 0xfff);
+ inst[1] = MOVT | (inst[1] & 0xf000) | ((new_addr >> 12) & 0xf0000) | ((new_addr >> 16) & 0xfff);
+ if (flush_cache) {
+ inst = (sljit_uw *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 2);
+ }
+#endif
+}
+
+static sljit_uw get_imm(sljit_uw imm);
+
+static SLJIT_INLINE void inline_set_const(sljit_uw addr, sljit_sw executable_offset, sljit_sw new_constant, sljit_s32 flush_cache)
+{
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ sljit_uw *ptr = (sljit_uw*)addr;
+ sljit_uw *inst = (sljit_uw*)ptr[0];
+ sljit_uw ldr_literal = ptr[1];
+ sljit_uw src2;
+
+ src2 = get_imm(new_constant);
+ if (src2) {
+ *inst = 0xe3a00000 | (ldr_literal & 0xf000) | src2;
+ if (flush_cache) {
+ inst = (sljit_uw *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 1);
+ }
+ return;
+ }
+
+ src2 = get_imm(~new_constant);
+ if (src2) {
+ *inst = 0xe3e00000 | (ldr_literal & 0xf000) | src2;
+ if (flush_cache) {
+ inst = (sljit_uw *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 1);
+ }
+ return;
+ }
+
+ if (ldr_literal & (1 << 23))
+ ptr = inst + ((ldr_literal & 0xfff) >> 2) + 2;
+ else
+ ptr = inst + 1;
+
+ if (*inst != ldr_literal) {
+ *inst = ldr_literal;
+ if (flush_cache) {
+ inst = (sljit_uw *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 1);
+ }
+ }
+ *ptr = new_constant;
+#else
+ sljit_uw *inst = (sljit_uw*)addr;
+ SLJIT_ASSERT((inst[0] & 0xfff00000) == MOVW && (inst[1] & 0xfff00000) == MOVT);
+ inst[0] = MOVW | (inst[0] & 0xf000) | ((new_constant << 4) & 0xf0000) | (new_constant & 0xfff);
+ inst[1] = MOVT | (inst[1] & 0xf000) | ((new_constant >> 12) & 0xf0000) | ((new_constant >> 16) & 0xfff);
+ if (flush_cache) {
+ inst = (sljit_uw *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 2);
+ }
+#endif
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
+{
+ struct sljit_memory_fragment *buf;
+ sljit_uw *code;
+ sljit_uw *code_ptr;
+ sljit_uw *buf_ptr;
+ sljit_uw *buf_end;
+ sljit_uw size;
+ sljit_uw word_count;
+ sljit_sw executable_offset;
+ sljit_sw jump_addr;
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ sljit_uw cpool_size;
+ sljit_uw cpool_skip_alignment;
+ sljit_uw cpool_current_index;
+ sljit_uw *cpool_start_address;
+ sljit_uw *last_pc_patch;
+ struct future_patch *first_patch;
+#endif
+
+ struct sljit_label *label;
+ struct sljit_jump *jump;
+ struct sljit_const *const_;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_generate_code(compiler));
+ reverse_buf(compiler);
+
+ /* Second code generation pass. */
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ size = compiler->size + (compiler->patches << 1);
+ if (compiler->cpool_fill > 0)
+ size += compiler->cpool_fill + CONST_POOL_ALIGNMENT - 1;
+#else
+ size = compiler->size;
+#endif
+ code = (sljit_uw*)SLJIT_MALLOC_EXEC(size * sizeof(sljit_uw));
+ PTR_FAIL_WITH_EXEC_IF(code);
+ buf = compiler->buf;
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ cpool_size = 0;
+ cpool_skip_alignment = 0;
+ cpool_current_index = 0;
+ cpool_start_address = NULL;
+ first_patch = NULL;
+ last_pc_patch = code;
+#endif
+
+ code_ptr = code;
+ word_count = 0;
+ executable_offset = SLJIT_EXEC_OFFSET(code);
+
+ label = compiler->labels;
+ jump = compiler->jumps;
+ const_ = compiler->consts;
+
+ if (label && label->size == 0) {
+ label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code, executable_offset);
+ label = label->next;
+ }
+
+ do {
+ buf_ptr = (sljit_uw*)buf->memory;
+ buf_end = buf_ptr + (buf->used_size >> 2);
+ do {
+ word_count++;
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ if (cpool_size > 0) {
+ if (cpool_skip_alignment > 0) {
+ buf_ptr++;
+ cpool_skip_alignment--;
+ }
+ else {
+ if (SLJIT_UNLIKELY(resolve_const_pool_index(compiler, &first_patch, cpool_current_index, cpool_start_address, buf_ptr))) {
+ SLJIT_FREE_EXEC(code);
+ compiler->error = SLJIT_ERR_ALLOC_FAILED;
+ return NULL;
+ }
+ buf_ptr++;
+ if (++cpool_current_index >= cpool_size) {
+ SLJIT_ASSERT(!first_patch);
+ cpool_size = 0;
+ if (label && label->size == word_count) {
+ /* Points after the current instruction. */
+ label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
+ label->size = code_ptr - code;
+ label = label->next;
+ }
+ }
+ }
+ }
+ else if ((*buf_ptr & 0xff000000) != PUSH_POOL) {
+#endif
+ *code_ptr = *buf_ptr++;
+ /* These structures are ordered by their address. */
+ SLJIT_ASSERT(!label || label->size >= word_count);
+ SLJIT_ASSERT(!jump || jump->addr >= word_count);
+ SLJIT_ASSERT(!const_ || const_->addr >= word_count);
+ if (jump && jump->addr == word_count) {
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ if (detect_jump_type(jump, code_ptr, code, executable_offset))
+ code_ptr--;
+ jump->addr = (sljit_uw)code_ptr;
+#else
+ jump->addr = (sljit_uw)(code_ptr - 2);
+ if (detect_jump_type(jump, code_ptr, code, executable_offset))
+ code_ptr -= 2;
+#endif
+ jump = jump->next;
+ }
+ if (label && label->size == word_count) {
+ /* code_ptr can be affected above. */
+ label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr + 1, executable_offset);
+ label->size = (code_ptr + 1) - code;
+ label = label->next;
+ }
+ if (const_ && const_->addr == word_count) {
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ const_->addr = (sljit_uw)code_ptr;
+#else
+ const_->addr = (sljit_uw)(code_ptr - 1);
+#endif
+ const_ = const_->next;
+ }
+ code_ptr++;
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ }
+ else {
+ /* Fortunately, no need to shift. */
+ cpool_size = *buf_ptr++ & ~PUSH_POOL;
+ SLJIT_ASSERT(cpool_size > 0);
+ cpool_start_address = ALIGN_INSTRUCTION(code_ptr + 1);
+ cpool_current_index = patch_pc_relative_loads(last_pc_patch, code_ptr, cpool_start_address, cpool_size);
+ if (cpool_current_index > 0) {
+ /* Unconditional branch. */
+ *code_ptr = B | (((cpool_start_address - code_ptr) + cpool_current_index - 2) & ~PUSH_POOL);
+ code_ptr = cpool_start_address + cpool_current_index;
+ }
+ cpool_skip_alignment = CONST_POOL_ALIGNMENT - 1;
+ cpool_current_index = 0;
+ last_pc_patch = code_ptr;
+ }
+#endif
+ } while (buf_ptr < buf_end);
+ buf = buf->next;
+ } while (buf);
+
+ SLJIT_ASSERT(!label);
+ SLJIT_ASSERT(!jump);
+ SLJIT_ASSERT(!const_);
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ SLJIT_ASSERT(cpool_size == 0);
+ if (compiler->cpool_fill > 0) {
+ cpool_start_address = ALIGN_INSTRUCTION(code_ptr);
+ cpool_current_index = patch_pc_relative_loads(last_pc_patch, code_ptr, cpool_start_address, compiler->cpool_fill);
+ if (cpool_current_index > 0)
+ code_ptr = cpool_start_address + cpool_current_index;
+
+ buf_ptr = compiler->cpool;
+ buf_end = buf_ptr + compiler->cpool_fill;
+ cpool_current_index = 0;
+ while (buf_ptr < buf_end) {
+ if (SLJIT_UNLIKELY(resolve_const_pool_index(compiler, &first_patch, cpool_current_index, cpool_start_address, buf_ptr))) {
+ SLJIT_FREE_EXEC(code);
+ compiler->error = SLJIT_ERR_ALLOC_FAILED;
+ return NULL;
+ }
+ buf_ptr++;
+ cpool_current_index++;
+ }
+ SLJIT_ASSERT(!first_patch);
+ }
+#endif
+
+ jump = compiler->jumps;
+ while (jump) {
+ buf_ptr = (sljit_uw *)jump->addr;
+
+ if (jump->flags & PATCH_B) {
+ jump_addr = (sljit_sw)SLJIT_ADD_EXEC_OFFSET(buf_ptr + 2, executable_offset);
+ if (!(jump->flags & JUMP_ADDR)) {
+ SLJIT_ASSERT(jump->flags & JUMP_LABEL);
+ SLJIT_ASSERT(((sljit_sw)jump->u.label->addr - jump_addr) <= 0x01ffffff && ((sljit_sw)jump->u.label->addr - jump_addr) >= -0x02000000);
+ *buf_ptr |= (((sljit_sw)jump->u.label->addr - jump_addr) >> 2) & 0x00ffffff;
+ }
+ else {
+ SLJIT_ASSERT(((sljit_sw)jump->u.target - jump_addr) <= 0x01ffffff && ((sljit_sw)jump->u.target - jump_addr) >= -0x02000000);
+ *buf_ptr |= (((sljit_sw)jump->u.target - jump_addr) >> 2) & 0x00ffffff;
+ }
+ }
+ else if (jump->flags & SLJIT_REWRITABLE_JUMP) {
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ jump->addr = (sljit_uw)code_ptr;
+ code_ptr[0] = (sljit_uw)buf_ptr;
+ code_ptr[1] = *buf_ptr;
+ inline_set_jump_addr((sljit_uw)code_ptr, executable_offset, (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target, 0);
+ code_ptr += 2;
+#else
+ inline_set_jump_addr((sljit_uw)buf_ptr, executable_offset, (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target, 0);
+#endif
+ }
+ else {
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ if (jump->flags & IS_BL)
+ buf_ptr--;
+ if (*buf_ptr & (1 << 23))
+ buf_ptr += ((*buf_ptr & 0xfff) >> 2) + 2;
+ else
+ buf_ptr += 1;
+ *buf_ptr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target;
+#else
+ inline_set_jump_addr((sljit_uw)buf_ptr, executable_offset, (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target, 0);
+#endif
+ }
+ jump = jump->next;
+ }
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ const_ = compiler->consts;
+ while (const_) {
+ buf_ptr = (sljit_uw*)const_->addr;
+ const_->addr = (sljit_uw)code_ptr;
+
+ code_ptr[0] = (sljit_uw)buf_ptr;
+ code_ptr[1] = *buf_ptr;
+ if (*buf_ptr & (1 << 23))
+ buf_ptr += ((*buf_ptr & 0xfff) >> 2) + 2;
+ else
+ buf_ptr += 1;
+ /* Set the value again (can be a simple constant). */
+ inline_set_const((sljit_uw)code_ptr, executable_offset, *buf_ptr, 0);
+ code_ptr += 2;
+
+ const_ = const_->next;
+ }
+#endif
+
+ SLJIT_ASSERT(code_ptr - code <= (sljit_s32)size);
+
+ compiler->error = SLJIT_ERR_COMPILED;
+ compiler->executable_offset = executable_offset;
+ compiler->executable_size = (code_ptr - code) * sizeof(sljit_uw);
+
+ code = (sljit_uw *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset);
+ code_ptr = (sljit_uw *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
+
+ SLJIT_CACHE_FLUSH(code, code_ptr);
+ return code;
+}
+
+/* --------------------------------------------------------------------- */
+/* Entry, exit */
+/* --------------------------------------------------------------------- */
+
+/* emit_op inp_flags.
+ WRITE_BACK must be the first, since it is a flag. */
+#define WRITE_BACK 0x01
+#define ALLOW_IMM 0x02
+#define ALLOW_INV_IMM 0x04
+#define ALLOW_ANY_IMM (ALLOW_IMM | ALLOW_INV_IMM)
+#define ARG_TEST 0x08
+
+/* Creates an index in data_transfer_insts array. */
+#define WORD_DATA 0x00
+#define BYTE_DATA 0x10
+#define HALF_DATA 0x20
+#define SIGNED_DATA 0x40
+#define LOAD_DATA 0x80
+
+/* Condition: AL. */
+#define EMIT_DATA_PROCESS_INS(opcode, set_flags, dst, src1, src2) \
+ (0xe0000000 | ((opcode) << 21) | (set_flags) | RD(dst) | RN(src1) | (src2))
+
+static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 inp_flags,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w);
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ sljit_s32 size, i, tmp;
+ sljit_uw push;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ /* Push saved registers, temporary registers
+ stmdb sp!, {..., lr} */
+ push = PUSH | (1 << 14);
+
+ tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = SLJIT_S0; i >= tmp; i--)
+ push |= 1 << reg_map[i];
+
+ for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--)
+ push |= 1 << reg_map[i];
+
+ FAIL_IF(push_inst(compiler, push));
+
+ /* Stack must be aligned to 8 bytes: */
+ size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1);
+ local_size = ((size + local_size + 7) & ~7) - size;
+ compiler->local_size = local_size;
+ if (local_size > 0)
+ FAIL_IF(emit_op(compiler, SLJIT_SUB, ALLOW_IMM, SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, local_size));
+
+ if (args >= 1)
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, SLJIT_S0, SLJIT_UNUSED, RM(SLJIT_R0))));
+ if (args >= 2)
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, SLJIT_S1, SLJIT_UNUSED, RM(SLJIT_R1))));
+ if (args >= 3)
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, SLJIT_S2, SLJIT_UNUSED, RM(SLJIT_R2))));
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ sljit_s32 size;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1);
+ compiler->local_size = ((size + local_size + 7) & ~7) - size;
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 i, tmp;
+ sljit_uw pop;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_return(compiler, op, src, srcw));
+
+ FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
+
+ if (compiler->local_size > 0)
+ FAIL_IF(emit_op(compiler, SLJIT_ADD, ALLOW_IMM, SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, compiler->local_size));
+
+ /* Push saved registers, temporary registers
+ ldmia sp!, {..., pc} */
+ pop = POP | (1 << 15);
+
+ tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = SLJIT_S0; i >= tmp; i--)
+ pop |= 1 << reg_map[i];
+
+ for (i = compiler->scratches; i >= SLJIT_FIRST_SAVED_REG; i--)
+ pop |= 1 << reg_map[i];
+
+ return push_inst(compiler, pop);
+}
+
+/* --------------------------------------------------------------------- */
+/* Operators */
+/* --------------------------------------------------------------------- */
+
+/* s/l - store/load (1 bit)
+ u/s - signed/unsigned (1 bit)
+ w/b/h/N - word/byte/half/NOT allowed (2 bit)
+ It contans 16 items, but not all are different. */
+
+static sljit_sw data_transfer_insts[16] = {
+/* s u w */ 0xe5000000 /* str */,
+/* s u b */ 0xe5400000 /* strb */,
+/* s u h */ 0xe10000b0 /* strh */,
+/* s u N */ 0x00000000 /* not allowed */,
+/* s s w */ 0xe5000000 /* str */,
+/* s s b */ 0xe5400000 /* strb */,
+/* s s h */ 0xe10000b0 /* strh */,
+/* s s N */ 0x00000000 /* not allowed */,
+
+/* l u w */ 0xe5100000 /* ldr */,
+/* l u b */ 0xe5500000 /* ldrb */,
+/* l u h */ 0xe11000b0 /* ldrh */,
+/* l u N */ 0x00000000 /* not allowed */,
+/* l s w */ 0xe5100000 /* ldr */,
+/* l s b */ 0xe11000d0 /* ldrsb */,
+/* l s h */ 0xe11000f0 /* ldrsh */,
+/* l s N */ 0x00000000 /* not allowed */,
+};
+
+#define EMIT_DATA_TRANSFER(type, add, wb, target, base1, base2) \
+ (data_transfer_insts[(type) >> 4] | ((add) << 23) | ((wb) << 21) | (reg_map[target] << 12) | (reg_map[base1] << 16) | (base2))
+/* Normal ldr/str instruction.
+ Type2: ldrsb, ldrh, ldrsh */
+#define IS_TYPE1_TRANSFER(type) \
+ (data_transfer_insts[(type) >> 4] & 0x04000000)
+#define TYPE2_TRANSFER_IMM(imm) \
+ (((imm) & 0xf) | (((imm) & 0xf0) << 4) | (1 << 22))
+
+/* flags: */
+ /* Arguments are swapped. */
+#define ARGS_SWAPPED 0x01
+ /* Inverted immediate. */
+#define INV_IMM 0x02
+ /* Source and destination is register. */
+#define REG_DEST 0x04
+#define REG_SOURCE 0x08
+ /* One instruction is enough. */
+#define FAST_DEST 0x10
+ /* Multiple instructions are required. */
+#define SLOW_DEST 0x20
+/* SET_FLAGS must be (1 << 20) as it is also the value of S bit (can be used for optimization). */
+#define SET_FLAGS (1 << 20)
+/* dst: reg
+ src1: reg
+ src2: reg or imm (if allowed)
+ SRC2_IMM must be (1 << 25) as it is also the value of I bit (can be used for optimization). */
+#define SRC2_IMM (1 << 25)
+
+#define EMIT_DATA_PROCESS_INS_AND_RETURN(opcode) \
+ return push_inst(compiler, EMIT_DATA_PROCESS_INS(opcode, flags & SET_FLAGS, dst, src1, (src2 & SRC2_IMM) ? src2 : RM(src2)))
+
+#define EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(opcode, dst, src1, src2) \
+ return push_inst(compiler, EMIT_DATA_PROCESS_INS(opcode, flags & SET_FLAGS, dst, src1, src2))
+
+#define EMIT_SHIFT_INS_AND_RETURN(opcode) \
+ SLJIT_ASSERT(!(flags & INV_IMM) && !(src2 & SRC2_IMM)); \
+ if (compiler->shift_imm != 0x20) { \
+ SLJIT_ASSERT(src1 == TMP_REG1); \
+ SLJIT_ASSERT(!(flags & ARGS_SWAPPED)); \
+ if (compiler->shift_imm != 0) \
+ return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, flags & SET_FLAGS, dst, SLJIT_UNUSED, (compiler->shift_imm << 7) | (opcode << 5) | reg_map[src2])); \
+ return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, flags & SET_FLAGS, dst, SLJIT_UNUSED, reg_map[src2])); \
+ } \
+ return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, flags & SET_FLAGS, dst, SLJIT_UNUSED, (reg_map[(flags & ARGS_SWAPPED) ? src1 : src2] << 8) | (opcode << 5) | 0x10 | ((flags & ARGS_SWAPPED) ? reg_map[src2] : reg_map[src1])));
+
+static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags,
+ sljit_s32 dst, sljit_s32 src1, sljit_s32 src2)
+{
+ sljit_sw mul_inst;
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_MOV:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & ARGS_SWAPPED));
+ if (dst != src2) {
+ if (src2 & SRC2_IMM) {
+ if (flags & INV_IMM)
+ EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MVN_DP, dst, SLJIT_UNUSED, src2);
+ EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MOV_DP, dst, SLJIT_UNUSED, src2);
+ }
+ EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MOV_DP, dst, SLJIT_UNUSED, reg_map[src2]);
+ }
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U8:
+ case SLJIT_MOV_S8:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & ARGS_SWAPPED));
+ if ((flags & (REG_DEST | REG_SOURCE)) == (REG_DEST | REG_SOURCE)) {
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ if (op == SLJIT_MOV_U8)
+ return push_inst(compiler, EMIT_DATA_PROCESS_INS(AND_DP, 0, dst, src2, SRC2_IMM | 0xff));
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (24 << 7) | reg_map[src2])));
+ return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (24 << 7) | (op == SLJIT_MOV_U8 ? 0x20 : 0x40) | reg_map[dst]));
+#else
+ return push_inst(compiler, (op == SLJIT_MOV_U8 ? UXTB : SXTB) | RD(dst) | RM(src2));
+#endif
+ }
+ else if (dst != src2) {
+ SLJIT_ASSERT(src2 & SRC2_IMM);
+ if (flags & INV_IMM)
+ EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MVN_DP, dst, SLJIT_UNUSED, src2);
+ EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MOV_DP, dst, SLJIT_UNUSED, src2);
+ }
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U16:
+ case SLJIT_MOV_S16:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & ARGS_SWAPPED));
+ if ((flags & (REG_DEST | REG_SOURCE)) == (REG_DEST | REG_SOURCE)) {
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (16 << 7) | reg_map[src2])));
+ return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, (16 << 7) | (op == SLJIT_MOV_U16 ? 0x20 : 0x40) | reg_map[dst]));
+#else
+ return push_inst(compiler, (op == SLJIT_MOV_U16 ? UXTH : SXTH) | RD(dst) | RM(src2));
+#endif
+ }
+ else if (dst != src2) {
+ SLJIT_ASSERT(src2 & SRC2_IMM);
+ if (flags & INV_IMM)
+ EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MVN_DP, dst, SLJIT_UNUSED, src2);
+ EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MOV_DP, dst, SLJIT_UNUSED, src2);
+ }
+ return SLJIT_SUCCESS;
+
+ case SLJIT_NOT:
+ if (src2 & SRC2_IMM) {
+ if (flags & INV_IMM)
+ EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MOV_DP, dst, SLJIT_UNUSED, src2);
+ EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MVN_DP, dst, SLJIT_UNUSED, src2);
+ }
+ EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(MVN_DP, dst, SLJIT_UNUSED, RM(src2));
+
+ case SLJIT_CLZ:
+ SLJIT_ASSERT(!(flags & INV_IMM));
+ SLJIT_ASSERT(!(src2 & SRC2_IMM));
+ FAIL_IF(push_inst(compiler, CLZ | RD(dst) | RM(src2)));
+ if (flags & SET_FLAGS)
+ EMIT_FULL_DATA_PROCESS_INS_AND_RETURN(CMP_DP, SLJIT_UNUSED, dst, SRC2_IMM);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_ADD:
+ SLJIT_ASSERT(!(flags & INV_IMM));
+ EMIT_DATA_PROCESS_INS_AND_RETURN(ADD_DP);
+
+ case SLJIT_ADDC:
+ SLJIT_ASSERT(!(flags & INV_IMM));
+ EMIT_DATA_PROCESS_INS_AND_RETURN(ADC_DP);
+
+ case SLJIT_SUB:
+ SLJIT_ASSERT(!(flags & INV_IMM));
+ if (!(flags & ARGS_SWAPPED))
+ EMIT_DATA_PROCESS_INS_AND_RETURN(SUB_DP);
+ EMIT_DATA_PROCESS_INS_AND_RETURN(RSB_DP);
+
+ case SLJIT_SUBC:
+ SLJIT_ASSERT(!(flags & INV_IMM));
+ if (!(flags & ARGS_SWAPPED))
+ EMIT_DATA_PROCESS_INS_AND_RETURN(SBC_DP);
+ EMIT_DATA_PROCESS_INS_AND_RETURN(RSC_DP);
+
+ case SLJIT_MUL:
+ SLJIT_ASSERT(!(flags & INV_IMM));
+ SLJIT_ASSERT(!(src2 & SRC2_IMM));
+ if (SLJIT_UNLIKELY(op & SLJIT_SET_O))
+ mul_inst = SMULL | (reg_map[TMP_REG3] << 16) | (reg_map[dst] << 12);
+ else
+ mul_inst = MUL | (reg_map[dst] << 16);
+
+ if (dst != src2)
+ FAIL_IF(push_inst(compiler, mul_inst | (reg_map[src1] << 8) | reg_map[src2]));
+ else if (dst != src1)
+ FAIL_IF(push_inst(compiler, mul_inst | (reg_map[src2] << 8) | reg_map[src1]));
+ else {
+ /* Rm and Rd must not be the same register. */
+ SLJIT_ASSERT(dst != TMP_REG1);
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG1, SLJIT_UNUSED, reg_map[src2])));
+ FAIL_IF(push_inst(compiler, mul_inst | (reg_map[src2] << 8) | reg_map[TMP_REG1]));
+ }
+
+ if (!(op & SLJIT_SET_O))
+ return SLJIT_SUCCESS;
+
+ /* We need to use TMP_REG3. */
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ /* cmp TMP_REG2, dst asr #31. */
+ return push_inst(compiler, EMIT_DATA_PROCESS_INS(CMP_DP, SET_FLAGS, SLJIT_UNUSED, TMP_REG3, RM(dst) | 0xfc0));
+
+ case SLJIT_AND:
+ if (!(flags & INV_IMM))
+ EMIT_DATA_PROCESS_INS_AND_RETURN(AND_DP);
+ EMIT_DATA_PROCESS_INS_AND_RETURN(BIC_DP);
+
+ case SLJIT_OR:
+ SLJIT_ASSERT(!(flags & INV_IMM));
+ EMIT_DATA_PROCESS_INS_AND_RETURN(ORR_DP);
+
+ case SLJIT_XOR:
+ SLJIT_ASSERT(!(flags & INV_IMM));
+ EMIT_DATA_PROCESS_INS_AND_RETURN(EOR_DP);
+
+ case SLJIT_SHL:
+ EMIT_SHIFT_INS_AND_RETURN(0);
+
+ case SLJIT_LSHR:
+ EMIT_SHIFT_INS_AND_RETURN(1);
+
+ case SLJIT_ASHR:
+ EMIT_SHIFT_INS_AND_RETURN(2);
+ }
+ SLJIT_ASSERT_STOP();
+ return SLJIT_SUCCESS;
+}
+
+#undef EMIT_DATA_PROCESS_INS_AND_RETURN
+#undef EMIT_FULL_DATA_PROCESS_INS_AND_RETURN
+#undef EMIT_SHIFT_INS_AND_RETURN
+
+/* Tests whether the immediate can be stored in the 12 bit imm field.
+ Returns with 0 if not possible. */
+static sljit_uw get_imm(sljit_uw imm)
+{
+ sljit_s32 rol;
+
+ if (imm <= 0xff)
+ return SRC2_IMM | imm;
+
+ if (!(imm & 0xff000000)) {
+ imm <<= 8;
+ rol = 8;
+ }
+ else {
+ imm = (imm << 24) | (imm >> 8);
+ rol = 0;
+ }
+
+ if (!(imm & 0xff000000)) {
+ imm <<= 8;
+ rol += 4;
+ }
+
+ if (!(imm & 0xf0000000)) {
+ imm <<= 4;
+ rol += 2;
+ }
+
+ if (!(imm & 0xc0000000)) {
+ imm <<= 2;
+ rol += 1;
+ }
+
+ if (!(imm & 0x00ffffff))
+ return SRC2_IMM | (imm >> 24) | (rol << 8);
+ else
+ return 0;
+}
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+static sljit_s32 generate_int(struct sljit_compiler *compiler, sljit_s32 reg, sljit_uw imm, sljit_s32 positive)
+{
+ sljit_uw mask;
+ sljit_uw imm1;
+ sljit_uw imm2;
+ sljit_s32 rol;
+
+ /* Step1: Search a zero byte (8 continous zero bit). */
+ mask = 0xff000000;
+ rol = 8;
+ while(1) {
+ if (!(imm & mask)) {
+ /* Rol imm by rol. */
+ imm = (imm << rol) | (imm >> (32 - rol));
+ /* Calculate arm rol. */
+ rol = 4 + (rol >> 1);
+ break;
+ }
+ rol += 2;
+ mask >>= 2;
+ if (mask & 0x3) {
+ /* rol by 8. */
+ imm = (imm << 8) | (imm >> 24);
+ mask = 0xff00;
+ rol = 24;
+ while (1) {
+ if (!(imm & mask)) {
+ /* Rol imm by rol. */
+ imm = (imm << rol) | (imm >> (32 - rol));
+ /* Calculate arm rol. */
+ rol = (rol >> 1) - 8;
+ break;
+ }
+ rol += 2;
+ mask >>= 2;
+ if (mask & 0x3)
+ return 0;
+ }
+ break;
+ }
+ }
+
+ /* The low 8 bit must be zero. */
+ SLJIT_ASSERT(!(imm & 0xff));
+
+ if (!(imm & 0xff000000)) {
+ imm1 = SRC2_IMM | ((imm >> 16) & 0xff) | (((rol + 4) & 0xf) << 8);
+ imm2 = SRC2_IMM | ((imm >> 8) & 0xff) | (((rol + 8) & 0xf) << 8);
+ }
+ else if (imm & 0xc0000000) {
+ imm1 = SRC2_IMM | ((imm >> 24) & 0xff) | ((rol & 0xf) << 8);
+ imm <<= 8;
+ rol += 4;
+
+ if (!(imm & 0xff000000)) {
+ imm <<= 8;
+ rol += 4;
+ }
+
+ if (!(imm & 0xf0000000)) {
+ imm <<= 4;
+ rol += 2;
+ }
+
+ if (!(imm & 0xc0000000)) {
+ imm <<= 2;
+ rol += 1;
+ }
+
+ if (!(imm & 0x00ffffff))
+ imm2 = SRC2_IMM | (imm >> 24) | ((rol & 0xf) << 8);
+ else
+ return 0;
+ }
+ else {
+ if (!(imm & 0xf0000000)) {
+ imm <<= 4;
+ rol += 2;
+ }
+
+ if (!(imm & 0xc0000000)) {
+ imm <<= 2;
+ rol += 1;
+ }
+
+ imm1 = SRC2_IMM | ((imm >> 24) & 0xff) | ((rol & 0xf) << 8);
+ imm <<= 8;
+ rol += 4;
+
+ if (!(imm & 0xf0000000)) {
+ imm <<= 4;
+ rol += 2;
+ }
+
+ if (!(imm & 0xc0000000)) {
+ imm <<= 2;
+ rol += 1;
+ }
+
+ if (!(imm & 0x00ffffff))
+ imm2 = SRC2_IMM | (imm >> 24) | ((rol & 0xf) << 8);
+ else
+ return 0;
+ }
+
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(positive ? MOV_DP : MVN_DP, 0, reg, SLJIT_UNUSED, imm1)));
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(positive ? ORR_DP : BIC_DP, 0, reg, reg, imm2)));
+ return 1;
+}
+#endif
+
+static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 reg, sljit_uw imm)
+{
+ sljit_uw tmp;
+
+#if (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
+ if (!(imm & ~0xffff))
+ return push_inst(compiler, MOVW | RD(reg) | ((imm << 4) & 0xf0000) | (imm & 0xfff));
+#endif
+
+ /* Create imm by 1 inst. */
+ tmp = get_imm(imm);
+ if (tmp)
+ return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, reg, SLJIT_UNUSED, tmp));
+
+ tmp = get_imm(~imm);
+ if (tmp)
+ return push_inst(compiler, EMIT_DATA_PROCESS_INS(MVN_DP, 0, reg, SLJIT_UNUSED, tmp));
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ /* Create imm by 2 inst. */
+ FAIL_IF(generate_int(compiler, reg, imm, 1));
+ FAIL_IF(generate_int(compiler, reg, ~imm, 0));
+
+ /* Load integer. */
+ return push_inst_with_literal(compiler, EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0, reg, TMP_PC, 0), imm);
+#else
+ return emit_imm(compiler, reg, imm);
+#endif
+}
+
+/* Helper function. Dst should be reg + value, using at most 1 instruction, flags does not set. */
+static sljit_s32 emit_set_delta(struct sljit_compiler *compiler, sljit_s32 dst, sljit_s32 reg, sljit_sw value)
+{
+ if (value >= 0) {
+ value = get_imm(value);
+ if (value)
+ return push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, dst, reg, value));
+ }
+ else {
+ value = get_imm(-value);
+ if (value)
+ return push_inst(compiler, EMIT_DATA_PROCESS_INS(SUB_DP, 0, dst, reg, value));
+ }
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+/* Can perform an operation using at most 1 instruction. */
+static sljit_s32 getput_arg_fast(struct sljit_compiler *compiler, sljit_s32 inp_flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw)
+{
+ sljit_uw imm;
+
+ if (arg & SLJIT_IMM) {
+ imm = get_imm(argw);
+ if (imm) {
+ if (inp_flags & ARG_TEST)
+ return 1;
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, reg, SLJIT_UNUSED, imm)));
+ return -1;
+ }
+ imm = get_imm(~argw);
+ if (imm) {
+ if (inp_flags & ARG_TEST)
+ return 1;
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MVN_DP, 0, reg, SLJIT_UNUSED, imm)));
+ return -1;
+ }
+ return 0;
+ }
+
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+
+ /* Fast loads/stores. */
+ if (!(arg & REG_MASK))
+ return 0;
+
+ if (arg & OFFS_REG_MASK) {
+ if ((argw & 0x3) != 0 && !IS_TYPE1_TRANSFER(inp_flags))
+ return 0;
+
+ if (inp_flags & ARG_TEST)
+ return 1;
+ FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & REG_MASK,
+ RM(OFFS_REG(arg)) | (IS_TYPE1_TRANSFER(inp_flags) ? SRC2_IMM : 0) | ((argw & 0x3) << 7))));
+ return -1;
+ }
+
+ if (IS_TYPE1_TRANSFER(inp_flags)) {
+ if (argw >= 0 && argw <= 0xfff) {
+ if (inp_flags & ARG_TEST)
+ return 1;
+ FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & REG_MASK, argw)));
+ return -1;
+ }
+ if (argw < 0 && argw >= -0xfff) {
+ if (inp_flags & ARG_TEST)
+ return 1;
+ FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 0, inp_flags & WRITE_BACK, reg, arg & REG_MASK, -argw)));
+ return -1;
+ }
+ }
+ else {
+ if (argw >= 0 && argw <= 0xff) {
+ if (inp_flags & ARG_TEST)
+ return 1;
+ FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & REG_MASK, TYPE2_TRANSFER_IMM(argw))));
+ return -1;
+ }
+ if (argw < 0 && argw >= -0xff) {
+ if (inp_flags & ARG_TEST)
+ return 1;
+ argw = -argw;
+ FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 0, inp_flags & WRITE_BACK, reg, arg & REG_MASK, TYPE2_TRANSFER_IMM(argw))));
+ return -1;
+ }
+ }
+
+ return 0;
+}
+
+/* See getput_arg below.
+ Note: can_cache is called only for binary operators. Those
+ operators always uses word arguments without write back. */
+static sljit_s32 can_cache(sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw)
+{
+ /* Immediate caching is not supported as it would be an operation on constant arguments. */
+ if (arg & SLJIT_IMM)
+ return 0;
+
+ /* Always a simple operation. */
+ if (arg & OFFS_REG_MASK)
+ return 0;
+
+ if (!(arg & REG_MASK)) {
+ /* Immediate access. */
+ if ((next_arg & SLJIT_MEM) && ((sljit_uw)argw - (sljit_uw)next_argw <= 0xfff || (sljit_uw)next_argw - (sljit_uw)argw <= 0xfff))
+ return 1;
+ return 0;
+ }
+
+ if (argw <= 0xfffff && argw >= -0xfffff)
+ return 0;
+
+ if (argw == next_argw && (next_arg & SLJIT_MEM))
+ return 1;
+
+ if (arg == next_arg && ((sljit_uw)argw - (sljit_uw)next_argw <= 0xfff || (sljit_uw)next_argw - (sljit_uw)argw <= 0xfff))
+ return 1;
+
+ return 0;
+}
+
+#define GETPUT_ARG_DATA_TRANSFER(add, wb, target, base, imm) \
+ if (max_delta & 0xf00) \
+ FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, add, wb, target, base, imm))); \
+ else \
+ FAIL_IF(push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, add, wb, target, base, TYPE2_TRANSFER_IMM(imm))));
+
+#define TEST_WRITE_BACK() \
+ if (inp_flags & WRITE_BACK) { \
+ tmp_r = arg & REG_MASK; \
+ if (reg == tmp_r) { \
+ /* This can only happen for stores */ \
+ /* since ldr reg, [reg, ...]! has no meaning */ \
+ SLJIT_ASSERT(!(inp_flags & LOAD_DATA)); \
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG3, SLJIT_UNUSED, RM(reg)))); \
+ reg = TMP_REG3; \
+ } \
+ }
+
+/* Emit the necessary instructions. See can_cache above. */
+static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 inp_flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw)
+{
+ sljit_s32 tmp_r;
+ sljit_sw max_delta;
+ sljit_sw sign;
+ sljit_uw imm;
+
+ if (arg & SLJIT_IMM) {
+ SLJIT_ASSERT(inp_flags & LOAD_DATA);
+ return load_immediate(compiler, reg, argw);
+ }
+
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+
+ tmp_r = (inp_flags & LOAD_DATA) ? reg : TMP_REG3;
+ max_delta = IS_TYPE1_TRANSFER(inp_flags) ? 0xfff : 0xff;
+
+ if ((arg & REG_MASK) == SLJIT_UNUSED) {
+ /* Write back is not used. */
+ imm = (sljit_uw)(argw - compiler->cache_argw);
+ if ((compiler->cache_arg & SLJIT_IMM) && (imm <= (sljit_uw)max_delta || imm >= (sljit_uw)-max_delta)) {
+ if (imm <= (sljit_uw)max_delta) {
+ sign = 1;
+ argw = argw - compiler->cache_argw;
+ }
+ else {
+ sign = 0;
+ argw = compiler->cache_argw - argw;
+ }
+
+ GETPUT_ARG_DATA_TRANSFER(sign, 0, reg, TMP_REG3, argw);
+ return SLJIT_SUCCESS;
+ }
+
+ /* With write back, we can create some sophisticated loads, but
+ it is hard to decide whether we should convert downward (0s) or upward (1s). */
+ imm = (sljit_uw)(argw - next_argw);
+ if ((next_arg & SLJIT_MEM) && (imm <= (sljit_uw)max_delta || imm >= (sljit_uw)-max_delta)) {
+ SLJIT_ASSERT(inp_flags & LOAD_DATA);
+
+ compiler->cache_arg = SLJIT_IMM;
+ compiler->cache_argw = argw;
+ tmp_r = TMP_REG3;
+ }
+
+ FAIL_IF(load_immediate(compiler, tmp_r, argw));
+ GETPUT_ARG_DATA_TRANSFER(1, 0, reg, tmp_r, 0);
+ return SLJIT_SUCCESS;
+ }
+
+ if (arg & OFFS_REG_MASK) {
+ SLJIT_ASSERT((argw & 0x3) && !(max_delta & 0xf00));
+ if (inp_flags & WRITE_BACK)
+ tmp_r = arg & REG_MASK;
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, tmp_r, arg & REG_MASK, RM(OFFS_REG(arg)) | ((argw & 0x3) << 7))));
+ return push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, 0, reg, tmp_r, TYPE2_TRANSFER_IMM(0)));
+ }
+
+ imm = (sljit_uw)(argw - compiler->cache_argw);
+ if (compiler->cache_arg == arg && imm <= (sljit_uw)max_delta) {
+ SLJIT_ASSERT(!(inp_flags & WRITE_BACK));
+ GETPUT_ARG_DATA_TRANSFER(1, 0, reg, TMP_REG3, imm);
+ return SLJIT_SUCCESS;
+ }
+ if (compiler->cache_arg == arg && imm >= (sljit_uw)-max_delta) {
+ SLJIT_ASSERT(!(inp_flags & WRITE_BACK));
+ imm = (sljit_uw)-(sljit_sw)imm;
+ GETPUT_ARG_DATA_TRANSFER(0, 0, reg, TMP_REG3, imm);
+ return SLJIT_SUCCESS;
+ }
+
+ imm = get_imm(argw & ~max_delta);
+ if (imm) {
+ TEST_WRITE_BACK();
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, tmp_r, arg & REG_MASK, imm)));
+ GETPUT_ARG_DATA_TRANSFER(1, inp_flags & WRITE_BACK, reg, tmp_r, argw & max_delta);
+ return SLJIT_SUCCESS;
+ }
+
+ imm = get_imm(-argw & ~max_delta);
+ if (imm) {
+ argw = -argw;
+ TEST_WRITE_BACK();
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(SUB_DP, 0, tmp_r, arg & REG_MASK, imm)));
+ GETPUT_ARG_DATA_TRANSFER(0, inp_flags & WRITE_BACK, reg, tmp_r, argw & max_delta);
+ return SLJIT_SUCCESS;
+ }
+
+ if ((compiler->cache_arg & SLJIT_IMM) && compiler->cache_argw == argw) {
+ TEST_WRITE_BACK();
+ return push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & REG_MASK, RM(TMP_REG3) | (max_delta & 0xf00 ? SRC2_IMM : 0)));
+ }
+
+ if (argw == next_argw && (next_arg & SLJIT_MEM)) {
+ SLJIT_ASSERT(inp_flags & LOAD_DATA);
+ FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
+
+ compiler->cache_arg = SLJIT_IMM;
+ compiler->cache_argw = argw;
+
+ TEST_WRITE_BACK();
+ return push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & REG_MASK, RM(TMP_REG3) | (max_delta & 0xf00 ? SRC2_IMM : 0)));
+ }
+
+ imm = (sljit_uw)(argw - next_argw);
+ if (arg == next_arg && !(inp_flags & WRITE_BACK) && (imm <= (sljit_uw)max_delta || imm >= (sljit_uw)-max_delta)) {
+ SLJIT_ASSERT(inp_flags & LOAD_DATA);
+ FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG3, TMP_REG3, reg_map[arg & REG_MASK])));
+
+ compiler->cache_arg = arg;
+ compiler->cache_argw = argw;
+
+ GETPUT_ARG_DATA_TRANSFER(1, 0, reg, TMP_REG3, 0);
+ return SLJIT_SUCCESS;
+ }
+
+ if ((arg & REG_MASK) == tmp_r) {
+ compiler->cache_arg = SLJIT_IMM;
+ compiler->cache_argw = argw;
+ tmp_r = TMP_REG3;
+ }
+
+ FAIL_IF(load_immediate(compiler, tmp_r, argw));
+ return push_inst(compiler, EMIT_DATA_TRANSFER(inp_flags, 1, inp_flags & WRITE_BACK, reg, arg & REG_MASK, reg_map[tmp_r] | (max_delta & 0xf00 ? SRC2_IMM : 0)));
+}
+
+static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw)
+{
+ if (getput_arg_fast(compiler, flags, reg, arg, argw))
+ return compiler->error;
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ return getput_arg(compiler, flags, reg, arg, argw, 0, 0);
+}
+
+static SLJIT_INLINE sljit_s32 emit_op_mem2(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg1, sljit_sw arg1w, sljit_s32 arg2, sljit_sw arg2w)
+{
+ if (getput_arg_fast(compiler, flags, reg, arg1, arg1w))
+ return compiler->error;
+ return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w);
+}
+
+static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 inp_flags,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ /* arg1 goes to TMP_REG1 or src reg
+ arg2 goes to TMP_REG2, imm or src reg
+ TMP_REG3 can be used for caching
+ result goes to TMP_REG2, so put result can use TMP_REG1 and TMP_REG3. */
+
+ /* We prefers register and simple consts. */
+ sljit_s32 dst_r;
+ sljit_s32 src1_r;
+ sljit_s32 src2_r = 0;
+ sljit_s32 sugg_src2_r = TMP_REG2;
+ sljit_s32 flags = GET_FLAGS(op) ? SET_FLAGS : 0;
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+
+ /* Destination check. */
+ if (SLJIT_UNLIKELY(dst == SLJIT_UNUSED)) {
+ if (op >= SLJIT_MOV && op <= SLJIT_MOVU_S32 && !(src2 & SLJIT_MEM))
+ return SLJIT_SUCCESS;
+ dst_r = TMP_REG2;
+ }
+ else if (FAST_IS_REG(dst)) {
+ dst_r = dst;
+ flags |= REG_DEST;
+ if (op >= SLJIT_MOV && op <= SLJIT_MOVU_S32)
+ sugg_src2_r = dst_r;
+ }
+ else {
+ SLJIT_ASSERT(dst & SLJIT_MEM);
+ if (getput_arg_fast(compiler, inp_flags | ARG_TEST, TMP_REG2, dst, dstw)) {
+ flags |= FAST_DEST;
+ dst_r = TMP_REG2;
+ }
+ else {
+ flags |= SLOW_DEST;
+ dst_r = 0;
+ }
+ }
+
+ /* Source 1. */
+ if (FAST_IS_REG(src1))
+ src1_r = src1;
+ else if (FAST_IS_REG(src2)) {
+ flags |= ARGS_SWAPPED;
+ src1_r = src2;
+ src2 = src1;
+ src2w = src1w;
+ }
+ else do { /* do { } while(0) is used because of breaks. */
+ src1_r = 0;
+ if ((inp_flags & ALLOW_ANY_IMM) && (src1 & SLJIT_IMM)) {
+ /* The second check will generate a hit. */
+ src2_r = get_imm(src1w);
+ if (src2_r) {
+ flags |= ARGS_SWAPPED;
+ src1 = src2;
+ src1w = src2w;
+ break;
+ }
+ if (inp_flags & ALLOW_INV_IMM) {
+ src2_r = get_imm(~src1w);
+ if (src2_r) {
+ flags |= ARGS_SWAPPED | INV_IMM;
+ src1 = src2;
+ src1w = src2w;
+ break;
+ }
+ }
+ if (GET_OPCODE(op) == SLJIT_ADD) {
+ src2_r = get_imm(-src1w);
+ if (src2_r) {
+ /* Note: ARGS_SWAPPED is intentionally not applied! */
+ src1 = src2;
+ src1w = src2w;
+ op = SLJIT_SUB | GET_ALL_FLAGS(op);
+ break;
+ }
+ }
+ }
+
+ if (getput_arg_fast(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w)) {
+ FAIL_IF(compiler->error);
+ src1_r = TMP_REG1;
+ }
+ } while (0);
+
+ /* Source 2. */
+ if (src2_r == 0) {
+ if (FAST_IS_REG(src2)) {
+ src2_r = src2;
+ flags |= REG_SOURCE;
+ if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOVU_S32)
+ dst_r = src2_r;
+ }
+ else do { /* do { } while(0) is used because of breaks. */
+ if ((inp_flags & ALLOW_ANY_IMM) && (src2 & SLJIT_IMM)) {
+ src2_r = get_imm(src2w);
+ if (src2_r)
+ break;
+ if (inp_flags & ALLOW_INV_IMM) {
+ src2_r = get_imm(~src2w);
+ if (src2_r) {
+ flags |= INV_IMM;
+ break;
+ }
+ }
+ if (GET_OPCODE(op) == SLJIT_ADD) {
+ src2_r = get_imm(-src2w);
+ if (src2_r) {
+ op = SLJIT_SUB | GET_ALL_FLAGS(op);
+ flags &= ~ARGS_SWAPPED;
+ break;
+ }
+ }
+ if (GET_OPCODE(op) == SLJIT_SUB && !(flags & ARGS_SWAPPED)) {
+ src2_r = get_imm(-src2w);
+ if (src2_r) {
+ op = SLJIT_ADD | GET_ALL_FLAGS(op);
+ flags &= ~ARGS_SWAPPED;
+ break;
+ }
+ }
+ }
+
+ /* src2_r is 0. */
+ if (getput_arg_fast(compiler, inp_flags | LOAD_DATA, sugg_src2_r, src2, src2w)) {
+ FAIL_IF(compiler->error);
+ src2_r = sugg_src2_r;
+ }
+ } while (0);
+ }
+
+ /* src1_r, src2_r and dst_r can be zero (=unprocessed) or non-zero.
+ If they are zero, they must not be registers. */
+ if (src1_r == 0 && src2_r == 0 && dst_r == 0) {
+ if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
+ SLJIT_ASSERT(!(flags & ARGS_SWAPPED));
+ flags |= ARGS_SWAPPED;
+ FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src2, src2w, src1, src1w));
+ FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG2, src1, src1w, dst, dstw));
+ }
+ else {
+ FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w));
+ FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG2, src2, src2w, dst, dstw));
+ }
+ src1_r = TMP_REG1;
+ src2_r = TMP_REG2;
+ }
+ else if (src1_r == 0 && src2_r == 0) {
+ FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w));
+ src1_r = TMP_REG1;
+ }
+ else if (src1_r == 0 && dst_r == 0) {
+ FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw));
+ src1_r = TMP_REG1;
+ }
+ else if (src2_r == 0 && dst_r == 0) {
+ FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, sugg_src2_r, src2, src2w, dst, dstw));
+ src2_r = sugg_src2_r;
+ }
+
+ if (dst_r == 0)
+ dst_r = TMP_REG2;
+
+ if (src1_r == 0) {
+ FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, TMP_REG1, src1, src1w, 0, 0));
+ src1_r = TMP_REG1;
+ }
+
+ if (src2_r == 0) {
+ FAIL_IF(getput_arg(compiler, inp_flags | LOAD_DATA, sugg_src2_r, src2, src2w, 0, 0));
+ src2_r = sugg_src2_r;
+ }
+
+ FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r));
+
+ if (flags & (FAST_DEST | SLOW_DEST)) {
+ if (flags & FAST_DEST)
+ FAIL_IF(getput_arg_fast(compiler, inp_flags, dst_r, dst, dstw));
+ else
+ FAIL_IF(getput_arg(compiler, inp_flags, dst_r, dst, dstw, 0, 0));
+ }
+ return SLJIT_SUCCESS;
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__GNUC__)
+extern unsigned int __aeabi_uidivmod(unsigned int numerator, unsigned int denominator);
+extern int __aeabi_idivmod(int numerator, int denominator);
+#else
+#error "Software divmod functions are needed"
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op0(compiler, op));
+
+ op = GET_OPCODE(op);
+ switch (op) {
+ case SLJIT_BREAKPOINT:
+ FAIL_IF(push_inst(compiler, BKPT));
+ break;
+ case SLJIT_NOP:
+ FAIL_IF(push_inst(compiler, NOP));
+ break;
+ case SLJIT_LMUL_UW:
+ case SLJIT_LMUL_SW:
+#if (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
+ return push_inst(compiler, (op == SLJIT_LMUL_UW ? UMULL : SMULL)
+ | (reg_map[SLJIT_R1] << 16)
+ | (reg_map[SLJIT_R0] << 12)
+ | (reg_map[SLJIT_R0] << 8)
+ | reg_map[SLJIT_R1]);
+#else
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG1, SLJIT_UNUSED, RM(SLJIT_R1))));
+ return push_inst(compiler, (op == SLJIT_LMUL_UW ? UMULL : SMULL)
+ | (reg_map[SLJIT_R1] << 16)
+ | (reg_map[SLJIT_R0] << 12)
+ | (reg_map[SLJIT_R0] << 8)
+ | reg_map[TMP_REG1]);
+#endif
+ case SLJIT_DIVMOD_UW:
+ case SLJIT_DIVMOD_SW:
+ case SLJIT_DIV_UW:
+ case SLJIT_DIV_SW:
+ SLJIT_COMPILE_ASSERT((SLJIT_DIVMOD_UW & 0x2) == 0 && SLJIT_DIV_UW - 0x2 == SLJIT_DIVMOD_UW, bad_div_opcode_assignments);
+ SLJIT_COMPILE_ASSERT(reg_map[2] == 1 && reg_map[3] == 2, bad_register_mapping);
+
+ if ((op >= SLJIT_DIV_UW) && (compiler->scratches >= 3)) {
+ FAIL_IF(push_inst(compiler, 0xe52d2008 /* str r2, [sp, #-8]! */));
+ FAIL_IF(push_inst(compiler, 0xe58d1004 /* str r1, [sp, #4] */));
+ }
+ else if ((op >= SLJIT_DIV_UW) || (compiler->scratches >= 3))
+ FAIL_IF(push_inst(compiler, 0xe52d0008 | (op >= SLJIT_DIV_UW ? 0x1000 : 0x2000) /* str r1/r2, [sp, #-8]! */));
+
+#if defined(__GNUC__)
+ FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM,
+ ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod))));
+#else
+#error "Software divmod functions are needed"
+#endif
+
+ if ((op >= SLJIT_DIV_UW) && (compiler->scratches >= 3)) {
+ FAIL_IF(push_inst(compiler, 0xe59d1004 /* ldr r1, [sp, #4] */));
+ FAIL_IF(push_inst(compiler, 0xe49d2008 /* ldr r2, [sp], #8 */));
+ }
+ else if ((op >= SLJIT_DIV_UW) || (compiler->scratches >= 3))
+ return push_inst(compiler, 0xe49d0008 | (op >= SLJIT_DIV_UW ? 0x1000 : 0x2000) /* ldr r1/r2, [sp], #8 */);
+ return SLJIT_SUCCESS;
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_U32:
+ case SLJIT_MOV_S32:
+ case SLJIT_MOV_P:
+ return emit_op(compiler, SLJIT_MOV, ALLOW_ANY_IMM, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOV_U8:
+ return emit_op(compiler, SLJIT_MOV_U8, ALLOW_ANY_IMM | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u8)srcw : srcw);
+
+ case SLJIT_MOV_S8:
+ return emit_op(compiler, SLJIT_MOV_S8, ALLOW_ANY_IMM | SIGNED_DATA | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s8)srcw : srcw);
+
+ case SLJIT_MOV_U16:
+ return emit_op(compiler, SLJIT_MOV_U16, ALLOW_ANY_IMM | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u16)srcw : srcw);
+
+ case SLJIT_MOV_S16:
+ return emit_op(compiler, SLJIT_MOV_S16, ALLOW_ANY_IMM | SIGNED_DATA | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s16)srcw : srcw);
+
+ case SLJIT_MOVU:
+ case SLJIT_MOVU_U32:
+ case SLJIT_MOVU_S32:
+ case SLJIT_MOVU_P:
+ return emit_op(compiler, SLJIT_MOV, ALLOW_ANY_IMM | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOVU_U8:
+ return emit_op(compiler, SLJIT_MOV_U8, ALLOW_ANY_IMM | BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u8)srcw : srcw);
+
+ case SLJIT_MOVU_S8:
+ return emit_op(compiler, SLJIT_MOV_S8, ALLOW_ANY_IMM | SIGNED_DATA | BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s8)srcw : srcw);
+
+ case SLJIT_MOVU_U16:
+ return emit_op(compiler, SLJIT_MOV_U16, ALLOW_ANY_IMM | HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u16)srcw : srcw);
+
+ case SLJIT_MOVU_S16:
+ return emit_op(compiler, SLJIT_MOV_S16, ALLOW_ANY_IMM | SIGNED_DATA | HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s16)srcw : srcw);
+
+ case SLJIT_NOT:
+ return emit_op(compiler, op, ALLOW_ANY_IMM, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_NEG:
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
+ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ compiler->skip_checks = 1;
+#endif
+ return sljit_emit_op2(compiler, SLJIT_SUB | GET_ALL_FLAGS(op), dst, dstw, SLJIT_IMM, 0, src, srcw);
+
+ case SLJIT_CLZ:
+ return emit_op(compiler, op, 0, dst, dstw, TMP_REG1, 0, src, srcw);
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_ADD:
+ case SLJIT_ADDC:
+ case SLJIT_SUB:
+ case SLJIT_SUBC:
+ case SLJIT_OR:
+ case SLJIT_XOR:
+ return emit_op(compiler, op, ALLOW_IMM, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_MUL:
+ return emit_op(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_AND:
+ return emit_op(compiler, op, ALLOW_ANY_IMM, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_SHL:
+ case SLJIT_LSHR:
+ case SLJIT_ASHR:
+ if (src2 & SLJIT_IMM) {
+ compiler->shift_imm = src2w & 0x1f;
+ return emit_op(compiler, op, 0, dst, dstw, TMP_REG1, 0, src1, src1w);
+ }
+ else {
+ compiler->shift_imm = 0x20;
+ return emit_op(compiler, op, 0, dst, dstw, src1, src1w, src2, src2w);
+ }
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_register_index(sljit_s32 reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_register_index(reg));
+ return reg_map[reg];
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_float_register_index(reg));
+ return reg << 1;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler,
+ void *instruction, sljit_s32 size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_custom(compiler, instruction, size));
+
+ return push_inst(compiler, *(sljit_uw*)instruction);
+}
+
+/* --------------------------------------------------------------------- */
+/* Floating point operators */
+/* --------------------------------------------------------------------- */
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+
+/* 0 - no fpu
+ 1 - vfp */
+static sljit_s32 arm_fpu_type = -1;
+
+static void init_compiler(void)
+{
+ if (arm_fpu_type != -1)
+ return;
+
+ /* TODO: Only the OS can help to determine the correct fpu type. */
+ arm_fpu_type = 1;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_is_fpu_available(void)
+{
+#ifdef SLJIT_IS_FPU_AVAILABLE
+ return SLJIT_IS_FPU_AVAILABLE;
+#else
+ if (arm_fpu_type == -1)
+ init_compiler();
+ return arm_fpu_type;
+#endif
+}
+
+#else
+
+#define arm_fpu_type 1
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_is_fpu_available(void)
+{
+ /* Always available. */
+ return 1;
+}
+
+#endif
+
+#define FPU_LOAD (1 << 20)
+#define EMIT_FPU_DATA_TRANSFER(inst, add, base, freg, offs) \
+ ((inst) | ((add) << 23) | (reg_map[base] << 16) | (freg << 12) | (offs))
+#define EMIT_FPU_OPERATION(opcode, mode, dst, src1, src2) \
+ ((opcode) | (mode) | ((dst) << 12) | (src1) | ((src2) << 16))
+
+static sljit_s32 emit_fop_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw)
+{
+ sljit_sw tmp;
+ sljit_uw imm;
+ sljit_sw inst = VSTR_F32 | (flags & (SLJIT_F32_OP | FPU_LOAD));
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+
+ if (SLJIT_UNLIKELY(arg & OFFS_REG_MASK)) {
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG1, arg & REG_MASK, RM(OFFS_REG(arg)) | ((argw & 0x3) << 7))));
+ arg = SLJIT_MEM | TMP_REG1;
+ argw = 0;
+ }
+
+ /* Fast loads and stores. */
+ if ((arg & REG_MASK)) {
+ if (!(argw & ~0x3fc))
+ return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, arg & REG_MASK, reg, argw >> 2));
+ if (!(-argw & ~0x3fc))
+ return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 0, arg & REG_MASK, reg, (-argw) >> 2));
+ }
+
+ if (compiler->cache_arg == arg) {
+ tmp = argw - compiler->cache_argw;
+ if (!(tmp & ~0x3fc))
+ return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG3, reg, tmp >> 2));
+ if (!(-tmp & ~0x3fc))
+ return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 0, TMP_REG3, reg, -tmp >> 2));
+ if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, tmp) != SLJIT_ERR_UNSUPPORTED) {
+ FAIL_IF(compiler->error);
+ compiler->cache_argw = argw;
+ return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG3, reg, 0));
+ }
+ }
+
+ if (arg & REG_MASK) {
+ if (emit_set_delta(compiler, TMP_REG1, arg & REG_MASK, argw) != SLJIT_ERR_UNSUPPORTED) {
+ FAIL_IF(compiler->error);
+ return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG1, reg, 0));
+ }
+ imm = get_imm(argw & ~0x3fc);
+ if (imm) {
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG1, arg & REG_MASK, imm)));
+ return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG1, reg, (argw & 0x3fc) >> 2));
+ }
+ imm = get_imm(-argw & ~0x3fc);
+ if (imm) {
+ argw = -argw;
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(SUB_DP, 0, TMP_REG1, arg & REG_MASK, imm)));
+ return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 0, TMP_REG1, reg, (argw & 0x3fc) >> 2));
+ }
+ }
+
+ compiler->cache_arg = arg;
+ compiler->cache_argw = argw;
+ if (arg & REG_MASK) {
+ FAIL_IF(load_immediate(compiler, TMP_REG1, argw));
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(ADD_DP, 0, TMP_REG3, arg & REG_MASK, reg_map[TMP_REG1])));
+ }
+ else
+ FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
+
+ return push_inst(compiler, EMIT_FPU_DATA_TRANSFER(inst, 1, TMP_REG3, reg, 0));
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ if (src & SLJIT_MEM) {
+ FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG1, src, srcw));
+ src = TMP_FREG1;
+ }
+
+ FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_S32_F32, op & SLJIT_F32_OP, TMP_FREG1, src, 0)));
+
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ if (FAST_IS_REG(dst))
+ return push_inst(compiler, VMOV | (1 << 20) | RD(dst) | (TMP_FREG1 << 16));
+
+ /* Store the integer value from a VFP register. */
+ return emit_fop_mem(compiler, 0, TMP_FREG1, dst, dstw);
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1;
+
+ if (FAST_IS_REG(src))
+ FAIL_IF(push_inst(compiler, VMOV | RD(src) | (TMP_FREG1 << 16)));
+ else if (src & SLJIT_MEM) {
+ /* Load the integer value into a VFP register. */
+ FAIL_IF(emit_fop_mem(compiler, FPU_LOAD, TMP_FREG1, src, srcw));
+ }
+ else {
+ FAIL_IF(load_immediate(compiler, TMP_REG1, srcw));
+ FAIL_IF(push_inst(compiler, VMOV | RD(TMP_REG1) | (TMP_FREG1 << 16)));
+ }
+
+ FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_F32_S32, op & SLJIT_F32_OP, dst_r, TMP_FREG1, 0)));
+
+ if (dst & SLJIT_MEM)
+ return emit_fop_mem(compiler, (op & SLJIT_F32_OP), TMP_FREG1, dst, dstw);
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ if (src1 & SLJIT_MEM) {
+ FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG1, src1, src1w));
+ src1 = TMP_FREG1;
+ }
+
+ if (src2 & SLJIT_MEM) {
+ FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG2, src2, src2w));
+ src2 = TMP_FREG2;
+ }
+
+ FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCMP_F32, op & SLJIT_F32_OP, src1, src2, 0)));
+ return push_inst(compiler, VMRS);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r;
+
+ CHECK_ERROR();
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ if (GET_OPCODE(op) != SLJIT_CONV_F64_FROM_F32)
+ op ^= SLJIT_F32_OP;
+
+ SLJIT_COMPILE_ASSERT((SLJIT_F32_OP == 0x100), float_transfer_bit_error);
+ SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw);
+
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1;
+
+ if (src & SLJIT_MEM) {
+ FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, dst_r, src, srcw));
+ src = dst_r;
+ }
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_MOV_F64:
+ if (src != dst_r) {
+ if (dst_r != TMP_FREG1)
+ FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMOV_F32, op & SLJIT_F32_OP, dst_r, src, 0)));
+ else
+ dst_r = src;
+ }
+ break;
+ case SLJIT_NEG_F64:
+ FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VNEG_F32, op & SLJIT_F32_OP, dst_r, src, 0)));
+ break;
+ case SLJIT_ABS_F64:
+ FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VABS_F32, op & SLJIT_F32_OP, dst_r, src, 0)));
+ break;
+ case SLJIT_CONV_F64_FROM_F32:
+ FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VCVT_F64_F32, op & SLJIT_F32_OP, dst_r, src, 0)));
+ op ^= SLJIT_F32_OP;
+ break;
+ }
+
+ if (dst & SLJIT_MEM)
+ return emit_fop_mem(compiler, (op & SLJIT_F32_OP), dst_r, dst, dstw);
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_s32 dst_r;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ op ^= SLJIT_F32_OP;
+
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1;
+
+ if (src2 & SLJIT_MEM) {
+ FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG2, src2, src2w));
+ src2 = TMP_FREG2;
+ }
+
+ if (src1 & SLJIT_MEM) {
+ FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG1, src1, src1w));
+ src1 = TMP_FREG1;
+ }
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_ADD_F64:
+ FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VADD_F32, op & SLJIT_F32_OP, dst_r, src2, src1)));
+ break;
+
+ case SLJIT_SUB_F64:
+ FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VSUB_F32, op & SLJIT_F32_OP, dst_r, src2, src1)));
+ break;
+
+ case SLJIT_MUL_F64:
+ FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VMUL_F32, op & SLJIT_F32_OP, dst_r, src2, src1)));
+ break;
+
+ case SLJIT_DIV_F64:
+ FAIL_IF(push_inst(compiler, EMIT_FPU_OPERATION(VDIV_F32, op & SLJIT_F32_OP, dst_r, src2, src1)));
+ break;
+ }
+
+ if (dst_r == TMP_FREG1)
+ FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP), TMP_FREG1, dst, dstw));
+
+ return SLJIT_SUCCESS;
+}
+
+#undef FPU_LOAD
+#undef EMIT_FPU_DATA_TRANSFER
+#undef EMIT_FPU_OPERATION
+
+/* --------------------------------------------------------------------- */
+/* Other instructions */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ /* For UNUSED dst. Uncommon, but possible. */
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ if (FAST_IS_REG(dst))
+ return push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst, SLJIT_UNUSED, RM(TMP_REG3)));
+
+ /* Memory. */
+ if (getput_arg_fast(compiler, WORD_DATA, TMP_REG3, dst, dstw))
+ return compiler->error;
+ /* TMP_REG3 is used for caching. */
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG2, SLJIT_UNUSED, RM(TMP_REG3))));
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ return getput_arg(compiler, WORD_DATA, TMP_REG2, dst, dstw, 0, 0);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_return(compiler, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ if (FAST_IS_REG(src))
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG3, SLJIT_UNUSED, RM(src))));
+ else if (src & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, WORD_DATA | LOAD_DATA, TMP_REG3, src, srcw))
+ FAIL_IF(compiler->error);
+ else {
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ FAIL_IF(getput_arg(compiler, WORD_DATA | LOAD_DATA, TMP_REG2, src, srcw, 0, 0));
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, TMP_REG3, SLJIT_UNUSED, RM(TMP_REG2))));
+ }
+ }
+ else if (src & SLJIT_IMM)
+ FAIL_IF(load_immediate(compiler, TMP_REG3, srcw));
+ return push_inst(compiler, BLX | RM(TMP_REG3));
+}
+
+/* --------------------------------------------------------------------- */
+/* Conditional instructions */
+/* --------------------------------------------------------------------- */
+
+static sljit_uw get_cc(sljit_s32 type)
+{
+ switch (type) {
+ case SLJIT_EQUAL:
+ case SLJIT_MUL_NOT_OVERFLOW:
+ case SLJIT_EQUAL_F64:
+ return 0x00000000;
+
+ case SLJIT_NOT_EQUAL:
+ case SLJIT_MUL_OVERFLOW:
+ case SLJIT_NOT_EQUAL_F64:
+ return 0x10000000;
+
+ case SLJIT_LESS:
+ case SLJIT_LESS_F64:
+ return 0x30000000;
+
+ case SLJIT_GREATER_EQUAL:
+ case SLJIT_GREATER_EQUAL_F64:
+ return 0x20000000;
+
+ case SLJIT_GREATER:
+ case SLJIT_GREATER_F64:
+ return 0x80000000;
+
+ case SLJIT_LESS_EQUAL:
+ case SLJIT_LESS_EQUAL_F64:
+ return 0x90000000;
+
+ case SLJIT_SIG_LESS:
+ return 0xb0000000;
+
+ case SLJIT_SIG_GREATER_EQUAL:
+ return 0xa0000000;
+
+ case SLJIT_SIG_GREATER:
+ return 0xc0000000;
+
+ case SLJIT_SIG_LESS_EQUAL:
+ return 0xd0000000;
+
+ case SLJIT_OVERFLOW:
+ case SLJIT_UNORDERED_F64:
+ return 0x60000000;
+
+ case SLJIT_NOT_OVERFLOW:
+ case SLJIT_ORDERED_F64:
+ return 0x70000000;
+
+ default:
+ SLJIT_ASSERT(type >= SLJIT_JUMP && type <= SLJIT_CALL3);
+ return 0xe0000000;
+ }
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
+{
+ struct sljit_label *label;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_label(compiler));
+
+ if (compiler->last_label && compiler->last_label->size == compiler->size)
+ return compiler->last_label;
+
+ label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label));
+ PTR_FAIL_IF(!label);
+ set_label(label, compiler);
+ return label;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_s32 type)
+{
+ struct sljit_jump *jump;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_jump(compiler, type));
+
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ PTR_FAIL_IF(!jump);
+ set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
+ type &= 0xff;
+
+ /* In ARM, we don't need to touch the arguments. */
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ if (type >= SLJIT_FAST_CALL)
+ PTR_FAIL_IF(prepare_blx(compiler));
+ PTR_FAIL_IF(push_inst_with_unique_literal(compiler, ((EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0,
+ type <= SLJIT_JUMP ? TMP_PC : TMP_REG1, TMP_PC, 0)) & ~COND_MASK) | get_cc(type), 0));
+
+ if (jump->flags & SLJIT_REWRITABLE_JUMP) {
+ jump->addr = compiler->size;
+ compiler->patches++;
+ }
+
+ if (type >= SLJIT_FAST_CALL) {
+ jump->flags |= IS_BL;
+ PTR_FAIL_IF(emit_blx(compiler));
+ }
+
+ if (!(jump->flags & SLJIT_REWRITABLE_JUMP))
+ jump->addr = compiler->size;
+#else
+ if (type >= SLJIT_FAST_CALL)
+ jump->flags |= IS_BL;
+ PTR_FAIL_IF(emit_imm(compiler, TMP_REG1, 0));
+ PTR_FAIL_IF(push_inst(compiler, (((type <= SLJIT_JUMP ? BX : BLX) | RM(TMP_REG1)) & ~COND_MASK) | get_cc(type)));
+ jump->addr = compiler->size;
+#endif
+ return jump;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 src, sljit_sw srcw)
+{
+ struct sljit_jump *jump;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_ijump(compiler, type, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ /* In ARM, we don't need to touch the arguments. */
+ if (!(src & SLJIT_IMM)) {
+ if (FAST_IS_REG(src))
+ return push_inst(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RM(src));
+
+ SLJIT_ASSERT(src & SLJIT_MEM);
+ FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, TMP_REG2, src, srcw));
+ return push_inst(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RM(TMP_REG2));
+ }
+
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ FAIL_IF(!jump);
+ set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0));
+ jump->u.target = srcw;
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ if (type >= SLJIT_FAST_CALL)
+ FAIL_IF(prepare_blx(compiler));
+ FAIL_IF(push_inst_with_unique_literal(compiler, EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0, type <= SLJIT_JUMP ? TMP_PC : TMP_REG1, TMP_PC, 0), 0));
+ if (type >= SLJIT_FAST_CALL)
+ FAIL_IF(emit_blx(compiler));
+#else
+ FAIL_IF(emit_imm(compiler, TMP_REG1, 0));
+ FAIL_IF(push_inst(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RM(TMP_REG1)));
+#endif
+ jump->addr = compiler->size;
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw,
+ sljit_s32 type)
+{
+ sljit_s32 dst_r, flags = GET_ALL_FLAGS(op);
+ sljit_uw cc, ins;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ op = GET_OPCODE(op);
+ cc = get_cc(type & 0xff);
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2;
+
+ if (op < SLJIT_ADD) {
+ FAIL_IF(push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst_r, SLJIT_UNUSED, SRC2_IMM | 0)));
+ FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(MOV_DP, 0, dst_r, SLJIT_UNUSED, SRC2_IMM | 1) & ~COND_MASK) | cc));
+ return (dst_r == TMP_REG2) ? emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw) : SLJIT_SUCCESS;
+ }
+
+ ins = (op == SLJIT_AND ? AND_DP : (op == SLJIT_OR ? ORR_DP : EOR_DP));
+ if ((op == SLJIT_OR || op == SLJIT_XOR) && FAST_IS_REG(dst) && dst == src) {
+ FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(ins, 0, dst, dst, SRC2_IMM | 1) & ~COND_MASK) | cc));
+ /* The condition must always be set, even if the ORR/EOR is not executed above. */
+ return (flags & SLJIT_SET_E) ? push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, SET_FLAGS, TMP_REG1, SLJIT_UNUSED, RM(dst))) : SLJIT_SUCCESS;
+ }
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ if (src & SLJIT_MEM) {
+ FAIL_IF(emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, TMP_REG1, src, srcw, dst, dstw));
+ src = TMP_REG1;
+ srcw = 0;
+ } else if (src & SLJIT_IMM) {
+ FAIL_IF(load_immediate(compiler, TMP_REG1, srcw));
+ src = TMP_REG1;
+ srcw = 0;
+ }
+
+ FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(ins, 0, dst_r, src, SRC2_IMM | 1) & ~COND_MASK) | cc));
+ FAIL_IF(push_inst(compiler, (EMIT_DATA_PROCESS_INS(ins, 0, dst_r, src, SRC2_IMM | 0) & ~COND_MASK) | (cc ^ 0x10000000)));
+ if (dst_r == TMP_REG2)
+ FAIL_IF(emit_op_mem2(compiler, WORD_DATA, TMP_REG2, dst, dstw, 0, 0));
+
+ return (flags & SLJIT_SET_E) ? push_inst(compiler, EMIT_DATA_PROCESS_INS(MOV_DP, SET_FLAGS, TMP_REG1, SLJIT_UNUSED, RM(dst_r))) : SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value)
+{
+ struct sljit_const *const_;
+ sljit_s32 reg;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const));
+ PTR_FAIL_IF(!const_);
+
+ reg = SLOW_IS_REG(dst) ? dst : TMP_REG2;
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
+ PTR_FAIL_IF(push_inst_with_unique_literal(compiler, EMIT_DATA_TRANSFER(WORD_DATA | LOAD_DATA, 1, 0, reg, TMP_PC, 0), init_value));
+ compiler->patches++;
+#else
+ PTR_FAIL_IF(emit_imm(compiler, reg, init_value));
+#endif
+ set_const(const_, compiler);
+
+ if (dst & SLJIT_MEM)
+ PTR_FAIL_IF(emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw));
+ return const_;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset)
+{
+ inline_set_jump_addr(addr, executable_offset, new_target, 1);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset)
+{
+ inline_set_const(addr, executable_offset, new_constant, 1);
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeARM_64.c b/thirdparty/pcre2/src/sljit/sljitNativeARM_64.c
new file mode 100644
index 0000000000..2062d80b0a
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativeARM_64.c
@@ -0,0 +1,2062 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+SLJIT_API_FUNC_ATTRIBUTE const char* sljit_get_platform_name(void)
+{
+ return "ARM-64" SLJIT_CPUINFO;
+}
+
+/* Length of an instruction word */
+typedef sljit_u32 sljit_ins;
+
+#define TMP_ZERO (0)
+
+#define TMP_REG1 (SLJIT_NUMBER_OF_REGISTERS + 2)
+#define TMP_REG2 (SLJIT_NUMBER_OF_REGISTERS + 3)
+#define TMP_REG3 (SLJIT_NUMBER_OF_REGISTERS + 4)
+#define TMP_LR (SLJIT_NUMBER_OF_REGISTERS + 5)
+#define TMP_SP (SLJIT_NUMBER_OF_REGISTERS + 6)
+
+#define TMP_FREG1 (0)
+#define TMP_FREG2 (SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1)
+
+static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 8] = {
+ 31, 0, 1, 2, 3, 4, 5, 6, 7, 12, 13, 14, 15, 16, 17, 8, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 29, 9, 10, 11, 30, 31
+};
+
+#define W_OP (1 << 31)
+#define RD(rd) (reg_map[rd])
+#define RT(rt) (reg_map[rt])
+#define RN(rn) (reg_map[rn] << 5)
+#define RT2(rt2) (reg_map[rt2] << 10)
+#define RM(rm) (reg_map[rm] << 16)
+#define VD(vd) (vd)
+#define VT(vt) (vt)
+#define VN(vn) ((vn) << 5)
+#define VM(vm) ((vm) << 16)
+
+/* --------------------------------------------------------------------- */
+/* Instrucion forms */
+/* --------------------------------------------------------------------- */
+
+#define ADC 0x9a000000
+#define ADD 0x8b000000
+#define ADDI 0x91000000
+#define AND 0x8a000000
+#define ANDI 0x92000000
+#define ASRV 0x9ac02800
+#define B 0x14000000
+#define B_CC 0x54000000
+#define BL 0x94000000
+#define BLR 0xd63f0000
+#define BR 0xd61f0000
+#define BRK 0xd4200000
+#define CBZ 0xb4000000
+#define CLZ 0xdac01000
+#define CSINC 0x9a800400
+#define EOR 0xca000000
+#define EORI 0xd2000000
+#define FABS 0x1e60c000
+#define FADD 0x1e602800
+#define FCMP 0x1e602000
+#define FCVT 0x1e224000
+#define FCVTZS 0x9e780000
+#define FDIV 0x1e601800
+#define FMOV 0x1e604000
+#define FMUL 0x1e600800
+#define FNEG 0x1e614000
+#define FSUB 0x1e603800
+#define LDRI 0xf9400000
+#define LDP 0xa9400000
+#define LDP_PST 0xa8c00000
+#define LSLV 0x9ac02000
+#define LSRV 0x9ac02400
+#define MADD 0x9b000000
+#define MOVK 0xf2800000
+#define MOVN 0x92800000
+#define MOVZ 0xd2800000
+#define NOP 0xd503201f
+#define ORN 0xaa200000
+#define ORR 0xaa000000
+#define ORRI 0xb2000000
+#define RET 0xd65f0000
+#define SBC 0xda000000
+#define SBFM 0x93000000
+#define SCVTF 0x9e620000
+#define SDIV 0x9ac00c00
+#define SMADDL 0x9b200000
+#define SMULH 0x9b403c00
+#define STP 0xa9000000
+#define STP_PRE 0xa9800000
+#define STRI 0xf9000000
+#define STR_FI 0x3d000000
+#define STR_FR 0x3c206800
+#define STUR_FI 0x3c000000
+#define SUB 0xcb000000
+#define SUBI 0xd1000000
+#define SUBS 0xeb000000
+#define UBFM 0xd3000000
+#define UDIV 0x9ac00800
+#define UMULH 0x9bc03c00
+
+/* dest_reg is the absolute name of the register
+ Useful for reordering instructions in the delay slot. */
+static sljit_s32 push_inst(struct sljit_compiler *compiler, sljit_ins ins)
+{
+ sljit_ins *ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins));
+ FAIL_IF(!ptr);
+ *ptr = ins;
+ compiler->size++;
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 emit_imm64_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_uw imm)
+{
+ FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((imm & 0xffff) << 5)));
+ FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((imm >> 16) & 0xffff) << 5) | (1 << 21)));
+ FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((imm >> 32) & 0xffff) << 5) | (2 << 21)));
+ return push_inst(compiler, MOVK | RD(dst) | ((imm >> 48) << 5) | (3 << 21));
+}
+
+static SLJIT_INLINE void modify_imm64_const(sljit_ins* inst, sljit_uw new_imm)
+{
+ sljit_s32 dst = inst[0] & 0x1f;
+ SLJIT_ASSERT((inst[0] & 0xffe00000) == MOVZ && (inst[1] & 0xffe00000) == (MOVK | (1 << 21)));
+ inst[0] = MOVZ | dst | ((new_imm & 0xffff) << 5);
+ inst[1] = MOVK | dst | (((new_imm >> 16) & 0xffff) << 5) | (1 << 21);
+ inst[2] = MOVK | dst | (((new_imm >> 32) & 0xffff) << 5) | (2 << 21);
+ inst[3] = MOVK | dst | ((new_imm >> 48) << 5) | (3 << 21);
+}
+
+static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_ins *code, sljit_sw executable_offset)
+{
+ sljit_sw diff;
+ sljit_uw target_addr;
+
+ if (jump->flags & SLJIT_REWRITABLE_JUMP) {
+ jump->flags |= PATCH_ABS64;
+ return 0;
+ }
+
+ if (jump->flags & JUMP_ADDR)
+ target_addr = jump->u.target;
+ else {
+ SLJIT_ASSERT(jump->flags & JUMP_LABEL);
+ target_addr = (sljit_uw)(code + jump->u.label->size) + (sljit_uw)executable_offset;
+ }
+
+ diff = (sljit_sw)target_addr - (sljit_sw)(code_ptr + 4) - executable_offset;
+
+ if (jump->flags & IS_COND) {
+ diff += sizeof(sljit_ins);
+ if (diff <= 0xfffff && diff >= -0x100000) {
+ code_ptr[-5] ^= (jump->flags & IS_CBZ) ? (0x1 << 24) : 0x1;
+ jump->addr -= sizeof(sljit_ins);
+ jump->flags |= PATCH_COND;
+ return 5;
+ }
+ diff -= sizeof(sljit_ins);
+ }
+
+ if (diff <= 0x7ffffff && diff >= -0x8000000) {
+ jump->flags |= PATCH_B;
+ return 4;
+ }
+
+ if (target_addr <= 0xffffffffl) {
+ if (jump->flags & IS_COND)
+ code_ptr[-5] -= (2 << 5);
+ code_ptr[-2] = code_ptr[0];
+ return 2;
+ }
+ if (target_addr <= 0xffffffffffffl) {
+ if (jump->flags & IS_COND)
+ code_ptr[-5] -= (1 << 5);
+ jump->flags |= PATCH_ABS48;
+ code_ptr[-1] = code_ptr[0];
+ return 1;
+ }
+
+ jump->flags |= PATCH_ABS64;
+ return 0;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
+{
+ struct sljit_memory_fragment *buf;
+ sljit_ins *code;
+ sljit_ins *code_ptr;
+ sljit_ins *buf_ptr;
+ sljit_ins *buf_end;
+ sljit_uw word_count;
+ sljit_sw executable_offset;
+ sljit_uw addr;
+ sljit_s32 dst;
+
+ struct sljit_label *label;
+ struct sljit_jump *jump;
+ struct sljit_const *const_;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_generate_code(compiler));
+ reverse_buf(compiler);
+
+ code = (sljit_ins*)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_ins));
+ PTR_FAIL_WITH_EXEC_IF(code);
+ buf = compiler->buf;
+
+ code_ptr = code;
+ word_count = 0;
+ executable_offset = SLJIT_EXEC_OFFSET(code);
+
+ label = compiler->labels;
+ jump = compiler->jumps;
+ const_ = compiler->consts;
+
+ do {
+ buf_ptr = (sljit_ins*)buf->memory;
+ buf_end = buf_ptr + (buf->used_size >> 2);
+ do {
+ *code_ptr = *buf_ptr++;
+ /* These structures are ordered by their address. */
+ SLJIT_ASSERT(!label || label->size >= word_count);
+ SLJIT_ASSERT(!jump || jump->addr >= word_count);
+ SLJIT_ASSERT(!const_ || const_->addr >= word_count);
+ if (label && label->size == word_count) {
+ label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
+ label->size = code_ptr - code;
+ label = label->next;
+ }
+ if (jump && jump->addr == word_count) {
+ jump->addr = (sljit_uw)(code_ptr - 4);
+ code_ptr -= detect_jump_type(jump, code_ptr, code, executable_offset);
+ jump = jump->next;
+ }
+ if (const_ && const_->addr == word_count) {
+ const_->addr = (sljit_uw)code_ptr;
+ const_ = const_->next;
+ }
+ code_ptr ++;
+ word_count ++;
+ } while (buf_ptr < buf_end);
+
+ buf = buf->next;
+ } while (buf);
+
+ if (label && label->size == word_count) {
+ label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
+ label->size = code_ptr - code;
+ label = label->next;
+ }
+
+ SLJIT_ASSERT(!label);
+ SLJIT_ASSERT(!jump);
+ SLJIT_ASSERT(!const_);
+ SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size);
+
+ jump = compiler->jumps;
+ while (jump) {
+ do {
+ addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target;
+ buf_ptr = (sljit_ins *)jump->addr;
+
+ if (jump->flags & PATCH_B) {
+ addr = (sljit_sw)(addr - (sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset)) >> 2;
+ SLJIT_ASSERT((sljit_sw)addr <= 0x1ffffff && (sljit_sw)addr >= -0x2000000);
+ buf_ptr[0] = ((jump->flags & IS_BL) ? BL : B) | (addr & 0x3ffffff);
+ if (jump->flags & IS_COND)
+ buf_ptr[-1] -= (4 << 5);
+ break;
+ }
+ if (jump->flags & PATCH_COND) {
+ addr = (sljit_sw)(addr - (sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset)) >> 2;
+ SLJIT_ASSERT((sljit_sw)addr <= 0x3ffff && (sljit_sw)addr >= -0x40000);
+ buf_ptr[0] = (buf_ptr[0] & ~0xffffe0) | ((addr & 0x7ffff) << 5);
+ break;
+ }
+
+ SLJIT_ASSERT((jump->flags & (PATCH_ABS48 | PATCH_ABS64)) || addr <= 0xffffffffl);
+ SLJIT_ASSERT((jump->flags & PATCH_ABS64) || addr <= 0xffffffffffffl);
+
+ dst = buf_ptr[0] & 0x1f;
+ buf_ptr[0] = MOVZ | dst | ((addr & 0xffff) << 5);
+ buf_ptr[1] = MOVK | dst | (((addr >> 16) & 0xffff) << 5) | (1 << 21);
+ if (jump->flags & (PATCH_ABS48 | PATCH_ABS64))
+ buf_ptr[2] = MOVK | dst | (((addr >> 32) & 0xffff) << 5) | (2 << 21);
+ if (jump->flags & PATCH_ABS64)
+ buf_ptr[3] = MOVK | dst | (((addr >> 48) & 0xffff) << 5) | (3 << 21);
+ } while (0);
+ jump = jump->next;
+ }
+
+ compiler->error = SLJIT_ERR_COMPILED;
+ compiler->executable_offset = executable_offset;
+ compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins);
+
+ code = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset);
+ code_ptr = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
+
+ SLJIT_CACHE_FLUSH(code, code_ptr);
+ return code;
+}
+
+/* --------------------------------------------------------------------- */
+/* Core code generator functions. */
+/* --------------------------------------------------------------------- */
+
+#define COUNT_TRAILING_ZERO(value, result) \
+ result = 0; \
+ if (!(value & 0xffffffff)) { \
+ result += 32; \
+ value >>= 32; \
+ } \
+ if (!(value & 0xffff)) { \
+ result += 16; \
+ value >>= 16; \
+ } \
+ if (!(value & 0xff)) { \
+ result += 8; \
+ value >>= 8; \
+ } \
+ if (!(value & 0xf)) { \
+ result += 4; \
+ value >>= 4; \
+ } \
+ if (!(value & 0x3)) { \
+ result += 2; \
+ value >>= 2; \
+ } \
+ if (!(value & 0x1)) { \
+ result += 1; \
+ value >>= 1; \
+ }
+
+#define LOGICAL_IMM_CHECK 0x100
+
+static sljit_ins logical_imm(sljit_sw imm, sljit_s32 len)
+{
+ sljit_s32 negated, ones, right;
+ sljit_uw mask, uimm;
+ sljit_ins ins;
+
+ if (len & LOGICAL_IMM_CHECK) {
+ len &= ~LOGICAL_IMM_CHECK;
+ if (len == 32 && (imm == 0 || imm == -1))
+ return 0;
+ if (len == 16 && ((sljit_s32)imm == 0 || (sljit_s32)imm == -1))
+ return 0;
+ }
+
+ SLJIT_ASSERT((len == 32 && imm != 0 && imm != -1)
+ || (len == 16 && (sljit_s32)imm != 0 && (sljit_s32)imm != -1));
+ uimm = (sljit_uw)imm;
+ while (1) {
+ if (len <= 0) {
+ SLJIT_ASSERT_STOP();
+ return 0;
+ }
+ mask = ((sljit_uw)1 << len) - 1;
+ if ((uimm & mask) != ((uimm >> len) & mask))
+ break;
+ len >>= 1;
+ }
+
+ len <<= 1;
+
+ negated = 0;
+ if (uimm & 0x1) {
+ negated = 1;
+ uimm = ~uimm;
+ }
+
+ if (len < 64)
+ uimm &= ((sljit_uw)1 << len) - 1;
+
+ /* Unsigned right shift. */
+ COUNT_TRAILING_ZERO(uimm, right);
+
+ /* Signed shift. We also know that the highest bit is set. */
+ imm = (sljit_sw)~uimm;
+ SLJIT_ASSERT(imm < 0);
+
+ COUNT_TRAILING_ZERO(imm, ones);
+
+ if (~imm)
+ return 0;
+
+ if (len == 64)
+ ins = 1 << 22;
+ else
+ ins = (0x3f - ((len << 1) - 1)) << 10;
+
+ if (negated)
+ return ins | ((len - ones - 1) << 10) | ((len - ones - right) << 16);
+
+ return ins | ((ones - 1) << 10) | ((len - right) << 16);
+}
+
+#undef COUNT_TRAILING_ZERO
+
+static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw simm)
+{
+ sljit_uw imm = (sljit_uw)simm;
+ sljit_s32 i, zeros, ones, first;
+ sljit_ins bitmask;
+
+ if (imm <= 0xffff)
+ return push_inst(compiler, MOVZ | RD(dst) | (imm << 5));
+
+ if (simm >= -0x10000 && simm < 0)
+ return push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff) << 5));
+
+ if (imm <= 0xffffffffl) {
+ if ((imm & 0xffff0000l) == 0xffff0000)
+ return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | ((~imm & 0xffff) << 5));
+ if ((imm & 0xffff) == 0xffff)
+ return push_inst(compiler, (MOVN ^ W_OP) | RD(dst) | ((~imm & 0xffff0000l) >> (16 - 5)) | (1 << 21));
+ bitmask = logical_imm(simm, 16);
+ if (bitmask != 0)
+ return push_inst(compiler, (ORRI ^ W_OP) | RD(dst) | RN(TMP_ZERO) | bitmask);
+ }
+ else {
+ bitmask = logical_imm(simm, 32);
+ if (bitmask != 0)
+ return push_inst(compiler, ORRI | RD(dst) | RN(TMP_ZERO) | bitmask);
+ }
+
+ if (imm <= 0xffffffffl) {
+ FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((imm & 0xffff) << 5)));
+ return push_inst(compiler, MOVK | RD(dst) | ((imm & 0xffff0000l) >> (16 - 5)) | (1 << 21));
+ }
+
+ if (simm >= -0x100000000l && simm < 0) {
+ FAIL_IF(push_inst(compiler, MOVN | RD(dst) | ((~imm & 0xffff) << 5)));
+ return push_inst(compiler, MOVK | RD(dst) | ((imm & 0xffff0000l) >> (16 - 5)) | (1 << 21));
+ }
+
+ /* A large amount of number can be constructed from ORR and MOVx,
+ but computing them is costly. We don't */
+
+ zeros = 0;
+ ones = 0;
+ for (i = 4; i > 0; i--) {
+ if ((simm & 0xffff) == 0)
+ zeros++;
+ if ((simm & 0xffff) == 0xffff)
+ ones++;
+ simm >>= 16;
+ }
+
+ simm = (sljit_sw)imm;
+ first = 1;
+ if (ones > zeros) {
+ simm = ~simm;
+ for (i = 0; i < 4; i++) {
+ if (!(simm & 0xffff)) {
+ simm >>= 16;
+ continue;
+ }
+ if (first) {
+ first = 0;
+ FAIL_IF(push_inst(compiler, MOVN | RD(dst) | ((simm & 0xffff) << 5) | (i << 21)));
+ }
+ else
+ FAIL_IF(push_inst(compiler, MOVK | RD(dst) | ((~simm & 0xffff) << 5) | (i << 21)));
+ simm >>= 16;
+ }
+ return SLJIT_SUCCESS;
+ }
+
+ for (i = 0; i < 4; i++) {
+ if (!(simm & 0xffff)) {
+ simm >>= 16;
+ continue;
+ }
+ if (first) {
+ first = 0;
+ FAIL_IF(push_inst(compiler, MOVZ | RD(dst) | ((simm & 0xffff) << 5) | (i << 21)));
+ }
+ else
+ FAIL_IF(push_inst(compiler, MOVK | RD(dst) | ((simm & 0xffff) << 5) | (i << 21)));
+ simm >>= 16;
+ }
+ return SLJIT_SUCCESS;
+}
+
+#define ARG1_IMM 0x0010000
+#define ARG2_IMM 0x0020000
+#define INT_OP 0x0040000
+#define SET_FLAGS 0x0080000
+#define UNUSED_RETURN 0x0100000
+#define SLOW_DEST 0x0200000
+#define SLOW_SRC1 0x0400000
+#define SLOW_SRC2 0x0800000
+
+#define CHECK_FLAGS(flag_bits) \
+ if (flags & SET_FLAGS) { \
+ inv_bits |= flag_bits; \
+ if (flags & UNUSED_RETURN) \
+ dst = TMP_ZERO; \
+ }
+
+static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 dst, sljit_sw arg1, sljit_sw arg2)
+{
+ /* dst must be register, TMP_REG1
+ arg1 must be register, TMP_REG1, imm
+ arg2 must be register, TMP_REG2, imm */
+ sljit_ins inv_bits = (flags & INT_OP) ? (1 << 31) : 0;
+ sljit_ins inst_bits;
+ sljit_s32 op = (flags & 0xffff);
+ sljit_s32 reg;
+ sljit_sw imm, nimm;
+
+ if (SLJIT_UNLIKELY((flags & (ARG1_IMM | ARG2_IMM)) == (ARG1_IMM | ARG2_IMM))) {
+ /* Both are immediates. */
+ flags &= ~ARG1_IMM;
+ if (arg1 == 0 && op != SLJIT_ADD && op != SLJIT_SUB)
+ arg1 = TMP_ZERO;
+ else {
+ FAIL_IF(load_immediate(compiler, TMP_REG1, arg1));
+ arg1 = TMP_REG1;
+ }
+ }
+
+ if (flags & (ARG1_IMM | ARG2_IMM)) {
+ reg = (flags & ARG2_IMM) ? arg1 : arg2;
+ imm = (flags & ARG2_IMM) ? arg2 : arg1;
+
+ switch (op) {
+ case SLJIT_MUL:
+ case SLJIT_NEG:
+ case SLJIT_CLZ:
+ case SLJIT_ADDC:
+ case SLJIT_SUBC:
+ /* No form with immediate operand (except imm 0, which
+ is represented by a ZERO register). */
+ break;
+ case SLJIT_MOV:
+ SLJIT_ASSERT(!(flags & SET_FLAGS) && (flags & ARG2_IMM) && arg1 == TMP_REG1);
+ return load_immediate(compiler, dst, imm);
+ case SLJIT_NOT:
+ SLJIT_ASSERT(flags & ARG2_IMM);
+ FAIL_IF(load_immediate(compiler, dst, (flags & INT_OP) ? (~imm & 0xffffffff) : ~imm));
+ goto set_flags;
+ case SLJIT_SUB:
+ if (flags & ARG1_IMM)
+ break;
+ imm = -imm;
+ /* Fall through. */
+ case SLJIT_ADD:
+ if (imm == 0) {
+ CHECK_FLAGS(1 << 29);
+ return push_inst(compiler, ((op == SLJIT_ADD ? ADDI : SUBI) ^ inv_bits) | RD(dst) | RN(reg));
+ }
+ if (imm > 0 && imm <= 0xfff) {
+ CHECK_FLAGS(1 << 29);
+ return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | (imm << 10));
+ }
+ nimm = -imm;
+ if (nimm > 0 && nimm <= 0xfff) {
+ CHECK_FLAGS(1 << 29);
+ return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | (nimm << 10));
+ }
+ if (imm > 0 && imm <= 0xffffff && !(imm & 0xfff)) {
+ CHECK_FLAGS(1 << 29);
+ return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((imm >> 12) << 10) | (1 << 22));
+ }
+ if (nimm > 0 && nimm <= 0xffffff && !(nimm & 0xfff)) {
+ CHECK_FLAGS(1 << 29);
+ return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | ((nimm >> 12) << 10) | (1 << 22));
+ }
+ if (imm > 0 && imm <= 0xffffff && !(flags & SET_FLAGS)) {
+ FAIL_IF(push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(reg) | ((imm >> 12) << 10) | (1 << 22)));
+ return push_inst(compiler, (ADDI ^ inv_bits) | RD(dst) | RN(dst) | ((imm & 0xfff) << 10));
+ }
+ if (nimm > 0 && nimm <= 0xffffff && !(flags & SET_FLAGS)) {
+ FAIL_IF(push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(reg) | ((nimm >> 12) << 10) | (1 << 22)));
+ return push_inst(compiler, (SUBI ^ inv_bits) | RD(dst) | RN(dst) | ((nimm & 0xfff) << 10));
+ }
+ break;
+ case SLJIT_AND:
+ inst_bits = logical_imm(imm, LOGICAL_IMM_CHECK | ((flags & INT_OP) ? 16 : 32));
+ if (!inst_bits)
+ break;
+ CHECK_FLAGS(3 << 29);
+ return push_inst(compiler, (ANDI ^ inv_bits) | RD(dst) | RN(reg) | inst_bits);
+ case SLJIT_OR:
+ case SLJIT_XOR:
+ inst_bits = logical_imm(imm, LOGICAL_IMM_CHECK | ((flags & INT_OP) ? 16 : 32));
+ if (!inst_bits)
+ break;
+ if (op == SLJIT_OR)
+ inst_bits |= ORRI;
+ else
+ inst_bits |= EORI;
+ FAIL_IF(push_inst(compiler, (inst_bits ^ inv_bits) | RD(dst) | RN(reg)));
+ goto set_flags;
+ case SLJIT_SHL:
+ if (flags & ARG1_IMM)
+ break;
+ if (flags & INT_OP) {
+ imm &= 0x1f;
+ FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | ((-imm & 0x1f) << 16) | ((31 - imm) << 10)));
+ }
+ else {
+ imm &= 0x3f;
+ FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (1 << 22) | ((-imm & 0x3f) << 16) | ((63 - imm) << 10)));
+ }
+ goto set_flags;
+ case SLJIT_LSHR:
+ case SLJIT_ASHR:
+ if (flags & ARG1_IMM)
+ break;
+ if (op == SLJIT_ASHR)
+ inv_bits |= 1 << 30;
+ if (flags & INT_OP) {
+ imm &= 0x1f;
+ FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (imm << 16) | (31 << 10)));
+ }
+ else {
+ imm &= 0x3f;
+ FAIL_IF(push_inst(compiler, (UBFM ^ inv_bits) | RD(dst) | RN(arg1) | (1 << 22) | (imm << 16) | (63 << 10)));
+ }
+ goto set_flags;
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+
+ if (flags & ARG2_IMM) {
+ if (arg2 == 0)
+ arg2 = TMP_ZERO;
+ else {
+ FAIL_IF(load_immediate(compiler, TMP_REG2, arg2));
+ arg2 = TMP_REG2;
+ }
+ }
+ else {
+ if (arg1 == 0)
+ arg1 = TMP_ZERO;
+ else {
+ FAIL_IF(load_immediate(compiler, TMP_REG1, arg1));
+ arg1 = TMP_REG1;
+ }
+ }
+ }
+
+ /* Both arguments are registers. */
+ switch (op) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_P:
+ case SLJIT_MOVU:
+ case SLJIT_MOVU_P:
+ SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
+ if (dst == arg2)
+ return SLJIT_SUCCESS;
+ return push_inst(compiler, ORR | RD(dst) | RN(TMP_ZERO) | RM(arg2));
+ case SLJIT_MOV_U8:
+ case SLJIT_MOVU_U8:
+ SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
+ return push_inst(compiler, (UBFM ^ (1 << 31)) | RD(dst) | RN(arg2) | (7 << 10));
+ case SLJIT_MOV_S8:
+ case SLJIT_MOVU_S8:
+ SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
+ if (!(flags & INT_OP))
+ inv_bits |= 1 << 22;
+ return push_inst(compiler, (SBFM ^ inv_bits) | RD(dst) | RN(arg2) | (7 << 10));
+ case SLJIT_MOV_U16:
+ case SLJIT_MOVU_U16:
+ SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
+ return push_inst(compiler, (UBFM ^ (1 << 31)) | RD(dst) | RN(arg2) | (15 << 10));
+ case SLJIT_MOV_S16:
+ case SLJIT_MOVU_S16:
+ SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
+ if (!(flags & INT_OP))
+ inv_bits |= 1 << 22;
+ return push_inst(compiler, (SBFM ^ inv_bits) | RD(dst) | RN(arg2) | (15 << 10));
+ case SLJIT_MOV_U32:
+ case SLJIT_MOVU_U32:
+ SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
+ if ((flags & INT_OP) && dst == arg2)
+ return SLJIT_SUCCESS;
+ return push_inst(compiler, (ORR ^ (1 << 31)) | RD(dst) | RN(TMP_ZERO) | RM(arg2));
+ case SLJIT_MOV_S32:
+ case SLJIT_MOVU_S32:
+ SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
+ if ((flags & INT_OP) && dst == arg2)
+ return SLJIT_SUCCESS;
+ return push_inst(compiler, SBFM | (1 << 22) | RD(dst) | RN(arg2) | (31 << 10));
+ case SLJIT_NOT:
+ SLJIT_ASSERT(arg1 == TMP_REG1);
+ FAIL_IF(push_inst(compiler, (ORN ^ inv_bits) | RD(dst) | RN(TMP_ZERO) | RM(arg2)));
+ goto set_flags;
+ case SLJIT_NEG:
+ SLJIT_ASSERT(arg1 == TMP_REG1);
+ if (flags & SET_FLAGS)
+ inv_bits |= 1 << 29;
+ return push_inst(compiler, (SUB ^ inv_bits) | RD(dst) | RN(TMP_ZERO) | RM(arg2));
+ case SLJIT_CLZ:
+ SLJIT_ASSERT(arg1 == TMP_REG1);
+ FAIL_IF(push_inst(compiler, (CLZ ^ inv_bits) | RD(dst) | RN(arg2)));
+ goto set_flags;
+ case SLJIT_ADD:
+ CHECK_FLAGS(1 << 29);
+ return push_inst(compiler, (ADD ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2));
+ case SLJIT_ADDC:
+ CHECK_FLAGS(1 << 29);
+ return push_inst(compiler, (ADC ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2));
+ case SLJIT_SUB:
+ CHECK_FLAGS(1 << 29);
+ return push_inst(compiler, (SUB ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2));
+ case SLJIT_SUBC:
+ CHECK_FLAGS(1 << 29);
+ return push_inst(compiler, (SBC ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2));
+ case SLJIT_MUL:
+ if (!(flags & SET_FLAGS))
+ return push_inst(compiler, (MADD ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2) | RT2(TMP_ZERO));
+ if (flags & INT_OP) {
+ FAIL_IF(push_inst(compiler, SMADDL | RD(dst) | RN(arg1) | RM(arg2) | (31 << 10)));
+ FAIL_IF(push_inst(compiler, ADD | RD(TMP_LR) | RN(TMP_ZERO) | RM(dst) | (2 << 22) | (31 << 10)));
+ return push_inst(compiler, SUBS | RD(TMP_ZERO) | RN(TMP_LR) | RM(dst) | (2 << 22) | (63 << 10));
+ }
+ FAIL_IF(push_inst(compiler, SMULH | RD(TMP_LR) | RN(arg1) | RM(arg2)));
+ FAIL_IF(push_inst(compiler, MADD | RD(dst) | RN(arg1) | RM(arg2) | RT2(TMP_ZERO)));
+ return push_inst(compiler, SUBS | RD(TMP_ZERO) | RN(TMP_LR) | RM(dst) | (2 << 22) | (63 << 10));
+ case SLJIT_AND:
+ CHECK_FLAGS(3 << 29);
+ return push_inst(compiler, (AND ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2));
+ case SLJIT_OR:
+ FAIL_IF(push_inst(compiler, (ORR ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)));
+ goto set_flags;
+ case SLJIT_XOR:
+ FAIL_IF(push_inst(compiler, (EOR ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)));
+ goto set_flags;
+ case SLJIT_SHL:
+ FAIL_IF(push_inst(compiler, (LSLV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)));
+ goto set_flags;
+ case SLJIT_LSHR:
+ FAIL_IF(push_inst(compiler, (LSRV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)));
+ goto set_flags;
+ case SLJIT_ASHR:
+ FAIL_IF(push_inst(compiler, (ASRV ^ inv_bits) | RD(dst) | RN(arg1) | RM(arg2)));
+ goto set_flags;
+ }
+
+ SLJIT_ASSERT_STOP();
+ return SLJIT_SUCCESS;
+
+set_flags:
+ if (flags & SET_FLAGS)
+ return push_inst(compiler, (SUBS ^ inv_bits) | RD(TMP_ZERO) | RN(dst) | RM(TMP_ZERO));
+ return SLJIT_SUCCESS;
+}
+
+#define STORE 0x01
+#define SIGNED 0x02
+
+#define UPDATE 0x04
+#define ARG_TEST 0x08
+
+#define BYTE_SIZE 0x000
+#define HALF_SIZE 0x100
+#define INT_SIZE 0x200
+#define WORD_SIZE 0x300
+
+#define MEM_SIZE_SHIFT(flags) ((flags) >> 8)
+
+static const sljit_ins sljit_mem_imm[4] = {
+/* u l */ 0x39400000 /* ldrb [reg,imm] */,
+/* u s */ 0x39000000 /* strb [reg,imm] */,
+/* s l */ 0x39800000 /* ldrsb [reg,imm] */,
+/* s s */ 0x39000000 /* strb [reg,imm] */,
+};
+
+static const sljit_ins sljit_mem_simm[4] = {
+/* u l */ 0x38400000 /* ldurb [reg,imm] */,
+/* u s */ 0x38000000 /* sturb [reg,imm] */,
+/* s l */ 0x38800000 /* ldursb [reg,imm] */,
+/* s s */ 0x38000000 /* sturb [reg,imm] */,
+};
+
+static const sljit_ins sljit_mem_pre_simm[4] = {
+/* u l */ 0x38400c00 /* ldrb [reg,imm]! */,
+/* u s */ 0x38000c00 /* strb [reg,imm]! */,
+/* s l */ 0x38800c00 /* ldrsb [reg,imm]! */,
+/* s s */ 0x38000c00 /* strb [reg,imm]! */,
+};
+
+static const sljit_ins sljit_mem_reg[4] = {
+/* u l */ 0x38606800 /* ldrb [reg,reg] */,
+/* u s */ 0x38206800 /* strb [reg,reg] */,
+/* s l */ 0x38a06800 /* ldrsb [reg,reg] */,
+/* s s */ 0x38206800 /* strb [reg,reg] */,
+};
+
+/* Helper function. Dst should be reg + value, using at most 1 instruction, flags does not set. */
+static sljit_s32 emit_set_delta(struct sljit_compiler *compiler, sljit_s32 dst, sljit_s32 reg, sljit_sw value)
+{
+ if (value >= 0) {
+ if (value <= 0xfff)
+ return push_inst(compiler, ADDI | RD(dst) | RN(reg) | (value << 10));
+ if (value <= 0xffffff && !(value & 0xfff))
+ return push_inst(compiler, ADDI | (1 << 22) | RD(dst) | RN(reg) | (value >> 2));
+ }
+ else {
+ value = -value;
+ if (value <= 0xfff)
+ return push_inst(compiler, SUBI | RD(dst) | RN(reg) | (value << 10));
+ if (value <= 0xffffff && !(value & 0xfff))
+ return push_inst(compiler, SUBI | (1 << 22) | RD(dst) | RN(reg) | (value >> 2));
+ }
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+/* Can perform an operation using at most 1 instruction. */
+static sljit_s32 getput_arg_fast(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw)
+{
+ sljit_u32 shift = MEM_SIZE_SHIFT(flags);
+
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+
+ if (SLJIT_UNLIKELY(flags & UPDATE)) {
+ if ((arg & REG_MASK) && !(arg & OFFS_REG_MASK) && argw <= 255 && argw >= -256) {
+ if (SLJIT_UNLIKELY(flags & ARG_TEST))
+ return 1;
+
+ arg &= REG_MASK;
+ argw &= 0x1ff;
+ FAIL_IF(push_inst(compiler, sljit_mem_pre_simm[flags & 0x3]
+ | (shift << 30) | RT(reg) | RN(arg) | (argw << 12)));
+ return -1;
+ }
+ return 0;
+ }
+
+ if (SLJIT_UNLIKELY(arg & OFFS_REG_MASK)) {
+ argw &= 0x3;
+ if (argw && argw != shift)
+ return 0;
+
+ if (SLJIT_UNLIKELY(flags & ARG_TEST))
+ return 1;
+
+ FAIL_IF(push_inst(compiler, sljit_mem_reg[flags & 0x3] | (shift << 30) | RT(reg)
+ | RN(arg & REG_MASK) | RM(OFFS_REG(arg)) | (argw ? (1 << 12) : 0)));
+ return -1;
+ }
+
+ arg &= REG_MASK;
+ if (argw >= 0 && (argw >> shift) <= 0xfff && (argw & ((1 << shift) - 1)) == 0) {
+ if (SLJIT_UNLIKELY(flags & ARG_TEST))
+ return 1;
+
+ FAIL_IF(push_inst(compiler, sljit_mem_imm[flags & 0x3] | (shift << 30)
+ | RT(reg) | RN(arg) | (argw << (10 - shift))));
+ return -1;
+ }
+
+ if (argw > 255 || argw < -256)
+ return 0;
+
+ if (SLJIT_UNLIKELY(flags & ARG_TEST))
+ return 1;
+
+ FAIL_IF(push_inst(compiler, sljit_mem_simm[flags & 0x3] | (shift << 30)
+ | RT(reg) | RN(arg) | ((argw & 0x1ff) << 12)));
+ return -1;
+}
+
+/* see getput_arg below.
+ Note: can_cache is called only for binary operators. Those
+ operators always uses word arguments without write back. */
+static sljit_s32 can_cache(sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw)
+{
+ sljit_sw diff;
+ if ((arg & OFFS_REG_MASK) || !(next_arg & SLJIT_MEM))
+ return 0;
+
+ if (!(arg & REG_MASK)) {
+ diff = argw - next_argw;
+ if (diff <= 0xfff && diff >= -0xfff)
+ return 1;
+ return 0;
+ }
+
+ if (argw == next_argw)
+ return 1;
+
+ diff = argw - next_argw;
+ if (arg == next_arg && diff <= 0xfff && diff >= -0xfff)
+ return 1;
+
+ return 0;
+}
+
+/* Emit the necessary instructions. See can_cache above. */
+static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg,
+ sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw)
+{
+ sljit_u32 shift = MEM_SIZE_SHIFT(flags);
+ sljit_s32 tmp_r, other_r;
+ sljit_sw diff;
+
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+ if (!(next_arg & SLJIT_MEM)) {
+ next_arg = 0;
+ next_argw = 0;
+ }
+
+ tmp_r = (flags & STORE) ? TMP_REG3 : reg;
+
+ if (SLJIT_UNLIKELY((flags & UPDATE) && (arg & REG_MASK))) {
+ /* Update only applies if a base register exists. */
+ other_r = OFFS_REG(arg);
+ if (!other_r) {
+ other_r = arg & REG_MASK;
+ if (other_r != reg && argw >= 0 && argw <= 0xffffff) {
+ if ((argw & 0xfff) != 0)
+ FAIL_IF(push_inst(compiler, ADDI | RD(other_r) | RN(other_r) | ((argw & 0xfff) << 10)));
+ if (argw >> 12)
+ FAIL_IF(push_inst(compiler, ADDI | (1 << 22) | RD(other_r) | RN(other_r) | ((argw >> 12) << 10)));
+ return push_inst(compiler, sljit_mem_imm[flags & 0x3] | (shift << 30) | RT(reg) | RN(other_r));
+ }
+ else if (other_r != reg && argw < 0 && argw >= -0xffffff) {
+ argw = -argw;
+ if ((argw & 0xfff) != 0)
+ FAIL_IF(push_inst(compiler, SUBI | RD(other_r) | RN(other_r) | ((argw & 0xfff) << 10)));
+ if (argw >> 12)
+ FAIL_IF(push_inst(compiler, SUBI | (1 << 22) | RD(other_r) | RN(other_r) | ((argw >> 12) << 10)));
+ return push_inst(compiler, sljit_mem_imm[flags & 0x3] | (shift << 30) | RT(reg) | RN(other_r));
+ }
+
+ if (compiler->cache_arg == SLJIT_MEM) {
+ if (argw == compiler->cache_argw) {
+ other_r = TMP_REG3;
+ argw = 0;
+ }
+ else if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, argw - compiler->cache_argw) != SLJIT_ERR_UNSUPPORTED) {
+ FAIL_IF(compiler->error);
+ compiler->cache_argw = argw;
+ other_r = TMP_REG3;
+ argw = 0;
+ }
+ }
+
+ if (argw) {
+ FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
+ compiler->cache_arg = SLJIT_MEM;
+ compiler->cache_argw = argw;
+ other_r = TMP_REG3;
+ argw = 0;
+ }
+ }
+
+ /* No caching here. */
+ arg &= REG_MASK;
+ argw &= 0x3;
+ if (!argw || argw == shift) {
+ FAIL_IF(push_inst(compiler, sljit_mem_reg[flags & 0x3] | (shift << 30) | RT(reg) | RN(arg) | RM(other_r) | (argw ? (1 << 12) : 0)));
+ return push_inst(compiler, ADD | RD(arg) | RN(arg) | RM(other_r) | (argw << 10));
+ }
+ if (arg != reg) {
+ FAIL_IF(push_inst(compiler, ADD | RD(arg) | RN(arg) | RM(other_r) | (argw << 10)));
+ return push_inst(compiler, sljit_mem_imm[flags & 0x3] | (shift << 30) | RT(reg) | RN(arg));
+ }
+ FAIL_IF(push_inst(compiler, ADD | RD(TMP_LR) | RN(arg) | RM(other_r) | (argw << 10)));
+ FAIL_IF(push_inst(compiler, sljit_mem_imm[flags & 0x3] | (shift << 30) | RT(reg) | RN(TMP_LR)));
+ return push_inst(compiler, ORR | RD(arg) | RN(TMP_ZERO) | RM(TMP_LR));
+ }
+
+ if (arg & OFFS_REG_MASK) {
+ other_r = OFFS_REG(arg);
+ arg &= REG_MASK;
+ FAIL_IF(push_inst(compiler, ADD | RD(tmp_r) | RN(arg) | RM(other_r) | ((argw & 0x3) << 10)));
+ return push_inst(compiler, sljit_mem_imm[flags & 0x3] | (shift << 30) | RT(reg) | RN(tmp_r));
+ }
+
+ if (compiler->cache_arg == arg) {
+ diff = argw - compiler->cache_argw;
+ if (diff <= 255 && diff >= -256)
+ return push_inst(compiler, sljit_mem_simm[flags & 0x3] | (shift << 30)
+ | RT(reg) | RN(TMP_REG3) | ((diff & 0x1ff) << 12));
+ if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, diff) != SLJIT_ERR_UNSUPPORTED) {
+ FAIL_IF(compiler->error);
+ return push_inst(compiler, sljit_mem_imm[flags & 0x3] | (shift << 30) | RT(reg) | RN(arg));
+ }
+ }
+
+ if (argw >= 0 && argw <= 0xffffff && (argw & ((1 << shift) - 1)) == 0) {
+ FAIL_IF(push_inst(compiler, ADDI | (1 << 22) | RD(tmp_r) | RN(arg & REG_MASK) | ((argw >> 12) << 10)));
+ return push_inst(compiler, sljit_mem_imm[flags & 0x3] | (shift << 30)
+ | RT(reg) | RN(tmp_r) | ((argw & 0xfff) << (10 - shift)));
+ }
+
+ diff = argw - next_argw;
+ next_arg = (arg & REG_MASK) && (arg == next_arg) && diff <= 0xfff && diff >= -0xfff && diff != 0;
+ arg &= REG_MASK;
+
+ if (arg && compiler->cache_arg == SLJIT_MEM) {
+ if (compiler->cache_argw == argw)
+ return push_inst(compiler, sljit_mem_reg[flags & 0x3] | (shift << 30) | RT(reg) | RN(arg) | RM(TMP_REG3));
+ if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, argw - compiler->cache_argw) != SLJIT_ERR_UNSUPPORTED) {
+ FAIL_IF(compiler->error);
+ compiler->cache_argw = argw;
+ return push_inst(compiler, sljit_mem_reg[flags & 0x3] | (shift << 30) | RT(reg) | RN(arg) | RM(TMP_REG3));
+ }
+ }
+
+ compiler->cache_argw = argw;
+ if (next_arg && emit_set_delta(compiler, TMP_REG3, arg, argw) != SLJIT_ERR_UNSUPPORTED) {
+ FAIL_IF(compiler->error);
+ compiler->cache_arg = SLJIT_MEM | arg;
+ arg = 0;
+ }
+ else {
+ FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
+ compiler->cache_arg = SLJIT_MEM;
+
+ if (next_arg) {
+ FAIL_IF(push_inst(compiler, ADD | RD(TMP_REG3) | RN(TMP_REG3) | RM(arg)));
+ compiler->cache_arg = SLJIT_MEM | arg;
+ arg = 0;
+ }
+ }
+
+ if (arg)
+ return push_inst(compiler, sljit_mem_reg[flags & 0x3] | (shift << 30) | RT(reg) | RN(arg) | RM(TMP_REG3));
+ return push_inst(compiler, sljit_mem_imm[flags & 0x3] | (shift << 30) | RT(reg) | RN(TMP_REG3));
+}
+
+static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw)
+{
+ if (getput_arg_fast(compiler, flags, reg, arg, argw))
+ return compiler->error;
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ return getput_arg(compiler, flags, reg, arg, argw, 0, 0);
+}
+
+static SLJIT_INLINE sljit_s32 emit_op_mem2(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg1, sljit_sw arg1w, sljit_s32 arg2, sljit_sw arg2w)
+{
+ if (getput_arg_fast(compiler, flags, reg, arg1, arg1w))
+ return compiler->error;
+ return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w);
+}
+
+/* --------------------------------------------------------------------- */
+/* Entry, exit */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ sljit_s32 i, tmp, offs, prev, saved_regs_size;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ saved_regs_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 0);
+ local_size += saved_regs_size + SLJIT_LOCALS_OFFSET;
+ local_size = (local_size + 15) & ~0xf;
+ compiler->local_size = local_size;
+
+ if (local_size <= (63 * sizeof(sljit_sw))) {
+ FAIL_IF(push_inst(compiler, STP_PRE | 29 | RT2(TMP_LR)
+ | RN(TMP_SP) | ((-(local_size >> 3) & 0x7f) << 15)));
+ FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(TMP_SP) | (0 << 10)));
+ offs = (local_size - saved_regs_size) << (15 - 3);
+ } else {
+ offs = 0 << 15;
+ if (saved_regs_size & 0x8) {
+ offs = 1 << 15;
+ saved_regs_size += sizeof(sljit_sw);
+ }
+ local_size -= saved_regs_size + SLJIT_LOCALS_OFFSET;
+ if (saved_regs_size > 0)
+ FAIL_IF(push_inst(compiler, SUBI | RD(TMP_SP) | RN(TMP_SP) | (saved_regs_size << 10)));
+ }
+
+ tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
+ prev = -1;
+ for (i = SLJIT_S0; i >= tmp; i--) {
+ if (prev == -1) {
+ if (!(offs & (1 << 15))) {
+ prev = i;
+ continue;
+ }
+ FAIL_IF(push_inst(compiler, STRI | RT(i) | RN(TMP_SP) | (offs >> 5)));
+ offs += 1 << 15;
+ continue;
+ }
+ FAIL_IF(push_inst(compiler, STP | RT(prev) | RT2(i) | RN(TMP_SP) | offs));
+ offs += 2 << 15;
+ prev = -1;
+ }
+
+ for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--) {
+ if (prev == -1) {
+ if (!(offs & (1 << 15))) {
+ prev = i;
+ continue;
+ }
+ FAIL_IF(push_inst(compiler, STRI | RT(i) | RN(TMP_SP) | (offs >> 5)));
+ offs += 1 << 15;
+ continue;
+ }
+ FAIL_IF(push_inst(compiler, STP | RT(prev) | RT2(i) | RN(TMP_SP) | offs));
+ offs += 2 << 15;
+ prev = -1;
+ }
+
+ SLJIT_ASSERT(prev == -1);
+
+ if (compiler->local_size > (63 * sizeof(sljit_sw))) {
+ /* The local_size is already adjusted by the saved registers. */
+ if (local_size > 0xfff) {
+ FAIL_IF(push_inst(compiler, SUBI | RD(TMP_SP) | RN(TMP_SP) | ((local_size >> 12) << 10) | (1 << 22)));
+ local_size &= 0xfff;
+ }
+ if (local_size)
+ FAIL_IF(push_inst(compiler, SUBI | RD(TMP_SP) | RN(TMP_SP) | (local_size << 10)));
+ FAIL_IF(push_inst(compiler, STP_PRE | 29 | RT2(TMP_LR)
+ | RN(TMP_SP) | ((-(16 >> 3) & 0x7f) << 15)));
+ FAIL_IF(push_inst(compiler, ADDI | RD(SLJIT_SP) | RN(TMP_SP) | (0 << 10)));
+ }
+
+ if (args >= 1)
+ FAIL_IF(push_inst(compiler, ORR | RD(SLJIT_S0) | RN(TMP_ZERO) | RM(SLJIT_R0)));
+ if (args >= 2)
+ FAIL_IF(push_inst(compiler, ORR | RD(SLJIT_S1) | RN(TMP_ZERO) | RM(SLJIT_R1)));
+ if (args >= 3)
+ FAIL_IF(push_inst(compiler, ORR | RD(SLJIT_S2) | RN(TMP_ZERO) | RM(SLJIT_R2)));
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 0) + SLJIT_LOCALS_OFFSET;
+ local_size = (local_size + 15) & ~0xf;
+ compiler->local_size = local_size;
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 local_size;
+ sljit_s32 i, tmp, offs, prev, saved_regs_size;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_return(compiler, op, src, srcw));
+
+ FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
+
+ local_size = compiler->local_size;
+
+ saved_regs_size = GET_SAVED_REGISTERS_SIZE(compiler->scratches, compiler->saveds, 0);
+ if (local_size <= (63 * sizeof(sljit_sw)))
+ offs = (local_size - saved_regs_size) << (15 - 3);
+ else {
+ FAIL_IF(push_inst(compiler, LDP_PST | 29 | RT2(TMP_LR)
+ | RN(TMP_SP) | (((16 >> 3) & 0x7f) << 15)));
+ offs = 0 << 15;
+ if (saved_regs_size & 0x8) {
+ offs = 1 << 15;
+ saved_regs_size += sizeof(sljit_sw);
+ }
+ local_size -= saved_regs_size + SLJIT_LOCALS_OFFSET;
+ if (local_size > 0xfff) {
+ FAIL_IF(push_inst(compiler, ADDI | RD(TMP_SP) | RN(TMP_SP) | ((local_size >> 12) << 10) | (1 << 22)));
+ local_size &= 0xfff;
+ }
+ if (local_size)
+ FAIL_IF(push_inst(compiler, ADDI | RD(TMP_SP) | RN(TMP_SP) | (local_size << 10)));
+ }
+
+ tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJIT_FIRST_SAVED_REG;
+ prev = -1;
+ for (i = SLJIT_S0; i >= tmp; i--) {
+ if (prev == -1) {
+ if (!(offs & (1 << 15))) {
+ prev = i;
+ continue;
+ }
+ FAIL_IF(push_inst(compiler, LDRI | RT(i) | RN(TMP_SP) | (offs >> 5)));
+ offs += 1 << 15;
+ continue;
+ }
+ FAIL_IF(push_inst(compiler, LDP | RT(prev) | RT2(i) | RN(TMP_SP) | offs));
+ offs += 2 << 15;
+ prev = -1;
+ }
+
+ for (i = compiler->scratches; i >= SLJIT_FIRST_SAVED_REG; i--) {
+ if (prev == -1) {
+ if (!(offs & (1 << 15))) {
+ prev = i;
+ continue;
+ }
+ FAIL_IF(push_inst(compiler, LDRI | RT(i) | RN(TMP_SP) | (offs >> 5)));
+ offs += 1 << 15;
+ continue;
+ }
+ FAIL_IF(push_inst(compiler, LDP | RT(prev) | RT2(i) | RN(TMP_SP) | offs));
+ offs += 2 << 15;
+ prev = -1;
+ }
+
+ SLJIT_ASSERT(prev == -1);
+
+ if (compiler->local_size <= (63 * sizeof(sljit_sw))) {
+ FAIL_IF(push_inst(compiler, LDP_PST | 29 | RT2(TMP_LR)
+ | RN(TMP_SP) | (((local_size >> 3) & 0x7f) << 15)));
+ } else if (saved_regs_size > 0) {
+ FAIL_IF(push_inst(compiler, ADDI | RD(TMP_SP) | RN(TMP_SP) | (saved_regs_size << 10)));
+ }
+
+ FAIL_IF(push_inst(compiler, RET | RN(TMP_LR)));
+ return SLJIT_SUCCESS;
+}
+
+/* --------------------------------------------------------------------- */
+/* Operators */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op)
+{
+ sljit_ins inv_bits = (op & SLJIT_I32_OP) ? (1 << 31) : 0;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op0(compiler, op));
+
+ op = GET_OPCODE(op);
+ switch (op) {
+ case SLJIT_BREAKPOINT:
+ return push_inst(compiler, BRK);
+ case SLJIT_NOP:
+ return push_inst(compiler, NOP);
+ case SLJIT_LMUL_UW:
+ case SLJIT_LMUL_SW:
+ FAIL_IF(push_inst(compiler, ORR | RD(TMP_REG1) | RN(TMP_ZERO) | RM(SLJIT_R0)));
+ FAIL_IF(push_inst(compiler, MADD | RD(SLJIT_R0) | RN(SLJIT_R0) | RM(SLJIT_R1) | RT2(TMP_ZERO)));
+ return push_inst(compiler, (op == SLJIT_LMUL_UW ? UMULH : SMULH) | RD(SLJIT_R1) | RN(TMP_REG1) | RM(SLJIT_R1));
+ case SLJIT_DIVMOD_UW:
+ case SLJIT_DIVMOD_SW:
+ FAIL_IF(push_inst(compiler, (ORR ^ inv_bits) | RD(TMP_REG1) | RN(TMP_ZERO) | RM(SLJIT_R0)));
+ FAIL_IF(push_inst(compiler, ((op == SLJIT_DIVMOD_UW ? UDIV : SDIV) ^ inv_bits) | RD(SLJIT_R0) | RN(SLJIT_R0) | RM(SLJIT_R1)));
+ FAIL_IF(push_inst(compiler, (MADD ^ inv_bits) | RD(SLJIT_R1) | RN(SLJIT_R0) | RM(SLJIT_R1) | RT2(TMP_ZERO)));
+ return push_inst(compiler, (SUB ^ inv_bits) | RD(SLJIT_R1) | RN(TMP_REG1) | RM(SLJIT_R1));
+ case SLJIT_DIV_UW:
+ case SLJIT_DIV_SW:
+ return push_inst(compiler, ((op == SLJIT_DIV_UW ? UDIV : SDIV) ^ inv_bits) | RD(SLJIT_R0) | RN(SLJIT_R0) | RM(SLJIT_R1));
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r, flags, mem_flags;
+ sljit_s32 op_flags = GET_ALL_FLAGS(op);
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+
+ dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1;
+
+ op = GET_OPCODE(op);
+ if (op >= SLJIT_MOV && op <= SLJIT_MOVU_P) {
+ switch (op) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_P:
+ flags = WORD_SIZE;
+ break;
+ case SLJIT_MOV_U8:
+ flags = BYTE_SIZE;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_u8)srcw;
+ break;
+ case SLJIT_MOV_S8:
+ flags = BYTE_SIZE | SIGNED;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_s8)srcw;
+ break;
+ case SLJIT_MOV_U16:
+ flags = HALF_SIZE;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_u16)srcw;
+ break;
+ case SLJIT_MOV_S16:
+ flags = HALF_SIZE | SIGNED;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_s16)srcw;
+ break;
+ case SLJIT_MOV_U32:
+ flags = INT_SIZE;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_u32)srcw;
+ break;
+ case SLJIT_MOV_S32:
+ flags = INT_SIZE | SIGNED;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_s32)srcw;
+ break;
+ case SLJIT_MOVU:
+ case SLJIT_MOVU_P:
+ flags = WORD_SIZE | UPDATE;
+ break;
+ case SLJIT_MOVU_U8:
+ flags = BYTE_SIZE | UPDATE;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_u8)srcw;
+ break;
+ case SLJIT_MOVU_S8:
+ flags = BYTE_SIZE | SIGNED | UPDATE;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_s8)srcw;
+ break;
+ case SLJIT_MOVU_U16:
+ flags = HALF_SIZE | UPDATE;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_u16)srcw;
+ break;
+ case SLJIT_MOVU_S16:
+ flags = HALF_SIZE | SIGNED | UPDATE;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_s16)srcw;
+ break;
+ case SLJIT_MOVU_U32:
+ flags = INT_SIZE | UPDATE;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_u32)srcw;
+ break;
+ case SLJIT_MOVU_S32:
+ flags = INT_SIZE | SIGNED | UPDATE;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_s32)srcw;
+ break;
+ default:
+ SLJIT_ASSERT_STOP();
+ flags = 0;
+ break;
+ }
+
+ if (src & SLJIT_IMM)
+ FAIL_IF(emit_op_imm(compiler, SLJIT_MOV | ARG2_IMM, dst_r, TMP_REG1, srcw));
+ else if (src & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, flags, dst_r, src, srcw))
+ FAIL_IF(compiler->error);
+ else
+ FAIL_IF(getput_arg(compiler, flags, dst_r, src, srcw, dst, dstw));
+ } else {
+ if (dst_r != TMP_REG1)
+ return emit_op_imm(compiler, op | ((op_flags & SLJIT_I32_OP) ? INT_OP : 0), dst_r, TMP_REG1, src);
+ dst_r = src;
+ }
+
+ if (dst & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, flags | STORE, dst_r, dst, dstw))
+ return compiler->error;
+ else
+ return getput_arg(compiler, flags | STORE, dst_r, dst, dstw, 0, 0);
+ }
+ return SLJIT_SUCCESS;
+ }
+
+ flags = GET_FLAGS(op_flags) ? SET_FLAGS : 0;
+ mem_flags = WORD_SIZE;
+ if (op_flags & SLJIT_I32_OP) {
+ flags |= INT_OP;
+ mem_flags = INT_SIZE;
+ }
+
+ if (dst == SLJIT_UNUSED)
+ flags |= UNUSED_RETURN;
+
+ if (src & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, mem_flags, TMP_REG2, src, srcw))
+ FAIL_IF(compiler->error);
+ else
+ FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG2, src, srcw, dst, dstw));
+ src = TMP_REG2;
+ }
+
+ if (src & SLJIT_IMM) {
+ flags |= ARG2_IMM;
+ if (op_flags & SLJIT_I32_OP)
+ srcw = (sljit_s32)srcw;
+ } else
+ srcw = src;
+
+ emit_op_imm(compiler, flags | op, dst_r, TMP_REG1, srcw);
+
+ if (dst & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, mem_flags | STORE, dst_r, dst, dstw))
+ return compiler->error;
+ else
+ return getput_arg(compiler, mem_flags | STORE, dst_r, dst, dstw, 0, 0);
+ }
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_s32 dst_r, flags, mem_flags;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+
+ dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1;
+ flags = GET_FLAGS(op) ? SET_FLAGS : 0;
+ mem_flags = WORD_SIZE;
+ if (op & SLJIT_I32_OP) {
+ flags |= INT_OP;
+ mem_flags = INT_SIZE;
+ }
+
+ if (dst == SLJIT_UNUSED)
+ flags |= UNUSED_RETURN;
+
+ if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, mem_flags | STORE | ARG_TEST, TMP_REG1, dst, dstw))
+ flags |= SLOW_DEST;
+
+ if (src1 & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, mem_flags, TMP_REG1, src1, src1w))
+ FAIL_IF(compiler->error);
+ else
+ flags |= SLOW_SRC1;
+ }
+ if (src2 & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, mem_flags, TMP_REG2, src2, src2w))
+ FAIL_IF(compiler->error);
+ else
+ flags |= SLOW_SRC2;
+ }
+
+ if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) {
+ if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
+ FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG2, src2, src2w, src1, src1w));
+ FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG1, src1, src1w, dst, dstw));
+ }
+ else {
+ FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG1, src1, src1w, src2, src2w));
+ FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG2, src2, src2w, dst, dstw));
+ }
+ }
+ else if (flags & SLOW_SRC1)
+ FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG1, src1, src1w, dst, dstw));
+ else if (flags & SLOW_SRC2)
+ FAIL_IF(getput_arg(compiler, mem_flags, TMP_REG2, src2, src2w, dst, dstw));
+
+ if (src1 & SLJIT_MEM)
+ src1 = TMP_REG1;
+ if (src2 & SLJIT_MEM)
+ src2 = TMP_REG2;
+
+ if (src1 & SLJIT_IMM)
+ flags |= ARG1_IMM;
+ else
+ src1w = src1;
+ if (src2 & SLJIT_IMM)
+ flags |= ARG2_IMM;
+ else
+ src2w = src2;
+
+ emit_op_imm(compiler, flags | GET_OPCODE(op), dst_r, src1w, src2w);
+
+ if (dst & SLJIT_MEM) {
+ if (!(flags & SLOW_DEST)) {
+ getput_arg_fast(compiler, mem_flags | STORE, dst_r, dst, dstw);
+ return compiler->error;
+ }
+ return getput_arg(compiler, mem_flags | STORE, TMP_REG1, dst, dstw, 0, 0);
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_register_index(sljit_s32 reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_register_index(reg));
+ return reg_map[reg];
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_float_register_index(reg));
+ return reg;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler,
+ void *instruction, sljit_s32 size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_custom(compiler, instruction, size));
+
+ return push_inst(compiler, *(sljit_ins*)instruction);
+}
+
+/* --------------------------------------------------------------------- */
+/* Floating point operators */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_is_fpu_available(void)
+{
+#ifdef SLJIT_IS_FPU_AVAILABLE
+ return SLJIT_IS_FPU_AVAILABLE;
+#else
+ /* Available by default. */
+ return 1;
+#endif
+}
+
+static sljit_s32 emit_fop_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw)
+{
+ sljit_u32 shift = MEM_SIZE_SHIFT(flags);
+ sljit_ins ins_bits = (shift << 30);
+ sljit_s32 other_r;
+ sljit_sw diff;
+
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+
+ if (!(flags & STORE))
+ ins_bits |= 1 << 22;
+
+ if (arg & OFFS_REG_MASK) {
+ argw &= 3;
+ if (!argw || argw == shift)
+ return push_inst(compiler, STR_FR | ins_bits | VT(reg)
+ | RN(arg & REG_MASK) | RM(OFFS_REG(arg)) | (argw ? (1 << 12) : 0));
+ other_r = OFFS_REG(arg);
+ arg &= REG_MASK;
+ FAIL_IF(push_inst(compiler, ADD | RD(TMP_REG1) | RN(arg) | RM(other_r) | (argw << 10)));
+ arg = TMP_REG1;
+ argw = 0;
+ }
+
+ arg &= REG_MASK;
+ if (arg && argw >= 0 && ((argw >> shift) <= 0xfff) && (argw & ((1 << shift) - 1)) == 0)
+ return push_inst(compiler, STR_FI | ins_bits | VT(reg) | RN(arg) | (argw << (10 - shift)));
+
+ if (arg && argw <= 255 && argw >= -256)
+ return push_inst(compiler, STUR_FI | ins_bits | VT(reg) | RN(arg) | ((argw & 0x1ff) << 12));
+
+ /* Slow cases */
+ if (compiler->cache_arg == SLJIT_MEM && argw != compiler->cache_argw) {
+ diff = argw - compiler->cache_argw;
+ if (!arg && diff <= 255 && diff >= -256)
+ return push_inst(compiler, STUR_FI | ins_bits | VT(reg) | RN(TMP_REG3) | ((diff & 0x1ff) << 12));
+ if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, argw - compiler->cache_argw) != SLJIT_ERR_UNSUPPORTED) {
+ FAIL_IF(compiler->error);
+ compiler->cache_argw = argw;
+ }
+ }
+
+ if (compiler->cache_arg != SLJIT_MEM || argw != compiler->cache_argw) {
+ compiler->cache_arg = SLJIT_MEM;
+ compiler->cache_argw = argw;
+ FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
+ }
+
+ if (arg & REG_MASK)
+ return push_inst(compiler, STR_FR | ins_bits | VT(reg) | RN(arg) | RM(TMP_REG3));
+ return push_inst(compiler, STR_FI | ins_bits | VT(reg) | RN(TMP_REG3));
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1;
+ sljit_ins inv_bits = (op & SLJIT_F32_OP) ? (1 << 22) : 0;
+
+ if (GET_OPCODE(op) == SLJIT_CONV_S32_FROM_F64)
+ inv_bits |= (1 << 31);
+
+ if (src & SLJIT_MEM) {
+ emit_fop_mem(compiler, (op & SLJIT_F32_OP) ? INT_SIZE : WORD_SIZE, TMP_FREG1, src, srcw);
+ src = TMP_FREG1;
+ }
+
+ FAIL_IF(push_inst(compiler, (FCVTZS ^ inv_bits) | RD(dst_r) | VN(src)));
+
+ if (dst_r == TMP_REG1 && dst != SLJIT_UNUSED)
+ return emit_op_mem(compiler, ((GET_OPCODE(op) == SLJIT_CONV_S32_FROM_F64) ? INT_SIZE : WORD_SIZE) | STORE, TMP_REG1, dst, dstw);
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1;
+ sljit_ins inv_bits = (op & SLJIT_F32_OP) ? (1 << 22) : 0;
+
+ if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32)
+ inv_bits |= (1 << 31);
+
+ if (src & SLJIT_MEM) {
+ emit_op_mem(compiler, ((GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32) ? INT_SIZE : WORD_SIZE), TMP_REG1, src, srcw);
+ src = TMP_REG1;
+ } else if (src & SLJIT_IMM) {
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32)
+ srcw = (sljit_s32)srcw;
+#endif
+ FAIL_IF(load_immediate(compiler, TMP_REG1, srcw));
+ src = TMP_REG1;
+ }
+
+ FAIL_IF(push_inst(compiler, (SCVTF ^ inv_bits) | VD(dst_r) | RN(src)));
+
+ if (dst & SLJIT_MEM)
+ return emit_fop_mem(compiler, ((op & SLJIT_F32_OP) ? INT_SIZE : WORD_SIZE) | STORE, TMP_FREG1, dst, dstw);
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_s32 mem_flags = (op & SLJIT_F32_OP) ? INT_SIZE : WORD_SIZE;
+ sljit_ins inv_bits = (op & SLJIT_F32_OP) ? (1 << 22) : 0;
+
+ if (src1 & SLJIT_MEM) {
+ emit_fop_mem(compiler, mem_flags, TMP_FREG1, src1, src1w);
+ src1 = TMP_FREG1;
+ }
+
+ if (src2 & SLJIT_MEM) {
+ emit_fop_mem(compiler, mem_flags, TMP_FREG2, src2, src2w);
+ src2 = TMP_FREG2;
+ }
+
+ return push_inst(compiler, (FCMP ^ inv_bits) | VN(src1) | VM(src2));
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r, mem_flags = (op & SLJIT_F32_OP) ? INT_SIZE : WORD_SIZE;
+ sljit_ins inv_bits;
+
+ CHECK_ERROR();
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+
+ SLJIT_COMPILE_ASSERT((INT_SIZE ^ 0x100) == WORD_SIZE, must_be_one_bit_difference);
+ SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw);
+
+ inv_bits = (op & SLJIT_F32_OP) ? (1 << 22) : 0;
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1;
+
+ if (src & SLJIT_MEM) {
+ emit_fop_mem(compiler, (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32) ? (mem_flags ^ 0x100) : mem_flags, dst_r, src, srcw);
+ src = dst_r;
+ }
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_MOV_F64:
+ if (src != dst_r) {
+ if (dst_r != TMP_FREG1)
+ FAIL_IF(push_inst(compiler, (FMOV ^ inv_bits) | VD(dst_r) | VN(src)));
+ else
+ dst_r = src;
+ }
+ break;
+ case SLJIT_NEG_F64:
+ FAIL_IF(push_inst(compiler, (FNEG ^ inv_bits) | VD(dst_r) | VN(src)));
+ break;
+ case SLJIT_ABS_F64:
+ FAIL_IF(push_inst(compiler, (FABS ^ inv_bits) | VD(dst_r) | VN(src)));
+ break;
+ case SLJIT_CONV_F64_FROM_F32:
+ FAIL_IF(push_inst(compiler, FCVT | ((op & SLJIT_F32_OP) ? (1 << 22) : (1 << 15)) | VD(dst_r) | VN(src)));
+ break;
+ }
+
+ if (dst & SLJIT_MEM)
+ return emit_fop_mem(compiler, mem_flags | STORE, dst_r, dst, dstw);
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_s32 dst_r, mem_flags = (op & SLJIT_F32_OP) ? INT_SIZE : WORD_SIZE;
+ sljit_ins inv_bits = (op & SLJIT_F32_OP) ? (1 << 22) : 0;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1;
+ if (src1 & SLJIT_MEM) {
+ emit_fop_mem(compiler, mem_flags, TMP_FREG1, src1, src1w);
+ src1 = TMP_FREG1;
+ }
+ if (src2 & SLJIT_MEM) {
+ emit_fop_mem(compiler, mem_flags, TMP_FREG2, src2, src2w);
+ src2 = TMP_FREG2;
+ }
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_ADD_F64:
+ FAIL_IF(push_inst(compiler, (FADD ^ inv_bits) | VD(dst_r) | VN(src1) | VM(src2)));
+ break;
+ case SLJIT_SUB_F64:
+ FAIL_IF(push_inst(compiler, (FSUB ^ inv_bits) | VD(dst_r) | VN(src1) | VM(src2)));
+ break;
+ case SLJIT_MUL_F64:
+ FAIL_IF(push_inst(compiler, (FMUL ^ inv_bits) | VD(dst_r) | VN(src1) | VM(src2)));
+ break;
+ case SLJIT_DIV_F64:
+ FAIL_IF(push_inst(compiler, (FDIV ^ inv_bits) | VD(dst_r) | VN(src1) | VM(src2)));
+ break;
+ }
+
+ if (!(dst & SLJIT_MEM))
+ return SLJIT_SUCCESS;
+ return emit_fop_mem(compiler, mem_flags | STORE, TMP_FREG1, dst, dstw);
+}
+
+/* --------------------------------------------------------------------- */
+/* Other instructions */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ /* For UNUSED dst. Uncommon, but possible. */
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ if (FAST_IS_REG(dst))
+ return push_inst(compiler, ORR | RD(dst) | RN(TMP_ZERO) | RM(TMP_LR));
+
+ /* Memory. */
+ return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_LR, dst, dstw);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_return(compiler, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ if (FAST_IS_REG(src))
+ FAIL_IF(push_inst(compiler, ORR | RD(TMP_LR) | RN(TMP_ZERO) | RM(src)));
+ else if (src & SLJIT_MEM)
+ FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_LR, src, srcw));
+ else if (src & SLJIT_IMM)
+ FAIL_IF(load_immediate(compiler, TMP_LR, srcw));
+
+ return push_inst(compiler, RET | RN(TMP_LR));
+}
+
+/* --------------------------------------------------------------------- */
+/* Conditional instructions */
+/* --------------------------------------------------------------------- */
+
+static sljit_uw get_cc(sljit_s32 type)
+{
+ switch (type) {
+ case SLJIT_EQUAL:
+ case SLJIT_MUL_NOT_OVERFLOW:
+ case SLJIT_EQUAL_F64:
+ return 0x1;
+
+ case SLJIT_NOT_EQUAL:
+ case SLJIT_MUL_OVERFLOW:
+ case SLJIT_NOT_EQUAL_F64:
+ return 0x0;
+
+ case SLJIT_LESS:
+ case SLJIT_LESS_F64:
+ return 0x2;
+
+ case SLJIT_GREATER_EQUAL:
+ case SLJIT_GREATER_EQUAL_F64:
+ return 0x3;
+
+ case SLJIT_GREATER:
+ case SLJIT_GREATER_F64:
+ return 0x9;
+
+ case SLJIT_LESS_EQUAL:
+ case SLJIT_LESS_EQUAL_F64:
+ return 0x8;
+
+ case SLJIT_SIG_LESS:
+ return 0xa;
+
+ case SLJIT_SIG_GREATER_EQUAL:
+ return 0xb;
+
+ case SLJIT_SIG_GREATER:
+ return 0xd;
+
+ case SLJIT_SIG_LESS_EQUAL:
+ return 0xc;
+
+ case SLJIT_OVERFLOW:
+ case SLJIT_UNORDERED_F64:
+ return 0x7;
+
+ case SLJIT_NOT_OVERFLOW:
+ case SLJIT_ORDERED_F64:
+ return 0x6;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ return 0xe;
+ }
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
+{
+ struct sljit_label *label;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_label(compiler));
+
+ if (compiler->last_label && compiler->last_label->size == compiler->size)
+ return compiler->last_label;
+
+ label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label));
+ PTR_FAIL_IF(!label);
+ set_label(label, compiler);
+ return label;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_s32 type)
+{
+ struct sljit_jump *jump;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_jump(compiler, type));
+
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ PTR_FAIL_IF(!jump);
+ set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
+ type &= 0xff;
+
+ if (type < SLJIT_JUMP) {
+ jump->flags |= IS_COND;
+ PTR_FAIL_IF(push_inst(compiler, B_CC | (6 << 5) | get_cc(type)));
+ }
+ else if (type >= SLJIT_FAST_CALL)
+ jump->flags |= IS_BL;
+
+ PTR_FAIL_IF(emit_imm64_const(compiler, TMP_REG1, 0));
+ jump->addr = compiler->size;
+ PTR_FAIL_IF(push_inst(compiler, ((type >= SLJIT_FAST_CALL) ? BLR : BR) | RN(TMP_REG1)));
+
+ return jump;
+}
+
+static SLJIT_INLINE struct sljit_jump* emit_cmp_to0(struct sljit_compiler *compiler, sljit_s32 type,
+ sljit_s32 src, sljit_sw srcw)
+{
+ struct sljit_jump *jump;
+ sljit_ins inv_bits = (type & SLJIT_I32_OP) ? (1 << 31) : 0;
+
+ SLJIT_ASSERT((type & 0xff) == SLJIT_EQUAL || (type & 0xff) == SLJIT_NOT_EQUAL);
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ PTR_FAIL_IF(!jump);
+ set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
+ jump->flags |= IS_CBZ | IS_COND;
+
+ if (src & SLJIT_MEM) {
+ PTR_FAIL_IF(emit_op_mem(compiler, inv_bits ? INT_SIZE : WORD_SIZE, TMP_REG1, src, srcw));
+ src = TMP_REG1;
+ }
+ else if (src & SLJIT_IMM) {
+ PTR_FAIL_IF(load_immediate(compiler, TMP_REG1, srcw));
+ src = TMP_REG1;
+ }
+ SLJIT_ASSERT(FAST_IS_REG(src));
+
+ if ((type & 0xff) == SLJIT_EQUAL)
+ inv_bits |= 1 << 24;
+
+ PTR_FAIL_IF(push_inst(compiler, (CBZ ^ inv_bits) | (6 << 5) | RT(src)));
+ PTR_FAIL_IF(emit_imm64_const(compiler, TMP_REG1, 0));
+ jump->addr = compiler->size;
+ PTR_FAIL_IF(push_inst(compiler, BR | RN(TMP_REG1)));
+ return jump;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 src, sljit_sw srcw)
+{
+ struct sljit_jump *jump;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_ijump(compiler, type, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ /* In ARM, we don't need to touch the arguments. */
+ if (!(src & SLJIT_IMM)) {
+ if (src & SLJIT_MEM) {
+ FAIL_IF(emit_op_mem(compiler, WORD_SIZE, TMP_REG1, src, srcw));
+ src = TMP_REG1;
+ }
+ return push_inst(compiler, ((type >= SLJIT_FAST_CALL) ? BLR : BR) | RN(src));
+ }
+
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ FAIL_IF(!jump);
+ set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0));
+ jump->u.target = srcw;
+
+ FAIL_IF(emit_imm64_const(compiler, TMP_REG1, 0));
+ jump->addr = compiler->size;
+ return push_inst(compiler, ((type >= SLJIT_FAST_CALL) ? BLR : BR) | RN(TMP_REG1));
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw,
+ sljit_s32 type)
+{
+ sljit_s32 dst_r, flags, mem_flags;
+ sljit_ins cc;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ cc = get_cc(type & 0xff);
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
+
+ if (GET_OPCODE(op) < SLJIT_ADD) {
+ FAIL_IF(push_inst(compiler, CSINC | (cc << 12) | RD(dst_r) | RN(TMP_ZERO) | RM(TMP_ZERO)));
+ if (dst_r != TMP_REG1)
+ return SLJIT_SUCCESS;
+ return emit_op_mem(compiler, (GET_OPCODE(op) == SLJIT_MOV ? WORD_SIZE : INT_SIZE) | STORE, TMP_REG1, dst, dstw);
+ }
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ flags = GET_FLAGS(op) ? SET_FLAGS : 0;
+ mem_flags = WORD_SIZE;
+ if (op & SLJIT_I32_OP) {
+ flags |= INT_OP;
+ mem_flags = INT_SIZE;
+ }
+
+ if (src & SLJIT_MEM) {
+ FAIL_IF(emit_op_mem2(compiler, mem_flags, TMP_REG1, src, srcw, dst, dstw));
+ src = TMP_REG1;
+ srcw = 0;
+ } else if (src & SLJIT_IMM)
+ flags |= ARG1_IMM;
+
+ FAIL_IF(push_inst(compiler, CSINC | (cc << 12) | RD(TMP_REG2) | RN(TMP_ZERO) | RM(TMP_ZERO)));
+ emit_op_imm(compiler, flags | GET_OPCODE(op), dst_r, src, TMP_REG2);
+
+ if (dst_r != TMP_REG1)
+ return SLJIT_SUCCESS;
+ return emit_op_mem2(compiler, mem_flags | STORE, TMP_REG1, dst, dstw, 0, 0);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value)
+{
+ struct sljit_const *const_;
+ sljit_s32 dst_r;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const));
+ PTR_FAIL_IF(!const_);
+ set_const(const_, compiler);
+
+ dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1;
+ PTR_FAIL_IF(emit_imm64_const(compiler, dst_r, init_value));
+
+ if (dst & SLJIT_MEM)
+ PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw));
+ return const_;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset)
+{
+ sljit_ins* inst = (sljit_ins*)addr;
+ modify_imm64_const(inst, new_target);
+ inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 4);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset)
+{
+ sljit_ins* inst = (sljit_ins*)addr;
+ modify_imm64_const(inst, new_constant);
+ inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 4);
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeARM_T2_32.c b/thirdparty/pcre2/src/sljit/sljitNativeARM_T2_32.c
new file mode 100644
index 0000000000..95afc5231f
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativeARM_T2_32.c
@@ -0,0 +1,2102 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+SLJIT_API_FUNC_ATTRIBUTE const char* sljit_get_platform_name(void)
+{
+ return "ARM-Thumb2" SLJIT_CPUINFO;
+}
+
+/* Length of an instruction word. */
+typedef sljit_u32 sljit_ins;
+
+/* Last register + 1. */
+#define TMP_REG1 (SLJIT_NUMBER_OF_REGISTERS + 2)
+#define TMP_REG2 (SLJIT_NUMBER_OF_REGISTERS + 3)
+#define TMP_REG3 (SLJIT_NUMBER_OF_REGISTERS + 4)
+#define TMP_PC (SLJIT_NUMBER_OF_REGISTERS + 5)
+
+#define TMP_FREG1 (0)
+#define TMP_FREG2 (SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1)
+
+/* See sljit_emit_enter and sljit_emit_op0 if you want to change them. */
+static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 6] = {
+ 0, 0, 1, 2, 12, 11, 10, 9, 8, 7, 6, 5, 13, 3, 4, 14, 15
+};
+
+#define COPY_BITS(src, from, to, bits) \
+ ((from >= to ? (src >> (from - to)) : (src << (to - from))) & (((1 << bits) - 1) << to))
+
+/* Thumb16 encodings. */
+#define RD3(rd) (reg_map[rd])
+#define RN3(rn) (reg_map[rn] << 3)
+#define RM3(rm) (reg_map[rm] << 6)
+#define RDN3(rdn) (reg_map[rdn] << 8)
+#define IMM3(imm) (imm << 6)
+#define IMM8(imm) (imm)
+
+/* Thumb16 helpers. */
+#define SET_REGS44(rd, rn) \
+ ((reg_map[rn] << 3) | (reg_map[rd] & 0x7) | ((reg_map[rd] & 0x8) << 4))
+#define IS_2_LO_REGS(reg1, reg2) \
+ (reg_map[reg1] <= 7 && reg_map[reg2] <= 7)
+#define IS_3_LO_REGS(reg1, reg2, reg3) \
+ (reg_map[reg1] <= 7 && reg_map[reg2] <= 7 && reg_map[reg3] <= 7)
+
+/* Thumb32 encodings. */
+#define RD4(rd) (reg_map[rd] << 8)
+#define RN4(rn) (reg_map[rn] << 16)
+#define RM4(rm) (reg_map[rm])
+#define RT4(rt) (reg_map[rt] << 12)
+#define DD4(dd) ((dd) << 12)
+#define DN4(dn) ((dn) << 16)
+#define DM4(dm) (dm)
+#define IMM5(imm) \
+ (COPY_BITS(imm, 2, 12, 3) | ((imm & 0x3) << 6))
+#define IMM12(imm) \
+ (COPY_BITS(imm, 11, 26, 1) | COPY_BITS(imm, 8, 12, 3) | (imm & 0xff))
+
+/* --------------------------------------------------------------------- */
+/* Instrucion forms */
+/* --------------------------------------------------------------------- */
+
+/* dot '.' changed to _
+ I immediate form (possibly followed by number of immediate bits). */
+#define ADCI 0xf1400000
+#define ADCS 0x4140
+#define ADC_W 0xeb400000
+#define ADD 0x4400
+#define ADDS 0x1800
+#define ADDSI3 0x1c00
+#define ADDSI8 0x3000
+#define ADD_W 0xeb000000
+#define ADDWI 0xf2000000
+#define ADD_SP 0xb000
+#define ADD_W 0xeb000000
+#define ADD_WI 0xf1000000
+#define ANDI 0xf0000000
+#define ANDS 0x4000
+#define AND_W 0xea000000
+#define ASRS 0x4100
+#define ASRSI 0x1000
+#define ASR_W 0xfa40f000
+#define ASR_WI 0xea4f0020
+#define BICI 0xf0200000
+#define BKPT 0xbe00
+#define BLX 0x4780
+#define BX 0x4700
+#define CLZ 0xfab0f080
+#define CMPI 0x2800
+#define CMP_W 0xebb00f00
+#define EORI 0xf0800000
+#define EORS 0x4040
+#define EOR_W 0xea800000
+#define IT 0xbf00
+#define LSLS 0x4080
+#define LSLSI 0x0000
+#define LSL_W 0xfa00f000
+#define LSL_WI 0xea4f0000
+#define LSRS 0x40c0
+#define LSRSI 0x0800
+#define LSR_W 0xfa20f000
+#define LSR_WI 0xea4f0010
+#define MOV 0x4600
+#define MOVS 0x0000
+#define MOVSI 0x2000
+#define MOVT 0xf2c00000
+#define MOVW 0xf2400000
+#define MOV_W 0xea4f0000
+#define MOV_WI 0xf04f0000
+#define MUL 0xfb00f000
+#define MVNS 0x43c0
+#define MVN_W 0xea6f0000
+#define MVN_WI 0xf06f0000
+#define NOP 0xbf00
+#define ORNI 0xf0600000
+#define ORRI 0xf0400000
+#define ORRS 0x4300
+#define ORR_W 0xea400000
+#define POP 0xbc00
+#define POP_W 0xe8bd0000
+#define PUSH 0xb400
+#define PUSH_W 0xe92d0000
+#define RSB_WI 0xf1c00000
+#define RSBSI 0x4240
+#define SBCI 0xf1600000
+#define SBCS 0x4180
+#define SBC_W 0xeb600000
+#define SMULL 0xfb800000
+#define STR_SP 0x9000
+#define SUBS 0x1a00
+#define SUBSI3 0x1e00
+#define SUBSI8 0x3800
+#define SUB_W 0xeba00000
+#define SUBWI 0xf2a00000
+#define SUB_SP 0xb080
+#define SUB_WI 0xf1a00000
+#define SXTB 0xb240
+#define SXTB_W 0xfa4ff080
+#define SXTH 0xb200
+#define SXTH_W 0xfa0ff080
+#define TST 0x4200
+#define UMULL 0xfba00000
+#define UXTB 0xb2c0
+#define UXTB_W 0xfa5ff080
+#define UXTH 0xb280
+#define UXTH_W 0xfa1ff080
+#define VABS_F32 0xeeb00ac0
+#define VADD_F32 0xee300a00
+#define VCMP_F32 0xeeb40a40
+#define VCVT_F32_S32 0xeeb80ac0
+#define VCVT_F64_F32 0xeeb70ac0
+#define VCVT_S32_F32 0xeebd0ac0
+#define VDIV_F32 0xee800a00
+#define VMOV_F32 0xeeb00a40
+#define VMOV 0xee000a10
+#define VMRS 0xeef1fa10
+#define VMUL_F32 0xee200a00
+#define VNEG_F32 0xeeb10a40
+#define VSTR_F32 0xed000a00
+#define VSUB_F32 0xee300a40
+
+static sljit_s32 push_inst16(struct sljit_compiler *compiler, sljit_ins inst)
+{
+ sljit_u16 *ptr;
+ SLJIT_ASSERT(!(inst & 0xffff0000));
+
+ ptr = (sljit_u16*)ensure_buf(compiler, sizeof(sljit_u16));
+ FAIL_IF(!ptr);
+ *ptr = inst;
+ compiler->size++;
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 push_inst32(struct sljit_compiler *compiler, sljit_ins inst)
+{
+ sljit_u16 *ptr = (sljit_u16*)ensure_buf(compiler, sizeof(sljit_ins));
+ FAIL_IF(!ptr);
+ *ptr++ = inst >> 16;
+ *ptr = inst;
+ compiler->size += 2;
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 emit_imm32_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_uw imm)
+{
+ FAIL_IF(push_inst32(compiler, MOVW | RD4(dst) |
+ COPY_BITS(imm, 12, 16, 4) | COPY_BITS(imm, 11, 26, 1) | COPY_BITS(imm, 8, 12, 3) | (imm & 0xff)));
+ return push_inst32(compiler, MOVT | RD4(dst) |
+ COPY_BITS(imm, 12 + 16, 16, 4) | COPY_BITS(imm, 11 + 16, 26, 1) | COPY_BITS(imm, 8 + 16, 12, 3) | ((imm & 0xff0000) >> 16));
+}
+
+static SLJIT_INLINE void modify_imm32_const(sljit_u16 *inst, sljit_uw new_imm)
+{
+ sljit_s32 dst = inst[1] & 0x0f00;
+ SLJIT_ASSERT(((inst[0] & 0xfbf0) == (MOVW >> 16)) && ((inst[2] & 0xfbf0) == (MOVT >> 16)) && dst == (inst[3] & 0x0f00));
+ inst[0] = (MOVW >> 16) | COPY_BITS(new_imm, 12, 0, 4) | COPY_BITS(new_imm, 11, 10, 1);
+ inst[1] = dst | COPY_BITS(new_imm, 8, 12, 3) | (new_imm & 0xff);
+ inst[2] = (MOVT >> 16) | COPY_BITS(new_imm, 12 + 16, 0, 4) | COPY_BITS(new_imm, 11 + 16, 10, 1);
+ inst[3] = dst | COPY_BITS(new_imm, 8 + 16, 12, 3) | ((new_imm & 0xff0000) >> 16);
+}
+
+static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_u16 *code_ptr, sljit_u16 *code, sljit_sw executable_offset)
+{
+ sljit_sw diff;
+
+ if (jump->flags & SLJIT_REWRITABLE_JUMP)
+ return 0;
+
+ if (jump->flags & JUMP_ADDR) {
+ /* Branch to ARM code is not optimized yet. */
+ if (!(jump->u.target & 0x1))
+ return 0;
+ diff = ((sljit_sw)jump->u.target - (sljit_sw)(code_ptr + 2) - executable_offset) >> 1;
+ }
+ else {
+ SLJIT_ASSERT(jump->flags & JUMP_LABEL);
+ diff = ((sljit_sw)(code + jump->u.label->size) - (sljit_sw)(code_ptr + 2)) >> 1;
+ }
+
+ if (jump->flags & IS_COND) {
+ SLJIT_ASSERT(!(jump->flags & IS_BL));
+ if (diff <= 127 && diff >= -128) {
+ jump->flags |= PATCH_TYPE1;
+ return 5;
+ }
+ if (diff <= 524287 && diff >= -524288) {
+ jump->flags |= PATCH_TYPE2;
+ return 4;
+ }
+ /* +1 comes from the prefix IT instruction. */
+ diff--;
+ if (diff <= 8388607 && diff >= -8388608) {
+ jump->flags |= PATCH_TYPE3;
+ return 3;
+ }
+ }
+ else if (jump->flags & IS_BL) {
+ if (diff <= 8388607 && diff >= -8388608) {
+ jump->flags |= PATCH_BL;
+ return 3;
+ }
+ }
+ else {
+ if (diff <= 1023 && diff >= -1024) {
+ jump->flags |= PATCH_TYPE4;
+ return 4;
+ }
+ if (diff <= 8388607 && diff >= -8388608) {
+ jump->flags |= PATCH_TYPE5;
+ return 3;
+ }
+ }
+
+ return 0;
+}
+
+static SLJIT_INLINE void set_jump_instruction(struct sljit_jump *jump, sljit_sw executable_offset)
+{
+ sljit_s32 type = (jump->flags >> 4) & 0xf;
+ sljit_sw diff;
+ sljit_u16 *jump_inst;
+ sljit_s32 s, j1, j2;
+
+ if (SLJIT_UNLIKELY(type == 0)) {
+ modify_imm32_const((sljit_u16*)jump->addr, (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target);
+ return;
+ }
+
+ if (jump->flags & JUMP_ADDR) {
+ SLJIT_ASSERT(jump->u.target & 0x1);
+ diff = ((sljit_sw)jump->u.target - (sljit_sw)(jump->addr + sizeof(sljit_u32)) - executable_offset) >> 1;
+ }
+ else {
+ SLJIT_ASSERT(jump->u.label->addr & 0x1);
+ diff = ((sljit_sw)(jump->u.label->addr) - (sljit_sw)(jump->addr + sizeof(sljit_u32)) - executable_offset) >> 1;
+ }
+ jump_inst = (sljit_u16*)jump->addr;
+
+ switch (type) {
+ case 1:
+ /* Encoding T1 of 'B' instruction */
+ SLJIT_ASSERT(diff <= 127 && diff >= -128 && (jump->flags & IS_COND));
+ jump_inst[0] = 0xd000 | (jump->flags & 0xf00) | (diff & 0xff);
+ return;
+ case 2:
+ /* Encoding T3 of 'B' instruction */
+ SLJIT_ASSERT(diff <= 524287 && diff >= -524288 && (jump->flags & IS_COND));
+ jump_inst[0] = 0xf000 | COPY_BITS(jump->flags, 8, 6, 4) | COPY_BITS(diff, 11, 0, 6) | COPY_BITS(diff, 19, 10, 1);
+ jump_inst[1] = 0x8000 | COPY_BITS(diff, 17, 13, 1) | COPY_BITS(diff, 18, 11, 1) | (diff & 0x7ff);
+ return;
+ case 3:
+ SLJIT_ASSERT(jump->flags & IS_COND);
+ *jump_inst++ = IT | ((jump->flags >> 4) & 0xf0) | 0x8;
+ diff--;
+ type = 5;
+ break;
+ case 4:
+ /* Encoding T2 of 'B' instruction */
+ SLJIT_ASSERT(diff <= 1023 && diff >= -1024 && !(jump->flags & IS_COND));
+ jump_inst[0] = 0xe000 | (diff & 0x7ff);
+ return;
+ }
+
+ SLJIT_ASSERT(diff <= 8388607 && diff >= -8388608);
+
+ /* Really complex instruction form for branches. */
+ s = (diff >> 23) & 0x1;
+ j1 = (~(diff >> 21) ^ s) & 0x1;
+ j2 = (~(diff >> 22) ^ s) & 0x1;
+ jump_inst[0] = 0xf000 | (s << 10) | COPY_BITS(diff, 11, 0, 10);
+ jump_inst[1] = (j1 << 13) | (j2 << 11) | (diff & 0x7ff);
+
+ /* The others have a common form. */
+ if (type == 5) /* Encoding T4 of 'B' instruction */
+ jump_inst[1] |= 0x9000;
+ else if (type == 6) /* Encoding T1 of 'BL' instruction */
+ jump_inst[1] |= 0xd000;
+ else
+ SLJIT_ASSERT_STOP();
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
+{
+ struct sljit_memory_fragment *buf;
+ sljit_u16 *code;
+ sljit_u16 *code_ptr;
+ sljit_u16 *buf_ptr;
+ sljit_u16 *buf_end;
+ sljit_uw half_count;
+ sljit_sw executable_offset;
+
+ struct sljit_label *label;
+ struct sljit_jump *jump;
+ struct sljit_const *const_;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_generate_code(compiler));
+ reverse_buf(compiler);
+
+ code = (sljit_u16*)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_u16));
+ PTR_FAIL_WITH_EXEC_IF(code);
+ buf = compiler->buf;
+
+ code_ptr = code;
+ half_count = 0;
+ executable_offset = SLJIT_EXEC_OFFSET(code);
+
+ label = compiler->labels;
+ jump = compiler->jumps;
+ const_ = compiler->consts;
+
+ do {
+ buf_ptr = (sljit_u16*)buf->memory;
+ buf_end = buf_ptr + (buf->used_size >> 1);
+ do {
+ *code_ptr = *buf_ptr++;
+ /* These structures are ordered by their address. */
+ SLJIT_ASSERT(!label || label->size >= half_count);
+ SLJIT_ASSERT(!jump || jump->addr >= half_count);
+ SLJIT_ASSERT(!const_ || const_->addr >= half_count);
+ if (label && label->size == half_count) {
+ label->addr = ((sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset)) | 0x1;
+ label->size = code_ptr - code;
+ label = label->next;
+ }
+ if (jump && jump->addr == half_count) {
+ jump->addr = (sljit_uw)code_ptr - ((jump->flags & IS_COND) ? 10 : 8);
+ code_ptr -= detect_jump_type(jump, code_ptr, code, executable_offset);
+ jump = jump->next;
+ }
+ if (const_ && const_->addr == half_count) {
+ const_->addr = (sljit_uw)code_ptr;
+ const_ = const_->next;
+ }
+ code_ptr ++;
+ half_count ++;
+ } while (buf_ptr < buf_end);
+
+ buf = buf->next;
+ } while (buf);
+
+ if (label && label->size == half_count) {
+ label->addr = ((sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset)) | 0x1;
+ label->size = code_ptr - code;
+ label = label->next;
+ }
+
+ SLJIT_ASSERT(!label);
+ SLJIT_ASSERT(!jump);
+ SLJIT_ASSERT(!const_);
+ SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size);
+
+ jump = compiler->jumps;
+ while (jump) {
+ set_jump_instruction(jump, executable_offset);
+ jump = jump->next;
+ }
+
+ compiler->error = SLJIT_ERR_COMPILED;
+ compiler->executable_offset = executable_offset;
+ compiler->executable_size = (code_ptr - code) * sizeof(sljit_u16);
+
+ code = (sljit_u16 *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset);
+ code_ptr = (sljit_u16 *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
+
+ SLJIT_CACHE_FLUSH(code, code_ptr);
+ /* Set thumb mode flag. */
+ return (void*)((sljit_uw)code | 0x1);
+}
+
+/* --------------------------------------------------------------------- */
+/* Core code generator functions. */
+/* --------------------------------------------------------------------- */
+
+#define INVALID_IMM 0x80000000
+static sljit_uw get_imm(sljit_uw imm)
+{
+ /* Thumb immediate form. */
+ sljit_s32 counter;
+
+ if (imm <= 0xff)
+ return imm;
+
+ if ((imm & 0xffff) == (imm >> 16)) {
+ /* Some special cases. */
+ if (!(imm & 0xff00))
+ return (1 << 12) | (imm & 0xff);
+ if (!(imm & 0xff))
+ return (2 << 12) | ((imm >> 8) & 0xff);
+ if ((imm & 0xff00) == ((imm & 0xff) << 8))
+ return (3 << 12) | (imm & 0xff);
+ }
+
+ /* Assembly optimization: count leading zeroes? */
+ counter = 8;
+ if (!(imm & 0xffff0000)) {
+ counter += 16;
+ imm <<= 16;
+ }
+ if (!(imm & 0xff000000)) {
+ counter += 8;
+ imm <<= 8;
+ }
+ if (!(imm & 0xf0000000)) {
+ counter += 4;
+ imm <<= 4;
+ }
+ if (!(imm & 0xc0000000)) {
+ counter += 2;
+ imm <<= 2;
+ }
+ if (!(imm & 0x80000000)) {
+ counter += 1;
+ imm <<= 1;
+ }
+ /* Since imm >= 128, this must be true. */
+ SLJIT_ASSERT(counter <= 31);
+
+ if (imm & 0x00ffffff)
+ return INVALID_IMM; /* Cannot be encoded. */
+
+ return ((imm >> 24) & 0x7f) | COPY_BITS(counter, 4, 26, 1) | COPY_BITS(counter, 1, 12, 3) | COPY_BITS(counter, 0, 7, 1);
+}
+
+static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, sljit_uw imm)
+{
+ sljit_uw tmp;
+
+ if (imm >= 0x10000) {
+ tmp = get_imm(imm);
+ if (tmp != INVALID_IMM)
+ return push_inst32(compiler, MOV_WI | RD4(dst) | tmp);
+ tmp = get_imm(~imm);
+ if (tmp != INVALID_IMM)
+ return push_inst32(compiler, MVN_WI | RD4(dst) | tmp);
+ }
+
+ /* set low 16 bits, set hi 16 bits to 0. */
+ FAIL_IF(push_inst32(compiler, MOVW | RD4(dst) |
+ COPY_BITS(imm, 12, 16, 4) | COPY_BITS(imm, 11, 26, 1) | COPY_BITS(imm, 8, 12, 3) | (imm & 0xff)));
+
+ /* set hi 16 bit if needed. */
+ if (imm >= 0x10000)
+ return push_inst32(compiler, MOVT | RD4(dst) |
+ COPY_BITS(imm, 12 + 16, 16, 4) | COPY_BITS(imm, 11 + 16, 26, 1) | COPY_BITS(imm, 8 + 16, 12, 3) | ((imm & 0xff0000) >> 16));
+ return SLJIT_SUCCESS;
+}
+
+#define ARG1_IMM 0x0010000
+#define ARG2_IMM 0x0020000
+#define KEEP_FLAGS 0x0040000
+/* SET_FLAGS must be 0x100000 as it is also the value of S bit (can be used for optimization). */
+#define SET_FLAGS 0x0100000
+#define UNUSED_RETURN 0x0200000
+#define SLOW_DEST 0x0400000
+#define SLOW_SRC1 0x0800000
+#define SLOW_SRC2 0x1000000
+
+static sljit_s32 emit_op_imm(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 dst, sljit_uw arg1, sljit_uw arg2)
+{
+ /* dst must be register, TMP_REG1
+ arg1 must be register, TMP_REG1, imm
+ arg2 must be register, TMP_REG2, imm */
+ sljit_s32 reg;
+ sljit_uw imm, nimm;
+
+ if (SLJIT_UNLIKELY((flags & (ARG1_IMM | ARG2_IMM)) == (ARG1_IMM | ARG2_IMM))) {
+ /* Both are immediates. */
+ flags &= ~ARG1_IMM;
+ FAIL_IF(load_immediate(compiler, TMP_REG1, arg1));
+ arg1 = TMP_REG1;
+ }
+
+ if (flags & (ARG1_IMM | ARG2_IMM)) {
+ reg = (flags & ARG2_IMM) ? arg1 : arg2;
+ imm = (flags & ARG2_IMM) ? arg2 : arg1;
+
+ switch (flags & 0xffff) {
+ case SLJIT_CLZ:
+ case SLJIT_MUL:
+ /* No form with immediate operand. */
+ break;
+ case SLJIT_MOV:
+ SLJIT_ASSERT(!(flags & SET_FLAGS) && (flags & ARG2_IMM) && arg1 == TMP_REG1);
+ return load_immediate(compiler, dst, imm);
+ case SLJIT_NOT:
+ if (!(flags & SET_FLAGS))
+ return load_immediate(compiler, dst, ~imm);
+ /* Since the flags should be set, we just fallback to the register mode.
+ Although some clever things could be done here, "NOT IMM" does not worth the efforts. */
+ break;
+ case SLJIT_ADD:
+ nimm = -imm;
+ if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(reg, dst)) {
+ if (imm <= 0x7)
+ return push_inst16(compiler, ADDSI3 | IMM3(imm) | RD3(dst) | RN3(reg));
+ if (nimm <= 0x7)
+ return push_inst16(compiler, SUBSI3 | IMM3(nimm) | RD3(dst) | RN3(reg));
+ if (reg == dst) {
+ if (imm <= 0xff)
+ return push_inst16(compiler, ADDSI8 | IMM8(imm) | RDN3(dst));
+ if (nimm <= 0xff)
+ return push_inst16(compiler, SUBSI8 | IMM8(nimm) | RDN3(dst));
+ }
+ }
+ if (!(flags & SET_FLAGS)) {
+ if (imm <= 0xfff)
+ return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(imm));
+ if (nimm <= 0xfff)
+ return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(nimm));
+ }
+ imm = get_imm(imm);
+ if (imm != INVALID_IMM)
+ return push_inst32(compiler, ADD_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
+ break;
+ case SLJIT_ADDC:
+ imm = get_imm(imm);
+ if (imm != INVALID_IMM)
+ return push_inst32(compiler, ADCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
+ break;
+ case SLJIT_SUB:
+ if (flags & ARG1_IMM) {
+ if (!(flags & KEEP_FLAGS) && imm == 0 && IS_2_LO_REGS(reg, dst))
+ return push_inst16(compiler, RSBSI | RD3(dst) | RN3(reg));
+ imm = get_imm(imm);
+ if (imm != INVALID_IMM)
+ return push_inst32(compiler, RSB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
+ break;
+ }
+ nimm = -imm;
+ if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(reg, dst)) {
+ if (imm <= 0x7)
+ return push_inst16(compiler, SUBSI3 | IMM3(imm) | RD3(dst) | RN3(reg));
+ if (nimm <= 0x7)
+ return push_inst16(compiler, ADDSI3 | IMM3(nimm) | RD3(dst) | RN3(reg));
+ if (reg == dst) {
+ if (imm <= 0xff)
+ return push_inst16(compiler, SUBSI8 | IMM8(imm) | RDN3(dst));
+ if (nimm <= 0xff)
+ return push_inst16(compiler, ADDSI8 | IMM8(nimm) | RDN3(dst));
+ }
+ if (imm <= 0xff && (flags & UNUSED_RETURN))
+ return push_inst16(compiler, CMPI | IMM8(imm) | RDN3(reg));
+ }
+ if (!(flags & SET_FLAGS)) {
+ if (imm <= 0xfff)
+ return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(imm));
+ if (nimm <= 0xfff)
+ return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(nimm));
+ }
+ imm = get_imm(imm);
+ if (imm != INVALID_IMM)
+ return push_inst32(compiler, SUB_WI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
+ break;
+ case SLJIT_SUBC:
+ if (flags & ARG1_IMM)
+ break;
+ imm = get_imm(imm);
+ if (imm != INVALID_IMM)
+ return push_inst32(compiler, SBCI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
+ break;
+ case SLJIT_AND:
+ nimm = get_imm(imm);
+ if (nimm != INVALID_IMM)
+ return push_inst32(compiler, ANDI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm);
+ imm = get_imm(imm);
+ if (imm != INVALID_IMM)
+ return push_inst32(compiler, BICI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
+ break;
+ case SLJIT_OR:
+ nimm = get_imm(imm);
+ if (nimm != INVALID_IMM)
+ return push_inst32(compiler, ORRI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | nimm);
+ imm = get_imm(imm);
+ if (imm != INVALID_IMM)
+ return push_inst32(compiler, ORNI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
+ break;
+ case SLJIT_XOR:
+ imm = get_imm(imm);
+ if (imm != INVALID_IMM)
+ return push_inst32(compiler, EORI | (flags & SET_FLAGS) | RD4(dst) | RN4(reg) | imm);
+ break;
+ case SLJIT_SHL:
+ case SLJIT_LSHR:
+ case SLJIT_ASHR:
+ if (flags & ARG1_IMM)
+ break;
+ imm &= 0x1f;
+ if (imm == 0) {
+ if (!(flags & SET_FLAGS))
+ return push_inst16(compiler, MOV | SET_REGS44(dst, reg));
+ if (IS_2_LO_REGS(dst, reg))
+ return push_inst16(compiler, MOVS | RD3(dst) | RN3(reg));
+ return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(dst) | RM4(reg));
+ }
+ switch (flags & 0xffff) {
+ case SLJIT_SHL:
+ if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg))
+ return push_inst16(compiler, LSLSI | RD3(dst) | RN3(reg) | (imm << 6));
+ return push_inst32(compiler, LSL_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm));
+ case SLJIT_LSHR:
+ if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg))
+ return push_inst16(compiler, LSRSI | RD3(dst) | RN3(reg) | (imm << 6));
+ return push_inst32(compiler, LSR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm));
+ default: /* SLJIT_ASHR */
+ if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg))
+ return push_inst16(compiler, ASRSI | RD3(dst) | RN3(reg) | (imm << 6));
+ return push_inst32(compiler, ASR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm));
+ }
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+
+ if (flags & ARG2_IMM) {
+ FAIL_IF(load_immediate(compiler, TMP_REG2, arg2));
+ arg2 = TMP_REG2;
+ }
+ else {
+ FAIL_IF(load_immediate(compiler, TMP_REG1, arg1));
+ arg1 = TMP_REG1;
+ }
+ }
+
+ /* Both arguments are registers. */
+ switch (flags & 0xffff) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_U32:
+ case SLJIT_MOV_S32:
+ case SLJIT_MOV_P:
+ case SLJIT_MOVU:
+ case SLJIT_MOVU_U32:
+ case SLJIT_MOVU_S32:
+ case SLJIT_MOVU_P:
+ SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
+ if (dst == arg2)
+ return SLJIT_SUCCESS;
+ return push_inst16(compiler, MOV | SET_REGS44(dst, arg2));
+ case SLJIT_MOV_U8:
+ case SLJIT_MOVU_U8:
+ SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
+ if (IS_2_LO_REGS(dst, arg2))
+ return push_inst16(compiler, UXTB | RD3(dst) | RN3(arg2));
+ return push_inst32(compiler, UXTB_W | RD4(dst) | RM4(arg2));
+ case SLJIT_MOV_S8:
+ case SLJIT_MOVU_S8:
+ SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
+ if (IS_2_LO_REGS(dst, arg2))
+ return push_inst16(compiler, SXTB | RD3(dst) | RN3(arg2));
+ return push_inst32(compiler, SXTB_W | RD4(dst) | RM4(arg2));
+ case SLJIT_MOV_U16:
+ case SLJIT_MOVU_U16:
+ SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
+ if (IS_2_LO_REGS(dst, arg2))
+ return push_inst16(compiler, UXTH | RD3(dst) | RN3(arg2));
+ return push_inst32(compiler, UXTH_W | RD4(dst) | RM4(arg2));
+ case SLJIT_MOV_S16:
+ case SLJIT_MOVU_S16:
+ SLJIT_ASSERT(!(flags & SET_FLAGS) && arg1 == TMP_REG1);
+ if (IS_2_LO_REGS(dst, arg2))
+ return push_inst16(compiler, SXTH | RD3(dst) | RN3(arg2));
+ return push_inst32(compiler, SXTH_W | RD4(dst) | RM4(arg2));
+ case SLJIT_NOT:
+ SLJIT_ASSERT(arg1 == TMP_REG1);
+ if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
+ return push_inst16(compiler, MVNS | RD3(dst) | RN3(arg2));
+ return push_inst32(compiler, MVN_W | (flags & SET_FLAGS) | RD4(dst) | RM4(arg2));
+ case SLJIT_CLZ:
+ SLJIT_ASSERT(arg1 == TMP_REG1);
+ FAIL_IF(push_inst32(compiler, CLZ | RN4(arg2) | RD4(dst) | RM4(arg2)));
+ if (flags & SET_FLAGS) {
+ if (reg_map[dst] <= 7)
+ return push_inst16(compiler, CMPI | RDN3(dst));
+ return push_inst32(compiler, ADD_WI | SET_FLAGS | RN4(dst) | RD4(dst));
+ }
+ return SLJIT_SUCCESS;
+ case SLJIT_ADD:
+ if (!(flags & KEEP_FLAGS) && IS_3_LO_REGS(dst, arg1, arg2))
+ return push_inst16(compiler, ADDS | RD3(dst) | RN3(arg1) | RM3(arg2));
+ if (dst == arg1 && !(flags & SET_FLAGS))
+ return push_inst16(compiler, ADD | SET_REGS44(dst, arg2));
+ return push_inst32(compiler, ADD_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
+ case SLJIT_ADDC:
+ if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
+ return push_inst16(compiler, ADCS | RD3(dst) | RN3(arg2));
+ return push_inst32(compiler, ADC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
+ case SLJIT_SUB:
+ if (!(flags & KEEP_FLAGS) && IS_3_LO_REGS(dst, arg1, arg2))
+ return push_inst16(compiler, SUBS | RD3(dst) | RN3(arg1) | RM3(arg2));
+ return push_inst32(compiler, SUB_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
+ case SLJIT_SUBC:
+ if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
+ return push_inst16(compiler, SBCS | RD3(dst) | RN3(arg2));
+ return push_inst32(compiler, SBC_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
+ case SLJIT_MUL:
+ if (!(flags & SET_FLAGS))
+ return push_inst32(compiler, MUL | RD4(dst) | RN4(arg1) | RM4(arg2));
+ SLJIT_ASSERT(reg_map[TMP_REG2] <= 7 && dst != TMP_REG2);
+ FAIL_IF(push_inst32(compiler, SMULL | RT4(dst) | RD4(TMP_REG2) | RN4(arg1) | RM4(arg2)));
+ /* cmp TMP_REG2, dst asr #31. */
+ return push_inst32(compiler, CMP_W | RN4(TMP_REG2) | 0x70e0 | RM4(dst));
+ case SLJIT_AND:
+ if (!(flags & KEEP_FLAGS)) {
+ if (dst == arg1 && IS_2_LO_REGS(dst, arg2))
+ return push_inst16(compiler, ANDS | RD3(dst) | RN3(arg2));
+ if ((flags & UNUSED_RETURN) && IS_2_LO_REGS(arg1, arg2))
+ return push_inst16(compiler, TST | RD3(arg1) | RN3(arg2));
+ }
+ return push_inst32(compiler, AND_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
+ case SLJIT_OR:
+ if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
+ return push_inst16(compiler, ORRS | RD3(dst) | RN3(arg2));
+ return push_inst32(compiler, ORR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
+ case SLJIT_XOR:
+ if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
+ return push_inst16(compiler, EORS | RD3(dst) | RN3(arg2));
+ return push_inst32(compiler, EOR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
+ case SLJIT_SHL:
+ if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
+ return push_inst16(compiler, LSLS | RD3(dst) | RN3(arg2));
+ return push_inst32(compiler, LSL_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
+ case SLJIT_LSHR:
+ if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
+ return push_inst16(compiler, LSRS | RD3(dst) | RN3(arg2));
+ return push_inst32(compiler, LSR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
+ case SLJIT_ASHR:
+ if (dst == arg1 && !(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, arg2))
+ return push_inst16(compiler, ASRS | RD3(dst) | RN3(arg2));
+ return push_inst32(compiler, ASR_W | (flags & SET_FLAGS) | RD4(dst) | RN4(arg1) | RM4(arg2));
+ }
+
+ SLJIT_ASSERT_STOP();
+ return SLJIT_SUCCESS;
+}
+
+#define STORE 0x01
+#define SIGNED 0x02
+
+#define WORD_SIZE 0x00
+#define BYTE_SIZE 0x04
+#define HALF_SIZE 0x08
+
+#define UPDATE 0x10
+#define ARG_TEST 0x20
+
+#define IS_WORD_SIZE(flags) (!(flags & (BYTE_SIZE | HALF_SIZE)))
+#define OFFSET_CHECK(imm, shift) (!(argw & ~(imm << shift)))
+
+/*
+ 1st letter:
+ w = word
+ b = byte
+ h = half
+
+ 2nd letter:
+ s = signed
+ u = unsigned
+
+ 3rd letter:
+ l = load
+ s = store
+*/
+
+static const sljit_ins sljit_mem16[12] = {
+/* w u l */ 0x5800 /* ldr */,
+/* w u s */ 0x5000 /* str */,
+/* w s l */ 0x5800 /* ldr */,
+/* w s s */ 0x5000 /* str */,
+
+/* b u l */ 0x5c00 /* ldrb */,
+/* b u s */ 0x5400 /* strb */,
+/* b s l */ 0x5600 /* ldrsb */,
+/* b s s */ 0x5400 /* strb */,
+
+/* h u l */ 0x5a00 /* ldrh */,
+/* h u s */ 0x5200 /* strh */,
+/* h s l */ 0x5e00 /* ldrsh */,
+/* h s s */ 0x5200 /* strh */,
+};
+
+static const sljit_ins sljit_mem16_imm5[12] = {
+/* w u l */ 0x6800 /* ldr imm5 */,
+/* w u s */ 0x6000 /* str imm5 */,
+/* w s l */ 0x6800 /* ldr imm5 */,
+/* w s s */ 0x6000 /* str imm5 */,
+
+/* b u l */ 0x7800 /* ldrb imm5 */,
+/* b u s */ 0x7000 /* strb imm5 */,
+/* b s l */ 0x0000 /* not allowed */,
+/* b s s */ 0x7000 /* strb imm5 */,
+
+/* h u l */ 0x8800 /* ldrh imm5 */,
+/* h u s */ 0x8000 /* strh imm5 */,
+/* h s l */ 0x0000 /* not allowed */,
+/* h s s */ 0x8000 /* strh imm5 */,
+};
+
+#define MEM_IMM8 0xc00
+#define MEM_IMM12 0x800000
+static const sljit_ins sljit_mem32[12] = {
+/* w u l */ 0xf8500000 /* ldr.w */,
+/* w u s */ 0xf8400000 /* str.w */,
+/* w s l */ 0xf8500000 /* ldr.w */,
+/* w s s */ 0xf8400000 /* str.w */,
+
+/* b u l */ 0xf8100000 /* ldrb.w */,
+/* b u s */ 0xf8000000 /* strb.w */,
+/* b s l */ 0xf9100000 /* ldrsb.w */,
+/* b s s */ 0xf8000000 /* strb.w */,
+
+/* h u l */ 0xf8300000 /* ldrh.w */,
+/* h u s */ 0xf8200000 /* strsh.w */,
+/* h s l */ 0xf9300000 /* ldrsh.w */,
+/* h s s */ 0xf8200000 /* strsh.w */,
+};
+
+/* Helper function. Dst should be reg + value, using at most 1 instruction, flags does not set. */
+static sljit_s32 emit_set_delta(struct sljit_compiler *compiler, sljit_s32 dst, sljit_s32 reg, sljit_sw value)
+{
+ if (value >= 0) {
+ if (value <= 0xfff)
+ return push_inst32(compiler, ADDWI | RD4(dst) | RN4(reg) | IMM12(value));
+ value = get_imm(value);
+ if (value != INVALID_IMM)
+ return push_inst32(compiler, ADD_WI | RD4(dst) | RN4(reg) | value);
+ }
+ else {
+ value = -value;
+ if (value <= 0xfff)
+ return push_inst32(compiler, SUBWI | RD4(dst) | RN4(reg) | IMM12(value));
+ value = get_imm(value);
+ if (value != INVALID_IMM)
+ return push_inst32(compiler, SUB_WI | RD4(dst) | RN4(reg) | value);
+ }
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+/* Can perform an operation using at most 1 instruction. */
+static sljit_s32 getput_arg_fast(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw)
+{
+ sljit_s32 other_r, shift;
+
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+
+ if (SLJIT_UNLIKELY(flags & UPDATE)) {
+ if ((arg & REG_MASK) && !(arg & OFFS_REG_MASK) && argw <= 0xff && argw >= -0xff) {
+ if (SLJIT_UNLIKELY(flags & ARG_TEST))
+ return 1;
+
+ flags &= ~UPDATE;
+ arg &= 0xf;
+ if (argw >= 0)
+ argw |= 0x200;
+ else {
+ argw = -argw;
+ }
+
+ SLJIT_ASSERT(argw >= 0 && (argw & 0xff) <= 0xff);
+ FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | MEM_IMM8 | RT4(reg) | RN4(arg) | 0x100 | argw));
+ return -1;
+ }
+ return 0;
+ }
+
+ if (SLJIT_UNLIKELY(arg & OFFS_REG_MASK)) {
+ if (SLJIT_UNLIKELY(flags & ARG_TEST))
+ return 1;
+
+ argw &= 0x3;
+ other_r = OFFS_REG(arg);
+ arg &= 0xf;
+
+ if (!argw && IS_3_LO_REGS(reg, arg, other_r))
+ FAIL_IF(push_inst16(compiler, sljit_mem16[flags] | RD3(reg) | RN3(arg) | RM3(other_r)));
+ else
+ FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(other_r) | (argw << 4)));
+ return -1;
+ }
+
+ if (!(arg & REG_MASK) || argw > 0xfff || argw < -0xff)
+ return 0;
+
+ if (SLJIT_UNLIKELY(flags & ARG_TEST))
+ return 1;
+
+ arg &= 0xf;
+ if (IS_2_LO_REGS(reg, arg) && sljit_mem16_imm5[flags]) {
+ shift = 3;
+ if (IS_WORD_SIZE(flags)) {
+ if (OFFSET_CHECK(0x1f, 2))
+ shift = 2;
+ }
+ else if (flags & BYTE_SIZE)
+ {
+ if (OFFSET_CHECK(0x1f, 0))
+ shift = 0;
+ }
+ else {
+ SLJIT_ASSERT(flags & HALF_SIZE);
+ if (OFFSET_CHECK(0x1f, 1))
+ shift = 1;
+ }
+
+ if (shift != 3) {
+ FAIL_IF(push_inst16(compiler, sljit_mem16_imm5[flags] | RD3(reg) | RN3(arg) | (argw << (6 - shift))));
+ return -1;
+ }
+ }
+
+ /* SP based immediate. */
+ if (SLJIT_UNLIKELY(arg == SLJIT_SP) && OFFSET_CHECK(0xff, 2) && IS_WORD_SIZE(flags) && reg_map[reg] <= 7) {
+ FAIL_IF(push_inst16(compiler, STR_SP | ((flags & STORE) ? 0 : 0x800) | RDN3(reg) | (argw >> 2)));
+ return -1;
+ }
+
+ if (argw >= 0)
+ FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(arg) | argw));
+ else
+ FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | MEM_IMM8 | RT4(reg) | RN4(arg) | -argw));
+ return -1;
+}
+
+/* see getput_arg below.
+ Note: can_cache is called only for binary operators. Those
+ operators always uses word arguments without write back. */
+static sljit_s32 can_cache(sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw)
+{
+ sljit_sw diff;
+ if ((arg & OFFS_REG_MASK) || !(next_arg & SLJIT_MEM))
+ return 0;
+
+ if (!(arg & REG_MASK)) {
+ diff = argw - next_argw;
+ if (diff <= 0xfff && diff >= -0xfff)
+ return 1;
+ return 0;
+ }
+
+ if (argw == next_argw)
+ return 1;
+
+ diff = argw - next_argw;
+ if (arg == next_arg && diff <= 0xfff && diff >= -0xfff)
+ return 1;
+
+ return 0;
+}
+
+/* Emit the necessary instructions. See can_cache above. */
+static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg,
+ sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw)
+{
+ sljit_s32 tmp_r, other_r;
+ sljit_sw diff;
+
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+ if (!(next_arg & SLJIT_MEM)) {
+ next_arg = 0;
+ next_argw = 0;
+ }
+
+ tmp_r = (flags & STORE) ? TMP_REG3 : reg;
+
+ if (SLJIT_UNLIKELY((flags & UPDATE) && (arg & REG_MASK))) {
+ /* Update only applies if a base register exists. */
+ /* There is no caching here. */
+ other_r = OFFS_REG(arg);
+ arg &= 0xf;
+ flags &= ~UPDATE;
+
+ if (!other_r) {
+ if (!(argw & ~0xfff)) {
+ FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(arg) | argw));
+ return push_inst32(compiler, ADDWI | RD4(arg) | RN4(arg) | IMM12(argw));
+ }
+
+ if (compiler->cache_arg == SLJIT_MEM) {
+ if (argw == compiler->cache_argw) {
+ other_r = TMP_REG3;
+ argw = 0;
+ }
+ else if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, argw - compiler->cache_argw) != SLJIT_ERR_UNSUPPORTED) {
+ FAIL_IF(compiler->error);
+ compiler->cache_argw = argw;
+ other_r = TMP_REG3;
+ argw = 0;
+ }
+ }
+
+ if (argw) {
+ FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
+ compiler->cache_arg = SLJIT_MEM;
+ compiler->cache_argw = argw;
+ other_r = TMP_REG3;
+ argw = 0;
+ }
+ }
+
+ argw &= 0x3;
+ if (!argw && IS_3_LO_REGS(reg, arg, other_r)) {
+ FAIL_IF(push_inst16(compiler, sljit_mem16[flags] | RD3(reg) | RN3(arg) | RM3(other_r)));
+ return push_inst16(compiler, ADD | SET_REGS44(arg, other_r));
+ }
+ FAIL_IF(push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(other_r) | (argw << 4)));
+ return push_inst32(compiler, ADD_W | RD4(arg) | RN4(arg) | RM4(other_r) | (argw << 6));
+ }
+ flags &= ~UPDATE;
+
+ SLJIT_ASSERT(!(arg & OFFS_REG_MASK));
+
+ if (compiler->cache_arg == arg) {
+ diff = argw - compiler->cache_argw;
+ if (!(diff & ~0xfff))
+ return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(TMP_REG3) | diff);
+ if (!((compiler->cache_argw - argw) & ~0xff))
+ return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM8 | RT4(reg) | RN4(TMP_REG3) | (compiler->cache_argw - argw));
+ if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, diff) != SLJIT_ERR_UNSUPPORTED) {
+ FAIL_IF(compiler->error);
+ return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(TMP_REG3) | 0);
+ }
+ }
+
+ next_arg = (arg & REG_MASK) && (arg == next_arg) && (argw != next_argw);
+ arg &= 0xf;
+ if (arg && compiler->cache_arg == SLJIT_MEM) {
+ if (compiler->cache_argw == argw)
+ return push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(TMP_REG3));
+ if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, argw - compiler->cache_argw) != SLJIT_ERR_UNSUPPORTED) {
+ FAIL_IF(compiler->error);
+ compiler->cache_argw = argw;
+ return push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(TMP_REG3));
+ }
+ }
+
+ compiler->cache_argw = argw;
+ if (next_arg && emit_set_delta(compiler, TMP_REG3, arg, argw) != SLJIT_ERR_UNSUPPORTED) {
+ FAIL_IF(compiler->error);
+ compiler->cache_arg = SLJIT_MEM | arg;
+ arg = 0;
+ }
+ else {
+ FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
+ compiler->cache_arg = SLJIT_MEM;
+
+ diff = argw - next_argw;
+ if (next_arg && diff <= 0xfff && diff >= -0xfff) {
+ FAIL_IF(push_inst16(compiler, ADD | SET_REGS44(TMP_REG3, arg)));
+ compiler->cache_arg = SLJIT_MEM | arg;
+ arg = 0;
+ }
+ }
+
+ if (arg)
+ return push_inst32(compiler, sljit_mem32[flags] | RT4(reg) | RN4(arg) | RM4(TMP_REG3));
+ return push_inst32(compiler, sljit_mem32[flags] | MEM_IMM12 | RT4(reg) | RN4(TMP_REG3) | 0);
+}
+
+static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw)
+{
+ if (getput_arg_fast(compiler, flags, reg, arg, argw))
+ return compiler->error;
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ return getput_arg(compiler, flags, reg, arg, argw, 0, 0);
+}
+
+static SLJIT_INLINE sljit_s32 emit_op_mem2(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg1, sljit_sw arg1w, sljit_s32 arg2, sljit_sw arg2w)
+{
+ if (getput_arg_fast(compiler, flags, reg, arg1, arg1w))
+ return compiler->error;
+ return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w);
+}
+
+/* --------------------------------------------------------------------- */
+/* Entry, exit */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ sljit_s32 size, i, tmp;
+ sljit_ins push;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ push = (1 << 4);
+
+ tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = SLJIT_S0; i >= tmp; i--)
+ push |= 1 << reg_map[i];
+
+ for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--)
+ push |= 1 << reg_map[i];
+
+ FAIL_IF((push & 0xff00)
+ ? push_inst32(compiler, PUSH_W | (1 << 14) | push)
+ : push_inst16(compiler, PUSH | (1 << 8) | push));
+
+ /* Stack must be aligned to 8 bytes: (LR, R4) */
+ size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 2);
+ local_size = ((size + local_size + 7) & ~7) - size;
+ compiler->local_size = local_size;
+ if (local_size > 0) {
+ if (local_size <= (127 << 2))
+ FAIL_IF(push_inst16(compiler, SUB_SP | (local_size >> 2)));
+ else
+ FAIL_IF(emit_op_imm(compiler, SLJIT_SUB | ARG2_IMM, SLJIT_SP, SLJIT_SP, local_size));
+ }
+
+ if (args >= 1)
+ FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_S0, SLJIT_R0)));
+ if (args >= 2)
+ FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_S1, SLJIT_R1)));
+ if (args >= 3)
+ FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(SLJIT_S2, SLJIT_R2)));
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ sljit_s32 size;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 2);
+ compiler->local_size = ((size + local_size + 7) & ~7) - size;
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 i, tmp;
+ sljit_ins pop;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_return(compiler, op, src, srcw));
+
+ FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
+
+ if (compiler->local_size > 0) {
+ if (compiler->local_size <= (127 << 2))
+ FAIL_IF(push_inst16(compiler, ADD_SP | (compiler->local_size >> 2)));
+ else
+ FAIL_IF(emit_op_imm(compiler, SLJIT_ADD | ARG2_IMM, SLJIT_SP, SLJIT_SP, compiler->local_size));
+ }
+
+ pop = (1 << 4);
+
+ tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = SLJIT_S0; i >= tmp; i--)
+ pop |= 1 << reg_map[i];
+
+ for (i = compiler->scratches; i >= SLJIT_FIRST_SAVED_REG; i--)
+ pop |= 1 << reg_map[i];
+
+ return (pop & 0xff00)
+ ? push_inst32(compiler, POP_W | (1 << 15) | pop)
+ : push_inst16(compiler, POP | (1 << 8) | pop);
+}
+
+/* --------------------------------------------------------------------- */
+/* Operators */
+/* --------------------------------------------------------------------- */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__GNUC__)
+extern unsigned int __aeabi_uidivmod(unsigned int numerator, int unsigned denominator);
+extern int __aeabi_idivmod(int numerator, int denominator);
+#else
+#error "Software divmod functions are needed"
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op)
+{
+ sljit_sw saved_reg_list[3];
+ sljit_sw saved_reg_count;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op0(compiler, op));
+
+ op = GET_OPCODE(op);
+ switch (op) {
+ case SLJIT_BREAKPOINT:
+ return push_inst16(compiler, BKPT);
+ case SLJIT_NOP:
+ return push_inst16(compiler, NOP);
+ case SLJIT_LMUL_UW:
+ case SLJIT_LMUL_SW:
+ return push_inst32(compiler, (op == SLJIT_LMUL_UW ? UMULL : SMULL)
+ | (reg_map[SLJIT_R1] << 8)
+ | (reg_map[SLJIT_R0] << 12)
+ | (reg_map[SLJIT_R0] << 16)
+ | reg_map[SLJIT_R1]);
+ case SLJIT_DIVMOD_UW:
+ case SLJIT_DIVMOD_SW:
+ case SLJIT_DIV_UW:
+ case SLJIT_DIV_SW:
+ SLJIT_COMPILE_ASSERT((SLJIT_DIVMOD_UW & 0x2) == 0 && SLJIT_DIV_UW - 0x2 == SLJIT_DIVMOD_UW, bad_div_opcode_assignments);
+ SLJIT_COMPILE_ASSERT(reg_map[2] == 1 && reg_map[3] == 2 && reg_map[4] == 12, bad_register_mapping);
+
+ saved_reg_count = 0;
+ if (compiler->scratches >= 4)
+ saved_reg_list[saved_reg_count++] = 12;
+ if (compiler->scratches >= 3)
+ saved_reg_list[saved_reg_count++] = 2;
+ if (op >= SLJIT_DIV_UW)
+ saved_reg_list[saved_reg_count++] = 1;
+
+ if (saved_reg_count > 0) {
+ FAIL_IF(push_inst32(compiler, 0xf84d0d00 | (saved_reg_count >= 3 ? 16 : 8)
+ | (saved_reg_list[0] << 12) /* str rX, [sp, #-8/-16]! */));
+ if (saved_reg_count >= 2) {
+ SLJIT_ASSERT(saved_reg_list[1] < 8);
+ FAIL_IF(push_inst16(compiler, 0x9001 | (saved_reg_list[1] << 8) /* str rX, [sp, #4] */));
+ }
+ if (saved_reg_count >= 3) {
+ SLJIT_ASSERT(saved_reg_list[2] < 8);
+ FAIL_IF(push_inst16(compiler, 0x9002 | (saved_reg_list[2] << 8) /* str rX, [sp, #8] */));
+ }
+ }
+
+#if defined(__GNUC__)
+ FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM,
+ ((op | 0x2) == SLJIT_DIV_UW ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod))));
+#else
+#error "Software divmod functions are needed"
+#endif
+
+ if (saved_reg_count > 0) {
+ if (saved_reg_count >= 3) {
+ SLJIT_ASSERT(saved_reg_list[2] < 8);
+ FAIL_IF(push_inst16(compiler, 0x9802 | (saved_reg_list[2] << 8) /* ldr rX, [sp, #8] */));
+ }
+ if (saved_reg_count >= 2) {
+ SLJIT_ASSERT(saved_reg_list[1] < 8);
+ FAIL_IF(push_inst16(compiler, 0x9801 | (saved_reg_list[1] << 8) /* ldr rX, [sp, #4] */));
+ }
+ return push_inst32(compiler, 0xf85d0b00 | (saved_reg_count >= 3 ? 16 : 8)
+ | (saved_reg_list[0] << 12) /* ldr rX, [sp], #8/16 */);
+ }
+ return SLJIT_SUCCESS;
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r, flags;
+ sljit_s32 op_flags = GET_ALL_FLAGS(op);
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+
+ dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1;
+
+ op = GET_OPCODE(op);
+ if (op >= SLJIT_MOV && op <= SLJIT_MOVU_P) {
+ switch (op) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_U32:
+ case SLJIT_MOV_S32:
+ case SLJIT_MOV_P:
+ flags = WORD_SIZE;
+ break;
+ case SLJIT_MOV_U8:
+ flags = BYTE_SIZE;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_u8)srcw;
+ break;
+ case SLJIT_MOV_S8:
+ flags = BYTE_SIZE | SIGNED;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_s8)srcw;
+ break;
+ case SLJIT_MOV_U16:
+ flags = HALF_SIZE;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_u16)srcw;
+ break;
+ case SLJIT_MOV_S16:
+ flags = HALF_SIZE | SIGNED;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_s16)srcw;
+ break;
+ case SLJIT_MOVU:
+ case SLJIT_MOVU_U32:
+ case SLJIT_MOVU_S32:
+ case SLJIT_MOVU_P:
+ flags = WORD_SIZE | UPDATE;
+ break;
+ case SLJIT_MOVU_U8:
+ flags = BYTE_SIZE | UPDATE;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_u8)srcw;
+ break;
+ case SLJIT_MOVU_S8:
+ flags = BYTE_SIZE | SIGNED | UPDATE;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_s8)srcw;
+ break;
+ case SLJIT_MOVU_U16:
+ flags = HALF_SIZE | UPDATE;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_u16)srcw;
+ break;
+ case SLJIT_MOVU_S16:
+ flags = HALF_SIZE | SIGNED | UPDATE;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_s16)srcw;
+ break;
+ default:
+ SLJIT_ASSERT_STOP();
+ flags = 0;
+ break;
+ }
+
+ if (src & SLJIT_IMM)
+ FAIL_IF(emit_op_imm(compiler, SLJIT_MOV | ARG2_IMM, dst_r, TMP_REG1, srcw));
+ else if (src & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, flags, dst_r, src, srcw))
+ FAIL_IF(compiler->error);
+ else
+ FAIL_IF(getput_arg(compiler, flags, dst_r, src, srcw, dst, dstw));
+ } else {
+ if (dst_r != TMP_REG1)
+ return emit_op_imm(compiler, op, dst_r, TMP_REG1, src);
+ dst_r = src;
+ }
+
+ if (dst & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, flags | STORE, dst_r, dst, dstw))
+ return compiler->error;
+ else
+ return getput_arg(compiler, flags | STORE, dst_r, dst, dstw, 0, 0);
+ }
+ return SLJIT_SUCCESS;
+ }
+
+ if (op == SLJIT_NEG) {
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
+ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ compiler->skip_checks = 1;
+#endif
+ return sljit_emit_op2(compiler, SLJIT_SUB | op_flags, dst, dstw, SLJIT_IMM, 0, src, srcw);
+ }
+
+ flags = (GET_FLAGS(op_flags) ? SET_FLAGS : 0) | ((op_flags & SLJIT_KEEP_FLAGS) ? KEEP_FLAGS : 0);
+ if (src & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, WORD_SIZE, TMP_REG2, src, srcw))
+ FAIL_IF(compiler->error);
+ else
+ FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src, srcw, dst, dstw));
+ src = TMP_REG2;
+ }
+
+ if (src & SLJIT_IMM)
+ flags |= ARG2_IMM;
+ else
+ srcw = src;
+
+ emit_op_imm(compiler, flags | op, dst_r, TMP_REG1, srcw);
+
+ if (dst & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, flags | STORE, dst_r, dst, dstw))
+ return compiler->error;
+ else
+ return getput_arg(compiler, flags | STORE, dst_r, dst, dstw, 0, 0);
+ }
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_s32 dst_r, flags;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+
+ dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1;
+ flags = (GET_FLAGS(op) ? SET_FLAGS : 0) | ((op & SLJIT_KEEP_FLAGS) ? KEEP_FLAGS : 0);
+
+ if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, WORD_SIZE | STORE | ARG_TEST, TMP_REG1, dst, dstw))
+ flags |= SLOW_DEST;
+
+ if (src1 & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, WORD_SIZE, TMP_REG1, src1, src1w))
+ FAIL_IF(compiler->error);
+ else
+ flags |= SLOW_SRC1;
+ }
+ if (src2 & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, WORD_SIZE, TMP_REG2, src2, src2w))
+ FAIL_IF(compiler->error);
+ else
+ flags |= SLOW_SRC2;
+ }
+
+ if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) {
+ if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
+ FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src2, src2w, src1, src1w));
+ FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG1, src1, src1w, dst, dstw));
+ }
+ else {
+ FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG1, src1, src1w, src2, src2w));
+ FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src2, src2w, dst, dstw));
+ }
+ }
+ else if (flags & SLOW_SRC1)
+ FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG1, src1, src1w, dst, dstw));
+ else if (flags & SLOW_SRC2)
+ FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src2, src2w, dst, dstw));
+
+ if (src1 & SLJIT_MEM)
+ src1 = TMP_REG1;
+ if (src2 & SLJIT_MEM)
+ src2 = TMP_REG2;
+
+ if (src1 & SLJIT_IMM)
+ flags |= ARG1_IMM;
+ else
+ src1w = src1;
+ if (src2 & SLJIT_IMM)
+ flags |= ARG2_IMM;
+ else
+ src2w = src2;
+
+ if (dst == SLJIT_UNUSED)
+ flags |= UNUSED_RETURN;
+
+ emit_op_imm(compiler, flags | GET_OPCODE(op), dst_r, src1w, src2w);
+
+ if (dst & SLJIT_MEM) {
+ if (!(flags & SLOW_DEST)) {
+ getput_arg_fast(compiler, WORD_SIZE | STORE, dst_r, dst, dstw);
+ return compiler->error;
+ }
+ return getput_arg(compiler, WORD_SIZE | STORE, TMP_REG1, dst, dstw, 0, 0);
+ }
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_register_index(sljit_s32 reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_register_index(reg));
+ return reg_map[reg];
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_float_register_index(reg));
+ return reg << 1;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler,
+ void *instruction, sljit_s32 size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_custom(compiler, instruction, size));
+
+ if (size == 2)
+ return push_inst16(compiler, *(sljit_u16*)instruction);
+ return push_inst32(compiler, *(sljit_ins*)instruction);
+}
+
+/* --------------------------------------------------------------------- */
+/* Floating point operators */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_is_fpu_available(void)
+{
+#ifdef SLJIT_IS_FPU_AVAILABLE
+ return SLJIT_IS_FPU_AVAILABLE;
+#else
+ /* Available by default. */
+ return 1;
+#endif
+}
+
+#define FPU_LOAD (1 << 20)
+
+static sljit_s32 emit_fop_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw)
+{
+ sljit_sw tmp;
+ sljit_uw imm;
+ sljit_sw inst = VSTR_F32 | (flags & (SLJIT_F32_OP | FPU_LOAD));
+
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+
+ /* Fast loads and stores. */
+ if (SLJIT_UNLIKELY(arg & OFFS_REG_MASK)) {
+ FAIL_IF(push_inst32(compiler, ADD_W | RD4(TMP_REG2) | RN4(arg & REG_MASK) | RM4(OFFS_REG(arg)) | ((argw & 0x3) << 6)));
+ arg = SLJIT_MEM | TMP_REG2;
+ argw = 0;
+ }
+
+ if ((arg & REG_MASK) && (argw & 0x3) == 0) {
+ if (!(argw & ~0x3fc))
+ return push_inst32(compiler, inst | 0x800000 | RN4(arg & REG_MASK) | DD4(reg) | (argw >> 2));
+ if (!(-argw & ~0x3fc))
+ return push_inst32(compiler, inst | RN4(arg & REG_MASK) | DD4(reg) | (-argw >> 2));
+ }
+
+ /* Slow cases */
+ SLJIT_ASSERT(!(arg & OFFS_REG_MASK));
+ if (compiler->cache_arg == arg) {
+ tmp = argw - compiler->cache_argw;
+ if (!(tmp & ~0x3fc))
+ return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG3) | DD4(reg) | (tmp >> 2));
+ if (!(-tmp & ~0x3fc))
+ return push_inst32(compiler, inst | RN4(TMP_REG3) | DD4(reg) | (-tmp >> 2));
+ if (emit_set_delta(compiler, TMP_REG3, TMP_REG3, tmp) != SLJIT_ERR_UNSUPPORTED) {
+ FAIL_IF(compiler->error);
+ compiler->cache_argw = argw;
+ return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG3) | DD4(reg));
+ }
+ }
+
+ if (arg & REG_MASK) {
+ if (emit_set_delta(compiler, TMP_REG1, arg & REG_MASK, argw) != SLJIT_ERR_UNSUPPORTED) {
+ FAIL_IF(compiler->error);
+ return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG1) | DD4(reg));
+ }
+ imm = get_imm(argw & ~0x3fc);
+ if (imm != INVALID_IMM) {
+ FAIL_IF(push_inst32(compiler, ADD_WI | RD4(TMP_REG1) | RN4(arg & REG_MASK) | imm));
+ return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG1) | DD4(reg) | ((argw & 0x3fc) >> 2));
+ }
+ imm = get_imm(-argw & ~0x3fc);
+ if (imm != INVALID_IMM) {
+ argw = -argw;
+ FAIL_IF(push_inst32(compiler, SUB_WI | RD4(TMP_REG1) | RN4(arg & REG_MASK) | imm));
+ return push_inst32(compiler, inst | RN4(TMP_REG1) | DD4(reg) | ((argw & 0x3fc) >> 2));
+ }
+ }
+
+ compiler->cache_arg = arg;
+ compiler->cache_argw = argw;
+
+ FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
+ if (arg & REG_MASK)
+ FAIL_IF(push_inst16(compiler, ADD | SET_REGS44(TMP_REG3, (arg & REG_MASK))));
+ return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG3) | DD4(reg));
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ if (src & SLJIT_MEM) {
+ FAIL_IF(emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG1, src, srcw));
+ src = TMP_FREG1;
+ }
+
+ FAIL_IF(push_inst32(compiler, VCVT_S32_F32 | (op & SLJIT_F32_OP) | DD4(TMP_FREG1) | DM4(src)));
+
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ if (FAST_IS_REG(dst))
+ return push_inst32(compiler, VMOV | (1 << 20) | RT4(dst) | DN4(TMP_FREG1));
+
+ /* Store the integer value from a VFP register. */
+ return emit_fop_mem(compiler, 0, TMP_FREG1, dst, dstw);
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1;
+
+ if (FAST_IS_REG(src))
+ FAIL_IF(push_inst32(compiler, VMOV | RT4(src) | DN4(TMP_FREG1)));
+ else if (src & SLJIT_MEM) {
+ /* Load the integer value into a VFP register. */
+ FAIL_IF(emit_fop_mem(compiler, FPU_LOAD, TMP_FREG1, src, srcw));
+ }
+ else {
+ FAIL_IF(load_immediate(compiler, TMP_REG1, srcw));
+ FAIL_IF(push_inst32(compiler, VMOV | RT4(TMP_REG1) | DN4(TMP_FREG1)));
+ }
+
+ FAIL_IF(push_inst32(compiler, VCVT_F32_S32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DM4(TMP_FREG1)));
+
+ if (dst & SLJIT_MEM)
+ return emit_fop_mem(compiler, (op & SLJIT_F32_OP), TMP_FREG1, dst, dstw);
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ if (src1 & SLJIT_MEM) {
+ emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG1, src1, src1w);
+ src1 = TMP_FREG1;
+ }
+
+ if (src2 & SLJIT_MEM) {
+ emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG2, src2, src2w);
+ src2 = TMP_FREG2;
+ }
+
+ FAIL_IF(push_inst32(compiler, VCMP_F32 | (op & SLJIT_F32_OP) | DD4(src1) | DM4(src2)));
+ return push_inst32(compiler, VMRS);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r;
+
+ CHECK_ERROR();
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ if (GET_OPCODE(op) != SLJIT_CONV_F64_FROM_F32)
+ op ^= SLJIT_F32_OP;
+
+ SLJIT_COMPILE_ASSERT((SLJIT_F32_OP == 0x100), float_transfer_bit_error);
+ SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw);
+
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1;
+
+ if (src & SLJIT_MEM) {
+ emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, dst_r, src, srcw);
+ src = dst_r;
+ }
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_MOV_F64:
+ if (src != dst_r) {
+ if (dst_r != TMP_FREG1)
+ FAIL_IF(push_inst32(compiler, VMOV_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DM4(src)));
+ else
+ dst_r = src;
+ }
+ break;
+ case SLJIT_NEG_F64:
+ FAIL_IF(push_inst32(compiler, VNEG_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DM4(src)));
+ break;
+ case SLJIT_ABS_F64:
+ FAIL_IF(push_inst32(compiler, VABS_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DM4(src)));
+ break;
+ case SLJIT_CONV_F64_FROM_F32:
+ FAIL_IF(push_inst32(compiler, VCVT_F64_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DM4(src)));
+ op ^= SLJIT_F32_OP;
+ break;
+ }
+
+ if (dst & SLJIT_MEM)
+ return emit_fop_mem(compiler, (op & SLJIT_F32_OP), dst_r, dst, dstw);
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_s32 dst_r;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ op ^= SLJIT_F32_OP;
+
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1;
+ if (src1 & SLJIT_MEM) {
+ emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG1, src1, src1w);
+ src1 = TMP_FREG1;
+ }
+ if (src2 & SLJIT_MEM) {
+ emit_fop_mem(compiler, (op & SLJIT_F32_OP) | FPU_LOAD, TMP_FREG2, src2, src2w);
+ src2 = TMP_FREG2;
+ }
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_ADD_F64:
+ FAIL_IF(push_inst32(compiler, VADD_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DN4(src1) | DM4(src2)));
+ break;
+ case SLJIT_SUB_F64:
+ FAIL_IF(push_inst32(compiler, VSUB_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DN4(src1) | DM4(src2)));
+ break;
+ case SLJIT_MUL_F64:
+ FAIL_IF(push_inst32(compiler, VMUL_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DN4(src1) | DM4(src2)));
+ break;
+ case SLJIT_DIV_F64:
+ FAIL_IF(push_inst32(compiler, VDIV_F32 | (op & SLJIT_F32_OP) | DD4(dst_r) | DN4(src1) | DM4(src2)));
+ break;
+ }
+
+ if (!(dst & SLJIT_MEM))
+ return SLJIT_SUCCESS;
+ return emit_fop_mem(compiler, (op & SLJIT_F32_OP), TMP_FREG1, dst, dstw);
+}
+
+#undef FPU_LOAD
+
+/* --------------------------------------------------------------------- */
+/* Other instructions */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ /* For UNUSED dst. Uncommon, but possible. */
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ if (FAST_IS_REG(dst))
+ return push_inst16(compiler, MOV | SET_REGS44(dst, TMP_REG3));
+
+ /* Memory. */
+ if (getput_arg_fast(compiler, WORD_SIZE | STORE, TMP_REG3, dst, dstw))
+ return compiler->error;
+ /* TMP_REG3 is used for caching. */
+ FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(TMP_REG2, TMP_REG3)));
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ return getput_arg(compiler, WORD_SIZE | STORE, TMP_REG2, dst, dstw, 0, 0);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_return(compiler, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ if (FAST_IS_REG(src))
+ FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(TMP_REG3, src)));
+ else if (src & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, WORD_SIZE, TMP_REG3, src, srcw))
+ FAIL_IF(compiler->error);
+ else {
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ FAIL_IF(getput_arg(compiler, WORD_SIZE, TMP_REG2, src, srcw, 0, 0));
+ FAIL_IF(push_inst16(compiler, MOV | SET_REGS44(TMP_REG3, TMP_REG2)));
+ }
+ }
+ else if (src & SLJIT_IMM)
+ FAIL_IF(load_immediate(compiler, TMP_REG3, srcw));
+ return push_inst16(compiler, BLX | RN3(TMP_REG3));
+}
+
+/* --------------------------------------------------------------------- */
+/* Conditional instructions */
+/* --------------------------------------------------------------------- */
+
+static sljit_uw get_cc(sljit_s32 type)
+{
+ switch (type) {
+ case SLJIT_EQUAL:
+ case SLJIT_MUL_NOT_OVERFLOW:
+ case SLJIT_EQUAL_F64:
+ return 0x0;
+
+ case SLJIT_NOT_EQUAL:
+ case SLJIT_MUL_OVERFLOW:
+ case SLJIT_NOT_EQUAL_F64:
+ return 0x1;
+
+ case SLJIT_LESS:
+ case SLJIT_LESS_F64:
+ return 0x3;
+
+ case SLJIT_GREATER_EQUAL:
+ case SLJIT_GREATER_EQUAL_F64:
+ return 0x2;
+
+ case SLJIT_GREATER:
+ case SLJIT_GREATER_F64:
+ return 0x8;
+
+ case SLJIT_LESS_EQUAL:
+ case SLJIT_LESS_EQUAL_F64:
+ return 0x9;
+
+ case SLJIT_SIG_LESS:
+ return 0xb;
+
+ case SLJIT_SIG_GREATER_EQUAL:
+ return 0xa;
+
+ case SLJIT_SIG_GREATER:
+ return 0xc;
+
+ case SLJIT_SIG_LESS_EQUAL:
+ return 0xd;
+
+ case SLJIT_OVERFLOW:
+ case SLJIT_UNORDERED_F64:
+ return 0x6;
+
+ case SLJIT_NOT_OVERFLOW:
+ case SLJIT_ORDERED_F64:
+ return 0x7;
+
+ default: /* SLJIT_JUMP */
+ SLJIT_ASSERT_STOP();
+ return 0xe;
+ }
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
+{
+ struct sljit_label *label;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_label(compiler));
+
+ if (compiler->last_label && compiler->last_label->size == compiler->size)
+ return compiler->last_label;
+
+ label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label));
+ PTR_FAIL_IF(!label);
+ set_label(label, compiler);
+ return label;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_s32 type)
+{
+ struct sljit_jump *jump;
+ sljit_ins cc;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_jump(compiler, type));
+
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ PTR_FAIL_IF(!jump);
+ set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
+ type &= 0xff;
+
+ /* In ARM, we don't need to touch the arguments. */
+ PTR_FAIL_IF(emit_imm32_const(compiler, TMP_REG1, 0));
+ if (type < SLJIT_JUMP) {
+ jump->flags |= IS_COND;
+ cc = get_cc(type);
+ jump->flags |= cc << 8;
+ PTR_FAIL_IF(push_inst16(compiler, IT | (cc << 4) | 0x8));
+ }
+
+ jump->addr = compiler->size;
+ if (type <= SLJIT_JUMP)
+ PTR_FAIL_IF(push_inst16(compiler, BX | RN3(TMP_REG1)));
+ else {
+ jump->flags |= IS_BL;
+ PTR_FAIL_IF(push_inst16(compiler, BLX | RN3(TMP_REG1)));
+ }
+
+ return jump;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 src, sljit_sw srcw)
+{
+ struct sljit_jump *jump;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_ijump(compiler, type, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ /* In ARM, we don't need to touch the arguments. */
+ if (!(src & SLJIT_IMM)) {
+ if (FAST_IS_REG(src))
+ return push_inst16(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RN3(src));
+
+ FAIL_IF(emit_op_mem(compiler, WORD_SIZE, type <= SLJIT_JUMP ? TMP_PC : TMP_REG1, src, srcw));
+ if (type >= SLJIT_FAST_CALL)
+ return push_inst16(compiler, BLX | RN3(TMP_REG1));
+ }
+
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ FAIL_IF(!jump);
+ set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0));
+ jump->u.target = srcw;
+
+ FAIL_IF(emit_imm32_const(compiler, TMP_REG1, 0));
+ jump->addr = compiler->size;
+ return push_inst16(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RN3(TMP_REG1));
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw,
+ sljit_s32 type)
+{
+ sljit_s32 dst_r, flags = GET_ALL_FLAGS(op);
+ sljit_ins cc, ins;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ op = GET_OPCODE(op);
+ cc = get_cc(type & 0xff);
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2;
+
+ if (op < SLJIT_ADD) {
+ FAIL_IF(push_inst16(compiler, IT | (cc << 4) | (((cc & 0x1) ^ 0x1) << 3) | 0x4));
+ if (reg_map[dst_r] > 7) {
+ FAIL_IF(push_inst32(compiler, MOV_WI | RD4(dst_r) | 1));
+ FAIL_IF(push_inst32(compiler, MOV_WI | RD4(dst_r) | 0));
+ } else {
+ FAIL_IF(push_inst16(compiler, MOVSI | RDN3(dst_r) | 1));
+ FAIL_IF(push_inst16(compiler, MOVSI | RDN3(dst_r) | 0));
+ }
+ if (dst_r != TMP_REG2)
+ return SLJIT_SUCCESS;
+ return emit_op_mem(compiler, WORD_SIZE | STORE, TMP_REG2, dst, dstw);
+ }
+
+ ins = (op == SLJIT_AND ? ANDI : (op == SLJIT_OR ? ORRI : EORI));
+ if ((op == SLJIT_OR || op == SLJIT_XOR) && FAST_IS_REG(dst) && dst == src) {
+ /* Does not change the other bits. */
+ FAIL_IF(push_inst16(compiler, IT | (cc << 4) | 0x8));
+ FAIL_IF(push_inst32(compiler, ins | RN4(src) | RD4(dst) | 1));
+ if (flags & SLJIT_SET_E) {
+ /* The condition must always be set, even if the ORRI/EORI is not executed above. */
+ if (reg_map[dst] <= 7)
+ return push_inst16(compiler, MOVS | RD3(TMP_REG1) | RN3(dst));
+ return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(TMP_REG1) | RM4(dst));
+ }
+ return SLJIT_SUCCESS;
+ }
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ if (src & SLJIT_MEM) {
+ FAIL_IF(emit_op_mem2(compiler, WORD_SIZE, TMP_REG2, src, srcw, dst, dstw));
+ src = TMP_REG2;
+ srcw = 0;
+ } else if (src & SLJIT_IMM) {
+ FAIL_IF(load_immediate(compiler, TMP_REG2, srcw));
+ src = TMP_REG2;
+ srcw = 0;
+ }
+
+ if (op == SLJIT_AND || src != dst_r) {
+ FAIL_IF(push_inst16(compiler, IT | (cc << 4) | (((cc & 0x1) ^ 0x1) << 3) | 0x4));
+ FAIL_IF(push_inst32(compiler, ins | RN4(src) | RD4(dst_r) | 1));
+ FAIL_IF(push_inst32(compiler, ins | RN4(src) | RD4(dst_r) | 0));
+ }
+ else {
+ FAIL_IF(push_inst16(compiler, IT | (cc << 4) | 0x8));
+ FAIL_IF(push_inst32(compiler, ins | RN4(src) | RD4(dst_r) | 1));
+ }
+
+ if (dst_r == TMP_REG2)
+ FAIL_IF(emit_op_mem2(compiler, WORD_SIZE | STORE, TMP_REG2, dst, dstw, 0, 0));
+
+ if (flags & SLJIT_SET_E) {
+ /* The condition must always be set, even if the ORR/EORI is not executed above. */
+ if (reg_map[dst_r] <= 7)
+ return push_inst16(compiler, MOVS | RD3(TMP_REG1) | RN3(dst_r));
+ return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(TMP_REG1) | RM4(dst_r));
+ }
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value)
+{
+ struct sljit_const *const_;
+ sljit_s32 dst_r;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const));
+ PTR_FAIL_IF(!const_);
+ set_const(const_, compiler);
+
+ dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1;
+ PTR_FAIL_IF(emit_imm32_const(compiler, dst_r, init_value));
+
+ if (dst & SLJIT_MEM)
+ PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw));
+ return const_;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset)
+{
+ sljit_u16 *inst = (sljit_u16*)addr;
+ modify_imm32_const(inst, new_target);
+ inst = (sljit_u16 *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 4);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset)
+{
+ sljit_u16 *inst = (sljit_u16*)addr;
+ modify_imm32_const(inst, new_constant);
+ inst = (sljit_u16 *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 4);
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeMIPS_32.c b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_32.c
new file mode 100644
index 0000000000..b15a57dfdb
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_32.c
@@ -0,0 +1,368 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* mips 32-bit arch dependent functions. */
+
+static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst_ar, sljit_sw imm)
+{
+ if (!(imm & ~0xffff))
+ return push_inst(compiler, ORI | SA(0) | TA(dst_ar) | IMM(imm), dst_ar);
+
+ if (imm < 0 && imm >= SIMM_MIN)
+ return push_inst(compiler, ADDIU | SA(0) | TA(dst_ar) | IMM(imm), dst_ar);
+
+ FAIL_IF(push_inst(compiler, LUI | TA(dst_ar) | IMM(imm >> 16), dst_ar));
+ return (imm & 0xffff) ? push_inst(compiler, ORI | SA(dst_ar) | TA(dst_ar) | IMM(imm), dst_ar) : SLJIT_SUCCESS;
+}
+
+#define EMIT_LOGICAL(op_imm, op_norm) \
+ if (flags & SRC2_IMM) { \
+ if (op & SLJIT_SET_E) \
+ FAIL_IF(push_inst(compiler, op_imm | S(src1) | TA(EQUAL_FLAG) | IMM(src2), EQUAL_FLAG)); \
+ if (CHECK_FLAGS(SLJIT_SET_E)) \
+ FAIL_IF(push_inst(compiler, op_imm | S(src1) | T(dst) | IMM(src2), DR(dst))); \
+ } \
+ else { \
+ if (op & SLJIT_SET_E) \
+ FAIL_IF(push_inst(compiler, op_norm | S(src1) | T(src2) | DA(EQUAL_FLAG), EQUAL_FLAG)); \
+ if (CHECK_FLAGS(SLJIT_SET_E)) \
+ FAIL_IF(push_inst(compiler, op_norm | S(src1) | T(src2) | D(dst), DR(dst))); \
+ }
+
+#define EMIT_SHIFT(op_imm, op_v) \
+ if (flags & SRC2_IMM) { \
+ if (op & SLJIT_SET_E) \
+ FAIL_IF(push_inst(compiler, op_imm | T(src1) | DA(EQUAL_FLAG) | SH_IMM(src2), EQUAL_FLAG)); \
+ if (CHECK_FLAGS(SLJIT_SET_E)) \
+ FAIL_IF(push_inst(compiler, op_imm | T(src1) | D(dst) | SH_IMM(src2), DR(dst))); \
+ } \
+ else { \
+ if (op & SLJIT_SET_E) \
+ FAIL_IF(push_inst(compiler, op_v | S(src2) | T(src1) | DA(EQUAL_FLAG), EQUAL_FLAG)); \
+ if (CHECK_FLAGS(SLJIT_SET_E)) \
+ FAIL_IF(push_inst(compiler, op_v | S(src2) | T(src1) | D(dst), DR(dst))); \
+ }
+
+static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags,
+ sljit_s32 dst, sljit_s32 src1, sljit_sw src2)
+{
+ switch (GET_OPCODE(op)) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_U32:
+ case SLJIT_MOV_S32:
+ case SLJIT_MOV_P:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if (dst != src2)
+ return push_inst(compiler, ADDU | S(src2) | TA(0) | D(dst), DR(dst));
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U8:
+ case SLJIT_MOV_S8:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
+ if (op == SLJIT_MOV_S8) {
+#if (defined SLJIT_MIPS_R1 && SLJIT_MIPS_R1)
+ return push_inst(compiler, SEB | T(src2) | D(dst), DR(dst));
+#else
+ FAIL_IF(push_inst(compiler, SLL | T(src2) | D(dst) | SH_IMM(24), DR(dst)));
+ return push_inst(compiler, SRA | T(dst) | D(dst) | SH_IMM(24), DR(dst));
+#endif
+ }
+ return push_inst(compiler, ANDI | S(src2) | T(dst) | IMM(0xff), DR(dst));
+ }
+ else if (dst != src2)
+ SLJIT_ASSERT_STOP();
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U16:
+ case SLJIT_MOV_S16:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
+ if (op == SLJIT_MOV_S16) {
+#if (defined SLJIT_MIPS_R1 && SLJIT_MIPS_R1)
+ return push_inst(compiler, SEH | T(src2) | D(dst), DR(dst));
+#else
+ FAIL_IF(push_inst(compiler, SLL | T(src2) | D(dst) | SH_IMM(16), DR(dst)));
+ return push_inst(compiler, SRA | T(dst) | D(dst) | SH_IMM(16), DR(dst));
+#endif
+ }
+ return push_inst(compiler, ANDI | S(src2) | T(dst) | IMM(0xffff), DR(dst));
+ }
+ else if (dst != src2)
+ SLJIT_ASSERT_STOP();
+ return SLJIT_SUCCESS;
+
+ case SLJIT_NOT:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if (op & SLJIT_SET_E)
+ FAIL_IF(push_inst(compiler, NOR | S(src2) | T(src2) | DA(EQUAL_FLAG), EQUAL_FLAG));
+ if (CHECK_FLAGS(SLJIT_SET_E))
+ FAIL_IF(push_inst(compiler, NOR | S(src2) | T(src2) | D(dst), DR(dst)));
+ return SLJIT_SUCCESS;
+
+ case SLJIT_CLZ:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+#if (defined SLJIT_MIPS_R1 && SLJIT_MIPS_R1)
+ if (op & SLJIT_SET_E)
+ FAIL_IF(push_inst(compiler, CLZ | S(src2) | TA(EQUAL_FLAG) | DA(EQUAL_FLAG), EQUAL_FLAG));
+ if (CHECK_FLAGS(SLJIT_SET_E))
+ FAIL_IF(push_inst(compiler, CLZ | S(src2) | T(dst) | D(dst), DR(dst)));
+#else
+ if (SLJIT_UNLIKELY(flags & UNUSED_DEST)) {
+ FAIL_IF(push_inst(compiler, SRL | T(src2) | DA(EQUAL_FLAG) | SH_IMM(31), EQUAL_FLAG));
+ return push_inst(compiler, XORI | SA(EQUAL_FLAG) | TA(EQUAL_FLAG) | IMM(1), EQUAL_FLAG);
+ }
+ /* Nearly all instructions are unmovable in the following sequence. */
+ FAIL_IF(push_inst(compiler, ADDU | S(src2) | TA(0) | D(TMP_REG1), DR(TMP_REG1)));
+ /* Check zero. */
+ FAIL_IF(push_inst(compiler, BEQ | S(TMP_REG1) | TA(0) | IMM(5), UNMOVABLE_INS));
+ FAIL_IF(push_inst(compiler, ORI | SA(0) | T(dst) | IMM(32), UNMOVABLE_INS));
+ FAIL_IF(push_inst(compiler, ADDIU | SA(0) | T(dst) | IMM(-1), DR(dst)));
+ /* Loop for searching the highest bit. */
+ FAIL_IF(push_inst(compiler, ADDIU | S(dst) | T(dst) | IMM(1), DR(dst)));
+ FAIL_IF(push_inst(compiler, BGEZ | S(TMP_REG1) | IMM(-2), UNMOVABLE_INS));
+ FAIL_IF(push_inst(compiler, SLL | T(TMP_REG1) | D(TMP_REG1) | SH_IMM(1), UNMOVABLE_INS));
+ if (op & SLJIT_SET_E)
+ return push_inst(compiler, ADDU | S(dst) | TA(0) | DA(EQUAL_FLAG), EQUAL_FLAG);
+#endif
+ return SLJIT_SUCCESS;
+
+ case SLJIT_ADD:
+ if (flags & SRC2_IMM) {
+ if (op & SLJIT_SET_O) {
+ if (src2 >= 0)
+ FAIL_IF(push_inst(compiler, OR | S(src1) | T(src1) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ else
+ FAIL_IF(push_inst(compiler, NOR | S(src1) | T(src1) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ }
+ if (op & SLJIT_SET_E)
+ FAIL_IF(push_inst(compiler, ADDIU | S(src1) | TA(EQUAL_FLAG) | IMM(src2), EQUAL_FLAG));
+ if (op & (SLJIT_SET_C | SLJIT_SET_O)) {
+ if (src2 >= 0)
+ FAIL_IF(push_inst(compiler, ORI | S(src1) | TA(ULESS_FLAG) | IMM(src2), ULESS_FLAG));
+ else {
+ FAIL_IF(push_inst(compiler, ADDIU | SA(0) | TA(ULESS_FLAG) | IMM(src2), ULESS_FLAG));
+ FAIL_IF(push_inst(compiler, OR | S(src1) | TA(ULESS_FLAG) | DA(ULESS_FLAG), ULESS_FLAG));
+ }
+ }
+ /* dst may be the same as src1 or src2. */
+ if (CHECK_FLAGS(SLJIT_SET_E))
+ FAIL_IF(push_inst(compiler, ADDIU | S(src1) | T(dst) | IMM(src2), DR(dst)));
+ }
+ else {
+ if (op & SLJIT_SET_O)
+ FAIL_IF(push_inst(compiler, XOR | S(src1) | T(src2) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ if (op & SLJIT_SET_E)
+ FAIL_IF(push_inst(compiler, ADDU | S(src1) | T(src2) | DA(EQUAL_FLAG), EQUAL_FLAG));
+ if (op & (SLJIT_SET_C | SLJIT_SET_O))
+ FAIL_IF(push_inst(compiler, OR | S(src1) | T(src2) | DA(ULESS_FLAG), ULESS_FLAG));
+ /* dst may be the same as src1 or src2. */
+ if (CHECK_FLAGS(SLJIT_SET_E))
+ FAIL_IF(push_inst(compiler, ADDU | S(src1) | T(src2) | D(dst), DR(dst)));
+ }
+
+ /* a + b >= a | b (otherwise, the carry should be set to 1). */
+ if (op & (SLJIT_SET_C | SLJIT_SET_O))
+ FAIL_IF(push_inst(compiler, SLTU | S(dst) | TA(ULESS_FLAG) | DA(ULESS_FLAG), ULESS_FLAG));
+ if (!(op & SLJIT_SET_O))
+ return SLJIT_SUCCESS;
+ FAIL_IF(push_inst(compiler, SLL | TA(ULESS_FLAG) | D(TMP_REG1) | SH_IMM(31), DR(TMP_REG1)));
+ FAIL_IF(push_inst(compiler, XOR | S(TMP_REG1) | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ FAIL_IF(push_inst(compiler, XOR | S(dst) | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ return push_inst(compiler, SLL | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG) | SH_IMM(31), OVERFLOW_FLAG);
+
+ case SLJIT_ADDC:
+ if (flags & SRC2_IMM) {
+ if (op & SLJIT_SET_C) {
+ if (src2 >= 0)
+ FAIL_IF(push_inst(compiler, ORI | S(src1) | TA(OVERFLOW_FLAG) | IMM(src2), OVERFLOW_FLAG));
+ else {
+ FAIL_IF(push_inst(compiler, ADDIU | SA(0) | TA(OVERFLOW_FLAG) | IMM(src2), OVERFLOW_FLAG));
+ FAIL_IF(push_inst(compiler, OR | S(src1) | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ }
+ }
+ FAIL_IF(push_inst(compiler, ADDIU | S(src1) | T(dst) | IMM(src2), DR(dst)));
+ } else {
+ if (op & SLJIT_SET_C)
+ FAIL_IF(push_inst(compiler, OR | S(src1) | T(src2) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ /* dst may be the same as src1 or src2. */
+ FAIL_IF(push_inst(compiler, ADDU | S(src1) | T(src2) | D(dst), DR(dst)));
+ }
+ if (op & SLJIT_SET_C)
+ FAIL_IF(push_inst(compiler, SLTU | S(dst) | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+
+ FAIL_IF(push_inst(compiler, ADDU | S(dst) | TA(ULESS_FLAG) | D(dst), DR(dst)));
+ if (!(op & SLJIT_SET_C))
+ return SLJIT_SUCCESS;
+
+ /* Set ULESS_FLAG (dst == 0) && (ULESS_FLAG == 1). */
+ FAIL_IF(push_inst(compiler, SLTU | S(dst) | TA(ULESS_FLAG) | DA(ULESS_FLAG), ULESS_FLAG));
+ /* Set carry flag. */
+ return push_inst(compiler, OR | SA(ULESS_FLAG) | TA(OVERFLOW_FLAG) | DA(ULESS_FLAG), ULESS_FLAG);
+
+ case SLJIT_SUB:
+ if ((flags & SRC2_IMM) && ((op & (SLJIT_SET_U | SLJIT_SET_S)) || src2 == SIMM_MIN)) {
+ FAIL_IF(push_inst(compiler, ADDIU | SA(0) | T(TMP_REG2) | IMM(src2), DR(TMP_REG2)));
+ src2 = TMP_REG2;
+ flags &= ~SRC2_IMM;
+ }
+
+ if (flags & SRC2_IMM) {
+ if (op & SLJIT_SET_O) {
+ if (src2 >= 0)
+ FAIL_IF(push_inst(compiler, OR | S(src1) | T(src1) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ else
+ FAIL_IF(push_inst(compiler, NOR | S(src1) | T(src1) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ }
+ if (op & SLJIT_SET_E)
+ FAIL_IF(push_inst(compiler, ADDIU | S(src1) | TA(EQUAL_FLAG) | IMM(-src2), EQUAL_FLAG));
+ if (op & (SLJIT_SET_C | SLJIT_SET_O))
+ FAIL_IF(push_inst(compiler, SLTIU | S(src1) | TA(ULESS_FLAG) | IMM(src2), ULESS_FLAG));
+ /* dst may be the same as src1 or src2. */
+ if (CHECK_FLAGS(SLJIT_SET_E))
+ FAIL_IF(push_inst(compiler, ADDIU | S(src1) | T(dst) | IMM(-src2), DR(dst)));
+ }
+ else {
+ if (op & SLJIT_SET_O)
+ FAIL_IF(push_inst(compiler, XOR | S(src1) | T(src2) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ if (op & SLJIT_SET_E)
+ FAIL_IF(push_inst(compiler, SUBU | S(src1) | T(src2) | DA(EQUAL_FLAG), EQUAL_FLAG));
+ if (op & (SLJIT_SET_U | SLJIT_SET_C | SLJIT_SET_O))
+ FAIL_IF(push_inst(compiler, SLTU | S(src1) | T(src2) | DA(ULESS_FLAG), ULESS_FLAG));
+ if (op & SLJIT_SET_U)
+ FAIL_IF(push_inst(compiler, SLTU | S(src2) | T(src1) | DA(UGREATER_FLAG), UGREATER_FLAG));
+ if (op & SLJIT_SET_S) {
+ FAIL_IF(push_inst(compiler, SLT | S(src1) | T(src2) | DA(LESS_FLAG), LESS_FLAG));
+ FAIL_IF(push_inst(compiler, SLT | S(src2) | T(src1) | DA(GREATER_FLAG), GREATER_FLAG));
+ }
+ /* dst may be the same as src1 or src2. */
+ if (CHECK_FLAGS(SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_C))
+ FAIL_IF(push_inst(compiler, SUBU | S(src1) | T(src2) | D(dst), DR(dst)));
+ }
+
+ if (!(op & SLJIT_SET_O))
+ return SLJIT_SUCCESS;
+ FAIL_IF(push_inst(compiler, SLL | TA(ULESS_FLAG) | D(TMP_REG1) | SH_IMM(31), DR(TMP_REG1)));
+ FAIL_IF(push_inst(compiler, XOR | S(TMP_REG1) | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ FAIL_IF(push_inst(compiler, XOR | S(dst) | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ return push_inst(compiler, SRL | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG) | SH_IMM(31), OVERFLOW_FLAG);
+
+ case SLJIT_SUBC:
+ if ((flags & SRC2_IMM) && src2 == SIMM_MIN) {
+ FAIL_IF(push_inst(compiler, ADDIU | SA(0) | T(TMP_REG2) | IMM(src2), DR(TMP_REG2)));
+ src2 = TMP_REG2;
+ flags &= ~SRC2_IMM;
+ }
+
+ if (flags & SRC2_IMM) {
+ if (op & SLJIT_SET_C)
+ FAIL_IF(push_inst(compiler, SLTIU | S(src1) | TA(OVERFLOW_FLAG) | IMM(src2), OVERFLOW_FLAG));
+ /* dst may be the same as src1 or src2. */
+ FAIL_IF(push_inst(compiler, ADDIU | S(src1) | T(dst) | IMM(-src2), DR(dst)));
+ }
+ else {
+ if (op & SLJIT_SET_C)
+ FAIL_IF(push_inst(compiler, SLTU | S(src1) | T(src2) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ /* dst may be the same as src1 or src2. */
+ FAIL_IF(push_inst(compiler, SUBU | S(src1) | T(src2) | D(dst), DR(dst)));
+ }
+
+ if (op & SLJIT_SET_C)
+ FAIL_IF(push_inst(compiler, SLTU | S(dst) | TA(ULESS_FLAG) | DA(LESS_FLAG), LESS_FLAG));
+
+ FAIL_IF(push_inst(compiler, SUBU | S(dst) | TA(ULESS_FLAG) | D(dst), DR(dst)));
+ return (op & SLJIT_SET_C) ? push_inst(compiler, OR | SA(OVERFLOW_FLAG) | TA(LESS_FLAG) | DA(ULESS_FLAG), ULESS_FLAG) : SLJIT_SUCCESS;
+
+ case SLJIT_MUL:
+ SLJIT_ASSERT(!(flags & SRC2_IMM));
+ if (!(op & SLJIT_SET_O)) {
+#if (defined SLJIT_MIPS_R1 && SLJIT_MIPS_R1)
+ return push_inst(compiler, MUL | S(src1) | T(src2) | D(dst), DR(dst));
+#else
+ FAIL_IF(push_inst(compiler, MULT | S(src1) | T(src2), MOVABLE_INS));
+ return push_inst(compiler, MFLO | D(dst), DR(dst));
+#endif
+ }
+ FAIL_IF(push_inst(compiler, MULT | S(src1) | T(src2), MOVABLE_INS));
+ FAIL_IF(push_inst(compiler, MFHI | DA(ULESS_FLAG), ULESS_FLAG));
+ FAIL_IF(push_inst(compiler, MFLO | D(dst), DR(dst)));
+ FAIL_IF(push_inst(compiler, SRA | T(dst) | DA(UGREATER_FLAG) | SH_IMM(31), UGREATER_FLAG));
+ return push_inst(compiler, SUBU | SA(ULESS_FLAG) | TA(UGREATER_FLAG) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG);
+
+ case SLJIT_AND:
+ EMIT_LOGICAL(ANDI, AND);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_OR:
+ EMIT_LOGICAL(ORI, OR);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_XOR:
+ EMIT_LOGICAL(XORI, XOR);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_SHL:
+ EMIT_SHIFT(SLL, SLLV);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_LSHR:
+ EMIT_SHIFT(SRL, SRLV);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_ASHR:
+ EMIT_SHIFT(SRA, SRAV);
+ return SLJIT_SUCCESS;
+ }
+
+ SLJIT_ASSERT_STOP();
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw init_value)
+{
+ FAIL_IF(push_inst(compiler, LUI | T(dst) | IMM(init_value >> 16), DR(dst)));
+ return push_inst(compiler, ORI | S(dst) | T(dst) | IMM(init_value), DR(dst));
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset)
+{
+ sljit_ins *inst = (sljit_ins *)addr;
+
+ inst[0] = (inst[0] & 0xffff0000) | ((new_target >> 16) & 0xffff);
+ inst[1] = (inst[1] & 0xffff0000) | (new_target & 0xffff);
+ inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 2);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset)
+{
+ sljit_ins *inst = (sljit_ins *)addr;
+
+ inst[0] = (inst[0] & 0xffff0000) | ((new_constant >> 16) & 0xffff);
+ inst[1] = (inst[1] & 0xffff0000) | (new_constant & 0xffff);
+ inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 2);
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeMIPS_64.c b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_64.c
new file mode 100644
index 0000000000..8b96d5b73d
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_64.c
@@ -0,0 +1,471 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* mips 64-bit arch dependent functions. */
+
+static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst_ar, sljit_sw imm)
+{
+ sljit_s32 shift = 32;
+ sljit_s32 shift2;
+ sljit_s32 inv = 0;
+ sljit_ins ins;
+ sljit_uw uimm;
+
+ if (!(imm & ~0xffff))
+ return push_inst(compiler, ORI | SA(0) | TA(dst_ar) | IMM(imm), dst_ar);
+
+ if (imm < 0 && imm >= SIMM_MIN)
+ return push_inst(compiler, ADDIU | SA(0) | TA(dst_ar) | IMM(imm), dst_ar);
+
+ if (imm <= 0x7fffffffl && imm >= -0x80000000l) {
+ FAIL_IF(push_inst(compiler, LUI | TA(dst_ar) | IMM(imm >> 16), dst_ar));
+ return (imm & 0xffff) ? push_inst(compiler, ORI | SA(dst_ar) | TA(dst_ar) | IMM(imm), dst_ar) : SLJIT_SUCCESS;
+ }
+
+ /* Zero extended number. */
+ uimm = imm;
+ if (imm < 0) {
+ uimm = ~imm;
+ inv = 1;
+ }
+
+ while (!(uimm & 0xff00000000000000l)) {
+ shift -= 8;
+ uimm <<= 8;
+ }
+
+ if (!(uimm & 0xf000000000000000l)) {
+ shift -= 4;
+ uimm <<= 4;
+ }
+
+ if (!(uimm & 0xc000000000000000l)) {
+ shift -= 2;
+ uimm <<= 2;
+ }
+
+ if ((sljit_sw)uimm < 0) {
+ uimm >>= 1;
+ shift += 1;
+ }
+ SLJIT_ASSERT(((uimm & 0xc000000000000000l) == 0x4000000000000000l) && (shift > 0) && (shift <= 32));
+
+ if (inv)
+ uimm = ~uimm;
+
+ FAIL_IF(push_inst(compiler, LUI | TA(dst_ar) | IMM(uimm >> 48), dst_ar));
+ if (uimm & 0x0000ffff00000000l)
+ FAIL_IF(push_inst(compiler, ORI | SA(dst_ar) | TA(dst_ar) | IMM(uimm >> 32), dst_ar));
+
+ imm &= (1l << shift) - 1;
+ if (!(imm & ~0xffff)) {
+ ins = (shift == 32) ? DSLL32 : DSLL;
+ if (shift < 32)
+ ins |= SH_IMM(shift);
+ FAIL_IF(push_inst(compiler, ins | TA(dst_ar) | DA(dst_ar), dst_ar));
+ return !(imm & 0xffff) ? SLJIT_SUCCESS : push_inst(compiler, ORI | SA(dst_ar) | TA(dst_ar) | IMM(imm), dst_ar);
+ }
+
+ /* Double shifts needs to be performed. */
+ uimm <<= 32;
+ shift2 = shift - 16;
+
+ while (!(uimm & 0xf000000000000000l)) {
+ shift2 -= 4;
+ uimm <<= 4;
+ }
+
+ if (!(uimm & 0xc000000000000000l)) {
+ shift2 -= 2;
+ uimm <<= 2;
+ }
+
+ if (!(uimm & 0x8000000000000000l)) {
+ shift2--;
+ uimm <<= 1;
+ }
+
+ SLJIT_ASSERT((uimm & 0x8000000000000000l) && (shift2 > 0) && (shift2 <= 16));
+
+ FAIL_IF(push_inst(compiler, DSLL | TA(dst_ar) | DA(dst_ar) | SH_IMM(shift - shift2), dst_ar));
+ FAIL_IF(push_inst(compiler, ORI | SA(dst_ar) | TA(dst_ar) | IMM(uimm >> 48), dst_ar));
+ FAIL_IF(push_inst(compiler, DSLL | TA(dst_ar) | DA(dst_ar) | SH_IMM(shift2), dst_ar));
+
+ imm &= (1l << shift2) - 1;
+ return !(imm & 0xffff) ? SLJIT_SUCCESS : push_inst(compiler, ORI | SA(dst_ar) | TA(dst_ar) | IMM(imm), dst_ar);
+}
+
+#define SELECT_OP(a, b) \
+ (!(op & SLJIT_I32_OP) ? a : b)
+
+#define EMIT_LOGICAL(op_imm, op_norm) \
+ if (flags & SRC2_IMM) { \
+ if (op & SLJIT_SET_E) \
+ FAIL_IF(push_inst(compiler, op_imm | S(src1) | TA(EQUAL_FLAG) | IMM(src2), EQUAL_FLAG)); \
+ if (CHECK_FLAGS(SLJIT_SET_E)) \
+ FAIL_IF(push_inst(compiler, op_imm | S(src1) | T(dst) | IMM(src2), DR(dst))); \
+ } \
+ else { \
+ if (op & SLJIT_SET_E) \
+ FAIL_IF(push_inst(compiler, op_norm | S(src1) | T(src2) | DA(EQUAL_FLAG), EQUAL_FLAG)); \
+ if (CHECK_FLAGS(SLJIT_SET_E)) \
+ FAIL_IF(push_inst(compiler, op_norm | S(src1) | T(src2) | D(dst), DR(dst))); \
+ }
+
+#define EMIT_SHIFT(op_dimm, op_dimm32, op_imm, op_dv, op_v) \
+ if (flags & SRC2_IMM) { \
+ if (src2 >= 32) { \
+ SLJIT_ASSERT(!(op & SLJIT_I32_OP)); \
+ ins = op_dimm32; \
+ src2 -= 32; \
+ } \
+ else \
+ ins = (op & SLJIT_I32_OP) ? op_imm : op_dimm; \
+ if (op & SLJIT_SET_E) \
+ FAIL_IF(push_inst(compiler, ins | T(src1) | DA(EQUAL_FLAG) | SH_IMM(src2), EQUAL_FLAG)); \
+ if (CHECK_FLAGS(SLJIT_SET_E)) \
+ FAIL_IF(push_inst(compiler, ins | T(src1) | D(dst) | SH_IMM(src2), DR(dst))); \
+ } \
+ else { \
+ ins = (op & SLJIT_I32_OP) ? op_v : op_dv; \
+ if (op & SLJIT_SET_E) \
+ FAIL_IF(push_inst(compiler, ins | S(src2) | T(src1) | DA(EQUAL_FLAG), EQUAL_FLAG)); \
+ if (CHECK_FLAGS(SLJIT_SET_E)) \
+ FAIL_IF(push_inst(compiler, ins | S(src2) | T(src1) | D(dst), DR(dst))); \
+ }
+
+static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags,
+ sljit_s32 dst, sljit_s32 src1, sljit_sw src2)
+{
+ sljit_ins ins;
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_P:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if (dst != src2)
+ return push_inst(compiler, SELECT_OP(DADDU, ADDU) | S(src2) | TA(0) | D(dst), DR(dst));
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U8:
+ case SLJIT_MOV_S8:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
+ if (op == SLJIT_MOV_S8) {
+ FAIL_IF(push_inst(compiler, DSLL32 | T(src2) | D(dst) | SH_IMM(24), DR(dst)));
+ return push_inst(compiler, DSRA32 | T(dst) | D(dst) | SH_IMM(24), DR(dst));
+ }
+ return push_inst(compiler, ANDI | S(src2) | T(dst) | IMM(0xff), DR(dst));
+ }
+ else if (dst != src2)
+ SLJIT_ASSERT_STOP();
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U16:
+ case SLJIT_MOV_S16:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
+ if (op == SLJIT_MOV_S16) {
+ FAIL_IF(push_inst(compiler, DSLL32 | T(src2) | D(dst) | SH_IMM(16), DR(dst)));
+ return push_inst(compiler, DSRA32 | T(dst) | D(dst) | SH_IMM(16), DR(dst));
+ }
+ return push_inst(compiler, ANDI | S(src2) | T(dst) | IMM(0xffff), DR(dst));
+ }
+ else if (dst != src2)
+ SLJIT_ASSERT_STOP();
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U32:
+ SLJIT_ASSERT(!(op & SLJIT_I32_OP));
+ FAIL_IF(push_inst(compiler, DSLL32 | T(src2) | D(dst) | SH_IMM(0), DR(dst)));
+ return push_inst(compiler, DSRL32 | T(dst) | D(dst) | SH_IMM(0), DR(dst));
+
+ case SLJIT_MOV_S32:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ return push_inst(compiler, SLL | T(src2) | D(dst) | SH_IMM(0), DR(dst));
+
+ case SLJIT_NOT:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if (op & SLJIT_SET_E)
+ FAIL_IF(push_inst(compiler, NOR | S(src2) | T(src2) | DA(EQUAL_FLAG), EQUAL_FLAG));
+ if (CHECK_FLAGS(SLJIT_SET_E))
+ FAIL_IF(push_inst(compiler, NOR | S(src2) | T(src2) | D(dst), DR(dst)));
+ return SLJIT_SUCCESS;
+
+ case SLJIT_CLZ:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+#if (defined SLJIT_MIPS_R1 && SLJIT_MIPS_R1)
+ if (op & SLJIT_SET_E)
+ FAIL_IF(push_inst(compiler, SELECT_OP(DCLZ, CLZ) | S(src2) | TA(EQUAL_FLAG) | DA(EQUAL_FLAG), EQUAL_FLAG));
+ if (CHECK_FLAGS(SLJIT_SET_E))
+ FAIL_IF(push_inst(compiler, SELECT_OP(DCLZ, CLZ) | S(src2) | T(dst) | D(dst), DR(dst)));
+#else
+ if (SLJIT_UNLIKELY(flags & UNUSED_DEST)) {
+ FAIL_IF(push_inst(compiler, SELECT_OP(DSRL32, SRL) | T(src2) | DA(EQUAL_FLAG) | SH_IMM(31), EQUAL_FLAG));
+ return push_inst(compiler, XORI | SA(EQUAL_FLAG) | TA(EQUAL_FLAG) | IMM(1), EQUAL_FLAG);
+ }
+ /* Nearly all instructions are unmovable in the following sequence. */
+ FAIL_IF(push_inst(compiler, SELECT_OP(DADDU, ADDU) | S(src2) | TA(0) | D(TMP_REG1), DR(TMP_REG1)));
+ /* Check zero. */
+ FAIL_IF(push_inst(compiler, BEQ | S(TMP_REG1) | TA(0) | IMM(5), UNMOVABLE_INS));
+ FAIL_IF(push_inst(compiler, ORI | SA(0) | T(dst) | IMM((op & SLJIT_I32_OP) ? 32 : 64), UNMOVABLE_INS));
+ FAIL_IF(push_inst(compiler, SELECT_OP(DADDIU, ADDIU) | SA(0) | T(dst) | IMM(-1), DR(dst)));
+ /* Loop for searching the highest bit. */
+ FAIL_IF(push_inst(compiler, SELECT_OP(DADDIU, ADDIU) | S(dst) | T(dst) | IMM(1), DR(dst)));
+ FAIL_IF(push_inst(compiler, BGEZ | S(TMP_REG1) | IMM(-2), UNMOVABLE_INS));
+ FAIL_IF(push_inst(compiler, SELECT_OP(DSLL, SLL) | T(TMP_REG1) | D(TMP_REG1) | SH_IMM(1), UNMOVABLE_INS));
+ if (op & SLJIT_SET_E)
+ return push_inst(compiler, SELECT_OP(DADDU, ADDU) | S(dst) | TA(0) | DA(EQUAL_FLAG), EQUAL_FLAG);
+#endif
+ return SLJIT_SUCCESS;
+
+ case SLJIT_ADD:
+ if (flags & SRC2_IMM) {
+ if (op & SLJIT_SET_O) {
+ if (src2 >= 0)
+ FAIL_IF(push_inst(compiler, OR | S(src1) | T(src1) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ else
+ FAIL_IF(push_inst(compiler, NOR | S(src1) | T(src1) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ }
+ if (op & SLJIT_SET_E)
+ FAIL_IF(push_inst(compiler, SELECT_OP(DADDIU, ADDIU) | S(src1) | TA(EQUAL_FLAG) | IMM(src2), EQUAL_FLAG));
+ if (op & (SLJIT_SET_C | SLJIT_SET_O)) {
+ if (src2 >= 0)
+ FAIL_IF(push_inst(compiler, ORI | S(src1) | TA(ULESS_FLAG) | IMM(src2), ULESS_FLAG));
+ else {
+ FAIL_IF(push_inst(compiler, SELECT_OP(DADDIU, ADDIU) | SA(0) | TA(ULESS_FLAG) | IMM(src2), ULESS_FLAG));
+ FAIL_IF(push_inst(compiler, OR | S(src1) | TA(ULESS_FLAG) | DA(ULESS_FLAG), ULESS_FLAG));
+ }
+ }
+ /* dst may be the same as src1 or src2. */
+ if (CHECK_FLAGS(SLJIT_SET_E))
+ FAIL_IF(push_inst(compiler, SELECT_OP(DADDIU, ADDIU) | S(src1) | T(dst) | IMM(src2), DR(dst)));
+ }
+ else {
+ if (op & SLJIT_SET_O)
+ FAIL_IF(push_inst(compiler, XOR | S(src1) | T(src2) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ if (op & SLJIT_SET_E)
+ FAIL_IF(push_inst(compiler, SELECT_OP(DADDU, ADDU) | S(src1) | T(src2) | DA(EQUAL_FLAG), EQUAL_FLAG));
+ if (op & (SLJIT_SET_C | SLJIT_SET_O))
+ FAIL_IF(push_inst(compiler, OR | S(src1) | T(src2) | DA(ULESS_FLAG), ULESS_FLAG));
+ /* dst may be the same as src1 or src2. */
+ if (CHECK_FLAGS(SLJIT_SET_E))
+ FAIL_IF(push_inst(compiler, SELECT_OP(DADDU, ADDU) | S(src1) | T(src2) | D(dst), DR(dst)));
+ }
+
+ /* a + b >= a | b (otherwise, the carry should be set to 1). */
+ if (op & (SLJIT_SET_C | SLJIT_SET_O))
+ FAIL_IF(push_inst(compiler, SLTU | S(dst) | TA(ULESS_FLAG) | DA(ULESS_FLAG), ULESS_FLAG));
+ if (!(op & SLJIT_SET_O))
+ return SLJIT_SUCCESS;
+ FAIL_IF(push_inst(compiler, SELECT_OP(DSLL32, SLL) | TA(ULESS_FLAG) | D(TMP_REG1) | SH_IMM(31), DR(TMP_REG1)));
+ FAIL_IF(push_inst(compiler, XOR | S(TMP_REG1) | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ FAIL_IF(push_inst(compiler, XOR | S(dst) | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ return push_inst(compiler, SELECT_OP(DSRL32, SLL) | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG) | SH_IMM(31), OVERFLOW_FLAG);
+
+ case SLJIT_ADDC:
+ if (flags & SRC2_IMM) {
+ if (op & SLJIT_SET_C) {
+ if (src2 >= 0)
+ FAIL_IF(push_inst(compiler, ORI | S(src1) | TA(OVERFLOW_FLAG) | IMM(src2), OVERFLOW_FLAG));
+ else {
+ FAIL_IF(push_inst(compiler, SELECT_OP(DADDIU, ADDIU) | SA(0) | TA(OVERFLOW_FLAG) | IMM(src2), OVERFLOW_FLAG));
+ FAIL_IF(push_inst(compiler, OR | S(src1) | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ }
+ }
+ FAIL_IF(push_inst(compiler, SELECT_OP(DADDIU, ADDIU) | S(src1) | T(dst) | IMM(src2), DR(dst)));
+ } else {
+ if (op & SLJIT_SET_C)
+ FAIL_IF(push_inst(compiler, OR | S(src1) | T(src2) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ /* dst may be the same as src1 or src2. */
+ FAIL_IF(push_inst(compiler, SELECT_OP(DADDU, ADDU) | S(src1) | T(src2) | D(dst), DR(dst)));
+ }
+ if (op & SLJIT_SET_C)
+ FAIL_IF(push_inst(compiler, SLTU | S(dst) | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+
+ FAIL_IF(push_inst(compiler, SELECT_OP(DADDU, ADDU) | S(dst) | TA(ULESS_FLAG) | D(dst), DR(dst)));
+ if (!(op & SLJIT_SET_C))
+ return SLJIT_SUCCESS;
+
+ /* Set ULESS_FLAG (dst == 0) && (ULESS_FLAG == 1). */
+ FAIL_IF(push_inst(compiler, SLTU | S(dst) | TA(ULESS_FLAG) | DA(ULESS_FLAG), ULESS_FLAG));
+ /* Set carry flag. */
+ return push_inst(compiler, OR | SA(ULESS_FLAG) | TA(OVERFLOW_FLAG) | DA(ULESS_FLAG), ULESS_FLAG);
+
+ case SLJIT_SUB:
+ if ((flags & SRC2_IMM) && ((op & (SLJIT_SET_U | SLJIT_SET_S)) || src2 == SIMM_MIN)) {
+ FAIL_IF(push_inst(compiler, ADDIU | SA(0) | T(TMP_REG2) | IMM(src2), DR(TMP_REG2)));
+ src2 = TMP_REG2;
+ flags &= ~SRC2_IMM;
+ }
+
+ if (flags & SRC2_IMM) {
+ if (op & SLJIT_SET_O) {
+ if (src2 >= 0)
+ FAIL_IF(push_inst(compiler, OR | S(src1) | T(src1) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ else
+ FAIL_IF(push_inst(compiler, NOR | S(src1) | T(src1) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ }
+ if (op & SLJIT_SET_E)
+ FAIL_IF(push_inst(compiler, SELECT_OP(DADDIU, ADDIU) | S(src1) | TA(EQUAL_FLAG) | IMM(-src2), EQUAL_FLAG));
+ if (op & (SLJIT_SET_C | SLJIT_SET_O))
+ FAIL_IF(push_inst(compiler, SLTIU | S(src1) | TA(ULESS_FLAG) | IMM(src2), ULESS_FLAG));
+ /* dst may be the same as src1 or src2. */
+ if (CHECK_FLAGS(SLJIT_SET_E))
+ FAIL_IF(push_inst(compiler, SELECT_OP(DADDIU, ADDIU) | S(src1) | T(dst) | IMM(-src2), DR(dst)));
+ }
+ else {
+ if (op & SLJIT_SET_O)
+ FAIL_IF(push_inst(compiler, XOR | S(src1) | T(src2) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ if (op & SLJIT_SET_E)
+ FAIL_IF(push_inst(compiler, SELECT_OP(DSUBU, SUBU) | S(src1) | T(src2) | DA(EQUAL_FLAG), EQUAL_FLAG));
+ if (op & (SLJIT_SET_U | SLJIT_SET_C | SLJIT_SET_O))
+ FAIL_IF(push_inst(compiler, SLTU | S(src1) | T(src2) | DA(ULESS_FLAG), ULESS_FLAG));
+ if (op & SLJIT_SET_U)
+ FAIL_IF(push_inst(compiler, SLTU | S(src2) | T(src1) | DA(UGREATER_FLAG), UGREATER_FLAG));
+ if (op & SLJIT_SET_S) {
+ FAIL_IF(push_inst(compiler, SLT | S(src1) | T(src2) | DA(LESS_FLAG), LESS_FLAG));
+ FAIL_IF(push_inst(compiler, SLT | S(src2) | T(src1) | DA(GREATER_FLAG), GREATER_FLAG));
+ }
+ /* dst may be the same as src1 or src2. */
+ if (CHECK_FLAGS(SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_C))
+ FAIL_IF(push_inst(compiler, SELECT_OP(DSUBU, SUBU) | S(src1) | T(src2) | D(dst), DR(dst)));
+ }
+
+ if (!(op & SLJIT_SET_O))
+ return SLJIT_SUCCESS;
+ FAIL_IF(push_inst(compiler, SELECT_OP(DSLL32, SLL) | TA(ULESS_FLAG) | D(TMP_REG1) | SH_IMM(31), DR(TMP_REG1)));
+ FAIL_IF(push_inst(compiler, XOR | S(TMP_REG1) | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ FAIL_IF(push_inst(compiler, XOR | S(dst) | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ return push_inst(compiler, SELECT_OP(DSRL32, SRL) | TA(OVERFLOW_FLAG) | DA(OVERFLOW_FLAG) | SH_IMM(31), OVERFLOW_FLAG);
+
+ case SLJIT_SUBC:
+ if ((flags & SRC2_IMM) && src2 == SIMM_MIN) {
+ FAIL_IF(push_inst(compiler, ADDIU | SA(0) | T(TMP_REG2) | IMM(src2), DR(TMP_REG2)));
+ src2 = TMP_REG2;
+ flags &= ~SRC2_IMM;
+ }
+
+ if (flags & SRC2_IMM) {
+ if (op & SLJIT_SET_C)
+ FAIL_IF(push_inst(compiler, SLTIU | S(src1) | TA(OVERFLOW_FLAG) | IMM(src2), OVERFLOW_FLAG));
+ /* dst may be the same as src1 or src2. */
+ FAIL_IF(push_inst(compiler, SELECT_OP(DADDIU, ADDIU) | S(src1) | T(dst) | IMM(-src2), DR(dst)));
+ }
+ else {
+ if (op & SLJIT_SET_C)
+ FAIL_IF(push_inst(compiler, SLTU | S(src1) | T(src2) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG));
+ /* dst may be the same as src1 or src2. */
+ FAIL_IF(push_inst(compiler, SELECT_OP(DSUBU, SUBU) | S(src1) | T(src2) | D(dst), DR(dst)));
+ }
+
+ if (op & SLJIT_SET_C)
+ FAIL_IF(push_inst(compiler, SLTU | S(dst) | TA(ULESS_FLAG) | DA(LESS_FLAG), LESS_FLAG));
+
+ FAIL_IF(push_inst(compiler, SELECT_OP(DSUBU, SUBU) | S(dst) | TA(ULESS_FLAG) | D(dst), DR(dst)));
+ return (op & SLJIT_SET_C) ? push_inst(compiler, OR | SA(OVERFLOW_FLAG) | TA(LESS_FLAG) | DA(ULESS_FLAG), ULESS_FLAG) : SLJIT_SUCCESS;
+
+ case SLJIT_MUL:
+ SLJIT_ASSERT(!(flags & SRC2_IMM));
+ if (!(op & SLJIT_SET_O)) {
+#if (defined SLJIT_MIPS_R1 && SLJIT_MIPS_R1)
+ if (op & SLJIT_I32_OP)
+ return push_inst(compiler, MUL | S(src1) | T(src2) | D(dst), DR(dst));
+ FAIL_IF(push_inst(compiler, DMULT | S(src1) | T(src2), MOVABLE_INS));
+ return push_inst(compiler, MFLO | D(dst), DR(dst));
+#else
+ FAIL_IF(push_inst(compiler, SELECT_OP(DMULT, MULT) | S(src1) | T(src2), MOVABLE_INS));
+ return push_inst(compiler, MFLO | D(dst), DR(dst));
+#endif
+ }
+ FAIL_IF(push_inst(compiler, SELECT_OP(DMULT, MULT) | S(src1) | T(src2), MOVABLE_INS));
+ FAIL_IF(push_inst(compiler, MFHI | DA(ULESS_FLAG), ULESS_FLAG));
+ FAIL_IF(push_inst(compiler, MFLO | D(dst), DR(dst)));
+ FAIL_IF(push_inst(compiler, SELECT_OP(DSRA32, SRA) | T(dst) | DA(UGREATER_FLAG) | SH_IMM(31), UGREATER_FLAG));
+ return push_inst(compiler, SELECT_OP(DSUBU, SUBU) | SA(ULESS_FLAG) | TA(UGREATER_FLAG) | DA(OVERFLOW_FLAG), OVERFLOW_FLAG);
+
+ case SLJIT_AND:
+ EMIT_LOGICAL(ANDI, AND);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_OR:
+ EMIT_LOGICAL(ORI, OR);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_XOR:
+ EMIT_LOGICAL(XORI, XOR);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_SHL:
+ EMIT_SHIFT(DSLL, DSLL32, SLL, DSLLV, SLLV);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_LSHR:
+ EMIT_SHIFT(DSRL, DSRL32, SRL, DSRLV, SRLV);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_ASHR:
+ EMIT_SHIFT(DSRA, DSRA32, SRA, DSRAV, SRAV);
+ return SLJIT_SUCCESS;
+ }
+
+ SLJIT_ASSERT_STOP();
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw init_value)
+{
+ FAIL_IF(push_inst(compiler, LUI | T(dst) | IMM(init_value >> 48), DR(dst)));
+ FAIL_IF(push_inst(compiler, ORI | S(dst) | T(dst) | IMM(init_value >> 32), DR(dst)));
+ FAIL_IF(push_inst(compiler, DSLL | T(dst) | D(dst) | SH_IMM(16), DR(dst)));
+ FAIL_IF(push_inst(compiler, ORI | S(dst) | T(dst) | IMM(init_value >> 16), DR(dst)));
+ FAIL_IF(push_inst(compiler, DSLL | T(dst) | D(dst) | SH_IMM(16), DR(dst)));
+ return push_inst(compiler, ORI | S(dst) | T(dst) | IMM(init_value), DR(dst));
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset)
+{
+ sljit_ins *inst = (sljit_ins *)addr;
+
+ inst[0] = (inst[0] & 0xffff0000) | ((new_target >> 48) & 0xffff);
+ inst[1] = (inst[1] & 0xffff0000) | ((new_target >> 32) & 0xffff);
+ inst[3] = (inst[3] & 0xffff0000) | ((new_target >> 16) & 0xffff);
+ inst[5] = (inst[5] & 0xffff0000) | (new_target & 0xffff);
+ inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 6);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset)
+{
+ sljit_ins *inst = (sljit_ins *)addr;
+
+ inst[0] = (inst[0] & 0xffff0000) | ((new_constant >> 48) & 0xffff);
+ inst[1] = (inst[1] & 0xffff0000) | ((new_constant >> 32) & 0xffff);
+ inst[3] = (inst[3] & 0xffff0000) | ((new_constant >> 16) & 0xffff);
+ inst[5] = (inst[5] & 0xffff0000) | (new_constant & 0xffff);
+ inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 6);
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeMIPS_common.c b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_common.c
new file mode 100644
index 0000000000..fe37e3ef00
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativeMIPS_common.c
@@ -0,0 +1,2147 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* Latest MIPS architecture. */
+/* Automatically detect SLJIT_MIPS_R1 */
+
+SLJIT_API_FUNC_ATTRIBUTE const char* sljit_get_platform_name(void)
+{
+#if (defined SLJIT_MIPS_R1 && SLJIT_MIPS_R1)
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+ return "MIPS32-R1" SLJIT_CPUINFO;
+#else
+ return "MIPS64-R1" SLJIT_CPUINFO;
+#endif
+#else /* SLJIT_MIPS_R1 */
+ return "MIPS III" SLJIT_CPUINFO;
+#endif
+}
+
+/* Length of an instruction word
+ Both for mips-32 and mips-64 */
+typedef sljit_u32 sljit_ins;
+
+#define TMP_REG1 (SLJIT_NUMBER_OF_REGISTERS + 2)
+#define TMP_REG2 (SLJIT_NUMBER_OF_REGISTERS + 3)
+#define TMP_REG3 (SLJIT_NUMBER_OF_REGISTERS + 4)
+
+/* For position independent code, t9 must contain the function address. */
+#define PIC_ADDR_REG TMP_REG2
+
+/* Floating point status register. */
+#define FCSR_REG 31
+/* Return address register. */
+#define RETURN_ADDR_REG 31
+
+/* Flags are kept in volatile registers. */
+#define EQUAL_FLAG 12
+/* And carry flag as well. */
+#define ULESS_FLAG 13
+#define UGREATER_FLAG 14
+#define LESS_FLAG 15
+#define GREATER_FLAG 31
+#define OVERFLOW_FLAG 1
+
+#define TMP_FREG1 (0)
+#define TMP_FREG2 ((SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1) << 1)
+
+static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 5] = {
+ 0, 2, 5, 6, 7, 8, 9, 10, 11, 24, 23, 22, 21, 20, 19, 18, 17, 16, 29, 3, 25, 4
+};
+
+/* --------------------------------------------------------------------- */
+/* Instrucion forms */
+/* --------------------------------------------------------------------- */
+
+#define S(s) (reg_map[s] << 21)
+#define T(t) (reg_map[t] << 16)
+#define D(d) (reg_map[d] << 11)
+/* Absolute registers. */
+#define SA(s) ((s) << 21)
+#define TA(t) ((t) << 16)
+#define DA(d) ((d) << 11)
+#define FT(t) ((t) << 16)
+#define FS(s) ((s) << 11)
+#define FD(d) ((d) << 6)
+#define IMM(imm) ((imm) & 0xffff)
+#define SH_IMM(imm) ((imm) << 6)
+
+#define DR(dr) (reg_map[dr])
+#define HI(opcode) ((opcode) << 26)
+#define LO(opcode) (opcode)
+/* S = (16 << 21) D = (17 << 21) */
+#define FMT_S (16 << 21)
+
+#define ABS_S (HI(17) | FMT_S | LO(5))
+#define ADD_S (HI(17) | FMT_S | LO(0))
+#define ADDIU (HI(9))
+#define ADDU (HI(0) | LO(33))
+#define AND (HI(0) | LO(36))
+#define ANDI (HI(12))
+#define B (HI(4))
+#define BAL (HI(1) | (17 << 16))
+#define BC1F (HI(17) | (8 << 21))
+#define BC1T (HI(17) | (8 << 21) | (1 << 16))
+#define BEQ (HI(4))
+#define BGEZ (HI(1) | (1 << 16))
+#define BGTZ (HI(7))
+#define BLEZ (HI(6))
+#define BLTZ (HI(1) | (0 << 16))
+#define BNE (HI(5))
+#define BREAK (HI(0) | LO(13))
+#define CFC1 (HI(17) | (2 << 21))
+#define C_UN_S (HI(17) | FMT_S | LO(49))
+#define C_UEQ_S (HI(17) | FMT_S | LO(51))
+#define C_ULE_S (HI(17) | FMT_S | LO(55))
+#define C_ULT_S (HI(17) | FMT_S | LO(53))
+#define CVT_S_S (HI(17) | FMT_S | LO(32))
+#define DADDIU (HI(25))
+#define DADDU (HI(0) | LO(45))
+#define DDIV (HI(0) | LO(30))
+#define DDIVU (HI(0) | LO(31))
+#define DIV (HI(0) | LO(26))
+#define DIVU (HI(0) | LO(27))
+#define DIV_S (HI(17) | FMT_S | LO(3))
+#define DMULT (HI(0) | LO(28))
+#define DMULTU (HI(0) | LO(29))
+#define DSLL (HI(0) | LO(56))
+#define DSLL32 (HI(0) | LO(60))
+#define DSLLV (HI(0) | LO(20))
+#define DSRA (HI(0) | LO(59))
+#define DSRA32 (HI(0) | LO(63))
+#define DSRAV (HI(0) | LO(23))
+#define DSRL (HI(0) | LO(58))
+#define DSRL32 (HI(0) | LO(62))
+#define DSRLV (HI(0) | LO(22))
+#define DSUBU (HI(0) | LO(47))
+#define J (HI(2))
+#define JAL (HI(3))
+#define JALR (HI(0) | LO(9))
+#define JR (HI(0) | LO(8))
+#define LD (HI(55))
+#define LUI (HI(15))
+#define LW (HI(35))
+#define MFC1 (HI(17))
+#define MFHI (HI(0) | LO(16))
+#define MFLO (HI(0) | LO(18))
+#define MOV_S (HI(17) | FMT_S | LO(6))
+#define MTC1 (HI(17) | (4 << 21))
+#define MUL_S (HI(17) | FMT_S | LO(2))
+#define MULT (HI(0) | LO(24))
+#define MULTU (HI(0) | LO(25))
+#define NEG_S (HI(17) | FMT_S | LO(7))
+#define NOP (HI(0) | LO(0))
+#define NOR (HI(0) | LO(39))
+#define OR (HI(0) | LO(37))
+#define ORI (HI(13))
+#define SD (HI(63))
+#define SLT (HI(0) | LO(42))
+#define SLTI (HI(10))
+#define SLTIU (HI(11))
+#define SLTU (HI(0) | LO(43))
+#define SLL (HI(0) | LO(0))
+#define SLLV (HI(0) | LO(4))
+#define SRL (HI(0) | LO(2))
+#define SRLV (HI(0) | LO(6))
+#define SRA (HI(0) | LO(3))
+#define SRAV (HI(0) | LO(7))
+#define SUB_S (HI(17) | FMT_S | LO(1))
+#define SUBU (HI(0) | LO(35))
+#define SW (HI(43))
+#define TRUNC_W_S (HI(17) | FMT_S | LO(13))
+#define XOR (HI(0) | LO(38))
+#define XORI (HI(14))
+
+#if (defined SLJIT_MIPS_R1 && SLJIT_MIPS_R1)
+#define CLZ (HI(28) | LO(32))
+#define DCLZ (HI(28) | LO(36))
+#define MUL (HI(28) | LO(2))
+#define SEB (HI(31) | (16 << 6) | LO(32))
+#define SEH (HI(31) | (24 << 6) | LO(32))
+#endif
+
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+#define ADDU_W ADDU
+#define ADDIU_W ADDIU
+#define SLL_W SLL
+#define SUBU_W SUBU
+#else
+#define ADDU_W DADDU
+#define ADDIU_W DADDIU
+#define SLL_W DSLL
+#define SUBU_W DSUBU
+#endif
+
+#define SIMM_MAX (0x7fff)
+#define SIMM_MIN (-0x8000)
+#define UIMM_MAX (0xffff)
+
+/* dest_reg is the absolute name of the register
+ Useful for reordering instructions in the delay slot. */
+static sljit_s32 push_inst(struct sljit_compiler *compiler, sljit_ins ins, sljit_s32 delay_slot)
+{
+ SLJIT_ASSERT(delay_slot == MOVABLE_INS || delay_slot >= UNMOVABLE_INS
+ || delay_slot == ((ins >> 11) & 0x1f) || delay_slot == ((ins >> 16) & 0x1f));
+ sljit_ins *ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins));
+ FAIL_IF(!ptr);
+ *ptr = ins;
+ compiler->size++;
+ compiler->delay_slot = delay_slot;
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_ins invert_branch(sljit_s32 flags)
+{
+ return (flags & IS_BIT26_COND) ? (1 << 26) : (1 << 16);
+}
+
+static SLJIT_INLINE sljit_ins* detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_ins *code, sljit_sw executable_offset)
+{
+ sljit_sw diff;
+ sljit_uw target_addr;
+ sljit_ins *inst;
+ sljit_ins saved_inst;
+
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+ if (jump->flags & (SLJIT_REWRITABLE_JUMP | IS_CALL))
+ return code_ptr;
+#else
+ if (jump->flags & SLJIT_REWRITABLE_JUMP)
+ return code_ptr;
+#endif
+
+ if (jump->flags & JUMP_ADDR)
+ target_addr = jump->u.target;
+ else {
+ SLJIT_ASSERT(jump->flags & JUMP_LABEL);
+ target_addr = (sljit_uw)(code + jump->u.label->size) + (sljit_uw)executable_offset;
+ }
+
+ inst = (sljit_ins *)jump->addr;
+ if (jump->flags & IS_COND)
+ inst--;
+
+#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
+ if (jump->flags & IS_CALL)
+ goto keep_address;
+#endif
+
+ /* B instructions. */
+ if (jump->flags & IS_MOVABLE) {
+ diff = ((sljit_sw)target_addr - (sljit_sw)inst - executable_offset) >> 2;
+ if (diff <= SIMM_MAX && diff >= SIMM_MIN) {
+ jump->flags |= PATCH_B;
+
+ if (!(jump->flags & IS_COND)) {
+ inst[0] = inst[-1];
+ inst[-1] = (jump->flags & IS_JAL) ? BAL : B;
+ jump->addr -= sizeof(sljit_ins);
+ return inst;
+ }
+ saved_inst = inst[0];
+ inst[0] = inst[-1];
+ inst[-1] = saved_inst ^ invert_branch(jump->flags);
+ jump->addr -= 2 * sizeof(sljit_ins);
+ return inst;
+ }
+ }
+ else {
+ diff = ((sljit_sw)target_addr - (sljit_sw)(inst + 1) - executable_offset) >> 2;
+ if (diff <= SIMM_MAX && diff >= SIMM_MIN) {
+ jump->flags |= PATCH_B;
+
+ if (!(jump->flags & IS_COND)) {
+ inst[0] = (jump->flags & IS_JAL) ? BAL : B;
+ inst[1] = NOP;
+ return inst + 1;
+ }
+ inst[0] = inst[0] ^ invert_branch(jump->flags);
+ inst[1] = NOP;
+ jump->addr -= sizeof(sljit_ins);
+ return inst + 1;
+ }
+ }
+
+ if (jump->flags & IS_COND) {
+ if ((jump->flags & IS_MOVABLE) && (target_addr & ~0xfffffff) == ((jump->addr + 2 * sizeof(sljit_ins)) & ~0xfffffff)) {
+ jump->flags |= PATCH_J;
+ saved_inst = inst[0];
+ inst[0] = inst[-1];
+ inst[-1] = (saved_inst & 0xffff0000) | 3;
+ inst[1] = J;
+ inst[2] = NOP;
+ return inst + 2;
+ }
+ else if ((target_addr & ~0xfffffff) == ((jump->addr + 3 * sizeof(sljit_ins)) & ~0xfffffff)) {
+ jump->flags |= PATCH_J;
+ inst[0] = (inst[0] & 0xffff0000) | 3;
+ inst[1] = NOP;
+ inst[2] = J;
+ inst[3] = NOP;
+ jump->addr += sizeof(sljit_ins);
+ return inst + 3;
+ }
+ }
+ else {
+ /* J instuctions. */
+ if ((jump->flags & IS_MOVABLE) && (target_addr & ~0xfffffff) == (jump->addr & ~0xfffffff)) {
+ jump->flags |= PATCH_J;
+ inst[0] = inst[-1];
+ inst[-1] = (jump->flags & IS_JAL) ? JAL : J;
+ jump->addr -= sizeof(sljit_ins);
+ return inst;
+ }
+
+ if ((target_addr & ~0xfffffff) == ((jump->addr + sizeof(sljit_ins)) & ~0xfffffff)) {
+ jump->flags |= PATCH_J;
+ inst[0] = (jump->flags & IS_JAL) ? JAL : J;
+ inst[1] = NOP;
+ return inst + 1;
+ }
+ }
+
+#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
+keep_address:
+ if (target_addr <= 0x7fffffff) {
+ jump->flags |= PATCH_ABS32;
+ if (jump->flags & IS_COND) {
+ inst[0] -= 4;
+ inst++;
+ }
+ inst[2] = inst[6];
+ inst[3] = inst[7];
+ return inst + 3;
+ }
+ if (target_addr <= 0x7fffffffffffl) {
+ jump->flags |= PATCH_ABS48;
+ if (jump->flags & IS_COND) {
+ inst[0] -= 2;
+ inst++;
+ }
+ inst[4] = inst[6];
+ inst[5] = inst[7];
+ return inst + 5;
+ }
+#endif
+
+ return code_ptr;
+}
+
+#ifdef __GNUC__
+static __attribute__ ((noinline)) void sljit_cache_flush(void* code, void* code_ptr)
+{
+ SLJIT_CACHE_FLUSH(code, code_ptr);
+}
+#endif
+
+SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
+{
+ struct sljit_memory_fragment *buf;
+ sljit_ins *code;
+ sljit_ins *code_ptr;
+ sljit_ins *buf_ptr;
+ sljit_ins *buf_end;
+ sljit_uw word_count;
+ sljit_sw executable_offset;
+ sljit_uw addr;
+
+ struct sljit_label *label;
+ struct sljit_jump *jump;
+ struct sljit_const *const_;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_generate_code(compiler));
+ reverse_buf(compiler);
+
+ code = (sljit_ins*)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_ins));
+ PTR_FAIL_WITH_EXEC_IF(code);
+ buf = compiler->buf;
+
+ code_ptr = code;
+ word_count = 0;
+ executable_offset = SLJIT_EXEC_OFFSET(code);
+
+ label = compiler->labels;
+ jump = compiler->jumps;
+ const_ = compiler->consts;
+
+ do {
+ buf_ptr = (sljit_ins*)buf->memory;
+ buf_end = buf_ptr + (buf->used_size >> 2);
+ do {
+ *code_ptr = *buf_ptr++;
+ SLJIT_ASSERT(!label || label->size >= word_count);
+ SLJIT_ASSERT(!jump || jump->addr >= word_count);
+ SLJIT_ASSERT(!const_ || const_->addr >= word_count);
+ /* These structures are ordered by their address. */
+ if (label && label->size == word_count) {
+ label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
+ label->size = code_ptr - code;
+ label = label->next;
+ }
+ if (jump && jump->addr == word_count) {
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+ jump->addr = (sljit_uw)(code_ptr - 3);
+#else
+ jump->addr = (sljit_uw)(code_ptr - 7);
+#endif
+ code_ptr = detect_jump_type(jump, code_ptr, code, executable_offset);
+ jump = jump->next;
+ }
+ if (const_ && const_->addr == word_count) {
+ /* Just recording the address. */
+ const_->addr = (sljit_uw)code_ptr;
+ const_ = const_->next;
+ }
+ code_ptr ++;
+ word_count ++;
+ } while (buf_ptr < buf_end);
+
+ buf = buf->next;
+ } while (buf);
+
+ if (label && label->size == word_count) {
+ label->addr = (sljit_uw)code_ptr;
+ label->size = code_ptr - code;
+ label = label->next;
+ }
+
+ SLJIT_ASSERT(!label);
+ SLJIT_ASSERT(!jump);
+ SLJIT_ASSERT(!const_);
+ SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size);
+
+ jump = compiler->jumps;
+ while (jump) {
+ do {
+ addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target;
+ buf_ptr = (sljit_ins *)jump->addr;
+
+ if (jump->flags & PATCH_B) {
+ addr = (sljit_sw)(addr - ((sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset) + sizeof(sljit_ins))) >> 2;
+ SLJIT_ASSERT((sljit_sw)addr <= SIMM_MAX && (sljit_sw)addr >= SIMM_MIN);
+ buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | (addr & 0xffff);
+ break;
+ }
+ if (jump->flags & PATCH_J) {
+ SLJIT_ASSERT((addr & ~0xfffffff) == (((sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset) + sizeof(sljit_ins)) & ~0xfffffff));
+ buf_ptr[0] |= (addr >> 2) & 0x03ffffff;
+ break;
+ }
+
+ /* Set the fields of immediate loads. */
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+ buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 16) & 0xffff);
+ buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | (addr & 0xffff);
+#else
+ if (jump->flags & PATCH_ABS32) {
+ SLJIT_ASSERT(addr <= 0x7fffffff);
+ buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 16) & 0xffff);
+ buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | (addr & 0xffff);
+ }
+ else if (jump->flags & PATCH_ABS48) {
+ SLJIT_ASSERT(addr <= 0x7fffffffffffl);
+ buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 32) & 0xffff);
+ buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | ((addr >> 16) & 0xffff);
+ buf_ptr[3] = (buf_ptr[3] & 0xffff0000) | (addr & 0xffff);
+ }
+ else {
+ buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 48) & 0xffff);
+ buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | ((addr >> 32) & 0xffff);
+ buf_ptr[3] = (buf_ptr[3] & 0xffff0000) | ((addr >> 16) & 0xffff);
+ buf_ptr[5] = (buf_ptr[5] & 0xffff0000) | (addr & 0xffff);
+ }
+#endif
+ } while (0);
+ jump = jump->next;
+ }
+
+ compiler->error = SLJIT_ERR_COMPILED;
+ compiler->executable_offset = executable_offset;
+ compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins);
+
+ code = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset);
+ code_ptr = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
+
+#ifndef __GNUC__
+ SLJIT_CACHE_FLUSH(code, code_ptr);
+#else
+ /* GCC workaround for invalid code generation with -O2. */
+ sljit_cache_flush(code, code_ptr);
+#endif
+ return code;
+}
+
+/* --------------------------------------------------------------------- */
+/* Entry, exit */
+/* --------------------------------------------------------------------- */
+
+/* Creates an index in data_transfer_insts array. */
+#define LOAD_DATA 0x01
+#define WORD_DATA 0x00
+#define BYTE_DATA 0x02
+#define HALF_DATA 0x04
+#define INT_DATA 0x06
+#define SIGNED_DATA 0x08
+/* Separates integer and floating point registers */
+#define GPR_REG 0x0f
+#define DOUBLE_DATA 0x10
+#define SINGLE_DATA 0x12
+
+#define MEM_MASK 0x1f
+
+#define WRITE_BACK 0x00020
+#define ARG_TEST 0x00040
+#define ALT_KEEP_CACHE 0x00080
+#define CUMULATIVE_OP 0x00100
+#define LOGICAL_OP 0x00200
+#define IMM_OP 0x00400
+#define SRC2_IMM 0x00800
+
+#define UNUSED_DEST 0x01000
+#define REG_DEST 0x02000
+#define REG1_SOURCE 0x04000
+#define REG2_SOURCE 0x08000
+#define SLOW_SRC1 0x10000
+#define SLOW_SRC2 0x20000
+#define SLOW_DEST 0x40000
+
+/* Only these flags are set. UNUSED_DEST is not set when no flags should be set. */
+#define CHECK_FLAGS(list) \
+ (!(flags & UNUSED_DEST) || (op & GET_FLAGS(~(list))))
+
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+#define STACK_STORE SW
+#define STACK_LOAD LW
+#else
+#define STACK_STORE SD
+#define STACK_LOAD LD
+#endif
+
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+#include "sljitNativeMIPS_32.c"
+#else
+#include "sljitNativeMIPS_64.c"
+#endif
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ sljit_ins base;
+ sljit_s32 i, tmp, offs;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1) + SLJIT_LOCALS_OFFSET;
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+ local_size = (local_size + 15) & ~0xf;
+#else
+ local_size = (local_size + 31) & ~0x1f;
+#endif
+ compiler->local_size = local_size;
+
+ if (local_size <= SIMM_MAX) {
+ /* Frequent case. */
+ FAIL_IF(push_inst(compiler, ADDIU_W | S(SLJIT_SP) | T(SLJIT_SP) | IMM(-local_size), DR(SLJIT_SP)));
+ base = S(SLJIT_SP);
+ }
+ else {
+ FAIL_IF(load_immediate(compiler, DR(TMP_REG1), local_size));
+ FAIL_IF(push_inst(compiler, ADDU_W | S(SLJIT_SP) | TA(0) | D(TMP_REG2), DR(TMP_REG2)));
+ FAIL_IF(push_inst(compiler, SUBU_W | S(SLJIT_SP) | T(TMP_REG1) | D(SLJIT_SP), DR(SLJIT_SP)));
+ base = S(TMP_REG2);
+ local_size = 0;
+ }
+
+ offs = local_size - (sljit_sw)(sizeof(sljit_sw));
+ FAIL_IF(push_inst(compiler, STACK_STORE | base | TA(RETURN_ADDR_REG) | IMM(offs), MOVABLE_INS));
+
+ tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = SLJIT_S0; i >= tmp; i--) {
+ offs -= (sljit_s32)(sizeof(sljit_sw));
+ FAIL_IF(push_inst(compiler, STACK_STORE | base | T(i) | IMM(offs), MOVABLE_INS));
+ }
+
+ for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--) {
+ offs -= (sljit_s32)(sizeof(sljit_sw));
+ FAIL_IF(push_inst(compiler, STACK_STORE | base | T(i) | IMM(offs), MOVABLE_INS));
+ }
+
+ if (args >= 1)
+ FAIL_IF(push_inst(compiler, ADDU_W | SA(4) | TA(0) | D(SLJIT_S0), DR(SLJIT_S0)));
+ if (args >= 2)
+ FAIL_IF(push_inst(compiler, ADDU_W | SA(5) | TA(0) | D(SLJIT_S1), DR(SLJIT_S1)));
+ if (args >= 3)
+ FAIL_IF(push_inst(compiler, ADDU_W | SA(6) | TA(0) | D(SLJIT_S2), DR(SLJIT_S2)));
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1) + SLJIT_LOCALS_OFFSET;
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+ compiler->local_size = (local_size + 15) & ~0xf;
+#else
+ compiler->local_size = (local_size + 31) & ~0x1f;
+#endif
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 local_size, i, tmp, offs;
+ sljit_ins base;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_return(compiler, op, src, srcw));
+
+ FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
+
+ local_size = compiler->local_size;
+ if (local_size <= SIMM_MAX)
+ base = S(SLJIT_SP);
+ else {
+ FAIL_IF(load_immediate(compiler, DR(TMP_REG1), local_size));
+ FAIL_IF(push_inst(compiler, ADDU_W | S(SLJIT_SP) | T(TMP_REG1) | D(TMP_REG1), DR(TMP_REG1)));
+ base = S(TMP_REG1);
+ local_size = 0;
+ }
+
+ FAIL_IF(push_inst(compiler, STACK_LOAD | base | TA(RETURN_ADDR_REG) | IMM(local_size - (sljit_s32)sizeof(sljit_sw)), RETURN_ADDR_REG));
+ offs = local_size - (sljit_s32)GET_SAVED_REGISTERS_SIZE(compiler->scratches, compiler->saveds, 1);
+
+ tmp = compiler->scratches;
+ for (i = SLJIT_FIRST_SAVED_REG; i <= tmp; i++) {
+ FAIL_IF(push_inst(compiler, STACK_LOAD | base | T(i) | IMM(offs), DR(i)));
+ offs += (sljit_s32)(sizeof(sljit_sw));
+ }
+
+ tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = tmp; i <= SLJIT_S0; i++) {
+ FAIL_IF(push_inst(compiler, STACK_LOAD | base | T(i) | IMM(offs), DR(i)));
+ offs += (sljit_s32)(sizeof(sljit_sw));
+ }
+
+ SLJIT_ASSERT(offs == local_size - (sljit_sw)(sizeof(sljit_sw)));
+
+ FAIL_IF(push_inst(compiler, JR | SA(RETURN_ADDR_REG), UNMOVABLE_INS));
+ if (compiler->local_size <= SIMM_MAX)
+ return push_inst(compiler, ADDIU_W | S(SLJIT_SP) | T(SLJIT_SP) | IMM(compiler->local_size), UNMOVABLE_INS);
+ else
+ return push_inst(compiler, ADDU_W | S(TMP_REG1) | TA(0) | D(SLJIT_SP), UNMOVABLE_INS);
+}
+
+#undef STACK_STORE
+#undef STACK_LOAD
+
+/* --------------------------------------------------------------------- */
+/* Operators */
+/* --------------------------------------------------------------------- */
+
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+#define ARCH_32_64(a, b) a
+#else
+#define ARCH_32_64(a, b) b
+#endif
+
+static const sljit_ins data_transfer_insts[16 + 4] = {
+/* u w s */ ARCH_32_64(HI(43) /* sw */, HI(63) /* sd */),
+/* u w l */ ARCH_32_64(HI(35) /* lw */, HI(55) /* ld */),
+/* u b s */ HI(40) /* sb */,
+/* u b l */ HI(36) /* lbu */,
+/* u h s */ HI(41) /* sh */,
+/* u h l */ HI(37) /* lhu */,
+/* u i s */ HI(43) /* sw */,
+/* u i l */ ARCH_32_64(HI(35) /* lw */, HI(39) /* lwu */),
+
+/* s w s */ ARCH_32_64(HI(43) /* sw */, HI(63) /* sd */),
+/* s w l */ ARCH_32_64(HI(35) /* lw */, HI(55) /* ld */),
+/* s b s */ HI(40) /* sb */,
+/* s b l */ HI(32) /* lb */,
+/* s h s */ HI(41) /* sh */,
+/* s h l */ HI(33) /* lh */,
+/* s i s */ HI(43) /* sw */,
+/* s i l */ HI(35) /* lw */,
+
+/* d s */ HI(61) /* sdc1 */,
+/* d l */ HI(53) /* ldc1 */,
+/* s s */ HI(57) /* swc1 */,
+/* s l */ HI(49) /* lwc1 */,
+};
+
+#undef ARCH_32_64
+
+/* reg_ar is an absoulute register! */
+
+/* Can perform an operation using at most 1 instruction. */
+static sljit_s32 getput_arg_fast(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar, sljit_s32 arg, sljit_sw argw)
+{
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+
+ if ((!(flags & WRITE_BACK) || !(arg & REG_MASK)) && !(arg & OFFS_REG_MASK) && argw <= SIMM_MAX && argw >= SIMM_MIN) {
+ /* Works for both absoulte and relative addresses. */
+ if (SLJIT_UNLIKELY(flags & ARG_TEST))
+ return 1;
+ FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(arg & REG_MASK)
+ | TA(reg_ar) | IMM(argw), ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) ? reg_ar : MOVABLE_INS));
+ return -1;
+ }
+ return 0;
+}
+
+/* See getput_arg below.
+ Note: can_cache is called only for binary operators. Those
+ operators always uses word arguments without write back. */
+static sljit_s32 can_cache(sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw)
+{
+ SLJIT_ASSERT((arg & SLJIT_MEM) && (next_arg & SLJIT_MEM));
+
+ /* Simple operation except for updates. */
+ if (arg & OFFS_REG_MASK) {
+ argw &= 0x3;
+ next_argw &= 0x3;
+ if (argw && argw == next_argw && (arg == next_arg || (arg & OFFS_REG_MASK) == (next_arg & OFFS_REG_MASK)))
+ return 1;
+ return 0;
+ }
+
+ if (arg == next_arg) {
+ if (((next_argw - argw) <= SIMM_MAX && (next_argw - argw) >= SIMM_MIN))
+ return 1;
+ return 0;
+ }
+
+ return 0;
+}
+
+/* Emit the necessary instructions. See can_cache above. */
+static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar, sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw)
+{
+ sljit_s32 tmp_ar, base, delay_slot;
+
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+ if (!(next_arg & SLJIT_MEM)) {
+ next_arg = 0;
+ next_argw = 0;
+ }
+
+ if ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) {
+ tmp_ar = reg_ar;
+ delay_slot = reg_ar;
+ } else {
+ tmp_ar = DR(TMP_REG1);
+ delay_slot = MOVABLE_INS;
+ }
+ base = arg & REG_MASK;
+
+ if (SLJIT_UNLIKELY(arg & OFFS_REG_MASK)) {
+ argw &= 0x3;
+ if ((flags & WRITE_BACK) && reg_ar == DR(base)) {
+ SLJIT_ASSERT(!(flags & LOAD_DATA) && DR(TMP_REG1) != reg_ar);
+ FAIL_IF(push_inst(compiler, ADDU_W | SA(reg_ar) | TA(0) | D(TMP_REG1), DR(TMP_REG1)));
+ reg_ar = DR(TMP_REG1);
+ }
+
+ /* Using the cache. */
+ if (argw == compiler->cache_argw) {
+ if (!(flags & WRITE_BACK)) {
+ if (arg == compiler->cache_arg)
+ return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), delay_slot);
+ if ((SLJIT_MEM | (arg & OFFS_REG_MASK)) == compiler->cache_arg) {
+ if (arg == next_arg && argw == (next_argw & 0x3)) {
+ compiler->cache_arg = arg;
+ compiler->cache_argw = argw;
+ FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(TMP_REG3) | D(TMP_REG3), DR(TMP_REG3)));
+ return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), delay_slot);
+ }
+ FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(TMP_REG3) | DA(tmp_ar), tmp_ar));
+ return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_slot);
+ }
+ }
+ else {
+ if ((SLJIT_MEM | (arg & OFFS_REG_MASK)) == compiler->cache_arg) {
+ FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(TMP_REG3) | D(base), DR(base)));
+ return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(base) | TA(reg_ar), delay_slot);
+ }
+ }
+ }
+
+ if (SLJIT_UNLIKELY(argw)) {
+ compiler->cache_arg = SLJIT_MEM | (arg & OFFS_REG_MASK);
+ compiler->cache_argw = argw;
+ FAIL_IF(push_inst(compiler, SLL_W | T(OFFS_REG(arg)) | D(TMP_REG3) | SH_IMM(argw), DR(TMP_REG3)));
+ }
+
+ if (!(flags & WRITE_BACK)) {
+ if (arg == next_arg && argw == (next_argw & 0x3)) {
+ compiler->cache_arg = arg;
+ compiler->cache_argw = argw;
+ FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(!argw ? OFFS_REG(arg) : TMP_REG3) | D(TMP_REG3), DR(TMP_REG3)));
+ tmp_ar = DR(TMP_REG3);
+ }
+ else
+ FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(!argw ? OFFS_REG(arg) : TMP_REG3) | DA(tmp_ar), tmp_ar));
+ return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_slot);
+ }
+ FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(!argw ? OFFS_REG(arg) : TMP_REG3) | D(base), DR(base)));
+ return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(base) | TA(reg_ar), delay_slot);
+ }
+
+ if (SLJIT_UNLIKELY(flags & WRITE_BACK) && base) {
+ /* Update only applies if a base register exists. */
+ if (reg_ar == DR(base)) {
+ SLJIT_ASSERT(!(flags & LOAD_DATA) && DR(TMP_REG1) != reg_ar);
+ if (argw <= SIMM_MAX && argw >= SIMM_MIN) {
+ FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(base) | TA(reg_ar) | IMM(argw), MOVABLE_INS));
+ if (argw)
+ return push_inst(compiler, ADDIU_W | S(base) | T(base) | IMM(argw), DR(base));
+ return SLJIT_SUCCESS;
+ }
+ FAIL_IF(push_inst(compiler, ADDU_W | SA(reg_ar) | TA(0) | D(TMP_REG1), DR(TMP_REG1)));
+ reg_ar = DR(TMP_REG1);
+ }
+
+ if (argw <= SIMM_MAX && argw >= SIMM_MIN) {
+ if (argw)
+ FAIL_IF(push_inst(compiler, ADDIU_W | S(base) | T(base) | IMM(argw), DR(base)));
+ }
+ else {
+ if (compiler->cache_arg == SLJIT_MEM && argw - compiler->cache_argw <= SIMM_MAX && argw - compiler->cache_argw >= SIMM_MIN) {
+ if (argw != compiler->cache_argw) {
+ FAIL_IF(push_inst(compiler, ADDIU_W | S(TMP_REG3) | T(TMP_REG3) | IMM(argw - compiler->cache_argw), DR(TMP_REG3)));
+ compiler->cache_argw = argw;
+ }
+ FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(TMP_REG3) | D(base), DR(base)));
+ }
+ else {
+ compiler->cache_arg = SLJIT_MEM;
+ compiler->cache_argw = argw;
+ FAIL_IF(load_immediate(compiler, DR(TMP_REG3), argw));
+ FAIL_IF(push_inst(compiler, ADDU_W | S(base) | T(TMP_REG3) | D(base), DR(base)));
+ }
+ }
+ return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(base) | TA(reg_ar), delay_slot);
+ }
+
+ if (compiler->cache_arg == arg && argw - compiler->cache_argw <= SIMM_MAX && argw - compiler->cache_argw >= SIMM_MIN) {
+ if (argw != compiler->cache_argw) {
+ FAIL_IF(push_inst(compiler, ADDIU_W | S(TMP_REG3) | T(TMP_REG3) | IMM(argw - compiler->cache_argw), DR(TMP_REG3)));
+ compiler->cache_argw = argw;
+ }
+ return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), delay_slot);
+ }
+
+ if (compiler->cache_arg == SLJIT_MEM && argw - compiler->cache_argw <= SIMM_MAX && argw - compiler->cache_argw >= SIMM_MIN) {
+ if (argw != compiler->cache_argw)
+ FAIL_IF(push_inst(compiler, ADDIU_W | S(TMP_REG3) | T(TMP_REG3) | IMM(argw - compiler->cache_argw), DR(TMP_REG3)));
+ }
+ else {
+ compiler->cache_arg = SLJIT_MEM;
+ FAIL_IF(load_immediate(compiler, DR(TMP_REG3), argw));
+ }
+ compiler->cache_argw = argw;
+
+ if (!base)
+ return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), delay_slot);
+
+ if (arg == next_arg && next_argw - argw <= SIMM_MAX && next_argw - argw >= SIMM_MIN) {
+ compiler->cache_arg = arg;
+ FAIL_IF(push_inst(compiler, ADDU_W | S(TMP_REG3) | T(base) | D(TMP_REG3), DR(TMP_REG3)));
+ return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | S(TMP_REG3) | TA(reg_ar), delay_slot);
+ }
+
+ FAIL_IF(push_inst(compiler, ADDU_W | S(TMP_REG3) | T(base) | DA(tmp_ar), tmp_ar));
+ return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | SA(tmp_ar) | TA(reg_ar), delay_slot);
+}
+
+static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar, sljit_s32 arg, sljit_sw argw)
+{
+ if (getput_arg_fast(compiler, flags, reg_ar, arg, argw))
+ return compiler->error;
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ return getput_arg(compiler, flags, reg_ar, arg, argw, 0, 0);
+}
+
+static SLJIT_INLINE sljit_s32 emit_op_mem2(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg1, sljit_sw arg1w, sljit_s32 arg2, sljit_sw arg2w)
+{
+ if (getput_arg_fast(compiler, flags, reg, arg1, arg1w))
+ return compiler->error;
+ return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w);
+}
+
+static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ /* arg1 goes to TMP_REG1 or src reg
+ arg2 goes to TMP_REG2, imm or src reg
+ TMP_REG3 can be used for caching
+ result goes to TMP_REG2, so put result can use TMP_REG1 and TMP_REG3. */
+ sljit_s32 dst_r = TMP_REG2;
+ sljit_s32 src1_r;
+ sljit_sw src2_r = 0;
+ sljit_s32 sugg_src2_r = TMP_REG2;
+
+ if (!(flags & ALT_KEEP_CACHE)) {
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ }
+
+ if (SLJIT_UNLIKELY(dst == SLJIT_UNUSED)) {
+ if (op >= SLJIT_MOV && op <= SLJIT_MOVU_S32 && !(src2 & SLJIT_MEM))
+ return SLJIT_SUCCESS;
+ if (GET_FLAGS(op))
+ flags |= UNUSED_DEST;
+ }
+ else if (FAST_IS_REG(dst)) {
+ dst_r = dst;
+ flags |= REG_DEST;
+ if (op >= SLJIT_MOV && op <= SLJIT_MOVU_S32)
+ sugg_src2_r = dst_r;
+ }
+ else if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, flags | ARG_TEST, DR(TMP_REG1), dst, dstw))
+ flags |= SLOW_DEST;
+
+ if (flags & IMM_OP) {
+ if ((src2 & SLJIT_IMM) && src2w) {
+ if ((!(flags & LOGICAL_OP) && (src2w <= SIMM_MAX && src2w >= SIMM_MIN))
+ || ((flags & LOGICAL_OP) && !(src2w & ~UIMM_MAX))) {
+ flags |= SRC2_IMM;
+ src2_r = src2w;
+ }
+ }
+ if (!(flags & SRC2_IMM) && (flags & CUMULATIVE_OP) && (src1 & SLJIT_IMM) && src1w) {
+ if ((!(flags & LOGICAL_OP) && (src1w <= SIMM_MAX && src1w >= SIMM_MIN))
+ || ((flags & LOGICAL_OP) && !(src1w & ~UIMM_MAX))) {
+ flags |= SRC2_IMM;
+ src2_r = src1w;
+
+ /* And swap arguments. */
+ src1 = src2;
+ src1w = src2w;
+ src2 = SLJIT_IMM;
+ /* src2w = src2_r unneeded. */
+ }
+ }
+ }
+
+ /* Source 1. */
+ if (FAST_IS_REG(src1)) {
+ src1_r = src1;
+ flags |= REG1_SOURCE;
+ }
+ else if (src1 & SLJIT_IMM) {
+ if (src1w) {
+ FAIL_IF(load_immediate(compiler, DR(TMP_REG1), src1w));
+ src1_r = TMP_REG1;
+ }
+ else
+ src1_r = 0;
+ }
+ else {
+ if (getput_arg_fast(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w))
+ FAIL_IF(compiler->error);
+ else
+ flags |= SLOW_SRC1;
+ src1_r = TMP_REG1;
+ }
+
+ /* Source 2. */
+ if (FAST_IS_REG(src2)) {
+ src2_r = src2;
+ flags |= REG2_SOURCE;
+ if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOVU_S32)
+ dst_r = src2_r;
+ }
+ else if (src2 & SLJIT_IMM) {
+ if (!(flags & SRC2_IMM)) {
+ if (src2w) {
+ FAIL_IF(load_immediate(compiler, DR(sugg_src2_r), src2w));
+ src2_r = sugg_src2_r;
+ }
+ else {
+ src2_r = 0;
+ if ((op >= SLJIT_MOV && op <= SLJIT_MOVU_S32) && (dst & SLJIT_MEM))
+ dst_r = 0;
+ }
+ }
+ }
+ else {
+ if (getput_arg_fast(compiler, flags | LOAD_DATA, DR(sugg_src2_r), src2, src2w))
+ FAIL_IF(compiler->error);
+ else
+ flags |= SLOW_SRC2;
+ src2_r = sugg_src2_r;
+ }
+
+ if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) {
+ SLJIT_ASSERT(src2_r == TMP_REG2);
+ if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG2), src2, src2w, src1, src1w));
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w, dst, dstw));
+ }
+ else {
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w, src2, src2w));
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG2), src2, src2w, dst, dstw));
+ }
+ }
+ else if (flags & SLOW_SRC1)
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(TMP_REG1), src1, src1w, dst, dstw));
+ else if (flags & SLOW_SRC2)
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, DR(sugg_src2_r), src2, src2w, dst, dstw));
+
+ FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r));
+
+ if (dst & SLJIT_MEM) {
+ if (!(flags & SLOW_DEST)) {
+ getput_arg_fast(compiler, flags, DR(dst_r), dst, dstw);
+ return compiler->error;
+ }
+ return getput_arg(compiler, flags, DR(dst_r), dst, dstw, 0, 0);
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op)
+{
+#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
+ sljit_s32 int_op = op & SLJIT_I32_OP;
+#endif
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op0(compiler, op));
+
+ op = GET_OPCODE(op);
+ switch (op) {
+ case SLJIT_BREAKPOINT:
+ return push_inst(compiler, BREAK, UNMOVABLE_INS);
+ case SLJIT_NOP:
+ return push_inst(compiler, NOP, UNMOVABLE_INS);
+ case SLJIT_LMUL_UW:
+ case SLJIT_LMUL_SW:
+#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
+ FAIL_IF(push_inst(compiler, (op == SLJIT_LMUL_UW ? DMULTU : DMULT) | S(SLJIT_R0) | T(SLJIT_R1), MOVABLE_INS));
+#else
+ FAIL_IF(push_inst(compiler, (op == SLJIT_LMUL_UW ? MULTU : MULT) | S(SLJIT_R0) | T(SLJIT_R1), MOVABLE_INS));
+#endif
+ FAIL_IF(push_inst(compiler, MFLO | D(SLJIT_R0), DR(SLJIT_R0)));
+ return push_inst(compiler, MFHI | D(SLJIT_R1), DR(SLJIT_R1));
+ case SLJIT_DIVMOD_UW:
+ case SLJIT_DIVMOD_SW:
+ case SLJIT_DIV_UW:
+ case SLJIT_DIV_SW:
+ SLJIT_COMPILE_ASSERT((SLJIT_DIVMOD_UW & 0x2) == 0 && SLJIT_DIV_UW - 0x2 == SLJIT_DIVMOD_UW, bad_div_opcode_assignments);
+#if !(defined SLJIT_MIPS_R1 && SLJIT_MIPS_R1)
+ FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
+ FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
+#endif
+
+#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
+ if (int_op)
+ FAIL_IF(push_inst(compiler, ((op | 0x2) == SLJIT_DIV_UW ? DIVU : DIV) | S(SLJIT_R0) | T(SLJIT_R1), MOVABLE_INS));
+ else
+ FAIL_IF(push_inst(compiler, ((op | 0x2) == SLJIT_DIV_UW ? DDIVU : DDIV) | S(SLJIT_R0) | T(SLJIT_R1), MOVABLE_INS));
+#else
+ FAIL_IF(push_inst(compiler, ((op | 0x2) == SLJIT_DIV_UW ? DIVU : DIV) | S(SLJIT_R0) | T(SLJIT_R1), MOVABLE_INS));
+#endif
+
+ FAIL_IF(push_inst(compiler, MFLO | D(SLJIT_R0), DR(SLJIT_R0)));
+ return (op >= SLJIT_DIV_UW) ? SLJIT_SUCCESS : push_inst(compiler, MFHI | D(SLJIT_R1), DR(SLJIT_R1));
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+# define flags 0
+#else
+ sljit_s32 flags = 0;
+#endif
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
+ if ((op & SLJIT_I32_OP) && GET_OPCODE(op) >= SLJIT_NOT) {
+ flags |= INT_DATA | SIGNED_DATA;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_s32)srcw;
+ }
+#endif
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_P:
+ return emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOV_U32:
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+ return emit_op(compiler, SLJIT_MOV_U32, INT_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
+#else
+ return emit_op(compiler, SLJIT_MOV_U32, INT_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u32)srcw : srcw);
+#endif
+
+ case SLJIT_MOV_S32:
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+ return emit_op(compiler, SLJIT_MOV_S32, INT_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
+#else
+ return emit_op(compiler, SLJIT_MOV_S32, INT_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s32)srcw : srcw);
+#endif
+
+ case SLJIT_MOV_U8:
+ return emit_op(compiler, SLJIT_MOV_U8, BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u8)srcw : srcw);
+
+ case SLJIT_MOV_S8:
+ return emit_op(compiler, SLJIT_MOV_S8, BYTE_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s8)srcw : srcw);
+
+ case SLJIT_MOV_U16:
+ return emit_op(compiler, SLJIT_MOV_U16, HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u16)srcw : srcw);
+
+ case SLJIT_MOV_S16:
+ return emit_op(compiler, SLJIT_MOV_S16, HALF_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s16)srcw : srcw);
+
+ case SLJIT_MOVU:
+ case SLJIT_MOVU_P:
+ return emit_op(compiler, SLJIT_MOV, WORD_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOVU_U32:
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+ return emit_op(compiler, SLJIT_MOV_U32, INT_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
+#else
+ return emit_op(compiler, SLJIT_MOV_U32, INT_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u32)srcw : srcw);
+#endif
+
+ case SLJIT_MOVU_S32:
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+ return emit_op(compiler, SLJIT_MOV_S32, INT_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
+#else
+ return emit_op(compiler, SLJIT_MOV_S32, INT_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s32)srcw : srcw);
+#endif
+
+ case SLJIT_MOVU_U8:
+ return emit_op(compiler, SLJIT_MOV_U8, BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u8)srcw : srcw);
+
+ case SLJIT_MOVU_S8:
+ return emit_op(compiler, SLJIT_MOV_S8, BYTE_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s8)srcw : srcw);
+
+ case SLJIT_MOVU_U16:
+ return emit_op(compiler, SLJIT_MOV_U16, HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u16)srcw : srcw);
+
+ case SLJIT_MOVU_S16:
+ return emit_op(compiler, SLJIT_MOV_S16, HALF_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s16)srcw : srcw);
+
+ case SLJIT_NOT:
+ return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_NEG:
+ return emit_op(compiler, SLJIT_SUB | GET_ALL_FLAGS(op), flags | IMM_OP, dst, dstw, SLJIT_IMM, 0, src, srcw);
+
+ case SLJIT_CLZ:
+ return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw);
+ }
+
+ return SLJIT_SUCCESS;
+
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+# undef flags
+#endif
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+# define flags 0
+#else
+ sljit_s32 flags = 0;
+#endif
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
+ if (op & SLJIT_I32_OP) {
+ flags |= INT_DATA | SIGNED_DATA;
+ if (src1 & SLJIT_IMM)
+ src1w = (sljit_s32)src1w;
+ if (src2 & SLJIT_IMM)
+ src2w = (sljit_s32)src2w;
+ }
+#endif
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_ADD:
+ case SLJIT_ADDC:
+ return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_SUB:
+ case SLJIT_SUBC:
+ return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_MUL:
+ return emit_op(compiler, op, flags | CUMULATIVE_OP, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_AND:
+ case SLJIT_OR:
+ case SLJIT_XOR:
+ return emit_op(compiler, op, flags | CUMULATIVE_OP | LOGICAL_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_SHL:
+ case SLJIT_LSHR:
+ case SLJIT_ASHR:
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+ if (src2 & SLJIT_IMM)
+ src2w &= 0x1f;
+#else
+ if (src2 & SLJIT_IMM) {
+ if (op & SLJIT_I32_OP)
+ src2w &= 0x1f;
+ else
+ src2w &= 0x3f;
+ }
+#endif
+ return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
+ }
+
+ return SLJIT_SUCCESS;
+
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+# undef flags
+#endif
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_register_index(sljit_s32 reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_register_index(reg));
+ return reg_map[reg];
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_float_register_index(reg));
+ return reg << 1;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler,
+ void *instruction, sljit_s32 size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_custom(compiler, instruction, size));
+
+ return push_inst(compiler, *(sljit_ins*)instruction, UNMOVABLE_INS);
+}
+
+/* --------------------------------------------------------------------- */
+/* Floating point operators */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_is_fpu_available(void)
+{
+#ifdef SLJIT_IS_FPU_AVAILABLE
+ return SLJIT_IS_FPU_AVAILABLE;
+#elif defined(__GNUC__)
+ sljit_sw fir;
+ asm ("cfc1 %0, $0" : "=r"(fir));
+ return (fir >> 22) & 0x1;
+#else
+#error "FIR check is not implemented for this architecture"
+#endif
+}
+
+#define FLOAT_DATA(op) (DOUBLE_DATA | ((op & SLJIT_F32_OP) >> 7))
+#define FMT(op) (((op & SLJIT_F32_OP) ^ SLJIT_F32_OP) << (21 - 8))
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+# define flags 0
+#else
+ sljit_s32 flags = (GET_OPCODE(op) == SLJIT_CONV_SW_FROM_F64) << 21;
+#endif
+
+ if (src & SLJIT_MEM) {
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src, srcw, dst, dstw));
+ src = TMP_FREG1;
+ }
+ else
+ src <<= 1;
+
+ FAIL_IF(push_inst(compiler, (TRUNC_W_S ^ (flags >> 19)) | FMT(op) | FS(src) | FD(TMP_FREG1), MOVABLE_INS));
+
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ if (FAST_IS_REG(dst))
+ return push_inst(compiler, MFC1 | flags | T(dst) | FS(TMP_FREG1), MOVABLE_INS);
+
+ /* Store the integer value from a VFP register. */
+ return emit_op_mem2(compiler, flags ? DOUBLE_DATA : SINGLE_DATA, TMP_FREG1, dst, dstw, 0, 0);
+
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+# undef is_long
+#endif
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+# define flags 0
+#else
+ sljit_s32 flags = (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_SW) << 21;
+#endif
+
+ sljit_s32 dst_r = FAST_IS_REG(dst) ? (dst << 1) : TMP_FREG1;
+
+ if (FAST_IS_REG(src))
+ FAIL_IF(push_inst(compiler, MTC1 | flags | T(src) | FS(TMP_FREG1), MOVABLE_INS));
+ else if (src & SLJIT_MEM) {
+ /* Load the integer value into a VFP register. */
+ FAIL_IF(emit_op_mem2(compiler, ((flags) ? DOUBLE_DATA : SINGLE_DATA) | LOAD_DATA, TMP_FREG1, src, srcw, dst, dstw));
+ }
+ else {
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32)
+ srcw = (sljit_s32)srcw;
+#endif
+ FAIL_IF(load_immediate(compiler, DR(TMP_REG1), srcw));
+ FAIL_IF(push_inst(compiler, MTC1 | flags | T(TMP_REG1) | FS(TMP_FREG1), MOVABLE_INS));
+ }
+
+ FAIL_IF(push_inst(compiler, CVT_S_S | flags | (4 << 21) | (((op & SLJIT_F32_OP) ^ SLJIT_F32_OP) >> 8) | FS(TMP_FREG1) | FD(dst_r), MOVABLE_INS));
+
+ if (dst & SLJIT_MEM)
+ return emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG1, dst, dstw, 0, 0);
+ return SLJIT_SUCCESS;
+
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+# undef flags
+#endif
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ if (src1 & SLJIT_MEM) {
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w));
+ src1 = TMP_FREG1;
+ }
+ else
+ src1 <<= 1;
+
+ if (src2 & SLJIT_MEM) {
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, 0, 0));
+ src2 = TMP_FREG2;
+ }
+ else
+ src2 <<= 1;
+
+ /* src2 and src1 are swapped. */
+ if (op & SLJIT_SET_E) {
+ FAIL_IF(push_inst(compiler, C_UEQ_S | FMT(op) | FT(src2) | FS(src1), UNMOVABLE_INS));
+ FAIL_IF(push_inst(compiler, CFC1 | TA(EQUAL_FLAG) | DA(FCSR_REG), EQUAL_FLAG));
+ FAIL_IF(push_inst(compiler, SRL | TA(EQUAL_FLAG) | DA(EQUAL_FLAG) | SH_IMM(23), EQUAL_FLAG));
+ FAIL_IF(push_inst(compiler, ANDI | SA(EQUAL_FLAG) | TA(EQUAL_FLAG) | IMM(1), EQUAL_FLAG));
+ }
+ if (op & SLJIT_SET_S) {
+ /* Mixing the instructions for the two checks. */
+ FAIL_IF(push_inst(compiler, C_ULT_S | FMT(op) | FT(src2) | FS(src1), UNMOVABLE_INS));
+ FAIL_IF(push_inst(compiler, CFC1 | TA(ULESS_FLAG) | DA(FCSR_REG), ULESS_FLAG));
+ FAIL_IF(push_inst(compiler, C_ULT_S | FMT(op) | FT(src1) | FS(src2), UNMOVABLE_INS));
+ FAIL_IF(push_inst(compiler, SRL | TA(ULESS_FLAG) | DA(ULESS_FLAG) | SH_IMM(23), ULESS_FLAG));
+ FAIL_IF(push_inst(compiler, ANDI | SA(ULESS_FLAG) | TA(ULESS_FLAG) | IMM(1), ULESS_FLAG));
+ FAIL_IF(push_inst(compiler, CFC1 | TA(UGREATER_FLAG) | DA(FCSR_REG), UGREATER_FLAG));
+ FAIL_IF(push_inst(compiler, SRL | TA(UGREATER_FLAG) | DA(UGREATER_FLAG) | SH_IMM(23), UGREATER_FLAG));
+ FAIL_IF(push_inst(compiler, ANDI | SA(UGREATER_FLAG) | TA(UGREATER_FLAG) | IMM(1), UGREATER_FLAG));
+ }
+ return push_inst(compiler, C_UN_S | FMT(op) | FT(src2) | FS(src1), FCSR_FCC);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r;
+
+ CHECK_ERROR();
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+
+ SLJIT_COMPILE_ASSERT((SLJIT_F32_OP == 0x100) && !(DOUBLE_DATA & 0x2), float_transfer_bit_error);
+ SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw);
+
+ if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32)
+ op ^= SLJIT_F32_OP;
+
+ dst_r = FAST_IS_REG(dst) ? (dst << 1) : TMP_FREG1;
+
+ if (src & SLJIT_MEM) {
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, dst_r, src, srcw, dst, dstw));
+ src = dst_r;
+ }
+ else
+ src <<= 1;
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_MOV_F64:
+ if (src != dst_r) {
+ if (dst_r != TMP_FREG1)
+ FAIL_IF(push_inst(compiler, MOV_S | FMT(op) | FS(src) | FD(dst_r), MOVABLE_INS));
+ else
+ dst_r = src;
+ }
+ break;
+ case SLJIT_NEG_F64:
+ FAIL_IF(push_inst(compiler, NEG_S | FMT(op) | FS(src) | FD(dst_r), MOVABLE_INS));
+ break;
+ case SLJIT_ABS_F64:
+ FAIL_IF(push_inst(compiler, ABS_S | FMT(op) | FS(src) | FD(dst_r), MOVABLE_INS));
+ break;
+ case SLJIT_CONV_F64_FROM_F32:
+ FAIL_IF(push_inst(compiler, CVT_S_S | ((op & SLJIT_F32_OP) ? 1 : (1 << 21)) | FS(src) | FD(dst_r), MOVABLE_INS));
+ op ^= SLJIT_F32_OP;
+ break;
+ }
+
+ if (dst & SLJIT_MEM)
+ return emit_op_mem2(compiler, FLOAT_DATA(op), dst_r, dst, dstw, 0, 0);
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_s32 dst_r, flags = 0;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+
+ dst_r = FAST_IS_REG(dst) ? (dst << 1) : TMP_FREG2;
+
+ if (src1 & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w)) {
+ FAIL_IF(compiler->error);
+ src1 = TMP_FREG1;
+ } else
+ flags |= SLOW_SRC1;
+ }
+ else
+ src1 <<= 1;
+
+ if (src2 & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w)) {
+ FAIL_IF(compiler->error);
+ src2 = TMP_FREG2;
+ } else
+ flags |= SLOW_SRC2;
+ }
+ else
+ src2 <<= 1;
+
+ if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) {
+ if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, src1, src1w));
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw));
+ }
+ else {
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w));
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw));
+ }
+ }
+ else if (flags & SLOW_SRC1)
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw));
+ else if (flags & SLOW_SRC2)
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw));
+
+ if (flags & SLOW_SRC1)
+ src1 = TMP_FREG1;
+ if (flags & SLOW_SRC2)
+ src2 = TMP_FREG2;
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_ADD_F64:
+ FAIL_IF(push_inst(compiler, ADD_S | FMT(op) | FT(src2) | FS(src1) | FD(dst_r), MOVABLE_INS));
+ break;
+
+ case SLJIT_SUB_F64:
+ FAIL_IF(push_inst(compiler, SUB_S | FMT(op) | FT(src2) | FS(src1) | FD(dst_r), MOVABLE_INS));
+ break;
+
+ case SLJIT_MUL_F64:
+ FAIL_IF(push_inst(compiler, MUL_S | FMT(op) | FT(src2) | FS(src1) | FD(dst_r), MOVABLE_INS));
+ break;
+
+ case SLJIT_DIV_F64:
+ FAIL_IF(push_inst(compiler, DIV_S | FMT(op) | FT(src2) | FS(src1) | FD(dst_r), MOVABLE_INS));
+ break;
+ }
+
+ if (dst_r == TMP_FREG2)
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG2, dst, dstw, 0, 0));
+
+ return SLJIT_SUCCESS;
+}
+
+/* --------------------------------------------------------------------- */
+/* Other instructions */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ /* For UNUSED dst. Uncommon, but possible. */
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ if (FAST_IS_REG(dst))
+ return push_inst(compiler, ADDU_W | SA(RETURN_ADDR_REG) | TA(0) | D(dst), DR(dst));
+
+ /* Memory. */
+ return emit_op_mem(compiler, WORD_DATA, RETURN_ADDR_REG, dst, dstw);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_return(compiler, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ if (FAST_IS_REG(src))
+ FAIL_IF(push_inst(compiler, ADDU_W | S(src) | TA(0) | DA(RETURN_ADDR_REG), RETURN_ADDR_REG));
+ else if (src & SLJIT_MEM)
+ FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, RETURN_ADDR_REG, src, srcw));
+ else if (src & SLJIT_IMM)
+ FAIL_IF(load_immediate(compiler, RETURN_ADDR_REG, srcw));
+
+ FAIL_IF(push_inst(compiler, JR | SA(RETURN_ADDR_REG), UNMOVABLE_INS));
+ return push_inst(compiler, NOP, UNMOVABLE_INS);
+}
+
+/* --------------------------------------------------------------------- */
+/* Conditional instructions */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
+{
+ struct sljit_label *label;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_label(compiler));
+
+ if (compiler->last_label && compiler->last_label->size == compiler->size)
+ return compiler->last_label;
+
+ label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label));
+ PTR_FAIL_IF(!label);
+ set_label(label, compiler);
+ compiler->delay_slot = UNMOVABLE_INS;
+ return label;
+}
+
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+#define JUMP_LENGTH 4
+#else
+#define JUMP_LENGTH 8
+#endif
+
+#define BR_Z(src) \
+ inst = BEQ | SA(src) | TA(0) | JUMP_LENGTH; \
+ flags = IS_BIT26_COND; \
+ delay_check = src;
+
+#define BR_NZ(src) \
+ inst = BNE | SA(src) | TA(0) | JUMP_LENGTH; \
+ flags = IS_BIT26_COND; \
+ delay_check = src;
+
+#define BR_T() \
+ inst = BC1T | JUMP_LENGTH; \
+ flags = IS_BIT16_COND; \
+ delay_check = FCSR_FCC;
+
+#define BR_F() \
+ inst = BC1F | JUMP_LENGTH; \
+ flags = IS_BIT16_COND; \
+ delay_check = FCSR_FCC;
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_s32 type)
+{
+ struct sljit_jump *jump;
+ sljit_ins inst;
+ sljit_s32 flags = 0;
+ sljit_s32 delay_check = UNMOVABLE_INS;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_jump(compiler, type));
+
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ PTR_FAIL_IF(!jump);
+ set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
+ type &= 0xff;
+
+ switch (type) {
+ case SLJIT_EQUAL:
+ case SLJIT_NOT_EQUAL_F64:
+ BR_NZ(EQUAL_FLAG);
+ break;
+ case SLJIT_NOT_EQUAL:
+ case SLJIT_EQUAL_F64:
+ BR_Z(EQUAL_FLAG);
+ break;
+ case SLJIT_LESS:
+ case SLJIT_LESS_F64:
+ BR_Z(ULESS_FLAG);
+ break;
+ case SLJIT_GREATER_EQUAL:
+ case SLJIT_GREATER_EQUAL_F64:
+ BR_NZ(ULESS_FLAG);
+ break;
+ case SLJIT_GREATER:
+ case SLJIT_GREATER_F64:
+ BR_Z(UGREATER_FLAG);
+ break;
+ case SLJIT_LESS_EQUAL:
+ case SLJIT_LESS_EQUAL_F64:
+ BR_NZ(UGREATER_FLAG);
+ break;
+ case SLJIT_SIG_LESS:
+ BR_Z(LESS_FLAG);
+ break;
+ case SLJIT_SIG_GREATER_EQUAL:
+ BR_NZ(LESS_FLAG);
+ break;
+ case SLJIT_SIG_GREATER:
+ BR_Z(GREATER_FLAG);
+ break;
+ case SLJIT_SIG_LESS_EQUAL:
+ BR_NZ(GREATER_FLAG);
+ break;
+ case SLJIT_OVERFLOW:
+ case SLJIT_MUL_OVERFLOW:
+ BR_Z(OVERFLOW_FLAG);
+ break;
+ case SLJIT_NOT_OVERFLOW:
+ case SLJIT_MUL_NOT_OVERFLOW:
+ BR_NZ(OVERFLOW_FLAG);
+ break;
+ case SLJIT_UNORDERED_F64:
+ BR_F();
+ break;
+ case SLJIT_ORDERED_F64:
+ BR_T();
+ break;
+ default:
+ /* Not conditional branch. */
+ inst = 0;
+ break;
+ }
+
+ jump->flags |= flags;
+ if (compiler->delay_slot == MOVABLE_INS || (compiler->delay_slot != UNMOVABLE_INS && compiler->delay_slot != delay_check))
+ jump->flags |= IS_MOVABLE;
+
+ if (inst)
+ PTR_FAIL_IF(push_inst(compiler, inst, UNMOVABLE_INS));
+
+ PTR_FAIL_IF(emit_const(compiler, TMP_REG2, 0));
+ if (type <= SLJIT_JUMP) {
+ PTR_FAIL_IF(push_inst(compiler, JR | S(TMP_REG2), UNMOVABLE_INS));
+ jump->addr = compiler->size;
+ PTR_FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
+ } else {
+ SLJIT_ASSERT(DR(PIC_ADDR_REG) == 25 && PIC_ADDR_REG == TMP_REG2);
+ /* Cannot be optimized out if type is >= CALL0. */
+ jump->flags |= IS_JAL | (type >= SLJIT_CALL0 ? IS_CALL : 0);
+ PTR_FAIL_IF(push_inst(compiler, JALR | S(TMP_REG2) | DA(RETURN_ADDR_REG), UNMOVABLE_INS));
+ jump->addr = compiler->size;
+ /* A NOP if type < CALL1. */
+ PTR_FAIL_IF(push_inst(compiler, ADDU_W | S(SLJIT_R0) | TA(0) | DA(4), UNMOVABLE_INS));
+ }
+ return jump;
+}
+
+#define RESOLVE_IMM1() \
+ if (src1 & SLJIT_IMM) { \
+ if (src1w) { \
+ PTR_FAIL_IF(load_immediate(compiler, DR(TMP_REG1), src1w)); \
+ src1 = TMP_REG1; \
+ } \
+ else \
+ src1 = 0; \
+ }
+
+#define RESOLVE_IMM2() \
+ if (src2 & SLJIT_IMM) { \
+ if (src2w) { \
+ PTR_FAIL_IF(load_immediate(compiler, DR(TMP_REG2), src2w)); \
+ src2 = TMP_REG2; \
+ } \
+ else \
+ src2 = 0; \
+ }
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s32 type,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ struct sljit_jump *jump;
+ sljit_s32 flags;
+ sljit_ins inst;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_cmp(compiler, type, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ flags = ((type & SLJIT_I32_OP) ? INT_DATA : WORD_DATA) | LOAD_DATA;
+ if (src1 & SLJIT_MEM) {
+ PTR_FAIL_IF(emit_op_mem2(compiler, flags, DR(TMP_REG1), src1, src1w, src2, src2w));
+ src1 = TMP_REG1;
+ }
+ if (src2 & SLJIT_MEM) {
+ PTR_FAIL_IF(emit_op_mem2(compiler, flags, DR(TMP_REG2), src2, src2w, 0, 0));
+ src2 = TMP_REG2;
+ }
+
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ PTR_FAIL_IF(!jump);
+ set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
+ type &= 0xff;
+
+ if (type <= SLJIT_NOT_EQUAL) {
+ RESOLVE_IMM1();
+ RESOLVE_IMM2();
+ jump->flags |= IS_BIT26_COND;
+ if (compiler->delay_slot == MOVABLE_INS || (compiler->delay_slot != UNMOVABLE_INS && compiler->delay_slot != DR(src1) && compiler->delay_slot != DR(src2)))
+ jump->flags |= IS_MOVABLE;
+ PTR_FAIL_IF(push_inst(compiler, (type == SLJIT_EQUAL ? BNE : BEQ) | S(src1) | T(src2) | JUMP_LENGTH, UNMOVABLE_INS));
+ }
+ else if (type >= SLJIT_SIG_LESS && (((src1 & SLJIT_IMM) && (src1w == 0)) || ((src2 & SLJIT_IMM) && (src2w == 0)))) {
+ inst = NOP;
+ if ((src1 & SLJIT_IMM) && (src1w == 0)) {
+ RESOLVE_IMM2();
+ switch (type) {
+ case SLJIT_SIG_LESS:
+ inst = BLEZ;
+ jump->flags |= IS_BIT26_COND;
+ break;
+ case SLJIT_SIG_GREATER_EQUAL:
+ inst = BGTZ;
+ jump->flags |= IS_BIT26_COND;
+ break;
+ case SLJIT_SIG_GREATER:
+ inst = BGEZ;
+ jump->flags |= IS_BIT16_COND;
+ break;
+ case SLJIT_SIG_LESS_EQUAL:
+ inst = BLTZ;
+ jump->flags |= IS_BIT16_COND;
+ break;
+ }
+ src1 = src2;
+ }
+ else {
+ RESOLVE_IMM1();
+ switch (type) {
+ case SLJIT_SIG_LESS:
+ inst = BGEZ;
+ jump->flags |= IS_BIT16_COND;
+ break;
+ case SLJIT_SIG_GREATER_EQUAL:
+ inst = BLTZ;
+ jump->flags |= IS_BIT16_COND;
+ break;
+ case SLJIT_SIG_GREATER:
+ inst = BLEZ;
+ jump->flags |= IS_BIT26_COND;
+ break;
+ case SLJIT_SIG_LESS_EQUAL:
+ inst = BGTZ;
+ jump->flags |= IS_BIT26_COND;
+ break;
+ }
+ }
+ PTR_FAIL_IF(push_inst(compiler, inst | S(src1) | JUMP_LENGTH, UNMOVABLE_INS));
+ }
+ else {
+ if (type == SLJIT_LESS || type == SLJIT_GREATER_EQUAL || type == SLJIT_SIG_LESS || type == SLJIT_SIG_GREATER_EQUAL) {
+ RESOLVE_IMM1();
+ if ((src2 & SLJIT_IMM) && src2w <= SIMM_MAX && src2w >= SIMM_MIN)
+ PTR_FAIL_IF(push_inst(compiler, (type <= SLJIT_LESS_EQUAL ? SLTIU : SLTI) | S(src1) | T(TMP_REG1) | IMM(src2w), DR(TMP_REG1)));
+ else {
+ RESOLVE_IMM2();
+ PTR_FAIL_IF(push_inst(compiler, (type <= SLJIT_LESS_EQUAL ? SLTU : SLT) | S(src1) | T(src2) | D(TMP_REG1), DR(TMP_REG1)));
+ }
+ type = (type == SLJIT_LESS || type == SLJIT_SIG_LESS) ? SLJIT_NOT_EQUAL : SLJIT_EQUAL;
+ }
+ else {
+ RESOLVE_IMM2();
+ if ((src1 & SLJIT_IMM) && src1w <= SIMM_MAX && src1w >= SIMM_MIN)
+ PTR_FAIL_IF(push_inst(compiler, (type <= SLJIT_LESS_EQUAL ? SLTIU : SLTI) | S(src2) | T(TMP_REG1) | IMM(src1w), DR(TMP_REG1)));
+ else {
+ RESOLVE_IMM1();
+ PTR_FAIL_IF(push_inst(compiler, (type <= SLJIT_LESS_EQUAL ? SLTU : SLT) | S(src2) | T(src1) | D(TMP_REG1), DR(TMP_REG1)));
+ }
+ type = (type == SLJIT_GREATER || type == SLJIT_SIG_GREATER) ? SLJIT_NOT_EQUAL : SLJIT_EQUAL;
+ }
+
+ jump->flags |= IS_BIT26_COND;
+ PTR_FAIL_IF(push_inst(compiler, (type == SLJIT_EQUAL ? BNE : BEQ) | S(TMP_REG1) | TA(0) | JUMP_LENGTH, UNMOVABLE_INS));
+ }
+
+ PTR_FAIL_IF(emit_const(compiler, TMP_REG2, 0));
+ PTR_FAIL_IF(push_inst(compiler, JR | S(TMP_REG2), UNMOVABLE_INS));
+ jump->addr = compiler->size;
+ PTR_FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
+ return jump;
+}
+
+#undef RESOLVE_IMM1
+#undef RESOLVE_IMM2
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_s32 type,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ struct sljit_jump *jump;
+ sljit_ins inst;
+ sljit_s32 if_true;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_fcmp(compiler, type, src1, src1w, src2, src2w));
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+
+ if (src1 & SLJIT_MEM) {
+ PTR_FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(type) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w));
+ src1 = TMP_FREG1;
+ }
+ else
+ src1 <<= 1;
+
+ if (src2 & SLJIT_MEM) {
+ PTR_FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(type) | LOAD_DATA, TMP_FREG2, src2, src2w, 0, 0));
+ src2 = TMP_FREG2;
+ }
+ else
+ src2 <<= 1;
+
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ PTR_FAIL_IF(!jump);
+ set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
+ jump->flags |= IS_BIT16_COND;
+
+ switch (type & 0xff) {
+ case SLJIT_EQUAL_F64:
+ inst = C_UEQ_S;
+ if_true = 1;
+ break;
+ case SLJIT_NOT_EQUAL_F64:
+ inst = C_UEQ_S;
+ if_true = 0;
+ break;
+ case SLJIT_LESS_F64:
+ inst = C_ULT_S;
+ if_true = 1;
+ break;
+ case SLJIT_GREATER_EQUAL_F64:
+ inst = C_ULT_S;
+ if_true = 0;
+ break;
+ case SLJIT_GREATER_F64:
+ inst = C_ULE_S;
+ if_true = 0;
+ break;
+ case SLJIT_LESS_EQUAL_F64:
+ inst = C_ULE_S;
+ if_true = 1;
+ break;
+ case SLJIT_UNORDERED_F64:
+ inst = C_UN_S;
+ if_true = 1;
+ break;
+ default: /* Make compilers happy. */
+ SLJIT_ASSERT_STOP();
+ case SLJIT_ORDERED_F64:
+ inst = C_UN_S;
+ if_true = 0;
+ break;
+ }
+
+ PTR_FAIL_IF(push_inst(compiler, inst | FMT(type) | FT(src2) | FS(src1), UNMOVABLE_INS));
+ /* Intentionally the other opcode. */
+ PTR_FAIL_IF(push_inst(compiler, (if_true ? BC1F : BC1T) | JUMP_LENGTH, UNMOVABLE_INS));
+ PTR_FAIL_IF(emit_const(compiler, TMP_REG2, 0));
+ PTR_FAIL_IF(push_inst(compiler, JR | S(TMP_REG2), UNMOVABLE_INS));
+ jump->addr = compiler->size;
+ PTR_FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
+ return jump;
+}
+
+#undef JUMP_LENGTH
+#undef BR_Z
+#undef BR_NZ
+#undef BR_T
+#undef BR_F
+
+#undef FLOAT_DATA
+#undef FMT
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 src_r = TMP_REG2;
+ struct sljit_jump *jump = NULL;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_ijump(compiler, type, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ if (FAST_IS_REG(src)) {
+ if (DR(src) != 4)
+ src_r = src;
+ else
+ FAIL_IF(push_inst(compiler, ADDU_W | S(src) | TA(0) | D(TMP_REG2), DR(TMP_REG2)));
+ }
+
+ if (type >= SLJIT_CALL0) {
+ SLJIT_ASSERT(DR(PIC_ADDR_REG) == 25 && PIC_ADDR_REG == TMP_REG2);
+ if (src & (SLJIT_IMM | SLJIT_MEM)) {
+ if (src & SLJIT_IMM)
+ FAIL_IF(load_immediate(compiler, DR(PIC_ADDR_REG), srcw));
+ else {
+ SLJIT_ASSERT(src_r == TMP_REG2 && (src & SLJIT_MEM));
+ FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, TMP_REG2, 0, TMP_REG1, 0, src, srcw));
+ }
+ FAIL_IF(push_inst(compiler, JALR | S(PIC_ADDR_REG) | DA(RETURN_ADDR_REG), UNMOVABLE_INS));
+ /* We need an extra instruction in any case. */
+ return push_inst(compiler, ADDU_W | S(SLJIT_R0) | TA(0) | DA(4), UNMOVABLE_INS);
+ }
+
+ /* Register input. */
+ if (type >= SLJIT_CALL1)
+ FAIL_IF(push_inst(compiler, ADDU_W | S(SLJIT_R0) | TA(0) | DA(4), 4));
+ FAIL_IF(push_inst(compiler, JALR | S(src_r) | DA(RETURN_ADDR_REG), UNMOVABLE_INS));
+ return push_inst(compiler, ADDU_W | S(src_r) | TA(0) | D(PIC_ADDR_REG), UNMOVABLE_INS);
+ }
+
+ if (src & SLJIT_IMM) {
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ FAIL_IF(!jump);
+ set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_JAL : 0));
+ jump->u.target = srcw;
+
+ if (compiler->delay_slot != UNMOVABLE_INS)
+ jump->flags |= IS_MOVABLE;
+
+ FAIL_IF(emit_const(compiler, TMP_REG2, 0));
+ }
+ else if (src & SLJIT_MEM)
+ FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, TMP_REG2, 0, TMP_REG1, 0, src, srcw));
+
+ FAIL_IF(push_inst(compiler, JR | S(src_r), UNMOVABLE_INS));
+ if (jump)
+ jump->addr = compiler->size;
+ FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw,
+ sljit_s32 type)
+{
+ sljit_s32 sugg_dst_ar, dst_ar;
+ sljit_s32 flags = GET_ALL_FLAGS(op);
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+# define mem_type WORD_DATA
+#else
+ sljit_s32 mem_type = (op & SLJIT_I32_OP) ? (INT_DATA | SIGNED_DATA) : WORD_DATA;
+#endif
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ op = GET_OPCODE(op);
+#if (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
+ if (op == SLJIT_MOV_S32 || op == SLJIT_MOV_U32)
+ mem_type = INT_DATA | SIGNED_DATA;
+#endif
+ sugg_dst_ar = DR((op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2);
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ if (op >= SLJIT_ADD && (src & SLJIT_MEM)) {
+ ADJUST_LOCAL_OFFSET(src, srcw);
+ FAIL_IF(emit_op_mem2(compiler, mem_type | LOAD_DATA, DR(TMP_REG1), src, srcw, dst, dstw));
+ src = TMP_REG1;
+ srcw = 0;
+ }
+
+ switch (type & 0xff) {
+ case SLJIT_EQUAL:
+ case SLJIT_NOT_EQUAL:
+ FAIL_IF(push_inst(compiler, SLTIU | SA(EQUAL_FLAG) | TA(sugg_dst_ar) | IMM(1), sugg_dst_ar));
+ dst_ar = sugg_dst_ar;
+ break;
+ case SLJIT_LESS:
+ case SLJIT_GREATER_EQUAL:
+ case SLJIT_LESS_F64:
+ case SLJIT_GREATER_EQUAL_F64:
+ dst_ar = ULESS_FLAG;
+ break;
+ case SLJIT_GREATER:
+ case SLJIT_LESS_EQUAL:
+ case SLJIT_GREATER_F64:
+ case SLJIT_LESS_EQUAL_F64:
+ dst_ar = UGREATER_FLAG;
+ break;
+ case SLJIT_SIG_LESS:
+ case SLJIT_SIG_GREATER_EQUAL:
+ dst_ar = LESS_FLAG;
+ break;
+ case SLJIT_SIG_GREATER:
+ case SLJIT_SIG_LESS_EQUAL:
+ dst_ar = GREATER_FLAG;
+ break;
+ case SLJIT_OVERFLOW:
+ case SLJIT_NOT_OVERFLOW:
+ dst_ar = OVERFLOW_FLAG;
+ break;
+ case SLJIT_MUL_OVERFLOW:
+ case SLJIT_MUL_NOT_OVERFLOW:
+ FAIL_IF(push_inst(compiler, SLTIU | SA(OVERFLOW_FLAG) | TA(sugg_dst_ar) | IMM(1), sugg_dst_ar));
+ dst_ar = sugg_dst_ar;
+ type ^= 0x1; /* Flip type bit for the XORI below. */
+ break;
+ case SLJIT_EQUAL_F64:
+ case SLJIT_NOT_EQUAL_F64:
+ dst_ar = EQUAL_FLAG;
+ break;
+
+ case SLJIT_UNORDERED_F64:
+ case SLJIT_ORDERED_F64:
+ FAIL_IF(push_inst(compiler, CFC1 | TA(sugg_dst_ar) | DA(FCSR_REG), sugg_dst_ar));
+ FAIL_IF(push_inst(compiler, SRL | TA(sugg_dst_ar) | DA(sugg_dst_ar) | SH_IMM(23), sugg_dst_ar));
+ FAIL_IF(push_inst(compiler, ANDI | SA(sugg_dst_ar) | TA(sugg_dst_ar) | IMM(1), sugg_dst_ar));
+ dst_ar = sugg_dst_ar;
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ dst_ar = sugg_dst_ar;
+ break;
+ }
+
+ if (type & 0x1) {
+ FAIL_IF(push_inst(compiler, XORI | SA(dst_ar) | TA(sugg_dst_ar) | IMM(1), sugg_dst_ar));
+ dst_ar = sugg_dst_ar;
+ }
+
+ if (op >= SLJIT_ADD) {
+ if (DR(TMP_REG2) != dst_ar)
+ FAIL_IF(push_inst(compiler, ADDU_W | SA(dst_ar) | TA(0) | D(TMP_REG2), DR(TMP_REG2)));
+ return emit_op(compiler, op | flags, mem_type | CUMULATIVE_OP | LOGICAL_OP | IMM_OP | ALT_KEEP_CACHE, dst, dstw, src, srcw, TMP_REG2, 0);
+ }
+
+ if (dst & SLJIT_MEM)
+ return emit_op_mem(compiler, mem_type, dst_ar, dst, dstw);
+
+ if (sugg_dst_ar != dst_ar)
+ return push_inst(compiler, ADDU_W | SA(dst_ar) | TA(0) | DA(sugg_dst_ar), sugg_dst_ar);
+ return SLJIT_SUCCESS;
+
+#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
+# undef mem_type
+#endif
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value)
+{
+ struct sljit_const *const_;
+ sljit_s32 reg;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const));
+ PTR_FAIL_IF(!const_);
+ set_const(const_, compiler);
+
+ reg = SLOW_IS_REG(dst) ? dst : TMP_REG2;
+
+ PTR_FAIL_IF(emit_const(compiler, reg, init_value));
+
+ if (dst & SLJIT_MEM)
+ PTR_FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, TMP_REG2, 0));
+ return const_;
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitNativePPC_32.c b/thirdparty/pcre2/src/sljit/sljitNativePPC_32.c
new file mode 100644
index 0000000000..f696d1b8d5
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativePPC_32.c
@@ -0,0 +1,271 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* ppc 32-bit arch dependent functions. */
+
+static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 reg, sljit_sw imm)
+{
+ if (imm <= SIMM_MAX && imm >= SIMM_MIN)
+ return push_inst(compiler, ADDI | D(reg) | A(0) | IMM(imm));
+
+ if (!(imm & ~0xffff))
+ return push_inst(compiler, ORI | S(TMP_ZERO) | A(reg) | IMM(imm));
+
+ FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(imm >> 16)));
+ return (imm & 0xffff) ? push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm)) : SLJIT_SUCCESS;
+}
+
+#define INS_CLEAR_LEFT(dst, src, from) \
+ (RLWINM | S(src) | A(dst) | ((from) << 6) | (31 << 1))
+
+static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags,
+ sljit_s32 dst, sljit_s32 src1, sljit_s32 src2)
+{
+ switch (op) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_U32:
+ case SLJIT_MOV_S32:
+ case SLJIT_MOV_P:
+ SLJIT_ASSERT(src1 == TMP_REG1);
+ if (dst != src2)
+ return push_inst(compiler, OR | S(src2) | A(dst) | B(src2));
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U8:
+ case SLJIT_MOV_S8:
+ SLJIT_ASSERT(src1 == TMP_REG1);
+ if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
+ if (op == SLJIT_MOV_S8)
+ return push_inst(compiler, EXTSB | S(src2) | A(dst));
+ return push_inst(compiler, INS_CLEAR_LEFT(dst, src2, 24));
+ }
+ else if ((flags & REG_DEST) && op == SLJIT_MOV_S8)
+ return push_inst(compiler, EXTSB | S(src2) | A(dst));
+ else {
+ SLJIT_ASSERT(dst == src2);
+ }
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U16:
+ case SLJIT_MOV_S16:
+ SLJIT_ASSERT(src1 == TMP_REG1);
+ if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
+ if (op == SLJIT_MOV_S16)
+ return push_inst(compiler, EXTSH | S(src2) | A(dst));
+ return push_inst(compiler, INS_CLEAR_LEFT(dst, src2, 16));
+ }
+ else {
+ SLJIT_ASSERT(dst == src2);
+ }
+ return SLJIT_SUCCESS;
+
+ case SLJIT_NOT:
+ SLJIT_ASSERT(src1 == TMP_REG1);
+ return push_inst(compiler, NOR | RC(flags) | S(src2) | A(dst) | B(src2));
+
+ case SLJIT_NEG:
+ SLJIT_ASSERT(src1 == TMP_REG1);
+ return push_inst(compiler, NEG | OERC(flags) | D(dst) | A(src2));
+
+ case SLJIT_CLZ:
+ SLJIT_ASSERT(src1 == TMP_REG1);
+ return push_inst(compiler, CNTLZW | RC(flags) | S(src2) | A(dst));
+
+ case SLJIT_ADD:
+ if (flags & ALT_FORM1) {
+ /* Flags does not set: BIN_IMM_EXTS unnecessary. */
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, ADDI | D(dst) | A(src1) | compiler->imm);
+ }
+ if (flags & ALT_FORM2) {
+ /* Flags does not set: BIN_IMM_EXTS unnecessary. */
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, ADDIS | D(dst) | A(src1) | compiler->imm);
+ }
+ if (flags & ALT_FORM3) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, ADDIC | D(dst) | A(src1) | compiler->imm);
+ }
+ if (flags & ALT_FORM4) {
+ /* Flags does not set: BIN_IMM_EXTS unnecessary. */
+ FAIL_IF(push_inst(compiler, ADDI | D(dst) | A(src1) | (compiler->imm & 0xffff)));
+ return push_inst(compiler, ADDIS | D(dst) | A(dst) | (((compiler->imm >> 16) & 0xffff) + ((compiler->imm >> 15) & 0x1)));
+ }
+ if (!(flags & ALT_SET_FLAGS))
+ return push_inst(compiler, ADD | D(dst) | A(src1) | B(src2));
+ return push_inst(compiler, ADDC | OERC(ALT_SET_FLAGS) | D(dst) | A(src1) | B(src2));
+
+ case SLJIT_ADDC:
+ if (flags & ALT_FORM1) {
+ FAIL_IF(push_inst(compiler, MFXER | D(0)));
+ FAIL_IF(push_inst(compiler, ADDE | D(dst) | A(src1) | B(src2)));
+ return push_inst(compiler, MTXER | S(0));
+ }
+ return push_inst(compiler, ADDE | D(dst) | A(src1) | B(src2));
+
+ case SLJIT_SUB:
+ if (flags & ALT_FORM1) {
+ /* Flags does not set: BIN_IMM_EXTS unnecessary. */
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, SUBFIC | D(dst) | A(src1) | compiler->imm);
+ }
+ if (flags & (ALT_FORM2 | ALT_FORM3)) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ if (flags & ALT_FORM2)
+ FAIL_IF(push_inst(compiler, CMPI | CRD(0) | A(src1) | compiler->imm));
+ if (flags & ALT_FORM3)
+ return push_inst(compiler, CMPLI | CRD(4) | A(src1) | compiler->imm);
+ return SLJIT_SUCCESS;
+ }
+ if (flags & (ALT_FORM4 | ALT_FORM5)) {
+ if (flags & ALT_FORM4)
+ FAIL_IF(push_inst(compiler, CMPL | CRD(4) | A(src1) | B(src2)));
+ if (flags & ALT_FORM5)
+ FAIL_IF(push_inst(compiler, CMP | CRD(0) | A(src1) | B(src2)));
+ return SLJIT_SUCCESS;
+ }
+ if (!(flags & ALT_SET_FLAGS))
+ return push_inst(compiler, SUBF | D(dst) | A(src2) | B(src1));
+ if (flags & ALT_FORM6)
+ FAIL_IF(push_inst(compiler, CMPL | CRD(4) | A(src1) | B(src2)));
+ return push_inst(compiler, SUBFC | OERC(ALT_SET_FLAGS) | D(dst) | A(src2) | B(src1));
+
+ case SLJIT_SUBC:
+ if (flags & ALT_FORM1) {
+ FAIL_IF(push_inst(compiler, MFXER | D(0)));
+ FAIL_IF(push_inst(compiler, SUBFE | D(dst) | A(src2) | B(src1)));
+ return push_inst(compiler, MTXER | S(0));
+ }
+ return push_inst(compiler, SUBFE | D(dst) | A(src2) | B(src1));
+
+ case SLJIT_MUL:
+ if (flags & ALT_FORM1) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, MULLI | D(dst) | A(src1) | compiler->imm);
+ }
+ return push_inst(compiler, MULLW | OERC(flags) | D(dst) | A(src2) | B(src1));
+
+ case SLJIT_AND:
+ if (flags & ALT_FORM1) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, ANDI | S(src1) | A(dst) | compiler->imm);
+ }
+ if (flags & ALT_FORM2) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, ANDIS | S(src1) | A(dst) | compiler->imm);
+ }
+ return push_inst(compiler, AND | RC(flags) | S(src1) | A(dst) | B(src2));
+
+ case SLJIT_OR:
+ if (flags & ALT_FORM1) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, ORI | S(src1) | A(dst) | compiler->imm);
+ }
+ if (flags & ALT_FORM2) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, ORIS | S(src1) | A(dst) | compiler->imm);
+ }
+ if (flags & ALT_FORM3) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ FAIL_IF(push_inst(compiler, ORI | S(src1) | A(dst) | IMM(compiler->imm)));
+ return push_inst(compiler, ORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16));
+ }
+ return push_inst(compiler, OR | RC(flags) | S(src1) | A(dst) | B(src2));
+
+ case SLJIT_XOR:
+ if (flags & ALT_FORM1) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, XORI | S(src1) | A(dst) | compiler->imm);
+ }
+ if (flags & ALT_FORM2) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, XORIS | S(src1) | A(dst) | compiler->imm);
+ }
+ if (flags & ALT_FORM3) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ FAIL_IF(push_inst(compiler, XORI | S(src1) | A(dst) | IMM(compiler->imm)));
+ return push_inst(compiler, XORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16));
+ }
+ return push_inst(compiler, XOR | RC(flags) | S(src1) | A(dst) | B(src2));
+
+ case SLJIT_SHL:
+ if (flags & ALT_FORM1) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ compiler->imm &= 0x1f;
+ return push_inst(compiler, RLWINM | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11) | ((31 - compiler->imm) << 1));
+ }
+ return push_inst(compiler, SLW | RC(flags) | S(src1) | A(dst) | B(src2));
+
+ case SLJIT_LSHR:
+ if (flags & ALT_FORM1) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ compiler->imm &= 0x1f;
+ return push_inst(compiler, RLWINM | RC(flags) | S(src1) | A(dst) | (((32 - compiler->imm) & 0x1f) << 11) | (compiler->imm << 6) | (31 << 1));
+ }
+ return push_inst(compiler, SRW | RC(flags) | S(src1) | A(dst) | B(src2));
+
+ case SLJIT_ASHR:
+ if (flags & ALT_FORM3)
+ FAIL_IF(push_inst(compiler, MFXER | D(0)));
+ if (flags & ALT_FORM1) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ compiler->imm &= 0x1f;
+ FAIL_IF(push_inst(compiler, SRAWI | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11)));
+ }
+ else
+ FAIL_IF(push_inst(compiler, SRAW | RC(flags) | S(src1) | A(dst) | B(src2)));
+ return (flags & ALT_FORM3) ? push_inst(compiler, MTXER | S(0)) : SLJIT_SUCCESS;
+ }
+
+ SLJIT_ASSERT_STOP();
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 emit_const(struct sljit_compiler *compiler, sljit_s32 reg, sljit_sw init_value)
+{
+ FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(init_value >> 16)));
+ return push_inst(compiler, ORI | S(reg) | A(reg) | IMM(init_value));
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset)
+{
+ sljit_ins *inst = (sljit_ins *)addr;
+
+ inst[0] = (inst[0] & 0xffff0000) | ((new_target >> 16) & 0xffff);
+ inst[1] = (inst[1] & 0xffff0000) | (new_target & 0xffff);
+ inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 2);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset)
+{
+ sljit_ins *inst = (sljit_ins *)addr;
+
+ inst[0] = (inst[0] & 0xffff0000) | ((new_constant >> 16) & 0xffff);
+ inst[1] = (inst[1] & 0xffff0000) | (new_constant & 0xffff);
+ inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 2);
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitNativePPC_64.c b/thirdparty/pcre2/src/sljit/sljitNativePPC_64.c
new file mode 100644
index 0000000000..386d247dbc
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativePPC_64.c
@@ -0,0 +1,423 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* ppc 64-bit arch dependent functions. */
+
+#if defined(__GNUC__) || (defined(__IBM_GCC_ASM) && __IBM_GCC_ASM)
+#define ASM_SLJIT_CLZ(src, dst) \
+ __asm__ volatile ( "cntlzd %0, %1" : "=r"(dst) : "r"(src) )
+#elif defined(__xlc__)
+#error "Please enable GCC syntax for inline assembly statements"
+#else
+#error "Must implement count leading zeroes"
+#endif
+
+#define RLDI(dst, src, sh, mb, type) \
+ (HI(30) | S(src) | A(dst) | ((type) << 2) | (((sh) & 0x1f) << 11) | (((sh) & 0x20) >> 4) | (((mb) & 0x1f) << 6) | ((mb) & 0x20))
+
+#define PUSH_RLDICR(reg, shift) \
+ push_inst(compiler, RLDI(reg, reg, 63 - shift, shift, 1))
+
+static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 reg, sljit_sw imm)
+{
+ sljit_uw tmp;
+ sljit_uw shift;
+ sljit_uw tmp2;
+ sljit_uw shift2;
+
+ if (imm <= SIMM_MAX && imm >= SIMM_MIN)
+ return push_inst(compiler, ADDI | D(reg) | A(0) | IMM(imm));
+
+ if (!(imm & ~0xffff))
+ return push_inst(compiler, ORI | S(TMP_ZERO) | A(reg) | IMM(imm));
+
+ if (imm <= 0x7fffffffl && imm >= -0x80000000l) {
+ FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(imm >> 16)));
+ return (imm & 0xffff) ? push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm)) : SLJIT_SUCCESS;
+ }
+
+ /* Count leading zeroes. */
+ tmp = (imm >= 0) ? imm : ~imm;
+ ASM_SLJIT_CLZ(tmp, shift);
+ SLJIT_ASSERT(shift > 0);
+ shift--;
+ tmp = (imm << shift);
+
+ if ((tmp & ~0xffff000000000000ul) == 0) {
+ FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48)));
+ shift += 15;
+ return PUSH_RLDICR(reg, shift);
+ }
+
+ if ((tmp & ~0xffffffff00000000ul) == 0) {
+ FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(tmp >> 48)));
+ FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | IMM(tmp >> 32)));
+ shift += 31;
+ return PUSH_RLDICR(reg, shift);
+ }
+
+ /* Cut out the 16 bit from immediate. */
+ shift += 15;
+ tmp2 = imm & ((1ul << (63 - shift)) - 1);
+
+ if (tmp2 <= 0xffff) {
+ FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48)));
+ FAIL_IF(PUSH_RLDICR(reg, shift));
+ return push_inst(compiler, ORI | S(reg) | A(reg) | tmp2);
+ }
+
+ if (tmp2 <= 0xffffffff) {
+ FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48)));
+ FAIL_IF(PUSH_RLDICR(reg, shift));
+ FAIL_IF(push_inst(compiler, ORIS | S(reg) | A(reg) | (tmp2 >> 16)));
+ return (imm & 0xffff) ? push_inst(compiler, ORI | S(reg) | A(reg) | IMM(tmp2)) : SLJIT_SUCCESS;
+ }
+
+ ASM_SLJIT_CLZ(tmp2, shift2);
+ tmp2 <<= shift2;
+
+ if ((tmp2 & ~0xffff000000000000ul) == 0) {
+ FAIL_IF(push_inst(compiler, ADDI | D(reg) | A(0) | IMM(tmp >> 48)));
+ shift2 += 15;
+ shift += (63 - shift2);
+ FAIL_IF(PUSH_RLDICR(reg, shift));
+ FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | (tmp2 >> 48)));
+ return PUSH_RLDICR(reg, shift2);
+ }
+
+ /* The general version. */
+ FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(imm >> 48)));
+ FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm >> 32)));
+ FAIL_IF(PUSH_RLDICR(reg, 31));
+ FAIL_IF(push_inst(compiler, ORIS | S(reg) | A(reg) | IMM(imm >> 16)));
+ return push_inst(compiler, ORI | S(reg) | A(reg) | IMM(imm));
+}
+
+/* Simplified mnemonics: clrldi. */
+#define INS_CLEAR_LEFT(dst, src, from) \
+ (RLDICL | S(src) | A(dst) | ((from) << 6) | (1 << 5))
+
+/* Sign extension for integer operations. */
+#define UN_EXTS() \
+ if ((flags & (ALT_SIGN_EXT | REG2_SOURCE)) == (ALT_SIGN_EXT | REG2_SOURCE)) { \
+ FAIL_IF(push_inst(compiler, EXTSW | S(src2) | A(TMP_REG2))); \
+ src2 = TMP_REG2; \
+ }
+
+#define BIN_EXTS() \
+ if (flags & ALT_SIGN_EXT) { \
+ if (flags & REG1_SOURCE) { \
+ FAIL_IF(push_inst(compiler, EXTSW | S(src1) | A(TMP_REG1))); \
+ src1 = TMP_REG1; \
+ } \
+ if (flags & REG2_SOURCE) { \
+ FAIL_IF(push_inst(compiler, EXTSW | S(src2) | A(TMP_REG2))); \
+ src2 = TMP_REG2; \
+ } \
+ }
+
+#define BIN_IMM_EXTS() \
+ if ((flags & (ALT_SIGN_EXT | REG1_SOURCE)) == (ALT_SIGN_EXT | REG1_SOURCE)) { \
+ FAIL_IF(push_inst(compiler, EXTSW | S(src1) | A(TMP_REG1))); \
+ src1 = TMP_REG1; \
+ }
+
+static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags,
+ sljit_s32 dst, sljit_s32 src1, sljit_s32 src2)
+{
+ switch (op) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_P:
+ SLJIT_ASSERT(src1 == TMP_REG1);
+ if (dst != src2)
+ return push_inst(compiler, OR | S(src2) | A(dst) | B(src2));
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U32:
+ case SLJIT_MOV_S32:
+ SLJIT_ASSERT(src1 == TMP_REG1);
+ if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
+ if (op == SLJIT_MOV_S32)
+ return push_inst(compiler, EXTSW | S(src2) | A(dst));
+ return push_inst(compiler, INS_CLEAR_LEFT(dst, src2, 0));
+ }
+ else {
+ SLJIT_ASSERT(dst == src2);
+ }
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U8:
+ case SLJIT_MOV_S8:
+ SLJIT_ASSERT(src1 == TMP_REG1);
+ if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
+ if (op == SLJIT_MOV_S8)
+ return push_inst(compiler, EXTSB | S(src2) | A(dst));
+ return push_inst(compiler, INS_CLEAR_LEFT(dst, src2, 24));
+ }
+ else if ((flags & REG_DEST) && op == SLJIT_MOV_S8)
+ return push_inst(compiler, EXTSB | S(src2) | A(dst));
+ else {
+ SLJIT_ASSERT(dst == src2);
+ }
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U16:
+ case SLJIT_MOV_S16:
+ SLJIT_ASSERT(src1 == TMP_REG1);
+ if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
+ if (op == SLJIT_MOV_S16)
+ return push_inst(compiler, EXTSH | S(src2) | A(dst));
+ return push_inst(compiler, INS_CLEAR_LEFT(dst, src2, 16));
+ }
+ else {
+ SLJIT_ASSERT(dst == src2);
+ }
+ return SLJIT_SUCCESS;
+
+ case SLJIT_NOT:
+ SLJIT_ASSERT(src1 == TMP_REG1);
+ UN_EXTS();
+ return push_inst(compiler, NOR | RC(flags) | S(src2) | A(dst) | B(src2));
+
+ case SLJIT_NEG:
+ SLJIT_ASSERT(src1 == TMP_REG1);
+ UN_EXTS();
+ return push_inst(compiler, NEG | OERC(flags) | D(dst) | A(src2));
+
+ case SLJIT_CLZ:
+ SLJIT_ASSERT(src1 == TMP_REG1);
+ if (flags & ALT_FORM1)
+ return push_inst(compiler, CNTLZW | RC(flags) | S(src2) | A(dst));
+ return push_inst(compiler, CNTLZD | RC(flags) | S(src2) | A(dst));
+
+ case SLJIT_ADD:
+ if (flags & ALT_FORM1) {
+ /* Flags does not set: BIN_IMM_EXTS unnecessary. */
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, ADDI | D(dst) | A(src1) | compiler->imm);
+ }
+ if (flags & ALT_FORM2) {
+ /* Flags does not set: BIN_IMM_EXTS unnecessary. */
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, ADDIS | D(dst) | A(src1) | compiler->imm);
+ }
+ if (flags & ALT_FORM3) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ BIN_IMM_EXTS();
+ return push_inst(compiler, ADDIC | D(dst) | A(src1) | compiler->imm);
+ }
+ if (flags & ALT_FORM4) {
+ /* Flags does not set: BIN_IMM_EXTS unnecessary. */
+ FAIL_IF(push_inst(compiler, ADDI | D(dst) | A(src1) | (compiler->imm & 0xffff)));
+ return push_inst(compiler, ADDIS | D(dst) | A(dst) | (((compiler->imm >> 16) & 0xffff) + ((compiler->imm >> 15) & 0x1)));
+ }
+ if (!(flags & ALT_SET_FLAGS))
+ return push_inst(compiler, ADD | D(dst) | A(src1) | B(src2));
+ BIN_EXTS();
+ return push_inst(compiler, ADDC | OERC(ALT_SET_FLAGS) | D(dst) | A(src1) | B(src2));
+
+ case SLJIT_ADDC:
+ if (flags & ALT_FORM1) {
+ FAIL_IF(push_inst(compiler, MFXER | D(0)));
+ FAIL_IF(push_inst(compiler, ADDE | D(dst) | A(src1) | B(src2)));
+ return push_inst(compiler, MTXER | S(0));
+ }
+ BIN_EXTS();
+ return push_inst(compiler, ADDE | D(dst) | A(src1) | B(src2));
+
+ case SLJIT_SUB:
+ if (flags & ALT_FORM1) {
+ /* Flags does not set: BIN_IMM_EXTS unnecessary. */
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, SUBFIC | D(dst) | A(src1) | compiler->imm);
+ }
+ if (flags & (ALT_FORM2 | ALT_FORM3)) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ if (flags & ALT_FORM2)
+ FAIL_IF(push_inst(compiler, CMPI | CRD(0 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | compiler->imm));
+ if (flags & ALT_FORM3)
+ return push_inst(compiler, CMPLI | CRD(4 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | compiler->imm);
+ return SLJIT_SUCCESS;
+ }
+ if (flags & (ALT_FORM4 | ALT_FORM5)) {
+ if (flags & ALT_FORM4)
+ FAIL_IF(push_inst(compiler, CMPL | CRD(4 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | B(src2)));
+ if (flags & ALT_FORM5)
+ return push_inst(compiler, CMP | CRD(0 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | B(src2));
+ return SLJIT_SUCCESS;
+ }
+ if (!(flags & ALT_SET_FLAGS))
+ return push_inst(compiler, SUBF | D(dst) | A(src2) | B(src1));
+ BIN_EXTS();
+ if (flags & ALT_FORM6)
+ FAIL_IF(push_inst(compiler, CMPL | CRD(4 | ((flags & ALT_SIGN_EXT) ? 0 : 1)) | A(src1) | B(src2)));
+ return push_inst(compiler, SUBFC | OERC(ALT_SET_FLAGS) | D(dst) | A(src2) | B(src1));
+
+ case SLJIT_SUBC:
+ if (flags & ALT_FORM1) {
+ FAIL_IF(push_inst(compiler, MFXER | D(0)));
+ FAIL_IF(push_inst(compiler, SUBFE | D(dst) | A(src2) | B(src1)));
+ return push_inst(compiler, MTXER | S(0));
+ }
+ BIN_EXTS();
+ return push_inst(compiler, SUBFE | D(dst) | A(src2) | B(src1));
+
+ case SLJIT_MUL:
+ if (flags & ALT_FORM1) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, MULLI | D(dst) | A(src1) | compiler->imm);
+ }
+ BIN_EXTS();
+ if (flags & ALT_FORM2)
+ return push_inst(compiler, MULLW | OERC(flags) | D(dst) | A(src2) | B(src1));
+ return push_inst(compiler, MULLD | OERC(flags) | D(dst) | A(src2) | B(src1));
+
+ case SLJIT_AND:
+ if (flags & ALT_FORM1) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, ANDI | S(src1) | A(dst) | compiler->imm);
+ }
+ if (flags & ALT_FORM2) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, ANDIS | S(src1) | A(dst) | compiler->imm);
+ }
+ return push_inst(compiler, AND | RC(flags) | S(src1) | A(dst) | B(src2));
+
+ case SLJIT_OR:
+ if (flags & ALT_FORM1) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, ORI | S(src1) | A(dst) | compiler->imm);
+ }
+ if (flags & ALT_FORM2) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, ORIS | S(src1) | A(dst) | compiler->imm);
+ }
+ if (flags & ALT_FORM3) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ FAIL_IF(push_inst(compiler, ORI | S(src1) | A(dst) | IMM(compiler->imm)));
+ return push_inst(compiler, ORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16));
+ }
+ return push_inst(compiler, OR | RC(flags) | S(src1) | A(dst) | B(src2));
+
+ case SLJIT_XOR:
+ if (flags & ALT_FORM1) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, XORI | S(src1) | A(dst) | compiler->imm);
+ }
+ if (flags & ALT_FORM2) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ return push_inst(compiler, XORIS | S(src1) | A(dst) | compiler->imm);
+ }
+ if (flags & ALT_FORM3) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ FAIL_IF(push_inst(compiler, XORI | S(src1) | A(dst) | IMM(compiler->imm)));
+ return push_inst(compiler, XORIS | S(dst) | A(dst) | IMM(compiler->imm >> 16));
+ }
+ return push_inst(compiler, XOR | RC(flags) | S(src1) | A(dst) | B(src2));
+
+ case SLJIT_SHL:
+ if (flags & ALT_FORM1) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ if (flags & ALT_FORM2) {
+ compiler->imm &= 0x1f;
+ return push_inst(compiler, RLWINM | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11) | ((31 - compiler->imm) << 1));
+ }
+ else {
+ compiler->imm &= 0x3f;
+ return push_inst(compiler, RLDI(dst, src1, compiler->imm, 63 - compiler->imm, 1) | RC(flags));
+ }
+ }
+ return push_inst(compiler, ((flags & ALT_FORM2) ? SLW : SLD) | RC(flags) | S(src1) | A(dst) | B(src2));
+
+ case SLJIT_LSHR:
+ if (flags & ALT_FORM1) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ if (flags & ALT_FORM2) {
+ compiler->imm &= 0x1f;
+ return push_inst(compiler, RLWINM | RC(flags) | S(src1) | A(dst) | (((32 - compiler->imm) & 0x1f) << 11) | (compiler->imm << 6) | (31 << 1));
+ }
+ else {
+ compiler->imm &= 0x3f;
+ return push_inst(compiler, RLDI(dst, src1, 64 - compiler->imm, compiler->imm, 0) | RC(flags));
+ }
+ }
+ return push_inst(compiler, ((flags & ALT_FORM2) ? SRW : SRD) | RC(flags) | S(src1) | A(dst) | B(src2));
+
+ case SLJIT_ASHR:
+ if (flags & ALT_FORM3)
+ FAIL_IF(push_inst(compiler, MFXER | D(0)));
+ if (flags & ALT_FORM1) {
+ SLJIT_ASSERT(src2 == TMP_REG2);
+ if (flags & ALT_FORM2) {
+ compiler->imm &= 0x1f;
+ FAIL_IF(push_inst(compiler, SRAWI | RC(flags) | S(src1) | A(dst) | (compiler->imm << 11)));
+ }
+ else {
+ compiler->imm &= 0x3f;
+ FAIL_IF(push_inst(compiler, SRADI | RC(flags) | S(src1) | A(dst) | ((compiler->imm & 0x1f) << 11) | ((compiler->imm & 0x20) >> 4)));
+ }
+ }
+ else
+ FAIL_IF(push_inst(compiler, ((flags & ALT_FORM2) ? SRAW : SRAD) | RC(flags) | S(src1) | A(dst) | B(src2)));
+ return (flags & ALT_FORM3) ? push_inst(compiler, MTXER | S(0)) : SLJIT_SUCCESS;
+ }
+
+ SLJIT_ASSERT_STOP();
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 emit_const(struct sljit_compiler *compiler, sljit_s32 reg, sljit_sw init_value)
+{
+ FAIL_IF(push_inst(compiler, ADDIS | D(reg) | A(0) | IMM(init_value >> 48)));
+ FAIL_IF(push_inst(compiler, ORI | S(reg) | A(reg) | IMM(init_value >> 32)));
+ FAIL_IF(PUSH_RLDICR(reg, 31));
+ FAIL_IF(push_inst(compiler, ORIS | S(reg) | A(reg) | IMM(init_value >> 16)));
+ return push_inst(compiler, ORI | S(reg) | A(reg) | IMM(init_value));
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset)
+{
+ sljit_ins *inst = (sljit_ins*)addr;
+
+ inst[0] = (inst[0] & 0xffff0000) | ((new_target >> 48) & 0xffff);
+ inst[1] = (inst[1] & 0xffff0000) | ((new_target >> 32) & 0xffff);
+ inst[3] = (inst[3] & 0xffff0000) | ((new_target >> 16) & 0xffff);
+ inst[4] = (inst[4] & 0xffff0000) | (new_target & 0xffff);
+ inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 5);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset)
+{
+ sljit_ins *inst = (sljit_ins*)addr;
+
+ inst[0] = (inst[0] & 0xffff0000) | ((new_constant >> 48) & 0xffff);
+ inst[1] = (inst[1] & 0xffff0000) | ((new_constant >> 32) & 0xffff);
+ inst[3] = (inst[3] & 0xffff0000) | ((new_constant >> 16) & 0xffff);
+ inst[4] = (inst[4] & 0xffff0000) | (new_constant & 0xffff);
+ inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 5);
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitNativePPC_common.c b/thirdparty/pcre2/src/sljit/sljitNativePPC_common.c
new file mode 100644
index 0000000000..150c0bf9f4
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativePPC_common.c
@@ -0,0 +1,2393 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+SLJIT_API_FUNC_ATTRIBUTE const char* sljit_get_platform_name(void)
+{
+ return "PowerPC" SLJIT_CPUINFO;
+}
+
+/* Length of an instruction word.
+ Both for ppc-32 and ppc-64. */
+typedef sljit_u32 sljit_ins;
+
+#if ((defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) && (defined _AIX)) \
+ || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+#define SLJIT_PPC_STACK_FRAME_V2 1
+#endif
+
+#ifdef _AIX
+#include <sys/cache.h>
+#endif
+
+#if (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
+#define SLJIT_PASS_ENTRY_ADDR_TO_CALL 1
+#endif
+
+#if (defined SLJIT_CACHE_FLUSH_OWN_IMPL && SLJIT_CACHE_FLUSH_OWN_IMPL)
+
+static void ppc_cache_flush(sljit_ins *from, sljit_ins *to)
+{
+#ifdef _AIX
+ _sync_cache_range((caddr_t)from, (int)((size_t)to - (size_t)from));
+#elif defined(__GNUC__) || (defined(__IBM_GCC_ASM) && __IBM_GCC_ASM)
+# if defined(_ARCH_PWR) || defined(_ARCH_PWR2)
+ /* Cache flush for POWER architecture. */
+ while (from < to) {
+ __asm__ volatile (
+ "clf 0, %0\n"
+ "dcs\n"
+ : : "r"(from)
+ );
+ from++;
+ }
+ __asm__ volatile ( "ics" );
+# elif defined(_ARCH_COM) && !defined(_ARCH_PPC)
+# error "Cache flush is not implemented for PowerPC/POWER common mode."
+# else
+ /* Cache flush for PowerPC architecture. */
+ while (from < to) {
+ __asm__ volatile (
+ "dcbf 0, %0\n"
+ "sync\n"
+ "icbi 0, %0\n"
+ : : "r"(from)
+ );
+ from++;
+ }
+ __asm__ volatile ( "isync" );
+# endif
+# ifdef __xlc__
+# warning "This file may fail to compile if -qfuncsect is used"
+# endif
+#elif defined(__xlc__)
+#error "Please enable GCC syntax for inline assembly statements with -qasm=gcc"
+#else
+#error "This platform requires a cache flush implementation."
+#endif /* _AIX */
+}
+
+#endif /* (defined SLJIT_CACHE_FLUSH_OWN_IMPL && SLJIT_CACHE_FLUSH_OWN_IMPL) */
+
+#define TMP_REG1 (SLJIT_NUMBER_OF_REGISTERS + 2)
+#define TMP_REG2 (SLJIT_NUMBER_OF_REGISTERS + 3)
+#define TMP_REG3 (SLJIT_NUMBER_OF_REGISTERS + 4)
+#define TMP_ZERO (SLJIT_NUMBER_OF_REGISTERS + 5)
+
+#if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL)
+#define TMP_CALL_REG (SLJIT_NUMBER_OF_REGISTERS + 6)
+#else
+#define TMP_CALL_REG TMP_REG2
+#endif
+
+#define TMP_FREG1 (0)
+#define TMP_FREG2 (SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1)
+
+static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 7] = {
+ 0, 3, 4, 5, 6, 7, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 8, 9, 10, 31, 12
+};
+
+/* --------------------------------------------------------------------- */
+/* Instrucion forms */
+/* --------------------------------------------------------------------- */
+#define D(d) (reg_map[d] << 21)
+#define S(s) (reg_map[s] << 21)
+#define A(a) (reg_map[a] << 16)
+#define B(b) (reg_map[b] << 11)
+#define C(c) (reg_map[c] << 6)
+#define FD(fd) ((fd) << 21)
+#define FS(fs) ((fs) << 21)
+#define FA(fa) ((fa) << 16)
+#define FB(fb) ((fb) << 11)
+#define FC(fc) ((fc) << 6)
+#define IMM(imm) ((imm) & 0xffff)
+#define CRD(d) ((d) << 21)
+
+/* Instruction bit sections.
+ OE and Rc flag (see ALT_SET_FLAGS). */
+#define OERC(flags) (((flags & ALT_SET_FLAGS) >> 10) | (flags & ALT_SET_FLAGS))
+/* Rc flag (see ALT_SET_FLAGS). */
+#define RC(flags) ((flags & ALT_SET_FLAGS) >> 10)
+#define HI(opcode) ((opcode) << 26)
+#define LO(opcode) ((opcode) << 1)
+
+#define ADD (HI(31) | LO(266))
+#define ADDC (HI(31) | LO(10))
+#define ADDE (HI(31) | LO(138))
+#define ADDI (HI(14))
+#define ADDIC (HI(13))
+#define ADDIS (HI(15))
+#define ADDME (HI(31) | LO(234))
+#define AND (HI(31) | LO(28))
+#define ANDI (HI(28))
+#define ANDIS (HI(29))
+#define Bx (HI(18))
+#define BCx (HI(16))
+#define BCCTR (HI(19) | LO(528) | (3 << 11))
+#define BLR (HI(19) | LO(16) | (0x14 << 21))
+#define CNTLZD (HI(31) | LO(58))
+#define CNTLZW (HI(31) | LO(26))
+#define CMP (HI(31) | LO(0))
+#define CMPI (HI(11))
+#define CMPL (HI(31) | LO(32))
+#define CMPLI (HI(10))
+#define CROR (HI(19) | LO(449))
+#define DIVD (HI(31) | LO(489))
+#define DIVDU (HI(31) | LO(457))
+#define DIVW (HI(31) | LO(491))
+#define DIVWU (HI(31) | LO(459))
+#define EXTSB (HI(31) | LO(954))
+#define EXTSH (HI(31) | LO(922))
+#define EXTSW (HI(31) | LO(986))
+#define FABS (HI(63) | LO(264))
+#define FADD (HI(63) | LO(21))
+#define FADDS (HI(59) | LO(21))
+#define FCFID (HI(63) | LO(846))
+#define FCMPU (HI(63) | LO(0))
+#define FCTIDZ (HI(63) | LO(815))
+#define FCTIWZ (HI(63) | LO(15))
+#define FDIV (HI(63) | LO(18))
+#define FDIVS (HI(59) | LO(18))
+#define FMR (HI(63) | LO(72))
+#define FMUL (HI(63) | LO(25))
+#define FMULS (HI(59) | LO(25))
+#define FNEG (HI(63) | LO(40))
+#define FRSP (HI(63) | LO(12))
+#define FSUB (HI(63) | LO(20))
+#define FSUBS (HI(59) | LO(20))
+#define LD (HI(58) | 0)
+#define LWZ (HI(32))
+#define MFCR (HI(31) | LO(19))
+#define MFLR (HI(31) | LO(339) | 0x80000)
+#define MFXER (HI(31) | LO(339) | 0x10000)
+#define MTCTR (HI(31) | LO(467) | 0x90000)
+#define MTLR (HI(31) | LO(467) | 0x80000)
+#define MTXER (HI(31) | LO(467) | 0x10000)
+#define MULHD (HI(31) | LO(73))
+#define MULHDU (HI(31) | LO(9))
+#define MULHW (HI(31) | LO(75))
+#define MULHWU (HI(31) | LO(11))
+#define MULLD (HI(31) | LO(233))
+#define MULLI (HI(7))
+#define MULLW (HI(31) | LO(235))
+#define NEG (HI(31) | LO(104))
+#define NOP (HI(24))
+#define NOR (HI(31) | LO(124))
+#define OR (HI(31) | LO(444))
+#define ORI (HI(24))
+#define ORIS (HI(25))
+#define RLDICL (HI(30))
+#define RLWINM (HI(21))
+#define SLD (HI(31) | LO(27))
+#define SLW (HI(31) | LO(24))
+#define SRAD (HI(31) | LO(794))
+#define SRADI (HI(31) | LO(413 << 1))
+#define SRAW (HI(31) | LO(792))
+#define SRAWI (HI(31) | LO(824))
+#define SRD (HI(31) | LO(539))
+#define SRW (HI(31) | LO(536))
+#define STD (HI(62) | 0)
+#define STDU (HI(62) | 1)
+#define STDUX (HI(31) | LO(181))
+#define STFIWX (HI(31) | LO(983))
+#define STW (HI(36))
+#define STWU (HI(37))
+#define STWUX (HI(31) | LO(183))
+#define SUBF (HI(31) | LO(40))
+#define SUBFC (HI(31) | LO(8))
+#define SUBFE (HI(31) | LO(136))
+#define SUBFIC (HI(8))
+#define XOR (HI(31) | LO(316))
+#define XORI (HI(26))
+#define XORIS (HI(27))
+
+#define SIMM_MAX (0x7fff)
+#define SIMM_MIN (-0x8000)
+#define UIMM_MAX (0xffff)
+
+#if (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_function_context(void** func_ptr, struct sljit_function_context* context, sljit_sw addr, void* func)
+{
+ sljit_sw* ptrs;
+ if (func_ptr)
+ *func_ptr = (void*)context;
+ ptrs = (sljit_sw*)func;
+ context->addr = addr ? addr : ptrs[0];
+ context->r2 = ptrs[1];
+ context->r11 = ptrs[2];
+}
+#endif
+
+static sljit_s32 push_inst(struct sljit_compiler *compiler, sljit_ins ins)
+{
+ sljit_ins *ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins));
+ FAIL_IF(!ptr);
+ *ptr = ins;
+ compiler->size++;
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_ins *code, sljit_sw executable_offset)
+{
+ sljit_sw diff;
+ sljit_uw target_addr;
+ sljit_sw extra_jump_flags;
+
+#if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL) && (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
+ if (jump->flags & (SLJIT_REWRITABLE_JUMP | IS_CALL))
+ return 0;
+#else
+ if (jump->flags & SLJIT_REWRITABLE_JUMP)
+ return 0;
+#endif
+
+ if (jump->flags & JUMP_ADDR)
+ target_addr = jump->u.target;
+ else {
+ SLJIT_ASSERT(jump->flags & JUMP_LABEL);
+ target_addr = (sljit_uw)(code + jump->u.label->size) + (sljit_uw)executable_offset;
+ }
+
+#if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL) && (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ if (jump->flags & IS_CALL)
+ goto keep_address;
+#endif
+
+ diff = ((sljit_sw)target_addr - (sljit_sw)(code_ptr) - executable_offset) & ~0x3l;
+
+ extra_jump_flags = 0;
+ if (jump->flags & IS_COND) {
+ if (diff <= 0x7fff && diff >= -0x8000) {
+ jump->flags |= PATCH_B;
+ return 1;
+ }
+ if (target_addr <= 0xffff) {
+ jump->flags |= PATCH_B | PATCH_ABS_B;
+ return 1;
+ }
+ extra_jump_flags = REMOVE_COND;
+
+ diff -= sizeof(sljit_ins);
+ }
+
+ if (diff <= 0x01ffffff && diff >= -0x02000000) {
+ jump->flags |= PATCH_B | extra_jump_flags;
+ return 1;
+ }
+
+ if (target_addr <= 0x03ffffff) {
+ jump->flags |= PATCH_B | PATCH_ABS_B | extra_jump_flags;
+ return 1;
+ }
+
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+#if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL)
+keep_address:
+#endif
+ if (target_addr <= 0x7fffffff) {
+ jump->flags |= PATCH_ABS32;
+ return 1;
+ }
+
+ if (target_addr <= 0x7fffffffffffl) {
+ jump->flags |= PATCH_ABS48;
+ return 1;
+ }
+#endif
+
+ return 0;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
+{
+ struct sljit_memory_fragment *buf;
+ sljit_ins *code;
+ sljit_ins *code_ptr;
+ sljit_ins *buf_ptr;
+ sljit_ins *buf_end;
+ sljit_uw word_count;
+ sljit_sw executable_offset;
+ sljit_uw addr;
+
+ struct sljit_label *label;
+ struct sljit_jump *jump;
+ struct sljit_const *const_;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_generate_code(compiler));
+ reverse_buf(compiler);
+
+#if (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ compiler->size += (compiler->size & 0x1) + (sizeof(struct sljit_function_context) / sizeof(sljit_ins));
+#else
+ compiler->size += (sizeof(struct sljit_function_context) / sizeof(sljit_ins));
+#endif
+#endif
+ code = (sljit_ins*)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_ins));
+ PTR_FAIL_WITH_EXEC_IF(code);
+ buf = compiler->buf;
+
+ code_ptr = code;
+ word_count = 0;
+ executable_offset = SLJIT_EXEC_OFFSET(code);
+
+ label = compiler->labels;
+ jump = compiler->jumps;
+ const_ = compiler->consts;
+
+ do {
+ buf_ptr = (sljit_ins*)buf->memory;
+ buf_end = buf_ptr + (buf->used_size >> 2);
+ do {
+ *code_ptr = *buf_ptr++;
+ SLJIT_ASSERT(!label || label->size >= word_count);
+ SLJIT_ASSERT(!jump || jump->addr >= word_count);
+ SLJIT_ASSERT(!const_ || const_->addr >= word_count);
+ /* These structures are ordered by their address. */
+ if (label && label->size == word_count) {
+ /* Just recording the address. */
+ label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
+ label->size = code_ptr - code;
+ label = label->next;
+ }
+ if (jump && jump->addr == word_count) {
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
+ jump->addr = (sljit_uw)(code_ptr - 3);
+#else
+ jump->addr = (sljit_uw)(code_ptr - 6);
+#endif
+ if (detect_jump_type(jump, code_ptr, code, executable_offset)) {
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
+ code_ptr[-3] = code_ptr[0];
+ code_ptr -= 3;
+#else
+ if (jump->flags & PATCH_ABS32) {
+ code_ptr -= 3;
+ code_ptr[-1] = code_ptr[2];
+ code_ptr[0] = code_ptr[3];
+ }
+ else if (jump->flags & PATCH_ABS48) {
+ code_ptr--;
+ code_ptr[-1] = code_ptr[0];
+ code_ptr[0] = code_ptr[1];
+ /* rldicr rX,rX,32,31 -> rX,rX,16,47 */
+ SLJIT_ASSERT((code_ptr[-3] & 0xfc00ffff) == 0x780007c6);
+ code_ptr[-3] ^= 0x8422;
+ /* oris -> ori */
+ code_ptr[-2] ^= 0x4000000;
+ }
+ else {
+ code_ptr[-6] = code_ptr[0];
+ code_ptr -= 6;
+ }
+#endif
+ if (jump->flags & REMOVE_COND) {
+ code_ptr[0] = BCx | (2 << 2) | ((code_ptr[0] ^ (8 << 21)) & 0x03ff0001);
+ code_ptr++;
+ jump->addr += sizeof(sljit_ins);
+ code_ptr[0] = Bx;
+ jump->flags -= IS_COND;
+ }
+ }
+ jump = jump->next;
+ }
+ if (const_ && const_->addr == word_count) {
+ const_->addr = (sljit_uw)code_ptr;
+ const_ = const_->next;
+ }
+ code_ptr ++;
+ word_count ++;
+ } while (buf_ptr < buf_end);
+
+ buf = buf->next;
+ } while (buf);
+
+ if (label && label->size == word_count) {
+ label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
+ label->size = code_ptr - code;
+ label = label->next;
+ }
+
+ SLJIT_ASSERT(!label);
+ SLJIT_ASSERT(!jump);
+ SLJIT_ASSERT(!const_);
+#if (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
+ SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size - (sizeof(struct sljit_function_context) / sizeof(sljit_ins)));
+#else
+ SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size);
+#endif
+
+ jump = compiler->jumps;
+ while (jump) {
+ do {
+ addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target;
+ buf_ptr = (sljit_ins *)jump->addr;
+
+ if (jump->flags & PATCH_B) {
+ if (jump->flags & IS_COND) {
+ if (!(jump->flags & PATCH_ABS_B)) {
+ addr -= (sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset);
+ SLJIT_ASSERT((sljit_sw)addr <= 0x7fff && (sljit_sw)addr >= -0x8000);
+ *buf_ptr = BCx | (addr & 0xfffc) | ((*buf_ptr) & 0x03ff0001);
+ }
+ else {
+ SLJIT_ASSERT(addr <= 0xffff);
+ *buf_ptr = BCx | (addr & 0xfffc) | 0x2 | ((*buf_ptr) & 0x03ff0001);
+ }
+ }
+ else {
+ if (!(jump->flags & PATCH_ABS_B)) {
+ addr -= (sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset);
+ SLJIT_ASSERT((sljit_sw)addr <= 0x01ffffff && (sljit_sw)addr >= -0x02000000);
+ *buf_ptr = Bx | (addr & 0x03fffffc) | ((*buf_ptr) & 0x1);
+ }
+ else {
+ SLJIT_ASSERT(addr <= 0x03ffffff);
+ *buf_ptr = Bx | (addr & 0x03fffffc) | 0x2 | ((*buf_ptr) & 0x1);
+ }
+ }
+ break;
+ }
+
+ /* Set the fields of immediate loads. */
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
+ buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 16) & 0xffff);
+ buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | (addr & 0xffff);
+#else
+ if (jump->flags & PATCH_ABS32) {
+ SLJIT_ASSERT(addr <= 0x7fffffff);
+ buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 16) & 0xffff);
+ buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | (addr & 0xffff);
+ break;
+ }
+ if (jump->flags & PATCH_ABS48) {
+ SLJIT_ASSERT(addr <= 0x7fffffffffff);
+ buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 32) & 0xffff);
+ buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | ((addr >> 16) & 0xffff);
+ buf_ptr[3] = (buf_ptr[3] & 0xffff0000) | (addr & 0xffff);
+ break;
+ }
+ buf_ptr[0] = (buf_ptr[0] & 0xffff0000) | ((addr >> 48) & 0xffff);
+ buf_ptr[1] = (buf_ptr[1] & 0xffff0000) | ((addr >> 32) & 0xffff);
+ buf_ptr[3] = (buf_ptr[3] & 0xffff0000) | ((addr >> 16) & 0xffff);
+ buf_ptr[4] = (buf_ptr[4] & 0xffff0000) | (addr & 0xffff);
+#endif
+ } while (0);
+ jump = jump->next;
+ }
+
+ compiler->error = SLJIT_ERR_COMPILED;
+ compiler->executable_offset = executable_offset;
+ compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins);
+
+ code = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset);
+
+#if (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ if (((sljit_sw)code_ptr) & 0x4)
+ code_ptr++;
+#endif
+ sljit_set_function_context(NULL, (struct sljit_function_context*)code_ptr, (sljit_sw)code, (void*)sljit_generate_code);
+#endif
+
+ code_ptr = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
+
+ SLJIT_CACHE_FLUSH(code, code_ptr);
+
+#if (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
+ return code_ptr;
+#else
+ return code;
+#endif
+}
+
+/* --------------------------------------------------------------------- */
+/* Entry, exit */
+/* --------------------------------------------------------------------- */
+
+/* inp_flags: */
+
+/* Creates an index in data_transfer_insts array. */
+#define LOAD_DATA 0x01
+#define INDEXED 0x02
+#define WRITE_BACK 0x04
+#define WORD_DATA 0x00
+#define BYTE_DATA 0x08
+#define HALF_DATA 0x10
+#define INT_DATA 0x18
+#define SIGNED_DATA 0x20
+/* Separates integer and floating point registers */
+#define GPR_REG 0x3f
+#define DOUBLE_DATA 0x40
+
+#define MEM_MASK 0x7f
+
+/* Other inp_flags. */
+
+#define ARG_TEST 0x000100
+/* Integer opertion and set flags -> requires exts on 64 bit systems. */
+#define ALT_SIGN_EXT 0x000200
+/* This flag affects the RC() and OERC() macros. */
+#define ALT_SET_FLAGS 0x000400
+#define ALT_KEEP_CACHE 0x000800
+#define ALT_FORM1 0x010000
+#define ALT_FORM2 0x020000
+#define ALT_FORM3 0x040000
+#define ALT_FORM4 0x080000
+#define ALT_FORM5 0x100000
+#define ALT_FORM6 0x200000
+
+/* Source and destination is register. */
+#define REG_DEST 0x000001
+#define REG1_SOURCE 0x000002
+#define REG2_SOURCE 0x000004
+/* getput_arg_fast returned true. */
+#define FAST_DEST 0x000008
+/* Multiple instructions are required. */
+#define SLOW_DEST 0x000010
+/*
+ALT_SIGN_EXT 0x000200
+ALT_SET_FLAGS 0x000400
+ALT_FORM1 0x010000
+...
+ALT_FORM6 0x200000 */
+
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
+#include "sljitNativePPC_32.c"
+#else
+#include "sljitNativePPC_64.c"
+#endif
+
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
+#define STACK_STORE STW
+#define STACK_LOAD LWZ
+#else
+#define STACK_STORE STD
+#define STACK_LOAD LD
+#endif
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ sljit_s32 i, tmp, offs;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ FAIL_IF(push_inst(compiler, MFLR | D(0)));
+ offs = -(sljit_s32)(sizeof(sljit_sw));
+ FAIL_IF(push_inst(compiler, STACK_STORE | S(TMP_ZERO) | A(SLJIT_SP) | IMM(offs)));
+
+ tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = SLJIT_S0; i >= tmp; i--) {
+ offs -= (sljit_s32)(sizeof(sljit_sw));
+ FAIL_IF(push_inst(compiler, STACK_STORE | S(i) | A(SLJIT_SP) | IMM(offs)));
+ }
+
+ for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--) {
+ offs -= (sljit_s32)(sizeof(sljit_sw));
+ FAIL_IF(push_inst(compiler, STACK_STORE | S(i) | A(SLJIT_SP) | IMM(offs)));
+ }
+
+ SLJIT_ASSERT(offs == -(sljit_s32)GET_SAVED_REGISTERS_SIZE(compiler->scratches, compiler->saveds, 1));
+
+#if (defined SLJIT_PPC_STACK_FRAME_V2 && SLJIT_PPC_STACK_FRAME_V2)
+ FAIL_IF(push_inst(compiler, STACK_STORE | S(0) | A(SLJIT_SP) | IMM(2 * sizeof(sljit_sw))));
+#else
+ FAIL_IF(push_inst(compiler, STACK_STORE | S(0) | A(SLJIT_SP) | IMM(sizeof(sljit_sw))));
+#endif
+
+ FAIL_IF(push_inst(compiler, ADDI | D(TMP_ZERO) | A(0) | 0));
+ if (args >= 1)
+ FAIL_IF(push_inst(compiler, OR | S(SLJIT_R0) | A(SLJIT_S0) | B(SLJIT_R0)));
+ if (args >= 2)
+ FAIL_IF(push_inst(compiler, OR | S(SLJIT_R1) | A(SLJIT_S1) | B(SLJIT_R1)));
+ if (args >= 3)
+ FAIL_IF(push_inst(compiler, OR | S(SLJIT_R2) | A(SLJIT_S2) | B(SLJIT_R2)));
+
+ local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1) + SLJIT_LOCALS_OFFSET;
+ local_size = (local_size + 15) & ~0xf;
+ compiler->local_size = local_size;
+
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
+ if (local_size <= SIMM_MAX)
+ FAIL_IF(push_inst(compiler, STWU | S(SLJIT_SP) | A(SLJIT_SP) | IMM(-local_size)));
+ else {
+ FAIL_IF(load_immediate(compiler, 0, -local_size));
+ FAIL_IF(push_inst(compiler, STWUX | S(SLJIT_SP) | A(SLJIT_SP) | B(0)));
+ }
+#else
+ if (local_size <= SIMM_MAX)
+ FAIL_IF(push_inst(compiler, STDU | S(SLJIT_SP) | A(SLJIT_SP) | IMM(-local_size)));
+ else {
+ FAIL_IF(load_immediate(compiler, 0, -local_size));
+ FAIL_IF(push_inst(compiler, STDUX | S(SLJIT_SP) | A(SLJIT_SP) | B(0)));
+ }
+#endif
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1) + SLJIT_LOCALS_OFFSET;
+ compiler->local_size = (local_size + 15) & ~0xf;
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 i, tmp, offs;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_return(compiler, op, src, srcw));
+
+ FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
+
+ if (compiler->local_size <= SIMM_MAX)
+ FAIL_IF(push_inst(compiler, ADDI | D(SLJIT_SP) | A(SLJIT_SP) | IMM(compiler->local_size)));
+ else {
+ FAIL_IF(load_immediate(compiler, 0, compiler->local_size));
+ FAIL_IF(push_inst(compiler, ADD | D(SLJIT_SP) | A(SLJIT_SP) | B(0)));
+ }
+
+#if (defined SLJIT_PPC_STACK_FRAME_V2 && SLJIT_PPC_STACK_FRAME_V2)
+ FAIL_IF(push_inst(compiler, STACK_LOAD | D(0) | A(SLJIT_SP) | IMM(2 * sizeof(sljit_sw))));
+#else
+ FAIL_IF(push_inst(compiler, STACK_LOAD | D(0) | A(SLJIT_SP) | IMM(sizeof(sljit_sw))));
+#endif
+
+ offs = -(sljit_s32)GET_SAVED_REGISTERS_SIZE(compiler->scratches, compiler->saveds, 1);
+
+ tmp = compiler->scratches;
+ for (i = SLJIT_FIRST_SAVED_REG; i <= tmp; i++) {
+ FAIL_IF(push_inst(compiler, STACK_LOAD | D(i) | A(SLJIT_SP) | IMM(offs)));
+ offs += (sljit_s32)(sizeof(sljit_sw));
+ }
+
+ tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = tmp; i <= SLJIT_S0; i++) {
+ FAIL_IF(push_inst(compiler, STACK_LOAD | D(i) | A(SLJIT_SP) | IMM(offs)));
+ offs += (sljit_s32)(sizeof(sljit_sw));
+ }
+
+ FAIL_IF(push_inst(compiler, STACK_LOAD | D(TMP_ZERO) | A(SLJIT_SP) | IMM(offs)));
+ SLJIT_ASSERT(offs == -(sljit_sw)(sizeof(sljit_sw)));
+
+ FAIL_IF(push_inst(compiler, MTLR | S(0)));
+ FAIL_IF(push_inst(compiler, BLR));
+
+ return SLJIT_SUCCESS;
+}
+
+#undef STACK_STORE
+#undef STACK_LOAD
+
+/* --------------------------------------------------------------------- */
+/* Operators */
+/* --------------------------------------------------------------------- */
+
+/* i/x - immediate/indexed form
+ n/w - no write-back / write-back (1 bit)
+ s/l - store/load (1 bit)
+ u/s - signed/unsigned (1 bit)
+ w/b/h/i - word/byte/half/int allowed (2 bit)
+ It contans 32 items, but not all are different. */
+
+/* 64 bit only: [reg+imm] must be aligned to 4 bytes. */
+#define INT_ALIGNED 0x10000
+/* 64-bit only: there is no lwau instruction. */
+#define UPDATE_REQ 0x20000
+
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
+#define ARCH_32_64(a, b) a
+#define INST_CODE_AND_DST(inst, flags, reg) \
+ ((inst) | (((flags) & MEM_MASK) <= GPR_REG ? D(reg) : FD(reg)))
+#else
+#define ARCH_32_64(a, b) b
+#define INST_CODE_AND_DST(inst, flags, reg) \
+ (((inst) & ~(INT_ALIGNED | UPDATE_REQ)) | (((flags) & MEM_MASK) <= GPR_REG ? D(reg) : FD(reg)))
+#endif
+
+static const sljit_ins data_transfer_insts[64 + 8] = {
+
+/* -------- Unsigned -------- */
+
+/* Word. */
+
+/* u w n i s */ ARCH_32_64(HI(36) /* stw */, HI(62) | INT_ALIGNED | 0x0 /* std */),
+/* u w n i l */ ARCH_32_64(HI(32) /* lwz */, HI(58) | INT_ALIGNED | 0x0 /* ld */),
+/* u w n x s */ ARCH_32_64(HI(31) | LO(151) /* stwx */, HI(31) | LO(149) /* stdx */),
+/* u w n x l */ ARCH_32_64(HI(31) | LO(23) /* lwzx */, HI(31) | LO(21) /* ldx */),
+
+/* u w w i s */ ARCH_32_64(HI(37) /* stwu */, HI(62) | INT_ALIGNED | 0x1 /* stdu */),
+/* u w w i l */ ARCH_32_64(HI(33) /* lwzu */, HI(58) | INT_ALIGNED | 0x1 /* ldu */),
+/* u w w x s */ ARCH_32_64(HI(31) | LO(183) /* stwux */, HI(31) | LO(181) /* stdux */),
+/* u w w x l */ ARCH_32_64(HI(31) | LO(55) /* lwzux */, HI(31) | LO(53) /* ldux */),
+
+/* Byte. */
+
+/* u b n i s */ HI(38) /* stb */,
+/* u b n i l */ HI(34) /* lbz */,
+/* u b n x s */ HI(31) | LO(215) /* stbx */,
+/* u b n x l */ HI(31) | LO(87) /* lbzx */,
+
+/* u b w i s */ HI(39) /* stbu */,
+/* u b w i l */ HI(35) /* lbzu */,
+/* u b w x s */ HI(31) | LO(247) /* stbux */,
+/* u b w x l */ HI(31) | LO(119) /* lbzux */,
+
+/* Half. */
+
+/* u h n i s */ HI(44) /* sth */,
+/* u h n i l */ HI(40) /* lhz */,
+/* u h n x s */ HI(31) | LO(407) /* sthx */,
+/* u h n x l */ HI(31) | LO(279) /* lhzx */,
+
+/* u h w i s */ HI(45) /* sthu */,
+/* u h w i l */ HI(41) /* lhzu */,
+/* u h w x s */ HI(31) | LO(439) /* sthux */,
+/* u h w x l */ HI(31) | LO(311) /* lhzux */,
+
+/* Int. */
+
+/* u i n i s */ HI(36) /* stw */,
+/* u i n i l */ HI(32) /* lwz */,
+/* u i n x s */ HI(31) | LO(151) /* stwx */,
+/* u i n x l */ HI(31) | LO(23) /* lwzx */,
+
+/* u i w i s */ HI(37) /* stwu */,
+/* u i w i l */ HI(33) /* lwzu */,
+/* u i w x s */ HI(31) | LO(183) /* stwux */,
+/* u i w x l */ HI(31) | LO(55) /* lwzux */,
+
+/* -------- Signed -------- */
+
+/* Word. */
+
+/* s w n i s */ ARCH_32_64(HI(36) /* stw */, HI(62) | INT_ALIGNED | 0x0 /* std */),
+/* s w n i l */ ARCH_32_64(HI(32) /* lwz */, HI(58) | INT_ALIGNED | 0x0 /* ld */),
+/* s w n x s */ ARCH_32_64(HI(31) | LO(151) /* stwx */, HI(31) | LO(149) /* stdx */),
+/* s w n x l */ ARCH_32_64(HI(31) | LO(23) /* lwzx */, HI(31) | LO(21) /* ldx */),
+
+/* s w w i s */ ARCH_32_64(HI(37) /* stwu */, HI(62) | INT_ALIGNED | 0x1 /* stdu */),
+/* s w w i l */ ARCH_32_64(HI(33) /* lwzu */, HI(58) | INT_ALIGNED | 0x1 /* ldu */),
+/* s w w x s */ ARCH_32_64(HI(31) | LO(183) /* stwux */, HI(31) | LO(181) /* stdux */),
+/* s w w x l */ ARCH_32_64(HI(31) | LO(55) /* lwzux */, HI(31) | LO(53) /* ldux */),
+
+/* Byte. */
+
+/* s b n i s */ HI(38) /* stb */,
+/* s b n i l */ HI(34) /* lbz */ /* EXTS_REQ */,
+/* s b n x s */ HI(31) | LO(215) /* stbx */,
+/* s b n x l */ HI(31) | LO(87) /* lbzx */ /* EXTS_REQ */,
+
+/* s b w i s */ HI(39) /* stbu */,
+/* s b w i l */ HI(35) /* lbzu */ /* EXTS_REQ */,
+/* s b w x s */ HI(31) | LO(247) /* stbux */,
+/* s b w x l */ HI(31) | LO(119) /* lbzux */ /* EXTS_REQ */,
+
+/* Half. */
+
+/* s h n i s */ HI(44) /* sth */,
+/* s h n i l */ HI(42) /* lha */,
+/* s h n x s */ HI(31) | LO(407) /* sthx */,
+/* s h n x l */ HI(31) | LO(343) /* lhax */,
+
+/* s h w i s */ HI(45) /* sthu */,
+/* s h w i l */ HI(43) /* lhau */,
+/* s h w x s */ HI(31) | LO(439) /* sthux */,
+/* s h w x l */ HI(31) | LO(375) /* lhaux */,
+
+/* Int. */
+
+/* s i n i s */ HI(36) /* stw */,
+/* s i n i l */ ARCH_32_64(HI(32) /* lwz */, HI(58) | INT_ALIGNED | 0x2 /* lwa */),
+/* s i n x s */ HI(31) | LO(151) /* stwx */,
+/* s i n x l */ ARCH_32_64(HI(31) | LO(23) /* lwzx */, HI(31) | LO(341) /* lwax */),
+
+/* s i w i s */ HI(37) /* stwu */,
+/* s i w i l */ ARCH_32_64(HI(33) /* lwzu */, HI(58) | INT_ALIGNED | UPDATE_REQ | 0x2 /* lwa */),
+/* s i w x s */ HI(31) | LO(183) /* stwux */,
+/* s i w x l */ ARCH_32_64(HI(31) | LO(55) /* lwzux */, HI(31) | LO(373) /* lwaux */),
+
+/* -------- Double -------- */
+
+/* d n i s */ HI(54) /* stfd */,
+/* d n i l */ HI(50) /* lfd */,
+/* d n x s */ HI(31) | LO(727) /* stfdx */,
+/* d n x l */ HI(31) | LO(599) /* lfdx */,
+
+/* s n i s */ HI(52) /* stfs */,
+/* s n i l */ HI(48) /* lfs */,
+/* s n x s */ HI(31) | LO(663) /* stfsx */,
+/* s n x l */ HI(31) | LO(535) /* lfsx */,
+
+};
+
+#undef ARCH_32_64
+
+/* Simple cases, (no caching is required). */
+static sljit_s32 getput_arg_fast(struct sljit_compiler *compiler, sljit_s32 inp_flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw)
+{
+ sljit_ins inst;
+
+ /* Should work when (arg & REG_MASK) == 0. */
+ SLJIT_COMPILE_ASSERT(A(0) == 0, a0_must_be_0);
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+
+ if (arg & OFFS_REG_MASK) {
+ if (argw & 0x3)
+ return 0;
+ if (inp_flags & ARG_TEST)
+ return 1;
+
+ inst = data_transfer_insts[(inp_flags | INDEXED) & MEM_MASK];
+ SLJIT_ASSERT(!(inst & (INT_ALIGNED | UPDATE_REQ)));
+ FAIL_IF(push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(arg & REG_MASK) | B(OFFS_REG(arg))));
+ return -1;
+ }
+
+ if (SLJIT_UNLIKELY(!(arg & REG_MASK)))
+ inp_flags &= ~WRITE_BACK;
+
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ inst = data_transfer_insts[inp_flags & MEM_MASK];
+ SLJIT_ASSERT((arg & REG_MASK) || !(inst & UPDATE_REQ));
+
+ if (argw > SIMM_MAX || argw < SIMM_MIN || ((inst & INT_ALIGNED) && (argw & 0x3)) || (inst & UPDATE_REQ))
+ return 0;
+ if (inp_flags & ARG_TEST)
+ return 1;
+#endif
+
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
+ if (argw > SIMM_MAX || argw < SIMM_MIN)
+ return 0;
+ if (inp_flags & ARG_TEST)
+ return 1;
+
+ inst = data_transfer_insts[inp_flags & MEM_MASK];
+ SLJIT_ASSERT(!(inst & (INT_ALIGNED | UPDATE_REQ)));
+#endif
+
+ FAIL_IF(push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(arg & REG_MASK) | IMM(argw)));
+ return -1;
+}
+
+/* See getput_arg below.
+ Note: can_cache is called only for binary operators. Those operator always
+ uses word arguments without write back. */
+static sljit_s32 can_cache(sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw)
+{
+ sljit_sw high_short, next_high_short;
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ sljit_sw diff;
+#endif
+
+ SLJIT_ASSERT((arg & SLJIT_MEM) && (next_arg & SLJIT_MEM));
+
+ if (arg & OFFS_REG_MASK)
+ return ((arg & OFFS_REG_MASK) == (next_arg & OFFS_REG_MASK) && (argw & 0x3) == (next_argw & 0x3));
+
+ if (next_arg & OFFS_REG_MASK)
+ return 0;
+
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
+ high_short = (argw + ((argw & 0x8000) << 1)) & ~0xffff;
+ next_high_short = (next_argw + ((next_argw & 0x8000) << 1)) & ~0xffff;
+ return high_short == next_high_short;
+#else
+ if (argw <= 0x7fffffffl && argw >= -0x80000000l) {
+ high_short = (argw + ((argw & 0x8000) << 1)) & ~0xffff;
+ next_high_short = (next_argw + ((next_argw & 0x8000) << 1)) & ~0xffff;
+ if (high_short == next_high_short)
+ return 1;
+ }
+
+ diff = argw - next_argw;
+ if (!(arg & REG_MASK))
+ return diff <= SIMM_MAX && diff >= SIMM_MIN;
+
+ if (arg == next_arg && diff <= SIMM_MAX && diff >= SIMM_MIN)
+ return 1;
+
+ return 0;
+#endif
+}
+
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+#define ADJUST_CACHED_IMM(imm) \
+ if ((inst & INT_ALIGNED) && (imm & 0x3)) { \
+ /* Adjust cached value. Fortunately this is really a rare case */ \
+ compiler->cache_argw += imm & 0x3; \
+ FAIL_IF(push_inst(compiler, ADDI | D(TMP_REG3) | A(TMP_REG3) | (imm & 0x3))); \
+ imm &= ~0x3; \
+ }
+#endif
+
+/* Emit the necessary instructions. See can_cache above. */
+static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 inp_flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw)
+{
+ sljit_s32 tmp_r;
+ sljit_ins inst;
+ sljit_sw high_short, next_high_short;
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ sljit_sw diff;
+#endif
+
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+
+ tmp_r = ((inp_flags & LOAD_DATA) && ((inp_flags) & MEM_MASK) <= GPR_REG) ? reg : TMP_REG1;
+ /* Special case for "mov reg, [reg, ... ]". */
+ if ((arg & REG_MASK) == tmp_r)
+ tmp_r = TMP_REG1;
+
+ if (SLJIT_UNLIKELY(arg & OFFS_REG_MASK)) {
+ argw &= 0x3;
+ /* Otherwise getput_arg_fast would capture it. */
+ SLJIT_ASSERT(argw);
+
+ if ((SLJIT_MEM | (arg & OFFS_REG_MASK)) == compiler->cache_arg && argw == compiler->cache_argw)
+ tmp_r = TMP_REG3;
+ else {
+ if ((arg & OFFS_REG_MASK) == (next_arg & OFFS_REG_MASK) && argw == (next_argw & 0x3)) {
+ compiler->cache_arg = SLJIT_MEM | (arg & OFFS_REG_MASK);
+ compiler->cache_argw = argw;
+ tmp_r = TMP_REG3;
+ }
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
+ FAIL_IF(push_inst(compiler, RLWINM | S(OFFS_REG(arg)) | A(tmp_r) | (argw << 11) | ((31 - argw) << 1)));
+#else
+ FAIL_IF(push_inst(compiler, RLDI(tmp_r, OFFS_REG(arg), argw, 63 - argw, 1)));
+#endif
+ }
+ inst = data_transfer_insts[(inp_flags | INDEXED) & MEM_MASK];
+ SLJIT_ASSERT(!(inst & (INT_ALIGNED | UPDATE_REQ)));
+ return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(arg & REG_MASK) | B(tmp_r));
+ }
+
+ if (SLJIT_UNLIKELY(!(arg & REG_MASK)))
+ inp_flags &= ~WRITE_BACK;
+
+ inst = data_transfer_insts[inp_flags & MEM_MASK];
+ SLJIT_ASSERT((arg & REG_MASK) || !(inst & UPDATE_REQ));
+
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ if (argw <= 0x7fff7fffl && argw >= -0x80000000l
+ && (!(inst & INT_ALIGNED) || !(argw & 0x3)) && !(inst & UPDATE_REQ)) {
+#endif
+
+ arg &= REG_MASK;
+ high_short = (sljit_s32)(argw + ((argw & 0x8000) << 1)) & ~0xffff;
+ /* The getput_arg_fast should handle this otherwise. */
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ SLJIT_ASSERT(high_short && high_short <= 0x7fffffffl && high_short >= -0x80000000l);
+#else
+ SLJIT_ASSERT(high_short && !(inst & (INT_ALIGNED | UPDATE_REQ)));
+#endif
+
+ if (inp_flags & WRITE_BACK) {
+ if (arg == reg) {
+ FAIL_IF(push_inst(compiler, OR | S(reg) | A(tmp_r) | B(reg)));
+ reg = tmp_r;
+ }
+ tmp_r = arg;
+ FAIL_IF(push_inst(compiler, ADDIS | D(arg) | A(arg) | IMM(high_short >> 16)));
+ }
+ else if (compiler->cache_arg != (SLJIT_MEM | arg) || high_short != compiler->cache_argw) {
+ if ((next_arg & SLJIT_MEM) && !(next_arg & OFFS_REG_MASK)) {
+ next_high_short = (sljit_s32)(next_argw + ((next_argw & 0x8000) << 1)) & ~0xffff;
+ if (high_short == next_high_short) {
+ compiler->cache_arg = SLJIT_MEM | arg;
+ compiler->cache_argw = high_short;
+ tmp_r = TMP_REG3;
+ }
+ }
+ FAIL_IF(push_inst(compiler, ADDIS | D(tmp_r) | A(arg & REG_MASK) | IMM(high_short >> 16)));
+ }
+ else
+ tmp_r = TMP_REG3;
+
+ return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(tmp_r) | IMM(argw));
+
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ }
+
+ /* Everything else is PPC-64 only. */
+ if (SLJIT_UNLIKELY(!(arg & REG_MASK))) {
+ diff = argw - compiler->cache_argw;
+ if ((compiler->cache_arg & SLJIT_IMM) && diff <= SIMM_MAX && diff >= SIMM_MIN) {
+ ADJUST_CACHED_IMM(diff);
+ return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(TMP_REG3) | IMM(diff));
+ }
+
+ diff = argw - next_argw;
+ if ((next_arg & SLJIT_MEM) && diff <= SIMM_MAX && diff >= SIMM_MIN) {
+ SLJIT_ASSERT(inp_flags & LOAD_DATA);
+
+ compiler->cache_arg = SLJIT_IMM;
+ compiler->cache_argw = argw;
+ tmp_r = TMP_REG3;
+ }
+
+ FAIL_IF(load_immediate(compiler, tmp_r, argw));
+ return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(tmp_r));
+ }
+
+ diff = argw - compiler->cache_argw;
+ if (compiler->cache_arg == arg && diff <= SIMM_MAX && diff >= SIMM_MIN) {
+ SLJIT_ASSERT(!(inp_flags & WRITE_BACK) && !(inst & UPDATE_REQ));
+ ADJUST_CACHED_IMM(diff);
+ return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(TMP_REG3) | IMM(diff));
+ }
+
+ if ((compiler->cache_arg & SLJIT_IMM) && diff <= SIMM_MAX && diff >= SIMM_MIN) {
+ inst = data_transfer_insts[(inp_flags | INDEXED) & MEM_MASK];
+ SLJIT_ASSERT(!(inst & (INT_ALIGNED | UPDATE_REQ)));
+ if (compiler->cache_argw != argw) {
+ FAIL_IF(push_inst(compiler, ADDI | D(TMP_REG3) | A(TMP_REG3) | IMM(diff)));
+ compiler->cache_argw = argw;
+ }
+ return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(arg & REG_MASK) | B(TMP_REG3));
+ }
+
+ if (argw == next_argw && (next_arg & SLJIT_MEM)) {
+ SLJIT_ASSERT(inp_flags & LOAD_DATA);
+ FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
+
+ compiler->cache_arg = SLJIT_IMM;
+ compiler->cache_argw = argw;
+
+ inst = data_transfer_insts[(inp_flags | INDEXED) & MEM_MASK];
+ SLJIT_ASSERT(!(inst & (INT_ALIGNED | UPDATE_REQ)));
+ return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(arg & REG_MASK) | B(TMP_REG3));
+ }
+
+ diff = argw - next_argw;
+ if (arg == next_arg && !(inp_flags & WRITE_BACK) && diff <= SIMM_MAX && diff >= SIMM_MIN) {
+ SLJIT_ASSERT(inp_flags & LOAD_DATA);
+ FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
+ FAIL_IF(push_inst(compiler, ADD | D(TMP_REG3) | A(TMP_REG3) | B(arg & REG_MASK)));
+
+ compiler->cache_arg = arg;
+ compiler->cache_argw = argw;
+
+ return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(TMP_REG3));
+ }
+
+ if ((next_arg & SLJIT_MEM) && !(next_arg & OFFS_REG_MASK) && diff <= SIMM_MAX && diff >= SIMM_MIN) {
+ SLJIT_ASSERT(inp_flags & LOAD_DATA);
+ FAIL_IF(load_immediate(compiler, TMP_REG3, argw));
+
+ compiler->cache_arg = SLJIT_IMM;
+ compiler->cache_argw = argw;
+ tmp_r = TMP_REG3;
+ }
+ else
+ FAIL_IF(load_immediate(compiler, tmp_r, argw));
+
+ /* Get the indexed version instead of the normal one. */
+ inst = data_transfer_insts[(inp_flags | INDEXED) & MEM_MASK];
+ SLJIT_ASSERT(!(inst & (INT_ALIGNED | UPDATE_REQ)));
+ return push_inst(compiler, INST_CODE_AND_DST(inst, inp_flags, reg) | A(arg & REG_MASK) | B(tmp_r));
+#endif
+}
+
+static SLJIT_INLINE sljit_s32 emit_op_mem2(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg1, sljit_sw arg1w, sljit_s32 arg2, sljit_sw arg2w)
+{
+ if (getput_arg_fast(compiler, flags, reg, arg1, arg1w))
+ return compiler->error;
+ return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w);
+}
+
+static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 input_flags,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ /* arg1 goes to TMP_REG1 or src reg
+ arg2 goes to TMP_REG2, imm or src reg
+ TMP_REG3 can be used for caching
+ result goes to TMP_REG2, so put result can use TMP_REG1 and TMP_REG3. */
+ sljit_s32 dst_r;
+ sljit_s32 src1_r;
+ sljit_s32 src2_r;
+ sljit_s32 sugg_src2_r = TMP_REG2;
+ sljit_s32 flags = input_flags & (ALT_FORM1 | ALT_FORM2 | ALT_FORM3 | ALT_FORM4 | ALT_FORM5 | ALT_FORM6 | ALT_SIGN_EXT | ALT_SET_FLAGS);
+
+ if (!(input_flags & ALT_KEEP_CACHE)) {
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ }
+
+ /* Destination check. */
+ if (SLJIT_UNLIKELY(dst == SLJIT_UNUSED)) {
+ if (op >= SLJIT_MOV && op <= SLJIT_MOVU_S32 && !(src2 & SLJIT_MEM))
+ return SLJIT_SUCCESS;
+ dst_r = TMP_REG2;
+ }
+ else if (FAST_IS_REG(dst)) {
+ dst_r = dst;
+ flags |= REG_DEST;
+ if (op >= SLJIT_MOV && op <= SLJIT_MOVU_S32)
+ sugg_src2_r = dst_r;
+ }
+ else {
+ SLJIT_ASSERT(dst & SLJIT_MEM);
+ if (getput_arg_fast(compiler, input_flags | ARG_TEST, TMP_REG2, dst, dstw)) {
+ flags |= FAST_DEST;
+ dst_r = TMP_REG2;
+ }
+ else {
+ flags |= SLOW_DEST;
+ dst_r = 0;
+ }
+ }
+
+ /* Source 1. */
+ if (FAST_IS_REG(src1)) {
+ src1_r = src1;
+ flags |= REG1_SOURCE;
+ }
+ else if (src1 & SLJIT_IMM) {
+ FAIL_IF(load_immediate(compiler, TMP_REG1, src1w));
+ src1_r = TMP_REG1;
+ }
+ else if (getput_arg_fast(compiler, input_flags | LOAD_DATA, TMP_REG1, src1, src1w)) {
+ FAIL_IF(compiler->error);
+ src1_r = TMP_REG1;
+ }
+ else
+ src1_r = 0;
+
+ /* Source 2. */
+ if (FAST_IS_REG(src2)) {
+ src2_r = src2;
+ flags |= REG2_SOURCE;
+ if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOVU_S32)
+ dst_r = src2_r;
+ }
+ else if (src2 & SLJIT_IMM) {
+ FAIL_IF(load_immediate(compiler, sugg_src2_r, src2w));
+ src2_r = sugg_src2_r;
+ }
+ else if (getput_arg_fast(compiler, input_flags | LOAD_DATA, sugg_src2_r, src2, src2w)) {
+ FAIL_IF(compiler->error);
+ src2_r = sugg_src2_r;
+ }
+ else
+ src2_r = 0;
+
+ /* src1_r, src2_r and dst_r can be zero (=unprocessed).
+ All arguments are complex addressing modes, and it is a binary operator. */
+ if (src1_r == 0 && src2_r == 0 && dst_r == 0) {
+ if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
+ FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, TMP_REG2, src2, src2w, src1, src1w));
+ FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw));
+ }
+ else {
+ FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w));
+ FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, TMP_REG2, src2, src2w, dst, dstw));
+ }
+ src1_r = TMP_REG1;
+ src2_r = TMP_REG2;
+ }
+ else if (src1_r == 0 && src2_r == 0) {
+ FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w));
+ src1_r = TMP_REG1;
+ }
+ else if (src1_r == 0 && dst_r == 0) {
+ FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw));
+ src1_r = TMP_REG1;
+ }
+ else if (src2_r == 0 && dst_r == 0) {
+ FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, sugg_src2_r, src2, src2w, dst, dstw));
+ src2_r = sugg_src2_r;
+ }
+
+ if (dst_r == 0)
+ dst_r = TMP_REG2;
+
+ if (src1_r == 0) {
+ FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, TMP_REG1, src1, src1w, 0, 0));
+ src1_r = TMP_REG1;
+ }
+
+ if (src2_r == 0) {
+ FAIL_IF(getput_arg(compiler, input_flags | LOAD_DATA, sugg_src2_r, src2, src2w, 0, 0));
+ src2_r = sugg_src2_r;
+ }
+
+ FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r));
+
+ if (flags & (FAST_DEST | SLOW_DEST)) {
+ if (flags & FAST_DEST)
+ FAIL_IF(getput_arg_fast(compiler, input_flags, dst_r, dst, dstw));
+ else
+ FAIL_IF(getput_arg(compiler, input_flags, dst_r, dst, dstw, 0, 0));
+ }
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op)
+{
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ sljit_s32 int_op = op & SLJIT_I32_OP;
+#endif
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op0(compiler, op));
+
+ op = GET_OPCODE(op);
+ switch (op) {
+ case SLJIT_BREAKPOINT:
+ case SLJIT_NOP:
+ return push_inst(compiler, NOP);
+ case SLJIT_LMUL_UW:
+ case SLJIT_LMUL_SW:
+ FAIL_IF(push_inst(compiler, OR | S(SLJIT_R0) | A(TMP_REG1) | B(SLJIT_R0)));
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ FAIL_IF(push_inst(compiler, MULLD | D(SLJIT_R0) | A(TMP_REG1) | B(SLJIT_R1)));
+ return push_inst(compiler, (op == SLJIT_LMUL_UW ? MULHDU : MULHD) | D(SLJIT_R1) | A(TMP_REG1) | B(SLJIT_R1));
+#else
+ FAIL_IF(push_inst(compiler, MULLW | D(SLJIT_R0) | A(TMP_REG1) | B(SLJIT_R1)));
+ return push_inst(compiler, (op == SLJIT_LMUL_UW ? MULHWU : MULHW) | D(SLJIT_R1) | A(TMP_REG1) | B(SLJIT_R1));
+#endif
+ case SLJIT_DIVMOD_UW:
+ case SLJIT_DIVMOD_SW:
+ FAIL_IF(push_inst(compiler, OR | S(SLJIT_R0) | A(TMP_REG1) | B(SLJIT_R0)));
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ FAIL_IF(push_inst(compiler, (int_op ? (op == SLJIT_DIVMOD_UW ? DIVWU : DIVW) : (op == SLJIT_DIVMOD_UW ? DIVDU : DIVD)) | D(SLJIT_R0) | A(SLJIT_R0) | B(SLJIT_R1)));
+ FAIL_IF(push_inst(compiler, (int_op ? MULLW : MULLD) | D(SLJIT_R1) | A(SLJIT_R0) | B(SLJIT_R1)));
+#else
+ FAIL_IF(push_inst(compiler, (op == SLJIT_DIVMOD_UW ? DIVWU : DIVW) | D(SLJIT_R0) | A(SLJIT_R0) | B(SLJIT_R1)));
+ FAIL_IF(push_inst(compiler, MULLW | D(SLJIT_R1) | A(SLJIT_R0) | B(SLJIT_R1)));
+#endif
+ return push_inst(compiler, SUBF | D(SLJIT_R1) | A(SLJIT_R1) | B(TMP_REG1));
+ case SLJIT_DIV_UW:
+ case SLJIT_DIV_SW:
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ return push_inst(compiler, (int_op ? (op == SLJIT_DIV_UW ? DIVWU : DIVW) : (op == SLJIT_DIV_UW ? DIVDU : DIVD)) | D(SLJIT_R0) | A(SLJIT_R0) | B(SLJIT_R1));
+#else
+ return push_inst(compiler, (op == SLJIT_DIV_UW ? DIVWU : DIVW) | D(SLJIT_R0) | A(SLJIT_R0) | B(SLJIT_R1));
+#endif
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+#define EMIT_MOV(type, type_flags, type_cast) \
+ emit_op(compiler, (src & SLJIT_IMM) ? SLJIT_MOV : type, flags | (type_flags), dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? type_cast srcw : srcw)
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 flags = GET_FLAGS(op) ? ALT_SET_FLAGS : 0;
+ sljit_s32 op_flags = GET_ALL_FLAGS(op);
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ op = GET_OPCODE(op);
+ if ((src & SLJIT_IMM) && srcw == 0)
+ src = TMP_ZERO;
+
+ if (op_flags & SLJIT_SET_O)
+ FAIL_IF(push_inst(compiler, MTXER | S(TMP_ZERO)));
+
+ if (op_flags & SLJIT_I32_OP) {
+ if (op < SLJIT_NOT) {
+ if (FAST_IS_REG(src) && src == dst) {
+ if (!TYPE_CAST_NEEDED(op))
+ return SLJIT_SUCCESS;
+ }
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ if (op == SLJIT_MOV_S32 && (src & SLJIT_MEM))
+ op = SLJIT_MOV_U32;
+ if (op == SLJIT_MOVU_S32 && (src & SLJIT_MEM))
+ op = SLJIT_MOVU_U32;
+ if (op == SLJIT_MOV_U32 && (src & SLJIT_IMM))
+ op = SLJIT_MOV_S32;
+ if (op == SLJIT_MOVU_U32 && (src & SLJIT_IMM))
+ op = SLJIT_MOVU_S32;
+#endif
+ }
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ else {
+ /* Most operations expect sign extended arguments. */
+ flags |= INT_DATA | SIGNED_DATA;
+ if (src & SLJIT_IMM)
+ srcw = (sljit_s32)srcw;
+ }
+#endif
+ }
+
+ switch (op) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_P:
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
+ case SLJIT_MOV_U32:
+ case SLJIT_MOV_S32:
+#endif
+ return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
+
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ case SLJIT_MOV_U32:
+ return EMIT_MOV(SLJIT_MOV_U32, INT_DATA, (sljit_u32));
+
+ case SLJIT_MOV_S32:
+ return EMIT_MOV(SLJIT_MOV_S32, INT_DATA | SIGNED_DATA, (sljit_s32));
+#endif
+
+ case SLJIT_MOV_U8:
+ return EMIT_MOV(SLJIT_MOV_U8, BYTE_DATA, (sljit_u8));
+
+ case SLJIT_MOV_S8:
+ return EMIT_MOV(SLJIT_MOV_S8, BYTE_DATA | SIGNED_DATA, (sljit_s8));
+
+ case SLJIT_MOV_U16:
+ return EMIT_MOV(SLJIT_MOV_U16, HALF_DATA, (sljit_u16));
+
+ case SLJIT_MOV_S16:
+ return EMIT_MOV(SLJIT_MOV_S16, HALF_DATA | SIGNED_DATA, (sljit_s16));
+
+ case SLJIT_MOVU:
+ case SLJIT_MOVU_P:
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
+ case SLJIT_MOVU_U32:
+ case SLJIT_MOVU_S32:
+#endif
+ return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
+
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ case SLJIT_MOVU_U32:
+ return EMIT_MOV(SLJIT_MOV_U32, INT_DATA | WRITE_BACK, (sljit_u32));
+
+ case SLJIT_MOVU_S32:
+ return EMIT_MOV(SLJIT_MOV_S32, INT_DATA | SIGNED_DATA | WRITE_BACK, (sljit_s32));
+#endif
+
+ case SLJIT_MOVU_U8:
+ return EMIT_MOV(SLJIT_MOV_U8, BYTE_DATA | WRITE_BACK, (sljit_u8));
+
+ case SLJIT_MOVU_S8:
+ return EMIT_MOV(SLJIT_MOV_S8, BYTE_DATA | SIGNED_DATA | WRITE_BACK, (sljit_s8));
+
+ case SLJIT_MOVU_U16:
+ return EMIT_MOV(SLJIT_MOV_U16, HALF_DATA | WRITE_BACK, (sljit_u16));
+
+ case SLJIT_MOVU_S16:
+ return EMIT_MOV(SLJIT_MOV_S16, HALF_DATA | SIGNED_DATA | WRITE_BACK, (sljit_s16));
+
+ case SLJIT_NOT:
+ return emit_op(compiler, SLJIT_NOT, flags, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_NEG:
+ return emit_op(compiler, SLJIT_NEG, flags, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_CLZ:
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ return emit_op(compiler, SLJIT_CLZ, flags | (!(op_flags & SLJIT_I32_OP) ? 0 : ALT_FORM1), dst, dstw, TMP_REG1, 0, src, srcw);
+#else
+ return emit_op(compiler, SLJIT_CLZ, flags, dst, dstw, TMP_REG1, 0, src, srcw);
+#endif
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+#undef EMIT_MOV
+
+#define TEST_SL_IMM(src, srcw) \
+ (((src) & SLJIT_IMM) && (srcw) <= SIMM_MAX && (srcw) >= SIMM_MIN)
+
+#define TEST_UL_IMM(src, srcw) \
+ (((src) & SLJIT_IMM) && !((srcw) & ~0xffff))
+
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+#define TEST_SH_IMM(src, srcw) \
+ (((src) & SLJIT_IMM) && !((srcw) & 0xffff) && (srcw) <= 0x7fffffffl && (srcw) >= -0x80000000l)
+#else
+#define TEST_SH_IMM(src, srcw) \
+ (((src) & SLJIT_IMM) && !((srcw) & 0xffff))
+#endif
+
+#define TEST_UH_IMM(src, srcw) \
+ (((src) & SLJIT_IMM) && !((srcw) & ~0xffff0000))
+
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+#define TEST_ADD_IMM(src, srcw) \
+ (((src) & SLJIT_IMM) && (srcw) <= 0x7fff7fffl && (srcw) >= -0x80000000l)
+#else
+#define TEST_ADD_IMM(src, srcw) \
+ ((src) & SLJIT_IMM)
+#endif
+
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+#define TEST_UI_IMM(src, srcw) \
+ (((src) & SLJIT_IMM) && !((srcw) & ~0xffffffff))
+#else
+#define TEST_UI_IMM(src, srcw) \
+ ((src) & SLJIT_IMM)
+#endif
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_s32 flags = GET_FLAGS(op) ? ALT_SET_FLAGS : 0;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+ if ((src1 & SLJIT_IMM) && src1w == 0)
+ src1 = TMP_ZERO;
+ if ((src2 & SLJIT_IMM) && src2w == 0)
+ src2 = TMP_ZERO;
+
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ if (op & SLJIT_I32_OP) {
+ /* Most operations expect sign extended arguments. */
+ flags |= INT_DATA | SIGNED_DATA;
+ if (src1 & SLJIT_IMM)
+ src1w = (sljit_s32)(src1w);
+ if (src2 & SLJIT_IMM)
+ src2w = (sljit_s32)(src2w);
+ if (GET_FLAGS(op))
+ flags |= ALT_SIGN_EXT;
+ }
+#endif
+ if (op & SLJIT_SET_O)
+ FAIL_IF(push_inst(compiler, MTXER | S(TMP_ZERO)));
+ if (src2 == TMP_REG2)
+ flags |= ALT_KEEP_CACHE;
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_ADD:
+ if (!GET_FLAGS(op) && ((src1 | src2) & SLJIT_IMM)) {
+ if (TEST_SL_IMM(src2, src2w)) {
+ compiler->imm = src2w & 0xffff;
+ return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ if (TEST_SL_IMM(src1, src1w)) {
+ compiler->imm = src1w & 0xffff;
+ return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0);
+ }
+ if (TEST_SH_IMM(src2, src2w)) {
+ compiler->imm = (src2w >> 16) & 0xffff;
+ return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ if (TEST_SH_IMM(src1, src1w)) {
+ compiler->imm = (src1w >> 16) & 0xffff;
+ return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM2, dst, dstw, src2, src2w, TMP_REG2, 0);
+ }
+ /* Range between -1 and -32768 is covered above. */
+ if (TEST_ADD_IMM(src2, src2w)) {
+ compiler->imm = src2w & 0xffffffff;
+ return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM4, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ if (TEST_ADD_IMM(src1, src1w)) {
+ compiler->imm = src1w & 0xffffffff;
+ return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM4, dst, dstw, src2, src2w, TMP_REG2, 0);
+ }
+ }
+ if (!(GET_FLAGS(op) & (SLJIT_SET_E | SLJIT_SET_O))) {
+ if (TEST_SL_IMM(src2, src2w)) {
+ compiler->imm = src2w & 0xffff;
+ return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ if (TEST_SL_IMM(src1, src1w)) {
+ compiler->imm = src1w & 0xffff;
+ return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM3, dst, dstw, src2, src2w, TMP_REG2, 0);
+ }
+ }
+ return emit_op(compiler, SLJIT_ADD, flags, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_ADDC:
+ return emit_op(compiler, SLJIT_ADDC, flags | (!(op & SLJIT_KEEP_FLAGS) ? 0 : ALT_FORM1), dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_SUB:
+ if (!GET_FLAGS(op) && ((src1 | src2) & SLJIT_IMM)) {
+ if (TEST_SL_IMM(src2, -src2w)) {
+ compiler->imm = (-src2w) & 0xffff;
+ return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ if (TEST_SL_IMM(src1, src1w)) {
+ compiler->imm = src1w & 0xffff;
+ return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0);
+ }
+ if (TEST_SH_IMM(src2, -src2w)) {
+ compiler->imm = ((-src2w) >> 16) & 0xffff;
+ return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ /* Range between -1 and -32768 is covered above. */
+ if (TEST_ADD_IMM(src2, -src2w)) {
+ compiler->imm = -src2w & 0xffffffff;
+ return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM4, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ }
+ if (dst == SLJIT_UNUSED && (op & (SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S)) && !(op & (SLJIT_SET_O | SLJIT_SET_C))) {
+ if (!(op & SLJIT_SET_U)) {
+ /* We know ALT_SIGN_EXT is set if it is an SLJIT_I32_OP on 64 bit systems. */
+ if (TEST_SL_IMM(src2, src2w)) {
+ compiler->imm = src2w & 0xffff;
+ return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ if (GET_FLAGS(op) == SLJIT_SET_E && TEST_SL_IMM(src1, src1w)) {
+ compiler->imm = src1w & 0xffff;
+ return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM2, dst, dstw, src2, src2w, TMP_REG2, 0);
+ }
+ }
+ if (!(op & (SLJIT_SET_E | SLJIT_SET_S))) {
+ /* We know ALT_SIGN_EXT is set if it is an SLJIT_I32_OP on 64 bit systems. */
+ if (TEST_UL_IMM(src2, src2w)) {
+ compiler->imm = src2w & 0xffff;
+ return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM4, dst, dstw, src1, src1w, src2, src2w);
+ }
+ if ((src2 & SLJIT_IMM) && src2w >= 0 && src2w <= 0x7fff) {
+ compiler->imm = src2w;
+ return emit_op(compiler, SLJIT_SUB, flags | ALT_FORM2 | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ return emit_op(compiler, SLJIT_SUB, flags | ((op & SLJIT_SET_U) ? ALT_FORM4 : 0) | ((op & (SLJIT_SET_E | SLJIT_SET_S)) ? ALT_FORM5 : 0), dst, dstw, src1, src1w, src2, src2w);
+ }
+ if (!(op & (SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_O))) {
+ if (TEST_SL_IMM(src2, -src2w)) {
+ compiler->imm = (-src2w) & 0xffff;
+ return emit_op(compiler, SLJIT_ADD, flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ }
+ /* We know ALT_SIGN_EXT is set if it is an SLJIT_I32_OP on 64 bit systems. */
+ return emit_op(compiler, SLJIT_SUB, flags | (!(op & SLJIT_SET_U) ? 0 : ALT_FORM6), dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_SUBC:
+ return emit_op(compiler, SLJIT_SUBC, flags | (!(op & SLJIT_KEEP_FLAGS) ? 0 : ALT_FORM1), dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_MUL:
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ if (op & SLJIT_I32_OP)
+ flags |= ALT_FORM2;
+#endif
+ if (!GET_FLAGS(op)) {
+ if (TEST_SL_IMM(src2, src2w)) {
+ compiler->imm = src2w & 0xffff;
+ return emit_op(compiler, SLJIT_MUL, flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ if (TEST_SL_IMM(src1, src1w)) {
+ compiler->imm = src1w & 0xffff;
+ return emit_op(compiler, SLJIT_MUL, flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0);
+ }
+ }
+ return emit_op(compiler, SLJIT_MUL, flags, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_AND:
+ case SLJIT_OR:
+ case SLJIT_XOR:
+ /* Commutative unsigned operations. */
+ if (!GET_FLAGS(op) || GET_OPCODE(op) == SLJIT_AND) {
+ if (TEST_UL_IMM(src2, src2w)) {
+ compiler->imm = src2w;
+ return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ if (TEST_UL_IMM(src1, src1w)) {
+ compiler->imm = src1w;
+ return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src2, src2w, TMP_REG2, 0);
+ }
+ if (TEST_UH_IMM(src2, src2w)) {
+ compiler->imm = (src2w >> 16) & 0xffff;
+ return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM2, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ if (TEST_UH_IMM(src1, src1w)) {
+ compiler->imm = (src1w >> 16) & 0xffff;
+ return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM2, dst, dstw, src2, src2w, TMP_REG2, 0);
+ }
+ }
+ if (!GET_FLAGS(op) && GET_OPCODE(op) != SLJIT_AND) {
+ if (TEST_UI_IMM(src2, src2w)) {
+ compiler->imm = src2w;
+ return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM3, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ if (TEST_UI_IMM(src1, src1w)) {
+ compiler->imm = src1w;
+ return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM3, dst, dstw, src2, src2w, TMP_REG2, 0);
+ }
+ }
+ return emit_op(compiler, GET_OPCODE(op), flags, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_ASHR:
+ if (op & SLJIT_KEEP_FLAGS)
+ flags |= ALT_FORM3;
+ /* Fall through. */
+ case SLJIT_SHL:
+ case SLJIT_LSHR:
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ if (op & SLJIT_I32_OP)
+ flags |= ALT_FORM2;
+#endif
+ if (src2 & SLJIT_IMM) {
+ compiler->imm = src2w;
+ return emit_op(compiler, GET_OPCODE(op), flags | ALT_FORM1, dst, dstw, src1, src1w, TMP_REG2, 0);
+ }
+ return emit_op(compiler, GET_OPCODE(op), flags, dst, dstw, src1, src1w, src2, src2w);
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_register_index(sljit_s32 reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_register_index(reg));
+ return reg_map[reg];
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_float_register_index(reg));
+ return reg;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler,
+ void *instruction, sljit_s32 size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_custom(compiler, instruction, size));
+
+ return push_inst(compiler, *(sljit_ins*)instruction);
+}
+
+/* --------------------------------------------------------------------- */
+/* Floating point operators */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_is_fpu_available(void)
+{
+#ifdef SLJIT_IS_FPU_AVAILABLE
+ return SLJIT_IS_FPU_AVAILABLE;
+#else
+ /* Available by default. */
+ return 1;
+#endif
+}
+
+#define FLOAT_DATA(op) (DOUBLE_DATA | ((op & SLJIT_F32_OP) >> 6))
+#define SELECT_FOP(op, single, double) ((op & SLJIT_F32_OP) ? single : double)
+
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+#define FLOAT_TMP_MEM_OFFSET (6 * sizeof(sljit_sw))
+#else
+#define FLOAT_TMP_MEM_OFFSET (2 * sizeof(sljit_sw))
+
+#if (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN)
+#define FLOAT_TMP_MEM_OFFSET_LOW (2 * sizeof(sljit_sw))
+#define FLOAT_TMP_MEM_OFFSET_HI (3 * sizeof(sljit_sw))
+#else
+#define FLOAT_TMP_MEM_OFFSET_LOW (3 * sizeof(sljit_sw))
+#define FLOAT_TMP_MEM_OFFSET_HI (2 * sizeof(sljit_sw))
+#endif
+
+#endif /* SLJIT_CONFIG_PPC_64 */
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ if (src & SLJIT_MEM) {
+ /* We can ignore the temporary data store on the stack from caching point of view. */
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src, srcw, dst, dstw));
+ src = TMP_FREG1;
+ }
+
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ op = GET_OPCODE(op);
+ FAIL_IF(push_inst(compiler, (op == SLJIT_CONV_S32_FROM_F64 ? FCTIWZ : FCTIDZ) | FD(TMP_FREG1) | FB(src)));
+
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ if (op == SLJIT_CONV_SW_FROM_F64) {
+ if (FAST_IS_REG(dst)) {
+ FAIL_IF(emit_op_mem2(compiler, DOUBLE_DATA, TMP_FREG1, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET, 0, 0));
+ return emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, dst, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET, 0, 0);
+ }
+ return emit_op_mem2(compiler, DOUBLE_DATA, TMP_FREG1, dst, dstw, 0, 0);
+ }
+
+#else
+ FAIL_IF(push_inst(compiler, FCTIWZ | FD(TMP_FREG1) | FB(src)));
+
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+#endif
+
+ if (FAST_IS_REG(dst)) {
+ FAIL_IF(load_immediate(compiler, TMP_REG1, FLOAT_TMP_MEM_OFFSET));
+ FAIL_IF(push_inst(compiler, STFIWX | FS(TMP_FREG1) | A(SLJIT_SP) | B(TMP_REG1)));
+ return emit_op_mem2(compiler, INT_DATA | LOAD_DATA, dst, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET, 0, 0);
+ }
+
+ SLJIT_ASSERT(dst & SLJIT_MEM);
+
+ if (dst & OFFS_REG_MASK) {
+ dstw &= 0x3;
+ if (dstw) {
+#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
+ FAIL_IF(push_inst(compiler, RLWINM | S(OFFS_REG(dst)) | A(TMP_REG1) | (dstw << 11) | ((31 - dstw) << 1)));
+#else
+ FAIL_IF(push_inst(compiler, RLDI(TMP_REG1, OFFS_REG(dst), dstw, 63 - dstw, 1)));
+#endif
+ dstw = TMP_REG1;
+ }
+ else
+ dstw = OFFS_REG(dst);
+ }
+ else {
+ if ((dst & REG_MASK) && !dstw) {
+ dstw = dst & REG_MASK;
+ dst = 0;
+ }
+ else {
+ /* This works regardless we have SLJIT_MEM1 or SLJIT_MEM0. */
+ FAIL_IF(load_immediate(compiler, TMP_REG1, dstw));
+ dstw = TMP_REG1;
+ }
+ }
+
+ return push_inst(compiler, STFIWX | FS(TMP_FREG1) | A(dst & REG_MASK) | B(dstw));
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+
+ sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1;
+
+ if (src & SLJIT_IMM) {
+ if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32)
+ srcw = (sljit_s32)srcw;
+ FAIL_IF(load_immediate(compiler, TMP_REG1, srcw));
+ src = TMP_REG1;
+ }
+ else if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32) {
+ if (FAST_IS_REG(src))
+ FAIL_IF(push_inst(compiler, EXTSW | S(src) | A(TMP_REG1)));
+ else
+ FAIL_IF(emit_op_mem2(compiler, INT_DATA | SIGNED_DATA | LOAD_DATA, TMP_REG1, src, srcw, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET));
+ src = TMP_REG1;
+ }
+
+ if (FAST_IS_REG(src)) {
+ FAIL_IF(emit_op_mem2(compiler, WORD_DATA, src, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET));
+ FAIL_IF(emit_op_mem2(compiler, DOUBLE_DATA | LOAD_DATA, TMP_FREG1, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET, dst, dstw));
+ }
+ else
+ FAIL_IF(emit_op_mem2(compiler, DOUBLE_DATA | LOAD_DATA, TMP_FREG1, src, srcw, dst, dstw));
+
+ FAIL_IF(push_inst(compiler, FCFID | FD(dst_r) | FB(TMP_FREG1)));
+
+ if (dst & SLJIT_MEM)
+ return emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG1, dst, dstw, 0, 0);
+ if (op & SLJIT_F32_OP)
+ return push_inst(compiler, FRSP | FD(dst_r) | FB(dst_r));
+ return SLJIT_SUCCESS;
+
+#else
+
+ sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1;
+ sljit_s32 invert_sign = 1;
+
+ if (src & SLJIT_IMM) {
+ FAIL_IF(load_immediate(compiler, TMP_REG1, srcw ^ 0x80000000));
+ src = TMP_REG1;
+ invert_sign = 0;
+ }
+ else if (!FAST_IS_REG(src)) {
+ FAIL_IF(emit_op_mem2(compiler, WORD_DATA | SIGNED_DATA | LOAD_DATA, TMP_REG1, src, srcw, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET_LOW));
+ src = TMP_REG1;
+ }
+
+ /* First, a special double floating point value is constructed: (2^53 + (input xor (2^31)))
+ The double precision format has exactly 53 bit precision, so the lower 32 bit represents
+ the lower 32 bit of such value. The result of xor 2^31 is the same as adding 0x80000000
+ to the input, which shifts it into the 0 - 0xffffffff range. To get the converted floating
+ point value, we need to substract 2^53 + 2^31 from the constructed value. */
+ FAIL_IF(push_inst(compiler, ADDIS | D(TMP_REG2) | A(0) | 0x4330));
+ if (invert_sign)
+ FAIL_IF(push_inst(compiler, XORIS | S(src) | A(TMP_REG1) | 0x8000));
+ FAIL_IF(emit_op_mem2(compiler, WORD_DATA, TMP_REG2, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET_HI, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET));
+ FAIL_IF(emit_op_mem2(compiler, WORD_DATA, TMP_REG1, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET_LOW, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET_HI));
+ FAIL_IF(push_inst(compiler, ADDIS | D(TMP_REG1) | A(0) | 0x8000));
+ FAIL_IF(emit_op_mem2(compiler, DOUBLE_DATA | LOAD_DATA, TMP_FREG1, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET_LOW));
+ FAIL_IF(emit_op_mem2(compiler, WORD_DATA, TMP_REG1, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET_LOW, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET));
+ FAIL_IF(emit_op_mem2(compiler, DOUBLE_DATA | LOAD_DATA, TMP_FREG2, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET_LOW));
+
+ FAIL_IF(push_inst(compiler, FSUB | FD(dst_r) | FA(TMP_FREG1) | FB(TMP_FREG2)));
+
+ if (dst & SLJIT_MEM)
+ return emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG1, dst, dstw, 0, 0);
+ if (op & SLJIT_F32_OP)
+ return push_inst(compiler, FRSP | FD(dst_r) | FB(dst_r));
+ return SLJIT_SUCCESS;
+
+#endif
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ if (src1 & SLJIT_MEM) {
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w));
+ src1 = TMP_FREG1;
+ }
+
+ if (src2 & SLJIT_MEM) {
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, 0, 0));
+ src2 = TMP_FREG2;
+ }
+
+ return push_inst(compiler, FCMPU | CRD(4) | FA(src1) | FB(src2));
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r;
+
+ CHECK_ERROR();
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+
+ SLJIT_COMPILE_ASSERT((SLJIT_F32_OP == 0x100) && !(DOUBLE_DATA & 0x4), float_transfer_bit_error);
+ SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw);
+
+ if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32)
+ op ^= SLJIT_F32_OP;
+
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG1;
+
+ if (src & SLJIT_MEM) {
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, dst_r, src, srcw, dst, dstw));
+ src = dst_r;
+ }
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_CONV_F64_FROM_F32:
+ op ^= SLJIT_F32_OP;
+ if (op & SLJIT_F32_OP) {
+ FAIL_IF(push_inst(compiler, FRSP | FD(dst_r) | FB(src)));
+ break;
+ }
+ /* Fall through. */
+ case SLJIT_MOV_F64:
+ if (src != dst_r) {
+ if (dst_r != TMP_FREG1)
+ FAIL_IF(push_inst(compiler, FMR | FD(dst_r) | FB(src)));
+ else
+ dst_r = src;
+ }
+ break;
+ case SLJIT_NEG_F64:
+ FAIL_IF(push_inst(compiler, FNEG | FD(dst_r) | FB(src)));
+ break;
+ case SLJIT_ABS_F64:
+ FAIL_IF(push_inst(compiler, FABS | FD(dst_r) | FB(src)));
+ break;
+ }
+
+ if (dst & SLJIT_MEM)
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), dst_r, dst, dstw, 0, 0));
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_s32 dst_r, flags = 0;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG2;
+
+ if (src1 & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w)) {
+ FAIL_IF(compiler->error);
+ src1 = TMP_FREG1;
+ } else
+ flags |= ALT_FORM1;
+ }
+
+ if (src2 & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w)) {
+ FAIL_IF(compiler->error);
+ src2 = TMP_FREG2;
+ } else
+ flags |= ALT_FORM2;
+ }
+
+ if ((flags & (ALT_FORM1 | ALT_FORM2)) == (ALT_FORM1 | ALT_FORM2)) {
+ if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, src1, src1w));
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw));
+ }
+ else {
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w));
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw));
+ }
+ }
+ else if (flags & ALT_FORM1)
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw));
+ else if (flags & ALT_FORM2)
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw));
+
+ if (flags & ALT_FORM1)
+ src1 = TMP_FREG1;
+ if (flags & ALT_FORM2)
+ src2 = TMP_FREG2;
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_ADD_F64:
+ FAIL_IF(push_inst(compiler, SELECT_FOP(op, FADDS, FADD) | FD(dst_r) | FA(src1) | FB(src2)));
+ break;
+
+ case SLJIT_SUB_F64:
+ FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSUBS, FSUB) | FD(dst_r) | FA(src1) | FB(src2)));
+ break;
+
+ case SLJIT_MUL_F64:
+ FAIL_IF(push_inst(compiler, SELECT_FOP(op, FMULS, FMUL) | FD(dst_r) | FA(src1) | FC(src2) /* FMUL use FC as src2 */));
+ break;
+
+ case SLJIT_DIV_F64:
+ FAIL_IF(push_inst(compiler, SELECT_FOP(op, FDIVS, FDIV) | FD(dst_r) | FA(src1) | FB(src2)));
+ break;
+ }
+
+ if (dst_r == TMP_FREG2)
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG2, dst, dstw, 0, 0));
+
+ return SLJIT_SUCCESS;
+}
+
+#undef FLOAT_DATA
+#undef SELECT_FOP
+
+/* --------------------------------------------------------------------- */
+/* Other instructions */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ /* For UNUSED dst. Uncommon, but possible. */
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ if (FAST_IS_REG(dst))
+ return push_inst(compiler, MFLR | D(dst));
+
+ /* Memory. */
+ FAIL_IF(push_inst(compiler, MFLR | D(TMP_REG2)));
+ return emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, TMP_REG2, 0);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_return(compiler, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ if (FAST_IS_REG(src))
+ FAIL_IF(push_inst(compiler, MTLR | S(src)));
+ else {
+ if (src & SLJIT_MEM)
+ FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, TMP_REG2, 0, TMP_REG1, 0, src, srcw));
+ else if (src & SLJIT_IMM)
+ FAIL_IF(load_immediate(compiler, TMP_REG2, srcw));
+ FAIL_IF(push_inst(compiler, MTLR | S(TMP_REG2)));
+ }
+ return push_inst(compiler, BLR);
+}
+
+/* --------------------------------------------------------------------- */
+/* Conditional instructions */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
+{
+ struct sljit_label *label;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_label(compiler));
+
+ if (compiler->last_label && compiler->last_label->size == compiler->size)
+ return compiler->last_label;
+
+ label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label));
+ PTR_FAIL_IF(!label);
+ set_label(label, compiler);
+ return label;
+}
+
+static sljit_ins get_bo_bi_flags(sljit_s32 type)
+{
+ switch (type) {
+ case SLJIT_EQUAL:
+ return (12 << 21) | (2 << 16);
+
+ case SLJIT_NOT_EQUAL:
+ return (4 << 21) | (2 << 16);
+
+ case SLJIT_LESS:
+ case SLJIT_LESS_F64:
+ return (12 << 21) | ((4 + 0) << 16);
+
+ case SLJIT_GREATER_EQUAL:
+ case SLJIT_GREATER_EQUAL_F64:
+ return (4 << 21) | ((4 + 0) << 16);
+
+ case SLJIT_GREATER:
+ case SLJIT_GREATER_F64:
+ return (12 << 21) | ((4 + 1) << 16);
+
+ case SLJIT_LESS_EQUAL:
+ case SLJIT_LESS_EQUAL_F64:
+ return (4 << 21) | ((4 + 1) << 16);
+
+ case SLJIT_SIG_LESS:
+ return (12 << 21) | (0 << 16);
+
+ case SLJIT_SIG_GREATER_EQUAL:
+ return (4 << 21) | (0 << 16);
+
+ case SLJIT_SIG_GREATER:
+ return (12 << 21) | (1 << 16);
+
+ case SLJIT_SIG_LESS_EQUAL:
+ return (4 << 21) | (1 << 16);
+
+ case SLJIT_OVERFLOW:
+ case SLJIT_MUL_OVERFLOW:
+ return (12 << 21) | (3 << 16);
+
+ case SLJIT_NOT_OVERFLOW:
+ case SLJIT_MUL_NOT_OVERFLOW:
+ return (4 << 21) | (3 << 16);
+
+ case SLJIT_EQUAL_F64:
+ return (12 << 21) | ((4 + 2) << 16);
+
+ case SLJIT_NOT_EQUAL_F64:
+ return (4 << 21) | ((4 + 2) << 16);
+
+ case SLJIT_UNORDERED_F64:
+ return (12 << 21) | ((4 + 3) << 16);
+
+ case SLJIT_ORDERED_F64:
+ return (4 << 21) | ((4 + 3) << 16);
+
+ default:
+ SLJIT_ASSERT(type >= SLJIT_JUMP && type <= SLJIT_CALL3);
+ return (20 << 21);
+ }
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_s32 type)
+{
+ struct sljit_jump *jump;
+ sljit_ins bo_bi_flags;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_jump(compiler, type));
+
+ bo_bi_flags = get_bo_bi_flags(type & 0xff);
+ if (!bo_bi_flags)
+ return NULL;
+
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ PTR_FAIL_IF(!jump);
+ set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
+ type &= 0xff;
+
+ /* In PPC, we don't need to touch the arguments. */
+ if (type < SLJIT_JUMP)
+ jump->flags |= IS_COND;
+#if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL)
+ if (type >= SLJIT_CALL0)
+ jump->flags |= IS_CALL;
+#endif
+
+ PTR_FAIL_IF(emit_const(compiler, TMP_CALL_REG, 0));
+ PTR_FAIL_IF(push_inst(compiler, MTCTR | S(TMP_CALL_REG)));
+ jump->addr = compiler->size;
+ PTR_FAIL_IF(push_inst(compiler, BCCTR | bo_bi_flags | (type >= SLJIT_FAST_CALL ? 1 : 0)));
+ return jump;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 src, sljit_sw srcw)
+{
+ struct sljit_jump *jump = NULL;
+ sljit_s32 src_r;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_ijump(compiler, type, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ if (FAST_IS_REG(src)) {
+#if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL)
+ if (type >= SLJIT_CALL0) {
+ FAIL_IF(push_inst(compiler, OR | S(src) | A(TMP_CALL_REG) | B(src)));
+ src_r = TMP_CALL_REG;
+ }
+ else
+ src_r = src;
+#else
+ src_r = src;
+#endif
+ } else if (src & SLJIT_IMM) {
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ FAIL_IF(!jump);
+ set_jump(jump, compiler, JUMP_ADDR);
+ jump->u.target = srcw;
+#if (defined SLJIT_PASS_ENTRY_ADDR_TO_CALL && SLJIT_PASS_ENTRY_ADDR_TO_CALL)
+ if (type >= SLJIT_CALL0)
+ jump->flags |= IS_CALL;
+#endif
+ FAIL_IF(emit_const(compiler, TMP_CALL_REG, 0));
+ src_r = TMP_CALL_REG;
+ }
+ else {
+ FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, TMP_CALL_REG, 0, TMP_REG1, 0, src, srcw));
+ src_r = TMP_CALL_REG;
+ }
+
+ FAIL_IF(push_inst(compiler, MTCTR | S(src_r)));
+ if (jump)
+ jump->addr = compiler->size;
+ return push_inst(compiler, BCCTR | (20 << 21) | (type >= SLJIT_FAST_CALL ? 1 : 0));
+}
+
+/* Get a bit from CR, all other bits are zeroed. */
+#define GET_CR_BIT(bit, dst) \
+ FAIL_IF(push_inst(compiler, MFCR | D(dst))); \
+ FAIL_IF(push_inst(compiler, RLWINM | S(dst) | A(dst) | ((1 + (bit)) << 11) | (31 << 6) | (31 << 1)));
+
+#define INVERT_BIT(dst) \
+ FAIL_IF(push_inst(compiler, XORI | S(dst) | A(dst) | 0x1));
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw,
+ sljit_s32 type)
+{
+ sljit_s32 reg, input_flags;
+ sljit_s32 flags = GET_ALL_FLAGS(op);
+ sljit_sw original_dstw = dstw;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ op = GET_OPCODE(op);
+ reg = (op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2;
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ if (op >= SLJIT_ADD && (src & SLJIT_MEM)) {
+ ADJUST_LOCAL_OFFSET(src, srcw);
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ input_flags = (flags & SLJIT_I32_OP) ? INT_DATA : WORD_DATA;
+#else
+ input_flags = WORD_DATA;
+#endif
+ FAIL_IF(emit_op_mem2(compiler, input_flags | LOAD_DATA, TMP_REG1, src, srcw, dst, dstw));
+ src = TMP_REG1;
+ srcw = 0;
+ }
+
+ switch (type & 0xff) {
+ case SLJIT_EQUAL:
+ GET_CR_BIT(2, reg);
+ break;
+
+ case SLJIT_NOT_EQUAL:
+ GET_CR_BIT(2, reg);
+ INVERT_BIT(reg);
+ break;
+
+ case SLJIT_LESS:
+ case SLJIT_LESS_F64:
+ GET_CR_BIT(4 + 0, reg);
+ break;
+
+ case SLJIT_GREATER_EQUAL:
+ case SLJIT_GREATER_EQUAL_F64:
+ GET_CR_BIT(4 + 0, reg);
+ INVERT_BIT(reg);
+ break;
+
+ case SLJIT_GREATER:
+ case SLJIT_GREATER_F64:
+ GET_CR_BIT(4 + 1, reg);
+ break;
+
+ case SLJIT_LESS_EQUAL:
+ case SLJIT_LESS_EQUAL_F64:
+ GET_CR_BIT(4 + 1, reg);
+ INVERT_BIT(reg);
+ break;
+
+ case SLJIT_SIG_LESS:
+ GET_CR_BIT(0, reg);
+ break;
+
+ case SLJIT_SIG_GREATER_EQUAL:
+ GET_CR_BIT(0, reg);
+ INVERT_BIT(reg);
+ break;
+
+ case SLJIT_SIG_GREATER:
+ GET_CR_BIT(1, reg);
+ break;
+
+ case SLJIT_SIG_LESS_EQUAL:
+ GET_CR_BIT(1, reg);
+ INVERT_BIT(reg);
+ break;
+
+ case SLJIT_OVERFLOW:
+ case SLJIT_MUL_OVERFLOW:
+ GET_CR_BIT(3, reg);
+ break;
+
+ case SLJIT_NOT_OVERFLOW:
+ case SLJIT_MUL_NOT_OVERFLOW:
+ GET_CR_BIT(3, reg);
+ INVERT_BIT(reg);
+ break;
+
+ case SLJIT_EQUAL_F64:
+ GET_CR_BIT(4 + 2, reg);
+ break;
+
+ case SLJIT_NOT_EQUAL_F64:
+ GET_CR_BIT(4 + 2, reg);
+ INVERT_BIT(reg);
+ break;
+
+ case SLJIT_UNORDERED_F64:
+ GET_CR_BIT(4 + 3, reg);
+ break;
+
+ case SLJIT_ORDERED_F64:
+ GET_CR_BIT(4 + 3, reg);
+ INVERT_BIT(reg);
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ break;
+ }
+
+ if (op < SLJIT_ADD) {
+#if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+ if (op == SLJIT_MOV)
+ input_flags = WORD_DATA;
+ else {
+ op = SLJIT_MOV_U32;
+ input_flags = INT_DATA;
+ }
+#else
+ op = SLJIT_MOV;
+ input_flags = WORD_DATA;
+#endif
+ if (reg != TMP_REG2)
+ return SLJIT_SUCCESS;
+ return emit_op(compiler, op, input_flags, dst, dstw, TMP_REG1, 0, TMP_REG2, 0);
+ }
+
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
+ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ compiler->skip_checks = 1;
+#endif
+ return sljit_emit_op2(compiler, op | flags, dst, original_dstw, src, srcw, TMP_REG2, 0);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value)
+{
+ struct sljit_const *const_;
+ sljit_s32 reg;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const));
+ PTR_FAIL_IF(!const_);
+ set_const(const_, compiler);
+
+ reg = SLOW_IS_REG(dst) ? dst : TMP_REG2;
+
+ PTR_FAIL_IF(emit_const(compiler, reg, init_value));
+
+ if (dst & SLJIT_MEM)
+ PTR_FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, TMP_REG2, 0));
+ return const_;
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeSPARC_32.c b/thirdparty/pcre2/src/sljit/sljitNativeSPARC_32.c
new file mode 100644
index 0000000000..4a206f11d0
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativeSPARC_32.c
@@ -0,0 +1,166 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw imm)
+{
+ if (imm <= SIMM_MAX && imm >= SIMM_MIN)
+ return push_inst(compiler, OR | D(dst) | S1(0) | IMM(imm), DR(dst));
+
+ FAIL_IF(push_inst(compiler, SETHI | D(dst) | ((imm >> 10) & 0x3fffff), DR(dst)));
+ return (imm & 0x3ff) ? push_inst(compiler, OR | D(dst) | S1(dst) | IMM_ARG | (imm & 0x3ff), DR(dst)) : SLJIT_SUCCESS;
+}
+
+#define ARG2(flags, src2) ((flags & SRC2_IMM) ? IMM(src2) : S2(src2))
+
+static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags,
+ sljit_s32 dst, sljit_s32 src1, sljit_sw src2)
+{
+ SLJIT_COMPILE_ASSERT(ICC_IS_SET == SET_FLAGS, icc_is_set_and_set_flags_must_be_the_same);
+
+ switch (op) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_U32:
+ case SLJIT_MOV_S32:
+ case SLJIT_MOV_P:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if (dst != src2)
+ return push_inst(compiler, OR | D(dst) | S1(0) | S2(src2), DR(dst));
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U8:
+ case SLJIT_MOV_S8:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
+ if (op == SLJIT_MOV_U8)
+ return push_inst(compiler, AND | D(dst) | S1(src2) | IMM(0xff), DR(dst));
+ FAIL_IF(push_inst(compiler, SLL | D(dst) | S1(src2) | IMM(24), DR(dst)));
+ return push_inst(compiler, SRA | D(dst) | S1(dst) | IMM(24), DR(dst));
+ }
+ else if (dst != src2)
+ SLJIT_ASSERT_STOP();
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U16:
+ case SLJIT_MOV_S16:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
+ FAIL_IF(push_inst(compiler, SLL | D(dst) | S1(src2) | IMM(16), DR(dst)));
+ return push_inst(compiler, (op == SLJIT_MOV_S16 ? SRA : SRL) | D(dst) | S1(dst) | IMM(16), DR(dst));
+ }
+ else if (dst != src2)
+ SLJIT_ASSERT_STOP();
+ return SLJIT_SUCCESS;
+
+ case SLJIT_NOT:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ return push_inst(compiler, XNOR | (flags & SET_FLAGS) | D(dst) | S1(0) | S2(src2), DR(dst) | (flags & SET_FLAGS));
+
+ case SLJIT_CLZ:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ /* sparc 32 does not support SLJIT_KEEP_FLAGS. Not sure I can fix this. */
+ FAIL_IF(push_inst(compiler, SUB | SET_FLAGS | D(0) | S1(src2) | S2(0), SET_FLAGS));
+ FAIL_IF(push_inst(compiler, OR | D(TMP_REG1) | S1(0) | S2(src2), DR(TMP_REG1)));
+ FAIL_IF(push_inst(compiler, BICC | DA(0x1) | (7 & DISP_MASK), UNMOVABLE_INS));
+ FAIL_IF(push_inst(compiler, OR | (flags & SET_FLAGS) | D(dst) | S1(0) | IMM(32), UNMOVABLE_INS | (flags & SET_FLAGS)));
+ FAIL_IF(push_inst(compiler, OR | D(dst) | S1(0) | IMM(-1), DR(dst)));
+
+ /* Loop. */
+ FAIL_IF(push_inst(compiler, SUB | SET_FLAGS | D(0) | S1(TMP_REG1) | S2(0), SET_FLAGS));
+ FAIL_IF(push_inst(compiler, SLL | D(TMP_REG1) | S1(TMP_REG1) | IMM(1), DR(TMP_REG1)));
+ FAIL_IF(push_inst(compiler, BICC | DA(0xe) | (-2 & DISP_MASK), UNMOVABLE_INS));
+ return push_inst(compiler, ADD | (flags & SET_FLAGS) | D(dst) | S1(dst) | IMM(1), UNMOVABLE_INS | (flags & SET_FLAGS));
+
+ case SLJIT_ADD:
+ return push_inst(compiler, ADD | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS));
+
+ case SLJIT_ADDC:
+ return push_inst(compiler, ADDC | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS));
+
+ case SLJIT_SUB:
+ return push_inst(compiler, SUB | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS));
+
+ case SLJIT_SUBC:
+ return push_inst(compiler, SUBC | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS));
+
+ case SLJIT_MUL:
+ FAIL_IF(push_inst(compiler, SMUL | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst)));
+ if (!(flags & SET_FLAGS))
+ return SLJIT_SUCCESS;
+ FAIL_IF(push_inst(compiler, SRA | D(TMP_REG1) | S1(dst) | IMM(31), DR(TMP_REG1)));
+ FAIL_IF(push_inst(compiler, RDY | D(TMP_LINK), DR(TMP_LINK)));
+ return push_inst(compiler, SUB | SET_FLAGS | D(0) | S1(TMP_REG1) | S2(TMP_LINK), MOVABLE_INS | SET_FLAGS);
+
+ case SLJIT_AND:
+ return push_inst(compiler, AND | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS));
+
+ case SLJIT_OR:
+ return push_inst(compiler, OR | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS));
+
+ case SLJIT_XOR:
+ return push_inst(compiler, XOR | (flags & SET_FLAGS) | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst) | (flags & SET_FLAGS));
+
+ case SLJIT_SHL:
+ FAIL_IF(push_inst(compiler, SLL | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst)));
+ return !(flags & SET_FLAGS) ? SLJIT_SUCCESS : push_inst(compiler, SUB | SET_FLAGS | D(0) | S1(dst) | S2(0), SET_FLAGS);
+
+ case SLJIT_LSHR:
+ FAIL_IF(push_inst(compiler, SRL | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst)));
+ return !(flags & SET_FLAGS) ? SLJIT_SUCCESS : push_inst(compiler, SUB | SET_FLAGS | D(0) | S1(dst) | S2(0), SET_FLAGS);
+
+ case SLJIT_ASHR:
+ FAIL_IF(push_inst(compiler, SRA | D(dst) | S1(src1) | ARG2(flags, src2), DR(dst)));
+ return !(flags & SET_FLAGS) ? SLJIT_SUCCESS : push_inst(compiler, SUB | SET_FLAGS | D(0) | S1(dst) | S2(0), SET_FLAGS);
+ }
+
+ SLJIT_ASSERT_STOP();
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw init_value)
+{
+ FAIL_IF(push_inst(compiler, SETHI | D(dst) | ((init_value >> 10) & 0x3fffff), DR(dst)));
+ return push_inst(compiler, OR | D(dst) | S1(dst) | IMM_ARG | (init_value & 0x3ff), DR(dst));
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset)
+{
+ sljit_ins *inst = (sljit_ins *)addr;
+
+ inst[0] = (inst[0] & 0xffc00000) | ((new_target >> 10) & 0x3fffff);
+ inst[1] = (inst[1] & 0xfffffc00) | (new_target & 0x3ff);
+ inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 2);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset)
+{
+ sljit_ins *inst = (sljit_ins *)addr;
+
+ inst[0] = (inst[0] & 0xffc00000) | ((new_constant >> 10) & 0x3fffff);
+ inst[1] = (inst[1] & 0xfffffc00) | (new_constant & 0x3ff);
+ inst = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
+ SLJIT_CACHE_FLUSH(inst, inst + 2);
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeSPARC_common.c b/thirdparty/pcre2/src/sljit/sljitNativeSPARC_common.c
new file mode 100644
index 0000000000..7445fc4723
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativeSPARC_common.c
@@ -0,0 +1,1450 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+SLJIT_API_FUNC_ATTRIBUTE const char* sljit_get_platform_name(void)
+{
+ return "SPARC" SLJIT_CPUINFO;
+}
+
+/* Length of an instruction word
+ Both for sparc-32 and sparc-64 */
+typedef sljit_u32 sljit_ins;
+
+#if (defined SLJIT_CACHE_FLUSH_OWN_IMPL && SLJIT_CACHE_FLUSH_OWN_IMPL)
+
+static void sparc_cache_flush(sljit_ins *from, sljit_ins *to)
+{
+#if defined(__SUNPRO_C) && __SUNPRO_C < 0x590
+ __asm (
+ /* if (from == to) return */
+ "cmp %i0, %i1\n"
+ "be .leave\n"
+ "nop\n"
+
+ /* loop until from >= to */
+ ".mainloop:\n"
+ "flush %i0\n"
+ "add %i0, 8, %i0\n"
+ "cmp %i0, %i1\n"
+ "bcs .mainloop\n"
+ "nop\n"
+
+ /* The comparison was done above. */
+ "bne .leave\n"
+ /* nop is not necessary here, since the
+ sub operation has no side effect. */
+ "sub %i0, 4, %i0\n"
+ "flush %i0\n"
+ ".leave:"
+ );
+#else
+ if (SLJIT_UNLIKELY(from == to))
+ return;
+
+ do {
+ __asm__ volatile (
+ "flush %0\n"
+ : : "r"(from)
+ );
+ /* Operates at least on doubleword. */
+ from += 2;
+ } while (from < to);
+
+ if (from == to) {
+ /* Flush the last word. */
+ from --;
+ __asm__ volatile (
+ "flush %0\n"
+ : : "r"(from)
+ );
+ }
+#endif
+}
+
+#endif /* (defined SLJIT_CACHE_FLUSH_OWN_IMPL && SLJIT_CACHE_FLUSH_OWN_IMPL) */
+
+/* TMP_REG2 is not used by getput_arg */
+#define TMP_REG1 (SLJIT_NUMBER_OF_REGISTERS + 2)
+#define TMP_REG2 (SLJIT_NUMBER_OF_REGISTERS + 3)
+#define TMP_REG3 (SLJIT_NUMBER_OF_REGISTERS + 4)
+#define TMP_LINK (SLJIT_NUMBER_OF_REGISTERS + 5)
+
+#define TMP_FREG1 (0)
+#define TMP_FREG2 ((SLJIT_NUMBER_OF_FLOAT_REGISTERS + 1) << 1)
+
+static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 6] = {
+ 0, 8, 9, 10, 13, 29, 28, 27, 23, 22, 21, 20, 19, 18, 17, 16, 26, 25, 24, 14, 1, 11, 12, 15
+};
+
+/* --------------------------------------------------------------------- */
+/* Instrucion forms */
+/* --------------------------------------------------------------------- */
+
+#define D(d) (reg_map[d] << 25)
+#define DA(d) ((d) << 25)
+#define S1(s1) (reg_map[s1] << 14)
+#define S2(s2) (reg_map[s2])
+#define S1A(s1) ((s1) << 14)
+#define S2A(s2) (s2)
+#define IMM_ARG 0x2000
+#define DOP(op) ((op) << 5)
+#define IMM(imm) (((imm) & 0x1fff) | IMM_ARG)
+
+#define DR(dr) (reg_map[dr])
+#define OPC1(opcode) ((opcode) << 30)
+#define OPC2(opcode) ((opcode) << 22)
+#define OPC3(opcode) ((opcode) << 19)
+#define SET_FLAGS OPC3(0x10)
+
+#define ADD (OPC1(0x2) | OPC3(0x00))
+#define ADDC (OPC1(0x2) | OPC3(0x08))
+#define AND (OPC1(0x2) | OPC3(0x01))
+#define ANDN (OPC1(0x2) | OPC3(0x05))
+#define CALL (OPC1(0x1))
+#define FABSS (OPC1(0x2) | OPC3(0x34) | DOP(0x09))
+#define FADDD (OPC1(0x2) | OPC3(0x34) | DOP(0x42))
+#define FADDS (OPC1(0x2) | OPC3(0x34) | DOP(0x41))
+#define FCMPD (OPC1(0x2) | OPC3(0x35) | DOP(0x52))
+#define FCMPS (OPC1(0x2) | OPC3(0x35) | DOP(0x51))
+#define FDIVD (OPC1(0x2) | OPC3(0x34) | DOP(0x4e))
+#define FDIVS (OPC1(0x2) | OPC3(0x34) | DOP(0x4d))
+#define FDTOI (OPC1(0x2) | OPC3(0x34) | DOP(0xd2))
+#define FDTOS (OPC1(0x2) | OPC3(0x34) | DOP(0xc6))
+#define FITOD (OPC1(0x2) | OPC3(0x34) | DOP(0xc8))
+#define FITOS (OPC1(0x2) | OPC3(0x34) | DOP(0xc4))
+#define FMOVS (OPC1(0x2) | OPC3(0x34) | DOP(0x01))
+#define FMULD (OPC1(0x2) | OPC3(0x34) | DOP(0x4a))
+#define FMULS (OPC1(0x2) | OPC3(0x34) | DOP(0x49))
+#define FNEGS (OPC1(0x2) | OPC3(0x34) | DOP(0x05))
+#define FSTOD (OPC1(0x2) | OPC3(0x34) | DOP(0xc9))
+#define FSTOI (OPC1(0x2) | OPC3(0x34) | DOP(0xd1))
+#define FSUBD (OPC1(0x2) | OPC3(0x34) | DOP(0x46))
+#define FSUBS (OPC1(0x2) | OPC3(0x34) | DOP(0x45))
+#define JMPL (OPC1(0x2) | OPC3(0x38))
+#define NOP (OPC1(0x0) | OPC2(0x04))
+#define OR (OPC1(0x2) | OPC3(0x02))
+#define ORN (OPC1(0x2) | OPC3(0x06))
+#define RDY (OPC1(0x2) | OPC3(0x28) | S1A(0))
+#define RESTORE (OPC1(0x2) | OPC3(0x3d))
+#define SAVE (OPC1(0x2) | OPC3(0x3c))
+#define SETHI (OPC1(0x0) | OPC2(0x04))
+#define SLL (OPC1(0x2) | OPC3(0x25))
+#define SLLX (OPC1(0x2) | OPC3(0x25) | (1 << 12))
+#define SRA (OPC1(0x2) | OPC3(0x27))
+#define SRAX (OPC1(0x2) | OPC3(0x27) | (1 << 12))
+#define SRL (OPC1(0x2) | OPC3(0x26))
+#define SRLX (OPC1(0x2) | OPC3(0x26) | (1 << 12))
+#define SUB (OPC1(0x2) | OPC3(0x04))
+#define SUBC (OPC1(0x2) | OPC3(0x0c))
+#define TA (OPC1(0x2) | OPC3(0x3a) | (8 << 25))
+#define WRY (OPC1(0x2) | OPC3(0x30) | DA(0))
+#define XOR (OPC1(0x2) | OPC3(0x03))
+#define XNOR (OPC1(0x2) | OPC3(0x07))
+
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+#define MAX_DISP (0x1fffff)
+#define MIN_DISP (-0x200000)
+#define DISP_MASK (0x3fffff)
+
+#define BICC (OPC1(0x0) | OPC2(0x2))
+#define FBFCC (OPC1(0x0) | OPC2(0x6))
+#define SLL_W SLL
+#define SDIV (OPC1(0x2) | OPC3(0x0f))
+#define SMUL (OPC1(0x2) | OPC3(0x0b))
+#define UDIV (OPC1(0x2) | OPC3(0x0e))
+#define UMUL (OPC1(0x2) | OPC3(0x0a))
+#else
+#define SLL_W SLLX
+#endif
+
+#define SIMM_MAX (0x0fff)
+#define SIMM_MIN (-0x1000)
+
+/* dest_reg is the absolute name of the register
+ Useful for reordering instructions in the delay slot. */
+static sljit_s32 push_inst(struct sljit_compiler *compiler, sljit_ins ins, sljit_s32 delay_slot)
+{
+ sljit_ins *ptr;
+ SLJIT_ASSERT((delay_slot & DST_INS_MASK) == UNMOVABLE_INS
+ || (delay_slot & DST_INS_MASK) == MOVABLE_INS
+ || (delay_slot & DST_INS_MASK) == ((ins >> 25) & 0x1f));
+ ptr = (sljit_ins*)ensure_buf(compiler, sizeof(sljit_ins));
+ FAIL_IF(!ptr);
+ *ptr = ins;
+ compiler->size++;
+ compiler->delay_slot = delay_slot;
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_ins* detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_ins *code, sljit_sw executable_offset)
+{
+ sljit_sw diff;
+ sljit_uw target_addr;
+ sljit_ins *inst;
+ sljit_ins saved_inst;
+
+ if (jump->flags & SLJIT_REWRITABLE_JUMP)
+ return code_ptr;
+
+ if (jump->flags & JUMP_ADDR)
+ target_addr = jump->u.target;
+ else {
+ SLJIT_ASSERT(jump->flags & JUMP_LABEL);
+ target_addr = (sljit_uw)(code + jump->u.label->size) + (sljit_uw)executable_offset;
+ }
+ inst = (sljit_ins*)jump->addr;
+
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+ if (jump->flags & IS_CALL) {
+ /* Call is always patchable on sparc 32. */
+ jump->flags |= PATCH_CALL;
+ if (jump->flags & IS_MOVABLE) {
+ inst[0] = inst[-1];
+ inst[-1] = CALL;
+ jump->addr -= sizeof(sljit_ins);
+ return inst;
+ }
+ inst[0] = CALL;
+ inst[1] = NOP;
+ return inst + 1;
+ }
+#else
+ /* Both calls and BPr instructions shall not pass this point. */
+#error "Implementation required"
+#endif
+
+ if (jump->flags & IS_COND)
+ inst--;
+
+ diff = ((sljit_sw)target_addr - (sljit_sw)(inst - 1) - executable_offset) >> 2;
+
+ if (jump->flags & IS_MOVABLE) {
+ if (diff <= MAX_DISP && diff >= MIN_DISP) {
+ jump->flags |= PATCH_B;
+ inst--;
+ if (jump->flags & IS_COND) {
+ saved_inst = inst[0];
+ inst[0] = inst[1] ^ (1 << 28);
+ inst[1] = saved_inst;
+ } else {
+ inst[1] = inst[0];
+ inst[0] = BICC | DA(0x8);
+ }
+ jump->addr = (sljit_uw)inst;
+ return inst + 1;
+ }
+ }
+
+ diff += sizeof(sljit_ins);
+
+ if (diff <= MAX_DISP && diff >= MIN_DISP) {
+ jump->flags |= PATCH_B;
+ if (jump->flags & IS_COND)
+ inst[0] ^= (1 << 28);
+ else
+ inst[0] = BICC | DA(0x8);
+ inst[1] = NOP;
+ jump->addr = (sljit_uw)inst;
+ return inst + 1;
+ }
+
+ return code_ptr;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
+{
+ struct sljit_memory_fragment *buf;
+ sljit_ins *code;
+ sljit_ins *code_ptr;
+ sljit_ins *buf_ptr;
+ sljit_ins *buf_end;
+ sljit_uw word_count;
+ sljit_sw executable_offset;
+ sljit_uw addr;
+
+ struct sljit_label *label;
+ struct sljit_jump *jump;
+ struct sljit_const *const_;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_generate_code(compiler));
+ reverse_buf(compiler);
+
+ code = (sljit_ins*)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_ins));
+ PTR_FAIL_WITH_EXEC_IF(code);
+ buf = compiler->buf;
+
+ code_ptr = code;
+ word_count = 0;
+ executable_offset = SLJIT_EXEC_OFFSET(code);
+
+ label = compiler->labels;
+ jump = compiler->jumps;
+ const_ = compiler->consts;
+
+ do {
+ buf_ptr = (sljit_ins*)buf->memory;
+ buf_end = buf_ptr + (buf->used_size >> 2);
+ do {
+ *code_ptr = *buf_ptr++;
+ SLJIT_ASSERT(!label || label->size >= word_count);
+ SLJIT_ASSERT(!jump || jump->addr >= word_count);
+ SLJIT_ASSERT(!const_ || const_->addr >= word_count);
+ /* These structures are ordered by their address. */
+ if (label && label->size == word_count) {
+ /* Just recording the address. */
+ label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
+ label->size = code_ptr - code;
+ label = label->next;
+ }
+ if (jump && jump->addr == word_count) {
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+ jump->addr = (sljit_uw)(code_ptr - 3);
+#else
+ jump->addr = (sljit_uw)(code_ptr - 6);
+#endif
+ code_ptr = detect_jump_type(jump, code_ptr, code, executable_offset);
+ jump = jump->next;
+ }
+ if (const_ && const_->addr == word_count) {
+ /* Just recording the address. */
+ const_->addr = (sljit_uw)code_ptr;
+ const_ = const_->next;
+ }
+ code_ptr ++;
+ word_count ++;
+ } while (buf_ptr < buf_end);
+
+ buf = buf->next;
+ } while (buf);
+
+ if (label && label->size == word_count) {
+ label->addr = (sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
+ label->size = code_ptr - code;
+ label = label->next;
+ }
+
+ SLJIT_ASSERT(!label);
+ SLJIT_ASSERT(!jump);
+ SLJIT_ASSERT(!const_);
+ SLJIT_ASSERT(code_ptr - code <= (sljit_s32)compiler->size);
+
+ jump = compiler->jumps;
+ while (jump) {
+ do {
+ addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target;
+ buf_ptr = (sljit_ins *)jump->addr;
+
+ if (jump->flags & PATCH_CALL) {
+ addr = (sljit_sw)(addr - (sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset)) >> 2;
+ SLJIT_ASSERT((sljit_sw)addr <= 0x1fffffff && (sljit_sw)addr >= -0x20000000);
+ buf_ptr[0] = CALL | (addr & 0x3fffffff);
+ break;
+ }
+ if (jump->flags & PATCH_B) {
+ addr = (sljit_sw)(addr - (sljit_uw)SLJIT_ADD_EXEC_OFFSET(buf_ptr, executable_offset)) >> 2;
+ SLJIT_ASSERT((sljit_sw)addr <= MAX_DISP && (sljit_sw)addr >= MIN_DISP);
+ buf_ptr[0] = (buf_ptr[0] & ~DISP_MASK) | (addr & DISP_MASK);
+ break;
+ }
+
+ /* Set the fields of immediate loads. */
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+ buf_ptr[0] = (buf_ptr[0] & 0xffc00000) | ((addr >> 10) & 0x3fffff);
+ buf_ptr[1] = (buf_ptr[1] & 0xfffffc00) | (addr & 0x3ff);
+#else
+#error "Implementation required"
+#endif
+ } while (0);
+ jump = jump->next;
+ }
+
+
+ compiler->error = SLJIT_ERR_COMPILED;
+ compiler->executable_offset = executable_offset;
+ compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins);
+
+ code = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset);
+ code_ptr = (sljit_ins *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset);
+
+ SLJIT_CACHE_FLUSH(code, code_ptr);
+ return code;
+}
+
+/* --------------------------------------------------------------------- */
+/* Entry, exit */
+/* --------------------------------------------------------------------- */
+
+/* Creates an index in data_transfer_insts array. */
+#define LOAD_DATA 0x01
+#define WORD_DATA 0x00
+#define BYTE_DATA 0x02
+#define HALF_DATA 0x04
+#define INT_DATA 0x06
+#define SIGNED_DATA 0x08
+/* Separates integer and floating point registers */
+#define GPR_REG 0x0f
+#define DOUBLE_DATA 0x10
+#define SINGLE_DATA 0x12
+
+#define MEM_MASK 0x1f
+
+#define WRITE_BACK 0x00020
+#define ARG_TEST 0x00040
+#define ALT_KEEP_CACHE 0x00080
+#define CUMULATIVE_OP 0x00100
+#define IMM_OP 0x00200
+#define SRC2_IMM 0x00400
+
+#define REG_DEST 0x00800
+#define REG2_SOURCE 0x01000
+#define SLOW_SRC1 0x02000
+#define SLOW_SRC2 0x04000
+#define SLOW_DEST 0x08000
+
+/* SET_FLAGS (0x10 << 19) also belong here! */
+
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+#include "sljitNativeSPARC_32.c"
+#else
+#include "sljitNativeSPARC_64.c"
+#endif
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ local_size = (local_size + SLJIT_LOCALS_OFFSET + 7) & ~0x7;
+ compiler->local_size = local_size;
+
+ if (local_size <= SIMM_MAX) {
+ FAIL_IF(push_inst(compiler, SAVE | D(SLJIT_SP) | S1(SLJIT_SP) | IMM(-local_size), UNMOVABLE_INS));
+ }
+ else {
+ FAIL_IF(load_immediate(compiler, TMP_REG1, -local_size));
+ FAIL_IF(push_inst(compiler, SAVE | D(SLJIT_SP) | S1(SLJIT_SP) | S2(TMP_REG1), UNMOVABLE_INS));
+ }
+
+ /* Arguments are in their appropriate registers. */
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ compiler->local_size = (local_size + SLJIT_LOCALS_OFFSET + 7) & ~0x7;
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_return(compiler, op, src, srcw));
+
+ if (op != SLJIT_MOV || !FAST_IS_REG(src)) {
+ FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
+ src = SLJIT_R0;
+ }
+
+ FAIL_IF(push_inst(compiler, JMPL | D(0) | S1A(31) | IMM(8), UNMOVABLE_INS));
+ return push_inst(compiler, RESTORE | D(SLJIT_R0) | S1(src) | S2(0), UNMOVABLE_INS);
+}
+
+/* --------------------------------------------------------------------- */
+/* Operators */
+/* --------------------------------------------------------------------- */
+
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+#define ARCH_32_64(a, b) a
+#else
+#define ARCH_32_64(a, b) b
+#endif
+
+static const sljit_ins data_transfer_insts[16 + 4] = {
+/* u w s */ ARCH_32_64(OPC1(3) | OPC3(0x04) /* stw */, OPC1(3) | OPC3(0x0e) /* stx */),
+/* u w l */ ARCH_32_64(OPC1(3) | OPC3(0x00) /* lduw */, OPC1(3) | OPC3(0x0b) /* ldx */),
+/* u b s */ OPC1(3) | OPC3(0x05) /* stb */,
+/* u b l */ OPC1(3) | OPC3(0x01) /* ldub */,
+/* u h s */ OPC1(3) | OPC3(0x06) /* sth */,
+/* u h l */ OPC1(3) | OPC3(0x02) /* lduh */,
+/* u i s */ OPC1(3) | OPC3(0x04) /* stw */,
+/* u i l */ OPC1(3) | OPC3(0x00) /* lduw */,
+
+/* s w s */ ARCH_32_64(OPC1(3) | OPC3(0x04) /* stw */, OPC1(3) | OPC3(0x0e) /* stx */),
+/* s w l */ ARCH_32_64(OPC1(3) | OPC3(0x00) /* lduw */, OPC1(3) | OPC3(0x0b) /* ldx */),
+/* s b s */ OPC1(3) | OPC3(0x05) /* stb */,
+/* s b l */ OPC1(3) | OPC3(0x09) /* ldsb */,
+/* s h s */ OPC1(3) | OPC3(0x06) /* sth */,
+/* s h l */ OPC1(3) | OPC3(0x0a) /* ldsh */,
+/* s i s */ OPC1(3) | OPC3(0x04) /* stw */,
+/* s i l */ ARCH_32_64(OPC1(3) | OPC3(0x00) /* lduw */, OPC1(3) | OPC3(0x08) /* ldsw */),
+
+/* d s */ OPC1(3) | OPC3(0x27),
+/* d l */ OPC1(3) | OPC3(0x23),
+/* s s */ OPC1(3) | OPC3(0x24),
+/* s l */ OPC1(3) | OPC3(0x20),
+};
+
+#undef ARCH_32_64
+
+/* Can perform an operation using at most 1 instruction. */
+static sljit_s32 getput_arg_fast(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw)
+{
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+
+ if (!(flags & WRITE_BACK) || !(arg & REG_MASK)) {
+ if ((!(arg & OFFS_REG_MASK) && argw <= SIMM_MAX && argw >= SIMM_MIN)
+ || ((arg & OFFS_REG_MASK) && (argw & 0x3) == 0)) {
+ /* Works for both absoulte and relative addresses (immediate case). */
+ if (SLJIT_UNLIKELY(flags & ARG_TEST))
+ return 1;
+ FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK]
+ | ((flags & MEM_MASK) <= GPR_REG ? D(reg) : DA(reg))
+ | S1(arg & REG_MASK) | ((arg & OFFS_REG_MASK) ? S2(OFFS_REG(arg)) : IMM(argw)),
+ ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) ? DR(reg) : MOVABLE_INS));
+ return -1;
+ }
+ }
+ return 0;
+}
+
+/* See getput_arg below.
+ Note: can_cache is called only for binary operators. Those
+ operators always uses word arguments without write back. */
+static sljit_s32 can_cache(sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw)
+{
+ SLJIT_ASSERT((arg & SLJIT_MEM) && (next_arg & SLJIT_MEM));
+
+ /* Simple operation except for updates. */
+ if (arg & OFFS_REG_MASK) {
+ argw &= 0x3;
+ SLJIT_ASSERT(argw);
+ next_argw &= 0x3;
+ if ((arg & OFFS_REG_MASK) == (next_arg & OFFS_REG_MASK) && argw == next_argw)
+ return 1;
+ return 0;
+ }
+
+ if (((next_argw - argw) <= SIMM_MAX && (next_argw - argw) >= SIMM_MIN))
+ return 1;
+ return 0;
+}
+
+/* Emit the necessary instructions. See can_cache above. */
+static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw)
+{
+ sljit_s32 base, arg2, delay_slot;
+ sljit_ins dest;
+
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+ if (!(next_arg & SLJIT_MEM)) {
+ next_arg = 0;
+ next_argw = 0;
+ }
+
+ base = arg & REG_MASK;
+ if (SLJIT_UNLIKELY(arg & OFFS_REG_MASK)) {
+ argw &= 0x3;
+ SLJIT_ASSERT(argw != 0);
+
+ /* Using the cache. */
+ if (((SLJIT_MEM | (arg & OFFS_REG_MASK)) == compiler->cache_arg) && (argw == compiler->cache_argw))
+ arg2 = TMP_REG3;
+ else {
+ if ((arg & OFFS_REG_MASK) == (next_arg & OFFS_REG_MASK) && argw == (next_argw & 0x3)) {
+ compiler->cache_arg = SLJIT_MEM | (arg & OFFS_REG_MASK);
+ compiler->cache_argw = argw;
+ arg2 = TMP_REG3;
+ }
+ else if ((flags & LOAD_DATA) && ((flags & MEM_MASK) <= GPR_REG) && reg != base && reg != OFFS_REG(arg))
+ arg2 = reg;
+ else /* It must be a mov operation, so tmp1 must be free to use. */
+ arg2 = TMP_REG1;
+ FAIL_IF(push_inst(compiler, SLL_W | D(arg2) | S1(OFFS_REG(arg)) | IMM_ARG | argw, DR(arg2)));
+ }
+ }
+ else {
+ /* Using the cache. */
+ if ((compiler->cache_arg == SLJIT_MEM) && (argw - compiler->cache_argw) <= SIMM_MAX && (argw - compiler->cache_argw) >= SIMM_MIN) {
+ if (argw != compiler->cache_argw) {
+ FAIL_IF(push_inst(compiler, ADD | D(TMP_REG3) | S1(TMP_REG3) | IMM(argw - compiler->cache_argw), DR(TMP_REG3)));
+ compiler->cache_argw = argw;
+ }
+ arg2 = TMP_REG3;
+ } else {
+ if ((next_argw - argw) <= SIMM_MAX && (next_argw - argw) >= SIMM_MIN) {
+ compiler->cache_arg = SLJIT_MEM;
+ compiler->cache_argw = argw;
+ arg2 = TMP_REG3;
+ }
+ else if ((flags & LOAD_DATA) && ((flags & MEM_MASK) <= GPR_REG) && reg != base)
+ arg2 = reg;
+ else /* It must be a mov operation, so tmp1 must be free to use. */
+ arg2 = TMP_REG1;
+ FAIL_IF(load_immediate(compiler, arg2, argw));
+ }
+ }
+
+ dest = ((flags & MEM_MASK) <= GPR_REG ? D(reg) : DA(reg));
+ delay_slot = ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA)) ? DR(reg) : MOVABLE_INS;
+ if (!base)
+ return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(arg2) | IMM(0), delay_slot);
+ if (!(flags & WRITE_BACK))
+ return push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(base) | S2(arg2), delay_slot);
+ FAIL_IF(push_inst(compiler, data_transfer_insts[flags & MEM_MASK] | dest | S1(base) | S2(arg2), delay_slot));
+ return push_inst(compiler, ADD | D(base) | S1(base) | S2(arg2), DR(base));
+}
+
+static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg, sljit_sw argw)
+{
+ if (getput_arg_fast(compiler, flags, reg, arg, argw))
+ return compiler->error;
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ return getput_arg(compiler, flags, reg, arg, argw, 0, 0);
+}
+
+static SLJIT_INLINE sljit_s32 emit_op_mem2(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg1, sljit_sw arg1w, sljit_s32 arg2, sljit_sw arg2w)
+{
+ if (getput_arg_fast(compiler, flags, reg, arg1, arg1w))
+ return compiler->error;
+ return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w);
+}
+
+static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ /* arg1 goes to TMP_REG1 or src reg
+ arg2 goes to TMP_REG2, imm or src reg
+ TMP_REG3 can be used for caching
+ result goes to TMP_REG2, so put result can use TMP_REG1 and TMP_REG3. */
+ sljit_s32 dst_r = TMP_REG2;
+ sljit_s32 src1_r;
+ sljit_sw src2_r = 0;
+ sljit_s32 sugg_src2_r = TMP_REG2;
+
+ if (!(flags & ALT_KEEP_CACHE)) {
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ }
+
+ if (SLJIT_UNLIKELY(dst == SLJIT_UNUSED)) {
+ if (op >= SLJIT_MOV && op <= SLJIT_MOVU_S32 && !(src2 & SLJIT_MEM))
+ return SLJIT_SUCCESS;
+ }
+ else if (FAST_IS_REG(dst)) {
+ dst_r = dst;
+ flags |= REG_DEST;
+ if (op >= SLJIT_MOV && op <= SLJIT_MOVU_S32)
+ sugg_src2_r = dst_r;
+ }
+ else if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, flags | ARG_TEST, TMP_REG1, dst, dstw))
+ flags |= SLOW_DEST;
+
+ if (flags & IMM_OP) {
+ if ((src2 & SLJIT_IMM) && src2w) {
+ if (src2w <= SIMM_MAX && src2w >= SIMM_MIN) {
+ flags |= SRC2_IMM;
+ src2_r = src2w;
+ }
+ }
+ if (!(flags & SRC2_IMM) && (flags & CUMULATIVE_OP) && (src1 & SLJIT_IMM) && src1w) {
+ if (src1w <= SIMM_MAX && src1w >= SIMM_MIN) {
+ flags |= SRC2_IMM;
+ src2_r = src1w;
+
+ /* And swap arguments. */
+ src1 = src2;
+ src1w = src2w;
+ src2 = SLJIT_IMM;
+ /* src2w = src2_r unneeded. */
+ }
+ }
+ }
+
+ /* Source 1. */
+ if (FAST_IS_REG(src1))
+ src1_r = src1;
+ else if (src1 & SLJIT_IMM) {
+ if (src1w) {
+ FAIL_IF(load_immediate(compiler, TMP_REG1, src1w));
+ src1_r = TMP_REG1;
+ }
+ else
+ src1_r = 0;
+ }
+ else {
+ if (getput_arg_fast(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w))
+ FAIL_IF(compiler->error);
+ else
+ flags |= SLOW_SRC1;
+ src1_r = TMP_REG1;
+ }
+
+ /* Source 2. */
+ if (FAST_IS_REG(src2)) {
+ src2_r = src2;
+ flags |= REG2_SOURCE;
+ if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOVU_S32)
+ dst_r = src2_r;
+ }
+ else if (src2 & SLJIT_IMM) {
+ if (!(flags & SRC2_IMM)) {
+ if (src2w) {
+ FAIL_IF(load_immediate(compiler, sugg_src2_r, src2w));
+ src2_r = sugg_src2_r;
+ }
+ else {
+ src2_r = 0;
+ if ((op >= SLJIT_MOV && op <= SLJIT_MOVU_S32) && (dst & SLJIT_MEM))
+ dst_r = 0;
+ }
+ }
+ }
+ else {
+ if (getput_arg_fast(compiler, flags | LOAD_DATA, sugg_src2_r, src2, src2w))
+ FAIL_IF(compiler->error);
+ else
+ flags |= SLOW_SRC2;
+ src2_r = sugg_src2_r;
+ }
+
+ if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) {
+ SLJIT_ASSERT(src2_r == TMP_REG2);
+ if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2, src2, src2w, src1, src1w));
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw));
+ }
+ else {
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, src2, src2w));
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2, src2, src2w, dst, dstw));
+ }
+ }
+ else if (flags & SLOW_SRC1)
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1, src1, src1w, dst, dstw));
+ else if (flags & SLOW_SRC2)
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, sugg_src2_r, src2, src2w, dst, dstw));
+
+ FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r));
+
+ if (dst & SLJIT_MEM) {
+ if (!(flags & SLOW_DEST)) {
+ getput_arg_fast(compiler, flags, dst_r, dst, dstw);
+ return compiler->error;
+ }
+ return getput_arg(compiler, flags, dst_r, dst, dstw, 0, 0);
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op0(compiler, op));
+
+ op = GET_OPCODE(op);
+ switch (op) {
+ case SLJIT_BREAKPOINT:
+ return push_inst(compiler, TA, UNMOVABLE_INS);
+ case SLJIT_NOP:
+ return push_inst(compiler, NOP, UNMOVABLE_INS);
+ case SLJIT_LMUL_UW:
+ case SLJIT_LMUL_SW:
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+ FAIL_IF(push_inst(compiler, (op == SLJIT_LMUL_UW ? UMUL : SMUL) | D(SLJIT_R0) | S1(SLJIT_R0) | S2(SLJIT_R1), DR(SLJIT_R0)));
+ return push_inst(compiler, RDY | D(SLJIT_R1), DR(SLJIT_R1));
+#else
+#error "Implementation required"
+#endif
+ case SLJIT_DIVMOD_UW:
+ case SLJIT_DIVMOD_SW:
+ case SLJIT_DIV_UW:
+ case SLJIT_DIV_SW:
+ SLJIT_COMPILE_ASSERT((SLJIT_DIVMOD_UW & 0x2) == 0 && SLJIT_DIV_UW - 0x2 == SLJIT_DIVMOD_UW, bad_div_opcode_assignments);
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+ if ((op | 0x2) == SLJIT_DIV_UW)
+ FAIL_IF(push_inst(compiler, WRY | S1(0), MOVABLE_INS));
+ else {
+ FAIL_IF(push_inst(compiler, SRA | D(TMP_REG1) | S1(SLJIT_R0) | IMM(31), DR(TMP_REG1)));
+ FAIL_IF(push_inst(compiler, WRY | S1(TMP_REG1), MOVABLE_INS));
+ }
+ if (op <= SLJIT_DIVMOD_SW)
+ FAIL_IF(push_inst(compiler, OR | D(TMP_REG2) | S1(0) | S2(SLJIT_R0), DR(TMP_REG2)));
+ FAIL_IF(push_inst(compiler, ((op | 0x2) == SLJIT_DIV_UW ? UDIV : SDIV) | D(SLJIT_R0) | S1(SLJIT_R0) | S2(SLJIT_R1), DR(SLJIT_R0)));
+ if (op >= SLJIT_DIV_UW)
+ return SLJIT_SUCCESS;
+ FAIL_IF(push_inst(compiler, SMUL | D(SLJIT_R1) | S1(SLJIT_R0) | S2(SLJIT_R1), DR(SLJIT_R1)));
+ return push_inst(compiler, SUB | D(SLJIT_R1) | S1(TMP_REG2) | S2(SLJIT_R1), DR(SLJIT_R1));
+#else
+#error "Implementation required"
+#endif
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 flags = GET_FLAGS(op) ? SET_FLAGS : 0;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ op = GET_OPCODE(op);
+ switch (op) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_P:
+ return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOV_U32:
+ return emit_op(compiler, SLJIT_MOV_U32, flags | INT_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOV_S32:
+ return emit_op(compiler, SLJIT_MOV_S32, flags | INT_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOV_U8:
+ return emit_op(compiler, SLJIT_MOV_U8, flags | BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u8)srcw : srcw);
+
+ case SLJIT_MOV_S8:
+ return emit_op(compiler, SLJIT_MOV_S8, flags | BYTE_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s8)srcw : srcw);
+
+ case SLJIT_MOV_U16:
+ return emit_op(compiler, SLJIT_MOV_U16, flags | HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u16)srcw : srcw);
+
+ case SLJIT_MOV_S16:
+ return emit_op(compiler, SLJIT_MOV_S16, flags | HALF_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s16)srcw : srcw);
+
+ case SLJIT_MOVU:
+ case SLJIT_MOVU_P:
+ return emit_op(compiler, SLJIT_MOV, flags | WORD_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOVU_U32:
+ return emit_op(compiler, SLJIT_MOV_U32, flags | INT_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOVU_S32:
+ return emit_op(compiler, SLJIT_MOV_S32, flags | INT_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOVU_U8:
+ return emit_op(compiler, SLJIT_MOV_U8, flags | BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u8)srcw : srcw);
+
+ case SLJIT_MOVU_S8:
+ return emit_op(compiler, SLJIT_MOV_S8, flags | BYTE_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s8)srcw : srcw);
+
+ case SLJIT_MOVU_U16:
+ return emit_op(compiler, SLJIT_MOV_U16, flags | HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u16)srcw : srcw);
+
+ case SLJIT_MOVU_S16:
+ return emit_op(compiler, SLJIT_MOV_S16, flags | HALF_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s16)srcw : srcw);
+
+ case SLJIT_NOT:
+ case SLJIT_CLZ:
+ return emit_op(compiler, op, flags, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_NEG:
+ return emit_op(compiler, SLJIT_SUB, flags | IMM_OP, dst, dstw, SLJIT_IMM, 0, src, srcw);
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_s32 flags = GET_FLAGS(op) ? SET_FLAGS : 0;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+ op = GET_OPCODE(op);
+ switch (op) {
+ case SLJIT_ADD:
+ case SLJIT_ADDC:
+ case SLJIT_MUL:
+ case SLJIT_AND:
+ case SLJIT_OR:
+ case SLJIT_XOR:
+ return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_SUB:
+ case SLJIT_SUBC:
+ return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_SHL:
+ case SLJIT_LSHR:
+ case SLJIT_ASHR:
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+ if (src2 & SLJIT_IMM)
+ src2w &= 0x1f;
+#else
+ SLJIT_ASSERT_STOP();
+#endif
+ return emit_op(compiler, op, flags | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_register_index(sljit_s32 reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_register_index(reg));
+ return reg_map[reg];
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_float_register_index(reg));
+ return reg << 1;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler,
+ void *instruction, sljit_s32 size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_custom(compiler, instruction, size));
+
+ return push_inst(compiler, *(sljit_ins*)instruction, UNMOVABLE_INS);
+}
+
+/* --------------------------------------------------------------------- */
+/* Floating point operators */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_is_fpu_available(void)
+{
+#ifdef SLJIT_IS_FPU_AVAILABLE
+ return SLJIT_IS_FPU_AVAILABLE;
+#else
+ /* Available by default. */
+ return 1;
+#endif
+}
+
+#define FLOAT_DATA(op) (DOUBLE_DATA | ((op & SLJIT_F32_OP) >> 7))
+#define SELECT_FOP(op, single, double) ((op & SLJIT_F32_OP) ? single : double)
+#define FLOAT_TMP_MEM_OFFSET (22 * sizeof(sljit_sw))
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ if (src & SLJIT_MEM) {
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src, srcw, dst, dstw));
+ src = TMP_FREG1;
+ }
+ else
+ src <<= 1;
+
+ FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSTOI, FDTOI) | DA(TMP_FREG1) | S2A(src), MOVABLE_INS));
+
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ if (FAST_IS_REG(dst)) {
+ FAIL_IF(emit_op_mem2(compiler, SINGLE_DATA, TMP_FREG1, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET));
+ return emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, dst, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET);
+ }
+
+ /* Store the integer value from a VFP register. */
+ return emit_op_mem2(compiler, SINGLE_DATA, TMP_FREG1, dst, dstw, 0, 0);
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r = FAST_IS_REG(dst) ? (dst << 1) : TMP_FREG1;
+
+ if (src & SLJIT_IMM) {
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32)
+ srcw = (sljit_s32)srcw;
+#endif
+ FAIL_IF(load_immediate(compiler, TMP_REG1, srcw));
+ src = TMP_REG1;
+ srcw = 0;
+ }
+
+ if (FAST_IS_REG(src)) {
+ FAIL_IF(emit_op_mem2(compiler, WORD_DATA, src, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET, SLJIT_MEM1(SLJIT_SP), FLOAT_TMP_MEM_OFFSET));
+ src = SLJIT_MEM1(SLJIT_SP);
+ srcw = FLOAT_TMP_MEM_OFFSET;
+ }
+
+ FAIL_IF(emit_op_mem2(compiler, SINGLE_DATA | LOAD_DATA, TMP_FREG1, src, srcw, dst, dstw));
+ FAIL_IF(push_inst(compiler, SELECT_FOP(op, FITOS, FITOD) | DA(dst_r) | S2A(TMP_FREG1), MOVABLE_INS));
+
+ if (dst & SLJIT_MEM)
+ return emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG1, dst, dstw, 0, 0);
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ if (src1 & SLJIT_MEM) {
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w));
+ src1 = TMP_FREG1;
+ }
+ else
+ src1 <<= 1;
+
+ if (src2 & SLJIT_MEM) {
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, 0, 0));
+ src2 = TMP_FREG2;
+ }
+ else
+ src2 <<= 1;
+
+ return push_inst(compiler, SELECT_FOP(op, FCMPS, FCMPD) | S1A(src1) | S2A(src2), FCC_IS_SET | MOVABLE_INS);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r;
+
+ CHECK_ERROR();
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+
+ SLJIT_COMPILE_ASSERT((SLJIT_F32_OP == 0x100) && !(DOUBLE_DATA & 0x2), float_transfer_bit_error);
+ SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw);
+
+ if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32)
+ op ^= SLJIT_F32_OP;
+
+ dst_r = FAST_IS_REG(dst) ? (dst << 1) : TMP_FREG1;
+
+ if (src & SLJIT_MEM) {
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op) | LOAD_DATA, dst_r, src, srcw, dst, dstw));
+ src = dst_r;
+ }
+ else
+ src <<= 1;
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_MOV_F64:
+ if (src != dst_r) {
+ if (dst_r != TMP_FREG1) {
+ FAIL_IF(push_inst(compiler, FMOVS | DA(dst_r) | S2A(src), MOVABLE_INS));
+ if (!(op & SLJIT_F32_OP))
+ FAIL_IF(push_inst(compiler, FMOVS | DA(dst_r | 1) | S2A(src | 1), MOVABLE_INS));
+ }
+ else
+ dst_r = src;
+ }
+ break;
+ case SLJIT_NEG_F64:
+ FAIL_IF(push_inst(compiler, FNEGS | DA(dst_r) | S2A(src), MOVABLE_INS));
+ if (dst_r != src && !(op & SLJIT_F32_OP))
+ FAIL_IF(push_inst(compiler, FMOVS | DA(dst_r | 1) | S2A(src | 1), MOVABLE_INS));
+ break;
+ case SLJIT_ABS_F64:
+ FAIL_IF(push_inst(compiler, FABSS | DA(dst_r) | S2A(src), MOVABLE_INS));
+ if (dst_r != src && !(op & SLJIT_F32_OP))
+ FAIL_IF(push_inst(compiler, FMOVS | DA(dst_r | 1) | S2A(src | 1), MOVABLE_INS));
+ break;
+ case SLJIT_CONV_F64_FROM_F32:
+ FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSTOD, FDTOS) | DA(dst_r) | S2A(src), MOVABLE_INS));
+ op ^= SLJIT_F32_OP;
+ break;
+ }
+
+ if (dst & SLJIT_MEM)
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), dst_r, dst, dstw, 0, 0));
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_s32 dst_r, flags = 0;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+
+ dst_r = FAST_IS_REG(dst) ? (dst << 1) : TMP_FREG2;
+
+ if (src1 & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w)) {
+ FAIL_IF(compiler->error);
+ src1 = TMP_FREG1;
+ } else
+ flags |= SLOW_SRC1;
+ }
+ else
+ src1 <<= 1;
+
+ if (src2 & SLJIT_MEM) {
+ if (getput_arg_fast(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w)) {
+ FAIL_IF(compiler->error);
+ src2 = TMP_FREG2;
+ } else
+ flags |= SLOW_SRC2;
+ }
+ else
+ src2 <<= 1;
+
+ if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) {
+ if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, src1, src1w));
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw));
+ }
+ else {
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, src2, src2w));
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw));
+ }
+ }
+ else if (flags & SLOW_SRC1)
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG1, src1, src1w, dst, dstw));
+ else if (flags & SLOW_SRC2)
+ FAIL_IF(getput_arg(compiler, FLOAT_DATA(op) | LOAD_DATA, TMP_FREG2, src2, src2w, dst, dstw));
+
+ if (flags & SLOW_SRC1)
+ src1 = TMP_FREG1;
+ if (flags & SLOW_SRC2)
+ src2 = TMP_FREG2;
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_ADD_F64:
+ FAIL_IF(push_inst(compiler, SELECT_FOP(op, FADDS, FADDD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVABLE_INS));
+ break;
+
+ case SLJIT_SUB_F64:
+ FAIL_IF(push_inst(compiler, SELECT_FOP(op, FSUBS, FSUBD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVABLE_INS));
+ break;
+
+ case SLJIT_MUL_F64:
+ FAIL_IF(push_inst(compiler, SELECT_FOP(op, FMULS, FMULD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVABLE_INS));
+ break;
+
+ case SLJIT_DIV_F64:
+ FAIL_IF(push_inst(compiler, SELECT_FOP(op, FDIVS, FDIVD) | DA(dst_r) | S1A(src1) | S2A(src2), MOVABLE_INS));
+ break;
+ }
+
+ if (dst_r == TMP_FREG2)
+ FAIL_IF(emit_op_mem2(compiler, FLOAT_DATA(op), TMP_FREG2, dst, dstw, 0, 0));
+
+ return SLJIT_SUCCESS;
+}
+
+#undef FLOAT_DATA
+#undef SELECT_FOP
+
+/* --------------------------------------------------------------------- */
+/* Other instructions */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ /* For UNUSED dst. Uncommon, but possible. */
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ if (FAST_IS_REG(dst))
+ return push_inst(compiler, OR | D(dst) | S1(0) | S2(TMP_LINK), DR(dst));
+
+ /* Memory. */
+ return emit_op_mem(compiler, WORD_DATA, TMP_LINK, dst, dstw);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_return(compiler, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ if (FAST_IS_REG(src))
+ FAIL_IF(push_inst(compiler, OR | D(TMP_LINK) | S1(0) | S2(src), DR(TMP_LINK)));
+ else if (src & SLJIT_MEM)
+ FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, TMP_LINK, src, srcw));
+ else if (src & SLJIT_IMM)
+ FAIL_IF(load_immediate(compiler, TMP_LINK, srcw));
+
+ FAIL_IF(push_inst(compiler, JMPL | D(0) | S1(TMP_LINK) | IMM(8), UNMOVABLE_INS));
+ return push_inst(compiler, NOP, UNMOVABLE_INS);
+}
+
+/* --------------------------------------------------------------------- */
+/* Conditional instructions */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
+{
+ struct sljit_label *label;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_label(compiler));
+
+ if (compiler->last_label && compiler->last_label->size == compiler->size)
+ return compiler->last_label;
+
+ label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label));
+ PTR_FAIL_IF(!label);
+ set_label(label, compiler);
+ compiler->delay_slot = UNMOVABLE_INS;
+ return label;
+}
+
+static sljit_ins get_cc(sljit_s32 type)
+{
+ switch (type) {
+ case SLJIT_EQUAL:
+ case SLJIT_MUL_NOT_OVERFLOW:
+ case SLJIT_NOT_EQUAL_F64: /* Unordered. */
+ return DA(0x1);
+
+ case SLJIT_NOT_EQUAL:
+ case SLJIT_MUL_OVERFLOW:
+ case SLJIT_EQUAL_F64:
+ return DA(0x9);
+
+ case SLJIT_LESS:
+ case SLJIT_GREATER_F64: /* Unordered. */
+ return DA(0x5);
+
+ case SLJIT_GREATER_EQUAL:
+ case SLJIT_LESS_EQUAL_F64:
+ return DA(0xd);
+
+ case SLJIT_GREATER:
+ case SLJIT_GREATER_EQUAL_F64: /* Unordered. */
+ return DA(0xc);
+
+ case SLJIT_LESS_EQUAL:
+ case SLJIT_LESS_F64:
+ return DA(0x4);
+
+ case SLJIT_SIG_LESS:
+ return DA(0x3);
+
+ case SLJIT_SIG_GREATER_EQUAL:
+ return DA(0xb);
+
+ case SLJIT_SIG_GREATER:
+ return DA(0xa);
+
+ case SLJIT_SIG_LESS_EQUAL:
+ return DA(0x2);
+
+ case SLJIT_OVERFLOW:
+ case SLJIT_UNORDERED_F64:
+ return DA(0x7);
+
+ case SLJIT_NOT_OVERFLOW:
+ case SLJIT_ORDERED_F64:
+ return DA(0xf);
+
+ default:
+ SLJIT_ASSERT_STOP();
+ return DA(0x8);
+ }
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_s32 type)
+{
+ struct sljit_jump *jump;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_jump(compiler, type));
+
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ PTR_FAIL_IF(!jump);
+ set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
+ type &= 0xff;
+
+ if (type < SLJIT_EQUAL_F64) {
+ jump->flags |= IS_COND;
+ if (((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) && !(compiler->delay_slot & ICC_IS_SET))
+ jump->flags |= IS_MOVABLE;
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+ PTR_FAIL_IF(push_inst(compiler, BICC | get_cc(type ^ 1) | 5, UNMOVABLE_INS));
+#else
+#error "Implementation required"
+#endif
+ }
+ else if (type < SLJIT_JUMP) {
+ jump->flags |= IS_COND;
+ if (((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS) && !(compiler->delay_slot & FCC_IS_SET))
+ jump->flags |= IS_MOVABLE;
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+ PTR_FAIL_IF(push_inst(compiler, FBFCC | get_cc(type ^ 1) | 5, UNMOVABLE_INS));
+#else
+#error "Implementation required"
+#endif
+ } else {
+ if ((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS)
+ jump->flags |= IS_MOVABLE;
+ if (type >= SLJIT_FAST_CALL)
+ jump->flags |= IS_CALL;
+ }
+
+ PTR_FAIL_IF(emit_const(compiler, TMP_REG2, 0));
+ PTR_FAIL_IF(push_inst(compiler, JMPL | D(type >= SLJIT_FAST_CALL ? TMP_LINK : 0) | S1(TMP_REG2) | IMM(0), UNMOVABLE_INS));
+ jump->addr = compiler->size;
+ PTR_FAIL_IF(push_inst(compiler, NOP, UNMOVABLE_INS));
+
+ return jump;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 src, sljit_sw srcw)
+{
+ struct sljit_jump *jump = NULL;
+ sljit_s32 src_r;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_ijump(compiler, type, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ if (FAST_IS_REG(src))
+ src_r = src;
+ else if (src & SLJIT_IMM) {
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ FAIL_IF(!jump);
+ set_jump(jump, compiler, JUMP_ADDR);
+ jump->u.target = srcw;
+ if ((compiler->delay_slot & DST_INS_MASK) != UNMOVABLE_INS)
+ jump->flags |= IS_MOVABLE;
+ if (type >= SLJIT_FAST_CALL)
+ jump->flags |= IS_CALL;
+
+ FAIL_IF(emit_const(compiler, TMP_REG2, 0));
+ src_r = TMP_REG2;
+ }
+ else {
+ FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, TMP_REG2, src, srcw));
+ src_r = TMP_REG2;
+ }
+
+ FAIL_IF(push_inst(compiler, JMPL | D(type >= SLJIT_FAST_CALL ? TMP_LINK : 0) | S1(src_r) | IMM(0), UNMOVABLE_INS));
+ if (jump)
+ jump->addr = compiler->size;
+ return push_inst(compiler, NOP, UNMOVABLE_INS);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw,
+ sljit_s32 type)
+{
+ sljit_s32 reg, flags = (GET_FLAGS(op) ? SET_FLAGS : 0);
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
+ op = GET_OPCODE(op);
+ reg = (op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2;
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ if (op >= SLJIT_ADD && (src & SLJIT_MEM)) {
+ ADJUST_LOCAL_OFFSET(src, srcw);
+ FAIL_IF(emit_op_mem2(compiler, WORD_DATA | LOAD_DATA, TMP_REG1, src, srcw, dst, dstw));
+ src = TMP_REG1;
+ srcw = 0;
+ }
+
+ type &= 0xff;
+ if (type < SLJIT_EQUAL_F64)
+ FAIL_IF(push_inst(compiler, BICC | get_cc(type) | 3, UNMOVABLE_INS));
+ else
+ FAIL_IF(push_inst(compiler, FBFCC | get_cc(type) | 3, UNMOVABLE_INS));
+
+ FAIL_IF(push_inst(compiler, OR | D(reg) | S1(0) | IMM(1), UNMOVABLE_INS));
+ FAIL_IF(push_inst(compiler, OR | D(reg) | S1(0) | IMM(0), UNMOVABLE_INS));
+
+ if (op >= SLJIT_ADD)
+ return emit_op(compiler, op, flags | CUMULATIVE_OP | IMM_OP | ALT_KEEP_CACHE, dst, dstw, src, srcw, TMP_REG2, 0);
+
+ return (reg == TMP_REG2) ? emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw) : SLJIT_SUCCESS;
+#else
+#error "Implementation required"
+#endif
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value)
+{
+ sljit_s32 reg;
+ struct sljit_const *const_;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const));
+ PTR_FAIL_IF(!const_);
+ set_const(const_, compiler);
+
+ reg = SLOW_IS_REG(dst) ? dst : TMP_REG2;
+
+ PTR_FAIL_IF(emit_const(compiler, reg, init_value));
+
+ if (dst & SLJIT_MEM)
+ PTR_FAIL_IF(emit_op_mem(compiler, WORD_DATA, TMP_REG2, dst, dstw));
+ return const_;
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeTILEGX-encoder.c b/thirdparty/pcre2/src/sljit/sljitNativeTILEGX-encoder.c
new file mode 100644
index 0000000000..719632908c
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativeTILEGX-encoder.c
@@ -0,0 +1,10159 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2013-2013 Tilera Corporation(jiwang@tilera.com). All rights reserved.
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* This code is owned by Tilera Corporation, and distributed as part
+ of multiple projects. In sljit, the code is under BSD licence. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#define BFD_RELOC(x) R_##x
+
+/* Special registers. */
+#define TREG_LR 55
+#define TREG_SN 56
+#define TREG_ZERO 63
+
+/* Canonical name of each register. */
+const char *const tilegx_register_names[] =
+{
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+ "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
+ "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31",
+ "r32", "r33", "r34", "r35", "r36", "r37", "r38", "r39",
+ "r40", "r41", "r42", "r43", "r44", "r45", "r46", "r47",
+ "r48", "r49", "r50", "r51", "r52", "tp", "sp", "lr",
+ "sn", "idn0", "idn1", "udn0", "udn1", "udn2", "udn3", "zero"
+};
+
+enum
+{
+ R_NONE = 0,
+ R_TILEGX_NONE = 0,
+ R_TILEGX_64 = 1,
+ R_TILEGX_32 = 2,
+ R_TILEGX_16 = 3,
+ R_TILEGX_8 = 4,
+ R_TILEGX_64_PCREL = 5,
+ R_TILEGX_32_PCREL = 6,
+ R_TILEGX_16_PCREL = 7,
+ R_TILEGX_8_PCREL = 8,
+ R_TILEGX_HW0 = 9,
+ R_TILEGX_HW1 = 10,
+ R_TILEGX_HW2 = 11,
+ R_TILEGX_HW3 = 12,
+ R_TILEGX_HW0_LAST = 13,
+ R_TILEGX_HW1_LAST = 14,
+ R_TILEGX_HW2_LAST = 15,
+ R_TILEGX_COPY = 16,
+ R_TILEGX_GLOB_DAT = 17,
+ R_TILEGX_JMP_SLOT = 18,
+ R_TILEGX_RELATIVE = 19,
+ R_TILEGX_BROFF_X1 = 20,
+ R_TILEGX_JUMPOFF_X1 = 21,
+ R_TILEGX_JUMPOFF_X1_PLT = 22,
+ R_TILEGX_IMM8_X0 = 23,
+ R_TILEGX_IMM8_Y0 = 24,
+ R_TILEGX_IMM8_X1 = 25,
+ R_TILEGX_IMM8_Y1 = 26,
+ R_TILEGX_DEST_IMM8_X1 = 27,
+ R_TILEGX_MT_IMM14_X1 = 28,
+ R_TILEGX_MF_IMM14_X1 = 29,
+ R_TILEGX_MMSTART_X0 = 30,
+ R_TILEGX_MMEND_X0 = 31,
+ R_TILEGX_SHAMT_X0 = 32,
+ R_TILEGX_SHAMT_X1 = 33,
+ R_TILEGX_SHAMT_Y0 = 34,
+ R_TILEGX_SHAMT_Y1 = 35,
+ R_TILEGX_IMM16_X0_HW0 = 36,
+ R_TILEGX_IMM16_X1_HW0 = 37,
+ R_TILEGX_IMM16_X0_HW1 = 38,
+ R_TILEGX_IMM16_X1_HW1 = 39,
+ R_TILEGX_IMM16_X0_HW2 = 40,
+ R_TILEGX_IMM16_X1_HW2 = 41,
+ R_TILEGX_IMM16_X0_HW3 = 42,
+ R_TILEGX_IMM16_X1_HW3 = 43,
+ R_TILEGX_IMM16_X0_HW0_LAST = 44,
+ R_TILEGX_IMM16_X1_HW0_LAST = 45,
+ R_TILEGX_IMM16_X0_HW1_LAST = 46,
+ R_TILEGX_IMM16_X1_HW1_LAST = 47,
+ R_TILEGX_IMM16_X0_HW2_LAST = 48,
+ R_TILEGX_IMM16_X1_HW2_LAST = 49,
+ R_TILEGX_IMM16_X0_HW0_PCREL = 50,
+ R_TILEGX_IMM16_X1_HW0_PCREL = 51,
+ R_TILEGX_IMM16_X0_HW1_PCREL = 52,
+ R_TILEGX_IMM16_X1_HW1_PCREL = 53,
+ R_TILEGX_IMM16_X0_HW2_PCREL = 54,
+ R_TILEGX_IMM16_X1_HW2_PCREL = 55,
+ R_TILEGX_IMM16_X0_HW3_PCREL = 56,
+ R_TILEGX_IMM16_X1_HW3_PCREL = 57,
+ R_TILEGX_IMM16_X0_HW0_LAST_PCREL = 58,
+ R_TILEGX_IMM16_X1_HW0_LAST_PCREL = 59,
+ R_TILEGX_IMM16_X0_HW1_LAST_PCREL = 60,
+ R_TILEGX_IMM16_X1_HW1_LAST_PCREL = 61,
+ R_TILEGX_IMM16_X0_HW2_LAST_PCREL = 62,
+ R_TILEGX_IMM16_X1_HW2_LAST_PCREL = 63,
+ R_TILEGX_IMM16_X0_HW0_GOT = 64,
+ R_TILEGX_IMM16_X1_HW0_GOT = 65,
+
+ R_TILEGX_IMM16_X0_HW0_PLT_PCREL = 66,
+ R_TILEGX_IMM16_X1_HW0_PLT_PCREL = 67,
+ R_TILEGX_IMM16_X0_HW1_PLT_PCREL = 68,
+ R_TILEGX_IMM16_X1_HW1_PLT_PCREL = 69,
+ R_TILEGX_IMM16_X0_HW2_PLT_PCREL = 70,
+ R_TILEGX_IMM16_X1_HW2_PLT_PCREL = 71,
+
+ R_TILEGX_IMM16_X0_HW0_LAST_GOT = 72,
+ R_TILEGX_IMM16_X1_HW0_LAST_GOT = 73,
+ R_TILEGX_IMM16_X0_HW1_LAST_GOT = 74,
+ R_TILEGX_IMM16_X1_HW1_LAST_GOT = 75,
+ R_TILEGX_IMM16_X0_HW0_TLS_GD = 78,
+ R_TILEGX_IMM16_X1_HW0_TLS_GD = 79,
+ R_TILEGX_IMM16_X0_HW0_TLS_LE = 80,
+ R_TILEGX_IMM16_X1_HW0_TLS_LE = 81,
+ R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE = 82,
+ R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE = 83,
+ R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE = 84,
+ R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE = 85,
+ R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD = 86,
+ R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD = 87,
+ R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD = 88,
+ R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD = 89,
+ R_TILEGX_IMM16_X0_HW0_TLS_IE = 92,
+ R_TILEGX_IMM16_X1_HW0_TLS_IE = 93,
+
+ R_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL = 94,
+ R_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL = 95,
+ R_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL = 96,
+ R_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL = 97,
+ R_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL = 98,
+ R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL = 99,
+
+ R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE = 100,
+ R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE = 101,
+ R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE = 102,
+ R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE = 103,
+ R_TILEGX_TLS_DTPMOD64 = 106,
+ R_TILEGX_TLS_DTPOFF64 = 107,
+ R_TILEGX_TLS_TPOFF64 = 108,
+ R_TILEGX_TLS_DTPMOD32 = 109,
+ R_TILEGX_TLS_DTPOFF32 = 110,
+ R_TILEGX_TLS_TPOFF32 = 111,
+ R_TILEGX_TLS_GD_CALL = 112,
+ R_TILEGX_IMM8_X0_TLS_GD_ADD = 113,
+ R_TILEGX_IMM8_X1_TLS_GD_ADD = 114,
+ R_TILEGX_IMM8_Y0_TLS_GD_ADD = 115,
+ R_TILEGX_IMM8_Y1_TLS_GD_ADD = 116,
+ R_TILEGX_TLS_IE_LOAD = 117,
+ R_TILEGX_IMM8_X0_TLS_ADD = 118,
+ R_TILEGX_IMM8_X1_TLS_ADD = 119,
+ R_TILEGX_IMM8_Y0_TLS_ADD = 120,
+ R_TILEGX_IMM8_Y1_TLS_ADD = 121,
+ R_TILEGX_GNU_VTINHERIT = 128,
+ R_TILEGX_GNU_VTENTRY = 129,
+ R_TILEGX_IRELATIVE = 130,
+ R_TILEGX_NUM = 131
+};
+
+typedef enum
+{
+ TILEGX_PIPELINE_X0,
+ TILEGX_PIPELINE_X1,
+ TILEGX_PIPELINE_Y0,
+ TILEGX_PIPELINE_Y1,
+ TILEGX_PIPELINE_Y2,
+} tilegx_pipeline;
+
+typedef unsigned long long tilegx_bundle_bits;
+
+/* These are the bits that determine if a bundle is in the X encoding. */
+#define TILEGX_BUNDLE_MODE_MASK ((tilegx_bundle_bits)3 << 62)
+
+enum
+{
+ /* Maximum number of instructions in a bundle (2 for X, 3 for Y). */
+ TILEGX_MAX_INSTRUCTIONS_PER_BUNDLE = 3,
+
+ /* How many different pipeline encodings are there? X0, X1, Y0, Y1, Y2. */
+ TILEGX_NUM_PIPELINE_ENCODINGS = 5,
+
+ /* Log base 2 of TILEGX_BUNDLE_SIZE_IN_BYTES. */
+ TILEGX_LOG2_BUNDLE_SIZE_IN_BYTES = 3,
+
+ /* Instructions take this many bytes. */
+ TILEGX_BUNDLE_SIZE_IN_BYTES = 1 << TILEGX_LOG2_BUNDLE_SIZE_IN_BYTES,
+
+ /* Log base 2 of TILEGX_BUNDLE_ALIGNMENT_IN_BYTES. */
+ TILEGX_LOG2_BUNDLE_ALIGNMENT_IN_BYTES = 3,
+
+ /* Bundles should be aligned modulo this number of bytes. */
+ TILEGX_BUNDLE_ALIGNMENT_IN_BYTES =
+ (1 << TILEGX_LOG2_BUNDLE_ALIGNMENT_IN_BYTES),
+
+ /* Number of registers (some are magic, such as network I/O). */
+ TILEGX_NUM_REGISTERS = 64,
+};
+
+/* Make a few "tile_" variables to simplify common code between
+ architectures. */
+
+typedef tilegx_bundle_bits tile_bundle_bits;
+#define TILE_BUNDLE_SIZE_IN_BYTES TILEGX_BUNDLE_SIZE_IN_BYTES
+#define TILE_BUNDLE_ALIGNMENT_IN_BYTES TILEGX_BUNDLE_ALIGNMENT_IN_BYTES
+#define TILE_LOG2_BUNDLE_ALIGNMENT_IN_BYTES \
+ TILEGX_LOG2_BUNDLE_ALIGNMENT_IN_BYTES
+
+/* 64-bit pattern for a { bpt ; nop } bundle. */
+#define TILEGX_BPT_BUNDLE 0x286a44ae51485000ULL
+
+typedef enum
+{
+ TILEGX_OP_TYPE_REGISTER,
+ TILEGX_OP_TYPE_IMMEDIATE,
+ TILEGX_OP_TYPE_ADDRESS,
+ TILEGX_OP_TYPE_SPR
+} tilegx_operand_type;
+
+struct tilegx_operand
+{
+ /* Is this operand a register, immediate or address? */
+ tilegx_operand_type type;
+
+ /* The default relocation type for this operand. */
+ signed int default_reloc : 16;
+
+ /* How many bits is this value? (used for range checking) */
+ unsigned int num_bits : 5;
+
+ /* Is the value signed? (used for range checking) */
+ unsigned int is_signed : 1;
+
+ /* Is this operand a source register? */
+ unsigned int is_src_reg : 1;
+
+ /* Is this operand written? (i.e. is it a destination register) */
+ unsigned int is_dest_reg : 1;
+
+ /* Is this operand PC-relative? */
+ unsigned int is_pc_relative : 1;
+
+ /* By how many bits do we right shift the value before inserting? */
+ unsigned int rightshift : 2;
+
+ /* Return the bits for this operand to be ORed into an existing bundle. */
+ tilegx_bundle_bits (*insert) (int op);
+
+ /* Extract this operand and return it. */
+ unsigned int (*extract) (tilegx_bundle_bits bundle);
+};
+
+typedef enum
+{
+ TILEGX_OPC_BPT,
+ TILEGX_OPC_INFO,
+ TILEGX_OPC_INFOL,
+ TILEGX_OPC_LD4S_TLS,
+ TILEGX_OPC_LD_TLS,
+ TILEGX_OPC_MOVE,
+ TILEGX_OPC_MOVEI,
+ TILEGX_OPC_MOVELI,
+ TILEGX_OPC_PREFETCH,
+ TILEGX_OPC_PREFETCH_ADD_L1,
+ TILEGX_OPC_PREFETCH_ADD_L1_FAULT,
+ TILEGX_OPC_PREFETCH_ADD_L2,
+ TILEGX_OPC_PREFETCH_ADD_L2_FAULT,
+ TILEGX_OPC_PREFETCH_ADD_L3,
+ TILEGX_OPC_PREFETCH_ADD_L3_FAULT,
+ TILEGX_OPC_PREFETCH_L1,
+ TILEGX_OPC_PREFETCH_L1_FAULT,
+ TILEGX_OPC_PREFETCH_L2,
+ TILEGX_OPC_PREFETCH_L2_FAULT,
+ TILEGX_OPC_PREFETCH_L3,
+ TILEGX_OPC_PREFETCH_L3_FAULT,
+ TILEGX_OPC_RAISE,
+ TILEGX_OPC_ADD,
+ TILEGX_OPC_ADDI,
+ TILEGX_OPC_ADDLI,
+ TILEGX_OPC_ADDX,
+ TILEGX_OPC_ADDXI,
+ TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXSC,
+ TILEGX_OPC_AND,
+ TILEGX_OPC_ANDI,
+ TILEGX_OPC_BEQZ,
+ TILEGX_OPC_BEQZT,
+ TILEGX_OPC_BFEXTS,
+ TILEGX_OPC_BFEXTU,
+ TILEGX_OPC_BFINS,
+ TILEGX_OPC_BGEZ,
+ TILEGX_OPC_BGEZT,
+ TILEGX_OPC_BGTZ,
+ TILEGX_OPC_BGTZT,
+ TILEGX_OPC_BLBC,
+ TILEGX_OPC_BLBCT,
+ TILEGX_OPC_BLBS,
+ TILEGX_OPC_BLBST,
+ TILEGX_OPC_BLEZ,
+ TILEGX_OPC_BLEZT,
+ TILEGX_OPC_BLTZ,
+ TILEGX_OPC_BLTZT,
+ TILEGX_OPC_BNEZ,
+ TILEGX_OPC_BNEZT,
+ TILEGX_OPC_CLZ,
+ TILEGX_OPC_CMOVEQZ,
+ TILEGX_OPC_CMOVNEZ,
+ TILEGX_OPC_CMPEQ,
+ TILEGX_OPC_CMPEQI,
+ TILEGX_OPC_CMPEXCH,
+ TILEGX_OPC_CMPEXCH4,
+ TILEGX_OPC_CMPLES,
+ TILEGX_OPC_CMPLEU,
+ TILEGX_OPC_CMPLTS,
+ TILEGX_OPC_CMPLTSI,
+ TILEGX_OPC_CMPLTU,
+ TILEGX_OPC_CMPLTUI,
+ TILEGX_OPC_CMPNE,
+ TILEGX_OPC_CMUL,
+ TILEGX_OPC_CMULA,
+ TILEGX_OPC_CMULAF,
+ TILEGX_OPC_CMULF,
+ TILEGX_OPC_CMULFR,
+ TILEGX_OPC_CMULH,
+ TILEGX_OPC_CMULHR,
+ TILEGX_OPC_CRC32_32,
+ TILEGX_OPC_CRC32_8,
+ TILEGX_OPC_CTZ,
+ TILEGX_OPC_DBLALIGN,
+ TILEGX_OPC_DBLALIGN2,
+ TILEGX_OPC_DBLALIGN4,
+ TILEGX_OPC_DBLALIGN6,
+ TILEGX_OPC_DRAIN,
+ TILEGX_OPC_DTLBPR,
+ TILEGX_OPC_EXCH,
+ TILEGX_OPC_EXCH4,
+ TILEGX_OPC_FDOUBLE_ADD_FLAGS,
+ TILEGX_OPC_FDOUBLE_ADDSUB,
+ TILEGX_OPC_FDOUBLE_MUL_FLAGS,
+ TILEGX_OPC_FDOUBLE_PACK1,
+ TILEGX_OPC_FDOUBLE_PACK2,
+ TILEGX_OPC_FDOUBLE_SUB_FLAGS,
+ TILEGX_OPC_FDOUBLE_UNPACK_MAX,
+ TILEGX_OPC_FDOUBLE_UNPACK_MIN,
+ TILEGX_OPC_FETCHADD,
+ TILEGX_OPC_FETCHADD4,
+ TILEGX_OPC_FETCHADDGEZ,
+ TILEGX_OPC_FETCHADDGEZ4,
+ TILEGX_OPC_FETCHAND,
+ TILEGX_OPC_FETCHAND4,
+ TILEGX_OPC_FETCHOR,
+ TILEGX_OPC_FETCHOR4,
+ TILEGX_OPC_FINV,
+ TILEGX_OPC_FLUSH,
+ TILEGX_OPC_FLUSHWB,
+ TILEGX_OPC_FNOP,
+ TILEGX_OPC_FSINGLE_ADD1,
+ TILEGX_OPC_FSINGLE_ADDSUB2,
+ TILEGX_OPC_FSINGLE_MUL1,
+ TILEGX_OPC_FSINGLE_MUL2,
+ TILEGX_OPC_FSINGLE_PACK1,
+ TILEGX_OPC_FSINGLE_PACK2,
+ TILEGX_OPC_FSINGLE_SUB1,
+ TILEGX_OPC_ICOH,
+ TILEGX_OPC_ILL,
+ TILEGX_OPC_INV,
+ TILEGX_OPC_IRET,
+ TILEGX_OPC_J,
+ TILEGX_OPC_JAL,
+ TILEGX_OPC_JALR,
+ TILEGX_OPC_JALRP,
+ TILEGX_OPC_JR,
+ TILEGX_OPC_JRP,
+ TILEGX_OPC_LD,
+ TILEGX_OPC_LD1S,
+ TILEGX_OPC_LD1S_ADD,
+ TILEGX_OPC_LD1U,
+ TILEGX_OPC_LD1U_ADD,
+ TILEGX_OPC_LD2S,
+ TILEGX_OPC_LD2S_ADD,
+ TILEGX_OPC_LD2U,
+ TILEGX_OPC_LD2U_ADD,
+ TILEGX_OPC_LD4S,
+ TILEGX_OPC_LD4S_ADD,
+ TILEGX_OPC_LD4U,
+ TILEGX_OPC_LD4U_ADD,
+ TILEGX_OPC_LD_ADD,
+ TILEGX_OPC_LDNA,
+ TILEGX_OPC_LDNA_ADD,
+ TILEGX_OPC_LDNT,
+ TILEGX_OPC_LDNT1S,
+ TILEGX_OPC_LDNT1S_ADD,
+ TILEGX_OPC_LDNT1U,
+ TILEGX_OPC_LDNT1U_ADD,
+ TILEGX_OPC_LDNT2S,
+ TILEGX_OPC_LDNT2S_ADD,
+ TILEGX_OPC_LDNT2U,
+ TILEGX_OPC_LDNT2U_ADD,
+ TILEGX_OPC_LDNT4S,
+ TILEGX_OPC_LDNT4S_ADD,
+ TILEGX_OPC_LDNT4U,
+ TILEGX_OPC_LDNT4U_ADD,
+ TILEGX_OPC_LDNT_ADD,
+ TILEGX_OPC_LNK,
+ TILEGX_OPC_MF,
+ TILEGX_OPC_MFSPR,
+ TILEGX_OPC_MM,
+ TILEGX_OPC_MNZ,
+ TILEGX_OPC_MTSPR,
+ TILEGX_OPC_MUL_HS_HS,
+ TILEGX_OPC_MUL_HS_HU,
+ TILEGX_OPC_MUL_HS_LS,
+ TILEGX_OPC_MUL_HS_LU,
+ TILEGX_OPC_MUL_HU_HU,
+ TILEGX_OPC_MUL_HU_LS,
+ TILEGX_OPC_MUL_HU_LU,
+ TILEGX_OPC_MUL_LS_LS,
+ TILEGX_OPC_MUL_LS_LU,
+ TILEGX_OPC_MUL_LU_LU,
+ TILEGX_OPC_MULA_HS_HS,
+ TILEGX_OPC_MULA_HS_HU,
+ TILEGX_OPC_MULA_HS_LS,
+ TILEGX_OPC_MULA_HS_LU,
+ TILEGX_OPC_MULA_HU_HU,
+ TILEGX_OPC_MULA_HU_LS,
+ TILEGX_OPC_MULA_HU_LU,
+ TILEGX_OPC_MULA_LS_LS,
+ TILEGX_OPC_MULA_LS_LU,
+ TILEGX_OPC_MULA_LU_LU,
+ TILEGX_OPC_MULAX,
+ TILEGX_OPC_MULX,
+ TILEGX_OPC_MZ,
+ TILEGX_OPC_NAP,
+ TILEGX_OPC_NOP,
+ TILEGX_OPC_NOR,
+ TILEGX_OPC_OR,
+ TILEGX_OPC_ORI,
+ TILEGX_OPC_PCNT,
+ TILEGX_OPC_REVBITS,
+ TILEGX_OPC_REVBYTES,
+ TILEGX_OPC_ROTL,
+ TILEGX_OPC_ROTLI,
+ TILEGX_OPC_SHL,
+ TILEGX_OPC_SHL16INSLI,
+ TILEGX_OPC_SHL1ADD,
+ TILEGX_OPC_SHL1ADDX,
+ TILEGX_OPC_SHL2ADD,
+ TILEGX_OPC_SHL2ADDX,
+ TILEGX_OPC_SHL3ADD,
+ TILEGX_OPC_SHL3ADDX,
+ TILEGX_OPC_SHLI,
+ TILEGX_OPC_SHLX,
+ TILEGX_OPC_SHLXI,
+ TILEGX_OPC_SHRS,
+ TILEGX_OPC_SHRSI,
+ TILEGX_OPC_SHRU,
+ TILEGX_OPC_SHRUI,
+ TILEGX_OPC_SHRUX,
+ TILEGX_OPC_SHRUXI,
+ TILEGX_OPC_SHUFFLEBYTES,
+ TILEGX_OPC_ST,
+ TILEGX_OPC_ST1,
+ TILEGX_OPC_ST1_ADD,
+ TILEGX_OPC_ST2,
+ TILEGX_OPC_ST2_ADD,
+ TILEGX_OPC_ST4,
+ TILEGX_OPC_ST4_ADD,
+ TILEGX_OPC_ST_ADD,
+ TILEGX_OPC_STNT,
+ TILEGX_OPC_STNT1,
+ TILEGX_OPC_STNT1_ADD,
+ TILEGX_OPC_STNT2,
+ TILEGX_OPC_STNT2_ADD,
+ TILEGX_OPC_STNT4,
+ TILEGX_OPC_STNT4_ADD,
+ TILEGX_OPC_STNT_ADD,
+ TILEGX_OPC_SUB,
+ TILEGX_OPC_SUBX,
+ TILEGX_OPC_SUBXSC,
+ TILEGX_OPC_SWINT0,
+ TILEGX_OPC_SWINT1,
+ TILEGX_OPC_SWINT2,
+ TILEGX_OPC_SWINT3,
+ TILEGX_OPC_TBLIDXB0,
+ TILEGX_OPC_TBLIDXB1,
+ TILEGX_OPC_TBLIDXB2,
+ TILEGX_OPC_TBLIDXB3,
+ TILEGX_OPC_V1ADD,
+ TILEGX_OPC_V1ADDI,
+ TILEGX_OPC_V1ADDUC,
+ TILEGX_OPC_V1ADIFFU,
+ TILEGX_OPC_V1AVGU,
+ TILEGX_OPC_V1CMPEQ,
+ TILEGX_OPC_V1CMPEQI,
+ TILEGX_OPC_V1CMPLES,
+ TILEGX_OPC_V1CMPLEU,
+ TILEGX_OPC_V1CMPLTS,
+ TILEGX_OPC_V1CMPLTSI,
+ TILEGX_OPC_V1CMPLTU,
+ TILEGX_OPC_V1CMPLTUI,
+ TILEGX_OPC_V1CMPNE,
+ TILEGX_OPC_V1DDOTPU,
+ TILEGX_OPC_V1DDOTPUA,
+ TILEGX_OPC_V1DDOTPUS,
+ TILEGX_OPC_V1DDOTPUSA,
+ TILEGX_OPC_V1DOTP,
+ TILEGX_OPC_V1DOTPA,
+ TILEGX_OPC_V1DOTPU,
+ TILEGX_OPC_V1DOTPUA,
+ TILEGX_OPC_V1DOTPUS,
+ TILEGX_OPC_V1DOTPUSA,
+ TILEGX_OPC_V1INT_H,
+ TILEGX_OPC_V1INT_L,
+ TILEGX_OPC_V1MAXU,
+ TILEGX_OPC_V1MAXUI,
+ TILEGX_OPC_V1MINU,
+ TILEGX_OPC_V1MINUI,
+ TILEGX_OPC_V1MNZ,
+ TILEGX_OPC_V1MULTU,
+ TILEGX_OPC_V1MULU,
+ TILEGX_OPC_V1MULUS,
+ TILEGX_OPC_V1MZ,
+ TILEGX_OPC_V1SADAU,
+ TILEGX_OPC_V1SADU,
+ TILEGX_OPC_V1SHL,
+ TILEGX_OPC_V1SHLI,
+ TILEGX_OPC_V1SHRS,
+ TILEGX_OPC_V1SHRSI,
+ TILEGX_OPC_V1SHRU,
+ TILEGX_OPC_V1SHRUI,
+ TILEGX_OPC_V1SUB,
+ TILEGX_OPC_V1SUBUC,
+ TILEGX_OPC_V2ADD,
+ TILEGX_OPC_V2ADDI,
+ TILEGX_OPC_V2ADDSC,
+ TILEGX_OPC_V2ADIFFS,
+ TILEGX_OPC_V2AVGS,
+ TILEGX_OPC_V2CMPEQ,
+ TILEGX_OPC_V2CMPEQI,
+ TILEGX_OPC_V2CMPLES,
+ TILEGX_OPC_V2CMPLEU,
+ TILEGX_OPC_V2CMPLTS,
+ TILEGX_OPC_V2CMPLTSI,
+ TILEGX_OPC_V2CMPLTU,
+ TILEGX_OPC_V2CMPLTUI,
+ TILEGX_OPC_V2CMPNE,
+ TILEGX_OPC_V2DOTP,
+ TILEGX_OPC_V2DOTPA,
+ TILEGX_OPC_V2INT_H,
+ TILEGX_OPC_V2INT_L,
+ TILEGX_OPC_V2MAXS,
+ TILEGX_OPC_V2MAXSI,
+ TILEGX_OPC_V2MINS,
+ TILEGX_OPC_V2MINSI,
+ TILEGX_OPC_V2MNZ,
+ TILEGX_OPC_V2MULFSC,
+ TILEGX_OPC_V2MULS,
+ TILEGX_OPC_V2MULTS,
+ TILEGX_OPC_V2MZ,
+ TILEGX_OPC_V2PACKH,
+ TILEGX_OPC_V2PACKL,
+ TILEGX_OPC_V2PACKUC,
+ TILEGX_OPC_V2SADAS,
+ TILEGX_OPC_V2SADAU,
+ TILEGX_OPC_V2SADS,
+ TILEGX_OPC_V2SADU,
+ TILEGX_OPC_V2SHL,
+ TILEGX_OPC_V2SHLI,
+ TILEGX_OPC_V2SHLSC,
+ TILEGX_OPC_V2SHRS,
+ TILEGX_OPC_V2SHRSI,
+ TILEGX_OPC_V2SHRU,
+ TILEGX_OPC_V2SHRUI,
+ TILEGX_OPC_V2SUB,
+ TILEGX_OPC_V2SUBSC,
+ TILEGX_OPC_V4ADD,
+ TILEGX_OPC_V4ADDSC,
+ TILEGX_OPC_V4INT_H,
+ TILEGX_OPC_V4INT_L,
+ TILEGX_OPC_V4PACKSC,
+ TILEGX_OPC_V4SHL,
+ TILEGX_OPC_V4SHLSC,
+ TILEGX_OPC_V4SHRS,
+ TILEGX_OPC_V4SHRU,
+ TILEGX_OPC_V4SUB,
+ TILEGX_OPC_V4SUBSC,
+ TILEGX_OPC_WH64,
+ TILEGX_OPC_XOR,
+ TILEGX_OPC_XORI,
+ TILEGX_OPC_NONE
+} tilegx_mnemonic;
+
+enum
+{
+ TILEGX_MAX_OPERANDS = 4 /* bfexts */
+};
+
+struct tilegx_opcode
+{
+ /* The opcode mnemonic, e.g. "add" */
+ const char *name;
+
+ /* The enum value for this mnemonic. */
+ tilegx_mnemonic mnemonic;
+
+ /* A bit mask of which of the five pipes this instruction
+ is compatible with:
+ X0 0x01
+ X1 0x02
+ Y0 0x04
+ Y1 0x08
+ Y2 0x10 */
+ unsigned char pipes;
+
+ /* How many operands are there? */
+ unsigned char num_operands;
+
+ /* Which register does this write implicitly, or TREG_ZERO if none? */
+ unsigned char implicitly_written_register;
+
+ /* Can this be bundled with other instructions (almost always true). */
+ unsigned char can_bundle;
+
+ /* The description of the operands. Each of these is an
+ * index into the tilegx_operands[] table. */
+ unsigned char operands[TILEGX_NUM_PIPELINE_ENCODINGS][TILEGX_MAX_OPERANDS];
+
+ /* A mask of which bits have predefined values for each pipeline.
+ * This is useful for disassembly. */
+ tilegx_bundle_bits fixed_bit_masks[TILEGX_NUM_PIPELINE_ENCODINGS];
+
+ /* For each bit set in fixed_bit_masks, what the value is for this
+ * instruction. */
+ tilegx_bundle_bits fixed_bit_values[TILEGX_NUM_PIPELINE_ENCODINGS];
+};
+
+/* Used for non-textual disassembly into structs. */
+struct tilegx_decoded_instruction
+{
+ const struct tilegx_opcode *opcode;
+ const struct tilegx_operand *operands[TILEGX_MAX_OPERANDS];
+ long long operand_values[TILEGX_MAX_OPERANDS];
+};
+
+enum
+{
+ ADDI_IMM8_OPCODE_X0 = 1,
+ ADDI_IMM8_OPCODE_X1 = 1,
+ ADDI_OPCODE_Y0 = 0,
+ ADDI_OPCODE_Y1 = 1,
+ ADDLI_OPCODE_X0 = 1,
+ ADDLI_OPCODE_X1 = 0,
+ ADDXI_IMM8_OPCODE_X0 = 2,
+ ADDXI_IMM8_OPCODE_X1 = 2,
+ ADDXI_OPCODE_Y0 = 1,
+ ADDXI_OPCODE_Y1 = 2,
+ ADDXLI_OPCODE_X0 = 2,
+ ADDXLI_OPCODE_X1 = 1,
+ ADDXSC_RRR_0_OPCODE_X0 = 1,
+ ADDXSC_RRR_0_OPCODE_X1 = 1,
+ ADDX_RRR_0_OPCODE_X0 = 2,
+ ADDX_RRR_0_OPCODE_X1 = 2,
+ ADDX_RRR_0_OPCODE_Y0 = 0,
+ ADDX_SPECIAL_0_OPCODE_Y1 = 0,
+ ADD_RRR_0_OPCODE_X0 = 3,
+ ADD_RRR_0_OPCODE_X1 = 3,
+ ADD_RRR_0_OPCODE_Y0 = 1,
+ ADD_SPECIAL_0_OPCODE_Y1 = 1,
+ ANDI_IMM8_OPCODE_X0 = 3,
+ ANDI_IMM8_OPCODE_X1 = 3,
+ ANDI_OPCODE_Y0 = 2,
+ ANDI_OPCODE_Y1 = 3,
+ AND_RRR_0_OPCODE_X0 = 4,
+ AND_RRR_0_OPCODE_X1 = 4,
+ AND_RRR_5_OPCODE_Y0 = 0,
+ AND_RRR_5_OPCODE_Y1 = 0,
+ BEQZT_BRANCH_OPCODE_X1 = 16,
+ BEQZ_BRANCH_OPCODE_X1 = 17,
+ BFEXTS_BF_OPCODE_X0 = 4,
+ BFEXTU_BF_OPCODE_X0 = 5,
+ BFINS_BF_OPCODE_X0 = 6,
+ BF_OPCODE_X0 = 3,
+ BGEZT_BRANCH_OPCODE_X1 = 18,
+ BGEZ_BRANCH_OPCODE_X1 = 19,
+ BGTZT_BRANCH_OPCODE_X1 = 20,
+ BGTZ_BRANCH_OPCODE_X1 = 21,
+ BLBCT_BRANCH_OPCODE_X1 = 22,
+ BLBC_BRANCH_OPCODE_X1 = 23,
+ BLBST_BRANCH_OPCODE_X1 = 24,
+ BLBS_BRANCH_OPCODE_X1 = 25,
+ BLEZT_BRANCH_OPCODE_X1 = 26,
+ BLEZ_BRANCH_OPCODE_X1 = 27,
+ BLTZT_BRANCH_OPCODE_X1 = 28,
+ BLTZ_BRANCH_OPCODE_X1 = 29,
+ BNEZT_BRANCH_OPCODE_X1 = 30,
+ BNEZ_BRANCH_OPCODE_X1 = 31,
+ BRANCH_OPCODE_X1 = 2,
+ CMOVEQZ_RRR_0_OPCODE_X0 = 5,
+ CMOVEQZ_RRR_4_OPCODE_Y0 = 0,
+ CMOVNEZ_RRR_0_OPCODE_X0 = 6,
+ CMOVNEZ_RRR_4_OPCODE_Y0 = 1,
+ CMPEQI_IMM8_OPCODE_X0 = 4,
+ CMPEQI_IMM8_OPCODE_X1 = 4,
+ CMPEQI_OPCODE_Y0 = 3,
+ CMPEQI_OPCODE_Y1 = 4,
+ CMPEQ_RRR_0_OPCODE_X0 = 7,
+ CMPEQ_RRR_0_OPCODE_X1 = 5,
+ CMPEQ_RRR_3_OPCODE_Y0 = 0,
+ CMPEQ_RRR_3_OPCODE_Y1 = 2,
+ CMPEXCH4_RRR_0_OPCODE_X1 = 6,
+ CMPEXCH_RRR_0_OPCODE_X1 = 7,
+ CMPLES_RRR_0_OPCODE_X0 = 8,
+ CMPLES_RRR_0_OPCODE_X1 = 8,
+ CMPLES_RRR_2_OPCODE_Y0 = 0,
+ CMPLES_RRR_2_OPCODE_Y1 = 0,
+ CMPLEU_RRR_0_OPCODE_X0 = 9,
+ CMPLEU_RRR_0_OPCODE_X1 = 9,
+ CMPLEU_RRR_2_OPCODE_Y0 = 1,
+ CMPLEU_RRR_2_OPCODE_Y1 = 1,
+ CMPLTSI_IMM8_OPCODE_X0 = 5,
+ CMPLTSI_IMM8_OPCODE_X1 = 5,
+ CMPLTSI_OPCODE_Y0 = 4,
+ CMPLTSI_OPCODE_Y1 = 5,
+ CMPLTS_RRR_0_OPCODE_X0 = 10,
+ CMPLTS_RRR_0_OPCODE_X1 = 10,
+ CMPLTS_RRR_2_OPCODE_Y0 = 2,
+ CMPLTS_RRR_2_OPCODE_Y1 = 2,
+ CMPLTUI_IMM8_OPCODE_X0 = 6,
+ CMPLTUI_IMM8_OPCODE_X1 = 6,
+ CMPLTU_RRR_0_OPCODE_X0 = 11,
+ CMPLTU_RRR_0_OPCODE_X1 = 11,
+ CMPLTU_RRR_2_OPCODE_Y0 = 3,
+ CMPLTU_RRR_2_OPCODE_Y1 = 3,
+ CMPNE_RRR_0_OPCODE_X0 = 12,
+ CMPNE_RRR_0_OPCODE_X1 = 12,
+ CMPNE_RRR_3_OPCODE_Y0 = 1,
+ CMPNE_RRR_3_OPCODE_Y1 = 3,
+ CMULAF_RRR_0_OPCODE_X0 = 13,
+ CMULA_RRR_0_OPCODE_X0 = 14,
+ CMULFR_RRR_0_OPCODE_X0 = 15,
+ CMULF_RRR_0_OPCODE_X0 = 16,
+ CMULHR_RRR_0_OPCODE_X0 = 17,
+ CMULH_RRR_0_OPCODE_X0 = 18,
+ CMUL_RRR_0_OPCODE_X0 = 19,
+ CNTLZ_UNARY_OPCODE_X0 = 1,
+ CNTLZ_UNARY_OPCODE_Y0 = 1,
+ CNTTZ_UNARY_OPCODE_X0 = 2,
+ CNTTZ_UNARY_OPCODE_Y0 = 2,
+ CRC32_32_RRR_0_OPCODE_X0 = 20,
+ CRC32_8_RRR_0_OPCODE_X0 = 21,
+ DBLALIGN2_RRR_0_OPCODE_X0 = 22,
+ DBLALIGN2_RRR_0_OPCODE_X1 = 13,
+ DBLALIGN4_RRR_0_OPCODE_X0 = 23,
+ DBLALIGN4_RRR_0_OPCODE_X1 = 14,
+ DBLALIGN6_RRR_0_OPCODE_X0 = 24,
+ DBLALIGN6_RRR_0_OPCODE_X1 = 15,
+ DBLALIGN_RRR_0_OPCODE_X0 = 25,
+ DRAIN_UNARY_OPCODE_X1 = 1,
+ DTLBPR_UNARY_OPCODE_X1 = 2,
+ EXCH4_RRR_0_OPCODE_X1 = 16,
+ EXCH_RRR_0_OPCODE_X1 = 17,
+ FDOUBLE_ADDSUB_RRR_0_OPCODE_X0 = 26,
+ FDOUBLE_ADD_FLAGS_RRR_0_OPCODE_X0 = 27,
+ FDOUBLE_MUL_FLAGS_RRR_0_OPCODE_X0 = 28,
+ FDOUBLE_PACK1_RRR_0_OPCODE_X0 = 29,
+ FDOUBLE_PACK2_RRR_0_OPCODE_X0 = 30,
+ FDOUBLE_SUB_FLAGS_RRR_0_OPCODE_X0 = 31,
+ FDOUBLE_UNPACK_MAX_RRR_0_OPCODE_X0 = 32,
+ FDOUBLE_UNPACK_MIN_RRR_0_OPCODE_X0 = 33,
+ FETCHADD4_RRR_0_OPCODE_X1 = 18,
+ FETCHADDGEZ4_RRR_0_OPCODE_X1 = 19,
+ FETCHADDGEZ_RRR_0_OPCODE_X1 = 20,
+ FETCHADD_RRR_0_OPCODE_X1 = 21,
+ FETCHAND4_RRR_0_OPCODE_X1 = 22,
+ FETCHAND_RRR_0_OPCODE_X1 = 23,
+ FETCHOR4_RRR_0_OPCODE_X1 = 24,
+ FETCHOR_RRR_0_OPCODE_X1 = 25,
+ FINV_UNARY_OPCODE_X1 = 3,
+ FLUSHWB_UNARY_OPCODE_X1 = 4,
+ FLUSH_UNARY_OPCODE_X1 = 5,
+ FNOP_UNARY_OPCODE_X0 = 3,
+ FNOP_UNARY_OPCODE_X1 = 6,
+ FNOP_UNARY_OPCODE_Y0 = 3,
+ FNOP_UNARY_OPCODE_Y1 = 8,
+ FSINGLE_ADD1_RRR_0_OPCODE_X0 = 34,
+ FSINGLE_ADDSUB2_RRR_0_OPCODE_X0 = 35,
+ FSINGLE_MUL1_RRR_0_OPCODE_X0 = 36,
+ FSINGLE_MUL2_RRR_0_OPCODE_X0 = 37,
+ FSINGLE_PACK1_UNARY_OPCODE_X0 = 4,
+ FSINGLE_PACK1_UNARY_OPCODE_Y0 = 4,
+ FSINGLE_PACK2_RRR_0_OPCODE_X0 = 38,
+ FSINGLE_SUB1_RRR_0_OPCODE_X0 = 39,
+ ICOH_UNARY_OPCODE_X1 = 7,
+ ILL_UNARY_OPCODE_X1 = 8,
+ ILL_UNARY_OPCODE_Y1 = 9,
+ IMM8_OPCODE_X0 = 4,
+ IMM8_OPCODE_X1 = 3,
+ INV_UNARY_OPCODE_X1 = 9,
+ IRET_UNARY_OPCODE_X1 = 10,
+ JALRP_UNARY_OPCODE_X1 = 11,
+ JALRP_UNARY_OPCODE_Y1 = 10,
+ JALR_UNARY_OPCODE_X1 = 12,
+ JALR_UNARY_OPCODE_Y1 = 11,
+ JAL_JUMP_OPCODE_X1 = 0,
+ JRP_UNARY_OPCODE_X1 = 13,
+ JRP_UNARY_OPCODE_Y1 = 12,
+ JR_UNARY_OPCODE_X1 = 14,
+ JR_UNARY_OPCODE_Y1 = 13,
+ JUMP_OPCODE_X1 = 4,
+ J_JUMP_OPCODE_X1 = 1,
+ LD1S_ADD_IMM8_OPCODE_X1 = 7,
+ LD1S_OPCODE_Y2 = 0,
+ LD1S_UNARY_OPCODE_X1 = 15,
+ LD1U_ADD_IMM8_OPCODE_X1 = 8,
+ LD1U_OPCODE_Y2 = 1,
+ LD1U_UNARY_OPCODE_X1 = 16,
+ LD2S_ADD_IMM8_OPCODE_X1 = 9,
+ LD2S_OPCODE_Y2 = 2,
+ LD2S_UNARY_OPCODE_X1 = 17,
+ LD2U_ADD_IMM8_OPCODE_X1 = 10,
+ LD2U_OPCODE_Y2 = 3,
+ LD2U_UNARY_OPCODE_X1 = 18,
+ LD4S_ADD_IMM8_OPCODE_X1 = 11,
+ LD4S_OPCODE_Y2 = 1,
+ LD4S_UNARY_OPCODE_X1 = 19,
+ LD4U_ADD_IMM8_OPCODE_X1 = 12,
+ LD4U_OPCODE_Y2 = 2,
+ LD4U_UNARY_OPCODE_X1 = 20,
+ LDNA_UNARY_OPCODE_X1 = 21,
+ LDNT1S_ADD_IMM8_OPCODE_X1 = 13,
+ LDNT1S_UNARY_OPCODE_X1 = 22,
+ LDNT1U_ADD_IMM8_OPCODE_X1 = 14,
+ LDNT1U_UNARY_OPCODE_X1 = 23,
+ LDNT2S_ADD_IMM8_OPCODE_X1 = 15,
+ LDNT2S_UNARY_OPCODE_X1 = 24,
+ LDNT2U_ADD_IMM8_OPCODE_X1 = 16,
+ LDNT2U_UNARY_OPCODE_X1 = 25,
+ LDNT4S_ADD_IMM8_OPCODE_X1 = 17,
+ LDNT4S_UNARY_OPCODE_X1 = 26,
+ LDNT4U_ADD_IMM8_OPCODE_X1 = 18,
+ LDNT4U_UNARY_OPCODE_X1 = 27,
+ LDNT_ADD_IMM8_OPCODE_X1 = 19,
+ LDNT_UNARY_OPCODE_X1 = 28,
+ LD_ADD_IMM8_OPCODE_X1 = 20,
+ LD_OPCODE_Y2 = 3,
+ LD_UNARY_OPCODE_X1 = 29,
+ LNK_UNARY_OPCODE_X1 = 30,
+ LNK_UNARY_OPCODE_Y1 = 14,
+ LWNA_ADD_IMM8_OPCODE_X1 = 21,
+ MFSPR_IMM8_OPCODE_X1 = 22,
+ MF_UNARY_OPCODE_X1 = 31,
+ MM_BF_OPCODE_X0 = 7,
+ MNZ_RRR_0_OPCODE_X0 = 40,
+ MNZ_RRR_0_OPCODE_X1 = 26,
+ MNZ_RRR_4_OPCODE_Y0 = 2,
+ MNZ_RRR_4_OPCODE_Y1 = 2,
+ MODE_OPCODE_YA2 = 1,
+ MODE_OPCODE_YB2 = 2,
+ MODE_OPCODE_YC2 = 3,
+ MTSPR_IMM8_OPCODE_X1 = 23,
+ MULAX_RRR_0_OPCODE_X0 = 41,
+ MULAX_RRR_3_OPCODE_Y0 = 2,
+ MULA_HS_HS_RRR_0_OPCODE_X0 = 42,
+ MULA_HS_HS_RRR_9_OPCODE_Y0 = 0,
+ MULA_HS_HU_RRR_0_OPCODE_X0 = 43,
+ MULA_HS_LS_RRR_0_OPCODE_X0 = 44,
+ MULA_HS_LU_RRR_0_OPCODE_X0 = 45,
+ MULA_HU_HU_RRR_0_OPCODE_X0 = 46,
+ MULA_HU_HU_RRR_9_OPCODE_Y0 = 1,
+ MULA_HU_LS_RRR_0_OPCODE_X0 = 47,
+ MULA_HU_LU_RRR_0_OPCODE_X0 = 48,
+ MULA_LS_LS_RRR_0_OPCODE_X0 = 49,
+ MULA_LS_LS_RRR_9_OPCODE_Y0 = 2,
+ MULA_LS_LU_RRR_0_OPCODE_X0 = 50,
+ MULA_LU_LU_RRR_0_OPCODE_X0 = 51,
+ MULA_LU_LU_RRR_9_OPCODE_Y0 = 3,
+ MULX_RRR_0_OPCODE_X0 = 52,
+ MULX_RRR_3_OPCODE_Y0 = 3,
+ MUL_HS_HS_RRR_0_OPCODE_X0 = 53,
+ MUL_HS_HS_RRR_8_OPCODE_Y0 = 0,
+ MUL_HS_HU_RRR_0_OPCODE_X0 = 54,
+ MUL_HS_LS_RRR_0_OPCODE_X0 = 55,
+ MUL_HS_LU_RRR_0_OPCODE_X0 = 56,
+ MUL_HU_HU_RRR_0_OPCODE_X0 = 57,
+ MUL_HU_HU_RRR_8_OPCODE_Y0 = 1,
+ MUL_HU_LS_RRR_0_OPCODE_X0 = 58,
+ MUL_HU_LU_RRR_0_OPCODE_X0 = 59,
+ MUL_LS_LS_RRR_0_OPCODE_X0 = 60,
+ MUL_LS_LS_RRR_8_OPCODE_Y0 = 2,
+ MUL_LS_LU_RRR_0_OPCODE_X0 = 61,
+ MUL_LU_LU_RRR_0_OPCODE_X0 = 62,
+ MUL_LU_LU_RRR_8_OPCODE_Y0 = 3,
+ MZ_RRR_0_OPCODE_X0 = 63,
+ MZ_RRR_0_OPCODE_X1 = 27,
+ MZ_RRR_4_OPCODE_Y0 = 3,
+ MZ_RRR_4_OPCODE_Y1 = 3,
+ NAP_UNARY_OPCODE_X1 = 32,
+ NOP_UNARY_OPCODE_X0 = 5,
+ NOP_UNARY_OPCODE_X1 = 33,
+ NOP_UNARY_OPCODE_Y0 = 5,
+ NOP_UNARY_OPCODE_Y1 = 15,
+ NOR_RRR_0_OPCODE_X0 = 64,
+ NOR_RRR_0_OPCODE_X1 = 28,
+ NOR_RRR_5_OPCODE_Y0 = 1,
+ NOR_RRR_5_OPCODE_Y1 = 1,
+ ORI_IMM8_OPCODE_X0 = 7,
+ ORI_IMM8_OPCODE_X1 = 24,
+ OR_RRR_0_OPCODE_X0 = 65,
+ OR_RRR_0_OPCODE_X1 = 29,
+ OR_RRR_5_OPCODE_Y0 = 2,
+ OR_RRR_5_OPCODE_Y1 = 2,
+ PCNT_UNARY_OPCODE_X0 = 6,
+ PCNT_UNARY_OPCODE_Y0 = 6,
+ REVBITS_UNARY_OPCODE_X0 = 7,
+ REVBITS_UNARY_OPCODE_Y0 = 7,
+ REVBYTES_UNARY_OPCODE_X0 = 8,
+ REVBYTES_UNARY_OPCODE_Y0 = 8,
+ ROTLI_SHIFT_OPCODE_X0 = 1,
+ ROTLI_SHIFT_OPCODE_X1 = 1,
+ ROTLI_SHIFT_OPCODE_Y0 = 0,
+ ROTLI_SHIFT_OPCODE_Y1 = 0,
+ ROTL_RRR_0_OPCODE_X0 = 66,
+ ROTL_RRR_0_OPCODE_X1 = 30,
+ ROTL_RRR_6_OPCODE_Y0 = 0,
+ ROTL_RRR_6_OPCODE_Y1 = 0,
+ RRR_0_OPCODE_X0 = 5,
+ RRR_0_OPCODE_X1 = 5,
+ RRR_0_OPCODE_Y0 = 5,
+ RRR_0_OPCODE_Y1 = 6,
+ RRR_1_OPCODE_Y0 = 6,
+ RRR_1_OPCODE_Y1 = 7,
+ RRR_2_OPCODE_Y0 = 7,
+ RRR_2_OPCODE_Y1 = 8,
+ RRR_3_OPCODE_Y0 = 8,
+ RRR_3_OPCODE_Y1 = 9,
+ RRR_4_OPCODE_Y0 = 9,
+ RRR_4_OPCODE_Y1 = 10,
+ RRR_5_OPCODE_Y0 = 10,
+ RRR_5_OPCODE_Y1 = 11,
+ RRR_6_OPCODE_Y0 = 11,
+ RRR_6_OPCODE_Y1 = 12,
+ RRR_7_OPCODE_Y0 = 12,
+ RRR_7_OPCODE_Y1 = 13,
+ RRR_8_OPCODE_Y0 = 13,
+ RRR_9_OPCODE_Y0 = 14,
+ SHIFT_OPCODE_X0 = 6,
+ SHIFT_OPCODE_X1 = 6,
+ SHIFT_OPCODE_Y0 = 15,
+ SHIFT_OPCODE_Y1 = 14,
+ SHL16INSLI_OPCODE_X0 = 7,
+ SHL16INSLI_OPCODE_X1 = 7,
+ SHL1ADDX_RRR_0_OPCODE_X0 = 67,
+ SHL1ADDX_RRR_0_OPCODE_X1 = 31,
+ SHL1ADDX_RRR_7_OPCODE_Y0 = 1,
+ SHL1ADDX_RRR_7_OPCODE_Y1 = 1,
+ SHL1ADD_RRR_0_OPCODE_X0 = 68,
+ SHL1ADD_RRR_0_OPCODE_X1 = 32,
+ SHL1ADD_RRR_1_OPCODE_Y0 = 0,
+ SHL1ADD_RRR_1_OPCODE_Y1 = 0,
+ SHL2ADDX_RRR_0_OPCODE_X0 = 69,
+ SHL2ADDX_RRR_0_OPCODE_X1 = 33,
+ SHL2ADDX_RRR_7_OPCODE_Y0 = 2,
+ SHL2ADDX_RRR_7_OPCODE_Y1 = 2,
+ SHL2ADD_RRR_0_OPCODE_X0 = 70,
+ SHL2ADD_RRR_0_OPCODE_X1 = 34,
+ SHL2ADD_RRR_1_OPCODE_Y0 = 1,
+ SHL2ADD_RRR_1_OPCODE_Y1 = 1,
+ SHL3ADDX_RRR_0_OPCODE_X0 = 71,
+ SHL3ADDX_RRR_0_OPCODE_X1 = 35,
+ SHL3ADDX_RRR_7_OPCODE_Y0 = 3,
+ SHL3ADDX_RRR_7_OPCODE_Y1 = 3,
+ SHL3ADD_RRR_0_OPCODE_X0 = 72,
+ SHL3ADD_RRR_0_OPCODE_X1 = 36,
+ SHL3ADD_RRR_1_OPCODE_Y0 = 2,
+ SHL3ADD_RRR_1_OPCODE_Y1 = 2,
+ SHLI_SHIFT_OPCODE_X0 = 2,
+ SHLI_SHIFT_OPCODE_X1 = 2,
+ SHLI_SHIFT_OPCODE_Y0 = 1,
+ SHLI_SHIFT_OPCODE_Y1 = 1,
+ SHLXI_SHIFT_OPCODE_X0 = 3,
+ SHLXI_SHIFT_OPCODE_X1 = 3,
+ SHLX_RRR_0_OPCODE_X0 = 73,
+ SHLX_RRR_0_OPCODE_X1 = 37,
+ SHL_RRR_0_OPCODE_X0 = 74,
+ SHL_RRR_0_OPCODE_X1 = 38,
+ SHL_RRR_6_OPCODE_Y0 = 1,
+ SHL_RRR_6_OPCODE_Y1 = 1,
+ SHRSI_SHIFT_OPCODE_X0 = 4,
+ SHRSI_SHIFT_OPCODE_X1 = 4,
+ SHRSI_SHIFT_OPCODE_Y0 = 2,
+ SHRSI_SHIFT_OPCODE_Y1 = 2,
+ SHRS_RRR_0_OPCODE_X0 = 75,
+ SHRS_RRR_0_OPCODE_X1 = 39,
+ SHRS_RRR_6_OPCODE_Y0 = 2,
+ SHRS_RRR_6_OPCODE_Y1 = 2,
+ SHRUI_SHIFT_OPCODE_X0 = 5,
+ SHRUI_SHIFT_OPCODE_X1 = 5,
+ SHRUI_SHIFT_OPCODE_Y0 = 3,
+ SHRUI_SHIFT_OPCODE_Y1 = 3,
+ SHRUXI_SHIFT_OPCODE_X0 = 6,
+ SHRUXI_SHIFT_OPCODE_X1 = 6,
+ SHRUX_RRR_0_OPCODE_X0 = 76,
+ SHRUX_RRR_0_OPCODE_X1 = 40,
+ SHRU_RRR_0_OPCODE_X0 = 77,
+ SHRU_RRR_0_OPCODE_X1 = 41,
+ SHRU_RRR_6_OPCODE_Y0 = 3,
+ SHRU_RRR_6_OPCODE_Y1 = 3,
+ SHUFFLEBYTES_RRR_0_OPCODE_X0 = 78,
+ ST1_ADD_IMM8_OPCODE_X1 = 25,
+ ST1_OPCODE_Y2 = 0,
+ ST1_RRR_0_OPCODE_X1 = 42,
+ ST2_ADD_IMM8_OPCODE_X1 = 26,
+ ST2_OPCODE_Y2 = 1,
+ ST2_RRR_0_OPCODE_X1 = 43,
+ ST4_ADD_IMM8_OPCODE_X1 = 27,
+ ST4_OPCODE_Y2 = 2,
+ ST4_RRR_0_OPCODE_X1 = 44,
+ STNT1_ADD_IMM8_OPCODE_X1 = 28,
+ STNT1_RRR_0_OPCODE_X1 = 45,
+ STNT2_ADD_IMM8_OPCODE_X1 = 29,
+ STNT2_RRR_0_OPCODE_X1 = 46,
+ STNT4_ADD_IMM8_OPCODE_X1 = 30,
+ STNT4_RRR_0_OPCODE_X1 = 47,
+ STNT_ADD_IMM8_OPCODE_X1 = 31,
+ STNT_RRR_0_OPCODE_X1 = 48,
+ ST_ADD_IMM8_OPCODE_X1 = 32,
+ ST_OPCODE_Y2 = 3,
+ ST_RRR_0_OPCODE_X1 = 49,
+ SUBXSC_RRR_0_OPCODE_X0 = 79,
+ SUBXSC_RRR_0_OPCODE_X1 = 50,
+ SUBX_RRR_0_OPCODE_X0 = 80,
+ SUBX_RRR_0_OPCODE_X1 = 51,
+ SUBX_RRR_0_OPCODE_Y0 = 2,
+ SUBX_RRR_0_OPCODE_Y1 = 2,
+ SUB_RRR_0_OPCODE_X0 = 81,
+ SUB_RRR_0_OPCODE_X1 = 52,
+ SUB_RRR_0_OPCODE_Y0 = 3,
+ SUB_RRR_0_OPCODE_Y1 = 3,
+ SWINT0_UNARY_OPCODE_X1 = 34,
+ SWINT1_UNARY_OPCODE_X1 = 35,
+ SWINT2_UNARY_OPCODE_X1 = 36,
+ SWINT3_UNARY_OPCODE_X1 = 37,
+ TBLIDXB0_UNARY_OPCODE_X0 = 9,
+ TBLIDXB0_UNARY_OPCODE_Y0 = 9,
+ TBLIDXB1_UNARY_OPCODE_X0 = 10,
+ TBLIDXB1_UNARY_OPCODE_Y0 = 10,
+ TBLIDXB2_UNARY_OPCODE_X0 = 11,
+ TBLIDXB2_UNARY_OPCODE_Y0 = 11,
+ TBLIDXB3_UNARY_OPCODE_X0 = 12,
+ TBLIDXB3_UNARY_OPCODE_Y0 = 12,
+ UNARY_RRR_0_OPCODE_X0 = 82,
+ UNARY_RRR_0_OPCODE_X1 = 53,
+ UNARY_RRR_1_OPCODE_Y0 = 3,
+ UNARY_RRR_1_OPCODE_Y1 = 3,
+ V1ADDI_IMM8_OPCODE_X0 = 8,
+ V1ADDI_IMM8_OPCODE_X1 = 33,
+ V1ADDUC_RRR_0_OPCODE_X0 = 83,
+ V1ADDUC_RRR_0_OPCODE_X1 = 54,
+ V1ADD_RRR_0_OPCODE_X0 = 84,
+ V1ADD_RRR_0_OPCODE_X1 = 55,
+ V1ADIFFU_RRR_0_OPCODE_X0 = 85,
+ V1AVGU_RRR_0_OPCODE_X0 = 86,
+ V1CMPEQI_IMM8_OPCODE_X0 = 9,
+ V1CMPEQI_IMM8_OPCODE_X1 = 34,
+ V1CMPEQ_RRR_0_OPCODE_X0 = 87,
+ V1CMPEQ_RRR_0_OPCODE_X1 = 56,
+ V1CMPLES_RRR_0_OPCODE_X0 = 88,
+ V1CMPLES_RRR_0_OPCODE_X1 = 57,
+ V1CMPLEU_RRR_0_OPCODE_X0 = 89,
+ V1CMPLEU_RRR_0_OPCODE_X1 = 58,
+ V1CMPLTSI_IMM8_OPCODE_X0 = 10,
+ V1CMPLTSI_IMM8_OPCODE_X1 = 35,
+ V1CMPLTS_RRR_0_OPCODE_X0 = 90,
+ V1CMPLTS_RRR_0_OPCODE_X1 = 59,
+ V1CMPLTUI_IMM8_OPCODE_X0 = 11,
+ V1CMPLTUI_IMM8_OPCODE_X1 = 36,
+ V1CMPLTU_RRR_0_OPCODE_X0 = 91,
+ V1CMPLTU_RRR_0_OPCODE_X1 = 60,
+ V1CMPNE_RRR_0_OPCODE_X0 = 92,
+ V1CMPNE_RRR_0_OPCODE_X1 = 61,
+ V1DDOTPUA_RRR_0_OPCODE_X0 = 161,
+ V1DDOTPUSA_RRR_0_OPCODE_X0 = 93,
+ V1DDOTPUS_RRR_0_OPCODE_X0 = 94,
+ V1DDOTPU_RRR_0_OPCODE_X0 = 162,
+ V1DOTPA_RRR_0_OPCODE_X0 = 95,
+ V1DOTPUA_RRR_0_OPCODE_X0 = 163,
+ V1DOTPUSA_RRR_0_OPCODE_X0 = 96,
+ V1DOTPUS_RRR_0_OPCODE_X0 = 97,
+ V1DOTPU_RRR_0_OPCODE_X0 = 164,
+ V1DOTP_RRR_0_OPCODE_X0 = 98,
+ V1INT_H_RRR_0_OPCODE_X0 = 99,
+ V1INT_H_RRR_0_OPCODE_X1 = 62,
+ V1INT_L_RRR_0_OPCODE_X0 = 100,
+ V1INT_L_RRR_0_OPCODE_X1 = 63,
+ V1MAXUI_IMM8_OPCODE_X0 = 12,
+ V1MAXUI_IMM8_OPCODE_X1 = 37,
+ V1MAXU_RRR_0_OPCODE_X0 = 101,
+ V1MAXU_RRR_0_OPCODE_X1 = 64,
+ V1MINUI_IMM8_OPCODE_X0 = 13,
+ V1MINUI_IMM8_OPCODE_X1 = 38,
+ V1MINU_RRR_0_OPCODE_X0 = 102,
+ V1MINU_RRR_0_OPCODE_X1 = 65,
+ V1MNZ_RRR_0_OPCODE_X0 = 103,
+ V1MNZ_RRR_0_OPCODE_X1 = 66,
+ V1MULTU_RRR_0_OPCODE_X0 = 104,
+ V1MULUS_RRR_0_OPCODE_X0 = 105,
+ V1MULU_RRR_0_OPCODE_X0 = 106,
+ V1MZ_RRR_0_OPCODE_X0 = 107,
+ V1MZ_RRR_0_OPCODE_X1 = 67,
+ V1SADAU_RRR_0_OPCODE_X0 = 108,
+ V1SADU_RRR_0_OPCODE_X0 = 109,
+ V1SHLI_SHIFT_OPCODE_X0 = 7,
+ V1SHLI_SHIFT_OPCODE_X1 = 7,
+ V1SHL_RRR_0_OPCODE_X0 = 110,
+ V1SHL_RRR_0_OPCODE_X1 = 68,
+ V1SHRSI_SHIFT_OPCODE_X0 = 8,
+ V1SHRSI_SHIFT_OPCODE_X1 = 8,
+ V1SHRS_RRR_0_OPCODE_X0 = 111,
+ V1SHRS_RRR_0_OPCODE_X1 = 69,
+ V1SHRUI_SHIFT_OPCODE_X0 = 9,
+ V1SHRUI_SHIFT_OPCODE_X1 = 9,
+ V1SHRU_RRR_0_OPCODE_X0 = 112,
+ V1SHRU_RRR_0_OPCODE_X1 = 70,
+ V1SUBUC_RRR_0_OPCODE_X0 = 113,
+ V1SUBUC_RRR_0_OPCODE_X1 = 71,
+ V1SUB_RRR_0_OPCODE_X0 = 114,
+ V1SUB_RRR_0_OPCODE_X1 = 72,
+ V2ADDI_IMM8_OPCODE_X0 = 14,
+ V2ADDI_IMM8_OPCODE_X1 = 39,
+ V2ADDSC_RRR_0_OPCODE_X0 = 115,
+ V2ADDSC_RRR_0_OPCODE_X1 = 73,
+ V2ADD_RRR_0_OPCODE_X0 = 116,
+ V2ADD_RRR_0_OPCODE_X1 = 74,
+ V2ADIFFS_RRR_0_OPCODE_X0 = 117,
+ V2AVGS_RRR_0_OPCODE_X0 = 118,
+ V2CMPEQI_IMM8_OPCODE_X0 = 15,
+ V2CMPEQI_IMM8_OPCODE_X1 = 40,
+ V2CMPEQ_RRR_0_OPCODE_X0 = 119,
+ V2CMPEQ_RRR_0_OPCODE_X1 = 75,
+ V2CMPLES_RRR_0_OPCODE_X0 = 120,
+ V2CMPLES_RRR_0_OPCODE_X1 = 76,
+ V2CMPLEU_RRR_0_OPCODE_X0 = 121,
+ V2CMPLEU_RRR_0_OPCODE_X1 = 77,
+ V2CMPLTSI_IMM8_OPCODE_X0 = 16,
+ V2CMPLTSI_IMM8_OPCODE_X1 = 41,
+ V2CMPLTS_RRR_0_OPCODE_X0 = 122,
+ V2CMPLTS_RRR_0_OPCODE_X1 = 78,
+ V2CMPLTUI_IMM8_OPCODE_X0 = 17,
+ V2CMPLTUI_IMM8_OPCODE_X1 = 42,
+ V2CMPLTU_RRR_0_OPCODE_X0 = 123,
+ V2CMPLTU_RRR_0_OPCODE_X1 = 79,
+ V2CMPNE_RRR_0_OPCODE_X0 = 124,
+ V2CMPNE_RRR_0_OPCODE_X1 = 80,
+ V2DOTPA_RRR_0_OPCODE_X0 = 125,
+ V2DOTP_RRR_0_OPCODE_X0 = 126,
+ V2INT_H_RRR_0_OPCODE_X0 = 127,
+ V2INT_H_RRR_0_OPCODE_X1 = 81,
+ V2INT_L_RRR_0_OPCODE_X0 = 128,
+ V2INT_L_RRR_0_OPCODE_X1 = 82,
+ V2MAXSI_IMM8_OPCODE_X0 = 18,
+ V2MAXSI_IMM8_OPCODE_X1 = 43,
+ V2MAXS_RRR_0_OPCODE_X0 = 129,
+ V2MAXS_RRR_0_OPCODE_X1 = 83,
+ V2MINSI_IMM8_OPCODE_X0 = 19,
+ V2MINSI_IMM8_OPCODE_X1 = 44,
+ V2MINS_RRR_0_OPCODE_X0 = 130,
+ V2MINS_RRR_0_OPCODE_X1 = 84,
+ V2MNZ_RRR_0_OPCODE_X0 = 131,
+ V2MNZ_RRR_0_OPCODE_X1 = 85,
+ V2MULFSC_RRR_0_OPCODE_X0 = 132,
+ V2MULS_RRR_0_OPCODE_X0 = 133,
+ V2MULTS_RRR_0_OPCODE_X0 = 134,
+ V2MZ_RRR_0_OPCODE_X0 = 135,
+ V2MZ_RRR_0_OPCODE_X1 = 86,
+ V2PACKH_RRR_0_OPCODE_X0 = 136,
+ V2PACKH_RRR_0_OPCODE_X1 = 87,
+ V2PACKL_RRR_0_OPCODE_X0 = 137,
+ V2PACKL_RRR_0_OPCODE_X1 = 88,
+ V2PACKUC_RRR_0_OPCODE_X0 = 138,
+ V2PACKUC_RRR_0_OPCODE_X1 = 89,
+ V2SADAS_RRR_0_OPCODE_X0 = 139,
+ V2SADAU_RRR_0_OPCODE_X0 = 140,
+ V2SADS_RRR_0_OPCODE_X0 = 141,
+ V2SADU_RRR_0_OPCODE_X0 = 142,
+ V2SHLI_SHIFT_OPCODE_X0 = 10,
+ V2SHLI_SHIFT_OPCODE_X1 = 10,
+ V2SHLSC_RRR_0_OPCODE_X0 = 143,
+ V2SHLSC_RRR_0_OPCODE_X1 = 90,
+ V2SHL_RRR_0_OPCODE_X0 = 144,
+ V2SHL_RRR_0_OPCODE_X1 = 91,
+ V2SHRSI_SHIFT_OPCODE_X0 = 11,
+ V2SHRSI_SHIFT_OPCODE_X1 = 11,
+ V2SHRS_RRR_0_OPCODE_X0 = 145,
+ V2SHRS_RRR_0_OPCODE_X1 = 92,
+ V2SHRUI_SHIFT_OPCODE_X0 = 12,
+ V2SHRUI_SHIFT_OPCODE_X1 = 12,
+ V2SHRU_RRR_0_OPCODE_X0 = 146,
+ V2SHRU_RRR_0_OPCODE_X1 = 93,
+ V2SUBSC_RRR_0_OPCODE_X0 = 147,
+ V2SUBSC_RRR_0_OPCODE_X1 = 94,
+ V2SUB_RRR_0_OPCODE_X0 = 148,
+ V2SUB_RRR_0_OPCODE_X1 = 95,
+ V4ADDSC_RRR_0_OPCODE_X0 = 149,
+ V4ADDSC_RRR_0_OPCODE_X1 = 96,
+ V4ADD_RRR_0_OPCODE_X0 = 150,
+ V4ADD_RRR_0_OPCODE_X1 = 97,
+ V4INT_H_RRR_0_OPCODE_X0 = 151,
+ V4INT_H_RRR_0_OPCODE_X1 = 98,
+ V4INT_L_RRR_0_OPCODE_X0 = 152,
+ V4INT_L_RRR_0_OPCODE_X1 = 99,
+ V4PACKSC_RRR_0_OPCODE_X0 = 153,
+ V4PACKSC_RRR_0_OPCODE_X1 = 100,
+ V4SHLSC_RRR_0_OPCODE_X0 = 154,
+ V4SHLSC_RRR_0_OPCODE_X1 = 101,
+ V4SHL_RRR_0_OPCODE_X0 = 155,
+ V4SHL_RRR_0_OPCODE_X1 = 102,
+ V4SHRS_RRR_0_OPCODE_X0 = 156,
+ V4SHRS_RRR_0_OPCODE_X1 = 103,
+ V4SHRU_RRR_0_OPCODE_X0 = 157,
+ V4SHRU_RRR_0_OPCODE_X1 = 104,
+ V4SUBSC_RRR_0_OPCODE_X0 = 158,
+ V4SUBSC_RRR_0_OPCODE_X1 = 105,
+ V4SUB_RRR_0_OPCODE_X0 = 159,
+ V4SUB_RRR_0_OPCODE_X1 = 106,
+ WH64_UNARY_OPCODE_X1 = 38,
+ XORI_IMM8_OPCODE_X0 = 20,
+ XORI_IMM8_OPCODE_X1 = 45,
+ XOR_RRR_0_OPCODE_X0 = 160,
+ XOR_RRR_0_OPCODE_X1 = 107,
+ XOR_RRR_5_OPCODE_Y0 = 3,
+ XOR_RRR_5_OPCODE_Y1 = 3
+};
+
+static __inline unsigned int
+get_BFEnd_X0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 12)) & 0x3f);
+}
+
+static __inline unsigned int
+get_BFOpcodeExtension_X0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 24)) & 0xf);
+}
+
+static __inline unsigned int
+get_BFStart_X0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 18)) & 0x3f);
+}
+
+static __inline unsigned int
+get_BrOff_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 31)) & 0x0000003f) |
+ (((unsigned int)(n >> 37)) & 0x0001ffc0);
+}
+
+static __inline unsigned int
+get_BrType_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 54)) & 0x1f);
+}
+
+static __inline unsigned int
+get_Dest_Imm8_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 31)) & 0x0000003f) |
+ (((unsigned int)(n >> 43)) & 0x000000c0);
+}
+
+static __inline unsigned int
+get_Dest_X0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 0)) & 0x3f);
+}
+
+static __inline unsigned int
+get_Dest_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 31)) & 0x3f);
+}
+
+static __inline unsigned int
+get_Dest_Y0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 0)) & 0x3f);
+}
+
+static __inline unsigned int
+get_Dest_Y1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 31)) & 0x3f);
+}
+
+static __inline unsigned int
+get_Imm16_X0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 12)) & 0xffff);
+}
+
+static __inline unsigned int
+get_Imm16_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 43)) & 0xffff);
+}
+
+static __inline unsigned int
+get_Imm8OpcodeExtension_X0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 20)) & 0xff);
+}
+
+static __inline unsigned int
+get_Imm8OpcodeExtension_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 51)) & 0xff);
+}
+
+static __inline unsigned int
+get_Imm8_X0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 12)) & 0xff);
+}
+
+static __inline unsigned int
+get_Imm8_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 43)) & 0xff);
+}
+
+static __inline unsigned int
+get_Imm8_Y0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 12)) & 0xff);
+}
+
+static __inline unsigned int
+get_Imm8_Y1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 43)) & 0xff);
+}
+
+static __inline unsigned int
+get_JumpOff_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 31)) & 0x7ffffff);
+}
+
+static __inline unsigned int
+get_JumpOpcodeExtension_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 58)) & 0x1);
+}
+
+static __inline unsigned int
+get_MF_Imm14_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 37)) & 0x3fff);
+}
+
+static __inline unsigned int
+get_MT_Imm14_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 31)) & 0x0000003f) |
+ (((unsigned int)(n >> 37)) & 0x00003fc0);
+}
+
+static __inline unsigned int
+get_Mode(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 62)) & 0x3);
+}
+
+static __inline unsigned int
+get_Opcode_X0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 28)) & 0x7);
+}
+
+static __inline unsigned int
+get_Opcode_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 59)) & 0x7);
+}
+
+static __inline unsigned int
+get_Opcode_Y0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 27)) & 0xf);
+}
+
+static __inline unsigned int
+get_Opcode_Y1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 58)) & 0xf);
+}
+
+static __inline unsigned int
+get_Opcode_Y2(tilegx_bundle_bits n)
+{
+ return (((n >> 26)) & 0x00000001) |
+ (((unsigned int)(n >> 56)) & 0x00000002);
+}
+
+static __inline unsigned int
+get_RRROpcodeExtension_X0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 18)) & 0x3ff);
+}
+
+static __inline unsigned int
+get_RRROpcodeExtension_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 49)) & 0x3ff);
+}
+
+static __inline unsigned int
+get_RRROpcodeExtension_Y0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 18)) & 0x3);
+}
+
+static __inline unsigned int
+get_RRROpcodeExtension_Y1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 49)) & 0x3);
+}
+
+static __inline unsigned int
+get_ShAmt_X0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 12)) & 0x3f);
+}
+
+static __inline unsigned int
+get_ShAmt_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 43)) & 0x3f);
+}
+
+static __inline unsigned int
+get_ShAmt_Y0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 12)) & 0x3f);
+}
+
+static __inline unsigned int
+get_ShAmt_Y1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 43)) & 0x3f);
+}
+
+static __inline unsigned int
+get_ShiftOpcodeExtension_X0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 18)) & 0x3ff);
+}
+
+static __inline unsigned int
+get_ShiftOpcodeExtension_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 49)) & 0x3ff);
+}
+
+static __inline unsigned int
+get_ShiftOpcodeExtension_Y0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 18)) & 0x3);
+}
+
+static __inline unsigned int
+get_ShiftOpcodeExtension_Y1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 49)) & 0x3);
+}
+
+static __inline unsigned int
+get_SrcA_X0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 6)) & 0x3f);
+}
+
+static __inline unsigned int
+get_SrcA_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 37)) & 0x3f);
+}
+
+static __inline unsigned int
+get_SrcA_Y0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 6)) & 0x3f);
+}
+
+static __inline unsigned int
+get_SrcA_Y1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 37)) & 0x3f);
+}
+
+static __inline unsigned int
+get_SrcA_Y2(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 20)) & 0x3f);
+}
+
+static __inline unsigned int
+get_SrcBDest_Y2(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 51)) & 0x3f);
+}
+
+static __inline unsigned int
+get_SrcB_X0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 12)) & 0x3f);
+}
+
+static __inline unsigned int
+get_SrcB_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 43)) & 0x3f);
+}
+
+static __inline unsigned int
+get_SrcB_Y0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 12)) & 0x3f);
+}
+
+static __inline unsigned int
+get_SrcB_Y1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 43)) & 0x3f);
+}
+
+static __inline unsigned int
+get_UnaryOpcodeExtension_X0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 12)) & 0x3f);
+}
+
+static __inline unsigned int
+get_UnaryOpcodeExtension_X1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 43)) & 0x3f);
+}
+
+static __inline unsigned int
+get_UnaryOpcodeExtension_Y0(tilegx_bundle_bits num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((n >> 12)) & 0x3f);
+}
+
+static __inline unsigned int
+get_UnaryOpcodeExtension_Y1(tilegx_bundle_bits n)
+{
+ return (((unsigned int)(n >> 43)) & 0x3f);
+}
+
+static __inline int
+sign_extend(int n, int num_bits)
+{
+ int shift = (int)(sizeof(int) * 8 - num_bits);
+ return (n << shift) >> shift;
+}
+
+static __inline tilegx_bundle_bits
+create_BFEnd_X0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3f) << 12);
+}
+
+static __inline tilegx_bundle_bits
+create_BFOpcodeExtension_X0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0xf) << 24);
+}
+
+static __inline tilegx_bundle_bits
+create_BFStart_X0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3f) << 18);
+}
+
+static __inline tilegx_bundle_bits
+create_BrOff_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x0000003f)) << 31) |
+ (((tilegx_bundle_bits)(n & 0x0001ffc0)) << 37);
+}
+
+static __inline tilegx_bundle_bits
+create_BrType_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x1f)) << 54);
+}
+
+static __inline tilegx_bundle_bits
+create_Dest_Imm8_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x0000003f)) << 31) |
+ (((tilegx_bundle_bits)(n & 0x000000c0)) << 43);
+}
+
+static __inline tilegx_bundle_bits
+create_Dest_X0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3f) << 0);
+}
+
+static __inline tilegx_bundle_bits
+create_Dest_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3f)) << 31);
+}
+
+static __inline tilegx_bundle_bits
+create_Dest_Y0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3f) << 0);
+}
+
+static __inline tilegx_bundle_bits
+create_Dest_Y1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3f)) << 31);
+}
+
+static __inline tilegx_bundle_bits
+create_Imm16_X0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0xffff) << 12);
+}
+
+static __inline tilegx_bundle_bits
+create_Imm16_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0xffff)) << 43);
+}
+
+static __inline tilegx_bundle_bits
+create_Imm8OpcodeExtension_X0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0xff) << 20);
+}
+
+static __inline tilegx_bundle_bits
+create_Imm8OpcodeExtension_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0xff)) << 51);
+}
+
+static __inline tilegx_bundle_bits
+create_Imm8_X0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0xff) << 12);
+}
+
+static __inline tilegx_bundle_bits
+create_Imm8_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0xff)) << 43);
+}
+
+static __inline tilegx_bundle_bits
+create_Imm8_Y0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0xff) << 12);
+}
+
+static __inline tilegx_bundle_bits
+create_Imm8_Y1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0xff)) << 43);
+}
+
+static __inline tilegx_bundle_bits
+create_JumpOff_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x7ffffff)) << 31);
+}
+
+static __inline tilegx_bundle_bits
+create_JumpOpcodeExtension_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x1)) << 58);
+}
+
+static __inline tilegx_bundle_bits
+create_MF_Imm14_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3fff)) << 37);
+}
+
+static __inline tilegx_bundle_bits
+create_MT_Imm14_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x0000003f)) << 31) |
+ (((tilegx_bundle_bits)(n & 0x00003fc0)) << 37);
+}
+
+static __inline tilegx_bundle_bits
+create_Mode(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3)) << 62);
+}
+
+static __inline tilegx_bundle_bits
+create_Opcode_X0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x7) << 28);
+}
+
+static __inline tilegx_bundle_bits
+create_Opcode_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x7)) << 59);
+}
+
+static __inline tilegx_bundle_bits
+create_Opcode_Y0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0xf) << 27);
+}
+
+static __inline tilegx_bundle_bits
+create_Opcode_Y1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0xf)) << 58);
+}
+
+static __inline tilegx_bundle_bits
+create_Opcode_Y2(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x00000001) << 26) |
+ (((tilegx_bundle_bits)(n & 0x00000002)) << 56);
+}
+
+static __inline tilegx_bundle_bits
+create_RRROpcodeExtension_X0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3ff) << 18);
+}
+
+static __inline tilegx_bundle_bits
+create_RRROpcodeExtension_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3ff)) << 49);
+}
+
+static __inline tilegx_bundle_bits
+create_RRROpcodeExtension_Y0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3) << 18);
+}
+
+static __inline tilegx_bundle_bits
+create_RRROpcodeExtension_Y1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3)) << 49);
+}
+
+static __inline tilegx_bundle_bits
+create_ShAmt_X0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3f) << 12);
+}
+
+static __inline tilegx_bundle_bits
+create_ShAmt_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3f)) << 43);
+}
+
+static __inline tilegx_bundle_bits
+create_ShAmt_Y0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3f) << 12);
+}
+
+static __inline tilegx_bundle_bits
+create_ShAmt_Y1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3f)) << 43);
+}
+
+static __inline tilegx_bundle_bits
+create_ShiftOpcodeExtension_X0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3ff) << 18);
+}
+
+static __inline tilegx_bundle_bits
+create_ShiftOpcodeExtension_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3ff)) << 49);
+}
+
+static __inline tilegx_bundle_bits
+create_ShiftOpcodeExtension_Y0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3) << 18);
+}
+
+static __inline tilegx_bundle_bits
+create_ShiftOpcodeExtension_Y1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3)) << 49);
+}
+
+static __inline tilegx_bundle_bits
+create_SrcA_X0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3f) << 6);
+}
+
+static __inline tilegx_bundle_bits
+create_SrcA_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3f)) << 37);
+}
+
+static __inline tilegx_bundle_bits
+create_SrcA_Y0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3f) << 6);
+}
+
+static __inline tilegx_bundle_bits
+create_SrcA_Y1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3f)) << 37);
+}
+
+static __inline tilegx_bundle_bits
+create_SrcA_Y2(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3f) << 20);
+}
+
+static __inline tilegx_bundle_bits
+create_SrcBDest_Y2(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3f)) << 51);
+}
+
+static __inline tilegx_bundle_bits
+create_SrcB_X0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3f) << 12);
+}
+
+static __inline tilegx_bundle_bits
+create_SrcB_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3f)) << 43);
+}
+
+static __inline tilegx_bundle_bits
+create_SrcB_Y0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3f) << 12);
+}
+
+static __inline tilegx_bundle_bits
+create_SrcB_Y1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3f)) << 43);
+}
+
+static __inline tilegx_bundle_bits
+create_UnaryOpcodeExtension_X0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3f) << 12);
+}
+
+static __inline tilegx_bundle_bits
+create_UnaryOpcodeExtension_X1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3f)) << 43);
+}
+
+static __inline tilegx_bundle_bits
+create_UnaryOpcodeExtension_Y0(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return ((n & 0x3f) << 12);
+}
+
+static __inline tilegx_bundle_bits
+create_UnaryOpcodeExtension_Y1(int num)
+{
+ const unsigned int n = (unsigned int)num;
+ return (((tilegx_bundle_bits)(n & 0x3f)) << 43);
+}
+
+const struct tilegx_opcode tilegx_opcodes[336] =
+{
+ { "bpt", TILEGX_OPC_BPT, 0x2, 0, TREG_ZERO, 0,
+ { { 0, }, { }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffffffff80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286a44ae00000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "info", TILEGX_OPC_INFO, 0xf, 1, TREG_ZERO, 1,
+ { { 0 }, { 1 }, { 2 }, { 3 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00fffULL,
+ 0xfff807ff80000000ULL,
+ 0x0000000078000fffULL,
+ 0x3c0007ff80000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040300fffULL,
+ 0x181807ff80000000ULL,
+ 0x0000000010000fffULL,
+ 0x0c0007ff80000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "infol", TILEGX_OPC_INFOL, 0x3, 1, TREG_ZERO, 1,
+ { { 4 }, { 5 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc000000070000fffULL,
+ 0xf80007ff80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000070000fffULL,
+ 0x380007ff80000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ld4s_tls", TILEGX_OPC_LD4S_TLS, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1858000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ld_tls", TILEGX_OPC_LD_TLS, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x18a0000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "move", TILEGX_OPC_MOVE, 0xf, 2, TREG_ZERO, 1,
+ { { 8, 9 }, { 6, 7 }, { 10, 11 }, { 12, 13 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffff000ULL,
+ 0xfffff80000000000ULL,
+ 0x00000000780ff000ULL,
+ 0x3c07f80000000000ULL,
+ 0ULL
+ },
+ {
+ 0x000000005107f000ULL,
+ 0x283bf80000000000ULL,
+ 0x00000000500bf000ULL,
+ 0x2c05f80000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "movei", TILEGX_OPC_MOVEI, 0xf, 2, TREG_ZERO, 1,
+ { { 8, 0 }, { 6, 1 }, { 10, 2 }, { 12, 3 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00fc0ULL,
+ 0xfff807e000000000ULL,
+ 0x0000000078000fc0ULL,
+ 0x3c0007e000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040100fc0ULL,
+ 0x180807e000000000ULL,
+ 0x0000000000000fc0ULL,
+ 0x040007e000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "moveli", TILEGX_OPC_MOVELI, 0x3, 2, TREG_ZERO, 1,
+ { { 8, 4 }, { 6, 5 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc000000070000fc0ULL,
+ 0xf80007e000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000010000fc0ULL,
+ 0x000007e000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "prefetch", TILEGX_OPC_PREFETCH, 0x12, 1, TREG_ZERO, 1,
+ { { 0, }, { 7 }, { 0, }, { 0, }, { 14 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff81f80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc3f8000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x286a801f80000000ULL,
+ -1ULL,
+ -1ULL,
+ 0x41f8000004000000ULL
+ }
+#endif
+ },
+ { "prefetch_add_l1", TILEGX_OPC_PREFETCH_ADD_L1, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8001f80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1840001f80000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "prefetch_add_l1_fault", TILEGX_OPC_PREFETCH_ADD_L1_FAULT, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8001f80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1838001f80000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "prefetch_add_l2", TILEGX_OPC_PREFETCH_ADD_L2, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8001f80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1850001f80000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "prefetch_add_l2_fault", TILEGX_OPC_PREFETCH_ADD_L2_FAULT, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8001f80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1848001f80000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "prefetch_add_l3", TILEGX_OPC_PREFETCH_ADD_L3, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8001f80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1860001f80000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "prefetch_add_l3_fault", TILEGX_OPC_PREFETCH_ADD_L3_FAULT, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8001f80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1858001f80000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "prefetch_l1", TILEGX_OPC_PREFETCH_L1, 0x12, 1, TREG_ZERO, 1,
+ { { 0, }, { 7 }, { 0, }, { 0, }, { 14 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff81f80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc3f8000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x286a801f80000000ULL,
+ -1ULL,
+ -1ULL,
+ 0x41f8000004000000ULL
+ }
+#endif
+ },
+ { "prefetch_l1_fault", TILEGX_OPC_PREFETCH_L1_FAULT, 0x12, 1, TREG_ZERO, 1,
+ { { 0, }, { 7 }, { 0, }, { 0, }, { 14 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff81f80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc3f8000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x286a781f80000000ULL,
+ -1ULL,
+ -1ULL,
+ 0x41f8000000000000ULL
+ }
+#endif
+ },
+ { "prefetch_l2", TILEGX_OPC_PREFETCH_L2, 0x12, 1, TREG_ZERO, 1,
+ { { 0, }, { 7 }, { 0, }, { 0, }, { 14 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff81f80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc3f8000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x286a901f80000000ULL,
+ -1ULL,
+ -1ULL,
+ 0x43f8000004000000ULL
+ }
+#endif
+ },
+ { "prefetch_l2_fault", TILEGX_OPC_PREFETCH_L2_FAULT, 0x12, 1, TREG_ZERO, 1,
+ { { 0, }, { 7 }, { 0, }, { 0, }, { 14 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff81f80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc3f8000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x286a881f80000000ULL,
+ -1ULL,
+ -1ULL,
+ 0x43f8000000000000ULL
+ }
+#endif
+ },
+ { "prefetch_l3", TILEGX_OPC_PREFETCH_L3, 0x12, 1, TREG_ZERO, 1,
+ { { 0, }, { 7 }, { 0, }, { 0, }, { 14 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff81f80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc3f8000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x286aa01f80000000ULL,
+ -1ULL,
+ -1ULL,
+ 0x83f8000000000000ULL
+ }
+#endif
+ },
+ { "prefetch_l3_fault", TILEGX_OPC_PREFETCH_L3_FAULT, 0x12, 1, TREG_ZERO, 1,
+ { { 0, }, { 7 }, { 0, }, { 0, }, { 14 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff81f80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc3f8000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x286a981f80000000ULL,
+ -1ULL,
+ -1ULL,
+ 0x81f8000004000000ULL
+ }
+#endif
+ },
+ { "raise", TILEGX_OPC_RAISE, 0x2, 0, TREG_ZERO, 1,
+ { { 0, }, { }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffffffff80000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286a44ae80000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "add", TILEGX_OPC_ADD, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x00000000500c0000ULL,
+ 0x2806000000000000ULL,
+ 0x0000000028040000ULL,
+ 0x1802000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "addi", TILEGX_OPC_ADDI, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 10, 11, 2 }, { 12, 13, 3 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0x0000000078000000ULL,
+ 0x3c00000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040100000ULL,
+ 0x1808000000000000ULL,
+ 0ULL,
+ 0x0400000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "addli", TILEGX_OPC_ADDLI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 4 }, { 6, 7, 5 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc000000070000000ULL,
+ 0xf800000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000010000000ULL,
+ 0ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "addx", TILEGX_OPC_ADDX, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050080000ULL,
+ 0x2804000000000000ULL,
+ 0x0000000028000000ULL,
+ 0x1800000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "addxi", TILEGX_OPC_ADDXI, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 10, 11, 2 }, { 12, 13, 3 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0x0000000078000000ULL,
+ 0x3c00000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040200000ULL,
+ 0x1810000000000000ULL,
+ 0x0000000008000000ULL,
+ 0x0800000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "addxli", TILEGX_OPC_ADDXLI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 4 }, { 6, 7, 5 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc000000070000000ULL,
+ 0xf800000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000020000000ULL,
+ 0x0800000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "addxsc", TILEGX_OPC_ADDXSC, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050040000ULL,
+ 0x2802000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "and", TILEGX_OPC_AND, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050100000ULL,
+ 0x2808000000000000ULL,
+ 0x0000000050000000ULL,
+ 0x2c00000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "andi", TILEGX_OPC_ANDI, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 10, 11, 2 }, { 12, 13, 3 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0x0000000078000000ULL,
+ 0x3c00000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040300000ULL,
+ 0x1818000000000000ULL,
+ 0x0000000010000000ULL,
+ 0x0c00000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "beqz", TILEGX_OPC_BEQZ, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1440000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "beqzt", TILEGX_OPC_BEQZT, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1400000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "bfexts", TILEGX_OPC_BFEXTS, 0x1, 4, TREG_ZERO, 1,
+ { { 8, 9, 21, 22 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007f000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000034000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "bfextu", TILEGX_OPC_BFEXTU, 0x1, 4, TREG_ZERO, 1,
+ { { 8, 9, 21, 22 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007f000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000035000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "bfins", TILEGX_OPC_BFINS, 0x1, 4, TREG_ZERO, 1,
+ { { 23, 9, 21, 22 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007f000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000036000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "bgez", TILEGX_OPC_BGEZ, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x14c0000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "bgezt", TILEGX_OPC_BGEZT, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1480000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "bgtz", TILEGX_OPC_BGTZ, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1540000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "bgtzt", TILEGX_OPC_BGTZT, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1500000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "blbc", TILEGX_OPC_BLBC, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x15c0000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "blbct", TILEGX_OPC_BLBCT, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1580000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "blbs", TILEGX_OPC_BLBS, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1640000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "blbst", TILEGX_OPC_BLBST, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1600000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "blez", TILEGX_OPC_BLEZ, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x16c0000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "blezt", TILEGX_OPC_BLEZT, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1680000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "bltz", TILEGX_OPC_BLTZ, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1740000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "bltzt", TILEGX_OPC_BLTZT, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1700000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "bnez", TILEGX_OPC_BNEZ, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x17c0000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "bnezt", TILEGX_OPC_BNEZT, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 20 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xffc0000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1780000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "clz", TILEGX_OPC_CLZ, 0x5, 2, TREG_ZERO, 1,
+ { { 8, 9 }, { 0, }, { 10, 11 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffff000ULL,
+ 0ULL,
+ 0x00000000780ff000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051481000ULL,
+ -1ULL,
+ 0x00000000300c1000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmoveqz", TILEGX_OPC_CMOVEQZ, 0x5, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 24, 11, 18 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0x00000000780c0000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050140000ULL,
+ -1ULL,
+ 0x0000000048000000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmovnez", TILEGX_OPC_CMOVNEZ, 0x5, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 24, 11, 18 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0x00000000780c0000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050180000ULL,
+ -1ULL,
+ 0x0000000048040000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmpeq", TILEGX_OPC_CMPEQ, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x00000000501c0000ULL,
+ 0x280a000000000000ULL,
+ 0x0000000040000000ULL,
+ 0x2404000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmpeqi", TILEGX_OPC_CMPEQI, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 10, 11, 2 }, { 12, 13, 3 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0x0000000078000000ULL,
+ 0x3c00000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040400000ULL,
+ 0x1820000000000000ULL,
+ 0x0000000018000000ULL,
+ 0x1000000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmpexch", TILEGX_OPC_CMPEXCH, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x280e000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmpexch4", TILEGX_OPC_CMPEXCH4, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x280c000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmples", TILEGX_OPC_CMPLES, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050200000ULL,
+ 0x2810000000000000ULL,
+ 0x0000000038000000ULL,
+ 0x2000000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmpleu", TILEGX_OPC_CMPLEU, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050240000ULL,
+ 0x2812000000000000ULL,
+ 0x0000000038040000ULL,
+ 0x2002000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmplts", TILEGX_OPC_CMPLTS, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050280000ULL,
+ 0x2814000000000000ULL,
+ 0x0000000038080000ULL,
+ 0x2004000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmpltsi", TILEGX_OPC_CMPLTSI, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 10, 11, 2 }, { 12, 13, 3 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0x0000000078000000ULL,
+ 0x3c00000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040500000ULL,
+ 0x1828000000000000ULL,
+ 0x0000000020000000ULL,
+ 0x1400000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmpltu", TILEGX_OPC_CMPLTU, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x00000000502c0000ULL,
+ 0x2816000000000000ULL,
+ 0x00000000380c0000ULL,
+ 0x2006000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmpltui", TILEGX_OPC_CMPLTUI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040600000ULL,
+ 0x1830000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmpne", TILEGX_OPC_CMPNE, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050300000ULL,
+ 0x2818000000000000ULL,
+ 0x0000000040040000ULL,
+ 0x2406000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmul", TILEGX_OPC_CMUL, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000504c0000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmula", TILEGX_OPC_CMULA, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050380000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmulaf", TILEGX_OPC_CMULAF, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050340000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmulf", TILEGX_OPC_CMULF, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050400000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmulfr", TILEGX_OPC_CMULFR, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000503c0000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmulh", TILEGX_OPC_CMULH, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050480000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "cmulhr", TILEGX_OPC_CMULHR, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050440000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "crc32_32", TILEGX_OPC_CRC32_32, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050500000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "crc32_8", TILEGX_OPC_CRC32_8, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050540000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ctz", TILEGX_OPC_CTZ, 0x5, 2, TREG_ZERO, 1,
+ { { 8, 9 }, { 0, }, { 10, 11 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffff000ULL,
+ 0ULL,
+ 0x00000000780ff000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051482000ULL,
+ -1ULL,
+ 0x00000000300c2000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "dblalign", TILEGX_OPC_DBLALIGN, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050640000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "dblalign2", TILEGX_OPC_DBLALIGN2, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050580000ULL,
+ 0x281a000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "dblalign4", TILEGX_OPC_DBLALIGN4, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000505c0000ULL,
+ 0x281c000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "dblalign6", TILEGX_OPC_DBLALIGN6, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050600000ULL,
+ 0x281e000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "drain", TILEGX_OPC_DRAIN, 0x2, 0, TREG_ZERO, 0,
+ { { 0, }, { }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286a080000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "dtlbpr", TILEGX_OPC_DTLBPR, 0x2, 1, TREG_ZERO, 1,
+ { { 0, }, { 7 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286a100000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "exch", TILEGX_OPC_EXCH, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x2822000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "exch4", TILEGX_OPC_EXCH4, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x2820000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fdouble_add_flags", TILEGX_OPC_FDOUBLE_ADD_FLAGS, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000506c0000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fdouble_addsub", TILEGX_OPC_FDOUBLE_ADDSUB, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050680000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fdouble_mul_flags", TILEGX_OPC_FDOUBLE_MUL_FLAGS, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050700000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fdouble_pack1", TILEGX_OPC_FDOUBLE_PACK1, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050740000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fdouble_pack2", TILEGX_OPC_FDOUBLE_PACK2, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050780000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fdouble_sub_flags", TILEGX_OPC_FDOUBLE_SUB_FLAGS, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000507c0000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fdouble_unpack_max", TILEGX_OPC_FDOUBLE_UNPACK_MAX, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050800000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fdouble_unpack_min", TILEGX_OPC_FDOUBLE_UNPACK_MIN, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050840000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fetchadd", TILEGX_OPC_FETCHADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x282a000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fetchadd4", TILEGX_OPC_FETCHADD4, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x2824000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fetchaddgez", TILEGX_OPC_FETCHADDGEZ, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x2828000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fetchaddgez4", TILEGX_OPC_FETCHADDGEZ4, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x2826000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fetchand", TILEGX_OPC_FETCHAND, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x282e000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fetchand4", TILEGX_OPC_FETCHAND4, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x282c000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fetchor", TILEGX_OPC_FETCHOR, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x2832000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fetchor4", TILEGX_OPC_FETCHOR4, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x2830000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "finv", TILEGX_OPC_FINV, 0x2, 1, TREG_ZERO, 1,
+ { { 0, }, { 7 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286a180000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "flush", TILEGX_OPC_FLUSH, 0x2, 1, TREG_ZERO, 1,
+ { { 0, }, { 7 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286a280000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "flushwb", TILEGX_OPC_FLUSHWB, 0x2, 0, TREG_ZERO, 1,
+ { { 0, }, { }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286a200000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fnop", TILEGX_OPC_FNOP, 0xf, 0, TREG_ZERO, 1,
+ { { }, { }, { }, { }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffff000ULL,
+ 0xfffff80000000000ULL,
+ 0x00000000780ff000ULL,
+ 0x3c07f80000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051483000ULL,
+ 0x286a300000000000ULL,
+ 0x00000000300c3000ULL,
+ 0x1c06400000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fsingle_add1", TILEGX_OPC_FSINGLE_ADD1, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050880000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fsingle_addsub2", TILEGX_OPC_FSINGLE_ADDSUB2, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000508c0000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fsingle_mul1", TILEGX_OPC_FSINGLE_MUL1, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050900000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fsingle_mul2", TILEGX_OPC_FSINGLE_MUL2, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050940000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fsingle_pack1", TILEGX_OPC_FSINGLE_PACK1, 0x5, 2, TREG_ZERO, 1,
+ { { 8, 9 }, { 0, }, { 10, 11 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffff000ULL,
+ 0ULL,
+ 0x00000000780ff000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051484000ULL,
+ -1ULL,
+ 0x00000000300c4000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fsingle_pack2", TILEGX_OPC_FSINGLE_PACK2, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050980000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "fsingle_sub1", TILEGX_OPC_FSINGLE_SUB1, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000509c0000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "icoh", TILEGX_OPC_ICOH, 0x2, 1, TREG_ZERO, 1,
+ { { 0, }, { 7 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286a380000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ill", TILEGX_OPC_ILL, 0xa, 0, TREG_ZERO, 1,
+ { { 0, }, { }, { 0, }, { }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0x3c07f80000000000ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286a400000000000ULL,
+ -1ULL,
+ 0x1c06480000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "inv", TILEGX_OPC_INV, 0x2, 1, TREG_ZERO, 1,
+ { { 0, }, { 7 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286a480000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "iret", TILEGX_OPC_IRET, 0x2, 0, TREG_ZERO, 1,
+ { { 0, }, { }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286a500000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "j", TILEGX_OPC_J, 0x2, 1, TREG_ZERO, 1,
+ { { 0, }, { 25 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfc00000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x2400000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "jal", TILEGX_OPC_JAL, 0x2, 1, TREG_LR, 1,
+ { { 0, }, { 25 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfc00000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x2000000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "jalr", TILEGX_OPC_JALR, 0xa, 1, TREG_LR, 1,
+ { { 0, }, { 7 }, { 0, }, { 13 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0x3c07f80000000000ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286a600000000000ULL,
+ -1ULL,
+ 0x1c06580000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "jalrp", TILEGX_OPC_JALRP, 0xa, 1, TREG_LR, 1,
+ { { 0, }, { 7 }, { 0, }, { 13 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0x3c07f80000000000ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286a580000000000ULL,
+ -1ULL,
+ 0x1c06500000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "jr", TILEGX_OPC_JR, 0xa, 1, TREG_ZERO, 1,
+ { { 0, }, { 7 }, { 0, }, { 13 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0x3c07f80000000000ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286a700000000000ULL,
+ -1ULL,
+ 0x1c06680000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "jrp", TILEGX_OPC_JRP, 0xa, 1, TREG_ZERO, 1,
+ { { 0, }, { 7 }, { 0, }, { 13 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0x3c07f80000000000ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286a680000000000ULL,
+ -1ULL,
+ 0x1c06600000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ld", TILEGX_OPC_LD, 0x12, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 7 }, { 0, }, { 0, }, { 26, 14 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc200000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x286ae80000000000ULL,
+ -1ULL,
+ -1ULL,
+ 0x8200000004000000ULL
+ }
+#endif
+ },
+ { "ld1s", TILEGX_OPC_LD1S, 0x12, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 7 }, { 0, }, { 0, }, { 26, 14 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc200000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x286a780000000000ULL,
+ -1ULL,
+ -1ULL,
+ 0x4000000000000000ULL
+ }
+#endif
+ },
+ { "ld1s_add", TILEGX_OPC_LD1S_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1838000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ld1u", TILEGX_OPC_LD1U, 0x12, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 7 }, { 0, }, { 0, }, { 26, 14 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc200000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x286a800000000000ULL,
+ -1ULL,
+ -1ULL,
+ 0x4000000004000000ULL
+ }
+#endif
+ },
+ { "ld1u_add", TILEGX_OPC_LD1U_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1840000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ld2s", TILEGX_OPC_LD2S, 0x12, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 7 }, { 0, }, { 0, }, { 26, 14 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc200000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x286a880000000000ULL,
+ -1ULL,
+ -1ULL,
+ 0x4200000000000000ULL
+ }
+#endif
+ },
+ { "ld2s_add", TILEGX_OPC_LD2S_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1848000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ld2u", TILEGX_OPC_LD2U, 0x12, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 7 }, { 0, }, { 0, }, { 26, 14 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc200000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x286a900000000000ULL,
+ -1ULL,
+ -1ULL,
+ 0x4200000004000000ULL
+ }
+#endif
+ },
+ { "ld2u_add", TILEGX_OPC_LD2U_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1850000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ld4s", TILEGX_OPC_LD4S, 0x12, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 7 }, { 0, }, { 0, }, { 26, 14 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc200000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x286a980000000000ULL,
+ -1ULL,
+ -1ULL,
+ 0x8000000004000000ULL
+ }
+#endif
+ },
+ { "ld4s_add", TILEGX_OPC_LD4S_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1858000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ld4u", TILEGX_OPC_LD4U, 0x12, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 7 }, { 0, }, { 0, }, { 26, 14 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc200000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x286aa00000000000ULL,
+ -1ULL,
+ -1ULL,
+ 0x8200000000000000ULL
+ }
+#endif
+ },
+ { "ld4u_add", TILEGX_OPC_LD4U_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1860000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ld_add", TILEGX_OPC_LD_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x18a0000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldna", TILEGX_OPC_LDNA, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 7 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286aa80000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldna_add", TILEGX_OPC_LDNA_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x18a8000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldnt", TILEGX_OPC_LDNT, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 7 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286ae00000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldnt1s", TILEGX_OPC_LDNT1S, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 7 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286ab00000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldnt1s_add", TILEGX_OPC_LDNT1S_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1868000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldnt1u", TILEGX_OPC_LDNT1U, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 7 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286ab80000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldnt1u_add", TILEGX_OPC_LDNT1U_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1870000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldnt2s", TILEGX_OPC_LDNT2S, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 7 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286ac00000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldnt2s_add", TILEGX_OPC_LDNT2S_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1878000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldnt2u", TILEGX_OPC_LDNT2U, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 7 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286ac80000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldnt2u_add", TILEGX_OPC_LDNT2U_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1880000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldnt4s", TILEGX_OPC_LDNT4S, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 7 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286ad00000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldnt4s_add", TILEGX_OPC_LDNT4S_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1888000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldnt4u", TILEGX_OPC_LDNT4U, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 7 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286ad80000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldnt4u_add", TILEGX_OPC_LDNT4U_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1890000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ldnt_add", TILEGX_OPC_LDNT_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 6, 15, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1898000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "lnk", TILEGX_OPC_LNK, 0xa, 1, TREG_ZERO, 1,
+ { { 0, }, { 6 }, { 0, }, { 12 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0x3c07f80000000000ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286af00000000000ULL,
+ -1ULL,
+ 0x1c06700000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mf", TILEGX_OPC_MF, 0x2, 0, TREG_ZERO, 1,
+ { { 0, }, { }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286af80000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mfspr", TILEGX_OPC_MFSPR, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 6, 27 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x18b0000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mm", TILEGX_OPC_MM, 0x1, 4, TREG_ZERO, 1,
+ { { 23, 9, 21, 22 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007f000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000037000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mnz", TILEGX_OPC_MNZ, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050a00000ULL,
+ 0x2834000000000000ULL,
+ 0x0000000048080000ULL,
+ 0x2804000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mtspr", TILEGX_OPC_MTSPR, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 28, 7 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x18b8000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mul_hs_hs", TILEGX_OPC_MUL_HS_HS, 0x5, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 10, 11, 18 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0x00000000780c0000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050d40000ULL,
+ -1ULL,
+ 0x0000000068000000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mul_hs_hu", TILEGX_OPC_MUL_HS_HU, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050d80000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mul_hs_ls", TILEGX_OPC_MUL_HS_LS, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050dc0000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mul_hs_lu", TILEGX_OPC_MUL_HS_LU, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050e00000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mul_hu_hu", TILEGX_OPC_MUL_HU_HU, 0x5, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 10, 11, 18 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0x00000000780c0000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050e40000ULL,
+ -1ULL,
+ 0x0000000068040000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mul_hu_ls", TILEGX_OPC_MUL_HU_LS, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050e80000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mul_hu_lu", TILEGX_OPC_MUL_HU_LU, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050ec0000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mul_ls_ls", TILEGX_OPC_MUL_LS_LS, 0x5, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 10, 11, 18 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0x00000000780c0000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050f00000ULL,
+ -1ULL,
+ 0x0000000068080000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mul_ls_lu", TILEGX_OPC_MUL_LS_LU, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050f40000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mul_lu_lu", TILEGX_OPC_MUL_LU_LU, 0x5, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 10, 11, 18 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0x00000000780c0000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050f80000ULL,
+ -1ULL,
+ 0x00000000680c0000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mula_hs_hs", TILEGX_OPC_MULA_HS_HS, 0x5, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 24, 11, 18 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0x00000000780c0000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050a80000ULL,
+ -1ULL,
+ 0x0000000070000000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mula_hs_hu", TILEGX_OPC_MULA_HS_HU, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050ac0000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mula_hs_ls", TILEGX_OPC_MULA_HS_LS, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050b00000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mula_hs_lu", TILEGX_OPC_MULA_HS_LU, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050b40000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mula_hu_hu", TILEGX_OPC_MULA_HU_HU, 0x5, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 24, 11, 18 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0x00000000780c0000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050b80000ULL,
+ -1ULL,
+ 0x0000000070040000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mula_hu_ls", TILEGX_OPC_MULA_HU_LS, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050bc0000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mula_hu_lu", TILEGX_OPC_MULA_HU_LU, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050c00000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mula_ls_ls", TILEGX_OPC_MULA_LS_LS, 0x5, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 24, 11, 18 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0x00000000780c0000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050c40000ULL,
+ -1ULL,
+ 0x0000000070080000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mula_ls_lu", TILEGX_OPC_MULA_LS_LU, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050c80000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mula_lu_lu", TILEGX_OPC_MULA_LU_LU, 0x5, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 24, 11, 18 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0x00000000780c0000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050cc0000ULL,
+ -1ULL,
+ 0x00000000700c0000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mulax", TILEGX_OPC_MULAX, 0x5, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 24, 11, 18 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0x00000000780c0000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050a40000ULL,
+ -1ULL,
+ 0x0000000040080000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mulx", TILEGX_OPC_MULX, 0x5, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 10, 11, 18 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0x00000000780c0000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050d00000ULL,
+ -1ULL,
+ 0x00000000400c0000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "mz", TILEGX_OPC_MZ, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000050fc0000ULL,
+ 0x2836000000000000ULL,
+ 0x00000000480c0000ULL,
+ 0x2806000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "nap", TILEGX_OPC_NAP, 0x2, 0, TREG_ZERO, 0,
+ { { 0, }, { }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286b000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "nop", TILEGX_OPC_NOP, 0xf, 0, TREG_ZERO, 1,
+ { { }, { }, { }, { }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffff000ULL,
+ 0xfffff80000000000ULL,
+ 0x00000000780ff000ULL,
+ 0x3c07f80000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051485000ULL,
+ 0x286b080000000000ULL,
+ 0x00000000300c5000ULL,
+ 0x1c06780000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "nor", TILEGX_OPC_NOR, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051000000ULL,
+ 0x2838000000000000ULL,
+ 0x0000000050040000ULL,
+ 0x2c02000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "or", TILEGX_OPC_OR, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051040000ULL,
+ 0x283a000000000000ULL,
+ 0x0000000050080000ULL,
+ 0x2c04000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "ori", TILEGX_OPC_ORI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040700000ULL,
+ 0x18c0000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "pcnt", TILEGX_OPC_PCNT, 0x5, 2, TREG_ZERO, 1,
+ { { 8, 9 }, { 0, }, { 10, 11 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffff000ULL,
+ 0ULL,
+ 0x00000000780ff000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051486000ULL,
+ -1ULL,
+ 0x00000000300c6000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "revbits", TILEGX_OPC_REVBITS, 0x5, 2, TREG_ZERO, 1,
+ { { 8, 9 }, { 0, }, { 10, 11 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffff000ULL,
+ 0ULL,
+ 0x00000000780ff000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051487000ULL,
+ -1ULL,
+ 0x00000000300c7000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "revbytes", TILEGX_OPC_REVBYTES, 0x5, 2, TREG_ZERO, 1,
+ { { 8, 9 }, { 0, }, { 10, 11 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffff000ULL,
+ 0ULL,
+ 0x00000000780ff000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051488000ULL,
+ -1ULL,
+ 0x00000000300c8000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "rotl", TILEGX_OPC_ROTL, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051080000ULL,
+ 0x283c000000000000ULL,
+ 0x0000000058000000ULL,
+ 0x3000000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "rotli", TILEGX_OPC_ROTLI, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 29 }, { 6, 7, 30 }, { 10, 11, 31 }, { 12, 13, 32 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000060040000ULL,
+ 0x3002000000000000ULL,
+ 0x0000000078000000ULL,
+ 0x3800000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shl", TILEGX_OPC_SHL, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051280000ULL,
+ 0x284c000000000000ULL,
+ 0x0000000058040000ULL,
+ 0x3002000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shl16insli", TILEGX_OPC_SHL16INSLI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 4 }, { 6, 7, 5 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc000000070000000ULL,
+ 0xf800000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000070000000ULL,
+ 0x3800000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shl1add", TILEGX_OPC_SHL1ADD, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051100000ULL,
+ 0x2840000000000000ULL,
+ 0x0000000030000000ULL,
+ 0x1c00000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shl1addx", TILEGX_OPC_SHL1ADDX, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x00000000510c0000ULL,
+ 0x283e000000000000ULL,
+ 0x0000000060040000ULL,
+ 0x3402000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shl2add", TILEGX_OPC_SHL2ADD, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051180000ULL,
+ 0x2844000000000000ULL,
+ 0x0000000030040000ULL,
+ 0x1c02000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shl2addx", TILEGX_OPC_SHL2ADDX, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051140000ULL,
+ 0x2842000000000000ULL,
+ 0x0000000060080000ULL,
+ 0x3404000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shl3add", TILEGX_OPC_SHL3ADD, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051200000ULL,
+ 0x2848000000000000ULL,
+ 0x0000000030080000ULL,
+ 0x1c04000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shl3addx", TILEGX_OPC_SHL3ADDX, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x00000000511c0000ULL,
+ 0x2846000000000000ULL,
+ 0x00000000600c0000ULL,
+ 0x3406000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shli", TILEGX_OPC_SHLI, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 29 }, { 6, 7, 30 }, { 10, 11, 31 }, { 12, 13, 32 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000060080000ULL,
+ 0x3004000000000000ULL,
+ 0x0000000078040000ULL,
+ 0x3802000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shlx", TILEGX_OPC_SHLX, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051240000ULL,
+ 0x284a000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shlxi", TILEGX_OPC_SHLXI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 29 }, { 6, 7, 30 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000600c0000ULL,
+ 0x3006000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shrs", TILEGX_OPC_SHRS, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x00000000512c0000ULL,
+ 0x284e000000000000ULL,
+ 0x0000000058080000ULL,
+ 0x3004000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shrsi", TILEGX_OPC_SHRSI, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 29 }, { 6, 7, 30 }, { 10, 11, 31 }, { 12, 13, 32 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000060100000ULL,
+ 0x3008000000000000ULL,
+ 0x0000000078080000ULL,
+ 0x3804000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shru", TILEGX_OPC_SHRU, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051340000ULL,
+ 0x2852000000000000ULL,
+ 0x00000000580c0000ULL,
+ 0x3006000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shrui", TILEGX_OPC_SHRUI, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 29 }, { 6, 7, 30 }, { 10, 11, 31 }, { 12, 13, 32 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000060140000ULL,
+ 0x300a000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3806000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shrux", TILEGX_OPC_SHRUX, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051300000ULL,
+ 0x2850000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shruxi", TILEGX_OPC_SHRUXI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 29 }, { 6, 7, 30 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000060180000ULL,
+ 0x300c000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "shufflebytes", TILEGX_OPC_SHUFFLEBYTES, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051380000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "st", TILEGX_OPC_ST, 0x12, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 17 }, { 0, }, { 0, }, { 14, 33 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc200000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x2862000000000000ULL,
+ -1ULL,
+ -1ULL,
+ 0xc200000004000000ULL
+ }
+#endif
+ },
+ { "st1", TILEGX_OPC_ST1, 0x12, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 17 }, { 0, }, { 0, }, { 14, 33 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc200000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x2854000000000000ULL,
+ -1ULL,
+ -1ULL,
+ 0xc000000000000000ULL
+ }
+#endif
+ },
+ { "st1_add", TILEGX_OPC_ST1_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 15, 17, 34 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x18c8000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "st2", TILEGX_OPC_ST2, 0x12, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 17 }, { 0, }, { 0, }, { 14, 33 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc200000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x2856000000000000ULL,
+ -1ULL,
+ -1ULL,
+ 0xc000000004000000ULL
+ }
+#endif
+ },
+ { "st2_add", TILEGX_OPC_ST2_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 15, 17, 34 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x18d0000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "st4", TILEGX_OPC_ST4, 0x12, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 17 }, { 0, }, { 0, }, { 14, 33 } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0xc200000004000000ULL
+ },
+ {
+ -1ULL,
+ 0x2858000000000000ULL,
+ -1ULL,
+ -1ULL,
+ 0xc200000000000000ULL
+ }
+#endif
+ },
+ { "st4_add", TILEGX_OPC_ST4_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 15, 17, 34 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x18d8000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "st_add", TILEGX_OPC_ST_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 15, 17, 34 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x1900000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "stnt", TILEGX_OPC_STNT, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x2860000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "stnt1", TILEGX_OPC_STNT1, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x285a000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "stnt1_add", TILEGX_OPC_STNT1_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 15, 17, 34 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x18e0000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "stnt2", TILEGX_OPC_STNT2, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x285c000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "stnt2_add", TILEGX_OPC_STNT2_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 15, 17, 34 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x18e8000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "stnt4", TILEGX_OPC_STNT4, 0x2, 2, TREG_ZERO, 1,
+ { { 0, }, { 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x285e000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "stnt4_add", TILEGX_OPC_STNT4_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 15, 17, 34 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x18f0000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "stnt_add", TILEGX_OPC_STNT_ADD, 0x2, 3, TREG_ZERO, 1,
+ { { 0, }, { 15, 17, 34 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x18f8000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "sub", TILEGX_OPC_SUB, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051440000ULL,
+ 0x2868000000000000ULL,
+ 0x00000000280c0000ULL,
+ 0x1806000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "subx", TILEGX_OPC_SUBX, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051400000ULL,
+ 0x2866000000000000ULL,
+ 0x0000000028080000ULL,
+ 0x1804000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "subxsc", TILEGX_OPC_SUBXSC, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000513c0000ULL,
+ 0x2864000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "swint0", TILEGX_OPC_SWINT0, 0x2, 0, TREG_ZERO, 0,
+ { { 0, }, { }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286b100000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "swint1", TILEGX_OPC_SWINT1, 0x2, 0, TREG_ZERO, 0,
+ { { 0, }, { }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286b180000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "swint2", TILEGX_OPC_SWINT2, 0x2, 0, TREG_ZERO, 0,
+ { { 0, }, { }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286b200000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "swint3", TILEGX_OPC_SWINT3, 0x2, 0, TREG_ZERO, 0,
+ { { 0, }, { }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286b280000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "tblidxb0", TILEGX_OPC_TBLIDXB0, 0x5, 2, TREG_ZERO, 1,
+ { { 23, 9 }, { 0, }, { 24, 11 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffff000ULL,
+ 0ULL,
+ 0x00000000780ff000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051489000ULL,
+ -1ULL,
+ 0x00000000300c9000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "tblidxb1", TILEGX_OPC_TBLIDXB1, 0x5, 2, TREG_ZERO, 1,
+ { { 23, 9 }, { 0, }, { 24, 11 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffff000ULL,
+ 0ULL,
+ 0x00000000780ff000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x000000005148a000ULL,
+ -1ULL,
+ 0x00000000300ca000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "tblidxb2", TILEGX_OPC_TBLIDXB2, 0x5, 2, TREG_ZERO, 1,
+ { { 23, 9 }, { 0, }, { 24, 11 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffff000ULL,
+ 0ULL,
+ 0x00000000780ff000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x000000005148b000ULL,
+ -1ULL,
+ 0x00000000300cb000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "tblidxb3", TILEGX_OPC_TBLIDXB3, 0x5, 2, TREG_ZERO, 1,
+ { { 23, 9 }, { 0, }, { 24, 11 }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffff000ULL,
+ 0ULL,
+ 0x00000000780ff000ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x000000005148c000ULL,
+ -1ULL,
+ 0x00000000300cc000ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1add", TILEGX_OPC_V1ADD, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051500000ULL,
+ 0x286e000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1addi", TILEGX_OPC_V1ADDI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040800000ULL,
+ 0x1908000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1adduc", TILEGX_OPC_V1ADDUC, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000514c0000ULL,
+ 0x286c000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1adiffu", TILEGX_OPC_V1ADIFFU, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051540000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1avgu", TILEGX_OPC_V1AVGU, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051580000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1cmpeq", TILEGX_OPC_V1CMPEQ, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000515c0000ULL,
+ 0x2870000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1cmpeqi", TILEGX_OPC_V1CMPEQI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040900000ULL,
+ 0x1910000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1cmples", TILEGX_OPC_V1CMPLES, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051600000ULL,
+ 0x2872000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1cmpleu", TILEGX_OPC_V1CMPLEU, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051640000ULL,
+ 0x2874000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1cmplts", TILEGX_OPC_V1CMPLTS, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051680000ULL,
+ 0x2876000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1cmpltsi", TILEGX_OPC_V1CMPLTSI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040a00000ULL,
+ 0x1918000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1cmpltu", TILEGX_OPC_V1CMPLTU, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000516c0000ULL,
+ 0x2878000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1cmpltui", TILEGX_OPC_V1CMPLTUI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040b00000ULL,
+ 0x1920000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1cmpne", TILEGX_OPC_V1CMPNE, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051700000ULL,
+ 0x287a000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1ddotpu", TILEGX_OPC_V1DDOTPU, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052880000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1ddotpua", TILEGX_OPC_V1DDOTPUA, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052840000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1ddotpus", TILEGX_OPC_V1DDOTPUS, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051780000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1ddotpusa", TILEGX_OPC_V1DDOTPUSA, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051740000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1dotp", TILEGX_OPC_V1DOTP, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051880000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1dotpa", TILEGX_OPC_V1DOTPA, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000517c0000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1dotpu", TILEGX_OPC_V1DOTPU, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052900000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1dotpua", TILEGX_OPC_V1DOTPUA, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000528c0000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1dotpus", TILEGX_OPC_V1DOTPUS, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051840000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1dotpusa", TILEGX_OPC_V1DOTPUSA, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051800000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1int_h", TILEGX_OPC_V1INT_H, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000518c0000ULL,
+ 0x287c000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1int_l", TILEGX_OPC_V1INT_L, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051900000ULL,
+ 0x287e000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1maxu", TILEGX_OPC_V1MAXU, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051940000ULL,
+ 0x2880000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1maxui", TILEGX_OPC_V1MAXUI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040c00000ULL,
+ 0x1928000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1minu", TILEGX_OPC_V1MINU, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051980000ULL,
+ 0x2882000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1minui", TILEGX_OPC_V1MINUI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040d00000ULL,
+ 0x1930000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1mnz", TILEGX_OPC_V1MNZ, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000519c0000ULL,
+ 0x2884000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1multu", TILEGX_OPC_V1MULTU, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051a00000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1mulu", TILEGX_OPC_V1MULU, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051a80000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1mulus", TILEGX_OPC_V1MULUS, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051a40000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1mz", TILEGX_OPC_V1MZ, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051ac0000ULL,
+ 0x2886000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1sadau", TILEGX_OPC_V1SADAU, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051b00000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1sadu", TILEGX_OPC_V1SADU, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051b40000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1shl", TILEGX_OPC_V1SHL, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051b80000ULL,
+ 0x2888000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1shli", TILEGX_OPC_V1SHLI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 29 }, { 6, 7, 30 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000601c0000ULL,
+ 0x300e000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1shrs", TILEGX_OPC_V1SHRS, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051bc0000ULL,
+ 0x288a000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1shrsi", TILEGX_OPC_V1SHRSI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 29 }, { 6, 7, 30 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000060200000ULL,
+ 0x3010000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1shru", TILEGX_OPC_V1SHRU, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051c00000ULL,
+ 0x288c000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1shrui", TILEGX_OPC_V1SHRUI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 29 }, { 6, 7, 30 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000060240000ULL,
+ 0x3012000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1sub", TILEGX_OPC_V1SUB, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051c80000ULL,
+ 0x2890000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v1subuc", TILEGX_OPC_V1SUBUC, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051c40000ULL,
+ 0x288e000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2add", TILEGX_OPC_V2ADD, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051d00000ULL,
+ 0x2894000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2addi", TILEGX_OPC_V2ADDI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040e00000ULL,
+ 0x1938000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2addsc", TILEGX_OPC_V2ADDSC, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051cc0000ULL,
+ 0x2892000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2adiffs", TILEGX_OPC_V2ADIFFS, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051d40000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2avgs", TILEGX_OPC_V2AVGS, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051d80000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2cmpeq", TILEGX_OPC_V2CMPEQ, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051dc0000ULL,
+ 0x2896000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2cmpeqi", TILEGX_OPC_V2CMPEQI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000040f00000ULL,
+ 0x1940000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2cmples", TILEGX_OPC_V2CMPLES, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051e00000ULL,
+ 0x2898000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2cmpleu", TILEGX_OPC_V2CMPLEU, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051e40000ULL,
+ 0x289a000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2cmplts", TILEGX_OPC_V2CMPLTS, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051e80000ULL,
+ 0x289c000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2cmpltsi", TILEGX_OPC_V2CMPLTSI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000041000000ULL,
+ 0x1948000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2cmpltu", TILEGX_OPC_V2CMPLTU, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051ec0000ULL,
+ 0x289e000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2cmpltui", TILEGX_OPC_V2CMPLTUI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000041100000ULL,
+ 0x1950000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2cmpne", TILEGX_OPC_V2CMPNE, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051f00000ULL,
+ 0x28a0000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2dotp", TILEGX_OPC_V2DOTP, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051f80000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2dotpa", TILEGX_OPC_V2DOTPA, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051f40000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2int_h", TILEGX_OPC_V2INT_H, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000051fc0000ULL,
+ 0x28a2000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2int_l", TILEGX_OPC_V2INT_L, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052000000ULL,
+ 0x28a4000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2maxs", TILEGX_OPC_V2MAXS, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052040000ULL,
+ 0x28a6000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2maxsi", TILEGX_OPC_V2MAXSI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000041200000ULL,
+ 0x1958000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2mins", TILEGX_OPC_V2MINS, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052080000ULL,
+ 0x28a8000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2minsi", TILEGX_OPC_V2MINSI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000041300000ULL,
+ 0x1960000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2mnz", TILEGX_OPC_V2MNZ, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000520c0000ULL,
+ 0x28aa000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2mulfsc", TILEGX_OPC_V2MULFSC, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052100000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2muls", TILEGX_OPC_V2MULS, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052140000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2mults", TILEGX_OPC_V2MULTS, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052180000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2mz", TILEGX_OPC_V2MZ, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000521c0000ULL,
+ 0x28ac000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2packh", TILEGX_OPC_V2PACKH, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052200000ULL,
+ 0x28ae000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2packl", TILEGX_OPC_V2PACKL, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052240000ULL,
+ 0x28b0000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2packuc", TILEGX_OPC_V2PACKUC, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052280000ULL,
+ 0x28b2000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2sadas", TILEGX_OPC_V2SADAS, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000522c0000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2sadau", TILEGX_OPC_V2SADAU, 0x1, 3, TREG_ZERO, 1,
+ { { 23, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052300000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2sads", TILEGX_OPC_V2SADS, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052340000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2sadu", TILEGX_OPC_V2SADU, 0x1, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 0, }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052380000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2shl", TILEGX_OPC_V2SHL, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052400000ULL,
+ 0x28b6000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2shli", TILEGX_OPC_V2SHLI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 29 }, { 6, 7, 30 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000060280000ULL,
+ 0x3014000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2shlsc", TILEGX_OPC_V2SHLSC, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000523c0000ULL,
+ 0x28b4000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2shrs", TILEGX_OPC_V2SHRS, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052440000ULL,
+ 0x28b8000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2shrsi", TILEGX_OPC_V2SHRSI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 29 }, { 6, 7, 30 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000602c0000ULL,
+ 0x3016000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2shru", TILEGX_OPC_V2SHRU, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052480000ULL,
+ 0x28ba000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2shrui", TILEGX_OPC_V2SHRUI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 29 }, { 6, 7, 30 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000060300000ULL,
+ 0x3018000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2sub", TILEGX_OPC_V2SUB, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052500000ULL,
+ 0x28be000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v2subsc", TILEGX_OPC_V2SUBSC, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000524c0000ULL,
+ 0x28bc000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v4add", TILEGX_OPC_V4ADD, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052580000ULL,
+ 0x28c2000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v4addsc", TILEGX_OPC_V4ADDSC, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052540000ULL,
+ 0x28c0000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v4int_h", TILEGX_OPC_V4INT_H, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000525c0000ULL,
+ 0x28c4000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v4int_l", TILEGX_OPC_V4INT_L, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052600000ULL,
+ 0x28c6000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v4packsc", TILEGX_OPC_V4PACKSC, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052640000ULL,
+ 0x28c8000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v4shl", TILEGX_OPC_V4SHL, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000526c0000ULL,
+ 0x28cc000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v4shlsc", TILEGX_OPC_V4SHLSC, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052680000ULL,
+ 0x28ca000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v4shrs", TILEGX_OPC_V4SHRS, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052700000ULL,
+ 0x28ce000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v4shru", TILEGX_OPC_V4SHRU, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052740000ULL,
+ 0x28d0000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v4sub", TILEGX_OPC_V4SUB, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x00000000527c0000ULL,
+ 0x28d4000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "v4subsc", TILEGX_OPC_V4SUBSC, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052780000ULL,
+ 0x28d2000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "wh64", TILEGX_OPC_WH64, 0x2, 1, TREG_ZERO, 1,
+ { { 0, }, { 7 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0ULL,
+ 0xfffff80000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ -1ULL,
+ 0x286b300000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "xor", TILEGX_OPC_XOR, 0xf, 3, TREG_ZERO, 1,
+ { { 8, 9, 16 }, { 6, 7, 17 }, { 10, 11, 18 }, { 12, 13, 19 }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ffc0000ULL,
+ 0xfffe000000000000ULL,
+ 0x00000000780c0000ULL,
+ 0x3c06000000000000ULL,
+ 0ULL
+ },
+ {
+ 0x0000000052800000ULL,
+ 0x28d6000000000000ULL,
+ 0x00000000500c0000ULL,
+ 0x2c06000000000000ULL,
+ -1ULL
+ }
+#endif
+ },
+ { "xori", TILEGX_OPC_XORI, 0x3, 3, TREG_ZERO, 1,
+ { { 8, 9, 0 }, { 6, 7, 1 }, { 0, }, { 0, }, { 0, } },
+#ifndef DISASM_ONLY
+ {
+ 0xc00000007ff00000ULL,
+ 0xfff8000000000000ULL,
+ 0ULL,
+ 0ULL,
+ 0ULL
+ },
+ {
+ 0x0000000041400000ULL,
+ 0x1968000000000000ULL,
+ -1ULL,
+ -1ULL,
+ -1ULL
+ }
+#endif
+ },
+ { NULL, TILEGX_OPC_NONE, 0, 0, TREG_ZERO, 0, { { 0, } },
+#ifndef DISASM_ONLY
+ { 0, }, { 0, }
+#endif
+ }
+};
+
+#define BITFIELD(start, size) ((start) | (((1 << (size)) - 1) << 6))
+#define CHILD(array_index) (TILEGX_OPC_NONE + (array_index))
+
+static const unsigned short decode_X0_fsm[936] =
+{
+ BITFIELD(22, 9) /* index 0 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_BFEXTS,
+ TILEGX_OPC_BFEXTS, TILEGX_OPC_BFEXTS, TILEGX_OPC_BFEXTS, TILEGX_OPC_BFEXTU,
+ TILEGX_OPC_BFEXTU, TILEGX_OPC_BFEXTU, TILEGX_OPC_BFEXTU, TILEGX_OPC_BFINS,
+ TILEGX_OPC_BFINS, TILEGX_OPC_BFINS, TILEGX_OPC_BFINS, TILEGX_OPC_MM,
+ TILEGX_OPC_MM, TILEGX_OPC_MM, TILEGX_OPC_MM, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, CHILD(528), CHILD(578),
+ CHILD(583), CHILD(588), CHILD(593), CHILD(598), TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, CHILD(603), CHILD(620), CHILD(637), CHILD(654), CHILD(671),
+ CHILD(703), CHILD(797), CHILD(814), CHILD(831), CHILD(848), CHILD(865),
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, CHILD(889), TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906),
+ CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906),
+ CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906),
+ CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906),
+ CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906),
+ CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906),
+ CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906),
+ CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906),
+ CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906),
+ CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906),
+ CHILD(906), CHILD(906), CHILD(906), CHILD(906), CHILD(906),
+ BITFIELD(6, 2) /* index 513 */,
+ TILEGX_OPC_ADDLI, TILEGX_OPC_ADDLI, TILEGX_OPC_ADDLI, CHILD(518),
+ BITFIELD(8, 2) /* index 518 */,
+ TILEGX_OPC_ADDLI, TILEGX_OPC_ADDLI, TILEGX_OPC_ADDLI, CHILD(523),
+ BITFIELD(10, 2) /* index 523 */,
+ TILEGX_OPC_ADDLI, TILEGX_OPC_ADDLI, TILEGX_OPC_ADDLI, TILEGX_OPC_MOVELI,
+ BITFIELD(20, 2) /* index 528 */,
+ TILEGX_OPC_NONE, CHILD(533), TILEGX_OPC_ADDXI, CHILD(548),
+ BITFIELD(6, 2) /* index 533 */,
+ TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, CHILD(538),
+ BITFIELD(8, 2) /* index 538 */,
+ TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, CHILD(543),
+ BITFIELD(10, 2) /* index 543 */,
+ TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_MOVEI,
+ BITFIELD(0, 2) /* index 548 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(553),
+ BITFIELD(2, 2) /* index 553 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(558),
+ BITFIELD(4, 2) /* index 558 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(563),
+ BITFIELD(6, 2) /* index 563 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(568),
+ BITFIELD(8, 2) /* index 568 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(573),
+ BITFIELD(10, 2) /* index 573 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_INFO,
+ BITFIELD(20, 2) /* index 578 */,
+ TILEGX_OPC_CMPEQI, TILEGX_OPC_CMPLTSI, TILEGX_OPC_CMPLTUI, TILEGX_OPC_ORI,
+ BITFIELD(20, 2) /* index 583 */,
+ TILEGX_OPC_V1ADDI, TILEGX_OPC_V1CMPEQI, TILEGX_OPC_V1CMPLTSI,
+ TILEGX_OPC_V1CMPLTUI,
+ BITFIELD(20, 2) /* index 588 */,
+ TILEGX_OPC_V1MAXUI, TILEGX_OPC_V1MINUI, TILEGX_OPC_V2ADDI,
+ TILEGX_OPC_V2CMPEQI,
+ BITFIELD(20, 2) /* index 593 */,
+ TILEGX_OPC_V2CMPLTSI, TILEGX_OPC_V2CMPLTUI, TILEGX_OPC_V2MAXSI,
+ TILEGX_OPC_V2MINSI,
+ BITFIELD(20, 2) /* index 598 */,
+ TILEGX_OPC_XORI, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(18, 4) /* index 603 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_ADDXSC, TILEGX_OPC_ADDX, TILEGX_OPC_ADD,
+ TILEGX_OPC_AND, TILEGX_OPC_CMOVEQZ, TILEGX_OPC_CMOVNEZ, TILEGX_OPC_CMPEQ,
+ TILEGX_OPC_CMPLES, TILEGX_OPC_CMPLEU, TILEGX_OPC_CMPLTS, TILEGX_OPC_CMPLTU,
+ TILEGX_OPC_CMPNE, TILEGX_OPC_CMULAF, TILEGX_OPC_CMULA, TILEGX_OPC_CMULFR,
+ BITFIELD(18, 4) /* index 620 */,
+ TILEGX_OPC_CMULF, TILEGX_OPC_CMULHR, TILEGX_OPC_CMULH, TILEGX_OPC_CMUL,
+ TILEGX_OPC_CRC32_32, TILEGX_OPC_CRC32_8, TILEGX_OPC_DBLALIGN2,
+ TILEGX_OPC_DBLALIGN4, TILEGX_OPC_DBLALIGN6, TILEGX_OPC_DBLALIGN,
+ TILEGX_OPC_FDOUBLE_ADDSUB, TILEGX_OPC_FDOUBLE_ADD_FLAGS,
+ TILEGX_OPC_FDOUBLE_MUL_FLAGS, TILEGX_OPC_FDOUBLE_PACK1,
+ TILEGX_OPC_FDOUBLE_PACK2, TILEGX_OPC_FDOUBLE_SUB_FLAGS,
+ BITFIELD(18, 4) /* index 637 */,
+ TILEGX_OPC_FDOUBLE_UNPACK_MAX, TILEGX_OPC_FDOUBLE_UNPACK_MIN,
+ TILEGX_OPC_FSINGLE_ADD1, TILEGX_OPC_FSINGLE_ADDSUB2,
+ TILEGX_OPC_FSINGLE_MUL1, TILEGX_OPC_FSINGLE_MUL2, TILEGX_OPC_FSINGLE_PACK2,
+ TILEGX_OPC_FSINGLE_SUB1, TILEGX_OPC_MNZ, TILEGX_OPC_MULAX,
+ TILEGX_OPC_MULA_HS_HS, TILEGX_OPC_MULA_HS_HU, TILEGX_OPC_MULA_HS_LS,
+ TILEGX_OPC_MULA_HS_LU, TILEGX_OPC_MULA_HU_HU, TILEGX_OPC_MULA_HU_LS,
+ BITFIELD(18, 4) /* index 654 */,
+ TILEGX_OPC_MULA_HU_LU, TILEGX_OPC_MULA_LS_LS, TILEGX_OPC_MULA_LS_LU,
+ TILEGX_OPC_MULA_LU_LU, TILEGX_OPC_MULX, TILEGX_OPC_MUL_HS_HS,
+ TILEGX_OPC_MUL_HS_HU, TILEGX_OPC_MUL_HS_LS, TILEGX_OPC_MUL_HS_LU,
+ TILEGX_OPC_MUL_HU_HU, TILEGX_OPC_MUL_HU_LS, TILEGX_OPC_MUL_HU_LU,
+ TILEGX_OPC_MUL_LS_LS, TILEGX_OPC_MUL_LS_LU, TILEGX_OPC_MUL_LU_LU,
+ TILEGX_OPC_MZ,
+ BITFIELD(18, 4) /* index 671 */,
+ TILEGX_OPC_NOR, CHILD(688), TILEGX_OPC_ROTL, TILEGX_OPC_SHL1ADDX,
+ TILEGX_OPC_SHL1ADD, TILEGX_OPC_SHL2ADDX, TILEGX_OPC_SHL2ADD,
+ TILEGX_OPC_SHL3ADDX, TILEGX_OPC_SHL3ADD, TILEGX_OPC_SHLX, TILEGX_OPC_SHL,
+ TILEGX_OPC_SHRS, TILEGX_OPC_SHRUX, TILEGX_OPC_SHRU, TILEGX_OPC_SHUFFLEBYTES,
+ TILEGX_OPC_SUBXSC,
+ BITFIELD(12, 2) /* index 688 */,
+ TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_OR, CHILD(693),
+ BITFIELD(14, 2) /* index 693 */,
+ TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_OR, CHILD(698),
+ BITFIELD(16, 2) /* index 698 */,
+ TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_MOVE,
+ BITFIELD(18, 4) /* index 703 */,
+ TILEGX_OPC_SUBX, TILEGX_OPC_SUB, CHILD(720), TILEGX_OPC_V1ADDUC,
+ TILEGX_OPC_V1ADD, TILEGX_OPC_V1ADIFFU, TILEGX_OPC_V1AVGU,
+ TILEGX_OPC_V1CMPEQ, TILEGX_OPC_V1CMPLES, TILEGX_OPC_V1CMPLEU,
+ TILEGX_OPC_V1CMPLTS, TILEGX_OPC_V1CMPLTU, TILEGX_OPC_V1CMPNE,
+ TILEGX_OPC_V1DDOTPUSA, TILEGX_OPC_V1DDOTPUS, TILEGX_OPC_V1DOTPA,
+ BITFIELD(12, 4) /* index 720 */,
+ TILEGX_OPC_NONE, CHILD(737), CHILD(742), CHILD(747), CHILD(752), CHILD(757),
+ CHILD(762), CHILD(767), CHILD(772), CHILD(777), CHILD(782), CHILD(787),
+ CHILD(792), TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(16, 2) /* index 737 */,
+ TILEGX_OPC_CLZ, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(16, 2) /* index 742 */,
+ TILEGX_OPC_CTZ, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(16, 2) /* index 747 */,
+ TILEGX_OPC_FNOP, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(16, 2) /* index 752 */,
+ TILEGX_OPC_FSINGLE_PACK1, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(16, 2) /* index 757 */,
+ TILEGX_OPC_NOP, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(16, 2) /* index 762 */,
+ TILEGX_OPC_PCNT, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(16, 2) /* index 767 */,
+ TILEGX_OPC_REVBITS, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(16, 2) /* index 772 */,
+ TILEGX_OPC_REVBYTES, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(16, 2) /* index 777 */,
+ TILEGX_OPC_TBLIDXB0, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(16, 2) /* index 782 */,
+ TILEGX_OPC_TBLIDXB1, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(16, 2) /* index 787 */,
+ TILEGX_OPC_TBLIDXB2, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(16, 2) /* index 792 */,
+ TILEGX_OPC_TBLIDXB3, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(18, 4) /* index 797 */,
+ TILEGX_OPC_V1DOTPUSA, TILEGX_OPC_V1DOTPUS, TILEGX_OPC_V1DOTP,
+ TILEGX_OPC_V1INT_H, TILEGX_OPC_V1INT_L, TILEGX_OPC_V1MAXU,
+ TILEGX_OPC_V1MINU, TILEGX_OPC_V1MNZ, TILEGX_OPC_V1MULTU, TILEGX_OPC_V1MULUS,
+ TILEGX_OPC_V1MULU, TILEGX_OPC_V1MZ, TILEGX_OPC_V1SADAU, TILEGX_OPC_V1SADU,
+ TILEGX_OPC_V1SHL, TILEGX_OPC_V1SHRS,
+ BITFIELD(18, 4) /* index 814 */,
+ TILEGX_OPC_V1SHRU, TILEGX_OPC_V1SUBUC, TILEGX_OPC_V1SUB, TILEGX_OPC_V2ADDSC,
+ TILEGX_OPC_V2ADD, TILEGX_OPC_V2ADIFFS, TILEGX_OPC_V2AVGS,
+ TILEGX_OPC_V2CMPEQ, TILEGX_OPC_V2CMPLES, TILEGX_OPC_V2CMPLEU,
+ TILEGX_OPC_V2CMPLTS, TILEGX_OPC_V2CMPLTU, TILEGX_OPC_V2CMPNE,
+ TILEGX_OPC_V2DOTPA, TILEGX_OPC_V2DOTP, TILEGX_OPC_V2INT_H,
+ BITFIELD(18, 4) /* index 831 */,
+ TILEGX_OPC_V2INT_L, TILEGX_OPC_V2MAXS, TILEGX_OPC_V2MINS, TILEGX_OPC_V2MNZ,
+ TILEGX_OPC_V2MULFSC, TILEGX_OPC_V2MULS, TILEGX_OPC_V2MULTS, TILEGX_OPC_V2MZ,
+ TILEGX_OPC_V2PACKH, TILEGX_OPC_V2PACKL, TILEGX_OPC_V2PACKUC,
+ TILEGX_OPC_V2SADAS, TILEGX_OPC_V2SADAU, TILEGX_OPC_V2SADS,
+ TILEGX_OPC_V2SADU, TILEGX_OPC_V2SHLSC,
+ BITFIELD(18, 4) /* index 848 */,
+ TILEGX_OPC_V2SHL, TILEGX_OPC_V2SHRS, TILEGX_OPC_V2SHRU, TILEGX_OPC_V2SUBSC,
+ TILEGX_OPC_V2SUB, TILEGX_OPC_V4ADDSC, TILEGX_OPC_V4ADD, TILEGX_OPC_V4INT_H,
+ TILEGX_OPC_V4INT_L, TILEGX_OPC_V4PACKSC, TILEGX_OPC_V4SHLSC,
+ TILEGX_OPC_V4SHL, TILEGX_OPC_V4SHRS, TILEGX_OPC_V4SHRU, TILEGX_OPC_V4SUBSC,
+ TILEGX_OPC_V4SUB,
+ BITFIELD(18, 3) /* index 865 */,
+ CHILD(874), CHILD(877), CHILD(880), CHILD(883), CHILD(886), TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(21, 1) /* index 874 */,
+ TILEGX_OPC_XOR, TILEGX_OPC_NONE,
+ BITFIELD(21, 1) /* index 877 */,
+ TILEGX_OPC_V1DDOTPUA, TILEGX_OPC_NONE,
+ BITFIELD(21, 1) /* index 880 */,
+ TILEGX_OPC_V1DDOTPU, TILEGX_OPC_NONE,
+ BITFIELD(21, 1) /* index 883 */,
+ TILEGX_OPC_V1DOTPUA, TILEGX_OPC_NONE,
+ BITFIELD(21, 1) /* index 886 */,
+ TILEGX_OPC_V1DOTPU, TILEGX_OPC_NONE,
+ BITFIELD(18, 4) /* index 889 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_ROTLI, TILEGX_OPC_SHLI, TILEGX_OPC_SHLXI,
+ TILEGX_OPC_SHRSI, TILEGX_OPC_SHRUI, TILEGX_OPC_SHRUXI, TILEGX_OPC_V1SHLI,
+ TILEGX_OPC_V1SHRSI, TILEGX_OPC_V1SHRUI, TILEGX_OPC_V2SHLI,
+ TILEGX_OPC_V2SHRSI, TILEGX_OPC_V2SHRUI, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE,
+ BITFIELD(0, 2) /* index 906 */,
+ TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI,
+ CHILD(911),
+ BITFIELD(2, 2) /* index 911 */,
+ TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI,
+ CHILD(916),
+ BITFIELD(4, 2) /* index 916 */,
+ TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI,
+ CHILD(921),
+ BITFIELD(6, 2) /* index 921 */,
+ TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI,
+ CHILD(926),
+ BITFIELD(8, 2) /* index 926 */,
+ TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI,
+ CHILD(931),
+ BITFIELD(10, 2) /* index 931 */,
+ TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI,
+ TILEGX_OPC_INFOL,
+};
+
+static const unsigned short decode_X1_fsm[1266] =
+{
+ BITFIELD(53, 9) /* index 0 */,
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513), CHILD(513),
+ CHILD(513), CHILD(513), CHILD(513), CHILD(513), TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI,
+ TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_ADDXLI, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_BEQZT,
+ TILEGX_OPC_BEQZT, TILEGX_OPC_BEQZ, TILEGX_OPC_BEQZ, TILEGX_OPC_BGEZT,
+ TILEGX_OPC_BGEZT, TILEGX_OPC_BGEZ, TILEGX_OPC_BGEZ, TILEGX_OPC_BGTZT,
+ TILEGX_OPC_BGTZT, TILEGX_OPC_BGTZ, TILEGX_OPC_BGTZ, TILEGX_OPC_BLBCT,
+ TILEGX_OPC_BLBCT, TILEGX_OPC_BLBC, TILEGX_OPC_BLBC, TILEGX_OPC_BLBST,
+ TILEGX_OPC_BLBST, TILEGX_OPC_BLBS, TILEGX_OPC_BLBS, TILEGX_OPC_BLEZT,
+ TILEGX_OPC_BLEZT, TILEGX_OPC_BLEZ, TILEGX_OPC_BLEZ, TILEGX_OPC_BLTZT,
+ TILEGX_OPC_BLTZT, TILEGX_OPC_BLTZ, TILEGX_OPC_BLTZ, TILEGX_OPC_BNEZT,
+ TILEGX_OPC_BNEZT, TILEGX_OPC_BNEZ, TILEGX_OPC_BNEZ, CHILD(528), CHILD(578),
+ CHILD(598), CHILD(703), CHILD(723), CHILD(728), CHILD(753), CHILD(758),
+ CHILD(763), CHILD(768), CHILD(773), CHILD(778), TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_JAL,
+ TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_JAL,
+ TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_JAL,
+ TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_JAL,
+ TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_JAL,
+ TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_JAL,
+ TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_JAL,
+ TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_JAL,
+ TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_JAL, TILEGX_OPC_J, TILEGX_OPC_J,
+ TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J,
+ TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J,
+ TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J,
+ TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J,
+ TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J,
+ TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J, TILEGX_OPC_J,
+ CHILD(783), CHILD(800), CHILD(832), CHILD(849), CHILD(1168), CHILD(1185),
+ CHILD(1202), TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, CHILD(1219), TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, CHILD(1236), CHILD(1236), CHILD(1236),
+ CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236),
+ CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236),
+ CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236),
+ CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236),
+ CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236),
+ CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236),
+ CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236),
+ CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236),
+ CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236),
+ CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236),
+ CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236),
+ CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236), CHILD(1236),
+ CHILD(1236),
+ BITFIELD(37, 2) /* index 513 */,
+ TILEGX_OPC_ADDLI, TILEGX_OPC_ADDLI, TILEGX_OPC_ADDLI, CHILD(518),
+ BITFIELD(39, 2) /* index 518 */,
+ TILEGX_OPC_ADDLI, TILEGX_OPC_ADDLI, TILEGX_OPC_ADDLI, CHILD(523),
+ BITFIELD(41, 2) /* index 523 */,
+ TILEGX_OPC_ADDLI, TILEGX_OPC_ADDLI, TILEGX_OPC_ADDLI, TILEGX_OPC_MOVELI,
+ BITFIELD(51, 2) /* index 528 */,
+ TILEGX_OPC_NONE, CHILD(533), TILEGX_OPC_ADDXI, CHILD(548),
+ BITFIELD(37, 2) /* index 533 */,
+ TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, CHILD(538),
+ BITFIELD(39, 2) /* index 538 */,
+ TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, CHILD(543),
+ BITFIELD(41, 2) /* index 543 */,
+ TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_MOVEI,
+ BITFIELD(31, 2) /* index 548 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(553),
+ BITFIELD(33, 2) /* index 553 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(558),
+ BITFIELD(35, 2) /* index 558 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(563),
+ BITFIELD(37, 2) /* index 563 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(568),
+ BITFIELD(39, 2) /* index 568 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(573),
+ BITFIELD(41, 2) /* index 573 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_INFO,
+ BITFIELD(51, 2) /* index 578 */,
+ TILEGX_OPC_CMPEQI, TILEGX_OPC_CMPLTSI, TILEGX_OPC_CMPLTUI, CHILD(583),
+ BITFIELD(31, 2) /* index 583 */,
+ TILEGX_OPC_LD1S_ADD, TILEGX_OPC_LD1S_ADD, TILEGX_OPC_LD1S_ADD, CHILD(588),
+ BITFIELD(33, 2) /* index 588 */,
+ TILEGX_OPC_LD1S_ADD, TILEGX_OPC_LD1S_ADD, TILEGX_OPC_LD1S_ADD, CHILD(593),
+ BITFIELD(35, 2) /* index 593 */,
+ TILEGX_OPC_LD1S_ADD, TILEGX_OPC_LD1S_ADD, TILEGX_OPC_LD1S_ADD,
+ TILEGX_OPC_PREFETCH_ADD_L1_FAULT,
+ BITFIELD(51, 2) /* index 598 */,
+ CHILD(603), CHILD(618), CHILD(633), CHILD(648),
+ BITFIELD(31, 2) /* index 603 */,
+ TILEGX_OPC_LD1U_ADD, TILEGX_OPC_LD1U_ADD, TILEGX_OPC_LD1U_ADD, CHILD(608),
+ BITFIELD(33, 2) /* index 608 */,
+ TILEGX_OPC_LD1U_ADD, TILEGX_OPC_LD1U_ADD, TILEGX_OPC_LD1U_ADD, CHILD(613),
+ BITFIELD(35, 2) /* index 613 */,
+ TILEGX_OPC_LD1U_ADD, TILEGX_OPC_LD1U_ADD, TILEGX_OPC_LD1U_ADD,
+ TILEGX_OPC_PREFETCH_ADD_L1,
+ BITFIELD(31, 2) /* index 618 */,
+ TILEGX_OPC_LD2S_ADD, TILEGX_OPC_LD2S_ADD, TILEGX_OPC_LD2S_ADD, CHILD(623),
+ BITFIELD(33, 2) /* index 623 */,
+ TILEGX_OPC_LD2S_ADD, TILEGX_OPC_LD2S_ADD, TILEGX_OPC_LD2S_ADD, CHILD(628),
+ BITFIELD(35, 2) /* index 628 */,
+ TILEGX_OPC_LD2S_ADD, TILEGX_OPC_LD2S_ADD, TILEGX_OPC_LD2S_ADD,
+ TILEGX_OPC_PREFETCH_ADD_L2_FAULT,
+ BITFIELD(31, 2) /* index 633 */,
+ TILEGX_OPC_LD2U_ADD, TILEGX_OPC_LD2U_ADD, TILEGX_OPC_LD2U_ADD, CHILD(638),
+ BITFIELD(33, 2) /* index 638 */,
+ TILEGX_OPC_LD2U_ADD, TILEGX_OPC_LD2U_ADD, TILEGX_OPC_LD2U_ADD, CHILD(643),
+ BITFIELD(35, 2) /* index 643 */,
+ TILEGX_OPC_LD2U_ADD, TILEGX_OPC_LD2U_ADD, TILEGX_OPC_LD2U_ADD,
+ TILEGX_OPC_PREFETCH_ADD_L2,
+ BITFIELD(31, 2) /* index 648 */,
+ CHILD(653), CHILD(653), CHILD(653), CHILD(673),
+ BITFIELD(43, 2) /* index 653 */,
+ CHILD(658), TILEGX_OPC_LD4S_ADD, TILEGX_OPC_LD4S_ADD, TILEGX_OPC_LD4S_ADD,
+ BITFIELD(45, 2) /* index 658 */,
+ CHILD(663), TILEGX_OPC_LD4S_ADD, TILEGX_OPC_LD4S_ADD, TILEGX_OPC_LD4S_ADD,
+ BITFIELD(47, 2) /* index 663 */,
+ CHILD(668), TILEGX_OPC_LD4S_ADD, TILEGX_OPC_LD4S_ADD, TILEGX_OPC_LD4S_ADD,
+ BITFIELD(49, 2) /* index 668 */,
+ TILEGX_OPC_LD4S_TLS, TILEGX_OPC_LD4S_ADD, TILEGX_OPC_LD4S_ADD,
+ TILEGX_OPC_LD4S_ADD,
+ BITFIELD(33, 2) /* index 673 */,
+ CHILD(653), CHILD(653), CHILD(653), CHILD(678),
+ BITFIELD(35, 2) /* index 678 */,
+ CHILD(653), CHILD(653), CHILD(653), CHILD(683),
+ BITFIELD(43, 2) /* index 683 */,
+ CHILD(688), TILEGX_OPC_PREFETCH_ADD_L3_FAULT,
+ TILEGX_OPC_PREFETCH_ADD_L3_FAULT, TILEGX_OPC_PREFETCH_ADD_L3_FAULT,
+ BITFIELD(45, 2) /* index 688 */,
+ CHILD(693), TILEGX_OPC_PREFETCH_ADD_L3_FAULT,
+ TILEGX_OPC_PREFETCH_ADD_L3_FAULT, TILEGX_OPC_PREFETCH_ADD_L3_FAULT,
+ BITFIELD(47, 2) /* index 693 */,
+ CHILD(698), TILEGX_OPC_PREFETCH_ADD_L3_FAULT,
+ TILEGX_OPC_PREFETCH_ADD_L3_FAULT, TILEGX_OPC_PREFETCH_ADD_L3_FAULT,
+ BITFIELD(49, 2) /* index 698 */,
+ TILEGX_OPC_LD4S_TLS, TILEGX_OPC_PREFETCH_ADD_L3_FAULT,
+ TILEGX_OPC_PREFETCH_ADD_L3_FAULT, TILEGX_OPC_PREFETCH_ADD_L3_FAULT,
+ BITFIELD(51, 2) /* index 703 */,
+ CHILD(708), TILEGX_OPC_LDNT1S_ADD, TILEGX_OPC_LDNT1U_ADD,
+ TILEGX_OPC_LDNT2S_ADD,
+ BITFIELD(31, 2) /* index 708 */,
+ TILEGX_OPC_LD4U_ADD, TILEGX_OPC_LD4U_ADD, TILEGX_OPC_LD4U_ADD, CHILD(713),
+ BITFIELD(33, 2) /* index 713 */,
+ TILEGX_OPC_LD4U_ADD, TILEGX_OPC_LD4U_ADD, TILEGX_OPC_LD4U_ADD, CHILD(718),
+ BITFIELD(35, 2) /* index 718 */,
+ TILEGX_OPC_LD4U_ADD, TILEGX_OPC_LD4U_ADD, TILEGX_OPC_LD4U_ADD,
+ TILEGX_OPC_PREFETCH_ADD_L3,
+ BITFIELD(51, 2) /* index 723 */,
+ TILEGX_OPC_LDNT2U_ADD, TILEGX_OPC_LDNT4S_ADD, TILEGX_OPC_LDNT4U_ADD,
+ TILEGX_OPC_LDNT_ADD,
+ BITFIELD(51, 2) /* index 728 */,
+ CHILD(733), TILEGX_OPC_LDNA_ADD, TILEGX_OPC_MFSPR, TILEGX_OPC_MTSPR,
+ BITFIELD(43, 2) /* index 733 */,
+ CHILD(738), TILEGX_OPC_LD_ADD, TILEGX_OPC_LD_ADD, TILEGX_OPC_LD_ADD,
+ BITFIELD(45, 2) /* index 738 */,
+ CHILD(743), TILEGX_OPC_LD_ADD, TILEGX_OPC_LD_ADD, TILEGX_OPC_LD_ADD,
+ BITFIELD(47, 2) /* index 743 */,
+ CHILD(748), TILEGX_OPC_LD_ADD, TILEGX_OPC_LD_ADD, TILEGX_OPC_LD_ADD,
+ BITFIELD(49, 2) /* index 748 */,
+ TILEGX_OPC_LD_TLS, TILEGX_OPC_LD_ADD, TILEGX_OPC_LD_ADD, TILEGX_OPC_LD_ADD,
+ BITFIELD(51, 2) /* index 753 */,
+ TILEGX_OPC_ORI, TILEGX_OPC_ST1_ADD, TILEGX_OPC_ST2_ADD, TILEGX_OPC_ST4_ADD,
+ BITFIELD(51, 2) /* index 758 */,
+ TILEGX_OPC_STNT1_ADD, TILEGX_OPC_STNT2_ADD, TILEGX_OPC_STNT4_ADD,
+ TILEGX_OPC_STNT_ADD,
+ BITFIELD(51, 2) /* index 763 */,
+ TILEGX_OPC_ST_ADD, TILEGX_OPC_V1ADDI, TILEGX_OPC_V1CMPEQI,
+ TILEGX_OPC_V1CMPLTSI,
+ BITFIELD(51, 2) /* index 768 */,
+ TILEGX_OPC_V1CMPLTUI, TILEGX_OPC_V1MAXUI, TILEGX_OPC_V1MINUI,
+ TILEGX_OPC_V2ADDI,
+ BITFIELD(51, 2) /* index 773 */,
+ TILEGX_OPC_V2CMPEQI, TILEGX_OPC_V2CMPLTSI, TILEGX_OPC_V2CMPLTUI,
+ TILEGX_OPC_V2MAXSI,
+ BITFIELD(51, 2) /* index 778 */,
+ TILEGX_OPC_V2MINSI, TILEGX_OPC_XORI, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(49, 4) /* index 783 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_ADDXSC, TILEGX_OPC_ADDX, TILEGX_OPC_ADD,
+ TILEGX_OPC_AND, TILEGX_OPC_CMPEQ, TILEGX_OPC_CMPEXCH4, TILEGX_OPC_CMPEXCH,
+ TILEGX_OPC_CMPLES, TILEGX_OPC_CMPLEU, TILEGX_OPC_CMPLTS, TILEGX_OPC_CMPLTU,
+ TILEGX_OPC_CMPNE, TILEGX_OPC_DBLALIGN2, TILEGX_OPC_DBLALIGN4,
+ TILEGX_OPC_DBLALIGN6,
+ BITFIELD(49, 4) /* index 800 */,
+ TILEGX_OPC_EXCH4, TILEGX_OPC_EXCH, TILEGX_OPC_FETCHADD4,
+ TILEGX_OPC_FETCHADDGEZ4, TILEGX_OPC_FETCHADDGEZ, TILEGX_OPC_FETCHADD,
+ TILEGX_OPC_FETCHAND4, TILEGX_OPC_FETCHAND, TILEGX_OPC_FETCHOR4,
+ TILEGX_OPC_FETCHOR, TILEGX_OPC_MNZ, TILEGX_OPC_MZ, TILEGX_OPC_NOR,
+ CHILD(817), TILEGX_OPC_ROTL, TILEGX_OPC_SHL1ADDX,
+ BITFIELD(43, 2) /* index 817 */,
+ TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_OR, CHILD(822),
+ BITFIELD(45, 2) /* index 822 */,
+ TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_OR, CHILD(827),
+ BITFIELD(47, 2) /* index 827 */,
+ TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_MOVE,
+ BITFIELD(49, 4) /* index 832 */,
+ TILEGX_OPC_SHL1ADD, TILEGX_OPC_SHL2ADDX, TILEGX_OPC_SHL2ADD,
+ TILEGX_OPC_SHL3ADDX, TILEGX_OPC_SHL3ADD, TILEGX_OPC_SHLX, TILEGX_OPC_SHL,
+ TILEGX_OPC_SHRS, TILEGX_OPC_SHRUX, TILEGX_OPC_SHRU, TILEGX_OPC_ST1,
+ TILEGX_OPC_ST2, TILEGX_OPC_ST4, TILEGX_OPC_STNT1, TILEGX_OPC_STNT2,
+ TILEGX_OPC_STNT4,
+ BITFIELD(46, 7) /* index 849 */,
+ TILEGX_OPC_STNT, TILEGX_OPC_STNT, TILEGX_OPC_STNT, TILEGX_OPC_STNT,
+ TILEGX_OPC_STNT, TILEGX_OPC_STNT, TILEGX_OPC_STNT, TILEGX_OPC_STNT,
+ TILEGX_OPC_ST, TILEGX_OPC_ST, TILEGX_OPC_ST, TILEGX_OPC_ST, TILEGX_OPC_ST,
+ TILEGX_OPC_ST, TILEGX_OPC_ST, TILEGX_OPC_ST, TILEGX_OPC_SUBXSC,
+ TILEGX_OPC_SUBXSC, TILEGX_OPC_SUBXSC, TILEGX_OPC_SUBXSC, TILEGX_OPC_SUBXSC,
+ TILEGX_OPC_SUBXSC, TILEGX_OPC_SUBXSC, TILEGX_OPC_SUBXSC, TILEGX_OPC_SUBX,
+ TILEGX_OPC_SUBX, TILEGX_OPC_SUBX, TILEGX_OPC_SUBX, TILEGX_OPC_SUBX,
+ TILEGX_OPC_SUBX, TILEGX_OPC_SUBX, TILEGX_OPC_SUBX, TILEGX_OPC_SUB,
+ TILEGX_OPC_SUB, TILEGX_OPC_SUB, TILEGX_OPC_SUB, TILEGX_OPC_SUB,
+ TILEGX_OPC_SUB, TILEGX_OPC_SUB, TILEGX_OPC_SUB, CHILD(978), CHILD(987),
+ CHILD(1066), CHILD(1150), CHILD(1159), TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_V1ADDUC, TILEGX_OPC_V1ADDUC, TILEGX_OPC_V1ADDUC,
+ TILEGX_OPC_V1ADDUC, TILEGX_OPC_V1ADDUC, TILEGX_OPC_V1ADDUC,
+ TILEGX_OPC_V1ADDUC, TILEGX_OPC_V1ADDUC, TILEGX_OPC_V1ADD, TILEGX_OPC_V1ADD,
+ TILEGX_OPC_V1ADD, TILEGX_OPC_V1ADD, TILEGX_OPC_V1ADD, TILEGX_OPC_V1ADD,
+ TILEGX_OPC_V1ADD, TILEGX_OPC_V1ADD, TILEGX_OPC_V1CMPEQ, TILEGX_OPC_V1CMPEQ,
+ TILEGX_OPC_V1CMPEQ, TILEGX_OPC_V1CMPEQ, TILEGX_OPC_V1CMPEQ,
+ TILEGX_OPC_V1CMPEQ, TILEGX_OPC_V1CMPEQ, TILEGX_OPC_V1CMPEQ,
+ TILEGX_OPC_V1CMPLES, TILEGX_OPC_V1CMPLES, TILEGX_OPC_V1CMPLES,
+ TILEGX_OPC_V1CMPLES, TILEGX_OPC_V1CMPLES, TILEGX_OPC_V1CMPLES,
+ TILEGX_OPC_V1CMPLES, TILEGX_OPC_V1CMPLES, TILEGX_OPC_V1CMPLEU,
+ TILEGX_OPC_V1CMPLEU, TILEGX_OPC_V1CMPLEU, TILEGX_OPC_V1CMPLEU,
+ TILEGX_OPC_V1CMPLEU, TILEGX_OPC_V1CMPLEU, TILEGX_OPC_V1CMPLEU,
+ TILEGX_OPC_V1CMPLEU, TILEGX_OPC_V1CMPLTS, TILEGX_OPC_V1CMPLTS,
+ TILEGX_OPC_V1CMPLTS, TILEGX_OPC_V1CMPLTS, TILEGX_OPC_V1CMPLTS,
+ TILEGX_OPC_V1CMPLTS, TILEGX_OPC_V1CMPLTS, TILEGX_OPC_V1CMPLTS,
+ TILEGX_OPC_V1CMPLTU, TILEGX_OPC_V1CMPLTU, TILEGX_OPC_V1CMPLTU,
+ TILEGX_OPC_V1CMPLTU, TILEGX_OPC_V1CMPLTU, TILEGX_OPC_V1CMPLTU,
+ TILEGX_OPC_V1CMPLTU, TILEGX_OPC_V1CMPLTU, TILEGX_OPC_V1CMPNE,
+ TILEGX_OPC_V1CMPNE, TILEGX_OPC_V1CMPNE, TILEGX_OPC_V1CMPNE,
+ TILEGX_OPC_V1CMPNE, TILEGX_OPC_V1CMPNE, TILEGX_OPC_V1CMPNE,
+ TILEGX_OPC_V1CMPNE, TILEGX_OPC_V1INT_H, TILEGX_OPC_V1INT_H,
+ TILEGX_OPC_V1INT_H, TILEGX_OPC_V1INT_H, TILEGX_OPC_V1INT_H,
+ TILEGX_OPC_V1INT_H, TILEGX_OPC_V1INT_H, TILEGX_OPC_V1INT_H,
+ TILEGX_OPC_V1INT_L, TILEGX_OPC_V1INT_L, TILEGX_OPC_V1INT_L,
+ TILEGX_OPC_V1INT_L, TILEGX_OPC_V1INT_L, TILEGX_OPC_V1INT_L,
+ TILEGX_OPC_V1INT_L, TILEGX_OPC_V1INT_L,
+ BITFIELD(43, 3) /* index 978 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_DRAIN, TILEGX_OPC_DTLBPR, TILEGX_OPC_FINV,
+ TILEGX_OPC_FLUSHWB, TILEGX_OPC_FLUSH, TILEGX_OPC_FNOP, TILEGX_OPC_ICOH,
+ BITFIELD(43, 3) /* index 987 */,
+ CHILD(996), TILEGX_OPC_INV, TILEGX_OPC_IRET, TILEGX_OPC_JALRP,
+ TILEGX_OPC_JALR, TILEGX_OPC_JRP, TILEGX_OPC_JR, CHILD(1051),
+ BITFIELD(31, 2) /* index 996 */,
+ CHILD(1001), CHILD(1026), TILEGX_OPC_ILL, TILEGX_OPC_ILL,
+ BITFIELD(33, 2) /* index 1001 */,
+ TILEGX_OPC_ILL, TILEGX_OPC_ILL, TILEGX_OPC_ILL, CHILD(1006),
+ BITFIELD(35, 2) /* index 1006 */,
+ TILEGX_OPC_ILL, CHILD(1011), TILEGX_OPC_ILL, TILEGX_OPC_ILL,
+ BITFIELD(37, 2) /* index 1011 */,
+ TILEGX_OPC_ILL, CHILD(1016), TILEGX_OPC_ILL, TILEGX_OPC_ILL,
+ BITFIELD(39, 2) /* index 1016 */,
+ TILEGX_OPC_ILL, CHILD(1021), TILEGX_OPC_ILL, TILEGX_OPC_ILL,
+ BITFIELD(41, 2) /* index 1021 */,
+ TILEGX_OPC_ILL, TILEGX_OPC_ILL, TILEGX_OPC_BPT, TILEGX_OPC_ILL,
+ BITFIELD(33, 2) /* index 1026 */,
+ TILEGX_OPC_ILL, TILEGX_OPC_ILL, TILEGX_OPC_ILL, CHILD(1031),
+ BITFIELD(35, 2) /* index 1031 */,
+ TILEGX_OPC_ILL, CHILD(1036), TILEGX_OPC_ILL, TILEGX_OPC_ILL,
+ BITFIELD(37, 2) /* index 1036 */,
+ TILEGX_OPC_ILL, CHILD(1041), TILEGX_OPC_ILL, TILEGX_OPC_ILL,
+ BITFIELD(39, 2) /* index 1041 */,
+ TILEGX_OPC_ILL, CHILD(1046), TILEGX_OPC_ILL, TILEGX_OPC_ILL,
+ BITFIELD(41, 2) /* index 1046 */,
+ TILEGX_OPC_ILL, TILEGX_OPC_ILL, TILEGX_OPC_RAISE, TILEGX_OPC_ILL,
+ BITFIELD(31, 2) /* index 1051 */,
+ TILEGX_OPC_LD1S, TILEGX_OPC_LD1S, TILEGX_OPC_LD1S, CHILD(1056),
+ BITFIELD(33, 2) /* index 1056 */,
+ TILEGX_OPC_LD1S, TILEGX_OPC_LD1S, TILEGX_OPC_LD1S, CHILD(1061),
+ BITFIELD(35, 2) /* index 1061 */,
+ TILEGX_OPC_LD1S, TILEGX_OPC_LD1S, TILEGX_OPC_LD1S,
+ TILEGX_OPC_PREFETCH_L1_FAULT,
+ BITFIELD(43, 3) /* index 1066 */,
+ CHILD(1075), CHILD(1090), CHILD(1105), CHILD(1120), CHILD(1135),
+ TILEGX_OPC_LDNA, TILEGX_OPC_LDNT1S, TILEGX_OPC_LDNT1U,
+ BITFIELD(31, 2) /* index 1075 */,
+ TILEGX_OPC_LD1U, TILEGX_OPC_LD1U, TILEGX_OPC_LD1U, CHILD(1080),
+ BITFIELD(33, 2) /* index 1080 */,
+ TILEGX_OPC_LD1U, TILEGX_OPC_LD1U, TILEGX_OPC_LD1U, CHILD(1085),
+ BITFIELD(35, 2) /* index 1085 */,
+ TILEGX_OPC_LD1U, TILEGX_OPC_LD1U, TILEGX_OPC_LD1U, TILEGX_OPC_PREFETCH,
+ BITFIELD(31, 2) /* index 1090 */,
+ TILEGX_OPC_LD2S, TILEGX_OPC_LD2S, TILEGX_OPC_LD2S, CHILD(1095),
+ BITFIELD(33, 2) /* index 1095 */,
+ TILEGX_OPC_LD2S, TILEGX_OPC_LD2S, TILEGX_OPC_LD2S, CHILD(1100),
+ BITFIELD(35, 2) /* index 1100 */,
+ TILEGX_OPC_LD2S, TILEGX_OPC_LD2S, TILEGX_OPC_LD2S,
+ TILEGX_OPC_PREFETCH_L2_FAULT,
+ BITFIELD(31, 2) /* index 1105 */,
+ TILEGX_OPC_LD2U, TILEGX_OPC_LD2U, TILEGX_OPC_LD2U, CHILD(1110),
+ BITFIELD(33, 2) /* index 1110 */,
+ TILEGX_OPC_LD2U, TILEGX_OPC_LD2U, TILEGX_OPC_LD2U, CHILD(1115),
+ BITFIELD(35, 2) /* index 1115 */,
+ TILEGX_OPC_LD2U, TILEGX_OPC_LD2U, TILEGX_OPC_LD2U, TILEGX_OPC_PREFETCH_L2,
+ BITFIELD(31, 2) /* index 1120 */,
+ TILEGX_OPC_LD4S, TILEGX_OPC_LD4S, TILEGX_OPC_LD4S, CHILD(1125),
+ BITFIELD(33, 2) /* index 1125 */,
+ TILEGX_OPC_LD4S, TILEGX_OPC_LD4S, TILEGX_OPC_LD4S, CHILD(1130),
+ BITFIELD(35, 2) /* index 1130 */,
+ TILEGX_OPC_LD4S, TILEGX_OPC_LD4S, TILEGX_OPC_LD4S,
+ TILEGX_OPC_PREFETCH_L3_FAULT,
+ BITFIELD(31, 2) /* index 1135 */,
+ TILEGX_OPC_LD4U, TILEGX_OPC_LD4U, TILEGX_OPC_LD4U, CHILD(1140),
+ BITFIELD(33, 2) /* index 1140 */,
+ TILEGX_OPC_LD4U, TILEGX_OPC_LD4U, TILEGX_OPC_LD4U, CHILD(1145),
+ BITFIELD(35, 2) /* index 1145 */,
+ TILEGX_OPC_LD4U, TILEGX_OPC_LD4U, TILEGX_OPC_LD4U, TILEGX_OPC_PREFETCH_L3,
+ BITFIELD(43, 3) /* index 1150 */,
+ TILEGX_OPC_LDNT2S, TILEGX_OPC_LDNT2U, TILEGX_OPC_LDNT4S, TILEGX_OPC_LDNT4U,
+ TILEGX_OPC_LDNT, TILEGX_OPC_LD, TILEGX_OPC_LNK, TILEGX_OPC_MF,
+ BITFIELD(43, 3) /* index 1159 */,
+ TILEGX_OPC_NAP, TILEGX_OPC_NOP, TILEGX_OPC_SWINT0, TILEGX_OPC_SWINT1,
+ TILEGX_OPC_SWINT2, TILEGX_OPC_SWINT3, TILEGX_OPC_WH64, TILEGX_OPC_NONE,
+ BITFIELD(49, 4) /* index 1168 */,
+ TILEGX_OPC_V1MAXU, TILEGX_OPC_V1MINU, TILEGX_OPC_V1MNZ, TILEGX_OPC_V1MZ,
+ TILEGX_OPC_V1SHL, TILEGX_OPC_V1SHRS, TILEGX_OPC_V1SHRU, TILEGX_OPC_V1SUBUC,
+ TILEGX_OPC_V1SUB, TILEGX_OPC_V2ADDSC, TILEGX_OPC_V2ADD, TILEGX_OPC_V2CMPEQ,
+ TILEGX_OPC_V2CMPLES, TILEGX_OPC_V2CMPLEU, TILEGX_OPC_V2CMPLTS,
+ TILEGX_OPC_V2CMPLTU,
+ BITFIELD(49, 4) /* index 1185 */,
+ TILEGX_OPC_V2CMPNE, TILEGX_OPC_V2INT_H, TILEGX_OPC_V2INT_L,
+ TILEGX_OPC_V2MAXS, TILEGX_OPC_V2MINS, TILEGX_OPC_V2MNZ, TILEGX_OPC_V2MZ,
+ TILEGX_OPC_V2PACKH, TILEGX_OPC_V2PACKL, TILEGX_OPC_V2PACKUC,
+ TILEGX_OPC_V2SHLSC, TILEGX_OPC_V2SHL, TILEGX_OPC_V2SHRS, TILEGX_OPC_V2SHRU,
+ TILEGX_OPC_V2SUBSC, TILEGX_OPC_V2SUB,
+ BITFIELD(49, 4) /* index 1202 */,
+ TILEGX_OPC_V4ADDSC, TILEGX_OPC_V4ADD, TILEGX_OPC_V4INT_H,
+ TILEGX_OPC_V4INT_L, TILEGX_OPC_V4PACKSC, TILEGX_OPC_V4SHLSC,
+ TILEGX_OPC_V4SHL, TILEGX_OPC_V4SHRS, TILEGX_OPC_V4SHRU, TILEGX_OPC_V4SUBSC,
+ TILEGX_OPC_V4SUB, TILEGX_OPC_XOR, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(49, 4) /* index 1219 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_ROTLI, TILEGX_OPC_SHLI, TILEGX_OPC_SHLXI,
+ TILEGX_OPC_SHRSI, TILEGX_OPC_SHRUI, TILEGX_OPC_SHRUXI, TILEGX_OPC_V1SHLI,
+ TILEGX_OPC_V1SHRSI, TILEGX_OPC_V1SHRUI, TILEGX_OPC_V2SHLI,
+ TILEGX_OPC_V2SHRSI, TILEGX_OPC_V2SHRUI, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE,
+ BITFIELD(31, 2) /* index 1236 */,
+ TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI,
+ CHILD(1241),
+ BITFIELD(33, 2) /* index 1241 */,
+ TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI,
+ CHILD(1246),
+ BITFIELD(35, 2) /* index 1246 */,
+ TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI,
+ CHILD(1251),
+ BITFIELD(37, 2) /* index 1251 */,
+ TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI,
+ CHILD(1256),
+ BITFIELD(39, 2) /* index 1256 */,
+ TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI,
+ CHILD(1261),
+ BITFIELD(41, 2) /* index 1261 */,
+ TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI, TILEGX_OPC_SHL16INSLI,
+ TILEGX_OPC_INFOL,
+};
+
+static const unsigned short decode_Y0_fsm[178] =
+{
+ BITFIELD(27, 4) /* index 0 */,
+ CHILD(17), TILEGX_OPC_ADDXI, CHILD(32), TILEGX_OPC_CMPEQI,
+ TILEGX_OPC_CMPLTSI, CHILD(62), CHILD(67), CHILD(118), CHILD(123),
+ CHILD(128), CHILD(133), CHILD(153), CHILD(158), CHILD(163), CHILD(168),
+ CHILD(173),
+ BITFIELD(6, 2) /* index 17 */,
+ TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, CHILD(22),
+ BITFIELD(8, 2) /* index 22 */,
+ TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, CHILD(27),
+ BITFIELD(10, 2) /* index 27 */,
+ TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_MOVEI,
+ BITFIELD(0, 2) /* index 32 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(37),
+ BITFIELD(2, 2) /* index 37 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(42),
+ BITFIELD(4, 2) /* index 42 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(47),
+ BITFIELD(6, 2) /* index 47 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(52),
+ BITFIELD(8, 2) /* index 52 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(57),
+ BITFIELD(10, 2) /* index 57 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_INFO,
+ BITFIELD(18, 2) /* index 62 */,
+ TILEGX_OPC_ADDX, TILEGX_OPC_ADD, TILEGX_OPC_SUBX, TILEGX_OPC_SUB,
+ BITFIELD(15, 5) /* index 67 */,
+ TILEGX_OPC_SHL1ADD, TILEGX_OPC_SHL1ADD, TILEGX_OPC_SHL1ADD,
+ TILEGX_OPC_SHL1ADD, TILEGX_OPC_SHL1ADD, TILEGX_OPC_SHL1ADD,
+ TILEGX_OPC_SHL1ADD, TILEGX_OPC_SHL1ADD, TILEGX_OPC_SHL2ADD,
+ TILEGX_OPC_SHL2ADD, TILEGX_OPC_SHL2ADD, TILEGX_OPC_SHL2ADD,
+ TILEGX_OPC_SHL2ADD, TILEGX_OPC_SHL2ADD, TILEGX_OPC_SHL2ADD,
+ TILEGX_OPC_SHL2ADD, TILEGX_OPC_SHL3ADD, TILEGX_OPC_SHL3ADD,
+ TILEGX_OPC_SHL3ADD, TILEGX_OPC_SHL3ADD, TILEGX_OPC_SHL3ADD,
+ TILEGX_OPC_SHL3ADD, TILEGX_OPC_SHL3ADD, TILEGX_OPC_SHL3ADD, CHILD(100),
+ CHILD(109), TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(12, 3) /* index 100 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_CLZ, TILEGX_OPC_CTZ, TILEGX_OPC_FNOP,
+ TILEGX_OPC_FSINGLE_PACK1, TILEGX_OPC_NOP, TILEGX_OPC_PCNT,
+ TILEGX_OPC_REVBITS,
+ BITFIELD(12, 3) /* index 109 */,
+ TILEGX_OPC_REVBYTES, TILEGX_OPC_TBLIDXB0, TILEGX_OPC_TBLIDXB1,
+ TILEGX_OPC_TBLIDXB2, TILEGX_OPC_TBLIDXB3, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ TILEGX_OPC_NONE,
+ BITFIELD(18, 2) /* index 118 */,
+ TILEGX_OPC_CMPLES, TILEGX_OPC_CMPLEU, TILEGX_OPC_CMPLTS, TILEGX_OPC_CMPLTU,
+ BITFIELD(18, 2) /* index 123 */,
+ TILEGX_OPC_CMPEQ, TILEGX_OPC_CMPNE, TILEGX_OPC_MULAX, TILEGX_OPC_MULX,
+ BITFIELD(18, 2) /* index 128 */,
+ TILEGX_OPC_CMOVEQZ, TILEGX_OPC_CMOVNEZ, TILEGX_OPC_MNZ, TILEGX_OPC_MZ,
+ BITFIELD(18, 2) /* index 133 */,
+ TILEGX_OPC_AND, TILEGX_OPC_NOR, CHILD(138), TILEGX_OPC_XOR,
+ BITFIELD(12, 2) /* index 138 */,
+ TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_OR, CHILD(143),
+ BITFIELD(14, 2) /* index 143 */,
+ TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_OR, CHILD(148),
+ BITFIELD(16, 2) /* index 148 */,
+ TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_MOVE,
+ BITFIELD(18, 2) /* index 153 */,
+ TILEGX_OPC_ROTL, TILEGX_OPC_SHL, TILEGX_OPC_SHRS, TILEGX_OPC_SHRU,
+ BITFIELD(18, 2) /* index 158 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_SHL1ADDX, TILEGX_OPC_SHL2ADDX,
+ TILEGX_OPC_SHL3ADDX,
+ BITFIELD(18, 2) /* index 163 */,
+ TILEGX_OPC_MUL_HS_HS, TILEGX_OPC_MUL_HU_HU, TILEGX_OPC_MUL_LS_LS,
+ TILEGX_OPC_MUL_LU_LU,
+ BITFIELD(18, 2) /* index 168 */,
+ TILEGX_OPC_MULA_HS_HS, TILEGX_OPC_MULA_HU_HU, TILEGX_OPC_MULA_LS_LS,
+ TILEGX_OPC_MULA_LU_LU,
+ BITFIELD(18, 2) /* index 173 */,
+ TILEGX_OPC_ROTLI, TILEGX_OPC_SHLI, TILEGX_OPC_SHRSI, TILEGX_OPC_SHRUI,
+};
+
+static const unsigned short decode_Y1_fsm[167] =
+{
+ BITFIELD(58, 4) /* index 0 */,
+ TILEGX_OPC_NONE, CHILD(17), TILEGX_OPC_ADDXI, CHILD(32), TILEGX_OPC_CMPEQI,
+ TILEGX_OPC_CMPLTSI, CHILD(62), CHILD(67), CHILD(117), CHILD(122),
+ CHILD(127), CHILD(132), CHILD(152), CHILD(157), CHILD(162), TILEGX_OPC_NONE,
+ BITFIELD(37, 2) /* index 17 */,
+ TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, CHILD(22),
+ BITFIELD(39, 2) /* index 22 */,
+ TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, CHILD(27),
+ BITFIELD(41, 2) /* index 27 */,
+ TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_ADDI, TILEGX_OPC_MOVEI,
+ BITFIELD(31, 2) /* index 32 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(37),
+ BITFIELD(33, 2) /* index 37 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(42),
+ BITFIELD(35, 2) /* index 42 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(47),
+ BITFIELD(37, 2) /* index 47 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(52),
+ BITFIELD(39, 2) /* index 52 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, CHILD(57),
+ BITFIELD(41, 2) /* index 57 */,
+ TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_ANDI, TILEGX_OPC_INFO,
+ BITFIELD(49, 2) /* index 62 */,
+ TILEGX_OPC_ADDX, TILEGX_OPC_ADD, TILEGX_OPC_SUBX, TILEGX_OPC_SUB,
+ BITFIELD(47, 4) /* index 67 */,
+ TILEGX_OPC_SHL1ADD, TILEGX_OPC_SHL1ADD, TILEGX_OPC_SHL1ADD,
+ TILEGX_OPC_SHL1ADD, TILEGX_OPC_SHL2ADD, TILEGX_OPC_SHL2ADD,
+ TILEGX_OPC_SHL2ADD, TILEGX_OPC_SHL2ADD, TILEGX_OPC_SHL3ADD,
+ TILEGX_OPC_SHL3ADD, TILEGX_OPC_SHL3ADD, TILEGX_OPC_SHL3ADD, CHILD(84),
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_NONE,
+ BITFIELD(43, 3) /* index 84 */,
+ CHILD(93), CHILD(96), CHILD(99), CHILD(102), CHILD(105), CHILD(108),
+ CHILD(111), CHILD(114),
+ BITFIELD(46, 1) /* index 93 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_FNOP,
+ BITFIELD(46, 1) /* index 96 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_ILL,
+ BITFIELD(46, 1) /* index 99 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_JALRP,
+ BITFIELD(46, 1) /* index 102 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_JALR,
+ BITFIELD(46, 1) /* index 105 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_JRP,
+ BITFIELD(46, 1) /* index 108 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_JR,
+ BITFIELD(46, 1) /* index 111 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_LNK,
+ BITFIELD(46, 1) /* index 114 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_NOP,
+ BITFIELD(49, 2) /* index 117 */,
+ TILEGX_OPC_CMPLES, TILEGX_OPC_CMPLEU, TILEGX_OPC_CMPLTS, TILEGX_OPC_CMPLTU,
+ BITFIELD(49, 2) /* index 122 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_CMPEQ, TILEGX_OPC_CMPNE,
+ BITFIELD(49, 2) /* index 127 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_NONE, TILEGX_OPC_MNZ, TILEGX_OPC_MZ,
+ BITFIELD(49, 2) /* index 132 */,
+ TILEGX_OPC_AND, TILEGX_OPC_NOR, CHILD(137), TILEGX_OPC_XOR,
+ BITFIELD(43, 2) /* index 137 */,
+ TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_OR, CHILD(142),
+ BITFIELD(45, 2) /* index 142 */,
+ TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_OR, CHILD(147),
+ BITFIELD(47, 2) /* index 147 */,
+ TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_OR, TILEGX_OPC_MOVE,
+ BITFIELD(49, 2) /* index 152 */,
+ TILEGX_OPC_ROTL, TILEGX_OPC_SHL, TILEGX_OPC_SHRS, TILEGX_OPC_SHRU,
+ BITFIELD(49, 2) /* index 157 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_SHL1ADDX, TILEGX_OPC_SHL2ADDX,
+ TILEGX_OPC_SHL3ADDX,
+ BITFIELD(49, 2) /* index 162 */,
+ TILEGX_OPC_ROTLI, TILEGX_OPC_SHLI, TILEGX_OPC_SHRSI, TILEGX_OPC_SHRUI,
+};
+
+static const unsigned short decode_Y2_fsm[118] =
+{
+ BITFIELD(62, 2) /* index 0 */,
+ TILEGX_OPC_NONE, CHILD(5), CHILD(66), CHILD(109),
+ BITFIELD(55, 3) /* index 5 */,
+ CHILD(14), CHILD(14), CHILD(14), CHILD(17), CHILD(40), CHILD(40), CHILD(40),
+ CHILD(43),
+ BITFIELD(26, 1) /* index 14 */,
+ TILEGX_OPC_LD1S, TILEGX_OPC_LD1U,
+ BITFIELD(26, 1) /* index 17 */,
+ CHILD(20), CHILD(30),
+ BITFIELD(51, 2) /* index 20 */,
+ TILEGX_OPC_LD1S, TILEGX_OPC_LD1S, TILEGX_OPC_LD1S, CHILD(25),
+ BITFIELD(53, 2) /* index 25 */,
+ TILEGX_OPC_LD1S, TILEGX_OPC_LD1S, TILEGX_OPC_LD1S,
+ TILEGX_OPC_PREFETCH_L1_FAULT,
+ BITFIELD(51, 2) /* index 30 */,
+ TILEGX_OPC_LD1U, TILEGX_OPC_LD1U, TILEGX_OPC_LD1U, CHILD(35),
+ BITFIELD(53, 2) /* index 35 */,
+ TILEGX_OPC_LD1U, TILEGX_OPC_LD1U, TILEGX_OPC_LD1U, TILEGX_OPC_PREFETCH,
+ BITFIELD(26, 1) /* index 40 */,
+ TILEGX_OPC_LD2S, TILEGX_OPC_LD2U,
+ BITFIELD(26, 1) /* index 43 */,
+ CHILD(46), CHILD(56),
+ BITFIELD(51, 2) /* index 46 */,
+ TILEGX_OPC_LD2S, TILEGX_OPC_LD2S, TILEGX_OPC_LD2S, CHILD(51),
+ BITFIELD(53, 2) /* index 51 */,
+ TILEGX_OPC_LD2S, TILEGX_OPC_LD2S, TILEGX_OPC_LD2S,
+ TILEGX_OPC_PREFETCH_L2_FAULT,
+ BITFIELD(51, 2) /* index 56 */,
+ TILEGX_OPC_LD2U, TILEGX_OPC_LD2U, TILEGX_OPC_LD2U, CHILD(61),
+ BITFIELD(53, 2) /* index 61 */,
+ TILEGX_OPC_LD2U, TILEGX_OPC_LD2U, TILEGX_OPC_LD2U, TILEGX_OPC_PREFETCH_L2,
+ BITFIELD(56, 2) /* index 66 */,
+ CHILD(71), CHILD(74), CHILD(90), CHILD(93),
+ BITFIELD(26, 1) /* index 71 */,
+ TILEGX_OPC_NONE, TILEGX_OPC_LD4S,
+ BITFIELD(26, 1) /* index 74 */,
+ TILEGX_OPC_NONE, CHILD(77),
+ BITFIELD(51, 2) /* index 77 */,
+ TILEGX_OPC_LD4S, TILEGX_OPC_LD4S, TILEGX_OPC_LD4S, CHILD(82),
+ BITFIELD(53, 2) /* index 82 */,
+ TILEGX_OPC_LD4S, TILEGX_OPC_LD4S, TILEGX_OPC_LD4S, CHILD(87),
+ BITFIELD(55, 1) /* index 87 */,
+ TILEGX_OPC_LD4S, TILEGX_OPC_PREFETCH_L3_FAULT,
+ BITFIELD(26, 1) /* index 90 */,
+ TILEGX_OPC_LD4U, TILEGX_OPC_LD,
+ BITFIELD(26, 1) /* index 93 */,
+ CHILD(96), TILEGX_OPC_LD,
+ BITFIELD(51, 2) /* index 96 */,
+ TILEGX_OPC_LD4U, TILEGX_OPC_LD4U, TILEGX_OPC_LD4U, CHILD(101),
+ BITFIELD(53, 2) /* index 101 */,
+ TILEGX_OPC_LD4U, TILEGX_OPC_LD4U, TILEGX_OPC_LD4U, CHILD(106),
+ BITFIELD(55, 1) /* index 106 */,
+ TILEGX_OPC_LD4U, TILEGX_OPC_PREFETCH_L3,
+ BITFIELD(26, 1) /* index 109 */,
+ CHILD(112), CHILD(115),
+ BITFIELD(57, 1) /* index 112 */,
+ TILEGX_OPC_ST1, TILEGX_OPC_ST4,
+ BITFIELD(57, 1) /* index 115 */,
+ TILEGX_OPC_ST2, TILEGX_OPC_ST,
+};
+
+#undef BITFIELD
+#undef CHILD
+
+const unsigned short * const
+tilegx_bundle_decoder_fsms[TILEGX_NUM_PIPELINE_ENCODINGS] =
+{
+ decode_X0_fsm,
+ decode_X1_fsm,
+ decode_Y0_fsm,
+ decode_Y1_fsm,
+ decode_Y2_fsm
+};
+
+const struct tilegx_operand tilegx_operands[35] =
+{
+ {
+ TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(TILEGX_IMM8_X0),
+ 8, 1, 0, 0, 0, 0,
+ create_Imm8_X0, get_Imm8_X0
+ },
+ {
+ TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(TILEGX_IMM8_X1),
+ 8, 1, 0, 0, 0, 0,
+ create_Imm8_X1, get_Imm8_X1
+ },
+ {
+ TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(TILEGX_IMM8_Y0),
+ 8, 1, 0, 0, 0, 0,
+ create_Imm8_Y0, get_Imm8_Y0
+ },
+ {
+ TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(TILEGX_IMM8_Y1),
+ 8, 1, 0, 0, 0, 0,
+ create_Imm8_Y1, get_Imm8_Y1
+ },
+ {
+ TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(TILEGX_IMM16_X0_HW0_LAST),
+ 16, 1, 0, 0, 0, 0,
+ create_Imm16_X0, get_Imm16_X0
+ },
+ {
+ TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(TILEGX_IMM16_X1_HW0_LAST),
+ 16, 1, 0, 0, 0, 0,
+ create_Imm16_X1, get_Imm16_X1
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 0, 1, 0, 0,
+ create_Dest_X1, get_Dest_X1
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 1, 0, 0, 0,
+ create_SrcA_X1, get_SrcA_X1
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 0, 1, 0, 0,
+ create_Dest_X0, get_Dest_X0
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 1, 0, 0, 0,
+ create_SrcA_X0, get_SrcA_X0
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 0, 1, 0, 0,
+ create_Dest_Y0, get_Dest_Y0
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 1, 0, 0, 0,
+ create_SrcA_Y0, get_SrcA_Y0
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 0, 1, 0, 0,
+ create_Dest_Y1, get_Dest_Y1
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 1, 0, 0, 0,
+ create_SrcA_Y1, get_SrcA_Y1
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 1, 0, 0, 0,
+ create_SrcA_Y2, get_SrcA_Y2
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 1, 1, 0, 0,
+ create_SrcA_X1, get_SrcA_X1
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 1, 0, 0, 0,
+ create_SrcB_X0, get_SrcB_X0
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 1, 0, 0, 0,
+ create_SrcB_X1, get_SrcB_X1
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 1, 0, 0, 0,
+ create_SrcB_Y0, get_SrcB_Y0
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 1, 0, 0, 0,
+ create_SrcB_Y1, get_SrcB_Y1
+ },
+ {
+ TILEGX_OP_TYPE_ADDRESS, BFD_RELOC(TILEGX_BROFF_X1),
+ 17, 1, 0, 0, 1, TILEGX_LOG2_BUNDLE_ALIGNMENT_IN_BYTES,
+ create_BrOff_X1, get_BrOff_X1
+ },
+ {
+ TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(TILEGX_MMSTART_X0),
+ 6, 0, 0, 0, 0, 0,
+ create_BFStart_X0, get_BFStart_X0
+ },
+ {
+ TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(TILEGX_MMEND_X0),
+ 6, 0, 0, 0, 0, 0,
+ create_BFEnd_X0, get_BFEnd_X0
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 1, 1, 0, 0,
+ create_Dest_X0, get_Dest_X0
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 1, 1, 0, 0,
+ create_Dest_Y0, get_Dest_Y0
+ },
+ {
+ TILEGX_OP_TYPE_ADDRESS, BFD_RELOC(TILEGX_JUMPOFF_X1),
+ 27, 1, 0, 0, 1, TILEGX_LOG2_BUNDLE_ALIGNMENT_IN_BYTES,
+ create_JumpOff_X1, get_JumpOff_X1
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 0, 1, 0, 0,
+ create_SrcBDest_Y2, get_SrcBDest_Y2
+ },
+ {
+ TILEGX_OP_TYPE_SPR, BFD_RELOC(TILEGX_MF_IMM14_X1),
+ 14, 0, 0, 0, 0, 0,
+ create_MF_Imm14_X1, get_MF_Imm14_X1
+ },
+ {
+ TILEGX_OP_TYPE_SPR, BFD_RELOC(TILEGX_MT_IMM14_X1),
+ 14, 0, 0, 0, 0, 0,
+ create_MT_Imm14_X1, get_MT_Imm14_X1
+ },
+ {
+ TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(TILEGX_SHAMT_X0),
+ 6, 0, 0, 0, 0, 0,
+ create_ShAmt_X0, get_ShAmt_X0
+ },
+ {
+ TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(TILEGX_SHAMT_X1),
+ 6, 0, 0, 0, 0, 0,
+ create_ShAmt_X1, get_ShAmt_X1
+ },
+ {
+ TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(TILEGX_SHAMT_Y0),
+ 6, 0, 0, 0, 0, 0,
+ create_ShAmt_Y0, get_ShAmt_Y0
+ },
+ {
+ TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(TILEGX_SHAMT_Y1),
+ 6, 0, 0, 0, 0, 0,
+ create_ShAmt_Y1, get_ShAmt_Y1
+ },
+ {
+ TILEGX_OP_TYPE_REGISTER, BFD_RELOC(NONE),
+ 6, 0, 1, 0, 0, 0,
+ create_SrcBDest_Y2, get_SrcBDest_Y2
+ },
+ {
+ TILEGX_OP_TYPE_IMMEDIATE, BFD_RELOC(TILEGX_DEST_IMM8_X1),
+ 8, 1, 0, 0, 0, 0,
+ create_Dest_Imm8_X1, get_Dest_Imm8_X1
+ }
+};
+
+/* Given a set of bundle bits and a specific pipe, returns which
+ * instruction the bundle contains in that pipe.
+ */
+const struct tilegx_opcode *
+find_opcode(tilegx_bundle_bits bits, tilegx_pipeline pipe)
+{
+ const unsigned short *table = tilegx_bundle_decoder_fsms[pipe];
+ int index = 0;
+
+ while (1)
+ {
+ unsigned short bitspec = table[index];
+ unsigned int bitfield =
+ ((unsigned int)(bits >> (bitspec & 63))) & (bitspec >> 6);
+
+ unsigned short next = table[index + 1 + bitfield];
+ if (next <= TILEGX_OPC_NONE)
+ return &tilegx_opcodes[next];
+
+ index = next - TILEGX_OPC_NONE;
+ }
+}
+
+int
+parse_insn_tilegx(tilegx_bundle_bits bits,
+ unsigned long long pc,
+ struct tilegx_decoded_instruction
+ decoded[TILEGX_MAX_INSTRUCTIONS_PER_BUNDLE])
+{
+ int num_instructions = 0;
+ int pipe;
+
+ int min_pipe, max_pipe;
+ if ((bits & TILEGX_BUNDLE_MODE_MASK) == 0)
+ {
+ min_pipe = TILEGX_PIPELINE_X0;
+ max_pipe = TILEGX_PIPELINE_X1;
+ }
+ else
+ {
+ min_pipe = TILEGX_PIPELINE_Y0;
+ max_pipe = TILEGX_PIPELINE_Y2;
+ }
+
+ /* For each pipe, find an instruction that fits. */
+ for (pipe = min_pipe; pipe <= max_pipe; pipe++)
+ {
+ const struct tilegx_opcode *opc;
+ struct tilegx_decoded_instruction *d;
+ int i;
+
+ d = &decoded[num_instructions++];
+ opc = find_opcode (bits, (tilegx_pipeline)pipe);
+ d->opcode = opc;
+
+ /* Decode each operand, sign extending, etc. as appropriate. */
+ for (i = 0; i < opc->num_operands; i++)
+ {
+ const struct tilegx_operand *op =
+ &tilegx_operands[opc->operands[pipe][i]];
+ int raw_opval = op->extract (bits);
+ long long opval;
+
+ if (op->is_signed)
+ {
+ /* Sign-extend the operand. */
+ int shift = (int)((sizeof(int) * 8) - op->num_bits);
+ raw_opval = (raw_opval << shift) >> shift;
+ }
+
+ /* Adjust PC-relative scaled branch offsets. */
+ if (op->type == TILEGX_OP_TYPE_ADDRESS)
+ opval = (raw_opval * TILEGX_BUNDLE_SIZE_IN_BYTES) + pc;
+ else
+ opval = raw_opval;
+
+ /* Record the final value. */
+ d->operands[i] = op;
+ d->operand_values[i] = opval;
+ }
+ }
+
+ return num_instructions;
+}
+
+struct tilegx_spr
+{
+ /* The number */
+ int number;
+
+ /* The name */
+ const char *name;
+};
+
+static int
+tilegx_spr_compare (const void *a_ptr, const void *b_ptr)
+{
+ const struct tilegx_spr *a = (const struct tilegx_spr *) a_ptr;
+ const struct tilegx_spr *b = (const struct tilegx_spr *) b_ptr;
+ return (a->number - b->number);
+}
+
+const struct tilegx_spr tilegx_sprs[] = {
+ { 0, "MPL_MEM_ERROR_SET_0" },
+ { 1, "MPL_MEM_ERROR_SET_1" },
+ { 2, "MPL_MEM_ERROR_SET_2" },
+ { 3, "MPL_MEM_ERROR_SET_3" },
+ { 4, "MPL_MEM_ERROR" },
+ { 5, "MEM_ERROR_CBOX_ADDR" },
+ { 6, "MEM_ERROR_CBOX_STATUS" },
+ { 7, "MEM_ERROR_ENABLE" },
+ { 8, "MEM_ERROR_MBOX_ADDR" },
+ { 9, "MEM_ERROR_MBOX_STATUS" },
+ { 10, "SBOX_ERROR" },
+ { 11, "XDN_DEMUX_ERROR" },
+ { 256, "MPL_SINGLE_STEP_3_SET_0" },
+ { 257, "MPL_SINGLE_STEP_3_SET_1" },
+ { 258, "MPL_SINGLE_STEP_3_SET_2" },
+ { 259, "MPL_SINGLE_STEP_3_SET_3" },
+ { 260, "MPL_SINGLE_STEP_3" },
+ { 261, "SINGLE_STEP_CONTROL_3" },
+ { 512, "MPL_SINGLE_STEP_2_SET_0" },
+ { 513, "MPL_SINGLE_STEP_2_SET_1" },
+ { 514, "MPL_SINGLE_STEP_2_SET_2" },
+ { 515, "MPL_SINGLE_STEP_2_SET_3" },
+ { 516, "MPL_SINGLE_STEP_2" },
+ { 517, "SINGLE_STEP_CONTROL_2" },
+ { 768, "MPL_SINGLE_STEP_1_SET_0" },
+ { 769, "MPL_SINGLE_STEP_1_SET_1" },
+ { 770, "MPL_SINGLE_STEP_1_SET_2" },
+ { 771, "MPL_SINGLE_STEP_1_SET_3" },
+ { 772, "MPL_SINGLE_STEP_1" },
+ { 773, "SINGLE_STEP_CONTROL_1" },
+ { 1024, "MPL_SINGLE_STEP_0_SET_0" },
+ { 1025, "MPL_SINGLE_STEP_0_SET_1" },
+ { 1026, "MPL_SINGLE_STEP_0_SET_2" },
+ { 1027, "MPL_SINGLE_STEP_0_SET_3" },
+ { 1028, "MPL_SINGLE_STEP_0" },
+ { 1029, "SINGLE_STEP_CONTROL_0" },
+ { 1280, "MPL_IDN_COMPLETE_SET_0" },
+ { 1281, "MPL_IDN_COMPLETE_SET_1" },
+ { 1282, "MPL_IDN_COMPLETE_SET_2" },
+ { 1283, "MPL_IDN_COMPLETE_SET_3" },
+ { 1284, "MPL_IDN_COMPLETE" },
+ { 1285, "IDN_COMPLETE_PENDING" },
+ { 1536, "MPL_UDN_COMPLETE_SET_0" },
+ { 1537, "MPL_UDN_COMPLETE_SET_1" },
+ { 1538, "MPL_UDN_COMPLETE_SET_2" },
+ { 1539, "MPL_UDN_COMPLETE_SET_3" },
+ { 1540, "MPL_UDN_COMPLETE" },
+ { 1541, "UDN_COMPLETE_PENDING" },
+ { 1792, "MPL_ITLB_MISS_SET_0" },
+ { 1793, "MPL_ITLB_MISS_SET_1" },
+ { 1794, "MPL_ITLB_MISS_SET_2" },
+ { 1795, "MPL_ITLB_MISS_SET_3" },
+ { 1796, "MPL_ITLB_MISS" },
+ { 1797, "ITLB_TSB_BASE_ADDR_0" },
+ { 1798, "ITLB_TSB_BASE_ADDR_1" },
+ { 1920, "ITLB_CURRENT_ATTR" },
+ { 1921, "ITLB_CURRENT_PA" },
+ { 1922, "ITLB_CURRENT_VA" },
+ { 1923, "ITLB_INDEX" },
+ { 1924, "ITLB_MATCH_0" },
+ { 1925, "ITLB_PERF" },
+ { 1926, "ITLB_PR" },
+ { 1927, "ITLB_TSB_ADDR_0" },
+ { 1928, "ITLB_TSB_ADDR_1" },
+ { 1929, "ITLB_TSB_FILL_CURRENT_ATTR" },
+ { 1930, "ITLB_TSB_FILL_MATCH" },
+ { 1931, "NUMBER_ITLB" },
+ { 1932, "REPLACEMENT_ITLB" },
+ { 1933, "WIRED_ITLB" },
+ { 2048, "MPL_ILL_SET_0" },
+ { 2049, "MPL_ILL_SET_1" },
+ { 2050, "MPL_ILL_SET_2" },
+ { 2051, "MPL_ILL_SET_3" },
+ { 2052, "MPL_ILL" },
+ { 2304, "MPL_GPV_SET_0" },
+ { 2305, "MPL_GPV_SET_1" },
+ { 2306, "MPL_GPV_SET_2" },
+ { 2307, "MPL_GPV_SET_3" },
+ { 2308, "MPL_GPV" },
+ { 2309, "GPV_REASON" },
+ { 2560, "MPL_IDN_ACCESS_SET_0" },
+ { 2561, "MPL_IDN_ACCESS_SET_1" },
+ { 2562, "MPL_IDN_ACCESS_SET_2" },
+ { 2563, "MPL_IDN_ACCESS_SET_3" },
+ { 2564, "MPL_IDN_ACCESS" },
+ { 2565, "IDN_DEMUX_COUNT_0" },
+ { 2566, "IDN_DEMUX_COUNT_1" },
+ { 2567, "IDN_FLUSH_EGRESS" },
+ { 2568, "IDN_PENDING" },
+ { 2569, "IDN_ROUTE_ORDER" },
+ { 2570, "IDN_SP_FIFO_CNT" },
+ { 2688, "IDN_DATA_AVAIL" },
+ { 2816, "MPL_UDN_ACCESS_SET_0" },
+ { 2817, "MPL_UDN_ACCESS_SET_1" },
+ { 2818, "MPL_UDN_ACCESS_SET_2" },
+ { 2819, "MPL_UDN_ACCESS_SET_3" },
+ { 2820, "MPL_UDN_ACCESS" },
+ { 2821, "UDN_DEMUX_COUNT_0" },
+ { 2822, "UDN_DEMUX_COUNT_1" },
+ { 2823, "UDN_DEMUX_COUNT_2" },
+ { 2824, "UDN_DEMUX_COUNT_3" },
+ { 2825, "UDN_FLUSH_EGRESS" },
+ { 2826, "UDN_PENDING" },
+ { 2827, "UDN_ROUTE_ORDER" },
+ { 2828, "UDN_SP_FIFO_CNT" },
+ { 2944, "UDN_DATA_AVAIL" },
+ { 3072, "MPL_SWINT_3_SET_0" },
+ { 3073, "MPL_SWINT_3_SET_1" },
+ { 3074, "MPL_SWINT_3_SET_2" },
+ { 3075, "MPL_SWINT_3_SET_3" },
+ { 3076, "MPL_SWINT_3" },
+ { 3328, "MPL_SWINT_2_SET_0" },
+ { 3329, "MPL_SWINT_2_SET_1" },
+ { 3330, "MPL_SWINT_2_SET_2" },
+ { 3331, "MPL_SWINT_2_SET_3" },
+ { 3332, "MPL_SWINT_2" },
+ { 3584, "MPL_SWINT_1_SET_0" },
+ { 3585, "MPL_SWINT_1_SET_1" },
+ { 3586, "MPL_SWINT_1_SET_2" },
+ { 3587, "MPL_SWINT_1_SET_3" },
+ { 3588, "MPL_SWINT_1" },
+ { 3840, "MPL_SWINT_0_SET_0" },
+ { 3841, "MPL_SWINT_0_SET_1" },
+ { 3842, "MPL_SWINT_0_SET_2" },
+ { 3843, "MPL_SWINT_0_SET_3" },
+ { 3844, "MPL_SWINT_0" },
+ { 4096, "MPL_ILL_TRANS_SET_0" },
+ { 4097, "MPL_ILL_TRANS_SET_1" },
+ { 4098, "MPL_ILL_TRANS_SET_2" },
+ { 4099, "MPL_ILL_TRANS_SET_3" },
+ { 4100, "MPL_ILL_TRANS" },
+ { 4101, "ILL_TRANS_REASON" },
+ { 4102, "ILL_VA_PC" },
+ { 4352, "MPL_UNALIGN_DATA_SET_0" },
+ { 4353, "MPL_UNALIGN_DATA_SET_1" },
+ { 4354, "MPL_UNALIGN_DATA_SET_2" },
+ { 4355, "MPL_UNALIGN_DATA_SET_3" },
+ { 4356, "MPL_UNALIGN_DATA" },
+ { 4608, "MPL_DTLB_MISS_SET_0" },
+ { 4609, "MPL_DTLB_MISS_SET_1" },
+ { 4610, "MPL_DTLB_MISS_SET_2" },
+ { 4611, "MPL_DTLB_MISS_SET_3" },
+ { 4612, "MPL_DTLB_MISS" },
+ { 4613, "DTLB_TSB_BASE_ADDR_0" },
+ { 4614, "DTLB_TSB_BASE_ADDR_1" },
+ { 4736, "AAR" },
+ { 4737, "CACHE_PINNED_WAYS" },
+ { 4738, "DTLB_BAD_ADDR" },
+ { 4739, "DTLB_BAD_ADDR_REASON" },
+ { 4740, "DTLB_CURRENT_ATTR" },
+ { 4741, "DTLB_CURRENT_PA" },
+ { 4742, "DTLB_CURRENT_VA" },
+ { 4743, "DTLB_INDEX" },
+ { 4744, "DTLB_MATCH_0" },
+ { 4745, "DTLB_PERF" },
+ { 4746, "DTLB_TSB_ADDR_0" },
+ { 4747, "DTLB_TSB_ADDR_1" },
+ { 4748, "DTLB_TSB_FILL_CURRENT_ATTR" },
+ { 4749, "DTLB_TSB_FILL_MATCH" },
+ { 4750, "NUMBER_DTLB" },
+ { 4751, "REPLACEMENT_DTLB" },
+ { 4752, "WIRED_DTLB" },
+ { 4864, "MPL_DTLB_ACCESS_SET_0" },
+ { 4865, "MPL_DTLB_ACCESS_SET_1" },
+ { 4866, "MPL_DTLB_ACCESS_SET_2" },
+ { 4867, "MPL_DTLB_ACCESS_SET_3" },
+ { 4868, "MPL_DTLB_ACCESS" },
+ { 5120, "MPL_IDN_FIREWALL_SET_0" },
+ { 5121, "MPL_IDN_FIREWALL_SET_1" },
+ { 5122, "MPL_IDN_FIREWALL_SET_2" },
+ { 5123, "MPL_IDN_FIREWALL_SET_3" },
+ { 5124, "MPL_IDN_FIREWALL" },
+ { 5125, "IDN_DIRECTION_PROTECT" },
+ { 5376, "MPL_UDN_FIREWALL_SET_0" },
+ { 5377, "MPL_UDN_FIREWALL_SET_1" },
+ { 5378, "MPL_UDN_FIREWALL_SET_2" },
+ { 5379, "MPL_UDN_FIREWALL_SET_3" },
+ { 5380, "MPL_UDN_FIREWALL" },
+ { 5381, "UDN_DIRECTION_PROTECT" },
+ { 5632, "MPL_TILE_TIMER_SET_0" },
+ { 5633, "MPL_TILE_TIMER_SET_1" },
+ { 5634, "MPL_TILE_TIMER_SET_2" },
+ { 5635, "MPL_TILE_TIMER_SET_3" },
+ { 5636, "MPL_TILE_TIMER" },
+ { 5637, "TILE_TIMER_CONTROL" },
+ { 5888, "MPL_AUX_TILE_TIMER_SET_0" },
+ { 5889, "MPL_AUX_TILE_TIMER_SET_1" },
+ { 5890, "MPL_AUX_TILE_TIMER_SET_2" },
+ { 5891, "MPL_AUX_TILE_TIMER_SET_3" },
+ { 5892, "MPL_AUX_TILE_TIMER" },
+ { 5893, "AUX_TILE_TIMER_CONTROL" },
+ { 6144, "MPL_IDN_TIMER_SET_0" },
+ { 6145, "MPL_IDN_TIMER_SET_1" },
+ { 6146, "MPL_IDN_TIMER_SET_2" },
+ { 6147, "MPL_IDN_TIMER_SET_3" },
+ { 6148, "MPL_IDN_TIMER" },
+ { 6149, "IDN_DEADLOCK_COUNT" },
+ { 6150, "IDN_DEADLOCK_TIMEOUT" },
+ { 6400, "MPL_UDN_TIMER_SET_0" },
+ { 6401, "MPL_UDN_TIMER_SET_1" },
+ { 6402, "MPL_UDN_TIMER_SET_2" },
+ { 6403, "MPL_UDN_TIMER_SET_3" },
+ { 6404, "MPL_UDN_TIMER" },
+ { 6405, "UDN_DEADLOCK_COUNT" },
+ { 6406, "UDN_DEADLOCK_TIMEOUT" },
+ { 6656, "MPL_IDN_AVAIL_SET_0" },
+ { 6657, "MPL_IDN_AVAIL_SET_1" },
+ { 6658, "MPL_IDN_AVAIL_SET_2" },
+ { 6659, "MPL_IDN_AVAIL_SET_3" },
+ { 6660, "MPL_IDN_AVAIL" },
+ { 6661, "IDN_AVAIL_EN" },
+ { 6912, "MPL_UDN_AVAIL_SET_0" },
+ { 6913, "MPL_UDN_AVAIL_SET_1" },
+ { 6914, "MPL_UDN_AVAIL_SET_2" },
+ { 6915, "MPL_UDN_AVAIL_SET_3" },
+ { 6916, "MPL_UDN_AVAIL" },
+ { 6917, "UDN_AVAIL_EN" },
+ { 7168, "MPL_IPI_3_SET_0" },
+ { 7169, "MPL_IPI_3_SET_1" },
+ { 7170, "MPL_IPI_3_SET_2" },
+ { 7171, "MPL_IPI_3_SET_3" },
+ { 7172, "MPL_IPI_3" },
+ { 7173, "IPI_EVENT_3" },
+ { 7174, "IPI_EVENT_RESET_3" },
+ { 7175, "IPI_EVENT_SET_3" },
+ { 7176, "IPI_MASK_3" },
+ { 7177, "IPI_MASK_RESET_3" },
+ { 7178, "IPI_MASK_SET_3" },
+ { 7424, "MPL_IPI_2_SET_0" },
+ { 7425, "MPL_IPI_2_SET_1" },
+ { 7426, "MPL_IPI_2_SET_2" },
+ { 7427, "MPL_IPI_2_SET_3" },
+ { 7428, "MPL_IPI_2" },
+ { 7429, "IPI_EVENT_2" },
+ { 7430, "IPI_EVENT_RESET_2" },
+ { 7431, "IPI_EVENT_SET_2" },
+ { 7432, "IPI_MASK_2" },
+ { 7433, "IPI_MASK_RESET_2" },
+ { 7434, "IPI_MASK_SET_2" },
+ { 7680, "MPL_IPI_1_SET_0" },
+ { 7681, "MPL_IPI_1_SET_1" },
+ { 7682, "MPL_IPI_1_SET_2" },
+ { 7683, "MPL_IPI_1_SET_3" },
+ { 7684, "MPL_IPI_1" },
+ { 7685, "IPI_EVENT_1" },
+ { 7686, "IPI_EVENT_RESET_1" },
+ { 7687, "IPI_EVENT_SET_1" },
+ { 7688, "IPI_MASK_1" },
+ { 7689, "IPI_MASK_RESET_1" },
+ { 7690, "IPI_MASK_SET_1" },
+ { 7936, "MPL_IPI_0_SET_0" },
+ { 7937, "MPL_IPI_0_SET_1" },
+ { 7938, "MPL_IPI_0_SET_2" },
+ { 7939, "MPL_IPI_0_SET_3" },
+ { 7940, "MPL_IPI_0" },
+ { 7941, "IPI_EVENT_0" },
+ { 7942, "IPI_EVENT_RESET_0" },
+ { 7943, "IPI_EVENT_SET_0" },
+ { 7944, "IPI_MASK_0" },
+ { 7945, "IPI_MASK_RESET_0" },
+ { 7946, "IPI_MASK_SET_0" },
+ { 8192, "MPL_PERF_COUNT_SET_0" },
+ { 8193, "MPL_PERF_COUNT_SET_1" },
+ { 8194, "MPL_PERF_COUNT_SET_2" },
+ { 8195, "MPL_PERF_COUNT_SET_3" },
+ { 8196, "MPL_PERF_COUNT" },
+ { 8197, "PERF_COUNT_0" },
+ { 8198, "PERF_COUNT_1" },
+ { 8199, "PERF_COUNT_CTL" },
+ { 8200, "PERF_COUNT_DN_CTL" },
+ { 8201, "PERF_COUNT_STS" },
+ { 8202, "WATCH_MASK" },
+ { 8203, "WATCH_VAL" },
+ { 8448, "MPL_AUX_PERF_COUNT_SET_0" },
+ { 8449, "MPL_AUX_PERF_COUNT_SET_1" },
+ { 8450, "MPL_AUX_PERF_COUNT_SET_2" },
+ { 8451, "MPL_AUX_PERF_COUNT_SET_3" },
+ { 8452, "MPL_AUX_PERF_COUNT" },
+ { 8453, "AUX_PERF_COUNT_0" },
+ { 8454, "AUX_PERF_COUNT_1" },
+ { 8455, "AUX_PERF_COUNT_CTL" },
+ { 8456, "AUX_PERF_COUNT_STS" },
+ { 8704, "MPL_INTCTRL_3_SET_0" },
+ { 8705, "MPL_INTCTRL_3_SET_1" },
+ { 8706, "MPL_INTCTRL_3_SET_2" },
+ { 8707, "MPL_INTCTRL_3_SET_3" },
+ { 8708, "MPL_INTCTRL_3" },
+ { 8709, "INTCTRL_3_STATUS" },
+ { 8710, "INTERRUPT_MASK_3" },
+ { 8711, "INTERRUPT_MASK_RESET_3" },
+ { 8712, "INTERRUPT_MASK_SET_3" },
+ { 8713, "INTERRUPT_VECTOR_BASE_3" },
+ { 8714, "SINGLE_STEP_EN_0_3" },
+ { 8715, "SINGLE_STEP_EN_1_3" },
+ { 8716, "SINGLE_STEP_EN_2_3" },
+ { 8717, "SINGLE_STEP_EN_3_3" },
+ { 8832, "EX_CONTEXT_3_0" },
+ { 8833, "EX_CONTEXT_3_1" },
+ { 8834, "SYSTEM_SAVE_3_0" },
+ { 8835, "SYSTEM_SAVE_3_1" },
+ { 8836, "SYSTEM_SAVE_3_2" },
+ { 8837, "SYSTEM_SAVE_3_3" },
+ { 8960, "MPL_INTCTRL_2_SET_0" },
+ { 8961, "MPL_INTCTRL_2_SET_1" },
+ { 8962, "MPL_INTCTRL_2_SET_2" },
+ { 8963, "MPL_INTCTRL_2_SET_3" },
+ { 8964, "MPL_INTCTRL_2" },
+ { 8965, "INTCTRL_2_STATUS" },
+ { 8966, "INTERRUPT_MASK_2" },
+ { 8967, "INTERRUPT_MASK_RESET_2" },
+ { 8968, "INTERRUPT_MASK_SET_2" },
+ { 8969, "INTERRUPT_VECTOR_BASE_2" },
+ { 8970, "SINGLE_STEP_EN_0_2" },
+ { 8971, "SINGLE_STEP_EN_1_2" },
+ { 8972, "SINGLE_STEP_EN_2_2" },
+ { 8973, "SINGLE_STEP_EN_3_2" },
+ { 9088, "EX_CONTEXT_2_0" },
+ { 9089, "EX_CONTEXT_2_1" },
+ { 9090, "SYSTEM_SAVE_2_0" },
+ { 9091, "SYSTEM_SAVE_2_1" },
+ { 9092, "SYSTEM_SAVE_2_2" },
+ { 9093, "SYSTEM_SAVE_2_3" },
+ { 9216, "MPL_INTCTRL_1_SET_0" },
+ { 9217, "MPL_INTCTRL_1_SET_1" },
+ { 9218, "MPL_INTCTRL_1_SET_2" },
+ { 9219, "MPL_INTCTRL_1_SET_3" },
+ { 9220, "MPL_INTCTRL_1" },
+ { 9221, "INTCTRL_1_STATUS" },
+ { 9222, "INTERRUPT_MASK_1" },
+ { 9223, "INTERRUPT_MASK_RESET_1" },
+ { 9224, "INTERRUPT_MASK_SET_1" },
+ { 9225, "INTERRUPT_VECTOR_BASE_1" },
+ { 9226, "SINGLE_STEP_EN_0_1" },
+ { 9227, "SINGLE_STEP_EN_1_1" },
+ { 9228, "SINGLE_STEP_EN_2_1" },
+ { 9229, "SINGLE_STEP_EN_3_1" },
+ { 9344, "EX_CONTEXT_1_0" },
+ { 9345, "EX_CONTEXT_1_1" },
+ { 9346, "SYSTEM_SAVE_1_0" },
+ { 9347, "SYSTEM_SAVE_1_1" },
+ { 9348, "SYSTEM_SAVE_1_2" },
+ { 9349, "SYSTEM_SAVE_1_3" },
+ { 9472, "MPL_INTCTRL_0_SET_0" },
+ { 9473, "MPL_INTCTRL_0_SET_1" },
+ { 9474, "MPL_INTCTRL_0_SET_2" },
+ { 9475, "MPL_INTCTRL_0_SET_3" },
+ { 9476, "MPL_INTCTRL_0" },
+ { 9477, "INTCTRL_0_STATUS" },
+ { 9478, "INTERRUPT_MASK_0" },
+ { 9479, "INTERRUPT_MASK_RESET_0" },
+ { 9480, "INTERRUPT_MASK_SET_0" },
+ { 9481, "INTERRUPT_VECTOR_BASE_0" },
+ { 9482, "SINGLE_STEP_EN_0_0" },
+ { 9483, "SINGLE_STEP_EN_1_0" },
+ { 9484, "SINGLE_STEP_EN_2_0" },
+ { 9485, "SINGLE_STEP_EN_3_0" },
+ { 9600, "EX_CONTEXT_0_0" },
+ { 9601, "EX_CONTEXT_0_1" },
+ { 9602, "SYSTEM_SAVE_0_0" },
+ { 9603, "SYSTEM_SAVE_0_1" },
+ { 9604, "SYSTEM_SAVE_0_2" },
+ { 9605, "SYSTEM_SAVE_0_3" },
+ { 9728, "MPL_BOOT_ACCESS_SET_0" },
+ { 9729, "MPL_BOOT_ACCESS_SET_1" },
+ { 9730, "MPL_BOOT_ACCESS_SET_2" },
+ { 9731, "MPL_BOOT_ACCESS_SET_3" },
+ { 9732, "MPL_BOOT_ACCESS" },
+ { 9733, "BIG_ENDIAN_CONFIG" },
+ { 9734, "CACHE_INVALIDATION_COMPRESSION_MODE" },
+ { 9735, "CACHE_INVALIDATION_MASK_0" },
+ { 9736, "CACHE_INVALIDATION_MASK_1" },
+ { 9737, "CACHE_INVALIDATION_MASK_2" },
+ { 9738, "CBOX_CACHEASRAM_CONFIG" },
+ { 9739, "CBOX_CACHE_CONFIG" },
+ { 9740, "CBOX_HOME_MAP_ADDR" },
+ { 9741, "CBOX_HOME_MAP_DATA" },
+ { 9742, "CBOX_MMAP_0" },
+ { 9743, "CBOX_MMAP_1" },
+ { 9744, "CBOX_MMAP_2" },
+ { 9745, "CBOX_MMAP_3" },
+ { 9746, "CBOX_MSR" },
+ { 9747, "DIAG_BCST_CTL" },
+ { 9748, "DIAG_BCST_MASK" },
+ { 9749, "DIAG_BCST_TRIGGER" },
+ { 9750, "DIAG_MUX_CTL" },
+ { 9751, "DIAG_TRACE_CTL" },
+ { 9752, "DIAG_TRACE_DATA" },
+ { 9753, "DIAG_TRACE_STS" },
+ { 9754, "IDN_DEMUX_BUF_THRESH" },
+ { 9755, "L1_I_PIN_WAY_0" },
+ { 9756, "MEM_ROUTE_ORDER" },
+ { 9757, "MEM_STRIPE_CONFIG" },
+ { 9758, "PERF_COUNT_PLS" },
+ { 9759, "PSEUDO_RANDOM_NUMBER_MODIFY" },
+ { 9760, "QUIESCE_CTL" },
+ { 9761, "RSHIM_COORD" },
+ { 9762, "SBOX_CONFIG" },
+ { 9763, "UDN_DEMUX_BUF_THRESH" },
+ { 9764, "XDN_CORE_STARVATION_COUNT" },
+ { 9765, "XDN_ROUND_ROBIN_ARB_CTL" },
+ { 9856, "CYCLE_MODIFY" },
+ { 9857, "I_AAR" },
+ { 9984, "MPL_WORLD_ACCESS_SET_0" },
+ { 9985, "MPL_WORLD_ACCESS_SET_1" },
+ { 9986, "MPL_WORLD_ACCESS_SET_2" },
+ { 9987, "MPL_WORLD_ACCESS_SET_3" },
+ { 9988, "MPL_WORLD_ACCESS" },
+ { 9989, "DONE" },
+ { 9990, "DSTREAM_PF" },
+ { 9991, "FAIL" },
+ { 9992, "INTERRUPT_CRITICAL_SECTION" },
+ { 9993, "PASS" },
+ { 9994, "PSEUDO_RANDOM_NUMBER" },
+ { 9995, "TILE_COORD" },
+ { 9996, "TILE_RTF_HWM" },
+ { 10112, "CMPEXCH_VALUE" },
+ { 10113, "CYCLE" },
+ { 10114, "EVENT_BEGIN" },
+ { 10115, "EVENT_END" },
+ { 10116, "PROC_STATUS" },
+ { 10117, "SIM_CONTROL" },
+ { 10118, "SIM_SOCKET" },
+ { 10119, "STATUS_SATURATE" },
+ { 10240, "MPL_I_ASID_SET_0" },
+ { 10241, "MPL_I_ASID_SET_1" },
+ { 10242, "MPL_I_ASID_SET_2" },
+ { 10243, "MPL_I_ASID_SET_3" },
+ { 10244, "MPL_I_ASID" },
+ { 10245, "I_ASID" },
+ { 10496, "MPL_D_ASID_SET_0" },
+ { 10497, "MPL_D_ASID_SET_1" },
+ { 10498, "MPL_D_ASID_SET_2" },
+ { 10499, "MPL_D_ASID_SET_3" },
+ { 10500, "MPL_D_ASID" },
+ { 10501, "D_ASID" },
+ { 10752, "MPL_DOUBLE_FAULT_SET_0" },
+ { 10753, "MPL_DOUBLE_FAULT_SET_1" },
+ { 10754, "MPL_DOUBLE_FAULT_SET_2" },
+ { 10755, "MPL_DOUBLE_FAULT_SET_3" },
+ { 10756, "MPL_DOUBLE_FAULT" },
+ { 10757, "LAST_INTERRUPT_REASON" },
+};
+
+const int tilegx_num_sprs = 441;
+
+const char *
+get_tilegx_spr_name (int num)
+{
+ void *result;
+ struct tilegx_spr key;
+
+ key.number = num;
+ result = bsearch((const void *) &key, (const void *) tilegx_sprs,
+ tilegx_num_sprs, sizeof (struct tilegx_spr),
+ tilegx_spr_compare);
+
+ if (result == NULL)
+ {
+ return (NULL);
+ }
+ else
+ {
+ struct tilegx_spr *result_ptr = (struct tilegx_spr *) result;
+ return (result_ptr->name);
+ }
+}
+
+int
+print_insn_tilegx (unsigned char * memaddr)
+{
+ struct tilegx_decoded_instruction
+ decoded[TILEGX_MAX_INSTRUCTIONS_PER_BUNDLE];
+ unsigned char opbuf[TILEGX_BUNDLE_SIZE_IN_BYTES];
+ int i, num_instructions, num_printed;
+ tilegx_mnemonic padding_mnemonic;
+
+ memcpy((void *)opbuf, (void *)memaddr, TILEGX_BUNDLE_SIZE_IN_BYTES);
+
+ /* Parse the instructions in the bundle. */
+ num_instructions =
+ parse_insn_tilegx (*(unsigned long long *)opbuf, (unsigned long long)memaddr, decoded);
+
+ /* Print the instructions in the bundle. */
+ printf("{ ");
+ num_printed = 0;
+
+ /* Determine which nop opcode is used for padding and should be skipped. */
+ padding_mnemonic = TILEGX_OPC_FNOP;
+ for (i = 0; i < num_instructions; i++)
+ {
+ if (!decoded[i].opcode->can_bundle)
+ {
+ /* Instructions that cannot be bundled are padded out with nops,
+ rather than fnops. Displaying them is always clutter. */
+ padding_mnemonic = TILEGX_OPC_NOP;
+ break;
+ }
+ }
+
+ for (i = 0; i < num_instructions; i++)
+ {
+ const struct tilegx_opcode *opcode = decoded[i].opcode;
+ const char *name;
+ int j;
+
+ /* Do not print out fnops, unless everything is an fnop, in
+ which case we will print out just the last one. */
+ if (opcode->mnemonic == padding_mnemonic
+ && (num_printed > 0 || i + 1 < num_instructions))
+ continue;
+
+ if (num_printed > 0)
+ printf(" ; ");
+ ++num_printed;
+
+ name = opcode->name;
+ if (name == NULL)
+ name = "<invalid>";
+ printf("%s", name);
+
+ for (j = 0; j < opcode->num_operands; j++)
+ {
+ unsigned long long num;
+ const struct tilegx_operand *op;
+ const char *spr_name;
+
+ if (j > 0)
+ printf (",");
+ printf (" ");
+
+ num = decoded[i].operand_values[j];
+
+ op = decoded[i].operands[j];
+ switch (op->type)
+ {
+ case TILEGX_OP_TYPE_REGISTER:
+ printf ("%s", tilegx_register_names[(int)num]);
+ break;
+ case TILEGX_OP_TYPE_SPR:
+ spr_name = get_tilegx_spr_name(num);
+ if (spr_name != NULL)
+ printf ("%s", spr_name);
+ else
+ printf ("%d", (int)num);
+ break;
+ case TILEGX_OP_TYPE_IMMEDIATE:
+ printf ("%d", (int)num);
+ break;
+ case TILEGX_OP_TYPE_ADDRESS:
+ printf ("0x%016llx", num);
+ break;
+ default:
+ abort ();
+ }
+ }
+ }
+ printf (" }\n");
+
+ return TILEGX_BUNDLE_SIZE_IN_BYTES;
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeTILEGX_64.c b/thirdparty/pcre2/src/sljit/sljitNativeTILEGX_64.c
new file mode 100644
index 0000000000..177a65b006
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativeTILEGX_64.c
@@ -0,0 +1,2563 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2013-2013 Tilera Corporation(jiwang@tilera.com). All rights reserved.
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* TileGX architecture. */
+/* Contributed by Tilera Corporation. */
+#include "sljitNativeTILEGX-encoder.c"
+
+#define SIMM_8BIT_MAX (0x7f)
+#define SIMM_8BIT_MIN (-0x80)
+#define SIMM_16BIT_MAX (0x7fff)
+#define SIMM_16BIT_MIN (-0x8000)
+#define SIMM_17BIT_MAX (0xffff)
+#define SIMM_17BIT_MIN (-0x10000)
+#define SIMM_32BIT_MAX (0x7fffffff)
+#define SIMM_32BIT_MIN (-0x7fffffff - 1)
+#define SIMM_48BIT_MAX (0x7fffffff0000L)
+#define SIMM_48BIT_MIN (-0x800000000000L)
+#define IMM16(imm) ((imm) & 0xffff)
+
+#define UIMM_16BIT_MAX (0xffff)
+
+#define TMP_REG1 (SLJIT_NUMBER_OF_REGISTERS + 2)
+#define TMP_REG2 (SLJIT_NUMBER_OF_REGISTERS + 3)
+#define TMP_REG3 (SLJIT_NUMBER_OF_REGISTERS + 4)
+#define ADDR_TMP (SLJIT_NUMBER_OF_REGISTERS + 5)
+#define PIC_ADDR_REG TMP_REG2
+
+static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 6] = {
+ 63, 0, 1, 2, 3, 4, 30, 31, 32, 33, 34, 54, 5, 16, 6, 7
+};
+
+#define SLJIT_LOCALS_REG_mapped 54
+#define TMP_REG1_mapped 5
+#define TMP_REG2_mapped 16
+#define TMP_REG3_mapped 6
+#define ADDR_TMP_mapped 7
+
+/* Flags are keept in volatile registers. */
+#define EQUAL_FLAG 8
+/* And carry flag as well. */
+#define ULESS_FLAG 9
+#define UGREATER_FLAG 10
+#define LESS_FLAG 11
+#define GREATER_FLAG 12
+#define OVERFLOW_FLAG 13
+
+#define ZERO 63
+#define RA 55
+#define TMP_EREG1 14
+#define TMP_EREG2 15
+
+#define LOAD_DATA 0x01
+#define WORD_DATA 0x00
+#define BYTE_DATA 0x02
+#define HALF_DATA 0x04
+#define INT_DATA 0x06
+#define SIGNED_DATA 0x08
+#define DOUBLE_DATA 0x10
+
+/* Separates integer and floating point registers */
+#define GPR_REG 0xf
+
+#define MEM_MASK 0x1f
+
+#define WRITE_BACK 0x00020
+#define ARG_TEST 0x00040
+#define ALT_KEEP_CACHE 0x00080
+#define CUMULATIVE_OP 0x00100
+#define LOGICAL_OP 0x00200
+#define IMM_OP 0x00400
+#define SRC2_IMM 0x00800
+
+#define UNUSED_DEST 0x01000
+#define REG_DEST 0x02000
+#define REG1_SOURCE 0x04000
+#define REG2_SOURCE 0x08000
+#define SLOW_SRC1 0x10000
+#define SLOW_SRC2 0x20000
+#define SLOW_DEST 0x40000
+
+/* Only these flags are set. UNUSED_DEST is not set when no flags should be set.
+ */
+#define CHECK_FLAGS(list) (!(flags & UNUSED_DEST) || (op & GET_FLAGS(~(list))))
+
+SLJIT_API_FUNC_ATTRIBUTE const char *sljit_get_platform_name(void)
+{
+ return "TileGX" SLJIT_CPUINFO;
+}
+
+/* Length of an instruction word */
+typedef sljit_uw sljit_ins;
+
+struct jit_instr {
+ const struct tilegx_opcode* opcode;
+ tilegx_pipeline pipe;
+ unsigned long input_registers;
+ unsigned long output_registers;
+ int operand_value[4];
+ int line;
+};
+
+/* Opcode Helper Macros */
+#define TILEGX_X_MODE 0
+
+#define X_MODE create_Mode(TILEGX_X_MODE)
+
+#define FNOP_X0 \
+ create_Opcode_X0(RRR_0_OPCODE_X0) | \
+ create_RRROpcodeExtension_X0(UNARY_RRR_0_OPCODE_X0) | \
+ create_UnaryOpcodeExtension_X0(FNOP_UNARY_OPCODE_X0)
+
+#define FNOP_X1 \
+ create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(UNARY_RRR_0_OPCODE_X1) | \
+ create_UnaryOpcodeExtension_X1(FNOP_UNARY_OPCODE_X1)
+
+#define NOP \
+ create_Mode(TILEGX_X_MODE) | FNOP_X0 | FNOP_X1
+
+#define ANOP_X0 \
+ create_Opcode_X0(RRR_0_OPCODE_X0) | \
+ create_RRROpcodeExtension_X0(UNARY_RRR_0_OPCODE_X0) | \
+ create_UnaryOpcodeExtension_X0(NOP_UNARY_OPCODE_X0)
+
+#define BPT create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(UNARY_RRR_0_OPCODE_X1) | \
+ create_UnaryOpcodeExtension_X1(ILL_UNARY_OPCODE_X1) | \
+ create_Dest_X1(0x1C) | create_SrcA_X1(0x25) | ANOP_X0
+
+#define ADD_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(ADD_RRR_0_OPCODE_X1) | FNOP_X0
+
+#define ADDI_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(IMM8_OPCODE_X1) | \
+ create_Imm8OpcodeExtension_X1(ADDI_IMM8_OPCODE_X1) | FNOP_X0
+
+#define SUB_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(SUB_RRR_0_OPCODE_X1) | FNOP_X0
+
+#define NOR_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(NOR_RRR_0_OPCODE_X1) | FNOP_X0
+
+#define OR_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(OR_RRR_0_OPCODE_X1) | FNOP_X0
+
+#define AND_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(AND_RRR_0_OPCODE_X1) | FNOP_X0
+
+#define XOR_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(XOR_RRR_0_OPCODE_X1) | FNOP_X0
+
+#define CMOVNEZ_X0 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X0(RRR_0_OPCODE_X0) | \
+ create_RRROpcodeExtension_X0(CMOVNEZ_RRR_0_OPCODE_X0) | FNOP_X1
+
+#define CMOVEQZ_X0 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X0(RRR_0_OPCODE_X0) | \
+ create_RRROpcodeExtension_X0(CMOVEQZ_RRR_0_OPCODE_X0) | FNOP_X1
+
+#define ADDLI_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(ADDLI_OPCODE_X1) | FNOP_X0
+
+#define V4INT_L_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(V4INT_L_RRR_0_OPCODE_X1) | FNOP_X0
+
+#define BFEXTU_X0 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X0(BF_OPCODE_X0) | \
+ create_BFOpcodeExtension_X0(BFEXTU_BF_OPCODE_X0) | FNOP_X1
+
+#define BFEXTS_X0 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X0(BF_OPCODE_X0) | \
+ create_BFOpcodeExtension_X0(BFEXTS_BF_OPCODE_X0) | FNOP_X1
+
+#define SHL16INSLI_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(SHL16INSLI_OPCODE_X1) | FNOP_X0
+
+#define ST_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(ST_RRR_0_OPCODE_X1) | create_Dest_X1(0x0) | FNOP_X0
+
+#define LD_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(UNARY_RRR_0_OPCODE_X1) | \
+ create_UnaryOpcodeExtension_X1(LD_UNARY_OPCODE_X1) | FNOP_X0
+
+#define JR_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(UNARY_RRR_0_OPCODE_X1) | \
+ create_UnaryOpcodeExtension_X1(JR_UNARY_OPCODE_X1) | FNOP_X0
+
+#define JALR_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(UNARY_RRR_0_OPCODE_X1) | \
+ create_UnaryOpcodeExtension_X1(JALR_UNARY_OPCODE_X1) | FNOP_X0
+
+#define CLZ_X0 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X0(RRR_0_OPCODE_X0) | \
+ create_RRROpcodeExtension_X0(UNARY_RRR_0_OPCODE_X0) | \
+ create_UnaryOpcodeExtension_X0(CNTLZ_UNARY_OPCODE_X0) | FNOP_X1
+
+#define CMPLTUI_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(IMM8_OPCODE_X1) | \
+ create_Imm8OpcodeExtension_X1(CMPLTUI_IMM8_OPCODE_X1) | FNOP_X0
+
+#define CMPLTU_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(CMPLTU_RRR_0_OPCODE_X1) | FNOP_X0
+
+#define CMPLTS_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(CMPLTS_RRR_0_OPCODE_X1) | FNOP_X0
+
+#define XORI_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(IMM8_OPCODE_X1) | \
+ create_Imm8OpcodeExtension_X1(XORI_IMM8_OPCODE_X1) | FNOP_X0
+
+#define ORI_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(IMM8_OPCODE_X1) | \
+ create_Imm8OpcodeExtension_X1(ORI_IMM8_OPCODE_X1) | FNOP_X0
+
+#define ANDI_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(IMM8_OPCODE_X1) | \
+ create_Imm8OpcodeExtension_X1(ANDI_IMM8_OPCODE_X1) | FNOP_X0
+
+#define SHLI_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(SHIFT_OPCODE_X1) | \
+ create_ShiftOpcodeExtension_X1(SHLI_SHIFT_OPCODE_X1) | FNOP_X0
+
+#define SHL_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(SHL_RRR_0_OPCODE_X1) | FNOP_X0
+
+#define SHRSI_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(SHIFT_OPCODE_X1) | \
+ create_ShiftOpcodeExtension_X1(SHRSI_SHIFT_OPCODE_X1) | FNOP_X0
+
+#define SHRS_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(SHRS_RRR_0_OPCODE_X1) | FNOP_X0
+
+#define SHRUI_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(SHIFT_OPCODE_X1) | \
+ create_ShiftOpcodeExtension_X1(SHRUI_SHIFT_OPCODE_X1) | FNOP_X0
+
+#define SHRU_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(RRR_0_OPCODE_X1) | \
+ create_RRROpcodeExtension_X1(SHRU_RRR_0_OPCODE_X1) | FNOP_X0
+
+#define BEQZ_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(BRANCH_OPCODE_X1) | \
+ create_BrType_X1(BEQZ_BRANCH_OPCODE_X1) | FNOP_X0
+
+#define BNEZ_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(BRANCH_OPCODE_X1) | \
+ create_BrType_X1(BNEZ_BRANCH_OPCODE_X1) | FNOP_X0
+
+#define J_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(JUMP_OPCODE_X1) | \
+ create_JumpOpcodeExtension_X1(J_JUMP_OPCODE_X1) | FNOP_X0
+
+#define JAL_X1 \
+ create_Mode(TILEGX_X_MODE) | create_Opcode_X1(JUMP_OPCODE_X1) | \
+ create_JumpOpcodeExtension_X1(JAL_JUMP_OPCODE_X1) | FNOP_X0
+
+#define DEST_X0(x) create_Dest_X0(x)
+#define SRCA_X0(x) create_SrcA_X0(x)
+#define SRCB_X0(x) create_SrcB_X0(x)
+#define DEST_X1(x) create_Dest_X1(x)
+#define SRCA_X1(x) create_SrcA_X1(x)
+#define SRCB_X1(x) create_SrcB_X1(x)
+#define IMM16_X1(x) create_Imm16_X1(x)
+#define IMM8_X1(x) create_Imm8_X1(x)
+#define BFSTART_X0(x) create_BFStart_X0(x)
+#define BFEND_X0(x) create_BFEnd_X0(x)
+#define SHIFTIMM_X1(x) create_ShAmt_X1(x)
+#define JOFF_X1(x) create_JumpOff_X1(x)
+#define BOFF_X1(x) create_BrOff_X1(x)
+
+static const tilegx_mnemonic data_transfer_insts[16] = {
+ /* u w s */ TILEGX_OPC_ST /* st */,
+ /* u w l */ TILEGX_OPC_LD /* ld */,
+ /* u b s */ TILEGX_OPC_ST1 /* st1 */,
+ /* u b l */ TILEGX_OPC_LD1U /* ld1u */,
+ /* u h s */ TILEGX_OPC_ST2 /* st2 */,
+ /* u h l */ TILEGX_OPC_LD2U /* ld2u */,
+ /* u i s */ TILEGX_OPC_ST4 /* st4 */,
+ /* u i l */ TILEGX_OPC_LD4U /* ld4u */,
+ /* s w s */ TILEGX_OPC_ST /* st */,
+ /* s w l */ TILEGX_OPC_LD /* ld */,
+ /* s b s */ TILEGX_OPC_ST1 /* st1 */,
+ /* s b l */ TILEGX_OPC_LD1S /* ld1s */,
+ /* s h s */ TILEGX_OPC_ST2 /* st2 */,
+ /* s h l */ TILEGX_OPC_LD2S /* ld2s */,
+ /* s i s */ TILEGX_OPC_ST4 /* st4 */,
+ /* s i l */ TILEGX_OPC_LD4S /* ld4s */,
+};
+
+#ifdef TILEGX_JIT_DEBUG
+static sljit_s32 push_inst_debug(struct sljit_compiler *compiler, sljit_ins ins, int line)
+{
+ sljit_ins *ptr = (sljit_ins *)ensure_buf(compiler, sizeof(sljit_ins));
+ FAIL_IF(!ptr);
+ *ptr = ins;
+ compiler->size++;
+ printf("|%04d|S0|:\t\t", line);
+ print_insn_tilegx(ptr);
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 push_inst_nodebug(struct sljit_compiler *compiler, sljit_ins ins)
+{
+ sljit_ins *ptr = (sljit_ins *)ensure_buf(compiler, sizeof(sljit_ins));
+ FAIL_IF(!ptr);
+ *ptr = ins;
+ compiler->size++;
+ return SLJIT_SUCCESS;
+}
+
+#define push_inst(a, b) push_inst_debug(a, b, __LINE__)
+#else
+static sljit_s32 push_inst(struct sljit_compiler *compiler, sljit_ins ins)
+{
+ sljit_ins *ptr = (sljit_ins *)ensure_buf(compiler, sizeof(sljit_ins));
+ FAIL_IF(!ptr);
+ *ptr = ins;
+ compiler->size++;
+ return SLJIT_SUCCESS;
+}
+#endif
+
+#define BUNDLE_FORMAT_MASK(p0, p1, p2) \
+ ((p0) | ((p1) << 8) | ((p2) << 16))
+
+#define BUNDLE_FORMAT(p0, p1, p2) \
+ { \
+ { \
+ (tilegx_pipeline)(p0), \
+ (tilegx_pipeline)(p1), \
+ (tilegx_pipeline)(p2) \
+ }, \
+ BUNDLE_FORMAT_MASK(1 << (p0), 1 << (p1), (1 << (p2))) \
+ }
+
+#define NO_PIPELINE TILEGX_NUM_PIPELINE_ENCODINGS
+
+#define tilegx_is_x_pipeline(p) ((int)(p) <= (int)TILEGX_PIPELINE_X1)
+
+#define PI(encoding) \
+ push_inst(compiler, encoding)
+
+#define PB3(opcode, dst, srca, srcb) \
+ push_3_buffer(compiler, opcode, dst, srca, srcb, __LINE__)
+
+#define PB2(opcode, dst, src) \
+ push_2_buffer(compiler, opcode, dst, src, __LINE__)
+
+#define JR(reg) \
+ push_jr_buffer(compiler, TILEGX_OPC_JR, reg, __LINE__)
+
+#define ADD(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_ADD, dst, srca, srcb, __LINE__)
+
+#define SUB(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_SUB, dst, srca, srcb, __LINE__)
+
+#define MUL(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_MULX, dst, srca, srcb, __LINE__)
+
+#define NOR(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_NOR, dst, srca, srcb, __LINE__)
+
+#define OR(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_OR, dst, srca, srcb, __LINE__)
+
+#define XOR(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_XOR, dst, srca, srcb, __LINE__)
+
+#define AND(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_AND, dst, srca, srcb, __LINE__)
+
+#define CLZ(dst, src) \
+ push_2_buffer(compiler, TILEGX_OPC_CLZ, dst, src, __LINE__)
+
+#define SHLI(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_SHLI, dst, srca, srcb, __LINE__)
+
+#define SHRUI(dst, srca, imm) \
+ push_3_buffer(compiler, TILEGX_OPC_SHRUI, dst, srca, imm, __LINE__)
+
+#define XORI(dst, srca, imm) \
+ push_3_buffer(compiler, TILEGX_OPC_XORI, dst, srca, imm, __LINE__)
+
+#define ORI(dst, srca, imm) \
+ push_3_buffer(compiler, TILEGX_OPC_ORI, dst, srca, imm, __LINE__)
+
+#define CMPLTU(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_CMPLTU, dst, srca, srcb, __LINE__)
+
+#define CMPLTS(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_CMPLTS, dst, srca, srcb, __LINE__)
+
+#define CMPLTUI(dst, srca, imm) \
+ push_3_buffer(compiler, TILEGX_OPC_CMPLTUI, dst, srca, imm, __LINE__)
+
+#define CMOVNEZ(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_CMOVNEZ, dst, srca, srcb, __LINE__)
+
+#define CMOVEQZ(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_CMOVEQZ, dst, srca, srcb, __LINE__)
+
+#define ADDLI(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_ADDLI, dst, srca, srcb, __LINE__)
+
+#define SHL16INSLI(dst, srca, srcb) \
+ push_3_buffer(compiler, TILEGX_OPC_SHL16INSLI, dst, srca, srcb, __LINE__)
+
+#define LD_ADD(dst, addr, adjust) \
+ push_3_buffer(compiler, TILEGX_OPC_LD_ADD, dst, addr, adjust, __LINE__)
+
+#define ST_ADD(src, addr, adjust) \
+ push_3_buffer(compiler, TILEGX_OPC_ST_ADD, src, addr, adjust, __LINE__)
+
+#define LD(dst, addr) \
+ push_2_buffer(compiler, TILEGX_OPC_LD, dst, addr, __LINE__)
+
+#define BFEXTU(dst, src, start, end) \
+ push_4_buffer(compiler, TILEGX_OPC_BFEXTU, dst, src, start, end, __LINE__)
+
+#define BFEXTS(dst, src, start, end) \
+ push_4_buffer(compiler, TILEGX_OPC_BFEXTS, dst, src, start, end, __LINE__)
+
+#define ADD_SOLO(dest, srca, srcb) \
+ push_inst(compiler, ADD_X1 | DEST_X1(dest) | SRCA_X1(srca) | SRCB_X1(srcb))
+
+#define ADDI_SOLO(dest, srca, imm) \
+ push_inst(compiler, ADDI_X1 | DEST_X1(dest) | SRCA_X1(srca) | IMM8_X1(imm))
+
+#define ADDLI_SOLO(dest, srca, imm) \
+ push_inst(compiler, ADDLI_X1 | DEST_X1(dest) | SRCA_X1(srca) | IMM16_X1(imm))
+
+#define SHL16INSLI_SOLO(dest, srca, imm) \
+ push_inst(compiler, SHL16INSLI_X1 | DEST_X1(dest) | SRCA_X1(srca) | IMM16_X1(imm))
+
+#define JALR_SOLO(reg) \
+ push_inst(compiler, JALR_X1 | SRCA_X1(reg))
+
+#define JR_SOLO(reg) \
+ push_inst(compiler, JR_X1 | SRCA_X1(reg))
+
+struct Format {
+ /* Mapping of bundle issue slot to assigned pipe. */
+ tilegx_pipeline pipe[TILEGX_MAX_INSTRUCTIONS_PER_BUNDLE];
+
+ /* Mask of pipes used by this bundle. */
+ unsigned int pipe_mask;
+};
+
+const struct Format formats[] =
+{
+ /* In Y format we must always have something in Y2, since it has
+ * no fnop, so this conveys that Y2 must always be used. */
+ BUNDLE_FORMAT(TILEGX_PIPELINE_Y0, TILEGX_PIPELINE_Y2, NO_PIPELINE),
+ BUNDLE_FORMAT(TILEGX_PIPELINE_Y1, TILEGX_PIPELINE_Y2, NO_PIPELINE),
+ BUNDLE_FORMAT(TILEGX_PIPELINE_Y2, TILEGX_PIPELINE_Y0, NO_PIPELINE),
+ BUNDLE_FORMAT(TILEGX_PIPELINE_Y2, TILEGX_PIPELINE_Y1, NO_PIPELINE),
+
+ /* Y format has three instructions. */
+ BUNDLE_FORMAT(TILEGX_PIPELINE_Y0, TILEGX_PIPELINE_Y1, TILEGX_PIPELINE_Y2),
+ BUNDLE_FORMAT(TILEGX_PIPELINE_Y0, TILEGX_PIPELINE_Y2, TILEGX_PIPELINE_Y1),
+ BUNDLE_FORMAT(TILEGX_PIPELINE_Y1, TILEGX_PIPELINE_Y0, TILEGX_PIPELINE_Y2),
+ BUNDLE_FORMAT(TILEGX_PIPELINE_Y1, TILEGX_PIPELINE_Y2, TILEGX_PIPELINE_Y0),
+ BUNDLE_FORMAT(TILEGX_PIPELINE_Y2, TILEGX_PIPELINE_Y0, TILEGX_PIPELINE_Y1),
+ BUNDLE_FORMAT(TILEGX_PIPELINE_Y2, TILEGX_PIPELINE_Y1, TILEGX_PIPELINE_Y0),
+
+ /* X format has only two instructions. */
+ BUNDLE_FORMAT(TILEGX_PIPELINE_X0, TILEGX_PIPELINE_X1, NO_PIPELINE),
+ BUNDLE_FORMAT(TILEGX_PIPELINE_X1, TILEGX_PIPELINE_X0, NO_PIPELINE)
+};
+
+
+struct jit_instr inst_buf[TILEGX_MAX_INSTRUCTIONS_PER_BUNDLE];
+unsigned long inst_buf_index;
+
+tilegx_pipeline get_any_valid_pipe(const struct tilegx_opcode* opcode)
+{
+ /* FIXME: tile: we could pregenerate this. */
+ int pipe;
+ for (pipe = 0; ((opcode->pipes & (1 << pipe)) == 0 && pipe < TILEGX_NUM_PIPELINE_ENCODINGS); pipe++)
+ ;
+ return (tilegx_pipeline)(pipe);
+}
+
+void insert_nop(tilegx_mnemonic opc, int line)
+{
+ const struct tilegx_opcode* opcode = NULL;
+
+ memmove(&inst_buf[1], &inst_buf[0], inst_buf_index * sizeof inst_buf[0]);
+
+ opcode = &tilegx_opcodes[opc];
+ inst_buf[0].opcode = opcode;
+ inst_buf[0].pipe = get_any_valid_pipe(opcode);
+ inst_buf[0].input_registers = 0;
+ inst_buf[0].output_registers = 0;
+ inst_buf[0].line = line;
+ ++inst_buf_index;
+}
+
+const struct Format* compute_format()
+{
+ unsigned int compatible_pipes = BUNDLE_FORMAT_MASK(
+ inst_buf[0].opcode->pipes,
+ inst_buf[1].opcode->pipes,
+ (inst_buf_index == 3 ? inst_buf[2].opcode->pipes : (1 << NO_PIPELINE)));
+
+ const struct Format* match = NULL;
+ const struct Format *b = NULL;
+ unsigned int i;
+ for (i = 0; i < sizeof formats / sizeof formats[0]; i++) {
+ b = &formats[i];
+ if ((b->pipe_mask & compatible_pipes) == b->pipe_mask) {
+ match = b;
+ break;
+ }
+ }
+
+ return match;
+}
+
+sljit_s32 assign_pipes()
+{
+ unsigned long output_registers = 0;
+ unsigned int i = 0;
+
+ if (inst_buf_index == 1) {
+ tilegx_mnemonic opc = inst_buf[0].opcode->can_bundle
+ ? TILEGX_OPC_FNOP : TILEGX_OPC_NOP;
+ insert_nop(opc, __LINE__);
+ }
+
+ const struct Format* match = compute_format();
+
+ if (match == NULL)
+ return -1;
+
+ for (i = 0; i < inst_buf_index; i++) {
+
+ if ((i > 0) && ((inst_buf[i].input_registers & output_registers) != 0))
+ return -1;
+
+ if ((i > 0) && ((inst_buf[i].output_registers & output_registers) != 0))
+ return -1;
+
+ /* Don't include Rzero in the match set, to avoid triggering
+ needlessly on 'prefetch' instrs. */
+
+ output_registers |= inst_buf[i].output_registers & 0xFFFFFFFFFFFFFFL;
+
+ inst_buf[i].pipe = match->pipe[i];
+ }
+
+ /* If only 2 instrs, and in Y-mode, insert a nop. */
+ if (inst_buf_index == 2 && !tilegx_is_x_pipeline(match->pipe[0])) {
+ insert_nop(TILEGX_OPC_FNOP, __LINE__);
+
+ /* Select the yet unassigned pipe. */
+ tilegx_pipeline pipe = (tilegx_pipeline)(((TILEGX_PIPELINE_Y0
+ + TILEGX_PIPELINE_Y1 + TILEGX_PIPELINE_Y2)
+ - (inst_buf[1].pipe + inst_buf[2].pipe)));
+
+ inst_buf[0].pipe = pipe;
+ }
+
+ return 0;
+}
+
+tilegx_bundle_bits get_bundle_bit(struct jit_instr *inst)
+{
+ int i, val;
+ const struct tilegx_opcode* opcode = inst->opcode;
+ tilegx_bundle_bits bits = opcode->fixed_bit_values[inst->pipe];
+
+ const struct tilegx_operand* operand = NULL;
+ for (i = 0; i < opcode->num_operands; i++) {
+ operand = &tilegx_operands[opcode->operands[inst->pipe][i]];
+ val = inst->operand_value[i];
+
+ bits |= operand->insert(val);
+ }
+
+ return bits;
+}
+
+static sljit_s32 update_buffer(struct sljit_compiler *compiler)
+{
+ int i;
+ int orig_index = inst_buf_index;
+ struct jit_instr inst0 = inst_buf[0];
+ struct jit_instr inst1 = inst_buf[1];
+ struct jit_instr inst2 = inst_buf[2];
+ tilegx_bundle_bits bits = 0;
+
+ /* If the bundle is valid as is, perform the encoding and return 1. */
+ if (assign_pipes() == 0) {
+ for (i = 0; i < inst_buf_index; i++) {
+ bits |= get_bundle_bit(inst_buf + i);
+#ifdef TILEGX_JIT_DEBUG
+ printf("|%04d", inst_buf[i].line);
+#endif
+ }
+#ifdef TILEGX_JIT_DEBUG
+ if (inst_buf_index == 3)
+ printf("|M0|:\t");
+ else
+ printf("|M0|:\t\t");
+ print_insn_tilegx(&bits);
+#endif
+
+ inst_buf_index = 0;
+
+#ifdef TILEGX_JIT_DEBUG
+ return push_inst_nodebug(compiler, bits);
+#else
+ return push_inst(compiler, bits);
+#endif
+ }
+
+ /* If the bundle is invalid, split it in two. First encode the first two
+ (or possibly 1) instructions, and then the last, separately. Note that
+ assign_pipes may have re-ordered the instrs (by inserting no-ops in
+ lower slots) so we need to reset them. */
+
+ inst_buf_index = orig_index - 1;
+ inst_buf[0] = inst0;
+ inst_buf[1] = inst1;
+ inst_buf[2] = inst2;
+ if (assign_pipes() == 0) {
+ for (i = 0; i < inst_buf_index; i++) {
+ bits |= get_bundle_bit(inst_buf + i);
+#ifdef TILEGX_JIT_DEBUG
+ printf("|%04d", inst_buf[i].line);
+#endif
+ }
+
+#ifdef TILEGX_JIT_DEBUG
+ if (inst_buf_index == 3)
+ printf("|M1|:\t");
+ else
+ printf("|M1|:\t\t");
+ print_insn_tilegx(&bits);
+#endif
+
+ if ((orig_index - 1) == 2) {
+ inst_buf[0] = inst2;
+ inst_buf_index = 1;
+ } else if ((orig_index - 1) == 1) {
+ inst_buf[0] = inst1;
+ inst_buf_index = 1;
+ } else
+ SLJIT_ASSERT_STOP();
+
+#ifdef TILEGX_JIT_DEBUG
+ return push_inst_nodebug(compiler, bits);
+#else
+ return push_inst(compiler, bits);
+#endif
+ } else {
+ /* We had 3 instrs of which the first 2 can't live in the same bundle.
+ Split those two. Note that we don't try to then combine the second
+ and third instr into a single bundle. First instruction: */
+ inst_buf_index = 1;
+ inst_buf[0] = inst0;
+ inst_buf[1] = inst1;
+ inst_buf[2] = inst2;
+ if (assign_pipes() == 0) {
+ for (i = 0; i < inst_buf_index; i++) {
+ bits |= get_bundle_bit(inst_buf + i);
+#ifdef TILEGX_JIT_DEBUG
+ printf("|%04d", inst_buf[i].line);
+#endif
+ }
+
+#ifdef TILEGX_JIT_DEBUG
+ if (inst_buf_index == 3)
+ printf("|M2|:\t");
+ else
+ printf("|M2|:\t\t");
+ print_insn_tilegx(&bits);
+#endif
+
+ inst_buf[0] = inst1;
+ inst_buf[1] = inst2;
+ inst_buf_index = orig_index - 1;
+#ifdef TILEGX_JIT_DEBUG
+ return push_inst_nodebug(compiler, bits);
+#else
+ return push_inst(compiler, bits);
+#endif
+ } else
+ SLJIT_ASSERT_STOP();
+ }
+
+ SLJIT_ASSERT_STOP();
+}
+
+static sljit_s32 flush_buffer(struct sljit_compiler *compiler)
+{
+ while (inst_buf_index != 0) {
+ FAIL_IF(update_buffer(compiler));
+ }
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 push_4_buffer(struct sljit_compiler *compiler, tilegx_mnemonic opc, int op0, int op1, int op2, int op3, int line)
+{
+ if (inst_buf_index == TILEGX_MAX_INSTRUCTIONS_PER_BUNDLE)
+ FAIL_IF(update_buffer(compiler));
+
+ const struct tilegx_opcode* opcode = &tilegx_opcodes[opc];
+ inst_buf[inst_buf_index].opcode = opcode;
+ inst_buf[inst_buf_index].pipe = get_any_valid_pipe(opcode);
+ inst_buf[inst_buf_index].operand_value[0] = op0;
+ inst_buf[inst_buf_index].operand_value[1] = op1;
+ inst_buf[inst_buf_index].operand_value[2] = op2;
+ inst_buf[inst_buf_index].operand_value[3] = op3;
+ inst_buf[inst_buf_index].input_registers = 1L << op1;
+ inst_buf[inst_buf_index].output_registers = 1L << op0;
+ inst_buf[inst_buf_index].line = line;
+ inst_buf_index++;
+
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 push_3_buffer(struct sljit_compiler *compiler, tilegx_mnemonic opc, int op0, int op1, int op2, int line)
+{
+ if (inst_buf_index == TILEGX_MAX_INSTRUCTIONS_PER_BUNDLE)
+ FAIL_IF(update_buffer(compiler));
+
+ const struct tilegx_opcode* opcode = &tilegx_opcodes[opc];
+ inst_buf[inst_buf_index].opcode = opcode;
+ inst_buf[inst_buf_index].pipe = get_any_valid_pipe(opcode);
+ inst_buf[inst_buf_index].operand_value[0] = op0;
+ inst_buf[inst_buf_index].operand_value[1] = op1;
+ inst_buf[inst_buf_index].operand_value[2] = op2;
+ inst_buf[inst_buf_index].line = line;
+
+ switch (opc) {
+ case TILEGX_OPC_ST_ADD:
+ inst_buf[inst_buf_index].input_registers = (1L << op0) | (1L << op1);
+ inst_buf[inst_buf_index].output_registers = 1L << op0;
+ break;
+ case TILEGX_OPC_LD_ADD:
+ inst_buf[inst_buf_index].input_registers = 1L << op1;
+ inst_buf[inst_buf_index].output_registers = (1L << op0) | (1L << op1);
+ break;
+ case TILEGX_OPC_ADD:
+ case TILEGX_OPC_AND:
+ case TILEGX_OPC_SUB:
+ case TILEGX_OPC_MULX:
+ case TILEGX_OPC_OR:
+ case TILEGX_OPC_XOR:
+ case TILEGX_OPC_NOR:
+ case TILEGX_OPC_SHL:
+ case TILEGX_OPC_SHRU:
+ case TILEGX_OPC_SHRS:
+ case TILEGX_OPC_CMPLTU:
+ case TILEGX_OPC_CMPLTS:
+ case TILEGX_OPC_CMOVEQZ:
+ case TILEGX_OPC_CMOVNEZ:
+ inst_buf[inst_buf_index].input_registers = (1L << op1) | (1L << op2);
+ inst_buf[inst_buf_index].output_registers = 1L << op0;
+ break;
+ case TILEGX_OPC_ADDLI:
+ case TILEGX_OPC_XORI:
+ case TILEGX_OPC_ORI:
+ case TILEGX_OPC_SHLI:
+ case TILEGX_OPC_SHRUI:
+ case TILEGX_OPC_SHRSI:
+ case TILEGX_OPC_SHL16INSLI:
+ case TILEGX_OPC_CMPLTUI:
+ case TILEGX_OPC_CMPLTSI:
+ inst_buf[inst_buf_index].input_registers = 1L << op1;
+ inst_buf[inst_buf_index].output_registers = 1L << op0;
+ break;
+ default:
+ printf("unrecoginzed opc: %s\n", opcode->name);
+ SLJIT_ASSERT_STOP();
+ }
+
+ inst_buf_index++;
+
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 push_2_buffer(struct sljit_compiler *compiler, tilegx_mnemonic opc, int op0, int op1, int line)
+{
+ if (inst_buf_index == TILEGX_MAX_INSTRUCTIONS_PER_BUNDLE)
+ FAIL_IF(update_buffer(compiler));
+
+ const struct tilegx_opcode* opcode = &tilegx_opcodes[opc];
+ inst_buf[inst_buf_index].opcode = opcode;
+ inst_buf[inst_buf_index].pipe = get_any_valid_pipe(opcode);
+ inst_buf[inst_buf_index].operand_value[0] = op0;
+ inst_buf[inst_buf_index].operand_value[1] = op1;
+ inst_buf[inst_buf_index].line = line;
+
+ switch (opc) {
+ case TILEGX_OPC_BEQZ:
+ case TILEGX_OPC_BNEZ:
+ inst_buf[inst_buf_index].input_registers = 1L << op0;
+ break;
+ case TILEGX_OPC_ST:
+ case TILEGX_OPC_ST1:
+ case TILEGX_OPC_ST2:
+ case TILEGX_OPC_ST4:
+ inst_buf[inst_buf_index].input_registers = (1L << op0) | (1L << op1);
+ inst_buf[inst_buf_index].output_registers = 0;
+ break;
+ case TILEGX_OPC_CLZ:
+ case TILEGX_OPC_LD:
+ case TILEGX_OPC_LD1U:
+ case TILEGX_OPC_LD1S:
+ case TILEGX_OPC_LD2U:
+ case TILEGX_OPC_LD2S:
+ case TILEGX_OPC_LD4U:
+ case TILEGX_OPC_LD4S:
+ inst_buf[inst_buf_index].input_registers = 1L << op1;
+ inst_buf[inst_buf_index].output_registers = 1L << op0;
+ break;
+ default:
+ printf("unrecoginzed opc: %s\n", opcode->name);
+ SLJIT_ASSERT_STOP();
+ }
+
+ inst_buf_index++;
+
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 push_0_buffer(struct sljit_compiler *compiler, tilegx_mnemonic opc, int line)
+{
+ if (inst_buf_index == TILEGX_MAX_INSTRUCTIONS_PER_BUNDLE)
+ FAIL_IF(update_buffer(compiler));
+
+ const struct tilegx_opcode* opcode = &tilegx_opcodes[opc];
+ inst_buf[inst_buf_index].opcode = opcode;
+ inst_buf[inst_buf_index].pipe = get_any_valid_pipe(opcode);
+ inst_buf[inst_buf_index].input_registers = 0;
+ inst_buf[inst_buf_index].output_registers = 0;
+ inst_buf[inst_buf_index].line = line;
+ inst_buf_index++;
+
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 push_jr_buffer(struct sljit_compiler *compiler, tilegx_mnemonic opc, int op0, int line)
+{
+ if (inst_buf_index == TILEGX_MAX_INSTRUCTIONS_PER_BUNDLE)
+ FAIL_IF(update_buffer(compiler));
+
+ const struct tilegx_opcode* opcode = &tilegx_opcodes[opc];
+ inst_buf[inst_buf_index].opcode = opcode;
+ inst_buf[inst_buf_index].pipe = get_any_valid_pipe(opcode);
+ inst_buf[inst_buf_index].operand_value[0] = op0;
+ inst_buf[inst_buf_index].input_registers = 1L << op0;
+ inst_buf[inst_buf_index].output_registers = 0;
+ inst_buf[inst_buf_index].line = line;
+ inst_buf_index++;
+
+ return flush_buffer(compiler);
+}
+
+static SLJIT_INLINE sljit_ins * detect_jump_type(struct sljit_jump *jump, sljit_ins *code_ptr, sljit_ins *code)
+{
+ sljit_sw diff;
+ sljit_uw target_addr;
+ sljit_ins *inst;
+
+ if (jump->flags & SLJIT_REWRITABLE_JUMP)
+ return code_ptr;
+
+ if (jump->flags & JUMP_ADDR)
+ target_addr = jump->u.target;
+ else {
+ SLJIT_ASSERT(jump->flags & JUMP_LABEL);
+ target_addr = (sljit_uw)(code + jump->u.label->size);
+ }
+
+ inst = (sljit_ins *)jump->addr;
+ if (jump->flags & IS_COND)
+ inst--;
+
+ diff = ((sljit_sw) target_addr - (sljit_sw) inst) >> 3;
+ if (diff <= SIMM_17BIT_MAX && diff >= SIMM_17BIT_MIN) {
+ jump->flags |= PATCH_B;
+
+ if (!(jump->flags & IS_COND)) {
+ if (jump->flags & IS_JAL) {
+ jump->flags &= ~(PATCH_B);
+ jump->flags |= PATCH_J;
+ inst[0] = JAL_X1;
+
+#ifdef TILEGX_JIT_DEBUG
+ printf("[runtime relocate]%04d:\t", __LINE__);
+ print_insn_tilegx(inst);
+#endif
+ } else {
+ inst[0] = BEQZ_X1 | SRCA_X1(ZERO);
+
+#ifdef TILEGX_JIT_DEBUG
+ printf("[runtime relocate]%04d:\t", __LINE__);
+ print_insn_tilegx(inst);
+#endif
+ }
+
+ return inst;
+ }
+
+ inst[0] = inst[0] ^ (0x7L << 55);
+
+#ifdef TILEGX_JIT_DEBUG
+ printf("[runtime relocate]%04d:\t", __LINE__);
+ print_insn_tilegx(inst);
+#endif
+ jump->addr -= sizeof(sljit_ins);
+ return inst;
+ }
+
+ if (jump->flags & IS_COND) {
+ if ((target_addr & ~0x3FFFFFFFL) == ((jump->addr + sizeof(sljit_ins)) & ~0x3FFFFFFFL)) {
+ jump->flags |= PATCH_J;
+ inst[0] = (inst[0] & ~(BOFF_X1(-1))) | BOFF_X1(2);
+ inst[1] = J_X1;
+ return inst + 1;
+ }
+
+ return code_ptr;
+ }
+
+ if ((target_addr & ~0x3FFFFFFFL) == ((jump->addr + sizeof(sljit_ins)) & ~0x3FFFFFFFL)) {
+ jump->flags |= PATCH_J;
+
+ if (jump->flags & IS_JAL) {
+ inst[0] = JAL_X1;
+
+#ifdef TILEGX_JIT_DEBUG
+ printf("[runtime relocate]%04d:\t", __LINE__);
+ print_insn_tilegx(inst);
+#endif
+
+ } else {
+ inst[0] = J_X1;
+
+#ifdef TILEGX_JIT_DEBUG
+ printf("[runtime relocate]%04d:\t", __LINE__);
+ print_insn_tilegx(inst);
+#endif
+ }
+
+ return inst;
+ }
+
+ return code_ptr;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void * sljit_generate_code(struct sljit_compiler *compiler)
+{
+ struct sljit_memory_fragment *buf;
+ sljit_ins *code;
+ sljit_ins *code_ptr;
+ sljit_ins *buf_ptr;
+ sljit_ins *buf_end;
+ sljit_uw word_count;
+ sljit_uw addr;
+
+ struct sljit_label *label;
+ struct sljit_jump *jump;
+ struct sljit_const *const_;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_generate_code(compiler));
+ reverse_buf(compiler);
+
+ code = (sljit_ins *)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_ins));
+ PTR_FAIL_WITH_EXEC_IF(code);
+ buf = compiler->buf;
+
+ code_ptr = code;
+ word_count = 0;
+ label = compiler->labels;
+ jump = compiler->jumps;
+ const_ = compiler->consts;
+ do {
+ buf_ptr = (sljit_ins *)buf->memory;
+ buf_end = buf_ptr + (buf->used_size >> 3);
+ do {
+ *code_ptr = *buf_ptr++;
+ SLJIT_ASSERT(!label || label->size >= word_count);
+ SLJIT_ASSERT(!jump || jump->addr >= word_count);
+ SLJIT_ASSERT(!const_ || const_->addr >= word_count);
+ /* These structures are ordered by their address. */
+ if (label && label->size == word_count) {
+ /* Just recording the address. */
+ label->addr = (sljit_uw) code_ptr;
+ label->size = code_ptr - code;
+ label = label->next;
+ }
+
+ if (jump && jump->addr == word_count) {
+ if (jump->flags & IS_JAL)
+ jump->addr = (sljit_uw)(code_ptr - 4);
+ else
+ jump->addr = (sljit_uw)(code_ptr - 3);
+
+ code_ptr = detect_jump_type(jump, code_ptr, code);
+ jump = jump->next;
+ }
+
+ if (const_ && const_->addr == word_count) {
+ /* Just recording the address. */
+ const_->addr = (sljit_uw) code_ptr;
+ const_ = const_->next;
+ }
+
+ code_ptr++;
+ word_count++;
+ } while (buf_ptr < buf_end);
+
+ buf = buf->next;
+ } while (buf);
+
+ if (label && label->size == word_count) {
+ label->addr = (sljit_uw) code_ptr;
+ label->size = code_ptr - code;
+ label = label->next;
+ }
+
+ SLJIT_ASSERT(!label);
+ SLJIT_ASSERT(!jump);
+ SLJIT_ASSERT(!const_);
+ SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size);
+
+ jump = compiler->jumps;
+ while (jump) {
+ do {
+ addr = (jump->flags & JUMP_LABEL) ? jump->u.label->addr : jump->u.target;
+ buf_ptr = (sljit_ins *)jump->addr;
+
+ if (jump->flags & PATCH_B) {
+ addr = (sljit_sw)(addr - (jump->addr)) >> 3;
+ SLJIT_ASSERT((sljit_sw) addr <= SIMM_17BIT_MAX && (sljit_sw) addr >= SIMM_17BIT_MIN);
+ buf_ptr[0] = (buf_ptr[0] & ~(BOFF_X1(-1))) | BOFF_X1(addr);
+
+#ifdef TILEGX_JIT_DEBUG
+ printf("[runtime relocate]%04d:\t", __LINE__);
+ print_insn_tilegx(buf_ptr);
+#endif
+ break;
+ }
+
+ if (jump->flags & PATCH_J) {
+ SLJIT_ASSERT((addr & ~0x3FFFFFFFL) == ((jump->addr + sizeof(sljit_ins)) & ~0x3FFFFFFFL));
+ addr = (sljit_sw)(addr - (jump->addr)) >> 3;
+ buf_ptr[0] = (buf_ptr[0] & ~(JOFF_X1(-1))) | JOFF_X1(addr);
+
+#ifdef TILEGX_JIT_DEBUG
+ printf("[runtime relocate]%04d:\t", __LINE__);
+ print_insn_tilegx(buf_ptr);
+#endif
+ break;
+ }
+
+ SLJIT_ASSERT(!(jump->flags & IS_JAL));
+
+ /* Set the fields of immediate loads. */
+ buf_ptr[0] = (buf_ptr[0] & ~(0xFFFFL << 43)) | (((addr >> 32) & 0xFFFFL) << 43);
+ buf_ptr[1] = (buf_ptr[1] & ~(0xFFFFL << 43)) | (((addr >> 16) & 0xFFFFL) << 43);
+ buf_ptr[2] = (buf_ptr[2] & ~(0xFFFFL << 43)) | ((addr & 0xFFFFL) << 43);
+ } while (0);
+
+ jump = jump->next;
+ }
+
+ compiler->error = SLJIT_ERR_COMPILED;
+ compiler->executable_size = (code_ptr - code) * sizeof(sljit_ins);
+ SLJIT_CACHE_FLUSH(code, code_ptr);
+ return code;
+}
+
+static sljit_s32 load_immediate(struct sljit_compiler *compiler, sljit_s32 dst_ar, sljit_sw imm)
+{
+
+ if (imm <= SIMM_16BIT_MAX && imm >= SIMM_16BIT_MIN)
+ return ADDLI(dst_ar, ZERO, imm);
+
+ if (imm <= SIMM_32BIT_MAX && imm >= SIMM_32BIT_MIN) {
+ FAIL_IF(ADDLI(dst_ar, ZERO, imm >> 16));
+ return SHL16INSLI(dst_ar, dst_ar, imm);
+ }
+
+ if (imm <= SIMM_48BIT_MAX && imm >= SIMM_48BIT_MIN) {
+ FAIL_IF(ADDLI(dst_ar, ZERO, imm >> 32));
+ FAIL_IF(SHL16INSLI(dst_ar, dst_ar, imm >> 16));
+ return SHL16INSLI(dst_ar, dst_ar, imm);
+ }
+
+ FAIL_IF(ADDLI(dst_ar, ZERO, imm >> 48));
+ FAIL_IF(SHL16INSLI(dst_ar, dst_ar, imm >> 32));
+ FAIL_IF(SHL16INSLI(dst_ar, dst_ar, imm >> 16));
+ return SHL16INSLI(dst_ar, dst_ar, imm);
+}
+
+static sljit_s32 emit_const(struct sljit_compiler *compiler, sljit_s32 dst_ar, sljit_sw imm, int flush)
+{
+ /* Should *not* be optimized as load_immediate, as pcre relocation
+ mechanism will match this fixed 4-instruction pattern. */
+ if (flush) {
+ FAIL_IF(ADDLI_SOLO(dst_ar, ZERO, imm >> 32));
+ FAIL_IF(SHL16INSLI_SOLO(dst_ar, dst_ar, imm >> 16));
+ return SHL16INSLI_SOLO(dst_ar, dst_ar, imm);
+ }
+
+ FAIL_IF(ADDLI(dst_ar, ZERO, imm >> 32));
+ FAIL_IF(SHL16INSLI(dst_ar, dst_ar, imm >> 16));
+ return SHL16INSLI(dst_ar, dst_ar, imm);
+}
+
+static sljit_s32 emit_const_64(struct sljit_compiler *compiler, sljit_s32 dst_ar, sljit_sw imm, int flush)
+{
+ /* Should *not* be optimized as load_immediate, as pcre relocation
+ mechanism will match this fixed 4-instruction pattern. */
+ if (flush) {
+ FAIL_IF(ADDLI_SOLO(reg_map[dst_ar], ZERO, imm >> 48));
+ FAIL_IF(SHL16INSLI_SOLO(reg_map[dst_ar], reg_map[dst_ar], imm >> 32));
+ FAIL_IF(SHL16INSLI_SOLO(reg_map[dst_ar], reg_map[dst_ar], imm >> 16));
+ return SHL16INSLI_SOLO(reg_map[dst_ar], reg_map[dst_ar], imm);
+ }
+
+ FAIL_IF(ADDLI(reg_map[dst_ar], ZERO, imm >> 48));
+ FAIL_IF(SHL16INSLI(reg_map[dst_ar], reg_map[dst_ar], imm >> 32));
+ FAIL_IF(SHL16INSLI(reg_map[dst_ar], reg_map[dst_ar], imm >> 16));
+ return SHL16INSLI(reg_map[dst_ar], reg_map[dst_ar], imm);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ sljit_ins base;
+ sljit_s32 i, tmp;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1);
+ local_size = (local_size + 7) & ~7;
+ compiler->local_size = local_size;
+
+ if (local_size <= SIMM_16BIT_MAX) {
+ /* Frequent case. */
+ FAIL_IF(ADDLI(SLJIT_LOCALS_REG_mapped, SLJIT_LOCALS_REG_mapped, -local_size));
+ base = SLJIT_LOCALS_REG_mapped;
+ } else {
+ FAIL_IF(load_immediate(compiler, TMP_REG1_mapped, local_size));
+ FAIL_IF(ADD(TMP_REG2_mapped, SLJIT_LOCALS_REG_mapped, ZERO));
+ FAIL_IF(SUB(SLJIT_LOCALS_REG_mapped, SLJIT_LOCALS_REG_mapped, TMP_REG1_mapped));
+ base = TMP_REG2_mapped;
+ local_size = 0;
+ }
+
+ /* Save the return address. */
+ FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 8));
+ FAIL_IF(ST_ADD(ADDR_TMP_mapped, RA, -8));
+
+ /* Save the S registers. */
+ tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = SLJIT_S0; i >= tmp; i--) {
+ FAIL_IF(ST_ADD(ADDR_TMP_mapped, reg_map[i], -8));
+ }
+
+ /* Save the R registers that need to be reserved. */
+ for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--) {
+ FAIL_IF(ST_ADD(ADDR_TMP_mapped, reg_map[i], -8));
+ }
+
+ /* Move the arguments to S registers. */
+ for (i = 0; i < args; i++) {
+ FAIL_IF(ADD(reg_map[SLJIT_S0 - i], i, ZERO));
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ local_size += GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1);
+ compiler->local_size = (local_size + 7) & ~7;
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 local_size;
+ sljit_ins base;
+ sljit_s32 i, tmp;
+ sljit_s32 saveds;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_return(compiler, op, src, srcw));
+
+ FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
+
+ local_size = compiler->local_size;
+ if (local_size <= SIMM_16BIT_MAX)
+ base = SLJIT_LOCALS_REG_mapped;
+ else {
+ FAIL_IF(load_immediate(compiler, TMP_REG1_mapped, local_size));
+ FAIL_IF(ADD(TMP_REG1_mapped, SLJIT_LOCALS_REG_mapped, TMP_REG1_mapped));
+ base = TMP_REG1_mapped;
+ local_size = 0;
+ }
+
+ /* Restore the return address. */
+ FAIL_IF(ADDLI(ADDR_TMP_mapped, base, local_size - 8));
+ FAIL_IF(LD_ADD(RA, ADDR_TMP_mapped, -8));
+
+ /* Restore the S registers. */
+ saveds = compiler->saveds;
+ tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = SLJIT_S0; i >= tmp; i--) {
+ FAIL_IF(LD_ADD(reg_map[i], ADDR_TMP_mapped, -8));
+ }
+
+ /* Restore the R registers that need to be reserved. */
+ for (i = compiler->scratches; i >= SLJIT_FIRST_SAVED_REG; i--) {
+ FAIL_IF(LD_ADD(reg_map[i], ADDR_TMP_mapped, -8));
+ }
+
+ if (compiler->local_size <= SIMM_16BIT_MAX)
+ FAIL_IF(ADDLI(SLJIT_LOCALS_REG_mapped, SLJIT_LOCALS_REG_mapped, compiler->local_size));
+ else
+ FAIL_IF(ADD(SLJIT_LOCALS_REG_mapped, TMP_REG1_mapped, ZERO));
+
+ return JR(RA);
+}
+
+/* reg_ar is an absoulute register! */
+
+/* Can perform an operation using at most 1 instruction. */
+static sljit_s32 getput_arg_fast(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar, sljit_s32 arg, sljit_sw argw)
+{
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+
+ if ((!(flags & WRITE_BACK) || !(arg & REG_MASK))
+ && !(arg & OFFS_REG_MASK) && argw <= SIMM_16BIT_MAX && argw >= SIMM_16BIT_MIN) {
+ /* Works for both absoulte and relative addresses. */
+ if (SLJIT_UNLIKELY(flags & ARG_TEST))
+ return 1;
+
+ FAIL_IF(ADDLI(ADDR_TMP_mapped, reg_map[arg & REG_MASK], argw));
+
+ if (flags & LOAD_DATA)
+ FAIL_IF(PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, ADDR_TMP_mapped));
+ else
+ FAIL_IF(PB2(data_transfer_insts[flags & MEM_MASK], ADDR_TMP_mapped, reg_ar));
+
+ return -1;
+ }
+
+ return 0;
+}
+
+/* See getput_arg below.
+ Note: can_cache is called only for binary operators. Those
+ operators always uses word arguments without write back. */
+static sljit_s32 can_cache(sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw)
+{
+ SLJIT_ASSERT((arg & SLJIT_MEM) && (next_arg & SLJIT_MEM));
+
+ /* Simple operation except for updates. */
+ if (arg & OFFS_REG_MASK) {
+ argw &= 0x3;
+ next_argw &= 0x3;
+ if (argw && argw == next_argw
+ && (arg == next_arg || (arg & OFFS_REG_MASK) == (next_arg & OFFS_REG_MASK)))
+ return 1;
+ return 0;
+ }
+
+ if (arg == next_arg) {
+ if (((next_argw - argw) <= SIMM_16BIT_MAX
+ && (next_argw - argw) >= SIMM_16BIT_MIN))
+ return 1;
+
+ return 0;
+ }
+
+ return 0;
+}
+
+/* Emit the necessary instructions. See can_cache above. */
+static sljit_s32 getput_arg(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar, sljit_s32 arg, sljit_sw argw, sljit_s32 next_arg, sljit_sw next_argw)
+{
+ sljit_s32 tmp_ar, base;
+
+ SLJIT_ASSERT(arg & SLJIT_MEM);
+ if (!(next_arg & SLJIT_MEM)) {
+ next_arg = 0;
+ next_argw = 0;
+ }
+
+ if ((flags & MEM_MASK) <= GPR_REG && (flags & LOAD_DATA))
+ tmp_ar = reg_ar;
+ else
+ tmp_ar = TMP_REG1_mapped;
+
+ base = arg & REG_MASK;
+
+ if (SLJIT_UNLIKELY(arg & OFFS_REG_MASK)) {
+ argw &= 0x3;
+
+ if ((flags & WRITE_BACK) && reg_ar == reg_map[base]) {
+ SLJIT_ASSERT(!(flags & LOAD_DATA) && reg_map[TMP_REG1] != reg_ar);
+ FAIL_IF(ADD(TMP_REG1_mapped, reg_ar, ZERO));
+ reg_ar = TMP_REG1_mapped;
+ }
+
+ /* Using the cache. */
+ if (argw == compiler->cache_argw) {
+ if (!(flags & WRITE_BACK)) {
+ if (arg == compiler->cache_arg) {
+ if (flags & LOAD_DATA)
+ return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, TMP_REG3_mapped);
+ else
+ return PB2(data_transfer_insts[flags & MEM_MASK], TMP_REG3_mapped, reg_ar);
+ }
+
+ if ((SLJIT_MEM | (arg & OFFS_REG_MASK)) == compiler->cache_arg) {
+ if (arg == next_arg && argw == (next_argw & 0x3)) {
+ compiler->cache_arg = arg;
+ compiler->cache_argw = argw;
+ FAIL_IF(ADD(TMP_REG3_mapped, reg_map[base], TMP_REG3_mapped));
+ if (flags & LOAD_DATA)
+ return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, TMP_REG3_mapped);
+ else
+ return PB2(data_transfer_insts[flags & MEM_MASK], TMP_REG3_mapped, reg_ar);
+ }
+
+ FAIL_IF(ADD(tmp_ar, reg_map[base], TMP_REG3_mapped));
+ if (flags & LOAD_DATA)
+ return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, tmp_ar);
+ else
+ return PB2(data_transfer_insts[flags & MEM_MASK], tmp_ar, reg_ar);
+ }
+ } else {
+ if ((SLJIT_MEM | (arg & OFFS_REG_MASK)) == compiler->cache_arg) {
+ FAIL_IF(ADD(reg_map[base], reg_map[base], TMP_REG3_mapped));
+ if (flags & LOAD_DATA)
+ return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, reg_map[base]);
+ else
+ return PB2(data_transfer_insts[flags & MEM_MASK], reg_map[base], reg_ar);
+ }
+ }
+ }
+
+ if (SLJIT_UNLIKELY(argw)) {
+ compiler->cache_arg = SLJIT_MEM | (arg & OFFS_REG_MASK);
+ compiler->cache_argw = argw;
+ FAIL_IF(SHLI(TMP_REG3_mapped, reg_map[OFFS_REG(arg)], argw));
+ }
+
+ if (!(flags & WRITE_BACK)) {
+ if (arg == next_arg && argw == (next_argw & 0x3)) {
+ compiler->cache_arg = arg;
+ compiler->cache_argw = argw;
+ FAIL_IF(ADD(TMP_REG3_mapped, reg_map[base], reg_map[!argw ? OFFS_REG(arg) : TMP_REG3]));
+ tmp_ar = TMP_REG3_mapped;
+ } else
+ FAIL_IF(ADD(tmp_ar, reg_map[base], reg_map[!argw ? OFFS_REG(arg) : TMP_REG3]));
+
+ if (flags & LOAD_DATA)
+ return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, tmp_ar);
+ else
+ return PB2(data_transfer_insts[flags & MEM_MASK], tmp_ar, reg_ar);
+ }
+
+ FAIL_IF(ADD(reg_map[base], reg_map[base], reg_map[!argw ? OFFS_REG(arg) : TMP_REG3]));
+
+ if (flags & LOAD_DATA)
+ return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, reg_map[base]);
+ else
+ return PB2(data_transfer_insts[flags & MEM_MASK], reg_map[base], reg_ar);
+ }
+
+ if (SLJIT_UNLIKELY(flags & WRITE_BACK) && base) {
+ /* Update only applies if a base register exists. */
+ if (reg_ar == reg_map[base]) {
+ SLJIT_ASSERT(!(flags & LOAD_DATA) && TMP_REG1_mapped != reg_ar);
+ if (argw <= SIMM_16BIT_MAX && argw >= SIMM_16BIT_MIN) {
+ FAIL_IF(ADDLI(ADDR_TMP_mapped, reg_map[base], argw));
+ if (flags & LOAD_DATA)
+ FAIL_IF(PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, ADDR_TMP_mapped));
+ else
+ FAIL_IF(PB2(data_transfer_insts[flags & MEM_MASK], ADDR_TMP_mapped, reg_ar));
+
+ if (argw)
+ return ADDLI(reg_map[base], reg_map[base], argw);
+
+ return SLJIT_SUCCESS;
+ }
+
+ FAIL_IF(ADD(TMP_REG1_mapped, reg_ar, ZERO));
+ reg_ar = TMP_REG1_mapped;
+ }
+
+ if (argw <= SIMM_16BIT_MAX && argw >= SIMM_16BIT_MIN) {
+ if (argw)
+ FAIL_IF(ADDLI(reg_map[base], reg_map[base], argw));
+ } else {
+ if (compiler->cache_arg == SLJIT_MEM
+ && argw - compiler->cache_argw <= SIMM_16BIT_MAX
+ && argw - compiler->cache_argw >= SIMM_16BIT_MIN) {
+ if (argw != compiler->cache_argw) {
+ FAIL_IF(ADD(TMP_REG3_mapped, TMP_REG3_mapped, argw - compiler->cache_argw));
+ compiler->cache_argw = argw;
+ }
+
+ FAIL_IF(ADD(reg_map[base], reg_map[base], TMP_REG3_mapped));
+ } else {
+ compiler->cache_arg = SLJIT_MEM;
+ compiler->cache_argw = argw;
+ FAIL_IF(load_immediate(compiler, TMP_REG3_mapped, argw));
+ FAIL_IF(ADD(reg_map[base], reg_map[base], TMP_REG3_mapped));
+ }
+ }
+
+ if (flags & LOAD_DATA)
+ return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, reg_map[base]);
+ else
+ return PB2(data_transfer_insts[flags & MEM_MASK], reg_map[base], reg_ar);
+ }
+
+ if (compiler->cache_arg == arg
+ && argw - compiler->cache_argw <= SIMM_16BIT_MAX
+ && argw - compiler->cache_argw >= SIMM_16BIT_MIN) {
+ if (argw != compiler->cache_argw) {
+ FAIL_IF(ADDLI(TMP_REG3_mapped, TMP_REG3_mapped, argw - compiler->cache_argw));
+ compiler->cache_argw = argw;
+ }
+
+ if (flags & LOAD_DATA)
+ return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, TMP_REG3_mapped);
+ else
+ return PB2(data_transfer_insts[flags & MEM_MASK], TMP_REG3_mapped, reg_ar);
+ }
+
+ if (compiler->cache_arg == SLJIT_MEM
+ && argw - compiler->cache_argw <= SIMM_16BIT_MAX
+ && argw - compiler->cache_argw >= SIMM_16BIT_MIN) {
+ if (argw != compiler->cache_argw)
+ FAIL_IF(ADDLI(TMP_REG3_mapped, TMP_REG3_mapped, argw - compiler->cache_argw));
+ } else {
+ compiler->cache_arg = SLJIT_MEM;
+ FAIL_IF(load_immediate(compiler, TMP_REG3_mapped, argw));
+ }
+
+ compiler->cache_argw = argw;
+
+ if (!base) {
+ if (flags & LOAD_DATA)
+ return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, TMP_REG3_mapped);
+ else
+ return PB2(data_transfer_insts[flags & MEM_MASK], TMP_REG3_mapped, reg_ar);
+ }
+
+ if (arg == next_arg
+ && next_argw - argw <= SIMM_16BIT_MAX
+ && next_argw - argw >= SIMM_16BIT_MIN) {
+ compiler->cache_arg = arg;
+ FAIL_IF(ADD(TMP_REG3_mapped, TMP_REG3_mapped, reg_map[base]));
+ if (flags & LOAD_DATA)
+ return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, TMP_REG3_mapped);
+ else
+ return PB2(data_transfer_insts[flags & MEM_MASK], TMP_REG3_mapped, reg_ar);
+ }
+
+ FAIL_IF(ADD(tmp_ar, TMP_REG3_mapped, reg_map[base]));
+
+ if (flags & LOAD_DATA)
+ return PB2(data_transfer_insts[flags & MEM_MASK], reg_ar, tmp_ar);
+ else
+ return PB2(data_transfer_insts[flags & MEM_MASK], tmp_ar, reg_ar);
+}
+
+static SLJIT_INLINE sljit_s32 emit_op_mem(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg_ar, sljit_s32 arg, sljit_sw argw)
+{
+ if (getput_arg_fast(compiler, flags, reg_ar, arg, argw))
+ return compiler->error;
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ return getput_arg(compiler, flags, reg_ar, arg, argw, 0, 0);
+}
+
+static SLJIT_INLINE sljit_s32 emit_op_mem2(struct sljit_compiler *compiler, sljit_s32 flags, sljit_s32 reg, sljit_s32 arg1, sljit_sw arg1w, sljit_s32 arg2, sljit_sw arg2w)
+{
+ if (getput_arg_fast(compiler, flags, reg, arg1, arg1w))
+ return compiler->error;
+ return getput_arg(compiler, flags, reg, arg1, arg1w, arg2, arg2w);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ /* For UNUSED dst. Uncommon, but possible. */
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ if (FAST_IS_REG(dst))
+ return ADD(reg_map[dst], RA, ZERO);
+
+ /* Memory. */
+ return emit_op_mem(compiler, WORD_DATA, RA, dst, dstw);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_return(compiler, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ if (FAST_IS_REG(src))
+ FAIL_IF(ADD(RA, reg_map[src], ZERO));
+
+ else if (src & SLJIT_MEM)
+ FAIL_IF(emit_op_mem(compiler, WORD_DATA | LOAD_DATA, RA, src, srcw));
+
+ else if (src & SLJIT_IMM)
+ FAIL_IF(load_immediate(compiler, RA, srcw));
+
+ return JR(RA);
+}
+
+static SLJIT_INLINE sljit_s32 emit_single_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags, sljit_s32 dst, sljit_s32 src1, sljit_sw src2)
+{
+ sljit_s32 overflow_ra = 0;
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_P:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if (dst != src2)
+ return ADD(reg_map[dst], reg_map[src2], ZERO);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U32:
+ case SLJIT_MOV_S32:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
+ if (op == SLJIT_MOV_S32)
+ return BFEXTS(reg_map[dst], reg_map[src2], 0, 31);
+
+ return BFEXTU(reg_map[dst], reg_map[src2], 0, 31);
+ } else if (dst != src2) {
+ SLJIT_ASSERT(src2 == 0);
+ return ADD(reg_map[dst], reg_map[src2], ZERO);
+ }
+
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U8:
+ case SLJIT_MOV_S8:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
+ if (op == SLJIT_MOV_S8)
+ return BFEXTS(reg_map[dst], reg_map[src2], 0, 7);
+
+ return BFEXTU(reg_map[dst], reg_map[src2], 0, 7);
+ } else if (dst != src2) {
+ SLJIT_ASSERT(src2 == 0);
+ return ADD(reg_map[dst], reg_map[src2], ZERO);
+ }
+
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MOV_U16:
+ case SLJIT_MOV_S16:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if ((flags & (REG_DEST | REG2_SOURCE)) == (REG_DEST | REG2_SOURCE)) {
+ if (op == SLJIT_MOV_S16)
+ return BFEXTS(reg_map[dst], reg_map[src2], 0, 15);
+
+ return BFEXTU(reg_map[dst], reg_map[src2], 0, 15);
+ } else if (dst != src2) {
+ SLJIT_ASSERT(src2 == 0);
+ return ADD(reg_map[dst], reg_map[src2], ZERO);
+ }
+
+ return SLJIT_SUCCESS;
+
+ case SLJIT_NOT:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if (op & SLJIT_SET_E)
+ FAIL_IF(NOR(EQUAL_FLAG, reg_map[src2], reg_map[src2]));
+ if (CHECK_FLAGS(SLJIT_SET_E))
+ FAIL_IF(NOR(reg_map[dst], reg_map[src2], reg_map[src2]));
+
+ return SLJIT_SUCCESS;
+
+ case SLJIT_CLZ:
+ SLJIT_ASSERT(src1 == TMP_REG1 && !(flags & SRC2_IMM));
+ if (op & SLJIT_SET_E)
+ FAIL_IF(CLZ(EQUAL_FLAG, reg_map[src2]));
+ if (CHECK_FLAGS(SLJIT_SET_E))
+ FAIL_IF(CLZ(reg_map[dst], reg_map[src2]));
+
+ return SLJIT_SUCCESS;
+
+ case SLJIT_ADD:
+ if (flags & SRC2_IMM) {
+ if (op & SLJIT_SET_O) {
+ FAIL_IF(SHRUI(TMP_EREG1, reg_map[src1], 63));
+ if (src2 < 0)
+ FAIL_IF(XORI(TMP_EREG1, TMP_EREG1, 1));
+ }
+
+ if (op & SLJIT_SET_E)
+ FAIL_IF(ADDLI(EQUAL_FLAG, reg_map[src1], src2));
+
+ if (op & SLJIT_SET_C) {
+ if (src2 >= 0)
+ FAIL_IF(ORI(ULESS_FLAG ,reg_map[src1], src2));
+ else {
+ FAIL_IF(ADDLI(ULESS_FLAG ,ZERO, src2));
+ FAIL_IF(OR(ULESS_FLAG,reg_map[src1],ULESS_FLAG));
+ }
+ }
+
+ /* dst may be the same as src1 or src2. */
+ if (CHECK_FLAGS(SLJIT_SET_E))
+ FAIL_IF(ADDLI(reg_map[dst], reg_map[src1], src2));
+
+ if (op & SLJIT_SET_O) {
+ FAIL_IF(SHRUI(OVERFLOW_FLAG, reg_map[dst], 63));
+
+ if (src2 < 0)
+ FAIL_IF(XORI(OVERFLOW_FLAG, OVERFLOW_FLAG, 1));
+ }
+ } else {
+ if (op & SLJIT_SET_O) {
+ FAIL_IF(XOR(TMP_EREG1, reg_map[src1], reg_map[src2]));
+ FAIL_IF(SHRUI(TMP_EREG1, TMP_EREG1, 63));
+
+ if (src1 != dst)
+ overflow_ra = reg_map[src1];
+ else if (src2 != dst)
+ overflow_ra = reg_map[src2];
+ else {
+ /* Rare ocasion. */
+ FAIL_IF(ADD(TMP_EREG2, reg_map[src1], ZERO));
+ overflow_ra = TMP_EREG2;
+ }
+ }
+
+ if (op & SLJIT_SET_E)
+ FAIL_IF(ADD(EQUAL_FLAG ,reg_map[src1], reg_map[src2]));
+
+ if (op & SLJIT_SET_C)
+ FAIL_IF(OR(ULESS_FLAG,reg_map[src1], reg_map[src2]));
+
+ /* dst may be the same as src1 or src2. */
+ if (CHECK_FLAGS(SLJIT_SET_E))
+ FAIL_IF(ADD(reg_map[dst],reg_map[src1], reg_map[src2]));
+
+ if (op & SLJIT_SET_O) {
+ FAIL_IF(XOR(OVERFLOW_FLAG,reg_map[dst], overflow_ra));
+ FAIL_IF(SHRUI(OVERFLOW_FLAG, OVERFLOW_FLAG, 63));
+ }
+ }
+
+ /* a + b >= a | b (otherwise, the carry should be set to 1). */
+ if (op & SLJIT_SET_C)
+ FAIL_IF(CMPLTU(ULESS_FLAG ,reg_map[dst] ,ULESS_FLAG));
+
+ if (op & SLJIT_SET_O)
+ return CMOVNEZ(OVERFLOW_FLAG, TMP_EREG1, ZERO);
+
+ return SLJIT_SUCCESS;
+
+ case SLJIT_ADDC:
+ if (flags & SRC2_IMM) {
+ if (op & SLJIT_SET_C) {
+ if (src2 >= 0)
+ FAIL_IF(ORI(TMP_EREG1, reg_map[src1], src2));
+ else {
+ FAIL_IF(ADDLI(TMP_EREG1, ZERO, src2));
+ FAIL_IF(OR(TMP_EREG1, reg_map[src1], TMP_EREG1));
+ }
+ }
+
+ FAIL_IF(ADDLI(reg_map[dst], reg_map[src1], src2));
+
+ } else {
+ if (op & SLJIT_SET_C)
+ FAIL_IF(OR(TMP_EREG1, reg_map[src1], reg_map[src2]));
+
+ /* dst may be the same as src1 or src2. */
+ FAIL_IF(ADD(reg_map[dst], reg_map[src1], reg_map[src2]));
+ }
+
+ if (op & SLJIT_SET_C)
+ FAIL_IF(CMPLTU(TMP_EREG1, reg_map[dst], TMP_EREG1));
+
+ FAIL_IF(ADD(reg_map[dst], reg_map[dst], ULESS_FLAG));
+
+ if (!(op & SLJIT_SET_C))
+ return SLJIT_SUCCESS;
+
+ /* Set TMP_EREG2 (dst == 0) && (ULESS_FLAG == 1). */
+ FAIL_IF(CMPLTUI(TMP_EREG2, reg_map[dst], 1));
+ FAIL_IF(AND(TMP_EREG2, TMP_EREG2, ULESS_FLAG));
+ /* Set carry flag. */
+ return OR(ULESS_FLAG, TMP_EREG2, TMP_EREG1);
+
+ case SLJIT_SUB:
+ if ((flags & SRC2_IMM) && ((op & (SLJIT_SET_U | SLJIT_SET_S)) || src2 == SIMM_16BIT_MIN)) {
+ FAIL_IF(ADDLI(TMP_REG2_mapped, ZERO, src2));
+ src2 = TMP_REG2;
+ flags &= ~SRC2_IMM;
+ }
+
+ if (flags & SRC2_IMM) {
+ if (op & SLJIT_SET_O) {
+ FAIL_IF(SHRUI(TMP_EREG1,reg_map[src1], 63));
+
+ if (src2 < 0)
+ FAIL_IF(XORI(TMP_EREG1, TMP_EREG1, 1));
+
+ if (src1 != dst)
+ overflow_ra = reg_map[src1];
+ else {
+ /* Rare ocasion. */
+ FAIL_IF(ADD(TMP_EREG2, reg_map[src1], ZERO));
+ overflow_ra = TMP_EREG2;
+ }
+ }
+
+ if (op & SLJIT_SET_E)
+ FAIL_IF(ADDLI(EQUAL_FLAG, reg_map[src1], -src2));
+
+ if (op & SLJIT_SET_C) {
+ FAIL_IF(load_immediate(compiler, ADDR_TMP_mapped, src2));
+ FAIL_IF(CMPLTU(ULESS_FLAG, reg_map[src1], ADDR_TMP_mapped));
+ }
+
+ /* dst may be the same as src1 or src2. */
+ if (CHECK_FLAGS(SLJIT_SET_E))
+ FAIL_IF(ADDLI(reg_map[dst], reg_map[src1], -src2));
+
+ } else {
+
+ if (op & SLJIT_SET_O) {
+ FAIL_IF(XOR(TMP_EREG1, reg_map[src1], reg_map[src2]));
+ FAIL_IF(SHRUI(TMP_EREG1, TMP_EREG1, 63));
+
+ if (src1 != dst)
+ overflow_ra = reg_map[src1];
+ else {
+ /* Rare ocasion. */
+ FAIL_IF(ADD(TMP_EREG2, reg_map[src1], ZERO));
+ overflow_ra = TMP_EREG2;
+ }
+ }
+
+ if (op & SLJIT_SET_E)
+ FAIL_IF(SUB(EQUAL_FLAG, reg_map[src1], reg_map[src2]));
+
+ if (op & (SLJIT_SET_U | SLJIT_SET_C))
+ FAIL_IF(CMPLTU(ULESS_FLAG, reg_map[src1], reg_map[src2]));
+
+ if (op & SLJIT_SET_U)
+ FAIL_IF(CMPLTU(UGREATER_FLAG, reg_map[src2], reg_map[src1]));
+
+ if (op & SLJIT_SET_S) {
+ FAIL_IF(CMPLTS(LESS_FLAG ,reg_map[src1] ,reg_map[src2]));
+ FAIL_IF(CMPLTS(GREATER_FLAG ,reg_map[src2] ,reg_map[src1]));
+ }
+
+ /* dst may be the same as src1 or src2. */
+ if (CHECK_FLAGS(SLJIT_SET_E | SLJIT_SET_U | SLJIT_SET_S | SLJIT_SET_C))
+ FAIL_IF(SUB(reg_map[dst], reg_map[src1], reg_map[src2]));
+ }
+
+ if (op & SLJIT_SET_O) {
+ FAIL_IF(XOR(OVERFLOW_FLAG, reg_map[dst], overflow_ra));
+ FAIL_IF(SHRUI(OVERFLOW_FLAG, OVERFLOW_FLAG, 63));
+ return CMOVEQZ(OVERFLOW_FLAG, TMP_EREG1, ZERO);
+ }
+
+ return SLJIT_SUCCESS;
+
+ case SLJIT_SUBC:
+ if ((flags & SRC2_IMM) && src2 == SIMM_16BIT_MIN) {
+ FAIL_IF(ADDLI(TMP_REG2_mapped, ZERO, src2));
+ src2 = TMP_REG2;
+ flags &= ~SRC2_IMM;
+ }
+
+ if (flags & SRC2_IMM) {
+ if (op & SLJIT_SET_C) {
+ FAIL_IF(load_immediate(compiler, ADDR_TMP_mapped, -src2));
+ FAIL_IF(CMPLTU(TMP_EREG1, reg_map[src1], ADDR_TMP_mapped));
+ }
+
+ /* dst may be the same as src1 or src2. */
+ FAIL_IF(ADDLI(reg_map[dst], reg_map[src1], -src2));
+
+ } else {
+ if (op & SLJIT_SET_C)
+ FAIL_IF(CMPLTU(TMP_EREG1, reg_map[src1], reg_map[src2]));
+ /* dst may be the same as src1 or src2. */
+ FAIL_IF(SUB(reg_map[dst], reg_map[src1], reg_map[src2]));
+ }
+
+ if (op & SLJIT_SET_C)
+ FAIL_IF(CMOVEQZ(TMP_EREG1, reg_map[dst], ULESS_FLAG));
+
+ FAIL_IF(SUB(reg_map[dst], reg_map[dst], ULESS_FLAG));
+
+ if (op & SLJIT_SET_C)
+ FAIL_IF(ADD(ULESS_FLAG, TMP_EREG1, ZERO));
+
+ return SLJIT_SUCCESS;
+
+ case SLJIT_MUL:
+ if (flags & SRC2_IMM) {
+ FAIL_IF(load_immediate(compiler, TMP_REG2_mapped, src2));
+ src2 = TMP_REG2;
+ flags &= ~SRC2_IMM;
+ }
+
+ FAIL_IF(MUL(reg_map[dst], reg_map[src1], reg_map[src2]));
+
+ return SLJIT_SUCCESS;
+
+#define EMIT_LOGICAL(op_imm, op_norm) \
+ if (flags & SRC2_IMM) { \
+ FAIL_IF(load_immediate(compiler, ADDR_TMP_mapped, src2)); \
+ if (op & SLJIT_SET_E) \
+ FAIL_IF(push_3_buffer( \
+ compiler, op_norm, EQUAL_FLAG, reg_map[src1], \
+ ADDR_TMP_mapped, __LINE__)); \
+ if (CHECK_FLAGS(SLJIT_SET_E)) \
+ FAIL_IF(push_3_buffer( \
+ compiler, op_norm, reg_map[dst], reg_map[src1], \
+ ADDR_TMP_mapped, __LINE__)); \
+ } else { \
+ if (op & SLJIT_SET_E) \
+ FAIL_IF(push_3_buffer( \
+ compiler, op_norm, EQUAL_FLAG, reg_map[src1], \
+ reg_map[src2], __LINE__)); \
+ if (CHECK_FLAGS(SLJIT_SET_E)) \
+ FAIL_IF(push_3_buffer( \
+ compiler, op_norm, reg_map[dst], reg_map[src1], \
+ reg_map[src2], __LINE__)); \
+ }
+
+ case SLJIT_AND:
+ EMIT_LOGICAL(TILEGX_OPC_ANDI, TILEGX_OPC_AND);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_OR:
+ EMIT_LOGICAL(TILEGX_OPC_ORI, TILEGX_OPC_OR);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_XOR:
+ EMIT_LOGICAL(TILEGX_OPC_XORI, TILEGX_OPC_XOR);
+ return SLJIT_SUCCESS;
+
+#define EMIT_SHIFT(op_imm, op_norm) \
+ if (flags & SRC2_IMM) { \
+ if (op & SLJIT_SET_E) \
+ FAIL_IF(push_3_buffer( \
+ compiler, op_imm, EQUAL_FLAG, reg_map[src1], \
+ src2 & 0x3F, __LINE__)); \
+ if (CHECK_FLAGS(SLJIT_SET_E)) \
+ FAIL_IF(push_3_buffer( \
+ compiler, op_imm, reg_map[dst], reg_map[src1], \
+ src2 & 0x3F, __LINE__)); \
+ } else { \
+ if (op & SLJIT_SET_E) \
+ FAIL_IF(push_3_buffer( \
+ compiler, op_norm, EQUAL_FLAG, reg_map[src1], \
+ reg_map[src2], __LINE__)); \
+ if (CHECK_FLAGS(SLJIT_SET_E)) \
+ FAIL_IF(push_3_buffer( \
+ compiler, op_norm, reg_map[dst], reg_map[src1], \
+ reg_map[src2], __LINE__)); \
+ }
+
+ case SLJIT_SHL:
+ EMIT_SHIFT(TILEGX_OPC_SHLI, TILEGX_OPC_SHL);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_LSHR:
+ EMIT_SHIFT(TILEGX_OPC_SHRUI, TILEGX_OPC_SHRU);
+ return SLJIT_SUCCESS;
+
+ case SLJIT_ASHR:
+ EMIT_SHIFT(TILEGX_OPC_SHRSI, TILEGX_OPC_SHRS);
+ return SLJIT_SUCCESS;
+ }
+
+ SLJIT_ASSERT_STOP();
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 emit_op(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 flags, sljit_s32 dst, sljit_sw dstw, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w)
+{
+ /* arg1 goes to TMP_REG1 or src reg.
+ arg2 goes to TMP_REG2, imm or src reg.
+ TMP_REG3 can be used for caching.
+ result goes to TMP_REG2, so put result can use TMP_REG1 and TMP_REG3. */
+ sljit_s32 dst_r = TMP_REG2;
+ sljit_s32 src1_r;
+ sljit_sw src2_r = 0;
+ sljit_s32 sugg_src2_r = TMP_REG2;
+
+ if (!(flags & ALT_KEEP_CACHE)) {
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ }
+
+ if (SLJIT_UNLIKELY(dst == SLJIT_UNUSED)) {
+ if (op >= SLJIT_MOV && op <= SLJIT_MOVU_S32 && !(src2 & SLJIT_MEM))
+ return SLJIT_SUCCESS;
+ if (GET_FLAGS(op))
+ flags |= UNUSED_DEST;
+ } else if (FAST_IS_REG(dst)) {
+ dst_r = dst;
+ flags |= REG_DEST;
+ if (op >= SLJIT_MOV && op <= SLJIT_MOVU_S32)
+ sugg_src2_r = dst_r;
+ } else if ((dst & SLJIT_MEM) && !getput_arg_fast(compiler, flags | ARG_TEST, TMP_REG1_mapped, dst, dstw))
+ flags |= SLOW_DEST;
+
+ if (flags & IMM_OP) {
+ if ((src2 & SLJIT_IMM) && src2w) {
+ if ((!(flags & LOGICAL_OP)
+ && (src2w <= SIMM_16BIT_MAX && src2w >= SIMM_16BIT_MIN))
+ || ((flags & LOGICAL_OP) && !(src2w & ~UIMM_16BIT_MAX))) {
+ flags |= SRC2_IMM;
+ src2_r = src2w;
+ }
+ }
+
+ if (!(flags & SRC2_IMM) && (flags & CUMULATIVE_OP) && (src1 & SLJIT_IMM) && src1w) {
+ if ((!(flags & LOGICAL_OP)
+ && (src1w <= SIMM_16BIT_MAX && src1w >= SIMM_16BIT_MIN))
+ || ((flags & LOGICAL_OP) && !(src1w & ~UIMM_16BIT_MAX))) {
+ flags |= SRC2_IMM;
+ src2_r = src1w;
+
+ /* And swap arguments. */
+ src1 = src2;
+ src1w = src2w;
+ src2 = SLJIT_IMM;
+ /* src2w = src2_r unneeded. */
+ }
+ }
+ }
+
+ /* Source 1. */
+ if (FAST_IS_REG(src1)) {
+ src1_r = src1;
+ flags |= REG1_SOURCE;
+ } else if (src1 & SLJIT_IMM) {
+ if (src1w) {
+ FAIL_IF(load_immediate(compiler, TMP_REG1_mapped, src1w));
+ src1_r = TMP_REG1;
+ } else
+ src1_r = 0;
+ } else {
+ if (getput_arg_fast(compiler, flags | LOAD_DATA, TMP_REG1_mapped, src1, src1w))
+ FAIL_IF(compiler->error);
+ else
+ flags |= SLOW_SRC1;
+ src1_r = TMP_REG1;
+ }
+
+ /* Source 2. */
+ if (FAST_IS_REG(src2)) {
+ src2_r = src2;
+ flags |= REG2_SOURCE;
+ if (!(flags & REG_DEST) && op >= SLJIT_MOV && op <= SLJIT_MOVU_S32)
+ dst_r = src2_r;
+ } else if (src2 & SLJIT_IMM) {
+ if (!(flags & SRC2_IMM)) {
+ if (src2w) {
+ FAIL_IF(load_immediate(compiler, reg_map[sugg_src2_r], src2w));
+ src2_r = sugg_src2_r;
+ } else {
+ src2_r = 0;
+ if ((op >= SLJIT_MOV && op <= SLJIT_MOVU_S32) && (dst & SLJIT_MEM))
+ dst_r = 0;
+ }
+ }
+ } else {
+ if (getput_arg_fast(compiler, flags | LOAD_DATA, reg_map[sugg_src2_r], src2, src2w))
+ FAIL_IF(compiler->error);
+ else
+ flags |= SLOW_SRC2;
+ src2_r = sugg_src2_r;
+ }
+
+ if ((flags & (SLOW_SRC1 | SLOW_SRC2)) == (SLOW_SRC1 | SLOW_SRC2)) {
+ SLJIT_ASSERT(src2_r == TMP_REG2);
+ if (!can_cache(src1, src1w, src2, src2w) && can_cache(src1, src1w, dst, dstw)) {
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2_mapped, src2, src2w, src1, src1w));
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1_mapped, src1, src1w, dst, dstw));
+ } else {
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1_mapped, src1, src1w, src2, src2w));
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG2_mapped, src2, src2w, dst, dstw));
+ }
+ } else if (flags & SLOW_SRC1)
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, TMP_REG1_mapped, src1, src1w, dst, dstw));
+ else if (flags & SLOW_SRC2)
+ FAIL_IF(getput_arg(compiler, flags | LOAD_DATA, reg_map[sugg_src2_r], src2, src2w, dst, dstw));
+
+ FAIL_IF(emit_single_op(compiler, op, flags, dst_r, src1_r, src2_r));
+
+ if (dst & SLJIT_MEM) {
+ if (!(flags & SLOW_DEST)) {
+ getput_arg_fast(compiler, flags, reg_map[dst_r], dst, dstw);
+ return compiler->error;
+ }
+
+ return getput_arg(compiler, flags, reg_map[dst_r], dst, dstw, 0, 0);
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, sljit_s32 src, sljit_sw srcw, sljit_s32 type)
+{
+ sljit_s32 sugg_dst_ar, dst_ar;
+ sljit_s32 flags = GET_ALL_FLAGS(op);
+ sljit_s32 mem_type = (op & SLJIT_I32_OP) ? (INT_DATA | SIGNED_DATA) : WORD_DATA;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ op = GET_OPCODE(op);
+ if (op == SLJIT_MOV_S32 || op == SLJIT_MOV_U32)
+ mem_type = INT_DATA | SIGNED_DATA;
+ sugg_dst_ar = reg_map[(op < SLJIT_ADD && FAST_IS_REG(dst)) ? dst : TMP_REG2];
+
+ compiler->cache_arg = 0;
+ compiler->cache_argw = 0;
+ if (op >= SLJIT_ADD && (src & SLJIT_MEM)) {
+ ADJUST_LOCAL_OFFSET(src, srcw);
+ FAIL_IF(emit_op_mem2(compiler, mem_type | LOAD_DATA, TMP_REG1_mapped, src, srcw, dst, dstw));
+ src = TMP_REG1;
+ srcw = 0;
+ }
+
+ switch (type & 0xff) {
+ case SLJIT_EQUAL:
+ case SLJIT_NOT_EQUAL:
+ FAIL_IF(CMPLTUI(sugg_dst_ar, EQUAL_FLAG, 1));
+ dst_ar = sugg_dst_ar;
+ break;
+ case SLJIT_LESS:
+ case SLJIT_GREATER_EQUAL:
+ dst_ar = ULESS_FLAG;
+ break;
+ case SLJIT_GREATER:
+ case SLJIT_LESS_EQUAL:
+ dst_ar = UGREATER_FLAG;
+ break;
+ case SLJIT_SIG_LESS:
+ case SLJIT_SIG_GREATER_EQUAL:
+ dst_ar = LESS_FLAG;
+ break;
+ case SLJIT_SIG_GREATER:
+ case SLJIT_SIG_LESS_EQUAL:
+ dst_ar = GREATER_FLAG;
+ break;
+ case SLJIT_OVERFLOW:
+ case SLJIT_NOT_OVERFLOW:
+ dst_ar = OVERFLOW_FLAG;
+ break;
+ case SLJIT_MUL_OVERFLOW:
+ case SLJIT_MUL_NOT_OVERFLOW:
+ FAIL_IF(CMPLTUI(sugg_dst_ar, OVERFLOW_FLAG, 1));
+ dst_ar = sugg_dst_ar;
+ type ^= 0x1; /* Flip type bit for the XORI below. */
+ break;
+
+ default:
+ SLJIT_ASSERT_STOP();
+ dst_ar = sugg_dst_ar;
+ break;
+ }
+
+ if (type & 0x1) {
+ FAIL_IF(XORI(sugg_dst_ar, dst_ar, 1));
+ dst_ar = sugg_dst_ar;
+ }
+
+ if (op >= SLJIT_ADD) {
+ if (TMP_REG2_mapped != dst_ar)
+ FAIL_IF(ADD(TMP_REG2_mapped, dst_ar, ZERO));
+ return emit_op(compiler, op | flags, mem_type | CUMULATIVE_OP | LOGICAL_OP | IMM_OP | ALT_KEEP_CACHE, dst, dstw, src, srcw, TMP_REG2, 0);
+ }
+
+ if (dst & SLJIT_MEM)
+ return emit_op_mem(compiler, mem_type, dst_ar, dst, dstw);
+
+ if (sugg_dst_ar != dst_ar)
+ return ADD(sugg_dst_ar, dst_ar, ZERO);
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op) {
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op0(compiler, op));
+
+ op = GET_OPCODE(op);
+ switch (op) {
+ case SLJIT_NOP:
+ return push_0_buffer(compiler, TILEGX_OPC_FNOP, __LINE__);
+
+ case SLJIT_BREAKPOINT:
+ return PI(BPT);
+
+ case SLJIT_LMUL_UW:
+ case SLJIT_LMUL_SW:
+ case SLJIT_DIVMOD_UW:
+ case SLJIT_DIVMOD_SW:
+ case SLJIT_DIV_UW:
+ case SLJIT_DIV_SW:
+ SLJIT_ASSERT_STOP();
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, sljit_s32 src, sljit_sw srcw)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_P:
+ return emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOV_U32:
+ return emit_op(compiler, SLJIT_MOV_U32, INT_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOV_S32:
+ return emit_op(compiler, SLJIT_MOV_S32, INT_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOV_U8:
+ return emit_op(compiler, SLJIT_MOV_U8, BYTE_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u8) srcw : srcw);
+
+ case SLJIT_MOV_S8:
+ return emit_op(compiler, SLJIT_MOV_S8, BYTE_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s8) srcw : srcw);
+
+ case SLJIT_MOV_U16:
+ return emit_op(compiler, SLJIT_MOV_U16, HALF_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u16) srcw : srcw);
+
+ case SLJIT_MOV_S16:
+ return emit_op(compiler, SLJIT_MOV_S16, HALF_DATA | SIGNED_DATA, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s16) srcw : srcw);
+
+ case SLJIT_MOVU:
+ case SLJIT_MOVU_P:
+ return emit_op(compiler, SLJIT_MOV, WORD_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOVU_U32:
+ return emit_op(compiler, SLJIT_MOV_U32, INT_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOVU_S32:
+ return emit_op(compiler, SLJIT_MOV_S32, INT_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_MOVU_U8:
+ return emit_op(compiler, SLJIT_MOV_U8, BYTE_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u8) srcw : srcw);
+
+ case SLJIT_MOVU_S8:
+ return emit_op(compiler, SLJIT_MOV_S8, BYTE_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s8) srcw : srcw);
+
+ case SLJIT_MOVU_U16:
+ return emit_op(compiler, SLJIT_MOV_U16, HALF_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_u16) srcw : srcw);
+
+ case SLJIT_MOVU_S16:
+ return emit_op(compiler, SLJIT_MOV_S16, HALF_DATA | SIGNED_DATA | WRITE_BACK, dst, dstw, TMP_REG1, 0, src, (src & SLJIT_IMM) ? (sljit_s16) srcw : srcw);
+
+ case SLJIT_NOT:
+ return emit_op(compiler, op, 0, dst, dstw, TMP_REG1, 0, src, srcw);
+
+ case SLJIT_NEG:
+ return emit_op(compiler, SLJIT_SUB | GET_ALL_FLAGS(op), IMM_OP, dst, dstw, SLJIT_IMM, 0, src, srcw);
+
+ case SLJIT_CLZ:
+ return emit_op(compiler, op, (op & SLJIT_I32_OP) ? INT_DATA : WORD_DATA, dst, dstw, TMP_REG1, 0, src, srcw);
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_ADD:
+ case SLJIT_ADDC:
+ return emit_op(compiler, op, CUMULATIVE_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_SUB:
+ case SLJIT_SUBC:
+ return emit_op(compiler, op, IMM_OP, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_MUL:
+ return emit_op(compiler, op, CUMULATIVE_OP, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_AND:
+ case SLJIT_OR:
+ case SLJIT_XOR:
+ return emit_op(compiler, op, CUMULATIVE_OP | LOGICAL_OP | IMM_OP, dst, dstw, src1, src1w, src2, src2w);
+
+ case SLJIT_SHL:
+ case SLJIT_LSHR:
+ case SLJIT_ASHR:
+ if (src2 & SLJIT_IMM)
+ src2w &= 0x3f;
+ if (op & SLJIT_I32_OP)
+ src2w &= 0x1f;
+
+ return emit_op(compiler, op, IMM_OP, dst, dstw, src1, src1w, src2, src2w);
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_label * sljit_emit_label(struct sljit_compiler *compiler)
+{
+ struct sljit_label *label;
+
+ flush_buffer(compiler);
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_label(compiler));
+
+ if (compiler->last_label && compiler->last_label->size == compiler->size)
+ return compiler->last_label;
+
+ label = (struct sljit_label *)ensure_abuf(compiler, sizeof(struct sljit_label));
+ PTR_FAIL_IF(!label);
+ set_label(label, compiler);
+ return label;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 src_r = TMP_REG2;
+ struct sljit_jump *jump = NULL;
+
+ flush_buffer(compiler);
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_ijump(compiler, type, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ if (FAST_IS_REG(src)) {
+ if (reg_map[src] != 0)
+ src_r = src;
+ else
+ FAIL_IF(ADD_SOLO(TMP_REG2_mapped, reg_map[src], ZERO));
+ }
+
+ if (type >= SLJIT_CALL0) {
+ SLJIT_ASSERT(reg_map[PIC_ADDR_REG] == 16 && PIC_ADDR_REG == TMP_REG2);
+ if (src & (SLJIT_IMM | SLJIT_MEM)) {
+ if (src & SLJIT_IMM)
+ FAIL_IF(emit_const(compiler, reg_map[PIC_ADDR_REG], srcw, 1));
+ else {
+ SLJIT_ASSERT(src_r == TMP_REG2 && (src & SLJIT_MEM));
+ FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, TMP_REG2, 0, TMP_REG1, 0, src, srcw));
+ }
+
+ FAIL_IF(ADD_SOLO(0, reg_map[SLJIT_R0], ZERO));
+
+ FAIL_IF(ADDI_SOLO(54, 54, -16));
+
+ FAIL_IF(JALR_SOLO(reg_map[PIC_ADDR_REG]));
+
+ return ADDI_SOLO(54, 54, 16);
+ }
+
+ /* Register input. */
+ if (type >= SLJIT_CALL1)
+ FAIL_IF(ADD_SOLO(0, reg_map[SLJIT_R0], ZERO));
+
+ FAIL_IF(ADD_SOLO(reg_map[PIC_ADDR_REG], reg_map[src_r], ZERO));
+
+ FAIL_IF(ADDI_SOLO(54, 54, -16));
+
+ FAIL_IF(JALR_SOLO(reg_map[src_r]));
+
+ return ADDI_SOLO(54, 54, 16);
+ }
+
+ if (src & SLJIT_IMM) {
+ jump = (struct sljit_jump *)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ FAIL_IF(!jump);
+ set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_JAL : 0));
+ jump->u.target = srcw;
+ FAIL_IF(emit_const(compiler, TMP_REG2_mapped, 0, 1));
+
+ if (type >= SLJIT_FAST_CALL) {
+ FAIL_IF(ADD_SOLO(ZERO, ZERO, ZERO));
+ jump->addr = compiler->size;
+ FAIL_IF(JR_SOLO(reg_map[src_r]));
+ } else {
+ jump->addr = compiler->size;
+ FAIL_IF(JR_SOLO(reg_map[src_r]));
+ }
+
+ return SLJIT_SUCCESS;
+
+ } else if (src & SLJIT_MEM) {
+ FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, TMP_REG2, 0, TMP_REG1, 0, src, srcw));
+ flush_buffer(compiler);
+ }
+
+ FAIL_IF(JR_SOLO(reg_map[src_r]));
+
+ if (jump)
+ jump->addr = compiler->size;
+
+ return SLJIT_SUCCESS;
+}
+
+#define BR_Z(src) \
+ inst = BEQZ_X1 | SRCA_X1(src); \
+ flags = IS_COND;
+
+#define BR_NZ(src) \
+ inst = BNEZ_X1 | SRCA_X1(src); \
+ flags = IS_COND;
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump * sljit_emit_jump(struct sljit_compiler *compiler, sljit_s32 type)
+{
+ struct sljit_jump *jump;
+ sljit_ins inst;
+ sljit_s32 flags = 0;
+
+ flush_buffer(compiler);
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_jump(compiler, type));
+
+ jump = (struct sljit_jump *)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ PTR_FAIL_IF(!jump);
+ set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
+ type &= 0xff;
+
+ switch (type) {
+ case SLJIT_EQUAL:
+ BR_NZ(EQUAL_FLAG);
+ break;
+ case SLJIT_NOT_EQUAL:
+ BR_Z(EQUAL_FLAG);
+ break;
+ case SLJIT_LESS:
+ BR_Z(ULESS_FLAG);
+ break;
+ case SLJIT_GREATER_EQUAL:
+ BR_NZ(ULESS_FLAG);
+ break;
+ case SLJIT_GREATER:
+ BR_Z(UGREATER_FLAG);
+ break;
+ case SLJIT_LESS_EQUAL:
+ BR_NZ(UGREATER_FLAG);
+ break;
+ case SLJIT_SIG_LESS:
+ BR_Z(LESS_FLAG);
+ break;
+ case SLJIT_SIG_GREATER_EQUAL:
+ BR_NZ(LESS_FLAG);
+ break;
+ case SLJIT_SIG_GREATER:
+ BR_Z(GREATER_FLAG);
+ break;
+ case SLJIT_SIG_LESS_EQUAL:
+ BR_NZ(GREATER_FLAG);
+ break;
+ case SLJIT_OVERFLOW:
+ case SLJIT_MUL_OVERFLOW:
+ BR_Z(OVERFLOW_FLAG);
+ break;
+ case SLJIT_NOT_OVERFLOW:
+ case SLJIT_MUL_NOT_OVERFLOW:
+ BR_NZ(OVERFLOW_FLAG);
+ break;
+ default:
+ /* Not conditional branch. */
+ inst = 0;
+ break;
+ }
+
+ jump->flags |= flags;
+
+ if (inst) {
+ inst = inst | ((type <= SLJIT_JUMP) ? BOFF_X1(5) : BOFF_X1(6));
+ PTR_FAIL_IF(PI(inst));
+ }
+
+ PTR_FAIL_IF(emit_const(compiler, TMP_REG2_mapped, 0, 1));
+ if (type <= SLJIT_JUMP) {
+ jump->addr = compiler->size;
+ PTR_FAIL_IF(JR_SOLO(TMP_REG2_mapped));
+ } else {
+ SLJIT_ASSERT(reg_map[PIC_ADDR_REG] == 16 && PIC_ADDR_REG == TMP_REG2);
+ /* Cannot be optimized out if type is >= CALL0. */
+ jump->flags |= IS_JAL | (type >= SLJIT_CALL0 ? SLJIT_REWRITABLE_JUMP : 0);
+ PTR_FAIL_IF(ADD_SOLO(0, reg_map[SLJIT_R0], ZERO));
+ jump->addr = compiler->size;
+ PTR_FAIL_IF(JALR_SOLO(TMP_REG2_mapped));
+ }
+
+ return jump;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_is_fpu_available(void)
+{
+ return 0;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, sljit_s32 src, sljit_sw srcw)
+{
+ SLJIT_ASSERT_STOP();
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 dst, sljit_sw dstw, sljit_s32 src1, sljit_sw src1w, sljit_s32 src2, sljit_sw src2w)
+{
+ SLJIT_ASSERT_STOP();
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_const * sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value)
+{
+ struct sljit_const *const_;
+ sljit_s32 reg;
+
+ flush_buffer(compiler);
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ const_ = (struct sljit_const *)ensure_abuf(compiler, sizeof(struct sljit_const));
+ PTR_FAIL_IF(!const_);
+ set_const(const_, compiler);
+
+ reg = FAST_IS_REG(dst) ? dst : TMP_REG2;
+
+ PTR_FAIL_IF(emit_const_64(compiler, reg, init_value, 1));
+
+ if (dst & SLJIT_MEM)
+ PTR_FAIL_IF(emit_op(compiler, SLJIT_MOV, WORD_DATA, dst, dstw, TMP_REG1, 0, TMP_REG2, 0));
+ return const_;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target)
+{
+ sljit_ins *inst = (sljit_ins *)addr;
+
+ inst[0] = (inst[0] & ~(0xFFFFL << 43)) | (((new_target >> 32) & 0xffff) << 43);
+ inst[1] = (inst[1] & ~(0xFFFFL << 43)) | (((new_target >> 16) & 0xffff) << 43);
+ inst[2] = (inst[2] & ~(0xFFFFL << 43)) | ((new_target & 0xffff) << 43);
+ SLJIT_CACHE_FLUSH(inst, inst + 3);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant)
+{
+ sljit_ins *inst = (sljit_ins *)addr;
+
+ inst[0] = (inst[0] & ~(0xFFFFL << 43)) | (((new_constant >> 48) & 0xFFFFL) << 43);
+ inst[1] = (inst[1] & ~(0xFFFFL << 43)) | (((new_constant >> 32) & 0xFFFFL) << 43);
+ inst[2] = (inst[2] & ~(0xFFFFL << 43)) | (((new_constant >> 16) & 0xFFFFL) << 43);
+ inst[3] = (inst[3] & ~(0xFFFFL << 43)) | ((new_constant & 0xFFFFL) << 43);
+ SLJIT_CACHE_FLUSH(inst, inst + 4);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_register_index(sljit_s32 reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_register_index(reg));
+ return reg_map[reg];
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler,
+ void *instruction, sljit_s32 size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_custom(compiler, instruction, size));
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeX86_32.c b/thirdparty/pcre2/src/sljit/sljitNativeX86_32.c
new file mode 100644
index 0000000000..00333f6b33
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativeX86_32.c
@@ -0,0 +1,550 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* x86 32-bit arch dependent functions. */
+
+static sljit_s32 emit_do_imm(struct sljit_compiler *compiler, sljit_u8 opcode, sljit_sw imm)
+{
+ sljit_u8 *inst;
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + sizeof(sljit_sw));
+ FAIL_IF(!inst);
+ INC_SIZE(1 + sizeof(sljit_sw));
+ *inst++ = opcode;
+ sljit_unaligned_store_sw(inst, imm);
+ return SLJIT_SUCCESS;
+}
+
+static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_s32 type, sljit_sw executable_offset)
+{
+ if (type == SLJIT_JUMP) {
+ *code_ptr++ = JMP_i32;
+ jump->addr++;
+ }
+ else if (type >= SLJIT_FAST_CALL) {
+ *code_ptr++ = CALL_i32;
+ jump->addr++;
+ }
+ else {
+ *code_ptr++ = GROUP_0F;
+ *code_ptr++ = get_jump_code(type);
+ jump->addr += 2;
+ }
+
+ if (jump->flags & JUMP_LABEL)
+ jump->flags |= PATCH_MW;
+ else
+ sljit_unaligned_store_sw(code_ptr, jump->u.target - (jump->addr + 4) - (sljit_uw)executable_offset);
+ code_ptr += 4;
+
+ return code_ptr;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ sljit_s32 size;
+ sljit_u8 *inst;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ compiler->args = args;
+ compiler->flags_saved = 0;
+
+ size = 1 + (scratches > 7 ? (scratches - 7) : 0) + (saveds <= 3 ? saveds : 3);
+#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
+ size += (args > 0 ? (args * 2) : 0) + (args > 2 ? 2 : 0);
+#else
+ size += (args > 0 ? (2 + args * 3) : 0);
+#endif
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + size);
+ FAIL_IF(!inst);
+
+ INC_SIZE(size);
+ PUSH_REG(reg_map[TMP_REG1]);
+#if !(defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
+ if (args > 0) {
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (reg_map[TMP_REG1] << 3) | 0x4 /* esp */;
+ }
+#endif
+ if (saveds > 2 || scratches > 7)
+ PUSH_REG(reg_map[SLJIT_S2]);
+ if (saveds > 1 || scratches > 8)
+ PUSH_REG(reg_map[SLJIT_S1]);
+ if (saveds > 0 || scratches > 9)
+ PUSH_REG(reg_map[SLJIT_S0]);
+
+#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
+ if (args > 0) {
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (reg_map[SLJIT_S0] << 3) | reg_map[SLJIT_R2];
+ }
+ if (args > 1) {
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (reg_map[SLJIT_S1] << 3) | reg_map[SLJIT_R1];
+ }
+ if (args > 2) {
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_DISP8 | (reg_map[SLJIT_S2] << 3) | 0x4 /* esp */;
+ *inst++ = 0x24;
+ *inst++ = sizeof(sljit_sw) * (3 + 2); /* saveds >= 3 as well. */
+ }
+#else
+ if (args > 0) {
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_DISP8 | (reg_map[SLJIT_S0] << 3) | reg_map[TMP_REG1];
+ *inst++ = sizeof(sljit_sw) * 2;
+ }
+ if (args > 1) {
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_DISP8 | (reg_map[SLJIT_S1] << 3) | reg_map[TMP_REG1];
+ *inst++ = sizeof(sljit_sw) * 3;
+ }
+ if (args > 2) {
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_DISP8 | (reg_map[SLJIT_S2] << 3) | reg_map[TMP_REG1];
+ *inst++ = sizeof(sljit_sw) * 4;
+ }
+#endif
+
+ SLJIT_COMPILE_ASSERT(SLJIT_LOCALS_OFFSET >= (2 + 4) * sizeof(sljit_uw), require_at_least_two_words);
+#if defined(__APPLE__)
+ /* Ignore pushed registers and SLJIT_LOCALS_OFFSET when computing the aligned local size. */
+ saveds = (2 + (scratches > 7 ? (scratches - 7) : 0) + (saveds <= 3 ? saveds : 3)) * sizeof(sljit_uw);
+ local_size = ((SLJIT_LOCALS_OFFSET + saveds + local_size + 15) & ~15) - saveds;
+#else
+ if (options & SLJIT_DOUBLE_ALIGNMENT) {
+ local_size = SLJIT_LOCALS_OFFSET + ((local_size + 7) & ~7);
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 17);
+ FAIL_IF(!inst);
+
+ INC_SIZE(17);
+ inst[0] = MOV_r_rm;
+ inst[1] = MOD_REG | (reg_map[TMP_REG1] << 3) | reg_map[SLJIT_SP];
+ inst[2] = GROUP_F7;
+ inst[3] = MOD_REG | (0 << 3) | reg_map[SLJIT_SP];
+ sljit_unaligned_store_sw(inst + 4, 0x4);
+ inst[8] = JNE_i8;
+ inst[9] = 6;
+ inst[10] = GROUP_BINARY_81;
+ inst[11] = MOD_REG | (5 << 3) | reg_map[SLJIT_SP];
+ sljit_unaligned_store_sw(inst + 12, 0x4);
+ inst[16] = PUSH_r + reg_map[TMP_REG1];
+ }
+ else
+ local_size = SLJIT_LOCALS_OFFSET + ((local_size + 3) & ~3);
+#endif
+
+ compiler->local_size = local_size;
+#ifdef _WIN32
+ if (local_size > 1024) {
+#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
+ FAIL_IF(emit_do_imm(compiler, MOV_r_i32 + reg_map[SLJIT_R0], local_size));
+#else
+ local_size -= SLJIT_LOCALS_OFFSET;
+ FAIL_IF(emit_do_imm(compiler, MOV_r_i32 + reg_map[SLJIT_R0], local_size));
+ FAIL_IF(emit_non_cum_binary(compiler, SUB_r_rm, SUB_rm_r, SUB, SUB_EAX_i32,
+ SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, SLJIT_LOCALS_OFFSET));
+#endif
+ FAIL_IF(sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_grow_stack)));
+ }
+#endif
+
+ SLJIT_ASSERT(local_size > 0);
+ return emit_non_cum_binary(compiler, SUB_r_rm, SUB_rm_r, SUB, SUB_EAX_i32,
+ SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, local_size);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ compiler->args = args;
+
+#if defined(__APPLE__)
+ saveds = (2 + (scratches > 7 ? (scratches - 7) : 0) + (saveds <= 3 ? saveds : 3)) * sizeof(sljit_uw);
+ compiler->local_size = ((SLJIT_LOCALS_OFFSET + saveds + local_size + 15) & ~15) - saveds;
+#else
+ if (options & SLJIT_DOUBLE_ALIGNMENT)
+ compiler->local_size = SLJIT_LOCALS_OFFSET + ((local_size + 7) & ~7);
+ else
+ compiler->local_size = SLJIT_LOCALS_OFFSET + ((local_size + 3) & ~3);
+#endif
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 size;
+ sljit_u8 *inst;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_return(compiler, op, src, srcw));
+ SLJIT_ASSERT(compiler->args >= 0);
+
+ compiler->flags_saved = 0;
+ FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
+
+ SLJIT_ASSERT(compiler->local_size > 0);
+ FAIL_IF(emit_cum_binary(compiler, ADD_r_rm, ADD_rm_r, ADD, ADD_EAX_i32,
+ SLJIT_SP, 0, SLJIT_SP, 0, SLJIT_IMM, compiler->local_size));
+
+#if !defined(__APPLE__)
+ if (compiler->options & SLJIT_DOUBLE_ALIGNMENT) {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 3);
+ FAIL_IF(!inst);
+
+ INC_SIZE(3);
+ inst[0] = MOV_r_rm;
+ inst[1] = (reg_map[SLJIT_SP] << 3) | 0x4 /* SIB */;
+ inst[2] = (4 << 3) | reg_map[SLJIT_SP];
+ }
+#endif
+
+ size = 2 + (compiler->scratches > 7 ? (compiler->scratches - 7) : 0) +
+ (compiler->saveds <= 3 ? compiler->saveds : 3);
+#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
+ if (compiler->args > 2)
+ size += 2;
+#else
+ if (compiler->args > 0)
+ size += 2;
+#endif
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + size);
+ FAIL_IF(!inst);
+
+ INC_SIZE(size);
+
+ if (compiler->saveds > 0 || compiler->scratches > 9)
+ POP_REG(reg_map[SLJIT_S0]);
+ if (compiler->saveds > 1 || compiler->scratches > 8)
+ POP_REG(reg_map[SLJIT_S1]);
+ if (compiler->saveds > 2 || compiler->scratches > 7)
+ POP_REG(reg_map[SLJIT_S2]);
+ POP_REG(reg_map[TMP_REG1]);
+#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
+ if (compiler->args > 2)
+ RET_I16(sizeof(sljit_sw));
+ else
+ RET();
+#else
+ RET();
+#endif
+
+ return SLJIT_SUCCESS;
+}
+
+/* --------------------------------------------------------------------- */
+/* Operators */
+/* --------------------------------------------------------------------- */
+
+/* Size contains the flags as well. */
+static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_s32 size,
+ /* The register or immediate operand. */
+ sljit_s32 a, sljit_sw imma,
+ /* The general operand (not immediate). */
+ sljit_s32 b, sljit_sw immb)
+{
+ sljit_u8 *inst;
+ sljit_u8 *buf_ptr;
+ sljit_s32 flags = size & ~0xf;
+ sljit_s32 inst_size;
+
+ /* Both cannot be switched on. */
+ SLJIT_ASSERT((flags & (EX86_BIN_INS | EX86_SHIFT_INS)) != (EX86_BIN_INS | EX86_SHIFT_INS));
+ /* Size flags not allowed for typed instructions. */
+ SLJIT_ASSERT(!(flags & (EX86_BIN_INS | EX86_SHIFT_INS)) || (flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) == 0);
+ /* Both size flags cannot be switched on. */
+ SLJIT_ASSERT((flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) != (EX86_BYTE_ARG | EX86_HALF_ARG));
+ /* SSE2 and immediate is not possible. */
+ SLJIT_ASSERT(!(a & SLJIT_IMM) || !(flags & EX86_SSE2));
+ SLJIT_ASSERT((flags & (EX86_PREF_F2 | EX86_PREF_F3)) != (EX86_PREF_F2 | EX86_PREF_F3)
+ && (flags & (EX86_PREF_F2 | EX86_PREF_66)) != (EX86_PREF_F2 | EX86_PREF_66)
+ && (flags & (EX86_PREF_F3 | EX86_PREF_66)) != (EX86_PREF_F3 | EX86_PREF_66));
+
+ size &= 0xf;
+ inst_size = size;
+
+ if (flags & (EX86_PREF_F2 | EX86_PREF_F3))
+ inst_size++;
+ if (flags & EX86_PREF_66)
+ inst_size++;
+
+ /* Calculate size of b. */
+ inst_size += 1; /* mod r/m byte. */
+ if (b & SLJIT_MEM) {
+ if ((b & REG_MASK) == SLJIT_UNUSED)
+ inst_size += sizeof(sljit_sw);
+ else if (immb != 0 && !(b & OFFS_REG_MASK)) {
+ /* Immediate operand. */
+ if (immb <= 127 && immb >= -128)
+ inst_size += sizeof(sljit_s8);
+ else
+ inst_size += sizeof(sljit_sw);
+ }
+
+ if ((b & REG_MASK) == SLJIT_SP && !(b & OFFS_REG_MASK))
+ b |= TO_OFFS_REG(SLJIT_SP);
+
+ if ((b & OFFS_REG_MASK) != SLJIT_UNUSED)
+ inst_size += 1; /* SIB byte. */
+ }
+
+ /* Calculate size of a. */
+ if (a & SLJIT_IMM) {
+ if (flags & EX86_BIN_INS) {
+ if (imma <= 127 && imma >= -128) {
+ inst_size += 1;
+ flags |= EX86_BYTE_ARG;
+ } else
+ inst_size += 4;
+ }
+ else if (flags & EX86_SHIFT_INS) {
+ imma &= 0x1f;
+ if (imma != 1) {
+ inst_size ++;
+ flags |= EX86_BYTE_ARG;
+ }
+ } else if (flags & EX86_BYTE_ARG)
+ inst_size++;
+ else if (flags & EX86_HALF_ARG)
+ inst_size += sizeof(short);
+ else
+ inst_size += sizeof(sljit_sw);
+ }
+ else
+ SLJIT_ASSERT(!(flags & EX86_SHIFT_INS) || a == SLJIT_PREF_SHIFT_REG);
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + inst_size);
+ PTR_FAIL_IF(!inst);
+
+ /* Encoding the byte. */
+ INC_SIZE(inst_size);
+ if (flags & EX86_PREF_F2)
+ *inst++ = 0xf2;
+ if (flags & EX86_PREF_F3)
+ *inst++ = 0xf3;
+ if (flags & EX86_PREF_66)
+ *inst++ = 0x66;
+
+ buf_ptr = inst + size;
+
+ /* Encode mod/rm byte. */
+ if (!(flags & EX86_SHIFT_INS)) {
+ if ((flags & EX86_BIN_INS) && (a & SLJIT_IMM))
+ *inst = (flags & EX86_BYTE_ARG) ? GROUP_BINARY_83 : GROUP_BINARY_81;
+
+ if ((a & SLJIT_IMM) || (a == 0))
+ *buf_ptr = 0;
+ else if (!(flags & EX86_SSE2_OP1))
+ *buf_ptr = reg_map[a] << 3;
+ else
+ *buf_ptr = a << 3;
+ }
+ else {
+ if (a & SLJIT_IMM) {
+ if (imma == 1)
+ *inst = GROUP_SHIFT_1;
+ else
+ *inst = GROUP_SHIFT_N;
+ } else
+ *inst = GROUP_SHIFT_CL;
+ *buf_ptr = 0;
+ }
+
+ if (!(b & SLJIT_MEM))
+ *buf_ptr++ |= MOD_REG + ((!(flags & EX86_SSE2_OP2)) ? reg_map[b] : b);
+ else if ((b & REG_MASK) != SLJIT_UNUSED) {
+ if ((b & OFFS_REG_MASK) == SLJIT_UNUSED || (b & OFFS_REG_MASK) == TO_OFFS_REG(SLJIT_SP)) {
+ if (immb != 0) {
+ if (immb <= 127 && immb >= -128)
+ *buf_ptr |= 0x40;
+ else
+ *buf_ptr |= 0x80;
+ }
+
+ if ((b & OFFS_REG_MASK) == SLJIT_UNUSED)
+ *buf_ptr++ |= reg_map[b & REG_MASK];
+ else {
+ *buf_ptr++ |= 0x04;
+ *buf_ptr++ = reg_map[b & REG_MASK] | (reg_map[OFFS_REG(b)] << 3);
+ }
+
+ if (immb != 0) {
+ if (immb <= 127 && immb >= -128)
+ *buf_ptr++ = immb; /* 8 bit displacement. */
+ else {
+ sljit_unaligned_store_sw(buf_ptr, immb); /* 32 bit displacement. */
+ buf_ptr += sizeof(sljit_sw);
+ }
+ }
+ }
+ else {
+ *buf_ptr++ |= 0x04;
+ *buf_ptr++ = reg_map[b & REG_MASK] | (reg_map[OFFS_REG(b)] << 3) | (immb << 6);
+ }
+ }
+ else {
+ *buf_ptr++ |= 0x05;
+ sljit_unaligned_store_sw(buf_ptr, immb); /* 32 bit displacement. */
+ buf_ptr += sizeof(sljit_sw);
+ }
+
+ if (a & SLJIT_IMM) {
+ if (flags & EX86_BYTE_ARG)
+ *buf_ptr = imma;
+ else if (flags & EX86_HALF_ARG)
+ sljit_unaligned_store_s16(buf_ptr, imma);
+ else if (!(flags & EX86_SHIFT_INS))
+ sljit_unaligned_store_sw(buf_ptr, imma);
+ }
+
+ return !(flags & EX86_SHIFT_INS) ? inst : (inst + 1);
+}
+
+/* --------------------------------------------------------------------- */
+/* Call / return instructions */
+/* --------------------------------------------------------------------- */
+
+static SLJIT_INLINE sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 type)
+{
+ sljit_u8 *inst;
+
+#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
+ inst = (sljit_u8*)ensure_buf(compiler, type >= SLJIT_CALL3 ? 1 + 2 + 1 : 1 + 2);
+ FAIL_IF(!inst);
+ INC_SIZE(type >= SLJIT_CALL3 ? 2 + 1 : 2);
+
+ if (type >= SLJIT_CALL3)
+ PUSH_REG(reg_map[SLJIT_R2]);
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (reg_map[SLJIT_R2] << 3) | reg_map[SLJIT_R0];
+#else
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 4 * (type - SLJIT_CALL0));
+ FAIL_IF(!inst);
+ INC_SIZE(4 * (type - SLJIT_CALL0));
+
+ *inst++ = MOV_rm_r;
+ *inst++ = MOD_DISP8 | (reg_map[SLJIT_R0] << 3) | 0x4 /* SIB */;
+ *inst++ = (0x4 /* none*/ << 3) | reg_map[SLJIT_SP];
+ *inst++ = 0;
+ if (type >= SLJIT_CALL2) {
+ *inst++ = MOV_rm_r;
+ *inst++ = MOD_DISP8 | (reg_map[SLJIT_R1] << 3) | 0x4 /* SIB */;
+ *inst++ = (0x4 /* none*/ << 3) | reg_map[SLJIT_SP];
+ *inst++ = sizeof(sljit_sw);
+ }
+ if (type >= SLJIT_CALL3) {
+ *inst++ = MOV_rm_r;
+ *inst++ = MOD_DISP8 | (reg_map[SLJIT_R2] << 3) | 0x4 /* SIB */;
+ *inst++ = (0x4 /* none*/ << 3) | reg_map[SLJIT_SP];
+ *inst++ = 2 * sizeof(sljit_sw);
+ }
+#endif
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
+{
+ sljit_u8 *inst;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ CHECK_EXTRA_REGS(dst, dstw, (void)0);
+
+ /* For UNUSED dst. Uncommon, but possible. */
+ if (dst == SLJIT_UNUSED)
+ dst = TMP_REG1;
+
+ if (FAST_IS_REG(dst)) {
+ /* Unused dest is possible here. */
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
+ FAIL_IF(!inst);
+
+ INC_SIZE(1);
+ POP_REG(reg_map[dst]);
+ return SLJIT_SUCCESS;
+ }
+
+ /* Memory. */
+ inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst++ = POP_rm;
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw)
+{
+ sljit_u8 *inst;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_return(compiler, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ CHECK_EXTRA_REGS(src, srcw, (void)0);
+
+ if (FAST_IS_REG(src)) {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + 1);
+ FAIL_IF(!inst);
+
+ INC_SIZE(1 + 1);
+ PUSH_REG(reg_map[src]);
+ }
+ else if (src & SLJIT_MEM) {
+ inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_FF;
+ *inst |= PUSH_rm;
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
+ FAIL_IF(!inst);
+ INC_SIZE(1);
+ }
+ else {
+ /* SLJIT_IMM. */
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 5 + 1);
+ FAIL_IF(!inst);
+
+ INC_SIZE(5 + 1);
+ *inst++ = PUSH_i32;
+ sljit_unaligned_store_sw(inst, srcw);
+ inst += sizeof(sljit_sw);
+ }
+
+ RET();
+ return SLJIT_SUCCESS;
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeX86_64.c b/thirdparty/pcre2/src/sljit/sljitNativeX86_64.c
new file mode 100644
index 0000000000..bc92d45680
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativeX86_64.c
@@ -0,0 +1,725 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* x86 64-bit arch dependent functions. */
+
+static sljit_s32 emit_load_imm64(struct sljit_compiler *compiler, sljit_s32 reg, sljit_sw imm)
+{
+ sljit_u8 *inst;
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 2 + sizeof(sljit_sw));
+ FAIL_IF(!inst);
+ INC_SIZE(2 + sizeof(sljit_sw));
+ *inst++ = REX_W | ((reg_map[reg] <= 7) ? 0 : REX_B);
+ *inst++ = MOV_r_i32 + (reg_map[reg] & 0x7);
+ sljit_unaligned_store_sw(inst, imm);
+ return SLJIT_SUCCESS;
+}
+
+static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_s32 type)
+{
+ if (type < SLJIT_JUMP) {
+ /* Invert type. */
+ *code_ptr++ = get_jump_code(type ^ 0x1) - 0x10;
+ *code_ptr++ = 10 + 3;
+ }
+
+ SLJIT_COMPILE_ASSERT(reg_map[TMP_REG3] == 9, tmp3_is_9_first);
+ *code_ptr++ = REX_W | REX_B;
+ *code_ptr++ = MOV_r_i32 + 1;
+ jump->addr = (sljit_uw)code_ptr;
+
+ if (jump->flags & JUMP_LABEL)
+ jump->flags |= PATCH_MD;
+ else
+ sljit_unaligned_store_sw(code_ptr, jump->u.target);
+
+ code_ptr += sizeof(sljit_sw);
+ *code_ptr++ = REX_B;
+ *code_ptr++ = GROUP_FF;
+ *code_ptr++ = (type >= SLJIT_FAST_CALL) ? (MOD_REG | CALL_rm | 1) : (MOD_REG | JMP_rm | 1);
+
+ return code_ptr;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ sljit_s32 i, tmp, size, saved_register_size;
+ sljit_u8 *inst;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_emit_enter(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ compiler->flags_saved = 0;
+
+ /* Including the return address saved by the call instruction. */
+ saved_register_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1);
+
+ tmp = saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = SLJIT_S0; i >= tmp; i--) {
+ size = reg_map[i] >= 8 ? 2 : 1;
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + size);
+ FAIL_IF(!inst);
+ INC_SIZE(size);
+ if (reg_map[i] >= 8)
+ *inst++ = REX_B;
+ PUSH_REG(reg_lmap[i]);
+ }
+
+ for (i = scratches; i >= SLJIT_FIRST_SAVED_REG; i--) {
+ size = reg_map[i] >= 8 ? 2 : 1;
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + size);
+ FAIL_IF(!inst);
+ INC_SIZE(size);
+ if (reg_map[i] >= 8)
+ *inst++ = REX_B;
+ PUSH_REG(reg_lmap[i]);
+ }
+
+ if (args > 0) {
+ size = args * 3;
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + size);
+ FAIL_IF(!inst);
+
+ INC_SIZE(size);
+
+#ifndef _WIN64
+ if (args > 0) {
+ *inst++ = REX_W;
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (reg_map[SLJIT_S0] << 3) | 0x7 /* rdi */;
+ }
+ if (args > 1) {
+ *inst++ = REX_W | REX_R;
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (reg_lmap[SLJIT_S1] << 3) | 0x6 /* rsi */;
+ }
+ if (args > 2) {
+ *inst++ = REX_W | REX_R;
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (reg_lmap[SLJIT_S2] << 3) | 0x2 /* rdx */;
+ }
+#else
+ if (args > 0) {
+ *inst++ = REX_W;
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (reg_map[SLJIT_S0] << 3) | 0x1 /* rcx */;
+ }
+ if (args > 1) {
+ *inst++ = REX_W;
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (reg_map[SLJIT_S1] << 3) | 0x2 /* rdx */;
+ }
+ if (args > 2) {
+ *inst++ = REX_W | REX_B;
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (reg_map[SLJIT_S2] << 3) | 0x0 /* r8 */;
+ }
+#endif
+ }
+
+ local_size = ((local_size + SLJIT_LOCALS_OFFSET + saved_register_size + 15) & ~15) - saved_register_size;
+ compiler->local_size = local_size;
+
+#ifdef _WIN64
+ if (local_size > 1024) {
+ /* Allocate stack for the callback, which grows the stack. */
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 4 + (3 + sizeof(sljit_s32)));
+ FAIL_IF(!inst);
+ INC_SIZE(4 + (3 + sizeof(sljit_s32)));
+ *inst++ = REX_W;
+ *inst++ = GROUP_BINARY_83;
+ *inst++ = MOD_REG | SUB | 4;
+ /* Allocated size for registers must be divisible by 8. */
+ SLJIT_ASSERT(!(saved_register_size & 0x7));
+ /* Aligned to 16 byte. */
+ if (saved_register_size & 0x8) {
+ *inst++ = 5 * sizeof(sljit_sw);
+ local_size -= 5 * sizeof(sljit_sw);
+ } else {
+ *inst++ = 4 * sizeof(sljit_sw);
+ local_size -= 4 * sizeof(sljit_sw);
+ }
+ /* Second instruction */
+ SLJIT_COMPILE_ASSERT(reg_map[SLJIT_R0] < 8, temporary_reg1_is_loreg);
+ *inst++ = REX_W;
+ *inst++ = MOV_rm_i32;
+ *inst++ = MOD_REG | reg_lmap[SLJIT_R0];
+ sljit_unaligned_store_s32(inst, local_size);
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
+ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ compiler->skip_checks = 1;
+#endif
+ FAIL_IF(sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_grow_stack)));
+ }
+#endif
+
+ SLJIT_ASSERT(local_size > 0);
+ if (local_size <= 127) {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 4);
+ FAIL_IF(!inst);
+ INC_SIZE(4);
+ *inst++ = REX_W;
+ *inst++ = GROUP_BINARY_83;
+ *inst++ = MOD_REG | SUB | 4;
+ *inst++ = local_size;
+ }
+ else {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 7);
+ FAIL_IF(!inst);
+ INC_SIZE(7);
+ *inst++ = REX_W;
+ *inst++ = GROUP_BINARY_81;
+ *inst++ = MOD_REG | SUB | 4;
+ sljit_unaligned_store_s32(inst, local_size);
+ inst += sizeof(sljit_s32);
+ }
+
+#ifdef _WIN64
+ /* Save xmm6 register: movaps [rsp + 0x20], xmm6 */
+ if (fscratches >= 6 || fsaveds >= 1) {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 5);
+ FAIL_IF(!inst);
+ INC_SIZE(5);
+ *inst++ = GROUP_0F;
+ sljit_unaligned_store_s32(inst, 0x20247429);
+ }
+#endif
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_set_context(struct sljit_compiler *compiler,
+ sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
+ sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
+{
+ sljit_s32 saved_register_size;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size));
+ set_set_context(compiler, options, args, scratches, saveds, fscratches, fsaveds, local_size);
+
+ /* Including the return address saved by the call instruction. */
+ saved_register_size = GET_SAVED_REGISTERS_SIZE(scratches, saveds, 1);
+ compiler->local_size = ((local_size + SLJIT_LOCALS_OFFSET + saved_register_size + 15) & ~15) - saved_register_size;
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_return(struct sljit_compiler *compiler, sljit_s32 op, sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 i, tmp, size;
+ sljit_u8 *inst;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_return(compiler, op, src, srcw));
+
+ compiler->flags_saved = 0;
+ FAIL_IF(emit_mov_before_return(compiler, op, src, srcw));
+
+#ifdef _WIN64
+ /* Restore xmm6 register: movaps xmm6, [rsp + 0x20] */
+ if (compiler->fscratches >= 6 || compiler->fsaveds >= 1) {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 5);
+ FAIL_IF(!inst);
+ INC_SIZE(5);
+ *inst++ = GROUP_0F;
+ sljit_unaligned_store_s32(inst, 0x20247428);
+ }
+#endif
+
+ SLJIT_ASSERT(compiler->local_size > 0);
+ if (compiler->local_size <= 127) {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 4);
+ FAIL_IF(!inst);
+ INC_SIZE(4);
+ *inst++ = REX_W;
+ *inst++ = GROUP_BINARY_83;
+ *inst++ = MOD_REG | ADD | 4;
+ *inst = compiler->local_size;
+ }
+ else {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 7);
+ FAIL_IF(!inst);
+ INC_SIZE(7);
+ *inst++ = REX_W;
+ *inst++ = GROUP_BINARY_81;
+ *inst++ = MOD_REG | ADD | 4;
+ sljit_unaligned_store_s32(inst, compiler->local_size);
+ }
+
+ tmp = compiler->scratches;
+ for (i = SLJIT_FIRST_SAVED_REG; i <= tmp; i++) {
+ size = reg_map[i] >= 8 ? 2 : 1;
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + size);
+ FAIL_IF(!inst);
+ INC_SIZE(size);
+ if (reg_map[i] >= 8)
+ *inst++ = REX_B;
+ POP_REG(reg_lmap[i]);
+ }
+
+ tmp = compiler->saveds < SLJIT_NUMBER_OF_SAVED_REGISTERS ? (SLJIT_S0 + 1 - compiler->saveds) : SLJIT_FIRST_SAVED_REG;
+ for (i = tmp; i <= SLJIT_S0; i++) {
+ size = reg_map[i] >= 8 ? 2 : 1;
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + size);
+ FAIL_IF(!inst);
+ INC_SIZE(size);
+ if (reg_map[i] >= 8)
+ *inst++ = REX_B;
+ POP_REG(reg_lmap[i]);
+ }
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
+ FAIL_IF(!inst);
+ INC_SIZE(1);
+ RET();
+ return SLJIT_SUCCESS;
+}
+
+/* --------------------------------------------------------------------- */
+/* Operators */
+/* --------------------------------------------------------------------- */
+
+static sljit_s32 emit_do_imm32(struct sljit_compiler *compiler, sljit_u8 rex, sljit_u8 opcode, sljit_sw imm)
+{
+ sljit_u8 *inst;
+ sljit_s32 length = 1 + (rex ? 1 : 0) + sizeof(sljit_s32);
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + length);
+ FAIL_IF(!inst);
+ INC_SIZE(length);
+ if (rex)
+ *inst++ = rex;
+ *inst++ = opcode;
+ sljit_unaligned_store_s32(inst, imm);
+ return SLJIT_SUCCESS;
+}
+
+static sljit_u8* emit_x86_instruction(struct sljit_compiler *compiler, sljit_s32 size,
+ /* The register or immediate operand. */
+ sljit_s32 a, sljit_sw imma,
+ /* The general operand (not immediate). */
+ sljit_s32 b, sljit_sw immb)
+{
+ sljit_u8 *inst;
+ sljit_u8 *buf_ptr;
+ sljit_u8 rex = 0;
+ sljit_s32 flags = size & ~0xf;
+ sljit_s32 inst_size;
+
+ /* The immediate operand must be 32 bit. */
+ SLJIT_ASSERT(!(a & SLJIT_IMM) || compiler->mode32 || IS_HALFWORD(imma));
+ /* Both cannot be switched on. */
+ SLJIT_ASSERT((flags & (EX86_BIN_INS | EX86_SHIFT_INS)) != (EX86_BIN_INS | EX86_SHIFT_INS));
+ /* Size flags not allowed for typed instructions. */
+ SLJIT_ASSERT(!(flags & (EX86_BIN_INS | EX86_SHIFT_INS)) || (flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) == 0);
+ /* Both size flags cannot be switched on. */
+ SLJIT_ASSERT((flags & (EX86_BYTE_ARG | EX86_HALF_ARG)) != (EX86_BYTE_ARG | EX86_HALF_ARG));
+ /* SSE2 and immediate is not possible. */
+ SLJIT_ASSERT(!(a & SLJIT_IMM) || !(flags & EX86_SSE2));
+ SLJIT_ASSERT((flags & (EX86_PREF_F2 | EX86_PREF_F3)) != (EX86_PREF_F2 | EX86_PREF_F3)
+ && (flags & (EX86_PREF_F2 | EX86_PREF_66)) != (EX86_PREF_F2 | EX86_PREF_66)
+ && (flags & (EX86_PREF_F3 | EX86_PREF_66)) != (EX86_PREF_F3 | EX86_PREF_66));
+
+ size &= 0xf;
+ inst_size = size;
+
+ if (!compiler->mode32 && !(flags & EX86_NO_REXW))
+ rex |= REX_W;
+ else if (flags & EX86_REX)
+ rex |= REX;
+
+ if (flags & (EX86_PREF_F2 | EX86_PREF_F3))
+ inst_size++;
+ if (flags & EX86_PREF_66)
+ inst_size++;
+
+ /* Calculate size of b. */
+ inst_size += 1; /* mod r/m byte. */
+ if (b & SLJIT_MEM) {
+ if (!(b & OFFS_REG_MASK)) {
+ if (NOT_HALFWORD(immb)) {
+ if (emit_load_imm64(compiler, TMP_REG3, immb))
+ return NULL;
+ immb = 0;
+ if (b & REG_MASK)
+ b |= TO_OFFS_REG(TMP_REG3);
+ else
+ b |= TMP_REG3;
+ }
+ else if (reg_lmap[b & REG_MASK] == 4)
+ b |= TO_OFFS_REG(SLJIT_SP);
+ }
+
+ if ((b & REG_MASK) == SLJIT_UNUSED)
+ inst_size += 1 + sizeof(sljit_s32); /* SIB byte required to avoid RIP based addressing. */
+ else {
+ if (reg_map[b & REG_MASK] >= 8)
+ rex |= REX_B;
+
+ if (immb != 0 && (!(b & OFFS_REG_MASK) || (b & OFFS_REG_MASK) == TO_OFFS_REG(SLJIT_SP))) {
+ /* Immediate operand. */
+ if (immb <= 127 && immb >= -128)
+ inst_size += sizeof(sljit_s8);
+ else
+ inst_size += sizeof(sljit_s32);
+ }
+ else if (reg_lmap[b & REG_MASK] == 5)
+ inst_size += sizeof(sljit_s8);
+
+ if ((b & OFFS_REG_MASK) != SLJIT_UNUSED) {
+ inst_size += 1; /* SIB byte. */
+ if (reg_map[OFFS_REG(b)] >= 8)
+ rex |= REX_X;
+ }
+ }
+ }
+ else if (!(flags & EX86_SSE2_OP2) && reg_map[b] >= 8)
+ rex |= REX_B;
+
+ if (a & SLJIT_IMM) {
+ if (flags & EX86_BIN_INS) {
+ if (imma <= 127 && imma >= -128) {
+ inst_size += 1;
+ flags |= EX86_BYTE_ARG;
+ } else
+ inst_size += 4;
+ }
+ else if (flags & EX86_SHIFT_INS) {
+ imma &= compiler->mode32 ? 0x1f : 0x3f;
+ if (imma != 1) {
+ inst_size ++;
+ flags |= EX86_BYTE_ARG;
+ }
+ } else if (flags & EX86_BYTE_ARG)
+ inst_size++;
+ else if (flags & EX86_HALF_ARG)
+ inst_size += sizeof(short);
+ else
+ inst_size += sizeof(sljit_s32);
+ }
+ else {
+ SLJIT_ASSERT(!(flags & EX86_SHIFT_INS) || a == SLJIT_PREF_SHIFT_REG);
+ /* reg_map[SLJIT_PREF_SHIFT_REG] is less than 8. */
+ if (!(flags & EX86_SSE2_OP1) && reg_map[a] >= 8)
+ rex |= REX_R;
+ }
+
+ if (rex)
+ inst_size++;
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + inst_size);
+ PTR_FAIL_IF(!inst);
+
+ /* Encoding the byte. */
+ INC_SIZE(inst_size);
+ if (flags & EX86_PREF_F2)
+ *inst++ = 0xf2;
+ if (flags & EX86_PREF_F3)
+ *inst++ = 0xf3;
+ if (flags & EX86_PREF_66)
+ *inst++ = 0x66;
+ if (rex)
+ *inst++ = rex;
+ buf_ptr = inst + size;
+
+ /* Encode mod/rm byte. */
+ if (!(flags & EX86_SHIFT_INS)) {
+ if ((flags & EX86_BIN_INS) && (a & SLJIT_IMM))
+ *inst = (flags & EX86_BYTE_ARG) ? GROUP_BINARY_83 : GROUP_BINARY_81;
+
+ if ((a & SLJIT_IMM) || (a == 0))
+ *buf_ptr = 0;
+ else if (!(flags & EX86_SSE2_OP1))
+ *buf_ptr = reg_lmap[a] << 3;
+ else
+ *buf_ptr = a << 3;
+ }
+ else {
+ if (a & SLJIT_IMM) {
+ if (imma == 1)
+ *inst = GROUP_SHIFT_1;
+ else
+ *inst = GROUP_SHIFT_N;
+ } else
+ *inst = GROUP_SHIFT_CL;
+ *buf_ptr = 0;
+ }
+
+ if (!(b & SLJIT_MEM))
+ *buf_ptr++ |= MOD_REG + ((!(flags & EX86_SSE2_OP2)) ? reg_lmap[b] : b);
+ else if ((b & REG_MASK) != SLJIT_UNUSED) {
+ if ((b & OFFS_REG_MASK) == SLJIT_UNUSED || (b & OFFS_REG_MASK) == TO_OFFS_REG(SLJIT_SP)) {
+ if (immb != 0 || reg_lmap[b & REG_MASK] == 5) {
+ if (immb <= 127 && immb >= -128)
+ *buf_ptr |= 0x40;
+ else
+ *buf_ptr |= 0x80;
+ }
+
+ if ((b & OFFS_REG_MASK) == SLJIT_UNUSED)
+ *buf_ptr++ |= reg_lmap[b & REG_MASK];
+ else {
+ *buf_ptr++ |= 0x04;
+ *buf_ptr++ = reg_lmap[b & REG_MASK] | (reg_lmap[OFFS_REG(b)] << 3);
+ }
+
+ if (immb != 0 || reg_lmap[b & REG_MASK] == 5) {
+ if (immb <= 127 && immb >= -128)
+ *buf_ptr++ = immb; /* 8 bit displacement. */
+ else {
+ sljit_unaligned_store_s32(buf_ptr, immb); /* 32 bit displacement. */
+ buf_ptr += sizeof(sljit_s32);
+ }
+ }
+ }
+ else {
+ if (reg_lmap[b & REG_MASK] == 5)
+ *buf_ptr |= 0x40;
+ *buf_ptr++ |= 0x04;
+ *buf_ptr++ = reg_lmap[b & REG_MASK] | (reg_lmap[OFFS_REG(b)] << 3) | (immb << 6);
+ if (reg_lmap[b & REG_MASK] == 5)
+ *buf_ptr++ = 0;
+ }
+ }
+ else {
+ *buf_ptr++ |= 0x04;
+ *buf_ptr++ = 0x25;
+ sljit_unaligned_store_s32(buf_ptr, immb); /* 32 bit displacement. */
+ buf_ptr += sizeof(sljit_s32);
+ }
+
+ if (a & SLJIT_IMM) {
+ if (flags & EX86_BYTE_ARG)
+ *buf_ptr = imma;
+ else if (flags & EX86_HALF_ARG)
+ sljit_unaligned_store_s16(buf_ptr, imma);
+ else if (!(flags & EX86_SHIFT_INS))
+ sljit_unaligned_store_s32(buf_ptr, imma);
+ }
+
+ return !(flags & EX86_SHIFT_INS) ? inst : (inst + 1);
+}
+
+/* --------------------------------------------------------------------- */
+/* Call / return instructions */
+/* --------------------------------------------------------------------- */
+
+static SLJIT_INLINE sljit_s32 call_with_args(struct sljit_compiler *compiler, sljit_s32 type)
+{
+ sljit_u8 *inst;
+
+#ifndef _WIN64
+ SLJIT_COMPILE_ASSERT(reg_map[SLJIT_R1] == 6 && reg_map[SLJIT_R0] < 8 && reg_map[SLJIT_R2] < 8, args_registers);
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + ((type < SLJIT_CALL3) ? 3 : 6));
+ FAIL_IF(!inst);
+ INC_SIZE((type < SLJIT_CALL3) ? 3 : 6);
+ if (type >= SLJIT_CALL3) {
+ *inst++ = REX_W;
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (0x2 /* rdx */ << 3) | reg_lmap[SLJIT_R2];
+ }
+ *inst++ = REX_W;
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (0x7 /* rdi */ << 3) | reg_lmap[SLJIT_R0];
+#else
+ SLJIT_COMPILE_ASSERT(reg_map[SLJIT_R1] == 2 && reg_map[SLJIT_R0] < 8 && reg_map[SLJIT_R2] < 8, args_registers);
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + ((type < SLJIT_CALL3) ? 3 : 6));
+ FAIL_IF(!inst);
+ INC_SIZE((type < SLJIT_CALL3) ? 3 : 6);
+ if (type >= SLJIT_CALL3) {
+ *inst++ = REX_W | REX_R;
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (0x0 /* r8 */ << 3) | reg_lmap[SLJIT_R2];
+ }
+ *inst++ = REX_W;
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (0x1 /* rcx */ << 3) | reg_lmap[SLJIT_R0];
+#endif
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
+{
+ sljit_u8 *inst;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_enter(compiler, dst, dstw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ /* For UNUSED dst. Uncommon, but possible. */
+ if (dst == SLJIT_UNUSED)
+ dst = TMP_REG1;
+
+ if (FAST_IS_REG(dst)) {
+ if (reg_map[dst] < 8) {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
+ FAIL_IF(!inst);
+ INC_SIZE(1);
+ POP_REG(reg_lmap[dst]);
+ return SLJIT_SUCCESS;
+ }
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 2);
+ FAIL_IF(!inst);
+ INC_SIZE(2);
+ *inst++ = REX_B;
+ POP_REG(reg_lmap[dst]);
+ return SLJIT_SUCCESS;
+ }
+
+ /* REX_W is not necessary (src is not immediate). */
+ compiler->mode32 = 1;
+ inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst++ = POP_rm;
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_s32 src, sljit_sw srcw)
+{
+ sljit_u8 *inst;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fast_return(compiler, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ if ((src & SLJIT_IMM) && NOT_HALFWORD(srcw)) {
+ FAIL_IF(emit_load_imm64(compiler, TMP_REG1, srcw));
+ src = TMP_REG1;
+ }
+
+ if (FAST_IS_REG(src)) {
+ if (reg_map[src] < 8) {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + 1);
+ FAIL_IF(!inst);
+
+ INC_SIZE(1 + 1);
+ PUSH_REG(reg_lmap[src]);
+ }
+ else {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 2 + 1);
+ FAIL_IF(!inst);
+
+ INC_SIZE(2 + 1);
+ *inst++ = REX_B;
+ PUSH_REG(reg_lmap[src]);
+ }
+ }
+ else if (src & SLJIT_MEM) {
+ /* REX_W is not necessary (src is not immediate). */
+ compiler->mode32 = 1;
+ inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_FF;
+ *inst |= PUSH_rm;
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
+ FAIL_IF(!inst);
+ INC_SIZE(1);
+ }
+ else {
+ SLJIT_ASSERT(IS_HALFWORD(srcw));
+ /* SLJIT_IMM. */
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 5 + 1);
+ FAIL_IF(!inst);
+
+ INC_SIZE(5 + 1);
+ *inst++ = PUSH_i32;
+ sljit_unaligned_store_s32(inst, srcw);
+ inst += sizeof(sljit_s32);
+ }
+
+ RET();
+ return SLJIT_SUCCESS;
+}
+
+
+/* --------------------------------------------------------------------- */
+/* Extend input */
+/* --------------------------------------------------------------------- */
+
+static sljit_s32 emit_mov_int(struct sljit_compiler *compiler, sljit_s32 sign,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_u8* inst;
+ sljit_s32 dst_r;
+
+ compiler->mode32 = 0;
+
+ if (dst == SLJIT_UNUSED && !(src & SLJIT_MEM))
+ return SLJIT_SUCCESS; /* Empty instruction. */
+
+ if (src & SLJIT_IMM) {
+ if (FAST_IS_REG(dst)) {
+ if (sign || ((sljit_uw)srcw <= 0x7fffffff)) {
+ inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, (sljit_sw)(sljit_s32)srcw, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = MOV_rm_i32;
+ return SLJIT_SUCCESS;
+ }
+ return emit_load_imm64(compiler, dst, srcw);
+ }
+ compiler->mode32 = 1;
+ inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, (sljit_sw)(sljit_s32)srcw, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = MOV_rm_i32;
+ compiler->mode32 = 0;
+ return SLJIT_SUCCESS;
+ }
+
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
+
+ if ((dst & SLJIT_MEM) && FAST_IS_REG(src))
+ dst_r = src;
+ else {
+ if (sign) {
+ inst = emit_x86_instruction(compiler, 1, dst_r, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst++ = MOVSXD_r_rm;
+ } else {
+ compiler->mode32 = 1;
+ FAIL_IF(emit_mov(compiler, dst_r, 0, src, srcw));
+ compiler->mode32 = 0;
+ }
+ }
+
+ if (dst & SLJIT_MEM) {
+ compiler->mode32 = 1;
+ inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = MOV_rm_r;
+ compiler->mode32 = 0;
+ }
+
+ return SLJIT_SUCCESS;
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitNativeX86_common.c b/thirdparty/pcre2/src/sljit/sljitNativeX86_common.c
new file mode 100644
index 0000000000..12a0e272af
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitNativeX86_common.c
@@ -0,0 +1,3030 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+SLJIT_API_FUNC_ATTRIBUTE const char* sljit_get_platform_name(void)
+{
+ return "x86" SLJIT_CPUINFO;
+}
+
+/*
+ 32b register indexes:
+ 0 - EAX
+ 1 - ECX
+ 2 - EDX
+ 3 - EBX
+ 4 - none
+ 5 - EBP
+ 6 - ESI
+ 7 - EDI
+*/
+
+/*
+ 64b register indexes:
+ 0 - RAX
+ 1 - RCX
+ 2 - RDX
+ 3 - RBX
+ 4 - none
+ 5 - RBP
+ 6 - RSI
+ 7 - RDI
+ 8 - R8 - From now on REX prefix is required
+ 9 - R9
+ 10 - R10
+ 11 - R11
+ 12 - R12
+ 13 - R13
+ 14 - R14
+ 15 - R15
+*/
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+
+/* Last register + 1. */
+#define TMP_REG1 (SLJIT_NUMBER_OF_REGISTERS + 2)
+
+static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 3] = {
+ 0, 0, 2, 1, 0, 0, 0, 0, 7, 6, 3, 4, 5
+};
+
+#define CHECK_EXTRA_REGS(p, w, do) \
+ if (p >= SLJIT_R3 && p <= SLJIT_R6) { \
+ w = SLJIT_LOCALS_OFFSET + ((p) - (SLJIT_R3 + 4)) * sizeof(sljit_sw); \
+ p = SLJIT_MEM1(SLJIT_SP); \
+ do; \
+ }
+
+#else /* SLJIT_CONFIG_X86_32 */
+
+/* Last register + 1. */
+#define TMP_REG1 (SLJIT_NUMBER_OF_REGISTERS + 2)
+#define TMP_REG2 (SLJIT_NUMBER_OF_REGISTERS + 3)
+#define TMP_REG3 (SLJIT_NUMBER_OF_REGISTERS + 4)
+
+/* Note: r12 & 0x7 == 0b100, which decoded as SIB byte present
+ Note: avoid to use r12 and r13 for memory addessing
+ therefore r12 is better for SAVED_EREG than SAVED_REG. */
+#ifndef _WIN64
+/* 1st passed in rdi, 2nd argument passed in rsi, 3rd in rdx. */
+static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 5] = {
+ 0, 0, 6, 1, 8, 11, 10, 12, 5, 13, 14, 15, 3, 4, 2, 7, 9
+};
+/* low-map. reg_map & 0x7. */
+static const sljit_u8 reg_lmap[SLJIT_NUMBER_OF_REGISTERS + 5] = {
+ 0, 0, 6, 1, 0, 3, 2, 4, 5, 5, 6, 7, 3, 4, 2, 7, 1
+};
+#else
+/* 1st passed in rcx, 2nd argument passed in rdx, 3rd in r8. */
+static const sljit_u8 reg_map[SLJIT_NUMBER_OF_REGISTERS + 5] = {
+ 0, 0, 2, 1, 11, 12, 5, 13, 14, 15, 7, 6, 3, 4, 10, 8, 9
+};
+/* low-map. reg_map & 0x7. */
+static const sljit_u8 reg_lmap[SLJIT_NUMBER_OF_REGISTERS + 5] = {
+ 0, 0, 2, 1, 3, 4, 5, 5, 6, 7, 7, 6, 3, 4, 2, 0, 1
+};
+#endif
+
+#define REX_W 0x48
+#define REX_R 0x44
+#define REX_X 0x42
+#define REX_B 0x41
+#define REX 0x40
+
+#ifndef _WIN64
+#define HALFWORD_MAX 0x7fffffffl
+#define HALFWORD_MIN -0x80000000l
+#else
+#define HALFWORD_MAX 0x7fffffffll
+#define HALFWORD_MIN -0x80000000ll
+#endif
+
+#define IS_HALFWORD(x) ((x) <= HALFWORD_MAX && (x) >= HALFWORD_MIN)
+#define NOT_HALFWORD(x) ((x) > HALFWORD_MAX || (x) < HALFWORD_MIN)
+
+#define CHECK_EXTRA_REGS(p, w, do)
+
+#endif /* SLJIT_CONFIG_X86_32 */
+
+#define TMP_FREG (0)
+
+/* Size flags for emit_x86_instruction: */
+#define EX86_BIN_INS 0x0010
+#define EX86_SHIFT_INS 0x0020
+#define EX86_REX 0x0040
+#define EX86_NO_REXW 0x0080
+#define EX86_BYTE_ARG 0x0100
+#define EX86_HALF_ARG 0x0200
+#define EX86_PREF_66 0x0400
+#define EX86_PREF_F2 0x0800
+#define EX86_PREF_F3 0x1000
+#define EX86_SSE2_OP1 0x2000
+#define EX86_SSE2_OP2 0x4000
+#define EX86_SSE2 (EX86_SSE2_OP1 | EX86_SSE2_OP2)
+
+/* --------------------------------------------------------------------- */
+/* Instrucion forms */
+/* --------------------------------------------------------------------- */
+
+#define ADD (/* BINARY */ 0 << 3)
+#define ADD_EAX_i32 0x05
+#define ADD_r_rm 0x03
+#define ADD_rm_r 0x01
+#define ADDSD_x_xm 0x58
+#define ADC (/* BINARY */ 2 << 3)
+#define ADC_EAX_i32 0x15
+#define ADC_r_rm 0x13
+#define ADC_rm_r 0x11
+#define AND (/* BINARY */ 4 << 3)
+#define AND_EAX_i32 0x25
+#define AND_r_rm 0x23
+#define AND_rm_r 0x21
+#define ANDPD_x_xm 0x54
+#define BSR_r_rm (/* GROUP_0F */ 0xbd)
+#define CALL_i32 0xe8
+#define CALL_rm (/* GROUP_FF */ 2 << 3)
+#define CDQ 0x99
+#define CMOVNE_r_rm (/* GROUP_0F */ 0x45)
+#define CMP (/* BINARY */ 7 << 3)
+#define CMP_EAX_i32 0x3d
+#define CMP_r_rm 0x3b
+#define CMP_rm_r 0x39
+#define CVTPD2PS_x_xm 0x5a
+#define CVTSI2SD_x_rm 0x2a
+#define CVTTSD2SI_r_xm 0x2c
+#define DIV (/* GROUP_F7 */ 6 << 3)
+#define DIVSD_x_xm 0x5e
+#define INT3 0xcc
+#define IDIV (/* GROUP_F7 */ 7 << 3)
+#define IMUL (/* GROUP_F7 */ 5 << 3)
+#define IMUL_r_rm (/* GROUP_0F */ 0xaf)
+#define IMUL_r_rm_i8 0x6b
+#define IMUL_r_rm_i32 0x69
+#define JE_i8 0x74
+#define JNE_i8 0x75
+#define JMP_i8 0xeb
+#define JMP_i32 0xe9
+#define JMP_rm (/* GROUP_FF */ 4 << 3)
+#define LEA_r_m 0x8d
+#define MOV_r_rm 0x8b
+#define MOV_r_i32 0xb8
+#define MOV_rm_r 0x89
+#define MOV_rm_i32 0xc7
+#define MOV_rm8_i8 0xc6
+#define MOV_rm8_r8 0x88
+#define MOVSD_x_xm 0x10
+#define MOVSD_xm_x 0x11
+#define MOVSXD_r_rm 0x63
+#define MOVSX_r_rm8 (/* GROUP_0F */ 0xbe)
+#define MOVSX_r_rm16 (/* GROUP_0F */ 0xbf)
+#define MOVZX_r_rm8 (/* GROUP_0F */ 0xb6)
+#define MOVZX_r_rm16 (/* GROUP_0F */ 0xb7)
+#define MUL (/* GROUP_F7 */ 4 << 3)
+#define MULSD_x_xm 0x59
+#define NEG_rm (/* GROUP_F7 */ 3 << 3)
+#define NOP 0x90
+#define NOT_rm (/* GROUP_F7 */ 2 << 3)
+#define OR (/* BINARY */ 1 << 3)
+#define OR_r_rm 0x0b
+#define OR_EAX_i32 0x0d
+#define OR_rm_r 0x09
+#define OR_rm8_r8 0x08
+#define POP_r 0x58
+#define POP_rm 0x8f
+#define POPF 0x9d
+#define PUSH_i32 0x68
+#define PUSH_r 0x50
+#define PUSH_rm (/* GROUP_FF */ 6 << 3)
+#define PUSHF 0x9c
+#define RET_near 0xc3
+#define RET_i16 0xc2
+#define SBB (/* BINARY */ 3 << 3)
+#define SBB_EAX_i32 0x1d
+#define SBB_r_rm 0x1b
+#define SBB_rm_r 0x19
+#define SAR (/* SHIFT */ 7 << 3)
+#define SHL (/* SHIFT */ 4 << 3)
+#define SHR (/* SHIFT */ 5 << 3)
+#define SUB (/* BINARY */ 5 << 3)
+#define SUB_EAX_i32 0x2d
+#define SUB_r_rm 0x2b
+#define SUB_rm_r 0x29
+#define SUBSD_x_xm 0x5c
+#define TEST_EAX_i32 0xa9
+#define TEST_rm_r 0x85
+#define UCOMISD_x_xm 0x2e
+#define UNPCKLPD_x_xm 0x14
+#define XCHG_EAX_r 0x90
+#define XCHG_r_rm 0x87
+#define XOR (/* BINARY */ 6 << 3)
+#define XOR_EAX_i32 0x35
+#define XOR_r_rm 0x33
+#define XOR_rm_r 0x31
+#define XORPD_x_xm 0x57
+
+#define GROUP_0F 0x0f
+#define GROUP_F7 0xf7
+#define GROUP_FF 0xff
+#define GROUP_BINARY_81 0x81
+#define GROUP_BINARY_83 0x83
+#define GROUP_SHIFT_1 0xd1
+#define GROUP_SHIFT_N 0xc1
+#define GROUP_SHIFT_CL 0xd3
+
+#define MOD_REG 0xc0
+#define MOD_DISP8 0x40
+
+#define INC_SIZE(s) (*inst++ = (s), compiler->size += (s))
+
+#define PUSH_REG(r) (*inst++ = (PUSH_r + (r)))
+#define POP_REG(r) (*inst++ = (POP_r + (r)))
+#define RET() (*inst++ = (RET_near))
+#define RET_I16(n) (*inst++ = (RET_i16), *inst++ = n, *inst++ = 0)
+/* r32, r/m32 */
+#define MOV_RM(mod, reg, rm) (*inst++ = (MOV_r_rm), *inst++ = (mod) << 6 | (reg) << 3 | (rm))
+
+/* Multithreading does not affect these static variables, since they store
+ built-in CPU features. Therefore they can be overwritten by different threads
+ if they detect the CPU features in the same time. */
+#if (defined SLJIT_DETECT_SSE2 && SLJIT_DETECT_SSE2)
+static sljit_s32 cpu_has_sse2 = -1;
+#endif
+static sljit_s32 cpu_has_cmov = -1;
+
+#ifdef _WIN32_WCE
+#include <cmnintrin.h>
+#elif defined(_MSC_VER) && _MSC_VER >= 1400
+#include <intrin.h>
+#endif
+
+/******************************************************/
+/* Unaligned-store functions */
+/******************************************************/
+
+static SLJIT_INLINE void sljit_unaligned_store_s16(void *addr, sljit_s16 value)
+{
+ SLJIT_MEMCPY(addr, &value, sizeof(value));
+}
+
+static SLJIT_INLINE void sljit_unaligned_store_s32(void *addr, sljit_s32 value)
+{
+ SLJIT_MEMCPY(addr, &value, sizeof(value));
+}
+
+static SLJIT_INLINE void sljit_unaligned_store_sw(void *addr, sljit_sw value)
+{
+ SLJIT_MEMCPY(addr, &value, sizeof(value));
+}
+
+/******************************************************/
+/* Utility functions */
+/******************************************************/
+
+static void get_cpu_features(void)
+{
+ sljit_u32 features;
+
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+
+ int CPUInfo[4];
+ __cpuid(CPUInfo, 1);
+ features = (sljit_u32)CPUInfo[3];
+
+#elif defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_C)
+
+ /* AT&T syntax. */
+ __asm__ (
+ "movl $0x1, %%eax\n"
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ /* On x86-32, there is no red zone, so this
+ should work (no need for a local variable). */
+ "push %%ebx\n"
+#endif
+ "cpuid\n"
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ "pop %%ebx\n"
+#endif
+ "movl %%edx, %0\n"
+ : "=g" (features)
+ :
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ : "%eax", "%ecx", "%edx"
+#else
+ : "%rax", "%rbx", "%rcx", "%rdx"
+#endif
+ );
+
+#else /* _MSC_VER && _MSC_VER >= 1400 */
+
+ /* Intel syntax. */
+ __asm {
+ mov eax, 1
+ cpuid
+ mov features, edx
+ }
+
+#endif /* _MSC_VER && _MSC_VER >= 1400 */
+
+#if (defined SLJIT_DETECT_SSE2 && SLJIT_DETECT_SSE2)
+ cpu_has_sse2 = (features >> 26) & 0x1;
+#endif
+ cpu_has_cmov = (features >> 15) & 0x1;
+}
+
+static sljit_u8 get_jump_code(sljit_s32 type)
+{
+ switch (type) {
+ case SLJIT_EQUAL:
+ case SLJIT_EQUAL_F64:
+ return 0x84 /* je */;
+
+ case SLJIT_NOT_EQUAL:
+ case SLJIT_NOT_EQUAL_F64:
+ return 0x85 /* jne */;
+
+ case SLJIT_LESS:
+ case SLJIT_LESS_F64:
+ return 0x82 /* jc */;
+
+ case SLJIT_GREATER_EQUAL:
+ case SLJIT_GREATER_EQUAL_F64:
+ return 0x83 /* jae */;
+
+ case SLJIT_GREATER:
+ case SLJIT_GREATER_F64:
+ return 0x87 /* jnbe */;
+
+ case SLJIT_LESS_EQUAL:
+ case SLJIT_LESS_EQUAL_F64:
+ return 0x86 /* jbe */;
+
+ case SLJIT_SIG_LESS:
+ return 0x8c /* jl */;
+
+ case SLJIT_SIG_GREATER_EQUAL:
+ return 0x8d /* jnl */;
+
+ case SLJIT_SIG_GREATER:
+ return 0x8f /* jnle */;
+
+ case SLJIT_SIG_LESS_EQUAL:
+ return 0x8e /* jle */;
+
+ case SLJIT_OVERFLOW:
+ case SLJIT_MUL_OVERFLOW:
+ return 0x80 /* jo */;
+
+ case SLJIT_NOT_OVERFLOW:
+ case SLJIT_MUL_NOT_OVERFLOW:
+ return 0x81 /* jno */;
+
+ case SLJIT_UNORDERED_F64:
+ return 0x8a /* jp */;
+
+ case SLJIT_ORDERED_F64:
+ return 0x8b /* jpo */;
+ }
+ return 0;
+}
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_s32 type, sljit_sw executable_offset);
+#else
+static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_s32 type);
+#endif
+
+static sljit_u8* generate_near_jump_code(struct sljit_jump *jump, sljit_u8 *code_ptr, sljit_u8 *code, sljit_s32 type, sljit_sw executable_offset)
+{
+ sljit_s32 short_jump;
+ sljit_uw label_addr;
+
+ if (jump->flags & JUMP_LABEL)
+ label_addr = (sljit_uw)(code + jump->u.label->size);
+ else
+ label_addr = jump->u.target - executable_offset;
+
+ short_jump = (sljit_sw)(label_addr - (jump->addr + 2)) >= -128 && (sljit_sw)(label_addr - (jump->addr + 2)) <= 127;
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if ((sljit_sw)(label_addr - (jump->addr + 1)) > HALFWORD_MAX || (sljit_sw)(label_addr - (jump->addr + 1)) < HALFWORD_MIN)
+ return generate_far_jump_code(jump, code_ptr, type);
+#endif
+
+ if (type == SLJIT_JUMP) {
+ if (short_jump)
+ *code_ptr++ = JMP_i8;
+ else
+ *code_ptr++ = JMP_i32;
+ jump->addr++;
+ }
+ else if (type >= SLJIT_FAST_CALL) {
+ short_jump = 0;
+ *code_ptr++ = CALL_i32;
+ jump->addr++;
+ }
+ else if (short_jump) {
+ *code_ptr++ = get_jump_code(type) - 0x10;
+ jump->addr++;
+ }
+ else {
+ *code_ptr++ = GROUP_0F;
+ *code_ptr++ = get_jump_code(type);
+ jump->addr += 2;
+ }
+
+ if (short_jump) {
+ jump->flags |= PATCH_MB;
+ code_ptr += sizeof(sljit_s8);
+ } else {
+ jump->flags |= PATCH_MW;
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ code_ptr += sizeof(sljit_sw);
+#else
+ code_ptr += sizeof(sljit_s32);
+#endif
+ }
+
+ return code_ptr;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
+{
+ struct sljit_memory_fragment *buf;
+ sljit_u8 *code;
+ sljit_u8 *code_ptr;
+ sljit_u8 *buf_ptr;
+ sljit_u8 *buf_end;
+ sljit_u8 len;
+ sljit_sw executable_offset;
+ sljit_sw jump_addr;
+
+ struct sljit_label *label;
+ struct sljit_jump *jump;
+ struct sljit_const *const_;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_generate_code(compiler));
+ reverse_buf(compiler);
+
+ /* Second code generation pass. */
+ code = (sljit_u8*)SLJIT_MALLOC_EXEC(compiler->size);
+ PTR_FAIL_WITH_EXEC_IF(code);
+ buf = compiler->buf;
+
+ code_ptr = code;
+ label = compiler->labels;
+ jump = compiler->jumps;
+ const_ = compiler->consts;
+ executable_offset = SLJIT_EXEC_OFFSET(code);
+
+ do {
+ buf_ptr = buf->memory;
+ buf_end = buf_ptr + buf->used_size;
+ do {
+ len = *buf_ptr++;
+ if (len > 0) {
+ /* The code is already generated. */
+ SLJIT_MEMCPY(code_ptr, buf_ptr, len);
+ code_ptr += len;
+ buf_ptr += len;
+ }
+ else {
+ if (*buf_ptr >= 2) {
+ jump->addr = (sljit_uw)code_ptr;
+ if (!(jump->flags & SLJIT_REWRITABLE_JUMP))
+ code_ptr = generate_near_jump_code(jump, code_ptr, code, *buf_ptr - 2, executable_offset);
+ else {
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ code_ptr = generate_far_jump_code(jump, code_ptr, *buf_ptr - 2, executable_offset);
+#else
+ code_ptr = generate_far_jump_code(jump, code_ptr, *buf_ptr - 2);
+#endif
+ }
+ jump = jump->next;
+ }
+ else if (*buf_ptr == 0) {
+ label->addr = ((sljit_uw)code_ptr) + executable_offset;
+ label->size = code_ptr - code;
+ label = label->next;
+ }
+ else { /* *buf_ptr is 1 */
+ const_->addr = ((sljit_uw)code_ptr) - sizeof(sljit_sw);
+ const_ = const_->next;
+ }
+ buf_ptr++;
+ }
+ } while (buf_ptr < buf_end);
+ SLJIT_ASSERT(buf_ptr == buf_end);
+ buf = buf->next;
+ } while (buf);
+
+ SLJIT_ASSERT(!label);
+ SLJIT_ASSERT(!jump);
+ SLJIT_ASSERT(!const_);
+
+ jump = compiler->jumps;
+ while (jump) {
+ jump_addr = jump->addr + executable_offset;
+
+ if (jump->flags & PATCH_MB) {
+ SLJIT_ASSERT((sljit_sw)(jump->u.label->addr - (jump_addr + sizeof(sljit_s8))) >= -128 && (sljit_sw)(jump->u.label->addr - (jump_addr + sizeof(sljit_s8))) <= 127);
+ *(sljit_u8*)jump->addr = (sljit_u8)(jump->u.label->addr - (jump_addr + sizeof(sljit_s8)));
+ } else if (jump->flags & PATCH_MW) {
+ if (jump->flags & JUMP_LABEL) {
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ sljit_unaligned_store_sw((void*)jump->addr, (sljit_sw)(jump->u.label->addr - (jump_addr + sizeof(sljit_sw))));
+#else
+ SLJIT_ASSERT((sljit_sw)(jump->u.label->addr - (jump_addr + sizeof(sljit_s32))) >= HALFWORD_MIN && (sljit_sw)(jump->u.label->addr - (jump_addr + sizeof(sljit_s32))) <= HALFWORD_MAX);
+ sljit_unaligned_store_s32((void*)jump->addr, (sljit_s32)(jump->u.label->addr - (jump_addr + sizeof(sljit_s32))));
+#endif
+ }
+ else {
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ sljit_unaligned_store_sw((void*)jump->addr, (sljit_sw)(jump->u.target - (jump_addr + sizeof(sljit_sw))));
+#else
+ SLJIT_ASSERT((sljit_sw)(jump->u.target - (jump_addr + sizeof(sljit_s32))) >= HALFWORD_MIN && (sljit_sw)(jump->u.target - (jump_addr + sizeof(sljit_s32))) <= HALFWORD_MAX);
+ sljit_unaligned_store_s32((void*)jump->addr, (sljit_s32)(jump->u.target - (jump_addr + sizeof(sljit_s32))));
+#endif
+ }
+ }
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ else if (jump->flags & PATCH_MD)
+ sljit_unaligned_store_sw((void*)jump->addr, jump->u.label->addr);
+#endif
+
+ jump = jump->next;
+ }
+
+ /* Some space may be wasted because of short jumps. */
+ SLJIT_ASSERT(code_ptr <= code + compiler->size);
+ compiler->error = SLJIT_ERR_COMPILED;
+ compiler->executable_offset = executable_offset;
+ compiler->executable_size = code_ptr - code;
+ return (void*)(code + executable_offset);
+}
+
+/* --------------------------------------------------------------------- */
+/* Operators */
+/* --------------------------------------------------------------------- */
+
+static sljit_s32 emit_cum_binary(struct sljit_compiler *compiler,
+ sljit_u8 op_rm, sljit_u8 op_mr, sljit_u8 op_imm, sljit_u8 op_eax_imm,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w);
+
+static sljit_s32 emit_non_cum_binary(struct sljit_compiler *compiler,
+ sljit_u8 op_rm, sljit_u8 op_mr, sljit_u8 op_imm, sljit_u8 op_eax_imm,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w);
+
+static sljit_s32 emit_mov(struct sljit_compiler *compiler,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw);
+
+static SLJIT_INLINE sljit_s32 emit_save_flags(struct sljit_compiler *compiler)
+{
+ sljit_u8 *inst;
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 5);
+ FAIL_IF(!inst);
+ INC_SIZE(5);
+#else
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 6);
+ FAIL_IF(!inst);
+ INC_SIZE(6);
+ *inst++ = REX_W;
+#endif
+ *inst++ = LEA_r_m; /* lea esp/rsp, [esp/rsp + sizeof(sljit_sw)] */
+ *inst++ = 0x64;
+ *inst++ = 0x24;
+ *inst++ = (sljit_u8)sizeof(sljit_sw);
+ *inst++ = PUSHF;
+ compiler->flags_saved = 1;
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 emit_restore_flags(struct sljit_compiler *compiler, sljit_s32 keep_flags)
+{
+ sljit_u8 *inst;
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 5);
+ FAIL_IF(!inst);
+ INC_SIZE(5);
+ *inst++ = POPF;
+#else
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 6);
+ FAIL_IF(!inst);
+ INC_SIZE(6);
+ *inst++ = POPF;
+ *inst++ = REX_W;
+#endif
+ *inst++ = LEA_r_m; /* lea esp/rsp, [esp/rsp - sizeof(sljit_sw)] */
+ *inst++ = 0x64;
+ *inst++ = 0x24;
+ *inst++ = (sljit_u8)(-(sljit_s8)sizeof(sljit_sw));
+ compiler->flags_saved = keep_flags;
+ return SLJIT_SUCCESS;
+}
+
+#ifdef _WIN32
+#include <malloc.h>
+
+static void SLJIT_CALL sljit_grow_stack(sljit_sw local_size)
+{
+ /* Workaround for calling the internal _chkstk() function on Windows.
+ This function touches all 4k pages belongs to the requested stack space,
+ which size is passed in local_size. This is necessary on Windows where
+ the stack can only grow in 4k steps. However, this function just burn
+ CPU cycles if the stack is large enough. However, you don't know it in
+ advance, so it must always be called. I think this is a bad design in
+ general even if it has some reasons. */
+ *(volatile sljit_s32*)alloca(local_size) = 0;
+}
+
+#endif
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+#include "sljitNativeX86_32.c"
+#else
+#include "sljitNativeX86_64.c"
+#endif
+
+static sljit_s32 emit_mov(struct sljit_compiler *compiler,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_u8* inst;
+
+ if (dst == SLJIT_UNUSED) {
+ /* No destination, doesn't need to setup flags. */
+ if (src & SLJIT_MEM) {
+ inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst = MOV_r_rm;
+ }
+ return SLJIT_SUCCESS;
+ }
+ if (FAST_IS_REG(src)) {
+ inst = emit_x86_instruction(compiler, 1, src, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = MOV_rm_r;
+ return SLJIT_SUCCESS;
+ }
+ if (src & SLJIT_IMM) {
+ if (FAST_IS_REG(dst)) {
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ return emit_do_imm(compiler, MOV_r_i32 + reg_map[dst], srcw);
+#else
+ if (!compiler->mode32) {
+ if (NOT_HALFWORD(srcw))
+ return emit_load_imm64(compiler, dst, srcw);
+ }
+ else
+ return emit_do_imm32(compiler, (reg_map[dst] >= 8) ? REX_B : 0, MOV_r_i32 + reg_lmap[dst], srcw);
+#endif
+ }
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (!compiler->mode32 && NOT_HALFWORD(srcw)) {
+ FAIL_IF(emit_load_imm64(compiler, TMP_REG2, srcw));
+ inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = MOV_rm_r;
+ return SLJIT_SUCCESS;
+ }
+#endif
+ inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = MOV_rm_i32;
+ return SLJIT_SUCCESS;
+ }
+ if (FAST_IS_REG(dst)) {
+ inst = emit_x86_instruction(compiler, 1, dst, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst = MOV_r_rm;
+ return SLJIT_SUCCESS;
+ }
+
+ /* Memory to memory move. Requires two instruction. */
+ inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst = MOV_r_rm;
+ inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = MOV_rm_r;
+ return SLJIT_SUCCESS;
+}
+
+#define EMIT_MOV(compiler, dst, dstw, src, srcw) \
+ FAIL_IF(emit_mov(compiler, dst, dstw, src, srcw));
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op0(struct sljit_compiler *compiler, sljit_s32 op)
+{
+ sljit_u8 *inst;
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ sljit_s32 size;
+#endif
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op0(compiler, op));
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_BREAKPOINT:
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
+ FAIL_IF(!inst);
+ INC_SIZE(1);
+ *inst = INT3;
+ break;
+ case SLJIT_NOP:
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
+ FAIL_IF(!inst);
+ INC_SIZE(1);
+ *inst = NOP;
+ break;
+ case SLJIT_LMUL_UW:
+ case SLJIT_LMUL_SW:
+ case SLJIT_DIVMOD_UW:
+ case SLJIT_DIVMOD_SW:
+ case SLJIT_DIV_UW:
+ case SLJIT_DIV_SW:
+ compiler->flags_saved = 0;
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+#ifdef _WIN64
+ SLJIT_COMPILE_ASSERT(
+ reg_map[SLJIT_R0] == 0
+ && reg_map[SLJIT_R1] == 2
+ && reg_map[TMP_REG1] > 7,
+ invalid_register_assignment_for_div_mul);
+#else
+ SLJIT_COMPILE_ASSERT(
+ reg_map[SLJIT_R0] == 0
+ && reg_map[SLJIT_R1] < 7
+ && reg_map[TMP_REG1] == 2,
+ invalid_register_assignment_for_div_mul);
+#endif
+ compiler->mode32 = op & SLJIT_I32_OP;
+#endif
+ SLJIT_COMPILE_ASSERT((SLJIT_DIVMOD_UW & 0x2) == 0 && SLJIT_DIV_UW - 0x2 == SLJIT_DIVMOD_UW, bad_div_opcode_assignments);
+
+ op = GET_OPCODE(op);
+ if ((op | 0x2) == SLJIT_DIV_UW) {
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || defined(_WIN64)
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_R1, 0);
+ inst = emit_x86_instruction(compiler, 1, SLJIT_R1, 0, SLJIT_R1, 0);
+#else
+ inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0);
+#endif
+ FAIL_IF(!inst);
+ *inst = XOR_r_rm;
+ }
+
+ if ((op | 0x2) == SLJIT_DIV_SW) {
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || defined(_WIN64)
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_R1, 0);
+#endif
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
+ FAIL_IF(!inst);
+ INC_SIZE(1);
+ *inst = CDQ;
+#else
+ if (compiler->mode32) {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
+ FAIL_IF(!inst);
+ INC_SIZE(1);
+ *inst = CDQ;
+ } else {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 2);
+ FAIL_IF(!inst);
+ INC_SIZE(2);
+ *inst++ = REX_W;
+ *inst = CDQ;
+ }
+#endif
+ }
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 2);
+ FAIL_IF(!inst);
+ INC_SIZE(2);
+ *inst++ = GROUP_F7;
+ *inst = MOD_REG | ((op >= SLJIT_DIVMOD_UW) ? reg_map[TMP_REG1] : reg_map[SLJIT_R1]);
+#else
+#ifdef _WIN64
+ size = (!compiler->mode32 || op >= SLJIT_DIVMOD_UW) ? 3 : 2;
+#else
+ size = (!compiler->mode32) ? 3 : 2;
+#endif
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + size);
+ FAIL_IF(!inst);
+ INC_SIZE(size);
+#ifdef _WIN64
+ if (!compiler->mode32)
+ *inst++ = REX_W | ((op >= SLJIT_DIVMOD_UW) ? REX_B : 0);
+ else if (op >= SLJIT_DIVMOD_UW)
+ *inst++ = REX_B;
+ *inst++ = GROUP_F7;
+ *inst = MOD_REG | ((op >= SLJIT_DIVMOD_UW) ? reg_lmap[TMP_REG1] : reg_lmap[SLJIT_R1]);
+#else
+ if (!compiler->mode32)
+ *inst++ = REX_W;
+ *inst++ = GROUP_F7;
+ *inst = MOD_REG | reg_map[SLJIT_R1];
+#endif
+#endif
+ switch (op) {
+ case SLJIT_LMUL_UW:
+ *inst |= MUL;
+ break;
+ case SLJIT_LMUL_SW:
+ *inst |= IMUL;
+ break;
+ case SLJIT_DIVMOD_UW:
+ case SLJIT_DIV_UW:
+ *inst |= DIV;
+ break;
+ case SLJIT_DIVMOD_SW:
+ case SLJIT_DIV_SW:
+ *inst |= IDIV;
+ break;
+ }
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) && !defined(_WIN64)
+ if (op <= SLJIT_DIVMOD_SW)
+ EMIT_MOV(compiler, SLJIT_R1, 0, TMP_REG1, 0);
+#else
+ if (op >= SLJIT_DIV_UW)
+ EMIT_MOV(compiler, SLJIT_R1, 0, TMP_REG1, 0);
+#endif
+ break;
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+#define ENCODE_PREFIX(prefix) \
+ do { \
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1); \
+ FAIL_IF(!inst); \
+ INC_SIZE(1); \
+ *inst = (prefix); \
+ } while (0)
+
+static sljit_s32 emit_mov_byte(struct sljit_compiler *compiler, sljit_s32 sign,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_u8* inst;
+ sljit_s32 dst_r;
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ sljit_s32 work_r;
+#endif
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ compiler->mode32 = 0;
+#endif
+
+ if (dst == SLJIT_UNUSED && !(src & SLJIT_MEM))
+ return SLJIT_SUCCESS; /* Empty instruction. */
+
+ if (src & SLJIT_IMM) {
+ if (FAST_IS_REG(dst)) {
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ return emit_do_imm(compiler, MOV_r_i32 + reg_map[dst], srcw);
+#else
+ inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0);
+ FAIL_IF(!inst);
+ *inst = MOV_rm_i32;
+ return SLJIT_SUCCESS;
+#endif
+ }
+ inst = emit_x86_instruction(compiler, 1 | EX86_BYTE_ARG | EX86_NO_REXW, SLJIT_IMM, srcw, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = MOV_rm8_i8;
+ return SLJIT_SUCCESS;
+ }
+
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
+
+ if ((dst & SLJIT_MEM) && FAST_IS_REG(src)) {
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ if (reg_map[src] >= 4) {
+ SLJIT_ASSERT(dst_r == TMP_REG1);
+ EMIT_MOV(compiler, TMP_REG1, 0, src, 0);
+ } else
+ dst_r = src;
+#else
+ dst_r = src;
+#endif
+ }
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ else if (FAST_IS_REG(src) && reg_map[src] >= 4) {
+ /* src, dst are registers. */
+ SLJIT_ASSERT(SLOW_IS_REG(dst));
+ if (reg_map[dst] < 4) {
+ if (dst != src)
+ EMIT_MOV(compiler, dst, 0, src, 0);
+ inst = emit_x86_instruction(compiler, 2, dst, 0, dst, 0);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = sign ? MOVSX_r_rm8 : MOVZX_r_rm8;
+ }
+ else {
+ if (dst != src)
+ EMIT_MOV(compiler, dst, 0, src, 0);
+ if (sign) {
+ /* shl reg, 24 */
+ inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0);
+ FAIL_IF(!inst);
+ *inst |= SHL;
+ /* sar reg, 24 */
+ inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 24, dst, 0);
+ FAIL_IF(!inst);
+ *inst |= SAR;
+ }
+ else {
+ inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 0xff, dst, 0);
+ FAIL_IF(!inst);
+ *(inst + 1) |= AND;
+ }
+ }
+ return SLJIT_SUCCESS;
+ }
+#endif
+ else {
+ /* src can be memory addr or reg_map[src] < 4 on x86_32 architectures. */
+ inst = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = sign ? MOVSX_r_rm8 : MOVZX_r_rm8;
+ }
+
+ if (dst & SLJIT_MEM) {
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ if (dst_r == TMP_REG1) {
+ /* Find a non-used register, whose reg_map[src] < 4. */
+ if ((dst & REG_MASK) == SLJIT_R0) {
+ if ((dst & OFFS_REG_MASK) == TO_OFFS_REG(SLJIT_R1))
+ work_r = SLJIT_R2;
+ else
+ work_r = SLJIT_R1;
+ }
+ else {
+ if ((dst & OFFS_REG_MASK) != TO_OFFS_REG(SLJIT_R0))
+ work_r = SLJIT_R0;
+ else if ((dst & REG_MASK) == SLJIT_R1)
+ work_r = SLJIT_R2;
+ else
+ work_r = SLJIT_R1;
+ }
+
+ if (work_r == SLJIT_R0) {
+ ENCODE_PREFIX(XCHG_EAX_r + reg_map[TMP_REG1]);
+ }
+ else {
+ inst = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0);
+ FAIL_IF(!inst);
+ *inst = XCHG_r_rm;
+ }
+
+ inst = emit_x86_instruction(compiler, 1, work_r, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = MOV_rm8_r8;
+
+ if (work_r == SLJIT_R0) {
+ ENCODE_PREFIX(XCHG_EAX_r + reg_map[TMP_REG1]);
+ }
+ else {
+ inst = emit_x86_instruction(compiler, 1, work_r, 0, dst_r, 0);
+ FAIL_IF(!inst);
+ *inst = XCHG_r_rm;
+ }
+ }
+ else {
+ inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = MOV_rm8_r8;
+ }
+#else
+ inst = emit_x86_instruction(compiler, 1 | EX86_REX | EX86_NO_REXW, dst_r, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = MOV_rm8_r8;
+#endif
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 emit_mov_half(struct sljit_compiler *compiler, sljit_s32 sign,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_u8* inst;
+ sljit_s32 dst_r;
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ compiler->mode32 = 0;
+#endif
+
+ if (dst == SLJIT_UNUSED && !(src & SLJIT_MEM))
+ return SLJIT_SUCCESS; /* Empty instruction. */
+
+ if (src & SLJIT_IMM) {
+ if (FAST_IS_REG(dst)) {
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ return emit_do_imm(compiler, MOV_r_i32 + reg_map[dst], srcw);
+#else
+ inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, srcw, dst, 0);
+ FAIL_IF(!inst);
+ *inst = MOV_rm_i32;
+ return SLJIT_SUCCESS;
+#endif
+ }
+ inst = emit_x86_instruction(compiler, 1 | EX86_HALF_ARG | EX86_NO_REXW | EX86_PREF_66, SLJIT_IMM, srcw, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = MOV_rm_i32;
+ return SLJIT_SUCCESS;
+ }
+
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
+
+ if ((dst & SLJIT_MEM) && FAST_IS_REG(src))
+ dst_r = src;
+ else {
+ inst = emit_x86_instruction(compiler, 2, dst_r, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = sign ? MOVSX_r_rm16 : MOVZX_r_rm16;
+ }
+
+ if (dst & SLJIT_MEM) {
+ inst = emit_x86_instruction(compiler, 1 | EX86_NO_REXW | EX86_PREF_66, dst_r, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = MOV_rm_r;
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 emit_unary(struct sljit_compiler *compiler, sljit_u8 opcode,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_u8* inst;
+
+ if (dst == SLJIT_UNUSED) {
+ EMIT_MOV(compiler, TMP_REG1, 0, src, srcw);
+ inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_F7;
+ *inst |= opcode;
+ return SLJIT_SUCCESS;
+ }
+ if (dst == src && dstw == srcw) {
+ /* Same input and output */
+ inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_F7;
+ *inst |= opcode;
+ return SLJIT_SUCCESS;
+ }
+ if (FAST_IS_REG(dst)) {
+ EMIT_MOV(compiler, dst, 0, src, srcw);
+ inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_F7;
+ *inst |= opcode;
+ return SLJIT_SUCCESS;
+ }
+ EMIT_MOV(compiler, TMP_REG1, 0, src, srcw);
+ inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_F7;
+ *inst |= opcode;
+ EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 emit_not_with_flags(struct sljit_compiler *compiler,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_u8* inst;
+
+ if (dst == SLJIT_UNUSED) {
+ EMIT_MOV(compiler, TMP_REG1, 0, src, srcw);
+ inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_F7;
+ *inst |= NOT_rm;
+ inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst = OR_r_rm;
+ return SLJIT_SUCCESS;
+ }
+ if (FAST_IS_REG(dst)) {
+ EMIT_MOV(compiler, dst, 0, src, srcw);
+ inst = emit_x86_instruction(compiler, 1, 0, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_F7;
+ *inst |= NOT_rm;
+ inst = emit_x86_instruction(compiler, 1, dst, 0, dst, 0);
+ FAIL_IF(!inst);
+ *inst = OR_r_rm;
+ return SLJIT_SUCCESS;
+ }
+ EMIT_MOV(compiler, TMP_REG1, 0, src, srcw);
+ inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_F7;
+ *inst |= NOT_rm;
+ inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst = OR_r_rm;
+ EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 emit_clz(struct sljit_compiler *compiler, sljit_s32 op_flags,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_u8* inst;
+ sljit_s32 dst_r;
+
+ SLJIT_UNUSED_ARG(op_flags);
+ if (SLJIT_UNLIKELY(dst == SLJIT_UNUSED)) {
+ /* Just set the zero flag. */
+ EMIT_MOV(compiler, TMP_REG1, 0, src, srcw);
+ inst = emit_x86_instruction(compiler, 1, 0, 0, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_F7;
+ *inst |= NOT_rm;
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, 31, TMP_REG1, 0);
+#else
+ inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_IMM, !(op_flags & SLJIT_I32_OP) ? 63 : 31, TMP_REG1, 0);
+#endif
+ FAIL_IF(!inst);
+ *inst |= SHR;
+ return SLJIT_SUCCESS;
+ }
+
+ if (SLJIT_UNLIKELY(src & SLJIT_IMM)) {
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_IMM, srcw);
+ src = TMP_REG1;
+ srcw = 0;
+ }
+
+ inst = emit_x86_instruction(compiler, 2, TMP_REG1, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = BSR_r_rm;
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ if (FAST_IS_REG(dst))
+ dst_r = dst;
+ else {
+ /* Find an unused temporary register. */
+ if ((dst & REG_MASK) != SLJIT_R0 && (dst & OFFS_REG_MASK) != TO_OFFS_REG(SLJIT_R0))
+ dst_r = SLJIT_R0;
+ else if ((dst & REG_MASK) != SLJIT_R1 && (dst & OFFS_REG_MASK) != TO_OFFS_REG(SLJIT_R1))
+ dst_r = SLJIT_R1;
+ else
+ dst_r = SLJIT_R2;
+ EMIT_MOV(compiler, dst, dstw, dst_r, 0);
+ }
+ EMIT_MOV(compiler, dst_r, 0, SLJIT_IMM, 32 + 31);
+#else
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_REG2;
+ compiler->mode32 = 0;
+ EMIT_MOV(compiler, dst_r, 0, SLJIT_IMM, !(op_flags & SLJIT_I32_OP) ? 64 + 63 : 32 + 31);
+ compiler->mode32 = op_flags & SLJIT_I32_OP;
+#endif
+
+ if (cpu_has_cmov == -1)
+ get_cpu_features();
+
+ if (cpu_has_cmov) {
+ inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = CMOVNE_r_rm;
+ } else {
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 4);
+ FAIL_IF(!inst);
+ INC_SIZE(4);
+
+ *inst++ = JE_i8;
+ *inst++ = 2;
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (reg_map[dst_r] << 3) | reg_map[TMP_REG1];
+#else
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 5);
+ FAIL_IF(!inst);
+ INC_SIZE(5);
+
+ *inst++ = JE_i8;
+ *inst++ = 3;
+ *inst++ = REX_W | (reg_map[dst_r] >= 8 ? REX_R : 0) | (reg_map[TMP_REG1] >= 8 ? REX_B : 0);
+ *inst++ = MOV_r_rm;
+ *inst++ = MOD_REG | (reg_lmap[dst_r] << 3) | reg_lmap[TMP_REG1];
+#endif
+ }
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, 31, dst_r, 0);
+#else
+ inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, !(op_flags & SLJIT_I32_OP) ? 63 : 31, dst_r, 0);
+#endif
+ FAIL_IF(!inst);
+ *(inst + 1) |= XOR;
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ if (dst & SLJIT_MEM) {
+ inst = emit_x86_instruction(compiler, 1, dst_r, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = XCHG_r_rm;
+ }
+#else
+ if (dst & SLJIT_MEM)
+ EMIT_MOV(compiler, dst, dstw, TMP_REG2, 0);
+#endif
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_u8* inst;
+ sljit_s32 update = 0;
+ sljit_s32 op_flags = GET_ALL_FLAGS(op);
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ sljit_s32 dst_is_ereg = 0;
+ sljit_s32 src_is_ereg = 0;
+#else
+# define src_is_ereg 0
+#endif
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ CHECK_EXTRA_REGS(dst, dstw, dst_is_ereg = 1);
+ CHECK_EXTRA_REGS(src, srcw, src_is_ereg = 1);
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ compiler->mode32 = op_flags & SLJIT_I32_OP;
+#endif
+
+ op = GET_OPCODE(op);
+ if (op >= SLJIT_MOV && op <= SLJIT_MOVU_P) {
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ compiler->mode32 = 0;
+#endif
+
+ if (op_flags & SLJIT_I32_OP) {
+ if (FAST_IS_REG(src) && src == dst) {
+ if (!TYPE_CAST_NEEDED(op))
+ return SLJIT_SUCCESS;
+ }
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (op == SLJIT_MOV_S32 && (src & SLJIT_MEM))
+ op = SLJIT_MOV_U32;
+ if (op == SLJIT_MOVU_S32 && (src & SLJIT_MEM))
+ op = SLJIT_MOVU_U32;
+ if (op == SLJIT_MOV_U32 && (src & SLJIT_IMM))
+ op = SLJIT_MOV_S32;
+ if (op == SLJIT_MOVU_U32 && (src & SLJIT_IMM))
+ op = SLJIT_MOVU_S32;
+#endif
+ }
+
+ SLJIT_COMPILE_ASSERT(SLJIT_MOV + 8 == SLJIT_MOVU, movu_offset);
+ if (op >= SLJIT_MOVU) {
+ update = 1;
+ op -= 8;
+ }
+
+ if (src & SLJIT_IMM) {
+ switch (op) {
+ case SLJIT_MOV_U8:
+ srcw = (sljit_u8)srcw;
+ break;
+ case SLJIT_MOV_S8:
+ srcw = (sljit_s8)srcw;
+ break;
+ case SLJIT_MOV_U16:
+ srcw = (sljit_u16)srcw;
+ break;
+ case SLJIT_MOV_S16:
+ srcw = (sljit_s16)srcw;
+ break;
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ case SLJIT_MOV_U32:
+ srcw = (sljit_u32)srcw;
+ break;
+ case SLJIT_MOV_S32:
+ srcw = (sljit_s32)srcw;
+ break;
+#endif
+ }
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ if (SLJIT_UNLIKELY(dst_is_ereg))
+ return emit_mov(compiler, dst, dstw, src, srcw);
+#endif
+ }
+
+ if (SLJIT_UNLIKELY(update) && (src & SLJIT_MEM) && !src_is_ereg && (src & REG_MASK) && (srcw != 0 || (src & OFFS_REG_MASK) != 0)) {
+ inst = emit_x86_instruction(compiler, 1, src & REG_MASK, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst = LEA_r_m;
+ src &= SLJIT_MEM | 0xf;
+ srcw = 0;
+ }
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ if (SLJIT_UNLIKELY(dst_is_ereg) && (!(op == SLJIT_MOV || op == SLJIT_MOV_U32 || op == SLJIT_MOV_S32 || op == SLJIT_MOV_P) || (src & SLJIT_MEM))) {
+ SLJIT_ASSERT(dst == SLJIT_MEM1(SLJIT_SP));
+ dst = TMP_REG1;
+ }
+#endif
+
+ switch (op) {
+ case SLJIT_MOV:
+ case SLJIT_MOV_P:
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ case SLJIT_MOV_U32:
+ case SLJIT_MOV_S32:
+#endif
+ FAIL_IF(emit_mov(compiler, dst, dstw, src, srcw));
+ break;
+ case SLJIT_MOV_U8:
+ FAIL_IF(emit_mov_byte(compiler, 0, dst, dstw, src, srcw));
+ break;
+ case SLJIT_MOV_S8:
+ FAIL_IF(emit_mov_byte(compiler, 1, dst, dstw, src, srcw));
+ break;
+ case SLJIT_MOV_U16:
+ FAIL_IF(emit_mov_half(compiler, 0, dst, dstw, src, srcw));
+ break;
+ case SLJIT_MOV_S16:
+ FAIL_IF(emit_mov_half(compiler, 1, dst, dstw, src, srcw));
+ break;
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ case SLJIT_MOV_U32:
+ FAIL_IF(emit_mov_int(compiler, 0, dst, dstw, src, srcw));
+ break;
+ case SLJIT_MOV_S32:
+ FAIL_IF(emit_mov_int(compiler, 1, dst, dstw, src, srcw));
+ break;
+#endif
+ }
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ if (SLJIT_UNLIKELY(dst_is_ereg) && dst == TMP_REG1)
+ return emit_mov(compiler, SLJIT_MEM1(SLJIT_SP), dstw, TMP_REG1, 0);
+#endif
+
+ if (SLJIT_UNLIKELY(update) && (dst & SLJIT_MEM) && (dst & REG_MASK) && (dstw != 0 || (dst & OFFS_REG_MASK) != 0)) {
+ inst = emit_x86_instruction(compiler, 1, dst & REG_MASK, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = LEA_r_m;
+ }
+ return SLJIT_SUCCESS;
+ }
+
+ if (SLJIT_UNLIKELY(GET_FLAGS(op_flags)))
+ compiler->flags_saved = 0;
+
+ switch (op) {
+ case SLJIT_NOT:
+ if (SLJIT_UNLIKELY(op_flags & SLJIT_SET_E))
+ return emit_not_with_flags(compiler, dst, dstw, src, srcw);
+ return emit_unary(compiler, NOT_rm, dst, dstw, src, srcw);
+
+ case SLJIT_NEG:
+ if (SLJIT_UNLIKELY(op_flags & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
+ FAIL_IF(emit_save_flags(compiler));
+ return emit_unary(compiler, NEG_rm, dst, dstw, src, srcw);
+
+ case SLJIT_CLZ:
+ if (SLJIT_UNLIKELY(op_flags & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
+ FAIL_IF(emit_save_flags(compiler));
+ return emit_clz(compiler, op_flags, dst, dstw, src, srcw);
+ }
+
+ return SLJIT_SUCCESS;
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+# undef src_is_ereg
+#endif
+}
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+
+#define BINARY_IMM(op_imm, op_mr, immw, arg, argw) \
+ if (IS_HALFWORD(immw) || compiler->mode32) { \
+ inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \
+ FAIL_IF(!inst); \
+ *(inst + 1) |= (op_imm); \
+ } \
+ else { \
+ FAIL_IF(emit_load_imm64(compiler, TMP_REG2, immw)); \
+ inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, arg, argw); \
+ FAIL_IF(!inst); \
+ *inst = (op_mr); \
+ }
+
+#define BINARY_EAX_IMM(op_eax_imm, immw) \
+ FAIL_IF(emit_do_imm32(compiler, (!compiler->mode32) ? REX_W : 0, (op_eax_imm), immw))
+
+#else
+
+#define BINARY_IMM(op_imm, op_mr, immw, arg, argw) \
+ inst = emit_x86_instruction(compiler, 1 | EX86_BIN_INS, SLJIT_IMM, immw, arg, argw); \
+ FAIL_IF(!inst); \
+ *(inst + 1) |= (op_imm);
+
+#define BINARY_EAX_IMM(op_eax_imm, immw) \
+ FAIL_IF(emit_do_imm(compiler, (op_eax_imm), immw))
+
+#endif
+
+static sljit_s32 emit_cum_binary(struct sljit_compiler *compiler,
+ sljit_u8 op_rm, sljit_u8 op_mr, sljit_u8 op_imm, sljit_u8 op_eax_imm,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_u8* inst;
+
+ if (dst == SLJIT_UNUSED) {
+ EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
+ if (src2 & SLJIT_IMM) {
+ BINARY_IMM(op_imm, op_mr, src2w, TMP_REG1, 0);
+ }
+ else {
+ inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = op_rm;
+ }
+ return SLJIT_SUCCESS;
+ }
+
+ if (dst == src1 && dstw == src1w) {
+ if (src2 & SLJIT_IMM) {
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if ((dst == SLJIT_R0) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))) {
+#else
+ if ((dst == SLJIT_R0) && (src2w > 127 || src2w < -128)) {
+#endif
+ BINARY_EAX_IMM(op_eax_imm, src2w);
+ }
+ else {
+ BINARY_IMM(op_imm, op_mr, src2w, dst, dstw);
+ }
+ }
+ else if (FAST_IS_REG(dst)) {
+ inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = op_rm;
+ }
+ else if (FAST_IS_REG(src2)) {
+ /* Special exception for sljit_emit_op_flags. */
+ inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = op_mr;
+ }
+ else {
+ EMIT_MOV(compiler, TMP_REG1, 0, src2, src2w);
+ inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = op_mr;
+ }
+ return SLJIT_SUCCESS;
+ }
+
+ /* Only for cumulative operations. */
+ if (dst == src2 && dstw == src2w) {
+ if (src1 & SLJIT_IMM) {
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if ((dst == SLJIT_R0) && (src1w > 127 || src1w < -128) && (compiler->mode32 || IS_HALFWORD(src1w))) {
+#else
+ if ((dst == SLJIT_R0) && (src1w > 127 || src1w < -128)) {
+#endif
+ BINARY_EAX_IMM(op_eax_imm, src1w);
+ }
+ else {
+ BINARY_IMM(op_imm, op_mr, src1w, dst, dstw);
+ }
+ }
+ else if (FAST_IS_REG(dst)) {
+ inst = emit_x86_instruction(compiler, 1, dst, dstw, src1, src1w);
+ FAIL_IF(!inst);
+ *inst = op_rm;
+ }
+ else if (FAST_IS_REG(src1)) {
+ inst = emit_x86_instruction(compiler, 1, src1, src1w, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = op_mr;
+ }
+ else {
+ EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
+ inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = op_mr;
+ }
+ return SLJIT_SUCCESS;
+ }
+
+ /* General version. */
+ if (FAST_IS_REG(dst)) {
+ EMIT_MOV(compiler, dst, 0, src1, src1w);
+ if (src2 & SLJIT_IMM) {
+ BINARY_IMM(op_imm, op_mr, src2w, dst, 0);
+ }
+ else {
+ inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = op_rm;
+ }
+ }
+ else {
+ /* This version requires less memory writing. */
+ EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
+ if (src2 & SLJIT_IMM) {
+ BINARY_IMM(op_imm, op_mr, src2w, TMP_REG1, 0);
+ }
+ else {
+ inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = op_rm;
+ }
+ EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 emit_non_cum_binary(struct sljit_compiler *compiler,
+ sljit_u8 op_rm, sljit_u8 op_mr, sljit_u8 op_imm, sljit_u8 op_eax_imm,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_u8* inst;
+
+ if (dst == SLJIT_UNUSED) {
+ EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
+ if (src2 & SLJIT_IMM) {
+ BINARY_IMM(op_imm, op_mr, src2w, TMP_REG1, 0);
+ }
+ else {
+ inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = op_rm;
+ }
+ return SLJIT_SUCCESS;
+ }
+
+ if (dst == src1 && dstw == src1w) {
+ if (src2 & SLJIT_IMM) {
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if ((dst == SLJIT_R0) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))) {
+#else
+ if ((dst == SLJIT_R0) && (src2w > 127 || src2w < -128)) {
+#endif
+ BINARY_EAX_IMM(op_eax_imm, src2w);
+ }
+ else {
+ BINARY_IMM(op_imm, op_mr, src2w, dst, dstw);
+ }
+ }
+ else if (FAST_IS_REG(dst)) {
+ inst = emit_x86_instruction(compiler, 1, dst, dstw, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = op_rm;
+ }
+ else if (FAST_IS_REG(src2)) {
+ inst = emit_x86_instruction(compiler, 1, src2, src2w, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = op_mr;
+ }
+ else {
+ EMIT_MOV(compiler, TMP_REG1, 0, src2, src2w);
+ inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, dst, dstw);
+ FAIL_IF(!inst);
+ *inst = op_mr;
+ }
+ return SLJIT_SUCCESS;
+ }
+
+ /* General version. */
+ if (FAST_IS_REG(dst) && dst != src2) {
+ EMIT_MOV(compiler, dst, 0, src1, src1w);
+ if (src2 & SLJIT_IMM) {
+ BINARY_IMM(op_imm, op_mr, src2w, dst, 0);
+ }
+ else {
+ inst = emit_x86_instruction(compiler, 1, dst, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = op_rm;
+ }
+ }
+ else {
+ /* This version requires less memory writing. */
+ EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
+ if (src2 & SLJIT_IMM) {
+ BINARY_IMM(op_imm, op_mr, src2w, TMP_REG1, 0);
+ }
+ else {
+ inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = op_rm;
+ }
+ EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 emit_mul(struct sljit_compiler *compiler,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_u8* inst;
+ sljit_s32 dst_r;
+
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
+
+ /* Register destination. */
+ if (dst_r == src1 && !(src2 & SLJIT_IMM)) {
+ inst = emit_x86_instruction(compiler, 2, dst_r, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = IMUL_r_rm;
+ }
+ else if (dst_r == src2 && !(src1 & SLJIT_IMM)) {
+ inst = emit_x86_instruction(compiler, 2, dst_r, 0, src1, src1w);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = IMUL_r_rm;
+ }
+ else if (src1 & SLJIT_IMM) {
+ if (src2 & SLJIT_IMM) {
+ EMIT_MOV(compiler, dst_r, 0, SLJIT_IMM, src2w);
+ src2 = dst_r;
+ src2w = 0;
+ }
+
+ if (src1w <= 127 && src1w >= -128) {
+ inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = IMUL_r_rm_i8;
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
+ FAIL_IF(!inst);
+ INC_SIZE(1);
+ *inst = (sljit_s8)src1w;
+ }
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ else {
+ inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = IMUL_r_rm_i32;
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 4);
+ FAIL_IF(!inst);
+ INC_SIZE(4);
+ sljit_unaligned_store_sw(inst, src1w);
+ }
+#else
+ else if (IS_HALFWORD(src1w)) {
+ inst = emit_x86_instruction(compiler, 1, dst_r, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = IMUL_r_rm_i32;
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 4);
+ FAIL_IF(!inst);
+ INC_SIZE(4);
+ sljit_unaligned_store_s32(inst, (sljit_s32)src1w);
+ }
+ else {
+ EMIT_MOV(compiler, TMP_REG2, 0, SLJIT_IMM, src1w);
+ if (dst_r != src2)
+ EMIT_MOV(compiler, dst_r, 0, src2, src2w);
+ inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = IMUL_r_rm;
+ }
+#endif
+ }
+ else if (src2 & SLJIT_IMM) {
+ /* Note: src1 is NOT immediate. */
+
+ if (src2w <= 127 && src2w >= -128) {
+ inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
+ FAIL_IF(!inst);
+ *inst = IMUL_r_rm_i8;
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1);
+ FAIL_IF(!inst);
+ INC_SIZE(1);
+ *inst = (sljit_s8)src2w;
+ }
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ else {
+ inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
+ FAIL_IF(!inst);
+ *inst = IMUL_r_rm_i32;
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 4);
+ FAIL_IF(!inst);
+ INC_SIZE(4);
+ sljit_unaligned_store_sw(inst, src2w);
+ }
+#else
+ else if (IS_HALFWORD(src2w)) {
+ inst = emit_x86_instruction(compiler, 1, dst_r, 0, src1, src1w);
+ FAIL_IF(!inst);
+ *inst = IMUL_r_rm_i32;
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 4);
+ FAIL_IF(!inst);
+ INC_SIZE(4);
+ sljit_unaligned_store_s32(inst, (sljit_s32)src2w);
+ }
+ else {
+ EMIT_MOV(compiler, TMP_REG2, 0, SLJIT_IMM, src2w);
+ if (dst_r != src1)
+ EMIT_MOV(compiler, dst_r, 0, src1, src1w);
+ inst = emit_x86_instruction(compiler, 2, dst_r, 0, TMP_REG2, 0);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = IMUL_r_rm;
+ }
+#endif
+ }
+ else {
+ /* Neither argument is immediate. */
+ if (ADDRESSING_DEPENDS_ON(src2, dst_r))
+ dst_r = TMP_REG1;
+ EMIT_MOV(compiler, dst_r, 0, src1, src1w);
+ inst = emit_x86_instruction(compiler, 2, dst_r, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = IMUL_r_rm;
+ }
+
+ if (dst_r == TMP_REG1)
+ EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
+
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 emit_lea_binary(struct sljit_compiler *compiler, sljit_s32 keep_flags,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_u8* inst;
+ sljit_s32 dst_r, done = 0;
+
+ /* These cases better be left to handled by normal way. */
+ if (!keep_flags) {
+ if (dst == src1 && dstw == src1w)
+ return SLJIT_ERR_UNSUPPORTED;
+ if (dst == src2 && dstw == src2w)
+ return SLJIT_ERR_UNSUPPORTED;
+ }
+
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
+
+ if (FAST_IS_REG(src1)) {
+ if (FAST_IS_REG(src2)) {
+ inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM2(src1, src2), 0);
+ FAIL_IF(!inst);
+ *inst = LEA_r_m;
+ done = 1;
+ }
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if ((src2 & SLJIT_IMM) && (compiler->mode32 || IS_HALFWORD(src2w))) {
+ inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src1), (sljit_s32)src2w);
+#else
+ if (src2 & SLJIT_IMM) {
+ inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src1), src2w);
+#endif
+ FAIL_IF(!inst);
+ *inst = LEA_r_m;
+ done = 1;
+ }
+ }
+ else if (FAST_IS_REG(src2)) {
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if ((src1 & SLJIT_IMM) && (compiler->mode32 || IS_HALFWORD(src1w))) {
+ inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src2), (sljit_s32)src1w);
+#else
+ if (src1 & SLJIT_IMM) {
+ inst = emit_x86_instruction(compiler, 1, dst_r, 0, SLJIT_MEM1(src2), src1w);
+#endif
+ FAIL_IF(!inst);
+ *inst = LEA_r_m;
+ done = 1;
+ }
+ }
+
+ if (done) {
+ if (dst_r == TMP_REG1)
+ return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
+ return SLJIT_SUCCESS;
+ }
+ return SLJIT_ERR_UNSUPPORTED;
+}
+
+static sljit_s32 emit_cmp_binary(struct sljit_compiler *compiler,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_u8* inst;
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (src1 == SLJIT_R0 && (src2 & SLJIT_IMM) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))) {
+#else
+ if (src1 == SLJIT_R0 && (src2 & SLJIT_IMM) && (src2w > 127 || src2w < -128)) {
+#endif
+ BINARY_EAX_IMM(CMP_EAX_i32, src2w);
+ return SLJIT_SUCCESS;
+ }
+
+ if (FAST_IS_REG(src1)) {
+ if (src2 & SLJIT_IMM) {
+ BINARY_IMM(CMP, CMP_rm_r, src2w, src1, 0);
+ }
+ else {
+ inst = emit_x86_instruction(compiler, 1, src1, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = CMP_r_rm;
+ }
+ return SLJIT_SUCCESS;
+ }
+
+ if (FAST_IS_REG(src2) && !(src1 & SLJIT_IMM)) {
+ inst = emit_x86_instruction(compiler, 1, src2, 0, src1, src1w);
+ FAIL_IF(!inst);
+ *inst = CMP_rm_r;
+ return SLJIT_SUCCESS;
+ }
+
+ if (src2 & SLJIT_IMM) {
+ if (src1 & SLJIT_IMM) {
+ EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
+ src1 = TMP_REG1;
+ src1w = 0;
+ }
+ BINARY_IMM(CMP, CMP_rm_r, src2w, src1, src1w);
+ }
+ else {
+ EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
+ inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = CMP_r_rm;
+ }
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 emit_test_binary(struct sljit_compiler *compiler,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_u8* inst;
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (src1 == SLJIT_R0 && (src2 & SLJIT_IMM) && (src2w > 127 || src2w < -128) && (compiler->mode32 || IS_HALFWORD(src2w))) {
+#else
+ if (src1 == SLJIT_R0 && (src2 & SLJIT_IMM) && (src2w > 127 || src2w < -128)) {
+#endif
+ BINARY_EAX_IMM(TEST_EAX_i32, src2w);
+ return SLJIT_SUCCESS;
+ }
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (src2 == SLJIT_R0 && (src2 & SLJIT_IMM) && (src1w > 127 || src1w < -128) && (compiler->mode32 || IS_HALFWORD(src1w))) {
+#else
+ if (src2 == SLJIT_R0 && (src1 & SLJIT_IMM) && (src1w > 127 || src1w < -128)) {
+#endif
+ BINARY_EAX_IMM(TEST_EAX_i32, src1w);
+ return SLJIT_SUCCESS;
+ }
+
+ if (!(src1 & SLJIT_IMM)) {
+ if (src2 & SLJIT_IMM) {
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (IS_HALFWORD(src2w) || compiler->mode32) {
+ inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, src1w);
+ FAIL_IF(!inst);
+ *inst = GROUP_F7;
+ }
+ else {
+ FAIL_IF(emit_load_imm64(compiler, TMP_REG2, src2w));
+ inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src1, src1w);
+ FAIL_IF(!inst);
+ *inst = TEST_rm_r;
+ }
+#else
+ inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, src1, src1w);
+ FAIL_IF(!inst);
+ *inst = GROUP_F7;
+#endif
+ return SLJIT_SUCCESS;
+ }
+ else if (FAST_IS_REG(src1)) {
+ inst = emit_x86_instruction(compiler, 1, src1, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = TEST_rm_r;
+ return SLJIT_SUCCESS;
+ }
+ }
+
+ if (!(src2 & SLJIT_IMM)) {
+ if (src1 & SLJIT_IMM) {
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (IS_HALFWORD(src1w) || compiler->mode32) {
+ inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src1w, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = GROUP_F7;
+ }
+ else {
+ FAIL_IF(emit_load_imm64(compiler, TMP_REG2, src1w));
+ inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = TEST_rm_r;
+ }
+#else
+ inst = emit_x86_instruction(compiler, 1, src1, src1w, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = GROUP_F7;
+#endif
+ return SLJIT_SUCCESS;
+ }
+ else if (FAST_IS_REG(src2)) {
+ inst = emit_x86_instruction(compiler, 1, src2, 0, src1, src1w);
+ FAIL_IF(!inst);
+ *inst = TEST_rm_r;
+ return SLJIT_SUCCESS;
+ }
+ }
+
+ EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
+ if (src2 & SLJIT_IMM) {
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (IS_HALFWORD(src2w) || compiler->mode32) {
+ inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst = GROUP_F7;
+ }
+ else {
+ FAIL_IF(emit_load_imm64(compiler, TMP_REG2, src2w));
+ inst = emit_x86_instruction(compiler, 1, TMP_REG2, 0, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst = TEST_rm_r;
+ }
+#else
+ inst = emit_x86_instruction(compiler, 1, SLJIT_IMM, src2w, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst = GROUP_F7;
+#endif
+ }
+ else {
+ inst = emit_x86_instruction(compiler, 1, TMP_REG1, 0, src2, src2w);
+ FAIL_IF(!inst);
+ *inst = TEST_rm_r;
+ }
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 emit_shift(struct sljit_compiler *compiler,
+ sljit_u8 mode,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_u8* inst;
+
+ if ((src2 & SLJIT_IMM) || (src2 == SLJIT_PREF_SHIFT_REG)) {
+ if (dst == src1 && dstw == src1w) {
+ inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, dstw);
+ FAIL_IF(!inst);
+ *inst |= mode;
+ return SLJIT_SUCCESS;
+ }
+ if (dst == SLJIT_UNUSED) {
+ EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
+ inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst |= mode;
+ return SLJIT_SUCCESS;
+ }
+ if (dst == SLJIT_PREF_SHIFT_REG && src2 == SLJIT_PREF_SHIFT_REG) {
+ EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
+ inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst |= mode;
+ EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
+ return SLJIT_SUCCESS;
+ }
+ if (FAST_IS_REG(dst)) {
+ EMIT_MOV(compiler, dst, 0, src1, src1w);
+ inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, dst, 0);
+ FAIL_IF(!inst);
+ *inst |= mode;
+ return SLJIT_SUCCESS;
+ }
+
+ EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
+ inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, src2, src2w, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst |= mode;
+ EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
+ return SLJIT_SUCCESS;
+ }
+
+ if (dst == SLJIT_PREF_SHIFT_REG) {
+ EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
+ EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, src2, src2w);
+ inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst |= mode;
+ EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
+ }
+ else if (FAST_IS_REG(dst) && dst != src2 && !ADDRESSING_DEPENDS_ON(src2, dst)) {
+ if (src1 != dst)
+ EMIT_MOV(compiler, dst, 0, src1, src1w);
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_PREF_SHIFT_REG, 0);
+ EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, src2, src2w);
+ inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, dst, 0);
+ FAIL_IF(!inst);
+ *inst |= mode;
+ EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
+ }
+ else {
+ /* This case is really difficult, since ecx itself may used for
+ addressing, and we must ensure to work even in that case. */
+ EMIT_MOV(compiler, TMP_REG1, 0, src1, src1w);
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ EMIT_MOV(compiler, TMP_REG2, 0, SLJIT_PREF_SHIFT_REG, 0);
+#else
+ /* [esp+0] contains the flags. */
+ EMIT_MOV(compiler, SLJIT_MEM1(SLJIT_SP), sizeof(sljit_sw), SLJIT_PREF_SHIFT_REG, 0);
+#endif
+ EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, src2, src2w);
+ inst = emit_x86_instruction(compiler, 1 | EX86_SHIFT_INS, SLJIT_PREF_SHIFT_REG, 0, TMP_REG1, 0);
+ FAIL_IF(!inst);
+ *inst |= mode;
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, TMP_REG2, 0);
+#else
+ EMIT_MOV(compiler, SLJIT_PREF_SHIFT_REG, 0, SLJIT_MEM1(SLJIT_SP), sizeof(sljit_sw));
+#endif
+ EMIT_MOV(compiler, dst, dstw, TMP_REG1, 0);
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 emit_shift_with_flags(struct sljit_compiler *compiler,
+ sljit_u8 mode, sljit_s32 set_flags,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ /* The CPU does not set flags if the shift count is 0. */
+ if (src2 & SLJIT_IMM) {
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if ((src2w & 0x3f) != 0 || (compiler->mode32 && (src2w & 0x1f) != 0))
+ return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
+#else
+ if ((src2w & 0x1f) != 0)
+ return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
+#endif
+ if (!set_flags)
+ return emit_mov(compiler, dst, dstw, src1, src1w);
+ /* OR dst, src, 0 */
+ return emit_cum_binary(compiler, OR_r_rm, OR_rm_r, OR, OR_EAX_i32,
+ dst, dstw, src1, src1w, SLJIT_IMM, 0);
+ }
+
+ if (!set_flags)
+ return emit_shift(compiler, mode, dst, dstw, src1, src1w, src2, src2w);
+
+ if (!FAST_IS_REG(dst))
+ FAIL_IF(emit_cmp_binary(compiler, src1, src1w, SLJIT_IMM, 0));
+
+ FAIL_IF(emit_shift(compiler,mode, dst, dstw, src1, src1w, src2, src2w));
+
+ if (FAST_IS_REG(dst))
+ return emit_cmp_binary(compiler, dst, dstw, SLJIT_IMM, 0);
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+ CHECK_EXTRA_REGS(dst, dstw, (void)0);
+ CHECK_EXTRA_REGS(src1, src1w, (void)0);
+ CHECK_EXTRA_REGS(src2, src2w, (void)0);
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ compiler->mode32 = op & SLJIT_I32_OP;
+#endif
+
+ if (GET_OPCODE(op) >= SLJIT_MUL) {
+ if (SLJIT_UNLIKELY(GET_FLAGS(op)))
+ compiler->flags_saved = 0;
+ else if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
+ FAIL_IF(emit_save_flags(compiler));
+ }
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_ADD:
+ if (!GET_FLAGS(op)) {
+ if (emit_lea_binary(compiler, op & SLJIT_KEEP_FLAGS, dst, dstw, src1, src1w, src2, src2w) != SLJIT_ERR_UNSUPPORTED)
+ return compiler->error;
+ }
+ else
+ compiler->flags_saved = 0;
+ if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
+ FAIL_IF(emit_save_flags(compiler));
+ return emit_cum_binary(compiler, ADD_r_rm, ADD_rm_r, ADD, ADD_EAX_i32,
+ dst, dstw, src1, src1w, src2, src2w);
+ case SLJIT_ADDC:
+ if (SLJIT_UNLIKELY(compiler->flags_saved)) /* C flag must be restored. */
+ FAIL_IF(emit_restore_flags(compiler, 1));
+ else if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS))
+ FAIL_IF(emit_save_flags(compiler));
+ if (SLJIT_UNLIKELY(GET_FLAGS(op)))
+ compiler->flags_saved = 0;
+ return emit_cum_binary(compiler, ADC_r_rm, ADC_rm_r, ADC, ADC_EAX_i32,
+ dst, dstw, src1, src1w, src2, src2w);
+ case SLJIT_SUB:
+ if (!GET_FLAGS(op)) {
+ if ((src2 & SLJIT_IMM) && emit_lea_binary(compiler, op & SLJIT_KEEP_FLAGS, dst, dstw, src1, src1w, SLJIT_IMM, -src2w) != SLJIT_ERR_UNSUPPORTED)
+ return compiler->error;
+ }
+ else
+ compiler->flags_saved = 0;
+ if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS) && !compiler->flags_saved)
+ FAIL_IF(emit_save_flags(compiler));
+ if (dst == SLJIT_UNUSED)
+ return emit_cmp_binary(compiler, src1, src1w, src2, src2w);
+ return emit_non_cum_binary(compiler, SUB_r_rm, SUB_rm_r, SUB, SUB_EAX_i32,
+ dst, dstw, src1, src1w, src2, src2w);
+ case SLJIT_SUBC:
+ if (SLJIT_UNLIKELY(compiler->flags_saved)) /* C flag must be restored. */
+ FAIL_IF(emit_restore_flags(compiler, 1));
+ else if (SLJIT_UNLIKELY(op & SLJIT_KEEP_FLAGS))
+ FAIL_IF(emit_save_flags(compiler));
+ if (SLJIT_UNLIKELY(GET_FLAGS(op)))
+ compiler->flags_saved = 0;
+ return emit_non_cum_binary(compiler, SBB_r_rm, SBB_rm_r, SBB, SBB_EAX_i32,
+ dst, dstw, src1, src1w, src2, src2w);
+ case SLJIT_MUL:
+ return emit_mul(compiler, dst, dstw, src1, src1w, src2, src2w);
+ case SLJIT_AND:
+ if (dst == SLJIT_UNUSED)
+ return emit_test_binary(compiler, src1, src1w, src2, src2w);
+ return emit_cum_binary(compiler, AND_r_rm, AND_rm_r, AND, AND_EAX_i32,
+ dst, dstw, src1, src1w, src2, src2w);
+ case SLJIT_OR:
+ return emit_cum_binary(compiler, OR_r_rm, OR_rm_r, OR, OR_EAX_i32,
+ dst, dstw, src1, src1w, src2, src2w);
+ case SLJIT_XOR:
+ return emit_cum_binary(compiler, XOR_r_rm, XOR_rm_r, XOR, XOR_EAX_i32,
+ dst, dstw, src1, src1w, src2, src2w);
+ case SLJIT_SHL:
+ return emit_shift_with_flags(compiler, SHL, GET_FLAGS(op),
+ dst, dstw, src1, src1w, src2, src2w);
+ case SLJIT_LSHR:
+ return emit_shift_with_flags(compiler, SHR, GET_FLAGS(op),
+ dst, dstw, src1, src1w, src2, src2w);
+ case SLJIT_ASHR:
+ return emit_shift_with_flags(compiler, SAR, GET_FLAGS(op),
+ dst, dstw, src1, src1w, src2, src2w);
+ }
+
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_register_index(sljit_s32 reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_register_index(reg));
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ if (reg >= SLJIT_R3 && reg <= SLJIT_R6)
+ return -1;
+#endif
+ return reg_map[reg];
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_float_register_index(sljit_s32 reg)
+{
+ CHECK_REG_INDEX(check_sljit_get_float_register_index(reg));
+ return reg;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_custom(struct sljit_compiler *compiler,
+ void *instruction, sljit_s32 size)
+{
+ sljit_u8 *inst;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_custom(compiler, instruction, size));
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + size);
+ FAIL_IF(!inst);
+ INC_SIZE(size);
+ SLJIT_MEMCPY(inst, instruction, size);
+ return SLJIT_SUCCESS;
+}
+
+/* --------------------------------------------------------------------- */
+/* Floating point operators */
+/* --------------------------------------------------------------------- */
+
+/* Alignment + 2 * 16 bytes. */
+static sljit_s32 sse2_data[3 + (4 + 4) * 2];
+static sljit_s32 *sse2_buffer;
+
+static void init_compiler(void)
+{
+ sse2_buffer = (sljit_s32*)(((sljit_uw)sse2_data + 15) & ~0xf);
+ /* Single precision constants. */
+ sse2_buffer[0] = 0x80000000;
+ sse2_buffer[4] = 0x7fffffff;
+ /* Double precision constants. */
+ sse2_buffer[8] = 0;
+ sse2_buffer[9] = 0x80000000;
+ sse2_buffer[12] = 0xffffffff;
+ sse2_buffer[13] = 0x7fffffff;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_is_fpu_available(void)
+{
+#ifdef SLJIT_IS_FPU_AVAILABLE
+ return SLJIT_IS_FPU_AVAILABLE;
+#elif (defined SLJIT_DETECT_SSE2 && SLJIT_DETECT_SSE2)
+ if (cpu_has_sse2 == -1)
+ get_cpu_features();
+ return cpu_has_sse2;
+#else /* SLJIT_DETECT_SSE2 */
+ return 1;
+#endif /* SLJIT_DETECT_SSE2 */
+}
+
+static sljit_s32 emit_sse2(struct sljit_compiler *compiler, sljit_u8 opcode,
+ sljit_s32 single, sljit_s32 xmm1, sljit_s32 xmm2, sljit_sw xmm2w)
+{
+ sljit_u8 *inst;
+
+ inst = emit_x86_instruction(compiler, 2 | (single ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_SSE2, xmm1, 0, xmm2, xmm2w);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = opcode;
+ return SLJIT_SUCCESS;
+}
+
+static sljit_s32 emit_sse2_logic(struct sljit_compiler *compiler, sljit_u8 opcode,
+ sljit_s32 pref66, sljit_s32 xmm1, sljit_s32 xmm2, sljit_sw xmm2w)
+{
+ sljit_u8 *inst;
+
+ inst = emit_x86_instruction(compiler, 2 | (pref66 ? EX86_PREF_66 : 0) | EX86_SSE2, xmm1, 0, xmm2, xmm2w);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = opcode;
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 emit_sse2_load(struct sljit_compiler *compiler,
+ sljit_s32 single, sljit_s32 dst, sljit_s32 src, sljit_sw srcw)
+{
+ return emit_sse2(compiler, MOVSD_x_xm, single, dst, src, srcw);
+}
+
+static SLJIT_INLINE sljit_s32 emit_sse2_store(struct sljit_compiler *compiler,
+ sljit_s32 single, sljit_s32 dst, sljit_sw dstw, sljit_s32 src)
+{
+ return emit_sse2(compiler, MOVSD_xm_x, single, src, dst, dstw);
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_sw_from_f64(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r = SLOW_IS_REG(dst) ? dst : TMP_REG1;
+ sljit_u8 *inst;
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (GET_OPCODE(op) == SLJIT_CONV_SW_FROM_F64)
+ compiler->mode32 = 0;
+#endif
+
+ inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_F32_OP) ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_SSE2_OP2, dst_r, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = CVTTSD2SI_r_xm;
+
+ if (dst_r == TMP_REG1 && dst != SLJIT_UNUSED)
+ return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_conv_f64_from_sw(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG;
+ sljit_u8 *inst;
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_SW)
+ compiler->mode32 = 0;
+#endif
+
+ if (src & SLJIT_IMM) {
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_S32)
+ srcw = (sljit_s32)srcw;
+#endif
+ EMIT_MOV(compiler, TMP_REG1, 0, src, srcw);
+ src = TMP_REG1;
+ srcw = 0;
+ }
+
+ inst = emit_x86_instruction(compiler, 2 | ((op & SLJIT_F32_OP) ? EX86_PREF_F3 : EX86_PREF_F2) | EX86_SSE2_OP1, dst_r, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = CVTSI2SD_x_rm;
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ compiler->mode32 = 1;
+#endif
+ if (dst_r == TMP_FREG)
+ return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, TMP_FREG);
+ return SLJIT_SUCCESS;
+}
+
+static SLJIT_INLINE sljit_s32 sljit_emit_fop1_cmp(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ compiler->flags_saved = 0;
+ if (!FAST_IS_REG(src1)) {
+ FAIL_IF(emit_sse2_load(compiler, op & SLJIT_F32_OP, TMP_FREG, src1, src1w));
+ src1 = TMP_FREG;
+ }
+ return emit_sse2_logic(compiler, UCOMISD_x_xm, !(op & SLJIT_F32_OP), src1, src2, src2w);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop1(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_s32 dst_r;
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ compiler->mode32 = 1;
+#endif
+
+ CHECK_ERROR();
+ SELECT_FOP1_OPERATION_WITH_CHECKS(compiler, op, dst, dstw, src, srcw);
+
+ if (GET_OPCODE(op) == SLJIT_MOV_F64) {
+ if (FAST_IS_REG(dst))
+ return emit_sse2_load(compiler, op & SLJIT_F32_OP, dst, src, srcw);
+ if (FAST_IS_REG(src))
+ return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, src);
+ FAIL_IF(emit_sse2_load(compiler, op & SLJIT_F32_OP, TMP_FREG, src, srcw));
+ return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, TMP_FREG);
+ }
+
+ if (GET_OPCODE(op) == SLJIT_CONV_F64_FROM_F32) {
+ dst_r = FAST_IS_REG(dst) ? dst : TMP_FREG;
+ if (FAST_IS_REG(src)) {
+ /* We overwrite the high bits of source. From SLJIT point of view,
+ this is not an issue.
+ Note: In SSE3, we could also use MOVDDUP and MOVSLDUP. */
+ FAIL_IF(emit_sse2_logic(compiler, UNPCKLPD_x_xm, op & SLJIT_F32_OP, src, src, 0));
+ }
+ else {
+ FAIL_IF(emit_sse2_load(compiler, !(op & SLJIT_F32_OP), TMP_FREG, src, srcw));
+ src = TMP_FREG;
+ }
+
+ FAIL_IF(emit_sse2_logic(compiler, CVTPD2PS_x_xm, op & SLJIT_F32_OP, dst_r, src, 0));
+ if (dst_r == TMP_FREG)
+ return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, TMP_FREG);
+ return SLJIT_SUCCESS;
+ }
+
+ if (SLOW_IS_REG(dst)) {
+ dst_r = dst;
+ if (dst != src)
+ FAIL_IF(emit_sse2_load(compiler, op & SLJIT_F32_OP, dst_r, src, srcw));
+ }
+ else {
+ dst_r = TMP_FREG;
+ FAIL_IF(emit_sse2_load(compiler, op & SLJIT_F32_OP, dst_r, src, srcw));
+ }
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_NEG_F64:
+ FAIL_IF(emit_sse2_logic(compiler, XORPD_x_xm, 1, dst_r, SLJIT_MEM0(), (sljit_sw)(op & SLJIT_F32_OP ? sse2_buffer : sse2_buffer + 8)));
+ break;
+
+ case SLJIT_ABS_F64:
+ FAIL_IF(emit_sse2_logic(compiler, ANDPD_x_xm, 1, dst_r, SLJIT_MEM0(), (sljit_sw)(op & SLJIT_F32_OP ? sse2_buffer + 4 : sse2_buffer + 12)));
+ break;
+ }
+
+ if (dst_r == TMP_FREG)
+ return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, TMP_FREG);
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_fop2(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src1, sljit_sw src1w,
+ sljit_s32 src2, sljit_sw src2w)
+{
+ sljit_s32 dst_r;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_fop2(compiler, op, dst, dstw, src1, src1w, src2, src2w));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ ADJUST_LOCAL_OFFSET(src1, src1w);
+ ADJUST_LOCAL_OFFSET(src2, src2w);
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ compiler->mode32 = 1;
+#endif
+
+ if (FAST_IS_REG(dst)) {
+ dst_r = dst;
+ if (dst == src1)
+ ; /* Do nothing here. */
+ else if (dst == src2 && (op == SLJIT_ADD_F64 || op == SLJIT_MUL_F64)) {
+ /* Swap arguments. */
+ src2 = src1;
+ src2w = src1w;
+ }
+ else if (dst != src2)
+ FAIL_IF(emit_sse2_load(compiler, op & SLJIT_F32_OP, dst_r, src1, src1w));
+ else {
+ dst_r = TMP_FREG;
+ FAIL_IF(emit_sse2_load(compiler, op & SLJIT_F32_OP, TMP_FREG, src1, src1w));
+ }
+ }
+ else {
+ dst_r = TMP_FREG;
+ FAIL_IF(emit_sse2_load(compiler, op & SLJIT_F32_OP, TMP_FREG, src1, src1w));
+ }
+
+ switch (GET_OPCODE(op)) {
+ case SLJIT_ADD_F64:
+ FAIL_IF(emit_sse2(compiler, ADDSD_x_xm, op & SLJIT_F32_OP, dst_r, src2, src2w));
+ break;
+
+ case SLJIT_SUB_F64:
+ FAIL_IF(emit_sse2(compiler, SUBSD_x_xm, op & SLJIT_F32_OP, dst_r, src2, src2w));
+ break;
+
+ case SLJIT_MUL_F64:
+ FAIL_IF(emit_sse2(compiler, MULSD_x_xm, op & SLJIT_F32_OP, dst_r, src2, src2w));
+ break;
+
+ case SLJIT_DIV_F64:
+ FAIL_IF(emit_sse2(compiler, DIVSD_x_xm, op & SLJIT_F32_OP, dst_r, src2, src2w));
+ break;
+ }
+
+ if (dst_r == TMP_FREG)
+ return emit_sse2_store(compiler, op & SLJIT_F32_OP, dst, dstw, TMP_FREG);
+ return SLJIT_SUCCESS;
+}
+
+/* --------------------------------------------------------------------- */
+/* Conditional instructions */
+/* --------------------------------------------------------------------- */
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
+{
+ sljit_u8 *inst;
+ struct sljit_label *label;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_label(compiler));
+
+ /* We should restore the flags before the label,
+ since other taken jumps has their own flags as well. */
+ if (SLJIT_UNLIKELY(compiler->flags_saved))
+ PTR_FAIL_IF(emit_restore_flags(compiler, 0));
+
+ if (compiler->last_label && compiler->last_label->size == compiler->size)
+ return compiler->last_label;
+
+ label = (struct sljit_label*)ensure_abuf(compiler, sizeof(struct sljit_label));
+ PTR_FAIL_IF(!label);
+ set_label(label, compiler);
+
+ inst = (sljit_u8*)ensure_buf(compiler, 2);
+ PTR_FAIL_IF(!inst);
+
+ *inst++ = 0;
+ *inst++ = 0;
+
+ return label;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, sljit_s32 type)
+{
+ sljit_u8 *inst;
+ struct sljit_jump *jump;
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_jump(compiler, type));
+
+ if (SLJIT_UNLIKELY(compiler->flags_saved)) {
+ if ((type & 0xff) <= SLJIT_JUMP)
+ PTR_FAIL_IF(emit_restore_flags(compiler, 0));
+ compiler->flags_saved = 0;
+ }
+
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ PTR_FAIL_IF_NULL(jump);
+ set_jump(jump, compiler, type & SLJIT_REWRITABLE_JUMP);
+ type &= 0xff;
+
+ if (type >= SLJIT_CALL1)
+ PTR_FAIL_IF(call_with_args(compiler, type));
+
+ /* Worst case size. */
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ compiler->size += (type >= SLJIT_JUMP) ? 5 : 6;
+#else
+ compiler->size += (type >= SLJIT_JUMP) ? (10 + 3) : (2 + 10 + 3);
+#endif
+
+ inst = (sljit_u8*)ensure_buf(compiler, 2);
+ PTR_FAIL_IF_NULL(inst);
+
+ *inst++ = 0;
+ *inst++ = type + 2;
+ return jump;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_ijump(struct sljit_compiler *compiler, sljit_s32 type, sljit_s32 src, sljit_sw srcw)
+{
+ sljit_u8 *inst;
+ struct sljit_jump *jump;
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_ijump(compiler, type, src, srcw));
+ ADJUST_LOCAL_OFFSET(src, srcw);
+
+ CHECK_EXTRA_REGS(src, srcw, (void)0);
+
+ if (SLJIT_UNLIKELY(compiler->flags_saved)) {
+ if (type <= SLJIT_JUMP)
+ FAIL_IF(emit_restore_flags(compiler, 0));
+ compiler->flags_saved = 0;
+ }
+
+ if (type >= SLJIT_CALL1) {
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+#if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
+ if (src == SLJIT_R2) {
+ EMIT_MOV(compiler, TMP_REG1, 0, src, 0);
+ src = TMP_REG1;
+ }
+ if (src == SLJIT_MEM1(SLJIT_SP) && type >= SLJIT_CALL3)
+ srcw += sizeof(sljit_sw);
+#endif
+#endif
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) && defined(_WIN64)
+ if (src == SLJIT_R2) {
+ EMIT_MOV(compiler, TMP_REG1, 0, src, 0);
+ src = TMP_REG1;
+ }
+#endif
+ FAIL_IF(call_with_args(compiler, type));
+ }
+
+ if (src == SLJIT_IMM) {
+ jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
+ FAIL_IF_NULL(jump);
+ set_jump(jump, compiler, JUMP_ADDR);
+ jump->u.target = srcw;
+
+ /* Worst case size. */
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ compiler->size += 5;
+#else
+ compiler->size += 10 + 3;
+#endif
+
+ inst = (sljit_u8*)ensure_buf(compiler, 2);
+ FAIL_IF_NULL(inst);
+
+ *inst++ = 0;
+ *inst++ = type + 2;
+ }
+ else {
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ /* REX_W is not necessary (src is not immediate). */
+ compiler->mode32 = 1;
+#endif
+ inst = emit_x86_instruction(compiler, 1, 0, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_FF;
+ *inst |= (type >= SLJIT_FAST_CALL) ? CALL_rm : JMP_rm;
+ }
+ return SLJIT_SUCCESS;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_s32 op,
+ sljit_s32 dst, sljit_sw dstw,
+ sljit_s32 src, sljit_sw srcw,
+ sljit_s32 type)
+{
+ sljit_u8 *inst;
+ sljit_u8 cond_set = 0;
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ sljit_s32 reg;
+#else
+ /* CHECK_EXTRA_REGS migh overwrite these values. */
+ sljit_s32 dst_save = dst;
+ sljit_sw dstw_save = dstw;
+#endif
+
+ CHECK_ERROR();
+ CHECK(check_sljit_emit_op_flags(compiler, op, dst, dstw, src, srcw, type));
+ SLJIT_UNUSED_ARG(srcw);
+
+ if (dst == SLJIT_UNUSED)
+ return SLJIT_SUCCESS;
+
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+ CHECK_EXTRA_REGS(dst, dstw, (void)0);
+ if (SLJIT_UNLIKELY(compiler->flags_saved))
+ FAIL_IF(emit_restore_flags(compiler, op & SLJIT_KEEP_FLAGS));
+
+ type &= 0xff;
+ /* setcc = jcc + 0x10. */
+ cond_set = get_jump_code(type) + 0x10;
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (GET_OPCODE(op) == SLJIT_OR && !GET_ALL_FLAGS(op) && FAST_IS_REG(dst) && dst == src) {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 4 + 3);
+ FAIL_IF(!inst);
+ INC_SIZE(4 + 3);
+ /* Set low register to conditional flag. */
+ *inst++ = (reg_map[TMP_REG1] <= 7) ? REX : REX_B;
+ *inst++ = GROUP_0F;
+ *inst++ = cond_set;
+ *inst++ = MOD_REG | reg_lmap[TMP_REG1];
+ *inst++ = REX | (reg_map[TMP_REG1] <= 7 ? 0 : REX_R) | (reg_map[dst] <= 7 ? 0 : REX_B);
+ *inst++ = OR_rm8_r8;
+ *inst++ = MOD_REG | (reg_lmap[TMP_REG1] << 3) | reg_lmap[dst];
+ return SLJIT_SUCCESS;
+ }
+
+ reg = (op == SLJIT_MOV && FAST_IS_REG(dst)) ? dst : TMP_REG1;
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 4 + 4);
+ FAIL_IF(!inst);
+ INC_SIZE(4 + 4);
+ /* Set low register to conditional flag. */
+ *inst++ = (reg_map[reg] <= 7) ? REX : REX_B;
+ *inst++ = GROUP_0F;
+ *inst++ = cond_set;
+ *inst++ = MOD_REG | reg_lmap[reg];
+ *inst++ = REX_W | (reg_map[reg] <= 7 ? 0 : (REX_B | REX_R));
+ *inst++ = GROUP_0F;
+ *inst++ = MOVZX_r_rm8;
+ *inst = MOD_REG | (reg_lmap[reg] << 3) | reg_lmap[reg];
+
+ if (reg != TMP_REG1)
+ return SLJIT_SUCCESS;
+
+ if (GET_OPCODE(op) < SLJIT_ADD) {
+ compiler->mode32 = GET_OPCODE(op) != SLJIT_MOV;
+ return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
+ }
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
+ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ compiler->skip_checks = 1;
+#endif
+ return sljit_emit_op2(compiler, op, dst, dstw, dst, dstw, TMP_REG1, 0);
+#else /* SLJIT_CONFIG_X86_64 */
+ if (GET_OPCODE(op) < SLJIT_ADD && FAST_IS_REG(dst)) {
+ if (reg_map[dst] <= 4) {
+ /* Low byte is accessible. */
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 3 + 3);
+ FAIL_IF(!inst);
+ INC_SIZE(3 + 3);
+ /* Set low byte to conditional flag. */
+ *inst++ = GROUP_0F;
+ *inst++ = cond_set;
+ *inst++ = MOD_REG | reg_map[dst];
+
+ *inst++ = GROUP_0F;
+ *inst++ = MOVZX_r_rm8;
+ *inst = MOD_REG | (reg_map[dst] << 3) | reg_map[dst];
+ return SLJIT_SUCCESS;
+ }
+
+ /* Low byte is not accessible. */
+ if (cpu_has_cmov == -1)
+ get_cpu_features();
+
+ if (cpu_has_cmov) {
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_IMM, 1);
+ /* a xor reg, reg operation would overwrite the flags. */
+ EMIT_MOV(compiler, dst, 0, SLJIT_IMM, 0);
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 3);
+ FAIL_IF(!inst);
+ INC_SIZE(3);
+
+ *inst++ = GROUP_0F;
+ /* cmovcc = setcc - 0x50. */
+ *inst++ = cond_set - 0x50;
+ *inst++ = MOD_REG | (reg_map[dst] << 3) | reg_map[TMP_REG1];
+ return SLJIT_SUCCESS;
+ }
+
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + 3 + 3 + 1);
+ FAIL_IF(!inst);
+ INC_SIZE(1 + 3 + 3 + 1);
+ *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
+ /* Set al to conditional flag. */
+ *inst++ = GROUP_0F;
+ *inst++ = cond_set;
+ *inst++ = MOD_REG | 0 /* eax */;
+
+ *inst++ = GROUP_0F;
+ *inst++ = MOVZX_r_rm8;
+ *inst++ = MOD_REG | (reg_map[dst] << 3) | 0 /* eax */;
+ *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
+ return SLJIT_SUCCESS;
+ }
+
+ if (GET_OPCODE(op) == SLJIT_OR && !GET_ALL_FLAGS(op) && FAST_IS_REG(dst) && dst == src && reg_map[dst] <= 4) {
+ SLJIT_COMPILE_ASSERT(reg_map[SLJIT_R0] == 0, scratch_reg1_must_be_eax);
+ if (dst != SLJIT_R0) {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + 3 + 2 + 1);
+ FAIL_IF(!inst);
+ INC_SIZE(1 + 3 + 2 + 1);
+ /* Set low register to conditional flag. */
+ *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
+ *inst++ = GROUP_0F;
+ *inst++ = cond_set;
+ *inst++ = MOD_REG | 0 /* eax */;
+ *inst++ = OR_rm8_r8;
+ *inst++ = MOD_REG | (0 /* eax */ << 3) | reg_map[dst];
+ *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
+ }
+ else {
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 2 + 3 + 2 + 2);
+ FAIL_IF(!inst);
+ INC_SIZE(2 + 3 + 2 + 2);
+ /* Set low register to conditional flag. */
+ *inst++ = XCHG_r_rm;
+ *inst++ = MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1];
+ *inst++ = GROUP_0F;
+ *inst++ = cond_set;
+ *inst++ = MOD_REG | 1 /* ecx */;
+ *inst++ = OR_rm8_r8;
+ *inst++ = MOD_REG | (1 /* ecx */ << 3) | 0 /* eax */;
+ *inst++ = XCHG_r_rm;
+ *inst++ = MOD_REG | (1 /* ecx */ << 3) | reg_map[TMP_REG1];
+ }
+ return SLJIT_SUCCESS;
+ }
+
+ /* Set TMP_REG1 to the bit. */
+ inst = (sljit_u8*)ensure_buf(compiler, 1 + 1 + 3 + 3 + 1);
+ FAIL_IF(!inst);
+ INC_SIZE(1 + 3 + 3 + 1);
+ *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
+ /* Set al to conditional flag. */
+ *inst++ = GROUP_0F;
+ *inst++ = cond_set;
+ *inst++ = MOD_REG | 0 /* eax */;
+
+ *inst++ = GROUP_0F;
+ *inst++ = MOVZX_r_rm8;
+ *inst++ = MOD_REG | (0 << 3) /* eax */ | 0 /* eax */;
+
+ *inst++ = XCHG_EAX_r + reg_map[TMP_REG1];
+
+ if (GET_OPCODE(op) < SLJIT_ADD)
+ return emit_mov(compiler, dst, dstw, TMP_REG1, 0);
+
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
+ || (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ compiler->skip_checks = 1;
+#endif
+ return sljit_emit_op2(compiler, op, dst_save, dstw_save, dst_save, dstw_save, TMP_REG1, 0);
+#endif /* SLJIT_CONFIG_X86_64 */
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_get_local_base(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw offset)
+{
+ CHECK_ERROR();
+ CHECK(check_sljit_get_local_base(compiler, dst, dstw, offset));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ CHECK_EXTRA_REGS(dst, dstw, (void)0);
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ compiler->mode32 = 0;
+#endif
+
+ ADJUST_LOCAL_OFFSET(SLJIT_MEM1(SLJIT_SP), offset);
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (NOT_HALFWORD(offset)) {
+ FAIL_IF(emit_load_imm64(compiler, TMP_REG1, offset));
+#if (defined SLJIT_DEBUG && SLJIT_DEBUG)
+ SLJIT_ASSERT(emit_lea_binary(compiler, SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_SP, 0, TMP_REG1, 0) != SLJIT_ERR_UNSUPPORTED);
+ return compiler->error;
+#else
+ return emit_lea_binary(compiler, SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_SP, 0, TMP_REG1, 0);
+#endif
+ }
+#endif
+
+ if (offset != 0)
+ return emit_lea_binary(compiler, SLJIT_KEEP_FLAGS, dst, dstw, SLJIT_SP, 0, SLJIT_IMM, offset);
+ return emit_mov(compiler, dst, dstw, SLJIT_SP, 0);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_s32 dst, sljit_sw dstw, sljit_sw init_value)
+{
+ sljit_u8 *inst;
+ struct sljit_const *const_;
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ sljit_s32 reg;
+#endif
+
+ CHECK_ERROR_PTR();
+ CHECK_PTR(check_sljit_emit_const(compiler, dst, dstw, init_value));
+ ADJUST_LOCAL_OFFSET(dst, dstw);
+
+ CHECK_EXTRA_REGS(dst, dstw, (void)0);
+
+ const_ = (struct sljit_const*)ensure_abuf(compiler, sizeof(struct sljit_const));
+ PTR_FAIL_IF(!const_);
+ set_const(const_, compiler);
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ compiler->mode32 = 0;
+ reg = SLOW_IS_REG(dst) ? dst : TMP_REG1;
+
+ if (emit_load_imm64(compiler, reg, init_value))
+ return NULL;
+#else
+ if (dst == SLJIT_UNUSED)
+ dst = TMP_REG1;
+
+ if (emit_mov(compiler, dst, dstw, SLJIT_IMM, init_value))
+ return NULL;
+#endif
+
+ inst = (sljit_u8*)ensure_buf(compiler, 2);
+ PTR_FAIL_IF(!inst);
+
+ *inst++ = 0;
+ *inst++ = 1;
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ if (dst & SLJIT_MEM)
+ if (emit_mov(compiler, dst, dstw, TMP_REG1, 0))
+ return NULL;
+#endif
+
+ return const_;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_target, sljit_sw executable_offset)
+{
+ SLJIT_UNUSED_ARG(executable_offset);
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+ sljit_unaligned_store_sw((void*)addr, new_target - (addr + 4) - (sljit_uw)executable_offset);
+#else
+ sljit_unaligned_store_sw((void*)addr, (sljit_sw) new_target);
+#endif
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant, sljit_sw executable_offset)
+{
+ SLJIT_UNUSED_ARG(executable_offset);
+ sljit_unaligned_store_sw((void*)addr, new_constant);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_x86_is_sse2_available(void)
+{
+#if (defined SLJIT_DETECT_SSE2 && SLJIT_DETECT_SSE2)
+ if (cpu_has_sse2 == -1)
+ get_cpu_features();
+ return cpu_has_sse2;
+#else
+ return 1;
+#endif
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_x86_is_cmov_available(void)
+{
+ if (cpu_has_cmov == -1)
+ get_cpu_features();
+ return cpu_has_cmov;
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_x86_emit_cmov(struct sljit_compiler *compiler,
+ sljit_s32 type,
+ sljit_s32 dst_reg,
+ sljit_s32 src, sljit_sw srcw)
+{
+ sljit_u8* inst;
+
+ CHECK_ERROR();
+#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
+ CHECK_ARGUMENT(sljit_x86_is_cmov_available());
+ CHECK_ARGUMENT(!(type & ~(0xff | SLJIT_I32_OP)));
+ CHECK_ARGUMENT((type & 0xff) >= SLJIT_EQUAL && (type & 0xff) <= SLJIT_ORDERED_F64);
+ CHECK_ARGUMENT(FUNCTION_CHECK_IS_REG(dst_reg & ~SLJIT_I32_OP));
+ FUNCTION_CHECK_SRC(src, srcw);
+#endif
+#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
+ if (SLJIT_UNLIKELY(!!compiler->verbose)) {
+ fprintf(compiler->verbose, " x86_cmov%s %s%s, ",
+ !(dst_reg & SLJIT_I32_OP) ? "" : ".i",
+ jump_names[type & 0xff], JUMP_POSTFIX(type));
+ sljit_verbose_reg(compiler, dst_reg & ~SLJIT_I32_OP);
+ fprintf(compiler->verbose, ", ");
+ sljit_verbose_param(compiler, src, srcw);
+ fprintf(compiler->verbose, "\n");
+ }
+#endif
+
+ ADJUST_LOCAL_OFFSET(src, srcw);
+ CHECK_EXTRA_REGS(src, srcw, (void)0);
+
+#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+ compiler->mode32 = dst_reg & SLJIT_I32_OP;
+#endif
+ dst_reg &= ~SLJIT_I32_OP;
+
+ if (SLJIT_UNLIKELY(src & SLJIT_IMM)) {
+ EMIT_MOV(compiler, TMP_REG1, 0, SLJIT_IMM, srcw);
+ src = TMP_REG1;
+ srcw = 0;
+ }
+
+ inst = emit_x86_instruction(compiler, 2, dst_reg, 0, src, srcw);
+ FAIL_IF(!inst);
+ *inst++ = GROUP_0F;
+ *inst = get_jump_code(type & 0xff) - 0x40;
+ return SLJIT_SUCCESS;
+}
diff --git a/thirdparty/pcre2/src/sljit/sljitUtils.c b/thirdparty/pcre2/src/sljit/sljitUtils.c
new file mode 100644
index 0000000000..ec5c321194
--- /dev/null
+++ b/thirdparty/pcre2/src/sljit/sljitUtils.c
@@ -0,0 +1,337 @@
+/*
+ * Stack-less Just-In-Time compiler
+ *
+ * Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are
+ * permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of
+ * conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
+ * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* ------------------------------------------------------------------------ */
+/* Locks */
+/* ------------------------------------------------------------------------ */
+
+#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR) || (defined SLJIT_UTIL_GLOBAL_LOCK && SLJIT_UTIL_GLOBAL_LOCK)
+
+#if (defined SLJIT_SINGLE_THREADED && SLJIT_SINGLE_THREADED)
+
+#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
+
+static SLJIT_INLINE void allocator_grab_lock(void)
+{
+ /* Always successful. */
+}
+
+static SLJIT_INLINE void allocator_release_lock(void)
+{
+ /* Always successful. */
+}
+
+#endif /* SLJIT_EXECUTABLE_ALLOCATOR */
+
+#if (defined SLJIT_UTIL_GLOBAL_LOCK && SLJIT_UTIL_GLOBAL_LOCK)
+
+SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_grab_lock(void)
+{
+ /* Always successful. */
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_release_lock(void)
+{
+ /* Always successful. */
+}
+
+#endif /* SLJIT_UTIL_GLOBAL_LOCK */
+
+#elif defined(_WIN32) /* SLJIT_SINGLE_THREADED */
+
+#include "windows.h"
+
+#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
+
+static HANDLE allocator_mutex = 0;
+
+static SLJIT_INLINE void allocator_grab_lock(void)
+{
+ /* No idea what to do if an error occures. Static mutexes should never fail... */
+ if (!allocator_mutex)
+ allocator_mutex = CreateMutex(NULL, TRUE, NULL);
+ else
+ WaitForSingleObject(allocator_mutex, INFINITE);
+}
+
+static SLJIT_INLINE void allocator_release_lock(void)
+{
+ ReleaseMutex(allocator_mutex);
+}
+
+#endif /* SLJIT_EXECUTABLE_ALLOCATOR */
+
+#if (defined SLJIT_UTIL_GLOBAL_LOCK && SLJIT_UTIL_GLOBAL_LOCK)
+
+static HANDLE global_mutex = 0;
+
+SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_grab_lock(void)
+{
+ /* No idea what to do if an error occures. Static mutexes should never fail... */
+ if (!global_mutex)
+ global_mutex = CreateMutex(NULL, TRUE, NULL);
+ else
+ WaitForSingleObject(global_mutex, INFINITE);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_release_lock(void)
+{
+ ReleaseMutex(global_mutex);
+}
+
+#endif /* SLJIT_UTIL_GLOBAL_LOCK */
+
+#else /* _WIN32 */
+
+#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
+
+#include <pthread.h>
+
+static pthread_mutex_t allocator_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+static SLJIT_INLINE void allocator_grab_lock(void)
+{
+ pthread_mutex_lock(&allocator_mutex);
+}
+
+static SLJIT_INLINE void allocator_release_lock(void)
+{
+ pthread_mutex_unlock(&allocator_mutex);
+}
+
+#endif /* SLJIT_EXECUTABLE_ALLOCATOR */
+
+#if (defined SLJIT_UTIL_GLOBAL_LOCK && SLJIT_UTIL_GLOBAL_LOCK)
+
+#include <pthread.h>
+
+static pthread_mutex_t global_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_grab_lock(void)
+{
+ pthread_mutex_lock(&global_mutex);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_release_lock(void)
+{
+ pthread_mutex_unlock(&global_mutex);
+}
+
+#endif /* SLJIT_UTIL_GLOBAL_LOCK */
+
+#endif /* _WIN32 */
+
+/* ------------------------------------------------------------------------ */
+/* Stack */
+/* ------------------------------------------------------------------------ */
+
+#if (defined SLJIT_UTIL_STACK && SLJIT_UTIL_STACK) || (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
+
+#ifdef _WIN32
+#include "windows.h"
+#else
+/* Provides mmap function. */
+#include <sys/mman.h>
+/* For detecting the page size. */
+#include <unistd.h>
+
+#ifndef MAP_ANON
+
+#include <fcntl.h>
+
+/* Some old systems does not have MAP_ANON. */
+static sljit_s32 dev_zero = -1;
+
+#if (defined SLJIT_SINGLE_THREADED && SLJIT_SINGLE_THREADED)
+
+static SLJIT_INLINE sljit_s32 open_dev_zero(void)
+{
+ dev_zero = open("/dev/zero", O_RDWR);
+ return dev_zero < 0;
+}
+
+#else /* SLJIT_SINGLE_THREADED */
+
+#include <pthread.h>
+
+static pthread_mutex_t dev_zero_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+static SLJIT_INLINE sljit_s32 open_dev_zero(void)
+{
+ pthread_mutex_lock(&dev_zero_mutex);
+ /* The dev_zero might be initialized by another thread during the waiting. */
+ if (dev_zero < 0) {
+ dev_zero = open("/dev/zero", O_RDWR);
+ }
+ pthread_mutex_unlock(&dev_zero_mutex);
+ return dev_zero < 0;
+}
+
+#endif /* SLJIT_SINGLE_THREADED */
+
+#endif
+
+#endif
+
+#endif /* SLJIT_UTIL_STACK || SLJIT_EXECUTABLE_ALLOCATOR */
+
+#if (defined SLJIT_UTIL_STACK && SLJIT_UTIL_STACK)
+
+/* Planning to make it even more clever in the future. */
+static sljit_sw sljit_page_align = 0;
+
+SLJIT_API_FUNC_ATTRIBUTE struct sljit_stack* SLJIT_CALL sljit_allocate_stack(sljit_uw limit, sljit_uw max_limit, void *allocator_data)
+{
+ struct sljit_stack *stack;
+ union {
+ void *ptr;
+ sljit_uw uw;
+ } base;
+#ifdef _WIN32
+ SYSTEM_INFO si;
+#endif
+
+ SLJIT_UNUSED_ARG(allocator_data);
+ if (limit > max_limit || limit < 1)
+ return NULL;
+
+#ifdef _WIN32
+ if (!sljit_page_align) {
+ GetSystemInfo(&si);
+ sljit_page_align = si.dwPageSize - 1;
+ }
+#else
+ if (!sljit_page_align) {
+ sljit_page_align = sysconf(_SC_PAGESIZE);
+ /* Should never happen. */
+ if (sljit_page_align < 0)
+ sljit_page_align = 4096;
+ sljit_page_align--;
+ }
+#endif
+
+ /* Align limit and max_limit. */
+ max_limit = (max_limit + sljit_page_align) & ~sljit_page_align;
+
+ stack = (struct sljit_stack*)SLJIT_MALLOC(sizeof(struct sljit_stack), allocator_data);
+ if (!stack)
+ return NULL;
+
+#ifdef _WIN32
+ base.ptr = VirtualAlloc(NULL, max_limit, MEM_RESERVE, PAGE_READWRITE);
+ if (!base.ptr) {
+ SLJIT_FREE(stack, allocator_data);
+ return NULL;
+ }
+ stack->base = base.uw;
+ stack->limit = stack->base;
+ stack->max_limit = stack->base + max_limit;
+ if (sljit_stack_resize(stack, stack->base + limit)) {
+ sljit_free_stack(stack, allocator_data);
+ return NULL;
+ }
+#else
+#ifdef MAP_ANON
+ base.ptr = mmap(NULL, max_limit, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0);
+#else
+ if (dev_zero < 0) {
+ if (open_dev_zero()) {
+ SLJIT_FREE(stack, allocator_data);
+ return NULL;
+ }
+ }
+ base.ptr = mmap(NULL, max_limit, PROT_READ | PROT_WRITE, MAP_PRIVATE, dev_zero, 0);
+#endif
+ if (base.ptr == MAP_FAILED) {
+ SLJIT_FREE(stack, allocator_data);
+ return NULL;
+ }
+ stack->base = base.uw;
+ stack->limit = stack->base + limit;
+ stack->max_limit = stack->base + max_limit;
+#endif
+ stack->top = stack->base;
+ return stack;
+}
+
+#undef PAGE_ALIGN
+
+SLJIT_API_FUNC_ATTRIBUTE void SLJIT_CALL sljit_free_stack(struct sljit_stack* stack, void *allocator_data)
+{
+ SLJIT_UNUSED_ARG(allocator_data);
+#ifdef _WIN32
+ VirtualFree((void*)stack->base, 0, MEM_RELEASE);
+#else
+ munmap((void*)stack->base, stack->max_limit - stack->base);
+#endif
+ SLJIT_FREE(stack, allocator_data);
+}
+
+SLJIT_API_FUNC_ATTRIBUTE sljit_sw SLJIT_CALL sljit_stack_resize(struct sljit_stack* stack, sljit_uw new_limit)
+{
+ sljit_uw aligned_old_limit;
+ sljit_uw aligned_new_limit;
+
+ if ((new_limit > stack->max_limit) || (new_limit < stack->base))
+ return -1;
+#ifdef _WIN32
+ aligned_new_limit = (new_limit + sljit_page_align) & ~sljit_page_align;
+ aligned_old_limit = (stack->limit + sljit_page_align) & ~sljit_page_align;
+ if (aligned_new_limit != aligned_old_limit) {
+ if (aligned_new_limit > aligned_old_limit) {
+ if (!VirtualAlloc((void*)aligned_old_limit, aligned_new_limit - aligned_old_limit, MEM_COMMIT, PAGE_READWRITE))
+ return -1;
+ }
+ else {
+ if (!VirtualFree((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, MEM_DECOMMIT))
+ return -1;
+ }
+ }
+ stack->limit = new_limit;
+ return 0;
+#else
+ if (new_limit >= stack->limit) {
+ stack->limit = new_limit;
+ return 0;
+ }
+ aligned_new_limit = (new_limit + sljit_page_align) & ~sljit_page_align;
+ aligned_old_limit = (stack->limit + sljit_page_align) & ~sljit_page_align;
+ /* If madvise is available, we release the unnecessary space. */
+#if defined(MADV_DONTNEED)
+ if (aligned_new_limit < aligned_old_limit)
+ madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, MADV_DONTNEED);
+#elif defined(POSIX_MADV_DONTNEED)
+ if (aligned_new_limit < aligned_old_limit)
+ posix_madvise((void*)aligned_new_limit, aligned_old_limit - aligned_new_limit, POSIX_MADV_DONTNEED);
+#endif
+ stack->limit = new_limit;
+ return 0;
+#endif
+}
+
+#endif /* SLJIT_UTIL_STACK */
+
+#endif
diff --git a/thirdparty/zstd/PATENTS b/thirdparty/zstd/PATENTS
deleted file mode 100644
index 15b4a2ea5c..0000000000
--- a/thirdparty/zstd/PATENTS
+++ /dev/null
@@ -1,33 +0,0 @@
-Additional Grant of Patent Rights Version 2
-
-"Software" means the Zstandard software distributed by Facebook, Inc.
-
-Facebook, Inc. ("Facebook") hereby grants to each recipient of the Software
-("you") a perpetual, worldwide, royalty-free, non-exclusive, irrevocable
-(subject to the termination provision below) license under any Necessary
-Claims, to make, have made, use, sell, offer to sell, import, and otherwise
-transfer the Software. For avoidance of doubt, no license is granted under
-Facebook’s rights in any patent claims that are infringed by (i) modifications
-to the Software made by you or any third party or (ii) the Software in
-combination with any software or other technology.
-
-The license granted hereunder will terminate, automatically and without notice,
-if you (or any of your subsidiaries, corporate affiliates or agents) initiate
-directly or indirectly, or take a direct financial interest in, any Patent
-Assertion: (i) against Facebook or any of its subsidiaries or corporate
-affiliates, (ii) against any party if such Patent Assertion arises in whole or
-in part from any software, technology, product or service of Facebook or any of
-its subsidiaries or corporate affiliates, or (iii) against any party relating
-to the Software. Notwithstanding the foregoing, if Facebook or any of its
-subsidiaries or corporate affiliates files a lawsuit alleging patent
-infringement against you in the first instance, and you respond by filing a
-patent infringement counterclaim in that lawsuit against that party that is
-unrelated to the Software, the license granted hereunder will not terminate
-under section (i) of this paragraph due to such counterclaim.
-
-A "Necessary Claim" is a claim of a patent owned by Facebook that is
-necessarily infringed by the Software standing alone.
-
-A "Patent Assertion" is any lawsuit or other action alleging direct, indirect,
-or contributory infringement or inducement to infringe any patent, including a
-cross-claim or counterclaim.
diff --git a/thirdparty/zstd/README.md b/thirdparty/zstd/README.md
deleted file mode 100644
index f37be4542c..0000000000
--- a/thirdparty/zstd/README.md
+++ /dev/null
@@ -1,153 +0,0 @@
- __Zstandard__, or `zstd` as short version, is a fast lossless compression algorithm,
- targeting real-time compression scenarios at zlib-level and better compression ratios.
-
-It is provided as an open-source BSD-licensed **C** library,
-and a command line utility producing and decoding `.zst` and `.gz` files.
-For other programming languages,
-you can consult a list of known ports on [Zstandard homepage](http://www.zstd.net/#other-languages).
-
-| dev branch status |
-|-------------------|
-| [![Build Status][travisDevBadge]][travisLink] [![Build status][AppveyorDevBadge]][AppveyorLink] [![Build status][CircleDevBadge]][CircleLink]
-
-[travisDevBadge]: https://travis-ci.org/facebook/zstd.svg?branch=dev "Continuous Integration test suite"
-[travisLink]: https://travis-ci.org/facebook/zstd
-[AppveyorDevBadge]: https://ci.appveyor.com/api/projects/status/xt38wbdxjk5mrbem/branch/dev?svg=true "Windows test suite"
-[AppveyorLink]: https://ci.appveyor.com/project/YannCollet/zstd-p0yf0
-[CircleDevBadge]: https://circleci.com/gh/facebook/zstd/tree/dev.svg?style=shield "Short test suite"
-[CircleLink]: https://circleci.com/gh/facebook/zstd
-
-
-As a reference, several fast compression algorithms were tested and compared
-on a server running Linux Debian (`Linux version 4.8.0-1-amd64`),
-with a Core i7-6700K CPU @ 4.0GHz,
-using [lzbench], an open-source in-memory benchmark by @inikep
-compiled with GCC 6.3.0,
-on the [Silesia compression corpus].
-
-[lzbench]: https://github.com/inikep/lzbench
-[Silesia compression corpus]: http://sun.aei.polsl.pl/~sdeor/index.php?page=silesia
-
-| Compressor name | Ratio | Compression| Decompress.|
-| --------------- | ------| -----------| ---------- |
-| **zstd 1.1.3 -1** | 2.877 | 430 MB/s | 1110 MB/s |
-| zlib 1.2.8 -1 | 2.743 | 110 MB/s | 400 MB/s |
-| brotli 0.5.2 -0 | 2.708 | 400 MB/s | 430 MB/s |
-| quicklz 1.5.0 -1 | 2.238 | 550 MB/s | 710 MB/s |
-| lzo1x 2.09 -1 | 2.108 | 650 MB/s | 830 MB/s |
-| lz4 1.7.5 | 2.101 | 720 MB/s | 3600 MB/s |
-| snappy 1.1.3 | 2.091 | 500 MB/s | 1650 MB/s |
-| lzf 3.6 -1 | 2.077 | 400 MB/s | 860 MB/s |
-
-[zlib]:http://www.zlib.net/
-[LZ4]: http://www.lz4.org/
-
-Zstd can also offer stronger compression ratios at the cost of compression speed.
-Speed vs Compression trade-off is configurable by small increments. Decompression speed is preserved and remains roughly the same at all settings, a property shared by most LZ compression algorithms, such as [zlib] or lzma.
-
-The following tests were run
-on a server running Linux Debian (`Linux version 4.8.0-1-amd64`)
-with a Core i7-6700K CPU @ 4.0GHz,
-using [lzbench], an open-source in-memory benchmark by @inikep
-compiled with GCC 6.3.0,
-on the [Silesia compression corpus].
-
-Compression Speed vs Ratio | Decompression Speed
----------------------------|--------------------
-![Compression Speed vs Ratio](doc/images/Cspeed4.png "Compression Speed vs Ratio") | ![Decompression Speed](doc/images/Dspeed4.png "Decompression Speed")
-
-Several algorithms can produce higher compression ratios, but at slower speeds, falling outside of the graph.
-For a larger picture including very slow modes, [click on this link](doc/images/DCspeed5.png) .
-
-
-### The case for Small Data compression
-
-Previous charts provide results applicable to typical file and stream scenarios (several MB). Small data comes with different perspectives.
-
-The smaller the amount of data to compress, the more difficult it is to compress. This problem is common to all compression algorithms, and reason is, compression algorithms learn from past data how to compress future data. But at the beginning of a new data set, there is no "past" to build upon.
-
-To solve this situation, Zstd offers a __training mode__, which can be used to tune the algorithm for a selected type of data.
-Training Zstandard is achieved by providing it with a few samples (one file per sample). The result of this training is stored in a file called "dictionary", which must be loaded before compression and decompression.
-Using this dictionary, the compression ratio achievable on small data improves dramatically.
-
-The following example uses the `github-users` [sample set](https://github.com/facebook/zstd/releases/tag/v1.1.3), created from [github public API](https://developer.github.com/v3/users/#get-all-users).
-It consists of roughly 10K records weighing about 1KB each.
-
-Compression Ratio | Compression Speed | Decompression Speed
-------------------|-------------------|--------------------
-![Compression Ratio](doc/images/dict-cr.png "Compression Ratio") | ![Compression Speed](doc/images/dict-cs.png "Compression Speed") | ![Decompression Speed](doc/images/dict-ds.png "Decompression Speed")
-
-
-These compression gains are achieved while simultaneously providing _faster_ compression and decompression speeds.
-
-Training works if there is some correlation in a family of small data samples. The more data-specific a dictionary is, the more efficient it is (there is no _universal dictionary_).
-Hence, deploying one dictionary per type of data will provide the greatest benefits.
-Dictionary gains are mostly effective in the first few KB. Then, the compression algorithm will gradually use previously decoded content to better compress the rest of the file.
-
-#### Dictionary compression How To :
-
-1) Create the dictionary
-
-`zstd --train FullPathToTrainingSet/* -o dictionaryName`
-
-2) Compress with dictionary
-
-`zstd -D dictionaryName FILE`
-
-3) Decompress with dictionary
-
-`zstd -D dictionaryName --decompress FILE.zst`
-
-
-### Build
-
-Once you have the repository cloned, there are multiple ways provided to build Zstandard.
-
-#### Makefile
-
-If your system is compatible with a standard `make` (or `gmake`) binary generator,
-you can simply run it at the root directory.
-It will generate `zstd` within root directory.
-
-Other available options include :
-- `make install` : create and install zstd binary, library and man page
-- `make test` : create and run `zstd` and test tools on local platform
-
-#### cmake
-
-A `cmake` project generator is provided within `build/cmake`.
-It can generate Makefiles or other build scripts
-to create `zstd` binary, and `libzstd` dynamic and static libraries.
-
-#### Meson
-
-A Meson project is provided within `contrib/meson`.
-
-#### Visual Studio (Windows)
-
-Going into `build` directory, you will find additional possibilities :
-- Projects for Visual Studio 2005, 2008 and 2010
- + VS2010 project is compatible with VS2012, VS2013 and VS2015
-- Automated build scripts for Visual compiler by @KrzysFR , in `build/VS_scripts`,
- which will build `zstd` cli and `libzstd` library without any need to open Visual Studio solution.
-
-
-### Status
-
-Zstandard is currently deployed within Facebook. It is used daily to compress and decompress very large amounts of data in multiple formats and use cases.
-Zstandard is considered safe for production environments.
-
-### License
-
-Zstandard is [BSD-licensed](LICENSE). We also provide an [additional patent grant](PATENTS).
-
-### Contributing
-
-The "dev" branch is the one where all contributions will be merged before reaching "master".
-If you plan to propose a patch, please commit into the "dev" branch or its own feature branch.
-Direct commit to "master" are not permitted.
-For more information, please read [CONTRIBUTING](CONTRIBUTING.md).
-
-### Miscellaneous
-
-Zstd entropy stage is provided by [Huff0 and FSE, from Finite State Entropy library](https://github.com/Cyan4973/FiniteStateEntropy).
diff --git a/thirdparty/zstd/common/bitstream.h b/thirdparty/zstd/common/bitstream.h
index 07b85026c9..06121f21c5 100644
--- a/thirdparty/zstd/common/bitstream.h
+++ b/thirdparty/zstd/common/bitstream.h
@@ -80,9 +80,9 @@ extern "C" {
* bitStream encoding API (write forward)
********************************************/
/* bitStream can mix input from multiple sources.
-* A critical property of these streams is that they encode and decode in **reverse** direction.
-* So the first bit sequence you add will be the last to be read, like a LIFO stack.
-*/
+ * A critical property of these streams is that they encode and decode in **reverse** direction.
+ * So the first bit sequence you add will be the last to be read, like a LIFO stack.
+ */
typedef struct
{
size_t bitContainer;
@@ -203,7 +203,7 @@ static const unsigned BIT_mask[] = { 0, 1, 3, 7, 0xF, 0x1F, 0x3F, 0x7F,
/*! BIT_initCStream() :
* `dstCapacity` must be > sizeof(size_t)
* @return : 0 if success,
- otherwise an error code (can be tested using ERR_isError() ) */
+ * otherwise an error code (can be tested using ERR_isError()) */
MEM_STATIC size_t BIT_initCStream(BIT_CStream_t* bitC,
void* startPtr, size_t dstCapacity)
{
@@ -217,8 +217,8 @@ MEM_STATIC size_t BIT_initCStream(BIT_CStream_t* bitC,
}
/*! BIT_addBits() :
- can add up to 26 bits into `bitC`.
- Does not check for register overflow ! */
+ * can add up to 26 bits into `bitC`.
+ * Note : does not check for register overflow ! */
MEM_STATIC void BIT_addBits(BIT_CStream_t* bitC,
size_t value, unsigned nbBits)
{
@@ -268,7 +268,7 @@ MEM_STATIC void BIT_flushBits(BIT_CStream_t* bitC)
/*! BIT_closeCStream() :
* @return : size of CStream, in bytes,
- or 0 if it could not fit into dstBuffer */
+ * or 0 if it could not fit into dstBuffer */
MEM_STATIC size_t BIT_closeCStream(BIT_CStream_t* bitC)
{
BIT_addBitsFast(bitC, 1, 1); /* endMark */
@@ -279,14 +279,14 @@ MEM_STATIC size_t BIT_closeCStream(BIT_CStream_t* bitC)
/*-********************************************************
-* bitStream decoding
+* bitStream decoding
**********************************************************/
/*! BIT_initDStream() :
-* Initialize a BIT_DStream_t.
-* `bitD` : a pointer to an already allocated BIT_DStream_t structure.
-* `srcSize` must be the *exact* size of the bitStream, in bytes.
-* @return : size of stream (== srcSize) or an errorCode if a problem is detected
-*/
+ * Initialize a BIT_DStream_t.
+ * `bitD` : a pointer to an already allocated BIT_DStream_t structure.
+ * `srcSize` must be the *exact* size of the bitStream, in bytes.
+ * @return : size of stream (== srcSize), or an errorCode if a problem is detected
+ */
MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, size_t srcSize)
{
if (srcSize < 1) { memset(bitD, 0, sizeof(*bitD)); return ERROR(srcSize_wrong); }
@@ -305,29 +305,30 @@ MEM_STATIC size_t BIT_initDStream(BIT_DStream_t* bitD, const void* srcBuffer, si
bitD->bitContainer = *(const BYTE*)(bitD->start);
switch(srcSize)
{
- case 7: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[6]) << (sizeof(bitD->bitContainer)*8 - 16);
- /* fall-through */
+ case 7: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[6]) << (sizeof(bitD->bitContainer)*8 - 16);
+ /* fall-through */
- case 6: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[5]) << (sizeof(bitD->bitContainer)*8 - 24);
- /* fall-through */
+ case 6: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[5]) << (sizeof(bitD->bitContainer)*8 - 24);
+ /* fall-through */
- case 5: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[4]) << (sizeof(bitD->bitContainer)*8 - 32);
- /* fall-through */
+ case 5: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[4]) << (sizeof(bitD->bitContainer)*8 - 32);
+ /* fall-through */
- case 4: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[3]) << 24;
- /* fall-through */
+ case 4: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[3]) << 24;
+ /* fall-through */
- case 3: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[2]) << 16;
- /* fall-through */
+ case 3: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[2]) << 16;
+ /* fall-through */
- case 2: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[1]) << 8;
- /* fall-through */
+ case 2: bitD->bitContainer += (size_t)(((const BYTE*)(srcBuffer))[1]) << 8;
+ /* fall-through */
- default: break;
+ default: break;
+ }
+ { BYTE const lastByte = ((const BYTE*)srcBuffer)[srcSize-1];
+ bitD->bitsConsumed = lastByte ? 8 - BIT_highbit32(lastByte) : 0;
+ if (lastByte == 0) return ERROR(corruption_detected); /* endMark not present */
}
- { BYTE const lastByte = ((const BYTE*)srcBuffer)[srcSize-1];
- bitD->bitsConsumed = lastByte ? 8 - BIT_highbit32(lastByte) : 0;
- if (lastByte == 0) return ERROR(GENERIC); /* endMark not present */ }
bitD->bitsConsumed += (U32)(sizeof(bitD->bitContainer) - srcSize)*8;
}
@@ -363,9 +364,8 @@ MEM_STATIC size_t BIT_getLowerBits(size_t bitContainer, U32 const nbBits)
* local register is not modified.
* On 32-bits, maxNbBits==24.
* On 64-bits, maxNbBits==56.
- * @return : value extracted
- */
- MEM_STATIC size_t BIT_lookBits(const BIT_DStream_t* bitD, U32 nbBits)
+ * @return : value extracted */
+MEM_STATIC size_t BIT_lookBits(const BIT_DStream_t* bitD, U32 nbBits)
{
#if defined(__BMI__) && defined(__GNUC__) /* experimental; fails if bitD->bitsConsumed + nbBits > sizeof(bitD->bitContainer)*8 */
return BIT_getMiddleBits(bitD->bitContainer, (sizeof(bitD->bitContainer)*8) - bitD->bitsConsumed - nbBits, nbBits);
@@ -392,8 +392,7 @@ MEM_STATIC void BIT_skipBits(BIT_DStream_t* bitD, U32 nbBits)
/*! BIT_readBits() :
* Read (consume) next n bits from local register and update.
* Pay attention to not read more than nbBits contained into local register.
- * @return : extracted value.
- */
+ * @return : extracted value. */
MEM_STATIC size_t BIT_readBits(BIT_DStream_t* bitD, U32 nbBits)
{
size_t const value = BIT_lookBits(bitD, nbBits);
@@ -402,7 +401,7 @@ MEM_STATIC size_t BIT_readBits(BIT_DStream_t* bitD, U32 nbBits)
}
/*! BIT_readBitsFast() :
-* unsafe version; only works only if nbBits >= 1 */
+ * unsafe version; only works only if nbBits >= 1 */
MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, U32 nbBits)
{
size_t const value = BIT_lookBitsFast(bitD, nbBits);
@@ -412,10 +411,10 @@ MEM_STATIC size_t BIT_readBitsFast(BIT_DStream_t* bitD, U32 nbBits)
}
/*! BIT_reloadDStream() :
-* Refill `bitD` from buffer previously set in BIT_initDStream() .
-* This function is safe, it guarantees it will not read beyond src buffer.
-* @return : status of `BIT_DStream_t` internal register.
- if status == BIT_DStream_unfinished, internal register is filled with >= (sizeof(bitD->bitContainer)*8 - 7) bits */
+ * Refill `bitD` from buffer previously set in BIT_initDStream() .
+ * This function is safe, it guarantees it will not read beyond src buffer.
+ * @return : status of `BIT_DStream_t` internal register.
+ * when status == BIT_DStream_unfinished, internal register is filled with at least 25 or 57 bits */
MEM_STATIC BIT_DStream_status BIT_reloadDStream(BIT_DStream_t* bitD)
{
if (bitD->bitsConsumed > (sizeof(bitD->bitContainer)*8)) /* overflow detected, like end of stream */
@@ -446,8 +445,8 @@ MEM_STATIC BIT_DStream_status BIT_reloadDStream(BIT_DStream_t* bitD)
}
/*! BIT_endOfDStream() :
-* @return Tells if DStream has exactly reached its end (all bits consumed).
-*/
+ * @return : 1 if DStream has _exactly_ reached its end (all bits consumed).
+ */
MEM_STATIC unsigned BIT_endOfDStream(const BIT_DStream_t* DStream)
{
return ((DStream->ptr == DStream->start) && (DStream->bitsConsumed == sizeof(DStream->bitContainer)*8));
diff --git a/thirdparty/zstd/common/compiler.h b/thirdparty/zstd/common/compiler.h
new file mode 100644
index 0000000000..d7225c443e
--- /dev/null
+++ b/thirdparty/zstd/common/compiler.h
@@ -0,0 +1,85 @@
+/*
+ * 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_COMPILER_H
+#define ZSTD_COMPILER_H
+
+/*-*******************************************************
+* Compiler specifics
+*********************************************************/
+/* force inlining */
+#if defined (__GNUC__) || defined(__cplusplus) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
+# define INLINE_KEYWORD inline
+#else
+# define INLINE_KEYWORD
+#endif
+
+#if defined(__GNUC__)
+# define FORCE_INLINE_ATTR __attribute__((always_inline))
+#elif defined(_MSC_VER)
+# define FORCE_INLINE_ATTR __forceinline
+#else
+# define FORCE_INLINE_ATTR
+#endif
+
+/**
+ * FORCE_INLINE_TEMPLATE is used to define C "templates", which take constant
+ * parameters. They must be inlined for the compiler to elimininate the constant
+ * branches.
+ */
+#define FORCE_INLINE_TEMPLATE static INLINE_KEYWORD FORCE_INLINE_ATTR
+/**
+ * HINT_INLINE is used to help the compiler generate better code. It is *not*
+ * used for "templates", so it can be tweaked based on the compilers
+ * performance.
+ *
+ * gcc-4.8 and gcc-4.9 have been shown to benefit from leaving off the
+ * always_inline attribute.
+ *
+ * clang up to 5.0.0 (trunk) benefit tremendously from the always_inline
+ * attribute.
+ */
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 8 && __GNUC__ < 5
+# define HINT_INLINE static INLINE_KEYWORD
+#else
+# define HINT_INLINE static INLINE_KEYWORD FORCE_INLINE_ATTR
+#endif
+
+/* force no inlining */
+#ifdef _MSC_VER
+# define FORCE_NOINLINE static __declspec(noinline)
+#else
+# ifdef __GNUC__
+# define FORCE_NOINLINE static __attribute__((__noinline__))
+# else
+# define FORCE_NOINLINE static
+# endif
+#endif
+
+/* prefetch */
+#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_I86)) /* _mm_prefetch() is not defined outside of x86/x64 */
+# include <mmintrin.h> /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */
+# define PREFETCH(ptr) _mm_prefetch((const char*)ptr, _MM_HINT_T0)
+#elif defined(__GNUC__)
+# define PREFETCH(ptr) __builtin_prefetch(ptr, 0, 0)
+#else
+# define PREFETCH(ptr) /* disabled */
+#endif
+
+/* disable warnings */
+#ifdef _MSC_VER /* Visual Studio */
+# include <intrin.h> /* For Visual 2005 */
+# pragma warning(disable : 4100) /* disable: C4100: unreferenced formal parameter */
+# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
+# pragma warning(disable : 4204) /* disable: C4204: non-constant aggregate initializer */
+# pragma warning(disable : 4214) /* disable: C4214: non-int bitfields */
+# pragma warning(disable : 4324) /* disable: C4324: padded structure */
+#endif
+
+#endif /* ZSTD_COMPILER_H */
diff --git a/thirdparty/zstd/common/error_private.c b/thirdparty/zstd/common/error_private.c
index 2d752cd23a..b5b14b509c 100644
--- a/thirdparty/zstd/common/error_private.c
+++ b/thirdparty/zstd/common/error_private.c
@@ -1,10 +1,10 @@
-/**
+/*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* 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).
*/
/* The purpose of this file is to have a single list of error strings embedded in binary */
@@ -20,19 +20,17 @@ const char* ERR_getErrorString(ERR_enum code)
case PREFIX(GENERIC): return "Error (generic)";
case PREFIX(prefix_unknown): return "Unknown frame descriptor";
case PREFIX(version_unsupported): return "Version not supported";
- case PREFIX(parameter_unknown): return "Unknown parameter type";
case PREFIX(frameParameter_unsupported): return "Unsupported frame parameter";
- case PREFIX(frameParameter_unsupportedBy32bits): return "Frame parameter unsupported in 32-bits mode";
case PREFIX(frameParameter_windowTooLarge): return "Frame requires too much memory for decoding";
- case PREFIX(compressionParameter_unsupported): return "Compression parameter is not supported";
- case PREFIX(compressionParameter_outOfBound): return "Compression parameter is out of bound";
+ case PREFIX(corruption_detected): return "Corrupted block detected";
+ case PREFIX(checksum_wrong): return "Restored data doesn't match checksum";
+ case PREFIX(parameter_unsupported): return "Unsupported parameter";
+ case PREFIX(parameter_outOfBound): return "Parameter is out of bound";
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(corruption_detected): return "Corrupted block detected";
- case PREFIX(checksum_wrong): return "Restored data doesn't match checksum";
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";
diff --git a/thirdparty/zstd/common/error_private.h b/thirdparty/zstd/common/error_private.h
index 1bc2e49548..9dd9a87cfa 100644
--- a/thirdparty/zstd/common/error_private.h
+++ b/thirdparty/zstd/common/error_private.h
@@ -1,10 +1,10 @@
-/**
+/*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* 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).
*/
/* Note : this module is expected to remain private, do not expose it */
diff --git a/thirdparty/zstd/common/fse.h b/thirdparty/zstd/common/fse.h
index 6d5d41def1..1c44f83750 100644
--- a/thirdparty/zstd/common/fse.h
+++ b/thirdparty/zstd/common/fse.h
@@ -31,13 +31,14 @@
You can contact the author at :
- Source repository : https://github.com/Cyan4973/FiniteStateEntropy
****************************************************************** */
-#ifndef FSE_H
-#define FSE_H
#if defined (__cplusplus)
extern "C" {
#endif
+#ifndef FSE_H
+#define FSE_H
+
/*-*****************************************
* Dependencies
@@ -297,8 +298,10 @@ FSE_decompress_usingDTable() result will tell how many bytes were regenerated (<
If there is an error, the function will return an error code, which can be tested using FSE_isError(). (ex: dst buffer too small)
*/
+#endif /* FSE_H */
-#ifdef FSE_STATIC_LINKING_ONLY
+#if defined(FSE_STATIC_LINKING_ONLY) && !defined(FSE_H_FSE_STATIC_LINKING_ONLY)
+#define FSE_H_FSE_STATIC_LINKING_ONLY
/* *** Dependency *** */
#include "bitstream.h"
@@ -381,6 +384,11 @@ size_t FSE_buildDTable_rle (FSE_DTable* dt, unsigned char symbolValue);
size_t FSE_decompress_wksp(void* dst, size_t dstCapacity, const void* cSrc, size_t cSrcSize, FSE_DTable* workSpace, unsigned maxLog);
/**< same as FSE_decompress(), using an externally allocated `workSpace` produced with `FSE_DTABLE_SIZE_U32(maxLog)` */
+typedef enum {
+ FSE_repeat_none, /**< Cannot use the previous table */
+ FSE_repeat_check, /**< Can use the previous table but it must be checked */
+ FSE_repeat_valid /**< Can use the previous table and it is asumed to be valid */
+ } FSE_repeat;
/* *****************************************
* FSE symbol compression API
@@ -694,5 +702,3 @@ MEM_STATIC unsigned FSE_endOfDState(const FSE_DState_t* DStatePtr)
#if defined (__cplusplus)
}
#endif
-
-#endif /* FSE_H */
diff --git a/thirdparty/zstd/common/fse_decompress.c b/thirdparty/zstd/common/fse_decompress.c
index 8474a4c079..8e3f0035f6 100644
--- a/thirdparty/zstd/common/fse_decompress.c
+++ b/thirdparty/zstd/common/fse_decompress.c
@@ -34,34 +34,15 @@
/* **************************************************************
-* Compiler specifics
-****************************************************************/
-#ifdef _MSC_VER /* Visual Studio */
-# define FORCE_INLINE static __forceinline
-# include <intrin.h> /* For Visual 2005 */
-# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
-# pragma warning(disable : 4214) /* disable: C4214: non-int bitfields */
-#else
-# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
-# ifdef __GNUC__
-# define FORCE_INLINE static inline __attribute__((always_inline))
-# else
-# define FORCE_INLINE static inline
-# endif
-# else
-# define FORCE_INLINE static
-# endif /* __STDC_VERSION__ */
-#endif
-
-
-/* **************************************************************
* Includes
****************************************************************/
#include <stdlib.h> /* malloc, free, qsort */
#include <string.h> /* memcpy, memset */
#include "bitstream.h"
+#include "compiler.h"
#define FSE_STATIC_LINKING_ONLY
#include "fse.h"
+#include "error_private.h"
/* **************************************************************
@@ -216,7 +197,7 @@ size_t FSE_buildDTable_raw (FSE_DTable* dt, unsigned nbBits)
return 0;
}
-FORCE_INLINE size_t FSE_decompress_usingDTable_generic(
+FORCE_INLINE_TEMPLATE size_t FSE_decompress_usingDTable_generic(
void* dst, size_t maxDstSize,
const void* cSrc, size_t cSrcSize,
const FSE_DTable* dt, const unsigned fast)
diff --git a/thirdparty/zstd/common/huf.h b/thirdparty/zstd/common/huf.h
index dabd359915..2b3015a84c 100644
--- a/thirdparty/zstd/common/huf.h
+++ b/thirdparty/zstd/common/huf.h
@@ -31,13 +31,13 @@
You can contact the author at :
- Source repository : https://github.com/Cyan4973/FiniteStateEntropy
****************************************************************** */
-#ifndef HUF_H_298734234
-#define HUF_H_298734234
#if defined (__cplusplus)
extern "C" {
#endif
+#ifndef HUF_H_298734234
+#define HUF_H_298734234
/* *** Dependencies *** */
#include <stddef.h> /* size_t */
@@ -124,6 +124,7 @@ HUF_PUBLIC_API size_t HUF_compress4X_wksp (void* dst, size_t dstCapacity, const
#define HUF_DECOMPRESS_WORKSPACE_SIZE (2 << 10)
#define HUF_DECOMPRESS_WORKSPACE_SIZE_U32 (HUF_DECOMPRESS_WORKSPACE_SIZE / sizeof(U32))
+#endif /* HUF_H_298734234 */
/* ******************************************************************
* WARNING !!
@@ -132,7 +133,8 @@ HUF_PUBLIC_API size_t HUF_compress4X_wksp (void* dst, size_t dstCapacity, const
* because they are not guaranteed to remain stable in the future.
* Only consider them in association with static linking.
*******************************************************************/
-#ifdef HUF_STATIC_LINKING_ONLY
+#if defined(HUF_STATIC_LINKING_ONLY) && !defined(HUF_H_HUF_STATIC_LINKING_ONLY)
+#define HUF_H_HUF_STATIC_LINKING_ONLY
/* *** Dependencies *** */
#include "mem.h" /* U32 */
@@ -295,9 +297,6 @@ size_t HUF_decompress1X4_usingDTable(void* dst, size_t maxDstSize, const void* c
#endif /* HUF_STATIC_LINKING_ONLY */
-
#if defined (__cplusplus)
}
#endif
-
-#endif /* HUF_H_298734234 */
diff --git a/thirdparty/zstd/common/mem.h b/thirdparty/zstd/common/mem.h
index b0e5bf60b4..df85404fb8 100644
--- a/thirdparty/zstd/common/mem.h
+++ b/thirdparty/zstd/common/mem.h
@@ -1,10 +1,10 @@
-/**
+/*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* 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).
*/
#ifndef MEM_H_MODULE
@@ -110,7 +110,7 @@ Only use if no other choice to achieve best performance on target platform */
MEM_STATIC U16 MEM_read16(const void* memPtr) { return *(const U16*) memPtr; }
MEM_STATIC U32 MEM_read32(const void* memPtr) { return *(const U32*) memPtr; }
MEM_STATIC U64 MEM_read64(const void* memPtr) { return *(const U64*) memPtr; }
-MEM_STATIC U64 MEM_readST(const void* memPtr) { return *(const size_t*) memPtr; }
+MEM_STATIC size_t MEM_readST(const void* memPtr) { return *(const size_t*) memPtr; }
MEM_STATIC void MEM_write16(void* memPtr, U16 value) { *(U16*)memPtr = value; }
MEM_STATIC void MEM_write32(void* memPtr, U32 value) { *(U32*)memPtr = value; }
@@ -131,7 +131,7 @@ MEM_STATIC void MEM_write64(void* memPtr, U64 value) { *(U64*)memPtr = value; }
MEM_STATIC U16 MEM_read16(const void* ptr) { return ((const unalign*)ptr)->u16; }
MEM_STATIC U32 MEM_read32(const void* ptr) { return ((const unalign*)ptr)->u32; }
MEM_STATIC U64 MEM_read64(const void* ptr) { return ((const unalign*)ptr)->u64; }
-MEM_STATIC U64 MEM_readST(const void* ptr) { return ((const unalign*)ptr)->st; }
+MEM_STATIC size_t MEM_readST(const void* ptr) { return ((const unalign*)ptr)->st; }
MEM_STATIC void MEM_write16(void* memPtr, U16 value) { ((unalign*)memPtr)->u16 = value; }
MEM_STATIC void MEM_write32(void* memPtr, U32 value) { ((unalign*)memPtr)->u32 = value; }
diff --git a/thirdparty/zstd/common/pool.c b/thirdparty/zstd/common/pool.c
index 749fa4f2f7..a227044f7f 100644
--- a/thirdparty/zstd/common/pool.c
+++ b/thirdparty/zstd/common/pool.c
@@ -1,10 +1,10 @@
-/**
- * Copyright (c) 2016-present, Facebook, Inc.
+/*
+ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* 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).
*/
@@ -39,6 +39,12 @@ struct POOL_ctx_s {
size_t queueHead;
size_t queueTail;
size_t queueSize;
+
+ /* The number of threads working on jobs */
+ size_t numThreadsBusy;
+ /* Indicates if the queue is empty */
+ int queueEmpty;
+
/* The mutex protects the queue */
pthread_mutex_t queueMutex;
/* Condition variable for pushers to wait on when the queue is full */
@@ -60,30 +66,41 @@ static void* POOL_thread(void* opaque) {
for (;;) {
/* Lock the mutex and wait for a non-empty queue or until shutdown */
pthread_mutex_lock(&ctx->queueMutex);
- while (ctx->queueHead == ctx->queueTail && !ctx->shutdown) {
+
+ while (ctx->queueEmpty && !ctx->shutdown) {
pthread_cond_wait(&ctx->queuePopCond, &ctx->queueMutex);
}
/* empty => shutting down: so stop */
- if (ctx->queueHead == ctx->queueTail) {
+ if (ctx->queueEmpty) {
pthread_mutex_unlock(&ctx->queueMutex);
return opaque;
}
/* Pop a job off the queue */
{ POOL_job const job = ctx->queue[ctx->queueHead];
ctx->queueHead = (ctx->queueHead + 1) % ctx->queueSize;
+ 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);
+
job.function(job.opaque);
- }
- }
+
+ /* If the intended queue size was 0, signal after finishing job */
+ if (ctx->queueSize == 1) {
+ pthread_mutex_lock(&ctx->queueMutex);
+ ctx->numThreadsBusy--;
+ pthread_mutex_unlock(&ctx->queueMutex);
+ pthread_cond_signal(&ctx->queuePushCond);
+ } }
+ } /* for (;;) */
/* Unreachable */
}
POOL_ctx *POOL_create(size_t numThreads, size_t queueSize) {
POOL_ctx *ctx;
/* Check the parameters */
- if (!numThreads || !queueSize) { return NULL; }
+ if (!numThreads) { return NULL; }
/* Allocate the context and zero initialize */
ctx = (POOL_ctx *)calloc(1, sizeof(POOL_ctx));
if (!ctx) { return NULL; }
@@ -92,15 +109,17 @@ POOL_ctx *POOL_create(size_t numThreads, size_t queueSize) {
* and full queues.
*/
ctx->queueSize = queueSize + 1;
- ctx->queue = (POOL_job *)malloc(ctx->queueSize * sizeof(POOL_job));
+ ctx->queue = (POOL_job*) malloc(ctx->queueSize * sizeof(POOL_job));
ctx->queueHead = 0;
ctx->queueTail = 0;
- pthread_mutex_init(&ctx->queueMutex, NULL);
- pthread_cond_init(&ctx->queuePushCond, NULL);
- pthread_cond_init(&ctx->queuePopCond, NULL);
+ 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);
ctx->shutdown = 0;
/* Allocate space for the thread handles */
- ctx->threads = (pthread_t *)malloc(numThreads * sizeof(pthread_t));
+ ctx->threads = (pthread_t*)malloc(numThreads * sizeof(pthread_t));
ctx->numThreads = 0;
/* Check for errors */
if (!ctx->threads || !ctx->queue) { POOL_free(ctx); return NULL; }
@@ -153,22 +172,37 @@ size_t POOL_sizeof(POOL_ctx *ctx) {
+ ctx->numThreads * sizeof(pthread_t);
}
-void POOL_add(void *ctxVoid, POOL_function function, void *opaque) {
- POOL_ctx *ctx = (POOL_ctx *)ctxVoid;
+/**
+ * Returns 1 if the queue is full and 0 otherwise.
+ *
+ * If the queueSize is 1 (the pool was created with an intended queueSize of 0),
+ * then a queue is empty if there is a thread free and no job is waiting.
+ */
+static int isQueueFull(POOL_ctx const* ctx) {
+ if (ctx->queueSize > 1) {
+ return ctx->queueHead == ((ctx->queueTail + 1) % ctx->queueSize);
+ } else {
+ return ctx->numThreadsBusy == ctx->numThreads ||
+ !ctx->queueEmpty;
+ }
+}
+
+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);
{ POOL_job const job = {function, opaque};
+
/* Wait until there is space in the queue for the new job */
- size_t newTail = (ctx->queueTail + 1) % ctx->queueSize;
- while (ctx->queueHead == newTail && !ctx->shutdown) {
+ while (isQueueFull(ctx) && !ctx->shutdown) {
pthread_cond_wait(&ctx->queuePushCond, &ctx->queueMutex);
- newTail = (ctx->queueTail + 1) % ctx->queueSize;
}
/* The queue is still going => there is space */
if (!ctx->shutdown) {
+ ctx->queueEmpty = 0;
ctx->queue[ctx->queueTail] = job;
- ctx->queueTail = newTail;
+ ctx->queueTail = (ctx->queueTail + 1) % ctx->queueSize;
}
}
pthread_mutex_unlock(&ctx->queueMutex);
@@ -183,22 +217,22 @@ struct POOL_ctx_s {
int data;
};
-POOL_ctx *POOL_create(size_t numThreads, size_t queueSize) {
+POOL_ctx* POOL_create(size_t numThreads, size_t queueSize) {
(void)numThreads;
(void)queueSize;
- return (POOL_ctx *)malloc(sizeof(POOL_ctx));
+ return (POOL_ctx*)malloc(sizeof(POOL_ctx));
}
-void POOL_free(POOL_ctx *ctx) {
- if (ctx) free(ctx);
+void POOL_free(POOL_ctx* ctx) {
+ free(ctx);
}
-void POOL_add(void *ctx, POOL_function function, void *opaque) {
+void POOL_add(void* ctx, POOL_function function, void* opaque) {
(void)ctx;
function(opaque);
}
-size_t POOL_sizeof(POOL_ctx *ctx) {
+size_t POOL_sizeof(POOL_ctx* ctx) {
if (ctx==NULL) return 0; /* supports sizeof NULL */
return sizeof(*ctx);
}
diff --git a/thirdparty/zstd/common/pool.h b/thirdparty/zstd/common/pool.h
index 386cd674b7..264c5c9ca7 100644
--- a/thirdparty/zstd/common/pool.h
+++ b/thirdparty/zstd/common/pool.h
@@ -1,11 +1,12 @@
-/**
- * Copyright (c) 2016-present, Facebook, Inc.
+/*
+ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* 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).
*/
+
#ifndef POOL_H
#define POOL_H
@@ -19,11 +20,10 @@ extern "C" {
typedef struct POOL_ctx_s POOL_ctx;
/*! POOL_create() :
- Create a thread pool with at most `numThreads` threads.
- `numThreads` must be at least 1.
- The maximum number of queued jobs before blocking is `queueSize`.
- `queueSize` must be at least 1.
- @return : The POOL_ctx pointer on success else NULL.
+ * Create a thread pool with at most `numThreads` threads.
+ * `numThreads` must be at least 1.
+ * The maximum number of queued jobs before blocking is `queueSize`.
+ * @return : POOL_ctx pointer on success, else NULL.
*/
POOL_ctx *POOL_create(size_t numThreads, size_t queueSize);
diff --git a/thirdparty/zstd/common/threading.h b/thirdparty/zstd/common/threading.h
index c0086139ea..ab09977a86 100644
--- a/thirdparty/zstd/common/threading.h
+++ b/thirdparty/zstd/common/threading.h
@@ -1,4 +1,3 @@
-
/**
* Copyright (c) 2016 Tino Reichardt
* All rights reserved.
@@ -42,14 +41,14 @@ extern "C" {
/* mutex */
#define pthread_mutex_t CRITICAL_SECTION
-#define pthread_mutex_init(a,b) InitializeCriticalSection((a))
+#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))
/* condition variable */
#define pthread_cond_t CONDITION_VARIABLE
-#define pthread_cond_init(a, b) InitializeConditionVariable((a))
+#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))
@@ -80,14 +79,14 @@ int _pthread_join(pthread_t* thread, void** value_ptr);
#else /* ZSTD_MULTITHREAD not defined */
/* No multithreading support */
-#define pthread_mutex_t int /* #define rather than typedef, as sometimes pthread support is implicit, resulting in duplicated symbols */
-#define pthread_mutex_init(a,b)
+#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)
#define pthread_cond_t int
-#define pthread_cond_init(a,b)
+#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)
diff --git a/thirdparty/zstd/common/xxhash.c b/thirdparty/zstd/common/xxhash.c
index eb44222c5f..9d9c0e963c 100644
--- a/thirdparty/zstd/common/xxhash.c
+++ b/thirdparty/zstd/common/xxhash.c
@@ -113,19 +113,25 @@ static void* XXH_memcpy(void* dest, const void* src, size_t size) { return memcp
/* *************************************
* Compiler Specific Options
***************************************/
-#ifdef _MSC_VER /* Visual Studio */
-# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
-# define FORCE_INLINE static __forceinline
+#if defined (__GNUC__) || defined(__cplusplus) || defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
+# define INLINE_KEYWORD inline
#else
-# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
-# ifdef __GNUC__
-# define FORCE_INLINE static inline __attribute__((always_inline))
-# else
-# define FORCE_INLINE static inline
-# endif
-# else
-# define FORCE_INLINE static
-# endif /* __STDC_VERSION__ */
+# define INLINE_KEYWORD
+#endif
+
+#if defined(__GNUC__)
+# define FORCE_INLINE_ATTR __attribute__((always_inline))
+#elif defined(_MSC_VER)
+# define FORCE_INLINE_ATTR __forceinline
+#else
+# define FORCE_INLINE_ATTR
+#endif
+
+#define FORCE_INLINE_TEMPLATE static INLINE_KEYWORD FORCE_INLINE_ATTR
+
+
+#ifdef _MSC_VER
+# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
#endif
@@ -248,7 +254,7 @@ typedef enum { XXH_bigEndian=0, XXH_littleEndian=1 } XXH_endianess;
*****************************/
typedef enum { XXH_aligned, XXH_unaligned } XXH_alignment;
-FORCE_INLINE U32 XXH_readLE32_align(const void* ptr, XXH_endianess endian, XXH_alignment align)
+FORCE_INLINE_TEMPLATE U32 XXH_readLE32_align(const void* ptr, XXH_endianess endian, XXH_alignment align)
{
if (align==XXH_unaligned)
return endian==XXH_littleEndian ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr));
@@ -256,7 +262,7 @@ FORCE_INLINE U32 XXH_readLE32_align(const void* ptr, XXH_endianess endian, XXH_a
return endian==XXH_littleEndian ? *(const U32*)ptr : XXH_swap32(*(const U32*)ptr);
}
-FORCE_INLINE U32 XXH_readLE32(const void* ptr, XXH_endianess endian)
+FORCE_INLINE_TEMPLATE U32 XXH_readLE32(const void* ptr, XXH_endianess endian)
{
return XXH_readLE32_align(ptr, endian, XXH_unaligned);
}
@@ -266,7 +272,7 @@ static U32 XXH_readBE32(const void* ptr)
return XXH_CPU_LITTLE_ENDIAN ? XXH_swap32(XXH_read32(ptr)) : XXH_read32(ptr);
}
-FORCE_INLINE U64 XXH_readLE64_align(const void* ptr, XXH_endianess endian, XXH_alignment align)
+FORCE_INLINE_TEMPLATE U64 XXH_readLE64_align(const void* ptr, XXH_endianess endian, XXH_alignment align)
{
if (align==XXH_unaligned)
return endian==XXH_littleEndian ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr));
@@ -274,7 +280,7 @@ FORCE_INLINE U64 XXH_readLE64_align(const void* ptr, XXH_endianess endian, XXH_a
return endian==XXH_littleEndian ? *(const U64*)ptr : XXH_swap64(*(const U64*)ptr);
}
-FORCE_INLINE U64 XXH_readLE64(const void* ptr, XXH_endianess endian)
+FORCE_INLINE_TEMPLATE U64 XXH_readLE64(const void* ptr, XXH_endianess endian)
{
return XXH_readLE64_align(ptr, endian, XXH_unaligned);
}
@@ -335,7 +341,7 @@ static U32 XXH32_round(U32 seed, U32 input)
return seed;
}
-FORCE_INLINE U32 XXH32_endian_align(const void* input, size_t len, U32 seed, XXH_endianess endian, XXH_alignment align)
+FORCE_INLINE_TEMPLATE U32 XXH32_endian_align(const void* input, size_t len, U32 seed, XXH_endianess endian, XXH_alignment align)
{
const BYTE* p = (const BYTE*)input;
const BYTE* bEnd = p + len;
@@ -435,7 +441,7 @@ static U64 XXH64_mergeRound(U64 acc, U64 val)
return acc;
}
-FORCE_INLINE U64 XXH64_endian_align(const void* input, size_t len, U64 seed, XXH_endianess endian, XXH_alignment align)
+FORCE_INLINE_TEMPLATE U64 XXH64_endian_align(const void* input, size_t len, U64 seed, XXH_endianess endian, XXH_alignment align)
{
const BYTE* p = (const BYTE*)input;
const BYTE* const bEnd = p + len;
@@ -584,7 +590,7 @@ XXH_PUBLIC_API XXH_errorcode XXH64_reset(XXH64_state_t* statePtr, unsigned long
}
-FORCE_INLINE XXH_errorcode XXH32_update_endian (XXH32_state_t* state, const void* input, size_t len, XXH_endianess endian)
+FORCE_INLINE_TEMPLATE XXH_errorcode XXH32_update_endian (XXH32_state_t* state, const void* input, size_t len, XXH_endianess endian)
{
const BYTE* p = (const BYTE*)input;
const BYTE* const bEnd = p + len;
@@ -654,7 +660,7 @@ XXH_PUBLIC_API XXH_errorcode XXH32_update (XXH32_state_t* state_in, const void*
-FORCE_INLINE U32 XXH32_digest_endian (const XXH32_state_t* state, XXH_endianess endian)
+FORCE_INLINE_TEMPLATE U32 XXH32_digest_endian (const XXH32_state_t* state, XXH_endianess endian)
{
const BYTE * p = (const BYTE*)state->mem32;
const BYTE* const bEnd = (const BYTE*)(state->mem32) + state->memsize;
@@ -704,7 +710,7 @@ XXH_PUBLIC_API unsigned int XXH32_digest (const XXH32_state_t* state_in)
/* **** XXH64 **** */
-FORCE_INLINE XXH_errorcode XXH64_update_endian (XXH64_state_t* state, const void* input, size_t len, XXH_endianess endian)
+FORCE_INLINE_TEMPLATE XXH_errorcode XXH64_update_endian (XXH64_state_t* state, const void* input, size_t len, XXH_endianess endian)
{
const BYTE* p = (const BYTE*)input;
const BYTE* const bEnd = p + len;
@@ -771,7 +777,7 @@ XXH_PUBLIC_API XXH_errorcode XXH64_update (XXH64_state_t* state_in, const void*
-FORCE_INLINE U64 XXH64_digest_endian (const XXH64_state_t* state, XXH_endianess endian)
+FORCE_INLINE_TEMPLATE U64 XXH64_digest_endian (const XXH64_state_t* state, XXH_endianess endian)
{
const BYTE * p = (const BYTE*)state->mem64;
const BYTE* const bEnd = (const BYTE*)state->mem64 + state->memsize;
diff --git a/thirdparty/zstd/common/zstd_common.c b/thirdparty/zstd/common/zstd_common.c
index f681672381..08384cabf5 100644
--- a/thirdparty/zstd/common/zstd_common.c
+++ b/thirdparty/zstd/common/zstd_common.c
@@ -1,10 +1,10 @@
-/**
+/*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* 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).
*/
diff --git a/thirdparty/zstd/common/zstd_errors.h b/thirdparty/zstd/common/zstd_errors.h
index 19f1597aa3..a69387b714 100644
--- a/thirdparty/zstd/common/zstd_errors.h
+++ b/thirdparty/zstd/common/zstd_errors.h
@@ -1,10 +1,10 @@
-/**
+/*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* 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).
*/
#ifndef ZSTD_ERRORS_H_398273423
@@ -37,43 +37,41 @@ extern "C" {
/*-****************************************
* error codes list
* note : this API is still considered unstable
- * it should not be used with a dynamic library
+ * and shall not be used with a dynamic library.
* only static linking is allowed
******************************************/
typedef enum {
- ZSTD_error_no_error,
- ZSTD_error_GENERIC,
- ZSTD_error_prefix_unknown,
- ZSTD_error_version_unsupported,
- ZSTD_error_parameter_unknown,
- ZSTD_error_frameParameter_unsupported,
- ZSTD_error_frameParameter_unsupportedBy32bits,
- ZSTD_error_frameParameter_windowTooLarge,
- ZSTD_error_compressionParameter_unsupported,
- ZSTD_error_compressionParameter_outOfBound,
- ZSTD_error_init_missing,
- ZSTD_error_memory_allocation,
- ZSTD_error_stage_wrong,
- ZSTD_error_dstSize_tooSmall,
- ZSTD_error_srcSize_wrong,
- ZSTD_error_corruption_detected,
- ZSTD_error_checksum_wrong,
- ZSTD_error_tableLog_tooLarge,
- ZSTD_error_maxSymbolValue_tooLarge,
- ZSTD_error_maxSymbolValue_tooSmall,
- ZSTD_error_dictionary_corrupted,
- ZSTD_error_dictionary_wrong,
- ZSTD_error_dictionaryCreation_failed,
- ZSTD_error_frameIndex_tooLarge,
- ZSTD_error_seekableIO,
- ZSTD_error_maxCode
+ ZSTD_error_no_error = 0,
+ ZSTD_error_GENERIC = 1,
+ ZSTD_error_prefix_unknown = 10,
+ ZSTD_error_version_unsupported = 12,
+ ZSTD_error_frameParameter_unsupported = 14,
+ ZSTD_error_frameParameter_windowTooLarge = 16,
+ ZSTD_error_corruption_detected = 20,
+ ZSTD_error_checksum_wrong = 22,
+ ZSTD_error_dictionary_corrupted = 30,
+ ZSTD_error_dictionary_wrong = 32,
+ ZSTD_error_dictionaryCreation_failed = 34,
+ ZSTD_error_parameter_unsupported = 40,
+ ZSTD_error_parameter_outOfBound = 42,
+ ZSTD_error_tableLog_tooLarge = 44,
+ ZSTD_error_maxSymbolValue_tooLarge = 46,
+ ZSTD_error_maxSymbolValue_tooSmall = 48,
+ ZSTD_error_stage_wrong = 60,
+ ZSTD_error_init_missing = 62,
+ ZSTD_error_memory_allocation = 64,
+ ZSTD_error_dstSize_tooSmall = 70,
+ ZSTD_error_srcSize_wrong = 72,
+ 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_ErrorCode;
/*! ZSTD_getErrorCode() :
convert a `size_t` function result into a `ZSTD_ErrorCode` enum type,
which can be used to compare with enum list published above */
ZSTDERRORLIB_API ZSTD_ErrorCode ZSTD_getErrorCode(size_t functionResult);
-ZSTDERRORLIB_API const char* ZSTD_getErrorString(ZSTD_ErrorCode code);
+ZSTDERRORLIB_API const char* ZSTD_getErrorString(ZSTD_ErrorCode code); /**< Same as ZSTD_getErrorName, but using a `ZSTD_ErrorCode` enum argument */
#if defined (__cplusplus)
diff --git a/thirdparty/zstd/common/zstd_internal.h b/thirdparty/zstd/common/zstd_internal.h
index 49a4796476..2610528608 100644
--- a/thirdparty/zstd/common/zstd_internal.h
+++ b/thirdparty/zstd/common/zstd_internal.h
@@ -1,55 +1,28 @@
-/**
+/*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* 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).
*/
#ifndef ZSTD_CCOMMON_H_MODULE
#define ZSTD_CCOMMON_H_MODULE
-/*-*******************************************************
-* Compiler specifics
-*********************************************************/
-#ifdef _MSC_VER /* Visual Studio */
-# define FORCE_INLINE static __forceinline
-# include <intrin.h> /* For Visual 2005 */
-# pragma warning(disable : 4100) /* disable: C4100: unreferenced formal parameter */
-# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
-# pragma warning(disable : 4204) /* disable: C4204: non-constant aggregate initializer */
-# pragma warning(disable : 4324) /* disable: C4324: padded structure */
-#else
-# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
-# ifdef __GNUC__
-# define FORCE_INLINE static inline __attribute__((always_inline))
-# else
-# define FORCE_INLINE static inline
-# endif
-# else
-# define FORCE_INLINE static
-# endif /* __STDC_VERSION__ */
-#endif
-
-#ifdef _MSC_VER
-# define FORCE_NOINLINE static __declspec(noinline)
-#else
-# ifdef __GNUC__
-# define FORCE_NOINLINE static __attribute__((__noinline__))
-# else
-# define FORCE_NOINLINE static
-# endif
-#endif
-
/*-*************************************
* Dependencies
***************************************/
+#include "compiler.h"
#include "mem.h"
#include "error_private.h"
#define ZSTD_STATIC_LINKING_ONLY
#include "zstd.h"
+#define FSE_STATIC_LINKING_ONLY
+#include "fse.h"
+#define HUF_STATIC_LINKING_ONLY
+#include "huf.h"
#ifndef XXH_STATIC_LINKING_ONLY
# define XXH_STATIC_LINKING_ONLY /* XXH64_state_t */
#endif
@@ -211,20 +184,6 @@ MEM_STATIC void ZSTD_wildcopy_e(void* dst, const void* src, void* dstEnd) /* s
*********************************************/
typedef struct ZSTD_stats_s ZSTD_stats_t;
-typedef struct {
- U32 off;
- U32 len;
-} ZSTD_match_t;
-
-typedef struct {
- U32 price;
- U32 off;
- U32 mlen;
- U32 litlen;
- U32 rep[ZSTD_REP_NUM];
-} ZSTD_optimal_t;
-
-
typedef struct seqDef_s {
U32 offset;
U16 litLength;
@@ -242,13 +201,31 @@ typedef struct {
BYTE* ofCode;
U32 longLengthID; /* 0 == no longLength; 1 == Lit.longLength; 2 == Match.longLength; */
U32 longLengthPos;
- /* opt */
- ZSTD_optimal_t* priceTable;
- ZSTD_match_t* matchTable;
- U32* matchLengthFreq;
- U32* litLengthFreq;
+ U32 rep[ZSTD_REP_NUM];
+ U32 repToConfirm[ZSTD_REP_NUM];
+} seqStore_t;
+
+typedef struct {
+ U32 off;
+ U32 len;
+} ZSTD_match_t;
+
+typedef struct {
+ U32 price;
+ U32 off;
+ U32 mlen;
+ U32 litlen;
+ U32 rep[ZSTD_REP_NUM];
+} ZSTD_optimal_t;
+
+typedef struct {
U32* litFreq;
+ U32* litLengthFreq;
+ U32* matchLengthFreq;
U32* offCodeFreq;
+ ZSTD_match_t* matchTable;
+ ZSTD_optimal_t* priceTable;
+
U32 matchLengthSum;
U32 matchSum;
U32 litLengthSum;
@@ -264,7 +241,19 @@ typedef struct {
U32 cachedPrice;
U32 cachedLitLength;
const BYTE* cachedLiterals;
-} seqStore_t;
+} optState_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)];
+ FSE_CTable litlengthCTable[FSE_CTABLE_SIZE_U32(LLFSELog, MaxLL)];
+ U32 workspace[HUF_WORKSPACE_SIZE_U32];
+ HUF_repeat hufCTable_repeatMode;
+ FSE_repeat offcode_repeatMode;
+ FSE_repeat matchlength_repeatMode;
+ FSE_repeat litlength_repeatMode;
+} ZSTD_entropyCTables_t;
const seqStore_t* ZSTD_getSeqStore(const ZSTD_CCtx* ctx);
void ZSTD_seqToCodes(const seqStore_t* seqStorePtr);
@@ -338,9 +327,9 @@ typedef struct {
} blockProperties_t;
/*! ZSTD_getcBlockSize() :
- * Provides the size of compressed block from block header `src` */
- size_t ZSTD_getcBlockSize(const void* src, size_t srcSize,
- blockProperties_t* bpPtr);
+* Provides the size of compressed block from block header `src` */
+size_t ZSTD_getcBlockSize(const void* src, size_t srcSize,
+ blockProperties_t* bpPtr);
#endif /* ZSTD_CCOMMON_H_MODULE */
diff --git a/thirdparty/zstd/compress/fse_compress.c b/thirdparty/zstd/compress/fse_compress.c
index 26e8052ddc..cc9fa73514 100644
--- a/thirdparty/zstd/compress/fse_compress.c
+++ b/thirdparty/zstd/compress/fse_compress.c
@@ -33,40 +33,22 @@
****************************************************************** */
/* **************************************************************
-* Compiler specifics
-****************************************************************/
-#ifdef _MSC_VER /* Visual Studio */
-# define FORCE_INLINE static __forceinline
-# include <intrin.h> /* For Visual 2005 */
-# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
-# pragma warning(disable : 4214) /* disable: C4214: non-int bitfields */
-#else
-# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
-# ifdef __GNUC__
-# define FORCE_INLINE static inline __attribute__((always_inline))
-# else
-# define FORCE_INLINE static inline
-# endif
-# else
-# define FORCE_INLINE static
-# endif /* __STDC_VERSION__ */
-#endif
-
-
-/* **************************************************************
* Includes
****************************************************************/
#include <stdlib.h> /* malloc, free, qsort */
#include <string.h> /* memcpy, memset */
#include <stdio.h> /* printf (debug) */
#include "bitstream.h"
+#include "compiler.h"
#define FSE_STATIC_LINKING_ONLY
#include "fse.h"
+#include "error_private.h"
/* **************************************************************
* Error Management
****************************************************************/
+#define FSE_isError ERR_isError
#define FSE_STATIC_ASSERT(c) { enum { FSE_static_assert = 1/(int)(!!(c)) }; } /* use only *after* variable declarations */
@@ -781,7 +763,7 @@ size_t FSE_compress_usingCTable (void* dst, size_t dstSize,
size_t FSE_compressBound(size_t size) { return FSE_COMPRESSBOUND(size); }
-#define CHECK_V_F(e, f) size_t const e = f; if (ERR_isError(e)) return f
+#define CHECK_V_F(e, f) size_t const e = f; if (ERR_isError(e)) return e
#define CHECK_F(f) { CHECK_V_F(_var_err__, f); }
/* FSE_compress_wksp() :
diff --git a/thirdparty/zstd/compress/huf_compress.c b/thirdparty/zstd/compress/huf_compress.c
index 7af0789a9c..2a47c18205 100644
--- a/thirdparty/zstd/compress/huf_compress.c
+++ b/thirdparty/zstd/compress/huf_compress.c
@@ -50,13 +50,15 @@
#include "fse.h" /* header compression */
#define HUF_STATIC_LINKING_ONLY
#include "huf.h"
+#include "error_private.h"
/* **************************************************************
* Error Management
****************************************************************/
+#define HUF_isError ERR_isError
#define HUF_STATIC_ASSERT(c) { enum { HUF_static_assert = 1/(int)(!!(c)) }; } /* use only *after* variable declarations */
-#define CHECK_V_F(e, f) size_t const e = f; if (ERR_isError(e)) return f
+#define CHECK_V_F(e, f) size_t const e = f; if (ERR_isError(e)) return e
#define CHECK_F(f) { CHECK_V_F(_var_err__, f); }
@@ -436,7 +438,7 @@ static void HUF_encodeSymbol(BIT_CStream_t* bitCPtr, U32 symbol, const HUF_CElt*
size_t HUF_compressBound(size_t size) { return HUF_COMPRESSBOUND(size); }
-#define HUF_FLUSHBITS(s) (fast ? BIT_flushBitsFast(s) : BIT_flushBits(s))
+#define HUF_FLUSHBITS(s) BIT_flushBits(s)
#define HUF_FLUSHBITS_1(stream) \
if (sizeof((stream)->bitContainer)*8 < HUF_TABLELOG_MAX*2+7) HUF_FLUSHBITS(stream)
@@ -451,7 +453,6 @@ size_t HUF_compress1X_usingCTable(void* dst, size_t dstSize, const void* src, si
BYTE* const oend = ostart + dstSize;
BYTE* op = ostart;
size_t n;
- const unsigned fast = (dstSize >= HUF_BLOCKBOUND(srcSize));
BIT_CStream_t bitC;
/* init */
diff --git a/thirdparty/zstd/compress/zstd_compress.c b/thirdparty/zstd/compress/zstd_compress.c
index 9300357f2d..0322c03eb3 100644
--- a/thirdparty/zstd/compress/zstd_compress.c
+++ b/thirdparty/zstd/compress/zstd_compress.c
@@ -1,10 +1,10 @@
-/**
+/*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* 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).
*/
@@ -36,13 +36,6 @@ static const U32 g_searchStrength = 8; /* control skip over incompressible dat
#define HASH_READ_SIZE 8
typedef enum { ZSTDcs_created=0, ZSTDcs_init, ZSTDcs_ongoing, ZSTDcs_ending } ZSTD_compressionStage_e;
-/* entropy tables always have same size */
-static size_t const hufCTable_size = HUF_CTABLE_SIZE(255);
-static size_t const litlengthCTable_size = FSE_CTABLE_SIZE(LLFSELog, MaxLL);
-static size_t const offcodeCTable_size = FSE_CTABLE_SIZE(OffFSELog, MaxOff);
-static size_t const matchlengthCTable_size = FSE_CTABLE_SIZE(MLFSELog, MaxML);
-static size_t const entropyScratchSpace_size = HUF_WORKSPACE_SIZE;
-
/*-*************************************
* Helper functions
@@ -89,8 +82,6 @@ struct ZSTD_CCtx_s {
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 rep[ZSTD_REP_NUM];
- U32 repToConfirm[ZSTD_REP_NUM];
U32 dictID;
int compressionLevel;
ZSTD_parameters requestedParams;
@@ -105,16 +96,11 @@ struct ZSTD_CCtx_s {
size_t staticSize;
seqStore_t seqStore; /* sequences storage ptrs */
+ optState_t optState;
U32* hashTable;
U32* hashTable3;
U32* chainTable;
- HUF_repeat hufCTable_repeatMode;
- HUF_CElt* hufCTable;
- U32 fseCTables_ready;
- FSE_CTable* offcodeCTable;
- FSE_CTable* matchlengthCTable;
- FSE_CTable* litlengthCTable;
- unsigned* entropyScratchSpace;
+ ZSTD_entropyCTables_t* entropy;
/* streaming */
char* inBuff;
@@ -174,19 +160,9 @@ ZSTD_CCtx* ZSTD_initStaticCCtx(void *workspace, size_t workspaceSize)
cctx->workSpaceSize = workspaceSize - sizeof(ZSTD_CCtx);
/* entropy space (never moves) */
- /* note : this code should be shared with resetCCtx, rather than copy/pasted */
- { void* ptr = cctx->workSpace;
- cctx->hufCTable = (HUF_CElt*)ptr;
- ptr = (char*)cctx->hufCTable + hufCTable_size;
- cctx->offcodeCTable = (FSE_CTable*) ptr;
- ptr = (char*)ptr + offcodeCTable_size;
- cctx->matchlengthCTable = (FSE_CTable*) ptr;
- ptr = (char*)ptr + matchlengthCTable_size;
- cctx->litlengthCTable = (FSE_CTable*) ptr;
- ptr = (char*)ptr + litlengthCTable_size;
- assert(((size_t)ptr & 3) == 0); /* ensure correct alignment */
- cctx->entropyScratchSpace = (unsigned*) ptr;
- }
+ if (cctx->workSpaceSize < sizeof(ZSTD_entropyCTables_t)) return NULL;
+ assert(((size_t)cctx->workSpace & 7) == 0); /* ensure correct alignment */
+ cctx->entropy = (ZSTD_entropyCTables_t*)cctx->workSpace;
return cctx;
}
@@ -237,7 +213,7 @@ size_t ZSTD_setCCtxParameter(ZSTD_CCtx* cctx, ZSTD_CCtxParameter param, unsigned
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_unknown);
+ default: return ERROR(parameter_unsupported);
}
}
@@ -251,9 +227,9 @@ static void ZSTD_cLevelToCParams(ZSTD_CCtx* cctx)
cctx->compressionLevel = ZSTD_CLEVEL_CUSTOM;
}
-#define CLAMPCHECK(val,min,max) { \
- if (((val)<(min)) | ((val)>(max))) { \
- return ERROR(compressionParameter_outOfBound); \
+#define CLAMPCHECK(val,min,max) { \
+ if (((val)<(min)) | ((val)>(max))) { \
+ return ERROR(parameter_outOfBound); \
} }
size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, unsigned value)
@@ -349,7 +325,7 @@ size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, unsigned v
/* 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(compressionParameter_outOfBound);
+ return ERROR(parameter_outOfBound);
cctx->dictMode = (ZSTD_dictMode_e)value;
return 0;
@@ -370,31 +346,31 @@ size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, unsigned v
if (value==0) return 0;
DEBUGLOG(5, " setting nbThreads : %u", value);
#ifndef ZSTD_MULTITHREAD
- if (value > 1) return ERROR(compressionParameter_unsupported);
+ if (value > 1) return ERROR(parameter_unsupported);
#endif
if ((value>1) && (cctx->nbThreads != value)) {
if (cctx->staticSize) /* MT not compatible with static alloc */
- return ERROR(compressionParameter_unsupported);
+ return ERROR(parameter_unsupported);
ZSTDMT_freeCCtx(cctx->mtctx);
cctx->nbThreads = 1;
- cctx->mtctx = ZSTDMT_createCCtx(value);
+ cctx->mtctx = ZSTDMT_createCCtx_advanced(value, cctx->customMem);
if (cctx->mtctx == NULL) return ERROR(memory_allocation);
}
cctx->nbThreads = value;
return 0;
case ZSTD_p_jobSize:
- if (cctx->nbThreads <= 1) return ERROR(compressionParameter_unsupported);
+ if (cctx->nbThreads <= 1) return ERROR(parameter_unsupported);
assert(cctx->mtctx != NULL);
return ZSTDMT_setMTCtxParameter(cctx->mtctx, ZSTDMT_p_sectionSize, value);
case ZSTD_p_overlapSizeLog:
DEBUGLOG(5, " setting overlap with nbThreads == %u", cctx->nbThreads);
- if (cctx->nbThreads <= 1) return ERROR(compressionParameter_unsupported);
+ if (cctx->nbThreads <= 1) return ERROR(parameter_unsupported);
assert(cctx->mtctx != NULL);
return ZSTDMT_setMTCtxParameter(cctx->mtctx, ZSTDMT_p_overlapSectionLog, value);
- default: return ERROR(parameter_unknown);
+ default: return ERROR(parameter_unsupported);
}
}
@@ -474,7 +450,8 @@ size_t ZSTD_checkCParams(ZSTD_compressionParameters cParams)
CLAMPCHECK(cParams.searchLog, ZSTD_SEARCHLOG_MIN, ZSTD_SEARCHLOG_MAX);
CLAMPCHECK(cParams.searchLength, ZSTD_SEARCHLENGTH_MIN, ZSTD_SEARCHLENGTH_MAX);
CLAMPCHECK(cParams.targetLength, ZSTD_TARGETLENGTH_MIN, ZSTD_TARGETLENGTH_MAX);
- if ((U32)(cParams.strategy) > (U32)ZSTD_btultra) return ERROR(compressionParameter_unsupported);
+ if ((U32)(cParams.strategy) > (U32)ZSTD_btultra)
+ return ERROR(parameter_unsupported);
return 0;
}
@@ -551,9 +528,7 @@ size_t ZSTD_estimateCCtxSize_advanced(ZSTD_compressionParameters cParams)
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 = hufCTable_size + litlengthCTable_size
- + offcodeCTable_size + matchlengthCTable_size
- + entropyScratchSpace_size;
+ 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)
@@ -620,8 +595,8 @@ static size_t ZSTD_continueCCtx(ZSTD_CCtx* cctx, ZSTD_parameters params, U64 ple
cctx->stage = ZSTDcs_init;
cctx->dictID = 0;
cctx->loadedDictEnd = 0;
- { int i; for (i=0; i<ZSTD_REP_NUM; i++) cctx->rep[i] = repStartValue[i]; }
- cctx->seqStore.litLengthSum = 0; /* force reset of btopt stats */
+ { int i; for (i=0; i<ZSTD_REP_NUM; i++) cctx->seqStore.rep[i] = repStartValue[i]; }
+ cctx->optState.litLengthSum = 0; /* force reset of btopt stats */
XXH64_reset(&cctx->xxhState, 0);
return 0;
}
@@ -641,8 +616,10 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc,
if (crp == ZSTDcrp_continue) {
if (ZSTD_equivalentParams(params.cParams, zc->appliedParams.cParams)) {
DEBUGLOG(5, "ZSTD_equivalentParams()==1");
- zc->fseCTables_ready = 0;
- zc->hufCTable_repeatMode = HUF_repeat_none;
+ zc->entropy->hufCTable_repeatMode = HUF_repeat_none;
+ zc->entropy->offcode_repeatMode = FSE_repeat_none;
+ zc->entropy->matchlength_repeatMode = FSE_repeat_none;
+ zc->entropy->litlength_repeatMode = FSE_repeat_none;
return ZSTD_continueCCtx(zc, params, pledgedSrcSize);
} }
@@ -662,9 +639,7 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc,
void* ptr;
/* Check if workSpace is large enough, alloc a new one if needed */
- { size_t const entropySpace = hufCTable_size + litlengthCTable_size
- + offcodeCTable_size + matchlengthCTable_size
- + entropyScratchSpace_size;
+ { size_t const entropySpace = sizeof(ZSTD_entropyCTables_t);
size_t const optPotentialSpace = ((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 = ( (params.cParams.strategy == ZSTD_btopt)
@@ -689,16 +664,9 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc,
ptr = zc->workSpace;
/* entropy space */
- zc->hufCTable = (HUF_CElt*)ptr;
- ptr = (char*)zc->hufCTable + hufCTable_size; /* note : HUF_CElt* is incomplete type, size is estimated via macro */
- zc->offcodeCTable = (FSE_CTable*) ptr;
- ptr = (char*)ptr + offcodeCTable_size;
- zc->matchlengthCTable = (FSE_CTable*) ptr;
- ptr = (char*)ptr + matchlengthCTable_size;
- zc->litlengthCTable = (FSE_CTable*) ptr;
- ptr = (char*)ptr + litlengthCTable_size;
- assert(((size_t)ptr & 3) == 0); /* ensure correct alignment */
- zc->entropyScratchSpace = (unsigned*) ptr;
+ assert(((size_t)zc->workSpace & 3) == 0); /* ensure correct alignment */
+ assert(zc->workSpaceSize >= sizeof(ZSTD_entropyCTables_t));
+ zc->entropy = (ZSTD_entropyCTables_t*)zc->workSpace;
} }
/* init params */
@@ -715,39 +683,35 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc,
zc->stage = ZSTDcs_init;
zc->dictID = 0;
zc->loadedDictEnd = 0;
- zc->fseCTables_ready = 0;
- zc->hufCTable_repeatMode = HUF_repeat_none;
+ zc->entropy->hufCTable_repeatMode = HUF_repeat_none;
+ zc->entropy->offcode_repeatMode = FSE_repeat_none;
+ zc->entropy->matchlength_repeatMode = FSE_repeat_none;
+ zc->entropy->litlength_repeatMode = FSE_repeat_none;
zc->nextToUpdate = 1;
zc->nextSrc = NULL;
zc->base = NULL;
zc->dictBase = NULL;
zc->dictLimit = 0;
zc->lowLimit = 0;
- { int i; for (i=0; i<ZSTD_REP_NUM; i++) zc->rep[i] = repStartValue[i]; }
+ { int i; for (i=0; i<ZSTD_REP_NUM; i++) zc->seqStore.rep[i] = repStartValue[i]; }
zc->hashLog3 = hashLog3;
- zc->seqStore.litLengthSum = 0;
+ zc->optState.litLengthSum = 0;
- /* ensure entropy tables are close together at the beginning */
- assert((void*)zc->hufCTable == zc->workSpace);
- assert((char*)zc->offcodeCTable == (char*)zc->hufCTable + hufCTable_size);
- assert((char*)zc->matchlengthCTable == (char*)zc->offcodeCTable + offcodeCTable_size);
- assert((char*)zc->litlengthCTable == (char*)zc->matchlengthCTable + matchlengthCTable_size);
- assert((char*)zc->entropyScratchSpace == (char*)zc->litlengthCTable + litlengthCTable_size);
- ptr = (char*)zc->entropyScratchSpace + entropyScratchSpace_size;
+ ptr = zc->entropy + 1;
/* opt parser space */
if ((params.cParams.strategy == ZSTD_btopt) || (params.cParams.strategy == ZSTD_btultra)) {
DEBUGLOG(5, "reserving optimal parser space");
assert(((size_t)ptr & 3) == 0); /* ensure ptr is properly aligned */
- zc->seqStore.litFreq = (U32*)ptr;
- zc->seqStore.litLengthFreq = zc->seqStore.litFreq + (1<<Litbits);
- zc->seqStore.matchLengthFreq = zc->seqStore.litLengthFreq + (MaxLL+1);
- zc->seqStore.offCodeFreq = zc->seqStore.matchLengthFreq + (MaxML+1);
- ptr = zc->seqStore.offCodeFreq + (MaxOff+1);
- zc->seqStore.matchTable = (ZSTD_match_t*)ptr;
- ptr = zc->seqStore.matchTable + ZSTD_OPT_NUM+1;
- zc->seqStore.priceTable = (ZSTD_optimal_t*)ptr;
- ptr = zc->seqStore.priceTable + ZSTD_OPT_NUM+1;
+ zc->optState.litFreq = (U32*)ptr;
+ zc->optState.litLengthFreq = zc->optState.litFreq + (1<<Litbits);
+ zc->optState.matchLengthFreq = zc->optState.litLengthFreq + (MaxLL+1);
+ zc->optState.offCodeFreq = zc->optState.matchLengthFreq + (MaxML+1);
+ ptr = zc->optState.offCodeFreq + (MaxOff+1);
+ zc->optState.matchTable = (ZSTD_match_t*)ptr;
+ ptr = zc->optState.matchTable + ZSTD_OPT_NUM+1;
+ zc->optState.priceTable = (ZSTD_optimal_t*)ptr;
+ ptr = zc->optState.priceTable + ZSTD_OPT_NUM+1;
}
/* table Space */
@@ -783,7 +747,7 @@ static size_t ZSTD_resetCCtx_internal(ZSTD_CCtx* zc,
* do not use with extDict variant ! */
void ZSTD_invalidateRepCodes(ZSTD_CCtx* cctx) {
int i;
- for (i=0; i<ZSTD_REP_NUM; i++) cctx->rep[i] = 0;
+ for (i=0; i<ZSTD_REP_NUM; i++) cctx->seqStore.rep[i] = 0;
}
@@ -830,16 +794,7 @@ static size_t ZSTD_copyCCtx_internal(ZSTD_CCtx* dstCCtx,
dstCCtx->dictID = srcCCtx->dictID;
/* copy entropy tables */
- dstCCtx->fseCTables_ready = srcCCtx->fseCTables_ready;
- if (srcCCtx->fseCTables_ready) {
- memcpy(dstCCtx->litlengthCTable, srcCCtx->litlengthCTable, litlengthCTable_size);
- memcpy(dstCCtx->matchlengthCTable, srcCCtx->matchlengthCTable, matchlengthCTable_size);
- memcpy(dstCCtx->offcodeCTable, srcCCtx->offcodeCTable, offcodeCTable_size);
- }
- dstCCtx->hufCTable_repeatMode = srcCCtx->hufCTable_repeatMode;
- if (srcCCtx->hufCTable_repeatMode) {
- memcpy(dstCCtx->hufCTable, srcCCtx->hufCTable, hufCTable_size);
- }
+ memcpy(dstCCtx->entropy, srcCCtx->entropy, sizeof(ZSTD_entropyCTables_t));
return 0;
}
@@ -956,7 +911,8 @@ static size_t ZSTD_compressRleLiteralsBlock (void* dst, size_t dstCapacity, cons
static size_t ZSTD_minGain(size_t srcSize) { return (srcSize >> 6) + 2; }
-static size_t ZSTD_compressLiterals (ZSTD_CCtx* zc,
+static size_t ZSTD_compressLiterals (ZSTD_entropyCTables_t * entropy,
+ ZSTD_strategy strategy,
void* dst, size_t dstCapacity,
const void* src, size_t srcSize)
{
@@ -970,28 +926,28 @@ static size_t ZSTD_compressLiterals (ZSTD_CCtx* zc,
/* small ? don't even attempt compression (speed opt) */
# define LITERAL_NOENTROPY 63
- { size_t const minLitSize = zc->hufCTable_repeatMode == HUF_repeat_valid ? 6 : LITERAL_NOENTROPY;
+ { size_t const minLitSize = entropy->hufCTable_repeatMode == HUF_repeat_valid ? 6 : LITERAL_NOENTROPY;
if (srcSize <= minLitSize) return ZSTD_noCompressLiterals(dst, dstCapacity, src, srcSize);
}
if (dstCapacity < lhSize+1) return ERROR(dstSize_tooSmall); /* not enough space for compression */
- { HUF_repeat repeat = zc->hufCTable_repeatMode;
- int const preferRepeat = zc->appliedParams.cParams.strategy < ZSTD_lazy ? srcSize <= 1024 : 0;
+ { HUF_repeat repeat = entropy->hufCTable_repeatMode;
+ int const preferRepeat = strategy < ZSTD_lazy ? srcSize <= 1024 : 0;
if (repeat == HUF_repeat_valid && lhSize == 3) singleStream = 1;
cLitSize = singleStream ? HUF_compress1X_repeat(ostart+lhSize, dstCapacity-lhSize, src, srcSize, 255, 11,
- zc->entropyScratchSpace, entropyScratchSpace_size, zc->hufCTable, &repeat, preferRepeat)
+ entropy->workspace, sizeof(entropy->workspace), (HUF_CElt*)entropy->hufCTable, &repeat, preferRepeat)
: HUF_compress4X_repeat(ostart+lhSize, dstCapacity-lhSize, src, srcSize, 255, 11,
- zc->entropyScratchSpace, entropyScratchSpace_size, zc->hufCTable, &repeat, preferRepeat);
+ entropy->workspace, sizeof(entropy->workspace), (HUF_CElt*)entropy->hufCTable, &repeat, preferRepeat);
if (repeat != HUF_repeat_none) { hType = set_repeat; } /* reused the existing table */
- else { zc->hufCTable_repeatMode = HUF_repeat_check; } /* now have a table to reuse */
+ else { entropy->hufCTable_repeatMode = HUF_repeat_check; } /* now have a table to reuse */
}
- if ((cLitSize==0) | (cLitSize >= srcSize - minGain)) {
- zc->hufCTable_repeatMode = HUF_repeat_none;
+ if ((cLitSize==0) | (cLitSize >= srcSize - minGain) | ERR_isError(cLitSize)) {
+ entropy->hufCTable_repeatMode = HUF_repeat_none;
return ZSTD_noCompressLiterals(dst, dstCapacity, src, srcSize);
}
if (cLitSize==1) {
- zc->hufCTable_repeatMode = HUF_repeat_none;
+ entropy->hufCTable_repeatMode = HUF_repeat_none;
return ZSTD_compressRleLiteralsBlock(dst, dstCapacity, src, srcSize);
}
@@ -1062,17 +1018,154 @@ void ZSTD_seqToCodes(const seqStore_t* seqStorePtr)
mlCodeTable[seqStorePtr->longLengthPos] = MaxML;
}
-MEM_STATIC size_t ZSTD_compressSequences (ZSTD_CCtx* zc,
- void* dst, size_t dstCapacity,
- size_t srcSize)
+MEM_STATIC symbolEncodingType_e ZSTD_selectEncodingType(FSE_repeat* repeatMode,
+ size_t const mostFrequent, size_t nbSeq, U32 defaultNormLog)
+{
+#define MIN_SEQ_FOR_DYNAMIC_FSE 64
+#define MAX_SEQ_FOR_STATIC_FSE 1000
+
+ if ((mostFrequent == nbSeq) && (nbSeq > 2)) {
+ *repeatMode = FSE_repeat_check;
+ return set_rle;
+ }
+ if ((*repeatMode == FSE_repeat_valid) && (nbSeq < MAX_SEQ_FOR_STATIC_FSE)) {
+ return set_repeat;
+ }
+ if ((nbSeq < MIN_SEQ_FOR_DYNAMIC_FSE) || (mostFrequent < (nbSeq >> (defaultNormLog-1)))) {
+ *repeatMode = FSE_repeat_valid;
+ return set_basic;
+ }
+ *repeatMode = FSE_repeat_check;
+ return set_compressed;
+}
+
+MEM_STATIC size_t ZSTD_buildCTable(void* dst, size_t dstCapacity,
+ FSE_CTable* CTable, U32 FSELog, symbolEncodingType_e type,
+ U32* count, U32 max,
+ BYTE const* codeTable, size_t nbSeq,
+ S16 const* defaultNorm, U32 defaultNormLog, U32 defaultMax,
+ void* workspace, size_t workspaceSize)
+{
+ BYTE* op = (BYTE*)dst;
+ BYTE const* const oend = op + dstCapacity;
+
+ switch (type) {
+ case set_rle:
+ *op = codeTable[0];
+ CHECK_F(FSE_buildCTable_rle(CTable, (BYTE)max));
+ return 1;
+ case set_repeat:
+ return 0;
+ case set_basic:
+ CHECK_F(FSE_buildCTable_wksp(CTable, defaultNorm, defaultMax, defaultNormLog, workspace, workspaceSize));
+ return 0;
+ case set_compressed: {
+ S16 norm[MaxSeq + 1];
+ size_t nbSeq_1 = nbSeq;
+ const U32 tableLog = FSE_optimalTableLog(FSELog, nbSeq, max);
+ if (count[codeTable[nbSeq-1]] > 1) {
+ count[codeTable[nbSeq-1]]--;
+ nbSeq_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;
+ CHECK_F(FSE_buildCTable_wksp(CTable, norm, max, tableLog, workspace, workspaceSize));
+ return NCountSize;
+ }
+ }
+ default: return assert(0), ERROR(GENERIC);
+ }
+}
+
+MEM_STATIC size_t ZSTD_encodeSequences(void* dst, size_t dstCapacity,
+ FSE_CTable const* CTable_MatchLength, BYTE const* mlCodeTable,
+ FSE_CTable const* CTable_OffsetBits, BYTE const* ofCodeTable,
+ FSE_CTable const* CTable_LitLength, BYTE const* llCodeTable,
+ seqDef const* sequences, size_t nbSeq, int longOffsets)
+{
+ BIT_CStream_t blockStream;
+ FSE_CState_t stateMatchLength;
+ FSE_CState_t stateOffsetBits;
+ FSE_CState_t stateLitLength;
+
+ CHECK_E(BIT_initCStream(&blockStream, dst, dstCapacity), dstSize_tooSmall); /* not enough space remaining */
+
+ /* first symbols */
+ FSE_initCState2(&stateMatchLength, CTable_MatchLength, mlCodeTable[nbSeq-1]);
+ FSE_initCState2(&stateOffsetBits, CTable_OffsetBits, ofCodeTable[nbSeq-1]);
+ FSE_initCState2(&stateLitLength, CTable_LitLength, llCodeTable[nbSeq-1]);
+ BIT_addBits(&blockStream, sequences[nbSeq-1].litLength, LL_bits[llCodeTable[nbSeq-1]]);
+ if (MEM_32bits()) BIT_flushBits(&blockStream);
+ BIT_addBits(&blockStream, sequences[nbSeq-1].matchLength, ML_bits[mlCodeTable[nbSeq-1]]);
+ if (MEM_32bits()) BIT_flushBits(&blockStream);
+ if (longOffsets) {
+ U32 const ofBits = ofCodeTable[nbSeq-1];
+ int const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN-1);
+ if (extraBits) {
+ BIT_addBits(&blockStream, sequences[nbSeq-1].offset, extraBits);
+ BIT_flushBits(&blockStream);
+ }
+ BIT_addBits(&blockStream, sequences[nbSeq-1].offset >> extraBits,
+ ofBits - extraBits);
+ } else {
+ BIT_addBits(&blockStream, sequences[nbSeq-1].offset, ofCodeTable[nbSeq-1]);
+ }
+ BIT_flushBits(&blockStream);
+
+ { size_t n;
+ for (n=nbSeq-2 ; n<nbSeq ; n--) { /* intentional underflow */
+ BYTE const llCode = llCodeTable[n];
+ BYTE const ofCode = ofCodeTable[n];
+ BYTE const mlCode = mlCodeTable[n];
+ U32 const llBits = LL_bits[llCode];
+ U32 const ofBits = ofCode; /* 32b*/ /* 64b*/
+ U32 const mlBits = ML_bits[mlCode];
+ /* (7)*/ /* (7)*/
+ FSE_encodeSymbol(&blockStream, &stateOffsetBits, ofCode); /* 15 */ /* 15 */
+ FSE_encodeSymbol(&blockStream, &stateMatchLength, mlCode); /* 24 */ /* 24 */
+ if (MEM_32bits()) BIT_flushBits(&blockStream); /* (7)*/
+ FSE_encodeSymbol(&blockStream, &stateLitLength, llCode); /* 16 */ /* 33 */
+ if (MEM_32bits() || (ofBits+mlBits+llBits >= 64-7-(LLFSELog+MLFSELog+OffFSELog)))
+ BIT_flushBits(&blockStream); /* (7)*/
+ 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 (longOffsets) {
+ int const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN-1);
+ if (extraBits) {
+ BIT_addBits(&blockStream, sequences[n].offset, extraBits);
+ BIT_flushBits(&blockStream); /* (7)*/
+ }
+ BIT_addBits(&blockStream, sequences[n].offset >> extraBits,
+ ofBits - extraBits); /* 31 */
+ } else {
+ BIT_addBits(&blockStream, sequences[n].offset, ofBits); /* 31 */
+ }
+ BIT_flushBits(&blockStream); /* (7)*/
+ } }
+
+ FSE_flushCState(&blockStream, &stateMatchLength);
+ FSE_flushCState(&blockStream, &stateOffsetBits);
+ FSE_flushCState(&blockStream, &stateLitLength);
+
+ { size_t const streamSize = BIT_closeCStream(&blockStream);
+ if (streamSize==0) return ERROR(dstSize_tooSmall); /* not enough space */
+ return streamSize;
+ }
+}
+
+MEM_STATIC size_t ZSTD_compressSequences_internal(seqStore_t* seqStorePtr,
+ ZSTD_entropyCTables_t* entropy,
+ ZSTD_compressionParameters const* cParams,
+ void* dst, size_t dstCapacity)
{
- const int longOffsets = zc->appliedParams.cParams.windowLog > STREAM_ACCUMULATOR_MIN;
- const seqStore_t* seqStorePtr = &(zc->seqStore);
+ const int longOffsets = cParams->windowLog > STREAM_ACCUMULATOR_MIN;
U32 count[MaxSeq+1];
- S16 norm[MaxSeq+1];
- FSE_CTable* CTable_LitLength = zc->litlengthCTable;
- FSE_CTable* CTable_OffsetBits = zc->offcodeCTable;
- FSE_CTable* CTable_MatchLength = zc->matchlengthCTable;
+ FSE_CTable* CTable_LitLength = entropy->litlengthCTable;
+ FSE_CTable* CTable_OffsetBits = entropy->offcodeCTable;
+ FSE_CTable* CTable_MatchLength = entropy->matchlengthCTable;
U32 LLtype, Offtype, MLtype; /* compressed, raw or rle */
const seqDef* const sequences = seqStorePtr->sequencesStart;
const BYTE* const ofCodeTable = seqStorePtr->ofCode;
@@ -1083,13 +1176,16 @@ MEM_STATIC size_t ZSTD_compressSequences (ZSTD_CCtx* zc,
BYTE* op = ostart;
size_t const nbSeq = seqStorePtr->sequences - seqStorePtr->sequencesStart;
BYTE* seqHead;
- BYTE scratchBuffer[1<<MAX(MLFSELog,LLFSELog)];
+
+ ZSTD_STATIC_ASSERT(sizeof(entropy->workspace) >= (1<<MAX(MLFSELog,LLFSELog)));
/* Compress literals */
{ const BYTE* const literals = seqStorePtr->litStart;
size_t const litSize = seqStorePtr->lit - literals;
- size_t const cSize = ZSTD_compressLiterals(zc, op, dstCapacity, literals, litSize);
- if (ZSTD_isError(cSize)) return cSize;
+ size_t const cSize = ZSTD_compressLiterals(
+ entropy, cParams->strategy, op, dstCapacity, literals, litSize);
+ if (ZSTD_isError(cSize))
+ return cSize;
op += cSize;
}
@@ -1098,177 +1194,89 @@ MEM_STATIC size_t ZSTD_compressSequences (ZSTD_CCtx* zc,
if (nbSeq < 0x7F) *op++ = (BYTE)nbSeq;
else if (nbSeq < LONGNBSEQ) op[0] = (BYTE)((nbSeq>>8) + 0x80), op[1] = (BYTE)nbSeq, op+=2;
else op[0]=0xFF, MEM_writeLE16(op+1, (U16)(nbSeq - LONGNBSEQ)), op+=3;
- if (nbSeq==0) goto _check_compressibility;
+ if (nbSeq==0) return op - ostart;
/* seqHead : flags for FSE encoding type */
seqHead = op++;
-#define MIN_SEQ_FOR_DYNAMIC_FSE 64
-#define MAX_SEQ_FOR_STATIC_FSE 1000
-
/* convert length/distances into codes */
ZSTD_seqToCodes(seqStorePtr);
-
/* CTable for Literal Lengths */
{ U32 max = MaxLL;
- size_t const mostFrequent = FSE_countFast_wksp(count, &max, llCodeTable, nbSeq, zc->entropyScratchSpace);
- if ((mostFrequent == nbSeq) && (nbSeq > 2)) {
- *op++ = llCodeTable[0];
- FSE_buildCTable_rle(CTable_LitLength, (BYTE)max);
- LLtype = set_rle;
- } else if ((zc->fseCTables_ready) && (nbSeq < MAX_SEQ_FOR_STATIC_FSE)) {
- LLtype = set_repeat;
- } else if ((nbSeq < MIN_SEQ_FOR_DYNAMIC_FSE) || (mostFrequent < (nbSeq >> (LL_defaultNormLog-1)))) {
- FSE_buildCTable_wksp(CTable_LitLength, LL_defaultNorm, MaxLL, LL_defaultNormLog, scratchBuffer, sizeof(scratchBuffer));
- LLtype = set_basic;
- } else {
- size_t nbSeq_1 = nbSeq;
- const U32 tableLog = FSE_optimalTableLog(LLFSELog, nbSeq, max);
- if (count[llCodeTable[nbSeq-1]]>1) { count[llCodeTable[nbSeq-1]]--; nbSeq_1--; }
- 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;
- op += NCountSize; }
- FSE_buildCTable_wksp(CTable_LitLength, norm, max, tableLog, scratchBuffer, sizeof(scratchBuffer));
- LLtype = set_compressed;
+ size_t const mostFrequent = FSE_countFast_wksp(count, &max, llCodeTable, nbSeq, entropy->workspace);
+ LLtype = ZSTD_selectEncodingType(&entropy->litlength_repeatMode, mostFrequent, nbSeq, LL_defaultNormLog);
+ { 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));
+ if (ZSTD_isError(countSize)) return countSize;
+ op += countSize;
} }
-
/* CTable for Offsets */
{ U32 max = MaxOff;
- size_t const mostFrequent = FSE_countFast_wksp(count, &max, ofCodeTable, nbSeq, zc->entropyScratchSpace);
- if ((mostFrequent == nbSeq) && (nbSeq > 2)) {
- *op++ = ofCodeTable[0];
- FSE_buildCTable_rle(CTable_OffsetBits, (BYTE)max);
- Offtype = set_rle;
- } else if ((zc->fseCTables_ready) && (nbSeq < MAX_SEQ_FOR_STATIC_FSE)) {
- Offtype = set_repeat;
- } else if ((nbSeq < MIN_SEQ_FOR_DYNAMIC_FSE) || (mostFrequent < (nbSeq >> (OF_defaultNormLog-1)))) {
- FSE_buildCTable_wksp(CTable_OffsetBits, OF_defaultNorm, MaxOff, OF_defaultNormLog, scratchBuffer, sizeof(scratchBuffer));
- Offtype = set_basic;
- } else {
- size_t nbSeq_1 = nbSeq;
- const U32 tableLog = FSE_optimalTableLog(OffFSELog, nbSeq, max);
- if (count[ofCodeTable[nbSeq-1]]>1) { count[ofCodeTable[nbSeq-1]]--; nbSeq_1--; }
- 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;
- op += NCountSize; }
- FSE_buildCTable_wksp(CTable_OffsetBits, norm, max, tableLog, scratchBuffer, sizeof(scratchBuffer));
- Offtype = set_compressed;
+ size_t const mostFrequent = FSE_countFast_wksp(count, &max, ofCodeTable, nbSeq, entropy->workspace);
+ Offtype = ZSTD_selectEncodingType(&entropy->offcode_repeatMode, mostFrequent, nbSeq, OF_defaultNormLog);
+ { size_t const countSize = ZSTD_buildCTable(op, oend - op, CTable_OffsetBits, OffFSELog, (symbolEncodingType_e)Offtype,
+ count, max, ofCodeTable, nbSeq, OF_defaultNorm, OF_defaultNormLog, MaxOff,
+ entropy->workspace, sizeof(entropy->workspace));
+ if (ZSTD_isError(countSize)) return countSize;
+ op += countSize;
} }
-
/* CTable for MatchLengths */
{ U32 max = MaxML;
- size_t const mostFrequent = FSE_countFast_wksp(count, &max, mlCodeTable, nbSeq, zc->entropyScratchSpace);
- if ((mostFrequent == nbSeq) && (nbSeq > 2)) {
- *op++ = *mlCodeTable;
- FSE_buildCTable_rle(CTable_MatchLength, (BYTE)max);
- MLtype = set_rle;
- } else if ((zc->fseCTables_ready) && (nbSeq < MAX_SEQ_FOR_STATIC_FSE)) {
- MLtype = set_repeat;
- } else if ((nbSeq < MIN_SEQ_FOR_DYNAMIC_FSE) || (mostFrequent < (nbSeq >> (ML_defaultNormLog-1)))) {
- FSE_buildCTable_wksp(CTable_MatchLength, ML_defaultNorm, MaxML, ML_defaultNormLog, scratchBuffer, sizeof(scratchBuffer));
- MLtype = set_basic;
- } else {
- size_t nbSeq_1 = nbSeq;
- const U32 tableLog = FSE_optimalTableLog(MLFSELog, nbSeq, max);
- if (count[mlCodeTable[nbSeq-1]]>1) { count[mlCodeTable[nbSeq-1]]--; nbSeq_1--; }
- 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;
- op += NCountSize; }
- FSE_buildCTable_wksp(CTable_MatchLength, norm, max, tableLog, scratchBuffer, sizeof(scratchBuffer));
- MLtype = set_compressed;
+ size_t const mostFrequent = FSE_countFast_wksp(count, &max, mlCodeTable, nbSeq, entropy->workspace);
+ MLtype = ZSTD_selectEncodingType(&entropy->matchlength_repeatMode, mostFrequent, nbSeq, ML_defaultNormLog);
+ { 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));
+ if (ZSTD_isError(countSize)) return countSize;
+ op += countSize;
} }
*seqHead = (BYTE)((LLtype<<6) + (Offtype<<4) + (MLtype<<2));
- zc->fseCTables_ready = 0;
-
- /* Encoding Sequences */
- { BIT_CStream_t blockStream;
- FSE_CState_t stateMatchLength;
- FSE_CState_t stateOffsetBits;
- FSE_CState_t stateLitLength;
-
- CHECK_E(BIT_initCStream(&blockStream, op, oend-op), dstSize_tooSmall); /* not enough space remaining */
-
- /* first symbols */
- FSE_initCState2(&stateMatchLength, CTable_MatchLength, mlCodeTable[nbSeq-1]);
- FSE_initCState2(&stateOffsetBits, CTable_OffsetBits, ofCodeTable[nbSeq-1]);
- FSE_initCState2(&stateLitLength, CTable_LitLength, llCodeTable[nbSeq-1]);
- BIT_addBits(&blockStream, sequences[nbSeq-1].litLength, LL_bits[llCodeTable[nbSeq-1]]);
- if (MEM_32bits()) BIT_flushBits(&blockStream);
- BIT_addBits(&blockStream, sequences[nbSeq-1].matchLength, ML_bits[mlCodeTable[nbSeq-1]]);
- if (MEM_32bits()) BIT_flushBits(&blockStream);
- if (longOffsets) {
- U32 const ofBits = ofCodeTable[nbSeq-1];
- int const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN-1);
- if (extraBits) {
- BIT_addBits(&blockStream, sequences[nbSeq-1].offset, extraBits);
- BIT_flushBits(&blockStream);
- }
- BIT_addBits(&blockStream, sequences[nbSeq-1].offset >> extraBits,
- ofBits - extraBits);
- } else {
- BIT_addBits(&blockStream, sequences[nbSeq-1].offset, ofCodeTable[nbSeq-1]);
- }
- BIT_flushBits(&blockStream);
-
- { size_t n;
- for (n=nbSeq-2 ; n<nbSeq ; n--) { /* intentional underflow */
- BYTE const llCode = llCodeTable[n];
- BYTE const ofCode = ofCodeTable[n];
- BYTE const mlCode = mlCodeTable[n];
- U32 const llBits = LL_bits[llCode];
- U32 const ofBits = ofCode; /* 32b*/ /* 64b*/
- U32 const mlBits = ML_bits[mlCode];
- /* (7)*/ /* (7)*/
- FSE_encodeSymbol(&blockStream, &stateOffsetBits, ofCode); /* 15 */ /* 15 */
- FSE_encodeSymbol(&blockStream, &stateMatchLength, mlCode); /* 24 */ /* 24 */
- if (MEM_32bits()) BIT_flushBits(&blockStream); /* (7)*/
- FSE_encodeSymbol(&blockStream, &stateLitLength, llCode); /* 16 */ /* 33 */
- if (MEM_32bits() || (ofBits+mlBits+llBits >= 64-7-(LLFSELog+MLFSELog+OffFSELog)))
- BIT_flushBits(&blockStream); /* (7)*/
- 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 (longOffsets) {
- int const extraBits = ofBits - MIN(ofBits, STREAM_ACCUMULATOR_MIN-1);
- if (extraBits) {
- BIT_addBits(&blockStream, sequences[n].offset, extraBits);
- BIT_flushBits(&blockStream); /* (7)*/
- }
- BIT_addBits(&blockStream, sequences[n].offset >> extraBits,
- ofBits - extraBits); /* 31 */
- } else {
- BIT_addBits(&blockStream, sequences[n].offset, ofBits); /* 31 */
- }
- BIT_flushBits(&blockStream); /* (7)*/
- } }
- FSE_flushCState(&blockStream, &stateMatchLength);
- FSE_flushCState(&blockStream, &stateOffsetBits);
- FSE_flushCState(&blockStream, &stateLitLength);
+ { size_t const streamSize = ZSTD_encodeSequences(op, oend - op,
+ CTable_MatchLength, mlCodeTable,
+ CTable_OffsetBits, ofCodeTable,
+ CTable_LitLength, llCodeTable,
+ sequences, nbSeq, longOffsets);
+ if (ZSTD_isError(streamSize)) return streamSize;
+ op += streamSize;
+ }
- { size_t const streamSize = BIT_closeCStream(&blockStream);
- if (streamSize==0) return ERROR(dstSize_tooSmall); /* not enough space */
- op += streamSize;
- } }
+ return op - ostart;
+}
- /* check compressibility */
-_check_compressibility:
- { size_t const minGain = ZSTD_minGain(srcSize);
- size_t const maxCSize = srcSize - minGain;
- if ((size_t)(op-ostart) >= maxCSize) {
- zc->hufCTable_repeatMode = HUF_repeat_none;
- return 0;
- } }
+MEM_STATIC size_t ZSTD_compressSequences(seqStore_t* seqStorePtr,
+ ZSTD_entropyCTables_t* entropy,
+ ZSTD_compressionParameters const* cParams,
+ void* dst, size_t dstCapacity,
+ size_t srcSize)
+{
+ size_t const cSize = ZSTD_compressSequences_internal(seqStorePtr, entropy, cParams,
+ dst, dstCapacity);
+ size_t const minGain = ZSTD_minGain(srcSize);
+ size_t const maxCSize = srcSize - minGain;
+ /* If the srcSize <= dstCapacity, then there is enough space to write a
+ * raw uncompressed block. Since we ran out of space, the block must not
+ * be compressible, so fall back to a raw uncompressed block.
+ */
+ int const uncompressibleError = cSize == ERROR(dstSize_tooSmall) && srcSize <= dstCapacity;
+
+ if (ZSTD_isError(cSize) && !uncompressibleError)
+ return cSize;
+ /* Check compressibility */
+ if (cSize >= maxCSize || uncompressibleError) {
+ entropy->hufCTable_repeatMode = HUF_repeat_none;
+ entropy->offcode_repeatMode = FSE_repeat_none;
+ entropy->matchlength_repeatMode = FSE_repeat_none;
+ entropy->litlength_repeatMode = FSE_repeat_none;
+ return 0;
+ }
+ assert(!ZSTD_isError(cSize));
/* confirm repcodes */
- { int i; for (i=0; i<ZSTD_REP_NUM; i++) zc->rep[i] = zc->repToConfirm[i]; }
-
- return op - ostart;
+ { int i; for (i=0; i<ZSTD_REP_NUM; i++) seqStorePtr->rep[i] = seqStorePtr->repToConfirm[i]; }
+ return cSize;
}
@@ -1475,7 +1483,7 @@ static void ZSTD_fillHashTable (ZSTD_CCtx* zc, const void* end, const U32 mls)
}
-FORCE_INLINE
+FORCE_INLINE_TEMPLATE
void ZSTD_compressBlock_fast_generic(ZSTD_CCtx* cctx,
const void* src, size_t srcSize,
const U32 mls)
@@ -1491,7 +1499,7 @@ void ZSTD_compressBlock_fast_generic(ZSTD_CCtx* cctx,
const BYTE* const lowest = base + lowestIndex;
const BYTE* const iend = istart + srcSize;
const BYTE* const ilimit = iend - HASH_READ_SIZE;
- U32 offset_1=cctx->rep[0], offset_2=cctx->rep[1];
+ U32 offset_1=seqStorePtr->rep[0], offset_2=seqStorePtr->rep[1];
U32 offsetSaved = 0;
/* init */
@@ -1552,8 +1560,8 @@ void ZSTD_compressBlock_fast_generic(ZSTD_CCtx* cctx,
} } }
/* save reps for next block */
- cctx->repToConfirm[0] = offset_1 ? offset_1 : offsetSaved;
- cctx->repToConfirm[1] = offset_2 ? offset_2 : offsetSaved;
+ seqStorePtr->repToConfirm[0] = offset_1 ? offset_1 : offsetSaved;
+ seqStorePtr->repToConfirm[1] = offset_2 ? offset_2 : offsetSaved;
/* Last Literals */
{ size_t const lastLLSize = iend - anchor;
@@ -1601,7 +1609,7 @@ static void ZSTD_compressBlock_fast_extDict_generic(ZSTD_CCtx* ctx,
const BYTE* const dictEnd = dictBase + dictLimit;
const BYTE* const iend = istart + srcSize;
const BYTE* const ilimit = iend - 8;
- U32 offset_1=ctx->rep[0], offset_2=ctx->rep[1];
+ U32 offset_1=seqStorePtr->rep[0], offset_2=seqStorePtr->rep[1];
/* Search Loop */
while (ip < ilimit) { /* < instead of <=, because (ip+1) */
@@ -1667,7 +1675,7 @@ static void ZSTD_compressBlock_fast_extDict_generic(ZSTD_CCtx* ctx,
} } }
/* save reps for next block */
- ctx->repToConfirm[0] = offset_1; ctx->repToConfirm[1] = offset_2;
+ seqStorePtr->repToConfirm[0] = offset_1; seqStorePtr->repToConfirm[1] = offset_2;
/* Last Literals */
{ size_t const lastLLSize = iend - anchor;
@@ -1718,7 +1726,7 @@ static void ZSTD_fillDoubleHashTable (ZSTD_CCtx* cctx, const void* end, const U3
}
-FORCE_INLINE
+FORCE_INLINE_TEMPLATE
void ZSTD_compressBlock_doubleFast_generic(ZSTD_CCtx* cctx,
const void* src, size_t srcSize,
const U32 mls)
@@ -1736,7 +1744,7 @@ void ZSTD_compressBlock_doubleFast_generic(ZSTD_CCtx* cctx,
const BYTE* const lowest = base + lowestIndex;
const BYTE* const iend = istart + srcSize;
const BYTE* const ilimit = iend - HASH_READ_SIZE;
- U32 offset_1=cctx->rep[0], offset_2=cctx->rep[1];
+ U32 offset_1=seqStorePtr->rep[0], offset_2=seqStorePtr->rep[1];
U32 offsetSaved = 0;
/* init */
@@ -1823,8 +1831,8 @@ void ZSTD_compressBlock_doubleFast_generic(ZSTD_CCtx* cctx,
} } }
/* save reps for next block */
- cctx->repToConfirm[0] = offset_1 ? offset_1 : offsetSaved;
- cctx->repToConfirm[1] = offset_2 ? offset_2 : offsetSaved;
+ seqStorePtr->repToConfirm[0] = offset_1 ? offset_1 : offsetSaved;
+ seqStorePtr->repToConfirm[1] = offset_2 ? offset_2 : offsetSaved;
/* Last Literals */
{ size_t const lastLLSize = iend - anchor;
@@ -1873,7 +1881,7 @@ static void ZSTD_compressBlock_doubleFast_extDict_generic(ZSTD_CCtx* ctx,
const BYTE* const dictEnd = dictBase + dictLimit;
const BYTE* const iend = istart + srcSize;
const BYTE* const ilimit = iend - 8;
- U32 offset_1=ctx->rep[0], offset_2=ctx->rep[1];
+ U32 offset_1=seqStorePtr->rep[0], offset_2=seqStorePtr->rep[1];
/* Search Loop */
while (ip < ilimit) { /* < instead of <=, because (ip+1) */
@@ -1973,7 +1981,7 @@ static void ZSTD_compressBlock_doubleFast_extDict_generic(ZSTD_CCtx* ctx,
} } }
/* save reps for next block */
- ctx->repToConfirm[0] = offset_1; ctx->repToConfirm[1] = offset_2;
+ seqStorePtr->repToConfirm[0] = offset_1; seqStorePtr->repToConfirm[1] = offset_2;
/* Last Literals */
{ size_t const lastLLSize = iend - anchor;
@@ -2276,7 +2284,7 @@ static size_t ZSTD_BtFindBestMatch_selectMLS_extDict (
/* Update chains up to ip (excluded)
Assumption : always within prefix (i.e. not within extDict) */
-FORCE_INLINE
+FORCE_INLINE_TEMPLATE
U32 ZSTD_insertAndFindFirstIndex (ZSTD_CCtx* zc, const BYTE* ip, U32 mls)
{
U32* const hashTable = zc->hashTable;
@@ -2300,7 +2308,7 @@ U32 ZSTD_insertAndFindFirstIndex (ZSTD_CCtx* zc, const BYTE* ip, U32 mls)
/* inlining is important to hardwire a hot branch (template emulation) */
-FORCE_INLINE
+FORCE_INLINE_TEMPLATE
size_t ZSTD_HcFindBestMatch_generic (
ZSTD_CCtx* zc, /* Index table will be updated */
const BYTE* const ip, const BYTE* const iLimit,
@@ -2352,7 +2360,7 @@ size_t ZSTD_HcFindBestMatch_generic (
}
-FORCE_INLINE size_t ZSTD_HcFindBestMatch_selectMLS (
+FORCE_INLINE_TEMPLATE size_t ZSTD_HcFindBestMatch_selectMLS (
ZSTD_CCtx* zc,
const BYTE* ip, const BYTE* const iLimit,
size_t* offsetPtr,
@@ -2369,7 +2377,7 @@ FORCE_INLINE size_t ZSTD_HcFindBestMatch_selectMLS (
}
-FORCE_INLINE size_t ZSTD_HcFindBestMatch_extDict_selectMLS (
+FORCE_INLINE_TEMPLATE size_t ZSTD_HcFindBestMatch_extDict_selectMLS (
ZSTD_CCtx* zc,
const BYTE* ip, const BYTE* const iLimit,
size_t* offsetPtr,
@@ -2389,7 +2397,7 @@ FORCE_INLINE size_t ZSTD_HcFindBestMatch_extDict_selectMLS (
/* *******************************
* Common parser - lazy strategy
*********************************/
-FORCE_INLINE
+FORCE_INLINE_TEMPLATE
void ZSTD_compressBlock_lazy_generic(ZSTD_CCtx* ctx,
const void* src, size_t srcSize,
const U32 searchMethod, const U32 depth)
@@ -2409,7 +2417,7 @@ void ZSTD_compressBlock_lazy_generic(ZSTD_CCtx* ctx,
size_t* offsetPtr,
U32 maxNbAttempts, U32 matchLengthSearch);
searchMax_f const searchMax = searchMethod ? ZSTD_BtFindBestMatch_selectMLS : ZSTD_HcFindBestMatch_selectMLS;
- U32 offset_1 = ctx->rep[0], offset_2 = ctx->rep[1], savedOffset=0;
+ U32 offset_1 = seqStorePtr->rep[0], offset_2 = seqStorePtr->rep[1], savedOffset=0;
/* init */
ip += (ip==base);
@@ -2519,8 +2527,8 @@ _storeSequence:
} }
/* Save reps for next block */
- ctx->repToConfirm[0] = offset_1 ? offset_1 : savedOffset;
- ctx->repToConfirm[1] = offset_2 ? offset_2 : savedOffset;
+ seqStorePtr->repToConfirm[0] = offset_1 ? offset_1 : savedOffset;
+ seqStorePtr->repToConfirm[1] = offset_2 ? offset_2 : savedOffset;
/* Last Literals */
{ size_t const lastLLSize = iend - anchor;
@@ -2551,7 +2559,7 @@ static void ZSTD_compressBlock_greedy(ZSTD_CCtx* ctx, const void* src, size_t sr
}
-FORCE_INLINE
+FORCE_INLINE_TEMPLATE
void ZSTD_compressBlock_lazy_extDict_generic(ZSTD_CCtx* ctx,
const void* src, size_t srcSize,
const U32 searchMethod, const U32 depth)
@@ -2578,7 +2586,7 @@ void ZSTD_compressBlock_lazy_extDict_generic(ZSTD_CCtx* ctx,
U32 maxNbAttempts, U32 matchLengthSearch);
searchMax_f searchMax = searchMethod ? ZSTD_BtFindBestMatch_selectMLS_extDict : ZSTD_HcFindBestMatch_extDict_selectMLS;
- U32 offset_1 = ctx->rep[0], offset_2 = ctx->rep[1];
+ U32 offset_1 = seqStorePtr->rep[0], offset_2 = seqStorePtr->rep[1];
/* init */
ctx->nextToUpdate3 = ctx->nextToUpdate;
@@ -2714,7 +2722,7 @@ _storeSequence:
} }
/* Save reps for next block */
- ctx->repToConfirm[0] = offset_1; ctx->repToConfirm[1] = offset_2;
+ seqStorePtr->repToConfirm[0] = offset_1; seqStorePtr->repToConfirm[1] = offset_2;
/* Last Literals */
{ size_t const lastLLSize = iend - anchor;
@@ -2823,7 +2831,7 @@ static size_t ZSTD_compressBlock_internal(ZSTD_CCtx* zc, void* dst, size_t dstCa
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);
- return ZSTD_compressSequences(zc, dst, dstCapacity, srcSize);
+ return ZSTD_compressSequences(&zc->seqStore, zc->entropy, &zc->appliedParams.cParams, dst, dstCapacity, srcSize);
}
@@ -3000,7 +3008,6 @@ static size_t ZSTD_compressContinue_internal (ZSTD_CCtx* cctx,
return fhSize;
}
-
size_t ZSTD_compressContinue (ZSTD_CCtx* cctx,
void* dst, size_t dstCapacity,
const void* src, size_t srcSize)
@@ -3106,13 +3113,14 @@ static size_t ZSTD_loadZstdDictionary(ZSTD_CCtx* cctx, const void* dict, size_t
const BYTE* const dictEnd = dictPtr + dictSize;
short offcodeNCount[MaxOff+1];
unsigned offcodeMaxValue = MaxOff;
- BYTE scratchBuffer[1<<MAX(MLFSELog,LLFSELog)];
+
+ ZSTD_STATIC_ASSERT(sizeof(cctx->entropy->workspace) >= (1<<MAX(MLFSELog,LLFSELog)));
dictPtr += 4; /* skip magic number */
cctx->dictID = cctx->appliedParams.fParams.noDictIDFlag ? 0 : MEM_readLE32(dictPtr);
dictPtr += 4;
- { size_t const hufHeaderSize = HUF_readCTable(cctx->hufCTable, 255, dictPtr, dictEnd-dictPtr);
+ { size_t const hufHeaderSize = HUF_readCTable((HUF_CElt*)cctx->entropy->hufCTable, 255, dictPtr, dictEnd-dictPtr);
if (HUF_isError(hufHeaderSize)) return ERROR(dictionary_corrupted);
dictPtr += hufHeaderSize;
}
@@ -3122,7 +3130,7 @@ static size_t ZSTD_loadZstdDictionary(ZSTD_CCtx* cctx, const void* dict, size_t
if (FSE_isError(offcodeHeaderSize)) return ERROR(dictionary_corrupted);
if (offcodeLog > OffFSELog) return ERROR(dictionary_corrupted);
/* Defer checking offcodeMaxValue because we need to know the size of the dictionary content */
- CHECK_E( FSE_buildCTable_wksp(cctx->offcodeCTable, offcodeNCount, offcodeMaxValue, offcodeLog, scratchBuffer, sizeof(scratchBuffer)),
+ CHECK_E( FSE_buildCTable_wksp(cctx->entropy->offcodeCTable, offcodeNCount, offcodeMaxValue, offcodeLog, cctx->entropy->workspace, sizeof(cctx->entropy->workspace)),
dictionary_corrupted);
dictPtr += offcodeHeaderSize;
}
@@ -3134,7 +3142,7 @@ static size_t ZSTD_loadZstdDictionary(ZSTD_CCtx* cctx, const void* dict, size_t
if (matchlengthLog > MLFSELog) return ERROR(dictionary_corrupted);
/* Every match length code must have non-zero probability */
CHECK_F( ZSTD_checkDictNCount(matchlengthNCount, matchlengthMaxValue, MaxML));
- CHECK_E( FSE_buildCTable_wksp(cctx->matchlengthCTable, matchlengthNCount, matchlengthMaxValue, matchlengthLog, scratchBuffer, sizeof(scratchBuffer)),
+ CHECK_E( FSE_buildCTable_wksp(cctx->entropy->matchlengthCTable, matchlengthNCount, matchlengthMaxValue, matchlengthLog, cctx->entropy->workspace, sizeof(cctx->entropy->workspace)),
dictionary_corrupted);
dictPtr += matchlengthHeaderSize;
}
@@ -3146,15 +3154,15 @@ static size_t ZSTD_loadZstdDictionary(ZSTD_CCtx* cctx, const void* dict, size_t
if (litlengthLog > LLFSELog) return ERROR(dictionary_corrupted);
/* Every literal length code must have non-zero probability */
CHECK_F( ZSTD_checkDictNCount(litlengthNCount, litlengthMaxValue, MaxLL));
- CHECK_E( FSE_buildCTable_wksp(cctx->litlengthCTable, litlengthNCount, litlengthMaxValue, litlengthLog, scratchBuffer, sizeof(scratchBuffer)),
+ CHECK_E( FSE_buildCTable_wksp(cctx->entropy->litlengthCTable, litlengthNCount, litlengthMaxValue, litlengthLog, cctx->entropy->workspace, sizeof(cctx->entropy->workspace)),
dictionary_corrupted);
dictPtr += litlengthHeaderSize;
}
if (dictPtr+12 > dictEnd) return ERROR(dictionary_corrupted);
- cctx->rep[0] = MEM_readLE32(dictPtr+0);
- cctx->rep[1] = MEM_readLE32(dictPtr+4);
- cctx->rep[2] = MEM_readLE32(dictPtr+8);
+ cctx->seqStore.rep[0] = MEM_readLE32(dictPtr+0);
+ cctx->seqStore.rep[1] = MEM_readLE32(dictPtr+4);
+ cctx->seqStore.rep[2] = MEM_readLE32(dictPtr+8);
dictPtr += 12;
{ size_t const dictContentSize = (size_t)(dictEnd - dictPtr);
@@ -3168,12 +3176,14 @@ static size_t ZSTD_loadZstdDictionary(ZSTD_CCtx* cctx, const void* dict, size_t
/* All repCodes must be <= dictContentSize and != 0*/
{ U32 u;
for (u=0; u<3; u++) {
- if (cctx->rep[u] == 0) return ERROR(dictionary_corrupted);
- if (cctx->rep[u] > dictContentSize) return ERROR(dictionary_corrupted);
+ if (cctx->seqStore.rep[u] == 0) return ERROR(dictionary_corrupted);
+ if (cctx->seqStore.rep[u] > dictContentSize) return ERROR(dictionary_corrupted);
} }
- cctx->fseCTables_ready = 1;
- cctx->hufCTable_repeatMode = HUF_repeat_valid;
+ cctx->entropy->hufCTable_repeatMode = HUF_repeat_valid;
+ cctx->entropy->offcode_repeatMode = FSE_repeat_valid;
+ cctx->entropy->matchlength_repeatMode = FSE_repeat_valid;
+ cctx->entropy->litlength_repeatMode = FSE_repeat_valid;
return ZSTD_loadDictionaryContent(cctx, dictPtr, dictContentSize);
}
}
diff --git a/thirdparty/zstd/compress/zstd_opt.h b/thirdparty/zstd/compress/zstd_opt.h
index e8e98915ea..ae24732c7d 100644
--- a/thirdparty/zstd/compress/zstd_opt.h
+++ b/thirdparty/zstd/compress/zstd_opt.h
@@ -1,10 +1,10 @@
-/**
- * Copyright (c) 2016-present, Przemyslaw Skibinski, Yann Collet, Facebook, Inc.
+/*
+ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* 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).
*/
@@ -22,173 +22,173 @@
/*-*************************************
* Price functions for optimal parser
***************************************/
-FORCE_INLINE void ZSTD_setLog2Prices(seqStore_t* ssPtr)
+static void ZSTD_setLog2Prices(optState_t* optPtr)
{
- ssPtr->log2matchLengthSum = ZSTD_highbit32(ssPtr->matchLengthSum+1);
- ssPtr->log2litLengthSum = ZSTD_highbit32(ssPtr->litLengthSum+1);
- ssPtr->log2litSum = ZSTD_highbit32(ssPtr->litSum+1);
- ssPtr->log2offCodeSum = ZSTD_highbit32(ssPtr->offCodeSum+1);
- ssPtr->factor = 1 + ((ssPtr->litSum>>5) / ssPtr->litLengthSum) + ((ssPtr->litSum<<1) / (ssPtr->litSum + ssPtr->matchSum));
+ 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));
}
-MEM_STATIC void ZSTD_rescaleFreqs(seqStore_t* ssPtr, const BYTE* src, size_t srcSize)
+static void ZSTD_rescaleFreqs(optState_t* optPtr, const BYTE* src, size_t srcSize)
{
unsigned u;
- ssPtr->cachedLiterals = NULL;
- ssPtr->cachedPrice = ssPtr->cachedLitLength = 0;
- ssPtr->staticPrices = 0;
+ optPtr->cachedLiterals = NULL;
+ optPtr->cachedPrice = optPtr->cachedLitLength = 0;
+ optPtr->staticPrices = 0;
- if (ssPtr->litLengthSum == 0) {
- if (srcSize <= 1024) ssPtr->staticPrices = 1;
+ if (optPtr->litLengthSum == 0) {
+ if (srcSize <= 1024) optPtr->staticPrices = 1;
- assert(ssPtr->litFreq!=NULL);
+ assert(optPtr->litFreq!=NULL);
for (u=0; u<=MaxLit; u++)
- ssPtr->litFreq[u] = 0;
+ optPtr->litFreq[u] = 0;
for (u=0; u<srcSize; u++)
- ssPtr->litFreq[src[u]]++;
+ optPtr->litFreq[src[u]]++;
- ssPtr->litSum = 0;
- ssPtr->litLengthSum = MaxLL+1;
- ssPtr->matchLengthSum = MaxML+1;
- ssPtr->offCodeSum = (MaxOff+1);
- ssPtr->matchSum = (ZSTD_LITFREQ_ADD<<Litbits);
+ 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++) {
- ssPtr->litFreq[u] = 1 + (ssPtr->litFreq[u]>>ZSTD_FREQ_DIV);
- ssPtr->litSum += ssPtr->litFreq[u];
+ optPtr->litFreq[u] = 1 + (optPtr->litFreq[u]>>ZSTD_FREQ_DIV);
+ optPtr->litSum += optPtr->litFreq[u];
}
for (u=0; u<=MaxLL; u++)
- ssPtr->litLengthFreq[u] = 1;
+ optPtr->litLengthFreq[u] = 1;
for (u=0; u<=MaxML; u++)
- ssPtr->matchLengthFreq[u] = 1;
+ optPtr->matchLengthFreq[u] = 1;
for (u=0; u<=MaxOff; u++)
- ssPtr->offCodeFreq[u] = 1;
+ optPtr->offCodeFreq[u] = 1;
} else {
- ssPtr->matchLengthSum = 0;
- ssPtr->litLengthSum = 0;
- ssPtr->offCodeSum = 0;
- ssPtr->matchSum = 0;
- ssPtr->litSum = 0;
+ optPtr->matchLengthSum = 0;
+ optPtr->litLengthSum = 0;
+ optPtr->offCodeSum = 0;
+ optPtr->matchSum = 0;
+ optPtr->litSum = 0;
for (u=0; u<=MaxLit; u++) {
- ssPtr->litFreq[u] = 1 + (ssPtr->litFreq[u]>>(ZSTD_FREQ_DIV+1));
- ssPtr->litSum += ssPtr->litFreq[u];
+ optPtr->litFreq[u] = 1 + (optPtr->litFreq[u]>>(ZSTD_FREQ_DIV+1));
+ optPtr->litSum += optPtr->litFreq[u];
}
for (u=0; u<=MaxLL; u++) {
- ssPtr->litLengthFreq[u] = 1 + (ssPtr->litLengthFreq[u]>>(ZSTD_FREQ_DIV+1));
- ssPtr->litLengthSum += ssPtr->litLengthFreq[u];
+ optPtr->litLengthFreq[u] = 1 + (optPtr->litLengthFreq[u]>>(ZSTD_FREQ_DIV+1));
+ optPtr->litLengthSum += optPtr->litLengthFreq[u];
}
for (u=0; u<=MaxML; u++) {
- ssPtr->matchLengthFreq[u] = 1 + (ssPtr->matchLengthFreq[u]>>ZSTD_FREQ_DIV);
- ssPtr->matchLengthSum += ssPtr->matchLengthFreq[u];
- ssPtr->matchSum += ssPtr->matchLengthFreq[u] * (u + 3);
+ optPtr->matchLengthFreq[u] = 1 + (optPtr->matchLengthFreq[u]>>ZSTD_FREQ_DIV);
+ optPtr->matchLengthSum += optPtr->matchLengthFreq[u];
+ optPtr->matchSum += optPtr->matchLengthFreq[u] * (u + 3);
}
- ssPtr->matchSum *= ZSTD_LITFREQ_ADD;
+ optPtr->matchSum *= ZSTD_LITFREQ_ADD;
for (u=0; u<=MaxOff; u++) {
- ssPtr->offCodeFreq[u] = 1 + (ssPtr->offCodeFreq[u]>>ZSTD_FREQ_DIV);
- ssPtr->offCodeSum += ssPtr->offCodeFreq[u];
+ optPtr->offCodeFreq[u] = 1 + (optPtr->offCodeFreq[u]>>ZSTD_FREQ_DIV);
+ optPtr->offCodeSum += optPtr->offCodeFreq[u];
}
}
- ZSTD_setLog2Prices(ssPtr);
+ ZSTD_setLog2Prices(optPtr);
}
-FORCE_INLINE U32 ZSTD_getLiteralPrice(seqStore_t* ssPtr, U32 litLength, const BYTE* literals)
+static U32 ZSTD_getLiteralPrice(optState_t* optPtr, U32 litLength, const BYTE* literals)
{
U32 price, u;
- if (ssPtr->staticPrices)
+ if (optPtr->staticPrices)
return ZSTD_highbit32((U32)litLength+1) + (litLength*6);
if (litLength == 0)
- return ssPtr->log2litLengthSum - ZSTD_highbit32(ssPtr->litLengthFreq[0]+1);
+ return optPtr->log2litLengthSum - ZSTD_highbit32(optPtr->litLengthFreq[0]+1);
/* literals */
- if (ssPtr->cachedLiterals == literals) {
- U32 const additional = litLength - ssPtr->cachedLitLength;
- const BYTE* literals2 = ssPtr->cachedLiterals + ssPtr->cachedLitLength;
- price = ssPtr->cachedPrice + additional * ssPtr->log2litSum;
+ 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(ssPtr->litFreq[literals2[u]]+1);
- ssPtr->cachedPrice = price;
- ssPtr->cachedLitLength = litLength;
+ price -= ZSTD_highbit32(optPtr->litFreq[literals2[u]]+1);
+ optPtr->cachedPrice = price;
+ optPtr->cachedLitLength = litLength;
} else {
- price = litLength * ssPtr->log2litSum;
+ price = litLength * optPtr->log2litSum;
for (u=0; u < litLength; u++)
- price -= ZSTD_highbit32(ssPtr->litFreq[literals[u]]+1);
+ price -= ZSTD_highbit32(optPtr->litFreq[literals[u]]+1);
if (litLength >= 12) {
- ssPtr->cachedLiterals = literals;
- ssPtr->cachedPrice = price;
- ssPtr->cachedLitLength = litLength;
+ 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] + ssPtr->log2litLengthSum - ZSTD_highbit32(ssPtr->litLengthFreq[llCode]+1);
+ price += LL_bits[llCode] + optPtr->log2litLengthSum - ZSTD_highbit32(optPtr->litLengthFreq[llCode]+1);
}
return price;
}
-FORCE_INLINE U32 ZSTD_getPrice(seqStore_t* seqStorePtr, U32 litLength, const BYTE* literals, U32 offset, U32 matchLength, const int ultra)
+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 (seqStorePtr->staticPrices)
- return ZSTD_getLiteralPrice(seqStorePtr, litLength, literals) + ZSTD_highbit32((U32)matchLength+1) + 16 + offCode;
+ if (optPtr->staticPrices)
+ return ZSTD_getLiteralPrice(optPtr, litLength, literals) + ZSTD_highbit32((U32)matchLength+1) + 16 + offCode;
- price = offCode + seqStorePtr->log2offCodeSum - ZSTD_highbit32(seqStorePtr->offCodeFreq[offCode]+1);
+ 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] + seqStorePtr->log2matchLengthSum - ZSTD_highbit32(seqStorePtr->matchLengthFreq[mlCode]+1);
+ price += ML_bits[mlCode] + optPtr->log2matchLengthSum - ZSTD_highbit32(optPtr->matchLengthFreq[mlCode]+1);
}
- return price + ZSTD_getLiteralPrice(seqStorePtr, litLength, literals) + seqStorePtr->factor;
+ return price + ZSTD_getLiteralPrice(optPtr, litLength, literals) + optPtr->factor;
}
-MEM_STATIC void ZSTD_updatePrice(seqStore_t* seqStorePtr, U32 litLength, const BYTE* literals, U32 offset, U32 matchLength)
+static void ZSTD_updatePrice(optState_t* optPtr, U32 litLength, const BYTE* literals, U32 offset, U32 matchLength)
{
U32 u;
/* literals */
- seqStorePtr->litSum += litLength*ZSTD_LITFREQ_ADD;
+ optPtr->litSum += litLength*ZSTD_LITFREQ_ADD;
for (u=0; u < litLength; u++)
- seqStorePtr->litFreq[literals[u]] += ZSTD_LITFREQ_ADD;
+ 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];
- seqStorePtr->litLengthFreq[llCode]++;
- seqStorePtr->litLengthSum++;
+ optPtr->litLengthFreq[llCode]++;
+ optPtr->litLengthSum++;
}
/* match offset */
{ BYTE const offCode = (BYTE)ZSTD_highbit32(offset+1);
- seqStorePtr->offCodeSum++;
- seqStorePtr->offCodeFreq[offCode]++;
+ 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];
- seqStorePtr->matchLengthFreq[mlCode]++;
- seqStorePtr->matchLengthSum++;
+ optPtr->matchLengthFreq[mlCode]++;
+ optPtr->matchLengthSum++;
}
- ZSTD_setLog2Prices(seqStorePtr);
+ ZSTD_setLog2Prices(optPtr);
}
@@ -203,7 +203,7 @@ MEM_STATIC void ZSTD_updatePrice(seqStore_t* seqStorePtr, U32 litLength, const B
/* function safe only for comparisons */
-MEM_STATIC U32 ZSTD_readMINMATCH(const void* memPtr, U32 length)
+static U32 ZSTD_readMINMATCH(const void* memPtr, U32 length)
{
switch (length)
{
@@ -219,7 +219,7 @@ MEM_STATIC U32 ZSTD_readMINMATCH(const void* memPtr, U32 length)
/* Update hashTable3 up to ip (excluded)
Assumption : always within prefix (i.e. not within extDict) */
-FORCE_INLINE
+static
U32 ZSTD_insertAndFindFirstIndexHash3 (ZSTD_CCtx* zc, const BYTE* ip)
{
U32* const hashTable3 = zc->hashTable3;
@@ -412,11 +412,12 @@ static U32 ZSTD_BtGetAllMatches_selectMLS_extDict (
/*-*******************************
* Optimal parser
*********************************/
-FORCE_INLINE
+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;
@@ -430,16 +431,16 @@ void ZSTD_compressBlock_opt_generic(ZSTD_CCtx* ctx,
const U32 mls = ctx->appliedParams.cParams.searchLength;
const U32 minMatch = (ctx->appliedParams.cParams.searchLength == 3) ? 3 : 4;
- ZSTD_optimal_t* opt = seqStorePtr->priceTable;
- ZSTD_match_t* matches = seqStorePtr->matchTable;
+ 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(seqStorePtr, (const BYTE*)src, srcSize);
+ ZSTD_rescaleFreqs(optStatePtr, (const BYTE*)src, srcSize);
ip += (ip==prefixStart);
- { U32 i; for (i=0; i<ZSTD_REP_NUM; i++) rep[i]=ctx->rep[i]; }
+ { U32 i; for (i=0; i<ZSTD_REP_NUM; i++) rep[i]=seqStorePtr->rep[i]; }
/* Match Loop */
while (ip < ilimit) {
@@ -462,7 +463,7 @@ void ZSTD_compressBlock_opt_generic(ZSTD_CCtx* ctx,
}
best_off = i - (ip == anchor);
do {
- price = ZSTD_getPrice(seqStorePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
+ 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--;
@@ -487,7 +488,7 @@ void ZSTD_compressBlock_opt_generic(ZSTD_CCtx* ctx,
mlen = (u>0) ? matches[u-1].len+1 : best_mlen;
best_mlen = matches[u].len;
while (mlen <= best_mlen) {
- price = ZSTD_getPrice(seqStorePtr, litlen, anchor, matches[u].off-1, mlen - MINMATCH, ultra);
+ 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++;
@@ -507,12 +508,12 @@ void ZSTD_compressBlock_opt_generic(ZSTD_CCtx* ctx,
if (opt[cur-1].mlen == 1) {
litlen = opt[cur-1].litlen + 1;
if (cur > litlen) {
- price = opt[cur - litlen].price + ZSTD_getLiteralPrice(seqStorePtr, litlen, inr-litlen);
+ price = opt[cur - litlen].price + ZSTD_getLiteralPrice(optStatePtr, litlen, inr-litlen);
} else
- price = ZSTD_getLiteralPrice(seqStorePtr, litlen, anchor);
+ price = ZSTD_getLiteralPrice(optStatePtr, litlen, anchor);
} else {
litlen = 1;
- price = opt[cur - 1].price + ZSTD_getLiteralPrice(seqStorePtr, litlen, inr-1);
+ price = opt[cur - 1].price + ZSTD_getLiteralPrice(optStatePtr, litlen, inr-1);
}
if (cur > last_pos || price <= opt[cur].price)
@@ -554,12 +555,12 @@ void ZSTD_compressBlock_opt_generic(ZSTD_CCtx* ctx,
if (opt[cur].mlen == 1) {
litlen = opt[cur].litlen;
if (cur > litlen) {
- price = opt[cur - litlen].price + ZSTD_getPrice(seqStorePtr, litlen, inr-litlen, best_off, mlen - MINMATCH, ultra);
+ price = opt[cur - litlen].price + ZSTD_getPrice(optStatePtr, litlen, inr-litlen, best_off, mlen - MINMATCH, ultra);
} else
- price = ZSTD_getPrice(seqStorePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
+ price = ZSTD_getPrice(optStatePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
} else {
litlen = 0;
- price = opt[cur].price + ZSTD_getPrice(seqStorePtr, 0, NULL, best_off, mlen - MINMATCH, ultra);
+ price = opt[cur].price + ZSTD_getPrice(optStatePtr, 0, NULL, best_off, mlen - MINMATCH, ultra);
}
if (cur + mlen > last_pos || price <= opt[cur + mlen].price)
@@ -586,12 +587,12 @@ void ZSTD_compressBlock_opt_generic(ZSTD_CCtx* ctx,
if (opt[cur].mlen == 1) {
litlen = opt[cur].litlen;
if (cur > litlen)
- price = opt[cur - litlen].price + ZSTD_getPrice(seqStorePtr, litlen, ip+cur-litlen, matches[u].off-1, mlen - MINMATCH, ultra);
+ price = opt[cur - litlen].price + ZSTD_getPrice(optStatePtr, litlen, ip+cur-litlen, matches[u].off-1, mlen - MINMATCH, ultra);
else
- price = ZSTD_getPrice(seqStorePtr, litlen, anchor, matches[u].off-1, mlen - MINMATCH, ultra);
+ price = ZSTD_getPrice(optStatePtr, litlen, anchor, matches[u].off-1, mlen - MINMATCH, ultra);
} else {
litlen = 0;
- price = opt[cur].price + ZSTD_getPrice(seqStorePtr, 0, NULL, matches[u].off-1, mlen - MINMATCH, ultra);
+ 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))
@@ -645,13 +646,13 @@ _storeSequence: /* cur, last_pos, best_mlen, best_off have to be set */
if (litLength==0) offset--;
}
- ZSTD_updatePrice(seqStorePtr, litLength, anchor, offset, mlen-MINMATCH);
+ 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++) ctx->repToConfirm[i] = rep[i]; }
+ { int i; for (i=0; i<ZSTD_REP_NUM; i++) seqStorePtr->repToConfirm[i] = rep[i]; }
/* Last Literals */
{ size_t const lastLLSize = iend - anchor;
@@ -661,11 +662,12 @@ _storeSequence: /* cur, last_pos, best_mlen, best_off have to be set */
}
-FORCE_INLINE
+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;
@@ -683,16 +685,16 @@ void ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx* ctx,
const U32 mls = ctx->appliedParams.cParams.searchLength;
const U32 minMatch = (ctx->appliedParams.cParams.searchLength == 3) ? 3 : 4;
- ZSTD_optimal_t* opt = seqStorePtr->priceTable;
- ZSTD_match_t* matches = seqStorePtr->matchTable;
+ 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]=ctx->rep[i]; }
+ { U32 i; for (i=0; i<ZSTD_REP_NUM; i++) rep[i]=seqStorePtr->rep[i]; }
ctx->nextToUpdate3 = ctx->nextToUpdate;
- ZSTD_rescaleFreqs(seqStorePtr, (const BYTE*)src, srcSize);
+ ZSTD_rescaleFreqs(optStatePtr, (const BYTE*)src, srcSize);
ip += (ip==prefixStart);
/* Match Loop */
@@ -726,7 +728,7 @@ void ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx* ctx,
best_off = i - (ip==anchor);
litlen = opt[0].litlen;
do {
- price = ZSTD_getPrice(seqStorePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
+ 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--;
@@ -756,7 +758,7 @@ void ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx* ctx,
best_mlen = matches[u].len;
litlen = opt[0].litlen;
while (mlen <= best_mlen) {
- price = ZSTD_getPrice(seqStorePtr, litlen, anchor, matches[u].off-1, mlen - MINMATCH, ultra);
+ 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++;
@@ -773,12 +775,12 @@ void ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx* ctx,
if (opt[cur-1].mlen == 1) {
litlen = opt[cur-1].litlen + 1;
if (cur > litlen) {
- price = opt[cur - litlen].price + ZSTD_getLiteralPrice(seqStorePtr, litlen, inr-litlen);
+ price = opt[cur - litlen].price + ZSTD_getLiteralPrice(optStatePtr, litlen, inr-litlen);
} else
- price = ZSTD_getLiteralPrice(seqStorePtr, litlen, anchor);
+ price = ZSTD_getLiteralPrice(optStatePtr, litlen, anchor);
} else {
litlen = 1;
- price = opt[cur - 1].price + ZSTD_getLiteralPrice(seqStorePtr, litlen, inr-1);
+ price = opt[cur - 1].price + ZSTD_getLiteralPrice(optStatePtr, litlen, inr-1);
}
if (cur > last_pos || price <= opt[cur].price)
@@ -826,12 +828,12 @@ void ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx* ctx,
if (opt[cur].mlen == 1) {
litlen = opt[cur].litlen;
if (cur > litlen) {
- price = opt[cur - litlen].price + ZSTD_getPrice(seqStorePtr, litlen, inr-litlen, best_off, mlen - MINMATCH, ultra);
+ price = opt[cur - litlen].price + ZSTD_getPrice(optStatePtr, litlen, inr-litlen, best_off, mlen - MINMATCH, ultra);
} else
- price = ZSTD_getPrice(seqStorePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
+ price = ZSTD_getPrice(optStatePtr, litlen, anchor, best_off, mlen - MINMATCH, ultra);
} else {
litlen = 0;
- price = opt[cur].price + ZSTD_getPrice(seqStorePtr, 0, NULL, best_off, mlen - MINMATCH, ultra);
+ price = opt[cur].price + ZSTD_getPrice(optStatePtr, 0, NULL, best_off, mlen - MINMATCH, ultra);
}
if (cur + mlen > last_pos || price <= opt[cur + mlen].price)
@@ -858,12 +860,12 @@ void ZSTD_compressBlock_opt_extDict_generic(ZSTD_CCtx* ctx,
if (opt[cur].mlen == 1) {
litlen = opt[cur].litlen;
if (cur > litlen)
- price = opt[cur - litlen].price + ZSTD_getPrice(seqStorePtr, litlen, ip+cur-litlen, matches[u].off-1, mlen - MINMATCH, ultra);
+ price = opt[cur - litlen].price + ZSTD_getPrice(optStatePtr, litlen, ip+cur-litlen, matches[u].off-1, mlen - MINMATCH, ultra);
else
- price = ZSTD_getPrice(seqStorePtr, litlen, anchor, matches[u].off-1, mlen - MINMATCH, ultra);
+ price = ZSTD_getPrice(optStatePtr, litlen, anchor, matches[u].off-1, mlen - MINMATCH, ultra);
} else {
litlen = 0;
- price = opt[cur].price + ZSTD_getPrice(seqStorePtr, 0, NULL, matches[u].off-1, mlen - MINMATCH, ultra);
+ 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))
@@ -918,13 +920,13 @@ _storeSequence: /* cur, last_pos, best_mlen, best_off have to be set */
if (litLength==0) offset--;
}
- ZSTD_updatePrice(seqStorePtr, litLength, anchor, offset, mlen-MINMATCH);
+ 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++) ctx->repToConfirm[i] = rep[i]; }
+ { int i; for (i=0; i<ZSTD_REP_NUM; i++) seqStorePtr->repToConfirm[i] = rep[i]; }
/* Last Literals */
{ size_t lastLLSize = iend - anchor;
diff --git a/thirdparty/zstd/compress/zstdmt_compress.c b/thirdparty/zstd/compress/zstdmt_compress.c
index 0cee01eacb..8564bc4392 100644
--- a/thirdparty/zstd/compress/zstdmt_compress.c
+++ b/thirdparty/zstd/compress/zstdmt_compress.c
@@ -1,15 +1,16 @@
-/**
+/*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* 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).
*/
/* ====== Tuning parameters ====== */
-#define ZSTDMT_NBTHREADS_MAX 128
+#define ZSTDMT_NBTHREADS_MAX 256
+#define ZSTDMT_OVERLAPLOG_DEFAULT 6
/* ====== Compiler specifics ====== */
@@ -73,6 +74,7 @@ static unsigned long long GetCurrentClockTimeMicroseconds(void)
/* ===== Buffer Pool ===== */
+/* a single Buffer Pool can be invoked from multiple threads in parallel */
typedef struct buffer_s {
void* start;
@@ -82,6 +84,8 @@ typedef struct buffer_s {
static const buffer_t g_nullBuffer = { NULL, 0 };
typedef struct ZSTDMT_bufferPool_s {
+ pthread_mutex_t poolMutex;
+ size_t bufferSize;
unsigned totalBuffers;
unsigned nbBuffers;
ZSTD_customMem cMem;
@@ -90,10 +94,15 @@ typedef struct ZSTDMT_bufferPool_s {
static ZSTDMT_bufferPool* ZSTDMT_createBufferPool(unsigned nbThreads, ZSTD_customMem cMem)
{
- unsigned const maxNbBuffers = 2*nbThreads + 2;
+ unsigned const maxNbBuffers = 2*nbThreads + 3;
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)) {
+ ZSTD_free(bufPool, cMem);
+ return NULL;
+ }
+ bufPool->bufferSize = 64 KB;
bufPool->totalBuffers = maxNbBuffers;
bufPool->nbBuffers = 0;
bufPool->cMem = cMem;
@@ -106,6 +115,7 @@ static void ZSTDMT_freeBufferPool(ZSTDMT_bufferPool* bufPool)
if (!bufPool) return; /* compatibility with free on NULL */
for (u=0; u<bufPool->totalBuffers; u++)
ZSTD_free(bufPool->bTable[u].start, bufPool->cMem);
+ pthread_mutex_destroy(&bufPool->poolMutex);
ZSTD_free(bufPool, bufPool->cMem);
}
@@ -116,65 +126,85 @@ 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);
for (u=0; u<bufPool->totalBuffers; u++)
totalBufferSize += bufPool->bTable[u].size;
+ pthread_mutex_unlock(&bufPool->poolMutex);
return poolSize + totalBufferSize;
}
-/** ZSTDMT_getBuffer() :
- * assumption : invocation from main thread only ! */
-static buffer_t ZSTDMT_getBuffer(ZSTDMT_bufferPool* pool, size_t bSize)
+static void ZSTDMT_setBufferSize(ZSTDMT_bufferPool* bufPool, size_t bSize)
{
- if (pool->nbBuffers) { /* try to use an existing buffer */
- buffer_t const buf = pool->bTable[--(pool->nbBuffers)];
+ bufPool->bufferSize = bSize;
+}
+
+/** ZSTDMT_getBuffer() :
+ * assumption : bufPool must be valid */
+static buffer_t ZSTDMT_getBuffer(ZSTDMT_bufferPool* bufPool)
+{
+ size_t const bSize = bufPool->bufferSize;
+ DEBUGLOG(5, "ZSTDMT_getBuffer");
+ 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;
- if ((availBufferSize >= bSize) & (availBufferSize <= 10*bSize))
+ if ((availBufferSize >= bSize) & (availBufferSize <= 10*bSize)) {
/* large enough, but not too much */
+ pthread_mutex_unlock(&bufPool->poolMutex);
return buf;
+ }
/* size conditions not respected : scratch this buffer, create new one */
- ZSTD_free(buf.start, pool->cMem);
+ DEBUGLOG(5, "existing buffer does not meet size conditions => freeing");
+ ZSTD_free(buf.start, bufPool->cMem);
}
+ pthread_mutex_unlock(&bufPool->poolMutex);
/* create new buffer */
+ DEBUGLOG(5, "create a new buffer");
{ buffer_t buffer;
- void* const start = ZSTD_malloc(bSize, pool->cMem);
- if (start==NULL) bSize = 0;
+ void* const start = ZSTD_malloc(bSize, bufPool->cMem);
buffer.start = start; /* note : start can be NULL if malloc fails ! */
- buffer.size = bSize;
+ buffer.size = (start==NULL) ? 0 : bSize;
return buffer;
}
}
/* store buffer for later re-use, up to pool capacity */
-static void ZSTDMT_releaseBuffer(ZSTDMT_bufferPool* pool, buffer_t buf)
-{
- if (buf.start == NULL) return; /* release on NULL */
- if (pool->nbBuffers < pool->totalBuffers) {
- pool->bTable[pool->nbBuffers++] = buf; /* store for later re-use */
+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);
+ if (bufPool->nbBuffers < bufPool->totalBuffers) {
+ bufPool->bTable[bufPool->nbBuffers++] = buf; /* stored for later use */
+ pthread_mutex_unlock(&bufPool->poolMutex);
return;
}
+ pthread_mutex_unlock(&bufPool->poolMutex);
/* Reached bufferPool capacity (should not happen) */
- ZSTD_free(buf.start, pool->cMem);
+ DEBUGLOG(5, "buffer pool capacity reached => freeing ");
+ ZSTD_free(buf.start, bufPool->cMem);
}
/* ===== CCtx Pool ===== */
+/* a single CCtx Pool can be invoked from multiple threads in parallel */
typedef struct {
+ pthread_mutex_t poolMutex;
unsigned totalCCtx;
unsigned availCCtx;
ZSTD_customMem cMem;
ZSTD_CCtx* cctx[1]; /* variable size */
} ZSTDMT_CCtxPool;
-/* assumption : CCtxPool invocation only from main thread */
-
/* note : all CCtx borrowed from the pool should be released back to the pool _before_ freeing the pool */
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_free(pool, pool->cMem);
}
@@ -186,6 +216,10 @@ 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)) {
+ ZSTD_free(cctxPool, cMem);
+ return NULL;
+ }
cctxPool->cMem = cMem;
cctxPool->totalCCtx = nbThreads;
cctxPool->availCCtx = 1; /* at least one cctx for single-thread mode */
@@ -198,50 +232,57 @@ static ZSTDMT_CCtxPool* ZSTDMT_createCCtxPool(unsigned nbThreads,
/* only works during initialization phase, not during compression */
static size_t ZSTDMT_sizeof_CCtxPool(ZSTDMT_CCtxPool* cctxPool)
{
- unsigned const nbThreads = cctxPool->totalCCtx;
- size_t const poolSize = sizeof(*cctxPool)
- + (nbThreads-1)*sizeof(ZSTD_CCtx*);
- unsigned u;
- size_t totalCCtxSize = 0;
- for (u=0; u<nbThreads; u++)
- totalCCtxSize += ZSTD_sizeof_CCtx(cctxPool->cctx[u]);
-
- return poolSize + totalCCtxSize;
+ pthread_mutex_lock(&cctxPool->poolMutex);
+ { unsigned const nbThreads = cctxPool->totalCCtx;
+ size_t const poolSize = sizeof(*cctxPool)
+ + (nbThreads-1)*sizeof(ZSTD_CCtx*);
+ unsigned u;
+ size_t totalCCtxSize = 0;
+ for (u=0; u<nbThreads; u++) {
+ totalCCtxSize += ZSTD_sizeof_CCtx(cctxPool->cctx[u]);
+ }
+ pthread_mutex_unlock(&cctxPool->poolMutex);
+ return poolSize + totalCCtxSize;
+ }
}
-static ZSTD_CCtx* ZSTDMT_getCCtx(ZSTDMT_CCtxPool* pool)
+static ZSTD_CCtx* ZSTDMT_getCCtx(ZSTDMT_CCtxPool* cctxPool)
{
- if (pool->availCCtx) {
- pool->availCCtx--;
- return pool->cctx[pool->availCCtx];
- }
- return ZSTD_createCCtx(); /* note : can be NULL, when creation fails ! */
+ DEBUGLOG(5, "ZSTDMT_getCCtx");
+ pthread_mutex_lock(&cctxPool->poolMutex);
+ if (cctxPool->availCCtx) {
+ cctxPool->availCCtx--;
+ { ZSTD_CCtx* const cctx = cctxPool->cctx[cctxPool->availCCtx];
+ pthread_mutex_unlock(&cctxPool->poolMutex);
+ return cctx;
+ } }
+ pthread_mutex_unlock(&cctxPool->poolMutex);
+ DEBUGLOG(5, "create one more CCtx");
+ return ZSTD_createCCtx_advanced(cctxPool->cMem); /* note : can be NULL, when creation fails ! */
}
static void ZSTDMT_releaseCCtx(ZSTDMT_CCtxPool* pool, ZSTD_CCtx* cctx)
{
if (cctx==NULL) return; /* compatibility with release on NULL */
+ pthread_mutex_lock(&pool->poolMutex);
if (pool->availCCtx < pool->totalCCtx)
pool->cctx[pool->availCCtx++] = cctx;
- else
+ else {
/* pool overflow : should not happen, since totalCCtx==nbThreads */
+ DEBUGLOG(5, "CCtx pool overflow : free cctx");
ZSTD_freeCCtx(cctx);
+ }
+ pthread_mutex_unlock(&pool->poolMutex);
}
/* ===== Thread worker ===== */
typedef struct {
- buffer_t buffer;
- size_t filled;
-} inBuff_t;
-
-typedef struct {
- ZSTD_CCtx* cctx;
buffer_t src;
const void* srcStart;
- size_t srcSize;
size_t dictSize;
+ size_t srcSize;
buffer_t dstBuff;
size_t cSize;
size_t dstFlushed;
@@ -253,6 +294,8 @@ typedef struct {
pthread_cond_t* jobCompleted_cond;
ZSTD_parameters params;
const ZSTD_CDict* cdict;
+ ZSTDMT_CCtxPool* cctxPool;
+ ZSTDMT_bufferPool* bufPool;
unsigned long long fullFrameSize;
} ZSTDMT_jobDescription;
@@ -260,37 +303,56 @@ typedef struct {
void ZSTDMT_compressChunk(void* jobDescription)
{
ZSTDMT_jobDescription* const job = (ZSTDMT_jobDescription*)jobDescription;
+ ZSTD_CCtx* cctx = ZSTDMT_getCCtx(job->cctxPool);
const void* const src = (const char*)job->srcStart + job->dictSize;
- buffer_t const dstBuff = job->dstBuff;
+ buffer_t dstBuff = job->dstBuff;
DEBUGLOG(5, "job (first:%u) (last:%u) : dictSize %u, srcSize %u",
job->firstChunk, job->lastChunk, (U32)job->dictSize, (U32)job->srcSize);
+
+ if (cctx==NULL) {
+ job->cSize = ERROR(memory_allocation);
+ goto _endJob;
+ }
+
+ if (dstBuff.start == NULL) {
+ dstBuff = ZSTDMT_getBuffer(job->bufPool);
+ if (dstBuff.start==NULL) {
+ job->cSize = ERROR(memory_allocation);
+ goto _endJob;
+ }
+ job->dstBuff = dstBuff;
+ }
+
if (job->cdict) { /* should only happen for first segment */
- size_t const initError = ZSTD_compressBegin_usingCDict_advanced(job->cctx, job->cdict, job->params.fParams, job->fullFrameSize);
+ size_t const initError = ZSTD_compressBegin_usingCDict_advanced(cctx, job->cdict, job->params.fParams, job->fullFrameSize);
DEBUGLOG(5, "using CDict");
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(job->cctx, ZSTD_p_forceRawDict, 1); /* Force loading dictionary in "content-only" mode (no header analysis) */
- size_t const initError = ZSTD_compressBegin_advanced(job->cctx, job->srcStart, job->dictSize, job->params, job->fullFrameSize);
+ { 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(job->cctx, ZSTD_p_forceWindow, 1);
+ ZSTD_setCCtxParameter(cctx, ZSTD_p_forceWindow, 1);
} }
if (!job->firstChunk) { /* flush and overwrite frame header when it's not first segment */
- size_t const hSize = ZSTD_compressContinue(job->cctx, dstBuff.start, dstBuff.size, src, 0);
+ size_t const hSize = ZSTD_compressContinue(cctx, dstBuff.start, dstBuff.size, src, 0);
if (ZSTD_isError(hSize)) { job->cSize = hSize; goto _endJob; }
- ZSTD_invalidateRepCodes(job->cctx);
+ ZSTD_invalidateRepCodes(cctx);
}
DEBUGLOG(5, "Compressing : ");
DEBUG_PRINTHEX(4, job->srcStart, 12);
job->cSize = (job->lastChunk) ?
- ZSTD_compressEnd (job->cctx, dstBuff.start, dstBuff.size, src, job->srcSize) :
- ZSTD_compressContinue(job->cctx, dstBuff.start, dstBuff.size, src, job->srcSize);
+ ZSTD_compressEnd (cctx, dstBuff.start, dstBuff.size, src, job->srcSize) :
+ ZSTD_compressContinue(cctx, dstBuff.start, dstBuff.size, src, job->srcSize);
DEBUGLOG(5, "compressed %u bytes into %u bytes (first:%u) (last:%u)",
(unsigned)job->srcSize, (unsigned)job->cSize, job->firstChunk, job->lastChunk);
DEBUGLOG(5, "dstBuff.size : %u ; => %s", (U32)dstBuff.size, ZSTD_getErrorName(job->cSize));
_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);
job->jobCompleted = 1;
job->jobScanned = 0;
@@ -303,15 +365,19 @@ _endJob:
/* ===== Multi-threaded compression ===== */
/* ------------------------------------------ */
+typedef struct {
+ buffer_t buffer;
+ size_t filled;
+} inBuff_t;
+
struct ZSTDMT_CCtx_s {
POOL_ctx* factory;
ZSTDMT_jobDescription* jobs;
- ZSTDMT_bufferPool* buffPool;
+ ZSTDMT_bufferPool* bufPool;
ZSTDMT_CCtxPool* cctxPool;
pthread_mutex_t jobCompleted_mutex;
pthread_cond_t jobCompleted_cond;
size_t targetSectionSize;
- size_t marginSize;
size_t inBuffSize;
size_t dictSize;
size_t targetDictSize;
@@ -324,7 +390,7 @@ struct ZSTDMT_CCtx_s {
unsigned nextJobID;
unsigned frameEnded;
unsigned allJobsCompleted;
- unsigned overlapRLog;
+ unsigned overlapLog;
unsigned long long frameContentSize;
size_t sectionSize;
ZSTD_customMem cMem;
@@ -347,7 +413,8 @@ ZSTDMT_CCtx* ZSTDMT_createCCtx_advanced(unsigned nbThreads, ZSTD_customMem cMem)
U32 nbJobs = nbThreads + 2;
DEBUGLOG(3, "ZSTDMT_createCCtx_advanced");
- if ((nbThreads < 1) | (nbThreads > ZSTDMT_NBTHREADS_MAX)) return NULL;
+ if (nbThreads < 1) return NULL;
+ nbThreads = MIN(nbThreads , ZSTDMT_NBTHREADS_MAX);
if ((cMem.customAlloc!=NULL) ^ (cMem.customFree!=NULL))
/* invalid custom allocator */
return NULL;
@@ -358,18 +425,24 @@ ZSTDMT_CCtx* ZSTDMT_createCCtx_advanced(unsigned nbThreads, ZSTD_customMem cMem)
mtctx->nbThreads = nbThreads;
mtctx->allJobsCompleted = 1;
mtctx->sectionSize = 0;
- mtctx->overlapRLog = 3;
- mtctx->factory = POOL_create(nbThreads, 1);
+ mtctx->overlapLog = ZSTDMT_OVERLAPLOG_DEFAULT;
+ mtctx->factory = POOL_create(nbThreads, 0);
mtctx->jobs = ZSTDMT_allocJobsTable(&nbJobs, cMem);
mtctx->jobIDMask = nbJobs - 1;
- mtctx->buffPool = ZSTDMT_createBufferPool(nbThreads, cMem);
+ mtctx->bufPool = ZSTDMT_createBufferPool(nbThreads, cMem);
mtctx->cctxPool = ZSTDMT_createCCtxPool(nbThreads, cMem);
- if (!mtctx->factory | !mtctx->jobs | !mtctx->buffPool | !mtctx->cctxPool) {
+ if (!mtctx->factory | !mtctx->jobs | !mtctx->bufPool | !mtctx->cctxPool) {
+ ZSTDMT_freeCCtx(mtctx);
+ return NULL;
+ }
+ if (pthread_mutex_init(&mtctx->jobCompleted_mutex, NULL)) {
+ ZSTDMT_freeCCtx(mtctx);
+ return NULL;
+ }
+ if (pthread_cond_init(&mtctx->jobCompleted_cond, NULL)) {
ZSTDMT_freeCCtx(mtctx);
return NULL;
}
- pthread_mutex_init(&mtctx->jobCompleted_mutex, NULL); /* Todo : check init function return */
- pthread_cond_init(&mtctx->jobCompleted_cond, NULL);
DEBUGLOG(3, "mt_cctx created, for %u threads", nbThreads);
return mtctx;
}
@@ -386,15 +459,13 @@ static void ZSTDMT_releaseAllJobResources(ZSTDMT_CCtx* mtctx)
unsigned jobID;
DEBUGLOG(3, "ZSTDMT_releaseAllJobResources");
for (jobID=0; jobID <= mtctx->jobIDMask; jobID++) {
- ZSTDMT_releaseBuffer(mtctx->buffPool, mtctx->jobs[jobID].dstBuff);
+ ZSTDMT_releaseBuffer(mtctx->bufPool, mtctx->jobs[jobID].dstBuff);
mtctx->jobs[jobID].dstBuff = g_nullBuffer;
- ZSTDMT_releaseBuffer(mtctx->buffPool, mtctx->jobs[jobID].src);
+ ZSTDMT_releaseBuffer(mtctx->bufPool, mtctx->jobs[jobID].src);
mtctx->jobs[jobID].src = g_nullBuffer;
- ZSTDMT_releaseCCtx(mtctx->cctxPool, mtctx->jobs[jobID].cctx);
- mtctx->jobs[jobID].cctx = NULL;
}
memset(mtctx->jobs, 0, (mtctx->jobIDMask+1)*sizeof(ZSTDMT_jobDescription));
- ZSTDMT_releaseBuffer(mtctx->buffPool, mtctx->inBuff.buffer);
+ ZSTDMT_releaseBuffer(mtctx->bufPool, mtctx->inBuff.buffer);
mtctx->inBuff.buffer = g_nullBuffer;
mtctx->allJobsCompleted = 1;
}
@@ -404,7 +475,7 @@ 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->buffPool); /* release job resources into pools first */
+ ZSTDMT_freeBufferPool(mtctx->bufPool); /* release job resources into pools first */
ZSTD_free(mtctx->jobs, mtctx->cMem);
ZSTDMT_freeCCtxPool(mtctx->cctxPool);
ZSTD_freeCDict(mtctx->cdictLocal);
@@ -418,11 +489,11 @@ size_t ZSTDMT_sizeof_CCtx(ZSTDMT_CCtx* mtctx)
{
if (mtctx == NULL) return 0; /* supports sizeof NULL */
return sizeof(*mtctx)
- + POOL_sizeof(mtctx->factory)
- + ZSTDMT_sizeof_bufferPool(mtctx->buffPool)
- + (mtctx->jobIDMask+1) * sizeof(ZSTDMT_jobDescription)
- + ZSTDMT_sizeof_CCtxPool(mtctx->cctxPool)
- + ZSTD_sizeof_CDict(mtctx->cdictLocal);
+ + POOL_sizeof(mtctx->factory)
+ + ZSTDMT_sizeof_bufferPool(mtctx->bufPool)
+ + (mtctx->jobIDMask+1) * sizeof(ZSTDMT_jobDescription)
+ + ZSTDMT_sizeof_CCtxPool(mtctx->cctxPool)
+ + ZSTD_sizeof_CDict(mtctx->cdictLocal);
}
size_t ZSTDMT_setMTCtxParameter(ZSTDMT_CCtx* mtctx, ZSDTMT_parameter parameter, unsigned value)
@@ -434,10 +505,10 @@ size_t ZSTDMT_setMTCtxParameter(ZSTDMT_CCtx* mtctx, ZSDTMT_parameter parameter,
return 0;
case ZSTDMT_p_overlapSectionLog :
DEBUGLOG(5, "ZSTDMT_p_overlapSectionLog : %u", value);
- mtctx->overlapRLog = (value >= 9) ? 0 : 9 - value;
+ mtctx->overlapLog = (value >= 9) ? 9 : value;
return 0;
default :
- return ERROR(compressionParameter_unsupported);
+ return ERROR(parameter_unsupported);
}
}
@@ -459,12 +530,13 @@ static unsigned computeNbChunks(size_t srcSize, unsigned windowLog, unsigned nbT
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 overlapRLog)
+ void* dst, size_t dstCapacity,
+ const void* src, size_t srcSize,
+ const ZSTD_CDict* cdict,
+ ZSTD_parameters const params,
+ unsigned overlapLog)
{
+ unsigned const overlapRLog = (overlapLog>9) ? 0 : 9-overlapLog;
size_t const overlapSize = (overlapRLog>=9) ? 0 : (size_t)1 << (params.cParams.windowLog - overlapRLog);
unsigned nbChunks = computeNbChunks(srcSize, params.cParams.windowLog, mtctx->nbThreads);
size_t const proposedChunkSize = (srcSize + (nbChunks-1)) / nbChunks;
@@ -473,6 +545,7 @@ size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
size_t remainingSrcSize = srcSize;
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;
DEBUGLOG(4, "nbChunks : %2u (chunkSize : %u bytes) ", nbChunks, (U32)avgChunkSize);
if (nbChunks==1) { /* fallback to single-thread mode */
@@ -480,7 +553,9 @@ size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
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);
}
- assert(avgChunkSize >= 256 KB); /* condition for ZSTD_compressBound(A) + ZSTD_compressBound(B) <= ZSTD_compressBound(A+B), which is useful to avoid allocating extra buffers */
+ 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) );
+ XXH64_reset(&xxh64, 0);
if (nbChunks > mtctx->jobIDMask+1) { /* enlarge job table */
U32 nbJobs = nbChunks;
@@ -496,17 +571,10 @@ size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
size_t const chunkSize = MIN(remainingSrcSize, avgChunkSize);
size_t const dstBufferCapacity = ZSTD_compressBound(chunkSize);
buffer_t const dstAsBuffer = { (char*)dst + dstBufferPos, dstBufferCapacity };
- buffer_t const dstBuffer = u < compressWithinDst ? dstAsBuffer : ZSTDMT_getBuffer(mtctx->buffPool, dstBufferCapacity);
- ZSTD_CCtx* const cctx = ZSTDMT_getCCtx(mtctx->cctxPool);
+ buffer_t const dstBuffer = u < compressWithinDst ? dstAsBuffer : g_nullBuffer;
size_t dictSize = u ? overlapSize : 0;
- if ((cctx==NULL) || (dstBuffer.start==NULL)) {
- mtctx->jobs[u].cSize = ERROR(memory_allocation); /* job result */
- mtctx->jobs[u].jobCompleted = 1;
- nbChunks = u+1; /* only wait and free u jobs, instead of initially expected nbChunks ones */
- break; /* let's wait for previous jobs to complete, but don't start new ones */
- }
-
+ mtctx->jobs[u].src = g_nullBuffer;
mtctx->jobs[u].srcStart = srcStart + frameStartPos - dictSize;
mtctx->jobs[u].dictSize = dictSize;
mtctx->jobs[u].srcSize = chunkSize;
@@ -516,13 +584,18 @@ size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
/* 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;
- mtctx->jobs[u].cctx = cctx;
+ mtctx->jobs[u].cctxPool = mtctx->cctxPool;
+ mtctx->jobs[u].bufPool = mtctx->bufPool;
mtctx->jobs[u].firstChunk = (u==0);
mtctx->jobs[u].lastChunk = (u==nbChunks-1);
mtctx->jobs[u].jobCompleted = 0;
mtctx->jobs[u].jobCompleted_mutex = &mtctx->jobCompleted_mutex;
mtctx->jobs[u].jobCompleted_cond = &mtctx->jobCompleted_cond;
+ if (params.fParams.checksumFlag) {
+ XXH64_update(&xxh64, srcStart + frameStartPos, chunkSize);
+ }
+
DEBUGLOG(5, "posting job %u (%u bytes)", u, (U32)chunkSize);
DEBUG_PRINTHEX(6, mtctx->jobs[u].srcStart, 12);
POOL_add(mtctx->factory, ZSTDMT_compressChunk, &mtctx->jobs[u]);
@@ -533,8 +606,8 @@ size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
} }
/* collect result */
- { unsigned chunkID;
- size_t error = 0, dstPos = 0;
+ { size_t error = 0, dstPos = 0;
+ unsigned chunkID;
for (chunkID=0; chunkID<nbChunks; chunkID++) {
DEBUGLOG(5, "waiting for chunk %u ", chunkID);
PTHREAD_MUTEX_LOCK(&mtctx->jobCompleted_mutex);
@@ -545,8 +618,6 @@ size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
pthread_mutex_unlock(&mtctx->jobCompleted_mutex);
DEBUGLOG(5, "ready to write chunk %u ", chunkID);
- ZSTDMT_releaseCCtx(mtctx->cctxPool, mtctx->jobs[chunkID].cctx);
- mtctx->jobs[chunkID].cctx = NULL;
mtctx->jobs[chunkID].srcStart = NULL;
{ size_t const cSize = mtctx->jobs[chunkID].cSize;
if (ZSTD_isError(cSize)) error = cSize;
@@ -556,13 +627,25 @@ size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
memmove((char*)dst + dstPos, mtctx->jobs[chunkID].dstBuff.start, cSize); /* may overlap when chunk compressed within dst */
if (chunkID >= compressWithinDst) { /* chunk compressed into its own buffer, which must be released */
DEBUGLOG(5, "releasing buffer %u>=%u", chunkID, compressWithinDst);
- ZSTDMT_releaseBuffer(mtctx->buffPool, mtctx->jobs[chunkID].dstBuff);
+ ZSTDMT_releaseBuffer(mtctx->bufPool, mtctx->jobs[chunkID].dstBuff);
}
mtctx->jobs[chunkID].dstBuff = g_nullBuffer;
}
dstPos += cSize ;
}
- }
+ } /* for (chunkID=0; chunkID<nbChunks; chunkID++) */
+
+ DEBUGLOG(4, "checksumFlag : %u ", params.fParams.checksumFlag);
+ if (params.fParams.checksumFlag) {
+ U32 const checksum = (U32)XXH64_digest(&xxh64);
+ if (dstPos + 4 > dstCapacity) {
+ error = ERROR(dstSize_tooSmall);
+ } else {
+ DEBUGLOG(4, "writing checksum : %08X \n", checksum);
+ MEM_writeLE32((char*)dst + dstPos, checksum);
+ dstPos += 4;
+ } }
+
if (!error) DEBUGLOG(4, "compressed size : %u ", (U32)dstPos);
return error ? error : dstPos;
}
@@ -574,10 +657,10 @@ size_t ZSTDMT_compressCCtx(ZSTDMT_CCtx* mtctx,
const void* src, size_t srcSize,
int compressionLevel)
{
- U32 const overlapRLog = (compressionLevel >= ZSTD_maxCLevel()) ? 0 : 3;
+ U32 const overlapLog = (compressionLevel >= ZSTD_maxCLevel()) ? 9 : ZSTDMT_OVERLAPLOG_DEFAULT;
ZSTD_parameters params = ZSTD_getParams(compressionLevel, srcSize, 0);
params.fParams.contentSizeFlag = 1;
- return ZSTDMT_compress_advanced(mtctx, dst, dstCapacity, src, srcSize, NULL, params, overlapRLog);
+ return ZSTDMT_compress_advanced(mtctx, dst, dstCapacity, src, srcSize, NULL, params, overlapLog);
}
@@ -615,8 +698,8 @@ size_t ZSTDMT_initCStream_internal(ZSTDMT_CCtx* zcs,
if (zcs->nbThreads==1) {
DEBUGLOG(4, "single thread mode");
return ZSTD_initCStream_internal(zcs->cctxPool->cctx[0],
- dict, dictSize, cdict,
- params, pledgedSrcSize);
+ dict, dictSize, cdict,
+ params, pledgedSrcSize);
}
if (zcs->allJobsCompleted == 0) { /* previous compression not correctly finished */
@@ -642,18 +725,16 @@ size_t ZSTDMT_initCStream_internal(ZSTDMT_CCtx* zcs,
zcs->cdict = cdict;
}
- zcs->targetDictSize = (zcs->overlapRLog>=9) ? 0 : (size_t)1 << (zcs->params.cParams.windowLog - zcs->overlapRLog);
- DEBUGLOG(4, "overlapRLog : %u ", zcs->overlapRLog);
+ zcs->targetDictSize = (zcs->overlapLog==0) ? 0 : (size_t)1 << (zcs->params.cParams.windowLog - (9 - zcs->overlapLog));
+ DEBUGLOG(4, "overlapLog : %u ", zcs->overlapLog);
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 = MAX(ZSTDMT_SECTION_SIZE_MIN, zcs->targetSectionSize);
zcs->targetSectionSize = MAX(zcs->targetDictSize, zcs->targetSectionSize);
DEBUGLOG(4, "Section Size : %u KB", (U32)(zcs->targetSectionSize>>10));
- zcs->marginSize = zcs->targetSectionSize >> 2;
- zcs->inBuffSize = zcs->targetDictSize + zcs->targetSectionSize + zcs->marginSize;
- zcs->inBuff.buffer = ZSTDMT_getBuffer(zcs->buffPool, zcs->inBuffSize);
- if (zcs->inBuff.buffer.start == NULL) return ERROR(memory_allocation);
- zcs->inBuff.filled = 0;
+ zcs->inBuffSize = zcs->targetDictSize + zcs->targetSectionSize;
+ ZSTDMT_setBufferSize(zcs->bufPool, MAX(zcs->inBuffSize, ZSTD_compressBound(zcs->targetSectionSize)) );
+ zcs->inBuff.buffer = g_nullBuffer;
zcs->dictSize = 0;
zcs->doneJobID = 0;
zcs->nextJobID = 0;
@@ -664,8 +745,9 @@ size_t ZSTDMT_initCStream_internal(ZSTDMT_CCtx* zcs,
}
size_t ZSTDMT_initCStream_advanced(ZSTDMT_CCtx* mtctx,
- const void* dict, size_t dictSize,
- ZSTD_parameters params, unsigned long long pledgedSrcSize)
+ const void* dict, size_t dictSize,
+ ZSTD_parameters params,
+ unsigned long long pledgedSrcSize)
{
DEBUGLOG(5, "ZSTDMT_initCStream_advanced");
return ZSTDMT_initCStream_internal(mtctx, dict, dictSize, NULL, params, pledgedSrcSize);
@@ -701,19 +783,8 @@ size_t ZSTDMT_initCStream(ZSTDMT_CCtx* zcs, int compressionLevel) {
static size_t ZSTDMT_createCompressionJob(ZSTDMT_CCtx* zcs, size_t srcSize, unsigned endFrame)
{
- size_t const dstBufferCapacity = ZSTD_compressBound(srcSize);
- buffer_t const dstBuffer = ZSTDMT_getBuffer(zcs->buffPool, dstBufferCapacity);
- ZSTD_CCtx* const cctx = ZSTDMT_getCCtx(zcs->cctxPool);
unsigned const jobID = zcs->nextJobID & zcs->jobIDMask;
- if ((cctx==NULL) || (dstBuffer.start==NULL)) {
- zcs->jobs[jobID].jobCompleted = 1;
- zcs->nextJobID++;
- ZSTDMT_waitForAllJobsCompleted(zcs);
- ZSTDMT_releaseAllJobResources(zcs);
- return ERROR(memory_allocation);
- }
-
DEBUGLOG(4, "preparing job %u to compress %u bytes with %u preload ",
zcs->nextJobID, (U32)srcSize, (U32)zcs->dictSize);
zcs->jobs[jobID].src = zcs->inBuff.buffer;
@@ -726,8 +797,9 @@ static size_t ZSTDMT_createCompressionJob(ZSTDMT_CCtx* zcs, size_t srcSize, unsi
if (zcs->nextJobID) zcs->jobs[jobID].params.fParams.checksumFlag = 0;
zcs->jobs[jobID].cdict = zcs->nextJobID==0 ? zcs->cdict : NULL;
zcs->jobs[jobID].fullFrameSize = zcs->frameContentSize;
- zcs->jobs[jobID].dstBuff = dstBuffer;
- zcs->jobs[jobID].cctx = cctx;
+ zcs->jobs[jobID].dstBuff = g_nullBuffer;
+ zcs->jobs[jobID].cctxPool = zcs->cctxPool;
+ zcs->jobs[jobID].bufPool = zcs->bufPool;
zcs->jobs[jobID].firstChunk = (zcs->nextJobID==0);
zcs->jobs[jobID].lastChunk = endFrame;
zcs->jobs[jobID].jobCompleted = 0;
@@ -735,11 +807,13 @@ static size_t ZSTDMT_createCompressionJob(ZSTDMT_CCtx* zcs, size_t srcSize, unsi
zcs->jobs[jobID].jobCompleted_mutex = &zcs->jobCompleted_mutex;
zcs->jobs[jobID].jobCompleted_cond = &zcs->jobCompleted_cond;
+ if (zcs->params.fParams.checksumFlag)
+ XXH64_update(&zcs->xxhState, (const char*)zcs->inBuff.buffer.start + zcs->dictSize, srcSize);
+
/* get a new buffer for next input */
if (!endFrame) {
size_t const newDictSize = MIN(srcSize + zcs->dictSize, zcs->targetDictSize);
- DEBUGLOG(5, "ZSTDMT_createCompressionJob::endFrame = %u", endFrame);
- zcs->inBuff.buffer = ZSTDMT_getBuffer(zcs->buffPool, zcs->inBuffSize);
+ zcs->inBuff.buffer = ZSTDMT_getBuffer(zcs->bufPool);
if (zcs->inBuff.buffer.start == NULL) { /* not enough memory to allocate next input buffer */
zcs->jobs[jobID].jobCompleted = 1;
zcs->nextJobID++;
@@ -747,26 +821,20 @@ static size_t ZSTDMT_createCompressionJob(ZSTDMT_CCtx* zcs, size_t srcSize, unsi
ZSTDMT_releaseAllJobResources(zcs);
return ERROR(memory_allocation);
}
- DEBUGLOG(5, "inBuff currently filled to %u", (U32)zcs->inBuff.filled);
zcs->inBuff.filled -= srcSize + zcs->dictSize - newDictSize;
- DEBUGLOG(5, "new job : inBuff filled to %u, with %u dict and %u src",
- (U32)zcs->inBuff.filled, (U32)newDictSize,
- (U32)(zcs->inBuff.filled - newDictSize));
memmove(zcs->inBuff.buffer.start,
(const char*)zcs->jobs[jobID].srcStart + zcs->dictSize + srcSize - newDictSize,
zcs->inBuff.filled);
- DEBUGLOG(5, "new inBuff pre-filled");
zcs->dictSize = newDictSize;
} else { /* if (endFrame==1) */
- DEBUGLOG(5, "ZSTDMT_createCompressionJob::endFrame = %u", endFrame);
zcs->inBuff.buffer = g_nullBuffer;
zcs->inBuff.filled = 0;
zcs->dictSize = 0;
zcs->frameEnded = 1;
- if (zcs->nextJobID == 0)
+ if (zcs->nextJobID == 0) {
/* single chunk exception : checksum is calculated directly within worker thread */
zcs->params.fParams.checksumFlag = 0;
- }
+ } }
DEBUGLOG(4, "posting job %u : %u bytes (end:%u) (note : doneJob = %u=>%u)",
zcs->nextJobID,
@@ -804,11 +872,8 @@ static size_t ZSTDMT_flushNextJob(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* output, unsi
ZSTDMT_releaseAllJobResources(zcs);
return job.cSize;
}
- ZSTDMT_releaseCCtx(zcs->cctxPool, job.cctx);
- zcs->jobs[wJobID].cctx = NULL;
DEBUGLOG(5, "zcs->params.fParams.checksumFlag : %u ", zcs->params.fParams.checksumFlag);
if (zcs->params.fParams.checksumFlag) {
- XXH64_update(&zcs->xxhState, (const char*)job.srcStart + job.dictSize, job.srcSize);
if (zcs->frameEnded && (zcs->doneJobID+1 == zcs->nextJobID)) { /* write checksum at end of last section */
U32 const checksum = (U32)XXH64_digest(&zcs->xxhState);
DEBUGLOG(5, "writing checksum : %08X \n", checksum);
@@ -816,9 +881,6 @@ static size_t ZSTDMT_flushNextJob(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* output, unsi
job.cSize += 4;
zcs->jobs[wJobID].cSize += 4;
} }
- ZSTDMT_releaseBuffer(zcs->buffPool, job.src);
- zcs->jobs[wJobID].srcStart = NULL;
- zcs->jobs[wJobID].src = g_nullBuffer;
zcs->jobs[wJobID].jobScanned = 1;
}
{ size_t const toWrite = MIN(job.cSize - job.dstFlushed, output->size - output->pos);
@@ -828,7 +890,7 @@ static size_t ZSTDMT_flushNextJob(ZSTDMT_CCtx* zcs, ZSTD_outBuffer* output, unsi
job.dstFlushed += toWrite;
}
if (job.dstFlushed == job.cSize) { /* output buffer fully flushed => move to next one */
- ZSTDMT_releaseBuffer(zcs->buffPool, job.dstBuff);
+ ZSTDMT_releaseBuffer(zcs->bufPool, job.dstBuff);
zcs->jobs[wJobID].dstBuff = g_nullBuffer;
zcs->jobs[wJobID].jobCompleted = 0;
zcs->doneJobID++;
@@ -852,18 +914,18 @@ size_t ZSTDMT_compressStream_generic(ZSTDMT_CCtx* mtctx,
ZSTD_inBuffer* input,
ZSTD_EndDirective endOp)
{
- size_t const newJobThreshold = mtctx->dictSize + mtctx->targetSectionSize + mtctx->marginSize;
+ size_t const newJobThreshold = mtctx->dictSize + mtctx->targetSectionSize;
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 */
return ERROR(stage_wrong);
}
- if (mtctx->nbThreads==1) {
+ if (mtctx->nbThreads==1) { /* delegate to single-thread (synchronous) */
return ZSTD_compressStream_generic(mtctx->cctxPool->cctx[0], output, input, endOp);
}
- /* single-pass shortcut (note : this is blocking-mode) */
+ /* 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 */
@@ -871,24 +933,29 @@ size_t ZSTDMT_compressStream_generic(ZSTDMT_CCtx* mtctx,
size_t const cSize = ZSTDMT_compress_advanced(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->overlapRLog);
+ mtctx->cdict, mtctx->params, mtctx->overlapLog);
if (ZSTD_isError(cSize)) return cSize;
input->pos = input->size;
output->pos += cSize;
- ZSTDMT_releaseBuffer(mtctx->buffPool, mtctx->inBuff.buffer); /* was allocated in initStream */
+ ZSTDMT_releaseBuffer(mtctx->bufPool, mtctx->inBuff.buffer); /* was allocated in initStream */
mtctx->allJobsCompleted = 1;
mtctx->frameEnded = 1;
return 0;
}
/* fill input buffer */
- if ((input->src) && (mtctx->inBuff.buffer.start)) { /* support NULL input */
- size_t const toLoad = MIN(input->size - input->pos, mtctx->inBuffSize - mtctx->inBuff.filled);
- DEBUGLOG(2, "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;
- }
+ 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.filled = 0;
+ }
+ { 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;
+ } }
if ( (mtctx->inBuff.filled >= newJobThreshold) /* filled enough : let's compress */
&& (mtctx->nextJobID <= mtctx->doneJobID + mtctx->jobIDMask) ) { /* avoid overwriting job round buffer */
diff --git a/thirdparty/zstd/compress/zstdmt_compress.h b/thirdparty/zstd/compress/zstdmt_compress.h
index fad63b6d86..0f0fc2b03f 100644
--- a/thirdparty/zstd/compress/zstdmt_compress.h
+++ b/thirdparty/zstd/compress/zstdmt_compress.h
@@ -1,10 +1,10 @@
-/**
+/*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* 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).
*/
#ifndef ZSTDMT_COMPRESS_H
@@ -15,10 +15,11 @@
#endif
-/* Note : All prototypes defined in this file are labelled experimental.
- * No guarantee of API continuity is provided on any of them.
- * In fact, the expectation is that these prototypes will be replaced
- * by ZSTD_compress_generic() API in the near future */
+/* Note : This is an internal API.
+ * Some methods are still exposed (ZSTDLIB_API),
+ * because it used to be the only way to invoke MT compression.
+ * Now, it's recommended to use ZSTD_compress_generic() instead.
+ * These methods will stop being exposed in a future version */
/* === Dependencies === */
#include <stddef.h> /* size_t */
@@ -67,7 +68,7 @@ ZSTDLIB_API size_t ZSTDMT_compress_advanced(ZSTDMT_CCtx* mtctx,
const void* src, size_t srcSize,
const ZSTD_CDict* cdict,
ZSTD_parameters const params,
- unsigned overlapRLog);
+ unsigned overlapLog);
ZSTDLIB_API size_t ZSTDMT_initCStream_advanced(ZSTDMT_CCtx* mtctx,
const void* dict, size_t dictSize, /* dict can be released after init, a local copy is preserved within zcs */
diff --git a/thirdparty/zstd/decompress/huf_decompress.c b/thirdparty/zstd/decompress/huf_decompress.c
index 2a1b70ea5e..79ded96bf6 100644
--- a/thirdparty/zstd/decompress/huf_decompress.c
+++ b/thirdparty/zstd/decompress/huf_decompress.c
@@ -33,37 +33,21 @@
****************************************************************** */
/* **************************************************************
-* Compiler specifics
-****************************************************************/
-#ifdef _MSC_VER /* Visual Studio */
-# define FORCE_INLINE static __forceinline
-# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
-#else
-# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
-# ifdef __GNUC__
-# define FORCE_INLINE static inline __attribute__((always_inline))
-# else
-# define FORCE_INLINE static inline
-# endif
-# else
-# define FORCE_INLINE static
-# endif /* __STDC_VERSION__ */
-#endif
-
-
-/* **************************************************************
* Dependencies
****************************************************************/
#include <string.h> /* memcpy, memset */
#include "bitstream.h" /* BIT_* */
+#include "compiler.h"
#include "fse.h" /* header compression */
#define HUF_STATIC_LINKING_ONLY
#include "huf.h"
+#include "error_private.h"
/* **************************************************************
* Error Management
****************************************************************/
+#define HUF_isError ERR_isError
#define HUF_STATIC_ASSERT(c) { enum { HUF_static_assert = 1/(int)(!!(c)) }; } /* use only *after* variable declarations */
@@ -180,7 +164,7 @@ static BYTE HUF_decodeSymbolX2(BIT_DStream_t* Dstream, const HUF_DEltX2* dt, con
if (MEM_64bits()) \
HUF_DECODE_SYMBOLX2_0(ptr, DStreamPtr)
-FORCE_INLINE size_t HUF_decodeStreamX2(BYTE* p, BIT_DStream_t* const bitDPtr, BYTE* const pEnd, const HUF_DEltX2* const dt, const U32 dtLog)
+HINT_INLINE size_t HUF_decodeStreamX2(BYTE* p, BIT_DStream_t* const bitDPtr, BYTE* const pEnd, const HUF_DEltX2* const dt, const U32 dtLog)
{
BYTE* const pStart = p;
@@ -639,7 +623,7 @@ static U32 HUF_decodeLastSymbolX4(void* op, BIT_DStream_t* DStream, const HUF_DE
if (MEM_64bits()) \
ptr += HUF_decodeSymbolX4(ptr, DStreamPtr, dt, dtLog)
-FORCE_INLINE size_t HUF_decodeStreamX4(BYTE* p, BIT_DStream_t* bitDPtr, BYTE* const pEnd, const HUF_DEltX4* const dt, const U32 dtLog)
+HINT_INLINE size_t HUF_decodeStreamX4(BYTE* p, BIT_DStream_t* bitDPtr, BYTE* const pEnd, const HUF_DEltX4* const dt, const U32 dtLog)
{
BYTE* const pStart = p;
@@ -917,11 +901,11 @@ static const algo_time_t algoTime[16 /* Quantization */][3 /* single, double, qu
* Tells which decoder is likely to decode faster,
* based on a set of pre-determined metrics.
* @return : 0==HUF_decompress4X2, 1==HUF_decompress4X4 .
-* Assumption : 0 < cSrcSize < dstSize <= 128 KB */
+* Assumption : 0 < cSrcSize, dstSize <= 128 KB */
U32 HUF_selectDecoder (size_t dstSize, size_t cSrcSize)
{
/* decoder timing evaluation */
- U32 const Q = (U32)(cSrcSize * 16 / dstSize); /* Q < 16 since dstSize > cSrcSize */
+ U32 const Q = cSrcSize >= dstSize ? 15 : (U32)(cSrcSize * 16 / dstSize); /* Q < 16 */
U32 const D256 = (U32)(dstSize >> 8);
U32 const DTime0 = algoTime[Q][0].tableTime + (algoTime[Q][0].decode256Time * D256);
U32 DTime1 = algoTime[Q][1].tableTime + (algoTime[Q][1].decode256Time * D256);
@@ -977,7 +961,7 @@ size_t HUF_decompress4X_hufOnly_wksp(HUF_DTable* dctx, void* dst,
{
/* validation checks */
if (dstSize == 0) return ERROR(dstSize_tooSmall);
- if ((cSrcSize >= dstSize) || (cSrcSize <= 1)) return ERROR(corruption_detected); /* invalid */
+ if (cSrcSize == 0) return ERROR(corruption_detected);
{ U32 const algoNb = HUF_selectDecoder(dstSize, cSrcSize);
return algoNb ? HUF_decompress4X4_DCtx_wksp(dctx, dst, dstSize, cSrc, cSrcSize, workSpace, wkspSize):
diff --git a/thirdparty/zstd/decompress/zstd_decompress.c b/thirdparty/zstd/decompress/zstd_decompress.c
index 465bcc20b5..d2bc545e52 100644
--- a/thirdparty/zstd/decompress/zstd_decompress.c
+++ b/thirdparty/zstd/decompress/zstd_decompress.c
@@ -1,10 +1,10 @@
-/**
+/*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* 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).
*/
@@ -53,15 +53,6 @@
# include "zstd_legacy.h"
#endif
-#if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_I86)) /* _mm_prefetch() is not defined outside of x86/x64 */
-# include <mmintrin.h> /* https://msdn.microsoft.com/fr-fr/library/84szxsww(v=vs.90).aspx */
-# define ZSTD_PREFETCH(ptr) _mm_prefetch((const char*)ptr, _MM_HINT_T0)
-#elif defined(__GNUC__)
-# define ZSTD_PREFETCH(ptr) __builtin_prefetch(ptr, 0, 0)
-#else
-# define ZSTD_PREFETCH(ptr) /* disabled */
-#endif
-
/*-*************************************
* Errors
@@ -95,7 +86,7 @@ typedef struct {
HUF_DTable hufTable[HUF_DTABLE_SIZE(HufLog)]; /* can accommodate HUF_decompress4X */
U32 workspace[HUF_DECOMPRESS_WORKSPACE_SIZE_U32];
U32 rep[ZSTD_REP_NUM];
-} ZSTD_entropyTables_t;
+} ZSTD_entropyDTables_t;
struct ZSTD_DCtx_s
{
@@ -103,7 +94,7 @@ struct ZSTD_DCtx_s
const FSE_DTable* MLTptr;
const FSE_DTable* OFTptr;
const HUF_DTable* HUFptr;
- ZSTD_entropyTables_t entropy;
+ ZSTD_entropyDTables_t entropy;
const void* previousDstEnd; /* detect continuity */
const void* base; /* start of current segment */
const void* vBase; /* virtual start of previous segment if it was just before current one */
@@ -304,15 +295,18 @@ size_t ZSTD_getFrameHeader(ZSTD_frameHeader* zfhPtr, const void* src, size_t src
return ZSTD_skippableHeaderSize; /* magic number + frame length */
memset(zfhPtr, 0, sizeof(*zfhPtr));
zfhPtr->frameContentSize = MEM_readLE32((const char *)src + 4);
- zfhPtr->windowSize = 0; /* windowSize==0 means a frame is skippable */
+ 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);
- if (srcSize < fhsize) return fhsize; }
+ { size_t const fhsize = ZSTD_frameHeaderSize(src, srcSize);
+ if (srcSize < fhsize) return fhsize;
+ zfhPtr->headerSize = (U32)fhsize;
+ }
{ BYTE const fhdByte = ip[4];
size_t pos = 5;
@@ -320,24 +314,23 @@ size_t ZSTD_getFrameHeader(ZSTD_frameHeader* zfhPtr, const void* src, size_t src
U32 const checksumFlag = (fhdByte>>2)&1;
U32 const singleSegment = (fhdByte>>5)&1;
U32 const fcsID = fhdByte>>6;
- U32 const windowSizeMax = 1U << ZSTD_WINDOWLOG_MAX;
- U32 windowSize = 0;
+ U64 windowSize = 0;
U32 dictID = 0;
- U64 frameContentSize = 0;
+ U64 frameContentSize = ZSTD_CONTENTSIZE_UNKNOWN;
if ((fhdByte & 0x08) != 0)
- return ERROR(frameParameter_unsupported); /* reserved bits, must be zero */
+ return ERROR(frameParameter_unsupported); /* reserved bits, must be zero */
+
if (!singleSegment) {
BYTE const wlByte = ip[pos++];
U32 const windowLog = (wlByte >> 3) + ZSTD_WINDOWLOG_ABSOLUTEMIN;
if (windowLog > ZSTD_WINDOWLOG_MAX)
return ERROR(frameParameter_windowTooLarge);
- windowSize = (1U << windowLog);
+ windowSize = (1ULL << windowLog);
windowSize += (windowSize >> 3) * (wlByte&7);
}
-
switch(dictIDSizeCode)
{
- default: /* impossible */
+ default: assert(0); /* impossible */
case 0 : break;
case 1 : dictID = ip[pos]; pos++; break;
case 2 : dictID = MEM_readLE16(ip+pos); pos+=2; break;
@@ -345,14 +338,15 @@ size_t ZSTD_getFrameHeader(ZSTD_frameHeader* zfhPtr, const void* src, size_t src
}
switch(fcsID)
{
- default: /* impossible */
+ default: assert(0); /* impossible */
case 0 : if (singleSegment) frameContentSize = ip[pos]; break;
case 1 : frameContentSize = MEM_readLE16(ip+pos)+256; break;
case 2 : frameContentSize = MEM_readLE32(ip+pos); break;
case 3 : frameContentSize = MEM_readLE64(ip+pos); break;
}
- if (!windowSize) windowSize = (U32)frameContentSize;
- if (windowSize > windowSizeMax) return ERROR(frameParameter_windowTooLarge);
+ if (singleSegment) windowSize = frameContentSize;
+
+ zfhPtr->frameType = ZSTD_frame;
zfhPtr->frameContentSize = frameContentSize;
zfhPtr->windowSize = windowSize;
zfhPtr->dictID = dictID;
@@ -362,10 +356,10 @@ size_t ZSTD_getFrameHeader(ZSTD_frameHeader* zfhPtr, const void* src, size_t src
}
/** ZSTD_getFrameContentSize() :
-* compatible with legacy mode
-* @return : decompressed size of the single frame pointed to be `src` if known, otherwise
-* - ZSTD_CONTENTSIZE_UNKNOWN if the size cannot be determined
-* - ZSTD_CONTENTSIZE_ERROR if an error occurred (e.g. invalid magic number, srcSize too small) */
+ * compatible with legacy mode
+ * @return : decompressed size of the single frame pointed to be `src` if known, otherwise
+ * - ZSTD_CONTENTSIZE_UNKNOWN if the size cannot be determined
+ * - ZSTD_CONTENTSIZE_ERROR if an error occurred (e.g. invalid magic number, srcSize too small) */
unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcSize)
{
#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT >= 1)
@@ -374,17 +368,14 @@ unsigned long long ZSTD_getFrameContentSize(const void *src, size_t srcSize)
return ret == 0 ? ZSTD_CONTENTSIZE_UNKNOWN : ret;
}
#endif
- { ZSTD_frameHeader fParams;
- if (ZSTD_getFrameHeader(&fParams, src, srcSize) != 0) return ZSTD_CONTENTSIZE_ERROR;
- if (fParams.windowSize == 0) {
- /* Either skippable or empty frame, size == 0 either way */
+ { ZSTD_frameHeader zfh;
+ if (ZSTD_getFrameHeader(&zfh, src, srcSize) != 0)
+ return ZSTD_CONTENTSIZE_ERROR;
+ if (zfh.frameType == ZSTD_skippableFrame) {
return 0;
- } else if (fParams.frameContentSize != 0) {
- return fParams.frameContentSize;
} else {
- return ZSTD_CONTENTSIZE_UNKNOWN;
- }
- }
+ return zfh.frameContentSize;
+ } }
}
/** ZSTD_findDecompressedSize() :
@@ -442,7 +433,8 @@ unsigned long long ZSTD_findDecompressedSize(const void* src, size_t srcSize)
* compatible with legacy mode
* @return : decompressed size if known, 0 otherwise
note : 0 can mean any of the following :
- - decompressed size is not present within frame header
+ - frame content is empty
+ - decompressed size field is not present in frame header
- frame header unknown / not supported
- frame header not complete (`srcSize` too small) */
unsigned long long ZSTD_getDecompressedSize(const void* src, size_t srcSize)
@@ -460,7 +452,8 @@ static size_t ZSTD_decodeFrameHeader(ZSTD_DCtx* dctx, const void* src, size_t he
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 */
- if (dctx->fParams.dictID && (dctx->dictID != dctx->fParams.dictID)) return ERROR(dictionary_wrong);
+ if (dctx->fParams.dictID && (dctx->dictID != dctx->fParams.dictID))
+ return ERROR(dictionary_wrong);
if (dctx->fParams.checksumFlag) XXH64_reset(&dctx->xxhState, 0);
return 0;
}
@@ -951,7 +944,7 @@ static seq_t ZSTD_decodeSequence(seqState_t* seqState)
}
-FORCE_INLINE
+HINT_INLINE
size_t ZSTD_execSequence(BYTE* op,
BYTE* const oend, seq_t sequence,
const BYTE** litPtr, const BYTE* const litLimit,
@@ -1095,7 +1088,7 @@ static size_t ZSTD_decompressSequences(
}
-FORCE_INLINE seq_t ZSTD_decodeSequenceLong_generic(seqState_t* seqState, int const longOffsets)
+FORCE_INLINE_TEMPLATE seq_t ZSTD_decodeSequenceLong_generic(seqState_t* seqState, int const longOffsets)
{
seq_t seq;
@@ -1195,7 +1188,7 @@ static seq_t ZSTD_decodeSequenceLong(seqState_t* seqState, unsigned const window
}
}
-FORCE_INLINE
+HINT_INLINE
size_t ZSTD_execSequenceLong(BYTE* op,
BYTE* const oend, seq_t sequence,
const BYTE** litPtr, const BYTE* const litLimit,
@@ -1331,7 +1324,7 @@ static size_t ZSTD_decompressSequencesLong(
seq_t const sequence = ZSTD_decodeSequenceLong(&seqState, windowSize32);
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;
- ZSTD_PREFETCH(sequence.match);
+ PREFETCH(sequence.match);
sequences[seqNb&STOSEQ_MASK] = sequence;
op += oneSeqSize;
}
@@ -1433,28 +1426,26 @@ size_t ZSTD_generateNxBytes(void* dst, size_t dstCapacity, BYTE byte, size_t len
size_t ZSTD_findFrameCompressedSize(const void *src, size_t srcSize)
{
#if defined(ZSTD_LEGACY_SUPPORT) && (ZSTD_LEGACY_SUPPORT >= 1)
- if (ZSTD_isLegacy(src, srcSize)) return ZSTD_findFrameCompressedSizeLegacy(src, srcSize);
+ if (ZSTD_isLegacy(src, srcSize))
+ return ZSTD_findFrameCompressedSizeLegacy(src, srcSize);
#endif
- if (srcSize >= ZSTD_skippableHeaderSize &&
- (MEM_readLE32(src) & 0xFFFFFFF0U) == ZSTD_MAGIC_SKIPPABLE_START) {
+ if ( (srcSize >= ZSTD_skippableHeaderSize)
+ && (MEM_readLE32(src) & 0xFFFFFFF0U) == ZSTD_MAGIC_SKIPPABLE_START ) {
return ZSTD_skippableHeaderSize + MEM_readLE32((const BYTE*)src + 4);
} else {
const BYTE* ip = (const BYTE*)src;
const BYTE* const ipstart = ip;
size_t remainingSize = srcSize;
- ZSTD_frameHeader fParams;
+ ZSTD_frameHeader zfh;
- size_t const headerSize = ZSTD_frameHeaderSize(ip, remainingSize);
- if (ZSTD_isError(headerSize)) return headerSize;
-
- /* Frame Header */
- { size_t const ret = ZSTD_getFrameHeader(&fParams, ip, remainingSize);
+ /* Extract Frame Header */
+ { size_t const ret = ZSTD_getFrameHeader(&zfh, src, srcSize);
if (ZSTD_isError(ret)) return ret;
if (ret > 0) return ERROR(srcSize_wrong);
}
- ip += headerSize;
- remainingSize -= headerSize;
+ ip += zfh.headerSize;
+ remainingSize -= zfh.headerSize;
/* Loop on each block */
while (1) {
@@ -1462,7 +1453,8 @@ size_t ZSTD_findFrameCompressedSize(const void *src, size_t srcSize)
size_t const cBlockSize = ZSTD_getcBlockSize(ip, remainingSize, &blockProperties);
if (ZSTD_isError(cBlockSize)) return cBlockSize;
- if (ZSTD_blockHeaderSize + cBlockSize > remainingSize) return ERROR(srcSize_wrong);
+ if (ZSTD_blockHeaderSize + cBlockSize > remainingSize)
+ return ERROR(srcSize_wrong);
ip += ZSTD_blockHeaderSize + cBlockSize;
remainingSize -= ZSTD_blockHeaderSize + cBlockSize;
@@ -1470,7 +1462,7 @@ size_t ZSTD_findFrameCompressedSize(const void *src, size_t srcSize)
if (blockProperties.lastBlock) break;
}
- if (fParams.checksumFlag) { /* Frame content checksum */
+ if (zfh.checksumFlag) { /* Final frame content checksum */
if (remainingSize < 4) return ERROR(srcSize_wrong);
ip += 4;
remainingSize -= 4;
@@ -1483,8 +1475,8 @@ size_t ZSTD_findFrameCompressedSize(const void *src, size_t srcSize)
/*! ZSTD_decompressFrame() :
* @dctx must be properly initialized */
static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx,
- void* dst, size_t dstCapacity,
- const void** srcPtr, size_t *srcSizePtr)
+ void* dst, size_t dstCapacity,
+ const void** srcPtr, size_t *srcSizePtr)
{
const BYTE* ip = (const BYTE*)(*srcPtr);
BYTE* const ostart = (BYTE* const)dst;
@@ -1493,13 +1485,15 @@ static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx,
size_t remainingSize = *srcSizePtr;
/* check */
- if (remainingSize < ZSTD_frameHeaderSize_min+ZSTD_blockHeaderSize) return ERROR(srcSize_wrong);
+ if (remainingSize < ZSTD_frameHeaderSize_min+ZSTD_blockHeaderSize)
+ return ERROR(srcSize_wrong);
/* Frame Header */
{ size_t const frameHeaderSize = ZSTD_frameHeaderSize(ip, ZSTD_frameHeaderSize_prefix);
if (ZSTD_isError(frameHeaderSize)) return frameHeaderSize;
- if (remainingSize < frameHeaderSize+ZSTD_blockHeaderSize) return ERROR(srcSize_wrong);
- CHECK_F(ZSTD_decodeFrameHeader(dctx, ip, frameHeaderSize));
+ if (remainingSize < frameHeaderSize+ZSTD_blockHeaderSize)
+ return ERROR(srcSize_wrong);
+ CHECK_F( ZSTD_decodeFrameHeader(dctx, ip, frameHeaderSize) );
ip += frameHeaderSize; remainingSize -= frameHeaderSize;
}
@@ -1531,14 +1525,15 @@ static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx,
}
if (ZSTD_isError(decodedSize)) return decodedSize;
- if (dctx->fParams.checksumFlag) XXH64_update(&dctx->xxhState, op, decodedSize);
+ if (dctx->fParams.checksumFlag)
+ XXH64_update(&dctx->xxhState, op, decodedSize);
op += decodedSize;
ip += cBlockSize;
remainingSize -= cBlockSize;
if (blockProperties.lastBlock) break;
}
- if (dctx->fParams.checksumFlag) { /* Frame content checksum verification */
+ if (dctx->fParams.checksumFlag) { /* Frame content checksum verification */
U32 const checkCalc = (U32)XXH64_digest(&dctx->xxhState);
U32 checkRead;
if (remainingSize<4) return ERROR(checksum_wrong);
@@ -1560,17 +1555,13 @@ static size_t ZSTD_DDictDictSize(const ZSTD_DDict* ddict);
static size_t ZSTD_decompressMultiFrame(ZSTD_DCtx* dctx,
void* dst, size_t dstCapacity,
const void* src, size_t srcSize,
- const void *dict, size_t dictSize,
+ const void* dict, size_t dictSize,
const ZSTD_DDict* ddict)
{
void* const dststart = dst;
+ assert(dict==NULL || ddict==NULL); /* either dict or ddict set, not both */
if (ddict) {
- if (dict) {
- /* programmer error, these two cases should be mutually exclusive */
- return ERROR(GENERIC);
- }
-
dict = ZSTD_DDictDictContent(ddict);
dictSize = ZSTD_DDictDictSize(ddict);
}
@@ -1583,7 +1574,7 @@ static size_t ZSTD_decompressMultiFrame(ZSTD_DCtx* dctx,
size_t decodedSize;
size_t const frameSize = ZSTD_findFrameCompressedSizeLegacy(src, srcSize);
if (ZSTD_isError(frameSize)) return frameSize;
- /* legacy support is incompatible with static dctx */
+ /* legacy support is not compatible with static dctx */
if (dctx->staticSize) return ERROR(memory_allocation);
decodedSize = ZSTD_decompressLegacy(dst, dstCapacity, src, frameSize, dict, dictSize);
@@ -1606,16 +1597,13 @@ static size_t ZSTD_decompressMultiFrame(ZSTD_DCtx* dctx,
return ERROR(srcSize_wrong);
skippableSize = MEM_readLE32((const BYTE *)src + 4) +
ZSTD_skippableHeaderSize;
- if (srcSize < skippableSize) {
- return ERROR(srcSize_wrong);
- }
+ if (srcSize < skippableSize) return ERROR(srcSize_wrong);
src = (const BYTE *)src + skippableSize;
srcSize -= skippableSize;
continue;
- } else {
- return ERROR(prefix_unknown);
}
+ return ERROR(prefix_unknown);
}
if (ddict) {
@@ -1631,12 +1619,11 @@ static size_t ZSTD_decompressMultiFrame(ZSTD_DCtx* dctx,
{ const size_t res = ZSTD_decompressFrame(dctx, dst, dstCapacity,
&src, &srcSize);
if (ZSTD_isError(res)) return res;
- /* don't need to bounds check this, ZSTD_decompressFrame will have
- * already */
+ /* no need to bound check, ZSTD_decompressFrame already has */
dst = (BYTE*)dst + res;
dstCapacity -= res;
}
- }
+ } /* while (srcSize >= ZSTD_frameHeaderSize_prefix) */
if (srcSize) return ERROR(srcSize_wrong); /* input not entirely consumed */
@@ -1735,7 +1722,7 @@ size_t ZSTD_decompressContinue(ZSTD_DCtx* dctx, void* dst, size_t dstCapacity, c
return 0;
}
dctx->expected = 0; /* not necessary to copy more */
-
+ /* fall-through */
case ZSTDds_decodeFrameHeader:
assert(src != NULL);
memcpy(dctx->headerBuffer + ZSTD_frameHeaderSize_prefix, src, dctx->expected);
@@ -1846,7 +1833,7 @@ static size_t ZSTD_refDictContent(ZSTD_DCtx* dctx, const void* dict, size_t dict
/* ZSTD_loadEntropy() :
* dict : must point at beginning of a valid zstd dictionary
* @return : size of entropy tables read */
-static size_t ZSTD_loadEntropy(ZSTD_entropyTables_t* entropy, const void* const dict, size_t const dictSize)
+static size_t ZSTD_loadEntropy(ZSTD_entropyDTables_t* entropy, const void* const dict, size_t const dictSize)
{
const BYTE* dictPtr = (const BYTE*)dict;
const BYTE* const dictEnd = dictPtr + dictSize;
@@ -1924,8 +1911,9 @@ static size_t ZSTD_decompress_insertDictionary(ZSTD_DCtx* dctx, const void* dict
size_t ZSTD_decompressBegin_usingDict(ZSTD_DCtx* dctx, const void* dict, size_t dictSize)
{
- CHECK_F(ZSTD_decompressBegin(dctx));
- if (dict && dictSize) CHECK_E(ZSTD_decompress_insertDictionary(dctx, dict, dictSize), dictionary_corrupted);
+ CHECK_F( ZSTD_decompressBegin(dctx) );
+ if (dict && dictSize)
+ CHECK_E(ZSTD_decompress_insertDictionary(dctx, dict, dictSize), dictionary_corrupted);
return 0;
}
@@ -1936,7 +1924,7 @@ struct ZSTD_DDict_s {
void* dictBuffer;
const void* dictContent;
size_t dictSize;
- ZSTD_entropyTables_t entropy;
+ ZSTD_entropyDTables_t entropy;
U32 dictID;
U32 entropyPresent;
ZSTD_customMem cMem;
@@ -1954,7 +1942,7 @@ static size_t ZSTD_DDictDictSize(const ZSTD_DDict* ddict)
size_t ZSTD_decompressBegin_usingDDict(ZSTD_DCtx* dstDCtx, const ZSTD_DDict* ddict)
{
- CHECK_F(ZSTD_decompressBegin(dstDCtx));
+ CHECK_F( ZSTD_decompressBegin(dstDCtx) );
if (ddict) { /* support begin on NULL */
dstDCtx->dictID = ddict->dictID;
dstDCtx->base = ddict->dictContent;
@@ -2135,7 +2123,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 , 0 , 0 };
+ ZSTD_frameHeader zfp = { 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;
@@ -2230,7 +2218,7 @@ size_t ZSTD_setDStreamParameter(ZSTD_DStream* zds,
{
switch(paramType)
{
- default : return ERROR(parameter_unknown);
+ default : return ERROR(parameter_unsupported);
case DStream_p_maxWindowSize : zds->maxWindowSize = paramValue ? paramValue : (U32)(-1); break;
}
return 0;
@@ -2247,16 +2235,19 @@ 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);
- return sizeof(ZSTD_DStream) + ZSTD_estimateDCtxSize() + inBuffSize + outBuffSize;
+ return ZSTD_estimateDCtxSize() + inBuffSize + outBuffSize;
}
ZSTDLIB_API size_t ZSTD_estimateDStreamSize_fromFrame(const void* src, size_t srcSize)
{
- ZSTD_frameHeader fh;
- size_t const err = ZSTD_getFrameHeader(&fh, src, srcSize);
+ U32 const windowSizeMax = 1U << ZSTD_WINDOWLOG_MAX;
+ ZSTD_frameHeader zfh;
+ size_t const err = ZSTD_getFrameHeader(&zfh, src, srcSize);
if (ZSTD_isError(err)) return err;
if (err>0) return ERROR(srcSize_wrong);
- return ZSTD_estimateDStreamSize(fh.windowSize);
+ if (zfh.windowSize > windowSizeMax)
+ return ERROR(frameParameter_windowTooLarge);
+ return ZSTD_estimateDStreamSize((size_t)zfh.windowSize);
}
@@ -2307,16 +2298,14 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
size_t const dictSize = zds->ddict ? zds->ddict->dictSize : 0;
/* legacy support is incompatible with static dctx */
if (zds->staticSize) return ERROR(memory_allocation);
- CHECK_F(ZSTD_initLegacyStream(&zds->legacyContext, zds->previousLegacyVersion, legacyVersion,
- dict, dictSize));
+ CHECK_F(ZSTD_initLegacyStream(&zds->legacyContext,
+ zds->previousLegacyVersion, legacyVersion,
+ dict, dictSize));
zds->legacyVersion = zds->previousLegacyVersion = legacyVersion;
- return ZSTD_decompressLegacyStream(zds->legacyContext, zds->legacyVersion, output, input);
- } else {
- return hSize; /* error */
+ return ZSTD_decompressLegacyStream(zds->legacyContext, legacyVersion, output, input);
}
-#else
- return hSize;
#endif
+ return hSize; /* error */
}
if (hSize != 0) { /* need more input */
size_t const toLoad = hSize - zds->lhSize; /* if hSize!=0, hSize > zds->lhSize */
@@ -2367,8 +2356,8 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
if (zds->fParams.windowSize > zds->maxWindowSize) return ERROR(frameParameter_windowTooLarge);
/* Adapt buffer sizes to frame header instructions */
- { size_t const blockSize = MIN(zds->fParams.windowSize, ZSTD_BLOCKSIZE_MAX);
- size_t const neededOutSize = zds->fParams.windowSize + blockSize + WILDCOPY_OVERLENGTH * 2;
+ { 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;
@@ -2393,7 +2382,7 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
zds->outBuffSize = neededOutSize;
} }
zds->streamStage = zdss_read;
- /* pass-through */
+ /* fall-through */
case zdss_read:
DEBUGLOG(5, "stage zdss_read");
@@ -2418,8 +2407,7 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
} }
if (ip==iend) { someMoreWork = 0; break; } /* no more input */
zds->streamStage = zdss_load;
- /* pass-through */
-
+ /* fall-through */
case zdss_load:
{ size_t const neededInSize = ZSTD_nextSrcSizeToDecompress(zds);
size_t const toLoad = neededInSize - zds->inPos; /* should always be <= remaining space within inBuff */
@@ -2441,8 +2429,7 @@ size_t ZSTD_decompressStream(ZSTD_DStream* zds, ZSTD_outBuffer* output, ZSTD_inB
zds->outEnd = zds->outStart + decodedSize;
} }
zds->streamStage = zdss_flush;
- /* pass-through */
-
+ /* fall-through */
case zdss_flush:
{ size_t const toFlushSize = zds->outEnd - zds->outStart;
size_t const flushedSize = ZSTD_limitCopy(op, oend-op, zds->outBuff + zds->outStart, toFlushSize);
diff --git a/thirdparty/zstd/zstd.h b/thirdparty/zstd/zstd.h
index 58e9a5606d..13b4563fd6 100644
--- a/thirdparty/zstd/zstd.h
+++ b/thirdparty/zstd/zstd.h
@@ -2,11 +2,10 @@
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* 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).
*/
-
#if defined (__cplusplus)
extern "C" {
#endif
@@ -59,7 +58,7 @@ extern "C" {
/*------ Version ------*/
#define ZSTD_VERSION_MAJOR 1
#define ZSTD_VERSION_MINOR 3
-#define ZSTD_VERSION_RELEASE 0
+#define ZSTD_VERSION_RELEASE 1
#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 */
@@ -425,13 +424,6 @@ typedef struct {
ZSTD_frameParameters fParams;
} ZSTD_parameters;
-typedef struct {
- unsigned long long frameContentSize;
- size_t windowSize;
- unsigned dictID;
- unsigned checksumFlag;
-} ZSTD_frameHeader;
-
/*= Custom memory allocation functions */
typedef void* (*ZSTD_allocFunction) (void* opaque, size_t size);
typedef void (*ZSTD_freeFunction) (void* opaque, void* address);
@@ -809,7 +801,6 @@ ZSTDLIB_API size_t ZSTD_compressContinue(ZSTD_CCtx* cctx, void* dst, size_t dstC
ZSTDLIB_API size_t ZSTD_compressEnd(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize);
-
/*-
Buffer-less streaming decompression (synchronous mode)
@@ -874,6 +865,15 @@ ZSTDLIB_API size_t ZSTD_compressEnd(ZSTD_CCtx* cctx, void* dst, size_t dstCapaci
*/
/*===== 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 windowSize; /* can be very large, up to <= frameContentSize */
+ 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_decompressBegin(ZSTD_DCtx* dctx);
ZSTDLIB_API size_t ZSTD_decompressBegin_usingDict(ZSTD_DCtx* dctx, const void* dict, size_t dictSize);
@@ -953,7 +953,9 @@ typedef enum {
* Special: value 0 means "do not change strategy". */
/* frame parameters */
- ZSTD_p_contentSizeFlag=200, /* Content size is written into frame header _whenever known_ (default:1) */
+ ZSTD_p_contentSizeFlag=200, /* Content size is written into frame header _whenever known_ (default:1)
+ * note that content size must be known at the beginning,
+ * it is sent using ZSTD_CCtx_setPledgedSrcSize() */
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) */